mulmoclaude 2.13.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +2 -1
  2. package/client/assets/{marp-CYe2xava.js → marp-tVv8DIv7.js} +1 -1
  3. package/client/assets/whisper-extra-args-B0J0HfhZ.css +2 -0
  4. package/client/assets/{mulmoclaude5-X9sg9nGm.js → whisper-extra-args-DMRU1Hxb.js} +2782 -2782
  5. package/client/index.html +2 -2
  6. package/package.json +16 -15
  7. package/server/agent/activeTools.ts +14 -1
  8. package/server/agent/mcp-tools/exportShapeScriptUsdz.ts +2 -1
  9. package/server/agent/prompt.ts +3 -13
  10. package/server/api/auth/clientTokenAccess.ts +4 -0
  11. package/server/api/routes/plugins.ts +28 -0
  12. package/server/build/mcp-server.mjs +589 -589
  13. package/server/plugins/runtime-loader.ts +2 -3
  14. package/server/system/docker.ts +10 -0
  15. package/server/utils/files/within-workspace.ts +30 -0
  16. package/server/workspace/journal/memoryExtractor.ts +14 -2
  17. package/server/workspace/memory/io.ts +5 -4
  18. package/server/workspace/memory/migrate.ts +2 -2
  19. package/server/workspace/memory/seed-topic-layout-run.ts +14 -2
  20. package/server/workspace/memory/topic-io.ts +3 -2
  21. package/server/workspace/memory/topic-migrate.ts +2 -1
  22. package/src/config/roles.ts +1 -0
  23. package/src/main.ts +1 -0
  24. package/src/plugins/_generated/metas.ts +2 -0
  25. package/src/plugins/_generated/registrations.ts +2 -0
  26. package/src/plugins/_generated/server-bindings.ts +3 -0
  27. package/src/plugins/presentBrep/definition.ts +19 -0
  28. package/src/plugins/presentBrep/index.ts +31 -0
  29. package/src/plugins/presentBrep/meta.ts +16 -0
  30. package/client/assets/mulmoclaude5-DYBqTE7m.css +0 -2
@@ -21,6 +21,7 @@
21
21
  import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
22
22
  import { execFileSync } from "node:child_process";
23
23
  import path from "node:path";
24
+ import { isWithinRoot } from "@mulmoclaude/core/files";
24
25
  import { pathToFileURL } from "node:url";
25
26
  import type { PluginRuntime, ToolDefinition } from "gui-chat-protocol";
26
27
  import { isPluginFactory } from "gui-chat-protocol";
