Skip to content

Release 0.400

v0.400.75: DWG pictures, the follow-ups (after v0.400.46)

  • Fixed: a closed box inside a sheet whose real border is drawn in segments (each shorter than the box) is no longer taken for the border, so the content around it is no longer cut. Thin strokes outside the box, on one line, that together run past both of its edges now count as an edge, as one long line already did.
  • Fixed: a border stroke drawn twice, the copy out by floating-point noise, no longer makes the real border lose (a small tolerance on the edge).
  • Fixed: the error text of a DWG picture or crop no longer carries the parser container’s temp paths: an OSError gives only its reason, and any other error’s absolute paths read <file>.
  • Changed: a blank dwg_render window with no sheet frame says the sheet could not be found: model space may be empty, or its entities could not be read (the frame is also missing when reading them failed).
  • Tests: the border-try cap and the inside-line rule each have a test that fails without them.

v0.400.74: the SQL children read their ends right (follow-up of v0.400.55)

  • Fixed: a statement refused at the memory limit no longer costs a healthy child its place. A child being killed held a place in the pool count, so the pool could look past its cap and kill a child that had just answered.
  • Fixed: an app can no longer fake the memory limit. A trigger that raised the words “out of memory” made every write kill and replace a SQL child. The limit is now read from SQLite’s own code (SQLITE_NOMEM) or Bun’s out-of-memory RangeError, never from the text.
  • Changed: the fork that replaces a child killed at the memory limit is paced: 4 at once, then 2 a second for the whole server, for app SQL and for table_sql alike (a fork blocks the event loop for tens of milliseconds). A statement that needs such a fork waits its turn, at most its own time limit, then hears “busy”. A statement on a free child never waits, and a read’s one second try forks at once.
  • Changed: a SQL child says when it runs. An exit before that reads as “did not start” (its memory limit may be too small for the runtime), not as a statement at the limit. A child SIGKILLed by someone else (most likely the kernel, short of memory) says so, in place of a bare “exited”.
  • Changed: the server’s own steps on an app file (a schema script, a write batch, a copy, an import) that meet the limit say the file or a value is too large for the step, not “add a LIMIT”.

v0.400.72

a wrong MANTLE_RUNTIME is caught before a roll

  • Added: the updater refuses a roll, with nothing changed, while .env holds a MANTLE_RUNTIME other than empty, node or bun, holds the line twice, or writes it in another form (export, blanks around the =). Before, the roll pulled, migrated and then every app service stopped at start, so the site was down until .env was fixed. It reads the line as compose does (quotes, a trailing comment). A target older than v0.400.62 runs Node and is never refused for this; for bun the log says so. It is the first check of a roll: it reads .env only.
  • Added: scripts/sanity.sh shows the runtime of web, api and the workers, warns about a container still on the old runtime after .env changed, and fails on a word run-service.sh refuses or a doubled line.

live updates checked on Bun

  • Checked: live updates (/api/realtime) on Bun, in the lab: every one of 20 streams got each event, filters and owner isolation held, and a stop with streams open exited 0, the same as on Node. See docs/update-prod.md, Live updates on Bun.

v0.400.71: every Node service starts as node itself

  • Changed: on Node (the default MANTLE_RUNTIME), web, api and the ten workers start as node --import tsx <entry> in their package, through scripts/run-service.sh, with no pnpm or tsx process above them. sandboxd and the parser start the same way (env -C <package> node ...). Each service gives back about 96 MB at rest: about 1.3 GB on a box with all 14 (PSS 4,066 MB to 2,727 MB, measured on the first port of this change). The container’s own folder stays /app, so every docker exec ... pnpm -C ... command works as before.
  • Fixed: a stop of sandboxd ends at once (tini passes the SIGTERM; it has no handler of its own), where pnpm start above it exited 1 on its own terms.
  • Changed: every long-running service on the server image has init: true. tini is PID 1 and the runtime its child, so a stop during boot ends at once, where node as PID 1 would ignore it until the SIGKILL. It also reaps the processes a docker exec leaves behind. Bun runs under tini the same way.
  • Known: a box whose docker-compose.yml has local edits keeps its old compose at the roll (the updater says “SERVER COMPOSE NOT REFRESHED”). It gets the new start with no tini, so a stop during boot waits for the SIGKILL. Move the edits to docker-compose.override.yml and run scripts/compose-adopt.sh, or add init: true to each service there.

v0.400.70

the code tools’ undo limit is a setting

  • Changed: the undo records the code tools keep per app (the newest 20) were also held to a fixed 64 MB. That limit is now APP_CODE_EDIT_MAX_MB (default 64, so nothing changes unless it is set).
  • Fixed: docker-compose.yml now passes APP_SNAPSHOT_MCP_MAX_MB to the app containers. Before, a value set in .env never reached them.
  • Changed: only a Moderator of a Present canvas’s home workspace can make, change or stop its open link, as for an app. Someone who may only edit the canvas is refused, in the Access panel and by the assistant’s link tools, with words that name the rule. A link made before stays live.
  • Database: migration 0352 makes the edit check ask the same (an app’s or a canvas’s link needs a Moderator of its home). No row changes. Rollback: packages/db/rollback/0352_canvas_link_moderator.revert.sql.

a tool to read again the PDF scans that drew blank

  • Added: maintenance task blank-scans (pnpm -C server/web blank:scans). It finds the PDF scans that page OCR read as blank before v0.400.56 (images in JPX, CCITT or JBIG2): SQL, then a search of each file’s bytes, with no model call. The dry run prints counts and an estimated cost. --apply --before=<the day the box got v0.400.56> reads the hits again, a batch at a time, and never sends a file twice.

a box can run its services on Bun

  • Added: the server image holds Bun 1.4.4 beside Node, for amd64 (the baseline build) and arm64, each pinned by its checksum.
  • Added: MANTLE_RUNTIME=bun in .env starts web, api and the ten workers on Bun, then docker compose up -d. Empty or node keeps the Node start of before. migrate and sandboxd stay on Node. See docs/update-prod.md, “Running a box on Bun”.
  • Changed: those services start through scripts/run-service.sh, which hands the process to the runtime, so a stop signal still reaches it.

on Bun, files go through Bun’s own S3 client

  • Changed: a service that runs on Bun (MANTLE_RUNTIME=bun) checks, stores, reads and deletes files through Bun.S3Client, which is native. The AWS SDK cost each such process about 27 MB, and a check took three times as long. The bucket checks and the store tools (ensure, verify, copy-from) stay on the SDK, and so does every service on Node.

the static client host is lighter

  • Changed: the client-web container serves the owner UI as plain files. It now runs on Bun and uses about 20 MB, where next start took about 170 MB. Its memory limit drops from 768m to 256m.
  • Fixed: MANTLE_APPEARANCE_ORIGIN points the host’s appearance read at web:3000 on the box’s own network, so the box no longer needs to reach its own public address.
  • Pairs the static client v0.8.11.

a stronger rule for new passwords

  • Changed: a new password still has at least 8 characters, and now at most 72 bytes (was 1024; bcrypt keeps no more). Below 20 characters it uses 3 of small letters, capitals, digits and symbols; a passphrase of 20 or more needs no mix. The common-password list is on for every box, not only under a box policy. A refused one answers password_weak for too few kinds.
  • Changed: the common check is stricter: it also catches short keyboard and word shapes (Pass1234, Q1w2e3r4, Qwer123!), a short piece said again (Ab1!Ab1!), and a password that is half runs or more.
  • Unchanged: a password set before keeps working, and only a box policy asks for a change at sign-in, on its own minimum and the common list. On a box with MANTLE_POLICY_PASSWORD_MIN, a login whose password the stricter common check now catches is asked to change it at its next sign-in.
  • Added: GET /api/auth/bootstrap-state carries passwordRule, so the sign-up, invite and change forms can show the rule as the person types.

app history for audits (compare in place, git bundle and back)

  • Added: code_diff compares two states of a mini app’s source as unified diffs: draft, live or a history entry by seq (v3); live to draft by default; all files or one path, cut and said so past the answer’s limit. An entry’s side is the code it made live, never the draft a snapshot kept. app_log lists the history line for an audit (seq, kind, trigger, note, actor and login id, time, file count and size), from the rows only, never the code; before_seq pages on. Both are reads with app_snapshot_list’s gate (a read of the app, ownerOnly + loginTurns), on MCP and in the apps group.
  • Added: app_export takes format: "git": the app’s versions as a git bundle (.bundle), one commit per publish on main, oldest first. Each commit holds only what a version row never changes (time, vN publish, the restore it came from, the role as author, never an email), so the same versions give the same commit ids on every export; the editable note and the login id ride as git notes (refs/notes/commits). Code only (no data, no draft, no secret), with a package export’s read right. Written in TypeScript (a pack and the bundle header, streamed to disk; no git binary on the box). Bounded: 5000 versions, 256 MB of code read, a 64 MB bundle, two exports at a time per process. A name git refuses on a checked clone (.git, .gitmodules, .gitattributes and their NTFS short names) is left out and listed. An outside agent downloads it with GET /api/v1/files/{id}/download and runs git clone, then log, blame and bisect (docs/app-authoring-guide.md, “History: versions and snapshots”).
  • Added: app_source_from_bundle brings an outside agent’s work back: the newest commit of a git bundle in /files (git bundle create back.bundle main, then an upload) becomes the app’s draft, and the draft builds. Its history must hold the live version’s commit, or nothing changes (export again and merge). The live app does not change; publish is its own step. Same rights as app_source_set, and a read of the file.
  • Security: the bundle is untrusted input, read by a pack reader in TypeScript with limits: 64 MB, 50,000 objects, 1 MB an object, a delta chain of 50, 256 MB unpacked in all, and its checksum. Plain files and folders only: a symlink, a submodule, an odd file mode, a .. or .git name, or a file that is not UTF-8 text fails the import, naming the path.

v0.400.61

a slow large upload is no longer cut at 300 seconds

  • Fixed: a large upload over a slow line now finishes. Node gave a request 300 seconds to arrive in full, then answered 408. A 451 MB upload at about 1.1 MB/s died at 309 seconds, and the client showed “No progress for 60s”.
  • The server now gives a request the time the streamed upload cap needs at 128 KiB/s, and never less than an hour. The default cap of 512 MB gets about 68 minutes. The limit covers the request’s arrival only, so live streams and downloads are not cut. Slow headers still stop at 60 seconds.

