opencode-swarm 7.181.3 → 7.182.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/.opencode/skills/issue-ingest/SKILL.md +19 -1
  2. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  3. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  4. package/dist/cli/{coder-settlement-txte2m87.js → coder-settlement-vwwxs7t1.js} +11 -11
  5. package/dist/cli/{config-doctor-101n3c1r.js → config-doctor-7wyqt1ke.js} +3 -3
  6. package/dist/cli/{core-s0yzzpaj.js → core-739y5zsf.js} +4 -4
  7. package/dist/cli/{curation-policy-r4dkajw9.js → curation-policy-bwj3wanw.js} +4 -4
  8. package/dist/cli/{curator-drift-r7w3cg3m.js → curator-drift-mbpc200k.js} +9 -9
  9. package/dist/cli/curator-llm-factory-m039mxt9.js +74 -0
  10. package/dist/cli/{curator-dp49fr0p.js → curator-qrcydww2.js} +38 -38
  11. package/dist/cli/{evidence-summary-service-r648x5f2.js → evidence-summary-service-w6hw58bc.js} +17 -17
  12. package/dist/cli/{gate-evidence-8rh69tsh.js → gate-evidence-2dqabzxy.js} +6 -6
  13. package/dist/cli/guardrail-explain-kaebxfq3.js +75 -0
  14. package/dist/cli/{guardrail-log-yr60w7h6.js → guardrail-log-h3vxqte8.js} +7 -7
  15. package/dist/cli/{guardrail-reset-eztc62va.js → guardrail-reset-n1ameem0.js} +38 -38
  16. package/dist/cli/{hive-promoter-g56ba4a4.js → hive-promoter-ev201390.js} +38 -38
  17. package/dist/cli/{index-4ffryqb1.js → index-0vvnwq2f.js} +1 -1
  18. package/dist/cli/{index-01r2wrwa.js → index-0yj2ebtj.js} +1 -1
  19. package/dist/cli/{index-by9wfeja.js → index-1kpa3an2.js} +2 -2
  20. package/dist/cli/{index-a2hvmc3a.js → index-25m6rekr.js} +1 -1
  21. package/dist/cli/{index-1ks0rnzn.js → index-2qw3rxcq.js} +5 -5
  22. package/dist/cli/{index-ekwe81my.js → index-34k5sg2a.js} +2 -2
  23. package/dist/cli/{index-ap6hs8fj.js → index-4a9kyt9z.js} +1 -1
  24. package/dist/cli/{index-vvgpgcyn.js → index-5cvm6ykc.js} +1 -1
  25. package/dist/cli/{index-hcaspktr.js → index-6q23tysf.js} +1 -1
  26. package/dist/cli/{index-rchygh27.js → index-6qntafey.js} +2 -2
  27. package/dist/cli/{index-ved1325w.js → index-820e6w22.js} +2 -2
  28. package/dist/cli/{index-789tdsfv.js → index-8qkc4xdx.js} +3 -3
  29. package/dist/cli/{index-s34y6gbh.js → index-9h1n6s76.js} +1 -1
  30. package/dist/cli/{index-kkrbybgt.js → index-awwqf5v7.js} +1 -1
  31. package/dist/cli/{index-ckrm4784.js → index-cxxpkw6v.js} +7 -7
  32. package/dist/cli/{index-nw3z614g.js → index-d4wj3jyg.js} +6 -6
  33. package/dist/cli/{index-4jvt3r77.js → index-db8tzj7b.js} +6 -6
  34. package/dist/cli/{index-7s6ct0t2.js → index-e2cdym66.js} +7 -7
  35. package/dist/cli/{index-ttgex8ky.js → index-extyzd5c.js} +5 -5
  36. package/dist/cli/{index-1w1xrk5k.js → index-fae4qp3c.js} +1 -1
  37. package/dist/cli/{index-sr9k8sh7.js → index-fyzakptj.js} +4 -4
  38. package/dist/cli/{index-kexzhwbq.js → index-hd3kacp0.js} +2 -2
  39. package/dist/cli/{index-427x3j6p.js → index-hg4gx6wa.js} +1 -1
  40. package/dist/cli/{index-sf51gh68.js → index-k38nw0xx.js} +1 -1
  41. package/dist/cli/{index-2pt5g7zz.js → index-kbxeq0r2.js} +4 -4
  42. package/dist/cli/{index-m4e3p8na.js → index-q0k4zdfg.js} +2 -2
  43. package/dist/cli/{index-k5rqe97g.js → index-q3qqyp4d.js} +12 -12
  44. package/dist/cli/{index-vgjmahnd.js → index-qgewm1x8.js} +3 -3
  45. package/dist/cli/{index-989v83pb.js → index-s1y70y0w.js} +8 -2
  46. package/dist/cli/{index-nw8pfcw1.js → index-td54jp0w.js} +3 -3
  47. package/dist/cli/{index-jrxrjz89.js → index-v8ja5zcr.js} +2 -2
  48. package/dist/cli/{index-6ep83w7x.js → index-vj5da9w4.js} +2 -2
  49. package/dist/cli/{index-23mdeh2a.js → index-wbqvjdne.js} +1 -1
  50. package/dist/cli/{index-w1ydvzef.js → index-wnkx6gs0.js} +1 -1
  51. package/dist/cli/{index-mdqp0cq2.js → index-wyvzrp4x.js} +3 -3
  52. package/dist/cli/{index-2t21pv2v.js → index-wzec3c4g.js} +13 -1
  53. package/dist/cli/{index-xqr076aq.js → index-x7z5fbs3.js} +4 -4
  54. package/dist/cli/{index-qdz43cne.js → index-y41v2h6s.js} +38 -38
  55. package/dist/cli/{index-h6gxh3an.js → index-yqc672pn.js} +136 -85
  56. package/dist/cli/{index-dy9mxh0z.js → index-ysch2gg6.js} +40 -40
  57. package/dist/cli/{index-yv0q0hp9.js → index-z2m4n1sm.js} +7 -7
  58. package/dist/cli/{index-8c37kzh6.js → index-zqd0tnwj.js} +6 -6
  59. package/dist/cli/{index-yzapt508.js → index-zryhqf6h.js} +4 -4
  60. package/dist/cli/index.js +39 -39
  61. package/dist/cli/{knowledge-escalator-0rcft6q4.js → knowledge-escalator-1shry4k7.js} +12 -12
  62. package/dist/cli/{knowledge-events-7jyz3qxs.js → knowledge-events-e2hdj3kq.js} +10 -10
  63. package/dist/cli/{knowledge-link-655xa3db.js → knowledge-link-akjk6gby.js} +3 -3
  64. package/dist/cli/{knowledge-store-asa26g6p.js → knowledge-store-t2c8spdv.js} +4 -4
  65. package/dist/cli/{knowledge-validator-j3x9ezej.js → knowledge-validator-d7amfzsx.js} +6 -6
  66. package/dist/cli/{mcp-70hefjk6.js → mcp-174sj68r.js} +1 -1
  67. package/dist/cli/{model-preflight-szekh1dc.js → model-preflight-6x39q1pq.js} +38 -38
  68. package/dist/cli/{pending-delegations-rb6bhv5x.js → pending-delegations-n9hp95ad.js} +10 -10
  69. package/dist/cli/{pr-subscriptions-v4ms5pfb.js → pr-subscriptions-b0pbkkpr.js} +10 -10
  70. package/dist/cli/{pr-workflow-gate-qmfpz6wb.js → pr-workflow-gate-5374j5nm.js} +38 -38
  71. package/dist/cli/{runner-b5vt1any.js → runner-xfagxzkx.js} +4 -4
  72. package/dist/cli/{scan-cursor-7zn4t1hw.js → scan-cursor-qqt0v8e4.js} +5 -5
  73. package/dist/cli/{schema-tx62mfy8.js → schema-6mh6et27.js} +2 -2
  74. package/dist/cli/{scope-persistence-f8w12sns.js → scope-persistence-astxnj1c.js} +14 -14
  75. package/dist/cli/{server-f2vrp2wc.js → server-dqq8v0bs.js} +38 -38
  76. package/dist/cli/{skill-generator-jme09w7n.js → skill-generator-s9y7098d.js} +14 -14
  77. package/dist/cli/{snapshot-coordination-init-ad83sq6c.js → snapshot-coordination-init-gs4258xn.js} +38 -38
  78. package/dist/cli/{speckit-checkoff-98gfvn3r.js → speckit-checkoff-y5ynwxhq.js} +5 -5
  79. package/dist/cli/{workspace-snapshot-hsssm50w.js → workspace-snapshot-7e9me3q7.js} +3 -3
  80. package/dist/cli/{worktree-collision-ownership-47kdjtqb.js → worktree-collision-ownership-hrv6e3ps.js} +11 -11
  81. package/dist/cli/{worktree-isolation-etaawcnt.js → worktree-isolation-wksm23tp.js} +38 -38
  82. package/dist/hooks/delegation-gate.d.ts +10 -8
  83. package/dist/hooks/issue-trace-reducer.d.ts +29 -6
  84. package/dist/hooks/issue-trace-state.d.ts +29 -0
  85. package/dist/hooks/issue-trace.d.ts +4 -1
  86. package/dist/hooks/task-id-resolver.d.ts +7 -0
  87. package/dist/index.js +42 -33
  88. package/dist/tools/index.d.ts +3 -0
  89. package/dist/tools/manifest.d.ts +3 -0
  90. package/dist/tools/record-branch-freshness.d.ts +17 -0
  91. package/dist/tools/record-merge-approval.d.ts +17 -0
  92. package/dist/tools/record-trace-validation.d.ts +18 -0
  93. package/dist/tools/tool-metadata.d.ts +12 -0
  94. package/package.json +1 -1
  95. package/dist/cli/curator-llm-factory-tycc9xkw.js +0 -74
  96. package/dist/cli/guardrail-explain-dfyj1g1c.js +0 -75
