@tutti-os/agent-gui 0.0.26 → 0.0.28

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.
@@ -89,14 +89,20 @@ interface AgentHostUnactivateAgentSessionResult {
89
89
  buffered: boolean;
90
90
  }
91
91
  interface AgentPromptContentBlock {
92
- type: "text" | "image" | "skill" | "mention";
92
+ type: "text" | "image" | "file" | "skill" | "mention";
93
93
  text?: string;
94
- mimeType?: "image/png" | "image/jpeg" | "image/webp";
94
+ mimeType?: "image/png" | "image/jpeg" | "image/webp" | string;
95
95
  data?: string;
96
96
  url?: string;
97
97
  attachmentId?: string;
98
98
  name?: string;
99
99
  path?: string;
100
+ uri?: string;
101
+ hostPath?: string;
102
+ uploadStatus?: string;
103
+ assetId?: string;
104
+ kind?: string;
105
+ sizeBytes?: number;
100
106
  }
101
107
  interface AgentHostUpdateAgentSessionSettingsResult {
102
108
  agentSessionId: string;
@@ -220,6 +226,9 @@ interface AgentHostSelectedFile {
220
226
  name?: string;
221
227
  path: string;
222
228
  }
229
+ interface AgentHostSelectFilesInput {
230
+ allowDirectories?: boolean;
231
+ }
223
232
  type AgentHostWorkspaceApi = AgentHostRecord & {
224
233
  copyPath?: (input: {
225
234
  path: string;
@@ -237,7 +246,7 @@ type AgentHostWorkspaceApi = AgentHostRecord & {
237
246
  selectDirectory: () => AgentHostAsyncResult<{
238
247
  path: string;
239
248
  } | null>;
240
- selectFiles: () => AgentHostAsyncResult<AgentHostSelectedFile[]>;
249
+ selectFiles: (input?: AgentHostSelectFilesInput) => AgentHostAsyncResult<AgentHostSelectedFile[]>;
241
250
  writeFileText: (input: {
242
251
  content: string;
243
252
  path: string;
@@ -537,9 +546,21 @@ interface AgentComposerDraftImage {
537
546
  uploading?: boolean;
538
547
  uploadError?: string;
539
548
  }
549
+ interface AgentComposerDraftFile {
550
+ id: string;
551
+ name: string;
552
+ mimeType?: string;
553
+ path?: string;
554
+ hostPath?: string;
555
+ assetId?: string;
556
+ sizeBytes?: number;
557
+ uploading?: boolean;
558
+ uploadError?: string;
559
+ }
540
560
  interface AgentComposerDraft {
541
561
  prompt: string;
542
562
  images: AgentComposerDraftImage[];
563
+ files?: AgentComposerDraftFile[];
543
564
  }
544
565
  interface AgentGUIComposerSettingsVM {
545
566
  sessionSettings: AgentSessionComposerSettings | null;
@@ -637,4 +658,4 @@ interface AgentMessageMarkdownWorkspaceAppIcon {
637
658
  workspaceId?: string | null;
638
659
  }
639
660
 
640
- export type { AgentGUINodeData as A, NodeFrame as N, Point as P, AgentGUINodeViewModel as a, AgentGUIProviderSkillOption as b, AgentHostActivateAgentSessionResult as c, AgentHostAgentSessionComposerSettings as d, AgentHostAgentSessionState as e, AgentHostApi as f, AgentHostInputApi as g, AgentHostRuntimeApi as h, AgentHostUnactivateAgentSessionResult as i, AgentHostUpdateAgentSessionSettingsResult as j, AgentMessageMarkdownWorkspaceAppIcon as k, AgentProbeProvider as l, AgentProbeSnapshot as m, AgentProvider as n, AgentProviderProbeListInput as o, AgentProviderProbeListResult as p, AgentUsageQuota as q, AgentUsageSnapshot as r };
661
+ export type { AgentGUINodeData as A, NodeFrame as N, Point as P, AgentGUINodeViewModel as a, AgentGUIProviderSkillOption as b, AgentHostActivateAgentSessionResult as c, AgentHostAgentSessionComposerSettings as d, AgentHostAgentSessionState as e, AgentHostApi as f, AgentHostInputApi as g, AgentHostRuntimeApi as h, AgentHostSelectFilesInput as i, AgentHostUnactivateAgentSessionResult as j, AgentHostUpdateAgentSessionSettingsResult as k, AgentMessageMarkdownWorkspaceAppIcon as l, AgentProbeProvider as m, AgentProbeSnapshot as n, AgentProvider as o, AgentProviderProbeListInput as p, AgentProviderProbeListResult as q, AgentUsageQuota as r, AgentUsageSnapshot as s };
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, JSX } from 'react';
3
3
  import { W as WorkspaceLinkAction } from '../workspaceLinkActions-CqWZaCY4.js';
4
- import { b as AgentGUIProviderSkillOption, k as AgentMessageMarkdownWorkspaceAppIcon } from '../AgentMessageMarkdown-DQL8udfP.js';
4
+ import { b as AgentGUIProviderSkillOption, l as AgentMessageMarkdownWorkspaceAppIcon } from '../AgentMessageMarkdown-CZaG-QW3.js';
5
5
  import { c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BvlmCNOm.js';
6
6
  export { B as BuildWorkspaceAgentSessionDetailInput, d as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BvlmCNOm.js';
7
7
  export { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, q as WorkspaceAgentActivityTimelineItem } from '../workspaceAgentActivityListViewModel-jRF8cP37.js';
@@ -6,11 +6,11 @@ import {
6
6
  projectAgentConversationVM,
7
7
  reconcileProjectedAgentConversationVM,
8
8
  useProjectedAgentConversation
9
- } from "../chunk-7JW4OAKS.js";
10
- import "../chunk-BUBD5E4F.js";
9
+ } from "../chunk-LKT3EFGR.js";
10
+ import "../chunk-IBQO76IY.js";
11
11
  import "../chunk-XAQQN6MP.js";
12
12
  import "../chunk-XJ34OIEQ.js";
13
- import "../chunk-CCI6EK5W.js";
13
+ import "../chunk-EWWAG26H.js";
14
14
  import "../chunk-TYGL25EL.js";
15
15
  import {
16
16
  translate
@@ -3,7 +3,7 @@ import {
3
3
  approvalOptionDisplayLabel,
4
4
  getPromptToolDetails,
5
5
  isPromptRequestIdTitle
6
- } from "../chunk-4MOHKNXA.js";
6
+ } from "../chunk-LHN26OIP.js";
7
7
  import {
8
8
  PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
9
9
  PLAN_IMPLEMENTATION_PROMPT,
@@ -16,7 +16,7 @@ import {
16
16
  cn,
17
17
  extractAgentMcpToolTarget,
18
18
  normalizeAskUserQuestions
19
- } from "../chunk-BUBD5E4F.js";
19
+ } from "../chunk-IBQO76IY.js";
20
20
  import {
21
21
  managedAgentRoundedIconUrl,
22
22
  userAvatarPlaceholderUrl,
@@ -26,7 +26,7 @@ import "../chunk-MTFSQWZ6.js";
26
26
  import {
27
27
  resolveWorkspaceAgentSessionSortTimeUnixMs
28
28
  } from "../chunk-IBIMGLCD.js";
29
- import "../chunk-CCI6EK5W.js";
29
+ import "../chunk-EWWAG26H.js";
30
30
  import {
31
31
  workspaceAgentProviderLabel
32
32
  } from "../chunk-TYGL25EL.js";
@@ -193,4 +193,4 @@ export {
193
193
  useOptionalAgentHostApi,
194
194
  getOptionalAgentHostApi
195
195
  };
196
- //# sourceMappingURL=chunk-CCI6EK5W.js.map
196
+ //# sourceMappingURL=chunk-EWWAG26H.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../agentActivityRuntime.tsx","../agentActivityHost.tsx","../host/agentHostApi.ts"],"sourcesContent":["import {\n createContext,\n useContext,\n useSyncExternalStore,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport type {\n AgentActivityCancelSessionInput,\n AgentActivityCancelSessionResult,\n AgentActivityCreateSessionInput,\n AgentActivityDeleteSessionInput,\n AgentActivityDeleteSessionResult,\n AgentActivityMessageOrder,\n AgentActivityMessagePage,\n AgentActivitySendInput,\n AgentActivitySession,\n AgentActivitySnapshot,\n AgentActivitySnapshotListener,\n AgentActivitySubmitInteractiveInput\n} from \"@tutti-os/agent-activity-core\";\nimport type {\n AgentHostAgentSessionComposerSettings,\n AgentHostActivateAgentSessionResult,\n AgentHostRuntimeOpenclawGatewayWarmupResult,\n AgentHostUpdateAgentSessionSettingsResult,\n AgentHostUnactivateAgentSessionResult,\n AgentHostAgentSessionState\n} from \"./shared/contracts/dto\";\n\nexport interface AgentActivityRuntimeListSessionMessagesInput {\n afterVersion?: number;\n beforeVersion?: number;\n agentSessionId: string;\n limit?: number;\n order?: AgentActivityMessageOrder;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListGeneratedFilesInput {\n limit?: number;\n query?: string;\n sessionCwd?: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFile {\n label: string;\n path: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFileList {\n entries: AgentActivityRuntimeGeneratedFile[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeEnsureSessionSynchronizedInput {\n afterVersion?: number;\n agentSessionId: string;\n onError?: (error: unknown) => void;\n workspaceId: string;\n}\n\nexport type AgentActivityRuntimeRetainSessionEventsInput =\n AgentActivityRuntimeEnsureSessionSynchronizedInput;\n\nexport interface AgentActivityRuntimeSetSessionPinnedInput {\n agentSessionId: string;\n pinned: boolean;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeTrackSettingsProjectChangeInput {\n action: \"clear\" | \"create_new\" | \"select_existing\";\n agentSessionId: string;\n provider?: string | null;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGetSessionControlStateInput {\n agentSessionId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGetComposerOptionsInput {\n cwd?: string | null;\n force?: boolean;\n provider?: string;\n settings?: AgentHostAgentSessionComposerSettings | null;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUpdateSessionSettingsInput {\n agentSessionId: string;\n settings: AgentHostAgentSessionComposerSettings;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeTrackDraftComposerSettingsChangeInput {\n nextSettings: AgentHostAgentSessionComposerSettings;\n previousSettings: AgentHostAgentSessionComposerSettings;\n provider: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeWarmupOpenclawGatewayInput {\n workspaceId?: string | null;\n}\n\nexport interface AgentActivityRuntimeDiagnosticInput {\n details?: Record<string, unknown>;\n event: string;\n level?: \"debug\" | \"info\" | \"warn\" | \"error\";\n source?: string;\n workspaceId?: string | null;\n}\n\nexport interface AgentActivityRuntimeActivateSessionInput {\n agentSessionId: string;\n cwd?: string;\n initialContent?: AgentActivitySendInput[\"content\"];\n /** 仅展示用首轮文本(bundle 折叠成一个 chip);initialContent 仍带展开后的文件。 */\n initialDisplayPrompt?: string | null;\n mode: \"existing\" | \"new\";\n openclawGatewayReady?: boolean;\n provider?: string;\n settings?: AgentHostAgentSessionComposerSettings;\n title?: string;\n visible?: boolean;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUnactivateSessionInput {\n agentSessionId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeReadSessionAttachmentInput {\n agentSessionId: string;\n attachmentId: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeReadPromptAssetInput {\n agentSessionId?: string | null;\n assetId?: string | null;\n hostPath?: string | null;\n kind?: string | null;\n mimeType: string;\n name?: string | null;\n path?: string | null;\n sha256?: string | null;\n uploadStatus?: string | null;\n uri?: string | null;\n workspaceId: string;\n}\n\nexport type AgentActivityRuntimePromptContentBlock =\n AgentActivitySendInput[\"content\"][number] & {\n assetId?: string;\n hostPath?: string;\n kind?: string;\n path?: string;\n sizeBytes?: number;\n uploadStatus?: string;\n uri?: string;\n };\n\nexport interface AgentActivityRuntimeUploadPromptContentInput {\n content: AgentActivityRuntimePromptContentBlock[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUploadPromptContentResult {\n content: AgentActivityRuntimePromptContentBlock[];\n}\n\nexport interface AgentActivityRuntimeSessionAttachment {\n attachmentId: string;\n mimeType: string;\n name?: string;\n data: string;\n}\n\nexport interface AgentActivityRuntimePromptAsset {\n assetId?: string;\n hostPath?: string;\n kind?: string;\n mimeType: string;\n name?: string;\n path: string;\n uploadStatus?: string;\n uri?: string;\n data: string;\n}\n\nexport interface AgentActivityRuntime {\n cancelSession(\n input: AgentActivityCancelSessionInput\n ): Promise<AgentActivityCancelSessionResult>;\n createSession(\n input: AgentActivityCreateSessionInput\n ): Promise<AgentActivitySession>;\n deleteSession(\n input: AgentActivityDeleteSessionInput\n ): Promise<AgentActivityDeleteSessionResult>;\n activateSession(\n input: AgentActivityRuntimeActivateSessionInput\n ): Promise<AgentHostActivateAgentSessionResult>;\n getSession(\n workspaceId: string,\n agentSessionId: string\n ): Promise<AgentActivitySession>;\n getComposerOptions(\n input: AgentActivityRuntimeGetComposerOptionsInput\n ): Promise<unknown>;\n updateSessionSettings(\n input: AgentActivityRuntimeUpdateSessionSettingsInput\n ): Promise<AgentHostUpdateAgentSessionSettingsResult>;\n warmupOpenclawGateway?(\n input?: AgentActivityRuntimeWarmupOpenclawGatewayInput\n ): Promise<AgentHostRuntimeOpenclawGatewayWarmupResult>;\n getSessionControlState(\n input: AgentActivityRuntimeGetSessionControlStateInput\n ): Promise<AgentHostAgentSessionState>;\n getSnapshot(workspaceId: string): AgentActivitySnapshot;\n listSessionMessages(\n input: AgentActivityRuntimeListSessionMessagesInput\n ): Promise<AgentActivityMessagePage>;\n listAgentGeneratedFiles?(\n input: AgentActivityRuntimeListGeneratedFilesInput\n ): Promise<AgentActivityRuntimeGeneratedFileList>;\n load(\n workspaceId: string,\n signal?: AbortSignal\n ): Promise<AgentActivitySnapshot>;\n ensureSessionSynchronized?(\n input: AgentActivityRuntimeEnsureSessionSynchronizedInput\n ): () => void;\n /** @deprecated Use ensureSessionSynchronized. */\n retainSessionEvents(\n input: AgentActivityRuntimeRetainSessionEventsInput\n ): () => void;\n sendInput(input: AgentActivitySendInput): Promise<AgentActivitySession>;\n uploadPromptContent?(\n input: AgentActivityRuntimeUploadPromptContentInput\n ): Promise<AgentActivityRuntimeUploadPromptContentResult>;\n readSessionAttachment?(\n input: AgentActivityRuntimeReadSessionAttachmentInput\n ): Promise<AgentActivityRuntimeSessionAttachment>;\n readPromptAsset?(\n input: AgentActivityRuntimeReadPromptAssetInput\n ): Promise<AgentActivityRuntimePromptAsset>;\n setSessionPinned(\n input: AgentActivityRuntimeSetSessionPinnedInput\n ): Promise<AgentActivitySession>;\n trackSettingsProjectChange?(\n input: AgentActivityRuntimeTrackSettingsProjectChangeInput\n ): Promise<void>;\n trackDraftComposerSettingsChange?(\n input: AgentActivityRuntimeTrackDraftComposerSettingsChangeInput\n ): Promise<void>;\n reportDiagnostic?(\n input: AgentActivityRuntimeDiagnosticInput\n ): Promise<void> | void;\n unactivateSession(\n input: AgentActivityRuntimeUnactivateSessionInput\n ): Promise<AgentHostUnactivateAgentSessionResult>;\n submitInteractive(\n input: AgentActivitySubmitInteractiveInput\n ): Promise<unknown>;\n subscribeSessionEvents(\n workspaceId: string,\n listener: (event: unknown) => void\n ): () => void;\n subscribe(\n workspaceId: string,\n listener: AgentActivitySnapshotListener\n ): () => void;\n}\n\nconst AgentActivityRuntimeContext = createContext<AgentActivityRuntime | null>(\n null\n);\n\nlet currentAgentActivityRuntime: AgentActivityRuntime | null = null;\n\nexport interface AgentActivityRuntimeProviderProps extends PropsWithChildren {\n runtime?: AgentActivityRuntime | null;\n}\n\nexport function AgentActivityRuntimeProvider({\n children,\n runtime\n}: AgentActivityRuntimeProviderProps): JSX.Element {\n currentAgentActivityRuntime = runtime ?? null;\n return (\n <AgentActivityRuntimeContext.Provider value={runtime ?? null}>\n {children}\n </AgentActivityRuntimeContext.Provider>\n );\n}\n\nexport function useAgentActivityRuntime(): AgentActivityRuntime {\n const runtime =\n useContext(AgentActivityRuntimeContext) ?? getTestAgentActivityRuntime();\n if (!runtime) {\n throw new Error(\n \"AgentActivityRuntimeProvider is missing an AgentActivityRuntime instance.\"\n );\n }\n return runtime;\n}\n\nexport function useOptionalAgentActivityRuntime(): AgentActivityRuntime | null {\n return (\n useContext(AgentActivityRuntimeContext) ?? getTestAgentActivityRuntime()\n );\n}\n\nexport function useAgentActivitySnapshot(\n workspaceId: string\n): AgentActivitySnapshot {\n const runtime = useAgentActivityRuntime();\n const normalizedWorkspaceId = workspaceId.trim();\n return useSyncExternalStore(\n (listener) => runtime.subscribe(normalizedWorkspaceId, listener),\n () => runtime.getSnapshot(normalizedWorkspaceId),\n () => runtime.getSnapshot(normalizedWorkspaceId)\n );\n}\n\nexport function getAgentActivityRuntime(): AgentActivityRuntime {\n const runtime =\n getExplicitWindowTestAgentActivityRuntime() ??\n currentAgentActivityRuntime ??\n getTestAgentActivityRuntime();\n if (!runtime) {\n throw new Error(\n \"AgentActivityRuntimeProvider is missing an AgentActivityRuntime instance.\"\n );\n }\n return runtime;\n}\n\nexport function getOptionalAgentActivityRuntime(): AgentActivityRuntime | null {\n return (\n getExplicitWindowTestAgentActivityRuntime() ??\n currentAgentActivityRuntime ??\n getTestAgentActivityRuntime()\n );\n}\n\nexport function resetAgentActivityRuntimeForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentActivityRuntime = null;\n }\n}\n\nexport function setAgentActivityRuntimeForTests(\n runtime: AgentActivityRuntime | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentActivityRuntime = runtime;\n }\n}\n\nfunction getTestAgentActivityRuntime(): AgentActivityRuntime | null {\n if (process.env.NODE_ENV !== \"test\") {\n return null;\n }\n if (typeof window === \"undefined\") {\n return null;\n }\n const explicitRuntime = getExplicitWindowTestAgentActivityRuntime();\n if (explicitRuntime) {\n return explicitRuntime;\n }\n if (currentAgentActivityRuntime) {\n return currentAgentActivityRuntime;\n }\n const testRuntime = (\n window as unknown as Window & {\n agentActivityRuntime?: AgentActivityRuntime;\n }\n ).agentActivityRuntime;\n return testRuntime ?? null;\n}\n\nfunction getExplicitWindowTestAgentActivityRuntime(): AgentActivityRuntime | null {\n if (process.env.NODE_ENV !== \"test\" || typeof window === \"undefined\") {\n return null;\n }\n const testDescriptor = Object.getOwnPropertyDescriptor(\n window,\n \"agentActivityRuntime\"\n );\n if (!testDescriptor || !(\"value\" in testDescriptor)) {\n return null;\n }\n return (testDescriptor.value as AgentActivityRuntime | undefined) ?? null;\n}\n","import {\n createContext,\n useContext,\n useMemo,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport {\n toAgentHostRuntimeApi,\n type AgentHostInputApi,\n type AgentHostRuntimeApi\n} from \"./host/agentHostApi\";\nimport {\n AgentActivityRuntimeProvider,\n type AgentActivityRuntime\n} from \"./agentActivityRuntime\";\n\nconst AgentActivityHostContext = createContext<AgentHostRuntimeApi | null>(\n null\n);\n\nlet currentAgentHostApi: AgentHostRuntimeApi | null = null;\n\nexport interface AgentActivityHostProviderProps extends PropsWithChildren {\n agentActivityRuntime?: AgentActivityRuntime | null;\n agentHostApi?: AgentHostInputApi | null;\n}\n\nexport function AgentActivityHostProvider({\n agentActivityRuntime,\n agentHostApi,\n children\n}: AgentActivityHostProviderProps): JSX.Element {\n const resolvedAgentHostApi = useMemo(\n () => (agentHostApi ? toAgentHostRuntimeApi(agentHostApi) : null),\n [agentHostApi]\n );\n currentAgentHostApi = resolvedAgentHostApi;\n return (\n <AgentActivityRuntimeProvider runtime={agentActivityRuntime}>\n <AgentActivityHostContext.Provider value={resolvedAgentHostApi}>\n {children}\n </AgentActivityHostContext.Provider>\n </AgentActivityRuntimeProvider>\n );\n}\n\nexport function useAgentHostApi(): AgentHostRuntimeApi {\n const agentHostApi =\n useContext(AgentActivityHostContext) ?? getTestAgentHostApi();\n if (!agentHostApi) {\n throw new Error(\n \"AgentActivityHostProvider is missing an agentHostApi instance.\"\n );\n }\n return agentHostApi;\n}\n\nexport function useOptionalAgentHostApi(): AgentHostRuntimeApi | null {\n return useContext(AgentActivityHostContext) ?? getTestAgentHostApi();\n}\n\nexport function getAgentHostApi(): AgentHostRuntimeApi {\n const agentHostApi =\n getExplicitWindowTestAgentHostApi() ??\n currentAgentHostApi ??\n getTestAgentHostApi();\n if (!agentHostApi) {\n throw new Error(\n \"AgentActivityHostProvider is missing an agentHostApi instance.\"\n );\n }\n return agentHostApi;\n}\n\nexport function getOptionalAgentHostApi(): AgentHostRuntimeApi | null {\n return (\n getExplicitWindowTestAgentHostApi() ??\n currentAgentHostApi ??\n getTestAgentHostApi()\n );\n}\n\nexport function resetAgentHostApiForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentHostApi = null;\n }\n}\n\nexport function setAgentHostApiForTests(\n agentHostApi: AgentHostInputApi | AgentHostRuntimeApi | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n currentAgentHostApi = agentHostApi\n ? toAgentHostRuntimeApi(agentHostApi)\n : null;\n }\n}\n\nfunction getTestAgentHostApi(): AgentHostRuntimeApi | null {\n if (process.env.NODE_ENV !== \"test\") {\n return null;\n }\n if (typeof window === \"undefined\") {\n return null;\n }\n const explicitAgentHostApi = getExplicitWindowTestAgentHostApi();\n if (explicitAgentHostApi) {\n return explicitAgentHostApi;\n }\n if (currentAgentHostApi) {\n return currentAgentHostApi;\n }\n const testAgentHostApi = (\n window as unknown as Window & {\n agentHostApi?: AgentHostInputApi | AgentHostRuntimeApi;\n }\n ).agentHostApi;\n return testAgentHostApi ? toAgentHostRuntimeApi(testAgentHostApi) : null;\n}\n\nfunction getExplicitWindowTestAgentHostApi(): AgentHostRuntimeApi | null {\n if (process.env.NODE_ENV !== \"test\" || typeof window === \"undefined\") {\n return null;\n }\n const testDescriptor = Object.getOwnPropertyDescriptor(\n window,\n \"agentHostApi\"\n );\n if (!testDescriptor || !(\"value\" in testDescriptor)) {\n return null;\n }\n const testAgentHostApi = testDescriptor.value as\n | AgentHostInputApi\n | AgentHostRuntimeApi\n | undefined;\n return testAgentHostApi ? toAgentHostRuntimeApi(testAgentHostApi) : null;\n}\n","import type {\n AgentHostBatchUserInfoInput,\n AgentHostBatchUserInfoResult,\n AgentHostDeleteWorkspaceAgentSessionInput,\n AgentHostWorkspaceAgentListInput as AgentHostListWorkspaceAgentsInput,\n AgentHostListWorkspaceAgentProbesInput,\n AgentHostWorkspaceAgentSessionMessages,\n AgentHostWorkspaceAgentSessionMessagesInput,\n AgentHostWorkspaceAgentSessionSummary,\n AgentHostWorkspaceAgentSessionSummaryInput,\n AgentHostWorkspaceAgentProbesResult,\n AgentHostWorkspaceAgentSnapshot,\n ReadWorkspaceFileResult as AgentHostReadWorkspaceFileResult\n} from \"../shared/contracts/dto\";\nimport type { WorkspaceUserProjectService } from \"@tutti-os/workspace-user-project/contracts\";\n\ntype AgentHostAsyncResult<T = any> = Promise<T>;\ntype AgentHostRecord = Record<string, unknown>;\ntype AgentHostUnsubscribe = () => void;\ntype AgentHostWorkspaceScopedInput<\n T extends {\n workspaceId?: string | null;\n }\n> = Omit<T, \"workspaceId\"> & {\n workspaceId: string;\n};\ntype AgentHostWorkspaceAgentsListInput =\n AgentHostWorkspaceScopedInput<AgentHostListWorkspaceAgentsInput>;\ntype AgentHostWorkspaceAgentSessionMessagesRuntimeInput =\n AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionMessagesInput>;\ntype AgentHostWorkspaceAgentSessionSummaryRuntimeInput =\n AgentHostWorkspaceScopedInput<AgentHostWorkspaceAgentSessionSummaryInput>;\ntype AgentHostDeleteWorkspaceAgentSessionRuntimeInput =\n AgentHostWorkspaceScopedInput<AgentHostDeleteWorkspaceAgentSessionInput>;\n\nexport type AgentHostClipboardApi = {\n writeText: (text: string) => AgentHostAsyncResult<void>;\n};\n\nexport type AgentHostDebugApi = {\n logRuntimeDiagnostics: (\n payload: unknown\n ) => AgentHostAsyncResult<void> | void;\n logTerminalDiagnostics?: (\n payload: unknown\n ) => AgentHostAsyncResult<void> | void;\n};\n\nexport type AgentHostFilesystemApi = AgentHostRecord & {\n readFileText: (payload: {\n path?: string;\n uri?: string;\n }) => AgentHostAsyncResult<{\n content: string;\n name?: string;\n path?: string;\n }>;\n};\n\nexport type AgentHostMetaApi = AgentHostRecord & {\n appVersion?: string | null;\n isPackaged?: boolean;\n isTest?: boolean;\n mainPid?: number | null;\n platform?: string;\n workspaceId?: string;\n};\n\nexport type AgentHostEnvironmentApi = AgentHostRecord & {\n getBaseUrl?: () => AgentHostAsyncResult<string>;\n warmupOpenclawGateway?: (input?: unknown) => AgentHostAsyncResult<unknown>;\n};\n\nexport interface AgentHostSelectedFile {\n name?: string;\n path: string;\n}\n\nexport interface AgentHostSelectFilesInput {\n allowDirectories?: boolean;\n}\n\nexport type AgentHostWorkspaceApi = AgentHostRecord & {\n copyPath?: (input: { path: string }) => AgentHostAsyncResult<void>;\n ensureDirectory: (input: { path: string }) => AgentHostAsyncResult<void>;\n getPathForFile: (file: File) => string;\n readFile: (input: {\n path: string;\n }) => AgentHostAsyncResult<AgentHostReadWorkspaceFileResult>;\n selectContextEntries?: () => AgentHostAsyncResult<{ entries: unknown[] }>;\n selectDirectory: () => AgentHostAsyncResult<{ path: string } | null>;\n selectFiles: (\n input?: AgentHostSelectFilesInput\n ) => AgentHostAsyncResult<AgentHostSelectedFile[]>;\n writeFileText: (input: {\n content: string;\n path: string;\n }) => AgentHostAsyncResult<unknown>;\n};\n\nexport interface AgentHostInputApi {\n account?: AgentHostAccountApi;\n agentGuiBatch?: AgentHostAgentGuiBatchApi;\n agentSessions?: AgentHostAgentSessionsApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n runtime?: AgentHostEnvironmentApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\n workspaceAgents?: AgentHostWorkspaceAgentsApi;\n}\n\nexport type AgentHostApi = AgentHostInputApi;\n\nexport type AgentHostAccountApi = AgentHostRecord & {\n batchGetUserInfo: (\n input: AgentHostBatchUserInfoInput\n ) => AgentHostAsyncResult<AgentHostBatchUserInfoResult>;\n ensureProfiles?: (input: any) => AgentHostAsyncResult<any>;\n};\n\nexport type AgentHostAgentGuiBatchApi = AgentHostRecord & {\n exportRun: (input: any) => AgentHostAsyncResult<any>;\n};\n\nexport type AgentHostWorkspaceAgentProbesApi = AgentHostRecord & {\n list: (\n input: AgentHostListWorkspaceAgentProbesInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentProbesResult>;\n};\n\nexport type AgentProviderProbeListInput =\n AgentHostListWorkspaceAgentProbesInput;\nexport type AgentProviderProbeListResult = AgentHostWorkspaceAgentProbesResult;\n\nexport interface AgentHostUserProject {\n id: string;\n path: string;\n label: string;\n createdAtUnixMs?: number;\n updatedAtUnixMs?: number;\n lastUsedAtUnixMs?: number;\n}\n\nexport type AgentHostUserProjectsApi = AgentHostRecord & {\n service?: WorkspaceUserProjectService;\n checkPath?: (input: { path: string }) => AgentHostAsyncResult<{\n exists: boolean;\n isDirectory: boolean;\n path: string;\n }>;\n create?: (input: {\n name: string;\n }) => AgentHostAsyncResult<AgentHostUserProject>;\n getDefaultSelection?: () => AgentHostAsyncResult<{\n path: string | null;\n } | null>;\n list: () => AgentHostAsyncResult<{\n projects: AgentHostUserProject[];\n }>;\n subscribe?: (listener: () => void) => AgentHostUnsubscribe;\n prepareSelection?: (input: {\n projectLocked: boolean;\n selectedPath: string | null;\n }) => AgentHostAsyncResult<{\n isSelectedPathMissing: boolean;\n projects: AgentHostUserProject[];\n selection:\n | {\n kind: \"clear\";\n suppressedPath: string;\n }\n | {\n kind: \"none\";\n }\n | {\n kind: \"select\";\n path: string;\n };\n }>;\n remove?: (input: { path: string }) => AgentHostAsyncResult<void>;\n isNoProjectPath?: (input: { path: string }) => boolean;\n rememberDefaultSelection?: (input: {\n path: string | null;\n }) => AgentHostAsyncResult<void>;\n use: (input: { path: string }) => AgentHostAsyncResult<AgentHostUserProject>;\n};\n\nexport type AgentHostAgentSessionsApi = AgentHostRecord & {\n activate: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.cancelSession.\n */\n cancel: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.sendInput.\n */\n exec: (input: any) => AgentHostAsyncResult<any>;\n getComposerOptions?: (input: any) => AgentHostAsyncResult<any>;\n getState: (input: any) => AgentHostAsyncResult<any>;\n onEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.setSessionPinned.\n */\n pinSession?: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.\n */\n releaseEventStream?: (input?: any) => AgentHostAsyncResult;\n /**\n * @deprecated AgentGUI production sync must use AgentActivityRuntime.ensureSessionSynchronized.\n */\n retainEventStream?: (input: any) => AgentHostAsyncResult;\n /**\n * @deprecated AgentGUI production writes must use AgentActivityRuntime.submitInteractive.\n */\n submitInteractive: (input: any) => AgentHostAsyncResult<any>;\n /**\n * @deprecated AgentGUI production UI must derive events from AgentActivityRuntime snapshots.\n */\n trackSettingsProjectChange?: (input: {\n action: \"clear\" | \"create_new\" | \"select_existing\";\n agentSessionId: string;\n provider?: string | null;\n }) => AgentHostAsyncResult<void>;\n subscribeEvents: (\n input: any,\n listener: (event: any) => void\n ) => AgentHostUnsubscribe;\n unactivate: (input: any) => AgentHostAsyncResult<any>;\n updateSettings: (input: any) => AgentHostAsyncResult<any>;\n};\n\n/**\n * @deprecated Legacy host DTO projection. AgentGUI production reads and writes\n * must use AgentActivityRuntime and AgentActivity* models.\n */\nexport type AgentHostWorkspaceAgentsApi = AgentHostRecord & {\n /**\n * @deprecated Use AgentActivityRuntime.deleteSession.\n */\n deleteSession: (\n input: AgentHostDeleteWorkspaceAgentSessionRuntimeInput\n ) => AgentHostAsyncResult<any>;\n /**\n * @deprecated Derive summaries from AgentActivitySnapshot/session messages.\n */\n getSessionSummary: (\n input: AgentHostWorkspaceAgentSessionSummaryRuntimeInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionSummary>;\n /**\n * @deprecated Use AgentActivityRuntime.load/getSnapshot.\n */\n list: (\n input: string | AgentHostWorkspaceAgentsListInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentSnapshot>;\n /**\n * @deprecated Use AgentActivityRuntime.listSessionMessages.\n */\n listSessionMessages: (\n input: AgentHostWorkspaceAgentSessionMessagesRuntimeInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentSessionMessages>;\n};\n\nexport interface AgentHostRuntimeApi {\n account?: AgentHostAccountApi;\n agentGuiBatch: AgentHostAgentGuiBatchApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n runtime?: AgentHostEnvironmentApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\n}\n\nexport function toAgentHostRuntimeApi(\n hostApi: AgentHostInputApi | AgentHostRuntimeApi\n): AgentHostRuntimeApi {\n return {\n account: hostApi.account,\n agentGuiBatch: hostApi.agentGuiBatch ?? ({} as AgentHostAgentGuiBatchApi),\n clipboard: hostApi.clipboard,\n debug: hostApi.debug,\n filesystem: hostApi.filesystem,\n meta: hostApi.meta,\n onHostEvent: hostApi.onHostEvent,\n runtime: hostApi.runtime,\n userProjects: hostApi.userProjects,\n workspace: hostApi.workspace,\n workspaceAgentProbes: hostApi.workspaceAgentProbes\n };\n}\n"],"mappings":"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","names":["createContext","useContext","jsx","createContext","useContext"]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getOptionalAgentHostApi,
3
3
  useOptionalAgentHostApi
4
- } from "./chunk-CCI6EK5W.js";
4
+ } from "./chunk-EWWAG26H.js";
5
5
  import {
6
6
  useTranslation
7
7
  } from "./chunk-GLDKFIWM.js";
@@ -2668,4 +2668,4 @@ export {
2668
2668
  CustomScrollArea,
2669
2669
  MessageSquareMoreIcon
2670
2670
  };
2671
- //# sourceMappingURL=chunk-BUBD5E4F.js.map
2671
+ //# sourceMappingURL=chunk-IBQO76IY.js.map
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-XAQQN6MP.js";
10
10
  import {
11
11
  getOptionalAgentHostApi
12
- } from "./chunk-CCI6EK5W.js";
12
+ } from "./chunk-EWWAG26H.js";
13
13
  import {
14
14
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
15
15
  } from "./chunk-JM24HADP.js";
@@ -2135,4 +2135,4 @@ export {
2135
2135
  AgentFileMentionPalette,
2136
2136
  AgentContextMentionPalette
2137
2137
  };
2138
- //# sourceMappingURL=chunk-Q6QE7JNG.js.map
2138
+ //# sourceMappingURL=chunk-ILBFIZCI.js.map
@@ -7,14 +7,14 @@ import {
7
7
  AgentGUIConversation_styles_default,
8
8
  MessageSquareMoreIcon,
9
9
  extractAgentMcpToolTarget
10
- } from "./chunk-BUBD5E4F.js";
10
+ } from "./chunk-IBQO76IY.js";
11
11
  import {
12
12
  Spinner
13
13
  } from "./chunk-F7XLV7M3.js";
14
14
  import {
15
15
  getOptionalAgentHostApi,
16
16
  useOptionalAgentHostApi
17
- } from "./chunk-CCI6EK5W.js";
17
+ } from "./chunk-EWWAG26H.js";
18
18
  import {
19
19
  translate
20
20
  } from "./chunk-GLDKFIWM.js";
@@ -1120,4 +1120,4 @@ export {
1120
1120
  isPromptRequestIdTitle,
1121
1121
  AgentInteractivePromptSurface
1122
1122
  };
1123
- //# sourceMappingURL=chunk-4MOHKNXA.js.map
1123
+ //# sourceMappingURL=chunk-LHN26OIP.js.map
@@ -10,7 +10,7 @@ import {
10
10
  resolveWorkspaceFileLinkAction,
11
11
  resolveWorkspaceFilePathCandidate,
12
12
  resolveWorkspaceLinkAction
13
- } from "./chunk-BUBD5E4F.js";
13
+ } from "./chunk-IBQO76IY.js";
14
14
  import {
15
15
  attrsToMentionItem,
16
16
  createAgentFileMentionExtension,
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  getOptionalAgentActivityRuntime,
26
26
  useOptionalAgentHostApi
27
- } from "./chunk-CCI6EK5W.js";
27
+ } from "./chunk-EWWAG26H.js";
28
28
  import {
29
29
  workspaceAgentProviderLabel
30
30
  } from "./chunk-TYGL25EL.js";
@@ -4094,7 +4094,9 @@ function projectAgentConversationVM(detail, options = {}) {
4094
4094
  rows.push(processing);
4095
4095
  }
4096
4096
  const normalizedRows = projectMessageCopyText(
4097
- mergeAdjacentAssistantMessageRows(rows),
4097
+ mergeAdjacentAssistantMessageRows(
4098
+ mergeAdjacentTransportRetryNoticeRows(rows)
4099
+ ),
4098
4100
  {
4099
4101
  assistantCopyEligibleTurnIds: buildAssistantCopyEligibleTurnIds(detail)
4100
4102
  }
@@ -4220,6 +4222,51 @@ function mergeAdjacentAssistantMessageRows(rows) {
4220
4222
  }
4221
4223
  return merged;
4222
4224
  }
4225
+ function mergeAdjacentTransportRetryNoticeRows(rows) {
4226
+ const merged = [];
4227
+ for (const row of rows) {
4228
+ const previous = merged.at(-1);
4229
+ if (isSingleTransportRetryNoticeRow(previous) && isSingleTransportRetryNoticeRow(row) && previous.turnId === row.turnId) {
4230
+ const previousMessage = previous.messages[0];
4231
+ const nextMessage = row.messages[0];
4232
+ if (!previousMessage || !nextMessage) {
4233
+ merged.push(row);
4234
+ continue;
4235
+ }
4236
+ const sourceTimelineItems = mergeSourceTimelineItems2(
4237
+ previousMessage.sourceTimelineItems,
4238
+ nextMessage.sourceTimelineItems
4239
+ );
4240
+ previous.messages[0] = {
4241
+ ...previousMessage,
4242
+ body: nextMessage.body || previousMessage.body,
4243
+ systemNotice: nextMessage.systemNotice ?? previousMessage.systemNotice,
4244
+ statusKind: nextMessage.statusKind ?? previousMessage.statusKind ?? null,
4245
+ occurredAtUnixMs: nextMessage.occurredAtUnixMs ?? previousMessage.occurredAtUnixMs,
4246
+ ...sourceTimelineItems ? { sourceTimelineItems } : {}
4247
+ };
4248
+ previous.occurredAtUnixMs = row.occurredAtUnixMs ?? previous.occurredAtUnixMs;
4249
+ continue;
4250
+ }
4251
+ merged.push(row);
4252
+ }
4253
+ return merged;
4254
+ }
4255
+ function isSingleTransportRetryNoticeRow(row) {
4256
+ if (!row || row.kind !== "message" || row.speaker !== "assistant" || row.thinking.length > 0 || row.messages.length !== 1) {
4257
+ return false;
4258
+ }
4259
+ return row.messages[0]?.systemNotice?.noticeKind === "transport_retry";
4260
+ }
4261
+ function mergeSourceTimelineItems2(previous, next) {
4262
+ if (!previous || previous.length === 0) {
4263
+ return next;
4264
+ }
4265
+ if (!next || next.length === 0) {
4266
+ return previous;
4267
+ }
4268
+ return [...previous, ...next];
4269
+ }
4223
4270
  function projectMessageCopyText(rows, options) {
4224
4271
  const assistantCopyTargetKeys = findLatestAssistantCopyTargetKeys(
4225
4272
  rows,
@@ -6311,6 +6358,7 @@ var CanvasNodeGhostIconButton = forwardRef3(function CanvasNodeGhostIconButton2(
6311
6358
  import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
6312
6359
  var MESSAGE_COPY_FEEDBACK_MS = 1400;
6313
6360
  var CONTEXT_COMPACTION_NOTICE_TITLE = "Context compacted.";
6361
+ var TRANSPORT_RETRY_PROGRESS_PATTERN = /\b(reconnect(?:ing)?(?:\s*(?:\.\.\.|…|[.。]+|:|-))?\s*\(?\d+\s*\/\s*\d+\)?)/i;
6314
6362
  function AgentMessageBlock({
6315
6363
  workspaceRoot,
6316
6364
  basePath,
@@ -6655,6 +6703,17 @@ function AgentSystemNoticeMessage({
6655
6703
  const notice = message.systemNotice;
6656
6704
  const detail = notice?.detail?.trim() ?? "";
6657
6705
  const title = systemNoticeTitle(message);
6706
+ if (notice?.noticeKind === "transport_retry") {
6707
+ const retryText = transportRetryNoticeText(message);
6708
+ return /* @__PURE__ */ jsx12(
6709
+ "div",
6710
+ {
6711
+ role: "status",
6712
+ className: "box-border w-full min-w-0 py-1 text-[13px] leading-5 text-[var(--text-primary)]",
6713
+ children: retryText
6714
+ }
6715
+ );
6716
+ }
6658
6717
  if (isContextCompactionNotice(message, title)) {
6659
6718
  return /* @__PURE__ */ jsxs7(
6660
6719
  "div",
@@ -6694,6 +6753,19 @@ function AgentSystemNoticeMessage({
6694
6753
  }
6695
6754
  );
6696
6755
  }
6756
+ function transportRetryNoticeText(message) {
6757
+ const notice = message.systemNotice;
6758
+ const detail = notice?.detail?.trim() ?? "";
6759
+ const progressText = transportRetryProgressText(detail) ?? transportRetryProgressText(notice?.title ?? "") ?? transportRetryProgressText(message.body);
6760
+ if (progressText) {
6761
+ return progressText;
6762
+ }
6763
+ return notice?.title?.trim() || message.body.trim() || translate("agentHost.agentGui.systemNoticeTransportRetry");
6764
+ }
6765
+ function transportRetryProgressText(value) {
6766
+ const match = TRANSPORT_RETRY_PROGRESS_PATTERN.exec(value.trim());
6767
+ return match?.[1]?.replace(/\s+/g, " ").trim() || null;
6768
+ }
6697
6769
  function isContextCompactionNotice(message, title) {
6698
6770
  const notice = message.systemNotice;
6699
6771
  return notice?.noticeKind === "system_notice" && (notice.detail?.trim() ?? "") === "" && title.trim() === CONTEXT_COMPACTION_NOTICE_TITLE;
@@ -12314,4 +12386,4 @@ export {
12314
12386
  AgentConversationFlow,
12315
12387
  useProjectedAgentConversation
12316
12388
  };
12317
- //# sourceMappingURL=chunk-7JW4OAKS.js.map
12389
+ //# sourceMappingURL=chunk-LKT3EFGR.js.map