@bli-cockpit/cli 0.2.82 → 0.2.84
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/commands/local-args-tower-search.js +17 -4
- package/dist/commands/local-command-shapes-search.js +18 -0
- package/dist/commands/memory-hook-counts.js +1 -0
- package/dist/commands/ops.js +3 -0
- package/dist/commands/public-root.js +1 -1
- package/dist/commands/search.js +8 -1
- package/package.json +4 -4
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* Its own sibling of `local-args-tower.ts` rather than folded into
|
|
5
5
|
* `local-args-tower-pages.ts` or `-docs-msg.ts`: search is not one surface's
|
|
6
6
|
* verb, it is the door OVER all of them — documents, messages, issues, meeting
|
|
7
|
-
* notes
|
|
8
|
-
*
|
|
7
|
+
* notes, the caller's own mail and calendar (BLI-3880), and memory — and
|
|
8
|
+
* putting it under any one family's doc comment would say something untrue
|
|
9
|
+
* about what it reads.
|
|
9
10
|
*
|
|
10
11
|
* The query is a POSITIONAL, not a flag, because that is how every search
|
|
11
12
|
* command a person has ever typed works (`grep`, `rg`, `gh search`). Several
|
|
@@ -13,8 +14,20 @@
|
|
|
13
14
|
* behaves the way it looks, without demanding quotes.
|
|
14
15
|
*/
|
|
15
16
|
import { optionalNonEmpty, optionalPositiveInteger, optionalUrl, parseNamedArgs, } from "./local-arg-values.js";
|
|
16
|
-
/**
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Every corpus. Kept here so an unknown kind is refused BEFORE a round trip,
|
|
19
|
+
* and mirrors `SEARCH_KINDS` in the dashboard — nothing in the type system ties
|
|
20
|
+
* the two lists together.
|
|
21
|
+
*/
|
|
22
|
+
export const SEARCH_KINDS = [
|
|
23
|
+
"doc",
|
|
24
|
+
"msg",
|
|
25
|
+
"issue",
|
|
26
|
+
"note",
|
|
27
|
+
"mail",
|
|
28
|
+
"cal",
|
|
29
|
+
"memory",
|
|
30
|
+
];
|
|
18
31
|
export function parseSearchArgs(args) {
|
|
19
32
|
const values = parseNamedArgs(args, {
|
|
20
33
|
allowedFlags: ["--home", "--dashboard-url", "--kind", "--limit", "--json"],
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of `cockpit search` (BLI-3728; split out of
|
|
3
|
+
* `local-command-shapes.ts` by BLI-3880).
|
|
4
|
+
*
|
|
5
|
+
* Its own module for the reason the verb itself has one
|
|
6
|
+
* (`local-args-tower-search.ts`): search is not one surface's verb, it is the
|
|
7
|
+
* door OVER all of them, so it sits beside the surface families rather than
|
|
8
|
+
* inside any of them. Two more corpora also pushed the shape file past this
|
|
9
|
+
* repo's readability ceiling, and a member with a paragraph of its own is
|
|
10
|
+
* exactly the member to lift out first.
|
|
11
|
+
*
|
|
12
|
+
* `local-command-shapes.ts` imports this type and keeps `SearchCommandShape`
|
|
13
|
+
* in the `LocalCommand` union, so nothing that reads a parsed command changed.
|
|
14
|
+
* A new module here must also join `scripts/build-public-cli.mjs`
|
|
15
|
+
* `runtimeFiles` — but this one is types only, erased at build, and the CLI's
|
|
16
|
+
* own runtime-file assert is what proves it either way.
|
|
17
|
+
*/
|
|
18
|
+
export {};
|
package/dist/commands/ops.js
CHANGED
|
@@ -144,6 +144,9 @@ async function runOpsStatus(command, io, tower) {
|
|
|
144
144
|
// misses.
|
|
145
145
|
memory_hook_runs_24h: memory?.hooks?.totals?.runs ?? null,
|
|
146
146
|
memory_hook_timeouts_24h: memory?.hooks?.totals?.timeouts ?? null,
|
|
147
|
+
// BLI-3881: runs the hook declined to search for. A SUBSET of runs, so
|
|
148
|
+
// `runs - skipped_trivial` is how many turns actually asked the door.
|
|
149
|
+
memory_hook_skipped_trivial_24h: memory?.hooks?.totals?.skippedTrivial ?? null,
|
|
147
150
|
memory_hook_devices_reporting: memory?.hooks?.reporting ?? null,
|
|
148
151
|
})}`);
|
|
149
152
|
return unhealthy.length > 0 ? 1 : 0;
|
|
@@ -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.84");
|
|
19
19
|
return 0;
|
|
20
20
|
}
|
|
21
21
|
|
package/dist/commands/search.js
CHANGED
|
@@ -29,14 +29,21 @@ import { writeLine } from "./cli-io.js";
|
|
|
29
29
|
const TAG = "[search cli]";
|
|
30
30
|
const READ_DEADLINE_MS = 30_000;
|
|
31
31
|
/** Group headings, in the order a person reads them. Mirrors the overlay. */
|
|
32
|
+
// Mirrors `SEARCH_KIND_LABELS` / `SEARCH_KINDS` in the dashboard
|
|
33
|
+
// (BLI-3880 added mail and cal). A kind the door returns that is missing here
|
|
34
|
+
// still prints — upper-cased — rather than vanishing, which is why the map is
|
|
35
|
+
// keyed loosely: an older CLI against a newer door must show the group, not
|
|
36
|
+
// swallow it.
|
|
32
37
|
const KIND_LABELS = {
|
|
33
38
|
doc: "DOCUMENTS",
|
|
34
39
|
msg: "MESSAGES",
|
|
35
40
|
issue: "ISSUES",
|
|
36
41
|
note: "MEETING NOTES",
|
|
42
|
+
mail: "MAIL",
|
|
43
|
+
cal: "CALENDAR",
|
|
37
44
|
memory: "MEMORY",
|
|
38
45
|
};
|
|
39
|
-
const KIND_ORDER = ["doc", "msg", "issue", "note", "memory"];
|
|
46
|
+
const KIND_ORDER = ["doc", "msg", "issue", "note", "mail", "cal", "memory"];
|
|
40
47
|
export async function runSearch(command, io) {
|
|
41
48
|
const door = await openAgentDoor("search", command, io);
|
|
42
49
|
const params = new URLSearchParams({ q: command.query });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bli-cockpit/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.84",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"test": "node dist/cli.js --help && node ../../scripts/assert-public-cli-routing.mjs && node ../../scripts/assert-public-cli-verb-help.mjs && node ../../scripts/assert-public-cli-runtime-files.mjs && node ../../scripts/assert-public-cli-no-fleet-posts.mjs && node ../../scripts/assert-public-package-pack.mjs --workspace=@bli-cockpit/cli"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@bli-cockpit/memory-mcp": "0.1.
|
|
31
|
-
"@bli-cockpit/mcp": "0.1.
|
|
32
|
-
"@bli-cockpit/telemetry-core": "0.1.
|
|
30
|
+
"@bli-cockpit/memory-mcp": "0.1.16",
|
|
31
|
+
"@bli-cockpit/mcp": "0.1.18",
|
|
32
|
+
"@bli-cockpit/telemetry-core": "0.1.34"
|
|
33
33
|
}
|
|
34
34
|
}
|