@allbluecn/web-app 0.28.11 → 0.28.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.
- package/package.json +5 -5
- package/public/dev-gallery.html +19 -0
- package/src/__tests__/bench/baselines/format-timestamp.json +44 -0
- package/src/__typeprobe__.d.ts +4 -0
- package/src/components/harness/extension-panel/panels/terminal/__tests__/terminal-instance.test.tsx +93 -4
- package/src/components/harness/extension-panel/panels/terminal/sse-transport.ts +28 -5
- package/src/components/harness/extension-panel/panels/terminal/terminal-instance.tsx +53 -10
- package/src/components/harness/extension-panel/panels/terminal/transport.ts +10 -3
- package/src/components/harness/extension-panel/panels/terminal/ws-transport.ts +13 -2
- package/src/components/settings/harness/connectors-card.tsx +5 -0
- package/src/dev/gallery-entry.tsx +38 -0
- package/src/dev/gallery.tsx +610 -0
- package/src/lib/changelog/sdk-versions.ts +3 -3
- package/src/paraglide/README.md +1 -1
- package/src/paraglide/messages/_index.d.ts +9 -0
- package/src/paraglide/messages/_index.js +9 -0
- package/src/paraglide/messages/capabilities_webhook.d.ts +16 -0
- package/src/paraglide/messages/capabilities_webhook.js +29 -0
- package/src/paraglide/messages/capabilities_workflow.d.ts +16 -0
- package/src/paraglide/messages/capabilities_workflow.js +29 -0
- package/src/paraglide/messages/harness_panel_terminal_exitedrecycled1.d.ts +17 -0
- package/src/paraglide/messages/harness_panel_terminal_exitedrecycled1.js +30 -0
- package/src/paraglide/messages/harness_panel_terminal_restarted.d.ts +16 -0
- package/src/paraglide/messages/harness_panel_terminal_restarted.js +29 -0
- package/src/paraglide/messages/settings_harness_connectors_needsauth1.d.ts +17 -0
- package/src/paraglide/messages/settings_harness_connectors_needsauth1.js +30 -0
- package/src/paraglide/messages/settings_harness_ralphenabled1.d.ts +17 -0
- package/src/paraglide/messages/settings_harness_ralphenabled1.js +30 -0
- package/src/paraglide/messages/settings_harness_ralphenabled_description1.d.ts +17 -0
- package/src/paraglide/messages/settings_harness_ralphenabled_description1.js +30 -0
- package/src/paraglide/messages/settings_harness_ralphmaxrounds2.d.ts +17 -0
- package/src/paraglide/messages/settings_harness_ralphmaxrounds2.js +30 -0
- package/src/paraglide/messages/settings_harness_ralphmaxrounds_description2.d.ts +17 -0
- package/src/paraglide/messages/settings_harness_ralphmaxrounds_description2.js +30 -0
- package/src/routeTree.gen.ts +21 -0
- package/src/routes/api/harness/terminal/$.ts +32 -13
- package/src/routes/api/harness/terminal/__tests__/route.test.ts +41 -0
- package/src/routes/api/harness/webhook/$token.ts +23 -0
- package/src/routes/api/sync/__tests__/bootstrap.test.ts +32 -1
- package/src/routes/api/sync/bootstrap.ts +11 -0
- package/src/server/ai-gateway/durability/__tests__/sse-resume-frames.test.ts +123 -0
- package/src/server/harness/__tests__/agent-terminal-sandbox.test.ts +23 -4
- package/src/server/harness/__tests__/agent-terminal.server.test.ts +118 -2
- package/src/server/harness/__tests__/credentials.server.test.ts +25 -2
- package/src/server/harness/__tests__/host-schedule-worker.test.ts +43 -0
- package/src/server/harness/__tests__/runtime-without-providers.test.ts +11 -0
- package/src/server/harness/__tests__/sticky-route.test.ts +86 -0
- package/src/server/harness/__tests__/terminal-foreground.server.test.ts +80 -0
- package/src/server/harness/__tests__/terminal-manager.server.test.ts +75 -1
- package/src/server/harness/__tests__/tool-entitlements.test.ts +6 -2
- package/src/server/harness/agent-terminal.server.ts +25 -4
- package/src/server/harness/agents/__tests__/agent-control.test.ts +1 -0
- package/src/server/harness/agents/run-view.server.ts +55 -2
- package/src/server/harness/capabilities/__tests__/__snapshots__/matrix.test.ts.snap +92 -0
- package/src/server/harness/capabilities/__tests__/execution-plane-denials.test.ts +3 -1
- package/src/server/harness/capabilities/__tests__/p3-matrix.test.ts +3 -3
- package/src/server/harness/capabilities/__tests__/p5-matrix.test.ts +293 -0
- package/src/server/harness/capabilities/__tests__/validate.test.ts +8 -2
- package/src/server/harness/capabilities/execution-plane-denials.ts +9 -3
- package/src/server/harness/capabilities/manifests/agent-terminal.ts +3 -2
- package/src/server/harness/capabilities/manifests/webhook.ts +45 -0
- package/src/server/harness/capabilities/manifests/workflow.ts +40 -0
- package/src/server/harness/capabilities/registry.ts +4 -0
- package/src/server/harness/connectors/__tests__/connector-accounts.test.ts +22 -1
- package/src/server/harness/connectors/connector-accounts.server.ts +7 -0
- package/src/server/harness/credentials.server.ts +3 -1
- package/src/server/harness/define.server.ts +11 -0
- package/src/server/harness/mcp/mcp-config.server.ts +3 -1
- package/src/server/harness/outbox/outbox-dispatcher.server.ts +9 -0
- package/src/server/harness/outbox/outbox-store.server.ts +7 -0
- package/src/server/harness/persistence/__tests__/log-store.server.test.ts +4 -1
- package/src/server/harness/plugins/__tests__/tool-risk-audit.test.ts +5 -1
- package/src/server/harness/plugins/builtin/agent-terminal.plugin.ts +12 -2
- package/src/server/harness/providers/contracts.ts +16 -0
- package/src/server/harness/schedule/schedule-dispatcher.server.ts +3 -0
- package/src/server/harness/search/__tests__/indexer.test.ts +4 -1
- package/src/server/harness/search/__tests__/lifecycle.test.ts +4 -1
- package/src/server/harness/search/__tests__/search.test.ts +4 -1
- package/src/server/harness/sticky-route.server.ts +72 -0
- package/src/server/harness/terminal-foreground.server.ts +90 -0
- package/src/server/harness/terminal-manager.server.ts +78 -3
- package/src/server/harness/tool-entitlements.server.ts +5 -0
- package/src/server/harness/webhook/__tests__/body.test.ts +73 -0
- package/src/server/harness/webhook/__tests__/payload.test.ts +215 -0
- package/src/server/harness/webhook/__tests__/signature.test.ts +170 -0
- package/src/server/harness/webhook/__tests__/webhook-dispatcher.test.ts +212 -0
- package/src/server/harness/webhook/__tests__/webhook.plugin.test.ts +195 -0
- package/src/server/harness/webhook/__tests__/webhook.service.test.ts +354 -0
- package/src/server/harness/webhook/body.server.ts +56 -0
- package/src/server/harness/webhook/payload.server.ts +169 -0
- package/src/server/harness/webhook/signature.server.ts +118 -0
- package/src/server/harness/webhook/types.ts +57 -0
- package/src/server/harness/webhook/webhook-dispatcher.server.ts +495 -0
- package/src/server/harness/webhook/webhook-store.server.ts +115 -0
- package/src/server/harness/webhook/webhook.plugin.ts +273 -0
- package/src/server/harness/webhook/webhook.service.server.ts +577 -0
- package/src/server/harness/worker/__tests__/worker-http.test.ts +8 -1
- package/src/server/harness/worker/worker-health.server.ts +4 -1
- package/src/server/harness/worker/worker-runtime.server.ts +43 -1
- package/src/server/harness/workflow/__tests__/engine.test.ts +195 -0
- package/src/server/harness/workflow/__tests__/settings.test.ts +125 -0
- package/src/server/harness/workflow/__tests__/validate.test.ts +151 -0
- package/src/server/harness/workflow/engine.server.ts +155 -0
- package/src/server/harness/workflow/settings.ts +84 -0
- package/src/server/harness/workflow/store.server.ts +147 -0
- package/src/server/harness/workflow/types.ts +80 -0
- package/src/server/harness/workflow/validate.ts +130 -0
- package/src/server/harness/workflow/workflow.plugin.ts +261 -0
- package/src/server/serverFns/harness/__tests__/fork-thread.test.ts +14 -1
- package/src/server/serverFns/harness/fork-thread.ts +17 -0
|
@@ -252,6 +252,29 @@ exports[`capability matrix snapshot > desktop 能力矩阵快照稳定 1`] = `
|
|
|
252
252
|
"team_task_update",
|
|
253
253
|
],
|
|
254
254
|
},
|
|
255
|
+
{
|
|
256
|
+
"available": true,
|
|
257
|
+
"id": "workflow",
|
|
258
|
+
"missingProviders": [],
|
|
259
|
+
"tools": [
|
|
260
|
+
"workflow_start",
|
|
261
|
+
"workflow_list",
|
|
262
|
+
"workflow_view",
|
|
263
|
+
"workflow_cancel",
|
|
264
|
+
],
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"available": true,
|
|
268
|
+
"id": "webhook",
|
|
269
|
+
"missingProviders": [],
|
|
270
|
+
"tools": [
|
|
271
|
+
"webhook_create",
|
|
272
|
+
"webhook_list",
|
|
273
|
+
"webhook_view",
|
|
274
|
+
"webhook_edit",
|
|
275
|
+
"webhook_delete",
|
|
276
|
+
],
|
|
277
|
+
},
|
|
255
278
|
{
|
|
256
279
|
"available": true,
|
|
257
280
|
"id": "agents",
|
|
@@ -524,6 +547,29 @@ exports[`capability matrix snapshot > oss-web 能力矩阵快照稳定 1`] = `
|
|
|
524
547
|
"team_task_update",
|
|
525
548
|
],
|
|
526
549
|
},
|
|
550
|
+
{
|
|
551
|
+
"available": true,
|
|
552
|
+
"id": "workflow",
|
|
553
|
+
"missingProviders": [],
|
|
554
|
+
"tools": [
|
|
555
|
+
"workflow_start",
|
|
556
|
+
"workflow_list",
|
|
557
|
+
"workflow_view",
|
|
558
|
+
"workflow_cancel",
|
|
559
|
+
],
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"available": true,
|
|
563
|
+
"id": "webhook",
|
|
564
|
+
"missingProviders": [],
|
|
565
|
+
"tools": [
|
|
566
|
+
"webhook_create",
|
|
567
|
+
"webhook_list",
|
|
568
|
+
"webhook_view",
|
|
569
|
+
"webhook_edit",
|
|
570
|
+
"webhook_delete",
|
|
571
|
+
],
|
|
572
|
+
},
|
|
527
573
|
{
|
|
528
574
|
"available": true,
|
|
529
575
|
"id": "agents",
|
|
@@ -805,6 +851,29 @@ exports[`capability matrix snapshot > saas 能力矩阵快照稳定 1`] = `
|
|
|
805
851
|
"team_task_update",
|
|
806
852
|
],
|
|
807
853
|
},
|
|
854
|
+
{
|
|
855
|
+
"available": true,
|
|
856
|
+
"id": "workflow",
|
|
857
|
+
"missingProviders": [],
|
|
858
|
+
"tools": [
|
|
859
|
+
"workflow_start",
|
|
860
|
+
"workflow_list",
|
|
861
|
+
"workflow_view",
|
|
862
|
+
"workflow_cancel",
|
|
863
|
+
],
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"available": true,
|
|
867
|
+
"id": "webhook",
|
|
868
|
+
"missingProviders": [],
|
|
869
|
+
"tools": [
|
|
870
|
+
"webhook_create",
|
|
871
|
+
"webhook_list",
|
|
872
|
+
"webhook_view",
|
|
873
|
+
"webhook_edit",
|
|
874
|
+
"webhook_delete",
|
|
875
|
+
],
|
|
876
|
+
},
|
|
808
877
|
{
|
|
809
878
|
"available": true,
|
|
810
879
|
"id": "agents",
|
|
@@ -1087,6 +1156,29 @@ exports[`capability matrix snapshot > self-hosted 能力矩阵快照稳定 1`] =
|
|
|
1087
1156
|
"team_task_update",
|
|
1088
1157
|
],
|
|
1089
1158
|
},
|
|
1159
|
+
{
|
|
1160
|
+
"available": true,
|
|
1161
|
+
"id": "workflow",
|
|
1162
|
+
"missingProviders": [],
|
|
1163
|
+
"tools": [
|
|
1164
|
+
"workflow_start",
|
|
1165
|
+
"workflow_list",
|
|
1166
|
+
"workflow_view",
|
|
1167
|
+
"workflow_cancel",
|
|
1168
|
+
],
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"available": true,
|
|
1172
|
+
"id": "webhook",
|
|
1173
|
+
"missingProviders": [],
|
|
1174
|
+
"tools": [
|
|
1175
|
+
"webhook_create",
|
|
1176
|
+
"webhook_list",
|
|
1177
|
+
"webhook_view",
|
|
1178
|
+
"webhook_edit",
|
|
1179
|
+
"webhook_delete",
|
|
1180
|
+
],
|
|
1181
|
+
},
|
|
1090
1182
|
{
|
|
1091
1183
|
"available": true,
|
|
1092
1184
|
"id": "agents",
|
|
@@ -93,9 +93,11 @@ describe('EXECUTION_PLANE_DENIALS 账本(P3.5 任务 1)', () => {
|
|
|
93
93
|
reason: 'deferred-coding-agents-need-cli-and-oauth',
|
|
94
94
|
revisit: 'P4+',
|
|
95
95
|
})
|
|
96
|
+
// agent-terminal 的 P5 窗口已用掉(P5 任务 9 结案):reason 不变,revisit 改 '—'
|
|
97
|
+
// (缺席是终态,不再排期)——PTY 不可远程化,终端增强只落本地三端。
|
|
96
98
|
expect(denialOf('agent-terminal')).toMatchObject({
|
|
97
99
|
reason: 'pty-belongs-to-p5-terminal',
|
|
98
|
-
revisit: '
|
|
100
|
+
revisit: '—',
|
|
99
101
|
})
|
|
100
102
|
})
|
|
101
103
|
|
|
@@ -546,15 +546,15 @@ describe('七个新错误码汇总(fail-closed 路径与稳定错误码)', (
|
|
|
546
546
|
// ── manifest 登记计数(执行日实测并集落值,复审 C-F12) ─────────────────────────
|
|
547
547
|
|
|
548
548
|
describe('manifest 登记计数(执行日实测并集落值)', () => {
|
|
549
|
-
it('全 manifest 工具名并集 =
|
|
549
|
+
it('全 manifest 工具名并集 = 90 键(P4 任务 26 执行日 computer-use 三工具 + P5 任务 1 workflow 四工具 + P5 任务 3 webhook 五工具),与风险索引同源', () => {
|
|
550
550
|
// 执行日实测:`grep -rn "name:" apps/web/src/server/harness/capabilities/manifests/`
|
|
551
|
-
// 工具名并集
|
|
551
|
+
// 工具名并集 90(P3.5 任务 11 落值 78 + P4 任务 26 三窗口工具 + P5 任务 1 workflow 四工具 + P5 任务 3 webhook 五工具),与
|
|
552
552
|
// HARNESS_TOOL_RISK 键数一致。
|
|
553
553
|
// 工具增删必须先改 manifest 再回填本值。
|
|
554
554
|
const names = CAPABILITY_REGISTRY.flatMap((manifest) =>
|
|
555
555
|
manifest.tools.map((tool) => tool.name),
|
|
556
556
|
)
|
|
557
|
-
expect(new Set(names).size, 'manifest 工具名并集').toBe(
|
|
557
|
+
expect(new Set(names).size, 'manifest 工具名并集').toBe(90)
|
|
558
558
|
// 登记与风险派生单一来源:兼容桥(legacy 消费面)键集合与 manifest 并集零漂移。
|
|
559
559
|
expect(Object.keys(getDeclaredHarnessToolRisk()).sort()).toEqual([...new Set(names)].sort())
|
|
560
560
|
})
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
// @vitest-environment node
|
|
5
|
+
//
|
|
6
|
+
// P5 四端矩阵与 conformance 汇总(任务 9)。
|
|
7
|
+
//
|
|
8
|
+
// 职责与 p3-matrix 同:**汇总断言一处全**——P5 各任务(workflow / Ralph / webhook /
|
|
9
|
+
// 终端增强 / 会话同步 / 顺延项)在 oss-web / self-hosted / saas / desktop 四部署下的
|
|
10
|
+
// 就绪与缺席语义固化为可执行断言;各路径细节已有单测,这里导入同一实现做形态断言,
|
|
11
|
+
// 不重写单测。
|
|
12
|
+
//
|
|
13
|
+
// 「无一行沉默略过」在这份文件里的含义是三件事,缺一不可:
|
|
14
|
+
// 1. **能力行**:有 manifest 的(workflow / webhook / agent-terminal)逐端断言可用性
|
|
15
|
+
// + 工具名单精确相等(缺席即空集,不留假工具)。
|
|
16
|
+
// 2. **非能力行**:P5 有几件事**故意没有 manifest 行**(Ralph = workflow 的设置项、
|
|
17
|
+
// 会话同步 = 跨端数据面、auto-review = A3 顺延)。它们必须被**显式断言为「不存在
|
|
18
|
+
// 该行」**,否则「矩阵里没有它」和「忘了写它」在证据上不可区分。
|
|
19
|
+
// 3. **两条正交轴不许混**:部署轴(manifest.deployments)与执行世界轴
|
|
20
|
+
// (EXECUTION_PLANE_DENIALS)是两件事。终端就是典型:部署轴四端全绿,执行世界轴
|
|
21
|
+
// 云端缺席(PTY 不可远程化)。只测一条轴会得出相反结论。
|
|
22
|
+
|
|
23
|
+
import { describe, expect, it } from 'vitest'
|
|
24
|
+
|
|
25
|
+
import {
|
|
26
|
+
availableTools,
|
|
27
|
+
capabilityAvailability,
|
|
28
|
+
computeAvailability,
|
|
29
|
+
type HarnessDeployment,
|
|
30
|
+
type UnavailableReason,
|
|
31
|
+
} from '../availability'
|
|
32
|
+
import { CAPABILITY_REGISTRY } from '../registry'
|
|
33
|
+
import { PROVIDER_IDS, type ProviderId } from '../types'
|
|
34
|
+
import { EXECUTION_PLANE_DENIALS } from '../execution-plane-denials'
|
|
35
|
+
import { deriveMatrixMarkdown } from '../matrix-doc'
|
|
36
|
+
import { agentTerminalManifest } from '../manifests/agent-terminal'
|
|
37
|
+
import { webhookManifest } from '../manifests/webhook'
|
|
38
|
+
import { workflowManifest } from '../manifests/workflow'
|
|
39
|
+
import {
|
|
40
|
+
RALPH_ENABLED_SETTING,
|
|
41
|
+
RALPH_MAX_ROUNDS_SETTING,
|
|
42
|
+
WORKFLOW_SETTINGS,
|
|
43
|
+
} from '../../workflow/settings'
|
|
44
|
+
import { RALPH_DEFAULT_ROUNDS, RALPH_MAX_ROUNDS_CEILING } from '../../workflow/types'
|
|
45
|
+
|
|
46
|
+
const DEPLOYMENTS: ReadonlyArray<HarnessDeployment> = ['oss-web', 'self-hosted', 'saas', 'desktop']
|
|
47
|
+
|
|
48
|
+
type ProviderLookup = ReadonlySet<ProviderId>
|
|
49
|
+
|
|
50
|
+
const ALL_PROVIDERS: ProviderLookup = new Set(PROVIDER_IDS)
|
|
51
|
+
|
|
52
|
+
function availabilityFor(deployment: HarnessDeployment, providers: ProviderLookup = ALL_PROVIDERS) {
|
|
53
|
+
return computeAvailability({
|
|
54
|
+
deployment,
|
|
55
|
+
providers,
|
|
56
|
+
hostEnabled: deployment !== 'oss-web',
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
type ExpectedCell = { available: boolean; reason?: UnavailableReason }
|
|
61
|
+
|
|
62
|
+
const OK: ExpectedCell = { available: true }
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* P5 能力行 × 四端(manifest 层,全 Provider 在场)。
|
|
66
|
+
*
|
|
67
|
+
* 三行全部四端就绪是**有意的**结论,不是漏填:
|
|
68
|
+
* - workflow:编排经官方 subagent 派发,阶段脚本走 PTC(进程内 QuickJS isolate),
|
|
69
|
+
* 都不依赖执行平面 Provider;
|
|
70
|
+
* - webhook:规则定义是跨会话投影(同步白名单),接收端点四端各有形态(SaaS/自托管/
|
|
71
|
+
* OSS 走 HTTP 路由、桌面走 embedded Worker 端口);真正的依赖是 scheduler,见下一组用例;
|
|
72
|
+
* - agent-terminal:四端都能开本地终端(部署轴);云**执行世界**的缺席是另一条轴。
|
|
73
|
+
*/
|
|
74
|
+
const P5_MATRIX_GRID: Record<string, Record<HarnessDeployment, ExpectedCell>> = {
|
|
75
|
+
workflow: { 'oss-web': OK, 'self-hosted': OK, saas: OK, desktop: OK },
|
|
76
|
+
webhook: { 'oss-web': OK, 'self-hosted': OK, saas: OK, desktop: OK },
|
|
77
|
+
'agent-terminal': { 'oss-web': OK, 'self-hosted': OK, saas: OK, desktop: OK },
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
describe('P5 四端矩阵网格(能力行,无一行沉默略过)', () => {
|
|
81
|
+
it.each(DEPLOYMENTS)('%s:P5 三行落在预期网格,工具名单精确相等', (deployment) => {
|
|
82
|
+
const availability = availabilityFor(deployment)
|
|
83
|
+
for (const [id, row] of Object.entries(P5_MATRIX_GRID)) {
|
|
84
|
+
const expected = row[deployment]!
|
|
85
|
+
const entry = capabilityAvailability(availability, id)
|
|
86
|
+
expect(entry, `${id} @ ${deployment}`).toBeDefined()
|
|
87
|
+
expect(entry!.available, `${id} @ ${deployment}`).toBe(expected.available)
|
|
88
|
+
expect(entry!.reason ?? undefined, `${id} @ ${deployment}`).toBe(expected.reason)
|
|
89
|
+
}
|
|
90
|
+
// 工具名单精确相等:模型看到的就是 manifest 登记的那几个,多一个少一个都算缺陷。
|
|
91
|
+
expect(capabilityAvailability(availability, 'workflow')!.tools).toEqual([
|
|
92
|
+
'workflow_start', 'workflow_list', 'workflow_view', 'workflow_cancel',
|
|
93
|
+
])
|
|
94
|
+
expect(capabilityAvailability(availability, 'webhook')!.tools).toEqual([
|
|
95
|
+
'webhook_create', 'webhook_list', 'webhook_view', 'webhook_edit', 'webhook_delete',
|
|
96
|
+
])
|
|
97
|
+
expect(capabilityAvailability(availability, 'agent-terminal')!.tools).toEqual([
|
|
98
|
+
'terminal_open', 'terminal_send', 'terminal_read', 'terminal_signal', 'terminal_close',
|
|
99
|
+
'terminal_list', 'user_terminal_read', 'user_terminal_list',
|
|
100
|
+
])
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 计数断言:**2026-11-28 执行日实测**(不是估的)。
|
|
105
|
+
*
|
|
106
|
+
* 这几个数字会随能力增长而变,所以它们的作用不是「永远为真」,而是**变更时必须显式
|
|
107
|
+
* 改这里**——顺手提醒去跑 `pnpm matrix:gen` 重写文档、核对快照,并把新行补进本文的
|
|
108
|
+
* P5_MATRIX_GRID 或 p3-matrix 的网格。数字变了却没人改这里,就说明有人加了能力但
|
|
109
|
+
* 没进矩阵。
|
|
110
|
+
*/
|
|
111
|
+
it('计数断言(2026-11-28 实测):31 能力 / 90 工具;四端 75/86/84/90 工具、25/29/27/31 能力', () => {
|
|
112
|
+
expect(CAPABILITY_REGISTRY).toHaveLength(31)
|
|
113
|
+
const tools = CAPABILITY_REGISTRY.flatMap((manifest) => manifest.tools.map((tool) => tool.name))
|
|
114
|
+
expect(tools).toHaveLength(90)
|
|
115
|
+
// 同名工具跨能力重复登记会让「工具名 → 风险/权益」的查表出现歧义。
|
|
116
|
+
expect(new Set(tools).size).toBe(90)
|
|
117
|
+
|
|
118
|
+
const measured = DEPLOYMENTS.map((deployment) => {
|
|
119
|
+
const availability = availabilityFor(deployment)
|
|
120
|
+
const availableCapabilities = CAPABILITY_REGISTRY.filter(
|
|
121
|
+
(manifest) => capabilityAvailability(availability, manifest.id)?.available,
|
|
122
|
+
)
|
|
123
|
+
return {
|
|
124
|
+
deployment,
|
|
125
|
+
tools: availableTools(availability).length,
|
|
126
|
+
capabilities: availableCapabilities.length,
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
expect(measured).toEqual([
|
|
130
|
+
{ deployment: 'oss-web', tools: 75, capabilities: 25 },
|
|
131
|
+
{ deployment: 'self-hosted', tools: 86, capabilities: 29 },
|
|
132
|
+
{ deployment: 'saas', tools: 84, capabilities: 27 },
|
|
133
|
+
{ deployment: 'desktop', tools: 90, capabilities: 31 },
|
|
134
|
+
])
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
describe('P5 缺席语义(依赖 Provider 时不留半成品接口)', () => {
|
|
139
|
+
/**
|
|
140
|
+
* webhook 声明 `requires: ['scheduler']` 且 `unavailable: 'absent'`:scheduler Provider
|
|
141
|
+
* 缺席时四端**一律整体缺席、工具集空**。
|
|
142
|
+
*
|
|
143
|
+
* 为什么必须是 absent 而不是 deny:投递一律经 harness_outbox 由 Worker 驱动,没有
|
|
144
|
+
* Worker 的部署里「能建规则」只是让用户白等——收不到任何投递。缺席即不可见,比
|
|
145
|
+
* 「建得成、永远不触发」诚实。
|
|
146
|
+
*/
|
|
147
|
+
it.each(DEPLOYMENTS)('%s:无 scheduler → webhook 整体缺席(reason=provider、工具空)', (deployment) => {
|
|
148
|
+
const entry = capabilityAvailability(availabilityFor(deployment, new Set<ProviderId>()), 'webhook')
|
|
149
|
+
expect(entry, `webhook @ ${deployment}`).toBeDefined()
|
|
150
|
+
expect(entry!.available).toBe(false)
|
|
151
|
+
expect(entry!.reason).toBe('provider')
|
|
152
|
+
expect(entry!.missingProviders).toEqual(['scheduler'])
|
|
153
|
+
expect(entry!.tools).toEqual([])
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* workflow 反过来:`requires` 为空 → **Provider 全缺席也照常可用**。编排面不直接碰
|
|
158
|
+
* 执行平面(阶段内调用的 workspace 类工具由各自能力负责),所以不能因为「没有
|
|
159
|
+
* scheduler/sandbox」就把编排判死。
|
|
160
|
+
*/
|
|
161
|
+
it.each(DEPLOYMENTS)('%s:无任何 Provider → workflow 仍可用(编排不依赖执行平面)', (deployment) => {
|
|
162
|
+
const entry = capabilityAvailability(availabilityFor(deployment, new Set<ProviderId>()), 'workflow')
|
|
163
|
+
expect(entry!.available).toBe(true)
|
|
164
|
+
expect(entry!.missingProviders).toEqual([])
|
|
165
|
+
expect(entry!.tools).toHaveLength(4)
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
it('manifest 声明自洽:webhook requires scheduler;workflow 四端且无 requires', () => {
|
|
169
|
+
expect(webhookManifest.requires).toEqual(['scheduler'])
|
|
170
|
+
expect(webhookManifest.unavailable).toBe('absent')
|
|
171
|
+
expect(webhookManifest.deployments).toEqual(DEPLOYMENTS)
|
|
172
|
+
expect(workflowManifest.requires).toEqual([])
|
|
173
|
+
expect(workflowManifest.unavailable).toBe('absent')
|
|
174
|
+
expect(workflowManifest.deployments).toEqual(DEPLOYMENTS)
|
|
175
|
+
expect(agentTerminalManifest.deployments).toEqual(DEPLOYMENTS)
|
|
176
|
+
})
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
describe('两条正交轴:部署轴 vs 执行世界轴(终端是典型)', () => {
|
|
180
|
+
/**
|
|
181
|
+
* 部署轴(上一组)说四端全绿;执行世界轴说云端缺席。**两个都对**,因为它们回答不同
|
|
182
|
+
* 问题:前者「这个部署形态里有这个能力吗」,后者「这个执行世界能执行它吗」。PTY 是
|
|
183
|
+
* 活进程,云世界没有可托管的宿主进程 → 装配期按插件名过滤,工具整体不挂载。
|
|
184
|
+
*
|
|
185
|
+
* P5 任务 9 顺带结案 `revisit`:P5 已交付本地三端终端增强(O2 stdin readiness /
|
|
186
|
+
* O3 前台进程组定向信号 / epoch 分流 / 多实例 sticky),云世界**不随之改变**——所以
|
|
187
|
+
* revisit 从 `'P5'` 改为 `'—'`(缺席是终态)。留着 `'P5'` 会让人以为 P5 之后云端
|
|
188
|
+
* 终端该有了,而它永远不会。
|
|
189
|
+
*/
|
|
190
|
+
it('agent-terminal:执行世界轴云端 absent + revisit 结案(—)', () => {
|
|
191
|
+
const denial = EXECUTION_PLANE_DENIALS.find((entry) => entry.id === 'agent-terminal')
|
|
192
|
+
expect(denial).toBeDefined()
|
|
193
|
+
expect(denial!.denialMode).toBe('absent')
|
|
194
|
+
expect(denial!.revisit).toBe('—')
|
|
195
|
+
expect(denial!.reason).toBe('pty-belongs-to-p5-terminal')
|
|
196
|
+
// 铁律 3:拒绝必须可引导(云世界用户要被告知去桌面客户端)。
|
|
197
|
+
expect(denial!.guidance).toBe('desktop')
|
|
198
|
+
// 缺席工具面与 manifest 工具面同源(8 个,逐个相等)。
|
|
199
|
+
expect([...denial!.tools]).toEqual(agentTerminalManifest.tools.map((tool) => tool.name))
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
it('执行世界的拒绝账本不含 workflow/webhook(它们是控制面能力,不是执行面)', () => {
|
|
203
|
+
const ids = EXECUTION_PLANE_DENIALS.map((denial) => denial.id as string)
|
|
204
|
+
expect(ids).not.toContain('workflow')
|
|
205
|
+
expect(ids).not.toContain('webhook')
|
|
206
|
+
})
|
|
207
|
+
})
|
|
208
|
+
|
|
209
|
+
describe('非能力行:显式断言「不存在该行」(否则与「忘了写」不可区分)', () => {
|
|
210
|
+
const ids = CAPABILITY_REGISTRY.map((manifest) => manifest.id)
|
|
211
|
+
const toolNames = CAPABILITY_REGISTRY.flatMap((manifest) => manifest.tools.map((tool) => tool.name))
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Ralph(任务 2)不是独立能力:它是 **workflow 的两个设置项**(opt-in 开关 + 线程级
|
|
215
|
+
* 轮数上限)。做成独立能力行会让「关掉 Ralph」看起来像「卸掉一个能力」,而实际语义是
|
|
216
|
+
* 「workflow 的 ralph 模式拒绝启动」(fail-closed,不静默降级为单轮)。
|
|
217
|
+
*/
|
|
218
|
+
it('Ralph:无独立能力行,语义落在 workflow 的 settings(默认 off / 硬上限)', () => {
|
|
219
|
+
expect(ids).not.toContain('ralph')
|
|
220
|
+
expect(toolNames.filter((name) => name.startsWith('ralph_'))).toEqual([])
|
|
221
|
+
// 设置与 manifest 同源(settings 面板直接枚举 manifest.settings)。
|
|
222
|
+
expect(workflowManifest.settings.map((setting) => setting.key)).toEqual([
|
|
223
|
+
'ralphEnabled',
|
|
224
|
+
'ralphMaxRounds',
|
|
225
|
+
])
|
|
226
|
+
expect(workflowManifest.settings).toEqual([...WORKFLOW_SETTINGS])
|
|
227
|
+
// opt-in:默认关闭,用户不显式打开就用不了 ralph 模式。
|
|
228
|
+
expect(RALPH_ENABLED_SETTING.default).toBe(false)
|
|
229
|
+
expect(RALPH_ENABLED_SETTING.section).toBe('orchestration')
|
|
230
|
+
expect(RALPH_MAX_ROUNDS_SETTING.default).toBe(RALPH_DEFAULT_ROUNDS)
|
|
231
|
+
expect(RALPH_MAX_ROUNDS_SETTING.max).toBe(RALPH_MAX_ROUNDS_CEILING)
|
|
232
|
+
})
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* 会话同步(任务 5)不是模型面能力:它没有工具、没有 prompt、不该出现在能力矩阵里。
|
|
236
|
+
* 它是**跨端数据面**——注册面(`SYNC_TABLES`,18 表)与推送拓扑由 sync-core 负责,
|
|
237
|
+
* 用「部署」这个维度去描述它是错的(同一台桌面既是拉端也是推端)。
|
|
238
|
+
*
|
|
239
|
+
* 这里只钉「矩阵里不该有它」这一半;18 表/拓扑顺序/excludedColumns 那半边在
|
|
240
|
+
* packages/sync-core 的单测里(registrations / push-topology / overlay-migration)。
|
|
241
|
+
*/
|
|
242
|
+
it('会话同步:无能力行(是跨端数据面,不是模型面工具)', () => {
|
|
243
|
+
for (const id of ['sync', 'session-sync', 'sessions-sync', 'cross-device-sync']) {
|
|
244
|
+
expect(ids, id).not.toContain(id)
|
|
245
|
+
}
|
|
246
|
+
expect(toolNames.filter((name) => /sync/.test(name))).toEqual([])
|
|
247
|
+
})
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* auto-review(任务 6,A3 顺延):官方 0.4.0 无 decide/score/boolean 评审 API,按纪律
|
|
251
|
+
* 不自研,故**不留空能力行**——空行会让人以为「已立项但未实现」,而它连立项条件都
|
|
252
|
+
* 没满足。判据固化在 docs/superpowers/specs/2026-11-28-auto-review-a3-deferral.md。
|
|
253
|
+
*/
|
|
254
|
+
it('auto-review:A3 顺延,矩阵不留假行(无 review 能力/工具)', () => {
|
|
255
|
+
expect(ids.filter((id) => /review/i.test(id))).toEqual([])
|
|
256
|
+
expect(toolNames.filter((name) => /review/i.test(name))).toEqual([])
|
|
257
|
+
})
|
|
258
|
+
})
|
|
259
|
+
|
|
260
|
+
describe('矩阵文档与快照一致(pnpm matrix:gen 的产物可被断言)', () => {
|
|
261
|
+
const markdown = deriveMatrixMarkdown()
|
|
262
|
+
|
|
263
|
+
it('每个能力都在文档里有一行,且四端单元格无「—」(无沉默略过)', () => {
|
|
264
|
+
for (const manifest of CAPABILITY_REGISTRY) {
|
|
265
|
+
const row = markdown.split('\n').find((line) => line.startsWith(`| ${manifest.id} |`))
|
|
266
|
+
expect(row, manifest.id).toBeDefined()
|
|
267
|
+
// 单元格只能是 ✅ 或 ❌ <reason>;出现 '—' 就是 availability 没算出条目。
|
|
268
|
+
expect(row, manifest.id).not.toMatch(/\| — \|/)
|
|
269
|
+
expect(row, manifest.id).toMatch(/\| ✅ \||\| ❌ (deployment|provider|host) /)
|
|
270
|
+
}
|
|
271
|
+
// 能力表行数 = 表头 1 行 + 能力行(分隔行 '|---|' 已排除);多/少都说明生成结果被手改。
|
|
272
|
+
const capabilitySection = markdown.slice(0, markdown.indexOf('## 商业 adapter'))
|
|
273
|
+
const capabilityRows = capabilitySection
|
|
274
|
+
.split('\n')
|
|
275
|
+
.filter((line) => line.startsWith('| ') && !line.startsWith('|---'))
|
|
276
|
+
expect(capabilityRows.length).toBe(1 + CAPABILITY_REGISTRY.length)
|
|
277
|
+
})
|
|
278
|
+
|
|
279
|
+
it('P5 三行在文档里,且 webhook/agent-terminal 的缺席/结案在文档中可见', () => {
|
|
280
|
+
for (const id of ['workflow', 'webhook', 'agent-terminal']) {
|
|
281
|
+
expect(markdown).toContain(`| ${id} |`)
|
|
282
|
+
}
|
|
283
|
+
// 执行平面政策小节里,终端缺席是结案状态('—')且说明写着「终态/不可远程化」。
|
|
284
|
+
const section = markdown.slice(markdown.indexOf('## SaaS 执行平面政策(拒绝与缺席)'))
|
|
285
|
+
expect(section).toContain('| agent-terminal |')
|
|
286
|
+
expect(section).toMatch(/agent-terminal \| absent \| pty-belongs-to-p5-terminal \| — \|/)
|
|
287
|
+
expect(section).toContain('不可远程化')
|
|
288
|
+
})
|
|
289
|
+
|
|
290
|
+
it('文档无未替换的占位(undefined / TODO / TBD)', () => {
|
|
291
|
+
expect(markdown).not.toMatch(/undefined|TODO|TBD/)
|
|
292
|
+
})
|
|
293
|
+
})
|
|
@@ -29,6 +29,8 @@ import { forgeManifest } from '../manifests/forge'
|
|
|
29
29
|
import { mcpManifest } from '../manifests/mcp'
|
|
30
30
|
import { goalManifest } from '../manifests/goal'
|
|
31
31
|
import { teamManifest } from '../manifests/team'
|
|
32
|
+
import { webhookManifest } from '../manifests/webhook'
|
|
33
|
+
import { workflowManifest } from '../manifests/workflow'
|
|
32
34
|
import { agentsManifest } from '../manifests/agents'
|
|
33
35
|
import { coreHarnessManifest } from '../manifests/core-harness'
|
|
34
36
|
import { deliverablesManifest } from '../manifests/deliverables'
|
|
@@ -250,6 +252,8 @@ describe('Harness capability registry assembly(P3.5 任务 6:存量工具迁
|
|
|
250
252
|
'mcp',
|
|
251
253
|
'goal',
|
|
252
254
|
'team',
|
|
255
|
+
'workflow',
|
|
256
|
+
'webhook',
|
|
253
257
|
'agents',
|
|
254
258
|
'deliverables',
|
|
255
259
|
'question',
|
|
@@ -260,9 +264,9 @@ describe('Harness capability registry assembly(P3.5 任务 6:存量工具迁
|
|
|
260
264
|
expect(getDeclaredHarnessToolRisk([])).toEqual({})
|
|
261
265
|
})
|
|
262
266
|
|
|
263
|
-
it('keeps the compatibility export as an exact
|
|
267
|
+
it('keeps the compatibility export as an exact 90-key risk record', () => {
|
|
264
268
|
expect(typeof HARNESS_TOOL_RISK).toBe('object')
|
|
265
|
-
expect(Object.keys(HARNESS_TOOL_RISK)).toHaveLength(
|
|
269
|
+
expect(Object.keys(HARNESS_TOOL_RISK)).toHaveLength(90)
|
|
266
270
|
expect(HARNESS_TOOL_RISK).toEqual({
|
|
267
271
|
...storyManifest.tools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.risk }), {}),
|
|
268
272
|
...bugManifest.tools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.risk }), {}),
|
|
@@ -281,6 +285,8 @@ describe('Harness capability registry assembly(P3.5 任务 6:存量工具迁
|
|
|
281
285
|
...Object.fromEntries(mcpManifest.tools.map((tool) => [tool.name, tool.risk])),
|
|
282
286
|
...Object.fromEntries(goalManifest.tools.map((tool) => [tool.name, tool.risk])),
|
|
283
287
|
...Object.fromEntries(teamManifest.tools.map((tool) => [tool.name, tool.risk])),
|
|
288
|
+
...Object.fromEntries(workflowManifest.tools.map((tool) => [tool.name, tool.risk])),
|
|
289
|
+
...Object.fromEntries(webhookManifest.tools.map((tool) => [tool.name, tool.risk])),
|
|
284
290
|
...Object.fromEntries(agentsManifest.tools.map((tool) => [tool.name, tool.risk])),
|
|
285
291
|
...Object.fromEntries(deliverablesManifest.tools.map((tool) => [tool.name, tool.risk])),
|
|
286
292
|
...Object.fromEntries(questionManifest.tools.map((tool) => [tool.name, tool.risk])),
|
|
@@ -47,7 +47,13 @@ export interface ExecutionPlaneDenial {
|
|
|
47
47
|
denialMode: ExecutionPlaneDenialMode
|
|
48
48
|
/** 人读原因(中文,进矩阵文档)。 */
|
|
49
49
|
note: string
|
|
50
|
-
|
|
50
|
+
/**
|
|
51
|
+
* 计划重访窗口:`P4+`/`P5` = 已排期待重访;`'—'` = **已重访并结案**(缺席是终态,
|
|
52
|
+
* 不再排期)。P5 任务 9 起 agent-terminal 归结案:P5 已交付本地三端终端增强
|
|
53
|
+
* (O2 stdin readiness / O3 前台进程组定向信号 / epoch 分流 + sticky),云执行
|
|
54
|
+
* 世界的终端缺席**不随之改变**——PTY 是活进程,不可远程化。
|
|
55
|
+
*/
|
|
56
|
+
revisit: 'P4+' | 'P5' | '—'
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
export type ExecutionPlaneDenialSummary = Pick<
|
|
@@ -185,8 +191,8 @@ export const EXECUTION_PLANE_DENIALS: readonly ExecutionPlaneDenial[] = [
|
|
|
185
191
|
reason: 'pty-belongs-to-p5-terminal',
|
|
186
192
|
guidance: 'desktop',
|
|
187
193
|
denialMode: 'absent',
|
|
188
|
-
note: 'agent 终端是 PTY
|
|
189
|
-
revisit: '
|
|
194
|
+
note: 'agent 终端是 PTY 长连接,云执行世界按装配期插件名过滤拒绝,并在 /healthz 与能力矩阵显式记录。P5 已重访结案:终端增强(O2/O3/epoch + 多实例 sticky)只落在本地三端,云端缺席是终态——PTY 不可远程化。',
|
|
195
|
+
revisit: '—',
|
|
190
196
|
},
|
|
191
197
|
]
|
|
192
198
|
|
|
@@ -45,8 +45,9 @@ export const agentTerminalManifest: CapabilityManifest = {
|
|
|
45
45
|
name: 'terminal_signal',
|
|
46
46
|
risk: 'read',
|
|
47
47
|
description:
|
|
48
|
-
'向 agent 终端发送信号。
|
|
49
|
-
'
|
|
48
|
+
'向 agent 终端发送信号。SIGINT/SIGTSTP 以控制字符送达(同用户按键);' +
|
|
49
|
+
'SIGTERM/SIGKILL/SIGHUP 只定向到前台命令的进程组,不波及 shell 与后台作业' +
|
|
50
|
+
'(前台无命令或探不到前台组时拒绝并引导 terminal_close)。',
|
|
50
51
|
},
|
|
51
52
|
{
|
|
52
53
|
name: 'terminal_close',
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
|
|
5
|
+
import type { CapabilityManifest } from '../types'
|
|
6
|
+
|
|
7
|
+
// webhook(P5 任务 3):入站触发器定义与投递。
|
|
8
|
+
//
|
|
9
|
+
// - deployments 四端全列:规则定义是跨会话投影(同步白名单),接收端点在
|
|
10
|
+
// SaaS / 自托管 / OSS 由 HTTP 路由提供,Desktop 由 embedded Worker 端口提供;
|
|
11
|
+
// 投递一律经 harness_outbox(kind='webhook.delivery')由 Worker 驱动。
|
|
12
|
+
// - requires ['scheduler']:投递依赖 outbox/Worker 基础设施(与 schedule 同源
|
|
13
|
+
// Provider)。Provider 缺席时整体缺席,不留「能建规则但无人投递」的半成品接口。
|
|
14
|
+
// - entitlement 不设:入站触发器属基础能力,无付费门控(计划裁决 10 预估一致)。
|
|
15
|
+
// - unavailable 'absent':能力缺席而非调用即拒(不暴露假端点)。
|
|
16
|
+
export const webhookManifest: CapabilityManifest = {
|
|
17
|
+
id: 'webhook',
|
|
18
|
+
version: 1,
|
|
19
|
+
i18nKey: 'capabilities.webhook',
|
|
20
|
+
tools: [
|
|
21
|
+
{
|
|
22
|
+
name: 'webhook_create',
|
|
23
|
+
risk: 'write',
|
|
24
|
+
description: '创建当前线程入站 webhook 触发器(必须配置 repo/owner 白名单)',
|
|
25
|
+
},
|
|
26
|
+
{ name: 'webhook_list', risk: 'read', description: '列出当前线程 webhook 触发器' },
|
|
27
|
+
{ name: 'webhook_view', risk: 'read', description: '查看当前线程 webhook 触发器' },
|
|
28
|
+
{ name: 'webhook_edit', risk: 'write', description: '编辑、暂停或恢复 webhook 触发器' },
|
|
29
|
+
{
|
|
30
|
+
name: 'webhook_delete',
|
|
31
|
+
risk: 'destructive',
|
|
32
|
+
description: '删除 webhook 触发器并取消待投递 delivery',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
commands: [],
|
|
36
|
+
prompts: [],
|
|
37
|
+
views: [],
|
|
38
|
+
settings: [],
|
|
39
|
+
risk: 'high',
|
|
40
|
+
events: [],
|
|
41
|
+
telemetry: [],
|
|
42
|
+
deployments: ['oss-web', 'self-hosted', 'saas', 'desktop'],
|
|
43
|
+
requires: ['scheduler'],
|
|
44
|
+
unavailable: 'absent',
|
|
45
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
|
|
5
|
+
// workflow(P5 任务 1):多阶段 DAG 编排 + Ralph 长跑。
|
|
6
|
+
//
|
|
7
|
+
// - deployments 四端全列:编排面经官方 subagent 派发,四端一致;阶段脚本走 PTC
|
|
8
|
+
// (进程内 QuickJS isolate,不在执行平面拒绝范围)。
|
|
9
|
+
// - requires 空:编排不直接依赖执行平面 Provider;阶段内调用的 workspace 类工具
|
|
10
|
+
// 由各自能力清单的 requires/账本负责,不在此重复声明。
|
|
11
|
+
// - entitlement customAgents:workflow 派发子代理,与 team/subagent 同口径复用
|
|
12
|
+
// 既有权益(HARNESS_TOOL_FEATURE_MAP 同步登记四工具)。
|
|
13
|
+
// - unavailable 'absent':Provider/宿主缺失时整体缺席,不返回假运行态。
|
|
14
|
+
// - settings 两项(P5 任务 2):Ralph opt-in 开关(默认 off)+ 线程级轮数上限;
|
|
15
|
+
// 落 orchestration 设置卡(与 entitlement customAgents 同卡的锁定语义一致)。
|
|
16
|
+
import { WORKFLOW_SETTINGS } from '../../workflow/settings'
|
|
17
|
+
import type { CapabilityManifest } from '../types'
|
|
18
|
+
|
|
19
|
+
export const workflowManifest: CapabilityManifest = {
|
|
20
|
+
id: 'workflow',
|
|
21
|
+
version: 1,
|
|
22
|
+
i18nKey: 'capabilities.workflow',
|
|
23
|
+
tools: [
|
|
24
|
+
{ name: 'workflow_start', risk: 'write', description: '启动多阶段 workflow(DAG)并按拓扑序推进' },
|
|
25
|
+
{ name: 'workflow_list', risk: 'read', description: '列出当前线程的 workflow 运行' },
|
|
26
|
+
{ name: 'workflow_view', risk: 'read', description: '读取单个 workflow 运行的阶段进度' },
|
|
27
|
+
{ name: 'workflow_cancel', risk: 'write', description: '取消一个 running 的 workflow' },
|
|
28
|
+
],
|
|
29
|
+
commands: [],
|
|
30
|
+
prompts: [],
|
|
31
|
+
views: [],
|
|
32
|
+
settings: [...WORKFLOW_SETTINGS],
|
|
33
|
+
risk: 'medium',
|
|
34
|
+
entitlement: 'customAgents',
|
|
35
|
+
events: ['workflow.changed'],
|
|
36
|
+
telemetry: [],
|
|
37
|
+
deployments: ['oss-web', 'self-hosted', 'saas', 'desktop'],
|
|
38
|
+
requires: [],
|
|
39
|
+
unavailable: 'absent',
|
|
40
|
+
}
|
|
@@ -28,6 +28,8 @@ import { computerUseManifest } from './manifests/computer-use'
|
|
|
28
28
|
import { forgeManifest } from './manifests/forge'
|
|
29
29
|
import { goalManifest } from './manifests/goal'
|
|
30
30
|
import { teamManifest } from './manifests/team'
|
|
31
|
+
import { webhookManifest } from './manifests/webhook'
|
|
32
|
+
import { workflowManifest } from './manifests/workflow'
|
|
31
33
|
import { agentsManifest } from './manifests/agents'
|
|
32
34
|
import { deliverablesManifest } from './manifests/deliverables'
|
|
33
35
|
import { questionManifest } from './manifests/question'
|
|
@@ -68,6 +70,8 @@ export const CAPABILITY_REGISTRY: CapabilityRegistry = [
|
|
|
68
70
|
mcpManifest,
|
|
69
71
|
goalManifest,
|
|
70
72
|
teamManifest,
|
|
73
|
+
workflowManifest,
|
|
74
|
+
webhookManifest,
|
|
71
75
|
agentsManifest,
|
|
72
76
|
deliverablesManifest,
|
|
73
77
|
questionManifest,
|