switching calls on works with no restart

  • Fixed: switching Calls on in Settings > Services started LiveKit, but the brain kept an empty calls host until web was recreated by hand, so every call answered “Calls are off on this brain”. A roll now writes MANTLE_CALLS_HOST ahead, as install.sh does, and a switch that writes the calls host or key recreates the app containers once, as a new token already did.
  • Added: a Present canvas (a deck, a dashboard, a schematic) can have an open link, made in its Access panel as for a page. The link shows the canvas live, full screen, always the latest save, with a small “Shared canvas” label that carries Replay and Full screen. No login is needed.
  • Security: the canvas runs in the same locked frame as in Present (no network, no cookies, no tools). The link page lets the frame load the brain only, so a canvas cannot send its frame to another site. The link is checked again on every frame load, so stopping the link or deleting the canvas ends it at once. Both new routes take a rate limit, and the link page never starts a render.
  • Known: a link reads and writes no saved canvas data (mantle.data). A canvas has no contact share yet.

on Bun, a search pattern too hard for the engine fails out loud

  • Fixed: code_search on Bun no longer says “no hits” when hits exist. Bun’s regex engine (the part that matches search patterns) gives up on a very hard pattern and answers “no match” with no error. On Bun a line that takes 250 ms now fails the search, and the message says how to get round it. Node does not change.

v0.400.56

a SQL process has a memory limit

  • Fixed: one row of many large columns could take a SQL process to several GB in a web container of 3 GB, and an open-link visitor could ask for that. Each value passed the size limit, and the row was built before the reply limit could read it. A SQL process now runs under a kernel limit of 1 GB on Linux, and it stops near 500 MB of real memory. Node needs about 575 MB of that limit to start, and most of it is address space it does not touch.
  • Changed: a statement that meets the limit fails with a message that names the way out, and its process is replaced. If the engine ends the process, the message says the limit is the likely cause. A read that fails on a process that served before gets one try on a new one, so its answer does not depend on what ran before. A write does not.
  • Changed: when many SQL processes together fill a container, the kernel kills one of them and not the server. A crashed process writes a small core.
  • Known: some very large legal work now fails: a write batch of about 220 MB or more, and an IN list of 2 million literals.

sandbox image 24.04-v4, every language with its kit

  • Changed: the default sandbox image is 24.04-v4. A sandbox is a closed-off computer where agents build and run code. It now holds Node 26, Bun, Python 3.12, Go 1.27 and Rust 1.99 (with the wasm32 target, wasm-pack, wasm-bindgen and wasm-opt). Each language comes with a kit of libraries, ready in the image or in its package cache, so a first build works with no network. SQLite works in every language, and the sqlite3 and duckdb command lines are there too.
  • The image is reproducible: base images by digest, apt from a dated snapshot, every binary checked against a pinned sha256, every library from a hashed lockfile.
  • Added: /etc/mantle/sandbox-kit.json lists what the image holds. Its shape is a contract (schema 2), described in docs/sandboxes.md: fields are only ever added, and a rename or a removal bumps the schema. The code tools read it to say what a target can use. sandbox-smoke proves the kit works online and offline.
  • Added: the sandbox network allows proxy.golang.org, sum.golang.org and index.crates.io.
  • Changed: images are kept disk-safe. The updater pulls the base image only when there is enough free disk, and prunes old sandbox images (it keeps the pin, the one before the roll, the two newest and every image a container uses). sandboxd refuses to pull on a nearly full disk. roll.sh prints the disk and the sandbox images after a roll.

a team’s app keeps the team’s rules for an Admin user

  • Fixed: an app held by a team ran at admin rules when an Admin user opened it, so every tool it declared ran with the admin’s rights. The check read who holds the app in the caller’s own view, where the team’s grant was not visible. It now reads on the admin pool, and only for the owner’s app.

map is the default tool loading for assistants

  • Changed: an assistant with no tool_loading set now runs map. Tool loading decides how an agent sees its tools on each turn. On map it gets its core tools plus a short map of the rest, and calls those through tool_call. The 2026-10-31 bench and the dev trial measured this mode.
  • An assistant on a Haiku model runs deferred, which scored better for it on the bench (91 of 101, against 86 on the map). Every other agent (specialists, workers) stays on full until it is measured. An agent’s own params.tool_loading still wins. Docs: docs/tools-and-skills.md, “The default mode”.

eleven more libraries for mini apps

  • Added: a mini app may import mathjs (units and engineering maths), date-fns, zod (form checks), @tanstack/react-table (v9) and @tanstack/react-virtual (big grids, long lists), @dnd-kit/core and @dnd-kit/sortable (drag and drop), fuse.js (fuzzy search), papaparse (CSV), pdf-lib (make a PDF), qrcode, and markdown-it with dompurify. Each is served by the brain as its own file and loads only when an app imports it; an app that imports none loads the same runtime as before. canvas_library with for: 'app' has a guide for each, and the app authoring guide a table of which library does which job. A Present canvas may import the plain ones too (no canvas guide).
  • Security: none reaches the network, and none compiles code unless an app calls z.compile() or turns jitless off, which the frame refuses. Zod runs with jitless on, so it never probes for new Function under the frame’s CSP; Papa Parse refuses download and worker with an error that says so; markdown-it output goes through DOMPurify, which the guides require. math.js runs a person’s own formulas; the guides say never to run formula text another person saved (math.js is not a sandbox for it).
  • Changed: an import the runtime does not export now lists at most 60 of the module’s names, the close ones first (mathjs exports over a thousand).

PDF scans in JPX, CCITT and JBIG2 draw

  • Fixed: a PDF scan whose images use JPX (JPEG 2000), CCITT or JBIG2 rendered as white pages, with no error. pdfjs loads those decoders from a directory the caller must name (wasmUrl), and no open named it, so it dropped each such image. OCR then read a blank page: the document was skipped as no_text_layer, or the model’s sentence that the page is blank was indexed as the document. Every open now names the directory, through withPdf, so the render and the pictures pass both draw these images. The decoders load from the image’s own disk, with no network. A 75 million pixel JPX page stays well inside the parser’s 2 GB limit.
  • Not repaired: documents already stored stay as they are. How to find them is in docs/parser.md (“Scans that drew blank before the decoders”). Reading them again spends model money, so it waits for the owner’s word.

the documents engine on by default, and in team apps

  • Changed: the documents engine (Gotenberg, Settings > Services Documents) is on by default. A new install starts it. An existing box gets it at its next roll (the updater, and scripts/roll.sh step 3c, so the roll that brings this release already starts it), unless it was switched off on purpose: MANTLE_DOCUMENTS_OFF=1 in .env, which an off in Settings > Services and install.sh --no-documents now write, or an accepted Settings off in the audit log from before. The roll log says what it adds: about 700 MB to download, 2.4 GB on disk, up to 2 GB memory. Too little disk, under 3000 MB of memory, an unreadable audit log or a failed image download switches nothing on and says why; the roll goes on. Off works as before.
  • Security: the engine refuses every folder URL (CHROMIUM_DENY_LIST), so a caller’s HTML cannot list /tmp or a job’s folder to find another job’s files.
  • Added: team apps may call pdf_render, screenshot_render, office_to_pdf and pdf_tools (v1 refused them). The inputs are read in the app’s scope, a page print (node_id) is refused, and the file lands at the top of Files in the workspace that holds the app, only for a user who moderates it, indexed by its metadata only (no model reads it); anyone else gets an error that says to pass bytes: true. The app’s declared tools, the author ceiling and the run’s scope are unchanged; a shared link still calls no built-in tool.
  • Added: the four tools take bytes: true from an app’s own call: nothing is saved, and the PDF or picture comes back as base64 within file_read’s caps (16 MB a call). An agent or an MCP client is refused.

a drawing’s picture frames the sheet, and dwg_render

  • Fixed: the picture of a DWG or DXF frames the sheet, not all of model space. A note parked far off the sheet no longer holds the sheet in a corner. What is left out is said in the digest and in frame.off_sheet. A drawing with nothing far off draws as before. A stored picture stays as it is until its file is extracted again.
  • Added: dwg_render (group circuits, and MCP) draws one uploaded DWG or DXF on request: the sheet, a window in drawing units, or all of model space. Read only: the picture goes back to the caller and nothing is saved.
  • Added: a mini app can show a picture. file_read and dwg_render take bytes: true from an app’s own call and answer base64 (at most 16 MB a call), which the app turns into a data: or blob: URL. An agent or an MCP client gets a refusal that names what to use instead.

the server runs right on Bun (fixes B0 to B2)

  • Added: a Bun compare lane. Bun can ignore an option without an error, so a green start proves little. scripts/bun-compare.mjs runs the test suite on Node and on Bun and names every test that fails, skips or goes missing on Bun, against a baseline that may only get shorter. .bun-version pins the version. bun-lane.yml runs it in CI; it reports and never blocks.
  • Fixed: the DNS pin and the tailnet proxy work on Bun. Bun ignored the setting that carries them, with no error, so the pin was off and a proxied call went direct. On Bun the real undici package now makes the call (packages/std/src/undici.ts). Node still uses its own fetch.
  • Fixed: three calls Bun does not have no longer throw. One of them ran each time a mini app started a new SQL child.
  • Fixed: more Bun gaps closed: one Content-Type on every runtime, Bun’s parse and abort errors, an unread body, a stalled request, a wrapped fetch, child processes, the render limit and the heap target. A PDF scan on Bun waits for its images, a legal JPEG scan no longer dies at the parser’s limit, and the table_sql child refuses env files.

table_sql runs in its own process, with size limits

  • Fixed: a table_sql query that runs too long now really stops. It runs in a child process, a separate program the server can kill. Before, a query stuck inside SQLite kept one CPU core busy for ever, even after the caller got its timeout.
  • Fixed: table_sql has the app pool’s limits: 16 MB a value and 16 MB a reply. Before, one statement (SELECT zeroblob(943718400)) took the web process to 1.87 GB on Node and 2.73 GB on Bun.
  • Fixed: each SQL child dies with its server. A child that dies between two statements no longer costs the next one: a read runs again on a fresh child. The guard also holds when the box has run out of file descriptors.
  • Fixed: a role statement retries every catalog race, deadlocks too, so a cleanup no longer fails by chance on a shared database.

a mini app can show a picture

  • Added: file_read and dwg_render take bytes: true and answer the file as base64 (the picture’s bytes written as text), at most 16 MB a call. Before, an app could not show a stored image: it has no network, and file_read gave a picture’s text, which is nothing.
  • Only an app’s own call gets the bytes. An agent or an MCP client is told what to use instead, since base64 in a model’s answer costs the turn and buys nothing. It grants no new read.