@@ -9,24 +9,24 @@ import {
9
9
  WORKTREE_PROVISIONING_OWNER_LEASE_MS,
10
10
  removeWorktreeProvisioningOwner,
11
11
  scanWorktreeProvisioningOwnersForRecovery
12
- } from "./index-by9wfeja.js";
12
+ } from "./index-1kpa3an2.js";
13
13
  import {
14
14
  scanDelegationFallbacksForRecovery,
15
15
  scanDelegationsForRecovery
16
- } from "./index-8c37kzh6.js";
17
- import"./index-a2hvmc3a.js";
16
+ } from "./index-zqd0tnwj.js";
17
+ import"./index-25m6rekr.js";
18
18
  import"./index-2s7dvzff.js";
19
- import"./index-ved1325w.js";
20
- import"./index-w1ydvzef.js";
21
- import"./index-vvgpgcyn.js";
19
+ import"./index-820e6w22.js";
20
+ import"./index-wnkx6gs0.js";
21
+ import"./index-5cvm6ykc.js";
22
22
  import"./index-rdm3px0g.js";
23
23
  import"./index-ry16d01s.js";
24
- import"./index-kkrbybgt.js";
25
- import"./index-7s6ct0t2.js";
24
+ import"./index-awwqf5v7.js";
25
+ import"./index-e2cdym66.js";
26
26
  import"./index-vzm6zre7.js";
