@aion0/forge 0.5.26 → 0.5.27
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/.forge/worktrees/pipeline-4dd8dc2d/CLAUDE.md +86 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/README.md +136 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/RELEASE_NOTES.md +36 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/agents/route.ts +17 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/auth/[...nextauth]/route.ts +3 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/auth/verify/route.ts +46 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude/[id]/route.ts +31 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude/[id]/stream/route.ts +63 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude/route.ts +28 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-sessions/[projectName]/entries/route.ts +23 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-sessions/[projectName]/live/route.ts +72 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-sessions/[projectName]/route.ts +37 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-sessions/sync/route.ts +17 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-templates/route.ts +145 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/code/route.ts +299 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/delivery/[id]/route.ts +62 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/delivery/route.ts +40 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/detect-cli/route.ts +46 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/docs/route.ts +176 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/docs/sessions/route.ts +54 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/favorites/route.ts +26 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/flows/route.ts +6 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/flows/run/route.ts +19 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/git/route.ts +149 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/help/route.ts +84 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/issue-scanner/route.ts +116 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/logs/route.ts +100 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/mobile-chat/route.ts +115 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/monitor/route.ts +74 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/notifications/route.ts +42 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/notify/test/route.ts +33 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/online/route.ts +40 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/pipelines/[id]/route.ts +41 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/pipelines/route.ts +90 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/plugins/route.ts +75 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/preview/[...path]/route.ts +64 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/preview/route.ts +156 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/project-pipelines/route.ts +91 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/project-sessions/route.ts +61 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/projects/route.ts +26 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/sessions/[id]/chat/route.ts +64 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/sessions/[id]/messages/route.ts +9 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/sessions/[id]/route.ts +17 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/sessions/route.ts +20 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/settings/route.ts +64 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/skills/local/route.ts +228 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/skills/route.ts +182 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/smith-templates/route.ts +81 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/status/route.ts +12 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tabs/route.ts +25 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/[id]/route.ts +51 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/[id]/stream/route.ts +77 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/link/route.ts +37 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/route.ts +44 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/session/route.ts +14 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/telegram/route.ts +23 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/templates/route.ts +6 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/terminal-bell/route.ts +39 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/terminal-cwd/route.ts +19 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/terminal-state/route.ts +15 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tunnel/route.ts +26 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/upgrade/route.ts +43 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/usage/route.ts +20 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/version/route.ts +78 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/watchers/route.ts +33 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/[id]/agents/route.ts +35 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/[id]/memory/route.ts +23 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/[id]/smith/route.ts +22 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/[id]/stream/route.ts +31 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/route.ts +79 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/global-error.tsx +21 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/globals.css +52 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/icon.ico +0 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/icon.png +0 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/icon.svg +106 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/layout.tsx +17 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/login/LoginForm.tsx +96 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/login/page.tsx +10 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/mobile/page.tsx +10 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/app/page.tsx +22 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/bin/forge-server.mjs +484 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/check-forge-status.sh +71 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/cli/mw.ts +579 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/BrowserPanel.tsx +175 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/ChatPanel.tsx +191 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/ClaudeTerminal.tsx +267 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/CodeViewer.tsx +787 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/ConversationEditor.tsx +411 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/ConversationGraphView.tsx +347 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/ConversationTerminalView.tsx +303 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/Dashboard.tsx +807 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/DashboardWrapper.tsx +9 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/DeliveryFlowEditor.tsx +491 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/DeliveryList.tsx +230 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/DeliveryWorkspace.tsx +589 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/DocTerminal.tsx +187 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/DocsViewer.tsx +574 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/HelpDialog.tsx +169 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/HelpTerminal.tsx +141 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/InlinePipelineView.tsx +111 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/LogViewer.tsx +194 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/MarkdownContent.tsx +73 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/MobileView.tsx +385 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/MonitorPanel.tsx +122 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/NewSessionModal.tsx +93 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/NewTaskModal.tsx +492 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/PipelineEditor.tsx +570 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/PipelineView.tsx +1018 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/PluginsPanel.tsx +472 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/ProjectDetail.tsx +1618 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/ProjectList.tsx +108 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/ProjectManager.tsx +401 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/SessionList.tsx +74 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/SessionView.tsx +726 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/SettingsModal.tsx +1647 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/SkillsPanel.tsx +969 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/StatusBar.tsx +99 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/TabBar.tsx +46 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/TaskBoard.tsx +113 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/TaskDetail.tsx +372 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/TerminalLauncher.tsx +398 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/TunnelToggle.tsx +206 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/UsagePanel.tsx +207 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/WebTerminal.tsx +1743 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/WorkspaceTree.tsx +221 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/components/WorkspaceView.tsx +4048 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/dev-test.sh +5 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/docs/Forge_Memory_Layer_Design.docx +0 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/docs/Forge_Strategy_Research_2026.docx +0 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/docs/LOCAL-DEPLOY.md +144 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/docs/roadmap-multi-agent-workflow.md +330 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/forge-logo.png +0 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/forge-logo.svg +106 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/hooks/useSidebarResize.ts +52 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/install.sh +29 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/instrumentation.ts +35 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/agents/claude-adapter.ts +104 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/agents/generic-adapter.ts +64 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/agents/index.ts +245 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/agents/types.ts +70 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/artifacts.ts +106 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/auth.ts +62 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/docker.yaml +70 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/http.yaml +66 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/jenkins.yaml +92 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/llm-vision.yaml +85 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/playwright.yaml +111 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/shell-command.yaml +60 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/slack.yaml +48 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/webhook.yaml +56 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/claude-process.ts +361 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/claude-sessions.ts +266 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/claude-templates.ts +227 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/cloudflared.ts +424 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/crypto.ts +67 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/delivery.ts +787 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/dirs.ts +99 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/flows.ts +86 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-mcp-server.ts +732 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-skills/forge-inbox.md +38 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-skills/forge-send.md +47 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-skills/forge-status.md +32 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-skills/forge-workspace-sync.md +37 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/00-overview.md +40 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/01-settings.md +194 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/02-telegram.md +41 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/03-tunnel.md +31 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/04-tasks.md +52 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/05-pipelines.md +460 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/06-skills.md +43 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/07-projects.md +73 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/08-rules.md +53 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/09-issue-autofix.md +55 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/10-troubleshooting.md +89 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/11-workspace.md +810 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/CLAUDE.md +62 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/init.ts +266 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/issue-scanner.ts +298 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/logger.ts +79 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/notifications.ts +75 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/notify.ts +108 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/password.ts +97 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/pipeline-scheduler.ts +373 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/pipeline.ts +1565 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/plugins/executor.ts +347 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/plugins/registry.ts +228 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/plugins/types.ts +103 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/project-sessions.ts +53 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/projects.ts +86 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/session-manager.ts +156 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/session-utils.ts +53 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/session-watcher.ts +345 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/settings.ts +195 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/skills.ts +458 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/task-manager.ts +951 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/telegram-bot.ts +1477 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/telegram-standalone.ts +83 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/terminal-server.ts +70 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/terminal-standalone.ts +438 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/usage-scanner.ts +249 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/__tests__/state-machine.test.ts +388 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/__tests__/workspace.test.ts +311 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/agent-bus.ts +416 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/agent-worker.ts +655 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/backends/api-backend.ts +262 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/backends/cli-backend.ts +491 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/index.ts +84 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/manager.ts +136 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/orchestrator.ts +3415 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/persistence.ts +309 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/presets.ts +649 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/requests.ts +287 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/session-monitor.ts +240 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/skill-installer.ts +275 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/smith-memory.ts +498 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/types.ts +241 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/watch-manager.ts +560 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace-standalone.ts +978 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/middleware.ts +51 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/next.config.ts +26 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/package.json +74 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/pnpm-lock.yaml +3719 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/pnpm-workspace.yaml +1 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/postcss.config.mjs +7 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/publish.sh +133 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/README.md +66 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/results/.gitignore +2 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/run.ts +635 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/01-text-utils/task.md +26 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/01-text-utils/validator.sh +46 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/02-pagination/setup.sh +19 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/02-pagination/task.md +48 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/02-pagination/validator.sh +69 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/03-bug-fix/setup.sh +82 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/03-bug-fix/task.md +30 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/03-bug-fix/validator.sh +29 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/scripts/verify-usage.ts +178 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/src/config/index.ts +129 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/src/core/db/database.ts +259 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/src/core/memory/strategy.ts +32 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/src/core/providers/chat.ts +65 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/src/core/providers/registry.ts +60 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/src/core/session/manager.ts +190 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/src/types/index.ts +129 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/start.sh +32 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/templates/smith-lead.json +45 -0
- package/.forge/worktrees/pipeline-4dd8dc2d/tsconfig.json +42 -0
- package/RELEASE_NOTES.md +11 -28
- package/app/api/terminal-bell/route.ts +6 -2
- package/components/WebTerminal.tsx +36 -2
- package/lib/terminal-standalone.ts +19 -2
- package/next-env.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,810 @@
|
|
|
1
|
+
# Workspace (Forge Smiths)
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Workspace is a multi-agent orchestration system. You define a team of **Smiths** (agents) that coordinate via DAG dependencies, a message bus, and request/response documents. Smiths run as long-lived daemons or can be manually driven from a terminal.
|
|
6
|
+
|
|
7
|
+
## Core Concepts
|
|
8
|
+
|
|
9
|
+
| Term | Description |
|
|
10
|
+
|------|-------------|
|
|
11
|
+
| **Smith** | A long-running agent in the workspace (Claude Code, Codex, etc.) |
|
|
12
|
+
| **Primary Smith** | The coordinator smith — runs at project root, typically Lead |
|
|
13
|
+
| **Input Node** | User-provided requirements node (append-only history) |
|
|
14
|
+
| **DAG** | Directed acyclic graph of agent dependencies (no cycles allowed) |
|
|
15
|
+
| **Request Document** | YAML doc describing a task, flows through status stages |
|
|
16
|
+
| **Topology Cache** | Live in-memory map of all smiths, auto-injected into every task |
|
|
17
|
+
| **Message Bus** | Inter-agent messaging (notifications + direct messages) |
|
|
18
|
+
| **Daemon** | Background loop that keeps smiths alive and consumes messages |
|
|
19
|
+
|
|
20
|
+
## Two-Layer State Model
|
|
21
|
+
|
|
22
|
+
Each smith has two independent status layers displayed on the node:
|
|
23
|
+
|
|
24
|
+
| Layer | Values | Description |
|
|
25
|
+
|-------|--------|-------------|
|
|
26
|
+
| **Smith Status** | `down` / `starting` / `active` | Daemon lifecycle |
|
|
27
|
+
| **Task Status** | `idle` / `running` / `done` / `failed` | Current work status |
|
|
28
|
+
|
|
29
|
+
- **Smith Status** is controlled by daemon start/stop
|
|
30
|
+
- **Task Status** tracks individual work execution
|
|
31
|
+
- Session-monitor auto-marks `done` after 20 min of file stability (fallback if Stop hook misses)
|
|
32
|
+
|
|
33
|
+
## Creating Smiths
|
|
34
|
+
|
|
35
|
+
### Add Agent Modal
|
|
36
|
+
|
|
37
|
+
Click **+ Add Agent** in workspace header to open config modal. Fields:
|
|
38
|
+
|
|
39
|
+
| Field | Description |
|
|
40
|
+
|-------|-------------|
|
|
41
|
+
| **Template** | Quick-select preset (Lead ★, PM, Engineer, QA, Reviewer, UI Designer, Design Evaluator) |
|
|
42
|
+
| **Saved Templates** | User-saved smith configs (if any) |
|
|
43
|
+
| **Icon + Label** | Display on node (emoji icon + agent name) |
|
|
44
|
+
| **Backend** | `cli` (subscription, Claude Code/Codex/Aider) or `api` (API key) |
|
|
45
|
+
| **Agent / Profile** | Which CLI or API profile to use (from Settings) |
|
|
46
|
+
| **Role / System Prompt** | Core instructions, synced to `CLAUDE.md` in workDir |
|
|
47
|
+
| **Plugin Instances** | MCP plugins the agent can use (playwright, shell-command, llm-vision) |
|
|
48
|
+
| **Depends On** | Upstream agents this one depends on (creates DAG edges) |
|
|
49
|
+
| **Work Dir** | Relative path within project where agent runs |
|
|
50
|
+
| **Outputs** | Expected output paths (informational, no longer enforces uniqueness) |
|
|
51
|
+
| **Primary** | Only one per workspace — runs at root, gets fixed session, persistent |
|
|
52
|
+
| **Requires Approval** | User must approve each inbox message before processing |
|
|
53
|
+
| **Terminal Mode** | Keep a tmux+CLI session alive (persistent session) |
|
|
54
|
+
| **Skip Permissions** | Auto-approve tool calls (`--dangerously-skip-permissions`) |
|
|
55
|
+
| **Model** | Override model (claude-sonnet-4-6, claude-opus-4-6, etc.) |
|
|
56
|
+
| **Steps** | Ordered task steps (Label: Prompt) |
|
|
57
|
+
| **Watch** | Autonomous file/git/command monitoring |
|
|
58
|
+
|
|
59
|
+
### Preset Templates
|
|
60
|
+
|
|
61
|
+
| Preset | Icon | Role | Notes |
|
|
62
|
+
|--------|------|------|-------|
|
|
63
|
+
| **Lead** ★ | 👑 | Primary coordinator — SOP-driven intake, delegation, gap coverage | **Recommended for Primary smith** |
|
|
64
|
+
| **PM** | 📋 | Product Manager — versioned PRDs, testable acceptance_criteria | Writes to `docs/prd/` |
|
|
65
|
+
| **Architect** | 🏗️ | Breaks requirements into request documents | Uses `create_request` |
|
|
66
|
+
| **Engineer** | 🔨 | Claims requests, implements code | Uses `claim_request` + `update_response` |
|
|
67
|
+
| **QA** | 🧪 | Writes Playwright tests, verifies acceptance_criteria | Uses `update_response(section: qa)` |
|
|
68
|
+
| **Reviewer** | 🔍 | Reviews code quality, security, performance | Uses `update_response(section: review)` |
|
|
69
|
+
| **UI Designer** | 🎨 | Writes UI code, iterates via screenshots | Needs playwright plugin |
|
|
70
|
+
| **Design Evaluator** | 🔍 | Scores UI implementations visually | Needs playwright + llm-vision |
|
|
71
|
+
|
|
72
|
+
Primary presets (Lead) have orange ★ badge and are recommended when designing workspaces with a coordinator.
|
|
73
|
+
|
|
74
|
+
## Smith Templates (Save/Load)
|
|
75
|
+
|
|
76
|
+
### Save a Smith as Template
|
|
77
|
+
|
|
78
|
+
On any configured smith node, click **💾** button:
|
|
79
|
+
- Enter template name + optional description
|
|
80
|
+
- Stored at `~/.forge/data/smith-templates/<id>.json`
|
|
81
|
+
- Appears in "Saved Templates" section when adding new agents
|
|
82
|
+
|
|
83
|
+
### Export / Import
|
|
84
|
+
|
|
85
|
+
- **📤 Export** (in Edit Agent modal): download current config as JSON file
|
|
86
|
+
- **📂 Import from file**: load a JSON template when creating a new agent
|
|
87
|
+
- Share template files across machines/workspaces
|
|
88
|
+
|
|
89
|
+
API endpoints:
|
|
90
|
+
- `GET /api/smith-templates` — list all
|
|
91
|
+
- `POST /api/smith-templates` — save (body: `{name, icon, description, config}`)
|
|
92
|
+
- `POST /api/smith-templates` with `{action: "delete", id}` — remove
|
|
93
|
+
|
|
94
|
+
## Dependencies (DAG)
|
|
95
|
+
|
|
96
|
+
Dependencies must form a **directed acyclic graph**. Circular deps rejected at add/edit time.
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Input → PM → Engineer → QA → Reviewer
|
|
100
|
+
↘________________↗
|
|
101
|
+
(both notify Reviewer)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- Upstream completes first, broadcasts to downstream
|
|
105
|
+
- Each agent declares `dependsOn` (upstream agent IDs)
|
|
106
|
+
|
|
107
|
+
## Request/Response Document System
|
|
108
|
+
|
|
109
|
+
Structured YAML documents for multi-agent delivery workflows.
|
|
110
|
+
|
|
111
|
+
### Storage Layout
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
<project>/.forge/requests/
|
|
115
|
+
├── REQ-20260403-001/
|
|
116
|
+
│ ├── request.yml # Architect/Lead creates
|
|
117
|
+
│ └── response.yml # Engineer/Reviewer/QA update
|
|
118
|
+
└── REQ-20260403-002/
|
|
119
|
+
├── request.yml
|
|
120
|
+
└── response.yml
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Status Lifecycle
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
open → in_progress → review → qa → done
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
- **open**: request created, no one claimed yet
|
|
130
|
+
- **in_progress**: Engineer claimed and is implementing
|
|
131
|
+
- **review**: Engineer done, Reviewer should review
|
|
132
|
+
- **qa**: Reviewer approved, QA should test
|
|
133
|
+
- **done**: QA passed
|
|
134
|
+
|
|
135
|
+
### Request YAML Schema
|
|
136
|
+
|
|
137
|
+
```yaml
|
|
138
|
+
id: "REQ-20260403-001"
|
|
139
|
+
batch: "delivery-20260403"
|
|
140
|
+
title: "User authentication"
|
|
141
|
+
description: "Detailed description..."
|
|
142
|
+
modules:
|
|
143
|
+
- name: "auth-service"
|
|
144
|
+
description: "JWT token generation"
|
|
145
|
+
acceptance_criteria:
|
|
146
|
+
- "Login returns access token"
|
|
147
|
+
- "Expired tokens return 401"
|
|
148
|
+
priority: "high" # high | medium | low
|
|
149
|
+
status: "open"
|
|
150
|
+
assigned_to: ""
|
|
151
|
+
created_by: "Architect"
|
|
152
|
+
created_at: "2026-04-03T10:00:00Z"
|
|
153
|
+
updated_at: "2026-04-03T10:00:00Z"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Response YAML Schema
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
request_id: "REQ-20260403-001"
|
|
160
|
+
status: "done"
|
|
161
|
+
engineer:
|
|
162
|
+
completed_at: "2026-04-03T11:30:00Z"
|
|
163
|
+
files_changed: ["src/auth/service.ts"]
|
|
164
|
+
notes: "Implemented with jose library"
|
|
165
|
+
review:
|
|
166
|
+
completed_at: "2026-04-03T12:00:00Z"
|
|
167
|
+
result: "approved" # approved | changes_requested | rejected
|
|
168
|
+
findings: []
|
|
169
|
+
qa:
|
|
170
|
+
completed_at: "2026-04-03T12:30:00Z"
|
|
171
|
+
result: "passed" # passed | failed
|
|
172
|
+
test_files: ["tests/e2e/auth.spec.ts"]
|
|
173
|
+
findings: []
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Auto-Notification via DAG
|
|
177
|
+
|
|
178
|
+
When `create_request` or `update_response` is called, the orchestrator automatically sends notifications to all downstream agents (based on `dependsOn`). Agents don't manually send messages — they operate on the document and downstream smiths are notified.
|
|
179
|
+
|
|
180
|
+
## MCP Tools (for Smiths)
|
|
181
|
+
|
|
182
|
+
Agents use these MCP tools (via forge-mcp-server):
|
|
183
|
+
|
|
184
|
+
### Topology & Status
|
|
185
|
+
|
|
186
|
+
| Tool | Description |
|
|
187
|
+
|------|-------------|
|
|
188
|
+
| `get_agents` | Live workspace topology — all agents, roles, DAG flow, status, missing standard roles |
|
|
189
|
+
| `get_status` | Live status snapshot of all agents (smith+task status) |
|
|
190
|
+
| `get_inbox` | Pending/failed inbox messages for current agent |
|
|
191
|
+
|
|
192
|
+
### Request Documents
|
|
193
|
+
|
|
194
|
+
| Tool | Description |
|
|
195
|
+
|------|-------------|
|
|
196
|
+
| `create_request` | Create a new request document (auto-notifies downstream) |
|
|
197
|
+
| `claim_request` | Atomically claim an open request (prevents duplicate work) |
|
|
198
|
+
| `list_requests` | List requests, filter by `batch` or `status` |
|
|
199
|
+
| `get_request` | Read full request + response content |
|
|
200
|
+
| `update_response` | Update response section (engineer/review/qa), auto-advances status |
|
|
201
|
+
|
|
202
|
+
### Communication
|
|
203
|
+
|
|
204
|
+
| Tool | Description |
|
|
205
|
+
|------|-------------|
|
|
206
|
+
| `send_message` | Send a direct message to another agent |
|
|
207
|
+
| `mark_message_done` | Mark a processed message as done |
|
|
208
|
+
| `check_outbox` | Check delivery status of sent messages |
|
|
209
|
+
|
|
210
|
+
### Other
|
|
211
|
+
|
|
212
|
+
| Tool | Description |
|
|
213
|
+
|------|-------------|
|
|
214
|
+
| `run_plugin` | Execute a plugin action (e.g., Playwright test/screenshot) |
|
|
215
|
+
| `sync_progress` | Report work progress to workspace |
|
|
216
|
+
| `trigger_pipeline` | Trigger a pipeline from a smith |
|
|
217
|
+
| `get_pipeline_status` | Check pipeline run status |
|
|
218
|
+
|
|
219
|
+
## Topology Cache (Auto-Injected Context)
|
|
220
|
+
|
|
221
|
+
Every task execution automatically includes a **Workspace Team** section in the agent's context:
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
## Workspace Team
|
|
225
|
+
Flow: Lead → Engineer → QA → Reviewer
|
|
226
|
+
Missing: architect, pm
|
|
227
|
+
- 👑 Lead ← you [active/running]: Lead Coordinator — Primary agent...
|
|
228
|
+
- 🔨 Engineer [active/idle]: Senior Software Engineer — You design...
|
|
229
|
+
- 🧪 QA [active/idle]: QA Engineer — You ensure quality...
|
|
230
|
+
- 🔍 Reviewer [active/idle]: Senior Code Reviewer — You review...
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
- **Rebuilt on every agent change** (add/remove/update/status change)
|
|
234
|
+
- **Auto-injected** via `buildUpstreamContext` — agents don't need to call `get_agents` at start
|
|
235
|
+
- **Missing roles hint** — shows which standard roles are absent (so Lead knows to cover gaps)
|
|
236
|
+
- Agents can still call `get_agents` for detailed mid-task status
|
|
237
|
+
|
|
238
|
+
## Lead / Primary Smith
|
|
239
|
+
|
|
240
|
+
The **Lead** preset is designed as a Primary coordinator:
|
|
241
|
+
|
|
242
|
+
- Runs at project root (`workDir: ./`)
|
|
243
|
+
- `persistentSession: true` — always has a terminal
|
|
244
|
+
- `primary: true` — fixed session ID, gets ★ badge on node
|
|
245
|
+
- Orange border + ★ in preset picker (recommended for primary role)
|
|
246
|
+
|
|
247
|
+
### Lead SOP
|
|
248
|
+
|
|
249
|
+
1. **Intake**: Read Workspace Team, classify requirement, route by team composition
|
|
250
|
+
2. **Delegate**: `create_request` for each module with testable `acceptance_criteria`
|
|
251
|
+
3. **Cover Gaps**: If a role is missing (no Engineer/QA/Reviewer), handle it yourself
|
|
252
|
+
4. **Monitor**: `get_status` + `list_requests` to unblock stuck agents
|
|
253
|
+
5. **Quality Gate**: Verify all requests done/approved/passed before declaring complete
|
|
254
|
+
|
|
255
|
+
### Gap Coverage
|
|
256
|
+
|
|
257
|
+
| Missing Role | Lead Does |
|
|
258
|
+
|--------------|-----------|
|
|
259
|
+
| PM/Architect | Break requirements into modules with acceptance_criteria |
|
|
260
|
+
| Engineer | Implement code, update_response(section: engineer) |
|
|
261
|
+
| QA | Write/run tests, update_response(section: qa) |
|
|
262
|
+
| Reviewer | Review code for quality/security, update_response(section: review) |
|
|
263
|
+
|
|
264
|
+
## Message Bus
|
|
265
|
+
|
|
266
|
+
Two message categories:
|
|
267
|
+
|
|
268
|
+
| Category | Direction | Use Case |
|
|
269
|
+
|----------|-----------|----------|
|
|
270
|
+
| **Notification** | DAG-based (upstream → downstream) | "I'm done, here's what I did" |
|
|
271
|
+
| **Direct Message** | Any direction | Questions, bug reports, coordination |
|
|
272
|
+
|
|
273
|
+
### Notification Flow
|
|
274
|
+
|
|
275
|
+
- When agent completes, system broadcasts `task_complete` to all downstream agents
|
|
276
|
+
- Downstream uses `causedBy` field to trace which inbox message triggered their run
|
|
277
|
+
- Messages from downstream → discarded (prevents reverse loops)
|
|
278
|
+
|
|
279
|
+
### Inbox Management
|
|
280
|
+
|
|
281
|
+
Each smith has an inbox panel with:
|
|
282
|
+
- **Inbox tab**: incoming messages with status (pending/running/done/failed)
|
|
283
|
+
- **Outbox tab**: sent messages with delivery status
|
|
284
|
+
- **Batch operations**: select all completed → bulk delete, or abort all pending
|
|
285
|
+
|
|
286
|
+
## Plugins (MCP Plugin System)
|
|
287
|
+
|
|
288
|
+
Smiths can use MCP plugins for extended capabilities.
|
|
289
|
+
|
|
290
|
+
### Built-in Plugin Types
|
|
291
|
+
|
|
292
|
+
| Plugin | Description |
|
|
293
|
+
|--------|-------------|
|
|
294
|
+
| `playwright` | Browser automation — test, screenshot, navigate |
|
|
295
|
+
| `shell-command` | Execute custom shell commands |
|
|
296
|
+
| `llm-vision` | Send screenshots to LLM for visual evaluation |
|
|
297
|
+
|
|
298
|
+
### Using Plugins in a Smith
|
|
299
|
+
|
|
300
|
+
1. In Settings → Plugins, install plugin definitions
|
|
301
|
+
2. Create plugin instances (configure endpoints, credentials)
|
|
302
|
+
3. In Add Agent modal, select which instances this smith can access
|
|
303
|
+
4. Smith calls `run_plugin(plugin: "<instance-id>", action: "<action>", params: {...})`
|
|
304
|
+
|
|
305
|
+
### Recommended Plugins per Preset
|
|
306
|
+
|
|
307
|
+
- **QA**: `playwright` (e2e testing)
|
|
308
|
+
- **UI Designer**: `playwright` + `shell-command` (screenshots)
|
|
309
|
+
- **Design Evaluator**: `playwright` + `llm-vision` (visual scoring)
|
|
310
|
+
- **Lead**: `playwright` + `shell-command` (fallback for any role)
|
|
311
|
+
|
|
312
|
+
## Terminal Mode (Manual)
|
|
313
|
+
|
|
314
|
+
Click **⌨️** on any smith to open a terminal session:
|
|
315
|
+
|
|
316
|
+
- tmux session opens with CLI + env vars (`FORGE_AGENT_ID`, `FORGE_WORKSPACE_ID`, `FORGE_PORT`)
|
|
317
|
+
- Forge Skills available: `/forge-send`, `/forge-inbox`, `/forge-status`, `/forge-workspace-sync`
|
|
318
|
+
- Session Picker: choose new session, continue existing, or browse all Claude sessions
|
|
319
|
+
- Close terminal → smith returns to auto mode, pending messages resume
|
|
320
|
+
|
|
321
|
+
## Watch (Autonomous Monitoring)
|
|
322
|
+
|
|
323
|
+
Agents can monitor file/git/command changes without message-driven triggers.
|
|
324
|
+
|
|
325
|
+
### Configuration
|
|
326
|
+
|
|
327
|
+
| Field | Description |
|
|
328
|
+
|-------|-------------|
|
|
329
|
+
| **Interval** | Check frequency in seconds (min 10, default 60) |
|
|
330
|
+
| **Debounce** | Minimum seconds between alerts (default 10) |
|
|
331
|
+
| **Targets** | What to watch (multiple allowed) |
|
|
332
|
+
| **On Change** | Action: `log`, `analyze`, `approve`, or `send_message` |
|
|
333
|
+
|
|
334
|
+
### Target Types
|
|
335
|
+
|
|
336
|
+
| Type | Description |
|
|
337
|
+
|------|-------------|
|
|
338
|
+
| `Directory` | File mtime changes in a project folder |
|
|
339
|
+
| `Git` | New commits via HEAD hash comparison |
|
|
340
|
+
| `Agent Output` | Another agent's declared output paths |
|
|
341
|
+
| `Agent Log` | Another agent's log file with optional keyword filter |
|
|
342
|
+
| `Session Output` | Claude session tail output |
|
|
343
|
+
| `Command` | Run a shell command, detect output changes |
|
|
344
|
+
| `Agent Status` | Another agent's smithStatus/taskStatus changes |
|
|
345
|
+
|
|
346
|
+
### Watch Actions
|
|
347
|
+
|
|
348
|
+
| Action | Behavior |
|
|
349
|
+
|--------|----------|
|
|
350
|
+
| `Log` | Write alert to agent log (no token cost) |
|
|
351
|
+
| `Analyze` | Auto-wake agent to analyze changes (costs tokens) |
|
|
352
|
+
| `Approve` | Create pending approval, user decides |
|
|
353
|
+
| `Send Message` | Send alert to specified agent |
|
|
354
|
+
|
|
355
|
+
## Mascot Animations (Visual Flair)
|
|
356
|
+
|
|
357
|
+
Each smith can display an animated companion character next to its node.
|
|
358
|
+
|
|
359
|
+
**Themes**: Stick figure, Cat, Dog, Pig, Emoji, Off (default)
|
|
360
|
+
|
|
361
|
+
- Theme picker in workspace header
|
|
362
|
+
- Animates based on smith state (idle/running/done/failed/sleeping)
|
|
363
|
+
- Persists to localStorage (`forge.mascotTheme`)
|
|
364
|
+
- Done state plays celebration 2x then settles quietly
|
|
365
|
+
|
|
366
|
+
## Controls
|
|
367
|
+
|
|
368
|
+
| Action | Description |
|
|
369
|
+
|--------|-------------|
|
|
370
|
+
| **Start Daemon** | Launch all smiths, begin consuming messages |
|
|
371
|
+
| **Stop Daemon** | Stop all smiths, kill workers |
|
|
372
|
+
| **Run All** | Trigger all runnable agents once |
|
|
373
|
+
| **Run** | Trigger specific agent |
|
|
374
|
+
| **Pause/Resume** | Pause/resume message consumption for one agent |
|
|
375
|
+
| **Mark Done/Failed/Idle** | Manually set task status |
|
|
376
|
+
| **Retry** | Re-run a failed agent from checkpoint |
|
|
377
|
+
| **Open Terminal** | Enter manual mode with tmux session |
|
|
378
|
+
| **Remove** | Delete agent (cascades — cleans dangling dependsOn) |
|
|
379
|
+
|
|
380
|
+
## Workspace API
|
|
381
|
+
|
|
382
|
+
### HTTP Endpoints
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
# List workspaces
|
|
386
|
+
curl http://localhost:8403/api/workspace
|
|
387
|
+
|
|
388
|
+
# Find by project path
|
|
389
|
+
curl "http://localhost:8403/api/workspace?projectPath=/path/to/project"
|
|
390
|
+
|
|
391
|
+
# Export workspace as template
|
|
392
|
+
curl "http://localhost:8403/api/workspace?export=<workspaceId>"
|
|
393
|
+
|
|
394
|
+
# Import template
|
|
395
|
+
curl -X POST http://localhost:8403/api/workspace \
|
|
396
|
+
-H 'Content-Type: application/json' \
|
|
397
|
+
-d '{"projectPath":"...","projectName":"...","template":{...}}'
|
|
398
|
+
|
|
399
|
+
# Delete workspace
|
|
400
|
+
curl -X DELETE "http://localhost:8403/api/workspace?id=<workspaceId>"
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Agent Operations
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
POST /api/workspace/<id>/agents
|
|
407
|
+
{
|
|
408
|
+
"action": "add", # create agent
|
|
409
|
+
"config": {...}
|
|
410
|
+
}
|
|
411
|
+
{
|
|
412
|
+
"action": "update", # update agent
|
|
413
|
+
"agentId": "...",
|
|
414
|
+
"config": {...}
|
|
415
|
+
}
|
|
416
|
+
{
|
|
417
|
+
"action": "remove", # remove agent
|
|
418
|
+
"agentId": "..."
|
|
419
|
+
}
|
|
420
|
+
{
|
|
421
|
+
"action": "start_daemon" # start all smiths
|
|
422
|
+
}
|
|
423
|
+
{
|
|
424
|
+
"action": "stop_daemon" # stop all smiths
|
|
425
|
+
}
|
|
426
|
+
{
|
|
427
|
+
"action": "run", # trigger one agent
|
|
428
|
+
"agentId": "..."
|
|
429
|
+
}
|
|
430
|
+
{
|
|
431
|
+
"action": "mark_done", # manual status
|
|
432
|
+
"agentId": "...",
|
|
433
|
+
"notify": true # also send downstream notifications
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Streaming Events (SSE)
|
|
438
|
+
|
|
439
|
+
```bash
|
|
440
|
+
curl http://localhost:8403/api/workspace/<id>/stream
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
Events: `agents_changed`, `task_status`, `smith_status`, `log`, `bus_message`, `workspace_complete`, `watch_alert`.
|
|
444
|
+
|
|
445
|
+
## Timeouts & Session Monitor
|
|
446
|
+
|
|
447
|
+
A background session monitor polls each agent's Claude session file:
|
|
448
|
+
|
|
449
|
+
| Threshold | Behavior |
|
|
450
|
+
|-----------|----------|
|
|
451
|
+
| **File change** | → `running` (mtime/size changed) |
|
|
452
|
+
| **19 min stable** | Check for `result` entry in session file → mark `done` if found |
|
|
453
|
+
| **20 min stable** | Force `done` (fallback if Stop hook missed) |
|
|
454
|
+
|
|
455
|
+
The Stop hook (installed in `~/.claude/settings.json`) triggers `done` immediately when Claude Code finishes a turn.
|
|
456
|
+
|
|
457
|
+
## Persistence
|
|
458
|
+
|
|
459
|
+
- **Workspace state**: `~/.forge/workspaces/<id>/state.json` (atomic writes, auto-save every 10s)
|
|
460
|
+
- **Agent logs**: `~/.forge/workspaces/<id>/agents/<agentId>/logs.jsonl` (append-only)
|
|
461
|
+
- **Smith templates**: `~/.forge/data/smith-templates/*.json`
|
|
462
|
+
- **Request documents**: `<project>/.forge/requests/REQ-*/` (request.yml + response.yml)
|
|
463
|
+
- **Agent context**: `<project>/<workDir>/.forge/agent-context.json` (read by Stop hook)
|
|
464
|
+
|
|
465
|
+
## Complete WorkspaceAgentConfig Schema
|
|
466
|
+
|
|
467
|
+
Use this exact JSON structure when calling `POST /api/workspace/<id>/agents` with `action: "add"` or `action: "update"`.
|
|
468
|
+
|
|
469
|
+
```json
|
|
470
|
+
{
|
|
471
|
+
"id": "engineer-1775268642253",
|
|
472
|
+
"label": "Engineer",
|
|
473
|
+
"icon": "🔨",
|
|
474
|
+
"type": "agent",
|
|
475
|
+
"primary": false,
|
|
476
|
+
"backend": "cli",
|
|
477
|
+
"agentId": "claude",
|
|
478
|
+
"provider": null,
|
|
479
|
+
"model": null,
|
|
480
|
+
"dependsOn": ["input-1775268600000", "pm-1775268620946"],
|
|
481
|
+
"workDir": "./src",
|
|
482
|
+
"outputs": ["src/", "docs/architecture/"],
|
|
483
|
+
"steps": [
|
|
484
|
+
{ "id": "claim", "label": "Find & Claim", "prompt": "Read Workspace Team..." },
|
|
485
|
+
{ "id": "design", "label": "Design", "prompt": "get_request for details..." },
|
|
486
|
+
{ "id": "implement", "label": "Implement", "prompt": "Implement per design..." },
|
|
487
|
+
{ "id": "report", "label": "Report Done", "prompt": "update_response..." }
|
|
488
|
+
],
|
|
489
|
+
"role": "Senior Software Engineer. Context auto-includes Workspace Team...",
|
|
490
|
+
"persistentSession": true,
|
|
491
|
+
"skipPermissions": true,
|
|
492
|
+
"requiresApproval": false,
|
|
493
|
+
"plugins": ["playwright-main"],
|
|
494
|
+
"watch": {
|
|
495
|
+
"enabled": false,
|
|
496
|
+
"interval": 60,
|
|
497
|
+
"targets": [],
|
|
498
|
+
"action": "log",
|
|
499
|
+
"prompt": "",
|
|
500
|
+
"sendTo": ""
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
### Field Reference
|
|
506
|
+
|
|
507
|
+
| Field | Type | Required | Default | Description |
|
|
508
|
+
|-------|------|----------|---------|-------------|
|
|
509
|
+
| `id` | string | yes (for update/remove) | auto | Format: `{label-lower}-{timestamp}` |
|
|
510
|
+
| `label` | string | yes | — | Display name, must be unique in workspace |
|
|
511
|
+
| `icon` | string | yes | `🤖` | Emoji icon |
|
|
512
|
+
| `type` | string | yes | `agent` | `agent` or `input` |
|
|
513
|
+
| `primary` | boolean | no | false | Only one per workspace, workDir forced to `./` |
|
|
514
|
+
| `backend` | string | yes | `cli` | `cli` (subscription) or `api` (api key) |
|
|
515
|
+
| `agentId` | string | cli only | `claude` | Agent ID from Settings → Agents (e.g. `claude`, `codex`, `aider`) |
|
|
516
|
+
| `provider` | string | api only | — | e.g. `anthropic` |
|
|
517
|
+
| `model` | string | no | — | Model override (e.g. `claude-sonnet-4-6`) |
|
|
518
|
+
| `dependsOn` | string[] | yes | `[]` | Upstream agent IDs (DAG edges) |
|
|
519
|
+
| `workDir` | string | yes | `./` | Relative path from project root, must be unique |
|
|
520
|
+
| `outputs` | string[] | yes | `[]` | Expected output paths (informational) |
|
|
521
|
+
| `steps` | object[] | yes | `[]` | `{id, label, prompt}[]` |
|
|
522
|
+
| `role` | string | yes | — | System prompt, synced to `CLAUDE.md` in workDir |
|
|
523
|
+
| `persistentSession` | boolean | no | false | Keep tmux+CLI alive (required for primary) |
|
|
524
|
+
| `skipPermissions` | boolean | no | true | `--dangerously-skip-permissions` for Claude Code |
|
|
525
|
+
| `requiresApproval` | boolean | no | false | User approves each inbox message |
|
|
526
|
+
| `plugins` | string[] | no | — | Plugin instance IDs |
|
|
527
|
+
| `watch` | object | no | — | Watch config (see Watch section) |
|
|
528
|
+
|
|
529
|
+
### Watch Config Schema
|
|
530
|
+
|
|
531
|
+
```json
|
|
532
|
+
{
|
|
533
|
+
"enabled": true,
|
|
534
|
+
"interval": 60,
|
|
535
|
+
"targets": [
|
|
536
|
+
{ "type": "directory", "path": "src/", "debounce": 10 },
|
|
537
|
+
{ "type": "git", "debounce": 10 },
|
|
538
|
+
{ "type": "agent_status", "path": "engineer-1234", "pattern": "done" },
|
|
539
|
+
{ "type": "command", "cmd": "npm test", "debounce": 10 },
|
|
540
|
+
{ "type": "agent_log", "path": "qa-5678", "pattern": "error" },
|
|
541
|
+
{ "type": "agent_output", "path": "pm-9012" },
|
|
542
|
+
{ "type": "session", "path": "engineer-1234" }
|
|
543
|
+
],
|
|
544
|
+
"action": "log",
|
|
545
|
+
"prompt": "Analyze and report",
|
|
546
|
+
"sendTo": "engineer-1234"
|
|
547
|
+
}
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
- `action` values: `log` | `analyze` | `approve` | `send_message`
|
|
551
|
+
- `sendTo` is required only when `action: "send_message"`
|
|
552
|
+
|
|
553
|
+
## Complete Recipes
|
|
554
|
+
|
|
555
|
+
### Authentication (Required for API Calls)
|
|
556
|
+
|
|
557
|
+
```bash
|
|
558
|
+
# Ask user for admin password, then:
|
|
559
|
+
TOKEN=$(curl -s -X POST http://localhost:8403/api/auth/verify \
|
|
560
|
+
-H "Content-Type: application/json" \
|
|
561
|
+
-d '{"password":"USER_PASSWORD"}' | python3 -c "import sys,json; print(json.load(sys.stdin).get('token',''))")
|
|
562
|
+
|
|
563
|
+
# Use token in all subsequent requests:
|
|
564
|
+
# curl -H "X-Forge-Token: $TOKEN" ...
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
### Recipe 1: Create Workspace + Add Lead + Start Daemon
|
|
568
|
+
|
|
569
|
+
```bash
|
|
570
|
+
# 1. Create workspace
|
|
571
|
+
WS=$(curl -s -X POST http://localhost:8403/api/workspace \
|
|
572
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
573
|
+
-d '{"projectPath":"/Users/me/projects/my-app","projectName":"my-app"}' \
|
|
574
|
+
| python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
|
575
|
+
|
|
576
|
+
# 2. Add Input node (where user requirements go)
|
|
577
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
578
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
579
|
+
-d '{
|
|
580
|
+
"action": "add",
|
|
581
|
+
"config": {
|
|
582
|
+
"id": "input-'$(date +%s%N)'",
|
|
583
|
+
"label": "Requirements",
|
|
584
|
+
"icon": "📝",
|
|
585
|
+
"type": "input",
|
|
586
|
+
"backend": "cli",
|
|
587
|
+
"dependsOn": [],
|
|
588
|
+
"outputs": [],
|
|
589
|
+
"steps": [],
|
|
590
|
+
"role": "",
|
|
591
|
+
"content": "",
|
|
592
|
+
"entries": []
|
|
593
|
+
}
|
|
594
|
+
}'
|
|
595
|
+
|
|
596
|
+
# 3. Add Lead (Primary coordinator)
|
|
597
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
598
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
599
|
+
-d '{
|
|
600
|
+
"action": "add",
|
|
601
|
+
"config": {
|
|
602
|
+
"id": "lead-'$(date +%s%N)'",
|
|
603
|
+
"label": "Lead",
|
|
604
|
+
"icon": "👑",
|
|
605
|
+
"type": "agent",
|
|
606
|
+
"primary": true,
|
|
607
|
+
"backend": "cli",
|
|
608
|
+
"agentId": "claude",
|
|
609
|
+
"dependsOn": [],
|
|
610
|
+
"workDir": "./",
|
|
611
|
+
"outputs": ["docs/lead/"],
|
|
612
|
+
"persistentSession": true,
|
|
613
|
+
"skipPermissions": true,
|
|
614
|
+
"plugins": [],
|
|
615
|
+
"role": "You are the Lead — primary coordinator...",
|
|
616
|
+
"steps": [
|
|
617
|
+
{"id": "intake", "label": "Intake", "prompt": "Read Workspace Team..."},
|
|
618
|
+
{"id": "delegate", "label": "Delegate", "prompt": "create_request for each task..."},
|
|
619
|
+
{"id": "monitor", "label": "Monitor", "prompt": "get_status + list_requests..."}
|
|
620
|
+
]
|
|
621
|
+
}
|
|
622
|
+
}'
|
|
623
|
+
|
|
624
|
+
# 4. Start daemon
|
|
625
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
626
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
627
|
+
-d '{"action": "start_daemon"}'
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
### Recipe 2: Add a Full Dev Team (Lead + Engineer + QA + Reviewer)
|
|
631
|
+
|
|
632
|
+
```bash
|
|
633
|
+
TS=$(date +%s%N)
|
|
634
|
+
INPUT_ID="input-$TS"
|
|
635
|
+
LEAD_ID="lead-$TS"
|
|
636
|
+
ENG_ID="engineer-$TS"
|
|
637
|
+
QA_ID="qa-$TS"
|
|
638
|
+
REV_ID="reviewer-$TS"
|
|
639
|
+
|
|
640
|
+
# Input
|
|
641
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
642
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
643
|
+
-d "{\"action\":\"add\",\"config\":{\"id\":\"$INPUT_ID\",\"label\":\"Requirements\",\"icon\":\"📝\",\"type\":\"input\",\"backend\":\"cli\",\"dependsOn\":[],\"outputs\":[],\"steps\":[],\"role\":\"\",\"content\":\"\",\"entries\":[]}}"
|
|
644
|
+
|
|
645
|
+
# Lead (depends on Input)
|
|
646
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
647
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
648
|
+
-d "{\"action\":\"add\",\"config\":{\"id\":\"$LEAD_ID\",\"label\":\"Lead\",\"icon\":\"👑\",\"type\":\"agent\",\"primary\":true,\"backend\":\"cli\",\"agentId\":\"claude\",\"dependsOn\":[\"$INPUT_ID\"],\"workDir\":\"./\",\"outputs\":[\"docs/lead/\"],\"persistentSession\":true,\"skipPermissions\":true,\"role\":\"Lead coordinator\",\"steps\":[{\"id\":\"plan\",\"label\":\"Plan\",\"prompt\":\"Coordinate the team\"}]}}"
|
|
649
|
+
|
|
650
|
+
# Engineer (depends on Lead)
|
|
651
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
652
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
653
|
+
-d "{\"action\":\"add\",\"config\":{\"id\":\"$ENG_ID\",\"label\":\"Engineer\",\"icon\":\"🔨\",\"type\":\"agent\",\"backend\":\"cli\",\"agentId\":\"claude\",\"dependsOn\":[\"$LEAD_ID\"],\"workDir\":\"./src\",\"outputs\":[\"src/\"],\"persistentSession\":true,\"skipPermissions\":true,\"role\":\"Engineer\",\"steps\":[{\"id\":\"impl\",\"label\":\"Implement\",\"prompt\":\"Write code\"}]}}"
|
|
654
|
+
|
|
655
|
+
# QA (depends on Engineer)
|
|
656
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
657
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
658
|
+
-d "{\"action\":\"add\",\"config\":{\"id\":\"$QA_ID\",\"label\":\"QA\",\"icon\":\"🧪\",\"type\":\"agent\",\"backend\":\"cli\",\"agentId\":\"claude\",\"dependsOn\":[\"$ENG_ID\"],\"workDir\":\"./qa\",\"outputs\":[\"tests/\"],\"persistentSession\":true,\"skipPermissions\":true,\"plugins\":[\"playwright-main\"],\"role\":\"QA\",\"steps\":[{\"id\":\"test\",\"label\":\"Test\",\"prompt\":\"Write and run tests\"}]}}"
|
|
659
|
+
|
|
660
|
+
# Reviewer (depends on Engineer + QA)
|
|
661
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
662
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
663
|
+
-d "{\"action\":\"add\",\"config\":{\"id\":\"$REV_ID\",\"label\":\"Reviewer\",\"icon\":\"🔍\",\"type\":\"agent\",\"backend\":\"cli\",\"agentId\":\"claude\",\"dependsOn\":[\"$ENG_ID\",\"$QA_ID\"],\"workDir\":\"./review\",\"outputs\":[\"docs/review/\"],\"persistentSession\":true,\"skipPermissions\":true,\"role\":\"Reviewer\",\"steps\":[{\"id\":\"review\",\"label\":\"Review\",\"prompt\":\"Review code\"}]}}"
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
### Recipe 3: Submit Input and Run
|
|
667
|
+
|
|
668
|
+
```bash
|
|
669
|
+
# Send requirement text to Input node
|
|
670
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
671
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
672
|
+
-d "{\"action\":\"complete_input\",\"agentId\":\"$INPUT_ID\",\"content\":\"Build a login page with email/password.\"}"
|
|
673
|
+
|
|
674
|
+
# Trigger Lead to start
|
|
675
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
676
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
677
|
+
-d "{\"action\":\"run\",\"agentId\":\"$LEAD_ID\"}"
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### Recipe 4: Save a Smith as Template + Import Later
|
|
681
|
+
|
|
682
|
+
```bash
|
|
683
|
+
# Save current agent config as template
|
|
684
|
+
curl -s -X POST http://localhost:8403/api/smith-templates \
|
|
685
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
686
|
+
-d '{
|
|
687
|
+
"name": "My Engineer",
|
|
688
|
+
"icon": "🔨",
|
|
689
|
+
"description": "Custom engineer with TDD preference",
|
|
690
|
+
"config": {
|
|
691
|
+
"label": "Engineer",
|
|
692
|
+
"icon": "🔨",
|
|
693
|
+
"backend": "cli",
|
|
694
|
+
"agentId": "claude",
|
|
695
|
+
"workDir": "./src",
|
|
696
|
+
"outputs": ["src/"],
|
|
697
|
+
"role": "Engineer with TDD approach...",
|
|
698
|
+
"steps": [...],
|
|
699
|
+
"persistentSession": true,
|
|
700
|
+
"plugins": ["playwright-main"]
|
|
701
|
+
}
|
|
702
|
+
}'
|
|
703
|
+
|
|
704
|
+
# List templates
|
|
705
|
+
curl -s http://localhost:8403/api/smith-templates -H "X-Forge-Token: $TOKEN"
|
|
706
|
+
|
|
707
|
+
# When adding agent, reuse saved template's config field
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
### Recipe 5: Configure Watch on an Agent
|
|
711
|
+
|
|
712
|
+
```bash
|
|
713
|
+
# Update agent to watch the src/ directory and analyze on changes
|
|
714
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
715
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
716
|
+
-d "{
|
|
717
|
+
\"action\":\"update\",
|
|
718
|
+
\"agentId\":\"$REV_ID\",
|
|
719
|
+
\"config\": {
|
|
720
|
+
\"id\":\"$REV_ID\",
|
|
721
|
+
\"label\":\"Reviewer\",
|
|
722
|
+
... (all existing fields)
|
|
723
|
+
\"watch\": {
|
|
724
|
+
\"enabled\": true,
|
|
725
|
+
\"interval\": 60,
|
|
726
|
+
\"targets\": [
|
|
727
|
+
{\"type\":\"directory\",\"path\":\"src/\",\"debounce\":10}
|
|
728
|
+
],
|
|
729
|
+
\"action\": \"analyze\",
|
|
730
|
+
\"prompt\": \"Review recent changes for quality issues\"
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
}"
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
### Recipe 6: Install a Plugin Instance
|
|
737
|
+
|
|
738
|
+
```bash
|
|
739
|
+
# List available plugin definitions
|
|
740
|
+
curl -s http://localhost:8403/api/plugins -H "X-Forge-Token: $TOKEN"
|
|
741
|
+
|
|
742
|
+
# Install a plugin instance (e.g., playwright)
|
|
743
|
+
curl -s -X POST http://localhost:8403/api/plugins \
|
|
744
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
745
|
+
-d '{
|
|
746
|
+
"action": "install",
|
|
747
|
+
"id": "playwright",
|
|
748
|
+
"config": {
|
|
749
|
+
"instanceName": "playwright-main"
|
|
750
|
+
}
|
|
751
|
+
}'
|
|
752
|
+
|
|
753
|
+
# List installed instances
|
|
754
|
+
curl -s "http://localhost:8403/api/plugins?installed=true" -H "X-Forge-Token: $TOKEN"
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
### Recipe 7: Query Workspace State
|
|
758
|
+
|
|
759
|
+
```bash
|
|
760
|
+
# List all workspaces
|
|
761
|
+
curl -s http://localhost:8403/api/workspace -H "X-Forge-Token: $TOKEN"
|
|
762
|
+
|
|
763
|
+
# Get full workspace state (agents + states + bus)
|
|
764
|
+
curl -s "http://localhost:8403/api/workspace?projectPath=/Users/me/projects/my-app" \
|
|
765
|
+
-H "X-Forge-Token: $TOKEN"
|
|
766
|
+
|
|
767
|
+
# Get live agent list
|
|
768
|
+
curl -s "http://localhost:8403/api/workspace/$WS/agents" -H "X-Forge-Token: $TOKEN"
|
|
769
|
+
|
|
770
|
+
# Stream SSE events (runs forever, use Ctrl+C to stop)
|
|
771
|
+
curl -N "http://localhost:8403/api/workspace/$WS/stream" -H "X-Forge-Token: $TOKEN"
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
### Recipe 8: Remove Agent / Workspace
|
|
775
|
+
|
|
776
|
+
```bash
|
|
777
|
+
# Remove an agent (non-primary only)
|
|
778
|
+
curl -s -X POST "http://localhost:8403/api/workspace/$WS/agents" \
|
|
779
|
+
-H "Content-Type: application/json" -H "X-Forge-Token: $TOKEN" \
|
|
780
|
+
-d "{\"action\":\"remove\",\"agentId\":\"$REV_ID\"}"
|
|
781
|
+
|
|
782
|
+
# Delete entire workspace
|
|
783
|
+
curl -s -X DELETE "http://localhost:8403/api/workspace?id=$WS" \
|
|
784
|
+
-H "X-Forge-Token: $TOKEN"
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
## Common Pitfalls
|
|
788
|
+
|
|
789
|
+
| Problem | Cause | Solution |
|
|
790
|
+
|---------|-------|----------|
|
|
791
|
+
| "Work directory conflict" | Two agents use same `workDir` | Each non-input smith must have unique workDir |
|
|
792
|
+
| "Cycle detected in dependencies" | `dependsOn` creates a loop | Review DAG, break the cycle |
|
|
793
|
+
| "Primary already set" | Trying to add 2nd primary smith | Only one primary per workspace |
|
|
794
|
+
| Daemon won't start | No primary agent, or config errors | Check logs at `~/.forge/data/forge.log` |
|
|
795
|
+
| Agent stuck in `running` | Stop hook didn't fire | 20-min auto timeout will kick in; or manual mark_done |
|
|
796
|
+
| Hook not firing | `.forge/agent-context.json` missing | Restart daemon to re-inject |
|
|
797
|
+
| `agentId` not found | CLI/profile deleted from Settings | Update agent config with valid agentId |
|
|
798
|
+
|
|
799
|
+
## Tips
|
|
800
|
+
|
|
801
|
+
1. **Start with a Lead** — add Lead first as Primary, then add specialists (Engineer, QA, etc.)
|
|
802
|
+
2. **Dependencies must be DAG** — no cycles allowed
|
|
803
|
+
3. **Use request documents** — don't rely on loose `send_message` for delegation
|
|
804
|
+
4. **Trust the topology** — agents auto-see the team in their context, no redundant `get_agents` calls needed
|
|
805
|
+
5. **Let Lead cover gaps** — don't add roles you don't need, Lead handles missing ones
|
|
806
|
+
6. **Use Watch for passive monitoring** — avoid token costs with `action: log`
|
|
807
|
+
7. **Save useful smiths as templates** — 💾 button → reusable across workspaces
|
|
808
|
+
8. **Use Terminal mode** for debugging — interact with a smith directly
|
|
809
|
+
9. **Check session logs** if a smith seems stuck — `~/.claude/projects/<encoded-path>/<sessionId>.jsonl`
|
|
810
|
+
10. **20-min timeout is a safety net** — if Stop hook fires normally, task is marked done immediately
|