@mcp-b/react-components 0.70.0 → 0.71.1

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 (96) hide show
  1. package/dist/AgentComputer-CpS9R2KG.d.ts +305 -0
  2. package/dist/{AgentComputer-CFJxjMFE.js → AgentComputer-CsWDnHwj.js} +1859 -478
  3. package/dist/CommandPalette-DDctKdpC.d.ts +53 -0
  4. package/dist/ComputerCalendar-Z6k_DVJF.js +1360 -0
  5. package/dist/ComputerCustomWallpaper-CnGQYHp0.js +518 -0
  6. package/dist/ComputerCustomWallpaper-D4lgwj2k.d.ts +18 -0
  7. package/dist/ComputerNotifications-q7eeELZ8.d.ts +41 -0
  8. package/dist/ComputerPresentation-BEQKYAjc.js +888 -0
  9. package/dist/{ExecutionResult-C7SzVquo.js → ExecutionResult-CXnGcmM4.js} +1 -1
  10. package/dist/{WorkspaceBrowser-ojoZy0uO.js → WorkspaceBrowser-mRScUczT.js} +5 -5
  11. package/dist/WorkspaceFileTransfer-D2cOoVyO.js +1625 -0
  12. package/dist/{WorkspaceMessageResponse-BoeeltJM.js → WorkspaceMessageResponse-CXGOQgpo.js} +1 -1
  13. package/dist/components/agents-sdk/AgentComputer.d.ts +2 -276
  14. package/dist/components/agents-sdk/AgentComputer.js +1 -1
  15. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  16. package/dist/components/agents-sdk/ComputerAutomations.d.ts +5 -15
  17. package/dist/components/agents-sdk/ComputerAutomations.js +164 -145
  18. package/dist/components/agents-sdk/ComputerCalendar.d.ts +1 -1
  19. package/dist/components/agents-sdk/ComputerCalendar.js +1 -1344
  20. package/dist/components/agents-sdk/ComputerCustomWallpaper.d.ts +2 -39
  21. package/dist/components/agents-sdk/ComputerCustomWallpaper.js +2 -522
  22. package/dist/components/agents-sdk/ComputerFiles.d.ts +18 -81
  23. package/dist/components/agents-sdk/ComputerFiles.js +386 -98
  24. package/dist/components/agents-sdk/ComputerHome.d.ts +6 -11
  25. package/dist/components/agents-sdk/ComputerHome.js +1 -89
  26. package/dist/components/agents-sdk/ComputerHost.d.ts +43 -0
  27. package/dist/components/agents-sdk/ComputerHost.js +97 -0
  28. package/dist/components/agents-sdk/ComputerLayout.d.ts +1 -1
  29. package/dist/components/agents-sdk/ComputerNotifications.d.ts +2 -54
  30. package/dist/components/agents-sdk/ComputerNotifications.js +1 -668
  31. package/dist/components/agents-sdk/ComputerPresentation.d.ts +2 -0
  32. package/dist/components/agents-sdk/ComputerPresentation.js +2 -0
  33. package/dist/components/agents-sdk/ComputerScreen.d.ts +14 -14
  34. package/dist/components/agents-sdk/ComputerScreen.js +109 -50
  35. package/dist/components/agents-sdk/ComputerSettings.d.ts +12 -40
  36. package/dist/components/agents-sdk/ComputerSettings.js +249 -1038
  37. package/dist/components/agents-sdk/ComputerSpotlight.d.ts +13 -15
  38. package/dist/components/agents-sdk/ComputerSpotlight.js +1 -231
  39. package/dist/components/agents-sdk/ComputerViewer.d.ts +13 -17
  40. package/dist/components/agents-sdk/ComputerViewer.js +176 -187
  41. package/dist/components/agents-sdk/ComputerWallpapers.d.ts +1 -1
  42. package/dist/components/agents-sdk/EmployeeChat.js +2 -2
  43. package/dist/components/agents-sdk/EmployeeChrome.js +3 -3
  44. package/dist/components/agents-sdk/EmployeeSchedules.js +2 -2
  45. package/dist/components/agents-sdk/ExecutionBoard.js +1 -1
  46. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  47. package/dist/components/agents-sdk/ManagerOfficeScreens.js +2 -2
  48. package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
  49. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  50. package/dist/components/agents-sdk/ThinkChatToolPanels.js +3 -3
  51. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  52. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +2 -2
  53. package/dist/components/agents-sdk/ThinkScheduleActions.js +1 -1
  54. package/dist/components/agents-sdk/ThinkScheduleBrowser.js +1 -1
  55. package/dist/components/agents-sdk/ThinkScheduleDetail.js +4 -4
  56. package/dist/components/agents-sdk/ThinkScheduleForm.js +3 -3
  57. package/dist/components/agents-sdk/WorkspaceAutomation.js +3 -3
  58. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1 -1
  59. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  60. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +1 -5
  61. package/dist/components/agents-sdk/WorkspaceDesktop.js +53 -41
  62. package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
  63. package/dist/components/agents-sdk/WorkspaceFileCommands.js +1 -924
  64. package/dist/components/agents-sdk/WorkspaceFileDetails.js +1 -1
  65. package/dist/components/agents-sdk/WorkspaceFileTransfer.js +1 -504
  66. package/dist/components/agents-sdk/WorkspaceFileView.js +6 -6
  67. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  68. package/dist/components/agents-sdk/WorkspaceLive.d.ts +9 -0
  69. package/dist/components/agents-sdk/WorkspaceLive.js +2 -177
  70. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  71. package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
  72. package/dist/components/ai-sdk/Context.js +1 -1
  73. package/dist/components/ai-sdk/PromptInput.js +1 -1
  74. package/dist/components/extension/FirstRunSetup.js +2 -2
  75. package/dist/components/foundations/ThemeProvider.d.ts +2 -0
  76. package/dist/components/foundations/ThemeProvider.js +2 -1
  77. package/dist/components/general-purpose/CommandPalette.d.ts +2 -52
  78. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  79. package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -2
  80. package/dist/components/nanites/AgentConnection.js +1 -1
  81. package/dist/components/nanites/AgentToolDetail.js +1 -1
  82. package/dist/context-BWJpR084.js +94 -0
  83. package/dist/{parts-CPVz9l31.js → parts-BFK5iocu.js} +1 -1
  84. package/dist/styles/agent-computer.css +16 -0
  85. package/dist/styles/computer-files.css +5 -0
  86. package/dist/styles/computer-notifications.css +1 -0
  87. package/dist/{workspace-drag-B6hMXUNt.js → workspace-drag-BNhZIN8F.js} +1 -1
  88. package/dist/{workspace-quick-look-DODjsfhH.js → workspace-quick-look-8cbGu1Xf.js} +2 -2
  89. package/package.json +2 -2
  90. package/dist/WallpaperPicker-C-FItmDS.d.ts +0 -34
  91. package/dist/automations-host-DPORjdc7.js +0 -17
  92. package/dist/context-Ddsp8HgD.js +0 -43
  93. package/dist/minute-clock-CXpRGCMF.js +0 -35
  94. package/dist/{Context-DQDumCV8.js → Context-CYUxZrwW.js} +1 -1
  95. package/dist/{ManagerOffice-kSK7vTBl.js → ManagerOffice-BJ2vs-Lr.js} +2 -2
  96. package/dist/{WorkspaceLink-DK9kdMUH.js → WorkspaceLink-DDkj-Tq5.js} +1 -1
