@bli-cockpit/cli 0.2.127 → 0.2.128

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.
@@ -44,6 +44,7 @@ const ALLOWED_FLAGS = [
44
44
  "--limit",
45
45
  "--no-recent",
46
46
  "--custom-id",
47
+ "--alias",
47
48
  "--extract",
48
49
  "--file",
49
50
  "--content-stdin",
@@ -58,6 +59,7 @@ const VALUE_FLAGS = [
58
59
  "--container",
59
60
  "--limit",
60
61
  "--custom-id",
62
+ "--alias",
61
63
  "--file",
62
64
  "--reason",
63
65
  ];
@@ -71,6 +73,9 @@ export function parseMemoryStoreArgs(action, args) {
71
73
  if (action !== "search" && (values.flags.has("--limit") || values.booleans.has("--no-recent"))) {
72
74
  throw new Error("--limit and --no-recent only apply to memory search.");
73
75
  }
76
+ if (action !== "save" && values.flags.has("--alias")) {
77
+ throw new Error("--alias only applies to memory save.");
78
+ }
74
79
  if (action !== "save" && (values.flags.has("--custom-id") || values.booleans.has("--extract"))) {
75
80
  throw new Error("--custom-id and --extract only apply to memory save.");
76
81
  }
@@ -108,6 +113,7 @@ export function parseMemoryStoreArgs(action, args) {
108
113
  ...command,
109
114
  action,
110
115
  customId: optionalNonEmpty(values.flags.get("--custom-id")),
116
+ ...(values.flagValues.has("--alias") ? { aliases: values.flagValues.get("--alias") } : {}),
111
117
  extract: values.booleans.has("--extract"),
112
118
  filePath: optionalNonEmpty(values.flags.get("--file")),
113
119
  };
@@ -24,6 +24,7 @@ export function parseSettingsArgs(args) {
24
24
  "--brief-model",
25
25
  "--chat",
26
26
  "--memory",
27
+ "--note-reader",
27
28
  "--project",
28
29
  "--file",
29
30
  "--id",
@@ -37,6 +38,7 @@ export function parseSettingsArgs(args) {
37
38
  "--brief-model",
38
39
  "--chat",
39
40
  "--memory",
41
+ "--note-reader",
40
42
  "--project",
41
43
  "--file",
42
44
  "--id",
@@ -124,18 +126,21 @@ function parseCliFloorSection(rest, common) {
124
126
  }
125
127
  return { kind: "settings", section: "cli-floor", action: "set", floorVersion: version, ...common };
126
128
  }
127
- /** `settings models` or `settings models set --chat <key> / --memory <id>`. */
129
+ /** `settings models` or `settings models set --chat <key> / --memory <id> / --note-reader <id>`. */
128
130
  function parseModelsSection(rest, flags, common) {
129
131
  if (rest.length === 0) {
130
132
  return { kind: "settings", section: "models", action: "show", ...common };
131
133
  }
132
134
  if (rest[0] !== "set" || rest.length > 1) {
133
- throw new Error("settings models takes no verb, or `set --chat <key>` / `set --memory <id>`.");
135
+ throw new Error("settings models takes no verb, or `set --chat <key>` / `set --memory <id>` / `set --note-reader <id>`.");
134
136
  }
135
137
  const orgChatModel = optionalNonEmpty(flags.get("--chat"));
136
138
  const orgMemoryModel = optionalNonEmpty(flags.get("--memory"));
137
- if (!orgChatModel && !orgMemoryModel) {
138
- throw new Error("settings models set needs --chat <key>, --memory <id>, or both.");
139
+ // BLI-4484: the note reader is the third org-wide slot; the web page could
140
+ // set it since BLI-4045 and the CLI could not, which is the twin rule broken.
141
+ const orgNoteReaderModel = optionalNonEmpty(flags.get("--note-reader"));
142
+ if (!orgChatModel && !orgMemoryModel && !orgNoteReaderModel) {
143
+ throw new Error("settings models set needs --chat <key>, --memory <id>, --note-reader <id>, or any of them.");
139
144
  }
140
145
  return {
141
146
  kind: "settings",
@@ -143,6 +148,7 @@ function parseModelsSection(rest, flags, common) {
143
148
  action: "set",
144
149
  orgChatModel,
145
150
  orgMemoryModel,
151
+ orgNoteReaderModel,
146
152
  ...common,
147
153
  };
148
154
  }
@@ -156,7 +156,7 @@ export function localSubcommandHelp(command) {
156
156
  " Your teams and your two model choices. No flags = show.",
157
157
  " cockpit settings switches [set <key> <value>]",
158
158
  " Access and feature switches. Everyone may look; only an admin may set.",
159
- " cockpit settings models [set --chat <key>] [--memory <id>]",
159
+ " cockpit settings models [set --chat <key>] [--memory <id>] [--note-reader <id>]",
160
160
  " The ORG-WIDE model map. Admin only, in both directions.",
161
161
  " cockpit settings cli-floor [<version>]",
162
162
  " The fleet forced-update floor: every collector below it updates on its",
@@ -67,6 +67,7 @@ const SAVE_MD = `# save_memory
67
67
 
68
68
  \`\`\`
69
69
  in : { content: string (1-200000, required),
70
+ aliases?: string[] (up to 16 alternate names of 64 characters),
70
71
  containerTag?: string,
71
72
  customId?: string, // e.g. the session id — the upsert key
72
73
  metadata?: object }
@@ -100,6 +100,7 @@ export function runMemoryVerbList(io, json) {
100
100
  "The experience log:",
101
101
  " cockpit memory log <win|loss|noise> --store <bli|supermemory|both> \"<reason>\"",
102
102
  "",
103
+ "Save accepts repeated --alias names (up to 16 names of 64 characters).",
103
104
  "Omit --container and this repository's own memory space is used — the same",
104
105
  "space the bli-memory MCP server and its hooks read and write.",
105
106
  ]) {
@@ -184,6 +185,7 @@ async function saveMemory(command, door) {
184
185
  timeoutMs: WRITE_DEADLINE_MS,
185
186
  body: {
186
187
  content: body.text,
188
+ ...(command.aliases === undefined ? {} : { aliases: command.aliases }),
187
189
  containerTag,
188
190
  ...(command.customId ? { customId: command.customId } : {}),
189
191
  mode: command.extract ? "extract" : "verbatim",
@@ -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.127");
18
+ writeLine(io?.stdout ?? process.stdout, "0.2.128");
19
19
  return 0;
20
20
  }
21
21
 
@@ -187,6 +187,7 @@ async function setModels(command, tower, io) {
187
187
  body: {
188
188
  ...(command.orgChatModel ? { chatModel: parseModelKey(command.orgChatModel) } : {}),
189
189
  ...(command.orgMemoryModel ? { memoryModel: command.orgMemoryModel } : {}),
190
+ ...(command.orgNoteReaderModel ? { noteReaderModel: command.orgNoteReaderModel } : {}),
190
191
  },
191
192
  });
192
193
  if (!result.ok)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/cli",
3
- "version": "0.2.127",
3
+ "version": "0.2.128",
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-exit-contract.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.32",
31
- "@bli-cockpit/mcp": "0.1.54",
30
+ "@bli-cockpit/memory-mcp": "0.1.34",
31
+ "@bli-cockpit/mcp": "0.1.55",
32
32
  "@bli-cockpit/telemetry-core": "0.1.48"
33
33
  }
34
34
  }