@tutti-os/agent-gui 0.0.95 → 0.0.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -6
- package/dist/{AgentGUI-CwBLYtv-.d.ts → AgentGUI-DWdvUV4x.d.ts} +64 -18
- package/dist/agent-conversation/index.d.ts +3 -2
- package/dist/agent-conversation/index.js +10 -9
- package/dist/agent-conversation/index.js.map +1 -1
- package/dist/agent-env/index.js +1 -1
- package/dist/agent-gui.d.ts +5 -5
- package/dist/agent-gui.js +26 -26
- package/dist/agent-message-center/index.d.ts +14 -3
- package/dist/agent-message-center/index.js +182 -47
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentFileMentionContracts-Czvz6YMI.d.ts → agentFileMentionContracts-58IjMU-u.d.ts} +1 -0
- package/dist/{agentGuiNodeTypes-DppADPHW.d.ts → agentGuiNodeTypes-B9X4aWfv.d.ts} +30 -18
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +1 -1
- package/dist/app/renderer/agentactivity.css +150 -3
- package/dist/{chunk-C5FV4UGI.js → chunk-2HJEOO7W.js} +14 -6
- package/dist/chunk-2HJEOO7W.js.map +1 -0
- package/dist/{chunk-BFNJKTDV.js → chunk-3XXBDYAI.js} +11 -16
- package/dist/chunk-3XXBDYAI.js.map +1 -0
- package/dist/{chunk-YE25HN6T.js → chunk-3Y3F7CS5.js} +17 -25
- package/dist/chunk-3Y3F7CS5.js.map +1 -0
- package/dist/{chunk-CRO2MV2Y.js → chunk-4PQPJ5OY.js} +21 -116
- package/dist/chunk-4PQPJ5OY.js.map +1 -0
- package/dist/{chunk-R2EWECUP.js → chunk-7BXWPI4F.js} +17 -2
- package/dist/{chunk-R2EWECUP.js.map → chunk-7BXWPI4F.js.map} +1 -1
- package/dist/{chunk-LQVXBT65.js → chunk-AGT7MUTV.js} +9 -9
- package/dist/{chunk-LQVXBT65.js.map → chunk-AGT7MUTV.js.map} +1 -1
- package/dist/{chunk-O6W72SEP.js → chunk-C35SNDVZ.js} +4 -1
- package/dist/chunk-C35SNDVZ.js.map +1 -0
- package/dist/{chunk-BIHBXWK5.js → chunk-E4HQUTM3.js} +2 -2
- package/dist/{chunk-NX3CZJXW.js → chunk-H5F3QSCF.js} +2 -2
- package/dist/{chunk-WEDMAVX2.js → chunk-IYEXLOUE.js} +3 -6
- package/dist/chunk-IYEXLOUE.js.map +1 -0
- package/dist/{chunk-3R2D4E57.js → chunk-JKIZA7EJ.js} +933 -844
- package/dist/chunk-JKIZA7EJ.js.map +1 -0
- package/dist/{chunk-UQJPV6HP.js → chunk-L3GMMGRS.js} +8 -6
- package/dist/chunk-L3GMMGRS.js.map +1 -0
- package/dist/{chunk-KAL4XZMA.js → chunk-MASXZENX.js} +1 -1
- package/dist/chunk-MASXZENX.js.map +1 -0
- package/dist/{chunk-7PFDA2HQ.js → chunk-O3Q5SIJH.js} +3 -3
- package/dist/{chunk-NITOD7WF.js → chunk-QVBF5BN5.js} +2 -2
- package/dist/{chunk-7RDD3EWP.js → chunk-RE4AXS27.js} +24 -15
- package/dist/chunk-RE4AXS27.js.map +1 -0
- package/dist/{chunk-NJAZ7LQM.js → chunk-TVIGLNNI.js} +3 -3
- package/dist/{chunk-VF22EG3F.js → chunk-UHBCM6RO.js} +1 -1
- package/dist/chunk-UHBCM6RO.js.map +1 -0
- package/dist/{chunk-AOS2VWU6.js → chunk-W6WAGPMD.js} +33 -3
- package/dist/chunk-W6WAGPMD.js.map +1 -0
- package/dist/{chunk-RY6GIO3K.js → chunk-WKSFPJHZ.js} +5010 -3656
- package/dist/chunk-WKSFPJHZ.js.map +1 -0
- package/dist/{chunk-JX2SIXNL.js → chunk-WMNS4MAQ.js} +8 -7
- package/dist/{chunk-JX2SIXNL.js.map → chunk-WMNS4MAQ.js.map} +1 -1
- package/dist/{chunk-XMO45GKA.js → chunk-XPFHJMZP.js} +14 -4
- package/dist/chunk-XPFHJMZP.js.map +1 -0
- package/dist/chunk-YMXYBG7U.js +12 -0
- package/dist/chunk-YMXYBG7U.js.map +1 -0
- package/dist/context-mention-palette/index.d.ts +1 -1
- package/dist/context-mention-palette/index.js +14 -14
- package/dist/custom-mention.d.ts +2 -4
- package/dist/dock-icons.d.ts +2 -4
- package/dist/i18n/index.d.ts +30 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +14 -12
- package/dist/index.js +34 -30
- package/dist/index.js.map +1 -1
- package/dist/mention-search.d.ts +1 -1
- package/dist/mention-search.js +11 -11
- package/dist/pastedTextKinds-D-XuInaS.d.ts +4 -0
- package/dist/startup-shell.d.ts +8 -0
- package/dist/startup-shell.js +184 -0
- package/dist/startup-shell.js.map +1 -0
- package/dist/{types-DX2bxgB8.d.ts → types-CnT8rNUI.d.ts} +16 -5
- package/dist/workbench/contribution.d.ts +3 -2
- package/dist/workbench/contribution.js +6 -6
- package/dist/workbench/index.d.ts +4 -4
- package/dist/workbench/index.js +14 -16
- package/dist/workbench/launch.d.ts +2 -2
- package/dist/workbench/launch.js +3 -3
- package/dist/workbench/providerCatalog.d.ts +2 -2
- package/dist/workbench/providerCatalog.js +1 -1
- package/dist/workbench/sessionTitle.d.ts +8 -12
- package/dist/workbench/sessionTitle.js +5 -7
- package/dist/workbench/state.js +2 -2
- package/dist/workbench/types.d.ts +2 -1
- package/dist/workbench/types.js +1 -1
- package/dist/workspace-agent-generated-files.js +6 -6
- package/package.json +19 -12
- package/dist/chunk-3R2D4E57.js.map +0 -1
- package/dist/chunk-7J4K6WKB.js +0 -66
- package/dist/chunk-7J4K6WKB.js.map +0 -1
- package/dist/chunk-7RDD3EWP.js.map +0 -1
- package/dist/chunk-AOS2VWU6.js.map +0 -1
- package/dist/chunk-BFNJKTDV.js.map +0 -1
- package/dist/chunk-C5FV4UGI.js.map +0 -1
- package/dist/chunk-CRO2MV2Y.js.map +0 -1
- package/dist/chunk-KAL4XZMA.js.map +0 -1
- package/dist/chunk-O6W72SEP.js.map +0 -1
- package/dist/chunk-RY6GIO3K.js.map +0 -1
- package/dist/chunk-UQJPV6HP.js.map +0 -1
- package/dist/chunk-VF22EG3F.js.map +0 -1
- package/dist/chunk-WEDMAVX2.js.map +0 -1
- package/dist/chunk-XMO45GKA.js.map +0 -1
- package/dist/chunk-YE25HN6T.js.map +0 -1
- package/dist/uiSettings-BQS9r2eo.d.ts +0 -6
- /package/dist/{chunk-BIHBXWK5.js.map → chunk-E4HQUTM3.js.map} +0 -0
- /package/dist/{chunk-NX3CZJXW.js.map → chunk-H5F3QSCF.js.map} +0 -0
- /package/dist/{chunk-7PFDA2HQ.js.map → chunk-O3Q5SIJH.js.map} +0 -0
- /package/dist/{chunk-NITOD7WF.js.map → chunk-QVBF5BN5.js.map} +0 -0
- /package/dist/{chunk-NJAZ7LQM.js.map → chunk-TVIGLNNI.js.map} +0 -0
|
@@ -31,7 +31,6 @@ var dockSuppressedProviderSet = new Set(
|
|
|
31
31
|
var comingSoonProviderSet = new Set(
|
|
32
32
|
agentGuiWorkbenchComingSoonProviders
|
|
33
33
|
);
|
|
34
|
-
var enabledWorkbenchProviderSet = new Set(agentGuiWorkbenchProviders);
|
|
35
34
|
var agentGuiWorkbenchLabelProviders = [
|
|
36
35
|
...agentGuiWorkbenchProviders,
|
|
37
36
|
"nexight"
|
|
@@ -46,7 +45,7 @@ var agentGuiWorkbenchProviderLabels = Object.fromEntries(
|
|
|
46
45
|
})
|
|
47
46
|
);
|
|
48
47
|
function resolveAgentGuiWorkbenchProviderLabel(provider) {
|
|
49
|
-
return agentGuiWorkbenchProviderLabels[provider];
|
|
48
|
+
return agentGuiWorkbenchProviderLabels[provider] ?? provider;
|
|
50
49
|
}
|
|
51
50
|
function isAgentGuiWorkbenchDefaultDockProvider(provider) {
|
|
52
51
|
return defaultDockProviderSet.has(provider);
|
|
@@ -58,10 +57,13 @@ function isAgentGuiWorkbenchComingSoonProvider(provider) {
|
|
|
58
57
|
return comingSoonProviderSet.has(provider);
|
|
59
58
|
}
|
|
60
59
|
function isAgentGuiWorkbenchProvider(value) {
|
|
61
|
-
return typeof value === "string" &&
|
|
60
|
+
return typeof value === "string" && /^[a-z][a-z0-9._:-]{0,127}$/.test(value.trim());
|
|
62
61
|
}
|
|
63
|
-
function normalizeAgentGuiWorkbenchProvider(value
|
|
64
|
-
|
|
62
|
+
function normalizeAgentGuiWorkbenchProvider(value) {
|
|
63
|
+
if (!isAgentGuiWorkbenchProvider(value)) {
|
|
64
|
+
throw new Error("agent_gui_workbench.invalid_provider");
|
|
65
|
+
}
|
|
66
|
+
return value.trim();
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
export {
|
|
@@ -77,4 +79,4 @@ export {
|
|
|
77
79
|
isAgentGuiWorkbenchProvider,
|
|
78
80
|
normalizeAgentGuiWorkbenchProvider
|
|
79
81
|
};
|
|
80
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-L3GMMGRS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../workbench/providerCatalog.ts"],"sourcesContent":["import type { AgentGuiWorkbenchProvider } from \"./types.ts\";\nimport { resolveAgentGUIProviderCatalogIdentity } from \"../providerIdentityCatalog.ts\";\n\nexport const agentGuiWorkbenchProviders = [\n \"claude-code\",\n \"codex\",\n \"cursor\",\n \"tutti-agent\",\n \"opencode\",\n \"hermes\",\n \"openclaw\"\n] as const satisfies readonly AgentGuiWorkbenchProvider[];\n\nexport const agentGuiWorkbenchDefaultDockProviders = [\n \"codex\",\n \"claude-code\",\n \"tutti-agent\"\n] as const satisfies readonly AgentGuiWorkbenchProvider[];\n\nexport const agentGuiWorkbenchDockSuppressedProviders = [\n \"hermes\",\n \"opencode\"\n] as const satisfies readonly AgentGuiWorkbenchProvider[];\n\nexport const agentGuiWorkbenchComingSoonProviders =\n [] as const satisfies readonly AgentGuiWorkbenchProvider[];\n\nconst defaultDockProviderSet = new Set<AgentGuiWorkbenchProvider>(\n agentGuiWorkbenchDefaultDockProviders\n);\nconst dockSuppressedProviderSet = new Set<AgentGuiWorkbenchProvider>(\n agentGuiWorkbenchDockSuppressedProviders\n);\nconst comingSoonProviderSet = new Set<AgentGuiWorkbenchProvider>(\n agentGuiWorkbenchComingSoonProviders\n);\nconst agentGuiWorkbenchLabelProviders = [\n ...agentGuiWorkbenchProviders,\n \"nexight\"\n] as const satisfies readonly AgentGuiWorkbenchProvider[];\n\nexport const agentGuiWorkbenchProviderLabels = Object.fromEntries(\n agentGuiWorkbenchLabelProviders.map((provider) => {\n const identity = resolveAgentGUIProviderCatalogIdentity(provider);\n if (!identity) {\n throw new Error(`Missing workbench provider identity for ${provider}`);\n }\n return [provider, identity.displayName];\n })\n) as Record<string, string>;\n\nexport function resolveAgentGuiWorkbenchProviderLabel(\n provider: AgentGuiWorkbenchProvider\n): string {\n return agentGuiWorkbenchProviderLabels[provider] ?? provider;\n}\n\nexport function isAgentGuiWorkbenchDefaultDockProvider(\n provider: AgentGuiWorkbenchProvider\n): boolean {\n return defaultDockProviderSet.has(provider);\n}\n\nexport function isAgentGuiWorkbenchDockSuppressedProvider(\n provider: AgentGuiWorkbenchProvider\n): boolean {\n return dockSuppressedProviderSet.has(provider);\n}\n\nexport function isAgentGuiWorkbenchComingSoonProvider(\n provider: AgentGuiWorkbenchProvider\n): boolean {\n return comingSoonProviderSet.has(provider);\n}\n\nexport function isAgentGuiWorkbenchProvider(\n value: unknown\n): value is AgentGuiWorkbenchProvider {\n return (\n typeof value === \"string\" && /^[a-z][a-z0-9._:-]{0,127}$/.test(value.trim())\n );\n}\n\nexport function normalizeAgentGuiWorkbenchProvider(\n value: unknown\n): AgentGuiWorkbenchProvider {\n if (!isAgentGuiWorkbenchProvider(value)) {\n throw new Error(\"agent_gui_workbench.invalid_provider\");\n }\n return value.trim();\n}\n"],"mappings":";;;;;AAGO,IAAM,6BAA6B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,wCAAwC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,2CAA2C;AAAA,EACtD;AAAA,EACA;AACF;AAEO,IAAM,uCACX,CAAC;AAEH,IAAM,yBAAyB,IAAI;AAAA,EACjC;AACF;AACA,IAAM,4BAA4B,IAAI;AAAA,EACpC;AACF;AACA,IAAM,wBAAwB,IAAI;AAAA,EAChC;AACF;AACA,IAAM,kCAAkC;AAAA,EACtC,GAAG;AAAA,EACH;AACF;AAEO,IAAM,kCAAkC,OAAO;AAAA,EACpD,gCAAgC,IAAI,CAAC,aAAa;AAChD,UAAM,WAAW,uCAAuC,QAAQ;AAChE,QAAI,CAAC,UAAU;AACb,YAAM,IAAI,MAAM,2CAA2C,QAAQ,EAAE;AAAA,IACvE;AACA,WAAO,CAAC,UAAU,SAAS,WAAW;AAAA,EACxC,CAAC;AACH;AAEO,SAAS,sCACd,UACQ;AACR,SAAO,gCAAgC,QAAQ,KAAK;AACtD;AAEO,SAAS,uCACd,UACS;AACT,SAAO,uBAAuB,IAAI,QAAQ;AAC5C;AAEO,SAAS,0CACd,UACS;AACT,SAAO,0BAA0B,IAAI,QAAQ;AAC/C;AAEO,SAAS,sCACd,UACS;AACT,SAAO,sBAAsB,IAAI,QAAQ;AAC3C;AAEO,SAAS,4BACd,OACoC;AACpC,SACE,OAAO,UAAU,YAAY,6BAA6B,KAAK,MAAM,KAAK,CAAC;AAE/E;AAEO,SAAS,mCACd,OAC2B;AAC3B,MAAI,CAAC,4BAA4B,KAAK,GAAG;AACvC,UAAM,IAAI,MAAM,sCAAsC;AAAA,EACxD;AACA,SAAO,MAAM,KAAK;AACpB;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../agentActivityRuntime.tsx","../agentActivityHost.tsx","../host/agentHostApi.ts","../shared/managedAgentIcons.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\";\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 limit?: number;\n query?: string;\n sessionCwd?: 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 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 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 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 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 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 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 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 { agentColorfulUrl } from \"../managedAgentIconAssets.ts\";\nimport { migratedAgentGUIProviderIdentityCatalog } from \"../providerIdentityCatalog.ts\";\nimport { createProviderIconUrlMap } from \"../providerIconAssets.ts\";\nimport { normalizeManagedAgentProvider } from \"./managedAgentProviders\";\n\n// `tutti` is a historical presentation alias rather than a provider id.\nconst managedAgentPresentationIconAliases = {\n tutti: \"tutti\"\n} as const;\n\n/** Square avatar art for the managed toolchain agents (used by Manage Agents and Launch home Agents floor). */\nexport const MANAGED_AGENT_ICON_URLS: Record<string, string> =\n createProviderIconUrlMap(\n \"manage\",\n managedAgentPresentationIconAliases,\n migratedAgentGUIProviderIdentityCatalog\n );\n\n/** Colorful provider rail icons used by AgentGUI's left provider filter. */\nexport const MANAGED_AGENT_PROVIDER_RAIL_ICON_URLS: Record<string, string> =\n createProviderIconUrlMap(\n \"providerRail\",\n managedAgentPresentationIconAliases,\n migratedAgentGUIProviderIdentityCatalog\n );\n\n/** Rounded avatars for Room status / room activity panel only. */\nexport const MANAGED_AGENT_ICON_ROUNDED_URLS: Record<string, string> =\n createProviderIconUrlMap(\n \"rounded\",\n managedAgentPresentationIconAliases,\n migratedAgentGUIProviderIdentityCatalog\n );\n\n/** Neutral artwork for UI surfaces that require a non-null fallback. */\nexport const MANAGED_AGENT_ICON_FALLBACK_URL = agentColorfulUrl;\n\nexport function managedAgentRoundedIconUrl(\n provider: string | undefined\n): string {\n return (\n MANAGED_AGENT_ICON_ROUNDED_URLS[normalizeManagedAgentProvider(provider)] ??\n MANAGED_AGENT_ICON_FALLBACK_URL\n );\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EAC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","useContext"]}
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./chunk-LUGELG5V.js";
|
|
5
5
|
import {
|
|
6
6
|
managedAgentRoundedIconUrl
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MASXZENX.js";
|
|
8
8
|
import {
|
|
9
9
|
translate,
|
|
10
10
|
useTranslation
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-E4HQUTM3.js";
|
|
12
12
|
import {
|
|
13
13
|
getAgentCustomMentionKind
|
|
14
14
|
} from "./chunk-5X7YDOC6.js";
|
|
@@ -1569,4 +1569,4 @@ export {
|
|
|
1569
1569
|
exitAgentFileMentionSuggestion,
|
|
1570
1570
|
createAgentFileMentionExtension
|
|
1571
1571
|
};
|
|
1572
|
-
//# sourceMappingURL=chunk-
|
|
1572
|
+
//# sourceMappingURL=chunk-O3Q5SIJH.js.map
|