hypernote 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. hypernote-0.1.0/.github/workflows/release.yml +80 -0
  2. hypernote-0.1.0/.gitignore +20 -0
  3. hypernote-0.1.0/AGENTS.md +134 -0
  4. hypernote-0.1.0/CHANGELOG.md +29 -0
  5. hypernote-0.1.0/CLAUDE.md +1 -0
  6. hypernote-0.1.0/PKG-INFO +79 -0
  7. hypernote-0.1.0/README.md +55 -0
  8. hypernote-0.1.0/SKILL.md +51 -0
  9. hypernote-0.1.0/dev/README.md +23 -0
  10. hypernote-0.1.0/dev/current-architecture.md +30 -0
  11. hypernote-0.1.0/dev/module-map.md +27 -0
  12. hypernote-0.1.0/dev/testing-and-verification.md +30 -0
  13. hypernote-0.1.0/docs/README.md +15 -0
  14. hypernote-0.1.0/docs/browser-regression-spec.md +209 -0
  15. hypernote-0.1.0/docs/cli.md +62 -0
  16. hypernote-0.1.0/docs/getting-started.md +44 -0
  17. hypernote-0.1.0/docs/runtime-model.md +39 -0
  18. hypernote-0.1.0/docs/sdk.md +82 -0
  19. hypernote-0.1.0/hypernote/__init__.py +58 -0
  20. hypernote-0.1.0/hypernote/actor_ledger.py +371 -0
  21. hypernote-0.1.0/hypernote/cli/__init__.py +0 -0
  22. hypernote-0.1.0/hypernote/cli/main.py +1342 -0
  23. hypernote-0.1.0/hypernote/errors.py +27 -0
  24. hypernote-0.1.0/hypernote/execution_orchestrator.py +623 -0
  25. hypernote-0.1.0/hypernote/runtime_manager.py +351 -0
  26. hypernote-0.1.0/hypernote/sdk.py +975 -0
  27. hypernote-0.1.0/hypernote/server/__init__.py +0 -0
  28. hypernote-0.1.0/hypernote/server/extension.py +156 -0
  29. hypernote-0.1.0/hypernote/server/handlers.py +379 -0
  30. hypernote-0.1.0/pyproject.toml +51 -0
  31. hypernote-0.1.0/tests/__init__.py +0 -0
  32. hypernote-0.1.0/tests/conftest.py +112 -0
  33. hypernote-0.1.0/tests/helpers.py +174 -0
  34. hypernote-0.1.0/tests/test_actor_ledger.py +164 -0
  35. hypernote-0.1.0/tests/test_browser_regression.py +207 -0
  36. hypernote-0.1.0/tests/test_cli.py +530 -0
  37. hypernote-0.1.0/tests/test_live_server.py +204 -0
  38. hypernote-0.1.0/tests/test_runtime_manager.py +167 -0
  39. hypernote-0.1.0/tests/test_sdk.py +375 -0
  40. hypernote-0.1.0/uv.lock +2191 -0
