@phnx-labs/agents-cli 1.22.84 → 1.22.86

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.
Files changed (259) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +80 -53
  3. package/dist/bootstrap.d.ts +7 -6
  4. package/dist/bootstrap.js +20 -27
  5. package/dist/cli/command-registry.js +5 -1
  6. package/dist/commands/accounts.d.ts +6 -13
  7. package/dist/commands/accounts.js +330 -143
  8. package/dist/commands/alias.js +7 -3
  9. package/dist/commands/apply.js +1 -1
  10. package/dist/commands/auth-mint.d.ts +7 -3
  11. package/dist/commands/auth-mint.js +21 -9
  12. package/dist/commands/auth.js +2 -3
  13. package/dist/commands/browser.js +10 -10
  14. package/dist/commands/daemon.d.ts +7 -3
  15. package/dist/commands/daemon.js +40 -25
  16. package/dist/commands/doctor.js +28 -2
  17. package/dist/commands/exec.js +87 -39
  18. package/dist/commands/fleet-capture.js +21 -2
  19. package/dist/commands/harness-wizard.js +2 -2
  20. package/dist/commands/lease.js +7 -12
  21. package/dist/commands/profiles.d.ts +2 -2
  22. package/dist/commands/profiles.js +20 -13
  23. package/dist/commands/repo.js +3 -3
  24. package/dist/commands/run-account-picker.d.ts +3 -3
  25. package/dist/commands/run-account-picker.js +29 -30
  26. package/dist/commands/secrets-passthrough.d.ts +20 -0
  27. package/dist/commands/secrets-passthrough.js +43 -0
  28. package/dist/commands/setup-accounts.d.ts +3 -2
  29. package/dist/commands/setup-accounts.js +4 -4
  30. package/dist/commands/setup-secrets.d.ts +16 -21
  31. package/dist/commands/setup-secrets.js +43 -224
  32. package/dist/commands/ssh.js +2 -2
  33. package/dist/commands/sync.js +1 -1
  34. package/dist/commands/update.d.ts +10 -0
  35. package/dist/commands/update.js +43 -40
  36. package/dist/commands/versions.d.ts +11 -11
  37. package/dist/commands/versions.js +131 -83
  38. package/dist/commands/view.d.ts +1 -9
  39. package/dist/commands/view.js +41 -55
  40. package/dist/commands/webhook.js +5 -5
  41. package/dist/commands/workflows.js +2 -1
  42. package/dist/index.d.ts +12 -12
  43. package/dist/index.js +13 -42
  44. package/dist/lib/account-capabilities.d.ts +1 -1
  45. package/dist/lib/account-capabilities.js +1 -1
  46. package/dist/lib/account-catalog.d.ts +121 -6
  47. package/dist/lib/account-catalog.js +421 -7
  48. package/dist/lib/account-registry.d.ts +8 -30
  49. package/dist/lib/account-registry.js +36 -79
  50. package/dist/lib/account-schema.d.ts +1 -1
  51. package/dist/lib/account-schema.js +1 -1
  52. package/dist/lib/accounting/account-pool-collect.js +16 -4
  53. package/dist/lib/accounting/rotate.d.ts +20 -7
  54. package/dist/lib/accounting/rotate.js +89 -13
  55. package/dist/lib/accounting/usage.js +11 -16
  56. package/dist/lib/accounts/add.d.ts +138 -0
  57. package/dist/lib/accounts/add.js +651 -0
  58. package/dist/lib/accounts/migrate.d.ts +117 -0
  59. package/dist/lib/accounts/migrate.js +536 -0
  60. package/dist/lib/accounts/slots.d.ts +13 -0
  61. package/dist/lib/accounts/slots.js +100 -0
  62. package/dist/lib/agent-spec/agents.d.ts +16 -0
  63. package/dist/lib/agent-spec/agents.js +38 -4
  64. package/dist/lib/app-bundle-install.js +5 -4
  65. package/dist/lib/auth-health.d.ts +3 -0
  66. package/dist/lib/auth-health.js +11 -0
  67. package/dist/lib/auth-mint.d.ts +52 -16
  68. package/dist/lib/auth-mint.js +117 -39
  69. package/dist/lib/browser/chrome.d.ts +1 -1
  70. package/dist/lib/browser/chrome.js +5 -5
  71. package/dist/lib/byok-usage.js +3 -3
  72. package/dist/lib/claude-account-token.d.ts +47 -3
  73. package/dist/lib/claude-account-token.js +172 -50
  74. package/dist/lib/cloud/antigravity.js +4 -4
  75. package/dist/lib/cloud/cursor.js +4 -4
  76. package/dist/lib/crabbox/cli.d.ts +1 -1
  77. package/dist/lib/crabbox/cli.js +6 -6
  78. package/dist/lib/crabbox/runtimes.d.ts +3 -3
  79. package/dist/lib/crabbox/runtimes.js +5 -5
  80. package/dist/lib/daemon/account-state-daemon-service.d.ts +37 -1
  81. package/dist/lib/daemon/account-state-daemon-service.js +199 -3
  82. package/dist/lib/daemon/auth-sync-service.js +32 -1
  83. package/dist/lib/daemon/daemon.d.ts +6 -16
  84. package/dist/lib/daemon/daemon.js +52 -97
  85. package/dist/lib/daemon/daemon.test-fixture.d.ts +7 -9
  86. package/dist/lib/daemon/daemon.test-fixture.js +22 -40
  87. package/dist/lib/daemon/harness-update-service.d.ts +1 -1
  88. package/dist/lib/daemon/harness-update-service.js +1 -1
  89. package/dist/lib/daemon/runner.d.ts +15 -3
  90. package/dist/lib/daemon/runner.js +49 -24
  91. package/dist/lib/daemon-health.d.ts +1 -2
  92. package/dist/lib/daemon-health.js +7 -6
  93. package/dist/lib/daemon-services.d.ts +1 -1
  94. package/dist/lib/daemon-services.js +1 -11
  95. package/dist/lib/daemon-webhooks.d.ts +8 -7
  96. package/dist/lib/daemon-webhooks.js +10 -9
  97. package/dist/lib/device-config.js +1 -1
  98. package/dist/lib/devices/doctor-findings.d.ts +1 -1
  99. package/dist/lib/devices/harness-inventory.d.ts +39 -0
  100. package/dist/lib/devices/harness-inventory.js +126 -4
  101. package/dist/lib/doctor-diff.js +2 -1
  102. package/dist/lib/exec-account-home.d.ts +38 -0
  103. package/dist/lib/exec-account-home.js +164 -0
  104. package/dist/lib/exec.d.ts +30 -0
  105. package/dist/lib/exec.js +101 -31
  106. package/dist/lib/fleet/apply.d.ts +2 -2
  107. package/dist/lib/fleet/apply.js +4 -4
  108. package/dist/lib/fleet/auth-sync.js +4 -3
  109. package/dist/lib/fleet-shared-repo-sync.js +6 -9
  110. package/dist/lib/harness/adapter.d.ts +7 -7
  111. package/dist/lib/harness/adapter.js +10 -6
  112. package/dist/lib/harness/adapters/grok.js +8 -3
  113. package/dist/lib/harness/adapters/muse.js +1 -1
  114. package/dist/lib/harness/adapters/opencode.js +12 -3
  115. package/dist/lib/harness-auth-capabilities.d.ts +61 -0
  116. package/dist/lib/harness-auth-capabilities.js +52 -0
  117. package/dist/lib/helper-versions.d.ts +6 -4
  118. package/dist/lib/helper-versions.js +5 -4
  119. package/dist/lib/hosts/credential-transport.d.ts +10 -0
  120. package/dist/lib/hosts/credential-transport.js +37 -0
  121. package/dist/lib/hosts/dispatch.d.ts +7 -0
  122. package/dist/lib/hosts/dispatch.js +13 -6
  123. package/dist/lib/identity/client.d.ts +3 -3
  124. package/dist/lib/identity/client.js +3 -3
  125. package/dist/lib/installations/index.d.ts +1 -1
  126. package/dist/lib/installations/index.js +1 -1
  127. package/dist/lib/installations/migrate.js +9 -0
  128. package/dist/lib/installations/resolve.js +1 -1
  129. package/dist/lib/installations/shims.d.ts +21 -4
  130. package/dist/lib/installations/shims.js +86 -5
  131. package/dist/lib/installations/store.d.ts +43 -0
  132. package/dist/lib/installations/store.js +75 -7
  133. package/dist/lib/installations/versions.js +1 -1
  134. package/dist/lib/menubar/install-menubar.d.ts +3 -3
  135. package/dist/lib/menubar/install-menubar.js +3 -3
  136. package/dist/lib/native-accounts.d.ts +35 -0
  137. package/dist/lib/native-accounts.js +41 -0
  138. package/dist/lib/net-close.d.ts +11 -0
  139. package/dist/lib/net-close.js +25 -0
  140. package/dist/lib/openclaw-keychain.js +27 -1
  141. package/dist/lib/profiles.js +22 -9
  142. package/dist/lib/project-resources.js +1 -1
  143. package/dist/lib/reserved-stores.d.ts +53 -0
  144. package/dist/lib/reserved-stores.js +120 -0
  145. package/dist/lib/secrets-client.d.ts +199 -0
  146. package/dist/lib/secrets-client.js +718 -0
  147. package/dist/lib/secrets-policy.d.ts +235 -0
  148. package/dist/lib/secrets-policy.js +505 -0
  149. package/dist/lib/secrets-types.d.ts +188 -0
  150. package/dist/lib/secrets-types.js +24 -0
  151. package/dist/lib/self-heal/checks/shims.js +5 -3
  152. package/dist/lib/service-manifest.js +3 -4
  153. package/dist/lib/session/db.d.ts +18 -0
  154. package/dist/lib/session/db.js +47 -14
  155. package/dist/lib/session/sync/config.js +2 -2
  156. package/dist/lib/sha256-asset.d.ts +11 -16
  157. package/dist/lib/sha256-asset.js +11 -16
  158. package/dist/lib/share/config.js +14 -5
  159. package/dist/lib/signin-badge.d.ts +26 -0
  160. package/dist/lib/signin-badge.js +42 -0
  161. package/dist/lib/staleness/detectors/workflows.js +3 -105
  162. package/dist/lib/staleness/writers/workflows.js +2 -1
  163. package/dist/lib/state.d.ts +7 -4
  164. package/dist/lib/state.js +18 -7
  165. package/dist/lib/sync-umbrella.js +2 -2
  166. package/dist/lib/teams/agents.js +1 -1
  167. package/dist/lib/types.d.ts +74 -33
  168. package/dist/lib/view-types.d.ts +6 -3
  169. package/dist/lib/workflows-registry.d.ts +71 -0
  170. package/dist/lib/workflows-registry.js +280 -0
  171. package/dist/lib/workflows.d.ts +21 -21
  172. package/dist/lib/workflows.js +12 -327
  173. package/package.json +2 -3
  174. package/scripts/postinstall.js +35 -30
  175. package/dist/commands/secrets-import.d.ts +0 -18
  176. package/dist/commands/secrets-import.js +0 -74
  177. package/dist/commands/secrets-migrate.d.ts +0 -25
  178. package/dist/commands/secrets-migrate.js +0 -334
  179. package/dist/commands/secrets-rotate-passphrase.d.ts +0 -17
  180. package/dist/commands/secrets-rotate-passphrase.js +0 -96
  181. package/dist/commands/secrets-sync.d.ts +0 -11
  182. package/dist/commands/secrets-sync.js +0 -153
  183. package/dist/commands/secrets-vault.d.ts +0 -10
  184. package/dist/commands/secrets-vault.js +0 -130
  185. package/dist/commands/secrets.d.ts +0 -212
  186. package/dist/commands/secrets.js +0 -3030
  187. package/dist/lib/accounts/connect.d.ts +0 -176
  188. package/dist/lib/accounts/connect.js +0 -453
  189. package/dist/lib/daemon/keychain-reap-service.d.ts +0 -17
  190. package/dist/lib/daemon/keychain-reap-service.js +0 -32
  191. package/dist/lib/daemon/secrets-broker-service.d.ts +0 -21
  192. package/dist/lib/daemon/secrets-broker-service.js +0 -51
  193. package/dist/lib/secrets/agent.d.ts +0 -358
  194. package/dist/lib/secrets/agent.js +0 -1291
  195. package/dist/lib/secrets/audit.d.ts +0 -46
  196. package/dist/lib/secrets/audit.js +0 -101
  197. package/dist/lib/secrets/bundles.d.ts +0 -290
  198. package/dist/lib/secrets/bundles.js +0 -1547
  199. package/dist/lib/secrets/download-keychain.d.ts +0 -47
  200. package/dist/lib/secrets/download-keychain.js +0 -70
  201. package/dist/lib/secrets/drivers/rush.d.ts +0 -14
  202. package/dist/lib/secrets/drivers/rush.js +0 -90
  203. package/dist/lib/secrets/fallback.d.ts +0 -48
  204. package/dist/lib/secrets/fallback.js +0 -48
  205. package/dist/lib/secrets/filestore.d.ts +0 -222
  206. package/dist/lib/secrets/filestore.js +0 -1099
  207. package/dist/lib/secrets/headless.d.ts +0 -43
  208. package/dist/lib/secrets/headless.js +0 -56
  209. package/dist/lib/secrets/icloud-import.d.ts +0 -79
  210. package/dist/lib/secrets/icloud-import.js +0 -206
  211. package/dist/lib/secrets/index.d.ts +0 -451
  212. package/dist/lib/secrets/index.js +0 -1568
  213. package/dist/lib/secrets/install-helper.d.ts +0 -72
  214. package/dist/lib/secrets/install-helper.js +0 -245
  215. package/dist/lib/secrets/lease.d.ts +0 -25
  216. package/dist/lib/secrets/lease.js +0 -44
  217. package/dist/lib/secrets/linux.d.ts +0 -77
  218. package/dist/lib/secrets/linux.js +0 -393
  219. package/dist/lib/secrets/list-filter.d.ts +0 -109
  220. package/dist/lib/secrets/list-filter.js +0 -261
  221. package/dist/lib/secrets/mcp.d.ts +0 -93
  222. package/dist/lib/secrets/mcp.js +0 -211
  223. package/dist/lib/secrets/profiles.d.ts +0 -10
  224. package/dist/lib/secrets/profiles.js +0 -13
  225. package/dist/lib/secrets/push.d.ts +0 -133
  226. package/dist/lib/secrets/push.js +0 -273
  227. package/dist/lib/secrets/rc-hygiene.d.ts +0 -63
  228. package/dist/lib/secrets/rc-hygiene.js +0 -143
  229. package/dist/lib/secrets/read-backoff.d.ts +0 -27
  230. package/dist/lib/secrets/read-backoff.js +0 -64
  231. package/dist/lib/secrets/reaper.d.ts +0 -90
  232. package/dist/lib/secrets/reaper.js +0 -243
  233. package/dist/lib/secrets/remote.d.ts +0 -152
  234. package/dist/lib/secrets/remote.js +0 -344
  235. package/dist/lib/secrets/reserved-sync.d.ts +0 -66
  236. package/dist/lib/secrets/reserved-sync.js +0 -147
  237. package/dist/lib/secrets/scope.d.ts +0 -26
  238. package/dist/lib/secrets/scope.js +0 -29
  239. package/dist/lib/secrets/session-store.d.ts +0 -107
  240. package/dist/lib/secrets/session-store.js +0 -342
  241. package/dist/lib/secrets/sync-backend.d.ts +0 -48
  242. package/dist/lib/secrets/sync-backend.js +0 -13
  243. package/dist/lib/secrets/sync-commands.d.ts +0 -21
  244. package/dist/lib/secrets/sync-commands.js +0 -21
  245. package/dist/lib/secrets/sync.d.ts +0 -48
  246. package/dist/lib/secrets/sync.js +0 -237
  247. package/dist/lib/secrets/unlock-hints.d.ts +0 -27
  248. package/dist/lib/secrets/unlock-hints.js +0 -36
  249. package/dist/lib/secrets/usage-db.d.ts +0 -46
  250. package/dist/lib/secrets/usage-db.js +0 -96
  251. package/dist/lib/secrets/vault-age-helper.d.ts +0 -1
  252. package/dist/lib/secrets/vault-age-helper.js +0 -34
  253. package/dist/lib/secrets/vault.d.ts +0 -49
  254. package/dist/lib/secrets/vault.js +0 -399
  255. package/dist/lib/secrets/windows.d.ts +0 -81
  256. package/dist/lib/secrets/windows.js +0 -556
  257. package/scripts/install-helper.js +0 -97
  258. /package/dist/lib/{secrets/sync-passphrase.d.ts → sync-passphrase.d.ts} +0 -0
  259. /package/dist/lib/{secrets/sync-passphrase.js → sync-passphrase.js} +0 -0
