{"_id":"@agent-earth/nl-component","_rev":"6-46d5b033f8a49aca6c59b3bc054fde30","name":"@agent-earth/nl-component","dist-tags":{"latest":"0.0.7"},"versions":{"0.0.4":{"name":"@agent-earth/nl-component","version":"0.0.4","_id":"@agent-earth/nl-component@0.0.4","maintainers":[{"name":"asun01","email":"452212601@qq.com"}],"dist":{"shasum":"9a70cf93c519d3ae684200aaa7ae700ae8cad219","tarball":"https://registry.npmjs.org/@agent-earth/nl-component/-/nl-component-0.0.4.tgz","fileCount":89,"integrity":"sha512-eurXlNfKNbuQIZ9qZeN5vnvqdRjLVxXk6JhO8C1XG35Ao1bTh+Z6M/J88CSeWRfWFwV7/teF/9+TtJt5ZiY7Fw==","signatures":[{"sig":"MEQCICuh9Db+EgyQbVqzWn1jeJ+Ws/uL5oATbLVHnY+BWL5RAiBiEOaJbWICzDChBK5OE9IG0XQG6VqGO/5Mh8HHskyVdA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":331170},"main":"./dist/index.js","type":"module","_from":"file:agent-earth-nl-component-0.0.4.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./ui":{"types":"./dist/ui/index.d.ts","import":"./dist/ui/index.js"},"./core":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js"},"./dist/index.css":"./dist/index.css"},"scripts":{"dev":"vite build --watch","build":"pnpm clean && vue-tsc --declaration --emitDeclarationOnly --outDir dist --noEmit false --composite false && vite build && node ../../scripts/minify-dist-js.mjs dist","clean":"rimraf dist","typecheck":"pnpm --filter @agent-earth/shared build && vue-tsc --noEmit"},"_npmUser":{"name":"asun01","email":"452212601@qq.com"},"_resolved":"C:\\Users\\Lenovo\\AppData\\Local\\Temp\\fc3985d42c4c7bcf0091e31f632b9977\\agent-earth-nl-component-0.0.4.tgz","_integrity":"sha512-eurXlNfKNbuQIZ9qZeN5vnvqdRjLVxXk6JhO8C1XG35Ao1bTh+Z6M/J88CSeWRfWFwV7/teF/9+TtJt5ZiY7Fw==","_npmVersion":"10.9.4","description":"AgentEarth 自然语言对话组件，面向 Vue 3 应用提供聊天窗口、流式消息展示、WebSocket/SSE 通信和 Cesium 命令回调能力。","directories":{},"_nodeVersion":"22.22.0","dependencies":{"vue":"^3.5.0","zod":"^3.24.0","uuid":"^11.0.0","pinia":"^3.0.0","marked":"^18.0.2","highlight.js":"^11.11.1","@agent-earth/shared":"0.0.4"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.0","vue-tsc":"^2.2.0","typescript":"^5.8.0","@types/node":"^22.0.0","@types/uuid":"^10.0.0","@vitejs/plugin-vue":"^5.2.0"},"peerDependencies":{"vue":"^3.5.0"},"_npmOperationalInternal":{"tmp":"tmp/nl-component_0.0.4_1782906513834_0.909744320793525","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@agent-earth/nl-component","version":"0.0.7","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"registry":"https://geocode.geovisearth.com/api/v4/projects/633/packages/npm/"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./ui":{"types":"./dist/ui/index.d.ts","import":"./dist/ui/index.js"},"./core":{"types":"./dist/core/index.d.ts","import":"./dist/core/index.js"},"./dist/index.css":"./dist/index.css"},"dependencies":{"dompurify":"^3.4.0","highlight.js":"^11.11.1","marked":"^18.0.2","mermaid":"^11.16.0","pinia":"^3.0.0","uuid":"^11.0.0","vue":"^3.5.0","zod":"^3.24.0","@agent-earth/shared":"0.0.7"},"devDependencies":{"@types/node":"^22.0.0","@types/uuid":"^10.0.0","@vitejs/plugin-vue":"^5.2.0","typescript":"^5.8.0","vite":"^6.0.0","vue-tsc":"^2.2.0"},"peerDependencies":{"vue":"^3.5.0"},"scripts":{"build":"pnpm clean && vue-tsc --declaration --emitDeclarationOnly --outDir dist --noEmit false --composite false && vite build","dev":"vite build --watch","clean":"rimraf dist","typecheck":"vue-tsc -p tsconfig.typecheck.json"},"_id":"@agent-earth/nl-component@0.0.7","description":"AgentEarth 自然语言对话组件，面向 Vue 3 应用提供聊天窗口、流式消息展示、WebSocket/SSE 通信和 Cesium 命令回调能力。","_integrity":"sha512-iBo1x1HkFST3YzAilWIRmzXJI91lU3OCZyLvOXFAWznH/VSxsRbuyjOTmF679o4ytvK8TNuvwvaN/IWzay2Gnw==","_resolved":"C:\\Users\\Lenovo\\AppData\\Local\\Temp\\agent-earth-npm-publish-1786446964\\agent-earth-nl-component-0.0.7.tgz","_from":"file:C:/Users/Lenovo/AppData/Local/Temp/agent-earth-npm-publish-1786446964/agent-earth-nl-component-0.0.7.tgz","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-iBo1x1HkFST3YzAilWIRmzXJI91lU3OCZyLvOXFAWznH/VSxsRbuyjOTmF679o4ytvK8TNuvwvaN/IWzay2Gnw==","shasum":"1144287b8ca2addbc9a4daf892b095b7d25c7577","tarball":"https://registry.npmjs.org/@agent-earth/nl-component/-/nl-component-0.0.7.tgz","fileCount":854,"unpackedSize":4034898,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAPLAhOovC8xtYMdp0ioiRow33dbdY0XUWgY6uPSqT1pAiA/zPVBLEROTjVrcowfEoFg9h5H0jd67rcfW/iYkACOdg=="}]},"_npmUser":{"name":"asun01","email":"452212601@qq.com"},"directories":{},"maintainers":[{"name":"asun01","email":"452212601@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nl-component_0.0.7_1786447384343_0.3352444056943553"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-01T10:01:11.597Z","modified":"2026-08-11T11:23:04.679Z","0.0.1":"2026-07-01T10:01:11.971Z","0.0.2":"2026-07-01T11:25:18.071Z","0.0.4":"2026-07-01T11:48:33.958Z","0.0.7":"2026-08-11T11:23:04.512Z"},"description":"AgentEarth 自然语言对话组件，面向 Vue 3 应用提供聊天窗口、流式消息展示、WebSocket/SSE 通信和 Cesium 命令回调能力。","maintainers":[{"name":"asun01","email":"452212601@qq.com"}],"readme":"# @agent-earth/nl-component\r\n\r\nAgentEarth 自然语言对话组件，面向 Vue 3 应用提供聊天窗口、流式消息展示、WebSocket/SSE 通信和 Cesium 命令回调能力。\r\n\r\n## 安装\r\n\r\n```bash\r\nnpm install @agent-earth/nl-component\r\n```\r\n\r\n如果使用 pnpm：\r\n\r\n```bash\r\npnpm add @agent-earth/nl-component\r\n```\r\n\r\n## 基础使用\r\n\r\n```vue\r\n<script setup lang=\"ts\">\r\nimport { ChatWidget } from '@agent-earth/nl-component';\r\nimport '@agent-earth/nl-component/dist/index.css';\r\n</script>\r\n\r\n<template>\r\n  <ChatWidget\r\n    api-base-url=\"http://localhost:3000\"\r\n    user-id=\"current-user\"\r\n    title=\"智能助手\"\r\n    placeholder=\"输入你的问题...\"\r\n  />\r\n</template>\r\n```\r\n\r\n## 接收 Cesium 命令\r\n\r\n`nl-component` 不依赖 `@agent-earth/smart-earth`。组件只通过 `onCesiumCommand` 把标准 Cesium 命令回调给宿主应用，由宿主决定如何执行。\r\n\r\n```vue\r\n<script setup lang=\"ts\">\r\nimport { ChatWidget } from '@agent-earth/nl-component';\r\nimport type { CesiumCommand } from '@agent-earth/shared';\r\nimport '@agent-earth/nl-component/dist/index.css';\r\n\r\nfunction handleCesiumCommand(command: CesiumCommand) {\r\n  console.log('received cesium command', command);\r\n}\r\n</script>\r\n\r\n<template>\r\n  <ChatWidget\r\n    api-base-url=\"http://localhost:3000\"\r\n    user-id=\"current-user\"\r\n    :on-cesium-command=\"handleCesiumCommand\"\r\n  />\r\n</template>\r\n```\r\n\r\n## 可选：联动 Smart Earth\r\n\r\n如果你的项目需要直接联动 AgentEarth Smart Earth SDK，可以额外安装：\r\n\r\n```bash\r\npnpm add @agent-earth/smart-earth\r\n```\r\n\r\n然后在宿主应用里把 `nl-component` 回调出的命令转给 Smart Earth。`@agent-earth/smart-earth` 是可选集成包，不是 `@agent-earth/nl-component` 的运行时依赖。\r\n\r\n## 导出内容\r\n\r\n```ts\r\nimport { ChatWidget, NLIntegration } from '@agent-earth/nl-component';\r\nimport { StreamingOutput } from '@agent-earth/nl-component/ui';\r\n```\r\n\r\n## 样式\r\n\r\n```ts\r\nimport '@agent-earth/nl-component/dist/index.css';\r\n```\r\n\r\n## 运行时要求\r\n\r\n- Vue 3.5+\r\n- Pinia 3.x\r\n- 一个可访问的 AgentEarth Runtime API 地址\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}