@@ -0,0 +1,80 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ build-package:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: astral-sh/setup-uv@v6
18
+
19
+ - name: Verify tag matches package version
20
+ run: |
21
+ python - <<'PY'
22
+ import os
23
+ import tomllib
24
+ from pathlib import Path
25
+
26
+ version = tomllib.loads(Path("pyproject.toml").read_text())["project"]["version"]
27
+ tag = os.environ["GITHUB_REF_NAME"]
28
+ expected = f"v{version}"
29
+ if tag != expected:
30
+ raise SystemExit(f"Tag {tag!r} does not match package version {expected!r}")
31
+ print(f"Releasing hypernote {version}")
32
+ PY
33
+
34
+ - run: uv build
35
+
36
+ - uses: actions/upload-artifact@v4
37
+ with:
38
+ name: python-dist
39
+ path: dist/
40
+
41
+ test:
42
+ runs-on: ubuntu-latest
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+
46
+ - uses: astral-sh/setup-uv@v6
47
+
48
+ - run: uv run --extra dev playwright install --with-deps chromium
49
+
50
+ - run: uv run --extra dev python -m pytest -q
51
+
52
+ release:
53
+ needs: [build-package, test]
54
+ runs-on: ubuntu-latest
55
+ steps:
56
+ - uses: actions/download-artifact@v4
57
+ with:
58
+ name: python-dist
59
+ path: artifacts/
60
+
61
+ - uses: softprops/action-gh-release@v2
62
+ with:
63
+ generate_release_notes: true
64
+ files: artifacts/*
65
+
66
+ publish-pypi:
67
+ needs: [release]
68
+ runs-on: ubuntu-latest
69
+ steps:
70
+ - uses: actions/download-artifact@v4
71
+ with:
72
+ name: python-dist
73
+ path: dist/
74
+
75
+ - uses: astral-sh/setup-uv@v6
76
+
77
+ - name: Publish to PyPI
78
+ env:
79
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
80
+ run: uv publish
@@ -0,0 +1,20 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ *.egg
9
+ .venv/
10
+ .env
11
+ *.db
12
+ *.db-shm
13
+ *.db-wal
14
+ .ipynb_checkpoints/
15
+ node_modules/
16
+ lib/
17
+ *.tsbuildinfo
18
+ .jupyter/
19
+ .agent-repl/
20
+ tmp/
@@ -0,0 +1,134 @@
1
+ # Hypernote
2
+
3
+ Notebook-first execution system built on top of Jupyter shared documents
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ uv run hypernote --help
9
+ uv run hypernote create tmp/demo.ipynb
10
+ uv run hypernote ix tmp/demo.ipynb -s 'value = 20 + 22\nprint(value)'
11
+ uv run hypernote status tmp/demo.ipynb --full
12
+ uv run python -m pytest -q
13
+ uv run ruff check hypernote tests
14
+ ```
15
+
16
+ ## Architecture
17
+
18
+ Jupyter owns notebook truth:
19
+
20
+ - `.ipynb` persistence
21
+ - shared YDoc document state
22
+ - kernel and session primitives
23
+ - notebook rendering in JupyterLab
24
+
25
+ Hypernote owns a thin control plane:
26
+
27
+ - public SDK in [hypernote/sdk.py](/Users/giladrubin/python_workspace/hypernote/hypernote/sdk.py)
28
+ - public errors in [hypernote/errors.py](/Users/giladrubin/python_workspace/hypernote/hypernote/errors.py)
29
+ - agent-first CLI in [hypernote/cli/main.py](/Users/giladrubin/python_workspace/hypernote/hypernote/cli/main.py)
30
+ - execution orchestration and shared-document mutation in [hypernote/execution_orchestrator.py](/Users/giladrubin/python_workspace/hypernote/hypernote/execution_orchestrator.py)
31
+ - runtime ownership in [hypernote/runtime_manager.py](/Users/giladrubin/python_workspace/hypernote/hypernote/runtime_manager.py)
32
+ - HTTP handlers in [hypernote/server/handlers.py](/Users/giladrubin/python_workspace/hypernote/hypernote/server/handlers.py)
33
+ - Jupyter extension wiring in [hypernote/server/extension.py](/Users/giladrubin/python_workspace/hypernote/hypernote/server/extension.py)
34
+ - ephemeral job and attribution ledger in [hypernote/actor_ledger.py](/Users/giladrubin/python_workspace/hypernote/hypernote/actor_ledger.py)
35
+
36
+ Core rule: notebook edits and execution must operate on one logical document truth whether JupyterLab is closed, already open, or opened mid-run.
37
+
38
+ Lifecycle rule: notebook contents and outputs persist through Jupyter's `.ipynb` model, but Hypernote's runtime state, job records, and cell attribution are intentionally in-memory and notebook-scoped.
39
+
40
+ ## Shipped Surface
41
+
42
+ ### SDK
43
+
44
+ - `hypernote.connect(path, create=False)`
45
+ - `Notebook`, `CellCollection`, `CellHandle`, `Runtime`, `Job`
46
+ - `nb.run(...)`, `nb.run_all()`, `nb.restart()`, `nb.interrupt()`
47
+ - `nb.snapshot()`, `nb.status()`, `nb.diff(...)`
48
+
49
+ ### CLI
50
+
51
+ - `create`
52
+ - `ix`
53
+ - `exec`
54
+ - `edit`
55
+ - `run-all`
56
+ - `restart`
57
+ - `restart-run-all`
58
+ - `interrupt`
59
+ - `status`
60
+ - `diff`
61
+ - `cat`
62
+ - `job ...`
63
+ - `runtime ...`
64
+ - `setup doctor`
65
+
66
+ Default CLI contract:
67
+
68
+ - TTY: concise human-readable progress
69
+ - non-TTY: one compact final JSON result
70
+ - explicit streaming only through `--watch` or `--stream-json`
71
+
72
+ ## Rules
73
+
74
+ - Terminology: when the user says "our system", treat that as the maintained project-operating surface, including `AGENTS.md`, `SKILL.md`, `docs/`, `dev/`, tests, and other shared guidance or verification artifacts around the code.
75
+ - SDK first. CLI behavior should come from the SDK, not duplicate raw HTTP semantics.
76
+ - One truth. Do not reintroduce a contents-vs-YDoc split for notebook reads or writes.
77
+ - Keep control-plane state ephemeral. Do not add durable job history unless the product explicitly needs it.
78
+ - Our system is part of done. After every meaningful change, update the relevant parts of `AGENTS.md`, `SKILL.md`, `docs/`, `dev/`, tests, and adjacent shared project guidance so they stay in sync with implementation.
79
+ - Keep adapters thin. CLI, JupyterLab, and tests should reuse shared contracts instead of re-encoding notebook behavior.
80
+ - Prefer unique notebook paths in tests and demos. Browser tests must also use unique JupyterLab workspace URLs.
81
+ - Keep `tmp/` disposable. Durable notes belong in `docs/` or `dev/`, not `tmp/`.
82
+
83
+ ## Read These First
84
+
85
+ - [SKILL.md](/Users/giladrubin/python_workspace/hypernote/SKILL.md)
86
+ - [docs/README.md](/Users/giladrubin/python_workspace/hypernote/docs/README.md)
87
+ - [dev/README.md](/Users/giladrubin/python_workspace/hypernote/dev/README.md)
88
+
89
+ ## If You Are Editing...
90
+
91
+ ### `hypernote/sdk.py` or `hypernote/errors.py`
92
+
93
+ - preserve the notebook-first public object model
94
+ - keep public enums and errors stable
95
+ - update [docs/sdk.md](/Users/giladrubin/python_workspace/hypernote/docs/sdk.md)
96
+
97
+ ### `hypernote/cli/main.py`
98
+
99
+ - keep non-TTY output compact by default
100
+ - preserve `ix` as the happy-path command
101
+ - keep streaming explicit in non-TTY mode
102
+ - update [docs/cli.md](/Users/giladrubin/python_workspace/hypernote/docs/cli.md)
103
+
104
+ ### `hypernote/execution_orchestrator.py`, `hypernote/runtime_manager.py`, or `hypernote/server/*`
105
+
106
+ - preserve the single-truth shared-document path
107
+ - verify open-tab and late-open behavior still hold
108
+ - update [dev/current-architecture.md](/Users/giladrubin/python_workspace/hypernote/dev/current-architecture.md)
109
+ - if browser-visible behavior changes, update [docs/browser-regression-spec.md](/Users/giladrubin/python_workspace/hypernote/docs/browser-regression-spec.md)
110
+
111
+ ### `tests/*`
112
+
113
+ - prefer the narrowest test that proves the behavior
114
+ - preserve coverage for:
115
+ - SDK shape
116
+ - CLI output contract
117
+ - live server behavior
118
+ - browser regression for streaming and late-open correctness
119
+
120
+ ## Verification
121
+
122
+ Minimum checks for most changes:
123
+
124
+ ```bash
125
+ uv run ruff check hypernote tests
126
+ uv run python -m pytest -q
127
+ ```
128
+
129
+ When browser or live-server behavior changes, also use:
130
+
131
+ ```bash
132
+ HYPERNOTE_INTEGRATION=1 uv run python -m pytest -q tests/test_live_server.py
133
+ uv run python -m pytest -q tests/test_browser_regression.py
134
+ ```
@@ -0,0 +1,29 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## 0.1.0 - 2026-04-02
6
+
7
+ Initial public release.
8
+
9
+ ### Added
10
+
11
+ - notebook-first Python SDK built around `Notebook`, `CellCollection`, `CellHandle`, `Runtime`, and `Job`
12
+ - agent-first CLI with `create`, `ix`, `exec`, `edit`, `run-all`, `restart`, `interrupt`, `status`, `diff`, `cat`, `job`, and `runtime` flows
13
+ - Jupyter server extension with narrow Hypernote REST handlers
14
+ - notebook-scoped runtime lifecycle with attach, detach, recovery, stop, and GC
15
+ - headless execution flow over Jupyter shared documents and `jupyter-server-nbmodel`
16
+ - job polling and `input()` round-trip support for long-running or interactive execution
17
+ - live-server and browser regression tests for late-open, persistence, and shared-document correctness
18
+ - project and developer docs for the runtime model, SDK, CLI, and release workflow
19
+
20
+ ### Changed
21
+
22
+ - aligned the control plane around an explicitly ephemeral lifecycle
23
+ - moved job tracking and cell attribution to an in-memory notebook-scoped ledger
24
+ - removed the SQLite dependency and any implied durable job history
25
+
26
+ ### Notes
27
+
28
+ - Jupyter owns durable notebook contents and outputs in `.ipynb`
29
+ - Hypernote owns ephemeral runtime state, jobs, and attribution
@@ -0,0 +1 @@
1
+ AGENTS.md
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: hypernote
3
+ Version: 0.1.0
4
+ Summary: Thin control plane for Jupyter notebook execution with jobs, attribution, and runtime lifecycle
5
+ Project-URL: Homepage, https://github.com/gilad-rubin/hypernote
6
+ Project-URL: Repository, https://github.com/gilad-rubin/hypernote
7
+ Project-URL: Issues, https://github.com/gilad-rubin/hypernote/issues
8
+ Requires-Python: >=3.11
9
+ Requires-Dist: click>=8.0
10
+ Requires-Dist: httpx>=0.27
11
+ Requires-Dist: jupyter-collaboration>=3.0
12
+ Requires-Dist: jupyter-server-nbmodel>=0.1
13
+ Requires-Dist: jupyter-server>=2.0
14
+ Requires-Dist: jupyter-ydoc>=2.0
15
+ Requires-Dist: pycrdt-websocket>=0.15
16
+ Requires-Dist: pycrdt>=0.12
17
+ Provides-Extra: dev
18
+ Requires-Dist: playwright>=1.40; extra == 'dev'
19
+ Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
20
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
21
+ Requires-Dist: pytest>=8.0; extra == 'dev'
22
+ Requires-Dist: ruff>=0.8; extra == 'dev'
23
+ Description-Content-Type: text/markdown
24
+
25
+ # Hypernote
26
+
27
+ - **Notebook-first** - Hypernote is a thin execution control plane on top of Jupyter shared documents.
28
+ - **One notebook truth** - notebook edits, execution, and late-open JupyterLab views all operate on the same logical document.
29
+ - **Agent-first surface** - the Python SDK is primary, and the CLI is a thin shell over it.
30
+ - **Ephemeral control plane** - Jupyter owns durable `.ipynb` contents and outputs; Hypernote owns in-memory runtimes, jobs, and attribution.
31
+
32
+ ## What it ships
33
+
34
+ - notebook-first SDK in `hypernote/sdk.py`
35
+ - agent-first CLI in `hypernote/cli/main.py`
36
+ - Jupyter server extension for execution and runtime control
37
+ - notebook-scoped runtime lifecycle with attach, detach, recovery, and stop
38
+ - job polling and `input()` round-trips for headless execution
39
+ - live-server and browser regression coverage for shared-document behavior
40
+
41
+ ## Quick start
42
+
43
+ ```bash
44
+ uv sync --all-extras
45
+ uv run hypernote --help
46
+ uv run hypernote create tmp/demo.ipynb
47
+ uv run hypernote ix tmp/demo.ipynb -s 'value = 20 + 22\nprint(value)'
48
+ uv run hypernote status tmp/demo.ipynb --full
49
+ ```
50
+
51
+ ## Mental model
52
+
53
+ Jupyter owns:
54
+
55
+ - notebook persistence
56
+ - shared YDoc document state
57
+ - kernel and session primitives
58
+ - notebook rendering in JupyterLab
59
+
60
+ Hypernote owns:
61
+
62
+ - runtime lifecycle around a notebook
63
+ - job coordination and stdin round-trips
64
+ - actor attribution
65
+ - SDK, CLI, and thin REST handlers
66
+
67
+ ## Documentation
68
+
69
+ - [Getting Started](/Users/giladrubin/python_workspace/hypernote/docs/getting-started.md)
70
+ - [CLI Reference](/Users/giladrubin/python_workspace/hypernote/docs/cli.md)
71
+ - [SDK Reference](/Users/giladrubin/python_workspace/hypernote/docs/sdk.md)
72
+ - [Runtime Model](/Users/giladrubin/python_workspace/hypernote/docs/runtime-model.md)
73
+
74
+ ## Verification
75
+
76
+ ```bash
77
+ uv run ruff check hypernote tests
78
+ uv run python -m pytest -q
79
+ ```
@@ -0,0 +1,55 @@
1
+ # Hypernote
2
+
3
+ - **Notebook-first** - Hypernote is a thin execution control plane on top of Jupyter shared documents.
4
+ - **One notebook truth** - notebook edits, execution, and late-open JupyterLab views all operate on the same logical document.
5
+ - **Agent-first surface** - the Python SDK is primary, and the CLI is a thin shell over it.
6
+ - **Ephemeral control plane** - Jupyter owns durable `.ipynb` contents and outputs; Hypernote owns in-memory runtimes, jobs, and attribution.
7
+
8
+ ## What it ships
9
+
10
+ - notebook-first SDK in `hypernote/sdk.py`
11
+ - agent-first CLI in `hypernote/cli/main.py`
12
+ - Jupyter server extension for execution and runtime control
13
+ - notebook-scoped runtime lifecycle with attach, detach, recovery, and stop
14
+ - job polling and `input()` round-trips for headless execution
15
+ - live-server and browser regression coverage for shared-document behavior
16
+
17
+ ## Quick start
18
+
19
+ ```bash
20
+ uv sync --all-extras
21
+ uv run hypernote --help
22
+ uv run hypernote create tmp/demo.ipynb
23
+ uv run hypernote ix tmp/demo.ipynb -s 'value = 20 + 22\nprint(value)'
24
+ uv run hypernote status tmp/demo.ipynb --full
25
+ ```
26
+
27
+ ## Mental model
28
+
29
+ Jupyter owns:
30
+
31
+ - notebook persistence
32
+ - shared YDoc document state
33
+ - kernel and session primitives
34
+ - notebook rendering in JupyterLab
35
+
36
+ Hypernote owns:
37
+
38
+ - runtime lifecycle around a notebook
39
+ - job coordination and stdin round-trips
40
+ - actor attribution
41
+ - SDK, CLI, and thin REST handlers
42
+
43
+ ## Documentation
44
+
45
+ - [Getting Started](/Users/giladrubin/python_workspace/hypernote/docs/getting-started.md)
46
+ - [CLI Reference](/Users/giladrubin/python_workspace/hypernote/docs/cli.md)
47
+ - [SDK Reference](/Users/giladrubin/python_workspace/hypernote/docs/sdk.md)
48
+ - [Runtime Model](/Users/giladrubin/python_workspace/hypernote/docs/runtime-model.md)
49
+
50
+ ## Verification
51
+
52
+ ```bash
53
+ uv run ruff check hypernote tests
54
+ uv run python -m pytest -q
55
+ ```
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: hypernote
3
+ description: Work against Hypernote's notebook-first SDK and agent-first CLI. Use this when an agent needs to create notebooks, insert or edit cells, run code headlessly, inspect notebook status or diffs, or verify JupyterLab attach/streaming behavior.
4
+ ---
5
+
6
+ # hypernote
7
+
8
+ `hypernote` is the notebook runtime surface. The SDK is the core API. The CLI is a thin shell over that SDK.
9
+
10
+ Run `uv run hypernote --help` for the current command list, and `uv run hypernote <command> --help` for exact syntax.
11
+
12
+ ## Quick Start
13
+
14
+ ```bash
15
+ uv run hypernote create tmp/demo.ipynb
16
+ uv run hypernote ix tmp/demo.ipynb -s 'value = 20 + 22\nprint(value)'
17
+ uv run hypernote status tmp/demo.ipynb --full
18
+ ```
19
+
20
+ ## Use This Surface
21
+
22
+ - `ix` — insert a new cell and run it; this is the default happy path
23
+ - `exec` — run existing cell ids only
24
+ - `edit` — mutate notebook cells without executing
25
+ - `run-all` / `restart` / `restart-run-all` — notebook-wide control
26
+ - `status` / `diff` — observe current notebook state and changes
27
+ - `cat` — inspect cells and outputs directly
28
+
29
+ ## Best Practices
30
+
31
+ 1. Prefer `ix` over separate insert + execute steps.
32
+ 2. Prefer the SDK and CLI over raw HTTP unless you are explicitly working on server routes.
33
+ 3. Treat Jupyter shared documents as the source of truth. Open or closed JupyterLab tabs must not change correctness.
34
+ 4. For agents, prefer default non-TTY JSON output unless you intentionally want background streaming.
35
+ 5. Use `--stream-json` only when you plan to watch the process; otherwise it wastes context.
36
+ 6. Use unique notebook paths in tests and demos.
37
+ 7. Move durable notes into `docs/` or `dev/`; keep `tmp/` disposable.
38
+ 8. Treat Hypernote jobs, runtime state, and cell attribution as ephemeral coordination state, not durable history.
39
+
40
+ ## Before You Change Behavior
41
+
42
+ 1. Read [AGENTS.md](/Users/giladrubin/python_workspace/hypernote/AGENTS.md).
43
+ 2. Check the current public surface in [docs/cli.md](/Users/giladrubin/python_workspace/hypernote/docs/cli.md) and [docs/sdk.md](/Users/giladrubin/python_workspace/hypernote/docs/sdk.md).
44
+ 3. If browser-visible execution behavior changes, check [docs/browser-regression-spec.md](/Users/giladrubin/python_workspace/hypernote/docs/browser-regression-spec.md).
45
+
46
+ ## Verification
47
+
48
+ ```bash
49
+ uv run ruff check hypernote tests
50
+ uv run python -m pytest -q
51
+ ```
@@ -0,0 +1,23 @@
1
+ # Development Docs
2
+
3
+ This folder is internal reference for the shipped Hypernote architecture.
4
+
5
+ Public workflow docs live in `docs/`. This folder is for implementation-facing notes only.
6
+
7
+ Read these first:
8
+
9
+ - [Current Architecture](/Users/giladrubin/python_workspace/hypernote/dev/current-architecture.md)
10
+ - [Module Map](/Users/giladrubin/python_workspace/hypernote/dev/module-map.md)
11
+ - [Testing and Verification](/Users/giladrubin/python_workspace/hypernote/dev/testing-and-verification.md)
12
+
13
+ Release path:
14
+
15
+ - pushing a tag like `v0.1.0` runs [release.yml](/Users/giladrubin/python_workspace/hypernote/.github/workflows/release.yml)
16
+ - the workflow verifies the tag matches `pyproject.toml`, builds `dist/`, creates a GitHub release, and publishes to PyPI as `hypernote`
17
+ - PyPI auth comes from the GitHub Actions secret `PYPI_API_TOKEN`
18
+
19
+ Rules:
20
+
21
+ - keep this folder small
22
+ - document shipped behavior, not aspirational redesigns
23
+ - when behavior changes, update `AGENTS.md`, `SKILL.md`, `docs/`, and `dev/` together
@@ -0,0 +1,30 @@
1
+ # Current Architecture
2
+
3
+ Hypernote is a notebook-first layer over Jupyter shared documents.
4
+
5
+ ## Topology
6
+
7
+ ```text
8
+ Agent or Human
9
+
10
+ CLI / SDK / JupyterLab
11
+
12
+ Hypernote HTTP handlers + execution orchestration
13
+
14
+ Jupyter shared document + kernel/session primitives
15
+ ```
16
+
17
+ ## Current design
18
+
19
+ - The SDK is the public semantic center.
20
+ - The CLI is a thin shell over the SDK.
21
+ - Notebook reads and writes must go through the shared-document path.
22
+ - Execution must resolve cell source from the same document model the UI sees.
23
+ - JupyterLab is an optional viewer/actor, not a second source of truth.
24
+
25
+ ## Important consequences
26
+
27
+ - a newly inserted cell must be immediately executable
28
+ - open-tab and closed-tab behavior must match
29
+ - opening a notebook mid-run must show prior output and continue streaming
30
+ - persisted `.ipynb` output must converge with the live shared document
@@ -0,0 +1,27 @@
1
+ # Module Map
2
+
3
+ ## Python package
4
+
5
+ - [hypernote/sdk.py](/Users/giladrubin/python_workspace/hypernote/hypernote/sdk.py)
6
+ - public notebook-first SDK
7
+ - [hypernote/errors.py](/Users/giladrubin/python_workspace/hypernote/hypernote/errors.py)
8
+ - public exceptions
9
+ - [hypernote/cli/main.py](/Users/giladrubin/python_workspace/hypernote/hypernote/cli/main.py)
10
+ - agent-first CLI over the SDK
11
+ - [hypernote/execution_orchestrator.py](/Users/giladrubin/python_workspace/hypernote/hypernote/execution_orchestrator.py)
12
+ - shared-document access, job orchestration, execution integration
13
+ - [hypernote/runtime_manager.py](/Users/giladrubin/python_workspace/hypernote/hypernote/runtime_manager.py)
14
+ - notebook runtime lifecycle and room state
15
+ - [hypernote/server/handlers.py](/Users/giladrubin/python_workspace/hypernote/hypernote/server/handlers.py)
16
+ - HTTP handlers
17
+ - [hypernote/server/extension.py](/Users/giladrubin/python_workspace/hypernote/hypernote/server/extension.py)
18
+ - Jupyter server extension wiring
19
+ - [hypernote/actor_ledger.py](/Users/giladrubin/python_workspace/hypernote/hypernote/actor_ledger.py)
20
+ - actor attribution
21
+
22
+ ## Release automation
23
+
24
+ - [.github/workflows/release.yml](/Users/giladrubin/python_workspace/hypernote/.github/workflows/release.yml)
25
+ - tag-driven build, GitHub release, and PyPI publish workflow for the `hypernote` package
26
+
27
+ There is no separate JupyterLab-side package that owns notebook semantics. JupyterLab is treated as an external notebook surface attached to the same shared-document and execution path.
@@ -0,0 +1,30 @@
1
+ # Testing and Verification
2
+
3
+ ## Fast checks
4
+
5
+ ```bash
6
+ uv run ruff check hypernote tests
7
+ uv run python -m pytest -q
8
+ ```
9
+
10
+ ## Test layers
11
+
12
+ - unit and contract tests
13
+ - SDK shape
14
+ - CLI output contract
15
+ - runtime and attribution helpers
16
+ - live integration tests
17
+ - server-backed notebook creation, execution, persistence, and diff behavior
18
+ - browser regression tests
19
+ - open-tab cell appearance
20
+ - streaming output while running
21
+ - late-open visibility of already-produced output
22
+
23
+ ## Rules
24
+
25
+ - use unique notebook paths per test
26
+ - browser tests should also use unique JupyterLab workspace URLs
27
+ - assert semantic progress, not fragile timestamps
28
+ - when browser-visible execution behavior changes, verify both:
29
+ - job state
30
+ - rendered notebook state
@@ -0,0 +1,15 @@
1
+ # Hypernote Docs
2
+
3
+ Hypernote is a notebook-first execution layer on top of Jupyter shared documents.
4
+
5
+ Jupyter owns durable notebook contents and outputs. Hypernote owns an ephemeral control plane for runtimes, jobs, and attribution.
6
+
7
+ Start here:
8
+
9
+ - [Getting Started](/Users/giladrubin/python_workspace/hypernote/docs/getting-started.md)
10
+ - [CLI Reference](/Users/giladrubin/python_workspace/hypernote/docs/cli.md)
11
+ - [SDK Reference](/Users/giladrubin/python_workspace/hypernote/docs/sdk.md)
12
+ - [Runtime Model](/Users/giladrubin/python_workspace/hypernote/docs/runtime-model.md)
13
+ - [Browser Regression Spec](/Users/giladrubin/python_workspace/hypernote/docs/browser-regression-spec.md)
14
+
15
+ Public docs should describe shipped behavior only. Internal implementation notes belong in `dev/`.