@tutti-os/agent-gui 0.0.126 → 0.0.128

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 (57) hide show
  1. package/dist/{AgentGUI-CKk3WQrn.d.ts → AgentGUI-DprRUk8h.d.ts} +9 -2
  2. package/dist/{AgentRichTextReadonly-KOUZGF5Q.js → AgentRichTextReadonly-UGZQXMPT.js} +6 -6
  3. package/dist/agent-conversation/index.d.ts +1 -1
  4. package/dist/agent-conversation/index.js +8 -8
  5. package/dist/agent-gui.d.ts +2 -2
  6. package/dist/agent-gui.js +15 -15
  7. package/dist/agent-message-center/index.js +6 -6
  8. package/dist/{agentGuiNodeTypes-DedIWrEI.d.ts → agentGuiNodeTypes-5TL1hyCN.d.ts} +8 -2
  9. package/dist/app/renderer/agentactivity.css +35 -1
  10. package/dist/{chunk-RB6ZYQBA.js → chunk-3LKGPCCL.js} +2 -2
  11. package/dist/{chunk-4CACBXIB.js → chunk-5ILYI4EM.js} +2 -2
  12. package/dist/{chunk-LUGELG5V.js → chunk-5QPOMKMQ.js} +2 -2
  13. package/dist/chunk-5QPOMKMQ.js.map +1 -0
  14. package/dist/{chunk-QDNOOAAS.js → chunk-6TYXZI35.js} +3 -3
  15. package/dist/{chunk-X22KJXVG.js → chunk-A3HZBKIQ.js} +2 -2
  16. package/dist/{chunk-G3XB4FAQ.js → chunk-BKTH4EVE.js} +3 -3
  17. package/dist/{chunk-CO6XO5A2.js → chunk-FNI4JFDM.js} +83 -5
  18. package/dist/chunk-FNI4JFDM.js.map +1 -0
  19. package/dist/{chunk-ADQENNSG.js → chunk-Q5JYEQK6.js} +3 -3
  20. package/dist/{chunk-PRE4IT6E.js → chunk-RABOGNWT.js} +5 -7
  21. package/dist/{chunk-PRE4IT6E.js.map → chunk-RABOGNWT.js.map} +1 -1
  22. package/dist/{chunk-BDWZUA3L.js → chunk-TBFWNWDX.js} +5 -5
  23. package/dist/{chunk-2ZVXN2Z7.js → chunk-UZP2LEQL.js} +9 -1
  24. package/dist/chunk-UZP2LEQL.js.map +1 -0
  25. package/dist/{chunk-6RMVLH3G.js → chunk-VH2UJCQG.js} +2 -2
  26. package/dist/{chunk-2JFMGOHU.js → chunk-VWIADFP4.js} +2 -2
  27. package/dist/chunk-VWIADFP4.js.map +1 -0
  28. package/dist/{chunk-F2Z7P7BB.js → chunk-YZF23LW4.js} +4 -4
  29. package/dist/{chunk-QWKJ646Z.js → chunk-Z4HPUA2G.js} +1503 -1176
  30. package/dist/chunk-Z4HPUA2G.js.map +1 -0
  31. package/dist/context-mention-palette/index.js +8 -8
  32. package/dist/i18n/index.d.ts +8 -0
  33. package/dist/i18n/index.js +2 -2
  34. package/dist/index.d.ts +4 -4
  35. package/dist/index.js +15 -15
  36. package/dist/index.js.map +1 -1
  37. package/dist/mention-file-presentation.js +1 -1
  38. package/dist/mention-search.js +6 -6
  39. package/dist/workbench/contribution.js +3 -3
  40. package/dist/workbench/index.js +3 -3
  41. package/dist/workbench/sessionTitle.js +2 -2
  42. package/package.json +12 -12
  43. package/dist/chunk-2JFMGOHU.js.map +0 -1
  44. package/dist/chunk-2ZVXN2Z7.js.map +0 -1
  45. package/dist/chunk-CO6XO5A2.js.map +0 -1
  46. package/dist/chunk-LUGELG5V.js.map +0 -1
  47. package/dist/chunk-QWKJ646Z.js.map +0 -1
  48. /package/dist/{AgentRichTextReadonly-KOUZGF5Q.js.map → AgentRichTextReadonly-UGZQXMPT.js.map} +0 -0
  49. /package/dist/{chunk-RB6ZYQBA.js.map → chunk-3LKGPCCL.js.map} +0 -0
  50. /package/dist/{chunk-4CACBXIB.js.map → chunk-5ILYI4EM.js.map} +0 -0
  51. /package/dist/{chunk-QDNOOAAS.js.map → chunk-6TYXZI35.js.map} +0 -0
  52. /package/dist/{chunk-X22KJXVG.js.map → chunk-A3HZBKIQ.js.map} +0 -0
  53. /package/dist/{chunk-G3XB4FAQ.js.map → chunk-BKTH4EVE.js.map} +0 -0
  54. /package/dist/{chunk-ADQENNSG.js.map → chunk-Q5JYEQK6.js.map} +0 -0
  55. /package/dist/{chunk-BDWZUA3L.js.map → chunk-TBFWNWDX.js.map} +0 -0
  56. /package/dist/{chunk-6RMVLH3G.js.map → chunk-VH2UJCQG.js.map} +0 -0
  57. /package/dist/{chunk-F2Z7P7BB.js.map → chunk-YZF23LW4.js.map} +0 -0
@@ -3,27 +3,27 @@ import {
3
3
  AgentFileMentionPalette,
4
4
  flattenAgentMentionPaletteEntries,
5
5
  groupStartKeys
6
- } from "../chunk-BDWZUA3L.js";
6
+ } from "../chunk-TBFWNWDX.js";
7
7
  import {
8
8
  AgentMentionSearchController
9
- } from "../chunk-PRE4IT6E.js";
9
+ } from "../chunk-RABOGNWT.js";
10
10
  import "../chunk-USIFGHT3.js";
11
11
  import "../chunk-XJ34OIEQ.js";
12
12
  import "../chunk-R7AXDQCA.js";
13
- import "../chunk-QDNOOAAS.js";
14
- import "../chunk-LUGELG5V.js";
13
+ import "../chunk-6TYXZI35.js";
14
+ import "../chunk-5QPOMKMQ.js";
15
15
  import {
16
16
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
17
17
  } from "../chunk-RMQREVJY.js";
18
- import "../chunk-4CACBXIB.js";
18
+ import "../chunk-5ILYI4EM.js";
19
19
  import "../chunk-YMXYBG7U.js";
20
- import "../chunk-2JFMGOHU.js";
20
+ import "../chunk-VWIADFP4.js";
21
21
  import "../chunk-F5UR6EJG.js";
22
22
  import "../chunk-EDNJMG5T.js";
23
- import "../chunk-6RMVLH3G.js";
23
+ import "../chunk-VH2UJCQG.js";
24
24
  import "../chunk-PJP5BUU6.js";
25
25
  import "../chunk-7KVZPJ3O.js";
26
- import "../chunk-2ZVXN2Z7.js";
26
+ import "../chunk-UZP2LEQL.js";
27
27
  import "../chunk-MIJXEELH.js";
28
28
  import "../chunk-D2JUDUYY.js";
29
29
  import "../chunk-6CUELYIF.js";