27
27
  import"./index-ae75rja9.js";
28
- import"./index-23mdeh2a.js";
29
- import"./index-ap6hs8fj.js";
28
+ import"./index-wbqvjdne.js";
29
+ import"./index-4a9kyt9z.js";
30
30
  import"./index-mkpdcbye.js";
31
31
  import {
32
32
  canonicalRootKeyFresh
@@ -34,7 +34,7 @@ import {
34
34
  import"./index-c1ggtmpm.js";
35
35
  import"./index-ejhxgyvm.js";
36
36
  import"./index-7g4c7s5r.js";
37
- import"./index-989v83pb.js";
37
+ import"./index-s1y70y0w.js";
38
38
  import"./index-zxdawwc7.js";
39
39
  import"./index-bk5tah7q.js";
40
40
  import"./index-gknz3bv1.js";
@@ -21,69 +21,69 @@ import {
21
21
  sanitizeWorktreeTaskId,
22
22
  standardWorktreeByCallID,
23
23
  standardWorktreeSerializationSessions
24
- } from "./index-h6gxh3an.js";
25
- import"./index-mdqp0cq2.js";
24
+ } from "./index-yqc672pn.js";
25
+ import"./index-wyvzrp4x.js";
26
26
  import"./index-hamqvzqn.js";
27
- import"./index-01r2wrwa.js";
28
- import"./index-nw8pfcw1.js";
29
- import"./index-ekwe81my.js";
30
- import"./index-k5rqe97g.js";
31
- import"./index-sf51gh68.js";
27
+ import"./index-0yj2ebtj.js";
28
+ import"./index-td54jp0w.js";
29
+ import"./index-34k5sg2a.js";
30
+ import"./index-q3qqyp4d.js";
31
+ import"./index-k38nw0xx.js";
32
32
  import"./index-txdagbh7.js";
33
- import"./index-4ffryqb1.js";
33
+ import"./index-0vvnwq2f.js";
34
34
  import"./index-6b295cas.js";
35
- import"./index-yzapt508.js";
36
- import"./index-1ks0rnzn.js";
37
- import"./index-m4e3p8na.js";
35
+ import"./index-zryhqf6h.js";
36
+ import"./index-2qw3rxcq.js";
37
+ import"./index-q0k4zdfg.js";
38
38
  import"./index-rdec0y3z.js";
39
- import"./index-nw3z614g.js";
39
+ import"./index-d4wj3jyg.js";
40
40
  import"./index-cjapb4hy.js";
41
41
  import"./index-zsrtt42s.js";
42
- import"./index-ckrm4784.js";
43
- import"./index-jrxrjz89.js";
44
- import"./index-by9wfeja.js";
42
+ import"./index-cxxpkw6v.js";
43
+ import"./index-v8ja5zcr.js";
44
+ import"./index-1kpa3an2.js";
45
45
  import"./index-pt7h91zc.js";
46
46
  import"./index-q7sjgr1y.js";
47
- import"./index-6ep83w7x.js";
48
- import"./index-789tdsfv.js";
49
- import"./index-2pt5g7zz.js";
50
- import"./index-8c37kzh6.js";
51
- import"./index-yv0q0hp9.js";
52
- import"./index-a2hvmc3a.js";
47
+ import"./index-vj5da9w4.js";
48
+ import"./index-8qkc4xdx.js";
49
+ import"./index-kbxeq0r2.js";
50
+ import"./index-zqd0tnwj.js";
51
+ import"./index-z2m4n1sm.js";
52
+ import"./index-25m6rekr.js";
53
53
  import"./index-2s7dvzff.js";
54
- import"./index-xqr076aq.js";
55
- import"./index-s34y6gbh.js";
54
+ import"./index-x7z5fbs3.js";
55
+ import"./index-9h1n6s76.js";
56
56
  import"./index-rtry5xyf.js";
57
57
  import {
58
58
  resolveWorktreeIsolationConfig
59
- } from "./index-vgjmahnd.js";
59
+ } from "./index-qgewm1x8.js";
60
60
  import"./index-frcemc0b.js";
