@phnx-labs/agents-cli 1.22.93 → 1.22.94

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.
@@ -1,4 +1,53 @@
1
+ import type { ArcNativeTabRef } from './drivers/arc.js';
2
+ export type { ArcNativeTabRef } from './drivers/arc.js';
1
3
  export type BrowserType = 'chrome' | 'comet' | 'chromium' | 'brave' | 'edge' | 'arc' | 'custom';
4
+ /**
5
+ * The transport backend a live browser connection uses (PHNX-2399).
6
+ * - `cdp` — Chrome DevTools Protocol (the existing path for all Chromium-family browsers).
7
+ * - `arc-native` — Apple Events via `osascript` (the native Arc path, no CDP port required).
8
+ *
9
+ * Load-bearing: every action method on `BrowserService` that calls `conn.cdp.send()`
10
+ * must check `conn.backend` and route to the native driver instead when it is
11
+ * `arc-native`. Unsupported native verbs throw `ArcNativeCapabilityError`.
12
+ */
13
+ export type BackendKind = 'cdp' | 'arc-native';
14
+ /**
15
+ * Stable native identity carried by an Arc profile declaration (PHNX-2399).
16
+ * One agents-cli profile is one Arc Space: the Space already carries its Arc
17
+ * profile (cookies, logins), so agents never learn a second "space" concept.
18
+ */
19
+ export interface ArcNativeProfileIdentity {
20
+ /** Arc's profile directory basename the Space belongs to. Authoritative id. */
21
+ profileId: string;
22
+ /** Display-only Arc profile name from Local State. Never used for addressing. */
23
+ profileName: string;
24
+ /** Stable Space id used for every native operation. */
25
+ spaceId: string;
26
+ /** Display-only Space title. */
27
+ spaceTitle: string;
28
+ }
29
+ /** A crash-safe native create intent persisted before Arc is asked to mutate. */
30
+ export interface ArcNativeCreateIntent {
31
+ tabId: string;
32
+ markerUrl: string;
33
+ targetUrl: string;
34
+ createdAt: number;
35
+ /** Active tab before creation, restored only if the owned tab stayed active. */
36
+ previousTabId?: string;
37
+ /** Written immediately after the driver returns, before final navigation. */
38
+ ref?: ArcNativeTabRef;
39
+ }
40
+ /** Durable Arc state owned by one browser task. */
41
+ export interface ArcNativeTaskState {
42
+ profileId: string;
43
+ /** Original Arc window id. A tab moved elsewhere is never adopted. */
44
+ windowId: string;
45
+ spaceId: string;
46
+ /** Display-only snapshot for status output. */
47
+ spaceTitle: string;
48
+ tabs: Record<string, ArcNativeTabRef>;
49
+ createIntents?: Record<string, ArcNativeCreateIntent>;
50
+ }
2
51
  /**
3
52
  * The user-facing name of a profile — what `agents browser profiles list`
4
53
  * prints and what `--profile <name>` takes. ALWAYS bare: it never carries an
@@ -139,6 +188,8 @@ export interface BrowserProfile {
139
188
  logDir?: string;
140
189
  /** Optional SSH host where logDir lives, e.g. "user@remote-host". */
141
190
  logHost?: string;
191
+ /** Native Arc identity. Present only for an `arc-native:` profile. */
192
+ arc?: ArcNativeProfileIdentity;
142
193
  }
143
194
  /** Parsed form of `BrowserProfile.targetFilter`. */
144
195
  export interface TargetFilter {
@@ -176,11 +227,12 @@ export interface Task {
176
227
  * {@link parseConnectionKey} to get the user-facing name out of it.
177
228
  */
178
229
  profile: ConnectionKey;
230
+ /** shortId -> CDP target id, or native tab id mirrored from arcNative.tabs. */
179
231
  tabs: Record<string, string>;
180
232
  /**
181
233
  * Tabs this task DRIVES but did not create, by shortId — a tab that already
182
234
  * existed in the browser and was reused because the browser cannot open new
183
- * ones (Arc: `Target.createTarget` crashes it, #2778/#2786). Every close path
235
+ * ones (legacy CDP Arc is one example). Every close path
184
236
  * skips these: the task never opened the tab, so closing it on `done` would
185
237
  * take away something that was there first. Same rule `adoptTabShowing`
186
238
  * states for unowned pages, kept when reuse is unavoidable rather than
@@ -235,6 +287,8 @@ export interface Task {
235
287
  * it. See RefSnapshot / RefDescriptor.
236
288
  */
237
289
  refDescriptors?: Record<string, import('./refs.js').RefSnapshot>;
290
+ /** Durable stable native ids and crash-intent ledger for an Arc task. */
291
+ arcNative?: ArcNativeTaskState;
238
292
  }
239
293
  export interface TabInfo {
240
294
  id: string;
@@ -1303,6 +1303,13 @@ export interface BrowserProfileConfig {
1303
1303
  logDir?: string;
1304
1304
  /** Optional SSH host where logDir lives, e.g. "user@remote-host". */
1305
1305
  logHost?: string;
1306
+ /** Stable native identity for an Arc Space profile; display names are never addresses. */
1307
+ arc?: {
1308
+ profileId: string;
1309
+ profileName: string;
1310
+ spaceId: string;
1311
+ spaceTitle: string;
1312
+ };
1306
1313
  }
1307
1314
  /** Options controlling which agents and resources are synced during `agents sync` / `agents use`. */
1308
1315
  export interface SyncOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phnx-labs/agents-cli",
3
- "version": "1.22.93",
3
+ "version": "1.22.94",
4
4
  "description": "One CLI for all your AI coding agents - versions, config, cloud dispatch, sessions, and teams (now with first-class Grok Build CLI support)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",