prompt_objects 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +142 -0
  3. data/README.md +211 -19
  4. data/exe/poop +5 -0
  5. data/exe/prompt_objects +1 -1108
  6. data/exe/prompt_objects_mcp +5 -3
  7. data/lib/prompt_objects/capability.rb +33 -0
  8. data/lib/prompt_objects/cli/diagnostics_command.rb +69 -0
  9. data/lib/prompt_objects/cli/env_command.rb +435 -0
  10. data/lib/prompt_objects/cli/events_command.rb +145 -0
  11. data/lib/prompt_objects/cli/explore_command.rb +155 -0
  12. data/lib/prompt_objects/cli/helpers.rb +91 -0
  13. data/lib/prompt_objects/cli/message_command.rb +216 -0
  14. data/lib/prompt_objects/cli/repl_command.rb +366 -0
  15. data/lib/prompt_objects/cli/serve_command.rb +162 -0
  16. data/lib/prompt_objects/cli.rb +64 -422
  17. data/lib/prompt_objects/connectors/base.rb +16 -29
  18. data/lib/prompt_objects/connectors/mcp.rb +82 -98
  19. data/lib/prompt_objects/domain/records.rb +45 -0
  20. data/lib/prompt_objects/environment/exporter.rb +5 -4
  21. data/lib/prompt_objects/environment/git.rb +21 -1
  22. data/lib/prompt_objects/environment/importer.rb +5 -4
  23. data/lib/prompt_objects/environment/manager.rb +44 -6
  24. data/lib/prompt_objects/environment/manifest.rb +26 -4
  25. data/lib/prompt_objects/environment.rb +1350 -18
  26. data/lib/prompt_objects/execution/blocking_executor.rb +88 -0
  27. data/lib/prompt_objects/execution/context.rb +137 -0
  28. data/lib/prompt_objects/execution/contracts.rb +59 -0
  29. data/lib/prompt_objects/execution/permit_pool.rb +49 -0
  30. data/lib/prompt_objects/execution/policy.rb +47 -0
  31. data/lib/prompt_objects/execution/resource_lock_manager.rb +63 -0
  32. data/lib/prompt_objects/execution/runner.rb +498 -0
  33. data/lib/prompt_objects/execution/scheduler.rb +325 -0
  34. data/lib/prompt_objects/llm/factory.rb +4 -4
  35. data/lib/prompt_objects/llm/gemini_adapter.rb +25 -8
  36. data/lib/prompt_objects/llm/openai_adapter.rb +9 -1
  37. data/lib/prompt_objects/llm/pricing.rb +9 -2
  38. data/lib/prompt_objects/llm/response.rb +9 -4
  39. data/lib/prompt_objects/loader.rb +28 -1
  40. data/lib/prompt_objects/mcp/server.rb +6 -3
  41. data/lib/prompt_objects/mcp/tools/get_conversation.rb +15 -11
  42. data/lib/prompt_objects/mcp/tools/get_pending_requests.rb +2 -2
  43. data/lib/prompt_objects/mcp/tools/respond_to_request.rb +3 -3
  44. data/lib/prompt_objects/mcp/tools/send_message.rb +42 -32
  45. data/lib/prompt_objects/operations/diagnostics.rb +115 -0
  46. data/lib/prompt_objects/operations/retention.rb +75 -0
  47. data/lib/prompt_objects/operations/run_trace_builder.rb +152 -0
  48. data/lib/prompt_objects/primitives/http_get.rb +2 -0
  49. data/lib/prompt_objects/primitives/list_files.rb +2 -0
  50. data/lib/prompt_objects/primitives/read_file.rb +2 -0
  51. data/lib/prompt_objects/primitives/think.rb +36 -0
  52. data/lib/prompt_objects/primitives/write_file.rb +9 -0
  53. data/lib/prompt_objects/prompt_object.rb +190 -432
  54. data/lib/prompt_objects/repositories/artifact_repository.rb +109 -0
  55. data/lib/prompt_objects/repositories/base_repository.rb +37 -0
  56. data/lib/prompt_objects/repositories/definition_repository.rb +36 -0
  57. data/lib/prompt_objects/repositories/env_data_repository.rb +103 -0
  58. data/lib/prompt_objects/repositories/event_repository.rb +105 -0
  59. data/lib/prompt_objects/repositories/message_repository.rb +73 -0
  60. data/lib/prompt_objects/repositories/run_repository.rb +254 -0
  61. data/lib/prompt_objects/repositories/thread_repository.rb +87 -0
  62. data/lib/prompt_objects/repositories/tool_execution_repository.rb +88 -0
  63. data/lib/prompt_objects/repositories/workspace_session_repository.rb +61 -0
  64. data/lib/prompt_objects/server/api/routes.rb +561 -52
  65. data/lib/prompt_objects/server/app.rb +134 -1
  66. data/lib/prompt_objects/server/file_watcher.rb +9 -0
  67. data/lib/prompt_objects/server/public/assets/index-BjKlODDD.js +90 -0
  68. data/lib/prompt_objects/server/public/assets/index-w3fpIb5c.css +1 -0
  69. data/lib/prompt_objects/server/public/index.html +2 -2
  70. data/lib/prompt_objects/server/websocket_handler.rb +202 -207
  71. data/lib/prompt_objects/server.rb +170 -1
  72. data/lib/prompt_objects/service.rb +129 -0
  73. data/lib/prompt_objects/session/store.rb +774 -15
  74. data/lib/prompt_objects/universal/add_capability.rb +1 -1
  75. data/lib/prompt_objects/universal/create_capability.rb +4 -2
  76. data/lib/prompt_objects/universal/delete_env_data.rb +78 -0
  77. data/lib/prompt_objects/universal/delete_primitive.rb +1 -1
  78. data/lib/prompt_objects/universal/dispatch_po.rb +54 -0
  79. data/lib/prompt_objects/universal/get_env_data.rb +58 -0
  80. data/lib/prompt_objects/universal/get_run_status.rb +30 -0
  81. data/lib/prompt_objects/universal/join_runs.rb +35 -0
  82. data/lib/prompt_objects/universal/list_env_data.rb +57 -0
  83. data/lib/prompt_objects/universal/modify_primitive.rb +1 -1
  84. data/lib/prompt_objects/universal/render_artifact.rb +91 -0
  85. data/lib/prompt_objects/universal/request_primitive.rb +1 -1
  86. data/lib/prompt_objects/universal/set_env_data.rb +101 -0
  87. data/lib/prompt_objects/version.rb +5 -0
  88. data/lib/prompt_objects.rb +36 -6
  89. data/objects/coordinator.md +8 -4
  90. data/templates/arc-agi-1/objects/data_manager.md +2 -2
  91. data/templates/arc-agi-1/objects/observer.md +6 -2
  92. data/templates/arc-agi-1/objects/solver.md +14 -4
  93. data/templates/arc-agi-1/objects/verifier.md +6 -2
  94. data/templates/arc-agi-3/manifest.yml +19 -0
  95. data/templates/arc-agi-3/objects/analyst.md +79 -0
  96. data/templates/arc-agi-3/objects/player.md +76 -0
  97. data/templates/arc-agi-3/objects/strategist.md +97 -0
  98. data/templates/arc-agi-3/primitives/action_log.rb +133 -0
  99. data/templates/arc-agi-3/primitives/arc3_api.rb +223 -0
  100. data/templates/arc-agi-3/primitives/arc3_scorecard.rb +131 -0
  101. data/templates/arc-agi-3/primitives/frame_diff.rb +143 -0
  102. data/templates/arc-agi-3/primitives/frame_info.rb +96 -0
  103. data/templates/arc-agi-3/primitives/render_frame.rb +140 -0
  104. data/templates/basic/objects/basic.md +11 -3
  105. data/templates/chiptune/extras/sonic_pi_boot.rb +220 -0
  106. data/templates/chiptune/manifest.yml +20 -0
  107. data/templates/chiptune/objects/conductor.md +184 -0
  108. data/templates/chiptune/objects/sonic_pi.md +65 -0
  109. data/templates/chiptune/objects/voice_bass.md +44 -0
  110. data/templates/chiptune/objects/voice_lead.md +44 -0
  111. data/templates/chiptune/objects/voice_pad.md +43 -0
  112. data/templates/chiptune/objects/voice_perc.md +45 -0
  113. data/templates/chiptune/primitives/play_note.rb +59 -0
  114. data/templates/chiptune/primitives/play_sequence.rb +55 -0
  115. data/templates/chiptune/primitives/query_sonic_pi.rb +141 -0
  116. data/templates/chiptune/primitives/set_synth.rb +57 -0
  117. data/templates/chiptune/primitives/set_tempo.rb +45 -0
  118. data/templates/chiptune/primitives/stop_voice.rb +46 -0
  119. data/templates/chiptune/primitives/support/osc_bridge.rb +33 -0
  120. data/templates/chiptune/vendor/osc-ruby-1.1.5/LICENSE +19 -0
  121. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb +58 -0
  122. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb +24 -0
  123. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb +46 -0
  124. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb +13 -0
  125. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb +6 -0
  126. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb +63 -0
  127. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb +46 -0
  128. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb +42 -0
  129. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb +26 -0
  130. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb +140 -0
  131. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb +53 -0
  132. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb +91 -0
  133. data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb +18 -0
  134. data/templates/developer/objects/code_reviewer.md +1 -1
  135. data/templates/developer/objects/coordinator.md +16 -3
  136. data/templates/developer/objects/debugger.md +3 -3
  137. data/templates/empty/objects/assistant.md +10 -5
  138. data/templates/minimal/objects/assistant.md +10 -5
  139. data/templates/music/extras/sonic_pi_boot.rb +220 -0
  140. data/templates/music/manifest.yml +16 -0
  141. data/templates/music/objects/conductor.md +154 -0
  142. data/templates/music/objects/sonic_pi.md +65 -0
  143. data/templates/music/primitives/play_note.rb +55 -0
  144. data/templates/music/primitives/play_sequence.rb +51 -0
  145. data/templates/music/primitives/query_sonic_pi.rb +139 -0
  146. data/templates/music/primitives/set_synth.rb +53 -0
  147. data/templates/music/primitives/set_tempo.rb +43 -0
  148. data/templates/music/primitives/stop_voice.rb +44 -0
  149. data/templates/music/primitives/support/osc_bridge.rb +33 -0
  150. data/templates/music/vendor/osc-ruby-1.1.5/LICENSE +19 -0
  151. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb +58 -0
  152. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb +24 -0
  153. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb +46 -0
  154. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb +13 -0
  155. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb +6 -0
  156. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb +63 -0
  157. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb +46 -0
  158. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb +42 -0
  159. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb +26 -0
  160. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb +140 -0
  161. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb +53 -0
  162. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb +91 -0
  163. data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb +18 -0
  164. data/templates/music-beginner/README.md +100 -0
  165. data/templates/music-beginner/extras/README.md +27 -0
  166. data/templates/music-beginner/extras/sonic_pi_boot.rb +297 -0
  167. data/templates/music-beginner/manifest.yml +25 -0
  168. data/templates/music-beginner/objects/conductor.md +222 -0
  169. data/templates/music-beginner/objects/engine_setup.md +54 -0
  170. data/templates/music-beginner/objects/voice_bass.md +43 -0
  171. data/templates/music-beginner/objects/voice_keys.md +48 -0
  172. data/templates/music-beginner/objects/voice_pad.md +46 -0
  173. data/templates/music-beginner/objects/voice_percussion.md +45 -0
  174. data/templates/music-beginner/objects/voice_texture.md +37 -0
  175. data/templates/music-beginner/primitives/play_pattern.rb +118 -0
  176. data/templates/music-beginner/primitives/query_music_engine.rb +94 -0
  177. data/templates/music-beginner/primitives/set_instrument.rb +47 -0
  178. data/templates/music-beginner/primitives/set_tempo.rb +43 -0
  179. data/templates/music-beginner/primitives/set_voice_level.rb +46 -0
  180. data/templates/music-beginner/primitives/stop_voice.rb +37 -0
  181. data/templates/music-beginner/primitives/support/osc_bridge.rb +25 -0
  182. data/templates/music-beginner/vendor/osc-ruby-1.1.5/LICENSE +19 -0
  183. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb +58 -0
  184. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb +24 -0
  185. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb +46 -0
  186. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb +13 -0
  187. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb +6 -0
  188. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb +63 -0
  189. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb +46 -0
  190. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb +42 -0
  191. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb +26 -0
  192. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb +140 -0
  193. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb +53 -0
  194. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb +91 -0
  195. data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb +18 -0
  196. data/templates/music-pro/extras/AUDITION.md +100 -0
  197. data/templates/music-pro/extras/sonic_pi_boot.rb +546 -0
  198. data/templates/music-pro/manifest.yml +19 -0
  199. data/templates/music-pro/objects/conductor.md +126 -0
  200. data/templates/music-pro/objects/sonic_pi.md +35 -0
  201. data/templates/music-pro/objects/voice_harmony.md +48 -0
  202. data/templates/music-pro/objects/voice_rhythm.md +43 -0
  203. data/templates/music-pro/objects/voice_texture.md +42 -0
  204. data/templates/music-pro/primitives/define_patch.rb +46 -0
  205. data/templates/music-pro/primitives/query_music_engine.rb +69 -0
  206. data/templates/music-pro/primitives/set_live_pattern.rb +70 -0
  207. data/templates/music-pro/primitives/set_tempo.rb +31 -0
  208. data/templates/music-pro/primitives/stop_voice.rb +31 -0
  209. data/templates/music-pro/primitives/support/music_protocol.rb +136 -0
  210. data/templates/music-pro/primitives/support/osc_bridge.rb +33 -0
  211. data/templates/music-pro/primitives/trigger_event.rb +44 -0
  212. data/templates/music-pro/vendor/osc-ruby-1.1.5/LICENSE +19 -0
  213. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb +58 -0
  214. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb +24 -0
  215. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb +46 -0
  216. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb +13 -0
  217. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb +6 -0
  218. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb +63 -0
  219. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb +46 -0
  220. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb +42 -0
  221. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb +26 -0
  222. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb +140 -0
  223. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb +53 -0
  224. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb +91 -0
  225. data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb +18 -0
  226. data/templates/writer/objects/coordinator.md +14 -3
  227. data/templates/writer/objects/editor.md +1 -1
  228. data/templates/writer/objects/researcher.md +2 -2
  229. data/tools/thread-explorer.html +28 -1
  230. metadata +175 -65
  231. data/CLAUDE.md +0 -176
  232. data/Gemfile +0 -10
  233. data/Gemfile.lock +0 -233
  234. data/IMPLEMENTATION_PLAN.md +0 -1073
  235. data/Rakefile +0 -27
  236. data/design-doc-v2.md +0 -1232
  237. data/frontend/.gitignore +0 -3
  238. data/frontend/index.html +0 -17
  239. data/frontend/package-lock.json +0 -4540
  240. data/frontend/package.json +0 -36
  241. data/frontend/postcss.config.js +0 -6
  242. data/frontend/src/App.tsx +0 -103
  243. data/frontend/src/canvas/CanvasView.tsx +0 -113
  244. data/frontend/src/canvas/ForceLayout.ts +0 -115
  245. data/frontend/src/canvas/SceneManager.ts +0 -587
  246. data/frontend/src/canvas/canvasStore.ts +0 -47
  247. data/frontend/src/canvas/constants.ts +0 -95
  248. data/frontend/src/canvas/controls/CameraControls.ts +0 -98
  249. data/frontend/src/canvas/edges/MessageArc.ts +0 -149
  250. data/frontend/src/canvas/inspector/InspectorPanel.tsx +0 -31
  251. data/frontend/src/canvas/inspector/POInspector.tsx +0 -262
  252. data/frontend/src/canvas/inspector/ToolCallInspector.tsx +0 -67
  253. data/frontend/src/canvas/nodes/PONode.ts +0 -249
  254. data/frontend/src/canvas/nodes/ToolCallNode.ts +0 -116
  255. data/frontend/src/canvas/types.ts +0 -24
  256. data/frontend/src/components/ContextMenu.tsx +0 -68
  257. data/frontend/src/components/Inspector.tsx +0 -232
  258. data/frontend/src/components/MarkdownMessage.tsx +0 -155
  259. data/frontend/src/components/MethodList.tsx +0 -90
  260. data/frontend/src/components/ModelSelector.tsx +0 -115
  261. data/frontend/src/components/NotificationPanel.tsx +0 -130
  262. data/frontend/src/components/ObjectList.tsx +0 -78
  263. data/frontend/src/components/PaneSlot.tsx +0 -30
  264. data/frontend/src/components/SourcePane.tsx +0 -202
  265. data/frontend/src/components/SystemBar.tsx +0 -74
  266. data/frontend/src/components/Transcript.tsx +0 -76
  267. data/frontend/src/components/UsagePanel.tsx +0 -105
  268. data/frontend/src/components/Workspace.tsx +0 -260
  269. data/frontend/src/components/index.ts +0 -12
  270. data/frontend/src/hooks/useResize.ts +0 -55
  271. data/frontend/src/hooks/useWebSocket.ts +0 -517
  272. data/frontend/src/index.css +0 -103
  273. data/frontend/src/main.tsx +0 -10
  274. data/frontend/src/store/index.ts +0 -279
  275. data/frontend/src/types/index.ts +0 -165
  276. data/frontend/tailwind.config.js +0 -44
  277. data/frontend/tsconfig.json +0 -30
  278. data/frontend/vite.config.ts +0 -29
  279. data/lib/prompt_objects/server/public/assets/index-D1myxE0l.js +0 -4345
  280. data/lib/prompt_objects/server/public/assets/index-DdCcwC-Z.css +0 -1
  281. data/lib/prompt_objects/universal/add_primitive.rb +0 -118
  282. data/lib/prompt_objects/universal/ask_human.rb +0 -109
  283. data/lib/prompt_objects/universal/create_primitive.rb +0 -174
  284. data/lib/prompt_objects/universal/list_primitives.rb +0 -145
  285. data/lib/prompt_objects/universal/think.rb +0 -41
  286. data/prompt_objects.gemspec +0 -50
  287. data/templates/basic/.gitignore +0 -2
  288. data/templates/developer/.gitignore +0 -5
  289. data/templates/empty/.gitignore +0 -5
  290. data/templates/empty/objects/.gitkeep +0 -0
  291. data/templates/minimal/.gitignore +0 -5
  292. data/templates/writer/.gitignore +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6dd3c14942ef80d1979ded542802ad9d1a24b32cd479aa4ba0a08bb0bf2e349d