61
61
  import"./index-0725jpp7.js";
62
- import"./index-4jvt3r77.js";
63
- import"./index-ttgex8ky.js";
64
- import"./index-427x3j6p.js";
65
- import"./index-ved1325w.js";
66
- import"./index-w1ydvzef.js";
67
- import"./index-vvgpgcyn.js";
62
+ import"./index-db8tzj7b.js";
63
+ import"./index-extyzd5c.js";
64
+ import"./index-hg4gx6wa.js";
65
+ import"./index-820e6w22.js";
66
+ import"./index-wnkx6gs0.js";
67
+ import"./index-5cvm6ykc.js";
68
68
  import"./index-rdm3px0g.js";
69
69
  import"./index-ry16d01s.js";
70
- import"./index-kkrbybgt.js";
71
- import"./index-7s6ct0t2.js";
70
+ import"./index-awwqf5v7.js";
71
+ import"./index-e2cdym66.js";
72
72
  import"./index-vzm6zre7.js";
73
73
  import"./index-ae75rja9.js";
74
- import"./index-23mdeh2a.js";
75
- import"./index-ap6hs8fj.js";
74
+ import"./index-wbqvjdne.js";
75
+ import"./index-4a9kyt9z.js";
76
76
  import"./index-mkpdcbye.js";
