@tablation/crew 0.156.0 → 0.156.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 +19 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -13213,10 +13213,20 @@ async function linkReleaseSeat(route2, client2, agentsModel, userAgent, readOnly
|
|
|
13213
13213
|
if (e instanceof CrewAgentFieldMissing) return { note: `Release: ${CREW_FIELD_MISSING_NOTE}` };
|
|
13214
13214
|
throw e;
|
|
13215
13215
|
}
|
|
13216
|
-
const seatRow = await client2
|
|
13216
|
+
const seatRow = await getSeatRow(client2, crewModelId, seatId);
|
|
13217
|
+
if (!seatRow) return { note: `Release: ${SEAT_MISSING_NOTE}` };
|
|
13217
13218
|
if (seatRow[CREW_AGENT_COLUMN] !== agentId) await client2.records.update(crewModelId, seatId, { [columnName]: agentId });
|
|
13218
13219
|
return { agentId };
|
|
13219
13220
|
}
|
|
13221
|
+
var SEAT_MISSING_NOTE = "the configured Crew row no longer exists (deleted?) \u2014 re-run `crew connect` to pick a seat";
|
|
13222
|
+
async function getSeatRow(client2, crewModelId, seatId) {
|
|
13223
|
+
try {
|
|
13224
|
+
return await client2.records.get(crewModelId, seatId);
|
|
13225
|
+
} catch (e) {
|
|
13226
|
+
if (e instanceof TablationApiError && e.status === 404) return null;
|
|
13227
|
+
throw e;
|
|
13228
|
+
}
|
|
13229
|
+
}
|
|
13220
13230
|
var NO_WRITE_NOTE = "this key has no write access to the Agents table";
|
|
13221
13231
|
var CREW_FIELD_MISSING_NOTE = "Crew table has no Agent field yet \u2014 a workspace admin's `crew agents sync` adds it";
|
|
13222
13232
|
var CrewAgentFieldMissing = class extends Error {
|
|
@@ -13251,7 +13261,11 @@ async function linkCrewSeats(route2, client2, agentsModelId, agentPersonas, user
|
|
|
13251
13261
|
outcomes.push({ role, action: readOnly ? "no_agents_row" : "persona_diverged" });
|
|
13252
13262
|
continue;
|
|
13253
13263
|
}
|
|
13254
|
-
const seatRow = await client2
|
|
13264
|
+
const seatRow = await getSeatRow(client2, crewModelId, seatId);
|
|
13265
|
+
if (!seatRow) {
|
|
13266
|
+
outcomes.push({ role, action: "seat_missing" });
|
|
13267
|
+
continue;
|
|
13268
|
+
}
|
|
13255
13269
|
if (seatRow[CREW_AGENT_COLUMN] === agentId) {
|
|
13256
13270
|
outcomes.push({ role, action: "already_linked" });
|
|
13257
13271
|
continue;
|
|
@@ -13328,6 +13342,8 @@ function describeCrewLink(o) {
|
|
|
13328
13342
|
return `${label}: ${CREW_FIELD_MISSING_NOTE}`;
|
|
13329
13343
|
case "no_agents_row":
|
|
13330
13344
|
return `${label}: no Agents row to link yet \u2014 a workspace admin's \`crew agents sync\` creates it; run it here afterwards to link this seat`;
|
|
13345
|
+
case "seat_missing":
|
|
13346
|
+
return `${label}: ${SEAT_MISSING_NOTE}`;
|
|
13331
13347
|
case "persona_diverged":
|
|
13332
13348
|
return `${label}: persona has local edits and was not synced this pass \u2014 skipped linking until it's resolved`;
|
|
13333
13349
|
}
|
|
@@ -28021,7 +28037,7 @@ import { dirname as dirOf2, resolve as resolvePath } from "path";
|
|
|
28021
28037
|
import { existsSync as existsSync56, readdirSync as readdirSync18, statSync as statSync17 } from "fs";
|
|
28022
28038
|
import { join as join60 } from "path";
|
|
28023
28039
|
function builtVersion() {
|
|
28024
|
-
return true ? "0.156.
|
|
28040
|
+
return true ? "0.156.1" : null;
|
|
28025
28041
|
}
|
|
28026
28042
|
var REBUILD_HINT = "rebuild with npm run build";
|
|
28027
28043
|
function newestMtime(path) {
|
package/package.json
CHANGED