@@ -592,6 +592,7 @@ declare const agentGuiI18nResources: {
592
592
  readonly systemNoticeWarning: "Agent warning";
593
593
  readonly systemNoticeDefault: "Agent notice";
594
594
  readonly providerSwitchLabel: "Switch provider";
595
+ readonly sharedAgentOwnerSeparator: "'s ";
595
596
  readonly handoffConversation: "Handoff";
596
597
  readonly handoffConversationTooltip: "Hand off to another agent";
597
598
  readonly handoffConversationMenu: "Choose an agent for handoff";
@@ -630,6 +631,9 @@ declare const agentGuiI18nResources: {
630
631
  readonly projectSectionEdit: "New session";
631
632
  readonly projectSectionMoreActions: "Project actions";
632
633
  readonly projectSectionViewFiles: "Open folder";
634
+ readonly pinProject: "Pin project";
635
+ readonly unpinProject: "Unpin project";
636
+ readonly pinnedProjectAccessibleName: "Pinned project: {{project}}";
633
637
  readonly projectRailCreateProject: "New project";
634
638
  readonly projectRailLinkExistingProject: "Link existing project folder";
635
639
  readonly removeProject: "Remove";
@@ -3171,6 +3175,7 @@ declare const agentGuiI18nResources: {
3171
3175
  readonly systemNoticeWarning: "Agent 警告";
3172
3176
  readonly systemNoticeDefault: "Agent 通知";
3173
3177
  readonly providerSwitchLabel: "切换 Provider";
3178
+ readonly sharedAgentOwnerSeparator: " 的 ";
3174
3179
  readonly handoffConversation: "Handoff";
3175
3180
  readonly handoffConversationTooltip: "交接给其他 Agent";
3176
3181
  readonly handoffConversationMenu: "选择要交接的 Agent";
@@ -3209,6 +3214,9 @@ declare const agentGuiI18nResources: {
3209
3214
  readonly projectSectionEdit: "新建会话";
3210
3215
  readonly projectSectionMoreActions: "项目操作";
3211
3216
  readonly projectSectionViewFiles: "打开文件夹";
3217
+ readonly pinProject: "置顶项目";
3218
+ readonly unpinProject: "取消置顶项目";
3219
+ readonly pinnedProjectAccessibleName: "已置顶项目:{{project}}";
3212
3220
  readonly projectRailCreateProject: "新建项目";
3213
3221
  readonly projectRailLinkExistingProject: "关联已有项目文件";
3214
3222
  readonly removeProject: "移除";
@@ -6,8 +6,8 @@ import {
6
6
  translate,
7
7
  translateInUiLanguage,
8
8
  useTranslation
9
- } from "../chunk-6RMVLH3G.js";
10
- import "../chunk-2ZVXN2Z7.js";
9
+ } from "../chunk-VH2UJCQG.js";
10
+ import "../chunk-UZP2LEQL.js";
11
11
  export {
12
12
  AgentGuiI18nProvider,
13
13
  agentGuiI18nModule,
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { AgentCustomMentionChipContext, AgentCustomMentionIdentity, AgentCustomMentionKindDefinition, AgentCustomMentionPresentation, getAgentCustomMentionKind, registerAgentCustomMentionKind, resetAgentCustomMentionKindsForTests } from './custom-mention.js';
2
2
  export { A as AGENT_PASTED_TEXT_BLOCK_KIND, a as AGENT_PASTED_TEXT_MENTION_KIND } from './pastedTextKinds-D-XuInaS.js';
3
- import { A as AgentActivityRuntime } from './AgentGUI-CKk3WQrn.js';
4
- export { a as AgentActivityRuntimeDeleteSessionsBatchInput, b as AgentActivityRuntimeDeleteSessionsBatchResult, c as AgentActivityRuntimeListSessionMessagesInput, d as AgentActivityRuntimePromptContentBlock, e as AgentActivityRuntimeProvider, f as AgentActivityRuntimeProviderProps, g as AgentActivityRuntimeSessionSectionDeletionCandidates, h as AgentActivityRuntimeSessionSectionScopeInput, i as AgentActivityRuntimeSetSessionPinnedInput, j as AgentActivityRuntimeUpdateSessionSettingsInput, k as AgentActivityRuntimeUpdateSessionSettingsResult, l as AgentActivityRuntimeUploadPromptContentInput, m as AgentActivityRuntimeUploadPromptContentResult, n as AgentGUI, o as AgentGUIAccountMenuState, p as AgentGUIAgentsEmptyRenderer, q as AgentGUIComposerAppendRequest, r as AgentGUIComposerContentType, s as AgentGUIComposerFocusMethod, t as AgentGUIEngagementContext, u as AgentGUIEngagementEvent, v as AgentGUIEngagementEventSink, w as AgentGUIProps, x as AgentGUIProviderUnavailableStateContext, y as AgentGUIProviderUnavailableStateRenderer, z as AgentGUISidebarFooterContext, B as AgentGUISidebarFooterRenderer, C as resetAgentActivityRuntimeForTests, D as setAgentActivityRuntimeForTests, E as useAgentActivityRuntime, F as useAgentActivitySnapshot, G as useOptionalAgentActivityRuntime } from './AgentGUI-CKk3WQrn.js';
5
- import { m as AgentHostInputApi } from './agentGuiNodeTypes-DedIWrEI.js';
6
- export { a as AgentComposerDraftFile, g as AgentHostAgentTargetAuthenticatedAccount, h as AgentHostAgentTargetSetupSnapshot, i as AgentHostAgentTargetSetupState, j as AgentHostAgentTargetSetupWatch, k as AgentHostApi, l as AgentHostApplyWorkspaceGitPatchInput, n as AgentHostRuntimeApi, o as AgentHostSelectFilesInput, q as AgentProbeProvider, r as AgentProbeSnapshot, s as AgentProviderProbeListInput, t as AgentProviderProbeListResult, w as AgentUsageQuota, x as AgentUsageSnapshot, P as PersistWriteResult, R as ReadWorkspaceAgentReadStateInput, W as WorkspaceAgentReadStateSnapshot, y as WriteWorkspaceAgentReadStateInput } from './agentGuiNodeTypes-DedIWrEI.js';
3
+ import { A as AgentActivityRuntime } from './AgentGUI-DprRUk8h.js';
4
+ export { a as AgentActivityRuntimeDeleteSessionsBatchInput, b as AgentActivityRuntimeDeleteSessionsBatchResult, c as AgentActivityRuntimeListSessionMessagesInput, d as AgentActivityRuntimePromptContentBlock, e as AgentActivityRuntimeProvider, f as AgentActivityRuntimeProviderProps, g as AgentActivityRuntimeSessionSectionDeletionCandidates, h as AgentActivityRuntimeSessionSectionScopeInput, i as AgentActivityRuntimeSetSessionPinnedInput, j as AgentActivityRuntimeUpdateSessionSettingsInput, k as AgentActivityRuntimeUpdateSessionSettingsResult, l as AgentActivityRuntimeUploadPromptContentInput, m as AgentActivityRuntimeUploadPromptContentResult, n as AgentGUI, o as AgentGUIAccountMenuState, p as AgentGUIAgentsEmptyRenderer, q as AgentGUIComposerAppendRequest, r as AgentGUIComposerContentType, s as AgentGUIComposerFocusMethod, t as AgentGUIEngagementContext, u as AgentGUIEngagementEvent, v as AgentGUIEngagementEventSink, w as AgentGUIProps, x as AgentGUIProviderUnavailableStateContext, y as AgentGUIProviderUnavailableStateRenderer, z as AgentGUISidebarFooterContext, B as AgentGUISidebarFooterRenderer, C as resetAgentActivityRuntimeForTests, D as setAgentActivityRuntimeForTests, E as useAgentActivityRuntime, F as useAgentActivitySnapshot, G as useOptionalAgentActivityRuntime } from './AgentGUI-DprRUk8h.js';
5
+ import { m as AgentHostInputApi } from './agentGuiNodeTypes-5TL1hyCN.js';
6
+ export { a as AgentComposerDraftFile, g as AgentHostAgentTargetAuthenticatedAccount, h as AgentHostAgentTargetSetupSnapshot, i as AgentHostAgentTargetSetupState, j as AgentHostAgentTargetSetupWatch, k as AgentHostApi, l as AgentHostApplyWorkspaceGitPatchInput, n as AgentHostRuntimeApi, o as AgentHostSelectFilesInput, p as AgentHostUserProject, r as AgentProbeProvider, s as AgentProbeSnapshot, t as AgentProviderProbeListInput, u as AgentProviderProbeListResult, x as AgentUsageQuota, y as AgentUsageSnapshot, P as PersistWriteResult, R as ReadWorkspaceAgentReadStateInput, W as WorkspaceAgentReadStateSnapshot, z as WriteWorkspaceAgentReadStateInput } from './agentGuiNodeTypes-5TL1hyCN.js';
7
7
  export { agentGUIAgentIsReady, normalizeAgentGUIAgents, resolveAgentGUISelectedDirectoryAgent } from './agents.js';
8
8
  import { o as AgentGUIProvider, i as AgentGUIAgentTarget, j as AgentGUIAgentTargetBadge } from './types-BicfRVrV.js';
9
9
  export { A as AgentGUIAgent, a as AgentGUIAgentAvailability, b as AgentGUIAgentAvailabilityAction, c as AgentGUIAgentAvailabilityStatus, d as AgentGUIAgentDirectoryPort, e as AgentGUIAgentDirectorySnapshot, f as AgentGUIAgentDirectoryStatus, g as AgentGUIAgentOwner, h as AgentGUIAgentOwnership, k as AgentGUIAgentTargetRef, l as AgentGUIAllAgentsPresentation, m as AgentGUIHomeSuggestionId, p as AgentGUIProviderRailAllPresentation, q as AgentGUIProviderRailMode, r as AgentGUIProviderReadinessGate, s as AgentGUIProviderReadinessGateAction, t as AgentGUIProviderReadinessGateStatus } from './types-BicfRVrV.js';
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  localAgentGUIAgentTargetId,
8
8
  normalizeAgentGUIAgentTargets,
9
9
  resolveAgentGUIAgentTarget
10
- } from "./chunk-QWKJ646Z.js";
10
+ } from "./chunk-Z4HPUA2G.js";
11
11
  import "./chunk-A4WCTHWS.js";
12
12
  import {
13
13
  AGENT_GUI_DETAIL_MIN_WIDTH_PX,
@@ -15,17 +15,17 @@ import {
15
15
  AGENT_GUI_STANDALONE_AUTO_COLLAPSE_WIDTH_PX,
16
16
  resolveAgentGUIExpandedWindowFrame,
17
17
  shouldAutoCollapseAgentGUIConversationRail
18
- } from "./chunk-G3XB4FAQ.js";
18
+ } from "./chunk-BKTH4EVE.js";
19
19
  import "./chunk-TUWQV2MC.js";
20
20
  import "./chunk-MHOYBRCY.js";
21
- import "./chunk-X22KJXVG.js";
21
+ import "./chunk-A3HZBKIQ.js";
22
22
  import "./chunk-5HIF53K5.js";
23
23
  import "./chunk-R2ZADXRB.js";
24
- import "./chunk-CO6XO5A2.js";
25
- import "./chunk-RB6ZYQBA.js";
24
+ import "./chunk-FNI4JFDM.js";
25
+ import "./chunk-3LKGPCCL.js";
26
26
  import "./chunk-VMQNG2KI.js";
27
27
  import "./chunk-UP3ZDYTN.js";
28
- import "./chunk-BDWZUA3L.js";
28
+ import "./chunk-TBFWNWDX.js";
29
29
  import {
30
30
  agentGUIAgentIsReady,
31
31
  normalizeAgentGUIAgents,
@@ -41,25 +41,25 @@ import {
41
41
  } from "./chunk-DXT4W2SU.js";
42
42
  import {
43
43
  preloadAgentMentionBrowse
44
- } from "./chunk-PRE4IT6E.js";
44
+ } from "./chunk-RABOGNWT.js";
45
45
  import "./chunk-USIFGHT3.js";
46
46
  import "./chunk-XJ34OIEQ.js";
47
47
  import "./chunk-R7AXDQCA.js";
48
- import "./chunk-QDNOOAAS.js";
49
- import "./chunk-LUGELG5V.js";
48
+ import "./chunk-6TYXZI35.js";
49
+ import "./chunk-5QPOMKMQ.js";
50
50
  import {
51
51
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
52
52
  } from "./chunk-RMQREVJY.js";
53
53
  import {
54
54
  dispatchAgentPlanPromptAction,
55
55
  selectAgentPlanPromptTurn
56
- } from "./chunk-F2Z7P7BB.js";
56
+ } from "./chunk-YZF23LW4.js";
57
57
  import {
58
58
  useEngineSelector
59
59
  } from "./chunk-2RQM7PJN.js";
60
- import "./chunk-ADQENNSG.js";
60
+ import "./chunk-Q5JYEQK6.js";
61
61
  import "./chunk-KPMQGPYU.js";
62
- import "./chunk-4CACBXIB.js";
62
+ import "./chunk-5ILYI4EM.js";
63
63
  import "./chunk-YMXYBG7U.js";
64
64
  import {
65
65
  AgentActivityHostProvider,
@@ -69,17 +69,17 @@ import {
69
69
  useAgentActivityRuntime,
70
70
  useAgentActivitySnapshot,
71
71
  useOptionalAgentActivityRuntime
72
- } from "./chunk-2JFMGOHU.js";
72
+ } from "./chunk-VWIADFP4.js";
73
73
  import "./chunk-F5UR6EJG.js";
74
74
  import "./chunk-EDNJMG5T.js";
75
75
  import {
76
76
  AgentGuiI18nProvider,
77
77
  agentGuiI18nModule,
78
78
  agentGuiI18nResources
79
- } from "./chunk-6RMVLH3G.js";
79
+ } from "./chunk-VH2UJCQG.js";
80
80
  import "./chunk-PJP5BUU6.js";
