opencode-swarm 7.133.0 → 7.134.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.
- package/dist/background/completion-observer.d.ts +17 -7
- package/dist/background/pending-delegations.d.ts +305 -30
- package/dist/cli/{config-doctor-8nbdwnn6.js → config-doctor-t5r92674.js} +3 -3
- package/dist/cli/{core-egwpry19.js → core-d6yd2jzv.js} +3 -3
- package/dist/cli/{curation-policy-gae3xm5d.js → curation-policy-3smfn2a3.js} +7 -7
- package/dist/cli/{curator-drift-ea0p8nh1.js → curator-drift-tsyyf4b4.js} +6 -6
- package/dist/cli/{curator-e88bm4mg.js → curator-hva8f3nf.js} +31 -28
- package/dist/cli/{curator-llm-factory-1a7esr69.js → curator-llm-factory-p3aqev12.js} +31 -28
- package/dist/cli/{dispatch-3mhgqj2x.js → dispatch-gxbeb2ps.js} +2 -2
- package/dist/cli/{evidence-summary-service-nhsmsap8.js → evidence-summary-service-mrzsjpg4.js} +13 -12
- package/dist/cli/{gate-evidence-cy2te3x8.js → gate-evidence-b5v1xvxp.js} +4 -4
- package/dist/cli/guardrail-explain-k8mcvk61.js +57 -0
- package/dist/cli/{guardrail-log-fjgyx76r.js → guardrail-log-absma1rv.js} +5 -5
- package/dist/cli/{hive-promoter-2b04e0wh.js → hive-promoter-jwd51gzk.js} +31 -28
- package/dist/cli/{index-g4mnf3p5.js → index-1j3682j8.js} +5 -5
- package/dist/cli/{index-7ftthvqt.js → index-2njes601.js} +8 -8
- package/dist/cli/{index-17zjp67y.js → index-2t1n9k7b.js} +4 -4
- package/dist/cli/{index-mwqfyjja.js → index-3dtjhr26.js} +48538 -48840
- package/dist/cli/{index-2tn5h2zp.js → index-4p02dp92.js} +6 -6
- package/dist/cli/index-b4z7s917.js +80 -0
- package/dist/cli/{index-wzb4dv5s.js → index-b5ek2cge.js} +4 -4
- package/dist/cli/index-b8zgtz81.js +123 -0
- package/dist/cli/{index-j5pnah1w.js → index-baawkm48.js} +12 -12
- package/dist/cli/{index-sp7tm8t7.js → index-c3e0ymrg.js} +1 -1
- package/dist/cli/{index-q27bajqb.js → index-cfkvc5q9.js} +3 -3
- package/dist/cli/{index-7mkpsw6g.js → index-dd7ttx8x.js} +1 -1
- package/dist/cli/{index-bz08438z.js → index-dgxgvzab.js} +7 -7
- package/dist/cli/{index-mhcge2ry.js → index-eedq2y40.js} +33 -30
- package/dist/cli/{index-tj2mkfb3.js → index-g87ty4wp.js} +1 -1
- package/dist/cli/{index-mmvaf4t6.js → index-hgh01f6h.js} +25 -3
- package/dist/cli/{index-0vd91yb8.js → index-j6ywarjp.js} +3 -3
- package/dist/cli/{index-cpest8sa.js → index-jpkxjmfw.js} +5 -5
- package/dist/cli/{index-r260ybay.js → index-k742ecbm.js} +178 -222
- package/dist/cli/{index-hfpw5m0e.js → index-kapharv7.js} +3 -3
- package/dist/cli/{index-66zght9d.js → index-m2s0gbzt.js} +2 -2
- package/dist/cli/{index-74tptrss.js → index-p8hezdtz.js} +1 -1
- package/dist/cli/{index-sw82jvf2.js → index-rkyhv4p5.js} +2 -2
- package/dist/cli/{index-3x761jqv.js → index-wk1h5ec2.js} +1 -1
- package/dist/cli/{index-kc1m6vpr.js → index-xfejq1p9.js} +2 -2
- package/dist/cli/{index-wz36r0fk.js → index-y0kk3rtv.js} +2 -2
- package/dist/cli/index-y3v1404y.js +1625 -0
- package/dist/cli/index.js +31 -28
- package/dist/cli/{knowledge-escalator-hzkw1ban.js → knowledge-escalator-mkdac2m7.js} +8 -8
- package/dist/cli/{knowledge-events-pbycdhqd.js → knowledge-events-jjc9qbe0.js} +6 -6
- package/dist/cli/{knowledge-link-4yd2z8ev.js → knowledge-link-nc4y2zkq.js} +5 -5
- package/dist/cli/{knowledge-store-45jawb2p.js → knowledge-store-9e0w1kxm.js} +6 -6
- package/dist/cli/{knowledge-validator-ge576f8n.js → knowledge-validator-h1nrn2pk.js} +9 -9
- package/dist/cli/pending-delegations-v9e40hfk.js +96 -0
- package/dist/cli/{pr-subscriptions-zqbmctwz.js → pr-subscriptions-ztq40hrt.js} +7 -7
- package/dist/cli/{scan-cursor-kvw872be.js → scan-cursor-mk3tq3sf.js} +7 -7
- package/dist/cli/{schema-a2zm2m3r.js → schema-bjb0yzsq.js} +2 -2
- package/dist/cli/{scope-persistence-5qypzxxm.js → scope-persistence-hz3zmmsv.js} +5 -5
- package/dist/cli/{skill-generator-ch79hvxh.js → skill-generator-p1de0wkr.js} +10 -10
- package/dist/cli/worktree-collision-ownership-c4bdnjtx.js +221 -0
- package/dist/evaluation/contracts.d.ts +1 -1
- package/dist/evaluation/public-api.d.ts +1 -1
- package/dist/hooks/delegation-gate/worktree-collision-ownership.d.ts +28 -0
- package/dist/hooks/delegation-gate/worktree-isolation.d.ts +63 -1
- package/dist/hooks/delegation-gate/worktree-merge-status.d.ts +14 -0
- package/dist/hooks/delegation-gate/worktree-ownership-tag.d.ts +19 -0
- package/dist/hooks/delegation-gate/worktree-provisioning-owner.d.ts +30 -0
- package/dist/hooks/delegation-gate.d.ts +14 -5
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/init-orphan-recovery.d.ts +17 -0
- package/dist/index.js +476 -470
- package/dist/memory/schema.d.ts +4 -4
- package/dist/session/snapshot-writer.d.ts +2 -0
- package/dist/state.d.ts +43 -1
- package/dist/tools/dispatch-lanes.d.ts +1 -1
- package/dist/tools/epic-record-divergence.d.ts +5 -5
- package/dist/worktree/merge.d.ts +47 -1
- package/package.json +1 -1
- package/dist/cli/guardrail-explain-zgja2b9m.js +0 -54
- package/dist/cli/pending-delegations-kxy8mdqg.js +0 -75
- package/dist/cli/{index-9f71ye47.js → index-13xxjfhn.js} +3 -3
- package/dist/cli/{index-s80bsjkj.js → index-2ghkk9ve.js} +6 -6
- package/dist/cli/{index-76kvm9z5.js → index-5nybajn9.js} +3 -3
package/dist/cli/index.js
CHANGED
|
@@ -6,29 +6,30 @@ import {
|
|
|
6
6
|
getPluginConfigDir,
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
resolveCommand
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
9
|
+
} from "./index-3dtjhr26.js";
|
|
10
|
+
import"./index-13xxjfhn.js";
|
|
11
|
+
import"./index-hgh01f6h.js";
|
|
12
|
+
import"./index-g87ty4wp.js";
|
|
13
|
+
import"./index-k742ecbm.js";
|
|
13
14
|
import"./index-4905hd2m.js";
|
|
14
15
|
import"./index-134d35c1.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-66zght9d.js";
|
|
16
|
+
import"./index-j6ywarjp.js";
|
|
17
|
+
import"./index-jpkxjmfw.js";
|
|
18
|
+
import"./index-m2s0gbzt.js";
|
|
19
19
|
import"./index-vxv732ex.js";
|
|
20
20
|
import"./index-c8s9a3zh.js";
|
|
21
21
|
import"./index-9ss2m4rs.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
22
|
+
import"./index-wk1h5ec2.js";
|
|
23
|
+
import"./index-1j3682j8.js";
|
|
24
|
+
import"./index-2njes601.js";
|
|
25
|
+
import"./index-y0kk3rtv.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-baawkm48.js";
|
|
28
|
+
import"./index-dgxgvzab.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
30
|
+
import"./index-cfkvc5q9.js";
|
|
31
|
+
import"./index-dd7ttx8x.js";
|
|
32
|
+
import"./index-xfejq1p9.js";
|
|
32
33
|
import"./index-k5jrywpr.js";
|
|
33
34
|
import"./index-n832052r.js";
|
|
34
35
|
import {
|
|
@@ -36,27 +37,29 @@ import {
|
|
|
36
37
|
init_constants,
|
|
37
38
|
init_package,
|
|
38
39
|
package_default
|
|
39
|
-
} from "./index-
|
|
40
|
+
} from "./index-b5ek2cge.js";
|
|
40
41
|
import"./index-bk5tah7q.js";
|
|
41
42
|
import"./index-8fwhhayc.js";
|
|
42
43
|
import"./index-q1exe2b3.js";
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
44
|
+
import"./index-p8hezdtz.js";
|
|
45
|
+
import"./index-4p02dp92.js";
|
|
45
46
|
import"./index-1kz6da87.js";
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-
|
|
47
|
+
import"./index-b4z7s917.js";
|
|
48
|
+
import"./index-b8zgtz81.js";
|
|
49
|
+
import"./index-2t1n9k7b.js";
|
|
48
50
|
import"./index-4rhhvd1a.js";
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-h3k62043.js";
|
|
52
|
-
import"./index-3x761jqv.js";
|
|
53
|
-
import"./index-7mkpsw6g.js";
|
|
51
|
+
import"./index-y3v1404y.js";
|
|
52
|
+
import"./index-2ghkk9ve.js";
|
|
54
53
|
import"./index-fsrp8wp3.js";
|
|
55
|
-
import"./index-
|
|
54
|
+
import"./index-5nybajn9.js";
|
|
55
|
+
import"./index-7g4c7s5r.js";
|
|
56
56
|
import"./index-q2rrv0cy.js";
|
|
57
57
|
import"./index-bpmtbmy9.js";
|
|
58
|
-
import"./index-
|
|
58
|
+
import"./index-z6xqpmqg.js";
|
|
59
|
+
import"./index-zjygnfay.js";
|
|
59
60
|
import"./index-qe3v54nb.js";
|
|
61
|
+
import"./index-zgwm4ryv.js";
|
|
62
|
+
import"./index-h3k62043.js";
|
|
60
63
|
import"./index-a76rekgs.js";
|
|
61
64
|
|
|
62
65
|
// src/cli/index.ts
|
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-jpkxjmfw.js";
|
|
12
|
+
import"./index-baawkm48.js";
|
|
13
|
+
import"./index-dgxgvzab.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
|
-
import"./index-
|
|
15
|
+
import"./index-cfkvc5q9.js";
|
|
16
|
+
import"./index-dd7ttx8x.js";
|
|
16
17
|
import"./index-bk5tah7q.js";
|
|
17
|
-
import"./index-zgwm4ryv.js";
|
|
18
|
-
import"./index-7mkpsw6g.js";
|
|
19
18
|
import"./index-fsrp8wp3.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-q2rrv0cy.js";
|
|
19
|
+
import"./index-5nybajn9.js";
|
|
22
20
|
import"./index-7g4c7s5r.js";
|
|
21
|
+
import"./index-q2rrv0cy.js";
|
|
23
22
|
import"./index-qe3v54nb.js";
|
|
23
|
+
import"./index-zgwm4ryv.js";
|
|
24
24
|
import"./index-a76rekgs.js";
|
|
25
25
|
export {
|
|
26
26
|
readRecentEscalations,
|
|
@@ -26,16 +26,16 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-dgxgvzab.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-7mkpsw6g.js";
|
|
31
|
+
import"./index-cfkvc5q9.js";
|
|
32
|
+
import"./index-dd7ttx8x.js";
|
|
34
33
|
import"./index-fsrp8wp3.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-q2rrv0cy.js";
|
|
34
|
+
import"./index-5nybajn9.js";
|
|
37
35
|
import"./index-7g4c7s5r.js";
|
|
36
|
+
import"./index-q2rrv0cy.js";
|
|
38
37
|
import"./index-qe3v54nb.js";
|
|
38
|
+
import"./index-zgwm4ryv.js";
|
|
39
39
|
import"./index-a76rekgs.js";
|
|
40
40
|
export {
|
|
41
41
|
resolveLegacyApplicationLogPath,
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
resolveLinkDir,
|
|
13
13
|
sanitizeLinkId,
|
|
14
14
|
writeLinkPointer
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-7mkpsw6g.js";
|
|
15
|
+
} from "./index-cfkvc5q9.js";
|
|
16
|
+
import"./index-dd7ttx8x.js";
|
|
18
17
|
import"./index-fsrp8wp3.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-q2rrv0cy.js";
|
|
18
|
+
import"./index-5nybajn9.js";
|
|
21
19
|
import"./index-7g4c7s5r.js";
|
|
20
|
+
import"./index-q2rrv0cy.js";
|
|
22
21
|
import"./index-qe3v54nb.js";
|
|
22
|
+
import"./index-zgwm4ryv.js";
|
|
23
23
|
import"./index-a76rekgs.js";
|
|
24
24
|
export {
|
|
25
25
|
writeLinkPointer,
|
|
@@ -41,19 +41,19 @@ import {
|
|
|
41
41
|
transactKnowledge,
|
|
42
42
|
transactKnowledgeWithCas,
|
|
43
43
|
wordBigrams
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-baawkm48.js";
|
|
45
45
|
import {
|
|
46
46
|
resolveHiveDataDir
|
|
47
47
|
} from "./index-ae75rja9.js";
|
|
48
|
-
import"./index-
|
|
48
|
+
import"./index-cfkvc5q9.js";
|
|
49
|
+
import"./index-dd7ttx8x.js";
|
|
49
50
|
import"./index-bk5tah7q.js";
|
|
50
|
-
import"./index-zgwm4ryv.js";
|
|
51
|
-
import"./index-7mkpsw6g.js";
|
|
52
51
|
import"./index-fsrp8wp3.js";
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-q2rrv0cy.js";
|
|
52
|
+
import"./index-5nybajn9.js";
|
|
55
53
|
import"./index-7g4c7s5r.js";
|
|
54
|
+
import"./index-q2rrv0cy.js";
|
|
56
55
|
import"./index-qe3v54nb.js";
|
|
56
|
+
import"./index-zgwm4ryv.js";
|
|
57
57
|
import"./index-a76rekgs.js";
|
|
58
58
|
export {
|
|
59
59
|
wordBigrams,
|
|
@@ -23,21 +23,21 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-2njes601.js";
|
|
27
|
+
import"./index-y0kk3rtv.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-baawkm48.js";
|
|
30
|
+
import"./index-dgxgvzab.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-cfkvc5q9.js";
|
|
33
|
+
import"./index-dd7ttx8x.js";
|
|
33
34
|
import"./index-bk5tah7q.js";
|
|
34
|
-
import"./index-zgwm4ryv.js";
|
|
35
|
-
import"./index-7mkpsw6g.js";
|
|
36
35
|
import"./index-fsrp8wp3.js";
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-q2rrv0cy.js";
|
|
36
|
+
import"./index-5nybajn9.js";
|
|
39
37
|
import"./index-7g4c7s5r.js";
|
|
38
|
+
import"./index-q2rrv0cy.js";
|
|
40
39
|
import"./index-qe3v54nb.js";
|
|
40
|
+
import"./index-zgwm4ryv.js";
|
|
41
41
|
import"./index-a76rekgs.js";
|
|
42
42
|
export {
|
|
43
43
|
validateSkillPath,
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
BACKGROUND_CODER_RESERVATIONS_FILE,
|
|
4
|
+
BACKGROUND_DELEGATIONS_FILE,
|
|
5
|
+
BACKGROUND_DELEGATION_FALLBACK_DIR,
|
|
6
|
+
BACKGROUND_INGESTION_LEASE_MS,
|
|
7
|
+
MAX_BACKGROUND_ADVISORY_CHARS,
|
|
8
|
+
MAX_BACKGROUND_OBSERVED_FILES,
|
|
9
|
+
MAX_LIVE_BACKGROUND_CODER_RESERVATIONS,
|
|
10
|
+
MAX_LIVE_BACKGROUND_FALLBACKS,
|
|
11
|
+
acknowledgeObservedBackgroundAdvisories,
|
|
12
|
+
appendDelegationTransition,
|
|
13
|
+
bindBackgroundCoderReservation,
|
|
14
|
+
buildBackgroundCoderReservationId,
|
|
15
|
+
buildBackgroundCompletionEventId,
|
|
16
|
+
buildPromptSnapshot,
|
|
17
|
+
claimCoderSettlement,
|
|
18
|
+
claimDelegationIngestion,
|
|
19
|
+
claimTerminalResult,
|
|
20
|
+
findByBatchId,
|
|
21
|
+
findByCorrelationId,
|
|
22
|
+
findDelegationForCompletion,
|
|
23
|
+
findOpenAsyncLaneBatches,
|
|
24
|
+
listDelegationFallbacks,
|
|
25
|
+
normalizeBackgroundObservedFiles,
|
|
26
|
+
preparePendingBackgroundAdvisories,
|
|
27
|
+
promoteDelegationFallback,
|
|
28
|
+
putPendingBackgroundAdvisory,
|
|
29
|
+
readDelegationFallback,
|
|
30
|
+
readDelegations,
|
|
31
|
+
recordDelegationIngestionResult,
|
|
32
|
+
recordPendingDelegation,
|
|
33
|
+
releaseBackgroundCoderReservation,
|
|
34
|
+
releasePreparedBackgroundAdvisories,
|
|
35
|
+
removeDelegationFallback,
|
|
36
|
+
reserveBackgroundCoderSlot,
|
|
37
|
+
scanBackgroundCoderReservationsForAdmission,
|
|
38
|
+
scanDelegationFallbacksForRecovery,
|
|
39
|
+
scanDelegationsForRecovery,
|
|
40
|
+
sweepStaleDelegations,
|
|
41
|
+
updateCoderSettlement,
|
|
42
|
+
writeDelegationFallback
|
|
43
|
+
} from "./index-y3v1404y.js";
|
|
44
|
+
import"./index-2ghkk9ve.js";
|
|
45
|
+
import"./index-fsrp8wp3.js";
|
|
46
|
+
import"./index-5nybajn9.js";
|
|
47
|
+
import"./index-7g4c7s5r.js";
|
|
48
|
+
import"./index-q2rrv0cy.js";
|
|
49
|
+
import"./index-bpmtbmy9.js";
|
|
50
|
+
import"./index-z6xqpmqg.js";
|
|
51
|
+
import"./index-zjygnfay.js";
|
|
52
|
+
import"./index-qe3v54nb.js";
|
|
53
|
+
import"./index-zgwm4ryv.js";
|
|
54
|
+
import"./index-a76rekgs.js";
|
|
55
|
+
export {
|
|
56
|
+
writeDelegationFallback,
|
|
57
|
+
updateCoderSettlement,
|
|
58
|
+
sweepStaleDelegations,
|
|
59
|
+
scanDelegationsForRecovery,
|
|
60
|
+
scanDelegationFallbacksForRecovery,
|
|
61
|
+
scanBackgroundCoderReservationsForAdmission,
|
|
62
|
+
reserveBackgroundCoderSlot,
|
|
63
|
+
removeDelegationFallback,
|
|
64
|
+
releasePreparedBackgroundAdvisories,
|
|
65
|
+
releaseBackgroundCoderReservation,
|
|
66
|
+
recordPendingDelegation,
|
|
67
|
+
recordDelegationIngestionResult,
|
|
68
|
+
readDelegations,
|
|
69
|
+
readDelegationFallback,
|
|
70
|
+
putPendingBackgroundAdvisory,
|
|
71
|
+
promoteDelegationFallback,
|
|
72
|
+
preparePendingBackgroundAdvisories,
|
|
73
|
+
normalizeBackgroundObservedFiles,
|
|
74
|
+
listDelegationFallbacks,
|
|
75
|
+
findOpenAsyncLaneBatches,
|
|
76
|
+
findDelegationForCompletion,
|
|
77
|
+
findByCorrelationId,
|
|
78
|
+
findByBatchId,
|
|
79
|
+
claimTerminalResult,
|
|
80
|
+
claimDelegationIngestion,
|
|
81
|
+
claimCoderSettlement,
|
|
82
|
+
buildPromptSnapshot,
|
|
83
|
+
buildBackgroundCompletionEventId,
|
|
84
|
+
buildBackgroundCoderReservationId,
|
|
85
|
+
bindBackgroundCoderReservation,
|
|
86
|
+
appendDelegationTransition,
|
|
87
|
+
acknowledgeObservedBackgroundAdvisories,
|
|
88
|
+
MAX_LIVE_BACKGROUND_FALLBACKS,
|
|
89
|
+
MAX_LIVE_BACKGROUND_CODER_RESERVATIONS,
|
|
90
|
+
MAX_BACKGROUND_OBSERVED_FILES,
|
|
91
|
+
MAX_BACKGROUND_ADVISORY_CHARS,
|
|
92
|
+
BACKGROUND_INGESTION_LEASE_MS,
|
|
93
|
+
BACKGROUND_DELEGATION_FALLBACK_DIR,
|
|
94
|
+
BACKGROUND_DELEGATIONS_FILE,
|
|
95
|
+
BACKGROUND_CODER_RESERVATIONS_FILE
|
|
96
|
+
};
|
|
@@ -9,17 +9,17 @@ import {
|
|
|
9
9
|
sweepStale,
|
|
10
10
|
unsubscribe,
|
|
11
11
|
updateSnapshot
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-z6xqpmqg.js";
|
|
15
|
-
import"./index-zjygnfay.js";
|
|
16
|
-
import"./index-zgwm4ryv.js";
|
|
12
|
+
} from "./index-1j3682j8.js";
|
|
13
|
+
import"./index-2ghkk9ve.js";
|
|
17
14
|
import"./index-fsrp8wp3.js";
|
|
18
|
-
import"./index-
|
|
15
|
+
import"./index-5nybajn9.js";
|
|
16
|
+
import"./index-7g4c7s5r.js";
|
|
19
17
|
import"./index-q2rrv0cy.js";
|
|
20
18
|
import"./index-bpmtbmy9.js";
|
|
21
|
-
import"./index-
|
|
19
|
+
import"./index-z6xqpmqg.js";
|
|
20
|
+
import"./index-zjygnfay.js";
|
|
22
21
|
import"./index-qe3v54nb.js";
|
|
22
|
+
import"./index-zgwm4ryv.js";
|
|
23
23
|
import"./index-a76rekgs.js";
|
|
24
24
|
export {
|
|
25
25
|
updateSnapshot,
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-m2s0gbzt.js";
|
|
8
|
+
import"./index-baawkm48.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-cfkvc5q9.js";
|
|
11
|
+
import"./index-dd7ttx8x.js";
|
|
11
12
|
import"./index-bk5tah7q.js";
|
|
12
|
-
import"./index-zgwm4ryv.js";
|
|
13
|
-
import"./index-7mkpsw6g.js";
|
|
14
13
|
import"./index-fsrp8wp3.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-q2rrv0cy.js";
|
|
14
|
+
import"./index-5nybajn9.js";
|
|
17
15
|
import"./index-7g4c7s5r.js";
|
|
16
|
+
import"./index-q2rrv0cy.js";
|
|
18
17
|
import"./index-qe3v54nb.js";
|
|
18
|
+
import"./index-zgwm4ryv.js";
|
|
19
19
|
import"./index-a76rekgs.js";
|
|
20
20
|
export {
|
|
21
21
|
getScanStatus,
|
|
@@ -93,10 +93,10 @@ import {
|
|
|
93
93
|
resolveGeneratedAgentRole,
|
|
94
94
|
resolveGuardrailsConfig,
|
|
95
95
|
stripKnownSwarmPrefix
|
|
96
|
-
} from "./index-
|
|
96
|
+
} from "./index-b5ek2cge.js";
|
|
97
97
|
import"./index-bk5tah7q.js";
|
|
98
|
-
import"./index-zjygnfay.js";
|
|
99
98
|
import"./index-bpmtbmy9.js";
|
|
99
|
+
import"./index-zjygnfay.js";
|
|
100
100
|
import"./index-a76rekgs.js";
|
|
101
101
|
init_schema();
|
|
102
102
|
|
|
@@ -12,15 +12,15 @@ import {
|
|
|
12
12
|
resolveScopeWithFallbacks,
|
|
13
13
|
writeScopeBindingToDisk,
|
|
14
14
|
writeScopeToDisk
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
} from "./index-p8hezdtz.js";
|
|
16
|
+
import"./index-4p02dp92.js";
|
|
17
17
|
import"./index-1kz6da87.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
18
|
+
import"./index-5nybajn9.js";
|
|
19
|
+
import"./index-7g4c7s5r.js";
|
|
20
20
|
import"./index-q2rrv0cy.js";
|
|
21
21
|
import"./index-bpmtbmy9.js";
|
|
22
|
-
import"./index-7g4c7s5r.js";
|
|
23
22
|
import"./index-qe3v54nb.js";
|
|
23
|
+
import"./index-zgwm4ryv.js";
|
|
24
24
|
import"./index-a76rekgs.js";
|
|
25
25
|
export {
|
|
26
26
|
writeScopeToDisk,
|
|
@@ -33,23 +33,23 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-j6ywarjp.js";
|
|
37
|
+
import"./index-2njes601.js";
|
|
38
|
+
import"./index-y0kk3rtv.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-baawkm48.js";
|
|
41
|
+
import"./index-dgxgvzab.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
|
-
import"./index-
|
|
43
|
+
import"./index-cfkvc5q9.js";
|
|
44
|
+
import"./index-dd7ttx8x.js";
|
|
44
45
|
import"./index-bk5tah7q.js";
|
|
45
46
|
import"./index-4rhhvd1a.js";
|
|
46
|
-
import"./index-zgwm4ryv.js";
|
|
47
|
-
import"./index-7mkpsw6g.js";
|
|
48
47
|
import"./index-fsrp8wp3.js";
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-q2rrv0cy.js";
|
|
48
|
+
import"./index-5nybajn9.js";
|
|
51
49
|
import"./index-7g4c7s5r.js";
|
|
50
|
+
import"./index-q2rrv0cy.js";
|
|
52
51
|
import"./index-qe3v54nb.js";
|
|
52
|
+
import"./index-zgwm4ryv.js";
|
|
53
53
|
import"./index-a76rekgs.js";
|
|
54
54
|
export {
|
|
55
55
|
writeEvalStub,
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
scanWorktreeProvisioningOwnersForRecovery
|
|
4
|
+
} from "./index-b4z7s917.js";
|
|
5
|
+
import {
|
|
6
|
+
scanWorktreeMergeFailuresForRecovery
|
|
7
|
+
} from "./index-b8zgtz81.js";
|
|
8
|
+
import {
|
|
9
|
+
scanDelegationFallbacksForRecovery,
|
|
10
|
+
scanDelegationsForRecovery
|
|
11
|
+
} from "./index-y3v1404y.js";
|
|
12
|
+
import"./index-2ghkk9ve.js";
|
|
13
|
+
import"./index-fsrp8wp3.js";
|
|
14
|
+
import"./index-5nybajn9.js";
|
|
15
|
+
import"./index-7g4c7s5r.js";
|
|
16
|
+
import"./index-q2rrv0cy.js";
|
|
17
|
+
import"./index-bpmtbmy9.js";
|
|
18
|
+
import"./index-z6xqpmqg.js";
|
|
19
|
+
import"./index-zjygnfay.js";
|
|
20
|
+
import {
|
|
21
|
+
bunSpawn
|
|
22
|
+
} from "./index-qe3v54nb.js";
|
|
23
|
+
import"./index-zgwm4ryv.js";
|
|
24
|
+
import"./index-a76rekgs.js";
|
|
25
|
+
|
|
26
|
+
// src/hooks/delegation-gate/worktree-collision-ownership.ts
|
|
27
|
+
import * as path2 from "path";
|
|
28
|
+
|
|
29
|
+
// src/hooks/delegation-gate/worktree-ownership-tag.ts
|
|
30
|
+
import * as fs from "fs";
|
|
31
|
+
import * as path from "path";
|
|
32
|
+
var OWNERSHIP_TAG_SCAN_TIMEOUT_MS = 2000;
|
|
33
|
+
var MAX_OWNERSHIP_TAGS = 512;
|
|
34
|
+
function decodeTagPart(value) {
|
|
35
|
+
if (!value || !/^[A-Za-z0-9_-]+$/.test(value))
|
|
36
|
+
return null;
|
|
37
|
+
const decoded = Buffer.from(value, "base64url").toString("utf8");
|
|
38
|
+
return decoded && Buffer.from(decoded, "utf8").toString("base64url") === value ? decoded : null;
|
|
39
|
+
}
|
|
40
|
+
async function scanBackgroundWorktreeOwnershipTagsForRecovery(directory) {
|
|
41
|
+
try {
|
|
42
|
+
fs.statSync(path.join(directory, ".git"));
|
|
43
|
+
} catch (error) {
|
|
44
|
+
if (error.code === "ENOENT") {
|
|
45
|
+
return { status: "ok", owners: [] };
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
status: "uncertain",
|
|
49
|
+
reason: `Git metadata could not be inspected: ${error instanceof Error ? error.message : String(error)}`
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const proc = bunSpawn([
|
|
53
|
+
"git",
|
|
54
|
+
"-C",
|
|
55
|
+
directory,
|
|
56
|
+
"for-each-ref",
|
|
57
|
+
`--count=${MAX_OWNERSHIP_TAGS + 1}`,
|
|
58
|
+
"--format=%(refname:strip=2)%00%(objectname)",
|
|
59
|
+
"refs/tags/swarm-preserved-owner/"
|
|
60
|
+
], {
|
|
61
|
+
stdin: "ignore",
|
|
62
|
+
stdout: "pipe",
|
|
63
|
+
stderr: "ignore",
|
|
64
|
+
timeout: OWNERSHIP_TAG_SCAN_TIMEOUT_MS
|
|
65
|
+
});
|
|
66
|
+
try {
|
|
67
|
+
const exitCode = await proc.exited;
|
|
68
|
+
if (exitCode !== 0) {
|
|
69
|
+
return {
|
|
70
|
+
status: "uncertain",
|
|
71
|
+
reason: `ownership tag scan exited ${exitCode}`
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const lines = (await proc.stdout.text()).split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
75
|
+
if (lines.length > MAX_OWNERSHIP_TAGS) {
|
|
76
|
+
return {
|
|
77
|
+
status: "uncertain",
|
|
78
|
+
reason: `ownership tag scan exceeded the ${MAX_OWNERSHIP_TAGS}-tag safety bound`
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
const owners = [];
|
|
82
|
+
for (const line of lines) {
|
|
83
|
+
const [tag, ref, ...extra] = line.split("\x00");
|
|
84
|
+
const segments = tag?.split("/") ?? [];
|
|
85
|
+
const sessionId = decodeTagPart(segments[1] ?? "");
|
|
86
|
+
const laneId = decodeTagPart(segments[2] ?? "");
|
|
87
|
+
const callDigest = segments[3];
|
|
88
|
+
if (extra.length > 0 || segments.length !== 4 || segments[0] !== "swarm-preserved-owner" || !sessionId || !laneId || !callDigest || !/^[0-9a-f]{12}$/.test(callDigest) || !ref || !/^[0-9a-f]{40,64}$/i.test(ref)) {
|
|
89
|
+
return {
|
|
90
|
+
status: "uncertain",
|
|
91
|
+
reason: `malformed background ownership tag entry "${tag ?? ""}"`
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
owners.push({ sessionId, laneId, callDigest, ref });
|
|
95
|
+
}
|
|
96
|
+
return { status: "ok", owners };
|
|
97
|
+
} catch (error) {
|
|
98
|
+
return {
|
|
99
|
+
status: "uncertain",
|
|
100
|
+
reason: `ownership tag scan failed: ${error instanceof Error ? error.message : String(error)}`
|
|
101
|
+
};
|
|
102
|
+
} finally {
|
|
103
|
+
try {
|
|
104
|
+
proc.kill();
|
|
105
|
+
} catch {}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// src/hooks/delegation-gate/worktree-collision-ownership.ts
|
|
110
|
+
function normalizedPath(value) {
|
|
111
|
+
const resolved = path2.normalize(path2.resolve(value));
|
|
112
|
+
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
113
|
+
}
|
|
114
|
+
function descriptorCoordinateMatch(descriptor, identity) {
|
|
115
|
+
const branchMatches = descriptor.branchName === identity.branchName;
|
|
116
|
+
const pathMatches = normalizedPath(descriptor.worktreePath) === normalizedPath(identity.worktreePath);
|
|
117
|
+
if (!branchMatches && !pathMatches)
|
|
118
|
+
return "none";
|
|
119
|
+
if (!branchMatches || !pathMatches || descriptor.parentSessionId !== identity.parentSessionId || descriptor.taskId !== identity.taskId) {
|
|
120
|
+
return "uncertain";
|
|
121
|
+
}
|
|
122
|
+
return "exact";
|
|
123
|
+
}
|
|
124
|
+
function isProvenSettled(record) {
|
|
125
|
+
const settlement = record.coderSettlement;
|
|
126
|
+
return settlement?.state === "settled" && settlement.outcome?.kind === "standard-worktree" && (settlement.outcome.result === "merged" || settlement.outcome.result === "unchanged");
|
|
127
|
+
}
|
|
128
|
+
function classifyRecord(record, identity, ownerKind) {
|
|
129
|
+
if (!record.worktree)
|
|
130
|
+
return null;
|
|
131
|
+
const coordinates = descriptorCoordinateMatch(record.worktree, identity);
|
|
132
|
+
if (coordinates === "none")
|
|
133
|
+
return null;
|
|
134
|
+
if (coordinates === "uncertain") {
|
|
135
|
+
return {
|
|
136
|
+
status: "uncertain",
|
|
137
|
+
reason: `${ownerKind} background owner has conflicting identity for branch "${identity.branchName}"`
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
if (isProvenSettled(record))
|
|
141
|
+
return null;
|
|
142
|
+
const lifecycle = record.coderSettlement?.state === "preserved" ? "preserved" : "active";
|
|
143
|
+
return {
|
|
144
|
+
status: "protected",
|
|
145
|
+
ownerKind,
|
|
146
|
+
lifecycle,
|
|
147
|
+
reason: `${ownerKind} background owner ${record.correlationId} is ${record.status}` + (record.coderSettlement ? ` with coder settlement ${record.coderSettlement.state}` : " without a settled workspace outcome")
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
async function inspectStandardWorktreeCollisionOwnership(identity) {
|
|
151
|
+
const provisioning = scanWorktreeProvisioningOwnersForRecovery(identity.directory);
|
|
152
|
+
if (provisioning.status === "uncertain")
|
|
153
|
+
return provisioning;
|
|
154
|
+
for (const owner of provisioning.owners) {
|
|
155
|
+
const sameSession = owner.parentSessionId === identity.parentSessionId || owner.worktreeSessionId === identity.parentSessionId;
|
|
156
|
+
if (!sameSession)
|
|
157
|
+
continue;
|
|
158
|
+
if (owner.schemaVersion === 1 || owner.taskId === identity.taskId) {
|
|
159
|
+
return {
|
|
160
|
+
status: "protected",
|
|
161
|
+
ownerKind: "provisioning",
|
|
162
|
+
lifecycle: "active",
|
|
163
|
+
reason: owner.schemaVersion === 1 ? `legacy provisioning owner ${owner.callID} cannot disprove ownership of this same-session lane` : `provisioning owner ${owner.callID} is active for task ${identity.taskId}`
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const fallback = await scanDelegationFallbacksForRecovery(identity.directory);
|
|
168
|
+
if (fallback.status === "uncertain")
|
|
169
|
+
return fallback;
|
|
170
|
+
for (const artifact of fallback.owners) {
|
|
171
|
+
const classified = classifyRecord(artifact.record, identity, "fallback");
|
|
172
|
+
if (classified)
|
|
173
|
+
return classified;
|
|
174
|
+
}
|
|
175
|
+
const primary = scanDelegationsForRecovery(identity.directory);
|
|
176
|
+
if (primary.status === "uncertain")
|
|
177
|
+
return primary;
|
|
178
|
+
for (const record of primary.owners) {
|
|
179
|
+
const classified = classifyRecord(record, identity, "primary");
|
|
180
|
+
if (classified)
|
|
181
|
+
return classified;
|
|
182
|
+
}
|
|
183
|
+
const tags = await scanBackgroundWorktreeOwnershipTagsForRecovery(identity.directory);
|
|
184
|
+
if (tags.status === "uncertain")
|
|
185
|
+
return tags;
|
|
186
|
+
for (const owner of tags.owners) {
|
|
187
|
+
if (owner.sessionId === identity.parentSessionId && owner.laneId === identity.taskId) {
|
|
188
|
+
return {
|
|
189
|
+
status: "protected",
|
|
190
|
+
ownerKind: "ownership-tag",
|
|
191
|
+
lifecycle: "preserved",
|
|
192
|
+
reason: `durable ownership tag ${owner.callDigest} preserves this same-session lane`
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
const mergeStatus = scanWorktreeMergeFailuresForRecovery(identity.directory);
|
|
197
|
+
if (mergeStatus.status === "uncertain")
|
|
198
|
+
return mergeStatus;
|
|
199
|
+
for (const [, failure] of mergeStatus.failures) {
|
|
200
|
+
const branchMatches = failure.branch === identity.branchName;
|
|
201
|
+
const pathMatches = typeof failure.worktreePath === "string" && normalizedPath(failure.worktreePath) === normalizedPath(identity.worktreePath);
|
|
202
|
+
if (!branchMatches && !pathMatches)
|
|
203
|
+
continue;
|
|
204
|
+
if (!branchMatches || !pathMatches) {
|
|
205
|
+
return {
|
|
206
|
+
status: "uncertain",
|
|
207
|
+
reason: `merge-status owner has conflicting identity for branch "${identity.branchName}"`
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
status: "protected",
|
|
212
|
+
ownerKind: "merge-status",
|
|
213
|
+
lifecycle: "preserved",
|
|
214
|
+
reason: `merge-status records ${failure.outcome} at stage ${failure.stage}`
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
return { status: "unowned" };
|
|
218
|
+
}
|
|
219
|
+
export {
|
|
220
|
+
inspectStandardWorktreeCollisionOwnership
|
|
221
|
+
};
|
|
@@ -278,9 +278,9 @@ export declare const PromotionDecisionV1Schema: z.ZodObject<{
|
|
|
278
278
|
runId: z.ZodString;
|
|
279
279
|
decidedAt: z.ZodISODateTime;
|
|
280
280
|
status: z.ZodEnum<{
|
|
281
|
-
reject: "reject";
|
|
282
281
|
inconclusive: "inconclusive";
|
|
283
282
|
accept: "accept";
|
|
283
|
+
reject: "reject";
|
|
284
284
|
}>;
|
|
285
285
|
reasons: z.ZodArray<z.ZodString>;
|
|
286
286
|
baseline: z.ZodObject<{
|