@phnx-labs/agents-cli 1.22.113 → 1.22.115
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 +139 -0
- package/README.md +32 -113
- package/dist/browser.js +0 -0
- package/dist/cli/command-registry.d.ts +0 -60
- package/dist/cli/command-registry.js +57 -66
- package/dist/commands/accounts.d.ts +3 -77
- package/dist/commands/accounts.js +13 -366
- package/dist/commands/apply.d.ts +0 -4
- package/dist/commands/apply.js +3 -3
- package/dist/commands/audit.js +1 -1
- package/dist/commands/auth.js +0 -2
- package/dist/commands/browser-picker.d.ts +3 -6
- package/dist/commands/browser-picker.js +2 -2
- package/dist/commands/browser-sessions-picker.d.ts +2 -1
- package/dist/commands/browser.d.ts +53 -0
- package/dist/commands/browser.js +199 -9
- package/dist/commands/computer-sessions-picker.d.ts +2 -1
- package/dist/commands/computer.d.ts +14 -19
- package/dist/commands/computer.js +65 -10
- package/dist/commands/config.js +46 -2
- package/dist/commands/daemon.d.ts +0 -23
- package/dist/commands/daemon.js +1 -1
- package/dist/commands/detach-core.d.ts +2 -1
- package/dist/commands/detach.d.ts +0 -3
- package/dist/commands/detach.js +3 -3
- package/dist/commands/doctor.d.ts +2 -3
- package/dist/commands/doctor.js +0 -11
- package/dist/commands/events.d.ts +1 -3
- package/dist/commands/events.js +4 -7
- package/dist/commands/exec.d.ts +0 -1
- package/dist/commands/exec.js +2 -7
- package/dist/commands/feed-watch.js +52 -8
- package/dist/commands/feed.d.ts +3 -3
- package/dist/commands/feed.js +1 -1
- package/dist/commands/focus.d.ts +4 -4
- package/dist/commands/focus.js +1 -1
- package/dist/commands/go.d.ts +0 -17
- package/dist/commands/go.js +2 -19
- package/dist/commands/harness-hooks.d.ts +0 -7
- package/dist/commands/harness-hooks.js +1 -1
- package/dist/commands/harness-wizard.d.ts +2 -2
- package/dist/commands/harness.d.ts +3 -8
- package/dist/commands/harness.js +1 -1
- package/dist/commands/inspect.d.ts +2 -3
- package/dist/commands/inspect.js +1 -1
- package/dist/commands/logs.js +1 -1
- package/dist/commands/mcp.js +8 -83
- package/dist/commands/memory.js +4 -47
- package/dist/commands/message.d.ts +1 -1
- package/dist/commands/message.js +7 -7
- package/dist/commands/plugins.js +1 -93
- package/dist/commands/projects.d.ts +2 -18
- package/dist/commands/projects.js +89 -3
- package/dist/commands/repo.js +0 -44
- package/dist/commands/resource-view.d.ts +3 -2
- package/dist/commands/resume.d.ts +0 -1
- package/dist/commands/resume.js +5 -2
- package/dist/commands/routines.d.ts +1 -3
- package/dist/commands/routines.js +1 -1
- package/dist/commands/run-account-picker.d.ts +2 -1
- package/dist/commands/run-broadcast.d.ts +2 -1
- package/dist/commands/run-device-picker.d.ts +2 -1
- package/dist/commands/secrets-passthrough.d.ts +14 -0
- package/dist/commands/secrets-passthrough.js +23 -4
- package/dist/commands/send.d.ts +4 -4
- package/dist/commands/send.js +6 -51
- package/dist/commands/sessions-backfill.d.ts +2 -35
- package/dist/commands/sessions-backfill.js +1 -1
- package/dist/commands/sessions-backup-setup.js +1 -1
- package/dist/commands/sessions-bookmark.d.ts +0 -10
- package/dist/commands/sessions-bookmark.js +1 -1
- package/dist/commands/sessions-inject.d.ts +2 -3
- package/dist/commands/sessions-inject.js +8 -17
- package/dist/commands/sessions-picker-factory.d.ts +4 -14
- package/dist/commands/sessions-picker-factory.js +2 -2
- package/dist/commands/sessions-picker.d.ts +3 -9
- package/dist/commands/sessions-picker.js +2 -2
- package/dist/commands/sessions-resume.d.ts +2 -4
- package/dist/commands/sessions-resume.js +0 -6
- package/dist/commands/sessions-share.d.ts +5 -7
- package/dist/commands/sessions-share.js +98 -49
- package/dist/commands/sessions-stats.d.ts +2 -1
- package/dist/commands/sessions-stop.d.ts +0 -3
- package/dist/commands/sessions-stop.js +1 -1
- package/dist/commands/sessions-tail.d.ts +2 -1
- package/dist/commands/sessions-trace.d.ts +4 -6
- package/dist/commands/sessions-trace.js +1 -1
- package/dist/commands/sessions.d.ts +13 -104
- package/dist/commands/sessions.js +11 -18
- package/dist/commands/setup-browser.js +18 -2
- package/dist/commands/setup-computer.js +20 -6
- package/dist/commands/setup-mine.d.ts +0 -6
- package/dist/commands/setup-mine.js +1 -1
- package/dist/commands/setup-secrets.js +24 -4
- package/dist/commands/setup-terminal.d.ts +3 -0
- package/dist/commands/setup-terminal.js +22 -0
- package/dist/commands/setup.d.ts +3 -4
- package/dist/commands/setup.js +21 -11
- package/dist/commands/skills.js +0 -8
- package/dist/commands/ssh.d.ts +6 -0
- package/dist/commands/ssh.js +92 -233
- package/dist/commands/sync.js +14 -5
- package/dist/commands/teams-picker.d.ts +2 -5
- package/dist/commands/teams-picker.js +2 -2
- package/dist/commands/teams.d.ts +1 -7
- package/dist/commands/teams.js +2 -2
- package/dist/commands/tmux.d.ts +1 -1
- package/dist/commands/tmux.js +1 -1
- package/dist/commands/traces.js +1 -1
- package/dist/commands/upgrade.d.ts +2 -1
- package/dist/commands/utils.d.ts +1 -1
- package/dist/commands/utils.js +1 -1
- package/dist/lib/account-capabilities.d.ts +2 -1
- package/dist/lib/account-catalog.d.ts +4 -13
- package/dist/lib/account-catalog.js +1 -1
- package/dist/lib/account-registry.d.ts +3 -4
- package/dist/lib/account-registry.js +1 -1
- package/dist/lib/accounting/account-launch.d.ts +4 -3
- package/dist/lib/accounting/account-pool.d.ts +2 -1
- package/dist/lib/accounting/rotate.d.ts +3 -9
- package/dist/lib/accounting/rotate.js +2 -14
- package/dist/lib/accounting/usage-sync.d.ts +5 -4
- package/dist/lib/accounting/usage.d.ts +7 -31
- package/dist/lib/accounting/usage.js +4 -4
- package/dist/lib/accounts/add.d.ts +0 -5
- package/dist/lib/accounts/add.js +1 -7
- package/dist/lib/accounts/migrate.d.ts +8 -8
- package/dist/lib/accounts/migrate.js +1 -1
- package/dist/lib/acp/client.d.ts +3 -2
- package/dist/lib/acp/harnesses.d.ts +2 -2
- package/dist/lib/acp/harnesses.js +1 -1
- package/dist/lib/acp/run.d.ts +2 -1
- package/dist/lib/actor.d.ts +3 -2
- package/dist/lib/add-dir.d.ts +2 -17
- package/dist/lib/add-dir.js +2 -6
- package/dist/lib/address.d.ts +56 -0
- package/dist/lib/address.js +143 -0
- package/dist/lib/agent-spec/agents.d.ts +12 -28
- package/dist/lib/agent-spec/agents.js +2 -6
- package/dist/lib/agent-spec/primitives.d.ts +0 -7
- package/dist/lib/agent-spec/primitives.js +0 -6
- package/dist/lib/agent-spec/types.d.ts +2 -1
- package/dist/lib/analytics/dashboard.d.ts +1 -5
- package/dist/lib/analytics/dashboard.js +0 -2
- package/dist/lib/analytics/mix-commands.d.ts +0 -7
- package/dist/lib/analytics/mix-commands.js +3 -3
- package/dist/lib/analytics/recipes.d.ts +0 -12
- package/dist/lib/analytics/recipes.js +7 -31
- package/dist/lib/analytics/usage-db.d.ts +5 -32
- package/dist/lib/analytics/usage-db.js +1 -70
- package/dist/lib/answer-router.d.ts +7 -6
- package/dist/lib/answer-router.js +5 -11
- package/dist/lib/artifact-actions.d.ts +0 -4
- package/dist/lib/artifacts-client.d.ts +20 -0
- package/dist/lib/artifacts-client.js +46 -0
- package/dist/lib/ask-classifier.d.ts +3 -4
- package/dist/lib/ask-classifier.js +0 -7
- package/dist/lib/auth-health.d.ts +3 -46
- package/dist/lib/auth-health.js +3 -3
- package/dist/lib/auth-mint.d.ts +6 -6
- package/dist/lib/auth-mint.js +7 -7
- package/dist/lib/bench/runner.d.ts +2 -2
- package/dist/lib/bench/runner.js +1 -1
- package/dist/lib/bench/storage.d.ts +0 -1
- package/dist/lib/bench/storage.js +1 -1
- package/dist/lib/boot-profile.d.ts +0 -2
- package/dist/lib/boot-profile.js +0 -4
- package/dist/lib/brand.d.ts +0 -6
- package/dist/lib/brand.js +1 -1
- package/dist/lib/browser/arc-discovery.d.ts +4 -12
- package/dist/lib/browser/arc-discovery.js +1 -1
- package/dist/lib/browser/cdp.d.ts +1 -1
- package/dist/lib/browser/chrome.d.ts +2 -2
- package/dist/lib/browser/chrome.js +0 -4
- package/dist/lib/browser/chromium-discovery.d.ts +3 -2
- package/dist/lib/browser/drivers/arc.d.ts +3 -20
- package/dist/lib/browser/drivers/arc.js +2 -7
- package/dist/lib/browser/drivers/firefox.d.ts +2 -6
- package/dist/lib/browser/drivers/firefox.js +1 -1
- package/dist/lib/browser/drivers/local.d.ts +2 -1
- package/dist/lib/browser/drivers/ssh.d.ts +2 -3
- package/dist/lib/browser/drivers/ssh.js +0 -7
- package/dist/lib/browser/firefox-discovery.d.ts +4 -3
- package/dist/lib/browser/har.d.ts +8 -7
- package/dist/lib/browser/hygiene.d.ts +2 -3
- package/dist/lib/browser/hygiene.js +1 -1
- package/dist/lib/browser/ipc.d.ts +4 -3
- package/dist/lib/browser/ipc.js +1 -1
- package/dist/lib/browser/login-detection.d.ts +1 -8
- package/dist/lib/browser/registry.d.ts +2 -1
- package/dist/lib/browser/remote-control.d.ts +0 -7
- package/dist/lib/browser/remote-control.js +2 -2
- package/dist/lib/browser/resolve-target.d.ts +2 -6
- package/dist/lib/browser/resolve-target.js +3 -3
- package/dist/lib/browser/runtime-state.d.ts +59 -4
- package/dist/lib/browser/runtime-state.js +99 -18
- package/dist/lib/browser/service.d.ts +4 -4
- package/dist/lib/browser/service.js +21 -1
- package/dist/lib/browser/sessions-list.d.ts +0 -10
- package/dist/lib/browser/sessions-list.js +3 -3
- package/dist/lib/browser/stream.d.ts +2 -1
- package/dist/lib/browser/task-index.d.ts +4 -4
- package/dist/lib/browser/task-index.js +1 -1
- package/dist/lib/browser/types.d.ts +0 -20
- package/dist/lib/browser/types.js +1 -34
- package/dist/lib/browser/upload.d.ts +0 -27
- package/dist/lib/budget/ledger.d.ts +0 -2
- package/dist/lib/budget/ledger.js +1 -1
- package/dist/lib/budget/live-cloud.d.ts +2 -1
- package/dist/lib/budget/preflight.d.ts +3 -5
- package/dist/lib/budget/preflight.js +1 -1
- package/dist/lib/catchup.d.ts +2 -1
- package/dist/lib/channels/owner-forward.d.ts +5 -4
- package/dist/lib/channels/owner-sink.js +2 -2
- package/dist/lib/channels/providers/desktop.js +1 -1
- package/dist/lib/channels/providers/rush.d.ts +2 -1
- package/dist/lib/channels/registry.d.ts +1 -1
- package/dist/lib/channels/registry.js +1 -1
- package/dist/lib/channels/resolve.d.ts +3 -2
- package/dist/lib/channels/send.d.ts +5 -4
- package/dist/lib/cli-resources.d.ts +3 -9
- package/dist/lib/cli-resources.js +4 -2
- package/dist/lib/cloud/cursor.d.ts +1 -2
- package/dist/lib/cloud/cursor.js +1 -1
- package/dist/lib/cloud/dispatch.d.ts +2 -1
- package/dist/lib/cloud/dispatch.js +1 -1
- package/dist/lib/cloud/factory.d.ts +0 -2
- package/dist/lib/cloud/factory.js +1 -1
- package/dist/lib/cloud/rush.d.ts +3 -11
- package/dist/lib/cloud/rush.js +1 -1
- package/dist/lib/cloud/session-index.d.ts +2 -1
- package/dist/lib/cloud/types.d.ts +2 -1
- package/dist/lib/cloudflare/creds.d.ts +10 -0
- package/dist/lib/cloudflare/creds.js +46 -0
- package/dist/lib/cloudflare/provision.d.ts +35 -0
- package/dist/lib/cloudflare/provision.js +144 -0
- package/dist/lib/codex-policy.d.ts +2 -1
- package/dist/lib/commands.d.ts +7 -7
- package/dist/lib/commands.js +1 -1
- package/dist/lib/comms-render.d.ts +1 -1
- package/dist/lib/computer/context.d.ts +11 -3
- package/dist/lib/computer/context.js +2 -2
- package/dist/lib/computer/policy.d.ts +0 -12
- package/dist/lib/computer/policy.js +1 -1
- package/dist/lib/computer/sessions-list.d.ts +55 -0
- package/dist/lib/computer/sessions-list.js +168 -1
- package/dist/lib/computer-client.d.ts +3 -3
- package/dist/lib/computer-client.js +0 -1
- package/dist/lib/concurrency.d.ts +2 -1
- package/dist/lib/config-keys.d.ts +16 -3
- package/dist/lib/config-keys.js +47 -2
- package/dist/lib/convert.d.ts +0 -12
- package/dist/lib/convert.js +1 -12
- package/dist/lib/crabbox/cli.d.ts +6 -24
- package/dist/lib/crabbox/cli.js +2 -28
- package/dist/lib/crabbox/lease.d.ts +5 -6
- package/dist/lib/crabbox/lease.js +1 -1
- package/dist/lib/crabbox/progress.d.ts +2 -1
- package/dist/lib/crabbox/setup-copy.d.ts +2 -3
- package/dist/lib/crabbox/setup-copy.js +1 -1
- package/dist/lib/daemon/account-state-daemon-service.d.ts +1 -1
- package/dist/lib/daemon/attention-notify-service.d.ts +2 -1
- package/dist/lib/daemon/catchup-service.d.ts +2 -1
- package/dist/lib/daemon/daemon.d.ts +4 -4
- package/dist/lib/daemon/daemon.js +9 -2
- package/dist/lib/daemon/feed-stream-service.d.ts +23 -0
- package/dist/lib/daemon/feed-stream-service.js +40 -0
- package/dist/lib/daemon/harness-update-service.d.ts +2 -19
- package/dist/lib/daemon/harness-update-service.js +3 -3
- package/dist/lib/daemon/runner.d.ts +3 -3
- package/dist/lib/daemon/self-update-service.d.ts +1 -16
- package/dist/lib/daemon/self-update-service.js +6 -6
- package/dist/lib/daemon/state-dir-check-service.d.ts +2 -1
- package/dist/lib/daemon/supervisor.d.ts +3 -2
- package/dist/lib/daemon-services.d.ts +3 -2
- package/dist/lib/daemon-services.js +5 -0
- package/dist/lib/daemon-webhooks.d.ts +1 -1
- package/dist/lib/deeplink/register.d.ts +3 -13
- package/dist/lib/deeplink/register.js +3 -3
- package/dist/lib/deeplink/url.d.ts +3 -2
- package/dist/lib/device-config.d.ts +4 -15
- package/dist/lib/device-config.js +164 -8
- package/dist/lib/devices/connect.d.ts +51 -6
- package/dist/lib/devices/connect.js +169 -21
- package/dist/lib/devices/discovery-policy.d.ts +3 -2
- package/dist/lib/devices/doctor-findings.js +1 -1
- package/dist/lib/devices/doctor-overview-cache.d.ts +3 -2
- package/dist/lib/devices/fleet-divergence.d.ts +2 -1
- package/dist/lib/devices/fleet.d.ts +3 -4
- package/dist/lib/devices/fleet.js +1 -1
- package/dist/lib/devices/harness-inventory.d.ts +3 -2
- package/dist/lib/devices/health-report.d.ts +3 -2
- package/dist/lib/devices/health.d.ts +1 -8
- package/dist/lib/devices/health.js +1 -1
- package/dist/lib/devices/interactive-host.d.ts +0 -2
- package/dist/lib/devices/interactive-host.js +1 -1
- package/dist/lib/devices/known-hosts.d.ts +2 -20
- package/dist/lib/devices/known-hosts.js +2 -2
- package/dist/lib/devices/pool.d.ts +2 -1
- package/dist/lib/devices/resolve-target.d.ts +2 -2
- package/dist/lib/devices/rollout-verify.d.ts +3 -2
- package/dist/lib/devices/stats-cache.d.ts +3 -2
- package/dist/lib/devices/sync.d.ts +6 -5
- package/dist/lib/devices/worker-pick.d.ts +3 -12
- package/dist/lib/devices/worker-pick.js +1 -1
- package/dist/lib/diff-text.d.ts +2 -1
- package/dist/lib/doctor-diff.d.ts +2 -1
- package/dist/lib/drift-sync.d.ts +3 -2
- package/dist/lib/drift.d.ts +3 -3
- package/dist/lib/drift.js +1 -1
- package/dist/lib/event-families.d.ts +0 -6
- package/dist/lib/event-families.js +3 -3
- package/dist/lib/event-provenance.d.ts +2 -1
- package/dist/lib/events-ingest.d.ts +4 -3
- package/dist/lib/exec-account-home.d.ts +2 -4
- package/dist/lib/exec-account-home.js +1 -1
- package/dist/lib/exec-bounded.d.ts +3 -4
- package/dist/lib/exec-bounded.js +1 -1
- package/dist/lib/exec.d.ts +6 -18
- package/dist/lib/exec.js +1 -1
- package/dist/lib/factory/snapshot.d.ts +2 -2
- package/dist/lib/factory/snapshot.js +1 -1
- package/dist/lib/feed/activity-stream.d.ts +2 -5
- package/dist/lib/feed/activity-stream.js +2 -2
- package/dist/lib/feed/activity.d.ts +8 -33
- package/dist/lib/feed/activity.js +8 -8
- package/dist/lib/feed/answer.d.ts +3 -2
- package/dist/lib/feed/attention.js +5 -1
- package/dist/lib/feed/envelope.d.ts +79 -0
- package/dist/lib/feed/envelope.js +23 -0
- package/dist/lib/feed/events.d.ts +8 -47
- package/dist/lib/feed/events.js +9 -141
- package/dist/lib/feed/feed.d.ts +9 -42
- package/dist/lib/feed/feed.js +1 -60
- package/dist/lib/feed/hub-server.d.ts +86 -0
- package/dist/lib/feed/hub-server.js +334 -0
- package/dist/lib/feed/hub.d.ts +95 -0
- package/dist/lib/feed/hub.js +255 -0
- package/dist/lib/feed/pr-status.d.ts +0 -2
- package/dist/lib/feed/pr-status.js +1 -5
- package/dist/lib/feed/tool-activity.d.ts +108 -0
- package/dist/lib/feed/tool-activity.js +313 -0
- package/dist/lib/feed/tools.d.ts +198 -0
- package/dist/lib/feed/tools.js +265 -0
- package/dist/lib/feed/watch.d.ts +51 -52
- package/dist/lib/feed/watch.js +147 -17
- package/dist/lib/feed-broadcast.d.ts +5 -47
- package/dist/lib/feed-broadcast.js +9 -9
- package/dist/lib/feed-outcome.d.ts +3 -6
- package/dist/lib/feed-outcome.js +2 -2
- package/dist/lib/feed-policy.d.ts +5 -6
- package/dist/lib/feed-policy.js +2 -2
- package/dist/lib/feed-post.d.ts +3 -4
- package/dist/lib/feed-post.js +1 -1
- package/dist/lib/feed-ranking.d.ts +2 -2
- package/dist/lib/feed-ranking.js +1 -1
- package/dist/lib/fleet/apply.d.ts +5 -6
- package/dist/lib/fleet/apply.js +4 -4
- package/dist/lib/fleet/manifest.d.ts +2 -1
- package/dist/lib/fleet/remote-login.d.ts +18 -36
- package/dist/lib/fleet/remote-login.js +20 -19
- package/dist/lib/fleet/types.d.ts +0 -8
- package/dist/lib/fleet-cache.d.ts +1 -18
- package/dist/lib/fleet-cache.js +0 -5
- package/dist/lib/fleet-shared-repo-sync.d.ts +3 -3
- package/dist/lib/fleet-shared-repo-sync.js +1 -1
- package/dist/lib/fleet-shared-state.d.ts +3 -2
- package/dist/lib/format.d.ts +3 -2
- package/dist/lib/format.js +1 -1
- package/dist/lib/friction-heuristics.d.ts +2 -1
- package/dist/lib/fs-walk.d.ts +2 -1
- package/dist/lib/fuzzy.d.ts +2 -1
- package/dist/lib/gemini-settings.d.ts +0 -1
- package/dist/lib/gemini-settings.js +1 -1
- package/dist/lib/git.d.ts +7 -81
- package/dist/lib/git.js +2 -199
- package/dist/lib/github/gh-overload.d.ts +0 -4
- package/dist/lib/github/gh-overload.js +2 -2
- package/dist/lib/github/project-prs.d.ts +118 -0
- package/dist/lib/github/project-prs.js +173 -0
- package/dist/lib/github/rest.d.ts +2 -1
- package/dist/lib/harness/exec-config-version.d.ts +2 -1
- package/dist/lib/harness-auth-capabilities.d.ts +5 -4
- package/dist/lib/harness-connection-test.d.ts +2 -1
- package/dist/lib/heal.d.ts +3 -20
- package/dist/lib/heal.js +2 -39
- package/dist/lib/help.d.ts +3 -2
- package/dist/lib/helper-download.d.ts +0 -12
- package/dist/lib/helper-download.js +2 -2
- package/dist/lib/helper-versions.d.ts +2 -1
- package/dist/lib/helper-versions.js +1 -1
- package/dist/lib/hooks/install.d.ts +8 -49
- package/dist/lib/hooks/install.js +2 -96
- package/dist/lib/hooks/match.d.ts +2 -1
- package/dist/lib/hosts/credential-transport.d.ts +0 -2
- package/dist/lib/hosts/credential-transport.js +1 -1
- package/dist/lib/hosts/dispatch.d.ts +2 -24
- package/dist/lib/hosts/dispatch.js +2 -2
- package/dist/lib/hosts/logs.d.ts +2 -1
- package/dist/lib/hosts/passthrough.d.ts +1 -1
- package/dist/lib/hosts/passthrough.js +0 -1
- package/dist/lib/hosts/progress.d.ts +0 -5
- package/dist/lib/hosts/progress.js +1 -1
- package/dist/lib/hosts/ready.d.ts +3 -4
- package/dist/lib/hosts/ready.js +0 -8
- package/dist/lib/hosts/reconcile.d.ts +2 -8
- package/dist/lib/hosts/reconcile.js +1 -1
- package/dist/lib/hosts/reconnect.d.ts +4 -11
- package/dist/lib/hosts/reconnect.js +2 -2
- package/dist/lib/hosts/registry.d.ts +1 -1
- package/dist/lib/hosts/remote-cmd.d.ts +55 -4
- package/dist/lib/hosts/remote-cmd.js +125 -8
- package/dist/lib/hosts/remote-cmd.test-fixture.d.ts +2 -0
- package/dist/lib/hosts/remote-cmd.test-fixture.js +22 -0
- package/dist/lib/hosts/session-index.d.ts +3 -2
- package/dist/lib/hosts/ssh-config.d.ts +2 -3
- package/dist/lib/hosts/ssh-config.js +0 -10
- package/dist/lib/humans.d.ts +0 -2
- package/dist/lib/humans.js +2 -2
- package/dist/lib/import.d.ts +4 -3
- package/dist/lib/installations/installation-lock.d.ts +0 -2
- package/dist/lib/installations/installation-lock.js +2 -2
- package/dist/lib/installations/launch-gate.d.ts +0 -9
- package/dist/lib/installations/launch-gate.js +1 -1
- package/dist/lib/installations/migrate.d.ts +0 -11
- package/dist/lib/installations/migrate.js +1 -1
- package/dist/lib/installations/shims.d.ts +1 -1
- package/dist/lib/installations/shims.js +2 -2
- package/dist/lib/installations/update-runtime.js +1 -1
- package/dist/lib/linear-cache.d.ts +2 -1
- package/dist/lib/linux-userns.d.ts +2 -3
- package/dist/lib/linux-userns.js +0 -4
- package/dist/lib/loop.d.ts +2 -1
- package/dist/lib/mailbox-gc.d.ts +2 -1
- package/dist/lib/mailbox-target.d.ts +2 -1
- package/dist/lib/mailbox.d.ts +0 -6
- package/dist/lib/mailbox.js +1 -1
- package/dist/lib/manifest.d.ts +0 -14
- package/dist/lib/manifest.js +2 -2
- package/dist/lib/mcp-registry.d.ts +2 -1
- package/dist/lib/mcp.js +17 -11
- package/dist/lib/memory.d.ts +2 -13
- package/dist/lib/memory.js +4 -4
- package/dist/lib/menubar/download-menubar.d.ts +0 -2
- package/dist/lib/menubar/download-menubar.js +1 -5
- package/dist/lib/menubar/install-menubar.d.ts +3 -14
- package/dist/lib/menubar/install-menubar.js +3 -3
- package/dist/lib/menubar/migrate-prefs.d.ts +53 -0
- package/dist/lib/menubar/migrate-prefs.js +168 -0
- package/dist/lib/menubar/resolve-version.d.ts +1 -9
- package/dist/lib/menubar/resolve-version.js +4 -4
- package/dist/lib/menubar/snapshot.d.ts +24 -2
- package/dist/lib/menubar/snapshot.js +26 -0
- package/dist/lib/model-tier-overrides.d.ts +3 -2
- package/dist/lib/monitors/config.d.ts +0 -2
- package/dist/lib/monitors/config.js +0 -4
- package/dist/lib/monitors/engine.d.ts +1 -1
- package/dist/lib/monitors/remote.d.ts +3 -2
- package/dist/lib/monitors/sources/webhook.d.ts +2 -15
- package/dist/lib/monitors/sources/webhook.js +1 -38
- package/dist/lib/monitors/state.d.ts +4 -7
- package/dist/lib/monitors/state.js +2 -2
- package/dist/lib/notify.d.ts +1 -1
- package/dist/lib/notify.js +1 -1
- package/dist/lib/onepassword.d.ts +5 -14
- package/dist/lib/onepassword.js +0 -64
- package/dist/lib/open-url.d.ts +3 -2
- package/dist/lib/openclaw-keychain.d.ts +4 -17
- package/dist/lib/openclaw-keychain.js +3 -33
- package/dist/lib/operator.d.ts +2 -2
- package/dist/lib/operator.js +1 -1
- package/dist/lib/output/git-output.d.ts +4 -14
- package/dist/lib/output/git-output.js +1 -1
- package/dist/lib/owner-message.d.ts +3 -29
- package/dist/lib/owner-message.js +3 -3
- package/dist/lib/packages/output-home.d.ts +2 -4
- package/dist/lib/packages/output-home.js +2 -2
- package/dist/lib/perf/db.d.ts +0 -2
- package/dist/lib/perf/db.js +2 -7
- package/dist/lib/permissions-registry.d.ts +2 -3
- package/dist/lib/permissions-registry.js +0 -4
- package/dist/lib/permissions.d.ts +6 -16
- package/dist/lib/permissions.js +2 -15
- package/dist/lib/picker.d.ts +6 -5
- package/dist/lib/placement.d.ts +3 -6
- package/dist/lib/placement.js +0 -17
- package/dist/lib/platform/posixpath.d.ts +2 -1
- package/dist/lib/platform/winpath.d.ts +2 -1
- package/dist/lib/plugins/plugin-marketplace.d.ts +2 -2
- package/dist/lib/plugins/plugin-marketplace.js +1 -1
- package/dist/lib/pr-land-detach.d.ts +2 -1
- package/dist/lib/probe.d.ts +4 -1
- package/dist/lib/probe.js +5 -2
- package/dist/lib/profiles-presets.d.ts +2 -1
- package/dist/lib/profiles.d.ts +3 -9
- package/dist/lib/profiles.js +1 -9
- package/dist/lib/project-doctor.d.ts +2 -1
- package/dist/lib/project-launch.d.ts +2 -2
- package/dist/lib/project-probe.d.ts +4 -3
- package/dist/lib/project-pull.d.ts +2 -1
- package/dist/lib/project-resources.d.ts +2 -2
- package/dist/lib/project-resources.js +1 -1
- package/dist/lib/project-root.d.ts +2 -6
- package/dist/lib/project-root.js +1 -1
- package/dist/lib/project-schedule.d.ts +2 -1
- package/dist/lib/project-status.d.ts +2 -16
- package/dist/lib/project-status.js +3 -3
- package/dist/lib/pwsh.d.ts +33 -0
- package/dist/lib/pwsh.js +56 -0
- package/dist/lib/reconcile-and-repair.d.ts +5 -4
- package/dist/lib/redact.d.ts +15 -1
- package/dist/lib/redact.js +105 -3
- package/dist/lib/refresh-coordinator.d.ts +2 -1
- package/dist/lib/refresh.d.ts +9 -4
- package/dist/lib/refresh.js +92 -72
- package/dist/lib/remote-agents-json.d.ts +3 -2
- package/dist/lib/reserved-stores.d.ts +0 -2
- package/dist/lib/reserved-stores.js +3 -5
- package/dist/lib/resource-content-diff.d.ts +0 -2
- package/dist/lib/resource-content-diff.js +1 -1
- package/dist/lib/resource-patterns.d.ts +2 -1
- package/dist/lib/resource-profiles.d.ts +2 -8
- package/dist/lib/resource-profiles.js +3 -27
- package/dist/lib/resources/workflows.d.ts +1 -1
- package/dist/lib/resources.d.ts +4 -9
- package/dist/lib/resources.js +1 -1
- package/dist/lib/routine-context.d.ts +2 -5
- package/dist/lib/routine-context.js +2 -2
- package/dist/lib/routine-notify-owner.d.ts +8 -7
- package/dist/lib/routine-notify-owner.js +5 -5
- package/dist/lib/routine-process-cleanup.d.ts +2 -1
- package/dist/lib/routine-readiness.d.ts +0 -2
- package/dist/lib/routine-readiness.js +0 -7
- package/dist/lib/routines-project.d.ts +3 -4
- package/dist/lib/routines-project.js +1 -1
- package/dist/lib/rules/compile.d.ts +3 -25
- package/dist/lib/rules/compile.js +1 -1
- package/dist/lib/rules/compose.d.ts +3 -9
- package/dist/lib/rules/rules.d.ts +4 -15
- package/dist/lib/rules/rules.js +1 -64
- package/dist/lib/run-defaults.d.ts +1 -1
- package/dist/lib/run-notify.d.ts +2 -1
- package/dist/lib/run-trace-sync.d.ts +1 -1
- package/dist/lib/run-trace-sync.js +1 -1
- package/dist/lib/scheduler.d.ts +2 -1
- package/dist/lib/scheduling/routines.d.ts +9 -21
- package/dist/lib/scheduling/routines.js +3 -46
- package/dist/lib/secrets-cli.d.ts +11 -0
- package/dist/lib/secrets-cli.js +30 -0
- package/dist/lib/secrets-client.d.ts +0 -17
- package/dist/lib/secrets-client.js +7 -28
- package/dist/lib/secrets-policy.d.ts +12 -17
- package/dist/lib/secrets-policy.js +5 -5
- package/dist/lib/secrets-types.d.ts +3 -2
- package/dist/lib/secrets-types.js +2 -1
- package/dist/lib/self-heal/checks/install-staging.js +1 -1
- package/dist/lib/self-heal/registry.d.ts +3 -2
- package/dist/lib/self-heal/types.d.ts +1 -1
- package/dist/lib/self-heal/types.js +1 -1
- package/dist/lib/self-update.d.ts +5 -5
- package/dist/lib/self-update.js +4 -4
- package/dist/lib/session/actor-sidecar.d.ts +3 -2
- package/dist/lib/session/artifacts.d.ts +0 -2
- package/dist/lib/session/artifacts.js +1 -1
- package/dist/lib/session/bash-command.d.ts +2 -7
- package/dist/lib/session/bundle.d.ts +4 -6
- package/dist/lib/session/bundle.js +1 -5
- package/dist/lib/session/cloud.d.ts +0 -4
- package/dist/lib/session/cloud.js +2 -15
- package/dist/lib/session/detached.d.ts +9 -1
- package/dist/lib/session/detached.js +31 -2
- package/dist/lib/session/digest.d.ts +2 -2
- package/dist/lib/session/digest.js +1 -1
- package/dist/lib/session/fork.d.ts +3 -2
- package/dist/lib/session/highlights.d.ts +6 -5
- package/dist/lib/session/hook-sessions.d.ts +2 -1
- package/dist/lib/session/host-link.d.ts +2 -1
- package/dist/lib/session/inject.d.ts +1 -1
- package/dist/lib/session/inject.js +1 -1
- package/dist/lib/session/insights.d.ts +3 -15
- package/dist/lib/session/insights.js +2 -2
- package/dist/lib/session/local-tmux-attach.d.ts +2 -18
- package/dist/lib/session/local-tmux-attach.js +1 -1
- package/dist/lib/session/migrations.d.ts +0 -1
- package/dist/lib/session/migrations.js +1 -1
- package/dist/lib/session/mirror.d.ts +5 -8
- package/dist/lib/session/mirror.js +2 -2
- package/dist/lib/session/parse.d.ts +1 -32
- package/dist/lib/session/parse.js +4 -4
- package/dist/lib/session/presence.d.ts +2 -1
- package/dist/lib/session/prompt.d.ts +3 -2
- package/dist/lib/session/prompt.js +38 -1
- package/dist/lib/session/recovery.d.ts +3 -2
- package/dist/lib/session/remote/peer-stream.d.ts +26 -7
- package/dist/lib/session/remote/peer-stream.js +35 -8
- package/dist/lib/session/remote/remote-bundle.d.ts +2 -1
- package/dist/lib/session/remote/remote-list.d.ts +5 -5
- package/dist/lib/session/remote/remote.d.ts +4 -3
- package/dist/lib/session/remote/watch.d.ts +2 -7
- package/dist/lib/session/remote/watch.js +3 -3
- package/dist/lib/session/remote-active.d.ts +2 -1
- package/dist/lib/session/render.d.ts +2 -2
- package/dist/lib/session/render.js +1 -1
- package/dist/lib/session/resume-owner.d.ts +1 -1
- package/dist/lib/session/resume-owner.js +1 -1
- package/dist/lib/session/run-names.d.ts +2 -1
- package/dist/lib/session/session-cache.d.ts +7 -26
- package/dist/lib/session/session-cache.js +2 -8
- package/dist/lib/session/share-html.d.ts +1 -21
- package/dist/lib/session/share-html.js +1 -1
- package/dist/lib/session/shell-programs.d.ts +2 -1
- package/dist/lib/session/state.d.ts +41 -8
- package/dist/lib/session/state.js +112 -11
- package/dist/lib/session/stream-render.d.ts +2 -1
- package/dist/lib/session/sync/agents.d.ts +0 -4
- package/dist/lib/session/sync/agents.js +0 -0
- package/dist/lib/session/sync/backend.d.ts +8 -8
- package/dist/lib/session/sync/backend.js +3 -3
- package/dist/lib/session/sync/managed-config.d.ts +0 -8
- package/dist/lib/session/sync/managed-key.d.ts +0 -2
- package/dist/lib/session/sync/managed-key.js +1 -1
- package/dist/lib/session/sync/provision.d.ts +1 -1
- package/dist/lib/session/sync/provision.js +2 -2
- package/dist/lib/session/sync/r2.d.ts +4 -1
- package/dist/lib/session/sync/r2.js +4 -7
- package/dist/lib/session/sync/transcript-crypto.d.ts +2 -1
- package/dist/lib/session/tail.d.ts +2 -1
- package/dist/lib/session/team-filter.d.ts +1 -1
- package/dist/lib/session/throughput.d.ts +2 -3
- package/dist/lib/session/throughput.js +1 -1
- package/dist/lib/session/timeline-pass.d.ts +3 -42
- package/dist/lib/session/timeline-pass.js +4 -4
- package/dist/lib/session/timeline.d.ts +3 -13
- package/dist/lib/session/timeline.js +3 -3
- package/dist/lib/session/tool-calls.d.ts +2 -2
- package/dist/lib/session/tool-calls.js +1 -1
- package/dist/lib/session/tool-index.d.ts +0 -8
- package/dist/lib/session/tool-index.js +2 -2
- package/dist/lib/session/tool-store.d.ts +2 -1
- package/dist/lib/session/trajectory-compare.d.ts +2 -1
- package/dist/lib/session/trajectory-lineage.d.ts +2 -1
- package/dist/lib/session/trajectory-text.d.ts +3 -2
- package/dist/lib/session/trajectory.d.ts +2 -1
- package/dist/lib/session/viewing-in.d.ts +2 -1
- package/dist/lib/sessions-client.js +0 -3
- package/dist/lib/settings-manifest.d.ts +2 -1
- package/dist/lib/setup-tool-install.d.ts +3 -0
- package/dist/lib/setup-tool-install.js +26 -0
- package/dist/lib/setup-tool-status.d.ts +22 -0
- package/dist/lib/setup-tool-status.js +215 -0
- package/dist/lib/share-runtime.d.ts +11 -0
- package/dist/lib/share-runtime.js +63 -0
- package/dist/lib/shim-heal.d.ts +1 -5
- package/dist/lib/shim-heal.js +0 -6
- package/dist/lib/smart-launch.d.ts +5 -10
- package/dist/lib/smart-launch.js +4 -12
- package/dist/lib/snapshot.d.ts +3 -2
- package/dist/lib/ssh-exec.d.ts +49 -4
- package/dist/lib/ssh-exec.js +119 -0
- package/dist/lib/ssh-tunnel.d.ts +3 -2
- package/dist/lib/staleness/checkers/permissions.d.ts +0 -2
- package/dist/lib/staleness/checkers/permissions.js +1 -1
- package/dist/lib/staleness/fingerprint.d.ts +0 -7
- package/dist/lib/staleness/fingerprint.js +1 -1
- package/dist/lib/staleness/prune.d.ts +3 -2
- package/dist/lib/staleness/registry.d.ts +1 -1
- package/dist/lib/staleness/writers/sources.d.ts +0 -8
- package/dist/lib/staleness/writers/sources.js +1 -1
- package/dist/lib/startup/command-registry.d.ts +6 -4
- package/dist/lib/startup/command-registry.js +11 -8
- package/dist/lib/state.d.ts +1 -3
- package/dist/lib/state.js +3 -6
- package/dist/lib/storage/selection.d.ts +2 -2
- package/dist/lib/storage/selection.js +2 -2
- package/dist/lib/subagents-registry.d.ts +4 -3
- package/dist/lib/subagents.d.ts +2 -1
- package/dist/lib/subagents.js +3 -2
- package/dist/lib/summarizer/pass.d.ts +3 -6
- package/dist/lib/summarizer/pass.js +2 -2
- package/dist/lib/summarizer/summarize.d.ts +4 -3
- package/dist/lib/sync-passphrase.d.ts +3 -2
- package/dist/lib/sync-status.d.ts +3 -16
- package/dist/lib/sync-status.js +2 -2
- package/dist/lib/sync-umbrella.d.ts +9 -3
- package/dist/lib/sync-umbrella.js +18 -10
- package/dist/lib/system-run-sync.d.ts +2 -1
- package/dist/lib/teams/agents.d.ts +2 -4
- package/dist/lib/teams/agents.js +1 -1
- package/dist/lib/teams/forEach.d.ts +3 -2
- package/dist/lib/teams/pr-watch.d.ts +4 -11
- package/dist/lib/teams/pr-watch.js +4 -4
- package/dist/lib/teams/registry.d.ts +2 -3
- package/dist/lib/teams/registry.js +1 -1
- package/dist/lib/teams/remoteWorktree.d.ts +0 -16
- package/dist/lib/teams/remoteWorktree.js +3 -3
- package/dist/lib/teams/scheduler.d.ts +6 -5
- package/dist/lib/teams/scheduler.js +1 -1
- package/dist/lib/teams/supervisor.d.ts +4 -3
- package/dist/lib/teams/worktree.d.ts +0 -9
- package/dist/lib/teams/worktree.js +0 -32
- package/dist/lib/term-client.d.ts +44 -0
- package/dist/lib/term-client.js +117 -0
- package/dist/lib/terminal/inject.d.ts +3 -16
- package/dist/lib/terminal/inject.js +1 -29
- package/dist/lib/terminal/resolve.d.ts +3 -9
- package/dist/lib/terminal/resolve.js +3 -7
- package/dist/lib/tmux/binary.d.ts +2 -1
- package/dist/lib/tmux/orphan-reap.d.ts +6 -7
- package/dist/lib/tmux/orphan-reap.js +1 -1
- package/dist/lib/tmux/session.d.ts +4 -3
- package/dist/lib/traces/backend.d.ts +1 -2
- package/dist/lib/traces/backend.js +1 -2
- package/dist/lib/traces/classify.d.ts +3 -2
- package/dist/lib/traces/config.d.ts +0 -8
- package/dist/lib/traces/insights.d.ts +2 -1
- package/dist/lib/traces/phenotype.d.ts +3 -3
- package/dist/lib/traces/provision.d.ts +2 -4
- package/dist/lib/traces/provision.js +3 -3
- package/dist/lib/traces/schema2-build.d.ts +1 -1
- package/dist/lib/traces/schema2-danger.d.ts +2 -1
- package/dist/lib/traces/schema2.d.ts +5 -4
- package/dist/lib/traces/segments.d.ts +4 -20
- package/dist/lib/traces/segments.js +3 -3
- package/dist/lib/traces/sync.d.ts +2 -3
- package/dist/lib/traces/sync.js +1 -1
- package/dist/lib/triggers/handlers.d.ts +4 -13
- package/dist/lib/triggers/handlers.js +1 -1
- package/dist/lib/triggers/webhook.d.ts +5 -27
- package/dist/lib/triggers/webhook.js +4 -4
- package/dist/lib/types.d.ts +11 -9
- package/dist/lib/usage-refresh.d.ts +4 -10
- package/dist/lib/usage-refresh.js +3 -8
- package/dist/lib/verbs.d.ts +2 -1
- package/dist/lib/version-duplicates.d.ts +2 -3
- package/dist/lib/version-duplicates.js +3 -33
- package/dist/lib/version.d.ts +2 -1
- package/dist/lib/warn-unpushed.d.ts +2 -1
- package/dist/lib/watchdog/history.d.ts +3 -2
- package/dist/lib/watchdog/log.d.ts +0 -6
- package/dist/lib/watchdog/log.js +1 -1
- package/dist/lib/watchdog/rotate.d.ts +2 -26
- package/dist/lib/watchdog/rotate.js +4 -12
- package/dist/lib/watchdog/runner.d.ts +0 -7
- package/dist/lib/watchdog/runner.js +4 -4
- package/dist/lib/watchdog/service.d.ts +2 -2
- package/dist/lib/watchdog/service.js +1 -1
- package/dist/lib/watchdog/watchdog-agent.d.ts +2 -1
- package/dist/lib/watchdog/watchdog.d.ts +2 -1
- package/dist/lib/watchdog/watchdogTail.d.ts +2 -1
- package/dist/lib/workflows-registry.d.ts +3 -2
- package/dist/lib/workflows.d.ts +4 -7
- package/dist/lib/workflows.js +1 -1
- package/dist/lib/worktree/held.d.ts +4 -28
- package/dist/lib/worktree/held.js +3 -3
- package/package.json +3 -5
- package/scripts/postinstall.js +5 -4
- package/dist/commands/artifacts-setup.d.ts +0 -53
- package/dist/commands/artifacts-setup.js +0 -161
- package/dist/commands/artifacts.d.ts +0 -18
- package/dist/commands/artifacts.js +0 -58
- package/dist/commands/attach.d.ts +0 -12
- package/dist/commands/attach.js +0 -86
- package/dist/commands/auth-mint.d.ts +0 -12
- package/dist/commands/auth-mint.js +0 -108
- package/dist/commands/pty.d.ts +0 -20
- package/dist/commands/pty.js +0 -404
- package/dist/commands/reconnect.d.ts +0 -46
- package/dist/commands/reconnect.js +0 -115
- package/dist/commands/share.d.ts +0 -293
- package/dist/commands/share.js +0 -1424
- package/dist/lib/config-machine-keys.d.ts +0 -14
- package/dist/lib/config-machine-keys.js +0 -21
- package/dist/lib/pty-client.d.ts +0 -49
- package/dist/lib/pty-client.js +0 -315
- package/dist/lib/pty-server.d.ts +0 -59
- package/dist/lib/pty-server.js +0 -653
- package/dist/lib/share/analytics.d.ts +0 -13
- package/dist/lib/share/analytics.js +0 -45
- package/dist/lib/share/backend.d.ts +0 -120
- package/dist/lib/share/backend.js +0 -176
- package/dist/lib/share/capture.d.ts +0 -31
- package/dist/lib/share/capture.js +0 -174
- package/dist/lib/share/config.d.ts +0 -72
- package/dist/lib/share/config.js +0 -211
- package/dist/lib/share/delete.d.ts +0 -122
- package/dist/lib/share/delete.js +0 -173
- package/dist/lib/share/html.d.ts +0 -22
- package/dist/lib/share/html.js +0 -88
- package/dist/lib/share/http-error.d.ts +0 -52
- package/dist/lib/share/http-error.js +0 -65
- package/dist/lib/share/og.d.ts +0 -25
- package/dist/lib/share/og.js +0 -84
- package/dist/lib/share/provision.d.ts +0 -127
- package/dist/lib/share/provision.js +0 -285
- package/dist/lib/share/publish.d.ts +0 -388
- package/dist/lib/share/publish.js +0 -818
- package/dist/lib/share/worker-template.d.ts +0 -27
- package/dist/lib/share/worker-template.js +0 -2424
- package/dist/lib/storage/index.d.ts +0 -14
- package/dist/lib/storage/index.js +0 -14
- package/dist/lib/storage/visibility.d.ts +0 -82
- package/dist/lib/storage/visibility.js +0 -99
package/dist/commands/mcp.js
CHANGED
|
@@ -5,14 +5,14 @@ import ora from 'ora';
|
|
|
5
5
|
import { checkbox } from '@inquirer/prompts';
|
|
6
6
|
import { capableAgents, isCapable } from '../lib/capabilities.js';
|
|
7
7
|
import { emit } from '../lib/feed/events.js';
|
|
8
|
-
import { AGENTS, getAllCliStates, resolveAgentName, formatAgentError,
|
|
8
|
+
import { AGENTS, getAllCliStates, resolveAgentName, formatAgentError, unregisterMcpFromTargets, listInstalledMcpsWithScope, parseMcpConfig, getMcpConfigPathForHome, agentLabel, } from '../lib/agents.js';
|
|
9
9
|
import { readManifest, writeManifest, createDefaultManifest } from '../lib/manifest.js';
|
|
10
10
|
import { listMcpServerConfigs, discoverMcpConfigsFromRepo, installMcpConfigCentrally, isProjectMcpTrusted, trustProjectMcp, untrustProjectMcp, getMcpTrustStorePath, } from '../lib/mcp.js';
|
|
11
11
|
import { cloneRepo } from '../lib/git.js';
|
|
12
12
|
import { getMcpDir, getProjectAgentsDir } from '../lib/state.js';
|
|
13
|
-
import { getEffectiveHome, getGlobalDefault, listInstalledVersions, getVersionHomePath, resolveInstalledAgentTargets,
|
|
13
|
+
import { getEffectiveHome, getGlobalDefault, listInstalledVersions, getVersionHomePath, resolveInstalledAgentTargets, syncResourcesToVersion, } from '../lib/installations/versions.js';
|
|
14
14
|
import { getUserAgentsDir } from '../lib/state.js';
|
|
15
|
-
import { isPromptCancelled, isInteractiveTerminal, requireInteractiveSelection, promptRemovalTargets, parseCommaSeparatedList, ensureAgentVersionsInstalled, resolveAgentTargetsAutoInstalling,
|
|
15
|
+
import { isPromptCancelled, isInteractiveTerminal, requireInteractiveSelection, promptRemovalTargets, parseCommaSeparatedList, ensureAgentVersionsInstalled, resolveAgentTargetsAutoInstalling, VersionNotInstalledError, resolveListFilterOrExit, } from './utils.js';
|
|
16
16
|
import { showResourceList, buildTargetsSection, } from './resource-view.js';
|
|
17
17
|
/**
|
|
18
18
|
* Parse a comma-separated --agents string into validated agent IDs and
|
|
@@ -137,12 +137,12 @@ Examples:
|
|
|
137
137
|
agents mcp add my-api https://api.example.com --transport http --agents claude
|
|
138
138
|
|
|
139
139
|
# Apply servers from manifest to specific agents
|
|
140
|
-
agents
|
|
140
|
+
agents sync --mcp codex@0.116.0
|
|
141
141
|
|
|
142
142
|
When to use:
|
|
143
143
|
- After install: 'agents mcp add <server>' to connect a new service
|
|
144
|
-
- Version upgrade: 'agents mcp
|
|
145
|
-
- Team setup: commit mcp config to .agents and run 'agents mcp
|
|
144
|
+
- Version upgrade: 'agents sync --mcp' to sync servers to the new version
|
|
145
|
+
- Team setup: commit mcp config to .agents and run 'agents sync --mcp'
|
|
146
146
|
`);
|
|
147
147
|
withAliases(mcpCmd
|
|
148
148
|
.command('list [agent]'), 'list')
|
|
@@ -220,7 +220,7 @@ When to use:
|
|
|
220
220
|
});
|
|
221
221
|
mcpCmd
|
|
222
222
|
.command('add <name> [command_or_url...]')
|
|
223
|
-
.description('Add an MCP server to the manifest (run "agents mcp
|
|
223
|
+
.description('Add an MCP server to the manifest (run "agents sync --mcp" afterward to apply)')
|
|
224
224
|
.option('-a, --agents <list>', 'Targets: claude, codex@0.116.0', capableAgents('mcp').join(','))
|
|
225
225
|
.option('-s, --scope <scope>', 'user (global) or project (repo-specific)', 'user')
|
|
226
226
|
.option('-t, --transport <type>', 'stdio (default) or http', 'stdio')
|
|
@@ -336,7 +336,7 @@ Examples:
|
|
|
336
336
|
writeManifest(localPath, manifest);
|
|
337
337
|
emit('mcp.add', { module: 'mcp', server: name });
|
|
338
338
|
console.log(chalk.green(`Added MCP server '${name}' to manifest`));
|
|
339
|
-
console.log(chalk.gray('Run: agents mcp
|
|
339
|
+
console.log(chalk.gray('Run: agents sync --mcp to apply'));
|
|
340
340
|
});
|
|
341
341
|
withAliases(mcpCmd
|
|
342
342
|
.command('remove [name]'), 'remove')
|
|
@@ -565,81 +565,6 @@ Examples:
|
|
|
565
565
|
}
|
|
566
566
|
console.log();
|
|
567
567
|
});
|
|
568
|
-
// Deprecated: superseded by `agents sync --mcp`. Kept as a warned, functional
|
|
569
|
-
// alias so old muscle-memory and scripts don't break.
|
|
570
|
-
mcpCmd
|
|
571
|
-
.command('register [name]', { hidden: true })
|
|
572
|
-
.description('Deprecated — use `agents sync --mcp` instead.')
|
|
573
|
-
.option('-a, --agents <list>', 'Override manifest targets: claude, codex@0.116.0')
|
|
574
|
-
.option('-y, --yes', 'Auto-install any missing agent versions without prompting')
|
|
575
|
-
.addHelpText('after', `
|
|
576
|
-
Examples:
|
|
577
|
-
# Register all servers from manifest
|
|
578
|
-
agents mcp register
|
|
579
|
-
|
|
580
|
-
# Register a specific server
|
|
581
|
-
agents mcp register notion
|
|
582
|
-
|
|
583
|
-
# Register to specific agents (overrides manifest config)
|
|
584
|
-
agents mcp register --agents codex@0.116.0
|
|
585
|
-
`)
|
|
586
|
-
.action(async (name, options) => {
|
|
587
|
-
console.warn(chalk.yellow('`agents mcp register` is deprecated — use `agents sync --mcp` instead:'));
|
|
588
|
-
console.warn(chalk.gray(' all servers: agents sync --mcp'));
|
|
589
|
-
console.warn(chalk.gray(' specific server: agents sync --mcp <name>'));
|
|
590
|
-
const localPath = getUserAgentsDir();
|
|
591
|
-
const manifest = readManifest(localPath);
|
|
592
|
-
if (!manifest?.mcp) {
|
|
593
|
-
console.log(chalk.yellow('No MCP servers in manifest'));
|
|
594
|
-
return;
|
|
595
|
-
}
|
|
596
|
-
const entries = name
|
|
597
|
-
? (() => {
|
|
598
|
-
const config = manifest.mcp?.[name];
|
|
599
|
-
return config ? [[name, config]] : [];
|
|
600
|
-
})()
|
|
601
|
-
: Object.entries(manifest.mcp);
|
|
602
|
-
if (entries.length === 0) {
|
|
603
|
-
console.log(chalk.yellow(`MCP server '${name}' not found in manifest`));
|
|
604
|
-
return;
|
|
605
|
-
}
|
|
606
|
-
for (const [mcpName, config] of entries) {
|
|
607
|
-
const transport = config.transport || 'stdio';
|
|
608
|
-
const commandOrUrl = transport === 'http' ? config.url : config.command;
|
|
609
|
-
if (!commandOrUrl) {
|
|
610
|
-
console.log(`\n ${chalk.cyan(mcpName)}: ${chalk.yellow(`missing ${transport === 'http' ? 'url' : 'command'}`)}`);
|
|
611
|
-
continue;
|
|
612
|
-
}
|
|
613
|
-
console.log(`\n ${chalk.cyan(mcpName)}:`);
|
|
614
|
-
let targets;
|
|
615
|
-
if (options.agents) {
|
|
616
|
-
const resolved = await resolveInstalledAgentTargetsAutoInstalling(options.agents, capableAgents('mcp'), { yes: options.yes });
|
|
617
|
-
if (!resolved) {
|
|
618
|
-
console.log(chalk.gray(' Cancelled.'));
|
|
619
|
-
continue;
|
|
620
|
-
}
|
|
621
|
-
targets = resolved;
|
|
622
|
-
}
|
|
623
|
-
else {
|
|
624
|
-
targets = resolveConfiguredAgentTargets(config.agents, config.agentVersions, capableAgents('mcp'));
|
|
625
|
-
}
|
|
626
|
-
const results = await registerMcpToTargets(targets, mcpName, commandOrUrl, config.scope || 'user', transport, { headers: config.headers });
|
|
627
|
-
const applied = results.filter(r => r.success).length;
|
|
628
|
-
for (const result of results) {
|
|
629
|
-
if (result.success) {
|
|
630
|
-
console.log(` ${chalk.green('+')} ${formatTargetLabel(result.agentId, result.version)}`);
|
|
631
|
-
}
|
|
632
|
-
else if (result.error?.startsWith('skipped:')) {
|
|
633
|
-
console.log(` ${chalk.yellow('-')} ${formatTargetLabel(result.agentId, result.version)}: ${result.error}`);
|
|
634
|
-
}
|
|
635
|
-
else {
|
|
636
|
-
console.log(` ${chalk.red('x')} ${formatTargetLabel(result.agentId, result.version)}: ${result.error}`);
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
if (applied > 0)
|
|
640
|
-
emit('mcp.register', { module: 'mcp', server: mcpName, applied });
|
|
641
|
-
}
|
|
642
|
-
});
|
|
643
568
|
}
|
|
644
569
|
async function installMcpsFromRepoSource(source, options) {
|
|
645
570
|
const spinner = ora('Cloning repository...').start();
|
package/dist/commands/memory.js
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
import { withAliases } from '../lib/verbs.js';
|
|
8
8
|
import chalk from 'chalk';
|
|
9
9
|
import * as fs from 'fs';
|
|
10
|
-
import { listMemoryFacts, addMemoryFact, removeMemoryFact, readMemoryFact,
|
|
10
|
+
import { listMemoryFacts, addMemoryFact, removeMemoryFact, readMemoryFact, getUserMemoryDir, syncMemoryToVersionHome, } from '../lib/memory.js';
|
|
11
11
|
import { capableAgents } from '../lib/capabilities.js';
|
|
12
|
-
import {
|
|
12
|
+
import { ALL_AGENT_IDS } from '../lib/agents.js';
|
|
13
13
|
import { listInstalledVersions, getVersionHomePath, } from '../lib/installations/versions.js';
|
|
14
14
|
import { supports } from '../lib/capabilities.js';
|
|
15
15
|
import { setHelpSections } from '../lib/help.js';
|
|
@@ -33,7 +33,7 @@ export function registerMemoryCommands(program) {
|
|
|
33
33
|
agents memory remove preferred-editor
|
|
34
34
|
|
|
35
35
|
# Fan out to all capable installed agent versions
|
|
36
|
-
agents memory
|
|
36
|
+
agents sync --memory
|
|
37
37
|
`,
|
|
38
38
|
notes: `
|
|
39
39
|
Memory is the knowledge store (learned facts), distinct from rules
|
|
@@ -84,7 +84,7 @@ export function registerMemoryCommands(program) {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
87
|
-
console.log(chalk.gray(' Run: agents
|
|
87
|
+
console.log(chalk.gray(' Run: agents sync --memory to fan out'));
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
withAliases(memoryCmd
|
|
@@ -111,49 +111,6 @@ export function registerMemoryCommands(program) {
|
|
|
111
111
|
console.log(chalk.dim(`# ${fact.name} [${fact.layer}] ${fact.path}`));
|
|
112
112
|
console.log(fs.readFileSync(fact.path, 'utf-8'));
|
|
113
113
|
});
|
|
114
|
-
// Deprecated: superseded by `agents sync --memory`. Kept as a warned, functional
|
|
115
|
-
// alias so old muscle-memory and scripts don't break.
|
|
116
|
-
memoryCmd
|
|
117
|
-
.command('sync [agent]', { hidden: true })
|
|
118
|
-
.description('Deprecated — use `agents sync --memory` instead.')
|
|
119
|
-
.option('-a, --agent <agent>', 'Limit to one agent (or agent@version)')
|
|
120
|
-
.action(async (agentArg, options) => {
|
|
121
|
-
console.warn(chalk.yellow('`agents memory sync` is deprecated — use `agents sync --memory` instead:'));
|
|
122
|
-
console.warn(chalk.gray(' all agents: agents sync --memory'));
|
|
123
|
-
console.warn(chalk.gray(' one agent: agents sync --memory <agent>'));
|
|
124
|
-
ensureUserMemoryDir();
|
|
125
|
-
const input = agentArg || options.agent;
|
|
126
|
-
if (input) {
|
|
127
|
-
const parts = input.split('@');
|
|
128
|
-
const resolved = resolveAgentName(parts[0]);
|
|
129
|
-
if (!resolved) {
|
|
130
|
-
console.error(chalk.red(formatAgentError(parts[0], capableAgents('memory'))));
|
|
131
|
-
process.exit(1);
|
|
132
|
-
}
|
|
133
|
-
const agent = resolved;
|
|
134
|
-
const versions = parts[1]
|
|
135
|
-
? [parts[1]]
|
|
136
|
-
: listInstalledVersions(agent);
|
|
137
|
-
if (versions.length === 0) {
|
|
138
|
-
console.log(chalk.yellow(`No installed versions of ${agentLabel(agent)}`));
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
for (const version of versions) {
|
|
142
|
-
const home = getVersionHomePath(agent, version);
|
|
143
|
-
const facts = syncMemoryToVersionHome(agent, home, process.cwd());
|
|
144
|
-
console.log(chalk.green(`Synced ${facts.length} fact(s) → ${agent}@${version}`));
|
|
145
|
-
}
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
const results = syncAllMemory(process.cwd());
|
|
149
|
-
if (results.length === 0) {
|
|
150
|
-
console.log(chalk.gray('No memory-capable agent versions installed.'));
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
for (const r of results) {
|
|
154
|
-
console.log(chalk.green(`Synced ${r.facts.length} fact(s) → ${r.agent}@${r.version}`));
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
114
|
}
|
|
158
115
|
function syncAllMemory(cwd) {
|
|
159
116
|
const out = [];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Delivery is routed by agent state (RUSH-1474):
|
|
5
5
|
* - running, between tool calls → mailbox spool (PreToolUse inject)
|
|
6
|
-
* - parked on AskUserQuestion with a tmux/iterm
|
|
6
|
+
* - parked on AskUserQuestion with a tmux/iterm rail → keystroke inject
|
|
7
7
|
* - parked headless (no rail) → `agents run --resume <id> -- <answer>`
|
|
8
8
|
* - cloud task → provider.message()
|
|
9
9
|
*
|
package/dist/commands/message.js
CHANGED
|
@@ -153,23 +153,23 @@ async function deliverViaHostReroute(route, text, opts) {
|
|
|
153
153
|
* injected input a running agent consumes, never a notification a human reads.
|
|
154
154
|
* Mirrors SHARED_NOTES in commands/send.ts so an agent reading either --help
|
|
155
155
|
* sees the same three-plane map and doesn't reach for `message` when it means
|
|
156
|
-
* `send
|
|
156
|
+
* `send`.
|
|
157
157
|
*/
|
|
158
158
|
const CONTROL_PLANE_NOTES = `
|
|
159
159
|
Planes (do not mix them up):
|
|
160
|
-
message / sessions inject - CONTROL a running agent (mailbox answer,
|
|
161
|
-
send
|
|
162
|
-
feed post - RECORD progress / milestones (optional broadcast may call send
|
|
160
|
+
message / sessions inject - CONTROL a running agent (mailbox answer, terminal keystroke, or resume by runtime)
|
|
161
|
+
send - DELIVER a message to a human recipient over a channel provider
|
|
162
|
+
feed post - RECORD progress / milestones (optional broadcast may call send)
|
|
163
163
|
|
|
164
164
|
<text> here is consumed BY THE TARGET AGENT (an answer, a keystroke, or the
|
|
165
165
|
argument to a resume) -- it is not a notification a person reads on their
|
|
166
|
-
phone. To reach the operator instead, use \`agents send
|
|
166
|
+
phone. To reach the operator instead, use \`agents send --to owner\`
|
|
167
167
|
(or a feed.broadcast \`channel:\` sink).
|
|
168
168
|
`;
|
|
169
169
|
export function registerMessageCommand(program) {
|
|
170
170
|
const messageCmd = program
|
|
171
171
|
.command('message <target> <text>')
|
|
172
|
-
.description('Send a message to a running or parked agent (mailbox /
|
|
172
|
+
.description('Send a message to a running or parked agent (mailbox / terminal-select / resume by runtime).')
|
|
173
173
|
.option('--from <who>', 'Label recorded as the sender of this message')
|
|
174
174
|
.option('--as <operator>', 'Verified operator id answering a high-consequence block')
|
|
175
175
|
.option('--surface <surface>', 'Surface that is sending this answer (feed, terminal, etc.)', 'cli')
|
|
@@ -222,7 +222,7 @@ export function registerMessageCommand(program) {
|
|
|
222
222
|
await deliverViaMailbox(res.id, text, block, { from: opts.from, ttlSeconds });
|
|
223
223
|
return;
|
|
224
224
|
}
|
|
225
|
-
if (route.kind === 'tmux' || route.kind === 'iterm'
|
|
225
|
+
if (route.kind === 'tmux' || route.kind === 'iterm') {
|
|
226
226
|
await deliverViaInject(route, res.id);
|
|
227
227
|
if (block) {
|
|
228
228
|
recordMessageReceipt(block.blockId, {
|
package/dist/commands/plugins.js
CHANGED
|
@@ -48,7 +48,7 @@ Examples:
|
|
|
48
48
|
agents plugins view rush-toolkit
|
|
49
49
|
|
|
50
50
|
# Sync a plugin to specific agents
|
|
51
|
-
agents
|
|
51
|
+
agents sync --plugin rush-toolkit claude
|
|
52
52
|
|
|
53
53
|
# Remove a plugin from all agents and delete its source
|
|
54
54
|
agents plugins remove rush-toolkit
|
|
@@ -283,98 +283,6 @@ Examples:
|
|
|
283
283
|
}
|
|
284
284
|
console.log();
|
|
285
285
|
});
|
|
286
|
-
// Deprecated: superseded by `agents sync --plugin <name>`. Kept as a warned,
|
|
287
|
-
// functional alias so old muscle-memory and scripts don't break.
|
|
288
|
-
pluginsCmd
|
|
289
|
-
.command('sync <name> [agent]', { hidden: true })
|
|
290
|
-
.description('Deprecated — use `agents sync --plugin <name>` instead.')
|
|
291
|
-
.option('--allow-exec-surfaces', 'Enable the plugin even when it ships hooks/, .mcp.json, bin/, scripts/, settings.json, or permissions/')
|
|
292
|
-
.addHelpText('after', `
|
|
293
|
-
Examples:
|
|
294
|
-
# Sync a plugin to every installed version of an agent
|
|
295
|
-
agents plugins sync rush-toolkit claude
|
|
296
|
-
|
|
297
|
-
# Sync to one specific version (parity with 'agents sync')
|
|
298
|
-
agents plugins sync rush-toolkit claude@2.1.142
|
|
299
|
-
|
|
300
|
-
# Sync to all supported agents (every installed version of each)
|
|
301
|
-
agents plugins sync rush-toolkit
|
|
302
|
-
|
|
303
|
-
# Re-affirm consent for a hooks-bearing plugin
|
|
304
|
-
agents plugins sync hivemind claude --allow-exec-surfaces
|
|
305
|
-
`)
|
|
306
|
-
.action(async (name, agentArg, options) => {
|
|
307
|
-
console.warn(chalk.yellow('`agents plugins sync` is deprecated — use `agents sync --plugin` instead:'));
|
|
308
|
-
console.warn(chalk.gray(` agents sync --plugin ${name}`));
|
|
309
|
-
const plugin = getPlugin(name);
|
|
310
|
-
if (!plugin) {
|
|
311
|
-
console.log(chalk.red(`Plugin '${name}' not found`));
|
|
312
|
-
process.exit(1);
|
|
313
|
-
}
|
|
314
|
-
// Accept the same "agent@version" form as `agents sync`. Splitting here
|
|
315
|
-
// also means an unknown spec is reported cleanly rather than crashing
|
|
316
|
-
// isCapable() with a bare "claude@2.1.168".
|
|
317
|
-
let versionArg;
|
|
318
|
-
let agentName = agentArg;
|
|
319
|
-
if (agentArg && agentArg.includes('@')) {
|
|
320
|
-
const at = agentArg.lastIndexOf('@');
|
|
321
|
-
agentName = agentArg.slice(0, at);
|
|
322
|
-
versionArg = agentArg.slice(at + 1);
|
|
323
|
-
}
|
|
324
|
-
// Determine target agents
|
|
325
|
-
let targetAgents;
|
|
326
|
-
if (agentName) {
|
|
327
|
-
const agentId = agentName;
|
|
328
|
-
if (!isCapable(agentId, 'plugins')) {
|
|
329
|
-
console.log(chalk.red(`Agent '${agentName}' does not support plugins`));
|
|
330
|
-
process.exit(1);
|
|
331
|
-
}
|
|
332
|
-
if (!pluginSupportsAgent(plugin, agentId)) {
|
|
333
|
-
console.log(chalk.red(`Plugin '${name}' does not support ${agentLabel(agentId)}`));
|
|
334
|
-
process.exit(1);
|
|
335
|
-
}
|
|
336
|
-
targetAgents = [agentId];
|
|
337
|
-
}
|
|
338
|
-
else {
|
|
339
|
-
if (versionArg) {
|
|
340
|
-
console.log(chalk.red(`A version (@${versionArg}) requires naming the agent, e.g. claude@${versionArg}`));
|
|
341
|
-
process.exit(1);
|
|
342
|
-
}
|
|
343
|
-
targetAgents = capableAgents('plugins').filter(a => pluginSupportsAgent(plugin, a));
|
|
344
|
-
}
|
|
345
|
-
const allowExec = options.allowExecSurfaces === true;
|
|
346
|
-
for (const agentId of targetAgents) {
|
|
347
|
-
const versions = listInstalledVersions(agentId);
|
|
348
|
-
if (versions.length === 0)
|
|
349
|
-
continue;
|
|
350
|
-
// Default to EVERY installed version. The previous behaviour synced only
|
|
351
|
-
// the global default, which silently skipped non-default versions used
|
|
352
|
-
// by balanced rotation -- so a rotated version would lack the plugin's
|
|
353
|
-
// slash commands. An explicit agent@version narrows back to one.
|
|
354
|
-
let targetVersions;
|
|
355
|
-
if (versionArg) {
|
|
356
|
-
if (!versions.includes(versionArg)) {
|
|
357
|
-
console.log(chalk.red(`${agentLabel(agentId)} has no installed version ${versionArg} (installed: ${versions.join(', ')})`));
|
|
358
|
-
process.exit(1);
|
|
359
|
-
}
|
|
360
|
-
targetVersions = [versionArg];
|
|
361
|
-
}
|
|
362
|
-
else {
|
|
363
|
-
targetVersions = versions;
|
|
364
|
-
}
|
|
365
|
-
for (const version of targetVersions) {
|
|
366
|
-
const didSync = allowExec
|
|
367
|
-
? syncPluginToVersion(plugin, agentId, getVersionHomePath(agentId, version), { allowExecSurfaces: true, version }).success
|
|
368
|
-
: syncResourcesToVersion(agentId, version, { plugins: [name] }).plugins.length > 0;
|
|
369
|
-
if (didSync) {
|
|
370
|
-
console.log(chalk.green(`Synced ${name} to ${agentLabel(agentId)}@${version}${allowExec ? ' (exec surfaces enabled)' : ''}`));
|
|
371
|
-
}
|
|
372
|
-
else {
|
|
373
|
-
console.log(chalk.gray(`${name} already synced to ${agentLabel(agentId)}@${version}`));
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
286
|
// agents plugins remove [name]
|
|
379
287
|
withAliases(pluginsCmd
|
|
380
288
|
.command('remove [name]'), 'remove')
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
import type { Command } from 'commander';
|
|
11
11
|
import { type ProjectDef, type ProjectRepo } from '../lib/projects.js';
|
|
12
12
|
import { type LinearMilestone } from '../lib/linear-project-counts.js';
|
|
13
|
-
/** Recursion guard: a peer answering a probe fan-out never re-fans-out itself. */
|
|
14
|
-
export declare const PROJECTS_NO_FANOUT_ENV = "AGENTS_PROJECTS_LOCAL";
|
|
15
13
|
/**
|
|
16
14
|
* A path-shaped `agents projects view` argument — `.`, `..`, a `~`-prefixed
|
|
17
15
|
* value, or anything containing a path separator — means "auto-detect the
|
|
@@ -20,7 +18,7 @@ export declare const PROJECTS_NO_FANOUT_ENV = "AGENTS_PROJECTS_LOCAL";
|
|
|
20
18
|
*/
|
|
21
19
|
export declare function looksLikePath(token: string): boolean;
|
|
22
20
|
/** Machine-readable shape of `agents projects view <path> --json`. */
|
|
23
|
-
|
|
21
|
+
interface ViewDetection {
|
|
24
22
|
/** Detected project name, or null when no definition contains the path. */
|
|
25
23
|
name: string | null;
|
|
26
24
|
/** The detected project's Linear binding; fields are null when unbound. */
|
|
@@ -121,19 +119,5 @@ export declare function formatMilestoneDue(targetDate: string, nowMs: number): s
|
|
|
121
119
|
export declare function formatMilestoneLines(milestones: LinearMilestone[], next: LinearMilestone | undefined, nowMs: number, limit: number): string[];
|
|
122
120
|
/** The `next` card line: what this project is due to hit, and how far along it is. */
|
|
123
121
|
export declare function formatNextMilestone(ms: LinearMilestone, nowMs: number): string;
|
|
124
|
-
/** Options shared by `status` and `view`. */
|
|
125
|
-
export type ProjectCardOpts = {
|
|
126
|
-
json?: boolean;
|
|
127
|
-
window?: string;
|
|
128
|
-
remote?: boolean;
|
|
129
|
-
/** Scope the fleet fan-out to specific devices; undefined = the whole fleet. */
|
|
130
|
-
deviceFilter?: string[];
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* Merge `--device a b` (variadic) and `--devices a,b,c` (comma list) into one
|
|
134
|
-
* deduped device filter; undefined when neither was given (= whole fleet).
|
|
135
|
-
*/
|
|
136
|
-
export declare function resolveDeviceFilter(device?: string[], devices?: string): string[] | undefined;
|
|
137
|
-
/** Print the YAML-side fields that sit under the shared card in `view` mode. */
|
|
138
|
-
export declare function printProjectDefinition(def: ProjectDef, name: string): void;
|
|
139
122
|
export declare function registerProjectsCommands(program: Command): void;
|
|
123
|
+
export {};
|
|
@@ -30,8 +30,9 @@ import { checkRepoSlug } from '../lib/project-doctor.js';
|
|
|
30
30
|
import { formatFocusAreas, readFocusAreas } from '../lib/project-focus.js';
|
|
31
31
|
import { formatVerdict, scheduleVerdict } from '../lib/project-schedule.js';
|
|
32
32
|
import { buildLinearImportCandidates, validateImportOpts, } from '../lib/project-import.js';
|
|
33
|
+
import { buildProjectPrs } from '../lib/github/project-prs.js';
|
|
33
34
|
/** Recursion guard: a peer answering a probe fan-out never re-fans-out itself. */
|
|
34
|
-
|
|
35
|
+
const PROJECTS_NO_FANOUT_ENV = 'AGENTS_PROJECTS_LOCAL';
|
|
35
36
|
/** Max peers named in the skipped note before the rest collapse to `+N`. */
|
|
36
37
|
const SKIPPED_NAME_LIMIT = 4;
|
|
37
38
|
/**
|
|
@@ -482,7 +483,7 @@ warnWorkspaces = []) {
|
|
|
482
483
|
* Merge `--device a b` (variadic) and `--devices a,b,c` (comma list) into one
|
|
483
484
|
* deduped device filter; undefined when neither was given (= whole fleet).
|
|
484
485
|
*/
|
|
485
|
-
|
|
486
|
+
function resolveDeviceFilter(device, devices) {
|
|
486
487
|
const merged = [
|
|
487
488
|
...(device ?? []),
|
|
488
489
|
...(devices ? devices.split(',').map((s) => s.trim()).filter(Boolean) : []),
|
|
@@ -490,7 +491,7 @@ export function resolveDeviceFilter(device, devices) {
|
|
|
490
491
|
return merged.length ? [...new Set(merged)] : undefined;
|
|
491
492
|
}
|
|
492
493
|
/** Print the YAML-side fields that sit under the shared card in `view` mode. */
|
|
493
|
-
|
|
494
|
+
function printProjectDefinition(def, name) {
|
|
494
495
|
console.log();
|
|
495
496
|
if (def.root)
|
|
496
497
|
console.log(` ${chalk.dim('root')} ${def.root}`);
|
|
@@ -818,6 +819,91 @@ export function registerProjectsCommands(program) {
|
|
|
818
819
|
const mode = name ? 'view' : 'status';
|
|
819
820
|
await runProjectCard(name, opts, mode);
|
|
820
821
|
});
|
|
822
|
+
// ---- prs ----
|
|
823
|
+
const prsCmd = projects
|
|
824
|
+
.command('prs <name>')
|
|
825
|
+
.description('Every OPEN pull request across a project\'s attached repos (drafts included, no author filter).')
|
|
826
|
+
.option('--json', 'Machine-readable output (the AGI Menu contract shape)')
|
|
827
|
+
.option('--repo <owner/repo>', 'Restrict to one of the project\'s attached repos')
|
|
828
|
+
.option('--number <n>', 'Lazy detail: enrich exactly this PR with checks + reviewDecision (requires --repo)')
|
|
829
|
+
.action(async (name, opts) => {
|
|
830
|
+
const def = loadProjectDef(name);
|
|
831
|
+
if (!def) {
|
|
832
|
+
console.error(chalk.red(`No project named "${name}". List them: agents projects list`));
|
|
833
|
+
process.exit(1);
|
|
834
|
+
}
|
|
835
|
+
let number;
|
|
836
|
+
if (opts.number !== undefined) {
|
|
837
|
+
if (!opts.repo) {
|
|
838
|
+
console.error(chalk.red('--number names one PR in one repo; pass --repo <owner/repo> with it.'));
|
|
839
|
+
process.exit(1);
|
|
840
|
+
}
|
|
841
|
+
// Require the WHOLE token to be digits — Number.parseInt would accept
|
|
842
|
+
// "12junk" / "12.9" as 12 and silently query the wrong PR.
|
|
843
|
+
const raw = opts.number.trim();
|
|
844
|
+
number = /^\d+$/.test(raw) ? Number.parseInt(raw, 10) : NaN;
|
|
845
|
+
if (!Number.isSafeInteger(number) || number <= 0) {
|
|
846
|
+
console.error(chalk.red(`--number expects a positive integer, got "${opts.number}".`));
|
|
847
|
+
process.exit(1);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
let envelope;
|
|
851
|
+
try {
|
|
852
|
+
envelope = await buildProjectPrs(def, { repo: opts.repo, number }, undefined);
|
|
853
|
+
}
|
|
854
|
+
catch (e) {
|
|
855
|
+
// A restriction error (repo not attached) is a hard, up-front failure —
|
|
856
|
+
// distinct from a per-repo fetch failure, which rides in the envelope.
|
|
857
|
+
console.error(chalk.red(e instanceof Error ? e.message : String(e)));
|
|
858
|
+
process.exit(1);
|
|
859
|
+
}
|
|
860
|
+
if (opts.json) {
|
|
861
|
+
// A machine caller reads the envelope from stdout regardless of exit
|
|
862
|
+
// code: `partial` + per-repo `error` ARE the failure signal, and the
|
|
863
|
+
// successful repositories ride alongside them. So --json always exits 0
|
|
864
|
+
// (the envelope is authoritative); a native consumer must not discard
|
|
865
|
+
// stdout on a non-zero exit. Only the human path below exits non-zero.
|
|
866
|
+
console.log(JSON.stringify(envelope, null, 2));
|
|
867
|
+
return;
|
|
868
|
+
}
|
|
869
|
+
else {
|
|
870
|
+
for (const r of envelope.repositories) {
|
|
871
|
+
if (r.error) {
|
|
872
|
+
console.log(`${chalk.bold(r.slug)} ${chalk.red(`— fetch failed: ${r.error}`)}`);
|
|
873
|
+
continue;
|
|
874
|
+
}
|
|
875
|
+
console.log(`${chalk.bold(r.slug)} ${chalk.dim(`${r.pullRequests.length} open`)}`);
|
|
876
|
+
for (const pr of r.pullRequests) {
|
|
877
|
+
const draft = pr.isDraft ? chalk.gray(' [draft]') : '';
|
|
878
|
+
console.log(` #${pr.number}${draft} ${pr.title} ${chalk.gray(`@${pr.author.login} · ${pr.headRefName}`)}`);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
if (envelope.partial) {
|
|
882
|
+
console.log(chalk.yellow('\nSome repositories could not be fetched — the list above is incomplete.'));
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
// A partial result (any repo fetch failed) is not a clean success.
|
|
886
|
+
if (envelope.partial)
|
|
887
|
+
process.exit(1);
|
|
888
|
+
});
|
|
889
|
+
setHelpSections(prsCmd, {
|
|
890
|
+
examples: `
|
|
891
|
+
agents projects prs rush --json # every open PR across rush's repos
|
|
892
|
+
agents projects prs rush --json --repo phnx-labs/agi-cli
|
|
893
|
+
agents projects prs rush --json --repo phnx-labs/agi-cli --number 3646 # one PR, with checks + review
|
|
894
|
+
`,
|
|
895
|
+
notes: `
|
|
896
|
+
Repos come from the project definition's attached repos only (repo + repos[].slug);
|
|
897
|
+
--repo is refused unless it is one of them.
|
|
898
|
+
|
|
899
|
+
The list is read from GitHub over REST and paginated in full, drafts included,
|
|
900
|
+
with no author filter. checks and reviewDecision are null in the list; --number
|
|
901
|
+
enriches exactly that one PR against its live head SHA.
|
|
902
|
+
|
|
903
|
+
A repository whose fetch fails is reported with an error and marks the result
|
|
904
|
+
partial (JSON reports errors per repository; text mode exits non-zero).
|
|
905
|
+
`,
|
|
906
|
+
});
|
|
821
907
|
// ---- edit ----
|
|
822
908
|
projects
|
|
823
909
|
.command('edit <name>')
|
package/dist/commands/repo.js
CHANGED
|
@@ -31,8 +31,6 @@ function resolveRepoPath(target) {
|
|
|
31
31
|
import { applyExtraAliasToVersions, ensureAgentsDir, getExtraRepoDir, getSystemAgentsDir, getUserAgentsDir, readMeta, resolveExtraRepoDir, updateMeta, } from '../lib/state.js';
|
|
32
32
|
import { parseSource, pullRepo, commitAndPush, isGitRepo, isSystemRepoOrigin, adoptRepo, adoptUserRepoIfNeeded, recordUserRepoRemote, resolveUserRepoRemoteUrl, getRemoteUrl, sameGitRemote, displayHomePath, syncRepoGit, } from '../lib/git.js';
|
|
33
33
|
import { DEFAULT_SYSTEM_REPO } from '../lib/types.js';
|
|
34
|
-
import { ALL_AGENT_IDS, isAgentName, resolveAgentName } from '../lib/agents.js';
|
|
35
|
-
import { refresh } from '../lib/refresh.js';
|
|
36
34
|
import { capableAgents } from '../lib/capabilities.js';
|
|
37
35
|
import { getGlobalDefault, getVersionHomePath, listInstalledVersions } from '../lib/installations/versions.js';
|
|
38
36
|
import { syncAllMarketplaces } from '../lib/plugins/plugin-marketplace.js';
|
|
@@ -1230,48 +1228,6 @@ Examples:
|
|
|
1230
1228
|
}
|
|
1231
1229
|
}
|
|
1232
1230
|
});
|
|
1233
|
-
// Deprecated: superseded by `agents sync`. `agents sync --local` runs the same
|
|
1234
|
-
// reconcile stage (sync-umbrella.ts calls this exact `refresh()`), and `agents
|
|
1235
|
-
// sync <agent>` targets one agent — with the added reach `refresh` lacks
|
|
1236
|
-
// (all installed versions, no silent skip when there is no global default).
|
|
1237
|
-
// Hidden from help; kept as a warned, functional alias so old muscle-memory and
|
|
1238
|
-
// scripts don't break. Migrate callers to `agents sync`.
|
|
1239
|
-
repoCmd
|
|
1240
|
-
.command('refresh [agent]', { hidden: true })
|
|
1241
|
-
.description('Deprecated — use `agents sync` instead.')
|
|
1242
|
-
.option('-y, --yes', 'Auto-sync everything without prompting')
|
|
1243
|
-
.option('--skip-clis', 'Skip CLI version install/upgrade from agents.yaml')
|
|
1244
|
-
.action(async (arg, options) => {
|
|
1245
|
-
console.warn(chalk.yellow('`agents repo refresh` is deprecated — use `agents sync` instead:'));
|
|
1246
|
-
console.warn(chalk.gray(' all agents: agents sync --local'));
|
|
1247
|
-
console.warn(chalk.gray(' one agent: agents sync <agent>'));
|
|
1248
|
-
let agentFilter;
|
|
1249
|
-
if (arg) {
|
|
1250
|
-
if (!isAgentName(arg)) {
|
|
1251
|
-
console.log(chalk.red(`Unknown agent "${arg}".`));
|
|
1252
|
-
console.log(chalk.gray(`Available: ${ALL_AGENT_IDS.join(', ')}`));
|
|
1253
|
-
process.exitCode = 1;
|
|
1254
|
-
return;
|
|
1255
|
-
}
|
|
1256
|
-
agentFilter = resolveAgentName(arg);
|
|
1257
|
-
}
|
|
1258
|
-
try {
|
|
1259
|
-
await refresh({
|
|
1260
|
-
agentFilter,
|
|
1261
|
-
skipPrompts: options.yes,
|
|
1262
|
-
skipClis: options.skipClis,
|
|
1263
|
-
});
|
|
1264
|
-
console.log(chalk.green('\nRefresh complete'));
|
|
1265
|
-
}
|
|
1266
|
-
catch (err) {
|
|
1267
|
-
if (isPromptCancelled(err)) {
|
|
1268
|
-
console.log(chalk.yellow('\nCancelled'));
|
|
1269
|
-
return;
|
|
1270
|
-
}
|
|
1271
|
-
console.error(chalk.red(err.message));
|
|
1272
|
-
process.exit(1);
|
|
1273
|
-
}
|
|
1274
|
-
});
|
|
1275
1231
|
const statusCmd = repoCmd
|
|
1276
1232
|
.command('status [alias]', { hidden: true })
|
|
1277
1233
|
.description('Alias of `list` (kept for muscle memory). Add --devices-all to report across the fleet.')
|
|
@@ -22,7 +22,7 @@ export interface ResourceRow {
|
|
|
22
22
|
targets: SyncTarget[];
|
|
23
23
|
buildDetail: () => string;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
interface ResourceViewOptions {
|
|
26
26
|
resourcePlural: string;
|
|
27
27
|
resourceSingular: string;
|
|
28
28
|
extraLabel?: string;
|
|
@@ -55,7 +55,7 @@ export interface ResourceViewOptions {
|
|
|
55
55
|
}
|
|
56
56
|
/** Display a resource list: interactive picker in TTY mode, plain table otherwise. */
|
|
57
57
|
export declare function showResourceList(opts: ResourceViewOptions): Promise<void>;
|
|
58
|
-
|
|
58
|
+
interface ResourceLayout {
|
|
59
59
|
mode: 'table' | 'cards';
|
|
60
60
|
nameW: number;
|
|
61
61
|
extraW: number;
|
|
@@ -77,4 +77,5 @@ export declare function resourceLayout(cols: number, o: {
|
|
|
77
77
|
}): ResourceLayout;
|
|
78
78
|
/** Build the sync targets section showing version pills grouped by agent. */
|
|
79
79
|
export declare function buildTargetsSection(targets: SyncTarget[]): string;
|
|
80
|
+
export {};
|
|
80
81
|
/** Pad a string to a fixed width, accounting for ANSI escape codes in length calculation. */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { SessionMeta } from '../lib/session/types.js';
|
|
2
|
-
export declare const RESUME_SOURCE_ENV = "AGENTS_RESUME_SOURCE_JSON";
|
|
3
2
|
/** Inspect local archived context after the owner hop fails. Recovery still
|
|
4
3
|
* requires readable content and explicit replay consent before starting a run. */
|
|
5
4
|
export declare function resumeLocalFallbackSource(session: SessionMeta, self?: string): SessionMeta;
|
package/dist/commands/resume.js
CHANGED
|
@@ -8,7 +8,8 @@ import chalk from 'chalk';
|
|
|
8
8
|
import { resolveSessionMetadataValue } from './sessions.js';
|
|
9
9
|
import { sessionOwnerDevice, consumeResumePinned, RESUME_PINNED_ENV } from '../lib/session/resume-owner.js';
|
|
10
10
|
import { machineId } from '../lib/machine-id.js';
|
|
11
|
-
|
|
11
|
+
import { takeOverDetachedSession } from '../lib/session/detached.js';
|
|
12
|
+
const RESUME_SOURCE_ENV = 'AGENTS_RESUME_SOURCE_JSON';
|
|
12
13
|
/** Inspect local archived context after the owner hop fails. Recovery still
|
|
13
14
|
* requires readable content and explicit replay consent before starting a run. */
|
|
14
15
|
export function resumeLocalFallbackSource(session, self = machineId()) {
|
|
@@ -161,7 +162,9 @@ export async function runStrictResume(sessionId, prompt, options) {
|
|
|
161
162
|
}
|
|
162
163
|
return;
|
|
163
164
|
}
|
|
164
|
-
|
|
165
|
+
const localSession = pinnedHere ? resumeLocalFallbackSource(outcome.session) : outcome.session;
|
|
166
|
+
await takeOverDetachedSession(localSession.id);
|
|
167
|
+
process.exitCode = await delegateLocalResume(localSession, prompt, options);
|
|
165
168
|
}
|
|
166
169
|
/**
|
|
167
170
|
* Spawn the delegated local `agents run --resume` for a session this box owns
|