opencode-swarm 7.166.1 → 7.166.3
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/background/candidate-contract.d.ts +14 -0
- package/dist/background/pr-subscriptions.d.ts +33 -1
- package/dist/background/workspace-snapshot.d.ts +41 -0
- package/dist/cli/{coder-settlement-x0h3h6vd.js → coder-settlement-nx8ff9k1.js} +13 -13
- package/dist/cli/{config-doctor-pjcjeh8f.js → config-doctor-n9cjh11e.js} +4 -4
- package/dist/cli/{core-v11pd1yk.js → core-cbwrwhcz.js} +2 -2
- package/dist/cli/{curation-policy-jtzwz6bc.js → curation-policy-bvxf5pxv.js} +11 -6
- package/dist/cli/{curator-ssvd7evd.js → curator-c7amtass.js} +40 -39
- package/dist/cli/{curator-drift-jpdfwae9.js → curator-drift-20m2ab5w.js} +6 -6
- package/dist/cli/curator-llm-factory-2gv6kt1v.js +71 -0
- package/dist/cli/{dispatch-591v13pp.js → dispatch-tmb929w8.js} +2 -2
- package/dist/cli/{evidence-summary-service-mw6tnsp9.js → evidence-summary-service-5th3zm9c.js} +17 -17
- package/dist/cli/{gate-evidence-jymaxb82.js → gate-evidence-py8v0w28.js} +9 -8
- package/dist/cli/guardrail-explain-qzhjhtyk.js +72 -0
- package/dist/cli/{guardrail-log-kzq2sktb.js → guardrail-log-rtdpk545.js} +9 -9
- package/dist/cli/{guardrail-reset-ea1g3g7d.js → guardrail-reset-s27fehv6.js} +40 -39
- package/dist/cli/{hive-promoter-ghjbgsms.js → hive-promoter-56mfysq6.js} +40 -39
- package/dist/cli/{index-52xdezsh.js → index-0jpv5z94.js} +5 -5
- package/dist/cli/{index-8hqkrd2j.js → index-1aex5zd9.js} +1 -1
- package/dist/cli/{index-6chhqq2n.js → index-251vrmge.js} +94 -3
- package/dist/cli/{index-w11whwn3.js → index-2c7eabkr.js} +9 -9
- package/dist/cli/{index-edm41q4j.js → index-2w0beg3s.js} +2 -2
- package/dist/cli/{index-nph5g4em.js → index-3a2xznmd.js} +2 -2
- package/dist/cli/{index-2y4kargd.js → index-3f1tr4ha.js} +4 -4
- package/dist/cli/{index-xezfx7ge.js → index-3nm1b3t2.js} +47 -13
- package/dist/cli/{index-gr8ppbq3.js → index-4c50tm9j.js} +3 -3
- package/dist/cli/{index-wf12wckd.js → index-4mgggb8x.js} +8 -3
- package/dist/cli/{index-17yszqs5.js → index-5bd84nxc.js} +1 -1
- package/dist/cli/{index-jx9f4ke1.js → index-6d4dc99f.js} +1 -1
- package/dist/cli/{index-79sr3fd1.js → index-75f9jj3h.js} +2 -2
- package/dist/cli/{index-ybcxvv17.js → index-87wqes24.js} +2 -2
- package/dist/cli/{index-bkd3450m.js → index-8cky7ksv.js} +36 -10
- package/dist/cli/{index-1zqf2pny.js → index-9wv6a3jx.js} +2 -2
- package/dist/cli/{index-fc1dqzjp.js → index-b7ra4hwj.js} +1 -1
- package/dist/cli/{index-6rff2h8x.js → index-bwvbj3fp.js} +4 -4
- package/dist/cli/{index-j29nkq5d.js → index-ch293kd3.js} +4 -4
- package/dist/cli/{index-gerkwyrr.js → index-d5gvr6z4.js} +1 -1
- package/dist/cli/{index-399nq780.js → index-dvhecfa9.js} +3839 -3182
- package/dist/cli/{index-hwj25q9r.js → index-f6zgz02s.js} +70 -53
- package/dist/cli/{index-3tyym20r.js → index-gbv76wf7.js} +2 -2
- package/dist/cli/{index-8fr2wn18.js → index-gk1w1h9k.js} +5 -1
- package/dist/cli/{index-13egyjgv.js → index-h92cqbqa.js} +5 -5
- package/dist/cli/{index-k5w284js.js → index-hfrb77tj.js} +17 -17
- package/dist/cli/{index-gy0nyfbw.js → index-m21x1bkx.js} +78 -25
- package/dist/cli/{index-hvk3zs62.js → index-m3tx1q9v.js} +1 -1
- package/dist/cli/{index-xwkn5hse.js → index-ms16gaa4.js} +7 -7
- package/dist/cli/{index-066xxa4q.js → index-qa7t42e7.js} +96 -31
- package/dist/cli/{index-2v17wb75.js → index-qd619x3r.js} +2 -2
- package/dist/cli/{index-axf65x87.js → index-qd726agw.js} +5 -5
- package/dist/cli/{index-c20gf089.js → index-qww0h314.js} +11 -6
- package/dist/cli/{index-aftapk6j.js → index-rk10x4zr.js} +3 -3
- package/dist/cli/{index-bfr392e7.js → index-sahf5yz3.js} +13 -6
- package/dist/cli/{index-a7rw4g4s.js → index-t8tw1bhs.js} +3 -3
- package/dist/cli/{index-0g5v4s0x.js → index-t9kjxzdr.js} +14 -14
- package/dist/cli/{index-zha9bdj9.js → index-tzq6t9wc.js} +11 -11
- package/dist/cli/index-vzm6zre7.js +167 -0
- package/dist/cli/{index-crjx4sx0.js → index-w50dk71y.js} +42 -41
- package/dist/cli/{index-yt25kpvz.js → index-xn16akay.js} +4 -4
- package/dist/cli/index.js +40 -39
- package/dist/cli/{knowledge-escalator-3pjed4tq.js → knowledge-escalator-stnveccq.js} +15 -14
- package/dist/cli/{knowledge-events-a5dwkg30.js → knowledge-events-ph6txm8h.js} +12 -12
- package/dist/cli/{knowledge-link-1zykfk1p.js → knowledge-link-w1fwqts4.js} +6 -4
- package/dist/cli/{knowledge-store-h85efsak.js → knowledge-store-tgyhr9nf.js} +10 -5
- package/dist/cli/{knowledge-validator-76qrf1ev.js → knowledge-validator-2g547bcn.js} +10 -7
- package/dist/cli/{pending-delegations-zgwfqfac.js → pending-delegations-873dtyw6.js} +14 -13
- package/dist/cli/{pr-subscriptions-fzy3ks1k.js → pr-subscriptions-xmxdrj1z.js} +20 -13
- package/dist/cli/{pr-workflow-gate-1gtsn7f0.js → pr-workflow-gate-h7644byf.js} +40 -39
- package/dist/cli/{runner-j3acybhs.js → runner-nmrjv7te.js} +8 -5
- package/dist/cli/{scan-cursor-ahwkxa8j.js → scan-cursor-tx72gxp0.js} +9 -6
- package/dist/cli/{schema-27sedbfk.js → schema-cpc92vq0.js} +4 -2
- package/dist/cli/{scope-persistence-q792yfxh.js → scope-persistence-xy3xs55f.js} +17 -15
- package/dist/cli/{skill-generator-g8wbjw6v.js → skill-generator-4f1v5zwx.js} +17 -16
- package/dist/cli/{snapshot-coordination-init-y6spakwm.js → snapshot-coordination-init-w2nw33pn.js} +40 -39
- package/dist/cli/{telemetry-9h1z2w9d.js → telemetry-ce0tx41h.js} +5 -1
- package/dist/cli/{workspace-snapshot-6z9rk7xw.js → workspace-snapshot-0kxj2grt.js} +11 -1
- package/dist/cli/{worktree-collision-ownership-pmpnftkd.js → worktree-collision-ownership-1g1qz8wc.js} +15 -14
- package/dist/cli/{worktree-isolation-4053n0px.js → worktree-isolation-jwxtrh3z.js} +40 -39
- package/dist/commands/close.d.ts +82 -0
- package/dist/config/schema.d.ts +9 -0
- package/dist/context-map/capsule-persistence.d.ts +13 -8
- package/dist/evidence/phase-participation.d.ts +1 -1
- package/dist/hooks/delegate-ack-collector.d.ts +7 -0
- package/dist/hooks/guardrails/execution-stall.d.ts +10 -5
- package/dist/hooks/hive-promoter.d.ts +28 -5
- package/dist/hooks/knowledge-store.d.ts +7 -0
- package/dist/hooks/repo-graph-builder.d.ts +14 -0
- package/dist/hooks/review-receipt.d.ts +29 -1
- package/dist/hooks/system-enhancer.d.ts +21 -0
- package/dist/index.js +578 -573
- package/dist/knowledge/curation-policy.d.ts +7 -0
- package/dist/memory/consolidation-log.d.ts +9 -0
- package/dist/memory/injector.d.ts +7 -0
- package/dist/memory/run-log.d.ts +8 -0
- package/dist/observability/catalog.d.ts +1 -1
- package/dist/retention/caps.d.ts +33 -0
- package/dist/retention/dir-prune.d.ts +72 -0
- package/dist/retention/jsonl-cap.d.ts +84 -0
- package/dist/retention/sweep.d.ts +67 -0
- package/dist/services/compaction-service.d.ts +14 -0
- package/dist/services/skill-changelog.d.ts +20 -0
- package/dist/session/snapshot-writer.d.ts +42 -0
- package/dist/summaries/manager.d.ts +41 -4
- package/dist/telemetry.d.ts +31 -1
- package/dist/test-impact/history-store.d.ts +16 -0
- package/dist/turbo/epic/calibration.d.ts +16 -1
- package/dist/turbo/epic/divergence-recorder.d.ts +11 -0
- package/dist/utils/atomic-write.d.ts +32 -0
- package/dist/utils/swarm-artifact-cache.d.ts +6 -0
- package/opencode-swarm.schema.json +15 -0
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-da5q3gg6.js +0 -70
- package/dist/cli/guardrail-explain-eva1yrtf.js +0 -71
- package/dist/cli/{index-2sqgbmtq.js → index-d5qf7hvh.js} +3 -3
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
EvaluationRunV1Schema,
|
|
4
4
|
GateAuditResultV1Schema,
|
|
5
5
|
getProtectedEvaluationRunIds
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-5bd84nxc.js";
|
|
7
7
|
import {
|
|
8
8
|
validateWorkspaceRoot
|
|
9
9
|
} from "./index-cw912re7.js";
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
readTaskEvidence,
|
|
24
24
|
readTaskEvidenceRaw,
|
|
25
25
|
sanitizeTaskId
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-xn16akay.js";
|
|
27
27
|
import {
|
|
28
28
|
estimateCharsForTokens,
|
|
29
29
|
estimateTokens,
|
|
30
30
|
readSwarmFileAsync,
|
|
31
31
|
validateSwarmPath
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-sahf5yz3.js";
|
|
33
33
|
import {
|
|
34
34
|
bunHash,
|
|
35
35
|
bunWrite,
|
|
@@ -57,10 +57,10 @@ import {
|
|
|
57
57
|
replayFromLedgerWithStatus,
|
|
58
58
|
takeSnapshotEvent,
|
|
59
59
|
takeSnapshotWithRetry
|
|
60
|
-
} from "./index-
|
|
60
|
+
} from "./index-3f1tr4ha.js";
|
|
61
61
|
import {
|
|
62
62
|
appendCoreEventSync
|
|
63
|
-
} from "./index-
|
|
63
|
+
} from "./index-qd619x3r.js";
|
|
64
64
|
import {
|
|
65
65
|
derivePlanId,
|
|
66
66
|
derivePlanIdentityHash,
|
|
@@ -68,32 +68,32 @@ import {
|
|
|
68
68
|
importCoordinationOnce,
|
|
69
69
|
listCoordinationStates,
|
|
70
70
|
transitionCoordinationState
|
|
71
|
-
} from "./index-
|
|
71
|
+
} from "./index-6d4dc99f.js";
|
|
72
72
|
import {
|
|
73
73
|
DURABILITY_CLASSES,
|
|
74
74
|
getProjectDb,
|
|
75
75
|
projectDbExists,
|
|
76
76
|
withDurabilityClass
|
|
77
|
-
} from "./index-
|
|
78
|
-
import {
|
|
79
|
-
canonicalRootKeyFresh
|
|
80
|
-
} from "./index-7qefgq4j.js";
|
|
77
|
+
} from "./index-rk10x4zr.js";
|
|
81
78
|
import {
|
|
82
79
|
assertProjectRoot,
|
|
83
80
|
tryAcquireLock,
|
|
84
81
|
withEvidenceLock
|
|
85
|
-
} from "./index-
|
|
82
|
+
} from "./index-2w0beg3s.js";
|
|
86
83
|
import {
|
|
87
84
|
atomicWriteSwarmFileSync,
|
|
88
85
|
invalidateCachedArtifact,
|
|
89
86
|
readCachedParsedFile
|
|
90
|
-
} from "./index-
|
|
87
|
+
} from "./index-m21x1bkx.js";
|
|
91
88
|
import {
|
|
92
89
|
emit
|
|
93
|
-
} from "./index-
|
|
90
|
+
} from "./index-f6zgz02s.js";
|
|
91
|
+
import {
|
|
92
|
+
canonicalRootKeyFresh
|
|
93
|
+
} from "./index-7qefgq4j.js";
|
|
94
94
|
import {
|
|
95
95
|
PlanSchema
|
|
96
|
-
} from "./index-
|
|
96
|
+
} from "./index-0jpv5z94.js";
|
|
97
97
|
import {
|
|
98
98
|
GIT_BINARY_ENV_VAR,
|
|
99
99
|
describeGitResolution,
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-sahf5yz3.js";
|
|
5
5
|
import {
|
|
6
6
|
observeReceiptTransition
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-qd726agw.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveHiveEventsPath
|
|
10
10
|
} from "./index-ae75rja9.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveKnowledgeStoreDir
|
|
13
|
-
} from "./index-
|
|
14
|
-
import {
|
|
15
|
-
canonicalRootKey
|
|
16
|
-
} from "./index-7qefgq4j.js";
|
|
13
|
+
} from "./index-t8tw1bhs.js";
|
|
17
14
|
import {
|
|
18
15
|
assertProjectRoot,
|
|
19
16
|
atomicWriteFile
|
|
20
|
-
} from "./index-
|
|
17
|
+
} from "./index-2w0beg3s.js";
|
|
21
18
|
import {
|
|
22
19
|
emit
|
|
23
|
-
} from "./index-
|
|
20
|
+
} from "./index-f6zgz02s.js";
|
|
21
|
+
import {
|
|
22
|
+
canonicalRootKey
|
|
23
|
+
} from "./index-7qefgq4j.js";
|
|
24
24
|
import {
|
|
25
25
|
require_proper_lockfile
|
|
26
26
|
} from "./index-7g4c7s5r.js";
|
|
27
27
|
import {
|
|
28
28
|
loadPluginConfigWithMeta
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-0jpv5z94.js";
|
|
30
30
|
import {
|
|
31
31
|
KnowledgeConfigSchema,
|
|
32
32
|
init_schema
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-4mgggb8x.js";
|
|
34
34
|
import {
|
|
35
35
|
init_logger,
|
|
36
36
|
warn
|
|
@@ -2813,7 +2813,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
2813
2813
|
}
|
|
2814
2814
|
let bumps = 0;
|
|
2815
2815
|
if (deltas.length > 0) {
|
|
2816
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
2816
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-tgyhr9nf.js");
|
|
2817
2817
|
bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
2818
2818
|
}
|
|
2819
2819
|
return {
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/retention/caps.ts
|
|
3
|
+
var overrides = new Map;
|
|
4
|
+
function resolveRetentionCap(name, defaultValue) {
|
|
5
|
+
const override = overrides.get(name);
|
|
6
|
+
if (override !== undefined && Number.isFinite(override) && override >= 1) {
|
|
7
|
+
return override;
|
|
8
|
+
}
|
|
9
|
+
return defaultValue;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/retention/jsonl-cap.ts
|
|
13
|
+
import * as fs from "fs";
|
|
14
|
+
import * as path from "path";
|
|
15
|
+
var RENAME_MAX_ATTEMPTS = 4;
|
|
16
|
+
var RENAME_RETRY_DELAY_MS = 50;
|
|
17
|
+
var appendChains = new Map;
|
|
18
|
+
function withFileLock(filePath, task) {
|
|
19
|
+
const key = path.resolve(filePath);
|
|
20
|
+
const tail = appendChains.get(key) ?? Promise.resolve();
|
|
21
|
+
const run = tail.then(task, task);
|
|
22
|
+
const settled = run.then(() => {
|
|
23
|
+
if ((appendChains.get(key) ?? settled) === settled) {
|
|
24
|
+
appendChains.delete(key);
|
|
25
|
+
}
|
|
26
|
+
}, () => {
|
|
27
|
+
if ((appendChains.get(key) ?? settled) === settled) {
|
|
28
|
+
appendChains.delete(key);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
appendChains.set(key, settled);
|
|
32
|
+
return run;
|
|
33
|
+
}
|
|
34
|
+
function sleep(ms) {
|
|
35
|
+
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
36
|
+
}
|
|
37
|
+
async function renameWithRetry(from, to) {
|
|
38
|
+
let lastError;
|
|
39
|
+
for (let attempt = 1;attempt <= RENAME_MAX_ATTEMPTS; attempt++) {
|
|
40
|
+
try {
|
|
41
|
+
await fs.promises.rename(from, to);
|
|
42
|
+
return;
|
|
43
|
+
} catch (error) {
|
|
44
|
+
lastError = error;
|
|
45
|
+
const code = typeof error === "object" && error !== null && "code" in error ? String(error.code) : "";
|
|
46
|
+
if (code !== "EBUSY" && code !== "EPERM" && code !== "EEXIST" && code !== "ENOTEMPTY") {
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
if (attempt < RENAME_MAX_ATTEMPTS) {
|
|
50
|
+
await sleep(RENAME_RETRY_DELAY_MS);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
throw lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
55
|
+
}
|
|
56
|
+
function wholeLines(content) {
|
|
57
|
+
return content.split(`
|
|
58
|
+
`).map((line) => line.trim()).filter((line) => line.length > 0);
|
|
59
|
+
}
|
|
60
|
+
function selectCompactionSurvivors(lines, opts) {
|
|
61
|
+
const kept = [];
|
|
62
|
+
let keptBytes = 0;
|
|
63
|
+
for (let i = lines.length - 1;i >= 0; i--) {
|
|
64
|
+
if (kept.length >= opts.maxEntries)
|
|
65
|
+
break;
|
|
66
|
+
const line = lines[i];
|
|
67
|
+
const lineBytes = Buffer.byteLength(`${line}
|
|
68
|
+
`, "utf-8");
|
|
69
|
+
if (kept.length > 0 && opts.maxBytes !== undefined && keptBytes + lineBytes > opts.maxBytes) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
kept.unshift(line);
|
|
73
|
+
keptBytes += lineBytes;
|
|
74
|
+
}
|
|
75
|
+
return kept;
|
|
76
|
+
}
|
|
77
|
+
async function appendAndCap(filePath, line, opts) {
|
|
78
|
+
const directory = path.dirname(filePath);
|
|
79
|
+
fs.mkdirSync(directory, { recursive: true });
|
|
80
|
+
const record = `${line.trim()}
|
|
81
|
+
`;
|
|
82
|
+
let existing = "";
|
|
83
|
+
try {
|
|
84
|
+
existing = await fs.promises.readFile(filePath, "utf-8");
|
|
85
|
+
} catch {}
|
|
86
|
+
const lines = wholeLines(existing);
|
|
87
|
+
const combined = [...lines, line.trim()];
|
|
88
|
+
const survivors = selectCompactionSurvivors(combined, opts);
|
|
89
|
+
const dropped = combined.length - survivors.length;
|
|
90
|
+
if (dropped > 0) {
|
|
91
|
+
const compactedLines = combined.slice(dropped, combined.length - 1);
|
|
92
|
+
const compacted = compactedLines.length > 0 ? `${compactedLines.join(`
|
|
93
|
+
`)}
|
|
94
|
+
` : "";
|
|
95
|
+
const tmp = path.join(directory, `.${path.basename(filePath)}.tmp-${process.pid}-${Math.random().toString(36).slice(2, 8)}`);
|
|
96
|
+
fs.writeFileSync(tmp, compacted, "utf-8");
|
|
97
|
+
try {
|
|
98
|
+
await renameWithRetry(tmp, filePath);
|
|
99
|
+
} catch (error) {
|
|
100
|
+
try {
|
|
101
|
+
fs.unlinkSync(tmp);
|
|
102
|
+
} catch {}
|
|
103
|
+
throw error instanceof Error ? error : new Error(String(error));
|
|
104
|
+
}
|
|
105
|
+
if (opts.onPrune) {
|
|
106
|
+
try {
|
|
107
|
+
opts.onPrune(dropped);
|
|
108
|
+
} catch {}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
await fs.promises.appendFile(filePath, record, "utf-8");
|
|
112
|
+
}
|
|
113
|
+
async function appendCappedJsonl(filePath, line, opts) {
|
|
114
|
+
return withFileLock(filePath, () => appendAndCap(filePath, line, opts));
|
|
115
|
+
}
|
|
116
|
+
async function readTailInternal(filePath, opts) {
|
|
117
|
+
let content;
|
|
118
|
+
let tailTruncated = false;
|
|
119
|
+
try {
|
|
120
|
+
if (opts.maxBytes !== undefined) {
|
|
121
|
+
const stat = await fs.promises.stat(filePath);
|
|
122
|
+
if (stat.size > opts.maxBytes) {
|
|
123
|
+
const handle = await fs.promises.open(filePath, "r");
|
|
124
|
+
try {
|
|
125
|
+
const start = Math.max(0, stat.size - opts.maxBytes);
|
|
126
|
+
const buf = Buffer.alloc(opts.maxBytes);
|
|
127
|
+
await handle.read(buf, 0, opts.maxBytes, start);
|
|
128
|
+
content = buf.toString("utf-8");
|
|
129
|
+
} finally {
|
|
130
|
+
await handle.close();
|
|
131
|
+
}
|
|
132
|
+
const firstNewline = content.indexOf(`
|
|
133
|
+
`);
|
|
134
|
+
if (firstNewline >= 0)
|
|
135
|
+
content = content.slice(firstNewline + 1);
|
|
136
|
+
} else {
|
|
137
|
+
content = await fs.promises.readFile(filePath, "utf-8");
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
content = await fs.promises.readFile(filePath, "utf-8");
|
|
141
|
+
}
|
|
142
|
+
} catch {
|
|
143
|
+
return { records: [], tailTruncated: false };
|
|
144
|
+
}
|
|
145
|
+
if (content.length > 0 && !content.endsWith(`
|
|
146
|
+
`)) {
|
|
147
|
+
tailTruncated = true;
|
|
148
|
+
}
|
|
149
|
+
const lines = wholeLines(content);
|
|
150
|
+
const take = opts.maxEntries !== undefined ? lines.slice(-opts.maxEntries) : lines;
|
|
151
|
+
const records = [];
|
|
152
|
+
for (const line of take) {
|
|
153
|
+
try {
|
|
154
|
+
records.push(JSON.parse(line));
|
|
155
|
+
} catch {}
|
|
156
|
+
}
|
|
157
|
+
return { records, tailTruncated };
|
|
158
|
+
}
|
|
159
|
+
async function readTailJsonl(filePath, opts) {
|
|
160
|
+
const { records } = await readTailInternal(filePath, opts);
|
|
161
|
+
return records;
|
|
162
|
+
}
|
|
163
|
+
async function readTailJsonlDetailed(filePath, opts) {
|
|
164
|
+
return readTailInternal(filePath, opts);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export { resolveRetentionCap, appendCappedJsonl, readTailJsonl, readTailJsonlDetailed };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-gbv76wf7.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-d5gvr6z4.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -94,73 +94,74 @@ import {
|
|
|
94
94
|
handleWriteRetroCommand,
|
|
95
95
|
normalizeSwarmCommandInput,
|
|
96
96
|
resolveCommand
|
|
97
|
-
} from "./index-
|
|
98
|
-
import"./index-
|
|
99
|
-
import"./index-
|
|
100
|
-
import"./index-
|
|
101
|
-
import"./index-
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
97
|
+
} from "./index-dvhecfa9.js";
|
|
98
|
+
import"./index-d5qf7hvh.js";
|
|
99
|
+
import"./index-m3tx1q9v.js";
|
|
100
|
+
import"./index-4c50tm9j.js";
|
|
101
|
+
import"./index-gk1w1h9k.js";
|
|
102
|
+
import"./index-t9kjxzdr.js";
|
|
103
|
+
import"./index-5bd84nxc.js";
|
|
104
104
|
import"./index-txdagbh7.js";
|
|
105
105
|
import"./index-cw912re7.js";
|
|
106
|
-
import"./index-
|
|
107
|
-
import"./index-
|
|
108
|
-
import"./index-
|
|
106
|
+
import"./index-qa7t42e7.js";
|
|
107
|
+
import"./index-h92cqbqa.js";
|
|
108
|
+
import"./index-87wqes24.js";
|
|
109
109
|
import"./index-70ha9e09.js";
|
|
110
|
-
import"./index-
|
|
110
|
+
import"./index-1aex5zd9.js";
|
|
111
111
|
import"./index-9ss2m4rs.js";
|
|
112
|
-
import"./index-
|
|
112
|
+
import"./index-3nm1b3t2.js";
|
|
113
113
|
import"./index-zsrtt42s.js";
|
|
114
|
-
import"./index-
|
|
115
|
-
import"./index-
|
|
116
|
-
import"./index-
|
|
114
|
+
import"./index-hfrb77tj.js";
|
|
115
|
+
import"./index-251vrmge.js";
|
|
116
|
+
import"./index-9wv6a3jx.js";
|
|
117
117
|
import"./index-b43rt5ph.js";
|
|
118
118
|
import"./index-q7sjgr1y.js";
|
|
119
|
-
import"./index-
|
|
120
|
-
import"./index-
|
|
121
|
-
import"./index-
|
|
122
|
-
import"./index-
|
|
123
|
-
import"./index-
|
|
124
|
-
import"./index-ee6ydtfe.js";
|
|
119
|
+
import"./index-xn16akay.js";
|
|
120
|
+
import"./index-b7ra4hwj.js";
|
|
121
|
+
import"./index-2c7eabkr.js";
|
|
122
|
+
import"./index-tzq6t9wc.js";
|
|
123
|
+
import"./index-sahf5yz3.js";
|
|
125
124
|
import"./index-p612v1mv.js";
|
|
126
|
-
import"./index-
|
|
127
|
-
import"./index-
|
|
125
|
+
import"./index-bwvbj3fp.js";
|
|
126
|
+
import"./index-qww0h314.js";
|
|
128
127
|
import"./index-rtry5xyf.js";
|
|
129
|
-
import"./index-
|
|
128
|
+
import"./index-3a2xznmd.js";
|
|
130
129
|
import"./index-3qf1vxtb.js";
|
|
131
130
|
import"./index-n832052r.js";
|
|
132
|
-
import"./index-
|
|
133
|
-
import"./index-
|
|
134
|
-
import"./index-
|
|
135
|
-
import"./index-
|
|
136
|
-
import"./index-
|
|
137
|
-
import"./index-
|
|
131
|
+
import"./index-ms16gaa4.js";
|
|
132
|
+
import"./index-3f1tr4ha.js";
|
|
133
|
+
import"./index-qd619x3r.js";
|
|
134
|
+
import"./index-75f9jj3h.js";
|
|
135
|
+
import"./index-6d4dc99f.js";
|
|
136
|
+
import"./index-rk10x4zr.js";
|
|
138
137
|
import"./index-ry16d01s.js";
|
|
139
138
|
import"./index-n4fzmqz8.js";
|
|
140
|
-
import"./index-
|
|
141
|
-
import"./index-
|
|
139
|
+
import"./index-qd726agw.js";
|
|
140
|
+
import"./index-8cky7ksv.js";
|
|
141
|
+
import"./index-vzm6zre7.js";
|
|
142
142
|
import"./index-ae75rja9.js";
|
|
143
|
-
import"./index-
|
|
143
|
+
import"./index-t8tw1bhs.js";
|
|
144
|
+
import"./index-2w0beg3s.js";
|
|
145
|
+
import"./index-m21x1bkx.js";
|
|
146
|
+
import"./index-f6zgz02s.js";
|
|
144
147
|
import"./index-7qefgq4j.js";
|
|
145
|
-
import"./index-
|
|
146
|
-
import"./index-gy0nyfbw.js";
|
|
147
|
-
import"./index-hwj25q9r.js";
|
|
148
|
+
import"./index-ee6ydtfe.js";
|
|
148
149
|
import"./index-7g4c7s5r.js";
|
|
149
|
-
import"./index-
|
|
150
|
+
import"./index-0jpv5z94.js";
|
|
150
151
|
import"./index-9e6fdz2h.js";
|
|
151
152
|
import"./index-4rhhvd1a.js";
|
|
152
153
|
import {
|
|
153
154
|
init_schema,
|
|
154
155
|
stripKnownSwarmPrefix
|
|
155
|
-
} from "./index-
|
|
156
|
+
} from "./index-4mgggb8x.js";
|
|
156
157
|
import {
|
|
157
158
|
AGENT_TOOL_MAP,
|
|
158
159
|
ORCHESTRATOR_NAME,
|
|
159
160
|
init_constants
|
|
160
161
|
} from "./index-0tc0pcmh.js";
|
|
161
|
-
import"./index-zpsr8rpc.js";
|
|
162
162
|
import"./index-bk5tah7q.js";
|
|
163
163
|
import"./index-bpmtbmy9.js";
|
|
164
|
+
import"./index-zpsr8rpc.js";
|
|
164
165
|
import"./index-q1r1cfww.js";
|
|
165
166
|
import"./index-yzjaj53h.js";
|
|
166
167
|
import"./index-zgwm4ryv.js";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
autoCommitDirty,
|
|
4
4
|
cleanUntrackedFiles
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-b7ra4hwj.js";
|
|
6
6
|
import {
|
|
7
7
|
validateSwarmPath
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-sahf5yz3.js";
|
|
9
9
|
import {
|
|
10
10
|
bunSpawn,
|
|
11
11
|
classifySpawnFailure
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
atomicWriteFile,
|
|
16
16
|
taskEvidencePath,
|
|
17
17
|
withTaskEvidenceLock
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-2w0beg3s.js";
|
|
19
19
|
import {
|
|
20
20
|
telemetry
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-f6zgz02s.js";
|
|
22
22
|
import {
|
|
23
23
|
init_git_executable,
|
|
24
24
|
resolveGitExecutable
|
package/dist/cli/index.js
CHANGED
|
@@ -13,72 +13,73 @@ import {
|
|
|
13
13
|
readCachePackageVersion,
|
|
14
14
|
resolveCommand,
|
|
15
15
|
safeRealpathSync
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
16
|
+
} from "./index-dvhecfa9.js";
|
|
17
|
+
import"./index-d5qf7hvh.js";
|
|
18
|
+
import"./index-m3tx1q9v.js";
|
|
19
|
+
import"./index-4c50tm9j.js";
|
|
20
|
+
import"./index-gk1w1h9k.js";
|
|
21
|
+
import"./index-t9kjxzdr.js";
|
|
22
|
+
import"./index-5bd84nxc.js";
|
|
23
23
|
import"./index-txdagbh7.js";
|
|
24
24
|
import"./index-cw912re7.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
25
|
+
import"./index-qa7t42e7.js";
|
|
26
|
+
import"./index-h92cqbqa.js";
|
|
27
|
+
import"./index-87wqes24.js";
|
|
28
28
|
import"./index-70ha9e09.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-1aex5zd9.js";
|
|
30
30
|
import"./index-9ss2m4rs.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-3nm1b3t2.js";
|
|
32
32
|
import"./index-zsrtt42s.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
33
|
+
import"./index-hfrb77tj.js";
|
|
34
|
+
import"./index-251vrmge.js";
|
|
35
|
+
import"./index-9wv6a3jx.js";
|
|
36
36
|
import"./index-b43rt5ph.js";
|
|
37
37
|
import"./index-q7sjgr1y.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-ee6ydtfe.js";
|
|
38
|
+
import"./index-xn16akay.js";
|
|
39
|
+
import"./index-b7ra4hwj.js";
|
|
40
|
+
import"./index-2c7eabkr.js";
|
|
41
|
+
import"./index-tzq6t9wc.js";
|
|
42
|
+
import"./index-sahf5yz3.js";
|
|
44
43
|
import"./index-p612v1mv.js";
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
44
|
+
import"./index-bwvbj3fp.js";
|
|
45
|
+
import"./index-qww0h314.js";
|
|
47
46
|
import"./index-rtry5xyf.js";
|
|
48
|
-
import"./index-
|
|
47
|
+
import"./index-3a2xznmd.js";
|
|
49
48
|
import"./index-3qf1vxtb.js";
|
|
50
49
|
import"./index-n832052r.js";
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
56
|
-
import"./index-
|
|
50
|
+
import"./index-ms16gaa4.js";
|
|
51
|
+
import"./index-3f1tr4ha.js";
|
|
52
|
+
import"./index-qd619x3r.js";
|
|
53
|
+
import"./index-75f9jj3h.js";
|
|
54
|
+
import"./index-6d4dc99f.js";
|
|
55
|
+
import"./index-rk10x4zr.js";
|
|
57
56
|
import"./index-ry16d01s.js";
|
|
58
57
|
import"./index-n4fzmqz8.js";
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
58
|
+
import"./index-qd726agw.js";
|
|
59
|
+
import"./index-8cky7ksv.js";
|
|
60
|
+
import"./index-vzm6zre7.js";
|
|
61
61
|
import"./index-ae75rja9.js";
|
|
62
|
-
import"./index-
|
|
62
|
+
import"./index-t8tw1bhs.js";
|
|
63
|
+
import"./index-2w0beg3s.js";
|
|
64
|
+
import"./index-m21x1bkx.js";
|
|
65
|
+
import"./index-f6zgz02s.js";
|
|
63
66
|
import"./index-7qefgq4j.js";
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-gy0nyfbw.js";
|
|
66
|
-
import"./index-hwj25q9r.js";
|
|
67
|
+
import"./index-ee6ydtfe.js";
|
|
67
68
|
import"./index-7g4c7s5r.js";
|
|
68
|
-
import"./index-
|
|
69
|
+
import"./index-0jpv5z94.js";
|
|
69
70
|
import"./index-9e6fdz2h.js";
|
|
70
71
|
import"./index-4rhhvd1a.js";
|
|
71
72
|
import {
|
|
72
73
|
init_package,
|
|
73
74
|
package_default
|
|
74
|
-
} from "./index-
|
|
75
|
+
} from "./index-4mgggb8x.js";
|
|
75
76
|
import {
|
|
76
77
|
DEFAULT_AGENT_CONFIGS,
|
|
77
78
|
init_constants
|
|
78
79
|
} from "./index-0tc0pcmh.js";
|
|
79
|
-
import"./index-zpsr8rpc.js";
|
|
80
80
|
import"./index-bk5tah7q.js";
|
|
81
81
|
import"./index-bpmtbmy9.js";
|
|
82
|
+
import"./index-zpsr8rpc.js";
|
|
82
83
|
import"./index-q1r1cfww.js";
|
|
83
84
|
import"./index-yzjaj53h.js";
|
|
84
85
|
import"./index-zgwm4ryv.js";
|
|
@@ -9,31 +9,32 @@ import {
|
|
|
9
9
|
maybeEscalateOnViolation,
|
|
10
10
|
maybeQuarantineOnContradiction,
|
|
11
11
|
readRecentEscalations
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-ee6ydtfe.js";
|
|
12
|
+
} from "./index-h92cqbqa.js";
|
|
13
|
+
import"./index-tzq6t9wc.js";
|
|
14
|
+
import"./index-sahf5yz3.js";
|
|
16
15
|
import"./index-p612v1mv.js";
|
|
17
|
-
import"./index-
|
|
16
|
+
import"./index-3a2xznmd.js";
|
|
18
17
|
import"./index-3qf1vxtb.js";
|
|
19
18
|
import"./index-n832052r.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
19
|
+
import"./index-qd726agw.js";
|
|
20
|
+
import"./index-8cky7ksv.js";
|
|
21
|
+
import"./index-vzm6zre7.js";
|
|
22
22
|
import"./index-ae75rja9.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-t8tw1bhs.js";
|
|
24
|
+
import"./index-2w0beg3s.js";
|
|
25
|
+
import"./index-m21x1bkx.js";
|
|
26
|
+
import"./index-f6zgz02s.js";
|
|
24
27
|
import"./index-7qefgq4j.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-gy0nyfbw.js";
|
|
27
|
-
import"./index-hwj25q9r.js";
|
|
28
|
+
import"./index-ee6ydtfe.js";
|
|
28
29
|
import"./index-7g4c7s5r.js";
|
|
29
|
-
import"./index-
|
|
30
|
+
import"./index-0jpv5z94.js";
|
|
30
31
|
import"./index-9e6fdz2h.js";
|
|
31
32
|
import"./index-4rhhvd1a.js";
|
|
32
|
-
import"./index-
|
|
33
|
+
import"./index-4mgggb8x.js";
|
|
33
34
|
import"./index-0tc0pcmh.js";
|
|
34
|
-
import"./index-zpsr8rpc.js";
|
|
35
35
|
import"./index-bk5tah7q.js";
|
|
36
36
|
import"./index-bpmtbmy9.js";
|
|
37
|
+
import"./index-zpsr8rpc.js";
|
|
37
38
|
import"./index-zgwm4ryv.js";
|
|
38
39
|
import"./index-a76rekgs.js";
|
|
39
40
|
export {
|
|
@@ -29,29 +29,29 @@ import {
|
|
|
29
29
|
resolveKnowledgeCounterBaselinePath,
|
|
30
30
|
resolveKnowledgeEventsPath,
|
|
31
31
|
resolveLegacyApplicationLogPath
|
|
32
|
-
} from "./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-ee6ydtfe.js";
|
|
32
|
+
} from "./index-tzq6t9wc.js";
|
|
33
|
+
import"./index-sahf5yz3.js";
|
|
35
34
|
import"./index-p612v1mv.js";
|
|
36
|
-
import"./index-
|
|
35
|
+
import"./index-3a2xznmd.js";
|
|
37
36
|
import"./index-3qf1vxtb.js";
|
|
38
37
|
import"./index-n832052r.js";
|
|
39
|
-
import"./index-
|
|
38
|
+
import"./index-qd726agw.js";
|
|
40
39
|
import"./index-ae75rja9.js";
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-t8tw1bhs.js";
|
|
41
|
+
import"./index-2w0beg3s.js";
|
|
42
|
+
import"./index-m21x1bkx.js";
|
|
43
|
+
import"./index-f6zgz02s.js";
|
|
42
44
|
import"./index-7qefgq4j.js";
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-gy0nyfbw.js";
|
|
45
|
-
import"./index-hwj25q9r.js";
|
|
45
|
+
import"./index-ee6ydtfe.js";
|
|
46
46
|
import"./index-7g4c7s5r.js";
|
|
47
|
-
import"./index-
|
|
47
|
+
import"./index-0jpv5z94.js";
|
|
48
48
|
import"./index-9e6fdz2h.js";
|
|
49
49
|
import"./index-4rhhvd1a.js";
|
|
50
|
-
import"./index-
|
|
50
|
+
import"./index-4mgggb8x.js";
|
|
51
51
|
import"./index-0tc0pcmh.js";
|
|
52
|
-
import"./index-zpsr8rpc.js";
|
|
53
52
|
import"./index-bk5tah7q.js";
|
|
54
53
|
import"./index-bpmtbmy9.js";
|
|
54
|
+
import"./index-zpsr8rpc.js";
|
|
55
55
|
import"./index-zgwm4ryv.js";
|
|
56
56
|
import"./index-a76rekgs.js";
|
|
57
57
|
export {
|
|
@@ -12,13 +12,15 @@ import {
|
|
|
12
12
|
resolveLinkDir,
|
|
13
13
|
sanitizeLinkId,
|
|
14
14
|
writeLinkPointer
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-t8tw1bhs.js";
|
|
16
|
+
import"./index-2w0beg3s.js";
|
|
17
|
+
import"./index-m21x1bkx.js";
|
|
18
|
+
import"./index-f6zgz02s.js";
|
|
16
19
|
import"./index-7qefgq4j.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-gy0nyfbw.js";
|
|
19
|
-
import"./index-hwj25q9r.js";
|
|
20
|
+
import"./index-ee6ydtfe.js";
|
|
20
21
|
import"./index-7g4c7s5r.js";
|
|
21
22
|
import"./index-bpmtbmy9.js";
|
|
23
|
+
import"./index-zpsr8rpc.js";
|
|
22
24
|
import"./index-zgwm4ryv.js";
|
|
23
25
|
import"./index-a76rekgs.js";
|
|
24
26
|
export {
|