@dreb/dashboard 2.61.2 → 2.63.0
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/README.md +18 -8
- package/dist/shared/protocol.d.ts +14 -1
- package/dist/shared/protocol.d.ts.map +1 -1
- package/dist/shared/protocol.js.map +1 -1
- package/dist/static/assets/atkinson-hyperlegible-italic-DV_iHO0x.woff2 +0 -0
- package/dist/static/assets/atkinson-hyperlegible-medium-DYV7mfZR.woff2 +0 -0
- package/dist/static/assets/atkinson-hyperlegible-regular-BuyVa9gS.woff2 +0 -0
- package/dist/static/assets/atkinson-hyperlegible-semibold-BBLU1dOL.woff2 +0 -0
- package/dist/static/assets/fira-code-medium-DLHOTfkU.woff2 +0 -0
- package/dist/static/assets/fira-code-regular-Dz9DYWXe.woff2 +0 -0
- package/dist/static/assets/fira-code-semibold-BFNr91v7.woff2 +0 -0
- package/dist/static/assets/{index-Baf7iJyp.js → index-G6JRpiHt.js} +2 -2
- package/dist/static/assets/index-PauEuaRT.css +1 -0
- package/dist/static/assets/iosevka-italic-Co5rfiQa.woff2 +0 -0
- package/dist/static/assets/iosevka-medium-DAJJVkKs.woff2 +0 -0
- package/dist/static/assets/iosevka-regular-nSpUaX0i.woff2 +0 -0
- package/dist/static/assets/iosevka-semibold-D20Iy4Tf.woff2 +0 -0
- package/dist/static/assets/opendyslexic-bold-Bnmt45Ln.woff2 +0 -0
- package/dist/static/assets/opendyslexic-bold-italic-DeGJE8Fr.woff2 +0 -0
- package/dist/static/assets/opendyslexic-italic-sb4Uqald.woff2 +0 -0
- package/dist/static/assets/opendyslexic-regular-nUhe5EwG.woff2 +0 -0
- package/dist/static/index.html +11 -7
- package/dist/static/sw.js +1 -1
- package/package.json +10 -2
- package/src/client/assets/fonts/ATKINSON-OFL.txt +93 -0
- package/src/client/assets/fonts/ATKINSON-PROVENANCE.md +86 -0
- package/src/client/assets/fonts/FIRACODE-OFL.txt +93 -0
- package/src/client/assets/fonts/FIRACODE-PROVENANCE.md +81 -0
- package/src/client/assets/fonts/IOSEVKA-OFL.txt +110 -0
- package/src/client/assets/fonts/IOSEVKA-PROVENANCE.md +101 -0
- package/src/client/assets/fonts/OPENDYSLEXIC-OFL.txt +94 -0
- package/src/client/assets/fonts/OPENDYSLEXIC-PROVENANCE.md +80 -0
- package/src/client/assets/fonts/PROVENANCE.md +11 -3
- package/dist/static/assets/index-CNDJxinP.css +0 -1
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ Open `http://127.0.0.1:5343`.
|
|
|
69
69
|
matching safe index links.
|
|
70
70
|
- **Settings** — persistent defaults (provider-grouped model dropdown,
|
|
71
71
|
thinking, queue modes, image handling, skill commands, transport,
|
|
72
|
-
hide-thinking, compaction/retry, and maximum concurrent subagents), a scoped-models editor, per-agent model
|
|
72
|
+
hide-thinking, compaction/retry, and maximum concurrent subagents), automatic tab-title enable/model controls, a scoped-models editor, per-agent model
|
|
73
73
|
fallback editor, and the global-only nested-context policy: an auditable trusted-roots list with
|
|
74
74
|
revoke and simple add-by-path controls, plus a prominent expert trust-all
|
|
75
75
|
warning. The Files view remains the primary trust-grant flow. Most defaults
|
|
@@ -81,7 +81,9 @@ Open `http://127.0.0.1:5343`.
|
|
|
81
81
|
transcript image display mode, and notification permission), an appearance section with a curated-theme gallery
|
|
82
82
|
(entropist.ca / Dim / Solarized / Gruvbox / Caves of Qud / Van Gogh /
|
|
83
83
|
Okabe-Ito / Paul Tol — the last two colorblind-safe — live preview cards,
|
|
84
|
-
system/light/dark mode selector,
|
|
84
|
+
system/light/dark mode selector, and Theme default / IBM Plex Mono /
|
|
85
|
+
JetBrains Mono / Fira Code / Iosevka / OpenDyslexic / Atkinson Hyperlegible
|
|
86
|
+
font selector, saved per browser), current pairing code,
|
|
85
87
|
the 1–3650 day lifetime used by future pairings (180 days by default), and
|
|
86
88
|
paired-device expiry/unpair management.
|
|
87
89
|
- **Pairing** — remote first-login rotating-code flow.
|
|
@@ -366,12 +368,20 @@ Browser (SolidJS, hash-routed SPA)
|
|
|
366
368
|
Solarized, Gruvbox, Caves of Qud, Van Gogh, and the colorblind-safe Okabe-Ito
|
|
367
369
|
and Paul Tol palettes), each with light and dark palettes, plus a
|
|
368
370
|
system/light/dark mode.
|
|
369
|
-
A settings theme gallery renders live preview cards
|
|
370
|
-
browser in `localStorage` (a pristine
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
371
|
+
A settings theme gallery renders live preview cards beside mode and font
|
|
372
|
+
selectors; selections persist per browser in `localStorage` (a pristine
|
|
373
|
+
entropist.ca + system + Theme default install leaves no keys and matches the
|
|
374
|
+
`tokens.css` baseline exactly). Theme default keeps each theme's built-in
|
|
375
|
+
family: most use Google-hosted IBM Plex Mono, while Gruvbox uses the bundled
|
|
376
|
+
self-hosted JetBrains Mono (OFL, in `src/client/assets/fonts/`). An explicit
|
|
377
|
+
IBM Plex Mono, JetBrains Mono, Fira Code, Iosevka, OpenDyslexic, or Atkinson
|
|
378
|
+
Hyperlegible selection overrides any theme and is reflected in previews. The
|
|
379
|
+
self-hosted families — JetBrains Mono, Fira Code, Iosevka, the bundled
|
|
380
|
+
dyslexia-friendly OpenDyslexic, and the low-vision-friendly Atkinson
|
|
381
|
+
Hyperlegible (all OFL, same directory) — are
|
|
382
|
+
lazy-loaded only when active typography uses them. No `light-dark()` (iOS
|
|
383
|
+
Safari 16.4 floor); a synchronous `index.html` bootstrap
|
|
384
|
+
prevents a wrong-appearance flash. The static
|
|
375
385
|
`manifest.webmanifest` keeps white (default-light) launch colors as the
|
|
376
386
|
fallback, while the live `theme-color` meta follows the active appearance.
|
|
377
387
|
|
|
@@ -482,6 +482,16 @@ export interface SubagentArbiterSettingsDto {
|
|
|
482
482
|
thinking?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
483
483
|
guidePath?: string;
|
|
484
484
|
}
|
|
485
|
+
export interface TabTitleSettingsDto {
|
|
486
|
+
enabled?: boolean;
|
|
487
|
+
model?: string;
|
|
488
|
+
triggerAfter?: number;
|
|
489
|
+
maxTitleLength?: number;
|
|
490
|
+
}
|
|
491
|
+
/** Partial tab-title update; `model: null` removes the pinned model, restoring Explore-agent routing. */
|
|
492
|
+
export type TabTitleSettingsUpdateDto = Omit<TabTitleSettingsDto, "model"> & {
|
|
493
|
+
model?: string | null;
|
|
494
|
+
};
|
|
485
495
|
export interface SettingsDto {
|
|
486
496
|
defaultProvider?: string;
|
|
487
497
|
defaultModel?: string;
|
|
@@ -504,6 +514,8 @@ export interface SettingsDto {
|
|
|
504
514
|
agentModels?: Record<string, string[]>;
|
|
505
515
|
/** Global-only Dispatch Arbiter configuration. */
|
|
506
516
|
subagentArbiter?: SubagentArbiterSettingsDto | null;
|
|
517
|
+
/** Effective automatic tab-title configuration. */
|
|
518
|
+
tabTitle?: TabTitleSettingsDto;
|
|
507
519
|
/** Raw effective persisted patterns; absent means future-inclusive implicit all. */
|
|
508
520
|
enabledModels?: string[];
|
|
509
521
|
/** Effective persistent scope resolved by coding-agent core in cycling order. */
|
|
@@ -516,9 +528,10 @@ export interface SettingsDto {
|
|
|
516
528
|
hasProjectEnabledModelsOverride: boolean;
|
|
517
529
|
enabledModelsSource: "default" | "global" | "project";
|
|
518
530
|
}
|
|
519
|
-
/** Dashboard settings mutation payload. Unlike a snapshot, null explicitly clears enabledModels. */
|
|
531
|
+
/** Dashboard settings mutation payload. Unlike a snapshot, null explicitly clears enabledModels, and tabTitle.model: null removes the pinned title model. */
|
|
520
532
|
export type SettingsUpdateDto = Partial<Pick<SettingsDto, "defaultProvider" | "defaultModel" | "defaultThinkingLevel" | "steeringMode" | "followUpMode" | "compactionEnabled" | "retryEnabled" | "maxConcurrentSubagents" | "imageAutoResize" | "blockImages" | "enableSkillCommands" | "autoLoadNestedContext" | "trustedContextFolders" | "transport" | "hideThinkingBlock" | "agentModels" | "subagentArbiter">> & {
|
|
521
533
|
enabledModels?: string[] | null;
|
|
534
|
+
tabTitle?: TabTitleSettingsUpdateDto;
|
|
522
535
|
};
|
|
523
536
|
export type SettingsSaveResultDto = SettingsDto & {
|
|
524
537
|
warnings?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,0FAA0F;AAC1F,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,oEAAoE;AACpE,MAAM,WAAW,mBAAmB;IACnC,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;CAC1E;AAED,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,KAAK,CAAC,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,kEAAkE;AAClE,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,MAAM,CAAC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AAoB,EAAE,cAAc,EAAE,CAAC;IACvC,0DAA0D;IAC1D,aAAa,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,+BAA+B,EAAE,OAAO,CAAC;IACzC,mBAAmB,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACtD;AAED,oGAAoG;AACpG,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACtC,IAAI,CACH,WAAW,EACT,iBAAiB,GACjB,cAAc,GACd,sBAAsB,GACtB,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,cAAc,GACd,wBAAwB,GACxB,iBAAiB,GACjB,aAAa,GACb,qBAAqB,GACrB,uBAAuB,GACvB,uBAAuB,GACvB,WAAW,GACX,mBAAmB,GACnB,aAAa,GACb,iBAAiB,CACnB,CACD,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;CAAE,CAAC;AAExC,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAE1E,iDAAiD;AACjD,MAAM,WAAW,YAAY;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;CACnB;AAED,4DAA4D;AAC5D,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACpB","sourcesContent":["/**\n * Wire types shared between the dashboard server and the browser client.\n *\n * These are standalone definitions (not imports from @dreb/coding-agent) so the\n * client bundle stays free of node-flavored type resolution. Server code maps\n * RPC DTOs onto these shapes; TypeScript structural typing enforces\n * compatibility at the mapping sites.\n */\n\n/** Maximum Unicode code points carried for an on-disk session's first-message preview. */\nexport const MAX_SESSION_PREVIEW_CHARACTERS = 256;\n\n/** Session metadata (mirrors RpcSessionInfo, with a bounded first-message preview). */\nexport interface SessionInfoDto {\n\tpath: string;\n\tid: string;\n\tcwd: string;\n\tname?: string;\n\tcreated: string;\n\tmodified: string;\n\tmessageCount: number;\n\tfirstMessage: string;\n}\n\n/** On-disk session inventory, independent of live runtime state. */\nexport interface SessionInventoryDto {\n\tsessions: SessionInfoDto[];\n}\n\nexport interface ArbitrationRouteDto {\n\tagent: string;\n\tmodel: string;\n\tthinking: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n}\n\nexport interface SubagentArbitrationDto {\n\tstatus: \"success\" | \"failure\";\n\tproposed: ArbitrationRouteDto;\n\tfinal: ArbitrationRouteDto | null;\n\tchanged: Array<\"agent\" | \"model\" | \"thinking\">;\n\tstep?: number;\n\terrorCode?: string;\n\terrorMessage?: string;\n}\n\n/** Background agent metadata (mirrors RpcBackgroundAgentInfo). */\nexport interface BackgroundAgentDto {\n\tagentId: string;\n\tagentType: string;\n\ttaskSummary: string;\n\tstartedAt: string;\n\tstatus: \"running\" | \"completed\" | \"failed\";\n\tsessionDir?: string;\n\tsessionFile?: string;\n\tcwd?: string;\n\tarbitrations?: SubagentArbitrationDto[];\n}\n\n/**\n * Shared eviction cap for completed/failed background agents. The server\n * prunes its registry to this bound and the client applies the same cap as\n * defense-in-depth — the two sides must agree on how many completed agents\n * survive, so the constant lives here.\n */\nexport const MAX_COMPLETED_BACKGROUND_AGENTS = 20;\n\n/** Maximum JSON prompt request body accepted by the dashboard server. */\nexport const MAX_PROMPT_BODY_BYTES = 25 * 1024 * 1024;\n\n/** Maximum accepted JSON body for optional, payload-free SSE client diagnostics. */\nexport const MAX_CLIENT_DIAGNOSTIC_BYTES = 4 * 1024;\n\nexport type EventConnectionState =\n\t| \"connecting\"\n\t| \"connected\"\n\t| \"retrying\"\n\t| \"resyncing\"\n\t| \"disconnected\"\n\t| \"auth_failed\";\n\n/**\n * Deliberately payload-free client connection telemetry. It is useful for\n * correlating stream failures with server logs, without sending prompts,\n * cookies, tool data, or SSE event contents back to the server.\n */\nexport interface ClientConnectionDiagnosticDto {\n\tconnectionId: string;\n\tstate: EventConnectionState;\n\tpreviousState?: EventConnectionState;\n\tattempt: number;\n\tdelayMs?: number;\n\tvisibility: \"visible\" | \"hidden\";\n\tlastAppliedSeq?: number;\n\theartbeatAgeMs?: number;\n\teventCount: number;\n\teventRatePerMinute: number;\n\tprocessingLagTotalMs: number;\n\tprocessingLagMaxMs: number;\n}\n\n/**\n * Inline images are base64-encoded inside the JSON prompt body. Base64 expands\n * raw bytes by 4/3, so a 25 MiB body can carry at most floor(25 MiB * 3/4) =\n * 18.75 MiB of raw image data before JSON syntax and prompt text. Reserve the\n * remaining 0.75 MiB for that overhead and advertise an 18 MiB aggregate raw\n * image budget to the browser.\n */\nexport const MAX_TOTAL_IMAGE_BYTES = Math.floor((MAX_PROMPT_BODY_BYTES * 3) / 4) - 768 * 1024;\n\n/** Context usage (mirrors ContextUsage — the numbers the TUI footer shows). */\nexport interface ContextUsageDto {\n\ttokens: number | null;\n\tcontextWindow: number;\n\tpercent: number | null;\n}\n\nexport interface ScopedModelDto {\n\tprovider: string;\n\tid: string;\n\tname?: string;\n\treasoning?: boolean;\n\tthinkingLevel?: string;\n}\n\nexport interface SessionStatsDto {\n\tsessionFile?: string;\n\tsessionId: string;\n\tuserMessages: number;\n\tassistantMessages: number;\n\ttoolCalls: number;\n\ttoolResults: number;\n\ttotalMessages: number;\n\ttokens: {\n\t\tinput: number;\n\t\toutput: number;\n\t\tcacheRead: number;\n\t\tcacheWrite: number;\n\t\ttotal: number;\n\t};\n\tcost: number;\n\tcontextUsage?: ContextUsageDto;\n}\n\nexport interface PerformanceModelSummaryDto {\n\tprovider: string;\n\tmodelId: string;\n\trolling: { median: number; mean: number; count: number };\n\tdelta: {\n\t\tbaselineMedian: number;\n\t\trecentMedian: number;\n\t\tpercentDelta: number;\n\t\tdirection: \"above\" | \"below\" | \"stable\";\n\t\tbaselineCount: number;\n\t\trecentCount: number;\n\t};\n}\n\nexport interface PerformanceStatsDto {\n\tmodels: PerformanceModelSummaryDto[];\n}\n\nexport interface ResourcesDto {\n\tcontextFiles: Array<{ path: string }>;\n\tskills: Array<{ name: string; description: string }>;\n\textensions: Array<{ name?: string; path: string }>;\n\tpromptTemplates: Array<{ name: string; description?: string }>;\n\tsystemPromptPresent: boolean;\n}\n\nexport interface ImageAttachmentDto {\n\tdata: string;\n\tmimeType: string;\n}\n\n/**\n * Browser-facing reference to a validated tool-result raster image. Original\n * bytes remain behind authenticated runtime routes and never cross transcript\n * JSON or SSE payloads.\n */\nexport interface DashboardImageReferenceDto {\n\ttype: \"image_reference\";\n\t/** SHA-256 of the exact MIME type plus decoded original bytes. */\n\tid: string;\n\t/** Exact allowlisted original MIME type. */\n\tmimeType: \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/webp\";\n\t/** Decoded original binary byte size. */\n\tsize: number;\n}\n\nexport const DASHBOARD_IMAGE_DISPLAY_MODES = [\"placeholders\", \"previews\", \"originals\"] as const;\nexport type DashboardImageDisplayMode = (typeof DASHBOARD_IMAGE_DISPLAY_MODES)[number];\n\nexport interface QueuedMessageDto {\n\ttext: string;\n\timages?: ImageAttachmentDto[];\n}\n\nexport interface PendingMessagesDto {\n\t/** Text-only compatibility view. */\n\tsteering: string[];\n\t/** Text-only compatibility view. */\n\tfollowUp: string[];\n\t/** Full queued payloads, including inline image attachments. */\n\tsteeringMessages?: QueuedMessageDto[];\n\t/** Full queued payloads, including inline image attachments. */\n\tfollowUpMessages?: QueuedMessageDto[];\n}\n\nexport interface CommandDto {\n\tname: string;\n\tdescription?: string;\n\tsource: \"extension\" | \"prompt\" | \"skill\" | \"builtin\";\n\t/** Built-ins with false are intercepted when typed but omitted from autocomplete. */\n\tdashboard?: boolean;\n}\n\nexport interface SessionTreeNodeDto {\n\tid: string;\n\tparentId: string | null;\n\ttype: string;\n\trole?: string;\n\tpreview: string;\n\ttimestamp: string;\n\tlabel?: string;\n\tchildren: SessionTreeNodeDto[];\n}\n\nexport interface RuntimeStatsSummaryDto {\n\ttokensTotal: number;\n\tcost: number;\n}\n\n/** Current task list (mirrors RpcSessionTask). */\nexport interface SessionTaskDto {\n\tid: string;\n\ttitle: string;\n\tstatus: \"pending\" | \"in_progress\" | \"completed\";\n}\n\n/** Live session state (mirrors RpcSessionState, model reduced to id fields). */\nexport interface SessionStateDto {\n\tmodel?: { provider: string; id: string; name?: string; reasoning?: boolean };\n\tscopedModels?: ScopedModelDto[];\n\tusingSubscription?: boolean;\n\t/** Current task list, atomically replaced by tasks_update events. */\n\ttasks: SessionTaskDto[];\n\tthinkingLevel: string;\n\t/** Model-aware levels available for selection and cycling. */\n\tavailableThinkingLevels: string[];\n\tisStreaming: boolean;\n\t/** True while automatic retry classification, backoff, or execution is active. */\n\tisRetrying?: boolean;\n\t/** Current automatic retry attempt, or 0 outside an emitted retry attempt. */\n\tretryAttempt?: number;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n\tcontextUsage?: ContextUsageDto;\n\tmodelFallbackMessage?: string;\n}\n\n/** A live runtime managed by the dashboard server's pool. */\nexport interface RuntimeInfoDto {\n\t/** Pool key — stable identity for API calls and SSE envelopes. */\n\tkey: string;\n\tcwd: string;\n\tstate: SessionStateDto;\n\t/** Monotonic pool revision for confirmed model/thinking mutations. */\n\tsettingsRevision?: number;\n\t/** Lean session stats for fleet cards; omitted when the runtime stats call fails. */\n\tstats?: RuntimeStatsSummaryDto;\n\t/** Background agents known to this runtime. */\n\tbackgroundAgents: BackgroundAgentDto[];\n\t/** Server-derived needs-attention flag (extension UI pending, paused, error). */\n\tneedsAttention: boolean;\n\t/** Runtime-level error that should survive browser reloads. */\n\terror?: string;\n\t/** Last assistant text, truncated for fleet-card previews. */\n\tlastAssistantText?: string;\n\t/** Session start timestamp (ISO) — stable tiebreak for deterministic fleet ordering. */\n\tcreatedAt: string;\n\t/** Last activity timestamp (ISO). */\n\tlastActivity: string;\n}\n\n/**\n * Lightweight, event-derived live-runtime view for fleet SSE updates.\n *\n * Unlike RuntimeInfoDto, this deliberately excludes RPC-fetched stats and\n * assistant preview text: RuntimePool can build it synchronously from its\n * in-memory runtime registry.\n */\nexport interface FleetRuntimeSnapshotDto {\n\tkey: string;\n\tcwd: string;\n\tstate: SessionStateDto;\n\t/** Monotonic pool revision for confirmed model/thinking mutations. */\n\tsettingsRevision?: number;\n\tbackgroundAgents: BackgroundAgentDto[];\n\tneedsAttention: boolean;\n\terror?: string;\n\tcreatedAt: string;\n\tlastActivity: string;\n}\n\n/** Coalesced fleet update published on the dashboard SSE stream. */\nexport interface FleetSnapshotEventDto {\n\ttype: \"fleet_snapshot\";\n\truntimes: FleetRuntimeSnapshotDto[];\n}\n\n/** Fleet snapshot: live runtimes + on-disk inventory. */\nexport interface FleetDto {\n\truntimes: RuntimeInfoDto[];\n\tdiskSessions: SessionInfoDto[];\n}\n\n/** A single question inside an `ask` extension-UI request (mirrors RpcAskQuestion). */\nexport interface AskUiQuestionDto {\n\tquestion: string;\n\ttitle?: string;\n\toptions?: string[];\n\tallowFreeText?: boolean;\n\tmultiSelect?: boolean;\n\tmultiline?: boolean;\n}\n\n/** A blocking extension UI request that can be restored from a runtime snapshot. */\nexport interface ExtensionUiRequestDto {\n\ttype: \"extension_ui_request\";\n\tid: string;\n\tmethod: \"select\" | \"confirm\" | \"input\" | \"editor\" | \"ask\";\n\ttitle: string;\n\tmessage?: string;\n\toptions?: string[];\n\tprefill?: string;\n\tplaceholder?: string;\n\t/** For the `ask` method: one or more questions asked together as a single wizard. */\n\tquestions?: AskUiQuestionDto[];\n\ttimeout?: number;\n\t/** Absolute Unix timestamp in milliseconds when the runtime timeout fires. */\n\texpiresAt?: number;\n}\n\n/**\n * Atomic parent-session snapshot for drill-in hydration. Its barrier sequence\n * marks the SSE ordering point captured by the matching RPC snapshot marker.\n */\nexport interface RuntimeHydrationDto {\n\tkey: string;\n\tstate: SessionStateDto;\n\tmessages: unknown[];\n\tbackgroundAgents: BackgroundAgentDto[];\n\t/** Dialogs still waiting for a host response at the snapshot boundary. */\n\tpendingExtensionUiRequests?: ExtensionUiRequestDto[];\n\tbarrierSeq: number;\n}\n\n/** Parent/subagent data restored by an authoritative recovery snapshot. */\nexport interface ActiveRuntimeSnapshotDto extends RuntimeHydrationDto {\n\tsubagent?: { agentId: string; agent: BackgroundAgentDto; messages: unknown[]; barrierSeq: number };\n}\n\n/** Fleet refresh plus the active runtime's explicitly ordered snapshot. */\nexport interface DashboardResyncDto {\n\tfleet: FleetDto;\n\tactive?: ActiveRuntimeSnapshotDto;\n\t/** The global barrier to await before applying the payload. */\n\tbarrierSeq: number;\n}\n\n/**\n * SSE envelope. Every event on the dashboard stream wraps a session event with\n * the runtime key it came from plus a monotonically increasing sequence number\n * used for Last-Event-ID catch-up on reconnect.\n */\nexport interface EventEnvelope {\n\tseq: number;\n\tkey: string;\n\t/** An AgentSessionEvent (or dashboard-synthesized event) as emitted by the runtime. */\n\tevent: Record<string, unknown>;\n}\n\n/** File listing entry. */\nexport interface FileEntryDto {\n\tname: string;\n\ttype: \"file\" | \"dir\" | \"symlink\" | \"other\";\n\tsize: number;\n\tmodified: string;\n}\n\n/** Directory listing response. */\nexport interface ContextTrustEvaluationDto {\n\t/** Canonical existing directory evaluated by the utility RPC runtime. */\n\tcanonicalTarget: string;\n\t/** Whether nested context is untrusted, granted by a root, or globally unrestricted. */\n\tstate: \"untrusted\" | \"trusted-root\" | \"unrestricted\";\n\t/** Canonical root granting trusted-root access, including inherited access. */\n\tgrantingRoot?: string;\n}\n\n/** Result of changing a context-trust root through the utility RPC runtime. */\nexport interface ContextTrustMutationResultDto {\n\tevaluation: ContextTrustEvaluationDto;\n\tsettings: SettingsDto;\n\taddedRoot?: string;\n\tremovedRoot?: string;\n}\n\n/** Result of removing a configured trusted-folder string exactly as stored. */\nexport interface TrustedFolderRemovalResultDto {\n\tsettings: SettingsDto;\n\tremovedFolder: string;\n}\n\n/** Directory listing response. */\nexport interface DirListingDto {\n\t/** Canonicalized absolute path of the listed directory. */\n\tpath: string;\n\tentries: FileEntryDto[];\n\t/** Current global nested-context trust for this canonical directory. */\n\tcontextTrust: ContextTrustEvaluationDto;\n}\n\nexport type MemoryScopeKindDto = \"global\" | \"project\";\nexport type MemoryEntryTypeDto = \"user-preferences\" | \"good-practices\" | \"project\" | \"navigation\";\n\nexport interface MemoryEntryMetadataDto {\n\tname: string;\n\tdescription: string;\n\ttype: MemoryEntryTypeDto;\n}\n\nexport interface MemoryScopeDto {\n\tid: string;\n\tkind: MemoryScopeKindDto;\n\tlabel: string;\n\tprojectRoot?: string;\n\tmemoryDir: string;\n\texists: boolean;\n}\n\nexport interface MemoryEntrySummaryDto {\n\tfile: string;\n\tmetadata?: MemoryEntryMetadataDto;\n\tmetadataError?: string;\n\tmodified: string;\n\tsize: number;\n}\n\nexport interface MemoryListingDto {\n\tscope: MemoryScopeDto;\n\tindexContent: string | null;\n\tindexRevision: string | null;\n\tindexOverLimit: boolean;\n\tentries: MemoryEntrySummaryDto[];\n}\n\nexport interface MemoryDocumentDto {\n\tkind: \"index\" | \"entry\";\n\tfile: string;\n\tcontent: string;\n\trevision: string;\n\tmetadata?: MemoryEntryMetadataDto;\n\tmetadataError?: string;\n}\n\nexport interface MemoryMutationResultDto {\n\tlisting: MemoryListingDto;\n\tdocument?: MemoryDocumentDto;\n}\n\n/** Auth mode reported to the client. */\nexport interface AuthStatusDto {\n\tmode: \"local\" | \"remote\";\n\t/** Identity string for remote devices (e.g. Tailscale login name). */\n\tidentity?: string;\n\tdevice?: string;\n\t/** Present only when this auth check atomically claimed today's warning. */\n\tpairingExpiryWarning?: { expiresAt: string };\n\t/** Server-authoritative time for the next expiry-status check. */\n\tpairingExpiryCheckAt?: string;\n}\n\n/** Dashboard-auth-owned setting for future pairings. */\nexport interface PairingSettingsDto {\n\tpairingTtlDays: number;\n}\n\n/** Current rotating pairing code, readable only from the host/local dashboard. */\nexport interface PairingCodeDto {\n\tenabled: boolean;\n\tcode?: string;\n\texpiresInMs?: number;\n}\n\n/** A paired device (settings → devices). */\nexport interface PairedDeviceDto {\n\tid: string;\n\tidentity: string;\n\tdevice?: string;\n\tcreatedAt: string;\n\texpiresAt: string;\n}\n\n/** Dashboard settings snapshot (mirrors RpcSettingsSnapshot). */\nexport interface SubagentArbiterSettingsDto {\n\tenabled?: boolean;\n\tmodel?: string;\n\tthinking?: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n\tguidePath?: string;\n}\n\nexport interface SettingsDto {\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: string;\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\tcompactionEnabled?: boolean;\n\tretryEnabled?: boolean;\n\tmaxConcurrentSubagents?: number;\n\timageAutoResize?: boolean;\n\tblockImages?: boolean;\n\tenableSkillCommands?: boolean;\n\tautoLoadNestedContext?: boolean;\n\t/** Global configured trusted context folders, including invalid legacy entries. */\n\ttrustedContextFolders?: string[];\n\t/** Canonical existing trusted roots currently enforced by the runtime. */\n\teffectiveTrustedContextRoots?: string[];\n\ttransport?: \"sse\" | \"websocket\" | \"auto\";\n\thideThinkingBlock?: boolean;\n\tagentModels?: Record<string, string[]>;\n\t/** Global-only Dispatch Arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettingsDto | null;\n\t/** Raw effective persisted patterns; absent means future-inclusive implicit all. */\n\tenabledModels?: string[];\n\t/** Effective persistent scope resolved by coding-agent core in cycling order. */\n\tresolvedScopedModels: ScopedModelDto[];\n\t/** Resolver diagnostics for legacy persisted patterns. */\n\tscopeWarnings: Array<{ pattern: string; message: string }>;\n\thasProjectEnabledModelsOverride: boolean;\n\tenabledModelsSource: \"default\" | \"global\" | \"project\";\n}\n\n/** Dashboard settings mutation payload. Unlike a snapshot, null explicitly clears enabledModels. */\nexport type SettingsUpdateDto = Partial<\n\tPick<\n\t\tSettingsDto,\n\t\t| \"defaultProvider\"\n\t\t| \"defaultModel\"\n\t\t| \"defaultThinkingLevel\"\n\t\t| \"steeringMode\"\n\t\t| \"followUpMode\"\n\t\t| \"compactionEnabled\"\n\t\t| \"retryEnabled\"\n\t\t| \"maxConcurrentSubagents\"\n\t\t| \"imageAutoResize\"\n\t\t| \"blockImages\"\n\t\t| \"enableSkillCommands\"\n\t\t| \"autoLoadNestedContext\"\n\t\t| \"trustedContextFolders\"\n\t\t| \"transport\"\n\t\t| \"hideThinkingBlock\"\n\t\t| \"agentModels\"\n\t\t| \"subagentArbiter\"\n\t>\n> & { enabledModels?: string[] | null };\n\nexport type SettingsSaveResultDto = SettingsDto & { warnings?: string[] };\n\n/** Available model entry (mirrors ModelInfo). */\nexport interface ModelInfoDto {\n\tprovider: string;\n\tid: string;\n\tname: string;\n\tcontextWindow: number;\n\treasoning: boolean;\n}\n\n/** Agent definition metadata (mirrors RpcAgentTypeInfo). */\nexport interface AgentTypeDto {\n\tname: string;\n\tdescription: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,0FAA0F;AAC1F,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MA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E,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,+BAA+B,EAAE,OAAO,CAAC;IACzC,mBAAmB,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACtD;AAED,6JAA6J;AAC7J,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACtC,IAAI,CACH,WAAW,EACT,iBAAiB,GACjB,cAAc,GACd,sBAAsB,GACtB,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,cAAc,GACd,wBAAwB,GACxB,iBAAiB,GACjB,aAAa,GACb,qBAAqB,GACrB,uBAAuB,GACvB,uBAAuB,GACvB,WAAW,GACX,mBAAmB,GACnB,aAAa,GACb,iBAAiB,CACnB,CACD,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,yBAAyB,CAAA;CAAE,CAAC;AAE9E,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAE1E,iDAAiD;AACjD,MAAM,WAAW,YAAY;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;CACnB;AAED,4DAA4D;AAC5D,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACpB","sourcesContent":["/**\n * Wire types shared between the dashboard server and the browser client.\n *\n * These are standalone definitions (not imports from @dreb/coding-agent) so the\n * client bundle stays free of node-flavored type resolution. Server code maps\n * RPC DTOs onto these shapes; TypeScript structural typing enforces\n * compatibility at the mapping sites.\n */\n\n/** Maximum Unicode code points carried for an on-disk session's first-message preview. */\nexport const MAX_SESSION_PREVIEW_CHARACTERS = 256;\n\n/** Session metadata (mirrors RpcSessionInfo, with a bounded first-message preview). */\nexport interface SessionInfoDto {\n\tpath: string;\n\tid: string;\n\tcwd: string;\n\tname?: string;\n\tcreated: string;\n\tmodified: string;\n\tmessageCount: number;\n\tfirstMessage: string;\n}\n\n/** On-disk session inventory, independent of live runtime state. */\nexport interface SessionInventoryDto {\n\tsessions: SessionInfoDto[];\n}\n\nexport interface ArbitrationRouteDto {\n\tagent: string;\n\tmodel: string;\n\tthinking: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n}\n\nexport interface SubagentArbitrationDto {\n\tstatus: \"success\" | \"failure\";\n\tproposed: ArbitrationRouteDto;\n\tfinal: ArbitrationRouteDto | null;\n\tchanged: Array<\"agent\" | \"model\" | \"thinking\">;\n\tstep?: number;\n\terrorCode?: string;\n\terrorMessage?: string;\n}\n\n/** Background agent metadata (mirrors RpcBackgroundAgentInfo). */\nexport interface BackgroundAgentDto {\n\tagentId: string;\n\tagentType: string;\n\ttaskSummary: string;\n\tstartedAt: string;\n\tstatus: \"running\" | \"completed\" | \"failed\";\n\tsessionDir?: string;\n\tsessionFile?: string;\n\tcwd?: string;\n\tarbitrations?: SubagentArbitrationDto[];\n}\n\n/**\n * Shared eviction cap for completed/failed background agents. The server\n * prunes its registry to this bound and the client applies the same cap as\n * defense-in-depth — the two sides must agree on how many completed agents\n * survive, so the constant lives here.\n */\nexport const MAX_COMPLETED_BACKGROUND_AGENTS = 20;\n\n/** Maximum JSON prompt request body accepted by the dashboard server. */\nexport const MAX_PROMPT_BODY_BYTES = 25 * 1024 * 1024;\n\n/** Maximum accepted JSON body for optional, payload-free SSE client diagnostics. */\nexport const MAX_CLIENT_DIAGNOSTIC_BYTES = 4 * 1024;\n\nexport type EventConnectionState =\n\t| \"connecting\"\n\t| \"connected\"\n\t| \"retrying\"\n\t| \"resyncing\"\n\t| \"disconnected\"\n\t| \"auth_failed\";\n\n/**\n * Deliberately payload-free client connection telemetry. It is useful for\n * correlating stream failures with server logs, without sending prompts,\n * cookies, tool data, or SSE event contents back to the server.\n */\nexport interface ClientConnectionDiagnosticDto {\n\tconnectionId: string;\n\tstate: EventConnectionState;\n\tpreviousState?: EventConnectionState;\n\tattempt: number;\n\tdelayMs?: number;\n\tvisibility: \"visible\" | \"hidden\";\n\tlastAppliedSeq?: number;\n\theartbeatAgeMs?: number;\n\teventCount: number;\n\teventRatePerMinute: number;\n\tprocessingLagTotalMs: number;\n\tprocessingLagMaxMs: number;\n}\n\n/**\n * Inline images are base64-encoded inside the JSON prompt body. Base64 expands\n * raw bytes by 4/3, so a 25 MiB body can carry at most floor(25 MiB * 3/4) =\n * 18.75 MiB of raw image data before JSON syntax and prompt text. Reserve the\n * remaining 0.75 MiB for that overhead and advertise an 18 MiB aggregate raw\n * image budget to the browser.\n */\nexport const MAX_TOTAL_IMAGE_BYTES = Math.floor((MAX_PROMPT_BODY_BYTES * 3) / 4) - 768 * 1024;\n\n/** Context usage (mirrors ContextUsage — the numbers the TUI footer shows). */\nexport interface ContextUsageDto {\n\ttokens: number | null;\n\tcontextWindow: number;\n\tpercent: number | null;\n}\n\nexport interface ScopedModelDto {\n\tprovider: string;\n\tid: string;\n\tname?: string;\n\treasoning?: boolean;\n\tthinkingLevel?: string;\n}\n\nexport interface SessionStatsDto {\n\tsessionFile?: string;\n\tsessionId: string;\n\tuserMessages: number;\n\tassistantMessages: number;\n\ttoolCalls: number;\n\ttoolResults: number;\n\ttotalMessages: number;\n\ttokens: {\n\t\tinput: number;\n\t\toutput: number;\n\t\tcacheRead: number;\n\t\tcacheWrite: number;\n\t\ttotal: number;\n\t};\n\tcost: number;\n\tcontextUsage?: ContextUsageDto;\n}\n\nexport interface PerformanceModelSummaryDto {\n\tprovider: string;\n\tmodelId: string;\n\trolling: { median: number; mean: number; count: number };\n\tdelta: {\n\t\tbaselineMedian: number;\n\t\trecentMedian: number;\n\t\tpercentDelta: number;\n\t\tdirection: \"above\" | \"below\" | \"stable\";\n\t\tbaselineCount: number;\n\t\trecentCount: number;\n\t};\n}\n\nexport interface PerformanceStatsDto {\n\tmodels: PerformanceModelSummaryDto[];\n}\n\nexport interface ResourcesDto {\n\tcontextFiles: Array<{ path: string }>;\n\tskills: Array<{ name: string; description: string }>;\n\textensions: Array<{ name?: string; path: string }>;\n\tpromptTemplates: Array<{ name: string; description?: string }>;\n\tsystemPromptPresent: boolean;\n}\n\nexport interface ImageAttachmentDto {\n\tdata: string;\n\tmimeType: string;\n}\n\n/**\n * Browser-facing reference to a validated tool-result raster image. Original\n * bytes remain behind authenticated runtime routes and never cross transcript\n * JSON or SSE payloads.\n */\nexport interface DashboardImageReferenceDto {\n\ttype: \"image_reference\";\n\t/** SHA-256 of the exact MIME type plus decoded original bytes. */\n\tid: string;\n\t/** Exact allowlisted original MIME type. */\n\tmimeType: \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/webp\";\n\t/** Decoded original binary byte size. */\n\tsize: number;\n}\n\nexport const DASHBOARD_IMAGE_DISPLAY_MODES = [\"placeholders\", \"previews\", \"originals\"] as const;\nexport type DashboardImageDisplayMode = (typeof DASHBOARD_IMAGE_DISPLAY_MODES)[number];\n\nexport interface QueuedMessageDto {\n\ttext: string;\n\timages?: ImageAttachmentDto[];\n}\n\nexport interface PendingMessagesDto {\n\t/** Text-only compatibility view. */\n\tsteering: string[];\n\t/** Text-only compatibility view. */\n\tfollowUp: string[];\n\t/** Full queued payloads, including inline image attachments. */\n\tsteeringMessages?: QueuedMessageDto[];\n\t/** Full queued payloads, including inline image attachments. */\n\tfollowUpMessages?: QueuedMessageDto[];\n}\n\nexport interface CommandDto {\n\tname: string;\n\tdescription?: string;\n\tsource: \"extension\" | \"prompt\" | \"skill\" | \"builtin\";\n\t/** Built-ins with false are intercepted when typed but omitted from autocomplete. */\n\tdashboard?: boolean;\n}\n\nexport interface SessionTreeNodeDto {\n\tid: string;\n\tparentId: string | null;\n\ttype: string;\n\trole?: string;\n\tpreview: string;\n\ttimestamp: string;\n\tlabel?: string;\n\tchildren: SessionTreeNodeDto[];\n}\n\nexport interface RuntimeStatsSummaryDto {\n\ttokensTotal: number;\n\tcost: number;\n}\n\n/** Current task list (mirrors RpcSessionTask). */\nexport interface SessionTaskDto {\n\tid: string;\n\ttitle: string;\n\tstatus: \"pending\" | \"in_progress\" | \"completed\";\n}\n\n/** Live session state (mirrors RpcSessionState, model reduced to id fields). */\nexport interface SessionStateDto {\n\tmodel?: { provider: string; id: string; name?: string; reasoning?: boolean };\n\tscopedModels?: ScopedModelDto[];\n\tusingSubscription?: boolean;\n\t/** Current task list, atomically replaced by tasks_update events. */\n\ttasks: SessionTaskDto[];\n\tthinkingLevel: string;\n\t/** Model-aware levels available for selection and cycling. */\n\tavailableThinkingLevels: string[];\n\tisStreaming: boolean;\n\t/** True while automatic retry classification, backoff, or execution is active. */\n\tisRetrying?: boolean;\n\t/** Current automatic retry attempt, or 0 outside an emitted retry attempt. */\n\tretryAttempt?: number;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n\tcontextUsage?: ContextUsageDto;\n\tmodelFallbackMessage?: string;\n}\n\n/** A live runtime managed by the dashboard server's pool. */\nexport interface RuntimeInfoDto {\n\t/** Pool key — stable identity for API calls and SSE envelopes. */\n\tkey: string;\n\tcwd: string;\n\tstate: SessionStateDto;\n\t/** Monotonic pool revision for confirmed model/thinking mutations. */\n\tsettingsRevision?: number;\n\t/** Lean session stats for fleet cards; omitted when the runtime stats call fails. */\n\tstats?: RuntimeStatsSummaryDto;\n\t/** Background agents known to this runtime. */\n\tbackgroundAgents: BackgroundAgentDto[];\n\t/** Server-derived needs-attention flag (extension UI pending, paused, error). */\n\tneedsAttention: boolean;\n\t/** Runtime-level error that should survive browser reloads. */\n\terror?: string;\n\t/** Last assistant text, truncated for fleet-card previews. */\n\tlastAssistantText?: string;\n\t/** Session start timestamp (ISO) — stable tiebreak for deterministic fleet ordering. */\n\tcreatedAt: string;\n\t/** Last activity timestamp (ISO). */\n\tlastActivity: string;\n}\n\n/**\n * Lightweight, event-derived live-runtime view for fleet SSE updates.\n *\n * Unlike RuntimeInfoDto, this deliberately excludes RPC-fetched stats and\n * assistant preview text: RuntimePool can build it synchronously from its\n * in-memory runtime registry.\n */\nexport interface FleetRuntimeSnapshotDto {\n\tkey: string;\n\tcwd: string;\n\tstate: SessionStateDto;\n\t/** Monotonic pool revision for confirmed model/thinking mutations. */\n\tsettingsRevision?: number;\n\tbackgroundAgents: BackgroundAgentDto[];\n\tneedsAttention: boolean;\n\terror?: string;\n\tcreatedAt: string;\n\tlastActivity: string;\n}\n\n/** Coalesced fleet update published on the dashboard SSE stream. */\nexport interface FleetSnapshotEventDto {\n\ttype: \"fleet_snapshot\";\n\truntimes: FleetRuntimeSnapshotDto[];\n}\n\n/** Fleet snapshot: live runtimes + on-disk inventory. */\nexport interface FleetDto {\n\truntimes: RuntimeInfoDto[];\n\tdiskSessions: SessionInfoDto[];\n}\n\n/** A single question inside an `ask` extension-UI request (mirrors RpcAskQuestion). */\nexport interface AskUiQuestionDto {\n\tquestion: string;\n\ttitle?: string;\n\toptions?: string[];\n\tallowFreeText?: boolean;\n\tmultiSelect?: boolean;\n\tmultiline?: boolean;\n}\n\n/** A blocking extension UI request that can be restored from a runtime snapshot. */\nexport interface ExtensionUiRequestDto {\n\ttype: \"extension_ui_request\";\n\tid: string;\n\tmethod: \"select\" | \"confirm\" | \"input\" | \"editor\" | \"ask\";\n\ttitle: string;\n\tmessage?: string;\n\toptions?: string[];\n\tprefill?: string;\n\tplaceholder?: string;\n\t/** For the `ask` method: one or more questions asked together as a single wizard. */\n\tquestions?: AskUiQuestionDto[];\n\ttimeout?: number;\n\t/** Absolute Unix timestamp in milliseconds when the runtime timeout fires. */\n\texpiresAt?: number;\n}\n\n/**\n * Atomic parent-session snapshot for drill-in hydration. Its barrier sequence\n * marks the SSE ordering point captured by the matching RPC snapshot marker.\n */\nexport interface RuntimeHydrationDto {\n\tkey: string;\n\tstate: SessionStateDto;\n\tmessages: unknown[];\n\tbackgroundAgents: BackgroundAgentDto[];\n\t/** Dialogs still waiting for a host response at the snapshot boundary. */\n\tpendingExtensionUiRequests?: ExtensionUiRequestDto[];\n\tbarrierSeq: number;\n}\n\n/** Parent/subagent data restored by an authoritative recovery snapshot. */\nexport interface ActiveRuntimeSnapshotDto extends RuntimeHydrationDto {\n\tsubagent?: { agentId: string; agent: BackgroundAgentDto; messages: unknown[]; barrierSeq: number };\n}\n\n/** Fleet refresh plus the active runtime's explicitly ordered snapshot. */\nexport interface DashboardResyncDto {\n\tfleet: FleetDto;\n\tactive?: ActiveRuntimeSnapshotDto;\n\t/** The global barrier to await before applying the payload. */\n\tbarrierSeq: number;\n}\n\n/**\n * SSE envelope. Every event on the dashboard stream wraps a session event with\n * the runtime key it came from plus a monotonically increasing sequence number\n * used for Last-Event-ID catch-up on reconnect.\n */\nexport interface EventEnvelope {\n\tseq: number;\n\tkey: string;\n\t/** An AgentSessionEvent (or dashboard-synthesized event) as emitted by the runtime. */\n\tevent: Record<string, unknown>;\n}\n\n/** File listing entry. */\nexport interface FileEntryDto {\n\tname: string;\n\ttype: \"file\" | \"dir\" | \"symlink\" | \"other\";\n\tsize: number;\n\tmodified: string;\n}\n\n/** Directory listing response. */\nexport interface ContextTrustEvaluationDto {\n\t/** Canonical existing directory evaluated by the utility RPC runtime. */\n\tcanonicalTarget: string;\n\t/** Whether nested context is untrusted, granted by a root, or globally unrestricted. */\n\tstate: \"untrusted\" | \"trusted-root\" | \"unrestricted\";\n\t/** Canonical root granting trusted-root access, including inherited access. */\n\tgrantingRoot?: string;\n}\n\n/** Result of changing a context-trust root through the utility RPC runtime. */\nexport interface ContextTrustMutationResultDto {\n\tevaluation: ContextTrustEvaluationDto;\n\tsettings: SettingsDto;\n\taddedRoot?: string;\n\tremovedRoot?: string;\n}\n\n/** Result of removing a configured trusted-folder string exactly as stored. */\nexport interface TrustedFolderRemovalResultDto {\n\tsettings: SettingsDto;\n\tremovedFolder: string;\n}\n\n/** Directory listing response. */\nexport interface DirListingDto {\n\t/** Canonicalized absolute path of the listed directory. */\n\tpath: string;\n\tentries: FileEntryDto[];\n\t/** Current global nested-context trust for this canonical directory. */\n\tcontextTrust: ContextTrustEvaluationDto;\n}\n\nexport type MemoryScopeKindDto = \"global\" | \"project\";\nexport type MemoryEntryTypeDto = \"user-preferences\" | \"good-practices\" | \"project\" | \"navigation\";\n\nexport interface MemoryEntryMetadataDto {\n\tname: string;\n\tdescription: string;\n\ttype: MemoryEntryTypeDto;\n}\n\nexport interface MemoryScopeDto {\n\tid: string;\n\tkind: MemoryScopeKindDto;\n\tlabel: string;\n\tprojectRoot?: string;\n\tmemoryDir: string;\n\texists: boolean;\n}\n\nexport interface MemoryEntrySummaryDto {\n\tfile: string;\n\tmetadata?: MemoryEntryMetadataDto;\n\tmetadataError?: string;\n\tmodified: string;\n\tsize: number;\n}\n\nexport interface MemoryListingDto {\n\tscope: MemoryScopeDto;\n\tindexContent: string | null;\n\tindexRevision: string | null;\n\tindexOverLimit: boolean;\n\tentries: MemoryEntrySummaryDto[];\n}\n\nexport interface MemoryDocumentDto {\n\tkind: \"index\" | \"entry\";\n\tfile: string;\n\tcontent: string;\n\trevision: string;\n\tmetadata?: MemoryEntryMetadataDto;\n\tmetadataError?: string;\n}\n\nexport interface MemoryMutationResultDto {\n\tlisting: MemoryListingDto;\n\tdocument?: MemoryDocumentDto;\n}\n\n/** Auth mode reported to the client. */\nexport interface AuthStatusDto {\n\tmode: \"local\" | \"remote\";\n\t/** Identity string for remote devices (e.g. Tailscale login name). */\n\tidentity?: string;\n\tdevice?: string;\n\t/** Present only when this auth check atomically claimed today's warning. */\n\tpairingExpiryWarning?: { expiresAt: string };\n\t/** Server-authoritative time for the next expiry-status check. */\n\tpairingExpiryCheckAt?: string;\n}\n\n/** Dashboard-auth-owned setting for future pairings. */\nexport interface PairingSettingsDto {\n\tpairingTtlDays: number;\n}\n\n/** Current rotating pairing code, readable only from the host/local dashboard. */\nexport interface PairingCodeDto {\n\tenabled: boolean;\n\tcode?: string;\n\texpiresInMs?: number;\n}\n\n/** A paired device (settings → devices). */\nexport interface PairedDeviceDto {\n\tid: string;\n\tidentity: string;\n\tdevice?: string;\n\tcreatedAt: string;\n\texpiresAt: string;\n}\n\n/** Dashboard settings snapshot (mirrors RpcSettingsSnapshot). */\nexport interface SubagentArbiterSettingsDto {\n\tenabled?: boolean;\n\tmodel?: string;\n\tthinking?: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n\tguidePath?: string;\n}\n\nexport interface TabTitleSettingsDto {\n\tenabled?: boolean;\n\tmodel?: string;\n\ttriggerAfter?: number;\n\tmaxTitleLength?: number;\n}\n\n/** Partial tab-title update; `model: null` removes the pinned model, restoring Explore-agent routing. */\nexport type TabTitleSettingsUpdateDto = Omit<TabTitleSettingsDto, \"model\"> & { model?: string | null };\n\nexport interface SettingsDto {\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: string;\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\tcompactionEnabled?: boolean;\n\tretryEnabled?: boolean;\n\tmaxConcurrentSubagents?: number;\n\timageAutoResize?: boolean;\n\tblockImages?: boolean;\n\tenableSkillCommands?: boolean;\n\tautoLoadNestedContext?: boolean;\n\t/** Global configured trusted context folders, including invalid legacy entries. */\n\ttrustedContextFolders?: string[];\n\t/** Canonical existing trusted roots currently enforced by the runtime. */\n\teffectiveTrustedContextRoots?: string[];\n\ttransport?: \"sse\" | \"websocket\" | \"auto\";\n\thideThinkingBlock?: boolean;\n\tagentModels?: Record<string, string[]>;\n\t/** Global-only Dispatch Arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettingsDto | null;\n\t/** Effective automatic tab-title configuration. */\n\ttabTitle?: TabTitleSettingsDto;\n\t/** Raw effective persisted patterns; absent means future-inclusive implicit all. */\n\tenabledModels?: string[];\n\t/** Effective persistent scope resolved by coding-agent core in cycling order. */\n\tresolvedScopedModels: ScopedModelDto[];\n\t/** Resolver diagnostics for legacy persisted patterns. */\n\tscopeWarnings: Array<{ pattern: string; message: string }>;\n\thasProjectEnabledModelsOverride: boolean;\n\tenabledModelsSource: \"default\" | \"global\" | \"project\";\n}\n\n/** Dashboard settings mutation payload. Unlike a snapshot, null explicitly clears enabledModels, and tabTitle.model: null removes the pinned title model. */\nexport type SettingsUpdateDto = Partial<\n\tPick<\n\t\tSettingsDto,\n\t\t| \"defaultProvider\"\n\t\t| \"defaultModel\"\n\t\t| \"defaultThinkingLevel\"\n\t\t| \"steeringMode\"\n\t\t| \"followUpMode\"\n\t\t| \"compactionEnabled\"\n\t\t| \"retryEnabled\"\n\t\t| \"maxConcurrentSubagents\"\n\t\t| \"imageAutoResize\"\n\t\t| \"blockImages\"\n\t\t| \"enableSkillCommands\"\n\t\t| \"autoLoadNestedContext\"\n\t\t| \"trustedContextFolders\"\n\t\t| \"transport\"\n\t\t| \"hideThinkingBlock\"\n\t\t| \"agentModels\"\n\t\t| \"subagentArbiter\"\n\t>\n> & { enabledModels?: string[] | null; tabTitle?: TabTitleSettingsUpdateDto };\n\nexport type SettingsSaveResultDto = SettingsDto & { warnings?: string[] };\n\n/** Available model entry (mirrors ModelInfo). */\nexport interface ModelInfoDto {\n\tprovider: string;\n\tid: string;\n\tname: string;\n\tcontextWindow: number;\n\treasoning: boolean;\n}\n\n/** Agent definition metadata (mirrors RpcAgentTypeInfo). */\nexport interface AgentTypeDto {\n\tname: string;\n\tdescription: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,0FAA0F;AAC1F,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAgDlD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAElD,yEAAyE;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,oFAAoF;AACpF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,GAAG,IAAI,CAAC;AA8BpD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,qBAAqB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;AAkF9F,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,cAAc,EAAE,UAAU,EAAE,WAAW,CAAU,CAAC","sourcesContent":["/**\n * Wire types shared between the dashboard server and the browser client.\n *\n * These are standalone definitions (not imports from @dreb/coding-agent) so the\n * client bundle stays free of node-flavored type resolution. Server code maps\n * RPC DTOs onto these shapes; TypeScript structural typing enforces\n * compatibility at the mapping sites.\n */\n\n/** Maximum Unicode code points carried for an on-disk session's first-message preview. */\nexport const MAX_SESSION_PREVIEW_CHARACTERS = 256;\n\n/** Session metadata (mirrors RpcSessionInfo, with a bounded first-message preview). */\nexport interface SessionInfoDto {\n\tpath: string;\n\tid: string;\n\tcwd: string;\n\tname?: string;\n\tcreated: string;\n\tmodified: string;\n\tmessageCount: number;\n\tfirstMessage: string;\n}\n\n/** On-disk session inventory, independent of live runtime state. */\nexport interface SessionInventoryDto {\n\tsessions: SessionInfoDto[];\n}\n\nexport interface ArbitrationRouteDto {\n\tagent: string;\n\tmodel: string;\n\tthinking: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n}\n\nexport interface SubagentArbitrationDto {\n\tstatus: \"success\" | \"failure\";\n\tproposed: ArbitrationRouteDto;\n\tfinal: ArbitrationRouteDto | null;\n\tchanged: Array<\"agent\" | \"model\" | \"thinking\">;\n\tstep?: number;\n\terrorCode?: string;\n\terrorMessage?: string;\n}\n\n/** Background agent metadata (mirrors RpcBackgroundAgentInfo). */\nexport interface BackgroundAgentDto {\n\tagentId: string;\n\tagentType: string;\n\ttaskSummary: string;\n\tstartedAt: string;\n\tstatus: \"running\" | \"completed\" | \"failed\";\n\tsessionDir?: string;\n\tsessionFile?: string;\n\tcwd?: string;\n\tarbitrations?: SubagentArbitrationDto[];\n}\n\n/**\n * Shared eviction cap for completed/failed background agents. The server\n * prunes its registry to this bound and the client applies the same cap as\n * defense-in-depth — the two sides must agree on how many completed agents\n * survive, so the constant lives here.\n */\nexport const MAX_COMPLETED_BACKGROUND_AGENTS = 20;\n\n/** Maximum JSON prompt request body accepted by the dashboard server. */\nexport const MAX_PROMPT_BODY_BYTES = 25 * 1024 * 1024;\n\n/** Maximum accepted JSON body for optional, payload-free SSE client diagnostics. */\nexport const MAX_CLIENT_DIAGNOSTIC_BYTES = 4 * 1024;\n\nexport type EventConnectionState =\n\t| \"connecting\"\n\t| \"connected\"\n\t| \"retrying\"\n\t| \"resyncing\"\n\t| \"disconnected\"\n\t| \"auth_failed\";\n\n/**\n * Deliberately payload-free client connection telemetry. It is useful for\n * correlating stream failures with server logs, without sending prompts,\n * cookies, tool data, or SSE event contents back to the server.\n */\nexport interface ClientConnectionDiagnosticDto {\n\tconnectionId: string;\n\tstate: EventConnectionState;\n\tpreviousState?: EventConnectionState;\n\tattempt: number;\n\tdelayMs?: number;\n\tvisibility: \"visible\" | \"hidden\";\n\tlastAppliedSeq?: number;\n\theartbeatAgeMs?: number;\n\teventCount: number;\n\teventRatePerMinute: number;\n\tprocessingLagTotalMs: number;\n\tprocessingLagMaxMs: number;\n}\n\n/**\n * Inline images are base64-encoded inside the JSON prompt body. Base64 expands\n * raw bytes by 4/3, so a 25 MiB body can carry at most floor(25 MiB * 3/4) =\n * 18.75 MiB of raw image data before JSON syntax and prompt text. Reserve the\n * remaining 0.75 MiB for that overhead and advertise an 18 MiB aggregate raw\n * image budget to the browser.\n */\nexport const MAX_TOTAL_IMAGE_BYTES = Math.floor((MAX_PROMPT_BODY_BYTES * 3) / 4) - 768 * 1024;\n\n/** Context usage (mirrors ContextUsage — the numbers the TUI footer shows). */\nexport interface ContextUsageDto {\n\ttokens: number | null;\n\tcontextWindow: number;\n\tpercent: number | null;\n}\n\nexport interface ScopedModelDto {\n\tprovider: string;\n\tid: string;\n\tname?: string;\n\treasoning?: boolean;\n\tthinkingLevel?: string;\n}\n\nexport interface SessionStatsDto {\n\tsessionFile?: string;\n\tsessionId: string;\n\tuserMessages: number;\n\tassistantMessages: number;\n\ttoolCalls: number;\n\ttoolResults: number;\n\ttotalMessages: number;\n\ttokens: {\n\t\tinput: number;\n\t\toutput: number;\n\t\tcacheRead: number;\n\t\tcacheWrite: number;\n\t\ttotal: number;\n\t};\n\tcost: number;\n\tcontextUsage?: ContextUsageDto;\n}\n\nexport interface PerformanceModelSummaryDto {\n\tprovider: string;\n\tmodelId: string;\n\trolling: { median: number; mean: number; count: number };\n\tdelta: {\n\t\tbaselineMedian: number;\n\t\trecentMedian: number;\n\t\tpercentDelta: number;\n\t\tdirection: \"above\" | \"below\" | \"stable\";\n\t\tbaselineCount: number;\n\t\trecentCount: number;\n\t};\n}\n\nexport interface PerformanceStatsDto {\n\tmodels: PerformanceModelSummaryDto[];\n}\n\nexport interface ResourcesDto {\n\tcontextFiles: Array<{ path: string }>;\n\tskills: Array<{ name: string; description: string }>;\n\textensions: Array<{ name?: string; path: string }>;\n\tpromptTemplates: Array<{ name: string; description?: string }>;\n\tsystemPromptPresent: boolean;\n}\n\nexport interface ImageAttachmentDto {\n\tdata: string;\n\tmimeType: string;\n}\n\n/**\n * Browser-facing reference to a validated tool-result raster image. Original\n * bytes remain behind authenticated runtime routes and never cross transcript\n * JSON or SSE payloads.\n */\nexport interface DashboardImageReferenceDto {\n\ttype: \"image_reference\";\n\t/** SHA-256 of the exact MIME type plus decoded original bytes. */\n\tid: string;\n\t/** Exact allowlisted original MIME type. */\n\tmimeType: \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/webp\";\n\t/** Decoded original binary byte size. */\n\tsize: number;\n}\n\nexport const DASHBOARD_IMAGE_DISPLAY_MODES = [\"placeholders\", \"previews\", \"originals\"] as const;\nexport type DashboardImageDisplayMode = (typeof DASHBOARD_IMAGE_DISPLAY_MODES)[number];\n\nexport interface QueuedMessageDto {\n\ttext: string;\n\timages?: ImageAttachmentDto[];\n}\n\nexport interface PendingMessagesDto {\n\t/** Text-only compatibility view. */\n\tsteering: string[];\n\t/** Text-only compatibility view. */\n\tfollowUp: string[];\n\t/** Full queued payloads, including inline image attachments. */\n\tsteeringMessages?: QueuedMessageDto[];\n\t/** Full queued payloads, including inline image attachments. */\n\tfollowUpMessages?: QueuedMessageDto[];\n}\n\nexport interface CommandDto {\n\tname: string;\n\tdescription?: string;\n\tsource: \"extension\" | \"prompt\" | \"skill\" | \"builtin\";\n\t/** Built-ins with false are intercepted when typed but omitted from autocomplete. */\n\tdashboard?: boolean;\n}\n\nexport interface SessionTreeNodeDto {\n\tid: string;\n\tparentId: string | null;\n\ttype: string;\n\trole?: string;\n\tpreview: string;\n\ttimestamp: string;\n\tlabel?: string;\n\tchildren: SessionTreeNodeDto[];\n}\n\nexport interface RuntimeStatsSummaryDto {\n\ttokensTotal: number;\n\tcost: number;\n}\n\n/** Current task list (mirrors RpcSessionTask). */\nexport interface SessionTaskDto {\n\tid: string;\n\ttitle: string;\n\tstatus: \"pending\" | \"in_progress\" | \"completed\";\n}\n\n/** Live session state (mirrors RpcSessionState, model reduced to id fields). */\nexport interface SessionStateDto {\n\tmodel?: { provider: string; id: string; name?: string; reasoning?: boolean };\n\tscopedModels?: ScopedModelDto[];\n\tusingSubscription?: boolean;\n\t/** Current task list, atomically replaced by tasks_update events. */\n\ttasks: SessionTaskDto[];\n\tthinkingLevel: string;\n\t/** Model-aware levels available for selection and cycling. */\n\tavailableThinkingLevels: string[];\n\tisStreaming: boolean;\n\t/** True while automatic retry classification, backoff, or execution is active. */\n\tisRetrying?: boolean;\n\t/** Current automatic retry attempt, or 0 outside an emitted retry attempt. */\n\tretryAttempt?: number;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n\tcontextUsage?: ContextUsageDto;\n\tmodelFallbackMessage?: string;\n}\n\n/** A live runtime managed by the dashboard server's pool. */\nexport interface RuntimeInfoDto {\n\t/** Pool key — stable identity for API calls and SSE envelopes. */\n\tkey: string;\n\tcwd: string;\n\tstate: SessionStateDto;\n\t/** Monotonic pool revision for confirmed model/thinking mutations. */\n\tsettingsRevision?: number;\n\t/** Lean session stats for fleet cards; omitted when the runtime stats call fails. */\n\tstats?: RuntimeStatsSummaryDto;\n\t/** Background agents known to this runtime. */\n\tbackgroundAgents: BackgroundAgentDto[];\n\t/** Server-derived needs-attention flag (extension UI pending, paused, error). */\n\tneedsAttention: boolean;\n\t/** Runtime-level error that should survive browser reloads. */\n\terror?: string;\n\t/** Last assistant text, truncated for fleet-card previews. */\n\tlastAssistantText?: string;\n\t/** Session start timestamp (ISO) — stable tiebreak for deterministic fleet ordering. */\n\tcreatedAt: string;\n\t/** Last activity timestamp (ISO). */\n\tlastActivity: string;\n}\n\n/**\n * Lightweight, event-derived live-runtime view for fleet SSE updates.\n *\n * Unlike RuntimeInfoDto, this deliberately excludes RPC-fetched stats and\n * assistant preview text: RuntimePool can build it synchronously from its\n * in-memory runtime registry.\n */\nexport interface FleetRuntimeSnapshotDto {\n\tkey: string;\n\tcwd: string;\n\tstate: SessionStateDto;\n\t/** Monotonic pool revision for confirmed model/thinking mutations. */\n\tsettingsRevision?: number;\n\tbackgroundAgents: BackgroundAgentDto[];\n\tneedsAttention: boolean;\n\terror?: string;\n\tcreatedAt: string;\n\tlastActivity: string;\n}\n\n/** Coalesced fleet update published on the dashboard SSE stream. */\nexport interface FleetSnapshotEventDto {\n\ttype: \"fleet_snapshot\";\n\truntimes: FleetRuntimeSnapshotDto[];\n}\n\n/** Fleet snapshot: live runtimes + on-disk inventory. */\nexport interface FleetDto {\n\truntimes: RuntimeInfoDto[];\n\tdiskSessions: SessionInfoDto[];\n}\n\n/** A single question inside an `ask` extension-UI request (mirrors RpcAskQuestion). */\nexport interface AskUiQuestionDto {\n\tquestion: string;\n\ttitle?: string;\n\toptions?: string[];\n\tallowFreeText?: boolean;\n\tmultiSelect?: boolean;\n\tmultiline?: boolean;\n}\n\n/** A blocking extension UI request that can be restored from a runtime snapshot. */\nexport interface ExtensionUiRequestDto {\n\ttype: \"extension_ui_request\";\n\tid: string;\n\tmethod: \"select\" | \"confirm\" | \"input\" | \"editor\" | \"ask\";\n\ttitle: string;\n\tmessage?: string;\n\toptions?: string[];\n\tprefill?: string;\n\tplaceholder?: string;\n\t/** For the `ask` method: one or more questions asked together as a single wizard. */\n\tquestions?: AskUiQuestionDto[];\n\ttimeout?: number;\n\t/** Absolute Unix timestamp in milliseconds when the runtime timeout fires. */\n\texpiresAt?: number;\n}\n\n/**\n * Atomic parent-session snapshot for drill-in hydration. Its barrier sequence\n * marks the SSE ordering point captured by the matching RPC snapshot marker.\n */\nexport interface RuntimeHydrationDto {\n\tkey: string;\n\tstate: SessionStateDto;\n\tmessages: unknown[];\n\tbackgroundAgents: BackgroundAgentDto[];\n\t/** Dialogs still waiting for a host response at the snapshot boundary. */\n\tpendingExtensionUiRequests?: ExtensionUiRequestDto[];\n\tbarrierSeq: number;\n}\n\n/** Parent/subagent data restored by an authoritative recovery snapshot. */\nexport interface ActiveRuntimeSnapshotDto extends RuntimeHydrationDto {\n\tsubagent?: { agentId: string; agent: BackgroundAgentDto; messages: unknown[]; barrierSeq: number };\n}\n\n/** Fleet refresh plus the active runtime's explicitly ordered snapshot. */\nexport interface DashboardResyncDto {\n\tfleet: FleetDto;\n\tactive?: ActiveRuntimeSnapshotDto;\n\t/** The global barrier to await before applying the payload. */\n\tbarrierSeq: number;\n}\n\n/**\n * SSE envelope. Every event on the dashboard stream wraps a session event with\n * the runtime key it came from plus a monotonically increasing sequence number\n * used for Last-Event-ID catch-up on reconnect.\n */\nexport interface EventEnvelope {\n\tseq: number;\n\tkey: string;\n\t/** An AgentSessionEvent (or dashboard-synthesized event) as emitted by the runtime. */\n\tevent: Record<string, unknown>;\n}\n\n/** File listing entry. */\nexport interface FileEntryDto {\n\tname: string;\n\ttype: \"file\" | \"dir\" | \"symlink\" | \"other\";\n\tsize: number;\n\tmodified: string;\n}\n\n/** Directory listing response. */\nexport interface ContextTrustEvaluationDto {\n\t/** Canonical existing directory evaluated by the utility RPC runtime. */\n\tcanonicalTarget: string;\n\t/** Whether nested context is untrusted, granted by a root, or globally unrestricted. */\n\tstate: \"untrusted\" | \"trusted-root\" | \"unrestricted\";\n\t/** Canonical root granting trusted-root access, including inherited access. */\n\tgrantingRoot?: string;\n}\n\n/** Result of changing a context-trust root through the utility RPC runtime. */\nexport interface ContextTrustMutationResultDto {\n\tevaluation: ContextTrustEvaluationDto;\n\tsettings: SettingsDto;\n\taddedRoot?: string;\n\tremovedRoot?: string;\n}\n\n/** Result of removing a configured trusted-folder string exactly as stored. */\nexport interface TrustedFolderRemovalResultDto {\n\tsettings: SettingsDto;\n\tremovedFolder: string;\n}\n\n/** Directory listing response. */\nexport interface DirListingDto {\n\t/** Canonicalized absolute path of the listed directory. */\n\tpath: string;\n\tentries: FileEntryDto[];\n\t/** Current global nested-context trust for this canonical directory. */\n\tcontextTrust: ContextTrustEvaluationDto;\n}\n\nexport type MemoryScopeKindDto = \"global\" | \"project\";\nexport type MemoryEntryTypeDto = \"user-preferences\" | \"good-practices\" | \"project\" | \"navigation\";\n\nexport interface MemoryEntryMetadataDto {\n\tname: string;\n\tdescription: string;\n\ttype: MemoryEntryTypeDto;\n}\n\nexport interface MemoryScopeDto {\n\tid: string;\n\tkind: MemoryScopeKindDto;\n\tlabel: string;\n\tprojectRoot?: string;\n\tmemoryDir: string;\n\texists: boolean;\n}\n\nexport interface MemoryEntrySummaryDto {\n\tfile: string;\n\tmetadata?: MemoryEntryMetadataDto;\n\tmetadataError?: string;\n\tmodified: string;\n\tsize: number;\n}\n\nexport interface MemoryListingDto {\n\tscope: MemoryScopeDto;\n\tindexContent: string | null;\n\tindexRevision: string | null;\n\tindexOverLimit: boolean;\n\tentries: MemoryEntrySummaryDto[];\n}\n\nexport interface MemoryDocumentDto {\n\tkind: \"index\" | \"entry\";\n\tfile: string;\n\tcontent: string;\n\trevision: string;\n\tmetadata?: MemoryEntryMetadataDto;\n\tmetadataError?: string;\n}\n\nexport interface MemoryMutationResultDto {\n\tlisting: MemoryListingDto;\n\tdocument?: MemoryDocumentDto;\n}\n\n/** Auth mode reported to the client. */\nexport interface AuthStatusDto {\n\tmode: \"local\" | \"remote\";\n\t/** Identity string for remote devices (e.g. Tailscale login name). */\n\tidentity?: string;\n\tdevice?: string;\n\t/** Present only when this auth check atomically claimed today's warning. */\n\tpairingExpiryWarning?: { expiresAt: string };\n\t/** Server-authoritative time for the next expiry-status check. */\n\tpairingExpiryCheckAt?: string;\n}\n\n/** Dashboard-auth-owned setting for future pairings. */\nexport interface PairingSettingsDto {\n\tpairingTtlDays: number;\n}\n\n/** Current rotating pairing code, readable only from the host/local dashboard. */\nexport interface PairingCodeDto {\n\tenabled: boolean;\n\tcode?: string;\n\texpiresInMs?: number;\n}\n\n/** A paired device (settings → devices). */\nexport interface PairedDeviceDto {\n\tid: string;\n\tidentity: string;\n\tdevice?: string;\n\tcreatedAt: string;\n\texpiresAt: string;\n}\n\n/** Dashboard settings snapshot (mirrors RpcSettingsSnapshot). */\nexport interface SubagentArbiterSettingsDto {\n\tenabled?: boolean;\n\tmodel?: string;\n\tthinking?: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n\tguidePath?: string;\n}\n\nexport interface SettingsDto {\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: string;\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\tcompactionEnabled?: boolean;\n\tretryEnabled?: boolean;\n\tmaxConcurrentSubagents?: number;\n\timageAutoResize?: boolean;\n\tblockImages?: boolean;\n\tenableSkillCommands?: boolean;\n\tautoLoadNestedContext?: boolean;\n\t/** Global configured trusted context folders, including invalid legacy entries. */\n\ttrustedContextFolders?: string[];\n\t/** Canonical existing trusted roots currently enforced by the runtime. */\n\teffectiveTrustedContextRoots?: string[];\n\ttransport?: \"sse\" | \"websocket\" | \"auto\";\n\thideThinkingBlock?: boolean;\n\tagentModels?: Record<string, string[]>;\n\t/** Global-only Dispatch Arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettingsDto | null;\n\t/** Raw effective persisted patterns; absent means future-inclusive implicit all. */\n\tenabledModels?: string[];\n\t/** Effective persistent scope resolved by coding-agent core in cycling order. */\n\tresolvedScopedModels: ScopedModelDto[];\n\t/** Resolver diagnostics for legacy persisted patterns. */\n\tscopeWarnings: Array<{ pattern: string; message: string }>;\n\thasProjectEnabledModelsOverride: boolean;\n\tenabledModelsSource: \"default\" | \"global\" | \"project\";\n}\n\n/** Dashboard settings mutation payload. Unlike a snapshot, null explicitly clears enabledModels. */\nexport type SettingsUpdateDto = Partial<\n\tPick<\n\t\tSettingsDto,\n\t\t| \"defaultProvider\"\n\t\t| \"defaultModel\"\n\t\t| \"defaultThinkingLevel\"\n\t\t| \"steeringMode\"\n\t\t| \"followUpMode\"\n\t\t| \"compactionEnabled\"\n\t\t| \"retryEnabled\"\n\t\t| \"maxConcurrentSubagents\"\n\t\t| \"imageAutoResize\"\n\t\t| \"blockImages\"\n\t\t| \"enableSkillCommands\"\n\t\t| \"autoLoadNestedContext\"\n\t\t| \"trustedContextFolders\"\n\t\t| \"transport\"\n\t\t| \"hideThinkingBlock\"\n\t\t| \"agentModels\"\n\t\t| \"subagentArbiter\"\n\t>\n> & { enabledModels?: string[] | null };\n\nexport type SettingsSaveResultDto = SettingsDto & { warnings?: string[] };\n\n/** Available model entry (mirrors ModelInfo). */\nexport interface ModelInfoDto {\n\tprovider: string;\n\tid: string;\n\tname: string;\n\tcontextWindow: number;\n\treasoning: boolean;\n}\n\n/** Agent definition metadata (mirrors RpcAgentTypeInfo). */\nexport interface AgentTypeDto {\n\tname: string;\n\tdescription: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,0FAA0F;AAC1F,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAgDlD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAElD,yEAAyE;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtD,oFAAoF;AACpF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,GAAG,IAAI,CAAC;AA8BpD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,qBAAqB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;AAkF9F,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,cAAc,EAAE,UAAU,EAAE,WAAW,CAAU,CAAC","sourcesContent":["/**\n * Wire types shared between the dashboard server and the browser client.\n *\n * These are standalone definitions (not imports from @dreb/coding-agent) so the\n * client bundle stays free of node-flavored type resolution. Server code maps\n * RPC DTOs onto these shapes; TypeScript structural typing enforces\n * compatibility at the mapping sites.\n */\n\n/** Maximum Unicode code points carried for an on-disk session's first-message preview. */\nexport const MAX_SESSION_PREVIEW_CHARACTERS = 256;\n\n/** Session metadata (mirrors RpcSessionInfo, with a bounded first-message preview). */\nexport interface SessionInfoDto {\n\tpath: string;\n\tid: string;\n\tcwd: string;\n\tname?: string;\n\tcreated: string;\n\tmodified: string;\n\tmessageCount: number;\n\tfirstMessage: string;\n}\n\n/** On-disk session inventory, independent of live runtime state. */\nexport interface SessionInventoryDto {\n\tsessions: SessionInfoDto[];\n}\n\nexport interface ArbitrationRouteDto {\n\tagent: string;\n\tmodel: string;\n\tthinking: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n}\n\nexport interface SubagentArbitrationDto {\n\tstatus: \"success\" | \"failure\";\n\tproposed: ArbitrationRouteDto;\n\tfinal: ArbitrationRouteDto | null;\n\tchanged: Array<\"agent\" | \"model\" | \"thinking\">;\n\tstep?: number;\n\terrorCode?: string;\n\terrorMessage?: string;\n}\n\n/** Background agent metadata (mirrors RpcBackgroundAgentInfo). */\nexport interface BackgroundAgentDto {\n\tagentId: string;\n\tagentType: string;\n\ttaskSummary: string;\n\tstartedAt: string;\n\tstatus: \"running\" | \"completed\" | \"failed\";\n\tsessionDir?: string;\n\tsessionFile?: string;\n\tcwd?: string;\n\tarbitrations?: SubagentArbitrationDto[];\n}\n\n/**\n * Shared eviction cap for completed/failed background agents. The server\n * prunes its registry to this bound and the client applies the same cap as\n * defense-in-depth — the two sides must agree on how many completed agents\n * survive, so the constant lives here.\n */\nexport const MAX_COMPLETED_BACKGROUND_AGENTS = 20;\n\n/** Maximum JSON prompt request body accepted by the dashboard server. */\nexport const MAX_PROMPT_BODY_BYTES = 25 * 1024 * 1024;\n\n/** Maximum accepted JSON body for optional, payload-free SSE client diagnostics. */\nexport const MAX_CLIENT_DIAGNOSTIC_BYTES = 4 * 1024;\n\nexport type EventConnectionState =\n\t| \"connecting\"\n\t| \"connected\"\n\t| \"retrying\"\n\t| \"resyncing\"\n\t| \"disconnected\"\n\t| \"auth_failed\";\n\n/**\n * Deliberately payload-free client connection telemetry. It is useful for\n * correlating stream failures with server logs, without sending prompts,\n * cookies, tool data, or SSE event contents back to the server.\n */\nexport interface ClientConnectionDiagnosticDto {\n\tconnectionId: string;\n\tstate: EventConnectionState;\n\tpreviousState?: EventConnectionState;\n\tattempt: number;\n\tdelayMs?: number;\n\tvisibility: \"visible\" | \"hidden\";\n\tlastAppliedSeq?: number;\n\theartbeatAgeMs?: number;\n\teventCount: number;\n\teventRatePerMinute: number;\n\tprocessingLagTotalMs: number;\n\tprocessingLagMaxMs: number;\n}\n\n/**\n * Inline images are base64-encoded inside the JSON prompt body. Base64 expands\n * raw bytes by 4/3, so a 25 MiB body can carry at most floor(25 MiB * 3/4) =\n * 18.75 MiB of raw image data before JSON syntax and prompt text. Reserve the\n * remaining 0.75 MiB for that overhead and advertise an 18 MiB aggregate raw\n * image budget to the browser.\n */\nexport const MAX_TOTAL_IMAGE_BYTES = Math.floor((MAX_PROMPT_BODY_BYTES * 3) / 4) - 768 * 1024;\n\n/** Context usage (mirrors ContextUsage — the numbers the TUI footer shows). */\nexport interface ContextUsageDto {\n\ttokens: number | null;\n\tcontextWindow: number;\n\tpercent: number | null;\n}\n\nexport interface ScopedModelDto {\n\tprovider: string;\n\tid: string;\n\tname?: string;\n\treasoning?: boolean;\n\tthinkingLevel?: string;\n}\n\nexport interface SessionStatsDto {\n\tsessionFile?: string;\n\tsessionId: string;\n\tuserMessages: number;\n\tassistantMessages: number;\n\ttoolCalls: number;\n\ttoolResults: number;\n\ttotalMessages: number;\n\ttokens: {\n\t\tinput: number;\n\t\toutput: number;\n\t\tcacheRead: number;\n\t\tcacheWrite: number;\n\t\ttotal: number;\n\t};\n\tcost: number;\n\tcontextUsage?: ContextUsageDto;\n}\n\nexport interface PerformanceModelSummaryDto {\n\tprovider: string;\n\tmodelId: string;\n\trolling: { median: number; mean: number; count: number };\n\tdelta: {\n\t\tbaselineMedian: number;\n\t\trecentMedian: number;\n\t\tpercentDelta: number;\n\t\tdirection: \"above\" | \"below\" | \"stable\";\n\t\tbaselineCount: number;\n\t\trecentCount: number;\n\t};\n}\n\nexport interface PerformanceStatsDto {\n\tmodels: PerformanceModelSummaryDto[];\n}\n\nexport interface ResourcesDto {\n\tcontextFiles: Array<{ path: string }>;\n\tskills: Array<{ name: string; description: string }>;\n\textensions: Array<{ name?: string; path: string }>;\n\tpromptTemplates: Array<{ name: string; description?: string }>;\n\tsystemPromptPresent: boolean;\n}\n\nexport interface ImageAttachmentDto {\n\tdata: string;\n\tmimeType: string;\n}\n\n/**\n * Browser-facing reference to a validated tool-result raster image. Original\n * bytes remain behind authenticated runtime routes and never cross transcript\n * JSON or SSE payloads.\n */\nexport interface DashboardImageReferenceDto {\n\ttype: \"image_reference\";\n\t/** SHA-256 of the exact MIME type plus decoded original bytes. */\n\tid: string;\n\t/** Exact allowlisted original MIME type. */\n\tmimeType: \"image/png\" | \"image/jpeg\" | \"image/gif\" | \"image/webp\";\n\t/** Decoded original binary byte size. */\n\tsize: number;\n}\n\nexport const DASHBOARD_IMAGE_DISPLAY_MODES = [\"placeholders\", \"previews\", \"originals\"] as const;\nexport type DashboardImageDisplayMode = (typeof DASHBOARD_IMAGE_DISPLAY_MODES)[number];\n\nexport interface QueuedMessageDto {\n\ttext: string;\n\timages?: ImageAttachmentDto[];\n}\n\nexport interface PendingMessagesDto {\n\t/** Text-only compatibility view. */\n\tsteering: string[];\n\t/** Text-only compatibility view. */\n\tfollowUp: string[];\n\t/** Full queued payloads, including inline image attachments. */\n\tsteeringMessages?: QueuedMessageDto[];\n\t/** Full queued payloads, including inline image attachments. */\n\tfollowUpMessages?: QueuedMessageDto[];\n}\n\nexport interface CommandDto {\n\tname: string;\n\tdescription?: string;\n\tsource: \"extension\" | \"prompt\" | \"skill\" | \"builtin\";\n\t/** Built-ins with false are intercepted when typed but omitted from autocomplete. */\n\tdashboard?: boolean;\n}\n\nexport interface SessionTreeNodeDto {\n\tid: string;\n\tparentId: string | null;\n\ttype: string;\n\trole?: string;\n\tpreview: string;\n\ttimestamp: string;\n\tlabel?: string;\n\tchildren: SessionTreeNodeDto[];\n}\n\nexport interface RuntimeStatsSummaryDto {\n\ttokensTotal: number;\n\tcost: number;\n}\n\n/** Current task list (mirrors RpcSessionTask). */\nexport interface SessionTaskDto {\n\tid: string;\n\ttitle: string;\n\tstatus: \"pending\" | \"in_progress\" | \"completed\";\n}\n\n/** Live session state (mirrors RpcSessionState, model reduced to id fields). */\nexport interface SessionStateDto {\n\tmodel?: { provider: string; id: string; name?: string; reasoning?: boolean };\n\tscopedModels?: ScopedModelDto[];\n\tusingSubscription?: boolean;\n\t/** Current task list, atomically replaced by tasks_update events. */\n\ttasks: SessionTaskDto[];\n\tthinkingLevel: string;\n\t/** Model-aware levels available for selection and cycling. */\n\tavailableThinkingLevels: string[];\n\tisStreaming: boolean;\n\t/** True while automatic retry classification, backoff, or execution is active. */\n\tisRetrying?: boolean;\n\t/** Current automatic retry attempt, or 0 outside an emitted retry attempt. */\n\tretryAttempt?: number;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n\tcontextUsage?: ContextUsageDto;\n\tmodelFallbackMessage?: string;\n}\n\n/** A live runtime managed by the dashboard server's pool. */\nexport interface RuntimeInfoDto {\n\t/** Pool key — stable identity for API calls and SSE envelopes. */\n\tkey: string;\n\tcwd: string;\n\tstate: SessionStateDto;\n\t/** Monotonic pool revision for confirmed model/thinking mutations. */\n\tsettingsRevision?: number;\n\t/** Lean session stats for fleet cards; omitted when the runtime stats call fails. */\n\tstats?: RuntimeStatsSummaryDto;\n\t/** Background agents known to this runtime. */\n\tbackgroundAgents: BackgroundAgentDto[];\n\t/** Server-derived needs-attention flag (extension UI pending, paused, error). */\n\tneedsAttention: boolean;\n\t/** Runtime-level error that should survive browser reloads. */\n\terror?: string;\n\t/** Last assistant text, truncated for fleet-card previews. */\n\tlastAssistantText?: string;\n\t/** Session start timestamp (ISO) — stable tiebreak for deterministic fleet ordering. */\n\tcreatedAt: string;\n\t/** Last activity timestamp (ISO). */\n\tlastActivity: string;\n}\n\n/**\n * Lightweight, event-derived live-runtime view for fleet SSE updates.\n *\n * Unlike RuntimeInfoDto, this deliberately excludes RPC-fetched stats and\n * assistant preview text: RuntimePool can build it synchronously from its\n * in-memory runtime registry.\n */\nexport interface FleetRuntimeSnapshotDto {\n\tkey: string;\n\tcwd: string;\n\tstate: SessionStateDto;\n\t/** Monotonic pool revision for confirmed model/thinking mutations. */\n\tsettingsRevision?: number;\n\tbackgroundAgents: BackgroundAgentDto[];\n\tneedsAttention: boolean;\n\terror?: string;\n\tcreatedAt: string;\n\tlastActivity: string;\n}\n\n/** Coalesced fleet update published on the dashboard SSE stream. */\nexport interface FleetSnapshotEventDto {\n\ttype: \"fleet_snapshot\";\n\truntimes: FleetRuntimeSnapshotDto[];\n}\n\n/** Fleet snapshot: live runtimes + on-disk inventory. */\nexport interface FleetDto {\n\truntimes: RuntimeInfoDto[];\n\tdiskSessions: SessionInfoDto[];\n}\n\n/** A single question inside an `ask` extension-UI request (mirrors RpcAskQuestion). */\nexport interface AskUiQuestionDto {\n\tquestion: string;\n\ttitle?: string;\n\toptions?: string[];\n\tallowFreeText?: boolean;\n\tmultiSelect?: boolean;\n\tmultiline?: boolean;\n}\n\n/** A blocking extension UI request that can be restored from a runtime snapshot. */\nexport interface ExtensionUiRequestDto {\n\ttype: \"extension_ui_request\";\n\tid: string;\n\tmethod: \"select\" | \"confirm\" | \"input\" | \"editor\" | \"ask\";\n\ttitle: string;\n\tmessage?: string;\n\toptions?: string[];\n\tprefill?: string;\n\tplaceholder?: string;\n\t/** For the `ask` method: one or more questions asked together as a single wizard. */\n\tquestions?: AskUiQuestionDto[];\n\ttimeout?: number;\n\t/** Absolute Unix timestamp in milliseconds when the runtime timeout fires. */\n\texpiresAt?: number;\n}\n\n/**\n * Atomic parent-session snapshot for drill-in hydration. Its barrier sequence\n * marks the SSE ordering point captured by the matching RPC snapshot marker.\n */\nexport interface RuntimeHydrationDto {\n\tkey: string;\n\tstate: SessionStateDto;\n\tmessages: unknown[];\n\tbackgroundAgents: BackgroundAgentDto[];\n\t/** Dialogs still waiting for a host response at the snapshot boundary. */\n\tpendingExtensionUiRequests?: ExtensionUiRequestDto[];\n\tbarrierSeq: number;\n}\n\n/** Parent/subagent data restored by an authoritative recovery snapshot. */\nexport interface ActiveRuntimeSnapshotDto extends RuntimeHydrationDto {\n\tsubagent?: { agentId: string; agent: BackgroundAgentDto; messages: unknown[]; barrierSeq: number };\n}\n\n/** Fleet refresh plus the active runtime's explicitly ordered snapshot. */\nexport interface DashboardResyncDto {\n\tfleet: FleetDto;\n\tactive?: ActiveRuntimeSnapshotDto;\n\t/** The global barrier to await before applying the payload. */\n\tbarrierSeq: number;\n}\n\n/**\n * SSE envelope. Every event on the dashboard stream wraps a session event with\n * the runtime key it came from plus a monotonically increasing sequence number\n * used for Last-Event-ID catch-up on reconnect.\n */\nexport interface EventEnvelope {\n\tseq: number;\n\tkey: string;\n\t/** An AgentSessionEvent (or dashboard-synthesized event) as emitted by the runtime. */\n\tevent: Record<string, unknown>;\n}\n\n/** File listing entry. */\nexport interface FileEntryDto {\n\tname: string;\n\ttype: \"file\" | \"dir\" | \"symlink\" | \"other\";\n\tsize: number;\n\tmodified: string;\n}\n\n/** Directory listing response. */\nexport interface ContextTrustEvaluationDto {\n\t/** Canonical existing directory evaluated by the utility RPC runtime. */\n\tcanonicalTarget: string;\n\t/** Whether nested context is untrusted, granted by a root, or globally unrestricted. */\n\tstate: \"untrusted\" | \"trusted-root\" | \"unrestricted\";\n\t/** Canonical root granting trusted-root access, including inherited access. */\n\tgrantingRoot?: string;\n}\n\n/** Result of changing a context-trust root through the utility RPC runtime. */\nexport interface ContextTrustMutationResultDto {\n\tevaluation: ContextTrustEvaluationDto;\n\tsettings: SettingsDto;\n\taddedRoot?: string;\n\tremovedRoot?: string;\n}\n\n/** Result of removing a configured trusted-folder string exactly as stored. */\nexport interface TrustedFolderRemovalResultDto {\n\tsettings: SettingsDto;\n\tremovedFolder: string;\n}\n\n/** Directory listing response. */\nexport interface DirListingDto {\n\t/** Canonicalized absolute path of the listed directory. */\n\tpath: string;\n\tentries: FileEntryDto[];\n\t/** Current global nested-context trust for this canonical directory. */\n\tcontextTrust: ContextTrustEvaluationDto;\n}\n\nexport type MemoryScopeKindDto = \"global\" | \"project\";\nexport type MemoryEntryTypeDto = \"user-preferences\" | \"good-practices\" | \"project\" | \"navigation\";\n\nexport interface MemoryEntryMetadataDto {\n\tname: string;\n\tdescription: string;\n\ttype: MemoryEntryTypeDto;\n}\n\nexport interface MemoryScopeDto {\n\tid: string;\n\tkind: MemoryScopeKindDto;\n\tlabel: string;\n\tprojectRoot?: string;\n\tmemoryDir: string;\n\texists: boolean;\n}\n\nexport interface MemoryEntrySummaryDto {\n\tfile: string;\n\tmetadata?: MemoryEntryMetadataDto;\n\tmetadataError?: string;\n\tmodified: string;\n\tsize: number;\n}\n\nexport interface MemoryListingDto {\n\tscope: MemoryScopeDto;\n\tindexContent: string | null;\n\tindexRevision: string | null;\n\tindexOverLimit: boolean;\n\tentries: MemoryEntrySummaryDto[];\n}\n\nexport interface MemoryDocumentDto {\n\tkind: \"index\" | \"entry\";\n\tfile: string;\n\tcontent: string;\n\trevision: string;\n\tmetadata?: MemoryEntryMetadataDto;\n\tmetadataError?: string;\n}\n\nexport interface MemoryMutationResultDto {\n\tlisting: MemoryListingDto;\n\tdocument?: MemoryDocumentDto;\n}\n\n/** Auth mode reported to the client. */\nexport interface AuthStatusDto {\n\tmode: \"local\" | \"remote\";\n\t/** Identity string for remote devices (e.g. Tailscale login name). */\n\tidentity?: string;\n\tdevice?: string;\n\t/** Present only when this auth check atomically claimed today's warning. */\n\tpairingExpiryWarning?: { expiresAt: string };\n\t/** Server-authoritative time for the next expiry-status check. */\n\tpairingExpiryCheckAt?: string;\n}\n\n/** Dashboard-auth-owned setting for future pairings. */\nexport interface PairingSettingsDto {\n\tpairingTtlDays: number;\n}\n\n/** Current rotating pairing code, readable only from the host/local dashboard. */\nexport interface PairingCodeDto {\n\tenabled: boolean;\n\tcode?: string;\n\texpiresInMs?: number;\n}\n\n/** A paired device (settings → devices). */\nexport interface PairedDeviceDto {\n\tid: string;\n\tidentity: string;\n\tdevice?: string;\n\tcreatedAt: string;\n\texpiresAt: string;\n}\n\n/** Dashboard settings snapshot (mirrors RpcSettingsSnapshot). */\nexport interface SubagentArbiterSettingsDto {\n\tenabled?: boolean;\n\tmodel?: string;\n\tthinking?: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\";\n\tguidePath?: string;\n}\n\nexport interface TabTitleSettingsDto {\n\tenabled?: boolean;\n\tmodel?: string;\n\ttriggerAfter?: number;\n\tmaxTitleLength?: number;\n}\n\n/** Partial tab-title update; `model: null` removes the pinned model, restoring Explore-agent routing. */\nexport type TabTitleSettingsUpdateDto = Omit<TabTitleSettingsDto, \"model\"> & { model?: string | null };\n\nexport interface SettingsDto {\n\tdefaultProvider?: string;\n\tdefaultModel?: string;\n\tdefaultThinkingLevel?: string;\n\tsteeringMode?: \"all\" | \"one-at-a-time\";\n\tfollowUpMode?: \"all\" | \"one-at-a-time\";\n\tcompactionEnabled?: boolean;\n\tretryEnabled?: boolean;\n\tmaxConcurrentSubagents?: number;\n\timageAutoResize?: boolean;\n\tblockImages?: boolean;\n\tenableSkillCommands?: boolean;\n\tautoLoadNestedContext?: boolean;\n\t/** Global configured trusted context folders, including invalid legacy entries. */\n\ttrustedContextFolders?: string[];\n\t/** Canonical existing trusted roots currently enforced by the runtime. */\n\teffectiveTrustedContextRoots?: string[];\n\ttransport?: \"sse\" | \"websocket\" | \"auto\";\n\thideThinkingBlock?: boolean;\n\tagentModels?: Record<string, string[]>;\n\t/** Global-only Dispatch Arbiter configuration. */\n\tsubagentArbiter?: SubagentArbiterSettingsDto | null;\n\t/** Effective automatic tab-title configuration. */\n\ttabTitle?: TabTitleSettingsDto;\n\t/** Raw effective persisted patterns; absent means future-inclusive implicit all. */\n\tenabledModels?: string[];\n\t/** Effective persistent scope resolved by coding-agent core in cycling order. */\n\tresolvedScopedModels: ScopedModelDto[];\n\t/** Resolver diagnostics for legacy persisted patterns. */\n\tscopeWarnings: Array<{ pattern: string; message: string }>;\n\thasProjectEnabledModelsOverride: boolean;\n\tenabledModelsSource: \"default\" | \"global\" | \"project\";\n}\n\n/** Dashboard settings mutation payload. Unlike a snapshot, null explicitly clears enabledModels, and tabTitle.model: null removes the pinned title model. */\nexport type SettingsUpdateDto = Partial<\n\tPick<\n\t\tSettingsDto,\n\t\t| \"defaultProvider\"\n\t\t| \"defaultModel\"\n\t\t| \"defaultThinkingLevel\"\n\t\t| \"steeringMode\"\n\t\t| \"followUpMode\"\n\t\t| \"compactionEnabled\"\n\t\t| \"retryEnabled\"\n\t\t| \"maxConcurrentSubagents\"\n\t\t| \"imageAutoResize\"\n\t\t| \"blockImages\"\n\t\t| \"enableSkillCommands\"\n\t\t| \"autoLoadNestedContext\"\n\t\t| \"trustedContextFolders\"\n\t\t| \"transport\"\n\t\t| \"hideThinkingBlock\"\n\t\t| \"agentModels\"\n\t\t| \"subagentArbiter\"\n\t>\n> & { enabledModels?: string[] | null; tabTitle?: TabTitleSettingsUpdateDto };\n\nexport type SettingsSaveResultDto = SettingsDto & { warnings?: string[] };\n\n/** Available model entry (mirrors ModelInfo). */\nexport interface ModelInfoDto {\n\tprovider: string;\n\tid: string;\n\tname: string;\n\tcontextWindow: number;\n\treasoning: boolean;\n}\n\n/** Agent definition metadata (mirrors RpcAgentTypeInfo). */\nexport interface AgentTypeDto {\n\tname: string;\n\tdescription: string;\n}\n"]}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|