81
81
  import "./chunk-7KVZPJ3O.js";
82
- import "./chunk-2ZVXN2Z7.js";
82
+ import "./chunk-UZP2LEQL.js";
83
83
  import "./chunk-MIJXEELH.js";
84
84
  import {
85
85
  getAgentCustomMentionKind,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../index.ts"],"sourcesContent":["export {\n getAgentCustomMentionKind,\n registerAgentCustomMentionKind,\n resetAgentCustomMentionKindsForTests,\n type AgentCustomMentionChipContext,\n type AgentCustomMentionIdentity,\n type AgentCustomMentionKindDefinition,\n type AgentCustomMentionPresentation\n} from \"./shared/agentCustomMentionKinds\";\nexport {\n AGENT_PASTED_TEXT_BLOCK_KIND,\n AGENT_PASTED_TEXT_MENTION_KIND\n} from \"./shared/pastedTextKinds\";\nexport { AgentGUI } from \"./AgentGUI\";\nexport type {\n AgentGUIProps,\n AgentGUIReferenceProvenanceFilterCatalog\n} from \"./AgentGUI\";\nexport type { AgentGUIComposerAppendRequest } from \"./agent-gui/agentGuiNode/controller/useAgentGUIComposerAppendRequest\";\nexport type { AgentComposerDraftFile } from \"./agent-gui/agentGuiNode/model/agentGuiNodeTypes\";\nexport type { AgentGUIAccountMenuState } from \"./agent-gui/agentGuiNode/accountMenuState\";\nexport type {\n AgentGUIComposerContentType,\n AgentGUIComposerFocusMethod,\n AgentGUIEngagementContext,\n AgentGUIEngagementEvent,\n AgentGUIEngagementEventSink\n} from \"./agent-gui/agentGuiNode/engagement/agentGUIEngagement.types\";\nexport {\n agentGUIAgentIsReady,\n normalizeAgentGUIAgents,\n resolveAgentGUISelectedDirectoryAgent\n} from \"./agents\";\nexport {\n agentGUIDefaultTargetProviders,\n createLocalAgentGUIAgentTarget,\n createLocalAgentGUIAgentTargets,\n createSharedAgentGUIAgentTarget,\n localAgentGUIAgentTargetId,\n normalizeAgentGUIAgentTargets,\n resolveAgentGUIAgentTarget\n} from \"./agentTargets\";\nexport type {\n AgentGUIAgent,\n AgentGUIAgentDirectoryPort,\n AgentGUIAgentDirectorySnapshot,\n AgentGUIAgentDirectoryStatus,\n AgentGUIAgentAvailability,\n AgentGUIAgentAvailabilityAction,\n AgentGUIAgentAvailabilityStatus,\n AgentGUIAgentOwner,\n AgentGUIAgentOwnership,\n AgentGUIHomeSuggestionId,\n AgentGUIAllAgentsPresentation,\n AgentGUIProvider,\n AgentGUIProviderRailAllPresentation,\n AgentGUIProviderRailMode,\n AgentGUIProviderReadinessGate,\n AgentGUIProviderReadinessGateAction,\n AgentGUIProviderReadinessGateStatus,\n AgentGUIAgentTarget,\n AgentGUIAgentTargetBadge,\n AgentGUIAgentTargetRef\n} from \"./types\";\nexport {\n AgentGuiI18nProvider,\n agentGuiI18nModule,\n agentGuiI18nResources\n} from \"./i18n/index\";\nexport type { AgentGuiI18nLocale } from \"./i18n/index\";\nexport { agentGuiDockIconUrl, agentGuiDockIconUrls } from \"./dockIcons\";\nexport {\n AGENT_GUI_DETAIL_MIN_WIDTH_PX,\n AGENT_GUI_EXPANDED_TARGET_WIDTH_PX,\n AGENT_GUI_STANDALONE_AUTO_COLLAPSE_WIDTH_PX,\n resolveAgentGUIExpandedWindowFrame,\n shouldAutoCollapseAgentGUIConversationRail\n} from \"./agent-gui/agentGuiNode/model/agentGuiRailLayout\";\nexport type {\n AgentGUIAgentsEmptyRenderer,\n AgentGUIProviderUnavailableStateContext,\n AgentGUIProviderUnavailableStateRenderer,\n AgentGUISidebarFooterContext,\n AgentGUISidebarFooterRenderer\n} from \"./agent-gui/agentGuiNode/AgentGUINodeView\";\nexport {\n AGENT_CONTEXT_MENTION_PROVIDER_IDS,\n type AgentContextMentionProviderId,\n type AgentContextMentionProvider\n} from \"./agent-gui/agentGuiNode/agentContextMentionProvider\";\nexport { preloadAgentMentionBrowse } from \"./agent-gui/agentGuiNode/AgentMentionSearchController\";\nexport { AgentActivityHostProvider } from \"./agentActivityHost\";\nexport type { AgentActivityHostProviderProps } from \"./agentActivityHost\";\nexport { useEngineSelector } from \"./shared/engine/useEngineSelector\";\nexport type { EngineStateStore } from \"./shared/engine/useEngineSelector\";\nexport {\n dispatchAgentPlanPromptAction,\n selectAgentPlanPromptTurn\n} from \"./shared/agentConversation/agentPlanPromptDispatch\";\nexport type { AgentPlanPromptAction } from \"./shared/agentConversation/agentPlanPromptDispatch\";\nexport {\n AgentActivityRuntimeProvider,\n resetAgentActivityRuntimeForTests,\n setAgentActivityRuntimeForTests,\n useAgentActivitySnapshot,\n useAgentActivityRuntime,\n useOptionalAgentActivityRuntime\n} from \"./agentActivityRuntime\";\nexport type {\n AgentActivityRuntime,\n AgentActivityRuntimeListSessionMessagesInput,\n AgentActivityRuntimeProviderProps,\n AgentActivityRuntimePromptContentBlock,\n AgentActivityRuntimeDeleteSessionsBatchInput,\n AgentActivityRuntimeDeleteSessionsBatchResult,\n AgentActivityRuntimeSessionSectionDeletionCandidates,\n AgentActivityRuntimeSessionSectionScopeInput,\n AgentActivityRuntimeSetSessionPinnedInput,\n AgentActivityRuntimeUploadPromptContentInput,\n AgentActivityRuntimeUploadPromptContentResult,\n AgentActivityRuntimeUpdateSessionSettingsInput,\n AgentActivityRuntimeUpdateSessionSettingsResult\n} from \"./agentActivityRuntime\";\nexport type {\n AgentHostApi,\n AgentHostAgentTargetAuthenticatedAccount,\n AgentHostAgentTargetSetupSnapshot,\n AgentHostAgentTargetSetupState,\n AgentHostAgentTargetSetupWatch,\n AgentHostApplyWorkspaceGitPatchInput,\n AgentHostInputApi,\n AgentHostSelectFilesInput,\n AgentHostRuntimeApi,\n AgentProviderProbeListInput,\n AgentProviderProbeListResult\n} from \"./host/agentHostApi\";\nexport type {\n AgentProbeProvider,\n AgentProbeSnapshot,\n PersistWriteResult,\n ReadWorkspaceAgentReadStateInput,\n AgentUsageQuota,\n AgentUsageSnapshot,\n WorkspaceAgentReadStateSnapshot,\n WriteWorkspaceAgentReadStateInput\n} from \"./shared/contracts/dto\";\nexport {\n selectNeedsAttentionCount,\n selectNeedsAttentionItems\n} from \"@tutti-os/agent-activity-core\";\nexport type {\n AgentActivityAdapter,\n AgentActivityMessage,\n AgentActivityNeedsAttentionItem,\n AgentActivitySnapshot\n} from \"@tutti-os/agent-activity-core\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkJA;AAAA,EACE;AAAA,EACA;AAAA,OACK;","names":[]}
