ipinb 0.3.0__tar.gz → 0.4.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 (247) hide show
  1. {ipinb-0.3.0 → ipinb-0.4.0}/BREAKING_CHANGES.md +6 -0
  2. {ipinb-0.3.0 → ipinb-0.4.0}/CHANGELOG.md +6 -0
  3. {ipinb-0.3.0 → ipinb-0.4.0}/PKG-INFO +7 -7
  4. {ipinb-0.3.0 → ipinb-0.4.0}/README.md +6 -6
  5. {ipinb-0.3.0 → ipinb-0.4.0}/docs/architecture.md +2 -2
  6. {ipinb-0.3.0 → ipinb-0.4.0}/docs/debugging.md +3 -3
  7. {ipinb-0.3.0/ipi/skills/notebook/references → ipinb-0.4.0/docs}/execution-and-results.md +5 -5
  8. {ipinb-0.3.0/ipi/skills/notebook/references → ipinb-0.4.0/docs}/kernel-environments.md +2 -2
  9. {ipinb-0.3.0/ipi/skills/notebook/references → ipinb-0.4.0/docs}/notebook-publishing.md +1 -1
  10. {ipinb-0.3.0/ipi/skills/notebook/references → ipinb-0.4.0/docs}/parallel-execution.md +2 -2
  11. {ipinb-0.3.0/src/ipi/resources/references → ipinb-0.4.0/docs}/rich-output.md +3 -3
  12. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/notebook/SKILL.md +3 -1
  13. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/notebook/references/debugging.md +3 -3
  14. {ipinb-0.3.0/docs → ipinb-0.4.0/ipi/skills/notebook/references}/execution-and-results.md +5 -5
  15. {ipinb-0.3.0/docs → ipinb-0.4.0/ipi/skills/notebook/references}/kernel-environments.md +2 -2
  16. {ipinb-0.3.0/src/ipi/resources → ipinb-0.4.0/ipi/skills/notebook}/references/notebook-publishing.md +1 -1
  17. {ipinb-0.3.0/src/ipi/resources → ipinb-0.4.0/ipi/skills/notebook}/references/parallel-execution.md +2 -2
  18. {ipinb-0.3.0/docs → ipinb-0.4.0/ipi/skills/notebook/references}/rich-output.md +3 -3
  19. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/notebook-http/SKILL.md +1 -1
  20. {ipinb-0.3.0 → ipinb-0.4.0}/pyproject.toml +1 -1
  21. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/resource_registry.py +37 -4
  22. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/resources/notebook_http_skill.md +1 -1
  23. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/resources/notebook_skill.md +3 -1
  24. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/resources/references/debugging.md +3 -3
  25. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/resources/references/execution-and-results.md +5 -5
  26. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/resources/references/kernel-environments.md +2 -2
  27. {ipinb-0.3.0/docs → ipinb-0.4.0/src/ipi/resources/references}/notebook-publishing.md +1 -1
  28. {ipinb-0.3.0/docs → ipinb-0.4.0/src/ipi/resources/references}/parallel-execution.md +2 -2
  29. {ipinb-0.3.0/ipi/skills/notebook → ipinb-0.4.0/src/ipi/resources}/references/rich-output.md +3 -3
  30. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/execution_server.py +8 -3
  31. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipinb.egg-info/PKG-INFO +7 -7
  32. {ipinb-0.3.0 → ipinb-0.4.0}/tests/test_execution_registry.py +4 -3
  33. {ipinb-0.3.0 → ipinb-0.4.0}/tests/test_execution_transports.py +1 -1
  34. {ipinb-0.3.0 → ipinb-0.4.0}/tests/test_resource_registry.py +153 -36
  35. {ipinb-0.3.0 → ipinb-0.4.0}/LICENSE +0 -0
  36. {ipinb-0.3.0 → ipinb-0.4.0}/MANIFEST.in +0 -0
  37. {ipinb-0.3.0 → ipinb-0.4.0}/docs/autopilot/ipi-mcp-redesign.md +0 -0
  38. {ipinb-0.3.0 → ipinb-0.4.0}/docs/autopilot/notebook-service-log.md +0 -0
  39. {ipinb-0.3.0 → ipinb-0.4.0}/docs/autopilot/notebook-service-plan.md +0 -0
  40. {ipinb-0.3.0 → ipinb-0.4.0}/docs/autopilot/performance-log.md +0 -0
  41. {ipinb-0.3.0 → ipinb-0.4.0}/docs/autopilot/performance-plan.md +0 -0
  42. {ipinb-0.3.0 → ipinb-0.4.0}/docs/autopilot/performance-results.md +0 -0
  43. {ipinb-0.3.0 → ipinb-0.4.0}/docs/autopilot/reduce-output-tokens-log.md +0 -0
  44. {ipinb-0.3.0 → ipinb-0.4.0}/docs/autopilot/reduce-output-tokens-plan.md +0 -0
  45. {ipinb-0.3.0 → ipinb-0.4.0}/docs/releasing.md +0 -0
  46. {ipinb-0.3.0 → ipinb-0.4.0}/docs/validation/compact-output-blocks-2026-09-13.md +0 -0
  47. {ipinb-0.3.0 → ipinb-0.4.0}/docs/validation/execution-api-2026-09-10.md +0 -0
  48. {ipinb-0.3.0 → ipinb-0.4.0}/docs/validation/fastmcp4-2026-09-13.md +0 -0
  49. {ipinb-0.3.0 → ipinb-0.4.0}/docs/your-first-extension.md +0 -0
  50. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/developing-ipi-plugins/SKILL.md +0 -0
  51. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/developing-ipi-plugins/references/authoring-guide.md +0 -0
  52. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/developing-ipi-plugins/references/evaluations.md +0 -0
  53. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/developing-ipi-plugins/references/source-map.md +0 -0
  54. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/developing-ipi-plugins/references/testing-and-troubleshooting.md +0 -0
  55. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/developing-ipi-plugins/templates/installed-plugin/pyproject.toml +0 -0
  56. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/developing-ipi-plugins/templates/installed-plugin/src/example_ipi_plugin/__init__.py +0 -0
  57. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/developing-ipi-plugins/templates/installed-plugin/tests/test_plugin.py +0 -0
  58. {ipinb-0.3.0 → ipinb-0.4.0}/ipi/skills/developing-ipi-plugins/templates/project-plugin.py +0 -0
  59. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/package-lock.json +0 -0
  60. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/package.json +0 -0
  61. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/src/cell_chrome.ts +0 -0
  62. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/src/index.ts +0 -0
  63. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/src/intent.ts +0 -0
  64. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/src/metadata.ts +0 -0
  65. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/src/setup_chrome.ts +0 -0
  66. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/style/index.css +0 -0
  67. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/tests/index.spec.ts +0 -0
  68. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/tests/setup.ts +0 -0
  69. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/tsconfig.json +0 -0
  70. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/tsconfig.test.json +0 -0
  71. {ipinb-0.3.0 → ipinb-0.4.0}/jupyterlab-extension/vitest.config.ts +0 -0
  72. {ipinb-0.3.0 → ipinb-0.4.0}/setup.cfg +0 -0
  73. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/__init__.py +0 -0
  74. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_ansi.py +0 -0
  75. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_dependency_metadata.py +0 -0
  76. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_exception_groups.py +0 -0
  77. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_git_provenance.py +0 -0
  78. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_kernel_argv.py +0 -0
  79. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_kernel_launcher.py +0 -0
  80. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_launch_gate.py +0 -0
  81. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_markdown.py +0 -0
  82. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_model_output.py +0 -0
  83. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_notebook_mirror.py +0 -0
  84. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_owner_watchdog.py +0 -0
  85. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_parent_process.py +0 -0
  86. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_platform_support.py +0 -0
  87. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_self_wheel.py +0 -0
  88. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_timing.py +0 -0
  89. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_toml.py +0 -0
  90. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/__init__.py +0 -0
  91. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/address.py +0 -0
  92. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/artifacts.py +0 -0
  93. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/contract.py +0 -0
  94. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/local.py +0 -0
  95. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/master_owner.py +0 -0
  96. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/owned_directory.py +0 -0
  97. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/portable_uv.py +0 -0
  98. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/ssh.py +0 -0
  99. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/staging.py +0 -0
  100. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/supervisor.py +0 -0
  101. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_transport/supervisor_protocol.py +0 -0
  102. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_uv_environment.py +0 -0
  103. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/_ynotebook_ops.py +0 -0
  104. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/cell_export.py +0 -0
  105. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/config.py +0 -0
  106. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/execution_backend.py +0 -0
  107. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/execution_models.py +0 -0
  108. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/jupyter_server.py +0 -0
  109. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/kernel.py +0 -0
  110. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/labextensions/@ipi/notebook-extension/package.json +0 -0
  111. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/labextensions/@ipi/notebook-extension/static/40.5dddbc48f9255afab0d7.js +0 -0
  112. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/labextensions/@ipi/notebook-extension/static/665.890acd7e2a9ea1a043aa.js +0 -0
  113. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/labextensions/@ipi/notebook-extension/static/remoteEntry.aa9e35c0f1b6fe93a828.js +0 -0
  114. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/labextensions/@ipi/notebook-extension/static/style.js +0 -0
  115. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/labextensions/@ipi/notebook-extension/static/third-party-licenses.json +0 -0
  116. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/notebook_publisher.py +0 -0
  117. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/__init__.py +0 -0
  118. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/_model.py +0 -0
  119. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/api.py +0 -0
  120. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/__init__.py +0 -0
  121. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/_agents_md_impl.py +0 -0
  122. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/_image_outputs_impl.py +0 -0
  123. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/agents_md.py +0 -0
  124. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/autoreload.py +0 -0
  125. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/dataframe_display.py +0 -0
  126. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/http_user_agent.py +0 -0
  127. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/image_outputs.py +0 -0
  128. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/import_guidance.py +0 -0
  129. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/pdb.py +0 -0
  130. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/pip_guidance.py +0 -0
  131. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/builtins/project_import.py +0 -0
  132. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/catalog.py +0 -0
  133. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/discovery.py +0 -0
  134. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/kernel.py +0 -0
  135. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/py.typed +0 -0
  136. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/plugins/server_deps.py +0 -0
  137. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/py.typed +0 -0
  138. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/records/__init__.py +0 -0
  139. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/records/py.typed +0 -0
  140. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/redaction.py +0 -0
  141. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/references.py +0 -0
  142. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/__init__.py +0 -0
  143. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/_subprocess.py +0 -0
  144. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/audit.py +0 -0
  145. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/bootstrap.py +0 -0
  146. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/cell_types.py +0 -0
  147. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/concurrent.py +0 -0
  148. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/context.py +0 -0
  149. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/debugger.py +0 -0
  150. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/environment.py +0 -0
  151. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/formatters.py +0 -0
  152. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/magics.py +0 -0
  153. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/path_context.py +0 -0
  154. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/project.py +0 -0
  155. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/py.typed +0 -0
  156. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/replay.py +0 -0
  157. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/runtime/state_delta.py +0 -0
  158. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/__init__.py +0 -0
  159. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/__main__.py +0 -0
  160. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/builtins/__init__.py +0 -0
  161. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/builtins/view_image.py +0 -0
  162. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/execution_content.py +0 -0
  163. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/plugin_resolver.py +0 -0
  164. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/plugin_tools.py +0 -0
  165. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/py.typed +0 -0
  166. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/server/server.py +0 -0
  167. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/session.py +0 -0
  168. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipi/tunnel.py +0 -0
  169. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipinb.egg-info/SOURCES.txt +0 -0
  170. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipinb.egg-info/dependency_links.txt +0 -0
  171. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipinb.egg-info/entry_points.txt +0 -0
  172. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipinb.egg-info/requires.txt +0 -0
  173. {ipinb-0.3.0 → ipinb-0.4.0}/src/ipinb.egg-info/top_level.txt +0 -0
  174. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_ansi.py +0 -0
  175. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_config.py +0 -0
  176. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_context_runtime.py +0 -0
  177. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_credential_boundaries.py +0 -0
  178. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_credential_redaction.py +0 -0
  179. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_debugger.py +0 -0
  180. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_editable_requirements.py +0 -0
  181. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_iopub_reducer.py +0 -0
  182. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_jupyter_server.py +0 -0
  183. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_kernel.py +0 -0
  184. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_kernel_address.py +0 -0
  185. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_kernel_regressions.py +0 -0
  186. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_late_iopub.py +0 -0
  187. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_notebook_mirror.py +0 -0
  188. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_notebook_mirror_writer.py +0 -0
  189. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_notebook_publisher.py +0 -0
  190. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_notebook_publisher_e2e.py +0 -0
  191. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_output_noise.py +0 -0
  192. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_owner_watchdog.py +0 -0
  193. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_packaging_namespace.py +0 -0
  194. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_platform_support.py +0 -0
  195. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_plugin_kernel_integration.py +0 -0
  196. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_portable_uv.py +0 -0
  197. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_references.py +0 -0
  198. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_self_wheel.py +0 -0
  199. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_session.py +0 -0
  200. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_smoke.py +0 -0
  201. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_ssh_transport.py +0 -0
  202. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_timing.py +0 -0
  203. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_toml.py +0 -0
  204. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_transport_contract.py +0 -0
  205. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_transport_staging.py +0 -0
  206. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_tunnel.py +0 -0
  207. {ipinb-0.3.0 → ipinb-0.4.0}/tests/core/test_uv_environment.py +0 -0
  208. {ipinb-0.3.0 → ipinb-0.4.0}/tests/release_smoke.py +0 -0
  209. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_bootstrap.py +0 -0
  210. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_builtin_agents_md.py +0 -0
  211. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_builtin_autoreload.py +0 -0
  212. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_builtin_dataframe_display.py +0 -0
  213. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_builtin_http_user_agent.py +0 -0
  214. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_builtin_image_outputs.py +0 -0
  215. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_builtin_import_guidance.py +0 -0
  216. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_builtin_pdb.py +0 -0
  217. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_builtin_pip_guidance.py +0 -0
  218. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_builtin_project_import.py +0 -0
  219. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_context.py +0 -0
  220. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_environment.py +0 -0
  221. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_formatters.py +0 -0
  222. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_magics.py +0 -0
  223. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_model_output.py +0 -0
  224. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_path_context.py +0 -0
  225. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_plugin_api.py +0 -0
  226. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_plugin_authoring_skill.py +0 -0
  227. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_plugin_catalog.py +0 -0
  228. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_plugin_discovery.py +0 -0
  229. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_plugin_kernel.py +0 -0
  230. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_plugin_server_deps.py +0 -0
  231. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_project.py +0 -0
  232. {ipinb-0.3.0 → ipinb-0.4.0}/tests/runtime/test_smoke.py +0 -0
  233. {ipinb-0.3.0 → ipinb-0.4.0}/tests/server/conftest.py +0 -0
  234. {ipinb-0.3.0 → ipinb-0.4.0}/tests/server/test_builtin_view_image.py +0 -0
  235. {ipinb-0.3.0 → ipinb-0.4.0}/tests/server/test_main.py +0 -0
  236. {ipinb-0.3.0 → ipinb-0.4.0}/tests/server/test_multi_project_plugins.py +0 -0
  237. {ipinb-0.3.0 → ipinb-0.4.0}/tests/server/test_plugin_resolver.py +0 -0
  238. {ipinb-0.3.0 → ipinb-0.4.0}/tests/server/test_plugin_server_integration.py +0 -0
  239. {ipinb-0.3.0 → ipinb-0.4.0}/tests/server/test_plugin_tools.py +0 -0
  240. {ipinb-0.3.0 → ipinb-0.4.0}/tests/server/test_server.py +0 -0
  241. {ipinb-0.3.0 → ipinb-0.4.0}/tests/server/test_stdio_shutdown.py +0 -0
  242. {ipinb-0.3.0 → ipinb-0.4.0}/tests/test_cell_export.py +0 -0
  243. {ipinb-0.3.0 → ipinb-0.4.0}/tests/test_consolidated_tools.py +0 -0
  244. {ipinb-0.3.0 → ipinb-0.4.0}/tests/test_debugger.py +0 -0
  245. {ipinb-0.3.0 → ipinb-0.4.0}/tests/test_execution_content_errors.py +0 -0
  246. {ipinb-0.3.0 → ipinb-0.4.0}/tests/test_namespace.py +0 -0
  247. {ipinb-0.3.0 → ipinb-0.4.0}/tests/test_package_boundaries.py +0 -0
