@mcp-b/react-components 0.68.0 → 0.70.0

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 (71) hide show
  1. package/dist/{AgentComputer-BP9ixGGE.js → AgentComputer-CFJxjMFE.js} +32 -3
  2. package/dist/ComputerFileThumbnail-CXHy127c.js +393 -0
  3. package/dist/Context-DQDumCV8.js +918 -0
  4. package/dist/{ThinkSchedule-D4Ulsa0-.d.ts → ThinkSchedule-9nzxIoX1.d.ts} +1 -1
  5. package/dist/{Workspace-B9nuTfIi.d.ts → Workspace-mZddFyvP.d.ts} +7 -3
  6. package/dist/{WorkspaceAutomation-C0fghGLi.d.ts → WorkspaceAutomation-hwl6C1aX.d.ts} +2 -2
  7. package/dist/{WorkspaceBrowser-Dz48H-7X.d.ts → WorkspaceBrowser-CNVAKXXZ.d.ts} +4 -11
  8. package/dist/{WorkspaceBrowser-oBJv-Dac.js → WorkspaceBrowser-ojoZy0uO.js} +202 -210
  9. package/dist/{WorkspaceConcept-D46cYerS.d.ts → WorkspaceConcept-DqzfZWws.d.ts} +1 -1
  10. package/dist/{WorkspaceFileCommands-1s9Ol8CG.d.ts → WorkspaceFileCommands-CN2oVUzx.d.ts} +5 -2
  11. package/dist/{WorkspaceFileTransfer-BRD22nW-.d.ts → WorkspaceFileTransfer-D--dVla2.d.ts} +1 -1
  12. package/dist/components/agents-sdk/AgentComputer.d.ts +1 -1
  13. package/dist/components/agents-sdk/AgentComputer.js +1 -1
  14. package/dist/components/agents-sdk/ComputerAppIds.d.ts +15 -0
  15. package/dist/components/agents-sdk/ComputerAppIds.js +14 -0
  16. package/dist/components/agents-sdk/ComputerAutomations.d.ts +23 -14
  17. package/dist/components/agents-sdk/ComputerAutomations.js +437 -354
  18. package/dist/components/agents-sdk/ComputerCalendar.js +16 -15
  19. package/dist/components/agents-sdk/ComputerCustomWallpaper.js +186 -171
  20. package/dist/components/agents-sdk/ComputerFileThumbnail.d.ts +5 -3
  21. package/dist/components/agents-sdk/ComputerFileThumbnail.js +1 -132
  22. package/dist/components/agents-sdk/ComputerFiles.d.ts +4 -6
  23. package/dist/components/agents-sdk/ComputerFiles.js +337 -316
  24. package/dist/components/agents-sdk/ComputerHome.js +1 -1
  25. package/dist/components/agents-sdk/ComputerLayout.d.ts +9 -0
  26. package/dist/components/agents-sdk/ComputerLayout.js +66 -0
  27. package/dist/components/agents-sdk/ComputerNotifications.js +60 -83
  28. package/dist/components/agents-sdk/ComputerScreen.d.ts +12 -6
  29. package/dist/components/agents-sdk/ComputerScreen.js +49 -36
  30. package/dist/components/agents-sdk/ComputerSettings.d.ts +10 -4
  31. package/dist/components/agents-sdk/ComputerSettings.js +92 -72
  32. package/dist/components/agents-sdk/ComputerSpotlight.js +1 -1
  33. package/dist/components/agents-sdk/EmployeeChat.js +1 -1
  34. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +2 -2
  35. package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
  36. package/dist/components/agents-sdk/ThinkSchedule.d.ts +1 -1
  37. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +1 -1
  38. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
  39. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
  40. package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +1 -1
  41. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  42. package/dist/components/agents-sdk/Workspace.js +197 -190
  43. package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
  44. package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
  45. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  46. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  47. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  48. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
  49. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +6 -6
  50. package/dist/components/agents-sdk/WorkspaceDesktop.js +126 -101
  51. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +2 -10
  52. package/dist/components/agents-sdk/WorkspaceExplorer.js +67 -71
  53. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +1 -1
  54. package/dist/components/agents-sdk/WorkspaceFileCommands.js +11 -6
  55. package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +1 -1
  56. package/dist/components/agents-sdk/WorkspaceLive.d.ts +1 -1
  57. package/dist/components/agents-sdk/WorkspaceLive.js +7 -5
  58. package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +1 -1
  59. package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
  60. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
  61. package/dist/components/ai-sdk/Context.js +1 -842
  62. package/dist/components/ai-sdk/Plan.d.ts +33 -9
  63. package/dist/components/ai-sdk/Plan.js +336 -107
  64. package/dist/components/extension/FirstRunSetup.d.ts +2 -2
  65. package/dist/minute-clock-CXpRGCMF.js +35 -0
  66. package/dist/{parts-RXV6GGdB.js → parts-CPVz9l31.js} +1 -1
  67. package/dist/styles/plan.css +160 -23
  68. package/dist/{workspace-concept-panel-BDTBISNO.d.ts → workspace-concept-panel-D1czupvi.d.ts} +1 -1
  69. package/dist/{workspace-quick-look-9V-UFpjj.js → workspace-quick-look-DODjsfhH.js} +79 -251
  70. package/package.json +2 -2
  71. package/dist/progress-ring-BO649JA9.js +0 -79
