@struktoai/mirage-agents 0.0.3-alpha.0 → 0.0.3

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/README.md CHANGED
@@ -57,7 +57,7 @@ await ws.execute('cat /s3/events/2026-05-06.parquet | jq .user')
57
57
  ## About
58
58
 
59
59
  - **One interface instead of N SDKs and M MCPs.** Every service speaks the same filesystem semantics, and pipelines compose across services as naturally as on a local disk.
60
- - **Around 50 built-in backends:** RAM, Disk, Redis, S3 / R2 / OCI / Supabase / GCS, Gmail / GDrive / GDocs / GSheets / GSlides, GitHub / Linear / Notion / Trello, Slack / Discord / Telegram / Email, MongoDB / Postgres / LanceDB, SSH, and more, mounted side-by-side under a single root.
60
+ - **Around 50 built-in backends:** RAM, Disk, Redis, S3 / R2 / OCI / Supabase / GCS, Gmail / GDrive / GDocs / GSheets / GSlides, GitHub / Linear / Notion / Trello, Slack / Discord / Email, MongoDB / Postgres / LanceDB, SSH, and more, mounted side-by-side under a single root.
61
61
  - **Portable workspaces:** clone, snapshot, and version a workspace; agent runs move between machines without restarting or reconfiguring the system.
62
62
  - **Embeddable:** the Python and TypeScript SDKs run in-process inside FastAPI, Express, browser apps, or any async runtime; no separate process required.
63
63
  - **Agent integrations:** OpenAI Agents SDK, Vercel AI SDK, LangChain, Pydantic AI, CAMEL, and OpenHands via the SDKs; coding agents like Claude Code and Codex via the lightweight CLI + daemon.
@@ -1,18 +1,16 @@
1
1
  // src/prompt.ts
2
2
  var MIRAGE_SYSTEM_PROMPT = `Your filesystem is powered by Mirage \u2014 a virtual filesystem that mounts cloud storage, local files, and in-memory data as a unified file tree.
3
3
 
4
- All file paths live under /mirage/. Do not access paths outside this folder.
5
-
6
4
  Capabilities beyond standard filesystem:
7
5
  - cat on .parquet, .orc, .feather files returns a formatted table
8
- - head -n 5 on data files returns the first 5 rows/seconds
6
+ - head -n 5 on data files returns the first 5 rows
9
7
  - grep works natively on CSV, JSON, Parquet \u2014 not just text
10
8
  - Pipes work: cat data.parquet | grep error | sort | uniq | wc -l
11
9
  - head, tail, cut, wc, sort, uniq, tee, xargs are all available
12
10
 
13
11
  You can write Python code and execute it. The workspace is pre-configured with your data sources mounted at their respective paths.
14
12
 
15
- Use the execute tool for complex operations. Use read_file/write_file/edit_file for simple file operations.
13
+ Use the execute tool for complex operations. Use read/write/edit for simple file operations.
16
14
  `;
