@bli-cockpit/cli 0.2.61 → 0.2.62
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.
|
@@ -207,7 +207,15 @@ export async function sendOneTurn(context, prompt, io) {
|
|
|
207
207
|
trace_failed: trace?.filter((step) => step.status === "failed").length ?? 0,
|
|
208
208
|
model_requested: context.command.model ?? null,
|
|
209
209
|
elapsed_ms: Date.now() - startedAt,
|
|
210
|
-
|
|
210
|
+
// BLI-3786: `minted` is a conversation the DOOR opened for this call
|
|
211
|
+
// because nothing named one — read off the answer rather than guessed
|
|
212
|
+
// from the name, so this side keeps no copy of the server's rule. Never
|
|
213
|
+
// the thread name itself.
|
|
214
|
+
thread: body.thread && body.thread !== context.command.thread
|
|
215
|
+
? "minted"
|
|
216
|
+
: context.command.thread === "main"
|
|
217
|
+
? "default"
|
|
218
|
+
: "named",
|
|
211
219
|
subject: context.command.subject ? "selected" : "caller",
|
|
212
220
|
image_attached: attachment !== null,
|
|
213
221
|
image_byte_size: attachment?.bytes.byteLength ?? null,
|
|
@@ -289,21 +297,28 @@ export async function readHistory(context, io) {
|
|
|
289
297
|
writeThreadHistory(io, body);
|
|
290
298
|
}
|
|
291
299
|
else {
|
|
292
|
-
writeThreadList(io, body.threads ?? []);
|
|
300
|
+
writeThreadList(io, body.threads ?? [], body.agentThreads ?? 0);
|
|
293
301
|
}
|
|
294
302
|
writeLine(io.stderr, `[jarvis cli] history read ${JSON.stringify({
|
|
295
303
|
mode: command.history ? "thread" : "threads",
|
|
296
304
|
thread_count: body.threads?.length ?? null,
|
|
305
|
+
// BLI-3786: the per-call conversations a `--json` turn minted, folded
|
|
306
|
+
// out of the list by the door and counted here.
|
|
307
|
+
agent_thread_count: body.agentThreads ?? null,
|
|
297
308
|
message_count: body.messages?.length ?? null,
|
|
298
309
|
truncated: body.truncated ?? null,
|
|
299
310
|
})}`);
|
|
300
311
|
return 0;
|
|
301
312
|
}
|
|
302
|
-
function writeThreadList(io, threads) {
|
|
313
|
+
function writeThreadList(io, threads, agentThreads) {
|
|
303
314
|
if (threads.length === 0) {
|
|
304
315
|
// A real answer, not a blank. Nothing here means nothing was ever asked
|
|
305
|
-
// from this terminal, which is worth saying rather than implying
|
|
306
|
-
|
|
316
|
+
// from this terminal, which is worth saying rather than implying — and if
|
|
317
|
+
// the only conversations on this account were a program's, say THAT
|
|
318
|
+
// instead of "nothing was ever asked" (BLI-3786).
|
|
319
|
+
writeLine(io.stdout, agentThreads > 0
|
|
320
|
+
? `No conversations you named yet — ${agentThreads} one-off ${agentThreads === 1 ? "conversation" : "conversations"} from \`--json\` turns are not listed. Ask something with \`cockpit jarvis\`.`
|
|
321
|
+
: "No terminal conversations yet. Ask something with `cockpit jarvis`.");
|
|
307
322
|
return;
|
|
308
323
|
}
|
|
309
324
|
const styled = colorEnabled(io);
|
|
@@ -314,6 +329,10 @@ function writeThreadList(io, threads) {
|
|
|
314
329
|
writeLine(io.stdout, dim(` ${thread.preview}`, styled));
|
|
315
330
|
}
|
|
316
331
|
writeLine(io.stdout, "");
|
|
332
|
+
if (agentThreads > 0) {
|
|
333
|
+
// BLI-3786: never hidden without a number. Each one still replays by name.
|
|
334
|
+
writeLine(io.stdout, dim(`${agentThreads} one-off ${agentThreads === 1 ? "conversation" : "conversations"} from \`--json\` turns are not listed.`, styled));
|
|
335
|
+
}
|
|
317
336
|
writeLine(io.stdout, dim("Replay one with `cockpit jarvis --thread <name> --history`.", styled));
|
|
318
337
|
}
|
|
319
338
|
function writeThreadHistory(io, body) {
|
|
@@ -253,7 +253,8 @@ export function localSubcommandHelp(command) {
|
|
|
253
253
|
"That object carries answer, sources (the Source: lines inside it), turn_id (pass it to --trace), thread_id (pass it to --thread), proposal_id (the coding-arm proposal this turn made, or null), degraded and degraded_reasons — the SAME shape the bli-tower MCP server's jarvis_ask tool returns, so a script and an agent read one contract. reply/thread/traceId/model/trace/latency are still there beside it and still mean what they always meant.",
|
|
254
254
|
"A turn that outlives the dashboard's own ceiling is reported as turn_timed_out — an incomplete answer is never printed as a finished one.",
|
|
255
255
|
"The command uses the existing paired device identity. It cannot override the caller, team, role, or person scope.",
|
|
256
|
-
"
|
|
256
|
+
"A thread is SINGLE-WRITER: two turns in the same conversation at the same time can read each other, and one can answer the other's question. Your own terminal is one conversation, named main, and stays that way. A --json turn is a program's, so it gets a FRESH conversation per call unless --thread names one, and the answer's thread_id is the name it used — pass that back with --thread to continue it deliberately. On a --json turn, --thread main asks for the shared default nobody chose, so it is treated as naming nothing and a fresh conversation is minted anyway.",
|
|
257
|
+
"--threads lists the terminal conversations on this account; --thread <name> --history replays one (the newest --limit <n> messages). The per-call conversations a --json turn minted are counted rather than listed, and any one of them still replays by name. Neither takes a question, and neither can reach anybody else's conversations.",
|
|
257
258
|
"--trace <id|last> prints the step tree of one turn — every model step, tool call and server-side memory step, with how long each took, which model ran it, the tokens it spent and what failed. `last` opens the turn this machine asked most recently. Like --threads it takes no question and reaches no model.",
|
|
258
259
|
"Run `cockpit login` first if this machine is not paired.",
|
|
259
260
|
],
|
|
@@ -617,7 +618,7 @@ export function localSubcommandHelp(command) {
|
|
|
617
618
|
"",
|
|
618
619
|
"The words are positional and do not need quoting unless they contain shell metacharacters:",
|
|
619
620
|
'`cockpit search storage ceiling` and `cockpit search "storage ceiling"` are the same search.',
|
|
620
|
-
"Quoted phrases and -word work inside the query itself
|
|
621
|
+
"Quoted phrases and -word work inside the query itself — the query goes to Postgres's",
|
|
621
622
|
"websearch parser, which shrugs at anything a person can type instead of raising.",
|
|
622
623
|
"",
|
|
623
624
|
"--kind narrows to one or more corpora, comma separated. Omit it and all five are searched.",
|
|
@@ -627,11 +628,11 @@ export function localSubcommandHelp(command) {
|
|
|
627
628
|
"Every result is scoped by what YOU may read: four of the five corpora are searched on your",
|
|
628
629
|
"own database session, so a document or a channel you cannot open is not in the list.",
|
|
629
630
|
"",
|
|
630
|
-
"A corpus that could not ANSWER gets its own line, separately from \"nothing matched\"
|
|
631
|
+
"A corpus that could not ANSWER gets its own line, separately from \"nothing matched\" —",
|
|
631
632
|
"those are different facts and folding them together would let a broken search read as silence.",
|
|
632
633
|
"A memory result has no page to open; the text printed under it is the whole record.",
|
|
633
634
|
"",
|
|
634
|
-
"A refusal keeps Tower's own reason label
|
|
635
|
+
"A refusal keeps Tower's own reason label — needs_rls_client, query_too_short, query_too_long,",
|
|
635
636
|
"unknown_kind, read_failed.",
|
|
636
637
|
"The command uses the existing paired device identity. Run `cockpit login` first if this machine is not paired.",
|
|
637
638
|
],
|
|
@@ -15,7 +15,7 @@ export async function runCockpitCli(argv, io) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
if (command === "--version" || command === "-V" || command === "version") {
|
|
18
|
-
writeLine(io?.stdout ?? process.stdout, "0.2.
|
|
18
|
+
writeLine(io?.stdout ?? process.stdout, "0.2.62");
|
|
19
19
|
return 0;
|
|
20
20
|
}
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bli-cockpit/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.62",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@bli-cockpit/memory-mcp": "0.1.8",
|
|
31
|
-
"@bli-cockpit/mcp": "0.1.
|
|
31
|
+
"@bli-cockpit/mcp": "0.1.5",
|
|
32
32
|
"@bli-cockpit/telemetry-core": "0.1.29"
|
|
33
33
|
}
|
|
34
34
|
}
|