@tutti-os/agent-gui 0.0.27 → 0.0.29

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 (41) hide show
  1. package/dist/{AgentMentionSearchController-2Vjvmzh3.d.ts → AgentMentionSearchController-D5ks45fN.d.ts} +1 -0
  2. package/dist/{AgentMessageMarkdown-BnpM_dCB.d.ts → AgentMessageMarkdown-CZaG-QW3.d.ts} +5 -2
  3. package/dist/agent-conversation/index.d.ts +1 -1
  4. package/dist/agent-conversation/index.js +6 -6
  5. package/dist/agent-message-center/index.js +5 -5
  6. package/dist/app/renderer/agentactivity.css +40 -9
  7. package/dist/{chunk-VNRRXUI3.js → chunk-DY2EAW7B.js} +3 -3
  8. package/dist/{chunk-YHRJD6HA.js → chunk-EWWAG26H.js} +1 -1
  9. package/dist/{chunk-YHRJD6HA.js.map → chunk-EWWAG26H.js.map} +1 -1
  10. package/dist/{chunk-XAQQN6MP.js → chunk-FG66NW5M.js} +2 -2
  11. package/dist/{chunk-OSBLVO4N.js → chunk-KAJRFXJK.js} +5 -5
  12. package/dist/{chunk-5PIXN7UF.js → chunk-O57DGCOA.js} +31 -40
  13. package/dist/chunk-O57DGCOA.js.map +1 -0
  14. package/dist/{chunk-GLDKFIWM.js → chunk-RQ3HEF42.js} +7 -7
  15. package/dist/chunk-RQ3HEF42.js.map +1 -0
  16. package/dist/{chunk-MLHARLOS.js → chunk-UC73DDC5.js} +127 -46
  17. package/dist/chunk-UC73DDC5.js.map +1 -0
  18. package/dist/{chunk-F7XLV7M3.js → chunk-WPWZKKKV.js} +2 -2
  19. package/dist/{chunk-B7DTDZVT.js → chunk-XBRKN4EC.js} +5 -8
  20. package/dist/chunk-XBRKN4EC.js.map +1 -0
  21. package/dist/chunk-Y35GDLP2.js +88 -0
  22. package/dist/chunk-Y35GDLP2.js.map +1 -0
  23. package/dist/context-mention-palette/index.d.ts +4 -3
  24. package/dist/context-mention-palette/index.js +7 -7
  25. package/dist/i18n/index.d.ts +6 -6
  26. package/dist/i18n/index.js +1 -1
  27. package/dist/index.d.ts +4 -4
  28. package/dist/index.js +174 -66
  29. package/dist/index.js.map +1 -1
  30. package/dist/workspace-agent-generated-files.js +3 -3
  31. package/package.json +12 -12
  32. package/dist/chunk-5PIXN7UF.js.map +0 -1
  33. package/dist/chunk-B7DTDZVT.js.map +0 -1
  34. package/dist/chunk-GLDKFIWM.js.map +0 -1
  35. package/dist/chunk-MLHARLOS.js.map +0 -1
  36. package/dist/chunk-XJ34OIEQ.js +0 -18
  37. package/dist/chunk-XJ34OIEQ.js.map +0 -1
  38. /package/dist/{chunk-VNRRXUI3.js.map → chunk-DY2EAW7B.js.map} +0 -0
  39. /package/dist/{chunk-XAQQN6MP.js.map → chunk-FG66NW5M.js.map} +0 -0
  40. /package/dist/{chunk-OSBLVO4N.js.map → chunk-KAJRFXJK.js.map} +0 -0
  41. /package/dist/{chunk-F7XLV7M3.js.map → chunk-WPWZKKKV.js.map} +0 -0