17
15
  function buildSystemPrompt(opts = {}) {
18
16
  const parts = [MIRAGE_SYSTEM_PROMPT];
@@ -35,4 +33,4 @@ export {
35
33
  MIRAGE_SYSTEM_PROMPT,
36
34
  buildSystemPrompt
37
35
  };
38
- //# sourceMappingURL=chunk-KAHWIK63.js.map
36
+ //# sourceMappingURL=chunk-ODKR5YZI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { Workspace } from '@struktoai/mirage-core'\n\nexport const MIRAGE_SYSTEM_PROMPT = `Your filesystem is powered by Mirage — a virtual filesystem that mounts cloud storage, local files, and in-memory data as a unified file tree.\n\nCapabilities beyond standard filesystem:\n- cat on .parquet, .orc, .feather files returns a formatted table\n- head -n 5 on data files returns the first 5 rows\n- grep works natively on CSV, JSON, Parquet — not just text\n- Pipes work: cat data.parquet | grep error | sort | uniq | wc -l\n- head, tail, cut, wc, sort, uniq, tee, xargs are all available\n\nYou can write Python code and execute it. The workspace is pre-configured with your data sources mounted at their respective paths.\n\nUse the execute tool for complex operations. Use read/write/edit for simple file operations.\n`\n\nexport interface BuildSystemPromptOptions {\n workspace?: Workspace\n mountInfo?: Record<string, string>\n extraInstructions?: string\n}\n\nexport function buildSystemPrompt(opts: BuildSystemPromptOptions = {}): string {\n const parts: string[] = [MIRAGE_SYSTEM_PROMPT]\n if (opts.workspace !== undefined) {\n parts.push('Mounted data sources:\\n' + opts.workspace.filePrompt)\n } else if (opts.mountInfo !== undefined && Object.keys(opts.mountInfo).length > 0) {\n parts.push('\\nMounted data sources:')\n for (const [prefix, description] of Object.entries(opts.mountInfo)) {\n parts.push(`- ${prefix} — ${description}`)\n }\n parts.push('')\n }\n if (opts.extraInstructions !== undefined && opts.extraInstructions.length > 0) {\n parts.push(opts.extraInstructions)\n }\n return parts.join('\\n')\n}\n"],"mappings":";AAgBO,IAAM,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoB7B,SAAS,kBAAkB,OAAiC,CAAC,GAAW;AAC7E,QAAM,QAAkB,CAAC,oBAAoB;AAC7C,MAAI,KAAK,cAAc,QAAW;AAChC,UAAM,KAAK,4BAA4B,KAAK,UAAU,UAAU;AAAA,EAClE,WAAW,KAAK,cAAc,UAAa,OAAO,KAAK,KAAK,SAAS,EAAE,SAAS,GAAG;AACjF,UAAM,KAAK,yBAAyB;AACpC,eAAW,CAAC,QAAQ,WAAW,KAAK,OAAO,QAAQ,KAAK,SAAS,GAAG;AAClE,YAAM,KAAK,KAAK,MAAM,WAAM,WAAW,EAAE;AAAA,IAC3C;AACA,UAAM,KAAK,EAAE;AAAA,EACf;AACA,MAAI,KAAK,sBAAsB,UAAa,KAAK,kBAAkB,SAAS,GAAG;AAC7E,UAAM,KAAK,KAAK,iBAAiB;AAAA,EACnC;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
@@ -0,0 +1,20 @@
1
+ import * as _anthropic_ai_claude_agent_sdk from '@anthropic-ai/claude-agent-sdk';
2
+ import { Options } from '@anthropic-ai/claude-agent-sdk';
3
+ import { Workspace } from '@struktoai/mirage-core';
4
+ export { M as MIRAGE_SYSTEM_PROMPT, b as buildSystemPrompt } from '../prompt-Ca4hc1Ul.js';
5
+
6
+ declare function MirageServer(workspace: Workspace): _anthropic_ai_claude_agent_sdk.McpSdkServerConfigWithInstance;
7
+
8
+ interface BuildOptionsOptions {
9
+ systemPrompt?: string;
10
+ }
11
+ declare function buildOptions(workspace: Workspace, opts?: BuildOptionsOptions): Options;
12
+
13
+ declare const EXECUTE_DESCRIPTION: string;
14
+ declare const READ_DESCRIPTION: string;
15
+ declare const WRITE_DESCRIPTION: string;
16
+ declare const EDIT_DESCRIPTION: string;
17
+ declare const LS_DESCRIPTION = "List files and directories at the given path on the Mirage virtual filesystem.";
18
+ declare const GREP_DESCRIPTION: string;
19
+
20
+ export { type BuildOptionsOptions, EDIT_DESCRIPTION, EXECUTE_DESCRIPTION, GREP_DESCRIPTION, LS_DESCRIPTION, MirageServer, READ_DESCRIPTION, WRITE_DESCRIPTION, buildOptions };
@@ -0,0 +1,182 @@
1
+ import {
2
+ MIRAGE_SYSTEM_PROMPT,
3
+ buildSystemPrompt
4
+ } from "../chunk-ODKR5YZI.js";
5
+
6
+ // src/claude-agent-sdk/server.ts
7
+ import { VERSION, gnuDirname } from "@struktoai/mirage-core";
8
+ import { createSdkMcpServer, tool } from "@anthropic-ai/claude-agent-sdk";
9
+ import { z } from "zod";
10
+
11
+ // src/io-text.ts
12
+ function decode(value) {
13
+ if (value === null || value === void 0) return "";
14
+ return new TextDecoder("utf-8").decode(value);
15
+ }
16
+ function ioToStr(io) {
17
+ const stdout = io.stdoutText;
18
+ const stderr = io.stderrText;
19
+ if (stderr) return stdout ? `${stdout}
20
+ ${stderr}` : stderr;
21
+ return stdout;
22
+ }
23
+
24
+ // src/claude-agent-sdk/descriptions.ts
25
+ var EXECUTE_DESCRIPTION = "Run a shell-style command on the Mirage virtual filesystem. Supports cat, grep, find, head, tail, ls, wc, sort, uniq, tee, pipe, and any other Unix command on mounted resources (S3, disk, RAM, etc.). Also supports reading structured files: cat on .parquet/.orc/.csv returns a table.";
26
+ var READ_DESCRIPTION = "Read the contents of a file on the Mirage virtual filesystem. Returns line-numbered text. Optionally pass 'offset' (default 0) to start at a given line and 'limit' (default 2000) to cap the number of lines returned.";
27
+ var WRITE_DESCRIPTION = "Write content to a new file on the Mirage virtual filesystem. Fails if the file already exists; use edit to modify an existing file.";
28
+ var EDIT_DESCRIPTION = "Replace a string in an existing file on the Mirage virtual filesystem. Fails if old_string is not found or appears more than once. Pass replace_all=true (default false) to replace every occurrence.";
29
+ var LS_DESCRIPTION = "List files and directories at the given path on the Mirage virtual filesystem.";
30
+ var GREP_DESCRIPTION = "Search for a pattern in files on the Mirage virtual filesystem. Supports regex. Searches recursively under path.";
31
+
32
+ // src/claude-agent-sdk/server.ts
33
+ function textResult(text) {
34
+ return { content: [{ type: "text", text }] };
35
+ }
36
+ function errorResult(text) {
37
+ return { content: [{ type: "text", text }], isError: true };
38
+ }
39
+ function ioResult(io) {
40
+ const result = textResult(ioToStr(io));
41
+ if (io.exitCode !== 0) result.isError = true;
42
+ return result;
43
+ }
44
+ function shQuote(value) {
45
+ return `'${value.replace(/'/g, "'\\''")}'`;
46
+ }
47
+ async function ensureParents(ws, path) {
48
+ const parent = gnuDirname(path);
49
+ if (parent === "/" || parent === "" || parent === ".") return;
50
+ if (await ws.fs.exists(parent)) return;
51
+ await ensureParents(ws, parent);
52
+ try {
53
+ await ws.fs.mkdir(parent);
54
+ } catch (err) {
55
+ if (!await ws.fs.exists(parent)) throw err;
56
+ }
57
+ }
58
+ async function runExecute(ws, command) {
59
+ return ioResult(await ws.execute(command));
60
+ }
61
+ async function runRead(ws, path, offset = 0, limit = 2e3) {
62
+ let data;
63
+ try {
64
+ data = await ws.fs.readFile(path);
65
+ } catch (err) {
66
+ if (!await ws.fs.exists(path)) {
67
+ return errorResult(`Error: file '${path}' not found`);
68
+ }
69
+ return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`);
70
+ }
71
+ const text = decode(data);
72
+ const raw = text.length === 0 ? [] : text.split(/(?<=\n)/);
73
+ const lines = raw.length > 0 && raw[raw.length - 1] === "" ? raw.slice(0, -1) : raw;
74
+ const sliced = lines.slice(offset, offset + limit);
75
+ const numbered = sliced.map((line, i) => `${String(i + offset + 1).padStart(6)} ${line}`);
76
+ return textResult(numbered.join(""));
77
+ }
78
+ async function runWrite(ws, path, content) {
79
+ if (await ws.fs.exists(path)) {
80
+ return errorResult(`Error: file '${path}' already exists`);
81
+ }
82
+ await ensureParents(ws, path);
83
+ await ws.fs.writeFile(path, content);
84
+ return textResult(`Written: ${path}`);
85
+ }
86
+ async function runEdit(ws, path, oldString, newString, replaceAll = false) {
87
+ let content;
88
+ try {
89
+ content = await ws.fs.readFileText(path);
90
+ } catch {
91
+ return errorResult(`Error: file '${path}' not found`);
92
+ }
93
+ const count = content.split(oldString).length - 1;
94
+ if (count === 0) {
95
+ return errorResult(`Error: string not found in file: '${oldString}'`);
96
+ }
97
+ if (count > 1 && !replaceAll) {
98
+ return errorResult(`Error: string appears ${String(count)} times. Pass replace_all=true`);
99
+ }
100
+ const newContent = replaceAll ? content.split(oldString).join(newString) : content.replace(oldString, newString);
101
+ await ws.fs.writeFile(path, newContent);
102
+ const occurrences = replaceAll ? count : 1;
103
+ return textResult(`Edited: ${path} (${String(occurrences)} occurrence(s))`);
104
+ }
105
+ async function runLs(ws, path) {
106
+ return ioResult(await ws.execute(`ls ${shQuote(path)}`));
107
+ }
108
+ async function runGrep(ws, pattern, path) {
109
+ const io = await ws.execute(`grep -rn ${shQuote(pattern)} ${shQuote(path)}`);
110
+ return textResult(ioToStr(io));
111
+ }
112
+ function MirageServer(workspace) {
113
+ return createSdkMcpServer({
114
+ name: "mirage",
115
+ version: VERSION,
116
+ alwaysLoad: true,
117
+ tools: [
118
+ tool(
119
+ "execute_command",
120
+ EXECUTE_DESCRIPTION,
121
+ { command: z.string() },
122
+ (args) => runExecute(workspace, args.command)
123
+ ),
124
+ tool(
125
+ "read",
126
+ READ_DESCRIPTION,
127
+ { path: z.string(), offset: z.number().optional(), limit: z.number().optional() },
128
+ (args) => runRead(workspace, args.path, args.offset, args.limit),
129
+ { annotations: { readOnlyHint: true } }
130
+ ),
131
+ tool(
132
+ "write",
133
+ WRITE_DESCRIPTION,
134
+ { path: z.string(), content: z.string() },
135
+ (args) => runWrite(workspace, args.path, args.content)
136
+ ),
137
+ tool(
138
+ "edit",
139
+ EDIT_DESCRIPTION,
140
+ {
141
+ path: z.string(),
142
+ old_string: z.string(),
143
+ new_string: z.string(),
144
+ replace_all: z.boolean().optional()
145
+ },
146
+ (args) => runEdit(workspace, args.path, args.old_string, args.new_string, args.replace_all)
147
+ ),
148
+ tool("ls", LS_DESCRIPTION, { path: z.string() }, (args) => runLs(workspace, args.path), {
149
+ annotations: { readOnlyHint: true }
150
+ }),
151
+ tool(
152
+ "grep",
153
+ GREP_DESCRIPTION,
154
+ { pattern: z.string(), path: z.string() },
155
+ (args) => runGrep(workspace, args.pattern, args.path),
156
+ { annotations: { readOnlyHint: true } }
157
+ )
158
+ ]
159
+ });
160
+ }
161
+
162
+ // src/claude-agent-sdk/options.ts
163
+ function buildOptions(workspace, opts = {}) {
164
+ return {
165
+ mcpServers: { mirage: MirageServer(workspace) },
166
+ allowedTools: ["mcp__mirage__*"],
167
+ systemPrompt: opts.systemPrompt ?? buildSystemPrompt({ workspace })
168
+ };
169
+ }
170
+ export {
171
+ EDIT_DESCRIPTION,
172
+ EXECUTE_DESCRIPTION,
173
+ GREP_DESCRIPTION,
174
+ LS_DESCRIPTION,
175
+ MIRAGE_SYSTEM_PROMPT,
176
+ MirageServer,
177
+ READ_DESCRIPTION,
178
+ WRITE_DESCRIPTION,
179
+ buildOptions,
180
+ buildSystemPrompt
181
+ };
182
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/claude-agent-sdk/server.ts","../../src/io-text.ts","../../src/claude-agent-sdk/descriptions.ts","../../src/claude-agent-sdk/options.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { ExecuteResult, Workspace } from '@struktoai/mirage-core'\nimport { VERSION, gnuDirname } from '@struktoai/mirage-core'\nimport { createSdkMcpServer, tool } from '@anthropic-ai/claude-agent-sdk'\nimport { z } from 'zod'\nimport { decode, ioToStr } from '../io-text.ts'\nimport {\n EDIT_DESCRIPTION,\n EXECUTE_DESCRIPTION,\n GREP_DESCRIPTION,\n LS_DESCRIPTION,\n READ_DESCRIPTION,\n WRITE_DESCRIPTION,\n} from './descriptions.ts'\n\nexport interface ToolResult {\n [key: string]: unknown\n content: { type: 'text'; text: string }[]\n isError?: boolean\n}\n\nfunction textResult(text: string): ToolResult {\n return { content: [{ type: 'text', text }] }\n}\n\nfunction errorResult(text: string): ToolResult {\n return { content: [{ type: 'text', text }], isError: true }\n}\n\nfunction ioResult(io: ExecuteResult): ToolResult {\n const result = textResult(ioToStr(io))\n if (io.exitCode !== 0) result.isError = true\n return result\n}\n\nfunction shQuote(value: string): string {\n return `'${value.replace(/'/g, \"'\\\\''\")}'`\n}\n\nasync function ensureParents(ws: Workspace, path: string): Promise<void> {\n const parent = gnuDirname(path)\n if (parent === '/' || parent === '' || parent === '.') return\n if (await ws.fs.exists(parent)) return\n await ensureParents(ws, parent)\n try {\n await ws.fs.mkdir(parent)\n } catch (err) {\n if (!(await ws.fs.exists(parent))) throw err\n }\n}\n\nexport async function runExecute(ws: Workspace, command: string): Promise<ToolResult> {\n return ioResult(await ws.execute(command))\n}\n\nexport async function runRead(\n ws: Workspace,\n path: string,\n offset = 0,\n limit = 2000,\n): Promise<ToolResult> {\n let data: Uint8Array\n try {\n data = await ws.fs.readFile(path)\n } catch (err) {\n if (!(await ws.fs.exists(path))) {\n return errorResult(`Error: file '${path}' not found`)\n }\n return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`)\n }\n const text = decode(data)\n const raw = text.length === 0 ? [] : text.split(/(?<=\\n)/)\n const lines = raw.length > 0 && raw[raw.length - 1] === '' ? raw.slice(0, -1) : raw\n const sliced = lines.slice(offset, offset + limit)\n const numbered = sliced.map((line, i) => `${String(i + offset + 1).padStart(6)}\\t${line}`)\n return textResult(numbered.join(''))\n}\n\nexport async function runWrite(ws: Workspace, path: string, content: string): Promise<ToolResult> {\n if (await ws.fs.exists(path)) {\n return errorResult(`Error: file '${path}' already exists`)\n }\n await ensureParents(ws, path)\n await ws.fs.writeFile(path, content)\n return textResult(`Written: ${path}`)\n}\n\nexport async function runEdit(\n ws: Workspace,\n path: string,\n oldString: string,\n newString: string,\n replaceAll = false,\n): Promise<ToolResult> {\n let content: string\n try {\n content = await ws.fs.readFileText(path)\n } catch {\n return errorResult(`Error: file '${path}' not found`)\n }\n const count = content.split(oldString).length - 1\n if (count === 0) {\n return errorResult(`Error: string not found in file: '${oldString}'`)\n }\n if (count > 1 && !replaceAll) {\n return errorResult(`Error: string appears ${String(count)} times. Pass replace_all=true`)\n }\n const newContent = replaceAll\n ? content.split(oldString).join(newString)\n : content.replace(oldString, newString)\n await ws.fs.writeFile(path, newContent)\n const occurrences = replaceAll ? count : 1\n return textResult(`Edited: ${path} (${String(occurrences)} occurrence(s))`)\n}\n\nexport async function runLs(ws: Workspace, path: string): Promise<ToolResult> {\n return ioResult(await ws.execute(`ls ${shQuote(path)}`))\n}\n\nexport async function runGrep(ws: Workspace, pattern: string, path: string): Promise<ToolResult> {\n const io = await ws.execute(`grep -rn ${shQuote(pattern)} ${shQuote(path)}`)\n return textResult(ioToStr(io))\n}\n\nexport function MirageServer(workspace: Workspace) {\n return createSdkMcpServer({\n name: 'mirage',\n version: VERSION,\n alwaysLoad: true,\n tools: [\n tool('execute_command', EXECUTE_DESCRIPTION, { command: z.string() }, (args) =>\n runExecute(workspace, args.command),\n ),\n tool(\n 'read',\n READ_DESCRIPTION,\n { path: z.string(), offset: z.number().optional(), limit: z.number().optional() },\n (args) => runRead(workspace, args.path, args.offset, args.limit),\n { annotations: { readOnlyHint: true } },\n ),\n tool('write', WRITE_DESCRIPTION, { path: z.string(), content: z.string() }, (args) =>\n runWrite(workspace, args.path, args.content),\n ),\n tool(\n 'edit',\n EDIT_DESCRIPTION,\n {\n path: z.string(),\n old_string: z.string(),\n new_string: z.string(),\n replace_all: z.boolean().optional(),\n },\n (args) => runEdit(workspace, args.path, args.old_string, args.new_string, args.replace_all),\n ),\n tool('ls', LS_DESCRIPTION, { path: z.string() }, (args) => runLs(workspace, args.path), {\n annotations: { readOnlyHint: true },\n }),\n tool(\n 'grep',\n GREP_DESCRIPTION,\n { pattern: z.string(), path: z.string() },\n (args) => runGrep(workspace, args.pattern, args.path),\n { annotations: { readOnlyHint: true } },\n ),\n ],\n })\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { ExecuteResult } from '@struktoai/mirage-core'\n\nexport function decode(value: Uint8Array | null | undefined): string {\n if (value === null || value === undefined) return ''\n return new TextDecoder('utf-8').decode(value)\n}\n\nexport function ioToStr(io: ExecuteResult): string {\n const stdout = io.stdoutText\n const stderr = io.stderrText\n if (stderr) return stdout ? `${stdout}\\n${stderr}` : stderr\n return stdout\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport const EXECUTE_DESCRIPTION =\n 'Run a shell-style command on the Mirage virtual filesystem. ' +\n 'Supports cat, grep, find, head, tail, ls, wc, sort, uniq, tee, pipe, ' +\n 'and any other Unix command on mounted resources (S3, disk, RAM, etc.). ' +\n 'Also supports reading structured files: cat on .parquet/.orc/.csv returns a table.'\n\nexport const READ_DESCRIPTION =\n 'Read the contents of a file on the Mirage virtual filesystem. ' +\n 'Returns line-numbered text. ' +\n \"Optionally pass 'offset' (default 0) to start at a given line \" +\n \"and 'limit' (default 2000) to cap the number of lines returned.\"\n\nexport const WRITE_DESCRIPTION =\n 'Write content to a new file on the Mirage virtual filesystem. ' +\n 'Fails if the file already exists; use edit to modify an existing file.'\n\nexport const EDIT_DESCRIPTION =\n 'Replace a string in an existing file on the Mirage virtual filesystem. ' +\n 'Fails if old_string is not found or appears more than once. ' +\n 'Pass replace_all=true (default false) to replace every occurrence.'\n\nexport const LS_DESCRIPTION =\n 'List files and directories at the given path on the Mirage virtual filesystem.'\n\nexport const GREP_DESCRIPTION =\n 'Search for a pattern in files on the Mirage virtual filesystem. ' +\n 'Supports regex. Searches recursively under path.'\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { Workspace } from '@struktoai/mirage-core'\nimport type { Options } from '@anthropic-ai/claude-agent-sdk'\nimport { buildSystemPrompt } from '../prompt.ts'\nimport { MirageServer } from './server.ts'\n\nexport interface BuildOptionsOptions {\n systemPrompt?: string\n}\n\nexport function buildOptions(workspace: Workspace, opts: BuildOptionsOptions = {}): Options {\n return {\n mcpServers: { mirage: MirageServer(workspace) },\n allowedTools: ['mcp__mirage__*'],\n systemPrompt: opts.systemPrompt ?? buildSystemPrompt({ workspace }),\n }\n}\n"],"mappings":";;;;;;AAeA,SAAS,SAAS,kBAAkB;AACpC,SAAS,oBAAoB,YAAY;AACzC,SAAS,SAAS;;;ACDX,SAAS,OAAO,OAA8C;AACnE,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,SAAO,IAAI,YAAY,OAAO,EAAE,OAAO,KAAK;AAC9C;AAEO,SAAS,QAAQ,IAA2B;AACjD,QAAM,SAAS,GAAG;AAClB,QAAM,SAAS,GAAG;AAClB,MAAI,OAAQ,QAAO,SAAS,GAAG,MAAM;AAAA,EAAK,MAAM,KAAK;AACrD,SAAO;AACT;;;ACZO,IAAM,sBACX;AAKK,IAAM,mBACX;AAKK,IAAM,oBACX;AAGK,IAAM,mBACX;AAIK,IAAM,iBACX;AAEK,IAAM,mBACX;;;AFLF,SAAS,WAAW,MAA0B;AAC5C,SAAO,EAAE,SAAS,CAAC,EAAE,MAAM,QAAQ,KAAK,CAAC,EAAE;AAC7C;AAEA,SAAS,YAAY,MAA0B;AAC7C,SAAO,EAAE,SAAS,CAAC,EAAE,MAAM,QAA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,SAAS,MAAM,WAAW,KAAK,IAAI,GAAG;AAAA,QACtF,aAAa,EAAE,cAAc,KAAK;AAAA,MACpC,CAAC;AAAA,MACD;AAAA,QACE;AAAA,QACA;AAAA,QACA,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,EAAE,OAAO,EAAE;AAAA,QACxC,CAAC,SAAS,QAAQ,WAAW,KAAK,SAAS,KAAK,IAAI;AAAA,QACpD,EAAE,aAAa,EAAE,cAAc,KAAK,EAAE;AAAA,MACxC;AAAA,IACF;AAAA,EACF,CAAC;AACH;;;AG5JO,SAAS,aAAa,WAAsB,OAA4B,CAAC,GAAY;AAC1F,SAAO;AAAA,IACL,YAAY,EAAE,QAAQ,aAAa,SAAS,EAAE;AAAA,IAC9C,cAAc,CAAC,gBAAgB;AAAA,IAC/B,cAAc,KAAK,gBAAgB,kBAAkB,EAAE,UAAU,CAAC;AAAA,EACpE;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from '@struktoai/mirage-node';
2
2
  import { SandboxBackendProtocolV2, ExecuteResponse, LsResult, ReadResult, ReadRawResult, WriteResult, EditResult, GrepResult, GlobResult, FileUploadResponse, FileDownloadResponse } from 'deepagents';
3
- export { B as BuildSystemPromptOptions, M as MIRAGE_SYSTEM_PROMPT, b as buildSystemPrompt } from '../prompt-CbBVJuUY.js';
3
+ export { B as BuildSystemPromptOptions, M as MIRAGE_SYSTEM_PROMPT, b as buildSystemPrompt } from '../prompt-Ca4hc1Ul.js';
4
4
  import '@struktoai/mirage-core';
5
5
 
6
6
  interface LangchainWorkspaceOptions {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MIRAGE_SYSTEM_PROMPT,
3
3
  buildSystemPrompt
4
- } from "../chunk-KAHWIK63.js";
4
+ } from "../chunk-ODKR5YZI.js";
5
5
 
6
6
  // src/langchain/convert.ts
7
7
  function ioToExecuteResponse(io) {
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from '@struktoai/mirage-core';
2
2
  import { Editor, ApplyPatchOperation, ApplyPatchResult, Shell, ShellAction, ShellResult } from '@openai/agents';
3
- export { B as BuildSystemPromptOptions, M as MIRAGE_SYSTEM_PROMPT, b as buildSystemPrompt } from '../prompt-CbBVJuUY.js';
3
+ export { B as BuildSystemPromptOptions, M as MIRAGE_SYSTEM_PROMPT, b as buildSystemPrompt } from '../prompt-Ca4hc1Ul.js';
4
4
 
5
5
  declare class MirageEditor implements Editor {
6
6
  private readonly ws;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MIRAGE_SYSTEM_PROMPT,
3
3
  buildSystemPrompt
4
- } from "../chunk-KAHWIK63.js";
4
+ } from "../chunk-ODKR5YZI.js";
5
5
 
6
6
  // src/openai/editor.ts
7
7
  import { applyDiff } from "@openai/agents";
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from '@struktoai/mirage-core';
2
2
  import { ExtensionFactory, ReadOperations, WriteOperations, EditOperations, BashOperations, GrepOperations, FindOperations, LsOperations } from '@mariozechner/pi-coding-agent';
3
- export { B as BuildSystemPromptOptions, M as MIRAGE_SYSTEM_PROMPT, b as buildSystemPrompt } from '../prompt-CbBVJuUY.js';
3
+ export { B as BuildSystemPromptOptions, M as MIRAGE_SYSTEM_PROMPT, b as buildSystemPrompt } from '../prompt-Ca4hc1Ul.js';
4
4
 
5
5
  interface MirageExtensionOptions {
6
6
  cwd?: string;
package/dist/pi/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MIRAGE_SYSTEM_PROMPT,
3
3
  buildSystemPrompt
4
- } from "../chunk-KAHWIK63.js";
4
+ } from "../chunk-ODKR5YZI.js";
5
5
 
