opencode-swarm 7.122.1 → 7.124.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/issue-tracer/SKILL.md +341 -0
- package/.opencode/skills/issue-tracer/assets/pr-template.md +59 -0
- package/.opencode/skills/issue-tracer/references/critic-gate.md +245 -0
- package/.opencode/skills/issue-tracer/references/evidence-artifacts.md +267 -0
- package/.opencode/skills/issue-tracer/references/install.md +63 -0
- package/.opencode/skills/issue-tracer/references/localization-playbook.md +95 -0
- package/.opencode/skills/issue-tracer/references/method-provenance.md +13 -0
- package/.opencode/skills/issue-tracer/references/untrusted-content.md +22 -0
- package/.opencode/skills/issue-tracer/scripts/scan-deferred.sh +103 -0
- package/.opencode/skills/issue-tracer/scripts/trace-init.sh +119 -0
- package/README.md +3 -0
- package/dist/cli/{config-doctor-3ksh1534.js → config-doctor-53mnpeke.js} +6 -6
- package/dist/cli/{core-cwgb7ev8.js → core-d38hc85b.js} +4 -4
- package/dist/cli/{curation-policy-4j4qce5a.js → curation-policy-ny033330.js} +2 -2
- package/dist/cli/{curator-drift-6b2fjsgr.js → curator-drift-h9a2sjvf.js} +7 -7
- package/dist/cli/curator-llm-factory-e0tjz8qq.js +53 -0
- package/dist/cli/{curator-qfh07497.js → curator-nvn1pdq6.js} +30 -29
- package/dist/cli/{dispatch-07jgc3hn.js → dispatch-f4hj1cj7.js} +3 -3
- package/dist/cli/{evidence-summary-service-96ndczbk.js → evidence-summary-service-9hq7n9k9.js} +12 -12
- package/dist/cli/{gate-evidence-xqks3kk2.js → gate-evidence-cy2te3x8.js} +2 -2
- package/dist/cli/guardrail-explain-d3dd57nf.js +54 -0
- package/dist/cli/guardrail-log-3q2z9axs.js +16 -0
- package/dist/cli/{hive-promoter-00mktxkk.js → hive-promoter-9gbpepgm.js} +30 -29
- package/dist/cli/index-134d35c1.js +116 -0
- package/dist/cli/{index-cqsak7bf.js → index-13d2g7k9.js} +1 -1
- package/dist/cli/{index-m1abzg93.js → index-1kz6da87.js} +4 -2
- package/dist/cli/{index-22e127jw.js → index-23zsx7dm.js} +5 -3
- package/dist/cli/{index-kzj3fp7c.js → index-2445sx3d.js} +1 -1
- package/dist/cli/{index-ctpgsj84.js → index-2tn5h2zp.js} +1 -1
- package/dist/cli/{index-n2712byd.js → index-2x4maxte.js} +8 -5
- package/dist/cli/{index-6xnxz6z0.js → index-3x761jqv.js} +4 -2
- package/dist/cli/{index-3rr0ese8.js → index-3yyr4ynk.js} +41 -9
- package/dist/cli/{index-7cspygmb.js → index-4rzzzjtg.js} +11 -8
- package/dist/cli/{index-nprawcc0.js → index-6n2jpz7x.js} +1 -1
- package/dist/cli/{index-jm81nhks.js → index-8pz0ypxz.js} +38 -31
- package/dist/cli/index-bk5tah7q.js +19 -0
- package/dist/cli/{index-293f68mj.js → index-bpmtbmy9.js} +4680 -4342
- package/dist/cli/index-c6crt5rs.js +2494 -0
- package/dist/cli/{index-19zn67q6.js → index-e19mxn9f.js} +5 -1
- package/dist/cli/{index-hns7xjm7.js → index-eeg04r0x.js} +4 -2
- package/dist/cli/{index-ye3fndsw.js → index-gacm5s2n.js} +9 -5
- package/dist/cli/{index-d6h5hq91.js → index-gnvg72y1.js} +2 -2
- package/dist/cli/{index-17eybc3z.js → index-htbjqftb.js} +1 -1
- package/dist/cli/{index-vcgfqd8f.js → index-k5jrywpr.js} +4 -2
- package/dist/cli/{index-kanrv3sv.js → index-mkkx1a4f.js} +2436 -1435
- package/dist/cli/{index-gnp9x6se.js → index-n832052r.js} +4 -2
- package/dist/cli/{index-6srk9a5q.js → index-qd77aft9.js} +2 -2
- package/dist/cli/{index-816rkp4y.js → index-s9mj4rb9.js} +5 -3
- package/dist/cli/{index-5he0kwnx.js → index-tyg0zezw.js} +13 -8
- package/dist/cli/{index-gw3m5fw0.js → index-v2rdhwx8.js} +5 -3
- package/dist/cli/{index-det5jwfk.js → index-v5ecczts.js} +5 -1
- package/dist/cli/{index-2j25br0p.js → index-wqwpzhv1.js} +9 -9
- package/dist/cli/{index-dywekeen.js → index-x2mmnrnx.js} +1 -1
- package/dist/cli/{index-j9kxwshw.js → index-z0m4angq.js} +8 -6
- package/dist/cli/{index-5e4e2hvv.js → index-z6xqpmqg.js} +4 -0
- package/dist/cli/{index-m0bmh3w0.js → index-zjedv2bd.js} +2 -2
- package/dist/cli/{index-p0arc26j.js → index-zjygnfay.js} +7 -2
- package/dist/cli/index.js +33 -30
- package/dist/cli/{knowledge-escalator-dyxsm78k.js → knowledge-escalator-r1s01m3z.js} +4 -4
- package/dist/cli/{knowledge-events-36q6nvae.js → knowledge-events-a9hmxvke.js} +1 -1
- package/dist/cli/{knowledge-store-e07b4s54.js → knowledge-store-jt31br5k.js} +2 -2
- package/dist/cli/{knowledge-validator-sfyf7wn2.js → knowledge-validator-9vrwxr3z.js} +5 -5
- package/dist/cli/{pending-delegations-68cbaqv2.js → pending-delegations-e3bcqj77.js} +7 -5
- package/dist/cli/{pr-subscriptions-x653151h.js → pr-subscriptions-bxpqde8w.js} +5 -5
- package/dist/cli/{scan-cursor-hm0aqqae.js → scan-cursor-bkjtsawg.js} +3 -3
- package/dist/cli/{schema-13bnng2n.js → schema-y3z416z7.js} +7 -4
- package/dist/cli/{scope-persistence-d9erwnvb.js → scope-persistence-habn4q8a.js} +4 -4
- package/dist/cli/{skill-generator-g6r52x94.js → skill-generator-794hyndw.js} +7 -7
- package/dist/cli/sqlite-loader-r1kgt2pq.js +12 -0
- package/dist/commands/memory-link.d.ts +28 -0
- package/dist/commands/registry.d.ts +25 -0
- package/dist/config/bundled-skills.d.ts +1 -1
- package/dist/config/schema.d.ts +6 -0
- package/dist/index.js +331 -318
- package/dist/knowledge/family-migration-shared.d.ts +24 -0
- package/dist/knowledge/family-migration.d.ts +5 -0
- package/dist/memory/config.d.ts +11 -0
- package/dist/memory/consolidation-log.d.ts +8 -2
- package/dist/memory/finalize-reward-sweep.d.ts +2 -1
- package/dist/memory/gateway.d.ts +13 -0
- package/dist/memory/index.d.ts +4 -2
- package/dist/memory/local-jsonl-provider.d.ts +25 -1
- package/dist/memory/memory-family-manifest.d.ts +52 -0
- package/dist/memory/memory-family-migration.d.ts +94 -0
- package/dist/memory/memory-link.d.ts +103 -0
- package/dist/memory/provider-pool.d.ts +35 -0
- package/dist/memory/redaction.d.ts +31 -0
- package/dist/memory/schema.d.ts +21 -0
- package/dist/memory/sqlite-provider.d.ts +58 -1
- package/dist/memory/storage-root.d.ts +93 -0
- package/dist/memory/types.d.ts +20 -1
- package/dist/services/knowledge-diagnostics.d.ts +25 -0
- package/dist/services/status-service.d.ts +16 -0
- package/package.json +2 -1
- package/dist/cli/curator-llm-factory-x769hn66.js +0 -52
- package/dist/cli/guardrail-explain-kj0e9r25.js +0 -53
- package/dist/cli/guardrail-log-z291m4gw.js +0 -16
- package/dist/cli/index-4rhcth7a.js +0 -14
- package/dist/cli/index-wr8qgpz5.js +0 -2463
|
@@ -7,51 +7,52 @@ import {
|
|
|
7
7
|
isHiveEligible,
|
|
8
8
|
promoteFromSwarm,
|
|
9
9
|
promoteToHive
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
10
|
+
} from "./index-mkkx1a4f.js";
|
|
11
|
+
import"./index-e19mxn9f.js";
|
|
12
|
+
import"./index-v5ecczts.js";
|
|
13
|
+
import"./index-4rzzzjtg.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
15
|
+
import"./index-134d35c1.js";
|
|
16
|
+
import"./index-6n2jpz7x.js";
|
|
17
|
+
import"./index-tyg0zezw.js";
|
|
18
|
+
import"./index-z0m4angq.js";
|
|
19
|
+
import"./index-eeg04r0x.js";
|
|
19
20
|
import"./index-vxv732ex.js";
|
|
20
21
|
import"./index-c8s9a3zh.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
22
|
+
import"./index-s9mj4rb9.js";
|
|
23
|
+
import"./index-23zsx7dm.js";
|
|
24
|
+
import"./index-zjedv2bd.js";
|
|
25
|
+
import"./index-13d2g7k9.js";
|
|
25
26
|
import"./index-rtry5xyf.js";
|
|
26
27
|
import {
|
|
27
28
|
resolveHiveKnowledgePath
|
|
28
|
-
} from "./index-
|
|
29
|
-
import"./index-
|
|
29
|
+
} from "./index-2x4maxte.js";
|
|
30
|
+
import"./index-x2mmnrnx.js";
|
|
30
31
|
import"./index-ae75rja9.js";
|
|
31
32
|
import"./index-q27bajqb.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
33
|
+
import"./index-3yyr4ynk.js";
|
|
34
|
+
import"./index-k5jrywpr.js";
|
|
35
|
+
import"./index-n832052r.js";
|
|
36
|
+
import"./index-c6crt5rs.js";
|
|
37
|
+
import"./index-bk5tah7q.js";
|
|
37
38
|
import"./index-8fwhhayc.js";
|
|
38
39
|
import"./index-q1exe2b3.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
40
|
+
import"./index-gnvg72y1.js";
|
|
41
|
+
import"./index-2tn5h2zp.js";
|
|
42
|
+
import"./index-1kz6da87.js";
|
|
43
|
+
import"./index-v2rdhwx8.js";
|
|
44
|
+
import"./index-gacm5s2n.js";
|
|
45
|
+
import"./index-2445sx3d.js";
|
|
46
|
+
import"./index-z6xqpmqg.js";
|
|
47
|
+
import"./index-zjygnfay.js";
|
|
47
48
|
import"./index-zgwm4ryv.js";
|
|
48
49
|
import"./index-dqh3zhhc.js";
|
|
49
|
-
import"./index-
|
|
50
|
+
import"./index-3x761jqv.js";
|
|
50
51
|
import"./index-7mkpsw6g.js";
|
|
51
52
|
import"./index-fsrp8wp3.js";
|
|
52
53
|
import"./index-76kvm9z5.js";
|
|
53
54
|
import"./index-q2rrv0cy.js";
|
|
54
|
-
import"./index-
|
|
55
|
+
import"./index-bpmtbmy9.js";
|
|
55
56
|
import"./index-7g4c7s5r.js";
|
|
56
57
|
import"./index-qe3v54nb.js";
|
|
57
58
|
import"./index-a76rekgs.js";
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/db/sqlite-loader.ts
|
|
3
|
+
import { createRequire } from "module";
|
|
4
|
+
function createNodeDatabaseCtor(DatabaseSyncCtor) {
|
|
5
|
+
|
|
6
|
+
class NodeSqliteDatabase {
|
|
7
|
+
raw;
|
|
8
|
+
stmts = new Map;
|
|
9
|
+
savepointCounter = 0;
|
|
10
|
+
constructor(filename) {
|
|
11
|
+
this.raw = new DatabaseSyncCtor(filename, { allowExtension: true });
|
|
12
|
+
}
|
|
13
|
+
statement(sql) {
|
|
14
|
+
let stmt = this.stmts.get(sql);
|
|
15
|
+
if (!stmt) {
|
|
16
|
+
stmt = this.raw.prepare(sql);
|
|
17
|
+
this.stmts.set(sql, stmt);
|
|
18
|
+
}
|
|
19
|
+
return stmt;
|
|
20
|
+
}
|
|
21
|
+
run(sql, ...rest) {
|
|
22
|
+
if (rest.length === 0) {
|
|
23
|
+
this.raw.exec(sql);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const params = rest.length === 1 && Array.isArray(rest[0]) ? rest[0] : rest;
|
|
27
|
+
return this.statement(sql).run(...params);
|
|
28
|
+
}
|
|
29
|
+
query(sql) {
|
|
30
|
+
const stmt = this.statement(sql);
|
|
31
|
+
return {
|
|
32
|
+
get: (...params) => stmt.get(...params),
|
|
33
|
+
all: (...params) => stmt.all(...params),
|
|
34
|
+
iterate: (...params) => stmt.iterate(...params)
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
get inTransaction() {
|
|
38
|
+
return this.raw.isTransaction;
|
|
39
|
+
}
|
|
40
|
+
transaction(fn) {
|
|
41
|
+
return (...args) => {
|
|
42
|
+
if (this.raw.isTransaction) {
|
|
43
|
+
const sp = `swarm_sp_${this.savepointCounter++}`;
|
|
44
|
+
this.raw.exec(`SAVEPOINT ${sp}`);
|
|
45
|
+
try {
|
|
46
|
+
const result = fn(...args);
|
|
47
|
+
this.raw.exec(`RELEASE ${sp}`);
|
|
48
|
+
return result;
|
|
49
|
+
} catch (err) {
|
|
50
|
+
try {
|
|
51
|
+
this.raw.exec(`ROLLBACK TO ${sp}`);
|
|
52
|
+
this.raw.exec(`RELEASE ${sp}`);
|
|
53
|
+
} catch {}
|
|
54
|
+
throw err;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
this.raw.exec("BEGIN");
|
|
58
|
+
try {
|
|
59
|
+
const result = fn(...args);
|
|
60
|
+
this.raw.exec("COMMIT");
|
|
61
|
+
return result;
|
|
62
|
+
} catch (err) {
|
|
63
|
+
try {
|
|
64
|
+
this.raw.exec("ROLLBACK");
|
|
65
|
+
} catch {}
|
|
66
|
+
throw err;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
loadExtension(path) {
|
|
71
|
+
this.raw.enableLoadExtension(true);
|
|
72
|
+
try {
|
|
73
|
+
this.raw.loadExtension(path);
|
|
74
|
+
} finally {
|
|
75
|
+
this.raw.enableLoadExtension(false);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
close() {
|
|
79
|
+
this.stmts.clear();
|
|
80
|
+
this.raw.close();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return NodeSqliteDatabase;
|
|
84
|
+
}
|
|
85
|
+
var _DatabaseCtor = null;
|
|
86
|
+
var _internals = {
|
|
87
|
+
requireModule(id) {
|
|
88
|
+
return createRequire(import.meta.url)(id);
|
|
89
|
+
},
|
|
90
|
+
reset() {
|
|
91
|
+
_DatabaseCtor = null;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
function loadDatabaseCtor() {
|
|
95
|
+
if (_DatabaseCtor)
|
|
96
|
+
return _DatabaseCtor;
|
|
97
|
+
let bunError;
|
|
98
|
+
try {
|
|
99
|
+
const mod = _internals.requireModule("bun:sqlite");
|
|
100
|
+
_DatabaseCtor = mod.Database;
|
|
101
|
+
return _DatabaseCtor;
|
|
102
|
+
} catch (err) {
|
|
103
|
+
bunError = err;
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
const mod = _internals.requireModule("node:sqlite");
|
|
107
|
+
_DatabaseCtor = createNodeDatabaseCtor(mod.DatabaseSync);
|
|
108
|
+
return _DatabaseCtor;
|
|
109
|
+
} catch (nodeError) {
|
|
110
|
+
const bunMsg = bunError instanceof Error ? bunError.message : String(bunError);
|
|
111
|
+
const nodeMsg = nodeError instanceof Error ? nodeError.message : String(nodeError);
|
|
112
|
+
throw new Error("opencode-swarm: no SQLite driver available. This build needs Bun " + "(bun:sqlite) or Node.js 22.13+ (node:sqlite). " + `bun:sqlite: ${bunMsg}; node:sqlite: ${nodeMsg}`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export { createNodeDatabaseCtor, _internals, loadDatabaseCtor };
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
exports_external
|
|
4
|
-
|
|
3
|
+
exports_external,
|
|
4
|
+
init_zod
|
|
5
|
+
} from "./index-bpmtbmy9.js";
|
|
5
6
|
|
|
6
7
|
// src/config/plan-schema.ts
|
|
8
|
+
init_zod();
|
|
7
9
|
var ExecutionProfileSchema = exports_external.object({
|
|
8
10
|
parallelization_enabled: exports_external.boolean().default(false),
|
|
9
11
|
max_concurrent_tasks: exports_external.number().int().min(1).max(64).default(10),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-2445sx3d.js";
|
|
5
5
|
import {
|
|
6
6
|
log
|
|
7
7
|
} from "./index-zgwm4ryv.js";
|
|
@@ -9,10 +9,12 @@ import {
|
|
|
9
9
|
withEvidenceLock
|
|
10
10
|
} from "./index-76kvm9z5.js";
|
|
11
11
|
import {
|
|
12
|
-
exports_external
|
|
13
|
-
|
|
12
|
+
exports_external,
|
|
13
|
+
init_zod
|
|
14
|
+
} from "./index-bpmtbmy9.js";
|
|
14
15
|
|
|
15
16
|
// src/background/pr-subscriptions.ts
|
|
17
|
+
init_zod();
|
|
16
18
|
import * as fs from "fs";
|
|
17
19
|
import * as path from "path";
|
|
18
20
|
var PR_SUBSCRIPTIONS_FILE = "pr-monitor/subscriptions.jsonl";
|
|
@@ -8,8 +8,9 @@ import {
|
|
|
8
8
|
resolveKnowledgeStoreDir
|
|
9
9
|
} from "./index-q27bajqb.js";
|
|
10
10
|
import {
|
|
11
|
+
init_knowledge_types,
|
|
11
12
|
isActiveStatus
|
|
12
|
-
} from "./index-
|
|
13
|
+
} from "./index-bk5tah7q.js";
|
|
13
14
|
import {
|
|
14
15
|
init_logger,
|
|
15
16
|
log
|
|
@@ -38,6 +39,7 @@ import * as path from "path";
|
|
|
38
39
|
init_logger();
|
|
39
40
|
|
|
40
41
|
// src/hooks/knowledge-reinforcement.ts
|
|
42
|
+
init_knowledge_types();
|
|
41
43
|
function isActiveSwarmKnowledgeEntry(entry) {
|
|
42
44
|
return isActiveStatus(entry.status);
|
|
43
45
|
}
|
|
@@ -72,6 +74,7 @@ function reinforceSwarmKnowledgeEntry(entry, confirmation) {
|
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
// src/hooks/knowledge-store.ts
|
|
77
|
+
init_knowledge_types();
|
|
75
78
|
var KNOWLEDGE_JSONL_CACHE_NAMESPACE = "knowledge-jsonl:normalized:v1";
|
|
76
79
|
function getPlatformConfigDir() {
|
|
77
80
|
const platform = process.platform;
|
|
@@ -647,7 +650,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
647
650
|
const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
|
|
648
651
|
if (atFloor.length === 0 && recovered.length === 0)
|
|
649
652
|
return;
|
|
650
|
-
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-
|
|
653
|
+
const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-a9hmxvke.js");
|
|
651
654
|
const rollups = await readKnowledgeCounterRollups(directory);
|
|
652
655
|
const flagIds = new Set;
|
|
653
656
|
for (const e of atFloor) {
|
|
@@ -714,11 +717,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
|
|
|
714
717
|
});
|
|
715
718
|
}
|
|
716
719
|
if (action === "quarantine" && toQuarantine.length > 0) {
|
|
717
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
718
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
720
|
+
const { quarantineEntry } = await import("./knowledge-validator-9vrwxr3z.js");
|
|
721
|
+
const { KnowledgeConfigSchema } = await import("./schema-y3z416z7.js");
|
|
719
722
|
let config;
|
|
720
723
|
try {
|
|
721
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
724
|
+
const { loadPluginConfigWithMeta } = await import("./index-wqwpzhv1.js");
|
|
722
725
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
723
726
|
config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
724
727
|
} catch {
|
|
@@ -8,10 +8,12 @@ import {
|
|
|
8
8
|
telemetry
|
|
9
9
|
} from "./index-q2rrv0cy.js";
|
|
10
10
|
import {
|
|
11
|
-
exports_external
|
|
12
|
-
|
|
11
|
+
exports_external,
|
|
12
|
+
init_zod
|
|
13
|
+
} from "./index-bpmtbmy9.js";
|
|
13
14
|
|
|
14
15
|
// src/gate-evidence.ts
|
|
16
|
+
init_zod();
|
|
15
17
|
import { mkdirSync, readFileSync, realpathSync } from "fs";
|
|
16
18
|
import * as path from "path";
|
|
17
19
|
|
|
@@ -5,22 +5,39 @@ import {
|
|
|
5
5
|
GATE_CONFIG_KNOWN_SECTION_KEYS,
|
|
6
6
|
GateConfigSchema,
|
|
7
7
|
PluginConfigSchema,
|
|
8
|
+
init_constants,
|
|
9
|
+
init_schema,
|
|
8
10
|
resolveExternalSkillsConfig
|
|
9
|
-
} from "./index-
|
|
11
|
+
} from "./index-c6crt5rs.js";
|
|
10
12
|
import {
|
|
11
|
-
advisoryWarn
|
|
12
|
-
|
|
13
|
+
advisoryWarn,
|
|
14
|
+
init_warning_buffer
|
|
15
|
+
} from "./index-gacm5s2n.js";
|
|
13
16
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
MAX_MERGE_DEPTH,
|
|
18
|
+
deepMerge,
|
|
19
|
+
init_merge
|
|
20
|
+
} from "./index-zjygnfay.js";
|
|
21
|
+
import {
|
|
22
|
+
__esm,
|
|
23
|
+
__export
|
|
24
|
+
} from "./index-a76rekgs.js";
|
|
25
|
+
|
|
16
26
|
// src/config/loader.ts
|
|
27
|
+
var exports_loader = {};
|
|
28
|
+
__export(exports_loader, {
|
|
29
|
+
loadPluginConfigWithMetaAsync: () => loadPluginConfigWithMetaAsync,
|
|
30
|
+
loadPluginConfigWithMeta: () => loadPluginConfigWithMeta,
|
|
31
|
+
loadPluginConfig: () => loadPluginConfig,
|
|
32
|
+
loadAgentPrompt: () => loadAgentPrompt,
|
|
33
|
+
deepMerge: () => deepMerge,
|
|
34
|
+
MAX_MERGE_DEPTH: () => MAX_MERGE_DEPTH,
|
|
35
|
+
MAX_CONFIG_FILE_BYTES: () => MAX_CONFIG_FILE_BYTES
|
|
36
|
+
});
|
|
17
37
|
import * as fs from "fs";
|
|
18
38
|
import * as fsPromises from "fs/promises";
|
|
19
39
|
import * as os from "os";
|
|
20
40
|
import * as path from "path";
|
|
21
|
-
var CONFIG_FILENAME = "opencode-swarm.json";
|
|
22
|
-
var PROMPTS_DIR_NAME = "opencode-swarm";
|
|
23
|
-
var MAX_CONFIG_FILE_BYTES = 102400;
|
|
24
41
|
function getUserConfigDir() {
|
|
25
42
|
return process.env.XDG_CONFIG_HOME || path.join(os.homedir(), ".config");
|
|
26
43
|
}
|
|
@@ -361,7 +378,22 @@ function loadAgentPrompt(agentName) {
|
|
|
361
378
|
}
|
|
362
379
|
return result;
|
|
363
380
|
}
|
|
381
|
+
var CONFIG_FILENAME = "opencode-swarm.json", PROMPTS_DIR_NAME = "opencode-swarm", MAX_CONFIG_FILE_BYTES = 102400;
|
|
382
|
+
var init_loader = __esm(() => {
|
|
383
|
+
init_warning_buffer();
|
|
384
|
+
init_schema();
|
|
385
|
+
init_merge();
|
|
386
|
+
init_merge();
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
// src/config/index.ts
|
|
390
|
+
init_constants();
|
|
391
|
+
init_loader();
|
|
392
|
+
init_loader();
|
|
393
|
+
init_schema();
|
|
394
|
+
|
|
364
395
|
// src/config/worktree-isolation-config.ts
|
|
396
|
+
init_constants();
|
|
365
397
|
function resolveWorktreeIsolationConfig(config) {
|
|
366
398
|
if (config.worktree) {
|
|
367
399
|
return { ...DEFAULT_WORKTREE_ISOLATION_CONFIG, ...config.worktree };
|
|
@@ -383,4 +415,4 @@ function resolveWorktreeIsolationConfig(config) {
|
|
|
383
415
|
// src/config/index.ts
|
|
384
416
|
var _internals = { loadPluginConfigWithMeta };
|
|
385
417
|
|
|
386
|
-
export { loadPluginConfig, loadPluginConfigWithMeta, loadPluginConfigWithMetaAsync, loadAgentPrompt, resolveWorktreeIsolationConfig, _internals };
|
|
418
|
+
export { loadPluginConfig, loadPluginConfigWithMeta, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader, resolveWorktreeIsolationConfig, _internals };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
readEffectiveSpecSync
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-s9mj4rb9.js";
|
|
5
5
|
import {
|
|
6
6
|
EVIDENCE_MAX_JSON_BYTES,
|
|
7
7
|
EvidenceBundleSchema,
|
|
8
8
|
EvidenceSchema
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-k5jrywpr.js";
|
|
10
10
|
import {
|
|
11
11
|
_internals,
|
|
12
12
|
buildDefaultPolicy,
|
|
@@ -29,14 +29,14 @@ import {
|
|
|
29
29
|
replayFromLedgerWithStatus,
|
|
30
30
|
takeSnapshotEvent,
|
|
31
31
|
takeSnapshotWithRetry
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-2tn5h2zp.js";
|
|
33
33
|
import {
|
|
34
34
|
PlanSchema
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-1kz6da87.js";
|
|
36
36
|
import {
|
|
37
37
|
readSwarmFileAsync,
|
|
38
38
|
validateSwarmPath
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-2445sx3d.js";
|
|
40
40
|
import {
|
|
41
41
|
criticalWarn,
|
|
42
42
|
error,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
readTaskEvidence,
|
|
49
49
|
readTaskEvidenceRaw,
|
|
50
50
|
sanitizeTaskId
|
|
51
|
-
} from "./index-
|
|
51
|
+
} from "./index-3x761jqv.js";
|
|
52
52
|
import {
|
|
53
53
|
atomicWriteFile
|
|
54
54
|
} from "./index-7mkpsw6g.js";
|
|
@@ -63,8 +63,9 @@ import {
|
|
|
63
63
|
} from "./index-q2rrv0cy.js";
|
|
64
64
|
import {
|
|
65
65
|
ZodError,
|
|
66
|
-
exports_external
|
|
67
|
-
|
|
66
|
+
exports_external,
|
|
67
|
+
init_zod
|
|
68
|
+
} from "./index-bpmtbmy9.js";
|
|
68
69
|
import {
|
|
69
70
|
bunHash,
|
|
70
71
|
bunWrite,
|
|
@@ -3421,6 +3422,7 @@ function migrateLegacyPlan(planContent, swarmId) {
|
|
|
3421
3422
|
}
|
|
3422
3423
|
|
|
3423
3424
|
// src/evidence/manager.ts
|
|
3425
|
+
init_zod();
|
|
3424
3426
|
import {
|
|
3425
3427
|
mkdirSync as mkdirSync5,
|
|
3426
3428
|
readdirSync as readdirSync2,
|
|
@@ -3437,6 +3439,7 @@ import * as fs5 from "fs/promises";
|
|
|
3437
3439
|
import * as path11 from "path";
|
|
3438
3440
|
|
|
3439
3441
|
// src/evaluation/contracts.ts
|
|
3442
|
+
init_zod();
|
|
3440
3443
|
var IdentifierSchema = exports_external.string().min(1).max(160).regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/);
|
|
3441
3444
|
var Sha256Schema = exports_external.string().regex(/^[a-f0-9]{64}$/);
|
|
3442
3445
|
var IsoDateSchema = exports_external.iso.datetime({ offset: true });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-qd77aft9.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-htbjqftb.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -83,56 +83,63 @@ import {
|
|
|
83
83
|
handleWriteRetroCommand,
|
|
84
84
|
normalizeSwarmCommandInput,
|
|
85
85
|
resolveCommand
|
|
86
|
-
} from "./index-
|
|
87
|
-
import"./index-
|
|
88
|
-
import"./index-
|
|
89
|
-
import"./index-
|
|
86
|
+
} from "./index-mkkx1a4f.js";
|
|
87
|
+
import"./index-e19mxn9f.js";
|
|
88
|
+
import"./index-v5ecczts.js";
|
|
89
|
+
import"./index-4rzzzjtg.js";
|
|
90
90
|
import"./index-4905hd2m.js";
|
|
91
|
-
import"./index-
|
|
92
|
-
import"./index-
|
|
93
|
-
import"./index-
|
|
94
|
-
import"./index-
|
|
91
|
+
import"./index-134d35c1.js";
|
|
92
|
+
import"./index-6n2jpz7x.js";
|
|
93
|
+
import"./index-tyg0zezw.js";
|
|
94
|
+
import"./index-z0m4angq.js";
|
|
95
|
+
import"./index-eeg04r0x.js";
|
|
95
96
|
import"./index-vxv732ex.js";
|
|
96
97
|
import"./index-c8s9a3zh.js";
|
|
97
|
-
import"./index-
|
|
98
|
-
import"./index-
|
|
99
|
-
import"./index-
|
|
100
|
-
import"./index-
|
|
98
|
+
import"./index-s9mj4rb9.js";
|
|
99
|
+
import"./index-23zsx7dm.js";
|
|
100
|
+
import"./index-zjedv2bd.js";
|
|
101
|
+
import"./index-13d2g7k9.js";
|
|
101
102
|
import"./index-rtry5xyf.js";
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
103
|
+
import"./index-2x4maxte.js";
|
|
104
|
+
import"./index-x2mmnrnx.js";
|
|
104
105
|
import"./index-ae75rja9.js";
|
|
105
106
|
import"./index-q27bajqb.js";
|
|
106
|
-
import"./index-
|
|
107
|
-
import"./index-
|
|
108
|
-
import"./index-
|
|
107
|
+
import"./index-3yyr4ynk.js";
|
|
108
|
+
import"./index-k5jrywpr.js";
|
|
109
|
+
import"./index-n832052r.js";
|
|
109
110
|
import {
|
|
110
111
|
AGENT_TOOL_MAP,
|
|
111
112
|
ORCHESTRATOR_NAME,
|
|
113
|
+
init_constants,
|
|
114
|
+
init_schema,
|
|
112
115
|
stripKnownSwarmPrefix
|
|
113
|
-
} from "./index-
|
|
114
|
-
import"./index-
|
|
116
|
+
} from "./index-c6crt5rs.js";
|
|
117
|
+
import"./index-bk5tah7q.js";
|
|
115
118
|
import"./index-8fwhhayc.js";
|
|
116
119
|
import"./index-q1exe2b3.js";
|
|
117
|
-
import"./index-
|
|
118
|
-
import"./index-
|
|
119
|
-
import"./index-
|
|
120
|
-
import"./index-
|
|
121
|
-
import"./index-
|
|
122
|
-
import"./index-
|
|
123
|
-
import"./index-
|
|
124
|
-
import"./index-
|
|
120
|
+
import"./index-gnvg72y1.js";
|
|
121
|
+
import"./index-2tn5h2zp.js";
|
|
122
|
+
import"./index-1kz6da87.js";
|
|
123
|
+
import"./index-v2rdhwx8.js";
|
|
124
|
+
import"./index-gacm5s2n.js";
|
|
125
|
+
import"./index-2445sx3d.js";
|
|
126
|
+
import"./index-z6xqpmqg.js";
|
|
127
|
+
import"./index-zjygnfay.js";
|
|
125
128
|
import"./index-zgwm4ryv.js";
|
|
126
129
|
import"./index-dqh3zhhc.js";
|
|
127
|
-
import"./index-
|
|
130
|
+
import"./index-3x761jqv.js";
|
|
128
131
|
import"./index-7mkpsw6g.js";
|
|
129
132
|
import"./index-fsrp8wp3.js";
|
|
130
133
|
import"./index-76kvm9z5.js";
|
|
131
134
|
import"./index-q2rrv0cy.js";
|
|
132
|
-
import"./index-
|
|
135
|
+
import"./index-bpmtbmy9.js";
|
|
133
136
|
import"./index-7g4c7s5r.js";
|
|
134
137
|
import"./index-qe3v54nb.js";
|
|
135
138
|
import"./index-a76rekgs.js";
|
|
139
|
+
|
|
140
|
+
// src/commands/index.ts
|
|
141
|
+
init_constants();
|
|
142
|
+
init_schema();
|
|
136
143
|
// src/commands/command-names.ts
|
|
137
144
|
var COMMAND_NAMES = Object.freeze(Object.keys(COMMAND_REGISTRY));
|
|
138
145
|
var COMMAND_NAME_SET = new Set(COMMAND_NAMES);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
__esm
|
|
4
|
+
} from "./index-a76rekgs.js";
|
|
5
|
+
|
|
6
|
+
// src/hooks/knowledge-types.ts
|
|
7
|
+
function isActiveStatus(status) {
|
|
8
|
+
return !INACTIVE_STATUSES.has(status ?? "");
|
|
9
|
+
}
|
|
10
|
+
var KNOWLEDGE_SCHEMA_VERSION = 3, INACTIVE_STATUSES, OUTCOME_BLOCK_THRESHOLD = -0.3;
|
|
11
|
+
var init_knowledge_types = __esm(() => {
|
|
12
|
+
INACTIVE_STATUSES = new Set([
|
|
13
|
+
"archived",
|
|
14
|
+
"quarantined",
|
|
15
|
+
"quarantined_unactionable"
|
|
16
|
+
]);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export { KNOWLEDGE_SCHEMA_VERSION, OUTCOME_BLOCK_THRESHOLD, isActiveStatus, init_knowledge_types };
|