Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

Merge origin/main into view/632-claude [N26,A2]

Corey Olson50363de06531
diff --cc src/cockpit.js
index d1d51248,7304bf49..839e22eb
--- a/src/cockpit.js
+++ b/src/cockpit.js
@@@ -1,6 -1,10 +1,11 @@@
- import { effectiveGuards, IN_STATE, MACHINE } from './machine.js';
+ import {
+ effectiveGuards,
+ IN_STATE,
+ MACHINE,
+ } from './machine.js';
-import { commandPhrases } from './help.js';
+import { commandPhrases, VERSION } from './help.js';
+ import { personNeeds } from './needs.js';
+import { readFileSync } from 'node:fs';
/** The CLI's default phrases, ordered by depth for the existing prose inventory guard. */
export const PULLBOARD_COMMANDS = Object.freeze(commandPhrases().sort((left, right) => right.split(' ').length - left.split(' ').length));
@@@ -68,16 -41,16 +73,16 @@@ function lifecycle()
* The Roadmap tab has its own address (N38): /roadmap on a host that serves the page there too,
* which `paths` declares, and a #roadmap fragment anywhere else, such as a snapshot hosted under a
* folder, where a path the host does not serve would leave a reload with nothing.
- * The hosted page at https://app.pullboard.dev passes hostedLocal (N26, #513): on the machine that runs pullboard
- * view, the page reads that view straight, writable, and the relay transport is never loaded; on any other device it
- * is the relay page as before when relaySession says the request has a relay session, and otherwise it says why it
- * cannot read a board here and links signIn.
+ * The hosted page at https://app.pullboard.dev passes hostedLocal (N26, #513): on this machine it reads the local view
+ * and any linked relay boards through their own transports; local boards are writable, relay boards remain read-only.
+ * On another device it uses the relay when relaySession says the request has a session, and otherwise explains how to
+ * connect or sign in.
*
* @param {string} [key] - The session's secret.
- * @param {{snapshot?: boolean, readOnly?: boolean, requests?: boolean, transportModule?: string|null, apiBase?: string, apiHeaders?: Record<string, string>, stylesheet?: string, paths?: boolean, hostedLocal?: boolean, relaySession?: boolean, signIn?: string|null}} [options] - Served connection and assets, optional person requests over a read-only transport, host routes, a static page with event replay, or the hosted page that reads this machine's view first.
+ * @param {{snapshot?: boolean, readOnly?: boolean, requests?: boolean, transportModule?: string|null, apiBase?: string, apiHeaders?: Record<string, string>, stylesheet?: string, paths?: boolean, hostedLocal?: boolean, relaySession?: boolean, signIn?: string|null, hostedReleaseVersion?: string, hostedReleaseVersions?: string[]|null}} [options] - Served connection and assets, optional person requests over a read-only transport, host routes, a static page with event replay, or the hosted page that reads this machine's view first.
* @returns {string}
*/
-export function cockpitPage(key = '', { snapshot = false, readOnly = false, requests = false, transportModule = null, apiBase = '', apiHeaders = { 'x-pullboard-key': key }, stylesheet = null, paths = false, hostedLocal = false, relaySession = false, signIn = null } = {}) {
+export function cockpitPage(key = '', { snapshot = false, readOnly = false, requests = false, transportModule = null, apiBase = '', apiHeaders = { 'x-pullboard-key': key }, stylesheet = null, paths = false, hostedLocal = false, relaySession = false, signIn = null, hostedReleaseVersion = VERSION, hostedReleaseVersions: suppliedReleaseVersions = null } = {}) {
// Derive the current CLI inventory for every served, relay or exported page.
const COMMAND_SOURCE = 'pullboard (?:' + commandPhrases().join('|') + ')(?![\\w-])(?: (?:--?[\\w-]+|\\d+|#\\d+|"[^"\\n]*"|[A-Z][A-Z0-9_]*|[\\w-]*[\\/.:@][^\\s"]*|[a-z]+-\\d+)(?![\\w-]))*';
diff --cc test/cockpit/local-origin.test.js
index 8f3d91ef,b3d5a63f..bafc97d3
--- a/test/cockpit/local-origin.test.js
+++ b/test/cockpit/local-origin.test.js
@@@ -90,12 -80,18 +90,19 @@@ async function hostedStandIn(chrome, pa
return chrome.send('Fetch.fulfillRequest', {
requestId, responseCode: reply.status,
responseHeaders: Object.entries(reply.headers).filter(([name]) => !['content-length', 'transfer-encoding', 'connection', 'keep-alive', 'date'].includes(name)).map(([name, value]) => ({ name, value: String(value) })),
- body: Buffer.from(reply.body).toString('base64'),
+ body: Buffer.from(responseBody).toString('base64'),
});
}
+ if (address.pathname === '/api/v1/boards') {
+ return chrome.send('Fetch.fulfillRequest', {
+ requestId, responseCode: 200,
+ responseHeaders: [{ name: 'Content-Type', value: 'application/json' }, { name: 'Cache-Control', value: 'no-store' }],
+ body: Buffer.from(JSON.stringify({ version: 1, boards: [], warnings: [] })).toString('base64'),
+ });
+ }
const document = resourceType === 'Document';
- const page = address.search === '?relay' ? pages.relay : pages.anonymous;
+ const page = pages[address.search.slice(1)] ?? (address.search === '?relay' ? pages.relay : pages.anonymous);
+ const asset = pages.assets?.[address.pathname];
await chrome.send('Fetch.fulfillRequest', {
requestId, responseCode: 200,
responseHeaders: [