1
+ {"version":3,"sources":["../index.ts"],"sourcesContent":["export {\n getAgentCustomMentionKind,\n registerAgentCustomMentionKind,\n resetAgentCustomMentionKindsForTests,\n type AgentCustomMentionChipContext,\n type AgentCustomMentionIdentity,\n type AgentCustomMentionKindDefinition,\n type AgentCustomMentionPresentation\n} from \"./shared/agentCustomMentionKinds\";\nexport {\n AGENT_PASTED_TEXT_BLOCK_KIND,\n AGENT_PASTED_TEXT_MENTION_KIND\n} from \"./shared/pastedTextKinds\";\nexport { AgentGUI } from \"./AgentGUI\";\nexport type {\n AgentGUIProps,\n AgentGUIReferenceProvenanceFilterCatalog\n} from \"./AgentGUI\";\nexport type { AgentGUIComposerAppendRequest } from \"./agent-gui/agentGuiNode/controller/useAgentGUIComposerAppendRequest\";\nexport type { AgentComposerDraftFile } from \"./agent-gui/agentGuiNode/model/agentGuiNodeTypes\";\nexport type { AgentGUIAccountMenuState } from \"./agent-gui/agentGuiNode/accountMenuState\";\nexport type {\n AgentGUIComposerContentType,\n AgentGUIComposerFocusMethod,\n AgentGUIEngagementContext,\n AgentGUIEngagementEvent,\n AgentGUIEngagementEventSink\n} from \"./agent-gui/agentGuiNode/engagement/agentGUIEngagement.types\";\nexport {\n agentGUIAgentIsReady,\n normalizeAgentGUIAgents,\n resolveAgentGUISelectedDirectoryAgent\n} from \"./agents\";\nexport {\n agentGUIDefaultTargetProviders,\n createLocalAgentGUIAgentTarget,\n createLocalAgentGUIAgentTargets,\n createSharedAgentGUIAgentTarget,\n localAgentGUIAgentTargetId,\n normalizeAgentGUIAgentTargets,\n resolveAgentGUIAgentTarget\n} from \"./agentTargets\";\nexport type {\n AgentGUIAgent,\n AgentGUIAgentDirectoryPort,\n AgentGUIAgentDirectorySnapshot,\n AgentGUIAgentDirectoryStatus,\n AgentGUIAgentAvailability,\n AgentGUIAgentAvailabilityAction,\n AgentGUIAgentAvailabilityStatus,\n AgentGUIAgentOwner,\n AgentGUIAgentOwnership,\n AgentGUIHomeSuggestionId,\n AgentGUIAllAgentsPresentation,\n AgentGUIProvider,\n AgentGUIProviderRailAllPresentation,\n AgentGUIProviderRailMode,\n AgentGUIProviderReadinessGate,\n AgentGUIProviderReadinessGateAction,\n AgentGUIProviderReadinessGateStatus,\n AgentGUIAgentTarget,\n AgentGUIAgentTargetBadge,\n AgentGUIAgentTargetRef\n} from \"./types\";\nexport {\n AgentGuiI18nProvider,\n agentGuiI18nModule,\n agentGuiI18nResources\n} from \"./i18n/index\";\nexport type { AgentGuiI18nLocale } from \"./i18n/index\";\nexport { agentGuiDockIconUrl, agentGuiDockIconUrls } from \"./dockIcons\";\nexport {\n AGENT_GUI_DETAIL_MIN_WIDTH_PX,\n AGENT_GUI_EXPANDED_TARGET_WIDTH_PX,\n AGENT_GUI_STANDALONE_AUTO_COLLAPSE_WIDTH_PX,\n resolveAgentGUIExpandedWindowFrame,\n shouldAutoCollapseAgentGUIConversationRail\n} from \"./agent-gui/agentGuiNode/model/agentGuiRailLayout\";\nexport type {\n AgentGUIAgentsEmptyRenderer,\n AgentGUIProviderUnavailableStateContext,\n AgentGUIProviderUnavailableStateRenderer,\n AgentGUISidebarFooterContext,\n AgentGUISidebarFooterRenderer\n} from \"./agent-gui/agentGuiNode/AgentGUINodeView\";\nexport {\n AGENT_CONTEXT_MENTION_PROVIDER_IDS,\n type AgentContextMentionProviderId,\n type AgentContextMentionProvider\n} from \"./agent-gui/agentGuiNode/agentContextMentionProvider\";\nexport { preloadAgentMentionBrowse } from \"./agent-gui/agentGuiNode/AgentMentionSearchController\";\nexport { AgentActivityHostProvider } from \"./agentActivityHost\";\nexport type { AgentActivityHostProviderProps } from \"./agentActivityHost\";\nexport { useEngineSelector } from \"./shared/engine/useEngineSelector\";\nexport type { EngineStateStore } from \"./shared/engine/useEngineSelector\";\nexport {\n dispatchAgentPlanPromptAction,\n selectAgentPlanPromptTurn\n} from \"./shared/agentConversation/agentPlanPromptDispatch\";\nexport type { AgentPlanPromptAction } from \"./shared/agentConversation/agentPlanPromptDispatch\";\nexport {\n AgentActivityRuntimeProvider,\n resetAgentActivityRuntimeForTests,\n setAgentActivityRuntimeForTests,\n useAgentActivitySnapshot,\n useAgentActivityRuntime,\n useOptionalAgentActivityRuntime\n} from \"./agentActivityRuntime\";\nexport type {\n AgentActivityRuntime,\n AgentActivityRuntimeListSessionMessagesInput,\n AgentActivityRuntimeProviderProps,\n AgentActivityRuntimePromptContentBlock,\n AgentActivityRuntimeDeleteSessionsBatchInput,\n AgentActivityRuntimeDeleteSessionsBatchResult,\n AgentActivityRuntimeSessionSectionDeletionCandidates,\n AgentActivityRuntimeSessionSectionScopeInput,\n AgentActivityRuntimeSetSessionPinnedInput,\n AgentActivityRuntimeUploadPromptContentInput,\n AgentActivityRuntimeUploadPromptContentResult,\n AgentActivityRuntimeUpdateSessionSettingsInput,\n AgentActivityRuntimeUpdateSessionSettingsResult\n} from \"./agentActivityRuntime\";\nexport type {\n AgentHostApi,\n AgentHostAgentTargetAuthenticatedAccount,\n AgentHostAgentTargetSetupSnapshot,\n AgentHostAgentTargetSetupState,\n AgentHostAgentTargetSetupWatch,\n AgentHostApplyWorkspaceGitPatchInput,\n AgentHostInputApi,\n AgentHostSelectFilesInput,\n AgentHostRuntimeApi,\n AgentHostUserProject,\n AgentProviderProbeListInput,\n AgentProviderProbeListResult\n} from \"./host/agentHostApi\";\nexport type {\n AgentProbeProvider,\n AgentProbeSnapshot,\n PersistWriteResult,\n ReadWorkspaceAgentReadStateInput,\n AgentUsageQuota,\n AgentUsageSnapshot,\n WorkspaceAgentReadStateSnapshot,\n WriteWorkspaceAgentReadStateInput\n} from \"./shared/contracts/dto\";\nexport {\n selectNeedsAttentionCount,\n selectNeedsAttentionItems\n} from \"@tutti-os/agent-activity-core\";\nexport type {\n AgentActivityAdapter,\n AgentActivityMessage,\n AgentActivityNeedsAttentionItem,\n AgentActivitySnapshot\n} from \"@tutti-os/agent-activity-core\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmJA;AAAA,EACE;AAAA,EACA;AAAA,OACK;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  resolveAgentMentionFileThumbnailUrl,
3
3
  resolveAgentMentionFileVisualKind
4
- } from "./chunk-LUGELG5V.js";
4
+ } from "./chunk-5QPOMKMQ.js";
5
5
  import "./chunk-PJP5BUU6.js";
