opencode-swarm 7.178.0 → 7.178.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/{coder-settlement-d2bfb25j.js → coder-settlement-m03dfyec.js} +11 -11
- package/dist/cli/{config-doctor-905x2s1c.js → config-doctor-x8b260sh.js} +2 -2
- package/dist/cli/{core-k7wfx1wx.js → core-2d0xcyby.js} +3 -3
- package/dist/cli/{curation-policy-n4hd2wsa.js → curation-policy-7am15ht9.js} +5 -5
- package/dist/cli/{curator-wyadq69k.js → curator-5kfkqzc9.js} +37 -37
- package/dist/cli/{curator-drift-smqmej5v.js → curator-drift-d93pwt8h.js} +5 -5
- package/dist/cli/curator-llm-factory-rgdb2ee5.js +72 -0
- package/dist/cli/{evidence-summary-service-r3wcprfk.js → evidence-summary-service-959pwbwb.js} +16 -16
- package/dist/cli/{gate-evidence-tq9rb2aj.js → gate-evidence-66kjx6zj.js} +6 -6
- package/dist/cli/guardrail-explain-rre9ntq3.js +73 -0
- package/dist/cli/{guardrail-log-m6twga6x.js → guardrail-log-t0ydqz5s.js} +7 -7
- package/dist/cli/{guardrail-reset-86esv8cr.js → guardrail-reset-6gad352a.js} +37 -37
- package/dist/cli/{hive-promoter-s87hkb40.js → hive-promoter-zgnagx67.js} +37 -37
- package/dist/cli/{index-yeh78c1g.js → index-0pmh1kks.js} +2 -2
- package/dist/cli/{index-kfk403mc.js → index-1hgqs8j8.js} +4 -4
- package/dist/cli/{index-swxaa0zs.js → index-1jcy4gc6.js} +37 -37
- package/dist/cli/{index-qk29b7s4.js → index-1qnykdaw.js} +39 -39
- package/dist/cli/{index-zex7644g.js → index-1zrrerev.js} +2 -2
- package/dist/cli/{index-pm7c6f66.js → index-2b0ktpbf.js} +2 -2
- package/dist/cli/{index-2vhkwy6v.js → index-2e6txjp7.js} +2 -2
- package/dist/cli/{index-2mdk6nt9.js → index-2pyba37z.js} +7 -7
- package/dist/cli/{index-2b1whj28.js → index-3pzwsesm.js} +2 -2
- package/dist/cli/{index-rp0jk48x.js → index-4e4zsj2g.js} +7 -7
- package/dist/cli/{index-vfc7d22n.js → index-6e8fpjdg.js} +1 -1
- package/dist/cli/{index-wkde35ej.js → index-7kty6f59.js} +8 -8
- package/dist/cli/{index-mpcp6rmj.js → index-7n4dtzk4.js} +1 -1
- package/dist/cli/{index-d5dexrv1.js → index-b50qevsm.js} +4 -4
- package/dist/cli/{index-y6a2bkp1.js → index-bb148vht.js} +2 -2
- package/dist/cli/{index-2bmhe2jn.js → index-byfrearz.js} +3 -3
- package/dist/cli/{index-sqngtwyq.js → index-eq1n57tg.js} +1 -1
- package/dist/cli/{index-jzxeymr0.js → index-h0kyy9rd.js} +93 -227
- package/dist/cli/{index-bfz1jvcn.js → index-h4nh6s8b.js} +1 -1
- package/dist/cli/{index-p27az2hc.js → index-j7w16s92.js} +3 -3
- package/dist/cli/{index-azy3tw6c.js → index-kj599831.js} +2 -2
- package/dist/cli/{index-ke3m026z.js → index-ksq6cqg0.js} +14 -7
- package/dist/cli/{index-j3rkh9mp.js → index-kz9pcqn9.js} +2 -2
- package/dist/cli/{index-zsp9de3k.js → index-ne9zamcs.js} +7 -7
- package/dist/cli/{index-q9vb5e7n.js → index-nrfjjqm4.js} +1 -1
- package/dist/cli/{index-tnjmn0dn.js → index-nzekzzs2.js} +4 -4
- package/dist/cli/{index-wfbh1bx8.js → index-pk97v7b8.js} +3 -3
- package/dist/cli/{index-gg44hytk.js → index-pyxs697r.js} +33 -8
- package/dist/cli/{index-18hjycr1.js → index-qbs49vge.js} +30 -2
- package/dist/cli/{index-zsm8h8y1.js → index-r78kphsr.js} +4 -4
- package/dist/cli/{index-zmb8fjp5.js → index-s4bkey0q.js} +1 -1
- package/dist/cli/{index-yj1kr0ft.js → index-t8dqe4ns.js} +1 -1
- package/dist/cli/{index-j1v54ahd.js → index-w1b5qqnp.js} +2 -2
- package/dist/cli/{index-heg4em8j.js → index-wajcx84s.js} +2917 -2722
- package/dist/cli/{index-w4yjy3vp.js → index-whjrhatw.js} +1 -1
- package/dist/cli/{index-qs8eth8h.js → index-x1m1nnry.js} +3 -3
- package/dist/cli/{index-at0ygwwp.js → index-x54339yd.js} +5 -5
- package/dist/cli/{index-29begjkp.js → index-xr3eye3f.js} +8 -8
- package/dist/cli/{index-ffqy30e5.js → index-xr9n0vjv.js} +1 -1
- package/dist/cli/{index-y74n1sy8.js → index-yew23624.js} +7 -7
- package/dist/cli/{index-wbkxbgk8.js → index-zv3j0v08.js} +1 -1
- package/dist/cli/index.js +38 -38
- package/dist/cli/{knowledge-escalator-rgz471df.js → knowledge-escalator-5r6mww64.js} +12 -12
- package/dist/cli/{knowledge-events-4mq0ypx9.js → knowledge-events-typjw0sd.js} +10 -10
- package/dist/cli/{knowledge-link-npk50523.js → knowledge-link-mvykydxg.js} +4 -4
- package/dist/cli/{knowledge-store-gft25s5t.js → knowledge-store-9qcf3emn.js} +5 -5
- package/dist/cli/{knowledge-validator-ejqacbx4.js → knowledge-validator-k6ydsxzy.js} +7 -7
- package/dist/cli/{mcp-emaeeq4s.js → mcp-tedxsgey.js} +1 -1
- package/dist/cli/{pending-delegations-4bhkcykk.js → pending-delegations-d20fnrzv.js} +12 -12
- package/dist/cli/{pr-subscriptions-h1n6dbds.js → pr-subscriptions-awwhg139.js} +12 -12
- package/dist/cli/{pr-workflow-gate-wn6v5za8.js → pr-workflow-gate-ke79bb9c.js} +37 -37
- package/dist/cli/{runner-ffy5ahhz.js → runner-y3sydwtj.js} +5 -5
- package/dist/cli/{scan-cursor-e63t0g5b.js → scan-cursor-16s6dp7f.js} +6 -6
- package/dist/cli/{schema-4k4hr33y.js → schema-nqjp43vq.js} +1 -1
- package/dist/cli/{scope-persistence-qcw3rtxq.js → scope-persistence-8z1hwdr2.js} +19 -15
- package/dist/cli/{server-58s1wwap.js → server-x16hp9aq.js} +44 -42
- package/dist/cli/{skill-generator-fhj13jmq.js → skill-generator-xadg43ph.js} +14 -14
- package/dist/cli/{snapshot-coordination-init-5fawrj35.js → snapshot-coordination-init-3yyzb2c4.js} +37 -37
- package/dist/cli/{telemetry-ca8dmn26.js → telemetry-c9wv2cfw.js} +1 -1
- package/dist/cli/{workspace-snapshot-v5qyjxg0.js → workspace-snapshot-rfnn80dg.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-hjk0jx19.js → worktree-collision-ownership-drqhmmtd.js} +13 -13
- package/dist/cli/{worktree-isolation-aj20bs6q.js → worktree-isolation-aebdyb1m.js} +37 -37
- package/dist/config/plan-schema.d.ts +23 -0
- package/dist/evidence/phase-participation.d.ts +3 -2
- package/dist/hooks/delegation-gate.d.ts +1 -1
- package/dist/hooks/extractors.d.ts +5 -1
- package/dist/index.js +506 -504
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/memory-family-migration.d.ts +35 -3
- package/dist/plan/ledger.d.ts +14 -0
- package/dist/plan/manager.d.ts +0 -2
- package/dist/plan/parallel-verdict.d.ts +28 -14
- package/dist/scope/scope-persistence.d.ts +41 -0
- package/dist/tools/plan-conflict-check.d.ts +7 -6
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-qhhxev17.js +0 -72
- package/dist/cli/guardrail-explain-kvgejh24.js +0 -73
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-s4bkey0q.js";
|
|
5
5
|
import {
|
|
6
6
|
bunSpawn
|
|
7
7
|
} from "./index-2s7dvzff.js";
|
|
8
8
|
import {
|
|
9
9
|
atomicWriteSwarmFileSync
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ne9zamcs.js";
|
|
11
11
|
import {
|
|
12
12
|
canonicalRootKeyFresh
|
|
13
13
|
} from "./index-1xnse449.js";
|
|
@@ -244,7 +244,7 @@ var _internals2 = {
|
|
|
244
244
|
symlinkSync: fs2.symlinkSync
|
|
245
245
|
},
|
|
246
246
|
writeScopeToDisk: async (directory, taskId, files) => {
|
|
247
|
-
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-
|
|
247
|
+
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-8z1hwdr2.js");
|
|
248
248
|
return realWrite(directory, taskId, files);
|
|
249
249
|
},
|
|
250
250
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
detectWindowsWrites,
|
|
15
15
|
getSharedClassifierGuardrailBlock,
|
|
16
16
|
resolveWriteTargets
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-wajcx84s.js";
|
|
18
18
|
import {
|
|
19
19
|
checkFileAuthority,
|
|
20
20
|
classifyFile,
|
|
21
21
|
isInDeclaredScope,
|
|
22
22
|
redactPath,
|
|
23
23
|
redactShellCommand
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-x1m1nnry.js";
|
|
25
25
|
|
|
26
26
|
// src/services/guardrail-explain-service.ts
|
|
27
27
|
import path from "path";
|
|
@@ -2,31 +2,32 @@
|
|
|
2
2
|
import {
|
|
3
3
|
derivePlanId,
|
|
4
4
|
derivePlanIdentityHash
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-whjrhatw.js";
|
|
6
6
|
import {
|
|
7
7
|
getProjectDb,
|
|
8
8
|
projectDbExists,
|
|
9
9
|
withImmediateTransaction,
|
|
10
10
|
withProjectDbReadOnly
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-nzekzzs2.js";
|
|
12
12
|
import {
|
|
13
13
|
assertProjectRoot,
|
|
14
14
|
withEvidenceLock
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-kz9pcqn9.js";
|
|
16
16
|
import {
|
|
17
17
|
emit
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-pk97v7b8.js";
|
|
19
19
|
import {
|
|
20
20
|
ExecutionProfileSchema,
|
|
21
21
|
PlanSchema,
|
|
22
22
|
TaskStatusSchema,
|
|
23
23
|
init_loader,
|
|
24
|
-
loadPluginConfig
|
|
25
|
-
|
|
24
|
+
loadPluginConfig,
|
|
25
|
+
normalizeCurrentPhaseInPlace
|
|
26
|
+
} from "./index-qbs49vge.js";
|
|
26
27
|
import {
|
|
27
28
|
init_package,
|
|
28
29
|
package_default
|
|
29
|
-
} from "./index-
|
|
30
|
+
} from "./index-zv3j0v08.js";
|
|
30
31
|
import {
|
|
31
32
|
criticalWarn,
|
|
32
33
|
init_logger,
|
|
@@ -1747,6 +1748,12 @@ async function replayFromLedgerWithStatus(directory, _options) {
|
|
|
1747
1748
|
return { plan, truncated, badSuffix };
|
|
1748
1749
|
}
|
|
1749
1750
|
function reconstructPlanFromEvents(directory, events) {
|
|
1751
|
+
const plan = reconstructPlanFromEventsUnnormalized(directory, events);
|
|
1752
|
+
if (plan)
|
|
1753
|
+
normalizeCurrentPhaseInPlace(plan);
|
|
1754
|
+
return plan;
|
|
1755
|
+
}
|
|
1756
|
+
function reconstructPlanFromEventsUnnormalized(directory, events) {
|
|
1750
1757
|
const targetPlanId = events[0].plan_id;
|
|
1751
1758
|
const relevantEvents = events.filter((e) => e.plan_id === targetPlanId);
|
|
1752
1759
|
{
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./index-7g4c7s5r.js";
|
|
5
5
|
import {
|
|
6
6
|
emit
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-pk97v7b8.js";
|
|
8
8
|
import {
|
|
9
9
|
atomicWriteFileAnyRoot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ne9zamcs.js";
|
|
11
11
|
import {
|
|
12
12
|
init_logger,
|
|
13
13
|
warn
|
|
@@ -229,9 +229,9 @@ var SWARM_TEMP_GRAMMARS = [
|
|
|
229
229
|
"src/evidence/task-file.ts (pre-#2035; migrated-to=src/evidence/task-file.ts:atomicWriteFile)",
|
|
230
230
|
"src/scope/scope-persistence.ts (pre-#2035; migrated-to=src/scope/scope-persistence.ts:atomicWrite)",
|
|
231
231
|
"src/scope/scope-persistence.ts (pre-#2035; migrated-to=src/scope/scope-persistence.ts:atomicWriteSync)",
|
|
232
|
-
"src/plan/manager.ts:
|
|
233
|
-
"src/plan/manager.ts:
|
|
234
|
-
"src/plan/manager.ts:
|
|
232
|
+
"src/plan/manager.ts:662",
|
|
233
|
+
"src/plan/manager.ts:1988",
|
|
234
|
+
"src/plan/manager.ts:2042",
|
|
235
235
|
"src/review/evidence.ts:175",
|
|
236
236
|
"src/turbo/lean/evidence.ts:182",
|
|
237
237
|
"src/summaries/manager.ts:163",
|
|
@@ -247,7 +247,7 @@ var SWARM_TEMP_GRAMMARS = [
|
|
|
247
247
|
"src/evidence/phase-participation.ts (pre-#2035; migrated-to=src/evidence/phase-participation.ts:atomicWriteBytes)",
|
|
248
248
|
"src/turbo/lean/integration.ts:428",
|
|
249
249
|
"src/turbo/lean/reviewer.ts:403",
|
|
250
|
-
"src/plan/ledger.ts:
|
|
250
|
+
"src/plan/ledger.ts:1463",
|
|
251
251
|
"src/services/synonym-map.ts:389",
|
|
252
252
|
"src/services/skill-optimizer/store.ts:340",
|
|
253
253
|
"src/services/skill-optimizer/store.ts:503",
|
|
@@ -361,7 +361,7 @@ var SWARM_TEMP_GRAMMARS = [
|
|
|
361
361
|
token: "instance",
|
|
362
362
|
quarantineEligible: true,
|
|
363
363
|
parsesTarget: true,
|
|
364
|
-
producers: ["src/plan/manager.ts:
|
|
364
|
+
producers: ["src/plan/manager.ts:2390", "src/plan/manager.ts:2424"],
|
|
365
365
|
note: "plan-durability (invariant 5) fd-write paths; grammars registered, writers unchanged in this PR"
|
|
366
366
|
},
|
|
367
367
|
{
|
|
@@ -427,8 +427,8 @@ var SWARM_TEMP_GRAMMARS = [
|
|
|
427
427
|
"src/hooks/skill-usage-log.ts:1675",
|
|
428
428
|
"src/hooks/skill-usage-pending.ts:817",
|
|
429
429
|
"src/parallel/file-locks.ts:113",
|
|
430
|
-
"src/plan/ledger.ts:
|
|
431
|
-
"src/plan/ledger.ts:
|
|
430
|
+
"src/plan/ledger.ts:607",
|
|
431
|
+
"src/plan/ledger.ts:1777"
|
|
432
432
|
],
|
|
433
433
|
note: "constant-name temps: reported when stale, never auto-quarantined. file-locks meta sidecars live under the scanner-skipped .swarm/locks/ subtree; the ledger reconcile temp embeds instance tokens but its .tmp-suffix shape maps here (conservatively report-only)"
|
|
434
434
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
loadDatabaseCtor
|
|
4
|
-
} from "./index-rdm3px0g.js";
|
|
5
2
|
import {
|
|
6
3
|
canonicalExistingFilesystemPath
|
|
7
4
|
} from "./index-ry16d01s.js";
|
|
5
|
+
import {
|
|
6
|
+
loadDatabaseCtor
|
|
7
|
+
} from "./index-rdm3px0g.js";
|
|
8
8
|
import {
|
|
9
9
|
atomicWriteSwarmFileSync
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ne9zamcs.js";
|
|
11
11
|
import {
|
|
12
12
|
canonicalRootKeyFresh,
|
|
13
13
|
lexicalRootAliasKey
|
|
@@ -735,7 +735,7 @@ var CATALOG_SOURCE = [
|
|
|
735
735
|
category: "plan",
|
|
736
736
|
severity: "notice",
|
|
737
737
|
privacyClass: "operational",
|
|
738
|
-
producer: "src/plan/manager.ts:
|
|
738
|
+
producer: "src/plan/manager.ts:359",
|
|
739
739
|
consumers: NO_CONSUMERS,
|
|
740
740
|
futureOwnerIssue: ISSUE_SINK,
|
|
741
741
|
retentionOwnerIssue: ISSUE_PLAN_EVIDENCE_RETENTION,
|
|
@@ -748,7 +748,7 @@ var CATALOG_SOURCE = [
|
|
|
748
748
|
category: "plan",
|
|
749
749
|
severity: "warning",
|
|
750
750
|
privacyClass: "sensitive",
|
|
751
|
-
producer: "src/plan/manager.ts:
|
|
751
|
+
producer: "src/plan/manager.ts:2065",
|
|
752
752
|
consumers: NO_CONSUMERS,
|
|
753
753
|
futureOwnerIssue: ISSUE_SINK,
|
|
754
754
|
retentionOwnerIssue: ISSUE_PLAN_EVIDENCE_RETENTION,
|
|
@@ -761,7 +761,7 @@ var CATALOG_SOURCE = [
|
|
|
761
761
|
category: "plan",
|
|
762
762
|
severity: "error",
|
|
763
763
|
privacyClass: "sensitive",
|
|
764
|
-
producer: "src/plan/ledger.ts:
|
|
764
|
+
producer: "src/plan/ledger.ts:1609",
|
|
765
765
|
consumers: NO_CONSUMERS,
|
|
766
766
|
futureOwnerIssue: ISSUE_SINK,
|
|
767
767
|
retentionOwnerIssue: ISSUE_PLAN_EVIDENCE_RETENTION,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
computePlanStructureHash
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-ksq6cqg0.js";
|
|
5
5
|
import {
|
|
6
6
|
appendCoreEventSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-w1b5qqnp.js";
|
|
8
8
|
import {
|
|
9
9
|
deleteCoordinationState,
|
|
10
10
|
derivePlanId,
|
|
@@ -13,27 +13,27 @@ import {
|
|
|
13
13
|
transitionCoordinationState,
|
|
14
14
|
transitionCoordinationStateWithinTransaction,
|
|
15
15
|
withCoordinationTransaction
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-whjrhatw.js";
|
|
17
17
|
import {
|
|
18
18
|
getProjectDb
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-nzekzzs2.js";
|
|
20
20
|
import {
|
|
21
21
|
canonicalExistingFilesystemPath,
|
|
22
22
|
legacyCanonicalExistingFilesystemPath
|
|
23
23
|
} from "./index-ry16d01s.js";
|
|
24
24
|
import {
|
|
25
25
|
assertProjectRoot
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-kz9pcqn9.js";
|
|
27
27
|
import {
|
|
28
28
|
require_proper_lockfile
|
|
29
29
|
} from "./index-7g4c7s5r.js";
|
|
30
30
|
import {
|
|
31
31
|
atomicWriteSwarmFile,
|
|
32
32
|
atomicWriteSwarmFileSync
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-ne9zamcs.js";
|
|
34
34
|
import {
|
|
35
35
|
PlanSchema
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-qbs49vge.js";
|
|
37
37
|
import {
|
|
38
38
|
init_path_identity,
|
|
39
39
|
unsafePathTextReason
|
|
@@ -1179,6 +1179,31 @@ function readScopeBindingFromDisk(input) {
|
|
|
1179
1179
|
});
|
|
1180
1180
|
return resolved.status === "found" ? resolved.binding : null;
|
|
1181
1181
|
}
|
|
1182
|
+
function readDeclaredScopeFilesFromBindings(input) {
|
|
1183
|
+
if (!isSafeTaskId(input.taskId))
|
|
1184
|
+
return null;
|
|
1185
|
+
const set = input.bindingSet !== undefined ? input.bindingSet : readAuthoritativeScopeBindingSet(input.directory);
|
|
1186
|
+
if (set === null)
|
|
1187
|
+
return null;
|
|
1188
|
+
const planId = derivePlanId(input.plan);
|
|
1189
|
+
const structureHash = computePlanStructureHash(input.plan);
|
|
1190
|
+
const now = Date.now();
|
|
1191
|
+
const candidates = set.filter((binding) => binding.taskId === input.taskId && binding.planId === planId && binding.planStructureHash === structureHash && binding.lifecycleState === "live" && binding.expiresAt > now);
|
|
1192
|
+
if (candidates.length < 1)
|
|
1193
|
+
return null;
|
|
1194
|
+
const first = [...candidates[0].files].sort().join(`
|
|
1195
|
+
`);
|
|
1196
|
+
const agreeing = candidates.every((candidate) => [...candidate.files].sort().join(`
|
|
1197
|
+
`) === first);
|
|
1198
|
+
if (!agreeing)
|
|
1199
|
+
return null;
|
|
1200
|
+
const files = candidates[0].files;
|
|
1201
|
+
return Array.isArray(files) && files.length > 0 ? files : null;
|
|
1202
|
+
}
|
|
1203
|
+
function readAuthoritativeScopeBindingSet(directory) {
|
|
1204
|
+
const set = readAllAuthoritativeScopeBindings(directory);
|
|
1205
|
+
return set.ok ? set.value : null;
|
|
1206
|
+
}
|
|
1182
1207
|
function resolveScopeBindingFromDisk(input) {
|
|
1183
1208
|
if (!isSafeTaskId(input.taskId))
|
|
1184
1209
|
return { status: "not_declared" };
|
|
@@ -2015,4 +2040,4 @@ function resolveScopeWithFallbacks(input) {
|
|
|
2015
2040
|
return null;
|
|
2016
2041
|
}
|
|
2017
2042
|
|
|
2018
|
-
export { MAX_PENDING_SCOPE_BINDINGS, canonicalWorkspaceIdentity, normalizeScopeFiles, clearScopeBindings, writeScopeToDisk, writeScopeBindingToDisk, persistAndRegisterScopeBinding, readScopeBindingFromDisk, resolveScopeBindingFromDisk, clearScopeBindingFromDisk, tombstoneScopeBinding, refreshScopeBindingLease, claimScopeBindingForChildDurably, replaceExistingScopeDeclaration, flushScopeBindingMaintenance, pruneScopeBindingTombstones, resolveAuthorizedScopeBinding, resolveAuthorizedScopeBindingDetailed, resolveAuthorizedScopeBindingForSession, resolveAuthorizedScopeBindingForSessionDetailed, resolveAuthorizedPrFeedbackScopeBindingFromDisk, _scopePersistenceInternals, readScopeFromDisk, readPlanScope, clearScopeForTask, clearAllScopes, resolveScopeWithFallbacks };
|
|
2043
|
+
export { MAX_PENDING_SCOPE_BINDINGS, canonicalWorkspaceIdentity, normalizeScopeFiles, clearScopeBindings, writeScopeToDisk, writeScopeBindingToDisk, persistAndRegisterScopeBinding, readScopeBindingFromDisk, readDeclaredScopeFilesFromBindings, readAuthoritativeScopeBindingSet, resolveScopeBindingFromDisk, clearScopeBindingFromDisk, tombstoneScopeBinding, refreshScopeBindingLease, claimScopeBindingForChildDurably, replaceExistingScopeDeclaration, flushScopeBindingMaintenance, pruneScopeBindingTombstones, resolveAuthorizedScopeBinding, resolveAuthorizedScopeBindingDetailed, resolveAuthorizedScopeBindingForSession, resolveAuthorizedScopeBindingForSessionDetailed, resolveAuthorizedPrFeedbackScopeBindingFromDisk, _scopePersistenceInternals, readScopeFromDisk, readPlanScope, clearScopeForTask, clearAllScopes, resolveScopeWithFallbacks };
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
PluginConfigSchema,
|
|
15
15
|
init_schema,
|
|
16
16
|
resolveExternalSkillsConfig
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-zv3j0v08.js";
|
|
18
18
|
import {
|
|
19
19
|
exports_external,
|
|
20
20
|
init_zod
|
|
@@ -872,5 +872,33 @@ var PlanSchema = exports_external.object({
|
|
|
872
872
|
specHash: exports_external.string().optional(),
|
|
873
873
|
execution_profile: ExecutionProfileSchema.optional()
|
|
874
874
|
});
|
|
875
|
+
function isPhaseStatusTerminal(status) {
|
|
876
|
+
return status === "complete" || status === "completed" || status === "closed";
|
|
877
|
+
}
|
|
878
|
+
function isPhaseEffectivelyTerminal(phase) {
|
|
879
|
+
if (isPhaseStatusTerminal(phase.status))
|
|
880
|
+
return true;
|
|
881
|
+
const tasks = phase.tasks ?? [];
|
|
882
|
+
return tasks.length > 0 && tasks.every((task) => task.status === "completed" || task.status === "closed");
|
|
883
|
+
}
|
|
884
|
+
function resolveActivePhaseId(plan) {
|
|
885
|
+
const cursor = plan.current_phase;
|
|
886
|
+
if (cursor !== undefined) {
|
|
887
|
+
const cursorPhase = plan.phases.find((phase) => phase.id === cursor);
|
|
888
|
+
if (cursorPhase && !isPhaseEffectivelyTerminal(cursorPhase)) {
|
|
889
|
+
return cursorPhase.id;
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
const firstNonTerminal = plan.phases.find((phase) => !isPhaseEffectivelyTerminal(phase));
|
|
893
|
+
if (firstNonTerminal)
|
|
894
|
+
return firstNonTerminal.id;
|
|
895
|
+
return plan.phases[plan.phases.length - 1]?.id ?? 1;
|
|
896
|
+
}
|
|
897
|
+
function normalizeCurrentPhaseInPlace(plan) {
|
|
898
|
+
plan.current_phase = resolveActivePhaseId(plan);
|
|
899
|
+
}
|
|
900
|
+
function getCurrentPhase(plan) {
|
|
901
|
+
return resolveActivePhaseId(plan);
|
|
902
|
+
}
|
|
875
903
|
|
|
876
|
-
export { loadPluginConfig, loadPluginConfigWithMeta, loadGateOverrides, resetConfigAdvisoryDedup, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader, ExecutionProfileSchema, TaskStatusSchema, TaskSizeSchema, PhaseStatusSchema, MigrationStatusSchema, TaskSchema, PhaseSchema, PlanSchema };
|
|
904
|
+
export { loadPluginConfig, loadPluginConfigWithMeta, loadGateOverrides, resetConfigAdvisoryDedup, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader, ExecutionProfileSchema, TaskStatusSchema, TaskSizeSchema, PhaseStatusSchema, MigrationStatusSchema, TaskSchema, PhaseSchema, PlanSchema, resolveActivePhaseId, normalizeCurrentPhaseInPlace, getCurrentPhase };
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
effectiveRetrievalOutcomes,
|
|
7
7
|
readAuthoritativeKnowledgeCounterRollups
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-xr3eye3f.js";
|
|
9
9
|
import {
|
|
10
10
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
11
11
|
validateSkillPath
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-b50qevsm.js";
|
|
13
13
|
import {
|
|
14
14
|
computeOutcomeSignal,
|
|
15
15
|
readKnowledge,
|
|
16
16
|
resolveHiveKnowledgePath,
|
|
17
17
|
resolveSwarmKnowledgePath,
|
|
18
18
|
transactKnowledge
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-2pyba37z.js";
|
|
20
20
|
import {
|
|
21
21
|
appendCappedJsonl,
|
|
22
22
|
resolveRetentionCap
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
atomicWriteFileAnyRoot,
|
|
26
26
|
atomicWriteSwarmFile
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-ne9zamcs.js";
|
|
28
28
|
import {
|
|
29
29
|
canonicalRootKeyFresh
|
|
30
30
|
} from "./index-1xnse449.js";
|