@@ -176,6 +176,7 @@ declare class AgentMentionSearchController {
176
176
  private cancelPendingPreload;
177
177
  enterCategory(category: AgentMentionFilterId): void;
178
178
  selectAgentGeneratedMentionItem(item: AgentContextMentionItem): boolean;
179
+ exitAgentGeneratedBrowse(): boolean;
179
180
  expandGroup(groupId: AgentMentionGroupId): void;
180
181
  close(): void;
181
182
  dispose(): void;
@@ -226,6 +226,9 @@ interface AgentHostSelectedFile {
226
226
  name?: string;
227
227
  path: string;
228
228
  }
229
+ interface AgentHostSelectFilesInput {
230
+ allowDirectories?: boolean;
231
+ }
229
232
  type AgentHostWorkspaceApi = AgentHostRecord & {
230
233
  copyPath?: (input: {
231
234
  path: string;
@@ -243,7 +246,7 @@ type AgentHostWorkspaceApi = AgentHostRecord & {
243
246
  selectDirectory: () => AgentHostAsyncResult<{
244
247
  path: string;
245
248
  } | null>;
246
- selectFiles: () => AgentHostAsyncResult<AgentHostSelectedFile[]>;
249
+ selectFiles: (input?: AgentHostSelectFilesInput) => AgentHostAsyncResult<AgentHostSelectedFile[]>;
247
250
  writeFileText: (input: {
248
251
  content: string;
249
252
  path: string;
@@ -655,4 +658,4 @@ interface AgentMessageMarkdownWorkspaceAppIcon {
655
658
  workspaceId?: string | null;
656
659
  }
657
660
 
658
- 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-BnpM_dCB.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,15 +6,15 @@ import {
6
6
  projectAgentConversationVM,
7
7
  reconcileProjectedAgentConversationVM,
8
8
  useProjectedAgentConversation
9
- } from "../chunk-MLHARLOS.js";
10
- import "../chunk-VNRRXUI3.js";
11
- import "../chunk-XAQQN6MP.js";
12
- import "../chunk-XJ34OIEQ.js";
13
- import "../chunk-YHRJD6HA.js";
9
+ } from "../chunk-UC73DDC5.js";
10
+ import "../chunk-DY2EAW7B.js";
11
+ import "../chunk-FG66NW5M.js";
12
+ import "../chunk-Y35GDLP2.js";
13
+ import "../chunk-EWWAG26H.js";
14
14
  import "../chunk-TYGL25EL.js";
15
15
  import {
16
16
  translate
17
- } from "../chunk-GLDKFIWM.js";
17
+ } from "../chunk-RQ3HEF42.js";
18
18
  import "../chunk-LUGELG5V.js";
19
19
  import "../chunk-PJP5BUU6.js";
20
20
 
@@ -3,7 +3,7 @@ import {
3
3
  approvalOptionDisplayLabel,
4
4
  getPromptToolDetails,
5
5
  isPromptRequestIdTitle
6
- } from "../chunk-OSBLVO4N.js";
6
+ } from "../chunk-KAJRFXJK.js";
7
7
  import {
8
8
  PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
9
9
  PLAN_IMPLEMENTATION_PROMPT,
@@ -16,17 +16,17 @@ import {
16
16
  cn,
17
17
  extractAgentMcpToolTarget,
18
18
  normalizeAskUserQuestions
19
- } from "../chunk-VNRRXUI3.js";
19
+ } from "../chunk-DY2EAW7B.js";
20
20
  import {
21
21
  managedAgentRoundedIconUrl,
22
22
  userAvatarPlaceholderUrl,
23
23
  workspaceAgentActivityStatusLabel
24
- } from "../chunk-F7XLV7M3.js";
24
+ } from "../chunk-WPWZKKKV.js";
25
25
  import "../chunk-MTFSQWZ6.js";
26
26
  import {
27
27
  resolveWorkspaceAgentSessionSortTimeUnixMs
28
28
  } from "../chunk-IBIMGLCD.js";
29
- import "../chunk-YHRJD6HA.js";
29
+ import "../chunk-EWWAG26H.js";
30
30
  import {
31
31
  workspaceAgentProviderLabel
32
32
  } from "../chunk-TYGL25EL.js";
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  AgentGuiI18nProvider,
38
38
  useTranslation
39
- } from "../chunk-GLDKFIWM.js";
39
+ } from "../chunk-RQ3HEF42.js";
40
40
  import "../chunk-PJP5BUU6.js";
41
41
 
42
42
  // agent-message-center/WorkspaceAgentMessageCenterPanel.tsx
@@ -2281,10 +2281,14 @@ aside.workspace-agents-status-panel
2281
2281
  }
