@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/dist/lib/redact.js
CHANGED
|
@@ -47,12 +47,103 @@ const SECRET_PATTERNS = [
|
|
|
47
47
|
[/(https?:\/\/)[^/\s:@]+:[^@\s/]+@/gi, '$1[REDACTED]@'],
|
|
48
48
|
[/\b([A-Z0-9_]*(?:TOKEN|KEY|SECRET|PASSWORD)[A-Z0-9_]*)=("[^"]*"|'[^']*'|\S+)/gi, '$1=[REDACTED]'],
|
|
49
49
|
];
|
|
50
|
-
const
|
|
51
|
-
|
|
50
|
+
const ESC = 0x1b;
|
|
51
|
+
const BEL = 0x07;
|
|
52
|
+
const CSI_8BIT = 0x9b;
|
|
53
|
+
const OSC_8BIT = 0x9d;
|
|
54
|
+
const ST_8BIT = 0x9c;
|
|
55
|
+
/** C0 controls (minus \t \n \r), DEL, and the C1 range. */
|
|
56
|
+
function isControlByte(c) {
|
|
57
|
+
return (c <= 0x08) || c === 0x0b || c === 0x0c || (c >= 0x0e && c <= 0x1f) || (c >= 0x7f && c <= 0x9f);
|
|
58
|
+
}
|
|
59
|
+
/** End (exclusive) of a CSI parameter/intermediate/final run starting at `i`, or `i` when unterminated. */
|
|
60
|
+
function csiEnd(text, i) {
|
|
61
|
+
let j = i;
|
|
62
|
+
while (j < text.length && text.charCodeAt(j) >= 0x30 && text.charCodeAt(j) <= 0x3f)
|
|
63
|
+
j++;
|
|
64
|
+
while (j < text.length && text.charCodeAt(j) >= 0x20 && text.charCodeAt(j) <= 0x2f)
|
|
65
|
+
j++;
|
|
66
|
+
if (j < text.length && text.charCodeAt(j) >= 0x40 && text.charCodeAt(j) <= 0x7e)
|
|
67
|
+
return j + 1;
|
|
68
|
+
return i;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Remove terminal control sequences from untrusted text before storage or display.
|
|
72
|
+
*
|
|
73
|
+
* A single forward scan, not a regex: an OSC lookup for its terminator (BEL or
|
|
74
|
+
* ESC-\) is the classic polynomial-backtracking shape, and untrusted text can be
|
|
75
|
+
* built to trigger it. Each character is visited a bounded number of times here.
|
|
76
|
+
*/
|
|
52
77
|
export function sanitizeForTerminal(text) {
|
|
53
78
|
if (!text)
|
|
54
79
|
return text;
|
|
55
|
-
|
|
80
|
+
let out = '';
|
|
81
|
+
let i = 0;
|
|
82
|
+
const n = text.length;
|
|
83
|
+
// Once an 8-bit OSC scan reaches the end without a terminator, no later one can find one either.
|
|
84
|
+
let noOsc8Terminator = false;
|
|
85
|
+
while (i < n) {
|
|
86
|
+
const c = text.charCodeAt(i);
|
|
87
|
+
if (c === ESC && i + 1 < n) {
|
|
88
|
+
const next = text.charCodeAt(i + 1);
|
|
89
|
+
if (next === 0x5d) {
|
|
90
|
+
// OSC: runs to BEL or ESC-\. Any other ESC aborts the sequence, so the
|
|
91
|
+
// scan never re-covers ground a later OSC start could claim.
|
|
92
|
+
let j = i + 2;
|
|
93
|
+
while (j < n && text.charCodeAt(j) !== BEL && text.charCodeAt(j) !== ESC)
|
|
94
|
+
j++;
|
|
95
|
+
if (j < n && text.charCodeAt(j) === BEL) {
|
|
96
|
+
i = j + 1;
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if (j + 1 < n && text.charCodeAt(j) === ESC && text.charCodeAt(j + 1) === 0x5c) {
|
|
100
|
+
i = j + 2;
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
i += 2;
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (next === 0x5b) {
|
|
107
|
+
const end = csiEnd(text, i + 2);
|
|
108
|
+
if (end > i + 2) {
|
|
109
|
+
i = end;
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
i += 2;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (next >= 0x40 && next <= 0x5f) {
|
|
116
|
+
i += 2;
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
i += 1;
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (c === OSC_8BIT && !noOsc8Terminator) {
|
|
123
|
+
let j = i + 1;
|
|
124
|
+
while (j < n && text.charCodeAt(j) !== BEL && text.charCodeAt(j) !== ST_8BIT)
|
|
125
|
+
j++;
|
|
126
|
+
if (j < n) {
|
|
127
|
+
i = j + 1;
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
noOsc8Terminator = true;
|
|
131
|
+
i += 1;
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (c === CSI_8BIT) {
|
|
135
|
+
const end = csiEnd(text, i + 1);
|
|
136
|
+
i = end > i + 1 ? end : i + 1;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
if (isControlByte(c)) {
|
|
140
|
+
i += 1;
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
out += text[i];
|
|
144
|
+
i += 1;
|
|
145
|
+
}
|
|
146
|
+
return out;
|
|
56
147
|
}
|
|
57
148
|
/** Env vars whose NAME marks their VALUE as a credential worth masking literally. */
|
|
58
149
|
const SECRET_ENV_NAME = /(?:TOKEN|KEY|SECRET|PASSWORD)/i;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function setRefreshLockRootForTest(root: string | null): string | null;
|
|
2
|
-
|
|
2
|
+
interface RefreshLeaseOptions<T> {
|
|
3
3
|
scope: string;
|
|
4
4
|
key: string;
|
|
5
5
|
/**
|
|
@@ -22,3 +22,4 @@ export interface RefreshLeaseOptions<T> {
|
|
|
22
22
|
* async provider request is in flight.
|
|
23
23
|
*/
|
|
24
24
|
export declare function withRefreshLease<T>(options: RefreshLeaseOptions<T>): Promise<T>;
|
|
25
|
+
export {};
|
package/dist/lib/refresh.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `agents repo refresh` alias.)
|
|
11
11
|
*/
|
|
12
12
|
import type { AgentId } from './types.js';
|
|
13
|
-
|
|
13
|
+
interface RefreshOptions {
|
|
14
14
|
/** Limit operations to a single agent (claude/codex/etc). Default: all installed. */
|
|
15
15
|
agentFilter?: AgentId;
|
|
16
16
|
/** Auto-sync everything and skip interactive prompts. */
|
|
@@ -37,7 +37,7 @@ export interface RefreshOptions {
|
|
|
37
37
|
* visible only on the interactive path — `agents sync --yes` and the
|
|
38
38
|
* `--device all` fan-out reported a clean sync (RUSH-2700).
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
interface RefreshResult {
|
|
41
41
|
/** User-facing sentences, one per refused resource, prefixed with the agent. */
|
|
42
42
|
declined: string[];
|
|
43
43
|
/**
|
|
@@ -51,3 +51,4 @@ export interface RefreshResult {
|
|
|
51
51
|
}>;
|
|
52
52
|
}
|
|
53
53
|
export declare function refresh(options?: RefreshOptions): Promise<RefreshResult>;
|
|
54
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface RemoteAgentsJsonOptions<T> {
|
|
2
2
|
args: string[];
|
|
3
3
|
noFanoutEnv: string;
|
|
4
4
|
hosts?: string[];
|
|
@@ -46,7 +46,7 @@ export interface RemoteAgentsJsonParseResult<T> {
|
|
|
46
46
|
items: T[];
|
|
47
47
|
valid: boolean;
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
interface RemoteAgentsJsonResult<T> {
|
|
50
50
|
items: T[];
|
|
51
51
|
deviceCount: number;
|
|
52
52
|
/** Devices that were dialed but answered with an error / no CLI / a timeout. */
|
|
@@ -96,3 +96,4 @@ export declare function captureBoundedStdout(child: CapturableChild, { timeoutMs
|
|
|
96
96
|
}>;
|
|
97
97
|
/** Query explicit hosts, or every registered online peer when hosts is omitted. */
|
|
98
98
|
export declare function gatherRemoteAgentsJson<T>(options: RemoteAgentsJsonOptions<T>, deps?: GatherRemoteAgentsJsonDeps): Promise<RemoteAgentsJsonResult<T>>;
|
|
99
|
+
export {};
|
|
@@ -2,8 +2,6 @@ import type { SecretsBackend } from './secrets-types.js';
|
|
|
2
2
|
import { type AgentId } from './types.js';
|
|
3
3
|
/** Legacy readable alias for `__claude__`. Not migrated in this track. */
|
|
4
4
|
export declare const AUTH_STORE_ALIAS = "auth";
|
|
5
|
-
/** The one reserved bundle name most callers actually need. */
|
|
6
|
-
export declare const AUTH_BUNDLE_NAME = "auth";
|
|
7
5
|
/**
|
|
8
6
|
* The reserved `auth` bundle holds per-account Claude setup-tokens for
|
|
9
7
|
* unattended usage/probe and MUST be file-backed (headless, fleet-shareable —
|
|
@@ -20,8 +20,6 @@ import { bundleExistsSync, bundleBackendSync, isSecretsClientError } from './sec
|
|
|
20
20
|
import { AGENT_IDS } from './types.js';
|
|
21
21
|
/** Legacy readable alias for `__claude__`. Not migrated in this track. */
|
|
22
22
|
export const AUTH_STORE_ALIAS = 'auth';
|
|
23
|
-
/** The one reserved bundle name most callers actually need. */
|
|
24
|
-
export const AUTH_BUNDLE_NAME = AUTH_STORE_ALIAS;
|
|
25
23
|
/**
|
|
26
24
|
* The reserved `auth` bundle holds per-account Claude setup-tokens for
|
|
27
25
|
* unattended usage/probe and MUST be file-backed (headless, fleet-shareable —
|
|
@@ -31,7 +29,7 @@ export const AUTH_BUNDLE_NAME = AUTH_STORE_ALIAS;
|
|
|
31
29
|
* loud instead of silently being ignored by usage/probe (SEC-GAP-3).
|
|
32
30
|
*/
|
|
33
31
|
export const AUTH_BUNDLE_BACKEND = 'file';
|
|
34
|
-
export const RESERVED_BUNDLE_NAMES = new Set([
|
|
32
|
+
export const RESERVED_BUNDLE_NAMES = new Set([AUTH_STORE_ALIAS]);
|
|
35
33
|
export function isReservedBundleName(name) {
|
|
36
34
|
return RESERVED_BUNDLE_NAMES.has(name.trim().toLowerCase());
|
|
37
35
|
}
|
|
@@ -108,13 +106,13 @@ function storableCredentialRefusal(kind, harness) {
|
|
|
108
106
|
export function inspectReservedAuthBundle() {
|
|
109
107
|
let exists;
|
|
110
108
|
try {
|
|
111
|
-
exists = bundleExistsSync(
|
|
109
|
+
exists = bundleExistsSync(AUTH_STORE_ALIAS);
|
|
112
110
|
}
|
|
113
111
|
catch {
|
|
114
112
|
return { exists: false, backend: null, ok: true };
|
|
115
113
|
}
|
|
116
114
|
if (!exists)
|
|
117
115
|
return { exists: false, backend: null, ok: true };
|
|
118
|
-
const backend = bundleBackendSync(
|
|
116
|
+
const backend = bundleBackendSync(AUTH_STORE_ALIAS);
|
|
119
117
|
return { exists: true, backend, ok: backend === AUTH_BUNDLE_BACKEND };
|
|
120
118
|
}
|
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
* between two independently-written trees is not reported as content drift. This
|
|
16
16
|
* mirrors the byte compare `diffCommands` / `diffRules` already apply per file.
|
|
17
17
|
*/
|
|
18
|
-
/** OS metadata / local tooling that is never synced into a version home. */
|
|
19
|
-
export declare const RESOURCE_CONTENT_IGNORE: Set<string>;
|
|
20
18
|
/** CRLF → LF and trim, so line-ending / trailing-newline skew is not drift. */
|
|
21
19
|
export declare function normalizeResourceContent(content: string): string;
|
|
22
20
|
/**
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import * as fs from 'fs';
|
|
19
19
|
import * as path from 'path';
|
|
20
20
|
/** OS metadata / local tooling that is never synced into a version home. */
|
|
21
|
-
|
|
21
|
+
const RESOURCE_CONTENT_IGNORE = new Set([
|
|
22
22
|
'.DS_Store',
|
|
23
23
|
'.git',
|
|
24
24
|
'.gitignore',
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Evaluation rule: union all inclusions, then subtract all exclusions.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
interface ParsedPattern {
|
|
15
15
|
negate: boolean;
|
|
16
16
|
source: string;
|
|
17
17
|
name: string;
|
|
@@ -39,3 +39,4 @@ export declare function expandPatterns(patterns: string[], available: Map<string
|
|
|
39
39
|
* @param includeProject Whether to append "project:*". False for hooks (security).
|
|
40
40
|
*/
|
|
41
41
|
export declare function defaultPatterns(extraAliases?: string[], includeProject?: boolean): string[];
|
|
42
|
+
export {};
|
|
@@ -7,20 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { ResourceProfilePreset } from './types.js';
|
|
9
9
|
export type ProfiledResourceKind = 'commands' | 'skills' | 'hooks' | 'subagents' | 'plugins' | 'workflows' | 'permissions' | 'mcp' | 'memory' | 'secrets';
|
|
10
|
-
|
|
11
|
-
export interface ActiveResourceProfile {
|
|
10
|
+
interface ActiveResourceProfile {
|
|
12
11
|
name: string;
|
|
13
12
|
preset: ResourceProfilePreset;
|
|
14
13
|
}
|
|
15
|
-
export declare function validateResourceProfileName(name: string): void;
|
|
16
|
-
export declare function listResourceProfileNames(): string[];
|
|
17
|
-
export declare function getResourceProfilePreset(name: string): ResourceProfilePreset | null;
|
|
18
|
-
export declare function getActiveResourceProfileName(): string | null;
|
|
19
14
|
export declare function getActiveResourceProfile(): ActiveResourceProfile | null;
|
|
20
15
|
export declare function upsertResourceProfilePreset(name: string, preset: ResourceProfilePreset): void;
|
|
21
16
|
export declare function setActiveResourceProfile(name: string | null): void;
|
|
22
|
-
export declare function patternedProfileKinds(): PatternedProfileKind[];
|
|
23
17
|
export declare function activeRulesPreset(): string | null;
|
|
24
18
|
export declare function filterNamesForActiveResourceProfile(kind: ProfiledResourceKind, names: string[], sourceMap?: Map<string, string>): string[];
|
|
25
19
|
export declare function isNameActiveInResourceProfile(kind: ProfiledResourceKind, name: string, source?: string): boolean;
|
|
26
|
-
export
|
|
20
|
+
export {};
|
|
@@ -8,29 +8,16 @@
|
|
|
8
8
|
import { readMeta, updateMeta } from './state.js';
|
|
9
9
|
import { brandProfileName } from './brand.js';
|
|
10
10
|
const PROFILE_NAME_PATTERN = /^[a-z0-9][a-z0-9-_]{0,48}$/i;
|
|
11
|
-
|
|
12
|
-
'commands',
|
|
13
|
-
'skills',
|
|
14
|
-
'hooks',
|
|
15
|
-
'subagents',
|
|
16
|
-
'plugins',
|
|
17
|
-
'workflows',
|
|
18
|
-
'permissions',
|
|
19
|
-
'mcp',
|
|
20
|
-
];
|
|
21
|
-
export function validateResourceProfileName(name) {
|
|
11
|
+
function validateResourceProfileName(name) {
|
|
22
12
|
if (!PROFILE_NAME_PATTERN.test(name)) {
|
|
23
13
|
throw new Error(`Invalid profile name '${name}'. Use letters, digits, dash, underscore (max 48 chars).`);
|
|
24
14
|
}
|
|
25
15
|
}
|
|
26
|
-
|
|
27
|
-
return Object.keys(readMeta().profiles?.presets ?? {}).sort((a, b) => a.localeCompare(b));
|
|
28
|
-
}
|
|
29
|
-
export function getResourceProfilePreset(name) {
|
|
16
|
+
function getResourceProfilePreset(name) {
|
|
30
17
|
validateResourceProfileName(name);
|
|
31
18
|
return readMeta().profiles?.presets?.[name] ?? null;
|
|
32
19
|
}
|
|
33
|
-
|
|
20
|
+
function getActiveResourceProfileName() {
|
|
34
21
|
// A white-label brand pins its own profile; when running under a brand
|
|
35
22
|
// (AGENTS_BRAND set) that preset wins over the global `profiles.active`, so
|
|
36
23
|
// every resource filter that keys off the active profile becomes brand-scoped.
|
|
@@ -75,9 +62,6 @@ export function setActiveResourceProfile(name) {
|
|
|
75
62
|
},
|
|
76
63
|
}));
|
|
77
64
|
}
|
|
78
|
-
export function patternedProfileKinds() {
|
|
79
|
-
return [...PATTERNED_KINDS];
|
|
80
|
-
}
|
|
81
65
|
function plainPatternMatches(pattern, name) {
|
|
82
66
|
if (pattern === '*')
|
|
83
67
|
return true;
|
|
@@ -146,11 +130,3 @@ export function isNameActiveInResourceProfile(kind, name, source) {
|
|
|
146
130
|
const sourceMap = source ? new Map([[name, source]]) : undefined;
|
|
147
131
|
return filterNamesForActiveResourceProfile(kind, [name], sourceMap).includes(name);
|
|
148
132
|
}
|
|
149
|
-
export function assertNameActiveInResourceProfile(kind, name) {
|
|
150
|
-
const active = getActiveResourceProfile();
|
|
151
|
-
if (!active)
|
|
152
|
-
return;
|
|
153
|
-
if (isNameActiveInResourceProfile(kind, name))
|
|
154
|
-
return;
|
|
155
|
-
throw new Error(`${kind === 'secrets' ? 'Secrets bundle' : 'Resource'} '${name}' is not active in profile '${active.name}'.`);
|
|
156
|
-
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Resolution order (docs/07-entrypoints): project > user > plugin > extra > system.
|
|
7
7
|
*/
|
|
8
8
|
import type { AgentId, ResolvedItem, ResourceHandler } from './types.js';
|
|
9
|
-
|
|
9
|
+
interface WorkflowItem {
|
|
10
10
|
name: string;
|
|
11
11
|
description: string;
|
|
12
12
|
model?: string;
|
package/dist/lib/resources.d.ts
CHANGED
|
@@ -43,12 +43,6 @@ export interface ResolvedResource {
|
|
|
43
43
|
*/
|
|
44
44
|
readonly aliases: string[] | undefined;
|
|
45
45
|
}
|
|
46
|
-
/**
|
|
47
|
-
* The declared frontmatter `aliases:` of a single resource, or `[]` for a kind
|
|
48
|
-
* that doesn't support aliases. Only `skills` (SKILL.md) and `commands` carry
|
|
49
|
-
* them today. `resourcePath` is the skill directory or the command file.
|
|
50
|
-
*/
|
|
51
|
-
export declare function resourceAliases(kind: ResourceKind, resourcePath: string): string[];
|
|
52
46
|
/**
|
|
53
47
|
* True when `rawName` (a filename with its extension already stripped) names a
|
|
54
48
|
* directory doc rather than a resource of `kind`. Exported so every enumerator
|
|
@@ -84,13 +78,13 @@ export interface SkillResourceEntry extends ResourceEntry {
|
|
|
84
78
|
ruleCount?: number;
|
|
85
79
|
}
|
|
86
80
|
/** An MCP server resource entry. */
|
|
87
|
-
|
|
81
|
+
interface McpResourceEntry {
|
|
88
82
|
name: string;
|
|
89
83
|
scope: 'user' | 'project';
|
|
90
84
|
version?: string;
|
|
91
85
|
}
|
|
92
86
|
/** All resources installed for a specific agent. */
|
|
93
|
-
|
|
87
|
+
interface AgentResources {
|
|
94
88
|
agentId: AgentId;
|
|
95
89
|
commands: ResourceEntry[];
|
|
96
90
|
skills: SkillResourceEntry[];
|
|
@@ -101,7 +95,7 @@ export interface AgentResources {
|
|
|
101
95
|
workflows: ResourceEntry[];
|
|
102
96
|
}
|
|
103
97
|
/** Options for resource discovery. */
|
|
104
|
-
|
|
98
|
+
interface GetAgentResourcesOptions {
|
|
105
99
|
cwd?: string;
|
|
106
100
|
scope?: 'user' | 'project' | 'all';
|
|
107
101
|
/** For MCP scanning - whether the CLI is installed */
|
|
@@ -114,3 +108,4 @@ export interface GetAgentResourcesOptions {
|
|
|
114
108
|
* This is the source of truth - not the tracking data in agents.yaml.
|
|
115
109
|
*/
|
|
116
110
|
export declare function getAgentResources(agentId: AgentId, options?: GetAgentResourcesOptions): AgentResources;
|
|
111
|
+
export {};
|
package/dist/lib/resources.js
CHANGED
|
@@ -21,7 +21,7 @@ import { resolveSnapshotSha } from './git.js';
|
|
|
21
21
|
* that doesn't support aliases. Only `skills` (SKILL.md) and `commands` carry
|
|
22
22
|
* them today. `resourcePath` is the skill directory or the command file.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
function resourceAliases(kind, resourcePath) {
|
|
25
25
|
if (kind === 'skills')
|
|
26
26
|
return parseSkillMetadata(resourcePath)?.aliases ?? [];
|
|
27
27
|
if (kind === 'commands')
|
|
@@ -100,10 +100,6 @@ export interface ResolvedExecutionContext {
|
|
|
100
100
|
/** Present when `ready` is false. */
|
|
101
101
|
readiness?: RoutineReadiness;
|
|
102
102
|
}
|
|
103
|
-
/** Expand a leading `~`/`$HOME` against the target home; pass other values through. */
|
|
104
|
-
export declare function expandTargetHome(home: string, p: string): string;
|
|
105
|
-
/** Rewrite an absolute path under the target home to its portable `~/…` form; pass others through. */
|
|
106
|
-
export declare function toTargetPortable(home: string, abs: string): string;
|
|
107
103
|
/**
|
|
108
104
|
* True for a bare relative path (not absolute, not home-anchored) ON THE TARGET.
|
|
109
105
|
*
|
|
@@ -121,7 +117,7 @@ export declare function isBareRelative(home: string, p: string): boolean;
|
|
|
121
117
|
*/
|
|
122
118
|
export declare function resolveRoutineExecutionContext(input: ExecutionContextInput): ResolvedExecutionContext;
|
|
123
119
|
/** Injected harness/target probes for {@link evaluateRoutineReadiness}. */
|
|
124
|
-
|
|
120
|
+
interface HarnessReadinessProbes {
|
|
125
121
|
/** Is the resolved agent+version installed on the target? */
|
|
126
122
|
agentInstalled?(): boolean;
|
|
127
123
|
/** Is the absolute execution dir a trusted Codex workspace? (Codex agent only.) */
|
|
@@ -150,3 +146,4 @@ export declare function evaluateRoutineReadiness(context: ResolvedExecutionConte
|
|
|
150
146
|
agent?: string;
|
|
151
147
|
version?: string;
|
|
152
148
|
}): RoutineReadinessResult;
|
|
149
|
+
export {};
|
|
@@ -50,7 +50,7 @@ function targetPath(home) {
|
|
|
50
50
|
return /^[A-Za-z]:[\\/]/.test(home) || home.includes('\\') ? path.win32 : path.posix;
|
|
51
51
|
}
|
|
52
52
|
/** Expand a leading `~`/`$HOME` against the target home; pass other values through. */
|
|
53
|
-
|
|
53
|
+
function expandTargetHome(home, p) {
|
|
54
54
|
if (p === '~' || p === '$HOME')
|
|
55
55
|
return home;
|
|
56
56
|
const tp = targetPath(home);
|
|
@@ -61,7 +61,7 @@ export function expandTargetHome(home, p) {
|
|
|
61
61
|
return p;
|
|
62
62
|
}
|
|
63
63
|
/** Rewrite an absolute path under the target home to its portable `~/…` form; pass others through. */
|
|
64
|
-
|
|
64
|
+
function toTargetPortable(home, abs) {
|
|
65
65
|
const tp = targetPath(home);
|
|
66
66
|
const rel = tp.relative(home, abs);
|
|
67
67
|
if (rel === '')
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* The desktop lifecycle notifications (routine-notify.ts) never leave the
|
|
5
5
|
* machine, so a failed scheduled routine on a headless fleet box was invisible
|
|
6
6
|
* until someone happened to look. The per-routine prompt pattern (a prompt that
|
|
7
|
-
* ends by shelling `agents
|
|
7
|
+
* ends by shelling `agents send --to owner`) does not close the gap either: when the
|
|
8
8
|
* routine's OWN agent fails to spawn (`auth_failed`) that prompt never runs, so
|
|
9
9
|
* the one failure most worth surfacing is the one that goes unheard.
|
|
10
10
|
*
|
|
11
11
|
* So the DAEMON delivers on failure, from the SAME owner channel stack `agents
|
|
12
|
-
*
|
|
12
|
+
* send --to owner` uses (humans.yaml owner channels, or the legacy `notify.owner`),
|
|
13
13
|
* calling the channel providers IN-PROCESS — no shelling out to `ssh mac-mini
|
|
14
|
-
* agents
|
|
14
|
+
* agents send --to owner`. When the primary owner channel cannot deliver from this box it
|
|
15
15
|
* walks the remaining configured owner channels as fallbacks (OpenClaw, a second
|
|
16
16
|
* channel, …). Telegram is never used.
|
|
17
17
|
*
|
|
@@ -45,13 +45,13 @@ export declare function routineFinishOwnerText(meta: Pick<RunMeta, 'jobName' | '
|
|
|
45
45
|
*/
|
|
46
46
|
export declare function routineStartFailedOwnerText(config: Pick<JobConfig, 'name' | 'agent' | 'workflow' | 'command'>, error: string, host: string): string;
|
|
47
47
|
/** One resolved owner destination to attempt, in plan order. */
|
|
48
|
-
|
|
48
|
+
interface OwnerDest {
|
|
49
49
|
channel: string;
|
|
50
50
|
to: string;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Ordered owner delivery plan for a failure ping: the primary owner destination
|
|
54
|
-
* (the same one `agents
|
|
54
|
+
* (the same one `agents send --to owner` resolves) first, then every other configured
|
|
55
55
|
* owner channel as a fallback. Deduped by (channel, to). Telegram channels and
|
|
56
56
|
* intrusive channels (a voice call is too much for a routine failure) are
|
|
57
57
|
* excluded entirely — so an owner whose ONLY channel is Telegram gets an empty
|
|
@@ -63,12 +63,12 @@ export interface OwnerDest {
|
|
|
63
63
|
*/
|
|
64
64
|
export declare function ownerFailureDeliveryPlan(meta: Meta): OwnerDest[];
|
|
65
65
|
/** Outcome of one delivery attempt, for logging/telemetry. */
|
|
66
|
-
|
|
66
|
+
interface OwnerDeliveryAttempt {
|
|
67
67
|
channel: string;
|
|
68
68
|
ok: boolean;
|
|
69
69
|
error?: string;
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
interface OwnerDeliveryResult {
|
|
72
72
|
/** True once any channel in the plan accepted the message. */
|
|
73
73
|
delivered: boolean;
|
|
74
74
|
/** The channel that delivered, when `delivered`. */
|
|
@@ -100,3 +100,4 @@ export declare function notifyOwnerRoutineFinish(meta: RunMeta): Promise<OwnerDe
|
|
|
100
100
|
* distinct failure the owner should hear about. Best-effort.
|
|
101
101
|
*/
|
|
102
102
|
export declare function notifyOwnerRoutineStartFailed(config: JobConfig, error: string): Promise<OwnerDeliveryResult>;
|
|
103
|
+
export {};
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* The desktop lifecycle notifications (routine-notify.ts) never leave the
|
|
5
5
|
* machine, so a failed scheduled routine on a headless fleet box was invisible
|
|
6
6
|
* until someone happened to look. The per-routine prompt pattern (a prompt that
|
|
7
|
-
* ends by shelling `agents
|
|
7
|
+
* ends by shelling `agents send --to owner`) does not close the gap either: when the
|
|
8
8
|
* routine's OWN agent fails to spawn (`auth_failed`) that prompt never runs, so
|
|
9
9
|
* the one failure most worth surfacing is the one that goes unheard.
|
|
10
10
|
*
|
|
11
11
|
* So the DAEMON delivers on failure, from the SAME owner channel stack `agents
|
|
12
|
-
*
|
|
12
|
+
* send --to owner` uses (humans.yaml owner channels, or the legacy `notify.owner`),
|
|
13
13
|
* calling the channel providers IN-PROCESS — no shelling out to `ssh mac-mini
|
|
14
|
-
* agents
|
|
14
|
+
* agents send --to owner`. When the primary owner channel cannot deliver from this box it
|
|
15
15
|
* walks the remaining configured owner channels as fallbacks (OpenClaw, a second
|
|
16
16
|
* channel, …). Telegram is never used.
|
|
17
17
|
*
|
|
@@ -92,7 +92,7 @@ function isTelegramChannel(channelId, meta, humansTransport) {
|
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* Ordered owner delivery plan for a failure ping: the primary owner destination
|
|
95
|
-
* (the same one `agents
|
|
95
|
+
* (the same one `agents send --to owner` resolves) first, then every other configured
|
|
96
96
|
* owner channel as a fallback. Deduped by (channel, to). Telegram channels and
|
|
97
97
|
* intrusive channels (a voice call is too much for a routine failure) are
|
|
98
98
|
* excluded entirely — so an owner whose ONLY channel is Telegram gets an empty
|
|
@@ -123,7 +123,7 @@ export function ownerFailureDeliveryPlan(meta) {
|
|
|
123
123
|
seen.add(key);
|
|
124
124
|
plan.push({ channel: c, to: t });
|
|
125
125
|
};
|
|
126
|
-
// Primary = the destination `agents
|
|
126
|
+
// Primary = the destination `agents send --to owner` would resolve (humans policy →
|
|
127
127
|
// first addressable → legacy notify.owner). Same filters as the fallbacks.
|
|
128
128
|
const primary = readOwnerDest(meta);
|
|
129
129
|
if (primary)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RunMeta } from './scheduling/routines.js';
|
|
2
|
-
|
|
2
|
+
interface RoutineProcessCleanupOptions {
|
|
3
3
|
runsDir?: string;
|
|
4
4
|
alive?: (pid: number) => boolean;
|
|
5
5
|
owns?: (meta: RunMeta) => Promise<boolean> | boolean;
|
|
@@ -7,3 +7,4 @@ export interface RoutineProcessCleanupOptions {
|
|
|
7
7
|
}
|
|
8
8
|
/** Reap process groups whose durable run record is already terminal. */
|
|
9
9
|
export declare function reapTerminalRoutineProcesses(opts?: RoutineProcessCleanupOptions): Promise<number[]>;
|
|
10
|
+
export {};
|
|
@@ -34,8 +34,6 @@ export declare function fireTimeAuthReadiness(agent: string, version: string): R
|
|
|
34
34
|
export declare function evaluateActivationReadiness(config: JobConfig, deps?: {
|
|
35
35
|
probeAgent?: (agent: string) => boolean;
|
|
36
36
|
}): RoutineReadinessResult;
|
|
37
|
-
/** One-line human summary of a blocked readiness result, with its repair. */
|
|
38
|
-
export declare function formatReadinessBlocker(result: RoutineReadinessResult): string;
|
|
39
37
|
interface RemoteProjectDefinition {
|
|
40
38
|
name: string;
|
|
41
39
|
root?: string;
|
|
@@ -93,13 +93,6 @@ export function evaluateActivationReadiness(config, deps = {}) {
|
|
|
93
93
|
: undefined,
|
|
94
94
|
}, { agent: config.agent, version: pinnedLocally });
|
|
95
95
|
}
|
|
96
|
-
/** One-line human summary of a blocked readiness result, with its repair. */
|
|
97
|
-
export function formatReadinessBlocker(result) {
|
|
98
|
-
if (result.ready || !result.readiness)
|
|
99
|
-
return 'ready';
|
|
100
|
-
const { code, message, repair } = result.readiness;
|
|
101
|
-
return `${code}: ${message}${repair ? `\n repair: ${repair}` : ''}`;
|
|
102
|
-
}
|
|
103
96
|
/** Parse the target HOME sentinel and the project catalog returned by one SSH call. */
|
|
104
97
|
export function parseRemoteProjectSnapshot(stdout) {
|
|
105
98
|
const lines = stdout.split(/\r?\n/);
|
|
@@ -12,21 +12,19 @@
|
|
|
12
12
|
* `list` shows them as disabled. `syncProjectRoutines` refreshes materialised
|
|
13
13
|
* copies from their source YAML (also invoked on daemon SIGHUP).
|
|
14
14
|
*/
|
|
15
|
-
import { type JobConfig
|
|
15
|
+
import { type JobConfig } from './scheduling/routines.js';
|
|
16
16
|
/** Expand `~/…` and resolve to an absolute path. */
|
|
17
17
|
export declare function expandProjectPath(p: string): string;
|
|
18
18
|
/** Store paths home-relative when under $HOME so they travel across machines. */
|
|
19
19
|
export declare function displayProjectPath(abs: string): string;
|
|
20
20
|
/** Resolve the project root (parent of `.agents/`) from a cwd, or null. */
|
|
21
21
|
export declare function resolveProjectRoot(cwd?: string): string | null;
|
|
22
|
-
/** Git provenance for a project root (best-effort; never throws). */
|
|
23
|
-
export declare function readProjectGitSource(projectRoot: string): Pick<JobSource, 'repo' | 'branch' | 'commit'>;
|
|
24
22
|
/** List project routine YAML files (name + absolute path). */
|
|
25
23
|
export declare function listProjectRoutineFiles(projectRoot: string): Array<{
|
|
26
24
|
name: string;
|
|
27
25
|
path: string;
|
|
28
26
|
}>;
|
|
29
|
-
|
|
27
|
+
interface SyncProjectResult {
|
|
30
28
|
projectRoot: string;
|
|
31
29
|
synced: string[];
|
|
32
30
|
skipped: Array<{
|
|
@@ -105,3 +103,4 @@ export declare function materialiseProjectRoutine(projectRoot: string, name: str
|
|
|
105
103
|
} | {
|
|
106
104
|
error: string;
|
|
107
105
|
};
|
|
106
|
+
export {};
|
|
@@ -49,7 +49,7 @@ export function resolveProjectRoot(cwd = process.cwd()) {
|
|
|
49
49
|
return path.dirname(agentsDir);
|
|
50
50
|
}
|
|
51
51
|
/** Git provenance for a project root (best-effort; never throws). */
|
|
52
|
-
|
|
52
|
+
function readProjectGitSource(projectRoot) {
|
|
53
53
|
const abs = expandProjectPath(projectRoot);
|
|
54
54
|
const out = {};
|
|
55
55
|
try {
|
|
@@ -16,18 +16,8 @@ import { type RulesLayer } from './compose.js';
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const COMPILED_HEADER: string;
|
|
18
18
|
export declare const COMPILED_HEADER_PROJECT: string;
|
|
19
|
-
/** Sidecar manifest recording source file hashes for staleness detection. */
|
|
20
|
-
export interface CompileManifest {
|
|
21
|
-
compiledAt: string;
|
|
22
|
-
sources: {
|
|
23
|
-
path: string;
|
|
24
|
-
sha256: string;
|
|
25
|
-
mtime?: number;
|
|
26
|
-
size?: number;
|
|
27
|
-
}[];
|
|
28
|
-
}
|
|
29
19
|
/** Result of resolving @-imports in a rules file. */
|
|
30
|
-
|
|
20
|
+
interface ResolveResult {
|
|
31
21
|
/** Fully-inlined content. */
|
|
32
22
|
content: string;
|
|
33
23
|
/** Absolute paths of every file read during resolution (including the root). */
|
|
@@ -55,26 +45,13 @@ export declare function supportsRulesImports(agentId: AgentId): boolean;
|
|
|
55
45
|
* nothing to compile.
|
|
56
46
|
*/
|
|
57
47
|
export declare function isRulesStale(agentId: AgentId, version: string): boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Resolve the source `rules/AGENTS.md` (with all @-imports expanded) and
|
|
60
|
-
* write the result into the version home, alongside a sidecar manifest that
|
|
61
|
-
* records source file hashes for staleness detection.
|
|
62
|
-
*
|
|
63
|
-
* Agents that natively resolve @-imports are skipped (no-op) — their sync
|
|
64
|
-
* uses the standard copyFileSync path in `syncResourcesToVersion`.
|
|
65
|
-
*/
|
|
66
|
-
export declare function compileRulesForAgent(agentId: AgentId, version: string): {
|
|
67
|
-
compiled: boolean;
|
|
68
|
-
compiledPath: string;
|
|
69
|
-
sources: number;
|
|
70
|
-
};
|
|
71
48
|
/**
|
|
72
49
|
* Recompile rules if stale. Safe to call on every agent invocation — the
|
|
73
50
|
* staleness check is fast (sha256 of 8-10 small files, ~10-20ms). Returns
|
|
74
51
|
* true if a recompile happened, false otherwise.
|
|
75
52
|
*/
|
|
76
53
|
export declare function ensureRulesFresh(agentId: AgentId, version: string): boolean;
|
|
77
|
-
|
|
54
|
+
interface ProjectCompileResult {
|
|
78
55
|
/** True when cwd/AGENTS.md was newly written or rewritten. */
|
|
79
56
|
compiled: boolean;
|
|
80
57
|
/** Absolute path to cwd/AGENTS.md. Empty when no project rules dir was present. */
|
|
@@ -110,3 +87,4 @@ export declare function compileRulesForProject(cwd: string, opts?: {
|
|
|
110
87
|
preset?: string;
|
|
111
88
|
layers?: RulesLayer[];
|
|
112
89
|
}): ProjectCompileResult;
|
|
90
|
+
export {};
|