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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +142 -0
- data/README.md +211 -19
- data/exe/poop +5 -0
- data/exe/prompt_objects +1 -1108
- data/exe/prompt_objects_mcp +5 -3
- data/lib/prompt_objects/capability.rb +33 -0
- data/lib/prompt_objects/cli/diagnostics_command.rb +69 -0
- data/lib/prompt_objects/cli/env_command.rb +435 -0
- data/lib/prompt_objects/cli/events_command.rb +145 -0
- data/lib/prompt_objects/cli/explore_command.rb +155 -0
- data/lib/prompt_objects/cli/helpers.rb +91 -0
- data/lib/prompt_objects/cli/message_command.rb +216 -0
- data/lib/prompt_objects/cli/repl_command.rb +366 -0
- data/lib/prompt_objects/cli/serve_command.rb +162 -0
- data/lib/prompt_objects/cli.rb +64 -422
- data/lib/prompt_objects/connectors/base.rb +16 -29
- data/lib/prompt_objects/connectors/mcp.rb +82 -98
- data/lib/prompt_objects/domain/records.rb +45 -0
- data/lib/prompt_objects/environment/exporter.rb +5 -4
- data/lib/prompt_objects/environment/git.rb +21 -1
- data/lib/prompt_objects/environment/importer.rb +5 -4
- data/lib/prompt_objects/environment/manager.rb +44 -6
- data/lib/prompt_objects/environment/manifest.rb +26 -4
- data/lib/prompt_objects/environment.rb +1350 -18
- data/lib/prompt_objects/execution/blocking_executor.rb +88 -0
- data/lib/prompt_objects/execution/context.rb +137 -0
- data/lib/prompt_objects/execution/contracts.rb +59 -0
- data/lib/prompt_objects/execution/permit_pool.rb +49 -0
- data/lib/prompt_objects/execution/policy.rb +47 -0
- data/lib/prompt_objects/execution/resource_lock_manager.rb +63 -0
- data/lib/prompt_objects/execution/runner.rb +498 -0
- data/lib/prompt_objects/execution/scheduler.rb +325 -0
- data/lib/prompt_objects/llm/factory.rb +4 -4
- data/lib/prompt_objects/llm/gemini_adapter.rb +25 -8
- data/lib/prompt_objects/llm/openai_adapter.rb +9 -1
- data/lib/prompt_objects/llm/pricing.rb +9 -2
- data/lib/prompt_objects/llm/response.rb +9 -4
- data/lib/prompt_objects/loader.rb +28 -1
- data/lib/prompt_objects/mcp/server.rb +6 -3
- data/lib/prompt_objects/mcp/tools/get_conversation.rb +15 -11
- data/lib/prompt_objects/mcp/tools/get_pending_requests.rb +2 -2
- data/lib/prompt_objects/mcp/tools/respond_to_request.rb +3 -3
- data/lib/prompt_objects/mcp/tools/send_message.rb +42 -32
- data/lib/prompt_objects/operations/diagnostics.rb +115 -0
- data/lib/prompt_objects/operations/retention.rb +75 -0
- data/lib/prompt_objects/operations/run_trace_builder.rb +152 -0
- data/lib/prompt_objects/primitives/http_get.rb +2 -0
- data/lib/prompt_objects/primitives/list_files.rb +2 -0
- data/lib/prompt_objects/primitives/read_file.rb +2 -0
- data/lib/prompt_objects/primitives/think.rb +36 -0
- data/lib/prompt_objects/primitives/write_file.rb +9 -0
- data/lib/prompt_objects/prompt_object.rb +190 -432
- data/lib/prompt_objects/repositories/artifact_repository.rb +109 -0
- data/lib/prompt_objects/repositories/base_repository.rb +37 -0
- data/lib/prompt_objects/repositories/definition_repository.rb +36 -0
- data/lib/prompt_objects/repositories/env_data_repository.rb +103 -0
- data/lib/prompt_objects/repositories/event_repository.rb +105 -0
- data/lib/prompt_objects/repositories/message_repository.rb +73 -0
- data/lib/prompt_objects/repositories/run_repository.rb +254 -0
- data/lib/prompt_objects/repositories/thread_repository.rb +87 -0
- data/lib/prompt_objects/repositories/tool_execution_repository.rb +88 -0
- data/lib/prompt_objects/repositories/workspace_session_repository.rb +61 -0
- data/lib/prompt_objects/server/api/routes.rb +561 -52
- data/lib/prompt_objects/server/app.rb +134 -1
- data/lib/prompt_objects/server/file_watcher.rb +9 -0
- data/lib/prompt_objects/server/public/assets/index-BjKlODDD.js +90 -0
- data/lib/prompt_objects/server/public/assets/index-w3fpIb5c.css +1 -0
- data/lib/prompt_objects/server/public/index.html +2 -2
- data/lib/prompt_objects/server/websocket_handler.rb +202 -207
- data/lib/prompt_objects/server.rb +170 -1
- data/lib/prompt_objects/service.rb +129 -0
- data/lib/prompt_objects/session/store.rb +774 -15
- data/lib/prompt_objects/universal/add_capability.rb +1 -1
- data/lib/prompt_objects/universal/create_capability.rb +4 -2
- data/lib/prompt_objects/universal/delete_env_data.rb +78 -0
- data/lib/prompt_objects/universal/delete_primitive.rb +1 -1
- data/lib/prompt_objects/universal/dispatch_po.rb +54 -0
- data/lib/prompt_objects/universal/get_env_data.rb +58 -0
- data/lib/prompt_objects/universal/get_run_status.rb +30 -0
- data/lib/prompt_objects/universal/join_runs.rb +35 -0
- data/lib/prompt_objects/universal/list_env_data.rb +57 -0
- data/lib/prompt_objects/universal/modify_primitive.rb +1 -1
- data/lib/prompt_objects/universal/render_artifact.rb +91 -0
- data/lib/prompt_objects/universal/request_primitive.rb +1 -1
- data/lib/prompt_objects/universal/set_env_data.rb +101 -0
- data/lib/prompt_objects/version.rb +5 -0
- data/lib/prompt_objects.rb +36 -6
- data/objects/coordinator.md +8 -4
- data/templates/arc-agi-1/objects/data_manager.md +2 -2
- data/templates/arc-agi-1/objects/observer.md +6 -2
- data/templates/arc-agi-1/objects/solver.md +14 -4
- data/templates/arc-agi-1/objects/verifier.md +6 -2
- data/templates/arc-agi-3/manifest.yml +19 -0
- data/templates/arc-agi-3/objects/analyst.md +79 -0
- data/templates/arc-agi-3/objects/player.md +76 -0
- data/templates/arc-agi-3/objects/strategist.md +97 -0
- data/templates/arc-agi-3/primitives/action_log.rb +133 -0
- data/templates/arc-agi-3/primitives/arc3_api.rb +223 -0
- data/templates/arc-agi-3/primitives/arc3_scorecard.rb +131 -0
- data/templates/arc-agi-3/primitives/frame_diff.rb +143 -0
- data/templates/arc-agi-3/primitives/frame_info.rb +96 -0
- data/templates/arc-agi-3/primitives/render_frame.rb +140 -0
- data/templates/basic/objects/basic.md +11 -3
- data/templates/chiptune/extras/sonic_pi_boot.rb +220 -0
- data/templates/chiptune/manifest.yml +20 -0
- data/templates/chiptune/objects/conductor.md +184 -0
- data/templates/chiptune/objects/sonic_pi.md +65 -0
- data/templates/chiptune/objects/voice_bass.md +44 -0
- data/templates/chiptune/objects/voice_lead.md +44 -0
- data/templates/chiptune/objects/voice_pad.md +43 -0
- data/templates/chiptune/objects/voice_perc.md +45 -0
- data/templates/chiptune/primitives/play_note.rb +59 -0
- data/templates/chiptune/primitives/play_sequence.rb +55 -0
- data/templates/chiptune/primitives/query_sonic_pi.rb +141 -0
- data/templates/chiptune/primitives/set_synth.rb +57 -0
- data/templates/chiptune/primitives/set_tempo.rb +45 -0
- data/templates/chiptune/primitives/stop_voice.rb +46 -0
- data/templates/chiptune/primitives/support/osc_bridge.rb +33 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/LICENSE +19 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb +58 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb +24 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb +46 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb +13 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb +6 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb +63 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb +46 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb +42 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb +26 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb +140 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb +53 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb +91 -0
- data/templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb +18 -0
- data/templates/developer/objects/code_reviewer.md +1 -1
- data/templates/developer/objects/coordinator.md +16 -3
- data/templates/developer/objects/debugger.md +3 -3
- data/templates/empty/objects/assistant.md +10 -5
- data/templates/minimal/objects/assistant.md +10 -5
- data/templates/music/extras/sonic_pi_boot.rb +220 -0
- data/templates/music/manifest.yml +16 -0
- data/templates/music/objects/conductor.md +154 -0
- data/templates/music/objects/sonic_pi.md +65 -0
- data/templates/music/primitives/play_note.rb +55 -0
- data/templates/music/primitives/play_sequence.rb +51 -0
- data/templates/music/primitives/query_sonic_pi.rb +139 -0
- data/templates/music/primitives/set_synth.rb +53 -0
- data/templates/music/primitives/set_tempo.rb +43 -0
- data/templates/music/primitives/stop_voice.rb +44 -0
- data/templates/music/primitives/support/osc_bridge.rb +33 -0
- data/templates/music/vendor/osc-ruby-1.1.5/LICENSE +19 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb +58 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb +24 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb +46 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb +13 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb +6 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb +63 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb +46 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb +42 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb +26 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb +140 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb +53 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb +91 -0
- data/templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb +18 -0
- data/templates/music-beginner/README.md +100 -0
- data/templates/music-beginner/extras/README.md +27 -0
- data/templates/music-beginner/extras/sonic_pi_boot.rb +297 -0
- data/templates/music-beginner/manifest.yml +25 -0
- data/templates/music-beginner/objects/conductor.md +222 -0
- data/templates/music-beginner/objects/engine_setup.md +54 -0
- data/templates/music-beginner/objects/voice_bass.md +43 -0
- data/templates/music-beginner/objects/voice_keys.md +48 -0
- data/templates/music-beginner/objects/voice_pad.md +46 -0
- data/templates/music-beginner/objects/voice_percussion.md +45 -0
- data/templates/music-beginner/objects/voice_texture.md +37 -0
- data/templates/music-beginner/primitives/play_pattern.rb +118 -0
- data/templates/music-beginner/primitives/query_music_engine.rb +94 -0
- data/templates/music-beginner/primitives/set_instrument.rb +47 -0
- data/templates/music-beginner/primitives/set_tempo.rb +43 -0
- data/templates/music-beginner/primitives/set_voice_level.rb +46 -0
- data/templates/music-beginner/primitives/stop_voice.rb +37 -0
- data/templates/music-beginner/primitives/support/osc_bridge.rb +25 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/LICENSE +19 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb +58 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb +24 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb +46 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb +13 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb +6 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb +63 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb +46 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb +42 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb +26 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb +140 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb +53 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb +91 -0
- data/templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb +18 -0
- data/templates/music-pro/extras/AUDITION.md +100 -0
- data/templates/music-pro/extras/sonic_pi_boot.rb +546 -0
- data/templates/music-pro/manifest.yml +19 -0
- data/templates/music-pro/objects/conductor.md +126 -0
- data/templates/music-pro/objects/sonic_pi.md +35 -0
- data/templates/music-pro/objects/voice_harmony.md +48 -0
- data/templates/music-pro/objects/voice_rhythm.md +43 -0
- data/templates/music-pro/objects/voice_texture.md +42 -0
- data/templates/music-pro/primitives/define_patch.rb +46 -0
- data/templates/music-pro/primitives/query_music_engine.rb +69 -0
- data/templates/music-pro/primitives/set_live_pattern.rb +70 -0
- data/templates/music-pro/primitives/set_tempo.rb +31 -0
- data/templates/music-pro/primitives/stop_voice.rb +31 -0
- data/templates/music-pro/primitives/support/music_protocol.rb +136 -0
- data/templates/music-pro/primitives/support/osc_bridge.rb +33 -0
- data/templates/music-pro/primitives/trigger_event.rb +44 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/LICENSE +19 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb +58 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb +24 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb +46 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb +13 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb +6 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb +63 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb +46 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb +42 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb +26 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb +140 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb +53 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb +91 -0
- data/templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb +18 -0
- data/templates/writer/objects/coordinator.md +14 -3
- data/templates/writer/objects/editor.md +1 -1
- data/templates/writer/objects/researcher.md +2 -2
- data/tools/thread-explorer.html +28 -1
- metadata +175 -65
- data/CLAUDE.md +0 -176
- data/Gemfile +0 -10
- data/Gemfile.lock +0 -233
- data/IMPLEMENTATION_PLAN.md +0 -1073
- data/Rakefile +0 -27
- data/design-doc-v2.md +0 -1232
- data/frontend/.gitignore +0 -3
- data/frontend/index.html +0 -17
- data/frontend/package-lock.json +0 -4540
- data/frontend/package.json +0 -36
- data/frontend/postcss.config.js +0 -6
- data/frontend/src/App.tsx +0 -103
- data/frontend/src/canvas/CanvasView.tsx +0 -113
- data/frontend/src/canvas/ForceLayout.ts +0 -115
- data/frontend/src/canvas/SceneManager.ts +0 -587
- data/frontend/src/canvas/canvasStore.ts +0 -47
- data/frontend/src/canvas/constants.ts +0 -95
- data/frontend/src/canvas/controls/CameraControls.ts +0 -98
- data/frontend/src/canvas/edges/MessageArc.ts +0 -149
- data/frontend/src/canvas/inspector/InspectorPanel.tsx +0 -31
- data/frontend/src/canvas/inspector/POInspector.tsx +0 -262
- data/frontend/src/canvas/inspector/ToolCallInspector.tsx +0 -67
- data/frontend/src/canvas/nodes/PONode.ts +0 -249
- data/frontend/src/canvas/nodes/ToolCallNode.ts +0 -116
- data/frontend/src/canvas/types.ts +0 -24
- data/frontend/src/components/ContextMenu.tsx +0 -68
- data/frontend/src/components/Inspector.tsx +0 -232
- data/frontend/src/components/MarkdownMessage.tsx +0 -155
- data/frontend/src/components/MethodList.tsx +0 -90
- data/frontend/src/components/ModelSelector.tsx +0 -115
- data/frontend/src/components/NotificationPanel.tsx +0 -130
- data/frontend/src/components/ObjectList.tsx +0 -78
- data/frontend/src/components/PaneSlot.tsx +0 -30
- data/frontend/src/components/SourcePane.tsx +0 -202
- data/frontend/src/components/SystemBar.tsx +0 -74
- data/frontend/src/components/Transcript.tsx +0 -76
- data/frontend/src/components/UsagePanel.tsx +0 -105
- data/frontend/src/components/Workspace.tsx +0 -260
- data/frontend/src/components/index.ts +0 -12
- data/frontend/src/hooks/useResize.ts +0 -55
- data/frontend/src/hooks/useWebSocket.ts +0 -517
- data/frontend/src/index.css +0 -103
- data/frontend/src/main.tsx +0 -10
- data/frontend/src/store/index.ts +0 -279
- data/frontend/src/types/index.ts +0 -165
- data/frontend/tailwind.config.js +0 -44
- data/frontend/tsconfig.json +0 -30
- data/frontend/vite.config.ts +0 -29
- data/lib/prompt_objects/server/public/assets/index-D1myxE0l.js +0 -4345
- data/lib/prompt_objects/server/public/assets/index-DdCcwC-Z.css +0 -1
- data/lib/prompt_objects/universal/add_primitive.rb +0 -118
- data/lib/prompt_objects/universal/ask_human.rb +0 -109
- data/lib/prompt_objects/universal/create_primitive.rb +0 -174
- data/lib/prompt_objects/universal/list_primitives.rb +0 -145
- data/lib/prompt_objects/universal/think.rb +0 -41
- data/prompt_objects.gemspec +0 -50
- data/templates/basic/.gitignore +0 -2
- data/templates/developer/.gitignore +0 -5
- data/templates/empty/.gitignore +0 -5
- data/templates/empty/objects/.gitkeep +0 -0
- data/templates/minimal/.gitignore +0 -5
- data/templates/writer/.gitignore +0 -5
data/tools/thread-explorer.html
CHANGED
|
@@ -298,6 +298,7 @@ button { font-family:var(--mono); cursor:pointer; }
|
|
|
298
298
|
|
|
299
299
|
// --- State ---
|
|
300
300
|
let treeData = null;
|
|
301
|
+
let envData = []; // root-level env data entries
|
|
301
302
|
let events = []; // flattened event sequence
|
|
302
303
|
let actors = []; // ordered actor names
|
|
303
304
|
let poNames = new Set();
|
|
@@ -310,7 +311,7 @@ let activeFilters = new Set(); // PO name filters
|
|
|
310
311
|
let allNodes = {}; // id -> node for quick lookup
|
|
311
312
|
|
|
312
313
|
const COLORS = ['#33ff66','#ffaa33','#33ddff','#dd55ff','#ff6699','#33ffcc','#ffdd44','#88aaff','#ff8844','#99ff33'];
|
|
313
|
-
const STRUCTURAL_TOOLS = new Set(['create_capability','add_capability','request_capability','remove_capability','modify_prompt','create_po','delete_primitive'
|
|
314
|
+
const STRUCTURAL_TOOLS = new Set(['create_capability','add_capability','request_capability','remove_capability','modify_prompt','create_po','delete_primitive']);
|
|
314
315
|
|
|
315
316
|
// --- DOM refs ---
|
|
316
317
|
const dropZone = document.getElementById('drop-zone');
|
|
@@ -335,6 +336,7 @@ function loadFile(file) {
|
|
|
335
336
|
|
|
336
337
|
function loadData(data) {
|
|
337
338
|
treeData = data;
|
|
339
|
+
envData = data.env_data || [];
|
|
338
340
|
allNodes = {};
|
|
339
341
|
indexNodes(data);
|
|
340
342
|
poNames = extractPONames(data);
|
|
@@ -503,9 +505,11 @@ function renderHeader() {
|
|
|
503
505
|
const usage = sumUsageTree(treeData);
|
|
504
506
|
const nEvents = events.length;
|
|
505
507
|
const nSessions = Object.keys(allNodes).length;
|
|
508
|
+
const envCount = envData.length;
|
|
506
509
|
document.getElementById('h-stats').innerHTML =
|
|
507
510
|
`<span><span class="v">${nSessions}</span> sessions</span>`+
|
|
508
511
|
`<span><span class="v">${nEvents}</span> events</span>`+
|
|
512
|
+
(envCount > 0 ? `<span style="color:var(--amber)"><span class="v">${envCount}</span> env data</span>` : '')+
|
|
509
513
|
`<span><span class="v">${fmtNum(usage.input)}</span> in</span>`+
|
|
510
514
|
`<span><span class="v">${fmtNum(usage.output)}</span> out</span>`;
|
|
511
515
|
}
|
|
@@ -817,6 +821,29 @@ function renderDetail() {
|
|
|
817
821
|
html += `<div class="stats"><span><span class="v">${fmtNum(usage.input)}</span> in</span><span><span class="v">${fmtNum(usage.output)}</span> out</span></div>`;
|
|
818
822
|
html += `</div>`;
|
|
819
823
|
|
|
824
|
+
// Env Data section (only on root session when env_data exists)
|
|
825
|
+
if (type === 'root' && envData.length > 0) {
|
|
826
|
+
html += '<div style="padding:8px 16px 0">';
|
|
827
|
+
html += '<div style="font-size:10px;text-transform:uppercase;letter-spacing:0.5px;color:var(--amber);margin-bottom:6px;font-weight:600">Env Data</div>';
|
|
828
|
+
envData.forEach(entry => {
|
|
829
|
+
const eKey = esc(entry.key);
|
|
830
|
+
const eDesc = esc(entry.short_description||'');
|
|
831
|
+
const eBy = esc(entry.stored_by||'');
|
|
832
|
+
const eVal = typeof entry.value === 'string' ? esc(entry.value) : esc(JSON.stringify(entry.value,null,2));
|
|
833
|
+
html += `<div class="tc">`;
|
|
834
|
+
html += `<div class="tc-head" onclick="toggleTc(this)" style="border-left:2px solid var(--amber)">`;
|
|
835
|
+
html += `<span class="chv">▶</span>`;
|
|
836
|
+
html += `<span class="tc-name" style="color:var(--amber)">${eKey}</span>`;
|
|
837
|
+
html += `<span class="tc-label">${eDesc}</span>`;
|
|
838
|
+
html += `<span class="tc-label" style="margin-left:auto">by ${eBy}</span>`;
|
|
839
|
+
html += `</div>`;
|
|
840
|
+
html += `<div class="tc-body">`;
|
|
841
|
+
html += `<div class="tc-section"><div class="tc-section-label">Value</div><pre style="color:var(--amber)">${eVal}</pre></div>`;
|
|
842
|
+
html += `</div></div>`;
|
|
843
|
+
});
|
|
844
|
+
html += '</div>';
|
|
845
|
+
}
|
|
846
|
+
|
|
820
847
|
// Messages
|
|
821
848
|
html += '<div class="messages">';
|
|
822
849
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prompt_objects
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scott Werner
|
|
@@ -196,75 +196,46 @@ description: A framework where markdown files with LLM-backed behavior act as fi
|
|
|
196
196
|
email:
|
|
197
197
|
- scott@sublayer.com
|
|
198
198
|
executables:
|
|
199
|
+
- poop
|
|
199
200
|
- prompt_objects
|
|
200
201
|
- prompt_objects_mcp
|
|
201
202
|
extensions: []
|
|
202
203
|
extra_rdoc_files: []
|
|
203
204
|
files:
|
|
204
205
|
- CHANGELOG.md
|
|
205
|
-
- CLAUDE.md
|
|
206
|
-
- Gemfile
|
|
207
|
-
- Gemfile.lock
|
|
208
|
-
- IMPLEMENTATION_PLAN.md
|
|
209
206
|
- LICENSE
|
|
210
207
|
- README.md
|
|
211
|
-
-
|
|
212
|
-
- design-doc-v2.md
|
|
208
|
+
- exe/poop
|
|
213
209
|
- exe/prompt_objects
|
|
214
210
|
- exe/prompt_objects_mcp
|
|
215
|
-
- frontend/.gitignore
|
|
216
|
-
- frontend/index.html
|
|
217
|
-
- frontend/package-lock.json
|
|
218
|
-
- frontend/package.json
|
|
219
|
-
- frontend/postcss.config.js
|
|
220
|
-
- frontend/src/App.tsx
|
|
221
|
-
- frontend/src/canvas/CanvasView.tsx
|
|
222
|
-
- frontend/src/canvas/ForceLayout.ts
|
|
223
|
-
- frontend/src/canvas/SceneManager.ts
|
|
224
|
-
- frontend/src/canvas/canvasStore.ts
|
|
225
|
-
- frontend/src/canvas/constants.ts
|
|
226
|
-
- frontend/src/canvas/controls/CameraControls.ts
|
|
227
|
-
- frontend/src/canvas/edges/MessageArc.ts
|
|
228
|
-
- frontend/src/canvas/inspector/InspectorPanel.tsx
|
|
229
|
-
- frontend/src/canvas/inspector/POInspector.tsx
|
|
230
|
-
- frontend/src/canvas/inspector/ToolCallInspector.tsx
|
|
231
|
-
- frontend/src/canvas/nodes/PONode.ts
|
|
232
|
-
- frontend/src/canvas/nodes/ToolCallNode.ts
|
|
233
|
-
- frontend/src/canvas/types.ts
|
|
234
|
-
- frontend/src/components/ContextMenu.tsx
|
|
235
|
-
- frontend/src/components/Inspector.tsx
|
|
236
|
-
- frontend/src/components/MarkdownMessage.tsx
|
|
237
|
-
- frontend/src/components/MethodList.tsx
|
|
238
|
-
- frontend/src/components/ModelSelector.tsx
|
|
239
|
-
- frontend/src/components/NotificationPanel.tsx
|
|
240
|
-
- frontend/src/components/ObjectList.tsx
|
|
241
|
-
- frontend/src/components/PaneSlot.tsx
|
|
242
|
-
- frontend/src/components/SourcePane.tsx
|
|
243
|
-
- frontend/src/components/SystemBar.tsx
|
|
244
|
-
- frontend/src/components/Transcript.tsx
|
|
245
|
-
- frontend/src/components/UsagePanel.tsx
|
|
246
|
-
- frontend/src/components/Workspace.tsx
|
|
247
|
-
- frontend/src/components/index.ts
|
|
248
|
-
- frontend/src/hooks/useResize.ts
|
|
249
|
-
- frontend/src/hooks/useWebSocket.ts
|
|
250
|
-
- frontend/src/index.css
|
|
251
|
-
- frontend/src/main.tsx
|
|
252
|
-
- frontend/src/store/index.ts
|
|
253
|
-
- frontend/src/types/index.ts
|
|
254
|
-
- frontend/tailwind.config.js
|
|
255
|
-
- frontend/tsconfig.json
|
|
256
|
-
- frontend/vite.config.ts
|
|
257
211
|
- lib/prompt_objects.rb
|
|
258
212
|
- lib/prompt_objects/capability.rb
|
|
259
213
|
- lib/prompt_objects/cli.rb
|
|
214
|
+
- lib/prompt_objects/cli/diagnostics_command.rb
|
|
215
|
+
- lib/prompt_objects/cli/env_command.rb
|
|
216
|
+
- lib/prompt_objects/cli/events_command.rb
|
|
217
|
+
- lib/prompt_objects/cli/explore_command.rb
|
|
218
|
+
- lib/prompt_objects/cli/helpers.rb
|
|
219
|
+
- lib/prompt_objects/cli/message_command.rb
|
|
220
|
+
- lib/prompt_objects/cli/repl_command.rb
|
|
221
|
+
- lib/prompt_objects/cli/serve_command.rb
|
|
260
222
|
- lib/prompt_objects/connectors/base.rb
|
|
261
223
|
- lib/prompt_objects/connectors/mcp.rb
|
|
224
|
+
- lib/prompt_objects/domain/records.rb
|
|
262
225
|
- lib/prompt_objects/environment.rb
|
|
263
226
|
- lib/prompt_objects/environment/exporter.rb
|
|
264
227
|
- lib/prompt_objects/environment/git.rb
|
|
265
228
|
- lib/prompt_objects/environment/importer.rb
|
|
266
229
|
- lib/prompt_objects/environment/manager.rb
|
|
267
230
|
- lib/prompt_objects/environment/manifest.rb
|
|
231
|
+
- lib/prompt_objects/execution/blocking_executor.rb
|
|
232
|
+
- lib/prompt_objects/execution/context.rb
|
|
233
|
+
- lib/prompt_objects/execution/contracts.rb
|
|
234
|
+
- lib/prompt_objects/execution/permit_pool.rb
|
|
235
|
+
- lib/prompt_objects/execution/policy.rb
|
|
236
|
+
- lib/prompt_objects/execution/resource_lock_manager.rb
|
|
237
|
+
- lib/prompt_objects/execution/runner.rb
|
|
238
|
+
- lib/prompt_objects/execution/scheduler.rb
|
|
268
239
|
- lib/prompt_objects/human_queue.rb
|
|
269
240
|
- lib/prompt_objects/llm/anthropic_adapter.rb
|
|
270
241
|
- lib/prompt_objects/llm/factory.rb
|
|
@@ -281,40 +252,58 @@ files:
|
|
|
281
252
|
- lib/prompt_objects/mcp/tools/respond_to_request.rb
|
|
282
253
|
- lib/prompt_objects/mcp/tools/send_message.rb
|
|
283
254
|
- lib/prompt_objects/message_bus.rb
|
|
255
|
+
- lib/prompt_objects/operations/diagnostics.rb
|
|
256
|
+
- lib/prompt_objects/operations/retention.rb
|
|
257
|
+
- lib/prompt_objects/operations/run_trace_builder.rb
|
|
284
258
|
- lib/prompt_objects/primitive.rb
|
|
285
259
|
- lib/prompt_objects/primitives/http_get.rb
|
|
286
260
|
- lib/prompt_objects/primitives/list_files.rb
|
|
287
261
|
- lib/prompt_objects/primitives/read_file.rb
|
|
262
|
+
- lib/prompt_objects/primitives/think.rb
|
|
288
263
|
- lib/prompt_objects/primitives/write_file.rb
|
|
289
264
|
- lib/prompt_objects/prompt_object.rb
|
|
290
265
|
- lib/prompt_objects/registry.rb
|
|
266
|
+
- lib/prompt_objects/repositories/artifact_repository.rb
|
|
267
|
+
- lib/prompt_objects/repositories/base_repository.rb
|
|
268
|
+
- lib/prompt_objects/repositories/definition_repository.rb
|
|
269
|
+
- lib/prompt_objects/repositories/env_data_repository.rb
|
|
270
|
+
- lib/prompt_objects/repositories/event_repository.rb
|
|
271
|
+
- lib/prompt_objects/repositories/message_repository.rb
|
|
272
|
+
- lib/prompt_objects/repositories/run_repository.rb
|
|
273
|
+
- lib/prompt_objects/repositories/thread_repository.rb
|
|
274
|
+
- lib/prompt_objects/repositories/tool_execution_repository.rb
|
|
275
|
+
- lib/prompt_objects/repositories/workspace_session_repository.rb
|
|
291
276
|
- lib/prompt_objects/server.rb
|
|
292
277
|
- lib/prompt_objects/server/api/routes.rb
|
|
293
278
|
- lib/prompt_objects/server/app.rb
|
|
294
279
|
- lib/prompt_objects/server/file_watcher.rb
|
|
295
|
-
- lib/prompt_objects/server/public/assets/index-
|
|
296
|
-
- lib/prompt_objects/server/public/assets/index-
|
|
280
|
+
- lib/prompt_objects/server/public/assets/index-BjKlODDD.js
|
|
281
|
+
- lib/prompt_objects/server/public/assets/index-w3fpIb5c.css
|
|
297
282
|
- lib/prompt_objects/server/public/index.html
|
|
298
283
|
- lib/prompt_objects/server/websocket_handler.rb
|
|
284
|
+
- lib/prompt_objects/service.rb
|
|
299
285
|
- lib/prompt_objects/session/store.rb
|
|
300
286
|
- lib/prompt_objects/universal/add_capability.rb
|
|
301
|
-
- lib/prompt_objects/universal/add_primitive.rb
|
|
302
|
-
- lib/prompt_objects/universal/ask_human.rb
|
|
303
287
|
- lib/prompt_objects/universal/create_capability.rb
|
|
304
|
-
- lib/prompt_objects/universal/
|
|
288
|
+
- lib/prompt_objects/universal/delete_env_data.rb
|
|
305
289
|
- lib/prompt_objects/universal/delete_primitive.rb
|
|
290
|
+
- lib/prompt_objects/universal/dispatch_po.rb
|
|
291
|
+
- lib/prompt_objects/universal/get_env_data.rb
|
|
292
|
+
- lib/prompt_objects/universal/get_run_status.rb
|
|
293
|
+
- lib/prompt_objects/universal/join_runs.rb
|
|
306
294
|
- lib/prompt_objects/universal/list_capabilities.rb
|
|
307
|
-
- lib/prompt_objects/universal/
|
|
295
|
+
- lib/prompt_objects/universal/list_env_data.rb
|
|
308
296
|
- lib/prompt_objects/universal/modify_primitive.rb
|
|
309
297
|
- lib/prompt_objects/universal/modify_prompt.rb
|
|
310
298
|
- lib/prompt_objects/universal/remove_capability.rb
|
|
299
|
+
- lib/prompt_objects/universal/render_artifact.rb
|
|
311
300
|
- lib/prompt_objects/universal/request_primitive.rb
|
|
312
|
-
- lib/prompt_objects/universal/
|
|
301
|
+
- lib/prompt_objects/universal/set_env_data.rb
|
|
313
302
|
- lib/prompt_objects/universal/verify_primitive.rb
|
|
303
|
+
- lib/prompt_objects/version.rb
|
|
314
304
|
- objects/coordinator.md
|
|
315
305
|
- objects/greeter.md
|
|
316
306
|
- objects/reader.md
|
|
317
|
-
- prompt_objects.gemspec
|
|
318
307
|
- templates/arc-agi-1/manifest.yml
|
|
319
308
|
- templates/arc-agi-1/objects/data_manager.md
|
|
320
309
|
- templates/arc-agi-1/objects/observer.md
|
|
@@ -328,22 +317,142 @@ files:
|
|
|
328
317
|
- templates/arc-agi-1/primitives/load_arc_task.rb
|
|
329
318
|
- templates/arc-agi-1/primitives/render_grid.rb
|
|
330
319
|
- templates/arc-agi-1/primitives/test_solution.rb
|
|
331
|
-
- templates/
|
|
320
|
+
- templates/arc-agi-3/manifest.yml
|
|
321
|
+
- templates/arc-agi-3/objects/analyst.md
|
|
322
|
+
- templates/arc-agi-3/objects/player.md
|
|
323
|
+
- templates/arc-agi-3/objects/strategist.md
|
|
324
|
+
- templates/arc-agi-3/primitives/action_log.rb
|
|
325
|
+
- templates/arc-agi-3/primitives/arc3_api.rb
|
|
326
|
+
- templates/arc-agi-3/primitives/arc3_scorecard.rb
|
|
327
|
+
- templates/arc-agi-3/primitives/frame_diff.rb
|
|
328
|
+
- templates/arc-agi-3/primitives/frame_info.rb
|
|
329
|
+
- templates/arc-agi-3/primitives/render_frame.rb
|
|
332
330
|
- templates/basic/manifest.yml
|
|
333
331
|
- templates/basic/objects/basic.md
|
|
334
|
-
- templates/
|
|
332
|
+
- templates/chiptune/extras/sonic_pi_boot.rb
|
|
333
|
+
- templates/chiptune/manifest.yml
|
|
334
|
+
- templates/chiptune/objects/conductor.md
|
|
335
|
+
- templates/chiptune/objects/sonic_pi.md
|
|
336
|
+
- templates/chiptune/objects/voice_bass.md
|
|
337
|
+
- templates/chiptune/objects/voice_lead.md
|
|
338
|
+
- templates/chiptune/objects/voice_pad.md
|
|
339
|
+
- templates/chiptune/objects/voice_perc.md
|
|
340
|
+
- templates/chiptune/primitives/play_note.rb
|
|
341
|
+
- templates/chiptune/primitives/play_sequence.rb
|
|
342
|
+
- templates/chiptune/primitives/query_sonic_pi.rb
|
|
343
|
+
- templates/chiptune/primitives/set_synth.rb
|
|
344
|
+
- templates/chiptune/primitives/set_tempo.rb
|
|
345
|
+
- templates/chiptune/primitives/stop_voice.rb
|
|
346
|
+
- templates/chiptune/primitives/support/osc_bridge.rb
|
|
347
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/LICENSE
|
|
348
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb
|
|
349
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb
|
|
350
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb
|
|
351
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb
|
|
352
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb
|
|
353
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb
|
|
354
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb
|
|
355
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb
|
|
356
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb
|
|
357
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb
|
|
358
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb
|
|
359
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb
|
|
360
|
+
- templates/chiptune/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb
|
|
335
361
|
- templates/developer/manifest.yml
|
|
336
362
|
- templates/developer/objects/code_reviewer.md
|
|
337
363
|
- templates/developer/objects/coordinator.md
|
|
338
364
|
- templates/developer/objects/debugger.md
|
|
339
|
-
- templates/empty/.gitignore
|
|
340
365
|
- templates/empty/manifest.yml
|
|
341
|
-
- templates/empty/objects/.gitkeep
|
|
342
366
|
- templates/empty/objects/assistant.md
|
|
343
|
-
- templates/minimal/.gitignore
|
|
344
367
|
- templates/minimal/manifest.yml
|
|
345
368
|
- templates/minimal/objects/assistant.md
|
|
346
|
-
- templates/
|
|
369
|
+
- templates/music-beginner/README.md
|
|
370
|
+
- templates/music-beginner/extras/README.md
|
|
371
|
+
- templates/music-beginner/extras/sonic_pi_boot.rb
|
|
372
|
+
- templates/music-beginner/manifest.yml
|
|
373
|
+
- templates/music-beginner/objects/conductor.md
|
|
374
|
+
- templates/music-beginner/objects/engine_setup.md
|
|
375
|
+
- templates/music-beginner/objects/voice_bass.md
|
|
376
|
+
- templates/music-beginner/objects/voice_keys.md
|
|
377
|
+
- templates/music-beginner/objects/voice_pad.md
|
|
378
|
+
- templates/music-beginner/objects/voice_percussion.md
|
|
379
|
+
- templates/music-beginner/objects/voice_texture.md
|
|
380
|
+
- templates/music-beginner/primitives/play_pattern.rb
|
|
381
|
+
- templates/music-beginner/primitives/query_music_engine.rb
|
|
382
|
+
- templates/music-beginner/primitives/set_instrument.rb
|
|
383
|
+
- templates/music-beginner/primitives/set_tempo.rb
|
|
384
|
+
- templates/music-beginner/primitives/set_voice_level.rb
|
|
385
|
+
- templates/music-beginner/primitives/stop_voice.rb
|
|
386
|
+
- templates/music-beginner/primitives/support/osc_bridge.rb
|
|
387
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/LICENSE
|
|
388
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb
|
|
389
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb
|
|
390
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb
|
|
391
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb
|
|
392
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb
|
|
393
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb
|
|
394
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb
|
|
395
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb
|
|
396
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb
|
|
397
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb
|
|
398
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb
|
|
399
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb
|
|
400
|
+
- templates/music-beginner/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb
|
|
401
|
+
- templates/music-pro/extras/AUDITION.md
|
|
402
|
+
- templates/music-pro/extras/sonic_pi_boot.rb
|
|
403
|
+
- templates/music-pro/manifest.yml
|
|
404
|
+
- templates/music-pro/objects/conductor.md
|
|
405
|
+
- templates/music-pro/objects/sonic_pi.md
|
|
406
|
+
- templates/music-pro/objects/voice_harmony.md
|
|
407
|
+
- templates/music-pro/objects/voice_rhythm.md
|
|
408
|
+
- templates/music-pro/objects/voice_texture.md
|
|
409
|
+
- templates/music-pro/primitives/define_patch.rb
|
|
410
|
+
- templates/music-pro/primitives/query_music_engine.rb
|
|
411
|
+
- templates/music-pro/primitives/set_live_pattern.rb
|
|
412
|
+
- templates/music-pro/primitives/set_tempo.rb
|
|
413
|
+
- templates/music-pro/primitives/stop_voice.rb
|
|
414
|
+
- templates/music-pro/primitives/support/music_protocol.rb
|
|
415
|
+
- templates/music-pro/primitives/support/osc_bridge.rb
|
|
416
|
+
- templates/music-pro/primitives/trigger_event.rb
|
|
417
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/LICENSE
|
|
418
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb
|
|
419
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb
|
|
420
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb
|
|
421
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb
|
|
422
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb
|
|
423
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb
|
|
424
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb
|
|
425
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb
|
|
426
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb
|
|
427
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb
|
|
428
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb
|
|
429
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb
|
|
430
|
+
- templates/music-pro/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb
|
|
431
|
+
- templates/music/extras/sonic_pi_boot.rb
|
|
432
|
+
- templates/music/manifest.yml
|
|
433
|
+
- templates/music/objects/conductor.md
|
|
434
|
+
- templates/music/objects/sonic_pi.md
|
|
435
|
+
- templates/music/primitives/play_note.rb
|
|
436
|
+
- templates/music/primitives/play_sequence.rb
|
|
437
|
+
- templates/music/primitives/query_sonic_pi.rb
|
|
438
|
+
- templates/music/primitives/set_synth.rb
|
|
439
|
+
- templates/music/primitives/set_tempo.rb
|
|
440
|
+
- templates/music/primitives/stop_voice.rb
|
|
441
|
+
- templates/music/primitives/support/osc_bridge.rb
|
|
442
|
+
- templates/music/vendor/osc-ruby-1.1.5/LICENSE
|
|
443
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby.rb
|
|
444
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/address_pattern.rb
|
|
445
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/broadcast_client.rb
|
|
446
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/bundle.rb
|
|
447
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/client.rb
|
|
448
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/core_ext/time.rb
|
|
449
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/em_server.rb
|
|
450
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/message.rb
|
|
451
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/network_packet.rb
|
|
452
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_argument.rb
|
|
453
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_packet.rb
|
|
454
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/osc_types.rb
|
|
455
|
+
- templates/music/vendor/osc-ruby-1.1.5/lib/osc-ruby/server.rb
|
|
347
456
|
- templates/writer/manifest.yml
|
|
348
457
|
- templates/writer/objects/coordinator.md
|
|
349
458
|
- templates/writer/objects/editor.md
|
|
@@ -354,8 +463,9 @@ licenses:
|
|
|
354
463
|
- MIT
|
|
355
464
|
metadata:
|
|
356
465
|
homepage_uri: https://github.com/works-on-your-machine/prompt_objects
|
|
357
|
-
source_code_uri: https://github.com/works-on-your-machine/prompt_objects
|
|
466
|
+
source_code_uri: https://github.com/works-on-your-machine/prompt_objects/tree/v0.7.0
|
|
358
467
|
changelog_uri: https://github.com/works-on-your-machine/prompt_objects/blob/main/CHANGELOG.md
|
|
468
|
+
rubygems_mfa_required: 'true'
|
|
359
469
|
rdoc_options: []
|
|
360
470
|
require_paths:
|
|
361
471
|
- lib
|
|
@@ -370,7 +480,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
370
480
|
- !ruby/object:Gem::Version
|
|
371
481
|
version: '0'
|
|
372
482
|
requirements: []
|
|
373
|
-
rubygems_version: 4.0.
|
|
483
|
+
rubygems_version: 4.0.7
|
|
374
484
|
specification_version: 4
|
|
375
485
|
summary: LLM-backed entities as first-class autonomous objects
|
|
376
486
|
test_files: []
|
data/CLAUDE.md
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
## Project Overview
|
|
6
|
-
|
|
7
|
-
**PromptObjects** is a Ruby framework where markdown files with LLM-backed behavior act as first-class autonomous entities. The core insight: **everything is a capability**—primitives (Ruby code) and Prompt-Objects (markdown files) share the same interface, differing only in interpretation complexity.
|
|
8
|
-
|
|
9
|
-
**Current Status**: v0.5.0 — The core framework is fully implemented and functional. The original 6-phase implementation plan is complete. Active development is focused on visualization, developer experience, and exploring new primitives. See `CHANGELOG.md` for release history and `design-doc-v2.md` / `IMPLEMENTATION_PLAN.md` for original design context.
|
|
10
|
-
|
|
11
|
-
## Architecture
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
RUNTIME (Environment)
|
|
15
|
-
├── CAPABILITY REGISTRY
|
|
16
|
-
│ ├── PRIMITIVES (Ruby) - deterministic interpretation
|
|
17
|
-
│ ├── PROMPT-OBJECTS (Markdown) - semantic interpretation via LLM
|
|
18
|
-
│ └── UNIVERSAL CAPABILITIES - available to all POs automatically
|
|
19
|
-
├── MESSAGE BUS - routes messages, logs to SQLite for replay
|
|
20
|
-
├── SESSION STORE (SQLite) - persistent conversation threads, delegation tracking
|
|
21
|
-
├── HUMAN QUEUE - non-blocking ask_human requests
|
|
22
|
-
├── WEB SERVER (Sinatra + WebSocket) - serves React frontend
|
|
23
|
-
└── MCP SERVER - exposes POs as tools via Model Context Protocol
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### Unified Capability Interface
|
|
27
|
-
Both primitives and Prompt-Objects implement:
|
|
28
|
-
```ruby
|
|
29
|
-
class Capability
|
|
30
|
-
def name # string identifier
|
|
31
|
-
def description # what this capability does
|
|
32
|
-
def receive(message, context:) # handle message, return response
|
|
33
|
-
end
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Prompt-Object Structure
|
|
37
|
-
Markdown files with two parts:
|
|
38
|
-
- **Frontmatter (YAML)**: Configuration (name, description, capabilities)
|
|
39
|
-
- **Body (Markdown)**: Identity and behavior (becomes LLM system prompt)
|
|
40
|
-
|
|
41
|
-
Example:
|
|
42
|
-
```markdown
|
|
43
|
-
---
|
|
44
|
-
name: reader
|
|
45
|
-
description: Helps people understand files
|
|
46
|
-
capabilities:
|
|
47
|
-
- read_file
|
|
48
|
-
- list_files
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
# Reader
|
|
52
|
-
## Identity
|
|
53
|
-
You are a careful, thoughtful file reader...
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Universal Capabilities
|
|
57
|
-
Available to all Prompt-Objects automatically (no frontmatter declaration needed):
|
|
58
|
-
- `ask_human` - pause for human input/confirmation
|
|
59
|
-
- `think` - internal reasoning (not shown to human)
|
|
60
|
-
- `create_capability` / `add_capability` / `remove_capability` - self-modification
|
|
61
|
-
- `list_capabilities` / `list_primitives` - introspection
|
|
62
|
-
- `create_primitive` / `add_primitive` / `delete_primitive` / `verify_primitive` / `modify_primitive` / `request_primitive` - primitive management
|
|
63
|
-
- `modify_prompt` - rewrite own system prompt at runtime
|
|
64
|
-
|
|
65
|
-
### PO-to-PO Delegation
|
|
66
|
-
When a PO calls another PO, the system creates an isolated delegation thread in the target PO. The caller's context is tracked so messages show correct provenance. Delegation start/complete events are broadcast via WebSocket for real-time UI updates.
|
|
67
|
-
|
|
68
|
-
## Technology Stack
|
|
69
|
-
|
|
70
|
-
- **Ruby** (>= 3.2, tested through Ruby 4) - core implementation
|
|
71
|
-
- **LLM APIs** - OpenAI, Anthropic, Gemini, Ollama, OpenRouter (adapter pattern via `LLM::Factory`)
|
|
72
|
-
- **Sinatra** - web server for REST API and static file serving
|
|
73
|
-
- **faye-websocket** - real-time WebSocket communication
|
|
74
|
-
- **React + TypeScript** - web frontend (dashboard, chat, capabilities panel)
|
|
75
|
-
- **Three.js** - spatial canvas visualization (force-directed PO graph)
|
|
76
|
-
- **SQLite** - session persistence and event log storage
|
|
77
|
-
- **MCP** - Model Context Protocol server mode
|
|
78
|
-
|
|
79
|
-
## File Structure
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
prompt_objects/
|
|
83
|
-
├── exe/prompt_objects # CLI entrypoint
|
|
84
|
-
├── lib/
|
|
85
|
-
│ ├── prompt_objects.rb # Main entry, requires all modules
|
|
86
|
-
│ └── prompt_objects/
|
|
87
|
-
│ ├── environment.rb # Runtime container (registry, bus, LLM, sessions)
|
|
88
|
-
│ ├── capability.rb # Base capability interface
|
|
89
|
-
│ ├── prompt_object.rb # PO implementation (LLM conversation loop)
|
|
90
|
-
│ ├── primitive.rb # Primitive tool wrapper
|
|
91
|
-
│ ├── loader.rb # Parses frontmatter + body from .md files
|
|
92
|
-
│ ├── registry.rb # Capability registration and lookup
|
|
93
|
-
│ ├── message_bus.rb # Message routing, logging, SQLite persistence
|
|
94
|
-
│ ├── human_queue.rb # Non-blocking human interaction queue
|
|
95
|
-
│ ├── cli.rb # CLI command definitions
|
|
96
|
-
│ ├── server.rb # Web server setup
|
|
97
|
-
│ ├── server/
|
|
98
|
-
│ │ ├── app.rb # Sinatra application
|
|
99
|
-
│ │ ├── api/routes.rb # REST API endpoints
|
|
100
|
-
│ │ ├── websocket_handler.rb # WebSocket event handling
|
|
101
|
-
│ │ └── file_watcher.rb # Live .md file change detection
|
|
102
|
-
│ ├── llm/
|
|
103
|
-
│ │ ├── factory.rb # Provider/model selection
|
|
104
|
-
│ │ ├── response.rb # Unified response object
|
|
105
|
-
│ │ ├── pricing.rb # Token cost calculation
|
|
106
|
-
│ │ ├── openai_adapter.rb # OpenAI + Ollama + OpenRouter
|
|
107
|
-
│ │ ├── anthropic_adapter.rb
|
|
108
|
-
│ │ └── gemini_adapter.rb
|
|
109
|
-
│ ├── primitives/ # Built-in: read_file, list_files, write_file, http_get
|
|
110
|
-
│ ├── universal/ # 14 universal capabilities (see list above)
|
|
111
|
-
│ ├── connectors/ # Interface adapters (base, mcp)
|
|
112
|
-
│ ├── mcp/ # MCP server and tool definitions
|
|
113
|
-
│ ├── session/
|
|
114
|
-
│ │ └── store.rb # SQLite session/thread persistence
|
|
115
|
-
│ └── environment/
|
|
116
|
-
│ ├── manager.rb # Create/list/clone environments
|
|
117
|
-
│ ├── manifest.rb # Environment metadata (manifest.yml)
|
|
118
|
-
│ ├── git.rb # Auto-commit integration
|
|
119
|
-
│ ├── exporter.rb # Environment export
|
|
120
|
-
│ └── importer.rb # Environment import
|
|
121
|
-
├── frontend/ # React + TypeScript web UI
|
|
122
|
-
│ └── src/
|
|
123
|
-
│ ├── App.tsx
|
|
124
|
-
│ ├── components/ # Dashboard, chat, capabilities panel
|
|
125
|
-
│ ├── canvas/ # Three.js spatial visualization
|
|
126
|
-
│ ├── hooks/ # WebSocket, state management hooks
|
|
127
|
-
│ ├── store/ # Frontend state
|
|
128
|
-
│ └── types/ # TypeScript type definitions
|
|
129
|
-
├── objects/ # Default POs: greeter, reader, coordinator
|
|
130
|
-
├── templates/ # Environment templates (basic, developer, writer, arc-agi-1, etc.)
|
|
131
|
-
├── tools/ # Development tooling
|
|
132
|
-
└── test/ # Unit and integration tests
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Key Concepts
|
|
136
|
-
|
|
137
|
-
- **Semantic Binding**: Natural language → capability call (visible in message log)
|
|
138
|
-
- **PO↔PO Communication**: Prompt-Objects call each other as capabilities through isolated delegation threads
|
|
139
|
-
- **Self-Modification**: POs can create new POs and primitives at runtime (with human approval)
|
|
140
|
-
- **Human-in-the-Loop**: POs use `ask_human` to pause and queue notifications; human responds asynchronously via the web UI
|
|
141
|
-
- **Environments**: Isolated collections of POs with their own sessions, git history, and configuration. Created from templates via CLI.
|
|
142
|
-
- **Thread Export**: Conversation threads (including delegation chains) exportable as Markdown or JSON
|
|
143
|
-
|
|
144
|
-
## Development
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
# Install dependencies
|
|
148
|
-
bundle install
|
|
149
|
-
cd frontend && npm install && cd ..
|
|
150
|
-
|
|
151
|
-
# Run tests
|
|
152
|
-
bundle exec rake test
|
|
153
|
-
|
|
154
|
-
# Serve an environment with web UI
|
|
155
|
-
prompt_objects serve <env-name> --open
|
|
156
|
-
|
|
157
|
-
# Environment management
|
|
158
|
-
prompt_objects env create <name> --template basic
|
|
159
|
-
prompt_objects env list
|
|
160
|
-
prompt_objects env info <name>
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## Releases
|
|
164
|
-
|
|
165
|
-
Always tag releases. Pushing a version tag triggers the Discord notification workflow (`.github/workflows/discord-release.yml`), which extracts the matching section from `CHANGELOG.md` and posts it.
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
# 1. Update version in prompt_objects.gemspec
|
|
169
|
-
# 2. Add changelog entry under ## [X.Y.Z] - YYYY-MM-DD
|
|
170
|
-
# 3. Commit: "Release vX.Y.Z — short description"
|
|
171
|
-
# 4. Tag and push:
|
|
172
|
-
git tag vX.Y.Z
|
|
173
|
-
git push && git push origin vX.Y.Z
|
|
174
|
-
# 5. Publish gem:
|
|
175
|
-
gem build prompt_objects.gemspec && gem push prompt_objects-X.Y.Z.gem
|
|
176
|
-
```
|