@phnx-labs/agents-cli 1.22.119 → 1.22.121
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 +236 -0
- package/README.md +19 -2
- package/dist/bootstrap.d.ts +0 -15
- package/dist/bootstrap.js +10 -409
- package/dist/cli/command-registry.d.ts +0 -58
- package/dist/cli/command-registry.js +2 -74
- package/dist/commands/accounts.d.ts +0 -17
- package/dist/commands/accounts.js +1 -52
- package/dist/commands/alias.d.ts +0 -12
- package/dist/commands/alias.js +0 -6
- package/dist/commands/apply.d.ts +0 -15
- package/dist/commands/apply.js +0 -63
- package/dist/commands/audit.d.ts +0 -12
- package/dist/commands/audit.js +0 -13
- package/dist/commands/auth.js +4 -12
- package/dist/commands/beta.d.ts +0 -6
- package/dist/commands/beta.js +2 -6
- package/dist/commands/browser-sessions-picker.d.ts +0 -8
- package/dist/commands/browser-sessions-picker.js +0 -26
- package/dist/commands/browser.d.ts +0 -57
- package/dist/commands/browser.js +0 -80
- package/dist/commands/budget.d.ts +0 -13
- package/dist/commands/budget.js +0 -2
- package/dist/commands/cli.d.ts +0 -12
- package/dist/commands/cli.js +0 -4
- package/dist/commands/cloud.d.ts +0 -9
- package/dist/commands/cloud.js +0 -43
- package/dist/commands/commands.d.ts +0 -9
- package/dist/commands/commands.js +0 -18
- package/dist/commands/computer-sessions-picker.d.ts +0 -11
- package/dist/commands/computer-sessions-picker.js +0 -29
- package/dist/commands/computer.d.ts +0 -62
- package/dist/commands/computer.js +3 -114
- package/dist/commands/config.d.ts +0 -14
- package/dist/commands/config.js +21 -60
- package/dist/commands/cost.d.ts +0 -11
- package/dist/commands/cost.js +1 -17
- package/dist/commands/daemon-test-harness.d.ts +0 -32
- package/dist/commands/daemon-test-harness.js +1 -36
- package/dist/commands/daemon.d.ts +0 -46
- package/dist/commands/daemon.js +8 -255
- package/dist/commands/detach-core.d.ts +0 -28
- package/dist/commands/detach-core.js +0 -30
- package/dist/commands/detach.d.ts +1 -12
- package/dist/commands/detach.js +16 -52
- package/dist/commands/device-config-test-harness.js +0 -12
- package/dist/commands/doctor.d.ts +0 -103
- package/dist/commands/doctor.js +3 -279
- package/dist/commands/events.d.ts +0 -29
- package/dist/commands/events.js +1 -55
- package/dist/commands/exec.d.ts +0 -163
- package/dist/commands/exec.js +15 -964
- package/dist/commands/factory.d.ts +0 -6
- package/dist/commands/factory.js +0 -2
- package/dist/commands/feed-watch.js +0 -20
- package/dist/commands/feed.d.ts +0 -38
- package/dist/commands/feed.js +1 -151
- package/dist/commands/feedback.d.ts +0 -5
- package/dist/commands/feedback.js +0 -5
- package/dist/commands/fleet-capture.d.ts +0 -12
- package/dist/commands/fleet-capture.js +1 -39
- package/dist/commands/focus.d.ts +6 -94
- package/dist/commands/focus.js +13 -183
- package/dist/commands/fork.d.ts +0 -21
- package/dist/commands/fork.js +0 -45
- package/dist/commands/funnel.d.ts +0 -3
- package/dist/commands/go.d.ts +2 -71
- package/dist/commands/go.js +5 -99
- package/dist/commands/harness-hooks.d.ts +0 -41
- package/dist/commands/harness-hooks.js +0 -48
- package/dist/commands/harness-wizard.d.ts +0 -137
- package/dist/commands/harness-wizard.js +0 -109
- package/dist/commands/harness.d.ts +0 -63
- package/dist/commands/harness.js +0 -103
- package/dist/commands/hooks.d.ts +0 -9
- package/dist/commands/hooks.js +0 -26
- package/dist/commands/humans.d.ts +0 -8
- package/dist/commands/humans.js +0 -8
- package/dist/commands/import.d.ts +0 -22
- package/dist/commands/import.js +0 -79
- package/dist/commands/insights.d.ts +0 -37
- package/dist/commands/insights.js +3 -115
- package/dist/commands/inspect.d.ts +0 -117
- package/dist/commands/inspect.js +2 -448
- package/dist/commands/lease.d.ts +0 -28
- package/dist/commands/lease.js +0 -43
- package/dist/commands/logs.d.ts +0 -23
- package/dist/commands/logs.js +0 -30
- package/dist/commands/mailboxes.d.ts +0 -18
- package/dist/commands/mailboxes.js +0 -29
- package/dist/commands/mcp.d.ts +0 -9
- package/dist/commands/mcp.js +0 -53
- package/dist/commands/memory.d.ts +0 -7
- package/dist/commands/memory.js +0 -7
- package/dist/commands/menubar.d.ts +0 -8
- package/dist/commands/menubar.js +0 -24
- package/dist/commands/message.d.ts +0 -23
- package/dist/commands/message.js +0 -50
- package/dist/commands/mine.d.ts +0 -22
- package/dist/commands/mine.js +0 -21
- package/dist/commands/models.d.ts +0 -8
- package/dist/commands/models.js +0 -33
- package/dist/commands/modes.d.ts +0 -10
- package/dist/commands/modes.js +0 -13
- package/dist/commands/monitors.d.ts +0 -9
- package/dist/commands/monitors.js +3 -160
- package/dist/commands/open.d.ts +0 -26
- package/dist/commands/open.js +0 -10
- package/dist/commands/output.d.ts +0 -18
- package/dist/commands/output.js +1 -34
- package/dist/commands/packages-materialize.d.ts +0 -11
- package/dist/commands/packages-materialize.js +0 -3
- package/dist/commands/packages.d.ts +0 -10
- package/dist/commands/packages.js +0 -50
- package/dist/commands/perf.d.ts +0 -41
- package/dist/commands/perf.js +0 -55
- package/dist/commands/permissions.d.ts +0 -9
- package/dist/commands/permissions.js +0 -43
- package/dist/commands/plugins.d.ts +0 -14
- package/dist/commands/plugins.js +2 -55
- package/dist/commands/profiles.d.ts +0 -25
- package/dist/commands/profiles.js +0 -27
- package/dist/commands/projects-todo.d.ts +2 -0
- package/dist/commands/projects-todo.js +132 -0
- package/dist/commands/projects.d.ts +0 -85
- package/dist/commands/projects.js +344 -291
- package/dist/commands/prune.js +0 -30
- package/dist/commands/ps-roster.d.ts +92 -0
- package/dist/commands/ps-roster.js +744 -0
- package/dist/commands/ps.d.ts +6 -0
- package/dist/commands/ps.js +98 -0
- package/dist/commands/refresh-rules.d.ts +0 -13
- package/dist/commands/refresh-rules.js +0 -14
- package/dist/commands/reminders.d.ts +0 -7
- package/dist/commands/repo.d.ts +0 -89
- package/dist/commands/repo.js +7 -205
- package/dist/commands/resource-view.d.ts +0 -33
- package/dist/commands/resource-view.js +0 -49
- package/dist/commands/resume.d.ts +1 -19
- package/dist/commands/resume.js +0 -50
- package/dist/commands/route.d.ts +0 -10
- package/dist/commands/route.js +0 -19
- package/dist/commands/routines.d.ts +0 -42
- package/dist/commands/routines.js +5 -290
- package/dist/commands/routines.test-fixture.d.ts +0 -34
- package/dist/commands/routines.test-fixture.js +4 -100
- package/dist/commands/rules.d.ts +0 -9
- package/dist/commands/rules.js +1 -6
- package/dist/commands/run-account-picker.d.ts +0 -59
- package/dist/commands/run-account-picker.js +0 -71
- package/dist/commands/run-broadcast.d.ts +0 -9
- package/dist/commands/run-broadcast.js +0 -7
- package/dist/commands/run-cloud.d.ts +0 -15
- package/dist/commands/run-cloud.js +0 -37
- package/dist/commands/run-device-picker.d.ts +0 -25
- package/dist/commands/run-device-picker.js +1 -53
- package/dist/commands/secrets-passthrough.d.ts +0 -31
- package/dist/commands/secrets-passthrough.js +0 -10
- package/dist/commands/send.d.ts +0 -20
- package/dist/commands/send.js +14 -18
- package/dist/commands/sessions-backfill.d.ts +0 -7
- package/dist/commands/sessions-backfill.js +1 -16
- package/dist/commands/sessions-backup-setup.js +0 -11
- package/dist/commands/sessions-bookmark.d.ts +0 -8
- package/dist/commands/sessions-bookmark.js +0 -28
- package/dist/commands/sessions-browser.d.ts +2 -117
- package/dist/commands/sessions-browser.js +5 -243
- package/dist/commands/sessions-export.d.ts +1 -26
- package/dist/commands/sessions-export.js +3 -81
- package/dist/commands/sessions-import.d.ts +0 -14
- package/dist/commands/sessions-import.js +0 -59
- package/dist/commands/sessions-inject.d.ts +0 -60
- package/dist/commands/sessions-inject.js +3 -96
- package/dist/commands/sessions-migrate.d.ts +2 -37
- package/dist/commands/sessions-migrate.js +7 -159
- package/dist/commands/sessions-optimize.d.ts +0 -12
- package/dist/commands/sessions-picker-factory.d.ts +0 -7
- package/dist/commands/sessions-picker-factory.js +0 -8
- package/dist/commands/sessions-picker.d.ts +4 -103
- package/dist/commands/sessions-picker.js +13 -352
- package/dist/commands/sessions-render.d.ts +1 -2
- package/dist/commands/sessions-render.js +3 -7
- package/dist/commands/sessions-resume.d.ts +1 -24
- package/dist/commands/sessions-resume.js +2 -65
- package/dist/commands/sessions-share.d.ts +1 -9
- package/dist/commands/sessions-share.js +1 -45
- package/dist/commands/sessions-stats.d.ts +0 -24
- package/dist/commands/sessions-stats.js +0 -49
- package/dist/commands/sessions-stop.d.ts +1 -20
- package/dist/commands/sessions-stop.js +4 -9
- package/dist/commands/sessions-tail.d.ts +1 -19
- package/dist/commands/sessions-tail.js +3 -36
- package/dist/commands/sessions-trace.d.ts +5 -36
- package/dist/commands/sessions-trace.js +7 -82
- package/dist/commands/sessions.d.ts +1 -666
- package/dist/commands/sessions.js +30 -2279
- package/dist/commands/sessions.test-fixture.d.ts +0 -9
- package/dist/commands/sessions.test-fixture.js +8 -23
- package/dist/commands/setup-accounts.d.ts +0 -6
- package/dist/commands/setup-browser.d.ts +0 -23
- package/dist/commands/setup-browser.js +0 -28
- package/dist/commands/setup-computer.d.ts +0 -16
- package/dist/commands/setup-computer.js +0 -28
- package/dist/commands/setup-fleet.d.ts +0 -8
- package/dist/commands/setup-fleet.js +0 -11
- package/dist/commands/setup-mine.d.ts +0 -14
- package/dist/commands/setup-mine.js +0 -25
- package/dist/commands/setup-preferences.d.ts +0 -47
- package/dist/commands/setup-preferences.js +0 -53
- package/dist/commands/setup-secrets.d.ts +2 -24
- package/dist/commands/setup-secrets.js +0 -24
- package/dist/commands/setup-term.d.ts +0 -21
- package/dist/commands/setup-term.js +0 -21
- package/dist/commands/setup-terminal.d.ts +0 -1
- package/dist/commands/setup-terminal.js +0 -1
- package/dist/commands/setup-tools.d.ts +2 -0
- package/dist/commands/setup-tools.js +73 -0
- package/dist/commands/setup.d.ts +0 -20
- package/dist/commands/setup.js +4 -57
- package/dist/commands/skills.d.ts +0 -9
- package/dist/commands/skills.js +1 -22
- package/dist/commands/snapshot.d.ts +0 -9
- package/dist/commands/snapshot.js +0 -10
- package/dist/commands/ssh.d.ts +0 -64
- package/dist/commands/ssh.js +9 -420
- package/dist/commands/status.d.ts +0 -12
- package/dist/commands/status.js +0 -26
- package/dist/commands/subagents.d.ts +0 -8
- package/dist/commands/subagents.js +0 -31
- package/dist/commands/sync.d.ts +0 -37
- package/dist/commands/sync.js +0 -256
- package/dist/commands/teams-picker.d.ts +0 -3
- package/dist/commands/teams-picker.js +0 -34
- package/dist/commands/teams.d.ts +1 -76
- package/dist/commands/teams.js +9 -477
- package/dist/commands/tmux.d.ts +0 -25
- package/dist/commands/tmux.js +0 -46
- package/dist/commands/traces.js +0 -19
- package/dist/commands/trash.d.ts +0 -17
- package/dist/commands/trash.js +1 -11
- package/dist/commands/uninstall.d.ts +0 -9
- package/dist/commands/uninstall.js +0 -6
- package/dist/commands/update.d.ts +0 -22
- package/dist/commands/update.js +0 -44
- package/dist/commands/upgrade.d.ts +0 -1
- package/dist/commands/upgrade.js +0 -1
- package/dist/commands/utils.d.ts +0 -85
- package/dist/commands/utils.js +1 -95
- package/dist/commands/versions.d.ts +0 -16
- package/dist/commands/versions.js +0 -134
- package/dist/commands/view.d.ts +0 -90
- package/dist/commands/view.js +4 -343
- package/dist/commands/watchdog.d.ts +0 -19
- package/dist/commands/watchdog.js +3 -43
- package/dist/commands/webhook.d.ts +0 -8
- package/dist/commands/webhook.js +0 -14
- package/dist/commands/workflows.d.ts +0 -8
- package/dist/commands/workflows.js +0 -6
- package/dist/index.d.ts +0 -25
- package/dist/index.js +5 -119
- package/dist/lib/account-capabilities.d.ts +0 -34
- package/dist/lib/account-capabilities.js +0 -32
- package/dist/lib/account-catalog.d.ts +0 -128
- package/dist/lib/account-catalog.js +8 -154
- package/dist/lib/account-provider-registry.d.ts +0 -14
- package/dist/lib/account-provider-registry.js +0 -8
- package/dist/lib/account-registry.d.ts +0 -74
- package/dist/lib/account-registry.js +14 -189
- package/dist/lib/account-schema.d.ts +0 -19
- package/dist/lib/account-schema.js +0 -43
- package/dist/lib/accounting/account-launch.d.ts +0 -15
- package/dist/lib/accounting/account-launch.js +1 -3
- package/dist/lib/accounting/account-pool-collect.d.ts +0 -26
- package/dist/lib/accounting/account-pool-collect.js +0 -42
- package/dist/lib/accounting/account-pool.d.ts +0 -41
- package/dist/lib/accounting/account-pool.js +0 -17
- package/dist/lib/accounting/capacity.d.ts +0 -32
- package/dist/lib/accounting/capacity.js +0 -32
- package/dist/lib/accounting/rotate.d.ts +0 -518
- package/dist/lib/accounting/rotate.js +4 -598
- package/dist/lib/accounting/usage-ingest.d.ts +0 -1
- package/dist/lib/accounting/usage-ingest.js +0 -44
- package/dist/lib/accounting/usage-sync.d.ts +0 -60
- package/dist/lib/accounting/usage-sync.js +4 -51
- package/dist/lib/accounting/usage.d.ts +0 -632
- package/dist/lib/accounting/usage.js +14 -1055
- package/dist/lib/accounts/add.d.ts +0 -60
- package/dist/lib/accounts/add.js +0 -127
- package/dist/lib/accounts/auth-operation-lock.d.ts +0 -1
- package/dist/lib/accounts/auth-operation-lock.js +0 -4
- package/dist/lib/accounts/migrate.d.ts +0 -9
- package/dist/lib/accounts/migrate.js +3 -42
- package/dist/lib/accounts/slots.d.ts +0 -25
- package/dist/lib/accounts/slots.js +1 -49
- package/dist/lib/acp/client.d.ts +0 -16
- package/dist/lib/acp/client.js +0 -29
- package/dist/lib/acp/harnesses.d.ts +0 -15
- package/dist/lib/acp/harnesses.js +0 -16
- package/dist/lib/acp/run.d.ts +0 -8
- package/dist/lib/acp/run.js +0 -8
- package/dist/lib/actor.d.ts +1 -71
- package/dist/lib/actor.js +1 -99
- package/dist/lib/add-dir.d.ts +0 -46
- package/dist/lib/add-dir.js +1 -70
- package/dist/lib/address.d.ts +0 -17
- package/dist/lib/address.js +0 -15
- package/dist/lib/agent-cli-commands.d.ts +0 -10
- package/dist/lib/agent-cli-commands.js +0 -10
- package/dist/lib/agent-modes.d.ts +0 -29
- package/dist/lib/agent-modes.js +0 -31
- package/dist/lib/agent-spec/agents.d.ts +0 -426
- package/dist/lib/agent-spec/agents.js +37 -924
- package/dist/lib/agent-spec/index.d.ts +0 -5
- package/dist/lib/agent-spec/index.js +0 -14
- package/dist/lib/agent-spec/materialize.d.ts +0 -10
- package/dist/lib/agent-spec/materialize.js +2 -139
- package/dist/lib/agent-spec/package-resolve.d.ts +0 -8
- package/dist/lib/agent-spec/package-resolve.js +1 -44
- package/dist/lib/agent-spec/package-schema.d.ts +0 -2
- package/dist/lib/agent-spec/package-schema.js +0 -11
- package/dist/lib/agent-spec/package-types.d.ts +0 -27
- package/dist/lib/agent-spec/package-types.js +0 -1
- package/dist/lib/agent-spec/primitives.d.ts +0 -18
- package/dist/lib/agent-spec/primitives.js +0 -27
- package/dist/lib/agent-spec/provider.js +0 -2
- package/dist/lib/agent-spec/resolve.d.ts +0 -23
- package/dist/lib/agent-spec/resolve.js +0 -41
- package/dist/lib/agent-spec/types.d.ts +0 -34
- package/dist/lib/agent-spec/types.js +0 -6
- package/dist/lib/agents.d.ts +0 -1
- package/dist/lib/agents.js +0 -1
- package/dist/lib/analytics/mix-commands.d.ts +0 -23
- package/dist/lib/analytics/mix-commands.js +0 -26
- package/dist/lib/analytics/recipes.d.ts +0 -1
- package/dist/lib/analytics/recipes.js +5 -10
- package/dist/lib/analytics/usage-db.js +4 -6
- package/dist/lib/answer-router.d.ts +0 -61
- package/dist/lib/answer-router.js +0 -57
- package/dist/lib/app-bundle-install.d.ts +0 -13
- package/dist/lib/app-bundle-install.js +0 -50
- package/dist/lib/artifact-actions.d.ts +0 -15
- package/dist/lib/artifact-actions.js +0 -18
- package/dist/lib/artifacts-client.d.ts +0 -10
- package/dist/lib/artifacts-client.js +0 -17
- package/dist/lib/ask-classifier.d.ts +0 -38
- package/dist/lib/ask-classifier.js +0 -27
- package/dist/lib/audit/log.d.ts +0 -47
- package/dist/lib/audit/log.js +1 -59
- package/dist/lib/auth-health.d.ts +0 -213
- package/dist/lib/auth-health.js +16 -266
- package/dist/lib/auth-mint.d.ts +0 -83
- package/dist/lib/auth-mint.js +8 -85
- package/dist/lib/auto-pull-worker.d.ts +0 -10
- package/dist/lib/auto-pull-worker.js +3 -48
- package/dist/lib/auto-pull.d.ts +0 -64
- package/dist/lib/auto-pull.js +0 -79
- package/dist/lib/beta.d.ts +0 -9
- package/dist/lib/beta.js +0 -9
- package/dist/lib/binary-shadow.d.ts +0 -22
- package/dist/lib/binary-shadow.js +4 -34
- package/dist/lib/boot-profile.d.ts +0 -10
- package/dist/lib/boot-profile.js +1 -31
- package/dist/lib/brand.d.ts +0 -20
- package/dist/lib/brand.js +0 -50
- package/dist/lib/browser/context.d.ts +0 -54
- package/dist/lib/browser/context.js +0 -49
- package/dist/lib/browser/paths.d.ts +0 -21
- package/dist/lib/browser/paths.js +0 -26
- package/dist/lib/browser/record.d.ts +0 -34
- package/dist/lib/browser/record.js +0 -38
- package/dist/lib/browser/sessions-list.d.ts +1 -79
- package/dist/lib/browser/sessions-list.js +2 -98
- package/dist/lib/browser-client.d.ts +0 -112
- package/dist/lib/browser-client.js +1 -90
- package/dist/lib/budget/config.d.ts +0 -6
- package/dist/lib/budget/config.js +0 -29
- package/dist/lib/budget/enforce.d.ts +0 -50
- package/dist/lib/budget/enforce.js +0 -27
- package/dist/lib/budget/ledger.d.ts +0 -23
- package/dist/lib/budget/ledger.js +0 -28
- package/dist/lib/budget/live-cloud.d.ts +0 -26
- package/dist/lib/budget/live-cloud.js +0 -12
- package/dist/lib/budget/live-team.d.ts +0 -17
- package/dist/lib/budget/live-team.js +1 -35
- package/dist/lib/budget/preflight.d.ts +0 -51
- package/dist/lib/budget/preflight.js +0 -36
- package/dist/lib/byok-usage.d.ts +0 -20
- package/dist/lib/byok-usage.js +1 -24
- package/dist/lib/capabilities.d.ts +0 -24
- package/dist/lib/capabilities.js +0 -29
- package/dist/lib/catchup.d.ts +0 -87
- package/dist/lib/catchup.js +1 -81
- package/dist/lib/channels/owner-forward.d.ts +0 -70
- package/dist/lib/channels/owner-forward.js +1 -43
- package/dist/lib/channels/owner-sink.js +0 -21
- package/dist/lib/channels/providers/desktop.d.ts +0 -37
- package/dist/lib/channels/providers/desktop.js +0 -72
- package/dist/lib/channels/providers/index.d.ts +0 -1
- package/dist/lib/channels/providers/index.js +2 -6
- package/dist/lib/channels/providers/mailbox.js +0 -7
- package/dist/lib/channels/providers/openclaw-telegram.js +0 -8
- package/dist/lib/channels/providers/rush.d.ts +0 -2
- package/dist/lib/channels/providers/rush.js +0 -26
- package/dist/lib/channels/providers/session.d.ts +2 -0
- package/dist/lib/channels/providers/session.js +26 -0
- package/dist/lib/channels/registry.d.ts +0 -27
- package/dist/lib/channels/registry.js +0 -10
- package/dist/lib/channels/resolve.d.ts +0 -19
- package/dist/lib/channels/resolve.js +0 -2
- package/dist/lib/channels/send.d.ts +0 -50
- package/dist/lib/channels/send.js +0 -25
- package/dist/lib/checkpoint.d.ts +0 -36
- package/dist/lib/checkpoint.js +0 -28
- package/dist/lib/claude-account-token.d.ts +0 -98
- package/dist/lib/claude-account-token.js +7 -169
- package/dist/lib/claude-statusline.d.ts +0 -41
- package/dist/lib/claude-statusline.js +0 -68
- package/dist/lib/cli-entry.d.ts +0 -26
- package/dist/lib/cli-entry.js +1 -61
- package/dist/lib/cli-resources.d.ts +31 -89
- package/dist/lib/cli-resources.js +116 -152
- package/dist/lib/cloud/antigravity.d.ts +0 -29
- package/dist/lib/cloud/antigravity.js +0 -36
- package/dist/lib/cloud/codex.d.ts +0 -8
- package/dist/lib/cloud/codex.js +0 -41
- package/dist/lib/cloud/cursor.d.ts +0 -5
- package/dist/lib/cloud/cursor.js +2 -7
- package/dist/lib/cloud/dispatch.d.ts +0 -13
- package/dist/lib/cloud/dispatch.js +1 -48
- package/dist/lib/cloud/factory.d.ts +0 -52
- package/dist/lib/cloud/factory.js +3 -67
- package/dist/lib/cloud/host.d.ts +0 -39
- package/dist/lib/cloud/host.js +5 -48
- package/dist/lib/cloud/registry.d.ts +0 -25
- package/dist/lib/cloud/registry.js +0 -29
- package/dist/lib/cloud/rush.d.ts +0 -47
- package/dist/lib/cloud/rush.js +1 -82
- package/dist/lib/cloud/session-index.d.ts +0 -27
- package/dist/lib/cloud/session-index.js +1 -32
- package/dist/lib/cloud/store.d.ts +0 -18
- package/dist/lib/cloud/store.js +0 -28
- package/dist/lib/cloud/stream.d.ts +0 -14
- package/dist/lib/cloud/stream.js +0 -25
- package/dist/lib/cloud/types.d.ts +0 -168
- package/dist/lib/cloud/types.js +0 -46
- package/dist/lib/cloudflare/creds.d.ts +0 -2
- package/dist/lib/cloudflare/creds.js +0 -14
- package/dist/lib/cloudflare/provision.d.ts +0 -8
- package/dist/lib/cloudflare/provision.js +1 -19
- package/dist/lib/codex-home.d.ts +0 -60
- package/dist/lib/codex-home.js +2 -72
- package/dist/lib/codex-policy.d.ts +0 -10
- package/dist/lib/codex-policy.js +0 -13
- package/dist/lib/command-skills.d.ts +0 -10
- package/dist/lib/command-skills.js +0 -10
- package/dist/lib/commands.d.ts +0 -74
- package/dist/lib/commands.js +0 -112
- package/dist/lib/comms-render.d.ts +0 -5
- package/dist/lib/comms-render.js +0 -5
- package/dist/lib/computer/context.d.ts +0 -23
- package/dist/lib/computer/context.js +0 -14
- package/dist/lib/computer/policy.d.ts +0 -20
- package/dist/lib/computer/policy.js +0 -53
- package/dist/lib/computer/record.d.ts +0 -33
- package/dist/lib/computer/record.js +1 -48
- package/dist/lib/computer/sessions-list.d.ts +1 -128
- package/dist/lib/computer/sessions-list.js +6 -165
- package/dist/lib/computer-client.d.ts +0 -106
- package/dist/lib/computer-client.js +5 -86
- package/dist/lib/concurrency.d.ts +0 -14
- package/dist/lib/concurrency.js +0 -3
- package/dist/lib/config-drift.d.ts +0 -31
- package/dist/lib/config-drift.js +0 -32
- package/dist/lib/config-keys.d.ts +1 -65
- package/dist/lib/config-keys.js +6 -52
- package/dist/lib/config-transfer.d.ts +0 -14
- package/dist/lib/config-transfer.js +0 -26
- package/dist/lib/convert.d.ts +0 -17
- package/dist/lib/convert.js +0 -18
- package/dist/lib/crabbox/cli.d.ts +0 -156
- package/dist/lib/crabbox/cli.js +1 -188
- package/dist/lib/crabbox/config.d.ts +0 -18
- package/dist/lib/crabbox/config.js +1 -19
- package/dist/lib/crabbox/lease.d.ts +0 -93
- package/dist/lib/crabbox/lease.js +4 -148
- package/dist/lib/crabbox/progress.d.ts +0 -56
- package/dist/lib/crabbox/progress.js +2 -49
- package/dist/lib/crabbox/runtimes.d.ts +0 -94
- package/dist/lib/crabbox/runtimes.js +1 -111
- package/dist/lib/crabbox/setup-copy.d.ts +0 -64
- package/dist/lib/crabbox/setup-copy.js +1 -53
- package/dist/lib/daemon/account-state-daemon-service.d.ts +0 -48
- package/dist/lib/daemon/account-state-daemon-service.js +2 -63
- package/dist/lib/daemon/attention-notify-service.d.ts +0 -12
- package/dist/lib/daemon/attention-notify-service.js +1 -24
- package/dist/lib/daemon/auth-sync-service.d.ts +0 -28
- package/dist/lib/daemon/auth-sync-service.js +0 -56
- package/dist/lib/daemon/catchup-service.d.ts +0 -34
- package/dist/lib/daemon/catchup-service.js +0 -30
- package/dist/lib/daemon/daemon.d.ts +0 -374
- package/dist/lib/daemon/daemon.js +44 -1049
- package/dist/lib/daemon/daemon.test-fixture.d.ts +0 -19
- package/dist/lib/daemon/daemon.test-fixture.js +1 -24
- package/dist/lib/daemon/device-probe-service.d.ts +0 -16
- package/dist/lib/daemon/device-probe-service.js +0 -20
- package/dist/lib/daemon/feed-stream-service.d.ts +0 -15
- package/dist/lib/daemon/feed-stream-service.js +0 -20
- package/dist/lib/daemon/harness-update-service.d.ts +2 -61
- package/dist/lib/daemon/harness-update-service.js +6 -86
- package/dist/lib/daemon/heartbeat-service.d.ts +0 -1
- package/dist/lib/daemon/heartbeat-service.js +0 -1
- package/dist/lib/daemon/leaked-daemons.d.ts +0 -46
- package/dist/lib/daemon/leaked-daemons.js +2 -78
- package/dist/lib/daemon/monitor-engine-service.d.ts +0 -13
- package/dist/lib/daemon/monitor-engine-service.js +3 -15
- package/dist/lib/daemon/runner.d.ts +0 -194
- package/dist/lib/daemon/runner.js +39 -760
- package/dist/lib/daemon/self-heal-service.d.ts +18 -17
- package/dist/lib/daemon/self-heal-service.js +83 -37
- package/dist/lib/daemon/self-update-service.d.ts +1 -131
- package/dist/lib/daemon/self-update-service.js +26 -189
- package/dist/lib/daemon/service.d.ts +0 -73
- package/dist/lib/daemon/service.js +0 -34
- package/dist/lib/daemon/session-index-service.d.ts +0 -12
- package/dist/lib/daemon/session-index-service.js +0 -23
- package/dist/lib/daemon/session-state-service.d.ts +0 -8
- package/dist/lib/daemon/session-state-service.js +0 -8
- package/dist/lib/daemon/session-summarizer-service.d.ts +0 -14
- package/dist/lib/daemon/session-summarizer-service.js +1 -19
- package/dist/lib/daemon/session-title-service.d.ts +0 -25
- package/dist/lib/daemon/session-title-service.js +0 -32
- package/dist/lib/daemon/state-dir-check-service.d.ts +0 -24
- package/dist/lib/daemon/state-dir-check-service.js +0 -29
- package/dist/lib/daemon/supervisor.d.ts +0 -112
- package/dist/lib/daemon/supervisor.js +4 -147
- package/dist/lib/daemon/testdata/process-view-daemon.js +0 -2
- package/dist/lib/daemon/testdata/process-view-start.js +0 -5
- package/dist/lib/daemon/tmux-reap-service.d.ts +0 -1
- package/dist/lib/daemon/tmux-reap-service.js +0 -1
- package/dist/lib/daemon/usage-sync-service.d.ts +0 -23
- package/dist/lib/daemon/usage-sync-service.js +0 -26
- package/dist/lib/daemon/watchdog-service.d.ts +0 -9
- package/dist/lib/daemon/watchdog-service.js +0 -13
- package/dist/lib/daemon/webhook-receiver-service.d.ts +0 -1
- package/dist/lib/daemon/webhook-receiver-service.js +0 -1
- package/dist/lib/daemon-health.d.ts +0 -55
- package/dist/lib/daemon-health.js +4 -77
- package/dist/lib/daemon-services.d.ts +0 -36
- package/dist/lib/daemon-services.js +0 -45
- package/dist/lib/daemon-ticks.d.ts +0 -126
- package/dist/lib/daemon-ticks.js +1 -156
- package/dist/lib/daemon-webhooks.d.ts +0 -57
- package/dist/lib/daemon-webhooks.js +2 -54
- package/dist/lib/deeplink/register.d.ts +0 -15
- package/dist/lib/deeplink/register.js +0 -60
- package/dist/lib/deeplink/url.d.ts +0 -24
- package/dist/lib/deeplink/url.js +1 -33
- package/dist/lib/device-config.d.ts +1 -192
- package/dist/lib/device-config.js +86 -240
- package/dist/lib/devices/config-migration.d.ts +0 -43
- package/dist/lib/devices/config-migration.js +7 -127
- package/dist/lib/devices/connect.d.ts +0 -168
- package/dist/lib/devices/connect.js +6 -254
- package/dist/lib/devices/device-docs.d.ts +0 -24
- package/dist/lib/devices/device-docs.js +0 -46
- package/dist/lib/devices/discovery-policy.d.ts +0 -30
- package/dist/lib/devices/discovery-policy.js +3 -34
- package/dist/lib/devices/doctor-findings.d.ts +0 -109
- package/dist/lib/devices/doctor-findings.js +30 -326
- package/dist/lib/devices/doctor-overview-cache.d.ts +0 -33
- package/dist/lib/devices/doctor-overview-cache.js +0 -81
- package/dist/lib/devices/fleet-divergence.d.ts +0 -89
- package/dist/lib/devices/fleet-divergence.js +1 -60
- package/dist/lib/devices/fleet-inventory.d.ts +0 -27
- package/dist/lib/devices/fleet-inventory.js +0 -38
- package/dist/lib/devices/fleet.d.ts +0 -95
- package/dist/lib/devices/fleet.js +0 -79
- package/dist/lib/devices/harness-inventory.d.ts +0 -75
- package/dist/lib/devices/harness-inventory.js +0 -101
- package/dist/lib/devices/health-report.d.ts +0 -37
- package/dist/lib/devices/health-report.js +0 -73
- package/dist/lib/devices/health.d.ts +0 -71
- package/dist/lib/devices/health.js +2 -82
- package/dist/lib/devices/interactive-host.d.ts +0 -10
- package/dist/lib/devices/interactive-host.js +0 -34
- package/dist/lib/devices/known-hosts.d.ts +0 -45
- package/dist/lib/devices/known-hosts.js +0 -77
- package/dist/lib/devices/pending.d.ts +0 -31
- package/dist/lib/devices/pending.js +7 -67
- package/dist/lib/devices/pool.d.ts +0 -36
- package/dist/lib/devices/pool.js +0 -30
- package/dist/lib/devices/reachability.d.ts +0 -25
- package/dist/lib/devices/reachability.js +0 -14
- package/dist/lib/devices/registry.d.ts +0 -141
- package/dist/lib/devices/registry.js +4 -151
- package/dist/lib/devices/resolve-profile.d.ts +0 -18
- package/dist/lib/devices/resolve-profile.js +0 -18
- package/dist/lib/devices/resolve-target.d.ts +0 -20
- package/dist/lib/devices/resolve-target.js +1 -51
- package/dist/lib/devices/rollout-verify.d.ts +1 -81
- package/dist/lib/devices/rollout-verify.js +0 -77
- package/dist/lib/devices/self-host.d.ts +0 -7
- package/dist/lib/devices/self-host.js +1 -29
- package/dist/lib/devices/ssh-config.d.ts +0 -18
- package/dist/lib/devices/ssh-config.js +0 -9
- package/dist/lib/devices/stats-cache.d.ts +0 -48
- package/dist/lib/devices/stats-cache.js +0 -80
- package/dist/lib/devices/sync.d.ts +0 -97
- package/dist/lib/devices/sync.js +0 -88
- package/dist/lib/devices/tailscale.d.ts +0 -18
- package/dist/lib/devices/tailscale.js +1 -38
- package/dist/lib/devices/terminfo.d.ts +0 -27
- package/dist/lib/devices/terminfo.js +2 -64
- package/dist/lib/devices/worker-pick.d.ts +0 -15
- package/dist/lib/devices/worker-pick.js +0 -48
- package/dist/lib/diff-text.d.ts +0 -18
- package/dist/lib/diff-text.js +0 -15
- package/dist/lib/doctor-diff.d.ts +0 -79
- package/dist/lib/doctor-diff.js +2 -181
- package/dist/lib/drift-sync.d.ts +0 -29
- package/dist/lib/drift-sync.js +0 -40
- package/dist/lib/drift.d.ts +0 -43
- package/dist/lib/drift.js +0 -31
- package/dist/lib/event-families.d.ts +0 -17
- package/dist/lib/event-families.js +0 -33
- package/dist/lib/event-provenance.d.ts +0 -4
- package/dist/lib/event-provenance.js +0 -5
- package/dist/lib/event-stream.d.ts +0 -29
- package/dist/lib/event-stream.js +0 -36
- package/dist/lib/events-ingest.d.ts +0 -27
- package/dist/lib/events-ingest.js +0 -54
- package/dist/lib/exec-account-home.d.ts +0 -24
- package/dist/lib/exec-account-home.js +0 -41
- package/dist/lib/exec-bounded.d.ts +1 -37
- package/dist/lib/exec-bounded.js +10 -46
- package/dist/lib/exec.d.ts +3 -583
- package/dist/lib/exec.js +18 -1025
- package/dist/lib/factory/snapshot.js +1 -15
- package/dist/lib/feed/activity-stream.d.ts +0 -27
- package/dist/lib/feed/activity-stream.js +4 -80
- package/dist/lib/feed/activity.d.ts +1 -243
- package/dist/lib/feed/activity.js +8 -273
- package/dist/lib/feed/answer.d.ts +0 -103
- package/dist/lib/feed/answer.js +0 -267
- package/dist/lib/feed/attention.d.ts +0 -56
- package/dist/lib/feed/attention.js +0 -161
- package/dist/lib/feed/envelope.d.ts +2 -17
- package/dist/lib/feed/envelope.js +0 -14
- package/dist/lib/feed/events.d.ts +0 -118
- package/dist/lib/feed/events.js +13 -213
- package/dist/lib/feed/feed.d.ts +1 -250
- package/dist/lib/feed/feed.js +24 -334
- package/dist/lib/feed/hub-server.d.ts +0 -100
- package/dist/lib/feed/hub-server.js +1 -191
- package/dist/lib/feed/hub.d.ts +0 -53
- package/dist/lib/feed/hub.js +0 -89
- package/dist/lib/feed/pr-status.d.ts +1 -19
- package/dist/lib/feed/pr-status.js +0 -18
- package/dist/lib/feed/tool-activity.d.ts +0 -59
- package/dist/lib/feed/tool-activity.js +1 -119
- package/dist/lib/feed/tools.d.ts +0 -100
- package/dist/lib/feed/tools.js +0 -89
- package/dist/lib/feed/watch.d.ts +0 -33
- package/dist/lib/feed/watch.js +2 -94
- package/dist/lib/feed-broadcast.d.ts +0 -148
- package/dist/lib/feed-broadcast.js +1 -283
- package/dist/lib/feed-outcome.d.ts +0 -50
- package/dist/lib/feed-outcome.js +1 -67
- package/dist/lib/feed-policy.d.ts +0 -6
- package/dist/lib/feed-policy.js +1 -27
- package/dist/lib/feed-post.d.ts +0 -61
- package/dist/lib/feed-post.js +4 -61
- package/dist/lib/feed-ranking.d.ts +1 -1
- package/dist/lib/fleet/apply.d.ts +0 -64
- package/dist/lib/fleet/apply.js +0 -125
- package/dist/lib/fleet/auth-sync.d.ts +0 -48
- package/dist/lib/fleet/auth-sync.js +4 -49
- package/dist/lib/fleet/capture.d.ts +0 -26
- package/dist/lib/fleet/capture.js +1 -36
- package/dist/lib/fleet/manifest.d.ts +0 -38
- package/dist/lib/fleet/manifest.js +0 -40
- package/dist/lib/fleet/types.d.ts +1 -138
- package/dist/lib/fleet/types.js +0 -12
- package/dist/lib/fleet-cache.d.ts +0 -12
- package/dist/lib/fleet-cache.js +0 -24
- package/dist/lib/fleet-shared-state.d.ts +6 -59
- package/dist/lib/fleet-shared-state.js +5 -51
- package/dist/lib/fleet-status.d.ts +0 -27
- package/dist/lib/fleet-status.js +0 -48
- package/dist/lib/format.d.ts +0 -74
- package/dist/lib/format.js +3 -77
- package/dist/lib/friction-heuristics.d.ts +0 -20
- package/dist/lib/friction-heuristics.js +0 -8
- package/dist/lib/fs-atomic.d.ts +0 -51
- package/dist/lib/fs-atomic.js +8 -66
- package/dist/lib/fs-walk.d.ts +0 -13
- package/dist/lib/fs-walk.js +0 -22
- package/dist/lib/fuzzy.d.ts +0 -29
- package/dist/lib/fuzzy.js +0 -31
- package/dist/lib/gemini-settings.js +0 -12
- package/dist/lib/git.d.ts +0 -366
- package/dist/lib/git.js +7 -574
- package/dist/lib/github/ci-failure.d.ts +30 -0
- package/dist/lib/github/ci-failure.js +95 -0
- package/dist/lib/github/gh-overload.d.ts +0 -38
- package/dist/lib/github/gh-overload.js +3 -55
- package/dist/lib/github/pr-mergeable.d.ts +3 -34
- package/dist/lib/github/pr-mergeable.js +2 -42
- package/dist/lib/github/pr-verdict.d.ts +0 -44
- package/dist/lib/github/pr-verdict.js +0 -36
- package/dist/lib/github/project-prs.d.ts +135 -105
- package/dist/lib/github/project-prs.js +530 -170
- package/dist/lib/github/release-drift.d.ts +45 -0
- package/dist/lib/github/release-drift.js +91 -0
- package/dist/lib/github/rest.d.ts +0 -50
- package/dist/lib/github/rest.js +0 -49
- package/dist/lib/github/viewer.d.ts +27 -0
- package/dist/lib/github/viewer.js +101 -0
- package/dist/lib/goose-commands.d.ts +0 -29
- package/dist/lib/goose-commands.js +3 -48
- package/dist/lib/harness/adapter.d.ts +0 -151
- package/dist/lib/harness/adapter.js +0 -41
- package/dist/lib/harness/adapters/claude.d.ts +0 -8
- package/dist/lib/harness/adapters/claude.js +0 -89
- package/dist/lib/harness/adapters/codex.js +0 -18
- package/dist/lib/harness/adapters/copilot.js +0 -3
- package/dist/lib/harness/adapters/cursor.js +0 -16
- package/dist/lib/harness/adapters/droid.js +0 -3
- package/dist/lib/harness/adapters/kimi.js +0 -19
- package/dist/lib/harness/adapters/muse.js +0 -9
- package/dist/lib/harness/adapters/opencode.js +0 -2
- package/dist/lib/harness/exec-config-version.d.ts +0 -2
- package/dist/lib/harness/exec-config-version.js +0 -13
- package/dist/lib/harness/index.js +0 -10
- package/dist/lib/harness-auth-capabilities.d.ts +0 -26
- package/dist/lib/harness-auth-capabilities.js +0 -18
- package/dist/lib/harness-connection-test.d.ts +0 -27
- package/dist/lib/harness-connection-test.js +2 -20
- package/dist/lib/heal.d.ts +0 -45
- package/dist/lib/heal.js +2 -82
- package/dist/lib/help.d.ts +0 -32
- package/dist/lib/help.js +0 -41
- package/dist/lib/helper-download.d.ts +0 -85
- package/dist/lib/helper-download.js +0 -95
- package/dist/lib/helper-versions.d.ts +0 -51
- package/dist/lib/helper-versions.js +1 -45
- package/dist/lib/hooks/cache.d.ts +0 -40
- package/dist/lib/hooks/cache.js +8 -122
- package/dist/lib/hooks/install.d.ts +0 -253
- package/dist/lib/hooks/install.js +49 -822
- package/dist/lib/hooks/match.d.ts +0 -24
- package/dist/lib/hooks/match.js +0 -31
- package/dist/lib/hooks/profile.d.ts +0 -21
- package/dist/lib/hooks/profile.js +0 -28
- package/dist/lib/hosts/credential-transport.d.ts +0 -6
- package/dist/lib/hosts/credential-transport.js +0 -17
- package/dist/lib/hosts/credentials.d.ts +0 -35
- package/dist/lib/hosts/credentials.js +0 -38
- package/dist/lib/hosts/dispatch.d.ts +0 -140
- package/dist/lib/hosts/dispatch.js +0 -176
- package/dist/lib/hosts/logs.d.ts +0 -25
- package/dist/lib/hosts/logs.js +1 -51
- package/dist/lib/hosts/option.d.ts +0 -12
- package/dist/lib/hosts/option.js +0 -12
- package/dist/lib/hosts/passthrough.d.ts +0 -129
- package/dist/lib/hosts/passthrough.js +12 -249
- package/dist/lib/hosts/progress.d.ts +0 -90
- package/dist/lib/hosts/progress.js +5 -115
- package/dist/lib/hosts/providers/devices.d.ts +0 -19
- package/dist/lib/hosts/providers/devices.js +1 -34
- package/dist/lib/hosts/providers/local.d.ts +0 -14
- package/dist/lib/hosts/providers/local.js +0 -22
- package/dist/lib/hosts/ready.d.ts +0 -99
- package/dist/lib/hosts/ready.js +0 -101
- package/dist/lib/hosts/reconcile.d.ts +0 -38
- package/dist/lib/hosts/reconcile.js +1 -50
- package/dist/lib/hosts/reconnect.d.ts +0 -75
- package/dist/lib/hosts/reconnect.js +0 -98
- package/dist/lib/hosts/registry.d.ts +0 -74
- package/dist/lib/hosts/registry.js +0 -110
- package/dist/lib/hosts/remote-cmd.d.ts +1 -228
- package/dist/lib/hosts/remote-cmd.js +19 -294
- package/dist/lib/hosts/remote-cmd.test-fixture.d.ts +0 -1
- package/dist/lib/hosts/remote-cmd.test-fixture.js +0 -12
- package/dist/lib/hosts/remote-os.d.ts +0 -19
- package/dist/lib/hosts/remote-os.js +0 -22
- package/dist/lib/hosts/remote-session-id.d.ts +0 -22
- package/dist/lib/hosts/remote-session-id.js +0 -24
- package/dist/lib/hosts/routing-flag.d.ts +0 -21
- package/dist/lib/hosts/routing-flag.js +0 -21
- package/dist/lib/hosts/run-target.d.ts +0 -53
- package/dist/lib/hosts/run-target.js +0 -56
- package/dist/lib/hosts/session-index.d.ts +1 -53
- package/dist/lib/hosts/session-index.js +2 -59
- package/dist/lib/hosts/session-marker.d.ts +0 -31
- package/dist/lib/hosts/session-marker.js +0 -32
- package/dist/lib/hosts/ssh-config.d.ts +0 -25
- package/dist/lib/hosts/ssh-config.js +1 -32
- package/dist/lib/hosts/tasks.d.ts +0 -54
- package/dist/lib/hosts/tasks.js +0 -35
- package/dist/lib/hosts/types.d.ts +0 -39
- package/dist/lib/hosts/types.js +0 -22
- package/dist/lib/humans.d.ts +0 -21
- package/dist/lib/humans.js +0 -30
- package/dist/lib/identity/client.d.ts +1 -35
- package/dist/lib/identity/client.js +3 -29
- package/dist/lib/identity/index.d.ts +3 -27
- package/dist/lib/identity/index.js +8 -24
- package/dist/lib/import.d.ts +0 -104
- package/dist/lib/import.js +1 -137
- package/dist/lib/installations/active-check.d.ts +0 -53
- package/dist/lib/installations/active-check.js +0 -49
- package/dist/lib/installations/index.d.ts +0 -9
- package/dist/lib/installations/index.js +0 -9
- package/dist/lib/installations/installation-lock.js +0 -8
- package/dist/lib/installations/launch-gate.d.ts +0 -56
- package/dist/lib/installations/launch-gate.js +0 -83
- package/dist/lib/installations/migrate.d.ts +0 -100
- package/dist/lib/installations/migrate.js +105 -572
- package/dist/lib/installations/native-command.d.ts +0 -1
- package/dist/lib/installations/native-command.js +0 -6
- package/dist/lib/installations/resolve.d.ts +0 -24
- package/dist/lib/installations/resolve.js +0 -24
- package/dist/lib/installations/shims.d.ts +0 -395
- package/dist/lib/installations/shims.js +30 -957
- package/dist/lib/installations/store.d.ts +0 -199
- package/dist/lib/installations/store.js +1 -297
- package/dist/lib/installations/strategies.d.ts +0 -44
- package/dist/lib/installations/strategies.js +0 -87
- package/dist/lib/installations/types.d.ts +1 -67
- package/dist/lib/installations/types.js +0 -6
- package/dist/lib/installations/update-cancellation.d.ts +0 -74
- package/dist/lib/installations/update-cancellation.js +0 -74
- package/dist/lib/installations/update-policy.d.ts +0 -57
- package/dist/lib/installations/update-policy.js +0 -62
- package/dist/lib/installations/update-runtime.d.ts +0 -88
- package/dist/lib/installations/update-runtime.js +1 -127
- package/dist/lib/installations/update.d.ts +0 -53
- package/dist/lib/installations/update.js +0 -95
- package/dist/lib/installations/versions.d.ts +0 -310
- package/dist/lib/installations/versions.js +14 -837
- package/dist/lib/isolation-boundary-report.d.ts +0 -7
- package/dist/lib/isolation-boundary-report.js +0 -7
- package/dist/lib/launch-identity.d.ts +0 -8
- package/dist/lib/launch-identity.js +0 -8
- package/dist/lib/linear-autoclose.d.ts +0 -25
- package/dist/lib/linear-autoclose.js +0 -19
- package/dist/lib/linear-cache.d.ts +0 -57
- package/dist/lib/linear-cache.js +1 -81
- package/dist/lib/linear-project-counts.d.ts +0 -83
- package/dist/lib/linear-project-counts.js +2 -64
- package/dist/lib/linear-projects.d.ts +0 -62
- package/dist/lib/linear-projects.js +0 -85
- package/dist/lib/linear-rate-limit.d.ts +0 -21
- package/dist/lib/linear-rate-limit.js +1 -93
- package/dist/lib/linux-userns.d.ts +1 -42
- package/dist/lib/linux-userns.js +0 -47
- package/dist/lib/lock-compromise.d.ts +0 -7
- package/dist/lib/lock-compromise.js +0 -7
- package/dist/lib/log-follow.d.ts +0 -2
- package/dist/lib/log-follow.js +5 -15
- package/dist/lib/loop.d.ts +0 -106
- package/dist/lib/loop.js +0 -135
- package/dist/lib/machine-id.d.ts +0 -19
- package/dist/lib/machine-id.js +0 -19
- package/dist/lib/mailbox-gc.d.ts +0 -7
- package/dist/lib/mailbox-gc.js +0 -25
- package/dist/lib/mailbox-target.d.ts +0 -31
- package/dist/lib/mailbox-target.js +0 -27
- package/dist/lib/mailbox.d.ts +0 -77
- package/dist/lib/mailbox.js +5 -105
- package/dist/lib/manifest.d.ts +0 -4
- package/dist/lib/manifest.js +0 -36
- package/dist/lib/markdown.d.ts +0 -3
- package/dist/lib/markdown.js +0 -9
- package/dist/lib/mcp-registry.d.ts +1 -50
- package/dist/lib/mcp-registry.js +0 -64
- package/dist/lib/mcp.d.ts +0 -115
- package/dist/lib/mcp.js +3 -199
- package/dist/lib/memory-cache.d.ts +0 -11
- package/dist/lib/memory-cache.js +0 -9
- package/dist/lib/memory.d.ts +0 -52
- package/dist/lib/memory.js +12 -74
- package/dist/lib/menubar/download-menubar.d.ts +0 -35
- package/dist/lib/menubar/download-menubar.js +0 -38
- package/dist/lib/menubar/install-menubar.d.ts +0 -405
- package/dist/lib/menubar/install-menubar.js +25 -667
- package/dist/lib/menubar/migrate-prefs.d.ts +0 -47
- package/dist/lib/menubar/migrate-prefs.js +1 -70
- package/dist/lib/menubar/notify-desktop.d.ts +0 -82
- package/dist/lib/menubar/notify-desktop.js +0 -68
- package/dist/lib/menubar/resolve-version.d.ts +0 -41
- package/dist/lib/menubar/resolve-version.js +2 -44
- package/dist/lib/menubar/snapshot.d.ts +13 -66
- package/dist/lib/menubar/snapshot.js +45 -39
- package/dist/lib/merged-resources.d.ts +0 -10
- package/dist/lib/merged-resources.js +0 -10
- package/dist/lib/migrate-fold.d.ts +0 -31
- package/dist/lib/migrate-fold.js +6 -38
- package/dist/lib/model-tier-overrides.d.ts +0 -30
- package/dist/lib/model-tier-overrides.js +0 -14
- package/dist/lib/model-tiers.d.ts +0 -43
- package/dist/lib/model-tiers.js +5 -78
- package/dist/lib/models.d.ts +0 -145
- package/dist/lib/models.js +3 -333
- package/dist/lib/monitors/config.d.ts +0 -187
- package/dist/lib/monitors/config.js +4 -101
- package/dist/lib/monitors/dispatch.d.ts +0 -22
- package/dist/lib/monitors/dispatch.js +0 -35
- package/dist/lib/monitors/engine.d.ts +1 -53
- package/dist/lib/monitors/engine.js +17 -106
- package/dist/lib/monitors/fingerprint.d.ts +0 -43
- package/dist/lib/monitors/fingerprint.js +0 -57
- package/dist/lib/monitors/pid-watch.d.ts +0 -31
- package/dist/lib/monitors/pid-watch.js +0 -31
- package/dist/lib/monitors/remote.d.ts +0 -52
- package/dist/lib/monitors/remote.js +0 -42
- package/dist/lib/monitors/sources/command.d.ts +2 -9
- package/dist/lib/monitors/sources/command.js +13 -34
- package/dist/lib/monitors/sources/device.d.ts +0 -10
- package/dist/lib/monitors/sources/device.js +0 -14
- package/dist/lib/monitors/sources/failure.d.ts +0 -27
- package/dist/lib/monitors/sources/failure.js +0 -27
- package/dist/lib/monitors/sources/file.d.ts +0 -10
- package/dist/lib/monitors/sources/file.js +0 -11
- package/dist/lib/monitors/sources/http.d.ts +0 -7
- package/dist/lib/monitors/sources/http.js +0 -9
- package/dist/lib/monitors/sources/index.d.ts +0 -9
- package/dist/lib/monitors/sources/index.js +0 -9
- package/dist/lib/monitors/sources/poll.d.ts +0 -8
- package/dist/lib/monitors/sources/poll.js +0 -8
- package/dist/lib/monitors/sources/types.d.ts +0 -18
- package/dist/lib/monitors/sources/types.js +0 -8
- package/dist/lib/monitors/sources/webhook.d.ts +0 -7
- package/dist/lib/monitors/sources/webhook.js +0 -7
- package/dist/lib/monitors/sources/ws.d.ts +0 -10
- package/dist/lib/monitors/sources/ws.js +3 -13
- package/dist/lib/monitors/state.d.ts +0 -132
- package/dist/lib/monitors/state.js +2 -86
- package/dist/lib/native-accounts.d.ts +0 -32
- package/dist/lib/native-accounts.js +0 -17
- package/dist/lib/net-close.d.ts +0 -9
- package/dist/lib/net-close.js +0 -5
- package/dist/lib/notify.d.ts +0 -47
- package/dist/lib/notify.js +0 -30
- package/dist/lib/onepassword.d.ts +0 -14
- package/dist/lib/onepassword.js +0 -12
- package/dist/lib/open-url.d.ts +0 -38
- package/dist/lib/open-url.js +1 -69
- package/dist/lib/openclaw-keychain.js +2 -7
- package/dist/lib/operator.d.ts +0 -9
- package/dist/lib/operator.js +0 -34
- package/dist/lib/origin-machine.d.ts +0 -16
- package/dist/lib/origin-machine.js +0 -16
- package/dist/lib/output/git-output.d.ts +0 -31
- package/dist/lib/output/git-output.js +4 -43
- package/dist/lib/overdue.d.ts +0 -35
- package/dist/lib/overdue.js +0 -60
- package/dist/lib/owner-message.d.ts +0 -20
- package/dist/lib/owner-message.js +1 -40
- package/dist/lib/packages/output-home.d.ts +0 -28
- package/dist/lib/packages/output-home.js +0 -114
- package/dist/lib/paths.d.ts +0 -26
- package/dist/lib/paths.js +1 -27
- package/dist/lib/percentile.d.ts +0 -11
- package/dist/lib/percentile.js +0 -11
- package/dist/lib/perf/db.d.ts +0 -16
- package/dist/lib/perf/db.js +3 -32
- package/dist/lib/perf/spool.d.ts +0 -12
- package/dist/lib/perf/spool.js +0 -13
- package/dist/lib/perf/types.d.ts +0 -26
- package/dist/lib/perf/types.js +0 -1
- package/dist/lib/permissions-registry.d.ts +0 -48
- package/dist/lib/permissions-registry.js +0 -108
- package/dist/lib/permissions.d.ts +0 -215
- package/dist/lib/permissions.js +4 -407
- package/dist/lib/picker.d.ts +0 -124
- package/dist/lib/picker.js +0 -140
- package/dist/lib/placement.d.ts +0 -57
- package/dist/lib/placement.js +0 -47
- package/dist/lib/platform/exec.d.ts +0 -73
- package/dist/lib/platform/exec.js +0 -80
- package/dist/lib/platform/index.d.ts +0 -14
- package/dist/lib/platform/index.js +0 -14
- package/dist/lib/platform/ipc.d.ts +0 -10
- package/dist/lib/platform/ipc.js +0 -13
- package/dist/lib/platform/links.d.ts +0 -14
- package/dist/lib/platform/links.js +0 -25
- package/dist/lib/platform/paths.d.ts +0 -48
- package/dist/lib/platform/paths.js +0 -52
- package/dist/lib/platform/posixpath.d.ts +0 -18
- package/dist/lib/platform/posixpath.js +0 -62
- package/dist/lib/platform/process.d.ts +0 -67
- package/dist/lib/platform/process.js +5 -99
- package/dist/lib/platform/winpath.d.ts +0 -50
- package/dist/lib/platform/winpath.js +0 -81
- package/dist/lib/plugins/plugin-marketplace.d.ts +0 -165
- package/dist/lib/plugins/plugin-marketplace.js +10 -238
- package/dist/lib/plugins/plugins.d.ts +0 -238
- package/dist/lib/plugins/plugins.js +20 -454
- package/dist/lib/plugins/skills.d.ts +0 -86
- package/dist/lib/plugins/skills.js +1 -139
- package/dist/lib/pr-land-detach.d.ts +0 -17
- package/dist/lib/pr-land-detach.js +0 -30
- package/dist/lib/pricing/cost.d.ts +0 -29
- package/dist/lib/pricing/cost.js +0 -38
- package/dist/lib/pricing/index.d.ts +0 -6
- package/dist/lib/pricing/index.js +0 -6
- package/dist/lib/pricing/table.d.ts +0 -8
- package/dist/lib/pricing/table.js +3 -56
- package/dist/lib/probe.d.ts +0 -5
- package/dist/lib/probe.js +0 -40
- package/dist/lib/profiles-presets.d.ts +0 -20
- package/dist/lib/profiles-presets.js +1 -36
- package/dist/lib/profiles.d.ts +0 -185
- package/dist/lib/profiles.js +1 -158
- package/dist/lib/project-doctor.d.ts +0 -29
- package/dist/lib/project-doctor.js +0 -26
- package/dist/lib/project-focus.d.ts +0 -41
- package/dist/lib/project-focus.js +0 -49
- package/dist/lib/project-import.d.ts +0 -41
- package/dist/lib/project-import.js +0 -36
- package/dist/lib/project-key.d.ts +0 -65
- package/dist/lib/project-key.js +0 -70
- package/dist/lib/project-launch.d.ts +0 -49
- package/dist/lib/project-launch.js +2 -91
- package/dist/lib/project-probe.d.ts +0 -86
- package/dist/lib/project-probe.js +1 -88
- package/dist/lib/project-pull.d.ts +0 -96
- package/dist/lib/project-pull.js +0 -122
- package/dist/lib/project-resources.d.ts +0 -44
- package/dist/lib/project-resources.js +7 -171
- package/dist/lib/project-root.d.ts +0 -95
- package/dist/lib/project-root.js +0 -101
- package/dist/lib/project-schedule.d.ts +0 -43
- package/dist/lib/project-schedule.js +0 -52
- package/dist/lib/project-status.d.ts +0 -108
- package/dist/lib/project-status.js +0 -117
- package/dist/lib/projects.d.ts +0 -197
- package/dist/lib/projects.js +1 -213
- package/dist/lib/pwsh.d.ts +0 -41
- package/dist/lib/pwsh.js +0 -51
- package/dist/lib/quick-todo.d.ts +84 -0
- package/dist/lib/quick-todo.js +243 -0
- package/dist/lib/reconcile-and-repair.d.ts +0 -78
- package/dist/lib/reconcile-and-repair.js +3 -66
- package/dist/lib/redact.d.ts +0 -29
- package/dist/lib/redact.js +0 -54
- package/dist/lib/refresh-coordinator.d.ts +0 -15
- package/dist/lib/refresh-coordinator.js +0 -10
- package/dist/lib/refresh.d.ts +0 -39
- package/dist/lib/refresh.js +0 -45
- package/dist/lib/registry.d.ts +0 -65
- package/dist/lib/registry.js +0 -127
- package/dist/lib/reminders.d.ts +0 -21
- package/dist/lib/reminders.js +0 -30
- package/dist/lib/remote-agents-json.d.ts +0 -44
- package/dist/lib/remote-agents-json.js +1 -44
- package/dist/lib/reserved-stores.d.ts +0 -28
- package/dist/lib/reserved-stores.js +2 -28
- package/dist/lib/resource-aliases.d.ts +0 -12
- package/dist/lib/resource-aliases.js +0 -12
- package/dist/lib/resource-content-diff.d.ts +0 -28
- package/dist/lib/resource-content-diff.js +7 -34
- package/dist/lib/resource-inventory.d.ts +0 -51
- package/dist/lib/resource-inventory.js +0 -45
- package/dist/lib/resource-patterns.d.ts +0 -32
- package/dist/lib/resource-patterns.js +0 -34
- package/dist/lib/resource-profiles.d.ts +0 -7
- package/dist/lib/resource-profiles.js +0 -11
- package/dist/lib/resources/types.d.ts +0 -50
- package/dist/lib/resources/types.js +0 -7
- package/dist/lib/resources/workflows.d.ts +0 -7
- package/dist/lib/resources/workflows.js +0 -13
- package/dist/lib/resources.d.ts +0 -65
- package/dist/lib/resources.js +0 -78
- package/dist/lib/routers.d.ts +0 -67
- package/dist/lib/routers.js +0 -60
- package/dist/lib/routine-activation.d.ts +0 -23
- package/dist/lib/routine-activation.js +0 -24
- package/dist/lib/routine-context.d.ts +1 -91
- package/dist/lib/routine-context.js +0 -107
- package/dist/lib/routine-notify-owner.d.ts +0 -79
- package/dist/lib/routine-notify-owner.js +1 -103
- package/dist/lib/routine-notify.d.ts +0 -70
- package/dist/lib/routine-notify.js +1 -75
- package/dist/lib/routine-process-cleanup.d.ts +0 -1
- package/dist/lib/routine-process-cleanup.js +1 -4
- package/dist/lib/routine-readiness.d.ts +0 -63
- package/dist/lib/routine-readiness.js +4 -86
- package/dist/lib/routines-format.d.ts +0 -40
- package/dist/lib/routines-format.js +0 -67
- package/dist/lib/routines-placement.d.ts +0 -33
- package/dist/lib/routines-placement.js +0 -40
- package/dist/lib/routines-project.d.ts +0 -57
- package/dist/lib/routines-project.js +6 -80
- package/dist/lib/rules/compile.d.ts +0 -66
- package/dist/lib/rules/compile.js +6 -118
- package/dist/lib/rules/compose.d.ts +0 -56
- package/dist/lib/rules/compose.js +2 -83
- package/dist/lib/rules/rules.d.ts +0 -23
- package/dist/lib/rules/rules.js +0 -35
- package/dist/lib/rules/run-sync.d.ts +0 -16
- package/dist/lib/rules/run-sync.js +1 -44
- package/dist/lib/run-config.d.ts +0 -7
- package/dist/lib/run-config.js +0 -8
- package/dist/lib/run-defaults.d.ts +0 -14
- package/dist/lib/run-defaults.js +0 -14
- package/dist/lib/run-notify.d.ts +0 -18
- package/dist/lib/run-notify.js +0 -36
- package/dist/lib/run-trace-sync.d.ts +0 -21
- package/dist/lib/run-trace-sync.js +2 -66
- package/dist/lib/rush-session.d.ts +0 -26
- package/dist/lib/rush-session.js +0 -28
- package/dist/lib/sandbox.d.ts +0 -45
- package/dist/lib/sandbox.js +5 -93
- package/dist/lib/scheduler.d.ts +0 -28
- package/dist/lib/scheduler.js +0 -45
- package/dist/lib/scheduling/routines.d.ts +0 -652
- package/dist/lib/scheduling/routines.js +8 -475
- package/dist/lib/secrets-cli.d.ts +3 -8
- package/dist/lib/secrets-cli.js +1 -19
- package/dist/lib/secrets-client.d.ts +0 -117
- package/dist/lib/secrets-client.js +4 -275
- package/dist/lib/secrets-policy.d.ts +0 -142
- package/dist/lib/secrets-policy.js +4 -237
- package/dist/lib/secrets-types.d.ts +0 -87
- package/dist/lib/secrets-types.js +0 -13
- package/dist/lib/self-heal/checks/hook-manifest.js +0 -25
- package/dist/lib/self-heal/checks/hook-runtime.js +0 -5
- package/dist/lib/self-heal/checks/install-staging.d.ts +0 -1
- package/dist/lib/self-heal/checks/install-staging.js +1 -28
- package/dist/lib/self-heal/checks/menubar-helper.js +0 -5
- package/dist/lib/self-heal/checks/path.js +0 -9
- package/dist/lib/self-heal/checks/resources.js +0 -5
- package/dist/lib/self-heal/checks/shadowing.js +2 -16
- package/dist/lib/self-heal/checks/shims.js +0 -14
- package/dist/lib/self-heal/child.d.ts +12 -0
- package/dist/lib/self-heal/child.js +23 -0
- package/dist/lib/self-heal/registry.d.ts +0 -9
- package/dist/lib/self-heal/registry.js +0 -16
- package/dist/lib/self-heal/types.d.ts +0 -12
- package/dist/lib/self-heal/types.js +0 -15
- package/dist/lib/self-update.d.ts +0 -312
- package/dist/lib/self-update.js +9 -360
- package/dist/lib/service-manifest.d.ts +0 -39
- package/dist/lib/service-manifest.js +0 -72
- package/dist/lib/session/active.d.ts +13 -869
- package/dist/lib/session/active.js +20 -976
- package/dist/lib/session/actor-sidecar.d.ts +1 -32
- package/dist/lib/session/actor-sidecar.js +1 -41
- package/dist/lib/session/bookmarks.d.ts +0 -33
- package/dist/lib/session/bookmarks.js +0 -37
- package/dist/lib/session/bundle.d.ts +0 -86
- package/dist/lib/session/bundle.js +0 -54
- package/dist/lib/session/claude-accounts.d.ts +0 -40
- package/dist/lib/session/claude-accounts.js +0 -49
- package/dist/lib/session/cloud.d.ts +1 -23
- package/dist/lib/session/cloud.js +0 -26
- package/dist/lib/session/db.d.ts +5 -658
- package/dist/lib/session/db.js +22 -1443
- package/dist/lib/session/detached.d.ts +0 -21
- package/dist/lib/session/detached.js +0 -29
- package/dist/lib/session/discover.d.ts +3 -420
- package/dist/lib/session/discover.js +30 -1123
- package/dist/lib/session/fork.d.ts +1 -41
- package/dist/lib/session/fork.js +0 -19
- package/dist/lib/session/ghostty-tabs.d.ts +0 -24
- package/dist/lib/session/ghostty-tabs.js +0 -37
- package/dist/lib/session/glance-files.d.ts +19 -0
- package/dist/lib/session/glance-files.js +258 -0
- package/dist/lib/session/hook-sessions.d.ts +0 -33
- package/dist/lib/session/hook-sessions.js +4 -99
- package/dist/lib/session/host-link.d.ts +1 -94
- package/dist/lib/session/host-link.js +1 -81
- package/dist/lib/session/inject-target.d.ts +8 -0
- package/dist/lib/session/inject-target.js +32 -0
- package/dist/lib/session/inject.d.ts +0 -15
- package/dist/lib/session/inject.js +0 -15
- package/dist/lib/session/live-metadata.d.ts +1 -34
- package/dist/lib/session/live-metadata.js +1 -73
- package/dist/lib/session/local-tmux-attach.d.ts +0 -37
- package/dist/lib/session/local-tmux-attach.js +1 -76
- package/dist/lib/session/migrate-targets.d.ts +0 -46
- package/dist/lib/session/migrate-targets.js +0 -24
- package/dist/lib/session/migrations.d.ts +0 -12
- package/dist/lib/session/migrations.js +1 -20
- package/dist/lib/session/mirror.d.ts +0 -32
- package/dist/lib/session/mirror.js +0 -77
- package/dist/lib/session/origin-machine.js +0 -3
- package/dist/lib/session/pid-registry.d.ts +0 -80
- package/dist/lib/session/pid-registry.js +2 -81
- package/dist/lib/session/presence.d.ts +0 -39
- package/dist/lib/session/presence.js +2 -52
- package/dist/lib/session/process-view.d.ts +0 -11
- package/dist/lib/session/process-view.js +0 -25
- package/dist/lib/session/projection.d.ts +0 -3
- package/dist/lib/session/projection.js +0 -10
- package/dist/lib/session/provenance.d.ts +1 -37
- package/dist/lib/session/provenance.js +0 -69
- package/dist/lib/session/recovery.d.ts +1 -40
- package/dist/lib/session/recovery.js +2 -80
- package/dist/lib/session/relative-time.js +0 -3
- package/dist/lib/session/remote/peer-stream.d.ts +0 -42
- package/dist/lib/session/remote/peer-stream.js +0 -64
- package/dist/lib/session/remote/remote-bundle.d.ts +0 -6
- package/dist/lib/session/remote/remote-bundle.js +0 -21
- package/dist/lib/session/remote/remote-list.d.ts +1 -110
- package/dist/lib/session/remote/remote-list.js +5 -139
- package/dist/lib/session/remote/remote.d.ts +0 -98
- package/dist/lib/session/remote/remote.js +3 -119
- package/dist/lib/session/remote/watch.d.ts +1 -34
- package/dist/lib/session/remote/watch.js +12 -72
- package/dist/lib/session/remote-active.d.ts +0 -35
- package/dist/lib/session/remote-active.js +0 -48
- package/dist/lib/session/remote-bundle.js +0 -2
- package/dist/lib/session/remote-list.js +0 -2
- package/dist/lib/session/remote-preview-cache.d.ts +0 -7
- package/dist/lib/session/remote-preview-cache.js +1 -76
- package/dist/lib/session/remote.js +0 -2
- package/dist/lib/session/resume-command.d.ts +0 -6
- package/dist/lib/session/resume-command.js +0 -6
- package/dist/lib/session/resume-owner.d.ts +1 -52
- package/dist/lib/session/resume-owner.js +0 -56
- package/dist/lib/session/run-names.d.ts +0 -24
- package/dist/lib/session/run-names.js +0 -26
- package/dist/lib/session/session-cache.d.ts +2 -146
- package/dist/lib/session/session-cache.js +26 -203
- package/dist/lib/session/short-id.js +0 -3
- package/dist/lib/session/sync/agents.d.ts +0 -68
- package/dist/lib/session/sync/agents.js +0 -0
- package/dist/lib/session/sync/backend.d.ts +0 -39
- package/dist/lib/session/sync/backend.js +0 -45
- package/dist/lib/session/sync/config.d.ts +0 -27
- package/dist/lib/session/sync/config.js +0 -56
- package/dist/lib/session/sync/managed-config.d.ts +0 -17
- package/dist/lib/session/sync/managed-config.js +0 -17
- package/dist/lib/session/sync/managed-key.d.ts +0 -38
- package/dist/lib/session/sync/managed-key.js +1 -42
- package/dist/lib/session/sync/net-client.d.ts +0 -36
- package/dist/lib/session/sync/net-client.js +0 -30
- package/dist/lib/session/sync/provision.d.ts +0 -2
- package/dist/lib/session/sync/provision.js +0 -13
- package/dist/lib/session/sync/r2.d.ts +0 -20
- package/dist/lib/session/sync/r2.js +0 -20
- package/dist/lib/session/sync/transcript-crypto.d.ts +0 -37
- package/dist/lib/session/sync/transcript-crypto.js +5 -37
- package/dist/lib/session/sync/worker-template.d.ts +0 -5
- package/dist/lib/session/sync/worker-template.js +0 -40
- package/dist/lib/session/testdata/pid-registry-namespace.js +0 -2
- package/dist/lib/session/testdata/process-view-private.js +0 -1
- package/dist/lib/session/throughput.d.ts +0 -24
- package/dist/lib/session/throughput.js +1 -25
- package/dist/lib/session/timeline-pass.d.ts +1 -63
- package/dist/lib/session/timeline-pass.js +161 -148
- package/dist/lib/session/title.d.ts +0 -182
- package/dist/lib/session/title.js +0 -139
- package/dist/lib/session/tool-index.d.ts +2 -21
- package/dist/lib/session/tool-index.js +3 -75
- package/dist/lib/session/tool-store.d.ts +2 -48
- package/dist/lib/session/tool-store.js +1 -33
- package/dist/lib/session/viewing-in.d.ts +0 -67
- package/dist/lib/session/viewing-in.js +1 -71
- package/dist/lib/session/watch.js +0 -2
- package/dist/lib/session/width.js +0 -3
- package/dist/lib/sessions-client.d.ts +0 -46
- package/dist/lib/sessions-client.js +36 -113
- package/dist/lib/settings-manifest.d.ts +1 -17
- package/dist/lib/settings-manifest.js +4 -57
- package/dist/lib/setup-tool-install.d.ts +0 -1
- package/dist/lib/setup-tool-install.js +2 -7
- package/dist/lib/setup-tool-status.d.ts +0 -3
- package/dist/lib/setup-tool-status.js +4 -14
- package/dist/lib/sha256-asset.d.ts +0 -20
- package/dist/lib/sha256-asset.js +0 -20
- package/dist/lib/share-runtime.d.ts +0 -10
- package/dist/lib/share-runtime.js +1 -27
- package/dist/lib/shim-heal.d.ts +0 -15
- package/dist/lib/shim-heal.js +3 -29
- package/dist/lib/signin-badge.d.ts +0 -72
- package/dist/lib/signin-badge.js +0 -86
- package/dist/lib/sink-format.d.ts +0 -32
- package/dist/lib/sink-format.js +0 -14
- package/dist/lib/smart-launch.d.ts +0 -75
- package/dist/lib/smart-launch.js +1 -83
- package/dist/lib/snapshot.d.ts +0 -46
- package/dist/lib/snapshot.js +5 -31
- package/dist/lib/spinner.d.ts +0 -37
- package/dist/lib/spinner.js +0 -37
- package/dist/lib/sqlite.d.ts +0 -13
- package/dist/lib/sqlite.js +3 -71
- package/dist/lib/ssh-exec.d.ts +0 -209
- package/dist/lib/ssh-exec.js +11 -248
- package/dist/lib/ssh-tunnel.d.ts +0 -43
- package/dist/lib/ssh-tunnel.js +2 -48
- package/dist/lib/staleness/checkers/commands.d.ts +0 -4
- package/dist/lib/staleness/checkers/commands.js +0 -4
- package/dist/lib/staleness/checkers/hooks.d.ts +0 -10
- package/dist/lib/staleness/checkers/hooks.js +0 -15
- package/dist/lib/staleness/checkers/mcp.d.ts +0 -9
- package/dist/lib/staleness/checkers/mcp.js +0 -9
- package/dist/lib/staleness/checkers/permissions.d.ts +0 -12
- package/dist/lib/staleness/checkers/permissions.js +0 -13
- package/dist/lib/staleness/checkers/plugins.d.ts +0 -8
- package/dist/lib/staleness/checkers/plugins.js +0 -8
- package/dist/lib/staleness/checkers/rules.d.ts +0 -15
- package/dist/lib/staleness/checkers/rules.js +0 -26
- package/dist/lib/staleness/checkers/skills.d.ts +0 -4
- package/dist/lib/staleness/checkers/skills.js +0 -4
- package/dist/lib/staleness/checkers/subagents.d.ts +0 -9
- package/dist/lib/staleness/checkers/subagents.js +0 -9
- package/dist/lib/staleness/checkers/types.d.ts +0 -34
- package/dist/lib/staleness/checkers/types.js +0 -19
- package/dist/lib/staleness/checkers/workflows.d.ts +0 -7
- package/dist/lib/staleness/checkers/workflows.js +0 -7
- package/dist/lib/staleness/detectors/commands.js +0 -17
- package/dist/lib/staleness/detectors/hooks.js +1 -6
- package/dist/lib/staleness/detectors/mcp.js +0 -4
- package/dist/lib/staleness/detectors/permissions.js +10 -23
- package/dist/lib/staleness/detectors/rules.js +0 -6
- package/dist/lib/staleness/detectors/skills.d.ts +0 -1
- package/dist/lib/staleness/detectors/skills.js +1 -12
- package/dist/lib/staleness/detectors/types.d.ts +0 -10
- package/dist/lib/staleness/fingerprint.d.ts +0 -19
- package/dist/lib/staleness/fingerprint.js +0 -35
- package/dist/lib/staleness/index.d.ts +0 -28
- package/dist/lib/staleness/index.js +1 -45
- package/dist/lib/staleness/layers.d.ts +0 -23
- package/dist/lib/staleness/layers.js +0 -34
- package/dist/lib/staleness/prune.d.ts +0 -71
- package/dist/lib/staleness/prune.js +2 -27
- package/dist/lib/staleness/registry.d.ts +0 -10
- package/dist/lib/staleness/registry.js +3 -33
- package/dist/lib/staleness/types.d.ts +0 -36
- package/dist/lib/staleness/types.js +0 -5
- package/dist/lib/staleness/writers/commands.js +1 -48
- package/dist/lib/staleness/writers/hooks.js +1 -18
- package/dist/lib/staleness/writers/kinds.d.ts +0 -12
- package/dist/lib/staleness/writers/kinds.js +0 -1
- package/dist/lib/staleness/writers/lazy-map.d.ts +0 -11
- package/dist/lib/staleness/writers/mcp.js +0 -13
- package/dist/lib/staleness/writers/plugins.js +0 -4
- package/dist/lib/staleness/writers/rules.d.ts +0 -1
- package/dist/lib/staleness/writers/rules.js +1 -19
- package/dist/lib/staleness/writers/skills.js +3 -14
- package/dist/lib/staleness/writers/sources.d.ts +0 -11
- package/dist/lib/staleness/writers/sources.js +0 -32
- package/dist/lib/staleness/writers/subagents.js +0 -16
- package/dist/lib/staleness/writers/types.d.ts +0 -58
- package/dist/lib/staleness/writers/workflows.js +1 -1
- package/dist/lib/standalone-tools.d.ts +24 -0
- package/dist/lib/standalone-tools.js +58 -0
- package/dist/lib/star-nudge.d.ts +0 -32
- package/dist/lib/star-nudge.js +2 -36
- package/dist/lib/startup/command-registry.d.ts +0 -45
- package/dist/lib/startup/command-registry.js +1 -46
- package/dist/lib/startup/dev-build.d.ts +0 -9
- package/dist/lib/startup/dev-build.js +1 -42
- package/dist/lib/startup/root-command.d.ts +0 -19
- package/dist/lib/startup/root-command.js +0 -19
- package/dist/lib/startup/spellcheck.d.ts +0 -13
- package/dist/lib/startup/spellcheck.js +0 -13
- package/dist/lib/state.d.ts +0 -376
- package/dist/lib/state.js +19 -737
- package/dist/lib/storage/selection.d.ts +0 -40
- package/dist/lib/storage/selection.js +0 -29
- package/dist/lib/subagents-registry.d.ts +0 -56
- package/dist/lib/subagents-registry.js +0 -99
- package/dist/lib/subagents.d.ts +0 -128
- package/dist/lib/subagents.js +1 -158
- package/dist/lib/summarizer/config.d.ts +0 -37
- package/dist/lib/summarizer/config.js +0 -37
- package/dist/lib/summarizer/pass.d.ts +0 -20
- package/dist/lib/summarizer/pass.js +1 -34
- package/dist/lib/summarizer/summarize.d.ts +1 -49
- package/dist/lib/summarizer/summarize.js +0 -35
- package/dist/lib/sync-passphrase.d.ts +0 -16
- package/dist/lib/sync-passphrase.js +1 -18
- package/dist/lib/sync-status.d.ts +0 -72
- package/dist/lib/sync-status.js +0 -55
- package/dist/lib/sync-umbrella.d.ts +0 -54
- package/dist/lib/sync-umbrella.js +0 -48
- package/dist/lib/system-run-sync.d.ts +0 -5
- package/dist/lib/system-run-sync.js +1 -31
- package/dist/lib/teams/agents.d.ts +1 -444
- package/dist/lib/teams/agents.js +11 -871
- package/dist/lib/teams/api.d.ts +2 -52
- package/dist/lib/teams/api.js +4 -63
- package/dist/lib/teams/debug.d.ts +0 -6
- package/dist/lib/teams/debug.js +0 -6
- package/dist/lib/teams/delivery.d.ts +0 -41
- package/dist/lib/teams/delivery.js +0 -32
- package/dist/lib/teams/file_ops.d.ts +0 -11
- package/dist/lib/teams/file_ops.js +0 -11
- package/dist/lib/teams/forEach.d.ts +0 -76
- package/dist/lib/teams/forEach.js +1 -77
- package/dist/lib/teams/index.d.ts +1 -7
- package/dist/lib/teams/index.js +1 -7
- package/dist/lib/teams/parsers.d.ts +0 -4
- package/dist/lib/teams/parsers.js +0 -81
- package/dist/lib/teams/persistence.d.ts +0 -2
- package/dist/lib/teams/persistence.js +0 -12
- package/dist/lib/teams/placement-probe.d.ts +0 -12
- package/dist/lib/teams/placement-probe.js +1 -51
- package/dist/lib/teams/pr-watch.d.ts +0 -107
- package/dist/lib/teams/pr-watch.js +1 -107
- package/dist/lib/teams/registry.d.ts +0 -36
- package/dist/lib/teams/registry.js +0 -47
- package/dist/lib/teams/remoteWorktree.d.ts +0 -50
- package/dist/lib/teams/remoteWorktree.js +1 -96
- package/dist/lib/teams/scheduler.d.ts +0 -111
- package/dist/lib/teams/scheduler.js +2 -125
- package/dist/lib/teams/summarizer.d.ts +0 -22
- package/dist/lib/teams/summarizer.js +6 -50
- package/dist/lib/teams/supervisor.d.ts +0 -38
- package/dist/lib/teams/supervisor.js +0 -21
- package/dist/lib/teams/worktree.d.ts +0 -95
- package/dist/lib/teams/worktree.js +3 -110
- package/dist/lib/template.d.ts +0 -21
- package/dist/lib/template.js +0 -23
- package/dist/lib/term-client.d.ts +0 -26
- package/dist/lib/term-client.js +0 -48
- package/dist/lib/term-driver.d.ts +0 -5
- package/dist/lib/term-driver.js +0 -8
- package/dist/lib/terminal/backends/ghostty.d.ts +0 -2
- package/dist/lib/terminal/backends/ghostty.js +0 -12
- package/dist/lib/terminal/backends/index.d.ts +0 -17
- package/dist/lib/terminal/backends/index.js +0 -15
- package/dist/lib/terminal/backends/iterm.d.ts +0 -2
- package/dist/lib/terminal/backends/iterm.js +0 -10
- package/dist/lib/terminal/backends/terminal-app.d.ts +0 -10
- package/dist/lib/terminal/backends/terminal-app.js +0 -30
- package/dist/lib/terminal/backends/tmux.d.ts +0 -10
- package/dist/lib/terminal/backends/tmux.js +0 -2
- package/dist/lib/terminal/backends/vscodium-agent.d.ts +0 -25
- package/dist/lib/terminal/backends/vscodium-agent.js +0 -36
- package/dist/lib/terminal/engine.d.ts +0 -17
- package/dist/lib/terminal/engine.js +0 -10
- package/dist/lib/terminal/index.d.ts +0 -8
- package/dist/lib/terminal/inject.d.ts +1 -173
- package/dist/lib/terminal/inject.js +0 -146
- package/dist/lib/terminal/policy.d.ts +0 -8
- package/dist/lib/terminal/policy.js +0 -1
- package/dist/lib/terminal/preferred.d.ts +0 -66
- package/dist/lib/terminal/preferred.js +0 -30
- package/dist/lib/terminal/quote.d.ts +0 -8
- package/dist/lib/terminal/quote.js +0 -8
- package/dist/lib/terminal/resolve.d.ts +0 -46
- package/dist/lib/terminal/resolve.js +0 -30
- package/dist/lib/terminal/run-surface.d.ts +0 -56
- package/dist/lib/terminal/run-surface.js +0 -46
- package/dist/lib/terminal/shell.d.ts +0 -3
- package/dist/lib/terminal/shell.js +0 -13
- package/dist/lib/terminal/transport.d.ts +0 -14
- package/dist/lib/terminal/transport.js +1 -30
- package/dist/lib/terminal/types.d.ts +0 -40
- package/dist/lib/terminal/types.js +0 -10
- package/dist/lib/text/relative-time.d.ts +0 -36
- package/dist/lib/text/relative-time.js +0 -43
- package/dist/lib/text/short-id.d.ts +0 -16
- package/dist/lib/text/short-id.js +0 -16
- package/dist/lib/text/width.d.ts +0 -24
- package/dist/lib/text/width.js +10 -52
- package/dist/lib/tmux/binary.d.ts +0 -36
- package/dist/lib/tmux/binary.js +0 -28
- package/dist/lib/tmux/index.d.ts +0 -5
- package/dist/lib/tmux/index.js +0 -5
- package/dist/lib/tmux/orphan-reap.d.ts +0 -253
- package/dist/lib/tmux/orphan-reap.js +3 -299
- package/dist/lib/tmux/paths.d.ts +0 -14
- package/dist/lib/tmux/paths.js +0 -14
- package/dist/lib/tmux/session.d.ts +0 -263
- package/dist/lib/tmux/session.js +6 -344
- package/dist/lib/traces/backend.d.ts +0 -20
- package/dist/lib/traces/backend.js +0 -23
- package/dist/lib/traces/classify.d.ts +0 -20
- package/dist/lib/traces/classify.js +0 -7
- package/dist/lib/traces/insights.d.ts +1 -84
- package/dist/lib/traces/insights.js +0 -126
- package/dist/lib/traces/phenotype.d.ts +0 -69
- package/dist/lib/traces/phenotype.js +0 -150
- package/dist/lib/traces/provision.d.ts +0 -1
- package/dist/lib/traces/provision.js +0 -5
- package/dist/lib/traces/schema2-build.d.ts +3 -60
- package/dist/lib/traces/schema2-build.js +8 -149
- package/dist/lib/traces/schema2-danger.d.ts +0 -30
- package/dist/lib/traces/schema2-danger.js +1 -63
- package/dist/lib/traces/schema2.d.ts +0 -11
- package/dist/lib/traces/segments.d.ts +0 -44
- package/dist/lib/traces/segments.js +0 -65
- package/dist/lib/traces/sync.d.ts +2 -239
- package/dist/lib/traces/sync.js +15 -237
- package/dist/lib/traces/worker-template.d.ts +0 -3
- package/dist/lib/traces/worker-template.js +0 -29
- package/dist/lib/triggers/handlers.d.ts +0 -82
- package/dist/lib/triggers/handlers.js +0 -75
- package/dist/lib/triggers/webhook.d.ts +0 -158
- package/dist/lib/triggers/webhook.js +0 -143
- package/dist/lib/types.d.ts +0 -736
- package/dist/lib/types.js +0 -50
- package/dist/lib/uninstall.d.ts +0 -17
- package/dist/lib/uninstall.js +0 -75
- package/dist/lib/usage-backoff.d.ts +0 -20
- package/dist/lib/usage-backoff.js +3 -60
- package/dist/lib/usage-refresh.d.ts +0 -154
- package/dist/lib/usage-refresh.js +8 -212
- package/dist/lib/verbs.d.ts +0 -12
- package/dist/lib/verbs.js +0 -12
- package/dist/lib/version-duplicates.d.ts +0 -6
- package/dist/lib/version-duplicates.js +0 -6
- package/dist/lib/version.d.ts +0 -55
- package/dist/lib/version.js +1 -58
- package/dist/lib/view-types.d.ts +0 -48
- package/dist/lib/warn-unpushed.d.ts +0 -27
- package/dist/lib/warn-unpushed.js +1 -45
- package/dist/lib/watchdog/history.d.ts +0 -1
- package/dist/lib/watchdog/history.js +0 -3
- package/dist/lib/watchdog/index.js +0 -2
- package/dist/lib/watchdog/log.d.ts +0 -19
- package/dist/lib/watchdog/log.js +0 -34
- package/dist/lib/watchdog/read.d.ts +0 -27
- package/dist/lib/watchdog/read.js +3 -58
- package/dist/lib/watchdog/rotate.d.ts +0 -139
- package/dist/lib/watchdog/rotate.js +2 -151
- package/dist/lib/watchdog/runner.d.ts +0 -125
- package/dist/lib/watchdog/runner.js +3 -223
- package/dist/lib/watchdog/service.d.ts +0 -1
- package/dist/lib/watchdog/service.js +0 -2
- package/dist/lib/watchdog/watchdog-agent.d.ts +0 -31
- package/dist/lib/watchdog/watchdog-agent.js +0 -27
- package/dist/lib/watchdog/watchdog.d.ts +0 -7
- package/dist/lib/watchdog/watchdog.js +0 -10
- package/dist/lib/watchdog/watchdogTail.js +0 -7
- package/dist/lib/whats-new.d.ts +0 -10
- package/dist/lib/whats-new.js +0 -21
- package/dist/lib/workflows-registry.d.ts +0 -45
- package/dist/lib/workflows-registry.js +0 -60
- package/dist/lib/workflows.d.ts +0 -282
- package/dist/lib/workflows.js +3 -213
- package/dist/lib/worktree/held.d.ts +0 -89
- package/dist/lib/worktree/held.js +1 -103
- package/dist/lib/wrap.d.ts +0 -32
- package/dist/lib/wrap.js +0 -32
- package/dist/lib/yaml-io.d.ts +0 -45
- package/dist/lib/yaml-io.js +0 -47
- package/dist/session-tracker/dist/adapters/claude.js +0 -2
- package/dist/session-tracker/dist/hook.sh +4 -37
- package/dist/session-tracker/dist/index.d.ts +0 -7
- package/dist/session-tracker/dist/index.js +0 -5
- package/dist/session-tracker/dist/install-hook.d.ts +0 -5
- package/dist/session-tracker/dist/install-hook.js +1 -15
- package/dist/session-tracker/dist/prune-state.js +0 -4
- package/dist/session-tracker/dist/reader.js +0 -4
- package/dist/session-tracker/dist/state-file.d.ts +0 -3
- package/dist/session-tracker/dist/state-file.js +3 -8
- package/package.json +3 -4
- package/scripts/postinstall.js +8 -116
- package/dist/lib/session/artifacts.d.ts +0 -14
- package/dist/lib/session/artifacts.js +0 -101
- package/dist/lib/session/bash-command.d.ts +0 -63
- package/dist/lib/session/bash-command.js +0 -490
- package/dist/lib/session/digest.d.ts +0 -66
- package/dist/lib/session/digest.js +0 -328
- package/dist/lib/session/highlights.d.ts +0 -151
- package/dist/lib/session/highlights.js +0 -391
- package/dist/lib/session/insights.d.ts +0 -165
- package/dist/lib/session/insights.js +0 -563
- package/dist/lib/session/linear.d.ts +0 -19
- package/dist/lib/session/linear.js +0 -99
- package/dist/lib/session/parse.d.ts +0 -224
- package/dist/lib/session/parse.js +0 -2408
- package/dist/lib/session/prompt.d.ts +0 -213
- package/dist/lib/session/prompt.js +0 -601
- package/dist/lib/session/render.d.ts +0 -133
- package/dist/lib/session/render.js +0 -1047
- package/dist/lib/session/share-html.d.ts +0 -35
- package/dist/lib/session/share-html.js +0 -319
- package/dist/lib/session/shell-programs.d.ts +0 -33
- package/dist/lib/session/shell-programs.js +0 -380
- package/dist/lib/session/state.d.ts +0 -269
- package/dist/lib/session/state.js +0 -777
- package/dist/lib/session/stream-render.d.ts +0 -4
- package/dist/lib/session/stream-render.js +0 -131
- package/dist/lib/session/tail.d.ts +0 -88
- package/dist/lib/session/tail.js +0 -294
- package/dist/lib/session/team-filter.d.ts +0 -129
- package/dist/lib/session/team-filter.js +0 -269
- package/dist/lib/session/timeline.d.ts +0 -172
- package/dist/lib/session/timeline.js +0 -636
- package/dist/lib/session/tool-calls.d.ts +0 -132
- package/dist/lib/session/tool-calls.js +0 -674
- package/dist/lib/session/trajectory-compare.d.ts +0 -48
- package/dist/lib/session/trajectory-compare.js +0 -116
- package/dist/lib/session/trajectory-html.d.ts +0 -19
- package/dist/lib/session/trajectory-html.js +0 -771
- package/dist/lib/session/trajectory-lineage.d.ts +0 -93
- package/dist/lib/session/trajectory-lineage.js +0 -195
- package/dist/lib/session/trajectory-text.d.ts +0 -38
- package/dist/lib/session/trajectory-text.js +0 -284
- package/dist/lib/session/trajectory.d.ts +0 -145
- package/dist/lib/session/trajectory.js +0 -394
- package/dist/lib/session/types.d.ts +0 -627
- package/dist/lib/session/types.js +0 -43
package/dist/commands/view.js
CHANGED
|
@@ -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 { Option } from 'commander';
|
|
10
2
|
import { addHostOption } from '../lib/hosts/option.js';
|
|
11
3
|
import chalk from 'chalk';
|
|
@@ -48,29 +40,15 @@ import { renderHarnessDetail } from './harness.js';
|
|
|
48
40
|
import { confirm } from '@inquirer/prompts';
|
|
49
41
|
import { formatPath, isInteractiveTerminal, isPromptCancelled } from './utils.js';
|
|
50
42
|
import { terminalWidth, truncateToWidth, stringWidth, padToWidth } from '../lib/session/width.js';
|
|
51
|
-
/** Shared account identity formatter, re-exported for the view-specific tests. */
|
|
52
43
|
export const accountColumnLabel = accountDisplayLabel;
|
|
53
|
-
/**
|
|
54
|
-
* The account column with the durable native-account name folded in: when the
|
|
55
|
-
* signed-in identity of `agentId` has been named via `agents accounts add`,
|
|
56
|
-
* render `work · email` instead of the bare email. Falls back to the plain
|
|
57
|
-
* display label when the identity is unnamed.
|
|
58
|
-
*/
|
|
59
44
|
export function namedAccountColumnLabel(agentId, info) {
|
|
60
45
|
const display = accountColumnLabel(info);
|
|
61
46
|
const saved = findNativeAccountByIdentity(readMeta(), agentId, info);
|
|
62
47
|
return saved ? `${saved.name} · ${display || saved.identityLabel || saved.identityKey}` : display;
|
|
63
48
|
}
|
|
64
|
-
/** Human account identity; release labels belong only in installation diagnostics. */
|
|
65
49
|
export function nativeAccountViewLabel(row) {
|
|
66
50
|
return row.name && row.name !== row.display ? `${row.name} · ${row.display}` : row.display;
|
|
67
51
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Human `agents view` row order: selected default first, then email-bearing
|
|
70
|
-
* accounts alphabetically, then installs whose account has no email. Version
|
|
71
|
-
* descending is the deterministic tie-breaker and preserves the old order for
|
|
72
|
-
* every non-email harness.
|
|
73
|
-
*/
|
|
74
52
|
export function compareAccountOrderedVersions(a, b, globalDefault) {
|
|
75
53
|
const aIsDefault = a.version === globalDefault;
|
|
76
54
|
const bIsDefault = b.version === globalDefault;
|
|
@@ -89,28 +67,15 @@ export function compareAccountOrderedVersions(a, b, globalDefault) {
|
|
|
89
67
|
}
|
|
90
68
|
return compareVersions(b.version, a.version);
|
|
91
69
|
}
|
|
92
|
-
/**
|
|
93
|
-
* Join fixed view columns with a consistent two-space gutter. Empty trailing
|
|
94
|
-
* columns are dropped so a row without an auth chip does not grow a dangling
|
|
95
|
-
* gutter, but interior empties stay padded so later columns stay aligned.
|
|
96
|
-
*/
|
|
97
70
|
export function joinViewColumns(cols) {
|
|
98
|
-
// Trim only pure-trailing empty strings so auth/status can be absent without
|
|
99
|
-
// shifting earlier columns for rows that do carry them.
|
|
100
71
|
let end = cols.length;
|
|
101
72
|
while (end > 0 && cols[end - 1] === '')
|
|
102
73
|
end--;
|
|
103
74
|
return cols.slice(0, end).join(' ');
|
|
104
75
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Custom harnesses (the `~/.agents/profiles/*.yml` bundles), sorted by name.
|
|
107
|
-
* YAMLs that fail validation are silently skipped by `listProfiles`, so this
|
|
108
|
-
* never throws on a malformed file.
|
|
109
|
-
*/
|
|
110
76
|
function getHarnesses() {
|
|
111
77
|
return listProfiles().map(profileSummary);
|
|
112
78
|
}
|
|
113
|
-
/** Version-first label: "<version> (forked from <host>[, tracks default])" */
|
|
114
79
|
function harnessVersionLabel(harness, globalDefault) {
|
|
115
80
|
const version = harness.hostVersion ?? globalDefault;
|
|
116
81
|
if (version) {
|
|
@@ -123,7 +88,6 @@ function harnessVersionLabel(harness, globalDefault) {
|
|
|
123
88
|
}
|
|
124
89
|
return chalk.gray(`(forked from ${harness.agent})`);
|
|
125
90
|
}
|
|
126
|
-
/** One-hop or two-hop fork origin label for the harness block header. */
|
|
127
91
|
function buildHarnessOrigin(harness, allHarnesses) {
|
|
128
92
|
if (!harness.forkedFrom || harness.forkedFrom === harness.agent)
|
|
129
93
|
return 'custom';
|
|
@@ -133,12 +97,6 @@ function buildHarnessOrigin(harness, allHarnesses) {
|
|
|
133
97
|
}
|
|
134
98
|
return `custom · forked from ${harness.forkedFrom}`;
|
|
135
99
|
}
|
|
136
|
-
/**
|
|
137
|
-
* Resolve a resource path to something the IDE can open inline. When `p` is a
|
|
138
|
-
* directory, OSC 8 file:// links cause IDEs (Cursor/VS Code) to open it as a
|
|
139
|
-
* new workspace window; pointing at the bundle's marker file (SKILL.md /
|
|
140
|
-
* WORKFLOW.md / AGENT.md) opens in the current window instead.
|
|
141
|
-
*/
|
|
142
100
|
function linkTarget(p) {
|
|
143
101
|
try {
|
|
144
102
|
if (!fs.statSync(p).isDirectory())
|
|
@@ -197,11 +155,6 @@ function getProjectVersionFromCwd(agent) {
|
|
|
197
155
|
}
|
|
198
156
|
}
|
|
199
157
|
const SECTION_KEYS = ['commands', 'skills', 'mcp', 'workflows', 'plugins', 'rules', 'hooks', 'promptcuts', 'clis'];
|
|
200
|
-
/**
|
|
201
|
-
* Decide whether a section should render given the filter. If no flags are set,
|
|
202
|
-
* everything renders (current behavior). If any flag is set, only those sections
|
|
203
|
-
* render — flags are additive.
|
|
204
|
-
*/
|
|
205
158
|
function shouldRenderSection(key, filter) {
|
|
206
159
|
if (!filter)
|
|
207
160
|
return true;
|
|
@@ -210,7 +163,6 @@ function shouldRenderSection(key, filter) {
|
|
|
210
163
|
return true;
|
|
211
164
|
return filter[key] === true;
|
|
212
165
|
}
|
|
213
|
-
/** Trim a description to a column-friendly snippet. Strips newlines, collapses whitespace. */
|
|
214
166
|
export function summarizeDescription(desc, maxLen = 80) {
|
|
215
167
|
if (!desc)
|
|
216
168
|
return '';
|
|
@@ -224,16 +176,6 @@ export function descriptionForPrefix(desc, prefix) {
|
|
|
224
176
|
const budget = Math.max(1, terminalWidth() - stringWidth(visiblePrefix));
|
|
225
177
|
return summarizeDescription(desc, budget);
|
|
226
178
|
}
|
|
227
|
-
/**
|
|
228
|
-
* Render custom harnesses as their own agent-type blocks — peers of the native
|
|
229
|
-
* Claude/Codex blocks, not indented rows under the host CLI that executes them.
|
|
230
|
-
* `agents run <name>` already treats a custom harness like a native agent id, so
|
|
231
|
-
* `agents view` lists it the same way: a bold name header, then one row carrying
|
|
232
|
-
* the model, the account/auth state, and the host it runs on.
|
|
233
|
-
*
|
|
234
|
-
* `installedHosts` is the set of agent ids with a usable install; a harness whose
|
|
235
|
-
* host is missing is flagged rather than silently listed as runnable.
|
|
236
|
-
*/
|
|
237
179
|
export function renderHarnessBlocks(harnesses, installedHosts, showPaths, byokMap) {
|
|
238
180
|
if (harnesses.length === 0)
|
|
239
181
|
return;
|
|
@@ -256,11 +198,6 @@ export function renderHarnessBlocks(harnesses, installedHosts, showPaths, byokMa
|
|
|
256
198
|
console.log();
|
|
257
199
|
}
|
|
258
200
|
}
|
|
259
|
-
/**
|
|
260
|
-
* Show installed versions for one or all agents.
|
|
261
|
-
* Called when: `agents view` or `agents view claude`
|
|
262
|
-
*/
|
|
263
|
-
/** Color the source-layer tag for a host CLI, matching the rules-section convention. */
|
|
264
201
|
function hostCliSourceTag(source) {
|
|
265
202
|
if (source === 'project')
|
|
266
203
|
return chalk.blue('[project]');
|
|
@@ -268,17 +205,8 @@ function hostCliSourceTag(source) {
|
|
|
268
205
|
return chalk.cyan('[user]');
|
|
269
206
|
if (source === 'system')
|
|
270
207
|
return chalk.gray('[system]');
|
|
271
|
-
// Anything else is an extra repo, tagged by its alias.
|
|
272
208
|
return chalk.magenta(`[${source}]`);
|
|
273
209
|
}
|
|
274
|
-
/**
|
|
275
|
-
* Render the host-CLI section. Host CLIs are host-global: declared in any
|
|
276
|
-
* DotAgents repo's `clis/` (project > user > system > extras), installed to PATH
|
|
277
|
-
* rather than copied into a version home. They render identically in the overview
|
|
278
|
-
* and in a per-agent detail view because every agent on the host shares them.
|
|
279
|
-
* The source tag shows which repo layer declared each — so user-level and
|
|
280
|
-
* extra-repo manifests are visibly supported.
|
|
281
|
-
*/
|
|
282
210
|
function renderHostClisSection(cwd) {
|
|
283
211
|
const { statuses, errors } = listCliStatus(cwd);
|
|
284
212
|
console.log(chalk.bold('\nHost CLIs\n'));
|
|
@@ -307,27 +235,9 @@ function renderHostClisSection(cwd) {
|
|
|
307
235
|
console.log(` ${chalk.red('error')} ${chalk.gray(err.file)}: ${chalk.gray(err.reason)}`);
|
|
308
236
|
}
|
|
309
237
|
}
|
|
310
|
-
/**
|
|
311
|
-
* The USAGE-READ-2 decision, isolated from its runtime inputs so it can be
|
|
312
|
-
* tested directly: a usage read may fall through to the interactive OAuth login
|
|
313
|
-
* ONLY for a foreground human render on a headed device (`personal` or
|
|
314
|
-
* `desktop`). Both conditions are required — role alone is not sufficient.
|
|
315
|
-
*/
|
|
316
238
|
export function allowInteractiveUsageLogin(role, isTTY) {
|
|
317
239
|
return isHeadedDeviceRole(role) && isTTY === true;
|
|
318
240
|
}
|
|
319
|
-
/**
|
|
320
|
-
* Whether this `agents view` invocation may fall through to the interactive
|
|
321
|
-
* OAuth login for a usage read (USAGE-READ-2). True only for a foreground human
|
|
322
|
-
* render on a headed device (`personal` or `desktop`): the interactive login is
|
|
323
|
-
* the sole credential carrying the `user:profile` scope the usage endpoint needs,
|
|
324
|
-
* and a human
|
|
325
|
-
* running one command is not the unattended-loop revocation risk RUSH-1822
|
|
326
|
-
* fixed. The `--json` path never reaches these render functions (it returns
|
|
327
|
-
* early via `collectAgentsJson`), and a non-TTY (piped/scripted) run is excluded
|
|
328
|
-
* here too, so a machine reader can never silently acquire the interactive
|
|
329
|
-
* credential — role alone is not sufficient.
|
|
330
|
-
*/
|
|
331
241
|
function usageAllowInteractiveLogin() {
|
|
332
242
|
return allowInteractiveUsageLogin(selfConfiguredDeviceRole(), process.stdout.isTTY === true);
|
|
333
243
|
}
|
|
@@ -337,39 +247,13 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
337
247
|
: 'Checking installed agents...';
|
|
338
248
|
const spinner = ora({ text: spinnerText, isSilent: !process.stdout.isTTY }).start();
|
|
339
249
|
const agentsToShow = filterAgentId ? [filterAgentId] : ALL_AGENT_IDS;
|
|
340
|
-
// Overview caps meter count; single-agent view shows every blocking window.
|
|
341
250
|
const usageWindowCap = filterAgentId ? undefined : OVERVIEW_MAX_USAGE_WINDOWS;
|
|
342
|
-
// A globally-installed CLI is superseded only by a NORMAL managed version — that
|
|
343
|
-
// is when agents-cli owns the launcher and a "global" row would just be our own
|
|
344
|
-
// shim reported back. `--isolated` promises the opposite: no default, no bare
|
|
345
|
-
// shim, no adopted launcher, the user's own `~/.<agent>` untouched. So an
|
|
346
|
-
// isolated-only install must not make that still-live global CLI disappear from
|
|
347
|
-
// `agents view` — the two are genuinely separate installs and both get listed.
|
|
348
251
|
const hasNonIsolatedVersion = (agentId) => listInstalledVersions(agentId).some((v) => !isVersionIsolated(agentId, v));
|
|
349
|
-
// Every `cliStates` read in this function feeds the "Not Managed by Agents CLI"
|
|
350
|
-
// block, so resolve it the way that block means it: the user's own CLI on PATH.
|
|
351
|
-
// `getCliState` would answer with a version-dir install — including an isolated
|
|
352
|
-
// copy that is deliberately absent from PATH — and print it as "(global)".
|
|
353
|
-
//
|
|
354
|
-
// Resolved only for agents that can actually reach that block. `getCliState`
|
|
355
|
-
// deliberately avoids subprocesses for a version-managed agent, and PATH
|
|
356
|
-
// resolution costs a `<cli> --version` spawn on a cold cache — so probing an
|
|
357
|
-
// agent whose global row is suppressed anyway would be pure added latency.
|
|
358
252
|
const cliStates = Object.fromEntries(await Promise.all(agentsToShow
|
|
359
253
|
.filter((agentId) => !hasNonIsolatedVersion(agentId))
|
|
360
254
|
.map(async (agentId) => [agentId, await getUnmanagedCliState(agentId)])));
|
|
361
255
|
const showPaths = !!filterAgentId && viewOpts?.versions === true;
|
|
362
|
-
// A filtered native view is about that native harness's installed versions.
|
|
363
|
-
// Custom forks are standalone agent types and only belong in the overview.
|
|
364
256
|
const harnesses = filterAgentId ? [] : getHarnesses();
|
|
365
|
-
// Auto-heal stale versioned aliases. Pre-v2 aliases (e.g. pre-CLAUDE_CONFIG_DIR
|
|
366
|
-
// claude shims) silently route login through the default version's symlinked
|
|
367
|
-
// home, so `agents view` would never reflect the right account. Regenerate on
|
|
368
|
-
// sight — it's safe, idempotent, and fixes the symptom exactly where the user
|
|
369
|
-
// notices it.
|
|
370
|
-
// Yield between agents so the heal loop doesn't block the event loop as one
|
|
371
|
-
// long sync burst — per-version readFileSync+writeFileSync across 5 agents
|
|
372
|
-
// can otherwise stall spinners and stdout flushes.
|
|
373
257
|
const healedAliases = [];
|
|
374
258
|
for (const agentId of agentsToShow) {
|
|
375
259
|
await new Promise((resolve) => setImmediate(resolve));
|
|
@@ -380,10 +264,6 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
380
264
|
}
|
|
381
265
|
}
|
|
382
266
|
}
|
|
383
|
-
// Shim healing is silent — users don't need to know about internal repairs
|
|
384
|
-
// Pre-fetch account info for all versions in parallel. Spinner stays up through
|
|
385
|
-
// account + usage so a multi-account cold path doesn't leave a blank terminal
|
|
386
|
-
// after "Checking…" vanishes (the hang the screenshots caught).
|
|
387
267
|
spinner.text = filterAgentId
|
|
388
268
|
? `Loading ${agentLabel(filterAgentId)} accounts...`
|
|
389
269
|
: 'Loading accounts and usage...';
|
|
@@ -399,8 +279,6 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
399
279
|
info,
|
|
400
280
|
})));
|
|
401
281
|
}
|
|
402
|
-
// Mirrors the classification below: fetch the global account whenever the
|
|
403
|
-
// global install will still be rendered (no versions at all, or isolated-only).
|
|
404
282
|
if (!hasNonIsolatedVersion(agentId)) {
|
|
405
283
|
globalInfoFetches.push(getAccountInfo(agentId).then((info) => ({
|
|
406
284
|
agentId,
|
|
@@ -411,7 +289,6 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
411
289
|
}
|
|
412
290
|
const infoResults = await Promise.all(infoFetches);
|
|
413
291
|
const globalInfoResults = await Promise.all(globalInfoFetches);
|
|
414
|
-
// Build lookup: agentId:version -> AccountInfo
|
|
415
292
|
const infoMap = new Map();
|
|
416
293
|
for (const { agentId, version, info } of infoResults) {
|
|
417
294
|
infoMap.set(`${agentId}:${version}`, info);
|
|
@@ -420,11 +297,6 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
420
297
|
for (const { agentId, info } of globalInfoResults) {
|
|
421
298
|
globalInfoMap.set(agentId, info);
|
|
422
299
|
}
|
|
423
|
-
// Usage status, plan, and overage credits belong to the same underlying account
|
|
424
|
-
// or org scope, not a specific installed version. Version homes cache those
|
|
425
|
-
// values independently, so older installs can show stale values. Reuse the
|
|
426
|
-
// freshest cache entry per stable usage identity and keep lastActive per version.
|
|
427
|
-
// Goes through the unified usage core (SWR cache + concurrency cap + timeout).
|
|
428
300
|
const { canonicalByUsageKey, usageByKey } = await getUsageInfoByIdentity([
|
|
429
301
|
...infoResults.map(({ agentId, home, version, info }) => ({
|
|
430
302
|
agentId,
|
|
@@ -452,19 +324,11 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
452
324
|
return info;
|
|
453
325
|
return {
|
|
454
326
|
...info,
|
|
455
|
-
// Prefer a plan the live usage fetch surfaced (Kimi reports membership
|
|
456
|
-
// tier in /usages; its local auth file has none) and fall back to the
|
|
457
|
-
// account-derived plan (Claude's billingType).
|
|
458
327
|
plan: usageByKey.get(key)?.snapshot?.plan ?? canon.plan,
|
|
459
|
-
// Throttle state comes from the live usage windows, not the pay-as-you-go
|
|
460
|
-
// overage flag that AccountInfo.usageStatus used to carry. A maxed window
|
|
461
|
-
// means rate-limited; no snapshot means no badge. See
|
|
462
|
-
// deriveUsageStatusFromSnapshot.
|
|
463
328
|
usageStatus: deriveUsageStatusFromSnapshot(usageByKey.get(key)?.snapshot),
|
|
464
329
|
overageCredits: canon.overageCredits,
|
|
465
330
|
};
|
|
466
331
|
};
|
|
467
|
-
// Separate version-managed from globally-installed agents
|
|
468
332
|
const versionManaged = [];
|
|
469
333
|
const globallyInstalled = [];
|
|
470
334
|
for (const agentId of agentsToShow) {
|
|
@@ -474,18 +338,11 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
474
338
|
versionManaged.push(agentId);
|
|
475
339
|
}
|
|
476
340
|
if (cliState?.installed) {
|
|
477
|
-
// Isolated-only installs sit alongside the global CLI rather than replacing it.
|
|
478
341
|
if (!hasNonIsolatedVersion(agentId))
|
|
479
342
|
globallyInstalled.push(agentId);
|
|
480
343
|
}
|
|
481
344
|
}
|
|
482
|
-
// A custom harness runs through its host CLI, so it is only launchable when
|
|
483
|
-
// that host has an install of some kind.
|
|
484
345
|
const installedHosts = new Set([...versionManaged, ...globallyInstalled]);
|
|
485
|
-
// For self-updating global-binary agents (droid) the on-disk version-dir name
|
|
486
|
-
// is a stale label — the real version is whatever `<cli> --version` reports.
|
|
487
|
-
// Resolve it once so every row/width pass shows the live version, while the
|
|
488
|
-
// per-version home + account lookups keep using the real dir name.
|
|
489
346
|
const liveVersionByAgent = new Map();
|
|
490
347
|
await Promise.all(versionManaged
|
|
491
348
|
.filter((agentId) => isGlobalBinaryAgent(agentId))
|
|
@@ -495,24 +352,18 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
495
352
|
liveVersionByAgent.set(agentId, live);
|
|
496
353
|
}));
|
|
497
354
|
const displayVersion = (agentId, dirVersion) => liveVersionByAgent.get(agentId) ?? readInstallation(agentId, dirVersion)?.releaseVersion ?? dirVersion;
|
|
498
|
-
// Uncolored row label, shared by the width pass and the render so padding lines
|
|
499
|
-
// up. An isolated copy is never the global default (installing one deliberately
|
|
500
|
-
// records no default), so the two tags can't collide.
|
|
501
355
|
const versionRowLabel = (agentId, version, globalDefault) => {
|
|
502
356
|
const release = displayVersion(agentId, version);
|
|
503
357
|
const shown = release === version ? version : `${version} → ${release}`;
|
|
504
358
|
if (version === globalDefault)
|
|
505
359
|
return `${shown} (default)`;
|
|
506
360
|
if (isVersionIsolated(agentId, version)) {
|
|
507
|
-
// The isolated default is what a bare `agents run <agent>` reaches, so it is
|
|
508
|
-
// worth distinguishing from the other isolated copies sitting beside it.
|
|
509
361
|
return getIsolatedDefault(agentId) === version
|
|
510
362
|
? `${shown} (isolated default)`
|
|
511
363
|
: `${shown} (isolated)`;
|
|
512
364
|
}
|
|
513
365
|
return shown;
|
|
514
366
|
};
|
|
515
|
-
// Show version-managed agents
|
|
516
367
|
if (versionManaged.length > 0 && !viewOpts?.versions) {
|
|
517
368
|
const catalog = await loadAccountCatalog();
|
|
518
369
|
const note = secretsUnavailableNote(catalog);
|
|
@@ -527,7 +378,7 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
527
378
|
updateLabel = `automatic updates ${isAutoUpdateEnabledForAgent(agentId) ? 'on' : 'off'}`;
|
|
528
379
|
}
|
|
529
380
|
}
|
|
530
|
-
catch {
|
|
381
|
+
catch { }
|
|
531
382
|
console.log(` ${chalk.bold(agentLabel(agentId))}${chalk.gray(` · ${updateLabel}`)}`);
|
|
532
383
|
if (accounts.length > 0 || providers.length > 0) {
|
|
533
384
|
console.log(renderAccountRows(accounts, {
|
|
@@ -558,19 +409,14 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
558
409
|
if (filterAgentId) {
|
|
559
410
|
console.log(chalk.gray(` Add an account: agents accounts add ${filterAgentId} [name]`));
|
|
560
411
|
}
|
|
561
|
-
// Overview renders the same account rows with footer:false, so both paths
|
|
562
|
-
// need the legend the shared renderer would otherwise have printed.
|
|
563
412
|
console.log(chalk.gray(` ${ACCOUNT_LISTING_LEGEND}\n`));
|
|
564
413
|
}
|
|
565
414
|
if (versionManaged.length > 0 && viewOpts?.versions) {
|
|
566
|
-
// Calculate column widths across all agents for alignment
|
|
567
415
|
let maxVerLabel = 0;
|
|
568
416
|
let maxEmail = 0;
|
|
569
417
|
let maxPlanWidth = 3;
|
|
570
418
|
let maxUsageWidth = 0;
|
|
571
419
|
let maxStatusWidth = 0;
|
|
572
|
-
// The configured model sits right after the version, at the same priority.
|
|
573
|
-
// Resolve once here (fs + catalog reads) and reuse in the render loop.
|
|
574
420
|
let maxModelWidth = 0;
|
|
575
421
|
const modelByKey = new Map();
|
|
576
422
|
for (const agentId of versionManaged) {
|
|
@@ -592,8 +438,6 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
592
438
|
}
|
|
593
439
|
}
|
|
594
440
|
}
|
|
595
|
-
// Second pass: compute max visible usage + status widths (now that maxPlanWidth is settled).
|
|
596
|
-
// stringWidth (not String.length) so chalk + block-bar glyphs pad correctly.
|
|
597
441
|
for (const agentId of versionManaged) {
|
|
598
442
|
const versions = listInstalledVersions(agentId);
|
|
599
443
|
for (const v of versions) {
|
|
@@ -613,18 +457,10 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
613
457
|
const globalDefault = getGlobalDefault(agentId);
|
|
614
458
|
const runStrategy = getConfiguredRunStrategy(agentId);
|
|
615
459
|
const strategyLabel = chalk.gray(` (${runStrategy})`);
|
|
616
|
-
// `(no default)` is a nudge to go set one. It would read as a contradiction
|
|
617
|
-
// directly above a row tagged `(isolated default)`, and it would be bad
|
|
618
|
-
// advice besides: for an isolated-only agent the pointer below IS how a
|
|
619
|
-
// bare `agents run <agent>` resolves, and setting a global default is
|
|
620
|
-
// precisely what `--isolated` exists to avoid.
|
|
621
460
|
const noDefaultLabel = !globalDefault && !getIsolatedDefault(agentId)
|
|
622
461
|
? chalk.yellow(' (no default)')
|
|
623
462
|
: '';
|
|
624
463
|
console.log(` ${chalk.bold(agentLabel(agentId))}${strategyLabel}${noDefaultLabel}`);
|
|
625
|
-
// Account information is already loaded above. Keep the selected default
|
|
626
|
-
// first, then make multi-account installs scannable by email. Harnesses
|
|
627
|
-
// without email identities retain their prior version-descending order.
|
|
628
464
|
const sortedVersions = versions
|
|
629
465
|
.map((version) => ({
|
|
630
466
|
version,
|
|
@@ -649,13 +485,7 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
649
485
|
const vInfo = rawInfo ? mergeCanonical(rawInfo) : undefined;
|
|
650
486
|
const usageKey = getUsageLookupKey(vInfo);
|
|
651
487
|
const usageInfo = usageKey ? usageByKey.get(usageKey) : undefined;
|
|
652
|
-
// Fixed columns for every signed-in row so status / lastActive / auth
|
|
653
|
-
// stay vertically aligned across agents — even when this row has no
|
|
654
|
-
// usage bars or no rate-limit badge. Skipping empty columns mid-table
|
|
655
|
-
// was what made the multi-agent view look unjustified next to
|
|
656
|
-
// `agents view claude`.
|
|
657
488
|
const parts = [` ${label}`];
|
|
658
|
-
// Configured model — same priority as the version, right beside it.
|
|
659
489
|
if (maxModelWidth > 0) {
|
|
660
490
|
const model = modelByKey.get(`${agentId}:${version}`) ?? '';
|
|
661
491
|
parts.push(chalk.yellow(padToWidth(model, maxModelWidth)));
|
|
@@ -664,12 +494,9 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
664
494
|
const signedIn = !!vInfo?.signedIn;
|
|
665
495
|
const usageStr = formatUsageSummary(vInfo?.plan || null, usageInfo?.snapshot || null, maxPlanWidth, viewUsageSummaryOptions(agentId, signedIn, usageInfo, usageWindowCap, version));
|
|
666
496
|
const hasUsage = usageStr.length > 0;
|
|
667
|
-
// Only show lastActive for versions with an actual logged-in account.
|
|
668
|
-
// Otherwise it reflects install time (misleading "just now" for fresh installs).
|
|
669
497
|
const lastActive = vInfo && hasEmail ? formatLastActive(vInfo.lastActive) : '';
|
|
670
498
|
const activeStr = lastActive;
|
|
671
499
|
const hasActive = activeStr.length > 0;
|
|
672
|
-
// The model now has its own column above; keep only the run mode here.
|
|
673
500
|
const runDefaults = resolveRunDefaults(agentId, version);
|
|
674
501
|
const runDefaultBits = [];
|
|
675
502
|
if (runDefaults.mode)
|
|
@@ -677,24 +504,11 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
677
504
|
if (runDefaults.effort)
|
|
678
505
|
runDefaultBits.push('effort:' + runDefaults.effort);
|
|
679
506
|
if (!hasEmail && !hasUsage && !signedIn) {
|
|
680
|
-
// No per-version credential. That is NOT the same as unusable: Claude
|
|
681
|
-
// Code authenticates from `CLAUDE_CODE_OAUTH_TOKEN` when the
|
|
682
|
-
// environment carries one, and a run then succeeds against whatever
|
|
683
|
-
// account minted that token — while `signedIn` (agents.ts: `!!email`,
|
|
684
|
-
// read from this version home's `.claude.json`) stays false because no
|
|
685
|
-
// account was ever written here. Reporting that as "logged out" reads
|
|
686
|
-
// as a locked-out account and sends people hunting a login that is not
|
|
687
|
-
// missing; naming the ambient token instead points at the real state —
|
|
688
|
-
// every version on this box resolves to the SAME account, so balanced
|
|
689
|
-
// rotation across them is not actually rotating.
|
|
690
507
|
parts.push(chalk.gray(ambientClaudeToken(agentId)
|
|
691
508
|
? '(no per-version login — using ambient CLAUDE_CODE_OAUTH_TOKEN)'
|
|
692
509
|
: '(logged out — log in with: ' + loginHint(agentId) + ')'));
|
|
693
510
|
}
|
|
694
511
|
else {
|
|
695
|
-
// Always emit account / usage / status / lastActive columns once any
|
|
696
|
-
// signed-in row exists in the table (widths are global). Empty cells
|
|
697
|
-
// are space-padded so later columns do not drift left.
|
|
698
512
|
const display = namedAccountColumnLabel(agentId, vInfo);
|
|
699
513
|
parts.push(display ? chalk.cyan(padToWidth(display, maxEmail)) : ' '.repeat(maxEmail));
|
|
700
514
|
if (maxUsageWidth > 0) {
|
|
@@ -716,7 +530,6 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
716
530
|
console.log(chalk.gray(` ${versionDir}`));
|
|
717
531
|
}
|
|
718
532
|
}
|
|
719
|
-
// Check for project override
|
|
720
533
|
const projectVersion = getProjectVersionFromCwd(agentId);
|
|
721
534
|
if (projectVersion && projectVersion !== globalDefault) {
|
|
722
535
|
console.log(chalk.cyan(` -> ${projectVersion} (project)`));
|
|
@@ -724,9 +537,6 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
724
537
|
console.log();
|
|
725
538
|
}
|
|
726
539
|
}
|
|
727
|
-
// Custom harnesses sit in the same list as the native ones — they are run the
|
|
728
|
-
// same way (`agents run <name>`), so they read as their own agent type rather
|
|
729
|
-
// than as an indented row under whichever host CLI executes them.
|
|
730
540
|
const byokMap = new Map();
|
|
731
541
|
const byKeychainItem = new Map();
|
|
732
542
|
for (const h of harnesses) {
|
|
@@ -760,16 +570,12 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
760
570
|
}
|
|
761
571
|
}
|
|
762
572
|
renderHarnessBlocks(harnesses, installedHosts, showPaths, byokMap.size > 0 ? byokMap : undefined);
|
|
763
|
-
// Show globally installed (not managed) agents
|
|
764
573
|
if (globallyInstalled.length > 0) {
|
|
765
574
|
console.log(chalk.bold('Not Managed by Agents CLI\n'));
|
|
766
|
-
// Calculate max version label width for alignment
|
|
767
575
|
const globalMaxVerLabel = Math.max(...globallyInstalled.map((agentId) => {
|
|
768
576
|
const cliState = cliStates[agentId];
|
|
769
577
|
return `${cliState?.version || 'installed'} (global)`.length;
|
|
770
578
|
}));
|
|
771
|
-
// Pre-pass: max badge/usage/email widths so columns line up the same way
|
|
772
|
-
// the version-managed block does (stringWidth for chalk-aware padding).
|
|
773
579
|
let gMaxStatusWidth = 0;
|
|
774
580
|
let gMaxUsageWidth = 0;
|
|
775
581
|
let gMaxEmail = 0;
|
|
@@ -819,14 +625,11 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
819
625
|
console.log(chalk.gray(` Manage: agents add ${agentId}@${cliState.version} -y`));
|
|
820
626
|
}
|
|
821
627
|
else if (!agent.npmPackage && cliState?.installed) {
|
|
822
|
-
// installScript-based agent already on PATH — direct users to adopt the
|
|
823
|
-
// existing install with `agents import` instead of re-running curl.
|
|
824
628
|
console.log(chalk.gray(` Adopt: agents import ${agentId}`));
|
|
825
629
|
}
|
|
826
630
|
console.log();
|
|
827
631
|
}
|
|
828
632
|
}
|
|
829
|
-
// If filtering to a specific agent and not found
|
|
830
633
|
if (filterAgentId &&
|
|
831
634
|
versionManaged.length === 0 &&
|
|
832
635
|
globallyInstalled.length === 0 &&
|
|
@@ -834,7 +637,6 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
834
637
|
console.log(` ${chalk.bold(agentLabel(filterAgentId))}: ${chalk.gray('not installed')}`);
|
|
835
638
|
console.log();
|
|
836
639
|
}
|
|
837
|
-
// No agents installed at all
|
|
838
640
|
if (versionManaged.length === 0 &&
|
|
839
641
|
globallyInstalled.length === 0 &&
|
|
840
642
|
harnesses.length === 0 &&
|
|
@@ -843,11 +645,6 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
843
645
|
console.log(chalk.gray(' Run: agents add claude@latest'));
|
|
844
646
|
console.log();
|
|
845
647
|
}
|
|
846
|
-
// `--refresh` used to print a table that looked fully refreshed no matter how
|
|
847
|
-
// many accounts it had failed to reach, so a box whose every Claude credential
|
|
848
|
-
// had expired rendered identically to a healthy one — the bars beside each row
|
|
849
|
-
// came from a cache that the run had not managed to update. Name the accounts
|
|
850
|
-
// it could not confirm, and why.
|
|
851
648
|
if (viewOpts?.forceRefresh) {
|
|
852
649
|
const unrefreshed = [];
|
|
853
650
|
for (const [key, usage] of usageByKey) {
|
|
@@ -864,21 +661,15 @@ async function showInstalledVersions(filterAgentId, viewOpts) {
|
|
|
864
661
|
console.log();
|
|
865
662
|
}
|
|
866
663
|
}
|
|
867
|
-
// Host CLIs are host-global, not per-agent — show them once in the overview.
|
|
868
664
|
if (!filterAgentId) {
|
|
869
665
|
renderHostClisSection(process.cwd());
|
|
870
666
|
}
|
|
871
667
|
}
|
|
872
|
-
/**
|
|
873
|
-
* Show detailed resources for a specific agent version.
|
|
874
|
-
* Called when: `agents view claude@2.0.65` or `agents view claude@default`
|
|
875
|
-
*/
|
|
876
668
|
async function showAgentResources(agentId, requestedVersion, filter) {
|
|
877
669
|
const spinner = ora({ text: 'Loading...', isSilent: !process.stdout.isTTY }).start();
|
|
878
670
|
const cwd = process.cwd();
|
|
879
671
|
const agentsDir = getAgentsDir();
|
|
880
672
|
const cliStates = await getAllCliStates();
|
|
881
|
-
// Resolve 'default' to actual version
|
|
882
673
|
let version = null;
|
|
883
674
|
if (requestedVersion === 'default') {
|
|
884
675
|
version = getGlobalDefault(agentId);
|
|
@@ -902,8 +693,6 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
902
693
|
}
|
|
903
694
|
}
|
|
904
695
|
const home = getVersionHomePath(agentId, version);
|
|
905
|
-
// Git sync status if ~/.agents/ is a git repo (shared loader — see
|
|
906
|
-
// loadResourceSyncData / resolveResourceSyncState, reused by --json --resources).
|
|
907
696
|
const { hasGitRepo, commands: commandsSync, skills: skillsSync, hooks: hooksSync, memory: memorySync } = await loadResourceSyncData();
|
|
908
697
|
const resources = getAgentResources(agentId, {
|
|
909
698
|
cwd,
|
|
@@ -921,7 +710,6 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
921
710
|
})),
|
|
922
711
|
skills: resources.skills.map(r => ({
|
|
923
712
|
...r,
|
|
924
|
-
// ruleCount of 0 is noise — every skill has 0 unless it ships subrules, which is rare.
|
|
925
713
|
ruleCount: r.ruleCount && r.ruleCount > 0 ? r.ruleCount : undefined,
|
|
926
714
|
syncState: r.scope === 'project' ? undefined : resolveResourceSyncState(agentId, r.name, 'skills', skillsSync),
|
|
927
715
|
})),
|
|
@@ -938,7 +726,6 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
938
726
|
workflows: resources.workflows.map(r => ({ name: r.name, path: r.path, scope: r.scope })),
|
|
939
727
|
};
|
|
940
728
|
spinner.stop();
|
|
941
|
-
// Render helper for resources
|
|
942
729
|
function renderSection(title, items) {
|
|
943
730
|
console.log(chalk.bold(`\n${title}\n`));
|
|
944
731
|
if (items.length === 0) {
|
|
@@ -962,7 +749,6 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
962
749
|
let display = nameColor(linkedName);
|
|
963
750
|
if (r.ruleCount !== undefined)
|
|
964
751
|
display += chalk.gray(` (${r.ruleCount} rules)`);
|
|
965
|
-
// Source annotation: project overrides user, user overrides system
|
|
966
752
|
const sourceTag = r.scope === 'project' ? chalk.blue('[project]')
|
|
967
753
|
: r.scope === 'user' ? chalk.cyan('[user]')
|
|
968
754
|
: chalk.gray('[system]');
|
|
@@ -974,9 +760,6 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
974
760
|
console.log(prefix + descStr);
|
|
975
761
|
}
|
|
976
762
|
}
|
|
977
|
-
// Render promptcuts (cross-agent, not per-version). Shortcuts are layered
|
|
978
|
-
// across system + user files with user precedence; the displayed file path
|
|
979
|
-
// is whichever is "live" — user if it exists, else system.
|
|
980
763
|
function renderPromptcuts() {
|
|
981
764
|
console.log(chalk.bold(`\nPromptcuts\n`));
|
|
982
765
|
const merged = readMergedPromptcuts();
|
|
@@ -989,8 +772,6 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
989
772
|
console.log(` ${chalk.green(label).padEnd(24)} ${chalk.gray(formatPath(getEffectivePromptcutsPath(), cwd))}`);
|
|
990
773
|
}
|
|
991
774
|
const anyFilterSet = filter && SECTION_KEYS.some((k) => filter[k]);
|
|
992
|
-
// 1. Agent CLI info — skip the header entirely when the user asked for a
|
|
993
|
-
// specific section. They want "nothing more or less."
|
|
994
775
|
if (!anyFilterSet) {
|
|
995
776
|
console.log(chalk.bold('Agent CLIs\n'));
|
|
996
777
|
const accountInfo = await getAccountInfo(agentId, home);
|
|
@@ -1003,7 +784,6 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
1003
784
|
const accountLabel = accountColumnLabel(accountInfo);
|
|
1004
785
|
const emailStr = accountLabel ? chalk.cyan(` ${accountLabel}`) : '';
|
|
1005
786
|
const status = chalk.green(version);
|
|
1006
|
-
// Configured model sits right beside the version, same priority (no label).
|
|
1007
787
|
const configuredModel = resolveConfiguredModel(agentId, version);
|
|
1008
788
|
const modelStr = configuredModel ? chalk.yellow(` ${configuredModel.model}`) : '';
|
|
1009
789
|
const usageStr = formatUsageSummary(usageInfo.snapshot?.plan ?? accountInfo.plan, null);
|
|
@@ -1017,13 +797,11 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
1017
797
|
}
|
|
1018
798
|
}
|
|
1019
799
|
}
|
|
1020
|
-
// 2. Resources
|
|
1021
800
|
if (shouldRenderSection('commands', filter)) {
|
|
1022
801
|
renderSection('Commands', agentData.commands);
|
|
1023
802
|
}
|
|
1024
803
|
if (shouldRenderSection('skills', filter)) {
|
|
1025
804
|
renderSection('Skills', agentData.skills);
|
|
1026
|
-
// Show skill parse errors only when skills section is visible
|
|
1027
805
|
if (agentData.skillErrors.length > 0) {
|
|
1028
806
|
console.log(`\n ${chalk.red('Skill Errors')}:`);
|
|
1029
807
|
for (const err of agentData.skillErrors) {
|
|
@@ -1075,7 +853,6 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
1075
853
|
}
|
|
1076
854
|
}
|
|
1077
855
|
}
|
|
1078
|
-
// Rules section with subrules breakdown
|
|
1079
856
|
function renderRulesSection() {
|
|
1080
857
|
console.log(chalk.bold('\nRules\n'));
|
|
1081
858
|
const items = agentData.memory;
|
|
@@ -1085,14 +862,12 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
1085
862
|
}
|
|
1086
863
|
const versionStr = agentData.version ? ` (${agentData.version})` : '';
|
|
1087
864
|
console.log(` ${chalk.bold(agentData.agentName)}${chalk.gray(versionStr)}:`);
|
|
1088
|
-
// Get composed subrules for the user scope
|
|
1089
865
|
let composedSubrules = [];
|
|
1090
866
|
try {
|
|
1091
867
|
const composed = composeRulesFromState({ cwd });
|
|
1092
868
|
composedSubrules = composed.subrules;
|
|
1093
869
|
}
|
|
1094
870
|
catch {
|
|
1095
|
-
// No preset configured or rules.yaml missing — show rules without subrule breakdown
|
|
1096
871
|
}
|
|
1097
872
|
for (const r of items) {
|
|
1098
873
|
let nameColor = chalk.cyan;
|
|
@@ -1114,7 +889,6 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
1114
889
|
display += ` ${sourceTag}`;
|
|
1115
890
|
const syncStr = r.syncState ? chalk.gray(` [${r.syncState}]`) : '';
|
|
1116
891
|
console.log(` ${display}${syncStr}`);
|
|
1117
|
-
// Show subrules for user-scope rules (the compiled CLAUDE.md)
|
|
1118
892
|
if (r.scope === 'user' && composedSubrules.length > 0) {
|
|
1119
893
|
for (const sub of composedSubrules) {
|
|
1120
894
|
const scopeLabel = sub.layerScope === 'project' ? chalk.blue('[project]')
|
|
@@ -1139,16 +913,12 @@ async function showAgentResources(agentId, requestedVersion, filter) {
|
|
|
1139
913
|
if (shouldRenderSection('clis', filter)) {
|
|
1140
914
|
renderHostClisSection(cwd);
|
|
1141
915
|
}
|
|
1142
|
-
// Show legend at the end if git repo exists and we showed all sections.
|
|
1143
|
-
// Filtered single-section views skip it — noise for promptcuts or plugins.
|
|
1144
916
|
if (hasGitRepo && !anyFilterSet) {
|
|
1145
917
|
console.log();
|
|
1146
918
|
console.log(chalk.gray('Legend:'), chalk.green('Tracked'), chalk.blue('Local-only'), chalk.yellow('Modified'), chalk.red('Deleted'));
|
|
1147
919
|
}
|
|
1148
920
|
}
|
|
1149
921
|
const ALL_RESOURCE_SECTIONS = ['commands', 'skills', 'mcp', 'memory', 'hooks', 'workflows', 'plugins'];
|
|
1150
|
-
/** Load git sync-state for the tracked resource kinds. Shared by the human
|
|
1151
|
-
* detail view (showAgentResources) and the `--json --resources` path. */
|
|
1152
922
|
async function loadResourceSyncData() {
|
|
1153
923
|
const userAgentsDir = getUserAgentsDir();
|
|
1154
924
|
const hasGitRepo = isGitRepo(userAgentsDir);
|
|
@@ -1160,8 +930,6 @@ async function loadResourceSyncData() {
|
|
|
1160
930
|
memory: hasGitRepo ? await getGitSyncStatus(userAgentsDir, 'rules') : null,
|
|
1161
931
|
};
|
|
1162
932
|
}
|
|
1163
|
-
/** Resolve one resource's git sync-state. Extracted from showAgentResources so
|
|
1164
|
-
* the human view and the JSON path derive drift identically. */
|
|
1165
933
|
function resolveResourceSyncState(agentId, resourceName, resourceType, syncStatus) {
|
|
1166
934
|
if (!syncStatus)
|
|
1167
935
|
return undefined;
|
|
@@ -1176,7 +944,6 @@ function resolveResourceSyncState(agentId, resourceName, resourceType, syncStatu
|
|
|
1176
944
|
relativePath = `hooks/${resourceName}`;
|
|
1177
945
|
}
|
|
1178
946
|
else {
|
|
1179
|
-
// Rules files: map agent-specific name (CLAUDE.md) back to canonical (AGENTS.md)
|
|
1180
947
|
const centralName = getCentralRulesFileName(agentId);
|
|
1181
948
|
relativePath = `rules/${centralName}`;
|
|
1182
949
|
}
|
|
@@ -1189,11 +956,8 @@ function resolveResourceSyncState(agentId, resourceName, resourceType, syncStatu
|
|
|
1189
956
|
return 'deleted';
|
|
1190
957
|
if (syncStatus.synced.some(matchesPath))
|
|
1191
958
|
return 'synced';
|
|
1192
|
-
// Not in any array = local-only (untracked with no files)
|
|
1193
959
|
return 'new';
|
|
1194
960
|
}
|
|
1195
|
-
/** Collect one version's resources for `--json`, limited to `sections`. Scans
|
|
1196
|
-
* the version's `home`, so per-version differences are reported accurately. */
|
|
1197
961
|
function collectVersionResources(agentId, home, cwd, cliInstalled, sections, sync) {
|
|
1198
962
|
const res = getAgentResources(agentId, { cwd, scope: 'all', cliInstalled, home });
|
|
1199
963
|
const out = {};
|
|
@@ -1213,7 +977,6 @@ function collectVersionResources(agentId, home, cwd, cliInstalled, sections, syn
|
|
|
1213
977
|
if (sections.has('skills')) {
|
|
1214
978
|
out.skills = res.skills.map((r) => {
|
|
1215
979
|
const item = withSync(r, 'skills', sync.skills);
|
|
1216
|
-
// ruleCount of 0 is noise — every skill has 0 unless it ships subrules.
|
|
1217
980
|
if (r.ruleCount && r.ruleCount > 0)
|
|
1218
981
|
item.ruleCount = r.ruleCount;
|
|
1219
982
|
return item;
|
|
@@ -1240,9 +1003,6 @@ function collectVersionResources(agentId, home, cwd, cliInstalled, sections, syn
|
|
|
1240
1003
|
}
|
|
1241
1004
|
return out;
|
|
1242
1005
|
}
|
|
1243
|
-
/** Build the set of resource sections to include in `--json` from the
|
|
1244
|
-
* `--resources` / `--detailed` flags, plus (in --json mode) the per-section
|
|
1245
|
-
* boolean filters (`--skills` etc.) that plain `--json` historically ignored. */
|
|
1246
1006
|
export function parseResourceSections(options, jsonMode) {
|
|
1247
1007
|
const set = new Set();
|
|
1248
1008
|
const addAll = () => ALL_RESOURCE_SECTIONS.forEach((s) => set.add(s));
|
|
@@ -1255,7 +1015,7 @@ export function parseResourceSections(options, jsonMode) {
|
|
|
1255
1015
|
}
|
|
1256
1016
|
else {
|
|
1257
1017
|
for (const raw of String(rv).split(',').map((s) => s.trim().toLowerCase()).filter(Boolean)) {
|
|
1258
|
-
const section = raw === 'rules' ? 'memory' : raw;
|
|
1018
|
+
const section = raw === 'rules' ? 'memory' : raw;
|
|
1259
1019
|
if (ALL_RESOURCE_SECTIONS.includes(section))
|
|
1260
1020
|
set.add(section);
|
|
1261
1021
|
}
|
|
@@ -1272,16 +1032,6 @@ export function parseResourceSections(options, jsonMode) {
|
|
|
1272
1032
|
}
|
|
1273
1033
|
return set;
|
|
1274
1034
|
}
|
|
1275
|
-
/**
|
|
1276
|
-
* The one run-readiness gate for one agent on THIS box (PHNX-4116). Runs the
|
|
1277
|
-
* SAME enumeration the local router picks from — `collectRunCandidates` (native
|
|
1278
|
-
* slots + version homes) through `readinessFromCandidate` — so the answer
|
|
1279
|
-
* `agents view --json` publishes is exactly what a `run` here would find, and a
|
|
1280
|
-
* remote `--device auto` dispatcher can read it instead of re-deriving freshness
|
|
1281
|
-
* on its own box (which drifted: view.ts lists version homes, the router lists
|
|
1282
|
-
* slots). Returns undefined when the agent has no candidates at all (nothing
|
|
1283
|
-
* installed), so the field is simply absent rather than a misleading verdict.
|
|
1284
|
-
*/
|
|
1285
1035
|
export async function computeAgentRunReady(agentId) {
|
|
1286
1036
|
const candidates = await collectRunCandidates(agentId);
|
|
1287
1037
|
if (candidates.length === 0)
|
|
@@ -1302,18 +1052,11 @@ export async function computeAgentRunReady(agentId) {
|
|
|
1302
1052
|
}
|
|
1303
1053
|
return { ready: !!readyAccount, reason, accounts };
|
|
1304
1054
|
}
|
|
1305
|
-
/**
|
|
1306
|
-
* Collect structured info for one or more agents without rendering to the
|
|
1307
|
-
* terminal. Used by `--json` output and any programmatic consumer (e.g. the
|
|
1308
|
-
* agents-cli extension's "resume current session in best available version"
|
|
1309
|
-
* command).
|
|
1310
|
-
*/
|
|
1311
1055
|
export async function collectAgentsJson(filterAgentId, resourceSections, opts) {
|
|
1312
1056
|
const agentsToShow = filterAgentId ? [filterAgentId] : ALL_AGENT_IDS;
|
|
1313
1057
|
const authCache = readAuthHealthCache();
|
|
1314
1058
|
const host = machineId();
|
|
1315
1059
|
const wantResources = !!resourceSections && resourceSections.size > 0;
|
|
1316
|
-
// Only pay for the git-status + resource scans when resources were requested.
|
|
1317
1060
|
const resourceSync = wantResources ? await loadResourceSyncData() : null;
|
|
1318
1061
|
const cliStates = wantResources ? await getAllCliStates() : null;
|
|
1319
1062
|
const infoFetches = [];
|
|
@@ -1348,14 +1091,7 @@ export async function collectAgentsJson(filterAgentId, resourceSections, opts) {
|
|
|
1348
1091
|
return info;
|
|
1349
1092
|
return {
|
|
1350
1093
|
...info,
|
|
1351
|
-
// Prefer a plan the live usage fetch surfaced (Kimi reports membership
|
|
1352
|
-
// tier in /usages; its local auth file has none) and fall back to the
|
|
1353
|
-
// account-derived plan (Claude's billingType).
|
|
1354
1094
|
plan: usageByKey.get(key)?.snapshot?.plan ?? canon.plan,
|
|
1355
|
-
// Throttle state comes from the live usage windows, not the pay-as-you-go
|
|
1356
|
-
// overage flag that AccountInfo.usageStatus used to carry. A maxed window
|
|
1357
|
-
// means rate-limited; no snapshot means no badge. See
|
|
1358
|
-
// deriveUsageStatusFromSnapshot.
|
|
1359
1095
|
usageStatus: deriveUsageStatusFromSnapshot(usageByKey.get(key)?.snapshot),
|
|
1360
1096
|
overageCredits: canon.overageCredits,
|
|
1361
1097
|
};
|
|
@@ -1375,10 +1111,6 @@ export async function collectAgentsJson(filterAgentId, resourceSections, opts) {
|
|
|
1375
1111
|
isolated: isVersionIsolated(agentId, version),
|
|
1376
1112
|
isIsolatedDefault: getIsolatedDefault(agentId) === version,
|
|
1377
1113
|
signedIn: info.signedIn,
|
|
1378
|
-
// The strict per-version launch truth (vs the display `signedIn` above,
|
|
1379
|
-
// which inherits the active/global HOME login). The same primitive
|
|
1380
|
-
// `collectRunCandidates` uses locally, so remote `--device auto` placement
|
|
1381
|
-
// is gated on identical launchability (PHNX-3466).
|
|
1382
1114
|
launchable: isLaunchableSignedIn(info.signedIn, credentialPresence(agentId, home)),
|
|
1383
1115
|
authVerdict: authHealth?.verdict ?? null,
|
|
1384
1116
|
authCheckedAt: authHealth?.checkedAt ?? null,
|
|
@@ -1418,16 +1150,11 @@ export async function collectAgentsJson(filterAgentId, resourceSections, opts) {
|
|
|
1418
1150
|
else
|
|
1419
1151
|
byAgent.set(agentId, [entry]);
|
|
1420
1152
|
}
|
|
1421
|
-
// Keep filtered native JSON consistent with the text view: custom forks are
|
|
1422
|
-
// not children of the native harness they execute through.
|
|
1423
1153
|
const harnesses = filterAgentId ? [] : getHarnesses();
|
|
1424
1154
|
const catalog = await loadAccountCatalog();
|
|
1425
1155
|
const note = secretsUnavailableNote(catalog);
|
|
1426
1156
|
if (note)
|
|
1427
|
-
console.error(chalk.yellow(note));
|
|
1428
|
-
// The one run-readiness gate per agent, computed off the router's own
|
|
1429
|
-
// enumeration (PHNX-4116). Runs in parallel across agents; a harness with
|
|
1430
|
-
// nothing installed yields undefined and the field is omitted.
|
|
1157
|
+
console.error(chalk.yellow(note));
|
|
1431
1158
|
const runReadyByAgent = new Map();
|
|
1432
1159
|
await Promise.all(agentsToShow.map(async (agentId) => {
|
|
1433
1160
|
const runReady = await computeAgentRunReady(agentId);
|
|
@@ -1442,8 +1169,6 @@ export async function collectAgentsJson(filterAgentId, resourceSections, opts) {
|
|
|
1442
1169
|
return a.isDefault ? -1 : 1;
|
|
1443
1170
|
return compareVersions(b.version, a.version);
|
|
1444
1171
|
});
|
|
1445
|
-
// Project through the public JSON v2 serializer — the internal catalog row
|
|
1446
|
-
// (identityKey, home, installations) is not the machine contract.
|
|
1447
1172
|
const accounts = accountListJson(catalog.native.filter((row) => row.agent === agentId), catalog.provider.filter((row) => row.harnesses.includes(agentId)), agentId).accounts;
|
|
1448
1173
|
out.push({
|
|
1449
1174
|
agent: agentId,
|
|
@@ -1455,14 +1180,6 @@ export async function collectAgentsJson(filterAgentId, resourceSections, opts) {
|
|
|
1455
1180
|
}
|
|
1456
1181
|
return out;
|
|
1457
1182
|
}
|
|
1458
|
-
/**
|
|
1459
|
-
* Identity key for duplicate-install detection. Prefers accountKey — which
|
|
1460
|
-
* encodes account AND org — over the bare email: two installs can share an
|
|
1461
|
-
* email yet belong to different orgs (a personal Max plan and a Team seat),
|
|
1462
|
-
* and grouping those by email alone would propose pruning a live account.
|
|
1463
|
-
* Falls back to the lowercased email for agents whose credentials expose no
|
|
1464
|
-
* identity key. Null when there is no usable identity.
|
|
1465
|
-
*/
|
|
1466
1183
|
export function pruneGroupKey(info) {
|
|
1467
1184
|
return info.accountKey ?? info.email?.toLowerCase() ?? null;
|
|
1468
1185
|
}
|
|
@@ -1487,14 +1204,7 @@ export function pruneGroupKey(info) {
|
|
|
1487
1204
|
* trashing the identified home is the exact bug this replaces.
|
|
1488
1205
|
*/
|
|
1489
1206
|
export function planDuplicatePrune(candidates) {
|
|
1490
|
-
// Only installs with a working binary compete for "the live install for this account".
|
|
1491
1207
|
const installed = candidates.filter((c) => c.hasBinary && c.email);
|
|
1492
|
-
// email -> every DISTINCT captured accountKey seen for it. An email-only home
|
|
1493
|
-
// folds into an identified account only when that email maps to EXACTLY ONE
|
|
1494
|
-
// account; when two distinct orgs share the email (the Personal+Team case) the
|
|
1495
|
-
// fold is ambiguous, so the identity-less home is left ungrouped rather than
|
|
1496
|
-
// guessed into one — guessing could retire the actually-working re-login of the
|
|
1497
|
-
// OTHER org (the exact bug this function exists to prevent, one level up).
|
|
1498
1208
|
const emailToAccountKeys = new Map();
|
|
1499
1209
|
for (const c of installed) {
|
|
1500
1210
|
if (!c.accountKey)
|
|
@@ -1509,11 +1219,8 @@ export function planDuplicatePrune(candidates) {
|
|
|
1509
1219
|
const keys = email ? emailToAccountKeys.get(email) : undefined;
|
|
1510
1220
|
if (keys && keys.size === 1)
|
|
1511
1221
|
return [...keys][0];
|
|
1512
|
-
// ≥2 identified orgs on this email: never merge the ambiguous home. A unique
|
|
1513
|
-
// key makes it its own singleton group (length 1 → never pruned).
|
|
1514
1222
|
if (keys && keys.size >= 2)
|
|
1515
1223
|
return `ambiguous:${c.email.toLowerCase()}:${c.version}`;
|
|
1516
|
-
// No identified sibling at all: group equally-bare homes by email as before.
|
|
1517
1224
|
return pruneGroupKey(c);
|
|
1518
1225
|
};
|
|
1519
1226
|
const byAccount = new Map();
|
|
@@ -1570,21 +1277,15 @@ async function buildAgentPrunePlan(agentId) {
|
|
|
1570
1277
|
version: d.version,
|
|
1571
1278
|
email: d.email,
|
|
1572
1279
|
keeper: d.keeper,
|
|
1573
|
-
// The default may itself be a to-be-retired duplicate (a freshly created
|
|
1574
|
-
// home often becomes the global default). We do NOT skip it: executePrune
|
|
1575
|
-
// repoints the default onto the keeper first, then retires the duplicate.
|
|
1576
1280
|
isDefault: d.version === globalDefault,
|
|
1577
1281
|
reason: 'duplicate',
|
|
1578
1282
|
});
|
|
1579
1283
|
}
|
|
1580
|
-
// Home-only leftovers: dirs without a binary. These are residue from a
|
|
1581
|
-
// prior removeVersion before the soft-delete migration, plus any hand-edited
|
|
1582
|
-
// installs. Surface them so the user can move them to trash.
|
|
1583
1284
|
for (const e of entries) {
|
|
1584
1285
|
if (e.hasBinary)
|
|
1585
1286
|
continue;
|
|
1586
1287
|
if (e.version === globalDefault)
|
|
1587
|
-
continue;
|
|
1288
|
+
continue;
|
|
1588
1289
|
toPrune.push({
|
|
1589
1290
|
agentId,
|
|
1590
1291
|
version: e.version,
|
|
@@ -1598,10 +1299,6 @@ async function buildAgentPrunePlan(agentId) {
|
|
|
1598
1299
|
}
|
|
1599
1300
|
export async function executePrunePlan(plan) {
|
|
1600
1301
|
const moved = [];
|
|
1601
|
-
// Repoint the global default onto the keeper BEFORE retiring a duplicate that
|
|
1602
|
-
// currently holds it, so consolidation collapses the duplicate instead of
|
|
1603
|
-
// leaving it pinned as the default (and so removeVersion's own fallback never
|
|
1604
|
-
// has to guess a replacement).
|
|
1605
1302
|
for (const p of plan.toPrune) {
|
|
1606
1303
|
if (p.reason === 'duplicate' && p.isDefault && p.keeper && p.keeper !== p.version) {
|
|
1607
1304
|
setGlobalDefault(p.agentId, p.keeper);
|
|
@@ -1640,17 +1337,6 @@ function printPrunePlan(plan, isFirst) {
|
|
|
1640
1337
|
}
|
|
1641
1338
|
console.log();
|
|
1642
1339
|
}
|
|
1643
|
-
/**
|
|
1644
|
-
* Consolidate to one home per logical account: retire the redundant duplicate
|
|
1645
|
-
* homes an account accumulated, keeping the single home that best represents it
|
|
1646
|
-
* (see {@link planDuplicatePrune} for the keeper/merge rules). When the retired
|
|
1647
|
-
* duplicate holds the global default, the default is first repointed onto the
|
|
1648
|
-
* keeper, so consolidation collapses it instead of leaving it pinned.
|
|
1649
|
-
*
|
|
1650
|
-
* When filterAgentId is set, prunes that agent first, then cascades: after
|
|
1651
|
-
* each agent, offers the next agent with duplicates. User answering "no"
|
|
1652
|
-
* stops the chain.
|
|
1653
|
-
*/
|
|
1654
1340
|
export async function pruneDuplicates(filterAgentId, yes, dryRun) {
|
|
1655
1341
|
const ordered = filterAgentId
|
|
1656
1342
|
? [filterAgentId, ...ALL_AGENT_IDS.filter((a) => a !== filterAgentId)]
|
|
@@ -1719,20 +1405,12 @@ export async function pruneDuplicates(filterAgentId, yes, dryRun) {
|
|
|
1719
1405
|
printTrashFooter(allMoved);
|
|
1720
1406
|
}
|
|
1721
1407
|
}
|
|
1722
|
-
/**
|
|
1723
|
-
* Main view action handler.
|
|
1724
|
-
* Exported for use by deprecated aliases.
|
|
1725
|
-
*/
|
|
1726
1408
|
export async function viewAction(agentArg, options) {
|
|
1727
|
-
// --merged renders the cross-layer, first-wins resource surface (the former
|
|
1728
|
-
// `agents resources`), independent of the per-version detail view below.
|
|
1729
1409
|
if (options?.merged) {
|
|
1730
1410
|
renderMergedResources();
|
|
1731
1411
|
return;
|
|
1732
1412
|
}
|
|
1733
|
-
// --live is a shorter-to-type alias of --refresh; both force a live probe.
|
|
1734
1413
|
const forceRefresh = options?.refresh === true || options?.live === true;
|
|
1735
|
-
// --resources / --detailed imply --json (they only shape structured output).
|
|
1736
1414
|
const explicitResources = options?.detailed === true || options?.resources !== undefined;
|
|
1737
1415
|
const json = options?.json === true || explicitResources;
|
|
1738
1416
|
const resourceSections = parseResourceSections(options ?? {}, json);
|
|
@@ -1751,11 +1429,6 @@ export async function viewAction(agentArg, options) {
|
|
|
1751
1429
|
clis: options?.clis,
|
|
1752
1430
|
};
|
|
1753
1431
|
const filterIsSet = SECTION_KEYS.some((k) => filter[k]);
|
|
1754
|
-
// RUSH-1320: fold any stale literal `latest` version-home into its concrete
|
|
1755
|
-
// version before rendering, so it stops appearing as a bogus "version" next
|
|
1756
|
-
// to the real ones. Best-effort — must never break `agents view`. Scoped to
|
|
1757
|
-
// the queried agent when one is given (cheap no-op for agents with no
|
|
1758
|
-
// `latest` dir, i.e. almost all of them).
|
|
1759
1432
|
{
|
|
1760
1433
|
const target = agentArg ? resolveAgentName(agentArg.split('@')[0]) : null;
|
|
1761
1434
|
const toReconcile = agentArg ? (target ? [target] : []) : ALL_AGENT_IDS;
|
|
@@ -1774,11 +1447,8 @@ export async function viewAction(agentArg, options) {
|
|
|
1774
1447
|
await showInstalledVersions(undefined, { forceRefresh, versions: options?.versions });
|
|
1775
1448
|
return;
|
|
1776
1449
|
}
|
|
1777
|
-
// Parse agent@version syntax
|
|
1778
1450
|
const parts = agentArg.split('@');
|
|
1779
1451
|
const agentName = parts[0];
|
|
1780
|
-
// Match run resolution: an exact custom harness name wins over a native id or
|
|
1781
|
-
// alias with the same spelling, so every fork remains independently viewable.
|
|
1782
1452
|
if (profileExists(agentName)) {
|
|
1783
1453
|
const harness = profileSummary(readProfile(agentName));
|
|
1784
1454
|
if (json) {
|
|
@@ -1797,9 +1467,6 @@ export async function viewAction(agentArg, options) {
|
|
|
1797
1467
|
console.log(chalk.red(formatAgentError(agentName)));
|
|
1798
1468
|
process.exit(1);
|
|
1799
1469
|
}
|
|
1800
|
-
// Resolve the @version filter through the agent-spec engine:
|
|
1801
|
-
// bare/@any → null (show all versions), @default/@pinned → 'default'
|
|
1802
|
-
// (showAgentResources handles it), @latest/@oldest/@x.y.z → concrete.
|
|
1803
1470
|
let requestedVersion;
|
|
1804
1471
|
try {
|
|
1805
1472
|
requestedVersion = resolveVersionFilter(agentId, parts[1]).version;
|
|
@@ -1826,26 +1493,20 @@ export async function viewAction(agentArg, options) {
|
|
|
1826
1493
|
return;
|
|
1827
1494
|
}
|
|
1828
1495
|
if (json) {
|
|
1829
|
-
// --json ignores the @version suffix, but --resources/--detailed (or a
|
|
1830
|
-
// section flag) now attach each version's resource inventory + sync-state.
|
|
1831
1496
|
const data = await collectAgentsJson(agentId, resourceSections, { forceRefresh });
|
|
1832
1497
|
console.log(JSON.stringify(data[0] ?? { agent: agentId, versions: [], harnesses: [] }, null, 2));
|
|
1833
1498
|
return;
|
|
1834
1499
|
}
|
|
1835
1500
|
if (requestedVersion) {
|
|
1836
|
-
// Specific version requested: show detailed resources
|
|
1837
1501
|
await showAgentResources(agentId, requestedVersion, filter);
|
|
1838
1502
|
}
|
|
1839
1503
|
else if (filterIsSet) {
|
|
1840
|
-
// `agents view claude --skills` → fall through to detail view on default.
|
|
1841
|
-
// Section filters only make sense for the per-version detail view.
|
|
1842
1504
|
await showAgentResources(agentId, 'default', filter);
|
|
1843
1505
|
}
|
|
1844
1506
|
else {
|
|
1845
1507
|
await showInstalledVersions(agentId, { forceRefresh, versions: options?.versions });
|
|
1846
1508
|
}
|
|
1847
1509
|
}
|
|
1848
|
-
/** Register the `agents view` command. */
|
|
1849
1510
|
export function registerViewCommand(program) {
|
|
1850
1511
|
addHostOption(program.command('view [agent]'))
|
|
1851
1512
|
.description('Show your agents, connected accounts, and usage.')
|