6
6
  // src/pi/extension.ts
7
7
  import {
@@ -0,0 +1,11 @@
1
+ import { Workspace } from '@struktoai/mirage-core';
2
+
3
+ declare const MIRAGE_SYSTEM_PROMPT = "Your filesystem is powered by Mirage \u2014 a virtual filesystem that mounts cloud storage, local files, and in-memory data as a unified file tree.\n\nCapabilities beyond standard filesystem:\n- cat on .parquet, .orc, .feather files returns a formatted table\n- head -n 5 on data files returns the first 5 rows\n- grep works natively on CSV, JSON, Parquet \u2014 not just text\n- Pipes work: cat data.parquet | grep error | sort | uniq | wc -l\n- head, tail, cut, wc, sort, uniq, tee, xargs are all available\n\nYou can write Python code and execute it. The workspace is pre-configured with your data sources mounted at their respective paths.\n\nUse the execute tool for complex operations. Use read/write/edit for simple file operations.\n";
4
+ interface BuildSystemPromptOptions {
5
+ workspace?: Workspace;
6
+ mountInfo?: Record<string, string>;
7
+ extraInstructions?: string;
8
+ }
9
+ declare function buildSystemPrompt(opts?: BuildSystemPromptOptions): string;
10
+
11
+ export { type BuildSystemPromptOptions as B, MIRAGE_SYSTEM_PROMPT as M, buildSystemPrompt as b };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@struktoai/mirage-agents",
3
- "version": "0.0.3-alpha.0",
3
+ "version": "0.0.3",
4
4
  "description": "A Unified Virtual Filesystem For AI Agents",
5
5
  "keywords": [
6
6
  "bash",
@@ -61,6 +61,10 @@
61
61
  "./opencode": {
62
62
  "types": "./dist/opencode/index.d.ts",
63
63
  "import": "./dist/opencode/index.js"
64
+ },
65
+ "./claude-agent-sdk": {
66
+ "types": "./dist/claude-agent-sdk/index.d.ts",
67
+ "import": "./dist/claude-agent-sdk/index.js"
64
68
  }
65
69
  },
66
70
  "files": [
@@ -68,9 +72,10 @@
68
72
  ],
69
73
  "dependencies": {
70
74
  "picomatch": "^4.0.4",
71
- "@struktoai/mirage-core": "0.0.3-alpha.0"
75
+ "@struktoai/mirage-core": "0.0.3"
72
76
  },
73
77
  "peerDependencies": {
78
+ "@anthropic-ai/claude-agent-sdk": "^0.3.0",
74
79
  "@mariozechner/pi-ai": "^0.70.0",
75
80
  "@mariozechner/pi-coding-agent": "^0.70.0",
76
81
  "@mastra/core": "^1.29.0",
@@ -79,7 +84,34 @@
79
84
  "deepagents": "^1.9.0",
80
85
  "zod": "^4.0.0"
81
86
  },
87
+ "peerDependenciesMeta": {
88
+ "@anthropic-ai/claude-agent-sdk": {
89
+ "optional": true
90
+ },
91
+ "@mariozechner/pi-ai": {
92
+ "optional": true
93
+ },
94
+ "@mariozechner/pi-coding-agent": {
95
+ "optional": true
96
+ },
97
+ "@mastra/core": {
98
+ "optional": true
99
+ },
100
+ "@openai/agents": {
101
+ "optional": true
102
+ },
103
+ "ai": {
104
+ "optional": true
105
+ },
106
+ "deepagents": {
107
+ "optional": true
108
+ },
109
+ "zod": {
110
+ "optional": true
111
+ }
112
+ },
82
113
  "devDependencies": {
114
+ "@anthropic-ai/claude-agent-sdk": "^0.3.178",
83
115
  "@mariozechner/pi-ai": "^0.70.2",
84
116
  "@mariozechner/pi-coding-agent": "^0.70.2",
85
117
  "@mastra/core": "^1.29.1",
@@ -91,7 +123,7 @@
91
123
  "typescript": "^6.0.0",
92
124
  "vitest": "^3.2.6",
93
125
  "zod": "^4.0.0",
94
- "@struktoai/mirage-node": "0.0.3-alpha.0"
126
+ "@struktoai/mirage-node": "0.0.3"
95
127
  },
96
128
  "scripts": {
97
129
  "build": "tsup",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { Workspace } from '@struktoai/mirage-core'\n\nexport const MIRAGE_SYSTEM_PROMPT = `Your filesystem is powered by Mirage — a virtual filesystem that mounts cloud storage, local files, and in-memory data as a unified file tree.\n\nAll file paths live under /mirage/. Do not access paths outside this folder.\n\nCapabilities beyond standard filesystem:\n- cat on .parquet, .orc, .feather files returns a formatted table\n- head -n 5 on data files returns the first 5 rows/seconds\n- grep works natively on CSV, JSON, Parquet — not just text\n- Pipes work: cat data.parquet | grep error | sort | uniq | wc -l\n- head, tail, cut, wc, sort, uniq, tee, xargs are all available\n\nYou can write Python code and execute it. The workspace is pre-configured with your data sources mounted at their respective paths.\n\nUse the execute tool for complex operations. Use read_file/write_file/edit_file for simple file operations.\n`\n\nexport interface BuildSystemPromptOptions {\n workspace?: Workspace\n mountInfo?: Record<string, string>\n extraInstructions?: string\n}\n\nexport function buildSystemPrompt(opts: BuildSystemPromptOptions = {}): string {\n const parts: string[] = [MIRAGE_SYSTEM_PROMPT]\n if (opts.workspace !== undefined) {\n parts.push('Mounted data sources:\\n' + opts.workspace.filePrompt)\n } else if (opts.mountInfo !== undefined && Object.keys(opts.mountInfo).length > 0) {\n parts.push('\\nMounted data sources:')\n for (const [prefix, description] of Object.entries(opts.mountInfo)) {\n parts.push(`- ${prefix} — ${description}`)\n }\n parts.push('')\n }\n if (opts.extraInstructions !== undefined && opts.extraInstructions.length > 0) {\n parts.push(opts.extraInstructions)\n }\n return parts.join('\\n')\n}\n"],"mappings":";AAgBO,IAAM,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsB7B,SAAS,kBAAkB,OAAiC,CAAC,GAAW;AAC7E,QAAM,QAAkB,CAAC,oBAAoB;AAC7C,MAAI,KAAK,cAAc,QAAW;AAChC,UAAM,KAAK,4BAA4B,KAAK,UAAU,UAAU;AAAA,EAClE,WAAW,KAAK,cAAc,UAAa,OAAO,KAAK,KAAK,SAAS,EAAE,SAAS,GAAG;AACjF,UAAM,KAAK,yBAAyB;AACpC,eAAW,CAAC,QAAQ,WAAW,KAAK,OAAO,QAAQ,KAAK,SAAS,GAAG;AAClE,YAAM,KAAK,KAAK,MAAM,WAAM,WAAW,EAAE;AAAA,IAC3C;AACA,UAAM,KAAK,EAAE;AAAA,EACf;AACA,MAAI,KAAK,sBAAsB,UAAa,KAAK,kBAAkB,SAAS,GAAG;AAC7E,UAAM,KAAK,KAAK,iBAAiB;AAAA,EACnC;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
@@ -1,11 +0,0 @@
1
- import { Workspace } from '@struktoai/mirage-core';
2
-
3
- declare const MIRAGE_SYSTEM_PROMPT = "Your filesystem is powered by Mirage \u2014 a virtual filesystem that mounts cloud storage, local files, and in-memory data as a unified file tree.\n\nAll file paths live under /mirage/. Do not access paths outside this folder.\n\nCapabilities beyond standard filesystem:\n- cat on .parquet, .orc, .feather files returns a formatted table\n- head -n 5 on data files returns the first 5 rows/seconds\n- grep works natively on CSV, JSON, Parquet \u2014 not just text\n- Pipes work: cat data.parquet | grep error | sort | uniq | wc -l\n- head, tail, cut, wc, sort, uniq, tee, xargs are all available\n\nYou can write Python code and execute it. The workspace is pre-configured with your data sources mounted at their respective paths.\n\nUse the execute tool for complex operations. Use read_file/write_file/edit_file for simple file operations.\n";
4
- interface BuildSystemPromptOptions {
5
- workspace?: Workspace;
6
- mountInfo?: Record<string, string>;
7
- extraInstructions?: string;
8
- }
9
- declare function buildSystemPrompt(opts?: BuildSystemPromptOptions): string;
10
-
11
- export { type BuildSystemPromptOptions as B, MIRAGE_SYSTEM_PROMPT as M, buildSystemPrompt as b };