jupyter lab server with jupyter-server-nbmodel extension needs "code" field (otherwise logs ValueError: code None must be a string) and also expects cell details nested under "metadata":
github.com/datalayer/jupyter-server-nbmodel@8bf649c71a/jupyter_server_nbmodel/handlers.py (L49-L58)
With these changes, jpterm --experimental works with it.
- I also had to follow https://codeberg.org/davidbrochart/jpterm/src/branch/main/docs/usage/CLI.md and disable ALL of token,password,xsrf.
For most purposes, jpterm worked for me with auth if I include the?token=...in the --server value — but not with --experimental 🤷
But will this break jupyverse? I don't have jupyverse working now, but its code destructures .../execute request into:
class Execution(BaseModel):
document_id: str
cell_id: str
and looks itself for the code:
content = {"code": str(ycell["source"]), "silent": False}
which is all consistent with existing jpterm code.
So I don't think you want to just merge this, I suppose the two servers better agree on /execute interface...