opencode-swarm 7.186.8 → 7.187.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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/agents/architect.d.ts +1 -1
- package/dist/cli/{auto-checkpoint-hw4rttv4.js → auto-checkpoint-r69e82bh.js} +10 -11
- package/dist/cli/{checkpoint-fdkh943k.js → checkpoint-1sqwbgra.js} +18 -19
- package/dist/cli/{coder-settlement-91r5s8ar.js → coder-settlement-b9qx0732.js} +14 -15
- package/dist/cli/{config-doctor-nzds5xzf.js → config-doctor-s4fr5qwr.js} +34 -4
- package/dist/cli/{core-w0gq7vwa.js → core-bezezjy9.js} +5 -6
- package/dist/cli/{curation-policy-kw6x1cba.js → curation-policy-2x2w3b57.js} +7 -8
- package/dist/cli/{curator-drift-svnc70x4.js → curator-drift-785xnxdv.js} +10 -11
- package/dist/cli/curator-llm-factory-p0wwyswg.js +80 -0
- package/dist/cli/{curator-gkrn8wz3.js → curator-w4hp7a10.js} +44 -45
- package/dist/cli/{dispatch-0ejzwb45.js → dispatch-qvcztbpf.js} +222 -48
- package/dist/cli/{evidence-summary-service-a2tx8tbn.js → evidence-summary-service-33qcm9xc.js} +21 -22
- package/dist/cli/{gate-evidence-28bys0r0.js → gate-evidence-9ehj968e.js} +9 -10
- package/dist/cli/guardrail-explain-5715fdzv.js +81 -0
- package/dist/cli/guardrail-log-k1dfzfzm.js +22 -0
- package/dist/cli/{guardrail-reset-w5kpwfxb.js → guardrail-reset-nt88n9dm.js} +44 -45
- package/dist/cli/hive-promoter-c8fjn186.js +95 -0
- package/dist/cli/{index-mr86ywsj.js → index-0yj79yk1.js} +1 -1
- package/dist/cli/{index-mtb763x4.js → index-1vvr69ka.js} +1 -1
- package/dist/cli/{index-b9zqye89.js → index-2s8wdagg.js} +44 -45
- package/dist/cli/{index-e47fhj4k.js → index-2wgvjwpr.js} +5 -5
- package/dist/cli/{index-cvwkjnr5.js → index-469xmpd6.js} +1 -1
- package/dist/cli/{index-0ghn241n.js → index-4g6sw4eq.js} +1 -1
- package/dist/cli/{index-2nbws8bd.js → index-5m56c5r6.js} +5 -5
- package/dist/cli/{index-e6tjg7t9.js → index-6ersmqjd.js} +9 -9
- package/dist/cli/{index-0k283qtq.js → index-9hag235h.js} +2 -2
- package/dist/cli/{index-sjwpvte3.js → index-a8gvszr2.js} +2 -2
- package/dist/cli/{index-qc1x5vvb.js → index-akt0arnt.js} +2695 -2589
- package/dist/cli/{index-kg4yp11g.js → index-b2je0z0t.js} +4 -4
- package/dist/cli/{index-ha4r51k4.js → index-bbqxt1p5.js} +28 -11
- package/dist/cli/{index-znc71e1c.js → index-bejxkee0.js} +2 -2
- package/dist/cli/{index-06pcq86m.js → index-c8ffgcvz.js} +3 -3
- package/dist/cli/{index-n1szkmbz.js → index-cc1vzq4m.js} +1 -1
- package/dist/cli/{index-c12cz80m.js → index-cppqxjw9.js} +2 -2
- package/dist/cli/{index-d21545hp.js → index-cx4s7cak.js} +46 -47
- package/dist/cli/{index-xgsy3hzf.js → index-d6kvatwp.js} +12 -12
- package/dist/cli/{index-k55ep5se.js → index-df2p0k0s.js} +2 -2
- package/dist/cli/{index-x5mkva6s.js → index-dypmvvga.js} +1 -1
- package/dist/cli/{index-7ae4sgp4.js → index-ectvhv8e.js} +5 -5
- package/dist/cli/{index-whk4027k.js → index-en7vzpeq.js} +4 -4
- package/dist/cli/{index-4y6pndcf.js → index-evy5yrsw.js} +4 -4
- package/dist/cli/{index-mc72pk74.js → index-fzpt2djt.js} +32 -1
- package/dist/cli/{index-5dgg9vhz.js → index-hvr82s1t.js} +565 -76
- package/dist/cli/{index-xdjwefa5.js → index-jtncfvhe.js} +1 -1
- package/dist/cli/{index-c5x4yzt6.js → index-knbjtqwt.js} +5 -5
- package/dist/cli/{index-pntrhnj8.js → index-krqq8kbq.js} +7 -7
- package/dist/cli/{index-extgtmxm.js → index-m1qy7f1e.js} +1 -1
- package/dist/cli/{index-84wt7q5y.js → index-mf19yqss.js} +3 -3
- package/dist/cli/{index-7pstt3w2.js → index-pfpnzf6w.js} +1 -1
- package/dist/cli/{index-144jx1jn.js → index-pts38j6x.js} +5 -5
- package/dist/cli/{index-dbwpcjhw.js → index-pymr99as.js} +8 -8
- package/dist/cli/{index-616pp1nq.js → index-qzgfheb4.js} +3 -3
- package/dist/cli/{index-e4hy4des.js → index-r6e8syr3.js} +1 -1
- package/dist/cli/{index-t6na8zpb.js → index-r7gt2w1b.js} +4 -4
- package/dist/cli/{index-gsqmefdg.js → index-rm676s0p.js} +2 -2
- package/dist/cli/{index-n5ekzhad.js → index-sztx0vyt.js} +5 -5
- package/dist/cli/{index-227te5a7.js → index-t3hcd6zz.js} +2 -2
- package/dist/cli/{index-prksynjw.js → index-ta48pe8j.js} +3 -3
- package/dist/cli/{index-q8dj8b88.js → index-v08ksq0b.js} +2 -2
- package/dist/cli/{index-7bxssqaf.js → index-vx8a8w3b.js} +142 -2
- package/dist/cli/{index-zcpd36zm.js → index-ww8payq9.js} +2 -2
- package/dist/cli/{index-tw513bvn.js → index-xs96nry2.js} +8 -8
- package/dist/cli/{index-0qpa53jg.js → index-ycz8z2db.js} +8 -8
- package/dist/cli/{index-gapyat7s.js → index-yf0cc6c5.js} +2 -2
- package/dist/cli/{index-03z05sbb.js → index-yw1g78v9.js} +2 -2
- package/dist/cli/{index-agm6hegf.js → index-zzxnssy3.js} +4 -4
- package/dist/cli/index.js +45 -46
- package/dist/cli/{knowledge-escalator-0dj3bvh2.js → knowledge-escalator-qttydcx2.js} +15 -16
- package/dist/cli/{knowledge-events-zwhb8jnb.js → knowledge-events-4vf0vj82.js} +13 -14
- package/dist/cli/{knowledge-link-pmbyqe3b.js → knowledge-link-p2c8agc8.js} +6 -7
- package/dist/cli/{knowledge-store-67n0qbhg.js → knowledge-store-bw1dk2eb.js} +7 -8
- package/dist/cli/{knowledge-validator-b58w129y.js → knowledge-validator-gefcc36h.js} +9 -10
- package/dist/cli/{mcp-ayc74bm2.js → mcp-d5p0k3p1.js} +1 -1
- package/dist/cli/{model-preflight-nvjb3bv5.js → model-preflight-fmx49pwy.js} +44 -45
- package/dist/cli/{pending-delegations-yvh7b951.js → pending-delegations-8333cb3y.js} +13 -14
- package/dist/cli/{pr-subscriptions-pkj5mmra.js → pr-subscriptions-p42ny2sn.js} +13 -14
- package/dist/cli/{pr-workflow-gate-zg6tg3c0.js → pr-workflow-gate-csy32z8w.js} +44 -45
- package/dist/cli/{runner-jev9vea3.js → runner-cbpr45cs.js} +7 -8
- package/dist/cli/{scan-cursor-8nkt0n1b.js → scan-cursor-14mwymtz.js} +8 -9
- package/dist/cli/{schema-ahy4ps8z.js → schema-6426g0gw.js} +2 -2
- package/dist/cli/{scope-persistence-h8b2hcy9.js → scope-persistence-avkv3s4m.js} +17 -18
- package/dist/cli/{server-14wr2fz2.js → server-d9rk2zeb.js} +45 -47
- package/dist/cli/{skill-generator-2pk8fvfz.js → skill-generator-epdvdsh5.js} +17 -18
- package/dist/cli/{snapshot-coordination-init-keeqdwph.js → snapshot-coordination-init-35f7wrqb.js} +44 -45
- package/dist/cli/{speckit-checkoff-yf09ctgv.js → speckit-checkoff-erwa7fbj.js} +5 -5
- package/dist/cli/{telemetry-rb8hrvbx.js → telemetry-2vwb3n42.js} +2 -3
- package/dist/cli/{workspace-snapshot-28p0ekng.js → workspace-snapshot-y60ay5eq.js} +4 -5
- package/dist/cli/{worktree-collision-ownership-7ctmpqx6.js → worktree-collision-ownership-3tqkw81h.js} +14 -15
- package/dist/cli/{worktree-isolation-2c1hvct4.js → worktree-isolation-0rrjqypt.js} +44 -45
- package/dist/commands/registry.d.ts +4 -4
- package/dist/commands/reset-backup.d.ts +20 -5
- package/dist/commands/rollback-gate.d.ts +73 -0
- package/dist/index.js +612 -597
- package/dist/lang/backends/java.d.ts +76 -0
- package/dist/lang/java-extraction.d.ts +88 -0
- package/dist/services/config-doctor.d.ts +19 -1
- package/dist/services/preflight-integration.d.ts +8 -1
- package/dist/state.d.ts +13 -0
- package/dist/tools/symbols.d.ts +18 -0
- package/opencode-swarm.schema.json +1 -1
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-j51cttb2.js +0 -81
- package/dist/cli/guardrail-explain-qjyz300y.js +0 -82
- package/dist/cli/guardrail-log-rw25bt8g.js +0 -23
- package/dist/cli/hive-promoter-qzz0veev.js +0 -96
- package/dist/cli/index-c1ggtmpm.js +0 -33
|
@@ -10,22 +10,23 @@ import {
|
|
|
10
10
|
defaultSelectTestFramework,
|
|
11
11
|
defaultTestFilesFor,
|
|
12
12
|
detectProjectLanguages,
|
|
13
|
+
maskCommentsAndLiterals,
|
|
14
|
+
parseJavaImports,
|
|
13
15
|
tokenizeCommand
|
|
14
|
-
} from "./index-
|
|
16
|
+
} from "./index-vx8a8w3b.js";
|
|
15
17
|
import"./index-9nyqt3kb.js";
|
|
16
18
|
import"./index-2s7dvzff.js";
|
|
17
19
|
import {
|
|
18
20
|
canonicalRootKeyFreshAsync,
|
|
19
21
|
canonicalRootKeyLexical
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-c1ggtmpm.js";
|
|
22
|
+
} from "./index-fzpt2djt.js";
|
|
22
23
|
import"./index-zpsr8rpc.js";
|
|
23
24
|
import"./index-zgwm4ryv.js";
|
|
24
25
|
import"./index-a76rekgs.js";
|
|
25
26
|
|
|
26
27
|
// src/lang/dispatch.ts
|
|
27
|
-
import * as
|
|
28
|
-
import * as
|
|
28
|
+
import * as fs5 from "fs";
|
|
29
|
+
import * as path5 from "path";
|
|
29
30
|
|
|
30
31
|
// src/lang/registry-backend.ts
|
|
31
32
|
class LanguageBackendRegistry {
|
|
@@ -55,13 +56,185 @@ class LanguageBackendRegistry {
|
|
|
55
56
|
}
|
|
56
57
|
var LANGUAGE_BACKEND_REGISTRY = new LanguageBackendRegistry;
|
|
57
58
|
|
|
59
|
+
// src/lang/backends/java.ts
|
|
60
|
+
import * as fs from "fs";
|
|
61
|
+
import * as path from "path";
|
|
62
|
+
var PROFILE_ID = "java";
|
|
63
|
+
var MAX_ENTRY_POINT_DEPTH = 8;
|
|
64
|
+
var MAX_ENTRY_POINT_ENTRIES = 5000;
|
|
65
|
+
var MAX_ENTRY_POINT_FILE_BYTES = 256 * 1024;
|
|
66
|
+
var MAX_ENTRY_POINT_TOTAL_BYTES = 512 * 1024;
|
|
67
|
+
var IGNORED_ENTRY_POINT_DIRS = new Set([
|
|
68
|
+
".git",
|
|
69
|
+
".gradle",
|
|
70
|
+
"target",
|
|
71
|
+
"build",
|
|
72
|
+
"node_modules",
|
|
73
|
+
".idea",
|
|
74
|
+
"out",
|
|
75
|
+
"bin",
|
|
76
|
+
".venv",
|
|
77
|
+
"venv",
|
|
78
|
+
"dist"
|
|
79
|
+
]);
|
|
80
|
+
var DEFERRED_ENTRY_POINT_DIRS = new Set([
|
|
81
|
+
"test",
|
|
82
|
+
"tests",
|
|
83
|
+
"androidTest",
|
|
84
|
+
"integrationTest",
|
|
85
|
+
"testFixtures"
|
|
86
|
+
]);
|
|
87
|
+
function isMainClass(source) {
|
|
88
|
+
const masked = maskCommentsAndLiterals(source);
|
|
89
|
+
return /\b(?:public\s+static|static\s+public)\s+void\s+main\s*\(/.test(masked);
|
|
90
|
+
}
|
|
91
|
+
function scanForMainClasses(dir) {
|
|
92
|
+
const results = [];
|
|
93
|
+
const stack = [{ dir, depth: 0 }];
|
|
94
|
+
let entriesVisited = 0;
|
|
95
|
+
let totalBytes = 0;
|
|
96
|
+
while (stack.length > 0) {
|
|
97
|
+
const current = stack.pop();
|
|
98
|
+
if (!current || current.depth > MAX_ENTRY_POINT_DEPTH)
|
|
99
|
+
continue;
|
|
100
|
+
let entries;
|
|
101
|
+
try {
|
|
102
|
+
entries = fs.readdirSync(current.dir, { withFileTypes: true });
|
|
103
|
+
} catch {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const deferredDirs = [];
|
|
107
|
+
const preferredDirs = [];
|
|
108
|
+
for (const entry of entries) {
|
|
109
|
+
entriesVisited++;
|
|
110
|
+
if (entriesVisited > MAX_ENTRY_POINT_ENTRIES)
|
|
111
|
+
return results;
|
|
112
|
+
const full = path.join(current.dir, entry.name);
|
|
113
|
+
if (entry.isDirectory()) {
|
|
114
|
+
if (IGNORED_ENTRY_POINT_DIRS.has(entry.name))
|
|
115
|
+
continue;
|
|
116
|
+
if (DEFERRED_ENTRY_POINT_DIRS.has(entry.name)) {
|
|
117
|
+
deferredDirs.push(full);
|
|
118
|
+
} else {
|
|
119
|
+
preferredDirs.push(full);
|
|
120
|
+
}
|
|
121
|
+
} else if (entry.isFile() && entry.name.endsWith(".java")) {
|
|
122
|
+
let size;
|
|
123
|
+
try {
|
|
124
|
+
size = fs.statSync(full).size;
|
|
125
|
+
} catch {
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
if (size > MAX_ENTRY_POINT_FILE_BYTES)
|
|
129
|
+
continue;
|
|
130
|
+
if (totalBytes + size > MAX_ENTRY_POINT_TOTAL_BYTES)
|
|
131
|
+
return results;
|
|
132
|
+
try {
|
|
133
|
+
const source = fs.readFileSync(full, "utf-8");
|
|
134
|
+
totalBytes += size;
|
|
135
|
+
if (isMainClass(source)) {
|
|
136
|
+
results.push(path.relative(dir, full));
|
|
137
|
+
}
|
|
138
|
+
} catch {}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
for (const d of deferredDirs)
|
|
142
|
+
stack.push({ dir: d, depth: current.depth + 1 });
|
|
143
|
+
for (const d of preferredDirs)
|
|
144
|
+
stack.push({ dir: d, depth: current.depth + 1 });
|
|
145
|
+
}
|
|
146
|
+
return results;
|
|
147
|
+
}
|
|
148
|
+
function detectFramework(content) {
|
|
149
|
+
if (content.length === 0)
|
|
150
|
+
return null;
|
|
151
|
+
if (/\bspring-boot-starter-web\b|\bspring-boot\b|\bspring-web\b|\bspring-context\b/.test(content)) {
|
|
152
|
+
return { name: "spring", detectedVia: "spring-boot/spring dependency" };
|
|
153
|
+
}
|
|
154
|
+
if (/\bjakarta\.servlet\b|\bjavax\.servlet\b/.test(content)) {
|
|
155
|
+
return { name: "servlet", detectedVia: "jakarta/javax servlet dependency" };
|
|
156
|
+
}
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
function extractImports(_sourceFile, source) {
|
|
160
|
+
const seen = new Set;
|
|
161
|
+
for (const imp of parseJavaImports(source)) {
|
|
162
|
+
seen.add(imp.specifier);
|
|
163
|
+
}
|
|
164
|
+
return [...seen];
|
|
165
|
+
}
|
|
166
|
+
function wrapperExists(dir, name) {
|
|
167
|
+
return fs.existsSync(path.join(dir, name));
|
|
168
|
+
}
|
|
169
|
+
function resolveMvnwCommand(dir) {
|
|
170
|
+
const isWindows = process.platform === "win32";
|
|
171
|
+
const hasMvnwCmd = wrapperExists(dir, "mvnw.cmd");
|
|
172
|
+
return isWindows && hasMvnwCmd ? "mvnw.cmd" : "./mvnw";
|
|
173
|
+
}
|
|
174
|
+
function resolveGradlewCommand(dir) {
|
|
175
|
+
const isWindows = process.platform === "win32";
|
|
176
|
+
const hasGradlewBat = wrapperExists(dir, "gradlew.bat");
|
|
177
|
+
return isWindows && hasGradlewBat ? "gradlew.bat" : "./gradlew";
|
|
178
|
+
}
|
|
179
|
+
async function selectTestFramework(dir) {
|
|
180
|
+
if (wrapperExists(dir, "gradlew")) {
|
|
181
|
+
return {
|
|
182
|
+
name: "gradle",
|
|
183
|
+
cmd: [resolveGradlewCommand(dir), "test", "-q"],
|
|
184
|
+
cwd: dir,
|
|
185
|
+
detectedVia: "./gradlew",
|
|
186
|
+
filesIgnored: false
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
if (wrapperExists(dir, "mvnw")) {
|
|
190
|
+
return {
|
|
191
|
+
name: "maven",
|
|
192
|
+
cmd: [resolveMvnwCommand(dir), "test", "-q"],
|
|
193
|
+
cwd: dir,
|
|
194
|
+
detectedVia: "./mvnw",
|
|
195
|
+
filesIgnored: false
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
const profile = LANGUAGE_REGISTRY.get(PROFILE_ID);
|
|
199
|
+
if (!profile)
|
|
200
|
+
return null;
|
|
201
|
+
return defaultSelectTestFramework(profile, dir);
|
|
202
|
+
}
|
|
203
|
+
async function selectEntryPoints(dir) {
|
|
204
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
205
|
+
return scanForMainClasses(dir);
|
|
206
|
+
}
|
|
207
|
+
async function selectFramework(dir) {
|
|
208
|
+
let content = "";
|
|
209
|
+
for (const file of ["pom.xml", "build.gradle", "build.gradle.kts"]) {
|
|
210
|
+
try {
|
|
211
|
+
content += `
|
|
212
|
+
${fs.readFileSync(path.join(dir, file), "utf-8")}`;
|
|
213
|
+
} catch {}
|
|
214
|
+
}
|
|
215
|
+
return detectFramework(content);
|
|
216
|
+
}
|
|
217
|
+
function buildJavaBackend() {
|
|
218
|
+
const profile = LANGUAGE_REGISTRY.get(PROFILE_ID);
|
|
219
|
+
if (!profile) {
|
|
220
|
+
throw new Error("buildJavaBackend: java profile not in LANGUAGE_REGISTRY. " + "profiles.ts must be imported before this backend.");
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
...defaultBackendFor(profile),
|
|
224
|
+
extractImports,
|
|
225
|
+
selectTestFramework,
|
|
226
|
+
selectEntryPoints,
|
|
227
|
+
selectFramework
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
58
231
|
// src/lang/backends/php.ts
|
|
59
|
-
import * as
|
|
60
|
-
import * as
|
|
232
|
+
import * as fs3 from "fs";
|
|
233
|
+
import * as path3 from "path";
|
|
61
234
|
|
|
62
235
|
// src/lang/framework-detector.ts
|
|
63
|
-
import * as
|
|
64
|
-
import * as
|
|
236
|
+
import * as fs2 from "fs";
|
|
237
|
+
import * as path2 from "path";
|
|
65
238
|
function detectLaravelProject(directory) {
|
|
66
239
|
const signals = getLaravelSignals(directory);
|
|
67
240
|
const signalCount = [
|
|
@@ -78,21 +251,21 @@ function getLaravelSignals(directory) {
|
|
|
78
251
|
return { hasArtisanFile, hasLaravelFrameworkDep, hasConfigApp };
|
|
79
252
|
}
|
|
80
253
|
function checkArtisanFile(directory) {
|
|
81
|
-
const artisanPath =
|
|
82
|
-
if (!
|
|
254
|
+
const artisanPath = path2.join(directory, "artisan");
|
|
255
|
+
if (!fs2.existsSync(artisanPath))
|
|
83
256
|
return false;
|
|
84
257
|
try {
|
|
85
|
-
return
|
|
258
|
+
return fs2.statSync(artisanPath).isFile();
|
|
86
259
|
} catch {
|
|
87
260
|
return false;
|
|
88
261
|
}
|
|
89
262
|
}
|
|
90
263
|
function checkLaravelFrameworkDep(directory) {
|
|
91
|
-
const composerPath =
|
|
92
|
-
if (!
|
|
264
|
+
const composerPath = path2.join(directory, "composer.json");
|
|
265
|
+
if (!fs2.existsSync(composerPath))
|
|
93
266
|
return false;
|
|
94
267
|
try {
|
|
95
|
-
const content =
|
|
268
|
+
const content = fs2.readFileSync(composerPath, "utf-8");
|
|
96
269
|
const parsed = JSON.parse(content);
|
|
97
270
|
const require2 = parsed?.require ?? {};
|
|
98
271
|
return typeof require2["laravel/framework"] === "string";
|
|
@@ -101,12 +274,12 @@ function checkLaravelFrameworkDep(directory) {
|
|
|
101
274
|
}
|
|
102
275
|
}
|
|
103
276
|
function checkConfigApp(directory) {
|
|
104
|
-
return
|
|
277
|
+
return fs2.existsSync(path2.join(directory, "config", "app.php"));
|
|
105
278
|
}
|
|
106
279
|
|
|
107
280
|
// src/lang/backends/php.ts
|
|
108
|
-
var
|
|
109
|
-
async function
|
|
281
|
+
var PROFILE_ID2 = "php";
|
|
282
|
+
async function selectFramework2(dir) {
|
|
110
283
|
if (detectLaravelProject(dir)) {
|
|
111
284
|
return {
|
|
112
285
|
name: "laravel",
|
|
@@ -115,7 +288,7 @@ async function selectFramework(dir) {
|
|
|
115
288
|
}
|
|
116
289
|
return null;
|
|
117
290
|
}
|
|
118
|
-
async function
|
|
291
|
+
async function selectTestFramework2(dir) {
|
|
119
292
|
if (detectLaravelProject(dir)) {
|
|
120
293
|
return {
|
|
121
294
|
name: "php-artisan",
|
|
@@ -124,7 +297,7 @@ async function selectTestFramework(dir) {
|
|
|
124
297
|
detectedVia: "Laravel signals (artisan / composer.json / config/app.php)"
|
|
125
298
|
};
|
|
126
299
|
}
|
|
127
|
-
if (
|
|
300
|
+
if (fs3.existsSync(path3.join(dir, "Pest.php"))) {
|
|
128
301
|
return {
|
|
129
302
|
name: "pest",
|
|
130
303
|
cmd: [phpVendorBin("pest")],
|
|
@@ -132,7 +305,7 @@ async function selectTestFramework(dir) {
|
|
|
132
305
|
detectedVia: "Pest.php"
|
|
133
306
|
};
|
|
134
307
|
}
|
|
135
|
-
if (
|
|
308
|
+
if (fs3.existsSync(path3.join(dir, "phpunit.xml"))) {
|
|
136
309
|
return {
|
|
137
310
|
name: "phpunit",
|
|
138
311
|
cmd: [phpVendorBin("phpunit")],
|
|
@@ -140,7 +313,7 @@ async function selectTestFramework(dir) {
|
|
|
140
313
|
detectedVia: "phpunit.xml"
|
|
141
314
|
};
|
|
142
315
|
}
|
|
143
|
-
if (
|
|
316
|
+
if (fs3.existsSync(path3.join(dir, "phpunit.xml.dist"))) {
|
|
144
317
|
return {
|
|
145
318
|
name: "phpunit",
|
|
146
319
|
cmd: [phpVendorBin("phpunit")],
|
|
@@ -151,24 +324,24 @@ async function selectTestFramework(dir) {
|
|
|
151
324
|
return null;
|
|
152
325
|
}
|
|
153
326
|
function phpVendorBin(name) {
|
|
154
|
-
return
|
|
327
|
+
return path3.join("vendor", "bin", process.platform === "win32" ? `${name}.bat` : name);
|
|
155
328
|
}
|
|
156
329
|
function buildPhpBackend() {
|
|
157
|
-
const profile = LANGUAGE_REGISTRY.get(
|
|
330
|
+
const profile = LANGUAGE_REGISTRY.get(PROFILE_ID2);
|
|
158
331
|
if (!profile) {
|
|
159
332
|
throw new Error("buildPhpBackend: php profile not in LANGUAGE_REGISTRY. " + "profiles.ts must be imported before this backend.");
|
|
160
333
|
}
|
|
161
334
|
return {
|
|
162
335
|
...defaultBackendFor(profile),
|
|
163
|
-
selectFramework,
|
|
164
|
-
selectTestFramework
|
|
336
|
+
selectFramework: selectFramework2,
|
|
337
|
+
selectTestFramework: selectTestFramework2
|
|
165
338
|
};
|
|
166
339
|
}
|
|
167
340
|
|
|
168
341
|
// src/lang/backends/typescript.ts
|
|
169
|
-
import * as
|
|
170
|
-
import * as
|
|
171
|
-
var
|
|
342
|
+
import * as fs4 from "fs";
|
|
343
|
+
import * as path4 from "path";
|
|
344
|
+
var PROFILE_ID3 = "typescript";
|
|
172
345
|
var IMPORT_REGEX_ES = /import\s+[\s\S]*?\s+from\s+['"]([^'"]+)['"]/g;
|
|
173
346
|
var IMPORT_REGEX_BARE = /import\s+['"]([^'"]+)['"]/g;
|
|
174
347
|
var IMPORT_REGEX_REQUIRE = /require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
@@ -176,7 +349,7 @@ var IMPORT_REGEX_DYNAMIC = /import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
|
176
349
|
var IMPORT_REGEX_REEXPORT = /export\s+(?:\{[^}]*\}|\*)\s+from\s+['"]([^'"]+)['"]/g;
|
|
177
350
|
function readPackageJsonRaw(dir) {
|
|
178
351
|
try {
|
|
179
|
-
const content =
|
|
352
|
+
const content = fs4.readFileSync(path4.join(dir, "package.json"), "utf-8");
|
|
180
353
|
return JSON.parse(content);
|
|
181
354
|
} catch {
|
|
182
355
|
return null;
|
|
@@ -225,8 +398,8 @@ function selectionFromFramework(profile, fwName, dir, detectedVia) {
|
|
|
225
398
|
filesIgnored: false
|
|
226
399
|
};
|
|
227
400
|
}
|
|
228
|
-
async function
|
|
229
|
-
const profile = LANGUAGE_REGISTRY.get(
|
|
401
|
+
async function selectTestFramework3(dir) {
|
|
402
|
+
const profile = LANGUAGE_REGISTRY.get(PROFILE_ID3);
|
|
230
403
|
if (!profile)
|
|
231
404
|
return null;
|
|
232
405
|
const pkg = readPackageJson(dir);
|
|
@@ -248,7 +421,7 @@ async function selectTestFramework2(dir) {
|
|
|
248
421
|
return defaultSelectTestFramework(profile, dir);
|
|
249
422
|
}
|
|
250
423
|
function buildTestCommand(framework, files, dir, opts) {
|
|
251
|
-
const profile = LANGUAGE_REGISTRY.get(
|
|
424
|
+
const profile = LANGUAGE_REGISTRY.get(PROFILE_ID3);
|
|
252
425
|
if (!profile)
|
|
253
426
|
return null;
|
|
254
427
|
return defaultBuildTestCommand(profile, framework, files, dir, opts);
|
|
@@ -256,7 +429,7 @@ function buildTestCommand(framework, files, dir, opts) {
|
|
|
256
429
|
function parseTestOutput(framework, stdout, stderr, exitCode) {
|
|
257
430
|
return defaultParseTestOutput(framework, stdout, stderr, exitCode);
|
|
258
431
|
}
|
|
259
|
-
async function
|
|
432
|
+
async function selectFramework3(dir) {
|
|
260
433
|
const pkg = readPackageJson(dir);
|
|
261
434
|
if (!pkg)
|
|
262
435
|
return null;
|
|
@@ -282,7 +455,7 @@ async function selectFramework2(dir) {
|
|
|
282
455
|
}
|
|
283
456
|
return null;
|
|
284
457
|
}
|
|
285
|
-
async function
|
|
458
|
+
async function selectEntryPoints2(dir) {
|
|
286
459
|
const pkg = readPackageJson(dir);
|
|
287
460
|
if (!pkg)
|
|
288
461
|
return [];
|
|
@@ -306,7 +479,7 @@ async function selectEntryPoints(dir) {
|
|
|
306
479
|
}
|
|
307
480
|
return [...new Set(points.filter((p) => p.length > 0))];
|
|
308
481
|
}
|
|
309
|
-
function
|
|
482
|
+
function extractImports2(_sourceFile, source) {
|
|
310
483
|
const out = new Set;
|
|
311
484
|
for (const re of [
|
|
312
485
|
IMPORT_REGEX_ES,
|
|
@@ -325,32 +498,32 @@ function extractImports(_sourceFile, source) {
|
|
|
325
498
|
return [...out];
|
|
326
499
|
}
|
|
327
500
|
async function selectBuildCommand(dir) {
|
|
328
|
-
const profile = LANGUAGE_REGISTRY.get(
|
|
501
|
+
const profile = LANGUAGE_REGISTRY.get(PROFILE_ID3);
|
|
329
502
|
if (!profile)
|
|
330
503
|
return null;
|
|
331
504
|
return defaultSelectBuildCommand(profile, dir);
|
|
332
505
|
}
|
|
333
506
|
async function testFilesFor(sourceFile, dir) {
|
|
334
|
-
const profile = LANGUAGE_REGISTRY.get(
|
|
507
|
+
const profile = LANGUAGE_REGISTRY.get(PROFILE_ID3);
|
|
335
508
|
if (!profile)
|
|
336
509
|
return [];
|
|
337
510
|
return defaultTestFilesFor(profile, sourceFile, dir);
|
|
338
511
|
}
|
|
339
512
|
function buildTypescriptBackend() {
|
|
340
|
-
const profile = LANGUAGE_REGISTRY.get(
|
|
513
|
+
const profile = LANGUAGE_REGISTRY.get(PROFILE_ID3);
|
|
341
514
|
if (!profile) {
|
|
342
515
|
throw new Error("buildTypescriptBackend: typescript profile not in LANGUAGE_REGISTRY. " + "profiles.ts must be imported before this backend.");
|
|
343
516
|
}
|
|
344
517
|
return {
|
|
345
518
|
...profile,
|
|
346
|
-
selectTestFramework:
|
|
519
|
+
selectTestFramework: selectTestFramework3,
|
|
347
520
|
buildTestCommand,
|
|
348
521
|
parseTestOutput,
|
|
349
|
-
extractImports,
|
|
522
|
+
extractImports: extractImports2,
|
|
350
523
|
selectBuildCommand,
|
|
351
524
|
testFilesFor,
|
|
352
|
-
selectFramework:
|
|
353
|
-
selectEntryPoints
|
|
525
|
+
selectFramework: selectFramework3,
|
|
526
|
+
selectEntryPoints: selectEntryPoints2
|
|
354
527
|
};
|
|
355
528
|
}
|
|
356
529
|
var _internals = {
|
|
@@ -367,6 +540,7 @@ function registerAllBackends() {
|
|
|
367
540
|
LANGUAGE_BACKEND_REGISTRY.register(buildTypescriptBackend());
|
|
368
541
|
LANGUAGE_BACKEND_REGISTRY.register(buildPythonBackend());
|
|
369
542
|
LANGUAGE_BACKEND_REGISTRY.register(buildGoBackend());
|
|
543
|
+
LANGUAGE_BACKEND_REGISTRY.register(buildJavaBackend());
|
|
370
544
|
LANGUAGE_BACKEND_REGISTRY.register(buildPhpBackend());
|
|
371
545
|
registered = true;
|
|
372
546
|
}
|
|
@@ -409,7 +583,7 @@ var cache = new Map;
|
|
|
409
583
|
var insertCounter = 0;
|
|
410
584
|
async function tryReadDirectoryAsync(dir) {
|
|
411
585
|
try {
|
|
412
|
-
return new Set(await
|
|
586
|
+
return new Set(await fs5.promises.readdir(dir));
|
|
413
587
|
} catch {
|
|
414
588
|
return null;
|
|
415
589
|
}
|
|
@@ -422,7 +596,7 @@ async function manifestHash(dir, signal) {
|
|
|
422
596
|
const names = MANIFEST_FILES.filter((name) => entries.has(name));
|
|
423
597
|
const parts = await Promise.all(names.map(async (name) => {
|
|
424
598
|
try {
|
|
425
|
-
const stat = await
|
|
599
|
+
const stat = await fs5.promises.stat(path5.join(dir, name));
|
|
426
600
|
return `${name}:${stat.size}:${stat.mtimeMs}:${stat.ino}`;
|
|
427
601
|
} catch {
|
|
428
602
|
return null;
|
|
@@ -448,7 +622,7 @@ function cacheProfileKey(input, cacheKey) {
|
|
|
448
622
|
}
|
|
449
623
|
async function directoryFingerprint(dir) {
|
|
450
624
|
try {
|
|
451
|
-
const stat = await
|
|
625
|
+
const stat = await fs5.promises.stat(dir);
|
|
452
626
|
if (!stat.isDirectory())
|
|
453
627
|
return null;
|
|
454
628
|
return {
|
|
@@ -527,7 +701,7 @@ function throwIfAborted(signal) {
|
|
|
527
701
|
}
|
|
528
702
|
async function findManifestRoot(start, signal) {
|
|
529
703
|
throwIfAborted(signal);
|
|
530
|
-
const resolved =
|
|
704
|
+
const resolved = path5.resolve(start);
|
|
531
705
|
const key = await canonicalRootKeyFreshAsync(resolved);
|
|
532
706
|
throwIfAborted(signal);
|
|
533
707
|
const cached = manifestRootCache.get(key);
|
|
@@ -589,7 +763,7 @@ async function findManifestRoot(start, signal) {
|
|
|
589
763
|
}
|
|
590
764
|
}
|
|
591
765
|
}
|
|
592
|
-
const parent =
|
|
766
|
+
const parent = path5.dirname(cur);
|
|
593
767
|
if (parent === cur)
|
|
594
768
|
break;
|
|
595
769
|
cur = parent;
|
package/dist/cli/{evidence-summary-service-a2tx8tbn.js → evidence-summary-service-33qcm9xc.js}
RENAMED
|
@@ -5,45 +5,44 @@ import {
|
|
|
5
5
|
loadEvidence,
|
|
6
6
|
mergeDurableGateEntriesFromEvidence,
|
|
7
7
|
readDurableGateEvidence
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
} from "./index-sztx0vyt.js";
|
|
9
|
+
import"./index-df2p0k0s.js";
|
|
10
10
|
import"./index-txdagbh7.js";
|
|
11
11
|
import {
|
|
12
12
|
loadPlanJsonOnly
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-d6kvatwp.js";
|
|
14
14
|
import"./index-6b295cas.js";
|
|
15
|
-
import"./index-
|
|
15
|
+
import"./index-1vvr69ka.js";
|
|
16
16
|
import"./index-zsrtt42s.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-cppqxjw9.js";
|
|
18
|
+
import"./index-evy5yrsw.js";
|
|
19
|
+
import"./index-pts38j6x.js";
|
|
20
20
|
import"./index-g4fs6z4e.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-bejxkee0.js";
|
|
22
22
|
import"./index-2s7dvzff.js";
|
|
23
23
|
import"./index-kbkk7vnh.js";
|
|
24
24
|
import"./index-0725jpp7.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
25
|
+
import"./index-5m56c5r6.js";
|
|
26
|
+
import"./index-ww8payq9.js";
|
|
27
|
+
import"./index-cc1vzq4m.js";
|
|
28
|
+
import"./index-9hag235h.js";
|
|
29
29
|
import"./index-ry16d01s.js";
|
|
30
30
|
import"./index-rdm3px0g.js";
|
|
31
31
|
import"./index-7pmbnjvj.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
32
|
+
import"./index-c8ffgcvz.js";
|
|
33
|
+
import"./index-t3hcd6zz.js";
|
|
34
|
+
import"./index-0yj79yk1.js";
|
|
35
35
|
import"./index-t7hmqgjy.js";
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-c1ggtmpm.js";
|
|
36
|
+
import"./index-jtncfvhe.js";
|
|
37
|
+
import"./index-fzpt2djt.js";
|
|
39
38
|
import"./index-ejhxgyvm.js";
|
|
40
39
|
import"./index-7g4c7s5r.js";
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-r6e8syr3.js";
|
|
42
41
|
import"./index-gx2vp8gx.js";
|
|
43
|
-
import"./index-
|
|
42
|
+
import"./index-469xmpd6.js";
|
|
44
43
|
import"./index-zxdawwc7.js";
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
44
|
+
import"./index-qzgfheb4.js";
|
|
45
|
+
import"./index-yw1g78v9.js";
|
|
47
46
|
import"./index-bk5tah7q.js";
|
|
48
47
|
import"./index-gknz3bv1.js";
|
|
49
48
|
import"./index-zpsr8rpc.js";
|
|
@@ -26,22 +26,21 @@ import {
|
|
|
26
26
|
transitionTaskWorkflowEvidence,
|
|
27
27
|
transitionTaskWorkflowEvidenceWithStatus,
|
|
28
28
|
withTaskEvidenceTransaction
|
|
29
|
-
} from "./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
} from "./index-evy5yrsw.js";
|
|
30
|
+
import"./index-pts38j6x.js";
|
|
31
31
|
import"./index-g4fs6z4e.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-bejxkee0.js";
|
|
33
33
|
import"./index-2s7dvzff.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
34
|
+
import"./index-t3hcd6zz.js";
|
|
35
|
+
import"./index-0yj79yk1.js";
|
|
36
36
|
import"./index-t7hmqgjy.js";
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-c1ggtmpm.js";
|
|
37
|
+
import"./index-jtncfvhe.js";
|
|
38
|
+
import"./index-fzpt2djt.js";
|
|
40
39
|
import"./index-ejhxgyvm.js";
|
|
41
40
|
import"./index-7g4c7s5r.js";
|
|
42
|
-
import"./index-
|
|
41
|
+
import"./index-r6e8syr3.js";
|
|
43
42
|
import"./index-zxdawwc7.js";
|
|
44
|
-
import"./index-
|
|
43
|
+
import"./index-yw1g78v9.js";
|
|
45
44
|
import"./index-gknz3bv1.js";
|
|
46
45
|
import"./index-zpsr8rpc.js";
|
|
47
46
|
import"./index-9rwhas09.js";
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
handleGuardrailExplain
|
|
4
|
+
} from "./index-yf0cc6c5.js";
|
|
5
|
+
import"./index-akt0arnt.js";
|
|
6
|
+
import"./index-b2je0z0t.js";
|
|
7
|
+
import"./index-bbqxt1p5.js";
|
|
8
|
+
import"./index-sztx0vyt.js";
|
|
9
|
+
import"./index-vx8a8w3b.js";
|
|
10
|
+
import"./index-dypmvvga.js";
|
|
11
|
+
import"./index-df2p0k0s.js";
|
|
12
|
+
import"./index-txdagbh7.js";
|
|
13
|
+
import"./index-v08ksq0b.js";
|
|
14
|
+
import"./index-rdec0y3z.js";
|
|
15
|
+
import"./index-r7gt2w1b.js";
|
|
16
|
+
import"./index-pymr99as.js";
|
|
17
|
+
import"./index-2wgvjwpr.js";
|
|
18
|
+
import"./index-knbjtqwt.js";
|
|
19
|
+
import"./index-mf19yqss.js";
|
|
20
|
+
import"./index-ycz8z2db.js";
|
|
21
|
+
import"./index-cjapb4hy.js";
|
|
22
|
+
import"./index-a8gvszr2.js";
|
|
23
|
+
import"./index-pt7h91zc.js";
|
|
24
|
+
import"./index-q7sjgr1y.js";
|
|
25
|
+
import"./index-hvr82s1t.js";
|
|
26
|
+
import"./index-d6kvatwp.js";
|
|
27
|
+
import"./index-6b295cas.js";
|
|
28
|
+
import"./index-9nyqt3kb.js";
|
|
29
|
+
import"./index-1vvr69ka.js";
|
|
30
|
+
import"./index-zsrtt42s.js";
|
|
31
|
+
import"./index-cppqxjw9.js";
|
|
32
|
+
import"./index-evy5yrsw.js";
|
|
33
|
+
import"./index-pts38j6x.js";
|
|
34
|
+
import"./index-g4fs6z4e.js";
|
|
35
|
+
import"./index-xs96nry2.js";
|
|
36
|
+
import"./index-6ersmqjd.js";
|
|
37
|
+
import"./index-bejxkee0.js";
|
|
38
|
+
import"./index-2s7dvzff.js";
|
|
39
|
+
import"./index-zzxnssy3.js";
|
|
40
|
+
import"./index-pfpnzf6w.js";
|
|
41
|
+
import"./index-rtry5xyf.js";
|
|
42
|
+
import"./index-ta48pe8j.js";
|
|
43
|
+
import"./index-kbkk7vnh.js";
|
|
44
|
+
import"./index-0725jpp7.js";
|
|
45
|
+
import"./index-ectvhv8e.js";
|
|
46
|
+
import"./index-5m56c5r6.js";
|
|
47
|
+
import"./index-ww8payq9.js";
|
|
48
|
+
import"./index-m1qy7f1e.js";
|
|
49
|
+
import"./index-cc1vzq4m.js";
|
|
50
|
+
import"./index-9hag235h.js";
|
|
51
|
+
import"./index-ry16d01s.js";
|
|
52
|
+
import"./index-rdm3px0g.js";
|
|
53
|
+
import"./index-7pmbnjvj.js";
|
|
54
|
+
import"./index-c8ffgcvz.js";
|
|
55
|
+
import"./index-krqq8kbq.js";
|
|
56
|
+
import"./index-vzm6zre7.js";
|
|
57
|
+
import"./index-ae75rja9.js";
|
|
58
|
+
import"./index-rm676s0p.js";
|
|
59
|
+
import"./index-t3hcd6zz.js";
|
|
60
|
+
import"./index-0yj79yk1.js";
|
|
61
|
+
import"./index-t7hmqgjy.js";
|
|
62
|
+
import"./index-jtncfvhe.js";
|
|
63
|
+
import"./index-fzpt2djt.js";
|
|
64
|
+
import"./index-ejhxgyvm.js";
|
|
65
|
+
import"./index-7g4c7s5r.js";
|
|
66
|
+
import"./index-r6e8syr3.js";
|
|
67
|
+
import"./index-gx2vp8gx.js";
|
|
68
|
+
import"./index-469xmpd6.js";
|
|
69
|
+
import"./index-zxdawwc7.js";
|
|
70
|
+
import"./index-qzgfheb4.js";
|
|
71
|
+
import"./index-yw1g78v9.js";
|
|
72
|
+
import"./index-bk5tah7q.js";
|
|
73
|
+
import"./index-gknz3bv1.js";
|
|
74
|
+
import"./index-zpsr8rpc.js";
|
|
75
|
+
import"./index-wvghb3x6.js";
|
|
76
|
+
import"./index-9rwhas09.js";
|
|
77
|
+
import"./index-zgwm4ryv.js";
|
|
78
|
+
import"./index-a76rekgs.js";
|
|
79
|
+
export {
|
|
80
|
+
handleGuardrailExplain
|
|
81
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
handleGuardrailLog
|
|
4
|
+
} from "./index-4g6sw4eq.js";
|
|
5
|
+
import"./index-b2je0z0t.js";
|
|
6
|
+
import"./index-2s7dvzff.js";
|
|
7
|
+
import"./index-ww8payq9.js";
|
|
8
|
+
import"./index-c8ffgcvz.js";
|
|
9
|
+
import"./index-jtncfvhe.js";
|
|
10
|
+
import"./index-fzpt2djt.js";
|
|
11
|
+
import"./index-r6e8syr3.js";
|
|
12
|
+
import"./index-qzgfheb4.js";
|
|
13
|
+
import"./index-yw1g78v9.js";
|
|
14
|
+
import"./index-bk5tah7q.js";
|
|
15
|
+
import"./index-gknz3bv1.js";
|
|
16
|
+
import"./index-zpsr8rpc.js";
|
|
17
|
+
import"./index-9rwhas09.js";
|
|
18
|
+
import"./index-zgwm4ryv.js";
|
|
19
|
+
import"./index-a76rekgs.js";
|
|
20
|
+
export {
|
|
21
|
+
handleGuardrailLog
|
|
22
|
+
};
|