@nocobase/plugin-ai 2.2.0-alpha.10 → 2.2.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/ai/docs/nocobase/ai-employees/block/ai-chat-box.md +133 -0
  2. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/documents.md +1 -1
  3. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/index.md +11 -7
  4. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/knowledge-base/settings.md +12 -8
  5. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-database.md +3 -3
  6. package/dist/ai/docs/nocobase/ai-employees/workflow/nodes/knowledge/create-document.md +1 -1
  7. package/dist/ai/docs/nocobase/ops-management/migration-manager/built-in-tables.md +1 -2
  8. package/dist/ai/docs/nocobase/runjs/context/ai.md +194 -4
  9. package/dist/ai/tools/getSkill.js +1 -1
  10. package/dist/client/244.8631eb5cf3f05e21.js +10 -0
  11. package/dist/client/681.6ffbc9329b9ac242.js +10 -0
  12. package/dist/client/index.d.ts +1 -3
  13. package/dist/client/index.js +8 -8
  14. package/dist/client-v2/244.c428e645ecb94414.js +10 -0
  15. package/dist/client-v2/420.b2aedb1ff71fca0e.js +10 -0
  16. package/dist/client-v2/681.6890caa389564ff7.js +10 -0
  17. package/dist/client-v2/ai-employees/AIEmployeeShortcut.d.ts +2 -0
  18. package/dist/client-v2/ai-employees/AddContextButton.d.ts +2 -0
  19. package/dist/client-v2/ai-employees/chatbox/components/AIEmployeeSwitcher.d.ts +1 -0
  20. package/dist/client-v2/ai-employees/chatbox/components/ChatBoxUnreadBadge.d.ts +17 -0
  21. package/dist/client-v2/ai-employees/chatbox/components/Conversations.d.ts +9 -1
  22. package/dist/client-v2/ai-employees/chatbox/components/MessageRenderers.d.ts +1 -1
  23. package/dist/client-v2/ai-employees/chatbox/components/Messages.d.ts +5 -1
  24. package/dist/client-v2/ai-employees/chatbox/components/ModelSwitcher.d.ts +4 -0
  25. package/dist/client-v2/ai-employees/chatbox/components/Sender.d.ts +33 -1
  26. package/dist/client-v2/ai-employees/chatbox/components/index.d.ts +1 -0
  27. package/dist/client-v2/ai-employees/chatbox/hooks/useChat.d.ts +8 -5
  28. package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxActions.d.ts +3 -2
  29. package/dist/client-v2/ai-employees/chatbox/hooks/useChatBoxEffect.d.ts +2 -1
  30. package/dist/client-v2/ai-employees/chatbox/hooks/useChatConversationActions.d.ts +3 -2
  31. package/dist/client-v2/ai-employees/chatbox/hooks/useChatMessageActions.d.ts +4 -2
  32. package/dist/client-v2/ai-employees/chatbox/hooks/useToolCallActions.d.ts +3 -1
  33. package/dist/client-v2/ai-employees/chatbox/hooks/useUploadFiles.d.ts +13 -3
  34. package/dist/client-v2/ai-employees/chatbox/hooks/useWorkflowTasks.d.ts +3 -2
  35. package/dist/client-v2/ai-employees/chatbox/index.d.ts +17 -0
  36. package/dist/client-v2/ai-employees/chatbox/roles.d.ts +2 -153
  37. package/dist/client-v2/ai-employees/chatbox/stores/chat-box.d.ts +46 -31
  38. package/dist/client-v2/ai-employees/chatbox/stores/chat-conversations.d.ts +7 -7
  39. package/dist/client-v2/ai-employees/chatbox/stores/chat-messages.d.ts +23 -18
  40. package/dist/client-v2/ai-employees/chatbox/stores/chat-sender.d.ts +43 -0
  41. package/dist/client-v2/ai-employees/chatbox/stores/chat-tool-call.d.ts +6 -5
  42. package/dist/client-v2/ai-employees/chatbox/stores/chat-tools.d.ts +11 -5
  43. package/dist/client-v2/ai-employees/chatbox/stores/mounted-chat-boxes.d.ts +20 -0
  44. package/dist/client-v2/ai-employees/chatbox/stores/runtime.d.ts +43 -0
  45. package/dist/client-v2/ai-employees/chatbox/stores/workflow-tasks.d.ts +22 -10
  46. package/dist/client-v2/ai-employees/chatbox/upload.d.ts +19 -0
  47. package/dist/client-v2/ai-employees/chatbox/utils.d.ts +28 -4
  48. package/dist/client-v2/ai-employees/tools/SuggestionsOptionsCard.d.ts +1 -1
  49. package/dist/client-v2/ai-employees/tools/WorkflowTaskOutputCard.d.ts +1 -1
  50. package/dist/client-v2/ai-employees/types.d.ts +27 -0
  51. package/dist/client-v2/block/ai-chat-box/AIChatBoxBlockModel.d.ts +21 -0
  52. package/dist/client-v2/block/ai-chat-box/AIChatBoxCoreModel.d.ts +13 -0
  53. package/dist/client-v2/block/ai-chat-box/components/AIChatBoxCoreView.d.ts +10 -0
  54. package/dist/client-v2/block/ai-chat-box/components/AIChatBoxView.d.ts +12 -0
  55. package/dist/client-v2/block/ai-chat-box/index.d.ts +14 -0
  56. package/dist/client-v2/block/ai-chat-box/settings.d.ts +12 -0
  57. package/dist/client-v2/block/ai-chat-box/sub-models.d.ts +26 -0
  58. package/dist/client-v2/block/ai-chat-box/types.d.ts +38 -0
  59. package/dist/client-v2/block/ai-chat-box/utils.d.ts +26 -0
  60. package/dist/client-v2/index.d.ts +3 -5
  61. package/dist/client-v2/index.js +3 -3
  62. package/dist/client-v2/llm-services/model-select.d.ts +33 -0
  63. package/dist/client-v2/llm-services/utils.d.ts +1 -0
  64. package/dist/client-v2/manager/ai-manager.d.ts +8 -3
  65. package/dist/client-v2/models/ai-employees/AIEmployeeActionModel.d.ts +4 -1
  66. package/dist/client-v2/models/ai-employees/AIEmployeeShortcutModel.d.ts +5 -0
  67. package/dist/client-v2/pages/EmployeesPage.d.ts +1 -0
  68. package/dist/client-v2/runjs/registerAIEmployeeRunJSFacade.d.ts +1 -0
  69. package/dist/common/ai-employee-validation.d.ts +15 -0
  70. package/dist/common/ai-employee-validation.js +61 -0
  71. package/dist/common/error-codes.d.ts +13 -0
  72. package/dist/common/error-codes.js +48 -0
  73. package/dist/common/llm-service-models.d.ts +16 -0
  74. package/dist/common/llm-service-models.js +84 -0
  75. package/dist/externalVersion.js +15 -15
  76. package/dist/locale/en-US.json +62 -0
  77. package/dist/locale/zh-CN.json +62 -0
  78. package/dist/node_modules/@langchain/mistralai/package.json +1 -1
  79. package/dist/node_modules/@langchain/xai/package.json +1 -1
  80. package/dist/node_modules/fs-extra/package.json +1 -1
  81. package/dist/node_modules/jsonrepair/package.json +1 -1
  82. package/dist/node_modules/just-bash/package.json +1 -1
  83. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  84. package/dist/node_modules/openai/package.json +1 -1
  85. package/dist/node_modules/zod/package.json +1 -1
  86. package/dist/server/ai-employees/ai-conversations.d.ts +2 -1
  87. package/dist/server/ai-employees/ai-conversations.js +2 -0
  88. package/dist/server/ai-employees/ai-employee.d.ts +1 -0
  89. package/dist/server/ai-employees/ai-employee.js +6 -0
  90. package/dist/server/ai-employees/middleware/conversation.js +9 -2
  91. package/dist/server/collections/ai-conversations.js +5 -0
  92. package/dist/server/document-loader/constants.js +0 -1
  93. package/dist/server/plugin.d.ts +1 -0
  94. package/dist/server/plugin.js +25 -0
  95. package/dist/server/resource/aiConversations.js +6 -2
  96. package/dist/server/resource/aiEmployees.d.ts +2 -0
  97. package/dist/server/resource/aiEmployees.js +62 -0
  98. package/dist/server/resource/aiWorkflowTasks.js +9 -1
  99. package/dist/server/resource/llmServices.d.ts +11 -0
  100. package/dist/server/resource/llmServices.js +85 -0
  101. package/dist/server/types/knowledge-base.type.d.ts +6 -2
  102. package/dist/swagger/common.d.ts +143 -0
  103. package/dist/swagger/common.js +144 -0
  104. package/dist/swagger/employees.d.ts +301 -0
  105. package/dist/swagger/employees.js +131 -0
  106. package/dist/swagger/index.d.ts +1588 -0
  107. package/dist/swagger/index.js +62 -0
  108. package/dist/swagger/llm.d.ts +555 -0
  109. package/dist/swagger/llm.js +247 -0
  110. package/dist/swagger/schemas.d.ts +736 -0
  111. package/dist/swagger/schemas.js +381 -0
  112. package/package.json +2 -2
  113. package/dist/ai/docs/nocobase/ai-employees/knowledge-base/vector-store.md +0 -24
  114. package/dist/client/372.49163fac65cef81c.js +0 -10
  115. package/dist/client/681.399948c18d753667.js +0 -10
  116. package/dist/client-v2/372.387161cdeb106987.js +0 -10
  117. package/dist/client-v2/406.341be51205c674e0.js +0 -10
  118. package/dist/client-v2/681.082f4f1c7b841983.js +0 -10
  119. package/dist/client-v2/ai-employees/chatbox/stores/create-selectors.d.ts +0 -46
  120. package/dist/client-v2/ai-employees/chatbox/utils/normalizeTriggerTaskOptions.d.ts +0 -19
