@tutti-os/agent-gui 0.0.56 → 0.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/@-lined-14px-64O2KKB4.svg +3 -0
  2. package/dist/agent-conversation/index.d.ts +2 -2
  3. package/dist/agent-conversation/index.js +9 -8
  4. package/dist/agent-conversation/index.js.map +1 -1
  5. package/dist/agent-env/index.d.ts +285 -0
  6. package/dist/agent-env/index.js +360 -0
  7. package/dist/agent-env/index.js.map +1 -0
  8. package/dist/agent-message-center/index.js +11 -11
  9. package/dist/{agentGuiNodeTypes-DCnsaqJr.d.ts → agentGuiNodeTypes-BRU6P22B.d.ts} +2 -1
  10. package/dist/app/renderer/agentactivity.css +56 -36
  11. package/dist/app/renderer/assets/icons/@-lined-14px.svg +3 -0
  12. package/dist/{chunk-EVVIWZLX.js → chunk-2WUDORCV.js} +2 -2
  13. package/dist/{chunk-5PGMLZ4W.js → chunk-5SRRKWE4.js} +2 -2
  14. package/dist/{chunk-X4C4HD6E.js → chunk-BEFNWUOZ.js} +194 -159
  15. package/dist/chunk-BEFNWUOZ.js.map +1 -0
  16. package/dist/{chunk-PQYSB2WC.js → chunk-BT5WEZO5.js} +7 -7
  17. package/dist/{chunk-4URDQNBP.js → chunk-CEMXB7LA.js} +5 -5
  18. package/dist/{chunk-S6PCOX3S.js → chunk-HVU46DDA.js} +1 -1
  19. package/dist/chunk-HVU46DDA.js.map +1 -0
  20. package/dist/{chunk-54CMFCHF.js → chunk-IS6JUDDY.js} +39 -1
  21. package/dist/chunk-IS6JUDDY.js.map +1 -0
  22. package/dist/{chunk-VOXUYDQF.js → chunk-N756UO52.js} +11 -7
  23. package/dist/chunk-N756UO52.js.map +1 -0
  24. package/dist/{chunk-MXDPRBS6.js → chunk-NX6T3DDS.js} +3 -3
  25. package/dist/{chunk-752VTG4P.js → chunk-OFMORNBO.js} +5 -5
  26. package/dist/{chunk-SITURZG6.js → chunk-OLI2A3EM.js} +2 -2
  27. package/dist/chunk-PSLAWU25.js +145 -0
  28. package/dist/chunk-PSLAWU25.js.map +1 -0
  29. package/dist/{chunk-6QFURP4M.js → chunk-SLT5Q37C.js} +6 -6
  30. package/dist/{chunk-PQYMG6PQ.js → chunk-UCCUIUGK.js} +4 -4
  31. package/dist/context-mention-palette/index.js +7 -7
  32. package/dist/i18n/index.d.ts +38 -0
  33. package/dist/i18n/index.js +2 -2
  34. package/dist/index.d.ts +59 -4
  35. package/dist/index.js +802 -99
  36. package/dist/index.js.map +1 -1
  37. package/dist/queued-prompt-runtime.d.ts +2 -2
  38. package/dist/{types-B2m7UcBb.d.ts → types-BsHvTjIZ.d.ts} +8 -1
  39. package/dist/workbench/contribution.d.ts +1 -1
  40. package/dist/workbench/contribution.js +2 -2
  41. package/dist/workbench/index.d.ts +1 -1
  42. package/dist/workbench/index.js +14 -14
  43. package/dist/workbench/launch.d.ts +1 -1
  44. package/dist/workbench/providerCatalog.d.ts +1 -1
  45. package/dist/workbench/sessionTitle.d.ts +1 -1
  46. package/dist/workbench/sessionTitle.js +3 -3
  47. package/dist/workbench/state.d.ts +1 -1
  48. package/dist/workbench/types.d.ts +1 -1
  49. package/dist/workspace-agent-generated-files.js +3 -3
  50. package/package.json +19 -12
  51. package/dist/chunk-54CMFCHF.js.map +0 -1
  52. package/dist/chunk-S6PCOX3S.js.map +0 -1
  53. package/dist/chunk-VOXUYDQF.js.map +0 -1
  54. package/dist/chunk-X4C4HD6E.js.map +0 -1
  55. /package/dist/{chunk-EVVIWZLX.js.map → chunk-2WUDORCV.js.map} +0 -0
  56. /package/dist/{chunk-5PGMLZ4W.js.map → chunk-5SRRKWE4.js.map} +0 -0
  57. /package/dist/{chunk-PQYSB2WC.js.map → chunk-BT5WEZO5.js.map} +0 -0
  58. /package/dist/{chunk-4URDQNBP.js.map → chunk-CEMXB7LA.js.map} +0 -0
  59. /package/dist/{chunk-MXDPRBS6.js.map → chunk-NX6T3DDS.js.map} +0 -0
  60. /package/dist/{chunk-752VTG4P.js.map → chunk-OFMORNBO.js.map} +0 -0
  61. /package/dist/{chunk-SITURZG6.js.map → chunk-OLI2A3EM.js.map} +0 -0
  62. /package/dist/{chunk-6QFURP4M.js.map → chunk-SLT5Q37C.js.map} +0 -0
  63. /package/dist/{chunk-PQYMG6PQ.js.map → chunk-UCCUIUGK.js.map} +0 -0