@@ -1,5 +1,11 @@
1
1
  # Breaking Changes
2
2
 
3
+ ## 2026-10-28: Registry-qualified handles (0.4.0)
4
+
5
+ Public kernel and cell IDs now include a persisted nine-digit decimal registry prefix, for example `123456789k0` and `123456789c1`. Kernel inventory cursors include that prefix too. IDs and cursors belong to their issuing server; pass returned values unchanged. Independent servers no longer issue identical handles by construction, although a random prefix collision remains possible. MCP kernel directories use the qualified kernel ID. Internal numeric execution indices and low-level session helpers are unchanged.
6
+
7
+ **Migration:** Bare `k0`/`c1` handles and old cursors are not supported. Start a fresh IPi server and use its returned IDs. If `server.registry_root` points to a database with retained unqualified IDs, choose a new directory; startup rejects the old registry and preserves its records. Keep that directory with the previous IPi version to inspect historical records. Existing servers retain their current behavior until stopped; live Python state cannot transfer to a replacement server.
8
+
3
9
  ## 2026-10-27: Private uv kernel environments (0.3.0)
4
10
 
5
11
  Every local and SSH kernel uses an isolated uv environment. Runtime and additional dependencies may override project pins inside that environment. IPi no longer turns every installed project version into a constraint. Project `.venv` and `uv.lock` stay unchanged. Live `%pip` changes remain private to the kernel. Strict `kernel.locked` checks the base project's lock; overlay versions may still differ.
