Repository navigation
0.16.0: @agent in Chat, app tools, publish a website, embeds, LAN hardening - #515
Open
ra3orblade wants to merge 55 commits into
Open
ra3orblade wants to merge 55 commits into
ra3orblade wants to merge 55 commits into
Conversation
#513 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…istory; the template step fits the window - A vault created by this build is stamped as having seen the bundled changelog, so What's New no longer opens over a first-time user's dashboard. - The Start step drops the brand hero: with seven template tiles under it the card outgrew a default window and Create vault sat below the fold. - The starter journal entry carries the snippet + word count Journal reads, so it no longer says "0 words" and "No entry yet." beside its own text. - The starter bookmark points at docs.getbrainstorm.online, not a domain the project does not serve. - Chat: a vault with no channels says so instead of "Pick a channel"; the channel sidebar and Preview's file sidebar use the same background as every other app's. - Database list descriptions no longer trail a raw type id; seven first-run strings say "objects"/"nothing" instead of "entities". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t and dark Chat: day dividers key on the local calendar day (they keyed on the UTC date while the times beside them were local); both ⋯ buttons use the shared glyph. Books: one live progress value feeds the library row, the inspector and the footer; EPUBs drop the meaningless Pages row; the open inspector no longer covers the footer's next-page control. Browser: a restored blank tab shows the start page; short tab titles fit. Database: numeric header, cells and totals share one edge; type-list names split into words. SDK: an uncoloured chip is visible on light themes; an enabled header ⋯ rests at full strength. Files: Filter shares the toolbar field face; the sort menu fits its content; the selection bar is opaque and the list scrolls clear of it. Tasks: the checkbox ring holds 3:1 on dark themes. Journal, Mailbox: wording and an un-shouted account address. Adds the 0.15.1 What's New entry and bumps both package versions. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e macos-14 image The 0.15.1 dry run died in 1s with "The configuration 'macos-14-arm64-us-default' is not supported". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…val, quoted untrusted context The installed Agent app is the principal: the run happens on the invoker's device through the real ai/entities broker handlers under the app's own ledger grants. Only a local create by an agents.mention holder, authored by this device's identity, actuates; every other channel message reaches the model as one quoted, delimited block. Proposals are staged on the reserved agentProposal property with the invoker bound in; approve/discard are invoker-only, re-check the Agent app's entities.write for the type, and refuse a locked channel/card. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…, assets to files (IE-12) resolveEntityHref / resolveAssetSrc / unpublishedLabel / allowDataImages. In publishing mode no brainstorm: URL and no entity id reaches the output: a reference to an unpublished entity keeps neither its link nor its stored label (the label is the target's title). Also renders title, rules, tables and the content of containers with no portable form. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ore-only zip (IE-12) New subpath @brainstorm-os/sdk/site-export. Slugs are [a-z0-9-] only and numbered apart on collision; the zip writer refuses unsafe or duplicate entry paths; an asset is written only when a published page shows it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… site (IE-12) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ot, and say so when there is none Interface selection ranked adapters by name and then took exactly one: a preferred adapter that would not bind left LAN hosting off with only a log line. The factory now walks the ranked list, every listener carrying the same closed handshake. Ranking learns more overlay prefixes (podman, cni, ppp, bridge, WSL, VPN-named adapters) and puts a self-assigned 169.254 address behind a routed one within the same class of adapter. IPv6 position, written down in lan-address.ts: IPv4 only on every path. A link-local v6 address needs a zone id that cannot go in a ws:// URL, a global one is routable and would falsify the 'no server' claim, and privacy addresses churn the tag's address commitment. The cost is an IPv6-only network getting no LAN sync, and Settings now states that instead of rendering nothing. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ecords as fixed, and make tag rotation reach the wire The security-review and pentest runs of 2026-07-31 failed on five findings and passed on a fix commit that never reached the merged tree: the squash of #377 carried the feature without it, and the probe file the ledger cites did not exist. All five were live. Re-implemented here, with the probes: - The instance name is inside the tag's MAC, in a length-prefixed pre-image. It is the candidate table's de-dup key and is rendered in Settings, so a captured advert could be replayed under any name. - The candidate and cooldown tables are capped, expired records retire on insert, and the live target is pinned by instance. - The advert no longer publishes os.hostname() or an address record for every interface: the SRV host is the per-boot instance name, AAAA is off, and A records are held to the advertised addresses. - A record arriving after the vault closed is refused instead of verified against the secret captured when browsing started. - Loopback is refused in an advert even under a valid tag, and a paired address is re-validated at the coordinator rather than trusted. Two defects found by reading bonjour-service 1.4.4 rather than by a probe: it has no in-place TXT update, so the rotated tag was never announced and a host stopped being discoverable about ten minutes after it started listening; and its find() callback fires on first sighting only. Rotation now withdraws and re-announces under the same name, and the browser also takes txt-update. Wire change: the tag namespace and TXT schema are v2. A 0.15 device and this build do not discover each other; pairing addresses, a typed address and the relay are unaffected. Adds an in-process advertise -> browse -> gated dial -> admission test over a real loopback socket with an in-memory multicast bus. Real multicast is not exercised by anything here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…1.20b) One classifier branch plus one catalogue row per provider. Adds Google Maps, OpenStreetMap, Spotify, SoundCloud, CodePen and Miro; X and GitHub Gist stay bookmark cards because both embed through a script injected into the host page. Hardens the existing branches: hosts now match an exact set (the YouTube branch used endsWith, so evilyoutube.com classified), embeds need https with no userinfo or port, and every embed URL is rebuilt from validated tokens on the provider's fixed origin instead of interpolating the pasted URL. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…11.20b) WebEmbedNode renders a local facade and mounts the provider iframe only on click, with per-provider sandbox, allow list, aspect and an ephemeral credentialless partition. The frame src is re-derived from the persisted URL on every render, so a CRDT peer writing __embedUrl directly can no longer aim the iframe (import-time reclassification did not cover that path). The bookmark / web-embed command moves from Notes into the shared catalogue with first-class YouTube and Google Maps rows, so Journal, Tasks, Bookmarks and Contacts get them. Notes imports WebEmbedNode from the editor package (the re-export shim went in the previous commit). Bookmark and fallback links no longer put an unparsed URL in an href. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…(B11.20b) Markdown gets the plain URL and HTML an escaped anchor, so an exported file does not fetch third-party content when opened. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e catalogue (B11.20b) Adds www.google.com, www.openstreetmap.org, open.spotify.com, w.soundcloud.com, codepen.io and miro.com to frame-src in Notes, Journal, Tasks and Bookmarks. Contacts mounts the same editor and node set but had no frame-src at all, so an embed there was a blocked frame; it now carries the same list. A test holds each page's remote frame-src equal to the catalogue's frame origins. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…y cards The composer lists @agent beside people; when the Agent app is missing, has no AI permission, or Chat lacks agents.mention it is listed DISABLED with the reason (ContextCandidate.disabled, honoured by both mention surfaces). Replies show who asked. A built-in-agent card is live only for its invoker; everyone else — including other vaults, via the synced display-only preview — sees it with its actions disabled and a line naming whose it is. Six locales. Adds the real-manifest integration case (installer → ledger → broker) and the Chat-side security tests (text-only rendering, read-only cards, forged rows). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…st on call The effect vocabulary (pure / reads-vault / external / proposes-write) had no class for the most obvious cross-app verb: 'create X in the provider from this'. Declaring such a tool pure or proposes-write would auto-run it for an agent with nothing staged for a human to approve. writes-vault: the provider writes its OWN data under its own grants. A user gesture runs it (the click is the confirmation); an agent's call always asks through the shell. The provider must hold an entities.write grant to be listed or called, and a locked entityRef argument is refused before the provider sees the id, as for proposes-write. Also lifts tools.call's two entity resolvers (real type, read-only lock) out of main/index.ts so the in-process pipeline test runs production's closures. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…form
A tool whose only input is an entityRef the target pre-fills ('Create task'
on a note) used to open a form showing one raw object id. The prompt hook now
resolves straight from the target when there is nothing a human could add;
any other promptable input still opens the form.
The object-menu runtime's appTools.list took surface as string, so an app's
real AppToolsService was not assignable to the slot without a cast. It takes
AppToolSurface now, and the two seam types are exported.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The first registrations.tools declaration in a first-party manifest: app.io.brainstorm.tasks.create-task, writes-vault, menu surface, applies to notes, one entityRef input restricted to Note. Tasks gains tools.provide. The handler reads the argument once, re-checks the source's type, names the task after the note, and writes through a new repository.createTask that rejects when the write did not land (saveTask logs and swallows). Its errors are codes, not copy: no consumer renders provider text. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Notes is the first consumer: it passes onToolResult and onToolArguments to the shared object menu from all three call sites (header title, header overflow, list rows), mounts the shared outcome chips and argument prompt, and carries tool.refused.*, tool.outcome.* and tool.args.* in all six catalogs. Provider error text is dropped before it reaches React state. Grants: tools.read and tools.call:io.brainstorm.tasks/create-task, the per-tool form, so the manifest is the allowlist of what can appear. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Real manifests through the real installer, ledger, registry, broker, tools service, approval host and call host, into Tasks' shipped handler and back through the broker to the entities service. Covers first-use approval, a decline, no dashboard, a locked note, server-side type resolution with no existence oracle, check-and-forward of one snapshot, undeclared arguments, missing grants, revoked provider grants, a closed provider and a provider failure. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
500 seeded cases against the shipped create-task declaration: the provider is reached only with a fresh null-prototype bag holding exactly source, an unlocked object whose stored type is Note; every other bag is refused by name before dispatch. Asserts both branches ran. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ut that never landed Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…d runs (IE-12) Consecutive text runs are scrubbed as one string, and link text that spells out its target's id is replaced by the stand-in. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rt what was left out (IE-12) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ed images, failure (IE-12) Announced through the live region and posted via ui.notify; Notes now declares notifications.post. A failure shows a fixed sentence, never the error text. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… tool prompt names the caller and Decline is not a primary button Found in the real-shell pass (harness session 961): the pasted link was typed into the note because the card never took focus, and the approval prompt read "io.brainstorm.notes wants to run…" over two accent buttons. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ment (B11.20) App pages are served from the brainstorm: scheme, so Chromium sends no Referer on their iframes under any referrerpolicy and YouTube's player fails with Error 153. The app-renderer session now sets Referer to the constant https://getbrainstorm.online/ on the iframe document request to https://www.youtube-nocookie.com/embed/<id> only: exact parsed origin, subFrame resource type, no other host, subresource, header or cookie. The rule is driven by a per-provider embedderReferrerPath on the frame catalogue, which moves to sdk-types so the shell main process and the editor share one row per provider. onBeforeSendHeaders now has a single owner per session that composes rewriters; the Browser's third-party-cookie strip registers through it instead of holding the listener directly. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…g synced fields (B11.20) Lexical keys a decorator portal by node key, so the embed view and its loaded flag survived a peer rewriting the node's URL: the frame switched to another allowlisted target with no new click. Consent now stores the embed URL it was given for and the frame renders only while the re-derived URL equals it. Yjs writes node fields directly, so a peer could put a number or object in url/title/description and the decorator threw. Both views coerce to a string and render the inert fallback. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ent app is an agent, lock re-check, appliesTo in the fingerprint Four findings from the independent review and red-team pass. Confused-deputy read (MEDIUM): tools.call checked the tool's allowedTypes but never the CALLER's own read grant, so an app holding only tools.call:io.brainstorm.tasks/create-task got a note's title back through Tasks. The broker now requires entities.read:<stored type> from the caller for every entityRef argument, constrained or not, and answers a wrong type, an unreadable object and a missing one identically. create-task returns the new task's id and nothing read from the source. Initiator by principal shape (MEDIUM, latent): io.brainstorm.agent was a UserGesture, so a writes-vault tool would auto-run for the model on a standing approval. The built-in Agent app is now an Agent initiator. Lock TOCTOU (LOW): the lock is read again after the approval prompt, immediately before dispatch. The declaration fingerprint now includes appliesTo, so widening it re-prompts. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…annot be restricted is not published A private-range check on a string and a URL parser reading the same string do not agree: 010.0.0.1 passes as 10/8 and WHATWG URL parsing dials 8.0.0.1. Addresses now go through one canonical parser (four decimal octets, no leading zeros, hex, short forms or whitespace, re-serialised and compared) on every path they enter by: adverts, the pairing payload, a typed address, the bind. The dial URL is built from the parsed octets. Link-local stays, since two cabled machines with no DHCP are a real LAN; 169.254.169.254 is refused. The advert's address restriction failed open: without the library's records hook, every interface's A/AAAA records would have been published. It now refuses to advertise, and a refresh that fails drops the advert rather than reporting one nobody can verify. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… naming the vault, drops remote images, caps depth (IE-12) One escape boundary: text runs, leaf text, pane titles, alt, captions, bookmark titles and labels all pass the same scrub. Ids the body references are removed wherever they appear. Nesting past 64 levels flattens to text. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e AND id; the name cache follows installs A manifest name is free text, so a third-party app can call itself 'Notes' and the prompt read 'Notes wants to run…'. Each party (caller and provider) is now a row with its name and its registry app id, the id quieter but always present, both text nodes. Names are screened and clamped to 48 code points in the approval host and again in the renderer; an unusable name falls back to the id, shown once. resolveAppName cached for the process lifetime and was never invalidated, so an updated app kept its old name and a reinstalled id its predecessor's. The installer drops the entry on install, update, refresh and uninstall. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nces resolve to current page titles (IE-12) Token values are held to an allow-list of characters and functions, so image-set(), cross-fade() and quoted URLs cannot make a published site fetch from a third party. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nators, staged-channel binding, lock re-check R1: context is ordered by host-recorded arrival, never synced seq/createdAt; an implausible seq is ignored; each author is held to half the window; the reply is placed after the local invoking turn. Both runners. R2: every Unicode line terminator is canonicalised and controls/invisibles are stripped before escaping, in bodies and display names; the delimiter word is broken up in names too. R3: the staged channel is recorded inside the reserved proposal; the lock check and provenance read it from there, not the row's writable conversation. R4: the channel lock is re-read before every post. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…hor for agent rows R5: a row that presents as the built-in agent is VOUCHED only when this device's Agent app wrote it; then its card comes from the reserved property alone and it reads 'Asked by you' — no synced name is displayed. Anything else is filed under its own author key, labelled as shown from another member's device and not verified, names no invoker, and never states an outcome as fact. Six locales. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…bership is structural (IE-12) A sub-page belongs only when its parent shows it, its own record names that parent, and it is shared with exactly the people the root is; a page-ref alone confers nothing. planSite returns the list for the user to confirm and buildSiteArchive writes only confirmed pages. Vault assets are copied only from pages nobody else can write; inline data images count against the size cap; the doc reader stops at a fixed depth. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…cords its parent on its own record (IE-12) New sub-pages (/subpage, Turn into page) write parentPageId on the child. Publish website… now plans the site, shows the sub-pages that belong in the shared export popover, and opens the save dialog only on confirmation. Images withheld from shared pages are reported. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…k re-check, prompt identity Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t, full scrub Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ators, staged-channel binding, unverified cards Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… (IE-12) Pages the tree links to but does not own are listed in a second group, off by default, and only when they are shared with exactly the people the root is. Ticking one publishes that page alone; nothing is written to the vault. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.16.0: the heroes carried over from 0.15.0, on top of the first-run and polish pass (which was PR #514 and is included here).
Agent-13— @agent in ChatTyping
@agentin a channel runs the installed Agent app on the invoker's device with the invoker's default provider. The reply posts in the thread; anything it wants to create is a card only the invoker can approve.entities.createwrap: it starts only from a local create by a broker-verified app holdingagents.mention, authored by this device's identity. A synced message cannot start one.seq), capped per author, with Unicode line terminators normalised.agentProposal, and refuses a locked channel or card.agent-proposals.mentionTarget, gated on the existingagents.mention). No new capabilities, no manifest changes.Tool-10— the first live app toolTasks provides "Create task"; Notes consumes it from the object menu. This is the first time the app-tools track is reachable by a user.
writes-vaultfor a provider that persists on call: a user click runs after first-use approval; an agent call asks every time; the provider must holdentities.write. Not yet ratified in doc 78.entities.read:<stored type>for everyentityRef, re-reads the lock before dispatch, and the fingerprint includesappliesTo.tools.provideand thecreate-taskregistration; Notes gainstools.readandtools.call:io.brainstorm.tasks/create-task.IE-12— publish a websiteA note and its sub-pages become a zipped static site through the save dialog. No new shell capability beyond
notifications.poston Notes (for the result message).page-refin the parent, its ownparentPageId, and exactly the root's members. Sub-pages now recordparentPageIdon creation.brainstorm:hrefs from every emitted string; remote images and unsafe token values are dropped; 200 pages / 100 MB caps, inline images included.B11.20— external embedsOne node and one classifier. YouTube, Vimeo, Loom, Figma, CodeSandbox, Google Maps, OpenStreetMap, Spotify, SoundCloud, CodePen and Miro embed, all click-to-load; X and Gist stay bookmark cards.
endsWith("youtube.com"), embed URLs built from pasted text, and a synced__embedUrltrusted without re-derivation.frame-srcgains the six new provider origins in Notes, Journal, Tasks and Bookmarks; Contacts gains the list (it had none).Refereron the YouTube player document only (sub-frame, exact origin,/embed/), fixing "Error 153". The Browser's cookie-strip listener now registers through the same per-session composer.P2P-1— LAN discovery hardeningThe feature shipped in 0.15.0 (#377). Its gate ledger passes cite a fix commit that is in no ref, so the five recorded findings were live. Re-implemented here, plus two functional bugs: the rotated tag was never re-announced (a host went undiscoverable after ~10 minutes) and the browser missed TXT updates. Addresses must be canonical dotted-decimal everywhere they enter; the advert fails closed.
Wire change: discovery tag and TXT schema are v2. A 0.15 and a 0.16 device do not auto-discover each other; pairing address, typed address and relay are unaffected.
First run and polish (was #514)
A new vault no longer opens on What's New; Create vault stays in view; Chat day dividers use local time; Books progress agrees with itself; Browser restores a blank tab to the start page; Database, Files, Tasks and shared chrome fixes.
Verification
bun run test: 1,904 files, 19,752 tests passed.typecheck,lint: clean.@agentreply, card and approve with the default model and withgpt-oss:20b; the LAN setting.v0.15.0..HEAD; every finding above medium fixed, each with a test written first.Not verified
@agentin a shared channel, and delivery of the reply over the relay.Known gaps
gpt-oss:20b, one run in four replied "I have drafted a task" without calling the propose tool, so no card appeared.parentPageIdpublish only when ticked as linked pages.🤖 Generated with Claude Code