77
77
  import"./index-1xnse449.js";
78
78
  import"./index-c1ggtmpm.js";
79
79
  import"./index-ejhxgyvm.js";
80
80
  import"./index-7g4c7s5r.js";
81
- import"./index-989v83pb.js";
81
+ import"./index-s1y70y0w.js";
82
82
  import"./index-gx2vp8gx.js";
83
- import"./index-hcaspktr.js";
83
+ import"./index-6q23tysf.js";
84
84
  import"./index-zxdawwc7.js";
85
- import"./index-rchygh27.js";
86
- import"./index-2t21pv2v.js";
85
+ import"./index-6qntafey.js";
86
+ import"./index-wzec3c4g.js";
87
87
  import"./index-bk5tah7q.js";
88
88
  import"./index-gknz3bv1.js";
89
89
  import"./index-zpsr8rpc.js";
@@ -12,7 +12,7 @@ import { loadPlanJsonOnly } from '../plan/manager';
12
12
  import type { AgentSessionState } from '../state';
13
13
  import type { DelegationEnvelope, EnvelopeValidationResult } from '../types/delegation.js';
14
14
  import { type PlanTaskIdContext } from './plan-task-id-context.js';
15
- import { resolveDelegatedPlanTaskId } from './task-id-resolver.js';
15
+ import { resolveDelegatedPlanTaskId, type TaskIdPolicy } from './task-id-resolver.js';
16
16
  export { resolveDelegatedPlanTaskId } from './task-id-resolver.js';
17
17
  import { resetStandardWorktreeIsolationState } from './delegation-gate/worktree-isolation';
18
18
  export { resetStandardWorktreeIsolationState };
@@ -484,6 +484,10 @@ export interface StageBAttributionResult {
484
484
  errors: string[];
485
485
  }
486
486
  export declare function parsePerTaskVerdicts(outputText: string): StageBAttributionResult;