@@ -3,6 +3,12 @@
3
3
  All notable user-facing changes are recorded here. Detailed API removals and
4
4
  migration steps are maintained in [BREAKING_CHANGES.md](BREAKING_CHANGES.md).
5
5
 
6
+ ## 0.4.0
7
+
8
+ - Qualify public kernel and cell handles with a persisted nine-digit decimal registry prefix while retaining compact, never-reused counters. Kernel inventory cursors include the registry prefix too.
9
+ - Explain server ownership in unknown-handle errors and notebook guidance. Cross-agent work goes through the agent that owns the notebook; there is no cross-server routing.
10
+ - Breaking: bare handles and old cursors are no longer supported. Registries with retained unqualified IDs require a new registry directory; existing records are preserved for inspection with the previous version. See [BREAKING_CHANGES.md](BREAKING_CHANGES.md).
11
+
6
12
  ## 0.3.0
7
13
 
8
14
  - Restore native uv dependency overrides in private per-kernel environments. Runtime dependencies can override project pins without changing project environments or lockfiles; live installs stay private to each kernel.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ipinb
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Persistent IPython notebooks for MCP agents
5
5
  Author-email: Nima Shoghi <nimashoghi@gmail.com>
6
6
  License-Expression: MIT
@@ -104,7 +104,7 @@ Execution requires an explicit `kernel_id`. The default observation window is fi
104
104
 
105
105
  Managed kernels keep IPython history in memory because the notebook and registry are the durable execution record. Kernel creation is explicit, apart from optional discoverable startup prewarming. A closed or lost handle never creates a replacement.
106
106
 
107
- Handles are registry-local counters beginning with `k` for kernels and `c` for cells, such as `k0` and `c1`. Pass them unchanged to their originating registry; IDs are never reused within that registry. Tool responses provide one structured JSON payload with typed resource, handle, cell, inventory, or error envelopes. Output cursors belong to each reader. Large sources and events provide immutable MCP resource URIs and byte counts. Use `read_cell(..., include_artifact_metadata=True)` for artifact filesystem paths, SHA-256 checksums, and MIME types.
107
+ Handles combine a persisted nine-digit decimal registry prefix with `k` or `c` and a durable counter, such as `123456789k0` and `123456789c1`. Pass them unchanged to their originating registry; IDs are never reused within that registry. Tool responses provide one structured JSON payload with typed resource, handle, cell, inventory, or error envelopes. Output cursors belong to each reader. Large sources and events provide immutable MCP resource URIs and byte counts. Use `read_cell(..., include_artifact_metadata=True)` for artifact filesystem paths, SHA-256 checksums, and MIME types.
108
108
 
109
109
  `ipython` returns its bounded cell record plus any images the cell displayed as MCP
110
110
  image content, so `plt.show()` is one step instead of a path the model has to
@@ -117,10 +117,10 @@ Each notebook runtime gets a new session. Local sessions are stored under:
117
117
  ```text
118
118
  <initial-cwd>/.agents/sessions/<session-id>/
119
119
  session.jsonl
120
- kernels/k1/notebook.ipynb
121
- kernels/k1/outputs/manifest.json
122
- kernels/k1/outputs/c1/g-<sha256-prefix>/input.py
123
- kernels/k1/outputs/c1/g-<sha256-prefix>/o1-stdout.txt
120
+ kernels/123456789k1/notebook.ipynb
121
+ kernels/123456789k1/outputs/manifest.json
122
+ kernels/123456789k1/outputs/c1/g-<sha256-prefix>/input.py
123
+ kernels/123456789k1/outputs/c1/g-<sha256-prefix>/o1-stdout.txt
124
124
  ```
125
125
 
126
126
  Every input and every retained Jupyter MIME output has a durable local
@@ -158,7 +158,7 @@ Kernels always write an archival `notebook.ipynb`. Publish a specific live
158
158
  notebook only when someone needs to open it:
159
159
 
160
160
  ```text
161
- publish(kernel_id="k1", cells={"c1": "Result"})
161
+ publish(kernel_id=kernel_id, cells={cell_id: "Result"})
162
162
  ```
163
163
 
164
164
  The tool starts one private Notebook 7 child attached to the existing IPi
@@ -61,7 +61,7 @@ Execution requires an explicit `kernel_id`. The default observation window is fi
61
61
 
62
62
  Managed kernels keep IPython history in memory because the notebook and registry are the durable execution record. Kernel creation is explicit, apart from optional discoverable startup prewarming. A closed or lost handle never creates a replacement.
63
63
 
64
- Handles are registry-local counters beginning with `k` for kernels and `c` for cells, such as `k0` and `c1`. Pass them unchanged to their originating registry; IDs are never reused within that registry. Tool responses provide one structured JSON payload with typed resource, handle, cell, inventory, or error envelopes. Output cursors belong to each reader. Large sources and events provide immutable MCP resource URIs and byte counts. Use `read_cell(..., include_artifact_metadata=True)` for artifact filesystem paths, SHA-256 checksums, and MIME types.
64
+ Handles combine a persisted nine-digit decimal registry prefix with `k` or `c` and a durable counter, such as `123456789k0` and `123456789c1`. Pass them unchanged to their originating registry; IDs are never reused within that registry. Tool responses provide one structured JSON payload with typed resource, handle, cell, inventory, or error envelopes. Output cursors belong to each reader. Large sources and events provide immutable MCP resource URIs and byte counts. Use `read_cell(..., include_artifact_metadata=True)` for artifact filesystem paths, SHA-256 checksums, and MIME types.
65
65
 
66
66
  `ipython` returns its bounded cell record plus any images the cell displayed as MCP
67
67
  image content, so `plt.show()` is one step instead of a path the model has to
@@ -74,10 +74,10 @@ Each notebook runtime gets a new session. Local sessions are stored under:
74
74
  ```text
75
75
  <initial-cwd>/.agents/sessions/<session-id>/
76
76
  session.jsonl
77
- kernels/k1/notebook.ipynb
78
- kernels/k1/outputs/manifest.json
79
- kernels/k1/outputs/c1/g-<sha256-prefix>/input.py
80
- kernels/k1/outputs/c1/g-<sha256-prefix>/o1-stdout.txt
77
+ kernels/123456789k1/notebook.ipynb
78
+ kernels/123456789k1/outputs/manifest.json
79
+ kernels/123456789k1/outputs/c1/g-<sha256-prefix>/input.py
80
+ kernels/123456789k1/outputs/c1/g-<sha256-prefix>/o1-stdout.txt
81
81
  ```
82
82
 
83
83
  Every input and every retained Jupyter MIME output has a durable local
@@ -115,7 +115,7 @@ Kernels always write an archival `notebook.ipynb`. Publish a specific live
115
115
  notebook only when someone needs to open it:
116
116
 
117
117
  ```text
118
- publish(kernel_id="k1", cells={"c1": "Result"})
118
+ publish(kernel_id=kernel_id, cells={cell_id: "Result"})
119
119
  ```
120
120
 
121
121
  The tool starts one private Notebook 7 child attached to the existing IPi
