diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ff646..c2eaca5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project are documented here. Versions follow [Semant ## Unreleased +## 3.0.0 - 2026-11-24 + +AEL Studio rebuilt as a read-only, machine-wide bot monitor with one action, Freeze: every project's bot works in a 3D restaurant kitchen (`docs/superpowers/specs/2026-11-22-studio-redesign-design.md`). Breaking for `ael studio`; see the Breaking entries and `core/local-workflow-studio.md`. + - **Fixed:** a Studio Freeze now records the same Run history as `goal freeze`: one `GOAL_FROZEN` lifecycle event (or the goal node's `NODE_COMPLETED` on a workflow Run) with the Studio actor, and the draft impact map, so recap and node evidence show Studio-frozen Runs. A background Studio no longer crashes when the starting terminal drops the IPC channel first. On phones the guest card sits clear of the Details button. - **Fixed:** Studio on phones (600px and narrower). The kitchen camera frames the active station with its neighbours and pans with the bot instead of shrinking the whole counter; the six stations sit in a scrollable strip under the scene; the guest card is a bottom card that is never clipped; the run header is compact and takes over the "waiting for you" block; the ticket label moves clear of the bot's speech bubble (or hides) and bubbles stay inside the scene; buttons are at least 44px tall. The zoomed station view, on desktop too, is framed from the bot's size so the whole toque is visible. - **Changed:** Studio chef bot and props. The bot wears a tall pleated chef's toque at every station (laurel on the brim at Order; the Critic swaps it for a dark beret). Its eyes are flat, unlit capsules drawn on the sphere with lid shapes for each mood: focused, serious at the Cook, a narrow suspicious squint at the Critic, worried, annoyed, angry, a blink and ^ ^ on click. The Cook tosses a frying pan (food flips and lands) over a flame that bursts with each toss and lights the scene warmly; reduced motion keeps a steady flame. The Head chef tastes a plated dish at the pass with a spoon and nods, rings the bell on a pass and pushes the plate back toward the Cook on an iterate; the gavel and hammer are gone. The Critic holds the magnifier over the plate, Taste and Order use the spoon, bowl, quill and notepad, Serve carries a tray with a cloche. Domes, bells and lids are no longer inside out, and polished metal reads as metal in both themes. @@ -13,8 +17,6 @@ All notable changes to this project are documented here. Versions follow [Semant - **Changed:** the Studio turntable is now an open restaurant kitchen: one counter read left to right with six stations (Order, Cook, Taste, Critic, Head chef, Serve) labelled with their AEL stage, status lamps (green done, pulsing orange now, dim pending, grey skipped), a ticket rail whose orange ticket follows the active station, a dashed "Sent back to the kitchen" path and "Iteration n of m" ticket after a Run goes back, a chef bot that walks between stations, the Devil's Advocate as a dark food critic, and a guest table for you ("Confirm the order?" with Freeze, "Bring it out?" for delivery approval). Wait lines are restaurant-flavoured. The flat ring fallback carries the same text. - **Added:** Studio diners: a small dining area with animated NPC diners and hover/focus name tags. The named diners (a nod to people who inspired AEL) ship in `studio/diners.json`, generic diners fill the other chairs; override them with `studio.diners` in `~/.ai-engineering-loop/config.json` (max 6, validated, escaped). - **Changed:** the Studio Saturn ring is now a turntable diorama: six procedural stage rooms on a round plinth (philosopher's study, workshop, lab, a dim Devil's Advocate room, courtroom, shipping dock) that turns the current stage to the front, status plaques and lamps per room, and the room view zooms into the same room instead of opening a separate scene. The bot is redesigned as a small robot with a clearcoat shell, glass visor and mood eyes. Rendering uses ACES tone mapping, soft shadows and a generated studio environment, all with core three.js (no addons, no downloaded models). -AEL Studio rebuilt as a read-only bot monitor with one action, Freeze (`docs/superpowers/specs/2026-11-22-studio-redesign-design.md`). - - **Breaking:** Studio is machine-wide. `ael studio` shows every project in the registry (`ael projects list`) and their worktree Runs, and reuses a running instance recorded in `~/.ai-engineering-loop/studio.json` (pid, port, URL; never the token). New flags: `--background` (detached, log in `~/.ai-engineering-loop/studio.log`), `--stop`, `--no-notify`; `--port` and `--no-open` stay. The per-project `/.ai-engineering-loop/studio.json` is no longer written. `studio-layouts/` is no longer written either; it stays in the private runtime ignore list for one more release so 2.17 folders do not show as untracked, and is safe to delete. - **Breaking:** the old control panel is removed: the wiring and recipe editor, layout save, node start/complete/fail/approve/retry, Run create/cancel/duplicate, Goal edit and unfreeze, answering questions and decisions, delivery adapter select, loop-limit changes, and their about 40 endpoints (`/api/bootstrap`, `/api/live`, `/api/validate`, `/api/install`, `/api/layout`, ...). Do these in the agent host or the CLI (`ael run`, `ael run --abandon`, `ael goal draft`, recipe files and `ael recipe`, `ael generate-adapter`); the table is in `core/local-workflow-studio.md`. - **Added:** the new API: `GET /api/projects`, `GET /api/projects/:id/runs/:runId`, `GET|PUT /api/me` (the Freeze actor, stored as `studioActor` in `~/.ai-engineering-loop/config.json`), `POST /api/projects/:id/runs/:runId/goal/freeze` (requires `expectedHash`), `GET /api/events` (`projects` snapshots), `GET /healthz`. Projects are addressed by opaque ids; the browser never sends a path, and only `.ai-engineering-loop/` inside registry paths and their worktrees is read. diff --git a/package.json b/package.json index 53c4341..8f5288b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ai-engineering-loop", - "version": "2.17.0", + "version": "3.0.0", "description": "A visual workspace that helps AI coding agents plan, build, review, and ship reliable software.", "main": "bin/ai-engineering-loop.js", "bin": { diff --git a/tests/auto-update.test.js b/tests/auto-update.test.js index 43791fb..e43fd93 100644 --- a/tests/auto-update.test.js +++ b/tests/auto-update.test.js @@ -16,6 +16,9 @@ const ROOT = path.join(__dirname, '..'); const CLI = path.join(ROOT, 'bin', 'ai-engineering-loop.js'); const au = require('../lib/auto-update.js'); const reg = require('../lib/project-registry.js'); +const MAJOR = require('../package.json').version.split('.')[0]; +const NEXT = `${MAJOR}.99.0`; +const MID = `${MAJOR}.50.0`; function sandbox() { const home = fs.mkdtempSync(path.join(os.tmpdir(), 'ael-au-home-')); @@ -123,7 +126,7 @@ test('opt-out: AEL_NO_AUTO_UPDATE, CI, and policy off make `update auto` a no-op const { home, env } = sandbox(); const dir = project(home); for (const extra of [{ AEL_NO_AUTO_UPDATE: '1' }, { CI: 'true' }]) { - const r = JSON.parse(cli(dir, { ...env, ...extra, AEL_UPDATE_DIST_TAGS: '{"latest":"2.99.0"}' }, 'update', 'auto', '--json').stdout); + const r = JSON.parse(cli(dir, { ...env, ...extra, AEL_UPDATE_DIST_TAGS: `{"latest":"${NEXT}"}` }, 'update', 'auto', '--json').stdout); assert.match(r.reason, /POLICY_OFF/); } assert.strictEqual(cli(dir, env, 'update', 'policy', 'off').status, 0); @@ -137,7 +140,7 @@ test('project-scope installs are notify-only: package.json is never changed', () const dir = project(home); const pkg = fs.readFileSync(path.join(dir, 'package.json'), 'utf8'); assert.strictEqual(cli(dir, env, 'update', 'policy', 'minor').status, 0); - const r = JSON.parse(cli(dir, { ...env, AEL_UPDATE_DIST_TAGS: '{"latest":"2.99.0"}', AEL_INSTALL_SCOPE: 'project' }, 'update', 'auto', '--force', '--json').stdout); + const r = JSON.parse(cli(dir, { ...env, AEL_UPDATE_DIST_TAGS: `{"latest":"${NEXT}"}`, AEL_INSTALL_SCOPE: 'project' }, 'update', 'auto', '--force', '--json').stdout); assert.strictEqual(r.decision.action, 'apply'); assert.deepStrictEqual(r.result, { applied: false, reason: 'PROJECT_SCOPE_NOTIFY_ONLY' }); assert.strictEqual(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'), pkg); @@ -264,13 +267,13 @@ test('status starts a detached background check and later prints a rate-limited fs.writeFileSync(path.join(dir, 'pnpm-lock.yaml'), 'lockfileVersion: 9\n'); const changelog = path.join(home, 'CHANGELOG.md'); fs.writeFileSync(changelog, [ - '# Changelog', '', '## 2.99.0', '', '### Faster tiered runs (#33)', '- detail', '', - '## 2.50.0', '', '### Combined verify command', '- detail', '', '## 1.0.0', '', '### Old stuff', '' + '# Changelog', '', `## ${NEXT}`, '', '### Faster tiered runs (#33)', '- detail', '', + `## ${MID}`, '', '### Combined verify command', '- detail', '', '## 1.0.0', '', '### Old stuff', '' ].join('\n')); const live = { ...env, AEL_ALLOW_AUTO_UPDATE_IN_TESTS: '1', - AEL_UPDATE_DIST_TAGS: '{"latest":"2.99.0"}', + AEL_UPDATE_DIST_TAGS: `{"latest":"${NEXT}"}`, AEL_INSTALL_SCOPE: 'project', AEL_UPDATE_CHANGELOG_FILE: changelog, AEL_FORCE_UPDATE_NOTICE: '1' @@ -294,18 +297,18 @@ test('status starts a detached background check and later prints a rate-limited assert.doesNotMatch(cli(dir, noTty, 'status').stderr, /available/); const second = cli(dir, live, 'status'); - assert.match(second.stderr, /ai-engineering-loop \d+\.\d+\.\d+ -> 2\.99\.0 available \(minor\)/); + assert.match(second.stderr, new RegExp(`ai-engineering-loop \\d+\\.\\d+\\.\\d+ -> ${NEXT.replace(/\./g, '\\.')} available \\(minor\\)`)); assert.match(second.stderr, /• Faster tiered runs/); assert.match(second.stderr, /• Combined verify command/); assert.doesNotMatch(second.stderr, /Old stuff/); - assert.match(second.stderr, /Update: +pnpm add -D ai-engineering-loop@2\.99\.0/); + assert.match(second.stderr, new RegExp(`Update: +pnpm add -D ai-engineering-loop@${NEXT.replace(/\./g, '\\.')}`)); assert.match(second.stderr, /Silence: AEL_NO_UPDATE_NOTICE=1/); // Once per day per project. assert.doesNotMatch(cli(dir, live, 'status').stderr, /available/); const other = project(home); - assert.match(cli(other, live, 'status').stderr, /Update: +npm install -D ai-engineering-loop@2\.99\.0/); + assert.match(cli(other, live, 'status').stderr, new RegExp(`Update: +npm install -D ai-engineering-loop@${NEXT.replace(/\./g, '\\.')}`)); // Package files never change: notify-only. - assert.doesNotMatch(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'), /2\.99\.0/); + assert.doesNotMatch(fs.readFileSync(path.join(dir, 'package.json'), 'utf8'), new RegExp(NEXT.replace(/\./g, '\\.'))); }); test('update notice: package manager detection, highlights, global and major wording', () => { diff --git a/tests/studio-server.test.js b/tests/studio-server.test.js index 73a27a2..675170d 100644 --- a/tests/studio-server.test.js +++ b/tests/studio-server.test.js @@ -439,7 +439,7 @@ test('SSE sends projects on connect and again within pollMs after a fixture Run }); }); -test('with 25 fixture projects one poll completes under 500 ms', async () => { +test('with 25 fixture projects one poll completes under 500 ms (1500 ms on Windows)', async () => { const { home, roots } = fixture({ projects: 25 }); roots.forEach((root, index) => drafted(root, `run-${index}`)); await withStudio({ home }, async ({ base }) => { @@ -448,7 +448,8 @@ test('with 25 fixture projects one poll completes under 500 ms', async () => { const response = await api(base, '/api/projects'); const elapsedMs = Number(process.hrtime.bigint() - started) / 1e6; assert.equal((await response.json()).projects.length, 25); - assert.ok(elapsedMs < 500, `poll took ${elapsedMs} ms`); + const budgetMs = process.platform === 'win32' ? 1500 : 500; + assert.ok(elapsedMs < budgetMs, `poll took ${elapsedMs} ms`); }); });