{"_id":"@alexma03/utcp-text","_rev":"3-2e5ab3b4c872d1ea986c5d5a593d9936","name":"@alexma03/utcp-text","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.0":{"name":"@alexma03/utcp-text","version":"1.1.0","keywords":["utcp","text","content","browser","tool calling"],"author":{"name":"Alexma03"},"license":"MPL-2.0","_id":"@alexma03/utcp-text@1.1.0","maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"homepage":"https://github.com/Alexma03/alexma03-utcp#readme","bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"dist":{"shasum":"1afadc4770c529b118eec473b77f3765ac6f667d","tarball":"https://registry.npmjs.org/@alexma03/utcp-text/-/utcp-text-1.1.0.tgz","fileCount":8,"integrity":"sha512-PF5zxYbe2lm9AqoyD5QmuubmqGhlqCi0s1BHGx+kJXqDOi31U6n3gLH4/9mWxKtfjFRPge3illgZV47ygw/VIQ==","signatures":[{"sig":"MEQCIGtnv5KbIs7tklTHvullMMtwIANZMzzU0jbxa53QR1HLAiATMC4QHzBsMdsGGlxIRJuUMmvxeDjAZyXW2kYuJfLW9w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":771232},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"97f8055784030184a8917378a6de581d7ae7f22d","scripts":{"build":"tsup"},"_npmUser":{"name":"alexma03","email":"alex03marcos@gmail.com"},"repository":{"url":"git+https://github.com/Alexma03/alexma03-utcp.git","type":"git","directory":"packages/text"},"_npmVersion":"11.9.0","description":"Text content protocol for UTCP - handles direct text content (browser-compatible)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"js-yaml":"^4.1.0","@alexma03/utcp-sdk":"workspace:*","@alexma03/utcp-http":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/utcp-text_1.1.0_1773650848177_0.1747136847940911","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@alexma03/utcp-text","version":"1.1.1","keywords":["utcp","text","content","browser","tool calling"],"author":{"name":"Alexma03"},"license":"MPL-2.0","_id":"@alexma03/utcp-text@1.1.1","maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"homepage":"https://github.com/Alexma03/alexma03-utcp#readme","bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"dist":{"shasum":"c25cca6ce9daaa39eb06a31eba0942152ccd8269","tarball":"https://registry.npmjs.org/@alexma03/utcp-text/-/utcp-text-1.1.1.tgz","fileCount":8,"integrity":"sha512-SULfYpHDSgtpBhR6i7RTPQe3HqNgOD5mwpNTauRKnEQLVhlLihUN0e2CtI3rrtY2zUtU+T5Zn9MkseWY7AhTWQ==","signatures":[{"sig":"MEQCIFaDJe2k8gI1x6ws9TMronzAAoFe+YBipOpeR34+FyQQAiBC5wK4umifjqu4DY1HV/G+LAoxUApWWMiZYu9Ion5pTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":771222},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e836da75819768e8584255bfb61e7bdee947b035","scripts":{"build":"tsup"},"_npmUser":{"name":"alexma03","email":"alex03marcos@gmail.com"},"repository":{"url":"git+https://github.com/Alexma03/alexma03-utcp.git","type":"git","directory":"packages/text"},"_npmVersion":"11.9.0","description":"Text content protocol for UTCP - handles direct text content (browser-compatible)","directories":{},"_nodeVersion":"24.14.0","dependencies":{"js-yaml":"^4.1.0","@alexma03/utcp-sdk":"^1.1.0","@alexma03/utcp-http":"^1.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/utcp-text_1.1.1_1773651994147_0.19525264864566316","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@alexma03/utcp-text","version":"1.1.2","description":"Text content protocol for UTCP - handles direct text content (browser-compatible)","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","license":"MPL-2.0","author":{"name":"Alexma03"},"repository":{"type":"git","url":"git+https://github.com/Alexma03/alexma03-utcp.git","directory":"packages/text"},"homepage":"https://github.com/Alexma03/alexma03-utcp#readme","bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"keywords":["utcp","text","content","browser","tool calling"],"publishConfig":{"access":"public"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs","default":"./dist/index.js"}},"dependencies":{"@alexma03/utcp-http":"^1.1.3","@alexma03/utcp-sdk":"^1.1.1","js-yaml":"^4.1.0"},"devDependencies":{"@types/node":"20.0.0","typescript":"^5.0.0"},"scripts":{"build":"tsup"},"_id":"@alexma03/utcp-text@1.1.2","_integrity":"sha512-s9qPILy6lSUuruxthEDkRm+ryn2A4XkL9HKi/YgRUDlmO6vzLfgx/FoEczaOvqlBDUlg13VSeNpchhFUVVCBag==","_resolved":"/private/var/folders/mw/dp007xzd5sz9vkhkjfz0fdh40000gn/T/5879e5d3f7d1c2e584ed0e28f033f9f1/alexma03-utcp-text-1.1.2.tgz","_from":"file:alexma03-utcp-text-1.1.2.tgz","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-s9qPILy6lSUuruxthEDkRm+ryn2A4XkL9HKi/YgRUDlmO6vzLfgx/FoEczaOvqlBDUlg13VSeNpchhFUVVCBag==","shasum":"b7fadb602eefccb4ff0e349f0e3c5cbe7e67c597","tarball":"https://registry.npmjs.org/@alexma03/utcp-text/-/utcp-text-1.1.2.tgz","fileCount":8,"unpackedSize":771479,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFNbdoURdGRq401/7wfVzwzGlvv0AIUw24+FS3kk1VxYAiEAuh9sWl3xEv0dBR10P/qbJDYzZzaERCIX2aECbzCEA28="}]},"_npmUser":{"name":"alexma03","email":"alex03marcos@gmail.com"},"directories":{},"maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/utcp-text_1.1.2_1773735258311_0.17783456767653982"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-16T08:47:28.123Z","modified":"2026-03-17T08:14:18.581Z","1.1.0":"2026-03-16T08:47:28.329Z","1.1.1":"2026-03-16T09:06:34.306Z","1.1.2":"2026-03-17T08:14:18.477Z"},"bugs":{"url":"https://github.com/Alexma03/alexma03-utcp/issues"},"author":{"name":"Alexma03"},"license":"MPL-2.0","homepage":"https://github.com/Alexma03/alexma03-utcp#readme","keywords":["utcp","text","content","browser","tool calling"],"repository":{"type":"git","url":"git+https://github.com/Alexma03/alexma03-utcp.git","directory":"packages/text"},"description":"Text content protocol for UTCP - handles direct text content (browser-compatible)","maintainers":[{"name":"alexma03","email":"alex03marcos@gmail.com"}],"readme":"# @alexma03/utcp-text\n\nText Content Communication Protocol plugin for the Universal Tool Calling Protocol (UTCP).\n\n## Overview\n\nThis plugin provides support for loading UTCP manuals and tool definitions from direct text/string content. Unlike `@alexma03/utcp-file` which reads from files, this plugin is **browser-compatible** and works in any JavaScript environment.\n\n## Installation\n\n```bash\nnpm install @alexma03/utcp-text\n```\n\n## Usage\n\nThe plugin automatically registers itself when imported:\n\n```typescript\nimport '@alexma03/utcp-text';\nimport { UtcpClient } from '@alexma03/utcp-sdk';\n\nconst utcpManualContent = JSON.stringify({\n  tools: [\n    {\n      name: 'my_tool',\n      description: 'A sample tool',\n      inputs: { type: 'object', properties: {} },\n      outputs: { type: 'object', properties: {} }\n    }\n  ]\n});\n\nconst client = await UtcpClient.create();\nawait client.registerManual({\n  call_template_type: 'text',\n  name: 'my-manual',\n  content: utcpManualContent\n});\n```\n\n## Features\n\n- **Browser-Compatible**: No file system dependencies\n- **Multiple Formats**: Supports both JSON and YAML content\n- **OpenAPI Conversion**: Automatically converts OpenAPI specs to UTCP manuals\n- **Type-Safe**: Full TypeScript support with Zod validation\n\n## Text Call Template\n\nThe text call template accepts the following configuration:\n\n- `call_template_type`: Must be set to `'text'`\n- `name`: Unique identifier for this manual\n- `content`: String content containing the UTCP manual or OpenAPI spec (required)\n- `auth_tools`: Optional authentication to apply to tools from OpenAPI specs\n\n## Example: OpenAPI Spec\n\n```typescript\nimport '@alexma03/utcp-text';\nimport { UtcpClient } from '@alexma03/utcp-sdk';\n\nconst openApiSpec = `\nopenapi: 3.0.0\ninfo:\n  title: My API\n  version: 1.0.0\npaths:\n  /users:\n    get:\n      summary: Get users\n      responses:\n        '200':\n          description: Success\n`;\n\nconst client = await UtcpClient.create();\nawait client.registerManual({\n  call_template_type: 'text',\n  name: 'my-api',\n  content: openApiSpec\n});\n```\n\n## Browser Usage\n\nPerfect for web applications:\n\n```typescript\nimport '@alexma03/utcp-text';\nimport { UtcpClient } from '@alexma03/utcp-sdk';\n\n// Load from API or inline\nconst response = await fetch('/api/utcp-manual');\nconst manualContent = await response.text();\n\nconst client = await UtcpClient.create();\nawait client.registerManual({\n  call_template_type: 'text',\n  name: 'remote-manual',\n  content: manualContent\n});\n```\n\n## Comparison with @alexma03/utcp-file\n\n| Feature | @alexma03/utcp-text | @alexma03/utcp-file |\n|---------|-------------|-----------|\n| Browser compatible | ✅ Yes | ❌ No |\n| Node.js compatible | ✅ Yes | ✅ Yes |\n| File system access | ❌ No | ✅ Yes |\n| Direct content | ✅ Yes | ❌ No |\n| Use case | Web apps, inline content | Server-side file reading |\n\n## License\n\nMPL-2.0\n","readmeFilename":"README.md"}