@robota-sdk/agent-ui-web 3.1.2 → 3.3.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/CHANGELOG.md +43 -0
- package/dist/index.cjs +475 -97
- package/dist/index.d.cts +31 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +31 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +476 -99
- package/dist/index.js.map +1 -1
- package/docs/SPEC.md +5 -0
- package/package.json +6 -6
- package/src/client/desktop-session-client.ts +78 -0
- package/src/components/AgentActivityPanel.tsx +38 -31
- package/src/components/Composer.tsx +71 -24
- package/src/components/ExecutionDetailSheet.tsx +116 -6
- package/src/components/SessionSurface.tsx +89 -36
- package/src/hooks/server-message-handling.ts +2 -0
- package/src/hooks/session-client-types.ts +12 -1
- package/src/hooks/use-app-view-requests.ts +8 -1
- package/src/hooks/use-execution-detail.ts +133 -33
- package/src/hooks/use-session-directory.ts +7 -2
- package/src/hooks/useSessionClient.ts +81 -9
- package/src/index.ts +2 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IWireAgentDefinitionSummary, TClientMessage, TClientMessage as TClientMessage$1, TServerMessage, TServerMessage as TServerMessage$1 } from "@robota-sdk/agent-transport";
|
|
1
|
+
import { IWireAgentDefinitionSummary, TClientMessage, TClientMessage as TClientMessage$1, TServerMessage, TServerMessage as TServerMessage$1, TSessionSurfaceRole } from "@robota-sdk/agent-transport";
|
|
2
2
|
import { TActionResponse } from "@robota-sdk/agent-interface-transport";
|
|
3
3
|
import { IAskRequestEvent, IDiffLine, IGoalState, IPermissionRequestEvent, ISettingsSnapshot, IToolAppViewRef, IToolState, TDriverId, TPermissionResultValue, TSettingsPatch } from "@robota-sdk/agent-interface-session";
|
|
4
4
|
import { IBackgroundTaskState, IExecutionDetailRecord, IExecutionWorkspaceEntry, IExecutionWorkspaceSnapshot } from "@robota-sdk/agent-interface-execution";
|
|
@@ -220,6 +220,8 @@ interface IWsSessionState<TStatus extends string = TConnectionStatus> {
|
|
|
220
220
|
sessionName: string | null;
|
|
221
221
|
/** This connection's own driver id, learned from the server's first frame; null until then. */
|
|
222
222
|
ownDriverId: TDriverId | null;
|
|
223
|
+
/** The role the host gave this connection, learned when it connects; null until the host answers. */
|
|
224
|
+
role: TSessionSurfaceRole | null;
|
|
223
225
|
/** Null until the session has answered; refreshed after every command. */
|
|
224
226
|
commandCatalog: TCommandCatalog | null;
|
|
225
227
|
/** Null until the session has answered; refreshed after every command and turn. */
|
|
@@ -302,6 +304,18 @@ interface IWsSessionState<TStatus extends string = TConnectionStatus> {
|
|
|
302
304
|
executionDetailError: string | null;
|
|
303
305
|
/** True once the last page read had no further cursor — nothing more to load. */
|
|
304
306
|
executionDetailComplete: boolean;
|
|
307
|
+
executionDetailInput?: {
|
|
308
|
+
taskId: string;
|
|
309
|
+
status: 'pending' | 'sent' | 'failed';
|
|
310
|
+
};
|
|
311
|
+
executionDetailMode?: 'live' | 'transcript';
|
|
312
|
+
executionDetailUnreadable?: {
|
|
313
|
+
locked: number;
|
|
314
|
+
noKeys: number;
|
|
315
|
+
doesNotOpen: number;
|
|
316
|
+
};
|
|
317
|
+
showEarlierExecutionDetail?: () => void;
|
|
318
|
+
showLiveExecutionDetail?: () => void;
|
|
305
319
|
openExecutionDetail: (entryId: string) => void;
|
|
306
320
|
loadMoreExecutionDetail: () => void;
|
|
307
321
|
closeExecutionDetail: () => void;
|
|
@@ -369,6 +383,18 @@ declare function useWsSession(url: string): IWsSessionState<TConnectionStatus> &
|
|
|
369
383
|
*/
|
|
370
384
|
declare function rememberSessionForRestore(namespace: string, sessionId: string): void;
|
|
371
385
|
//#endregion
|
|
386
|
+
//#region src/client/desktop-session-client.d.ts
|
|
387
|
+
/** The secure desktop preload exposes frames, never an owner credential or a daemon endpoint. */
|
|
388
|
+
interface IDesktopSessionBridge {
|
|
389
|
+
subscribe(onFrame: (frame: string) => void, onClose: () => void, onReady: () => void): () => void;
|
|
390
|
+
send(frame: string): boolean;
|
|
391
|
+
close(): void;
|
|
392
|
+
}
|
|
393
|
+
declare function createDesktopSessionClient(bridge: IDesktopSessionBridge, callbacks: {
|
|
394
|
+
readonly onMessage: (message: TServerMessage) => void;
|
|
395
|
+
readonly onStatusChange: (status: TConnectionStatus) => void;
|
|
396
|
+
}): ISessionClientHandle;
|
|
397
|
+
//#endregion
|
|
372
398
|
//#region src/components/composer-attachments.d.ts
|
|
373
399
|
/**
|
|
374
400
|
* One file the desktop host's native "Attach files" dialog returned (#3282 §4d). Kept in structural
|
|
@@ -558,11 +584,13 @@ declare function PersonalUsageDashboard({ state }: {
|
|
|
558
584
|
* The full desktop layout over an `IWsSessionState`. `surface` is an optional label shown next to the
|
|
559
585
|
* mark (e.g. "app").
|
|
560
586
|
*/
|
|
561
|
-
declare function SessionSurface({ state, surface, personalUsageEnabled, onReconnect, pickFiles, getPathForFile, onOpenMemoryInEditor, appViewSandboxUrl }: {
|
|
587
|
+
declare function SessionSurface({ state, surface, personalUsageEnabled: personalUsageRequested, draftMode, onReconnect, pickFiles, getPathForFile, onOpenMemoryInEditor, appViewSandboxUrl }: {
|
|
562
588
|
state: IWsSessionState;
|
|
563
589
|
surface?: string;
|
|
564
590
|
/** Desktop shells opt in; embedded/session-only surfaces keep their existing chat-only contract. */
|
|
565
591
|
personalUsageEnabled?: boolean;
|
|
592
|
+
/** Secure desktop discards unsent text and attachment paths when the session closes. */
|
|
593
|
+
draftMode?: 'persistent' | 'volatile';
|
|
566
594
|
/**
|
|
567
595
|
* Present only when the host can restart the runtime after the connection is lost for good (issue
|
|
568
596
|
* #3280 §5, the desktop app); absent in the browser, where the banner says how to reopen it instead.
|
|
@@ -732,5 +760,5 @@ declare function ProductIdentityProvider({ value, children }: {
|
|
|
732
760
|
}): React.ReactElement;
|
|
733
761
|
declare function useProductIdentity(): IWebProductIdentity;
|
|
734
762
|
//#endregion
|
|
735
|
-
export { AgentActivityPanel, AgentSwitcherSheet, CenteredChrome, ConfirmDialog, ConversationView, Dialog, HelpSheet, type IActiveTool, type IClientRuntimeBridge, type IClientRuntimeEnvironment, type IClientRuntimeHost, type IClientTrustQuestion, type ICommandOutputEntry, type IComposerHandle, type IConfirmDialogProps, type IConversationMessage, type IDialogProps, type IPickedFile, type ISessionClientHandle, type ISessionNotice, type IToolGroupEntry, type IWebProductIdentity, type IWsSessionClientCallbacks, type IWsSessionState, PermissionPrompt, PersonalUsageDashboard, ProductIdentityProvider, ProductMark, ProductWordmark, SessionMonitor, SessionSidebar, SessionSurface, SettingsScreen, type TAppToolArguments, type TAppToolOutcome, type TAppView, type TClientRuntimeState, type TClientTrustChoice, type TConnectionStatus, type TConversationEntry, type TMakeSessionClient, type TPendingPrompt, type TPersonalUsageDashboardState, type TSessionListing, type TSessionsError, applyPromptEvent, askResponse, createWsSessionClient, describeUiIntentForGui, guiScreenForUiIntent, permissionResponse, rememberSessionForRestore, resolveClientRuntimeHost, useProductIdentity, useSessionClient, useWsSession };
|
|
763
|
+
export { AgentActivityPanel, AgentSwitcherSheet, CenteredChrome, ConfirmDialog, ConversationView, Dialog, HelpSheet, type IActiveTool, type IClientRuntimeBridge, type IClientRuntimeEnvironment, type IClientRuntimeHost, type IClientTrustQuestion, type ICommandOutputEntry, type IComposerHandle, type IConfirmDialogProps, type IConversationMessage, type IDesktopSessionBridge, type IDialogProps, type IPickedFile, type ISessionClientHandle, type ISessionNotice, type IToolGroupEntry, type IWebProductIdentity, type IWsSessionClientCallbacks, type IWsSessionState, PermissionPrompt, PersonalUsageDashboard, ProductIdentityProvider, ProductMark, ProductWordmark, SessionMonitor, SessionSidebar, SessionSurface, SettingsScreen, type TAppToolArguments, type TAppToolOutcome, type TAppView, type TClientRuntimeState, type TClientTrustChoice, type TConnectionStatus, type TConversationEntry, type TMakeSessionClient, type TPendingPrompt, type TPersonalUsageDashboardState, type TSessionListing, type TSessionsError, applyPromptEvent, askResponse, createDesktopSessionClient, createWsSessionClient, describeUiIntentForGui, guiScreenForUiIntent, permissionResponse, rememberSessionForRestore, resolveClientRuntimeHost, useProductIdentity, useSessionClient, useWsSession };
|
|
736
764
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/app-view/types.ts","../src/client/ws-session-client.ts","../src/hooks/prompt-state.ts","../src/hooks/session-client-types.ts","../src/hooks/useSessionClient.ts","../src/hooks/use-session-directory.ts","../src/components/composer-attachments.ts","../src/components/Composer.tsx","../src/client/runtime-host.ts","../src/hooks/ui-intent-state.ts","../src/components/ConversationView.tsx","../src/components/AgentActivityPanel.tsx","../src/components/AgentSwitcherSheet.tsx","../src/components/PermissionPrompt.tsx","../src/components/personal-usage-dashboard-types.ts","../src/components/PersonalUsageDashboard.tsx","../src/components/SessionSurface.tsx","../src/components/SessionSidebar.tsx","../src/components/SessionMonitor.tsx","../src/components/Dialog.tsx","../src/components/SettingsScreen.tsx","../src/components/HelpSheet.tsx","../src/components/Brand.tsx","../src/product-identity.tsx"],"mappings":";;;;;;;KAEY,WAAW,QAAQ;EAAkB;;KAErC,kBAAkB,KAC5B,QAAQ;EAAkB;;KAIhB,oBAAoB,QAAQ;EAAkB;;;;KCE9C;UAEK;EACf,YAAY,KAAK;EACjB,iBAAiB,QAAQ;;;;;EAKzB;;UAGe;EACf;EACA;EACA,OAAO,KAAK;EACZ,cAAc;;iBAMA,sBACd,aACA,WAAW,4BACV;;;;KCjBS;WACI;IAAuB;WACvB;IAAgB;;;;;;iBAOhB,iBACd,kBAAkB,kBAClB,KAAK,0BACK;;iBA4CI,mBAAmB,YAAY,QAAQ,yBAAyB;;iBAKhE,YAAY,YAAY,UAAU,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/app-view/types.ts","../src/client/ws-session-client.ts","../src/hooks/prompt-state.ts","../src/hooks/session-client-types.ts","../src/hooks/useSessionClient.ts","../src/hooks/use-session-directory.ts","../src/client/desktop-session-client.ts","../src/components/composer-attachments.ts","../src/components/Composer.tsx","../src/client/runtime-host.ts","../src/hooks/ui-intent-state.ts","../src/components/ConversationView.tsx","../src/components/AgentActivityPanel.tsx","../src/components/AgentSwitcherSheet.tsx","../src/components/PermissionPrompt.tsx","../src/components/personal-usage-dashboard-types.ts","../src/components/PersonalUsageDashboard.tsx","../src/components/SessionSurface.tsx","../src/components/SessionSidebar.tsx","../src/components/SessionMonitor.tsx","../src/components/Dialog.tsx","../src/components/SettingsScreen.tsx","../src/components/HelpSheet.tsx","../src/components/Brand.tsx","../src/product-identity.tsx"],"mappings":";;;;;;;KAEY,WAAW,QAAQ;EAAkB;;KAErC,kBAAkB,KAC5B,QAAQ;EAAkB;;KAIhB,oBAAoB,QAAQ;EAAkB;;;;KCE9C;UAEK;EACf,YAAY,KAAK;EACjB,iBAAiB,QAAQ;;;;;EAKzB;;UAGe;EACf;EACA;EACA,OAAO,KAAK;EACZ,cAAc;;iBAMA,sBACd,aACA,WAAW,4BACV;;;;KCjBS;WACI;IAAuB;WACvB;IAAgB;;;;;;iBAOhB,iBACd,kBAAkB,kBAClB,KAAK,0BACK;;iBA4CI,mBAAmB,YAAY,QAAQ,yBAAyB;;iBAKhE,YAAY,YAAY,UAAU,kBAAkB;;;KCtDxD,uBAAuB,QACjC;EACE;;KAEQ,4BAA4B,QACtC;EACE;;;KAGQ,kBAAkB,KAAK,QAAQ;EAAkB;;;KAEjD,iBAAiB,QAAQ;EAAkB;;;;;;KAM3C,qBAAqB,KAC/B,QAAQ;EAAkB;;;KAKhB,kBAAkB,QAAQ;EAAkB;;;KAE5C,iBAAiB,KAC3B,QAAQ;EAAkB;;KAIhB,6BAA6B,QACvC;EACE;;;;KAKQ,qBAAqB,QAAQ;EAAkB;;KAC/C,mBAAmB,QAAQ;EAAkB;;KAC7C,qBAAqB,QAAQ;EAAkB;;UAE1C;EACf;EACA;EACA;EACA;;EAEA;;;;;;UAOe;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U,QAAM;;EAEhB;;EAEA;;EAEA;;;;;;;;EAQA,iBAAiB;;;;;;EAMjB;;iBAiBc,SACd,MACA,SACA,OACA,UACA,aACA,gBACA,eACA,gBACA,QACC,eAAe,QAAM;UAqGP;EACf;EACA;EACA,MAAM,QAAM;EACZ;EACA;;EAEA;EACA;EACA;;EAEA,iBAAiB;;;;;;;iBAQH,gBACd,MACA,OACA,MACA,cACA,aACA,aACA,WACA,UACA,kBACC,sBAAsB,QAAM;;;;;;;;;;iBCzJf,iBAAiB;EAAW,OAAO;IAAoB,QAAM;;;;;;;;;;;iBCb7D,YACd,MACA,SACA;EAEA;EACA;EACA,SAAS;IACP,MAAM;;;;iBCrCM,cAAc;EAAe;IAAkB,MAAM;;iBAiBrD,kBAAkB;EAAa;IAAqB,MAAM;;;;UChBzD;WACN;aAAqB;aAA8B;;WACnD;aAAoB;;;iBAKf,0BAA0B,OAAO;WACtC,OAAO;WACP,WAAW;IAClB,MAAM;iBAQM,sBAAsB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { IWireAgentDefinitionSummary, TClientMessage, TClientMessage as TClientMessage$1, TServerMessage, TServerMessage as TServerMessage$1, TSessionSurfaceRole } from "@robota-sdk/agent-transport";
|
|
1
2
|
import React$1, { ReactNode } from "react";
|
|
2
3
|
import { IAskRequestEvent, IDiffLine, IGoalState, IPermissionRequestEvent, ISettingsSnapshot, IToolAppViewRef, IToolState, TDriverId, TPermissionResultValue, TSettingsPatch } from "@robota-sdk/agent-interface-session";
|
|
3
|
-
import { IWireAgentDefinitionSummary, TClientMessage, TClientMessage as TClientMessage$1, TServerMessage, TServerMessage as TServerMessage$1 } from "@robota-sdk/agent-transport";
|
|
4
4
|
import { TActionResponse } from "@robota-sdk/agent-interface-transport";
|
|
5
5
|
import { IBackgroundTaskState, IExecutionDetailRecord, IExecutionWorkspaceEntry, IExecutionWorkspaceSnapshot } from "@robota-sdk/agent-interface-execution";
|
|
6
6
|
import { TCommandUiIntent } from "@robota-sdk/agent-interface-command";
|
|
@@ -220,6 +220,8 @@ interface IWsSessionState<TStatus extends string = TConnectionStatus> {
|
|
|
220
220
|
sessionName: string | null;
|
|
221
221
|
/** This connection's own driver id, learned from the server's first frame; null until then. */
|
|
222
222
|
ownDriverId: TDriverId | null;
|
|
223
|
+
/** The role the host gave this connection, learned when it connects; null until the host answers. */
|
|
224
|
+
role: TSessionSurfaceRole | null;
|
|
223
225
|
/** Null until the session has answered; refreshed after every command. */
|
|
224
226
|
commandCatalog: TCommandCatalog | null;
|
|
225
227
|
/** Null until the session has answered; refreshed after every command and turn. */
|
|
@@ -302,6 +304,18 @@ interface IWsSessionState<TStatus extends string = TConnectionStatus> {
|
|
|
302
304
|
executionDetailError: string | null;
|
|
303
305
|
/** True once the last page read had no further cursor — nothing more to load. */
|
|
304
306
|
executionDetailComplete: boolean;
|
|
307
|
+
executionDetailInput?: {
|
|
308
|
+
taskId: string;
|
|
309
|
+
status: 'pending' | 'sent' | 'failed';
|
|
310
|
+
};
|
|
311
|
+
executionDetailMode?: 'live' | 'transcript';
|
|
312
|
+
executionDetailUnreadable?: {
|
|
313
|
+
locked: number;
|
|
314
|
+
noKeys: number;
|
|
315
|
+
doesNotOpen: number;
|
|
316
|
+
};
|
|
317
|
+
showEarlierExecutionDetail?: () => void;
|
|
318
|
+
showLiveExecutionDetail?: () => void;
|
|
305
319
|
openExecutionDetail: (entryId: string) => void;
|
|
306
320
|
loadMoreExecutionDetail: () => void;
|
|
307
321
|
closeExecutionDetail: () => void;
|
|
@@ -369,6 +383,18 @@ declare function useWsSession(url: string): IWsSessionState<TConnectionStatus> &
|
|
|
369
383
|
*/
|
|
370
384
|
declare function rememberSessionForRestore(namespace: string, sessionId: string): void;
|
|
371
385
|
//#endregion
|
|
386
|
+
//#region src/client/desktop-session-client.d.ts
|
|
387
|
+
/** The secure desktop preload exposes frames, never an owner credential or a daemon endpoint. */
|
|
388
|
+
interface IDesktopSessionBridge {
|
|
389
|
+
subscribe(onFrame: (frame: string) => void, onClose: () => void, onReady: () => void): () => void;
|
|
390
|
+
send(frame: string): boolean;
|
|
391
|
+
close(): void;
|
|
392
|
+
}
|
|
393
|
+
declare function createDesktopSessionClient(bridge: IDesktopSessionBridge, callbacks: {
|
|
394
|
+
readonly onMessage: (message: TServerMessage) => void;
|
|
395
|
+
readonly onStatusChange: (status: TConnectionStatus) => void;
|
|
396
|
+
}): ISessionClientHandle;
|
|
397
|
+
//#endregion
|
|
372
398
|
//#region src/components/composer-attachments.d.ts
|
|
373
399
|
/**
|
|
374
400
|
* One file the desktop host's native "Attach files" dialog returned (#3282 §4d). Kept in structural
|
|
@@ -558,11 +584,13 @@ declare function PersonalUsageDashboard({ state }: {
|
|
|
558
584
|
* The full desktop layout over an `IWsSessionState`. `surface` is an optional label shown next to the
|
|
559
585
|
* mark (e.g. "app").
|
|
560
586
|
*/
|
|
561
|
-
declare function SessionSurface({ state, surface, personalUsageEnabled, onReconnect, pickFiles, getPathForFile, onOpenMemoryInEditor, appViewSandboxUrl }: {
|
|
587
|
+
declare function SessionSurface({ state, surface, personalUsageEnabled: personalUsageRequested, draftMode, onReconnect, pickFiles, getPathForFile, onOpenMemoryInEditor, appViewSandboxUrl }: {
|
|
562
588
|
state: IWsSessionState;
|
|
563
589
|
surface?: string;
|
|
564
590
|
/** Desktop shells opt in; embedded/session-only surfaces keep their existing chat-only contract. */
|
|
565
591
|
personalUsageEnabled?: boolean;
|
|
592
|
+
/** Secure desktop discards unsent text and attachment paths when the session closes. */
|
|
593
|
+
draftMode?: 'persistent' | 'volatile';
|
|
566
594
|
/**
|
|
567
595
|
* Present only when the host can restart the runtime after the connection is lost for good (issue
|
|
568
596
|
* #3280 §5, the desktop app); absent in the browser, where the banner says how to reopen it instead.
|
|
@@ -732,5 +760,5 @@ declare function ProductIdentityProvider({ value, children }: {
|
|
|
732
760
|
}): React.ReactElement;
|
|
733
761
|
declare function useProductIdentity(): IWebProductIdentity;
|
|
734
762
|
//#endregion
|
|
735
|
-
export { AgentActivityPanel, AgentSwitcherSheet, CenteredChrome, ConfirmDialog, ConversationView, Dialog, HelpSheet, type IActiveTool, type IClientRuntimeBridge, type IClientRuntimeEnvironment, type IClientRuntimeHost, type IClientTrustQuestion, type ICommandOutputEntry, type IComposerHandle, type IConfirmDialogProps, type IConversationMessage, type IDialogProps, type IPickedFile, type ISessionClientHandle, type ISessionNotice, type IToolGroupEntry, type IWebProductIdentity, type IWsSessionClientCallbacks, type IWsSessionState, PermissionPrompt, PersonalUsageDashboard, ProductIdentityProvider, ProductMark, ProductWordmark, SessionMonitor, SessionSidebar, SessionSurface, SettingsScreen, type TAppToolArguments, type TAppToolOutcome, type TAppView, type TClientRuntimeState, type TClientTrustChoice, type TConnectionStatus, type TConversationEntry, type TMakeSessionClient, type TPendingPrompt, type TPersonalUsageDashboardState, type TSessionListing, type TSessionsError, applyPromptEvent, askResponse, createWsSessionClient, describeUiIntentForGui, guiScreenForUiIntent, permissionResponse, rememberSessionForRestore, resolveClientRuntimeHost, useProductIdentity, useSessionClient, useWsSession };
|
|
763
|
+
export { AgentActivityPanel, AgentSwitcherSheet, CenteredChrome, ConfirmDialog, ConversationView, Dialog, HelpSheet, type IActiveTool, type IClientRuntimeBridge, type IClientRuntimeEnvironment, type IClientRuntimeHost, type IClientTrustQuestion, type ICommandOutputEntry, type IComposerHandle, type IConfirmDialogProps, type IConversationMessage, type IDesktopSessionBridge, type IDialogProps, type IPickedFile, type ISessionClientHandle, type ISessionNotice, type IToolGroupEntry, type IWebProductIdentity, type IWsSessionClientCallbacks, type IWsSessionState, PermissionPrompt, PersonalUsageDashboard, ProductIdentityProvider, ProductMark, ProductWordmark, SessionMonitor, SessionSidebar, SessionSurface, SettingsScreen, type TAppToolArguments, type TAppToolOutcome, type TAppView, type TClientRuntimeState, type TClientTrustChoice, type TConnectionStatus, type TConversationEntry, type TMakeSessionClient, type TPendingPrompt, type TPersonalUsageDashboardState, type TSessionListing, type TSessionsError, applyPromptEvent, askResponse, createDesktopSessionClient, createWsSessionClient, describeUiIntentForGui, guiScreenForUiIntent, permissionResponse, rememberSessionForRestore, resolveClientRuntimeHost, useProductIdentity, useSessionClient, useWsSession };
|
|
736
764
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/app-view/types.ts","../src/client/ws-session-client.ts","../src/hooks/prompt-state.ts","../src/hooks/session-client-types.ts","../src/hooks/useSessionClient.ts","../src/hooks/use-session-directory.ts","../src/components/composer-attachments.ts","../src/components/Composer.tsx","../src/client/runtime-host.ts","../src/hooks/ui-intent-state.ts","../src/components/ConversationView.tsx","../src/components/AgentActivityPanel.tsx","../src/components/AgentSwitcherSheet.tsx","../src/components/PermissionPrompt.tsx","../src/components/personal-usage-dashboard-types.ts","../src/components/PersonalUsageDashboard.tsx","../src/components/SessionSurface.tsx","../src/components/SessionSidebar.tsx","../src/components/SessionMonitor.tsx","../src/components/Dialog.tsx","../src/components/SettingsScreen.tsx","../src/components/HelpSheet.tsx","../src/components/Brand.tsx","../src/product-identity.tsx"],"mappings":";;;;;;;KAEY,WAAW,QAAQ;EAAkB;;KAErC,kBAAkB,KAC5B,QAAQ;EAAkB;;KAIhB,oBAAoB,QAAQ;EAAkB;;;;KCE9C;UAEK;EACf,YAAY,KAAK;EACjB,iBAAiB,QAAQ;;;;;EAKzB;;UAGe;EACf;EACA;EACA,OAAO,KAAK;EACZ,cAAc;;iBAMA,sBACd,aACA,WAAW,4BACV;;;;KCjBS;WACI;IAAuB;WACvB;IAAgB;;;;;;iBAOhB,iBACd,kBAAkB,kBAClB,KAAK,0BACK;;iBA4CI,mBAAmB,YAAY,QAAQ,yBAAyB;;iBAKhE,YAAY,YAAY,UAAU,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/app-view/types.ts","../src/client/ws-session-client.ts","../src/hooks/prompt-state.ts","../src/hooks/session-client-types.ts","../src/hooks/useSessionClient.ts","../src/hooks/use-session-directory.ts","../src/client/desktop-session-client.ts","../src/components/composer-attachments.ts","../src/components/Composer.tsx","../src/client/runtime-host.ts","../src/hooks/ui-intent-state.ts","../src/components/ConversationView.tsx","../src/components/AgentActivityPanel.tsx","../src/components/AgentSwitcherSheet.tsx","../src/components/PermissionPrompt.tsx","../src/components/personal-usage-dashboard-types.ts","../src/components/PersonalUsageDashboard.tsx","../src/components/SessionSurface.tsx","../src/components/SessionSidebar.tsx","../src/components/SessionMonitor.tsx","../src/components/Dialog.tsx","../src/components/SettingsScreen.tsx","../src/components/HelpSheet.tsx","../src/components/Brand.tsx","../src/product-identity.tsx"],"mappings":";;;;;;;KAEY,WAAW,QAAQ;EAAkB;;KAErC,kBAAkB,KAC5B,QAAQ;EAAkB;;KAIhB,oBAAoB,QAAQ;EAAkB;;;;KCE9C;UAEK;EACf,YAAY,KAAK;EACjB,iBAAiB,QAAQ;;;;;EAKzB;;UAGe;EACf;EACA;EACA,OAAO,KAAK;EACZ,cAAc;;iBAMA,sBACd,aACA,WAAW,4BACV;;;;KCjBS;WACI;IAAuB;WACvB;IAAgB;;;;;;iBAOhB,iBACd,kBAAkB,kBAClB,KAAK,0BACK;;iBA4CI,mBAAmB,YAAY,QAAQ,yBAAyB;;iBAKhE,YAAY,YAAY,UAAU,kBAAkB;;;KCtDxD,uBAAuB,QACjC;EACE;;KAEQ,4BAA4B,QACtC;EACE;;;KAGQ,kBAAkB,KAAK,QAAQ;EAAkB;;;KAEjD,iBAAiB,QAAQ;EAAkB;;;;;;KAM3C,qBAAqB,KAC/B,QAAQ;EAAkB;;;KAKhB,kBAAkB,QAAQ;EAAkB;;;KAE5C,iBAAiB,KAC3B,QAAQ;EAAkB;;KAIhB,6BAA6B,QACvC;EACE;;;;KAKQ,qBAAqB,QAAQ;EAAkB;;KAC/C,mBAAmB,QAAQ;EAAkB;;KAC7C,qBAAqB,QAAQ;EAAkB;;UAE1C;EACf;E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