@@ -8,6 +8,7 @@
8
8
  "AI employee": "AI 员工",
9
9
  "AI employee event": "AI employee 事件",
10
10
  "AI employee permissions": "AI 员工权限",
11
+ "AI chat box not found": "未找到 AI chat box {{uid}}",
11
12
  "AI employees": "AI 员工",
12
13
  "AI integration": "AI 集成",
13
14
  "AI is searching": "{{ nickname }}正在搜索...",
@@ -81,6 +82,8 @@
81
82
  "Chart generator": "图表生成器",
82
83
  "Charts": "图表",
83
84
  "Chat error warning": "发送消息失败,请联系管理员或稍后再试。",
85
+ "Chat box uid": "Chat box uid",
86
+ "Leave empty to open the global chat box. Enter an AI chat box block uid to run this task in that block.": "留空时打开全局聊天框。填写 AI chat box 区块 uid 后,会在该区块中触发此任务。",
84
87
  "Cite {{count}} pieces of information as references": "引用 {{count}} 篇资料作为参考",
85
88
  "Code history": "代码历史记录",
86
89
  "Code review": "代码审查",
@@ -116,6 +119,7 @@
116
119
  "{{ nickname }} has completed the work": "{{ nickname }} 已完成工作",
117
120
  "Displays the AI employee’s assigned tasks on the profile when hovering over the button.": "当鼠标悬停在按钮上时,会在员工资料卡片上显示任务描述。",
118
121
  "Down": "下移",
122
+ "Edit": "编辑",
119
123
  "Edit AI employee": "编辑 AI 员工",
120
124
  "Edit datasource": "编辑数据源",
121
125
  "Edit personalized prompt": "编辑个性化提示词",
@@ -178,6 +182,8 @@
178
182
  "Messages": "消息",
179
183
  "Mistral models": "Mistral 模型",
180
184
  "Model": "模型",
185
+ "Model ID already exists": "模型标识已存在",
186
+ "Model ID is required": "请输入模型标识",
181
187
  "Model settings": "模型设置",
182
188
  "Missing knowledge base configuration for keys: {{keys}}. Create knowledge bases with the same keys to enable this employee normally.": "以下知识库 Key 缺少配置:{{keys}}。请创建相同 Key 的知识库,员工才能正常使用知识库能力。",
183
189
  "Display name": "展示名称",
@@ -208,6 +214,9 @@
208
214
  "Please choose an AI employee": "请选择 AI 员工",
209
215
  "Please select file objects.": "请选择文件对象。",
210
216
  "Popup blocked. Please allow popups and try again.": "弹窗被拦截,请允许弹窗后重试。",
217
+ "Username already exists": "用户名已存在",
218
+ "Use 1-64 letters, numbers, underscores, or hyphens.": "用户名只能包含 1-64 个英文字母、数字、下划线或连字符。",
219
+ "Use 1-64 letters, numbers, spaces, or . _ - ' ( ) & ·.": "昵称只能包含 1-64 个文字、数字、空格或 . _ - ' ( ) & ·。",
211
220
  "Position": "职位",
212
221
  "Position description": "AI 员工职责的简短描述",
213
222
  "Position placeholder": "例如:翻译员等",
@@ -268,6 +277,8 @@
268
277
  "UID": "唯一标识",
269
278
  "Up": "上移",
270
279
  "Upload files": "上传文件",
280
+ "You can upload up to {{count}} attachments.": "最多可以上传 {{count}} 个附件。",
281
+ "The total size of attachments cannot exceed {{size}}.": "附件总大小不能超过 {{size}}。",
271
282
  "Use skill": "使用技能",
272
283
  "Use skills": "使用技能",
273
284
  "Use workflow as a tool": "使用工作流作为工具",
@@ -484,7 +495,14 @@
484
495
  "Invalid attachment": "无效的附件",
485
496
  "Attachment not found": "附件不存在",
486
497
  "AI chat": "AI 对话",
498
+ "AI chat box": "AI 聊天框",
499
+ "AI chat box core": "AI 聊天框核心",
500
+ "AI chat box settings": "AI 聊天框设置",
501
+ "AI chat window": "AI 聊天窗口",
502
+ "AI chat window settings": "AI 聊天窗口设置",
503
+ "Appearance": "外观",
487
504
  "Open AI chat": "打开 AI 对话",
505
+ "Open": "打开",
488
506
  "Request failed": "请求失败",
489
507
  "Saved successfully": "保存成功",
490
508
  "Unsaved changes": "未保存的修改",
@@ -501,12 +519,56 @@
501
519
  "No conversations yet": "暂无会话",
502
520
  "No workflow tasks yet": "暂无工作流任务",
503
521
  "No messages yet": "暂无消息",
522
+ "No chat blocks": "暂无聊天区块",
504
523
  "Tool calls": "工具调用",
505
524
  "Reasoning": "推理过程",
506
525
  "References": "参考资料",
526
+ "Context": "上下文",
527
+ "Actions area": "操作区",
528
+ "Allowed AI employees": "可选 AI 员工",
529
+ "Controls which chat boxes share conversations. The default value isolates this chat box.": "控制哪些聊天框共享会话。默认值会隔离当前聊天框。",
530
+ "Scope can only contain letters, numbers, underscores, and hyphens.": "Scope 仅支持字母、数字、下划线和连字符。",
531
+ "Basic settings": "基础设置",
532
+ "Card settings": "卡片设置",
533
+ "Chat content block": "聊天内容区块",
534
+ "Messages and sender block": "消息和发送框区块",
535
+ "Conversation list block": "会话列表区块",
536
+ "Edit chat box": "编辑聊天框",
537
+ "Customer follow-up": "客户跟进",
507
538
  "ECharts": "ECharts",
539
+ "Enable add context": "启用添加上下文",
540
+ "Enable employee select": "启用员工选择",
541
+ "Enable model select": "启用模型选择",
542
+ "Enable upload files": "启用上传附件",
543
+ "Enable web search": "启用联网搜索",
544
+ "Height": "高度",
508
545
  "Invalid chart options": "无效的图表选项",
