mulmoclaude 2.13.0 → 2.15.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.
package/client/index.html CHANGED
@@ -53,8 +53,8 @@
53
53
  <script type="module" crossorigin src="/assets/_plugin-vue_export-helper-BDNMzG2s.js"></script>
54
54
  <script type="module" crossorigin src="/assets/style-BZwVK1dO-BFtilmZh.js"></script>
55
55
  <script type="module" crossorigin src="/assets/typeof-CcP5rTWg-B5XbjTb1.js"></script>
56
- <script type="module" crossorigin src="/assets/mulmoclaude5-X9sg9nGm.js"></script>
57
- <link rel="stylesheet" crossorigin href="/assets/mulmoclaude5-DYBqTE7m.css">
56
+ <script type="module" crossorigin src="/assets/mulmoclaude2-TWnsqCZg.js"></script>
57
+ <link rel="stylesheet" crossorigin href="/assets/mulmoclaude2-B0J0HfhZ.css">
58
58
  </head>
59
59
  <body>
60
60
  <!--
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mulmoclaude",
3
- "version": "2.13.0",
3
+ "version": "2.15.0",
4
4
  "description": "MulmoClaude — GUI-chat with Claude Code + long-term memory. One command to start.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -22,6 +22,7 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@google/genai": "^3.3.0",
25
+ "@gui-chat-plugin/brep": "^0.1.0",
25
26
  "@gui-chat-plugin/browse": "^2.1.0",
26
27
  "@gui-chat-plugin/camera": "^2.1.0",
27
28
  "@gui-chat-plugin/google-map": "^2.1.0",
@@ -29,27 +30,27 @@
29
30
  "@gui-chat-plugin/shapescript": "^8.2.3",
30
31
  "@gui-chat-plugin/spreadsheet": "^5.0.1",
31
32
  "@marp-team/marp-core": "^4.4.0",
32
- "@mulmobridge/chat-service": "^2.1.0",
33
- "@mulmobridge/client": "^1.5.0",
33
+ "@mulmobridge/chat-service": "^2.1.1",
34
+ "@mulmobridge/client": "^1.5.1",
34
35
  "@mulmobridge/protocol": "^1.1.0",
35
36
  "@mulmobridge/web-push": "^1.1.0",
36
37
  "@mulmocast/deck": "^2.1.0",
37
38
  "@mulmocast/types": "^2.24.0",
38
39
  "@mulmochat-plugin/quiz": "^2.1.0",
39
40
  "@mulmochat-plugin/ui-image": "^0.4.1",
40
- "@mulmoclaude/accounting-plugin": "^6.0.0",
41
- "@mulmoclaude/chart-plugin": "^6.0.0",
42
- "@mulmoclaude/collection-plugin": "^7.0.0",
41
+ "@mulmoclaude/accounting-plugin": "^6.0.1",
42
+ "@mulmoclaude/chart-plugin": "^6.0.1",
43
+ "@mulmoclaude/collection-plugin": "^7.1.0",
43
44
  "@mulmoclaude/common": "^1.6.0",
44
- "@mulmoclaude/core": "^7.1.0",
45
+ "@mulmoclaude/core": "^7.3.0",
45
46
  "@mulmoclaude/form-plugin": "^2.2.0",
46
- "@mulmoclaude/google-plugin": "^6.0.0",
47
- "@mulmoclaude/html-plugin": "^7.0.0",
48
- "@mulmoclaude/markdown-plugin": "^7.0.0",
49
- "@mulmoclaude/markdown-utils": "^3.0.2",
50
- "@mulmoclaude/mulmoscript-plugin": "^7.0.0",
51
- "@mulmoclaude/spotify-plugin": "^2.0.3",
52
- "@mulmoclaude/x-plugin": "^1.0.4",
47
+ "@mulmoclaude/google-plugin": "^6.0.1",
48
+ "@mulmoclaude/html-plugin": "^7.0.1",
49
+ "@mulmoclaude/markdown-plugin": "^7.0.1",
50
+ "@mulmoclaude/markdown-utils": "^3.0.3",
51
+ "@mulmoclaude/mulmoscript-plugin": "^7.0.1",
52
+ "@mulmoclaude/spotify-plugin": "^2.0.4",
53
+ "@mulmoclaude/x-plugin": "^1.0.5",
53
54
  "@receptron/task-scheduler": "^1.0.3",
54
55
  "cors": "^2.8.6",
55
56
  "dotenv": "^18.0.10",
@@ -79,7 +80,7 @@
79
80
  "zod": "^4.6.7"
80
81
  },
81
82
  "optionalDependencies": {
82
- "@mulmobridge/telegram": "^1.3.1",
83
+ "@mulmobridge/telegram": "^1.3.2",
83
84
  "node-pty": "^1.1.0"
84
85
  },