2282
2282
 
2283
2283
  [data-agent-file-mention="true"][data-agent-mention-kind="file"][data-agent-file-visual-kind="back"]
2284
- .agent-gui-node__mention-file-icon {
2285
- background-color: var(--text-secondary);
2286
- mask-image: url("./assets/icons/arrow-left-filled.svg");
2287
- -webkit-mask-image: url("./assets/icons/arrow-left-filled.svg");
2284
+ .agent-gui-node__mention-file-icon.rich-text-at-mention-file-icon--glyph {
2285
+ display: inline-flex;
2286
+ align-items: center;
2287
+ justify-content: center;
2288
+ background-color: transparent;
2289
+ mask-image: none;
2290
+ -webkit-mask-image: none;
2291
+ color: currentColor;
2288
2292
  }
2289
2293
 
2290
2294
  .agent-gui-chrome__session-chrome {
@@ -2331,14 +2335,25 @@ aside.workspace-agents-status-panel
2331
2335
  margin-left: 24px;
2332
2336
  }
2333
2337
 
2338
+ .agent-gui-node__bottom-dock > .agent-gui-chrome__session-chrome {
2339
+ margin-right: 24px;
2340
+ margin-left: 24px;
2341
+ }
2342
+
2343
+ .agent-gui-node__bottom-dock
2344
+ > .agent-gui-chrome__session-chrome:has(+ .agent-gui-chrome__session-chrome) {
2345
+ margin-right: 36px;
2346
+ margin-left: 36px;
2347
+ }
2348
+
2334
2349
  .agent-gui-node__bottom-dock
2335
2350
  > .agent-gui-chrome__session-chrome:has(
2336
2351
  + .agent-gui-node__composer
2337
2352
  .agent-gui-node__composer-input-group
2338
2353
  > .agent-gui-chrome__session-chrome
2339
2354
  ) {
2340
- margin-right: 16px;
2341
- margin-left: 16px;
2355
+ margin-right: 36px;
2356
+ margin-left: 36px;
2342
2357
  }
2343
2358
 
2344
2359
  .agent-gui-node__bottom-dock
@@ -2350,8 +2365,8 @@ aside.workspace-agents-status-panel
2350
2365
  + .agent-gui-node__composer
2351
2366
  .agent-gui-node__composer-input-group
2352
2367
  > .agent-gui-chrome__session-chrome {
2353
- margin-right: 8px;
2354
- margin-left: 8px;
2368
+ margin-right: 24px;
2369
+ margin-left: 24px;
2355
2370
  }
2356
2371
 
2357
2372
  .agent-gui-chrome__card {
@@ -5477,11 +5492,16 @@ button.agent-gui-node__conversation-section-toggle:hover
5477
5492
  }
5478
5493
 
5479
5494
  .agent-gui-node__provider-setup-notice {
5495
+ position: absolute;
5496
+ top: 16px;
5497
+ right: var(--agent-gui-detail-padding-x);
5498
+ left: var(--agent-gui-detail-padding-x);
5499
+ z-index: 2;
5480
5500
  display: flex;
5481
5501
  align-items: center;
5482
5502
  gap: 8px;
5483
5503
  box-sizing: border-box;
5484
- margin: 16px var(--agent-gui-detail-padding-x) 8px;
5504
+ margin: 0;
5485
5505
  border: 1px solid
5486
5506
  color-mix(
5487
5507
  in srgb,
@@ -5498,6 +5518,11 @@ button.agent-gui-node__conversation-section-toggle:hover
5498
5518
  );
5499
5519
  font-size: 13px;
5500
5520
  line-height: 18px;
5521
+ pointer-events: auto;
5522
+ }
5523
+
5524
+ .agent-gui-node__detail-header + .agent-gui-node__provider-setup-notice {
5525
+ top: calc(64px + 8px);
5501
5526
  }
5502
5527
 
5503
5528
  .agent-gui-node__provider-setup-notice-icon {
@@ -6824,6 +6849,12 @@ html[data-theme="light"] [data-message-center-item-id].agent-gui-edge-glow {
6824
6849
  overscroll-behavior: contain;
6825
6850
  }
6826
6851
 
6852
+ .agent-gui-node__composer-menu-content
6853
+ [data-workspace-user-project-action-separator="true"] {
6854
+ margin-inline: 12px;
6855
+ background: var(--agent-gui-border-subtle, var(--line-2));
6856
+ }
6857
+
6827
6858
  .agent-gui-node__composer-menu-label {
6828
6859
  padding: 4px 10px 2px;
6829
6860
  color: var(--agent-gui-text-secondary);
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getOptionalAgentHostApi,
3
3
  useOptionalAgentHostApi
4
- } from "./chunk-YHRJD6HA.js";
4
+ } from "./chunk-EWWAG26H.js";
5
5
  import {
6
6
  useTranslation
7
- } from "./chunk-GLDKFIWM.js";
7
+ } from "./chunk-RQ3HEF42.js";
8
8
  import {
9
9
  resolveAgentWorkspaceFileVisualKind
10
10
  } from "./chunk-PJP5BUU6.js";
