@phnx-labs/agents-cli 1.22.103 → 1.22.105
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 +39 -0
- package/README.md +1 -1
- package/dist/commands/accounts.js +2 -2
- package/dist/commands/computer.d.ts +100 -79
- package/dist/commands/computer.js +290 -830
- package/dist/commands/run-device-picker.d.ts +58 -0
- package/dist/commands/run-device-picker.js +222 -0
- package/dist/commands/setup-computer.js +20 -1
- package/dist/commands/setup-secrets.d.ts +2 -2
- package/dist/commands/setup-secrets.js +1 -1
- package/dist/commands/view.js +4 -6
- package/dist/lib/account-catalog.d.ts +22 -1
- package/dist/lib/account-catalog.js +72 -38
- package/dist/lib/accounting/usage.js +18 -14
- package/dist/lib/agent-spec/agents.d.ts +1 -0
- package/dist/lib/agent-spec/agents.js +1 -1
- package/dist/lib/browser/drivers/ssh.js +1 -1
- package/dist/lib/computer/context.d.ts +83 -0
- package/dist/lib/computer/context.js +91 -0
- package/dist/lib/computer/policy.d.ts +46 -0
- package/dist/lib/computer/policy.js +160 -0
- package/dist/lib/computer/record.d.ts +38 -0
- package/dist/lib/computer/record.js +86 -0
- package/dist/lib/computer/sessions-list.js +6 -6
- package/dist/lib/computer-client.d.ts +150 -0
- package/dist/lib/computer-client.js +222 -0
- package/dist/lib/exec.js +35 -1
- package/dist/lib/harness/adapters/claude.d.ts +37 -0
- package/dist/lib/harness/adapters/claude.js +69 -0
- package/dist/lib/helper-download.d.ts +1 -1
- package/dist/lib/helper-download.js +1 -1
- package/dist/lib/helper-versions.d.ts +9 -4
- package/dist/lib/helper-versions.js +8 -8
- package/dist/lib/installations/shims.js +8 -4
- package/dist/lib/menubar/download-menubar.d.ts +2 -1
- package/dist/lib/menubar/download-menubar.js +2 -1
- package/dist/lib/secrets-client.d.ts +3 -3
- package/dist/lib/secrets-client.js +15 -38
- package/dist/lib/session/db.js +1 -1
- package/dist/lib/sha256-asset.d.ts +2 -1
- package/dist/lib/sha256-asset.js +2 -1
- package/dist/lib/ssh-tunnel.d.ts +61 -0
- package/dist/lib/ssh-tunnel.js +105 -0
- package/dist/lib/summarizer/summarize.d.ts +2 -2
- package/dist/lib/summarizer/summarize.js +10 -3
- package/package.json +2 -3
- package/dist/commands/computer-actions.d.ts +0 -55
- package/dist/commands/computer-actions.js +0 -594
- package/dist/computer.d.ts +0 -2
- package/dist/computer.js +0 -7
- package/dist/lib/computer/actions.d.ts +0 -36
- package/dist/lib/computer/actions.js +0 -162
- package/dist/lib/computer/computer-rpc.d.ts +0 -39
- package/dist/lib/computer/computer-rpc.js +0 -447
- package/dist/lib/computer/des.d.ts +0 -1
- package/dist/lib/computer/des.js +0 -114
- package/dist/lib/computer/dispatch.d.ts +0 -10
- package/dist/lib/computer/dispatch.js +0 -133
- package/dist/lib/computer/download.d.ts +0 -54
- package/dist/lib/computer/download.js +0 -83
- package/dist/lib/computer/loop.d.ts +0 -62
- package/dist/lib/computer/loop.js +0 -98
- package/dist/lib/computer/model.d.ts +0 -44
- package/dist/lib/computer/model.js +0 -157
- package/dist/lib/computer/rfb-client.d.ts +0 -53
- package/dist/lib/computer/rfb-client.js +0 -562
- package/dist/lib/computer/ssh-tunnel.d.ts +0 -189
- package/dist/lib/computer/ssh-tunnel.js +0 -584
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.22.105
|
|
4
|
+
|
|
5
|
+
- Computer setup installs standalone Computer CLI 0.1.2, whose application code is obfuscated before compilation to increase inspection effort. Agents continues to provide permissions and session tracking through its adapter.
|
|
6
|
+
|
|
7
|
+
- Fleet test runs use separate temporary workspaces and clean up their own copies. Router account fixtures run only with isolated file-backed secret storage, preserving native keyrings.
|
|
8
|
+
|
|
9
|
+
- **Device picker module for `agents run <agent>@` (PHNX-4083).** New
|
|
10
|
+
`run-device-picker` command module builds the fleet device menu entirely from
|
|
11
|
+
on-disk state — the device registry, the cached fleet stats, configured roles
|
|
12
|
+
and descriptions, and the fleet-synced account catalog — with zero SSH, zero
|
|
13
|
+
network, and no re-probing of stale rows. Source: `src/commands/run-device-picker.ts`.
|
|
14
|
+
|
|
15
|
+
## 1.22.104
|
|
16
|
+
|
|
17
|
+
- **Interactive Claude runs on a worker fail loud instead of dropping to the login screen (PHNX-3502 sibling).** `agents run claude --interactive --device auto/<worker>` whose selected account had no synced setup-token used to fall through to Claude Code's "Select login method" screen — an interactive OAuth on a headless box that never persists, so Anthropic re-prompted on the next run (the repeated re-login loop). The run is now refused before spawn with the real fix (pin a live account with `agents run claude#<name>`, set the fleet default with `agents accounts default claude <name>`, or mint the account's token on a headed box with `agents accounts login claude#<name>`). Headless runs are unchanged (they already fail loud with a 401), and headed boxes still show their normal native-login prompt. Source: `cli/src/lib/harness/adapters/claude.ts`, `cli/src/lib/exec.ts`.
|
|
18
|
+
|
|
19
|
+
- **`agents view` and `agents accounts list` read as name + usage (PHNX-4051).** The
|
|
20
|
+
account table printed IDENTITY, STATE and WHERE on every row — an email, `UNVERIFIED`
|
|
21
|
+
and `on 9 boxes` repeated down the whole list — which pushed the usage bars past the
|
|
22
|
+
terminal width and wrapped every line. A row is now the account name and its usage
|
|
23
|
+
bars, and nothing else when the account is healthy. Only a state worth acting on
|
|
24
|
+
trails the row: `rate-limited` (yellow), `expired` / `revoked` / `missing` (red),
|
|
25
|
+
partial fleet coverage (`usable on 3 of 5 boxes`), then the repair command. A
|
|
26
|
+
blocking marker (`out of credits`) now renders after the bars instead of in front of
|
|
27
|
+
them, so one throttled account no longer misaligns the table, and a stale window is
|
|
28
|
+
`48%* (period ended 2h)` rather than `48% · stale (period ended 2h ago)`. The identity
|
|
29
|
+
and per-device state the columns carried are still one command away —
|
|
30
|
+
`agents accounts list --fleet`, `agents accounts view <name>`, `--json`. A discovered
|
|
31
|
+
login nobody has named is listed by its identity (the email) rather than `unnamed`. Source:
|
|
32
|
+
`cli/src/lib/account-catalog.ts`, `cli/src/lib/accounting/usage.ts`,
|
|
33
|
+
`cli/src/commands/view.ts`, `cli/src/commands/accounts.ts`.
|
|
34
|
+
|
|
35
|
+
- **`agents computer` now uses the standalone `computer` CLI (PHNX-4075).** Install it with `npm i -g @phnx-labs/computer-cli`; `agents setup computer` also installs it when missing. The standalone package owns desktop commands, native helpers, remote provisioning, and VNC transport. Agents retains fleet device resolution, permission groups, session identity, and action history. The separate `computer` npm executable and native helper sources now ship from the standalone project.
|
|
36
|
+
- **Release cleanup preserves unfinished work.** Dirty orchestration, publication, and attestation worktrees remain available with their paths printed. Generated files are restored only after their exact contents are saved in the release PR head; later edits are preserved.
|
|
37
|
+
|
|
38
|
+
- **A launched agent's own `secrets` calls hit the store agents-cli reads for it (PHNX-4081).** `buildExecEnv` now exports `SECRETS_HOME` (the user agents dir, unless the launching environment set one), the same root the process client already passes the standalone. Before, an agent's `secrets exec` inside a Claude Code or Cursor session ran against a second broker under `~/.secrets` with its own event log, so an unlock in one store was invisible in the other. The pinned standalone moves to `@phnx-labs/secrets-cli@0.1.4`, whose broker keeps `--durable` unlocks across restarts and lets a user-driven agent raise the Touch ID sheet instead of asking for `secrets unlock` by hand. Source: `cli/src/lib/exec.ts`, `cli/src/commands/setup-secrets.ts`.
|
|
39
|
+
|
|
40
|
+
- **One fewer cold `secrets` process on every command that touches secrets (PHNX-4082).** Each synchronous secrets request spawns a fresh `secrets __serve`, so it pays a full Node boot of the standalone — 0.3–2.6 s on a desktop at load average ~100. The client spent one of those purely to ask which protocol version the standalone speaks, before the first real request of every process. It no longer does: every response envelope already carries `v`, and `parseResponse` checks it on each one. That is also stricter than the handshake it replaces — a standalone that answered the handshake as v1 and a later op as v2 used to surface as "malformed response envelope" and now reports `secrets speaks protocol 2; this agents-cli needs 1`. Measured on `agents run claude`: 7 standalone spawns before, 6 after. Source: `cli/src/lib/secrets-client.ts`, `cli/src/lib/secrets-client.test.ts`, `cli/docs/secrets-client.md`, `cli/docs/specifications.md`.
|
|
41
|
+
|
|
3
42
|
## 1.22.103
|
|
4
43
|
|
|
5
44
|
- **`agents run claude` no longer dies with `secrets request failed: spawnSync sh ETIMEDOUT` on a loaded machine (PHNX-4078).** Every synchronous secrets request spawns a fresh `secrets __serve` process, so its bound has to cover a cold Node boot of the standalone, not just the tens-of-milliseconds operation. The bound was 3 s; on a desktop at load average ~100 each spawn measured 0.4–2.6 s and sometimes more, so the account listing on the launch path timed out and the run aborted before Claude started (also why AGI EXT tabs opened to a bare shell there). The sync bound is now 30 s — enough to boot under load, still well under the standalone's own 60 s self-deadline — and a timeout names the cause ("the standalone secrets CLI did not answer within 30s … check with secrets --version") instead of the raw `spawnSync` errno. Source: `cli/src/lib/secrets-client.ts`, `cli/src/lib/secrets-client.test.ts`, `cli/docs/secrets-client.md`.
|
package/README.md
CHANGED
|
@@ -1836,7 +1836,7 @@ Agents are defined in [src/lib/agents.ts](cli/src/lib/agents.ts) -- each is a co
|
|
|
1836
1836
|
|---|---|
|
|
1837
1837
|
| [`cli`](cli) | **The CLI** (this README) — version management, config sync, sessions, teams, cloud, browser, computer, secrets. |
|
|
1838
1838
|
| [phnx-labs/agi-ext](https://github.com/phnx-labs/agi-ext) | **AGI EXT** — the VS Code extension (agent terminals as tabs + the Fleet dashboard). Moved to its own repo (RUSH-3189); separate product, own publish identity. |
|
|
1839
|
-
|
|
|
1839
|
+
| `@phnx-labs/computer-cli` | The engine behind `agents computer`, published separately (`npm i -g @phnx-labs/computer-cli`): the Swift macOS Accessibility daemon, the C#/.NET Windows UI Automation daemon, and an install-free **VNC/RFB** backend for a Linux GUI desktop (`agents computer --vnc <host:port> screenshot` — coordinate-based screenshot/click/type/key/scroll against any x11vnc/Xvnc server). agents-cli supplies the app allow list, `--device` fleet resolution, and the action history. |
|
|
1840
1840
|
| [`packages/session-tracker`](packages/session-tracker) | The `SessionStart` hook that writes live-session state **AGI EXT** reads back (agi-ext `src/core/liveSession.ts`) — not the CLI, which reads transcripts. |
|
|
1841
1841
|
|
|
1842
1842
|
## Contributing
|
|
@@ -542,7 +542,7 @@ export function registerAccountsCommand(program) {
|
|
|
542
542
|
await runAccountsAction(command, () => printAccounts(!!o.json, !!o.fleet));
|
|
543
543
|
});
|
|
544
544
|
const listCmd = accounts.command('list [harness]')
|
|
545
|
-
.description('List accounts
|
|
545
|
+
.description('List accounts as name + usage, with the state and repair command only when one is needed')
|
|
546
546
|
.option('--json', 'Machine-readable account metadata')
|
|
547
547
|
.option('--fleet', 'Show accounts as rows and devices as columns')
|
|
548
548
|
.action(async (harness, o, command) => {
|
|
@@ -554,7 +554,7 @@ export function registerAccountsCommand(program) {
|
|
|
554
554
|
agents accounts list claude
|
|
555
555
|
agents accounts list --json
|
|
556
556
|
agents accounts list --fleet`,
|
|
557
|
-
notes: 'One row per account per harness
|
|
557
|
+
notes: 'One row per account per harness: the account name, its usage bars (`*` stale), then nothing at all when the account is healthy. A state worth acting on trails the row — `rate-limited` (the usage snapshot via `deriveUsageStatusFromSnapshot`/`applyUsageHonesty`, never a probe 429), `expired`/`revoked`/`missing`, partial fleet coverage (`usable on 3 of 5 boxes`), then the exact repair command. `live`, `unverified`, `ready` and `per-device` are the ordinary cases and print nothing. For the identity behind an account use `agents accounts view <name>`; for per-device state use `--fleet`; for everything use `--json`. Reserved credential stores are not listed here; `agents secrets` is the place those show.',
|
|
558
558
|
});
|
|
559
559
|
registerMintCommand(accounts, undefined, { hidden: true });
|
|
560
560
|
const addCmd = accounts.command('add <target> [name]')
|
|
@@ -1,5 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `agents computer` — the consumer surface over the standalone `computer` CLI
|
|
3
|
+
* (PHNX-4075).
|
|
4
|
+
*
|
|
5
|
+
* WHAT THIS FILE IS NOW. Every verb below forwards its arguments verbatim to the
|
|
6
|
+
* standalone engine and propagates its exit code. agents-cli contributes four
|
|
7
|
+
* things the engine cannot know:
|
|
8
|
+
*
|
|
9
|
+
* 1. the permissions allow list, rendered from `Computer(<bundle-id>)` rules
|
|
10
|
+
* in the agents resource layer (`lib/computer/policy.ts`);
|
|
11
|
+
* 2. the peer allow list, and `--device <name>` resolved against the fleet —
|
|
12
|
+
* both carried in the fd-3 context (`lib/computer/context.ts`);
|
|
13
|
+
* 3. the acting actor and agent session, likewise on fd 3;
|
|
14
|
+
* 4. a recorder for the action events the engine streams back on fd 4, so
|
|
15
|
+
* `agents computer sessions` and `agents sessions --computer` keep their
|
|
16
|
+
* history (`lib/computer/record.ts`).
|
|
17
|
+
*
|
|
18
|
+
* The remote path is the ENGINE's. `--device <name>` is resolved against the
|
|
19
|
+
* fleet here — that is what the registry, ssh identity and platform check are
|
|
20
|
+
* for — and then forwarded to the engine verbatim, which matches the alias
|
|
21
|
+
* against `context.target` and owns everything downstream of it: pushing the
|
|
22
|
+
* Windows helper, minting and storing its auth token, opening the `ssh -L`
|
|
23
|
+
* tunnel, and hydrating its own transport from the state it wrote. agents-cli
|
|
24
|
+
* keeps no tunnel state and publishes no endpoint: a `COMPUTER_HELPER_TCP` from
|
|
25
|
+
* here would carry a port without the token the daemon demands, so the verb
|
|
26
|
+
* would fail `auth_failed` against a tunnel that was up the whole time.
|
|
27
|
+
*
|
|
28
|
+
* WHY VERB FLAGS ARE NOT REDECLARED HERE. Each passthrough verb declares only
|
|
29
|
+
* `--device` — the one flag the consumer must intercept — and takes everything
|
|
30
|
+
* else as opaque operands via `allowUnknownOption`. Mirroring the engine's flags
|
|
31
|
+
* would create a second, silently drifting copy of its surface: a flag added
|
|
32
|
+
* upstream would be rejected here as unknown until someone noticed. The engine
|
|
33
|
+
* also owns per-verb `--help` for the same reason. What agents-cli keeps is the
|
|
34
|
+
* verb CATALOG — names, one-line descriptions, help groups — because that is
|
|
35
|
+
* what makes the surface discoverable from `agents computer --help`, and a
|
|
36
|
+
* verb the engine drops should fail loud here rather than silently vanish.
|
|
37
|
+
*
|
|
38
|
+
* `sessions` is the one verb that never reaches the engine: it reads agents-cli's
|
|
39
|
+
* own event ledger.
|
|
40
|
+
*/
|
|
1
41
|
import { Command } from 'commander';
|
|
2
|
-
|
|
42
|
+
/**
|
|
43
|
+
* The verb catalog. Descriptions are the consumer's (they appear in
|
|
44
|
+
* `agents computer --help`); flags are the engine's.
|
|
45
|
+
*
|
|
46
|
+
* This list is the contract with the engine: `computer --verbs` must report the
|
|
47
|
+
* same names. `computer.test.ts` pins it so a drift shows up as a failing test
|
|
48
|
+
* rather than a verb that quietly stops existing.
|
|
49
|
+
*/
|
|
50
|
+
export declare const COMPUTER_PASSTHROUGH_VERBS: ReadonlyArray<{
|
|
51
|
+
name: string;
|
|
52
|
+
description: string;
|
|
53
|
+
}>;
|
|
3
54
|
/**
|
|
4
55
|
* Pure platform gate. The computer subsystem is macOS-only for LOCAL driving
|
|
5
56
|
* (Accessibility / launchctl). It is NOT blocked off macOS when a remote daemon
|
|
@@ -14,97 +65,67 @@ export declare function shouldBlockOffPlatform(opts: {
|
|
|
14
65
|
device?: string;
|
|
15
66
|
}): boolean;
|
|
16
67
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
68
|
+
* Put `--device <name>` back on the argv handed to the engine.
|
|
69
|
+
*
|
|
70
|
+
* commander CONSUMES the `--device` it declares, so a verb that only read
|
|
71
|
+
* `opts.device` forwarded an argv with no remote selector in it and the engine
|
|
72
|
+
* — which selects the remote path from its own argv — ran the invocation
|
|
73
|
+
* LOCALLY. That is how `setup --device win-mini` installed the macOS helper on
|
|
74
|
+
* the laptop. The flag is re-inserted immediately after the verb rather than
|
|
75
|
+
* appended, so a verb whose operands are variadic cannot swallow it.
|
|
76
|
+
*
|
|
77
|
+
* Pure, so the re-insertion is testable without spawning the engine.
|
|
20
78
|
*/
|
|
21
|
-
export declare function
|
|
79
|
+
export declare function withDeviceFlag(argv: string[], device?: string): string[];
|
|
22
80
|
/**
|
|
23
|
-
*
|
|
24
|
-
* encode DIFFERENT formats and neither re-encodes to match the requested name:
|
|
25
|
-
* the macOS helper (ScreenCaptureKit) returns JPEG
|
|
26
|
-
* (native/computer-mac/Sources/ComputerHelper/Screenshot.swift:207,212),
|
|
27
|
-
* the Windows helper returns PNG
|
|
28
|
-
* (native/computer-win/Screenshot.cs:33). So a fixed default extension
|
|
29
|
-
* cannot be correct for both — the only honest path is to sniff the real format
|
|
30
|
-
* and swap the extension to match. Pure so it's unit-testable.
|
|
81
|
+
* Forward one invocation to the engine and propagate its exit code.
|
|
31
82
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
83
|
+
* A missing standalone is the one failure agents-cli reports itself, because it
|
|
84
|
+
* is the one the engine cannot: it prints the install line and exits 1. There is
|
|
85
|
+
* no fallback engine to reach for — that is the point of the extraction.
|
|
34
86
|
*/
|
|
35
|
-
export declare function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
87
|
+
export declare function forwardToComputer(opts: {
|
|
88
|
+
argv: string[];
|
|
89
|
+
device?: string;
|
|
90
|
+
/** Skip recording — lifecycle verbs are not user actions. */
|
|
91
|
+
record?: boolean;
|
|
92
|
+
/** Read the engine's stdout instead of letting it reach the terminal. */
|
|
93
|
+
capture?: boolean;
|
|
94
|
+
}): Promise<{
|
|
95
|
+
exitCode: number;
|
|
96
|
+
stdout: string;
|
|
97
|
+
}>;
|
|
39
98
|
export declare function registerComputerCommand(program: Command): void;
|
|
40
99
|
export declare function registerComputerSubcommands(program: Command): void;
|
|
41
|
-
export declare function buildRestartTaskScript(taskName: string, exeName: string): string;
|
|
42
100
|
/**
|
|
43
|
-
*
|
|
44
|
-
* `
|
|
45
|
-
*
|
|
46
|
-
* lib/computer/sessions-list.ts's "Grouping key" docblock note). The task
|
|
47
|
-
* text is bounded to `TASK_PREVIEW_MAX_CHARS` — never the full unbounded
|
|
48
|
-
* `--task` string — matching that module's retention/privacy note. Exported
|
|
49
|
-
* so the truncation behavior is directly unit-testable against the real
|
|
50
|
-
* event ledger, the same seam `computer-actions.test.ts` already uses for
|
|
51
|
-
* `emitComputerAction`.
|
|
101
|
+
* Install the macOS helper through the engine. Used by the `agents setup
|
|
102
|
+
* computer` wizard, which still owns the TCC hand-holding — that is a
|
|
103
|
+
* conversation with the user, not a daemon operation.
|
|
52
104
|
*/
|
|
53
|
-
export declare function
|
|
54
|
-
task: string;
|
|
55
|
-
bundle?: string;
|
|
56
|
-
device?: string;
|
|
57
|
-
}): void;
|
|
105
|
+
export declare function installComputerHelperMacLocal(): Promise<void>;
|
|
58
106
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* path, so without this a process running under a sandbox HOME tears down the
|
|
63
|
-
* operator's live helper.
|
|
64
|
-
*/
|
|
65
|
-
export declare function helperLabel(): string;
|
|
66
|
-
/**
|
|
67
|
-
* Install the macOS helper locally: resolve (or download + verify) the signed,
|
|
68
|
-
* notarized .app, copy it to /Applications, verify the destination signature,
|
|
69
|
-
* and write the LaunchAgent plist (inactive — activation is a separate opt-in
|
|
70
|
-
* step via `start`). Throws on any failure. Shared by `agents computer setup`
|
|
71
|
-
* and the unified `agents setup computer` wizard so there is one install path.
|
|
72
|
-
*/
|
|
73
|
-
export declare function installComputerHelperMacLocal(): Promise<{
|
|
74
|
-
appDest: string;
|
|
75
|
-
plistPath: string;
|
|
76
|
-
}>;
|
|
77
|
-
/**
|
|
78
|
-
* Activate the local helper daemon via launchd (render policy + peers, bootout
|
|
79
|
-
* → bootstrap → kickstart, wait for the socket, probe AX trust). Throws on any
|
|
80
|
-
* failure. Returns the trust status so callers can guide the permission grant.
|
|
81
|
-
* Shared by `agents computer start` and the `agents setup computer` wizard.
|
|
107
|
+
* Activate the local daemon through the engine and report whether Accessibility
|
|
108
|
+
* trust is granted, so the wizard knows whether to walk the user to System
|
|
109
|
+
* Settings.
|
|
82
110
|
*/
|
|
83
111
|
export declare function activateComputerHelperMacLocal(): Promise<{
|
|
84
112
|
trusted: boolean;
|
|
85
|
-
socketPath: string;
|
|
86
|
-
logPath: string;
|
|
87
113
|
}>;
|
|
88
|
-
/** Probe the running daemon's Accessibility trust status without re-activating.
|
|
89
|
-
* Returns false (never throws) if the socket is down or the RPC errors — used to
|
|
90
|
-
* poll while the user grants permissions in System Settings. */
|
|
91
|
-
export declare function probeComputerTrust(): Promise<boolean>;
|
|
92
114
|
/**
|
|
93
|
-
*
|
|
115
|
+
* Read `trusted` out of `computer status --json`.
|
|
116
|
+
*
|
|
117
|
+
* Tolerant by construction: the engine may print a banner line before its JSON,
|
|
118
|
+
* so scan for the first parseable object rather than assuming the whole stream
|
|
119
|
+
* is JSON. Pure, so the parsing contract is testable without a daemon.
|
|
120
|
+
*/
|
|
121
|
+
export declare function parseTrustFromStatusJson(stdout: string): boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Probe Accessibility trust without re-activating. Returns false (never throws)
|
|
124
|
+
* when the engine is absent, the daemon is down, or the probe errors — the
|
|
125
|
+
* wizard polls this while the user grants permissions in System Settings, and a
|
|
126
|
+
* throw there would abort the very flow that fixes it.
|
|
94
127
|
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* SESSION's environment, never the environment of whoever called `launchctl
|
|
98
|
-
* bootstrap`, so a manifest that omits HOME hands the helper the account home no
|
|
99
|
-
* matter which home the caller resolved. That is a silent escape from any
|
|
100
|
-
* redirected HOME — the hermetic test harness's, and an agent's isolated version
|
|
101
|
-
* home alike.
|
|
128
|
+
* This is the ONE place agents-cli reads engine stdout instead of passing it
|
|
129
|
+
* through, because it needs an answer rather than a display.
|
|
102
130
|
*/
|
|
103
|
-
export declare function
|
|
104
|
-
label: string;
|
|
105
|
-
exec: string;
|
|
106
|
-
socketPath: string;
|
|
107
|
-
logPath: string;
|
|
108
|
-
}): string;
|
|
109
|
-
export { resolveHelperExec as resolveHelperPath };
|
|
110
|
-
export { resolveSocketPath };
|
|
131
|
+
export declare function probeComputerTrust(): Promise<boolean>;
|