marimo-export 0.0.2__tar.gz → 0.0.4__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 (184) hide show
  1. marimo_export-0.0.4/.agent-plugin/plugin.json +10 -0
  2. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/SKILL.md +231 -0
  3. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/agents/openai.yaml +4 -0
  4. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/assets/app/.gitignore +5 -0
  5. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/assets/app/index.html +19 -0
  6. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/assets/app/pnpm-workspace.yaml +2 -0
  7. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/assets/app/src/main.ts +4 -0
  8. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/assets/app/src/style.css +89 -0
  9. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/assets/app/src/vite-env.d.ts +3 -0
  10. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/assets/app/tsconfig.json +21 -0
  11. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/assets/app/vite.config.ts +8 -0
  12. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/references/contracts.md +161 -0
  13. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/references/workflow.md +160 -0
  14. marimo_export-0.0.4/.agent-plugin/skills/notebook-to-static-app/scripts/scaffold_app.py +434 -0
  15. {marimo_export-0.0.2 → marimo_export-0.0.4}/PKG-INFO +111 -21
  16. marimo_export-0.0.4/README.md +207 -0
  17. {marimo_export-0.0.2 → marimo_export-0.0.4}/pyproject.toml +16 -5
  18. {marimo_export-0.0.2 → marimo_export-0.0.4}/pyproject.toml.orig +13 -5
  19. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_cli/arguments.py +22 -22
  20. marimo_export-0.0.2/src/marimo_export/_services/identity.py → marimo_export-0.0.4/src/marimo_export/_environment.py +19 -200
  21. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/cache/attempts.py +59 -2
  22. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/cache/lifecycle.py +3 -0
  23. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/cache/patch.py +11 -2
  24. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/cache/probe.py +2 -0
  25. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/child_run.py +4 -1
  26. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/execution.py +48 -11
  27. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/managed_kernel.py +6 -4
  28. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/projections.py +30 -28
  29. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/release.json +6 -5
  30. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/replay.py +6 -2
  31. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_publication.py +13 -6
  32. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/observations.py +29 -19
  33. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/preparation.py +33 -24
  34. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/maintenance.py +10 -5
  35. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_services/export_artifacts.py +9 -13
  36. marimo_export-0.0.4/src/marimo_export/_services/identity.py +206 -0
  37. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_services/write_export.py +3 -1
  38. marimo_export-0.0.4/src/marimo_export/agent.py +113 -0
  39. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/delivery.py +52 -1
  40. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/prepared.py +18 -2
  41. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/progress.py +4 -0
  42. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/repository.py +11 -2
  43. marimo_export-0.0.2/README.md +0 -119
  44. {marimo_export-0.0.2 → marimo_export-0.0.4}/LICENSE +0 -0
  45. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/__init__.py +0 -0
  46. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_blob_asset.py +0 -0
  47. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_build.py +0 -0
  48. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_cell_ids.py +0 -0
  49. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_cli/__init__.py +0 -0
  50. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_cli/commands.py +0 -0
  51. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_cli/errors.py +0 -0
  52. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_cli/render.py +0 -0
  53. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_client_protocol.py +0 -0
  54. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_control_roots.py +0 -0
  55. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_delivery.py +0 -0
  56. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_delivery_validation.py +0 -0
  57. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_diagnostics.py +0 -0
  58. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_directory.py +0 -0
  59. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_directory_native.py +0 -0
  60. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_directory_security.py +0 -0
  61. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_directory_target.py +0 -0
  62. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_execution/__init__.py +0 -0
  63. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_execution/plan.py +0 -0
  64. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_format.py +0 -0
  65. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_http_url.py +0 -0
  66. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_identity.py +0 -0
  67. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_json.py +0 -0
  68. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_limits.py +0 -0
  69. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/__init__.py +0 -0
  70. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/anywidget.py +0 -0
  71. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/blob.py +0 -0
  72. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/bridge.py +0 -0
  73. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/capabilities.py +0 -0
  74. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/__init__.py +0 -0
  75. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/anywidget.py +0 -0
  76. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/anywidget_assets.py +0 -0
  77. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/blob.py +0 -0
  78. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/cache/__init__.py +0 -0
  79. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/cache/barrier.py +0 -0
  80. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/cache/host.py +0 -0
  81. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/cache/loader.py +0 -0
  82. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/cache/receipts.py +0 -0
  83. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/exporter_identity.py +0 -0
  84. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/exporters.py +0 -0
  85. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/file_closure.py +0 -0
  86. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/inspection.py +0 -0
  87. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/kernel.py +0 -0
  88. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/managed_server.py +0 -0
  89. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/observations.py +0 -0
  90. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/output_data.py +0 -0
  91. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/receipts.py +0 -0
  92. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/compat/transfer.py +0 -0
  93. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/composition.py +0 -0
  94. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/entrypoints.py +0 -0
  95. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/managed_server.py +0 -0
  96. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_marimo/transfer.py +0 -0
  97. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_media_type.py +0 -0
  98. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_notebook.py +0 -0
  99. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_observations/__init__.py +0 -0
  100. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_observations/candidates.py +0 -0
  101. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_observations/ledger.py +0 -0
  102. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_observations/queue.py +0 -0
  103. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_observations/source.py +0 -0
  104. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_portable.py +0 -0
  105. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_prepared_integrity.py +0 -0
  106. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_remote/__init__.py +0 -0
  107. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_remote/auth.py +0 -0
  108. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_remote/client.py +0 -0
  109. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_remote/managed.py +0 -0
  110. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_remote/sse.py +0 -0
  111. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_remote/windows_job.py +0 -0
  112. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/__init__.py +0 -0
  113. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/artifact_access.py +0 -0
  114. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/artifact_commit.py +0 -0
  115. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/artifact_context.py +0 -0
  116. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/artifact_lifecycle.py +0 -0
  117. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/artifacts.py +0 -0
  118. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/capabilities.py +0 -0
  119. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/files.py +0 -0
  120. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/handles.py +0 -0
  121. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/leases.py +0 -0
  122. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/models.py +0 -0
  123. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/paths.py +0 -0
  124. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/__init__.py +0 -0
  125. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/artifacts.py +0 -0
  126. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/catalog.py +0 -0
  127. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/generations.py +0 -0
  128. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/leases.py +0 -0
  129. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/observations.py +0 -0
  130. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/open.py +0 -0
  131. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/prepared_states.py +0 -0
  132. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/records.py +0 -0
  133. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/recovery.py +0 -0
  134. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/retention.py +0 -0
  135. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/retired.py +0 -0
  136. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/schema.py +0 -0
  137. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_repository/sqlite/status.py +0 -0
  138. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_secure_io.py +0 -0
  139. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_selector.py +0 -0
  140. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_services/__init__.py +0 -0
  141. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_services/capture_export.py +0 -0
  142. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_services/plan_export.py +0 -0
  143. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_services/plan_wire.py +0 -0
  144. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_services/preparation_support.py +0 -0
  145. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_services/prepare_export.py +0 -0
  146. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_services/state_preparation.py +0 -0
  147. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_snapshot.py +0 -0
  148. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/_writer.py +0 -0
  149. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/cli.py +0 -0
  150. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/client.py +0 -0
  151. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/descriptors.py +0 -0
  152. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/diagnostics.py +0 -0
  153. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/errors.py +0 -0
  154. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/__init__.py +0 -0
  155. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/_anywidget_payload.py +0 -0
  156. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/_definitions.py +0 -0
  157. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/_optional.py +0 -0
  158. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/_runtime/__init__.py +0 -0
  159. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/_runtime/altair.py +0 -0
  160. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/_runtime/anywidget.py +0 -0
  161. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/_runtime/blob.py +0 -0
  162. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/_runtime/parquet.py +0 -0
  163. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/_spec.py +0 -0
  164. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/altair.py +0 -0
  165. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/anywidget.py +0 -0
  166. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/blob.py +0 -0
  167. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/exporters/parquet.py +0 -0
  168. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/index.py +0 -0
  169. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/inspection.py +0 -0
  170. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/integration.py +0 -0
  171. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/limits.py +0 -0
  172. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/manifest.py +0 -0
  173. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/observations.py +0 -0
  174. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/outputs.py +0 -0
  175. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/planning.py +0 -0
  176. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/producer.py +0 -0
  177. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/publication.py +0 -0
  178. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/py.typed +0 -0
  179. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/reader.py +0 -0
  180. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/result.py +0 -0
  181. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/sessions.py +0 -0
  182. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/spec.py +0 -0
  183. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/verification.py +0 -0
  184. {marimo_export-0.0.2 → marimo_export-0.0.4}/src/marimo_export/wire.py +0 -0
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
+ "name": "marimo-export",
4
+ "description": "Turn selected marimo notebook states into verified exports and static applications.",
5
+ "author": {
6
+ "name": "marimo team"
7
+ },
8
+ "repository": "https://github.com/marimo-team/marimo-export",
9
+ "keywords": ["marimo", "notebooks", "static-apps", "agent-skills"]
10
+ }
@@ -0,0 +1,231 @@
1
+ ---
2
+ name: notebook-to-static-app
3
+ description: Turn an existing marimo Python notebook into a polished static HTML, CSS, and TypeScript application by designing an ExportSpec, creating and capturing finite notebook states with marimo-export, loading outputs through @marimo-team/marimo-export, and validating the deployed browser experience. Use when a user points to a marimo .py notebook and wants a CDN-deployable interactive app that runs with no Python server or Python WebAssembly runtime.
4
+ ---
5
+
6
+ # Notebook to Static App
7
+
8
+ Create a user-facing web application from completed marimo executions. Keep the
9
+ notebook unchanged. Precompute the choices the audience needs, then make the
10
+ browser experience feel authored for their task.
11
+
12
+ ## Read first
13
+
14
+ Read:
15
+
16
+ - [references/workflow.md](references/workflow.md) for workspace setup and the
17
+ exact build or capture commands
18
+ - [references/contracts.md](references/contracts.md) for ExportSpec, exporter,
19
+ loader, and state-transition contracts
20
+
21
+ Inspect the current marimo-export docs and source when a command or type differs
22
+ from the references. The checkout is authoritative.
23
+
24
+ ## Invariants
25
+
26
+ - Leave the source notebook byte-for-byte unchanged.
27
+ - Use notebook definition names in state-row keys and output selectors.
28
+ - Run every selected output through normal marimo execution.
29
+ - Treat browser choices as a finite product surface, not a free-form Python
30
+ prompt.
31
+ - Choose CLI `build` for a saved file and CLI `capture` for an existing live
32
+ session. Both write a deployment directory. Python `capture()` returns a
33
+ leased prepared export.
34
+ - The deployed app must run from static files with no Python process.
35
+ - Freeze every notebook data dependency into the export. Mounted charts must
36
+ not fetch their source dataset at runtime.
37
+ - Use exported values as the data source. Do not replace failed notebook data
38
+ with fixtures or invented values.
39
+ - Keep implementation terminology out of the visible app. Users should not see
40
+ export, state, codec, loader, cache, notebook, or Python unless the product
41
+ itself teaches those concepts.
42
+
43
+ ## Workflow
44
+
45
+ ### 1. Understand the notebook
46
+
47
+ Read the complete notebook before choosing outputs. Identify:
48
+
49
+ - the audience and decision the notebook can support
50
+ - authored variables and UI controls that change meaningful results
51
+ - expensive or environment-dependent calculations
52
+ - definitions that contain data, metrics, charts, images, or widgets
53
+ - browser interactions that can continue without another Python execution
54
+
55
+ Write one internal product sentence:
56
+
57
+ > `<audience>` uses this app to `<decision or task>` using `<notebook result>`.
58
+
59
+ Reject an app concept that merely displays notebook outputs or demonstrates
60
+ marimo-export features.
61
+
62
+ ### 2. Choose the finite interaction model
63
+
64
+ Design three to seven named states unless the notebook supports a genuinely
65
+ different meaningful range. Each state should represent a recognizable scenario,
66
+ policy, cohort, threshold, or comparison.
67
+
68
+ Use sparse overrides. Let omitted inputs come from the captured baseline.
69
+ Prefer a small set of high-value choices over a Cartesian product of every
70
+ possible control.
71
+
72
+ Choose outputs that let the browser answer the product question. A strong app
73
+ usually combines:
74
+
75
+ - one or two scalar summaries
76
+ - one primary visual or interactive value
77
+ - one inspectable table, array, or detail view
78
+
79
+ Export only values the application loads.
80
+
81
+ ### 3. Create the app workspace
82
+
83
+ Resolve `scripts/scaffold_app.py` through `marimo_export.agent.agent_skill()` and
84
+ create the local Python and Vite workspace from the notebook's PEP 723
85
+ dependencies. Select only the browser loader families the app will import.
86
+
87
+ Treat the generated `src/main.ts` as a loading shell. Replace it with the real
88
+ application after the ExportSpec is known.
89
+
90
+ ### 4. Inspect the notebook boundary
91
+
92
+ For `build`, run:
93
+
94
+ ```bash
95
+ uv run --project "$STATIC_APP_DIR" marimo-export inspect "$NOTEBOOK_PATH" --json
96
+ ```
97
+
98
+ For `capture`, set `NOTEBOOK_PORT` and `SESSION_ID`, then run:
99
+
100
+ ```bash
101
+ uv run --project "$STATIC_APP_DIR" marimo-export inspect \
102
+ "http://127.0.0.1:$NOTEBOOK_PORT" \
103
+ --session "$SESSION_ID" \
104
+ --json
105
+ ```
106
+
107
+ Both commands return definition and cell records before state preparation.
108
+
109
+ Do not infer a definition from displayed prose or a local variable whose name
110
+ starts with `_`. Use the inspection result.
111
+
112
+ ### 5. Author and preflight the ExportSpec
113
+
114
+ Create `<name>.export.yaml` beside the app. Use domain names for states and
115
+ published output names.
116
+
117
+ Run planning after authoring the spec. Correct missing input or output names
118
+ before preparation:
119
+
120
+ ```bash
121
+ uv run --project "$STATIC_APP_DIR" marimo-export plan "$NOTEBOOK_PATH" \
122
+ --spec "$STATIC_APP_DIR/app.export.yaml" \
123
+ --json
124
+ ```
125
+
126
+ The plan reports inferred inputs, normalized states, the default, observations,
127
+ reusable fingerprints, and missing fingerprints.
128
+
129
+ Choose the narrowest representation that preserves the browser experience:
130
+
131
+ - keep supported scalars, NumPy arrays, Arrow tables, and `BlobAsset` values
132
+ native
133
+ - use Parquet for browser-readable table rows
134
+ - use Vega-Lite for interactive Altair charts
135
+ - use PNG when the audience needs a fixed chart image
136
+ - use AnyWidget bundles when the widget's saved browser model supports the
137
+ audience's local interaction
138
+ - add a focused custom exporter and paired loader when no built-in
139
+ representation fits
140
+
141
+ Inspect exported Vega-Lite data references. When a notebook chart points to a
142
+ remote dataset, use an export-time representation that embeds the data or
143
+ pair the chart with an exported table and rebuild the chart in the browser.
144
+
145
+ ### 6. Create and verify the export
146
+
147
+ Use `build` when the workflow owns notebook startup, execution, cleanup, and the
148
+ deployment directory. Write to `public/export`, then run `marimo-export verify`
149
+ before the browser build.
150
+
151
+ Use CLI `capture --output public/export` when a running kernel already owns the
152
+ configured environment or completed computation. Use the Python `capture()`
153
+ context when the app needs to inspect, serve, or retain the prepared generation
154
+ before writing.
155
+
156
+ Run one producer mode for an app workflow. Do not hand-edit `index.json` or its
157
+ assets.
158
+
159
+ ### 7. Build the browser application
160
+
161
+ Open `./export/`, resolve named states, and load outputs explicitly. For a
162
+ changing prepared publication, use `@marimo-team/marimo-export/prepared` with one
163
+ `PreparedStateController` and an application-owned `PreparedStatePort`.
164
+
165
+ Keep one transition owner that:
166
+
167
+ 1. aborts stale loads
168
+ 2. disposes mounted charts or widgets
169
+ 3. loads all outputs for the selected state
170
+ 4. commits the new view only if the transition is still current
171
+ 5. renders a recoverable error when loading fails
172
+
173
+ Make state controls shareable through a URL hash or query parameter.
174
+
175
+ Follow the marimo design system:
176
+
177
+ - use compact controls, slate borders, white or near-black work surfaces, and
178
+ restrained blue interaction
179
+ - use PT Sans for UI text and Lora for editorial headings
180
+ - use borders before shadows
181
+ - keep charts and tables full-width and overflow-safe
182
+ - avoid gradients, oversized marketing heroes, nested cards, decorative
183
+ animation, and one-off palettes
184
+
185
+ Use one clear visual direction for the domain. Keep the app inspectable and
186
+ small. Prefer vanilla DOM code until a real composition problem justifies a
187
+ framework.
188
+
189
+ ### 8. Validate the user boundary
190
+
191
+ Run:
192
+
193
+ - Python export verification for the selected producer mode
194
+ - TypeScript type checking and production build
195
+ - a static preview with the final export
196
+ - browser checks at desktop and mobile widths
197
+
198
+ Use a dedicated `agent-browser --session` name. Exercise every state control and
199
+ at least one interaction inside each mounted chart or widget. Confirm:
200
+
201
+ - visible results change with the selected domain scenario
202
+ - rapid changes do not leave stale content
203
+ - no console or page errors occur
204
+ - no page-level horizontal overflow occurs
205
+ - the final app makes no request to a Python server
206
+ - notebook result data loads from the static app origin
207
+ - the UI contains no implementation commentary
208
+
209
+ Close the browser session and notebook server after validation.
210
+
211
+ ## Failure discipline
212
+
213
+ Treat failures as product evidence.
214
+
215
+ - Missing definition: inspect the live session and correct the spec.
216
+ - Missing Python package: add the notebook's declared dependency to the app
217
+ environment.
218
+ - Unsupported output: choose a data definition or write a focused exporter and
219
+ loader pair.
220
+ - Custom exporter import failure: keep its module in the app and run the
221
+ notebook, build, and capture with the app directory on `PYTHONPATH`.
222
+ - Capture package mismatch: run the notebook from the app environment with the
223
+ same marimo-export version and implementation.
224
+ - Loader resolution failure: consume the packed browser package, then install
225
+ the peer dependency for the imported loader.
226
+ - Blank or duplicated mount: make disposal and abort ownership explicit.
227
+ - Unhelpful state matrix: return to the audience decision and redesign the
228
+ states rather than adding more.
229
+
230
+ Record the failed command, error, cause, and correction while working. Keep
231
+ that diagnostic record out of the visible app.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Notebook to Static App"
3
+ short_description: "Turn marimo notebooks into static web apps"
4
+ default_prompt: "Use $notebook-to-static-app to turn this marimo notebook into a polished static web app."
@@ -0,0 +1,5 @@
1
+ .venv/
2
+ node_modules/
3
+ dist/
4
+ .exports/
5
+ public/export/
@@ -0,0 +1,19 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta name="color-scheme" content="light dark" />
7
+ <link
8
+ rel="icon"
9
+ href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='6' fill='%230880ea'/%3E%3Cpath d='M8 22V10h3l5 7 5-7h3v12h-3v-7l-5 7-5-7v7Z' fill='white'/%3E%3C/svg%3E"
10
+ />
11
+ <title>__APP_TITLE__</title>
12
+ </head>
13
+ <body>
14
+ <main id="app" aria-live="polite">
15
+ <p class="loading">Loading…</p>
16
+ </main>
17
+ <script type="module" src="./src/main.ts"></script>
18
+ </body>
19
+ </html>
@@ -0,0 +1,4 @@
1
+ import "./style.css";
2
+
3
+ const root = document.querySelector<HTMLElement>("#app");
4
+ if (root === null) throw new Error("Application root is missing.");
@@ -0,0 +1,89 @@
1
+ :root {
2
+ color: #0f172a;
3
+ background: #ffffff;
4
+ font-family: "PT Sans", sans-serif;
5
+ font-synthesis: none;
6
+ text-rendering: optimizeLegibility;
7
+ }
8
+
9
+ * {
10
+ box-sizing: border-box;
11
+ }
12
+
13
+ body {
14
+ margin: 0;
15
+ min-width: 320px;
16
+ min-height: 100vh;
17
+ }
18
+
19
+ button,
20
+ input,
21
+ select,
22
+ textarea {
23
+ font: inherit;
24
+ }
25
+
26
+ button,
27
+ select,
28
+ input {
29
+ min-height: 2.25rem;
30
+ border: 1px solid #e2e8f0;
31
+ border-radius: 6px;
32
+ }
33
+
34
+ button {
35
+ padding: 0.375rem 0.75rem;
36
+ color: #0f172a;
37
+ background: #f1f5f9;
38
+ cursor: pointer;
39
+ }
40
+
41
+ button[aria-pressed="true"],
42
+ button[data-active="true"] {
43
+ color: #f8fafc;
44
+ background: #0880ea;
45
+ border-color: #0880ea;
46
+ }
47
+
48
+ button:focus-visible,
49
+ select:focus-visible,
50
+ input:focus-visible,
51
+ a:focus-visible {
52
+ outline: 2px solid #94a3b8;
53
+ outline-offset: 2px;
54
+ }
55
+
56
+ #app {
57
+ width: min(100% - 2rem, 1110px);
58
+ margin-inline: auto;
59
+ padding-block: 2rem;
60
+ }
61
+
62
+ h1,
63
+ h2,
64
+ h3 {
65
+ font-family: Lora, serif;
66
+ }
67
+
68
+ .loading {
69
+ color: #64748b;
70
+ }
71
+
72
+ @media (prefers-color-scheme: dark) {
73
+ :root {
74
+ color: #eceeed;
75
+ background: #181c1a;
76
+ }
77
+
78
+ button,
79
+ select,
80
+ input {
81
+ color: #eceeed;
82
+ background: #252927;
83
+ border-color: #3b403e;
84
+ }
85
+
86
+ .loading {
87
+ color: #aab2af;
88
+ }
89
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module "*.css";
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowImportingTsExtensions": true,
4
+ "exactOptionalPropertyTypes": true,
5
+ "forceConsistentCasingInFileNames": true,
6
+ "isolatedModules": true,
7
+ "lib": ["ES2023", "DOM", "DOM.Iterable"],
8
+ "module": "ESNext",
9
+ "moduleResolution": "Bundler",
10
+ "noEmit": true,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "noImplicitOverride": true,
13
+ "noUncheckedIndexedAccess": true,
14
+ "resolveJsonModule": true,
15
+ "skipLibCheck": true,
16
+ "strict": true,
17
+ "target": "ES2022",
18
+ "verbatimModuleSyntax": true
19
+ },
20
+ "include": ["src/**/*.ts", "vite.config.ts"]
21
+ }
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from "vite-plus";
2
+
3
+ export default defineConfig({
4
+ base: "./",
5
+ build: {
6
+ target: "es2022",
7
+ },
8
+ });
@@ -0,0 +1,161 @@
1
+ # marimo-export contracts
2
+
3
+ ## ExportSpec
4
+
5
+ Declare one default, sparse states, and published outputs:
6
+
7
+ ```yaml
8
+ schema: marimo-export.spec.v2
9
+ default_state: national
10
+ states:
11
+ national: {}
12
+ northeast:
13
+ region: Northeast
14
+ strict:
15
+ threshold_slider: 0.8
16
+ outputs:
17
+ headline:
18
+ source: { kind: json, selector: summary }
19
+ chart:
20
+ source: { kind: export, selector: comparison_chart }
21
+ exporter: altair.vegalite
22
+ rows:
23
+ source: { kind: export, selector: filtered_table }
24
+ exporter: parquet.table
25
+ ```
26
+
27
+ Planning infers inputs from output dependencies and state-row keys. Sparse rows
28
+ inherit omitted inputs from one baseline. Equivalent rows retain their aliases
29
+ and share one fingerprint.
30
+
31
+ Run `marimo-export inspect NOTEBOOK --json` to discover definitions and cells.
32
+ Run `marimo-export plan NOTEBOOK --spec FILE --json` to inspect normalized and
33
+ reusable work.
34
+
35
+ ## Preparation
36
+
37
+ ```python
38
+ from marimo_export import ExportSpec, prepare
39
+
40
+ spec = ExportSpec.from_file("app.export.yaml")
41
+ with prepare("notebook.py", spec=spec) as prepared:
42
+ prepared.write("public/export", replace=True)
43
+ ```
44
+
45
+ `prepare()` opens a notebook only when repository work is missing. `capture()`
46
+ returns the same leased `PreparedExport` from a named live session.
47
+
48
+ `PreparedExport` can:
49
+
50
+ - open the immutable `NotebookExport`
51
+ - lease one file through `asset(relative)`
52
+ - create `marimo-export.prepared.v1` browser metadata through `manifest()`
53
+ - copy and verify a deployment directory through `write()`
54
+ - report prepared and reused state fingerprints
55
+
56
+ Keep the handle open while serving its files. Close independently leased assets
57
+ after their responses finish.
58
+
59
+ ## Representations
60
+
61
+ | Notebook result | Exporter or source | Browser loader |
62
+ | --------------- | ------------------------------ | ---------------------- |
63
+ | JSON value | `OutputSpec.json()` | `jsonLoader()` |
64
+ | Native scalar | `OutputSpec.native()` | `scalarLoader()` |
65
+ | NumPy array | `OutputSpec.native()` | `numpyLoader()` |
66
+ | Arrow table | `OutputSpec.native()` | `arrowTableLoader()` |
67
+ | Marimo output | `OutputSpec.output()` | `marimoOutputLoader()` |
68
+ | Marimo cell | `OutputSpec.cell()` | `marimoCellLoader()` |
69
+ | DataFrame | `parquet.table` | `parquetRowsLoader()` |
70
+ | Altair chart | `altair.vegalite` | `vegaLiteLoader()` |
71
+ | PNG | `altair.png` | `imageLoader()` |
72
+ | AnyWidget | `anywidget.bundle` | `anyWidgetLoader()` |
73
+ | Custom value | callable returning `BlobAsset` | custom loader |
74
+
75
+ Each descriptor exposes codec, media type, originating Python type, and an inline
76
+ value or content-addressed asset.
77
+
78
+ ## Immutable browser entry
79
+
80
+ ```ts
81
+ import { openExport } from "@marimo-team/marimo-export";
82
+ import { jsonLoader } from "@marimo-team/marimo-export/loader/json";
83
+
84
+ const notebookExport = await openExport("./export/");
85
+ const state = notebookExport.defaultState;
86
+ const headline = await state.output("headline").load(jsonLoader());
87
+ ```
88
+
89
+ Use `state(alias)`, `resolve(completeInputs)`, or `state.resolve(patch)` to select
90
+ another exported vector.
91
+
92
+ ## Prepared browser entry
93
+
94
+ ```ts
95
+ import { jsonLoader } from "@marimo-team/marimo-export/loader/json";
96
+ import {
97
+ PreparedPublicationRefresh,
98
+ PreparedStateController,
99
+ type PreparedStatePort,
100
+ } from "@marimo-team/marimo-export/prepared";
101
+
102
+ const port: PreparedStatePort = {
103
+ async apply({ next }, signal) {
104
+ const headline = await next.state.output("headline").load(jsonLoader(), { signal });
105
+ signal.throwIfAborted();
106
+ document.querySelector("#headline")!.textContent = String(headline);
107
+ },
108
+ };
109
+
110
+ const controller = new PreparedStateController(port);
111
+ const manifestUrl = new URL("/runtime/prepared.json", location.href);
112
+ const refresh = new PreparedPublicationRefresh(manifestUrl, controller);
113
+
114
+ await refresh.start();
115
+ await controller.updateInputs({ region: "Northeast" });
116
+ ```
117
+
118
+ The port loads and commits the complete application state. Stage multi-output
119
+ views before changing visible hosts. `restore()` can reinstate the last committed
120
+ publication after a failure.
121
+
122
+ ## Custom BlobAsset pair
123
+
124
+ Python:
125
+
126
+ ```python
127
+ import json
128
+
129
+ from marimo_export.outputs import BlobAsset
130
+
131
+
132
+ def encode(value: object) -> BlobAsset:
133
+ return BlobAsset(
134
+ data=json.dumps(value).encode(),
135
+ media_type="application/vnd.example.summary.v1+json",
136
+ filename="summary.json",
137
+ )
138
+ ```
139
+
140
+ TypeScript:
141
+
142
+ ```ts
143
+ import { defineBlobAssetLoader } from "@marimo-team/marimo-export";
144
+
145
+ const summaryLoader = defineBlobAssetLoader({
146
+ mediaTypes: "application/vnd.example.summary.v1+json",
147
+ load({ payload, signal }) {
148
+ signal?.throwIfAborted();
149
+ return JSON.parse(new TextDecoder().decode(payload.data));
150
+ },
151
+ });
152
+ ```
153
+
154
+ ## Trust boundary
155
+
156
+ `build`, `prepare`, `capture`, planning that requires inspection, and notebook
157
+ inspection execute notebook or exporter code with the environment's file,
158
+ credential, network, and package access.
159
+
160
+ Opening and verifying parse inert records. Mounting AnyWidget, Vega-Lite, or a
161
+ custom interactive value grants its module browser page authority.