@@ -2668,4 +2668,4 @@ export {
2668
2668
  CustomScrollArea,
2669
2669
  MessageSquareMoreIcon
2670
2670
  };
2671
- //# sourceMappingURL=chunk-VNRRXUI3.js.map
2671
+ //# sourceMappingURL=chunk-DY2EAW7B.js.map
@@ -193,4 +193,4 @@ export {
193
193
  useOptionalAgentHostApi,
194
194
  getOptionalAgentHostApi
195
195
  };
196
- //# sourceMappingURL=chunk-YHRJD6HA.js.map
196
+ //# sourceMappingURL=chunk-EWWAG26H.js.map
@@ -1 +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 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: () => 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
+ {"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
  translate,
3
3
  useTranslation
4
- } from "./chunk-GLDKFIWM.js";
4
+ } from "./chunk-RQ3HEF42.js";
5
5
  import {
6
6
  resolveAgentMentionFileThumbnailUrl,
7
7
  resolveAgentMentionFileVisualKind
@@ -1192,4 +1192,4 @@ export {
1192
1192
  mentionItemToAttrs,
1193
1193
  attrsToMentionItem
1194
1194
  };
1195
- //# sourceMappingURL=chunk-XAQQN6MP.js.map
1195
+ //# sourceMappingURL=chunk-FG66NW5M.js.map
@@ -7,17 +7,17 @@ import {
7
7
  AgentGUIConversation_styles_default,
8
8
  MessageSquareMoreIcon,
9
9
  extractAgentMcpToolTarget
10
- } from "./chunk-VNRRXUI3.js";
10
+ } from "./chunk-DY2EAW7B.js";
11
11
  import {
12
12
  Spinner
13
- } from "./chunk-F7XLV7M3.js";
13
+ } from "./chunk-WPWZKKKV.js";
14
14
  import {
15
15
  getOptionalAgentHostApi,
16
16
  useOptionalAgentHostApi
17
- } from "./chunk-YHRJD6HA.js";
17
+ } from "./chunk-EWWAG26H.js";
18
18
  import {
19
19
  translate
20
- } from "./chunk-GLDKFIWM.js";
20
+ } from "./chunk-RQ3HEF42.js";
21
21
 
22
22
  // shared/agentConversation/approvalOptionPresentation.ts
