@miraland-labs/conduit-bridge 0.16.117 → 0.16.119

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/execution.js CHANGED
@@ -198,10 +198,10 @@ export function classifyFinalizeFailure(message) {
198
198
  return { retryable: true, error: message, failure: bridgeCause("forge_unreachable", message) };
199
199
  // The control plane refused to open the change request — no forge connection resolves for this
200
200
  // organization or project, or the task's repository is not one that connection can open a change
201
- // request on. No retry and no rework can supply a connection, and the owner must read the control
202
- // plane's own words rather than "Bridge finalize interrupted", which names the wrong party.
201
+ // request on. No retry and no rework can supply a connection. The cause travels as an envelope so
202
+ // the owner reads the refusal rather than that Conduit could not classify the failure.
203
203
  if (message.startsWith(PULL_REQUEST_OPEN_FAILURE_PREFIX))
204
- return { retryable: false, error: message };
204
+ return { retryable: false, error: message, failure: bridgeCause("pull_request_open_refused", message) };
205
205
  if (FINALIZE_ENVIRONMENT_PATTERN.test(message))
206
206
  return { retryable: false, error: message };
207
207
  // Bridge names the contract defect it found (K3); an unknown throw below stays prose until its
@@ -123,6 +123,7 @@ export const BRIDGE_CAUSES = {
123
123
  agent_no_land_commit: { class: "contract", disposition: "rework", responsible_party: "conduit", message: "The agent finished without committing the repository changes this package requires.", next_action: "Retry implement. Conductor will brief a land-focused recovery attempt — you do not need to edit technical constraints." },
124
124
  execution_unclassified: { class: "platform", disposition: "stop", responsible_party: "conduit", message: "Conduit could not classify this failure.", next_action: "Ask Conductor to diagnose the stopped run, then retry the same plan or open a revision. You do not need to translate the technical detail into agent constraints." },
125
125
  forge_unreachable: { class: "transient", disposition: "retry", responsible_party: "conduit", message: "The connection to the code host failed mid-run.", next_action: "Nothing to repair here — the run stopped on a network fault, not on the work. Retry the same plan." },
126
+ pull_request_open_refused: { class: "environment", disposition: "hold", responsible_party: "project_owner", message: "The code host refused to open the change request for this delivery.", next_action: "Check the project's code-host connection and its access to this repository, its branch rules, and whether a change request for this branch already exists, then retry. The agent's work is kept on its branch." },
126
127
  agent_model_abort: { class: "transient", disposition: "retry", responsible_party: "conduit", message: "The agent CLI stopped its own run: it detected a loop, asked for a different model, or the prompt did not fit the context window.", next_action: "Conduit retries on another model of the same intelligence tier. The product owner does not need to author technical constraints." },
127
128
  agent_execution_failed: { class: "transient", disposition: "retry", responsible_party: "conduit", message: "The agent run failed before delivery.", next_action: "Conduit will retry with bounded backoff while the authoring budget remains. No technical constraints are required from the owner." },
128
129
  verification_failed_after_run: { class: "transient", disposition: "retry", responsible_party: "conduit", message: "The agent run failed its own verification before delivery.", next_action: "Conduit will diagnose the retained failed run and brief the next authoring attempt." },
@@ -437,9 +437,19 @@ function probeFilename(language) {
437
437
  const extension = language === "ts" ? "mts" : language === "py" ? "py" : "sh";
438
438
  return `.conduit-probe-${crypto.randomUUID()}.${extension}`;
439
439
  }
440
+ /**
441
+ * A probe that reads Conduit's own database could not run: `node:sqlite` is behind a flag, and the
442
+ * probe runner started Node without it, so five of seven probes on one delivery came back
443
+ * unverifiable with ERR_UNKNOWN_BUILTIN_MODULE. The flag exists from Node 22; on an older runtime it
444
+ * would be a bad option, so it is passed only where it is understood.
445
+ */
446
+ export function probeNodeFlags(version = process.versions.node) {
447
+ const major = Number.parseInt(version.split(".")[0] ?? "", 10);
448
+ return Number.isFinite(major) && major >= 22 ? ["--experimental-sqlite"] : [];
449
+ }
440
450
  function probeArgv(language, file) {
441
451
  if (language === "ts")
442
- return ["node", "--import", tsxLoader, file];
452
+ return ["node", ...probeNodeFlags(), "--import", tsxLoader, file];
443
453
  if (language === "py")
444
454
  return ["python3", file];
445
455
  return ["bash", file];
@@ -622,7 +632,7 @@ export async function runDeliveredProbeInstrument(input) {
622
632
  const entry = join(input.workspace, PROBE_RUN_ENTRY);
623
633
  const timeoutMs = PROBE_TIMEOUT_MS * (input.probes.length + 1);
624
634
  const stdin = JSON.stringify({ probes: input.probes });
625
- const argv = ["node", "--import", tsxLoader, entry];
635
+ const argv = ["node", ...probeNodeFlags(), "--import", tsxLoader, entry];
626
636
  const result = await (input.exec ?? execDeliveredProbeRun)(argv, stdin, input.workspace, timeoutMs);
627
637
  if (result.code !== 0) {
628
638
  throw new Error(result.stderr.trim() || `delivered probe-run exited ${result.code}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miraland-labs/conduit-bridge",
3
- "version": "0.16.117",
3
+ "version": "0.16.119",
4
4
  "description": "Conduit Bridge CLI \u2014 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": {