@tablation/crew 0.163.0 → 0.163.1
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/cli.js +31 -23
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -14530,7 +14530,7 @@ function streamShowsAllowanceRefusal(streamPath) {
|
|
|
14530
14530
|
}
|
|
14531
14531
|
return false;
|
|
14532
14532
|
}
|
|
14533
|
-
var digestPathFor = (stateDir,
|
|
14533
|
+
var digestPathFor = (stateDir, routeLabel2, role, runId) => join34(stateDir, `digest-${routeLabel2}-${role}${runId ? `-${runId}` : ""}.md`);
|
|
14534
14534
|
function codeBridgeFor(o, harness) {
|
|
14535
14535
|
if (!o.ticket) return void 0;
|
|
14536
14536
|
const number = /(\d+)$/.exec(o.ticket)?.[1];
|
|
@@ -14587,9 +14587,9 @@ function planAgentRun(o) {
|
|
|
14587
14587
|
const commonPath = join34(o.route.promptsDir, "personas", "common.md");
|
|
14588
14588
|
const usesCommon = !SELF_CONTAINED_ROLES.has(o.role) && existsSync29(commonPath);
|
|
14589
14589
|
const now = o.now ?? (() => Date.now());
|
|
14590
|
-
const
|
|
14591
|
-
const ownDigest = o.runId ? digestPathFor(o.stateDir,
|
|
14592
|
-
const digestPath2 = ownDigest && existsSync29(ownDigest) ? ownDigest : digestPathFor(o.stateDir,
|
|
14590
|
+
const routeLabel2 = routeSlug(o.route.route);
|
|
14591
|
+
const ownDigest = o.runId ? digestPathFor(o.stateDir, routeLabel2, o.role, o.runId) : void 0;
|
|
14592
|
+
const digestPath2 = ownDigest && existsSync29(ownDigest) ? ownDigest : digestPathFor(o.stateDir, routeLabel2, o.role);
|
|
14593
14593
|
let digest;
|
|
14594
14594
|
let ageSeconds;
|
|
14595
14595
|
if (existsSync29(digestPath2)) {
|
|
@@ -14621,7 +14621,7 @@ function planAgentRun(o) {
|
|
|
14621
14621
|
});
|
|
14622
14622
|
const promptSha = createHash6("sha256").update(expanded.text).digest("hex");
|
|
14623
14623
|
const streamsDir = join34(o.stateDir, "streams");
|
|
14624
|
-
const base = `${
|
|
14624
|
+
const base = `${routeLabel2}-${o.role}-${o.cycle}${o.runId ? `-${o.runId}` : ""}`;
|
|
14625
14625
|
const seat = resolveSeat(o.ship, o.route, o.role, o.agentPersona ?? (o.agentModel ? { model: o.agentModel } : {}), o.repo);
|
|
14626
14626
|
const { model } = seat;
|
|
14627
14627
|
let toolchain = seat.toolchain;
|
|
@@ -14679,7 +14679,7 @@ function planAgentRun(o) {
|
|
|
14679
14679
|
} : void 0;
|
|
14680
14680
|
return {
|
|
14681
14681
|
role: o.role,
|
|
14682
|
-
route:
|
|
14682
|
+
route: routeLabel2,
|
|
14683
14683
|
// The route's directory, which is a STARTING POINT and not the
|
|
14684
14684
|
// ticket's repo: the session picks its own working directory even when
|
|
14685
14685
|
// the runner already selected a ticket (`o.repo` is known then, and
|
|
@@ -19594,6 +19594,9 @@ ${waiting.map((t) => `| ${displayKey2(t)} | ${t.status} | ${blockers(t, i)} |`).
|
|
|
19594
19594
|
// src/tracker-interface-read.ts
|
|
19595
19595
|
var INTERFACE_MISMATCH_KEY = "tracker_interface";
|
|
19596
19596
|
var INTERFACE_UNDECLARED_KEY = "tracker_interface_undeclared";
|
|
19597
|
+
var INTERFACE_OVERRIDE_KEY = `${INTERFACE_MISMATCH_KEY}_override`;
|
|
19598
|
+
var interfaceKey = (base, route2) => `${base}:${route2}`;
|
|
19599
|
+
var routeLabel = (route2) => `route ${route2}: `;
|
|
19597
19600
|
function statusOf2(e) {
|
|
19598
19601
|
return typeof e?.status === "number" ? e.status : void 0;
|
|
19599
19602
|
}
|
|
@@ -19651,14 +19654,14 @@ function blockingMessage(state, storedMappingKey) {
|
|
|
19651
19654
|
if (storedMappingKey !== void 0 && storedMappingKey !== mappingKey(state.mapping)) return MAPPING_CHANGED_MESSAGE;
|
|
19652
19655
|
return null;
|
|
19653
19656
|
}
|
|
19654
|
-
function mismatchItem(message, nowIso = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
19655
|
-
return { kind: "tracker_interface", key: INTERFACE_MISMATCH_KEY, since: nowIso, message };
|
|
19657
|
+
function mismatchItem(route2, message, nowIso = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
19658
|
+
return { kind: "tracker_interface", key: interfaceKey(INTERFACE_MISMATCH_KEY, route2), since: nowIso, message: routeLabel(route2) + message };
|
|
19656
19659
|
}
|
|
19657
|
-
function undeclaredItem(nowIso = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
19658
|
-
return { kind: "tracker_interface", key: INTERFACE_UNDECLARED_KEY, since: nowIso, message: UNDECLARED_MESSAGE };
|
|
19660
|
+
function undeclaredItem(route2, nowIso = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
19661
|
+
return { kind: "tracker_interface", key: interfaceKey(INTERFACE_UNDECLARED_KEY, route2), since: nowIso, message: routeLabel(route2) + UNDECLARED_MESSAGE };
|
|
19659
19662
|
}
|
|
19660
|
-
function overrideItem(nowIso = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
19661
|
-
return { kind: "tracker_interface", key:
|
|
19663
|
+
function overrideItem(route2, nowIso = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
19664
|
+
return { kind: "tracker_interface", key: interfaceKey(INTERFACE_OVERRIDE_KEY, route2), since: nowIso, message: routeLabel(route2) + OVERRIDE_IGNORED_MESSAGE };
|
|
19662
19665
|
}
|
|
19663
19666
|
function open(state, key) {
|
|
19664
19667
|
return state.shipAttention().previous().find((i) => i.key === key)?.message ?? null;
|
|
@@ -19666,28 +19669,33 @@ function open(state, key) {
|
|
|
19666
19669
|
async function checkTrackerInterface(o, deps = {}) {
|
|
19667
19670
|
const r = o.route.resolved;
|
|
19668
19671
|
if (!r?.projectId) return null;
|
|
19672
|
+
const name = o.route.route;
|
|
19673
|
+
const mismatchKey = interfaceKey(INTERFACE_MISMATCH_KEY, name);
|
|
19674
|
+
const undeclaredKey = interfaceKey(INTERFACE_UNDECLARED_KEY, name);
|
|
19675
|
+
const overrideKey = interfaceKey(INTERFACE_OVERRIDE_KEY, name);
|
|
19676
|
+
for (const legacy of [INTERFACE_MISMATCH_KEY, INTERFACE_UNDECLARED_KEY, INTERFACE_OVERRIDE_KEY]) clearShipAttention(o.state, legacy);
|
|
19669
19677
|
const state = await (deps.read ?? readForRoute)(o.route, o.ship);
|
|
19670
|
-
if (state.kind === "unreadable") return open(o.state,
|
|
19678
|
+
if (state.kind === "unreadable") return open(o.state, mismatchKey);
|
|
19671
19679
|
if (state.kind === "undeclared") {
|
|
19672
|
-
clearShipAttention(o.state,
|
|
19673
|
-
clearShipAttention(o.state,
|
|
19680
|
+
clearShipAttention(o.state, mismatchKey);
|
|
19681
|
+
clearShipAttention(o.state, overrideKey);
|
|
19674
19682
|
if (ALLOW_UNDECLARED_TRACKER_APPS) {
|
|
19675
|
-
await raiseShipAttention(o, undeclaredItem());
|
|
19683
|
+
await raiseShipAttention(o, undeclaredItem(name));
|
|
19676
19684
|
return null;
|
|
19677
19685
|
}
|
|
19678
19686
|
const message2 = "the app declares no work-tracker interface and this crew requires one \u2014 no ticket will be picked. Update the app\u2019s Issues template. Resumes automatically once it declares one";
|
|
19679
|
-
await raiseShipAttention(o, mismatchItem(message2));
|
|
19687
|
+
await raiseShipAttention(o, mismatchItem(name, message2));
|
|
19680
19688
|
return message2;
|
|
19681
19689
|
}
|
|
19682
|
-
clearShipAttention(o.state,
|
|
19683
|
-
if (o.route.contractAuthored) await raiseShipAttention(o, overrideItem());
|
|
19684
|
-
else clearShipAttention(o.state,
|
|
19690
|
+
clearShipAttention(o.state, undeclaredKey);
|
|
19691
|
+
if (o.route.contractAuthored) await raiseShipAttention(o, overrideItem(name));
|
|
19692
|
+
else clearShipAttention(o.state, overrideKey);
|
|
19685
19693
|
const message = blockingMessage(state, r.trackerInterface?.mappingKey);
|
|
19686
19694
|
if (message) {
|
|
19687
|
-
await raiseShipAttention(o, mismatchItem(message));
|
|
19695
|
+
await raiseShipAttention(o, mismatchItem(name, message));
|
|
19688
19696
|
return message;
|
|
19689
19697
|
}
|
|
19690
|
-
clearShipAttention(o.state,
|
|
19698
|
+
clearShipAttention(o.state, mismatchKey);
|
|
19691
19699
|
return null;
|
|
19692
19700
|
}
|
|
19693
19701
|
async function readForRoute(route2, ship) {
|
|
@@ -29169,7 +29177,7 @@ import { dirname as dirOf2, resolve as resolvePath } from "path";
|
|
|
29169
29177
|
import { existsSync as existsSync56, readdirSync as readdirSync18, statSync as statSync17 } from "fs";
|
|
29170
29178
|
import { join as join60 } from "path";
|
|
29171
29179
|
function builtVersion() {
|
|
29172
|
-
return true ? "0.163.
|
|
29180
|
+
return true ? "0.163.1" : null;
|
|
29173
29181
|
}
|
|
29174
29182
|
var REBUILD_HINT = "rebuild with npm run build";
|
|
29175
29183
|
function newestMtime(path) {
|
package/package.json
CHANGED