@indigoai-us/hq-cli 5.345.103 → 5.345.105
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 +97 -0
- package/assets/bot-workers/setup/skills/add-a-pack.md +130 -0
- package/assets/bot-workers/setup/worker.yaml +3 -0
- package/dist/command-catalog.generated.d.ts +206 -0
- package/dist/command-catalog.generated.js +246 -0
- package/dist/commands/bot.d.ts +10 -0
- package/dist/commands/bot.js +20 -12
- package/dist/commands/daemon.js +385 -1
- package/dist/commands/integrations-connect.d.ts +6 -0
- package/dist/commands/integrations-connect.js +36 -0
- package/dist/commands/integrations-slack.d.ts +30 -0
- package/dist/commands/integrations-slack.js +81 -0
- package/dist/commands/integrations.js +2 -0
- package/dist/commands/pack-install.d.ts +20 -1
- package/dist/commands/pack-install.js +80 -5
- package/dist/commands/pack-start-bot.d.ts +24 -0
- package/dist/commands/pack-start-bot.js +76 -0
- package/dist/commands/packs.d.ts +9 -0
- package/dist/commands/packs.js +26 -3
- package/dist/commands/pkg-install.js +11 -2
- package/dist/commands/secrets.d.ts +1 -5
- package/dist/commands/secrets.js +2 -92
- package/dist/lib/bot/config.d.ts +7 -0
- package/dist/lib/bot/daemon.js +2 -1
- package/dist/lib/bot/index.d.ts +2 -0
- package/dist/lib/bot/index.js +2 -0
- package/dist/lib/bot/lean-settings.d.ts +16 -0
- package/dist/lib/bot/lean-settings.js +34 -0
- package/dist/lib/bot/pack-link.d.ts +66 -0
- package/dist/lib/bot/pack-link.js +153 -0
- package/dist/lib/bot/pack-setup-driver.d.ts +37 -0
- package/dist/lib/bot/pack-setup-driver.js +83 -0
- package/dist/lib/bot/pack-setup.d.ts +62 -0
- package/dist/lib/bot/pack-setup.js +103 -0
- package/dist/lib/bot/prompt.d.ts +8 -0
- package/dist/lib/bot/prompt.js +5 -0
- package/dist/lib/bot/run.d.ts +18 -2
- package/dist/lib/bot/run.js +163 -25
- package/dist/lib/bot/runtime/claude.d.ts +27 -2
- package/dist/lib/bot/runtime/claude.js +49 -4
- package/dist/lib/bot/runtime/types.d.ts +5 -0
- package/dist/lib/bot/runtime-failure.d.ts +18 -2
- package/dist/lib/bot/runtime-failure.js +21 -1
- package/dist/lib/bot/toolchain.d.ts +25 -0
- package/dist/lib/bot/toolchain.js +33 -0
- package/dist/lib/bot/worker-source.d.ts +1 -0
- package/dist/lib/bot/worker-source.js +7 -1
- package/dist/lib/daemon/catalog.d.ts +15 -0
- package/dist/lib/daemon/catalog.js +49 -0
- package/dist/lib/daemon/paths.d.ts +1 -0
- package/dist/lib/daemon/paths.js +1 -0
- package/dist/lib/daemon/remote-control-forwarder.d.ts +14 -0
- package/dist/lib/daemon/remote-control-forwarder.js +104 -0
- package/dist/lib/daemon/remote-control-pools.d.ts +44 -0
- package/dist/lib/daemon/remote-control-pools.js +245 -0
- package/dist/lib/daemon/remote-control.d.ts +4 -0
- package/dist/lib/daemon/remote-control.js +17 -2
- package/dist/lib/daemon/run.js +126 -0
- package/dist/lib/doctor/fix/refresh-sync-progress.d.ts +5 -4
- package/dist/lib/doctor/fix/refresh-sync-progress.js +5 -4
- package/dist/lib/doctor/json-output.d.ts +19 -7
- package/dist/lib/doctor/json-output.js +16 -6
- package/dist/lib/packages/setup-block.d.ts +43 -0
- package/dist/lib/packages/setup-block.js +236 -0
- package/dist/lib/packages/setup-prompt.d.ts +34 -0
- package/dist/lib/packages/setup-prompt.js +128 -0
- package/dist/lib/packages/setup-takeover.d.ts +50 -0
- package/dist/lib/packages/setup-takeover.js +75 -0
- package/dist/lib/packages/start-bot.d.ts +47 -0
- package/dist/lib/packages/start-bot.js +66 -0
- package/dist/lib/session-company-lock.d.ts +7 -0
- package/dist/lib/session-company-lock.js +97 -0
- package/dist/types.d.ts +82 -0
- package/package.json +1 -1
|
@@ -162,6 +162,11 @@ export const COMMAND_CATALOG = [
|
|
|
162
162
|
"description": "Acknowledge an unsigned local directory source; marketplace installs always require a signature",
|
|
163
163
|
"hidden": false
|
|
164
164
|
},
|
|
165
|
+
{
|
|
166
|
+
"flags": "--start-bot",
|
|
167
|
+
"description": "After install, create and start the pack's setup bot (packs with a setup: block); prints `bot: <name>`",
|
|
168
|
+
"hidden": false
|
|
169
|
+
},
|
|
165
170
|
{
|
|
166
171
|
"flags": "--branch",
|
|
167
172
|
"description": "Follow a ref instead of SHA-pinning (git content-pack flow)",
|
|
@@ -651,6 +656,11 @@ export const COMMAND_CATALOG = [
|
|
|
651
656
|
"description": "Acknowledge an unsigned local directory source; marketplace installs always require a signature",
|
|
652
657
|
"hidden": false
|
|
653
658
|
},
|
|
659
|
+
{
|
|
660
|
+
"flags": "--start-bot",
|
|
661
|
+
"description": "After install, create and start the pack's setup bot (packs with a setup: block); prints `bot: <name>`",
|
|
662
|
+
"hidden": false
|
|
663
|
+
},
|
|
654
664
|
{
|
|
655
665
|
"flags": "--branch",
|
|
656
666
|
"description": "Follow a ref instead of SHA-pinning (git content-pack flow)",
|
|
@@ -5810,6 +5820,11 @@ export const COMMAND_CATALOG = [
|
|
|
5810
5820
|
"description": "How long to wait for a browser sign-in (default 300)",
|
|
5811
5821
|
"hidden": false
|
|
5812
5822
|
},
|
|
5823
|
+
{
|
|
5824
|
+
"flags": "--link-only",
|
|
5825
|
+
"description": "Print the sign-in link and exit without waiting; the sign-in finishes on the HQ console",
|
|
5826
|
+
"hidden": false
|
|
5827
|
+
},
|
|
5813
5828
|
{
|
|
5814
5829
|
"flags": "--force",
|
|
5815
5830
|
"description": "Connect again even if this app is already connected",
|
|
@@ -6487,6 +6502,68 @@ export const COMMAND_CATALOG = [
|
|
|
6487
6502
|
}
|
|
6488
6503
|
],
|
|
6489
6504
|
"subcommands": []
|
|
6505
|
+
},
|
|
6506
|
+
{
|
|
6507
|
+
"name": "slack",
|
|
6508
|
+
"description": "Connect your own Slack account to HQ (stored in your personal vault)",
|
|
6509
|
+
"aliases": [],
|
|
6510
|
+
"hidden": false,
|
|
6511
|
+
"helpOption": true,
|
|
6512
|
+
"helpCommand": true,
|
|
6513
|
+
"usage": "[options] [command]",
|
|
6514
|
+
"helpText": [],
|
|
6515
|
+
"arguments": [],
|
|
6516
|
+
"options": [],
|
|
6517
|
+
"subcommands": [
|
|
6518
|
+
{
|
|
6519
|
+
"name": "connect",
|
|
6520
|
+
"description": "Get Slack's sign-in link for your account; the sign-in finishes on HQ",
|
|
6521
|
+
"aliases": [],
|
|
6522
|
+
"hidden": false,
|
|
6523
|
+
"helpOption": true,
|
|
6524
|
+
"helpCommand": false,
|
|
6525
|
+
"usage": "[options]",
|
|
6526
|
+
"helpText": [],
|
|
6527
|
+
"arguments": [],
|
|
6528
|
+
"options": [
|
|
6529
|
+
{
|
|
6530
|
+
"flags": "--company <slug>",
|
|
6531
|
+
"description": "Company the Slack workspace belongs to (defaults to your single active company)",
|
|
6532
|
+
"hidden": false
|
|
6533
|
+
},
|
|
6534
|
+
{
|
|
6535
|
+
"flags": "--open",
|
|
6536
|
+
"description": "Open the link in the browser instead of only printing it",
|
|
6537
|
+
"hidden": false
|
|
6538
|
+
},
|
|
6539
|
+
{
|
|
6540
|
+
"flags": "--json",
|
|
6541
|
+
"description": "Machine-readable output: { url, opened }",
|
|
6542
|
+
"hidden": false
|
|
6543
|
+
}
|
|
6544
|
+
],
|
|
6545
|
+
"subcommands": []
|
|
6546
|
+
},
|
|
6547
|
+
{
|
|
6548
|
+
"name": "accounts",
|
|
6549
|
+
"description": "List your connected Slack accounts",
|
|
6550
|
+
"aliases": [],
|
|
6551
|
+
"hidden": false,
|
|
6552
|
+
"helpOption": true,
|
|
6553
|
+
"helpCommand": false,
|
|
6554
|
+
"usage": "[options]",
|
|
6555
|
+
"helpText": [],
|
|
6556
|
+
"arguments": [],
|
|
6557
|
+
"options": [
|
|
6558
|
+
{
|
|
6559
|
+
"flags": "--json",
|
|
6560
|
+
"description": "Machine-readable output",
|
|
6561
|
+
"hidden": false
|
|
6562
|
+
}
|
|
6563
|
+
],
|
|
6564
|
+
"subcommands": []
|
|
6565
|
+
}
|
|
6566
|
+
]
|
|
6490
6567
|
}
|
|
6491
6568
|
]
|
|
6492
6569
|
},
|
|
@@ -18895,6 +18972,79 @@ export const COMMAND_CATALOG = [
|
|
|
18895
18972
|
],
|
|
18896
18973
|
"subcommands": []
|
|
18897
18974
|
},
|
|
18975
|
+
{
|
|
18976
|
+
"name": "remote-control-pools",
|
|
18977
|
+
"description": "Validate, configure, and inspect opt-in Claude Remote Control account pools",
|
|
18978
|
+
"aliases": [],
|
|
18979
|
+
"hidden": false,
|
|
18980
|
+
"helpOption": true,
|
|
18981
|
+
"helpCommand": true,
|
|
18982
|
+
"usage": "[options] [command]",
|
|
18983
|
+
"helpText": [],
|
|
18984
|
+
"arguments": [],
|
|
18985
|
+
"options": [],
|
|
18986
|
+
"subcommands": [
|
|
18987
|
+
{
|
|
18988
|
+
"name": "validate",
|
|
18989
|
+
"description": "Validate a host-local desired-state JSON file without saving it",
|
|
18990
|
+
"aliases": [],
|
|
18991
|
+
"hidden": false,
|
|
18992
|
+
"helpOption": true,
|
|
18993
|
+
"helpCommand": false,
|
|
18994
|
+
"usage": "[options] <file>",
|
|
18995
|
+
"helpText": [],
|
|
18996
|
+
"arguments": [
|
|
18997
|
+
{
|
|
18998
|
+
"name": "file",
|
|
18999
|
+
"required": true,
|
|
19000
|
+
"variadic": false,
|
|
19001
|
+
"description": ""
|
|
19002
|
+
}
|
|
19003
|
+
],
|
|
19004
|
+
"options": [],
|
|
19005
|
+
"subcommands": []
|
|
19006
|
+
},
|
|
19007
|
+
{
|
|
19008
|
+
"name": "configure",
|
|
19009
|
+
"description": "Save a validated host-local desired-state JSON file",
|
|
19010
|
+
"aliases": [],
|
|
19011
|
+
"hidden": false,
|
|
19012
|
+
"helpOption": true,
|
|
19013
|
+
"helpCommand": false,
|
|
19014
|
+
"usage": "[options] <file>",
|
|
19015
|
+
"helpText": [],
|
|
19016
|
+
"arguments": [
|
|
19017
|
+
{
|
|
19018
|
+
"name": "file",
|
|
19019
|
+
"required": true,
|
|
19020
|
+
"variadic": false,
|
|
19021
|
+
"description": ""
|
|
19022
|
+
}
|
|
19023
|
+
],
|
|
19024
|
+
"options": [],
|
|
19025
|
+
"subcommands": []
|
|
19026
|
+
},
|
|
19027
|
+
{
|
|
19028
|
+
"name": "show",
|
|
19029
|
+
"description": "Show configured pool metadata (never secret values)",
|
|
19030
|
+
"aliases": [],
|
|
19031
|
+
"hidden": false,
|
|
19032
|
+
"helpOption": true,
|
|
19033
|
+
"helpCommand": false,
|
|
19034
|
+
"usage": "[options]",
|
|
19035
|
+
"helpText": [],
|
|
19036
|
+
"arguments": [],
|
|
19037
|
+
"options": [
|
|
19038
|
+
{
|
|
19039
|
+
"flags": "--json",
|
|
19040
|
+
"description": "Print JSON",
|
|
19041
|
+
"hidden": false
|
|
19042
|
+
}
|
|
19043
|
+
],
|
|
19044
|
+
"subcommands": []
|
|
19045
|
+
}
|
|
19046
|
+
]
|
|
19047
|
+
},
|
|
18898
19048
|
{
|
|
18899
19049
|
"name": "service",
|
|
18900
19050
|
"description": "Entry points the daemon runs for services that have no command of their own",
|
|
@@ -18949,6 +19099,97 @@ export const COMMAND_CATALOG = [
|
|
|
18949
19099
|
],
|
|
18950
19100
|
"subcommands": []
|
|
18951
19101
|
},
|
|
19102
|
+
{
|
|
19103
|
+
"name": "remote-control-pool",
|
|
19104
|
+
"description": "Keep one configured Claude Remote Control account pool running in its private mount namespace",
|
|
19105
|
+
"aliases": [],
|
|
19106
|
+
"hidden": false,
|
|
19107
|
+
"helpOption": true,
|
|
19108
|
+
"helpCommand": false,
|
|
19109
|
+
"usage": "[options]",
|
|
19110
|
+
"helpText": [],
|
|
19111
|
+
"arguments": [],
|
|
19112
|
+
"options": [
|
|
19113
|
+
{
|
|
19114
|
+
"flags": "--account-id <id>",
|
|
19115
|
+
"description": "Claude account ID from hq lanes accounts",
|
|
19116
|
+
"hidden": false
|
|
19117
|
+
}
|
|
19118
|
+
],
|
|
19119
|
+
"subcommands": []
|
|
19120
|
+
},
|
|
19121
|
+
{
|
|
19122
|
+
"name": "remote-control-pool-host",
|
|
19123
|
+
"description": "Run one pool's forwarder and Claude host inside its private namespace",
|
|
19124
|
+
"aliases": [],
|
|
19125
|
+
"hidden": false,
|
|
19126
|
+
"helpOption": true,
|
|
19127
|
+
"helpCommand": false,
|
|
19128
|
+
"usage": "[options]",
|
|
19129
|
+
"helpText": [],
|
|
19130
|
+
"arguments": [],
|
|
19131
|
+
"options": [
|
|
19132
|
+
{
|
|
19133
|
+
"flags": "--account-id <id>",
|
|
19134
|
+
"description": "Claude account ID from hq lanes accounts",
|
|
19135
|
+
"hidden": false
|
|
19136
|
+
}
|
|
19137
|
+
],
|
|
19138
|
+
"subcommands": []
|
|
19139
|
+
},
|
|
19140
|
+
{
|
|
19141
|
+
"name": "remote-control-pool-forwarder-host",
|
|
19142
|
+
"description": "Supervise one pool's personal HQ Secret injected inference forwarder",
|
|
19143
|
+
"aliases": [],
|
|
19144
|
+
"hidden": false,
|
|
19145
|
+
"helpOption": true,
|
|
19146
|
+
"helpCommand": false,
|
|
19147
|
+
"usage": "[options]",
|
|
19148
|
+
"helpText": [],
|
|
19149
|
+
"arguments": [],
|
|
19150
|
+
"options": [
|
|
19151
|
+
{
|
|
19152
|
+
"flags": "--account-id <id>",
|
|
19153
|
+
"description": "Claude account ID from hq lanes accounts",
|
|
19154
|
+
"hidden": false
|
|
19155
|
+
}
|
|
19156
|
+
],
|
|
19157
|
+
"subcommands": []
|
|
19158
|
+
},
|
|
19159
|
+
{
|
|
19160
|
+
"name": "remote-control-pool-forwarder",
|
|
19161
|
+
"description": "Run the loopback-only /v1/messages inference forwarder",
|
|
19162
|
+
"aliases": [],
|
|
19163
|
+
"hidden": false,
|
|
19164
|
+
"helpOption": true,
|
|
19165
|
+
"helpCommand": false,
|
|
19166
|
+
"usage": "[options]",
|
|
19167
|
+
"helpText": [],
|
|
19168
|
+
"arguments": [],
|
|
19169
|
+
"options": [
|
|
19170
|
+
{
|
|
19171
|
+
"flags": "--account-id <id>",
|
|
19172
|
+
"description": "Claude account ID from hq lanes accounts",
|
|
19173
|
+
"hidden": false
|
|
19174
|
+
},
|
|
19175
|
+
{
|
|
19176
|
+
"flags": "--port <port>",
|
|
19177
|
+
"description": "loopback listener port",
|
|
19178
|
+
"hidden": false
|
|
19179
|
+
},
|
|
19180
|
+
{
|
|
19181
|
+
"flags": "--secret-env <name>",
|
|
19182
|
+
"description": "HQ Secrets injected environment variable name",
|
|
19183
|
+
"hidden": false
|
|
19184
|
+
},
|
|
19185
|
+
{
|
|
19186
|
+
"flags": "--ready-file <path>",
|
|
19187
|
+
"description": "private daemon state file for listener ownership",
|
|
19188
|
+
"hidden": false
|
|
19189
|
+
}
|
|
19190
|
+
],
|
|
19191
|
+
"subcommands": []
|
|
19192
|
+
},
|
|
18952
19193
|
{
|
|
18953
19194
|
"name": "codex-remote-control",
|
|
18954
19195
|
"description": "Keep the box's Codex remote-control runner going in a tmux session, restarting it after a Codex update",
|
|
@@ -19218,6 +19459,11 @@ export const COMMAND_CATALOG = [
|
|
|
19218
19459
|
"hidden": false,
|
|
19219
19460
|
"defaultValue": "synced"
|
|
19220
19461
|
},
|
|
19462
|
+
{
|
|
19463
|
+
"flags": "--lean",
|
|
19464
|
+
"description": "Claude bots: run each turn without this computer's plugins, MCP servers and HQ's session hooks (HQ's tool hooks still run), so replies take seconds",
|
|
19465
|
+
"hidden": false
|
|
19466
|
+
},
|
|
19221
19467
|
{
|
|
19222
19468
|
"flags": "--no-daemon",
|
|
19223
19469
|
"description": "Do not install the launchd agent (macOS)",
|
package/dist/commands/bot.d.ts
CHANGED
|
@@ -122,6 +122,8 @@ export interface BotCreateOptions {
|
|
|
122
122
|
memory?: string;
|
|
123
123
|
kind?: string;
|
|
124
124
|
company?: string[];
|
|
125
|
+
/** Run the bot lean: no HQ hooks, MCP servers or setting sources (pack setup bots). */
|
|
126
|
+
lean?: boolean;
|
|
125
127
|
}
|
|
126
128
|
/**
|
|
127
129
|
* Which way `hq bot create` went. For HQ's setup assistant all three are a
|
|
@@ -176,6 +178,14 @@ export declare function runBotProbe(opts: {
|
|
|
176
178
|
}, deps?: {
|
|
177
179
|
probe?: typeof probeBotRuntime;
|
|
178
180
|
}): Promise<RuntimeProbeResult>;
|
|
181
|
+
export declare function runBotIntro(nameArg: string): Promise<void>;
|
|
182
|
+
/** True when a bot of this name exists on this computer (its bot.json reads). */
|
|
183
|
+
export declare function botExists(name: string): boolean;
|
|
184
|
+
/** `hq bot restart <name>`: stop, then start (launchd when installed). */
|
|
185
|
+
export declare function runBotRestart(nameArg: string, opts?: {
|
|
186
|
+
json?: boolean;
|
|
187
|
+
output?: "json" | "text" | "silent";
|
|
188
|
+
}): Promise<void>;
|
|
179
189
|
/**
|
|
180
190
|
* The one bot the caller means. Matches the local folder name, the cloud slug,
|
|
181
191
|
* the display name, or the agt_ uid; an ambiguous name is refused rather than
|
package/dist/commands/bot.js
CHANGED
|
@@ -852,6 +852,7 @@ async function runBotCreateLocked(name, opts) {
|
|
|
852
852
|
...(displayName ? { displayName } : {}),
|
|
853
853
|
...(intro ? { intro } : {}),
|
|
854
854
|
...(kickoff ? { kickoff } : {}),
|
|
855
|
+
...(opts.lean && runtime === "claude" ? { lean: true } : {}),
|
|
855
856
|
createdAt: new Date().toISOString(),
|
|
856
857
|
enabled: true,
|
|
857
858
|
};
|
|
@@ -1548,7 +1549,7 @@ export async function runBotProbe(opts, deps = {}) {
|
|
|
1548
1549
|
console.log(result.ok ? chalk.green(result.detail) : chalk.red(result.detail));
|
|
1549
1550
|
return result;
|
|
1550
1551
|
}
|
|
1551
|
-
async function runBotIntro(nameArg) {
|
|
1552
|
+
export async function runBotIntro(nameArg) {
|
|
1552
1553
|
const { name, dir, config } = requireBot(nameArg);
|
|
1553
1554
|
if (hasPromotionHold(dir))
|
|
1554
1555
|
throw new Error("This bot is held for cloud promotion. Continue its promotion before changing local settings or lifecycle.");
|
|
@@ -1557,6 +1558,22 @@ async function runBotIntro(nameArg) {
|
|
|
1557
1558
|
patchBotConfig(dir, { introSentAt: new Date().toISOString() });
|
|
1558
1559
|
console.log(chalk.green(`${name} introduced itself to you.`));
|
|
1559
1560
|
}
|
|
1561
|
+
/** True when a bot of this name exists on this computer (its bot.json reads). */
|
|
1562
|
+
export function botExists(name) {
|
|
1563
|
+
return readBotConfig(botDir(name)) !== null;
|
|
1564
|
+
}
|
|
1565
|
+
/** `hq bot restart <name>`: stop, then start (launchd when installed). */
|
|
1566
|
+
export async function runBotRestart(nameArg, opts = {}) {
|
|
1567
|
+
const b = requireBot(nameArg);
|
|
1568
|
+
const running = readBotStatus(b.dir);
|
|
1569
|
+
if (running && isPidAlive(running.pid) && selfStopProbe(running.pid)) {
|
|
1570
|
+
// The stop half would end this turn (and this command) before the
|
|
1571
|
+
// start half ran, leaving the bot down. Say so instead.
|
|
1572
|
+
throw new Error(`${b.name} cannot restart itself from inside one of its own turns: the stop would end this turn before the start ran. Run \`hq bot restart ${b.name}\` from outside the bot, or \`hq bot stop ${b.name}\` to stop it after this turn.`);
|
|
1573
|
+
}
|
|
1574
|
+
await stopBot(b.name, b.dir, b.config, "silent");
|
|
1575
|
+
await startBot(b.name, b.dir, b.config, opts.output ?? (opts.json ? "json" : "text"));
|
|
1576
|
+
}
|
|
1560
1577
|
// ── adopt / restore (bring a bot you own back to this computer) ──────────────
|
|
1561
1578
|
/**
|
|
1562
1579
|
* Which computer a re-issue is for. Never a secret and never an identifier the
|
|
@@ -2125,6 +2142,7 @@ export function registerBotCommand(program) {
|
|
|
2125
2142
|
.option("--intro <text>", `The hello the bot DMs you when it first comes online (verbatim, up to ${BOT_INTRO_MAX_CHARS} chars)`)
|
|
2126
2143
|
.option("--kickoff <prompt>", `A first task the bot starts on by itself right after its hello: one model turn run as if you had sent it, answered in your DM, once (up to ${BOT_KICKOFF_MAX_CHARS} chars)`)
|
|
2127
2144
|
.option("--memory <where>", "Where the bot keeps its memory: synced (personal/workers/<name>/memory in HQ) or local (~/.hq/bots/<name>/memory, this computer only)", "synced")
|
|
2145
|
+
.option("--lean", "Claude bots: run each turn without this computer's plugins, MCP servers and HQ's session hooks (HQ's tool hooks still run), so replies take seconds")
|
|
2128
2146
|
.option("--no-daemon", "Do not install the launchd agent (macOS)")
|
|
2129
2147
|
.option("--no-start", "Create without starting")
|
|
2130
2148
|
.option("--json", "Print machine-readable JSON")
|
|
@@ -2185,17 +2203,7 @@ export function registerBotCommand(program) {
|
|
|
2185
2203
|
.command("restart <name>")
|
|
2186
2204
|
.description("Stop then start the bot")
|
|
2187
2205
|
.option("--json", "Print machine-readable JSON")
|
|
2188
|
-
.action((name, opts) => wrap(
|
|
2189
|
-
const b = requireBot(name);
|
|
2190
|
-
const running = readBotStatus(b.dir);
|
|
2191
|
-
if (running && isPidAlive(running.pid) && selfStopProbe(running.pid)) {
|
|
2192
|
-
// The stop half would end this turn (and this command) before the
|
|
2193
|
-
// start half ran, leaving the bot down. Say so instead.
|
|
2194
|
-
throw new Error(`${b.name} cannot restart itself from inside one of its own turns: the stop would end this turn before the start ran. Run \`hq bot restart ${b.name}\` from outside the bot, or \`hq bot stop ${b.name}\` to stop it after this turn.`);
|
|
2195
|
-
}
|
|
2196
|
-
await stopBot(b.name, b.dir, b.config, "silent");
|
|
2197
|
-
await startBot(b.name, b.dir, b.config, opts.json ? "json" : "text");
|
|
2198
|
-
})());
|
|
2206
|
+
.action((name, opts) => wrap(() => runBotRestart(name, opts))());
|
|
2199
2207
|
bot
|
|
2200
2208
|
.command("status <name>")
|
|
2201
2209
|
.description("Show the bot's process, heartbeat, launchd, and credential state")
|