23
23
  function approvalOptionDisplayLabel(option, intent = {}) {
@@ -1120,4 +1120,4 @@ export {
1120
1120
  isPromptRequestIdTitle,
1121
1121
  AgentInteractivePromptSurface
1122
1122
  };
1123
- //# sourceMappingURL=chunk-OSBLVO4N.js.map
1123
+ //# sourceMappingURL=chunk-KAJRFXJK.js.map
@@ -3,19 +3,19 @@ import {
3
3
  managedAgentRoundedIconUrl,
4
4
  userAvatarPlaceholderUrl,
5
5
  workspaceAgentActivityStatusLabel
6
- } from "./chunk-F7XLV7M3.js";
6
+ } from "./chunk-WPWZKKKV.js";
7
7
  import {
8
8
  normalizeAgentSessionMentionTitle
9
- } from "./chunk-XAQQN6MP.js";
9
+ } from "./chunk-FG66NW5M.js";
10
10
  import {
11
11
  getOptionalAgentHostApi
12
- } from "./chunk-YHRJD6HA.js";
12
+ } from "./chunk-EWWAG26H.js";
13
13
  import {
14
14
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
15
15
  } from "./chunk-JM24HADP.js";
16
16
  import {
17
17
  translate
18
- } from "./chunk-GLDKFIWM.js";
18
+ } from "./chunk-RQ3HEF42.js";
19
19
  import {
20
20
  resolveAgentMentionFileThumbnailUrl,
21
21
  resolveAgentMentionFileVisualKind
@@ -751,6 +751,22 @@ var AgentMentionSearchController = class {
751
751
  }
752
752
  return false;
753
753
  }
