@phnx-labs/agents-cli 1.22.46 → 1.22.49
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 +663 -0
- package/LICENSE +102 -182
- package/README.md +96 -49
- package/dist/bootstrap.js +4 -2
- package/dist/cli/command-registry.d.ts +2 -1
- package/dist/cli/command-registry.js +6 -2
- package/dist/commands/accounts.d.ts +58 -0
- package/dist/commands/accounts.js +243 -25
- package/dist/commands/artifacts.js +7 -6
- package/dist/commands/attach.js +1 -1
- package/dist/commands/auth.js +7 -5
- package/dist/commands/browser-sessions-picker.js +9 -7
- package/dist/commands/browser.js +711 -62
- package/dist/commands/config.d.ts +0 -1
- package/dist/commands/config.js +26 -24
- package/dist/commands/cost.d.ts +1 -1
- package/dist/commands/daemon.d.ts +21 -0
- package/dist/commands/daemon.js +147 -12
- package/dist/commands/detach.d.ts +13 -0
- package/dist/commands/detach.js +11 -8
- package/dist/commands/exec.js +107 -53
- package/dist/commands/feed-watch.d.ts +2 -0
- package/dist/commands/feed-watch.js +28 -0
- package/dist/commands/feed.js +27 -0
- package/dist/commands/feedback.js +3 -19
- package/dist/commands/focus.d.ts +14 -0
- package/dist/commands/focus.js +48 -5
- package/dist/commands/go.d.ts +3 -0
- package/dist/commands/go.js +16 -3
- package/dist/commands/insights.d.ts +1 -1
- package/dist/commands/insights.js +2 -2
- package/dist/commands/inspect.js +2 -2
- package/dist/commands/lease.d.ts +1 -1
- package/dist/commands/lease.js +7 -6
- package/dist/commands/mailboxes.js +4 -3
- package/dist/commands/menubar.js +11 -4
- package/dist/commands/projects.d.ts +16 -1
- package/dist/commands/projects.js +58 -64
- package/dist/commands/resume.js +1 -1
- package/dist/commands/route.js +4 -4
- package/dist/commands/routines.js +4 -3
- package/dist/commands/run-broadcast.d.ts +1 -1
- package/dist/commands/run-broadcast.js +1 -1
- package/dist/commands/sessions-picker-factory.d.ts +2 -1
- package/dist/commands/sessions-picker-factory.js +1 -1
- package/dist/commands/sessions-picker.d.ts +22 -0
- package/dist/commands/sessions-picker.js +48 -9
- package/dist/commands/sessions-stop.d.ts +24 -0
- package/dist/commands/sessions-stop.js +66 -0
- package/dist/commands/sessions-trace.d.ts +82 -0
- package/dist/commands/sessions-trace.js +387 -0
- package/dist/commands/sessions.js +5 -0
- package/dist/commands/setup-secrets.js +23 -0
- package/dist/commands/share.d.ts +20 -5
- package/dist/commands/share.js +152 -52
- package/dist/commands/ssh.d.ts +15 -0
- package/dist/commands/ssh.js +243 -18
- package/dist/commands/teams.js +34 -2
- package/dist/commands/traces.d.ts +2 -0
- package/dist/commands/traces.js +184 -0
- package/dist/commands/view.d.ts +2 -0
- package/dist/commands/view.js +32 -62
- package/dist/commands/watchdog.js +9 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/lib/account-capabilities.d.ts +4 -0
- package/dist/lib/account-capabilities.js +13 -9
- package/dist/lib/account-registry.d.ts +2 -0
- package/dist/lib/account-registry.js +30 -2
- package/dist/lib/accounting/rotate.d.ts +9 -0
- package/dist/lib/accounting/rotate.js +12 -2
- package/dist/lib/accounting/usage.d.ts +84 -6
- package/dist/lib/accounting/usage.js +293 -75
- package/dist/lib/agent-modes.js +29 -1
- package/dist/lib/agent-spec/agents.d.ts +4 -3
- package/dist/lib/agent-spec/agents.js +25 -15
- package/dist/lib/analytics/mix-commands.d.ts +1 -1
- package/dist/lib/analytics/mix-commands.js +2 -2
- package/dist/lib/auth-health.d.ts +13 -3
- package/dist/lib/auth-health.js +50 -8
- package/dist/lib/browser/devices.d.ts +19 -0
- package/dist/lib/browser/devices.js +23 -0
- package/dist/lib/browser/drivers/ssh.d.ts +16 -2
- package/dist/lib/browser/drivers/ssh.js +36 -9
- package/dist/lib/browser/ipc.d.ts +1 -1
- package/dist/lib/browser/ipc.js +40 -9
- package/dist/lib/browser/profiles.d.ts +104 -65
- package/dist/lib/browser/profiles.js +277 -165
- package/dist/lib/browser/registry.d.ts +39 -0
- package/dist/lib/browser/registry.js +149 -0
- package/dist/lib/browser/remote-control.d.ts +28 -2
- package/dist/lib/browser/remote-control.js +35 -3
- package/dist/lib/browser/resolve-target.d.ts +68 -0
- package/dist/lib/browser/resolve-target.js +250 -0
- package/dist/lib/browser/runtime-state.d.ts +44 -11
- package/dist/lib/browser/runtime-state.js +98 -15
- package/dist/lib/browser/service.d.ts +65 -9
- package/dist/lib/browser/service.js +196 -61
- package/dist/lib/browser/sessions-list.d.ts +1 -3
- package/dist/lib/browser/sessions-list.js +3 -16
- package/dist/lib/browser/task-index.d.ts +70 -0
- package/dist/lib/browser/task-index.js +180 -0
- package/dist/lib/browser/types.d.ts +12 -1
- package/dist/lib/byok-usage.js +2 -2
- package/dist/lib/claude-statusline.d.ts +29 -0
- package/dist/lib/claude-statusline.js +139 -0
- package/dist/lib/cloud/host.d.ts +1 -1
- package/dist/lib/cloud/host.js +1 -1
- package/dist/lib/cloud/rush.js +1 -1
- package/dist/lib/codex-policy.d.ts +11 -1
- package/dist/lib/codex-policy.js +20 -5
- package/dist/lib/computer/computer-rpc.js +2 -2
- package/dist/lib/computer/download.d.ts +15 -15
- package/dist/lib/computer/download.js +35 -98
- package/dist/lib/computer/ssh-tunnel.d.ts +0 -3
- package/dist/lib/computer/ssh-tunnel.js +12 -22
- package/dist/lib/config-keys.d.ts +6 -11
- package/dist/lib/config-keys.js +18 -19
- package/dist/lib/crabbox/cli.d.ts +1 -1
- package/dist/lib/crabbox/cli.js +2 -2
- package/dist/lib/crabbox/lease.d.ts +9 -0
- package/dist/lib/crabbox/lease.js +70 -15
- package/dist/lib/crabbox/runtimes.js +1 -1
- package/dist/lib/daemon/account-state-daemon-service.d.ts +16 -0
- package/dist/lib/daemon/account-state-daemon-service.js +26 -0
- package/dist/lib/daemon/browser-ipc-service.d.ts +20 -0
- package/dist/lib/daemon/browser-ipc-service.js +46 -0
- package/dist/lib/daemon/daemon.d.ts +3 -0
- package/dist/lib/daemon/daemon.js +212 -444
- package/dist/lib/daemon/device-probe-service.d.ts +26 -0
- package/dist/lib/daemon/device-probe-service.js +47 -0
- package/dist/lib/daemon/keychain-reap-service.d.ts +17 -0
- package/dist/lib/daemon/keychain-reap-service.js +32 -0
- package/dist/lib/daemon/monitor-engine-service.d.ts +22 -0
- package/dist/lib/daemon/monitor-engine-service.js +29 -0
- package/dist/lib/daemon/runner.js +15 -2
- package/dist/lib/daemon/secrets-broker-service.d.ts +20 -0
- package/dist/lib/daemon/secrets-broker-service.js +66 -0
- package/dist/lib/daemon/self-heal-service.d.ts +27 -0
- package/dist/lib/daemon/self-heal-service.js +48 -0
- package/dist/lib/daemon/service.d.ts +102 -0
- package/dist/lib/daemon/service.js +98 -0
- package/dist/lib/daemon/session-index-service.d.ts +22 -0
- package/dist/lib/daemon/session-index-service.js +40 -0
- package/dist/lib/daemon/state-dir-check-service.d.ts +43 -0
- package/dist/lib/daemon/state-dir-check-service.js +63 -0
- package/dist/lib/daemon/supervisor.d.ts +87 -0
- package/dist/lib/daemon/supervisor.js +298 -0
- package/dist/lib/daemon/watchdog-service.d.ts +19 -0
- package/dist/lib/daemon/watchdog-service.js +40 -0
- package/dist/lib/daemon-health.d.ts +15 -0
- package/dist/lib/daemon-health.js +29 -5
- package/dist/lib/daemon-services.d.ts +8 -1
- package/dist/lib/daemon-services.js +55 -0
- package/dist/lib/daemon-ticks.d.ts +13 -2
- package/dist/lib/daemon-ticks.js +22 -20
- package/dist/lib/device-config.d.ts +25 -10
- package/dist/lib/device-config.js +90 -39
- package/dist/lib/devices/config-migration.d.ts +7 -0
- package/dist/lib/devices/config-migration.js +67 -3
- package/dist/lib/devices/health.d.ts +27 -2
- package/dist/lib/devices/health.js +39 -9
- package/dist/lib/devices/interactive-host.d.ts +15 -0
- package/dist/lib/devices/interactive-host.js +53 -0
- package/dist/lib/devices/registry.d.ts +61 -4
- package/dist/lib/devices/registry.js +94 -38
- package/dist/lib/devices/stats-cache.d.ts +26 -0
- package/dist/lib/devices/stats-cache.js +59 -7
- package/dist/lib/devices/worker-pick.d.ts +48 -0
- package/dist/lib/devices/worker-pick.js +113 -0
- package/dist/lib/exec.d.ts +70 -14
- package/dist/lib/exec.js +110 -38
- package/dist/lib/feed/answer.d.ts +29 -0
- package/dist/lib/feed/answer.js +145 -0
- package/dist/lib/feed/attention.d.ts +83 -0
- package/dist/lib/feed/attention.js +0 -0
- package/dist/lib/feed/feed.d.ts +109 -0
- package/dist/lib/feed/feed.js +154 -3
- package/dist/lib/feed/pr-status.d.ts +14 -0
- package/dist/lib/feed/pr-status.js +47 -0
- package/dist/lib/feed/watch.d.ts +59 -0
- package/dist/lib/feed/watch.js +180 -0
- package/dist/lib/fleet/capture.js +6 -0
- package/dist/lib/fleet/remote-login.js +8 -3
- package/dist/lib/fleet/types.d.ts +17 -0
- package/dist/lib/harness/adapter.d.ts +11 -0
- package/dist/lib/harness/adapters/claude.js +38 -24
- package/dist/lib/harness/adapters/codex.js +2 -4
- package/dist/lib/harness/adapters/cursor.js +8 -11
- package/dist/lib/helper-download.d.ts +108 -0
- package/dist/lib/helper-download.js +194 -0
- package/dist/lib/helper-versions.d.ts +52 -0
- package/dist/lib/helper-versions.js +58 -0
- package/dist/lib/hooks/cache.js +19 -0
- package/dist/lib/hooks/install.js +2 -2
- package/dist/lib/hooks/match.d.ts +3 -0
- package/dist/lib/hooks/match.js +25 -0
- package/dist/lib/hosts/credentials.d.ts +1 -1
- package/dist/lib/hosts/credentials.js +1 -1
- package/dist/lib/hosts/dispatch.d.ts +7 -1
- package/dist/lib/hosts/dispatch.js +24 -5
- package/dist/lib/hosts/passthrough.d.ts +8 -15
- package/dist/lib/hosts/passthrough.js +35 -16
- package/dist/lib/hosts/providers/devices.d.ts +1 -1
- package/dist/lib/hosts/providers/devices.js +1 -1
- package/dist/lib/hosts/reconnect.d.ts +179 -21
- package/dist/lib/hosts/reconnect.js +266 -45
- package/dist/lib/hosts/registry.js +7 -0
- package/dist/lib/installations/migrate.d.ts +4 -5
- package/dist/lib/installations/migrate.js +6 -7
- package/dist/lib/installations/shims.d.ts +1 -1
- package/dist/lib/installations/shims.js +23 -13
- package/dist/lib/installations/versions.js +25 -2
- package/dist/lib/linear-autoclose.d.ts +1 -1
- package/dist/lib/linear-autoclose.js +1 -1
- package/dist/lib/loop.d.ts +2 -2
- package/dist/lib/loop.js +1 -1
- package/dist/lib/menubar/download-menubar.d.ts +47 -0
- package/dist/lib/menubar/download-menubar.js +60 -0
- package/dist/lib/menubar/install-menubar.d.ts +44 -7
- package/dist/lib/menubar/install-menubar.js +105 -23
- package/dist/lib/menubar/notify-desktop.d.ts +3 -3
- package/dist/lib/menubar/notify-desktop.js +6 -6
- package/dist/lib/model-tiers.d.ts +1 -1
- package/dist/lib/open-url.d.ts +60 -2
- package/dist/lib/open-url.js +167 -12
- package/dist/lib/project-probe.d.ts +1 -1
- package/dist/lib/project-probe.js +1 -1
- package/dist/lib/project-pull.d.ts +1 -1
- package/dist/lib/project-pull.js +2 -2
- package/dist/lib/projects.d.ts +1 -1
- package/dist/lib/projects.js +1 -1
- package/dist/lib/refresh-coordinator.d.ts +1 -1
- package/dist/lib/refresh-coordinator.js +1 -1
- package/dist/lib/sandbox.js +6 -7
- package/dist/lib/secrets/download-keychain.d.ts +47 -0
- package/dist/lib/secrets/download-keychain.js +70 -0
- package/dist/lib/secrets/install-helper.d.ts +20 -1
- package/dist/lib/secrets/install-helper.js +44 -3
- package/dist/lib/session/active.d.ts +67 -0
- package/dist/lib/session/active.js +86 -2
- package/dist/lib/session/db.d.ts +11 -1
- package/dist/lib/session/db.js +142 -8
- package/dist/lib/session/discover.d.ts +23 -1
- package/dist/lib/session/discover.js +44 -10
- package/dist/lib/session/highlights.d.ts +49 -1
- package/dist/lib/session/highlights.js +95 -0
- package/dist/lib/session/host-link.d.ts +16 -2
- package/dist/lib/session/host-link.js +7 -1
- package/dist/lib/session/parse.js +33 -1
- package/dist/lib/session/prompt.d.ts +35 -0
- package/dist/lib/session/prompt.js +56 -0
- package/dist/lib/session/remote/remote-list.d.ts +9 -0
- package/dist/lib/session/remote/remote-list.js +19 -2
- package/dist/lib/session/remote/watch.d.ts +1 -1
- package/dist/lib/session/remote/watch.js +17 -3
- package/dist/lib/session/render.js +7 -3
- package/dist/lib/session/session-cache.d.ts +53 -0
- package/dist/lib/session/session-cache.js +93 -1
- package/dist/lib/session/state.js +1 -1
- package/dist/lib/session/tool-calls.d.ts +2 -0
- package/dist/lib/session/tool-calls.js +1 -1
- package/dist/lib/session/trajectory-compare.d.ts +47 -0
- package/dist/lib/session/trajectory-compare.js +116 -0
- package/dist/lib/session/trajectory-html.d.ts +19 -0
- package/dist/lib/session/trajectory-html.js +770 -0
- package/dist/lib/session/trajectory-lineage.d.ts +92 -0
- package/dist/lib/session/trajectory-lineage.js +195 -0
- package/dist/lib/session/trajectory-text.d.ts +37 -0
- package/dist/lib/session/trajectory-text.js +284 -0
- package/dist/lib/session/trajectory.d.ts +102 -0
- package/dist/lib/session/trajectory.js +384 -0
- package/dist/lib/session/types.d.ts +15 -0
- package/dist/lib/sha256-asset.d.ts +26 -0
- package/dist/lib/sha256-asset.js +41 -0
- package/dist/lib/share/backend.d.ts +95 -0
- package/dist/lib/share/backend.js +139 -0
- package/dist/lib/share/delete.d.ts +6 -2
- package/dist/lib/share/delete.js +8 -9
- package/dist/lib/share/html.d.ts +22 -0
- package/dist/lib/share/html.js +88 -0
- package/dist/lib/share/provision.d.ts +18 -4
- package/dist/lib/share/provision.js +38 -4
- package/dist/lib/share/publish.d.ts +39 -15
- package/dist/lib/share/publish.js +55 -26
- package/dist/lib/share/worker-template.js +171 -11
- package/dist/lib/sqlite.js +16 -3
- package/dist/lib/ssh-exec.d.ts +65 -0
- package/dist/lib/ssh-exec.js +120 -4
- package/dist/lib/startup/command-registry.d.ts +3 -1
- package/dist/lib/startup/command-registry.js +6 -3
- package/dist/lib/startup/dev-build.js +3 -3
- package/dist/lib/state.d.ts +2 -2
- package/dist/lib/state.js +11 -5
- package/dist/lib/subagents-registry.js +1 -1
- package/dist/lib/teams/agents.js +9 -0
- package/dist/lib/terminal/index.d.ts +1 -1
- package/dist/lib/terminal/inject.d.ts +19 -0
- package/dist/lib/terminal/inject.js +19 -9
- package/dist/lib/terminal/types.d.ts +1 -1
- package/dist/lib/terminal/types.js +1 -1
- package/dist/lib/tmux/orphan-reap.js +1 -1
- package/dist/lib/tmux/session.d.ts +46 -13
- package/dist/lib/tmux/session.js +204 -27
- package/dist/lib/traces/backend.d.ts +29 -0
- package/dist/lib/traces/backend.js +46 -0
- package/dist/lib/traces/classify.d.ts +52 -0
- package/dist/lib/traces/classify.js +72 -0
- package/dist/lib/traces/config.d.ts +10 -0
- package/dist/lib/traces/config.js +2 -0
- package/dist/lib/traces/provision.d.ts +19 -0
- package/dist/lib/traces/provision.js +30 -0
- package/dist/lib/traces/sync.d.ts +150 -0
- package/dist/lib/traces/sync.js +447 -0
- package/dist/lib/traces/worker-template.d.ts +4 -0
- package/dist/lib/traces/worker-template.js +159 -0
- package/dist/lib/types.d.ts +34 -19
- package/dist/lib/types.js +14 -0
- package/dist/lib/usage-backoff.d.ts +2 -1
- package/dist/lib/usage-backoff.js +60 -19
- package/dist/lib/usage-refresh.d.ts +18 -4
- package/dist/lib/usage-refresh.js +68 -19
- package/dist/lib/watchdog/log.d.ts +1 -1
- package/dist/lib/watchdog/log.js +1 -1
- package/dist/lib/watchdog/runner.d.ts +36 -45
- package/dist/lib/watchdog/runner.js +150 -119
- package/dist/lib/watchdog/service.d.ts +0 -1
- package/dist/lib/watchdog/service.js +0 -1
- package/dist/lib/watchdog/watchdog-agent.d.ts +38 -0
- package/dist/lib/watchdog/watchdog-agent.js +59 -0
- package/dist/lib/watchdog/watchdog.d.ts +11 -2
- package/dist/lib/watchdog/watchdog.js +37 -104
- package/dist/lib/workflows.d.ts +1 -1
- package/package.json +5 -7
- package/dist/commands/usage.d.ts +0 -27
- package/dist/commands/usage.js +0 -96
- package/dist/lib/menubar/MenubarHelper.app/Contents/CodeResources +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/Info.plist +0 -24
- package/dist/lib/menubar/MenubarHelper.app/Contents/MacOS/MenubarHelper +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/Resources/AppIcon.icns +0 -0
- package/dist/lib/menubar/MenubarHelper.app/Contents/_CodeSignature/CodeResources +0 -128
- package/dist/lib/secrets/Agents CLI.app/Contents/CodeResources +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/Info.plist +0 -24
- package/dist/lib/secrets/Agents CLI.app/Contents/MacOS/Agents CLI +0 -0
- package/dist/lib/secrets/Agents CLI.app/Contents/_CodeSignature/CodeResources +0 -123
- package/dist/lib/secrets/Agents CLI.app/Contents/embedded.provisionprofile +0 -0
- package/dist/lib/usage-fleet.d.ts +0 -32
- package/dist/lib/usage-fleet.js +0 -125
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { BrowserProfile } from './types.js';
|
|
1
|
+
import type { BrowserProfile, ProfileName } from './types.js';
|
|
2
2
|
export type { BrowserProfile } from './types.js';
|
|
3
|
+
export { declaringDevices, profileKind, profileRegistry, type ProfileDeclaration, } from './registry.js';
|
|
3
4
|
/**
|
|
4
5
|
* Name of the profile `ensureDefaultBrowserProfile` auto-detects and pins.
|
|
5
6
|
*
|
|
@@ -25,17 +26,9 @@ export declare const LEGACY_DEFAULT_BROWSER_PROFILE_NAME = "default";
|
|
|
25
26
|
* wins, so no existing config breaks.
|
|
26
27
|
*/
|
|
27
28
|
export declare const DEFAULT_PROFILE_ALIAS = "default";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* - `fleet` — the synced `~/.agents/agents.yaml` (`browser`), visible on every box
|
|
32
|
-
*/
|
|
33
|
-
export type ProfileScope = 'local' | 'fleet';
|
|
34
|
-
/** A profile plus the store it actually lives in. */
|
|
35
|
-
export interface ScopedBrowserProfile {
|
|
36
|
-
profile: BrowserProfile;
|
|
37
|
-
scope: ProfileScope;
|
|
38
|
-
}
|
|
29
|
+
export type BrowserProfileWithDeclarations = BrowserProfile & {
|
|
30
|
+
devices: string[];
|
|
31
|
+
};
|
|
39
32
|
/**
|
|
40
33
|
* The device-local configured default profile name (set via
|
|
41
34
|
* `agents browser use`), or undefined when unset. When set, it
|
|
@@ -60,14 +53,8 @@ export declare function getProfileDownloadsDir(name: string): string;
|
|
|
60
53
|
* one-shot migration in migrate.ts folds old captures into here.
|
|
61
54
|
*/
|
|
62
55
|
export declare function getProfileSessionsDir(name: string, task: string): string;
|
|
63
|
-
export declare function listProfiles(): Promise<
|
|
64
|
-
|
|
65
|
-
* Every visible profile paired with the store it lives in. Same precedence as
|
|
66
|
-
* {@link listProfiles} — a machine-local entry wins a name collision, so a name
|
|
67
|
-
* present in both maps reports `local`, which is the copy that is actually used.
|
|
68
|
-
*/
|
|
69
|
-
export declare function listProfilesWithScope(): Promise<ScopedBrowserProfile[]>;
|
|
70
|
-
export declare function getProfile(name: string): Promise<BrowserProfile | null>;
|
|
56
|
+
export declare function listProfiles(): Promise<BrowserProfileWithDeclarations[]>;
|
|
57
|
+
export declare function getProfile(name: string): Promise<BrowserProfileWithDeclarations | null>;
|
|
71
58
|
/**
|
|
72
59
|
* True when `profile` can actually launch or attach on THIS machine.
|
|
73
60
|
*
|
|
@@ -79,26 +66,6 @@ export declare function getProfile(name: string): Promise<BrowserProfile | null>
|
|
|
79
66
|
* for the current machine.
|
|
80
67
|
*/
|
|
81
68
|
export declare function isProfileLaunchableHere(profile: BrowserProfile): boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Resolve the profile `agents browser start` uses when no `--profile` is given.
|
|
84
|
-
*
|
|
85
|
-
* Order: (1) the device-local configured default (`agents browser profiles
|
|
86
|
-
* set-default <name>`) when it names an existing profile that can launch here;
|
|
87
|
-
* (2) an existing `default` profile that can launch here; (3) auto-pick the
|
|
88
|
-
* first installed Chromium-family browser per the platform priority list in
|
|
89
|
-
* chrome.ts (macOS: chrome > brave > edge > chromium > comet > arc; Linux: chrome >
|
|
90
|
-
* chromium > brave > edge; Windows: edge > chrome > brave > comet) and pin a
|
|
91
|
-
* `default` profile to it. Throws an actionable error if none of those binaries
|
|
92
|
-
* are installed.
|
|
93
|
-
*
|
|
94
|
-
* "Can launch here" matters because `agents.yaml` syncs across the fleet: a
|
|
95
|
-
* `default` auto-created on macOS carries a `/Applications/...` binary path that
|
|
96
|
-
* doesn't exist on a Linux box. Rather than hand that broken profile back (the
|
|
97
|
-
* top browser roadblock — "Custom binary not found"), we re-detect and
|
|
98
|
-
* regenerate the `default` for this machine. A configured or existing default
|
|
99
|
-
* that no longer exists, or can't launch here, warns and falls through — never a
|
|
100
|
-
* hard fail.
|
|
101
|
-
*/
|
|
102
69
|
/**
|
|
103
70
|
* The auto-detected profile this machine already carries, under either name —
|
|
104
71
|
* the current `auto-chrome` or the `default` an older build wrote. Callers that
|
|
@@ -137,17 +104,36 @@ export declare function resolveProfileRef(ref?: string): Promise<string | undefi
|
|
|
137
104
|
* `start`'s resolver. Same order as {@link resolveProfileRef} for an explicit
|
|
138
105
|
* name, but the IMPLICIT path (no `--profile`, or the bare `default` alias with
|
|
139
106
|
* no profile of that name) goes through {@link ensureDefaultBrowserProfile} —
|
|
140
|
-
* which additionally verifies the resolved default can launch on THIS machine
|
|
141
|
-
*
|
|
107
|
+
* which additionally verifies the resolved default can launch on THIS machine.
|
|
108
|
+
* An undeclared configured default is an error. A declared default whose
|
|
109
|
+
* browser isn't installed here warns and falls through to auto-detect.
|
|
142
110
|
*
|
|
143
111
|
* `start` is the only command that launches a browser, so it is the only one
|
|
144
112
|
* that may do those things; routing a filter-only command through this would
|
|
145
113
|
* warn about, and rewrite, config the user never asked it to touch.
|
|
146
114
|
*
|
|
147
|
-
* Throws when
|
|
148
|
-
*
|
|
115
|
+
* Throws when the configured default is undeclared, or when no profile exists
|
|
116
|
+
* and no supported browser is installed.
|
|
149
117
|
*/
|
|
150
118
|
export declare function resolveProfileRefForStart(ref?: string): Promise<string>;
|
|
119
|
+
/**
|
|
120
|
+
* Resolve the profile a bare `agents browser start` uses.
|
|
121
|
+
*
|
|
122
|
+
* Order: (1) the device-local configured default (`agents browser use <name>`)
|
|
123
|
+
* when it names a profile that exists and can launch here; (2) an existing
|
|
124
|
+
* auto-detected profile that can launch here; (3) auto-pick the first installed
|
|
125
|
+
* Chromium-family browser and pin `auto-chrome` (or repair a stale legacy
|
|
126
|
+
* `default`) to it.
|
|
127
|
+
*
|
|
128
|
+
* Two failure modes at the configured-default step are not the same:
|
|
129
|
+
* - No device declares the name (including a leftover central `browser:`
|
|
130
|
+
* entry that was never claimed) → throw. Auto-creating `auto-chrome` would
|
|
131
|
+
* hand the agent a logged-out browser while `browser.profile` still names
|
|
132
|
+
* the credentialed one.
|
|
133
|
+
* - The name is declared, but its browser/binary is not installed HERE →
|
|
134
|
+
* warn and fall through. That is a missing binary on this box, not a
|
|
135
|
+
* missing identity; auto-detect is the existing repair.
|
|
136
|
+
*/
|
|
151
137
|
export declare function ensureDefaultBrowserProfile(): Promise<BrowserProfile>;
|
|
152
138
|
/**
|
|
153
139
|
* Compute the LOCAL port a profile will occupy at runtime:
|
|
@@ -168,26 +154,82 @@ export declare function effectiveLocalPort(profile: BrowserProfile): number | un
|
|
|
168
154
|
*/
|
|
169
155
|
export declare function findFreeProfilePort(): Promise<number>;
|
|
170
156
|
/**
|
|
171
|
-
*
|
|
172
|
-
* `{ fleet: true }` (the CLI's `--fleet`) to put it in the synced `agents.yaml`
|
|
173
|
-
* where every box will see it.
|
|
157
|
+
* Refuse a profile whose LOCAL port another profile already owns.
|
|
174
158
|
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
* every machine as junk that nothing cleaned up (`agents browser profiles prune`
|
|
180
|
-
* is the other half of that fix). Opting in with `--fleet` is for a profile that
|
|
181
|
-
* really is fleet config — a remote `ssh://` endpoint, or a named profile whose
|
|
182
|
-
* shape you want on every box.
|
|
159
|
+
* Every CDP/SSH profile ends up listening on (or tunneling to) the same LOCAL
|
|
160
|
+
* port number as the one configured in the endpoint URL — SSH profiles reuse
|
|
161
|
+
* `?port=N` locally, so we no longer scope by host. Two profiles that would
|
|
162
|
+
* need the same local port can't both run at the same time.
|
|
183
163
|
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
164
|
+
* `opts.ignore` is the profile's own name on an edit. Without it every edit
|
|
165
|
+
* collides with itself, since the stored copy still owns the port being kept.
|
|
186
166
|
*/
|
|
187
|
-
export declare function
|
|
188
|
-
|
|
189
|
-
}):
|
|
167
|
+
export declare function assertLocalPortFree(profile: BrowserProfile, opts?: {
|
|
168
|
+
ignore?: string;
|
|
169
|
+
}): void;
|
|
170
|
+
/** Declare a profile on this device. The same name may be declared by peers. */
|
|
171
|
+
export declare function createProfile(profile: BrowserProfile): Promise<void>;
|
|
190
172
|
export declare function updateProfile(profile: BrowserProfile): Promise<void>;
|
|
173
|
+
/** Fields an existing profile may be edited in place.
|
|
174
|
+
*
|
|
175
|
+
* Deliberately a SUBSET of {@link BrowserProfile}. `name` and `browser` are
|
|
176
|
+
* identity, not settings: both key the on-disk runtime dir
|
|
177
|
+
* ({@link getProfileRuntimeDir}) and any live `<name>@<endpoint>` connection, so
|
|
178
|
+
* changing either orphans the cached browser data. Delete and recreate instead.
|
|
179
|
+
*/
|
|
180
|
+
export type EditableProfileFields = Partial<Pick<BrowserProfile, 'description' | 'binary' | 'electron' | 'targetFilter' | 'endpoints' | 'chrome' | 'secrets' | 'viewport'>>;
|
|
181
|
+
export interface EditProfileResult {
|
|
182
|
+
profile: BrowserProfile;
|
|
183
|
+
devices: string[];
|
|
184
|
+
/** Field names that actually changed. Empty means the edit was a no-op. */
|
|
185
|
+
changed: string[];
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Merge `patch` onto the stored profile and persist it in the store it already
|
|
189
|
+
* lives in (see {@link updateProfile} for the scope rules).
|
|
190
|
+
*
|
|
191
|
+
* Runs {@link createProfile}'s validations against the MERGED record, not just
|
|
192
|
+
* the patched fields — a binary edit re-resolves the browser path, a
|
|
193
|
+
* targetFilter edit re-checks the electron gate, and the local-port scan runs
|
|
194
|
+
* with this profile excluded so an unchanged port is not a self-collision.
|
|
195
|
+
*/
|
|
196
|
+
export declare function editProfile(name: string, patch: EditableProfileFields): Promise<EditProfileResult>;
|
|
197
|
+
/**
|
|
198
|
+
* Throw if `name` cannot be used for a NEW profile.
|
|
199
|
+
*
|
|
200
|
+
* Shared by `profiles create` and {@link renameProfile} so the two cannot drift
|
|
201
|
+
* — the shape rule used to live inline in the command, which is how `rename`
|
|
202
|
+
* would have accepted a name `create` rejects.
|
|
203
|
+
*
|
|
204
|
+
* `default` is refused because it is the reserved ALIAS meaning "whatever
|
|
205
|
+
* profile this machine is configured to use" (RUSH-2709). A literal profile by
|
|
206
|
+
* that name makes `--profile default` mean two different things.
|
|
207
|
+
*/
|
|
208
|
+
export declare function assertRegistrableProfileName(name: string): void;
|
|
209
|
+
/**
|
|
210
|
+
* Rename a profile, taking its on-disk state with it.
|
|
211
|
+
*
|
|
212
|
+
* `editProfile` deliberately refuses a name change, and this is why: the name
|
|
213
|
+
* keys the runtime dir ({@link getProfileRuntimeDir}), every fork/endpoint dir
|
|
214
|
+
* derived from it, and the `browser.profile` pointer. Delete-and-recreate — the
|
|
215
|
+
* only route before this — silently abandons the browser's `--user-data-dir`,
|
|
216
|
+
* which is where a profile's logins live. On a real agent browser that is
|
|
217
|
+
* gigabytes of session state and every account it has ever signed into.
|
|
218
|
+
*
|
|
219
|
+
* Refuses when the profile is in use: moving a `--user-data-dir` out from under
|
|
220
|
+
* a running browser corrupts it.
|
|
221
|
+
*/
|
|
222
|
+
export declare function renameProfile(from: ProfileName, to: ProfileName): Promise<{
|
|
223
|
+
devices: string[];
|
|
224
|
+
movedDirs: string[];
|
|
225
|
+
repointedDefault: boolean;
|
|
226
|
+
repointedViewer: boolean;
|
|
227
|
+
/** Peers still pinning the OLD name, and which key each used. */
|
|
228
|
+
stalePins: Array<{
|
|
229
|
+
device: string;
|
|
230
|
+
key: 'browser.profile' | 'browser.viewer';
|
|
231
|
+
}>;
|
|
232
|
+
}>;
|
|
191
233
|
export declare function deleteProfile(name: string): Promise<void>;
|
|
192
234
|
/**
|
|
193
235
|
* Pad `text` to exactly `width` visible characters, truncating with an ellipsis
|
|
@@ -211,12 +253,9 @@ export declare function padColumn(text: string, width: number): string;
|
|
|
211
253
|
* a leading column, explained by a legend line — so the name column carries just
|
|
212
254
|
* the name and `default` in it always means the profile of that name.
|
|
213
255
|
*
|
|
214
|
-
*
|
|
215
|
-
* this machine only (`local`) or in the fleet-synced `agents.yaml` (`fleet`), so
|
|
216
|
-
* "why does this box have a profile I never made here?" is answerable at a
|
|
217
|
-
* glance.
|
|
256
|
+
* WHERE lists the devices whose own files declare the name.
|
|
218
257
|
*/
|
|
219
|
-
export declare function formatProfilesTable(rows:
|
|
258
|
+
export declare function formatProfilesTable(rows: BrowserProfileWithDeclarations[], configuredDefault?: string): string[];
|
|
220
259
|
/**
|
|
221
260
|
* Resolve a profile's endpoint presets into a normalized map regardless of
|
|
222
261
|
* whether the YAML uses the legacy `string[]` shape or the new map shape.
|