85
86
  "engines": {
@@ -29,6 +29,7 @@
29
29
  import type { Role } from "../../src/config/roles.js";
30
30
  import { mcpTools, isMcpToolEnabled } from "./mcp-tools/index.js";
31
31
  import { PLUGIN_DEFS, PLUGIN_PACKAGE_BY_TOOL, TOOL_ENDPOINTS } from "./plugin-names.js";
32
+ import { agentRunsOnHost } from "../system/docker.js";
32
33
  import { toolPromptFor } from "./promptFiles.js";
33
34
  import { getRuntimePlugins } from "../plugins/runtime-registry.js";
34
35
 
@@ -91,7 +92,19 @@ const STATIC_PLUGIN_REQUIRED_ENV: Readonly<Record<string, readonly string[]>> =
91
92
  manageKenteiScript: ["TYPESAFE_API_KEY"],
92
93
  };
93
94
 
94
- export function isStaticPluginEnabled(name: string): boolean {
95
+ // Static GUI plugins that run what the agent writes as CODE in this server's
96
+ // process. They are offered only to an agent that already runs on this machine
97
+ // unsandboxed: to one inside the Docker sandbox, such a tool is a way out of it,
98
+ // onto the host and past the mounts the sandbox is there to enforce.
99
+ //
100
+ // presentBrep: its replicad script is JavaScript, run by @gui-chat-plugin/brep
101
+ // through node:vm with no isolation. The route refuses for the same reason
102
+ // (server/api/routes/plugins.ts), since not offering a tool is not a boundary.
103
+ const STATIC_PLUGIN_RUNS_HOST_CODE: ReadonlySet<string> = new Set(["presentBrep"]);
104
+
105
+ /** `onHost` is a parameter so the rule can be tested without a Docker daemon. */
106
+ export function isStaticPluginEnabled(name: string, onHost: boolean = agentRunsOnHost()): boolean {
107
+ if (STATIC_PLUGIN_RUNS_HOST_CODE.has(name) && !onHost) return false;
95
108
  return (STATIC_PLUGIN_REQUIRED_ENV[name] ?? []).every((key) => Boolean(process.env[key]?.trim()));
96
109
  }
97
110
 
@@ -28,6 +28,7 @@ import {
28
28
  } from "@gui-chat-plugin/shapescript";
29
29
  import { mkdir, readFile, realpath, stat } from "node:fs/promises";
30
30
  import path from "node:path";
31
+ import { isWithinRoot } from "@mulmoclaude/core/files";
31
32
  import { writeFileAtomic } from "../../utils/files/atomic.js";
32
33
  import { resolveWithinRoot, resolveWriteWithinRoot } from "../../utils/files/safe.js";
33
34
  import { makeByPathFileOps } from "../../utils/files/by-path.js";
@@ -48,7 +49,7 @@ async function artifactsRootReal(workspace: string): Promise<string> {
48
49
  const artifacts = path.join(workspaceReal, "artifacts");
49
50
  await mkdir(artifacts, { recursive: true });
50
51
  const artifactsReal = await realpath(artifacts);
51
- if (artifactsReal !== artifacts && !artifactsReal.startsWith(workspaceReal + path.sep)) {
52
+ if (artifactsReal !== artifacts && (artifactsReal === workspaceReal || !isWithinRoot(workspaceReal, artifactsReal))) {
52
53
  throw new Error("artifacts/ resolves outside the workspace; exportShapeScriptUsdz will not read or write through it");
53
54
  }
54
55
  return artifactsReal;
@@ -5,7 +5,7 @@ import type { TopicMemoryFile } from "../workspace/memory/topic-types.js";
5
5
  import type { MemorySnapshot } from "../workspace/memory/snapshot.js";
6
6
  import type { Role } from "../../src/config/roles.js";
7
7
  import { getActiveToolDescriptors, MCP_SERVER_ID } from "./activeTools.js";
8
- import { isWithinRoot, readTextWithinRootSync, realpathSyncOrNull } from "@mulmoclaude/core/files";
8
+ import { locateWithinWorkspace, readTextWithinWorkspaceSync } from "../utils/files/within-workspace.js";
9
9
  import { WORKSPACE_FILES } from "../workspace/paths.js";
10
10
  import { getCachedCustomDirs, buildCustomDirsPrompt } from "../workspace/custom-dirs.js";
11
11
  import { getCachedReferenceDirs, buildReferenceDirsPrompt } from "../workspace/reference-dirs.js";
@@ -152,22 +152,12 @@ function readLegacyMemoryFile(workspacePath: string): string | null {
152
152
  return content.length > 0 ? content : null;
153
153
  }
154
154
 
155
- // Files read into the system prompt must be regular files inside the workspace: a `data/wiki` or memory file linked
156
- // to somewhere else on the host would otherwise hand its contents to the agent, sandboxed or not.
157
155
  function readWorkspaceTextSync(workspacePath: string, relPath: string): string | null {
158
- const located = locateInWorkspace(workspacePath, relPath);
159
- return located === null ? null : readTextWithinRootSync(located.workspaceReal, located.fileReal);
156
+ return readTextWithinWorkspaceSync(workspacePath, join(workspacePath, relPath));
160
157
  }
161
158
 
162
159
  function workspaceFileExists(workspacePath: string, relPath: string): boolean {
163
- return locateInWorkspace(workspacePath, relPath) !== null;
164
- }
165
-
166
- // Resolved first, so a file linked to another file inside the workspace is read at its target.
167
- function locateInWorkspace(workspacePath: string, relPath: string): { workspaceReal: string; fileReal: string } | null {
168
- const workspaceReal = realpathSyncOrNull(workspacePath);
169
- const fileReal = workspaceReal === null ? null : realpathSyncOrNull(join(workspaceReal, relPath));
170
- return workspaceReal !== null && fileReal !== null && isWithinRoot(workspaceReal, fileReal) ? { workspaceReal, fileReal } : null;
160
+ return locateWithinWorkspace(workspacePath, join(workspacePath, relPath)) !== null;
171
161
  }
172
162
 
173
163
  export function buildWikiContext(workspacePath: string): string | null {
@@ -31,6 +31,10 @@ const OWNER_ONLY_PREFIXES: readonly string[] = [
31
31
  "/shortcuts",
32
32
  "/collections-registry",
33
33
  "/chat-index",
34
+ // presentBrep runs the script it is sent as code in this process
35
+ // (@gui-chat-plugin/brep, through node:vm, unsandboxed): a client token that
36
+ // could post here could run anything the server can.
37
+ "/brep",
34
38
  ];
35
39
 
36
40
  /** A collection action or feed ingest of kind "agent" starts a hidden agent
@@ -15,6 +15,8 @@ import { loadCollection, validateCollectionRecords } from "../../workspace/colle
15
15
  import { defangForPrompt } from "@mulmoclaude/core/collection";
16
16
  import { executeOpenCanvas } from "../../../src/plugins/canvas/definition.js";
17
17
  import { executePresentShapeScript, SHAPE_EXTENSIONS } from "@gui-chat-plugin/shapescript";
18
+ import { executePresentBrep } from "@gui-chat-plugin/brep";
19
+ import { agentRunsOnHost } from "../../system/docker.js";
18
20
  import { executeMapControl } from "@gui-chat-plugin/google-map";
19
21
  import { errorMessage } from "../../utils/errors.js";
20
22
  import { badRequest, serverError } from "../../utils/httpError.js";
@@ -357,6 +359,32 @@ bindRoute(
357
359
  }),
358
360
  );
359
361
 
362
+ // presentBrep — a solid model built from a replicad script (@gui-chat-plugin/brep).
363
+ // The package owns the build, its checks, the path rules and the writes under
364
+ // `artifacts/brep/`, through the generic `files.artifacts` capability.
365
+ //
366
+ // The script is JavaScript, and the package runs it through `node:vm` in THIS
367
+ // process, unsandboxed: a call can do what the server can. So the route answers
368
+ // only when the agent runs on this machine unsandboxed, where it can run code
369
+ // here anyway. With the Docker sandbox on it refuses: the agent's calls arrive
370
+ // with the owner's token, so nothing else on this route would stop a script
371
+ // from leaving the sandbox. The tool is not offered then either
372
+ // (server/agent/activeTools.ts); this is the boundary, that is the courtesy.
373
+ //
374
+ // A build blocks the event loop while the kernel works (0.2 to 1.6 s for the
375
+ // parts in the package's tests); builds run one at a time.
376
+ export const BREP_SANDBOXED_MESSAGE =
377
+ "presentBrep is not available while the Docker sandbox is on: it runs its script as code on the host. Start MulmoClaude with --disable-sandbox (DISABLE_SANDBOX=1) to use it.";
378
+
379
+ bindRoute(
380
+ router,
381
+ API_ROUTES.brep.create,
382
+ wrapPluginExecute<Parameters<typeof executePresentBrep>[1], unknown>(async (req) => {
383
+ if (!agentRunsOnHost()) return { message: BREP_SANDBOXED_MESSAGE };
384
+ return executePresentBrep({ files: { artifacts: makeArtifactsFileOps() } }, req.body);
385
+ }),
386
+ );
387
+
360
388
  // manageKenteiScript — KenteiScript quizzes (`kenteiscript` package). The
361
389
  // package owns the actions, the TYPESAFE_API_KEY check and the script / path
362
390
  // handling; the host adds `files.byPath` (`.json` only) so a `path` relative to