@@ -121,7 +121,7 @@ Bash tool registration is process-wide and disabled by default. Set `IPI_MCP_ENA
121
121
 
122
122
  `ipython(kernel_id, code, yield_time_ms, request_id)` accepts work and optionally observes it. A zero observation window always returns a `handle`, including for a fast completed execution. Positive observations return a `cell` view with truthful queued, running, paused, succeeded, failed, interrupted, or lost state. Live debugger stops use `paused`; unhandled failures finish as `failed` while optionally retaining postmortem frames. An interruption request is independent of execution state.
123
123
 
124
- `read_cell(cell_id, yield_time_ms=0)` reads immediately by default and can wait up to 30 seconds for Python output or completion. Python replies omit source, origin, created_at, and request_id; Markdown remains immediate and includes its source and metadata. These fields remain stored internally, and Python source is available through `ipi://cells/{cell_id}/source`. It uses caller-owned output cursors such as `c1:17`. Kernel inventories use `k:<offset>` and cell inventories use `<kernel_id>:<offset>`; the identity binds each cursor to its resource and page type. Callers pass cursors unchanged. Terminal execution does not imply that the current page exhausts output. Repeated reads replay the same retained events; a later event increments the revision without reopening terminal execution. IOPub events are sequenced and persisted before response construction. Terminal completion waits for both the shell result and ordered idle message.
124
+ `read_cell(cell_id, yield_time_ms=0)` reads immediately by default and can wait up to 30 seconds for Python output or completion. Python replies omit source, origin, created_at, and request_id; Markdown remains immediate and includes its source and metadata. These fields remain stored internally, and Python source is available through `ipi://cells/{cell_id}/source`. It uses caller-owned output cursors such as `123456789c1:17`. Kernel inventories use `<registry-prefix>k:<offset>` and cell inventories use `<kernel_id>:<offset>`; the identity binds each cursor to its resource and page type. Callers pass cursors unchanged. Terminal execution does not imply that the current page exhausts output. Repeated reads replay the same retained events; a later event increments the revision without reopening terminal execution. IOPub events are sequenced and persisted before response construction. Terminal completion waits for both the shell result and ordered idle message.
125
125
 
126
126
  Model-facing output pages contain ordered `blocks`. Adjacent stream events from the same stream are concatenated into a stdout or stderr text block without changing the retained log. Other events preserve their identity and content, including immutable artifact references. The page cursor records the next underlying event, not the next block. Byte limits are applied after this projection; joining never crosses a different stream or a non-stream event.
127
127
 
@@ -145,7 +145,7 @@ The notebook mirrors retained records without re-executing them. Cross-cell disp
145
145
 
146
146
  `markdown` appends prose with optional retry deduplication and returns only `{"kind":"markdown","cell_id":"..."}`. An identical retry returns the same receipt. Use `read_cell(cell_id)` to retrieve the retained prose and metadata. `publish(kernel_id, cells={cell_id: caption})` optionally highlights terminal Python cells in the full notebook without adding executions or rows. Selection is validated before changing presentation: every selected cell must be accessible, terminal, and belong to the named kernel. Omitted cells keep their existing highlights. Publication reconciles retained records before exposing the live sidecar; a notebook synchronization failure cannot silently become a successful stale publication. Archival records survive live-kernel close under the configured retention policy, which has no automatic record expiry by default.
147
147
 
148
- Kernel handles use an unpadded, zero-based counter (`k0`, `k1`, ...); cell handles use a one-based counter (`c1`, `c2`, ...). Both are scoped to one registry. Python, Bash, markdown, and browser executions share the cell counter across kernels, so a cell ID alone resolves its record. Allocation state lives in the same SQLite database as retained resources and is committed before acceptance, so closed or expired records, failed acceptance, and owner restarts cannot recycle handles. Existing retained IDs are not renamed. Independent registries may both contain `k0` and `c1`; callers must retain the originating registry context. Execution replies contain one structured JSON payload, with an explicitly empty text-content list. Image blocks use MCP content while their complete MIME events remain retrievable as artifacts, avoiding a base64 copy in JSON.
148
+ Kernel handles combine a persisted nine-digit decimal registry prefix with an unpadded, zero-based counter (`123456789k0`, `123456789k1`, ...); cell handles use the same prefix and a one-based counter (`123456789c1`, `123456789c2`, ...). Each registry draws its prefix once, uniformly from 100000000 through 999999999, and stores it in SQLite metadata. Reopening the database preserves the prefix. Python, Bash, markdown, and browser executions share the cell counter across kernels, so a cell ID alone resolves its record. Allocation state lives in the same SQLite database as retained resources and is committed before acceptance, so closed or expired records, failed acceptance, and owner restarts cannot recycle handles. Registries with retained unqualified IDs are rejected at startup without discarding their records; use a fresh registry root after upgrading. Foreign handles fail local lookup unless two registries draw the same prefix. This is probabilistic separation: a particular independent pair collides with probability 1/900000000, independent of retained cell count. Prefix collisions across many registries follow the birthday bound, and matching counters can then alias. Prefixes are not authentication secrets. There is no cross-server routing; ask the owning agent to run follow-up work and return results. The prefix adds three tokens per ID under the measured o200k_base and cl100k_base encodings; counters keep growing without padding or wrapping. Execution replies contain one structured JSON payload, with an explicitly empty text-content list. Image blocks use MCP content while their complete MIME events remain retrievable as artifacts, avoiding a base64 copy in JSON.
149
149
 
150
150
  ## Plugin Lifecycle
151
151
 
@@ -3,8 +3,8 @@
3
3
  IPi exposes one optional-use debugger tool backed by IPython's Pdb engine:
4
4
 
5
5
  ```python
6
- ipdb(kernel_id="k0", cell_id="c7", command="where")
7
- ipdb(kernel_id="k0", command="break /absolute/path/model.py:42")
6
+ ipdb(kernel_id=kernel_id, cell_id=cell_id, command="where")
7
+ ipdb(kernel_id=kernel_id, command="break /absolute/path/model.py:42")
8
8
  ```
9
9
 
10
10
  Every call names a kernel. Add a cell ID for frame inspection, Python evaluation, or execution control. Omit the cell ID for kernel-wide breakpoint configuration and exception-stop policy. There is no active-target selector.
@@ -19,7 +19,7 @@ Use `where`, `up`, `down`, `args`, `p expression`, `pp expression`, `list`, or `
19
19
 
20
20
  Insert `breakpoint()` in a submitted cell or set a source breakpoint before running it. The cell reports `paused` and a source location. `step`, `next`, `return`, `until`, and `continue` use the real debugger engine. `quit` abandons that execution and unwinds its cleanup. Breakpoint configuration uses Pdb syntax, including `break`, `tbreak`, `condition`, `ignore`, `enable`, `disable`, and `clear`. Bare `clear` clears all breakpoints without prompting. Kernel-scoped source breakpoints should name a file and line; frame-relative expressions require a cell target.
21
21
 
22
- `ipdb(kernel_id="k0", command="exceptions raised")` stops when an exception is raised, before handling; this includes exceptions that user code may catch. `exceptions off` restores default postmortem-only behavior. Internal iteration termination is excluded from automatic raised-exception stops.
22
+ `ipdb(kernel_id=kernel_id, command="exceptions raised")` stops when an exception is raised, before handling; this includes exceptions that user code may catch. `exceptions off` restores default postmortem-only behavior. Internal iteration termination is excluded from automatic raised-exception stops.
23
23
 
24
24
  A live pause occupies its subshell. Other subshells and debugger commands remain usable. A pause also stops other tasks on that subshell's event loop; shared locks and mutable objects retain their normal Python behavior. There is no process-wide freeze or ability to step inside native C/CUDA operations. Interrupts and abandonment can be delayed by blocking native code or user code that suppresses cancellation.
25
25
 
@@ -1,12 +1,12 @@
1
1
  # Execution, results, and recovery
2
2
 
3
- Read this when work runs longer than one tool call, output is large, or a connection drops. For overlapping submissions, also read [Parallel execution](parallel-execution.md). Examples below are MCP tool calls; use returned IDs in place of illustrative IDs.
3
+ Read this when work runs longer than one tool call, output is large, or a connection drops. For overlapping submissions, also read [Parallel execution](parallel-execution.md). Examples below are MCP tool calls; `kernel_id` and `cell_id` stand for exact handles returned by this server.
4
4
 
5
5
  ## Submit and observe
6
6
 
7
7
  ```python