code tools, edit a mini app’s source in place

  • Added: six plain tools that view and edit a mini app’s DRAFT source without moving whole files, over MCP and in the brain: code_view (the file tree, or numbered lines of one file), code_search (hits as file:line: text, capped; a regex runs in a worker and is stopped after 3 s), code_edit (exact text that must match once, all edits or none, a dry run, a unified diff), code_insert, code_write and code_undo (by the edit_id each write returns). Each takes target: "app:<id>"; the brain makes no model call. Every read and write returns the tree’s rev, and a write with a stale base_rev fails with the current one; build: true runs app_build in the same call and returns its errors. Access is the app tools’: the reads ask what app_get asks, the writes what app_file_write asks. Granted with the apps tool group (Appsmith); a code line on the tool map. code_view with no path also returns kit: the language, the entry rule and every import the app build allows, read live from that build’s allowlist.
  • Changed: app_file_write, app_file_delete and app_source_set write through the same draft write. app_source_set takes base_rev; app_get, app_file_write and app_source_set return the rev, and the three writes their edit_id.
  • Migration 0351: node_snapshots.trigger gains pre_code_edit: each such write records what it changed (the files as they were, code only) and returns that entry’s id as its edit_id; code_undo takes one write back by it (or the newest write of a path) only while its files are as it left them, an undo returns its own edit_id (to redo), and an undo to code taken at team rules puts the app back at team rules. The newest 20 per app are kept within 64 MB, left out of the History list and the lookups by id. Rollback: packages/db/rollback/0351_code_edit_history.revert.sql (optional).

company sign-in in the apps (SSO, milestone 2)

  • Added: the web app, the desktop app and the phone can use company sign-in too. The client sends a PKCE challenge, the brain sends back a one-time code, and the client trades the code for a session (POST /api/auth/oidc/exchange). A code is 256 bits, lasts 2 minutes and works once; only its hash is kept. The code goes only to mantle://oidc, pages on the brain, MANTLE_CLIENT_ORIGIN and the named CORS origins.
  • Added: for a linked login, a fresh company sign-in takes the place of the password when it makes a key or approves an MCP client (POST /api/auth/oidc/fresh).
  • Unchanged: with the mode off, none of this runs. Migration 0350.

the tailscale sidecar sends no logs home

  • Changed: the tailscale sidecar no longer uploads its logs. It is always up, so a box that never joined a tailnet (a private network) sent about 11 KB of startup lines to log.tailscale.com on every start. TS_NO_LOGS_NO_SUPPORT now defaults to true. A box on a tailnet that demands flow logs can set it to false in .env.

v0.400.45: map tool loading, a third mode beside full and deferred

  • Added: params.tool_loading: 'map'. The agent gets the same core tools as on deferred, plus tool_call and tool_help. Every other tool it holds is named in a tool map at the top of its prompt: one line per area, such as area (gloss): object(verb verb) verb. The map is the same bytes every turn for the same grant, so the prompt cache keeps it.
  • A call through tool_call runs the same checks as a direct call. use_tool and tool_search still work as other names for it. A wrong name gets the three closest names back, and bad arguments get the tool’s schema back once per turn.
  • The MCP surface did not change here (see the MCP tool map above). Docs: docs/tools-and-skills.md, “Map tool loading”.

v0.400.44: company sign-in (SSO), milestone 1

  • Added: a person can sign in with their company account. SSO (single sign-on) means one company login works for many apps. The brain speaks generic OIDC, the open sign-in standard (authorization code with PKCE, state and nonce). Nothing in the code names one provider; the docs give a Microsoft Entra guide.
  • The box .env sets the mode: off (the default), optional or required.
  • A person links their company account while signed in, by issuer and subject only, never by email. The offer can be put off for 7 days, and profile settings have it too. In optional mode a person can unlink (a login with no password sets one first).
  • Required mode locks nobody out. An unlinked login signs in once with its password and is held at the link step. The original account and outside logins keep their passwords. SSO never creates a login or an admin. An SSO session lasts MANTLE_OIDC_SESSION_HOURS (12 by default).
  • Unchanged: with the mode off, none of this runs, and every answer is the same as before. Migration 0349.

v0.400.43

the box policy block (corporate Phase 1)

  • Added: four settings in the box .env let an operator set rules for the whole box. Empty means no rule, so a box with none set works exactly as before.
    • MANTLE_POLICY_TELEGRAM=off: Telegram stops. The poll worker idles, the telegram_* tools leave the lists, and the Telegram routes refuse with a 403. Rows are kept.
    • MANTLE_POLICY_MODEL_DENY and MANTLE_POLICY_PROVIDER_ALLOW: block models, or allow only some providers. One check covers every model call (chat, failover, sub-agents, embeddings, vision, speech, images, the decider) and web search. Auto routers are blocked while a deny list is set. Pick lists hide blocked models and saves refuse them. A refusal opens a model_policy provider alert.
    • MANTLE_POLICY_PASSWORD_MIN: a minimum password length plus a list of common passwords. A sign-in whose password fails the rule must change it first.
  • Added: GET /api/policy feeds the read-only Policy panel (404 when no policy is set). Migration 0347. Docs: docs/policy.md.

over MCP, replacing or deleting a key waits for a person

  • Changed: when an MCP client replaces or deletes a vault key, nothing changes at once. The change is sealed on the key’s row, and a pending call names the key, its kind, its target and a masked preview, never the value. A person approves it on the Pending screen or a Telegram card. pending_approve over MCP refuses it.
  • The approval makes the change through the vault’s one write door and its checks again. Any other write to the key makes the hold stale, and a rejection drops it.
  • Unchanged: adding a new key is still instant. An import adds at once and holds its replace rows for one approval. The Keys screen is the same.
  • Added: the Assistant’s tables-rows group gains table_rows_add and table_rows_upsert, so it writes many rows in one call.

v0.400.41

many row edits in one call, by row id

  • Added: table_rows_upsert takes the key ["@row_id"]. Each row carries its row id and is updated, never added. An unknown, missing or repeated id, or a row with no cells, rejects the whole call before anything is written. This helps MCP clients that ask the user to allow every write (ChatGPT does): ten row edits become one approval, not ten.
  • Changed: the one-item write tools name their batch twin. table_row_update and table_cell_set point to table_rows_upsert, the page block tools to page_blocks_apply, and app_file_write and app_file_delete to app_source_set.
  • Docs: a “Using ChatGPT well” box on the MCP connector help page.

connect ChatGPT over MCP

  • Docs: a guide page, docs/guide/07-api/09-connect-chatgpt.md, shows how to connect ChatGPT to the brain over MCP: who may add and publish it, the sign-in, the frozen tool list and Refresh, and how to disconnect. docs/mcp-as-a-login.md says what a company must know.
  • Changed: the MCP sign-in (OAuth) reads the resource value ChatGPT sends (RFC 8707). The brain’s tokens work only at this box’s /api/mcp, so a token is already bound to one place. A value that names another server is shown as a warning on the consent page and logged, and the sign-in goes on. A Claude connector with no value works as before.

v0.400.39

credential vault v2, Part 1 (secret kinds, one write door)

  • Added: a vault key can now be a token, a password, an SSH key or a login. It can carry a name, a target, sealed extra fields, tags, an approval switch and a tailnet flag (migration 0346). Old keys are tokens and work as before.
  • Changed: every write to the vault goes through one gateway (set, test, delete and a CSV import), behind one gate that fails closed, with one audit row per write. No value appears in any reply, error or log. Only a token is ever opened; the other kinds stay sealed until the next parts of the plan.
  • Added: POST /api/keys/import, and the MCP tools api_key_set, api_key_test, api_key_delete and api_key_import beside api_key_refs. Their value inputs are redacted. Widening a key over MCP (its target, tags, approval or tailnet flag) needs the value again.

the decider sizes its requests to the model

The decider is the model that makes the brain’s small choices, such as which passages fit a question or which context to drop.

  • Changed: each decision request is sized for the chosen model, not a fixed 32k window. A tested model takes the lowest of its profile limits and the live catalog’s context size. An untested model gets careful limits (16 questions, 16,384 tokens). One planner spreads a long list evenly over as many requests as the limits need. A request above the model’s limits is refused and the step is skipped. A reply that stops exactly at the token limit counts as a failure, since it was most likely cut. Jev’s requests are unchanged.

open dependency alerts closed

  • Security: the open Dependabot alerts are closed: dompurify 3.4.17, ip-address 10.7.5 and @hono/node-server 2.1.5, and in docs-site astro 7.4.4 and starlight 0.42.8. Minor and patch updates to the latest everywhere else. zod 3 and katex 0.16 stay, because firecrawl and mermaid still need them.

v0.400.35: the decider’s privacy value and model profiles

The decider is the model that makes the brain’s small choices, such as which passages fit a question or which context to drop.

  • Changed: privacy is one value: zdr (zero data retention, the provider keeps nothing) or no_training. The old params.zdr still reads (true is zdr, false is no_training), and the stricter one wins on a mismatch. Every call now carries a privacy block. Nothing retries with less privacy.
  • Added: decision profiles for the 28 models of the 2026-10-30 probe. The decider pool refuses the 4 models that cannot take its request, at save and in model_pool_set. perplexity/pplx-decider-v1.2 joins the decider template as the second choice; Jev stays the default. New fallback price rows.

v0.400.34

Microsoft Foundry as a chat provider

  • Added: provider foundry for Azure AI Foundry and Azure OpenAI deployments, on the v1 chat completions API. The model id is the deployment name.
  • The endpoint is the route’s Base URL, else MANTLE_FOUNDRY_ENDPOINT (https only). MANTLE_FOUNDRY_API_VERSION picks v1, preview or the dated route. The key lives in the vault (service foundry). MANTLE_FOUNDRY_API_KEY is a box fallback, sent only to the box endpoint.
  • Errors work as for the other providers: a 429 is tried again after the wait the provider asks for, a missing deployment fails over and opens a provider alert, and a content filter reads as a refused input. Docs: docs/foundry.md.

the UI sounds save names its login

  • Fixed: PUT /api/profile/sounds now takes loginId, the login the choice was made as, and refuses a save for any other login (403, code login-mismatch), as the Desk and the description saves do. A tab left on one login no longer writes its sounds to another login after the browser switched logins. The client sends it from its next release; an older client gets the 403 and keeps its choice in the browser only.

v0.400.31

a person’s description, for the team and its agents

  • Added: every login has a description on its person card: who it is to the team, a job title, a role or a relationship (“Developer”, “Project manager”, “Jason’s wife”), at most 500 characters. A login sets its own (PUT /api/profile/description); the users area sets anyone’s (PATCH /api/users/:id, listed on GET /api/users). It is open to every login and agent that may see the card: on GET /api/people, in the messenger directory (whose search now matches it) and on one conversation’s people. messenger_directory and messenger_open carry it to agents, so one asked to message “the developer” can find who that is. Stored as the profile key description; no migration (docs/messenger.md, “People”).

a tool that names a vault key updates again

  • Fixed: api_tool_update reads the key vault through the connectors area, as its writes do, so a tool that names a vault key updates again.

v0.400.28

