You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(electron,web): run desktop backend outside production mode, keep save token fresh
The packaged desktop app launched its backend with NODETOOL_ENV=production
only to make the pack loader require an allowlist. The server treats
production as "hosted cloud" and disables local-only features the desktop
is built around: the Python bridge (every Python node failed with "Python
bridge is disabled in production"), the vector/RAG nodes, the file browser,
workspaces, MCP config, local model scanning, and the /mcp mount the
bundled Claude Desktop extension connects to. Give pack trust a dedicated
flag (NODETOOL_PACKS_REQUIRE_ALLOWLIST=1), set that from Electron instead,
and leave production mode to hosted deployments.
Also adopt the server's updated_at after a save that raced a user edit:
saveWorkflow kept the whole stale workflow object in that branch, so the
client's concurrency token never advanced past its own successful write and
every later save and autosave failed with an optimistic-concurrency
conflict.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ANBmpjQdGvEasgGZfbuyBs
Copy file name to clipboardExpand all lines: docs/configuration.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -431,6 +431,7 @@ the run is a separate concern; see
431
431
|`NODETOOL_ENABLE_FAKE_PROVIDER`| Register the `fake` provider id as a builtin, so a workflow can select it | no |`1` only, and ignored when `NODETOOL_ENV=production`. Separate from `NODETOOL_FAKE_PROVIDERS`, which fakes the providers that are already registered |
432
432
|`NODETOOL_PACK_SEARCH_PATHS`| Extra `node_modules` directories to load node packs from | no | Comma-, semicolon-, or `PATH`-separator-delimited (`:` is not a separator on Windows, so drive letters survive). Paths that do not exist are dropped. Searched before the walk up from the working directory. See [Node Packs](node-packs.md)|
433
433
|`NODETOOL_OPTIONAL_NODE_MODULES`| A single extra `node_modules` directory for pack loading | no | The one-path form of `NODETOOL_PACK_SEARCH_PATHS`; both are read, and the desktop app uses this to point the loader at its bundled install root |
434
+
|`NODETOOL_PACKS_REQUIRE_ALLOWLIST`| Default `allowUnlisted` to false without production mode | no |`1` only. Same trust default `NODETOOL_ENV=production` gives, without disabling the local-only features production mode turns off. The packaged desktop app sets it — its optional-node directory holds user-installed code, but it needs the Python bridge, file browser, and the rest of the local surface. An explicit `allowUnlisted` in `packs.json` still wins |
434
435
|`NODETOOL_CHAT_DETACH_GRACE_MS`| How long a running chat turn survives with no client attached | no | Default `600000` (10 minutes), then the turn is aborted so an abandoned client cannot leave an agent working forever. See [Chat turn replay](#chat-turn-replay)|
435
436
|`NODETOOL_CHAT_REPLAY_RETENTION_MS`| How long a finished turn is kept for a late reconnect | no | Default `300000` (5 minutes) |
436
437
|`NODETOOL_CHAT_REPLAY_BUFFER_EVENTS`| Frames buffered per turn for replay | no | Default `2000`. A client whose `last_seq` predates the buffer is told the replay is incomplete and refetches thread history over REST |
Copy file name to clipboardExpand all lines: docs/developer/custom-nodes-guide.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,7 +160,7 @@ To avoid silently running whatever happens to be in `node_modules` in production
160
160
-**Allowlist** — a list of trusted pack names; `"*"` allows everything. Set via:
161
161
- The env var `NODETOOL_PACKS_ALLOWLIST` (comma-separated names), or
162
162
- The `allow` field of `~/.config/nodetool/packs.json` (path overridable with the `NODETOOL_PACKS_CONFIG` env var).
163
-
-**`allowUnlisted`** — whether packs not on the allowlist load anyway. Defaults to **`true` in development** (so installing a pack just works) and **`false` in production**(`NODETOOL_ENV=production`). Override via the config file.
163
+
-**`allowUnlisted`** — whether packs not on the allowlist load anyway. Defaults to **`true` in development** (so installing a pack just works) and **`false`**when either `NODETOOL_ENV=production` or `NODETOOL_PACKS_REQUIRE_ALLOWLIST=1` is set. The packaged desktop app sets the latter — it needs the allowlist without production mode, which would disable local-only features. Override via the config file.
164
164
165
165
Two further guards protect the registry regardless of trust:
0 commit comments