{"_id":"@anygpt/types","_rev":"8-416e6e58a1e6021dc92551130e9db83c","name":"@anygpt/types","dist-tags":{"latest":"2.0.1"},"versions":{"0.1.0":{"name":"@anygpt/types","version":"0.1.0","keywords":["typescript","types","ai","gpt","definitions"],"author":{"name":"AnyGPT Contributors"},"license":"MIT","_id":"@anygpt/types@0.1.0","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"homepage":"https://github.com/genai-tools/anygpt#readme","bugs":{"url":"https://github.com/genai-tools/anygpt/issues"},"dist":{"shasum":"21d5430e09bf7d01063a57fa620bd938c1116859","tarball":"https://registry.npmjs.org/@anygpt/types/-/types-0.1.0.tgz","fileCount":5,"integrity":"sha512-JG2cD2Qyp0sKumFvRjQ51x1M26W+xI+bzs9N2obK0dLf+K9t9173AkcEA0WauvwH6WoD2nc5pL535XQw69qIpA==","signatures":[{"sig":"MEUCIFiAVL/MLI0q/Aei1Wy+OwatU3x56Vy5u+OUg99n0eHWAiEAtcwQ2NfwvlKCr5LmMlBY4CIHzk+gD9t8vEMs2a+GikA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anygpt%2ftypes@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16401},"main":"./dist/index.js","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"},"./package.json":"./package.json"},"gitHead":"2fd94ce4107cbaaec0807d0e6afac3c1da845b07","_npmUser":{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"},"repository":{"url":"git+https://github.com/genai-tools/anygpt.git","type":"git","directory":"packages/types"},"_npmVersion":"10.9.3","description":"TypeScript type definitions for AnyGPT - zero runtime dependencies","directories":{},"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/types_0.1.0_1759608700159_0.3944966803487626","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@anygpt/types","version":"0.1.3","keywords":["typescript","types","ai","gpt","definitions"],"author":{"name":"AnyGPT Contributors"},"license":"MIT","_id":"@anygpt/types@0.1.3","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"homepage":"https://github.com/genai-tools/anygpt#readme","bugs":{"url":"https://github.com/genai-tools/anygpt/issues"},"dist":{"shasum":"1d8894a55871b1852886efbb821824be62f8e0e2","tarball":"https://registry.npmjs.org/@anygpt/types/-/types-0.1.3.tgz","fileCount":4,"integrity":"sha512-Uw+WCVlfPzTmEaucMFLRzK2F13e6w2uhlGMpD4B3i6vz/NTTpJ0l4VXz9CK5G0IO/vku8N0WCw9XjMhBJfjkzg==","signatures":[{"sig":"MEUCIQDqcIP0YSwZsA4omrGsKlCYsbLjDGKGLRIdaf41zc4W4QIgYMjpX0sSGVZaikJMmYJZk1WamFYwJvrxL7VG3BgrdL0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anygpt%2ftypes@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16399},"main":"./dist/index.js","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"},"./package.json":"./package.json"},"gitHead":"7afca831e7f4bc95133539e174c81f7003db1f8a","_npmUser":{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"},"repository":{"url":"git+https://github.com/genai-tools/anygpt.git","type":"git","directory":"packages/types"},"_npmVersion":"10.9.3","description":"TypeScript type definitions for AnyGPT - zero runtime dependencies","directories":{},"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/types_0.1.3_1759619525253_0.519773255506828","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@anygpt/types","version":"0.1.4","keywords":["typescript","types","ai","gpt","definitions"],"author":{"name":"AnyGPT Contributors"},"license":"MIT","_id":"@anygpt/types@0.1.4","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"homepage":"https://github.com/genai-tools/anygpt#readme","bugs":{"url":"https://github.com/genai-tools/anygpt/issues"},"dist":{"shasum":"90d30c67751974ccf38fb690d693a3bdcb63da50","tarball":"https://registry.npmjs.org/@anygpt/types/-/types-0.1.4.tgz","fileCount":4,"integrity":"sha512-QMzF7xiGLiNrY0/LSNCaCodxWsAjFBMP108QN3WWoWLVioMVOWT2YbcxheXCkQU7wojQ82EfLkR0Ge3+u7knKw==","signatures":[{"sig":"MEYCIQCQFWHWlY/hiyyxcFMWyTsjb+aKygrFvapjGuLe7Qh8HwIhAO/YM0X1i6W86fPZS/n1lciXkxyHPVXS5/Yf/SAyLVMF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16399},"main":"./dist/index.js","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"},"./package.json":"./package.json"},"gitHead":"d7cf5764e5689d60076447b0f9234b0649c989be","_npmUser":{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"},"repository":{"url":"git+https://github.com/genai-tools/anygpt.git","type":"git","directory":"packages/types"},"_npmVersion":"11.6.0","description":"TypeScript type definitions for AnyGPT - zero runtime dependencies","directories":{},"_nodeVersion":"24.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/types_0.1.4_1759754266222_0.11238933180916533","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@anygpt/types","version":"0.2.0","keywords":["typescript","types","ai","gpt","definitions"],"author":{"name":"AnyGPT Contributors"},"license":"MIT","_id":"@anygpt/types@0.2.0","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"homepage":"https://github.com/genai-tools/anygpt#readme","bugs":{"url":"https://github.com/genai-tools/anygpt/issues"},"dist":{"shasum":"a1bf07b0297094dbab75538e7bfa101ca8ce3ef9","tarball":"https://registry.npmjs.org/@anygpt/types/-/types-0.2.0.tgz","fileCount":4,"integrity":"sha512-HHVXbjGc9eBBiAmXau92Jjy8ywaGoxlWxbzM6VIswRxgWjKm9/9UD2m0gX9mW17zMESxxEq4bGWZqutJRow+zg==","signatures":[{"sig":"MEUCIF2I/UD6yOULL/IK7Skdhef1USECyyEy1cCB+pjD9tGoAiEAj95y0i1y3e19wjsawWjJV61Mi1fuwo4JPM81jdJ0nS8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16452},"main":"./dist/index.js","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"},"./package.json":"./package.json"},"gitHead":"459adc4bfe025048b6651c480c93334d18691233","_npmUser":{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"},"repository":{"url":"git+https://github.com/genai-tools/anygpt.git","type":"git","directory":"packages/types"},"_npmVersion":"11.6.0","description":"TypeScript type definitions for AnyGPT - zero runtime dependencies","directories":{},"_nodeVersion":"24.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/types_0.2.0_1759909929873_0.3006110530127435","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@anygpt/types","version":"1.0.0","keywords":["typescript","types","ai","gpt","definitions"],"author":{"name":"AnyGPT Contributors"},"license":"MIT","_id":"@anygpt/types@1.0.0","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"homepage":"https://github.com/genai-tools/anygpt#readme","bugs":{"url":"https://github.com/genai-tools/anygpt/issues"},"dist":{"shasum":"a78b92f06a17588f6080ace5eea8f49f787c949a","tarball":"https://registry.npmjs.org/@anygpt/types/-/types-1.0.0.tgz","fileCount":4,"integrity":"sha512-dAfMNBAvxv2vq1JgSJROplntloTPkOzevu40QLIWihqOaoYFHG/B3PYMMmsa90j9BaVg2aH/ibU2mvVEm/SkXQ==","signatures":[{"sig":"MEQCIAdZ+7wmEto+ShMymtUerkLKraEd3MUiEhy4XGwWElkkAiB5LN9rpnVGXOKwJSYPRYL/iCadEdRu6qAaNRy70QGPYg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16452},"main":"./dist/index.js","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"},"./package.json":"./package.json"},"gitHead":"23f2c0034f0e09fcced1adcc0a354a4bf03bb9ba","_npmUser":{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"},"repository":{"url":"git+https://github.com/genai-tools/anygpt.git","type":"git","directory":"packages/types"},"_npmVersion":"11.6.0","description":"TypeScript type definitions for AnyGPT - zero runtime dependencies","directories":{},"_nodeVersion":"24.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/types_1.0.0_1760004022498_0.4584259807933324","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@anygpt/types","version":"1.1.0","keywords":["typescript","types","ai","gpt","definitions"],"author":{"name":"AnyGPT Contributors"},"license":"MIT","_id":"@anygpt/types@1.1.0","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"homepage":"https://github.com/genai-tools/anygpt#readme","bugs":{"url":"https://github.com/genai-tools/anygpt/issues"},"dist":{"shasum":"7fb108803d8556d8e1cb312f17feeeba70a287e9","tarball":"https://registry.npmjs.org/@anygpt/types/-/types-1.1.0.tgz","fileCount":4,"integrity":"sha512-QizSctQgBCfnhzyMlWSNLpAsrmoVYV6mMjkq4MaHw6hHu7laZNBfL9P3BsD71SfHxboUm0d/YohxEb/tAK83/A==","signatures":[{"sig":"MEUCIQD+FSAD9MaVWFjBjYgJsylUxw68THpigER1xKjaJFd5uwIgJkfV9syom4hgdPOdYs5jvaW3YoLdxn8Pmw+ta3sXvVI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17105},"main":"./dist/index.js","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"},"./package.json":"./package.json"},"gitHead":"a6449019274244c118f478b3c2e182e9a3503d02","_npmUser":{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"},"repository":{"url":"git+https://github.com/genai-tools/anygpt.git","type":"git","directory":"packages/types"},"_npmVersion":"11.6.0","description":"TypeScript type definitions for AnyGPT - zero runtime dependencies","directories":{},"_nodeVersion":"24.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/types_1.1.0_1760222988720_0.4864530900413566","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@anygpt/types","version":"1.2.0","keywords":["typescript","types","ai","gpt","definitions"],"author":{"name":"AnyGPT Contributors"},"license":"MIT","_id":"@anygpt/types@1.2.0","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"homepage":"https://github.com/genai-tools/anygpt#readme","bugs":{"url":"https://github.com/genai-tools/anygpt/issues"},"dist":{"shasum":"cd96620be7ff401f5b5c3a8ce8284b38cc1ec947","tarball":"https://registry.npmjs.org/@anygpt/types/-/types-1.2.0.tgz","fileCount":4,"integrity":"sha512-JVsZ5BsjHQkG/RPm9LT/bKPTacORgciAgz1PDjkUiSAj+VCWfymNmKJnB5CX3ub+0aNf52BaYxahHvFEwhdeJw==","signatures":[{"sig":"MEUCIQDufHKQQOhIdUhFhay7/dPSvfuSgyVGnKvbKaLtZgiDsQIgf02VKypQIxQFgaFZ3sZ9GKd7Usl0U/nW3nRT2K7/ZMU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17238},"main":"./dist/index.js","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"},"./package.json":"./package.json"},"gitHead":"6cd81e0e51813dca22fe3fd30f707d7b42a52e15","_npmUser":{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"},"repository":{"url":"git+https://github.com/genai-tools/anygpt.git","type":"git","directory":"packages/types"},"_npmVersion":"11.6.1","description":"TypeScript type definitions for AnyGPT - zero runtime dependencies","directories":{},"_nodeVersion":"24.10.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/types_1.2.0_1760436819075_0.9065400980033351","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@anygpt/types","version":"2.0.1","description":"TypeScript type definitions for AnyGPT - zero runtime dependencies","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"repository":{"type":"git","url":"git+https://github.com/genai-tools/anygpt.git","directory":"packages/types"},"keywords":["typescript","types","ai","gpt","definitions"],"author":{"name":"AnyGPT Contributors"},"license":"MIT","bugs":{"url":"https://github.com/genai-tools/anygpt/issues"},"homepage":"https://github.com/genai-tools/anygpt#readme","publishConfig":{"access":"public"},"dependencies":{"@anygpt/rules":"0.3.1"},"gitHead":"694856d0f9aa5bafc05fbf934367a8add2fddb59","_id":"@anygpt/types@2.0.1","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-n4sgI89XrpRSXY35HjJLqJ3oLDZJTqcG9OtVscPuD77JBGGEyki8eFLAKDFOEgKlsVlIxz059P3oJAo7G68j/g==","shasum":"2cead0b65c0c65a8fa2d36a16274166129714409","tarball":"https://registry.npmjs.org/@anygpt/types/-/types-2.0.1.tgz","fileCount":4,"unpackedSize":22092,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGXpFtnMKihygb7eqHzD7+aWWxjWf0kN6Tv6bfr2UBwUAiEAzZmhgWjkbj76pivZqIJvYXA55ocCLfiqbzUObp647q0="}]},"_npmUser":{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"},"directories":{},"maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/types_2.0.1_1761046506202_0.25037680939164786"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-04T20:11:40.000Z","modified":"2025-10-21T11:35:06.597Z","0.1.0":"2025-10-04T20:11:40.346Z","0.1.3":"2025-10-04T23:12:05.520Z","0.1.4":"2025-10-06T12:37:46.409Z","0.2.0":"2025-10-08T07:52:10.085Z","1.0.0":"2025-10-09T10:00:22.689Z","1.1.0":"2025-10-11T22:49:48.922Z","1.2.0":"2025-10-14T10:13:39.258Z","2.0.1":"2025-10-21T11:35:06.393Z"},"bugs":{"url":"https://github.com/genai-tools/anygpt/issues"},"author":{"name":"AnyGPT Contributors"},"license":"MIT","homepage":"https://github.com/genai-tools/anygpt#readme","keywords":["typescript","types","ai","gpt","definitions"],"repository":{"type":"git","url":"git+https://github.com/genai-tools/anygpt.git","directory":"packages/types"},"description":"TypeScript type definitions for AnyGPT - zero runtime dependencies","maintainers":[{"name":"theplenkov-npm","email":"petr.plenkov@gmail.com"}],"readme":"# @anygpt/types\n\n> **⚠️ WORK IN PROGRESS**: This package is under active development. Type definitions may change significantly. Use at your own risk in production environments.\n\nPure type definitions for the AnyGPT ecosystem with **zero runtime dependencies**.\n\n## Purpose\n\nThis package contains ONLY TypeScript type definitions and interfaces. It has no runtime dependencies and produces virtually no JavaScript output (0.01 kB).\n\n## Key Benefits\n\n1. **Zero Runtime Overhead**: Use with `import type` for compile-time only imports\n2. **No Dependency Hell**: Packages can share types without heavy runtime dependencies\n3. **Clean Architecture**: Avoids circular dependencies between packages\n4. **Lightweight**: Perfect for packages that only need type information\n\n## Usage\n\nAlways use `import type` syntax to ensure zero runtime impact:\n\n```typescript\n// ✅ Correct - zero runtime overhead\nimport type {\n  ConnectorFactory,\n  AnyGPTConfig,\n  ChatCompletionRequest,\n} from '@anygpt/types';\n\n// ❌ Avoid - creates runtime dependency\nimport { ConnectorFactory } from '@anygpt/types';\n```\n\n## Architecture Problem Solved\n\n**Before**: Packages needed heavy router dependency just for types\n\n```typescript\n// Heavy dependency just for types!\nimport type { ConnectorFactory } from '@anygpt/router';\n```\n\n**After**: Lightweight types-only dependency\n\n```typescript\n// Pure types, zero runtime cost\nimport type { ConnectorFactory } from '@anygpt/types';\n```\n\n## Package Dependencies\n\n- **Runtime Dependencies**: NONE ✅\n- **Dev Dependencies**: Inherited from root package.json\n- **Build Output**: ~0.01 kB JavaScript (essentially empty)\n- **Type Definitions**: ~8 kB of .d.ts files\n\n## Type Categories\n\n### Base Types\n\n- `ChatMessage`, `ChatCompletionRequest`, `ChatCompletionResponse`\n- `ModelInfo`, `ConnectorConfig`, `Logger`\n\n### Connector Types\n\n- `IConnector`, `ConnectorFactory`, `IConnectorRegistry`\n\n### Router Types\n\n- `RouterConfig`, `ApiConfig`, `ProviderConfig`\n- `ResponseRequest`, `ResponseResponse`, `Tool`, `ToolChoice`\n\n### Configuration Types\n\n- `AnyGPTConfig`, `ConfigLoadOptions`\n\n## Best Practices\n\n1. **Always use `import type`** - never regular imports\n2. **Keep this package pure** - no runtime code, only types\n3. **Extend interfaces** rather than duplicating types\n4. **Use this for shared contracts** between packages\n\n## Example: Connector Implementation\n\n```typescript\nimport type {\n  ConnectorFactory,\n  IConnector,\n  BaseChatCompletionRequest,\n  BaseChatCompletionResponse,\n} from '@anygpt/types';\n\nexport class MyConnectorFactory implements ConnectorFactory {\n  getProviderId(): string {\n    return 'my-provider';\n  }\n\n  create(config: ConnectorConfig): IConnector {\n    return new MyConnector(config);\n  }\n}\n```\n\nThis approach keeps packages lightweight while ensuring type safety across the entire AnyGPT ecosystem.\n","readmeFilename":"README.md"}