4
- data.tar.gz: 3642d5424aa827754dfefde82a9e9e5c770935ebf08e36cfc429d8f86e5e8502
3
+ metadata.gz: 1127bb4c18c49c460ceb34d5ee7f86b81b5e00a3210faf100f4eef1fe6ccf19e
4
+ data.tar.gz: 0445d88c6bc2f9f125dad833f744b4c0ac828b7db0d9d7615b923fadaa6d84b1
5
5
  SHA512:
6
- metadata.gz: f4e4449d2a8764a762c13ea14b6ccac17b07d1ae06a053a94e5b66ce7ebf38b8ca2903c140f0bb06810e09fa830bdac1dcfb8485d2f6f7fe32f7b0dffdf374bb
7
- data.tar.gz: 1faa31a8c32f067cdfb133c06e6c3d45e55fec3381d86f649e8845b9d2c58bc367e2bed3821cbec4a92a18776b723ccf69c276f9e913347198816005c4608353
6
+ metadata.gz: 3756b5d465e82dd5faff921733131dbe03f14e023ab99812f5a75ffdfc201d6151a5dfa2aae32194b4d60261ebdec1d25ffb573011f8ecb2a6254d2783fb4b6d
7
+ data.tar.gz: 9f4b12151c992af3bfa326cb86fa1a3f3cb8d083777e81daa6946924c3561b021a547536f23832ef00f7202352c6368ef69fb1e667247d96867f61ee839fd3bd
data/CHANGELOG.md CHANGED
@@ -2,6 +2,148 @@
2
2
 
