@bountyporte/ai-studio 0.0.0-stage → 0.26.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.
- package/INSTALL.md +246 -0
- package/LICENSE +21 -0
- package/Makefile +243 -0
- package/README.md +486 -2
- package/backend/.python-version +1 -0
- package/backend/Makefile +21 -0
- package/backend/README.md +401 -0
- package/backend/app/__init__.py +0 -0
- package/backend/app/api/__init__.py +0 -0
- package/backend/app/api/middleware.py +196 -0
- package/backend/app/api/routes/__init__.py +0 -0
- package/backend/app/api/routes/agent_control.py +347 -0
- package/backend/app/api/routes/events.py +164 -0
- package/backend/app/api/routes/floors.py +24 -0
- package/backend/app/api/routes/hooks.py +225 -0
- package/backend/app/api/routes/integrations.py +319 -0
- package/backend/app/api/routes/missions.py +604 -0
- package/backend/app/api/routes/permissions.py +32 -0
- package/backend/app/api/routes/preferences.py +155 -0
- package/backend/app/api/routes/search.py +134 -0
- package/backend/app/api/routes/sessions.py +787 -0
- package/backend/app/api/routes/team_templates.py +93 -0
- package/backend/app/api/routes/websockets.py +230 -0
- package/backend/app/api/routes/workspaces.py +896 -0
- package/backend/app/api/websocket.py +73 -0
- package/backend/app/config.py +223 -0
- package/backend/app/core/__init__.py +0 -0
- package/backend/app/core/agent_roster.py +89 -0
- package/backend/app/core/base_poller.py +140 -0
- package/backend/app/core/beads_poller.py +239 -0
- package/backend/app/core/broadcast_service.py +145 -0
- package/backend/app/core/connection_manager.py +263 -0
- package/backend/app/core/constants.py +6 -0
- package/backend/app/core/event_processor.py +1374 -0
- package/backend/app/core/exclusions.py +75 -0
- package/backend/app/core/floor_config.py +204 -0
- package/backend/app/core/handlers/__init__.py +65 -0
- package/backend/app/core/handlers/agent_handler.py +386 -0
- package/backend/app/core/handlers/conversation_handler.py +168 -0
- package/backend/app/core/handlers/session_handler.py +131 -0
- package/backend/app/core/handlers/team_handler.py +61 -0
- package/backend/app/core/handlers/tool_handler.py +65 -0
- package/backend/app/core/health.py +124 -0
- package/backend/app/core/jsonl_parser.py +213 -0
- package/backend/app/core/logging.py +91 -0
- package/backend/app/core/office_layout.py +65 -0
- package/backend/app/core/path_utils.py +65 -0
- package/backend/app/core/product_mapper.py +149 -0
- package/backend/app/core/quotes.py +121 -0
- package/backend/app/core/redaction.py +92 -0
- package/backend/app/core/room_orchestrator.py +347 -0
- package/backend/app/core/scheduled_tasks.py +20 -0
- package/backend/app/core/state_machine.py +844 -0
- package/backend/app/core/state_sync.py +188 -0
- package/backend/app/core/summary_service.py +612 -0
- package/backend/app/core/task_file_poller.py +300 -0
- package/backend/app/core/task_persistence.py +145 -0
- package/backend/app/core/token_tracker.py +346 -0
- package/backend/app/core/tool_labels.py +45 -0
- package/backend/app/core/transcript_poller.py +366 -0
- package/backend/app/core/whiteboard_tracker.py +269 -0
- package/backend/app/db/__init__.py +0 -0
- package/backend/app/db/database.py +176 -0
- package/backend/app/db/migrate.py +95 -0
- package/backend/app/db/models.py +406 -0
- package/backend/app/main.py +419 -0
- package/backend/app/models/__init__.py +0 -0
- package/backend/app/models/agents.py +135 -0
- package/backend/app/models/common.py +58 -0
- package/backend/app/models/events.py +397 -0
- package/backend/app/models/git.py +70 -0
- package/backend/app/models/overview.py +59 -0
- package/backend/app/models/sessions.py +160 -0
- package/backend/app/models/timeline.py +41 -0
- package/backend/app/models/ui.py +10 -0
- package/backend/app/services/agent_chat.py +127 -0
- package/backend/app/services/agent_control.py +877 -0
- package/backend/app/services/background.py +30 -0
- package/backend/app/services/chief_questions.py +271 -0
- package/backend/app/services/control_activity.py +117 -0
- package/backend/app/services/control_diagnostics.py +280 -0
- package/backend/app/services/control_errors.py +86 -0
- package/backend/app/services/git_service.py +432 -0
- package/backend/app/services/history_cleanup.py +122 -0
- package/backend/app/services/integrations.py +268 -0
- package/backend/app/services/mission_delivery.py +276 -0
- package/backend/app/services/mission_history.py +32 -0
- package/backend/app/services/mission_plans.py +1049 -0
- package/backend/app/services/mission_queue.py +343 -0
- package/backend/app/services/mission_signals.py +124 -0
- package/backend/app/services/permissions.py +129 -0
- package/backend/app/services/project_agents.py +177 -0
- package/backend/app/services/session_project.py +28 -0
- package/backend/app/services/task_checks.py +214 -0
- package/backend/app/services/task_reviews.py +503 -0
- package/backend/app/services/task_worktrees.py +457 -0
- package/backend/app/services/usage.py +318 -0
- package/backend/app/services/workspace_native.py +67 -0
- package/backend/app/services/workspace_standup.py +104 -0
- package/backend/app/services/workspaces.py +510 -0
- package/backend/pyproject.toml +95 -0
- package/backend/uv.lock +1246 -0
- package/distribution/cli.mjs +132 -0
- package/distribution/verify-package.mjs +15 -0
- package/docs/DISTRIBUTION.md +136 -0
- package/docs/SERVICE.md +51 -0
- package/doctor.sh +12 -0
- package/frontend/Makefile +41 -0
- package/frontend/README.md +296 -0
- package/frontend/bun.lock +1389 -0
- package/frontend/next-env.d.ts +7 -0
- package/frontend/next.config.ts +28 -0
- package/frontend/package-lock.json +10468 -0
- package/frontend/package.json +89 -0
- package/frontend/postcss.config.mjs +7 -0
- package/frontend/public/file.svg +1 -0
- package/frontend/public/globe.svg +1 -0
- package/frontend/public/next.svg +1 -0
- package/frontend/public/sprites/boss-rug.png +0 -0
- package/frontend/public/sprites/chair.png +0 -0
- package/frontend/public/sprites/coffee-machine.png +0 -0
- package/frontend/public/sprites/coffee-mug.png +0 -0
- package/frontend/public/sprites/desk-lamp.png +0 -0
- package/frontend/public/sprites/desk.png +0 -0
- package/frontend/public/sprites/elevator_door.png +0 -0
- package/frontend/public/sprites/elevator_frame.png +0 -0
- package/frontend/public/sprites/employee-of-month.png +0 -0
- package/frontend/public/sprites/floor-tile.png +0 -0
- package/frontend/public/sprites/headset_small.png +0 -0
- package/frontend/public/sprites/keyboard_back.png +0 -0
- package/frontend/public/sprites/magic-8-ball.png +0 -0
- package/frontend/public/sprites/monitor_back.png +0 -0
- package/frontend/public/sprites/old-printer.png +0 -0
- package/frontend/public/sprites/pen-holder.png +0 -0
- package/frontend/public/sprites/phone.png +0 -0
- package/frontend/public/sprites/plant.png +0 -0
- package/frontend/public/sprites/rubber-duck.png +0 -0
- package/frontend/public/sprites/rubiks-cube.png +0 -0
- package/frontend/public/sprites/stapler.png +0 -0
- package/frontend/public/sprites/sunglasses.png +0 -0
- package/frontend/public/sprites/thermos.png +0 -0
- package/frontend/public/sprites/wall-outlet.png +0 -0
- package/frontend/public/sprites/watercooler.png +0 -0
- package/frontend/public/vercel.svg +1 -0
- package/frontend/public/window.svg +1 -0
- package/frontend/src/app/character-lab/CharacterLab.tsx +217 -0
- package/frontend/src/app/character-lab/page.tsx +8 -0
- package/frontend/src/app/favicon.ico +0 -0
- package/frontend/src/app/globals.css +501 -0
- package/frontend/src/app/layout.tsx +44 -0
- package/frontend/src/app/page.tsx +662 -0
- package/frontend/src/app/sprite-debug/page.tsx +89 -0
- package/frontend/src/app/studio-benchmark/StudioBenchmark.tsx +141 -0
- package/frontend/src/app/studio-benchmark/page.tsx +12 -0
- package/frontend/src/app/studio-preview/page.tsx +270 -0
- package/frontend/src/app/studio-preview/preview.module.css +439 -0
- package/frontend/src/components/attention/AgentPopup.tsx +137 -0
- package/frontend/src/components/attention/AttentionToasts.tsx +130 -0
- package/frontend/src/components/attention/CommandBar.tsx +251 -0
- package/frontend/src/components/debug/sprite-debug/components/BuilderPanel.tsx +386 -0
- package/frontend/src/components/debug/sprite-debug/components/CellPalette.tsx +169 -0
- package/frontend/src/components/debug/sprite-debug/components/GridOverlay.tsx +234 -0
- package/frontend/src/components/debug/sprite-debug/components/NumberInput.tsx +49 -0
- package/frontend/src/components/debug/sprite-debug/components/OutputPreview.tsx +267 -0
- package/frontend/src/components/debug/sprite-debug/components/PreviewPanel.tsx +447 -0
- package/frontend/src/components/debug/sprite-debug/components/index.ts +12 -0
- package/frontend/src/components/debug/sprite-debug/hooks/useSpriteBuilder.ts +260 -0
- package/frontend/src/components/debug/sprite-debug/index.ts +9 -0
- package/frontend/src/components/debug/sprite-debug/lib/gridCalculations.ts +336 -0
- package/frontend/src/components/debug/sprite-debug/lib/imageProcessing.ts +568 -0
- package/frontend/src/components/debug/sprite-debug/lib/types.ts +229 -0
- package/frontend/src/components/game/EventDetailModal.tsx +209 -0
- package/frontend/src/components/layout/AccessBanner.tsx +71 -0
- package/frontend/src/components/layout/AgentControl.tsx +338 -0
- package/frontend/src/components/layout/ConversationHistory.tsx +713 -0
- package/frontend/src/components/layout/DirectoryPicker.tsx +192 -0
- package/frontend/src/components/layout/EventLog.tsx +112 -0
- package/frontend/src/components/layout/GitStatusPanel.tsx +214 -0
- package/frontend/src/components/layout/HeaderControls.tsx +143 -0
- package/frontend/src/components/layout/HeaderMoreMenu.tsx +138 -0
- package/frontend/src/components/layout/MobileAgentActivity.tsx +113 -0
- package/frontend/src/components/layout/MobileDrawer.tsx +127 -0
- package/frontend/src/components/layout/NewSession.tsx +173 -0
- package/frontend/src/components/layout/RightSidebar.tsx +128 -0
- package/frontend/src/components/layout/SessionSidebar.tsx +493 -0
- package/frontend/src/components/layout/StatusToast.tsx +49 -0
- package/frontend/src/components/layout/conversation.module.css +390 -0
- package/frontend/src/components/layout/mentions.ts +61 -0
- package/frontend/src/components/layout/relay.ts +72 -0
- package/frontend/src/components/layout/useMentions.tsx +140 -0
- package/frontend/src/components/mission/ChiefConversation.tsx +127 -0
- package/frontend/src/components/mission/CommandPalette.tsx +501 -0
- package/frontend/src/components/mission/ContextView.tsx +61 -0
- package/frontend/src/components/mission/DiagnosticBadges.tsx +65 -0
- package/frontend/src/components/mission/ExcludedProjects.tsx +139 -0
- package/frontend/src/components/mission/Inspector.tsx +823 -0
- package/frontend/src/components/mission/MissionDelivery.tsx +251 -0
- package/frontend/src/components/mission/MissionGraph.tsx +560 -0
- package/frontend/src/components/mission/MissionHistory.tsx +140 -0
- package/frontend/src/components/mission/MissionNotifications.tsx +192 -0
- package/frontend/src/components/mission/MissionPlanEditor.tsx +580 -0
- package/frontend/src/components/mission/MissionQueuePanel.tsx +215 -0
- package/frontend/src/components/mission/MissionsPanel.tsx +832 -0
- package/frontend/src/components/mission/Orb.tsx +94 -0
- package/frontend/src/components/mission/OverviewBoard.tsx +325 -0
- package/frontend/src/components/mission/PermissionPrompts.tsx +179 -0
- package/frontend/src/components/mission/PlanCost.tsx +121 -0
- package/frontend/src/components/mission/RoleAgents.tsx +164 -0
- package/frontend/src/components/mission/SessionList.tsx +425 -0
- package/frontend/src/components/mission/SessionOriginBadge.tsx +49 -0
- package/frontend/src/components/mission/SessionScope.tsx +43 -0
- package/frontend/src/components/mission/TaskReview.tsx +558 -0
- package/frontend/src/components/mission/TeamGraph.tsx +318 -0
- package/frontend/src/components/mission/TeamList.tsx +231 -0
- package/frontend/src/components/mission/TeamOverview.tsx +230 -0
- package/frontend/src/components/mission/TeamResult.tsx +81 -0
- package/frontend/src/components/mission/TeamTemplates.tsx +190 -0
- package/frontend/src/components/mission/TeamTimeline.tsx +306 -0
- package/frontend/src/components/mission/TeamTrail.tsx +48 -0
- package/frontend/src/components/mission/TimelineView.tsx +574 -0
- package/frontend/src/components/mission/TopBar.tsx +377 -0
- package/frontend/src/components/mission/WorkspaceContracts.tsx +153 -0
- package/frontend/src/components/mission/WorkspaceEditForm.tsx +355 -0
- package/frontend/src/components/mission/WorkspaceMissionCard.tsx +203 -0
- package/frontend/src/components/mission/WorkspacePanel.tsx +702 -0
- package/frontend/src/components/mission/WorkspaceProjectCards.tsx +103 -0
- package/frontend/src/components/mission/WorkspaceStandup.tsx +172 -0
- package/frontend/src/components/mission/WorkspaceWizard.tsx +450 -0
- package/frontend/src/components/mission/agentContext.ts +123 -0
- package/frontend/src/components/mission/agentState.ts +49 -0
- package/frontend/src/components/mission/roleCatalog.ts +48 -0
- package/frontend/src/components/mission/team.ts +222 -0
- package/frontend/src/components/mission/timelineModel.ts +123 -0
- package/frontend/src/components/mission/workspacePrompts.ts +47 -0
- package/frontend/src/components/mission/workspaceTarget.ts +32 -0
- package/frontend/src/components/overlay/Modal.tsx +90 -0
- package/frontend/src/components/overlay/SettingsModal.tsx +518 -0
- package/frontend/src/components/settings/BuildingTab.tsx +428 -0
- package/frontend/src/components/settings/ConnectionsTab.tsx +269 -0
- package/frontend/src/components/shell/ContextSwitcher.tsx +213 -0
- package/frontend/src/components/shell/HealthIndicator.tsx +186 -0
- package/frontend/src/components/shell/StatusBar.tsx +101 -0
- package/frontend/src/components/shell/StripRack.tsx +292 -0
- package/frontend/src/components/shell/health.ts +70 -0
- package/frontend/src/components/studio/BenchmarkProbe.tsx +93 -0
- package/frontend/src/components/studio/Character.tsx +1098 -0
- package/frontend/src/components/studio/DeskReveal.tsx +43 -0
- package/frontend/src/components/studio/LightStudio.tsx +604 -0
- package/frontend/src/components/studio/Room.tsx +784 -0
- package/frontend/src/components/studio/StudioActivity.tsx +222 -0
- package/frontend/src/components/studio/StudioAvatar.tsx +80 -0
- package/frontend/src/components/studio/StudioCamera.tsx +55 -0
- package/frontend/src/components/studio/StudioDisplayMenu.tsx +109 -0
- package/frontend/src/components/studio/StudioLabels.tsx +216 -0
- package/frontend/src/components/studio/StudioLighting.tsx +102 -0
- package/frontend/src/components/studio/StudioNavigation.tsx +17 -0
- package/frontend/src/components/studio/StudioScene.tsx +740 -0
- package/frontend/src/components/studio/StudioTeamHUD.tsx +285 -0
- package/frontend/src/components/studio/StudioView.tsx +68 -0
- package/frontend/src/components/studio/StudioWorkspace.tsx +142 -0
- package/frontend/src/components/studio/TeamSignals.tsx +99 -0
- package/frontend/src/components/studio/characterActing.ts +222 -0
- package/frontend/src/components/studio/light.module.css +554 -0
- package/frontend/src/components/studio/live.module.css +94 -0
- package/frontend/src/components/studio/studioBenchmark.ts +46 -0
- package/frontend/src/components/studio/studioDemo.ts +45 -0
- package/frontend/src/components/studio/studioFade.ts +31 -0
- package/frontend/src/components/studio/studioLayout.ts +481 -0
- package/frontend/src/components/studio/studioQuality.ts +11 -0
- package/frontend/src/components/studio/studioReference.ts +22 -0
- package/frontend/src/components/studio/team.module.css +362 -0
- package/frontend/src/components/studio/teamActing.ts +95 -0
- package/frontend/src/components/studio/textures.ts +621 -0
- package/frontend/src/components/studio/workspace.module.css +201 -0
- package/frontend/src/components/studio/workspaceOffice.ts +74 -0
- package/frontend/src/components/tour/NarratorBar.tsx +61 -0
- package/frontend/src/components/tour/PointerRing.tsx +90 -0
- package/frontend/src/components/tour/SpotlightDim.tsx +112 -0
- package/frontend/src/components/tour/TourOverlay.tsx +116 -0
- package/frontend/src/constants/positions.ts +66 -0
- package/frontend/src/constants/quotes.ts +249 -0
- package/frontend/src/hooks/useAppContext.ts +28 -0
- package/frontend/src/hooks/useAttentionNotifier.ts +124 -0
- package/frontend/src/hooks/useControlStates.ts +63 -0
- package/frontend/src/hooks/useDragResize.ts +93 -0
- package/frontend/src/hooks/useFloorConfig.ts +49 -0
- package/frontend/src/hooks/useFocusTrap.ts +57 -0
- package/frontend/src/hooks/useMainAgentName.ts +8 -0
- package/frontend/src/hooks/useMissionSignal.ts +116 -0
- package/frontend/src/hooks/useMissionView.ts +50 -0
- package/frontend/src/hooks/useNow.ts +12 -0
- package/frontend/src/hooks/useOverviewWebSocket.ts +148 -0
- package/frontend/src/hooks/useReducedMotion.ts +22 -0
- package/frontend/src/hooks/useSessionSwitch.ts +204 -0
- package/frontend/src/hooks/useSessionUsage.ts +86 -0
- package/frontend/src/hooks/useSessions.ts +259 -0
- package/frontend/src/hooks/useStudioMission.ts +53 -0
- package/frontend/src/hooks/useTaskCues.ts +38 -0
- package/frontend/src/hooks/useTeamPlan.ts +138 -0
- package/frontend/src/hooks/useTheme.ts +78 -0
- package/frontend/src/hooks/useTranslation.ts +13 -0
- package/frontend/src/hooks/useWebSocketEvents.ts +318 -0
- package/frontend/src/hooks/useWorkspaceList.ts +46 -0
- package/frontend/src/hooks/useWorkspaceOffice.ts +165 -0
- package/frontend/src/i18n/en.ts +1337 -0
- package/frontend/src/i18n/es.ts +1352 -0
- package/frontend/src/i18n/fr.ts +1357 -0
- package/frontend/src/i18n/index.ts +95 -0
- package/frontend/src/i18n/pt-BR.ts +1344 -0
- package/frontend/src/machines/agentMachine.ts +443 -0
- package/frontend/src/machines/agentMachineCommon.ts +426 -0
- package/frontend/src/machines/agentMachineService.ts +667 -0
- package/frontend/src/machines/positionHelpers.ts +100 -0
- package/frontend/src/machines/queueManager.ts +193 -0
- package/frontend/src/stores/attentionStore.ts +249 -0
- package/frontend/src/stores/chatDraftStore.ts +15 -0
- package/frontend/src/stores/gameStore.ts +457 -0
- package/frontend/src/stores/navigationStore.ts +170 -0
- package/frontend/src/stores/overviewStore.ts +77 -0
- package/frontend/src/stores/preferencesStore.ts +277 -0
- package/frontend/src/stores/recordingStore.ts +52 -0
- package/frontend/src/stores/rosterStore.ts +39 -0
- package/frontend/src/stores/slices/agentSlice.ts +182 -0
- package/frontend/src/stores/slices/bossSlice.ts +50 -0
- package/frontend/src/stores/slices/bubbleSlice.ts +211 -0
- package/frontend/src/stores/slices/debugSlice.ts +129 -0
- package/frontend/src/stores/slices/officeSlice.ts +145 -0
- package/frontend/src/stores/slices/queueSlice.ts +153 -0
- package/frontend/src/stores/slices/replaySlice.ts +43 -0
- package/frontend/src/stores/slices/reservationSlice.ts +112 -0
- package/frontend/src/stores/slices/shared.ts +23 -0
- package/frontend/src/stores/slices/types.ts +135 -0
- package/frontend/src/stores/slices/whiteboardSlice.ts +61 -0
- package/frontend/src/stores/timelineStore.ts +137 -0
- package/frontend/src/stores/tourStore.ts +253 -0
- package/frontend/src/stores/workspaceStore.ts +77 -0
- package/frontend/src/systems/agentCollision.ts +259 -0
- package/frontend/src/systems/animationSystem.ts +489 -0
- package/frontend/src/systems/astar.ts +317 -0
- package/frontend/src/systems/navigationGrid.ts +463 -0
- package/frontend/src/systems/pathSmoothing.ts +337 -0
- package/frontend/src/systems/pathfinding.ts +118 -0
- package/frontend/src/systems/queuePositions.ts +242 -0
- package/frontend/src/systems/stateReconciler.ts +289 -0
- package/frontend/src/systems/stateSync.ts +71 -0
- package/frontend/src/systems/toastFilter.ts +71 -0
- package/frontend/src/systems/typingTracker.ts +80 -0
- package/frontend/src/systems/webSocketController.ts +149 -0
- package/frontend/src/types/generated.ts +1260 -0
- package/frontend/src/types/index.ts +154 -0
- package/frontend/src/types/navigation.ts +37 -0
- package/frontend/src/types/pixi-react.d.ts +11 -0
- package/frontend/src/utils/api.ts +122 -0
- package/frontend/src/utils/conversationSelection.ts +14 -0
- package/frontend/src/utils/cron.ts +90 -0
- package/frontend/src/utils/diffLines.ts +43 -0
- package/frontend/src/utils/event-type-styles.ts +81 -0
- package/frontend/src/utils/eventText.ts +134 -0
- package/frontend/src/utils/historyCleanup.ts +57 -0
- package/frontend/src/utils/legacyStorage.ts +15 -0
- package/frontend/src/utils/missionNotifications.ts +118 -0
- package/frontend/src/utils/runDiagnostics.ts +127 -0
- package/frontend/src/utils/sessionVisibility.ts +62 -0
- package/frontend/src/utils/teamTemplates.ts +228 -0
- package/frontend/src/utils/themeScript.ts +10 -0
- package/frontend/src/utils/time.ts +46 -0
- package/frontend/tsconfig.json +35 -0
- package/hooks/Makefile +18 -0
- package/hooks/README.md +295 -0
- package/hooks/install.sh +140 -0
- package/hooks/manage_hooks.py +345 -0
- package/hooks/pyproject.toml +50 -0
- package/hooks/src/ai_studio_hooks/__init__.py +0 -0
- package/hooks/src/ai_studio_hooks/codex.py +532 -0
- package/hooks/src/ai_studio_hooks/config.py +151 -0
- package/hooks/src/ai_studio_hooks/debug_logger.py +127 -0
- package/hooks/src/ai_studio_hooks/event_mapper.py +476 -0
- package/hooks/src/ai_studio_hooks/main.py +198 -0
- package/hooks/src/ai_studio_hooks/py.typed +0 -0
- package/hooks/uv.lock +154 -0
- package/install.ps1 +92 -0
- package/install.sh +276 -0
- package/integrations/.agents/plugins/marketplace.json +20 -0
- package/integrations/.claude-plugin/marketplace.json +14 -0
- package/integrations/plugins/ai-studio/.claude-plugin/plugin.json +8 -0
- package/integrations/plugins/ai-studio/.codex-plugin/plugin.json +12 -0
- package/integrations/plugins/ai-studio/.mcp.json +10 -0
- package/integrations/plugins/ai-studio/LICENSE +21 -0
- package/integrations/plugins/ai-studio/README.md +23 -0
- package/integrations/plugins/ai-studio/codex.mcp.json +10 -0
- package/integrations/plugins/ai-studio/mcp.json +12 -0
- package/integrations/plugins/ai-studio/plugin.json +19 -0
- package/integrations/plugins/ai-studio/server/mcp.mjs +143 -0
- package/integrations/plugins/ai-studio/server/paths.mjs +24 -0
- package/integrations/plugins/ai-studio/skills/studio/SKILL.md +34 -0
- package/opencode-plugin/Makefile +26 -0
- package/opencode-plugin/README.md +106 -0
- package/opencode-plugin/install.sh +64 -0
- package/opencode-plugin/package.json +43 -0
- package/opencode-plugin/src/index.ts +775 -0
- package/opencode-plugin/src/sessionTracker.ts +209 -0
- package/opencode-plugin/tsconfig.json +28 -0
- package/package.json +69 -4
- package/pyproject.toml +97 -0
- package/scripts/ai-studio +199 -0
- package/scripts/doctor.py +418 -0
- package/start.ps1 +6 -0
- package/start.sh +69 -0
package/INSTALL.md
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# Installer AI Studio
|
|
2
|
+
|
|
3
|
+
Ce guide installe AI Studio sur **macOS**, **Linux (Debian ou Ubuntu, y compris
|
|
4
|
+
une machine virtuelle)** ou **Windows**. Un script fait tout automatiquement ;
|
|
5
|
+
la partie « Installation manuelle » détaille les mêmes étapes si tu préfères
|
|
6
|
+
les faire toi-même.
|
|
7
|
+
|
|
8
|
+
## À savoir avant de commencer
|
|
9
|
+
|
|
10
|
+
AI Studio doit être installé **sur la même machine que Claude Code (et Codex)** :
|
|
11
|
+
|
|
12
|
+
- Claude Code envoie ses événements à AI Studio uniquement en local
|
|
13
|
+
(`localhost`), c'est ce qui fait apparaître les agents dans l'interface ;
|
|
14
|
+
- les missions, workspaces et agents lancent `claude` et `codex` sur la machine
|
|
15
|
+
du serveur, dans tes dossiers de projets.
|
|
16
|
+
|
|
17
|
+
Donc : installe AI Studio là où tu développes. Pour une machine virtuelle,
|
|
18
|
+
installe AI Studio, Claude Code et tes projets **dans la VM**.
|
|
19
|
+
|
|
20
|
+
## Lanceur npm et choix des intégrations
|
|
21
|
+
|
|
22
|
+
Le paquet npm et les plugins Claude Code/Codex sont publiés. Lance
|
|
23
|
+
`npx @bountyporte/ai-studio install` dans un terminal interactif pour choisir
|
|
24
|
+
Claude Code, Codex et/ou OpenCode. Le programme ne configure que les intégrations
|
|
25
|
+
choisies. OpenCode doit déjà être installé avec Bun; il n'est pas nécessaire si
|
|
26
|
+
tu n'utilises pas OpenCode.
|
|
27
|
+
|
|
28
|
+
Dans un terminal sans interaction, l'installation conserve le comportement
|
|
29
|
+
historique : Claude Code et ses hooks sont configurés, Codex et OpenCode restent
|
|
30
|
+
désactivés. Utilise `--no-prompt` pour expliciter ce mode.
|
|
31
|
+
|
|
32
|
+
## Installation automatique
|
|
33
|
+
|
|
34
|
+
### macOS, Debian, Ubuntu (et VM Debian 12)
|
|
35
|
+
|
|
36
|
+
Récupère le projet, puis lance le script d'installation depuis son dossier :
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
git clone https://github.com/badrtairlbahrepro/AI-STUDIO.git
|
|
40
|
+
```
|
|
41
|
+
```bash
|
|
42
|
+
cd AI-STUDIO && ./install.sh --start
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Dans un terminal interactif, le script demande quels outils connecter :
|
|
46
|
+
Claude Code, Codex et/ou OpenCode. Il installe les clients Claude/Codex manquants
|
|
47
|
+
si tu les sélectionnes. OpenCode et Bun doivent déjà être installés pour activer
|
|
48
|
+
son plugin. Sans intégration, AI Studio s'installe quand même, mais n'a pas de
|
|
49
|
+
sessions d'agents à afficher. Sous Linux, le script peut demander ton mot de
|
|
50
|
+
passe (`sudo`) pour les paquets système. Avec `--start`, le serveur démarre
|
|
51
|
+
ensuite dans ce terminal ; `Ctrl+C` l’arrête.
|
|
52
|
+
|
|
53
|
+
| Option | Effet |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `--with-codex` | installe/configure aussi Codex, sans afficher le choix interactif |
|
|
56
|
+
| `--with-opencode` | active OpenCode (CLI et Bun doivent déjà être installés) |
|
|
57
|
+
| `--no-opencode` | laisse OpenCode désactivé |
|
|
58
|
+
| `--start` | installe puis lance le serveur dans ce terminal (ou utilise le service avec `--service`) |
|
|
59
|
+
| `--service` | démarre AI Studio automatiquement à l'ouverture de session |
|
|
60
|
+
| `--no-claude` | n'installe/configure pas Claude Code |
|
|
61
|
+
| `--no-hooks` | ne connecte pas Claude Code à AI Studio |
|
|
62
|
+
| `--no-prompt` | désactive les questions interactives; garde le choix historique Claude par défaut |
|
|
63
|
+
|
|
64
|
+
Exemple : `./install.sh --with-codex --service`
|
|
65
|
+
OpenCode seul, sans Claude : `./install.sh --no-claude --with-opencode`
|
|
66
|
+
|
|
67
|
+
### Windows
|
|
68
|
+
|
|
69
|
+
AI Studio tourne sous Windows grâce à **WSL 2** (le Linux intégré à Windows) avec
|
|
70
|
+
Debian ; l'interface s'ouvre dans ton navigateur Windows habituel.
|
|
71
|
+
|
|
72
|
+
1. Récupère le projet (avec Git pour Windows, GitHub Desktop, ou en
|
|
73
|
+
téléchargeant le ZIP depuis GitHub puis en le décompressant).
|
|
74
|
+
2. Dans le dossier du projet : clic droit sur **`install.ps1`** →
|
|
75
|
+
**Exécuter avec PowerShell**. Ou, dans PowerShell :
|
|
76
|
+
```powershell
|
|
77
|
+
powershell -ExecutionPolicy Bypass -File .\install.ps1
|
|
78
|
+
```
|
|
79
|
+
En mode interactif, les mêmes choix d'intégration sont proposés dans Debian
|
|
80
|
+
WSL. Options : `-WithCodex`, `-WithOpenCode`, `-NoClaude`, `-NoHooks`,
|
|
81
|
+
`-Service`, `-Start` (installe puis lance). OpenCode et Bun doivent être
|
|
82
|
+
installés dans WSL pour activer son plugin.
|
|
83
|
+
3. **Première fois seulement** : si WSL n'était pas installé, le script
|
|
84
|
+
l'installe, puis te demande de redémarrer Windows, d'ouvrir l'application
|
|
85
|
+
**Debian** une fois pour créer ton utilisateur Linux, et de relancer
|
|
86
|
+
`install.ps1`.
|
|
87
|
+
|
|
88
|
+
Le script copie le projet dans Debian (`~/AI-STUDIO`) et y lance `install.sh`.
|
|
89
|
+
|
|
90
|
+
## Lancer AI Studio
|
|
91
|
+
|
|
92
|
+
| Système | Commande |
|
|
93
|
+
|---|---|
|
|
94
|
+
| macOS, Linux | `./start.sh` dans le dossier du projet |
|
|
95
|
+
| Windows | double-clic sur **`start.ps1`** |
|
|
96
|
+
|
|
97
|
+
L'interface s'ouvre sur **http://localhost:8000**, déjà autorisée. `Ctrl+C`
|
|
98
|
+
(ou fermer la fenêtre) arrête AI Studio. Après une mise à jour du code :
|
|
99
|
+
`./start.sh --rebuild`.
|
|
100
|
+
|
|
101
|
+
Avec l'option `--service`, AI Studio démarre tout seul : il suffit d'ouvrir
|
|
102
|
+
http://localhost:8000.
|
|
103
|
+
|
|
104
|
+
## Première ouverture (une seule fois)
|
|
105
|
+
|
|
106
|
+
1. Connecte le ou les agents sélectionnés : `claude`, `codex login`, ou
|
|
107
|
+
redémarre OpenCode pour charger son plugin.
|
|
108
|
+
2. Dans AI Studio, ouvre **Réglages → Connexions** et autorise Claude et/ou
|
|
109
|
+
Codex ainsi que **les dossiers de tes projets**. Sans cela, les workspaces
|
|
110
|
+
et les agents ne peuvent pas y travailler.
|
|
111
|
+
3. Si Claude Code était ouvert pendant l'installation, redémarre-le pour qu'il
|
|
112
|
+
envoie ses événements à AI Studio.
|
|
113
|
+
|
|
114
|
+
## Diagnostic : `doctor`
|
|
115
|
+
|
|
116
|
+
Depuis le dossier du projet :
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
./doctor.sh
|
|
120
|
+
# Équivalents : scripts/ai-studio doctor ou make doctor
|
|
121
|
+
./doctor.sh --json
|
|
122
|
+
./doctor.sh --offline
|
|
123
|
+
./doctor.sh --url http://127.0.0.1:8050
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Sous Windows : `wsl -d Debian -- bash -lc 'cd ~/AI-STUDIO && ./doctor.sh'`.
|
|
127
|
+
|
|
128
|
+
Le diagnostic vérifie les outils, la version de Node, l’environnement backend,
|
|
129
|
+
l’interface compilée, les onze hooks Claude Code, les fichiers Codex, le serveur,
|
|
130
|
+
la pause d’enregistrement et le périmètre des connexions. Il propose quoi corriger
|
|
131
|
+
si une session manque. Il ne modifie aucun fichier, ne lance pas d’agent, n’envoie
|
|
132
|
+
pas d’événement de test et n’affiche ni clé ni contenu de conversation. Les appels
|
|
133
|
+
réseau se limitent aux adresses localhost explicites, sans suivre les redirections.
|
|
134
|
+
L’état de connexion des CLI n’est pas testé.
|
|
135
|
+
|
|
136
|
+
`ERROR` indique un problème bloquant (code de sortie 1). `WARNING` peut simplement
|
|
137
|
+
indiquer qu’un fournisseur facultatif est désactivé ou qu’aucune interface statique
|
|
138
|
+
n’a été compilée en mode développement (code 0 s’il n’y a pas d’erreur).
|
|
139
|
+
|
|
140
|
+
Ces commandes s’utilisent depuis une copie du dépôt ; aucun paquet `npx` ou
|
|
141
|
+
plugin n’est publié par cette installation.
|
|
142
|
+
|
|
143
|
+
## « Accès refusé »
|
|
144
|
+
|
|
145
|
+
Certaines actions (missions, workspaces, effacer l'historique) demandent une
|
|
146
|
+
clé. Elle est créée au premier lancement, conservée dans `backend/.launch-key`
|
|
147
|
+
et transmise automatiquement par `start.sh` à l'ouverture du navigateur.
|
|
148
|
+
|
|
149
|
+
Si un bandeau « Accès refusé » apparaît, colle dans son champ le contenu de :
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
cat backend/.launch-key
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Supprime ce fichier pour changer de clé (au prochain démarrage).
|
|
156
|
+
|
|
157
|
+
## Machine virtuelle
|
|
158
|
+
|
|
159
|
+
- **Tu utilises la VM avec son propre bureau** (fenêtre de VirtualBox, VMware,
|
|
160
|
+
UTM…) : rien de particulier, ouvre http://localhost:8000 dans le navigateur
|
|
161
|
+
de la VM.
|
|
162
|
+
- **La VM n'a pas de bureau, ou tu veux ouvrir l'interface depuis ton
|
|
163
|
+
ordinateur principal** : par sécurité, AI Studio n'accepte que les connexions
|
|
164
|
+
locales à la VM. Crée un tunnel depuis ton ordinateur principal, puis ouvre
|
|
165
|
+
http://localhost:8000 sur celui-ci :
|
|
166
|
+
```bash
|
|
167
|
+
ssh -L 8000:127.0.0.1:8000 utilisateur@adresse-de-la-vm
|
|
168
|
+
```
|
|
169
|
+
Le tunnel fait croire à AI Studio que la connexion est locale, sans l'exposer
|
|
170
|
+
sur le réseau. Colle la clé (`cat backend/.launch-key` dans la VM) si
|
|
171
|
+
l'accès est refusé.
|
|
172
|
+
|
|
173
|
+
Ressources conseillées pour la VM : 2 processeurs, 4 Go de mémoire, 15 Go de
|
|
174
|
+
disque.
|
|
175
|
+
|
|
176
|
+
## Mettre à jour
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
git pull && ./install.sh && ./start.sh --rebuild
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Sous Windows, relance `install.ps1` (il met à jour la copie dans Debian), puis
|
|
183
|
+
`start.ps1`. Avec le service : `systemctl --user restart ai-studio` (Linux) ou
|
|
184
|
+
`scripts/ai-studio update` (macOS).
|
|
185
|
+
|
|
186
|
+
## Installation manuelle
|
|
187
|
+
|
|
188
|
+
Ce que fait `install.sh`, étape par étape :
|
|
189
|
+
|
|
190
|
+
| Prérequis | Version | Installation |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| git, curl, make | — | macOS : `xcode-select --install` · Debian : `sudo apt install git curl make build-essential python3` |
|
|
193
|
+
| Node.js | 20.9 ou plus (22 conseillé) | macOS : `brew install node@22` ou https://nodejs.org · Debian 12 fournit Node 18, trop ancien : utilise NodeSource (`curl -fsSL https://deb.nodesource.com/setup_22.x \| sudo -E bash -` puis `sudo apt install nodejs`) |
|
|
194
|
+
| uv | dernière | `curl -LsSf https://astral.sh/uv/install.sh \| sh` (il télécharge Python 3.13 tout seul) |
|
|
195
|
+
| Claude Code (facultatif) | dernière | `curl -fsSL https://claude.ai/install.sh \| bash` |
|
|
196
|
+
| Codex (facultatif) | dernière | `npm install -g @openai/codex` |
|
|
197
|
+
| OpenCode (facultatif) | dernière + Bun | [installer OpenCode](https://opencode.ai/docs) et [Bun](https://bun.sh/docs/installation) avant de choisir cette intégration |
|
|
198
|
+
|
|
199
|
+
Puis, dans le dossier du projet :
|
|
200
|
+
|
|
201
|
+
1. `make install-base` — dépendances du serveur, de l'interface et des hooks ;
|
|
202
|
+
2. si Claude Code est choisi, `cd hooks && ./install.sh` — connecte Claude Code
|
|
203
|
+
à AI Studio (sous Linux, ajoute `--strip-prefixes "-home-$USER-"`) ;
|
|
204
|
+
3. si OpenCode est choisi, `make opencode-install` — construit et relie son plugin ;
|
|
205
|
+
4. `make build-static` — construit l'interface, servie par le serveur ;
|
|
206
|
+
5. `./start.sh` — lance le tout sur http://localhost:8000.
|
|
207
|
+
|
|
208
|
+
## Désinstaller
|
|
209
|
+
|
|
210
|
+
1. `cd hooks && ./uninstall.sh` — déconnecte Claude Code ;
|
|
211
|
+
2. si le service est installé : `systemctl --user disable --now ai-studio` puis
|
|
212
|
+
`rm ~/.config/systemd/user/ai-studio.service` (Linux), ou
|
|
213
|
+
`scripts/ai-studio uninstall` (macOS) ;
|
|
214
|
+
3. supprime le dossier du projet (il contient aussi l'historique,
|
|
215
|
+
`backend/visualizer.db`).
|
|
216
|
+
|
|
217
|
+
## Dépannage
|
|
218
|
+
|
|
219
|
+
| Problème | Solution |
|
|
220
|
+
|---|---|
|
|
221
|
+
| « Le port 8000 est déjà utilisé » | AI Studio tourne déjà (service ?) : ouvre http://localhost:8000. Sinon, trouve le programme qui l'occupe : `lsof -i :8000`. |
|
|
222
|
+
| Aucun agent n'apparaît pendant que Claude Code travaille | Redémarre Claude Code ; vérifie que `hooks/install.sh` a bien été lancé ; journal des hooks : `~/.claude/ai-studio-hooks.log` (avec `AI_STUDIO_DEBUG=1`). |
|
|
223
|
+
| `uv` ou `claude` introuvable juste après l'installation | Ouvre un nouveau terminal (ils sont installés dans `~/.local/bin`). |
|
|
224
|
+
| Node trop ancien | Installe Node 22 (voir le tableau des prérequis) puis relance `./install.sh`. |
|
|
225
|
+
| Les agents ne peuvent pas travailler dans un dossier | Réglages → Connexions : autorise le fournisseur et le dossier. |
|
|
226
|
+
|
|
227
|
+
## Affichage sur une VM peu puissante
|
|
228
|
+
|
|
229
|
+
Dans la vue **Studio**, le **Studio léger** est sélectionné par défaut. Ses
|
|
230
|
+
robots et cartes colorés utilisent HTML/CSS, sans canevas WebGL, rendu 3D ni
|
|
231
|
+
animation continue. Le bouton **Studio 3D** conserve l'affichage original ; le
|
|
232
|
+
choix est mémorisé dans chaque navigateur.
|
|
233
|
+
|
|
234
|
+
Clique sur le chef ou un agent pour retrouver sa conversation et ses commandes.
|
|
235
|
+
Les missions, plans, workspaces, activités et fichiers restent accessibles dans
|
|
236
|
+
les panneaux habituels. Les cartes montrent les états, activités, dépendances et
|
|
237
|
+
fichiers rapportés disponibles. La démo est locale et ne lance aucun agent.
|
|
238
|
+
Les mouvements de caméra et les effets de lumière concernent uniquement la 3D.
|
|
239
|
+
Les performances réelles dépendent aussi du navigateur et des ressources de la VM.
|
|
240
|
+
|
|
241
|
+
Le chef possède son propre poste de commandement doré, séparé des postes de
|
|
242
|
+
l'équipe. Les robots montrent une bulle d'activité, un clavier et des expressions
|
|
243
|
+
liées à leur état. Lecture, frappe, attente, réussite et erreur déclenchent des
|
|
244
|
+
effets courts (sans boucle infinie). La préférence système de réduction des
|
|
245
|
+
animations est respectée. Les dépendances en attente sont aussi indiquées dans
|
|
246
|
+
les cartes du workspace lorsqu'elles appartiennent au plan courant.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Paul Robello
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/Makefile
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
.PHONY: install install-base opencode-deps install-all dev backend frontend simulate checkall lint fmt test typecheck gen-types \
|
|
2
|
+
hooks-install hooks-uninstall hooks-reinstall hooks-status hooks-logs hooks-logs-follow hooks-logs-clear \
|
|
3
|
+
hooks-debug-on hooks-debug-off clean clean-db clean-all \
|
|
4
|
+
opencode-install opencode-uninstall opencode-reinstall opencode-build \
|
|
5
|
+
dev-tmux dev-tmux-kill dev-tmux-backend dev-tmux-frontend \
|
|
6
|
+
build-static frontend-build-static \
|
|
7
|
+
docker-build docker-up docker-down docker-logs docker-shell docker-config \
|
|
8
|
+
pre-commit pre-commit-update depsupdate depsshow uv-lock uv-sync setup resetup remove-venv \
|
|
9
|
+
bump-version version-check help
|
|
10
|
+
|
|
11
|
+
# Detect package manager: prefer bun if available, otherwise use npm
|
|
12
|
+
PKG_MGR := $(shell command -v bun >/dev/null 2>&1 && echo "bun" || echo "npm")
|
|
13
|
+
PKG_INSTALL := $(shell command -v bun >/dev/null 2>&1 && echo "bun install" || echo "npm install")
|
|
14
|
+
|
|
15
|
+
install: install-base opencode-deps # Install all component dependencies (developer setup)
|
|
16
|
+
|
|
17
|
+
install-base: # Install AI Studio, frontend and Claude hook dependencies
|
|
18
|
+
cd backend && uv sync
|
|
19
|
+
cd frontend && $(PKG_INSTALL)
|
|
20
|
+
cd hooks && uv sync
|
|
21
|
+
|
|
22
|
+
opencode-deps: # Install optional OpenCode plugin dependencies
|
|
23
|
+
cd opencode-plugin && $(PKG_INSTALL)
|
|
24
|
+
|
|
25
|
+
install-all: install hooks-install opencode-install # Install everything including hooks and plugins
|
|
26
|
+
@echo "All components installed including hooks and OpenCode plugin"
|
|
27
|
+
|
|
28
|
+
dev: # Start backend and frontend in parallel
|
|
29
|
+
@make -j 2 backend frontend
|
|
30
|
+
|
|
31
|
+
backend: # Start backend dev server
|
|
32
|
+
make -C backend dev
|
|
33
|
+
|
|
34
|
+
frontend: # Start frontend dev server
|
|
35
|
+
make -C frontend dev
|
|
36
|
+
|
|
37
|
+
# Build static frontend and copy to backend for serving
|
|
38
|
+
build-static frontend-build-static:
|
|
39
|
+
make -C frontend build-static
|
|
40
|
+
@echo "Frontend built and copied to backend/static"
|
|
41
|
+
@echo "Start backend with 'make backend' to serve at http://localhost:8000"
|
|
42
|
+
|
|
43
|
+
simulate: # Run event simulation
|
|
44
|
+
uv run python scripts/simulate_events.py
|
|
45
|
+
|
|
46
|
+
test-agent: # Run single agent test
|
|
47
|
+
uv run python scripts/test_single_agent.py
|
|
48
|
+
|
|
49
|
+
lint: # Run lint on all components
|
|
50
|
+
make -C backend lint
|
|
51
|
+
make -C frontend lint
|
|
52
|
+
make -C hooks lint
|
|
53
|
+
make -C opencode-plugin lint
|
|
54
|
+
cd backend && uv run ruff check ../scripts
|
|
55
|
+
|
|
56
|
+
fmt: # Reformat code
|
|
57
|
+
make -C backend fmt
|
|
58
|
+
make -C frontend fmt
|
|
59
|
+
make -C hooks fmt
|
|
60
|
+
|
|
61
|
+
test: # Run all tests
|
|
62
|
+
npm test
|
|
63
|
+
make -C backend test
|
|
64
|
+
make -C frontend test
|
|
65
|
+
make -C hooks test
|
|
66
|
+
make -C opencode-plugin test
|
|
67
|
+
|
|
68
|
+
typecheck: # Run static type checks
|
|
69
|
+
make -C backend typecheck
|
|
70
|
+
make -C frontend typecheck
|
|
71
|
+
make -C hooks typecheck
|
|
72
|
+
make -C opencode-plugin typecheck
|
|
73
|
+
|
|
74
|
+
.PHONY: doctor
|
|
75
|
+
doctor:
|
|
76
|
+
./doctor.sh
|
|
77
|
+
|
|
78
|
+
checkall: fmt lint typecheck test # Run all checks including tests
|
|
79
|
+
|
|
80
|
+
gen-types: # Regenerate TypeScript types from Pydantic models
|
|
81
|
+
cd backend && uv run python ../scripts/gen_types.py
|
|
82
|
+
|
|
83
|
+
# Hook management targets
|
|
84
|
+
hooks-install:
|
|
85
|
+
cd hooks && ./install.sh
|
|
86
|
+
|
|
87
|
+
hooks-uninstall:
|
|
88
|
+
cd hooks && ./uninstall.sh
|
|
89
|
+
|
|
90
|
+
hooks-reinstall: hooks-uninstall hooks-install
|
|
91
|
+
@echo "Hooks reinstalled"
|
|
92
|
+
|
|
93
|
+
hooks-status:
|
|
94
|
+
@echo "=== Installed Claude Code Hooks ==="
|
|
95
|
+
@cat ~/.claude/settings.json 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin).get('hooks',{}); [print(f' {k}: {len(v)} hook(s)') for k,v in d.items()]" 2>/dev/null || echo " No hooks configured"
|
|
96
|
+
@echo ""
|
|
97
|
+
@echo "=== Hook Config ==="
|
|
98
|
+
@cat ~/.claude/ai-studio-config.env 2>/dev/null || echo " No config file found"
|
|
99
|
+
|
|
100
|
+
hooks-logs:
|
|
101
|
+
@echo "=== Recent Hook Logs ==="
|
|
102
|
+
@tail -100 ~/.claude/ai-studio-hooks.log 2>/dev/null || echo " No log file found"
|
|
103
|
+
|
|
104
|
+
hooks-logs-follow:
|
|
105
|
+
@tail -f ~/.claude/ai-studio-hooks.log
|
|
106
|
+
|
|
107
|
+
hooks-logs-clear:
|
|
108
|
+
@rm -f ~/.claude/ai-studio-hooks.log
|
|
109
|
+
@echo "Hook logs cleared"
|
|
110
|
+
|
|
111
|
+
hooks-debug-on:
|
|
112
|
+
@sed -i '' 's/AI_STUDIO_DEBUG=0/AI_STUDIO_DEBUG=1/' ~/.claude/ai-studio-config.env 2>/dev/null || true
|
|
113
|
+
@grep -q "AI_STUDIO_DEBUG" ~/.claude/ai-studio-config.env || echo "AI_STUDIO_DEBUG=1" >> ~/.claude/ai-studio-config.env
|
|
114
|
+
@echo "Hook debug logging enabled"
|
|
115
|
+
|
|
116
|
+
hooks-debug-off:
|
|
117
|
+
@sed -i '' 's/AI_STUDIO_DEBUG=1/AI_STUDIO_DEBUG=0/' ~/.claude/ai-studio-config.env 2>/dev/null || true
|
|
118
|
+
@echo "Hook debug logging disabled"
|
|
119
|
+
|
|
120
|
+
# OpenCode plugin management targets
|
|
121
|
+
opencode-install:
|
|
122
|
+
cd opencode-plugin && ./install.sh
|
|
123
|
+
|
|
124
|
+
opencode-uninstall:
|
|
125
|
+
cd opencode-plugin && ./uninstall.sh
|
|
126
|
+
|
|
127
|
+
opencode-reinstall: opencode-uninstall opencode-install
|
|
128
|
+
@echo "OpenCode plugin reinstalled"
|
|
129
|
+
|
|
130
|
+
opencode-build:
|
|
131
|
+
cd opencode-plugin && $(PKG_INSTALL) && $(PKG_MGR) run build
|
|
132
|
+
|
|
133
|
+
# tmux-based dev targets for better monitoring
|
|
134
|
+
TMUX_SESSION=ai-studio-dev
|
|
135
|
+
|
|
136
|
+
dev-tmux:
|
|
137
|
+
@if tmux has-session -t $(TMUX_SESSION) 2>/dev/null; then \
|
|
138
|
+
echo "Session $(TMUX_SESSION) already exists. Use 'make dev-tmux-kill' first or attach with 'tmux attach -t $(TMUX_SESSION)'"; \
|
|
139
|
+
else \
|
|
140
|
+
tmux new-session -d -s $(TMUX_SESSION) -n backend; \
|
|
141
|
+
tmux send-keys -t $(TMUX_SESSION):backend "cd $(CURDIR)/backend && make dev" Enter; \
|
|
142
|
+
tmux new-window -t $(TMUX_SESSION) -n frontend; \
|
|
143
|
+
tmux send-keys -t $(TMUX_SESSION):frontend "cd $(CURDIR)/frontend && make dev" Enter; \
|
|
144
|
+
tmux select-window -t $(TMUX_SESSION):backend; \
|
|
145
|
+
echo "Started tmux session '$(TMUX_SESSION)' with backend and frontend windows"; \
|
|
146
|
+
echo "Attach with: tmux attach -t $(TMUX_SESSION)"; \
|
|
147
|
+
fi
|
|
148
|
+
|
|
149
|
+
dev-tmux-kill:
|
|
150
|
+
@tmux kill-session -t $(TMUX_SESSION) 2>/dev/null && echo "Killed tmux session $(TMUX_SESSION)" || echo "No session to kill"
|
|
151
|
+
|
|
152
|
+
dev-tmux-backend:
|
|
153
|
+
@tmux send-keys -t $(TMUX_SESSION):backend C-c 2>/dev/null || true
|
|
154
|
+
@sleep 1
|
|
155
|
+
@tmux send-keys -t $(TMUX_SESSION):backend "make dev" Enter 2>/dev/null || echo "Session not found"
|
|
156
|
+
|
|
157
|
+
dev-tmux-frontend:
|
|
158
|
+
@tmux send-keys -t $(TMUX_SESSION):frontend C-c 2>/dev/null || true
|
|
159
|
+
@sleep 1
|
|
160
|
+
@tmux send-keys -t $(TMUX_SESSION):frontend "make dev" Enter 2>/dev/null || echo "Session not found"
|
|
161
|
+
|
|
162
|
+
# Cleanup targets
|
|
163
|
+
clean-db: # Remove SQLite database
|
|
164
|
+
rm -f backend/visualizer.db
|
|
165
|
+
@echo "Database removed"
|
|
166
|
+
|
|
167
|
+
clean: # Remove build artifacts
|
|
168
|
+
rm -rf frontend/.next
|
|
169
|
+
rm -rf opencode-plugin/dist
|
|
170
|
+
|
|
171
|
+
clean-all: clean clean-db hooks-logs-clear # Remove everything
|
|
172
|
+
@echo "All build artifacts and data cleaned"
|
|
173
|
+
|
|
174
|
+
# Docker targets
|
|
175
|
+
docker-build:
|
|
176
|
+
docker compose build
|
|
177
|
+
|
|
178
|
+
docker-up:
|
|
179
|
+
docker compose up -d
|
|
180
|
+
@echo "AI Studio running at http://localhost:8050"
|
|
181
|
+
|
|
182
|
+
# Point the host hooks/plugin at the Docker-published port. Idempotent: the
|
|
183
|
+
# grep guard keeps it from appending a second line on re-runs.
|
|
184
|
+
docker-config:
|
|
185
|
+
@mkdir -p $(HOME)/.claude
|
|
186
|
+
@grep -q 'AI_STUDIO_API_URL' $(HOME)/.claude/ai-studio-config.env 2>/dev/null \
|
|
187
|
+
&& echo "ai-studio-config.env already sets AI_STUDIO_API_URL" \
|
|
188
|
+
|| (printf 'AI_STUDIO_API_URL=http://localhost:8050/api/v1/events\n' >> $(HOME)/.claude/ai-studio-config.env \
|
|
189
|
+
&& echo "Wrote AI_STUDIO_API_URL=http://localhost:8050/api/v1/events to ~/.claude/ai-studio-config.env")
|
|
190
|
+
|
|
191
|
+
docker-down:
|
|
192
|
+
docker compose down
|
|
193
|
+
|
|
194
|
+
docker-logs:
|
|
195
|
+
docker compose logs -f
|
|
196
|
+
|
|
197
|
+
docker-shell:
|
|
198
|
+
docker compose exec ai-studio /bin/bash
|
|
199
|
+
|
|
200
|
+
# Dependency management
|
|
201
|
+
uv-lock: # Lock dependencies
|
|
202
|
+
cd backend && uv lock
|
|
203
|
+
cd hooks && uv lock
|
|
204
|
+
|
|
205
|
+
uv-sync: # Sync dependencies
|
|
206
|
+
cd backend && uv sync
|
|
207
|
+
cd hooks && uv sync
|
|
208
|
+
|
|
209
|
+
setup: uv-sync install # First-time setup
|
|
210
|
+
|
|
211
|
+
resetup: remove-venv setup # Recreate virtual environments from scratch
|
|
212
|
+
|
|
213
|
+
remove-venv: # Remove virtual environments
|
|
214
|
+
rm -rf backend/.venv hooks/.venv
|
|
215
|
+
|
|
216
|
+
depsupdate: # Update all dependencies
|
|
217
|
+
cd backend && uv sync -U
|
|
218
|
+
cd hooks && uv sync -U
|
|
219
|
+
cd frontend && $(PKG_MGR) update
|
|
220
|
+
|
|
221
|
+
depsshow: # Show dependency tree
|
|
222
|
+
cd backend && uv tree
|
|
223
|
+
|
|
224
|
+
# Version management (ARC-021 / QA-010): rewrite or verify all version locations.
|
|
225
|
+
bump-version: # Bump version everywhere: make bump-version VERSION=x.y.z
|
|
226
|
+
ifndef VERSION
|
|
227
|
+
$(error VERSION is required: make bump-version VERSION=x.y.z)
|
|
228
|
+
endif
|
|
229
|
+
uv run --no-project python scripts/bump_version.py $(VERSION)
|
|
230
|
+
|
|
231
|
+
version-check: # Verify all version locations agree (CI-friendly)
|
|
232
|
+
uv run --no-project python scripts/bump_version.py --check
|
|
233
|
+
|
|
234
|
+
# Pre-commit
|
|
235
|
+
pre-commit: # Run pre-commit on all files
|
|
236
|
+
pre-commit run --all-files
|
|
237
|
+
|
|
238
|
+
pre-commit-update: # Update pre-commit hooks
|
|
239
|
+
pre-commit autoupdate
|
|
240
|
+
|
|
241
|
+
# Help
|
|
242
|
+
help: # Display this help
|
|
243
|
+
@grep -Eh "^[a-z][-a-z]+:.+# " $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.+# "}; {printf "%-20s %s\n", $$1, $$2}'
|