487
+ type EvidenceTaskResolutionOptions = {
488
+ policy?: TaskIdPolicy;
489
+ allowSessionFallback?: boolean;
490
+ };
487
491
  export declare function canRunWhileTaskAwaitsCompletion(input: {
488
492
  directory: string | undefined;
489
493
  normalizedTool: string;
@@ -493,18 +497,16 @@ export declare function canRunWhileTaskAwaitsCompletion(input: {
493
497
  }): boolean;
494
498
  declare function buildParallelExecutionGuidance(directory: string | undefined, sessionID: string, session: AgentSessionState): Promise<string | null>;
495
499
  /**
496
- * Resolves the correct task ID for evidence recording by chaining:
497
- * 1. Explicit task_id in direct args (structured field)
498
- * 2. Prompt-text extraction via resolveDelegatedPlanTaskId (plan-aware)
499
- * 3. Session-state fallback via getEvidenceTaskId
500
+ * Resolves the correct task ID for evidence recording by chaining the selected
501
+ * resolver policy with an optional session-state fallback. Most roles retain
502
+ * plan-aware prompt resolution; task-gated critic roles select attribution
503
+ * policy and disable the fallback so only structured IDs or exact markers bind.
500
504
  *
501
505
  * This fixes parallel evidence recording where multiple reviewer/test_engineer
502
506
  * agents are dispatched for different tasks from the same architect session.
503
507
  * Issue #970.
504
508
  */
505
- declare function resolveEvidenceTaskId(args: Record<string, unknown> | undefined, session: AgentSessionState, directory: string, options?: {
506
- allowSessionFallback?: boolean;
507
- }): Promise<string | null>;
509
+ declare function resolveEvidenceTaskId(args: Record<string, unknown> | undefined, session: AgentSessionState, directory: string, options?: EvidenceTaskResolutionOptions): Promise<string | null>;
508
510
  /**
509
511
  * _internals export for testing — do not use in production code.
510
512
  * Exposes resolveEvidenceTaskId, resolveDelegatedPlanTaskId,
@@ -37,9 +37,14 @@ export interface IssueReference {
37
37
  * - `publication_handoff`: all phases complete; the engine has emitted the
38
38
  * commit-pr directive and stopped driving. This is NOT "issue resolved" —
39
39
  * publication is owned by commit-pr and has not yet been confirmed.
40
- * - `published`: a verifiable publication receipt was observed. Terminal.
40
+ * - `published`: a verifiable publication receipt was observed.
41
+ * - `merge_approval_recorded`: a PR-head-bound merge-approval receipt was
42
+ * observed after publication (issue #2564). TERMINAL. The plugin RECORDS the
43
+ * human approval for audit; it never certifies, drives, or green-lights the
44
+ * merge itself — the merge is human-enforced (mirrors trace-check.sh's
45
+ * merge gate posture).
41
46
  */
42
- export type TraceStatus = 'in_progress' | 'publication_handoff' | 'published';
47
+ export type TraceStatus = 'in_progress' | 'publication_handoff' | 'published' | 'merge_approval_recorded';
43
48
  export interface TraceState {
44
49
  issueNumber: number;
45
50
  lastTransition: string | null;
@@ -53,12 +58,26 @@ export interface WorkflowArtifacts {
53
58
  allPhasesComplete: boolean;
54
59
  /** Reproduction evidence OR a typed waiver is present (issue #2131 2.6). */
55
60
  reproductionPermitted: boolean;
61
+ /**
62
+ * Phase 0 branch-freshness receipt permits the trace: `synced`, or a
63
+ * fail-closed fetch failure carrying a recorded user override (issue #2564,
64
+ * mirroring trace-check.sh phase0). A `behind` result never permits.
65
+ */
66
+ freshnessPermitted: boolean;
56
67
  /** A verifiable publication receipt has been observed (issue #2131 2.4). */
57
68
  publicationObserved: boolean;
58
69
  /** A valid recurrence-sweep receipt exists (issue #2131 residual B). */
59
70
  recurrenceSweepVerified: boolean;
60
71
  /** Fresh reviewer + critic APPROVE verdicts recorded (issue #2131 residual B). */
61
72
  implementationReviewVerified: boolean;
73
+ /**
74
+ * Every recorded per-phase `trace-check.sh` validation for this issue is a
75
+ * pass bound to a 40-hex reviewed-commit + tree-id (issue #2564). A fail
76
+ * entry fails closed until that phase is re-recorded as a pass.
77
+ */
78
+ traceValidationVerified: boolean;
79
+ /** A PR-head-bound merge-approval receipt has been observed (issue #2564). */
80
+ mergeApprovalObserved: boolean;
62
81
  }
63
82
  export interface TransitionResult {
64
83
  nextMode: string | null;
@@ -77,18 +96,22 @@ export interface ComputeNextModeParams {
77
96
  *
78
97
  * Decision table (top-to-bottom, first match wins):
79
98
  * (a) No issue reference or trace not requested → no-op
80
- * (b) Trace already published (terminal) → no-op
99
+ * (b) merge_approval_recorded (truly terminal) → no-op
100
+ * (b') published + merge-approval receipt observed → merge_approval_recorded (RECORDED, never certified)
81
101
  * (c) publication_handoff: observe publication → PUBLISHED; else no-op
82
102
  * (d) Cross-issue guard (spec issue ≠ current issue) → no-op
83
103
  * (e) Spec does not exist → no-op
84
- * (f) Spec exists, no plan, reproduction permitted,
104
+ * (f-0) Spec exists, no plan, branch-freshness NOT
105
+ * permitted → one-shot FRESHNESS_GATE directive
106
+ * (f) Spec exists, no plan, freshness permitted, reproduction permitted,
85
107
  * never transitioned (or re-entrant idempotency) → PLAN
86
- * (f-block) Spec exists, no plan, reproduction NOT permitted → no-op
108
+ * (f-block) Spec exists, no plan, reproduction NOT permitted → one-shot REPRO_GATE directive
87
109
  * (g) Plan exists but critic not approved → no-op
88
110
  * (h) Critic approved, phases incomplete, not yet PLAN_TO_EXECUTE → EXECUTE
89
111
  * (i-pre1) Phases complete, impl-review receipt missing → one-shot REVIEW_GATE directive
90
112
  * (i-pre2) Impl-review ok, recurrence-sweep receipt missing → one-shot RECURRENCE_GATE directive
91
- * (i) All phases complete + both gates verified, not yet EXECUTE_TO_COMMITpublication_handoff + COMMIT directive
113
+ * (i-pre3) Both ok, trace-validation receipts missing/failingone-shot TRACE_VALIDATION_GATE directive
114
+ * (i) All phases complete + all gates verified, not yet EXECUTE_TO_COMMIT → publication_handoff + COMMIT directive
92
115
  *
93
116
  * Idempotency: rows (f), (h), (i) return no-op when
94
117
  * `traceState.lastTransition` already equals the target transition value.
@@ -19,6 +19,9 @@ declare function _defaultReproductionReceiptExists(directory: string, issueNumbe
19
19
  declare function _defaultPublicationReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
20
20
  declare function _defaultRecurrenceSweepReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
21
21
  declare function _defaultImplementationReviewReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
22
+ declare function _defaultBranchFreshnessReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
23
+ declare function _defaultTraceValidationReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
24
+ declare function _defaultMergeApprovalReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
22
25
  export declare const _internals: {
23
26
  readFileSync: typeof readFileSync;
24
27
  writeFileSync: typeof writeFileSync;
@@ -31,6 +34,9 @@ export declare const _internals: {
31
34
  publicationReceiptExists: typeof _defaultPublicationReceiptExists;
32
35
  recurrenceSweepReceiptExists: typeof _defaultRecurrenceSweepReceiptExists;
33
36
  implementationReviewReceiptExists: typeof _defaultImplementationReviewReceiptExists;
37
+ branchFreshnessReceiptExists: typeof _defaultBranchFreshnessReceiptExists;
38
+ traceValidationReceiptExists: typeof _defaultTraceValidationReceiptExists;
39
+ mergeApprovalReceiptExists: typeof _defaultMergeApprovalReceiptExists;
34
40
  };
35
41
  /**
36
42
  * Reads `.swarm/issue-reference.json` and returns the parsed object,
@@ -108,4 +114,27 @@ export declare function recurrenceSweepReceiptExists(directory: string, issueNum
108
114
  * contexts both recorded APPROVE verdicts for the implementation diff.
109
115
  */
110
116
  export declare function implementationReviewReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
117
+ /**
118
+ * Returns whether a Phase 0 branch-freshness receipt permits the trace for the
119
+ * given issue (issue #2564, mirroring trace-check.sh phase0): `synced` permits;
120
+ * `behind:<n>` never permits; `fetch-failed:<reason>` permits only with a
121
+ * recorded non-empty user override.
122
+ */
123
+ export declare function branchFreshnessReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
124
+ /**
125
+ * Returns whether the per-phase trace-check.sh validator receipts for the given
126
+ * issue are green (issue #2564): at least one recorded validation exists and
127
+ * every entry (one per phase, upserted by the writer) is a `pass` bound to a
128
+ * 40-hex reviewedCommit + treeId. Any `fail` entry fails closed until that
129
+ * phase is re-recorded as a pass.
130
+ */
131
+ export declare function traceValidationReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
132
+ /**
133
+ * Returns whether a PR-head-bound merge-approval receipt exists for the given
134
+ * issue (issue #2564): both SHAs are 40-hex and prHeadSha equals
135
+ * finalCriticReviewedCommit, mirroring trace-check.sh merge_check's binding.
136
+ * Presence-and-binding only — the approval itself is human-enforced and is
137
+ * never certified by the plugin.
138
+ */
139
+ export declare function mergeApprovalReceiptExists(directory: string, issueNumber: number): Promise<boolean>;
111
140
  export {};
@@ -18,7 +18,7 @@
18
18
  import { getPlanLedgerStateReadOnly } from '../plan/ledger-sqlite';
19
19
  import { error as _logErrorImpl } from '../utils/logger.js';
20
20
  import { isPlanCriticApproved } from './delegation-gate';
21
- import { implementationReviewReceiptExists, publicationReceiptExists, readIssueReference, readPlanPhaseStatus, readSpecIssueNumber, readTraceState, recurrenceSweepReceiptExists, reproductionReceiptExists, specExists, writeTraceState } from './issue-trace-state';
21
+ import { branchFreshnessReceiptExists, implementationReviewReceiptExists, mergeApprovalReceiptExists, publicationReceiptExists, readIssueReference, readPlanPhaseStatus, readSpecIssueNumber, readTraceState, recurrenceSweepReceiptExists, reproductionReceiptExists, specExists, traceValidationReceiptExists, writeTraceState } from './issue-trace-state';
22
22
  export declare const _internals: {
23
23
  readIssueReference: typeof readIssueReference;
24
24
  readTraceState: typeof readTraceState;
@@ -30,6 +30,9 @@ export declare const _internals: {
30
30
  publicationReceiptExists: typeof publicationReceiptExists;
31
31
  recurrenceSweepReceiptExists: typeof recurrenceSweepReceiptExists;
32
32
  implementationReviewReceiptExists: typeof implementationReviewReceiptExists;
33
+ branchFreshnessReceiptExists: typeof branchFreshnessReceiptExists;
34
+ traceValidationReceiptExists: typeof traceValidationReceiptExists;
35
+ mergeApprovalReceiptExists: typeof mergeApprovalReceiptExists;
33
36
  isPlanCriticApproved: typeof isPlanCriticApproved;
34
37
  getPlanLedgerState: typeof getPlanLedgerStateReadOnly;
35
38
  logError: typeof _logErrorImpl;
@@ -33,6 +33,12 @@ export type TaskIdResolution = {
33
33
  };
34
34
  export interface ResolveTaskIdOptions {
35
35
  policy: TaskIdPolicy;
36
+ /**
37
+ * Restrict text-derived attribution to bare, standalone TASK lines. This is
38
+ * used for durable critic evidence, where quoted/example text is not proof
39
+ * that a critic was dispatched for a task. Structured ID fields still win.
40
+ */
41
+ standaloneTaskMarkerOnly?: boolean;
36
42
  knownPlanTaskIds?: ReadonlySet<string>;
37
43
  /** The caller observed a valid plan whose task-ID cardinality exceeded the bound. */
38
44
  planContextOverLimit?: boolean;
@@ -40,6 +46,7 @@ export interface ResolveTaskIdOptions {
40
46
  fallbackProvenUnique?: boolean;
41
47
  }
42
48
  export type TaskIdPlanContextOptions = Pick<ResolveTaskIdOptions, 'knownPlanTaskIds' | 'planContextOverLimit'>;
49
+ export declare const EXPLICIT_TASK_ID_FIELDS: readonly ["plan_task_id", "planTaskId", "task_id", "taskId"];
43
50
  /** Resolve a task identity without I/O or mutable session state. */
44
51
  export declare function resolveTaskId(input: Record<string, unknown>, options: ResolveTaskIdOptions): TaskIdResolution;
45
52
  /** Backward-compatible delegation API backed by the bounded plan policy. */