@schlenkr/ragents 0.1.13 → 0.1.15
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/apps/server/package.json +1 -1
- package/apps/server/src/api/contracts.ts +19 -1
- package/apps/server/src/api/core-methods.ts +12 -0
- package/apps/server/src/chat-handler.ts +19 -0
- package/apps/server/src/host-api.json +2 -0
- package/apps/server/src/host-api.ts +2 -2
- package/apps/server/src/plugin-build/build.ts +1 -1
- package/apps/server/src/plugin-support/actor-programs/app-project.ts +61 -17
- package/apps/server/src/plugin-support/actor-programs/contract.ts +18 -1
- package/apps/server/src/plugin-support/actor-programs/service.ts +22 -1
- package/apps/server/src/plugin-support/plugin-folder.ts +14 -1
- package/apps/server/src/plugin-support/run-scripts.ts +27 -2
- package/apps/server/src/profile/compose.ts +2 -0
- package/apps/server/src/provider.ts +31 -6
- package/apps/server/src/ragents/chat-projection.ts +7 -0
- package/apps/server/src/ragents/global-chat.ts +5 -1
- package/apps/server/src/ragents/run-script-tools.ts +66 -0
- package/apps/server/src/ragents/session.ts +122 -60
- package/apps/server/src/title-compactor.ts +1 -1
- package/apps/web/dist/assets/{highlighted-body-KPVGNVTW-CpPi6QLr.js → highlighted-body-KPVGNVTW-BwD4uYEe.js} +1 -1
- package/apps/web/dist/assets/main-KBrc5Q77.js +11 -0
- package/apps/web/dist/assets/{mermaid-HWGCJPDP-q-mf1kLN.js → mermaid-HWGCJPDP-CSCkaArr.js} +88 -88
- package/apps/web/dist/assets/runPanel-BjG5NBKm.js +26 -0
- package/apps/web/dist/help/guide-clients.html +21 -4
- package/apps/web/dist/help/guide-clients.md +23 -4
- package/apps/web/dist/help/guide-plugins.html +12 -2
- package/apps/web/dist/help/guide-plugins.md +9 -2
- package/apps/web/dist/help/guide-programs.html +8 -2
- package/apps/web/dist/help/guide-programs.md +9 -2
- package/apps/web/dist/help/guide-runtime.html +3 -2
- package/apps/web/dist/help/guide-runtime.md +3 -2
- package/apps/web/dist/help/index.html +1 -1
- package/apps/web/dist/help/mini-app.css +16 -2
- package/apps/web/dist/host-web.json +13 -13
- package/apps/web/dist/index.html +2 -2
- package/apps/web/dist/run-panel.html +2 -2
- package/apps/web/package.json +1 -1
- package/apps/web/src/App.tsx +12 -1
- package/apps/web/src/PluginRegistry.tsx +2 -2
- package/apps/web/src/SessionList.tsx +7 -6
- package/apps/web/src/SettingsModal.tsx +3 -3
- package/apps/web/src/actor-programs/client-ui/FilePicker.tsx +1 -1
- package/apps/web/src/api.ts +2 -0
- package/apps/web/src/run-overview.ts +1 -1
- package/apps/web/src/run-panel/RunPanelApp.tsx +1 -1
- package/apps/web/src/run-panel/RunPanelMenu.tsx +47 -11
- package/apps/web/src/ui/relative-time.ts +1 -1
- package/bundles/ragents.activity/ragents-bundle.json +1 -1
- package/bundles/ragents.actor-programs/ragents-bundle.json +4 -2
- package/bundles/ragents.actor-programs/server/index.js +437 -24
- package/bundles/ragents.actor-programs/server/index.js.map +4 -4
- package/bundles/ragents.actor-programs/web/index.js.map +1 -1
- package/bundles/ragents.ask/ragents-bundle.json +2 -2
- package/bundles/ragents.ask/server/index.js +1 -0
- package/bundles/ragents.ask/server/index.js.map +2 -2
- package/bundles/ragents.browser/ragents-bundle.json +1 -1
- package/bundles/ragents.documents/ragents-bundle.json +2 -2
- package/bundles/ragents.documents/web/classes.json +1 -1
- package/bundles/ragents.documents/web/index.js +1 -1
- package/bundles/ragents.documents/web/index.js.map +2 -2
- package/bundles/ragents.lsp-fsharp/ragents-bundle.json +1 -1
- package/bundles/ragents.lsp-roslyn/ragents-bundle.json +1 -1
- package/bundles/ragents.lsp-typescript/ragents-bundle.json +1 -1
- package/bundles/ragents.model-relay/ragents-bundle.json +1 -1
- package/bundles/ragents.orchestration/ragents-bundle.json +7 -4
- package/bundles/ragents.orchestration/server/chunks/chunk-QS3WJ3D7.js +11 -0
- package/bundles/ragents.orchestration/server/chunks/chunk-QS3WJ3D7.js.map +7 -0
- package/bundles/ragents.orchestration/server/exports/server/contract.js +9 -0
- package/bundles/ragents.orchestration/server/exports/server/contract.js.map +7 -0
- package/bundles/ragents.orchestration/server/index.js +49 -3
- package/bundles/ragents.orchestration/server/index.js.map +2 -2
- package/bundles/ragents.orchestration/surface.hbs +5 -0
- package/bundles/ragents.orchestration/web/index.js +3 -3
- package/bundles/ragents.orchestration/web/index.js.map +2 -2
- package/bundles/ragents.overseer/ragents-bundle.json +4 -3
- package/bundles/ragents.overseer/web/classes.json +1 -1
- package/bundles/ragents.overseer/web/index.js +1 -1
- package/bundles/ragents.overseer/web/index.js.map +4 -4
- package/bundles/ragents.processes/ragents-bundle.json +2 -2
- package/bundles/ragents.processes/web/classes.json +1 -1
- package/bundles/ragents.processes/web/index.js +1 -1
- package/bundles/ragents.processes/web/index.js.map +2 -2
- package/bundles/ragents.product/ragents-bundle.json +1 -1
- package/bundles/ragents.profile-distribution/ragents-bundle.json +1 -1
- package/bundles/ragents.reference/actors/notebook/package.json +16 -0
- package/bundles/ragents.reference/actors/notebook/src/client.tsx +31 -0
- package/bundles/ragents.reference/actors/notebook/src/server.ts +27 -0
- package/bundles/ragents.reference/actors/notebook/tests/program.test.ts +27 -0
- package/bundles/ragents.reference/ragents-bundle.json +4 -3
- package/bundles/ragents.reference/run-scripts/quick-note/RUN.md +14 -0
- package/bundles/ragents.reference/run-scripts/quick-note/package.json +9 -0
- package/bundles/ragents.reference/run-scripts/quick-note/src/server.ts +29 -0
- package/bundles/ragents.reference/run-scripts/quick-note/tests/program.test.ts +43 -0
- package/bundles/ragents.reference/run-scripts/run-roster/RUN.md +19 -0
- package/bundles/ragents.reference/run-scripts/run-roster/package.json +9 -0
- package/bundles/ragents.reference/run-scripts/run-roster/src/server.ts +26 -0
- package/bundles/ragents.reference/run-scripts/run-roster/tests/program.test.ts +47 -0
- package/bundles/ragents.todo/ragents-bundle.json +1 -1
- package/bundles/ragents.transcript/ragents-bundle.json +1 -1
- package/bundles/ragents.watch/ragents-bundle.json +1 -1
- package/bundles/ragents.workspace/ragents-bundle.json +2 -2
- package/bundles/ragents.workspace/web/classes.json +1 -1
- package/bundles/ragents.workspace/web/index.js +1 -1
- package/bundles/ragents.workspace/web/index.js.map +2 -2
- package/package.json +3 -3
- package/packages/ragents/src/domain/vocabulary.ts +4 -0
- package/packages/ragents/src/index.ts +3 -1
- package/packages/ragents/src/plugin-host.ts +62 -10
- package/packages/ragents/src/plugin-types.ts +11 -0
- package/packages/ragents/src/runtime/guards.ts +2 -1
- package/packages/ragents/src/typescript/async-compiler.ts +11 -1
- package/plugins/ragents.actor-programs/server/index.ts +3 -0
- package/plugins/ragents.actor-programs/server/runtime.ts +424 -28
- package/plugins/ragents.actor-programs/server/script-state.ts +54 -0
- package/plugins/ragents.actor-programs/server/tool-contributor.ts +2 -0
- package/plugins/ragents.ask/server/ask-tool.ts +1 -0
- package/plugins/ragents.documents/web/DocumentViewer.tsx +2 -2
- package/plugins/ragents.orchestration/ragents-plugin.json +1 -0
- package/plugins/ragents.orchestration/server/contract.ts +14 -0
- package/plugins/ragents.orchestration/server/index.ts +4 -1
- package/plugins/ragents.orchestration/server/surface-tool.ts +58 -2
- package/plugins/ragents.orchestration/surface.hbs +5 -0
- package/plugins/ragents.orchestration/web/ExecutionsPanel.tsx +1 -1
- package/plugins/ragents.orchestration/web/FlowInspector.tsx +1 -1
- package/plugins/ragents.orchestration/web/JournalStatus.tsx +1 -1
- package/plugins/ragents.orchestration/web/format.ts +1 -1
- package/plugins/ragents.overseer/web/index.tsx +51 -3
- package/plugins/ragents.processes/web/processes.ts +1 -1
- package/plugins/ragents.reference/actors/notebook/package.json +16 -0
- package/plugins/ragents.reference/actors/notebook/src/client.tsx +31 -0
- package/plugins/ragents.reference/actors/notebook/src/server.ts +27 -0
- package/plugins/ragents.reference/actors/notebook/tests/program.test.ts +27 -0
- package/plugins/ragents.reference/run-scripts/quick-note/RUN.md +14 -0
- package/plugins/ragents.reference/run-scripts/quick-note/package.json +9 -0
- package/plugins/ragents.reference/run-scripts/quick-note/src/server.ts +29 -0
- package/plugins/ragents.reference/run-scripts/quick-note/tests/program.test.ts +43 -0
- package/plugins/ragents.reference/run-scripts/run-roster/RUN.md +19 -0
- package/plugins/ragents.reference/run-scripts/run-roster/package.json +9 -0
- package/plugins/ragents.reference/run-scripts/run-roster/src/server.ts +26 -0
- package/plugins/ragents.reference/run-scripts/run-roster/tests/program.test.ts +47 -0
- package/plugins/ragents.workspace/web/FileBrowser.tsx +1 -1
- package/scripts/agent/agent-cli.ts +46 -2
- package/scripts/package/ragents.mjs +3 -1
- package/apps/web/dist/assets/main-DJmCHGzM.js +0 -11
- package/apps/web/dist/assets/runPanel-nk_aMxSn.js +0 -21
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["ragents-host-read:read", "ragents-host-value:typebox#Type", "ragents-host-value:@ragents/engine/src/http/contracts#openJson", "ragents-host-value:@ragents/engine/src/rpc/contract#defineChannel", "ragents-host-value:@ragents/engine/src/rpc/contract#defineOperation", "../../../plugins/ragents.workspace/contract.ts", "ragents-host-value:@ragents/web/ui#Alert", "ragents-host-value:@ragents/web/ui#Button", "ragents-host-value:@ragents/web/ui#Empty", "ragents-host-value:@ragents/web/ui#EmptyDescription", "ragents-host-value:@ragents/web/ui#EmptyHeader", "ragents-host-value:@ragents/web/ui#EmptyMedia", "ragents-host-value:@ragents/web/ui#EmptyTitle", "ragents-host-value:@ragents/web/ui#Input", "ragents-host-value:@ragents/web/ui#Label", "ragents-host-value:@ragents/web/ui#Select", "ragents-host-value:@ragents/web/ui#SelectContent", "ragents-host-value:@ragents/web/ui#SelectItem", "ragents-host-value:@ragents/web/ui#SelectTrigger", "ragents-host-value:@ragents/web/ui#SelectValue", "ragents-host-value:@ragents/web/ui#Toggle", "ragents-host-value:react#createContext", "ragents-host-value:react#createElement", "ragents-host-value:react#forwardRef", "ragents-host-value:react#useContext", "ragents-host-value:react#useEffect", "ragents-host-value:react#useId", "ragents-host-value:react#useMemo", "ragents-host-value:react#useRef", "ragents-host-value:react#useState", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/toKebabCase.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/toLucideIconData.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/toCamelCase.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/toPascalCase.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/mergeClasses.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/build/defaultAttributes.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/build/buildLucideIconNode.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/build/buildLucideIconForReact.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/shared/src/utils/hasA11yProp.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/context.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/Icon.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/createLucideIcon.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/braces.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/chevron-right.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/eye-off.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/eye.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/file-archive.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/file-code-corner.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/file-cog.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/file-image.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/file-terminal.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/file-text.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/file.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/folder-open.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/folder.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/palette.ts", "../../../node_modules/.pnpm/lucide-react@1.46.0_react@19.2.8/node_modules/lucide-react/src/icons/refresh-cw.ts", "ragents-host-value:@ragents/web/PluginRegistry#workspaceAccessible", "ragents-host-value:@ragents/web/rpc#rpc", "../../../plugins/ragents.workspace/web/api.ts", "../../../plugins/ragents.workspace/web/file-icons.tsx", "ragents-host-value:@ragents/web/SourceCode#SourceCode", "ragents-host-value:react/jsx-runtime#Fragment", "ragents-host-value:react/jsx-runtime#jsx", "ragents-host-value:react/jsx-runtime#jsxs", "../../../plugins/ragents.workspace/web/FileBrowser.tsx", "ragents-host-value:@ragents/web/Toolbar#ToolbarCopy", "ragents-host-value:@ragents/web/Toolbar#ToolbarItem", "ragents-host-value:@ragents/web/Toolbar#ToolbarLabel", "ragents-host-value:@ragents/web/Toolbar#ToolbarText", "../../../plugins/ragents.workspace/web/WorkspaceBinding.tsx", "../../../plugins/ragents.workspace/web/index.tsx"],
|
|
4
|
-
"sourcesContent": ["export const read = (specifier, name) => {\n const module = globalThis[\"__ragentsHostModules\"]?.[specifier];\n if (module === undefined) throw new Error(`The host does not provide ${specifier}`);\n if (!(name in module)) throw new Error(`The host does not provide ${name} from ${specifier}; the bundle was built against a newer host`);\n return module[name];\n};", "import { read } from \"ragents-host-read:read\";\nexport default read(\"typebox\", \"Type\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/http/contracts\", \"openJson\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/rpc/contract\", \"defineChannel\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/rpc/contract\", \"defineOperation\");\n", "import { Type } from \"typebox\";\nimport { openJson } from \"@ragents/engine/src/http/contracts\";\nimport { defineChannel, defineOperation } from \"@ragents/engine/src/rpc/contract\";\n\nexport const WORKSPACE_PLUGIN_ID = \"ragents.workspace\";\n\nexport const BROWSE_ROOTS = [\"workspace\", \"files\"] as const;\nexport type BrowseRoot = typeof BROWSE_ROOTS[number];\n\nexport interface BrowseEntry {\n name: string;\n kind: \"directory\" | \"file\";\n size: number;\n modifiedAt: string;\n}\n\nexport interface BrowseListing {\n root: BrowseRoot;\n /** Where the root is; on a workstation with its label. */\n location: string;\n path: string;\n entries: BrowseEntry[];\n truncated: boolean;\n}\n\nexport type BrowsePreview =\n | { root: BrowseRoot; path: string; size: number; previewable: true; content: string }\n | { root: BrowseRoot; path: string; size: number; previewable: false; reason: string };\n\nexport const WORKSPACE_BINDING_OPTION_ID = \"ragents.workspace.binding\";\n\nexport const WORKSPACE_METADATA_ID = \"ragents.workspace\";\n\n/** On which machine the workspace of a run is: the server or a workstation whose label the binding records. */\nexport type WorkspaceMachine = \"server\" | { client: string; label: string };\n\n/** An existing folder that the run neither creates nor deletes. */\nexport type ExistingWorkspaceFolder = {\n path: string;\n};\n\n/** The new folder per run on a workstation; the binding records its path there from the moment it is chosen. */\nexport type FreshWorkstationFolder = {\n path: string;\n fresh: true;\n};\n\n/** Which folder: a new one per run or an existing one; for `fresh` on the server, the host creates one per run in its storage. */\nexport type WorkspaceFolder = \"fresh\" | ExistingWorkspaceFolder | FreshWorkstationFolder;\n\n/** Where and in which folder a run works; frozen into the journal as a start option at the start. */\nexport type WorkspaceBinding = {\n machine: WorkspaceMachine;\n folder: WorkspaceFolder;\n};\n\nexport const freshServerBinding = (): WorkspaceBinding => ({ machine: \"server\", folder: \"fresh\" });\n\nexport const WORKSPACE_CLIENT_ID_PATTERN = /^[A-Za-z0-9_-]{8,64}$/;\n\n/** What a workstation says about itself at sign-in. */\nexport interface WorkspaceClientDescription {\n label: string;\n hostname: string;\n platform: string;\n folders: string[];\n /** Where the workstation creates the new folders per run, one subfolder per run named with its ID. */\n runsDirectory: string;\n /** Whether the workstation's bash finds rg; the prompt adjusts the search accordingly. */\n ripgrep: boolean;\n}\n\nexport interface WorkspaceClientInfo extends WorkspaceClientDescription {\n id: string;\n}\n\n/** What the new folder per run is called on each machine: the empty folder or a plugin's contribution; null where there is none. */\nexport interface FreshWorkspaceLabels {\n server: string;\n client: string | null;\n}\n\nexport interface WorkspaceBindingPresentation {\n kind: \"workspace-binding\";\n clients: WorkspaceClientInfo[];\n fresh: FreshWorkspaceLabels;\n /** Whether an existing folder of the server machine may be bound. */\n serverFolders: boolean;\n}\n\nexport interface WorkspaceSessionMetadata {\n binding: WorkspaceBinding;\n summary: string;\n}\n\nconst clientId = Type.String({ pattern: \"^[A-Za-z0-9_-]{8,64}$\", description: \"Stable ID of the workstation\" });\n\nconst executorVersion = Type.String({ minLength: 1, maxLength: 64, description: \"Version of the executor that the workstation brings\" });\n\n/** The ID of a plugin; a workstation looks for its bundle under exactly this name, so it cannot contain a path. */\nexport const PLUGIN_ID_PATTERN = /^[a-z0-9]+(?:[.-][a-z0-9]+)*$/;\n\nconst executorContributions = Type.Array(Type.Object({\n plugin: Type.String({ pattern: PLUGIN_ID_PATTERN.source, maxLength: 128, description: \"ID of the plugin\" }),\n revision: Type.String({ pattern: \"^[0-9a-f]{64}$\", description: \"SHA-256 of the contribution file\" }),\n}, { additionalProperties: false }), { maxItems: 64, description: \"The plugins' contributions to the executor, in the order of the server's plugin list\" });\n\nconst clientDescription = {\n label: Type.String({ minLength: 1, maxLength: 120 }),\n hostname: Type.String({ minLength: 1 }),\n platform: Type.String({ minLength: 1 }),\n folders: Type.Array(Type.String({ minLength: 1 }), { maxItems: 32 }),\n runsDirectory: Type.String({ minLength: 1, description: \"Absolute folder under which the workstation creates the new folders per run\" }),\n ripgrep: Type.Boolean({ description: \"Whether the workstation's bash finds rg\" }),\n};\n\nexport const clientInfoSchema = Type.Object({\n id: Type.String(),\n ...clientDescription,\n}, { additionalProperties: false });\n\n/** The sign-in as a workstation with the server's executor sends it. */\nexport const clientRegistrationSchema = Type.Object({\n id: clientId,\n ...clientDescription,\n executor: executorVersion,\n contributions: executorContributions,\n}, { additionalProperties: false });\n\n/** A workstation with a different executor does not know the shape of this version; the server rejects it by its version, not by its shape. */\nconst otherExecutorRegistration = Type.Object({ label: clientDescription.label, executor: executorVersion }, {\n description: \"Sign-in with a different executor version in any shape; the server rejects it with workspace-executor-version\",\n});\n\nconst absolutePath = Type.String({ minLength: 1, description: \"Absolute path in the bound folder\" });\n\n/** Not an operation of a module: releases what the workstation's executor holds for the run. */\nexport const WORKSPACE_CLIENT_STOP_OPERATION = \"stop\";\n\n/** The one operation the server calls on the workstation; progress is the JSON value of the operation, for bash { text }. */\nexport const workspaceClientContracts = {\n execute: defineOperation({\n id: \"ragents.workspace.client.execute\",\n description: \"Run an operation of the executor on the workstation, such as a tool, a file query, or the process display; the result is its value, progress its JSON value. stop releases what the workstation holds for the run.\",\n implementedBy: \"client\",\n input: Type.Object({\n runId: Type.String({ minLength: 1, maxLength: 64, description: \"ID of the run\" }),\n operation: Type.String({ minLength: 1, maxLength: 64, description: \"Name of the operation, such as read, bash, roslyn_open, files.list, or stop\" }),\n toolCallId: Type.Optional(Type.String({ minLength: 1, maxLength: 200, description: \"Only for a tool call of the model\" })),\n cwd: absolutePath,\n env: Type.Record(Type.String(), Type.String(), { description: \"What the server contributes: run marker and git rules of the sandbox\" }),\n input: Type.Unknown({ description: \"The input of the operation\" }),\n }, { additionalProperties: false }),\n result: Type.Object({ value: Type.Unknown() }, { additionalProperties: false }),\n }),\n} as const;\n\nconst browseTarget = {\n runId: Type.String({ minLength: 1, maxLength: 64, description: \"ID of the run\" }),\n root: Type.Union([Type.Literal(\"workspace\"), Type.Literal(\"files\")]),\n path: Type.String({ description: \"Path below the root; empty is the root itself\" }),\n};\n\n/** The sign-in of a workstation binds the calling connection; the server calls back through it. */\nexport const workspaceContracts = {\n browse: {\n list: defineOperation({\n id: \"ragents.workspace.browse.list\",\n description: \"List a directory in the workspace or in the file store of a run.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: Type.Object(browseTarget, { additionalProperties: false }),\n result: openJson<BrowseListing>(\"BrowseListing\"),\n }),\n preview: defineOperation({\n id: \"ragents.workspace.browse.preview\",\n description: \"Preview a file as text; files that are too large or binary state the reason instead.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: Type.Object(browseTarget, { additionalProperties: false }),\n result: openJson<BrowsePreview>(\"BrowsePreview\"),\n }),\n },\n channels: {\n browse: defineChannel({\n id: \"ragents.workspace.browse\",\n description: \"Reports every change below the observed root of a run.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n params: Type.Object({ runId: browseTarget.runId, root: browseTarget.root }, { additionalProperties: false }),\n message: Type.Object({ changed: Type.Literal(true) }, { additionalProperties: false }),\n }),\n },\n clients: {\n list: defineOperation({\n id: \"ragents.workspace.clients.list\",\n description: \"The caller's signed-in workstations; other users' workstations do not appear even with runs.read.all.\",\n rights: [\"runs.read\"],\n input: Type.Object({}, { additionalProperties: false }),\n result: Type.Array(clientInfoSchema),\n }),\n contributions: defineOperation({\n id: \"ragents.workspace.clients.contributions\",\n description: \"The plugins' contributions to the executor that a workstation loads before sign-in and reports back with it. A workstation with a different executor version fails on its version; other fields do not matter.\",\n rights: [\"runs.write\"],\n input: Type.Object({ label: clientDescription.label, executor: executorVersion }),\n result: executorContributions,\n }),\n register: defineOperation({\n id: \"ragents.workspace.clients.register\",\n description: \"Sign in a workstation or renew its folders; the connection of this request becomes its return path and needs an event stream. A workstation with a different executor version fails on its version before the rest of the shape matters.\",\n rights: [\"runs.write\"],\n input: Type.Union([clientRegistrationSchema, otherExecutorRegistration]),\n result: clientInfoSchema,\n }),\n unregister: defineOperation({\n id: \"ragents.workspace.clients.unregister\",\n description: \"Sign out one of your own workstations; open tasks fail.\",\n rights: [\"runs.write\"],\n input: Type.Object({ id: clientId }, { additionalProperties: false }),\n result: Type.Null(),\n }),\n },\n} as const;\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => typeof value === \"object\" && value !== null;\n\nconst hasExactly = (value: Record<string, unknown>, keys: readonly string[]): boolean =>\n Object.keys(value).length === keys.length && keys.every((key) => Object.hasOwn(value, key));\n\nconst isMachine = (value: unknown): value is WorkspaceMachine =>\n value === \"server\" || (isRecord(value) && hasExactly(value, [\"client\", \"label\"])\n && typeof value.client === \"string\" && WORKSPACE_CLIENT_ID_PATTERN.test(value.client) && typeof value.label === \"string\");\n\nconst isFolder = (value: unknown): value is WorkspaceFolder => {\n if (value === \"fresh\") return true;\n if (!isRecord(value) || typeof value.path !== \"string\" || value.path.length === 0) return false;\n return hasExactly(value, [\"path\"]) || (hasExactly(value, [\"path\", \"fresh\"]) && value.fresh === true);\n};\n\n/** A new folder with a path exists only on a workstation; on the server the host creates it itself. */\nexport const isWorkspaceBinding = (value: unknown): value is WorkspaceBinding =>\n isRecord(value) && hasExactly(value, [\"machine\", \"folder\"]) && isMachine(value.machine) && isFolder(value.folder)\n && !(value.machine === \"server\" && typeof value.folder === \"object\" && \"fresh\" in value.folder);\n\nexport const isFreshFolder = (folder: WorkspaceFolder): folder is \"fresh\" | FreshWorkstationFolder =>\n folder === \"fresh\" || \"fresh\" in folder;\n\n/** The shape before machine and folder were separated, `{ kind: \"fresh\" | \"path\" | \"client\" }`, mapped unambiguously to the current one. */\nconst fromKind = (value: Record<string, unknown>): unknown => {\n switch (value.kind) {\n case \"fresh\": return hasExactly(value, [\"kind\"]) ? freshServerBinding() : undefined;\n case \"path\": return hasExactly(value, [\"kind\", \"path\"]) ? { machine: \"server\", folder: { path: value.path } } : undefined;\n case \"client\": return hasExactly(value, [\"kind\", \"client\", \"label\", \"path\"])\n ? { machine: { client: value.client, label: value.label }, folder: { path: value.path } }\n : undefined;\n default: return undefined;\n }\n};\n\n/** The stored binding; older, immutable journals carry the shape with `kind`, and only here is it mapped. */\nexport const storedWorkspaceBinding = (value: unknown): WorkspaceBinding | undefined => {\n if (isWorkspaceBinding(value)) return value;\n const mapped = isRecord(value) && Object.hasOwn(value, \"kind\") ? fromKind(value) : undefined;\n return isWorkspaceBinding(mapped) ? mapped : undefined;\n};\n\nexport const FRESH_WORKSPACE_LABEL = \"Empty folder per run\";\n\n/** What the new folder per run is called on the binding's machine; without a contribution there, the empty folder. */\nconst freshLabelOf = (binding: WorkspaceBinding, labels: FreshWorkspaceLabels): string =>\n (binding.machine === \"server\" ? labels.server : labels.client) ?? FRESH_WORKSPACE_LABEL;\n\nexport const workspaceBindingSummary = (binding: WorkspaceBinding, labels: FreshWorkspaceLabels): string => {\n const { machine, folder } = binding;\n const fresh = freshLabelOf(binding, labels);\n const where = folder === \"fresh\" ? fresh : \"fresh\" in folder ? `${folder.path} (${fresh})` : folder.path;\n return machine === \"server\" ? where : `${machine.label}: ${where}`;\n};\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Alert\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Button\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Empty\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"EmptyDescription\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"EmptyHeader\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"EmptyMedia\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"EmptyTitle\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Input\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Label\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Select\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectContent\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectItem\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectTrigger\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectValue\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Toggle\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"createContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"createElement\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"forwardRef\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useEffect\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useId\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useMemo\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useRef\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useState\");\n", "/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string?.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n", "import { toKebabCase } from './toKebabCase';\nimport type { LucideIconData, LucideIconNode } from '../build/types';\n\n/**\n * Converts legacy `(name, iconNode, aliases?)` icon arguments into icon data object format.\n */\nexport function toLucideIconData(\n iconName: string,\n iconNode: LucideIconNode[],\n aliases: string[] = [],\n): LucideIconData {\n if (iconNode == null) {\n throw new Error('[lucide]: iconNode is required when icon name is used');\n }\n\n return {\n name: toKebabCase(iconName),\n size: 24,\n node: iconNode,\n ...(aliases.length > 0 ? { aliases } : {}),\n };\n}\n", "/**\n * Converts string to camel case\n *\n * @param {string} string\n * @returns {string} A camelized string\n */\nexport const toCamelCase = <T extends string>(string: T) => {\n let out = '';\n let upperNext = false;\n\n for (const ch of string) {\n if (ch === '-' || ch === '_' || ch <= ' ') {\n upperNext = out.length > 0;\n continue;\n }\n\n if (out.length === 0) {\n out += ch.toLowerCase();\n } else {\n out += upperNext ? ch.toUpperCase() : ch;\n }\n\n upperNext = false;\n }\n\n return out as string;\n};\n", "import { CamelToPascal } from '../utility-types';\nimport { toCamelCase } from './toCamelCase';\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = toCamelCase(string);\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n", "/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return (\n Boolean(className) &&\n (className as string).trim() !== '' &&\n array.indexOf(className) === index\n );\n })\n .join(' ')\n .trim();\n", "const defaultAttributes = {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n 'stroke-width': 2,\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n} as const;\n\nexport default defaultAttributes;\n", "import type { LucideBuildParams, LucideIconData, LucideIconNode, SVGProps } from './types';\nimport defaultAttributes from './defaultAttributes';\nimport { mergeClasses } from '../utils/mergeClasses';\n\nfunction isDefined<T>(value: T | null | undefined): value is T {\n return value !== null && value !== undefined;\n}\n\n/**\n * Creates a Lucide icon node (an svgson-like format) from a Lucide icon object.\n *\n * @param icon The icon to build.\n * @param params Additional build parameters.\n */\nfunction buildLucideIconNode(icon: LucideIconData, params: LucideBuildParams = {}): LucideIconNode {\n const attributeNames = params.attributeNames ?? {};\n const getAttributeName = (attributeName: string) =>\n attributeNames[attributeName] ?? attributeName;\n\n const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes['width'];\n const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes['height'];\n const aliasClassNames =\n icon.aliases\n ?.filter((alias: string): alias is string => typeof alias === 'string' && alias.trim() !== '')\n .map((alias: string) => `lucide-${alias}`) ?? [];\n const iconClassNames = [...(icon.name ? [`lucide-${icon.name}`] : []), ...aliasClassNames];\n const classNamesFromClassName = params.className?.split(' ').filter(Boolean) ?? [];\n const className =\n params.includeDefaultClasses === false\n ? mergeClasses(...classNamesFromClassName)\n : mergeClasses('lucide', ...iconClassNames, ...classNamesFromClassName);\n\n const calculatedStrokeWidth = params.absoluteStrokeWidth\n ? (Number(params.strokeWidth ?? defaultAttributes['stroke-width']) *\n Number(icon.size ?? icon.width ?? defaultAttributes['width'])) /\n Number(params.size ?? params.width ?? defaultAttributes['width'])\n : (params.strokeWidth ?? defaultAttributes['stroke-width']);\n\n const attributes = {\n ...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {\n attrs[getAttributeName(attrName)] = value;\n return attrs;\n }, {} as SVGProps),\n ...('color' in params &&\n params.color && {\n [getAttributeName('stroke')]: params.color,\n }),\n ...('size' in params &&\n isDefined(params.size) && {\n [getAttributeName('width')]: params.size,\n [getAttributeName('height')]: params.size,\n }),\n ...('width' in params &&\n isDefined(params.width) && {\n [getAttributeName('width')]: params.width,\n }),\n ...('height' in params &&\n isDefined(params.height) && {\n [getAttributeName('height')]: params.height,\n }),\n [getAttributeName('stroke-width')]: calculatedStrokeWidth,\n ...(className && {\n [getAttributeName('class')]: className,\n }),\n [getAttributeName('viewBox')]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,\n ...(params.hasA11yProp === false\n ? {\n [getAttributeName('aria-hidden')]: 'true',\n }\n : {}),\n ...('attributes' in params && params.attributes),\n };\n\n return [\n 'svg',\n attributes,\n icon.node.map((child): LucideIconNode => {\n const [name, attrs, children] = child;\n const nextAttrs = params.nonScalingStroke\n ? { [getAttributeName('vector-effect')]: 'non-scaling-stroke', ...attrs }\n : attrs;\n\n return children ? [name, nextAttrs, children] : [name, nextAttrs];\n }),\n ];\n}\n\nexport default buildLucideIconNode;\n", "import buildLucideIconNode from './buildLucideIconNode';\nimport type { LucideBuildParams, LucideIconData, LucideIconNode } from './types';\n\n/**\n * Creates a React-compatible Lucide icon node (an svgson-like format) from a Lucide icon object.\n *\n * @param icon The icon to build.\n * @param params Additional build parameters.\n */\nfunction buildLucideIconForReact(\n icon: LucideIconData,\n params: LucideBuildParams = {},\n): LucideIconNode {\n return buildLucideIconNode(icon, {\n ...params,\n attributeNames: {\n ...params.attributeNames,\n class: 'className',\n 'stroke-width': 'strokeWidth',\n 'stroke-linecap': 'strokeLinecap',\n 'stroke-linejoin': 'strokeLinejoin',\n 'vector-effect': 'vectorEffect',\n },\n });\n}\n\nexport default buildLucideIconForReact;\n", "/**\n * Check if a component has an accessibility prop\n *\n * @param {object} props\n * @returns {boolean} Whether the component has an accessibility prop\n */\nexport const hasA11yProp = (props: object) => {\n for (const prop in props) {\n if (prop.startsWith('aria-') || prop === 'role' || prop === 'title') {\n return true;\n }\n }\n\n return false;\n};\n", "'use client';\n\nimport { createContext, createElement, type ReactNode, useContext, useMemo } from 'react';\nimport { LucideProps } from './types';\n\ntype LucideConfig = {\n size: number;\n color: string;\n strokeWidth: number;\n /**\n * @deprecated Use `nonScalingStroke` instead.\n */\n absoluteStrokeWidth: boolean;\n nonScalingStroke: boolean;\n className: string;\n};\n\nconst LucideContext = createContext<LucideProps>({});\n\ntype LucideProviderProps = {\n children: ReactNode;\n} & Partial<LucideConfig>;\n\nexport function LucideProvider({\n children,\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className,\n}: LucideProviderProps) {\n const value = useMemo(\n () => ({\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className,\n }),\n [size, color, strokeWidth, absoluteStrokeWidth, nonScalingStroke, className],\n );\n\n return createElement(LucideContext.Provider, { value }, children);\n}\n\nexport const useLucideContext = () => useContext(LucideContext);\n", "'use client';\n\nimport { createElement, forwardRef } from 'react';\nimport { buildLucideIconForReact, hasA11yProp, mergeClasses } from '@lucide/shared';\nimport { LucideIconData, LucideIconNode, LucideProps } from './types';\nimport { useLucideContext } from './context';\n\ntype IconComponentProps = LucideProps &\n (\n | {\n iconNode: LucideIconNode[];\n icon?: never;\n }\n | {\n icon: LucideIconData;\n iconNode?: never;\n }\n );\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {boolean} props.nonScalingStroke - Whether to use non scaling strokes\n * @param {string} props.className - The class name of the icon\n * @param {LucideIconNode[]} props.children - The children of the icon\n * @param {LucideIconNode[]} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color,\n size,\n width,\n height,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className = '',\n children,\n iconNode = [],\n icon = {\n node: iconNode,\n aliases: [],\n size: 24,\n },\n ...rest\n },\n ref,\n ) => {\n const {\n size: contextSize = 24,\n strokeWidth: contextStrokeWidth = 2,\n absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,\n nonScalingStroke: contextNonScalingStroke = false,\n color: contextColor = 'currentColor',\n className: contextClass = '',\n } = useLucideContext() ?? {};\n\n const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);\n\n const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {\n color: color ?? contextColor,\n width: width ?? size ?? contextSize,\n height: height ?? size ?? contextSize,\n strokeWidth: strokeWidth ?? contextStrokeWidth,\n absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,\n nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,\n className: mergeClasses(contextClass, className),\n hasA11yProp: hasAccessibleProp,\n attributes: rest,\n });\n\n return createElement(\n name,\n {\n ref,\n ...svgAttributes,\n },\n [\n ...builtIconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n", "import { createElement, forwardRef } from 'react';\nimport { toLucideIconData, toPascalCase } from '@lucide/shared';\nimport { LucideIcon, LucideIconData, LucideIconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Creates a Lucide icon component from icon data.\n *\n * @param icon Icon data object.\n * @returns Lucide icon component.\n */\nfunction createLucideIcon(icon: LucideIconData): LucideIcon;\n\n/**\n * Creates a Lucide icon component from the legacy icon arguments.\n *\n * @param iconName Icon name.\n * @param iconNode Icon node.\n * @param aliases Optional icon aliases.\n * @returns Lucide icon component.\n */\nfunction createLucideIcon(\n iconName: string,\n iconNode: LucideIconNode[],\n aliases?: string[],\n): LucideIcon;\n\nfunction createLucideIcon(\n iconDataOrName: LucideIconData | string,\n iconNode: LucideIconNode[] = [],\n aliases: string[] = [],\n): LucideIcon {\n const iconData =\n typeof iconDataOrName === 'string'\n ? toLucideIconData(iconDataOrName, iconNode, aliases)\n : iconDataOrName;\n\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n icon: iconData,\n className,\n ...props,\n }),\n );\n\n if (iconData.name) {\n Component.displayName = toPascalCase(iconData.name);\n }\n\n return Component;\n}\n\nexport default createLucideIcon;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'braces',\n size: 24,\n node: [\n [\n 'path',\n { d: 'M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1', key: 'ezmyqa' },\n ],\n [\n 'path',\n {\n d: 'M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1',\n key: 'e1hn23',\n },\n ],\n ],\n aliases: ['curly-braces'],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Braces\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/braces\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Braces = createLucideIcon(__iconData);\n\nexport default Braces;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'chevron-right',\n size: 24,\n node: [['path', { d: 'm9 18 6-6-6-6', key: 'mthhwq' }]],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name ChevronRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronRight = createLucideIcon(__iconData);\n\nexport default ChevronRight;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'eye-off',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49',\n key: 'ct8e1f',\n },\n ],\n ['path', { d: 'M14.084 14.158a3 3 0 0 1-4.242-4.242', key: '151rxh' }],\n [\n 'path',\n {\n d: 'M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143',\n key: '13bj9a',\n },\n ],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name EyeOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/eye-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst EyeOff = createLucideIcon(__iconData);\n\nexport default EyeOff;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'eye',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0',\n key: '1nclc0',\n },\n ],\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Eye\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/eye\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Eye = createLucideIcon(__iconData);\n\nexport default Eye;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-archive',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5',\n key: '4pqfef',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'M8 12v-1', key: '1ej8lb' }],\n ['path', { d: 'M8 18v-2', key: 'qcmpov' }],\n ['path', { d: 'M8 7V6', key: '1nbb54' }],\n ['circle', { cx: '8', cy: '20', r: '2', key: 'ckkr5m' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileArchive\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-archive\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileArchive = createLucideIcon(__iconData);\n\nexport default FileArchive;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-code-corner',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35',\n key: '1wthlu',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'm5 16-3 3 3 3', key: '331omg' }],\n ['path', { d: 'm9 22 3-3-3-3', key: 'lsp7cz' }],\n ],\n aliases: ['file-code-2'],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileCodeCorner\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-code-corner\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileCodeCorner = createLucideIcon(__iconData);\n\nexport default FileCodeCorner;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-cog',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M15 8a1 1 0 0 1-1-1V2a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8z',\n key: '1ckgky',\n },\n ],\n ['path', { d: 'M20 8v12a2 2 0 0 1-2 2h-4.182', key: '1726p0' }],\n ['path', { d: 'm3.305 19.53.923-.382', key: 'ao1pio' }],\n ['path', { d: 'M4 10.592V4a2 2 0 0 1 2-2h8', key: '1foop0' }],\n ['path', { d: 'm4.228 16.852-.924-.383', key: '1fv9zy' }],\n ['path', { d: 'm5.852 15.228-.383-.923', key: '1a9hc2' }],\n ['path', { d: 'm5.852 20.772-.383.924', key: '1sh9ke' }],\n ['path', { d: 'm8.148 15.228.383-.923', key: '4yu6lf' }],\n ['path', { d: 'm8.53 21.696-.382-.924', key: '18b0s9' }],\n ['path', { d: 'm9.773 16.852.922-.383', key: 'ti6xop' }],\n ['path', { d: 'm9.773 19.148.922.383', key: 'rws47d' }],\n ['circle', { cx: '7', cy: '18', r: '3', key: 'lvkj7j' }],\n ],\n aliases: ['file-cog-2'],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileCog\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-cog\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileCog = createLucideIcon(__iconData);\n\nexport default FileCog;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-image',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['circle', { cx: '10', cy: '12', r: '2', key: '737tya' }],\n ['path', { d: 'm20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22', key: 'wt3hpn' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileImage\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileImage = createLucideIcon(__iconData);\n\nexport default FileImage;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-terminal',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'm8 16 2-2-2-2', key: '10vzyd' }],\n ['path', { d: 'M12 18h4', key: '1wd2n7' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileTerminal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-terminal\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileTerminal = createLucideIcon(__iconData);\n\nexport default FileTerminal;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-text',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'M10 9H8', key: 'b1mrlr' }],\n ['path', { d: 'M16 13H8', key: 't4e002' }],\n ['path', { d: 'M16 17H8', key: 'z1uh3a' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-text\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileText = createLucideIcon(__iconData);\n\nexport default FileText;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name File\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst File = createLucideIcon(__iconData);\n\nexport default File;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'folder-open',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'm6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2',\n key: 'usdka0',\n },\n ],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FolderOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/folder-open\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FolderOpen = createLucideIcon(__iconData);\n\nexport default FolderOpen;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'folder',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n key: '1kt360',\n },\n ],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Folder\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/folder\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Folder = createLucideIcon(__iconData);\n\nexport default Folder;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'palette',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z',\n key: 'e79jfc',\n },\n ],\n ['circle', { cx: '13.5', cy: '6.5', r: '.5', fill: 'currentColor', key: '1okk4w' }],\n ['circle', { cx: '17.5', cy: '10.5', r: '.5', fill: 'currentColor', key: 'f64h9f' }],\n ['circle', { cx: '6.5', cy: '12.5', r: '.5', fill: 'currentColor', key: 'qy21gx' }],\n ['circle', { cx: '8.5', cy: '7.5', r: '.5', fill: 'currentColor', key: 'fotxhn' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Palette\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/palette\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Palette = createLucideIcon(__iconData);\n\nexport default Palette;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'refresh-cw',\n size: 24,\n node: [\n ['path', { d: 'M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8', key: 'v9h5vc' }],\n ['path', { d: 'M21 3v5h-5', key: '1q7to0' }],\n ['path', { d: 'M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16', key: '3uifl3' }],\n ['path', { d: 'M8 16H3v5', key: '1cv678' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name RefreshCw\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/refresh-cw\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst RefreshCw = createLucideIcon(__iconData);\n\nexport default RefreshCw;\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/PluginRegistry\", \"workspaceAccessible\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/rpc\", \"rpc\");\n", "import { rpc } from \"@ragents/web/rpc\";\nimport { workspaceContracts, type BrowseListing, type BrowsePreview, type BrowseRoot } from \"../contract\";\n\nexport const fetchBrowseListing = (runId: string, root: BrowseRoot, directory: string): Promise<BrowseListing> =>\n rpc.call(workspaceContracts.browse.list, { runId, root, path: directory });\n\nexport const fetchBrowsePreview = (runId: string, root: BrowseRoot, file: string): Promise<BrowsePreview> =>\n rpc.call(workspaceContracts.browse.preview, { runId, root, path: file });\n", "import {\n Braces,\n File,\n FileArchive,\n FileCode2,\n FileCog,\n FileImage,\n FileTerminal,\n FileText,\n Folder,\n FolderOpen,\n Palette,\n type LucideIcon,\n} from \"lucide-react\";\n\ntype FileTone = \"blue\" | \"yellow\" | \"green\" | \"teal\" | \"orange\" | \"pink\" | \"violet\" | \"red\" | \"muted\";\n\ninterface FileIconChoice {\n Icon: LucideIcon;\n tone: FileTone;\n}\n\nexport const fileToneClass: Readonly<Record<FileTone, string>> = {\n blue: \"text-info\",\n yellow: \"text-warning\",\n green: \"text-success\",\n teal: \"text-teal\",\n orange: \"text-[color-mix(in_srgb,var(--warning)_75%,var(--destructive))]\",\n pink: \"text-[color-mix(in_srgb,var(--destructive)_65%,var(--accent))]\",\n violet: \"text-primary\",\n red: \"text-destructive\",\n muted: \"text-muted-foreground\",\n};\n\nconst byExtension: Readonly<Record<string, FileIconChoice>> = {\n ts: { Icon: FileCode2, tone: \"blue\" },\n tsx: { Icon: FileCode2, tone: \"blue\" },\n mts: { Icon: FileCode2, tone: \"blue\" },\n cts: { Icon: FileCode2, tone: \"blue\" },\n js: { Icon: FileCode2, tone: \"yellow\" },\n jsx: { Icon: FileCode2, tone: \"yellow\" },\n mjs: { Icon: FileCode2, tone: \"yellow\" },\n cjs: { Icon: FileCode2, tone: \"yellow\" },\n cs: { Icon: FileCode2, tone: \"green\" },\n fs: { Icon: FileCode2, tone: \"teal\" },\n fsx: { Icon: FileCode2, tone: \"teal\" },\n py: { Icon: FileCode2, tone: \"green\" },\n json: { Icon: Braces, tone: \"yellow\" },\n md: { Icon: FileText, tone: \"violet\" },\n txt: { Icon: FileText, tone: \"muted\" },\n pdf: { Icon: FileText, tone: \"red\" },\n html: { Icon: FileCode2, tone: \"orange\" },\n htm: { Icon: FileCode2, tone: \"orange\" },\n hbs: { Icon: FileCode2, tone: \"orange\" },\n css: { Icon: Palette, tone: \"pink\" },\n png: { Icon: FileImage, tone: \"violet\" },\n jpg: { Icon: FileImage, tone: \"violet\" },\n jpeg: { Icon: FileImage, tone: \"violet\" },\n gif: { Icon: FileImage, tone: \"violet\" },\n webp: { Icon: FileImage, tone: \"violet\" },\n svg: { Icon: FileImage, tone: \"violet\" },\n ico: { Icon: FileImage, tone: \"violet\" },\n sh: { Icon: FileTerminal, tone: \"green\" },\n zsh: { Icon: FileTerminal, tone: \"green\" },\n bash: { Icon: FileTerminal, tone: \"green\" },\n yml: { Icon: FileCog, tone: \"muted\" },\n yaml: { Icon: FileCog, tone: \"muted\" },\n toml: { Icon: FileCog, tone: \"muted\" },\n ini: { Icon: FileCog, tone: \"muted\" },\n csproj: { Icon: FileCog, tone: \"blue\" },\n fsproj: { Icon: FileCog, tone: \"teal\" },\n sln: { Icon: FileCog, tone: \"blue\" },\n slnx: { Icon: FileCog, tone: \"blue\" },\n zip: { Icon: FileArchive, tone: \"orange\" },\n gz: { Icon: FileArchive, tone: \"orange\" },\n tar: { Icon: FileArchive, tone: \"orange\" },\n lock: { Icon: FileCog, tone: \"muted\" },\n};\n\nconst byName: Readonly<Record<string, FileIconChoice>> = {\n \"package.json\": { Icon: Braces, tone: \"green\" },\n \"pnpm-lock.yaml\": { Icon: FileCog, tone: \"muted\" },\n \"tsconfig.json\": { Icon: Braces, tone: \"blue\" },\n \".gitignore\": { Icon: FileCog, tone: \"muted\" },\n dockerfile: { Icon: FileCog, tone: \"teal\" },\n};\n\nexport const fileIconFor = (name: string, kind: \"directory\" | \"file\", open: boolean): FileIconChoice => {\n if (kind === \"directory\") return { Icon: open ? FolderOpen : Folder, tone: \"muted\" };\n const named = byName[name.toLowerCase()];\n if (named) return named;\n const extension = name.includes(\".\") ? name.toLowerCase().split(\".\").at(-1) ?? \"\" : \"\";\n return byExtension[extension] ?? { Icon: File, tone: \"muted\" };\n};\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/SourceCode\", \"SourceCode\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"Fragment\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsx\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsxs\");\n", "import {\n Alert,\n Button,\n Empty,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n Toggle,\n} from \"@ragents/web/ui\";\nimport { useEffect, useRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { ChevronRight, Eye, EyeOff, FolderOpen, RefreshCw } from \"lucide-react\";\nimport { workspaceAccessible, type WorkspaceTabContext } from \"@ragents/web/PluginRegistry\";\nimport { rpc } from \"@ragents/web/rpc\";\nimport { BROWSE_ROOTS, workspaceContracts, type BrowseListing, type BrowsePreview, type BrowseRoot } from \"../contract\";\nimport { fetchBrowseListing, fetchBrowsePreview } from \"./api\";\nimport { fileIconFor, fileToneClass } from \"./file-icons\";\nimport { SourceCode } from \"@ragents/web/SourceCode\";\n\nconst rowClass = \"h-auto w-full justify-start gap-1.5 rounded-none py-[3px] pr-2.5 pl-(--row-indent) text-[0.7rem] font-normal data-selected:bg-primary/12 data-selected:text-primary\";\nconst previewSourceClass = \"min-w-0 px-2.5 pt-0 pb-2.5 text-xs leading-[1.45] whitespace-pre-wrap break-words\";\nconst indent = (depth: number) => ({ \"--row-indent\": `${8 + depth * 12}px` }) as CSSProperties;\n\nconst rootLabels: Readonly<Record<BrowseRoot, string>> = {\n workspace: \"Working directory\",\n files: \"File storage\",\n};\n\nconst emptyHints: Readonly<Record<BrowseRoot, string>> = {\n workspace: \"There is nothing in the run's working directory yet.\",\n files: \"There is nothing in the run's file storage yet.\",\n};\n\nconst messageOf = (cause: unknown): string => cause instanceof Error ? cause.message : String(cause);\n\nconst sizeLabel = (bytes: number): string => {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n};\n\nconst timeLabel = (value: string): string => {\n const at = new Date(value);\n return Number.isNaN(at.getTime()) ? value : at.toLocaleString(\"en-US\");\n};\n\ninterface BrowserMemory {\n expanded: ReadonlySet<string>;\n selected: string | undefined;\n}\n\nexport function FileBrowserPanel({ active, session }: WorkspaceTabContext) {\n const runId = session.session.id;\n const treeMemory = useRef(new Map<string, BrowserMemory>());\n const reachable = workspaceAccessible(session.session);\n const roots: readonly BrowseRoot[] = reachable ? BROWSE_ROOTS : [\"files\"];\n const [chosenRoot, setRoot] = useState<BrowseRoot>(\"workspace\");\n const root: BrowseRoot = reachable ? chosenRoot : \"files\";\n const stateKey = `${runId}|${root}`;\n const [listings, setListings] = useState<ReadonlyMap<string, BrowseListing>>(() => new Map());\n const [expanded, setExpanded] = useState<ReadonlySet<string>>(() => new Set());\n const [selected, setSelected] = useState<string | undefined>();\n const [preview, setPreview] = useState<BrowsePreview>();\n const [error, setError] = useState<string>();\n const [pending, setPending] = useState(false);\n const [reload, setReload] = useState(0);\n const [showHidden, setShowHidden] = useState(false);\n\n const expandedRef = useRef(expanded);\n expandedRef.current = expanded;\n\n const keyRef = useRef(stateKey);\n useEffect(() => {\n if (keyRef.current === stateKey) return;\n keyRef.current = stateKey;\n const saved = treeMemory.current.get(stateKey);\n setListings(new Map());\n setExpanded(saved?.expanded ?? new Set());\n setSelected(saved?.selected);\n setPreview(undefined);\n setError(undefined);\n }, [stateKey]);\n\n useEffect(() => {\n treeMemory.current.set(stateKey, { expanded, selected });\n }, [expanded, root, runId, selected, stateKey]);\n\n useEffect(() => {\n if (!active || selected === undefined || preview !== undefined) return;\n let alive = true;\n void fetchBrowsePreview(runId, root, selected)\n .then((value) => alive && setPreview(value))\n .catch(() => alive && setSelected(undefined));\n return () => {\n alive = false;\n };\n }, [active, preview, root, runId, selected]);\n\n useEffect(() => {\n if (!active) return;\n let alive = true;\n let timer: number | undefined;\n let busy = false;\n\n const load = async (visible: boolean) => {\n if (busy) return;\n busy = true;\n if (visible) setPending(true);\n try {\n const targets = [\"\", ...expandedRef.current];\n const results = await Promise.all(targets.map(async (directory) => ({\n directory,\n listing: await fetchBrowseListing(runId, root, directory).catch((cause: unknown) =>\n directory === \"\" ? Promise.reject(cause) : null),\n })));\n if (!alive) return;\n const gone = results.filter((result) => result.listing === null).map((result) => result.directory);\n setListings(new Map(results\n .filter((result) => result.listing !== null)\n .map((result) => [result.directory, result.listing as BrowseListing])));\n if (gone.length > 0) {\n setExpanded((current) => new Set([...current].filter((directory) =>\n !gone.some((missing) => directory === missing || directory.startsWith(`${missing}/`)))));\n }\n setError(undefined);\n } catch (cause) {\n if (alive) setError(messageOf(cause));\n } finally {\n busy = false;\n if (alive) {\n if (visible) setPending(false);\n if (timer !== undefined) window.clearTimeout(timer);\n timer = window.setTimeout(() => void load(false), 30000);\n }\n }\n };\n\n const unsubscribe = rpc.subscribe(workspaceContracts.channels.browse, { runId, root }, () => void load(false));\n void load(true);\n return () => {\n alive = false;\n unsubscribe();\n if (timer !== undefined) window.clearTimeout(timer);\n };\n }, [active, reload, root, runId]);\n\n const toggleDirectory = (directory: string) => {\n setExpanded((current) => {\n const next = new Set(current);\n if (next.has(directory)) next.delete(directory);\n else next.add(directory);\n return next;\n });\n if (listings.has(directory)) return;\n setPending(true);\n void fetchBrowseListing(runId, root, directory)\n .then((listing) => {\n setListings((current) => new Map(current).set(directory, listing));\n setError(undefined);\n })\n .catch((cause: unknown) => setError(messageOf(cause)))\n .finally(() => setPending(false));\n };\n\n const openFile = (file: string) => {\n setSelected(file);\n setPreview(undefined);\n setPending(true);\n void fetchBrowsePreview(runId, root, file)\n .then((value) => {\n setPreview(value);\n setError(undefined);\n })\n .catch((cause: unknown) => setError(messageOf(cause)))\n .finally(() => setPending(false));\n };\n\n const renderLevel = (directory: string, depth: number): ReactNode => {\n const listing = listings.get(directory);\n if (!listing) return null;\n const visible = showHidden ? listing.entries : listing.entries.filter((entry) => !entry.name.startsWith(\".\"));\n return (\n <>\n {visible.map((entry) => {\n const full = directory ? `${directory}/${entry.name}` : entry.name;\n const open = expanded.has(full);\n const { Icon, tone } = fileIconFor(entry.name, entry.kind, open);\n return (\n <div key={full}>\n <Button\n className={rowClass}\n data-selected={selected === full}\n onClick={() => entry.kind === \"directory\" ? toggleDirectory(full) : openFile(full)}\n style={indent(depth)}\n title={`${entry.name} - ${sizeLabel(entry.size)} - ${timeLabel(entry.modifiedAt)}`}\n variant=\"ghost\"\n >\n <span className={`inline-flex w-3 flex-none items-center justify-center text-muted-foreground${open ? \" [&>svg]:rotate-90\" : \"\"}`}>\n {entry.kind === \"directory\" ? <ChevronRight size={11} strokeWidth={2} /> : null}\n </span>\n <Icon aria-hidden className={`flex-none ${fileToneClass[tone]}`} size={14} strokeWidth={1.7} />\n <span className=\"min-w-0 flex-1 truncate text-left font-mono\">{entry.name}</span>\n {entry.kind === \"file\" && <span className=\"flex-none text-[0.64rem] text-muted-foreground tabular-nums\">{sizeLabel(entry.size)}</span>}\n </Button>\n {entry.kind === \"directory\" && open && renderLevel(full, depth + 1)}\n </div>\n );\n })}\n {listing.truncated && (\n <div className=\"py-1 pr-2.5 pl-(--row-indent) text-[0.64rem] text-muted-foreground\" style={indent(depth)}>\n Further entries are not listed.\n </div>\n )}\n </>\n );\n };\n\n const rootListing = listings.get(\"\");\n\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n <header className=\"flex items-center gap-2 px-2.5 py-2\">\n <div className=\"flex min-w-0 flex-1 gap-1\">\n {roots.map((value) => (\n <Toggle key={value} onPressedChange={() => setRoot(value)} pressed={value === root} size=\"sm\" variant=\"outline\">\n {rootLabels[value]}\n </Toggle>\n ))}\n </div>\n <div className=\"flex items-center gap-1\">\n <Toggle\n aria-label={showHidden ? \"Hide hidden entries\" : \"Show hidden entries\"}\n onPressedChange={setShowHidden}\n pressed={showHidden}\n size=\"sm\"\n title={showHidden ? \"Hide hidden entries\" : \"Show hidden entries\"}\n >\n {showHidden ? <Eye size={15} strokeWidth={1.8} /> : <EyeOff size={15} strokeWidth={1.8} />}\n </Toggle>\n <Button aria-label=\"Refresh files\" onClick={() => setReload((value) => value + 1)} size=\"icon\" title=\"Refresh\" variant=\"ghost\">\n <RefreshCw className={pending ? \"animate-spin\" : undefined} size={15} strokeWidth={1.8} />\n </Button>\n </div>\n </header>\n {error && (\n <Alert className=\"shrink-0 rounded-none border-x-0 border-t-0 border-b-border-soft bg-destructive/8 px-2.5 py-2 text-[0.68rem]\" variant=\"destructive\">\n {error}\n </Alert>\n )}\n {rootListing && <div className=\"truncate px-2.5 pt-0.5 pb-1.5 font-mono text-[0.66rem] text-muted-foreground\" title={rootListing.location}>{rootListing.location}</div>}\n {rootListing && rootListing.entries.length === 0 && (\n <Empty className=\"min-h-30 flex-none gap-2 p-7\">\n <EmptyHeader>\n <EmptyMedia><FolderOpen size={15} strokeWidth={1.7} /></EmptyMedia>\n <EmptyTitle>No files</EmptyTitle>\n <EmptyDescription>{emptyHints[root]}</EmptyDescription>\n </EmptyHeader>\n </Empty>\n )}\n <div className=\"min-h-0 flex-1 overflow-auto pb-2\">{renderLevel(\"\", 0)}</div>\n {selected && (\n <div className=\"flex min-h-0 flex-1 flex-col border-t border-border-soft\">\n <div className=\"truncate px-2.5 py-1.5 font-mono text-[0.66rem] text-muted-foreground\" title={selected}>{selected}</div>\n {preview && !preview.previewable && <div className=\"px-2.5 pb-2 text-[0.68rem] text-muted-foreground\">{preview.reason}</div>}\n {preview && preview.previewable && (\n <div className=\"min-h-0 flex-1 overflow-auto\">\n <SourceCode className={previewSourceClass} content={preview.content} path={selected} />\n </div>\n )}\n </div>\n )}\n </div>\n );\n}\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarCopy\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarItem\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarLabel\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarText\");\n", "import { useId, useMemo, useState } from \"react\";\nimport { FolderIcon } from \"lucide-react\";\nimport { Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@ragents/web/ui\";\nimport { ToolbarCopy, ToolbarItem, ToolbarLabel, ToolbarText } from \"@ragents/web/Toolbar\";\nimport type {\n SessionMetadataContext,\n StartOptionBadgeContext,\n StartOptionControlContext,\n} from \"@ragents/web/PluginRegistry\";\nimport {\n FRESH_WORKSPACE_LABEL,\n isFreshFolder,\n isWorkspaceBinding,\n storedWorkspaceBinding,\n workspaceBindingSummary,\n WORKSPACE_METADATA_ID,\n type FreshWorkspaceLabels,\n type WorkspaceBinding,\n type WorkspaceBindingPresentation,\n type WorkspaceClientInfo,\n type WorkspaceSessionMetadata,\n} from \"../contract\";\n\nexport interface BindingChoice {\n value: string;\n label: string;\n}\n\ntype FolderChoice = \"fresh\" | \"existing\";\n\nconst SERVER = \"server\";\n\nconst errorClass = \"text-[0.75rem] text-destructive\";\n\nconst labelClass = \"text-[0.66rem] font-medium text-muted-foreground\";\n\nconst messageOf = (cause: unknown): string => cause instanceof Error ? cause.message : String(cause);\n\nconst isClientInfo = (value: unknown): value is WorkspaceClientInfo => {\n const raw = value as Record<string, unknown> | null;\n return typeof raw === \"object\" && raw !== null\n && typeof raw.id === \"string\" && typeof raw.label === \"string\"\n && typeof raw.hostname === \"string\" && typeof raw.platform === \"string\"\n && Array.isArray(raw.folders) && raw.folders.every((folder) => typeof folder === \"string\")\n && typeof raw.runsDirectory === \"string\" && typeof raw.ripgrep === \"boolean\";\n};\n\nconst isFreshLabels = (value: unknown): value is FreshWorkspaceLabels => {\n const raw = value as Record<string, unknown> | null;\n return typeof raw === \"object\" && raw !== null && typeof raw.server === \"string\"\n && (raw.client === null || typeof raw.client === \"string\");\n};\n\nconst presentationFrom = (presentation: unknown, optionId: string): WorkspaceBindingPresentation => {\n const raw = presentation as Record<string, unknown> | null;\n if (typeof raw !== \"object\" || raw === null || raw.kind !== \"workspace-binding\"\n || !Array.isArray(raw.clients) || !raw.clients.every(isClientInfo)\n || !isFreshLabels(raw.fresh) || typeof raw.serverFolders !== \"boolean\") {\n throw new Error(`The start option ${optionId} does not provide a workspace presentation`);\n }\n return { kind: \"workspace-binding\", clients: raw.clients, fresh: raw.fresh, serverFolders: raw.serverFolders };\n};\n\n/** Also a frozen value from an older journal; the same mapping as on the server. */\nconst bindingFrom = (value: unknown, optionId: string): WorkspaceBinding => {\n const binding = storedWorkspaceBinding(value);\n if (!binding) throw new Error(`The value of the start option ${optionId} is not a workspace binding`);\n return binding;\n};\n\nconst machineOf = (binding: WorkspaceBinding): string => binding.machine === SERVER ? SERVER : binding.machine.client;\n\nconst folderOf = (binding: WorkspaceBinding): FolderChoice => isFreshFolder(binding.folder) ? \"fresh\" : \"existing\";\n\nconst pathOf = (binding: WorkspaceBinding): string => {\n const { folder } = binding;\n return isFreshFolder(folder) ? \"\" : folder.path;\n};\n\n/** A new folder on a workstation is the same choice, whether already frozen with a path or not. */\nconst sameBinding = (left: WorkspaceBinding, right: WorkspaceBinding): boolean =>\n machineOf(left) === machineOf(right) && folderOf(left) === folderOf(right) && pathOf(left) === pathOf(right);\n\n/** The server, the connected workstations only where the host offers them, and an already chosen workstation so that the choice stays readable. */\nexport const workspaceMachineChoices = (\n presentation: WorkspaceBindingPresentation,\n binding: WorkspaceBinding,\n machines: StartOptionControlContext[\"machines\"],\n): BindingChoice[] => {\n const { machine } = binding;\n const clients = machines === \"all\" ? presentation.clients : [];\n const current = machine === SERVER || clients.some((client) => client.id === machine.client) ? []\n : [{ value: machine.client, label: presentation.clients.some((client) => client.id === machine.client)\n ? `Workstation ${machine.label}` : `Workstation ${machine.label} (not connected)` }];\n return [\n { value: SERVER, label: \"Server\" },\n ...clients.map((client) => ({ value: client.id, label: `Workstation ${client.label}` })),\n ...current,\n ];\n};\n\n/** On the server, the new folder always exists, an existing one only without a contribution that excludes it; on a workstation the other way around. */\nexport const workspaceFolderChoices = (presentation: WorkspaceBindingPresentation, machine: string): BindingChoice[] => {\n const existing = { value: \"existing\", label: \"Existing folder\" };\n if (machine === SERVER) {\n return [{ value: \"fresh\", label: presentation.fresh.server }, ...(presentation.serverFolders ? [existing] : [])];\n }\n return [...(presentation.fresh.client === null ? [] : [{ value: \"fresh\", label: presentation.fresh.client }]), existing];\n};\n\nexport const workspaceMetadataFrom = (value: unknown): WorkspaceSessionMetadata | undefined => {\n const raw = value as Record<string, unknown> | null;\n if (typeof raw !== \"object\" || raw === null || typeof raw.summary !== \"string\" || !isWorkspaceBinding(raw.binding)) {\n return undefined;\n }\n return { binding: raw.binding, summary: raw.summary };\n};\n\nconst parse = (option: StartOptionControlContext[\"option\"]) => {\n try {\n return {\n presentation: presentationFrom(option.presentation, option.id),\n binding: bindingFrom(option.value, option.id),\n };\n } catch (cause) {\n return { message: messageOf(cause) };\n }\n};\n\nexport function WorkspaceBindingControl({ disabled, error, machines: offeredMachines, option, setValue }: StartOptionControlContext) {\n const [machineDraft, setMachine] = useState<string | undefined>(undefined);\n const [folderDraft, setFolder] = useState<FolderChoice | undefined>(undefined);\n const [draft, setDraft] = useState<string | undefined>(undefined);\n const pathId = useId();\n const parsed = useMemo(() => parse(option), [option]);\n if (\"message\" in parsed) return <p className={errorClass} role=\"alert\">{parsed.message}</p>;\n const { presentation, binding } = parsed;\n\n const machine = machineDraft ?? machineOf(binding);\n const folder = folderDraft ?? folderOf(binding);\n const path = draft ?? pathOf(binding);\n const machines = workspaceMachineChoices(presentation, binding, offeredMachines);\n const folderChoices = workspaceFolderChoices(presentation, machine);\n const client = presentation.clients.find((entry) => entry.id === machine);\n const offered = folder === \"existing\" ? client?.folders.map((entry) => ({ value: entry, label: entry })) ?? [] : [];\n\n const bindingOf = (nextMachine: string, nextFolder: FolderChoice, nextPath: string): WorkspaceBinding | undefined => {\n const label = presentation.clients.find((entry) => entry.id === nextMachine)?.label\n ?? (binding.machine !== SERVER && binding.machine.client === nextMachine ? binding.machine.label : nextMachine);\n const where = nextMachine === SERVER ? SERVER : { client: nextMachine, label };\n if (nextFolder === \"fresh\") return { machine: where, folder: \"fresh\" };\n return nextPath === \"\" ? undefined : { machine: where, folder: { path: nextPath } };\n };\n\n const commit = (nextMachine: string, nextFolder: FolderChoice, nextPath: string) => {\n const next = bindingOf(nextMachine, nextFolder, nextPath);\n if (next && !sameBinding(next, binding)) void setValue(next);\n };\n\n const chooseMachine = (next: string) => {\n const available = workspaceFolderChoices(presentation, next).map((choice) => choice.value as FolderChoice);\n const nextFolder = available.includes(folder) ? folder : available[0]!;\n const nextPath = path === \"\" ? presentation.clients.find((entry) => entry.id === next)?.folders[0] ?? \"\" : path;\n setMachine(next);\n setFolder(nextFolder);\n setDraft(nextPath);\n commit(next, nextFolder, nextPath);\n };\n\n const chooseFolder = (next: FolderChoice) => {\n const nextPath = path === \"\" ? client?.folders[0] ?? \"\" : path;\n setFolder(next);\n setDraft(nextPath);\n commit(machine, next, nextPath);\n };\n\n const chooseOffered = (next: string) => {\n setDraft(next);\n commit(machine, folder, next);\n };\n\n return (\n <div className=\"flex w-full flex-col items-start gap-2\">\n <span className=\"text-[0.72rem] font-semibold text-muted-foreground\">Workspace</span>\n <div className=\"flex w-full flex-wrap items-end gap-2\">\n <div className=\"flex flex-col gap-1\">\n <span className={labelClass}>Machine</span>\n <Select disabled={disabled} items={machines} onValueChange={(next) => { if (next !== null) chooseMachine(next); }} value={machine}>\n <SelectTrigger aria-label=\"Workspace machine\" className=\"min-w-0 max-w-full\" size=\"sm\"><SelectValue /></SelectTrigger>\n <SelectContent>{machines.map((choice) => <SelectItem key={choice.value} value={choice.value}>{choice.label}</SelectItem>)}</SelectContent>\n </Select>\n </div>\n <div className=\"flex flex-col gap-1\">\n <span className={labelClass}>Folder</span>\n <Select disabled={disabled} items={folderChoices} onValueChange={(next) => { if (next !== null) chooseFolder(next as FolderChoice); }} value={folder}>\n <SelectTrigger aria-label=\"Workspace folder\" className=\"min-w-0 max-w-full\" size=\"sm\"><SelectValue /></SelectTrigger>\n <SelectContent>{folderChoices.map((choice) => <SelectItem key={choice.value} value={choice.value}>{choice.label}</SelectItem>)}</SelectContent>\n </Select>\n </div>\n {folder === \"existing\" && (\n <div className=\"flex min-w-[15rem] flex-1 flex-col gap-1\">\n <Label className={labelClass} htmlFor={pathId}>Absolute path</Label>\n <Input\n className=\"h-7 text-sm\"\n disabled={disabled}\n id={pathId}\n onBlur={() => commit(machine, folder, path)}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => { if (event.key === \"Enter\") commit(machine, folder, path); }}\n placeholder=\"/Users/name/project\"\n value={path}\n />\n </div>\n )}\n {offered.length > 0 && (\n <div className=\"flex flex-col gap-1\">\n <span className={labelClass}>Offered folder</span>\n <Select disabled={disabled} items={offered} onValueChange={(next) => { if (next !== null) chooseOffered(next); }} value={offered.some((entry) => entry.value === path) ? path : null}>\n <SelectTrigger aria-label=\"Offered folder\" className=\"min-w-0 max-w-full\" size=\"sm\"><SelectValue placeholder=\"Apply\" /></SelectTrigger>\n <SelectContent>{offered.map((entry) => <SelectItem key={entry.value} value={entry.value}>{entry.label}</SelectItem>)}</SelectContent>\n </Select>\n </div>\n )}\n </div>\n {error && <p className={errorClass} role=\"alert\">{error}</p>}\n </div>\n );\n}\n\nconst freshLabelsOf = (presentation: unknown): FreshWorkspaceLabels => {\n const raw = presentation as Record<string, unknown> | null;\n return typeof raw === \"object\" && raw !== null && isFreshLabels(raw.fresh) ? raw.fresh : { server: FRESH_WORKSPACE_LABEL, client: FRESH_WORKSPACE_LABEL };\n};\n\nexport function WorkspaceBindingBadge({ option }: StartOptionBadgeContext) {\n if (!option.locked) return null;\n let binding: WorkspaceBinding;\n try {\n binding = bindingFrom(option.value, option.id);\n } catch (cause) {\n return <ToolbarItem title={messageOf(cause)}><ToolbarText>Workspace unreadable</ToolbarText></ToolbarItem>;\n }\n const summary = workspaceBindingSummary(binding, freshLabelsOf(option.presentation));\n return (\n <ToolbarItem title={`Workspace: ${summary}`}>\n <ToolbarCopy><ToolbarLabel>Workspace</ToolbarLabel><ToolbarText>{summary}</ToolbarText></ToolbarCopy>\n </ToolbarItem>\n );\n}\n\nexport function WorkspaceMetadata({ placement, session }: SessionMetadataContext) {\n const metadata = workspaceMetadataFrom(session.metadata?.[WORKSPACE_METADATA_ID]);\n if (!metadata) return null;\n if (placement === \"list\") {\n const { machine, folder } = metadata.binding;\n if (machine === \"server\" && folder === \"fresh\") return null;\n return (\n <span className=\"flex max-w-full items-center gap-1.5 overflow-hidden pl-px text-xs text-muted-foreground\" title={`Workspace: ${metadata.summary}`}>\n <FolderIcon aria-hidden className=\"size-3 flex-none\" />\n <span className=\"truncate\">{metadata.summary}</span>\n </span>\n );\n }\n return (\n <ToolbarItem title={`Workspace: ${metadata.summary}`}>\n <FolderIcon aria-hidden className=\"size-3.5\" />\n <ToolbarCopy><ToolbarLabel>Workspace</ToolbarLabel><ToolbarText>{metadata.summary}</ToolbarText></ToolbarCopy>\n </ToolbarItem>\n );\n}\n", "import type { WebPlugin } from \"@ragents/web/PluginRegistry\";\nimport { WORKSPACE_BINDING_OPTION_ID, WORKSPACE_PLUGIN_ID } from \"../contract\";\nimport { FileBrowserPanel } from \"./FileBrowser\";\nimport { WorkspaceBindingBadge, WorkspaceBindingControl, WorkspaceMetadata } from \"./WorkspaceBinding\";\n\nexport const WORKSPACE_FILES_TAB_ID = \"ragents.workspace.files\";\n\nfunction IconFiles() {\n return (\n <svg aria-hidden fill=\"none\" height=\"15\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"1.7\" viewBox=\"0 0 24 24\" width=\"15\">\n <path d=\"M3 6.5A1.5 1.5 0 0 1 4.5 5h4L10 7h9.5A1.5 1.5 0 0 1 21 8.5v9a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 17.5z\" />\n <path d=\"M3 11h18\" />\n </svg>\n );\n}\n\nexport const webPlugin: WebPlugin = {\n id: WORKSPACE_PLUGIN_ID,\n workspaceTabs: [{\n readRight: \"runs.inspect\",\n id: WORKSPACE_FILES_TAB_ID,\n label: \"Files\",\n order: 260,\n Icon: IconFiles,\n Panel: FileBrowserPanel,\n }],\n startOptions: [{\n id: WORKSPACE_BINDING_OPTION_ID,\n Control: WorkspaceBindingControl,\n Badge: WorkspaceBindingBadge,\n }],\n sessionMetadata: [{\n id: \"ragents.workspace.binding\",\n order: 90,\n Metadata: WorkspaceMetadata,\n }],\n};\n"],
|
|
5
|
-
"mappings": "AAAO,IAAMA,EAAO,CAACC,EAAWC,IAAS,CACvC,IAAMC,EAAS,WAAW,uBAA0BF,CAAS,EAC7D,GAAIE,IAAW,OAAW,MAAM,IAAI,MAAM,6BAA6BF,CAAS,EAAE,EAClF,GAAI,EAAEC,KAAQC,GAAS,MAAM,IAAI,MAAM,6BAA6BD,CAAI,SAASD,CAAS,6CAA6C,EACvI,OAAOE,EAAOD,CAAI,CACpB,ECJA,IAAOE,EAAQC,EAAK,UAAW,MAAM,ECArC,IAAOC,GAAQC,EAAK,qCAAsC,UAAU,ECApE,IAAOC,GAAQC,EAAK,mCAAoC,eAAe,ECAvE,IAAOC,EAAQC,EAAK,mCAAoC,iBAAiB,ECGlE,IAAMC,GAAsB,oBAEtBC,GAAe,CAAC,YAAa,OAAO,EAuBpCC,GAA8B,4BAE9BC,GAAwB,oBAyBxBC,GAAqB,KAAyB,CAAE,QAAS,SAAU,OAAQ,OAAQ,GAEnFC,GAA8B,wBAqCrCC,GAAWC,EAAK,OAAO,CAAE,QAAS,wBAAyB,YAAa,8BAA+B,CAAC,EAExGC,GAAkBD,EAAK,OAAO,CAAE,UAAW,EAAG,UAAW,GAAI,YAAa,qDAAsD,CAAC,EAG1HE,GAAoB,gCAE3BC,GAAwBH,EAAK,MAAMA,EAAK,OAAO,CACnD,OAAQA,EAAK,OAAO,CAAE,QAASE,GAAkB,OAAQ,UAAW,IAAK,YAAa,kBAAm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,CACd,UAAW,eACX,GAAIL,GACJ,MAAO,QACP,MAAO,IACP,KAAMC,GACN,MAAOK,EACT,CAAC,EACD,aAAc,CAAC,CACb,GAAIC,GACJ,QAASC,GACT,MAAOC,EACT,CAAC,EACD,gBAAiB,CAAC,CAChB,GAAI,4BACJ,MAAO,GACP,SAAUC,EACZ,CAAC,CACH",
|
|
4
|
+
"sourcesContent": ["export const read = (specifier, name) => {\n const module = globalThis[\"__ragentsHostModules\"]?.[specifier];\n if (module === undefined) throw new Error(`The host does not provide ${specifier}`);\n if (!(name in module)) throw new Error(`The host does not provide ${name} from ${specifier}; the bundle was built against a newer host`);\n return module[name];\n};", "import { read } from \"ragents-host-read:read\";\nexport default read(\"typebox\", \"Type\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/http/contracts\", \"openJson\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/rpc/contract\", \"defineChannel\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/engine/src/rpc/contract\", \"defineOperation\");\n", "import { Type } from \"typebox\";\nimport { openJson } from \"@ragents/engine/src/http/contracts\";\nimport { defineChannel, defineOperation } from \"@ragents/engine/src/rpc/contract\";\n\nexport const WORKSPACE_PLUGIN_ID = \"ragents.workspace\";\n\nexport const BROWSE_ROOTS = [\"workspace\", \"files\"] as const;\nexport type BrowseRoot = typeof BROWSE_ROOTS[number];\n\nexport interface BrowseEntry {\n name: string;\n kind: \"directory\" | \"file\";\n size: number;\n modifiedAt: string;\n}\n\nexport interface BrowseListing {\n root: BrowseRoot;\n /** Where the root is; on a workstation with its label. */\n location: string;\n path: string;\n entries: BrowseEntry[];\n truncated: boolean;\n}\n\nexport type BrowsePreview =\n | { root: BrowseRoot; path: string; size: number; previewable: true; content: string }\n | { root: BrowseRoot; path: string; size: number; previewable: false; reason: string };\n\nexport const WORKSPACE_BINDING_OPTION_ID = \"ragents.workspace.binding\";\n\nexport const WORKSPACE_METADATA_ID = \"ragents.workspace\";\n\n/** On which machine the workspace of a run is: the server or a workstation whose label the binding records. */\nexport type WorkspaceMachine = \"server\" | { client: string; label: string };\n\n/** An existing folder that the run neither creates nor deletes. */\nexport type ExistingWorkspaceFolder = {\n path: string;\n};\n\n/** The new folder per run on a workstation; the binding records its path there from the moment it is chosen. */\nexport type FreshWorkstationFolder = {\n path: string;\n fresh: true;\n};\n\n/** Which folder: a new one per run or an existing one; for `fresh` on the server, the host creates one per run in its storage. */\nexport type WorkspaceFolder = \"fresh\" | ExistingWorkspaceFolder | FreshWorkstationFolder;\n\n/** Where and in which folder a run works; frozen into the journal as a start option at the start. */\nexport type WorkspaceBinding = {\n machine: WorkspaceMachine;\n folder: WorkspaceFolder;\n};\n\nexport const freshServerBinding = (): WorkspaceBinding => ({ machine: \"server\", folder: \"fresh\" });\n\nexport const WORKSPACE_CLIENT_ID_PATTERN = /^[A-Za-z0-9_-]{8,64}$/;\n\n/** What a workstation says about itself at sign-in. */\nexport interface WorkspaceClientDescription {\n label: string;\n hostname: string;\n platform: string;\n folders: string[];\n /** Where the workstation creates the new folders per run, one subfolder per run named with its ID. */\n runsDirectory: string;\n /** Whether the workstation's bash finds rg; the prompt adjusts the search accordingly. */\n ripgrep: boolean;\n}\n\nexport interface WorkspaceClientInfo extends WorkspaceClientDescription {\n id: string;\n}\n\n/** What the new folder per run is called on each machine: the empty folder or a plugin's contribution; null where there is none. */\nexport interface FreshWorkspaceLabels {\n server: string;\n client: string | null;\n}\n\nexport interface WorkspaceBindingPresentation {\n kind: \"workspace-binding\";\n clients: WorkspaceClientInfo[];\n fresh: FreshWorkspaceLabels;\n /** Whether an existing folder of the server machine may be bound. */\n serverFolders: boolean;\n}\n\nexport interface WorkspaceSessionMetadata {\n binding: WorkspaceBinding;\n summary: string;\n}\n\nconst clientId = Type.String({ pattern: \"^[A-Za-z0-9_-]{8,64}$\", description: \"Stable ID of the workstation\" });\n\nconst executorVersion = Type.String({ minLength: 1, maxLength: 64, description: \"Version of the executor that the workstation brings\" });\n\n/** The ID of a plugin; a workstation looks for its bundle under exactly this name, so it cannot contain a path. */\nexport const PLUGIN_ID_PATTERN = /^[a-z0-9]+(?:[.-][a-z0-9]+)*$/;\n\nconst executorContributions = Type.Array(Type.Object({\n plugin: Type.String({ pattern: PLUGIN_ID_PATTERN.source, maxLength: 128, description: \"ID of the plugin\" }),\n revision: Type.String({ pattern: \"^[0-9a-f]{64}$\", description: \"SHA-256 of the contribution file\" }),\n}, { additionalProperties: false }), { maxItems: 64, description: \"The plugins' contributions to the executor, in the order of the server's plugin list\" });\n\nconst clientDescription = {\n label: Type.String({ minLength: 1, maxLength: 120 }),\n hostname: Type.String({ minLength: 1 }),\n platform: Type.String({ minLength: 1 }),\n folders: Type.Array(Type.String({ minLength: 1 }), { maxItems: 32 }),\n runsDirectory: Type.String({ minLength: 1, description: \"Absolute folder under which the workstation creates the new folders per run\" }),\n ripgrep: Type.Boolean({ description: \"Whether the workstation's bash finds rg\" }),\n};\n\nexport const clientInfoSchema = Type.Object({\n id: Type.String(),\n ...clientDescription,\n}, { additionalProperties: false });\n\n/** The sign-in as a workstation with the server's executor sends it. */\nexport const clientRegistrationSchema = Type.Object({\n id: clientId,\n ...clientDescription,\n executor: executorVersion,\n contributions: executorContributions,\n}, { additionalProperties: false });\n\n/** A workstation with a different executor does not know the shape of this version; the server rejects it by its version, not by its shape. */\nconst otherExecutorRegistration = Type.Object({ label: clientDescription.label, executor: executorVersion }, {\n description: \"Sign-in with a different executor version in any shape; the server rejects it with workspace-executor-version\",\n});\n\nconst absolutePath = Type.String({ minLength: 1, description: \"Absolute path in the bound folder\" });\n\n/** Not an operation of a module: releases what the workstation's executor holds for the run. */\nexport const WORKSPACE_CLIENT_STOP_OPERATION = \"stop\";\n\n/** The one operation the server calls on the workstation; progress is the JSON value of the operation, for bash { text }. */\nexport const workspaceClientContracts = {\n execute: defineOperation({\n id: \"ragents.workspace.client.execute\",\n description: \"Run an operation of the executor on the workstation, such as a tool, a file query, or the process display; the result is its value, progress its JSON value. stop releases what the workstation holds for the run.\",\n implementedBy: \"client\",\n input: Type.Object({\n runId: Type.String({ minLength: 1, maxLength: 64, description: \"ID of the run\" }),\n operation: Type.String({ minLength: 1, maxLength: 64, description: \"Name of the operation, such as read, bash, roslyn_open, files.list, or stop\" }),\n toolCallId: Type.Optional(Type.String({ minLength: 1, maxLength: 200, description: \"Only for a tool call of the model\" })),\n cwd: absolutePath,\n env: Type.Record(Type.String(), Type.String(), { description: \"What the server contributes: run marker and git rules of the sandbox\" }),\n input: Type.Unknown({ description: \"The input of the operation\" }),\n }, { additionalProperties: false }),\n result: Type.Object({ value: Type.Unknown() }, { additionalProperties: false }),\n }),\n} as const;\n\nconst browseTarget = {\n runId: Type.String({ minLength: 1, maxLength: 64, description: \"ID of the run\" }),\n root: Type.Union([Type.Literal(\"workspace\"), Type.Literal(\"files\")]),\n path: Type.String({ description: \"Path below the root; empty is the root itself\" }),\n};\n\n/** The sign-in of a workstation binds the calling connection; the server calls back through it. */\nexport const workspaceContracts = {\n browse: {\n list: defineOperation({\n id: \"ragents.workspace.browse.list\",\n description: \"List a directory in the workspace or in the file store of a run.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: Type.Object(browseTarget, { additionalProperties: false }),\n result: openJson<BrowseListing>(\"BrowseListing\"),\n }),\n preview: defineOperation({\n id: \"ragents.workspace.browse.preview\",\n description: \"Preview a file as text; files that are too large or binary state the reason instead.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n input: Type.Object(browseTarget, { additionalProperties: false }),\n result: openJson<BrowsePreview>(\"BrowsePreview\"),\n }),\n },\n channels: {\n browse: defineChannel({\n id: \"ragents.workspace.browse\",\n description: \"Reports every change below the observed root of a run.\",\n rights: [\"runs.read\", \"runs.inspect\"],\n params: Type.Object({ runId: browseTarget.runId, root: browseTarget.root }, { additionalProperties: false }),\n message: Type.Object({ changed: Type.Literal(true) }, { additionalProperties: false }),\n }),\n },\n clients: {\n list: defineOperation({\n id: \"ragents.workspace.clients.list\",\n description: \"The caller's signed-in workstations; other users' workstations do not appear even with runs.read.all.\",\n rights: [\"runs.read\"],\n input: Type.Object({}, { additionalProperties: false }),\n result: Type.Array(clientInfoSchema),\n }),\n contributions: defineOperation({\n id: \"ragents.workspace.clients.contributions\",\n description: \"The plugins' contributions to the executor that a workstation loads before sign-in and reports back with it. A workstation with a different executor version fails on its version; other fields do not matter.\",\n rights: [\"runs.write\"],\n input: Type.Object({ label: clientDescription.label, executor: executorVersion }),\n result: executorContributions,\n }),\n register: defineOperation({\n id: \"ragents.workspace.clients.register\",\n description: \"Sign in a workstation or renew its folders; the connection of this request becomes its return path and needs an event stream. A workstation with a different executor version fails on its version before the rest of the shape matters.\",\n rights: [\"runs.write\"],\n input: Type.Union([clientRegistrationSchema, otherExecutorRegistration]),\n result: clientInfoSchema,\n }),\n unregister: defineOperation({\n id: \"ragents.workspace.clients.unregister\",\n description: \"Sign out one of your own workstations; open tasks fail.\",\n rights: [\"runs.write\"],\n input: Type.Object({ id: clientId }, { additionalProperties: false }),\n result: Type.Null(),\n }),\n },\n} as const;\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => typeof value === \"object\" && value !== null;\n\nconst hasExactly = (value: Record<string, unknown>, keys: readonly string[]): boolean =>\n Object.keys(value).length === keys.length && keys.every((key) => Object.hasOwn(value, key));\n\nconst isMachine = (value: unknown): value is WorkspaceMachine =>\n value === \"server\" || (isRecord(value) && hasExactly(value, [\"client\", \"label\"])\n && typeof value.client === \"string\" && WORKSPACE_CLIENT_ID_PATTERN.test(value.client) && typeof value.label === \"string\");\n\nconst isFolder = (value: unknown): value is WorkspaceFolder => {\n if (value === \"fresh\") return true;\n if (!isRecord(value) || typeof value.path !== \"string\" || value.path.length === 0) return false;\n return hasExactly(value, [\"path\"]) || (hasExactly(value, [\"path\", \"fresh\"]) && value.fresh === true);\n};\n\n/** A new folder with a path exists only on a workstation; on the server the host creates it itself. */\nexport const isWorkspaceBinding = (value: unknown): value is WorkspaceBinding =>\n isRecord(value) && hasExactly(value, [\"machine\", \"folder\"]) && isMachine(value.machine) && isFolder(value.folder)\n && !(value.machine === \"server\" && typeof value.folder === \"object\" && \"fresh\" in value.folder);\n\nexport const isFreshFolder = (folder: WorkspaceFolder): folder is \"fresh\" | FreshWorkstationFolder =>\n folder === \"fresh\" || \"fresh\" in folder;\n\n/** The shape before machine and folder were separated, `{ kind: \"fresh\" | \"path\" | \"client\" }`, mapped unambiguously to the current one. */\nconst fromKind = (value: Record<string, unknown>): unknown => {\n switch (value.kind) {\n case \"fresh\": return hasExactly(value, [\"kind\"]) ? freshServerBinding() : undefined;\n case \"path\": return hasExactly(value, [\"kind\", \"path\"]) ? { machine: \"server\", folder: { path: value.path } } : undefined;\n case \"client\": return hasExactly(value, [\"kind\", \"client\", \"label\", \"path\"])\n ? { machine: { client: value.client, label: value.label }, folder: { path: value.path } }\n : undefined;\n default: return undefined;\n }\n};\n\n/** The stored binding; older, immutable journals carry the shape with `kind`, and only here is it mapped. */\nexport const storedWorkspaceBinding = (value: unknown): WorkspaceBinding | undefined => {\n if (isWorkspaceBinding(value)) return value;\n const mapped = isRecord(value) && Object.hasOwn(value, \"kind\") ? fromKind(value) : undefined;\n return isWorkspaceBinding(mapped) ? mapped : undefined;\n};\n\nexport const FRESH_WORKSPACE_LABEL = \"Empty folder per run\";\n\n/** What the new folder per run is called on the binding's machine; without a contribution there, the empty folder. */\nconst freshLabelOf = (binding: WorkspaceBinding, labels: FreshWorkspaceLabels): string =>\n (binding.machine === \"server\" ? labels.server : labels.client) ?? FRESH_WORKSPACE_LABEL;\n\nexport const workspaceBindingSummary = (binding: WorkspaceBinding, labels: FreshWorkspaceLabels): string => {\n const { machine, folder } = binding;\n const fresh = freshLabelOf(binding, labels);\n const where = folder === \"fresh\" ? fresh : \"fresh\" in folder ? `${folder.path} (${fresh})` : folder.path;\n return machine === \"server\" ? where : `${machine.label}: ${where}`;\n};\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Alert\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Button\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Empty\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"EmptyDescription\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"EmptyHeader\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"EmptyMedia\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"EmptyTitle\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Input\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Label\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Select\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectContent\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectItem\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectTrigger\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"SelectValue\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/ui\", \"Toggle\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"createContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"createElement\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"forwardRef\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useContext\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useEffect\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useId\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useMemo\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useRef\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react\", \"useState\");\n", "/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string?.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n", "import { toKebabCase } from './toKebabCase';\nimport type { LucideIconData, LucideIconNode } from '../build/types';\n\n/**\n * Converts legacy `(name, iconNode, aliases?)` icon arguments into icon data object format.\n */\nexport function toLucideIconData(\n iconName: string,\n iconNode: LucideIconNode[],\n aliases: string[] = [],\n): LucideIconData {\n if (iconNode == null) {\n throw new Error('[lucide]: iconNode is required when icon name is used');\n }\n\n return {\n name: toKebabCase(iconName),\n size: 24,\n node: iconNode,\n ...(aliases.length > 0 ? { aliases } : {}),\n };\n}\n", "/**\n * Converts string to camel case\n *\n * @param {string} string\n * @returns {string} A camelized string\n */\nexport const toCamelCase = <T extends string>(string: T) => {\n let out = '';\n let upperNext = false;\n\n for (const ch of string) {\n if (ch === '-' || ch === '_' || ch <= ' ') {\n upperNext = out.length > 0;\n continue;\n }\n\n if (out.length === 0) {\n out += ch.toLowerCase();\n } else {\n out += upperNext ? ch.toUpperCase() : ch;\n }\n\n upperNext = false;\n }\n\n return out as string;\n};\n", "import { CamelToPascal } from '../utility-types';\nimport { toCamelCase } from './toCamelCase';\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = toCamelCase(string);\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n", "/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return (\n Boolean(className) &&\n (className as string).trim() !== '' &&\n array.indexOf(className) === index\n );\n })\n .join(' ')\n .trim();\n", "const defaultAttributes = {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n 'stroke-width': 2,\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n} as const;\n\nexport default defaultAttributes;\n", "import type { LucideBuildParams, LucideIconData, LucideIconNode, SVGProps } from './types';\nimport defaultAttributes from './defaultAttributes';\nimport { mergeClasses } from '../utils/mergeClasses';\n\nfunction isDefined<T>(value: T | null | undefined): value is T {\n return value !== null && value !== undefined;\n}\n\n/**\n * Creates a Lucide icon node (an svgson-like format) from a Lucide icon object.\n *\n * @param icon The icon to build.\n * @param params Additional build parameters.\n */\nfunction buildLucideIconNode(icon: LucideIconData, params: LucideBuildParams = {}): LucideIconNode {\n const attributeNames = params.attributeNames ?? {};\n const getAttributeName = (attributeName: string) =>\n attributeNames[attributeName] ?? attributeName;\n\n const viewBoxWidth = icon.size ?? icon.width ?? defaultAttributes['width'];\n const viewBoxHeight = icon.size ?? icon.height ?? defaultAttributes['height'];\n const aliasClassNames =\n icon.aliases\n ?.filter((alias: string): alias is string => typeof alias === 'string' && alias.trim() !== '')\n .map((alias: string) => `lucide-${alias}`) ?? [];\n const iconClassNames = [...(icon.name ? [`lucide-${icon.name}`] : []), ...aliasClassNames];\n const classNamesFromClassName = params.className?.split(' ').filter(Boolean) ?? [];\n const className =\n params.includeDefaultClasses === false\n ? mergeClasses(...classNamesFromClassName)\n : mergeClasses('lucide', ...iconClassNames, ...classNamesFromClassName);\n\n const calculatedStrokeWidth = params.absoluteStrokeWidth\n ? (Number(params.strokeWidth ?? defaultAttributes['stroke-width']) *\n Number(icon.size ?? icon.width ?? defaultAttributes['width'])) /\n Number(params.size ?? params.width ?? defaultAttributes['width'])\n : (params.strokeWidth ?? defaultAttributes['stroke-width']);\n\n const attributes = {\n ...Object.entries(defaultAttributes).reduce((attrs, [attrName, value]) => {\n attrs[getAttributeName(attrName)] = value;\n return attrs;\n }, {} as SVGProps),\n ...('color' in params &&\n params.color && {\n [getAttributeName('stroke')]: params.color,\n }),\n ...('size' in params &&\n isDefined(params.size) && {\n [getAttributeName('width')]: params.size,\n [getAttributeName('height')]: params.size,\n }),\n ...('width' in params &&\n isDefined(params.width) && {\n [getAttributeName('width')]: params.width,\n }),\n ...('height' in params &&\n isDefined(params.height) && {\n [getAttributeName('height')]: params.height,\n }),\n [getAttributeName('stroke-width')]: calculatedStrokeWidth,\n ...(className && {\n [getAttributeName('class')]: className,\n }),\n [getAttributeName('viewBox')]: `0 0 ${viewBoxWidth} ${viewBoxHeight}`,\n ...(params.hasA11yProp === false\n ? {\n [getAttributeName('aria-hidden')]: 'true',\n }\n : {}),\n ...('attributes' in params && params.attributes),\n };\n\n return [\n 'svg',\n attributes,\n icon.node.map((child): LucideIconNode => {\n const [name, attrs, children] = child;\n const nextAttrs = params.nonScalingStroke\n ? { [getAttributeName('vector-effect')]: 'non-scaling-stroke', ...attrs }\n : attrs;\n\n return children ? [name, nextAttrs, children] : [name, nextAttrs];\n }),\n ];\n}\n\nexport default buildLucideIconNode;\n", "import buildLucideIconNode from './buildLucideIconNode';\nimport type { LucideBuildParams, LucideIconData, LucideIconNode } from './types';\n\n/**\n * Creates a React-compatible Lucide icon node (an svgson-like format) from a Lucide icon object.\n *\n * @param icon The icon to build.\n * @param params Additional build parameters.\n */\nfunction buildLucideIconForReact(\n icon: LucideIconData,\n params: LucideBuildParams = {},\n): LucideIconNode {\n return buildLucideIconNode(icon, {\n ...params,\n attributeNames: {\n ...params.attributeNames,\n class: 'className',\n 'stroke-width': 'strokeWidth',\n 'stroke-linecap': 'strokeLinecap',\n 'stroke-linejoin': 'strokeLinejoin',\n 'vector-effect': 'vectorEffect',\n },\n });\n}\n\nexport default buildLucideIconForReact;\n", "/**\n * Check if a component has an accessibility prop\n *\n * @param {object} props\n * @returns {boolean} Whether the component has an accessibility prop\n */\nexport const hasA11yProp = (props: object) => {\n for (const prop in props) {\n if (prop.startsWith('aria-') || prop === 'role' || prop === 'title') {\n return true;\n }\n }\n\n return false;\n};\n", "'use client';\n\nimport { createContext, createElement, type ReactNode, useContext, useMemo } from 'react';\nimport { LucideProps } from './types';\n\ntype LucideConfig = {\n size: number;\n color: string;\n strokeWidth: number;\n /**\n * @deprecated Use `nonScalingStroke` instead.\n */\n absoluteStrokeWidth: boolean;\n nonScalingStroke: boolean;\n className: string;\n};\n\nconst LucideContext = createContext<LucideProps>({});\n\ntype LucideProviderProps = {\n children: ReactNode;\n} & Partial<LucideConfig>;\n\nexport function LucideProvider({\n children,\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className,\n}: LucideProviderProps) {\n const value = useMemo(\n () => ({\n size,\n color,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className,\n }),\n [size, color, strokeWidth, absoluteStrokeWidth, nonScalingStroke, className],\n );\n\n return createElement(LucideContext.Provider, { value }, children);\n}\n\nexport const useLucideContext = () => useContext(LucideContext);\n", "'use client';\n\nimport { createElement, forwardRef } from 'react';\nimport { buildLucideIconForReact, hasA11yProp, mergeClasses } from '@lucide/shared';\nimport { LucideIconData, LucideIconNode, LucideProps } from './types';\nimport { useLucideContext } from './context';\n\ntype IconComponentProps = LucideProps &\n (\n | {\n iconNode: LucideIconNode[];\n icon?: never;\n }\n | {\n icon: LucideIconData;\n iconNode?: never;\n }\n );\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {boolean} props.nonScalingStroke - Whether to use non scaling strokes\n * @param {string} props.className - The class name of the icon\n * @param {LucideIconNode[]} props.children - The children of the icon\n * @param {LucideIconNode[]} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color,\n size,\n width,\n height,\n strokeWidth,\n absoluteStrokeWidth,\n nonScalingStroke,\n className = '',\n children,\n iconNode = [],\n icon = {\n node: iconNode,\n aliases: [],\n size: 24,\n },\n ...rest\n },\n ref,\n ) => {\n const {\n size: contextSize = 24,\n strokeWidth: contextStrokeWidth = 2,\n absoluteStrokeWidth: contextAbsoluteStrokeWidth = false,\n nonScalingStroke: contextNonScalingStroke = false,\n color: contextColor = 'currentColor',\n className: contextClass = '',\n } = useLucideContext() ?? {};\n\n const hasAccessibleProp = Boolean(children) || hasA11yProp(rest);\n\n const [name, svgAttributes, builtIconNode = []] = buildLucideIconForReact(icon, {\n color: color ?? contextColor,\n width: width ?? size ?? contextSize,\n height: height ?? size ?? contextSize,\n strokeWidth: strokeWidth ?? contextStrokeWidth,\n absoluteStrokeWidth: absoluteStrokeWidth ?? contextAbsoluteStrokeWidth,\n nonScalingStroke: nonScalingStroke ?? contextNonScalingStroke,\n className: mergeClasses(contextClass, className),\n hasA11yProp: hasAccessibleProp,\n attributes: rest,\n });\n\n return createElement(\n name,\n {\n ref,\n ...svgAttributes,\n },\n [\n ...builtIconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n", "import { createElement, forwardRef } from 'react';\nimport { toLucideIconData, toPascalCase } from '@lucide/shared';\nimport { LucideIcon, LucideIconData, LucideIconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Creates a Lucide icon component from icon data.\n *\n * @param icon Icon data object.\n * @returns Lucide icon component.\n */\nfunction createLucideIcon(icon: LucideIconData): LucideIcon;\n\n/**\n * Creates a Lucide icon component from the legacy icon arguments.\n *\n * @param iconName Icon name.\n * @param iconNode Icon node.\n * @param aliases Optional icon aliases.\n * @returns Lucide icon component.\n */\nfunction createLucideIcon(\n iconName: string,\n iconNode: LucideIconNode[],\n aliases?: string[],\n): LucideIcon;\n\nfunction createLucideIcon(\n iconDataOrName: LucideIconData | string,\n iconNode: LucideIconNode[] = [],\n aliases: string[] = [],\n): LucideIcon {\n const iconData =\n typeof iconDataOrName === 'string'\n ? toLucideIconData(iconDataOrName, iconNode, aliases)\n : iconDataOrName;\n\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n icon: iconData,\n className,\n ...props,\n }),\n );\n\n if (iconData.name) {\n Component.displayName = toPascalCase(iconData.name);\n }\n\n return Component;\n}\n\nexport default createLucideIcon;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'braces',\n size: 24,\n node: [\n [\n 'path',\n { d: 'M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1', key: 'ezmyqa' },\n ],\n [\n 'path',\n {\n d: 'M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1',\n key: 'e1hn23',\n },\n ],\n ],\n aliases: ['curly-braces'],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Braces\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/braces\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Braces = createLucideIcon(__iconData);\n\nexport default Braces;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'chevron-right',\n size: 24,\n node: [['path', { d: 'm9 18 6-6-6-6', key: 'mthhwq' }]],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name ChevronRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/chevron-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronRight = createLucideIcon(__iconData);\n\nexport default ChevronRight;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'eye-off',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49',\n key: 'ct8e1f',\n },\n ],\n ['path', { d: 'M14.084 14.158a3 3 0 0 1-4.242-4.242', key: '151rxh' }],\n [\n 'path',\n {\n d: 'M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143',\n key: '13bj9a',\n },\n ],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name EyeOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/eye-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst EyeOff = createLucideIcon(__iconData);\n\nexport default EyeOff;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'eye',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0',\n key: '1nclc0',\n },\n ],\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Eye\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/eye\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Eye = createLucideIcon(__iconData);\n\nexport default Eye;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-archive',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5',\n key: '4pqfef',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'M8 12v-1', key: '1ej8lb' }],\n ['path', { d: 'M8 18v-2', key: 'qcmpov' }],\n ['path', { d: 'M8 7V6', key: '1nbb54' }],\n ['circle', { cx: '8', cy: '20', r: '2', key: 'ckkr5m' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileArchive\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-archive\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileArchive = createLucideIcon(__iconData);\n\nexport default FileArchive;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-code-corner',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35',\n key: '1wthlu',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'm5 16-3 3 3 3', key: '331omg' }],\n ['path', { d: 'm9 22 3-3-3-3', key: 'lsp7cz' }],\n ],\n aliases: ['file-code-2'],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileCodeCorner\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-code-corner\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileCodeCorner = createLucideIcon(__iconData);\n\nexport default FileCodeCorner;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-cog',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M15 8a1 1 0 0 1-1-1V2a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8z',\n key: '1ckgky',\n },\n ],\n ['path', { d: 'M20 8v12a2 2 0 0 1-2 2h-4.182', key: '1726p0' }],\n ['path', { d: 'm3.305 19.53.923-.382', key: 'ao1pio' }],\n ['path', { d: 'M4 10.592V4a2 2 0 0 1 2-2h8', key: '1foop0' }],\n ['path', { d: 'm4.228 16.852-.924-.383', key: '1fv9zy' }],\n ['path', { d: 'm5.852 15.228-.383-.923', key: '1a9hc2' }],\n ['path', { d: 'm5.852 20.772-.383.924', key: '1sh9ke' }],\n ['path', { d: 'm8.148 15.228.383-.923', key: '4yu6lf' }],\n ['path', { d: 'm8.53 21.696-.382-.924', key: '18b0s9' }],\n ['path', { d: 'm9.773 16.852.922-.383', key: 'ti6xop' }],\n ['path', { d: 'm9.773 19.148.922.383', key: 'rws47d' }],\n ['circle', { cx: '7', cy: '18', r: '3', key: 'lvkj7j' }],\n ],\n aliases: ['file-cog-2'],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileCog\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-cog\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileCog = createLucideIcon(__iconData);\n\nexport default FileCog;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-image',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['circle', { cx: '10', cy: '12', r: '2', key: '737tya' }],\n ['path', { d: 'm20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22', key: 'wt3hpn' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileImage\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-image\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileImage = createLucideIcon(__iconData);\n\nexport default FileImage;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-terminal',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'm8 16 2-2-2-2', key: '10vzyd' }],\n ['path', { d: 'M12 18h4', key: '1wd2n7' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileTerminal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-terminal\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileTerminal = createLucideIcon(__iconData);\n\nexport default FileTerminal;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file-text',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ['path', { d: 'M10 9H8', key: 'b1mrlr' }],\n ['path', { d: 'M16 13H8', key: 't4e002' }],\n ['path', { d: 'M16 17H8', key: 'z1uh3a' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FileText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file-text\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileText = createLucideIcon(__iconData);\n\nexport default FileText;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'file',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',\n key: '1oefj6',\n },\n ],\n ['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5', key: 'wfsgrz' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name File\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/file\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst File = createLucideIcon(__iconData);\n\nexport default File;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'folder-open',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'm6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2',\n key: 'usdka0',\n },\n ],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name FolderOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/folder-open\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FolderOpen = createLucideIcon(__iconData);\n\nexport default FolderOpen;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'folder',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n key: '1kt360',\n },\n ],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Folder\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/folder\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Folder = createLucideIcon(__iconData);\n\nexport default Folder;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'palette',\n size: 24,\n node: [\n [\n 'path',\n {\n d: 'M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z',\n key: 'e79jfc',\n },\n ],\n ['circle', { cx: '13.5', cy: '6.5', r: '.5', fill: 'currentColor', key: '1okk4w' }],\n ['circle', { cx: '17.5', cy: '10.5', r: '.5', fill: 'currentColor', key: 'f64h9f' }],\n ['circle', { cx: '6.5', cy: '12.5', r: '.5', fill: 'currentColor', key: 'qy21gx' }],\n ['circle', { cx: '8.5', cy: '7.5', r: '.5', fill: 'currentColor', key: 'fotxhn' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Palette\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/palette\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Palette = createLucideIcon(__iconData);\n\nexport default Palette;\n", "import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'refresh-cw',\n size: 24,\n node: [\n ['path', { d: 'M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8', key: 'v9h5vc' }],\n ['path', { d: 'M21 3v5h-5', key: '1q7to0' }],\n ['path', { d: 'M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16', key: '3uifl3' }],\n ['path', { d: 'M8 16H3v5', key: '1cv678' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name RefreshCw\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/refresh-cw\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst RefreshCw = createLucideIcon(__iconData);\n\nexport default RefreshCw;\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/PluginRegistry\", \"workspaceAccessible\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/rpc\", \"rpc\");\n", "import { rpc } from \"@ragents/web/rpc\";\nimport { workspaceContracts, type BrowseListing, type BrowsePreview, type BrowseRoot } from \"../contract\";\n\nexport const fetchBrowseListing = (runId: string, root: BrowseRoot, directory: string): Promise<BrowseListing> =>\n rpc.call(workspaceContracts.browse.list, { runId, root, path: directory });\n\nexport const fetchBrowsePreview = (runId: string, root: BrowseRoot, file: string): Promise<BrowsePreview> =>\n rpc.call(workspaceContracts.browse.preview, { runId, root, path: file });\n", "import {\n Braces,\n File,\n FileArchive,\n FileCode2,\n FileCog,\n FileImage,\n FileTerminal,\n FileText,\n Folder,\n FolderOpen,\n Palette,\n type LucideIcon,\n} from \"lucide-react\";\n\ntype FileTone = \"blue\" | \"yellow\" | \"green\" | \"teal\" | \"orange\" | \"pink\" | \"violet\" | \"red\" | \"muted\";\n\ninterface FileIconChoice {\n Icon: LucideIcon;\n tone: FileTone;\n}\n\nexport const fileToneClass: Readonly<Record<FileTone, string>> = {\n blue: \"text-info\",\n yellow: \"text-warning\",\n green: \"text-success\",\n teal: \"text-teal\",\n orange: \"text-[color-mix(in_srgb,var(--warning)_75%,var(--destructive))]\",\n pink: \"text-[color-mix(in_srgb,var(--destructive)_65%,var(--accent))]\",\n violet: \"text-primary\",\n red: \"text-destructive\",\n muted: \"text-muted-foreground\",\n};\n\nconst byExtension: Readonly<Record<string, FileIconChoice>> = {\n ts: { Icon: FileCode2, tone: \"blue\" },\n tsx: { Icon: FileCode2, tone: \"blue\" },\n mts: { Icon: FileCode2, tone: \"blue\" },\n cts: { Icon: FileCode2, tone: \"blue\" },\n js: { Icon: FileCode2, tone: \"yellow\" },\n jsx: { Icon: FileCode2, tone: \"yellow\" },\n mjs: { Icon: FileCode2, tone: \"yellow\" },\n cjs: { Icon: FileCode2, tone: \"yellow\" },\n cs: { Icon: FileCode2, tone: \"green\" },\n fs: { Icon: FileCode2, tone: \"teal\" },\n fsx: { Icon: FileCode2, tone: \"teal\" },\n py: { Icon: FileCode2, tone: \"green\" },\n json: { Icon: Braces, tone: \"yellow\" },\n md: { Icon: FileText, tone: \"violet\" },\n txt: { Icon: FileText, tone: \"muted\" },\n pdf: { Icon: FileText, tone: \"red\" },\n html: { Icon: FileCode2, tone: \"orange\" },\n htm: { Icon: FileCode2, tone: \"orange\" },\n hbs: { Icon: FileCode2, tone: \"orange\" },\n css: { Icon: Palette, tone: \"pink\" },\n png: { Icon: FileImage, tone: \"violet\" },\n jpg: { Icon: FileImage, tone: \"violet\" },\n jpeg: { Icon: FileImage, tone: \"violet\" },\n gif: { Icon: FileImage, tone: \"violet\" },\n webp: { Icon: FileImage, tone: \"violet\" },\n svg: { Icon: FileImage, tone: \"violet\" },\n ico: { Icon: FileImage, tone: \"violet\" },\n sh: { Icon: FileTerminal, tone: \"green\" },\n zsh: { Icon: FileTerminal, tone: \"green\" },\n bash: { Icon: FileTerminal, tone: \"green\" },\n yml: { Icon: FileCog, tone: \"muted\" },\n yaml: { Icon: FileCog, tone: \"muted\" },\n toml: { Icon: FileCog, tone: \"muted\" },\n ini: { Icon: FileCog, tone: \"muted\" },\n csproj: { Icon: FileCog, tone: \"blue\" },\n fsproj: { Icon: FileCog, tone: \"teal\" },\n sln: { Icon: FileCog, tone: \"blue\" },\n slnx: { Icon: FileCog, tone: \"blue\" },\n zip: { Icon: FileArchive, tone: \"orange\" },\n gz: { Icon: FileArchive, tone: \"orange\" },\n tar: { Icon: FileArchive, tone: \"orange\" },\n lock: { Icon: FileCog, tone: \"muted\" },\n};\n\nconst byName: Readonly<Record<string, FileIconChoice>> = {\n \"package.json\": { Icon: Braces, tone: \"green\" },\n \"pnpm-lock.yaml\": { Icon: FileCog, tone: \"muted\" },\n \"tsconfig.json\": { Icon: Braces, tone: \"blue\" },\n \".gitignore\": { Icon: FileCog, tone: \"muted\" },\n dockerfile: { Icon: FileCog, tone: \"teal\" },\n};\n\nexport const fileIconFor = (name: string, kind: \"directory\" | \"file\", open: boolean): FileIconChoice => {\n if (kind === \"directory\") return { Icon: open ? FolderOpen : Folder, tone: \"muted\" };\n const named = byName[name.toLowerCase()];\n if (named) return named;\n const extension = name.includes(\".\") ? name.toLowerCase().split(\".\").at(-1) ?? \"\" : \"\";\n return byExtension[extension] ?? { Icon: File, tone: \"muted\" };\n};\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/SourceCode\", \"SourceCode\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"Fragment\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsx\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"react/jsx-runtime\", \"jsxs\");\n", "import {\n Alert,\n Button,\n Empty,\n EmptyDescription,\n EmptyHeader,\n EmptyMedia,\n EmptyTitle,\n Toggle,\n} from \"@ragents/web/ui\";\nimport { useEffect, useRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { ChevronRight, Eye, EyeOff, FolderOpen, RefreshCw } from \"lucide-react\";\nimport { workspaceAccessible, type WorkspaceTabContext } from \"@ragents/web/PluginRegistry\";\nimport { rpc } from \"@ragents/web/rpc\";\nimport { BROWSE_ROOTS, workspaceContracts, type BrowseListing, type BrowsePreview, type BrowseRoot } from \"../contract\";\nimport { fetchBrowseListing, fetchBrowsePreview } from \"./api\";\nimport { fileIconFor, fileToneClass } from \"./file-icons\";\nimport { SourceCode } from \"@ragents/web/SourceCode\";\n\nconst rowClass = \"h-auto w-full justify-start gap-1.5 rounded-none py-[3px] pr-2.5 pl-(--row-indent) text-[0.7rem] font-normal data-selected:bg-primary/12 data-selected:text-primary\";\nconst previewSourceClass = \"min-w-0 px-2.5 pt-0 pb-2.5 text-xs leading-[1.45] whitespace-pre-wrap break-words\";\nconst indent = (depth: number) => ({ \"--row-indent\": `${8 + depth * 12}px` }) as CSSProperties;\n\nconst rootLabels: Readonly<Record<BrowseRoot, string>> = {\n workspace: \"Working directory\",\n files: \"File storage\",\n};\n\nconst emptyHints: Readonly<Record<BrowseRoot, string>> = {\n workspace: \"There is nothing in the run's working directory yet.\",\n files: \"There is nothing in the run's file storage yet.\",\n};\n\nconst messageOf = (cause: unknown): string => cause instanceof Error ? cause.message : String(cause);\n\nconst sizeLabel = (bytes: number): string => {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n};\n\nconst timeLabel = (value: string): string => {\n const at = new Date(value);\n return Number.isNaN(at.getTime()) ? value : at.toLocaleString();\n};\n\ninterface BrowserMemory {\n expanded: ReadonlySet<string>;\n selected: string | undefined;\n}\n\nexport function FileBrowserPanel({ active, session }: WorkspaceTabContext) {\n const runId = session.session.id;\n const treeMemory = useRef(new Map<string, BrowserMemory>());\n const reachable = workspaceAccessible(session.session);\n const roots: readonly BrowseRoot[] = reachable ? BROWSE_ROOTS : [\"files\"];\n const [chosenRoot, setRoot] = useState<BrowseRoot>(\"workspace\");\n const root: BrowseRoot = reachable ? chosenRoot : \"files\";\n const stateKey = `${runId}|${root}`;\n const [listings, setListings] = useState<ReadonlyMap<string, BrowseListing>>(() => new Map());\n const [expanded, setExpanded] = useState<ReadonlySet<string>>(() => new Set());\n const [selected, setSelected] = useState<string | undefined>();\n const [preview, setPreview] = useState<BrowsePreview>();\n const [error, setError] = useState<string>();\n const [pending, setPending] = useState(false);\n const [reload, setReload] = useState(0);\n const [showHidden, setShowHidden] = useState(false);\n\n const expandedRef = useRef(expanded);\n expandedRef.current = expanded;\n\n const keyRef = useRef(stateKey);\n useEffect(() => {\n if (keyRef.current === stateKey) return;\n keyRef.current = stateKey;\n const saved = treeMemory.current.get(stateKey);\n setListings(new Map());\n setExpanded(saved?.expanded ?? new Set());\n setSelected(saved?.selected);\n setPreview(undefined);\n setError(undefined);\n }, [stateKey]);\n\n useEffect(() => {\n treeMemory.current.set(stateKey, { expanded, selected });\n }, [expanded, root, runId, selected, stateKey]);\n\n useEffect(() => {\n if (!active || selected === undefined || preview !== undefined) return;\n let alive = true;\n void fetchBrowsePreview(runId, root, selected)\n .then((value) => alive && setPreview(value))\n .catch(() => alive && setSelected(undefined));\n return () => {\n alive = false;\n };\n }, [active, preview, root, runId, selected]);\n\n useEffect(() => {\n if (!active) return;\n let alive = true;\n let timer: number | undefined;\n let busy = false;\n\n const load = async (visible: boolean) => {\n if (busy) return;\n busy = true;\n if (visible) setPending(true);\n try {\n const targets = [\"\", ...expandedRef.current];\n const results = await Promise.all(targets.map(async (directory) => ({\n directory,\n listing: await fetchBrowseListing(runId, root, directory).catch((cause: unknown) =>\n directory === \"\" ? Promise.reject(cause) : null),\n })));\n if (!alive) return;\n const gone = results.filter((result) => result.listing === null).map((result) => result.directory);\n setListings(new Map(results\n .filter((result) => result.listing !== null)\n .map((result) => [result.directory, result.listing as BrowseListing])));\n if (gone.length > 0) {\n setExpanded((current) => new Set([...current].filter((directory) =>\n !gone.some((missing) => directory === missing || directory.startsWith(`${missing}/`)))));\n }\n setError(undefined);\n } catch (cause) {\n if (alive) setError(messageOf(cause));\n } finally {\n busy = false;\n if (alive) {\n if (visible) setPending(false);\n if (timer !== undefined) window.clearTimeout(timer);\n timer = window.setTimeout(() => void load(false), 30000);\n }\n }\n };\n\n const unsubscribe = rpc.subscribe(workspaceContracts.channels.browse, { runId, root }, () => void load(false));\n void load(true);\n return () => {\n alive = false;\n unsubscribe();\n if (timer !== undefined) window.clearTimeout(timer);\n };\n }, [active, reload, root, runId]);\n\n const toggleDirectory = (directory: string) => {\n setExpanded((current) => {\n const next = new Set(current);\n if (next.has(directory)) next.delete(directory);\n else next.add(directory);\n return next;\n });\n if (listings.has(directory)) return;\n setPending(true);\n void fetchBrowseListing(runId, root, directory)\n .then((listing) => {\n setListings((current) => new Map(current).set(directory, listing));\n setError(undefined);\n })\n .catch((cause: unknown) => setError(messageOf(cause)))\n .finally(() => setPending(false));\n };\n\n const openFile = (file: string) => {\n setSelected(file);\n setPreview(undefined);\n setPending(true);\n void fetchBrowsePreview(runId, root, file)\n .then((value) => {\n setPreview(value);\n setError(undefined);\n })\n .catch((cause: unknown) => setError(messageOf(cause)))\n .finally(() => setPending(false));\n };\n\n const renderLevel = (directory: string, depth: number): ReactNode => {\n const listing = listings.get(directory);\n if (!listing) return null;\n const visible = showHidden ? listing.entries : listing.entries.filter((entry) => !entry.name.startsWith(\".\"));\n return (\n <>\n {visible.map((entry) => {\n const full = directory ? `${directory}/${entry.name}` : entry.name;\n const open = expanded.has(full);\n const { Icon, tone } = fileIconFor(entry.name, entry.kind, open);\n return (\n <div key={full}>\n <Button\n className={rowClass}\n data-selected={selected === full}\n onClick={() => entry.kind === \"directory\" ? toggleDirectory(full) : openFile(full)}\n style={indent(depth)}\n title={`${entry.name} - ${sizeLabel(entry.size)} - ${timeLabel(entry.modifiedAt)}`}\n variant=\"ghost\"\n >\n <span className={`inline-flex w-3 flex-none items-center justify-center text-muted-foreground${open ? \" [&>svg]:rotate-90\" : \"\"}`}>\n {entry.kind === \"directory\" ? <ChevronRight size={11} strokeWidth={2} /> : null}\n </span>\n <Icon aria-hidden className={`flex-none ${fileToneClass[tone]}`} size={14} strokeWidth={1.7} />\n <span className=\"min-w-0 flex-1 truncate text-left font-mono\">{entry.name}</span>\n {entry.kind === \"file\" && <span className=\"flex-none text-[0.64rem] text-muted-foreground tabular-nums\">{sizeLabel(entry.size)}</span>}\n </Button>\n {entry.kind === \"directory\" && open && renderLevel(full, depth + 1)}\n </div>\n );\n })}\n {listing.truncated && (\n <div className=\"py-1 pr-2.5 pl-(--row-indent) text-[0.64rem] text-muted-foreground\" style={indent(depth)}>\n Further entries are not listed.\n </div>\n )}\n </>\n );\n };\n\n const rootListing = listings.get(\"\");\n\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n <header className=\"flex items-center gap-2 px-2.5 py-2\">\n <div className=\"flex min-w-0 flex-1 gap-1\">\n {roots.map((value) => (\n <Toggle key={value} onPressedChange={() => setRoot(value)} pressed={value === root} size=\"sm\" variant=\"outline\">\n {rootLabels[value]}\n </Toggle>\n ))}\n </div>\n <div className=\"flex items-center gap-1\">\n <Toggle\n aria-label={showHidden ? \"Hide hidden entries\" : \"Show hidden entries\"}\n onPressedChange={setShowHidden}\n pressed={showHidden}\n size=\"sm\"\n title={showHidden ? \"Hide hidden entries\" : \"Show hidden entries\"}\n >\n {showHidden ? <Eye size={15} strokeWidth={1.8} /> : <EyeOff size={15} strokeWidth={1.8} />}\n </Toggle>\n <Button aria-label=\"Refresh files\" onClick={() => setReload((value) => value + 1)} size=\"icon\" title=\"Refresh\" variant=\"ghost\">\n <RefreshCw className={pending ? \"animate-spin\" : undefined} size={15} strokeWidth={1.8} />\n </Button>\n </div>\n </header>\n {error && (\n <Alert className=\"shrink-0 rounded-none border-x-0 border-t-0 border-b-border-soft bg-destructive/8 px-2.5 py-2 text-[0.68rem]\" variant=\"destructive\">\n {error}\n </Alert>\n )}\n {rootListing && <div className=\"truncate px-2.5 pt-0.5 pb-1.5 font-mono text-[0.66rem] text-muted-foreground\" title={rootListing.location}>{rootListing.location}</div>}\n {rootListing && rootListing.entries.length === 0 && (\n <Empty className=\"min-h-30 flex-none gap-2 p-7\">\n <EmptyHeader>\n <EmptyMedia><FolderOpen size={15} strokeWidth={1.7} /></EmptyMedia>\n <EmptyTitle>No files</EmptyTitle>\n <EmptyDescription>{emptyHints[root]}</EmptyDescription>\n </EmptyHeader>\n </Empty>\n )}\n <div className=\"min-h-0 flex-1 overflow-auto pb-2\">{renderLevel(\"\", 0)}</div>\n {selected && (\n <div className=\"flex min-h-0 flex-1 flex-col border-t border-border-soft\">\n <div className=\"truncate px-2.5 py-1.5 font-mono text-[0.66rem] text-muted-foreground\" title={selected}>{selected}</div>\n {preview && !preview.previewable && <div className=\"px-2.5 pb-2 text-[0.68rem] text-muted-foreground\">{preview.reason}</div>}\n {preview && preview.previewable && (\n <div className=\"min-h-0 flex-1 overflow-auto\">\n <SourceCode className={previewSourceClass} content={preview.content} path={selected} />\n </div>\n )}\n </div>\n )}\n </div>\n );\n}\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarCopy\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarItem\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarLabel\");\n", "import { read } from \"ragents-host-read:read\";\nexport default read(\"@ragents/web/Toolbar\", \"ToolbarText\");\n", "import { useId, useMemo, useState } from \"react\";\nimport { FolderIcon } from \"lucide-react\";\nimport { Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"@ragents/web/ui\";\nimport { ToolbarCopy, ToolbarItem, ToolbarLabel, ToolbarText } from \"@ragents/web/Toolbar\";\nimport type {\n SessionMetadataContext,\n StartOptionBadgeContext,\n StartOptionControlContext,\n} from \"@ragents/web/PluginRegistry\";\nimport {\n FRESH_WORKSPACE_LABEL,\n isFreshFolder,\n isWorkspaceBinding,\n storedWorkspaceBinding,\n workspaceBindingSummary,\n WORKSPACE_METADATA_ID,\n type FreshWorkspaceLabels,\n type WorkspaceBinding,\n type WorkspaceBindingPresentation,\n type WorkspaceClientInfo,\n type WorkspaceSessionMetadata,\n} from \"../contract\";\n\nexport interface BindingChoice {\n value: string;\n label: string;\n}\n\ntype FolderChoice = \"fresh\" | \"existing\";\n\nconst SERVER = \"server\";\n\nconst errorClass = \"text-[0.75rem] text-destructive\";\n\nconst labelClass = \"text-[0.66rem] font-medium text-muted-foreground\";\n\nconst messageOf = (cause: unknown): string => cause instanceof Error ? cause.message : String(cause);\n\nconst isClientInfo = (value: unknown): value is WorkspaceClientInfo => {\n const raw = value as Record<string, unknown> | null;\n return typeof raw === \"object\" && raw !== null\n && typeof raw.id === \"string\" && typeof raw.label === \"string\"\n && typeof raw.hostname === \"string\" && typeof raw.platform === \"string\"\n && Array.isArray(raw.folders) && raw.folders.every((folder) => typeof folder === \"string\")\n && typeof raw.runsDirectory === \"string\" && typeof raw.ripgrep === \"boolean\";\n};\n\nconst isFreshLabels = (value: unknown): value is FreshWorkspaceLabels => {\n const raw = value as Record<string, unknown> | null;\n return typeof raw === \"object\" && raw !== null && typeof raw.server === \"string\"\n && (raw.client === null || typeof raw.client === \"string\");\n};\n\nconst presentationFrom = (presentation: unknown, optionId: string): WorkspaceBindingPresentation => {\n const raw = presentation as Record<string, unknown> | null;\n if (typeof raw !== \"object\" || raw === null || raw.kind !== \"workspace-binding\"\n || !Array.isArray(raw.clients) || !raw.clients.every(isClientInfo)\n || !isFreshLabels(raw.fresh) || typeof raw.serverFolders !== \"boolean\") {\n throw new Error(`The start option ${optionId} does not provide a workspace presentation`);\n }\n return { kind: \"workspace-binding\", clients: raw.clients, fresh: raw.fresh, serverFolders: raw.serverFolders };\n};\n\n/** Also a frozen value from an older journal; the same mapping as on the server. */\nconst bindingFrom = (value: unknown, optionId: string): WorkspaceBinding => {\n const binding = storedWorkspaceBinding(value);\n if (!binding) throw new Error(`The value of the start option ${optionId} is not a workspace binding`);\n return binding;\n};\n\nconst machineOf = (binding: WorkspaceBinding): string => binding.machine === SERVER ? SERVER : binding.machine.client;\n\nconst folderOf = (binding: WorkspaceBinding): FolderChoice => isFreshFolder(binding.folder) ? \"fresh\" : \"existing\";\n\nconst pathOf = (binding: WorkspaceBinding): string => {\n const { folder } = binding;\n return isFreshFolder(folder) ? \"\" : folder.path;\n};\n\n/** A new folder on a workstation is the same choice, whether already frozen with a path or not. */\nconst sameBinding = (left: WorkspaceBinding, right: WorkspaceBinding): boolean =>\n machineOf(left) === machineOf(right) && folderOf(left) === folderOf(right) && pathOf(left) === pathOf(right);\n\n/** The server, the connected workstations only where the host offers them, and an already chosen workstation so that the choice stays readable. */\nexport const workspaceMachineChoices = (\n presentation: WorkspaceBindingPresentation,\n binding: WorkspaceBinding,\n machines: StartOptionControlContext[\"machines\"],\n): BindingChoice[] => {\n const { machine } = binding;\n const clients = machines === \"all\" ? presentation.clients : [];\n const current = machine === SERVER || clients.some((client) => client.id === machine.client) ? []\n : [{ value: machine.client, label: presentation.clients.some((client) => client.id === machine.client)\n ? `Workstation ${machine.label}` : `Workstation ${machine.label} (not connected)` }];\n return [\n { value: SERVER, label: \"Server\" },\n ...clients.map((client) => ({ value: client.id, label: `Workstation ${client.label}` })),\n ...current,\n ];\n};\n\n/** On the server, the new folder always exists, an existing one only without a contribution that excludes it; on a workstation the other way around. */\nexport const workspaceFolderChoices = (presentation: WorkspaceBindingPresentation, machine: string): BindingChoice[] => {\n const existing = { value: \"existing\", label: \"Existing folder\" };\n if (machine === SERVER) {\n return [{ value: \"fresh\", label: presentation.fresh.server }, ...(presentation.serverFolders ? [existing] : [])];\n }\n return [...(presentation.fresh.client === null ? [] : [{ value: \"fresh\", label: presentation.fresh.client }]), existing];\n};\n\nexport const workspaceMetadataFrom = (value: unknown): WorkspaceSessionMetadata | undefined => {\n const raw = value as Record<string, unknown> | null;\n if (typeof raw !== \"object\" || raw === null || typeof raw.summary !== \"string\" || !isWorkspaceBinding(raw.binding)) {\n return undefined;\n }\n return { binding: raw.binding, summary: raw.summary };\n};\n\nconst parse = (option: StartOptionControlContext[\"option\"]) => {\n try {\n return {\n presentation: presentationFrom(option.presentation, option.id),\n binding: bindingFrom(option.value, option.id),\n };\n } catch (cause) {\n return { message: messageOf(cause) };\n }\n};\n\nexport function WorkspaceBindingControl({ disabled, error, machines: offeredMachines, option, setValue }: StartOptionControlContext) {\n const [machineDraft, setMachine] = useState<string | undefined>(undefined);\n const [folderDraft, setFolder] = useState<FolderChoice | undefined>(undefined);\n const [draft, setDraft] = useState<string | undefined>(undefined);\n const pathId = useId();\n const parsed = useMemo(() => parse(option), [option]);\n if (\"message\" in parsed) return <p className={errorClass} role=\"alert\">{parsed.message}</p>;\n const { presentation, binding } = parsed;\n\n const machine = machineDraft ?? machineOf(binding);\n const folder = folderDraft ?? folderOf(binding);\n const path = draft ?? pathOf(binding);\n const machines = workspaceMachineChoices(presentation, binding, offeredMachines);\n const folderChoices = workspaceFolderChoices(presentation, machine);\n const client = presentation.clients.find((entry) => entry.id === machine);\n const offered = folder === \"existing\" ? client?.folders.map((entry) => ({ value: entry, label: entry })) ?? [] : [];\n\n const bindingOf = (nextMachine: string, nextFolder: FolderChoice, nextPath: string): WorkspaceBinding | undefined => {\n const label = presentation.clients.find((entry) => entry.id === nextMachine)?.label\n ?? (binding.machine !== SERVER && binding.machine.client === nextMachine ? binding.machine.label : nextMachine);\n const where = nextMachine === SERVER ? SERVER : { client: nextMachine, label };\n if (nextFolder === \"fresh\") return { machine: where, folder: \"fresh\" };\n return nextPath === \"\" ? undefined : { machine: where, folder: { path: nextPath } };\n };\n\n const commit = (nextMachine: string, nextFolder: FolderChoice, nextPath: string) => {\n const next = bindingOf(nextMachine, nextFolder, nextPath);\n if (next && !sameBinding(next, binding)) void setValue(next);\n };\n\n const chooseMachine = (next: string) => {\n const available = workspaceFolderChoices(presentation, next).map((choice) => choice.value as FolderChoice);\n const nextFolder = available.includes(folder) ? folder : available[0]!;\n const nextPath = path === \"\" ? presentation.clients.find((entry) => entry.id === next)?.folders[0] ?? \"\" : path;\n setMachine(next);\n setFolder(nextFolder);\n setDraft(nextPath);\n commit(next, nextFolder, nextPath);\n };\n\n const chooseFolder = (next: FolderChoice) => {\n const nextPath = path === \"\" ? client?.folders[0] ?? \"\" : path;\n setFolder(next);\n setDraft(nextPath);\n commit(machine, next, nextPath);\n };\n\n const chooseOffered = (next: string) => {\n setDraft(next);\n commit(machine, folder, next);\n };\n\n return (\n <div className=\"flex w-full flex-col items-start gap-2\">\n <span className=\"text-[0.72rem] font-semibold text-muted-foreground\">Workspace</span>\n <div className=\"flex w-full flex-wrap items-end gap-2\">\n <div className=\"flex flex-col gap-1\">\n <span className={labelClass}>Machine</span>\n <Select disabled={disabled} items={machines} onValueChange={(next) => { if (next !== null) chooseMachine(next); }} value={machine}>\n <SelectTrigger aria-label=\"Workspace machine\" className=\"min-w-0 max-w-full\" size=\"sm\"><SelectValue /></SelectTrigger>\n <SelectContent>{machines.map((choice) => <SelectItem key={choice.value} value={choice.value}>{choice.label}</SelectItem>)}</SelectContent>\n </Select>\n </div>\n <div className=\"flex flex-col gap-1\">\n <span className={labelClass}>Folder</span>\n <Select disabled={disabled} items={folderChoices} onValueChange={(next) => { if (next !== null) chooseFolder(next as FolderChoice); }} value={folder}>\n <SelectTrigger aria-label=\"Workspace folder\" className=\"min-w-0 max-w-full\" size=\"sm\"><SelectValue /></SelectTrigger>\n <SelectContent>{folderChoices.map((choice) => <SelectItem key={choice.value} value={choice.value}>{choice.label}</SelectItem>)}</SelectContent>\n </Select>\n </div>\n {folder === \"existing\" && (\n <div className=\"flex min-w-[15rem] flex-1 flex-col gap-1\">\n <Label className={labelClass} htmlFor={pathId}>Absolute path</Label>\n <Input\n className=\"h-7 text-sm\"\n disabled={disabled}\n id={pathId}\n onBlur={() => commit(machine, folder, path)}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => { if (event.key === \"Enter\") commit(machine, folder, path); }}\n placeholder=\"/Users/name/project\"\n value={path}\n />\n </div>\n )}\n {offered.length > 0 && (\n <div className=\"flex flex-col gap-1\">\n <span className={labelClass}>Offered folder</span>\n <Select disabled={disabled} items={offered} onValueChange={(next) => { if (next !== null) chooseOffered(next); }} value={offered.some((entry) => entry.value === path) ? path : null}>\n <SelectTrigger aria-label=\"Offered folder\" className=\"min-w-0 max-w-full\" size=\"sm\"><SelectValue placeholder=\"Apply\" /></SelectTrigger>\n <SelectContent>{offered.map((entry) => <SelectItem key={entry.value} value={entry.value}>{entry.label}</SelectItem>)}</SelectContent>\n </Select>\n </div>\n )}\n </div>\n {error && <p className={errorClass} role=\"alert\">{error}</p>}\n </div>\n );\n}\n\nconst freshLabelsOf = (presentation: unknown): FreshWorkspaceLabels => {\n const raw = presentation as Record<string, unknown> | null;\n return typeof raw === \"object\" && raw !== null && isFreshLabels(raw.fresh) ? raw.fresh : { server: FRESH_WORKSPACE_LABEL, client: FRESH_WORKSPACE_LABEL };\n};\n\nexport function WorkspaceBindingBadge({ option }: StartOptionBadgeContext) {\n if (!option.locked) return null;\n let binding: WorkspaceBinding;\n try {\n binding = bindingFrom(option.value, option.id);\n } catch (cause) {\n return <ToolbarItem title={messageOf(cause)}><ToolbarText>Workspace unreadable</ToolbarText></ToolbarItem>;\n }\n const summary = workspaceBindingSummary(binding, freshLabelsOf(option.presentation));\n return (\n <ToolbarItem title={`Workspace: ${summary}`}>\n <ToolbarCopy><ToolbarLabel>Workspace</ToolbarLabel><ToolbarText>{summary}</ToolbarText></ToolbarCopy>\n </ToolbarItem>\n );\n}\n\nexport function WorkspaceMetadata({ placement, session }: SessionMetadataContext) {\n const metadata = workspaceMetadataFrom(session.metadata?.[WORKSPACE_METADATA_ID]);\n if (!metadata) return null;\n if (placement === \"list\") {\n const { machine, folder } = metadata.binding;\n if (machine === \"server\" && folder === \"fresh\") return null;\n return (\n <span className=\"flex max-w-full items-center gap-1.5 overflow-hidden pl-px text-xs text-muted-foreground\" title={`Workspace: ${metadata.summary}`}>\n <FolderIcon aria-hidden className=\"size-3 flex-none\" />\n <span className=\"truncate\">{metadata.summary}</span>\n </span>\n );\n }\n return (\n <ToolbarItem title={`Workspace: ${metadata.summary}`}>\n <FolderIcon aria-hidden className=\"size-3.5\" />\n <ToolbarCopy><ToolbarLabel>Workspace</ToolbarLabel><ToolbarText>{metadata.summary}</ToolbarText></ToolbarCopy>\n </ToolbarItem>\n );\n}\n", "import type { WebPlugin } from \"@ragents/web/PluginRegistry\";\nimport { WORKSPACE_BINDING_OPTION_ID, WORKSPACE_PLUGIN_ID } from \"../contract\";\nimport { FileBrowserPanel } from \"./FileBrowser\";\nimport { WorkspaceBindingBadge, WorkspaceBindingControl, WorkspaceMetadata } from \"./WorkspaceBinding\";\n\nexport const WORKSPACE_FILES_TAB_ID = \"ragents.workspace.files\";\n\nfunction IconFiles() {\n return (\n <svg aria-hidden fill=\"none\" height=\"15\" stroke=\"currentColor\" strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth=\"1.7\" viewBox=\"0 0 24 24\" width=\"15\">\n <path d=\"M3 6.5A1.5 1.5 0 0 1 4.5 5h4L10 7h9.5A1.5 1.5 0 0 1 21 8.5v9a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 17.5z\" />\n <path d=\"M3 11h18\" />\n </svg>\n );\n}\n\nexport const webPlugin: WebPlugin = {\n id: WORKSPACE_PLUGIN_ID,\n workspaceTabs: [{\n readRight: \"runs.inspect\",\n id: WORKSPACE_FILES_TAB_ID,\n label: \"Files\",\n order: 260,\n Icon: IconFiles,\n Panel: FileBrowserPanel,\n }],\n startOptions: [{\n id: WORKSPACE_BINDING_OPTION_ID,\n Control: WorkspaceBindingControl,\n Badge: WorkspaceBindingBadge,\n }],\n sessionMetadata: [{\n id: \"ragents.workspace.binding\",\n order: 90,\n Metadata: WorkspaceMetadata,\n }],\n};\n"],
|
|
5
|
+
"mappings": "AAAO,IAAMA,EAAO,CAACC,EAAWC,IAAS,CACvC,IAAMC,EAAS,WAAW,uBAA0BF,CAAS,EAC7D,GAAIE,IAAW,OAAW,MAAM,IAAI,MAAM,6BAA6BF,CAAS,EAAE,EAClF,GAAI,EAAEC,KAAQC,GAAS,MAAM,IAAI,MAAM,6BAA6BD,CAAI,SAASD,CAAS,6CAA6C,EACvI,OAAOE,EAAOD,CAAI,CACpB,ECJA,IAAOE,EAAQC,EAAK,UAAW,MAAM,ECArC,IAAOC,GAAQC,EAAK,qCAAsC,UAAU,ECApE,IAAOC,GAAQC,EAAK,mCAAoC,eAAe,ECAvE,IAAOC,EAAQC,EAAK,mCAAoC,iBAAiB,ECGlE,IAAMC,GAAsB,oBAEtBC,GAAe,CAAC,YAAa,OAAO,EAuBpCC,GAA8B,4BAE9BC,GAAwB,oBAyBxBC,GAAqB,KAAyB,CAAE,QAAS,SAAU,OAAQ,OAAQ,GAEnFC,GAA8B,wBAqCrCC,GAAWC,EAAK,OAAO,CAAE,QAA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W,GAAC,KAAK,OAAO,OAAO,KAAK,OAAO,eAAe,cAAc,QAAQ,eAAe,QAAQ,YAAY,MAAM,QAAQ,YAAY,MAAM,KACtJ,UAAAC,EAAC,QAAK,EAAE,+GAA+G,EACvHA,EAAC,QAAK,EAAE,WAAW,GACrB,CAEJ,CAEO,IAAMC,GAAuB,CAClC,GAAIC,GACJ,cAAe,CAAC,CACd,UAAW,eACX,GAAIL,GACJ,MAAO,QACP,MAAO,IACP,KAAMC,GACN,MAAOK,EACT,CAAC,EACD,aAAc,CAAC,CACb,GAAIC,GACJ,QAASC,GACT,MAAOC,EACT,CAAC,EACD,gBAAiB,CAAC,CAChB,GAAI,4BACJ,MAAO,GACP,SAAUC,EACZ,CAAC,CACH",
|
|
6
6
|
"names": ["read", "specifier", "name", "module", "typebox_Type_default", "read", "contracts_openJson_default", "read", "contract_defineChannel_default", "read", "contract_defineOperation_default", "read", "WORKSPACE_PLUGIN_ID", "BROWSE_ROOTS", "WORKSPACE_BINDING_OPTION_ID", "WORKSPACE_METADATA_ID", "freshServerBinding", "WORKSPACE_CLIENT_ID_PATTERN", "clientId", "typebox_Type_default", "executorVersion", "PLUGIN_ID_PATTERN", "executorContributions", "clientDescription", "clientInfoSchema", "clientRegistrationSchema", "otherExecutorRegistration", "absolutePath", "workspaceClientContracts", "contract_defineOperation_default", "typebox_Type_default", "absolutePath", "browseTarget", "workspaceContracts", "contracts_openJson_default", "contract_defineChannel_default", "clientInfoSchema", "clientDescription", "executorVersion", "executorContributions", "clientRegistrationSchema", "otherExecutorRegistration", "clientId", "isRecord", "value", "hasExactly", "keys", "key", "isMachine", "WORKSPACE_CLIENT_ID_PATTERN", "isFolder", "isWorkspaceBinding", "isFreshFolder", "folder", "fromKind", "freshServerBinding", "storedWorkspaceBinding", "mapped", "FRESH_WORKSPACE_LABEL", "freshLabelOf", "binding", "labels", "workspaceBindingSummary", "machine", "fresh", "where", "ui_Alert_default", "read", "ui_Button_default", "read", "ui_Empty_default", "read", "ui_EmptyDescription_default", "read", "ui_EmptyHeader_default", "read", "ui_EmptyMedia_default", "read", "ui_EmptyTitle_default", "read", "ui_Input_default", "read", "ui_Label_default", "read", "ui_Select_default", "read", "ui_SelectContent_default", "read", "ui_SelectItem_default", "read", "ui_SelectTrigger_default", "read", "ui_SelectValue_default", "read", "ui_Toggle_default", "read", "react_createContext_default", "read", "react_createElement_default", "read", "react_forwardRef_default", "read", "react_useContext_default", "read", "react_useEffect_default", "read", "react_useId_default", "read", "react_useMemo_default", "read", "react_useRef_default", "read", "react_useState_default", "read", "toKebabCase", "string", "toLucideIconData", "iconName", "iconNode", "aliases", "toKebabCase", "toCamelCase", "string", "out", "upperNext", "ch", "toPascalCase", "string", "camelCase", "toCamelCase", "mergeClasses", "classes", "className", "index", "array", "defaultAttributes", "isDefined", "value", "buildLucideIconNode", "icon", "params", "attributeNames", "getAttributeName", "attributeName", "viewBoxWidth", "defaultAttributes", "viewBoxHeight", "aliasClassNames", "alias", "iconClassNames", "classNamesFromClassName", "className", "mergeClasses", "calculatedStrokeWidth", "attrs", "attrName", "child", "name", "children", "nextAttrs", "buildLucideIconForReact", "icon", "params", "buildLucideIconNode", "hasA11yProp", "props", "prop", "LucideContext", "react_createContext_default", "useLucideContext", "react_useContext_default", "LucideContext", "Icon", "react_forwardRef_default", "color", "size", "width", "height", "strokeWidth", "absoluteStrokeWidth", "nonScalingStroke", "className", "children", "iconNode", "icon", "rest", "ref", "contextSize", "contextStrokeWidth", "contextAbsoluteStrokeWidth", "contextNonScalingStroke", "contextColor", "contextClass", "useLucideContext", "hasAccessibleProp", "hasA11yProp", "name", "svgAttributes", "builtIconNode", "buildLucideIconForReact", "mergeClasses", "react_createElement_default", "tag", "attrs", "createLucideIcon", "iconDataOrName", "iconNode", "aliases", "iconData", "toLucideIconData", "Component", "react_forwardRef_default", "className", "props", "ref", "react_createElement_default", "Icon", "toPascalCase", "__iconData", "Braces", "createLucideIcon", "__iconData", "ChevronRight", "createLucideIcon", "__iconData", "EyeOff", "createLucideIcon", "__iconData", "Eye", "createLucideIcon", "__iconData", "FileArchive", "createLucideIcon", "__iconData", "FileCodeCorner", "createLucideIcon", "__iconData", "FileCog", "createLucideIcon", "__iconData", "FileImage", "createLucideIcon", "__iconData", "FileTerminal", "createLucideIcon", "__iconData", "FileText", "createLucideIcon", "__iconData", "File", "createLucideIcon", "__iconData", "FolderOpen", "createLucideIcon", "__iconData", "Folder", "createLucideIcon", "__iconData", "Palette", "createLucideIcon", "__iconData", "RefreshCw", "createLucideIcon", "PluginRegistry_workspaceAccessible_default", "read", "rpc_rpc_default", "read", "fetchBrowseListing", "runId", "root", "directory", "rpc_rpc_default", "workspaceContracts", "fetchBrowsePreview", "file", "fileToneClass", "byExtension", "FileCodeCorner", "Braces", "FileText", "Palette", "FileImage", "FileTerminal", "FileCog", "FileArchive", "byName", "fileIconFor", "name", "kind", "open", "FolderOpen", "Folder", "named", "extension", "File", "SourceCode_SourceCode_default", "read", "jsx_runtime_Fragment_default", "read", "jsx_runtime_jsx_default", "read", "jsx_runtime_jsxs_default", "read", "rowClass", "previewSourceClass", "indent", "depth", "rootLabels", "emptyHints", "messageOf", "cause", "sizeLabel", "bytes", "timeLabel", "value", "at", "FileBrowserPanel", "active", "session", "runId", "treeMemory", "react_useRef_default", "reachable", "PluginRegistry_workspaceAccessible_default", "roots", "BROWSE_ROOTS", "chosenRoot", "setRoot", "react_useState_default", "root", "stateKey", "listings", "setListings", "expanded", "setExpanded", "selected", "setSelected", "preview", "setPreview", "error", "setError", "pending", "setPending", "reload", "setReload", "showHidden", "setShowHidden", "expandedRef", "keyRef", "react_useEffect_default", "saved", "alive", "fetchBrowsePreview", "timer", "busy", "load", "visible", "targets", "results", "directory", "fetchBrowseListing", "gone", "result", "current", "missing", "unsubscribe", "rpc_rpc_default", "workspaceContracts", "toggleDirectory", "next", "listing", "openFile", "file", "renderLevel", "entry", "jsx_runtime_jsxs_default", "jsx_runtime_Fragment_default", "full", "open", "Icon", "tone", "fileIconFor", "ui_Button_default", "jsx_runtime_jsx_default", "ChevronRight", "fileToneClass", "rootListing", "ui_Toggle_default", "Eye", "EyeOff", "RefreshCw", "ui_Alert_default", "ui_Empty_default", "ui_EmptyHeader_default", "ui_EmptyMedia_default", "FolderOpen", "ui_EmptyTitle_default", "ui_EmptyDescription_default", "SourceCode_SourceCode_default", "Toolbar_ToolbarCopy_default", "read", "Toolbar_ToolbarItem_default", "read", "Toolbar_ToolbarLabel_default", "read", "Toolbar_ToolbarText_default", "read", "SERVER", "errorClass", "labelClass", "messageOf", "cause", "isClientInfo", "value", "raw", "folder", "isFreshLabels", "presentationFrom", "presentation", "optionId", "bindingFrom", "binding", "storedWorkspaceBinding", "machineOf", "folderOf", "isFreshFolder", "pathOf", "sameBinding", "left", "right", "workspaceMachineChoices", "machines", "machine", "clients", "current", "client", "workspaceFolderChoices", "existing", "workspaceMetadataFrom", "isWorkspaceBinding", "parse", "option", "WorkspaceBindingControl", "disabled", "error", "offeredMachines", "setValue", "machineDraft", "setMachine", "react_useState_default", "folderDraft", "setFolder", "draft", "setDraft", "pathId", "react_useId_default", "parsed", "react_useMemo_default", "jsx_runtime_jsx_default", "path", "folderChoices", "entry", "offered", "bindingOf", "nextMachine", "nextFolder", "nextPath", "label", "where", "commit", "next", "chooseMachine", "available", "choice", "chooseFolder", "chooseOffered", "jsx_runtime_jsxs_default", "ui_Select_default", "ui_SelectTrigger_default", "ui_SelectValue_default", "ui_SelectContent_default", "ui_SelectItem_default", "ui_Label_default", "ui_Input_default", "event", "freshLabelsOf", "FRESH_WORKSPACE_LABEL", "WorkspaceBindingBadge", "Toolbar_ToolbarItem_default", "Toolbar_ToolbarText_default", "summary", "workspaceBindingSummary", "Toolbar_ToolbarCopy_default", "Toolbar_ToolbarLabel_default", "WorkspaceMetadata", "placement", "session", "metadata", "WORKSPACE_METADATA_ID", "Folder", "WORKSPACE_FILES_TAB_ID", "IconFiles", "jsx_runtime_jsxs_default", "jsx_runtime_jsx_default", "webPlugin", "WORKSPACE_PLUGIN_ID", "FileBrowserPanel", "WORKSPACE_BINDING_OPTION_ID", "WorkspaceBindingControl", "WorkspaceBindingBadge", "WorkspaceMetadata"]
|
|
7
7
|
}
|