8
- ipython(kernel_id="k0", code="result = expensive_calculation()", yield_time_ms=0, request_id="calculate-1")
9
- read_cell(cell_id="c1", yield_time_ms=10000)
8
+ ipython(kernel_id=kernel_id, code="result = expensive_calculation()", yield_time_ms=0, request_id="calculate-1")
9
+ read_cell(cell_id=cell_id, yield_time_ms=10000)
10
10
  ```
11
11
 
12
12
  A `handle` means accepted, not completed. `yield_time_ms` limits how long the caller observes; it does not limit execution. A cancelled or disconnected observer leaves accepted work owned by IPi. Keep the kernel and cell IDs, then observe that same cell rather than resubmitting its code.
@@ -25,10 +25,10 @@ Large source or output bodies supply immutable MCP resource URIs. Read the retur
25
25
 
26
26
  Supply `request_id` when creating a kernel, submitting Python or Markdown, or issuing a debugger command if a lost response would make repetition risky. Reuse that key with the same operation and payload to recover its accepted record. Reusing a key for a different payload is rejected. A fresh key requests fresh work and can repeat side effects. Optional Bash also supports request IDs when enabled.
27
27
 
28
- HTTP and stdio expose the same execution API. HTTP reconnection does not require a new kernel: retain the kernel ID and use `list_cells(kernel_id=...)` when cell records need recovery. Closed or lost kernels do not contain usable live Python state. Identifiers do not replace authentication.
28
+ HTTP and stdio expose the same execution API. HTTP reconnection to the same server does not require a new kernel: retain the kernel ID and use `list_cells(kernel_id=...)` when cell records need recovery. Closed or lost kernels do not contain usable live Python state. Kernel and cell IDs belong to the IPi server that issued them; pass them unchanged. For another agent's notebook, ask that agent to run follow-up work and return results. Identifiers do not replace authentication.
29
29
 
30
30
  ## Cancellation and debugger state
31
31
 
32
- `interrupt(cell_id="c1")` requests cancellation of that execution only. Continue observing its outcome. Native blocking code, suppressed cancellation, and descendant activity can outlive the request. `close_kernel(kernel_id="k0")` discards the named kernel's live state; retained records remain available under the storage policy. Finishing an answer is not a reason to close a reusable kernel.
32
+ `interrupt(cell_id=cell_id)` requests cancellation of that execution only. Continue observing its outcome. Native blocking code, suppressed cancellation, and descendant activity can outlive the request. `close_kernel(kernel_id=kernel_id)` discards the named kernel's live state; retained records remain available under the storage policy. Finishing an answer is not a reason to close a reusable kernel.
33
33
 
34
34
  A new ordinary submission to a kernel abandons existing live debugger pauses and discards existing postmortem inspection before admission. Recovering an existing execution retry key does not repeat that cleanup. See [Debugging](debugging.md) before choosing to resume or move on.
@@ -4,7 +4,7 @@ Read this when choosing a working directory, Python environment, dependency over
4
4
 
5
5
  ## Choose the execution environment
6
6
 
7
- Reuse a suitable kernel ID already provided in context. When creating a kernel, pass an existing absolute working directory:
7
+ Reuse a suitable kernel ID returned by this IPi server. When creating a kernel, pass an existing absolute working directory:
8
8
 
9
9
  ```python
10
10
  create_kernel(cwd="/absolute/project", additional_dependencies=["numpy", "pandas"], request_id="analysis-kernel")
@@ -42,7 +42,7 @@ Python imports, file access, and Bash commands run on the target. Do not substit
42
42
  The `bash` tool is disabled by default. Set `IPI_MCP_ENABLE_BASH_TOOL=1` before server startup to advertise it. When present:
43
43
 
44
44
  ```python
45
- bash(kernel_id="k0", cmd="pwd", yield_time_ms=0, request_id="inspect-directory")
45
+ bash(kernel_id=kernel_id, cmd="pwd", yield_time_ms=0, request_id="inspect-directory")
46
46
  ```
47
47
 
48
48
  Bash runs in the selected kernel environment and follows Python's cell handles, observation, retries, and targeted cancellation. Read its retained output with `read_cell`. Like a new `ipython` submission, it moves on from existing debugger pauses in that kernel. For calculations that should reuse Python variables, imports, or live objects, use `ipython`.
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Contract
6
6
 
7
- - Use `publish(kernel_id="k0", cells={"c1": "Main result"})`. The optional mapping highlights terminal Python cells in the full live notebook. It never filters or reruns notebook content. All selected cells must belong to the named kernel.
7
+ - Use `publish(kernel_id=kernel_id, cells={cell_id: "Main result"})`. The optional mapping highlights terminal Python cells in the full live notebook. It never filters or reruns notebook content. All selected cells must belong to the named kernel.
8
8
  - Null captions highlight without text. Omitted cells retain their existing highlights; omit the map to publish without changing presentation. Empty notebooks can be published.
9
9
  - The complete mapping is validated before presentation changes. Valid highlights are retained even if endpoint creation subsequently fails.
10
10
  - A successful call returns the complete
@@ -9,8 +9,8 @@ Finish shared setup first: imports, function definitions, and any data both oper
9
9
  For example, suppose a completed setup cell defined `load_metadata()` and `summarize_metrics()`, and neither operation depends on or mutates the other's state. These are MCP tool calls, not Python to execute inside the kernel:
10
10
 
11
11
  ```python
12
- ipython(kernel_id="k0", code="metadata = load_metadata()", yield_time_ms=0)
13
- ipython(kernel_id="k0", code="metrics = summarize_metrics()", yield_time_ms=0)
12
+ ipython(kernel_id=kernel_id, code="metadata = load_metadata()", yield_time_ms=0)
13
+ ipython(kernel_id=kernel_id, code="metrics = summarize_metrics()", yield_time_ms=0)
14
14
  ```
15
15
 
16
16
  Use each returned cell ID to observe that operation:
@@ -22,13 +22,13 @@ figure.savefig("result.png", dpi=200, bbox_inches="tight")
22
22
  display(figure)
23
23
  ```
24
24
 
25
- Use the optional `view_image(kernel_id="k0", path="result.png")` tool to inspect an existing PNG, JPEG, GIF, or WebP on the kernel's filesystem. Relative paths resolve under that kernel's cwd, including for SSH kernels. This reads an image; it does not execute a cell. If that tool is absent from the catalog, inspect through an available image-capable host surface or an appropriate IPython display.
25
+ Use the optional `view_image(kernel_id=kernel_id, path="result.png")` tool to inspect an existing PNG, JPEG, GIF, or WebP on the kernel's filesystem. Relative paths resolve under that kernel's cwd, including for SSH kernels. This reads an image; it does not execute a cell. If that tool is absent from the catalog, inspect through an available image-capable host surface or an appropriate IPython display.
26
26
 
27
27
  ## Add prose and highlight results
28
28
 
29
29
  ```python
30
- markdown(kernel_id="k0", source="## Result\nThe experiment completed with the parameters below.")
31
- publish(kernel_id="k0", cells={"c7": "Main result", "c9": "Validation"})
30
+ markdown(kernel_id=kernel_id, source="## Result\nThe experiment completed with the parameters below.")
31
+ publish(kernel_id=kernel_id, cells={cell_id: "Main result", validation_cell_id: "Validation"})
32
32
  ```
33
33
 
34
34
  These are MCP calls. Markdown appends a notebook cell, including while Python runs. Publication highlights selected terminal Python cells in the full live notebook; it does not select a subset for export or rerun the code. Captions describe already-retained results. See [Notebook publishing](notebook-publishing.md) for URL lifetime and highlight updates.
@@ -3,7 +3,9 @@ name: notebook
3
3
  description: Use persistent Python kernels for multi-step investigation, analysis, prototyping, and verification with reusable state and rich output.
4
4
  ---
5
5
 
6
- Reuse a suitable kernel ID already provided in context, or create a kernel for the required cwd and environment. Retain its `kernel_id` and pass it to submissions and notebook mutations. A starting kernel queues Python until setup completes.
6
+ Reuse a suitable kernel ID returned by this IPi server, or create a kernel for the required cwd and environment. Retain its `kernel_id` and pass it to submissions and notebook mutations. A starting kernel queues Python until setup completes.
7
+
8
+ Kernel and cell IDs belong to the IPi server that issued them; pass them unchanged. For another agent's notebook, ask that agent to run follow-up work and return results.
7
9
 
8
10
  Use IPi's native parallel execution for independent work: submit separate cells to the same kernel with `yield_time_ms=0` before waiting on their results. IPi schedules them in bounded subshells that share Python globals; no manual subshell setup is needed. Use distinct names or synchronization, and wait for prerequisite cells to succeed before submitting dependent code. Create another kernel when work needs isolated globals or incompatible process state. See [Parallel execution](references/parallel-execution.md) for submission patterns, shared-state constraints, and capacity handling.
9
11
 
@@ -3,8 +3,8 @@
3
3
  IPi exposes one optional-use debugger tool backed by IPython's Pdb engine:
4
4
 
5
5
  ```python
6
- ipdb(kernel_id="k0", cell_id="c7", command="where")
7
- ipdb(kernel_id="k0", command="break /absolute/path/model.py:42")
6
+ ipdb(kernel_id=kernel_id, cell_id=cell_id, command="where")
7
+ ipdb(kernel_id=kernel_id, command="break /absolute/path/model.py:42")
8
8
  ```
9
9
 
10
10
  Every call names a kernel. Add a cell ID for frame inspection, Python evaluation, or execution control. Omit the cell ID for kernel-wide breakpoint configuration and exception-stop policy. There is no active-target selector.
@@ -19,7 +19,7 @@ Use `where`, `up`, `down`, `args`, `p expression`, `pp expression`, `list`, or `
19
19
 
