@indigoai-us/hq-cli 5.345.86 → 5.345.87
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/CHANGELOG.md +22 -0
- package/dist/command-catalog.generated.d.ts +5 -1
- package/dist/command-catalog.generated.js +6 -1
- package/dist/commands/bot.d.ts +60 -12
- package/dist/commands/bot.js +349 -98
- package/dist/commands/storage-core.d.ts +2 -0
- package/dist/commands/storage-core.js +12 -1
- package/dist/commands/storage-offload.d.ts +10 -0
- package/dist/commands/storage-offload.js +4 -0
- package/dist/commands/storage.d.ts +6 -0
- package/dist/commands/storage.js +25 -6
- package/dist/lib/bot/api.d.ts +15 -0
- package/dist/lib/bot/api.js +11 -0
- package/dist/lib/bot/config.d.ts +6 -0
- package/dist/lib/bot/display-name.d.ts +64 -0
- package/dist/lib/bot/display-name.js +117 -0
- package/dist/lib/bot/index.d.ts +2 -0
- package/dist/lib/bot/index.js +2 -0
- package/dist/lib/bot/lock.d.ts +84 -0
- package/dist/lib/bot/lock.js +313 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [5.345.87] — 2026-10-11
|
|
6
|
+
- `hq bot create setup` no longer fails when HQ's assistant is already on this
|
|
7
|
+
computer. It answers `ok` with `outcome` `existing`, `adopted` or `created`,
|
|
8
|
+
and applies `--display-name`, `--intro` and `--kickoff` when it brings the
|
|
9
|
+
assistant back from HQ (the intro and kickoff are kept on this computer;
|
|
10
|
+
only the name is saved in HQ). The name goes through the new name route, or
|
|
11
|
+
stays on this computer when the server does not have that route yet.
|
|
12
|
+
`create`, `adopt`, `restore`, `rm` and `set` now take a per-bot lock, so two
|
|
13
|
+
of them for the same bot run one after the other instead of racing (a lock
|
|
14
|
+
left by a crashed command is reclaimed). `hq bot list`, `list --remote` and
|
|
15
|
+
`restore` report each bot's `displayName` (never its handle) and `role`
|
|
16
|
+
(`assistant` for HQ's setup assistant).
|
|
17
|
+
- New `hq bot set <name> --display-name <name> [--json]` renames a bot. The
|
|
18
|
+
name is saved in HQ (the bot's name, profile and saved settings together),
|
|
19
|
+
then on this computer, and a running bot restarts so it introduces itself by
|
|
20
|
+
the new name. A stopped bot stays stopped. When the server does not have the
|
|
21
|
+
name route yet, the name is kept on this computer (`nameSaved: "local-only"`);
|
|
22
|
+
if HQ refuses the name, nothing changes.
|
|
23
|
+
- `hq storage offload` no longer repeats "Nothing was uploaded or changed." when linked worktrees still use every old file version.
|
|
24
|
+
- A refused `hq storage prune --json` now includes a plain `message` in `local`, the same as offload's refusal. Existing fields are unchanged.
|
|
25
|
+
- A dry run of `hq storage prune` or `hq storage offload` that predicts a refusal now exits 0 instead of 4 or 5. The JSON still reports `refused` and `message`, and an offload dry run also reports `history.would_refuse` (`code`, `message`, `holders`), which is `null` when a real run would go ahead. A real run that refuses still exits 4 (nothing to free) or 5 (precondition).
|
|
26
|
+
|
|
5
27
|
## [5.345.86] — 2026-10-11
|
|
6
28
|
- New `hq scan secrets`: an offline secret scanner for the pre-commit gate. It
|
|
7
29
|
checks the staged changes (or given files) against the gitleaks default rule
|
|
@@ -15821,7 +15821,7 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
15821
15821
|
readonly subcommands: readonly [];
|
|
15822
15822
|
}, {
|
|
15823
15823
|
readonly name: "set";
|
|
15824
|
-
readonly description: "Change the model and thinking level a bot uses (applies from its next message)";
|
|
15824
|
+
readonly description: "Change the model and thinking level a bot uses (applies from its next message), or the name people see for it (saved in HQ; a running bot restarts to use it)";
|
|
15825
15825
|
readonly aliases: readonly [];
|
|
15826
15826
|
readonly hidden: false;
|
|
15827
15827
|
readonly helpOption: true;
|
|
@@ -15838,6 +15838,10 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
15838
15838
|
readonly flags: "--model <model>";
|
|
15839
15839
|
readonly description: "Model id for the runtime CLI, or default for the CLI's own default";
|
|
15840
15840
|
readonly hidden: false;
|
|
15841
|
+
}, {
|
|
15842
|
+
readonly flags: "--display-name <name>";
|
|
15843
|
+
readonly description: "The name people see for the bot in HQ (up to 35 chars). The handle stays <name>";
|
|
15844
|
+
readonly hidden: false;
|
|
15841
15845
|
}, {
|
|
15842
15846
|
readonly flags: "--effort <level>";
|
|
15843
15847
|
readonly description: "Thinking level (claude low|medium|high|xhigh|max; codex minimal|low|medium|high|xhigh; grok low|medium|high|xhigh), or default (medium)";
|
|
@@ -19266,7 +19266,7 @@ export const COMMAND_CATALOG = [
|
|
|
19266
19266
|
},
|
|
19267
19267
|
{
|
|
19268
19268
|
"name": "set",
|
|
19269
|
-
"description": "Change the model and thinking level a bot uses (applies from its next message)",
|
|
19269
|
+
"description": "Change the model and thinking level a bot uses (applies from its next message), or the name people see for it (saved in HQ; a running bot restarts to use it)",
|
|
19270
19270
|
"aliases": [],
|
|
19271
19271
|
"hidden": false,
|
|
19272
19272
|
"helpOption": true,
|
|
@@ -19287,6 +19287,11 @@ export const COMMAND_CATALOG = [
|
|
|
19287
19287
|
"description": "Model id for the runtime CLI, or default for the CLI's own default",
|
|
19288
19288
|
"hidden": false
|
|
19289
19289
|
},
|
|
19290
|
+
{
|
|
19291
|
+
"flags": "--display-name <name>",
|
|
19292
|
+
"description": "The name people see for the bot in HQ (up to 35 chars). The handle stays <name>",
|
|
19293
|
+
"hidden": false
|
|
19294
|
+
},
|
|
19290
19295
|
{
|
|
19291
19296
|
"flags": "--effort <level>",
|
|
19292
19297
|
"description": "Thinking level (claude low|medium|high|xhigh|max; codex minimal|low|medium|high|xhigh; grok low|medium|high|xhigh), or default (medium)",
|
package/dist/commands/bot.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { type RuntimeSignInIssue } from "../lib/bot/runtime-sign-in.js";
|
|
3
3
|
import { probeBotRuntime, type RuntimeProbeResult } from "../lib/bot/probe.js";
|
|
4
|
-
import { type BotLocalConfig, type MyLocalBot, type BotKind, type BotMemoryMode, type BotNotRunnableReason, type BotConfig, type BotRuntimeId, type LaunchctlExec } from "../lib/bot/index.js";
|
|
4
|
+
import { type BotLocalConfig, type MyLocalBot, type BotKind, type BotMemoryMode, type BotNotRunnableReason, type BotConfig, type BotRuntimeId, type LaunchctlExec, type BotRole } from "../lib/bot/index.js";
|
|
5
5
|
/** Real launchctl; every failure is a non-ok result, never a throw. */
|
|
6
6
|
export declare const defaultLaunchctl: LaunchctlExec;
|
|
7
7
|
/** The desktop app creates HQ's setup bot under this name, always from the `setup` worker. */
|
|
@@ -61,7 +61,13 @@ export interface BotRow {
|
|
|
61
61
|
memory: BotMemoryMode;
|
|
62
62
|
/** Absolute memory folder. */
|
|
63
63
|
memoryDir: string;
|
|
64
|
+
/**
|
|
65
|
+
* The name people see: the cloud's name when HQ could be asked, else the
|
|
66
|
+
* copy in bot.json. Never the handle or slug; absent when there is no name.
|
|
67
|
+
*/
|
|
64
68
|
displayName?: string;
|
|
69
|
+
/** "assistant" for HQ's setup assistant, null for every other bot. */
|
|
70
|
+
role: BotRole;
|
|
65
71
|
intro?: string;
|
|
66
72
|
kickoff?: string;
|
|
67
73
|
}
|
|
@@ -101,7 +107,7 @@ export declare function resolveCreateKind(opts: {
|
|
|
101
107
|
kind: BotKind;
|
|
102
108
|
companies: string[];
|
|
103
109
|
};
|
|
104
|
-
export
|
|
110
|
+
export interface BotCreateOptions {
|
|
105
111
|
runtime?: string;
|
|
106
112
|
model?: string;
|
|
107
113
|
effort?: string;
|
|
@@ -116,7 +122,19 @@ export declare function runBotCreate(nameArg: string, opts: {
|
|
|
116
122
|
memory?: string;
|
|
117
123
|
kind?: string;
|
|
118
124
|
company?: string[];
|
|
119
|
-
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Which way `hq bot create` went. For HQ's setup assistant all three are a
|
|
128
|
+
* success: "existing" (already set up here), "adopted" (brought back from the
|
|
129
|
+
* cloud), "created" (new). Any other bot that already exists here still fails.
|
|
130
|
+
*/
|
|
131
|
+
export type BotCreateOutcome = "existing" | "adopted" | "created";
|
|
132
|
+
/**
|
|
133
|
+
* `hq bot create`. Runs under the bot's lock, so a create racing an adopt,
|
|
134
|
+
* restore, rm or set of the same bot waits for it instead of tripping over
|
|
135
|
+
* its half-written folder.
|
|
136
|
+
*/
|
|
137
|
+
export declare function runBotCreate(nameArg: string, opts: BotCreateOptions): Promise<void>;
|
|
120
138
|
export declare function runBotCompanies(nameArg: string, opts: {
|
|
121
139
|
add?: string[];
|
|
122
140
|
remove?: string[];
|
|
@@ -126,15 +144,27 @@ export declare function runBotWorkers(opts: {
|
|
|
126
144
|
json?: boolean;
|
|
127
145
|
}): Promise<void>;
|
|
128
146
|
/**
|
|
129
|
-
* `hq bot set <name> --model <id|default> --effort <level|default
|
|
130
|
-
* what the bot thinks with
|
|
131
|
-
*
|
|
147
|
+
* `hq bot set <name> [--model <id|default>] [--effort <level|default>]
|
|
148
|
+
* [--display-name <name>]`: change what the bot thinks with, or the name
|
|
149
|
+
* people see.
|
|
150
|
+
*
|
|
151
|
+
* Model and thinking level live in bot.json, which is re-read on every turn,
|
|
152
|
+
* so the next message uses them; no restart.
|
|
153
|
+
*
|
|
154
|
+
* A name is written to HQ first (PUT /v1/agents/{uid}/display-name: entity
|
|
155
|
+
* name, profile and saved settings together), then to bot.json. A running bot
|
|
156
|
+
* builds its system prompt once at start, so it is restarted to pick the name
|
|
157
|
+
* up; a stopped bot is left stopped. A server without the name route yet keeps
|
|
158
|
+
* the name on this computer only (`nameSaved: "local-only"`); any other refusal
|
|
159
|
+
* from HQ changes nothing and fails.
|
|
132
160
|
*/
|
|
133
|
-
export
|
|
161
|
+
export interface BotSetOptions {
|
|
134
162
|
model?: string;
|
|
135
163
|
effort?: string;
|
|
164
|
+
displayName?: string;
|
|
136
165
|
json?: boolean;
|
|
137
|
-
}
|
|
166
|
+
}
|
|
167
|
+
export declare function runBotSet(nameArg: string, opts: BotSetOptions): Promise<void>;
|
|
138
168
|
/** `hq bot probe`: exit code 0 when the runtime answered, 1 when it did not. */
|
|
139
169
|
export declare function runBotProbe(opts: {
|
|
140
170
|
runtime?: string;
|
|
@@ -219,16 +249,22 @@ export declare function configFromLocalConfig(input: {
|
|
|
219
249
|
hqRoot: string;
|
|
220
250
|
dir: string;
|
|
221
251
|
local: BotLocalConfig | null;
|
|
222
|
-
overrides?:
|
|
223
|
-
runtime?: BotRuntimeId;
|
|
224
|
-
model?: string;
|
|
225
|
-
};
|
|
252
|
+
overrides?: BotAdoptOverrides;
|
|
226
253
|
preserveFirstStart?: boolean;
|
|
227
254
|
now?: () => Date;
|
|
228
255
|
}): {
|
|
229
256
|
config: BotConfig;
|
|
230
257
|
notes: string[];
|
|
231
258
|
};
|
|
259
|
+
/** What an adopt may set over the settings the cloud kept for the bot. */
|
|
260
|
+
export interface BotAdoptOverrides {
|
|
261
|
+
runtime?: BotRuntimeId;
|
|
262
|
+
model?: string;
|
|
263
|
+
/** The name for this start (create's --display-name), over yesterday's saved one. */
|
|
264
|
+
displayName?: string;
|
|
265
|
+
intro?: string;
|
|
266
|
+
kickoff?: string;
|
|
267
|
+
}
|
|
232
268
|
export interface BotAdoptResult {
|
|
233
269
|
name: string;
|
|
234
270
|
agentUid: string;
|
|
@@ -241,6 +277,10 @@ export interface BotAdoptResult {
|
|
|
241
277
|
memoryDir: string;
|
|
242
278
|
/** True when the cloud had no saved settings and defaults were used. */
|
|
243
279
|
defaulted: boolean;
|
|
280
|
+
/** The name people see, from the saved settings (or this start's override); null when it has none. */
|
|
281
|
+
displayName: string | null;
|
|
282
|
+
/** "assistant" for HQ's setup assistant, else null. */
|
|
283
|
+
role: BotRole;
|
|
244
284
|
notes: string[];
|
|
245
285
|
daemon: string | null;
|
|
246
286
|
}
|
|
@@ -259,6 +299,10 @@ export interface BotRestoreRow {
|
|
|
259
299
|
detail: string;
|
|
260
300
|
/** Present only on a bot skipped because this computer cannot run it. */
|
|
261
301
|
reason?: BotNotRunnableReason;
|
|
302
|
+
/** The name people see (the cloud's), never the handle or slug; null when it has none. */
|
|
303
|
+
displayName: string | null;
|
|
304
|
+
/** "assistant" for HQ's setup assistant, else null. */
|
|
305
|
+
role: BotRole;
|
|
262
306
|
}
|
|
263
307
|
/**
|
|
264
308
|
* `hq bot restore` — every local bot this account owns that is not set up on
|
|
@@ -285,6 +329,10 @@ export interface RemoteBotRow {
|
|
|
285
329
|
runnable: boolean;
|
|
286
330
|
/** Why not, when `runnable` is false: the same vocabulary adopt and restore use. */
|
|
287
331
|
reason: BotNotRunnableReason | null;
|
|
332
|
+
/** The name people see (the cloud's), never the handle or slug; null when it has none. */
|
|
333
|
+
displayName: string | null;
|
|
334
|
+
/** "assistant" for HQ's setup assistant, else null. */
|
|
335
|
+
role: BotRole;
|
|
288
336
|
}
|
|
289
337
|
export declare function registerBotCommand(program: Command): void;
|
|
290
338
|
//# sourceMappingURL=bot.d.ts.map
|