6
6
  export {
7
7
  resolveAgentMentionFileThumbnailUrl,
@@ -3,21 +3,21 @@ import {
3
3
  MAX_BROWSE_CACHE_ENTRIES,
4
4
  preloadAgentMentionBrowse,
5
5
  resetAgentMentionSearchBrowseCacheForTests
6
- } from "./chunk-PRE4IT6E.js";
6
+ } from "./chunk-RABOGNWT.js";
7
7
  import "./chunk-USIFGHT3.js";
8
8
  import "./chunk-XJ34OIEQ.js";
9
9
  import "./chunk-R7AXDQCA.js";
10
- import "./chunk-QDNOOAAS.js";
11
- import "./chunk-LUGELG5V.js";
10
+ import "./chunk-6TYXZI35.js";
11
+ import "./chunk-5QPOMKMQ.js";
12
12
  import "./chunk-RMQREVJY.js";
13
13
  import "./chunk-YMXYBG7U.js";
14
- import "./chunk-2JFMGOHU.js";
14
+ import "./chunk-VWIADFP4.js";
15
15
  import "./chunk-F5UR6EJG.js";
16
16
  import "./chunk-EDNJMG5T.js";
17
- import "./chunk-6RMVLH3G.js";
17
+ import "./chunk-VH2UJCQG.js";
18
18
  import "./chunk-PJP5BUU6.js";
19
19
  import "./chunk-7KVZPJ3O.js";
20
- import "./chunk-2ZVXN2Z7.js";
20
+ import "./chunk-UZP2LEQL.js";
21
21
  import "./chunk-MIJXEELH.js";
22
22
  import "./chunk-D2JUDUYY.js";
23
23
  import "./chunk-6CUELYIF.js";
@@ -14,17 +14,17 @@ import {
14
14
  resolveAgentGuiUnifiedDockLaunchPayload,
15
15
  resolveAgentGuiWorkbenchContributionCopy,
16
16
  resolveAgentGuiWorkbenchDefaultLaunchFrame
17
- } from "../chunk-G3XB4FAQ.js";
17
+ } from "../chunk-BKTH4EVE.js";
18
18
  import "../chunk-TUWQV2MC.js";
19
19
  import "../chunk-MHOYBRCY.js";
20
- import "../chunk-X22KJXVG.js";
20
+ import "../chunk-A3HZBKIQ.js";
21
21
  import "../chunk-5HIF53K5.js";
22
22
  import "../chunk-R2ZADXRB.js";
23
23
  import "../chunk-T2NICA5D.js";
24
24
  import "../chunk-DXT4W2SU.js";
25
25
  import "../chunk-2RQM7PJN.js";
26
26
  import "../chunk-7KVZPJ3O.js";
27
- import "../chunk-2ZVXN2Z7.js";
27
+ import "../chunk-UZP2LEQL.js";
28
28
  import "../chunk-MIJXEELH.js";
29
29
  import "../chunk-6CUELYIF.js";
30
30
  import "../chunk-QMMWKQOT.js";
