@hachej/boring-agent 0.1.89 → 0.1.91

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.
Files changed (39) hide show
  1. package/dist/{chunk-GOM3VJOJ.js → chunk-2GBHYJVC.js} +31 -1
  2. package/dist/{chunk-I7UEASPG.js → chunk-BHH5NH7P.js} +5534 -8253
  3. package/dist/{chunk-M32FXCIN.js → chunk-CJ2BW2W2.js} +23 -8
  4. package/dist/{chunk-WZCTVT57.js → chunk-IWBC6SF7.js} +94 -112
  5. package/dist/chunk-NITBKFG6.js +1246 -0
  6. package/dist/{chunk-BDYXKHWY.js → chunk-PZC76CIA.js} +7 -1
  7. package/dist/core/index.d.ts +5 -5
  8. package/dist/core/index.js +2 -2
  9. package/dist/{createHarness-CCQLHKUF.js → createHarness-PMYRKDE4.js} +2 -2
  10. package/dist/errors-BEmw9HMp.d.ts +200 -0
  11. package/dist/front/index.d.ts +30 -5
  12. package/dist/front/index.js +230 -44
  13. package/dist/{harness-VvP0l5Mj.d.ts → harness-Bt_GMNYR.d.ts} +2 -2
  14. package/dist/{workspaceAgentDispatcher-CKEeNPjW.d.ts → lease-2aXepSBL.d.ts} +254 -59
  15. package/dist/{protocol-B_OQKfbI.d.ts → middleware-CzW8n7B7.d.ts} +20 -18
  16. package/dist/piChatEvent-DBO3M5lu.d.ts +367 -0
  17. package/dist/{piChatSessionService-DPjJ0g71.d.ts → piChatSessionService-BaaVWke7.d.ts} +5 -1
  18. package/dist/{sandbox-DthfJaOB.d.ts → sandbox-DAD8cWQR.d.ts} +14 -1
  19. package/dist/server/agent-host/testing/gatewayConformance.d.ts +41 -0
  20. package/dist/server/agent-host/testing/gatewayConformance.js +465 -0
  21. package/dist/server/index.d.ts +507 -708
  22. package/dist/server/index.js +53 -50
  23. package/dist/server/worker/index.d.ts +9 -7
  24. package/dist/server/worker/index.js +19 -28
  25. package/dist/shared/index.d.ts +119 -27
  26. package/dist/shared/index.js +65 -282
  27. package/dist/types-jcMapYr9.d.ts +759 -0
  28. package/docs/ACCESSIBILITY.md +4 -5
  29. package/docs/API.md +3 -0
  30. package/docs/AUTHORING.md +68 -0
  31. package/docs/ERROR_CODES.md +29 -0
  32. package/docs/README.md +1 -0
  33. package/docs/RISKS-MULTI-TAB.md +1 -1
  34. package/docs/runtime-provisioning.md +1 -1
  35. package/docs/runtime.md +9 -6
  36. package/package.json +18 -9
  37. package/dist/chunk-DGRKMMXO.js +0 -8
  38. package/dist/chunk-XPQEF32D.js +0 -385
  39. package/dist/piChatEvent-nmOBSNU9.d.ts +0 -367
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ErrorCode
3
- } from "./chunk-GOM3VJOJ.js";
3
+ } from "./chunk-2GBHYJVC.js";
4
4
 
5
5
  // src/shared/tool-ui.ts
