<feed xmlns='http://www.w3.org/2005/Atom'>
<title>superpowers.git/tests/brainstorm-server/server.test.js, branch inline-execution</title>
<subtitle>Agentic skills framework and development workflow
</subtitle>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/'/>
<entry>
<title>Add visual companion Prime Radiant branding</title>
<updated>2026-06-16T17:09:47+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-06-15T23:32:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=b3ee712d3a68b604b3f36d872c7ec91501197dcb'/>
<id>b3ee712d3a68b604b3f36d872c7ec91501197dcb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix server test fallback cleanup</title>
<updated>2026-06-16T17:09:45+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-06-11T01:33:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=85914fbcf89602a966989db673636f391aa355e1'/>
<id>85914fbcf89602a966989db673636f391aa355e1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Harden root screen containment</title>
<updated>2026-06-16T17:09:45+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-06-11T01:25:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=04106797576d0caa9daecab7d4681d21addfbcf7'/>
<id>04106797576d0caa9daecab7d4681d21addfbcf7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Harden brainstorm companion auth regressions</title>
<updated>2026-06-16T17:09:45+00:00</updated>
<author>
<name>Drew Ritter</name>
<email>drew@primeradiant.com</email>
</author>
<published>2026-06-10T21:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=b17d54f839831b2345aa389e2f65f435f3a82867'/>
<id>b17d54f839831b2345aa389e2f65f435f3a82867</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(brainstorm-server): fix auth-integration bugs from full-branch review</title>
<updated>2026-06-16T17:09:45+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@primeradiant.com</email>
</author>
<published>2026-06-10T02:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=7fbae0252fe90778ce0c06fde3bf5f87aa396fc2'/>
<id>7fbae0252fe90778ce0c06fde3bf5f87aa396fc2</id>
<content type='text'>
A second adversarial review of the merged branch found that combining the
session-key auth with the feature work created real bugs the (vacuous) tests
missed:

- [Critical] GET /files/ (empty name) resolved to CONTENT_DIR and crashed the
  process with uncaught EISDIR — newly reachable because the query-stripping
  refactor turns /files/?key=... into /files/. Reject non-regular-file names.
- [High] --open opened a KEYLESS url, which the auth gate 403s — the headline
  feature landed on the error page. Open the keyed url.
- [High] Same-port restart regenerated the token (port persisted, token not), so
  the open tab's old cookie 403'd and never reconnected — contradicting the
  documented promise. Persist the token (BRAINSTORM_TOKEN_FILE / .last-token)
  alongside the port.
- [Medium] Token sat in world-readable server-info/server.log (0644 in /tmp).
  umask 077 in start-server.sh + mode 0600 on server-info/.last-token.
- [Medium] touchActivity() ran before the auth check, so unauthenticated requests
  defeated the idle timeout. Count activity only after authorization.
- [Low] COOKIE_NAME embedded the pre-fallback port; derive it from the actual
  bound port (also prevents a cross-server cookie-jar collision on fallback).

Tests added/strengthened (previously passed vacuously): /files/ no-crash; the
auto-open url carries the key and is reachable (200); restart reuses the same key
not just the port; unauthenticated requests don't reset the idle clock.
Full suite green (ws-protocol 32, helper 12, auth 13, server 29, lifecycle 8,
stop-server 4); restart smoke confirms same port+key and old URL -&gt; 200.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A second adversarial review of the merged branch found that combining the
session-key auth with the feature work created real bugs the (vacuous) tests
missed:

- [Critical] GET /files/ (empty name) resolved to CONTENT_DIR and crashed the
  process with uncaught EISDIR — newly reachable because the query-stripping
  refactor turns /files/?key=... into /files/. Reject non-regular-file names.
- [High] --open opened a KEYLESS url, which the auth gate 403s — the headline
  feature landed on the error page. Open the keyed url.
- [High] Same-port restart regenerated the token (port persisted, token not), so
  the open tab's old cookie 403'd and never reconnected — contradicting the
  documented promise. Persist the token (BRAINSTORM_TOKEN_FILE / .last-token)
  alongside the port.
- [Medium] Token sat in world-readable server-info/server.log (0644 in /tmp).
  umask 077 in start-server.sh + mode 0600 on server-info/.last-token.
- [Medium] touchActivity() ran before the auth check, so unauthenticated requests
  defeated the idle timeout. Count activity only after authorization.
- [Low] COOKIE_NAME embedded the pre-fallback port; derive it from the actual
  bound port (also prevents a cross-server cookie-jar collision on fallback).