@@ -0,0 +1,145 @@
1
+ // shared/agentEnv/agentEnvPanelStore.ts
2
+ import { useSnapshot } from "valtio";
3
+ import { proxy } from "valtio/vanilla";
4
+ var agentEnvPanelStore = proxy({
5
+ open: false,
6
+ provider: null,
7
+ focus: null,
8
+ requestSequence: 0
9
+ });
10
+ function openAgentEnvPanel(input) {
11
+ agentEnvPanelStore.open = true;
12
+ agentEnvPanelStore.provider = input?.provider ?? null;
13
+ agentEnvPanelStore.focus = input?.focus ?? null;
14
+ agentEnvPanelStore.requestSequence += 1;
15
+ }
16
+ function closeAgentEnvPanel() {
17
+ agentEnvPanelStore.open = false;
18
+ }
19
+ function getAgentEnvPanelStore() {
20
+ return agentEnvPanelStore;
21
+ }
22
+ function useAgentEnvPanelRequest() {
23
+ return useSnapshot(agentEnvPanelStore);
24
+ }
25
+
26
+ // shared/agentEnv/agentErrorPresentation.ts
27
+ var NO_CTA = { focus: null, actionKey: null };
28
+ var SELF_DETECT = {
29
+ messageKey: null,
30
+ focus: "detect",
31
+ actionKey: "agentHost.agentGui.visibleErrorActionDetect"
32
+ };
33
+ var PRESENTATIONS = {
34
+ // Environment problems the wizard can detect or repair → route to its step.
35
+ auth_required: {
36
+ messageKey: "agentHost.agentGui.visibleErrorAuthRequired",
37
+ focus: "auth",
38
+ actionKey: "agentHost.agentGui.visibleErrorActionRelogin"
39
+ },
40
+ cli_not_found: {
41
+ messageKey: "agentHost.agentGui.visibleErrorCliNotFound",
42
+ focus: "install",
43
+ actionKey: "agentHost.agentGui.visibleErrorActionInstall"
44
+ },
45
+ cli_version_unsupported: {
46
+ messageKey: "agentHost.agentGui.visibleErrorVersionUnsupported",
47
+ focus: "upgrade",
48
+ actionKey: "agentHost.agentGui.visibleErrorActionUpgrade"
49
+ },
50
+ network_error: {
51
+ messageKey: "agentHost.agentGui.visibleErrorNetwork",
52
+ focus: "network",
53
+ actionKey: "agentHost.agentGui.visibleErrorActionCheckNetwork"
54
+ },
55
+ runtime_unavailable: {
56
+ messageKey: "agentHost.agentGui.visibleErrorRuntimeUnavailable",
57
+ focus: "detect",
58
+ actionKey: "agentHost.agentGui.visibleErrorActionDetect"
59
+ },
60
+ // Transient / server-side failures: accurate copy, but no wizard CTA — it
61
+ // cannot fix a rate limit or a dropped stream.
62
+ request_timed_out: {
63
+ messageKey: "agentHost.agentGui.visibleErrorRequestTimedOut",
64
+ ...NO_CTA
65
+ },
66
+ provider_config_timeout: {
67
+ messageKey: "agentHost.agentGui.visibleErrorConfigTimeout",
68
+ ...NO_CTA
69
+ },
70
+ provider_stream_disconnected: {
71
+ messageKey: "agentHost.agentGui.visibleErrorStreamDisconnected",
72
+ ...NO_CTA
73
+ },
74
+ provider_concurrency_limit: {
75
+ messageKey: "agentHost.agentGui.visibleErrorConcurrencyLimit",
76
+ ...NO_CTA
77
+ },
78
+ quota_or_rate_limit: {
79
+ messageKey: "agentHost.agentGui.visibleErrorQuotaOrRateLimit",
80
+ ...NO_CTA
81
+ },
82
+ // Ambiguous hard failures → generic message + self-detect escape hatch.
83
+ process_exited: SELF_DETECT,
84
+ provider_error: SELF_DETECT,
85
+ unknown: SELF_DETECT
86
+ };
87
+ function resolveAgentErrorPresentation(code) {
88
+ if (!code) {
89
+ return null;
90
+ }
91
+ return PRESENTATIONS[code] ?? null;
92
+ }
93
+ var FAILED_MESSAGE_CODE_MARKERS = [
94
+ [
95
+ "auth_required",
96
+ [
97
+ "authentication_failed",
98
+ "invalid authentication credentials",
99
+ "401 invalid authentication",
100
+ "unauthorized",
101
+ "not logged in",
102
+ "please run /login",
103
+ "invalid api key"
104
+ ]
105
+ ],
106
+ [
107
+ "cli_version_unsupported",
108
+ ["requires a newer version", "version is too old", "unsupported version"]
109
+ ],
110
+ [
111
+ "cli_not_found",
112
+ [
113
+ "no such file or directory",
114
+ "command not found",
115
+ "enoent",
116
+ "executable file not found"
117
+ ]
118
+ ],
119
+ [
120
+ "network_error",
121
+ ["enotfound", "econnrefused", "econnreset", "getaddrinfo", "socket hang up"]
122
+ ]
123
+ ];
124
+ function classifyFailedAgentMessage(body) {
125
+ if (!body) {
126
+ return null;
127
+ }
128
+ const lower = body.toLowerCase();
129
+ for (const [code, markers] of FAILED_MESSAGE_CODE_MARKERS) {
130
+ if (markers.some((marker) => lower.includes(marker))) {
131
+ return code;
132
+ }
133
+ }
134
+ return null;
135
+ }
136
+
137
+ export {
138
+ openAgentEnvPanel,
139
+ closeAgentEnvPanel,
140
+ getAgentEnvPanelStore,
141
+ useAgentEnvPanelRequest,
142
+ resolveAgentErrorPresentation,
143
+ classifyFailedAgentMessage
144
+ };
145
+ //# sourceMappingURL=chunk-PSLAWU25.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../shared/agentEnv/agentEnvPanelStore.ts","../shared/agentEnv/agentErrorPresentation.ts"],"sourcesContent":["import { useSnapshot } from \"valtio\";\nimport { proxy } from \"valtio/vanilla\";\n\n/**\n * Section the Agent Env panel (the片6 Setup Wizard / config panel) should scroll\n * to / emphasise when opened via a deep-link. The error card (片5) maps a domain\n * error code to one of these so the user lands on the relevant remediation.\n */\nexport type AgentEnvPanelFocus =\n | \"detect\"\n | \"install\"\n | \"repair\"\n | \"upgrade\"\n | \"auth\"\n | \"network\"\n | \"registry\";\n\nexport interface AgentEnvPanelRequest {\n open: boolean;\n provider: string | null;\n focus: AgentEnvPanelFocus | null;\n /**\n * Bumped on every openAgentEnvPanel() call. The host panel watches this to\n * re-run detection even when it is already open (e.g. a second deep-link).\n */\n requestSequence: number;\n}\n\nexport interface OpenAgentEnvPanelInput {\n provider?: string | null;\n focus?: AgentEnvPanelFocus | null;\n}\n\nconst agentEnvPanelStore = proxy<AgentEnvPanelRequest>({\n open: false,\n provider: null,\n focus: null,\n requestSequence: 0\n});\n\n/**\n * Open the agent environment panel. Safe to call from anywhere in the agent-gui\n * tree (rail footer entry, error-card deep-link). The host renders the actual\n * panel and reacts to this singleton store.\n */\nexport function openAgentEnvPanel(input?: OpenAgentEnvPanelInput): void {\n agentEnvPanelStore.open = true;\n agentEnvPanelStore.provider = input?.provider ?? null;\n agentEnvPanelStore.focus = input?.focus ?? null;\n agentEnvPanelStore.requestSequence += 1;\n}\n\nexport function closeAgentEnvPanel(): void {\n agentEnvPanelStore.open = false;\n}\n\n/** Imperative read, mainly for tests. Components should use the hook. */\nexport function getAgentEnvPanelStore(): AgentEnvPanelRequest {\n return agentEnvPanelStore;\n}\n\n/** Reactive snapshot of the panel request for the host renderer. */\nexport function useAgentEnvPanelRequest(): AgentEnvPanelRequest {\n return useSnapshot(agentEnvPanelStore);\n}\n","import type { AgentEnvPanelFocus } from \"./agentEnvPanelStore\";\n\n/**\n * Run-failure codes actually emitted by the daemon runtime classifier\n * (packages/agent/daemon/runtime/visible_error.go `visibleFailureCode`). These\n * are the codes the conversation error card really receives — unlike the\n * aspirational `CODEX_*` codes, which the run pipeline never produces.\n *\n * Keep this union aligned with the Go switch in `visibleFailureCode`.\n */\nexport type AgentRunErrorCode =\n | \"auth_required\"\n | \"cli_not_found\"\n | \"cli_version_unsupported\"\n | \"network_error\"\n | \"runtime_unavailable\"\n | \"request_timed_out\"\n | \"provider_config_timeout\"\n | \"provider_stream_disconnected\"\n | \"provider_concurrency_limit\"\n | \"quota_or_rate_limit\"\n | \"process_exited\"\n | \"provider_error\"\n | \"unknown\";\n\nexport interface AgentErrorPresentation {\n /**\n * i18n key for the one human sentence shown in the card, or null to let the\n * caller fall back to its phase-aware generic title.\n */\n messageKey: string | null;\n /**\n * Env-panel section the remediation button deep-links to, or null when the\n * failure is transient/server-side and the wizard cannot fix it — in which\n * case no call-to-action is shown (showing one would misrepresent reality).\n */\n focus: AgentEnvPanelFocus | null;\n /** i18n key for the remediation button. Only meaningful when `focus` is set. */\n actionKey: string | null;\n}\n\nconst NO_CTA = { focus: null, actionKey: null } as const;\n\n// The escape hatch for hard failures whose cause is ambiguous from the message\n// alone (a non-zero exit, an unclassified provider error): send the user into\n// the wizard to self-detect, but keep the generic message.\nconst SELF_DETECT = {\n messageKey: null,\n focus: \"detect\" as const,\n actionKey: \"agentHost.agentGui.visibleErrorActionDetect\"\n};\n\nconst PRESENTATIONS: Record<AgentRunErrorCode, AgentErrorPresentation> = {\n // Environment problems the wizard can detect or repair → route to its step.\n auth_required: {\n messageKey: \"agentHost.agentGui.visibleErrorAuthRequired\",\n focus: \"auth\",\n actionKey: \"agentHost.agentGui.visibleErrorActionRelogin\"\n },\n cli_not_found: {\n messageKey: \"agentHost.agentGui.visibleErrorCliNotFound\",\n focus: \"install\",\n actionKey: \"agentHost.agentGui.visibleErrorActionInstall\"\n },\n cli_version_unsupported: {\n messageKey: \"agentHost.agentGui.visibleErrorVersionUnsupported\",\n focus: \"upgrade\",\n actionKey: \"agentHost.agentGui.visibleErrorActionUpgrade\"\n },\n network_error: {\n messageKey: \"agentHost.agentGui.visibleErrorNetwork\",\n focus: \"network\",\n actionKey: \"agentHost.agentGui.visibleErrorActionCheckNetwork\"\n },\n runtime_unavailable: {\n messageKey: \"agentHost.agentGui.visibleErrorRuntimeUnavailable\",\n focus: \"detect\",\n actionKey: \"agentHost.agentGui.visibleErrorActionDetect\"\n },\n // Transient / server-side failures: accurate copy, but no wizard CTA — it\n // cannot fix a rate limit or a dropped stream.\n request_timed_out: {\n messageKey: \"agentHost.agentGui.visibleErrorRequestTimedOut\",\n ...NO_CTA\n },\n provider_config_timeout: {\n messageKey: \"agentHost.agentGui.visibleErrorConfigTimeout\",\n ...NO_CTA\n },\n provider_stream_disconnected: {\n messageKey: \"agentHost.agentGui.visibleErrorStreamDisconnected\",\n ...NO_CTA\n },\n provider_concurrency_limit: {\n messageKey: \"agentHost.agentGui.visibleErrorConcurrencyLimit\",\n ...NO_CTA\n },\n quota_or_rate_limit: {\n messageKey: \"agentHost.agentGui.visibleErrorQuotaOrRateLimit\",\n ...NO_CTA\n },\n // Ambiguous hard failures → generic message + self-detect escape hatch.\n process_exited: SELF_DETECT,\n provider_error: SELF_DETECT,\n unknown: SELF_DETECT\n};\n\n/**\n * Resolves the card presentation for a run-failure code. Returns null for codes\n * outside the known vocabulary so the caller renders its plain generic card with\n * no call-to-action.\n */\nexport function resolveAgentErrorPresentation(\n code: string | null | undefined\n): AgentErrorPresentation | null {\n if (!code) {\n return null;\n }\n return PRESENTATIONS[code as AgentRunErrorCode] ?? null;\n}\n\nconst FAILED_MESSAGE_CODE_MARKERS: ReadonlyArray<\n readonly [AgentRunErrorCode, readonly string[]]\n> = [\n [\n \"auth_required\",\n [\n \"authentication_failed\",\n \"invalid authentication credentials\",\n \"401 invalid authentication\",\n \"unauthorized\",\n \"not logged in\",\n \"please run /login\",\n \"invalid api key\"\n ]\n ],\n [\n \"cli_version_unsupported\",\n [\"requires a newer version\", \"version is too old\", \"unsupported version\"]\n ],\n [\n \"cli_not_found\",\n [\n \"no such file or directory\",\n \"command not found\",\n \"enoent\",\n \"executable file not found\"\n ]\n ],\n [\n \"network_error\",\n [\"enotfound\", \"econnrefused\", \"econnreset\", \"getaddrinfo\", \"socket hang up\"]\n ]\n];\n\n/**\n * Some providers (notably Claude Code) report an environment failure — e.g. a\n * dropped login (401) — as a plain failed assistant message rather than a\n * structured visibleError, so it never gets the remediation card. This recovers\n * the env-fixable code from that message's text so the caller can still route the\n * user to the wizard. Returns null when the text isn't a recognized env failure\n * (so transient/unknown failures stay plain).\n */\nexport function classifyFailedAgentMessage(\n body: string | null | undefined\n): AgentRunErrorCode | null {\n if (!body) {\n return null;\n }\n const lower = body.toLowerCase();\n for (const [code, markers] of FAILED_MESSAGE_CODE_MARKERS) {\n if (markers.some((marker) => lower.includes(marker))) {\n return code;\n }\n }\n return null;\n}\n"],"mappings":";AAAA,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AAgCtB,IAAM,qBAAqB,MAA4B;AAAA,EACrD,MAAM;AAAA,EACN,UAAU;AAAA,EACV,OAAO;AAAA,EACP,iBAAiB;AACnB,CAAC;AAOM,SAAS,kBAAkB,OAAsC;AACtE,qBAAmB,OAAO;AAC1B,qBAAmB,WAAW,OAAO,YAAY;AACjD,qBAAmB,QAAQ,OAAO,SAAS;AAC3C,qBAAmB,mBAAmB;AACxC;AAEO,SAAS,qBAA2B;AACzC,qBAAmB,OAAO;AAC5B;AAGO,SAAS,wBAA8C;AAC5D,SAAO;AACT;AAGO,SAAS,0BAAgD;AAC9D,SAAO,YAAY,kBAAkB;AACvC;;;ACvBA,IAAM,SAAS,EAAE,OAAO,MAAM,WAAW,KAAK;AAK9C,IAAM,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,WAAW;AACb;AAEA,IAAM,gBAAmE;AAAA;AAAA,EAEvE,eAAe;AAAA,IACb,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,eAAe;AAAA,IACb,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,yBAAyB;AAAA,IACvB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,eAAe;AAAA,IACb,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,qBAAqB;AAAA,IACnB,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA;AAAA;AAAA,EAGA,mBAAmB;AAAA,IACjB,YAAY;AAAA,IACZ,GAAG;AAAA,EACL;AAAA,EACA,yBAAyB;AAAA,IACvB,YAAY;AAAA,IACZ,GAAG;AAAA,EACL;AAAA,EACA,8BAA8B;AAAA,IAC5B,YAAY;AAAA,IACZ,GAAG;AAAA,EACL;AAAA,EACA,4BAA4B;AAAA,IAC1B,YAAY;AAAA,IACZ,GAAG;AAAA,EACL;AAAA,EACA,qBAAqB;AAAA,IACnB,YAAY;AAAA,IACZ,GAAG;AAAA,EACL;AAAA;AAAA,EAEA,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,SAAS;AACX;AAOO,SAAS,8BACd,MAC+B;AAC/B,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,SAAO,cAAc,IAAyB,KAAK;AACrD;AAEA,IAAM,8BAEF;AAAA,EACF;AAAA,IACE;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE;AAAA,IACA,CAAC,4BAA4B,sBAAsB,qBAAqB;AAAA,EAC1E;AAAA,EACA;AAAA,IACE;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE;AAAA,IACA,CAAC,aAAa,gBAAgB,cAAc,eAAe,gBAAgB;AAAA,EAC7E;AACF;AAUO,SAAS,2BACd,MAC0B;AAC1B,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,QAAM,QAAQ,KAAK,YAAY;AAC/B,aAAW,CAAC,MAAM,OAAO,KAAK,6BAA6B;AACzD,QAAI,QAAQ,KAAK,CAAC,WAAW,MAAM,SAAS,MAAM,CAAC,GAAG;AACpD,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
@@ -3,14 +3,14 @@ import {
3
3
  getOptionalAgentHostApi,
4
4
  managedAgentRoundedIconUrl,
5
5
  useOptionalAgentHostApi
6
- } from "./chunk-S6PCOX3S.js";
7
- import {
8
- resolveAgentWorkspaceFileVisualKind
9
- } from "./chunk-PJP5BUU6.js";
6
+ } from "./chunk-HVU46DDA.js";
10
7
  import {
11
8
  translate,
12
9
  useTranslation
13
- } from "./chunk-5PGMLZ4W.js";
10
+ } from "./chunk-5SRRKWE4.js";
11
+ import {
12
+ resolveAgentWorkspaceFileVisualKind
13
+ } from "./chunk-PJP5BUU6.js";
14
14
 
