@miraland-labs/conduit-bridge 0.14.7 → 0.14.8
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 +1 -1
- package/dist/execution.js +22 -1
- package/package.json +1 -1
package/dist/driver.js
CHANGED
|
@@ -15,7 +15,7 @@ function deliveryLanguageRule(language) {
|
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
export const evidenceKinds = ["change", "test", "preview", "research", "documentation"];
|
|
18
|
-
export const agentReportTemplate = '{"outcome": "one-paragraph summary", "changes": ["path — what changed"], "verification": ["command — result"], "acceptance_results": [{"criterion": "exact criterion text", "status": "met|not_met|unknown", "unverified_reason": "omit unless status is unknown", "unverified_detail": "one sentence naming what was missing; omit unless status is unknown"}], "evidence": [{"kind": "change|test|preview|research|documentation", "name": "concise evidence name", "uri": "external URL if one exists", "digest": "optional digest", "details": ["observable result"], "acceptance_criteria": ["exact criterion text supported by this evidence"]}], "assumptions": [], "risks": [], "limitations": [], "head_commit": "full sha of your final commit, omit if none"}';
|
|
18
|
+
export const agentReportTemplate = '{"outcome": "one-paragraph summary", "changes": ["path from the repository root — what changed"], "verification": ["command — result"], "acceptance_results": [{"criterion": "exact criterion text", "status": "met|not_met|unknown", "unverified_reason": "omit unless status is unknown", "unverified_detail": "one sentence naming what was missing; omit unless status is unknown"}], "evidence": [{"kind": "change|test|preview|research|documentation", "name": "concise evidence name", "uri": "external URL if one exists", "digest": "optional digest", "details": ["observable result"], "acceptance_criteria": ["exact criterion text supported by this evidence"]}], "assumptions": [], "risks": [], "limitations": [], "head_commit": "full sha of your final commit, omit if none"}';
|
|
19
19
|
/**
|
|
20
20
|
* Resolve an operator's ordered tier candidates against the live model list.
|
|
21
21
|
* Picks the first safe candidate the CLI currently offers; without a live list
|
package/dist/execution.js
CHANGED
|
@@ -1281,10 +1281,31 @@ export function validateChangeScope(report, changeScope, options = {}) {
|
|
|
1281
1281
|
if (!report.changes.length)
|
|
1282
1282
|
return;
|
|
1283
1283
|
const paths = report.changes.map((change) => change.split(/\s+[—-]\s+/, 1)[0].trim().replaceAll("\\", "/"));
|
|
1284
|
-
const outside = paths.filter((path) =>
|
|
1284
|
+
const outside = paths.filter((path) => {
|
|
1285
|
+
if (!path || path.startsWith("/") || path.split("/").includes(".."))
|
|
1286
|
+
return true;
|
|
1287
|
+
if (changeScope.some((scope) => pathMatchesScope(path, scope)))
|
|
1288
|
+
return false;
|
|
1289
|
+
return !namesOneScopedFile(path, changeScope);
|
|
1290
|
+
});
|
|
1285
1291
|
if (outside.length)
|
|
1286
1292
|
throw new Error(`Agent reported changes outside the approved scope: ${outside.join(", ")}`);
|
|
1287
1293
|
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Did the agent name an approved file the short way?
|
|
1296
|
+
*
|
|
1297
|
+
* A run that edited src/lib/tools.ts and reported "tools.ts" did the approved work and described it
|
|
1298
|
+
* loosely. Rejecting that spends the attempt, fails the contract, and puts a decision in front of
|
|
1299
|
+
* the owner over a path format — and the rerun reports it the same way. Accept the shorthand only
|
|
1300
|
+
* when it can mean exactly one approved file: with two candidates we genuinely cannot tell which was
|
|
1301
|
+
* touched, so it stays a violation.
|
|
1302
|
+
*/
|
|
1303
|
+
function namesOneScopedFile(path, changeScope) {
|
|
1304
|
+
const candidates = changeScope
|
|
1305
|
+
.map((scope) => scope.replaceAll("\\", "/").replace(/^\.\//, "").replace(/\/$/, ""))
|
|
1306
|
+
.filter((scope) => !scope.includes("*") && scope.endsWith(`/${path}`));
|
|
1307
|
+
return candidates.length === 1;
|
|
1308
|
+
}
|
|
1288
1309
|
function pathMatchesScope(path, scope) {
|
|
1289
1310
|
const normalized = scope.replaceAll("\\", "/").replace(/^\.\//, "").replace(/\/$/, "");
|
|
1290
1311
|
if (normalized.endsWith("/**")) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miraland-labs/conduit-bridge",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.8",
|
|
4
4
|
"description": "Conduit Bridge CLI — join, connect, disconnect, multi-driver lanes, and run Claude Code / Codex / Cursor / OpenCode / Pi / Kiro / Antigravity agents for a Conduit organization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|