Tests added/strengthened (previously passed vacuously): /files/ no-crash; the
auto-open url carries the key and is reachable (200); restart reuses the same key
not just the port; unauthenticated requests don't reset the idle clock.
Full suite green (ws-protocol 32, helper 12, auth 13, server 29, lifecycle 8,
stop-server 4); restart smoke confirms same port+key and old URL -&gt; 200.
</pre>
</div>
</content>
</entry>
<entry>
<title>test(brainstorm-server): thread session key through tests after auth merge</title>
<updated>2026-06-16T17:09:45+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@primeradiant.com</email>
</author>
<published>2026-06-10T01:33:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=01de36703dcef42c9c5c5eafa840fb6cd8bcb29a'/>
<id>01de36703dcef42c9c5c5eafa840fb6cd8bcb29a</id>
<content type='text'>
Integrating the per-session-key auth onto the same branch as the dotfile and
lifecycle work: two tests added after the auth commit opened WebSockets without a
key (server.test.js dotfile-reload, lifecycle.test.js idle-shutdown), which the
auth gate now resets. Pass ?key=/BRAINSTORM_TOKEN in both. Full suite green:
ws-protocol 32, helper 12, auth 13, server 28, lifecycle 7, stop-server 4.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Integrating the per-session-key auth onto the same branch as the dotfile and
lifecycle work: two tests added after the auth commit opened WebSockets without a
key (server.test.js dotfile-reload, lifecycle.test.js idle-shutdown), which the
auth gate now resets. Pass ?key=/BRAINSTORM_TOKEN in both. Full suite green:
ws-protocol 32, helper 12, auth 13, server 28, lifecycle 7, stop-server 4.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(brainstorm-server): gate every endpoint behind a per-session key</title>
<updated>2026-06-16T17:09:45+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@primeradiant.com</email>
</author>
<published>2026-06-09T19:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=cb5bb885fd7cf00a1820f20d922df06ec02d4bed'/>
<id>cb5bb885fd7cf00a1820f20d922df06ec02d4bed</id>
<content type='text'>
The companion server is reachable by any local browser tab (default loopback
bind) and by any host that can route to it (remote --host bind). It served
screens, files, and accepted event-injecting WebSocket connections with no
authentication, so a malicious browser tab or a direct remote client could read
brainstorm content or inject events that the agent reads as the user's input
(prompt injection into a live session).

Generate a per-session secret token, carry it in the served URL as ?key=, and
mirror it into an HttpOnly SameSite=Strict per-port cookie on first load so
same-origin subresources and the WebSocket handshake authenticate automatically.
Every HTTP request and WebSocket upgrade now requires a valid key (query or
cookie, constant-time compared); unauthenticated requests get a friendly 403
explaining they need the full URL. A secret authenticates the client uniformly
across loopback, tunnel, and remote binds and defeats DNS rebinding, which a
Host/Origin allowlist cannot.

Also guard handleMessage against a null JSON payload that crashed the process.