@@ -7,22 +7,27 @@ import { AGENTS, MANAGED_AGENT_IDS, accountOrgBadge, getAccountEmail, getAccount
7
7
  import { formatUsageSummary, getUsageInfoForIdentity, getUsageInfoByIdentity, getUsageLookupKey, isUsageHeadlessScopeError, } from '../lib/accounting/usage.js';
8
8
  import { resolveConfiguredModel, formatAgentIdentity } from '../lib/models.js';
9
9
  import { readManifest, writeManifest, createDefaultManifest } from '../lib/manifest.js';
10
- import { installVersion, removeVersion, listInstalledVersions, isVersionInstalled, isLatestInstalled, isOldestInstalled, getGlobalDefault, setGlobalDefault, markVersionIsolated, setIsolatedDefault, isVersionIsolated, getVersionHomePath, getVersionDir, syncResourcesToVersion, parseAgentSpec, promptResourceSelection, promptNewResourceSelection, getAvailableResources, getActuallySyncedResources, getNewResources, getProjectOnlyResources, hasNewResources, printTrashFooter, } from '../lib/installations/versions.js';
10
+ import { installVersion, removeVersion, listInstalledVersions, isVersionInstalled, isLatestInstalled, isOldestInstalled, getGlobalDefault, setGlobalDefault, markVersionIsolated, setIsolatedDefault, isVersionIsolated, getVersionHomePath, getVersionDir, resolveManagedInstallation, ensureHarnessInstallation, MANAGED_INSTALLATION_LABEL, syncResourcesToVersion, parseAgentSpec, promptResourceSelection, promptNewResourceSelection, getAvailableResources, getActuallySyncedResources, getNewResources, getProjectOnlyResources, hasNewResources, printTrashFooter, } from '../lib/installations/versions.js';
11
+ import { supportsPinnedUpdate, updateInstallation } from '../lib/installations/index.js';
11
12
  import { carryForwardSettings } from '../lib/settings-manifest.js';
12
13
  import { createShim, createVersionedAlias, supportsIsolatedInstall, isIsolationProtected, CONFIG_ENV_ISOLATED_AGENTS, removeShim, shimExists, getShimsDir, getShimPath, getPathShadowingExecutable, isShimsInPath, getPathSetupInstructions, addShimsToPath, switchConfigSymlink, switchHomeFileSymlinks, } from '../lib/installations/shims.js';
13
14
  import { isInteractiveTerminal, isPromptCancelled, requireInteractiveSelection } from './utils.js';
15
+ import { redactSecrets } from '../lib/redact.js';
14
16
  import { tryAutoPullSystemRepo } from '../lib/git.js';
15
17
  import { getAgentsDir, getTrashVersionsDir } from '../lib/state.js';
16
18
  import { setHelpSections } from '../lib/help.js';
17
19
  import { updateSessionFilePaths } from '../lib/session/db.js';
18
- import { connectSupported } from '../lib/accounts/connect.js';
19
- /** Bare installs reuse an account home; explicit labels keep their expert semantics. */
20
- export function planAccountFirstInstall(input) {
21
- if (!input.supported || input.isolated || input.spec.includes('@'))
22
- return {};
23
- const existingLabel = input.defaultLabel && input.labels.includes(input.defaultLabel)
24
- ? input.defaultLabel : input.labels[0];
25
- return existingLabel ? { existingLabel } : { installationLabel: 'main' };
20
+ /**
21
+ * What `agents add <spec>` does with the harness's ONE managed installation
22
+ * (PHNX-3940): with no managed install it installs one (label `main`); with
23
+ * one, a bare spec reuses it and an explicit `@<release>` pins that same
24
+ * install — exactly `agents update <agent> --to <release>`. A second home is
25
+ * only ever an `--isolated` copy, which bypasses this plan entirely.
26
+ */
27
+ export function planManagedAdd(input) {
28
+ if (!input.managedInstalled)
29
+ return 'install';
30
+ return input.explicitPin ? 'pin' : 'reuse';
26
31
  }
27
32
  /**
28
33
  * After removeVersion soft-deletes a version dir to trash, rewrite session
@@ -305,28 +310,30 @@ export function registerVersionsCommands(program) {
305
310
  .option('-y, --yes', 'Auto-accept defaults without prompting (useful for scripts and CI)');
306
311
  setHelpSections(addCmd, {
307
312
  examples: `
308
- # Install the latest version of an agent
309
- agents add claude@latest
310
-
311
- # Install the oldest published version of an agent
312
- agents add claude@oldest
313
+ # Install the one managed installation of an agent
314
+ agents add claude
313
315
 
314
- # Install a specific version (reproducibility)
316
+ # Pin that same installation to a specific release (same as 'agents update claude --to 2.1.112')
315
317
  agents add claude@2.1.112
316
318
 
319
+ # Move it back to tracking the latest release
320
+ agents add claude@latest
321
+
317
322
  # Install multiple agents at once
318
- agents add claude@latest codex@0.116.0
323
+ agents add claude codex
319
324
 
320
- # Lock a version to this project only (won't affect global default)
321
- agents add claude@2.1.100 --project
325
+ # Lock this project to the managed installation (won't affect global default)
326
+ agents add claude --project
322
327
 
323
328
  # Install a clean, separate copy that leaves your existing setup alone
324
329
  agents add claude@2.1.112 --isolated
325
330
  `,
326
331
  notes: `
332
+ - One managed installation per harness: bare 'agents add <harness>' installs it (as <harness>@main) or reuses the one already there.
333
+ - '<harness>@<release>' pins that SAME installation — it is 'agents update <harness> --to <release>', not a second home. A second, separate copy requires --isolated.
334
+ - Add another account with 'agents accounts add <harness> [name]'.
327
335
  - The first version you install becomes the default automatically.
328
336
  - 'add' does NOT change the default if a default already exists. Use 'agents use' to switch.
329
- - Bare Claude/Codex installs reuse your existing home. Connect another account with 'agents accounts connect <agent> [name]'.
330
337
  - --isolated installs a self-contained copy: it never sets the default, never creates the bare '<agent>' shim, and never backs up or symlinks your real ~/.<agent>. Run it with 'agents run <agent>@<version>' and remove it with 'agents remove <agent>@<version> --isolated'. Mutually exclusive with --project.
331
338
  `,
332
339
  });
@@ -382,40 +389,77 @@ export function registerVersionsCommands(program) {
382
389
  console.log(chalk.yellow(`${agentLabel(agentConfig.id)} has no npm package. Install manually.`));
383
390
  continue;
384
391
  }
385
- // Check if already installed (resolve 'latest'/'oldest' against npm first)
386
- let alreadyInstalled = false;
392
+ // One managed installation per harness (PHNX-3940): bare `agents add`
393
+ // installs it (label `main`) or reuses the one already there, and
394
+ // `<harness>@<release>` pins that SAME install — exactly
395
+ // `agents update <harness> --to <release>`. A second home exists only
396
+ // as an --isolated copy, which keeps its own release-labelled flow.
387
397
  let installedAsVersion = version;
388
- const accountInstall = planAccountFirstInstall({
389
- spec, supported: connectSupported(agent), isolated: !!isIsolated,
390
- labels: listInstalledVersions(agent).filter(label => !isVersionIsolated(agent, label)),
391
- defaultLabel: getGlobalDefault(agent),
392
- });
393
- if (accountInstall.existingLabel) {
394
- alreadyInstalled = true;
395
- installedAsVersion = accountInstall.existingLabel;
396
- }
397
- else if (accountInstall.installationLabel) {
398
- // A fresh managed home has a stable label, independent of npm's release.
399
- }
400
- else if (version === 'latest') {
401
- const latestCheck = await isLatestInstalled(agent);
402
- if (latestCheck.installed && latestCheck.version) {
403
- alreadyInstalled = true;
404
- installedAsVersion = latestCheck.version;
398
+ const managed = isIsolated ? null : resolveManagedInstallation(agent);
399
+ // `<harness>@main` (or @<the managed label>) names the installation
400
+ // itself, not a release: it reads as the bare form — reuse when
401
+ // present, install latest into `main` when absent — never an
402
+ // `npm install <pkg>@main` guessing at a registry tag.
403
+ const namesManagedLabel = version === MANAGED_INSTALLATION_LABEL || (managed !== null && version === managed.label);
404
+ const addPlan = planManagedAdd({ explicitPin: spec.includes('@') && !namesManagedLabel, managedInstalled: managed !== null });
405
+ if (addPlan === 'pin' && managed) {
406
+ if (version !== 'latest' && !supportsPinnedUpdate(agent)) {
407
+ // Fail loud at the boundary rather than updating to the current
408
+ // release and reporting it as the pin that was asked for.
409
+ console.log(chalk.red(`${agentLabel(agentConfig.id)} is a single self-updating binary with no pinnable releases — drop the @${version}, or use @latest.`));
410
+ process.exitCode = 1;
411
+ continue;
405
412
  }
406
- }
407
- else if (version === 'oldest') {
408
- const oldestCheck = await isOldestInstalled(agent);
409
- if (oldestCheck.installed && oldestCheck.version) {
410
- alreadyInstalled = true;
411
- installedAsVersion = oldestCheck.version;
413
+ console.log(chalk.gray(`${agentLabel(agentConfig.id)} has one managed installation (${agent}@${managed.label}, release ${managed.releaseVersion}); pinning it to ${version} — the same as 'agents update ${agent} --to ${version}'.`));
414
+ console.log(chalk.gray(` A second, separate copy is the expert path: agents add ${agent}@${version} --isolated`));
415
+ try {
416
+ const outcome = await updateInstallation(managed, {
417
+ to: version,
418
+ updatePolicy: version === 'latest' ? 'latest' : 'pinned',
419
+ onProgress: (message) => console.log(chalk.gray(` ${message}`)),
420
+ });
421
+ if (outcome.deferred) {
422
+ console.log(chalk.yellow(`${agent}@${managed.label}: ${outcome.deferred} Still on release ${outcome.installation.releaseVersion}.`));
423
+ continue;
424
+ }
425
+ console.log(outcome.unchanged
426
+ ? chalk.gray(`${agent}@${managed.label} is already on release ${outcome.toRelease}.`)
427
+ : chalk.green(`Pinned ${agent}@${managed.label}: release ${outcome.fromRelease} -> ${outcome.toRelease}`));
428
+ }
429
+ catch (err) {
430
+ console.log(chalk.red(redactSecrets(err.message)));
431
+ process.exitCode = 1;
432
+ continue;
412
433
  }
434
+ installedAsVersion = managed.label;
413
435
  }
414
- else {
415
- alreadyInstalled = isVersionInstalled(agent, version);
436
+ else if (addPlan === 'reuse' && managed) {
437
+ console.log(chalk.gray(`${agentLabel(agentConfig.id)} is already installed. Your account home is unchanged.`));
438
+ console.log(chalk.gray(` Accounts: agents view ${agent}. Update now: agents update ${agent}.`));
439
+ installedAsVersion = managed.label;
440
+ // Ensure shim exists (in case it was deleted or needs updating)
441
+ createShim(agent);
416
442
  }
417
- if (alreadyInstalled) {
418
- if (isIsolated) {
443
+ else if (isIsolated) {
444
+ let alreadyInstalled = false;
445
+ if (version === 'latest') {
446
+ const latestCheck = await isLatestInstalled(agent);
447
+ if (latestCheck.installed && latestCheck.version) {
448
+ alreadyInstalled = true;
449
+ installedAsVersion = latestCheck.version;
450
+ }
451
+ }
452
+ else if (version === 'oldest') {
453
+ const oldestCheck = await isOldestInstalled(agent);
454
+ if (oldestCheck.installed && oldestCheck.version) {
455
+ alreadyInstalled = true;
456
+ installedAsVersion = oldestCheck.version;
457
+ }
458
+ }
459
+ else {
460
+ alreadyInstalled = isVersionInstalled(agent, version);
461
+ }
462
+ if (alreadyInstalled) {
419
463
  if (!isVersionIsolated(agent, installedAsVersion)) {
420
464
  // A normal and an isolated install of the SAME version share one
421
465
  // on-disk dir, so they can't coexist. Refuse rather than silently
@@ -428,37 +472,45 @@ export function registerVersionsCommands(program) {
428
472
  finalizeIsolatedInstall(agent, installedAsVersion);
429
473
  continue;
430
474
  }
431
- console.log(chalk.gray(accountInstall.existingLabel
432
- ? `${agentLabel(agentConfig.id)} is already installed. Your account home is unchanged.`
433
- : `${agentLabel(agentConfig.id)}@${installedAsVersion} already installed`));
434
- if (accountInstall.existingLabel) {
435
- console.log(chalk.gray(` Accounts: agents view ${agent}. Update now: agents update ${agent}.`));
436
- }
437
- // Ensure shim exists (in case it was deleted or needs updating)
438
- createShim(agent);
439
- }
440
- else {
441
475
  const spinner = ora(`Installing ${agentLabel(agentConfig.id)}@${version}...`).start();
442
476
  const result = await installVersion(agent, version, (msg) => {
443
477
  spinner.text = msg;
444
- }, accountInstall.installationLabel ? { installationLabel: accountInstall.installationLabel } : undefined);
445
- if (result.success) {
446
- const installedVer = result.installedVersion || version;
447
- const installedModel = resolveConfiguredModel(agentConfig.id, installedVer)?.model;
448
- const installedIdentity = formatAgentIdentity(`${agentLabel(agentConfig.id)}@${result.installedVersion}`, installedModel ? chalk.yellow(installedModel) : null);
478
+ });
479
+ if (!result.success) {
480
+ spinner.fail(`Failed to install ${agentLabel(agentConfig.id)}@${version}`);
481
+ console.error(chalk.gray(redactSecrets(result.error || 'Unknown error')));
482
+ continue;
483
+ }
484
+ // Isolated installs stop here: no bare shim, no settings carry-over,
485
+ // no resource sync, no default switch, no PATH edits. Just a
486
+ // launchable versioned alias + the isolated marker, leaving the
487
+ // user's real ~/.<agent> and default untouched.
488
+ finalizeIsolatedInstall(agent, result.installedVersion || version);
489
+ continue;
490
+ }
491
+ else {
492
+ const installRelease = namesManagedLabel ? 'latest' : version;
493
+ const spinner = ora(`Installing ${agentLabel(agentConfig.id)}@${installRelease}...`).start();
494
+ let ensured;
495
+ try {
496
+ ensured = await ensureHarnessInstallation(agent, {
497
+ release: installRelease,
498
+ onProgress: (msg) => { spinner.text = msg; },
499
+ });
500
+ }
501
+ catch (err) {
502
+ spinner.fail(`Failed to install ${agentLabel(agentConfig.id)}@${installRelease}`);
503
+ console.error(chalk.gray(redactSecrets(err.message)));
504
+ continue;
505
+ }
506
+ {
507
+ const installedVersion = ensured.installation.label;
508
+ const installedModel = resolveConfiguredModel(agentConfig.id, ensured.installation.releaseVersion)?.model;
509
+ const installedIdentity = formatAgentIdentity(`${agentLabel(agentConfig.id)}@${installedVersion}`, installedModel ? chalk.yellow(installedModel) : null);
449
510
  spinner.succeed(`Installed ${installedIdentity}`);
450
- const installedVersion = result.installedVersion || version;
451
- // Track the concrete version so a `--project` pin records it instead
452
- // of the `latest`/`oldest` alias.
511
+ // The project pin below names the installation, never the release
512
+ // inside it — the release moves on update, the label is frozen.
453
513
  installedAsVersion = installedVersion;
454
- // Isolated installs stop here: no bare shim, no settings carry-over,
455
- // no resource sync, no default switch, no PATH edits. Just a
456
- // launchable versioned alias + the isolated marker, leaving the
457
- // user's real ~/.<agent> and default untouched.
458
- if (isIsolated) {
459
- finalizeIsolatedInstall(agent, installedVersion);
460
- continue;
461
- }
462
514
  // Create shim if first install
463
515
  if (!shimExists(agent)) {
464
516
  createShim(agent);
@@ -601,11 +653,6 @@ export function registerVersionsCommands(program) {
601
653
  }
602
654
  }
603
655
  }
604
- else {
605
- spinner.fail(`Failed to install ${agentLabel(agentConfig.id)}@${version}`);
606
- console.error(chalk.gray(result.error || 'Unknown error'));
607
- continue;
608
- }
609
656
  }
610
657
  // Update project manifest if -p flag
611
658
  if (isProject) {
@@ -618,11 +665,12 @@ export function registerVersionsCommands(program) {
618
665
  ? readManifest(process.cwd()) || createDefaultManifest()
619
666
  : createDefaultManifest();
620
667
  manifest.agents = manifest.agents || {};
621
- manifest.agents[agent] = (version === 'latest' || version === 'oldest')
622
- ? installedAsVersion
623
- : version;
668
+ // A project pin names the installation (its frozen label), never the
669
+ // release inside it — the release moves on update, the label is what
670
+ // every resolver reads back.
671
+ manifest.agents[agent] = installedAsVersion;
624
672
  writeManifest(process.cwd(), manifest);
625
- console.log(chalk.green(` Pinned ${agentLabel(agentConfig.id)}@${version} in .agents/agents.yaml`));
673
+ console.log(chalk.green(` Pinned ${agentLabel(agentConfig.id)}@${installedAsVersion} in .agents/agents.yaml`));
626
674
  }
627
675
  }
628
676
  });
@@ -1,11 +1,3 @@
1
- /**
2
- * View command for inspecting installed agents, versions, accounts, and resources.
3
- *
4
- * Implements `agents view` -- shows installed agent CLIs with version info,
5
- * account emails, usage stats, and active status. When given an agent@version
6
- * argument, displays a detailed breakdown of commands, skills, MCP servers,
7
- * rules, hooks, and promptcuts synced to that version.
8
- */
9
1
  import type { Command } from 'commander';
10
2
  import { accountDisplayLabel } from '../lib/agents.js';
11
3
  import type { AccountInfo } from '../lib/agents.js';
@@ -22,7 +14,7 @@ export declare function viewUsageSummaryOptions(agentId: AgentId, signedIn: bool
22
14
  export declare const accountColumnLabel: typeof accountDisplayLabel;
23
15
  /**
24
16
  * The account column with the durable native-account name folded in: when the
25
- * signed-in identity of `agentId` has been named via `agents accounts name`,
17
+ * signed-in identity of `agentId` has been named via `agents accounts add`,
26
18
  * render `work · email` instead of the bare email. Falls back to the plain
27
19
  * display label when the identity is unnamed.
28
20
  */
@@ -1,3 +1,12 @@
1
+ /**
2
+ * View command for inspecting installed agents, versions, accounts, and resources.
3
+ *
4
+ * Implements `agents view` -- shows installed agent CLIs with version info,
5
+ * account emails, usage stats, and active status. When given an agent@version
6
+ * argument, displays a detailed breakdown of commands, skills, MCP servers,
7
+ * rules, hooks, and promptcuts synced to that version.
8
+ */
9
+ import { Option } from 'commander';
1
10
  import { addHostOption } from '../lib/hosts/option.js';
2
11
  import chalk from 'chalk';
3
12
  import { termLink } from '../lib/format.js';
@@ -21,8 +30,8 @@ import { isCapable } from '../lib/capabilities.js';
21
30
  import { discoverPlugins, pluginSupportsAgent } from '../lib/plugins/plugins.js';
22
31
  import { getAgentsDir, getUserAgentsDir, getEffectivePromptcutsPath, readMergedPromptcuts, readMeta } from '../lib/state.js';
23
32
  import { findNativeAccountByIdentity } from '../lib/account-registry.js';
24
- import { buildNativeCatalog } from '../lib/account-catalog.js';
25
- import { connectSupported } from '../lib/accounts/connect.js';
33
+ import { accountListJson, loadAccountCatalog, renderAccountRows, secretsUnavailableNote } from '../lib/account-catalog.js';
34
+ import { addSupported } from '../lib/accounts/add.js';
26
35
  import { readInstallation } from '../lib/installations/store.js';
27
36
  import { isAutoUpdateEnabledForAgent } from '../lib/installations/update-policy.js';
28
37
  import { selectUpdateStrategy } from '../lib/installations/strategies.js';
@@ -61,7 +70,7 @@ export function viewUsageSummaryOptions(agentId, signedIn, usageInfo, maxWindows
61
70
  export const accountColumnLabel = accountDisplayLabel;
62
71
  /**
63
72
  * The account column with the durable native-account name folded in: when the
64
- * signed-in identity of `agentId` has been named via `agents accounts name`,
73
+ * signed-in identity of `agentId` has been named via `agents accounts add`,
65
74
  * render `work · email` instead of the bare email. Falls back to the plain
66
75
  * display label when the identity is unnamed.
67
76
  */
@@ -530,16 +539,13 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
530
539
  };
531
540
  // Show version-managed agents
532
541
  if (versionManaged.length > 0 && !viewOpts?.versions) {
533
- const catalog = buildNativeCatalog(infoResults.map(({ agentId, version, home, info }) => ({
534
- agent: agentId,
535
- label: version,
536
- releaseVersion: displayVersion(agentId, version),
537
- accountKey: info.accountKey,
538
- email: info.email,
539
- signedIn: isLaunchableSignedIn(info.signedIn, credentialPresence(agentId, home)),
540
- })), readMeta(), (agent) => getGlobalDefault(agent) ?? getIsolatedDefault(agent));
542
+ const catalog = await loadAccountCatalog();
543
+ const note = secretsUnavailableNote(catalog);
544
+ if (note)
545
+ console.error(chalk.yellow(note));
541
546
  for (const agentId of versionManaged) {
542
- const accounts = catalog.filter((row) => row.agent === agentId);
547
+ const accounts = catalog.native.filter((row) => row.agent === agentId);
548
+ const providers = catalog.provider.filter((row) => row.harnesses.includes(agentId));
543
549
  let updateLabel = 'manual updates';
544
550
  try {
545
551
  if (selectUpdateStrategy(agentId).transactional) {
@@ -548,47 +554,33 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
548
554
  }
549
555
  catch { /* unsupported updater: keep the truthful manual label */ }
550
556
  console.log(` ${chalk.bold(agentLabel(agentId))}${chalk.gray(` · ${updateLabel}`)}`);
551
- const width = Math.max(0, ...accounts.map((row) => stringWidth(nativeAccountViewLabel(row))));
552
- for (const row of accounts) {
553
- const source = row.installations.find((home) => home.label === row.home && home.signedIn)
554
- ?? row.installations.find((home) => home.signedIn)
555
- ?? row.installations[0];
556
- const rawInfo = source ? infoMap.get(`${agentId}:${source.label}`) : undefined;
557
- const info = rawInfo ? mergeCanonical(rawInfo) : undefined;
558
- const usageKey = getUsageLookupKey(info);
559
- const usageInfo = usageKey ? usageByKey.get(usageKey) : undefined;
560
- const usage = formatUsageSummary(info?.plan ?? null, usageInfo?.snapshot ?? null, 3, viewUsageSummaryOptions(agentId, row.state === 'connected', usageInfo, usageWindowCap));
561
- const connected = row.state === 'connected';
562
- const model = source ? resolveConfiguredModel(agentId, source.label)?.model : null;
563
- const pinned = row.installations.some((home) => readInstallation(agentId, home.label)?.updatePolicy === 'pinned');
564
- const parts = [
565
- ` ${row.isDefault ? chalk.green('*') : ' '} ${chalk.cyan(padToWidth(nativeAccountViewLabel(row), width))}`,
566
- connected ? chalk.green('connected') : chalk.yellow('not connected here'),
567
- model ? chalk.yellow(model) : '',
568
- usage,
569
- formatUsageStatusBadge(info?.usageStatus),
570
- pinned ? chalk.gray('release pinned · --versions') : '',
571
- ];
572
- console.log(joinViewColumns(parts));
557
+ if (accounts.length > 0 || providers.length > 0) {
558
+ console.log(renderAccountRows(accounts, {
559
+ heading: false,
560
+ footer: false,
561
+ harnessHeadings: false,
562
+ providers,
563
+ harness: agentId,
564
+ localDevice: machineId(),
565
+ }));
573
566
  }
574
- if (accounts.length === 0) {
567
+ else {
575
568
  const localIdentity = infoResults.some((row) => row.agentId === agentId && row.info.signedIn);
576
- const hint = connectSupported(agentId) ? `agents accounts connect ${agentId}` : loginHint(agentId);
569
+ const hint = addSupported(agentId) ? `agents accounts add ${agentId} <name>` : loginHint(agentId);
577
570
  console.log(chalk.gray(localIdentity
578
571
  ? ' Native login detected · account identity unavailable'
579
572
  : ` No native login detected · ${hint}`));
580
573
  }
581
574
  const isolatedCount = listInstalledVersions(agentId).filter((label) => isVersionIsolated(agentId, label)).length;
582
575
  if (isolatedCount > 0)
583
- console.log(chalk.gray(` ${isolatedCount} isolated installation${isolatedCount === 1 ? '' : 's'} · inspect with --versions`));
576
+ console.log(chalk.gray(` ${isolatedCount} isolated installation${isolatedCount === 1 ? '' : 's'}`));
584
577
  const projectVersion = getProjectVersionFromCwd(agentId);
585
578
  if (projectVersion)
586
- console.log(chalk.gray(' Project installation override configured · inspect with --versions'));
579
+ console.log(chalk.gray(' Project installation override configured'));
587
580
  console.log();
588
581
  }
589
582
  if (filterAgentId) {
590
- const connect = connectSupported(filterAgentId) ? `Connect: agents accounts connect ${filterAgentId} [name] · ` : '';
591
- console.log(chalk.gray(` ${connect}Details: agents view ${filterAgentId} --versions\n`));
583
+ console.log(chalk.gray(` Add an account: agents accounts add ${filterAgentId} [name]\n`));
592
584
  }
593
585
  }
594
586
  if (versionManaged.length > 0 && viewOpts?.versions) {
@@ -1420,6 +1412,10 @@ export async function collectAgentsJson(filterAgentId, resourceSections, opts) {
1420
1412
  // Keep filtered native JSON consistent with the text view: custom forks are
1421
1413
  // not children of the native harness they execute through.
1422
1414
  const harnesses = filterAgentId ? [] : getHarnesses();
1415
+ const catalog = await loadAccountCatalog();
1416
+ const note = secretsUnavailableNote(catalog);
1417
+ if (note)
1418
+ console.error(chalk.yellow(note)); // stderr — never corrupts --json stdout
1423
1419
  const out = [];
1424
1420
  for (const agentId of agentsToShow) {
1425
1421
  const versions = byAgent.get(agentId) ?? [];
@@ -1428,15 +1424,9 @@ export async function collectAgentsJson(filterAgentId, resourceSections, opts) {
1428
1424
  return a.isDefault ? -1 : 1;
1429
1425
  return compareVersions(b.version, a.version);
1430
1426
  });
1431
- const accounts = buildNativeCatalog(infoResults.filter((row) => row.agentId === agentId).map(({ version, home, info }) => ({
1432
- agent: agentId,
1433
- label: version,
1434
- releaseVersion: actualRelease(agentId, version),
1435
- accountKey: info.accountKey,
1436
- email: info.email,
1437
- signedIn: isLaunchableSignedIn(info.signedIn, credentialPresence(agentId, home)),
1438
- })), readMeta(), (agent) => getGlobalDefault(agent) ?? getIsolatedDefault(agent))
1439
- .filter((row) => row.agent === agentId);
1427
+ // Project through the public JSON v2 serializer — the internal catalog row
1428
+ // (identityKey, home, installations) is not the machine contract.
1429
+ const accounts = accountListJson(catalog.native.filter((row) => row.agent === agentId), catalog.provider.filter((row) => row.harnesses.includes(agentId)), agentId).accounts;
1440
1430
  out.push({ agent: agentId, versions, accounts, harnesses: harnesses.filter((h) => h.agent === agentId) });
1441
1431
  }
1442
1432
  return out;
@@ -1834,8 +1824,8 @@ export async function viewAction(agentArg, options) {
1834
1824
  /** Register the `agents view` command. */
1835
1825
  export function registerViewCommand(program) {
1836
1826
  addHostOption(program.command('view [agent]'))
1837
- .description('Show your agents, connected accounts, and usage. Use --versions for installation diagnostics.')
1838
- .option('--versions', 'Show every installation, actual release, account, model, and home path.')
1827
+ .description('Show your agents, connected accounts, and usage.')
1828
+ .addOption(new Option('--versions', 'Show every installation, actual release, account, model, and home path (legacy diagnostic surface).').hideHelp())
1839
1829
  .option('--json', 'Emit machine-readable JSON (accounts plus backward-compatible installation list).')
1840
1830
  .option('--resources [sections]', 'In --json mode, include each version\'s resources: "all" (default) or a comma list (skills,plugins,mcp,commands,workflows,memory,hooks). Implies --json.')
1841
1831
  .option('--detailed', 'Include all resources in --json output (alias for --resources all). Implies --json.')
@@ -1862,9 +1852,6 @@ Examples:
1862
1852
  # Show accounts for one agent
1863
1853
  agents view claude
1864
1854
 
1865
- # Inspect installation labels, current releases, models, and paths
1866
- agents view claude --versions
1867
-
1868
1855
  # Describe one custom harness (host, model, provider, auth, path)
1869
1856
  agents view deepseek-flash
1870
1857
 
@@ -1904,7 +1891,6 @@ Output:
1904
1891
  - Without arguments: table of all agents with accounts, connection state, usage,
1905
1892
  then one block per custom harness (see 'agents harness')
1906
1893
  - With agent name: one row per native identity, showing the default account
1907
- - With --versions: every retained installation, actual release, model, and home
1908
1894
  - With a custom harness name: that harness's host, model, provider, and auth
1909
1895
  - With agent@version: detailed breakdown of resources synced to that version
1910
1896
  - With --json: structured JSON with version, isDefault, signedIn, authVerdict,
@@ -1,7 +1,7 @@
1
1
  import * as path from 'path';
2
2
  import chalk from 'chalk';
3
- import { readAndResolveBundleEnv } from '../lib/secrets/bundles.js';
4
- import { closeServerBounded } from '../lib/secrets/agent.js';
3
+ import { readAndResolveBundleEnv } from '../lib/secrets-client.js';
4
+ import { closeServerBounded } from '../lib/net-close.js';
5
5
  import { createFileDeliveryStore, startWebhookServer, waitForListening } from '../lib/triggers/webhook.js';
6
6
  import { getRuntimeStateDir } from '../lib/state.js';
7
7
  const DEFAULT_HOST = '127.0.0.1';
@@ -10,8 +10,8 @@ function positiveInt(value, fallback) {
10
10
  const parsed = Number.parseInt(value ?? '', 10);
11
11
  return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
12
12
  }
13
- function readWebhookSecrets(bundleName) {
14
- const { env } = readAndResolveBundleEnv(bundleName, {
13
+ async function readWebhookSecrets(bundleName) {
14
+ const { env } = await readAndResolveBundleEnv(bundleName, {
15
15
  caller: 'webhooks serve',
16
16
  // `webhooks serve` is a long-running background server started to receive
17
17
  // signed webhooks, not a human at a Touch ID sheet — so the read is always
@@ -54,7 +54,7 @@ export function registerWebhooksCommand(program) {
54
54
  .action(async (opts) => {
55
55
  let secrets;
56
56
  try {
57
- secrets = readWebhookSecrets(opts.secretsBundle);
57
+ secrets = await readWebhookSecrets(opts.secretsBundle);
58
58
  }
59
59
  catch (err) {
60
60
  console.error(chalk.red(err.message));
@@ -8,7 +8,8 @@ import { select, checkbox } from '@inquirer/prompts';
8
8
  import { resolveAgentName, agentLabel } from '../lib/agents.js';
9
9
  import { capableAgents } from '../lib/capabilities.js';
10
10
  import { cloneRepo } from '../lib/git.js';
11
- import { discoverWorkflowsFromRepo, installWorkflowCentrally, removeWorkflow, listInstalledWorkflows, listWorkflowsForAgent, removeWorkflowFromVersion, iterWorkflowsCapableVersions, } from '../lib/workflows.js';
11
+ import { discoverWorkflowsFromRepo, installWorkflowCentrally, removeWorkflow, listInstalledWorkflows, iterWorkflowsCapableVersions, } from '../lib/workflows.js';
12
+ import { listWorkflowsForAgent, removeWorkflowFromVersion } from '../lib/workflows-registry.js';
12
13
  import { getVersionHomePath, getGlobalDefault, syncResourcesToVersion, promptAgentVersionSelection, } from '../lib/installations/versions.js';
13
14
  import { recordVersionResources, getUserWorkflowsDir } from '../lib/state.js';
14
15
  import { isPromptCancelled, isInteractiveTerminal, requireInteractiveSelection, printWithPager, promptRemovalTargets, parseCommaSeparatedList, resolveAgentTargetsAutoInstalling, resolveListFilterOrExit, } from './utils.js';
package/dist/index.d.ts CHANGED
@@ -2,25 +2,25 @@
2
2
  /**
3
3
  * CLI entry point for agents-cli.
4
4
  *
5
- * Slim shell (RUSH-2335): only the leaf `lib/secrets/sync-commands.js` is a
6
- * static import, so the argv fast paths below can answer without evaluating the
7
- * commander + self-update + command-registry graph that used to be hoisted
8
- * above every intercept (~140ms of cold bootstrap per synchronous secrets-
9
- * broker read). The full CLI loads via `await import('./bootstrap.js')` once
10
- * none of the fast paths match.
5
+ * Slim shell (RUSH-2335): no static imports at all, so the argv fast paths
6
+ * below can answer without evaluating the commander + self-update +
7
+ * command-registry graph. The full CLI loads via `await import('./bootstrap.js')`
8
+ * once none of the fast paths match.
11
9
  *
12
10
  * Fast paths (must stay above the bootstrap import — ESM does not hoist dynamic
13
11
  * `import()`, but any static import here would still evaluate first):
14
- * - `__vault-age-helper`
15
- * - `__secrets-get` / `__secrets-ping` / `__secrets-lock` (SYNC_* tokens)
12
+ * - `__launch-lease`
16
13
  * - `__shim`
14
+ * - `__gh`
17
15
  * - `__claude-statusline`
18
16
  * - `__usage-ingest` / `__usage-export`
17
+ * - `__harness-update-run`
19
18
  * - `__daemon-run`
20
19
  *
21
- * The tokens are imported from the leaf module sync-commands.ts — the SAME
22
- * bindings the clients spawn with, so this dispatch and those spawns cannot
23
- * drift apart. It is a leaf precisely so binding them here is free: importing
24
- * agent.js would pull the whole secrets graph into every invocation.
20
+ * The synchronous secrets-broker fast paths (`__secrets-get` / `__secrets-ping`
21
+ * / `__secrets-lock`) and `__vault-age-helper` moved out of this CLI entirely
22
+ * with the standalone `secrets` engine (PHNX-3989) — agents-cli now talks to
23
+ * it only through the bounded process client (`lib/secrets-client.ts`), never
24
+ * through a hidden subcommand of its own.
25
25
  */
26
26
  export {};