opencode-ipynb 0.1.0

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 (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +336 -0
  3. package/dist/domain/cell.d.ts +50 -0
  4. package/dist/domain/cell.d.ts.map +1 -0
  5. package/dist/domain/errors.d.ts +119 -0
  6. package/dist/domain/errors.d.ts.map +1 -0
  7. package/dist/domain/execution.d.ts +87 -0
  8. package/dist/domain/execution.d.ts.map +1 -0
  9. package/dist/domain/notebook.d.ts +65 -0
  10. package/dist/domain/notebook.d.ts.map +1 -0
  11. package/dist/domain/output.d.ts +50 -0
  12. package/dist/domain/output.d.ts.map +1 -0
  13. package/dist/format/diagnostics.d.ts +15 -0
  14. package/dist/format/diagnostics.d.ts.map +1 -0
  15. package/dist/format/diff.d.ts +20 -0
  16. package/dist/format/diff.d.ts.map +1 -0
  17. package/dist/format/markdown.d.ts +21 -0
  18. package/dist/format/markdown.d.ts.map +1 -0
  19. package/dist/format/outputs.d.ts +21 -0
  20. package/dist/format/outputs.d.ts.map +1 -0
  21. package/dist/index.d.ts +2 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +31862 -0
  24. package/dist/plugin-options.d.ts +13 -0
  25. package/dist/plugin-options.d.ts.map +1 -0
  26. package/dist/plugin.d.ts +4 -0
  27. package/dist/plugin.d.ts.map +1 -0
  28. package/dist/services/DiffService.d.ts +17 -0
  29. package/dist/services/DiffService.d.ts.map +1 -0
  30. package/dist/services/NotebookCleanService.d.ts +34 -0
  31. package/dist/services/NotebookCleanService.d.ts.map +1 -0
  32. package/dist/services/NotebookEditService.d.ts +63 -0
  33. package/dist/services/NotebookEditService.d.ts.map +1 -0
  34. package/dist/services/NotebookExecutionService.d.ts +54 -0
  35. package/dist/services/NotebookExecutionService.d.ts.map +1 -0
  36. package/dist/services/NotebookExportService.d.ts +33 -0
  37. package/dist/services/NotebookExportService.d.ts.map +1 -0
  38. package/dist/services/NotebookFileService.d.ts +18 -0
  39. package/dist/services/NotebookFileService.d.ts.map +1 -0
  40. package/dist/services/NotebookInspectService.d.ts +62 -0
  41. package/dist/services/NotebookInspectService.d.ts.map +1 -0
  42. package/dist/services/NotebookOutputService.d.ts +62 -0
  43. package/dist/services/NotebookOutputService.d.ts.map +1 -0
  44. package/dist/services/NotebookReadService.d.ts +36 -0
  45. package/dist/services/NotebookReadService.d.ts.map +1 -0
  46. package/dist/services/PathService.d.ts +26 -0
  47. package/dist/services/PathService.d.ts.map +1 -0
  48. package/dist/services/PermissionService.d.ts +20 -0
  49. package/dist/services/PermissionService.d.ts.map +1 -0
  50. package/dist/services/PythonService.d.ts +80 -0
  51. package/dist/services/PythonService.d.ts.map +1 -0
  52. package/dist/services/index.d.ts +55 -0
  53. package/dist/services/index.d.ts.map +1 -0
  54. package/dist/tools/_resolveOptions.d.ts +2 -0
  55. package/dist/tools/_resolveOptions.d.ts.map +1 -0
  56. package/dist/tools/cell_delete.d.ts +14 -0
  57. package/dist/tools/cell_delete.d.ts.map +1 -0
  58. package/dist/tools/cell_insert.d.ts +22 -0
  59. package/dist/tools/cell_insert.d.ts.map +1 -0
  60. package/dist/tools/cell_move.d.ts +16 -0
  61. package/dist/tools/cell_move.d.ts.map +1 -0
  62. package/dist/tools/clean.d.ts +22 -0
  63. package/dist/tools/clean.d.ts.map +1 -0
  64. package/dist/tools/doctor.d.ts +12 -0
  65. package/dist/tools/doctor.d.ts.map +1 -0
  66. package/dist/tools/edit.d.ts +22 -0
  67. package/dist/tools/edit.d.ts.map +1 -0
  68. package/dist/tools/export.d.ts +24 -0
  69. package/dist/tools/export.d.ts.map +1 -0
  70. package/dist/tools/inspect.d.ts +20 -0
  71. package/dist/tools/inspect.d.ts.map +1 -0
  72. package/dist/tools/kernel.d.ts +36 -0
  73. package/dist/tools/kernel.d.ts.map +1 -0
  74. package/dist/tools/outputs.d.ts +30 -0
  75. package/dist/tools/outputs.d.ts.map +1 -0
  76. package/dist/tools/read.d.ts +30 -0
  77. package/dist/tools/read.d.ts.map +1 -0
  78. package/dist/tools/repro.d.ts +42 -0
  79. package/dist/tools/repro.d.ts.map +1 -0
  80. package/dist/tools/run.d.ts +35 -0
  81. package/dist/tools/run.d.ts.map +1 -0
  82. package/dist/utils/ansi.d.ts +3 -0
  83. package/dist/utils/ansi.d.ts.map +1 -0
  84. package/dist/utils/attachments.d.ts +11 -0
  85. package/dist/utils/attachments.d.ts.map +1 -0
  86. package/dist/utils/fiber.d.ts +2 -0
  87. package/dist/utils/fiber.d.ts.map +1 -0
  88. package/dist/utils/i18n.d.ts +8 -0
  89. package/dist/utils/i18n.d.ts.map +1 -0
  90. package/dist/utils/imports.d.ts +4 -0
  91. package/dist/utils/imports.d.ts.map +1 -0
  92. package/dist/utils/json.d.ts +5 -0
  93. package/dist/utils/json.d.ts.map +1 -0
  94. package/dist/utils/limits.d.ts +9 -0
  95. package/dist/utils/limits.d.ts.map +1 -0
  96. package/dist/utils/mime.d.ts +4 -0
  97. package/dist/utils/mime.d.ts.map +1 -0
  98. package/dist/utils/paths.d.ts +22 -0
  99. package/dist/utils/paths.d.ts.map +1 -0
  100. package/dist/utils/truncate.d.ts +17 -0
  101. package/dist/utils/truncate.d.ts.map +1 -0
  102. package/package.json +69 -0
  103. package/python/ipynb_runner.py +952 -0
  104. package/python/requirements.txt +30 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 opencode-ipynb contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,336 @@
1
+ # opencode-ipynb
2
+
3
+ A community [OpenCode](https://opencode.ai) plugin that adds robust support for Jupyter Notebook (`.ipynb`) files: inspect, read, edit, run, outputs, clean, export, reproducibility reports, and warm Python kernels.
4
+
5
+ The plugin is **opt-in**, distributed via npm, and does not modify the OpenCode core. It exposes thirteen agent tools that operate on `.ipynb` files with explicit permissions, granular context control, and a strongly-typed [Effect](https://effect.website) runtime internally.
6
+
7
+ > Repository: https://github.com/Restodecoca/opencode-ipynb
8
+ > Issues: https://github.com/Restodecoca/opencode-ipynb/issues
9
+
10
+ ## Why a plugin and not core
11
+
12
+ - Notebooks are large, binary-like artifacts. Dumping them into the agent context burns tokens.
13
+ - Reading outputs and editing cells are high-trust actions that must ask permission every time.
14
+ - The execution flow needs a Python runtime, which is not something every OpenCode user wants installed.
15
+ - A plugin lets the community iterate on these workflows without forcing changes on the OpenCode core.
16
+
17
+ ## Installation
18
+
19
+ After the package is published on npm, add it to your `opencode.json`:
20
+
21
+ ```json
22
+ {
23
+ "$schema": "https://opencode.ai/config.json",
24
+ "plugin": ["opencode-ipynb"]
25
+ }
26
+ ```
27
+
28
+ For local development, point OpenCode at a checkout or built tarball:
29
+
30
+ ```json
31
+ {
32
+ "plugin": ["file:./opencode-ipynb"]
33
+ }
34
+ ```
35
+
36
+ Or run directly from this repo:
37
+
38
+ ```bash
39
+ git clone https://github.com/Restodecoca/opencode-ipynb
40
+ cd opencode-ipynb
41
+ bun install
42
+ bun run build
43
+ ```
44
+
45
+ Then add `"opencode-ipynb"` (or the local path) to your `opencode.json`.
46
+
47
+ ## Tools
48
+
49
+ | Tool | Purpose |
50
+ | -------------------- | ------- |
51
+ | `ipynb_inspect` | Compact summary: kernel/language metadata, cell table, output stats, execution-order warnings, optional missing-package checks. |
52
+ | `ipynb_read` | Granular read of one cell or a range, with optional outputs/errors/metadata/images and truncation limits. |
53
+ | `ipynb_edit` | Safe per-cell source edit with textual diff, output clearing policy, permission gate, and per-file lock. |
54
+ | `ipynb_cell_insert` | Insert a code/markdown/raw cell before or after a target index. |
55
+ | `ipynb_cell_delete` | Delete one cell by index and return a preview of the deleted source. |
56
+ | `ipynb_cell_move` | Move one cell to a new index. |
57
+ | `ipynb_run` | Execute one cell, a range, from a cell, or a full notebook via the Python helper. Supports save-to-notebook and optional warm kernels. |
58
+ | `ipynb_outputs` | List / read / read_error / clear_cell / clear_all outputs with pagination and permission gates for writes. |
59
+ | `ipynb_clean` | Strip outputs, execution counts, widget state, large images, and normalize `source` arrays for Git-friendly diffs. |
60
+ | `ipynb_export` | Export to Markdown, Python, or summary; optionally write to disk after permission. |
61
+ | `ipynb_doctor` | Diagnose Python, helper discovery, and required Jupyter dependencies. |
62
+ | `ipynb_repro` | Reproducibility report: kernel/env info, `pip freeze`, filesystem reads, random seeds, non-determinism, missing packages. |
63
+ | `ipynb_kernel` | Inspect/restart/shutdown warm kernels when `ipynb.warmKernel: true` is enabled. |
64
+
65
+ ### Examples
66
+
67
+ Inspect a notebook before doing anything else:
68
+
69
+ ```text
70
+ ipynb_inspect({ filePath: "notebooks/eda.ipynb" })
71
+ ```
72
+
73
+ Read a single cell:
74
+
75
+ ```text
76
+ ipynb_read({ filePath: "notebooks/eda.ipynb", cellIndex: 7 })
77
+ ```
78
+
79
+ Read a range including outputs:
80
+
81
+ ```text
82
+ ipynb_read({
83
+ filePath: "notebooks/eda.ipynb",
84
+ start: 0,
85
+ end: 5,
86
+ includeOutputs: true,
87
+ maxOutputChars: 4000
88
+ })
89
+ ```
90
+
91
+ Edit one cell, clear outputs automatically:
92
+
93
+ ```text
94
+ ipynb_edit({
95
+ filePath: "notebooks/eda.ipynb",
96
+ cellIndex: 7,
97
+ source: "import pandas as pd\ndf = pd.read_csv('data.csv')\ndf.head()"
98
+ })
99
+ ```
100
+
101
+ Clean for a clean diff before commit:
102
+
103
+ ```text
104
+ ipynb_clean({ filePath: "notebooks/eda.ipynb" })
105
+ ```
106
+
107
+ Export to a Python script next to the notebook:
108
+
109
+ ```text
110
+ ipynb_export({
111
+ filePath: "notebooks/eda.ipynb",
112
+ format: "python",
113
+ outputPath: "notebooks/eda.py"
114
+ })
115
+ ```
116
+
117
+ ## Safety and permissions
118
+
119
+ - Every write (`ipynb_edit`, `ipynb_clean`, `ipynb_outputs clear_*`, `ipynb_export --outputPath`) calls `context.ask` before touching the disk.
120
+ - Every execution (`ipynb_run`) calls `context.ask` with rich metadata: file path, mode (`cell` / `range` / `all` / `from`), cell range, save flag, working directory, timeout.
121
+ - `PathService` rejects paths that resolve outside of the OpenCode worktree. The lock manager serializes per-file writes to prevent accidental corruption.
122
+ - The Python execution helper is an opt-in, isolated subprocess; it does not auto-install Jupyter. The user installs `python/requirements.txt` only when they want real execution.
123
+
124
+ ## Context control
125
+
126
+ Notebooks can be enormous. By default the plugin never dumps a full notebook into context:
127
+
128
+ - `ipynb_inspect` returns a table with the first line of every cell, plus aggregate counts. It never includes the full source.
129
+ - `ipynb_read` defaults to **not** including outputs. Set `includeOutputs: true` to opt in. Images / base64 are always omitted (you only get a size notice).
130
+ - `maxSourceChars` (default 12 000) and `maxOutputChars` (default 6 000) cap the size of any single response.
131
+ - `maxTracebackChars` (default 8 000) caps error tracebacks.
132
+ - Every truncation appends `... (truncated, use maxXxx to increase)`.
133
+
134
+ The relevant constants live in `src/utils/limits.ts`.
135
+
136
+ ## Python execution
137
+
138
+ The plugin **never installs Python dependencies automatically**. Running `ipynb_run` is opt-in and requires a Python environment with `nbformat`, `nbclient`, `jupyter_client`, and `ipykernel`. The plugin only detects what is available and tells you how to fix what is missing.
139
+
140
+ ### Preferred: `uv`
141
+
142
+ ```bash
143
+ uv pip install nbformat nbclient jupyter_client ipykernel
144
+ python -m ipykernel install --user
145
+ ```
146
+
147
+ ### Alternative: pip in a venv
148
+
149
+ ```bash
150
+ python -m venv .venv
151
+ source .venv/bin/activate # Windows: .venv\Scripts\activate
152
+ pip install nbformat nbclient jupyter_client ipykernel
153
+ python -m ipykernel install --user
154
+ ```
155
+
156
+ ### Alternative: conda
157
+
158
+ ```bash
159
+ conda install -c conda-forge nbformat nbclient jupyter_client ipykernel
160
+ ```
161
+
162
+ ### Pointing the plugin at a specific Python
163
+
164
+ OpenCode may use a different Python interpreter than the one in your terminal. Three ways to tell the plugin which one to use, in priority order:
165
+
166
+ 1. Plugin options (in `opencode.json`):
167
+
168
+ ```json
169
+ {
170
+ "plugin": ["opencode-ipynb"],
171
+ "ipynb": {
172
+ "pythonPath": "C:/Users/Gabriel/miniconda3/envs/data/python.exe",
173
+ "preferUv": true,
174
+ "defaultTimeoutMs": 120000,
175
+ "defaultMaxOutputChars": 6000,
176
+ "warmKernel": false,
177
+ "allowOutsideWorktree": false
178
+ }
179
+ }
180
+ ```
181
+
182
+ - `pythonPath` (string): absolute path to a Python interpreter.
183
+ - `preferUv` (boolean, default `true`): the doctor and the Python service prefer `uv pip install` over `pip install` in their suggestions.
184
+ - `defaultTimeoutMs` (number, default `120000`): timeout in milliseconds for `ipynb_run`.
185
+ - `defaultMaxOutputChars` (number, default `6000`): fallback for `ipynb_read` and `ipynb_outputs read` when the user does not pass `maxOutputChars`.
186
+ - `warmKernel` (boolean, default `false`): keep a long-lived Python subprocess per notebook path for faster repeated `ipynb_run mode=all` / `mode=cell` calls. Manage it with `ipynb_kernel`.
187
+ - `allowOutsideWorktree` (boolean, default `false`): power-user escape hatch — when `true`, the plugin will read and write `.ipynb` files outside the OpenCode worktree. Leave at `false` unless you know why you need it.
188
+
189
+ 2. Environment variables (the shell wins over plugin options):
190
+
191
+ ```bash
192
+ OPENCODE_IPYNB_PYTHON=C:/Users/Gabriel/miniconda3/envs/data/python.exe opencode
193
+ OPENCODE_IPYNB_OPTIONS='{"pythonPath":"/usr/bin/python3","defaultMaxOutputChars":4000}' opencode
194
+ ```
195
+
196
+ `OPENCODE_IPYNB_PYTHON` overrides `ipynb.pythonPath` only. `OPENCODE_IPYNB_OPTIONS` overrides the whole `ipynb.*` block (a JSON object validated by the same schema as `opencode.json`). These are both set by the plugin on first load if they are not already set in the environment, so an explicit shell value always wins.
197
+
198
+ 3. PATH fallback: the plugin tries `python`, then `python3`.
199
+
200
+ ### Diagnose first
201
+
202
+ If anything goes wrong, run:
203
+
204
+ ```text
205
+ ipynb_doctor
206
+ ```
207
+
208
+ It reports the selected interpreter, every Jupyter dependency (`[ok]` / `[missing]`), where the helper script was found, and a copy-pasteable install command. It never installs anything.
209
+
210
+ ## Known limitations
211
+
212
+ - Python execution depends on the user's local Python/Jupyter environment. The plugin diagnoses missing packages but never installs them.
213
+ - Warm kernels are intentionally limited to `ipynb_run mode=all` and `mode=cell`; `range`, `from`, and `env` use one-shot helper processes.
214
+ - Large notebooks and rich outputs are truncated in tool responses to protect context. When `ipynb_run save=true`, full nbformat outputs are preserved on disk.
215
+ - `allowOutsideWorktree` is a power-user escape hatch. Keep it disabled unless you explicitly need cross-worktree notebook access.
216
+
217
+ ## Examples
218
+
219
+ Three small, runnable notebooks live under `test/integration/` and double
220
+ as both documentation and a smoke test for the plugin's read / run /
221
+ export loop:
222
+
223
+ - [`test/integration/classification/`](./test/integration/classification/) — `LogisticRegression` on `sklearn.datasets.load_iris` (7 cells, no CSV needed).
224
+ - [`test/integration/timeseries/`](./test/integration/timeseries/) — `numpy` moving average over a noisy sine wave (5 cells, stdlib-friendly).
225
+ - [`test/integration/scraping/`](./test/integration/scraping/) — `urllib.request` + `html.parser` fetch of `https://example.com/` (4 cells, stdlib only, graceful `try/except` on network failure).
226
+
227
+ Each one ships with `outputs: []` and a matching `README.md` that lists
228
+ the exact `ipynb_inspect` / `ipynb_read` / `ipynb_run` calls plus the
229
+ expected output.
230
+
231
+ ## Release
232
+
233
+ The published npm tarball contains only the runtime: `dist/`, `python/ipynb_runner.py`, `python/requirements.txt`, `README.md`, and `LICENSE`. Internal developer docs (`AGENTS.md`, `TODO.md`, the helper's dev scripts, the `.github/` workflows) are excluded from the npm package via `.npmignore`, and `AGENTS.md` / `TODO.md` are also gitignored so they are not versioned in this repository. Contributors track their work through GitHub Issues and Discussions.
234
+
235
+ Cut a release by tagging the commit and pushing the tag, then publish it on GitHub — the workflow runs only on the `published` release event:
236
+
237
+ ```bash
238
+ git tag v0.1.0 && git push --tags
239
+ ```
240
+
241
+ Then create a GitHub release at https://github.com/Restodecoca/opencode-ipynb/releases/new pointing at `v0.1.0`. The CI runs `bun run typecheck`, `bun test`, and `bun run build` before `npm publish --provenance --access public`. The repository must have a single secret configured: `NPM_TOKEN` (an npm automation token with publish rights for the package name in `package.json`).
242
+
243
+ Before publishing, run a local package check:
244
+
245
+ ```bash
246
+ bun run typecheck
247
+ bun test
248
+ bun run build
249
+ npm pack --dry-run
250
+ ```
251
+
252
+ The package name `opencode-ipynb` is currently available on npm. If you publish under a scope instead, update `package.json`, the install snippet, and this release tag convention together.
253
+
254
+ ## Effect LSP setup (for development)
255
+
256
+ This project uses the [Effect Language Service](https://effect.website/docs/getting-started/devtools/) to surface Effect-specific diagnostics at build time and in the editor.
257
+
258
+ The `tsconfig.json` already includes the plugin:
259
+
260
+ ```json
261
+ {
262
+ "compilerOptions": {
263
+ "plugins": [{ "name": "@effect/language-service" }]
264
+ }
265
+ }
266
+ ```
267
+
268
+ ### Build-time diagnostics (optional, opt-in)
269
+
270
+ `effect-language-service patch` modifies the local `node_modules/typescript` so that `tsc --noEmit` reports Effect-specific diagnostics. This is **opt-in** because it mutates your local install.
271
+
272
+ ```bash
273
+ bun run prepare:effect-lsp # alias for: effect-language-service patch
274
+ bun run typecheck # now also catches "Effect must be yielded" and similar
275
+ ```
276
+
277
+ The project does NOT add this as a `prepare` script. Patch only when you want it.
278
+
279
+ ### Editor integration
280
+
281
+ For VS Code, Cursor, Zed or NVim, make sure the editor uses the workspace TypeScript (not the bundled one). In VS Code / Cursor, open a `.ts` file, click the TypeScript version in the status bar, and select **Use Workspace Version**.
282
+
283
+ The OpenCode TypeScript LSP (built-in) also picks up the workspace TypeScript and therefore respects the `@effect/language-service` plugin. A minimal `opencode.json` in the project root enables it:
284
+
285
+ ```json
286
+ {
287
+ "$schema": "https://opencode.ai/config.json",
288
+ "lsp": {
289
+ "typescript": {
290
+ "extensions": [".ts", ".tsx", ".mts", ".cts"]
291
+ }
292
+ }
293
+ }
294
+ ```
295
+
296
+ ## Development
297
+
298
+ ```bash
299
+ bun install
300
+ bun run typecheck
301
+ bun test
302
+ bun run build
303
+ ```
304
+
305
+ Layout:
306
+
307
+ ```
308
+ src/
309
+ index.ts # re-exports the plugin
310
+ plugin.ts # Plugin object, registers all 13 tools
311
+ domain/ # zod schemas + types for cells, outputs, execution
312
+ services/ # Effect-style services (Path, Permission, File, ...)
313
+ format/ # markdown / output / diagnostic / export formatters
314
+ tools/ # one file per tool, thin wrapper over services
315
+ utils/ # limits, paths, mime, truncate, json helpers
316
+ python/
317
+ ipynb_runner.py # JSON-stdin/stdout runner using nbformat + nbclient
318
+ requirements.txt
319
+ test/
320
+ fixtures/ # simple, outputs, error, images
321
+ unit/ # bun:test suites
322
+ ```
323
+
324
+ ## Roadmap
325
+
326
+ See `TODO.md` for the full plan and review-fix history (v0.1 → v1.5). Highlights:
327
+
328
+ - v0.2: polished `ipynb_outputs` UI, full `ipynb_export` polish.
329
+ - v0.3: real `nbclient`-based execution, save outputs, timeout, traceback capture.
330
+ - v0.4: image attachments, reproducibility reports.
331
+ - v1.0: kernel lifecycle management, cross-platform tests, npm publish.
332
+ - v1.1–v1.5: security, Effect, path, packaging, rich-output, and cleanup review fixes.
333
+
334
+ ## License
335
+
336
+ MIT. See `LICENSE`.
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ export declare const SourceSchema: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
3
+ export type Source = z.infer<typeof SourceSchema>;
4
+ export declare const CellMetadataSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5
+ export type CellMetadata = z.infer<typeof CellMetadataSchema>;
6
+ export declare const CodeCellSchema: z.ZodObject<{
7
+ cell_type: z.ZodLiteral<"code">;
8
+ id: z.ZodOptional<z.ZodString>;
9
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
10
+ execution_count: z.ZodUnion<readonly [z.ZodNullable<z.ZodNumber>, z.ZodNull]>;
11
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
12
+ outputs: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
13
+ }, z.core.$loose>;
14
+ export type CodeCellRaw = z.infer<typeof CodeCellSchema>;
15
+ export declare const MarkdownCellSchema: z.ZodObject<{
16
+ cell_type: z.ZodLiteral<"markdown">;
17
+ id: z.ZodOptional<z.ZodString>;
18
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
19
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
20
+ attachments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
21
+ }, z.core.$loose>;
22
+ export type MarkdownCellRaw = z.infer<typeof MarkdownCellSchema>;
23
+ export declare const RawCellSchema: z.ZodObject<{
24
+ cell_type: z.ZodLiteral<"raw">;
25
+ id: z.ZodOptional<z.ZodString>;
26
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
27
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
28
+ }, z.core.$loose>;
29
+ export type RawCellRaw = z.infer<typeof RawCellSchema>;
30
+ export declare const CellSchema: z.ZodUnion<readonly [z.ZodObject<{
31
+ cell_type: z.ZodLiteral<"code">;
32
+ id: z.ZodOptional<z.ZodString>;
33
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
34
+ execution_count: z.ZodUnion<readonly [z.ZodNullable<z.ZodNumber>, z.ZodNull]>;
35
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
36
+ outputs: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
37
+ }, z.core.$loose>, z.ZodObject<{
38
+ cell_type: z.ZodLiteral<"markdown">;
39
+ id: z.ZodOptional<z.ZodString>;
40
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
41
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
42
+ attachments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
43
+ }, z.core.$loose>, z.ZodObject<{
44
+ cell_type: z.ZodLiteral<"raw">;
45
+ id: z.ZodOptional<z.ZodString>;
46
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
47
+ source: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
48
+ }, z.core.$loose>]>;
49
+ export type CellRaw = z.infer<typeof CellSchema>;
50
+ //# sourceMappingURL=cell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../src/domain/cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,YAAY,6DAA6C,CAAA;AACtE,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AAEjD,eAAO,MAAM,kBAAkB,wCAAoC,CAAA;AACnE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,cAAc;;;;;;;iBASX,CAAA;AAChB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAExD,eAAO,MAAM,kBAAkB;;;;;;iBAQf,CAAA;AAChB,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEhE,eAAO,MAAM,aAAa;;;;;iBAOV,CAAA;AAChB,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEtD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;mBAA+D,CAAA;AACtF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA"}
@@ -0,0 +1,119 @@
1
+ import { Effect } from "effect";
2
+ export type NotebookErrorKind = "NotebookNotFound" | "NotebookParse" | "NotebookValidation" | "CellIndexOutOfBounds" | "NotebookWrite" | "NotebookExecution" | "PythonRunner" | "PermissionDenied" | "OutputTooLarge" | "PathOutsideWorktree" | "NotebookNotImplemented" | "NotebookAttachment" | "LockError";
3
+ declare const NotebookNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
4
+ readonly _tag: "NotebookNotFound";
5
+ } & Readonly<A>;
6
+ export declare class NotebookNotFoundError extends NotebookNotFoundError_base<{
7
+ readonly message: string;
8
+ readonly filePath: string;
9
+ }> {
10
+ }
11
+ declare const NotebookParseError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
12
+ readonly _tag: "NotebookParse";
13
+ } & Readonly<A>;
14
+ export declare class NotebookParseError extends NotebookParseError_base<{
15
+ readonly message: string;
16
+ readonly filePath: string;
17
+ }> {
18
+ }
19
+ declare const NotebookValidationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
20
+ readonly _tag: "NotebookValidation";
21
+ } & Readonly<A>;
22
+ export declare class NotebookValidationError extends NotebookValidationError_base<{
23
+ readonly message: string;
24
+ readonly filePath: string;
25
+ readonly issues: ReadonlyArray<string>;
26
+ }> {
27
+ }
28
+ declare const CellIndexOutOfBoundsError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
29
+ readonly _tag: "CellIndexOutOfBounds";
30
+ } & Readonly<A>;
31
+ export declare class CellIndexOutOfBoundsError extends CellIndexOutOfBoundsError_base<{
32
+ readonly message: string;
33
+ readonly filePath: string;
34
+ readonly cellIndex: number;
35
+ readonly total: number;
36
+ }> {
37
+ }
38
+ declare const NotebookWriteError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
39
+ readonly _tag: "NotebookWrite";
40
+ } & Readonly<A>;
41
+ export declare class NotebookWriteError extends NotebookWriteError_base<{
42
+ readonly message: string;
43
+ readonly filePath: string;
44
+ }> {
45
+ }
46
+ declare const NotebookExecutionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
47
+ readonly _tag: "NotebookExecution";
48
+ } & Readonly<A>;
49
+ export declare class NotebookExecutionError extends NotebookExecutionError_base<{
50
+ readonly message: string;
51
+ readonly filePath: string;
52
+ readonly cellIndex: number;
53
+ }> {
54
+ }
55
+ declare const PythonRunnerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
56
+ readonly _tag: "PythonRunner";
57
+ } & Readonly<A>;
58
+ export declare class PythonRunnerError extends PythonRunnerError_base<{
59
+ readonly message: string;
60
+ readonly detail: string;
61
+ }> {
62
+ }
63
+ declare const PermissionDeniedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
64
+ readonly _tag: "PermissionDenied";
65
+ } & Readonly<A>;
66
+ export declare class PermissionDeniedError extends PermissionDeniedError_base<{
67
+ readonly message: string;
68
+ readonly action: string;
69
+ }> {
70
+ }
71
+ declare const OutputTooLargeError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
72
+ readonly _tag: "OutputTooLarge";
73
+ } & Readonly<A>;
74
+ export declare class OutputTooLargeError extends OutputTooLargeError_base<{
75
+ readonly message: string;
76
+ readonly cellIndex: number;
77
+ readonly bytes: number;
78
+ }> {
79
+ }
80
+ declare const PathOutsideWorktreeError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
81
+ readonly _tag: "PathOutsideWorktree";
82
+ } & Readonly<A>;
83
+ export declare class PathOutsideWorktreeError extends PathOutsideWorktreeError_base<{
84
+ readonly message: string;
85
+ readonly filePath: string;
86
+ readonly worktree: string;
87
+ }> {
88
+ }
89
+ declare const NotebookNotImplementedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
90
+ readonly _tag: "NotebookNotImplemented";
91
+ } & Readonly<A>;
92
+ export declare class NotebookNotImplementedError extends NotebookNotImplementedError_base<{
93
+ readonly message: string;
94
+ readonly feature: string;
95
+ }> {
96
+ }
97
+ declare const NotebookAttachmentError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
98
+ readonly _tag: "NotebookAttachment";
99
+ } & Readonly<A>;
100
+ export declare class NotebookAttachmentError extends NotebookAttachmentError_base<{
101
+ readonly message: string;
102
+ readonly mime: string;
103
+ }> {
104
+ }
105
+ declare const LockError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
106
+ readonly _tag: "LockError";
107
+ } & Readonly<A>;
108
+ export declare class LockError extends LockError_base<{
109
+ readonly message: string;
110
+ readonly filePath: string;
111
+ readonly cause: string;
112
+ }> {
113
+ }
114
+ export type NotebookError = NotebookNotFoundError | NotebookParseError | NotebookValidationError | CellIndexOutOfBoundsError | NotebookWriteError | NotebookExecutionError | PythonRunnerError | PermissionDeniedError | OutputTooLargeError | PathOutsideWorktreeError | NotebookNotImplementedError | NotebookAttachmentError | LockError;
115
+ export declare const isNotebookError: (u: unknown) => u is NotebookError;
116
+ export declare const errorToMessage: (e: unknown) => string;
117
+ export declare const failWith: <E extends NotebookError>(e: E) => Effect.Effect<never, E, never>;
118
+ export {};
119
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/domain/errors.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,87 @@
1
+ import { z } from "zod";
2
+ export declare const EnvReportSchema: z.ZodObject<{
3
+ kernelDisplayName: z.ZodNullable<z.ZodString>;
4
+ kernelName: z.ZodNullable<z.ZodString>;
5
+ language: z.ZodNullable<z.ZodString>;
6
+ pythonVersion: z.ZodString;
7
+ pythonExecutable: z.ZodString;
8
+ platform: z.ZodString;
9
+ pipFreeze: z.ZodArray<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ export type EnvReport = z.infer<typeof EnvReportSchema>;
12
+ export declare const RunRequestSchema: z.ZodObject<{
13
+ filePath: z.ZodString;
14
+ mode: z.ZodUnion<readonly [z.ZodLiteral<"cell">, z.ZodLiteral<"range">, z.ZodLiteral<"all">, z.ZodLiteral<"from">, z.ZodLiteral<"env">]>;
15
+ cellIndex: z.ZodOptional<z.ZodNumber>;
16
+ start: z.ZodOptional<z.ZodNumber>;
17
+ end: z.ZodOptional<z.ZodNumber>;
18
+ kernel: z.ZodOptional<z.ZodString>;
19
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
20
+ save: z.ZodOptional<z.ZodBoolean>;
21
+ workingDirectory: z.ZodOptional<z.ZodString>;
22
+ maxOutputChars: z.ZodOptional<z.ZodNumber>;
23
+ }, z.core.$strip>;
24
+ export type RunRequest = z.infer<typeof RunRequestSchema>;
25
+ export declare const CellExecutionSummarySchema: z.ZodObject<{
26
+ cellIndex: z.ZodNumber;
27
+ status: z.ZodUnion<readonly [z.ZodLiteral<"ok">, z.ZodLiteral<"error">, z.ZodLiteral<"timeout">, z.ZodLiteral<"skipped">]>;
28
+ executionCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29
+ durationMs: z.ZodOptional<z.ZodNumber>;
30
+ stdout: z.ZodOptional<z.ZodString>;
31
+ stderr: z.ZodOptional<z.ZodString>;
32
+ resultPreview: z.ZodOptional<z.ZodString>;
33
+ displayData: z.ZodOptional<z.ZodArray<z.ZodObject<{
34
+ mime: z.ZodString;
35
+ sizeBytes: z.ZodNumber;
36
+ }, z.core.$strip>>>;
37
+ rawOutputs: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
38
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
39
+ ename: z.ZodString;
40
+ evalue: z.ZodString;
41
+ traceback: z.ZodArray<z.ZodString>;
42
+ }, z.core.$strip>>>;
43
+ }, z.core.$strip>;
44
+ export type CellExecutionSummary = z.infer<typeof CellExecutionSummarySchema>;
45
+ export declare const RunResponseSchema: z.ZodObject<{
46
+ success: z.ZodBoolean;
47
+ executedCells: z.ZodArray<z.ZodNumber>;
48
+ durationMs: z.ZodNumber;
49
+ saved: z.ZodOptional<z.ZodBoolean>;
50
+ outputs: z.ZodArray<z.ZodObject<{
51
+ cellIndex: z.ZodNumber;
52
+ status: z.ZodUnion<readonly [z.ZodLiteral<"ok">, z.ZodLiteral<"error">, z.ZodLiteral<"timeout">, z.ZodLiteral<"skipped">]>;
53
+ executionCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
54
+ durationMs: z.ZodOptional<z.ZodNumber>;
55
+ stdout: z.ZodOptional<z.ZodString>;
56
+ stderr: z.ZodOptional<z.ZodString>;
57
+ resultPreview: z.ZodOptional<z.ZodString>;
58
+ displayData: z.ZodOptional<z.ZodArray<z.ZodObject<{
59
+ mime: z.ZodString;
60
+ sizeBytes: z.ZodNumber;
61
+ }, z.core.$strip>>>;
62
+ rawOutputs: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
63
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
64
+ ename: z.ZodString;
65
+ evalue: z.ZodString;
66
+ traceback: z.ZodArray<z.ZodString>;
67
+ }, z.core.$strip>>>;
68
+ }, z.core.$strip>>;
69
+ env: z.ZodOptional<z.ZodObject<{
70
+ kernelDisplayName: z.ZodNullable<z.ZodString>;
71
+ kernelName: z.ZodNullable<z.ZodString>;
72
+ language: z.ZodNullable<z.ZodString>;
73
+ pythonVersion: z.ZodString;
74
+ pythonExecutable: z.ZodString;
75
+ platform: z.ZodString;
76
+ pipFreeze: z.ZodArray<z.ZodString>;
77
+ }, z.core.$strip>>;
78
+ error: z.ZodOptional<z.ZodObject<{
79
+ kind: z.ZodString;
80
+ cellIndex: z.ZodNumber;
81
+ ename: z.ZodString;
82
+ evalue: z.ZodString;
83
+ traceback: z.ZodArray<z.ZodString>;
84
+ }, z.core.$strip>>;
85
+ }, z.core.$strip>;
86
+ export type RunResponse = z.infer<typeof RunResponseSchema>;
87
+ //# sourceMappingURL=execution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/domain/execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,eAAe;;;;;;;;iBAQ1B,CAAA;AACF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAEvD,eAAO,MAAM,gBAAgB;;;;;;;;;;;iBAiB3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;iBA0BrC,CAAA;AACF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAE7E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgB5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}