754
+ exitAgentGeneratedBrowse() {
755
+ if (!this.agentGeneratedBrowsePath) {
756
+ return false;
757
+ }
758
+ this.resetAgentGeneratedBrowsePath();
759
+ this.setState({
760
+ status: this.state.status === "loading" ? "loading" : "ready",
761
+ query: this.currentQuery,
762
+ mode: this.currentQuery ? "results" : "browse",
763
+ filter: this.currentFilter,
764
+ categories: buildBrowseCategories(),
765
+ groups: this.groupsFromRawGroups(),
766
+ error: null
767
+ });
768
+ return true;
769
+ }
754
770
  expandGroup(groupId) {
755
771
  const pageSize = mentionGroupPageSize(this.currentFilter, groupId);
756
772
  const current = this.expandedCounts[groupId] ?? pageSize;
@@ -1782,6 +1798,7 @@ function AgentFileMentionPalette({
1782
1798
  onSelectCategory,
1783
1799
  onSelectFilter,
1784
1800
  onExpandGroup,
1801
+ onNavigateHierarchy,
1785
1802
  onOpenReferences
1786
1803
  }) {
1787
1804
  "use memo";
@@ -1819,12 +1836,6 @@ function AgentFileMentionPalette({
1819
1836
  mode: state.mode,
1820
1837
  query: state.query
1821
1838
  });
1822
- const showFileSearchMoreHint = shouldShowFileSearchMoreHint({
1823
- filter,
1824
- groups: state.groups,
1825
- mode: state.mode,
1826
- query: state.query
1827
- });
1828
1839
  return /* @__PURE__ */ jsx(
1829
1840
  MentionPaletteFromState,
1830
1841
  {
@@ -1850,13 +1861,15 @@ function AgentFileMentionPalette({
1850
1861
  cycleFilter: translate("agentHost.agentGui.fileMentionSwitchCategory"),
1851
1862
  moveSelection: translate(
1852
1863
  "agentHost.agentGui.fileMentionSwitchSelection"
1864
+ ),
1865
+ navigateHierarchy: translate(
1866
+ "agentHost.agentGui.fileMentionNavigateHierarchy"
1853
1867
  )
1854
1868
  },
1855
1869
  maxHeightPx,
1856
1870
  scrollHighlightedIntoViewCentered: shouldCenterHighlightedItem,
1857
1871
  loadingBanner: /* @__PURE__ */ jsx(MentionPaletteLoadingBanner, { label: loadingLabel }),
1858
1872
  theme: AGENT_MENTION_PALETTE_THEME,
1859
- renderListFooter: showFileSearchMoreHint ? () => /* @__PURE__ */ jsx(MentionFileSearchMoreHint, {}) : void 0,
1860
1873
  callbacks: {
1861
1874
  onHighlightChange,
1862
1875
  onActiveCategoryIdChange: (categoryId) => {
@@ -1865,7 +1878,8 @@ function AgentFileMentionPalette({
1865
1878
  },
1866
1879
  onExpandGroup: (groupId) => onExpandGroup(groupId),
1867
1880
  onSelectItem
1868
- }
1881
+ },
1882
+ onNavigateHierarchy
1869
1883
  }
1870
1884
  );
1871
1885
  }
@@ -1914,17 +1928,6 @@ function MentionPaletteLoadingBanner({
1914
1928
  }
1915
1929
  );
1916
1930
  }
1917
- function MentionFileSearchMoreHint() {
1918
- "use memo";
1919
- return /* @__PURE__ */ jsx(
1920
- "p",
1921
- {
1922
- className: "px-3 pb-1 pt-2 text-center text-[13px] leading-5 text-[var(--text-tertiary)]",
1923
- "data-agent-mention-file-search-hint": "true",
1924
- children: translate("agentHost.agentGui.mentionFileSearchMoreHint")
1925
- }
1926
- );
1927
- }
1928
1931
  function shouldSuppressFileSearchGroupChrome(filter, query) {
1929
1932
  return filter === "file" && query.trim().length > 0;
1930
1933
  }
@@ -1975,15 +1978,17 @@ function agentMentionItemToRowItem(item) {
1975
1978
  };
1976
1979
  }
1977
1980
  if (item.kind === "session") {
1981
+ const isMySession = item.scope === "my_sessions";
1978
1982
  return {
1979
1983
  kind: "session",
1980
- participant: `${item.initiatorName} & ${item.agentName}`,
1984
+ participant: isMySession ? item.agentName : `${item.initiatorName} & ${item.agentName}`,
1981
1985
  summary: item.title,
1982
- userAvatarUrl: item.initiatorAvatarUrl ?? null,
1986
+ userAvatarUrl: isMySession ? null : item.initiatorAvatarUrl ?? null,
1983
1987
  userAvatarPlaceholderUrl,
1984
1988
  agentIconUrl: managedAgentRoundedIconUrl(
1985
1989
  mentionSessionAgentProvider(item) ?? item.agentName
1986
1990
  ),
1991
+ showUserAvatar: !isMySession,
1987
1992
  statusTag: agentSessionStatusTag(item.status)
1988
1993
  };
1989
1994
  }
@@ -2097,20 +2102,6 @@ function isFileBrowseGroupsOnlyEmpty(groups) {
2097
2102
  (group) => group.items.length === 0 && !group.hasMore
2098
2103
  );
2099
2104
  }
2100
- function hasVisibleFileGroupEntries(groups) {
2101
- return groups.some(
2102
- (group) => (group.id === "files" || group.id === "opened_files" || group.id === "agent_generated_files") && (group.items.length > 0 || group.hasMore)
2103
- );
2104
- }
2105
- function shouldShowFileSearchMoreHint(input) {
2106
- if (input.filter !== "file" || input.query.trim()) {
2107
- return false;
2108
- }
2109
- if (input.mode !== "browse" && input.mode !== "results") {
2110
- return false;
2111
- }
2112
- return hasVisibleFileGroupEntries(input.groups);
2113
- }
2114
2105
  function shouldShowBrowseSearchHint(input) {
2115
2106
  if (input.mode !== "browse" || hasInteractiveGroupEntries(input.groups)) {
2116
2107
  return false;
@@ -2135,4 +2126,4 @@ export {
2135
2126
  AgentFileMentionPalette,
2136
2127
  AgentContextMentionPalette
2137
2128
  };
2138
- //# sourceMappingURL=chunk-5PIXN7UF.js.map
2129
+ //# sourceMappingURL=chunk-O57DGCOA.js.map