546
+ "JS action": "JS 操作",
547
+ "Message list block": "消息列表区块",
548
+ "Message sender block": "消息发送区块",
549
+ "Mock message sent": "模拟消息已发送",
550
+ "Mock model": "模拟模型",
551
+ "Mock new conversation created": "已创建模拟会话",
552
+ "Proposal outline": "方案大纲",
553
+ "Sales report draft": "销售报告草稿",
554
+ "Save": "保存",
509
555
  "Save as image": "保存为图片",
556
+ "Prefill the sender input when the chat box starts a new conversation.": "聊天框开始新会话时,预填发送框内容。",
557
+ "Scope": "作用域",
558
+ "Select blocks": "选择区块",
559
+ "Select blocks or data sources that are sent as default work context.": "选择作为默认工作上下文发送的区块或数据源。",
560
+ "Restrict this chat box to selected AI employees. Leave empty to allow all business AI employees.": "限制此聊天框只能使用所选 AI 员工。留空则允许所有业务 AI 员工。",
561
+ "Restrict this chat box to selected models. Leave empty to allow all available models.": "限制此聊天框只能使用所选模型。留空则允许所有可用模型。",
562
+ "Sender placeholder": "发送框占位内容",
563
+ "Sender settings": "发送框设置",
564
+ "Show block selector": "显示区块选择",
565
+ "Show disclaimer": "显示免责声明",
566
+ "Show messages": "显示消息",
567
+ "Show new conversation action": "显示新增会话操作",
568
+ "Show upload files": "显示上传附件",
569
+ "Show web search": "显示联网开关",
570
+ "System prompt": "系统提示词",
571
+ "Title & description": "标题和描述",
510
572
  "You": "你",
511
573
  "init": "未开始",
512
574
  "interrupted": "等待确认",
