diff --git a/CHANGELOG.md b/CHANGELOG.md index 501811a..a9d3079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## v0.9.0 · 2026-11-20 + +The Windows engine opens no console window, the app waits a shorter time for its engine, and the terminal panel's guide names all four agent programs. + +- **No console window on Windows:** the Windows engine is now built without a console window of its own. A build made with `FORMEXT_ENGINE_WINDOWED=0` keeps the console. macOS and Linux are unchanged. +- **Behaves differently:** the app now waits at most 90 seconds for its engine to come up, instead of 120, and then shows the dialog that says why. +- **Fixed on macOS:** an engine that was left behind and had just been ended could still be taken for running, and the next start was refused with "could not stop an engine that was left running". It now counts as gone. +- **The guide in the terminal panel:** when Claude Code is installed, the guide now also says that Codex, Cursor and Antigravity each get a button of their own when they are on this computer. The manual names all four programs where it says which of the Studio's own tabs are not asked. +- Checked here: on Linux, the Windows build script with stand-ins (the console switch on by default and off with `0`, never on Linux), the engine's self check with no output streams, the shell's start-up functions with the 90 second wait in a scratch build, the macOS fix with the Linux process folder hidden, the tests in `tests/` (41, none of which can start a real agent program), the agents check, the engine's self check, the hosts check and the frontend build as the repository's own checks run them. +- Not verified yet: anything on Windows or macOS. The desktop shell was not compiled on the build machine, so the release build is its first compile. No real agent program was run. + ## v0.8.0 · 2026-11-19 form.ext starts and stops cleanly beside its engine, on Windows too, and a start that fails says why. diff --git a/README.md b/README.md index 73ef5aa..def8b5d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@