@@ -1,5 +1,6 @@
1
- import { y as WorkspaceSource } from "./Workspace-B9nuTfIi.js";
2
- import { a as WorkspaceDrop, i as WorkspaceDragSource, p as WorkspaceTransferTarget, u as WorkspaceTransferOperation } from "./WorkspaceFileTransfer-BRD22nW-.js";
1
+ import { r as WorkspaceFileAssetResolver } from "./WorkspaceFile-BJC6vlp_.js";
2
+ import { y as WorkspaceSource } from "./Workspace-mZddFyvP.js";
3
+ import { a as WorkspaceDrop, i as WorkspaceDragSource, p as WorkspaceTransferTarget, u as WorkspaceTransferOperation } from "./WorkspaceFileTransfer-D--dVla2.js";
3
4
  import * as React from "react";
4
5
  import { FileInfo } from "@cloudflare/shell";
5
6
  //#region src/components/agents-sdk/WorkspaceFileCommands.d.ts
@@ -98,6 +99,8 @@ interface WorkspaceVolume {
98
99
  name: string;
99
100
  /** A linked folder has no Trash: deleting there is immediate. */
100
101
  linked: boolean;
102
+ /** Serves previews by URL rather than buffering bytes; see `useWorkspace`. */
103
+ resolveFileAsset?: WorkspaceFileAssetResolver;
101
104
  }
102
105
  /**
103
106
  * One computer's file commands, shared by its desktop and every browser
@@ -1,4 +1,4 @@
1
- import { y as WorkspaceSource } from "./Workspace-B9nuTfIi.js";
1
+ import { y as WorkspaceSource } from "./Workspace-mZddFyvP.js";
2
2
  import * as React from "react";
3
3
  //#region src/components/agents-sdk/WorkspaceFileTransfer.d.ts
4
4
  /** What a transfer does with an item whose name the destination already has. */
@@ -1,5 +1,5 @@
1
1
  import { t as WallpaperOption } from "../../WallpaperPicker-C-FItmDS.js";
2
- import { i as WorkspaceDragSource } from "../../WorkspaceFileTransfer-BRD22nW-.js";
2
+ import { i as WorkspaceDragSource } from "../../WorkspaceFileTransfer-D--dVla2.js";
3
3
  import * as React from "react";
4
4
  //#region src/components/agents-sdk/AgentComputer.d.ts
5
5
  /** The window an app part is rendered in, from {@link useAgentComputerWindow}. */
@@ -1,2 +1,2 @@
1
- import { a as useAgentComputerWindow, i as useAgentComputerPortalContainer, n as useAgentComputerActions, o as useAgentComputerWindowActive, r as useAgentComputerAppHandlers, t as AgentComputer } from "../../AgentComputer-BP9ixGGE.js";
1
+ import { a as useAgentComputerWindow, i as useAgentComputerPortalContainer, n as useAgentComputerActions, o as useAgentComputerWindowActive, r as useAgentComputerAppHandlers, t as AgentComputer } from "../../AgentComputer-CFJxjMFE.js";
2
2
  export { AgentComputer, useAgentComputerActions, useAgentComputerAppHandlers, useAgentComputerPortalContainer, useAgentComputerWindow, useAgentComputerWindowActive };
@@ -0,0 +1,15 @@
1
+ //#region src/components/agents-sdk/ComputerAppIds.d.ts
2
+ /**
3
+ * The app ids of the computer's built-in apps, as `AgentComputer` and
4
+ * `openApp` know them. A host opens or arranges a built-in app by these.
5
+ */
6
+ export declare const COMPUTER_APP_IDS: {
7
+ readonly files: "files";
8
+ readonly screen: "screen";
9
+ readonly settings: "settings";
10
+ readonly calendar: "calendar";
11
+ readonly automations: "automations";
12
+ };
13
+ /** One built-in app's id. */
14
+ export type ComputerAppId = (typeof COMPUTER_APP_IDS)[keyof typeof COMPUTER_APP_IDS];
15
+ //#endregion
@@ -0,0 +1,14 @@
1
+ //#region src/components/agents-sdk/ComputerAppIds.ts
2
+ /**
3
+ * The app ids of the computer's built-in apps, as `AgentComputer` and
4
+ * `openApp` know them. A host opens or arranges a built-in app by these.
5
+ */
6
+ const COMPUTER_APP_IDS = {
7
+ files: "files",
8
+ screen: "screen",
9
+ settings: "settings",
10
+ calendar: "calendar",
11
+ automations: "automations"
12
+ };
13
+ //#endregion
14
+ export { COMPUTER_APP_IDS };
@@ -1,20 +1,25 @@
1
1
  import { AgentComputerApp } from "./AgentComputer.js";
