@miraland-labs/conduit-bridge 0.16.140 → 0.16.141
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 +13 -3
- package/package.json +1 -1
package/dist/investigation.js
CHANGED
|
@@ -95,15 +95,20 @@ const investigationBriefSchema = z.object({
|
|
|
95
95
|
source: z.string().max(8_000).optional(),
|
|
96
96
|
checks: z.string().max(500).optional().default(""),
|
|
97
97
|
})).max(20).default([]),
|
|
98
|
+
/** K12: brief keys the lane names as stating no behaviour, so no probe is owed. Passed through, never run. */
|
|
99
|
+
no_behaviour: z.array(z.object({
|
|
100
|
+
key: z.string().trim().min(1).max(40),
|
|
101
|
+
reason: z.string().trim().min(1).max(500),
|
|
102
|
+
})).max(40).default([]),
|
|
98
103
|
});
|
|
99
104
|
/** T122: a delivery verification is an investigation whose question carries this header. */
|
|
100
105
|
export const DELIVERY_VERIFICATION_HEADER = "DELIVERY VERIFICATION";
|
|
101
106
|
/** Owner-verbatim: the lane writes probe source; Bridge executes. Shown only when BRIEF KEYS are present. */
|
|
102
|
-
export const DELIVERY_VERIFICATION_PROBE_INSTRUCTION = 'For every BRIEF KEY that states behaviour, add one entry to probes: either {"key":"[sN]","test":"<registered command that asserts it>","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>"}. You do not run probes; Bridge runs them after you finish.
|
|
107
|
+
export const DELIVERY_VERIFICATION_PROBE_INSTRUCTION = 'For every BRIEF KEY that states behaviour, add one entry to probes: either {"key":"[sN]","test":"<registered command that asserts it>","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>"}. 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.';
|
|
103
108
|
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"]}';
|
|
104
|
-
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":[],"files_read":0,"bytes_read":0,"commands_run":["command you actually ran"]}';
|
|
109
|
+
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"]}';
|
|
105
110
|
/** Named in both prompts so the lane knows each list's maximum before it writes. */
|
|
106
|
-
export const BRIEF_LIMITS_SENTENCE = "Limits: findings at most 12, verification at most 8, limitations at most 8, criteria at most 40, command_failures at most 10, commands_run at most 10, probes at most 20; each text entry at most 1000 characters, commands_run entries at most 200 characters. Keep the most decisive entries.";
|
|
111
|
+
export const BRIEF_LIMITS_SENTENCE = "Limits: findings at most 12, verification at most 8, limitations at most 8, criteria at most 40, command_failures at most 10, commands_run at most 10, probes at most 20, no_behaviour at most 40; each text entry at most 1000 characters, commands_run entries at most 200 characters. Keep the most decisive entries.";
|
|
107
112
|
export function isDeliveryVerification(assignment) {
|
|
108
113
|
return assignment.question.trimStart().startsWith(DELIVERY_VERIFICATION_HEADER);
|
|
109
114
|
}
|
|
@@ -232,6 +237,7 @@ const BRIEF_LIST_MAX = {
|
|
|
232
237
|
command_failures: 10,
|
|
233
238
|
commands_run: 10,
|
|
234
239
|
probes: 20,
|
|
240
|
+
no_behaviour: 40,
|
|
235
241
|
};
|
|
236
242
|
function clipBriefText(value, max) {
|
|
237
243
|
return value.length > max ? value.slice(0, max) : value;
|
|
@@ -281,6 +287,9 @@ export function fitBriefToContract(candidate) {
|
|
|
281
287
|
fitNamedList("command_failures", (items) => fitBriefStrings(items, BRIEF_ITEM_MAX));
|
|
282
288
|
fitNamedList("commands_run", (items) => fitBriefStrings(items, BRIEF_COMMAND_RUN_MAX));
|
|
283
289
|
fitNamedList("probes", (items) => items);
|
|
290
|
+
fitNamedList("no_behaviour", (items) => items.map((item) => item && typeof item === "object" && typeof item.reason === "string"
|
|
291
|
+
? { ...item, reason: clipBriefText(item.reason, 500) }
|
|
292
|
+
: item));
|
|
284
293
|
clipBriefStringField(brief, "summary", BRIEF_SUMMARY_MAX);
|
|
285
294
|
if (typeof brief.files_read === "number" && brief.files_read > BRIEF_FILES_READ_MAX) {
|
|
286
295
|
brief.files_read = BRIEF_FILES_READ_MAX;
|
|
@@ -916,6 +925,7 @@ export async function executeNextInvestigation(client, config, workspace, brief,
|
|
|
916
925
|
? gatesRun.filter((gate) => gate.exitCode !== 0).map(gateFailureFact).slice(0, 10)
|
|
917
926
|
: observed.command_failures,
|
|
918
927
|
step_witness: stepWitness,
|
|
928
|
+
no_behaviour: deliveryVerification ? observed.no_behaviour : [],
|
|
919
929
|
witness: {
|
|
920
930
|
repository_fingerprint: assignment.repository_fingerprint ?? liveRepository ?? "unknown",
|
|
921
931
|
commit,
|
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.141",
|
|
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": {
|