Tests: new auth.test.js (13 cases) covering the key on /, /files/*, and WS plus
cookie bootstrap and the null-payload guard; server.test.js threads the key;
ws-protocol.test.js + auth.test.js wired into npm test.

Closes #1014
Refs #1110, #1553, #1504
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The companion server is reachable by any local browser tab (default loopback
bind) and by any host that can route to it (remote --host bind). It served
screens, files, and accepted event-injecting WebSocket connections with no
authentication, so a malicious browser tab or a direct remote client could read
brainstorm content or inject events that the agent reads as the user's input
(prompt injection into a live session).

Generate a per-session secret token, carry it in the served URL as ?key=, and
mirror it into an HttpOnly SameSite=Strict per-port cookie on first load so
same-origin subresources and the WebSocket handshake authenticate automatically.
Every HTTP request and WebSocket upgrade now requires a valid key (query or
cookie, constant-time compared); unauthenticated requests get a friendly 403
explaining they need the full URL. A secret authenticates the client uniformly
across loopback, tunnel, and remote binds and defeats DNS rebinding, which a
Host/Origin allowlist cannot.

Also guard handleMessage against a null JSON payload that crashed the process.

Tests: new auth.test.js (13 cases) covering the key on /, /files/*, and WS plus
cookie bootstrap and the null-payload guard; server.test.js threads the key;
ws-protocol.test.js + auth.test.js wired into npm test.

Closes #1014
Refs #1110, #1553, #1504
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(brainstorm-server): ignore macOS resource-fork dotfiles</title>
<updated>2026-06-16T17:09:45+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@primeradiant.com</email>
</author>
<published>2026-06-09T21:53:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=2b108b7dc2896df01a58384a3ff46e71ba04e9e2'/>
<id>2b108b7dc2896df01a58384a3ff46e71ba04e9e2</id>
<content type='text'>
On macOS (and ExFAT/SMB volumes) the OS writes ._&lt;name&gt;.html sidecar files
holding binary resource-fork metadata. These end with .html, so they passed the
content filter and could be picked as the newest screen — serving binary garbage
to the browser instead of the mockup — or fetched via /files/.

Skip dotfiles (leading '.') at all four sites that list or serve content:
getNewestScreen, the /files/ endpoint, the known-files seed, and the fs.watch
handler. Tests cover serving (/ and /files/) and the watch path (a ._ file must
not trigger a reload).

Refs #950
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On macOS (and ExFAT/SMB volumes) the OS writes ._&lt;name&gt;.html sidecar files
holding binary resource-fork metadata. These end with .html, so they passed the
content filter and could be picked as the newest screen — serving binary garbage
to the browser instead of the mockup — or fetched via /files/.

Skip dotfiles (leading '.') at all four sites that list or serve content:
getNewestScreen, the /files/ endpoint, the known-files seed, and the fs.watch
handler. Tests cover serving (/ and /files/) and the watch path (a ._ file must
not trigger a reload).

Refs #950
</pre>
</div>
</content>
</entry>
<entry>
<title>Phase D: cross-runtime tweaks (visual-companion, executing-plans, test)</title>
<updated>2026-06-16T17:09:43+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@primeradiant.com</email>
</author>
<published>2026-05-06T01:26:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=6ec8686477cb4408a0de15a7eceedda809428318'/>
<id>6ec8686477cb4408a0de15a7eceedda809428318</id>
<content type='text'>
Misc platform/runtime statements and adjacencies that don't fit the
prose, config-ref, README-ordering, or tool-vocabulary buckets:

- visual-companion frame template: rename CSS/HTML id #claude-content
  → #frame-content. The id is purely styling — nothing external
  references it. The brainstorm-server test that asserted the old
  string is updated in lockstep.

- visual-companion launch instructions: add a Copilot CLI section
  alongside Claude Code, Codex, and Gemini CLI; combine the Claude
  Code (macOS / Linux) and (Windows) sections so heading style
  matches the other (non-OS-qualified) platforms.

- visual-companion: "Use Write tool" → "Use your file-creation tool"
  for the cat/heredoc warning. The prohibition is what's load-
  bearing, not the tool name.

- executing-plans/SKILL.md: list all subagent-capable runtimes
  (Claude Code, Codex CLI, Codex App, Copilot CLI, Gemini CLI) and
  point at the per-platform tool refs as the source of truth.

- executing-plans/SKILL.md: relative path "using-superpowers/
  references/" → "../using-superpowers/references/" to resolve
  correctly from the executing-plans/ directory.

No bundled spec doc here — Phase D was scope-extension work that
took place across rounds, with no standalone spec authored.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Misc platform/runtime statements and adjacencies that don't fit the
prose, config-ref, README-ordering, or tool-vocabulary buckets:

- visual-companion frame template: rename CSS/HTML id #claude-content
  → #frame-content. The id is purely styling — nothing external
  references it. The brainstorm-server test that asserted the old
  string is updated in lockstep.

- visual-companion launch instructions: add a Copilot CLI section
  alongside Claude Code, Codex, and Gemini CLI; combine the Claude
  Code (macOS / Linux) and (Windows) sections so heading style
  matches the other (non-OS-qualified) platforms.

- visual-companion: "Use Write tool" → "Use your file-creation tool"
  for the cat/heredoc warning. The prohibition is what's load-
  bearing, not the tool name.

- executing-plans/SKILL.md: list all subagent-capable runtimes
  (Claude Code, Codex CLI, Codex App, Copilot CLI, Gemini CLI) and
  point at the per-platform tool refs as the source of truth.

- executing-plans/SKILL.md: relative path "using-superpowers/
  references/" → "../using-superpowers/references/" to resolve
  correctly from the executing-plans/ directory.

No bundled spec doc here — Phase D was scope-extension work that
took place across rounds, with no standalone spec authored.
</pre>
</div>
</content>
</entry>
<entry>
<title>Separate brainstorm server content and state into peer directories</title>
<updated>2026-03-25T18:03:53+00:00</updated>
<author>
<name>Jesse Vincent</name>
<email>jesse@fsck.com</email>
</author>
<published>2026-03-24T18:07:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.1991861.xyz/superpowers.git/commit/?id=9e3ed213a04315e57055d98ef8dd78bff6b63683'/>
<id>9e3ed213a04315e57055d98ef8dd78bff6b63683</id>
<content type='text'>
The session directory now contains two peers: content/ (HTML served to
the browser) and state/ (events, server-info, pid, log). Previously
all files shared a single directory, making server state and user
interaction data accessible over the /files/ HTTP route.

Also fixes stale test assertion ("Waiting for Claude" → "Waiting for
the agent").

Reported-By: 吉田仁
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The session directory now contains two peers: content/ (HTML served to
the browser) and state/ (events, server-info, pid, log). Previously
all files shared a single directory, making server state and user
interaction data accessible over the /files/ HTTP route.

Also fixes stale test assertion ("Waiting for Claude" → "Waiting for
the agent").

Reported-By: 吉田仁
</pre>
</div>
</content>
</entry>
</feed>
