The editor (sca edit) and an agent can now work on the same notebook without overwriting each other.
Before, the editor held the open notebook in memory and rewrote the file on each edit, so a change
an agent saved was overwritten by the editor's next save and never shown. Now the file is watched:
a saved change is compared with the editor's cells and applied cell by cell. Changed cells are
updated and run again, added or removed cells appear or go away, and the page does not reload or
flicker. A change to the setup cell or an @app.function cell restarts the kernel instead; a file
that does not parse is ignored until the next save that does.
If a cell was edited in both places, the file's version is kept and the text you had not saved goes to the log at the bottom. Notebooks added to or removed from the workspace appear in the list by themselves.
sca cell ls [--code] # numbered cells with status, errors and output
sca cell get 3
echo 'L = 90' | sca cell put 3 # replace a cell's code and run it
sca cell insert --after 3 -f new.py
sca cell rm 4
sca cell run [CELL ...]
sca new bracket --kind part # a new notebook, listed by the running editorThese go through the running editor, found by <workspace>/.sca-editor/server.json: the page shows
the change live and each write prints the touched cell's status, errors and output. With no editor
running, or another notebook open, ls and get read the file and the write commands refuse: edit
the file directly then.
The skill (editor-collaboration) and landing.md now tell agents to work this way.
See the changelog for the complete list.