Files
ChatLab/packages/node-runtime/package.json
T
digua 8dd3e2396c refactor(ai): extract shared Agent core to @openchatlab/node-runtime
- Create runAgentCore() in node-runtime/src/ai/agent/ encapsulating
  PiAgentCore construction, history conversion, event subscription,
  abort forwarding, tool round management, and usage collection
- Re-export pi-agent-core/pi-ai types (AgentTool, Type, Model, etc.)
  and functions (completeSimple, streamSimple) from node-runtime
- Refactor Server agent.ts to use runAgentCore, removing all direct
  pi-agent-core/pi-ai imports (~335→~210 lines)
- Remove pi-agent-core and pi-ai from Server package.json dependencies
- Refactor Electron agent/index.ts and event-handler.ts to use
  runAgentCore with DI hooks (streamFn, onConvertToLlm, onDebugContext)
- Document remaining Electron pi-ai usage points for future migration
2026-05-14 23:36:11 +08:00

16 lines
447 B
JSON

{
"name": "@openchatlab/node-runtime",
"version": "0.0.0",
"private": true,
"description": "ChatLab Node.js 运行时适配器:better-sqlite3、文件系统、路径管理",
"main": "./src/index.ts",
"types": "./src/index.ts",
"dependencies": {
"@mariozechner/pi-agent-core": "0.54.2",
"@mariozechner/pi-ai": "0.54.2",
"@openchatlab/core": "workspace:*",
"gray-matter": "^4.0.3",
"js-tiktoken": "^1.0.21"
}
}