@@ -2,9 +2,9 @@ import { M as InfoIcon } from "../../icons-nLTnB9kd.js";
2
2
  import { Dialog } from "../foundations/Dialog.js";
3
3
  import { IconButton } from "../foundations/IconButton.js";
4
4
  import { t as CopyButton } from "../../copy-button-DWBVJR6D.js";
5
+ import { describeWorkspaceFile } from "./WorkspaceFile.js";
5
6
  import { FormattedDate } from "../foundations/FormattedDate.js";
6
7
  import { DescriptionList } from "../foundations/DescriptionList.js";
7
- import { describeWorkspaceFile } from "./WorkspaceFile.js";
8
8
  import { c } from "react/compiler-runtime";
9
9
  import * as React from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,505 +1,2 @@
1
- import { o as formatOperationError } from "../../format-DL7f2rqp.js";
2
- import { Button } from "../foundations/Button.js";
3
- import { AlertDialog } from "../foundations/AlertDialog.js";
4
- import { a as workspaceDirname, i as workspaceBasename, n as isWorkspacePathWithinRoot, r as joinWorkspacePath } from "../../workspace-path-TZggP-u4.js";
5
- import { c } from "react/compiler-runtime";
6
- import * as React from "react";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
- import { useQueryClient } from "@tanstack/react-query";
9
- //#region src/components/agents-sdk/WorkspaceFileTransfer.tsx
10
- /**
11
- * Moving files between a workspace and this computer, and between folders:
12
- * import a browser `File`, Save As through the native picker, hand a download
13
- * to the browser, and land a drag and drop as the Finder does.
14
- *
15
- * A view of workspace objects reads its own drops (see `WorkspaceDragAndDrop`)
16
- * and hands each one over as workspace paths or the computer's files and
17
- * folders; {@link transferIntoWorkspace} lands either one in a folder.
18
- *
19
- * Every file is capped at {@link WORKSPACE_TRANSFER_MAX_BYTES} and checked
20
- * before any bytes are buffered. Transfers never clobber silently: the caller
21
- * chooses what a name collision does, and "keep both" retries an atomic
22
- * create so a concurrent writer cannot be overwritten either.
23
- */
24
- /** The largest file one transfer moves: 32 MiB. */
25
- const WORKSPACE_TRANSFER_MAX_BYTES = 33554432;
26
- function splitExtension(name, folder) {
27
- const dot = name.lastIndexOf(".");
28
- return folder || dot <= 0 ? [name, ""] : [name.slice(0, dot), name.slice(dot)];
29
- }
30
- /**
31
- * The first free name in `directory`, as the Finder chooses it: "name 2" for
32
- * an item that keeps both, "name copy" then "name copy 2" for a duplicate.
33
- * A file's extension stays at the end.
34
- */
35
- async function availableWorkspacePath(source, directory, name, { folder, copy }) {
36
- const [stem, extension] = splitExtension(name, folder);
37
- const first = copy ? `${stem} copy${extension}` : name;
38
- if (!await source.exists(joinWorkspacePath(directory, first))) return joinWorkspacePath(directory, first);
39
- for (let number = 2; number < 1e4; number += 1) {
40
- const candidate = `${stem}${copy ? " copy" : ""} ${number}${extension}`;
41
- if (!await source.exists(joinWorkspacePath(directory, candidate))) return joinWorkspacePath(directory, candidate);
42
- }
43
- throw new Error(`Couldn’t find an available name for “${name}”.`);
44
- }
45
- function throwIfCancelled(signal) {
46
- if (signal?.aborted) throw new DOMException("The transfer was cancelled.", "AbortError");
47
- }
48
- function assertTransferSize(name, size) {
49
- if (size <= 33554432) return;
50
- const sizeMiB = Math.ceil(size / 1048576);
51
- throw new Error(`“${name}” is ${sizeMiB.toLocaleString()} MiB. Files are limited to 32 MiB per transfer.`);
52
- }
53
- async function boundedExportInfo(source, path) {
54
- const info = await source.stat(path);
55
- const name = workspaceBasename(path);
56
- if (!info || info.type !== "file") throw new Error(`“${name}” is no longer available.`);
57
- assertTransferSize(name, info.size);
58
- return info;
59
- }
60
- /** Reads one workspace file as a browser `File`, checking the transfer limit first. */
61
- async function readWorkspaceFile(source, path) {
62
- const info = await boundedExportInfo(source, path);
63
- const bytes = await source.readFileBytes(path);
64
- if (!bytes) throw new Error(`“${info.name}” is no longer available.`);
65
- assertTransferSize(info.name, bytes.byteLength);
66
- return new File([Uint8Array.from(bytes).buffer], info.name, {
67
- type: info.mimeType || "application/octet-stream",
68
- lastModified: info.updatedAt
69
- });
70
- }
71
- function extensionFor(name) {
72
- const dot = name.lastIndexOf(".");
73
- return dot < 0 ? "" : name.slice(dot);
74
- }
75
- /**
76
- * Save As is a confirmed write only after close() resolves. Its portable
77
- * fallback starts a browser download and deliberately reports the weaker fact.
78
- */
79
- async function saveWorkspaceFileAs(source, path, ownerWindow = window) {
80
- const name = workspaceBasename(path);
81
- const pickerWindow = ownerWindow;
82
- if (!pickerWindow.showSaveFilePicker) {
83
- await downloadWorkspaceFile(source, path, ownerWindow);
84
- return "download-started";
85
- }
86
- try {
87
- const extension = extensionFor(name);
88
- const handle = await pickerWindow.showSaveFilePicker({
89
- suggestedName: name,
90
- types: extension ? [{
91
- description: "Workspace file",
92
- accept: { "application/octet-stream": [extension] }
93
- }] : void 0
94
- });
95
- await boundedExportInfo(source, path);
96
- const bytes = await source.readFileBytes(path);
97
- if (!bytes) throw new Error("The file is no longer available.");
98
- assertTransferSize(name, bytes.byteLength);
99
- const writable = await handle.createWritable();
100
- await writable.write(bytes);
101
- await writable.close();
102
- return "saved";
103
- } catch (error) {
104
- if (error instanceof DOMException && error.name === "AbortError") return "cancelled";
105
- throw error;
106
- }
107
- }
108
- /** Start a browser-controlled download; this cannot confirm a disk write. */
109
- async function downloadWorkspaceFile(source, path, ownerWindow = window) {
110
- const info = await boundedExportInfo(source, path);
111
- const name = workspaceBasename(path);
112
- const bytes = await source.readFileBytes(path);
113
- if (!bytes) throw new Error(`“${name}” is no longer available.`);
114
- assertTransferSize(name, bytes.byteLength);
115
- const url = URL.createObjectURL(new Blob([Uint8Array.from(bytes).buffer], { type: info.mimeType || "application/octet-stream" }));
116
- const anchor = ownerWindow.document.createElement("a");
117
- anchor.href = url;
118
- anchor.download = name;
119
- anchor.hidden = true;
120
- ownerWindow.document.body.append(anchor);
121
- anchor.click();
122
- anchor.remove();
123
- ownerWindow.setTimeout(() => URL.revokeObjectURL(url), 0);
124
- }
125
- async function writeDroppedItem(destination, path, item, signal) {
126
- throwIfCancelled(signal);
127
- if (item.kind === "file") {
128
- assertTransferSize(item.name, item.file.size);
129
- const bytes = new Uint8Array(await item.file.arrayBuffer());
130
- throwIfCancelled(signal);
131
- if (!await destination.createFileIfAbsent(path, bytes, item.file.type || void 0)) throw new Error(`“${item.name}” appeared while it was being copied.`);
132
- return;
133
- }
134
- await destination.mkdir(path, { recursive: true });
135
- for (const child of item.children) await writeDroppedItem(destination, joinWorkspacePath(path, child.name), child, signal);
136
- }
137
- /** Reads a workspace object into the same shape a drop from the computer has. */
138
- async function readWorkspaceItem(source, path, signal) {
139
- throwIfCancelled(signal);
140
- const info = await source.stat(path);
141
- if (!info) throw new Error(`“${workspaceBasename(path)}” is no longer available.`);
142
- if (info.type !== "directory") return {
143
- kind: "file",
144
- name: info.name,
145
- file: await readWorkspaceFile(source, path)
146
- };
147
- const children = [];
148
- for (const entry of await source.readDir(path)) children.push(await readWorkspaceItem(source, entry.path, signal));
149
- return {
150
- kind: "directory",
151
- name: info.name,
152
- children
153
- };
154
- }
155
- /**
156
- * Lands a drop in `directory`, one top-level item at a time, as the Finder
157
- * does. Within one workspace a move or copy is the workspace's own `mv` or
158
- * `cp`: moving an item to the folder it is already in does nothing, and
159
- * copying it there adds "name copy", as Duplicate does. Across workspaces, and from the
160
- * computer, items are copied file by file — a folder with everything in it —
161
- * under the per-file transfer limit. A name already taken asks `ask`, whose
162
- * choice applies to that item; "cancel" stops the run.
163
- */
164
- async function transferIntoWorkspace({ drop, destination, destinationKey, directory, operation, ask, signal }) {
165
- const sameWorkspace = drop.kind === "workspace" && drop.sourceKey === destinationKey;
166
- const names = drop.kind === "workspace" ? drop.paths.map(workspaceBasename) : drop.items.map((i) => i.name);
167
- const result = {
168
- landed: [],
169
- skipped: 0,
170
- total: names.length,
171
- cancelled: false,
172
- failure: null
173
- };
174
- for (const [index, name] of names.entries()) {
175
- if (signal?.aborted) {
176
- result.cancelled = true;
177
- break;
178
- }
179
- try {
180
- const from = drop.kind === "workspace" ? drop.paths[index] : "";
181
- const sameFolder = sameWorkspace && workspaceDirname(from) === directory;
182
- if (sameFolder && operation === "move") continue;
183
- if (sameWorkspace && isWorkspacePathWithinRoot(directory, from)) throw new Error(`“${name}” can’t be put inside itself.`);
184
- const target = joinWorkspacePath(directory, name);
185
- const choice = !await destination.exists(target) ? null : sameFolder ? "keep-both" : await ask(name);
186
- throwIfCancelled(signal);
187
- if (choice === "cancel") {
188
- result.cancelled = true;
189
- break;
190
- }
191
- if (choice === "skip") {
192
- result.skipped += 1;
193
- continue;
194
- }
195
- const item = drop.kind === "files" ? drop.items[index] : sameWorkspace ? null : await readWorkspaceItem(drop.source, from, signal);
196
- const folder = item ? item.kind === "directory" : (await destination.stat(from))?.type === "directory";
197
- let path = target;
198
- if (choice === "keep-both") path = await availableWorkspacePath(destination, directory, name, {
199
- folder,
200
- copy: sameFolder
201
- });
202
- if (choice === "replace") {
203
- if (sameWorkspace && isWorkspacePathWithinRoot(from, target)) throw new Error(`“${name}” can’t replace the folder it is in.`);
204
- await destination.rm(target, { recursive: true });
205
- }
206
- if (item) await writeDroppedItem(destination, path, item, signal);
207
- else if (operation === "move") await destination.mv(from, path, { recursive: true });
208
- else await destination.cp(from, path, { recursive: true });
209
- result.landed.push({
210
- from: drop.kind === "workspace" ? from : null,
211
- path
212
- });
213
- } catch (error) {
214
- if (error instanceof DOMException && error.name === "AbortError") result.cancelled = true;
215
- else result.failure = {
216
- name,
217
- error
218
- };
219
- break;
220
- }
221
- }
222
- return result;
223
- }
224
- const items = (count) => `${count} ${count === 1 ? "item" : "items"}`;
225
- /** "Import", "Move" or "Copy", and its past tense, for what a transfer does. */
226
- function transferVerbs({ drop, destinationKey, operation }) {
227
- if (drop.kind === "files") return ["Import", "imported"];
228
- return drop.sourceKey === destinationKey && operation === "move" ? ["Move", "moved"] : ["Copy", "copied"];
229
- }
230
- /** The status line a finished transfer leaves, including a cancel's or a failure's. */
231
- function transferSummary(result, [verb, past]) {
232
- const landed = items(result.landed.length);
233
- if (result.failure) return `${verb} stopped. ${landed} ${past} of ${result.total}.`;
234
- if (result.cancelled) return `${verb} cancelled. ${landed} ${past}.`;
235
- return `${landed} ${past}${result.skipped ? `; ${result.skipped} skipped` : ""}.`;
236
- }
237
- /**
238
- * Runs drops and imports into a workspace folder, one at a time, as the
239
- * Finder does: a taken name asks Replace, Keep both or Skip, and a failure is
240
- * an alert naming the item. Progress and the outcome go to `onStatus`.
241
- */
242
- function useWorkspaceTransfer(t0) {
243
- const $ = c(58);
244
- let t1;
245
- if ($[0] !== t0) {
246
- t1 = t0 === void 0 ? {} : t0;
247
- $[0] = t0;
248
- $[1] = t1;
249
- } else t1 = $[1];
250
- const { onStatus } = t1;
251
- const queryClient = useQueryClient();
252
- const [conflict, setConflict] = React.useState(null);
253
- const [alert, setAlert] = React.useState(null);
254
- const [transferring, setTransferring] = React.useState(false);
255
- const running = React.useRef(null);
256
- let t2;
257
- if ($[2] !== onStatus || $[3] !== queryClient) {
258
- t2 = async function run(options) {
259
- if (running.current) return null;
260
- const controller = new AbortController();
261
- running.current = controller;
262
- const [verb, past] = transferVerbs(options);
263
- const total = options.drop.kind === "files" ? options.drop.items.length : options.drop.paths.length;
264
- setTransferring(true);
265
- setAlert(null);
266
- onStatus?.(`${verb === "Copy" ? "Copying" : `${verb.slice(0, -1)}ing`} ${items(total)}…`);
267
- const release = options.destination.hold?.();
268
- const result = await transferIntoWorkspace({
269
- ...options,
270
- signal: controller.signal,
271
- ask: (name) => new Promise((resolve) => setConflict({
272
- name,
273
- resolve
274
- }))
275
- }).finally(release);
276
- running.current = null;
277
- setConflict(null);
278
- setTransferring(false);
279
- onStatus?.(transferSummary(result, [verb, past]));
280
- if (result.failure) setAlert({
281
- title: `“${result.failure.name}” couldn’t be ${past}`,
282
- detail: `${formatOperationError(result.failure.error)} ${items(result.landed.length)} ${past} before it stopped (${result.landed.length} of ${result.total}).`
283
- });
284
- const keys = [options.destinationKey];
285
- if (options.drop.kind === "workspace") keys.push(options.drop.sourceKey);
286
- await Promise.all(keys.map((key) => queryClient.invalidateQueries({ queryKey: ["workspace", key] })));
287
- return result;
288
- };
289
- $[2] = onStatus;
290
- $[3] = queryClient;
291
- $[4] = t2;
292
- } else t2 = $[4];
293
- const run = t2;
294
- let t3;
295
- if ($[5] !== conflict) {
296
- t3 = function cancel() {
297
- running.current?.abort();
298
- conflict?.resolve("cancel");
299
- setConflict(null);
300
- };
301
- $[5] = conflict;
302
- $[6] = t3;
303
- } else t3 = $[6];
304
- const cancel = t3;
305
- let t4;
306
- if ($[7] !== conflict) {
307
- t4 = function resolve(choice) {
308
- if (!conflict) return;
309
- setConflict(null);
310
- conflict.resolve(choice);
311
- };
312
- $[7] = conflict;
313
- $[8] = t4;
314
- } else t4 = $[8];
315
- const resolve_0 = t4;
316
- const t5 = conflict !== null;
317
- let t6;
318
- if ($[9] !== resolve_0) {
319
- t6 = (open) => !open && resolve_0("cancel");
320
- $[9] = resolve_0;
321
- $[10] = t6;
322
- } else t6 = $[10];
323
- let t7;
324
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
325
- t7 = /* @__PURE__ */ jsx(AlertDialog.Backdrop, {});
326
- $[11] = t7;
327
- } else t7 = $[11];
328
- const t8 = conflict?.name;
329
- let t9;
330
- if ($[12] !== t8) {
331
- t9 = /* @__PURE__ */ jsxs(AlertDialog.Title, { children: [
332
- "“",
333
- t8,
334
- "” already exists"
335
- ] });
336
- $[12] = t8;
337
- $[13] = t9;
338
- } else t9 = $[13];
339
- let t10;
340
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
341
- t10 = /* @__PURE__ */ jsx(AlertDialog.Description, { children: "Replace overwrites the one here. Keep both adds a numbered copy." });
342
- $[14] = t10;
343
- } else t10 = $[14];
344
- let t11;
345
- if ($[15] !== t9) {
346
- t11 = /* @__PURE__ */ jsxs(AlertDialog.Header, { children: [t9, t10] });
347
- $[15] = t9;
348
- $[16] = t11;
349
- } else t11 = $[16];
350
- let t12;
351
- if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
352
- t12 = /* @__PURE__ */ jsx(AlertDialog.Close, { children: "Cancel" });
353
- $[17] = t12;
354
- } else t12 = $[17];
355
- let t13;
356
- if ($[18] !== resolve_0) {
357
- t13 = /* @__PURE__ */ jsx(Button, {
358
- variant: "ghost",
359
- color: "neutral",
360
- onClick: () => resolve_0("skip"),
361
- children: "Skip"
362
- });
363
- $[18] = resolve_0;
364
- $[19] = t13;
365
- } else t13 = $[19];
366
- let t14;
367
- if ($[20] !== resolve_0) {
368
- t14 = /* @__PURE__ */ jsx(Button, {
369
- variant: "ghost",
370
- color: "neutral",
371
- onClick: () => resolve_0("keep-both"),
372
- children: "Keep both"
373
- });
374
- $[20] = resolve_0;
375
- $[21] = t14;
376
- } else t14 = $[21];
377
- let t15;
378
- if ($[22] !== resolve_0) {
379
- t15 = /* @__PURE__ */ jsx(Button, {
380
- color: "destructive",
381
- onClick: () => resolve_0("replace"),
382
- children: "Replace"
383
- });
384
- $[22] = resolve_0;
385
- $[23] = t15;
386
- } else t15 = $[23];
387
- let t16;
388
- if ($[24] !== t13 || $[25] !== t14 || $[26] !== t15) {
389
- t16 = /* @__PURE__ */ jsxs(AlertDialog.Footer, { children: [
390
- t12,
391
- t13,
392
- t14,
393
- t15
394
- ] });
395
- $[24] = t13;
396
- $[25] = t14;
397
- $[26] = t15;
398
- $[27] = t16;
399
- } else t16 = $[27];
400
- let t17;
401
- if ($[28] !== t11 || $[29] !== t16) {
402
- t17 = /* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [t7, /* @__PURE__ */ jsx(AlertDialog.Viewport, { children: /* @__PURE__ */ jsxs(AlertDialog.Popup, {
403
- size: "sm",
404
- children: [t11, t16]
405
- }) })] });
406
- $[28] = t11;
407
- $[29] = t16;
408
- $[30] = t17;
409
- } else t17 = $[30];
410
- let t18;
411
- if ($[31] !== t17 || $[32] !== t5 || $[33] !== t6) {
412
- t18 = /* @__PURE__ */ jsx(AlertDialog.Root, {
413
- open: t5,
414
- onOpenChange: t6,
415
- children: t17
416
- });
417
- $[31] = t17;
418
- $[32] = t5;
419
- $[33] = t6;
420
- $[34] = t18;
421
- } else t18 = $[34];
422
- const t19 = alert !== null;
423
- let t20;
424
- if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
425
- t20 = (open_0) => !open_0 && setAlert(null);
426
- $[35] = t20;
427
- } else t20 = $[35];
428
- let t21;
429
- if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
430
- t21 = /* @__PURE__ */ jsx(AlertDialog.Backdrop, {});
431
- $[36] = t21;
432
- } else t21 = $[36];
433
- const t22 = alert?.title;
434
- let t23;
435
- if ($[37] !== t22) {
436
- t23 = /* @__PURE__ */ jsx(AlertDialog.Title, { children: t22 });
437
- $[37] = t22;
438
- $[38] = t23;
439
- } else t23 = $[38];
440
- const t24 = alert?.detail;
441
- let t25;
442
- if ($[39] !== t24) {
443
- t25 = /* @__PURE__ */ jsx(AlertDialog.Description, { children: t24 });
444
- $[39] = t24;
445
- $[40] = t25;
446
- } else t25 = $[40];
447
- let t26;
448
- if ($[41] !== t23 || $[42] !== t25) {
449
- t26 = /* @__PURE__ */ jsxs(AlertDialog.Header, { children: [t23, t25] });
450
- $[41] = t23;
451
- $[42] = t25;
452
- $[43] = t26;
453
- } else t26 = $[43];
454
- let t27;
455
- if ($[44] === Symbol.for("react.memo_cache_sentinel")) {
456
- t27 = /* @__PURE__ */ jsx(AlertDialog.Footer, { children: /* @__PURE__ */ jsx(AlertDialog.Close, { children: "OK" }) });
457
- $[44] = t27;
458
- } else t27 = $[44];
459
- let t28;
460
- if ($[45] !== t26) {
461
- t28 = /* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [t21, /* @__PURE__ */ jsx(AlertDialog.Viewport, { children: /* @__PURE__ */ jsxs(AlertDialog.Popup, {
462
- size: "sm",
463
- children: [t26, t27]
464
- }) })] });
465
- $[45] = t26;
466
- $[46] = t28;
467
- } else t28 = $[46];
468
- let t29;
469
- if ($[47] !== t19 || $[48] !== t28) {
470
- t29 = /* @__PURE__ */ jsx(AlertDialog.Root, {
471
- open: t19,
472
- onOpenChange: t20,
473
- children: t28
474
- });
475
- $[47] = t19;
476
- $[48] = t28;
477
- $[49] = t29;
478
- } else t29 = $[49];
479
- let t30;
480
- if ($[50] !== t18 || $[51] !== t29) {
481
- t30 = /* @__PURE__ */ jsxs(Fragment, { children: [t18, t29] });
482
- $[50] = t18;
483
- $[51] = t29;
484
- $[52] = t30;
485
- } else t30 = $[52];
486
- const dialogs = t30;
487
- let t31;
488
- if ($[53] !== cancel || $[54] !== dialogs || $[55] !== run || $[56] !== transferring) {
489
- t31 = {
490
- run,
491
- cancel,
492
- transferring,
493
- alert: setAlert,
494
- dialogs
495
- };
496
- $[53] = cancel;
497
- $[54] = dialogs;
498
- $[55] = run;
499
- $[56] = transferring;
500
- $[57] = t31;
501
- } else t31 = $[57];
502
- return t31;
503
- }
504
- //#endregion
1
+ import { a as saveWorkspaceFileAs, i as readWorkspaceFile, n as availableWorkspacePath, o as transferIntoWorkspace, r as downloadWorkspaceFile, s as useWorkspaceTransfer, t as WORKSPACE_TRANSFER_MAX_BYTES } from "../../WorkspaceFileTransfer-D2cOoVyO.js";
505
2
  export { WORKSPACE_TRANSFER_MAX_BYTES, availableWorkspacePath, downloadWorkspaceFile, readWorkspaceFile, saveWorkspaceFileAs, transferIntoWorkspace, useWorkspaceTransfer };
