opencode-swarm 7.199.1 → 7.199.2
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/.opencode/skills/swarm-pr-feedback/SKILL.md +9 -9
- 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 +1 -1
- package/dist/background/workspace-snapshot.d.ts +51 -0
- package/dist/cli/{auto-checkpoint-x13d1g1t.js → auto-checkpoint-0ajspw7n.js} +5 -5
- package/dist/cli/{checkpoint-68nb8k3t.js → checkpoint-1dsrg3ft.js} +9 -9
- package/dist/cli/{coder-settlement-kmdmdpyy.js → coder-settlement-189074m3.js} +5 -5
- package/dist/cli/{config-doctor-4b0jb15n.js → config-doctor-20pd12nw.js} +8 -8
- package/dist/cli/{core-6kkm2vrz.js → core-5bqceeft.js} +2 -2
- package/dist/cli/{curator-z8xzxh9f.js → curator-b3zn9w9q.js} +28 -28
- package/dist/cli/{curator-drift-axcgdjy4.js → curator-drift-ka477rrz.js} +6 -6
- package/dist/cli/{curator-llm-factory-58ec737y.js → curator-llm-factory-nbprwszt.js} +28 -28
- package/dist/cli/{doctor-knowledge-receipt-phase-id-hkjt6hv4.js → doctor-knowledge-receipt-phase-id-nrk52ak6.js} +5 -5
- package/dist/cli/{evidence-summary-service-981cx8wa.js → evidence-summary-service-qrr8zjhj.js} +10 -10
- package/dist/cli/{gate-evidence-zyvwsp7a.js → gate-evidence-cbs5xh1n.js} +3 -3
- package/dist/cli/{guardrail-explain-23b0amne.js → guardrail-explain-6xd6r3f5.js} +29 -29
- package/dist/cli/{guardrail-log-s2gxszvm.js → guardrail-log-qn1sqjs9.js} +4 -4
- package/dist/cli/{guardrail-reset-kt18vr45.js → guardrail-reset-ha3w0nby.js} +28 -28
- package/dist/cli/{hive-promoter-fz7ep8h4.js → hive-promoter-2dnv2xrg.js} +28 -28
- package/dist/cli/{index-3zzxrwaf.js → index-46sgm9rd.js} +1 -1
- package/dist/cli/{index-bb2rx8k2.js → index-4py6w3hy.js} +3 -3
- package/dist/cli/{index-t1t93qm0.js → index-5mbpybdm.js} +2 -2
- package/dist/cli/{index-14vhp87b.js → index-5v0wkcd9.js} +2 -2
- package/dist/cli/{index-vj0zede7.js → index-67ad9qbe.js} +1 -1
- package/dist/cli/{index-w9f2jbwe.js → index-7d3ft7by.js} +1 -1
- package/dist/cli/{index-n9ry04hw.js → index-9qc7d3q2.js} +15 -11
- package/dist/cli/{index-m4s5a2sp.js → index-bz5h9ttt.js} +4 -4
- package/dist/cli/{index-61fa8hg7.js → index-c2eqtpk1.js} +2 -2
- package/dist/cli/{index-61m1jw7p.js → index-cpdcscwt.js} +2 -2
- package/dist/cli/{index-fmbqyqqw.js → index-djtqb6b7.js} +2 -2
- package/dist/cli/{index-jccs3fgn.js → index-dyp5807d.js} +13 -1
- package/dist/cli/{index-f900029m.js → index-eyt9ryhd.js} +4 -4
- package/dist/cli/{index-p35gw2x7.js → index-gfdz460m.js} +1 -1
- package/dist/cli/{index-nacmcvc4.js → index-hfsyvkn0.js} +4 -4
- package/dist/cli/{index-jhk4000q.js → index-hj76n215.js} +1 -1
- package/dist/cli/{index-9ztsfved.js → index-hz2609qt.js} +117 -2
- package/dist/cli/{index-ge7vn1vz.js → index-jrdepg4w.js} +1 -1
- package/dist/cli/{index-4rrff8k6.js → index-km9tjdgw.js} +3 -3
- package/dist/cli/{index-408tpd21.js → index-kwh4b9cm.js} +2 -2
- package/dist/cli/{index-mzx33w6e.js → index-mb3y5cgy.js} +5 -5
- package/dist/cli/{index-r7ayh42s.js → index-mbygjbj8.js} +4 -4
- package/dist/cli/{index-795vmpe6.js → index-qksw8p51.js} +28 -28
- package/dist/cli/{index-w4624tpw.js → index-r9s68beh.js} +1 -1
- package/dist/cli/{index-pf0xrx9w.js → index-skg220qc.js} +423 -117
- package/dist/cli/{index-8pyg2qnw.js → index-t6gsqe10.js} +2 -2
- package/dist/cli/{index-weewx5nx.js → index-vd6s2mxq.js} +1 -1
- package/dist/cli/{index-npy15m50.js → index-ve0ncsnc.js} +1 -1
- package/dist/cli/{index-xj9260dh.js → index-wz8zc7w3.js} +6 -6
- package/dist/cli/{index-nreezgrd.js → index-xapmt05a.js} +3 -3
- package/dist/cli/{index-hqrkr9ag.js → index-xfzkq1k4.js} +5 -5
- package/dist/cli/{index-px1dnna2.js → index-y4kjbf12.js} +1 -1
- package/dist/cli/{index-qqv9rr8k.js → index-zvjrymp9.js} +30 -30
- package/dist/cli/index.js +29 -29
- package/dist/cli/{knowledge-escalator-cf6m9y0s.js → knowledge-escalator-k1mssp9r.js} +8 -8
- package/dist/cli/{knowledge-events-hn5hymam.js → knowledge-events-f7c0z8rb.js} +6 -6
- package/dist/cli/{knowledge-store-mgqk4hvy.js → knowledge-store-50vj5db0.js} +1 -1
- package/dist/cli/{knowledge-validator-x9yrte9q.js → knowledge-validator-afxk6dvk.js} +2 -2
- package/dist/cli/{mcp-hpmh4d6d.js → mcp-j0grf8gt.js} +1 -1
- package/dist/cli/{model-preflight-ry5jjnx4.js → model-preflight-ks9j40t5.js} +28 -28
- package/dist/cli/{pending-delegations-j850kj5p.js → pending-delegations-e42yvvj0.js} +2 -2
- package/dist/cli/{pr-subscriptions-mme9gb5e.js → pr-subscriptions-e92eg4ts.js} +1 -1
- package/dist/cli/{pr-workflow-gate-n6bj3dnn.js → pr-workflow-gate-zqwde6r6.js} +28 -28
- package/dist/cli/{runner-qe3fkzx5.js → runner-7sd43gan.js} +1 -1
- package/dist/cli/{scan-cursor-fdpxbx4f.js → scan-cursor-yehnf9jt.js} +2 -2
- package/dist/cli/{schema-amcjvk8a.js → schema-jw861rj0.js} +2 -2
- package/dist/cli/{scope-persistence-mp4kqpk2.js → scope-persistence-p778xbbq.js} +6 -6
- package/dist/cli/{server-ptdvpwyd.js → server-nkhvbbc5.js} +101 -39
- package/dist/cli/{skill-generator-v59hhybn.js → skill-generator-dd1w9p3t.js} +9 -9
- package/dist/cli/{snapshot-coordination-init-nv6e4svp.js → snapshot-coordination-init-11qb0jbs.js} +28 -28
- package/dist/cli/{speckit-checkoff-me8kd3wd.js → speckit-checkoff-d92ej93g.js} +4 -4
- package/dist/cli/{workspace-snapshot-vhvrkbbb.js → workspace-snapshot-4zfj5wnd.js} +13 -1
- package/dist/cli/{worktree-collision-ownership-84qyqars.js → worktree-collision-ownership-81wpkagz.js} +2 -2
- package/dist/cli/{worktree-isolation-99qvz8ap.js → worktree-isolation-zw3ydg49.js} +28 -28
- package/dist/config/skill-contract-digest.d.ts +8 -0
- package/dist/hooks/pr-workflow-gate.d.ts +32 -23
- package/dist/host/v2/events.d.ts +19 -1
- package/dist/host/v2/hooks.d.ts +25 -0
- package/dist/index.js +61 -59
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/manifest.d.ts +1 -0
- package/dist/tools/prepare-pr-feedback-commit-message.d.ts +30 -0
- package/dist/tools/tool-metadata.d.ts +4 -4
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
compareWorkspaceSnapshot,
|
|
10
10
|
compareWorkspaceSnapshots,
|
|
11
11
|
digest,
|
|
12
|
+
fastForwardToRefAsync,
|
|
12
13
|
isSwarmRuntimePath,
|
|
13
14
|
parsePorcelainPaths,
|
|
14
15
|
parsePorcelainV2Snapshot,
|
|
@@ -28,13 +29,16 @@ import {
|
|
|
28
29
|
resolveExactRemoteBranchHeadAsync,
|
|
29
30
|
resolveGitControlStateDigest,
|
|
30
31
|
resolveGitControlStateDigestAsync,
|
|
32
|
+
resolveIsAncestorAsync,
|
|
31
33
|
resolveIsExactSingleChildCommit,
|
|
32
34
|
resolveIsExactSingleChildCommitAsync,
|
|
33
35
|
resolveIsWorkingTreeClean,
|
|
34
36
|
resolveIsWorkingTreeCleanAsync,
|
|
37
|
+
resolveLocalRefHeadAsync,
|
|
35
38
|
resolvePrFeedbackTrackingCandidatesAsync,
|
|
36
39
|
resolvePrReviewDiffStats,
|
|
37
40
|
resolvePrReviewDiffStatsAsync,
|
|
41
|
+
resolvePrWorkflowChangedPathSetAsync,
|
|
38
42
|
resolvePrWorkflowRevisionDigest,
|
|
39
43
|
resolvePrWorkflowRevisionDigestAsync,
|
|
40
44
|
resolvePrWorkflowRevisionDigestDetailed,
|
|
@@ -43,10 +47,12 @@ import {
|
|
|
43
47
|
resolveRemoteRefsContainingHeadAsync,
|
|
44
48
|
resolveRemoteUrlIdentity,
|
|
45
49
|
resolveRemoteUrlIdentityAsync,
|
|
50
|
+
resolveRepoTopLevelAsync,
|
|
51
|
+
resolveWorkingTreeDirtyPathsAsync,
|
|
46
52
|
shouldSkipSnapshot,
|
|
47
53
|
switchPrFeedbackTrackingCandidateAsync,
|
|
48
54
|
workspaceSnapshotMatches
|
|
49
|
-
} from "./index-
|
|
55
|
+
} from "./index-hz2609qt.js";
|
|
50
56
|
import"./index-820pzqd6.js";
|
|
51
57
|
import"./index-2s7dvzff.js";
|
|
52
58
|
import"./index-fzpt2djt.js";
|
|
@@ -59,6 +65,8 @@ export {
|
|
|
59
65
|
workspaceSnapshotMatches,
|
|
60
66
|
switchPrFeedbackTrackingCandidateAsync,
|
|
61
67
|
shouldSkipSnapshot,
|
|
68
|
+
resolveWorkingTreeDirtyPathsAsync,
|
|
69
|
+
resolveRepoTopLevelAsync,
|
|
62
70
|
resolveRemoteUrlIdentityAsync,
|
|
63
71
|
resolveRemoteUrlIdentity,
|
|
64
72
|
resolveRemoteRefsContainingHeadAsync,
|
|
@@ -67,13 +75,16 @@ export {
|
|
|
67
75
|
resolvePrWorkflowRevisionDigestDetailed,
|
|
68
76
|
resolvePrWorkflowRevisionDigestAsync,
|
|
69
77
|
resolvePrWorkflowRevisionDigest,
|
|
78
|
+
resolvePrWorkflowChangedPathSetAsync,
|
|
70
79
|
resolvePrReviewDiffStatsAsync,
|
|
71
80
|
resolvePrReviewDiffStats,
|
|
72
81
|
resolvePrFeedbackTrackingCandidatesAsync,
|
|
82
|
+
resolveLocalRefHeadAsync,
|
|
73
83
|
resolveIsWorkingTreeCleanAsync,
|
|
74
84
|
resolveIsWorkingTreeClean,
|
|
75
85
|
resolveIsExactSingleChildCommitAsync,
|
|
76
86
|
resolveIsExactSingleChildCommit,
|
|
87
|
+
resolveIsAncestorAsync,
|
|
77
88
|
resolveGitControlStateDigestAsync,
|
|
78
89
|
resolveGitControlStateDigest,
|
|
79
90
|
resolveExactRemoteBranchHeadAsync,
|
|
@@ -93,6 +104,7 @@ export {
|
|
|
93
104
|
parsePorcelainV2Snapshot,
|
|
94
105
|
parsePorcelainPaths,
|
|
95
106
|
isSwarmRuntimePath,
|
|
107
|
+
fastForwardToRefAsync,
|
|
96
108
|
digest,
|
|
97
109
|
compareWorkspaceSnapshots,
|
|
98
110
|
compareWorkspaceSnapshot,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
scanDelegationFallbacksForRecovery,
|
|
15
15
|
scanDelegationsForRecovery
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-hj76n215.js";
|
|
17
17
|
import"./index-820pzqd6.js";
|
|
18
18
|
import"./index-2s7dvzff.js";
|
|
19
19
|
import"./index-p5pgjp7n.js";
|
|
@@ -23,7 +23,7 @@ import"./index-ry16d01s.js";
|
|
|
23
23
|
import"./index-rdm3px0g.js";
|
|
24
24
|
import"./index-7pmbnjvj.js";
|
|
25
25
|
import"./index-hc6wa3yg.js";
|
|
26
|
-
import"./index-
|
|
26
|
+
import"./index-eyt9ryhd.js";
|
|
27
27
|
import"./index-vzm6zre7.js";
|
|
28
28
|
import"./index-ae75rja9.js";
|
|
29
29
|
import"./index-2bc7zfw3.js";
|
|
@@ -25,52 +25,52 @@ import {
|
|
|
25
25
|
sanitizeWorktreeTaskId,
|
|
26
26
|
standardWorktreeByCallID,
|
|
27
27
|
standardWorktreeSerializationSessions
|
|
28
|
-
} from "./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
28
|
+
} from "./index-skg220qc.js";
|
|
29
|
+
import"./index-kwh4b9cm.js";
|
|
30
|
+
import"./index-hfsyvkn0.js";
|
|
31
|
+
import"./index-y4kjbf12.js";
|
|
32
32
|
import"./index-j2vv0h13.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-dyp5807d.js";
|
|
34
34
|
import"./index-7c432abn.js";
|
|
35
35
|
import"./index-txdagbh7.js";
|
|
36
|
-
import"./index-
|
|
36
|
+
import"./index-r9s68beh.js";
|
|
37
37
|
import"./index-rdec0y3z.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
38
|
+
import"./index-ve0ncsnc.js";
|
|
39
|
+
import"./index-bz5h9ttt.js";
|
|
40
|
+
import"./index-9qc7d3q2.js";
|
|
41
|
+
import"./index-wz8zc7w3.js";
|
|
42
|
+
import"./index-hz2609qt.js";
|
|
43
43
|
import"./index-bkscmz4z.js";
|
|
44
44
|
import"./index-cjapb4hy.js";
|
|
45
45
|
import"./index-pxdc0qn1.js";
|
|
46
46
|
import"./index-pt7h91zc.js";
|
|
47
47
|
import"./index-q7sjgr1y.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
48
|
+
import"./index-4py6w3hy.js";
|
|
49
|
+
import"./index-mb3y5cgy.js";
|
|
50
50
|
import"./index-6b295cas.js";
|
|
51
51
|
import"./index-9nyqt3kb.js";
|
|
52
|
-
import"./index-
|
|
52
|
+
import"./index-xapmt05a.js";
|
|
53
53
|
import"./index-v3bmwmqw.js";
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
56
|
-
import"./index-
|
|
54
|
+
import"./index-7d3ft7by.js";
|
|
55
|
+
import"./index-46sgm9rd.js";
|
|
56
|
+
import"./index-cpdcscwt.js";
|
|
57
57
|
import"./index-g4fs6z4e.js";
|
|
58
|
-
import"./index-
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
58
|
+
import"./index-hj76n215.js";
|
|
59
|
+
import"./index-t6gsqe10.js";
|
|
60
|
+
import"./index-c2eqtpk1.js";
|
|
61
61
|
import"./index-m9zzj4ee.js";
|
|
62
62
|
import"./index-820pzqd6.js";
|
|
63
63
|
import"./index-2s7dvzff.js";
|
|
64
|
-
import"./index-
|
|
64
|
+
import"./index-67ad9qbe.js";
|
|
65
65
|
import"./index-2mx2gn97.js";
|
|
66
66
|
import"./index-rtry5xyf.js";
|
|
67
67
|
import {
|
|
68
68
|
resolveWorktreeIsolationConfig
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-km9tjdgw.js";
|
|
70
70
|
import"./index-g22dps7x.js";
|
|
71
71
|
import"./index-0725jpp7.js";
|
|
72
|
-
import"./index-
|
|
73
|
-
import"./index-
|
|
72
|
+
import"./index-jrdepg4w.js";
|
|
73
|
+
import"./index-djtqb6b7.js";
|
|
74
74
|
import"./index-h349p91m.js";
|
|
75
75
|
import"./index-p5pgjp7n.js";
|
|
76
76
|
import"./index-nr1pj3hy.js";
|
|
@@ -79,7 +79,7 @@ import"./index-ry16d01s.js";
|
|
|
79
79
|
import"./index-rdm3px0g.js";
|
|
80
80
|
import"./index-7pmbnjvj.js";
|
|
81
81
|
import"./index-hc6wa3yg.js";
|
|
82
|
-
import"./index-
|
|
82
|
+
import"./index-eyt9ryhd.js";
|
|
83
83
|
import"./index-vzm6zre7.js";
|
|
84
84
|
import"./index-ae75rja9.js";
|
|
85
85
|
import"./index-2bc7zfw3.js";
|
|
@@ -92,10 +92,10 @@ import"./index-ejhxgyvm.js";
|
|
|
92
92
|
import"./index-7g4c7s5r.js";
|
|
93
93
|
import"./index-ywb5er8g.js";
|
|
94
94
|
import"./index-gx2vp8gx.js";
|
|
95
|
-
import"./index-
|
|
95
|
+
import"./index-vd6s2mxq.js";
|
|
96
96
|
import"./index-zxdawwc7.js";
|
|
97
|
-
import"./index-
|
|
98
|
-
import"./index-
|
|
97
|
+
import"./index-5mbpybdm.js";
|
|
98
|
+
import"./index-xfzkq1k4.js";
|
|
99
99
|
import"./index-bk5tah7q.js";
|
|
100
100
|
import"./index-gknz3bv1.js";
|
|
101
101
|
import"./index-zpsr8rpc.js";
|
|
@@ -2,6 +2,14 @@ export declare const SKILL_CONTRACT_DIGEST_KEY = "swarm-contract-digest";
|
|
|
2
2
|
/**
|
|
3
3
|
* Split a SKILL.md into its frontmatter block (fences included) and body.
|
|
4
4
|
* A file without a well-formed opening/closing fence pair has no frontmatter.
|
|
5
|
+
* CRLF-tolerant (PR #3387 follow-up, FB-028): line endings are normalized
|
|
6
|
+
* before the fence scan, so a CRLF file returns real slices instead of an
|
|
7
|
+
* empty frontmatter — the previous LF-only scan silently disabled every
|
|
8
|
+
* bounded frontmatter surgery (stamp reads still worked because they
|
|
9
|
+
* normalize separately, but the reviser's version bumps no-op'd while the
|
|
10
|
+
* revision notes still claimed a bump). Returned slices are LF-normalized;
|
|
11
|
+
* every digest consumer normalizes the body anyway, so hashes are unchanged,
|
|
12
|
+
* and LF is the repo's checked-out policy (`.gitattributes` eol=lf).
|
|
5
13
|
*/
|
|
6
14
|
export declare function splitSkillFrontmatter(content: string): {
|
|
7
15
|
frontmatter: string;
|
|
@@ -5,7 +5,7 @@ import { type LaneOutputArtifact } from '../background/lane-output-store.js';
|
|
|
5
5
|
import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundDelegationWorkflowLaneRecovery, sweepStaleDelegations } from '../background/pending-delegations.js';
|
|
6
6
|
import { PR_REVIEW_BASE_DIMENSION_IDS, type PrReviewLaneResultEnvelope, type PrReviewResultReceipt, type PrReviewRiskImpact, type PrReviewRiskTag } from '../background/pr-review-contract.js';
|
|
7
7
|
import { type PrReviewInlineTriggerRow } from '../background/pr-review-trigger-contract.js';
|
|
8
|
-
import { type RevisionDigestResult, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveCurrentLocalHeadRefAsync, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestDetailed, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync, resolveRemoteUrlIdentity, resolveRemoteUrlIdentityAsync } from '../background/workspace-snapshot.js';
|
|
8
|
+
import { fastForwardToRefAsync, type RevisionDigestResult, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveCurrentLocalHeadRefAsync, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveIsAncestorAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolveLocalRefHeadAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolvePrWorkflowChangedPathSetAsync, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestDetailed, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync, resolveRemoteUrlIdentity, resolveRemoteUrlIdentityAsync, resolveRepoTopLevelAsync, resolveWorkingTreeDirtyPathsAsync } from '../background/workspace-snapshot.js';
|
|
9
9
|
import type { LaneLivenessWatchdogConfig } from '../config/schema.js';
|
|
10
10
|
import { type PrReviewResilienceConfig } from '../config/schema.js';
|
|
11
11
|
import { classifyPrWorkflowGitState, type PrWorkflowGitState } from '../git/pr-workflow-state.js';
|
|
@@ -262,6 +262,17 @@ interface PrFeedbackStageARecord {
|
|
|
262
262
|
id: string;
|
|
263
263
|
};
|
|
264
264
|
}>;
|
|
265
|
+
/**
|
|
266
|
+
* Caller-asserted base identity behind this run's trusted base-identical
|
|
267
|
+
* script/contract decisions. There is no durable PR_FEEDBACK base binding
|
|
268
|
+
* to verify against yet (pr-workflow-gate binds a merge base only for
|
|
269
|
+
* PR_REVIEW), so this is recorded for downstream detectability, not as a
|
|
270
|
+
* verified anchor; `baseVerification: 'caller-asserted'` marks runs where
|
|
271
|
+
* trust decisions consumed a caller-supplied merge base.
|
|
272
|
+
*/
|
|
273
|
+
baseRef?: string;
|
|
274
|
+
baseSha?: string;
|
|
275
|
+
baseVerification?: 'caller-asserted' | 'none';
|
|
265
276
|
validatedAt: string;
|
|
266
277
|
}
|
|
267
278
|
interface PrFeedbackGateBatchRecord {
|
|
@@ -1220,28 +1231,6 @@ export declare function recoverArmedPrWorkflow(directory: string, sessionID: str
|
|
|
1220
1231
|
}>;
|
|
1221
1232
|
/** Bind an active PR workflow to one immutable PR head. */
|
|
1222
1233
|
export declare function bindPrWorkflowHead(directory: string, sessionID: string, prHeadSha: string): Promise<PrWorkflowGateState>;
|
|
1223
|
-
/**
|
|
1224
|
-
* Controlled base-sync/rebind transition for PR_FEEDBACK (issue #2131
|
|
1225
|
-
* criterion C2). After a merge/rebase used to resolve base drift or conflicts,
|
|
1226
|
-
* the local history is no longer a direct child of the original intake head and
|
|
1227
|
-
* the ordinary publication path can never be satisfied. Instead of an ad-hoc
|
|
1228
|
-
* abort, this transition moves the immutable intake head to a NEW verified
|
|
1229
|
-
* remote PR head and invalidates every ancestry-bound receipt (Stage A,
|
|
1230
|
-
* verification batches, ordered gates), forcing the full mechanical ladder to
|
|
1231
|
-
* re-run against the new ancestry.
|
|
1232
|
-
*
|
|
1233
|
-
* Fail-closed semantics:
|
|
1234
|
-
* 1. Only an active PR_FEEDBACK gate bound to a head may rebind.
|
|
1235
|
-
* 2. Refuses while publication is armed — an armed gate must complete (the
|
|
1236
|
-
* immutable-commit binding must not be dropped silently).
|
|
1237
|
-
* 3. Refuses while PR workflow lanes are in flight.
|
|
1238
|
-
* 4. The new head must differ from the current intake head (a no-op rebind
|
|
1239
|
-
* would silently launder receipts).
|
|
1240
|
-
* 5. The current checkout must equal the new head, and the PR-feedback
|
|
1241
|
-
* tracking-checkout discipline is re-asserted for it.
|
|
1242
|
-
* 6. The immutable feedback inventory is preserved (item ownership
|
|
1243
|
-
* continuity); only ancestry-bound receipts are invalidated.
|
|
1244
|
-
*/
|
|
1245
1234
|
export declare function rebindPrFeedbackHead(directory: string, sessionID: string, prHeadSha: string): Promise<PrWorkflowGateState>;
|
|
1246
1235
|
/** Bind an active PR_REVIEW workflow to one immutable merge-base scope. */
|
|
1247
1236
|
export declare function bindPrReviewBase(directory: string, sessionID: string, options: {
|
|
@@ -1388,6 +1377,17 @@ export declare function recordPrFeedbackStageA(directory: string, sessionID: str
|
|
|
1388
1377
|
id: string;
|
|
1389
1378
|
};
|
|
1390
1379
|
}>;
|
|
1380
|
+
/**
|
|
1381
|
+
* Caller-asserted base identity consumed by this run's trusted
|
|
1382
|
+
* base-identical decisions. Recorded (not verified): no durable
|
|
1383
|
+
* PR_FEEDBACK base binding exists yet, so the receipt marks the trust
|
|
1384
|
+
* floor honestly instead of leaving substitution silent.
|
|
1385
|
+
*/
|
|
1386
|
+
baseIdentity?: {
|
|
1387
|
+
baseRef?: string;
|
|
1388
|
+
baseSha?: string;
|
|
1389
|
+
baseVerification: 'caller-asserted' | 'none';
|
|
1390
|
+
};
|
|
1391
1391
|
}): Promise<PrWorkflowGateState>;
|
|
1392
1392
|
/** Record one ordered, single-lane feedback validation phase before launch. */
|
|
1393
1393
|
export declare function recordPrFeedbackGateBatch(directory: string, sessionID: string, phase: PrFeedbackGatePhase, lane: PrFeedbackLaneOwnership, options: {
|
|
@@ -1942,6 +1942,9 @@ export declare const _test_exports: {
|
|
|
1942
1942
|
id: string;
|
|
1943
1943
|
} | undefined;
|
|
1944
1944
|
}[] | undefined;
|
|
1945
|
+
baseRef?: string | undefined;
|
|
1946
|
+
baseSha?: string | undefined;
|
|
1947
|
+
baseVerification?: "none" | "caller-asserted" | undefined;
|
|
1945
1948
|
} | undefined;
|
|
1946
1949
|
prFeedbackGateBatches?: {
|
|
1947
1950
|
batchId: string;
|
|
@@ -2197,6 +2200,12 @@ export declare const _test_exports: {
|
|
|
2197
2200
|
resolveCommitCountSinceAsync: typeof resolveCommitCountSinceAsync;
|
|
2198
2201
|
resolveIsWorkingTreeClean: typeof resolveIsWorkingTreeClean;
|
|
2199
2202
|
resolveIsWorkingTreeCleanAsync: typeof resolveIsWorkingTreeCleanAsync;
|
|
2203
|
+
resolveLocalRefHeadAsync: typeof resolveLocalRefHeadAsync;
|
|
2204
|
+
resolveIsAncestorAsync: typeof resolveIsAncestorAsync;
|
|
2205
|
+
fastForwardToRefAsync: typeof fastForwardToRefAsync;
|
|
2206
|
+
resolveRepoTopLevelAsync: typeof resolveRepoTopLevelAsync;
|
|
2207
|
+
resolvePrWorkflowChangedPathSetAsync: typeof resolvePrWorkflowChangedPathSetAsync;
|
|
2208
|
+
resolveWorkingTreeDirtyPathsAsync: typeof resolveWorkingTreeDirtyPathsAsync;
|
|
2200
2209
|
resolveIsExactSingleChildCommit: typeof resolveIsExactSingleChildCommit;
|
|
2201
2210
|
resolveIsExactSingleChildCommitAsync: typeof resolveIsExactSingleChildCommitAsync;
|
|
2202
2211
|
resolvePrReviewDiffStats: typeof resolvePrReviewDiffStats;
|
package/dist/host/v2/events.d.ts
CHANGED
|
@@ -37,8 +37,26 @@ interface MappedEvent {
|
|
|
37
37
|
type: string;
|
|
38
38
|
properties: Record<string, unknown>;
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Host event names this pump reads OUTSIDE the mapper switch (issue #3401,
|
|
42
|
+
* PR #3402 review PRR-004). The frozen `#3022` event-name contract test pins
|
|
43
|
+
* only mapper `case` labels, so a name read pump-side must be pinned here or a
|
|
44
|
+
* host rename/omission silently disables the feature with every test green —
|
|
45
|
+
* the exact defect class that contract exists to prevent. `input.started` is
|
|
46
|
+
* the sole source of the subagent gate below; `agent.selected` seeds v1
|
|
47
|
+
* session identity.
|
|
48
|
+
*/
|
|
49
|
+
export declare const PUMP_SIDE_READ_EVENT_NAMES: readonly ["session.tool.input.started", "session.agent.selected"];
|
|
50
|
+
/** Drop the pump-side tool-name registry. Called by the v2 plugin cleanup so a
|
|
51
|
+
* re-setup in the same process starts without stale (session,call)→name
|
|
52
|
+
* residue, and exported through `_internals` for test isolation (AGENTS.md
|
|
53
|
+
* invariant 7/8). */
|
|
54
|
+
export declare function clearToolNameRegistry(): void;
|
|
55
|
+
export declare const _internals: {
|
|
56
|
+
clearToolNameRegistry: typeof clearToolNameRegistry;
|
|
57
|
+
};
|
|
40
58
|
/** Map a v2 event envelope onto the v1 handler input (or undefined). */
|
|
41
|
-
export declare function mapV2EventToV1(envelope: V2EventEnvelope): MappedEvent | undefined;
|
|
59
|
+
export declare function mapV2EventToV1(envelope: V2EventEnvelope, lookupToolName?: (sessionID: string, callID: string) => string | undefined): MappedEvent | undefined;
|
|
42
60
|
/**
|
|
43
61
|
* Seed v1 session identity from identity-bearing v2 envelopes (issue #3022 D1).
|
|
44
62
|
*
|
package/dist/host/v2/hooks.d.ts
CHANGED
|
@@ -25,6 +25,31 @@
|
|
|
25
25
|
* (fail-closed preserved; documented v2 delta in the inventory).
|
|
26
26
|
*/
|
|
27
27
|
import type { V1HooksSubset, V2PluginContext, V2Registration } from './types';
|
|
28
|
+
/**
|
|
29
|
+
* v2 delegation-tool identity translation (issue #3169 Phase 1 / #3165 §D).
|
|
30
|
+
*
|
|
31
|
+
* OpenCode 2 renamed the native subagent tool: v1 `task` (args `subagent_type`,
|
|
32
|
+
* `task_id`) became v2 `subagent` (args `agent`, `sessionID`), and its result
|
|
33
|
+
* text is wrapped as `<subagent sessionID="…" state="…">…</subagent>` instead
|
|
34
|
+
* of the v1 `<task id="…" state="…"><task_result>…</task_result></task>`
|
|
35
|
+
* envelope (live-verified on @opencode/cli 2.0.26 — issue #3169 Phase 0). The
|
|
36
|
+
* v1 chain (delegation gate, ack collectors, residue commit) recognizes only
|
|
37
|
+
* the v1 names, so the adapter translates at this boundary and Epic/gate code
|
|
38
|
+
* stays untouched.
|
|
39
|
+
*/
|
|
40
|
+
/** Mirrors `isTaskToolId`'s shape (dotted SDK form OR normalized base name).
|
|
41
|
+
* Exported for the event pump's progress-event gating (issue #3401). */
|
|
42
|
+
export declare function isV2SubagentToolId(toolName: string | null | undefined): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Any recognized v2 subagent id (bare, namespace-prefixed, or dotted) is handed
|
|
45
|
+
* to the v1 chain as the bare v1 id `task`. The v1 host reports the native tool
|
|
46
|
+
* bare, and six collectors compare the name literally
|
|
47
|
+
* (`tool === 'Task' || tool === 'task'`), so a prefixed/dotted output would
|
|
48
|
+
* keep them dead — every recognized form collapses to `task`.
|
|
49
|
+
*/
|
|
50
|
+
/** Plain-object shape guard (arrays/instances rejected); exported for the
|
|
51
|
+
* event pump's progress-metadata validation (issue #3401 / PR #3402). */
|
|
52
|
+
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
28
53
|
/** Register the tool hooks (execute.before/after). */
|
|
29
54
|
export declare function registerV2ToolHooks(ctx: V2PluginContext, hooks: V1HooksSubset, directory: string, registrations: V2Registration[]): Promise<void>;
|
|
30
55
|
/** Register the compaction + prompt session hooks. */
|