20
20
  Insert `breakpoint()` in a submitted cell or set a source breakpoint before running it. The cell reports `paused` and a source location. `step`, `next`, `return`, `until`, and `continue` use the real debugger engine. `quit` abandons that execution and unwinds its cleanup. Breakpoint configuration uses Pdb syntax, including `break`, `tbreak`, `condition`, `ignore`, `enable`, `disable`, and `clear`. Bare `clear` clears all breakpoints without prompting. Kernel-scoped source breakpoints should name a file and line; frame-relative expressions require a cell target.
21
21
 
22
- `ipdb(kernel_id="k0", command="exceptions raised")` stops when an exception is raised, before handling; this includes exceptions that user code may catch. `exceptions off` restores default postmortem-only behavior. Internal iteration termination is excluded from automatic raised-exception stops.
22
+ `ipdb(kernel_id=kernel_id, command="exceptions raised")` stops when an exception is raised, before handling; this includes exceptions that user code may catch. `exceptions off` restores default postmortem-only behavior. Internal iteration termination is excluded from automatic raised-exception stops.
23
23
 
24
24
  A live pause occupies its subshell. Other subshells and debugger commands remain usable. A pause also stops other tasks on that subshell's event loop; shared locks and mutable objects retain their normal Python behavior. There is no process-wide freeze or ability to step inside native C/CUDA operations. Interrupts and abandonment can be delayed by blocking native code or user code that suppresses cancellation.
25
25
 
@@ -1,12 +1,12 @@
1
1
  # Execution, results, and recovery
2
2
 
3
- Read this when work runs longer than one tool call, output is large, or a connection drops. For overlapping submissions, also read [Parallel execution](parallel-execution.md). Examples below are MCP tool calls; use returned IDs in place of illustrative IDs.
3
+ Read this when work runs longer than one tool call, output is large, or a connection drops. For overlapping submissions, also read [Parallel execution](parallel-execution.md). Examples below are MCP tool calls; `kernel_id` and `cell_id` stand for exact handles returned by this server.
4
4
 
5
5
  ## Submit and observe
6
6
 
7
7
  ```python
8
- ipython(kernel_id="k0", code="result = expensive_calculation()", yield_time_ms=0, request_id="calculate-1")
9
- read_cell(cell_id="c1", yield_time_ms=10000)
8
+ ipython(kernel_id=kernel_id, code="result = expensive_calculation()", yield_time_ms=0, request_id="calculate-1")
9
+ read_cell(cell_id=cell_id, yield_time_ms=10000)
10
10
  ```
11
11
 
12
12
  A `handle` means accepted, not completed. `yield_time_ms` limits how long the caller observes; it does not limit execution. A cancelled or disconnected observer leaves accepted work owned by IPi. Keep the kernel and cell IDs, then observe that same cell rather than resubmitting its code.
@@ -25,10 +25,10 @@ Large source or output bodies supply immutable MCP resource URIs. Read the retur
25
25
 
26
26
  Supply `request_id` when creating a kernel, submitting Python or Markdown, or issuing a debugger command if a lost response would make repetition risky. Reuse that key with the same operation and payload to recover its accepted record. Reusing a key for a different payload is rejected. A fresh key requests fresh work and can repeat side effects. Optional Bash also supports request IDs when enabled.
27
27
 
28
- HTTP and stdio expose the same execution API. HTTP reconnection does not require a new kernel: retain the kernel ID and use `list_cells(kernel_id=...)` when cell records need recovery. Closed or lost kernels do not contain usable live Python state. Identifiers do not replace authentication.
28
+ HTTP and stdio expose the same execution API. HTTP reconnection to the same server does not require a new kernel: retain the kernel ID and use `list_cells(kernel_id=...)` when cell records need recovery. Closed or lost kernels do not contain usable live Python state. Kernel and cell IDs belong to the IPi server that issued them; pass them unchanged. For another agent's notebook, ask that agent to run follow-up work and return results. Identifiers do not replace authentication.
29
29
 
30
30
  ## Cancellation and debugger state
31
31
 
32
- `interrupt(cell_id="c1")` requests cancellation of that execution only. Continue observing its outcome. Native blocking code, suppressed cancellation, and descendant activity can outlive the request. `close_kernel(kernel_id="k0")` discards the named kernel's live state; retained records remain available under the storage policy. Finishing an answer is not a reason to close a reusable kernel.
32
+ `interrupt(cell_id=cell_id)` requests cancellation of that execution only. Continue observing its outcome. Native blocking code, suppressed cancellation, and descendant activity can outlive the request. `close_kernel(kernel_id=kernel_id)` discards the named kernel's live state; retained records remain available under the storage policy. Finishing an answer is not a reason to close a reusable kernel.
33
33
 
34
34
  A new ordinary submission to a kernel abandons existing live debugger pauses and discards existing postmortem inspection before admission. Recovering an existing execution retry key does not repeat that cleanup. See [Debugging](debugging.md) before choosing to resume or move on.
@@ -4,7 +4,7 @@ Read this when choosing a working directory, Python environment, dependency over
4
4
 
5
5
  ## Choose the execution environment
6
6
 
7
- Reuse a suitable kernel ID already provided in context. When creating a kernel, pass an existing absolute working directory:
7
+ Reuse a suitable kernel ID returned by this IPi server. When creating a kernel, pass an existing absolute working directory:
8
8
 
9
9
  ```python
10
10
  create_kernel(cwd="/absolute/project", additional_dependencies=["numpy", "pandas"], request_id="analysis-kernel")
@@ -42,7 +42,7 @@ Python imports, file access, and Bash commands run on the target. Do not substit
42
42
  The `bash` tool is disabled by default. Set `IPI_MCP_ENABLE_BASH_TOOL=1` before server startup to advertise it. When present:
43
43
 
44
44
  ```python
45
- bash(kernel_id="k0", cmd="pwd", yield_time_ms=0, request_id="inspect-directory")
45
+ bash(kernel_id=kernel_id, cmd="pwd", yield_time_ms=0, request_id="inspect-directory")
46
46
  ```
47
47
 
48
48
  Bash runs in the selected kernel environment and follows Python's cell handles, observation, retries, and targeted cancellation. Read its retained output with `read_cell`. Like a new `ipython` submission, it moves on from existing debugger pauses in that kernel. For calculations that should reuse Python variables, imports, or live objects, use `ipython`.
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Contract
6
6
 
7
- - Use `publish(kernel_id="k0", cells={"c1": "Main result"})`. The optional mapping highlights terminal Python cells in the full live notebook. It never filters or reruns notebook content. All selected cells must belong to the named kernel.
7
+ - Use `publish(kernel_id=kernel_id, cells={cell_id: "Main result"})`. The optional mapping highlights terminal Python cells in the full live notebook. It never filters or reruns notebook content. All selected cells must belong to the named kernel.
8
8
  - Null captions highlight without text. Omitted cells retain their existing highlights; omit the map to publish without changing presentation. Empty notebooks can be published.
9
9
  - The complete mapping is validated before presentation changes. Valid highlights are retained even if endpoint creation subsequently fails.
10
10
  - A successful call returns the complete
@@ -9,8 +9,8 @@ Finish shared setup first: imports, function definitions, and any data both oper
9
9
  For example, suppose a completed setup cell defined `load_metadata()` and `summarize_metrics()`, and neither operation depends on or mutates the other's state. These are MCP tool calls, not Python to execute inside the kernel:
10
10
 
11
11
  ```python
12
- ipython(kernel_id="k0", code="metadata = load_metadata()", yield_time_ms=0)
13
- ipython(kernel_id="k0", code="metrics = summarize_metrics()", yield_time_ms=0)
12
+ ipython(kernel_id=kernel_id, code="metadata = load_metadata()", yield_time_ms=0)
13
+ ipython(kernel_id=kernel_id, code="metrics = summarize_metrics()", yield_time_ms=0)
14
14
  ```
15
15
 
16
16
  Use each returned cell ID to observe that operation:
@@ -22,13 +22,13 @@ figure.savefig("result.png", dpi=200, bbox_inches="tight")
22
22
  display(figure)
23
23
  ```
24
24
 
25
- Use the optional `view_image(kernel_id="k0", path="result.png")` tool to inspect an existing PNG, JPEG, GIF, or WebP on the kernel's filesystem. Relative paths resolve under that kernel's cwd, including for SSH kernels. This reads an image; it does not execute a cell. If that tool is absent from the catalog, inspect through an available image-capable host surface or an appropriate IPython display.
25
+ Use the optional `view_image(kernel_id=kernel_id, path="result.png")` tool to inspect an existing PNG, JPEG, GIF, or WebP on the kernel's filesystem. Relative paths resolve under that kernel's cwd, including for SSH kernels. This reads an image; it does not execute a cell. If that tool is absent from the catalog, inspect through an available image-capable host surface or an appropriate IPython display.
26
26
 
27
27
  ## Add prose and highlight results