15
15
  // app/renderer/lib/utils.ts
16
16
  import { clsx } from "clsx";
@@ -3657,4 +3657,4 @@ export {
3657
3657
  CustomScrollArea,
3658
3658
  MessageSquareMoreIcon
3659
3659
  };
3660
- //# sourceMappingURL=chunk-6QFURP4M.js.map
3660
+ //# sourceMappingURL=chunk-SLT5Q37C.js.map
@@ -1,9 +1,9 @@
1
+ import {
2
+ translateInUiLanguage
3
+ } from "./chunk-IS6JUDDY.js";
1
4
  import {
2
5
  normalizeAgentTitleText
3
6
  } from "./chunk-GCBDIQDX.js";
4
- import {
5
- translateInUiLanguage
6
- } from "./chunk-54CMFCHF.js";
7
7
 
8
8
  // shared/utils/agentSessionMentionText.ts
9
9
  import {
@@ -314,4 +314,4 @@ export {
314
314
  resolveAgentGUIProviderDisplayLabel,
315
315
  firstAgentGUIUserMessageTitle
316
316
  };
317
- //# sourceMappingURL=chunk-PQYMG6PQ.js.map
317
+ //# sourceMappingURL=chunk-UCCUIUGK.js.map
@@ -4,23 +4,23 @@ import {
4
4
  AgentMentionSearchController,
5
5
  flattenAgentMentionPaletteEntries,
6
6
  groupStartKeys
7
- } from "../chunk-PQYSB2WC.js";
8
- import "../chunk-4URDQNBP.js";
9
- import "../chunk-SITURZG6.js";
7
+ } from "../chunk-BT5WEZO5.js";
8
+ import "../chunk-CEMXB7LA.js";
9
+ import "../chunk-OLI2A3EM.js";
10
10
  import "../chunk-IBIMGLCD.js";