3
3
  All notable changes to PromptObjects are documented in this file.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ## [0.7.0] - 2026-07-11
8
+
9
+ ### Added
10
+
11
+ - **Durable concurrent run runtime** — Prompt Objects are reusable definitions;
12
+ mutable execution now belongs to persisted workspace sessions, PO-owned
13
+ threads, runs, messages, tool executions, artifacts, and ordered events.
14
+ Multiple threads and independent POs can execute concurrently with immutable
15
+ definition snapshots, strict per-thread ordering, cancellation, deadlines,
16
+ bounded queues, provider/tool permits, resource locking, recovery, retention,
17
+ diagnostics, and reconnect-safe snapshots.
18
+ - **Parallel composition and delegation** — safe tool batches execute in
19
+ parallel, while `dispatch_po`, `get_run_status`, and `join_runs` support
20
+ non-blocking multi-PO fan-out with attached/detached lifetimes and follow-up
21
+ work. Independent operations overlap; conflicting resource keys serialize.
22
+ - **First-class runtime surfaces** — Image Floor, Semantic Loom, Artifact
23
+ Cockpit, live run activity, multi-thread navigation, autonomous countdowns,
24
+ and the semantic Run Debugger expose the same durable runtime from different
25
+ working angles.
26
+ - **Beginner and pro Sonic Pi templates** — `music-beginner` provides a curated,
27
+ talk-safe ensemble with connected phrases and coordinated movements;
28
+ `music-pro` exposes a live-pattern language, raw patches, transformations,
29
+ duration-aware gating, and open-ended musician identities. Both verify live
30
+ engine state instead of trusting prose claims.
31
+ - **Current-generation model support** — OpenAI GPT-5.6 Luna/Terra/Sol and
32
+ GPT-5.4 Mini/Nano plus Gemini 3.5 Flash and 3.1 Flash Lite are available in
33
+ the model selector. Environment manifests can persist their provider/model;
34
+ `music-beginner` defaults to Gemini 3.5 Flash.
35
+ - **Operational release gates** — content-free diagnostics, bounded event
36
+ retention, migration backups, recovery documentation, deterministic
37
+ concurrency tests, and an end-to-end release rehearsal cover long-running
38
+ environments and live music demos.
39
+ - **The Floor** — a new default home view: a pannable, zoomable canvas where every PO is a draggable *station* showing its live, interactive BURP artifact (or a quiet identity card until it renders one). Active PO→PO delegations draw as animated edges between stations, autonomous POs show a tick indicator, new POs animate onto the floor, and station positions persist per environment. Clicking a station opens a right-hand conversation drawer (shared renderer with the Browser's Workspace: thoughts, delegations, tool calls inline) with a composer. The Smalltalk System Browser remains one click away as the "Browser" view, and the connection indicator now reports reconnect attempts truthfully.
40
+
41
+ - **BURP — Bidirectional UI Rendering Protocol** — Artifacts are now interactive interfaces, not just output. Every artifact (in-app iframe and pop-out window) gets a `PromptObjects.send(message)` function; wiring it to buttons/forms/controls sends a natural-language message back to the PO that rendered the artifact, via `POST /api/artifacts/:key/message` → `inject_message` with provenance `artifact:<title>`. The PO responds by re-rendering the artifact, closing the loop — POs can build the UI the human uses to talk to them. `render_artifact`'s guidance teaches POs the pattern (including that a re-render resets the artifact's local JS state). Messages are validated (shape, length, iframe identity) before injection.
42
+ - **`poop` CLI alias** — the gem now installs a `poop` executable (**P**rompt-**O**bject **O**riented **P**rogramming) alongside `prompt_objects`. Identical behavior, twice the dignity.
43
+ - **POs are taught to build interfaces** — every PO's system prompt now includes an "interactive artifacts" section (artifacts are bidirectional, wire controls to `PromptObjects.send`, re-render on `artifact:<title>` messages, prefer an interface over walls of text for stateful work), and lists `artifact:<title>` / `timer:<name>` among message sources. The bundled templates lean in: both music conductors now render an interactive **Mixing Desk** (tempo nudges, voice mutes, mood switches wired back to the conductor), the developer and writer coordinators keep a **Workbench** / **Drafting Desk**, and the basic/minimal/empty assistants offer to build a panel when work has ongoing state.
44
+
45
+ ### Changed
46
+
47
+ - **All entry points use runs** — WebSocket, REST, CLI, MCP, connectors,
48
+ services, timers, and artifact actions now share one durable enqueue and
49
+ execution path. The former mutable Prompt Object receive loop has been
50
+ removed.
51
+ - **Thinking is opt-in** — visible thinking is no longer inherited by every
52
+ Prompt Object; `think` is a standard-library primitive that environments add
53
+ deliberately.
54
+ - **Autonomous scheduling is live-editable** — timers wait for a human
55
+ initialization turn when configured, expose truthful countdown state, use a
56
+ dedicated coalesced thread, and adopt frontmatter message/interval changes
57
+ without a restart.
58
+ - **CLI restructured** — `exe/prompt_objects` was 1,100 lines of inline command logic; it's now a thin shim over `PromptObjects::CLI.run`, with each command (`env`, `serve`, `repl`, `message`, `events`, `explore`) in its own class under `lib/prompt_objects/cli/`. Help/usage text uses the invoked program name, so `poop` introduces itself as `poop`. Added `PromptObjects::VERSION` as the single source of truth (gemspec and REPL header read it). Removed the unused `CLI.parse` and `CLI.list_templates`. No behavior changes to any command.
59
+ - **Environment exports are now `.dump` files** — **D**eclarative **U**nified **M**emory **P**ackages. `env export` writes `<name>.dump` by default; `env import` still accepts legacy `.poenv` bundles (the format is unchanged — a git bundle by any other name).
60
+
61
+ ### Fixed
62
+
63
+ - **Provider tool-call compatibility** — Gemini thought signatures survive
64
+ persisted multi-step tool calls, scalar tool results are normalized, and
65
+ GPT-5.6 function calls use the Chat Completions compatibility parameters they
66
+ require.
67
+ - **Thread and surface stability** — a first message selects its newly created
68
+ thread; thinking, transcripts, and artifacts no longer disappear between
69
+ autonomous turns; Cockpit fills the screen; and featured Image Floor cards
70
+ no longer overlap later rows.
71
+ - **Connected music playback** — beginner patterns separate onset step from
72
+ synth gate, while pro patterns derive envelopes from duration. Conductors
73
+ preserve rhythmic/connective anchors and evolve coordinated movements rather
74
+ than producing isolated notes or unrelated rewrites.
75
+ - **Artifact pop-out and BURP buttons 404ing** — Falcon delivers `PATH_INFO` as ASCII-8BIT, and SQLite binds binary strings as BLOBs that never match TEXT columns, so every keyed lookup from a URL path (artifact pop-outs, BURP button posts, session activate/rename) silently missed. Paths are normalized to UTF-8 at the API entry point. Verified live end-to-end: a real PO rendered a counter panel, a posted button click came back as `artifact:<title>`, and the PO re-rendered the panel with the new count.
76
+ - **Messages to a busy PO now queue instead of being lost or interleaving** — POs are single-actor; a message arriving mid-turn (human, artifact click, webhook) lands in a bounded per-PO inbox and is delivered as soon as the current turn finishes, broadcasting `message_queued` so the UI can show it. The composer is no longer locked while a PO is thinking — Enter queues your message.
77
+ - **POs now actually close the BURP loop** — `from_source` provenance is UI metadata the LLM never saw, so POs answered artifact clicks with prose and never updated the panel. Artifact messages are now framed with their interface origin and a re-render nudge, so the PO updates the artifact the human is actually looking at.
78
+
79
+ ### Removed
80
+
81
+ - **Three.js spatial canvas** — the `/canvas` view (~2,000 LOC plus the `three` and `d3-force` dependencies) is retired. The Floor does its job natively: live PO stations, status, and animated delegation edges on a pannable DOM surface — with the artifacts interactive instead of decorative.
82
+ - **Inherited `ask_human` and visible-thinking tools** — `ask_human` is no
83
+ longer a universal capability, and thinking must be granted explicitly.
84
+
85
+ ### Runtime, environment, and artifact foundations
86
+
87
+ #### Added
88
+
89
+ - **Environment-level workspaces** — Workspace sessions own shared environment
90
+ data and artifacts, while each Prompt Object owns multiple durable human,
91
+ autonomous, and delegation threads. A universal run entry point handles every
92
+ message source, and `POST /api/messages` lets webhooks, cron, and bots enqueue
93
+ work with idempotency keys and explicit workspace/thread targeting.
94
+ - **Autonomous Prompt Objects** — Declare `autonomous: { interval:, message:,
95
+ start_on_boot:, wait_for_human: }` in frontmatter. Timer turns use one durable,
96
+ summary-retained autonomous thread per PO and coalesce while work is pending,
97
+ so a slow model cannot create an unbounded backlog.
98
+ - **Services framework** — A `Service` base class (`start`/`stop`/`tick`/`interval`) loaded from an environment's `services/` directory. Tick loops are async-native (cooperate with Falcon's event loop). Services read/write the shared env_data store scoped to the active session.
99
+ - **Artifact system** — A `render_artifact` universal capability (`replace`/`version` modes) plus an `ArtifactPane` that renders PO-generated HTML/JSX in a sandboxed iframe (React 18 + ReactDOM + Babel + Tailwind via CDN). Resizable, dock toggle (bottom/right), fullscreen, pop-out to a window that live-polls `/artifacts/:key`, and persistence across session reloads.
100
+ - **Music templates + Sonic Pi** — Two templates (`chiptune`, genre-specific; `music`, genre-agnostic) where a conductor PO orchestrates voice POs that play through Sonic Pi over OSC. A warm audio engine (master clock so voices lock in time, FX bus, "sound pack" presets), a shared composition contract (key/scale/tempo/progression/roles), and `query_sonic_pi` / `set_tempo` primitives.
101
+ - **Raw frontmatter editing in the UI** — The Inspector's SourcePane has a Prompt / Raw .md toggle; Raw mode edits the whole file (frontmatter + body) and hot-reloads, so autonomous/`delegates_to`/`tools` can be tuned from the UI.
102
+ - **Session management** — manage environment-level sessions (the shared-context "jams" that scope env_data): `GET/POST /api/sessions` and `POST /api/sessions/:id/{activate,rename,delete}`, plus a SessionSelector in the SystemBar to switch/create/rename/delete.
103
+ - **Connector framework** — load connectors from an environment's `connectors/` directory (like services); they start/stop with the server and route inbound external events to POs via `Connectors::Base#inject` (Discord/Slack/webhook bridges; clients are user-supplied).
104
+ - **Frontend test harness** — vitest + Testing Library scaffold (`npm test`) and a Ruby end-to-end smoke test for the chiptune template.
105
+ - **Optional visible reasoning** — environments may grant the standard-library
106
+ `think` primitive when visible working notes are useful; it is not inherited
107
+ by every Prompt Object.
108
+ - **New frontend views** — Session Timeline (chronological activity feed), Environment Dashboard (overview when no PO is selected), autonomous-PO indicators in the ObjectList, and a PO selector in the message input.
109
+ - **Environment dependencies & vendored gems** — Manifests declare `dependencies.gems`; templates can vendor gems under `vendor/<gem>/lib/` (auto-added to `$LOAD_PATH`).
110
+ - **`POST /api/prompt_objects`** — Create a Prompt-Object via the REST API.
111
+ - **Simplified frontmatter** — `delegates_to:` + `tools:` (kept distinct for the author, merged internally).
112
+
113
+ #### Changed
114
+
115
+ - **env_data scoped to the environment session** — `set_env_data`/`get_env_data`/`list_env_data`/`delete_env_data` (and artifacts) now resolve scope through a single helper that prefers the environment-level session, so every PO and autonomous tick shares one durable store. `set_env_data` replaces the former `store_env_data` + `update_env_data`.
116
+ - **Unified WebSocket path** — `handle_send_message` routes through `inject_message` instead of calling `po.receive()` directly.
117
+ - **Tool-call narration is preserved** — The assistant's prose alongside a tool call is no longer dropped, so turns that narrate-and-act stay visible.
118
+ - **MethodList split** — the Inspector shows a PO's "Delegates To" (other POs) and "Tools" (primitives) as separate sections.
119
+ - **Inline delegation visibility** — PO-to-PO calls render as "→ &lt;po&gt;" with the delegate's reply inline (Workspace + Timeline), and external sources (timer/service/api/webhook) show with a ← indicator.
120
+ - **Artifact pane** — download an artifact as standalone HTML, and browse versions (`mode: "version"`) grouped under one tab.
121
+
122
+ #### Removed (breaking)
123
+
124
+ - **`create_primitive`, `add_primitive`, `list_primitives` universals** — removed as redundant. Use `create_capability(type: "primitive", …)`, `add_capability(target:, capability:)`, and `list_capabilities(type: "primitives")` instead. Prompt objects in environments created from older templates that reference the removed names by prose will have those calls rejected by the capability guard with a hint; update the prompt text (all bundled templates were updated). The remaining primitive lifecycle universals (`delete_primitive`, `modify_primitive`, `verify_primitive`, `request_primitive`) are unchanged.
125
+
126
+ #### Fixed
127
+
128
+ - **Sonic Pi audio quality** — Tempo changes now reach the voice loops (`use_bpm` was thread-local and called in the wrong thread); a master clock keeps voices from drifting; per-note attack removes clicks; lower amps plus a master compressor stop clipping.
129
+ - **No mid-conversation reload on in-app saves** — `create_capability`/`add_capability`/`modify_prompt` and the source editor no longer trigger a FileWatcher reload that swapped the live PO instance mid-turn.
130
+
131
+ ## [0.6.0] - 2026-02-17
132
+
133
+ ### Added
134
+
135
+ - **Shared environment data** — 5 new universal capabilities (`store_env_data`, `get_env_data`, `list_env_data`, `update_env_data`, `delete_env_data`) provide a thread-scoped key-value store for delegation chains. Data is scoped to the root thread so separate conversations stay isolated. Entries include a `short_description` for lightweight LLM discovery without fetching full values.
136
+ - **Live environment data pane** — New collapsible pane in the Inspector shows shared env data updating in real-time as POs store and modify entries during delegation chains. WebSocket broadcasting (`env_data_changed`, `env_data_list`), a REST endpoint (`GET /api/sessions/:id/env_data`), and env data rendering in the Thread Explorer.
137
+ - **Delegation context** — POs now receive context about their delegation chain. An expanded system prompt teaches POs about their nature, a delegation preamble prepends caller context to delegated messages, and the full delegation chain is built from thread lineage.
138
+ - **Capability guard** — `execute_tool_calls` now rejects tools not in a PO's allowed set (declared capabilities + universals). Previously the LLM could hallucinate calls to any registered tool and they would execute. Now it receives an error directing it to use `add_capability` first.
139
+ - **Env data in thread exports** — `serialize_tree_for_export` includes env data entries at the root level of exported thread trees. Thread Explorer renders these in an amber-colored section.
140
+
141
+ ### Fixed
142
+
143
+ - **Root font-size causing undersized text** — Removed a `font-size: 14px` on the root `html` element that made all rem-based Tailwind sizes ~12% smaller than intended (e.g. `text-xs` computed to 10.5px instead of 12px).
144
+ - **Invisible resize handle boundaries** — Added border styling to horizontal and vertical resize handles so pane boundaries are visible without hovering.
145
+ - **Stale MCP tools tests** — Fixed test expectations broken by PO serialization centralization in 0.5.0.
146
+
5
147
  ## [0.5.0] - 2026-02-13
