Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docs/wiki/Engine-Contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The practice log (v0.18.0) is also service state, in `practice.json`: `GET /api/

## HTTP

GET /api/health. GET /api/boards => board summaries. POST /api/boards {title} => state. GET /api/boards/{id} => state. POST /api/boards/{id}/commands {command, expected_revision?} => state; the optional nonnegative integer is compared under the store lock, and a mismatch returns 409 with unchanged state, disk and history. POST /api/boards/{id}/undo and /redo => state. DELETE /api/boards/{id}. POST /api/boards/{id}/duplicate. POST /api/assets multipart file => {id,url,width,height,name,mime,size}. GET /api/assets/{asset_id} bytes. GET /api/boards/{id}/items/{item_id}/sample?u=&v= => source-pixel result; finite normalized coordinates must be within 0..1, and sampling adds no revision/history. POST /api/import multipart file supports portable .formref zip or .istack JSON and maps into a new board. GET /api/boards/{id}/export?format=portable|json|png|svg|markdown returns a downloadable file. GET /api/boards/{id}/events SSE sends revision events from HTTP/MCP mutations. Static frontend production is served at /. GET and PUT /api/session {open, active} store the open board tabs. GET and PUT /api/preferences {keys: {command_id: [combo]}} store shortcut overrides (at most 4 combos per command, combos like mod+shift+k). DELETE /api/boards/{id} moves the board to the trash. GET /api/trash?board_id= lists {boards, items}; POST /api/trash/boards/{id}/restore and DELETE /api/trash/boards/{id}; POST /api/trash/items/{board_id}/{entry_id}/restore returns state (one undo step) and DELETE removes the entry; DELETE /api/trash empties everything. POST /api/boards/{id}/items/{item}/comments {text, author?} adds a comment (author defaults to Agent when X-FormRef-Client is sent, otherwise You); POST .../comments/{comment}/resolve {resolved} and DELETE .../comments/{comment}; each is one guarded update and returns state. GET /api/templates lists built-in and saved templates; POST /api/templates {board_id, title, description?, replace_id?} saves one, or with the id of a saved template overwrites that template (a built-in or unknown id is refused); POST /api/templates/{id}/use {title?} returns the new board's state; DELETE /api/templates/{id} removes a saved template. POST /api/demos/{demo}/open imports a demo board that ships with the built window as a new board and returns its state, putting the demo's shipped 256 px previews into the preview cache; it answers 404 when the service has no built window, and the window then sends the file itself through /api/import. POST /api/capture {url} fetches a public http or https address (each hop is resolved once and the connection goes to that checked address, with the original Host and TLS server name, so a changing DNS answer cannot redirect it; each redirect hop is re-checked; loopback, private, link-local and reserved addresses are refused unless FORMREF_CAPTURE_ALLOW_PRIVATE=1) and returns {asset, url} for an image or other file, or {page, images} with up to 60 image addresses found in img, srcset, og:image and image_src. GET /api/agent/runners, GET and POST /api/agent/settings, POST /api/agent/turns {board_id, message, runner} streams start, text, tool, tool_result, error and done events; POST /api/agent/turns/{id}/stop and /undo. A mutating request carrying X-FormRef-Client is refused with 403 outside_agents_off unless it carries a live turn token or outside agents are allowed; the board's SSE stream then sends a consent event. During a panel turn, a remove command, a board DELETE, or a transform, pack, sort, distribute, align, snap or normalize over 10 or more ids waits for the person: the turn stream sends confirm {id, summary, seconds}, POST /api/agent/confirm/{id} {allow, whole_turn} answers it, and a decline or five minutes without an answer returns 403 declined with nothing changed. The agent setting confirm_changes (default true) turns this off. The PNG export also returns X-FormRef-Left and X-FormRef-Top, the world origin of the picture. API errors have a detail string. All writes auto-persist atomically. API origin is loopback; assets use registered identifiers, never arbitrary filesystem paths.
GET /api/health. GET /api/notices => the full third-party licence texts as text/plain (404 when the build has no THIRD-PARTY-NOTICES.txt). GET /api/boards => board summaries. POST /api/boards {title} => state. GET /api/boards/{id} => state. POST /api/boards/{id}/commands {command, expected_revision?} => state; the optional nonnegative integer is compared under the store lock, and a mismatch returns 409 with unchanged state, disk and history. POST /api/boards/{id}/undo and /redo => state. DELETE /api/boards/{id}. POST /api/boards/{id}/duplicate. POST /api/assets multipart file => {id,url,width,height,name,mime,size}. GET /api/assets/{asset_id} bytes. GET /api/boards/{id}/items/{item_id}/sample?u=&v= => source-pixel result; finite normalized coordinates must be within 0..1, and sampling adds no revision/history. POST /api/import multipart file supports portable .formref zip or .istack JSON and maps into a new board. GET /api/boards/{id}/export?format=portable|json|png|svg|markdown returns a downloadable file. GET /api/boards/{id}/events SSE sends revision events from HTTP/MCP mutations. Static frontend production is served at /. GET and PUT /api/session {open, active} store the open board tabs. GET and PUT /api/preferences {keys: {command_id: [combo]}} store shortcut overrides (at most 4 combos per command, combos like mod+shift+k). DELETE /api/boards/{id} moves the board to the trash. GET /api/trash?board_id= lists {boards, items}; POST /api/trash/boards/{id}/restore and DELETE /api/trash/boards/{id}; POST /api/trash/items/{board_id}/{entry_id}/restore returns state (one undo step) and DELETE removes the entry; DELETE /api/trash empties everything. POST /api/boards/{id}/items/{item}/comments {text, author?} adds a comment (author defaults to Agent when X-FormRef-Client is sent, otherwise You); POST .../comments/{comment}/resolve {resolved} and DELETE .../comments/{comment}; each is one guarded update and returns state. GET /api/templates lists built-in and saved templates; POST /api/templates {board_id, title, description?, replace_id?} saves one, or with the id of a saved template overwrites that template (a built-in or unknown id is refused); POST /api/templates/{id}/use {title?} returns the new board's state; DELETE /api/templates/{id} removes a saved template. POST /api/demos/{demo}/open imports a demo board that ships with the built window as a new board and returns its state, putting the demo's shipped 256 px previews into the preview cache; it answers 404 when the service has no built window, and the window then sends the file itself through /api/import. POST /api/capture {url} fetches a public http or https address (each hop is resolved once and the connection goes to that checked address, with the original Host and TLS server name, so a changing DNS answer cannot redirect it; each redirect hop is re-checked; loopback, private, link-local and reserved addresses are refused unless FORMREF_CAPTURE_ALLOW_PRIVATE=1) and returns {asset, url} for an image or other file, or {page, images} with up to 60 image addresses found in img, srcset, og:image and image_src. GET /api/agent/runners, GET and POST /api/agent/settings, POST /api/agent/turns {board_id, message, runner} streams start, text, tool, tool_result, error and done events; POST /api/agent/turns/{id}/stop and /undo. A mutating request carrying X-FormRef-Client is refused with 403 outside_agents_off unless it carries a live turn token or outside agents are allowed; the board's SSE stream then sends a consent event. During a panel turn, a remove command, a board DELETE, or a transform, pack, sort, distribute, align, snap or normalize over 10 or more ids waits for the person: the turn stream sends confirm {id, summary, seconds}, POST /api/agent/confirm/{id} {allow, whole_turn} answers it, and a decline or five minutes without an answer returns 403 declined with nothing changed. The agent setting confirm_changes (default true) turns this off. The PNG export also returns X-FormRef-Left and X-FormRef-Top, the world origin of the picture. API errors have a detail string. All writes auto-persist atomically. API origin is loopback; assets use registered identifiers, never arbitrary filesystem paths.

## Frontend

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
- name: Family layers, MCP, terminal socket, boards, iStack and the clipper
working-directory: backend
run: python -m pytest tests -q -p no:cacheprovider
- name: Third-party notices cover what ships
run: python setup/notices.py --check

window:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ The boards' other content (notes, tables, swatches, shapes) is own work, Apache-

## License texts and lockfiles

`licenses/third-party/` retains installed dependency license texts and a package metadata inventory. Frontend and Rust lockfiles identify exact transitive versions. Native core notices live under `native/licenses/`.
`THIRD-PARTY-NOTICES.txt` at the repository root holds the full licence texts (copyright lines, conditions and disclaimers) of everything the app ships: the Python runtime, every Python package frozen into the engine on macOS, Linux and Windows and the PyInstaller bootloader, the JavaScript packages built into the window (production dependencies only), every Rust crate the desktop shell and the board engine compile from (a crate that publishes no licence file is listed with its SPDX licence and repository and says so), and the model weights FormRef bundles or downloads. The desktop bundle carries it beside `LICENSE` and `NOTICE.md`, the frozen engine carries it too, and Settings > About shows it from `/api/notices`. `python setup/notices.py` writes it (`--wheels` reads packages only another platform installs from downloaded wheels) and `python setup/notices.py --check` fails in CI when something ships without a notice. This file stays the human list.

`licenses/third-party/` retains an earlier copy of installed dependency license texts and a package metadata inventory. Frontend and Rust lockfiles identify exact transitive versions. Native core notices live under `native/licenses/`.

## Font notices

Expand Down
Loading
Loading