6
6
  function isRecord(value) {
@@ -29,6 +29,10 @@ function extractToolUiMetadata(output) {
29
29
  return sanitizeToolUiMetadata(details.ui);
30
30
  }
31
31
 
32
+ // src/shared/agentPluginEvents.ts
33
+ var WORKSPACE_AGENT_PLUGINS_RELOADED_EVENT = "boring-ui:agent-plugins-reloaded";
34
+ var WORKSPACE_COMMAND_NOTIFY_EVENT = "boring-ui:command-notify";
35
+
32
36
  // src/shared/chat/piChatSchemas.ts
33
37
  import { z } from "zod";
34
38
  var nonEmptyString = z.string().min(1);
@@ -263,6 +267,8 @@ export {
263
267
  isToolUiMetadata,
264
268
  sanitizeToolUiMetadata,
265
269
  extractToolUiMetadata,
270
+ WORKSPACE_AGENT_PLUGINS_RELOADED_EVENT,
271
+ WORKSPACE_COMMAND_NOTIFY_EVENT,
266
272
  ToolUiMetadataSchema,
267
273
  sanitizeToolUiMetadata2,
268
274
  ChatErrorSchema,
@@ -1,8 +1,8 @@
1
- import { A as AgentHarness, a as AgentReadiness, b as Agent } from '../harness-VvP0l5Mj.js';
2
- export { c as AGENT_NOT_IMPLEMENTED_UNTIL_T1, d as AgentActor, e as AgentCoreHarness, f as AgentCoreHarnessFactory, g as AgentCorePromptInput, h as AgentCoreSessionAdapter, i as AgentCoreSessionSnapshot, j as AgentEvent, k as AgentMessageContent, l as AgentMessagePart, m as AgentNotImplementedError, n as AgentReadinessStatus, o as AgentResolveInputResponse, p as AgentSendInput, q as AgentStartReceipt, r as AgentStreamOptions } from '../harness-VvP0l5Mj.js';
3
- import { S as SessionStore } from '../piChatEvent-nmOBSNU9.js';
4
- import { A as AgentCoreSessionService, a as AgentEffectAdmission } from '../piChatSessionService-DPjJ0g71.js';
5
- export { b as AGENT_EFFECT_METHODS, c as AgentEffectAdmissionError, P as PiChatEventStreamResult, d as PiChatEventStreamSubscription, e as PiChatEventSubscriber, f as PiChatReplayRangeError, g as PiChatSessionService, h as PiSessionCreateInit, i as PiSessionRequestContext, w as withAgentEffectAdmission } from '../piChatSessionService-DPjJ0g71.js';
1
+ import { A as AgentHarness, a as AgentReadiness, b as Agent } from '../harness-Bt_GMNYR.js';
2
+ export { c as AGENT_NOT_IMPLEMENTED_UNTIL_T1, d as AgentActor, e as AgentCoreHarness, f as AgentCoreHarnessFactory, g as AgentCorePromptInput, h as AgentCoreSessionAdapter, i as AgentCoreSessionSnapshot, j as AgentEvent, k as AgentMessageContent, l as AgentMessagePart, m as AgentNotImplementedError, n as AgentReadinessStatus, o as AgentResolveInputResponse, p as AgentSendInput, q as AgentStartReceipt, r as AgentStreamOptions } from '../harness-Bt_GMNYR.js';
3
+ import { S as SessionStore } from '../piChatEvent-DBO3M5lu.js';
4
+ import { A as AgentCoreSessionService, a as AgentEffectAdmission } from '../piChatSessionService-BaaVWke7.js';
5
+ export { b as AGENT_EFFECT_METHODS, c as AgentEffectAdmissionError, P as PiChatEventStreamResult, d as PiChatEventStreamSubscription, e as PiChatEventSubscriber, f as PiChatReplayRangeError, g as PiChatSessionService, h as PiSessionCreateInit, i as PiSessionRequestContext, w as withAgentEffectAdmission } from '../piChatSessionService-BaaVWke7.js';
6
6
  import '@mariozechner/pi-coding-agent';
7
7
  import 'zod';
8
8
 
@@ -3,12 +3,12 @@ import {
3
3
  AgentEffectAdmissionError,
4
4
  createAgent,
5
5
  withAgentEffectAdmission
6
- } from "../chunk-M32FXCIN.js";
6
+ } from "../chunk-CJ2BW2W2.js";
7
7
  import {
8
8
  AGENT_NOT_IMPLEMENTED_UNTIL_T1,
9
9
  AgentNotImplementedError
10
10
  } from "../chunk-WSQ5QNIY.js";
11
- import "../chunk-GOM3VJOJ.js";
11
+ import "../chunk-2GBHYJVC.js";
12
12
  export {
13
13
  AGENT_EFFECT_METHODS,
14
14
  AGENT_NOT_IMPLEMENTED_UNTIL_T1,
@@ -4,9 +4,9 @@ import {
4
4
  deriveSourcePlugin,
5
5
  mergePiPackageSources,
6
6
  withPiHarnessDefaults
7
- } from "./chunk-WZCTVT57.js";
7
+ } from "./chunk-IWBC6SF7.js";
8
8
  import "./chunk-AQBXNPMD.js";
9
- import "./chunk-GOM3VJOJ.js";
9
+ import "./chunk-2GBHYJVC.js";
10
10
  export {
11
11
  createPiCodingAgentHarness,
12
12
  createResourceSettingsManager,
@@ -0,0 +1,200 @@
1
+ import { b as PiChatEvent, o as ChatModelSelection, K as ThinkingLevel, v as ChatAttachmentPayload, Q as QueuedUserMessage, n as PiChatSnapshot } from './piChatEvent-DBO3M5lu.js';
2
+
3
+ /** Placement-independent event envelope. `seq` is the only replay cursor. */
4
+ interface AgentSessionEvent {
5
+ readonly ref: AgentSessionRef;
6
+ readonly seq: number;
7
+ readonly event: JsonSafe<PiChatEvent>;
8
+ }
9
+
10
+ type WorkspaceScopeId = string;
11
+ type AuthSubjectId = string;
12
+ type JsonPrimitive = string | number | boolean | null;
13
+ type JsonValue = JsonPrimitive | readonly JsonValue[] | {
14
+ readonly [key: string]: JsonValue;
15
+ };
16
+ /** Maps unknown event leaves onto the JSON transport boundary. */
17
+ type JsonSafe<T> = unknown extends T ? JsonValue : T extends JsonPrimitive ? T : T extends (...args: readonly never[]) => unknown ? never : T extends readonly (infer U)[] ? readonly JsonSafe<U>[] : T extends object ? {
18
+ readonly [K in keyof T]: JsonSafe<T[K]>;
19
+ } : never;
20
+ /** Verified identity facts returned only by the app-owned verifier. */
21
+ interface VerifiedAgentScopeClaim {
22
+ readonly workspaceScopeId: WorkspaceScopeId;
23
+ readonly authSubjectId: AuthSubjectId;
24
+ }
25
+ declare const authorizedAgentScope: unique symbol;
26
+ /**
27
+ * Issuer-owned runtime capability. It is deliberately not a transport DTO and
28
+ * must be checked by issuer identity and current membership on every use.
29
+ */
30
+ interface AuthorizedAgentScope {
31
+ readonly workspaceScopeId: WorkspaceScopeId;
32
+ readonly authSubjectId: AuthSubjectId;
33
+ readonly [authorizedAgentScope]: true;
34
+ }
35
+ interface AgentScopeVerifier {
36
+ verify(scope: AuthorizedAgentScope): Promise<VerifiedAgentScopeClaim>;
37
+ }
38
+ interface AgentSessionRef {
39
+ readonly agentTypeId: string;
40
+ readonly sessionId: string;
41
+ }
42
+ interface AgentSummary {
43
+ readonly agentTypeId: string;
44
+ readonly label: string;
45
+ readonly description?: string;
46
+ readonly definition?: {
47
+ readonly version: string;
48
+ readonly digest: string;
49
+ };
50
+ }
51
+ interface ListAgentsInput {
52
+ readonly scope: AuthorizedAgentScope;
53
+ }
54
+ interface AuthorizedAgentSessionQuery {
55
+ readonly scope: AuthorizedAgentScope;
56
+ readonly agentTypeId?: string;
57
+ readonly cursor?: string;
58
+ readonly limit?: number;
59
+ }
60
+ type AgentSessionActivity = 'idle' | 'running' | 'aborting' | 'error';
61
+ interface AgentSessionSummary {
62
+ readonly ref: AgentSessionRef;
63
+ readonly title: string;
64
+ readonly status: AgentSessionActivity;
65
+ readonly createdAt: number;
66
+ readonly updatedAt: number;
67
+ }
68
+ interface AgentSessionPage {
69
+ readonly sessions: readonly AgentSessionSummary[];
70
+ readonly nextCursor?: string;
71
+ }
72
+ interface CreateAgentSessionInput {
73
+ readonly scope: AuthorizedAgentScope;
74
+ readonly agentTypeId: string;
75
+ readonly requestId: string;
76
+ readonly title?: string;
77
+ }
78
+ interface ConnectAgentSessionInput {
79
+ readonly scope: AuthorizedAgentScope;
80
+ readonly ref: AgentSessionRef;
81
+ readonly cursor?: number;
82
+ }
83
+ interface ReadAgentSessionStateInput {
84
+ readonly scope: AuthorizedAgentScope;
85
+ readonly ref: AgentSessionRef;
86
+ }
87
+ interface RenameAgentSessionInput {
88
+ readonly scope: AuthorizedAgentScope;
89
+ readonly ref: AgentSessionRef;
90
+ readonly requestId: string;
91
+ readonly title: string;
92
+ }
93
+ interface DeleteAgentSessionInput {
94
+ readonly scope: AuthorizedAgentScope;
95
+ readonly ref: AgentSessionRef;
96
+ readonly requestId: string;
97
+ }
98
+ interface AgentPromptCommand {
99
+ readonly kind: 'prompt';
100
+ readonly requestId: string;
101
+ readonly clientNonce: string;
102
+ readonly content: string;
103
+ readonly displayContent?: string;
104
+ readonly model?: ChatModelSelection;
105
+ readonly thinkingLevel?: ThinkingLevel;
106
+ readonly attachments?: readonly ChatAttachmentPayload[];
107
+ }
108
+ interface AgentFollowUpCommand {
109
+ readonly kind: 'followup';
110
+ readonly requestId: string;
111
+ readonly clientNonce: string;
112
+ readonly content: string;
113
+ readonly displayContent?: string;
114
+ readonly clientSeq: number;
115
+ }
116
+ type IdempotentAgentSend = AgentPromptCommand | AgentFollowUpCommand;
117
+ interface IdempotentAgentControl {
118
+ readonly requestId: string;
119
+ }
120
+ interface IdempotentQueueClear extends IdempotentAgentControl {
121
+ readonly clientNonce?: string;
122
+ readonly clientSeq?: number;
123
+ }
124
+ interface CommandReceipt {
125
+ readonly accepted: true;
126
+ readonly cursor: number;
127
+ }
128
+ interface AgentSendReceipt extends CommandReceipt {
129
+ readonly disposition: 'prompt' | 'followup';
130
+ readonly clientNonce: string;
131
+ readonly duplicate?: boolean;
132
+ readonly clientSeq?: number;
133
+ }
134
+ interface QueueClearReceipt extends CommandReceipt {
135
+ readonly cleared: number;
136
+ }
137
+ interface StopReceipt extends CommandReceipt {
138
+ readonly stopped: boolean;
139
+ readonly clearedQueue: readonly QueuedUserMessage[];
140
+ }
141
+ interface AgentSessionStateSnapshot {
142
+ readonly ref: AgentSessionRef;
143
+ readonly seq: number;
144
+ readonly summary: AgentSessionSummary;
145
+ readonly state: JsonSafe<PiChatSnapshot>;
146
+ }
147
+ interface AgentSessionConnection {
148
+ readonly ref: AgentSessionRef;
149
+ readonly events: AsyncIterable<AgentSessionEvent>;
150
+ send(input: IdempotentAgentSend): Promise<AgentSendReceipt>;
151
+ interrupt(input: IdempotentAgentControl): Promise<CommandReceipt>;
152
+ stop(input: IdempotentAgentControl): Promise<StopReceipt>;
153
+ clearQueue(input: IdempotentQueueClear): Promise<QueueClearReceipt>;
154
+ close(): Promise<void>;
155
+ }
156
+ interface AgentGateway {
157
+ listAgents(input: ListAgentsInput): Promise<readonly AgentSummary[]>;
158
+ listSessions(input: AuthorizedAgentSessionQuery): Promise<AgentSessionPage>;
159
+ createSession(input: CreateAgentSessionInput): Promise<AgentSessionRef>;
160
+ connectSession(input: ConnectAgentSessionInput): Promise<AgentSessionConnection>;
161
+ readSessionState(input: ReadAgentSessionStateInput): Promise<AgentSessionStateSnapshot>;
162
+ renameSession(input: RenameAgentSessionInput): Promise<AgentSessionSummary>;
163
+ deleteSession(input: DeleteAgentSessionInput): Promise<void>;
164
+ close(): Promise<void>;
165
+ }
166
+
167
+ interface FileSearch {
168
+ search(glob: string, limit?: number): Promise<string[]>;
169
+ }
170
+
171
+ declare const AgentGatewayErrorCode: {
172
+ readonly AGENT_TYPE_UNKNOWN: "AGENT_TYPE_UNKNOWN";
173
+ readonly AGENT_SESSION_NOT_FOUND: "AGENT_SESSION_NOT_FOUND";
174
+ readonly AGENT_SCOPE_DENIED: "AGENT_SCOPE_DENIED";
175
+ readonly AGENT_SESSION_REPLAY_GAP: "AGENT_SESSION_REPLAY_GAP";
176
+ readonly AGENT_SESSION_CURSOR_AHEAD: "AGENT_SESSION_CURSOR_AHEAD";
177
+ readonly AGENT_SESSION_CURSOR_EXPIRED: "AGENT_SESSION_CURSOR_EXPIRED";
178
+ readonly AGENT_SESSION_CURSOR_INVALID: "AGENT_SESSION_CURSOR_INVALID";
179
+ readonly AGENT_REQUEST_CONFLICT: "AGENT_REQUEST_CONFLICT";
180
+ readonly AGENT_REQUEST_OUTCOME_UNKNOWN: "AGENT_REQUEST_OUTCOME_UNKNOWN";
181
+ readonly AGENT_COMMAND_INVALID_STATE: "AGENT_COMMAND_INVALID_STATE";
182
+ readonly AGENT_SESSION_RUNTIME_SCOPE_MISMATCH: "AGENT_SESSION_RUNTIME_SCOPE_MISMATCH";
183
+ readonly AGENT_SHARED_ENVIRONMENT_UNAVAILABLE: "AGENT_SHARED_ENVIRONMENT_UNAVAILABLE";
184
+ readonly AGENT_GATEWAY_CLOSED: "AGENT_GATEWAY_CLOSED";
185
+ };
186
+ type AgentGatewayErrorCode = (typeof AgentGatewayErrorCode)[keyof typeof AgentGatewayErrorCode];
187
+ declare const AGENT_GATEWAY_ERROR_CODES: readonly ["AGENT_TYPE_UNKNOWN", "AGENT_SESSION_NOT_FOUND", "AGENT_SCOPE_DENIED", "AGENT_SESSION_REPLAY_GAP", "AGENT_SESSION_CURSOR_AHEAD", "AGENT_SESSION_CURSOR_EXPIRED", "AGENT_SESSION_CURSOR_INVALID", "AGENT_REQUEST_CONFLICT", "AGENT_REQUEST_OUTCOME_UNKNOWN", "AGENT_COMMAND_INVALID_STATE", "AGENT_SESSION_RUNTIME_SCOPE_MISMATCH", "AGENT_SHARED_ENVIRONMENT_UNAVAILABLE", "AGENT_GATEWAY_CLOSED"];
188
+ interface AgentGatewayErrorDTO {
189
+ readonly code: AgentGatewayErrorCode;
190
+ readonly message: string;
191
+ readonly details?: JsonValue;
192
+ }
193
+ declare class AgentGatewayError extends Error {
194
+ readonly code: AgentGatewayErrorCode;
195
+ readonly details?: JsonValue;
196
+ constructor(code: AgentGatewayErrorCode, message: string, details?: JsonValue);
197
+ toJSON(): AgentGatewayErrorDTO;
198
+ }
199
+
200
+ export { type AgentGateway as A, type ConnectAgentSessionInput as C, type DeleteAgentSessionInput as D, type FileSearch as F, type IdempotentAgentControl as I, type JsonValue as J, type ListAgentsInput as L, type ReadAgentSessionStateInput as R, type VerifiedAgentScopeClaim as V, type WorkspaceScopeId as W, type AuthorizedAgentScope as a, type AgentSessionRef as b, type AgentSessionActivity as c, type AgentSessionSummary as d, type AgentSessionStateSnapshot as e, type AgentSessionConnection as f, type AgentGatewayErrorDTO as g, type AgentScopeVerifier as h, AGENT_GATEWAY_ERROR_CODES as i, type AgentFollowUpCommand as j, AgentGatewayError as k, AgentGatewayErrorCode as l, type AgentPromptCommand as m, type AgentSendReceipt as n, type AgentSessionEvent as o, type AgentSessionPage as p, type AgentSummary as q, type AuthSubjectId as r, type AuthorizedAgentSessionQuery as s, type CreateAgentSessionInput as t, type IdempotentAgentSend as u, type IdempotentQueueClear as v, type JsonPrimitive as w, type JsonSafe as x, type RenameAgentSessionInput as y };
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentProps, HTMLAttributes, FormEvent, ReactNode, ComponentType } from 'react';
3
3
  import { FileUIPart, ChatStatus, UIMessage } from 'ai';
4
- import { T as ToolUiMetadata, B as BoringChatPart, a as BoringChatMessage, P as PiChatStatus, Q as QueuedUserMessage, C as ChatError, b as PiChatEvent, c as PromptPayload, d as PromptReceipt, F as FollowUpPayload, e as FollowUpReceipt, f as QueueClearPayload, g as QueueClearReceipt, I as InterruptPayload, h as CommandReceipt, i as StopPayload, j as StopReceipt, k as SessionSummary } from '../piChatEvent-nmOBSNU9.js';
4
+ import { T as ToolUiMetadata, B as BoringChatPart, a as BoringChatMessage, P as PiChatStatus, Q as QueuedUserMessage, C as ChatError, b as PiChatEvent, c as PromptPayload, d as PromptReceipt, F as FollowUpPayload, e as FollowUpReceipt, f as QueueClearPayload, g as QueueClearReceipt, I as InterruptPayload, h as CommandReceipt, i as StopPayload, j as StopReceipt, k as SessionSummary } from '../piChatEvent-DBO3M5lu.js';
5
5
  import { InputGroupAddon, InputGroupButton, InputGroupTextarea, Button, Collapsible, CollapsibleContent, CollapsibleTrigger } from '@hachej/boring-ui-kit';
6
6
  import { Streamdown } from 'streamdown';
7
7
  import { StickToBottom } from 'use-stick-to-bottom';
@@ -336,6 +336,8 @@ interface RemotePiSessionHeaders {
336
336
  }
337
337
  interface RemotePiSessionOptions {
338
338
  sessionId: string;
339
+ /** Selects the additive addressed AgentGateway transport. Omit for legacy wire. */
340
+ agentTypeId?: string;
339
341
  workspaceId?: string;
340
342
  storageScope?: string;
341
343
  apiBaseUrl?: string;
@@ -432,11 +434,14 @@ declare class RemotePiSession {
432
434
  private ensureReconnectScheduled;
433
435
  private scheduleReconnect;
434
436
  private postCommand;
437
+ private addressedCommandReceipt;
435
438
  private rollbackOptimisticMessage;
436
439
  private fetchJson;
437
440
  private requestHeaders;
438
441
  private stateUrl;
442
+ private eventsUrl;
439
443
  private sessionUrl;
444
+ private addressedCommandPayload;
440
445
  private dispatchProtocolError;
441
446
  private recordEventType;
442
447
  private recordLargeStateWarning;
@@ -465,10 +470,14 @@ interface PiSessionCreateInit {
465
470
  }
466
471
  interface PiSessionRefreshOptions {
467
472
  background?: boolean;
473
+ /** Reject when the authoritative refresh fails instead of only updating hook state. */
474
+ throwOnError?: boolean;
468
475
  }
469
476
  interface UsePiSessionsOptions {
470
477
  apiBaseUrl?: string;
471
478
  sessionsApiPath?: string;
479
+ /** Selects the additive addressed AgentGateway transport. Omit for legacy wire. */
480
+ agentTypeId?: string;
472
481
  workspaceId?: string;
473
482
  storageScope?: string;
474
483
  requestHeaders?: Record<string, string | undefined>;
@@ -478,7 +487,7 @@ interface UsePiSessionsOptions {
478
487
  fetch?: typeof globalThis.fetch;
479
488
  storage?: ActiveSessionStorageLike;
480
489
  createRemoteSession?: (options: RemotePiSessionOptions) => RemotePiSession;
481
- remoteSessionOptions?: Omit<Partial<RemotePiSessionOptions>, 'sessionId' | 'workspaceId' | 'storageScope' | 'apiBaseUrl' | 'headers' | 'fetch'>;
490
+ remoteSessionOptions?: Omit<Partial<RemotePiSessionOptions>, 'sessionId' | 'agentTypeId' | 'workspaceId' | 'storageScope' | 'apiBaseUrl' | 'headers' | 'fetch'>;
482
491
  connectActiveSession?: boolean;
483
492
  retry?: {
484
493
  maxRetries?: number;
@@ -600,6 +609,8 @@ interface AgentPluginReloadResult {
600
609
  interface PiChatPanelProps<TComposerBlocker extends ComposerBlocker = ComposerBlocker> {
601
610
  /** Optional externally selected Pi session id. When provided, session navigation is owned by the host. */
602
611
  sessionId?: string;
612
+ /** Selects the additive addressed AgentGateway transport. Omit for legacy wire. */
613
+ agentTypeId?: string;
603
614
  /** Alias kept for consumers that still pass the pre-cutover prop name. */
604
615
  extraCommands?: SlashCommand[];
605
616
  apiBaseUrl?: string;
@@ -667,7 +678,7 @@ interface PiChatPanelProps<TComposerBlocker extends ComposerBlocker = ComposerBl
667
678
  * knowing what the code means or what the action does. */
668
679
  renderNoticeAction?: (notice: PiChatRuntimeNotice) => ReactNode;
669
680
  }
670
- declare function PiChatPanel<TComposerBlocker extends ComposerBlocker = ComposerBlocker>({ sessionId, extraCommands, apiBaseUrl, workspaceId, storageScope, requestHeaders, storage, fetch, className, chrome, debug, showSessions, hotReloadEnabled, suggestions, emptyState, emptyPlacement, composerPlaceholder, initialDraft, autoSubmitInitialDraft, onDraftRestored, onAutoSubmitInitialDraftAccepted, onAutoSubmitInitialDraftSettled, model, defaultModel, availableModels, hideDefaultModelOption, hideComposerSettings, suppressPreSubmitCancelledWarning, thinkingLevel, thinkingControl, serverResourcesEnabled, mentionedFiles, commands, excludeBuiltinCommands, toolRenderers, createRemoteSession, remoteSessionOptions, hydrateMessages, allowPromptDuringInitialHydration, workspaceWarmupStatus, onSessionReset, onBeforeSubmit, onReloadAgentPlugins, onCommandResult, onComposerWarning, onMentionedFilesConsumed, onPromptSubmitStarted, onData, onOpenArtifact, composerBlockers, onComposerStop, onComposerBlockerAction, onTurnComplete, renderNoticeAction, }: PiChatPanelProps<TComposerBlocker>): react.JSX.Element;
681
+ declare function PiChatPanel<TComposerBlocker extends ComposerBlocker = ComposerBlocker>({ sessionId, agentTypeId, extraCommands, apiBaseUrl, workspaceId, storageScope, requestHeaders, storage, fetch, className, chrome, debug, showSessions, hotReloadEnabled, suggestions, emptyState, emptyPlacement, composerPlaceholder, initialDraft, autoSubmitInitialDraft, onDraftRestored, onAutoSubmitInitialDraftAccepted, onAutoSubmitInitialDraftSettled, model, defaultModel, availableModels, hideDefaultModelOption, hideComposerSettings, suppressPreSubmitCancelledWarning, thinkingLevel, thinkingControl, serverResourcesEnabled, mentionedFiles, commands, excludeBuiltinCommands, toolRenderers, createRemoteSession, remoteSessionOptions, hydrateMessages, allowPromptDuringInitialHydration, workspaceWarmupStatus, onSessionReset, onBeforeSubmit, onReloadAgentPlugins, onCommandResult, onComposerWarning, onMentionedFilesConsumed, onPromptSubmitStarted, onData, onOpenArtifact, composerBlockers, onComposerStop, onComposerBlockerAction, onTurnComplete, renderNoticeAction, }: PiChatPanelProps<TComposerBlocker>): react.JSX.Element;
671
682
 
672
683
  interface DebugDrawerProps {
673
684
  apiBaseUrl?: string;
@@ -699,6 +710,7 @@ declare const ModelSelectTrigger: react.ForwardRefExoticComponent<Omit<Omit<reac
699
710
  disabled?: boolean;
700
711
  trigger?: SelectorTrigger;
701
712
  open?: boolean;
713
+ emptyLabel?: string;
702
714
  } & react.RefAttributes<HTMLButtonElement>>;
703
715
  declare function ModelPickerMenu({ value, onChange, options, disabled, hideDefaultOption, onClose, className, }: {
704
716
  value: ModelSelection | null;
@@ -716,13 +728,26 @@ declare function ModelPickerMenu({ value, onChange, options, disabled, hideDefau
716
728
  * option's stored value, encoded as "{provider}:{id}" to keep
717
729
  * ids stable across providers.
718
730
  */
719
- declare function ModelSelect({ value, onChange, options, disabled, trigger, openSignal, }: {
731
+ declare function ModelSelect({ value, onChange, options, disabled, trigger, openSignal, className, emptyLabel, ariaInvalid, ariaDescribedBy, hideDefaultOption, }: {
720
732
  value: ModelSelection | null;
721
733
  onChange: (next: ModelSelection | null) => void;
722
734
  options: AvailableModel[];
723
735
  disabled?: boolean;
724
736
  trigger?: SelectorTrigger;
725
737
  openSignal?: unknown;
738
+ className?: string;
739
+ emptyLabel?: string;
740
+ ariaInvalid?: boolean;
741
+ ariaDescribedBy?: string;
742
+ hideDefaultOption?: boolean;
743
+ }): react.JSX.Element;
744
+ declare function ThinkingSelect({ value, onChange, disabled, trigger, openSignal, className, }: {
745
+ value: ThinkingLevel;
746
+ onChange: (next: ThinkingLevel) => void;
747
+ disabled?: boolean;
748
+ trigger?: SelectorTrigger;
749
+ openSignal?: unknown;
750
+ className?: string;
726
751
  }): react.JSX.Element;
727
752
 
728
753
  interface AgentCommandContribution {
@@ -806,4 +831,4 @@ declare const CodeBlock: ({ code, language, showLineNumbers, className, children
806
831
 
807
832
  declare function cn(...inputs: ClassValue[]): string;
808
833
 
809
- export { type AgentCommandContribution, type AgentCommandOptions, type AgentPluginReloadResult, ArtifactOpenProvider, type AvailableModel, ChatEmptyState, type ChatEmptyStateProps, PiChatPanel as ChatPanel, type PiChatPanelProps as ChatPanelProps, type ChatSuggestion, CodeBlock, type CommandRegistry, type ComposerBlocker, type ComposerBlockerAction, Conversation, ConversationContent, ConversationScrollButton, DebugDrawer, type GroupedToolEntry, Message, MessageAction, MessageActions, MessageContent, MessageResponse, ModelPickerMenu, ModelSelect, ModelSelectTrigger, type ModelSelection, type OpenArtifactHandler, type ParsedCommand, PiChatPanel, type PiChatPanelProps, SessionBrowser as PiSessionBrowser, type PiSessionCreateInit, SessionList as PiSessionList, type PiSessionSearchItem, type PiSessionSearchOptions, type PiSessionSearchSortMode, PromptInput, PromptInputFooter, PromptInputSubmit, PromptInputTextarea, Reasoning, ReasoningContent, ReasoningTrigger, type SessionListProps, type SlashCommand, type SlashCommandContext, ToolCallGroup, type ToolPart, type ToolRenderer, type ToolRendererOverrides, type UploadFileOptions, type UploadFileResult, type UsePiSessionsOptions, type UsePiSessionsResult, activeSessionStorageKey, builtinCommands, clearActiveSessionId, cn, createCommandRegistry, defaultChatSuggestions, defaultToolRenderers, getAgentCommands, matchPiSessionSearch, mergeShadcnToolRenderers, mergeToolRenderers, parsePiSessionSearchQuery, parseSlashCommand, readActiveSessionId, resolveToolRenderer, searchPiSessions, uploadFile, useOpenArtifact, usePiSessions, writeActiveSessionId };
834
+ export { type AgentCommandContribution, type AgentCommandOptions, type AgentPluginReloadResult, ArtifactOpenProvider, type AvailableModel, ChatEmptyState, type ChatEmptyStateProps, PiChatPanel as ChatPanel, type PiChatPanelProps as ChatPanelProps, type ChatSuggestion, CodeBlock, type CommandRegistry, type ComposerBlocker, type ComposerBlockerAction, Conversation, ConversationContent, ConversationScrollButton, DebugDrawer, type GroupedToolEntry, Message, MessageAction, MessageActions, MessageContent, MessageResponse, ModelPickerMenu, ModelSelect, ModelSelectTrigger, type ModelSelection, type OpenArtifactHandler, type ParsedCommand, PiChatPanel, type PiChatPanelProps, SessionBrowser as PiSessionBrowser, type PiSessionCreateInit, SessionList as PiSessionList, type PiSessionSearchItem, type PiSessionSearchOptions, type PiSessionSearchSortMode, PromptInput, PromptInputFooter, PromptInputSubmit, PromptInputTextarea, Reasoning, ReasoningContent, ReasoningTrigger, type SessionListProps, type SlashCommand, type SlashCommandContext, type ThinkingLevel, ThinkingSelect, ToolCallGroup, type ToolPart, type ToolRenderer, type ToolRendererOverrides, type UploadFileOptions, type UploadFileResult, type UsePiSessionsOptions, type UsePiSessionsResult, activeSessionStorageKey, builtinCommands, clearActiveSessionId, cn, createCommandRegistry, defaultChatSuggestions, defaultToolRenderers, getAgentCommands, matchPiSessionSearch, mergeShadcnToolRenderers, mergeToolRenderers, parsePiSessionSearchQuery, parseSlashCommand, readActiveSessionId, resolveToolRenderer, searchPiSessions, uploadFile, useOpenArtifact, usePiSessions, writeActiveSessionId };