the MCP call log (Journal v3 J8, part 1)

  • Added: the brain keeps one row per MCP tool call: who called, how, the workspace, the tool, the arguments with secrets removed (about 4 KB), ok or the error, the time taken, the item ids and the reply size. Never the reply itself. Every call is logged once, over HTTP and stdio, for every kind of login.
  • Calls by one login less than 30 minutes apart count as one work session.
  • The log hides secrets: names run together, passwords in URLs and connection strings, header pairs, tokens inside strings and the newer key shapes.
  • Added: GET /api/mcp-calls reads a login’s own rows only. An Admin user reads only their own too: being Admin is managing, not reading.
  • A nightly sweep removes rows older than 90 days. No model runs anywhere in this. Migration 0345.

the member checks ask Admin membership (plan v3.2 S8e)

  • Changed: the last five checks that read the login’s role column now ask Admin membership, as the session does: a member is a login that is not an Admin user. They are the member asset token and the member re-check of a stream or frame (server/web/lib/auth/session.ts), the MCP member caller and the OAuth consent’s member target (server/web/lib/mcp-auth.ts), and who is told login notices (packages/content/src/login-notices.ts). No decision reads the role column any more; it is display only. Every fleet box counts role drift 0, so no answer changes there. Where a superuser’s hand write left the role and membership apart, these five now answer as that login’s session already does: a role=member login inside Admin is no member here, and a role=admin login outside Admin is one. No migration.

the narrow route is always on (plan v3.2 S7c)

  • The switch MANTLE_NARROW_SYSTEM is gone. The system work of an Admin area exit runs as the narrow system role on every box, always. A MANTLE_NARROW_SYSTEM line in a box’s .env is inert; an operator may delete it. A box that set it to 0 (or off, false) is on after this roll. The fallback for a narrow refusal is a pin to the image one back, with MANTLE_NARROW_SYSTEM=0 in the same .env edit: that image still reads it (docs/update-prod.md, “The narrow system route: on by default (S7b), always on (S7c)”).
  • The report-only counts go (migration 0344): the would-refuse, content-write and cascade counts, which only told a write made off the narrow route, with their triggers and functions. migrate drops the would-refuse triggers table by table before the migration. What the narrow role is held to (the one-way rules, the message guard, the login and grant holds) refuses it as before. narrow-denied and its epoch stay; scripts/arch-scoreboard-box.sh prints those and the epoch lines only. The revert is optional for a pin one back.
  • Unchanged: the narrow role still reads the content tables. Closing those reads is its own step (S7d).

v0.400.24: a box without calls can roll again

  • Fixed: a box without calls can roll again. The livekit service demanded its host and key with a compose guard, and compose checks those guards on every command, so any compose command stopped on a box without calls. The values now default to empty. The container still refuses an empty host or key when it starts.

v0.400.23

summaries at publish (Journal v3 J9)

  • Added: app_publish, the publish route, present_create and present_update take an optional summary. The brain indexes that summary, so a search finds the app or canvas by what it is for.
  • Without one, an app publish or a canvas’s save after a quiet spell makes one summarizer call (for an app: its manifest, schema and the start of its source; for a canvas: its text and its picture). It is skipped when nothing changed, when the author wrote a summary, outside an assistant’s workspace, and on a direct MCP call outside Admin. The summary is made in the extract job, never during the publish itself.

MCP tool hints

  • Feature: every tool on the MCP surface carries the MCP tool annotations (title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint), derived from its policy at registration (packages/mcp-core/src/tool-annotations.ts, one pure function over facts each tool’s policy declares: effect, the new destructive and idempotent, outside). readOnlyHint is true exactly when the declared policy says read; destructiveHint marks a write that destroys stored data nothing keeps (the hard deletes, the shells, a whole-body or file replace with no revision); idempotentHint a read or a documented upsert, set or mark; openWorldHint the web tools, the mail and Telegram sends, the peer tools, the OpenRouter and Mapbox fetches and every connector tool. A connector tool carries hints only once an admin confirmed it reads only. Advisory: the gate decides what runs, exactly as before. Why: Claude Desktop offers “Always allow” only on a read-only tool, so a Teams user had to approve every search (2026-10-28). Docs: docs/connecting-claude.md, “Tool hints: approve the reads once”.
  • Upgrade notes: after the roll, open the connector’s tool permissions in Claude Desktop (or claude.ai) and set the read tools to Always allow, once per connector. The tools/list snapshots moved (packages/mcp-core/src/__snapshots__): the hints, no tool added or removed.

the documents engine (Gotenberg) beside the browser sidecar

  • Feature: a second render sidecar, the documents engine (gotenberg/gotenberg:8.39.0, the gotenberg compose service behind the new optional service Documents, profile documents, Settings > Services or scripts/install.sh --documents). Off by default on every shape. The browser service stays exactly as it is. The plan: dev-brain page f7c67c92 (2026-10-23).
  • Upgrade notes: nothing to do. The roll writes GOTENBERG_PASSWORD into .env (64 hex, never rotated) and the app containers carry it inert until the profile is on; an updater from before this release does not know the service, so the Settings row appears one roll after the brain that knows it. Memory on the smallest box: about 300 MB resident after the first LibreOffice job, up to 0.8 GB during a large page print (cap 2 GB); the Services screen warns a box under 6 GB.
  • Config: GOTENBERG_URL and GOTENBERG_PASSWORD in the app-env anchor (.env.example); the probe on the dashboard vitals (documents) and in Settings > Services (/health, /version).
  • The documents package (packages/documents, docs/documents.md): every Gotenberg conversion route behind one route table and one client, inputs as refs only (file ids, a page or drawing id printed with a render cookie, inline html or markdown), outputs landed by the export rules. The Mantle-owned fields (url, cookies, extraHttpHeaders, userAgent, downloadFrom, the webhook and raw file fields) are refused on every surface. A render cookie the print surface refuses now answers 403 instead of the login redirect.
  • HTTP API: POST /api/v1/documents/<family>/<route> with { inputs, options, filename } and ?return=bytes, an Admin user’s session or API key (area files), the documents rate limit.
  • Agents, MCP and apps: the tools pdf_render, screenshot_render, office_to_pdf and pdf_tools in the new documents tool group (the persona, the pages writer and the ledger get it on upgrade), on the MCP server, and callable from an admin-held mini app through host.tools.call (the authoring guide’s “Reports” example). Team apps refuse them in v1. export_node embeds real drawings in Word exports through the engine when the service is on.
  • Pages export: with the service on, the page and drawing PDF export and the Word drawing raster print through the engine (the browser sidecar stays the fallback and keeps the SVG re-render). The export takes print options as query parameters: paper, landscape, margin (or per side), header, footer and page_numbers (docs/pages.md); the print surface renders its images eager, so a long page’s pictures are in before the print.

faces in Messenger, and one people gate

  • Added: Messenger chats and the directory show other people’s and agents’ faces: their avatar, and for a person their photo. GET /api/messenger/photo/:loginId serves a photo only to a login that may see that person. The MCP tools leave faces out, since a face tells a model nothing. Docs: docs/messenger.md, “Faces”.
  • Added: what a person shares with the team reaches a caller through one gate (packages/content/src/people.ts). New routes: GET /api/people, /api/people/:id, /api/people/presence?ids= and /api/people/:id/photo. A person card holds the name, the face, presence (online or offline for now) and a status.
  • Added: a group chat can have an icon (one emoji) and a colour.

a group’s info (server)

  • New: a group in Messages carries info: plain text (at most 2000 characters) that says what the group is for and its rules, written by its admins (POST /api/messenger/conversations takes it for a group; PATCH /api/messenger/c/:id sets or clears it, null clears; a member who is no admin 403; a direct chat 400 on create and 403 on PATCH), read by everyone in the group (MessengerConversation.info; not on the list row) and by an agent (messenger_open answers it inside conversation; messenger_create takes it). A change raises the room’s participants event and writes a system line, as a rename does. The brain stores and shows the text and never runs it. Migration 0343 with its rollback. docs/messenger.md “Group info”, “The via chip” (the exact words the client shows for a line sent through a credential) and “Engineering requests” (the owner’s agent reads a group on its rounds). Plan page d8954876 section 24, B1; the client half (the chip and the info form) follows in mantle-client.

