@tutti-os/agent-gui 0.0.99 → 0.0.100
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/dist/{AgentGUI-Bkk2TRS0.d.ts → AgentGUI-DgBjACOL.d.ts} +12 -3
- package/dist/agent-conversation/index.d.ts +4 -4
- package/dist/agent-conversation/index.js +8 -9
- package/dist/agent-conversation/index.js.map +1 -1
- package/dist/agent-gui.d.ts +5 -4
- package/dist/agent-gui.js +19 -19
- package/dist/agent-message-center/index.d.ts +4 -6
- package/dist/agent-message-center/index.js +13 -52
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/agent-title-text.js +1 -1
- package/dist/{agentConversationVM-C335TR6S.d.ts → agentConversationVM-BzHZhwFP.d.ts} +1 -1
- package/dist/{agentGuiNodeTypes-DAsluxjv.d.ts → agentGuiNodeTypes-C-wBSM-Y.d.ts} +19 -4
- package/dist/app/renderer/agentactivity.css +141 -36
- package/dist/chunk-2RQM7PJN.js +16 -0
- package/dist/chunk-2RQM7PJN.js.map +1 -0
- package/dist/{chunk-FSKGEGGX.js → chunk-4E3QCW6L.js} +17 -3
- package/dist/chunk-4E3QCW6L.js.map +1 -0
- package/dist/{chunk-63BE6RGM.js → chunk-4YCCATI4.js} +14 -374
- package/dist/chunk-4YCCATI4.js.map +1 -0
- package/dist/{chunk-IYEXLOUE.js → chunk-4YVKAPKW.js} +5 -8
- package/dist/chunk-4YVKAPKW.js.map +1 -0
- package/dist/{chunk-PLCHNOXL.js → chunk-BQJOYTW2.js} +863 -679
- package/dist/chunk-BQJOYTW2.js.map +1 -0
- package/dist/{chunk-MRRICFWA.js → chunk-D7HMQLBO.js} +159 -55
- package/dist/chunk-D7HMQLBO.js.map +1 -0
- package/dist/{chunk-OTRZBTFQ.js → chunk-DWUVRWXD.js} +2 -2
- package/dist/{chunk-RHTZAODZ.js → chunk-E5AD46HP.js} +2 -2
- package/dist/{chunk-3NOJFKDV.js → chunk-EUW6VPIK.js} +414 -49
- package/dist/chunk-EUW6VPIK.js.map +1 -0
- package/dist/{chunk-Y35GDLP2.js → chunk-F5UR6EJG.js} +2 -17
- package/dist/chunk-F5UR6EJG.js.map +1 -0
- package/dist/{chunk-J7ZYAUPC.js → chunk-FAE7CXZO.js} +8 -6
- package/dist/chunk-FAE7CXZO.js.map +1 -0
- package/dist/{chunk-CPUEPDF7.js → chunk-GCW57WYQ.js} +646 -595
- package/dist/chunk-GCW57WYQ.js.map +1 -0
- package/dist/{chunk-7M77BK6K.js → chunk-JWHPVETQ.js} +154 -147
- package/dist/chunk-JWHPVETQ.js.map +1 -0
- package/dist/{chunk-4ROALW3K.js → chunk-KAV2WHTG.js} +82 -61
- package/dist/chunk-KAV2WHTG.js.map +1 -0
- package/dist/{chunk-T6PEJFRP.js → chunk-MES7BQWI.js} +378 -369
- package/dist/chunk-MES7BQWI.js.map +1 -0
- package/dist/chunk-MIJXEELH.js +96 -0
- package/dist/chunk-MIJXEELH.js.map +1 -0
- package/dist/{chunk-QWGJ5TEG.js → chunk-QY22OBJS.js} +28 -30
- package/dist/chunk-QY22OBJS.js.map +1 -0
- package/dist/{chunk-MASXZENX.js → chunk-UESYITH6.js} +21 -2
- package/dist/chunk-UESYITH6.js.map +1 -0
- package/dist/{chunk-SPZJCTBV.js → chunk-XFRY2WWB.js} +348 -322
- package/dist/chunk-XFRY2WWB.js.map +1 -0
- package/dist/context-mention-palette/index.d.ts +5 -1
- package/dist/context-mention-palette/index.js +10 -11
- package/dist/contribution-CTVBPN0R.d.ts +119 -0
- package/dist/i18n/index.d.ts +16 -2
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +8 -7
- package/dist/index.js +21 -20
- package/dist/index.js.map +1 -1
- package/dist/mention-search.d.ts +18 -6
- package/dist/mention-search.js +8 -9
- package/dist/workbench/contribution.d.ts +6 -107
- package/dist/workbench/contribution.js +7 -3
- package/dist/workbench/index.d.ts +6 -4
- package/dist/workbench/index.js +27 -21
- package/dist/workbench/launch.d.ts +13 -5
- package/dist/workbench/launch.js +1 -1
- package/dist/workbench/sessionTitle.d.ts +5 -7
- package/dist/workbench/sessionTitle.js +3 -4
- package/dist/workbench/state.js +3 -1
- package/dist/workspace-agent-generated-files.d.ts +8 -13
- package/dist/workspace-agent-generated-files.js +6 -21
- package/dist/{workspaceAgentActivityListTypes-C7gPWYiA.d.ts → workspaceAgentActivityListTypes-DZfS_HgG.d.ts} +3 -26
- package/package.json +12 -12
- package/dist/chunk-3NOJFKDV.js.map +0 -1
- package/dist/chunk-4ROALW3K.js.map +0 -1
- package/dist/chunk-63BE6RGM.js.map +0 -1
- package/dist/chunk-7M77BK6K.js.map +0 -1
- package/dist/chunk-CPUEPDF7.js.map +0 -1
- package/dist/chunk-FSKGEGGX.js.map +0 -1
- package/dist/chunk-GAD6Y3BF.js +0 -88
- package/dist/chunk-GAD6Y3BF.js.map +0 -1
- package/dist/chunk-GCBDIQDX.js +0 -22
- package/dist/chunk-GCBDIQDX.js.map +0 -1
- package/dist/chunk-IYEXLOUE.js.map +0 -1
- package/dist/chunk-J7ZYAUPC.js.map +0 -1
- package/dist/chunk-MASXZENX.js.map +0 -1
- package/dist/chunk-MRRICFWA.js.map +0 -1
- package/dist/chunk-PLCHNOXL.js.map +0 -1
- package/dist/chunk-QWGJ5TEG.js.map +0 -1
- package/dist/chunk-SPZJCTBV.js.map +0 -1
- package/dist/chunk-T6PEJFRP.js.map +0 -1
- package/dist/chunk-Y35GDLP2.js.map +0 -1
- package/dist/chunk-Y5M6Q6WX.js +0 -25
- package/dist/chunk-Y5M6Q6WX.js.map +0 -1
- /package/dist/{chunk-OTRZBTFQ.js.map → chunk-DWUVRWXD.js.map} +0 -0
- /package/dist/{chunk-RHTZAODZ.js.map → chunk-E5AD46HP.js.map} +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// shared/utils/agentTitleText.ts
|
|
2
|
+
function normalizeAgentTitleText(value) {
|
|
3
|
+
const trimmed = value?.trim() ?? "";
|
|
4
|
+
if (!trimmed) {
|
|
5
|
+
return "";
|
|
6
|
+
}
|
|
7
|
+
let normalized = "";
|
|
8
|
+
for (let index = 0; index < trimmed.length; ) {
|
|
9
|
+
const link = markdownLinkAt(trimmed, index);
|
|
10
|
+
if (!link) {
|
|
11
|
+
normalized += trimmed[index];
|
|
12
|
+
index += 1;
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
normalized += unescapeMarkdownLabel(
|
|
16
|
+
trimmed.slice(link.labelStart, link.labelEnd)
|
|
17
|
+
);
|
|
18
|
+
index = link.hrefEnd + 1;
|
|
19
|
+
}
|
|
20
|
+
return normalized.replace(/\s+/gu, " ").trim();
|
|
21
|
+
}
|
|
22
|
+
function unescapeMarkdownLabel(label) {
|
|
23
|
+
let normalized = "";
|
|
24
|
+
let escaped = false;
|
|
25
|
+
for (const character of label) {
|
|
26
|
+
if (escaped) {
|
|
27
|
+
normalized += "\\[]()".includes(character) ? character : `\\${character}`;
|
|
28
|
+
escaped = false;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (character === "\\") {
|
|
32
|
+
escaped = true;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
normalized += character;
|
|
36
|
+
}
|
|
37
|
+
return escaped ? `${normalized}\\` : normalized;
|
|
38
|
+
}
|
|
39
|
+
function markdownLinkAt(value, start) {
|
|
40
|
+
if (value[start] !== "[") {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const labelEnd = findUnescaped(value, start + 1, "]");
|
|
44
|
+
if (labelEnd < 0 || value[labelEnd + 1] !== "(") {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const hrefEnd = findBalancedHrefEnd(value, labelEnd + 2);
|
|
48
|
+
return hrefEnd < 0 ? null : { hrefEnd, labelEnd, labelStart: start + 1 };
|
|
49
|
+
}
|
|
50
|
+
function findUnescaped(value, start, target) {
|
|
51
|
+
let escaped = false;
|
|
52
|
+
for (let index = start; index < value.length; index += 1) {
|
|
53
|
+
if (escaped) {
|
|
54
|
+
escaped = false;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (value[index] === "\\") {
|
|
58
|
+
escaped = true;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (value[index] === target) {
|
|
62
|
+
return index;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return -1;
|
|
66
|
+
}
|
|
67
|
+
function findBalancedHrefEnd(value, start) {
|
|
68
|
+
let depth = 0;
|
|
69
|
+
let escaped = false;
|
|
70
|
+
for (let index = start; index < value.length; index += 1) {
|
|
71
|
+
if (escaped) {
|
|
72
|
+
escaped = false;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
switch (value[index]) {
|
|
76
|
+
case "\\":
|
|
77
|
+
escaped = true;
|
|
78
|
+
break;
|
|
79
|
+
case "(":
|
|
80
|
+
depth += 1;
|
|
81
|
+
break;
|
|
82
|
+
case ")":
|
|
83
|
+
if (depth === 0) {
|
|
84
|
+
return index;
|
|
85
|
+
}
|
|
86
|
+
depth -= 1;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return -1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
normalizeAgentTitleText
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=chunk-MIJXEELH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../shared/utils/agentTitleText.ts"],"sourcesContent":["export function normalizeAgentTitleText(\n value: string | null | undefined\n): string {\n const trimmed = value?.trim() ?? \"\";\n if (!trimmed) {\n return \"\";\n }\n let normalized = \"\";\n for (let index = 0; index < trimmed.length; ) {\n const link = markdownLinkAt(trimmed, index);\n if (!link) {\n normalized += trimmed[index];\n index += 1;\n continue;\n }\n normalized += unescapeMarkdownLabel(\n trimmed.slice(link.labelStart, link.labelEnd)\n );\n index = link.hrefEnd + 1;\n }\n return normalized.replace(/\\s+/gu, \" \").trim();\n}\n\nfunction unescapeMarkdownLabel(label: string): string {\n let normalized = \"\";\n let escaped = false;\n for (const character of label) {\n if (escaped) {\n normalized += \"\\\\[]()\".includes(character) ? character : `\\\\${character}`;\n escaped = false;\n continue;\n }\n if (character === \"\\\\\") {\n escaped = true;\n continue;\n }\n normalized += character;\n }\n return escaped ? `${normalized}\\\\` : normalized;\n}\n\nfunction markdownLinkAt(\n value: string,\n start: number\n): {\n hrefEnd: number;\n labelEnd: number;\n labelStart: number;\n} | null {\n if (value[start] !== \"[\") {\n return null;\n }\n const labelEnd = findUnescaped(value, start + 1, \"]\");\n if (labelEnd < 0 || value[labelEnd + 1] !== \"(\") {\n return null;\n }\n const hrefEnd = findBalancedHrefEnd(value, labelEnd + 2);\n return hrefEnd < 0 ? null : { hrefEnd, labelEnd, labelStart: start + 1 };\n}\n\nfunction findUnescaped(value: string, start: number, target: string): number {\n let escaped = false;\n for (let index = start; index < value.length; index += 1) {\n if (escaped) {\n escaped = false;\n continue;\n }\n if (value[index] === \"\\\\\") {\n escaped = true;\n continue;\n }\n if (value[index] === target) {\n return index;\n }\n }\n return -1;\n}\n\nfunction findBalancedHrefEnd(value: string, start: number): number {\n let depth = 0;\n let escaped = false;\n for (let index = start; index < value.length; index += 1) {\n if (escaped) {\n escaped = false;\n continue;\n }\n switch (value[index]) {\n case \"\\\\\":\n escaped = true;\n break;\n case \"(\":\n depth += 1;\n break;\n case \")\":\n if (depth === 0) {\n return index;\n }\n depth -= 1;\n break;\n }\n }\n return -1;\n}\n"],"mappings":";AAAO,SAAS,wBACd,OACQ;AACR,QAAM,UAAU,OAAO,KAAK,KAAK;AACjC,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACT;AACA,MAAI,aAAa;AACjB,WAAS,QAAQ,GAAG,QAAQ,QAAQ,UAAU;AAC5C,UAAM,OAAO,eAAe,SAAS,KAAK;AAC1C,QAAI,CAAC,MAAM;AACT,oBAAc,QAAQ,KAAK;AAC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AAQ,MAAM,QAAQ,SAAS,GAAG;AACxD,QAAI,SAAS;AACX,gBAAU;AACV;AAAA,IACF;AACA,YAAQ,MAAM,KAAK,GAAG;AAAA,MACpB,KAAK;AACH,kBAAU;AACV;AAAA,MACF,KAAK;AACH,iBAAS;AACT;AAAA,MACF,KAAK;AACH,YAAI,UAAU,GAAG;AACf,iBAAO;AAAA,QACT;AACA,iBAAS;AACT;AAAA,IACJ;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
|
@@ -13,14 +13,16 @@ var agentGuiWorkbenchDockEntryPrefix = "agent-gui:";
|
|
|
13
13
|
var agentGuiWorkbenchUnifiedDockEntryIdValue = "agent-gui:unified";
|
|
14
14
|
var agentGuiWorkbenchDockPopupNewWindowLaunchSource = "dock-popup-new-window";
|
|
15
15
|
var agentGuiWorkbenchInstanceSequence = 0;
|
|
16
|
-
function agentGuiWorkbenchDockEntryId(
|
|
17
|
-
return
|
|
16
|
+
function agentGuiWorkbenchDockEntryId(_provider) {
|
|
17
|
+
return agentGuiWorkbenchUnifiedDockEntryId();
|
|
18
18
|
}
|
|
19
19
|
function agentGuiWorkbenchUnifiedDockEntryId() {
|
|
20
20
|
return agentGuiWorkbenchUnifiedDockEntryIdValue;
|
|
21
21
|
}
|
|
22
22
|
function agentGuiWorkbenchInstanceId(provider) {
|
|
23
|
-
return `${agentGuiWorkbenchDockEntryPrefix}${
|
|
23
|
+
return `${agentGuiWorkbenchDockEntryPrefix}${encodeAgentGuiWorkbenchInstanceSegment(
|
|
24
|
+
provider
|
|
25
|
+
)}`;
|
|
24
26
|
}
|
|
25
27
|
function createAgentGuiWorkbenchInstanceId(input) {
|
|
26
28
|
const prefix = agentGuiWorkbenchInstanceId(input.provider);
|
|
@@ -51,7 +53,12 @@ function agentGuiWorkbenchProviderFromIdentifier(value) {
|
|
|
51
53
|
if (!normalized?.startsWith(agentGuiWorkbenchDockEntryPrefix)) {
|
|
52
54
|
return null;
|
|
53
55
|
}
|
|
54
|
-
const
|
|
56
|
+
const identifier = normalized.slice(agentGuiWorkbenchDockEntryPrefix.length);
|
|
57
|
+
const structuredSuffix = identifier.match(
|
|
58
|
+
/:(?:panel|session|target):[^:]*$/u
|
|
59
|
+
);
|
|
60
|
+
const encodedProvider = structuredSuffix ? identifier.slice(0, structuredSuffix.index) : identifier;
|
|
61
|
+
const provider = decodeAgentGuiWorkbenchInstanceSegment(encodedProvider);
|
|
55
62
|
return isAgentGuiWorkbenchProvider(provider) ? provider : null;
|
|
56
63
|
}
|
|
57
64
|
function agentGuiWorkbenchDockIdentityFromIdentifier(value) {
|
|
@@ -62,9 +69,6 @@ function agentGuiWorkbenchDockIdentityFromIdentifier(value) {
|
|
|
62
69
|
if (normalized === agentGuiWorkbenchUnifiedDockEntryId()) {
|
|
63
70
|
return { kind: "unifiedAggregate" };
|
|
64
71
|
}
|
|
65
|
-
if (normalized === agentGuiWorkbenchTypeId) {
|
|
66
|
-
return { kind: "unifiedAggregate" };
|
|
67
|
-
}
|
|
68
72
|
return null;
|
|
69
73
|
}
|
|
70
74
|
function agentGuiWorkbenchProviderFromLaunchRequest(request) {
|
|
@@ -72,16 +76,12 @@ function agentGuiWorkbenchProviderFromLaunchRequest(request) {
|
|
|
72
76
|
if (isAgentGuiWorkbenchProvider(payloadProvider)) {
|
|
73
77
|
return payloadProvider;
|
|
74
78
|
}
|
|
75
|
-
|
|
76
|
-
if (!provider) {
|
|
77
|
-
throw new Error("agent_gui_workbench.launch_provider_required");
|
|
78
|
-
}
|
|
79
|
-
return provider;
|
|
79
|
+
throw new Error("agent_gui_workbench.launch_provider_required");
|
|
80
80
|
}
|
|
81
81
|
function createAgentGuiWorkbenchSessionLaunchRequest(input) {
|
|
82
82
|
const provider = normalizeAgentGuiWorkbenchProvider(input.provider);
|
|
83
83
|
return {
|
|
84
|
-
dockEntryId:
|
|
84
|
+
dockEntryId: agentGuiWorkbenchUnifiedDockEntryId(),
|
|
85
85
|
payload: {
|
|
86
86
|
...input.agentTargetId?.trim() ? { agentTargetId: input.agentTargetId.trim() } : {},
|
|
87
87
|
...input.agentSessionId ? { agentSessionId: input.agentSessionId } : {},
|
|
@@ -98,7 +98,7 @@ function createAgentGuiWorkbenchDraftLaunchRequest(input) {
|
|
|
98
98
|
input.userProjectPath
|
|
99
99
|
);
|
|
100
100
|
return {
|
|
101
|
-
dockEntryId:
|
|
101
|
+
dockEntryId: agentGuiWorkbenchUnifiedDockEntryId(),
|
|
102
102
|
payload: {
|
|
103
103
|
draftPrompt: input.draftPrompt,
|
|
104
104
|
provider,
|
|
@@ -113,10 +113,7 @@ function createAgentGuiWorkbenchDraftLaunchRequest(input) {
|
|
|
113
113
|
}
|
|
114
114
|
function createAgentGuiWorkbenchLaunchDescriptor(request) {
|
|
115
115
|
const provider = agentGuiWorkbenchProviderFromLaunchRequest(request);
|
|
116
|
-
const dockEntryId =
|
|
117
|
-
provider,
|
|
118
|
-
requestedDockEntryId: request.dockEntryId
|
|
119
|
-
});
|
|
116
|
+
const dockEntryId = agentGuiWorkbenchUnifiedDockEntryId();
|
|
120
117
|
const prefillPrompt = prefillPromptFromLaunchPayload(request.payload);
|
|
121
118
|
if (prefillPrompt) {
|
|
122
119
|
const openInNewWindow2 = openInNewWindowFromLaunchPayload(request.payload);
|
|
@@ -166,15 +163,6 @@ function createAgentGuiWorkbenchLaunchDescriptor(request) {
|
|
|
166
163
|
targetAgentSessionId
|
|
167
164
|
};
|
|
168
165
|
}
|
|
169
|
-
function resolveAgentGuiWorkbenchLaunchDockEntryId(input) {
|
|
170
|
-
const requestedIdentity = agentGuiWorkbenchDockIdentityFromIdentifier(
|
|
171
|
-
input.requestedDockEntryId
|
|
172
|
-
);
|
|
173
|
-
if (requestedIdentity?.kind === "unifiedAggregate") {
|
|
174
|
-
return agentGuiWorkbenchUnifiedDockEntryId();
|
|
175
|
-
}
|
|
176
|
-
return agentGuiWorkbenchDockEntryId(input.provider);
|
|
177
|
-
}
|
|
178
166
|
function shouldReuseAgentGuiWorkbenchDockEntryNode(input) {
|
|
179
167
|
if (input.launchKind === "empty") {
|
|
180
168
|
return true;
|
|
@@ -184,9 +172,19 @@ function shouldReuseAgentGuiWorkbenchDockEntryNode(input) {
|
|
|
184
172
|
}
|
|
185
173
|
return agentGuiWorkbenchDockIdentityFromIdentifier(input.dockEntryId)?.kind !== "unifiedAggregate";
|
|
186
174
|
}
|
|
175
|
+
function resolveAgentGuiWorkbenchLaunchDockEntryId(_input) {
|
|
176
|
+
return agentGuiWorkbenchUnifiedDockEntryId();
|
|
177
|
+
}
|
|
187
178
|
function encodeAgentGuiWorkbenchInstanceSegment(value) {
|
|
188
179
|
return encodeURIComponent(value.trim());
|
|
189
180
|
}
|
|
181
|
+
function decodeAgentGuiWorkbenchInstanceSegment(value) {
|
|
182
|
+
try {
|
|
183
|
+
return decodeURIComponent(value).trim();
|
|
184
|
+
} catch {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
190
188
|
function prefillPromptFromLaunchPayload(payload) {
|
|
191
189
|
if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
|
|
192
190
|
return null;
|
|
@@ -248,7 +246,7 @@ export {
|
|
|
248
246
|
createAgentGuiWorkbenchSessionLaunchRequest,
|
|
249
247
|
createAgentGuiWorkbenchDraftLaunchRequest,
|
|
250
248
|
createAgentGuiWorkbenchLaunchDescriptor,
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
shouldReuseAgentGuiWorkbenchDockEntryNode,
|
|
250
|
+
resolveAgentGuiWorkbenchLaunchDockEntryId
|
|
253
251
|
};
|
|
254
|
-
//# sourceMappingURL=chunk-
|
|
252
|
+
//# sourceMappingURL=chunk-QY22OBJS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../workbench/launch.ts"],"sourcesContent":["import type { WorkbenchHostLaunchRequest } from \"@tutti-os/workbench-surface\";\nimport {\n isAgentGuiWorkbenchProvider,\n normalizeAgentGuiWorkbenchProvider\n} from \"./providerCatalog.ts\";\nimport {\n agentGuiWorkbenchOpenSessionActivationType,\n agentGuiWorkbenchPrefillPromptActivationType,\n type AgentGuiWorkbenchPrefillPromptPayload,\n type AgentGuiWorkbenchProvider\n} from \"./types.ts\";\n\nexport { agentGuiWorkbenchPrefillPromptActivationType } from \"./types.ts\";\n\ntype AgentGuiWorkbenchLaunchRequestInput = Pick<\n WorkbenchHostLaunchRequest,\n \"launchSource\" | \"payload\" | \"typeId\"\n> & {\n dockEntryId?: string | null;\n};\n\nexport const agentGuiWorkbenchTypeId = \"agent-gui\";\n\nconst agentGuiWorkbenchDockEntryPrefix = \"agent-gui:\";\nconst agentGuiWorkbenchUnifiedDockEntryIdValue = \"agent-gui:unified\";\nconst agentGuiWorkbenchDockPopupNewWindowLaunchSource = \"dock-popup-new-window\";\nlet agentGuiWorkbenchInstanceSequence = 0;\n\nexport interface AgentGuiWorkbenchDockIdentity {\n kind: \"unifiedAggregate\";\n}\n\n/**\n * @deprecated AgentGUI has one canonical Dock entry. Use\n * {@link agentGuiWorkbenchUnifiedDockEntryId} instead.\n */\nexport function agentGuiWorkbenchDockEntryId(\n _provider: AgentGuiWorkbenchProvider\n): string {\n return agentGuiWorkbenchUnifiedDockEntryId();\n}\n\nexport function agentGuiWorkbenchUnifiedDockEntryId(): string {\n return agentGuiWorkbenchUnifiedDockEntryIdValue;\n}\n\nexport function agentGuiWorkbenchInstanceId(\n provider: AgentGuiWorkbenchProvider\n): string {\n return `${agentGuiWorkbenchDockEntryPrefix}${encodeAgentGuiWorkbenchInstanceSegment(\n provider\n )}`;\n}\n\nexport function createAgentGuiWorkbenchInstanceId(input: {\n agentSessionId?: string | null;\n agentTargetId?: string | null;\n provider: AgentGuiWorkbenchProvider;\n}): string {\n const prefix = agentGuiWorkbenchInstanceId(input.provider);\n const agentSessionId = input.agentSessionId?.trim();\n if (agentSessionId) {\n return `${prefix}:session:${encodeAgentGuiWorkbenchInstanceSegment(\n agentSessionId\n )}`;\n }\n const agentTargetId = input.agentTargetId?.trim();\n if (agentTargetId) {\n return `${prefix}:target:${encodeAgentGuiWorkbenchInstanceSegment(\n agentTargetId\n )}`;\n }\n\n agentGuiWorkbenchInstanceSequence += 1;\n return [\n prefix,\n \"panel\",\n `${Date.now().toString(36)}-${agentGuiWorkbenchInstanceSequence.toString(36)}`\n ].join(\":\");\n}\n\nexport function agentGuiWorkbenchProviderFromIdentifier(\n value: string | null | undefined\n): AgentGuiWorkbenchProvider | null {\n if (agentGuiWorkbenchDockIdentityFromIdentifier(value)) {\n return null;\n }\n const normalized = value?.trim();\n if (!normalized?.startsWith(agentGuiWorkbenchDockEntryPrefix)) {\n return null;\n }\n const identifier = normalized.slice(agentGuiWorkbenchDockEntryPrefix.length);\n const structuredSuffix = identifier.match(\n /:(?:panel|session|target):[^:]*$/u\n );\n const encodedProvider = structuredSuffix\n ? identifier.slice(0, structuredSuffix.index)\n : identifier;\n const provider = decodeAgentGuiWorkbenchInstanceSegment(encodedProvider);\n return isAgentGuiWorkbenchProvider(provider) ? provider : null;\n}\n\nexport function agentGuiWorkbenchDockIdentityFromIdentifier(\n value: string | null | undefined\n): AgentGuiWorkbenchDockIdentity | null {\n const normalized = value?.trim();\n if (!normalized) {\n return null;\n }\n if (normalized === agentGuiWorkbenchUnifiedDockEntryId()) {\n return { kind: \"unifiedAggregate\" };\n }\n return null;\n}\n\nexport function agentGuiWorkbenchProviderFromLaunchRequest(\n request: AgentGuiWorkbenchLaunchRequestInput\n): AgentGuiWorkbenchProvider {\n const payloadProvider =\n request.payload &&\n typeof request.payload === \"object\" &&\n !Array.isArray(request.payload)\n ? (request.payload as { provider?: unknown }).provider\n : null;\n if (isAgentGuiWorkbenchProvider(payloadProvider)) {\n return payloadProvider;\n }\n throw new Error(\"agent_gui_workbench.launch_provider_required\");\n}\n\nexport function createAgentGuiWorkbenchSessionLaunchRequest(input: {\n agentTargetId?: string | null;\n agentSessionId?: string;\n openInNewWindow?: boolean;\n provider: unknown;\n}) {\n const provider = normalizeAgentGuiWorkbenchProvider(input.provider);\n return {\n dockEntryId: agentGuiWorkbenchUnifiedDockEntryId(),\n payload: {\n ...(input.agentTargetId?.trim()\n ? { agentTargetId: input.agentTargetId.trim() }\n : {}),\n ...(input.agentSessionId ? { agentSessionId: input.agentSessionId } : {}),\n ...(input.openInNewWindow ? { openInNewWindow: true } : {}),\n provider\n },\n reason: \"host\" as const,\n typeId: agentGuiWorkbenchTypeId\n };\n}\n\nexport function createAgentGuiWorkbenchDraftLaunchRequest(input: {\n agentTargetId?: string | null;\n autoSubmit?: boolean;\n draftPrompt: string;\n openInNewWindow?: boolean;\n provider: unknown;\n userProjectPath?: string | null;\n}) {\n const provider = normalizeAgentGuiWorkbenchProvider(input.provider);\n const userProjectPath = normalizeAgentGuiWorkbenchUserProjectPath(\n input.userProjectPath\n );\n return {\n dockEntryId: agentGuiWorkbenchUnifiedDockEntryId(),\n payload: {\n draftPrompt: input.draftPrompt,\n provider,\n ...(input.agentTargetId?.trim()\n ? { agentTargetId: input.agentTargetId.trim() }\n : {}),\n ...(input.autoSubmit ? { autoSubmit: true } : {}),\n ...(input.openInNewWindow ? { openInNewWindow: true } : {}),\n ...(userProjectPath ? { userProjectPath } : {})\n },\n reason: \"host\" as const,\n typeId: agentGuiWorkbenchTypeId\n };\n}\n\nexport interface AgentGuiWorkbenchLaunchDescriptor {\n activation:\n | {\n payload: {\n agentSessionId: string;\n };\n type: typeof agentGuiWorkbenchOpenSessionActivationType;\n }\n | {\n payload: AgentGuiWorkbenchPrefillPromptPayload;\n type: typeof agentGuiWorkbenchPrefillPromptActivationType;\n }\n | null;\n dockEntryId: string;\n instanceId: string;\n openInNewWindow: boolean;\n provider: AgentGuiWorkbenchProvider;\n reuseDockEntryNode: boolean;\n reuseExistingSessionNode: boolean;\n targetAgentSessionId: string | null;\n}\n\nexport function createAgentGuiWorkbenchLaunchDescriptor(\n request: AgentGuiWorkbenchLaunchRequestInput\n): AgentGuiWorkbenchLaunchDescriptor {\n const provider = agentGuiWorkbenchProviderFromLaunchRequest(request);\n const dockEntryId = agentGuiWorkbenchUnifiedDockEntryId();\n const prefillPrompt = prefillPromptFromLaunchPayload(request.payload);\n if (prefillPrompt) {\n const openInNewWindow = openInNewWindowFromLaunchPayload(request.payload);\n return {\n activation: {\n payload: prefillPrompt,\n type: agentGuiWorkbenchPrefillPromptActivationType\n },\n dockEntryId,\n instanceId: createAgentGuiWorkbenchInstanceId({\n agentTargetId: openInNewWindow\n ? null\n : agentTargetIdFromLaunchPayload(request.payload),\n provider\n }),\n openInNewWindow,\n provider,\n reuseDockEntryNode:\n !openInNewWindow &&\n shouldReuseAgentGuiWorkbenchDockEntryNode({\n dockEntryId,\n launchKind: \"prefill\"\n }),\n reuseExistingSessionNode: !openInNewWindow,\n targetAgentSessionId: null\n };\n }\n\n const targetAgentSessionId = agentSessionIdFromLaunchPayload(request.payload);\n const openInNewWindow = openInNewWindowFromLaunchRequest(request);\n const instanceId = createAgentGuiWorkbenchInstanceId({\n agentSessionId: null,\n agentTargetId: openInNewWindow\n ? null\n : agentTargetIdFromLaunchPayload(request.payload),\n provider\n });\n\n return {\n activation: targetAgentSessionId\n ? {\n payload: {\n agentSessionId: targetAgentSessionId\n },\n type: agentGuiWorkbenchOpenSessionActivationType\n }\n : null,\n dockEntryId,\n instanceId,\n openInNewWindow,\n provider,\n reuseDockEntryNode:\n !openInNewWindow &&\n shouldReuseAgentGuiWorkbenchDockEntryNode({\n dockEntryId,\n launchKind: targetAgentSessionId ? \"session\" : \"empty\"\n }),\n reuseExistingSessionNode: !openInNewWindow,\n targetAgentSessionId\n };\n}\n\nexport function shouldReuseAgentGuiWorkbenchDockEntryNode(input: {\n dockEntryId: string;\n launchKind: \"empty\" | \"prefill\" | \"session\";\n}): boolean {\n if (input.launchKind === \"empty\") {\n return true;\n }\n if (input.launchKind === \"session\") {\n return false;\n }\n return (\n agentGuiWorkbenchDockIdentityFromIdentifier(input.dockEntryId)?.kind !==\n \"unifiedAggregate\"\n );\n}\n\n/**\n * @deprecated AgentGUI launch results always use the unified Dock entry. Use\n * {@link agentGuiWorkbenchUnifiedDockEntryId} instead.\n */\nexport function resolveAgentGuiWorkbenchLaunchDockEntryId(_input: {\n provider: AgentGuiWorkbenchProvider;\n requestedDockEntryId?: string | null;\n}): string {\n return agentGuiWorkbenchUnifiedDockEntryId();\n}\n\nfunction encodeAgentGuiWorkbenchInstanceSegment(value: string): string {\n return encodeURIComponent(value.trim());\n}\n\nfunction decodeAgentGuiWorkbenchInstanceSegment(value: string): string | null {\n try {\n return decodeURIComponent(value).trim();\n } catch {\n return null;\n }\n}\n\nfunction prefillPromptFromLaunchPayload(\n payload: unknown\n): AgentGuiWorkbenchPrefillPromptPayload | null {\n if (!payload || typeof payload !== \"object\" || Array.isArray(payload)) {\n return null;\n }\n const draftPrompt = (payload as { draftPrompt?: unknown }).draftPrompt;\n if (typeof draftPrompt !== \"string\" || !draftPrompt.trim()) {\n return null;\n }\n const autoSubmit = (payload as { autoSubmit?: unknown }).autoSubmit === true;\n const provider = (payload as { provider?: unknown }).provider;\n const agentTargetId = agentTargetIdFromLaunchPayload(payload);\n const userProjectPath = (payload as { userProjectPath?: unknown })\n .userProjectPath;\n const normalizedUserProjectPath =\n typeof userProjectPath === \"string\"\n ? normalizeAgentGuiWorkbenchUserProjectPath(userProjectPath)\n : null;\n return {\n draftPrompt,\n ...(agentTargetId ? { agentTargetId } : {}),\n ...(autoSubmit ? { autoSubmit: true } : {}),\n ...(isAgentGuiWorkbenchProvider(provider) ? { provider } : {}),\n ...(normalizedUserProjectPath\n ? { userProjectPath: normalizedUserProjectPath }\n : {})\n };\n}\n\nfunction normalizeAgentGuiWorkbenchUserProjectPath(\n value: string | null | undefined\n): string | null {\n const normalized = value?.trim().replaceAll(\"\\\\\", \"/\").replace(/\\/+$/, \"\");\n return normalized ? normalized : null;\n}\n\nfunction agentSessionIdFromLaunchPayload(payload: unknown): string | null {\n if (!payload || typeof payload !== \"object\" || Array.isArray(payload)) {\n return null;\n }\n const agentSessionId = (payload as { agentSessionId?: unknown })\n .agentSessionId;\n return typeof agentSessionId === \"string\" && agentSessionId.trim()\n ? agentSessionId.trim()\n : null;\n}\n\nfunction agentTargetIdFromLaunchPayload(payload: unknown): string | null {\n if (!payload || typeof payload !== \"object\" || Array.isArray(payload)) {\n return null;\n }\n const agentTargetId = (payload as { agentTargetId?: unknown }).agentTargetId;\n return typeof agentTargetId === \"string\" && agentTargetId.trim()\n ? agentTargetId.trim()\n : null;\n}\n\nfunction openInNewWindowFromLaunchPayload(payload: unknown): boolean {\n if (!payload || typeof payload !== \"object\" || Array.isArray(payload)) {\n return false;\n }\n return (payload as { openInNewWindow?: unknown }).openInNewWindow === true;\n}\n\nfunction openInNewWindowFromLaunchRequest(\n request: AgentGuiWorkbenchLaunchRequestInput\n): boolean {\n return (\n openInNewWindowFromLaunchPayload(request.payload) ||\n request.launchSource === agentGuiWorkbenchDockPopupNewWindowLaunchSource\n );\n}\n"],"mappings":";;;;;;;;;;AAqBO,IAAM,0BAA0B;AAEvC,IAAM,mCAAmC;AACzC,IAAM,2CAA2C;AACjD,IAAM,kDAAkD;AACxD,IAAI,oCAAoC;AAUjC,SAAS,6BACd,WACQ;AACR,SAAO,oCAAoC;AAC7C;AAEO,SAAS,sCAA8C;AAC5D,SAAO;AACT;AAEO,SAAS,4BACd,UACQ;AACR,SAAO,GAAG,gCAAgC,GAAG;AAAA,IAC3C;AAAA,EACF,CAAC;AACH;AAEO,SAAS,kCAAkC,OAIvC;AACT,QAAM,SAAS,4BAA4B,MAAM,QAAQ;AACzD,QAAM,iBAAiB,MAAM,gBAAgB,KAAK;AAClD,MAAI,gBAAgB;AAClB,WAAO,GAAG,MAAM,YAAY;AAAA,MAC1B;AAAA,IACF,CAAC;AAAA,EACH;AACA,QAAM,gBAAgB,MAAM,eAAe,KAAK;AAChD,MAAI,eAAe;AACjB,WAAO,GAAG,MAAM,WAAW;AAAA,MACzB;AAAA,IACF,CAAC;AAAA,EACH;AAEA,uCAAqC;AACrC,SAAO;AAAA,IACL;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Window"]}
|
|
@@ -2,7 +2,12 @@ import {
|
|
|
2
2
|
normalizeManagedAgentProvider
|
|
3
3
|
} from "./chunk-H6IQ63DQ.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
translate
|
|
6
|
+
} from "./chunk-E5AD46HP.js";
|
|
7
|
+
import {
|
|
8
|
+
agentGUIProviderIdentityDisplayName,
|
|
9
|
+
migratedAgentGUIProviderIdentityCatalog,
|
|
10
|
+
resolveMigratedAgentGUIProviderIdentity
|
|
6
11
|
} from "./chunk-KJQERFKX.js";
|
|
7
12
|
import {
|
|
8
13
|
agentColorfulUrl,
|
|
@@ -212,6 +217,19 @@ function managedAgentRoundedIconUrl(provider) {
|
|
|
212
217
|
return MANAGED_AGENT_ICON_ROUNDED_URLS[normalizeManagedAgentProvider(provider)] ?? MANAGED_AGENT_ICON_FALLBACK_URL;
|
|
213
218
|
}
|
|
214
219
|
|
|
220
|
+
// shared/workspaceAgentProviderLabel.ts
|
|
221
|
+
function workspaceAgentProviderLabel(provider) {
|
|
222
|
+
const normalized = provider.trim().toLowerCase();
|
|
223
|
+
const migratedIdentity = resolveMigratedAgentGUIProviderIdentity(normalized);
|
|
224
|
+
if (migratedIdentity) {
|
|
225
|
+
return agentGUIProviderIdentityDisplayName(migratedIdentity, translate);
|
|
226
|
+
}
|
|
227
|
+
return titleCase(provider);
|
|
228
|
+
}
|
|
229
|
+
function titleCase(value) {
|
|
230
|
+
return value.split(/[-_\s]+/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
231
|
+
}
|
|
232
|
+
|
|
215
233
|
export {
|
|
216
234
|
AgentActivityRuntimeProvider,
|
|
217
235
|
useAgentActivityRuntime,
|
|
@@ -223,9 +241,10 @@ export {
|
|
|
223
241
|
useAgentHostApi,
|
|
224
242
|
useOptionalAgentHostApi,
|
|
225
243
|
getOptionalAgentHostApi,
|
|
244
|
+
workspaceAgentProviderLabel,
|
|
226
245
|
MANAGED_AGENT_ICON_URLS,
|
|
227
246
|
MANAGED_AGENT_PROVIDER_RAIL_ICON_URLS,
|
|
228
247
|
MANAGED_AGENT_ICON_FALLBACK_URL,
|
|
229
248
|
managedAgentRoundedIconUrl
|
|
230
249
|
};
|
|
231
|
-
//# sourceMappingURL=chunk-
|
|
250
|
+
//# sourceMappingURL=chunk-UESYITH6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../agentActivityRuntime.tsx","../agentActivityHost.tsx","../host/agentHostApi.ts","../shared/managedAgentIcons.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\";\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 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","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":";;;;;;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAydH;AA5BJ,IAAM,8BAA8B;AAAA,EAClC;AACF;AAEA,SAAS,uCAGP;AACA,MAAI,UAAuC;AAC3C,SAAO;AAAA,IACL,KAAK,MAAM;AAAA,IACX,KAAK,CAAC,gBAAgB;AACpB,gBAAU;AAAA,IACZ;AAAA,EACF;AACF;AAEA,IAAM,iCAAiC,qCAAqC;AAMrE,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA;AACF,GAAmD;AACjD,SACE,oBAAC,4BAA4B,UAA5B,EAAqC,OAAO,WA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