@phnx-labs/agents-cli 1.22.114 → 1.22.116
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 +245 -0
- package/README.md +22 -102
- package/dist/browser.js +0 -0
- package/dist/cli/command-registry.js +0 -7
- package/dist/commands/accounts.d.ts +3 -77
- package/dist/commands/accounts.js +13 -366
- package/dist/commands/audit.js +1 -1
- package/dist/commands/auth.js +0 -2
- package/dist/commands/browser.d.ts +53 -0
- package/dist/commands/browser.js +210 -9
- package/dist/commands/doctor.d.ts +2 -3
- package/dist/commands/doctor.js +0 -11
- package/dist/commands/events.d.ts +1 -3
- package/dist/commands/events.js +4 -7
- package/dist/commands/exec.d.ts +0 -1
- package/dist/commands/exec.js +214 -148
- package/dist/commands/feed-watch.js +52 -8
- package/dist/commands/feed.js +65 -14
- package/dist/commands/focus.js +1 -1
- package/dist/commands/go.d.ts +0 -17
- package/dist/commands/go.js +2 -19
- package/dist/commands/logs.js +1 -1
- package/dist/commands/mcp.js +8 -83
- package/dist/commands/memory.js +4 -47
- package/dist/commands/message.js +4 -4
- package/dist/commands/plugins.js +1 -93
- package/dist/commands/repo.js +0 -44
- package/dist/commands/resume.js +4 -1
- package/dist/commands/secrets-passthrough.js +2 -2
- package/dist/commands/send.d.ts +4 -4
- package/dist/commands/send.js +6 -51
- package/dist/commands/sessions-backup-setup.js +1 -1
- package/dist/commands/sessions-picker.d.ts +11 -0
- package/dist/commands/sessions-picker.js +88 -7
- package/dist/commands/sessions-resume.js +0 -1
- package/dist/commands/sessions-share.d.ts +5 -7
- package/dist/commands/sessions-share.js +98 -49
- package/dist/commands/sessions.d.ts +21 -2
- package/dist/commands/sessions.js +158 -11
- package/dist/commands/setup-browser.js +18 -2
- package/dist/commands/setup-computer.js +20 -6
- package/dist/commands/setup-secrets.d.ts +2 -2
- package/dist/commands/setup-secrets.js +24 -4
- package/dist/commands/setup-term.d.ts +24 -0
- package/dist/commands/setup-term.js +70 -0
- package/dist/commands/setup-terminal.d.ts +3 -0
- package/dist/commands/setup-terminal.js +22 -0
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.js +29 -11
- package/dist/commands/skills.js +0 -8
- package/dist/commands/ssh.d.ts +6 -0
- package/dist/commands/ssh.js +93 -302
- package/dist/commands/sync.js +14 -5
- package/dist/commands/teams.js +1 -1
- package/dist/commands/traces.js +1 -1
- package/dist/lib/accounting/rotate.d.ts +63 -1
- package/dist/lib/accounting/rotate.js +56 -0
- package/dist/lib/accounts/add.d.ts +0 -5
- package/dist/lib/accounts/add.js +3 -9
- package/dist/lib/accounts/slots.js +32 -2
- package/dist/lib/answer-router.d.ts +11 -2
- package/dist/lib/answer-router.js +26 -2
- package/dist/lib/artifacts-client.d.ts +20 -0
- package/dist/lib/artifacts-client.js +46 -0
- package/dist/lib/auth-mint.d.ts +5 -4
- package/dist/lib/auth-mint.js +6 -5
- package/dist/lib/browser/drivers/arc.d.ts +1 -1
- package/dist/lib/browser/runtime-state.d.ts +55 -0
- package/dist/lib/browser/runtime-state.js +99 -18
- package/dist/lib/browser/service.d.ts +10 -0
- package/dist/lib/browser/service.js +229 -37
- package/dist/lib/browser/types.d.ts +18 -0
- package/dist/lib/cli-resources.js +3 -1
- package/dist/lib/cloud/dispatch.js +1 -1
- package/dist/lib/cloudflare/creds.d.ts +10 -0
- package/dist/lib/cloudflare/creds.js +46 -0
- package/dist/lib/cloudflare/provision.d.ts +35 -0
- package/dist/lib/cloudflare/provision.js +144 -0
- package/dist/lib/computer/sessions-list.d.ts +55 -0
- package/dist/lib/computer/sessions-list.js +168 -1
- package/dist/lib/config-keys.d.ts +1 -1
- package/dist/lib/config-keys.js +5 -0
- package/dist/lib/daemon/daemon.js +8 -1
- package/dist/lib/daemon/feed-stream-service.d.ts +23 -0
- package/dist/lib/daemon/feed-stream-service.js +40 -0
- package/dist/lib/daemon-services.d.ts +1 -1
- package/dist/lib/daemon-services.js +5 -0
- package/dist/lib/device-config.js +61 -0
- package/dist/lib/devices/connect.d.ts +49 -5
- package/dist/lib/devices/connect.js +169 -21
- package/dist/lib/devices/doctor-findings.js +2 -6
- package/dist/lib/feed/answer.d.ts +153 -4
- package/dist/lib/feed/answer.js +716 -105
- package/dist/lib/feed/envelope.d.ts +79 -0
- package/dist/lib/feed/envelope.js +23 -0
- package/dist/lib/feed/events.d.ts +6 -0
- package/dist/lib/feed/events.js +8 -0
- package/dist/lib/feed/feed.d.ts +61 -1
- package/dist/lib/feed/feed.js +226 -14
- package/dist/lib/feed/hub-server.d.ts +141 -0
- package/dist/lib/feed/hub-server.js +586 -0
- package/dist/lib/feed/hub.d.ts +95 -0
- package/dist/lib/feed/hub.js +255 -0
- package/dist/lib/feed/pr-status.d.ts +8 -0
- package/dist/lib/feed/pr-status.js +9 -1
- package/dist/lib/feed/tool-activity.d.ts +108 -0
- package/dist/lib/feed/tool-activity.js +313 -0
- package/dist/lib/feed/tools.d.ts +198 -0
- package/dist/lib/feed/tools.js +265 -0
- package/dist/lib/feed/watch.d.ts +50 -50
- package/dist/lib/feed/watch.js +147 -16
- package/dist/lib/feed-outcome.d.ts +1 -1
- package/dist/lib/feed-outcome.js +9 -2
- package/dist/lib/feed-policy.js +9 -3
- package/dist/lib/fleet/auth-sync.d.ts +2 -55
- package/dist/lib/fleet/auth-sync.js +2 -89
- package/dist/lib/format.d.ts +1 -1
- package/dist/lib/format.js +1 -1
- package/dist/lib/git.d.ts +0 -16
- package/dist/lib/git.js +0 -58
- package/dist/lib/harness-auth-capabilities.js +7 -2
- package/dist/lib/helper-versions.js +1 -1
- package/dist/lib/hosts/dispatch.d.ts +20 -1
- package/dist/lib/hosts/dispatch.js +52 -30
- package/dist/lib/hosts/remote-cmd.d.ts +72 -1
- package/dist/lib/hosts/remote-cmd.js +151 -10
- package/dist/lib/hosts/remote-cmd.test-fixture.d.ts +2 -0
- package/dist/lib/hosts/remote-cmd.test-fixture.js +22 -0
- package/dist/lib/mailbox.d.ts +12 -0
- package/dist/lib/mailbox.js +16 -2
- package/dist/lib/mcp.js +17 -11
- package/dist/lib/menubar/snapshot.d.ts +51 -0
- package/dist/lib/menubar/snapshot.js +42 -3
- package/dist/lib/open-url.js +2 -2
- package/dist/lib/probe.d.ts +4 -1
- package/dist/lib/probe.js +5 -2
- package/dist/lib/projects.d.ts +23 -0
- package/dist/lib/projects.js +78 -0
- package/dist/lib/pwsh.d.ts +33 -0
- package/dist/lib/pwsh.js +56 -0
- package/dist/lib/redact.d.ts +8 -0
- package/dist/lib/redact.js +11 -0
- package/dist/lib/refresh.d.ts +6 -2
- package/dist/lib/refresh.js +92 -72
- package/dist/lib/secrets-cli.d.ts +11 -0
- package/dist/lib/secrets-cli.js +30 -0
- package/dist/lib/secrets-client.js +3 -2
- package/dist/lib/session/active.d.ts +1 -0
- package/dist/lib/session/active.js +8 -0
- package/dist/lib/session/db.d.ts +67 -3
- package/dist/lib/session/db.js +381 -126
- package/dist/lib/session/detached.d.ts +7 -0
- package/dist/lib/session/detached.js +29 -0
- package/dist/lib/session/prompt.d.ts +23 -7
- package/dist/lib/session/prompt.js +46 -8
- package/dist/lib/session/remote/peer-stream.d.ts +24 -2
- package/dist/lib/session/remote/peer-stream.js +33 -6
- package/dist/lib/session/remote/remote-list.d.ts +20 -0
- package/dist/lib/session/remote/remote-list.js +22 -6
- package/dist/lib/session/remote/watch.d.ts +12 -0
- package/dist/lib/session/remote/watch.js +9 -0
- package/dist/lib/session/remote-preview-cache.d.ts +29 -0
- package/dist/lib/session/remote-preview-cache.js +373 -0
- package/dist/lib/session/sync/backend.d.ts +3 -3
- package/dist/lib/session/sync/backend.js +3 -3
- package/dist/lib/session/sync/provision.d.ts +1 -1
- package/dist/lib/session/sync/provision.js +2 -2
- package/dist/lib/session/tail.d.ts +50 -0
- package/dist/lib/session/tail.js +219 -0
- package/dist/lib/sessions-client.js +0 -3
- package/dist/lib/setup-tool-install.d.ts +3 -0
- package/dist/lib/setup-tool-install.js +27 -0
- package/dist/lib/setup-tool-status.d.ts +22 -0
- package/dist/lib/setup-tool-status.js +220 -0
- package/dist/lib/share-runtime.d.ts +11 -0
- package/dist/lib/share-runtime.js +63 -0
- package/dist/lib/signin-badge.d.ts +19 -4
- package/dist/lib/signin-badge.js +29 -11
- package/dist/lib/smart-launch.d.ts +1 -5
- package/dist/lib/smart-launch.js +3 -11
- package/dist/lib/ssh-exec.d.ts +44 -0
- package/dist/lib/ssh-exec.js +119 -0
- package/dist/lib/startup/command-registry.d.ts +6 -4
- package/dist/lib/startup/command-registry.js +10 -7
- package/dist/lib/state.js +2 -2
- package/dist/lib/storage/selection.d.ts +2 -2
- package/dist/lib/storage/selection.js +2 -2
- package/dist/lib/sync-umbrella.d.ts +5 -0
- package/dist/lib/sync-umbrella.js +18 -10
- package/dist/lib/term-driver.d.ts +24 -0
- package/dist/lib/term-driver.js +36 -0
- package/dist/lib/terminal/index.d.ts +1 -1
- package/dist/lib/terminal/index.js +1 -1
- package/dist/lib/terminal/inject.d.ts +38 -0
- package/dist/lib/terminal/inject.js +55 -9
- package/dist/lib/terminal/transport.d.ts +15 -5
- package/dist/lib/terminal/transport.js +61 -11
- package/dist/lib/traces/backend.d.ts +1 -2
- package/dist/lib/traces/backend.js +1 -2
- package/dist/lib/traces/provision.d.ts +1 -1
- package/dist/lib/traces/provision.js +2 -2
- package/dist/lib/types.d.ts +8 -6
- package/package.json +2 -3
- package/dist/commands/artifacts-setup.d.ts +0 -53
- package/dist/commands/artifacts-setup.js +0 -161
- package/dist/commands/artifacts.d.ts +0 -18
- package/dist/commands/artifacts.js +0 -58
- package/dist/commands/attach.d.ts +0 -12
- package/dist/commands/attach.js +0 -86
- package/dist/commands/auth-mint.d.ts +0 -12
- package/dist/commands/auth-mint.js +0 -108
- package/dist/commands/reconnect.d.ts +0 -46
- package/dist/commands/reconnect.js +0 -115
- package/dist/commands/share.d.ts +0 -293
- package/dist/commands/share.js +0 -1424
- package/dist/lib/fleet/remote-login.d.ts +0 -170
- package/dist/lib/fleet/remote-login.js +0 -568
- package/dist/lib/share/analytics.d.ts +0 -13
- package/dist/lib/share/analytics.js +0 -45
- package/dist/lib/share/backend.d.ts +0 -120
- package/dist/lib/share/backend.js +0 -176
- package/dist/lib/share/capture.d.ts +0 -31
- package/dist/lib/share/capture.js +0 -174
- package/dist/lib/share/config.d.ts +0 -72
- package/dist/lib/share/config.js +0 -211
- package/dist/lib/share/delete.d.ts +0 -123
- package/dist/lib/share/delete.js +0 -173
- package/dist/lib/share/html.d.ts +0 -20
- package/dist/lib/share/html.js +0 -88
- package/dist/lib/share/http-error.d.ts +0 -53
- package/dist/lib/share/http-error.js +0 -65
- package/dist/lib/share/og.d.ts +0 -26
- package/dist/lib/share/og.js +0 -84
- package/dist/lib/share/provision.d.ts +0 -127
- package/dist/lib/share/provision.js +0 -285
- package/dist/lib/share/publish.d.ts +0 -379
- package/dist/lib/share/publish.js +0 -818
- package/dist/lib/share/worker-template.d.ts +0 -27
- package/dist/lib/share/worker-template.js +0 -2424
- package/dist/lib/storage/index.d.ts +0 -14
- package/dist/lib/storage/index.js +0 -14
- package/dist/lib/storage/visibility.d.ts +0 -82
- package/dist/lib/storage/visibility.js +0 -99
package/dist/lib/session/db.d.ts
CHANGED
|
@@ -31,8 +31,13 @@ export declare const SCHEMA_VERSION = 50;
|
|
|
31
31
|
* v4 (PHNX-3621 leftover) invalidates Grok rows stamped before the bounded
|
|
32
32
|
* chat_history.jsonl prefix read filled firstUserMessage.
|
|
33
33
|
* v5 (PHNX-3939) restores first-meta Codex fork ownership, including cold files.
|
|
34
|
+
* v6 (PHNX-3999) invalidates rows whose stored `label` is harness scaffolding — a
|
|
35
|
+
* `<bash-input>` shell echo, a `<command-name>` wrapper, a bare `/clear` — which
|
|
36
|
+
* `cleanGeneratedSessionLabel` now rejects. The label is written at index time, so
|
|
37
|
+
* without this bump every already-indexed session keeps showing the junk title
|
|
38
|
+
* until its transcript happens to change.
|
|
34
39
|
*/
|
|
35
|
-
export declare const CONTENT_INDEX_VERSION =
|
|
40
|
+
export declare const CONTENT_INDEX_VERSION = 6;
|
|
36
41
|
/**
|
|
37
42
|
* Bumping this invalidates every cached facet row without touching the schema
|
|
38
43
|
* version, so a change to the extraction logic (a new metric, a corrected bucket)
|
|
@@ -106,7 +111,9 @@ export interface QueryOptions {
|
|
|
106
111
|
plugin?: string;
|
|
107
112
|
}
|
|
108
113
|
/** Open (or return the cached) sessions database, applying migrations as needed. */
|
|
109
|
-
export declare function getDB(): Database.Database;
|
|
114
|
+
export declare function getDB(initialBusyTimeoutMs?: number): Database.Database;
|
|
115
|
+
/** Bound synchronous cache contention without changing other database callers. */
|
|
116
|
+
export declare function withSessionDBTimeout<T>(timeoutMs: number, operation: () => T): T;
|
|
110
117
|
/** Close the cached database connection. */
|
|
111
118
|
export declare function closeDB(): void;
|
|
112
119
|
interface FtsOptimizeResult {
|
|
@@ -428,6 +435,60 @@ export declare function writeSessionPreviewCache<T>(entry: {
|
|
|
428
435
|
fileSize: number | null;
|
|
429
436
|
preview: T;
|
|
430
437
|
}): void;
|
|
438
|
+
/** Bump when the cached remote preview envelope shape changes so cached rows recompute (PHNX-3999 v1). */
|
|
439
|
+
export declare const REMOTE_PREVIEW_SCHEMA_VERSION = 1;
|
|
440
|
+
/**
|
|
441
|
+
* Per-envelope cache-write cap. The bounded fields above make a well-formed
|
|
442
|
+
* envelope small; this exists to refuse an outlier (a version-skewed peer, or
|
|
443
|
+
* a future field that forgets to bound itself) rather than let ONE session
|
|
444
|
+
* blow the total budget. A refused write is NOT an error — the caller still
|
|
445
|
+
* gets the live envelope for this call, it simply is not persisted, so the
|
|
446
|
+
* next call re-fetches instead of silently caching a giant blob.
|
|
447
|
+
*/
|
|
448
|
+
export declare const REMOTE_PREVIEW_ENVELOPE_MAX_BYTES: number;
|
|
449
|
+
export interface RemotePreviewCacheRow {
|
|
450
|
+
/** When the envelope currently stored here (if `ok`) was fetched. */
|
|
451
|
+
fetchedAt: number;
|
|
452
|
+
/** Whether `envelope` is a real, successfully-fetched payload. */
|
|
453
|
+
ok: boolean;
|
|
454
|
+
envelope?: unknown;
|
|
455
|
+
failureReason?: string;
|
|
456
|
+
consecutiveFailures: number;
|
|
457
|
+
/** Epoch ms before which a fresh fetch attempt should be skipped (negative backoff). */
|
|
458
|
+
nextAttemptAt: number;
|
|
459
|
+
/** The caller's own last-observed `--revision` cursor, or undefined if no
|
|
460
|
+
* caller has ever supplied one for this (device, sessionId) pair. */
|
|
461
|
+
lastCallerRevision?: string;
|
|
462
|
+
}
|
|
463
|
+
/** Read the durable cached remote preview row for one (device, sessionId) pair,
|
|
464
|
+
* regardless of whether it currently holds a successful envelope. Undefined
|
|
465
|
+
* means this box has never attempted (or recorded) a fetch for that pair. */
|
|
466
|
+
export declare function readRemotePreviewCache(device: string, sessionId: string): RemotePreviewCacheRow | undefined;
|
|
467
|
+
/**
|
|
468
|
+
* Record the caller's own `--revision` cursor for one (device, sessionId)
|
|
469
|
+
* pair, independent of any fetch. A no-op if no row exists yet (nothing to
|
|
470
|
+
* compare against on a session this box has never fetched). This is what lets
|
|
471
|
+
* "same revision as last time" serve the durable cache with zero SSH
|
|
472
|
+
* indefinitely — the comparison is against THIS value, never against the
|
|
473
|
+
* envelope's own `details.sourceRevision` (which may be a different format).
|
|
474
|
+
*/
|
|
475
|
+
export declare function writeRemotePreviewCallerRevision(device: string, sessionId: string, revision: string): void;
|
|
476
|
+
/**
|
|
477
|
+
* Record a successful remote fetch: replaces the payload and resets backoff.
|
|
478
|
+
* An envelope over {@link REMOTE_PREVIEW_ENVELOPE_MAX_BYTES} is refused —
|
|
479
|
+
* this is a write-path bound, not a request failure: the caller already has
|
|
480
|
+
* the live envelope for this call from the fetch that produced it, this only
|
|
481
|
+
* decides whether it is worth persisting.
|
|
482
|
+
*/
|
|
483
|
+
export declare function writeRemotePreviewCacheSuccess(device: string, sessionId: string, envelope: unknown, fetchedAt?: number, revision?: string): void;
|
|
484
|
+
/**
|
|
485
|
+
* Record a failed remote fetch attempt with exponential backoff, WITHOUT
|
|
486
|
+
* discarding a prior good envelope — a session that answered once and is now
|
|
487
|
+
* offline still degrades to that last-good payload (read back via
|
|
488
|
+
* {@link readRemotePreviewCache}'s `ok`/`envelope`), annotated stale by the
|
|
489
|
+
* caller, rather than losing it the moment one attempt fails.
|
|
490
|
+
*/
|
|
491
|
+
export declare function writeRemotePreviewCacheFailure(device: string, sessionId: string, reason: string, backoffMs: (consecutiveFailures: number) => number, now?: number): void;
|
|
431
492
|
/**
|
|
432
493
|
* The session's durable user-turn text, as stored in the `session_text` FTS
|
|
433
494
|
* `content` column at scan time (all harnesses, keyed by session_id). This is
|
|
@@ -510,7 +571,10 @@ export declare function readSessionTimelineEntry(id: string): SessionTimelineCac
|
|
|
510
571
|
* read path. Deliberately does NOT parse the resume state: a live row needs the
|
|
511
572
|
* 8 steps and the request, never the fold's bookkeeping.
|
|
512
573
|
*/
|
|
513
|
-
export declare function readSessionTimelineAny(id: string
|
|
574
|
+
export declare function readSessionTimelineAny(id: string, stamp?: {
|
|
575
|
+
fileMtimeMs: number;
|
|
576
|
+
fileSize: number;
|
|
577
|
+
}): SessionTimelineProjection | undefined;
|
|
514
578
|
/** Persist a folded timeline against the exact transcript bytes it was folded to. */
|
|
515
579
|
export declare function writeSessionTimeline(entry: {
|
|
516
580
|
id: string;
|