@@ -411,9 +412,7 @@ export async function loadPluginFromCacheDir(name: string, version: string, cach
411
412
  * line of defence (defence-in-depth: realpath after extract is the
412
413
  * symlink-escape backstop). Exported for testing. */
413
414
  export function ensureInsideBase(candidate: string, base: string): boolean {
414
- const resolvedCandidate = path.resolve(candidate);
415
- const resolvedBase = path.resolve(base);
416
- return resolvedCandidate === resolvedBase || resolvedCandidate.startsWith(resolvedBase + path.sep);
415
+ return isWithinRoot(path.resolve(base), path.resolve(candidate));
417
416
  }
418
417
 
419
418
  async function loadOne(entry: LedgerEntry, deps: LoaderDeps = {}): Promise<RuntimePlugin | null> {
@@ -68,6 +68,16 @@ export async function isDockerLive(): Promise<boolean> {
68
68
  }
69
69
  }
70
70
 
71
+ /** Pure. Does the agent run on this machine itself, with no Docker sandbox
72
+ * around it? Only when that is KNOWN: before Docker has been probed the answer
73
+ * is no, so nothing that depends on it is offered by default. */
74
+ export const runsOnHost = (disableSandbox: boolean, dockerEnabled: boolean | null): boolean => disableSandbox || dockerEnabled === false;
75
+
76
+ /** Whether the agent runs unsandboxed, from what the server found at startup
77
+ * (`isDockerAvailable`, which `setupSandbox` awaits before the first request).
78
+ * Synchronous, for the code that decides which tools a role is offered. */
79
+ export const agentRunsOnHost = (): boolean => runsOnHost(env.disableSandbox, _dockerEnabled);
80
+
71
81
  export async function isDockerAvailable(): Promise<boolean> {
72
82
  if (env.disableSandbox) return false;
73
83
  if (_dockerEnabled !== null) return _dockerEnabled;
@@ -0,0 +1,30 @@
1
+ // Reads of workspace files whose contents reach the agent (the system prompt, memory): only a regular file inside the
2
+ // workspace is read, so a file or folder linked to somewhere else on the host hands nothing over, sandboxed or not.
3
+
4
+ import { isInsideRoot, readTextWithinRoot, readTextWithinRootSync, realpathSyncOrNull } from "@mulmoclaude/core/files";
5
+
6
+ export interface WorkspaceLocation {
7
+ workspaceReal: string;
8
+ fileReal: string;
9
+ }
10
+
11
+ /** Both realpaths when `absPath` leads to something inside the workspace, else null. Resolved first, so a file linked
12
+ * to another file inside the workspace is read at its target. */
13
+ export function locateWithinWorkspace(workspacePath: string, absPath: string): WorkspaceLocation | null {
14
+ const workspaceReal = realpathSyncOrNull(workspacePath);
15
+ const fileReal = workspaceReal === null ? null : realpathSyncOrNull(absPath);
16
+ return workspaceReal !== null && fileReal !== null && isInsideRoot(workspaceReal, fileReal) ? { workspaceReal, fileReal } : null;
17
+ }
18
+
19
+ /** Text of a regular file inside the workspace, or null when it is missing, leads outside, is a FIFO or other
20
+ * non-file, or is unreadable. */
21
+ export async function readTextWithinWorkspace(workspacePath: string, absPath: string): Promise<string | null> {
22
+ const located = locateWithinWorkspace(workspacePath, absPath);
23
+ return located === null ? null : readTextWithinRoot(located.workspaceReal, located.fileReal);
24
+ }
25
+
26
+ /** Sync twin of `readTextWithinWorkspace`, for prompt assembly. */
27
+ export function readTextWithinWorkspaceSync(workspacePath: string, absPath: string): string | null {
28
+ const located = locateWithinWorkspace(workspacePath, absPath);
29
+ return located === null ? null : readTextWithinRootSync(located.workspaceReal, located.fileReal);
30
+ }
@@ -1,10 +1,11 @@
1
1
  // Run at end of the journal daily pass so durable user facts are picked up even if the agent didn't memo them in-conversation.
2
2
  // LLM receives existing memory.md as context and is instructed to return ONLY new facts (we still de-dupe defensively).
3
3
 
4
- import { readFileSync, existsSync } from "fs";
4
+ import { existsSync } from "fs";
5
5
  import path from "path";
6
6
  import { WORKSPACE_FILES } from "../paths.js";
7
7
  import { writeFileAtomic } from "../../utils/files/atomic.js";
8
+ import { readTextWithinWorkspaceSync } from "../../utils/files/within-workspace.js";
8
9
  import { log } from "../../system/logger/index.js";
9
10
  import { ClaudeCliNotFoundError } from "./archivist-cli.js";
10
11
  import { hasTopicFormat } from "../memory/topic-detect.js";
@@ -46,7 +47,11 @@ export async function extractAndAppendMemory(deps: MemoryExtractionDeps): Promis
46
47
  return 0;
47
48
  }
48
49
  const memoryPath = path.join(deps.workspaceRoot, WORKSPACE_FILES.memory);
49
- const existingMemory = existsSync(memoryPath) ? readFileSync(memoryPath, "utf-8") : "";
50
+ const existingMemory = readExistingMemory(deps.workspaceRoot, memoryPath);
51
+ if (existingMemory === null) {
52
+ log.warn("memory-extractor", "memory.md is not a readable file inside the workspace, skipping extraction", { path: memoryPath });
53
+ return 0;
54
+ }
50
55
 
51
56
  const userPrompt = buildUserPrompt(existingMemory, deps.excerpts);
52
57
  let raw: string;
@@ -74,6 +79,13 @@ export async function extractAndAppendMemory(deps: MemoryExtractionDeps): Promis
74
79
  return factsToAppend.length;
75
80
  }
76
81
 