28
28
 
29
29
  ```python
30
- markdown(kernel_id="k0", source="## Result\nThe experiment completed with the parameters below.")
31
- publish(kernel_id="k0", cells={"c7": "Main result", "c9": "Validation"})
30
+ markdown(kernel_id=kernel_id, source="## Result\nThe experiment completed with the parameters below.")
31
+ publish(kernel_id=kernel_id, cells={cell_id: "Main result", validation_cell_id: "Validation"})
32
32
  ```
33
33
 
34
34
  These are MCP calls. Markdown appends a notebook cell, including while Python runs. Publication highlights selected terminal Python cells in the full live notebook; it does not select a subset for export or rerun the code. Captions describe already-retained results. See [Notebook publishing](notebook-publishing.md) for URL lifetime and highlight updates.
@@ -3,6 +3,6 @@ name: notebook-http
3
3
  description: Use IPi's explicit persistent kernels across reconnecting HTTP MCP clients.
4
4
  ---
5
5
 
6
- HTTP and stdio expose the same IPi tools and resource IDs. Follow the notebook skill. Retain `kernel_id` for submissions and notebook mutations, and `cell_id` for observation and interruption. HTTP transport sessions do not own Python state; reconnecting does not require a new kernel. Resource IDs identify records and do not replace authentication.
6
+ HTTP and stdio expose the same IPi tools and resource IDs. Follow the notebook skill. Retain `kernel_id` for submissions and notebook mutations, and `cell_id` for observation and interruption. HTTP transport sessions do not own Python state; reconnecting to the same server does not require a new kernel. IDs from another server are not portable; ask the owning agent to return results. Resource IDs identify records and do not replace authentication.
7
7
 
8
8
  There is no separate logical `session_id`, active-kernel selector, or whole-service kill tool. `close_kernel` ends only its named kernel. Published notebooks remain live until that kernel or the owning IPi process ends; retained records survive under the advertised storage policy.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ipinb"
7
- version = "0.3.0"
7
+ version = "0.4.0"
8
8
  description = "Persistent IPython notebooks for MCP agents"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -111,9 +111,38 @@ class Registry:
111
111
  "CREATE TABLE IF NOT EXISTS events (id TEXT, seq INTEGER, value TEXT, PRIMARY KEY(id, seq));"
112
112
  "CREATE TABLE IF NOT EXISTS debugger_commands (id TEXT PRIMARY KEY, kernel_id TEXT, scope TEXT, value TEXT);"
113
113
  "CREATE TABLE IF NOT EXISTS counters (name TEXT PRIMARY KEY, next_value INTEGER NOT NULL);"
114
+ "CREATE TABLE IF NOT EXISTS metadata (name TEXT PRIMARY KEY, value TEXT NOT NULL);"
114
115
  "INSERT OR IGNORE INTO counters VALUES ('kernel', 0);"
115
116
  "INSERT OR IGNORE INTO counters VALUES ('cell', 1);"
116
117
  )
118
+ try:
119
+ row = self.db.execute("SELECT value FROM metadata WHERE name='prefix'").fetchone()
120
+ if row is None:
121
+ if self.db.execute("SELECT 1 FROM records LIMIT 1").fetchone() is not None:
122
+ raise ValueError(
123
+ "This registry uses unqualified IDs. Start with a new server.registry_root; "
124
+ "keep the old directory to read with the previous IPi version."
125
+ )
126
+ # Decimal groups of three keep repeated model-facing handles small.
127
+ prefix = str(100_000_000 + secrets.randbelow(900_000_000))
128
+ with self.db:
129
+ self.db.execute("INSERT INTO metadata VALUES ('prefix', ?)", (prefix,))
130
+ else:
131
+ prefix = row[0]
132
+ if (
133
+ len(prefix) != 9
134
+ or not prefix.isascii()
135
+ or not prefix.isdecimal()
136
+ or prefix[0] == "0"
137
+ ):
138
+ raise ValueError(
139
+ "Invalid registry prefix; preserve the registry and restore its metadata."
140
+ )
141
+ self.prefix: str = prefix
142
+ except BaseException:
143
+ self.db.close()
144
+ self._owner_file.close()
145
+ raise
117
146
  self.records: dict[str, dict[str, Any]] = {}
118
147
  self.live: dict[str, LiveKernel] = {}
119
148
  self._changed: dict[str, asyncio.Event] = {}
@@ -171,10 +200,10 @@ class Registry:
171
200
  ).fetchone()
172
201
  assert row is not None
173
202
  number = row[0]
174
- while f"{prefix}{number}" in self.records:
203
+ while f"{self.prefix}{prefix}{number}" in self.records:
175
204
  number += 1
176
205
  self.db.execute("UPDATE counters SET next_value=? WHERE name=?", (number + 1, counter))
177
- return f"{prefix}{number}"
206
+ return f"{self.prefix}{prefix}{number}"
178
207
 
179
208
  def own_task(self, coroutine: Awaitable[Any]) -> asyncio.Task[Any]:
180
209
  task = asyncio.ensure_future(coroutine)
@@ -213,7 +242,11 @@ class Registry:
213
242
  or record["_scope"] != scope
214
243
  or (record["kind"] == "kernel") != (kind == "kernel")
215
244
  ):
216
- raise RequestFailure(f"unknown_{kind}", f"Unknown {kind}: {identifier}")
245
+ raise RequestFailure(
246
+ f"unknown_{kind}",
247
+ f"Unknown {kind}: {identifier}. Use an ID returned by this IPi server; "
248
+ "ask the owning agent to access resources created on another server.",
249
+ )
217
250
  if record.get("expired"):
218
251
  raise RequestFailure("record_expired", f"The retained {kind} payload has expired")
219
252
  return record
@@ -1208,7 +1241,7 @@ class Registry:
1208
1241
  else (record["kind"] != "kernel" and record["kernel_id"] == kernel_id)
1209
1242
  )
1210
1243
  ]
1211
- identity = "k" if kernel_id is None else kernel_id
1244
+ identity = f"{self.prefix}k" if kernel_id is None else kernel_id
1212
1245
  offset = self._cursor(cursor, identity, len(records))
1213
1246
  selected: list[dict[str, Any]] = []
1214
1247
  size = 0
@@ -3,6 +3,6 @@ name: notebook-http
3
3
  description: Use IPi's explicit persistent kernels across reconnecting HTTP MCP clients.
4
4
  ---
5
5
 
6
- HTTP and stdio expose the same IPi tools and resource IDs. Follow the notebook skill. Retain `kernel_id` for submissions and notebook mutations, and `cell_id` for observation and interruption. HTTP transport sessions do not own Python state; reconnecting does not require a new kernel. Resource IDs identify records and do not replace authentication.
6
+ HTTP and stdio expose the same IPi tools and resource IDs. Follow the notebook skill. Retain `kernel_id` for submissions and notebook mutations, and `cell_id` for observation and interruption. HTTP transport sessions do not own Python state; reconnecting to the same server does not require a new kernel. IDs from another server are not portable; ask the owning agent to return results. Resource IDs identify records and do not replace authentication.
7
7
 
8
8
  There is no separate logical `session_id`, active-kernel selector, or whole-service kill tool. `close_kernel` ends only its named kernel. Published notebooks remain live until that kernel or the owning IPi process ends; retained records survive under the advertised storage policy.
@@ -3,7 +3,9 @@ name: notebook
3
3
  description: Use persistent Python kernels for multi-step investigation, analysis, prototyping, and verification with reusable state and rich output.
4
4
  ---
5
5
 
6
- Reuse a suitable kernel ID already provided in context, or create a kernel for the required cwd and environment. Retain its `kernel_id` and pass it to submissions and notebook mutations. A starting kernel queues Python until setup completes.
6
+ Reuse a suitable kernel ID returned by this IPi server, or create a kernel for the required cwd and environment. Retain its `kernel_id` and pass it to submissions and notebook mutations. A starting kernel queues Python until setup completes.
7
+
8
+ Kernel and cell IDs belong to the IPi server that issued them; pass them unchanged. For another agent's notebook, ask that agent to run follow-up work and return results.
7
9
 
8
10
  Use IPi's native parallel execution for independent work: submit separate cells to the same kernel with `yield_time_ms=0` before waiting on their results. IPi schedules them in bounded subshells that share Python globals; no manual subshell setup is needed. Use distinct names or synchronization, and wait for prerequisite cells to succeed before submitting dependent code. Create another kernel when work needs isolated globals or incompatible process state. See [Parallel execution](references/parallel-execution.md) for submission patterns, shared-state constraints, and capacity handling.
9
11
 
@@ -3,8 +3,8 @@
3
3
  IPi exposes one optional-use debugger tool backed by IPython's Pdb engine:
4
4
 
5
5
  ```python
6
- ipdb(kernel_id="k0", cell_id="c7", command="where")
7
- ipdb(kernel_id="k0", command="break /absolute/path/model.py:42")
6
+ ipdb(kernel_id=kernel_id, cell_id=cell_id, command="where")
7
+ ipdb(kernel_id=kernel_id, command="break /absolute/path/model.py:42")
8
8
  ```
9
9
 
10
10
  Every call names a kernel. Add a cell ID for frame inspection, Python evaluation, or execution control. Omit the cell ID for kernel-wide breakpoint configuration and exception-stop policy. There is no active-target selector.
@@ -19,7 +19,7 @@ Use `where`, `up`, `down`, `args`, `p expression`, `pp expression`, `list`, or `
19
19
 
20
20
  Insert `breakpoint()` in a submitted cell or set a source breakpoint before running it. The cell reports `paused` and a source location. `step`, `next`, `return`, `until`, and `continue` use the real debugger engine. `quit` abandons that execution and unwinds its cleanup. Breakpoint configuration uses Pdb syntax, including `break`, `tbreak`, `condition`, `ignore`, `enable`, `disable`, and `clear`. Bare `clear` clears all breakpoints without prompting. Kernel-scoped source breakpoints should name a file and line; frame-relative expressions require a cell target.
21
21
 
22
- `ipdb(kernel_id="k0", command="exceptions raised")` stops when an exception is raised, before handling; this includes exceptions that user code may catch. `exceptions off` restores default postmortem-only behavior. Internal iteration termination is excluded from automatic raised-exception stops.
22
+ `ipdb(kernel_id=kernel_id, command="exceptions raised")` stops when an exception is raised, before handling; this includes exceptions that user code may catch. `exceptions off` restores default postmortem-only behavior. Internal iteration termination is excluded from automatic raised-exception stops.
23
23
 
24
24
  A live pause occupies its subshell. Other subshells and debugger commands remain usable. A pause also stops other tasks on that subshell's event loop; shared locks and mutable objects retain their normal Python behavior. There is no process-wide freeze or ability to step inside native C/CUDA operations. Interrupts and abandonment can be delayed by blocking native code or user code that suppresses cancellation.
25
25
 
@@ -1,12 +1,12 @@
1
1
  # Execution, results, and recovery
2
2
 
3
- Read this when work runs longer than one tool call, output is large, or a connection drops. For overlapping submissions, also read [Parallel execution](parallel-execution.md). Examples below are MCP tool calls; use returned IDs in place of illustrative IDs.
3
+ Read this when work runs longer than one tool call, output is large, or a connection drops. For overlapping submissions, also read [Parallel execution](parallel-execution.md). Examples below are MCP tool calls; `kernel_id` and `cell_id` stand for exact handles returned by this server.
4
4
 
5
5
  ## Submit and observe
6
6
 
7
7
  ```python
8
- ipython(kernel_id="k0", code="result = expensive_calculation()", yield_time_ms=0, request_id="calculate-1")
9
- read_cell(cell_id="c1", yield_time_ms=10000)
8
+ ipython(kernel_id=kernel_id, code="result = expensive_calculation()", yield_time_ms=0, request_id="calculate-1")
9
+ read_cell(cell_id=cell_id, yield_time_ms=10000)
10
10
  ```
11
11
 
12
12
  A `handle` means accepted, not completed. `yield_time_ms` limits how long the caller observes; it does not limit execution. A cancelled or disconnected observer leaves accepted work owned by IPi. Keep the kernel and cell IDs, then observe that same cell rather than resubmitting its code.
@@ -25,10 +25,10 @@ Large source or output bodies supply immutable MCP resource URIs. Read the retur
25
25
 
26
26
  Supply `request_id` when creating a kernel, submitting Python or Markdown, or issuing a debugger command if a lost response would make repetition risky. Reuse that key with the same operation and payload to recover its accepted record. Reusing a key for a different payload is rejected. A fresh key requests fresh work and can repeat side effects. Optional Bash also supports request IDs when enabled.
27
27
 
28
- HTTP and stdio expose the same execution API. HTTP reconnection does not require a new kernel: retain the kernel ID and use `list_cells(kernel_id=...)` when cell records need recovery. Closed or lost kernels do not contain usable live Python state. Identifiers do not replace authentication.
28
+ HTTP and stdio expose the same execution API. HTTP reconnection to the same server does not require a new kernel: retain the kernel ID and use `list_cells(kernel_id=...)` when cell records need recovery. Closed or lost kernels do not contain usable live Python state. Kernel and cell IDs belong to the IPi server that issued them; pass them unchanged. For another agent's notebook, ask that agent to run follow-up work and return results. Identifiers do not replace authentication.
29
29
 
30
30
  ## Cancellation and debugger state
31
31
 
32
- `interrupt(cell_id="c1")` requests cancellation of that execution only. Continue observing its outcome. Native blocking code, suppressed cancellation, and descendant activity can outlive the request. `close_kernel(kernel_id="k0")` discards the named kernel's live state; retained records remain available under the storage policy. Finishing an answer is not a reason to close a reusable kernel.
32
+ `interrupt(cell_id=cell_id)` requests cancellation of that execution only. Continue observing its outcome. Native blocking code, suppressed cancellation, and descendant activity can outlive the request. `close_kernel(kernel_id=kernel_id)` discards the named kernel's live state; retained records remain available under the storage policy. Finishing an answer is not a reason to close a reusable kernel.
33
33
 
34
34
  A new ordinary submission to a kernel abandons existing live debugger pauses and discards existing postmortem inspection before admission. Recovering an existing execution retry key does not repeat that cleanup. See [Debugging](debugging.md) before choosing to resume or move on.
@@ -4,7 +4,7 @@ Read this when choosing a working directory, Python environment, dependency over
4
4
 
5
5
  ## Choose the execution environment
6
6
 
7
- Reuse a suitable kernel ID already provided in context. When creating a kernel, pass an existing absolute working directory:
7
+ Reuse a suitable kernel ID returned by this IPi server. When creating a kernel, pass an existing absolute working directory:
8
8
 
9
9
  ```python
10
10
  create_kernel(cwd="/absolute/project", additional_dependencies=["numpy", "pandas"], request_id="analysis-kernel")
@@ -42,7 +42,7 @@ Python imports, file access, and Bash commands run on the target. Do not substit
42
42
  The `bash` tool is disabled by default. Set `IPI_MCP_ENABLE_BASH_TOOL=1` before server startup to advertise it. When present:
43
43
 
44
44
  ```python
45
- bash(kernel_id="k0", cmd="pwd", yield_time_ms=0, request_id="inspect-directory")
45
+ bash(kernel_id=kernel_id, cmd="pwd", yield_time_ms=0, request_id="inspect-directory")
46
46
  ```
47
47
 
48
48
  Bash runs in the selected kernel environment and follows Python's cell handles, observation, retries, and targeted cancellation. Read its retained output with `read_cell`. Like a new `ipython` submission, it moves on from existing debugger pauses in that kernel. For calculations that should reuse Python variables, imports, or live objects, use `ipython`.
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Contract
6
6
 
7
- - Use `publish(kernel_id="k0", cells={"c1": "Main result"})`. The optional mapping highlights terminal Python cells in the full live notebook. It never filters or reruns notebook content. All selected cells must belong to the named kernel.
7
+ - Use `publish(kernel_id=kernel_id, cells={cell_id: "Main result"})`. The optional mapping highlights terminal Python cells in the full live notebook. It never filters or reruns notebook content. All selected cells must belong to the named kernel.
8
8
  - Null captions highlight without text. Omitted cells retain their existing highlights; omit the map to publish without changing presentation. Empty notebooks can be published.
9
9
  - The complete mapping is validated before presentation changes. Valid highlights are retained even if endpoint creation subsequently fails.
10
10
  - A successful call returns the complete
@@ -9,8 +9,8 @@ Finish shared setup first: imports, function definitions, and any data both oper
9
9
  For example, suppose a completed setup cell defined `load_metadata()` and `summarize_metrics()`, and neither operation depends on or mutates the other's state. These are MCP tool calls, not Python to execute inside the kernel:
10
10
 
11
11
  ```python
12
- ipython(kernel_id="k0", code="metadata = load_metadata()", yield_time_ms=0)
13
- ipython(kernel_id="k0", code="metrics = summarize_metrics()", yield_time_ms=0)
12
+ ipython(kernel_id=kernel_id, code="metadata = load_metadata()", yield_time_ms=0)
13
+ ipython(kernel_id=kernel_id, code="metrics = summarize_metrics()", yield_time_ms=0)
14
14
  ```
15
15
 
16
16
  Use each returned cell ID to observe that operation: