@phnx-labs/agents-cli 1.22.112 → 1.22.114
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 +37 -0
- package/README.md +10 -11
- package/dist/cli/command-registry.d.ts +0 -60
- package/dist/cli/command-registry.js +59 -61
- package/dist/commands/apply.d.ts +0 -4
- package/dist/commands/apply.js +3 -3
- 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/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/feed.d.ts +3 -3
- package/dist/commands/feed.js +1 -1
- package/dist/commands/focus.d.ts +4 -4
- 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/message.d.ts +1 -1
- package/dist/commands/message.js +3 -3
- package/dist/commands/projects.d.ts +2 -18
- package/dist/commands/projects.js +89 -3
- package/dist/commands/resource-view.d.ts +3 -2
- package/dist/commands/resume.d.ts +0 -1
- package/dist/commands/resume.js +1 -1
- 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 +21 -2
- package/dist/commands/sessions-backfill.d.ts +2 -35
- package/dist/commands/sessions-backfill.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 -5
- 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 +14 -104
- package/dist/commands/sessions.js +22 -10
- package/dist/commands/setup-mine.d.ts +0 -6
- package/dist/commands/setup-mine.js +1 -1
- package/dist/commands/setup.d.ts +3 -4
- package/dist/commands/setup.js +1 -1
- package/dist/commands/share.d.ts +8 -8
- 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 +1 -1
- package/dist/commands/tmux.d.ts +1 -1
- package/dist/commands/tmux.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/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/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 +5 -5
- 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 +4 -4
- package/dist/lib/browser/service.d.ts +4 -4
- 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 +1 -1
- 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/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/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-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 -12
- package/dist/lib/daemon/daemon.js +42 -23
- 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/testdata/process-view-daemon.d.ts +1 -0
- package/dist/lib/daemon/testdata/process-view-daemon.js +14 -0
- package/dist/lib/daemon/testdata/process-view-start.d.ts +1 -0
- package/dist/lib/daemon/testdata/process-view-start.js +43 -0
- package/dist/lib/daemon-services.d.ts +2 -1
- 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 +2 -1
- 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 +4 -1
- package/dist/lib/event-provenance.js +4 -0
- 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 +28 -8
- 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 +11 -2
- package/dist/lib/feed/activity.d.ts +16 -33
- package/dist/lib/feed/activity.js +69 -26
- package/dist/lib/feed/answer.d.ts +3 -2
- package/dist/lib/feed/attention.js +5 -1
- package/dist/lib/feed/events.d.ts +2 -47
- package/dist/lib/feed/events.js +1 -141
- package/dist/lib/feed/feed.d.ts +9 -42
- package/dist/lib/feed/feed.js +1 -60
- package/dist/lib/feed/pr-status.d.ts +0 -2
- package/dist/lib/feed/pr-status.js +1 -5
- package/dist/lib/feed/watch.d.ts +10 -2
- package/dist/lib/feed/watch.js +91 -4
- 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 +2 -2
- 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 +2 -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 -65
- package/dist/lib/git.js +3 -142
- 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 -34
- package/dist/lib/hosts/dispatch.js +4 -21
- 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 +4 -3
- package/dist/lib/hosts/remote-session-id.d.ts +5 -27
- package/dist/lib/hosts/remote-session-id.js +18 -61
- 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/launch-identity.d.ts +10 -0
- package/dist/lib/launch-identity.js +31 -0
- 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/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/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/reconcile-and-repair.d.ts +5 -4
- package/dist/lib/redact.d.ts +7 -1
- package/dist/lib/redact.js +94 -3
- package/dist/lib/refresh-coordinator.d.ts +2 -1
- package/dist/lib/refresh.d.ts +3 -2
- 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-client.d.ts +0 -17
- package/dist/lib/secrets-client.js +4 -26
- 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/active.js +9 -3
- 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/db.d.ts +2 -1
- package/dist/lib/session/db.js +39 -4
- package/dist/lib/session/detached.d.ts +2 -1
- package/dist/lib/session/detached.js +2 -2
- package/dist/lib/session/digest.d.ts +2 -2
- package/dist/lib/session/digest.js +1 -1
- package/dist/lib/session/discover.js +7 -2
- 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 +12 -1
- package/dist/lib/session/hook-sessions.js +139 -6
- 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/pid-registry.d.ts +18 -5
- package/dist/lib/session/pid-registry.js +164 -17
- package/dist/lib/session/presence.d.ts +2 -1
- package/dist/lib/session/process-view.d.ts +25 -0
- package/dist/lib/session/process-view.js +176 -0
- package/dist/lib/session/projection.d.ts +13 -0
- package/dist/lib/session/projection.js +101 -0
- 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 +2 -5
- package/dist/lib/session/remote/peer-stream.js +2 -2
- 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 +10 -7
- package/dist/lib/session/remote/watch.js +10 -6
- 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 +17 -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 +5 -5
- 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/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/testdata/pid-registry-namespace.d.ts +1 -0
- package/dist/lib/session/testdata/pid-registry-namespace.js +27 -0
- package/dist/lib/session/testdata/process-view-namespace.d.ts +1 -0
- package/dist/lib/session/testdata/process-view-namespace.js +56 -0
- package/dist/lib/session/testdata/process-view-private.d.ts +1 -0
- package/dist/lib/session/testdata/process-view-private.js +12 -0
- 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/settings-manifest.d.ts +2 -1
- package/dist/lib/share/delete.d.ts +5 -4
- package/dist/lib/share/html.d.ts +0 -2
- package/dist/lib/share/html.js +9 -9
- package/dist/lib/share/http-error.d.ts +3 -2
- package/dist/lib/share/og.d.ts +2 -1
- package/dist/lib/share/provision.d.ts +2 -2
- package/dist/lib/share/publish.d.ts +4 -13
- package/dist/lib/share/publish.js +2 -2
- package/dist/lib/shim-heal.d.ts +1 -5
- package/dist/lib/shim-heal.js +0 -6
- package/dist/lib/smart-launch.d.ts +4 -5
- package/dist/lib/smart-launch.js +1 -1
- package/dist/lib/snapshot.d.ts +3 -2
- package/dist/lib/ssh-exec.d.ts +5 -4
- 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.js +1 -1
- package/dist/lib/state.d.ts +1 -3
- package/dist/lib/state.js +1 -4
- 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 +4 -3
- 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/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 +1 -3
- package/dist/lib/traces/provision.js +1 -1
- 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 +3 -3
- 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 +2 -3
- package/scripts/postinstall.js +5 -4
- package/dist/commands/pty.d.ts +0 -20
- package/dist/commands/pty.js +0 -404
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.22.114
|
|
4
|
+
|
|
5
|
+
- **`agents projects prs <project>` — every open PR across a project's repos (PHNX-3999).** Reads the whole open PR board (drafts included, no author filter) straight from GitHub over REST, paginated, for the project's own attached repos only — unlike `projects status`, whose `openPrs` only carries PRs the fleet's sessions opened. `--repo <owner/repo>` restricts to one attached repo; `--repo … --number <n>` lazily enriches exactly that PR with its head-SHA checks and reviewDecision. A per-repo fetch failure is reported and marks the result partial, never relabeled as zero open PRs. Source: `cli/src/lib/github/project-prs.ts`, `cli/src/commands/projects.ts`.
|
|
6
|
+
- **AGI Menu preferences are registered `agents config` keys (PHNX-3999).** Thirteen user-scope `menubar.menu.*` keys (defaultProject, workingRowsShown, showPreviews, projectPriorityFilter, hideCompletedMilestones, bannerWhenNeedsYou, includeOtherDeviceRequests, groupBy [none/project/agent/device], thenBy, projectScope, projectSort, ticketSort, showPullRequests) that get/set/unset/list through the existing `agents config` surface and sync fleet-wide via the central `agents.yaml`. `config list --json` emits `{key,value,hint}` and omits unset keys, so the menu falls back to its own defaults. `agents menubar snapshot --json` also carries a `menuPreferences` map (effective value per key, `defaultProject` omitted when unset) so the menu reads them from the snapshot it already polls, not a second mechanism; on macOS a one-shot, sentinel-gated migration lifts legacy `com.phnx-labs.agents-menubar` UserDefaults into config without overriding an already-set value. Source: `cli/src/lib/device-config.ts`, `cli/src/lib/config-keys.ts`, `cli/src/commands/config.ts`, `cli/src/lib/menubar/snapshot.ts`, `cli/src/lib/menubar/migrate-prefs.ts`.
|
|
7
|
+
- **Devices carry a `formFactor` hardware fact (PHNX-3999).** A new shared device-scope config key (`laptop`/`desktop`/`server`/`unknown`) set explicitly per device — never inferred from the OS platform — surfaced in `agents menubar snapshot --json` so the menu can draw a factual hardware icon. Source: `cli/src/lib/device-config.ts`, `cli/src/lib/menubar/snapshot.ts`.
|
|
8
|
+
- **A prose "needs-you" question is split into the ask and its context (PHNX-3999).** The session state engine used to flatten a whole trailing report into one line (`oneLine(content)`), losing the actual question and its Markdown. `extractProseQuestion` now separates the trailing ask (`StructuredQuestion.text` / `BlockQuestion.text`) from the preceding report (`context`, Markdown + newlines preserved), so an operator surface can lead with the question and show the report as context. It keeps multiple/multiline asks together, peels a same-paragraph lead-in into context, and never treats a `?` inside a code span, fenced block, or blockquote as the question. The freshness decay is unchanged. Source: `cli/src/lib/session/state.ts`, `cli/src/lib/feed/feed.ts`, `cli/src/lib/feed/attention.ts`.
|
|
9
|
+
|
|
10
|
+
- Install AGI Menu 1.4.0 with Sessions device filters, in-place project details, synced preferences, native Quick Look, and question-first request cards.
|
|
11
|
+
|
|
12
|
+
- **Codex custom agents keep their backslashes.** `agents subagents` wrote the
|
|
13
|
+
Codex TOML body inside `"""` and escaped only the closing quotes, so a
|
|
14
|
+
Windows path or a regex in an `AGENT.md` was mangled by TOML's backslash
|
|
15
|
+
escapes. Backslashes are now doubled first. Fixed alongside four other CodeQL
|
|
16
|
+
findings (terminal-escape scrubbing is a linear scan, prompt tag stripping is
|
|
17
|
+
a fixpoint, R2 key decoding is single-pass, and share-page asset inlining
|
|
18
|
+
treats any non-`file:` scheme as remote); none of those change behaviour on
|
|
19
|
+
ordinary input. Source: `cli/src/lib/subagents.ts`, `cli/src/lib/redact.ts`,
|
|
20
|
+
`cli/src/lib/session/prompt.ts`, `cli/src/lib/session/sync/r2.ts`,
|
|
21
|
+
`cli/src/lib/share/html.ts`.
|
|
22
|
+
|
|
23
|
+
- **`agents computer --device` and `agents secrets --device` forward the standalone engines' own `--host` address (PHNX-4090).** `computer`, `secrets`, and `browser` are extracted CLIs with no fleet registry of their own (PHNX-4075, PHNX-3989); they share one address grammar (`ssh://[user@]host`, `vnc://host[:port]`, `tcp://host:port`, or a bare `user@host`/alias) via a copied `lib/address.ts`. A device's `computer.host` config (`agents config set devices.<name>.computer.host <address>`, next to `defaultBrowserProfile`) selects the transport — `vnc://`/`tcp://` for a non-Windows desktop, or `ssh://` still resolved against the fleet identity; with none set, `--device` falls back to the historical Windows-only ssh tunnel. `agents computer`'s `withDeviceFlag` is gone, replaced by `withHostFlag` + `resolveDeviceHost`; `agents secrets`'s passthrough gained `rewriteDeviceToHost`. An explicit `--host` on the command line always wins over `--device`; `agents view --device <name>` is unaffected — it still SSHes the whole command. Source: `src/lib/address.ts`, `src/commands/computer.ts`, `src/commands/secrets-passthrough.ts`, `src/lib/device-config.ts`, `src/lib/config-keys.ts`.
|
|
24
|
+
|
|
25
|
+
- **Removed `agents pty`; use the standalone `term` CLI instead (PHNX-4091).** The
|
|
26
|
+
PTY engine (`agents pty`, its unix-socket sidecar, and the `sessions inject --pty`
|
|
27
|
+
target) moved to `@phnx-labs/term-cli` (`npm i -g @phnx-labs/term-cli`), published
|
|
28
|
+
separately with the same verbs, flags, and JSON shapes. The OAuth device-code
|
|
29
|
+
driver (`agents fleet login`, `agents auth mint`) now spawns the standalone
|
|
30
|
+
`term` binary instead of an in-repo pty sidecar. Source: `cli/src/lib/term-client.ts`.
|
|
31
|
+
|
|
32
|
+
## 1.22.113
|
|
33
|
+
|
|
34
|
+
- **Remote sessions have one execution-owned row (PHNX-3939).** Fleet session and feed streams reconcile launcher observations with the worker's state, retaining terminal/viewing metadata separately. Reconnects and stale history cannot replace a genuine worker row. Registry cleanup retains records whose PID namespace cannot be verified; nested agent runs keep launch lineage without claiming their parent's editor terminal.
|
|
35
|
+
- **Codex forks retain their child identity.** Full and incremental scans keep the first native metadata record. Reindexing repairs cold files and removes a stale parent binding to child bytes even when the parent rollout is absent. Team descendants also keep their immediate parent lineage without inheriting its editor ownership.
|
|
36
|
+
- **Nested daemon starts preserve shared session state.** Legacy migration and reboot recovery require the initial host namespace or kernel-verified live daemon ownership before touching singleton state. Foreign snapshots remain read-only, and invisible processes are never treated as dead. Automatic reuse of a private-container HOME across namespaces is unsupported, including after the prior namespace exits; writers fail safely with a diagnostic.
|
|
37
|
+
|
|
38
|
+
- Repair session indexes whose schema version is current but whose identity columns are missing, preserving existing session metadata (PHNX-3940).
|
|
39
|
+
|
|
3
40
|
## 1.22.112
|
|
4
41
|
|
|
5
42
|
- **Runs expand portable home paths on the executing device (PHNX-3940).** A remote resume terminal could open successfully while its child failed to start because `--cwd '$HOME'` was treated as a literal directory. The shared run path now expands `$HOME` and `~` locally, while preserving those anchors until remote dispatch reaches its target. This fixes direct runs and resumed conversations alike.
|
package/README.md
CHANGED
|
@@ -1544,21 +1544,20 @@ See the publication boundary in [observability](cli/docs/observability.md).
|
|
|
1544
1544
|
|
|
1545
1545
|
## PTY
|
|
1546
1546
|
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1547
|
+
Real pseudoterminals for REPLs, TUIs, and interactive programs moved to the
|
|
1548
|
+
standalone [`term` CLI](https://github.com/phnx-labs/term-cli)
|
|
1549
|
+
(`npm i -g @phnx-labs/term-cli`), published separately (PHNX-4091). Same
|
|
1550
|
+
verbs, flags, and JSON shapes `agents pty` used to have:
|
|
1551
1551
|
|
|
1552
1552
|
```bash
|
|
1553
|
-
|
|
1554
|
-
SID
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
agents pty stop $SID
|
|
1553
|
+
SID=$(term start)
|
|
1554
|
+
term exec $SID "python3"
|
|
1555
|
+
term screen $SID # Clean text, no ANSI -- what a human sees
|
|
1556
|
+
term write $SID "print('hello')\n"
|
|
1557
|
+
term stop $SID
|
|
1559
1558
|
```
|
|
1560
1559
|
|
|
1561
|
-
|
|
1560
|
+
`term`'s own sidecar server holds sessions alive between CLI calls and renders `screen` via a headless terminal emulator; sessions auto-clean after 30 minutes idle. See [term-cli's README](https://github.com/phnx-labs/term-cli#readme) for the full command reference.
|
|
1562
1561
|
|
|
1563
1562
|
---
|
|
1564
1563
|
|
|
@@ -24,73 +24,13 @@ export { KNOWN_TOP_LEVEL_COMMANDS, RETIRED_TOP_LEVEL_COMMANDS } from '../lib/sta
|
|
|
24
24
|
export type Registrar = (program: Command) => void;
|
|
25
25
|
/** A thunk that dynamically imports a command module and returns its registrar. */
|
|
26
26
|
export type ModuleLoader = () => Promise<Registrar>;
|
|
27
|
-
export declare const loadView: ModuleLoader;
|
|
28
|
-
export declare const loadInspect: ModuleLoader;
|
|
29
|
-
export declare const loadFeedback: ModuleLoader;
|
|
30
|
-
export declare const loadCommands: ModuleLoader;
|
|
31
|
-
export declare const loadHooks: ModuleLoader;
|
|
32
|
-
export declare const loadSkills: ModuleLoader;
|
|
33
|
-
export declare const loadRules: ModuleLoader;
|
|
34
|
-
export declare const loadMemory: ModuleLoader;
|
|
35
|
-
export declare const loadPermissions: ModuleLoader;
|
|
36
|
-
export declare const loadMcp: ModuleLoader;
|
|
37
|
-
export declare const loadCli: ModuleLoader;
|
|
38
|
-
export declare const loadSubagents: ModuleLoader;
|
|
39
|
-
export declare const loadPlugins: ModuleLoader;
|
|
40
|
-
export declare const loadWorkflows: ModuleLoader;
|
|
41
27
|
export declare const loadVersions: ModuleLoader;
|
|
42
28
|
export declare const loadUpdate: ModuleLoader;
|
|
43
|
-
export declare const loadImport: ModuleLoader;
|
|
44
|
-
export declare const loadPackages: ModuleLoader;
|
|
45
|
-
export declare const loadRoutines: ModuleLoader;
|
|
46
|
-
export declare const loadMonitors: ModuleLoader;
|
|
47
|
-
export declare const loadProjects: ModuleLoader;
|
|
48
29
|
export declare const loadRun: ModuleLoader;
|
|
49
|
-
export declare const loadOpen: ModuleLoader;
|
|
50
|
-
export declare const loadReconnect: ModuleLoader;
|
|
51
|
-
export declare const loadFork: ModuleLoader;
|
|
52
|
-
export declare const loadConfig: ModuleLoader;
|
|
53
|
-
export declare const loadModels: ModuleLoader;
|
|
54
|
-
export declare const loadModes: ModuleLoader;
|
|
55
30
|
export declare const loadPrune: ModuleLoader;
|
|
56
|
-
export declare const loadTrash: ModuleLoader;
|
|
57
|
-
export declare const loadRestore: ModuleLoader;
|
|
58
31
|
export declare const loadDoctor: ModuleLoader;
|
|
59
|
-
export declare const loadRoute: ModuleLoader;
|
|
60
|
-
export declare const loadHarness: ModuleLoader;
|
|
61
|
-
export declare const loadSecrets: ModuleLoader;
|
|
62
|
-
export declare const loadMenubar: ModuleLoader;
|
|
63
|
-
export declare const loadSync: ModuleLoader;
|
|
64
|
-
export declare const loadRefreshRules: ModuleLoader;
|
|
65
|
-
export declare const loadFactory: ModuleLoader;
|
|
66
|
-
export declare const loadInsights: ModuleLoader;
|
|
67
|
-
export declare const loadTrace: ModuleLoader;
|
|
68
|
-
export declare const loadPty: ModuleLoader;
|
|
69
|
-
export declare const loadTmux: ModuleLoader;
|
|
70
|
-
export declare const loadWatchdog: ModuleLoader;
|
|
71
|
-
export declare const loadBrowser: ModuleLoader;
|
|
72
|
-
export declare const loadComputer: ModuleLoader;
|
|
73
|
-
export declare const loadLogs: ModuleLoader;
|
|
74
|
-
export declare const loadEvents: ModuleLoader;
|
|
75
|
-
export declare const loadSsh: ModuleLoader;
|
|
76
|
-
export declare const loadRepo: ModuleLoader;
|
|
77
|
-
export declare const loadSetup: ModuleLoader;
|
|
78
|
-
export declare const loadUninstall: ModuleLoader;
|
|
79
|
-
export declare const loadUpgrade: ModuleLoader;
|
|
80
32
|
export declare const loadSessions: ModuleLoader;
|
|
81
33
|
export declare const loadTeams: ModuleLoader;
|
|
82
|
-
export declare const loadCloud: ModuleLoader;
|
|
83
|
-
export declare const loadMessage: ModuleLoader;
|
|
84
|
-
export declare const loadSend: ModuleLoader;
|
|
85
|
-
export declare const loadFeed: ModuleLoader;
|
|
86
|
-
export declare const loadMailboxes: ModuleLoader;
|
|
87
|
-
export declare const loadArtifacts: ModuleLoader;
|
|
88
|
-
export declare const loadWebhooks: ModuleLoader;
|
|
89
|
-
export declare const loadHumans: ModuleLoader;
|
|
90
|
-
export declare const loadAccounts: ModuleLoader;
|
|
91
|
-
export declare const loadDaemon: ModuleLoader;
|
|
92
|
-
export declare const loadAuth: ModuleLoader;
|
|
93
|
-
export declare const loadTraces: ModuleLoader;
|
|
94
34
|
export declare const loadReminders: ModuleLoader;
|
|
95
35
|
/**
|
|
96
36
|
* Commands whose modules pull in the SQLite-backed session/cloud stack. They are
|
|
@@ -26,78 +26,77 @@ export { KNOWN_TOP_LEVEL_COMMANDS, RETIRED_TOP_LEVEL_COMMANDS } from '../lib/sta
|
|
|
26
26
|
// One loader per command module. Each dynamically imports the module and hands
|
|
27
27
|
// back its register function. Kept as named consts so src/index.ts can compose
|
|
28
28
|
// them into the exact main-branch registration order for the slow path.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
29
|
+
const loadView = async () => (await import('../commands/view.js')).registerViewCommand;
|
|
30
|
+
const loadInspect = async () => (await import('../commands/inspect.js')).registerInspectCommand;
|
|
31
|
+
const loadFeedback = async () => (await import('../commands/feedback.js')).registerFeedbackCommand;
|
|
32
|
+
const loadCommands = async () => (await import('../commands/commands.js')).registerCommandsCommands;
|
|
33
|
+
const loadHooks = async () => (await import('../commands/hooks.js')).registerHooksCommands;
|
|
34
|
+
const loadSkills = async () => (await import('../commands/skills.js')).registerSkillsCommands;
|
|
35
|
+
const loadRules = async () => (await import('../commands/rules.js')).registerRulesCommands;
|
|
36
|
+
const loadMemory = async () => (await import('../commands/memory.js')).registerMemoryCommands;
|
|
37
|
+
const loadPermissions = async () => (await import('../commands/permissions.js')).registerPermissionsCommands;
|
|
38
|
+
const loadMcp = async () => (await import('../commands/mcp.js')).registerMcpCommands;
|
|
39
|
+
const loadCli = async () => (await import('../commands/cli.js')).registerCliCommands;
|
|
40
|
+
const loadSubagents = async () => (await import('../commands/subagents.js')).registerSubagentsCommands;
|
|
41
|
+
const loadPlugins = async () => (await import('../commands/plugins.js')).registerPluginsCommands;
|
|
42
|
+
const loadWorkflows = async () => (await import('../commands/workflows.js')).registerWorkflowsCommands;
|
|
43
43
|
export const loadVersions = async () => (await import('../commands/versions.js')).registerVersionsCommands;
|
|
44
44
|
export const loadUpdate = async () => (await import('../commands/update.js')).registerUpdateCommand;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
const loadImport = async () => (await import('../commands/import.js')).registerImportCommand;
|
|
46
|
+
const loadPackages = async () => (await import('../commands/packages.js')).registerPackagesCommands;
|
|
47
|
+
const loadRoutines = async () => (await import('../commands/routines.js')).registerRoutinesCommands;
|
|
48
|
+
const loadMonitors = async () => (await import('../commands/monitors.js')).registerMonitorsCommands;
|
|
49
|
+
const loadProjects = async () => (await import('../commands/projects.js')).registerProjectsCommands;
|
|
50
50
|
export const loadRun = async () => (await import('../commands/exec.js')).registerRunCommand;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
const loadOpen = async () => (await import('../commands/open.js')).registerOpenCommand;
|
|
52
|
+
const loadReconnect = async () => (await import('../commands/reconnect.js')).registerReconnectCommand;
|
|
53
|
+
const loadFork = async () => (await import('../commands/fork.js')).registerForkCommand;
|
|
54
|
+
const loadConfig = async () => (await import('../commands/config.js')).registerConfigCommand;
|
|
55
|
+
const loadModels = async () => (await import('../commands/models.js')).registerModelsCommand;
|
|
56
|
+
const loadModes = async () => (await import('../commands/modes.js')).registerModesCommand;
|
|
57
57
|
export const loadPrune = async () => (await import('../commands/prune.js')).registerPruneCommand;
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
const loadTrash = async () => (await import('../commands/trash.js')).registerTrashCommands;
|
|
59
|
+
const loadRestore = async () => (await import('../commands/trash.js')).registerRestoreCommand;
|
|
60
60
|
export const loadDoctor = async () => (await import('../commands/doctor.js')).registerDoctorCommand;
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
const loadRoute = async () => (await import('../commands/route.js')).registerRouteCommands;
|
|
62
|
+
const loadHarness = async () => (await import('../commands/harness.js')).registerHarnessCommands;
|
|
63
63
|
// PHNX-3989: `agents secrets` is a thin passthrough to the standalone
|
|
64
64
|
// `secrets` CLI (secrets-passthrough.ts). The legacy in-repo engine and its
|
|
65
65
|
// own command registrar are gone (Track D, tasks.md item 7) — the standalone
|
|
66
66
|
// `@phnx-labs/secrets-cli` package is the only implementation.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
export const loadUpgrade = async () => (await import('../commands/upgrade.js')).registerUpgradeCommand;
|
|
67
|
+
const loadSecrets = async () => (await import('../commands/secrets-passthrough.js')).registerSecretsCommands;
|
|
68
|
+
const loadMenubar = async () => (await import('../commands/menubar.js')).registerMenubarCommands;
|
|
69
|
+
const loadSync = async () => (await import('../commands/sync.js')).registerSyncCommand;
|
|
70
|
+
const loadRefreshRules = async () => (await import('../commands/refresh-rules.js')).registerRefreshRulesCommand;
|
|
71
|
+
const loadFactory = async () => (await import('../commands/factory.js')).registerFactoryCommands;
|
|
72
|
+
const loadInsights = async () => (await import('../commands/insights.js')).registerInsightsCommand;
|
|
73
|
+
const loadTrace = async () => (await import('../commands/sessions-trace.js')).registerTraceCommand;
|
|
74
|
+
const loadTmux = async () => (await import('../commands/tmux.js')).registerTmuxCommands;
|
|
75
|
+
const loadWatchdog = async () => (await import('../commands/watchdog.js')).registerWatchdogCommand;
|
|
76
|
+
const loadBrowser = async () => (await import('../commands/browser.js')).registerBrowserCommand;
|
|
77
|
+
const loadComputer = async () => (await import('../commands/computer.js')).registerComputerCommand;
|
|
78
|
+
const loadLogs = async () => (await import('../commands/logs.js')).registerLogsCommand;
|
|
79
|
+
const loadEvents = async () => (await import('../commands/events.js')).registerEventsCommand;
|
|
80
|
+
const loadSsh = async () => (await import('../commands/ssh.js')).registerSshCommands;
|
|
81
|
+
const loadRepo = async () => (await import('../commands/repo.js')).registerRepoCommands;
|
|
82
|
+
const loadSetup = async () => (await import('../commands/setup.js')).registerSetupCommand;
|
|
83
|
+
const loadUninstall = async () => (await import('../commands/uninstall.js')).registerUninstallCommands;
|
|
84
|
+
const loadUpgrade = async () => (await import('../commands/upgrade.js')).registerUpgradeCommand;
|
|
86
85
|
export const loadSessions = async () => (await import('../commands/sessions.js')).registerSessionsCommands;
|
|
87
86
|
export const loadTeams = async () => (await import('../commands/teams.js')).registerTeamsCommands;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
const loadCloud = async () => (await import('../commands/cloud.js')).registerCloudCommands;
|
|
88
|
+
const loadMessage = async () => (await import('../commands/message.js')).registerMessageCommand;
|
|
89
|
+
const loadSend = async () => (await import('../commands/send.js')).registerSendCommand;
|
|
90
|
+
const loadFeed = async () => (await import('../commands/feed.js')).registerFeedCommand;
|
|
91
|
+
const loadMailboxes = async () => (await import('../commands/mailboxes.js')).registerMailboxesCommand;
|
|
93
92
|
// Registers the `artifacts` group (`share` + `setup` + nested `unshare`).
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
const loadArtifacts = async () => (await import('../commands/artifacts.js')).registerArtifactsCommands;
|
|
94
|
+
const loadWebhooks = async () => (await import('../commands/webhook.js')).registerWebhooksCommand;
|
|
95
|
+
const loadHumans = async () => (await import('../commands/humans.js')).registerHumansCommands;
|
|
96
|
+
const loadAccounts = async () => (await import('../commands/accounts.js')).registerAccountsCommand;
|
|
97
|
+
const loadDaemon = async () => (await import('../commands/daemon.js')).registerDaemonCommand;
|
|
98
|
+
const loadAuth = async () => (await import('../commands/auth.js')).registerAuthCommand;
|
|
99
|
+
const loadTraces = async () => (await import('../commands/traces.js')).registerTracesCommands;
|
|
101
100
|
export const loadReminders = async () => (await import('../commands/reminders.js')).registerRemindersCommand;
|
|
102
101
|
/**
|
|
103
102
|
* Commands whose modules pull in the SQLite-backed session/cloud stack. They are
|
|
@@ -187,7 +186,6 @@ export const COMMAND_LOADERS = {
|
|
|
187
186
|
// `agents trace` is a top-level alias of `agents sessions trace` (precedent:
|
|
188
187
|
// `agents insights` aliases `agents sessions insights`). One implementation.
|
|
189
188
|
trace: [loadTrace],
|
|
190
|
-
pty: [loadPty],
|
|
191
189
|
tmux: [loadTmux],
|
|
192
190
|
watchdog: [loadWatchdog],
|
|
193
191
|
browser: [loadBrowser],
|
package/dist/commands/apply.d.ts
CHANGED
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
import { Command } from 'commander';
|
|
11
11
|
/** padEnd on the visible width, ignoring chalk color codes. Exported for tests. */
|
|
12
12
|
export declare function stripPad(s: string, width: number): string;
|
|
13
|
-
/**
|
|
14
|
-
* Attach the reconcile options + action to a command node.
|
|
15
|
-
*/
|
|
16
|
-
export declare function configureApplyCommand(cmd: Command): Command;
|
|
17
13
|
/**
|
|
18
14
|
* Canonical surface: `agents fleet apply` / `agents devices apply`.
|
|
19
15
|
* Top-level `agents apply` is retired (RUSH-2981) — not a noun, already nested
|
package/dist/commands/apply.js
CHANGED
|
@@ -18,7 +18,7 @@ import { isHostPinned, isDevicePinned, managedKnownHostsPath } from '../lib/devi
|
|
|
18
18
|
import { ensureDevicesRegistered } from '../lib/devices/sync.js';
|
|
19
19
|
import { readFleetFile, resolveDesired, emptyTargetsMessage } from '../lib/fleet/manifest.js';
|
|
20
20
|
import { snapshotAuth } from '../lib/fleet/auth-sync.js';
|
|
21
|
-
import {
|
|
21
|
+
import { AUTH_STORE_ALIAS } from '../lib/secrets-policy.js';
|
|
22
22
|
import { agentIdOf, diffFleet, probeDevice, runFleetApply, pool, sourceHome, expandAllSpecs, rosterNeedsVersions, fleetSecretsBundles, } from '../lib/fleet/apply.js';
|
|
23
23
|
import { listInstalledVersions } from '../lib/installations/versions.js';
|
|
24
24
|
/** Version of the running agents-cli — the fleet target version. */
|
|
@@ -221,7 +221,7 @@ async function runApply(opts) {
|
|
|
221
221
|
// discipline as `withVersions` — a fleet that uses no bundles never pays it.
|
|
222
222
|
const secretsBundles = fleetSecretsBundles(manifest.secrets?.bundles);
|
|
223
223
|
const withSecrets = (opts.provisionSecrets === true && secretsBundles.length > 0)
|
|
224
|
-
|| secretsBundles.includes(
|
|
224
|
+
|| secretsBundles.includes(AUTH_STORE_ALIAS);
|
|
225
225
|
console.log(chalk.gray(`Probing ${desired.length} device(s)…`));
|
|
226
226
|
const probeList = await pool(desired, 6, async (d) => probeDevice(nameToProfile.get(d.device), { withVersions, withSecrets }));
|
|
227
227
|
const probes = new Map(probeList.map((p) => [p.device, p]));
|
|
@@ -308,7 +308,7 @@ function reportResults(results) {
|
|
|
308
308
|
/**
|
|
309
309
|
* Attach the reconcile options + action to a command node.
|
|
310
310
|
*/
|
|
311
|
-
|
|
311
|
+
function configureApplyCommand(cmd) {
|
|
312
312
|
return cmd
|
|
313
313
|
.description('Reconcile the fleet to a declared profile: install agents and sync config.')
|
|
314
314
|
.option('-f, --file <path>', 'Manifest file carrying a fleet: block (default: agents.yaml)')
|
|
@@ -3,15 +3,11 @@ export interface BrowserTask {
|
|
|
3
3
|
task: TaskStatus;
|
|
4
4
|
profile: ProfileStatus;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
interface PickedBrowserTask {
|
|
7
7
|
task: BrowserTask;
|
|
8
8
|
action: 'view' | 'stop';
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
export declare function buildBrowserPreview(item: BrowserTask): string;
|
|
12
|
-
/** Build the list label for a browser task. */
|
|
13
|
-
export declare function buildBrowserLabel(item: BrowserTask, query: string): string;
|
|
14
|
-
export interface BrowserPickerConfig {
|
|
10
|
+
interface BrowserPickerConfig {
|
|
15
11
|
message: string;
|
|
16
12
|
tasks: BrowserTask[];
|
|
17
13
|
pageSize?: number;
|
|
@@ -19,3 +15,4 @@ export interface BrowserPickerConfig {
|
|
|
19
15
|
}
|
|
20
16
|
/** Show an interactive browser task picker. */
|
|
21
17
|
export declare function browserTaskPicker(config: BrowserPickerConfig): Promise<PickedBrowserTask | null>;
|
|
18
|
+
export {};
|
|
@@ -12,7 +12,7 @@ function formatAge(ms) {
|
|
|
12
12
|
return humanDuration(Date.now() - ms) + ' ago';
|
|
13
13
|
}
|
|
14
14
|
/** Build the preview pane for a browser task. */
|
|
15
|
-
|
|
15
|
+
function buildBrowserPreview(item) {
|
|
16
16
|
const { task, profile } = item;
|
|
17
17
|
const lines = [];
|
|
18
18
|
// Line 1: Task name (ID: xxx)
|
|
@@ -48,7 +48,7 @@ export function buildBrowserPreview(item) {
|
|
|
48
48
|
return lines.join('\n');
|
|
49
49
|
}
|
|
50
50
|
/** Build the list label for a browser task. */
|
|
51
|
-
|
|
51
|
+
function buildBrowserLabel(item, query) {
|
|
52
52
|
const { task, profile } = item;
|
|
53
53
|
const termWidth = process.stdout.columns || 80;
|
|
54
54
|
// Format: name profile tabs domains age
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface BrowserSessionsCommandOpts {
|
|
2
2
|
profile?: string;
|
|
3
3
|
open?: string | boolean;
|
|
4
4
|
json?: boolean;
|
|
@@ -14,3 +14,4 @@ export declare function shouldOpenInteractiveBrowserSessions(opts: BrowserSessio
|
|
|
14
14
|
* sites so the interactive routing decision lives in one place.
|
|
15
15
|
*/
|
|
16
16
|
export declare function runBrowserSessionsCommand(opts: BrowserSessionsCommandOpts): Promise<void>;
|
|
17
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComputerRunRow } from '../lib/computer/sessions-list.js';
|
|
2
|
-
|
|
2
|
+
interface ComputerSessionsCommandOpts {
|
|
3
3
|
machine?: string;
|
|
4
4
|
/** Row cap for the flat table only — the interactive picker is searchable
|
|
5
5
|
* and shows every row regardless (see `runComputerSessions`). */
|
|
@@ -19,3 +19,4 @@ export declare function shouldOpenInteractiveComputerSessions(opts: ComputerSess
|
|
|
19
19
|
* split so both call sites stay in lockstep.
|
|
20
20
|
*/
|
|
21
21
|
export declare function runComputerSessionsCommand(opts: ComputerSessionsCommandOpts): Promise<void>;
|
|
22
|
+
export {};
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
* own event ledger.
|
|
40
40
|
*/
|
|
41
41
|
import { Command } from 'commander';
|
|
42
|
+
import { type ComputerTargetContext } from '../lib/computer/context.js';
|
|
42
43
|
/**
|
|
43
44
|
* The verb catalog. Descriptions are the consumer's (they appear in
|
|
44
45
|
* `agents computer --help`); flags are the engine's.
|
|
@@ -65,38 +66,32 @@ export declare function shouldBlockOffPlatform(opts: {
|
|
|
65
66
|
device?: string;
|
|
66
67
|
}): boolean;
|
|
67
68
|
/**
|
|
68
|
-
* Put `--
|
|
69
|
+
* Put `--host <address>` on the argv handed to the engine.
|
|
69
70
|
*
|
|
70
71
|
* commander CONSUMES the `--device` it declares, so a verb that only read
|
|
71
72
|
* `opts.device` forwarded an argv with no remote selector in it and the engine
|
|
72
73
|
* — which selects the remote path from its own argv — ran the invocation
|
|
73
74
|
* LOCALLY. That is how `setup --device win-mini` installed the macOS helper on
|
|
74
75
|
* the laptop. The flag is re-inserted immediately after the verb rather than
|
|
75
|
-
* appended, so a verb whose operands are variadic cannot swallow it.
|
|
76
|
+
* appended, so a verb whose operands are variadic cannot swallow it. A `--host`
|
|
77
|
+
* the caller already typed always wins — it is never overwritten (PHNX-4090).
|
|
76
78
|
*
|
|
77
79
|
* Pure, so the re-insertion is testable without spawning the engine.
|
|
78
80
|
*/
|
|
79
|
-
export declare function
|
|
81
|
+
export declare function withHostFlag(argv: string[], host?: string): string[];
|
|
80
82
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* no
|
|
83
|
+
* Resolve `--device <name>` to the `--host <address>` the engine actually
|
|
84
|
+
* speaks (PHNX-4090). A device's `computer.host` config (`agents config set
|
|
85
|
+
* devices.<name>.computer.host <address>`) wins when set — `vnc://`/`tcp://`
|
|
86
|
+
* carries no ssh identity, `ssh://` still resolves one against the fleet. With
|
|
87
|
+
* no `computer.host`, fall back to the fleet's ssh identity exactly as before
|
|
88
|
+
* (Windows-only — the tunnel this repo has always provisioned).
|
|
86
89
|
*/
|
|
87
|
-
export declare function
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/** Skip recording — lifecycle verbs are not user actions. */
|
|
91
|
-
record?: boolean;
|
|
92
|
-
/** Read the engine's stdout instead of letting it reach the terminal. */
|
|
93
|
-
capture?: boolean;
|
|
94
|
-
}): Promise<{
|
|
95
|
-
exitCode: number;
|
|
96
|
-
stdout: string;
|
|
90
|
+
export declare function resolveDeviceHost(device: string): Promise<{
|
|
91
|
+
host: string;
|
|
92
|
+
target: ComputerTargetContext;
|
|
97
93
|
}>;
|
|
98
94
|
export declare function registerComputerCommand(program: Command): void;
|
|
99
|
-
export declare function registerComputerSubcommands(program: Command): void;
|
|
100
95
|
/**
|
|
101
96
|
* Install the macOS helper through the engine. Used by the `agents setup
|
|
102
97
|
* computer` wizard, which still owns the TCC hand-holding — that is a
|
|
@@ -42,6 +42,9 @@ import { registerCommandGroups, setHelpSections } from '../lib/help.js';
|
|
|
42
42
|
import { loadComputerAllowList, loadDefaultPeers, resolveTcpEndpoint, resolveVncEndpoint, } from '../lib/computer/policy.js';
|
|
43
43
|
import { buildComputerContext } from '../lib/computer/context.js';
|
|
44
44
|
import { recordComputerAction } from '../lib/computer/record.js';
|
|
45
|
+
import { resolveRemoteDevice } from '../lib/ssh-tunnel.js';
|
|
46
|
+
import { getConfigValue } from '../lib/device-config.js';
|
|
47
|
+
import { parseAddress, sshTarget } from '../lib/address.js';
|
|
45
48
|
import { isComputerClientError, resolveComputerBin, runComputer, } from '../lib/computer-client.js';
|
|
46
49
|
import { runComputerSessionsCommand } from './computer-sessions-picker.js';
|
|
47
50
|
// Help groups — mirror `agents browser` so the mental model carries over.
|
|
@@ -99,22 +102,65 @@ export function shouldBlockOffPlatform(opts) {
|
|
|
99
102
|
return true;
|
|
100
103
|
}
|
|
101
104
|
/**
|
|
102
|
-
* Put `--
|
|
105
|
+
* Put `--host <address>` on the argv handed to the engine.
|
|
103
106
|
*
|
|
104
107
|
* commander CONSUMES the `--device` it declares, so a verb that only read
|
|
105
108
|
* `opts.device` forwarded an argv with no remote selector in it and the engine
|
|
106
109
|
* — which selects the remote path from its own argv — ran the invocation
|
|
107
110
|
* LOCALLY. That is how `setup --device win-mini` installed the macOS helper on
|
|
108
111
|
* the laptop. The flag is re-inserted immediately after the verb rather than
|
|
109
|
-
* appended, so a verb whose operands are variadic cannot swallow it.
|
|
112
|
+
* appended, so a verb whose operands are variadic cannot swallow it. A `--host`
|
|
113
|
+
* the caller already typed always wins — it is never overwritten (PHNX-4090).
|
|
110
114
|
*
|
|
111
115
|
* Pure, so the re-insertion is testable without spawning the engine.
|
|
112
116
|
*/
|
|
113
|
-
export function
|
|
114
|
-
if (!
|
|
117
|
+
export function withHostFlag(argv, host) {
|
|
118
|
+
if (!host)
|
|
119
|
+
return argv;
|
|
120
|
+
if (argv.some((arg) => arg === '--host' || arg.startsWith('--host=')))
|
|
115
121
|
return argv;
|
|
116
122
|
const [verb, ...rest] = argv;
|
|
117
|
-
return [verb, '--
|
|
123
|
+
return [verb, '--host', host, ...rest];
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Resolve `--device <name>` to the `--host <address>` the engine actually
|
|
127
|
+
* speaks (PHNX-4090). A device's `computer.host` config (`agents config set
|
|
128
|
+
* devices.<name>.computer.host <address>`) wins when set — `vnc://`/`tcp://`
|
|
129
|
+
* carries no ssh identity, `ssh://` still resolves one against the fleet. With
|
|
130
|
+
* no `computer.host`, fall back to the fleet's ssh identity exactly as before
|
|
131
|
+
* (Windows-only — the tunnel this repo has always provisioned).
|
|
132
|
+
*/
|
|
133
|
+
export async function resolveDeviceHost(device) {
|
|
134
|
+
const configured = getConfigValue('computer.host', { device }).value;
|
|
135
|
+
if (configured) {
|
|
136
|
+
const addr = parseAddress(configured);
|
|
137
|
+
if (addr.scheme === 'vnc' || addr.scheme === 'tcp') {
|
|
138
|
+
// No ssh identity involved — the transport is RFB or a raw helper socket.
|
|
139
|
+
return { host: configured, target: { alias: device, host: addr.host, user: addr.user ?? '', hostname: addr.host, platform: addr.scheme, sshArgs: [] } };
|
|
140
|
+
}
|
|
141
|
+
// The configured address IS the connection target — an ssh:// override
|
|
142
|
+
// naming a different host/user/port than the device registry must actually
|
|
143
|
+
// take effect, not be silently replaced by the registry's own resolution.
|
|
144
|
+
// Only the ssh identity (key file flags) comes from the fleet; the target
|
|
145
|
+
// string forwarded on --host and the one recorded on fd-3 must be the same
|
|
146
|
+
// `sshTarget(addr)` the engine itself derives from that same --host value,
|
|
147
|
+
// or the engine's own context-vs-argv match (`resolveContextDevice`) misses
|
|
148
|
+
// and silently drops the identity args instead of failing loud.
|
|
149
|
+
const resolved = await resolveRemoteDevice(device, {});
|
|
150
|
+
const target = sshTarget(addr);
|
|
151
|
+
return {
|
|
152
|
+
host: configured,
|
|
153
|
+
target: { alias: device, host: target, user: addr.user ?? resolved.user, hostname: addr.host, platform: resolved.device.platform, sshArgs: resolved.identityArgs },
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const resolved = await resolveRemoteDevice(device, {
|
|
157
|
+
expectPlatform: 'windows',
|
|
158
|
+
forWhat: '`agents computer --device` drives the Windows computer-helper daemon, so it',
|
|
159
|
+
});
|
|
160
|
+
return {
|
|
161
|
+
host: `ssh://${resolved.target}`,
|
|
162
|
+
target: { alias: device, host: resolved.target, user: resolved.user, hostname: resolved.host, platform: resolved.device.platform, sshArgs: resolved.identityArgs },
|
|
163
|
+
};
|
|
118
164
|
}
|
|
119
165
|
/**
|
|
120
166
|
* Forward one invocation to the engine and propagate its exit code.
|
|
@@ -123,7 +169,7 @@ export function withDeviceFlag(argv, device) {
|
|
|
123
169
|
* is the one the engine cannot: it prints the install line and exits 1. There is
|
|
124
170
|
* no fallback engine to reach for — that is the point of the extraction.
|
|
125
171
|
*/
|
|
126
|
-
|
|
172
|
+
async function forwardToComputer(opts) {
|
|
127
173
|
let bin;
|
|
128
174
|
try {
|
|
129
175
|
bin = resolveComputerBin();
|
|
@@ -136,10 +182,19 @@ export async function forwardToComputer(opts) {
|
|
|
136
182
|
throw err;
|
|
137
183
|
}
|
|
138
184
|
const hostFlag = opts.argv.findIndex(arg => arg === '--host' || arg.startsWith('--host='));
|
|
139
|
-
|
|
140
|
-
|
|
185
|
+
let host = hostFlag < 0 ? undefined : (opts.argv[hostFlag].includes('=') ? opts.argv[hostFlag].slice(7) : opts.argv[hostFlag + 1]);
|
|
186
|
+
let target;
|
|
187
|
+
// A device is resolved to --host here rather than forwarded as --device: the
|
|
188
|
+
// engine has no fleet registry of its own (PHNX-4090). An explicit --host on
|
|
189
|
+
// the command line always wins over --device, so this only runs without one.
|
|
190
|
+
if (!host && opts.device) {
|
|
191
|
+
const resolved = await resolveDeviceHost(opts.device);
|
|
192
|
+
host = resolved.host;
|
|
193
|
+
target = resolved.target;
|
|
194
|
+
}
|
|
195
|
+
const context = await buildComputerContext({ device: opts.device, host, target, computerBin: bin });
|
|
141
196
|
return runComputer({
|
|
142
|
-
argv:
|
|
197
|
+
argv: withHostFlag(opts.argv, host),
|
|
143
198
|
context,
|
|
144
199
|
capture: opts.capture,
|
|
145
200
|
onEvent: opts.record === false
|
|
@@ -224,7 +279,7 @@ export function registerComputerCommand(program) {
|
|
|
224
279
|
`,
|
|
225
280
|
});
|
|
226
281
|
}
|
|
227
|
-
|
|
282
|
+
function registerComputerSubcommands(program) {
|
|
228
283
|
registerSetupCommand(program);
|
|
229
284
|
registerStartCommand(program);
|
|
230
285
|
registerStopCommand(program);
|