prompt_objects 0.6.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 +126 -0
- data/README.md +93 -22
- 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 +1337 -20
- 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 +171 -519
- 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 +549 -53
- data/lib/prompt_objects/server/app.rb +133 -14
- 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 -227
- data/lib/prompt_objects/server.rb +170 -1
- data/lib/prompt_objects/service.rb +129 -0
- data/lib/prompt_objects/session/store.rb +600 -13
- 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 +23 -15
- 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 +8 -14
- 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 +10 -14
- 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/{store_env_data.rb → set_env_data.rb} +34 -20
- data/lib/prompt_objects/version.rb +5 -0
- data/lib/prompt_objects.rb +33 -8
- 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 +2 -2
- data/templates/arc-agi-1/objects/solver.md +6 -5
- data/templates/arc-agi-1/objects/verifier.md +2 -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 +1 -1
- metadata +172 -65
- data/CLAUDE.md +0 -177
- data/Gemfile +0 -10
- data/Rakefile +0 -27
- 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 -104
- 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/EnvDataPane.tsx +0 -69
- data/frontend/src/components/Inspector.tsx +0 -263
- 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 -559
- data/frontend/src/index.css +0 -102
- data/frontend/src/main.tsx +0 -10
- data/frontend/src/store/index.ts +0 -311
- data/frontend/src/types/index.ts +0 -176
- 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-DEPawnfZ.js +0 -4345
- data/lib/prompt_objects/server/public/assets/index-oMrRce1m.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/lib/prompt_objects/universal/update_env_data.rb +0 -88
- 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/frontend/src/store/index.ts
DELETED
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import { create } from 'zustand'
|
|
2
|
-
import { useShallow } from 'zustand/react/shallow'
|
|
3
|
-
import type {
|
|
4
|
-
PromptObject,
|
|
5
|
-
BusMessage,
|
|
6
|
-
Notification,
|
|
7
|
-
Environment,
|
|
8
|
-
Message,
|
|
9
|
-
LLMConfig,
|
|
10
|
-
EnvDataEntry,
|
|
11
|
-
} from '../types'
|
|
12
|
-
|
|
13
|
-
interface Store {
|
|
14
|
-
// Connection state
|
|
15
|
-
connected: boolean
|
|
16
|
-
setConnected: (connected: boolean) => void
|
|
17
|
-
resetOnDisconnect: () => void
|
|
18
|
-
|
|
19
|
-
// Environment
|
|
20
|
-
environment: Environment | null
|
|
21
|
-
setEnvironment: (env: Environment) => void
|
|
22
|
-
|
|
23
|
-
// Prompt Objects
|
|
24
|
-
promptObjects: Record<string, PromptObject>
|
|
25
|
-
setPromptObject: (name: string, state: Partial<PromptObject>) => void
|
|
26
|
-
removePromptObject: (name: string) => void
|
|
27
|
-
updatePromptObjectStatus: (name: string, status: PromptObject['status']) => void
|
|
28
|
-
addMessageToPO: (poName: string, message: Message) => void
|
|
29
|
-
updateSessionMessages: (poName: string, sessionId: string, messages: Message[]) => void
|
|
30
|
-
switchPOSession: (poName: string, sessionId: string) => void
|
|
31
|
-
|
|
32
|
-
// Navigation
|
|
33
|
-
selectedPO: string | null
|
|
34
|
-
selectPO: (name: string | null) => void
|
|
35
|
-
activeTab: 'chat' | 'sessions' | 'capabilities' | 'prompt'
|
|
36
|
-
setActiveTab: (tab: Store['activeTab']) => void
|
|
37
|
-
currentView: 'dashboard' | 'canvas'
|
|
38
|
-
setCurrentView: (view: Store['currentView']) => void
|
|
39
|
-
|
|
40
|
-
// Message Bus
|
|
41
|
-
busMessages: BusMessage[]
|
|
42
|
-
addBusMessage: (message: BusMessage) => void
|
|
43
|
-
busOpen: boolean
|
|
44
|
-
toggleBus: () => void
|
|
45
|
-
topPaneCollapsed: boolean
|
|
46
|
-
toggleTopPane: () => void
|
|
47
|
-
|
|
48
|
-
// Notifications
|
|
49
|
-
notifications: Notification[]
|
|
50
|
-
addNotification: (notification: Notification) => void
|
|
51
|
-
removeNotification: (id: string) => void
|
|
52
|
-
|
|
53
|
-
// Streaming
|
|
54
|
-
streamingContent: Record<string, string>
|
|
55
|
-
appendStreamChunk: (poName: string, chunk: string) => void
|
|
56
|
-
clearStream: (poName: string) => void
|
|
57
|
-
|
|
58
|
-
// Response handling
|
|
59
|
-
pendingResponse: Record<string, string>
|
|
60
|
-
setPendingResponse: (poName: string, content: string) => void
|
|
61
|
-
clearPendingResponse: (poName: string) => void
|
|
62
|
-
|
|
63
|
-
// LLM Config
|
|
64
|
-
llmConfig: LLMConfig | null
|
|
65
|
-
setLLMConfig: (config: LLMConfig) => void
|
|
66
|
-
updateCurrentLLM: (provider: string, model: string) => void
|
|
67
|
-
|
|
68
|
-
// Usage data (for modal display)
|
|
69
|
-
usageData: Record<string, unknown> | null
|
|
70
|
-
setUsageData: (data: Record<string, unknown>) => void
|
|
71
|
-
clearUsageData: () => void
|
|
72
|
-
|
|
73
|
-
// Env Data
|
|
74
|
-
envData: Record<string, EnvDataEntry[]>
|
|
75
|
-
setEnvData: (rootThreadId: string, entries: EnvDataEntry[]) => void
|
|
76
|
-
clearEnvData: (rootThreadId: string) => void
|
|
77
|
-
sessionRootMap: Record<string, string>
|
|
78
|
-
setSessionRoot: (sessionId: string, rootThreadId: string) => void
|
|
79
|
-
envDataPaneCollapsed: boolean
|
|
80
|
-
toggleEnvDataPane: () => void
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export const useStore = create<Store>((set) => ({
|
|
84
|
-
// Connection
|
|
85
|
-
connected: false,
|
|
86
|
-
setConnected: (connected) => set({ connected }),
|
|
87
|
-
resetOnDisconnect: () =>
|
|
88
|
-
set((s) => {
|
|
89
|
-
// Reset all PO statuses to idle (server will re-send correct status on reconnect)
|
|
90
|
-
const resetPOs: Record<string, PromptObject> = {}
|
|
91
|
-
for (const [name, po] of Object.entries(s.promptObjects)) {
|
|
92
|
-
resetPOs[name] = po.status !== 'idle' ? { ...po, status: 'idle' } : po
|
|
93
|
-
}
|
|
94
|
-
return {
|
|
95
|
-
connected: false,
|
|
96
|
-
promptObjects: resetPOs,
|
|
97
|
-
streamingContent: {}, // Clear broken streams
|
|
98
|
-
pendingResponse: {}, // Clear stale pending responses
|
|
99
|
-
}
|
|
100
|
-
}),
|
|
101
|
-
|
|
102
|
-
// Environment
|
|
103
|
-
environment: null,
|
|
104
|
-
setEnvironment: (environment) => set({ environment }),
|
|
105
|
-
|
|
106
|
-
// Prompt Objects
|
|
107
|
-
promptObjects: {},
|
|
108
|
-
setPromptObject: (name, state) =>
|
|
109
|
-
set((s) => ({
|
|
110
|
-
promptObjects: {
|
|
111
|
-
...s.promptObjects,
|
|
112
|
-
[name]: {
|
|
113
|
-
...s.promptObjects[name],
|
|
114
|
-
...state,
|
|
115
|
-
name, // Ensure name is always set
|
|
116
|
-
} as PromptObject,
|
|
117
|
-
},
|
|
118
|
-
})),
|
|
119
|
-
removePromptObject: (name) =>
|
|
120
|
-
set((s) => {
|
|
121
|
-
const { [name]: _, ...rest } = s.promptObjects
|
|
122
|
-
// If we're viewing this PO, deselect it
|
|
123
|
-
const selectedPO = s.selectedPO === name ? null : s.selectedPO
|
|
124
|
-
return { promptObjects: rest, selectedPO }
|
|
125
|
-
}),
|
|
126
|
-
updatePromptObjectStatus: (name, status) =>
|
|
127
|
-
set((s) => ({
|
|
128
|
-
promptObjects: {
|
|
129
|
-
...s.promptObjects,
|
|
130
|
-
[name]: {
|
|
131
|
-
...s.promptObjects[name],
|
|
132
|
-
status,
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
})),
|
|
136
|
-
addMessageToPO: (poName, message) =>
|
|
137
|
-
set((s) => {
|
|
138
|
-
const po = s.promptObjects[poName]
|
|
139
|
-
if (!po) return s
|
|
140
|
-
|
|
141
|
-
// Handle case where current_session doesn't exist yet (new POs)
|
|
142
|
-
const currentMessages = po.current_session?.messages || []
|
|
143
|
-
return {
|
|
144
|
-
promptObjects: {
|
|
145
|
-
...s.promptObjects,
|
|
146
|
-
[poName]: {
|
|
147
|
-
...po,
|
|
148
|
-
current_session: {
|
|
149
|
-
id: po.current_session?.id || 'pending',
|
|
150
|
-
messages: [...currentMessages, message],
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
}
|
|
155
|
-
}),
|
|
156
|
-
updateSessionMessages: (poName, sessionId, messages) =>
|
|
157
|
-
set((s) => {
|
|
158
|
-
const po = s.promptObjects[poName]
|
|
159
|
-
if (!po) return s
|
|
160
|
-
|
|
161
|
-
// Update current_session if it matches the sessionId, OR if current_session is null
|
|
162
|
-
// (handles newly created POs that didn't have session info yet)
|
|
163
|
-
if (po.current_session?.id === sessionId || !po.current_session) {
|
|
164
|
-
return {
|
|
165
|
-
promptObjects: {
|
|
166
|
-
...s.promptObjects,
|
|
167
|
-
[poName]: {
|
|
168
|
-
...po,
|
|
169
|
-
current_session: {
|
|
170
|
-
id: sessionId,
|
|
171
|
-
messages,
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// Otherwise, just update the session in the sessions list (message count)
|
|
179
|
-
// The full messages will be loaded when the user switches to that session
|
|
180
|
-
return s
|
|
181
|
-
}),
|
|
182
|
-
switchPOSession: (poName, sessionId) =>
|
|
183
|
-
set((s) => {
|
|
184
|
-
const po = s.promptObjects[poName]
|
|
185
|
-
if (!po) return s
|
|
186
|
-
|
|
187
|
-
// Switch to a new session - clear messages until session_updated arrives
|
|
188
|
-
return {
|
|
189
|
-
promptObjects: {
|
|
190
|
-
...s.promptObjects,
|
|
191
|
-
[poName]: {
|
|
192
|
-
...po,
|
|
193
|
-
current_session: {
|
|
194
|
-
id: sessionId,
|
|
195
|
-
messages: [], // Will be populated by session_updated
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
}
|
|
200
|
-
}),
|
|
201
|
-
|
|
202
|
-
// Navigation
|
|
203
|
-
selectedPO: null,
|
|
204
|
-
selectPO: (name) => set({ selectedPO: name, activeTab: 'chat' }),
|
|
205
|
-
activeTab: 'chat',
|
|
206
|
-
setActiveTab: (activeTab) => set({ activeTab }),
|
|
207
|
-
currentView: 'dashboard',
|
|
208
|
-
setCurrentView: (currentView) => set({ currentView }),
|
|
209
|
-
|
|
210
|
-
// Message Bus
|
|
211
|
-
busMessages: [],
|
|
212
|
-
addBusMessage: (message) =>
|
|
213
|
-
set((s) => ({
|
|
214
|
-
busMessages: [...s.busMessages.slice(-99), message], // Keep last 100
|
|
215
|
-
})),
|
|
216
|
-
busOpen: false,
|
|
217
|
-
toggleBus: () => set((s) => ({ busOpen: !s.busOpen })),
|
|
218
|
-
topPaneCollapsed: false,
|
|
219
|
-
toggleTopPane: () => set((s) => ({ topPaneCollapsed: !s.topPaneCollapsed })),
|
|
220
|
-
|
|
221
|
-
// Notifications
|
|
222
|
-
notifications: [],
|
|
223
|
-
addNotification: (notification) =>
|
|
224
|
-
set((s) => ({
|
|
225
|
-
notifications: [...s.notifications, notification],
|
|
226
|
-
})),
|
|
227
|
-
removeNotification: (id) =>
|
|
228
|
-
set((s) => ({
|
|
229
|
-
notifications: s.notifications.filter((n) => n.id !== id),
|
|
230
|
-
})),
|
|
231
|
-
|
|
232
|
-
// Streaming
|
|
233
|
-
streamingContent: {},
|
|
234
|
-
appendStreamChunk: (poName, chunk) =>
|
|
235
|
-
set((s) => ({
|
|
236
|
-
streamingContent: {
|
|
237
|
-
...s.streamingContent,
|
|
238
|
-
[poName]: (s.streamingContent[poName] || '') + chunk,
|
|
239
|
-
},
|
|
240
|
-
})),
|
|
241
|
-
clearStream: (poName) =>
|
|
242
|
-
set((s) => {
|
|
243
|
-
const { [poName]: _, ...rest } = s.streamingContent
|
|
244
|
-
return { streamingContent: rest }
|
|
245
|
-
}),
|
|
246
|
-
|
|
247
|
-
// Response handling
|
|
248
|
-
pendingResponse: {},
|
|
249
|
-
setPendingResponse: (poName, content) =>
|
|
250
|
-
set((s) => ({
|
|
251
|
-
pendingResponse: {
|
|
252
|
-
...s.pendingResponse,
|
|
253
|
-
[poName]: content,
|
|
254
|
-
},
|
|
255
|
-
})),
|
|
256
|
-
clearPendingResponse: (poName) =>
|
|
257
|
-
set((s) => {
|
|
258
|
-
const { [poName]: _, ...rest } = s.pendingResponse
|
|
259
|
-
return { pendingResponse: rest }
|
|
260
|
-
}),
|
|
261
|
-
|
|
262
|
-
// LLM Config
|
|
263
|
-
llmConfig: null,
|
|
264
|
-
setLLMConfig: (config) => set({ llmConfig: config }),
|
|
265
|
-
updateCurrentLLM: (provider, model) =>
|
|
266
|
-
set((s) => ({
|
|
267
|
-
llmConfig: s.llmConfig
|
|
268
|
-
? { ...s.llmConfig, current_provider: provider, current_model: model }
|
|
269
|
-
: null,
|
|
270
|
-
})),
|
|
271
|
-
|
|
272
|
-
// Usage data
|
|
273
|
-
usageData: null,
|
|
274
|
-
setUsageData: (data) => set({ usageData: data }),
|
|
275
|
-
clearUsageData: () => set({ usageData: null }),
|
|
276
|
-
|
|
277
|
-
// Env Data
|
|
278
|
-
envData: {},
|
|
279
|
-
setEnvData: (rootThreadId, entries) =>
|
|
280
|
-
set((s) => ({
|
|
281
|
-
envData: { ...s.envData, [rootThreadId]: entries },
|
|
282
|
-
})),
|
|
283
|
-
clearEnvData: (rootThreadId) =>
|
|
284
|
-
set((s) => {
|
|
285
|
-
const { [rootThreadId]: _, ...rest } = s.envData
|
|
286
|
-
return { envData: rest }
|
|
287
|
-
}),
|
|
288
|
-
sessionRootMap: {},
|
|
289
|
-
setSessionRoot: (sessionId, rootThreadId) =>
|
|
290
|
-
set((s) => ({
|
|
291
|
-
sessionRootMap: { ...s.sessionRootMap, [sessionId]: rootThreadId },
|
|
292
|
-
})),
|
|
293
|
-
envDataPaneCollapsed: true,
|
|
294
|
-
toggleEnvDataPane: () => set((s) => ({ envDataPaneCollapsed: !s.envDataPaneCollapsed })),
|
|
295
|
-
}))
|
|
296
|
-
|
|
297
|
-
// Selectors - use useShallow to prevent infinite re-renders with derived arrays
|
|
298
|
-
export const usePromptObjects = () =>
|
|
299
|
-
useStore(useShallow((s) => Object.values(s.promptObjects)))
|
|
300
|
-
|
|
301
|
-
export const useSelectedPO = () =>
|
|
302
|
-
useStore((s) => (s.selectedPO ? s.promptObjects[s.selectedPO] : null))
|
|
303
|
-
|
|
304
|
-
export const useNotificationCount = () =>
|
|
305
|
-
useStore((s) => s.notifications.length)
|
|
306
|
-
|
|
307
|
-
export const usePONotifications = (poName: string) =>
|
|
308
|
-
useStore(useShallow((s) => s.notifications.filter((n) => n.po_name === poName)))
|
|
309
|
-
|
|
310
|
-
export const useEnvData = (rootThreadId: string | undefined) =>
|
|
311
|
-
useStore(useShallow((s) => (rootThreadId ? s.envData[rootThreadId] || [] : [])))
|
data/frontend/src/types/index.ts
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
// Core types for PromptObjects frontend
|
|
2
|
-
|
|
3
|
-
export interface Message {
|
|
4
|
-
role: 'user' | 'assistant' | 'tool'
|
|
5
|
-
content: string | null
|
|
6
|
-
from?: string
|
|
7
|
-
tool_calls?: ToolCall[]
|
|
8
|
-
results?: ToolResult[]
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface ToolCall {
|
|
12
|
-
id: string
|
|
13
|
-
name: string
|
|
14
|
-
arguments: Record<string, unknown>
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface ToolResult {
|
|
18
|
-
tool_call_id: string
|
|
19
|
-
name?: string // Name of the tool that was called
|
|
20
|
-
content: string
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export type ThreadType = 'root' | 'continuation' | 'delegation' | 'fork'
|
|
24
|
-
|
|
25
|
-
export interface Session {
|
|
26
|
-
id: string
|
|
27
|
-
name: string | null
|
|
28
|
-
message_count: number
|
|
29
|
-
updated_at?: string
|
|
30
|
-
// Thread fields
|
|
31
|
-
parent_session_id?: string
|
|
32
|
-
parent_po?: string
|
|
33
|
-
thread_type: ThreadType
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface ThreadTree {
|
|
37
|
-
session: Session
|
|
38
|
-
children: ThreadTree[]
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface CurrentSession {
|
|
42
|
-
id: string
|
|
43
|
-
messages: Message[]
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface CapabilityInfo {
|
|
47
|
-
name: string
|
|
48
|
-
description: string
|
|
49
|
-
parameters?: Record<string, unknown>
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Alias for backwards compatibility
|
|
53
|
-
export type UniversalCapability = CapabilityInfo
|
|
54
|
-
|
|
55
|
-
export interface PromptObject {
|
|
56
|
-
name: string
|
|
57
|
-
description: string
|
|
58
|
-
status: 'idle' | 'thinking' | 'calling_tool'
|
|
59
|
-
capabilities: CapabilityInfo[]
|
|
60
|
-
universal_capabilities?: CapabilityInfo[]
|
|
61
|
-
current_session: CurrentSession | null
|
|
62
|
-
sessions: Session[]
|
|
63
|
-
prompt?: string // The markdown body/prompt
|
|
64
|
-
config?: Record<string, unknown> // The YAML frontmatter config
|
|
65
|
-
delegated_by?: string | null // Name of the PO that called this one (set by delegation events)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface BusMessage {
|
|
69
|
-
from: string
|
|
70
|
-
to: string
|
|
71
|
-
content: string | Record<string, unknown>
|
|
72
|
-
summary?: string
|
|
73
|
-
timestamp: string
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export interface Notification {
|
|
77
|
-
id: string
|
|
78
|
-
po_name: string
|
|
79
|
-
type: string
|
|
80
|
-
message: string
|
|
81
|
-
options: string[]
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export interface Environment {
|
|
85
|
-
name: string
|
|
86
|
-
path: string
|
|
87
|
-
po_count: number
|
|
88
|
-
primitive_count: number
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// LLM Provider configuration
|
|
92
|
-
export interface LLMProvider {
|
|
93
|
-
name: string
|
|
94
|
-
models: string[]
|
|
95
|
-
default_model: string
|
|
96
|
-
available: boolean
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface LLMConfig {
|
|
100
|
-
current_provider: string
|
|
101
|
-
current_model: string
|
|
102
|
-
providers: LLMProvider[]
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface EnvDataEntry {
|
|
106
|
-
key: string
|
|
107
|
-
short_description: string
|
|
108
|
-
value: unknown
|
|
109
|
-
stored_by: string
|
|
110
|
-
created_at: string
|
|
111
|
-
updated_at: string
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// WebSocket message types
|
|
115
|
-
export type WSMessageType =
|
|
116
|
-
| 'environment'
|
|
117
|
-
| 'po_state'
|
|
118
|
-
| 'po_response'
|
|
119
|
-
| 'po_added'
|
|
120
|
-
| 'po_modified'
|
|
121
|
-
| 'po_removed'
|
|
122
|
-
| 'po_delegation_started'
|
|
123
|
-
| 'po_delegation_completed'
|
|
124
|
-
| 'stream'
|
|
125
|
-
| 'stream_end'
|
|
126
|
-
| 'bus_message'
|
|
127
|
-
| 'notification'
|
|
128
|
-
| 'notification_resolved'
|
|
129
|
-
| 'session_created'
|
|
130
|
-
| 'session_switched'
|
|
131
|
-
| 'session_updated'
|
|
132
|
-
| 'thread_created'
|
|
133
|
-
| 'thread_tree'
|
|
134
|
-
| 'llm_config'
|
|
135
|
-
| 'llm_switched'
|
|
136
|
-
| 'session_usage'
|
|
137
|
-
| 'thread_export'
|
|
138
|
-
| 'prompt_updated'
|
|
139
|
-
| 'llm_error'
|
|
140
|
-
| 'env_data_changed'
|
|
141
|
-
| 'env_data_list'
|
|
142
|
-
| 'error'
|
|
143
|
-
| 'pong'
|
|
144
|
-
|
|
145
|
-
export interface WSMessage<T = unknown> {
|
|
146
|
-
type: WSMessageType
|
|
147
|
-
payload: T
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Client -> Server message types
|
|
151
|
-
export interface SendMessagePayload {
|
|
152
|
-
target: string
|
|
153
|
-
content: string
|
|
154
|
-
new_thread?: boolean // If true, create a new thread before sending
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export interface RespondToNotificationPayload {
|
|
158
|
-
id: string
|
|
159
|
-
response: string
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export interface CreateSessionPayload {
|
|
163
|
-
target: string
|
|
164
|
-
name?: string
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface SwitchSessionPayload {
|
|
168
|
-
target: string
|
|
169
|
-
session_id: string
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export interface CreateThreadPayload {
|
|
173
|
-
target: string
|
|
174
|
-
name?: string
|
|
175
|
-
thread_type?: ThreadType
|
|
176
|
-
}
|
data/frontend/tailwind.config.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
|
2
|
-
export default {
|
|
3
|
-
content: [
|
|
4
|
-
"./index.html",
|
|
5
|
-
"./src/**/*.{js,ts,jsx,tsx}",
|
|
6
|
-
],
|
|
7
|
-
theme: {
|
|
8
|
-
extend: {
|
|
9
|
-
colors: {
|
|
10
|
-
po: {
|
|
11
|
-
bg: '#1a1918',
|
|
12
|
-
surface: '#222120',
|
|
13
|
-
'surface-2': '#2c2a28',
|
|
14
|
-
'surface-3': '#363432',
|
|
15
|
-
border: '#3d3a37',
|
|
16
|
-
'border-focus': '#5c5752',
|
|
17
|
-
accent: '#d4952a',
|
|
18
|
-
'accent-muted': '#9a6d20',
|
|
19
|
-
'accent-wash': 'rgba(212,149,42,0.08)',
|
|
20
|
-
'text-primary': '#e8e2da',
|
|
21
|
-
'text-secondary': '#a8a29a',
|
|
22
|
-
'text-tertiary': '#78726a',
|
|
23
|
-
'text-ghost': '#524e48',
|
|
24
|
-
'status-idle': '#78726a',
|
|
25
|
-
'status-active': '#d4952a',
|
|
26
|
-
'status-calling': '#3b9a6e',
|
|
27
|
-
'status-error': '#c45c4a',
|
|
28
|
-
'status-delegated': '#5a8fc2',
|
|
29
|
-
success: '#3b9a6e',
|
|
30
|
-
warning: '#d4952a',
|
|
31
|
-
error: '#c45c4a',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
fontFamily: {
|
|
35
|
-
ui: ['Geist', 'system-ui', 'sans-serif'],
|
|
36
|
-
mono: ['"Geist Mono"', '"IBM Plex Mono"', 'monospace'],
|
|
37
|
-
},
|
|
38
|
-
fontSize: {
|
|
39
|
-
'2xs': ['11px', { lineHeight: '15px' }],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
plugins: [],
|
|
44
|
-
}
|
data/frontend/tsconfig.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Bundler mode */
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"allowImportingTsExtensions": true,
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"moduleDetection": "force",
|
|
14
|
-
"noEmit": true,
|
|
15
|
-
"jsx": "react-jsx",
|
|
16
|
-
|
|
17
|
-
/* Linting */
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
"noFallthroughCasesInSwitch": true,
|
|
22
|
-
|
|
23
|
-
/* Paths */
|
|
24
|
-
"baseUrl": ".",
|
|
25
|
-
"paths": {
|
|
26
|
-
"@/*": ["src/*"]
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"include": ["src"]
|
|
30
|
-
}
|
data/frontend/vite.config.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import react from '@vitejs/plugin-react'
|
|
3
|
-
|
|
4
|
-
// https://vite.dev/config/
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [react()],
|
|
7
|
-
|
|
8
|
-
// Output to Ruby server's public directory for production
|
|
9
|
-
build: {
|
|
10
|
-
outDir: '../lib/prompt_objects/server/public',
|
|
11
|
-
emptyOutDir: true,
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
// Development proxy to Ruby server
|
|
15
|
-
server: {
|
|
16
|
-
port: 5173,
|
|
17
|
-
proxy: {
|
|
18
|
-
'/api': {
|
|
19
|
-
target: 'http://localhost:3000',
|
|
20
|
-
changeOrigin: true,
|
|
21
|
-
},
|
|
22
|
-
// WebSocket proxy
|
|
23
|
-
'/ws': {
|
|
24
|
-
target: 'ws://localhost:3000',
|
|
25
|
-
ws: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
})
|