@miraland-labs/conduit-bridge 0.16.130 → 0.16.131
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/investigation.js +40 -5
- package/dist/preflight.js +1 -1
- package/package.json +1 -1
package/dist/investigation.js
CHANGED
|
@@ -38,8 +38,9 @@ const budgetSchema = z.object({
|
|
|
38
38
|
export const investigationAssignmentSchema = z.object({
|
|
39
39
|
id: z.string().uuid(),
|
|
40
40
|
project_id: z.string().uuid(),
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
/** `conduct` (protocol 10): a Conductor seat turn — the question is the whole packet Conduit wrote. */
|
|
42
|
+
kind: z.enum(["repository", "conduct"]),
|
|
43
|
+
question: z.string().min(1).max(64_000),
|
|
43
44
|
grants: z.array(z.string()).default([]),
|
|
44
45
|
budget: budgetSchema.optional().default({}),
|
|
45
46
|
repository_fingerprint: z.string().nullable().optional().default(null),
|
|
@@ -294,6 +295,24 @@ export function fitBriefToContract(candidate) {
|
|
|
294
295
|
* lane wrote prose, a truncated fence, or a field the schema refuses. The failure now names the
|
|
295
296
|
* reason and carries a bounded, redacted tail of what came back.
|
|
296
297
|
*/
|
|
298
|
+
/**
|
|
299
|
+
* A Conductor seat turn's report: its summary and the actions it asks for. Bridge only carries them;
|
|
300
|
+
* Conduit checks and applies each one when the turn settles.
|
|
301
|
+
*/
|
|
302
|
+
export function parseConductReport(text) {
|
|
303
|
+
let candidate;
|
|
304
|
+
try {
|
|
305
|
+
candidate = parseJsonObjectCandidate(extractAgentReportJsonText(text));
|
|
306
|
+
}
|
|
307
|
+
catch {
|
|
308
|
+
throw new Error(`${UNUSABLE_BRIEF}: no JSON object in the reply. Reply tail: ${redactSecrets(boundedTail(text, UNUSABLE_BRIEF_TAIL_CHARS))}`);
|
|
309
|
+
}
|
|
310
|
+
const report = candidate;
|
|
311
|
+
if (typeof report.summary !== "string" || !report.summary.trim()) {
|
|
312
|
+
throw new Error(`${UNUSABLE_BRIEF}: the turn report has no summary. Reply tail: ${redactSecrets(boundedTail(text, UNUSABLE_BRIEF_TAIL_CHARS))}`);
|
|
313
|
+
}
|
|
314
|
+
return { summary: report.summary.trim().slice(0, 4_000), actions: Array.isArray(report.actions) ? report.actions.slice(0, 12) : [] };
|
|
315
|
+
}
|
|
297
316
|
export function parseInvestigationBrief(text) {
|
|
298
317
|
let candidate;
|
|
299
318
|
try {
|
|
@@ -815,10 +834,12 @@ export async function executeNextInvestigation(client, config, workspace, brief,
|
|
|
815
834
|
// T154: the lane resolves its model the way the authoring lane does. Without it Claude Code ran
|
|
816
835
|
// at its CLI default, which Conduit's /v1 rejects as an unknown alias (hosted-1, 2026-09-10:
|
|
817
836
|
// every verification of the first hosted delivery failed "Unknown model alias: claude-opus-5").
|
|
818
|
-
// A verification reads and runs commands: the light tier.
|
|
819
|
-
|
|
837
|
+
// A verification reads and runs commands: the light tier. A seat turn plans, writes briefs and
|
|
838
|
+
// judges deliveries: the deep tier.
|
|
839
|
+
const conduct = assignment.kind === "conduct";
|
|
840
|
+
const selection = await resolveAssignmentModel(driver, config, { risk_level: conduct ? "high" : "low" }, assignment.id, attemptWorkspace, fuel);
|
|
820
841
|
const result = await driver.run({
|
|
821
|
-
prompt: buildInvestigationPrompt(assignment, commit, context),
|
|
842
|
+
prompt: conduct ? assignment.question : buildInvestigationPrompt(assignment, commit, context),
|
|
822
843
|
workspace: attemptWorkspace,
|
|
823
844
|
...(selection.model ? { model: selection.model } : {}),
|
|
824
845
|
grants: assignment.grants,
|
|
@@ -839,6 +860,20 @@ export async function executeNextInvestigation(client, config, workspace, brief,
|
|
|
839
860
|
console.error(`Investigation ${assignment.id} failed: ${redactSecrets(message)}`);
|
|
840
861
|
return true;
|
|
841
862
|
}
|
|
863
|
+
if (conduct) {
|
|
864
|
+
const report = parseConductReport(result.resultText ?? "");
|
|
865
|
+
const turnCheck = await verifyObservationOnly({ attemptWorkspace, workspace, commit, fingerprintBefore });
|
|
866
|
+
if (!turnCheck.ok) {
|
|
867
|
+
await settle(client, assignment.id, {
|
|
868
|
+
lease_token: leaseToken, status: "failed", error: boundedTail(`${turnCheck.error}: ${turnCheck.detail}`, 2_000), retryable: true,
|
|
869
|
+
});
|
|
870
|
+
console.error(`Seat turn ${assignment.id} discarded — ${turnCheck.error}: ${turnCheck.detail}`);
|
|
871
|
+
return true;
|
|
872
|
+
}
|
|
873
|
+
await settle(client, assignment.id, { lease_token: leaseToken, status: "completed", result: report });
|
|
874
|
+
console.log(`Seat turn ${assignment.id} settled with ${report.actions.length} action(s).`);
|
|
875
|
+
return true;
|
|
876
|
+
}
|
|
842
877
|
const observed = parseInvestigationBrief(result.resultText ?? "");
|
|
843
878
|
const check = await verifyObservationOnly({ attemptWorkspace, workspace, commit, fingerprintBefore });
|
|
844
879
|
if (!check.ok) {
|
package/dist/preflight.js
CHANGED
|
@@ -30,7 +30,7 @@ function modelsFingerprint(config) {
|
|
|
30
30
|
return createHash("sha256").update(parts.join(";")).digest("hex").slice(0, 16);
|
|
31
31
|
}
|
|
32
32
|
// Protocol 9 adds the Bridge-observed driver interface cohort to every preflight lane.
|
|
33
|
-
export const BRIDGE_PROTOCOL_VERSION =
|
|
33
|
+
export const BRIDGE_PROTOCOL_VERSION = 10;
|
|
34
34
|
/** Keep the version identity within the same bound accepted by the heartbeat schema. */
|
|
35
35
|
export const MAX_DRIVER_VERSION_LENGTH = 200;
|
|
36
36
|
/** True for a single, bounded line with no control characters -- a version, not a notice. */
|
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.131",
|
|
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": {
|