@hanamorilabs/tab 0.1.16 → 0.1.17
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 +11 -3
- package/dist/tab-docs.js +4 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -340,9 +340,12 @@ async function resolveAgent(config, opts = {}) {
|
|
|
340
340
|
return agents.env;
|
|
341
341
|
const cwd = process.cwd();
|
|
342
342
|
const project = opts.pick ? undefined : await readProject(cwd, harness);
|
|
343
|
-
|
|
344
|
-
|
|
343
|
+
// The key this machine holds for the folder's Agent. It is not proof the Agent still exists: the
|
|
344
|
+
// console may have archived it since, so the console is asked before anything launches on it.
|
|
345
|
+
const cached = project ? agents[project.agent] : undefined;
|
|
345
346
|
if (!config.token || !config.consoleUrl) {
|
|
347
|
+
if (cached)
|
|
348
|
+
return cached;
|
|
346
349
|
fail(`This machine is not logged in. Run ${bold("tab login")}.`);
|
|
347
350
|
return undefined;
|
|
348
351
|
}
|
|
@@ -351,6 +354,9 @@ async function resolveAgent(config, opts = {}) {
|
|
|
351
354
|
listed = await listAgents(config.consoleUrl, config.token);
|
|
352
355
|
}
|
|
353
356
|
catch (err) {
|
|
357
|
+
// The console cannot answer; the key on hand still runs, and the proxy refuses on its own if the Agent is gone.
|
|
358
|
+
if (cached)
|
|
359
|
+
return cached;
|
|
354
360
|
fail(err instanceof ConsoleApiError && err.status === 401 ? `Session expired. Run ${bold("tab login")}.` : String(err instanceof Error ? err.message : err));
|
|
355
361
|
return undefined;
|
|
356
362
|
}
|
|
@@ -359,8 +365,10 @@ async function resolveAgent(config, opts = {}) {
|
|
|
359
365
|
let created;
|
|
360
366
|
if (project) {
|
|
361
367
|
chosen = byName.get(project.agent);
|
|
368
|
+
if (chosen && cached)
|
|
369
|
+
return cached;
|
|
362
370
|
if (!chosen) {
|
|
363
|
-
warn(`${project.file} names Agent ${bold(project.agent)}, which ${listed.flock.name} no longer has.`);
|
|
371
|
+
warn(`${project.file} names Agent ${bold(project.agent)}, which ${listed.flock.name} no longer has (archived or deleted). Pick the Agent this folder runs as now.`);
|
|
364
372
|
}
|
|
365
373
|
}
|
|
366
374
|
if (!chosen) {
|
package/dist/tab-docs.js
CHANGED
|
@@ -211,7 +211,10 @@ export const TAB_COMMANDS = [
|
|
|
211
211
|
group: "agents",
|
|
212
212
|
usage: ["archive [agent]"],
|
|
213
213
|
summary: "Close an Agent for good and take it off the bill. Its history stays.",
|
|
214
|
-
details: [
|
|
214
|
+
details: [
|
|
215
|
+
"The tab closes for good, the Agent leaves the lists and stops counting towards the plan's Agents. Its ledger rows stay.",
|
|
216
|
+
"Its keys stop working everywhere (the proxies answer key_revoked). A folder still bound to it asks for an Agent again on the next launch.",
|
|
217
|
+
],
|
|
215
218
|
options: [{ flag: "--yes", what: "do not ask" }],
|
|
216
219
|
},
|
|
217
220
|
{
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Written by scripts/write-version.mjs from package.json at build; `tab version` prints it. */
|
|
2
|
-
export const TAB_VERSION = "0.1.
|
|
2
|
+
export const TAB_VERSION = "0.1.17";
|