@@ -10,7 +10,7 @@ import {
10
10
  resolveAgentGuiUnifiedDockLaunchPayload,
11
11
  resolveAgentGuiWorkbenchContributionCopy,
12
12
  resolveAgentGuiWorkbenchConversationIdentity
13
- } from "../chunk-G3XB4FAQ.js";
13
+ } from "../chunk-BKTH4EVE.js";
14
14
  import {
15
15
  agentGuiWorkbenchDockEntryId,
16
16
  agentGuiWorkbenchDockIdentityFromIdentifier,
@@ -30,7 +30,7 @@ import {
30
30
  import {
31
31
  resolveAgentGuiWorkbenchHeaderTitle,
32
32
  resolveAgentGuiWorkbenchSessionTitle
33
- } from "../chunk-X22KJXVG.js";
33
+ } from "../chunk-A3HZBKIQ.js";
34
34
  import {
35
35
  areAgentGuiWorkbenchNodeStatesEqual,
36
36
  areAgentGuiWorkbenchStatesEqual,
@@ -57,7 +57,7 @@ import "../chunk-T2NICA5D.js";
57
57
  import "../chunk-DXT4W2SU.js";
58
58
  import "../chunk-2RQM7PJN.js";
59
59
  import "../chunk-7KVZPJ3O.js";
60
- import "../chunk-2ZVXN2Z7.js";
60
+ import "../chunk-UZP2LEQL.js";
61
61
  import "../chunk-MIJXEELH.js";
62
62
  import "../chunk-6CUELYIF.js";
63
63
  import "../chunk-QMMWKQOT.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  resolveAgentGuiWorkbenchHeaderTitle,
3
3
  resolveAgentGuiWorkbenchSessionTitle
4
- } from "../chunk-X22KJXVG.js";
5
- import "../chunk-2ZVXN2Z7.js";
4
+ } from "../chunk-A3HZBKIQ.js";
5
+ import "../chunk-UZP2LEQL.js";
6
6
  import "../chunk-MIJXEELH.js";
7
7
  import "../chunk-6CUELYIF.js";
8
8
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tutti-os/agent-gui",
3
- "version": "0.0.126",
3
+ "version": "0.0.128",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -132,17 +132,17 @@
132
132
  "@tiptap/react": "^3.11.1",
133
133
  "@tiptap/starter-kit": "^3.11.1",
134
134
  "@tiptap/suggestion": "^3.11.1",
135
- "@tutti-os/agent-activity-core": "0.0.126",
136
- "@tutti-os/ui-i18n-runtime": "0.0.126",
137
- "@tutti-os/ui-react-hooks": "0.0.126",
138
- "@tutti-os/ui-rich-text": "0.0.126",
139
- "@tutti-os/ui-system": "0.0.126",
140
- "@tutti-os/workbench-surface": "0.0.126",
141
- "@tutti-os/workspace-external-core": "0.0.126",
142
- "@tutti-os/workspace-file-manager": "0.0.126",
143
- "@tutti-os/workspace-file-reference": "0.0.126",
144
- "@tutti-os/workspace-issue-manager": "0.0.126",
145
- "@tutti-os/workspace-user-project": "0.0.126",
135
+ "@tutti-os/agent-activity-core": "0.0.128",
136
+ "@tutti-os/ui-i18n-runtime": "0.0.128",
137
+ "@tutti-os/ui-react-hooks": "0.0.128",
138
+ "@tutti-os/ui-rich-text": "0.0.128",
139
+ "@tutti-os/ui-system": "0.0.128",
140
+ "@tutti-os/workbench-surface": "0.0.128",
141
+ "@tutti-os/workspace-external-core": "0.0.128",
142
+ "@tutti-os/workspace-file-manager": "0.0.128",
143
+ "@tutti-os/workspace-file-reference": "0.0.128",
144
+ "@tutti-os/workspace-issue-manager": "0.0.128",
145
+ "@tutti-os/workspace-user-project": "0.0.128",
146
146
  "clsx": "^2.1.1",
147
147
  "framer-motion": "^12.40.0",
