plugin-agent-orchestrator 1.1.4 → 1.1.6
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.
- package/README.md +204 -114
- package/dist/client/index.js +1 -1
- package/dist/client-v2/117.7565cff57c39318a.js +10 -0
- package/dist/client-v2/214.106635011859dede.js +10 -0
- package/dist/client-v2/418.41ed200e7d6da332.js +10 -0
- package/dist/client-v2/53.349fff8db80b19d4.js +10 -0
- package/dist/client-v2/981.e4a1f41cfc94a856.js +10 -0
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +7 -8
- package/dist/locale/en-US.json +226 -170
- package/dist/locale/vi-VN.json +226 -170
- package/dist/locale/zh-CN.json +226 -170
- package/dist/server/collections/agent-execution-spans.js +8 -0
- package/dist/server/collections/agent-loop-action-approvals.js +1 -0
- package/dist/server/collections/agent-loop-runs.js +7 -1
- package/dist/server/collections/agent-loop-steps.js +7 -0
- package/dist/server/collections/skill-executions.js +8 -0
- package/dist/server/plugin.js +3 -1
- package/dist/server/resources/agent-harness-profile.js +117 -0
- package/dist/server/resources/agent-knowledge-insights.js +1 -3
- package/dist/server/resources/agent-loop-approval.js +25 -0
- package/dist/server/resources/agent-loop.js +3 -1
- package/dist/server/services/AgentMemoryContextService.js +34 -0
- package/dist/server/services/HarnessCompiler.js +35 -2
- package/dist/server/services/HarnessProfileService.js +74 -9
- package/dist/server/services/HarnessSchema.js +30 -3
- package/dist/server/services/LoopPatternSchema.js +16 -1
- package/dist/server/services/LoopRunRepository.js +80 -0
- package/dist/server/services/LoopRunStateMachine.js +92 -3
- package/dist/server/services/LoopTriggerService.js +37 -0
- package/dist/server/services/LoopWorkerService.js +261 -23
- package/dist/server/services/NativeSubAgentObserver.js +165 -23
- package/dist/server/services/PluginAiRuntimeAdapter.js +16 -5
- package/dist/server/services/ToolLoopDetectionService.js +210 -0
- package/dist/server/services/VerificationService.js +66 -0
- package/dist/server/services/harness-runtime-policy.js +139 -0
- package/dist/server/skill-hub/plugin.js +36 -3
- package/dist/server/skill-hub/tasks/SkillExecutionTask.js +29 -0
- package/package.json +53 -53
- package/src/client/ApprovalsTab.tsx +2 -0
- package/src/client/OrchestratorSettings.tsx +11 -0
- package/src/client/skill-hub/components/GitSkillImport.tsx +3 -3
- package/src/client/skill-hub/components/SkillMetrics.tsx +15 -10
- package/src/client/skill-hub/index.tsx +0 -52
- package/src/client-v2/components/AgentRunsTab.tsx +576 -576
- package/src/client-v2/components/ApprovalsTab.tsx +337 -0
- package/src/client-v2/components/HarnessProfilesTab.tsx +385 -105
- package/src/client-v2/components/MemoryInspectorTab.tsx +141 -141
- package/src/client-v2/components/TracingTab.tsx +515 -515
- package/src/client-v2/hooks/useApiRequest.ts +141 -141
- package/src/client-v2/pages/ApprovalsPage.tsx +10 -0
- package/src/client-v2/plugin.tsx +6 -6
- package/src/client-v2/skill-hub/components/SkillMetrics.tsx +5 -2
- package/src/locale/en-US.json +226 -174
- package/src/locale/vi-VN.json +226 -174
- package/src/locale/zh-CN.json +226 -174
- package/src/server/__tests__/circuit-breaker.test.ts +248 -248
- package/src/server/__tests__/harness-compiler.test.ts +83 -0
- package/src/server/__tests__/harness-profile-service.test.ts +51 -0
- package/src/server/__tests__/harness-runtime-policy.test.ts +293 -0
- package/src/server/__tests__/harness-tool-plan.test.ts +24 -0
- package/src/server/__tests__/loop-approval-decision.test.ts +512 -0
- package/src/server/__tests__/loop-approval-expiry.test.ts +258 -0
- package/src/server/__tests__/loop-budget-service.test.ts +255 -255
- package/src/server/__tests__/loop-control-plane-backfill.test.ts +266 -266
- package/src/server/__tests__/loop-pattern-schema.test.ts +18 -1
- package/src/server/__tests__/loop-pattern-service.test.ts +148 -148
- package/src/server/__tests__/loop-run-state-machine.test.ts +11 -0
- package/src/server/__tests__/loop-trigger-service.test.ts +148 -0
- package/src/server/__tests__/loop-worker-claim.test.ts +341 -341
- package/src/server/__tests__/loop-worker-execution.test.ts +82 -1
- package/src/server/__tests__/native-sub-agent-observer.test.ts +288 -4
- package/src/server/__tests__/path-lock-service.test.ts +254 -254
- package/src/server/__tests__/skill-execution-task-policy.test.ts +140 -0
- package/src/server/__tests__/smoke.test.ts +162 -162
- package/src/server/__tests__/tool-loop-detection.test.ts +275 -0
- package/src/server/collections/agent-execution-spans.ts +8 -0
- package/src/server/collections/agent-harness-profile-versions.ts +26 -26
- package/src/server/collections/agent-harness-profiles.ts +71 -71
- package/src/server/collections/agent-loop-action-approvals.ts +1 -0
- package/src/server/collections/agent-loop-artifacts.ts +25 -25
- package/src/server/collections/agent-loop-circuit-states.ts +23 -23
- package/src/server/collections/agent-loop-control-settings.ts +21 -21
- package/src/server/collections/agent-loop-events.ts +98 -98
- package/src/server/collections/agent-loop-path-locks.ts +27 -27
- package/src/server/collections/agent-loop-patterns.ts +42 -42
- package/src/server/collections/agent-loop-runs.ts +7 -1
- package/src/server/collections/agent-loop-steps.ts +7 -0
- package/src/server/collections/agent-loop-usage-buckets.ts +22 -22
- package/src/server/collections/agent-loop-worktrees.ts +25 -25
- package/src/server/collections/skill-executions.ts +8 -0
- package/src/server/migrations/20260427000002-change-packages-to-text.ts +52 -52
- package/src/server/migrations/20260429000000-add-llm-fields.ts +47 -47
- package/src/server/migrations/20260429000001-fix-inputargs-json-to-text.ts +45 -45
- package/src/server/migrations/20260503000000-add-orchestrator-trace-fields.ts +33 -33
- package/src/server/migrations/20260524000000-add-agent-loop-fields-to-skill-executions.ts +31 -31
- package/src/server/migrations/20260803010000-backfill-loop-control-plane-data.ts +293 -293
- package/src/server/plugin.ts +3 -1
- package/src/server/resources/agent-harness-profile.ts +94 -0
- package/src/server/resources/agent-knowledge-insights.ts +5 -3
- package/src/server/resources/agent-loop-approval.ts +32 -0
- package/src/server/resources/agent-loop-artifact.ts +56 -56
- package/src/server/resources/agent-loop-events-stream.ts +105 -105
- package/src/server/resources/agent-loop.ts +3 -1
- package/src/server/resources/resource-helpers.ts +33 -33
- package/src/server/resources/tracing.ts +266 -266
- package/src/server/services/AgentMemoryContextService.ts +44 -0
- package/src/server/services/DurableCircuitBreakerService.ts +239 -239
- package/src/server/services/ExecutionSpanService.ts +2 -0
- package/src/server/services/HarnessCompiler.ts +37 -0
- package/src/server/services/HarnessProfileService.ts +92 -10
- package/src/server/services/HarnessSchema.ts +31 -0
- package/src/server/services/LoopBudgetService.ts +275 -275
- package/src/server/services/LoopControlService.ts +124 -124
- package/src/server/services/LoopPatternSchema.ts +19 -1
- package/src/server/services/LoopPatternService.ts +143 -143
- package/src/server/services/LoopRunRepository.ts +99 -0
- package/src/server/services/LoopRunStateMachine.ts +100 -3
- package/src/server/services/LoopSchedulerService.ts +199 -199
- package/src/server/services/LoopTriggerService.ts +42 -0
- package/src/server/services/LoopWorkerService.ts +327 -27
- package/src/server/services/NativeSubAgentObserver.ts +186 -21
- package/src/server/services/PathLockService.ts +321 -321
- package/src/server/services/PluginAiRuntimeAdapter.ts +24 -7
- package/src/server/services/ToolLoopDetectionService.ts +213 -0
- package/src/server/services/VerificationSchema.ts +31 -31
- package/src/server/services/VerificationService.ts +81 -2
- package/src/server/services/harness-runtime-policy.ts +141 -0
- package/src/server/skill-hub/plugin.ts +41 -3
- package/src/server/skill-hub/services/RegistrySkillSnapshotService.ts +235 -235
- package/src/server/skill-hub/services/__tests__/RegistrySkillSnapshotService.test.ts +61 -61
- package/src/server/skill-hub/tasks/SkillExecutionTask.ts +43 -2
- package/src/server/utils/ensure-indexes.ts +96 -96
- package/src/server/utils/logging.ts +62 -62
- package/src/server/utils/loop-pattern-context.ts +20 -20
- package/dist/client-v2/214.b063f33ba044a808.js +0 -10
- package/dist/client-v2/373.f5d5292e53c4e832.js +0 -10
- package/dist/client-v2/418.58fa350f5496efd3.js +0 -10
- package/dist/client-v2/53.9a10455323390f14.js +0 -10
- package/dist/client-v2/677.a991ce0250ff5c77.js +0 -10
- package/dist/client-v2/925.e5925bf21ed68e7a.js +0 -10
- package/src/client/AIEmployeeSelect.tsx +0 -47
- package/src/client/AIEmployeesContext.tsx +0 -102
- package/src/client/RulesTab.tsx +0 -2
- package/src/client/TracingTab.tsx +0 -436
- package/src/client/skill-hub/components/ExecutionProgress.tsx +0 -51
- package/src/client-v2/components/RulesTab.tsx +0 -2
- package/src/client-v2/pages/AgentRunsPage.tsx +0 -13
package/dist/locale/zh-CN.json
CHANGED
|
@@ -1,170 +1,226 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Agent Orchestrator": "智能体编排",
|
|
3
|
-
"Orchestration Rules": "编排规则",
|
|
4
|
-
"Native Monitor": "原生监控",
|
|
5
|
-
"Execution Tracing": "执行追踪",
|
|
6
|
-
"Agent Runs": "智能体运行",
|
|
7
|
-
"Native Agent Runs": "原生智能体运行",
|
|
8
|
-
"Harness Profiles": "Harness 配置",
|
|
9
|
-
"Policy Profiles": "策略配置",
|
|
10
|
-
"Skill Hub Definitions": "技能中心定义",
|
|
11
|
-
"Execution History": "执行历史",
|
|
12
|
-
"Skill Review Settings": "技能审核设置",
|
|
13
|
-
"Metrics": "指标",
|
|
14
|
-
"Swarm Tracing": "集群追踪",
|
|
15
|
-
"Leader (Orchestrator)": "主控(编排者)",
|
|
16
|
-
"Sub-Agent": "子智能体",
|
|
17
|
-
"Max Delegation Depth": "最大委派深度",
|
|
18
|
-
"Timeout (ms)": "超时时间(毫秒)",
|
|
19
|
-
"Enabled": "已启用",
|
|
20
|
-
"New Rule": "新建规则",
|
|
21
|
-
"Edit Orchestration Rule": "编辑编排规则",
|
|
22
|
-
"New Orchestration Rule": "新建编排规则",
|
|
23
|
-
"Rule created": "规则已创建",
|
|
24
|
-
"Rule updated": "规则已更新",
|
|
25
|
-
"Rule deleted": "规则已删除",
|
|
26
|
-
"Sub-Agent Conversation": "子智能体对话",
|
|
27
|
-
"Task Summary": "任务摘要",
|
|
28
|
-
"Parent Session": "父会话",
|
|
29
|
-
"No sub-agent executions yet": "暂无子智能体执行记录",
|
|
30
|
-
"Synced {{count}} native runs": "已同步 {{count}} 条原生运行",
|
|
31
|
-
"Sync failed": "同步失败",
|
|
32
|
-
"Time": "时间",
|
|
33
|
-
"Leader": "主控",
|
|
34
|
-
"Task": "任务",
|
|
35
|
-
"Status": "状态",
|
|
36
|
-
"Duration": "耗时",
|
|
37
|
-
"Context": "上下文",
|
|
38
|
-
"Detail": "详情",
|
|
39
|
-
"Native plugin-ai sub-agent dispatches captured by the orchestrator observer. Execution still runs through AIEmployee/SubAgentsDispatcher.": "由 orchestrator observer 捕获的 plugin-ai 原生子智能体派发。执行仍然通过 AIEmployee/SubAgentsDispatcher。",
|
|
40
|
-
"Any leader": "任意主控",
|
|
41
|
-
"Any sub-agent": "任意子智能体",
|
|
42
|
-
"Any status": "任意状态",
|
|
43
|
-
"Running": "运行中",
|
|
44
|
-
"Success": "成功",
|
|
45
|
-
"Error": "错误",
|
|
46
|
-
"Reset": "重置",
|
|
47
|
-
"Refresh": "刷新",
|
|
48
|
-
"Sync": "同步",
|
|
49
|
-
"{{count}} runs": "{{count}} 条运行",
|
|
50
|
-
"No runs match the current filters": "没有匹配当前筛选条件的运行",
|
|
51
|
-
"No native runs yet": "暂无原生运行",
|
|
52
|
-
"Native Run Detail": "原生运行详情",
|
|
53
|
-
"Harness": "Harness",
|
|
54
|
-
"Parent session": "父会话",
|
|
55
|
-
"Sub session": "子会话",
|
|
56
|
-
"Tool call": "工具调用",
|
|
57
|
-
"Started": "开始",
|
|
58
|
-
"Ended": "结束",
|
|
59
|
-
"Execution Flow": "执行流程",
|
|
60
|
-
"No execution flow captured": "未捕获执行流程",
|
|
61
|
-
"Native tool messages ({{count}})": "原生工具消息({{count}})",
|
|
62
|
-
"Session": "会话",
|
|
63
|
-
"Tool": "工具",
|
|
64
|
-
"Invoke": "调用",
|
|
65
|
-
"Content": "内容",
|
|
66
|
-
"No native tool messages": "暂无原生工具消息",
|
|
67
|
-
"Native messages ({{count}})": "原生消息({{count}})",
|
|
68
|
-
"No native messages loaded": "未加载原生消息",
|
|
69
|
-
"Monitor metadata": "监控元数据",
|
|
70
|
-
"Result": "结果",
|
|
71
|
-
"Tag": "标签",
|
|
72
|
-
"Title": "标题",
|
|
73
|
-
"Settings": "设置",
|
|
74
|
-
"Actions": "操作",
|
|
75
|
-
"Edit": "编辑",
|
|
76
|
-
"Delete this profile?": "删除此配置?",
|
|
77
|
-
"Delete": "删除",
|
|
78
|
-
"Policy profiles control native observation, memory scopes, and tracing retention.": "策略配置控制原生观测、记忆范围和追踪保留时间。",
|
|
79
|
-
"New Policy": "新建策略",
|
|
80
|
-
"Edit Policy Profile": "编辑策略配置",
|
|
81
|
-
"New Policy Profile": "新建策略配置",
|
|
82
|
-
"Cancel": "取消",
|
|
83
|
-
"Save": "保存",
|
|
84
|
-
"Tag is required": "标签必填",
|
|
85
|
-
"default": "default",
|
|
86
|
-
"Description": "描述",
|
|
87
|
-
"Settings JSON": "设置 JSON",
|
|
88
|
-
"Settings JSON is required": "设置 JSON 必填",
|
|
89
|
-
"Settings JSON is invalid: {{message}}": "设置 JSON 无效:{{message}}",
|
|
90
|
-
"Policy profile updated": "策略配置已更新",
|
|
91
|
-
"Policy profile created": "策略配置已创建",
|
|
92
|
-
"Save failed: {{message}}": "保存失败:{{message}}",
|
|
93
|
-
"Policy profile deleted": "策略配置已删除",
|
|
94
|
-
"Delete failed: {{message}}": "删除失败:{{message}}",
|
|
95
|
-
"unknown error": "未知错误",
|
|
96
|
-
"Agent Bindings": "智能体绑定",
|
|
97
|
-
"Knowledge Access": "知识库访问",
|
|
98
|
-
"Retrieval Trace": "检索追踪",
|
|
99
|
-
"Memory Inspector": "记忆检查器",
|
|
100
|
-
"Policy Profile": "策略配置",
|
|
101
|
-
"Agent binding updated": "智能体绑定已更新",
|
|
102
|
-
"Agent binding created": "智能体绑定已创建",
|
|
103
|
-
"Agent binding deleted": "智能体绑定已删除",
|
|
104
|
-
"Delete this binding?": "删除此绑定?",
|
|
105
|
-
"Bind each leader/sub-agent pair to the profile that controls memory and tracing policy.": "将每个主控/子智能体组合绑定到控制记忆和追踪策略的配置。",
|
|
106
|
-
"New Agent Binding": "新建智能体绑定",
|
|
107
|
-
"Edit Agent Binding": "编辑智能体绑定",
|
|
108
|
-
"Leader is required": "必须选择主控",
|
|
109
|
-
"Sub-agent is required": "必须选择子智能体",
|
|
110
|
-
"Policy profile is required": "必须选择策略配置",
|
|
111
|
-
"Select leader": "选择主控",
|
|
112
|
-
"Select sub-agent": "选择子智能体",
|
|
113
|
-
"Select policy profile": "选择策略配置",
|
|
114
|
-
"AI Employee": "AI 员工",
|
|
115
|
-
"Knowledge Base": "知识库",
|
|
116
|
-
"Assignment": "分配",
|
|
117
|
-
"Assigned": "已分配",
|
|
118
|
-
"Not assigned": "未分配",
|
|
119
|
-
"Agent access": "智能体访问",
|
|
120
|
-
"Allowed": "允许",
|
|
121
|
-
"Denied": "拒绝",
|
|
122
|
-
"Reason": "原因",
|
|
123
|
-
"Runtime user gate": "运行时用户条件",
|
|
124
|
-
"This matrix checks employee assignment and static agent policy. BASIC and SHARED user access is still evaluated when a run starts.": "此矩阵检查员工分配和静态智能体策略。BASIC 和 SHARED 用户访问权限仍会在运行开始时检查。",
|
|
125
|
-
"Show all": "显示全部",
|
|
126
|
-
"Show denied only": "仅显示拒绝项",
|
|
127
|
-
"Decision": "决定",
|
|
128
|
-
"Citations": "引用来源",
|
|
129
|
-
"Retrieval trace stores the decision, query, and safe source citations. It does not repeat raw RAG provider metadata.": "检索追踪保存决定、查询和安全的来源引用,不重复保存原始 RAG 提供方元数据。",
|
|
130
|
-
"Retrieval detail": "检索详情",
|
|
131
|
-
"Unknown source": "未知来源",
|
|
132
|
-
"No citations were returned": "未返回引用来源",
|
|
133
|
-
"Memory preview returned no data": "记忆预览没有返回数据",
|
|
134
|
-
"Memory preview failed": "记忆预览失败",
|
|
135
|
-
"Preview the exact memory context for a user and selected sub-agent before a run. Memory is marked as data, not executable instructions.": "在运行前预览用户和所选子智能体的准确记忆上下文。记忆被标记为数据,而非可执行指令。",
|
|
136
|
-
"User ID": "用户 ID",
|
|
137
|
-
"User
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"Git
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"Git
|
|
154
|
-
"
|
|
155
|
-
"Git
|
|
156
|
-
"
|
|
157
|
-
"{{count}}
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"No
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"Failed to load
|
|
170
|
-
|
|
1
|
+
{
|
|
2
|
+
"Agent Orchestrator": "智能体编排",
|
|
3
|
+
"Orchestration Rules": "编排规则",
|
|
4
|
+
"Native Monitor": "原生监控",
|
|
5
|
+
"Execution Tracing": "执行追踪",
|
|
6
|
+
"Agent Runs": "智能体运行",
|
|
7
|
+
"Native Agent Runs": "原生智能体运行",
|
|
8
|
+
"Harness Profiles": "Harness 配置",
|
|
9
|
+
"Policy Profiles": "策略配置",
|
|
10
|
+
"Skill Hub Definitions": "技能中心定义",
|
|
11
|
+
"Execution History": "执行历史",
|
|
12
|
+
"Skill Review Settings": "技能审核设置",
|
|
13
|
+
"Metrics": "指标",
|
|
14
|
+
"Swarm Tracing": "集群追踪",
|
|
15
|
+
"Leader (Orchestrator)": "主控(编排者)",
|
|
16
|
+
"Sub-Agent": "子智能体",
|
|
17
|
+
"Max Delegation Depth": "最大委派深度",
|
|
18
|
+
"Timeout (ms)": "超时时间(毫秒)",
|
|
19
|
+
"Enabled": "已启用",
|
|
20
|
+
"New Rule": "新建规则",
|
|
21
|
+
"Edit Orchestration Rule": "编辑编排规则",
|
|
22
|
+
"New Orchestration Rule": "新建编排规则",
|
|
23
|
+
"Rule created": "规则已创建",
|
|
24
|
+
"Rule updated": "规则已更新",
|
|
25
|
+
"Rule deleted": "规则已删除",
|
|
26
|
+
"Sub-Agent Conversation": "子智能体对话",
|
|
27
|
+
"Task Summary": "任务摘要",
|
|
28
|
+
"Parent Session": "父会话",
|
|
29
|
+
"No sub-agent executions yet": "暂无子智能体执行记录",
|
|
30
|
+
"Synced {{count}} native runs": "已同步 {{count}} 条原生运行",
|
|
31
|
+
"Sync failed": "同步失败",
|
|
32
|
+
"Time": "时间",
|
|
33
|
+
"Leader": "主控",
|
|
34
|
+
"Task": "任务",
|
|
35
|
+
"Status": "状态",
|
|
36
|
+
"Duration": "耗时",
|
|
37
|
+
"Context": "上下文",
|
|
38
|
+
"Detail": "详情",
|
|
39
|
+
"Native plugin-ai sub-agent dispatches captured by the orchestrator observer. Execution still runs through AIEmployee/SubAgentsDispatcher.": "由 orchestrator observer 捕获的 plugin-ai 原生子智能体派发。执行仍然通过 AIEmployee/SubAgentsDispatcher。",
|
|
40
|
+
"Any leader": "任意主控",
|
|
41
|
+
"Any sub-agent": "任意子智能体",
|
|
42
|
+
"Any status": "任意状态",
|
|
43
|
+
"Running": "运行中",
|
|
44
|
+
"Success": "成功",
|
|
45
|
+
"Error": "错误",
|
|
46
|
+
"Reset": "重置",
|
|
47
|
+
"Refresh": "刷新",
|
|
48
|
+
"Sync": "同步",
|
|
49
|
+
"{{count}} runs": "{{count}} 条运行",
|
|
50
|
+
"No runs match the current filters": "没有匹配当前筛选条件的运行",
|
|
51
|
+
"No native runs yet": "暂无原生运行",
|
|
52
|
+
"Native Run Detail": "原生运行详情",
|
|
53
|
+
"Harness": "Harness",
|
|
54
|
+
"Parent session": "父会话",
|
|
55
|
+
"Sub session": "子会话",
|
|
56
|
+
"Tool call": "工具调用",
|
|
57
|
+
"Started": "开始",
|
|
58
|
+
"Ended": "结束",
|
|
59
|
+
"Execution Flow": "执行流程",
|
|
60
|
+
"No execution flow captured": "未捕获执行流程",
|
|
61
|
+
"Native tool messages ({{count}})": "原生工具消息({{count}})",
|
|
62
|
+
"Session": "会话",
|
|
63
|
+
"Tool": "工具",
|
|
64
|
+
"Invoke": "调用",
|
|
65
|
+
"Content": "内容",
|
|
66
|
+
"No native tool messages": "暂无原生工具消息",
|
|
67
|
+
"Native messages ({{count}})": "原生消息({{count}})",
|
|
68
|
+
"No native messages loaded": "未加载原生消息",
|
|
69
|
+
"Monitor metadata": "监控元数据",
|
|
70
|
+
"Result": "结果",
|
|
71
|
+
"Tag": "标签",
|
|
72
|
+
"Title": "标题",
|
|
73
|
+
"Settings": "设置",
|
|
74
|
+
"Actions": "操作",
|
|
75
|
+
"Edit": "编辑",
|
|
76
|
+
"Delete this profile?": "删除此配置?",
|
|
77
|
+
"Delete": "删除",
|
|
78
|
+
"Policy profiles control native observation, memory scopes, and tracing retention.": "策略配置控制原生观测、记忆范围和追踪保留时间。",
|
|
79
|
+
"New Policy": "新建策略",
|
|
80
|
+
"Edit Policy Profile": "编辑策略配置",
|
|
81
|
+
"New Policy Profile": "新建策略配置",
|
|
82
|
+
"Cancel": "取消",
|
|
83
|
+
"Save": "保存",
|
|
84
|
+
"Tag is required": "标签必填",
|
|
85
|
+
"default": "default",
|
|
86
|
+
"Description": "描述",
|
|
87
|
+
"Settings JSON": "设置 JSON",
|
|
88
|
+
"Settings JSON is required": "设置 JSON 必填",
|
|
89
|
+
"Settings JSON is invalid: {{message}}": "设置 JSON 无效:{{message}}",
|
|
90
|
+
"Policy profile updated": "策略配置已更新",
|
|
91
|
+
"Policy profile created": "策略配置已创建",
|
|
92
|
+
"Save failed: {{message}}": "保存失败:{{message}}",
|
|
93
|
+
"Policy profile deleted": "策略配置已删除",
|
|
94
|
+
"Delete failed: {{message}}": "删除失败:{{message}}",
|
|
95
|
+
"unknown error": "未知错误",
|
|
96
|
+
"Agent Bindings": "智能体绑定",
|
|
97
|
+
"Knowledge Access": "知识库访问",
|
|
98
|
+
"Retrieval Trace": "检索追踪",
|
|
99
|
+
"Memory Inspector": "记忆检查器",
|
|
100
|
+
"Policy Profile": "策略配置",
|
|
101
|
+
"Agent binding updated": "智能体绑定已更新",
|
|
102
|
+
"Agent binding created": "智能体绑定已创建",
|
|
103
|
+
"Agent binding deleted": "智能体绑定已删除",
|
|
104
|
+
"Delete this binding?": "删除此绑定?",
|
|
105
|
+
"Bind each leader/sub-agent pair to the profile that controls memory and tracing policy.": "将每个主控/子智能体组合绑定到控制记忆和追踪策略的配置。",
|
|
106
|
+
"New Agent Binding": "新建智能体绑定",
|
|
107
|
+
"Edit Agent Binding": "编辑智能体绑定",
|
|
108
|
+
"Leader is required": "必须选择主控",
|
|
109
|
+
"Sub-agent is required": "必须选择子智能体",
|
|
110
|
+
"Policy profile is required": "必须选择策略配置",
|
|
111
|
+
"Select leader": "选择主控",
|
|
112
|
+
"Select sub-agent": "选择子智能体",
|
|
113
|
+
"Select policy profile": "选择策略配置",
|
|
114
|
+
"AI Employee": "AI 员工",
|
|
115
|
+
"Knowledge Base": "知识库",
|
|
116
|
+
"Assignment": "分配",
|
|
117
|
+
"Assigned": "已分配",
|
|
118
|
+
"Not assigned": "未分配",
|
|
119
|
+
"Agent access": "智能体访问",
|
|
120
|
+
"Allowed": "允许",
|
|
121
|
+
"Denied": "拒绝",
|
|
122
|
+
"Reason": "原因",
|
|
123
|
+
"Runtime user gate": "运行时用户条件",
|
|
124
|
+
"This matrix checks employee assignment and static agent policy. BASIC and SHARED user access is still evaluated when a run starts.": "此矩阵检查员工分配和静态智能体策略。BASIC 和 SHARED 用户访问权限仍会在运行开始时检查。",
|
|
125
|
+
"Show all": "显示全部",
|
|
126
|
+
"Show denied only": "仅显示拒绝项",
|
|
127
|
+
"Decision": "决定",
|
|
128
|
+
"Citations": "引用来源",
|
|
129
|
+
"Retrieval trace stores the decision, query, and safe source citations. It does not repeat raw RAG provider metadata.": "检索追踪保存决定、查询和安全的来源引用,不重复保存原始 RAG 提供方元数据。",
|
|
130
|
+
"Retrieval detail": "检索详情",
|
|
131
|
+
"Unknown source": "未知来源",
|
|
132
|
+
"No citations were returned": "未返回引用来源",
|
|
133
|
+
"Memory preview returned no data": "记忆预览没有返回数据",
|
|
134
|
+
"Memory preview failed": "记忆预览失败",
|
|
135
|
+
"Preview the exact memory context for a user and selected sub-agent before a run. Memory is marked as data, not executable instructions.": "在运行前预览用户和所选子智能体的准确记忆上下文。记忆被标记为数据,而非可执行指令。",
|
|
136
|
+
"User ID": "用户 ID",
|
|
137
|
+
"User": "用户",
|
|
138
|
+
"User is required": "必须选择用户",
|
|
139
|
+
"Select a user": "选择用户",
|
|
140
|
+
"User ID is required": "必须填写用户 ID",
|
|
141
|
+
"Build memory preview": "生成记忆预览",
|
|
142
|
+
"Final memory context": "最终记忆上下文",
|
|
143
|
+
"Character budget": "字符预算",
|
|
144
|
+
"Applied scopes": "已应用范围",
|
|
145
|
+
"None": "无",
|
|
146
|
+
"Failed to load metrics": "加载指标失败",
|
|
147
|
+
"No memory context matched this preview.": "没有匹配此预览的记忆上下文。",
|
|
148
|
+
"This Skill Hub Git import action does not allow the request method.": "此 Skill Hub Git 导入操作不允许该请求方法。",
|
|
149
|
+
"repositoryId and rootFolder are required": "必须提供 repositoryId 和 rootFolder。",
|
|
150
|
+
"repositoryId, rootFolder and skills[] are required": "必须提供 repositoryId、rootFolder 和 skills[]。",
|
|
151
|
+
"skills[] must contain non-empty string keys": "skills[] 必须只包含非空字符串键。",
|
|
152
|
+
"Git Manager is not enabled for Skill Hub imports.": "Git Manager 未启用,无法导入 Skill Hub。",
|
|
153
|
+
"Git Manager must support actor-aware content reads for Skill Hub imports.": "Git Manager 必须支持基于用户身份读取内容,才能导入 Skill Hub。",
|
|
154
|
+
"A valid user role context is required to import skills from Git Manager.": "从 Git Manager 导入技能需要有效的用户角色上下文。",
|
|
155
|
+
"Git Manager could not read the requested repository content.": "Git Manager 无法读取请求的仓库内容。",
|
|
156
|
+
"Selected skills are not listed in the explicit skills.json manifest: {{skills}}": "所选技能不在显式 skills.json 清单中:{{skills}}",
|
|
157
|
+
"Git skill contains more than {{count}} supplemental Markdown files.": "Git 技能包含超过 {{count}} 个补充 Markdown 文件。",
|
|
158
|
+
"Git skill contains a supplemental Markdown file with an invalid size.": "Git 技能包含大小无效的补充 Markdown 文件。",
|
|
159
|
+
"Git skill supplemental Markdown exceeds {{maxBytes}} bytes.": "Git 技能的补充 Markdown 超过 {{maxBytes}} 字节。",
|
|
160
|
+
"Depth": "深度",
|
|
161
|
+
"{{count}} executions": "{{count}} 次执行",
|
|
162
|
+
"No executions match the current filters": "没有符合当前筛选条件的执行记录",
|
|
163
|
+
"No delegation executions yet": "暂无委派执行记录",
|
|
164
|
+
"Execution Detail": "执行详情",
|
|
165
|
+
"No task description": "无任务描述",
|
|
166
|
+
"No result": "无结果",
|
|
167
|
+
"Skill execution #{{id}}": "技能执行 #{{id}}",
|
|
168
|
+
"Raw messages ({{count}})": "原始消息({{count}})",
|
|
169
|
+
"Failed to load execution detail": "加载执行详情失败",
|
|
170
|
+
"success": "成功",
|
|
171
|
+
"error": "错误",
|
|
172
|
+
"running": "运行中",
|
|
173
|
+
"Failed to load run detail": "加载运行详情失败",
|
|
174
|
+
"Version": "版本",
|
|
175
|
+
"Current version": "当前版本",
|
|
176
|
+
"Open draft": "待发布草稿",
|
|
177
|
+
"Settings draft": "设置草稿",
|
|
178
|
+
"Save draft": "保存草稿",
|
|
179
|
+
"Draft saved": "草稿已保存",
|
|
180
|
+
"Publish": "发布",
|
|
181
|
+
"Published": "已发布",
|
|
182
|
+
"Draft": "草稿",
|
|
183
|
+
"Version published": "版本已发布",
|
|
184
|
+
"Version history": "版本历史",
|
|
185
|
+
"Validate": "校验",
|
|
186
|
+
"Settings are valid": "设置有效",
|
|
187
|
+
"Settings are invalid": "设置无效",
|
|
188
|
+
"Create": "创建",
|
|
189
|
+
"Save details": "保存信息",
|
|
190
|
+
"Published at": "发布时间",
|
|
191
|
+
"Saving updates the open draft (or creates one). Publishing makes the draft the active version.": "保存会更新待发布草稿(若无则新建)。发布后草稿将成为生效版本。",
|
|
192
|
+
"Approvals": "审批",
|
|
193
|
+
"Pending": "待处理",
|
|
194
|
+
"All": "全部",
|
|
195
|
+
"Run": "运行",
|
|
196
|
+
"Type": "类型",
|
|
197
|
+
"Escalation": "权限升级",
|
|
198
|
+
"Requested": "请求时间",
|
|
199
|
+
"Expires": "过期时间",
|
|
200
|
+
"Review": "审核",
|
|
201
|
+
"Approve": "批准",
|
|
202
|
+
"Reject": "拒绝",
|
|
203
|
+
"Approved": "已批准",
|
|
204
|
+
"Rejected": "已拒绝",
|
|
205
|
+
"Expired": "已过期",
|
|
206
|
+
"Decision note": "决定备注",
|
|
207
|
+
"Edited input (optional)": "修改后的输入(可选)",
|
|
208
|
+
"Proposed input": "提议的输入",
|
|
209
|
+
"Approval recorded": "审批已记录",
|
|
210
|
+
"Decision failed: {{message}}": "决定失败:{{message}}",
|
|
211
|
+
"Edited input JSON is invalid: {{message}}": "修改后的输入 JSON 无效:{{message}}",
|
|
212
|
+
"Review approval": "审核审批",
|
|
213
|
+
"Tool calls and escalations that need a human decision before the run continues.": "运行继续前需要人工决定的工具调用和权限升级。",
|
|
214
|
+
"Approving sends this input to the tool instead of the proposed one.": "批准时将向工具发送此输入,替代提议的输入。",
|
|
215
|
+
"The approval window has expired. Retry the run to request approval again.": "审批窗口已过期。请重试运行以重新请求审批。",
|
|
216
|
+
"Skill": "技能",
|
|
217
|
+
"Total Runs": "总运行次数",
|
|
218
|
+
"Success Rate": "成功率",
|
|
219
|
+
"Failed": "失败",
|
|
220
|
+
"Timeout": "超时",
|
|
221
|
+
"Avg Duration (s)": "平均耗时(秒)",
|
|
222
|
+
"Metrics by Skill (Recent)": "按技能统计(近期)",
|
|
223
|
+
"Total Executions (Recent)": "总执行次数(近期)",
|
|
224
|
+
"Succeeded": "成功",
|
|
225
|
+
"Timeout/Canceled": "超时/已取消"
|
|
226
|
+
}
|
|
@@ -86,6 +86,14 @@ var agent_execution_spans_default = (0, import_database.defineCollection)({
|
|
|
86
86
|
type: "string",
|
|
87
87
|
length: 100
|
|
88
88
|
},
|
|
89
|
+
{
|
|
90
|
+
// Delegation depth of a sub-agent span: 1 for a sub-agent dispatched from a top-level
|
|
91
|
+
// conversation, parent depth + 1 below that. Persisted so a resumed child can never reset
|
|
92
|
+
// its depth, and the harness delegation.maxDepth cap is enforceable across restarts.
|
|
93
|
+
name: "depth",
|
|
94
|
+
type: "integer",
|
|
95
|
+
defaultValue: 0
|
|
96
|
+
},
|
|
89
97
|
{
|
|
90
98
|
name: "source",
|
|
91
99
|
type: "string",
|
|
@@ -48,6 +48,7 @@ var agent_loop_action_approvals_default = (0, import_database.defineCollection)(
|
|
|
48
48
|
{ name: "paths", type: "json", defaultValue: [] },
|
|
49
49
|
{ name: "policyDecision", type: "json", defaultValue: {} },
|
|
50
50
|
{ name: "reason", type: "text" },
|
|
51
|
+
{ name: "decisionNote", type: "text" },
|
|
51
52
|
{ name: "status", type: "string", length: 20, defaultValue: "pending" },
|
|
52
53
|
{ name: "requestedBy", type: "belongsTo", target: "users", foreignKey: "requestedById" },
|
|
53
54
|
{ name: "assignedToId", type: "bigInt" },
|
|
@@ -159,7 +159,13 @@ var agent_loop_runs_default = (0, import_database.defineCollection)({
|
|
|
159
159
|
type: "string",
|
|
160
160
|
length: 30,
|
|
161
161
|
defaultValue: "none",
|
|
162
|
-
comment: "none, pending, approved, rejected, changes_requested"
|
|
162
|
+
comment: "none, pending, decided, expired, approved, rejected, changes_requested"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "resumeContext",
|
|
166
|
+
type: "json",
|
|
167
|
+
allowNull: true,
|
|
168
|
+
comment: "Where an interrupted run must continue: role, username, session, message, reports so far."
|
|
163
169
|
},
|
|
164
170
|
{
|
|
165
171
|
name: "approvedBy",
|
|
@@ -97,6 +97,13 @@ var agent_loop_steps_default = (0, import_database.defineCollection)({
|
|
|
97
97
|
type: "string",
|
|
98
98
|
length: 200
|
|
99
99
|
},
|
|
100
|
+
{
|
|
101
|
+
// The AI conversation an invocation step drove; lets run-level guards (tool loop
|
|
102
|
+
// detection) enumerate every session belonging to the run.
|
|
103
|
+
name: "sessionId",
|
|
104
|
+
type: "uuid",
|
|
105
|
+
allowNull: true
|
|
106
|
+
},
|
|
100
107
|
{
|
|
101
108
|
name: "inputHash",
|
|
102
109
|
type: "string",
|
|
@@ -167,6 +167,14 @@ var skill_executions_default = {
|
|
|
167
167
|
target: "users",
|
|
168
168
|
foreignKey: "triggeredById"
|
|
169
169
|
},
|
|
170
|
+
{
|
|
171
|
+
// Harness-derived overrides resolved when the execution is queued, e.g.
|
|
172
|
+
// { timeoutSeconds, spillMaxInlineBytes }. The worker applies them on top of the skill's
|
|
173
|
+
// own defaults; storing them here keeps the worker from needing harness access.
|
|
174
|
+
name: "runtimePolicy",
|
|
175
|
+
type: "json",
|
|
176
|
+
allowNull: true
|
|
177
|
+
},
|
|
170
178
|
{
|
|
171
179
|
name: "createdAt",
|
|
172
180
|
type: "date"
|
package/dist/server/plugin.js
CHANGED
|
@@ -47,6 +47,7 @@ var import_tracing = require("./resources/tracing");
|
|
|
47
47
|
var import_agent_monitor = require("./resources/agent-monitor");
|
|
48
48
|
var import_agent_loop = require("./resources/agent-loop");
|
|
49
49
|
var import_agent_loop_approval = require("./resources/agent-loop-approval");
|
|
50
|
+
var import_agent_harness_profile = require("./resources/agent-harness-profile");
|
|
50
51
|
var import_agent_loop_artifact = require("./resources/agent-loop-artifact");
|
|
51
52
|
var import_agent_loop_events_stream = require("./resources/agent-loop-events-stream");
|
|
52
53
|
var import_agent_knowledge_insights = require("./resources/agent-knowledge-insights");
|
|
@@ -257,7 +258,7 @@ class PluginAgentOrchestratorServer extends import_server.Plugin {
|
|
|
257
258
|
["list", "get", "runNow", "pause", "resume", "cancel", "retry", "escalate", "acceptResult", "status"],
|
|
258
259
|
"loggedIn"
|
|
259
260
|
);
|
|
260
|
-
this.app.acl.allow("agentLoopApprovals", ["list", "get"], "loggedIn");
|
|
261
|
+
this.app.acl.allow("agentLoopApprovals", ["list", "get", "decide"], "loggedIn");
|
|
261
262
|
this.app.acl.allow("agentLoopArtifactsView", ["list", "get"], "loggedIn");
|
|
262
263
|
this.app.acl.allow("agentLoopEventsStream", ["stream"], "loggedIn");
|
|
263
264
|
this.app.resourceManager.use(
|
|
@@ -361,6 +362,7 @@ class PluginAgentOrchestratorServer extends import_server.Plugin {
|
|
|
361
362
|
(0, import_agent_loop_approval.registerAgentLoopApprovalResource)(this);
|
|
362
363
|
(0, import_agent_loop_artifact.registerAgentLoopArtifactResource)(this);
|
|
363
364
|
(0, import_agent_loop_events_stream.registerAgentLoopEventsStreamResource)(this);
|
|
365
|
+
(0, import_agent_harness_profile.registerAgentHarnessProfileResource)(this);
|
|
364
366
|
(0, import_agent_monitor.registerAgentMonitorResource)(this);
|
|
365
367
|
(0, import_agent_knowledge_insights.registerAgentKnowledgeInsightsResource)(this);
|
|
366
368
|
this.installNativeObserver();
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var agent_harness_profile_exports = {};
|
|
28
|
+
__export(agent_harness_profile_exports, {
|
|
29
|
+
registerAgentHarnessProfileResource: () => registerAgentHarnessProfileResource
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(agent_harness_profile_exports);
|
|
32
|
+
var import_HarnessProfileService = require("../services/HarnessProfileService");
|
|
33
|
+
var import_ctx_utils = require("../utils/ctx-utils");
|
|
34
|
+
var import_resource_helpers = require("./resource-helpers");
|
|
35
|
+
function registerAgentHarnessProfileResource(plugin) {
|
|
36
|
+
const service = new import_HarnessProfileService.HarnessProfileService(plugin.db);
|
|
37
|
+
plugin.app.resource({
|
|
38
|
+
name: "agentHarnessProfiles",
|
|
39
|
+
actions: {
|
|
40
|
+
async listVersions(ctx, next) {
|
|
41
|
+
try {
|
|
42
|
+
const profileId = ctx.action.params.filterByTk;
|
|
43
|
+
if (!profileId) ctx.throw(400, "profile id is required");
|
|
44
|
+
const rows = await plugin.db.getRepository("agentHarnessProfileVersions").find({
|
|
45
|
+
filter: { profileId },
|
|
46
|
+
sort: ["-version"]
|
|
47
|
+
});
|
|
48
|
+
ctx.body = { data: rows };
|
|
49
|
+
} catch (error) {
|
|
50
|
+
(0, import_resource_helpers.throwResourceError)(ctx, error);
|
|
51
|
+
}
|
|
52
|
+
await next();
|
|
53
|
+
},
|
|
54
|
+
async saveDraft(ctx, next) {
|
|
55
|
+
try {
|
|
56
|
+
const profileId = ctx.action.params.filterByTk;
|
|
57
|
+
if (!profileId) ctx.throw(400, "profile id is required");
|
|
58
|
+
const values = (0, import_ctx_utils.valuesFromCtx)(ctx);
|
|
59
|
+
ctx.body = {
|
|
60
|
+
data: await service.saveDraft({ profileId, settings: values.settings })
|
|
61
|
+
};
|
|
62
|
+
} catch (error) {
|
|
63
|
+
(0, import_resource_helpers.throwResourceError)(ctx, error);
|
|
64
|
+
}
|
|
65
|
+
await next();
|
|
66
|
+
},
|
|
67
|
+
async publish(ctx, next) {
|
|
68
|
+
try {
|
|
69
|
+
const actor = (0, import_resource_helpers.requestActor)(ctx);
|
|
70
|
+
const values = (0, import_ctx_utils.valuesFromCtx)(ctx);
|
|
71
|
+
const versionId = values.versionId ?? ctx.action.params.filterByTk;
|
|
72
|
+
if (!versionId) ctx.throw(400, "version id is required");
|
|
73
|
+
ctx.body = {
|
|
74
|
+
data: await service.publish(versionId, actor.userId)
|
|
75
|
+
};
|
|
76
|
+
} catch (error) {
|
|
77
|
+
(0, import_resource_helpers.throwResourceError)(ctx, error);
|
|
78
|
+
}
|
|
79
|
+
await next();
|
|
80
|
+
},
|
|
81
|
+
async createProfile(ctx, next) {
|
|
82
|
+
try {
|
|
83
|
+
const actor = (0, import_resource_helpers.requestActor)(ctx);
|
|
84
|
+
const values = (0, import_ctx_utils.valuesFromCtx)(ctx);
|
|
85
|
+
const result = await service.createProfile({
|
|
86
|
+
tag: typeof values.tag === "string" ? values.tag : "",
|
|
87
|
+
title: typeof values.title === "string" ? values.title : "",
|
|
88
|
+
description: typeof values.description === "string" ? values.description : "",
|
|
89
|
+
enabled: values.enabled !== false,
|
|
90
|
+
settings: values.settings,
|
|
91
|
+
publishedById: actor.userId
|
|
92
|
+
});
|
|
93
|
+
ctx.body = { data: result };
|
|
94
|
+
} catch (error) {
|
|
95
|
+
(0, import_resource_helpers.throwResourceError)(ctx, error);
|
|
96
|
+
}
|
|
97
|
+
await next();
|
|
98
|
+
},
|
|
99
|
+
async validate(ctx, next) {
|
|
100
|
+
try {
|
|
101
|
+
const values = (0, import_ctx_utils.valuesFromCtx)(ctx);
|
|
102
|
+
const result = service.validate(values.settings);
|
|
103
|
+
ctx.body = {
|
|
104
|
+
data: result.success ? { success: true, issues: [] } : { success: false, issues: result.error.issues.map((issue) => issue.message) }
|
|
105
|
+
};
|
|
106
|
+
} catch (error) {
|
|
107
|
+
(0, import_resource_helpers.throwResourceError)(ctx, error);
|
|
108
|
+
}
|
|
109
|
+
await next();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
115
|
+
0 && (module.exports = {
|
|
116
|
+
registerAgentHarnessProfileResource
|
|
117
|
+
});
|
|
@@ -190,9 +190,7 @@ function registerAgentKnowledgeInsightsResource(plugin) {
|
|
|
190
190
|
sort: ["username"],
|
|
191
191
|
appends: ["roles"]
|
|
192
192
|
});
|
|
193
|
-
const knowledgeBases = await ctx.db.getRepository("aiKnowledgeBases").find({
|
|
194
|
-
sort: ["name"]
|
|
195
|
-
});
|
|
193
|
+
const knowledgeBases = ctx.db.hasCollection("aiKnowledgeBases") ? await ctx.db.getRepository("aiKnowledgeBases").find({ sort: ["name"] }) : [];
|
|
196
194
|
ctx.body = { data: buildKnowledgeAccessMatrix(employees, knowledgeBases) };
|
|
197
195
|
await next();
|
|
198
196
|
},
|