@@ -1 +1 @@
1
- {"name":"@langchain/mistralai","version":"1.0.0","description":"MistralAI integration for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-mistralai/","dependencies":{"@mistralai/mistralai":"^1.3.1","uuid":"^10.0.0"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@vitest/coverage-v8":"^3.2.4","dotenv":"^16.3.1","dpdm":"^3.14.0","eslint":"^9.34.0","prettier":"^2.8.3","rollup":"^4.5.2","typescript":"~5.8.3","vitest":"^3.2.4","zod":"^3.25.76","@langchain/eslint":"0.1.0","@langchain/standard-tests":"0.0.0","@langchain/core":"1.0.1"},"publishConfig":{"access":"public"},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"input":"./src/index.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"scripts":{"build":"pnpm --filter @langchain/build compile @langchain/mistralai","lint:eslint":"eslint --cache src/","lint:dpdm":"dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts","lint":"pnpm lint:eslint && pnpm lint:dpdm","lint:fix":"pnpm lint:eslint --fix && pnpm lint:dpdm","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest","test:int":"vitest run --mode int","test:standard:unit":"vitest run --mode standard-unit","test:standard:int":"vitest run --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","format":"prettier --config .prettierrc --write \"src\"","format:check":"prettier --config .prettierrc --check \"src\""},"_lastModified":"2026-07-28T04:41:10.344Z"}
1
+ {"name":"@langchain/mistralai","version":"1.0.0","description":"MistralAI integration for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-mistralai/","dependencies":{"@mistralai/mistralai":"^1.3.1","uuid":"^10.0.0"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@vitest/coverage-v8":"^3.2.4","dotenv":"^16.3.1","dpdm":"^3.14.0","eslint":"^9.34.0","prettier":"^2.8.3","rollup":"^4.5.2","typescript":"~5.8.3","vitest":"^3.2.4","zod":"^3.25.76","@langchain/eslint":"0.1.0","@langchain/standard-tests":"0.0.0","@langchain/core":"1.0.1"},"publishConfig":{"access":"public"},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"input":"./src/index.ts","import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"scripts":{"build":"pnpm --filter @langchain/build compile @langchain/mistralai","lint:eslint":"eslint --cache src/","lint:dpdm":"dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts","lint":"pnpm lint:eslint && pnpm lint:dpdm","lint:fix":"pnpm lint:eslint --fix && pnpm lint:dpdm","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest","test:int":"vitest run --mode int","test:standard:unit":"vitest run --mode standard-unit","test:standard:int":"vitest run --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","format":"prettier --config .prettierrc --write \"src\"","format:check":"prettier --config .prettierrc --check \"src\""},"_lastModified":"2026-07-30T03:55:31.381Z"}
@@ -1 +1 @@
1
- {"name":"@langchain/xai","version":"1.3.19","description":"xAI integration for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/providers/langchain-xai/","dependencies":{"@langchain/openai":"1.4.7"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@vitest/coverage-v8":"^3.2.4","dotenv":"^17.4.0","dpdm":"^3.14.0","typescript":"~5.8.3","vitest":"^4.1.2","zod":"^3.25.76","@langchain/openai":"^1.4.7","@langchain/core":"^1.1.48","@langchain/standard-tests":"0.0.23","@langchain/tsconfig":"0.0.1"},"publishConfig":{"access":"public"},"main":"./dist/index.cjs","types":"./dist/index.d.cts","exports":{".":{"input":"./src/index.ts","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"module":"./dist/index.js","scripts":{"build":"turbo build:compile --filter @langchain/xai --output-logs new-only","build:compile":"tsdown","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest --watch","test:int":"vitest --mode int","test:standard:unit":"vitest --mode standard-unit","test:standard:int":"vitest --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-07-28T04:41:13.057Z"}
1
+ {"name":"@langchain/xai","version":"1.3.19","description":"xAI integration for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/providers/langchain-xai/","dependencies":{"@langchain/openai":"1.4.7"},"peerDependencies":{"@langchain/core":"^1.0.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.3","@vitest/coverage-v8":"^3.2.4","dotenv":"^17.4.0","dpdm":"^3.14.0","typescript":"~5.8.3","vitest":"^4.1.2","zod":"^3.25.76","@langchain/openai":"^1.4.7","@langchain/core":"^1.1.48","@langchain/standard-tests":"0.0.23","@langchain/tsconfig":"0.0.1"},"publishConfig":{"access":"public"},"main":"./dist/index.cjs","types":"./dist/index.d.cts","exports":{".":{"input":"./src/index.ts","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"module":"./dist/index.js","scripts":{"build":"turbo build:compile --filter @langchain/xai --output-logs new-only","build:compile":"tsdown","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest --watch","test:int":"vitest --mode int","test:standard:unit":"vitest --mode standard-unit","test:standard:int":"vitest --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-07-30T03:55:33.898Z"}
@@ -1 +1 @@
1
- {"name":"fs-extra","version":"9.1.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=10"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"at-least-node":"^1.0.0","graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"coveralls":"^3.0.0","klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^5.0.5","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^14.1.0"},"main":"./lib/index.js","files":["lib/","!lib/**/__tests__/"],"scripts":{"full-ci":"npm run lint && npm run coverage","coverage":"nyc -r lcovonly npm run unit","coveralls":"coveralls < coverage/lcov.info","lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit","unit":"node test.js"},"_lastModified":"2026-07-28T04:41:13.219Z"}
1
+ {"name":"fs-extra","version":"9.1.0","description":"fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.","engines":{"node":">=10"},"homepage":"https://github.com/jprichardson/node-fs-extra","repository":{"type":"git","url":"https://github.com/jprichardson/node-fs-extra"},"keywords":["fs","file","file system","copy","directory","extra","mkdirp","mkdir","mkdirs","recursive","json","read","write","extra","delete","remove","touch","create","text","output","move","promise"],"author":"JP Richardson <jprichardson@gmail.com>","license":"MIT","dependencies":{"at-least-node":"^1.0.0","graceful-fs":"^4.2.0","jsonfile":"^6.0.1","universalify":"^2.0.0"},"devDependencies":{"coveralls":"^3.0.0","klaw":"^2.1.1","klaw-sync":"^3.0.2","minimist":"^1.1.1","mocha":"^5.0.5","nyc":"^15.0.0","proxyquire":"^2.0.1","read-dir-files":"^0.1.1","standard":"^14.1.0"},"main":"./lib/index.js","files":["lib/","!lib/**/__tests__/"],"scripts":{"full-ci":"npm run lint && npm run coverage","coverage":"nyc -r lcovonly npm run unit","coveralls":"coveralls < coverage/lcov.info","lint":"standard","test-find":"find ./lib/**/__tests__ -name *.test.js | xargs mocha","test":"npm run lint && npm run unit","unit":"node test.js"},"_lastModified":"2026-07-30T03:55:34.058Z"}
@@ -1 +1 @@
1
- {"name":"jsonrepair","version":"3.13.1","description":"Repair broken JSON documents","repository":{"type":"git","url":"https://github.com/josdejong/jsonrepair.git"},"type":"module","main":"lib/cjs/index.js","module":"lib/esm/index.js","browser":"lib/umd/jsonrepair.min.js","types":"lib/types/index.d.ts","sideEffects":false,"exports":{".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js","types":"./lib/types/index.d.ts"},"./stream":{"import":"./lib/esm/stream.js","require":"./lib/cjs/stream.js","types":"./lib/types/stream.d.ts"}},"keywords":["simple","json","repair","fix","invalid","stream","streaming"],"bin":{"jsonrepair":"./bin/cli.js"},"scripts":{"test":"vitest watch src","test:it":"vitest run src","build":"npm-run-all build:**","build:clean":"del-cli lib","build:esm":"babel src --out-dir lib/esm --extensions \".ts\" --source-maps --config-file ./babel.config.json","build:cjs":"babel src --out-dir lib/cjs --extensions \".ts\" --source-maps --config-file ./babel-cjs.config.json && cpy tools/cjs lib/cjs --flat","build:umd":"rollup lib/esm/index.js --format umd --name JSONRepair --sourcemap --output.file lib/umd/jsonrepair.js && cpy tools/cjs/package.json lib/umd --flat","build:umd:min":"uglifyjs --compress --mangle --source-map --comments --output lib/umd/jsonrepair.min.js -- lib/umd/jsonrepair.js","build:types":"tsc --project tsconfig-types.json","build:validate":"vitest run test-lib","lint":"biome check","format":"biome check --write","benchmark":"npm run build:esm && node tools/benchmark/run.mjs","build-and-test":"npm run lint && npm run test:it && npm run build","release":"npm-run-all release:**","release:build-and-test":"npm run build-and-test","release:version":"standard-version","release:push":"git push && git push --tag","release:publish":"npm publish","release-dry-run":"npm run build-and-test && standard-version --dry-run","prepare":"husky"},"files":["README.md","LICENSE.md","lib"],"author":"Jos de Jong","license":"ISC","devDependencies":{"@babel/cli":"7.28.3","@babel/core":"7.28.4","@babel/plugin-transform-typescript":"7.28.0","@babel/preset-env":"7.28.3","@babel/preset-typescript":"7.27.1","@biomejs/biome":"2.2.4","@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@types/node":"24.5.2","cpy-cli":"6.0.0","del-cli":"7.0.0","husky":"9.1.7","npm-run-all":"4.1.5","rollup":"4.51.0","standard-version":"9.5.0","tinybench":"5.0.1","ts-node":"10.9.2","typescript":"5.9.2","uglify-js":"3.19.3","vitest":"3.2.4"},"_lastModified":"2026-07-28T04:41:19.173Z"}
1
+ {"name":"jsonrepair","version":"3.13.1","description":"Repair broken JSON documents","repository":{"type":"git","url":"https://github.com/josdejong/jsonrepair.git"},"type":"module","main":"lib/cjs/index.js","module":"lib/esm/index.js","browser":"lib/umd/jsonrepair.min.js","types":"lib/types/index.d.ts","sideEffects":false,"exports":{".":{"import":"./lib/esm/index.js","require":"./lib/cjs/index.js","types":"./lib/types/index.d.ts"},"./stream":{"import":"./lib/esm/stream.js","require":"./lib/cjs/stream.js","types":"./lib/types/stream.d.ts"}},"keywords":["simple","json","repair","fix","invalid","stream","streaming"],"bin":{"jsonrepair":"./bin/cli.js"},"scripts":{"test":"vitest watch src","test:it":"vitest run src","build":"npm-run-all build:**","build:clean":"del-cli lib","build:esm":"babel src --out-dir lib/esm --extensions \".ts\" --source-maps --config-file ./babel.config.json","build:cjs":"babel src --out-dir lib/cjs --extensions \".ts\" --source-maps --config-file ./babel-cjs.config.json && cpy tools/cjs lib/cjs --flat","build:umd":"rollup lib/esm/index.js --format umd --name JSONRepair --sourcemap --output.file lib/umd/jsonrepair.js && cpy tools/cjs/package.json lib/umd --flat","build:umd:min":"uglifyjs --compress --mangle --source-map --comments --output lib/umd/jsonrepair.min.js -- lib/umd/jsonrepair.js","build:types":"tsc --project tsconfig-types.json","build:validate":"vitest run test-lib","lint":"biome check","format":"biome check --write","benchmark":"npm run build:esm && node tools/benchmark/run.mjs","build-and-test":"npm run lint && npm run test:it && npm run build","release":"npm-run-all release:**","release:build-and-test":"npm run build-and-test","release:version":"standard-version","release:push":"git push && git push --tag","release:publish":"npm publish","release-dry-run":"npm run build-and-test && standard-version --dry-run","prepare":"husky"},"files":["README.md","LICENSE.md","lib"],"author":"Jos de Jong","license":"ISC","devDependencies":{"@babel/cli":"7.28.3","@babel/core":"7.28.4","@babel/plugin-transform-typescript":"7.28.0","@babel/preset-env":"7.28.3","@babel/preset-typescript":"7.27.1","@biomejs/biome":"2.2.4","@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@types/node":"24.5.2","cpy-cli":"6.0.0","del-cli":"7.0.0","husky":"9.1.7","npm-run-all":"4.1.5","rollup":"4.51.0","standard-version":"9.5.0","tinybench":"5.0.1","ts-node":"10.9.2","typescript":"5.9.2","uglify-js":"3.19.3","vitest":"3.2.4"},"_lastModified":"2026-07-30T03:55:39.181Z"}
@@ -1 +1 @@
1
- {"name":"just-bash","version":"2.14.3","description":"A simulated bash environment with virtual filesystem","repository":{"type":"git","url":"git+https://github.com/vercel-labs/just-bash.git"},"homepage":"https://github.com/vercel-labs/just-bash#readme","bugs":{"url":"https://github.com/vercel-labs/just-bash/issues"},"type":"module","main":"dist/bundle/index.js","types":"dist/index.d.ts","exports":{".":{"browser":"./dist/bundle/browser.js","require":{"types":"./dist/index.d.cts","default":"./dist/bundle/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/bundle/index.js"}},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/bundle/browser.js"}},"files":["dist/bundle/","dist/bin/","dist/*.d.ts","dist/*.d.cts","dist/ast/*.d.ts","dist/commands/**/*.d.ts","dist/fs/**/*.d.ts","dist/interpreter/**/*.d.ts","dist/network/**/*.d.ts","dist/parser/*.d.ts","dist/sandbox/*.d.ts","dist/utils/*.d.ts","vendor/cpython-emscripten/","README.md","CHANGELOG.md","dist/AGENTS.md"],"bin":{"just-bash":"./dist/bin/just-bash.js","just-bash-shell":"./dist/bin/shell/shell.js"},"publishConfig":{"access":"public"},"keywords":[],"author":"Malte and Claude","license":"Apache-2.0","devDependencies":{"@types/ini":"^4.1.1","@types/node":"^25.0.3","@types/papaparse":"^5.5.2","@types/sprintf-js":"^1.1.4","@types/sql.js":"^1.4.9","@types/turndown":"^5.0.6","@vitest/coverage-v8":"^4.0.18","esbuild":"^0.27.2","fast-check":"^3.23.2","knip":"^5.41.1","typescript":"^5.9.3","vitest":"^4.0.16"},"dependencies":{"seek-bzip":"^2.0.0","diff":"^8.0.2","fast-xml-parser":"5.3.3","file-type":"^21.2.0","ini":"^6.0.0","minimatch":"^10.1.1","modern-tar":"^0.7.3","papaparse":"^5.5.3","quickjs-emscripten":"^0.32.0","re2js":"^1.2.1","smol-toml":"^1.6.0","sprintf-js":"^1.1.3","sql.js":"^1.13.0","turndown":"^7.2.2","yaml":"^2.8.2"},"optionalDependencies":{"@mongodb-js/zstd":"^7.0.0","node-liblzma":"^2.0.3"},"scripts":{"build":"rm -rf dist && tsc && pnpm build:lib && pnpm build:lib:cjs && pnpm build:browser && pnpm build:cli && pnpm build:shell && pnpm build:worker && pnpm build:clean && cp dist/index.d.ts dist/index.d.cts && sed '1,/^-->/d' AGENTS.npm.md > dist/AGENTS.md","build:clean":"find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete","build:worker":"esbuild src/commands/python3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/python3/worker.js --external:../../../vendor/cpython-emscripten/* && cp src/commands/python3/worker.js dist/commands/python3/worker.js && mkdir -p dist/bin/chunks && cp src/commands/python3/worker.js dist/bin/chunks/worker.js && mkdir -p dist/bundle/chunks && cp src/commands/python3/worker.js dist/bundle/chunks/worker.js && esbuild src/commands/js-exec/js-exec-worker.ts --bundle --platform=node --format=esm --outfile=src/commands/js-exec/js-exec-worker.js --external:quickjs-emscripten && cp src/commands/js-exec/js-exec-worker.js dist/commands/js-exec/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bin/chunks/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bundle/chunks/js-exec-worker.js","build:lib":"esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:lib:cjs":"esbuild dist/index.js --bundle --platform=node --format=cjs --minify --outfile=dist/bundle/index.cjs --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:browser":"esbuild dist/browser.js --bundle --platform=browser --format=esm --minify --outfile=dist/bundle/browser.js --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:node:zlib --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip --define:__BROWSER__=true --alias:node:dns=./src/shims/browser-unsupported.js","build:cli":"esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:shell":"esbuild dist/cli/shell.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin/shell --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","validate":"pnpm lint && pnpm knip && pnpm typecheck && pnpm build && pnpm check:worker-sync && pnpm test:run && pnpm test:wasm && pnpm test:dist","typecheck":"tsc --noEmit","lint":"pnpm lint:banned","check:worker-sync":"node scripts/check-worker-sync.js","lint:banned":"node scripts/check-banned-patterns.js","lint:fix":"pnpm --workspace-root lint:fix","knip":"knip","test":"vitest","test:run":"vitest run --exclude src/security/fuzzing/ --exclude src/commands/python3/ --exclude src/commands/sqlite3/ --exclude src/commands/js-exec/ --exclude src/agent-examples/python-scripting.test.ts","test:dist":"vitest run src/cli/just-bash.bundle.test.ts","test:unit":"vitest run --config vitest.unit.config.ts","test:wasm":"vitest run --config vitest.wasm.config.ts","test:comparison":"vitest run --config vitest.comparison.config.ts","test:comparison:record":"RECORD_FIXTURES=1 vitest run --config vitest.comparison.config.ts","test:coverage":"vitest run --coverage","test:coverage:unit":"vitest run --config vitest.unit.config.ts --coverage","test:fuzz":"vitest run src/security/fuzzing/","test:fuzz:long":"FUZZ_RUNS=10000 vitest run src/security/fuzzing/","shell":"npx tsx src/cli/shell.ts","dev:exec":"npx tsx src/cli/exec.ts"},"_lastModified":"2026-07-28T04:41:19.014Z"}
1
+ {"name":"just-bash","version":"2.14.3","description":"A simulated bash environment with virtual filesystem","repository":{"type":"git","url":"git+https://github.com/vercel-labs/just-bash.git"},"homepage":"https://github.com/vercel-labs/just-bash#readme","bugs":{"url":"https://github.com/vercel-labs/just-bash/issues"},"type":"module","main":"dist/bundle/index.js","types":"dist/index.d.ts","exports":{".":{"browser":"./dist/bundle/browser.js","require":{"types":"./dist/index.d.cts","default":"./dist/bundle/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/bundle/index.js"}},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/bundle/browser.js"}},"files":["dist/bundle/","dist/bin/","dist/*.d.ts","dist/*.d.cts","dist/ast/*.d.ts","dist/commands/**/*.d.ts","dist/fs/**/*.d.ts","dist/interpreter/**/*.d.ts","dist/network/**/*.d.ts","dist/parser/*.d.ts","dist/sandbox/*.d.ts","dist/utils/*.d.ts","vendor/cpython-emscripten/","README.md","CHANGELOG.md","dist/AGENTS.md"],"bin":{"just-bash":"./dist/bin/just-bash.js","just-bash-shell":"./dist/bin/shell/shell.js"},"publishConfig":{"access":"public"},"keywords":[],"author":"Malte and Claude","license":"Apache-2.0","devDependencies":{"@types/ini":"^4.1.1","@types/node":"^25.0.3","@types/papaparse":"^5.5.2","@types/sprintf-js":"^1.1.4","@types/sql.js":"^1.4.9","@types/turndown":"^5.0.6","@vitest/coverage-v8":"^4.0.18","esbuild":"^0.27.2","fast-check":"^3.23.2","knip":"^5.41.1","typescript":"^5.9.3","vitest":"^4.0.16"},"dependencies":{"seek-bzip":"^2.0.0","diff":"^8.0.2","fast-xml-parser":"5.3.3","file-type":"^21.2.0","ini":"^6.0.0","minimatch":"^10.1.1","modern-tar":"^0.7.3","papaparse":"^5.5.3","quickjs-emscripten":"^0.32.0","re2js":"^1.2.1","smol-toml":"^1.6.0","sprintf-js":"^1.1.3","sql.js":"^1.13.0","turndown":"^7.2.2","yaml":"^2.8.2"},"optionalDependencies":{"@mongodb-js/zstd":"^7.0.0","node-liblzma":"^2.0.3"},"scripts":{"build":"rm -rf dist && tsc && pnpm build:lib && pnpm build:lib:cjs && pnpm build:browser && pnpm build:cli && pnpm build:shell && pnpm build:worker && pnpm build:clean && cp dist/index.d.ts dist/index.d.cts && sed '1,/^-->/d' AGENTS.npm.md > dist/AGENTS.md","build:clean":"find dist -name '*.test.js' -delete && find dist -name '*.test.d.ts' -delete","build:worker":"esbuild src/commands/python3/worker.ts --bundle --platform=node --format=esm --outfile=src/commands/python3/worker.js --external:../../../vendor/cpython-emscripten/* && cp src/commands/python3/worker.js dist/commands/python3/worker.js && mkdir -p dist/bin/chunks && cp src/commands/python3/worker.js dist/bin/chunks/worker.js && mkdir -p dist/bundle/chunks && cp src/commands/python3/worker.js dist/bundle/chunks/worker.js && esbuild src/commands/js-exec/js-exec-worker.ts --bundle --platform=node --format=esm --outfile=src/commands/js-exec/js-exec-worker.js --external:quickjs-emscripten && cp src/commands/js-exec/js-exec-worker.js dist/commands/js-exec/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bin/chunks/js-exec-worker.js && cp src/commands/js-exec/js-exec-worker.js dist/bundle/chunks/js-exec-worker.js","build:lib":"esbuild dist/index.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bundle --chunk-names=chunks/[name]-[hash] --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:lib:cjs":"esbuild dist/index.js --bundle --platform=node --format=cjs --minify --outfile=dist/bundle/index.cjs --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:browser":"esbuild dist/browser.js --bundle --platform=browser --format=esm --minify --outfile=dist/bundle/browser.js --external:diff --external:minimatch --external:sprintf-js --external:turndown --external:node:zlib --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip --define:__BROWSER__=true --alias:node:dns=./src/shims/browser-unsupported.js","build:cli":"esbuild dist/cli/just-bash.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","build:shell":"esbuild dist/cli/shell.js --bundle --splitting --platform=node --format=esm --minify --outdir=dist/bin/shell --entry-names=[name] --chunk-names=chunks/[name]-[hash] --banner:js='#!/usr/bin/env node' --external:sql.js --external:quickjs-emscripten --external:@mongodb-js/zstd --external:node-liblzma --external:seek-bzip","validate":"pnpm lint && pnpm knip && pnpm typecheck && pnpm build && pnpm check:worker-sync && pnpm test:run && pnpm test:wasm && pnpm test:dist","typecheck":"tsc --noEmit","lint":"pnpm lint:banned","check:worker-sync":"node scripts/check-worker-sync.js","lint:banned":"node scripts/check-banned-patterns.js","lint:fix":"pnpm --workspace-root lint:fix","knip":"knip","test":"vitest","test:run":"vitest run --exclude src/security/fuzzing/ --exclude src/commands/python3/ --exclude src/commands/sqlite3/ --exclude src/commands/js-exec/ --exclude src/agent-examples/python-scripting.test.ts","test:dist":"vitest run src/cli/just-bash.bundle.test.ts","test:unit":"vitest run --config vitest.unit.config.ts","test:wasm":"vitest run --config vitest.wasm.config.ts","test:comparison":"vitest run --config vitest.comparison.config.ts","test:comparison:record":"RECORD_FIXTURES=1 vitest run --config vitest.comparison.config.ts","test:coverage":"vitest run --coverage","test:coverage:unit":"vitest run --config vitest.unit.config.ts --coverage","test:fuzz":"vitest run src/security/fuzzing/","test:fuzz:long":"FUZZ_RUNS=10000 vitest run src/security/fuzzing/","shell":"npx tsx src/cli/shell.ts","dev:exec":"npx tsx src/cli/exec.ts"},"_lastModified":"2026-07-30T03:55:38.992Z"}
@@ -1 +1 @@
1
- {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-07-28T04:41:00.898Z"}
1
+ {"name":"nodejs-snowflake","collaborators":["Utkarsh Srivastava <utkarsh@sagacious.dev>"],"description":"Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)","version":"2.0.1","license":"Apache 2.0","repository":{"type":"git","url":"https://github.com/utkarsh-pro/nodejs-snowflake.git"},"files":["nodejs_snowflake_bg.wasm","nodejs_snowflake.js","nodejs_snowflake.d.ts"],"main":"nodejs_snowflake.js","types":"nodejs_snowflake.d.ts","_lastModified":"2026-07-30T03:55:22.604Z"}
@@ -1 +1 @@
1
- {"name":"openai","version":"6.39.1","description":"The official TypeScript library for the OpenAI API","author":"OpenAI <support@openai.com>","types":"./index.d.ts","main":"./index.js","type":"commonjs","repository":"github:openai/openai-node","license":"Apache-2.0","packageManager":"yarn@1.22.22","files":["**/*"],"private":false,"publishConfig":{"access":"public"},"scripts":{"test":"./scripts/test","build":"./scripts/build","format":"./scripts/format","tsn":"ts-node -r tsconfig-paths/register","lint":"./scripts/lint","fix":"./scripts/format"},"dependencies":{},"bin":{"openai":"bin/cli"},"overrides":{"minimatch":"^9.0.5"},"pnpm":{"overrides":{"minimatch":"^9.0.5"}},"resolutions":{"minimatch":"^9.0.5"},"exports":{".":{"require":{"types":"./index.d.ts","default":"./index.js"},"types":"./index.d.mts","default":"./index.mjs"},"./_vendor/*.mjs":{"default":"./_vendor/*.mjs"},"./_vendor/*.js":{"default":"./_vendor/*.js"},"./_vendor/*":{"import":"./_vendor/*.mjs","require":"./_vendor/*.js"},"./api-promise":{"import":"./api-promise.mjs","require":"./api-promise.js"},"./api-promise.js":{"default":"./api-promise.js"},"./api-promise.mjs":{"default":"./api-promise.mjs"},"./auth/*.mjs":{"default":"./auth/*.mjs"},"./auth/*.js":{"default":"./auth/*.js"},"./auth/*":{"import":"./auth/*.mjs","require":"./auth/*.js"},"./azure":{"import":"./azure.mjs","require":"./azure.js"},"./azure.js":{"default":"./azure.js"},"./azure.mjs":{"default":"./azure.mjs"},"./beta/*.mjs":{"default":"./beta/*.mjs"},"./beta/*.js":{"default":"./beta/*.js"},"./beta/*":{"import":"./beta/*.mjs","require":"./beta/*.js"},"./client":{"import":"./client.mjs","require":"./client.js"},"./client.js":{"default":"./client.js"},"./client.mjs":{"default":"./client.mjs"},"./core/*.mjs":{"default":"./core/*.mjs"},"./core/*.js":{"default":"./core/*.js"},"./core/*":{"import":"./core/*.mjs","require":"./core/*.js"},"./error":{"import":"./error.mjs","require":"./error.js"},"./error.js":{"default":"./error.js"},"./error.mjs":{"default":"./error.mjs"},"./helpers/*.mjs":{"default":"./helpers/*.mjs"},"./helpers/*.js":{"default":"./helpers/*.js"},"./helpers/*":{"import":"./helpers/*.mjs","require":"./helpers/*.js"},"./index":{"import":"./index.mjs","require":"./index.js"},"./index.js":{"default":"./index.js"},"./index.mjs":{"default":"./index.mjs"},"./lib/*.mjs":{"default":"./lib/*.mjs"},"./lib/*.js":{"default":"./lib/*.js"},"./lib/*":{"import":"./lib/*.mjs","require":"./lib/*.js"},"./pagination":{"import":"./pagination.mjs","require":"./pagination.js"},"./pagination.js":{"default":"./pagination.js"},"./pagination.mjs":{"default":"./pagination.mjs"},"./realtime/*.mjs":{"default":"./realtime/*.mjs"},"./realtime/*.js":{"default":"./realtime/*.js"},"./realtime/*":{"import":"./realtime/*.mjs","require":"./realtime/*.js"},"./resource":{"import":"./resource.mjs","require":"./resource.js"},"./resource.js":{"default":"./resource.js"},"./resource.mjs":{"default":"./resource.mjs"},"./resources/*.mjs":{"default":"./resources/*.mjs"},"./resources/*.js":{"default":"./resources/*.js"},"./resources/*":{"import":"./resources/*.mjs","require":"./resources/*.js"},"./resources":{"import":"./resources.mjs","require":"./resources.js"},"./resources.js":{"default":"./resources.js"},"./resources.mjs":{"default":"./resources.mjs"},"./streaming":{"import":"./streaming.mjs","require":"./streaming.js"},"./streaming.js":{"default":"./streaming.js"},"./streaming.mjs":{"default":"./streaming.mjs"},"./uploads":{"import":"./uploads.mjs","require":"./uploads.js"},"./uploads.js":{"default":"./uploads.js"},"./uploads.mjs":{"default":"./uploads.mjs"},"./version":{"import":"./version.mjs","require":"./version.js"},"./version.js":{"default":"./version.js"},"./version.mjs":{"default":"./version.mjs"}},"peerDependencies":{"ws":"^8.18.0","zod":"^3.25 || ^4.0"},"peerDependenciesMeta":{"ws":{"optional":true},"zod":{"optional":true}},"_lastModified":"2026-07-28T04:41:02.732Z"}
1
+ {"name":"openai","version":"6.39.1","description":"The official TypeScript library for the OpenAI API","author":"OpenAI <support@openai.com>","types":"./index.d.ts","main":"./index.js","type":"commonjs","repository":"github:openai/openai-node","license":"Apache-2.0","packageManager":"yarn@1.22.22","files":["**/*"],"private":false,"publishConfig":{"access":"public"},"scripts":{"test":"./scripts/test","build":"./scripts/build","format":"./scripts/format","tsn":"ts-node -r tsconfig-paths/register","lint":"./scripts/lint","fix":"./scripts/format"},"dependencies":{},"bin":{"openai":"bin/cli"},"overrides":{"minimatch":"^9.0.5"},"pnpm":{"overrides":{"minimatch":"^9.0.5"}},"resolutions":{"minimatch":"^9.0.5"},"exports":{".":{"require":{"types":"./index.d.ts","default":"./index.js"},"types":"./index.d.mts","default":"./index.mjs"},"./_vendor/*.mjs":{"default":"./_vendor/*.mjs"},"./_vendor/*.js":{"default":"./_vendor/*.js"},"./_vendor/*":{"import":"./_vendor/*.mjs","require":"./_vendor/*.js"},"./api-promise":{"import":"./api-promise.mjs","require":"./api-promise.js"},"./api-promise.js":{"default":"./api-promise.js"},"./api-promise.mjs":{"default":"./api-promise.mjs"},"./auth/*.mjs":{"default":"./auth/*.mjs"},"./auth/*.js":{"default":"./auth/*.js"},"./auth/*":{"import":"./auth/*.mjs","require":"./auth/*.js"},"./azure":{"import":"./azure.mjs","require":"./azure.js"},"./azure.js":{"default":"./azure.js"},"./azure.mjs":{"default":"./azure.mjs"},"./beta/*.mjs":{"default":"./beta/*.mjs"},"./beta/*.js":{"default":"./beta/*.js"},"./beta/*":{"import":"./beta/*.mjs","require":"./beta/*.js"},"./client":{"import":"./client.mjs","require":"./client.js"},"./client.js":{"default":"./client.js"},"./client.mjs":{"default":"./client.mjs"},"./core/*.mjs":{"default":"./core/*.mjs"},"./core/*.js":{"default":"./core/*.js"},"./core/*":{"import":"./core/*.mjs","require":"./core/*.js"},"./error":{"import":"./error.mjs","require":"./error.js"},"./error.js":{"default":"./error.js"},"./error.mjs":{"default":"./error.mjs"},"./helpers/*.mjs":{"default":"./helpers/*.mjs"},"./helpers/*.js":{"default":"./helpers/*.js"},"./helpers/*":{"import":"./helpers/*.mjs","require":"./helpers/*.js"},"./index":{"import":"./index.mjs","require":"./index.js"},"./index.js":{"default":"./index.js"},"./index.mjs":{"default":"./index.mjs"},"./lib/*.mjs":{"default":"./lib/*.mjs"},"./lib/*.js":{"default":"./lib/*.js"},"./lib/*":{"import":"./lib/*.mjs","require":"./lib/*.js"},"./pagination":{"import":"./pagination.mjs","require":"./pagination.js"},"./pagination.js":{"default":"./pagination.js"},"./pagination.mjs":{"default":"./pagination.mjs"},"./realtime/*.mjs":{"default":"./realtime/*.mjs"},"./realtime/*.js":{"default":"./realtime/*.js"},"./realtime/*":{"import":"./realtime/*.mjs","require":"./realtime/*.js"},"./resource":{"import":"./resource.mjs","require":"./resource.js"},"./resource.js":{"default":"./resource.js"},"./resource.mjs":{"default":"./resource.mjs"},"./resources/*.mjs":{"default":"./resources/*.mjs"},"./resources/*.js":{"default":"./resources/*.js"},"./resources/*":{"import":"./resources/*.mjs","require":"./resources/*.js"},"./resources":{"import":"./resources.mjs","require":"./resources.js"},"./resources.js":{"default":"./resources.js"},"./resources.mjs":{"default":"./resources.mjs"},"./streaming":{"import":"./streaming.mjs","require":"./streaming.js"},"./streaming.js":{"default":"./streaming.js"},"./streaming.mjs":{"default":"./streaming.mjs"},"./uploads":{"import":"./uploads.mjs","require":"./uploads.js"},"./uploads.js":{"default":"./uploads.js"},"./uploads.mjs":{"default":"./uploads.mjs"},"./version":{"import":"./version.mjs","require":"./version.js"},"./version.js":{"default":"./version.js"},"./version.mjs":{"default":"./version.mjs"}},"peerDependencies":{"ws":"^8.18.0","zod":"^3.25 || ^4.0"},"peerDependenciesMeta":{"ws":{"optional":true},"zod":{"optional":true}},"_lastModified":"2026-07-30T03:55:24.184Z"}
@@ -1 +1 @@
1
- {"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-07-28T04:41:00.844Z"}
1
+ {"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-07-30T03:55:22.550Z"}
@@ -31,6 +31,7 @@ export type CreateAIConversationParams = {
31
31
  title?: string;
32
32
  options?: AIConversationsOptions;
33
33
  from?: 'main-agent' | 'sub-agent';
34
+ scope?: string;
34
35
  transaction?: Transaction;
35
36
  category?: 'chat' | 'task';
36
37
  };
@@ -57,7 +58,7 @@ export declare const registerAIConversationReadNotification: (plugin: PluginAISe
57
58
  export declare class AIConversationsManager {
58
59
  protected plugin: PluginAIServer;
59
60
  constructor(plugin: PluginAIServer);
60
- create({ userId, aiEmployee, title, options, from, transaction, category, }: CreateAIConversationParams): Promise<any>;
61
+ create({ userId, aiEmployee, title, options, from, scope, transaction, category, }: CreateAIConversationParams): Promise<any>;
61
62
  update({ userId, sessionId, title, options: inputOptions }: UpdateAIConversationParams): Promise<any>;
62
63
  getConversation({ sessionId, userId }: {
63
64
  sessionId: string;
@@ -66,6 +66,7 @@ class AIConversationsManager {
66
66
  title,
67
67
  options = {},
68
68
  from = "main-agent",
69
+ scope,
69
70
  transaction,
70
71
  category = "chat"
71
72
  }) {
@@ -77,6 +78,7 @@ class AIConversationsManager {
77
78
  options,
78
79
  thread: 1,
79
80
  from,
81
+ ...scope !== void 0 ? { scope } : {},
80
82
  category
81
83
  },
82
84
  transaction
@@ -36,6 +36,7 @@ export declare class AIEmployee {
36
36
  employee: Model;
37
37
  aiChatConversation: AIChatConversation;
38
38
  skillSettings?: Record<string, any>;
39
+ userMessageCount: number;
39
40
  private plugin;
40
41
  private db;
41
42
  private ctx;
@@ -64,6 +64,7 @@ class AIEmployee {
64
64
  employee;
65
65
  aiChatConversation;
66
66
  skillSettings;
67
+ userMessageCount = 0;
67
68
  plugin;
68
69
  db;
69
70
  ctx;
@@ -206,6 +207,7 @@ class AIEmployee {
206
207
  const { provider, model, service } = await this.plugin.aiManager.getLLMService({
207
208
  ...this.model
208
209
  });
210
+ this.userMessageCount = (userMessages ?? []).filter((message) => message.role === "user").length;
209
211
  const { historyMessages, tools, resolvedTools, middleware, config, state } = await this.initSession({
210
212
  messageId,
211
213
  provider,
@@ -1195,6 +1197,10 @@ If information is missing, clearly state it in the summary.</Important>`;
1195
1197
  }
1196
1198
  const currentFrontendTools = await (0, import_frontend_tools2.listCurrentFrontendTools)(this.ctx, this.sessionId);
1197
1199
  const tools = await this.listTools({ scope: "GENERAL" });
1200
+ const getSkill = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.GET_SKILL, { ctx: this.ctx });
1201
+ if (getSkill) {
1202
+ tools.push(getSkill);
1203
+ }
1198
1204
  if (this.webSearch === true) {
1199
1205
  const subAgentWebSearch = await this.toolsManager.getTools(import_ai.SYSTEM_TOOLS.WEB_SEARCH, { ctx: this.ctx });
1200
1206
  tools.push(subAgentWebSearch);
@@ -98,8 +98,9 @@ const conversationMiddleware = (aiEmployee, options) => {
98
98
  })
99
99
  }),
100
100
  beforeAgent: async (state) => {
101
- const lastHumanMessageIndex = state.lastMessageIndex.lastHumanMessageIndex;
102
- const userMessages = state.messages.filter((x) => x.type === "human").slice(lastHumanMessageIndex).map((x) => x).map(convertHumanMessage);
101
+ const humanMessages = state.messages.filter((x) => x.type === "human");
102
+ const currentHumanMessageIndex = humanMessages.length;
103
+ const userMessages = (aiEmployee.userMessageCount ? humanMessages.slice(-aiEmployee.userMessageCount) : []).map((x) => x).map(convertHumanMessage);
103
104
  await aiEmployee.aiChatConversation.withTransaction(async (conversation, transaction) => {
104
105
  if (agentThread) {
105
106
  await aiEmployee.updateThread(transaction, agentThread);
@@ -111,6 +112,12 @@ const conversationMiddleware = (aiEmployee, options) => {
111
112
  await conversation.addMessages(userMessages);
112
113
  }
113
114
  });
115
+ return {
116
+ lastMessageIndex: {
117
+ ...state.lastMessageIndex,
118
+ lastHumanMessageIndex: currentHumanMessageIndex
119
+ }
120
+ };
114
121
  },
115
122
  afterAgent: async () => {
116
123
  aiEmployee.removeAbortController();
@@ -57,6 +57,11 @@ var ai_conversations_default = (0, import_database.defineCollection)({
57
57
  defaultValue: "main-agent",
58
58
  allowNull: false
59
59
  },
60
+ {
61
+ name: "scope",
62
+ type: "string",
63
+ index: true
64
+ },
60
65
  {
61
66
  name: "user",
62
67
  type: "belongsTo",
@@ -33,7 +33,6 @@ module.exports = __toCommonJS(constants_exports);
33
33
  const DOCUMENT_PARSE_META_KEY = "documentParse";
34
34
  const SUPPORTED_DOCUMENT_EXTNAMES = [
35
35
  ".pdf",
36
- ".ppt",
37
36
  ".pptx",
38
37
  ".doc",
39
38
  ".docx",
@@ -62,6 +62,7 @@ export declare class PluginAIServer extends Plugin {
62
62
  get repositories(): {
63
63
  aiContextDatasources: import("@nocobase/database").Repository<any, any>;
64
64
  };
65
+ private registerAIFileAccessAuthorizer;
65
66
  get fileManager(): PluginFileManagerServer;
66
67
  private repository;
67
68
  }
@@ -56,6 +56,7 @@ var import_ai_employees_manager = require("./ai-employees/ai-employees-manager")
56
56
  var import_ai_conversations = require("./ai-employees/ai-conversations");
57
57
  var import_snowflake = __toESM(require("./snowflake"));
58
58
  var aiEmployeeActions = __toESM(require("./resource/aiEmployees"));
59
+ var llmServiceActions = __toESM(require("./resource/llmServices"));
59
60
  var import_google_genai = require("./llm-providers/google-genai");
60
61
  var import_ai_employee = require("./workflow/triggers/ai-employee");
61
62
  var import_tools = require("./tools");
@@ -169,6 +170,7 @@ class PluginAIServer extends import_server.Plugin {
169
170
  this.defineResources();
170
171
  this.registerMcpClientEvents();
171
172
  this.setPermissions();
173
+ this.registerAIFileAccessAuthorizer();
172
174
  this.registerWorkflow();
173
175
  this.registerWorkContextResolveStrategy();
174
176
  (0, import_employee.registerAIEmployeeTaskNotification)(this);
@@ -235,6 +237,9 @@ class PluginAIServer extends import_server.Plugin {
235
237
  Object.entries(aiEmployeeActions).forEach(([name, action]) => {
236
238
  this.app.resourceManager.registerActionHandler(`aiEmployees:${name}`, action);
237
239
  });
240
+ Object.entries(llmServiceActions).forEach(([name, action]) => {
241
+ this.app.resourceManager.registerActionHandler(`llmServices:${name}`, action);
242
+ });
238
243
  }
239
244
  registerMcpClientEvents() {
240
245
  this.db.on("aiMcpClients.afterCreate", (model, { transaction } = {}) => {
@@ -370,6 +375,26 @@ class PluginAIServer extends import_server.Plugin {
370
375
  aiContextDatasources: this.repository("aiContextDatasources")
371
376
  };
372
377
  }
378
+ registerAIFileAccessAuthorizer() {
379
+ this.fileManager.registerFileAccessAuthorizer({
380
+ name: "ai-files",
381
+ authorize: async (ctx, params) => {
382
+ var _a;
383
+ const currentUserId = (_a = ctx.state.currentUser) == null ? void 0 : _a.id;
384
+ if (params.dataSourceKey !== "main" || params.collectionName !== "aiFiles" || !currentUserId) {
385
+ return false;
386
+ }
387
+ const file = await ctx.db.getRepository("aiFiles").findOne({
388
+ filter: {
389
+ id: params.id,
390
+ createdById: currentUserId
391
+ },
392
+ fields: ["id"]
393
+ });
394
+ return Boolean(file);
395
+ }
396
+ });
397
+ }
373
398
  get fileManager() {
374
399
  return this.app.pm.get("file-manager");
375
400
  }
@@ -149,12 +149,14 @@ var aiConversations_default = {
149
149
  var _a;
150
150
  const userId = (_a = ctx.auth) == null ? void 0 : _a.user.id;
151
151
  const filter = ctx.action.params.filter || {};
152
+ const scope = ctx.action.params.scope;
152
153
  ctx.action.mergeParams({
153
154
  filter: {
154
155
  ...filter,
155
156
  userId,
156
157
  from: filter.from ?? "main-agent",
157
- category: "chat"
158
+ category: "chat",
159
+ ...typeof scope === "string" && scope ? { scope } : {}
158
160
  }
159
161
  });
160
162
  return import_actions.default.list(ctx, next);
@@ -204,7 +206,8 @@ var aiConversations_default = {
204
206
  var _a;
205
207
  const plugin = ctx.app.pm.get("ai");
206
208
  const userId = (_a = ctx.auth) == null ? void 0 : _a.user.id;
207
- const { aiEmployee, systemMessage, skillSettings, conversationSettings, modelSettings } = ctx.action.params.values || {};
209
+ const { aiEmployee, systemMessage, skillSettings, conversationSettings, modelSettings, scope } = ctx.action.params.values || {};
210
+ const normalizedScope = typeof scope === "string" ? scope : void 0;
208
211
  const employee = await getAIEmployee(ctx, aiEmployee.username);
209
212
  if (!employee) {
210
213
  ctx.throw(400, "AI employee not found");
@@ -216,6 +219,7 @@ var aiConversations_default = {
216
219
  ctx.body = await plugin.aiConversationsManager.create({
217
220
  userId,
218
221
  aiEmployee,
222
+ scope: normalizedScope,
219
223
  options: {
220
224
  systemMessage,
221
225
  skillSettings,
@@ -7,6 +7,8 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { Context, Next } from '@nocobase/actions';
10
+ export declare const create: (ctx: Context, next: Next) => Promise<void>;
11
+ export declare const update: (ctx: Context, next: Next) => Promise<void>;
10
12
  export declare const list: (ctx: Context, next: Next) => Promise<void>;
11
13
  export declare const listByUser: (ctx: Context, next: Next) => Promise<any>;
12
14
  export declare const updateUserPrompt: (ctx: Context, next: Next) => Promise<any>;