2
- import { l as WorkspaceAutomationSource } from "../../WorkspaceAutomation-C0fghGLi.js";
3
- import { t as ThinkSchedule } from "../../ThinkSchedule-D4Ulsa0-.js";
2
+ import { l as WorkspaceAutomationSource } from "../../WorkspaceAutomation-hwl6C1aX.js";
3
+ import { t as ThinkSchedule } from "../../ThinkSchedule-9nzxIoX1.js";
4
4
  import { ThinkScheduleFormSchedule, ThinkScheduleFormValue } from "./ThinkScheduleForm.js";
5
5
  import * as React from "react";
6
6
  //#region src/components/agents-sdk/ComputerAutomations.d.ts
7
7
  /** A schedule the computer lists, opens and edits: Think's record plus the editor's prefill. */
8
8
  export type ComputerSchedule = ThinkSchedule & ThinkScheduleFormSchedule;
9
- export type ComputerAutomationsSection = "workflows" | "schedules" | "runs";
9
+ /** Automations' sections, in tab order. */
10
+ export declare const COMPUTER_AUTOMATIONS_SECTIONS: readonly ["workflows", "schedules", "runs"];
11
+ /** One of Automations' sections. */
12
+ export type ComputerAutomationsSection = (typeof COMPUTER_AUTOMATIONS_SECTIONS)[number];
10
13
  /**
11
14
  * What Automations shows: the section, and the workflow, schedule or run in
12
- * it. A null schedule is the schedule list with nothing selected.
15
+ * it. A null schedule is the schedule list with nothing selected;
16
+ * `newSchedule` opens the new-schedule editor over it.
13
17
  */
14
18
  export interface ComputerAutomationsSelection {
15
19
  section: ComputerAutomationsSection;
16
20
  workflow?: string;
17
21
  schedule: string | null;
22
+ newSchedule?: true;
18
23
  run?: string;
19
24
  }
20
25
  /**
@@ -26,18 +31,18 @@ export interface ComputerAutomationsSelection {
26
31
  export interface ComputerAutomationsHost<TSchedule extends ComputerSchedule = ComputerSchedule> {
27
32
  /** Stable non-secret identity of the source backing these schedules. */
28
33
  sourceKey: string;
29
- /** Saved automations; Automations itself opens a workflow and starts its schedule. */
30
- automations: Omit<WorkspaceAutomationSource, "onOpen" | "onSchedule">;
34
+ /** Saved automations; Automations itself opens a workflow and starts its schedule, single or per table row. */
35
+ automations: Omit<WorkspaceAutomationSource, "onOpen" | "onSchedule" | "onScheduleTable">;
31
36
  /** Every schedule, each carrying its next alarm and retained runs. */
32
37
  schedules: readonly TSchedule[];
33
38
  /** Creates a schedule and resolves its id. `requestKey` is stable for one editor, so a retried save is idempotent. */
34
39
  onCreateSchedule: (draft: ThinkScheduleFormValue, requestKey: string) => Promise<{
35
40
  id: string;
36
41
  }>;
37
- onUpdateSchedule: (schedule: TSchedule, draft: ThinkScheduleFormValue) => Promise<void>;
38
- onRunSchedule: (schedule: TSchedule) => Promise<void>;
39
- onScheduleEnabledChange: (schedule: TSchedule, enabled: boolean) => Promise<void>;
40
- onDeleteSchedule: (schedule: TSchedule) => Promise<void>;
42
+ onUpdateSchedule: (schedule: TSchedule, draft: ThinkScheduleFormValue) => Promise<unknown>;
43
+ onRunSchedule: (schedule: TSchedule) => Promise<unknown>;
44
+ onScheduleEnabledChange: (schedule: TSchedule, enabled: boolean) => Promise<unknown>;
45
+ onDeleteSchedule: (schedule: TSchedule) => Promise<unknown>;
41
46
  selection: ComputerAutomationsSelection;
42
47
  /** Merges `next` into the current selection. */
43
48
  onNavigate: (next: Partial<ComputerAutomationsSelection>) => void | Promise<void>;
@@ -48,10 +53,14 @@ export interface ComputerAutomationsHost<TSchedule extends ComputerSchedule = Co
48
53
  /** The conversation a run took place in, or null when it has none. */
49
54
  conversationForRun: (run: TSchedule["runs"][number]) => string | null;
50
55
  onOpenConversation: (threadId: string) => void;
51
- /** The employee's working timezone; dates and times read in it. */
52
- timeZone: string;
53
- /** The host's clock in epoch milliseconds. Calendar's today and its Dock icon read it. */
54
- now: number;
56
+ /** The employee's working IANA timezone; dates and times read in it. The reader's own zone by default. */
57
+ timeZone?: string;
58
+ /**
59
+ * The current instant in epoch milliseconds, read on each minute: Calendar's
60
+ * today and its Dock icon follow it. `Date.now` by default; a host on its
61
+ * own clock passes it.
62
+ */
63
+ now?: () => number;
55
64
  }
56
65
  /**
57
66
  * The shared state Automations and Calendar read, mounted above the computer