opencode-swarm 7.137.4 → 7.138.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/pending-delegations.d.ts +23 -3
- package/dist/cli/{config-doctor-5qymy0bp.js → config-doctor-mb81xytp.js} +2 -2
- package/dist/cli/{curation-policy-788qbgwk.js → curation-policy-qx23sc8b.js} +2 -2
- package/dist/cli/{curator-0zebvv5q.js → curator-b9ascpbh.js} +13 -13
- package/dist/cli/{curator-llm-factory-6w7hpfb0.js → curator-llm-factory-r47q1hbd.js} +13 -13
- package/dist/cli/{guardrail-explain-k1a7mwq9.js → guardrail-explain-ph1n3ryc.js} +14 -14
- package/dist/cli/{guardrail-log-wqsg11xd.js → guardrail-log-ghgqaw3w.js} +3 -3
- package/dist/cli/{hive-promoter-kxcm4n0n.js → hive-promoter-7x2zzhb7.js} +13 -13
- package/dist/cli/{index-c2v79596.js → index-0s4gr6qh.js} +53 -6
- package/dist/cli/{index-mrwr3kac.js → index-2vzgvscz.js} +2 -2
- package/dist/cli/{index-2qr7twf5.js → index-4xs9e82s.js} +3 -3
- package/dist/cli/{index-pzkn7d2k.js → index-6nenabrm.js} +1 -1
- package/dist/cli/{index-01dpavd4.js → index-7kgfvt3h.js} +1 -1
- package/dist/cli/{index-b2khb7xx.js → index-7wzyf4dr.js} +4 -4
- package/dist/cli/{index-p9shqpbc.js → index-9zf5gfca.js} +1 -1
- package/dist/cli/{index-rdg1tkz4.js → index-ag7ppc40.js} +15 -15
- package/dist/cli/{index-csneb2ph.js → index-bf0j2wd2.js} +2 -2
- package/dist/cli/{index-q9eqty52.js → index-ca6qmxd8.js} +1 -1
- package/dist/cli/{index-bma4nwts.js → index-cdx3aqj5.js} +1 -1
- package/dist/cli/{index-b9pgq0fk.js → index-hmapndcz.js} +5 -5
- package/dist/cli/{index-h353c1xz.js → index-npgjk6vc.js} +1 -1
- package/dist/cli/{index-nnf41ca1.js → index-sp7s1vk3.js} +1424 -1055
- package/dist/cli/{index-eq564d4t.js → index-whf5ecbw.js} +1 -1
- package/dist/cli/{index-m09k3dpz.js → index-xz0zjrdr.js} +1 -1
- package/dist/cli/{index-fetnv58w.js → index-z55s5719.js} +2 -2
- package/dist/cli/index.js +13 -13
- package/dist/cli/{knowledge-escalator-dna6s7qy.js → knowledge-escalator-pqskjp6y.js} +3 -3
- package/dist/cli/{knowledge-events-shy8wgb3.js → knowledge-events-ahpxnqjd.js} +1 -1
- package/dist/cli/{knowledge-store-j7xtx4dd.js → knowledge-store-27aynbeg.js} +1 -1
- package/dist/cli/{knowledge-validator-zfweje73.js → knowledge-validator-4saz53kh.js} +4 -4
- package/dist/cli/{pending-delegations-gee019ec.js → pending-delegations-ztb67amh.js} +3 -1
- package/dist/cli/{scan-cursor-fessrenj.js → scan-cursor-ngykkd7f.js} +2 -2
- package/dist/cli/{schema-36b6sv6b.js → schema-p82ntfy9.js} +1 -1
- package/dist/cli/{skill-generator-0ghcwxeb.js → skill-generator-r19a1zje.js} +5 -5
- package/dist/cli/{worktree-collision-ownership-y1c7yx14.js → worktree-collision-ownership-rc6pe17g.js} +1 -1
- package/dist/commands/close.d.ts +22 -0
- package/dist/hooks/delegation-gate.d.ts +1 -1
- package/dist/index.js +294 -285
- package/dist/services/session-reflection.d.ts +171 -0
- package/dist/tools/dispatch-lanes.d.ts +4 -0
- package/package.json +1 -1
|
@@ -251,9 +251,29 @@ export interface RecordPendingInput {
|
|
|
251
251
|
/**
|
|
252
252
|
* Record a `pending` background delegation. Runs the stale sweep first (lazy maintenance,
|
|
253
253
|
* no plugin-init cost), then appends the pending snapshot — all under one lock acquisition
|
|
254
|
-
* so concurrent dispatches cannot interleave.
|
|
255
|
-
*
|
|
256
|
-
*
|
|
254
|
+
* so concurrent dispatches cannot interleave. The discriminated outcome lets async
|
|
255
|
+
* launchers distinguish a safe duplicate from a write failure without disrupting
|
|
256
|
+
* the already-owned session.
|
|
257
|
+
*/
|
|
258
|
+
export type RecordPendingDelegationOutcome = {
|
|
259
|
+
status: 'recorded';
|
|
260
|
+
record: BackgroundDelegationRecord;
|
|
261
|
+
} | {
|
|
262
|
+
status: 'duplicate';
|
|
263
|
+
record: BackgroundDelegationRecord;
|
|
264
|
+
} | {
|
|
265
|
+
status: 'conflict';
|
|
266
|
+
record: BackgroundDelegationRecord;
|
|
267
|
+
} | {
|
|
268
|
+
status: 'failed';
|
|
269
|
+
record: null;
|
|
270
|
+
};
|
|
271
|
+
export declare function recordPendingDelegationDetailed(directory: string, input: RecordPendingInput, options?: {
|
|
272
|
+
staleTimeoutMs?: number;
|
|
273
|
+
}): Promise<RecordPendingDelegationOutcome>;
|
|
274
|
+
/**
|
|
275
|
+
* Idempotent compatibility wrapper. A duplicate returns the authoritative
|
|
276
|
+
* existing record so native Task replay does not create a fallback owner.
|
|
257
277
|
*/
|
|
258
278
|
export declare function recordPendingDelegation(directory: string, input: RecordPendingInput, options?: {
|
|
259
279
|
staleTimeoutMs?: number;
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
shouldRunOnStartup,
|
|
13
13
|
writeBackupArtifact,
|
|
14
14
|
writeDoctorArtifact
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
} from "./index-ca6qmxd8.js";
|
|
16
|
+
import"./index-6nenabrm.js";
|
|
17
17
|
import"./index-bk5tah7q.js";
|
|
18
18
|
import"./index-3jcyn8g6.js";
|
|
19
19
|
import"./index-bpmtbmy9.js";
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
authorizeCuration,
|
|
5
5
|
buildConfigFingerprintInput,
|
|
6
6
|
readCohortConfigFingerprint
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-7kgfvt3h.js";
|
|
8
8
|
import"./index-rtry5xyf.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-cdx3aqj5.js";
|
|
10
10
|
import"./index-ae75rja9.js";
|
|
11
11
|
import"./index-en4fb04r.js";
|
|
12
12
|
import"./index-tqshdzaw.js";
|
|
@@ -14,36 +14,36 @@ import {
|
|
|
14
14
|
runCuratorInit,
|
|
15
15
|
runCuratorPhase,
|
|
16
16
|
writeCuratorSummary
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-sp7s1vk3.js";
|
|
18
18
|
import"./index-vm4xw9z3.js";
|
|
19
19
|
import"./index-rrxcfxrd.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
20
|
+
import"./index-xz0zjrdr.js";
|
|
21
|
+
import"./index-ca6qmxd8.js";
|
|
22
22
|
import"./index-fmh15wxb.js";
|
|
23
23
|
import"./index-ngqxzkqm.js";
|
|
24
24
|
import"./index-y8552snf.js";
|
|
25
25
|
import"./index-4905hd2m.js";
|
|
26
26
|
import"./index-134d35c1.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
27
|
+
import"./index-4xs9e82s.js";
|
|
28
|
+
import"./index-hmapndcz.js";
|
|
29
|
+
import"./index-whf5ecbw.js";
|
|
30
30
|
import"./index-6mjf4vr1.js";
|
|
31
31
|
import"./index-c8s9a3zh.js";
|
|
32
32
|
import"./index-9ss2m4rs.js";
|
|
33
33
|
import"./index-wsdnttf4.js";
|
|
34
34
|
import"./index-39k6y018.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
35
|
+
import"./index-z55s5719.js";
|
|
36
|
+
import"./index-7kgfvt3h.js";
|
|
37
37
|
import"./index-rtry5xyf.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
38
|
+
import"./index-7wzyf4dr.js";
|
|
39
|
+
import"./index-cdx3aqj5.js";
|
|
40
40
|
import"./index-ae75rja9.js";
|
|
41
41
|
import"./index-en4fb04r.js";
|
|
42
42
|
import"./index-tqshdzaw.js";
|
|
43
|
-
import"./index-
|
|
43
|
+
import"./index-npgjk6vc.js";
|
|
44
44
|
import"./index-k5jrywpr.js";
|
|
45
45
|
import"./index-n832052r.js";
|
|
46
|
-
import"./index-
|
|
46
|
+
import"./index-6nenabrm.js";
|
|
47
47
|
import"./index-bk5tah7q.js";
|
|
48
48
|
import"./index-8fwhhayc.js";
|
|
49
49
|
import"./index-q1exe2b3.js";
|
|
@@ -56,7 +56,7 @@ import"./index-b8zgtz81.js";
|
|
|
56
56
|
import"./index-j0xx9wpj.js";
|
|
57
57
|
import"./index-4rhhvd1a.js";
|
|
58
58
|
import"./index-3jcyn8g6.js";
|
|
59
|
-
import"./index-
|
|
59
|
+
import"./index-0s4gr6qh.js";
|
|
60
60
|
import"./index-4qzeef9h.js";
|
|
61
61
|
import"./index-fsrp8wp3.js";
|
|
62
62
|
import"./index-xybtaph7.js";
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
createCuratorLLMDelegate
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-sp7s1vk3.js";
|
|
5
5
|
import"./index-vm4xw9z3.js";
|
|
6
6
|
import"./index-rrxcfxrd.js";
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
import"./index-xz0zjrdr.js";
|
|
8
|
+
import"./index-ca6qmxd8.js";
|
|
9
9
|
import"./index-fmh15wxb.js";
|
|
10
10
|
import"./index-ngqxzkqm.js";
|
|
11
11
|
import"./index-y8552snf.js";
|
|
12
12
|
import"./index-4905hd2m.js";
|
|
13
13
|
import"./index-134d35c1.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
14
|
+
import"./index-4xs9e82s.js";
|
|
15
|
+
import"./index-hmapndcz.js";
|
|
16
|
+
import"./index-whf5ecbw.js";
|
|
17
17
|
import"./index-6mjf4vr1.js";
|
|
18
18
|
import"./index-c8s9a3zh.js";
|
|
19
19
|
import"./index-9ss2m4rs.js";
|
|
20
20
|
import"./index-wsdnttf4.js";
|
|
21
21
|
import"./index-39k6y018.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
22
|
+
import"./index-z55s5719.js";
|
|
23
|
+
import"./index-7kgfvt3h.js";
|
|
24
24
|
import"./index-rtry5xyf.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
25
|
+
import"./index-7wzyf4dr.js";
|
|
26
|
+
import"./index-cdx3aqj5.js";
|
|
27
27
|
import"./index-ae75rja9.js";
|
|
28
28
|
import"./index-en4fb04r.js";
|
|
29
29
|
import"./index-tqshdzaw.js";
|
|
30
|
-
import"./index-
|
|
30
|
+
import"./index-npgjk6vc.js";
|
|
31
31
|
import"./index-k5jrywpr.js";
|
|
32
32
|
import"./index-n832052r.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-6nenabrm.js";
|
|
34
34
|
import"./index-bk5tah7q.js";
|
|
35
35
|
import"./index-8fwhhayc.js";
|
|
36
36
|
import"./index-q1exe2b3.js";
|
|
@@ -43,7 +43,7 @@ import"./index-b8zgtz81.js";
|
|
|
43
43
|
import"./index-j0xx9wpj.js";
|
|
44
44
|
import"./index-4rhhvd1a.js";
|
|
45
45
|
import"./index-3jcyn8g6.js";
|
|
46
|
-
import"./index-
|
|
46
|
+
import"./index-0s4gr6qh.js";
|
|
47
47
|
import"./index-4qzeef9h.js";
|
|
48
48
|
import"./index-fsrp8wp3.js";
|
|
49
49
|
import"./index-xybtaph7.js";
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-bf0j2wd2.js";
|
|
5
|
+
import"./index-sp7s1vk3.js";
|
|
6
6
|
import"./index-vm4xw9z3.js";
|
|
7
7
|
import"./index-rrxcfxrd.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
import"./index-xz0zjrdr.js";
|
|
9
|
+
import"./index-ca6qmxd8.js";
|
|
10
10
|
import"./index-fmh15wxb.js";
|
|
11
11
|
import"./index-ngqxzkqm.js";
|
|
12
12
|
import"./index-y8552snf.js";
|
|
13
13
|
import"./index-4905hd2m.js";
|
|
14
14
|
import"./index-134d35c1.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
15
|
+
import"./index-4xs9e82s.js";
|
|
16
|
+
import"./index-hmapndcz.js";
|
|
17
|
+
import"./index-whf5ecbw.js";
|
|
18
18
|
import"./index-6mjf4vr1.js";
|
|
19
19
|
import"./index-c8s9a3zh.js";
|
|
20
20
|
import"./index-9ss2m4rs.js";
|
|
21
21
|
import"./index-wsdnttf4.js";
|
|
22
22
|
import"./index-39k6y018.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
23
|
+
import"./index-z55s5719.js";
|
|
24
|
+
import"./index-7kgfvt3h.js";
|
|
25
25
|
import"./index-rtry5xyf.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
import"./index-7wzyf4dr.js";
|
|
27
|
+
import"./index-cdx3aqj5.js";
|
|
28
28
|
import"./index-ae75rja9.js";
|
|
29
29
|
import"./index-en4fb04r.js";
|
|
30
30
|
import"./index-tqshdzaw.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-npgjk6vc.js";
|
|
32
32
|
import"./index-k5jrywpr.js";
|
|
33
33
|
import"./index-n832052r.js";
|
|
34
|
-
import"./index-
|
|
34
|
+
import"./index-6nenabrm.js";
|
|
35
35
|
import"./index-bk5tah7q.js";
|
|
36
36
|
import"./index-8fwhhayc.js";
|
|
37
37
|
import"./index-q1exe2b3.js";
|
|
@@ -44,7 +44,7 @@ import"./index-b8zgtz81.js";
|
|
|
44
44
|
import"./index-j0xx9wpj.js";
|
|
45
45
|
import"./index-4rhhvd1a.js";
|
|
46
46
|
import"./index-3jcyn8g6.js";
|
|
47
|
-
import"./index-
|
|
47
|
+
import"./index-0s4gr6qh.js";
|
|
48
48
|
import"./index-4qzeef9h.js";
|
|
49
49
|
import"./index-fsrp8wp3.js";
|
|
50
50
|
import"./index-xybtaph7.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailLog
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
4
|
+
} from "./index-9zf5gfca.js";
|
|
5
|
+
import"./index-xz0zjrdr.js";
|
|
6
|
+
import"./index-6nenabrm.js";
|
|
7
7
|
import"./index-bk5tah7q.js";
|
|
8
8
|
import"./index-3jcyn8g6.js";
|
|
9
9
|
import"./index-bpmtbmy9.js";
|
|
@@ -7,38 +7,38 @@ import {
|
|
|
7
7
|
isHiveEligible,
|
|
8
8
|
promoteFromSwarm,
|
|
9
9
|
promoteToHive
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-sp7s1vk3.js";
|
|
11
11
|
import"./index-vm4xw9z3.js";
|
|
12
12
|
import"./index-rrxcfxrd.js";
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
13
|
+
import"./index-xz0zjrdr.js";
|
|
14
|
+
import"./index-ca6qmxd8.js";
|
|
15
15
|
import"./index-fmh15wxb.js";
|
|
16
16
|
import"./index-ngqxzkqm.js";
|
|
17
17
|
import"./index-y8552snf.js";
|
|
18
18
|
import"./index-4905hd2m.js";
|
|
19
19
|
import"./index-134d35c1.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
20
|
+
import"./index-4xs9e82s.js";
|
|
21
|
+
import"./index-hmapndcz.js";
|
|
22
|
+
import"./index-whf5ecbw.js";
|
|
23
23
|
import"./index-6mjf4vr1.js";
|
|
24
24
|
import"./index-c8s9a3zh.js";
|
|
25
25
|
import"./index-9ss2m4rs.js";
|
|
26
26
|
import"./index-wsdnttf4.js";
|
|
27
27
|
import"./index-39k6y018.js";
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
28
|
+
import"./index-z55s5719.js";
|
|
29
|
+
import"./index-7kgfvt3h.js";
|
|
30
30
|
import"./index-rtry5xyf.js";
|
|
31
31
|
import {
|
|
32
32
|
resolveHiveKnowledgePath
|
|
33
|
-
} from "./index-
|
|
34
|
-
import"./index-
|
|
33
|
+
} from "./index-7wzyf4dr.js";
|
|
34
|
+
import"./index-cdx3aqj5.js";
|
|
35
35
|
import"./index-ae75rja9.js";
|
|
36
36
|
import"./index-en4fb04r.js";
|
|
37
37
|
import"./index-tqshdzaw.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-npgjk6vc.js";
|
|
39
39
|
import"./index-k5jrywpr.js";
|
|
40
40
|
import"./index-n832052r.js";
|
|
41
|
-
import"./index-
|
|
41
|
+
import"./index-6nenabrm.js";
|
|
42
42
|
import"./index-bk5tah7q.js";
|
|
43
43
|
import"./index-8fwhhayc.js";
|
|
44
44
|
import"./index-q1exe2b3.js";
|
|
@@ -51,7 +51,7 @@ import"./index-b8zgtz81.js";
|
|
|
51
51
|
import"./index-j0xx9wpj.js";
|
|
52
52
|
import"./index-4rhhvd1a.js";
|
|
53
53
|
import"./index-3jcyn8g6.js";
|
|
54
|
-
import"./index-
|
|
54
|
+
import"./index-0s4gr6qh.js";
|
|
55
55
|
import"./index-4qzeef9h.js";
|
|
56
56
|
import"./index-fsrp8wp3.js";
|
|
57
57
|
import"./index-xybtaph7.js";
|
|
@@ -22,6 +22,7 @@ init_zod();
|
|
|
22
22
|
import { createHash } from "crypto";
|
|
23
23
|
import * as fs from "fs";
|
|
24
24
|
import * as path from "path";
|
|
25
|
+
import { isDeepStrictEqual } from "util";
|
|
25
26
|
init_logger();
|
|
26
27
|
var BACKGROUND_DELEGATIONS_FILE = "background-delegations.jsonl";
|
|
27
28
|
var BACKGROUND_DELEGATION_FALLBACK_DIR = "background-delegation-fallback";
|
|
@@ -30,6 +31,7 @@ var MAX_LIVE_BACKGROUND_FALLBACKS = 256;
|
|
|
30
31
|
var MAX_LIVE_BACKGROUND_CODER_RESERVATIONS = 256;
|
|
31
32
|
var MAX_BACKGROUND_OBSERVED_FILES = 5000;
|
|
32
33
|
var MAX_BACKGROUND_ADVISORY_CHARS = 4000;
|
|
34
|
+
var MAX_BACKGROUND_DELEGATION_GENERATION = 1e6;
|
|
33
35
|
var MAX_RECOVERY_LEDGER_BYTES = 4 * 1024 * 1024;
|
|
34
36
|
var MAX_RECOVERY_FALLBACK_BYTES = 1024 * 1024;
|
|
35
37
|
var STORE_LOCK_AGENT = "background";
|
|
@@ -260,7 +262,7 @@ var RecordSchema = exports_external.object({
|
|
|
260
262
|
worktree: WorktreeDescriptorSchema.optional(),
|
|
261
263
|
coderReservationId: exports_external.string().min(1).max(256).optional(),
|
|
262
264
|
prompt: PromptSchema.optional(),
|
|
263
|
-
generation: exports_external.number().optional(),
|
|
265
|
+
generation: exports_external.number().int().positive().max(MAX_BACKGROUND_DELEGATION_GENERATION).optional(),
|
|
264
266
|
terminalResult: TerminalResultSchema.optional(),
|
|
265
267
|
coderSettlement: CoderSettlementSchema.optional(),
|
|
266
268
|
advisoryInbox: AdvisoryInboxSchema.optional(),
|
|
@@ -422,27 +424,72 @@ function buildPendingRecord(input, now) {
|
|
|
422
424
|
...input.generation !== undefined ? { generation: input.generation } : {}
|
|
423
425
|
};
|
|
424
426
|
}
|
|
425
|
-
|
|
427
|
+
function pendingLaunchIdentity(record) {
|
|
428
|
+
return {
|
|
429
|
+
correlationId: record.correlationId,
|
|
430
|
+
jobId: record.jobId,
|
|
431
|
+
subagentSessionId: record.subagentSessionId,
|
|
432
|
+
parentSessionId: record.parentSessionId,
|
|
433
|
+
callID: record.callID,
|
|
434
|
+
normalizedAgent: record.normalizedAgent,
|
|
435
|
+
swarmPrefixedAgent: record.swarmPrefixedAgent,
|
|
436
|
+
planTaskId: record.planTaskId,
|
|
437
|
+
evidenceTaskId: record.evidenceTaskId,
|
|
438
|
+
batchId: record.batchId,
|
|
439
|
+
laneId: record.laneId,
|
|
440
|
+
mode: record.mode,
|
|
441
|
+
workflowLane: record.workflowLane,
|
|
442
|
+
ownedWorkflowLanes: record.ownedWorkflowLanes,
|
|
443
|
+
promptHash: record.promptHash,
|
|
444
|
+
workspace: record.workspace,
|
|
445
|
+
taskChangeContext: record.taskChangeContext,
|
|
446
|
+
worktree: record.worktree,
|
|
447
|
+
coderReservationId: record.coderReservationId,
|
|
448
|
+
prompt: record.prompt,
|
|
449
|
+
generation: record.generation ?? 1
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
function samePendingLaunchIdentity(left, right) {
|
|
453
|
+
return isDeepStrictEqual(pendingLaunchIdentity(left), pendingLaunchIdentity(right));
|
|
454
|
+
}
|
|
455
|
+
async function recordPendingDelegationDetailed(directory, input, options = {}) {
|
|
426
456
|
const now = Date.now();
|
|
427
457
|
const record = buildPendingRecord(input, now);
|
|
428
458
|
const parsedRecord = RecordSchema.safeParse(record);
|
|
429
459
|
if (!parsedRecord.success) {
|
|
430
460
|
warn("[background] recordPendingDelegation rejected invalid input");
|
|
431
|
-
return null;
|
|
461
|
+
return { status: "failed", record: null };
|
|
432
462
|
}
|
|
433
463
|
try {
|
|
464
|
+
let outcome = {
|
|
465
|
+
status: "failed",
|
|
466
|
+
record: null
|
|
467
|
+
};
|
|
434
468
|
await withEvidenceLock(directory, BACKGROUND_DELEGATIONS_FILE, STORE_LOCK_AGENT, STORE_LOCK_TASK, async () => {
|
|
435
469
|
if (options.staleTimeoutMs && options.staleTimeoutMs > 0) {
|
|
436
470
|
sweepStaleLocked(directory, options.staleTimeoutMs, now);
|
|
437
471
|
}
|
|
472
|
+
const existing = findByCorrelationId(directory, parsedRecord.data.correlationId);
|
|
473
|
+
if (existing) {
|
|
474
|
+
outcome = {
|
|
475
|
+
status: samePendingLaunchIdentity(existing, parsedRecord.data) ? "duplicate" : "conflict",
|
|
476
|
+
record: existing
|
|
477
|
+
};
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
438
480
|
appendRecord(directory, parsedRecord.data);
|
|
481
|
+
outcome = { status: "recorded", record: parsedRecord.data };
|
|
439
482
|
});
|
|
440
|
-
return
|
|
483
|
+
return outcome;
|
|
441
484
|
} catch (err) {
|
|
442
485
|
warn(`[background] recordPendingDelegation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
443
|
-
return null;
|
|
486
|
+
return { status: "failed", record: null };
|
|
444
487
|
}
|
|
445
488
|
}
|
|
489
|
+
async function recordPendingDelegation(directory, input, options = {}) {
|
|
490
|
+
const outcome = await recordPendingDelegationDetailed(directory, input, options);
|
|
491
|
+
return outcome.status === "recorded" || outcome.status === "duplicate" ? outcome.record : null;
|
|
492
|
+
}
|
|
446
493
|
function buildPromptSnapshot(text, maxChars) {
|
|
447
494
|
const boundedMax = Math.max(0, Math.min(maxChars, 20000));
|
|
448
495
|
const truncated = text.length > boundedMax;
|
|
@@ -1622,4 +1669,4 @@ async function releaseBackgroundCoderReservation(directory, input) {
|
|
|
1622
1669
|
}
|
|
1623
1670
|
}
|
|
1624
1671
|
|
|
1625
|
-
export { BACKGROUND_DELEGATIONS_FILE, BACKGROUND_DELEGATION_FALLBACK_DIR, BACKGROUND_CODER_RESERVATIONS_FILE, MAX_LIVE_BACKGROUND_FALLBACKS, MAX_LIVE_BACKGROUND_CODER_RESERVATIONS, MAX_BACKGROUND_OBSERVED_FILES, MAX_BACKGROUND_ADVISORY_CHARS, BACKGROUND_INGESTION_LEASE_MS, readDelegations, scanDelegationsForRecovery, findByCorrelationId, recordPendingDelegation, buildPromptSnapshot, appendDelegationTransition, buildBackgroundCompletionEventId, claimTerminalResult, claimCoderSettlement, normalizeBackgroundObservedFiles, updateCoderSettlement, claimDelegationIngestion, recordDelegationIngestionResult, putPendingBackgroundAdvisory, preparePendingBackgroundAdvisories, acknowledgeObservedBackgroundAdvisories, releasePreparedBackgroundAdvisories, findByBatchId, findOpenAsyncLaneBatches, sweepStaleDelegations, readDelegationFallback, listDelegationFallbacks, scanDelegationFallbacksForRecovery, writeDelegationFallback, removeDelegationFallback, findDelegationForCompletion, promoteDelegationFallback, buildBackgroundCoderReservationId, scanBackgroundCoderReservationsForAdmission, reserveBackgroundCoderSlot, bindBackgroundCoderReservation, releaseBackgroundCoderReservation };
|
|
1672
|
+
export { BACKGROUND_DELEGATIONS_FILE, BACKGROUND_DELEGATION_FALLBACK_DIR, BACKGROUND_CODER_RESERVATIONS_FILE, MAX_LIVE_BACKGROUND_FALLBACKS, MAX_LIVE_BACKGROUND_CODER_RESERVATIONS, MAX_BACKGROUND_OBSERVED_FILES, MAX_BACKGROUND_ADVISORY_CHARS, BACKGROUND_INGESTION_LEASE_MS, readDelegations, scanDelegationsForRecovery, findByCorrelationId, recordPendingDelegationDetailed, recordPendingDelegation, buildPromptSnapshot, appendDelegationTransition, buildBackgroundCompletionEventId, claimTerminalResult, claimCoderSettlement, normalizeBackgroundObservedFiles, updateCoderSettlement, claimDelegationIngestion, recordDelegationIngestionResult, putPendingBackgroundAdvisory, preparePendingBackgroundAdvisories, acknowledgeObservedBackgroundAdvisories, releasePreparedBackgroundAdvisories, findByBatchId, findOpenAsyncLaneBatches, sweepStaleDelegations, readDelegationFallback, listDelegationFallbacks, scanDelegationFallbacksForRecovery, writeDelegationFallback, removeDelegationFallback, findDelegationForCompletion, promoteDelegationFallback, buildBackgroundCoderReservationId, scanBackgroundCoderReservationsForAdmission, reserveBackgroundCoderSlot, bindBackgroundCoderReservation, releaseBackgroundCoderReservation };
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadPluginConfigWithMeta,
|
|
8
8
|
loadPluginConfigWithMetaAsync,
|
|
9
9
|
resolveWorktreeIsolationConfig
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-npgjk6vc.js";
|
|
11
11
|
import {
|
|
12
12
|
ApprovalEvidenceSchema,
|
|
13
13
|
BaseEvidenceSchema,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
TurboConfigSchema,
|
|
55
55
|
WorktreeIsolationConfigSchema,
|
|
56
56
|
resolveAutoReviewConfig
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-6nenabrm.js";
|
|
58
58
|
import"./index-bk5tah7q.js";
|
|
59
59
|
import {
|
|
60
60
|
MigrationStatusSchema,
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-z55s5719.js";
|
|
6
6
|
import {
|
|
7
7
|
computeOutcomeSignal,
|
|
8
8
|
readKnowledge,
|
|
9
9
|
resolveHiveKnowledgePath,
|
|
10
10
|
resolveSwarmKnowledgePath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-7wzyf4dr.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveRetrievalOutcomes,
|
|
15
15
|
readKnowledgeCounterRollups
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-cdx3aqj5.js";
|
|
17
17
|
import {
|
|
18
18
|
init_knowledge_types,
|
|
19
19
|
isActiveStatus
|
|
@@ -21,7 +21,7 @@ var package_default;
|
|
|
21
21
|
var init_package = __esm(() => {
|
|
22
22
|
package_default = {
|
|
23
23
|
name: "opencode-swarm",
|
|
24
|
-
version: "7.
|
|
24
|
+
version: "7.138.0",
|
|
25
25
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
26
26
|
main: "dist/index.js",
|
|
27
27
|
types: "dist/index.d.ts",
|
|
@@ -702,7 +702,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
702
702
|
const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
|
|
703
703
|
if (atFloor.length === 0 && recovered.length === 0)
|
|
704
704
|
return;
|
|
705
|
-
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-
|
|
705
|
+
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-ahpxnqjd.js");
|
|
706
706
|
const rollups = await readKnowledgeCounterRollups(directory);
|
|
707
707
|
const flagIds = new Set;
|
|
708
708
|
for (const e of atFloor) {
|
|
@@ -769,11 +769,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
769
769
|
});
|
|
770
770
|
}
|
|
771
771
|
if (action === "quarantine" && toQuarantine.length > 0) {
|
|
772
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
773
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
772
|
+
const { quarantineEntry } = await import("./knowledge-validator-4saz53kh.js");
|
|
773
|
+
const { KnowledgeConfigSchema } = await import("./schema-p82ntfy9.js");
|
|
774
774
|
let config;
|
|
775
775
|
try {
|
|
776
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
776
|
+
const { loadPluginConfigWithMeta } = await import("./index-2vzgvscz.js");
|
|
777
777
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
778
778
|
config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
779
779
|
} catch {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-bf0j2wd2.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-9zf5gfca.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -84,39 +84,39 @@ import {
|
|
|
84
84
|
handleWriteRetroCommand,
|
|
85
85
|
normalizeSwarmCommandInput,
|
|
86
86
|
resolveCommand
|
|
87
|
-
} from "./index-
|
|
87
|
+
} from "./index-sp7s1vk3.js";
|
|
88
88
|
import"./index-vm4xw9z3.js";
|
|
89
89
|
import"./index-rrxcfxrd.js";
|
|
90
|
-
import"./index-
|
|
91
|
-
import"./index-
|
|
90
|
+
import"./index-xz0zjrdr.js";
|
|
91
|
+
import"./index-ca6qmxd8.js";
|
|
92
92
|
import"./index-fmh15wxb.js";
|
|
93
93
|
import"./index-ngqxzkqm.js";
|
|
94
94
|
import"./index-y8552snf.js";
|
|
95
95
|
import"./index-4905hd2m.js";
|
|
96
96
|
import"./index-134d35c1.js";
|
|
97
|
-
import"./index-
|
|
98
|
-
import"./index-
|
|
99
|
-
import"./index-
|
|
97
|
+
import"./index-4xs9e82s.js";
|
|
98
|
+
import"./index-hmapndcz.js";
|
|
99
|
+
import"./index-whf5ecbw.js";
|
|
100
100
|
import"./index-6mjf4vr1.js";
|
|
101
101
|
import"./index-c8s9a3zh.js";
|
|
102
102
|
import"./index-9ss2m4rs.js";
|
|
103
103
|
import"./index-wsdnttf4.js";
|
|
104
104
|
import"./index-39k6y018.js";
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
105
|
+
import"./index-z55s5719.js";
|
|
106
|
+
import"./index-7kgfvt3h.js";
|
|
107
107
|
import"./index-rtry5xyf.js";
|
|
108
|
-
import"./index-
|
|
109
|
-
import"./index-
|
|
108
|
+
import"./index-7wzyf4dr.js";
|
|
109
|
+
import"./index-cdx3aqj5.js";
|
|
110
110
|
import"./index-ae75rja9.js";
|
|
111
111
|
import"./index-en4fb04r.js";
|
|
112
112
|
import"./index-tqshdzaw.js";
|
|
113
|
-
import"./index-
|
|
113
|
+
import"./index-npgjk6vc.js";
|
|
114
114
|
import"./index-k5jrywpr.js";
|
|
115
115
|
import"./index-n832052r.js";
|
|
116
116
|
import {
|
|
117
117
|
init_schema,
|
|
118
118
|
stripKnownSwarmPrefix
|
|
119
|
-
} from "./index-
|
|
119
|
+
} from "./index-6nenabrm.js";
|
|
120
120
|
import"./index-bk5tah7q.js";
|
|
121
121
|
import"./index-8fwhhayc.js";
|
|
122
122
|
import"./index-q1exe2b3.js";
|
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
ORCHESTRATOR_NAME,
|
|
134
134
|
init_constants
|
|
135
135
|
} from "./index-3jcyn8g6.js";
|
|
136
|
-
import"./index-
|
|
136
|
+
import"./index-0s4gr6qh.js";
|
|
137
137
|
import"./index-4qzeef9h.js";
|
|
138
138
|
import"./index-fsrp8wp3.js";
|
|
139
139
|
import"./index-xybtaph7.js";
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-sp7s1vk3.js";
|
|
16
16
|
import {
|
|
17
17
|
checkFileAuthority,
|
|
18
18
|
classifyFile,
|
|
19
19
|
isInDeclaredScope,
|
|
20
20
|
redactPath,
|
|
21
21
|
redactShellCommand
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-xz0zjrdr.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|
|
@@ -625,7 +625,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
625
625
|
deltas.push({ id, delta });
|
|
626
626
|
}
|
|
627
627
|
if (deltas.length > 0) {
|
|
628
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
628
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-27aynbeg.js");
|
|
629
629
|
await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
630
630
|
}
|
|
631
631
|
return {
|