Commit Graph

12 Commits

Author SHA1 Message Date
Peter Steinberger
cf303b3101 fix(cli): trim plugin preloads for setup-safe commands 2026-04-25 23:06:05 +01:00
Peter Steinberger
265b97bbba fix(cli): avoid plugin preload for agent bindings 2026-04-25 22:38:30 +01:00
hcl
a97fe41a9e perf(cli): skip plugin load on agents list --json (#71739) (#71746)
Reporter measured `agents list --json` at ~7-9s on a fast host (~11s in
container) on 2026.4.23, while peer `--json` commands like
`channels list`, `cron list --all`, and `sessions ... --all-agents`
stay sub-second. Their cold-call dashboard endpoint dropped from 27s to
~2s after a local dist patch — they could even retire the 5-min cache
TTL workaround they had shipped to dodge it.

Root cause: `agents list` inherits `loadPlugins: 'always'` from the
parent `agents` policy in command-catalog, then `agentsListCommand`
calls `buildProviderStatusIndex(cfg)` unconditionally — both paths
trigger the bundled-extension import waterfall (~60+ extension index.js
modules).

`channels list` already uses `loadPlugins: 'never'` and proves the
shape is right; this PR matches that shape with the safer `text-only`
variant so human invocations are unchanged.

Two-line fix per reporter:

1. `src/cli/command-catalog.ts` — opt agents list into `text-only`,
   the same plugin-preload policy bucket that already exists. Plugin
   preload runs for human text output, skips for `--json`.

2. `src/commands/agents.commands.list.ts` — skip
   `buildProviderStatusIndex` (and the per-summary provider
   enrichment loop) when `opts.json`. Provider info is only rendered
   in human text output via `formatSummary`, so dropping it from JSON
   has no observable effect on existing callers that consume `id`,
   `name`, `model`, `bindings`, `isDefault`, `identity*`, `workspace`,
   or `agentDir`. `routes` is config-derived and continues to be set
   in both modes.

Tests:
- new assertion in command-startup-policy.test.ts: `agents list` with
  jsonOutputMode:true now resolves to `loadPlugins: false` (was
  effectively `true` via the parent `agents` 'always' policy).
- existing assertion that human (jsonOutputMode:false) still triggers
  plugin load is preserved verbatim.

6/6 tests pass. Lint clean.

Out of scope:
- `--bindings` flag opt-in for restoring providers in JSON output:
  worth adding later if any consumer needs it; reporter said dashboard
  consumers don't.
- Broader plugin-discovery cache work (#67040, #71690) which addresses
  the same family of cold-start cost.
2026-04-25 17:07:42 -04:00
Peter Steinberger
2011de69d3 feat: add Crestodian setup helper 2026-04-25 08:58:21 +01:00
Ayaan Zaidi
2bf2fd6c3d fix(cli): preserve gateway status rpc probe semantics 2026-04-25 08:52:52 +05:30
Andy Lin
43beceaee7 perf(cli): trim gateway status startup work 2026-04-25 08:52:52 +05:30
Peter Steinberger
20b05f220e fix: expose codex provider catalog 2026-04-23 05:35:17 +01:00
Ayaan Zaidi
c1b21a2a3a fix(cli): skip configure preaction bootstrap 2026-04-22 10:33:14 +05:30
Gustavo Madeira Santana
24db09a19b fix(cli): keep channel status checks off plugin runtimes (#69479)
Merged via squash.

Prepared head SHA: 63f6e416a9
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-21 13:53:08 -04:00
Peter Steinberger
416a3148e9 refactor: split cli backend live helpers 2026-04-07 03:46:24 +01:00
Peter Steinberger
6f7d0a016c test: verify claude cli mcp cron e2e 2026-04-07 03:37:15 +01:00
Peter Steinberger
f43aba40a2 refactor: share cli routing metadata 2026-04-06 14:16:03 +01:00