{"_id":"@agentxin-ai/chatkit-types","_rev":"14-513826aa878c86542a92a5811a0b3b09","name":"@agentxin-ai/chatkit-types","dist-tags":{"latest":"0.5.3"},"versions":{"0.0.17":{"name":"@agentxin-ai/chatkit-types","version":"0.0.17","_id":"@agentxin-ai/chatkit-types@0.0.17","maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"homepage":"https://github.com/agentxin-ai/chatkit-js#readme","bugs":{"url":"https://github.com/agentxin-ai/chatkit-js/issues"},"dist":{"shasum":"3ff8591d06afa0b7fec5373dc6e2811de9e4bc7a","tarball":"https://registry.npmjs.org/@agentxin-ai/chatkit-types/-/chatkit-types-0.0.17.tgz","fileCount":6,"integrity":"sha512-5s8khLJ0rTbjrt4Th8k7y0E0RcmwIgE7iY6yBdXQdzo+y4aXhnQLo3ZH1be72RQKLMXEioIP1++kFhFw7Z/ROQ==","signatures":[{"sig":"MEYCIQDYmaQnINQG8pKyI2iDMjzFrKZH0JFwSuH5Z8rglgCvzAIhAIxdNsmhXnRkkUCjXa/NVIVA6NTmFyfmVvtPMSdfIEJj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69680},"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"},"scripts":{"build":"vite build","clean":"rimraf dist","types":"tsc"},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"repository":{"url":"git+https://github.com/agentxin-ai/chatkit-js.git","type":"git"},"_npmVersion":"10.9.4","description":"Type definitions for the ChatKit.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","vite-plugin-dts":"^3.7.0"},"peerDependencies":{"@a2ui/lit":"^0.8.1","@langchain/core":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/chatkit-types_0.0.17_1774321671785_0.7813568459454454","host":"s3://npm-registry-packages-npm-production"}},"0.0.11":{"name":"@agentxin-ai/chatkit-types","version":"0.0.11","_id":"@agentxin-ai/chatkit-types@0.0.11","maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"homepage":"https://github.com/agentxin-ai/chatkit-js#readme","bugs":{"url":"https://github.com/agentxin-ai/chatkit-js/issues"},"dist":{"shasum":"ef707996eb5702462a0986a7d407dab85fd204e1","tarball":"https://registry.npmjs.org/@agentxin-ai/chatkit-types/-/chatkit-types-0.0.11.tgz","fileCount":6,"integrity":"sha512-UQLPCMBjnZHL8UgZ+IUxssjmPHQVxMsh0VweXuiP5zh+D0Trr9rozGM1ycT7b0ntkIK8s7bzVVhZ8lCz9Badmw==","signatures":[{"sig":"MEUCIQCT0tj8Hu/DYniqCMYWg6IWRZKQfat0RdDH8CJ42nxD/AIgZOqNDqfr4ma3fjqKVv1TR/7KIdIC4LfEiebzGM/qRcM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67334},"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"},"scripts":{"build":"vite build","clean":"rimraf dist","types":"tsc"},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"repository":{"url":"git+https://github.com/agentxin-ai/chatkit-js.git","type":"git"},"_npmVersion":"10.9.4","description":"Type definitions for the ChatKit.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","vite-plugin-dts":"^3.7.0"},"peerDependencies":{"@a2ui/lit":"^0.8.1","@langchain/core":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/chatkit-types_0.0.11_1774344803398_0.4033413617596169","host":"s3://npm-registry-packages-npm-production"}},"0.0.18":{"name":"@agentxin-ai/chatkit-types","version":"0.0.18","_id":"@agentxin-ai/chatkit-types@0.0.18","maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"homepage":"https://github.com/agentxin-ai/chatkit-js#readme","bugs":{"url":"https://github.com/agentxin-ai/chatkit-js/issues"},"dist":{"shasum":"f1b2cadffccfd3d7c9538a05677b0e2ff7c6e561","tarball":"https://registry.npmjs.org/@agentxin-ai/chatkit-types/-/chatkit-types-0.0.18.tgz","fileCount":6,"integrity":"sha512-t4nIjSkw+bA6gOO4GF576OIHQWEVCmwfHdSjHc8ghHAt5c6sljwExAdrJZXcm1dtBQKmxRgKzebbulxCFbD41w==","signatures":[{"sig":"MEYCIQDIIgpqdU99Y8BmIntKYGjF/SVpgzwb258ck0xqSRQTiwIhAIESRBWfN/O50rN/X4kbrJQDfldQ6VRb2p3CWWG+WfL2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67389},"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"},"scripts":{"build":"vite build","clean":"rimraf dist","types":"tsc"},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"repository":{"url":"git+https://github.com/agentxin-ai/chatkit-js.git","type":"git"},"_npmVersion":"10.9.4","description":"Type definitions for the ChatKit.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.0","vite-plugin-dts":"^3.7.0"},"peerDependencies":{"@a2ui/lit":"^0.8.1","@langchain/core":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/chatkit-types_0.0.18_1774516380392_0.8170073390800399","host":"s3://npm-registry-packages-npm-production"}},"0.5.3":{"name":"@agentxin-ai/chatkit-types","version":"0.5.3","description":"Type definitions for the ChatKit.","sideEffects":false,"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"},"./constants":{"types":"./dist/constants.d.ts","import":"./dist/constants.js","require":"./dist/constants.cjs","default":"./dist/constants.js"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/agentxin-ai/chatkit-js.git"},"peerDependencies":{"@a2ui/lit":"^0.8.1","@langchain/core":"^1.0.2"},"devDependencies":{"vite":"^5.0.0","vite-plugin-dts":"^3.7.0"},"scripts":{"build":"vite build","types":"tsc","clean":"rimraf dist"},"_id":"@agentxin-ai/chatkit-types@0.5.3","bugs":{"url":"https://github.com/agentxin-ai/chatkit-js/issues"},"homepage":"https://github.com/agentxin-ai/chatkit-js#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-63BpAqfs9jC94X2Pfp4SMaDwMxb2xEDgzD0bhLX0qgGkaguje0P8+k1wj41MnWiBJAbVPzd8cJVSDkUxQscOZQ==","shasum":"ed575ee78e0a89dac33706750392fec41a1e15f7","tarball":"https://registry.npmjs.org/@agentxin-ai/chatkit-types/-/chatkit-types-0.5.3.tgz","fileCount":13,"unpackedSize":230348,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHyfJBW2kfqNQArxGspfeSTi8uubZbC8zLuhEbqQS0h+AiEAyKIoPcDpspmKC3R4+7HQc/HkWuQePYiwELYY6RuwDU0="}]},"_npmUser":{"name":"agentxin-ai","email":"1304040880@qq.com"},"directories":{},"maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chatkit-types_0.5.3_1787802895617_0.14358939569349038"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-24T03:07:51.671Z","modified":"2026-08-27T03:54:55.934Z","0.0.13":"2026-03-19T10:37:52.082Z","0.0.12":"2026-03-20T03:29:12.211Z","0.0.14":"2026-03-21T06:52:19.698Z","0.0.15":"2026-03-23T03:49:33.219Z","0.0.16":"2026-03-23T08:32:56.338Z","0.0.17":"2026-03-24T03:07:51.922Z","0.0.11":"2026-03-24T09:33:23.550Z","0.0.18":"2026-03-26T09:13:00.573Z","0.5.3":"2026-08-27T03:54:55.763Z"},"bugs":{"url":"https://github.com/agentxin-ai/chatkit-js/issues"},"homepage":"https://github.com/agentxin-ai/chatkit-js#readme","repository":{"type":"git","url":"git+https://github.com/agentxin-ai/chatkit-js.git"},"description":"Type definitions for the ChatKit.","maintainers":[{"name":"agentxin-ai","email":"1304040880@qq.com"}],"readme":"# ChatKit Types\n\nThis package is the type-definition library for ChatKit, providing unified, reusable API types for the ChatKit project.\n\n## Role in the ChatKit project\n\n- Exposes the interface signatures and event types of `AgentXinAIChatKit`, ensuring consistency between integrators and internal implementation.\n- Aggregates core chat-related types (such as `ChatKitOptions`, messages, attachments, widgets, interrupts) for reuse by the UI package and business side.\n- Serves as a standalone types package so that the ChatKit Web Component and the AgentXinAI platform can obtain type hints and validation without bringing in implementation code.\n\n## Tool output image attachments\n\nTools that prepare images for a model vision step can expose the same immutable\nimages in the tool-call output with a `ToolOutputPresentation` artifact. Persist\nonly Artifact identity and display metadata in message history—never a signed\nURL, storage path, or base64 payload.\n\n```ts\nconst artifact: ToolOutputPresentation = {\n  type: 'agentxin.tool-output',\n  version: 1,\n  attachments: [\n    {\n      type: 'image',\n      artifactId: 'artifact-id',\n      artifactVersionId: 'immutable-version-id',\n      sha256: 'a'.repeat(64),\n      mimeType: 'image/png',\n      title: 'Picture 1 on page 75',\n      source: 'knowledge-document',\n      modelDetail: 'high',\n      anchors: { knowledgeDocumentId: 'document-id', page: 75 },\n    },\n  ],\n};\n```\n\nThe embedding host authorizes preview access and resolves a short-lived URL at\nrender time:\n\n```ts\nconst options: Partial<ChatKitOptions> = {\n  toolOutputAttachments: {\n    onRequestPreview: async ({ attachment }) => {\n      const preview = await authorizedArtifactPreviewResolver({\n        artifactId: attachment.artifactId,\n        artifactVersionId: attachment.artifactVersionId,\n        sha256: attachment.sha256,\n      });\n\n      return {\n        previewUrl: preview.url,\n        expiresAt: preview.expiresAt,\n      };\n    },\n  },\n};\n```\n\nThe resolver must authorize the current user and requested Artifact version.\nChatKit validates the descriptor, accepts only PNG/JPEG/WebP previews over\nHTTP(S), does not persist the resolved URL, and resolves it again after expiry\nor page reload.\n","readmeFilename":"README.md"}