opencode-swarm 7.164.3 → 7.164.4
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/cli/{coder-settlement-m918n7qj.js → coder-settlement-zzy2egsx.js} +11 -11
- package/dist/cli/{config-doctor-5kytbwbx.js → config-doctor-62xd5far.js} +2 -2
- package/dist/cli/{core-anw5khk2.js → core-7kdmc7h9.js} +1 -1
- package/dist/cli/{curation-policy-7pnmnfct.js → curation-policy-913dnxqq.js} +6 -6
- package/dist/cli/{curator-yq6raqgs.js → curator-4s6ekk85.js} +34 -34
- package/dist/cli/{curator-drift-ykrdf08r.js → curator-drift-3s3q4wsy.js} +4 -4
- package/dist/cli/curator-llm-factory-q3t3r632.js +66 -0
- package/dist/cli/{evidence-summary-service-8sbxvt2x.js → evidence-summary-service-gw936xgz.js} +15 -15
- package/dist/cli/{gate-evidence-53v7e938.js → gate-evidence-4we18rhr.js} +7 -7
- package/dist/cli/guardrail-explain-jjbnrcqn.js +67 -0
- package/dist/cli/{guardrail-log-q5sj7zby.js → guardrail-log-9d4f09qt.js} +7 -7
- package/dist/cli/{guardrail-reset-dw45p5zc.js → guardrail-reset-1hpd6bkj.js} +34 -34
- package/dist/cli/{hive-promoter-0axzw0h5.js → hive-promoter-nr8dsxhe.js} +34 -34
- package/dist/cli/{index-9pwa798m.js → index-08e6x59x.js} +7 -7
- package/dist/cli/{index-jwc2v92w.js → index-0m94jsss.js} +5 -5
- package/dist/cli/{index-hcn69kp0.js → index-0zbze3n6.js} +1 -1
- package/dist/cli/{index-y2f5s2cf.js → index-1f4nandk.js} +1 -1
- package/dist/cli/{index-88g6q52x.js → index-4tgtbptw.js} +4 -4
- package/dist/cli/{index-zs1jrsta.js → index-5k226hxp.js} +2 -2
- package/dist/cli/{index-95hhrw1d.js → index-7zbk1e24.js} +9 -9
- package/dist/cli/{index-kn0y788q.js → index-8fjx6k2s.js} +1 -1
- package/dist/cli/{index-3fpqmms2.js → index-a0jhxx5q.js} +3 -3
- package/dist/cli/{index-kyayzfxp.js → index-cf54ftj1.js} +4 -4
- package/dist/cli/{index-0e34njnm.js → index-eh2k07pp.js} +7 -7
- package/dist/cli/{index-aaqzcnb9.js → index-et9y4ga8.js} +36 -36
- package/dist/cli/{index-yep24wn4.js → index-gt6p21cs.js} +1 -1
- package/dist/cli/{index-w5jpjaqe.js → index-jba9jgse.js} +2 -2
- package/dist/cli/{index-bzd67m2j.js → index-k1m9214q.js} +1 -1
- package/dist/cli/{index-aty2dfmt.js → index-k8vy89vm.js} +1 -1
- package/dist/cli/{index-11st3tgy.js → index-ne38vr77.js} +2 -2
- package/dist/cli/{index-5pxdtskj.js → index-nwpg81ke.js} +1 -1
- package/dist/cli/{index-sb4eanpv.js → index-prammvxb.js} +1 -1
- package/dist/cli/{index-8t11vcf5.js → index-pztdbtgw.js} +3 -3
- package/dist/cli/{index-sn2vm710.js → index-q9yz8da4.js} +5 -5
- package/dist/cli/{index-5d7bzpfn.js → index-qfrrcdhj.js} +1 -1
- package/dist/cli/{index-ehf0vjhx.js → index-qkwx4rrc.js} +71 -71
- package/dist/cli/{index-v56mhyhs.js → index-rz87mx1c.js} +1 -1
- package/dist/cli/{index-ac39znep.js → index-stj85yx1.js} +2 -2
- package/dist/cli/{index-fc153g7b.js → index-t2tqbq62.js} +4 -4
- package/dist/cli/{index-f9nfknjg.js → index-tfa2p4y4.js} +3 -3
- package/dist/cli/{index-c8k4cs94.js → index-tme2kjvq.js} +5 -5
- package/dist/cli/{index-j98116cx.js → index-v7a8e7rv.js} +2 -2
- package/dist/cli/{index-4wneygfx.js → index-vx28633q.js} +1 -1
- package/dist/cli/{index-493mxwj5.js → index-vzs3st30.js} +21 -21
- package/dist/cli/{index-84qah5h6.js → index-wzmchqry.js} +1 -1
- package/dist/cli/{index-xkqja15t.js → index-x63jqvj3.js} +2 -2
- package/dist/cli/{index-2xj34nkh.js → index-x9ayhkkx.js} +1 -1
- package/dist/cli/{index-qbr05tbw.js → index-xj4kbtdw.js} +2 -2
- package/dist/cli/{index-rhdwrfgc.js → index-xjw7j7et.js} +5 -5
- package/dist/cli/{index-yhpbcrdk.js → index-yx3xqb0w.js} +13 -13
- package/dist/cli/{index-0145kpjr.js → index-z408nj03.js} +2 -2
- package/dist/cli/index.js +34 -34
- package/dist/cli/{knowledge-escalator-atn5tfy2.js → knowledge-escalator-hp1ctjpe.js} +13 -13
- package/dist/cli/{knowledge-events-58ha93tx.js → knowledge-events-0qrenmng.js} +11 -11
- package/dist/cli/{knowledge-link-2gh1cnk3.js → knowledge-link-f5g5d171.js} +5 -5
- package/dist/cli/{knowledge-store-2vkn4qyy.js → knowledge-store-8er824g9.js} +6 -6
- package/dist/cli/{knowledge-validator-gcbfq9er.js → knowledge-validator-0jd3htcj.js} +8 -8
- package/dist/cli/{pending-delegations-esp3gpac.js → pending-delegations-d1n5faxg.js} +6 -6
- package/dist/cli/{pr-subscriptions-sdv0n59c.js → pr-subscriptions-s2b2yvbd.js} +6 -6
- package/dist/cli/{pr-workflow-gate-v5wh09wz.js → pr-workflow-gate-51s842yy.js} +34 -34
- package/dist/cli/{runner-m95v9d47.js → runner-nkh65pcm.js} +6 -6
- package/dist/cli/{scan-cursor-6x0sqjer.js → scan-cursor-gt55f3d6.js} +7 -7
- package/dist/cli/{schema-mgpsycrr.js → schema-rpdz901j.js} +1 -1
- package/dist/cli/{scope-persistence-pwqshfyr.js → scope-persistence-js1ywq04.js} +9 -9
- package/dist/cli/{skill-generator-bywdfza0.js → skill-generator-xsxes2w0.js} +15 -15
- package/dist/cli/{telemetry-c4j18da8.js → telemetry-9tfts5q2.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-71x5pqfz.js → worktree-collision-ownership-54ca6mb8.js} +7 -7
- package/dist/cli/{worktree-isolation-e6tym281.js → worktree-isolation-haesnft8.js} +34 -34
- package/dist/config/plan-schema.d.ts +1 -1
- package/dist/council/council-review-identity.d.ts +1 -1
- package/dist/index.js +15 -15
- package/dist/plan/ledger.d.ts +56 -29
- package/dist/services/skill-optimizer/store.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-6swjnnb1.js +0 -66
- package/dist/cli/guardrail-explain-jhsqdzxr.js +0 -67
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
EvaluationRunV1Schema,
|
|
4
4
|
GateAuditResultV1Schema,
|
|
5
5
|
getProtectedEvaluationRunIds
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-jba9jgse.js";
|
|
7
7
|
import {
|
|
8
8
|
DURABILITY_CLASSES,
|
|
9
9
|
getProjectDb,
|
|
10
10
|
projectDbExists,
|
|
11
11
|
readEffectiveSpecSync,
|
|
12
12
|
withDurabilityClass
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-0zbze3n6.js";
|
|
14
14
|
import {
|
|
15
15
|
getWorktreeMergeFailure
|
|
16
16
|
} from "./index-zsrtt42s.js";
|
|
@@ -24,12 +24,12 @@ import {
|
|
|
24
24
|
readTaskEvidence,
|
|
25
25
|
readTaskEvidenceRaw,
|
|
26
26
|
sanitizeTaskId
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-0m94jsss.js";
|
|
28
28
|
import {
|
|
29
29
|
LedgerStaleWriterError,
|
|
30
30
|
appendLedgerEvent,
|
|
31
31
|
computeCurrentPlanHash,
|
|
32
|
-
|
|
32
|
+
computePlanLedgerHash,
|
|
33
33
|
derivePlanId,
|
|
34
34
|
derivePlanIdentityHash,
|
|
35
35
|
getLatestLedgerSeq,
|
|
@@ -44,10 +44,10 @@ import {
|
|
|
44
44
|
replayFromLedgerWithStatus,
|
|
45
45
|
takeSnapshotEvent,
|
|
46
46
|
takeSnapshotWithRetry
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-yx3xqb0w.js";
|
|
48
48
|
import {
|
|
49
49
|
appendCoreEventSync
|
|
50
|
-
} from "./index-
|
|
50
|
+
} from "./index-z408nj03.js";
|
|
51
51
|
import {
|
|
52
52
|
init_executor,
|
|
53
53
|
isUntrustedEnvKey,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
estimateTokens,
|
|
64
64
|
readSwarmFileAsync,
|
|
65
65
|
validateSwarmPath
|
|
66
|
-
} from "./index-
|
|
66
|
+
} from "./index-rz87mx1c.js";
|
|
67
67
|
import {
|
|
68
68
|
bunHash,
|
|
69
69
|
bunWrite,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
} from "./index-r3mvsbtq.js";
|
|
72
72
|
import {
|
|
73
73
|
PlanSchema
|
|
74
|
-
} from "./index-
|
|
74
|
+
} from "./index-vx28633q.js";
|
|
75
75
|
import {
|
|
76
76
|
GIT_BINARY_ENV_VAR,
|
|
77
77
|
describeGitResolution,
|
|
@@ -82,14 +82,14 @@ import {
|
|
|
82
82
|
assertProjectRoot,
|
|
83
83
|
tryAcquireLock,
|
|
84
84
|
withEvidenceLock
|
|
85
|
-
} from "./index-
|
|
85
|
+
} from "./index-gt6p21cs.js";
|
|
86
86
|
import {
|
|
87
87
|
invalidateCachedArtifact,
|
|
88
88
|
readCachedParsedFile
|
|
89
|
-
} from "./index-
|
|
89
|
+
} from "./index-tfa2p4y4.js";
|
|
90
90
|
import {
|
|
91
91
|
emit
|
|
92
|
-
} from "./index-
|
|
92
|
+
} from "./index-k1m9214q.js";
|
|
93
93
|
import {
|
|
94
94
|
ZodError,
|
|
95
95
|
init_zod
|
|
@@ -1979,7 +1979,7 @@ async function surfaceLedgerStaleIfPersisted(directory, plan) {
|
|
|
1979
1979
|
return plan;
|
|
1980
1980
|
}
|
|
1981
1981
|
try {
|
|
1982
|
-
const planHash =
|
|
1982
|
+
const planHash = computePlanLedgerHash(plan);
|
|
1983
1983
|
const ledgerHash = await getLatestLedgerHash(directory);
|
|
1984
1984
|
if (ledgerHash !== "" && planHash === ledgerHash) {
|
|
1985
1985
|
ledgerStaleWorkspaces.delete(resolvedWorkspace);
|
|
@@ -2092,7 +2092,7 @@ async function loadPlan(directory, cache) {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
2094
|
if (await ledgerExists(directory)) {
|
|
2095
|
-
const planHash =
|
|
2095
|
+
const planHash = computePlanLedgerHash(validated);
|
|
2096
2096
|
const ledgerHash = await getLatestLedgerHash(directory);
|
|
2097
2097
|
const resolvedWorkspace = path5.resolve(directory);
|
|
2098
2098
|
if (!startupLedgerCheckedWorkspaces.has(resolvedWorkspace)) {
|
|
@@ -2387,7 +2387,7 @@ async function savePlan(directory, plan, options) {
|
|
|
2387
2387
|
derivePhaseStatusesInPlace(validated);
|
|
2388
2388
|
const currentPlan = await _internals6.loadPlanJsonOnly(directory);
|
|
2389
2389
|
const planId = derivePlanId(validated);
|
|
2390
|
-
const planHashForInit =
|
|
2390
|
+
const planHashForInit = computePlanLedgerHash(validated);
|
|
2391
2391
|
if (!await ledgerExists(directory)) {
|
|
2392
2392
|
try {
|
|
2393
2393
|
options?.preCommitCheck?.();
|
|
@@ -2499,7 +2499,7 @@ async function savePlan(directory, plan, options) {
|
|
|
2499
2499
|
});
|
|
2500
2500
|
} else {
|
|
2501
2501
|
await takeSnapshotEvent(directory, validated, {
|
|
2502
|
-
planHashAfter:
|
|
2502
|
+
planHashAfter: computePlanLedgerHash(validated),
|
|
2503
2503
|
source: "save_plan_stale_projection_reconcile",
|
|
2504
2504
|
expectedSeq: expected.expectedSeq,
|
|
2505
2505
|
expectedLedgerHash: expected.expectedLedgerHash
|
|
@@ -2513,7 +2513,7 @@ async function savePlan(directory, plan, options) {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
}
|
|
2515
2515
|
const currentHash = computeCurrentPlanHash(directory);
|
|
2516
|
-
const hashAfter =
|
|
2516
|
+
const hashAfter = computePlanLedgerHash(validated);
|
|
2517
2517
|
if (currentPlan) {
|
|
2518
2518
|
const oldTaskMap = new Map;
|
|
2519
2519
|
for (const phase of currentPlan.phases) {
|
|
@@ -2635,10 +2635,10 @@ async function savePlan(directory, plan, options) {
|
|
|
2635
2635
|
const ledgerStatusTaskIds = collectLedgerStatusTaskIds(await readLedgerEvents(directory));
|
|
2636
2636
|
const replayedBeforeProjection = await replayFromLedger(directory);
|
|
2637
2637
|
const projectionCandidate = replayedBeforeProjection ? mergeStatusesTakingPrecedence(validated, replayedBeforeProjection, ledgerStatusTaskIds) : validated;
|
|
2638
|
-
if (replayedBeforeProjection &&
|
|
2638
|
+
if (replayedBeforeProjection && computePlanLedgerHash(replayedBeforeProjection) !== computePlanLedgerHash(projectionCandidate)) {
|
|
2639
2639
|
options?.preCommitCheck?.();
|
|
2640
2640
|
await takeSnapshotEvent(directory, projectionCandidate, {
|
|
2641
|
-
planHashAfter:
|
|
2641
|
+
planHashAfter: computePlanLedgerHash(projectionCandidate),
|
|
2642
2642
|
source: "savePlan_structural_projection"
|
|
2643
2643
|
});
|
|
2644
2644
|
}
|
|
@@ -2647,7 +2647,7 @@ async function savePlan(directory, plan, options) {
|
|
|
2647
2647
|
const latestSeq = await getLatestLedgerSeq(directory);
|
|
2648
2648
|
if (!options?.preCommitCheck && latestSeq > 0 && latestSeq % SNAPSHOT_INTERVAL === 0) {
|
|
2649
2649
|
await takeSnapshotWithRetry(directory, projectedPlan, {
|
|
2650
|
-
planHashAfter:
|
|
2650
|
+
planHashAfter: computePlanLedgerHash(projectedPlan),
|
|
2651
2651
|
source: "savePlan_manager"
|
|
2652
2652
|
});
|
|
2653
2653
|
}
|
|
@@ -2803,7 +2803,7 @@ ${markdown}`;
|
|
|
2803
2803
|
}
|
|
2804
2804
|
try {
|
|
2805
2805
|
const planId = derivePlanId(targetPlan);
|
|
2806
|
-
const planHashAfter =
|
|
2806
|
+
const planHashAfter = computePlanLedgerHash(targetPlan);
|
|
2807
2807
|
await appendLedgerEvent(directory, {
|
|
2808
2808
|
event_type: "plan_rebuilt",
|
|
2809
2809
|
source: "rebuildPlan",
|
|
@@ -2821,7 +2821,7 @@ async function closePlanTerminalState(directory, plan, options) {
|
|
|
2821
2821
|
assertProjectRoot(directory);
|
|
2822
2822
|
const planId = derivePlanId(plan);
|
|
2823
2823
|
const validated = PlanSchema.parse(plan);
|
|
2824
|
-
const hashAfter =
|
|
2824
|
+
const hashAfter = computePlanLedgerHash(validated);
|
|
2825
2825
|
for (const taskId of options.closedTaskIds) {
|
|
2826
2826
|
let taskPhaseId;
|
|
2827
2827
|
for (const phase of validated.phases) {
|
|
@@ -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.164.
|
|
24
|
+
version: "7.164.4",
|
|
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",
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readKnowledge,
|
|
4
4
|
transactKnowledge
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-eh2k07pp.js";
|
|
6
6
|
import {
|
|
7
7
|
init_git_executable,
|
|
8
8
|
resolveGitExecutableAsync
|
|
9
9
|
} from "./index-9e6fdz2h.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveKnowledgeStoreDir
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-qfrrcdhj.js";
|
|
13
13
|
import {
|
|
14
14
|
init_knowledge_types,
|
|
15
15
|
isActiveStatus
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-rz87mx1c.js";
|
|
5
5
|
import {
|
|
6
6
|
atomicWriteSwarmFileSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-tfa2p4y4.js";
|
|
8
8
|
|
|
9
9
|
// src/hooks/delegation-gate/worktree-provisioning-owner.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-eh2k07pp.js";
|
|
10
10
|
import {
|
|
11
11
|
queryHistoricalOutcomes,
|
|
12
12
|
readKnowledgeEvents,
|
|
13
13
|
recordKnowledgeEvent
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-7zbk1e24.js";
|
|
15
15
|
import {
|
|
16
16
|
init_knowledge_types,
|
|
17
17
|
isActiveStatus
|
|
@@ -224,11 +224,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
224
224
|
alreadyInactive: true
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
227
|
+
const { quarantineEntry } = await import("./knowledge-validator-0jd3htcj.js");
|
|
228
228
|
let policyConfig;
|
|
229
229
|
try {
|
|
230
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
231
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
230
|
+
const { KnowledgeConfigSchema } = await import("./schema-rpdz901j.js");
|
|
231
|
+
const { loadPluginConfigWithMeta } = await import("./index-a0jhxx5q.js");
|
|
232
232
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
233
233
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
234
234
|
} catch {
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
PlanSchema,
|
|
5
5
|
TaskStatusSchema,
|
|
6
6
|
init_loader
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-vx28633q.js";
|
|
8
8
|
import {
|
|
9
9
|
assertProjectRoot,
|
|
10
10
|
withEvidenceLock
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-gt6p21cs.js";
|
|
12
12
|
import {
|
|
13
13
|
emit
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-k1m9214q.js";
|
|
15
15
|
import {
|
|
16
16
|
criticalWarn,
|
|
17
17
|
init_logger,
|
|
@@ -50,7 +50,7 @@ var LEDGER_SCHEMA_VERSION = "1.1.0";
|
|
|
50
50
|
function resolvePlanEpochIdentity(events, authoritativePlan) {
|
|
51
51
|
const planId = derivePlanId(authoritativePlan);
|
|
52
52
|
const planIdentityHash = derivePlanIdentityHash(authoritativePlan);
|
|
53
|
-
const payloadHash =
|
|
53
|
+
const payloadHash = computePlanLedgerHash(authoritativePlan);
|
|
54
54
|
const candidates = extractPlanEpochCandidates(events, planId);
|
|
55
55
|
const distinctCandidateKeys = new Set(candidates.map((candidate) => `${candidate.planEpoch}:${candidate.rootEventHash}`));
|
|
56
56
|
if (distinctCandidateKeys.size > 1) {
|
|
@@ -158,7 +158,7 @@ function extractPlanEpochCandidates(events, expectedPlanId) {
|
|
|
158
158
|
if (derivePlanId(embeddedPlan.data) !== expectedPlanId) {
|
|
159
159
|
throw new Error(`Plan epoch adoption snapshot at seq ${event.seq} embeds a different plan identity.`);
|
|
160
160
|
}
|
|
161
|
-
if (
|
|
161
|
+
if (computePlanLedgerHash(embeddedPlan.data) !== payloadHash) {
|
|
162
162
|
throw new Error(`Plan epoch adoption snapshot at seq ${event.seq} has a mismatched payload_hash.`);
|
|
163
163
|
}
|
|
164
164
|
candidates.push({
|
|
@@ -218,7 +218,7 @@ function findRawMalformedSuffix(content) {
|
|
|
218
218
|
}
|
|
219
219
|
return Buffer.alloc(0);
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function computePlanLedgerHash(plan) {
|
|
222
222
|
const normalized = {
|
|
223
223
|
schema_version: plan.schema_version,
|
|
224
224
|
title: plan.title,
|
|
@@ -281,7 +281,7 @@ function computeCurrentPlanHash(directory) {
|
|
|
281
281
|
try {
|
|
282
282
|
const content = fs.readFileSync(planPath, "utf8");
|
|
283
283
|
const plan = JSON.parse(content);
|
|
284
|
-
return
|
|
284
|
+
return computePlanLedgerHash(plan);
|
|
285
285
|
} catch {
|
|
286
286
|
return "";
|
|
287
287
|
}
|
|
@@ -358,7 +358,7 @@ async function initLedger(directory, planId, initialPlanHash, initialPlan) {
|
|
|
358
358
|
if (fs.existsSync(planJsonPath)) {
|
|
359
359
|
const content = fs.readFileSync(planJsonPath, "utf8");
|
|
360
360
|
const plan = JSON.parse(content);
|
|
361
|
-
planHashAfter =
|
|
361
|
+
planHashAfter = computePlanLedgerHash(plan);
|
|
362
362
|
if (!embeddedPlan)
|
|
363
363
|
embeddedPlan = plan;
|
|
364
364
|
}
|
|
@@ -409,7 +409,7 @@ async function getOrAdoptPlanEpochUnderLock(directory, authoritativePlan) {
|
|
|
409
409
|
assertProjectRoot(directory);
|
|
410
410
|
const planId = derivePlanId(authoritativePlan);
|
|
411
411
|
const planIdentityHash = derivePlanIdentityHash(authoritativePlan);
|
|
412
|
-
const payloadHash =
|
|
412
|
+
const payloadHash = computePlanLedgerHash(authoritativePlan);
|
|
413
413
|
let lastStaleWriterError;
|
|
414
414
|
for (let attempt = 0;attempt < 4; attempt++) {
|
|
415
415
|
if (!await ledgerExists(directory)) {
|
|
@@ -575,7 +575,7 @@ async function takeSnapshotWithRetry(directory, plan, options) {
|
|
|
575
575
|
} catch {}
|
|
576
576
|
}
|
|
577
577
|
async function takeSnapshotEvent(directory, plan, options) {
|
|
578
|
-
const payloadHash = options?.payloadHashOverride ??
|
|
578
|
+
const payloadHash = options?.payloadHashOverride ?? (options?.source === "critic_approved" ? computePlanStructureHash(plan) : computePlanLedgerHash(plan));
|
|
579
579
|
const snapshotPayload = {
|
|
580
580
|
plan,
|
|
581
581
|
payload_hash: payloadHash
|
|
@@ -633,7 +633,7 @@ async function replaceTruncatedLedgerWithRecoveryRoot(directory, plan, expected)
|
|
|
633
633
|
}
|
|
634
634
|
const archiveTempPath = `${archivePath}.tmp`;
|
|
635
635
|
const canonicalTempPath = `${ledgerPath}.reconcile.${Date.now()}.${Math.floor(Math.random() * 1e9)}.tmp`;
|
|
636
|
-
const planHash =
|
|
636
|
+
const planHash = computePlanLedgerHash(validated);
|
|
637
637
|
const rawBadSuffix = findRawMalformedSuffix(originalBytes);
|
|
638
638
|
if (rawBadSuffix.length === 0) {
|
|
639
639
|
throw new LedgerStaleWriterError("Stale writer: raw ledger bytes no longer contain the malformed suffix detected during replay");
|
|
@@ -938,7 +938,7 @@ function findLastApprovedSnapshot(events, expectedPlanId, extraFilter) {
|
|
|
938
938
|
return null;
|
|
939
939
|
}
|
|
940
940
|
var _internals = {
|
|
941
|
-
|
|
941
|
+
computePlanLedgerHash,
|
|
942
942
|
computePlanStructureHash,
|
|
943
943
|
computeCurrentPlanHash,
|
|
944
944
|
ledgerExists,
|
|
@@ -962,4 +962,4 @@ var _internals = {
|
|
|
962
962
|
randomUUID: () => crypto.randomUUID()
|
|
963
963
|
};
|
|
964
964
|
|
|
965
|
-
export { normalizeExecutionProfileForHash, derivePlanId, derivePlanIdentityHash, LedgerStaleWriterError,
|
|
965
|
+
export { normalizeExecutionProfileForHash, derivePlanId, derivePlanIdentityHash, LedgerStaleWriterError, computePlanLedgerHash, computePlanStructureHash, computeCurrentPlanHash, ledgerExists, getLatestLedgerSeq, readLedgerEvents, initLedger, readPlanEpochIdentity, getOrAdoptPlanEpochUnderLock, appendLedgerEvent, takeSnapshotWithRetry, takeSnapshotEvent, replaceTruncatedLedgerWithRecoveryRoot, replayFromLedger, replayFromLedgerWithStatus, readLedgerEventsWithIntegrity, loadLastApprovedPlan };
|
package/dist/cli/index.js
CHANGED
|
@@ -11,68 +11,68 @@ import {
|
|
|
11
11
|
readCachePackageVersion,
|
|
12
12
|
resolveCommand,
|
|
13
13
|
safeRealpathSync
|
|
14
|
-
} from "./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
14
|
+
} from "./index-qkwx4rrc.js";
|
|
15
|
+
import"./index-x9ayhkkx.js";
|
|
16
|
+
import"./index-pztdbtgw.js";
|
|
17
|
+
import"./index-k8vy89vm.js";
|
|
18
|
+
import"./index-vzs3st30.js";
|
|
19
|
+
import"./index-jba9jgse.js";
|
|
20
20
|
import"./index-txdagbh7.js";
|
|
21
21
|
import"./index-3146wmgv.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
22
|
+
import"./index-4tgtbptw.js";
|
|
23
|
+
import"./index-xjw7j7et.js";
|
|
24
|
+
import"./index-x63jqvj3.js";
|
|
25
25
|
import"./index-70ha9e09.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
import"./index-1f4nandk.js";
|
|
27
|
+
import"./index-0zbze3n6.js";
|
|
28
28
|
import"./index-zaab1wz9.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-tme2kjvq.js";
|
|
30
30
|
import"./index-zsrtt42s.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-08e6x59x.js";
|
|
32
32
|
import"./index-3f7hqtgg.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
33
|
+
import"./index-xj4kbtdw.js";
|
|
34
|
+
import"./index-t2tqbq62.js";
|
|
35
|
+
import"./index-prammvxb.js";
|
|
36
36
|
import"./index-rtry5xyf.js";
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
37
|
+
import"./index-0m94jsss.js";
|
|
38
|
+
import"./index-8fjx6k2s.js";
|
|
39
|
+
import"./index-cf54ftj1.js";
|
|
40
40
|
import"./index-ddszzne4.js";
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
41
|
+
import"./index-q9yz8da4.js";
|
|
42
|
+
import"./index-yx3xqb0w.js";
|
|
43
|
+
import"./index-z408nj03.js";
|
|
44
44
|
import"./index-556ja8an.js";
|
|
45
45
|
import"./index-4fwbbad3.js";
|
|
46
46
|
import"./index-b43rt5ph.js";
|
|
47
47
|
import"./index-q7sjgr1y.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
48
|
+
import"./index-eh2k07pp.js";
|
|
49
|
+
import"./index-7zbk1e24.js";
|
|
50
|
+
import"./index-v7a8e7rv.js";
|
|
51
51
|
import"./index-zg9d392c.js";
|
|
52
52
|
import"./index-n832052r.js";
|
|
53
|
-
import"./index-
|
|
53
|
+
import"./index-rz87mx1c.js";
|
|
54
54
|
import"./index-z6xqpmqg.js";
|
|
55
55
|
import"./index-r3mvsbtq.js";
|
|
56
|
-
import"./index-
|
|
56
|
+
import"./index-vx28633q.js";
|
|
57
57
|
import {
|
|
58
58
|
init_package,
|
|
59
59
|
package_default
|
|
60
|
-
} from "./index-
|
|
60
|
+
} from "./index-wzmchqry.js";
|
|
61
61
|
import"./index-9e6fdz2h.js";
|
|
62
62
|
import"./index-4rhhvd1a.js";
|
|
63
|
-
import"./index-
|
|
63
|
+
import"./index-stj85yx1.js";
|
|
64
64
|
import {
|
|
65
65
|
DEFAULT_AGENT_CONFIGS,
|
|
66
66
|
init_constants
|
|
67
67
|
} from "./index-m1nrd3yd.js";
|
|
68
68
|
import"./index-zjygnfay.js";
|
|
69
69
|
import"./index-ae75rja9.js";
|
|
70
|
-
import"./index-
|
|
71
|
-
import"./index-
|
|
70
|
+
import"./index-qfrrcdhj.js";
|
|
71
|
+
import"./index-5k226hxp.js";
|
|
72
72
|
import"./index-bk5tah7q.js";
|
|
73
|
-
import"./index-
|
|
74
|
-
import"./index-
|
|
75
|
-
import"./index-
|
|
73
|
+
import"./index-gt6p21cs.js";
|
|
74
|
+
import"./index-tfa2p4y4.js";
|
|
75
|
+
import"./index-k1m9214q.js";
|
|
76
76
|
import"./index-7g4c7s5r.js";
|
|
77
77
|
import"./index-bpmtbmy9.js";
|
|
78
78
|
import"./index-zgwm4ryv.js";
|
|
@@ -9,29 +9,29 @@ import {
|
|
|
9
9
|
maybeEscalateOnViolation,
|
|
10
10
|
maybeQuarantineOnContradiction,
|
|
11
11
|
readRecentEscalations
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
12
|
+
} from "./index-xjw7j7et.js";
|
|
13
|
+
import"./index-eh2k07pp.js";
|
|
14
|
+
import"./index-7zbk1e24.js";
|
|
15
|
+
import"./index-v7a8e7rv.js";
|
|
16
16
|
import"./index-zg9d392c.js";
|
|
17
17
|
import"./index-n832052r.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-rz87mx1c.js";
|
|
19
19
|
import"./index-z6xqpmqg.js";
|
|
20
20
|
import"./index-r3mvsbtq.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
21
|
+
import"./index-vx28633q.js";
|
|
22
|
+
import"./index-wzmchqry.js";
|
|
23
23
|
import"./index-9e6fdz2h.js";
|
|
24
24
|
import"./index-4rhhvd1a.js";
|
|
25
|
-
import"./index-
|
|
25
|
+
import"./index-stj85yx1.js";
|
|
26
26
|
import"./index-m1nrd3yd.js";
|
|
27
27
|
import"./index-zjygnfay.js";
|
|
28
28
|
import"./index-ae75rja9.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-qfrrcdhj.js";
|
|
30
|
+
import"./index-5k226hxp.js";
|
|
31
31
|
import"./index-bk5tah7q.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
32
|
+
import"./index-gt6p21cs.js";
|
|
33
|
+
import"./index-tfa2p4y4.js";
|
|
34
|
+
import"./index-k1m9214q.js";
|
|
35
35
|
import"./index-7g4c7s5r.js";
|
|
36
36
|
import"./index-bpmtbmy9.js";
|
|
37
37
|
import"./index-zgwm4ryv.js";
|
|
@@ -29,27 +29,27 @@ import {
|
|
|
29
29
|
resolveKnowledgeCounterBaselinePath,
|
|
30
30
|
resolveKnowledgeEventsPath,
|
|
31
31
|
resolveLegacyApplicationLogPath
|
|
32
|
-
} from "./index-
|
|
33
|
-
import"./index-
|
|
32
|
+
} from "./index-7zbk1e24.js";
|
|
33
|
+
import"./index-v7a8e7rv.js";
|
|
34
34
|
import"./index-zg9d392c.js";
|
|
35
35
|
import"./index-n832052r.js";
|
|
36
|
-
import"./index-
|
|
36
|
+
import"./index-rz87mx1c.js";
|
|
37
37
|
import"./index-z6xqpmqg.js";
|
|
38
38
|
import"./index-r3mvsbtq.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
39
|
+
import"./index-vx28633q.js";
|
|
40
|
+
import"./index-wzmchqry.js";
|
|
41
41
|
import"./index-9e6fdz2h.js";
|
|
42
42
|
import"./index-4rhhvd1a.js";
|
|
43
|
-
import"./index-
|
|
43
|
+
import"./index-stj85yx1.js";
|
|
44
44
|
import"./index-m1nrd3yd.js";
|
|
45
45
|
import"./index-zjygnfay.js";
|
|
46
46
|
import"./index-ae75rja9.js";
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
47
|
+
import"./index-qfrrcdhj.js";
|
|
48
|
+
import"./index-5k226hxp.js";
|
|
49
49
|
import"./index-bk5tah7q.js";
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-
|
|
50
|
+
import"./index-gt6p21cs.js";
|
|
51
|
+
import"./index-tfa2p4y4.js";
|
|
52
|
+
import"./index-k1m9214q.js";
|
|
53
53
|
import"./index-7g4c7s5r.js";
|
|
54
54
|
import"./index-bpmtbmy9.js";
|
|
55
55
|
import"./index-zgwm4ryv.js";
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
resolveLinkDir,
|
|
13
13
|
sanitizeLinkId,
|
|
14
14
|
writeLinkPointer
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
15
|
+
} from "./index-qfrrcdhj.js";
|
|
16
|
+
import"./index-5k226hxp.js";
|
|
17
|
+
import"./index-gt6p21cs.js";
|
|
18
|
+
import"./index-tfa2p4y4.js";
|
|
19
|
+
import"./index-k1m9214q.js";
|
|
20
20
|
import"./index-7g4c7s5r.js";
|
|
21
21
|
import"./index-bpmtbmy9.js";
|
|
22
22
|
import"./index-zgwm4ryv.js";
|
|
@@ -42,16 +42,16 @@ import {
|
|
|
42
42
|
transactKnowledge,
|
|
43
43
|
transactKnowledgeWithCas,
|
|
44
44
|
wordBigrams
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-eh2k07pp.js";
|
|
46
46
|
import {
|
|
47
47
|
resolveHiveDataDir
|
|
48
48
|
} from "./index-ae75rja9.js";
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
49
|
+
import"./index-qfrrcdhj.js";
|
|
50
|
+
import"./index-5k226hxp.js";
|
|
51
51
|
import"./index-bk5tah7q.js";
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-
|
|
52
|
+
import"./index-gt6p21cs.js";
|
|
53
|
+
import"./index-tfa2p4y4.js";
|
|
54
|
+
import"./index-k1m9214q.js";
|
|
55
55
|
import"./index-7g4c7s5r.js";
|
|
56
56
|
import"./index-bpmtbmy9.js";
|
|
57
57
|
import"./index-zgwm4ryv.js";
|
|
@@ -23,17 +23,17 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-t2tqbq62.js";
|
|
27
|
+
import"./index-prammvxb.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-eh2k07pp.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
31
|
+
import"./index-qfrrcdhj.js";
|
|
32
|
+
import"./index-5k226hxp.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
34
|
+
import"./index-gt6p21cs.js";
|
|
35
|
+
import"./index-tfa2p4y4.js";
|
|
36
|
+
import"./index-k1m9214q.js";
|
|
37
37
|
import"./index-7g4c7s5r.js";
|
|
38
38
|
import"./index-bpmtbmy9.js";
|
|
39
39
|
import"./index-zgwm4ryv.js";
|
|
@@ -66,16 +66,16 @@ import {
|
|
|
66
66
|
sweepStaleDelegations,
|
|
67
67
|
updateCoderSettlement,
|
|
68
68
|
writeDelegationFallback
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-cf54ftj1.js";
|
|
70
70
|
import"./index-ddszzne4.js";
|
|
71
|
-
import"./index-
|
|
71
|
+
import"./index-rz87mx1c.js";
|
|
72
72
|
import"./index-z6xqpmqg.js";
|
|
73
73
|
import"./index-r3mvsbtq.js";
|
|
74
|
-
import"./index-
|
|
74
|
+
import"./index-stj85yx1.js";
|
|
75
75
|
import"./index-zjygnfay.js";
|
|
76
|
-
import"./index-
|
|
77
|
-
import"./index-
|
|
78
|
-
import"./index-
|
|
76
|
+
import"./index-gt6p21cs.js";
|
|
77
|
+
import"./index-tfa2p4y4.js";
|
|
78
|
+
import"./index-k1m9214q.js";
|
|
79
79
|
import"./index-7g4c7s5r.js";
|
|
80
80
|
import"./index-bpmtbmy9.js";
|
|
81
81
|
import"./index-zgwm4ryv.js";
|