- version 0.8.0 + version 0.9.0 Python FastAPI engine TypeScript Tauri 2 diff --git a/backend/HASHOUT_LOG.md b/backend/HASHOUT_LOG.md index d9ade57..6d2ce1d 100644 --- a/backend/HASHOUT_LOG.md +++ b/backend/HASHOUT_LOG.md @@ -2,6 +2,22 @@ The living log of the form.ext engine. Read it before editing `backend/`. Core files belong to the engine module; module routers and services (`routers/.py`, `services/.py`) keep their own notes in their own HASHOUT logs. +## v0.9.0: the Windows engine is packaged without a console window {#windowed} + +- refers-to: ../setup/freeze_backend; formext_engine.py; ../src-tauri/HASHOUT_LOG.md#address-wait +- The owner's decision for the family: a Windows engine has no console window of its own, as FormWeb's has today. `setup/freeze_backend` gives PyInstaller `--noconsole` on Windows unless `FORMEXT_ENGINE_WINDOWED=0`; on macOS and Linux nothing changes and the variable is not read. The name follows the script's other variables (`FORMEXT_TARGET`). The shell already starts the engine with `CREATE_NO_WINDOW` and reads its standard output through a pipe. +- A windowed engine starts with `sys.stdout` and `sys.stderr` as None when no one hands it streams. The entry already puts the null device in their place (wave 4), so `--selfcheck` and the other modes that print still finish; the self check at the end of the freeze is judged by its exit code only. +- Seen on Linux: the script run with a stand-in Python and a stand-in `uname` that answers `MINGW64_NT-10.0`: Windows unset and `=1` give PyInstaller 43 arguments with one `--noconsole`, `=0` gives 42 and none; Linux gives 42 and none in all three. `bash -n` passes. `formext_engine.py --selfcheck >&- 2>&-` exits 0. +- Not run: no Windows build has shown it, and that the windowed engine's address line still reaches the shell through the pipe is for a Windows machine to show. + +## v0.9.0: an engine that has ended but was not yet collected counts as gone on macOS {#ended-not-collected} + +- refers-to: app/services/startup.py; ../tests/test_startup.py +- What was seen, in FormCut: the macOS job of its pull request failed with "could not stop an engine that was left running". `end` had ended the holder, but `gone_by` kept seeing it. `_alive_posix` asks `kill(pid, 0)`, which still answers for a process that has ended and that its parent has not collected, and it tells such a process apart only by reading `/proc`, which macOS does not have. form.ext carries the same file, so the same start would be refused here when the leftover engine's own parent is alive and slow to collect it. +- The change, as FormCut made it: `finished(pid)` asks `ps -o stat= -p ` where there is no `/proc` (never on Windows, never on Linux) and answers true for a state that starts with `Z`. `gone_by` stops waiting when the process is not alive or is finished. `alive` is unchanged, so the two second watch on the app starts no program. +- Seen on Linux with `PROC` pointed at a folder that does not exist: with `finished` answering false, `claim` on a lock whose holder is a child of the caller and whose shell has gone waited ten seconds and raised "formext could not stop an engine that was left running on [folder]"; with the change the same `claim` returns the holder's process id in under five seconds. Test after: `test_a_holder_that_has_ended_and_was_not_collected_counts_as_gone_where_there_is_no_proc` in tests/test_startup.py (12 in the file now). +- Not run on macOS. + ## v0.8.0: the engine starts and stops cleanly beside its app, on Windows too {#windows-start} - refers-to: app/services/startup.py; app/services/runtime.py; formext_engine.py; ../tests/test_startup.py; ../src-tauri/HASHOUT_LOG.md#windows-start diff --git a/backend/app/__init__.py b/backend/app/__init__.py index 777f190..3e2f46a 100644 --- a/backend/app/__init__.py +++ b/backend/app/__init__.py @@ -1 +1 @@ -__version__ = "0.8.0" +__version__ = "0.9.0" diff --git a/backend/app/services/startup.py b/backend/app/services/startup.py index ba2423f..ccf860c 100644 --- a/backend/app/services/startup.py +++ b/backend/app/services/startup.py @@ -194,9 +194,26 @@ def same(pid: int, born: float) -> bool: return alive(pid) and (not born or (seen > 0 and abs(seen - born) <= SLACK)) +def finished(pid: int) -> bool: + if WINDOWS or os.path.isdir(PROC): + return False + try: + told = subprocess.run( + ["ps", "-o", "stat=", "-p", str(pid)], + stdin=subprocess.DEVNULL, + capture_output=True, + text=True, + timeout=END_WAIT, + check=False, + ) + except (OSError, subprocess.SubprocessError): + return False + return told.stdout.strip().startswith("Z") + + def gone_by(pid: int, seconds: float) -> bool: until = time.monotonic() + seconds - while alive(pid): + while alive(pid) and not finished(pid): if time.monotonic() >= until: return False time.sleep(STEP) diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 1096269..fff697e 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -269,7 +269,7 @@ The desktop app's frozen engine takes the same commands (`formext-engine cli ... ## Settings and the data folder -Settings (`settings.json` in the data folder, read and changed through the engine's `/api/settings`) hold the theme, your author name, the default publisher key, the default licence, the default app for New, FormPortal's folder, the editor's font size, tab size and wrapping, the Preview's theme and consent defaults, and the registry: `registry.url` (the index address), `registry.checkout` (a local clone for Submit to Registry's checks) and `registry.developer` (read an index without a trusted key; for development only). The outside-agents choice (`agent_access`, in Preferences under Developer, Outside agents) is Ask by default, Allowed or Blocked: it decides whether Claude Code, Codex, Cursor, Antigravity, any other MCP client and `./formext cli` may change anything, and only the form.ext window can change it (an agent, the command line or an edit of the file cannot; a hand edit puts it back to Ask). The Studio's own Claude Code and Chat tabs are not asked under Ask; Blocked stops their changes too. The host source settings (`sources.auto`, `sources.base`, `sources.local.[key]`) are described under [Host sources](#host-sources). +Settings (`settings.json` in the data folder, read and changed through the engine's `/api/settings`) hold the theme, your author name, the default publisher key, the default licence, the default app for New, FormPortal's folder, the editor's font size, tab size and wrapping, the Preview's theme and consent defaults, and the registry: `registry.url` (the index address), `registry.checkout` (a local clone for Submit to Registry's checks) and `registry.developer` (read an index without a trusted key; for development only). The outside-agents choice (`agent_access`, in Preferences under Developer, Outside agents) is Ask by default, Allowed or Blocked: it decides whether Claude Code, Codex, Cursor, Antigravity, any other MCP client and `./formext cli` may change anything, and only the form.ext window can change it (an agent, the command line or an edit of the file cannot; a hand edit puts it back to Ask). The Studio's own Claude Code, Codex, Cursor, Antigravity and Chat tabs are not asked under Ask; Blocked stops their changes too. The host source settings (`sources.auto`, `sources.base`, `sources.local.[key]`) are described under [Host sources](#host-sources). form.ext keeps its projects and everything it makes in its data folder: `FORMEXT_HOME` when set, otherwise the OS app-data folder `ai.nodemode.formext` (macOS Application Support, Windows `%APPDATA%`, Linux `~/.local/share`). diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md index 4212373..da5dd67 100644 --- a/frontend/HASHOUT_LOG.md +++ b/frontend/HASHOUT_LOG.md @@ -2,8 +2,8 @@ Living log for the interface: the shell, the shared styles and the build files. Source files stay comment-free; what they would have said lives here. Each pane keeps its own `src/panes//HASHOUT_LOG.md`. -Current build version: v0.8.0 -Last updated: 2026-11-19 · v0.8.0 the version only. Before: v0.7.0 the shared panel at module 2.2.0 and Antigravity as the fourth agent tab (#panel-four). Before: v0.6.0 the Form family's shared terminal panel and its question for outside agents (#family-panel). Before: v0.5.0 the window key, the question for outside agents and AMOLED Black (#window-key, #agent-consent, #amoled). Before: v0.4.1 the demo's `engine/kit.ts` refuses an `entry.ui` ending in `/` (`demo/HASHOUT_LOG.md`). Before: v0.4.0 the host source row in the Studio and Open pull request in Publish (`panes/studio/HASHOUT_LOG.md#source`, `panes/publish/HASHOUT_LOG.md#pull-request`). Before: v0.3.1 the version only. Before: v0.3.0 the demo opens in the app (#in-app-demo). Before: v0.2.1 the README's screenshots and the community files +Current build version: v0.9.0 +Last updated: 2026-11-20 · v0.9.0 the shared panel at module 2.2.1 (#panel-221). Before: v0.8.0 the version only. Before: v0.7.0 the shared panel at module 2.2.0 and Antigravity as the fourth agent tab (#panel-four). Before: v0.6.0 the Form family's shared terminal panel and its question for outside agents (#family-panel). Before: v0.5.0 the window key, the question for outside agents and AMOLED Black (#window-key, #agent-consent, #amoled). Before: v0.4.1 the demo's `engine/kit.ts` refuses an `entry.ui` ending in `/` (`demo/HASHOUT_LOG.md`). Before: v0.4.0 the host source row in the Studio and Open pull request in Publish (`panes/studio/HASHOUT_LOG.md#source`, `panes/publish/HASHOUT_LOG.md#pull-request`). Before: v0.3.1 the version only. Before: v0.3.0 the demo opens in the app (#in-app-demo). Before: v0.2.1 the README's screenshots and the community files --- @@ -173,6 +173,14 @@ Sockets: the terminal stream and the Chat stream send `windowHello()` (`{"type": Checked in headless Chrome against Vite and a running engine: the page boots (Home), claims the key once, `PUT /api/settings` and a terminal from the page succeed with the header, the terminal socket echoes a command after the hello, a reload writes with the stored key and claims nothing, and after the engine restarts the first write is refused, reclaimed and retried. Not checked: the packaged window (no shell build here). +## The shared panel at module 2.2.1 {#panel-221} + +- refers-to: src/dock/ · ../setup/agents.py · ../tests/test_dock_module.py · ../docs/MANUAL.md +- kind: decision +- logged: v0.9.0 · 2026-11-20 + +`src/dock/` is module 2.2.1, every file of the folder copied unchanged from FormVis commit 23b01889 (`git show` per file, `MANIFEST.json` included); three files differ from 2.2.0: `strings.ts` (the guide's `tourInstalledBody` and `tourReadyBody` now end with "Codex, Cursor and Antigravity each get a button of their own here when they are on this computer."), `CONTRACT.md` and `MANIFEST.json`. `setup/agents.py` `DOCK_VERSION` says 2.2.1. The adapter needed no change. form.ext carries no translations of the panel's sentences, so there was nothing to translate. The manual's sentence about the Studio's own tabs under Ask now names all four programs, as the Preferences note already did. There is no Preferences field for where Claude Code is (the four programs are found by the shared finder, with `FORMEXT_CLAUDE_BIN`, `FORMEXT_CODEX_BIN`, `FORMEXT_CURSOR_BIN` and `FORMEXT_ANTIGRAVITY_BIN` already alike), so no program path was added. + ## The shared panel at module 2.2.0, and Antigravity as the fourth agent tab {#panel-four} - refers-to: src/dock/ · src/dock-adapter.ts · ../setup/agents.py · ../agents/manifest.json · ../tests/test_dock_module.py · ../backend/HASHOUT_LOG.md#antigravity-tab diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 5a16457..8f03f49 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "formext", - "version": "0.8.0", + "version": "0.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "formext", - "version": "0.8.0", + "version": "0.9.0", "license": "GPL-3.0-only", "dependencies": { "@codemirror/autocomplete": "6.20.4", diff --git a/frontend/package.json b/frontend/package.json index ecacdd7..94f9fef 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "formext", "private": true, - "version": "0.8.0", + "version": "0.9.0", "description": "form.ext: the Form family's extension studio", "license": "GPL-3.0-only", "type": "module", diff --git a/frontend/src/demo/engine/router.ts b/frontend/src/demo/engine/router.ts index b9f54ac..d038c46 100644 --- a/frontend/src/demo/engine/router.ts +++ b/frontend/src/demo/engine/router.ts @@ -76,7 +76,7 @@ function decodeFiles(rawFiles: Json): Record { return out; } -on('GET', '/api/health', () => ({ ok: true, app: 'formext', version: '0.8.0 in this page', api: '1', pid: 0, python: null, frozen: false, home: DATA, contract: 'bundled', uptime: Math.round(performance.now() / 100) / 10, live_clients: 0, routers: ['health', 'settings', 'projects', 'live', 'library', 'package', 'preview', 'publish', 'runapp', 'templates', 'validate'], router_errors: {}, frontend: 'demo', demo: true })); +on('GET', '/api/health', () => ({ ok: true, app: 'formext', version: '0.9.0 in this page', api: '1', pid: 0, python: null, frozen: false, home: DATA, contract: 'bundled', uptime: Math.round(performance.now() / 100) / 10, live_clients: 0, routers: ['health', 'settings', 'projects', 'live', 'library', 'package', 'preview', 'publish', 'runapp', 'templates', 'validate'], router_errors: {}, frontend: 'demo', demo: true })); on('GET', '/api/settings', () => ({ ...settings.get(), home: DATA })); on('PUT', '/api/settings', (_m, r) => { const patch = { ...json(r) }; diff --git a/frontend/src/dock/CONTRACT.md b/frontend/src/dock/CONTRACT.md index a52a17e..81f3a05 100644 --- a/frontend/src/dock/CONTRACT.md +++ b/frontend/src/dock/CONTRACT.md @@ -1,6 +1,6 @@ # The dock's engine contract -Module version 2.2.0. This file travels with the shared dock folder and is the same in every app. +Module version 2.2.1. This file travels with the shared dock folder and is the same in every app. The dock's frontend never talks to an engine. It calls the functions of `DockAdapter` (adapter.ts), and each app's adapter turns them into its engine's routes, sockets or event streams. This file says what an engine has to provide so that an adapter can deliver each function, in words that do not depend on the engine's language. Paths, header names and transports are each app's own. Where a clause says "the adapter", the engine may do the work instead; where it says "the engine", the adapter cannot make it up. @@ -68,6 +68,10 @@ An adapter written for 2.1.0 compiles and behaves as before: copying the 2.2.0 f - **Part names.** Every control of the module carries `data-dock-part`; the attribute and the names are `DOCK_PUBLIC.partAttribute`, `parts` and `partsByKind` (`launch.[kind]`, `menu.launch.[kind]`, `tab.[kind]`). Automation and command layers use these and no class name. - **A status line for a tab.** A terminal record may carry `status`, and a channel may give `onStatus(handler)` and call the handler with new text ("reconnecting", an exit code). The text of the tab in front shows in the head between the tabs and the buttons, clipped; an empty string clears it. +## Module 2.2.1 + +The guide's two sentences for a computer that has Claude Code (`tourInstalledBody` and `tourReadyBody`) now end by naming the other three programs: "Codex, Cursor and Antigravity each get a button of their own here when they are on this computer." Nothing else in the folder changed, and an adapter written for 2.2.0 needs no change; an app that translates the module's sentences translates these two again. + ## The manifest `MANIFEST.json` in this folder lists the module version and the SHA-256 of every other file here, this one included. The source app (FormVis) writes it; every other app only checks it: read the file names and hashes from the manifest, hash each file's bytes, and fail naming any file that differs, is missing or is extra. The check is small enough to write in any language an app's tools use. diff --git a/frontend/src/dock/MANIFEST.json b/frontend/src/dock/MANIFEST.json index 819f4ea..c2ee1fa 100644 --- a/frontend/src/dock/MANIFEST.json +++ b/frontend/src/dock/MANIFEST.json @@ -1,8 +1,8 @@ { "module": "dock", - "version": "2.2.0", + "version": "2.2.1", "files": { - "CONTRACT.md": "ccef67fcf0017569c0bf68df0eae2e1e3ddf376117ac929789b803713c427df6", + "CONTRACT.md": "9791fa9d5eb7ef7e09543d34c2d097cfe6559b7fa1792f251afb9abfa7ac0bd7", "adapter.ts": "1128c16892424485fe68bb2bf92ebc7229a9c2ff749db2fcd2419662d9c3ada9", "agents.ts": "db666d1042555f8bbda4a697dbfc475df23779d0c5a25abd532bcfa43ae81043", "chat.ts": "994878030b9fbff729734d34e2baa5b018e7d0b8555c24bfb7c98962c50446fa", @@ -14,7 +14,7 @@ "keys.ts": "1adfc7daefa35b0e6eb8957250dca3926ded1c59fd51db7d60da6346caf0d561", "placement.ts": "0f7e03ef0b720af07995111f30dcb5ed124529d44cf5cb67ae4bfb1f96c7f880", "state.ts": "bef508e8343737f67adfbd7ae8cb8efb446968dfd4e7e0aff37da11f996955d7", - "strings.ts": "19a6a32f235b61dfed6179e2271a6d599f4357c9a6b9c09118bb65990d1e114f", + "strings.ts": "3654a59c4d005125e248dd322f467d4ad3c513f4fd86f6dfe76f5565408ac50e", "terminal.ts": "8bf886a7ad4dc69323e803acc13641a66e1d8614e9b85a6a60977fa30d8a56fc", "tour.ts": "2f83994051f4370c5d1630a827b4539eb12fd50e7fe9531f5641a4bf75615782" } diff --git a/frontend/src/dock/strings.ts b/frontend/src/dock/strings.ts index 1aae816..ec8296c 100644 --- a/frontend/src/dock/strings.ts +++ b/frontend/src/dock/strings.ts @@ -84,13 +84,13 @@ export const STRINGS = { tourChatTitle: 'Ask for something in plain words', tourChatBody: 'Type what you want in this line, for example "{example}", and press Enter. Claude does it in {app}.', tourInstalledTitle: 'Claude Code is installed', - tourInstalledBody: 'Claude Code is installed. The robot button here opens it; the first time, it may ask you to sign in.', + tourInstalledBody: 'Claude Code is installed. The robot button here opens it; the first time, it may ask you to sign in. Codex, Cursor and Antigravity each get a button of their own here when they are on this computer.', tourMissingTitle: 'Claude Code is not on this computer yet', tourMissingBody: 'For the bigger jobs, {app} uses a free program called Claude Code. To add it, copy the line below, open your computer\'s command window, paste it and press Enter.', tourSignInTitle: 'Sign in to Claude Code once', tourSignInBody: 'Claude Code is installed but not signed in. Press the robot button here: a window opens where you type /login and follow the steps. You only do this once.', tourReadyTitle: 'Claude Code is ready', - tourReadyBody: 'Claude Code is installed and signed in. The robot button here opens it when you want it to take on a bigger job.', + tourReadyBody: 'Claude Code is installed and signed in. The robot button here opens it when you want it to take on a bigger job. Codex, Cursor and Antigravity each get a button of their own here when they are on this computer.', tourAskTitle: 'You decide what other programs may change', tourAskBody: 'If another AI program on this computer wants to change your {noun}, {app} asks you first in a box in the middle of the window. Choose Deny, Allow once or Always allow. You can change your answer later under Outside agents in the menu here.', tourSideTitle: 'Put the panel where you like it', diff --git a/frontend/src/panes/library/HASHOUT_LOG.md b/frontend/src/panes/library/HASHOUT_LOG.md index 3729374..7083ce7 100644 --- a/frontend/src/panes/library/HASHOUT_LOG.md +++ b/frontend/src/panes/library/HASHOUT_LOG.md @@ -2,7 +2,7 @@ Living log of the Library module: `frontend/src/panes/library/`, `backend/app/services/library.py`, `backend/app/services/registry.py`, `backend/app/registry_keys.txt`, `backend/app/routers/library.py`. Source files stay comment-free; what they would have said lives here. -Current build version: v0.8.0 +Current build version: v0.9.0 Last updated: 2026-11-08 · v0.2.0 a part of the Studio --- diff --git a/frontend/src/panes/publish/HASHOUT_LOG.md b/frontend/src/panes/publish/HASHOUT_LOG.md index 336239d..818f25e 100644 --- a/frontend/src/panes/publish/HASHOUT_LOG.md +++ b/frontend/src/panes/publish/HASHOUT_LOG.md @@ -2,8 +2,8 @@ The Publish pane belongs to the ship module, whose living log is `frontend/src/panes/run/HASHOUT_LOG.md` (sections `#publish`, `#registry` and `#panes`, with `backend/app/services/publish.py` and `backend/app/routers/publish.py`). -Current build version: v0.8.0 -Last updated: 2026-11-19 · v0.8.0 the version only. Before: v0.7.0 the version only. Before: v0.6.0 the version only. Before: v0.5.0 the version only. Before: v0.4.1 the version only (two pull requests at once now wait for each other in the engine, `backend/HASHOUT_LOG.md#pr-lock`). Before: v0.4.0 Open pull request (#pull-request). Before: v0.2.0 a sheet of the Studio +Current build version: v0.9.0 +Last updated: 2026-11-20 · v0.9.0 the version only. Before: v0.8.0 the version only. Before: v0.7.0 the version only. Before: v0.6.0 the version only. Before: v0.5.0 the version only. Before: v0.4.1 the version only (two pull requests at once now wait for each other in the engine, `backend/HASHOUT_LOG.md#pr-lock`). Before: v0.4.0 Open pull request (#pull-request). Before: v0.2.0 a sheet of the Studio --- diff --git a/frontend/src/panes/run/HASHOUT_LOG.md b/frontend/src/panes/run/HASHOUT_LOG.md index c86965e..ed14e47 100644 --- a/frontend/src/panes/run/HASHOUT_LOG.md +++ b/frontend/src/panes/run/HASHOUT_LOG.md @@ -2,7 +2,7 @@ Living log of the ship module: the Run in App pane (`frontend/src/panes/run/`), the Publish pane (`frontend/src/panes/publish/`), `backend/app/services/portal.py`, `backend/app/services/publish.py`, `backend/app/routers/runapp.py` and `backend/app/routers/publish.py`. Source files stay comment-free; what they would have said lives here. -Current build version: v0.8.0 +Current build version: v0.9.0 Last updated: 2026-11-08 · v0.2.0 a sheet of the Studio --- diff --git a/frontend/src/panes/studio/HASHOUT_LOG.md b/frontend/src/panes/studio/HASHOUT_LOG.md index 86d7a3d..6023878 100644 --- a/frontend/src/panes/studio/HASHOUT_LOG.md +++ b/frontend/src/panes/studio/HASHOUT_LOG.md @@ -2,7 +2,7 @@ Living log for `frontend/src/panes/studio/` (formerly `edit/`), the Studio module (FX5). Source files stay comment-free; what they would have said lives here. -Current build version: v0.8.0 +Current build version: v0.9.0 ## The Terminal tab holds the family's shared panel {#family-panel} diff --git a/frontend/src/shell/version.ts b/frontend/src/shell/version.ts index ca24a8e..b336f57 100644 --- a/frontend/src/shell/version.ts +++ b/frontend/src/shell/version.ts @@ -1 +1 @@ -export const VERSION = '0.8.0'; +export const VERSION = '0.9.0'; diff --git a/setup/agents.py b/setup/agents.py index a7f9431..8387625 100755 --- a/setup/agents.py +++ b/setup/agents.py @@ -65,7 +65,7 @@ def tools_reference() -> str: REGISTRY_NAME = "form.ext" DOCK = {"present": True, "positions": ["bottom"], "tabs": ["shell", "claude", "codex", "cursor", "antigravity", "chat"]} DOCK_DIR = ROOT / "frontend" / "src" / "dock" -DOCK_VERSION = "2.2.0" +DOCK_VERSION = "2.2.1" MANIFEST = ROOT / "agents" / "manifest.json" LOOKUP = ROOT / "backend" / "app" / "services" / "agent_lookup.py" LOOKUP_HASHES = {"1.0.0": "252ea9bb9419d4990f174f91914f09800497bc69e98f849f5643bbf4217cc3f3", "1.0.1": "62667f9b68b7d101e1896ce617240424e33b7e498c560bc79d45f0ab26c77d51"} diff --git a/setup/freeze_backend b/setup/freeze_backend index 4f2e0ff..11fc8b4 100755 --- a/setup/freeze_backend +++ b/setup/freeze_backend @@ -30,6 +30,8 @@ fi data=(--add-data "$ROOT/frontend/dist${sep}frontend_dist" --add-data "$ROOT/contract${sep}contract" --add-data "$ROOT/backend/app/registry_keys.txt${sep}app") [ -d "$ROOT/templates" ] && data+=(--add-data "$ROOT/templates${sep}templates") [ -d "$ROOT/docs" ] && data+=(--add-data "$ROOT/docs${sep}docs") +extra=() +if [ "$os" = windows ] && [ "${FORMEXT_ENGINE_WINDOWED:-1}" != 0 ]; then extra+=(--noconsole); fi cd "$ROOT/backend" rm -rf build/pyinstaller dist-engine "$py" -m PyInstaller --noconfirm --clean --onefile --name formext-engine \ @@ -40,6 +42,7 @@ rm -rf build/pyinstaller dist-engine --collect-submodules app --collect-submodules uvicorn --collect-submodules websockets \ --collect-submodules keyring --copy-metadata keyring \ --exclude-module tkinter \ + ${extra[@]+"${extra[@]}"} \ "$ROOT/backend/formext_engine.py" mkdir -p "$ROOT/src-tauri/binaries" out="$ROOT/src-tauri/binaries/formext-engine-${triple}${ext}" diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 4a2f87b..7bc8a01 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1077,7 +1077,7 @@ dependencies = [ [[package]] name = "formext" -version = "0.8.0" +version = "0.9.0" dependencies = [ "objc2", "objc2-app-kit", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4a4a155..65f3956 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "formext" -version = "0.8.0" +version = "0.9.0" description = "form.ext desktop shell" authors = ["NodeAgentc, Inc."] license = "GPL-3.0-only" diff --git a/src-tauri/HASHOUT_LOG.md b/src-tauri/HASHOUT_LOG.md index 9e1483d..5ce998d 100644 --- a/src-tauri/HASHOUT_LOG.md +++ b/src-tauri/HASHOUT_LOG.md @@ -2,8 +2,8 @@ Living log for the desktop shell (Tauri 2). Source files stay comment-free; what they would have said lives here. -Current build version: v0.8.0 -Last updated: 2026-11-19 · v0.8.0 a start that fails says why, and the engine ends with the shell on Windows (#windows-start). Before: v0.7.0 the version only. Before: v0.6.0 the version only. Before: v0.5.0 the shell reads the window key from the engine and waits at most 10 seconds for it (#window-key, #key-wait). Before: v0.4.1 the version only. Before: v0.4.0 the version only. Before: v0.3.1 the version only. Before: v0.2.1 the version only. Before: v0.2.0 overlay title bar +Current build version: v0.9.0 +Last updated: 2026-11-20 · v0.9.0 the wait for the engine's address is 90 seconds (#address-wait). Before: v0.8.0 a start that fails says why, and the engine ends with the shell on Windows (#windows-start). Before: v0.7.0 the version only. Before: v0.6.0 the version only. Before: v0.5.0 the shell reads the window key from the engine and waits at most 10 seconds for it (#window-key, #key-wait). Before: v0.4.1 the version only. Before: v0.4.0 the version only. Before: v0.3.1 the version only. Before: v0.2.1 the version only. Before: v0.2.0 overlay title bar --- @@ -105,3 +105,11 @@ Not compiled and not run: the shell itself, on any system (no WebKit libraries h - logged: unreleased The engine's start has no time limit, as on `origin/main`: a first launch of the frozen engine can take well over 10 seconds (cold disk, a virus scan, unpacking), and a limit counted from the spawn would show "failed to start" on a healthy app. An earlier version of this change did exactly that and was corrected. The 10 seconds (the family value) start only when the address line has arrived without a key: then a plain `std::thread` sleeps 10 seconds and an `Arc` decides which side settles first. If the timer wins it takes the existing `engine_failed` path (dialog, the engine stopped, exit 1) and the loop, if the key turns up later, does nothing. If the loop wins it opens the window with the address and the key. An engine that exits before the address, or after it and before the key, takes `engine_failed` at once. The flag makes the failure path run at most once and never after the window opened. The loop now goes on reading after the address until it has the key, so a key line read out of order still counts; this engine prints the key line first and flushes it (seen by running `formext_engine.py` with `FORMEXT_WINDOW_KEY_STDOUT=1`), so normally the key is in hand before the address. Only `std` is used (tokio is not a direct dependency of this crate). Not compiled here: no WebKit libraries; `rustfmt --check` parses the file. The loop was copied into a scratch crate with tokio 1.53.1 (the version in `Cargo.lock`) and fed fake event streams: key then address opens at once; address then nothing fails at 10 s; nothing for 25 s then key and address opens at 25 s; exit before the address fails at once; key 12 s after the address fails at 10 s and does not open. + +## The wait for the address is 90 seconds {#address-wait} + +- refers-to: src/engine_start.rs :: ADDRESS_WAIT; ../backend/HASHOUT_LOG.md#windowed +- kind: decision +- logged: v0.9.0 · 2026-11-20 + +The owner's decision for the family: every shell waits 90 seconds for the engine's address. It was 120 here (#windows-start), 60 in FormTools and 300 in FormVis. The test of the sentence now says "waited 90 seconds". Nothing was measured here that asks for longer: the one-file engine was not frozen or started from a cold disk in this round, so a first start on a slow machine that needs more than 90 seconds is still possible and would show the "waited 90 seconds" dialog. Checked in the scratch crate that includes `engine_start.rs` and `win_job.rs` by path: `cargo check --target x86_64-pc-windows-msvc` finished; the 5 unit tests of the module pass, and of the 5 loop tests cut from `main.rs` the silent engine now runs out at 90.01 seconds. diff --git a/src-tauri/src/engine_start.rs b/src-tauri/src/engine_start.rs index b2db267..6c3c1e3 100644 --- a/src-tauri/src/engine_start.rs +++ b/src-tauri/src/engine_start.rs @@ -4,7 +4,7 @@ use std::time::Duration; pub const APP: &str = "form.ext"; pub const SHELL_ENV: &str = "FORMEXT_SHELL_PID"; -pub const ADDRESS_WAIT: Duration = Duration::from_secs(120); +pub const ADDRESS_WAIT: Duration = Duration::from_secs(90); pub const KEY_WAIT: Duration = Duration::from_secs(10); pub const EXIT_WAIT: Duration = Duration::from_secs(1); pub const EXIT_STEP: Duration = Duration::from_millis(50); @@ -170,7 +170,7 @@ mod tests { #[test] fn a_wait_that_runs_out_says_how_long_and_for_what() { - assert!(sentence(&Failure::TimedOut(Wait::Address)).contains("waited 120 seconds for its engine to say which address it serves on")); + assert!(sentence(&Failure::TimedOut(Wait::Address)).contains("waited 90 seconds for its engine to say which address it serves on")); assert!(sentence(&Failure::TimedOut(Wait::Key)).contains("waited 10 seconds for its engine to hand over the key for the window")); } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 40ba152..5dfb11b 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "https://schema.tauri.app/config/2", "productName": "form.ext", "mainBinaryName": "formext", - "version": "0.8.0", + "version": "0.9.0", "identifier": "ai.nodemode.formext", "build": { "frontendDist": "../frontend/dist", diff --git a/tests/test_startup.py b/tests/test_startup.py index 29de773..0afdcc3 100644 --- a/tests/test_startup.py +++ b/tests/test_startup.py @@ -135,6 +135,24 @@ def test_the_two_ways_of_reading_a_start_time_agree(self): self.assertTrue(first > 0 and abs(first - second) <= self.startup.SLACK) self.assertEqual(self.startup.created(4_000_000), 0.0) + def test_a_holder_that_has_ended_and_was_not_collected_counts_as_gone_where_there_is_no_proc(self): + engine, shell, mine = stand_in(), stand_in(), stand_in() + saved = self.startup.PROC + try: + self.lock.write_text(json.dumps(record(self.startup, engine, shell))) + stop(shell) + self.startup.PROC = str(self.tmp / "no-proc") + self.assertFalse(self.startup.finished(engine.pid)) + began = time.monotonic() + self.assertEqual(self.startup.claim(self.tmp, mine.pid)[1], engine.pid) + self.assertLess(time.monotonic() - began, self.startup.END_WAIT) + self.assertTrue(self.startup.finished(engine.pid)) + self.startup.PROC = saved + self.assertFalse(self.startup.finished(engine.pid)) + finally: + self.startup.PROC = saved + stop(engine, shell, mine) + @unittest.skipUnless(ENGINE, "needs the engine's packages (run with the backend's Python) and a POSIX shell") class Entry(Scratch):