calls between people (server)

  • New: voice calls between the people of a brain, from a chat or a group in Messages (calls plan P1, brain side; the client ships in mantle-client). A call is a LiveKit room named after the conversation. Routes under /api/messenger: GET /capabilities, POST /c/:id/call (start or join: a one-hour token for the one room plus the ICE override, {callId, room, url, token, expiresAt, ice}), /call/token, /call/leave, /call/end, DELETE /call/participants/:loginId, GET /c/:id/calls, the assistant twins POST /api/assistant/:agentId/call and /call/token, and the signed LiveKit webhook POST /api/livekit/webhook (401 and no side effect on any failure, replay-safe). A call’s start, end and cap are system lines with event (MessengerMessage.event), so the live stream carries them. The reconciler in the events worker closes a call whose room is gone, one past MANTLE_CALLS_MAX_MINUTES, and every call when the service is off; nothing starts a call but a person’s tap. Migration 0342 (messenger_calls, messenger_call_participants, messenger_call_webhooks, messenger_messages.event, messenger_conversations.voice_replies) with its rollback. DTOs in @crossworks/client-types dto/calls.ts. docs/messenger.md “Calls”.
  • New: Settings > Services > Calls: the calls compose profile runs livekit/livekit-server:v1.13.11 (media on UDP 7882, ICE/TCP 7881, TURN/TLS 5349 and TURN/UDP 3478, published; signalling internal, Caddy proxies /livekit/* in both shapes). Off by default. The config infra/livekit/livekit.yaml is release-owned (embedded in the image, refreshed by the updater like the Caddyfile, filled at container start; no credential in the file). install.sh writes the key pair and MANTLE_CALLS_HOST; the updater provisions them on a switch or a roll. Env: MANTLE_LIVEKIT_*, MANTLE_CALLS_*, MANTLE_VOICE_NOTE_MAX_SECONDS (all in .env.example). infra/livekit/README.md has the ops notes and the per-box port ask.
  • Security: the Caddy access log redacts access_token= on the signalling URL like a sign-in code= (found by the P0 spike: the release logger printed the full JWT). Pinned by caddy-layout.test.ts.

HSTS at the front door

  • Fix: the release Caddyfile sends Strict-Transport-Security: max-age=31536000 on TLS responses from both site blocks (the main site and the split owner-UI vhost). On a box whose port 80 is closed at the cloud edge a bare hostname tried plain http first and hung there, because the request never reached Caddy’s http->https redirect; after one HTTPS visit the browser now goes straight to HTTPS. Plain-HTTP responses carry no header; this host only, no includeSubDomains, no preload. Pinned by server/web/lib/caddy-layout.test.ts; infra/caddy/README.md says why.

v0.400.16: the fail-open branches refuse (plan v3.2 S4b)

  • Security: the six branches that still answered yes, or sent a write to the system pool, for code with no system actor bound now refuse (docs/fail-open.md). Outside every scope, scopeHoldsAdmin and scopeHasArea answer yes to system work only and throw otherwise. A scoped typed write to a table the write role does not hold is refused unless its access matrix row names a scopedSystemWrite reason (a login’s write only). An unlisted asSystem exit from a turn scope and a systemDb use there from a file off SYSTEM_DB_MODULES throw in production, as they did in tests and development. Every fleet box counted 0 hits on all six for a full release before this.
  • Migration 0340: mantle_login_area is the area rule alone: on a brain with no Admin workspace no login holds an area (it said yes). mantle_tg_moderated_chats loses its “no Admin workspace: the anchor’s chats” branch. Every fleet box has an Admin workspace, so no answer changes there. Rollback: packages/db/rollback/0340_s4b_fail_closed.revert.sql.
  • Removed: the fail-open counter (its miss rows, the in-process dedupe, the test guard and dump, the failOpenSites pin). The box script prints fail_open_branches gone in place of the per-site counts.
  • Tests: one cell per refusal (packages/db/src/fail-closed.test.ts, the turn fences with NODE_ENV=production), the same on a migrated database with 0340 and its rollback (fail-closed.db.test.ts), and a pin of the files that call the approval queue’s and the conversation store’s system pool helpers (system-pool-helpers.test.ts).

v0.400.14

a custom order in the tree, the same for everyone

  • Added: people can drag a folder’s items and subfolders into the order they work in, such as stages or steps. Everyone sees the same order. An item’s place in the tree is a key of its own (data.tree_rank), apart from a task’s board order, so a board drag never moves an item in the tree.
  • custom is now every kind’s first tree sort. A folder with ranked items lists by rank, then by name. A folder with none lists as before.
  • Added: POST /api/tree/:kind/place and the agents’ tree_item_place put an item after another one (null puts it first). tree_folder_update takes after for a folder. Write on a folder lets a person order what it holds.

a canvas can save its own data (DWG phase 7a)

  • Added: a Present canvas can save and read data with mantle.data in its frame. Data sits in two buckets: shared, one value for everyone (writing it needs Write on the canvas), and mine, each login’s own. A person with Write on the canvas can read everyone’s mine entries. A read-only copy is never written.
  • Routes: GET, PUT and DELETE /api/presents/:id/data, with the login taken from the session only. present_get returns the store with the user’s rights (over MCP too). The size caps count every row of the canvas.
  • Docs: the canvas_library topic data and the canvas_authoring skill’s “Saving data” section. Migration 0336.

the parser service (Tika and the media sidecar go)

  • Feature: one core container, the parser (mantle-parser, server/parser, docs/parser.md), reads every untrusted file the brain receives: documents, spreadsheets and plans, CAD drawings, images for thumbnails and vision, the audio of an uploaded video. The web, api and worker processes never open such a file; they ask through one client (packages/files/src/parser-client.ts) and get typed errors. The guarantee is the container: one job at a time with the whole memory (PARSER_MEM_LIMIT 2g, no swap past it), 1 CPU (PARSER_CPUS), a read-only root filesystem with a 1g tmpfs scratch space (PARSER_TMP_SIZE), an internal network with no route out and no DNS past the stack. Between jobs the container is the boundary: a job that leaves anything behind (a process, a file, an IPC object) gets its answer, then the parser exits and Docker restarts it fresh.
  • Removed: Apache Tika (mantle_tika) and the media sidecar (mantle_media, yt-dlp, ffmpeg), with their settings. anydoc in the parser reads what Tika read (.doc, .ppt, .odt, .ods, .odp, .rtf, .epub, the legacy sheets).
  • video_ingest takes uploads only: no links. Upload the file, then video_ingest with its file id.
  • A file the parser fails twice is terminal, across restarts and rolls: the count is kept on the node (data.parser_failures, migration 0339), and the extractor records document_unreadable. Nothing re-drives it.
  • Gaps: legacy Visio .vsd text is no longer read (the extractor asks for a .vsdx export); pictures inside .xlsb workbooks are no longer extracted (.xls pictures never were).
  • Rolling to it: see docs/update-prod.md, “Rolling to the parser service”: PARSER_TOKEN is written on the second roll, and data/media/ (an operator’s cookies.txt) is to be removed by hand.
  • A hand-edited compose without the parser does not roll to it. The first roll to this release is run by the box’s current updater, which does not know the parser and would roll such a box on with no parser: scripts/roll.sh (the operator’s checkout, so this release’s copy) refuses it at step 2f, before the backup and the request, unless the box’s compose already defines mantle_parser; and after any roll to a release that ships the parser, a missing mantle_parser is a failure (exit 1). An update requested any other way on that first roll is not guarded: use roll.sh. Later rolls are run by this release’s updater, which refuses such a roll itself (parser_compose_refusal) before it refreshes any release-owned file or changes any container.
  • :latest moves for both images at once: the release workflow probes the server and parser images on both architectures’ native runners (the parser read-only, as compose runs it; both for pnpm’s verify-deps-before-run being error), cuts the release, and only then points :latest of both at it, in one job, the parser first.
  • roll.sh refuses what would fail mid-roll: for a release with the parser, less than 8 GB free on the box’s Docker filesystem (ROLL_MIN_FREE_GB; the parser image is 2.70 GB, the server image 1.84 GB, and the first roll pulls the server image whole), or a box override or .env the release’s compose does not load (docker compose config -q on the box: an override still naming tika: or media:); and any roll whose server or parser image is not in the registry yet. After the roll it asks the parser’s /healthz from inside mantle_web (PARSER UNREACHABLE, exit 1).
  • --remove-orphans on every documented and scripted compose up (install.sh, scripts/install.sh, scripts/up.sh, the update command in docs/update-prod.md), so a removed service (Tika, the media sidecar) does not keep running after a hand update.
  • A person waiting goes first: a chat attachment or a thumbnail asks the parser for the head of its queue (X-Parser-Priority: interactive) and is answered busy after at most 10 s (“try again in a moment”), never waited out behind background extracts. No second slot. Only a chat attachment also skips its process’s client cap: a gallery of thumbnails takes its turn under it. The client never gives up before the parser’s worst legitimate time for the job (one rule, parser-wire.ts).
  • A job leaves nothing behind for the next one: a reader’s child program (Python, ffprobe, ffmpeg) runs in its job’s process group, so the job’s kill takes it; a job’s temp files, home and caches live in its own directory and neither tsx nor Node keeps a cache. After every job the parser checks the container is as clean as a fresh one (no process of the job, nothing in /tmp but the empty job root, nothing in /dev/shm or /dev/mqueue, no System V IPC object); if not, it answers, then exits and Docker restarts it (docs/parser.md, “Between jobs”). A slow body or an unread answer gives the slot back after 60 s, and a slot held past every deadline turns /healthz to 503 so autoheal restarts it.
  • A fixed cap is terminal at once: a too_large from the body, a zip part, the cells, the pixels or the answer is final the first time; a full scratch space still gets its one retry.
  • The native PDF read that found nothing is kept on the node (data.native_pdf.empty_sha256), so a retry or a redrive after a restart does not pay for it again.
  • Images refuse to start on stale dependencies: pnpm_config_verify_deps_before_run=error in the image, so pnpm never installs at container start; pnpm arch:check fails when the Dockerfile’s manifest list and the workspace differ.

the Desk follows the login

  • Feature: the login’s Desk (where each widget and desk icon sits, the kind widgets’ counts, desk icons on or off, the clock face) is kept on its own profile row and has its own route. GET /api/profile/home-desk answers { homeDesk, version } (null and 0 until a save; 0 too for a desk saved before the version). It used to live in one browser’s storage; like nav favourites, the Desk now follows the login to another browser, machine or the desktop app. The brain checks the shape and the size only (a v1 desk, at most 400 items and 32 KB counted in UTF-8 bytes); the client owns what a widget is, so a new widget needs no brain release.
  • A save is compare-and-set: PUT /api/profile/home-desk { homeDesk, version } lands (200, { homeDesk, version: version + 1 }) only while the stored version equals the one sent, else it is a 409 with the stored { homeDesk, version } (another device saved since). One conditional update of the login’s row (saveHomeDeskIfVersion, the version stored beside the desk as homeDeskVersion), so of two saves sent with the same version exactly one lands. savePreferenceIfRev (no caller since the apps moved to the tree) is gone, so this is the one compare-and-set write of the preferences column. homeDesk and homeDeskVersion are written through it only: a preference patch naming either is refused. The save reads the stored version as GET projects it: one that is unset or not a whole number from 0 counts as 0, so a desk saved before the version takes a save sent with version 0.
  • A save names its login: the PUT body carries loginId (the shell’s loginId, HomeDeskPutBody); a save naming any other login, or none, is a 403 { error, code: "login-mismatch" } and nothing is written. A browser holding several logins can switch the one in use from another tab; the desk on screen still belongs to the first and is never saved over the second’s. A 403, not a 401: the client stops saving, and nobody is signed out.
  • The shell does not carry the desk: homeDesk is gone from GET /api/shell and the Shell DTO, so the shell’s periodic reads no longer race the Desk’s saves. HomeDesk, HomeDeskItem, HomeDeskState and HomeDeskPutBody are in @mantle/client-types (dto/home-desk).
  • A save is kept as sent or refused whole: the write check (validateHomeDeskWrite) is a 400 when the projection would change the desk (an item or a count dropped, the list cut at the cap, an id or a key that is not printable ASCII, a setting of the wrong type), so garbage never saves as an empty desk and a NUL or a lone surrogate is a 400, not a 500. A missing or bad version is a 400 too. The read side (projectHomeDesk) stays loose: a stored desk is never lost to the stricter rule. The body is read up to 64 KB (413 past it).
  • Every login keeps its own desk: both methods are any-login rows (open: 'any', anyLoginCaller), so a member reads and saves its desk as an Admin user does. Both run in the login’s scope, where the profile rules (mantle_profile_writable on write) hold it to the login’s own row; an API key, a peer and a share link never reach it.
  • Internal: the route joins the route rows (GET and HEAD with a caller: 785 of 845), the A4 guard sweep (its HEAD cells, and the connector options route’s, sit under “rows added since main” in the head-logins file: main never had them, so each names, like=, the main answer of a sibling row that takes the same gate path), the A10 body sweep (its 400 names the version: desk-version; the member’s valid body names another login: desk-login) and the any-login rows with no limit (UNLIMITED_NON_OWNER_ROWS, docs/request-plumbing.md); the A6b exit sweep drops the shell’s named homeDesk change. The route database test (home-desk-route.db.test.ts) covers the version conflict, two saves at once with the same version (exactly one lands), a desk saved before the version or with a bad one, a save naming another login, the own row only, API keys 401, and the 400 and 413 paths.

Messenger V1 Phase 1

  • Feature (plan decision 2026-10-27): the messenger’s core store, API and MCP tools (docs/messenger.md). Direct chats and groups between the logins of one brain (migration 0335), each message a seq taken under the conversation’s row lock, row security keyed by the participant row (no Admin exception; a left participant reads up to its leave), the routes under /api/messenger with per-login limits, the SSE stream /api/messenger/stream on the member stream’s guards, the unread badge with the assistant threads, and the MCP tools messenger_list, messenger_open, messenger_send, messenger_create, messenger_wait, messenger_mark_read and messenger_directory. A message records the credential it came through, and messenger_wait skips the caller’s own, so two Claude clients on one login can wait for each other. No agent in a group, no attachment bytes and no phone push yet: those are Phases 3 to 5. An Admin user’s OAuth MCP connection now carries its client id.
  • Fix round 2 (two outside reviews): one per-login budget in the store (60 sends, 120 other writes a minute), so an MCP client and the routes share it; migration 0336: the workspace role reads no conversation tail and no participant cursor or mute (its own rows through mantle_messenger_mine, the tail capped at its leave), a leaver sees only the people who were there when it left; a history delete moves every cursor up and raises a history event; a clear raises self and read; the fan-out map is right after an add or a remove with no stream open; after_seq and messenger_wait page without loss (hasMore); the messenger stream takes slots apart from the member stream’s.

the Desk label

  • Change: the menu’s landing entry is Desk, not Home (packages/share-ui nav-items), and the docs, the help page and the contract comments call the built-in landing page the Desk.

v0.400.13

workspace delegation

  • Feature (owner decision 2026-10-26): the assistant of a workspace other than Admin, the shipped Team responder included, delegates to Draftsman (diagrammer), Presenter (presenter) and Appsmith (appsmith), and to no other agent. One list, WORKSPACE_DELEGATE_SLUGS (packages/tools invoke-agent-guards.ts, re-exported and pinned by the system manifest), enforced in one gateway: checkDelegationAllowed reads the turn from its own scope and surface (delegationTurnOf: a scope without Admin, or a surface that is not the owner’s, is a workspace turn) and refuses a slug off the list, whatever the assistant’s delegate_to names (an assistant copied from the persona names every specialist), and a workspace turn that answers no user. The runtime invoker asks the same check again before the child starts, the turn assembly (turnDelegates) shows the model the same list (the invoke_agent enum, the roster, the decider’s hint), and a child’s own delegates are cut to it too, so Appsmith’s hand-off to the Toolsmith is refused in a workspace turn. The child runs in the turn’s scope and on its team surface: the user’s rights in that one workspace, its creates landing by the home rule, no owner identity, Journal or persona notes, the owner’s mail and Journal tools dropped unless the private-reads switch is on, its Admin-only groups dropped. Its trace says workspace_delegation, surface: team and the user’s login. Only the web workspace chat delegates; a workspace run and a workspace’s Telegram chat do not yet (their turns settle no member ledger slot).
  • Security (fix round 1): a workspace turn’s child gets no tool that spends on the owner’s keys (the spending narrower’s own predicate, policySpendsOwnerKey), none that reaches outside the brain (outside.egress) and no item delete (workspaceChildDrop); a call to one is refused as off its allowlist. Three bounds, pinned: WORKSPACE_TURN_MAX_DELEGATIONS 2 per turn, WORKSPACE_CHILD_MAX_ITERATIONS 20 for the child’s loop, and WORKSPACE_DELEGATION_TOKEN_FLOOR 200,000 tokens of the daily budget left (the ledger read at the turn’s start, memberTokensLeft, carried on the team surface’s tokensLeft). checkDelegationAllowed takes the turn as a required argument and the assembly reads delegationTurnOf(surface), the one definition of a workspace turn. A specialist’s reset or adopt (wireDelegation) no longer reaches a workspace assistant, so an owner’s removal of a delegate sticks there too. The app tools run on a workspace Telegram turn as on its web chat when the owner grants apps (they spend nothing on the owner’s keys).
  • Feature: the app tools (app_*, the 23 owner-only ones) run on a user’s workspace turn too (loginTurns: a team surface naming the login its turn scope answers, facts.loginTurn in the gate), with that user’s rights, as on its MCP connection; an app made there is at team rules with the user as its author (actingLoginId). No other owner-only tool changes.
  • Cost: a delegated child’s model tokens now count on the turn that started it (startTrace’s onClose hands delegated tokens; never written to the turn’s own row), so a member’s delegation spends from its daily token budget. The child keeps its own iteration and tool caps and the depth cap; nothing new runs on its own.
  • Grants: the boot reconcile gives the delegation group and the three delegates to every enabled workspace assistant and the Team responder held by a workspace, ONCE per agent (reconcileWorkspaceDelegation, the anchor’s workspaceDelegationGranted), so an owner’s later removal sticks; the delegate_to merge is one jsonb union that keeps every entry. A fresh install’s Team responder ships with both; its prompt names the hand-off (an unedited earlier default is upgraded) and its own tools stay read-only.
  • Tests: ws-delegation.db.test.ts (the real member turn through the child’s loop, actor and edit checks on), workspace-delegation.db.test.ts (the grant), unit tests of the gateway. Re-recorded: the dispatch parity hashes of the 23 app tools, and the A8 surface cells’ team-turn app_delete narrowing (now the oracle’s answer).

untouched specialist prompts follow the product

  • Change: a specialist whose prompt is still, byte for byte, an earlier shipped default moves to the current default on upgrade (Draftsman, Appsmith, Pages, Ledger, Remy, Researcher, Curator, Toolsmith, Coder and the team responder; every earlier default from git history, the pre-manifest seed scripts included, is listed in the agent’s retiredPromptSha256). Disabled agents move too. An edited prompt and the persona’s are never touched. The write goes through the Studio’s prose versioning, so the old text stays a version and one revert in Studio brings it back. A revert in Studio sticks: once a prompt’s history holds any Studio save (an edit or a revert, even back to an old default’s exact text), later upgrades leave that prompt alone. From now on this also holds for the team responder, whose reverted prompt was moved forward again on every release (a brain where that already happened stays on the current default). Only a Studio save counts as an owner edit. One agent that fails to move is logged and skipped; the others still move. The team responder also gains its missing Phase 6 member-chat default (v0.232.295 to v0.239.94). server/web/scripts/retired-prompt-hashes.ts prints every specialist’s earlier defaults from git history, to check or extend the lists.

v0.400.11

Present is a workspace content kind

  • Feature: every enabled workspace assistant (the team responder aside) reads and writes Present canvases where its user may, as it does pages and tables: the persona holds present beside present-read (the whole group, where pages and tables give it a lighter slice), and the boot reconcile grants both groups to the assistant of every workspace (also one copied before Present) ONCE per agent: the anchor’s contentKindGroupsGranted records what each agent id was granted, so an owner who removes a group later keeps it removed, an assistant made later gets them at the next upgrade, and a group added to the list later reaches each assistant once. Never an Admin-only group, never a manifest agent with its own entry (reconcileAssistantContentKinds, ASSISTANT_CONTENT_KIND_GROUPS); the persona union leaves these two to that step. Every reconcile group grant is now one SQL array union (addAgentGroups), so a Studio edit between the read and the write is never lost. Deleting a canvas stays the deliberate present-admin group, on no assistant, as page-admin is; circuits (it spends) stays with the specialists. The routing skill lets the assistant make a small change to a canvas itself; a new one still goes to Presenter when it is there. No migration: the grants and the record are data.
  • Fix: present_export with no parent_path saves where every export goes (saveExport, export-home.ts: Auto-filed / Exports when the caller may change it, else the top of Files and the create home) and the reply names the file and landedIn. It made a fixed files.diagrams of its own before, which a member’s first export put in that member’s private workspace, failing every later default export. A taken name takes the next free one; overwrite: true writes over this canvas’s earlier export of that name wherever it is (the file id and every embed stay). The tool’s schema and description changed, so the MCP tool-list snapshots moved.
  • Security (tests): a Moderator of a workspace makes a canvas in it and edits one it holds, a Write grant edits (edits and source), a read grant does not, nobody makes one in a workspace they do not moderate (named: refused, nothing made; unnamed: their own private workspace, and MCP says where), a Moderator of another workspace edits and restores nothing outside the turn’s workspace, present_list shows no canvas the turn may not read, a turn with no user makes nothing, and a user’s own canvas is theirs to edit and answers another member as a random uuid does: through the assistant turn, the routes and MCP (present-ws-rights.db.test.ts); present_create joins the turn home cases.
  • Fix: the chat trail names a canvas save like a page save.

a member’s Apps and Present screens are trees

  • Fix: apps and Present canvases join the reader tree kinds (READER_TREE_KINDS, named explicitly, not by the registry’s library flag), so a member’s GET /api/shell names apps and present in treeKinds and the client shows their folder trees instead of a flat list. The trees read the rows the login’s row rule reads (the same as GET /api/apps and GET /api/presents), drafts included, and the folders on the way to them; an item of a workspace the member is not in, or one homed in Admin, stays absent. No route opens anything new: every /api/tree/:kind route already answered a member on these kinds.
  • Internal: a member’s Apps read no longer runs the pre-tree layout move (backfill:app-nav), the brain’s own housekeeping: it waits for an Admin user’s read. The w6a sweep reads GET /api/tree/apps as a member and pins its writes (the kind root and its own app marks).

the A8 matrix covers the routes

  • Security (tests): every write route that names its item now runs A8 route cells (server/web/server/a8-route-cells.matrix.test.ts, in pnpm test:matrix): the outsider, a read grant’s member, a Write grant’s member, the home’s Moderator and an Admin user (and, on a route open to Admin users only, one with Write and no Moderator seat), on each placement of the item, through the full HTTP pipeline, with the checks in warn and in on. A hidden item answers as a random uuid does (status, body, content type, cache control). Each route’s declared need is checked against the guide action its cells ask; the grant add, remove and Write switch run cells by theirs. In warn the 13 routes whose edit is the database’s check alone make the edit and log it (docs/edit-check.md). A route that takes a higher right too (a move, an app’s description or code restore) runs that request as its own cells. The grants panel’s “Change here” and restore run cells on a grant the item takes from its folder. Eight routes run their refused cells only or declare none with an item in their path, each with why (a8Exempt 104 to 112, reviewed by the final audit).
  • Internal: the app snapshot writes declare edit, the right their handlers ask. A route declares the lowest right its handler accepts. The item pre-check’s no-op path (itemWriteGate, routeItemTarget, RouteRow.item) is gone; no answer changes.
  • Internal: the 113 route declarations that said “not decided yet” each name their item ({ param, need }, the right the handler asks) or say why none (itemNonePlaceholders 113 to 0); the declaration states intent only, so no item pre-check comes back and no answer changes. The validator refuses the placeholder, and a none declaration on a workspace kind’s item route must name its param.

the scoped writes that stay on the system pool, named

  • Security: the access matrix names the tables whose scoped typed write (a login’s insert, update or delete in a write scope; never an assistant’s, a link’s or a contact’s) may stay on the system pool though the write role holds no right on it, each with its reason (scopedSystemWrite). It is the list the later fail-closed step reads before it refuses every other such write. One table: item_marks (a login’s own pins and opens; the node is read in the caller’s scope first). A named table’s write is no longer counted as a fail-open hit; no answer changes.

  • Fix: an assistant’s and an AI worker’s use counters (last used, use count) are written as infrastructure on the system handle (the narrow route in a scope) instead of as the caller’s own scoped write, so invoke_agent and the decider no longer count fail-open hits. The narrow role may now write an AI worker’s two counters, so the bump does not fail silently there. No migration: the grants are applied at every migrate.

  • Fix: api_tool_update (connectors area) writes the tool row, its group and its External access through the area’s own system door, after the area is asked again. Nothing widens: a login without the connectors area is still refused, and nothing is written.

  • Fix: the approval queue (pending_tool_calls) and the conversation store (assistant_messages) are written as infrastructure on the system handle (the narrow route in a scope) instead of as the caller’s own scoped write: every park of a call is one helper, and a call is claimed, put back and settled with who may decide it in the statement, as before. A turn row names its login whenever a login is bound, so a member’s turn can never land in the owner’s thread, and a row naming another login is refused. A cancelled turn’s stamp keeps the full system route (its settled row is one the narrow role never rewrites). No answer changes.

  • Fix: a named table covers a login’s own write only: an assistant’s, a link’s or a contact’s scoped write to it is still counted.

  • Ops: a fail-open hit on a write names its table in the check (fail-open:typed-write:public.x), and a busy table no longer hides a new one; the box counts read the site from the check, so an older image’s rows still count.

  • Tests: the test setup now fails a test whose scoped typed write goes to the system pool on a table that names no reason; none is left to decide, so a new one shows before the fail-closed step. New pin scopedSystemWriteTables (1).

  • Narrower, pinned: a turn row written with a login actor bound and no login id now lands in that login’s own thread (it used to be stamped into the owner’s), and a row naming another login is refused (w7c-chat.db.test.ts). No production caller hits either.

one login shape, the login bridge dropped (plan v3.2 S8d)

  • Security: a request’s login resolves to one shape: the brain, the login and whether it is an Admin user now (membership of the live Admin workspace). The admin/member kind union and its legacy readers are gone (loginCaller, chatLoginCaller, publicLoginCaller, ownerCallerWithLogin, legacyLogin, AnyLogin); handlers read anyLoginCaller(), chatCaller() and publicLoginItself(), and a shown role is sessionRole(login). No route or tool answers differently: the guard sweep’s recorded files are unchanged byte for byte.
  • Migration 0334: drops mantle_bridge_login, unused since 0330’s image (it deleted nothing on a box whose Admin seats all have role admin). Its revert puts 0330’s body back (docs/update-prod.md, “Going up to 0334”). mantle_role_drift() stays as the box count.

v0.400.5

the trace’s guesses checked by an image model

  • Feature: circuit_verify(circuit, register?, kinds?, max_questions?, dry_run?, recheck?) checks the guesses circuit_trace marks: each inferred join, end only near equipment, guessed sheet link and valve type read from a block name becomes a yes/no question on a close-up crop of the drawing, keyed by DWG handles and coordinates (never pixels; a link also by the sheet it was guessed to continue on). Answers are yes, no or unsure with a reason and the model that gave them; an answer that does not parse, or a reply cut off at its token cap, is unsure and says why. The owner’s default vision worker answers (an OpenRouter model: the crops go in one request), its model recorded per answer. dry_run lists the questions without spending. Capped per call at 40 questions, 80 crops, 16 images per request and 8 requests, each cap said when hit; guesses already answered at the drawing’s revision are skipped (recheck asks again), so the next call reaches the rest. Spends the owner’s vision key, only on an explicit call: never a recipe step or a run item. dry_run writes nothing (its store check makes no crop folder).
  • Note: circuit_verify joins the existing circuits tool group, so every agent that holds the group can call it; grants are unchanged. The shipped agents that hold circuits are the Draftsman (diagrammer) and the Presenter (presenter). Each call that is not a dry run spends the owner’s vision key (the default vision worker) and writes Checks rows and crop files; take circuits off an agent in Agent Studio if it should trace without that.
  • Feature: nothing is spent on what cannot be kept. Before the first vision request every sheet is asked whether its answers can be filed (the caller may edit the drawing’s table, the table is writable and has no draft open, the caller may create files in Auto-filed > Drawing checks) and whether its table still matches the drawing: a DWG/DXF table now records the sha256 of the bytes it was built from (at import and on each dwg-reindex), and a file replaced in place, or a table imported before this release, is refused with the pnpm maintain dwg-reindex --file=<id> --again --apply that fixes it; circuit_trace says that sheet’s geometry is the older revision. A call where no sheet can be checked is refused.
  • Feature: the media sidecar’s POST /dwg/crop crops one sheet for a batch of point and path items in one call: zoomed so the smallest text in the window reads at about 14 px (long edge at most 2000 px), a path as overlapping crops so no joint sits only on an edge, the trace drawn over it (main red, branch blue, deadleg orange), green rings on the spots asked about, and a sheet overview. At most 48 crops and 150 s per call; what is cut is named. The brain rounds the spec, simplifies join paths (joints kept) and caps the overlay to what the sidecar takes, saying how much of it was left off.
  • Feature: every answer is kept with its evidence in a Checks tab of the drawing’s own table (key, question, answer, reason, trust, model, date, revision, file, crop ids, seal); the crops are image files under Auto-filed > Drawing checks, stored by name only (no vision pass, no summary) and linked to the drawing and its table. The write and its commit are pinned to the draft revision the call made, so a user’s draft is never published or thrown away, and the commit never starts a model pass. When a user writes into that draft before the commit, the sealed rows wait in it and publish with it: the crops are kept and the result says the rows are pending. dwg-reindex keeps the tab, and an image-check commit is not an edit to it.
  • Feature: a new trust level between guess and certain. circuit_trace reads the Checks tab: a guess the image confirmed is marked CHECKED BY IMAGE on the drawing (a valve type in its line’s note) and in the result’s checks, never certain; one it contradicted stays a GUESS and says the image said no (a line with several joins counts the noes); a guessed link’s check shows on both of its ends; unsure stays a GUESS. Only rows circuit_verify wrote count: each carries an HMAC seal over the table, key, circuit, question, answer, reason, model, revision, time and crop ids, under a key derived from the master key, and a row typed or changed by hand is kept, never applied, and said. During a master key rotation rows are sealed under MANTLE_MASTER_KEY_NEXT and either key is accepted; rows sealed only under a key since rotated out stop applying (circuit_verify asks those again). Known limit: a table editor who deletes a newer sealed row brings the older sealed answer of the same guess back. Checks of an older revision, or of a question that reads differently now, are kept, not applied. A sheet whose source file the caller cannot read is said to have an unchecked revision, never current, and circuit_verify does not ask about it.
  • Fix: a several-image vision request has its own 240 s budget (PROVIDER_TIMEOUTS.visionImages) and caps the model’s reasoning tokens so the answer has room; a timeout is said, and the spend ledger records the attempt with no tokens and no cost, marked timed_out on its step (the provider may still bill it).
  • Fix: a pid line of no length that carries a line number, and several lines between the same two pieces of equipment, no longer throw in the layout; only a layout that failed is retried with one ranking edge per pair, so every drawing that drew before draws byte for byte as it did. At the page cap a marker moved onto an unrelated line reads CUT AT PAGE CAP instead of counting that line’s children.

a traced circuit as a linked drawing set

  • Feature: the pid template takes a drawing set, a title and pages of { id, title, data }, each page ordinary pid data, with the set’s profile, legendNames, legend and showTitle as defaults. Inside a set an off-page connector takes link and focus (the page it continues on and the element to show there), and a line takes a more marker (+7 DEADLEGS). Every link is checked and printed as a page reference (SEE PAGE 3: <title>).
  • Feature: the canvas shows a set one page at a time with page buttons (one row that scrolls sideways), Back and Overview; a link jumps to its page and outlines its element; the arrow keys step through the pages (present_render slide: n shows page n). A link only switches the canvas’s own page: nothing is loaded and the window is never navigated.
  • Feature: the export of a set (window.diagram.exportSvg(), present_export) is every page stacked under a PAGE n OF m header, links printed as page references; exportPageSvg() gives one page. Single drawings draw byte for byte as before (the pin is unchanged), and the set has its own pin.
  • Feature: circuit_trace returns its pid as a set: an overview (the main line, branches and equipment within 20 lines; a line’s deadlegs all or none, a marker counting what it leaves) and a page per sheet, named after the sheet. The 20-line cap is a split rule now, not a cut: a sheet over budget keeps what fits and moves a line’s other deadlegs, or a busy branch, to a detail page that draws the line again; separate pieces go to parts; a line with more than six valves goes on through a CONTINUES pair. Sheet connectors link to the neighbour sheet’s page. Every chain is owned by one page; GUESS marks stay on every page that draws them (each page’s description names only its own), and a guessed link gets no page link. A set holds 40 pages: past that, every page stays within the template’s limits and the chains on no page are counted per sheet in limits. A circuit that fits one page is one plain drawing, not a set. Save it with present_create as one canvas.
  • Fix: every detail page is reached by a +N marker on the page that draws its line, and its SEE connectors name that page; at the cap a line cut from its page goes to its own detail page, or the detail page says the line is drawn only there. A description keeps its GUESS note whole. present_render slide: n waits for a set to mount, and its report names the page shown.
  • Fix: traced pid data that passes the check draws: a bypass from tee to tee on one line no longer puts both tees on one point, and a connector reached through a tee is never placed on the tee (both threw before). A set page whose layout still fails draws as an error panel naming the page, reported in the result’s failed list and its warnings, and the other pages draw; circuit_trace’s pid_check lays every page out, so such a page is a check error with its path. At the page cap a detail page already made stays linked from the drawing.
  • Performance: circuit_trace on a sheet of thousands of runs or deadlegs is near linear (8000 runs: 13 s to 0.15 s; a branchy sheet of 23,000 chains: 60 s to 2.5 s); output unchanged.

v0.400.2

a DWG down to the bones

  • Feature: a DWG or DXF keeps its pipe geometry. The media sidecar’s one /dwg/render pass (same upload, same ezdxf parse) now also returns every LINE, polyline vertex pair and ARC by its end points, every INSERT with its box, a network of nodes snapped from the segment ends, and, on drawings with Circuit <name> layers, one row per circuit. The registry workbook gains four tabs after the existing ones: Segments, Nodes, Inserts and Circuits. Layers, Texts, Blocks and Counts are unchanged.
  • Feature: the network rules. Ends within a tolerance of 2e-4 of the drawing’s extent diagonal are one node (about 0.2 mm on an A1 sheet drawn 1:1); an end on another segment’s interior splits it into a tee; lines that only cross are not joined; a small block (a valve, a reducer) touched by two pipe ends joins them. A node is an end, joint, tee or block, and connected segments share a run number.
  • Feature: circuits from the Circuitizer layer convention. Circuit X is the main path, -DL, -Bnn-DL and -Dnn are its deadlegs, -IPn is an injection point with its own row. Each row has segment count, length, deadleg segments, runs, tees, ends and what each end meets, and the line-number blocks that name the circuit or sit near it. A drawing without such layers gets no Circuits tab. The digest lists one line per circuit.
  • Docs: the table description says what each new tab holds and what it does not (curves are chords, SPLINE and ELLIPSE are left out, one drawing only), and says TRUNCATED for a tab cut by its budget.
  • Fix (round-1 audit, sidecar): a line drawn twice counts once on its circuit; a line-number block that names a circuit is listed on that one only; a DONUT tee dot or other small closed polyline is a symbol, not two tees; a broken-line crossing is not a join; sheets tiled in one model space keep their own tolerances; -DLn and -Bnn stay on their circuit, -IPn-DL keeps its Parent, and a layer needs a circuit-name shape (“Circuit Breakers” is not one); a work and time budget and a finite-number guard turn a heavy or hostile drawing into geometry_error with the registry and the render kept.
  • Build: the media image ships dwg_bones.py next to app.py; CI runs the sidecar’s Python tests (synthetic DXF files, no client drawings).
  • Existing DWG tables gain the new tabs through pnpm maintain dwg-reindex (below), in place.

trace a circuit across the drawings; rebuild old DWG tables

  • Feature: circuit_trace(circuit, register?), a read-only tool in a new circuits tool group (granted to the Draftsman and the Presenter, and on the MCP surface). It finds every DWG/DXF auto-import table the CALLER may read whose layers carry Circuit <name> (with the phase 1 suffix rules), reads that circuit’s rows from Segments, Nodes, Inserts, Blocks, Texts and Circuits, and returns per sheet the runs as ordered chains, tees, ends and what each end meets (a block, another circuit’s layer, nothing), deadleg runs, valves on the path, line numbers with their DWG handles and equipment tags near the ends; links between sheets (a continuation label naming the other sheet, else the same line number or the only open ends, each marked guessed); a ready pid template input drawn from the real geometry (trunk, tees, branches, deadlegs, off-page connectors; a guessed link’s connector says GUESS) with the template’s own check of it; and, given register (line numbers, sheets, deadlegs from a site register tool), every difference both ways. Honest limits in limits (a capped tab, a sheet that is not uploaded, a table from before the bones tabs), guesses in guesses.
  • Rights: the tool reads through the caller’s own scope: the table list is a nodes query under row level security, each workbook opens through tableSqlSurface (the table_sql path), and a table the scope does not read is never opened.
  • Skills: the Draftsman’s diagram_design and the Presenter’s canvas_authoring skills start a circuit drawn from uploaded P&IDs at circuit_trace, fill register from a site register tool when one exists, and keep every guessed link labelled; the persona’s routing line sends such a request to the Draftsman.
  • Maintenance: pnpm maintain dwg-reindex --file=<id>[,<id>] | --folder=<id> [--apply] [--limit=n] [--keep-edits] [--resummarize] rebuilds the auto-import workbook of DWG/DXF files in place: the same table node keeps its id, grants, placement, title and tags; only the tabs and the description are rebuilt from a fresh sidecar pass (the import’s own builder, cadRegistryWorkbook). Manual only: no cron, no trigger, a scope is required, dry run by default, at most 50 tables a run (default 10). The summary is kept (commitTable’s new keepSummary: the vector and profile again, no model pass) unless --resummarize. A table edited after its import is refused unless --keep-edits (a snapshot of the edited version first); a table with an unsaved draft is always refused. It never deletes a file or a table.

P&ID tees and branches

  • Feature: the pid diagram template draws a line that leaves another line mid-run. tees[] declares a junction on a parent line (id, on, optional near: 'from' | 'to'); a line may start or end at a tee. A branch ends at equipment, a connector, another tee (a bypass), an instrument (the bubble sits at the branch end), or nowhere: end: 'open' is a stub, end: 'cap' a capped end, deadleg: true a dead leg (a cap and a DL tag; the site profile’s symbols.deadleg: 'dashed' dashes it too). toward picks the way a stub leaves. A deadleg and three stubs on a real sheet had to be left out before (“template has no tee yet”).
  • Layout: a tee is a grid point on its parent’s routed pipe, picked after the parent and its valves are placed (clear of valves, corners, crossings and other tees), so the junction dot cannot leave the line; a self-check warns if it ever did. Branches are routed after their parents on the same grid, with equipment, labels and valves blocked, square to the parent. A connector reached only through a tee is placed beside it.
  • Errors: a branch that names a missing tee, a tee on a missing line (with a “did you mean”), a tee on its own branch, end with to, toward on a routed line, a port on a tee, and an instrument that is both on something and a branch end each name the fix.
  • Unchanged: data with no tees takes none of the new path. Every sample and the all-parts test sheet draw byte for byte as before, plain and themed, and a test pins their hashes. The diagram_guide pid contract, the package README and the Draftsman and Presenter skills describe the new fields.

v0.400.0

mini apps import the canvas libraries

  • Feature: a mini app may import echarts, d3, three (with three/addons/controls/OrbitControls.js), konva, katex, motion/react and @mantle/diagram-templates/browser (the flow and pid templates, drawn from data). They are the same pinned files a Present canvas loads from /canvas-runtime/, named in the app import map and never bundled into an app; motion/react is built into the app runtime on the one shared React. Exact names only; reveal.js and alpinejs stay out (a deck is a canvas; Alpine fights React for the DOM and needs unsafe-eval). The app import check knows each library’s exports, so import echarts from 'echarts' fails the build with the fix.
  • Feature: canvas_library(name, for: 'app') returns an app guide per library: the import, the React pattern (mount in an effect, clean up, resize, theme tokens) and a complete App.tsx, which a browser test builds and runs in the app frame. Appsmith holds it (in the apps group) and the diagram group; the app_authoring skill and the app guide say to call it first.
  • Security: the app frame CSP adds the brain’s own /canvas-runtime/ to script-src and nothing else: no new origin, no unsafe-eval, connect-src stays 'none'. A browser test pins that an app with a library loaded still cannot fetch, eval or load from another origin.
  • Feature: the diagram templates draw in a mini app’s theme: render(template, data, measurer, { theme: 'tokens' }) adds one scoped stylesheet that maps every house colour to the app’s tokens (card, foreground, muted foreground, primary, the chart ramp), so a flow or a P&ID follows light, dark and a live switch. Without the option the output is byte for byte what it was, so Present canvases, diagram_render and present_export look as before.
  • Build: server/web generate builds the canvas runtime before the app runtime, which reads its manifest.

the computed-import check reads the app’s own source

  • Security hardening: the check that refuses a computed import() or require() before a mini app is built read esbuild’s transform output with a regular expression. A string that held a double quote could hide a call from it, and the transform also folds constants and drops dead code (if (false) require(…)) that the bundler still expands. The backstops refused those builds and nothing leaked, but the first check missed them. It now parses each app file as written (@babel/parser, pinned, with TypeScript and JSX) and reads every import() and require() call, also behind a cast or in dead code, so quotes, regular expressions, comments and templates cannot hide one. A file it cannot parse is refused with the parser’s message. It also ends a false alarm: an app whose text or regular expressions only mention require( builds again. A build message is trusted as the app’s own only when it is located in the app’s app: namespace, and one that names a path outside the app gets a generic text.

Drift in full colour on public pages, subtle in the app

  • Change: the saved Drift background now has two looks, picked by one surface argument to driftOptionsFromSpec (@mantle/share-ui/drift). The /s share reader (and, in the client, the sign-in and invite screens) paint the spec’s full colour with no legibility floor; inside the app, and in every mini-app frame, the floor holds as before (muted text at AA on every colour painted). With a background saved, the /s reader puts its content on an opaque sheet with the gradient as a frame round it, and the footer line on its own pill, so no text sits on full colour.

a mini app’s computed import cannot read the server’s disk

  • Security fix: an import() or require() with a computed path (a template string or a joined string) made esbuild read the matching files from the disk itself, past the import gate, so a file outside the app could land in the bundle, or be quoted in the build error when it did not parse. Such a call is now refused before the build. As a backstop, a build that read any file outside the app and lucide-react is refused, and a build message about a file that is not the app’s own carries no text or path of it. A quoted import('./Chart') and text that only mentions require( build as before.

diagram guides become tools; a P&ID type

  • Feature: two read-only tools in a new diagram tool group, granted to the Draftsman and on the MCP surface. diagram_types lists every diagram type with one line on when to use it (plus the semantic patterns and import notations); diagram_guide(type) returns that type’s drawing guide with the shared rules it needs (Mantle’s medium rules, the style guide, the layout budget, the core SVG primitives, the output sizes). Both read the guide files baked into the image, so nothing has to be enabled or indexed first. Before this, the guides were the opt-in diagram-guides docs collection, which most brains never enabled, and the Draftsman searched for guides that were not there.
  • Feature: Mantle’s own diagram types live in docs/diagram-guides/mantle/, out of reach of an upstream refresh. The first is pid: a P&ID and process-schematic guide (ISA-5.1 bubbles and tag letters, valve, pump, vessel and exchanger symbols, line types, service colours, line numbers, circuits, sheet continuation, its own budget). It is a first draft for review by a process engineer.
  • Feature: site profiles. Every site draws differently, so a brain may keep its own conventions for a type in files/diagrams/profiles/<type>.md (for a P&ID, pid.md: symbol variants, service colours, line-number format, circuit naming, title block). diagram_guide appends the profile after the base guide, where it wins, and says plainly when the brain has none. The Draftsman adds to it when the owner corrects a convention. Profiles are the owner’s data and never enter the repo.
  • Change: the vendored guides are refreshed to diagram-design v2.6.119 (upstream commit 7a12007): 42 guides changed, 7 new types (architecture delta, axonometric plan, exploded, heatmap, polar, service blueprint, waterfall), plus layout-budget.md, primitives-core.md and import-excalidraw.md. The diagram_design skill is rewritten around the two tools.
  • Change: a fresh brain no longer gets the diagram-guides docs collection row. An existing row stays as it is (harmless; switch it off at /docs if it was on).