@@ -1,15 +1,15 @@
1
1
  import { E as EyeIcon, mt as WarningIcon, p as CheckIcon, r as ArrowLeftIcon, y as CodeIcon } from "../../icons-nLTnB9kd.js";
2
2
  import { t as CopyButton } from "../../copy-button-DWBVJR6D.js";
3
- import { i as useWorkspaceNavigationContext } from "../../WorkspaceLink-DK9kdMUH.js";
4
- import { useWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
5
- import { t as ExecutionResult } from "../../ExecutionResult-C7SzVquo.js";
6
- import { t as ContentAppBarOutletContext } from "../../app-bar-outlet-BEIGl9iF.js";
7
- import { AppTopBar } from "../general-purpose/AppTopBar.js";
8
3
  import { inferWorkspaceLanguage, inferWorkspaceMedia, isWorkspaceMarkdownPath, isWorkspaceSkillPath, parseWorkspaceSkill } from "./WorkspaceFile.js";
4
+ import { AppTopBar } from "../general-purpose/AppTopBar.js";
5
+ import { t as ContentAppBarOutletContext } from "../../app-bar-outlet-BEIGl9iF.js";
6
+ import { i as useWorkspaceNavigationContext } from "../../WorkspaceLink-DDkj-Tq5.js";
7
+ import { useWorkspaceNavigationRestoration } from "./WorkspaceNavigationRestoration.js";
8
+ import { t as ExecutionResult } from "../../ExecutionResult-CXnGcmM4.js";
9
9
  import { WorkspaceHeader } from "./WorkspaceHeader.js";
10
10
  import { i as useWorkspaceAssetUrl, n as WorkspaceMediaPreview, t as WorkspaceAssetActions } from "../../workspace-media-preview-B4iB5Tvi.js";
11
11
  import { a as CodeBlockCopyButton, i as CodeBlockContent, r as CodeBlockContainer, t as CodeBlock } from "../../CodeBlock-dt0L8md0.js";
12
- import { n as WorkspaceMessageResponse, r as createWorkspaceRehypePlugins } from "../../WorkspaceMessageResponse-BoeeltJM.js";
12
+ import { n as WorkspaceMessageResponse, r as createWorkspaceRehypePlugins } from "../../WorkspaceMessageResponse-CXGOQgpo.js";
13
13
  import { WorkspaceFileDetails } from "./WorkspaceFileDetails.js";
14
14
  import { c } from "react/compiler-runtime";
15
15
  import * as React from "react";
@@ -1,3 +1,3 @@
1
- import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-DK9kdMUH.js";
2
1
  import { n as isPlainPrimaryLinkActivation } from "../../navigation-link-DMmtdqsM.js";
2
+ import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-DDkj-Tq5.js";
3
3
  export { WorkspaceFileLink, WorkspaceNavigationProvider, isPlainPrimaryLinkActivation, resolveWorkspaceLink };
@@ -1,5 +1,6 @@
1
1
  import { r as WorkspaceFileAssetResolver } from "../../WorkspaceFile-BJC6vlp_.js";
2
2
  import { y as WorkspaceSource } from "../../Workspace-mZddFyvP.js";
3
+ import { QueryClient } from "@tanstack/react-query";
3
4
  //#region src/components/agents-sdk/WorkspaceLive.d.ts
4
5
  export type WorkspaceChange = {
5
6
  type: "changed";
@@ -19,6 +20,14 @@ export interface WorkspaceChangeSource {
19
20
  */
20
21
  live?(): boolean;
21
22
  }
23
+ /**
24
+ * What a change to `paths` in one source can have touched, under every root:
25
+ * the listings above, the concept queries whose scope overlaps a path, and
26
+ * the open files at or under one. File commands call it once a change lands,
27
+ * as the change feed does when its frames arrive. Without `paths`, every
28
+ * query of the source refreshes.
29
+ */
30
+ export declare function invalidateWorkspacePaths(queryClient: QueryClient, sourceKey: string, paths?: readonly string[]): Promise<unknown>;
22
31
  export interface UseWorkspaceLiveQueriesOptions {
23
32
  /** Native observer adapter. Omit for hosts without workspace observation. */
24
33
  changes?: WorkspaceChangeSource;