148
148
  "lodash": "^4.17.21",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../agentActivityRuntime.tsx","../agentActivityHost.tsx","../host/agentHostApi.ts","../shared/workspaceAgentProviderLabel.ts"],"sourcesContent":["import {\n createContext,\n useContext,\n useSyncExternalStore,\n type JSX,\n type PropsWithChildren\n} from \"react\";\nimport type {\n AgentActivityActivateSessionResult,\n AgentActivityGoalControlInput,\n AgentActivityGoalControlResult,\n AgentActivityCreateSessionInput,\n AgentActivityDeleteSessionInput,\n AgentActivityDeleteSessionResult,\n AgentActivityMessageOrder,\n AgentActivityMessagePage,\n AgentActivityRenameSessionInput,\n AgentActivitySendInput,\n AgentActivitySendInputResult,\n AgentActivitySession,\n AgentActivitySessionSettings,\n AgentActivitySnapshot,\n AgentActivitySnapshotListener,\n AgentActivitySubmitInteractiveInput,\n AgentActivitySubmitInteractiveResult,\n AgentSessionEngine\n} from \"@tutti-os/agent-activity-core\";\nimport type {\n AgentHostAgentSessionComposerSettings,\n AgentHostUnactivateAgentSessionResult\n} from \"./shared/contracts/dto\";\nimport type { WorkspaceQueryCache } from \"./shared/query/workspaceQueryCache\";\n\nexport interface AgentActivityRuntimeUpdateSessionSettingsResult {\n agentSessionId: string;\n settings: AgentHostAgentSessionComposerSettings;\n session: AgentActivitySession;\n}\n\nexport interface AgentActivityRuntimeListSessionMessagesInput {\n afterVersion?: number;\n beforeVersion?: number;\n cache?: boolean;\n agentSessionId: string;\n limit?: number;\n order?: AgentActivityMessageOrder;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListGeneratedFilesInput {\n agentTargetIds?: readonly string[];\n cursor?: string;\n limit?: number;\n query?: string;\n sectionKey: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListSessionsPageInput {\n agentTargetId?: string | null;\n cursor?: string;\n limit?: number;\n searchQuery?: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeSessionPageResult {\n hasMore: boolean;\n nextCursor?: string;\n sessions: AgentActivitySession[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListSessionSectionsInput {\n agentTargetId?: string | null;\n limitPerSection?: number;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListSessionSectionPageInput {\n agentTargetId?: string | null;\n cursor?: string;\n limit?: number;\n sectionKey: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeListPinnedSessionsPageInput {\n agentTargetId?: string | null;\n cursor?: string;\n limit?: number;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeUserProject {\n createdAtUnixMs: number;\n id: string;\n label: string;\n lastUsedAtUnixMs?: number;\n path: string;\n sectionKey: string;\n updatedAtUnixMs: number;\n}\n\nexport interface AgentActivityRuntimeSessionSection {\n kind: \"conversations\" | \"project\";\n sectionKey: string;\n userProject?: AgentActivityRuntimeUserProject;\n sessions: AgentActivitySession[];\n hasMore: boolean;\n totalCount: number;\n nextCursor?: string;\n}\n\nexport interface AgentActivityRuntimeSessionPage {\n sessions: AgentActivitySession[];\n hasMore: boolean;\n totalCount: number;\n nextCursor?: string;\n}\n\nexport interface AgentActivityRuntimeSessionSectionsResult {\n pinned?: AgentActivityRuntimeSessionPage;\n sections: AgentActivityRuntimeSessionSection[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFile {\n label: string;\n path: string;\n}\n\nexport interface AgentActivityRuntimeGeneratedFileList {\n entries: AgentActivityRuntimeGeneratedFile[];\n hasMore?: boolean;\n nextCursor?: string;\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 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 AgentActivityRuntimeGetComposerOptionsInput {\n agentTargetId: string;\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 AgentActivityRuntimeDiagnosticInput {\n details?: Record<string, unknown>;\n event: string;\n level?: \"debug\" | \"info\" | \"warn\" | \"error\";\n source?: string;\n workspaceId?: string | null;\n}\n\ninterface AgentActivityRuntimeActivateSessionInputBase {\n agentSessionId: string;\n cwd?: string;\n initialContent?: AgentActivitySendInput[\"content\"];\n /** 仅展示用首轮文本(bundle 折叠成一个 chip);initialContent 仍带展开后的文件。 */\n initialDisplayPrompt?: string | null;\n submitDiagnostics?: AgentActivitySendInput[\"submitDiagnostics\"];\n settings?: AgentActivitySessionSettings;\n title?: string;\n visible?: boolean;\n workspaceId: string;\n signal?: AbortSignal;\n}\n\nexport type AgentActivityRuntimeActivateSessionInput =\n | (AgentActivityRuntimeActivateSessionInputBase & {\n agentTargetId: string;\n clientSubmitId: string;\n mode: \"new\";\n })\n | (AgentActivityRuntimeActivateSessionInputBase & {\n agentTargetId?: string | null;\n clientSubmitId?: never;\n mode: \"existing\";\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\n/**\n * Dedicated host boundary for turning an in-memory text paste into a local\n * prompt asset. The runtime owns persistence and returns a sendable host path;\n * AgentGUI must not infer this capability from generic file-upload support.\n */\nexport interface AgentActivityRuntimeStagePastedTextInput {\n name: string;\n text: string;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeStagePastedTextResult {\n name: string;\n path: string;\n sizeBytes: number;\n}\n\nexport interface AgentActivityRuntimeSessionSectionScopeInput {\n agentTargetId?: string | null;\n excludePinned?: boolean;\n sectionKey: string;\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeSessionSectionDeletionCandidates {\n agentTargetId?: string | null;\n excludePinned: boolean;\n sectionKey: string;\n sessionIds: string[];\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeDeleteSessionsBatchInput {\n sessionIds: string[];\n signal?: AbortSignal;\n workspaceId: string;\n}\n\nexport interface AgentActivityRuntimeDeleteSessionsBatchResult {\n removedMessages: number;\n removedSessionIds: string[];\n removedSessions: number;\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 /**\n * Stable identity of this runtime instance (e.g. a local origin vs a\n * shared/room origin). The runtime owns one session engine per workspace and\n * that engine verifies this origin as part of its injected identity. Runtime\n * consumers resolve only through the nearest React provider; module-global\n * runtime lookup and last-mounted fallback are forbidden. An absent origin\n * means the canonical local origin.\n */\n origin?: string;\n /**\n * The session cwd is not resolvable on the local filesystem (e.g. a\n * shared/cloud sandbox not mounted locally), so AgentGUI must not run its\n * local stat-based \"working directory missing\" existence check — it would\n * always false-positive. Absent/false (default) => local, legacy behaviour.\n * Only that one guard is gated; project selection/listing is unaffected.\n */\n projectPathIsRemote?: boolean;\n promptContentUploadSupport?: {\n file?: boolean;\n image?: boolean;\n };\n /** Set false to suppress AgentGUI diagnostics in development consoles. */\n devDiagnosticConsoleSink?: boolean;\n goalControl(\n input: AgentActivityGoalControlInput\n ): Promise<AgentActivityGoalControlResult>;\n createSession(\n input: AgentActivityCreateSessionInput\n ): Promise<AgentActivitySession>;\n deleteSession(\n input: AgentActivityDeleteSessionInput\n ): Promise<AgentActivityDeleteSessionResult>;\n activateSession(\n input: AgentActivityRuntimeActivateSessionInput\n ): Promise<AgentActivityActivateSessionResult>;\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<AgentActivityRuntimeUpdateSessionSettingsResult>;\n getSnapshot(workspaceId: string): AgentActivitySnapshot;\n getSessionEngine(workspaceId: string): AgentSessionEngine;\n getSessionSectionsQueryCache?(\n workspaceId: string\n ): WorkspaceQueryCache<unknown>;\n listSessionMessages(\n input: AgentActivityRuntimeListSessionMessagesInput\n ): Promise<AgentActivityMessagePage>;\n listAgentGeneratedFiles?(\n input: AgentActivityRuntimeListGeneratedFilesInput\n ): Promise<AgentActivityRuntimeGeneratedFileList>;\n listSessionsPage?(\n input: AgentActivityRuntimeListSessionsPageInput\n ): Promise<AgentActivityRuntimeSessionPageResult>;\n listSessionSections?(\n input: AgentActivityRuntimeListSessionSectionsInput\n ): Promise<AgentActivityRuntimeSessionSectionsResult>;\n listSessionSectionPage?(\n input: AgentActivityRuntimeListSessionSectionPageInput\n ): Promise<AgentActivityRuntimeSessionSection>;\n listSessionSectionDeletionCandidates?(\n input: AgentActivityRuntimeSessionSectionScopeInput\n ): Promise<AgentActivityRuntimeSessionSectionDeletionCandidates>;\n deleteSessionsBatch?(\n input: AgentActivityRuntimeDeleteSessionsBatchInput\n ): Promise<AgentActivityRuntimeDeleteSessionsBatchResult>;\n listPinnedSessionsPage?(\n input: AgentActivityRuntimeListPinnedSessionsPageInput\n ): Promise<AgentActivityRuntimeSessionPage>;\n load(\n workspaceId: string,\n signal?: AbortSignal\n ): Promise<AgentActivitySnapshot>;\n ensureSessionSynchronized?(\n input: AgentActivityRuntimeEnsureSessionSynchronizedInput\n ): () => void;\n sendInput(\n input: AgentActivitySendInput\n ): Promise<AgentActivitySendInputResult>;\n uploadPromptContent?(\n input: AgentActivityRuntimeUploadPromptContentInput\n ): Promise<AgentActivityRuntimeUploadPromptContentResult>;\n stagePastedText?(\n input: AgentActivityRuntimeStagePastedTextInput\n ): Promise<AgentActivityRuntimeStagePastedTextResult>;\n readSessionAttachment?(\n input: AgentActivityRuntimeReadSessionAttachmentInput\n ): Promise<AgentActivityRuntimeSessionAttachment>;\n readPromptAsset?(\n input: AgentActivityRuntimeReadPromptAssetInput\n ): Promise<AgentActivityRuntimePromptAsset>;\n renameSession(\n input: AgentActivityRenameSessionInput\n ): Promise<AgentActivitySession>;\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<AgentActivitySubmitInteractiveResult>;\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\nfunction createTestAgentActivityRuntimeHolder(): {\n get: () => AgentActivityRuntime | null;\n set: (runtime: AgentActivityRuntime | null) => void;\n} {\n let runtime: AgentActivityRuntime | null = null;\n return {\n get: () => runtime,\n set: (nextRuntime) => {\n runtime = nextRuntime;\n }\n };\n}\n\nconst testAgentActivityRuntimeHolder = createTestAgentActivityRuntimeHolder();\n\nexport interface AgentActivityRuntimeProviderProps extends PropsWithChildren {\n runtime?: AgentActivityRuntime | null;\n}\n\nexport function AgentActivityRuntimeProvider({\n children,\n runtime\n}: AgentActivityRuntimeProviderProps): JSX.Element {\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 resetAgentActivityRuntimeForTests(): void {\n if (process.env.NODE_ENV === \"test\") {\n testAgentActivityRuntimeHolder.set(null);\n }\n}\n\nexport function setAgentActivityRuntimeForTests(\n runtime: AgentActivityRuntime | null\n): void {\n if (process.env.NODE_ENV === \"test\") {\n testAgentActivityRuntimeHolder.set(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 const testRuntimeOverride = testAgentActivityRuntimeHolder.get();\n if (testRuntimeOverride) {\n return testRuntimeOverride;\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 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 AgentHostListWorkspaceAgentProbesInput,\n AgentHostWorkspaceAgentProbesResult,\n PersistWriteResult,\n ReadWorkspaceAgentReadStateInput,\n ReadWorkspaceFileResult as AgentHostReadWorkspaceFileResult,\n WorkspaceAgentReadStateSnapshot,\n WriteWorkspaceAgentReadStateInput\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;\n\nexport type AgentHostClipboardApi = {\n writeImage?: (input: {\n data: string;\n mimeType: \"image/png\";\n }) => AgentHostAsyncResult<void>;\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};\n\nexport type AgentHostPersistenceApi = AgentHostRecord & {\n readWorkspaceAgentReadState: (\n input: ReadWorkspaceAgentReadStateInput\n ) => AgentHostAsyncResult<WorkspaceAgentReadStateSnapshot>;\n writeWorkspaceAgentReadState: (\n input: WriteWorkspaceAgentReadStateInput\n ) => AgentHostAsyncResult<PersistWriteResult>;\n};\n\nexport type AgentHostToastApi = AgentHostRecord & {\n error: (title: string, description?: string) => void;\n info?: (title: string, description?: string) => void;\n success?: (title: string, description?: string) => void;\n};\n\nexport interface AgentHostSelectedFile {\n name?: string;\n path: string;\n}\n\nexport interface AgentHostSelectFilesInput {\n allowDirectories?: boolean;\n}\n\nexport interface AgentHostApplyWorkspaceGitPatchInput {\n allowBinary?: boolean;\n atomic?: boolean;\n cwd: string;\n diff: string;\n revert?: boolean;\n target?: \"unstaged\" | \"staged\" | \"staged-and-unstaged\";\n}\n\nexport interface AgentHostApplyWorkspaceGitPatchResult {\n status: \"success\" | \"partial-success\" | \"error\";\n appliedPaths: string[];\n skippedPaths: string[];\n conflictedPaths: string[];\n errorCode?: \"not-git-repo\" | string;\n execOutput?: {\n command: string;\n stdout: string;\n stderr: string;\n };\n}\n\nexport interface AgentHostResolveWorkspaceGitPatchSupportInput {\n cwd: string;\n}\n\nexport interface AgentHostResolveWorkspaceGitPatchSupportResult {\n supported: boolean;\n root?: string;\n errorCode?: \"not-git-repo\" | string;\n}\n\nexport type AgentHostWorkspaceApi = AgentHostRecord & {\n applyGitPatch?: (\n input: AgentHostApplyWorkspaceGitPatchInput\n ) => AgentHostAsyncResult<AgentHostApplyWorkspaceGitPatchResult>;\n resolveGitPatchSupport?: (\n input: AgentHostResolveWorkspaceGitPatchSupportInput\n ) => AgentHostAsyncResult<AgentHostResolveWorkspaceGitPatchSupportResult>;\n copyPath?: (input: { path: string }) => AgentHostAsyncResult<void>;\n ensureDirectory: (input: { path: string }) => AgentHostAsyncResult<void>;\n getReferenceForFile?: (file: File) => {\n kind: \"file\" | \"folder\";\n path: string;\n };\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 agentSessions?: AgentHostAgentSessionsApi;\n agentTargetSetup?: AgentHostAgentTargetSetupApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n persistence?: AgentHostPersistenceApi;\n runtime?: AgentHostEnvironmentApi;\n toast?: AgentHostToastApi;\n userProjects?: AgentHostUserProjectsApi;\n workspace: AgentHostWorkspaceApi;\n workspaceAgentProbes?: AgentHostWorkspaceAgentProbesApi;\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 AgentHostWorkspaceAgentProbesApi = AgentHostRecord & {\n list: (\n input: AgentHostListWorkspaceAgentProbesInput\n ) => AgentHostAsyncResult<AgentHostWorkspaceAgentProbesResult>;\n};\n\nexport interface AgentHostAgentTargetInstallPlan {\n packageName: string;\n packageVersion: string;\n runner: \"npm\" | \"pnpm\" | \"uv\";\n planDigest: string;\n installRoot: string;\n}\n\nexport interface AgentHostAgentTargetSetupAction {\n actionId: string;\n clientActionId: string;\n kind: \"install\" | \"authenticate\";\n status: \"queued\" | \"running\" | \"succeeded\" | \"failed\" | \"interrupted\";\n phase:\n | \"preparing\"\n | \"installing\"\n | \"verifying\"\n | \"probing\"\n | \"activating\"\n | \"authenticating\"\n | \"complete\";\n errorCode: string | null;\n errorMessage: string | null;\n}\n\nexport interface AgentHostAgentTargetSetupSnapshot {\n agentTargetId: string;\n status:\n | \"ready\"\n | \"auth_required\"\n | \"not_installed\"\n | \"installing\"\n | \"authenticating\"\n | \"failed\";\n runtimeSource: \"local\" | \"managed\" | null;\n runtimeVersion: string | null;\n reason: string | null;\n authMethods: AgentHostAgentTargetAuthMethod[];\n account: AgentHostAgentTargetAuthenticatedAccount | null;\n plan: AgentHostAgentTargetInstallPlan | null;\n action: AgentHostAgentTargetSetupAction | null;\n}\n\nexport interface AgentHostAgentTargetAuthenticatedAccount {\n id: string;\n displayName: string;\n authMethodId: string;\n organization: string | null;\n}\n\nexport interface AgentHostAgentTargetAuthMethod {\n id: string;\n name: string;\n description?: string | null;\n}\n\nexport interface AgentHostAgentTargetSetupState {\n snapshot: AgentHostAgentTargetSetupSnapshot | null;\n loading: boolean;\n failed: boolean;\n}\n\nexport interface AgentHostAgentTargetSetupWatch {\n getSnapshot: () => AgentHostAgentTargetSetupState;\n subscribe: (\n listener: (state: AgentHostAgentTargetSetupState) => void\n ) => AgentHostUnsubscribe;\n install: (input: {\n planDigest: string;\n clientActionId: string;\n }) => AgentHostAsyncResult<void>;\n authenticate: (input: {\n methodId: string;\n clientActionId: string;\n }) => AgentHostAsyncResult<void>;\n refresh: () => AgentHostAsyncResult<void>;\n}\n\nexport type AgentHostAgentTargetSetupApi = AgentHostRecord & {\n watch: (input: { agentTargetId: string }) => AgentHostAgentTargetSetupWatch;\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 sectionKey?: 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 move?: (input: {\n beforeProjectId: string | null;\n projectId: string;\n }) => AgentHostAsyncResult<void>;\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 getComposerOptions?: (input: any) => AgentHostAsyncResult<any>;\n getState: (input: any) => AgentHostAsyncResult<any>;\n onEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\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\nexport interface AgentHostRuntimeApi {\n account?: AgentHostAccountApi;\n agentTargetSetup?: AgentHostAgentTargetSetupApi;\n clipboard: AgentHostClipboardApi;\n debug?: AgentHostDebugApi;\n filesystem: AgentHostFilesystemApi;\n meta?: AgentHostMetaApi;\n onHostEvent?: (listener: (event: any) => void) => AgentHostUnsubscribe;\n persistence?: AgentHostPersistenceApi;\n runtime?: AgentHostEnvironmentApi;\n toast?: AgentHostToastApi;\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 agentTargetSetup: hostApi.agentTargetSetup,\n clipboard: hostApi.clipboard,\n debug: hostApi.debug,\n filesystem: hostApi.filesystem,\n meta: hostApi.meta,\n onHostEvent: hostApi.onHostEvent,\n persistence: hostApi.persistence,\n runtime: hostApi.runtime,\n toast: hostApi.toast,\n userProjects: hostApi.userProjects,\n workspace: hostApi.workspace,\n workspaceAgentProbes: hostApi.workspaceAgentProbes\n };\n}\n","import {\n agentGUIProviderIdentityDisplayName,\n resolveMigratedAgentGUIProviderIdentity\n} from \"../providerIdentityCatalog.ts\";\nimport { translate } from \"../i18n/index.ts\";\n\nexport function workspaceAgentProviderLabel(provider: string): string {\n const normalized = provider.trim().toLowerCase();\n const migratedIdentity = resolveMigratedAgentGUIProviderIdentity(normalized);\n if (migratedIdentity) {\n return agentGUIProviderIdentityDisplayName(migratedIdentity, translate);\n }\n return titleCase(provider);\n}\n\nfunction titleCase(value: string): string {\n return value\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(\" \");\n}\n"],"mappings":"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","names":["createContext","useContext","jsx","createContext","useContext"]}