opencode-swarm 7.178.0 → 7.179.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/.opencode/skills/deep-dive/SKILL.md +1 -1
- package/.opencode/skills/running-tests/SKILL.md +30 -24
- package/.opencode/skills/swarm-plan/SKILL.md +1 -1
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/agents/critic.d.ts +6 -6
- package/dist/agents/explorer.d.ts +1 -1
- package/dist/cli/{coder-settlement-d2bfb25j.js → coder-settlement-7pt3a0y0.js} +12 -12
- package/dist/cli/{config-doctor-905x2s1c.js → config-doctor-82w4bp4b.js} +3 -3
- package/dist/cli/{core-k7wfx1wx.js → core-9rqzs794.js} +4 -4
- package/dist/cli/{curation-policy-n4hd2wsa.js → curation-policy-c7mdsf7m.js} +5 -5
- package/dist/cli/{curator-drift-smqmej5v.js → curator-drift-d93pwt8h.js} +5 -5
- package/dist/cli/curator-llm-factory-cbm1ny30.js +72 -0
- package/dist/cli/{curator-wyadq69k.js → curator-m8act07j.js} +40 -40
- package/dist/cli/{dispatch-9yqqqfr6.js → dispatch-3rwdxpp2.js} +1 -1
- package/dist/cli/{evidence-summary-service-r3wcprfk.js → evidence-summary-service-a99bgje1.js} +17 -17
- package/dist/cli/{explorer-2cv64zfj.js → explorer-z0cf5cz0.js} +1 -1
- package/dist/cli/{gate-evidence-tq9rb2aj.js → gate-evidence-yssmxba5.js} +7 -7
- package/dist/cli/guardrail-explain-ffwmhf7s.js +73 -0
- package/dist/cli/{guardrail-log-m6twga6x.js → guardrail-log-j2wtq7p2.js} +8 -8
- package/dist/cli/{guardrail-reset-86esv8cr.js → guardrail-reset-07byr7nr.js} +40 -40
- package/dist/cli/{hive-promoter-s87hkb40.js → hive-promoter-ewrz7vh1.js} +40 -40
- package/dist/cli/{index-ke3m026z.js → index-09wm3963.js} +14 -7
- package/dist/cli/{index-vfc7d22n.js → index-0bc8jdnv.js} +2 -2
- package/dist/cli/{index-ffqy30e5.js → index-0h3cr7pn.js} +1 -1
- package/dist/cli/{index-fyfbpz4f.js → index-1c1dbwze.js} +1 -0
- package/dist/cli/{index-zex7644g.js → index-1rwyfvq2.js} +2 -2
- package/dist/cli/{index-18hjycr1.js → index-1sz02k85.js} +30 -2
- package/dist/cli/{index-pm7c6f66.js → index-2b0ktpbf.js} +2 -2
- package/dist/cli/{index-yj1kr0ft.js → index-34bwqcea.js} +1 -1
- package/dist/cli/{index-wkde35ej.js → index-3hne91yd.js} +8 -8
- package/dist/cli/{index-2b1whj28.js → index-3pzwsesm.js} +2 -2
- package/dist/cli/{index-y74n1sy8.js → index-6r92fw88.js} +7 -7
- package/dist/cli/{index-p27az2hc.js → index-6tnkvqr9.js} +4 -4
- package/dist/cli/{index-qs8eth8h.js → index-7zmbtxw1.js} +4 -4
- package/dist/cli/{index-azy3tw6c.js → index-80q47hpw.js} +2 -2
- package/dist/cli/{index-zsm8h8y1.js → index-8815e95e.js} +4 -4
- package/dist/cli/{index-gg44hytk.js → index-9p1pqykb.js} +33 -8
- package/dist/cli/{index-w4yjy3vp.js → index-a11ztzs5.js} +19 -2
- package/dist/cli/{index-sqngtwyq.js → index-amf88k1e.js} +1 -1
- package/dist/cli/{index-y6a2bkp1.js → index-cvg402ha.js} +2 -2
- package/dist/cli/{index-heg4em8j.js → index-d66zb40k.js} +3499 -2832
- package/dist/cli/{index-swxaa0zs.js → index-etmwjgre.js} +40 -40
- package/dist/cli/{index-j3rkh9mp.js → index-f2v90gfc.js} +2 -2
- package/dist/cli/{index-mpcp6rmj.js → index-g6nyk713.js} +1 -1
- package/dist/cli/{index-bfz1jvcn.js → index-h4nh6s8b.js} +1 -1
- package/dist/cli/{index-j1v54ahd.js → index-h59vsbch.js} +2 -2
- package/dist/cli/{index-29begjkp.js → index-hwcra3y9.js} +8 -8
- package/dist/cli/{index-2vhkwy6v.js → index-kanxpgf8.js} +3 -3
- package/dist/cli/{index-kfk403mc.js → index-kmhnkn6t.js} +4 -4
- package/dist/cli/{index-2mdk6nt9.js → index-ndwbb3xm.js} +7 -7
- package/dist/cli/{index-zsp9de3k.js → index-ne9zamcs.js} +7 -7
- package/dist/cli/{index-tnjmn0dn.js → index-nzekzzs2.js} +4 -4
- package/dist/cli/{index-q9vb5e7n.js → index-pskba939.js} +1 -1
- package/dist/cli/{index-qk29b7s4.js → index-pxtye2ng.js} +42 -42
- package/dist/cli/{index-wfbh1bx8.js → index-qt0793qm.js} +7 -7
- package/dist/cli/{index-at0ygwwp.js → index-qxk5qkfh.js} +5 -5
- package/dist/cli/{index-zmb8fjp5.js → index-s4bkey0q.js} +1 -1
- package/dist/cli/{index-rp0jk48x.js → index-sv4y1cma.js} +7 -7
- package/dist/cli/{index-2bmhe2jn.js → index-tmy46dtd.js} +4 -4
- package/dist/cli/{index-wbkxbgk8.js → index-twtez316.js} +2 -2
- package/dist/cli/{index-m2n1rhgv.js → index-w872yykk.js} +1 -1
- package/dist/cli/{index-jzxeymr0.js → index-wvpsm8ja.js} +93 -227
- package/dist/cli/{index-d5dexrv1.js → index-yagqxt2p.js} +4 -4
- package/dist/cli/{index-yeh78c1g.js → index-yfpswnjt.js} +2 -2
- package/dist/cli/{index-hnvmj9wx.js → index-zgvzbz48.js} +14 -4
- package/dist/cli/index.js +41 -41
- package/dist/cli/{knowledge-escalator-rgz471df.js → knowledge-escalator-yx97q9c1.js} +13 -13
- package/dist/cli/{knowledge-events-4mq0ypx9.js → knowledge-events-p269fyvv.js} +11 -11
- package/dist/cli/{knowledge-link-npk50523.js → knowledge-link-gfz47ves.js} +4 -4
- package/dist/cli/{knowledge-store-gft25s5t.js → knowledge-store-36zemyqa.js} +5 -5
- package/dist/cli/{knowledge-validator-ejqacbx4.js → knowledge-validator-rd20yq41.js} +7 -7
- package/dist/cli/{mcp-emaeeq4s.js → mcp-sg9zrkz2.js} +1 -1
- package/dist/cli/{model-preflight-kh9dwts2.js → model-preflight-61xgqwcs.js} +1 -1
- package/dist/cli/{pending-delegations-4bhkcykk.js → pending-delegations-8p2gf4kt.js} +12 -12
- package/dist/cli/{pr-subscriptions-h1n6dbds.js → pr-subscriptions-4dj9r71h.js} +12 -12
- package/dist/cli/{pr-workflow-gate-wn6v5za8.js → pr-workflow-gate-8dgz5z1h.js} +42 -40
- package/dist/cli/{runner-ffy5ahhz.js → runner-16b691ba.js} +5 -5
- package/dist/cli/{scan-cursor-e63t0g5b.js → scan-cursor-nx0jv9ya.js} +6 -6
- package/dist/cli/{schema-4k4hr33y.js → schema-q6gsrxwz.js} +2 -2
- package/dist/cli/{scope-persistence-qcw3rtxq.js → scope-persistence-1k4xsyh7.js} +20 -16
- package/dist/cli/{server-58s1wwap.js → server-shhxq34t.js} +47 -45
- package/dist/cli/{skill-generator-fhj13jmq.js → skill-generator-6j7tq2tb.js} +15 -15
- package/dist/cli/{snapshot-coordination-init-5fawrj35.js → snapshot-coordination-init-h8n8w1cm.js} +40 -40
- package/dist/cli/{telemetry-ca8dmn26.js → telemetry-qxav5cdk.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-97jzh4ra.js} +13 -13
- package/dist/cli/{worktree-isolation-aj20bs6q.js → worktree-isolation-g4w74ccb.js} +40 -40
- package/dist/commands/registry.d.ts +3 -3
- package/dist/config/plan-schema.d.ts +23 -0
- package/dist/db/coordination-store.d.ts +10 -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/hooks/pr-workflow-gate.d.ts +15 -6
- package/dist/index.js +535 -520
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/memory-family-migration.d.ts +35 -3
- package/dist/mutation/engine.d.ts +6 -0
- package/dist/mutation/equivalence.d.ts +12 -1
- 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/pr-review/circuit.d.ts +3 -3
- package/dist/pr-review/legacy-transcript-adapter.d.ts +7 -10
- package/dist/pr-review/persistence.d.ts +36 -0
- package/dist/retention/sweep.d.ts +4 -0
- package/dist/scope/scope-persistence.d.ts +41 -0
- package/dist/tools/mutation-test.d.ts +6 -0
- package/dist/tools/plan-conflict-check.d.ts +7 -6
- package/dist/tools/prepare-pr-workflow-checkout.d.ts +19 -0
- package/dist/tools/repo-map-action-dispositions.d.ts +23 -0
- package/dist/tools/test-runner.d.ts +17 -2
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-qhhxev17.js +0 -72
- package/dist/cli/guardrail-explain-kvgejh24.js +0 -73
- package/dist/pr-review/guardrails.d.ts +0 -67
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
PluginConfigSchema,
|
|
13
13
|
init_schema,
|
|
14
14
|
stripKnownSwarmPrefix
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-twtez316.js";
|
|
16
16
|
import {
|
|
17
17
|
ALL_AGENT_NAMES,
|
|
18
18
|
TOOL_NAME_SET,
|
|
19
19
|
init_constants,
|
|
20
20
|
init_tool_metadata
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-w872yykk.js";
|
|
22
22
|
import {
|
|
23
23
|
log
|
|
24
24
|
} from "./index-zgwm4ryv.js";
|
|
@@ -38,6 +38,7 @@ INPUT: [focus areas/paths]
|
|
|
38
38
|
|
|
39
39
|
ACTIONS:
|
|
40
40
|
- FIRST call \`repo_map action="ask"\` with your mission question, and \`action="context_pack"\` (with include_source: true) for your target symbols; use the hits to decide what to read
|
|
41
|
+
- Locate symbols by name with \`repo_map action="symbol_search"\` before reading files; treat hits as pointers, not evidence
|
|
41
42
|
- Graph output is orientation \u2014 read the located files before reporting on them
|
|
42
43
|
- Fall back to tree/glob/grep only where the graph has no coverage (\`stale: true\`, missing files, or non-code assets)
|
|
43
44
|
- Read key files (README, configs, entry points)
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readKnowledge,
|
|
4
4
|
transactKnowledge
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-ndwbb3xm.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveKnowledgeStoreDir
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-34bwqcea.js";
|
|
9
9
|
import {
|
|
10
10
|
init_git_executable,
|
|
11
11
|
resolveGitExecutableAsync
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
PluginConfigSchema,
|
|
15
15
|
init_schema,
|
|
16
16
|
resolveExternalSkillsConfig
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-twtez316.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 };
|
|
@@ -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
|
atomicWriteSwarmFile
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ne9zamcs.js";
|
|
11
11
|
import {
|
|
12
12
|
canonicalRootKey,
|
|
13
13
|
sameProjectRoot
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
captureWorkspaceSnapshotAsync,
|
|
4
4
|
changedFilesSinceSnapshotAsync
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-2b0ktpbf.js";
|
|
6
6
|
import {
|
|
7
7
|
removeWorktreeProvisioningOwner
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-3pzwsesm.js";
|
|
9
9
|
import {
|
|
10
10
|
SOURCE_WORKTREE_GONE_STAGE,
|
|
11
11
|
ensureTaskGateRequirementsReceiptForSettledTransition,
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
reconcileLandedMerge,
|
|
15
15
|
withTaskEvidenceTransaction,
|
|
16
16
|
writeWorkflowWalFile
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-kmhnkn6t.js";
|
|
18
18
|
import {
|
|
19
19
|
validateSwarmPath
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-s4bkey0q.js";
|
|
21
21
|
import {
|
|
22
22
|
appendCoreEventSync
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-h59vsbch.js";
|
|
24
24
|
import {
|
|
25
25
|
tryAcquireLock
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-f2v90gfc.js";
|
|
27
27
|
import {
|
|
28
28
|
canonicalRootKeyFresh
|
|
29
29
|
} from "./index-1xnse449.js";
|
|
@@ -501,7 +501,7 @@ async function cleanupRecoveredWorktree(directory, descriptor, options) {
|
|
|
501
501
|
awaitingMergeByCallID,
|
|
502
502
|
cleanupStandardWorktreeForCallId,
|
|
503
503
|
standardWorktreeByCallID
|
|
504
|
-
} = await import("./worktree-isolation-
|
|
504
|
+
} = await import("./worktree-isolation-g4w74ccb.js");
|
|
505
505
|
standardWorktreeByCallID.delete(descriptor.callID);
|
|
506
506
|
if (hasResidue)
|
|
507
507
|
awaitingMergeByCallID.set(descriptor.callID, {
|
|
@@ -633,7 +633,7 @@ async function recoverCoderSettlement(directory, taskId) {
|
|
|
633
633
|
awaitingMergeByCallID,
|
|
634
634
|
finishStandardWorktreeDispatch,
|
|
635
635
|
standardWorktreeByCallID
|
|
636
|
-
} = await import("./worktree-isolation-
|
|
636
|
+
} = await import("./worktree-isolation-g4w74ccb.js");
|
|
637
637
|
const descriptor = wal.worktree;
|
|
638
638
|
const reconstructedDispatch = {
|
|
639
639
|
callID: descriptor.callID,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-s4bkey0q.js";
|
|
5
5
|
import {
|
|
6
6
|
atomicWriteSwarmFileSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-ne9zamcs.js";
|
|
8
8
|
|
|
9
9
|
// src/hooks/delegation-gate/worktree-provisioning-owner.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-s4bkey0q.js";
|
|
5
5
|
import {
|
|
6
6
|
deleteCoordinationState,
|
|
7
7
|
importCoordinationOnce,
|
|
8
8
|
listCoordinationStates,
|
|
9
9
|
transitionCoordinationState,
|
|
10
10
|
withCoordinationTransaction
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-a11ztzs5.js";
|
|
12
12
|
import {
|
|
13
13
|
getProjectDb,
|
|
14
14
|
projectDbExists
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-nzekzzs2.js";
|
|
16
16
|
import {
|
|
17
17
|
observeStoreHealth
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-yfpswnjt.js";
|
|
19
19
|
import {
|
|
20
20
|
withEvidenceLock
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-f2v90gfc.js";
|
|
22
22
|
import {
|
|
23
23
|
telemetry
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-qt0793qm.js";
|
|
25
25
|
import {
|
|
26
26
|
atomicWriteSwarmFileSync
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-ne9zamcs.js";
|
|
28
28
|
import {
|
|
29
29
|
canonicalRootKey,
|
|
30
30
|
canonicalRootKeyFresh,
|
|
@@ -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";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
SWARM_WORKTREE_DIR_NAME,
|
|
24
24
|
init_constants
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-w872yykk.js";
|
|
26
26
|
import {
|
|
27
27
|
init_logger,
|
|
28
28
|
log
|
|
@@ -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-1k4xsyh7.js");
|
|
248
248
|
return realWrite(directory, taskId, files);
|
|
249
249
|
},
|
|
250
250
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
observeStoreHealth
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-yfpswnjt.js";
|
|
5
5
|
import {
|
|
6
6
|
telemetry
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-qt0793qm.js";
|
|
8
8
|
import {
|
|
9
9
|
init_schema,
|
|
10
10
|
stripKnownSwarmPrefix
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-twtez316.js";
|
|
12
12
|
import {
|
|
13
13
|
init_constants
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-w872yykk.js";
|
|
15
15
|
import {
|
|
16
16
|
getPathFlavor,
|
|
17
17
|
init_path_identity,
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
detectWindowsWrites,
|
|
15
15
|
getSharedClassifierGuardrailBlock,
|
|
16
16
|
resolveWriteTargets
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-d66zb40k.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-7zmbtxw1.js";
|
|
25
25
|
|
|
26
26
|
// src/services/guardrail-explain-service.ts
|
|
27
27
|
import path from "path";
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
effectiveRetrievalOutcomes,
|
|
7
7
|
readAuthoritativeKnowledgeCounterRollups
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-hwcra3y9.js";
|
|
9
9
|
import {
|
|
10
10
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
11
11
|
validateSkillPath
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-yagqxt2p.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-ndwbb3xm.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";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
computePlanStructureHash
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-09wm3963.js";
|
|
5
5
|
import {
|
|
6
6
|
appendCoreEventSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-h59vsbch.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-a11ztzs5.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-f2v90gfc.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-1sz02k85.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 };
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getProjectDb,
|
|
5
5
|
projectDbExists,
|
|
6
6
|
withImmediateTransaction
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-nzekzzs2.js";
|
|
8
8
|
|
|
9
9
|
// src/db/coordination-store.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -56,6 +56,23 @@ function readState(db, namespace, entityKey) {
|
|
|
56
56
|
FROM coordination_state WHERE namespace = ? AND entity_key = ?`).get(namespace, entityKey) ?? null;
|
|
57
57
|
return rowToState(row);
|
|
58
58
|
}
|
|
59
|
+
function getCoordinationStateRaw(directory, namespace, entityKey) {
|
|
60
|
+
if (!projectDbExists(directory))
|
|
61
|
+
return null;
|
|
62
|
+
const row = getProjectDb(directory).query(`SELECT namespace, entity_key, revision, generation, status, payload, updated_at
|
|
63
|
+
FROM coordination_state WHERE namespace = ? AND entity_key = ?`).get(namespace, entityKey) ?? null;
|
|
64
|
+
if (!row)
|
|
65
|
+
return null;
|
|
66
|
+
return {
|
|
67
|
+
namespace: row.namespace,
|
|
68
|
+
entityKey: row.entity_key,
|
|
69
|
+
revision: row.revision,
|
|
70
|
+
generation: row.generation,
|
|
71
|
+
status: row.status,
|
|
72
|
+
payload: row.payload,
|
|
73
|
+
updatedAt: row.updated_at
|
|
74
|
+
};
|
|
75
|
+
}
|
|
59
76
|
function transactionHooks() {
|
|
60
77
|
return {
|
|
61
78
|
beforeBegin: (db) => _internals.coordinationFaultInjector?.("before_begin", db),
|
|
@@ -358,4 +375,4 @@ function derivePlanIdentityHash(plan) {
|
|
|
358
375
|
return createHash2("sha256").update(JSON.stringify([plan.swarm, plan.title]), "utf8").digest("hex");
|
|
359
376
|
}
|
|
360
377
|
|
|
361
|
-
export { MAX_COORDINATION_STATE_LIST_ROWS, withCoordinationTransaction, getCoordinationState, listCoordinationStates, countCoordinationStates, deleteCoordinationState, deleteCoordinationStateWithinTransaction, transitionCoordinationStateWithinTransaction, transitionCoordinationState, getCoordinationLease, acquireCoordinationLease, releaseCoordinationLease, importCoordinationOnce, deleteCoordinationImports, derivePlanId, derivePlanIdentityHash };
|
|
378
|
+
export { MAX_COORDINATION_STATE_LIST_ROWS, getCoordinationStateRaw, withCoordinationTransaction, getCoordinationState, listCoordinationStates, countCoordinationStates, deleteCoordinationState, deleteCoordinationStateWithinTransaction, transitionCoordinationStateWithinTransaction, transitionCoordinationState, getCoordinationLease, acquireCoordinationLease, releaseCoordinationLease, importCoordinationOnce, deleteCoordinationImports, derivePlanId, derivePlanIdentityHash };
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
derivePlanId,
|
|
4
4
|
derivePlanIdentityHash
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-a11ztzs5.js";
|
|
6
6
|
import {
|
|
7
7
|
DURABILITY_CLASSES,
|
|
8
8
|
getProjectDb,
|
|
9
9
|
projectDbExists,
|
|
10
10
|
withImmediateTransaction
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-nzekzzs2.js";
|
|
12
12
|
import {
|
|
13
13
|
init_logger,
|
|
14
14
|
warn
|