82
+ // Null, never "", for a memory.md that exists but is not readable inside the workspace: extraction rewrites the file,
83
+ // so treating it as empty would replace a link with whatever it pointed at, or wipe a file it could not read.
84
+ function readExistingMemory(workspaceRoot: string, memoryPath: string): string | null {
85
+ if (!existsSync(memoryPath)) return "";
86
+ return readTextWithinWorkspaceSync(workspaceRoot, memoryPath);
87
+ }
88
+
77
89
  export function buildUserPrompt(existingMemory: string, excerpts: string): string {
78
90
  const parts: string[] = [];
79
91
  if (existingMemory.trim()) {
@@ -15,7 +15,8 @@ import path from "node:path";
15
15
  import { parseFrontmatter, serializeWithFrontmatter } from "@mulmoclaude/markdown-utils/markdown/frontmatter";
16
16
  import { writeFileAtomic } from "../../utils/files/atomic.js";
17
17
  import { WORKSPACE_DIRS, WORKSPACE_FILES } from "../paths.js";
18
- import { readDirSafeAsync, readTextSafe, statSafeAsync } from "../../utils/files/safe.js";
18
+ import { readDirSafeAsync, statSafeAsync } from "../../utils/files/safe.js";
19
+ import { readTextWithinWorkspace } from "../../utils/files/within-workspace.js";
19
20
  import { log } from "../../system/logger/index.js";
20
21
  import { isMemoryType, type MemoryEntry, type MemoryType } from "./types.js";
21
22
 
@@ -38,7 +39,7 @@ export async function loadAllMemoryEntries(workspaceRoot: string): Promise<Memor
38
39
  const filenames = await listEntryFiles(dir);
39
40
  const loaded: MemoryEntry[] = [];
40
41
  for (const filename of filenames) {
41
- const parsed = await readMemoryFile(path.join(dir, filename));
42
+ const parsed = await readMemoryFile(workspaceRoot, path.join(dir, filename));
42
43
  if (parsed) loaded.push(parsed);
43
44
  }
44
45
  return loaded;
@@ -144,8 +145,8 @@ function isCandidateName(name: string): boolean {
144
145
  return true;
145
146
  }
146
147
 
147
- async function readMemoryFile(absPath: string): Promise<MemoryEntry | null> {
148
- const raw = await readTextSafe(absPath);
148
+ async function readMemoryFile(workspaceRoot: string, absPath: string): Promise<MemoryEntry | null> {
149
+ const raw = await readTextWithinWorkspace(workspaceRoot, absPath);
149
150
  if (raw === null) {
150
151
  log.warn("memory", "failed to read entry", { path: absPath });
151
152
  return null;
@@ -22,7 +22,7 @@ import { mkdir, rename } from "node:fs/promises";
22
22
  import path from "node:path";
23
23
 
24
24
  import { writeFileAtomic } from "../../utils/files/atomic.js";
25
- import { readTextSafe } from "../../utils/files/safe.js";
25
+ import { readTextWithinWorkspace } from "../../utils/files/within-workspace.js";
26
26
  import { log } from "../../system/logger/index.js";
27
27
  import { errorMessage } from "../../utils/errors.js";
28
28
  import { truncate } from "../../utils/text.js";
@@ -80,7 +80,7 @@ const PROGRESS_LOG_INTERVAL = 5;
80
80
 
81
81
  export async function migrateLegacyMemory(workspaceRoot: string, classify: MemoryClassifier): Promise<MigrationResult> {
82
82
  const sourcePath = path.join(workspaceRoot, WORKSPACE_FILES.memory);
83
- const raw = await readTextSafe(sourcePath);
83
+ const raw = await readTextWithinWorkspace(workspaceRoot, sourcePath);
84
84
  if (raw === null) {
85
85
  return emptyResult(true);
86
86
  }
@@ -1,7 +1,9 @@
1
- import { lstatSync, mkdirSync, readdirSync, readFileSync } from "node:fs";
1
+ import { lstatSync, mkdirSync, readdirSync, statSync } from "node:fs";
2
2
  import path from "node:path";
3
3
 
4
+ import { readTextWithinRootSync } from "@mulmoclaude/core/files";
4
5
  import { WORKSPACE_DIRS, WORKSPACE_FILES } from "../paths.js";
6
+ import { locateWithinWorkspace } from "../../utils/files/within-workspace.js";
5
7
  import { MEMORY_TYPES } from "./types.js";
6
8
  import { shouldSeedTopicLayout, type MemoryLayoutState } from "./seed-topic-layout.js";
7
9
  import { errorMessage } from "../../utils/errors.js";
@@ -22,9 +24,19 @@ function readOrMissing<T>(read: () => T): ReadResult<T> {
22
24
  }
23
25
  }
24
26
 
27
+ // Read as the prompt reads it: a memory.md leading outside the workspace counts as absent, and one that cannot be
28
+ // resolved (a link loop) or is not a readable regular file stays unreadable, so boot never seeds over memory it could
29
+ // not see.
30
+ function readLegacyMemoryText(workspaceRoot: string): ReadResult<string> {
31
+ const legacyPath = path.join(workspaceRoot, WORKSPACE_FILES.memory);
32
+ const located = locateWithinWorkspace(workspaceRoot, legacyPath);
33
+ if (located === null) return readOrMissing(() => statSync(legacyPath)) === undefined ? undefined : null;
34
+ return readTextWithinRootSync(located.workspaceReal, located.fileReal) ?? undefined;
35
+ }
36
+
25
37
  function readMemoryLayoutState(workspaceRoot: string): MemoryLayoutState {
26
38
  const entries = readOrMissing(() => readdirSync(path.join(workspaceRoot, WORKSPACE_DIRS.memoryDir)));
27
- const legacyText = readOrMissing(() => readFileSync(path.join(workspaceRoot, WORKSPACE_FILES.memory), "utf-8"));
39
+ const legacyText = readLegacyMemoryText(workspaceRoot);
28
40
  // lstat, not existsSync: a broken symlink or a permission error must not read as "no staging".
29
41
  const staging = readOrMissing(() => lstatSync(path.join(workspaceRoot, WORKSPACE_DIRS.memoryStaging)));
30
42
  return {
@@ -19,7 +19,8 @@ import path from "node:path";
19
19
 
20
20
  import { parseFrontmatter, serializeWithFrontmatter } from "@mulmoclaude/markdown-utils/markdown/frontmatter";
21
21
  import { writeFileAtomic } from "../../utils/files/atomic.js";
22
- import { readDirSafeAsync, readTextSafe } from "../../utils/files/safe.js";
22
+ import { readDirSafeAsync } from "../../utils/files/safe.js";
23
+ import { readTextWithinWorkspace } from "../../utils/files/within-workspace.js";
23
24
  import { log } from "../../system/logger/index.js";
24
25
  import { WORKSPACE_DIRS, WORKSPACE_FILES } from "../paths.js";
25
26
  import { isMemoryType, MEMORY_TYPES, type MemoryType } from "./types.js";
@@ -47,7 +48,7 @@ export async function loadAllTopicFiles(workspaceRoot: string): Promise<TopicMem
47
48
  const filenames = candidateFilenamesSorted(dirents);
48
49
  for (const name of filenames) {
49
50
  const absPath = path.join(typeDir, name);
50
- const raw = await readTextSafe(absPath);
51
+ const raw = await readTextWithinWorkspace(workspaceRoot, absPath);
51
52
  const file = parseTopicFile(absPath, raw, type);
52
53
  if (file) collected.push(file);
53
54
  }
@@ -18,6 +18,7 @@ import path from "node:path";
18
18
 
19
19
  import { writeFileAtomic } from "../../utils/files/atomic.js";
20
20
  import { readTextSafe } from "../../utils/files/safe.js";
21
+ import { readTextWithinWorkspace } from "../../utils/files/within-workspace.js";
21
22
  import { log } from "../../system/logger/index.js";
22
23
  import { errorMessage } from "../../utils/errors.js";
23
24
  import { WORKSPACE_DIRS, WORKSPACE_FILES } from "../paths.js";
@@ -132,7 +133,7 @@ interface ClusterInput {
132
133
 
133
134
  async function loadClusterInput(workspaceRoot: string): Promise<ClusterInput> {
134
135
  const atomicEntries = await loadAllMemoryEntries(workspaceRoot);
135
- const legacyText = await readTextSafe(path.join(workspaceRoot, WORKSPACE_FILES.memory));
136
+ const legacyText = await readTextWithinWorkspace(workspaceRoot, path.join(workspaceRoot, WORKSPACE_FILES.memory));
136
137
  const foldedEntries = legacyText === null ? [] : legacyFoldEntries(parseCandidates(legacyText), atomicEntries);
137
138
  return { atomicEntries, foldedEntries };
138
139
  }
@@ -223,6 +223,7 @@ export const ROLES: [Role, ...Role[]] = [
223
223
  TOOL_NAMES.exportShapeScriptUsdz,
224
224
  TOOL_NAMES.exportShapeScriptStl,
225
225
  TOOL_NAMES.manageShapeScript,
226
+ TOOL_NAMES.presentBrep,
226
227
  TOOL_NAMES.presentHtml,
227
228
  TOOL_NAMES.presentSVG,
228
229
  ],
package/src/main.ts CHANGED
@@ -61,6 +61,7 @@ const pluginEndpointRegistry: EndpointRegistry = {
61
61
  svg: API_ROUTES.svg,
62
62
  shapescript: API_ROUTES.shapescript,
63
63
  kentei: API_ROUTES.kentei,
64
+ brep: API_ROUTES.brep,
64
65
  chart: API_ROUTES.chart,
65
66
  accounting: API_ROUTES.accounting,
66
67
  canvas: API_ROUTES.canvas,
@@ -12,6 +12,7 @@ import { META as manageKenteiScriptMeta } from "../manageKenteiScript/meta";
12
12
  import { META as manageSkillsMeta } from "../manageSkills/meta";
13
13
  import { META as markdownMeta } from "../markdown/meta";
14
14
  import { META as photoLocationsMeta } from "../photoLocations/meta";
15
+ import { META as presentBrepMeta } from "../presentBrep/meta";
15
16
  import { META as presentCollectionMeta } from "../presentCollection/meta";
16
17
  import { META as presentFormMeta } from "../presentForm/meta";
17
18
  import { META as presentHtmlMeta } from "../presentHtml/meta";
@@ -34,6 +35,7 @@ export const GENERATED_PLUGIN_METAS = [
34
35
  manageSkillsMeta,
35
36
  markdownMeta,
36
37
  photoLocationsMeta,
38
+ presentBrepMeta,
37
39
  presentCollectionMeta,
38
40
  presentFormMeta,
39
41
  presentHtmlMeta,
@@ -12,6 +12,7 @@ import { REGISTRATION as manageKenteiScriptRegistration } from "../manageKenteiS
12
12
  import { REGISTRATION as manageSkillsRegistration } from "../manageSkills";
13
13
  import { REGISTRATION as markdownRegistration } from "../markdown";
14
14
  import { REGISTRATION as photoLocationsRegistration } from "../photoLocations";
15
+ import { REGISTRATION as presentBrepRegistration } from "../presentBrep";
15
16
  import { REGISTRATION as presentCollectionRegistration } from "../presentCollection";
16
17
  import { REGISTRATION as presentFormRegistration } from "../presentForm";
17
18
  import { REGISTRATION as presentHtmlRegistration } from "../presentHtml";
@@ -38,6 +39,7 @@ export const GENERATED_PLUGIN_REGISTRATIONS: readonly PluginRegistration[] = [
38
39
  manageSkillsRegistration,
39
40
  markdownRegistration,
40
41
  photoLocationsRegistration,
42
+ presentBrepRegistration,
41
43
  presentCollectionRegistration,
42
44
  presentFormRegistration,
43
45
  presentHtmlRegistration,
@@ -11,6 +11,7 @@ import manageKenteiScriptDef from "../manageKenteiScript/definition";
11
11
  import manageSkillsDef from "../manageSkills/definition";
12
12
  import markdownDef from "../markdown/definition";
13
13
  import photoLocationsDef from "../photoLocations/definition";
14
+ import presentBrepDef from "../presentBrep/definition";
14
15
  import presentCollectionDef from "../presentCollection/definition";
15
16
  import presentFormDef from "../presentForm/definition";
16
17
  import presentHtmlDef from "../presentHtml/definition";
@@ -26,6 +27,7 @@ import { META as manageKenteiScriptMeta } from "../manageKenteiScript/meta";
26
27
  import { META as manageSkillsMeta } from "../manageSkills/meta";
27
28
  import { META as markdownMeta } from "../markdown/meta";
28
29
  import { META as photoLocationsMeta } from "../photoLocations/meta";
30
+ import { META as presentBrepMeta } from "../presentBrep/meta";
29
31
  import { META as presentCollectionMeta } from "../presentCollection/meta";
30
32
  import { META as presentFormMeta } from "../presentForm/meta";
31
33
  import { META as presentHtmlMeta } from "../presentHtml/meta";
@@ -46,6 +48,7 @@ export const GENERATED_SERVER_BINDINGS: readonly ServerPluginBinding[] = [
46
48
  mcpBinding(manageSkillsDef, manageSkillsMeta),
47
49
  mcpBinding(markdownDef, markdownMeta),
48
50
  mcpBinding(photoLocationsDef, photoLocationsMeta),
51
+ mcpBinding(presentBrepDef, presentBrepMeta),
49
52
  mcpBinding(presentCollectionDef, presentCollectionMeta),
50
53
  mcpBinding(presentFormDef, presentFormMeta),
51
54
  mcpBinding(presentHtmlDef, presentHtmlMeta),
@@ -0,0 +1,19 @@
1
+ import { META } from "./meta";
2
+ import type { ResolvedRoute } from "../meta-types";
3
+ import { TOOL_DEFINITION } from "@gui-chat-plugin/brep";
4
+
5
+ // presentBrep's tool schema, the build (the OpenCascade kernel, in Node), its
6
+ // checks, View and Preview live in the shared @gui-chat-plugin/brep package
7
+ // (also used by MulmoTerminal and MulmoChat). This built-in is a thin host
8
+ // adapter, like presentShapeScript: it keeps MulmoClaude's routing META.
9
+ //
10
+ // Server-only: this imports the package's core entry, which reaches the kernel
11
+ // and `node:vm`. The browser side (index.ts) takes the definition from
12
+ // `@gui-chat-plugin/brep/vue`, which carries the View alone.
13
+ export const TOOL_NAME = META.toolName;
14
+
15
+ /** Resolved-URL view of the plugin's routes (create). Auto-derived from META. */
16
+ export type BrepEndpoints = { readonly [K in keyof typeof META.apiRoutes]: ResolvedRoute };
17
+
18
+ export { TOOL_DEFINITION };
19
+ export default TOOL_DEFINITION;
@@ -0,0 +1,31 @@
1
+ import type { ToolPlugin } from "gui-chat-protocol/vue";
2
+ import type { PluginRegistration } from "../../tools/types";
3
+ import { plugin as brepPlugin, type PresentBrepData } from "@gui-chat-plugin/brep/vue";
4
+ // The View's scoped styles are a standalone stylesheet; Vite lib mode does not
5
+ // inject it, so the consumer imports it (same as presentShapeScript / presentForm).
6
+ import "@gui-chat-plugin/brep/style.css";
7
+ import type { BrepEndpoints } from "./definition";
8
+ import { META } from "./meta";
9
+ import { makeRouteExecute } from "../execute";
10
+
11
+ const TOOL_NAME = META.toolName;
12
+
13
+ // Imported from the browser entry, not ./definition (a type-only import above):
14
+ // the package's core entry reaches the OpenCascade kernel and `node:vm`, and
15
+ // must stay out of the client bundle.
16
+ //
17
+ // The View and Preview are the package's own, unwrapped: everything they show
18
+ // (the mesh, the report, the files behind the download buttons) travels in the
19
+ // tool result, so they use no runtime, no dispatch and no file route.
20
+ const presentBrepPlugin: ToolPlugin<PresentBrepData, unknown, object> = {
21
+ ...brepPlugin,
22
+ // The model is built on the server (POST /api/brep). The package's own
23
+ // browser `execute` only refuses, saying where the tool runs.
24
+ execute: makeRouteExecute<BrepEndpoints, PresentBrepData>("brep", "create", TOOL_NAME),
25
+ };
26
+ export { TOOL_NAME };
27
+
28
+ export const REGISTRATION: PluginRegistration = {
29
+ toolName: TOOL_NAME,
30
+ entry: presentBrepPlugin,
31
+ };
@@ -0,0 +1,16 @@
1
+ import { definePluginMeta } from "../meta-types";
2
+
3
+ export const META = definePluginMeta({
4
+ toolName: "presentBrep",
5
+ apiNamespace: "brep",
6
+ apiRoutes: {
7
+ /** POST /api/brep — build a solid model from a replicad script and present it. */
8
+ create: { method: "POST", path: "" },
9
+ },
10
+ mcpDispatch: "create",
11
+ workspaceDirs: {
12
+ /** Saved scripts with their exports beside them
13
+ * (`artifacts/brep/<slug>-<ms>-<token>.replicad.js`, `.step`, `.stl`, `.svg`). */
14
+ brep: "artifacts/brep",
15
+ },
16
+ });