11
- import "../chunk-MXDPRBS6.js";
11
+ import "../chunk-NX6T3DDS.js";
12
12
  import "../chunk-Y35GDLP2.js";
13
13
  import "../chunk-LUGELG5V.js";
14
- import "../chunk-S6PCOX3S.js";
14
+ import "../chunk-HVU46DDA.js";
15
15
  import "../chunk-TYGL25EL.js";
16
+ import "../chunk-5SRRKWE4.js";
16
17
  import "../chunk-PJP5BUU6.js";
17
18
  import "../chunk-MTFSQWZ6.js";
19
+ import "../chunk-IS6JUDDY.js";
18
20
  import {
19
21
  AGENT_CONTEXT_MENTION_PROVIDER_IDS
20
22
  } from "../chunk-JM24HADP.js";
21
23
  import "../chunk-GCBDIQDX.js";
22
- import "../chunk-5PGMLZ4W.js";
23
- import "../chunk-54CMFCHF.js";
24
24
  export {
25
25
  AGENT_CONTEXT_MENTION_PROVIDER_IDS,
26
26
  AgentContextMentionPalette,
@@ -336,6 +336,20 @@ declare const agentGuiI18nResources: {
336
336
  readonly followupPlaceholder: "Request follow-up changes from {{provider}}";
337
337
  readonly installRequiredPlaceholder: "Finish setting up {{provider}} to send messages";
338
338
  readonly installRequiredAction: "Set up";
339
+ readonly providerGateCheckingTitle: "Checking your agent";
340
+ readonly providerGateCheckingDescription: "One moment while we check whether {{provider}} is ready.";
341
+ readonly providerGateInstallTitle: "Install {{provider}} first";
342
+ readonly providerGateInstallDescription: "{{provider}} needs to be installed before you can start a new chat here.";
343
+ readonly providerGateInstallAction: "Install";
344
+ readonly providerGateLoginTitle: "Sign in to {{provider}}";
345
+ readonly providerGateLoginDescription: "{{provider}} is installed. Sign in once, then come back and start chatting.";
346
+ readonly providerGateLoginAction: "Sign in";
347
+ readonly providerGateUnavailableTitle: "{{provider}} is not ready yet";
348
+ readonly providerGateUnavailableDescription: "We could not confirm that {{provider}} is ready. Try checking again.";
349
+ readonly providerGateRetryAction: "Check again";
350
+ readonly providerGatePendingInstall: "Installing…";
351
+ readonly providerGatePendingLogin: "Opening sign in…";
352
+ readonly providerGatePendingRefresh: "Checking…";
339
353
  readonly collaboratorSessionReadOnlyPlaceholder: "This session belongs to another user and cannot be replied to directly";
340
354
  readonly send: "Send";
341
355
  readonly modelLabel: "Model";
@@ -718,6 +732,9 @@ declare const agentGuiI18nResources: {
718
732
  readonly systemNoticeTransportFallback: "Codex switched to HTTPS transport";
719
733
  readonly systemNoticeWarning: "Codex warning";
720
734
  readonly systemNoticeDefault: "Agent notice";
735
+ readonly contextCompactionInProgress: "Compacting context";
736
+ readonly contextCompactionCompleted: "Context compacted.";
737
+ readonly contextCompactionInterrupted: "Context compaction interrupted.";
721
738
  readonly turnSummary: "Changed files";
722
739
  readonly userMessageLocator: "User messages";
723
740
  readonly turnSummaryFilesChanged: "{{count}} files changed";
@@ -834,7 +851,9 @@ declare const agentGuiI18nResources: {
834
851
  readonly fileMentionEmpty: "Search workspace files based on your input";
835
852
  readonly fileMentionError: "Unable to search Files.";
836
853
  readonly fileMentionTabHint: "Tab switch category | ←→ enter/leave folder | ↑↓ switch selection";
854
+ readonly mentionPalette: "Mention context";
837
855
  readonly addReference: "Add reference";
856
+ readonly addContent: "Add files and more";
838
857
  readonly referenceWorkspaceFiles: "Reference workspace files";
839
858
  readonly referencePicker: {
840
859
  readonly clearFilter: "Clear filter";
@@ -2798,6 +2817,20 @@ declare const agentGuiI18nResources: {
2798
2817
  readonly followupPlaceholder: "要求 {{provider}} 继续后续变更";
2799
2818
  readonly installRequiredPlaceholder: "请先完成 {{provider}} 配置,然后再发送消息";
2800
2819
  readonly installRequiredAction: "设置";
2820
+ readonly providerGateCheckingTitle: "正在检查 Agent";
2821
+ readonly providerGateCheckingDescription: "稍等一下,我们正在确认 {{provider}} 是否已经可用。";
2822
+ readonly providerGateInstallTitle: "先安装 {{provider}}";
2823
+ readonly providerGateInstallDescription: "需要先安装 {{provider}},才能在这里开始新的对话。";
2824
+ readonly providerGateInstallAction: "安装";
2825
+ readonly providerGateLoginTitle: "登录 {{provider}}";
2826
+ readonly providerGateLoginDescription: "{{provider}} 已安装。先完成一次登录,然后就可以开始对话。";
2827
+ readonly providerGateLoginAction: "登录";
2828
+ readonly providerGateUnavailableTitle: "{{provider}} 暂时还不可用";
2829
+ readonly providerGateUnavailableDescription: "我们还不能确认 {{provider}} 已准备好,可以再检测一次。";
2830
+ readonly providerGateRetryAction: "重新检测";
2831
+ readonly providerGatePendingInstall: "正在安装…";
2832
+ readonly providerGatePendingLogin: "正在打开登录…";
2833
+ readonly providerGatePendingRefresh: "正在检测…";
2801
2834
  readonly collaboratorSessionReadOnlyPlaceholder: "非当前用户会话,不可直接对话";
2802
2835
  readonly send: "发送";
2803
2836
  readonly modelLabel: "模型";
@@ -3180,6 +3213,9 @@ declare const agentGuiI18nResources: {
3180
3213
  readonly systemNoticeTransportFallback: "Codex 已切换到 HTTPS 传输";
3181
3214
  readonly systemNoticeWarning: "Codex 警告";
3182
3215
  readonly systemNoticeDefault: "Agent 通知";
3216
+ readonly contextCompactionInProgress: "正在压缩上下文";
3217
+ readonly contextCompactionCompleted: "已压缩上下文";
3218
+ readonly contextCompactionInterrupted: "上下文压缩已中断";
3183
3219
  readonly turnSummary: "已变更文件";
3184
3220
  readonly userMessageLocator: "用户消息";
3185
3221
  readonly turnSummaryFilesChanged: "变更了 {{count}} 个文件";
@@ -3296,7 +3332,9 @@ declare const agentGuiI18nResources: {
3296
3332
  readonly fileMentionEmpty: "根据你输入的内容搜索工作区文件";
3297
3333
  readonly fileMentionError: "无法搜索工作区文件。";
3298
3334
  readonly fileMentionTabHint: "Tab 切换分类 | ←→ 进入/返回文件夹 | ↑↓ 切换选中";
3335
+ readonly mentionPalette: "提及上下文";
3299
3336
  readonly addReference: "添加引用";
3337
+ readonly addContent: "添加文件等内容";
3300
3338
  readonly referenceWorkspaceFiles: "引用空间文件";
3301
3339
  readonly referencePicker: {
3302
3340
  readonly clearFilter: "清除筛选";
@@ -6,8 +6,8 @@ import {
6
6
  translate,
7
7
  translateInUiLanguage,
8
8
  useTranslation
9
- } from "../chunk-5PGMLZ4W.js";
10
- import "../chunk-54CMFCHF.js";
9
+ } from "../chunk-5SRRKWE4.js";
10
+ import "../chunk-IS6JUDDY.js";
11
11
  export {
12
12
  AgentGuiI18nProvider,
13
13
  agentGuiI18nModule,
package/dist/index.d.ts CHANGED
@@ -4,9 +4,10 @@ import { m as WorkspaceAgentActivityListViewModel, g as AgentHostWorkspaceAgentS
4
4
  import * as react from 'react';
5
5
  import { ReactNode, PropsWithChildren, JSX } from 'react';
6
6
  import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
7
- import { n as AgentProvider, c as AgentGUIProviderTargetRef, f as AgentHostAgentSessionComposerSettings, d as AgentHostActivateAgentSessionResult, l as AgentHostUpdateAgentSessionSettingsResult, j as AgentHostAgentSessionState, k as AgentHostUnactivateAgentSessionResult, A as AgentGUINodeData, b as AgentGUIProviderTarget, a as AgentGUIProvider, m as AgentPromptContentBlock, P as Point, N as NodeFrame } from './types-B2m7UcBb.js';
8
- import { l as AgentProbeSnapshot, A as AgentComposerDraft, o as AgentSessionCommand, d as AgentGUIProviderSkillOption, a as AgentGUIComposerSettingsVM, e as AgentGUIQueuedPromptVM, c as AgentGUINodeViewModel, b as AgentGUIConversationScope, h as AgentHostInputApi } from './agentGuiNodeTypes-DCnsaqJr.js';
9
- export { f as AgentHostApi, g as AgentHostApplyWorkspaceGitPatchInput, i as AgentHostRuntimeApi, j as AgentHostSelectFilesInput, k as AgentProbeProvider, m as AgentProviderProbeListInput, n as AgentProviderProbeListResult, p as AgentUsageQuota, q as AgentUsageSnapshot, P as PersistWriteResult, R as ReadWorkspaceAgentReadStateInput, W as WorkspaceAgentReadStateSnapshot, r as WriteWorkspaceAgentReadStateInput } from './agentGuiNodeTypes-DCnsaqJr.js';
7
+ import { q as AgentProvider, f as AgentGUIProviderTargetRef, i as AgentHostAgentSessionComposerSettings, g as AgentHostActivateAgentSessionResult, o as AgentHostUpdateAgentSessionSettingsResult, m as AgentHostAgentSessionState, n as AgentHostUnactivateAgentSessionResult, A as AgentGUINodeData, e as AgentGUIProviderTarget, a as AgentGUIProvider, p as AgentPromptContentBlock, P as Point, b as AgentGUIProviderReadinessGate, N as NodeFrame } from './types-BsHvTjIZ.js';
8
+ export { c as AgentGUIProviderReadinessGateAction, d as AgentGUIProviderReadinessGateStatus } from './types-BsHvTjIZ.js';
9
+ import { l as AgentProbeSnapshot, A as AgentComposerDraft, o as AgentSessionCommand, d as AgentGUIProviderSkillOption, a as AgentGUIComposerSettingsVM, e as AgentGUIQueuedPromptVM, c as AgentGUINodeViewModel, b as AgentGUIConversationScope, h as AgentHostInputApi } from './agentGuiNodeTypes-BRU6P22B.js';
10
+ export { f as AgentHostApi, g as AgentHostApplyWorkspaceGitPatchInput, i as AgentHostRuntimeApi, j as AgentHostSelectFilesInput, k as AgentProbeProvider, m as AgentProviderProbeListInput, n as AgentProviderProbeListResult, p as AgentUsageQuota, q as AgentUsageSnapshot, P as PersistWriteResult, R as ReadWorkspaceAgentReadStateInput, W as WorkspaceAgentReadStateSnapshot, r as WriteWorkspaceAgentReadStateInput } from './agentGuiNodeTypes-BRU6P22B.js';
10
11
  import { WorkspaceFileEntry } from '@tutti-os/workspace-file-manager/services';
11
12
  import { WorkspaceFileReference, ReferenceLocateTarget, WorkspaceFileReferenceAdapter } from '@tutti-os/workspace-file-reference/contracts';
12
13
  import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
@@ -198,6 +199,53 @@ interface AgentActivityRuntimeListGeneratedFilesInput {
198
199
  signal?: AbortSignal;
199
200
  workspaceId: string;
200
201
  }
202
+ interface AgentActivityRuntimeListSessionsPageInput {
203
+ limit?: number;
204
+ searchQuery?: string;
205
+ signal?: AbortSignal;
206
+ workspaceId: string;
207
+ }
208
+ interface AgentActivityRuntimeSessionPageResult {
209
+ hasMore: boolean;
210
+ nextCursor?: string;
211
+ sessions: AgentActivitySession[];
212
+ workspaceId: string;
213
+ }
214
+ interface AgentActivityRuntimeListSessionSectionsInput {
215
+ agentTargetId?: string | null;
216
+ limitPerSection?: number;
217
+ signal?: AbortSignal;
218
+ workspaceId: string;
219
+ }
220
+ interface AgentActivityRuntimeListSessionSectionPageInput {
221
+ agentTargetId?: string | null;
222
+ cursor?: string;
223
+ limit?: number;
224
+ sectionKey: string;
225
+ signal?: AbortSignal;
226
+ workspaceId: string;
227
+ }
228
+ interface AgentActivityRuntimeUserProject {
229
+ createdAtUnixMs: number;
230
+ id: string;
231
+ label: string;
232
+ lastUsedAtUnixMs?: number;
233
+ path: string;
234
+ sectionKey: string;
235
+ updatedAtUnixMs: number;
236
+ }
237
+ interface AgentActivityRuntimeSessionSection {
238
+ kind: "conversations" | "project";
239
+ sectionKey: string;
240
+ userProject?: AgentActivityRuntimeUserProject;
241
+ sessions: AgentActivitySession[];
242
+ hasMore: boolean;
243
+ nextCursor?: string;
244
+ }
245
+ interface AgentActivityRuntimeSessionSectionsResult {
246
+ sections: AgentActivityRuntimeSessionSection[];
247
+ workspaceId: string;
248
+ }
201
249
  interface AgentActivityRuntimeGeneratedFile {
202
250
  label: string;
203
251
  path: string;
@@ -350,6 +398,9 @@ interface AgentActivityRuntime {
350
398
  getSnapshot(workspaceId: string): AgentActivitySnapshot;
351
399
  listSessionMessages(input: AgentActivityRuntimeListSessionMessagesInput): Promise<AgentActivityMessagePage>;
352
400
  listAgentGeneratedFiles?(input: AgentActivityRuntimeListGeneratedFilesInput): Promise<AgentActivityRuntimeGeneratedFileList>;
401
+ listSessionsPage?(input: AgentActivityRuntimeListSessionsPageInput): Promise<AgentActivityRuntimeSessionPageResult>;
402
+ listSessionSections?(input: AgentActivityRuntimeListSessionSectionsInput): Promise<AgentActivityRuntimeSessionSectionsResult>;
403
+ listSessionSectionPage?(input: AgentActivityRuntimeListSessionSectionPageInput): Promise<AgentActivityRuntimeSessionSection>;
353
404
  load(workspaceId: string, signal?: AbortSignal): Promise<AgentActivitySnapshot>;
354
405
  ensureSessionSynchronized?(input: AgentActivityRuntimeEnsureSessionSynchronizedInput): () => void;
355
406
  /** @deprecated Use ensureSessionSynchronized. */
@@ -470,6 +521,7 @@ interface AgentComposerProps {
470
521
  uiLanguage?: UiLanguage;
471
522
  isActive?: boolean;
472
523
  previewMode?: boolean;
524
+ workspaceReferencePickerOpen?: boolean;
473
525
  promptImagesSupported?: boolean;
474
526
  composerFocusRequestSequence?: number | null;
475
527
  layoutMode?: "dock" | "hero";
@@ -609,8 +661,10 @@ interface AgentComposerProps {
609
661
  fileMentionEmpty: string;
610
662
  fileMentionError: string;
611
663
  fileMentionTabHint: string;
664
+ mentionPalette: string;
612
665
  removeMention: string;
613
666
  addReference: string;
667
+ addContent: string;
614
668
  referenceWorkspaceFiles: string;
615
669
  providerSwitchLabel: string;
616
670
  projectLocked: string;
@@ -762,6 +816,7 @@ interface AgentGUINodeProps {
762
816
  onAgentProviderLogin?: (provider: AgentProvider) => void;
763
817
  providerTargets?: readonly AgentGUIProviderTarget[];
764
818
  providerTargetsLoading?: boolean;
819
+ providerReadinessGates?: Partial<Record<AgentGUIProvider, AgentGUIProviderReadinessGate | null>> | null;
765
820
  defaultProviderTargetId?: string | null;
766
821
  conversationScope?: AgentGUIConversationScope;
767
822
  onWorkspaceFileReferencesAdded?: (input: {
@@ -872,4 +927,4 @@ interface AgentActivityHostProviderProps extends PropsWithChildren {
872
927
  }
873
928
  declare function AgentActivityHostProvider({ agentActivityRuntime, agentHostApi, children }: AgentActivityHostProviderProps): JSX.Element;
874
929
 
875
- export { AgentActivityHostProvider, type AgentActivityHostProviderProps, type AgentActivityRuntime, type AgentActivityRuntimeListSessionMessagesInput, type AgentActivityRuntimePromptContentBlock, AgentActivityRuntimeProvider, type AgentActivityRuntimeProviderProps, type AgentActivityRuntimeRetainSessionEventsInput, type AgentActivityRuntimeSetSessionPinnedInput, type AgentActivityRuntimeUpdateSessionSettingsInput, type AgentActivityRuntimeUploadPromptContentInput, type AgentActivityRuntimeUploadPromptContentResult, type AgentActivityRuntimeWarmupOpenclawGatewayInput, type AgentActivitySnapshotProjection, AgentContextMentionProvider, type AgentCustomMentionChipContext, type AgentCustomMentionIdentity, type AgentCustomMentionKindDefinition, type AgentCustomMentionPresentation, AgentGUI, type AgentGUIProps, AgentGUIProvider, AgentGUIProviderTarget, AgentGUIProviderTargetRef, AgentGuiI18nLocale, AgentHostInputApi, AgentProbeSnapshot, AgentQueuedPromptQueueSnapshot, AgentQueuedPromptRuntime, AgentQueuedPromptRuntimeProvider, type AgentQueuedPromptRuntimeProviderProps, agentGUIDefaultTargetProviders, agentGuiDockIconUrl, agentGuiDockIconUrls, agentHostSnapshotFromAgentActivitySnapshot, buildAgentActivitySnapshotProjection, createLocalAgentGUIProviderTarget, createLocalAgentGUIProviderTargets, getAgentActivityRuntime, getAgentCustomMentionKind, getOptionalAgentActivityRuntime, localAgentGUIProviderTargetId, normalizeAgentGUIProviderTargets, projectCoreSessionStatus, registerAgentCustomMentionKind, resetAgentActivityRuntimeForTests, resetAgentCustomMentionKindsForTests, resetAgentQueuedPromptRuntimeForTests, resolveAgentGUIExpandedWindowFrame, resolveAgentGUIProviderTarget, setAgentActivityRuntimeForTests, setAgentQueuedPromptRuntimeForTests, shouldAutoCollapseAgentGUIConversationRail, useAgentActivityRuntime, useAgentActivitySnapshot, useAgentQueuedPromptRuntime, useAgentQueuedPromptSessionSnapshot, useOptionalAgentActivityRuntime };
930
+ export { AgentActivityHostProvider, type AgentActivityHostProviderProps, type AgentActivityRuntime, type AgentActivityRuntimeListSessionMessagesInput, type AgentActivityRuntimePromptContentBlock, AgentActivityRuntimeProvider, type AgentActivityRuntimeProviderProps, type AgentActivityRuntimeRetainSessionEventsInput, type AgentActivityRuntimeSetSessionPinnedInput, type AgentActivityRuntimeUpdateSessionSettingsInput, type AgentActivityRuntimeUploadPromptContentInput, type AgentActivityRuntimeUploadPromptContentResult, type AgentActivityRuntimeWarmupOpenclawGatewayInput, type AgentActivitySnapshotProjection, AgentContextMentionProvider, type AgentCustomMentionChipContext, type AgentCustomMentionIdentity, type AgentCustomMentionKindDefinition, type AgentCustomMentionPresentation, AgentGUI, type AgentGUIProps, AgentGUIProvider, AgentGUIProviderReadinessGate, AgentGUIProviderTarget, AgentGUIProviderTargetRef, AgentGuiI18nLocale, AgentHostInputApi, AgentProbeSnapshot, AgentQueuedPromptQueueSnapshot, AgentQueuedPromptRuntime, AgentQueuedPromptRuntimeProvider, type AgentQueuedPromptRuntimeProviderProps, agentGUIDefaultTargetProviders, agentGuiDockIconUrl, agentGuiDockIconUrls, agentHostSnapshotFromAgentActivitySnapshot, buildAgentActivitySnapshotProjection, createLocalAgentGUIProviderTarget, createLocalAgentGUIProviderTargets, getAgentActivityRuntime, getAgentCustomMentionKind, getOptionalAgentActivityRuntime, localAgentGUIProviderTargetId, normalizeAgentGUIProviderTargets, projectCoreSessionStatus, registerAgentCustomMentionKind, resetAgentActivityRuntimeForTests, resetAgentCustomMentionKindsForTests, resetAgentQueuedPromptRuntimeForTests, resolveAgentGUIExpandedWindowFrame, resolveAgentGUIProviderTarget, setAgentActivityRuntimeForTests, setAgentQueuedPromptRuntimeForTests, shouldAutoCollapseAgentGUIConversationRail, useAgentActivityRuntime, useAgentActivitySnapshot, useAgentQueuedPromptRuntime, useAgentQueuedPromptSessionSnapshot, useOptionalAgentActivityRuntime };