@miraland-labs/conduit-bridge 0.16.203 → 0.16.207
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/driver.js +25 -3
- package/dist/execution-class.js +1 -1
- package/dist/investigation.js +9 -5
- package/package.json +1 -1
package/dist/driver.js
CHANGED
|
@@ -728,6 +728,25 @@ export function claudeCodeFuelEnv(fuelSource, model) {
|
|
|
728
728
|
return undefined;
|
|
729
729
|
return { ANTHROPIC_MODEL: model, ANTHROPIC_SMALL_FAST_MODEL: model, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1" };
|
|
730
730
|
}
|
|
731
|
+
export function codexSandboxFacts(projection) {
|
|
732
|
+
return [
|
|
733
|
+
"SANDBOX FACTS",
|
|
734
|
+
`Sandbox mode: ${projection.sandbox}.`,
|
|
735
|
+
projection.networkAccess
|
|
736
|
+
? "Network is on."
|
|
737
|
+
: "Network is off, including loopback listen.",
|
|
738
|
+
projection.sandbox === "workspace-write"
|
|
739
|
+
? "Writes are allowed only in the workspace and TMPDIR. HOME and the rest of the filesystem are read-only."
|
|
740
|
+
: "No writes are allowed. The filesystem is read-only.",
|
|
741
|
+
"Child processes inherit these limits.",
|
|
742
|
+
"A registered gate that fails only with EPERM, EROFS, or a refused listen does not test the change.",
|
|
743
|
+
"Record that run as evidence with the refused calls.",
|
|
744
|
+
"Mark each criterion that run would settle as unknown with unverified_reason needs_environment.",
|
|
745
|
+
"Set unverified_detail to name the refusal.",
|
|
746
|
+
"Do not state in outcome, verification, or limitations that the gate failed.",
|
|
747
|
+
"Bridge runs every registered gate outside this sandbox after the turn. Its result is the witness.",
|
|
748
|
+
].join("\n");
|
|
749
|
+
}
|
|
731
750
|
/**
|
|
732
751
|
* Codex exec arguments. The sandbox is the enforcement boundary: network stays
|
|
733
752
|
* off inside workspace-write unless the class/capabilities require it.
|
|
@@ -848,7 +867,7 @@ export const codexDriver = {
|
|
|
848
867
|
diagnosis: input.workRole === "diagnose",
|
|
849
868
|
});
|
|
850
869
|
// Prompt via stdin avoids ARG_MAX limits on large assignment contracts.
|
|
851
|
-
const { code, stdout, stderr } = await execute(driverExecutable(codexDriver.name, input.executable), codexExecArgs({ ...input, networkAccess: projected.networkAccess }, projected.sandbox), input.workspace, agentTurnTimeoutMs(input), fuelSource === "conduit" ? input.fuel : undefined, fuelSource, input.prompt
|
|
870
|
+
const { code, stdout, stderr } = await execute(driverExecutable(codexDriver.name, input.executable), codexExecArgs({ ...input, networkAccess: projected.networkAccess }, projected.sandbox), input.workspace, agentTurnTimeoutMs(input), fuelSource === "conduit" ? input.fuel : undefined, fuelSource, `${input.prompt}\n\n${codexSandboxFacts(projected)}`, input.signal);
|
|
852
871
|
const parsed = parseCodexJsonl(stdout);
|
|
853
872
|
const resultText = parsed.resultText ?? (stdout || null);
|
|
854
873
|
if (code !== 0) {
|
|
@@ -1389,11 +1408,14 @@ export function parseAntigravityModelList(stdout) {
|
|
|
1389
1408
|
export function parseAntigravityOutput(stdout) {
|
|
1390
1409
|
try {
|
|
1391
1410
|
const parsed = JSON.parse(stdout.trim());
|
|
1411
|
+
const earlyEnd = typeof parsed.finished_reason === "string"
|
|
1412
|
+
&& ["print_timeout", "interrupted", "error"].includes(parsed.finished_reason);
|
|
1392
1413
|
return {
|
|
1393
1414
|
resultText: typeof parsed.response === "string" ? parsed.response : null,
|
|
1394
1415
|
sessionId: typeof parsed.conversation_id === "string" ? parsed.conversation_id : null,
|
|
1395
|
-
status: typeof parsed.status === "string" ? parsed.status : null,
|
|
1396
|
-
error: typeof parsed.error === "string" && parsed.error.trim() ? parsed.error
|
|
1416
|
+
status: earlyEnd ? "ERROR" : typeof parsed.status === "string" ? parsed.status : null,
|
|
1417
|
+
error: typeof parsed.error === "string" && parsed.error.trim() ? parsed.error
|
|
1418
|
+
: earlyEnd ? `agy ended early: ${parsed.finished_reason}` : null,
|
|
1397
1419
|
};
|
|
1398
1420
|
}
|
|
1399
1421
|
catch {
|
package/dist/execution-class.js
CHANGED
|
@@ -16,7 +16,7 @@ export function isBoundedVerificationCommand(command) {
|
|
|
16
16
|
// Cargo takes flags the same way: acme-sim registered `cargo clippy --all-targets -- -D warnings`
|
|
17
17
|
// on 2026-09-25, the rule admitted only a bare `cargo test|check`, and five deliveries shipped
|
|
18
18
|
// clippy failures because the gate was dropped before any attempt could run it.
|
|
19
|
-
return /^(npm run [A-Za-z0-9][A-Za-z0-9._:-]
|
|
19
|
+
return /^(npm run [A-Za-z0-9][A-Za-z0-9._:-]*(?: --(?: [\w./=:-]+)+)?|pnpm [A-Za-z0-9][A-Za-z0-9._:-]*(?: --(?: [\w./=:-]+)+)?|yarn [A-Za-z0-9][A-Za-z0-9._:-]*(?: --(?: [\w./=:-]+)+)?|cargo (test|check|clippy)(?: [\w./=:-]+)*|go test(?: \.\/\.\.\.)?|make [A-Za-z0-9][A-Za-z0-9._-]*|python3? -m [A-Za-z0-9_][\w.]*(?: [\w./=:*-]+)*|pytest(?: [\w./=*-]+)?|python3? [\w./-]+\.py(?: [\w./=:-]+)*|(?:\.\/gradlew|gradle|\.\/mvnw|mvn) test|Rscript tests\/testthat\.R|Rscript -e testthat::test_local\(\))$/.test(command);
|
|
20
20
|
}
|
|
21
21
|
/** Shell commands each grant authorizes — mapped per driver so they cannot drift. */
|
|
22
22
|
export const branchCreateCommands = [
|
package/dist/investigation.js
CHANGED
|
@@ -106,7 +106,8 @@ const investigationBriefSchema = z.object({
|
|
|
106
106
|
/** T122: a delivery verification is an investigation whose question carries this header. */
|
|
107
107
|
export const DELIVERY_VERIFICATION_HEADER = "DELIVERY VERIFICATION";
|
|
108
108
|
/** Owner-verbatim: the lane writes probe source; Bridge executes. Shown only when BRIEF KEYS are present. */
|
|
109
|
-
export const
|
|
109
|
+
export const DELIVERY_VERIFICATION_PROBE_ADMITTED_SHAPE = 'Admitted shape: npm run <script>, pnpm <script>, or yarn <script>, optionally followed by -- and plain tokens using only letters, digits, underscore, dot, slash, equals, colon, or hyphen; no quotes or shell syntax.';
|
|
110
|
+
export const DELIVERY_VERIFICATION_PROBE_INSTRUCTION = 'For every BRIEF KEY that states behaviour, add one entry to probes: either {"key":"[sN]","test":"<one of the REGISTERED COMMANDS verbatim, optionally narrowed with the admitted argument tail>","checks":"<one line: what it proves>"} or {"key":"[sN]","lang":"ts|py|sh","source":"<a short script run from the repository root that prints PROBE HOLDS as its last line and exits 0 when the key holds at this commit and prints PROBE FAILS as its last line and exits 1 when it does not; any other ending is recorded as broken; it may import repository modules by paths relative to the repository root>","checks":"<one line>"}. ' + DELIVERY_VERIFICATION_PROBE_ADMITTED_SHAPE + ' A filter that needs quotes must use a source probe instead. You do not run probes; Bridge runs them after you finish. Every other BRIEF KEY states no behaviour (wording, scope, docs): add it to no_behaviour as {"key":"[sN]","reason":"<one line: why it states no behaviour>"}. Name every BRIEF KEY once, in probes or in no_behaviour.';
|
|
110
111
|
const BRIEF_JSON_EXAMPLE = '{"summary":"one paragraph: what the change does and whether it meets the criteria","findings":["grounded fact with file/symbol"],"verification":["command — result"],"limitations":["what you could not settle"],"criteria":[{"criterion":"c1","assessment":"supported|unsupported|unclear","reason":"what you saw"}],"command_failures":["command that exited non-zero — the decisive output line"],"files_read":0,"bytes_read":0,"commands_run":["command you actually ran"]}';
|
|
111
112
|
const BRIEF_JSON_EXAMPLE_WITH_PROBES = '{"summary":"one paragraph: what the change does and whether it meets the criteria","findings":["grounded fact with file/symbol"],"verification":["command — result"],"limitations":["what you could not settle"],"criteria":[{"criterion":"c1","assessment":"supported|unsupported|unclear","reason":"what you saw"}],"command_failures":["command that exited non-zero — the decisive output line"],"probes":[],"no_behaviour":[],"files_read":0,"bytes_read":0,"commands_run":["command you actually ran"]}';
|
|
112
113
|
/** Named in both prompts so the lane knows each list's maximum before it writes. */
|
|
@@ -571,10 +572,13 @@ export async function runDeliveryVerificationProbes(input) {
|
|
|
571
572
|
const source = probe.source?.trim() ?? "";
|
|
572
573
|
if (named) {
|
|
573
574
|
if (!isRunnableVerificationCommand(named)) {
|
|
574
|
-
witnesses.push(
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
575
|
+
witnesses.push({
|
|
576
|
+
...witnessRecord({
|
|
577
|
+
key: probe.key, kind: "test", command: named, exitCode: -1, stdout: "", stderr: "", checks,
|
|
578
|
+
verdict: "broken",
|
|
579
|
+
}),
|
|
580
|
+
tail: `not a registered command: ${named} ${DELIVERY_VERIFICATION_PROBE_ADMITTED_SHAPE}`,
|
|
581
|
+
});
|
|
578
582
|
continue;
|
|
579
583
|
}
|
|
580
584
|
let exitCode = -1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miraland-labs/conduit-bridge",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.207",
|
|
4
4
|
"description": "Conduit Bridge CLI — join, connect, disconnect, multi-driver lanes, and run Claude Code / Codex / Cursor / OpenCode / Pi / Kiro / Antigravity / Grok Build agents for a Conduit organization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|