6
148
 
7
149
  ### Added
data/README.md CHANGED
@@ -12,11 +12,6 @@ Prompt Objects applies this to AI. Instead of treating LLMs as external APIs you
12
12
 
13
13
  This is a new computing primitive: semantic late binding at runtime, where natural language becomes the interface between intelligent components.
14
14
 
15
- Blog Posts
16
- ==========
17
-
18
- - [What if we took message passing seriously?](https://worksonmymachine.ai/p/what-if-we-took-message-passing-seriously) — The origin story and motivation behind Prompt Objects.
19
-
20
15
  Who
21
16
  ===
22
17
 
@@ -32,8 +27,144 @@ A Ruby framework where:
32
27
  - **Markdown files** define autonomous entities (Prompt Objects)
33
28
  - **YAML frontmatter** declares capabilities and configuration
34
29
  - **Markdown body** becomes identity and behavior (the system prompt)
35
- - **Capabilities** are shared between primitives (Ruby) and Prompt Objects (markdown)
36
- - **Environments** isolate collections of objects with their own memory
30
+ - **Capabilities** are shared between primitives (Ruby) and Prompt Objects (markdown) -- everything is a capability
31
+ - **Environments** isolate collections of objects with their own memory, git history, and configuration
32
+ - **PO-to-PO delegation** lets objects call each other through isolated threads with full provenance tracking
33
+ - **Autonomous Prompt Objects** can act on their own interval (`autonomous:` frontmatter), thinking and delegating without a human in the loop
34
+ - **Services** run background work alongside the server, and **environment-level sessions** give every object a shared, durable key-value memory (env_data)
35
+ - **Artifacts** let a PO render live HTML/JSX dashboards in the UI; external systems can drive POs over a REST endpoint (`POST /api/messages`)
36
+
37
+ ### Prompt Object structure
38
+
39
+ ```markdown
40
+ ---
41
+ name: reader
42
+ description: Helps people understand files
43
+ capabilities:
44
+ - read_file
45
+ - list_files
46
+ ---
47
+
48
+ # Reader
49
+ ## Identity
50
+ You are a careful, thoughtful file reader...
51
+ ```
52
+
53
+ ### Web UI
54
+
55
+ The web interface treats the environment as a running image rather than a chat
56
+ application. Its views share the same durable workspaces, threads, runs,
57
+ artifacts, and environment data:
58
+
59
+ - **Floor** -- the default view: freely arranged, resizable PO stations with
60
+ live artifacts, timer state, and delegation edges.
61
+ - **Browser** -- a Smalltalk-style object browser for source, capabilities,
62
+ environment data, multiple threads, chat, live activity, and timelines.
63
+ - **Image Floor** -- a responsive wall of every PO's latest visual interface.
64
+ - **Semantic Loom** -- a factual map of delegation, tools, shared state, and
65
+ outputs around a selected PO.
66
+ - **Artifact Cockpit** -- one live artifact at useful size with its revision,
67
+ owner, provenance, and action traffic.
68
+ - **Run Debugger** -- a durable execution timeline with model context,
69
+ definition snapshots, tool executions, child runs, and state effects.
70
+
71
+ The Transcript remains available across views, and reconnects hydrate
72
+ authoritative snapshots before replaying newer events.
73
+
74
+ ### Interactive artifacts (BURP)
75
+
76
+ POs can render HTML/JSX artifacts into a dockable pane (React 18, Tailwind, and Babel are available in a sandboxed iframe). Artifacts are **bidirectional** — the **B**idirectional **U**I **R**endering **P**rotocol injects a `PromptObjects.send(message)` function into every artifact, which delivers a natural-language message back to the PO that rendered it (provenance shows as `artifact:<title>` in the message log). A PO can build a dashboard with buttons and forms, the human clicks instead of typing, and the PO re-renders the artifact in response: generative UI as a second modality of conversation. Works in the in-app pane and popped-out artifact windows.
77
+
78
+ ### Durable concurrent runtime
79
+
80
+ Each Prompt Object is a reusable definition; mutable execution belongs to
81
+ durable runs inside PO-owned threads. A single PO can have multiple threads, and
82
+ independent threads, delegations, and safe tool calls can execute concurrently.
83
+ Resource keys serialize conflicting side effects, while bounded worker/provider
84
+ permits, deadlines, cancellation, autonomous coalescing, and event retention
85
+ keep long-running environments controlled. REST, WebSocket, CLI, MCP, services,
86
+ connectors, timers, and artifact actions all enter through the same run path.
87
+
88
+ ### Generative music (Sonic Pi)
89
+
90
+ Music environments connect an ensemble of Prompt Objects to
91
+ [Sonic Pi](https://sonic-pi.net/) over OSC. The conductor establishes a shared
92
+ musical contract and coordinates musicians that author and rewrite their own
93
+ synchronized parts.
94
+
95
+ - `music-beginner` is a constrained, talk-safe backing ensemble with curated
96
+ instruments, connected phrases, coordinated movements, and Gemini 3.5 Flash
97
+ as its persisted default model.
98
+ - `music-pro` exposes chords, samples, subdivisions, alternation, transforms,
99
+ raw Sonic Pi parameters, runtime-defined patches, and duration-aware gating
100
+ while preserving an audible connective layer.
101
+ - `music` remains the open-ended dynamic-band template, and `chiptune` remains
102
+ available for its original genre-specific workflow.
103
+
104
+ ### Demos
105
+
106
+ | <a href="https://www.loom.com/share/32c17ccd07bf4b6e99f1ff06aab5bee0"><img src="docs/images/intro_walkthrough.png" alt="Intro walkthrough" width="600"></a> | <a href="https://www.loom.com/share/3a04fa73efd8407eae2b122740082268"><img src="docs/images/arc_agi_1_template.png" alt="ARC-AGI-1 template" width="600"></a> |
107
+ |:---:|:---:|
108
+ | **Intro walkthrough**: creating an environment, interacting with POs, and exploring the web UI | **ARC-AGI-1 template**: using the ARC-AGI-1 solver environment with multi-PO delegation |
109
+
110
+ ### MCP Server mode
111
+
112
+ Run any environment as an MCP (Model Context Protocol) server for integration with Claude Desktop, Cursor, or any MCP-compatible client:
113
+
114
+ ```bash
115
+ prompt_objects serve my-assistant --mcp
116
+ ```
117
+
118
+ Add to your `claude_desktop_config.json`:
119
+
120
+ ```json
121
+ {
122
+ "mcpServers": {
123
+ "my-assistant": {
124
+ "command": "prompt_objects",
125
+ "args": ["serve", "--mcp", "my-assistant"]
126
+ }
127
+ }
128
+ }
129
+ ```
130
+
131
+ Exposes tools for sending messages, listing POs, inspecting state, getting conversations, and responding to pending capability-approval requests.
132
+ Message responses include durable workspace, thread, and run IDs. Pass a
133
+ `client_request_id` when retries are possible; `thread_id` continues a specific
134
+ conversation (`session_id` remains a compatibility alias).
135
+
136
+ External services can enqueue the same runtime through REST:
137
+
138
+ ```bash
139
+ curl -X POST http://127.0.0.1:3000/api/messages \
140
+ -H 'Content-Type: application/json' \
141
+ -d '{"target_po":"assistant","content":"Process this event","from_source":"service:webhook","client_request_id":"event-42"}'
142
+ ```
143
+
144
+ The response contains `workspace_session_id`, `thread_id`, `run_id`, `status`,
145
+ and the Prompt Object response. Workspace and thread IDs may be omitted to use
146
+ source-appropriate defaults.
147
+
148
+ ### Multi-provider LLM support
149
+
150
+ Choose a provider/model in the UI; the selection is stored in the environment
151
+ manifest and survives restarts. API keys come from the corresponding environment
152
+ variables. Adapters include:
153
+
154
+ - **OpenAI** -- GPT-5.6 Luna, Terra, and Sol; GPT-5.4 Mini/Nano; GPT-5.2; GPT-4.1
155
+ - **Anthropic** -- Claude Haiku 4.5, Claude Sonnet 4.5, Claude Opus 4
156
+ - **Gemini** -- Gemini 3.5 Flash, Gemini 3.1 Flash Lite, Gemini 3 Flash, Gemini 2.5 Pro/Flash
157
+ - **Ollama** -- any locally installed model, discovered automatically
158
+ - **OpenRouter** -- access any model through a single API key
159
+
160
+ ### Thread Explorer
161
+
162
+ A standalone HTML visualizer for exported conversation threads. Open it from the CLI to browse delegation chains, message flow, and tool call sequences:
163
+
164
+ ```bash
165
+ prompt_objects explore my-env
166
+ prompt_objects explore my-env --session abc123
167
+ ```
37
168
 
38
169
  How
39
170
  ===
@@ -54,25 +185,86 @@ prompt_objects env create my-project --template basic
54
185
  prompt_objects serve my-project --open
55
186
  ```
56
187
 
57
- ### Environment Commands
188
+ The gem also installs `poop` (**P**rompt-**O**bject **O**riented **P**rogramming) as an alias for the `prompt_objects` command. Every example below works with either.
189
+
190
+ ### Commands
58
191
 
59
- ```bash
60
- prompt_objects env list # List all environments
61
- prompt_objects env create <name> # Create new environment
62
- prompt_objects env info <name> # Show environment details
63
- prompt_objects env clone <src> <dst> # Clone an environment
64
192
  ```
193
+ prompt_objects serve <env> Start web server (default)
194
+ prompt_objects serve <env> --open Start and open browser
195
+ prompt_objects serve <env> --mcp Start as MCP server
196
+ prompt_objects serve <env> --port 4000 Custom port (default: 3000)
197
+ prompt_objects --version Print the installed version
198
+
199
+ prompt_objects repl [name] [objects_dir] Interactive REPL with a prompt object
200
+ prompt_objects repl --sandbox REPL in sandbox mode (isolates changes)
201
+
202
+ prompt_objects message <env> <po> "text" Send a message and print the response
203
+ prompt_objects message <env> <po> "text" --json JSON output
204
+ prompt_objects message <env> <po> "text" --events Include event log
205
+
206
+ prompt_objects events <env> Show recent message bus events
207
+ prompt_objects events <env> --session ID Events for a specific session
208
+ prompt_objects events <env> --json JSON output
209
+ prompt_objects diagnostics <env> --json Content-free runtime health
210
+
211
+ prompt_objects explore [env] Open Thread Explorer in browser
212
+ prompt_objects explore <env> --session ID Visualize a specific thread
213
+ ```
214
+
215
+ ### Environment management
216
+
217
+ ```
218
+ prompt_objects env list List all environments
219
+ prompt_objects env create <name> Create new environment
220
+ prompt_objects env create <name> -t <tmpl> Create from template
221
+ prompt_objects env info <name> Show environment details
222
+ prompt_objects env clone <src> <dst> Clone an environment
223
+ prompt_objects env export <name> Export as .dump bundle
224
+ prompt_objects env import <file.dump> Import from bundle (.poenv still works)
225
+ prompt_objects env archive <name> Soft-delete (archive)
226
+ prompt_objects env restore <name> Restore archived environment
227
+ prompt_objects env delete <name> --permanent Permanently delete archived env
228
+ prompt_objects env default <name> Set the default environment
229
+ ```
230
+
231
+ Exports are **D**eclarative **U**nified **M**emory **P**ackages — a `.dump` file is a git bundle of the environment's complete state and history.
232
+
233
+ Operational guidance: [runtime diagnostics and recovery](https://github.com/works-on-your-machine/prompt_objects/blob/main/docs/operations/runtime-recovery.md) and the [release rehearsal checklist](https://github.com/works-on-your-machine/prompt_objects/blob/main/docs/operations/release-rehearsal.md).
65
234
 
66
235
  ### Templates
67
236
 
68
- - `basic` - No capabilities, learns as needed (great for demos)
69
- - `minimal` - Basic assistant with file reading
70
- - `developer` - Code review, debugging, testing specialists
71
- - `writer` - Editor, researcher for content creation
237
+ Create an environment from a template with `prompt_objects env create <name> --template <template>`:
238
+
239
+ | Template | Description |
240
+ |---|---|
241
+ | `basic` | No capabilities, learns as needed -- great for demos |
242
+ | `minimal` | Basic assistant with file reading |
243
+ | `developer` | Code review, debugging, testing specialists |
244
+ | `writer` | Editor, researcher for content creation |
245
+ | `empty` | Start from scratch with just a bootstrap assistant |
246
+ | `arc-agi-1` | ARC-AGI-1 challenge solver with grid primitives |
247
+ | `arc-agi-3` | ARC-AGI-3 agent with player, analyst, and strategist POs |
248
+ | `chiptune` | Collaborative chiptune band — conductor + voice POs driving Sonic Pi |
249
+ | `music` | Genre-agnostic band — the conductor builds voices for any style on the fly |
250
+ | `music-beginner` | Talk-safe generative backing ensemble with curated Sonic Pi instruments |
251
+ | `music-pro` | Expressive live-pattern ensemble with independent voice POs and raw Sonic Pi patches |
72
252
 
73
253
  Extras
74
254
  ======
75
255
 
76
- - **License**: MIT
77
- - **Ruby**: >= 3.2.0
256
+ ### Community
257
+
258
+ Join the [Discord](https://discord.gg/fcMvcwdrZS) for support, discussion, and updates.
259
+
260
+ ### Blog Posts
261
+
262
+ - [What if we took message passing seriously?](https://worksonmymachine.ai/p/what-if-we-took-message-passing-seriously) -- the origin story and motivation behind Prompt Objects
263
+ - [As complexity grows, architecture](https://worksonmymachine.ai/p/as-complexity-grows-architecture) -- on why the hard problems are structural, not generative
264
+
265
+ ### Links
266
+
78
267
  - **Repository**: https://github.com/works-on-your-machine/prompt_objects
268
+ - **Changelog**: https://github.com/works-on-your-machine/prompt_objects/blob/main/CHANGELOG.md
269
+ - **License**: MIT
270
+ - **Ruby**: >= 3.2.0 (tested through Ruby 4)
data/exe/poop ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ # poop — Prompt-Object Oriented Programming. Same CLI, prouder name.
5
+ load File.expand_path("prompt_objects", __dir__)