opencode-swarm 7.179.1 → 7.180.1
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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/agents/architect.d.ts +67 -0
- package/dist/agents/council-prompts.d.ts +3 -3
- package/dist/agents/index.d.ts +1 -1
- package/dist/background/pr-event-subscribers.d.ts +2 -0
- package/dist/background/pr-feedback-event-queue.d.ts +7 -0
- package/dist/background/pr-feedback-loop.d.ts +162 -0
- package/dist/cli/{coder-settlement-f1nmezzv.js → coder-settlement-b57917a3.js} +14 -14
- package/dist/cli/{config-doctor-ena2803f.js → config-doctor-ebat06eq.js} +2 -2
- package/dist/cli/{core-fcfzme3m.js → core-8k41qh0d.js} +4 -5
- package/dist/cli/{curation-policy-c7mdsf7m.js → curation-policy-m3x9mkj9.js} +7 -6
- package/dist/cli/{curator-q9s5q9v4.js → curator-8yb3qkxs.js} +45 -43
- package/dist/cli/{curator-drift-d93pwt8h.js → curator-drift-3av9hffm.js} +22 -12
- package/dist/cli/curator-llm-factory-htgqafq0.js +74 -0
- package/dist/cli/{evidence-summary-service-wtj8mkm6.js → evidence-summary-service-s258ea5t.js} +23 -21
- package/dist/cli/{gate-evidence-h83yb8nd.js → gate-evidence-fqxpf3xz.js} +9 -9
- package/dist/cli/guardrail-explain-r0qxa4zy.js +75 -0
- package/dist/cli/{guardrail-log-zf1htf1d.js → guardrail-log-j2wdmvmy.js} +7 -7
- package/dist/cli/{guardrail-reset-f2p198j3.js → guardrail-reset-wb2eqbvf.js} +45 -43
- package/dist/cli/hive-promoter-kxpc3r17.js +89 -0
- package/dist/cli/{index-wrt875kh.js → index-0725jpp7.js} +1 -1
- package/dist/cli/{index-34bwqcea.js → index-12ewkms0.js} +1 -1
- package/dist/cli/{index-epfjc1c1.js → index-2q5m4m2r.js} +11 -11
- package/dist/cli/{index-h59vsbch.js → index-38cfx8g8.js} +2 -2
- package/dist/cli/{index-xy7k7f3k.js → index-3bbjpbmn.js} +2 -2
- package/dist/cli/{index-vp9pn7sv.js → index-3zvp7t5d.js} +5 -5
- package/dist/cli/{index-dz12bshh.js → index-50v672wd.js} +8 -8
- package/dist/cli/{index-yfpswnjt.js → index-516j9vsk.js} +4 -4
- package/dist/cli/{index-w4c2repz.js → index-600aqfvm.js} +47 -43
- package/dist/cli/{index-0h3cr7pn.js → index-6gcxgx84.js} +1 -1
- package/dist/cli/{index-qt0793qm.js → index-6mwha20t.js} +3 -3
- package/dist/cli/{index-93nx95me.js → index-855qxtdm.js} +8 -7
- package/dist/cli/{index-cvg402ha.js → index-91dhg3wr.js} +2 -2
- package/dist/cli/{index-3pzwsesm.js → index-92m05mew.js} +2 -2
- package/dist/cli/{index-ne9zamcs.js → index-989v83pb.js} +1 -1
- package/dist/cli/{index-9fb01jk5.js → index-as4xaams.js} +1 -1
- package/dist/cli/{index-2b0ktpbf.js → index-bdpgfep1.js} +5 -5
- package/dist/cli/{index-q375xdcw.js → index-bhmrgbyv.js} +9 -1
- package/dist/cli/{index-nzekzzs2.js → index-bv4b8tpa.js} +5 -5
- package/dist/cli/{index-rb9jmj30.js → index-cj64vp08.js} +7 -7
- package/dist/cli/{index-549wxbe1.js → index-cjapb4hy.js} +1 -1
- package/dist/cli/{index-5d224akk.js → index-dzm5nfh7.js} +4 -4
- package/dist/cli/{index-f2v90gfc.js → index-ea9fk6v0.js} +25 -166
- package/dist/cli/index-ejhxgyvm.js +147 -0
- package/dist/cli/{index-n1tcj1q7.js → index-g062wnw1.js} +187 -47
- package/dist/cli/{index-s4bkey0q.js → index-gc6h1fmf.js} +4 -4
- package/dist/cli/{index-pn023bf9.js → index-gw5egd8j.js} +49 -47
- package/dist/cli/index-gx2vp8gx.js +100 -0
- package/dist/cli/{index-yp25bc9n.js → index-gy3tcmk4.js} +7 -7
- package/dist/cli/{index-n2wjrgcs.js → index-k5vwnnym.js} +7 -9
- package/dist/cli/{index-ajm7ebyd.js → index-k6f0nryj.js} +2 -2
- package/dist/cli/{index-zbhvr9st.js → index-n5carmk0.js} +8 -10
- package/dist/cli/{index-h4nh6s8b.js → index-nhxykfyy.js} +1 -1
- package/dist/cli/{index-pskba939.js → index-rejpbgxp.js} +1 -1
- package/dist/cli/{index-9s1xzvnn.js → index-rp4akjrm.js} +13 -3
- package/dist/cli/{index-g6nyk713.js → index-s0zgz4p1.js} +1 -1
- package/dist/cli/{index-aqpwm350.js → index-tnhk72rs.js} +3 -3
- package/dist/cli/{index-sj29n50e.js → index-v0par978.js} +7 -7
- package/dist/cli/index-v7fx8q3z.js +339 -0
- package/dist/cli/{index-a11ztzs5.js → index-vmthakz0.js} +1 -1
- package/dist/cli/{index-b567t0cr.js → index-wx3wz7ya.js} +10 -8
- package/dist/cli/{index-y98fvmb8.js → index-xd0e4amf.js} +33 -18
- package/dist/cli/{index-m1w40kfw.js → index-xj5z92qz.js} +4 -103
- package/dist/cli/{index-6r92fw88.js → index-y30y1rkg.js} +9 -9
- package/dist/cli/{index-pfg3jwe9.js → index-yf7tdhpz.js} +3 -3
- package/dist/cli/{index-y94vwx2q.js → index-z2xf153n.js} +13 -15
- package/dist/cli/{index-ky262b73.js → index-z2zrcecq.js} +1721 -902
- package/dist/cli/{index-zz7gzw57.js → index-zxdawwc7.js} +88 -4
- package/dist/cli/index.js +46 -44
- package/dist/cli/{knowledge-escalator-z6tkgrjq.js → knowledge-escalator-n30h6ran.js} +17 -16
- package/dist/cli/{knowledge-events-2bgefatz.js → knowledge-events-k2qqase2.js} +15 -14
- package/dist/cli/{knowledge-link-gfz47ves.js → knowledge-link-s2qs178z.js} +6 -5
- package/dist/cli/{knowledge-store-1fphg9sa.js → knowledge-store-zy226v5a.js} +7 -6
- package/dist/cli/{knowledge-validator-723h2vck.js → knowledge-validator-qgyxdpc9.js} +9 -8
- package/dist/cli/{mcp-xyswgya5.js → mcp-pj7acze3.js} +1 -1
- package/dist/cli/{pending-delegations-5zm19yvv.js → pending-delegations-sgnnyw55.js} +14 -13
- package/dist/cli/{pr-subscriptions-5hm6hzv6.js → pr-subscriptions-7fb7xm3q.js} +14 -13
- package/dist/cli/{pr-workflow-gate-48rzb2bh.js → pr-workflow-gate-5dqcrkz6.js} +47 -43
- package/dist/cli/{runner-16b691ba.js → runner-p9hstpxn.js} +7 -6
- package/dist/cli/{scan-cursor-m28tddrg.js → scan-cursor-jc7wwb7e.js} +9 -9
- package/dist/cli/{schema-jt9axyj6.js → schema-5k68crjb.js} +3 -1
- package/dist/cli/{scope-persistence-d0358pw7.js → scope-persistence-xeg4khwk.js} +19 -18
- package/dist/cli/{server-d5jxcbxz.js → server-ej6tzd7t.js} +53 -51
- package/dist/cli/{skill-generator-qanka67x.js → skill-generator-nspt9b3n.js} +19 -18
- package/dist/cli/{snapshot-coordination-init-mhrq11p8.js → snapshot-coordination-init-3rs3zpaa.js} +45 -43
- package/dist/cli/speckit-checkoff-dqf636ya.js +31 -0
- package/dist/cli/{telemetry-qxav5cdk.js → telemetry-zhcgfe70.js} +1 -1
- package/dist/cli/{workspace-snapshot-rfnn80dg.js → workspace-snapshot-4m2ex1ey.js} +4 -5
- package/dist/cli/{worktree-collision-ownership-ygdbpexh.js → worktree-collision-ownership-rbzgbvj4.js} +17 -17
- package/dist/cli/{worktree-isolation-4855f2az.js → worktree-isolation-6zpnzr70.js} +45 -43
- package/dist/commands/pr-feedback-loop.d.ts +1 -0
- package/dist/commands/registry.d.ts +10 -2
- package/dist/config/schema.d.ts +27 -0
- package/dist/council/disagreement-detector.d.ts +23 -1
- package/dist/council/general-council-service.d.ts +40 -3
- package/dist/failures/invocation-failure.d.ts +11 -0
- package/dist/hooks/delegation-tracker.d.ts +6 -1
- package/dist/hooks/pr-workflow-gate.d.ts +1 -1
- package/dist/hooks/system-enhancer.d.ts +4 -2
- package/dist/hooks/system-render-boundary.d.ts +68 -0
- package/dist/index.js +634 -606
- package/dist/sdd/effective-spec.d.ts +35 -22
- package/dist/sdd/speckit-checkoff.d.ts +113 -0
- package/dist/session/hydration-ownership.d.ts +83 -0
- package/dist/session/snapshot-coordination-init.d.ts +2 -1
- package/dist/session/snapshot-reader.d.ts +25 -7
- package/dist/state.d.ts +32 -2
- package/dist/utils/provider-error-classification.d.ts +11 -0
- package/opencode-swarm.schema.json +40 -0
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-dds2fnhj.js +0 -72
- package/dist/cli/guardrail-explain-qm5wej7v.js +0 -73
- package/dist/cli/hive-promoter-1mhx2jh0.js +0 -87
- package/dist/cli/index-4ddpvd5c.js +0 -94
|
@@ -21,66 +21,68 @@ import {
|
|
|
21
21
|
sanitizeWorktreeTaskId,
|
|
22
22
|
standardWorktreeByCallID,
|
|
23
23
|
standardWorktreeSerializationSessions
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-z2zrcecq.js";
|
|
25
|
+
import"./index-tnhk72rs.js";
|
|
25
26
|
import"./index-hamqvzqn.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-g6nyk713.js";
|
|
27
|
+
import"./index-rejpbgxp.js";
|
|
28
|
+
import"./index-nhxykfyy.js";
|
|
29
|
+
import"./index-bhmrgbyv.js";
|
|
30
|
+
import"./index-xd0e4amf.js";
|
|
31
|
+
import"./index-s0zgz4p1.js";
|
|
32
32
|
import"./index-txdagbh7.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-g062wnw1.js";
|
|
34
34
|
import"./index-6b295cas.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
35
|
+
import"./index-50v672wd.js";
|
|
36
|
+
import"./index-3zvp7t5d.js";
|
|
37
|
+
import"./index-yf7tdhpz.js";
|
|
38
38
|
import"./index-rdec0y3z.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
39
|
+
import"./index-y30y1rkg.js";
|
|
40
|
+
import"./index-cjapb4hy.js";
|
|
41
41
|
import"./index-zsrtt42s.js";
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
42
|
+
import"./index-z2xf153n.js";
|
|
43
|
+
import"./index-bdpgfep1.js";
|
|
44
|
+
import"./index-92m05mew.js";
|
|
45
45
|
import"./index-pt7h91zc.js";
|
|
46
46
|
import"./index-q7sjgr1y.js";
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
47
|
+
import"./index-v7fx8q3z.js";
|
|
48
|
+
import"./index-k5vwnnym.js";
|
|
49
|
+
import"./index-n5carmk0.js";
|
|
50
|
+
import"./index-v0par978.js";
|
|
51
|
+
import"./index-2q5m4m2r.js";
|
|
52
|
+
import"./index-gc6h1fmf.js";
|
|
52
53
|
import"./index-2s7dvzff.js";
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-
|
|
54
|
+
import"./index-dzm5nfh7.js";
|
|
55
|
+
import"./index-6gcxgx84.js";
|
|
55
56
|
import"./index-rtry5xyf.js";
|
|
56
57
|
import {
|
|
57
58
|
resolveWorktreeIsolationConfig
|
|
58
|
-
} from "./index-
|
|
59
|
+
} from "./index-k6f0nryj.js";
|
|
59
60
|
import"./index-frcemc0b.js";
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
62
|
-
import"./index-
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
66
|
-
import"./index-
|
|
67
|
-
import"./index-ry16d01s.js";
|
|
61
|
+
import"./index-0725jpp7.js";
|
|
62
|
+
import"./index-cj64vp08.js";
|
|
63
|
+
import"./index-wx3wz7ya.js";
|
|
64
|
+
import"./index-38cfx8g8.js";
|
|
65
|
+
import"./index-91dhg3wr.js";
|
|
66
|
+
import"./index-vmthakz0.js";
|
|
67
|
+
import"./index-bv4b8tpa.js";
|
|
68
68
|
import"./index-rdm3px0g.js";
|
|
69
|
-
import"./index-
|
|
70
|
-
import"./index-
|
|
69
|
+
import"./index-ry16d01s.js";
|
|
70
|
+
import"./index-516j9vsk.js";
|
|
71
|
+
import"./index-gy3tcmk4.js";
|
|
71
72
|
import"./index-vzm6zre7.js";
|
|
72
73
|
import"./index-ae75rja9.js";
|
|
73
|
-
import"./index-
|
|
74
|
-
import"./index-
|
|
75
|
-
import"./index-
|
|
76
|
-
import"./index-qt0793qm.js";
|
|
77
|
-
import"./index-ne9zamcs.js";
|
|
74
|
+
import"./index-12ewkms0.js";
|
|
75
|
+
import"./index-ea9fk6v0.js";
|
|
76
|
+
import"./index-6mwha20t.js";
|
|
78
77
|
import"./index-1xnse449.js";
|
|
79
78
|
import"./index-c1ggtmpm.js";
|
|
80
|
-
import"./index-
|
|
81
|
-
import"./index-
|
|
82
|
-
import"./index-
|
|
83
|
-
import"./index-
|
|
79
|
+
import"./index-ejhxgyvm.js";
|
|
80
|
+
import"./index-7g4c7s5r.js";
|
|
81
|
+
import"./index-989v83pb.js";
|
|
82
|
+
import"./index-gx2vp8gx.js";
|
|
83
|
+
import"./index-xj5z92qz.js";
|
|
84
|
+
import"./index-zxdawwc7.js";
|
|
85
|
+
import"./index-rp4akjrm.js";
|
|
84
86
|
import"./index-w872yykk.js";
|
|
85
87
|
import"./index-bk5tah7q.js";
|
|
86
88
|
import"./index-gknz3bv1.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handlePrFeedbackLoopCommand(directory: string, args: string[], sessionID: string): Promise<string>;
|
|
@@ -713,8 +713,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
713
713
|
readonly sdd: {
|
|
714
714
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
715
715
|
readonly description: "Manage OpenSpec-compatible SDD artifacts and effective spec projection";
|
|
716
|
-
readonly args: "status|validate|project [--json] [--change <id>] [--dry-run]";
|
|
717
|
-
readonly details: "Parent command for spec-driven development artifacts. Use sdd status to inspect .swarm/spec.md plus openspec/ artifacts, sdd validate to validate OpenSpec-compatible deltas, and sdd project to materialize the effective spec into .swarm/spec.md for planning.";
|
|
716
|
+
readonly args: "status|validate|project [--json] [--change <id>] [--dry-run] [--source <provider>] [--feature <id>|all] [--overwrite]";
|
|
717
|
+
readonly details: "Parent command for spec-driven development artifacts. Use sdd status to inspect .swarm/spec.md plus openspec/ artifacts, sdd validate to validate OpenSpec-compatible deltas, and sdd project to materialize the effective spec into .swarm/spec.md for planning. Spec-Kit: sdd project projects ALL features with feature-scoped ids (featureId/FR-nnn) when several exist; --feature <id> selects one (v1 bare-id output); --feature all is the explicit multi-feature alias (project only).";
|
|
718
718
|
readonly category: "utility";
|
|
719
719
|
readonly toolPolicy: "agent";
|
|
720
720
|
};
|
|
@@ -810,6 +810,14 @@ export declare const COMMAND_REGISTRY: {
|
|
|
810
810
|
readonly category: "utility";
|
|
811
811
|
readonly toolPolicy: "restricted";
|
|
812
812
|
};
|
|
813
|
+
readonly 'pr-feedback-loop': {
|
|
814
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
815
|
+
readonly description: "Stop the autonomous PR babysitting settling loop for this session [stop] [reason...]";
|
|
816
|
+
readonly args: "stop <reason...>";
|
|
817
|
+
readonly details: "Human-only stop for the #2502 settling loop (triple opt-in: pr_monitor.enabled + pr_monitor.auto_pr_feedback + pr_feedback_loop.enabled). stop cancels any armed publication generation via the audited #2584 no-publish route (fail-open when nothing is armed), records a terminal cancelled state with the operator-visible reason, clears claimed-but-unsettled monitor events from the session queue via the sanctioned queue-clear primitive, and writes an atomic cleanup receipt under .swarm/pr-feedback-loop-cleanups/. Idempotent: re-running returns the same terminal without duplicating effects. Never issues new wakes; a wake already in flight may still surface in the session, but the workflow gate refuses pushes against a cancelled generation. The reason is mandatory.";
|
|
818
|
+
readonly category: "utility";
|
|
819
|
+
readonly toolPolicy: "restricted";
|
|
820
|
+
};
|
|
813
821
|
readonly 'approve-plan-critic': {
|
|
814
822
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
815
823
|
readonly description: "Record a MANUAL plan-critic approval to unblock the critic_pre_plan execution gate [reason...]";
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -1419,6 +1419,22 @@ export declare const PrMonitorConfigSchema: z.ZodObject<{
|
|
|
1419
1419
|
auto_subscribe_on_pr_create: z.ZodDefault<z.ZodBoolean>;
|
|
1420
1420
|
}, z.core.$strict>;
|
|
1421
1421
|
export type PrMonitorConfig = z.infer<typeof PrMonitorConfigSchema>;
|
|
1422
|
+
/**
|
|
1423
|
+
* Settling loop for autonomous PR babysitting (issue #2502; #1678 capstone) —
|
|
1424
|
+
* TRIPLE opt-in: runs only when pr_monitor.enabled AND
|
|
1425
|
+
* pr_monitor.auto_pr_feedback AND pr_feedback_loop.enabled are ALL true.
|
|
1426
|
+
* Never a default flip. The only supported `publication` mode today is
|
|
1427
|
+
* 'none' — the loop never arms publication and never pushes.
|
|
1428
|
+
*/
|
|
1429
|
+
export declare const PrFeedbackLoopConfigSchema: z.ZodObject<{
|
|
1430
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1431
|
+
max_actions_per_pr: z.ZodDefault<z.ZodNumber>;
|
|
1432
|
+
max_session_actions: z.ZodDefault<z.ZodNumber>;
|
|
1433
|
+
publication: z.ZodDefault<z.ZodEnum<{
|
|
1434
|
+
none: "none";
|
|
1435
|
+
}>>;
|
|
1436
|
+
}, z.core.$strip>;
|
|
1437
|
+
export type PrFeedbackLoopConfig = z.infer<typeof PrFeedbackLoopConfigSchema>;
|
|
1422
1438
|
export declare const ParallelizationConfigSchema: z.ZodObject<{
|
|
1423
1439
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1424
1440
|
maxConcurrentTasks: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2388,6 +2404,9 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
2388
2404
|
out_dir: z.ZodDefault<z.ZodString>;
|
|
2389
2405
|
language: z.ZodOptional<z.ZodString>;
|
|
2390
2406
|
}, z.core.$strip>>;
|
|
2407
|
+
speckit_checkoff: z.ZodOptional<z.ZodObject<{
|
|
2408
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2409
|
+
}, z.core.$strip>>;
|
|
2391
2410
|
git: z.ZodOptional<z.ZodObject<{
|
|
2392
2411
|
binary: z.ZodOptional<z.ZodString>;
|
|
2393
2412
|
}, z.core.$strip>>;
|
|
@@ -3098,6 +3117,14 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
3098
3117
|
cleanup_timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
3099
3118
|
}, z.core.$strip>>;
|
|
3100
3119
|
}, z.core.$strip>>>;
|
|
3120
|
+
pr_feedback_loop: z.ZodOptional<z.ZodObject<{
|
|
3121
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3122
|
+
max_actions_per_pr: z.ZodDefault<z.ZodNumber>;
|
|
3123
|
+
max_session_actions: z.ZodDefault<z.ZodNumber>;
|
|
3124
|
+
publication: z.ZodDefault<z.ZodEnum<{
|
|
3125
|
+
none: "none";
|
|
3126
|
+
}>>;
|
|
3127
|
+
}, z.core.$strip>>;
|
|
3101
3128
|
pr_monitor: z.ZodOptional<z.ZodObject<{
|
|
3102
3129
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
3103
3130
|
poll_interval_seconds: z.ZodDefault<z.ZodNumber>;
|
|
@@ -23,7 +23,29 @@
|
|
|
23
23
|
* forward to Round 2, not full Round 1 context — mirrors the "semantic forget
|
|
24
24
|
* gate" selective-retention insight and keeps prompt sizes bounded.
|
|
25
25
|
*/
|
|
26
|
-
import type { GeneralCouncilDisagreement, GeneralCouncilMemberResponse } from './general-council-types.js';
|
|
26
|
+
import type { GeneralCouncilClaim, GeneralCouncilDisagreement, GeneralCouncilMemberResponse } from './general-council-types.js';
|
|
27
|
+
/**
|
|
28
|
+
* Defensive shape check for one structured claim. Malformed claims are
|
|
29
|
+
* skipped individually — they must never break the detector or suppress the
|
|
30
|
+
* fallback passes (issue #2102 contract G safety rule).
|
|
31
|
+
*
|
|
32
|
+
* Exported (issue #2578) so the general-council synthesis service applies the
|
|
33
|
+
* SAME well-formedness filter when deciding which members hold explicit
|
|
34
|
+
* contrary positions for consensus clustering — one definition, no duplicate
|
|
35
|
+
* shape-check.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isWellFormedClaim(value: unknown): value is GeneralCouncilClaim;
|
|
38
|
+
/**
|
|
39
|
+
* Two stances are contrary when they differ, neither is neutral, and at
|
|
40
|
+
* least one is an explicit contrary position (`oppose` or `alternative`).
|
|
41
|
+
* `concern` flags risk without taking a side, so support-vs-concern is not
|
|
42
|
+
* auto-detected here — the marker/heuristic passes still cover it.
|
|
43
|
+
*
|
|
44
|
+
* Exported (issue #2578): the synthesis service reuses this canonical
|
|
45
|
+
* definition to identify a member's explicit contrary stance
|
|
46
|
+
* (`areContraryStances(stance, 'support')`) instead of duplicating the list.
|
|
47
|
+
*/
|
|
48
|
+
export declare function areContraryStances(a: GeneralCouncilClaim['stance'], b: GeneralCouncilClaim['stance']): boolean;
|
|
27
49
|
/**
|
|
28
50
|
* Detect disagreements across Round 1 member responses.
|
|
29
51
|
*
|
|
@@ -9,14 +9,51 @@
|
|
|
9
9
|
* member confidence rather than counted by headcount. A claim is a consensus
|
|
10
10
|
* point only when its weighted agreement exceeds 0.6 across members.
|
|
11
11
|
*
|
|
12
|
-
* MAINTAIN/CONCEDE/NUANCE protocol (ConfMAD): a Round 2 response
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* MAINTAIN/CONCEDE/NUANCE protocol (ConfMAD): a Round 2 response resolves a
|
|
13
|
+
* Round 1 disagreement only when a disputant declares a paragraph-leading
|
|
14
|
+
* CONCEDE on that topic (the documented stance grammar in
|
|
15
|
+
* ../agents/council-prompts.ts); MAINTAIN and NUANCE both leave it
|
|
16
|
+
* persisting (NUANCE carries no distinct synthesis behavior — it is parsed
|
|
17
|
+
* only so the stance grammar is recognized and recorded). Issue #2578: prose
|
|
18
|
+
* that merely CONTAINS the word "concede" (e.g. "MAINTAIN — I do not
|
|
19
|
+
* concede…") is not a concession, and a member detected as holding a
|
|
20
|
+
* contrary position (typed oppose/alternative claim, or appearing in any
|
|
21
|
+
* detected disagreement) is disagreement evidence that must never be emitted
|
|
22
|
+
* as consensus.
|
|
15
23
|
*/
|
|
16
24
|
import type { GeneralCouncilDeliberationResponse, GeneralCouncilMemberResponse, GeneralCouncilResult } from './general-council-types.js';
|
|
25
|
+
/** Round 2 stance keywords, exactly as documented in council-prompts.ts. */
|
|
26
|
+
declare const LEADING_STANCE_KEYWORDS: readonly ["MAINTAIN", "CONCEDE", "NUANCE"];
|
|
27
|
+
export type GeneralCouncilLeadingStance = (typeof LEADING_STANCE_KEYWORDS)[number];
|
|
28
|
+
/** One paragraph-leading stance declaration parsed from a Round 2 response. */
|
|
29
|
+
export interface LeadingStanceDeclaration {
|
|
30
|
+
stance: GeneralCouncilLeadingStance;
|
|
31
|
+
/** The full text of the paragraph whose first word is the stance keyword. */
|
|
32
|
+
paragraph: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Parse the documented paragraph-leading stance contract (issue #2578 sole
|
|
36
|
+
* owner: this module — callers must reuse this parser, not re-implement it).
|
|
37
|
+
*
|
|
38
|
+
* A declaration exists only when the FIRST word of a paragraph (blank-line
|
|
39
|
+
* separated) is exactly one of the uppercase keywords MAINTAIN / CONCEDE /
|
|
40
|
+
* NUANCE (case-sensitive, as the prompt documents them), standing alone
|
|
41
|
+
* before whitespace, punctuation, or a markdown decorator. Prose such as
|
|
42
|
+
* "I do not concede" or "After review I concede…" never leads a paragraph
|
|
43
|
+
* with the keyword and so yields no declaration — the conservative direction
|
|
44
|
+
* (no concession).
|
|
45
|
+
*
|
|
46
|
+
* Council prompts sanction markdown inside the response string ("Markdown OK
|
|
47
|
+
* inside the string"), so common paragraph decorators must not hide a
|
|
48
|
+
* declaration: leading blockquote/heading/list markers are stripped before
|
|
49
|
+
* the first-word check, emphasis wrapping (bold/italic/code) and hyphen
|
|
50
|
+
* joins are boundary characters, and zero-width characters are removed.
|
|
51
|
+
*/
|
|
52
|
+
export declare function extractLeadingStanceDeclarations(response: string): LeadingStanceDeclaration[];
|
|
17
53
|
/**
|
|
18
54
|
* Pure synthesis. Given completed member responses, produces the final
|
|
19
55
|
* `GeneralCouncilResult` (without `moderatorOutput` — moderator is invoked
|
|
20
56
|
* by the architect after this returns and populated separately).
|
|
21
57
|
*/
|
|
22
58
|
export declare function synthesizeGeneralCouncil(question: string, mode: 'general' | 'spec_review', round1Responses: GeneralCouncilMemberResponse[], round2Responses: GeneralCouncilDeliberationResponse[]): GeneralCouncilResult;
|
|
59
|
+
export {};
|
|
@@ -58,6 +58,17 @@ export interface ToolFailureClassificationInput {
|
|
|
58
58
|
*/
|
|
59
59
|
export declare function sanitizeFailureEvidenceDisplay(value: string): string;
|
|
60
60
|
declare function isNeutralExitOne(command: string): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Provider failure categories in use (enumerated per issue #2673 plan-critic
|
|
63
|
+
* finding 6, so downstream category-prefix consumers — telemetry filters,
|
|
64
|
+
* dashboards, circuit thresholds — can discover every leaf):
|
|
65
|
+
* provider.cancelled, provider.authentication_configuration,
|
|
66
|
+
* provider.quota_billing, provider.rate_limit, provider.unavailable,
|
|
67
|
+
* provider.context_window, provider.content_policy,
|
|
68
|
+
* provider.request_shape (#2673: deterministic request-shape rejections,
|
|
69
|
+
* e.g. a strict single-system provider rejecting a multi-system payload),
|
|
70
|
+
* provider.unknown.
|
|
71
|
+
*/
|
|
61
72
|
export declare function classifyProviderFailure(error: unknown, action?: ActionIdentityInput): InvocationFailureRecordV1;
|
|
62
73
|
export declare function isRetryableProviderFailure(record: InvocationFailureRecordV1): boolean;
|
|
63
74
|
export declare function classifyToolInvocationFailure(input: ToolFailureClassificationInput): InvocationFailureRecordV1 | null;
|
|
@@ -8,8 +8,13 @@ import type { PluginConfig } from '../config/schema';
|
|
|
8
8
|
export type { DelegationReason } from '../state';
|
|
9
9
|
/**
|
|
10
10
|
* Creates the chat.message hook for delegation tracking.
|
|
11
|
+
*
|
|
12
|
+
* `directory` (issue #2667) is the plugin instance's project root captured at
|
|
13
|
+
* hook construction — chat.message inputs carry no directory. Sessions created
|
|
14
|
+
* here are ownership-stamped for that project so another project's hydration
|
|
15
|
+
* can never evict them.
|
|
11
16
|
*/
|
|
12
|
-
export declare function createDelegationTrackerHook(config: PluginConfig, guardrailsEnabled?: boolean): (input: {
|
|
17
|
+
export declare function createDelegationTrackerHook(config: PluginConfig, guardrailsEnabled?: boolean, directory?: string): (input: {
|
|
13
18
|
sessionID: string;
|
|
14
19
|
agent?: string;
|
|
15
20
|
}, output: Record<string, unknown>) => Promise<void>;
|
|
@@ -1310,7 +1310,7 @@ export declare function recordPrFeedbackPushAttemptResult(directory: string, inp
|
|
|
1310
1310
|
* it), and the exact remote-head observation (including null when it could not
|
|
1311
1311
|
* be resolved).
|
|
1312
1312
|
*/
|
|
1313
|
-
declare function cancelPrFeedbackPublication(directory: string, sessionID: string, reason: string): Promise<{
|
|
1313
|
+
export declare function cancelPrFeedbackPublication(directory: string, sessionID: string, reason: string): Promise<{
|
|
1314
1314
|
revision: number | null;
|
|
1315
1315
|
observedRemoteHead: string | null;
|
|
1316
1316
|
}>;
|
|
@@ -10,8 +10,10 @@ import type { RuntimePlan } from '../config/plan-schema';
|
|
|
10
10
|
/**
|
|
11
11
|
* Build the [spec-drift] advisory injected into the model's system prompt
|
|
12
12
|
* after every loadPlan whenever spec staleness is detected (issue #853
|
|
13
|
-
* Layer A). The text is appended to `output.system
|
|
14
|
-
* single-system
|
|
13
|
+
* Layer A). The text is appended to `output.system`; when the system render
|
|
14
|
+
* boundary (issue #2673) resolves `strict-single-system` for this request's
|
|
15
|
+
* model, the joined single entry retains the `[spec-drift]` block
|
|
16
|
+
* byte-verbatim (pinned by the boundary's acceptance checks).
|
|
15
17
|
*
|
|
16
18
|
* The "Do NOT proceed" line enumerates every tool in SPEC_DRIFT_BLOCKED_TOOLS
|
|
17
19
|
* so the architect knows exactly which calls will return SPEC_DRIFT_BLOCK
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System render boundary (issue #2673).
|
|
3
|
+
*
|
|
4
|
+
* The final request boundary for the SYSTEM surface. The pinned host
|
|
5
|
+
* (@opencode-ai 1.18.3 — anomalyco/opencode@v1.18.3,
|
|
6
|
+
* packages/opencode/src/session/llm/request.ts, LLMRequestPrep.prepare)
|
|
7
|
+
* triggers `experimental.chat.system.transform` with `{ sessionID?, model }`
|
|
8
|
+
* and the SHARED `system` array, then coalesces only when
|
|
9
|
+
* `system.length > 2 && system[0] === header`, and materializes EVERY
|
|
10
|
+
* surviving entry as a separate `{role:'system'}` message ahead of the
|
|
11
|
+
* conversation. With plugin guidance entries present, every non-OAuth
|
|
12
|
+
* provider therefore receives exactly two system messages.
|
|
13
|
+
*
|
|
14
|
+
* Strict single-system providers (Qwen3.6/Gemma class — the documented
|
|
15
|
+
* v6.85.1 incident: "require exactly one `{role:'system'}` message at
|
|
16
|
+
* index 0") crash or silently degrade on that shape. An UNCONDITIONAL
|
|
17
|
+
* collapse is wrong (issue #1619): the host marks prompt-cache breakpoints
|
|
18
|
+
* on the first two system messages, so folding the stable base prompt
|
|
19
|
+
* together with per-request injections would move the breakpoint behind
|
|
20
|
+
* varying content and defeat caching for cache-capable providers.
|
|
21
|
+
*
|
|
22
|
+
* This module resolves the per-request rendering capability from the model
|
|
23
|
+
* the host hands the boundary and collapses ONLY for strict single-system
|
|
24
|
+
* models, IN PLACE (`length = 0` + `push` — the #1619 discipline: the host
|
|
25
|
+
* discards hook return values and reads its own array). Everything else is
|
|
26
|
+
* left byte-identical.
|
|
27
|
+
*
|
|
28
|
+
* Known limitation (plan-critic round 1, finding 1): host request paths that
|
|
29
|
+
* bypass `output.system` — OpenAI OAuth and workflow models consume the
|
|
30
|
+
* system surface via `options.instructions` — cannot be shaped by any plugin
|
|
31
|
+
* hook and are out of scope.
|
|
32
|
+
*/
|
|
33
|
+
/** Rendering classes the boundary distinguishes. */
|
|
34
|
+
export type SystemRenderCapability = 'strict-single-system' | 'multi-system';
|
|
35
|
+
/** Bounded, observable result of one boundary application. */
|
|
36
|
+
export interface SystemRenderBoundaryResult {
|
|
37
|
+
capability: SystemRenderCapability;
|
|
38
|
+
entriesBefore: number;
|
|
39
|
+
entriesAfter: number;
|
|
40
|
+
collapsed: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Resolve the rendering capability for one request's model. Fail-open:
|
|
44
|
+
* anything unreadable or unknown resolves to `multi-system`, which leaves the
|
|
45
|
+
* array byte-identical (the pre-#2673 behavior), so the boundary can never
|
|
46
|
+
* regress a provider it does not positively know to be strict.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveSystemRenderCapability(model: unknown): SystemRenderCapability;
|
|
49
|
+
/**
|
|
50
|
+
* Apply the boundary to one request's system array, in place.
|
|
51
|
+
*
|
|
52
|
+
* Strict single-system models with more than one entry: empty-string entries
|
|
53
|
+
* are dropped, the rest are joined with a blank line (base prompt first —
|
|
54
|
+
* every producer appends after the host's pre-joined header), and the array is
|
|
55
|
+
* collapsed to exactly ONE entry via `length = 0` + `push`. Multi-system
|
|
56
|
+
* models: no mutation at all. Length ≤ 1: no-op. Never fabricates or reorders
|
|
57
|
+
* non-empty content.
|
|
58
|
+
*/
|
|
59
|
+
export declare function applySystemRenderBoundary(model: unknown, system: string[]): SystemRenderBoundaryResult;
|
|
60
|
+
/**
|
|
61
|
+
* Hook factory for the `experimental.chat.system.transform` chain. Registered
|
|
62
|
+
* LAST (after every producer, including the role filter) so the shape is
|
|
63
|
+
* finalized once, after all pushes and prunes. Fail-open: any throw leaves the
|
|
64
|
+
* array untouched and logs non-fatally.
|
|
65
|
+
*/
|
|
66
|
+
export declare function createSystemRenderBoundaryHook(): {
|
|
67
|
+
'experimental.chat.system.transform': (input: unknown, output: unknown) => Promise<void>;
|
|
68
|
+
};
|