@aion0/forge 0.5.26 → 0.5.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/.forge/worktrees/pipeline-4dd8dc2d/CLAUDE.md +86 -0
  2. package/.forge/worktrees/pipeline-4dd8dc2d/README.md +136 -0
  3. package/.forge/worktrees/pipeline-4dd8dc2d/RELEASE_NOTES.md +36 -0
  4. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/agents/route.ts +17 -0
  5. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/auth/[...nextauth]/route.ts +3 -0
  6. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/auth/verify/route.ts +46 -0
  7. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude/[id]/route.ts +31 -0
  8. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude/[id]/stream/route.ts +63 -0
  9. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude/route.ts +28 -0
  10. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-sessions/[projectName]/entries/route.ts +23 -0
  11. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-sessions/[projectName]/live/route.ts +72 -0
  12. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-sessions/[projectName]/route.ts +37 -0
  13. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-sessions/sync/route.ts +17 -0
  14. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/claude-templates/route.ts +145 -0
  15. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/code/route.ts +299 -0
  16. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/delivery/[id]/route.ts +62 -0
  17. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/delivery/route.ts +40 -0
  18. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/detect-cli/route.ts +46 -0
  19. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/docs/route.ts +176 -0
  20. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/docs/sessions/route.ts +54 -0
  21. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/favorites/route.ts +26 -0
  22. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/flows/route.ts +6 -0
  23. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/flows/run/route.ts +19 -0
  24. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/git/route.ts +149 -0
  25. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/help/route.ts +84 -0
  26. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/issue-scanner/route.ts +116 -0
  27. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/logs/route.ts +100 -0
  28. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/mobile-chat/route.ts +115 -0
  29. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/monitor/route.ts +74 -0
  30. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/notifications/route.ts +42 -0
  31. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/notify/test/route.ts +33 -0
  32. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/online/route.ts +40 -0
  33. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/pipelines/[id]/route.ts +41 -0
  34. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/pipelines/route.ts +90 -0
  35. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/plugins/route.ts +75 -0
  36. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/preview/[...path]/route.ts +64 -0
  37. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/preview/route.ts +156 -0
  38. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/project-pipelines/route.ts +91 -0
  39. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/project-sessions/route.ts +61 -0
  40. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/projects/route.ts +26 -0
  41. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/sessions/[id]/chat/route.ts +64 -0
  42. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/sessions/[id]/messages/route.ts +9 -0
  43. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/sessions/[id]/route.ts +17 -0
  44. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/sessions/route.ts +20 -0
  45. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/settings/route.ts +64 -0
  46. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/skills/local/route.ts +228 -0
  47. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/skills/route.ts +182 -0
  48. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/smith-templates/route.ts +81 -0
  49. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/status/route.ts +12 -0
  50. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tabs/route.ts +25 -0
  51. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/[id]/route.ts +51 -0
  52. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/[id]/stream/route.ts +77 -0
  53. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/link/route.ts +37 -0
  54. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/route.ts +44 -0
  55. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tasks/session/route.ts +14 -0
  56. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/telegram/route.ts +23 -0
  57. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/templates/route.ts +6 -0
  58. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/terminal-bell/route.ts +39 -0
  59. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/terminal-cwd/route.ts +19 -0
  60. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/terminal-state/route.ts +15 -0
  61. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/tunnel/route.ts +26 -0
  62. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/upgrade/route.ts +43 -0
  63. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/usage/route.ts +20 -0
  64. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/version/route.ts +78 -0
  65. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/watchers/route.ts +33 -0
  66. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/[id]/agents/route.ts +35 -0
  67. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/[id]/memory/route.ts +23 -0
  68. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/[id]/smith/route.ts +22 -0
  69. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/[id]/stream/route.ts +31 -0
  70. package/.forge/worktrees/pipeline-4dd8dc2d/app/api/workspace/route.ts +79 -0
  71. package/.forge/worktrees/pipeline-4dd8dc2d/app/global-error.tsx +21 -0
  72. package/.forge/worktrees/pipeline-4dd8dc2d/app/globals.css +52 -0
  73. package/.forge/worktrees/pipeline-4dd8dc2d/app/icon.ico +0 -0
  74. package/.forge/worktrees/pipeline-4dd8dc2d/app/icon.png +0 -0
  75. package/.forge/worktrees/pipeline-4dd8dc2d/app/icon.svg +106 -0
  76. package/.forge/worktrees/pipeline-4dd8dc2d/app/layout.tsx +17 -0
  77. package/.forge/worktrees/pipeline-4dd8dc2d/app/login/LoginForm.tsx +96 -0
  78. package/.forge/worktrees/pipeline-4dd8dc2d/app/login/page.tsx +10 -0
  79. package/.forge/worktrees/pipeline-4dd8dc2d/app/mobile/page.tsx +10 -0
  80. package/.forge/worktrees/pipeline-4dd8dc2d/app/page.tsx +22 -0
  81. package/.forge/worktrees/pipeline-4dd8dc2d/bin/forge-server.mjs +484 -0
  82. package/.forge/worktrees/pipeline-4dd8dc2d/check-forge-status.sh +71 -0
  83. package/.forge/worktrees/pipeline-4dd8dc2d/cli/mw.ts +579 -0
  84. package/.forge/worktrees/pipeline-4dd8dc2d/components/BrowserPanel.tsx +175 -0
  85. package/.forge/worktrees/pipeline-4dd8dc2d/components/ChatPanel.tsx +191 -0
  86. package/.forge/worktrees/pipeline-4dd8dc2d/components/ClaudeTerminal.tsx +267 -0
  87. package/.forge/worktrees/pipeline-4dd8dc2d/components/CodeViewer.tsx +787 -0
  88. package/.forge/worktrees/pipeline-4dd8dc2d/components/ConversationEditor.tsx +411 -0
  89. package/.forge/worktrees/pipeline-4dd8dc2d/components/ConversationGraphView.tsx +347 -0
  90. package/.forge/worktrees/pipeline-4dd8dc2d/components/ConversationTerminalView.tsx +303 -0
  91. package/.forge/worktrees/pipeline-4dd8dc2d/components/Dashboard.tsx +807 -0
  92. package/.forge/worktrees/pipeline-4dd8dc2d/components/DashboardWrapper.tsx +9 -0
  93. package/.forge/worktrees/pipeline-4dd8dc2d/components/DeliveryFlowEditor.tsx +491 -0
  94. package/.forge/worktrees/pipeline-4dd8dc2d/components/DeliveryList.tsx +230 -0
  95. package/.forge/worktrees/pipeline-4dd8dc2d/components/DeliveryWorkspace.tsx +589 -0
  96. package/.forge/worktrees/pipeline-4dd8dc2d/components/DocTerminal.tsx +187 -0
  97. package/.forge/worktrees/pipeline-4dd8dc2d/components/DocsViewer.tsx +574 -0
  98. package/.forge/worktrees/pipeline-4dd8dc2d/components/HelpDialog.tsx +169 -0
  99. package/.forge/worktrees/pipeline-4dd8dc2d/components/HelpTerminal.tsx +141 -0
  100. package/.forge/worktrees/pipeline-4dd8dc2d/components/InlinePipelineView.tsx +111 -0
  101. package/.forge/worktrees/pipeline-4dd8dc2d/components/LogViewer.tsx +194 -0
  102. package/.forge/worktrees/pipeline-4dd8dc2d/components/MarkdownContent.tsx +73 -0
  103. package/.forge/worktrees/pipeline-4dd8dc2d/components/MobileView.tsx +385 -0
  104. package/.forge/worktrees/pipeline-4dd8dc2d/components/MonitorPanel.tsx +122 -0
  105. package/.forge/worktrees/pipeline-4dd8dc2d/components/NewSessionModal.tsx +93 -0
  106. package/.forge/worktrees/pipeline-4dd8dc2d/components/NewTaskModal.tsx +492 -0
  107. package/.forge/worktrees/pipeline-4dd8dc2d/components/PipelineEditor.tsx +570 -0
  108. package/.forge/worktrees/pipeline-4dd8dc2d/components/PipelineView.tsx +1018 -0
  109. package/.forge/worktrees/pipeline-4dd8dc2d/components/PluginsPanel.tsx +472 -0
  110. package/.forge/worktrees/pipeline-4dd8dc2d/components/ProjectDetail.tsx +1618 -0
  111. package/.forge/worktrees/pipeline-4dd8dc2d/components/ProjectList.tsx +108 -0
  112. package/.forge/worktrees/pipeline-4dd8dc2d/components/ProjectManager.tsx +401 -0
  113. package/.forge/worktrees/pipeline-4dd8dc2d/components/SessionList.tsx +74 -0
  114. package/.forge/worktrees/pipeline-4dd8dc2d/components/SessionView.tsx +726 -0
  115. package/.forge/worktrees/pipeline-4dd8dc2d/components/SettingsModal.tsx +1647 -0
  116. package/.forge/worktrees/pipeline-4dd8dc2d/components/SkillsPanel.tsx +969 -0
  117. package/.forge/worktrees/pipeline-4dd8dc2d/components/StatusBar.tsx +99 -0
  118. package/.forge/worktrees/pipeline-4dd8dc2d/components/TabBar.tsx +46 -0
  119. package/.forge/worktrees/pipeline-4dd8dc2d/components/TaskBoard.tsx +113 -0
  120. package/.forge/worktrees/pipeline-4dd8dc2d/components/TaskDetail.tsx +372 -0
  121. package/.forge/worktrees/pipeline-4dd8dc2d/components/TerminalLauncher.tsx +398 -0
  122. package/.forge/worktrees/pipeline-4dd8dc2d/components/TunnelToggle.tsx +206 -0
  123. package/.forge/worktrees/pipeline-4dd8dc2d/components/UsagePanel.tsx +207 -0
  124. package/.forge/worktrees/pipeline-4dd8dc2d/components/WebTerminal.tsx +1743 -0
  125. package/.forge/worktrees/pipeline-4dd8dc2d/components/WorkspaceTree.tsx +221 -0
  126. package/.forge/worktrees/pipeline-4dd8dc2d/components/WorkspaceView.tsx +4048 -0
  127. package/.forge/worktrees/pipeline-4dd8dc2d/dev-test.sh +5 -0
  128. package/.forge/worktrees/pipeline-4dd8dc2d/docs/Forge_Memory_Layer_Design.docx +0 -0
  129. package/.forge/worktrees/pipeline-4dd8dc2d/docs/Forge_Strategy_Research_2026.docx +0 -0
  130. package/.forge/worktrees/pipeline-4dd8dc2d/docs/LOCAL-DEPLOY.md +144 -0
  131. package/.forge/worktrees/pipeline-4dd8dc2d/docs/roadmap-multi-agent-workflow.md +330 -0
  132. package/.forge/worktrees/pipeline-4dd8dc2d/forge-logo.png +0 -0
  133. package/.forge/worktrees/pipeline-4dd8dc2d/forge-logo.svg +106 -0
  134. package/.forge/worktrees/pipeline-4dd8dc2d/hooks/useSidebarResize.ts +52 -0
  135. package/.forge/worktrees/pipeline-4dd8dc2d/install.sh +29 -0
  136. package/.forge/worktrees/pipeline-4dd8dc2d/instrumentation.ts +35 -0
  137. package/.forge/worktrees/pipeline-4dd8dc2d/lib/agents/claude-adapter.ts +104 -0
  138. package/.forge/worktrees/pipeline-4dd8dc2d/lib/agents/generic-adapter.ts +64 -0
  139. package/.forge/worktrees/pipeline-4dd8dc2d/lib/agents/index.ts +245 -0
  140. package/.forge/worktrees/pipeline-4dd8dc2d/lib/agents/types.ts +70 -0
  141. package/.forge/worktrees/pipeline-4dd8dc2d/lib/artifacts.ts +106 -0
  142. package/.forge/worktrees/pipeline-4dd8dc2d/lib/auth.ts +62 -0
  143. package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/docker.yaml +70 -0
  144. package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/http.yaml +66 -0
  145. package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/jenkins.yaml +92 -0
  146. package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/llm-vision.yaml +85 -0
  147. package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/playwright.yaml +111 -0
  148. package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/shell-command.yaml +60 -0
  149. package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/slack.yaml +48 -0
  150. package/.forge/worktrees/pipeline-4dd8dc2d/lib/builtin-plugins/webhook.yaml +56 -0
  151. package/.forge/worktrees/pipeline-4dd8dc2d/lib/claude-process.ts +361 -0
  152. package/.forge/worktrees/pipeline-4dd8dc2d/lib/claude-sessions.ts +266 -0
  153. package/.forge/worktrees/pipeline-4dd8dc2d/lib/claude-templates.ts +227 -0
  154. package/.forge/worktrees/pipeline-4dd8dc2d/lib/cloudflared.ts +424 -0
  155. package/.forge/worktrees/pipeline-4dd8dc2d/lib/crypto.ts +67 -0
  156. package/.forge/worktrees/pipeline-4dd8dc2d/lib/delivery.ts +787 -0
  157. package/.forge/worktrees/pipeline-4dd8dc2d/lib/dirs.ts +99 -0
  158. package/.forge/worktrees/pipeline-4dd8dc2d/lib/flows.ts +86 -0
  159. package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-mcp-server.ts +732 -0
  160. package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-skills/forge-inbox.md +38 -0
  161. package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-skills/forge-send.md +47 -0
  162. package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-skills/forge-status.md +32 -0
  163. package/.forge/worktrees/pipeline-4dd8dc2d/lib/forge-skills/forge-workspace-sync.md +37 -0
  164. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/00-overview.md +40 -0
  165. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/01-settings.md +194 -0
  166. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/02-telegram.md +41 -0
  167. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/03-tunnel.md +31 -0
  168. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/04-tasks.md +52 -0
  169. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/05-pipelines.md +460 -0
  170. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/06-skills.md +43 -0
  171. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/07-projects.md +73 -0
  172. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/08-rules.md +53 -0
  173. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/09-issue-autofix.md +55 -0
  174. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/10-troubleshooting.md +89 -0
  175. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/11-workspace.md +810 -0
  176. package/.forge/worktrees/pipeline-4dd8dc2d/lib/help-docs/CLAUDE.md +62 -0
  177. package/.forge/worktrees/pipeline-4dd8dc2d/lib/init.ts +266 -0
  178. package/.forge/worktrees/pipeline-4dd8dc2d/lib/issue-scanner.ts +298 -0
  179. package/.forge/worktrees/pipeline-4dd8dc2d/lib/logger.ts +79 -0
  180. package/.forge/worktrees/pipeline-4dd8dc2d/lib/notifications.ts +75 -0
  181. package/.forge/worktrees/pipeline-4dd8dc2d/lib/notify.ts +108 -0
  182. package/.forge/worktrees/pipeline-4dd8dc2d/lib/password.ts +97 -0
  183. package/.forge/worktrees/pipeline-4dd8dc2d/lib/pipeline-scheduler.ts +373 -0
  184. package/.forge/worktrees/pipeline-4dd8dc2d/lib/pipeline.ts +1565 -0
  185. package/.forge/worktrees/pipeline-4dd8dc2d/lib/plugins/executor.ts +347 -0
  186. package/.forge/worktrees/pipeline-4dd8dc2d/lib/plugins/registry.ts +228 -0
  187. package/.forge/worktrees/pipeline-4dd8dc2d/lib/plugins/types.ts +103 -0
  188. package/.forge/worktrees/pipeline-4dd8dc2d/lib/project-sessions.ts +53 -0
  189. package/.forge/worktrees/pipeline-4dd8dc2d/lib/projects.ts +86 -0
  190. package/.forge/worktrees/pipeline-4dd8dc2d/lib/session-manager.ts +156 -0
  191. package/.forge/worktrees/pipeline-4dd8dc2d/lib/session-utils.ts +53 -0
  192. package/.forge/worktrees/pipeline-4dd8dc2d/lib/session-watcher.ts +345 -0
  193. package/.forge/worktrees/pipeline-4dd8dc2d/lib/settings.ts +195 -0
  194. package/.forge/worktrees/pipeline-4dd8dc2d/lib/skills.ts +458 -0
  195. package/.forge/worktrees/pipeline-4dd8dc2d/lib/task-manager.ts +951 -0
  196. package/.forge/worktrees/pipeline-4dd8dc2d/lib/telegram-bot.ts +1477 -0
  197. package/.forge/worktrees/pipeline-4dd8dc2d/lib/telegram-standalone.ts +83 -0
  198. package/.forge/worktrees/pipeline-4dd8dc2d/lib/terminal-server.ts +70 -0
  199. package/.forge/worktrees/pipeline-4dd8dc2d/lib/terminal-standalone.ts +438 -0
  200. package/.forge/worktrees/pipeline-4dd8dc2d/lib/usage-scanner.ts +249 -0
  201. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/__tests__/state-machine.test.ts +388 -0
  202. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/__tests__/workspace.test.ts +311 -0
  203. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/agent-bus.ts +416 -0
  204. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/agent-worker.ts +655 -0
  205. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/backends/api-backend.ts +262 -0
  206. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/backends/cli-backend.ts +491 -0
  207. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/index.ts +84 -0
  208. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/manager.ts +136 -0
  209. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/orchestrator.ts +3415 -0
  210. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/persistence.ts +309 -0
  211. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/presets.ts +649 -0
  212. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/requests.ts +287 -0
  213. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/session-monitor.ts +240 -0
  214. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/skill-installer.ts +275 -0
  215. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/smith-memory.ts +498 -0
  216. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/types.ts +241 -0
  217. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace/watch-manager.ts +560 -0
  218. package/.forge/worktrees/pipeline-4dd8dc2d/lib/workspace-standalone.ts +978 -0
  219. package/.forge/worktrees/pipeline-4dd8dc2d/middleware.ts +51 -0
  220. package/.forge/worktrees/pipeline-4dd8dc2d/next.config.ts +26 -0
  221. package/.forge/worktrees/pipeline-4dd8dc2d/package.json +74 -0
  222. package/.forge/worktrees/pipeline-4dd8dc2d/pnpm-lock.yaml +3719 -0
  223. package/.forge/worktrees/pipeline-4dd8dc2d/pnpm-workspace.yaml +1 -0
  224. package/.forge/worktrees/pipeline-4dd8dc2d/postcss.config.mjs +7 -0
  225. package/.forge/worktrees/pipeline-4dd8dc2d/publish.sh +133 -0
  226. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/README.md +66 -0
  227. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/results/.gitignore +2 -0
  228. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/run.ts +635 -0
  229. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/01-text-utils/task.md +26 -0
  230. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/01-text-utils/validator.sh +46 -0
  231. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/02-pagination/setup.sh +19 -0
  232. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/02-pagination/task.md +48 -0
  233. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/02-pagination/validator.sh +69 -0
  234. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/03-bug-fix/setup.sh +82 -0
  235. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/03-bug-fix/task.md +30 -0
  236. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/bench/tasks/03-bug-fix/validator.sh +29 -0
  237. package/.forge/worktrees/pipeline-4dd8dc2d/scripts/verify-usage.ts +178 -0
  238. package/.forge/worktrees/pipeline-4dd8dc2d/src/config/index.ts +129 -0
  239. package/.forge/worktrees/pipeline-4dd8dc2d/src/core/db/database.ts +259 -0
  240. package/.forge/worktrees/pipeline-4dd8dc2d/src/core/memory/strategy.ts +32 -0
  241. package/.forge/worktrees/pipeline-4dd8dc2d/src/core/providers/chat.ts +65 -0
  242. package/.forge/worktrees/pipeline-4dd8dc2d/src/core/providers/registry.ts +60 -0
  243. package/.forge/worktrees/pipeline-4dd8dc2d/src/core/session/manager.ts +190 -0
  244. package/.forge/worktrees/pipeline-4dd8dc2d/src/types/index.ts +129 -0
  245. package/.forge/worktrees/pipeline-4dd8dc2d/start.sh +32 -0
  246. package/.forge/worktrees/pipeline-4dd8dc2d/templates/smith-lead.json +45 -0
  247. package/.forge/worktrees/pipeline-4dd8dc2d/tsconfig.json +42 -0
  248. package/RELEASE_NOTES.md +10 -29
  249. package/app/api/terminal-bell/route.ts +6 -2
  250. package/app/api/terminal-cwd/route.ts +7 -4
  251. package/components/CodeViewer.tsx +3 -31
  252. package/components/Dashboard.tsx +34 -20
  253. package/components/WebTerminal.tsx +36 -2
  254. package/lib/terminal-standalone.ts +19 -2
  255. package/package.json +1 -1
@@ -0,0 +1,411 @@
1
+ 'use client';
2
+
3
+ import { useState, useEffect, useCallback, useMemo } from 'react';
4
+ import {
5
+ ReactFlow,
6
+ Background,
7
+ Controls,
8
+ Handle,
9
+ Position,
10
+ useNodesState,
11
+ useEdgesState,
12
+ type Node,
13
+ type Edge,
14
+ type NodeProps,
15
+ MarkerType,
16
+ } from '@xyflow/react';
17
+ import '@xyflow/react/dist/style.css';
18
+ import YAML from 'yaml';
19
+
20
+ // ─── Color palette ────────────────────────────────────────
21
+
22
+ const AGENT_PALETTE = [
23
+ { bg: '#1e2a4a', border: '#3b5998', accent: '#6b8cce', badge: 'bg-blue-500/20 text-blue-400' },
24
+ { bg: '#2a1e4a', border: '#6b3fa0', accent: '#a07bd6', badge: 'bg-purple-500/20 text-purple-400' },
25
+ { bg: '#1e3a2a', border: '#3a8a5a', accent: '#5ebd7e', badge: 'bg-green-500/20 text-green-400' },
26
+ { bg: '#3a2a1e', border: '#a06030', accent: '#d09060', badge: 'bg-orange-500/20 text-orange-400' },
27
+ { bg: '#3a1e2a', border: '#a03060', accent: '#d06090', badge: 'bg-pink-500/20 text-pink-400' },
28
+ ];
29
+
30
+ // ─── Custom Nodes ─────────────────────────────────────────
31
+
32
+ interface PromptNodeData { label: string; prompt: string; [key: string]: unknown }
33
+ interface AgentNodeData { label: string; agentId: string; agent: string; role: string; colorIndex: number; [key: string]: unknown }
34
+ interface StopNodeData { label: string; condition: string; maxRounds: number; [key: string]: unknown }
35
+ interface ForgeNodeData { label: string; [key: string]: unknown }
36
+
37
+ function PromptNode({ data }: NodeProps<Node<PromptNodeData>>) {
38
+ return (
39
+ <div className="bg-[#1a2a1a] border-2 border-green-500/50 rounded-xl shadow-lg min-w-[220px] max-w-[300px]">
40
+ <div className="px-4 py-2 border-b border-green-500/30 flex items-center gap-2">
41
+ <span className="text-green-400 text-sm">▶</span>
42
+ <span className="text-xs font-bold text-green-300">{data.label}</span>
43
+ </div>
44
+ <div className="px-4 py-2">
45
+ <div className="text-[9px] text-gray-400 whitespace-pre-wrap line-clamp-3">{data.prompt || 'No prompt'}</div>
46
+ </div>
47
+ <Handle type="source" position={Position.Bottom} className="!bg-green-400 !w-3 !h-3" />
48
+ </div>
49
+ );
50
+ }
51
+
52
+ function AgentNode({ data }: NodeProps<Node<AgentNodeData>>) {
53
+ const palette = AGENT_PALETTE[data.colorIndex % AGENT_PALETTE.length];
54
+ return (
55
+ <div
56
+ className="rounded-xl shadow-lg min-w-[200px] max-w-[260px]"
57
+ style={{ background: palette.bg, border: `2px solid ${palette.border}` }}
58
+ >
59
+ <Handle type="target" position={Position.Top} className="!w-3 !h-3" style={{ background: palette.accent }} />
60
+
61
+ <div className="px-4 py-2 flex items-center gap-2" style={{ borderBottom: `1px solid ${palette.border}` }}>
62
+ <span className={`text-[8px] px-1.5 py-0.5 rounded font-bold ${palette.badge}`}>{data.agent}</span>
63
+ <span className="text-xs font-bold text-white">{data.agentId}</span>
64
+ </div>
65
+ <div className="px-4 py-2">
66
+ <div className="text-[9px] text-gray-400 line-clamp-3">{data.role || 'No role defined'}</div>
67
+ </div>
68
+
69
+ <Handle type="source" position={Position.Bottom} className="!w-3 !h-3" style={{ background: palette.accent }} />
70
+ </div>
71
+ );
72
+ }
73
+
74
+ function ForgeNode({ data }: NodeProps<Node<ForgeNodeData>>) {
75
+ return (
76
+ <div className="bg-[#1a1a3a] border-2 border-[#7c5bf0]/60 rounded-xl shadow-lg min-w-[180px]">
77
+ <Handle type="target" position={Position.Top} className="!bg-[#7c5bf0] !w-3 !h-3" />
78
+ <div className="px-4 py-3 flex items-center gap-2 justify-center">
79
+ <span className="text-[#7c5bf0] text-sm">⚡</span>
80
+ <span className="text-xs font-bold text-[#7c5bf0]">{data.label}</span>
81
+ </div>
82
+ <Handle type="source" position={Position.Bottom} className="!bg-[#7c5bf0] !w-3 !h-3" />
83
+ </div>
84
+ );
85
+ }
86
+
87
+ function StopNode({ data }: NodeProps<Node<StopNodeData>>) {
88
+ return (
89
+ <div className="bg-[#2a1a1a] border-2 border-red-500/50 rounded-xl shadow-lg min-w-[200px]">
90
+ <Handle type="target" position={Position.Top} className="!bg-red-400 !w-3 !h-3" />
91
+ <div className="px-4 py-2 border-b border-red-500/30 flex items-center gap-2">
92
+ <span className="text-red-400 text-sm">■</span>
93
+ <span className="text-xs font-bold text-red-300">{data.label}</span>
94
+ </div>
95
+ <div className="px-4 py-2 space-y-0.5">
96
+ {data.condition && <div className="text-[9px] text-gray-400">{data.condition}</div>}
97
+ <div className="text-[8px] text-gray-500">Max {data.maxRounds} rounds</div>
98
+ </div>
99
+ </div>
100
+ );
101
+ }
102
+
103
+ const nodeTypes = {
104
+ prompt: PromptNode,
105
+ agent: AgentNode,
106
+ forge: ForgeNode,
107
+ stop: StopNode,
108
+ };
109
+
110
+ // ─── Parse YAML → ReactFlow nodes/edges ───────────────────
111
+
112
+ interface ConvParsed {
113
+ name: string;
114
+ description?: string;
115
+ input?: Record<string, string>;
116
+ agents: { id: string; agent: string; role: string; project?: string }[];
117
+ maxRounds: number;
118
+ stopCondition?: string;
119
+ initialPrompt: string;
120
+ }
121
+
122
+ function parseConvYaml(raw: string): ConvParsed | null {
123
+ try {
124
+ const p = YAML.parse(raw);
125
+ if (!p || p.type !== 'conversation') return null;
126
+ return {
127
+ name: p.name || 'unnamed',
128
+ description: p.description,
129
+ input: p.input,
130
+ agents: p.agents || [],
131
+ maxRounds: p.max_rounds || p.maxRounds || 10,
132
+ stopCondition: p.stop_condition || p.stopCondition || '',
133
+ initialPrompt: p.initial_prompt || p.initialPrompt || '',
134
+ };
135
+ } catch { return null; }
136
+ }
137
+
138
+ function buildFlowGraph(conv: ConvParsed): { nodes: Node[]; edges: Edge[] } {
139
+ const nodes: Node[] = [];
140
+ const edges: Edge[] = [];
141
+ const agentCount = conv.agents.length;
142
+
143
+ // Layout constants
144
+ const centerX = 300;
145
+ const startY = 30;
146
+ const agentSpacing = 220;
147
+ const verticalGap = 140;
148
+
149
+ // 1. Initial Prompt node
150
+ nodes.push({
151
+ id: 'prompt',
152
+ type: 'prompt',
153
+ position: { x: centerX - 110, y: startY },
154
+ data: { label: 'Initial Prompt', prompt: conv.initialPrompt },
155
+ draggable: true,
156
+ });
157
+
158
+ // 2. Forge broker node
159
+ const forgeY = startY + verticalGap;
160
+ nodes.push({
161
+ id: 'forge',
162
+ type: 'forge',
163
+ position: { x: centerX - 90, y: forgeY },
164
+ data: { label: 'Forge Broker' },
165
+ draggable: true,
166
+ });
167
+
168
+ edges.push({
169
+ id: 'prompt-forge',
170
+ source: 'prompt',
171
+ target: 'forge',
172
+ markerEnd: { type: MarkerType.ArrowClosed, color: '#5ebd7e' },
173
+ style: { stroke: '#5ebd7e', strokeWidth: 2 },
174
+ animated: true,
175
+ label: 'start',
176
+ labelStyle: { fill: '#888', fontSize: 9 },
177
+ });
178
+
179
+ // 3. Agent nodes — spread horizontally
180
+ const agentY = forgeY + verticalGap;
181
+ const totalWidth = (agentCount - 1) * agentSpacing;
182
+ const agentStartX = centerX - totalWidth / 2;
183
+
184
+ conv.agents.forEach((a, i) => {
185
+ const x = agentStartX + i * agentSpacing - 100;
186
+ nodes.push({
187
+ id: `agent-${a.id}`,
188
+ type: 'agent',
189
+ position: { x, y: agentY },
190
+ data: { label: a.id, agentId: a.id, agent: a.agent, role: a.role, colorIndex: i },
191
+ draggable: true,
192
+ });
193
+
194
+ // Forge → Agent (send prompt)
195
+ edges.push({
196
+ id: `forge-agent-${a.id}`,
197
+ source: 'forge',
198
+ target: `agent-${a.id}`,
199
+ markerEnd: { type: MarkerType.ArrowClosed, color: AGENT_PALETTE[i % AGENT_PALETTE.length].accent },
200
+ style: { stroke: AGENT_PALETTE[i % AGENT_PALETTE.length].accent, strokeWidth: 2 },
201
+ animated: true,
202
+ label: `send R${i + 1}`,
203
+ labelStyle: { fill: '#888', fontSize: 8 },
204
+ });
205
+
206
+ // Agent → Forge (response back) — curved
207
+ edges.push({
208
+ id: `agent-${a.id}-forge`,
209
+ source: `agent-${a.id}`,
210
+ target: 'forge',
211
+ markerEnd: { type: MarkerType.ArrowClosed, color: AGENT_PALETTE[i % AGENT_PALETTE.length].accent },
212
+ style: { stroke: AGENT_PALETTE[i % AGENT_PALETTE.length].accent, strokeWidth: 1, strokeDasharray: '6 3' },
213
+ animated: true,
214
+ label: 'response',
215
+ labelStyle: { fill: '#666', fontSize: 8 },
216
+ type: 'smoothstep',
217
+ });
218
+ });
219
+
220
+ // 4. Inter-agent data flow edges (Agent A output → Agent B input via Forge)
221
+ if (agentCount >= 2) {
222
+ for (let i = 0; i < agentCount - 1; i++) {
223
+ const from = conv.agents[i];
224
+ const to = conv.agents[i + 1];
225
+ edges.push({
226
+ id: `flow-${from.id}-${to.id}`,
227
+ source: `agent-${from.id}`,
228
+ target: `agent-${to.id}`,
229
+ markerEnd: { type: MarkerType.ArrowClosed, color: '#7c5bf0' },
230
+ style: { stroke: '#7c5bf0', strokeWidth: 2, strokeDasharray: '4 4' },
231
+ animated: true,
232
+ label: 'context →',
233
+ labelStyle: { fill: '#7c5bf0', fontSize: 9, fontWeight: 600 },
234
+ type: 'smoothstep',
235
+ });
236
+ }
237
+ // Loop back: last agent → first agent (next round)
238
+ if (conv.maxRounds > 1) {
239
+ edges.push({
240
+ id: `loop-${conv.agents[agentCount - 1].id}-${conv.agents[0].id}`,
241
+ source: `agent-${conv.agents[agentCount - 1].id}`,
242
+ target: `agent-${conv.agents[0].id}`,
243
+ markerEnd: { type: MarkerType.ArrowClosed, color: '#d09060' },
244
+ style: { stroke: '#d09060', strokeWidth: 2, strokeDasharray: '8 4' },
245
+ animated: true,
246
+ label: `next round`,
247
+ labelStyle: { fill: '#d09060', fontSize: 9, fontWeight: 600 },
248
+ type: 'smoothstep',
249
+ });
250
+ }
251
+ }
252
+
253
+ // 5. Stop condition node
254
+ const stopY = agentY + verticalGap + 20;
255
+ nodes.push({
256
+ id: 'stop',
257
+ type: 'stop',
258
+ position: { x: centerX - 100, y: stopY },
259
+ data: { label: 'Stop Condition', condition: conv.stopCondition || 'max rounds reached', maxRounds: conv.maxRounds },
260
+ draggable: true,
261
+ });
262
+
263
+ // All agents → stop
264
+ conv.agents.forEach((a, i) => {
265
+ edges.push({
266
+ id: `agent-${a.id}-stop`,
267
+ source: `agent-${a.id}`,
268
+ target: 'stop',
269
+ markerEnd: { type: MarkerType.ArrowClosed, color: '#ef4444' },
270
+ style: { stroke: '#ef4444', strokeWidth: 1, opacity: 0.4 },
271
+ label: 'DONE?',
272
+ labelStyle: { fill: '#666', fontSize: 7 },
273
+ type: 'smoothstep',
274
+ });
275
+ });
276
+
277
+ return { nodes, edges };
278
+ }
279
+
280
+ // ─── Main Component ───────────────────────────────────────
281
+
282
+ export default function ConversationEditor({ initialYaml, onSave, onClose }: {
283
+ initialYaml: string;
284
+ onSave: (yaml: string) => void;
285
+ onClose: () => void;
286
+ }) {
287
+ const [yamlText, setYamlText] = useState(initialYaml);
288
+ const [error, setError] = useState('');
289
+ const [showYaml, setShowYaml] = useState(false);
290
+ const [nodes, setNodes, onNodesChange] = useNodesState<Node>([]);
291
+ const [edges, setEdges, onEdgesChange] = useEdgesState<Edge>([]);
292
+
293
+ const parsed = useMemo(() => parseConvYaml(yamlText), [yamlText]);
294
+
295
+ // Rebuild graph when YAML changes
296
+ useEffect(() => {
297
+ if (!parsed) { setNodes([]); setEdges([]); return; }
298
+ const graph = buildFlowGraph(parsed);
299
+ setNodes(graph.nodes);
300
+ setEdges(graph.edges);
301
+ }, [parsed, setNodes, setEdges]);
302
+
303
+ const validate = (text: string): string => {
304
+ try {
305
+ const p = YAML.parse(text);
306
+ if (!p.name) return 'Missing "name"';
307
+ if (p.type !== 'conversation') return 'type must be "conversation"';
308
+ if (!p.agents || !Array.isArray(p.agents) || p.agents.length < 2) return 'Need at least 2 agents';
309
+ for (const a of p.agents) {
310
+ if (!a.id) return 'Agent missing "id"';
311
+ if (!a.agent) return `Agent "${a.id}" missing "agent"`;
312
+ }
313
+ if (!p.initial_prompt && !p.initialPrompt) return 'Missing "initial_prompt"';
314
+ return '';
315
+ } catch (e: any) {
316
+ return `YAML error: ${e.message}`;
317
+ }
318
+ };
319
+
320
+ const handleSave = () => {
321
+ const err = validate(yamlText);
322
+ if (err) { setError(err); return; }
323
+ onSave(yamlText);
324
+ };
325
+
326
+ return (
327
+ <div className="flex-1 flex flex-col min-h-0" style={{ background: '#0a0a1a' }}>
328
+ {/* Top bar */}
329
+ <div className="h-10 border-b border-[#3a3a5a] flex items-center px-4 gap-3 shrink-0">
330
+ <span className="text-xs font-bold text-white">Conversation Editor</span>
331
+ {parsed && <span className="text-[10px] text-gray-400 font-mono">{parsed.name}</span>}
332
+ {parsed && (
333
+ <span className="text-[8px] px-1.5 py-0.5 rounded bg-purple-500/20 text-purple-400">
334
+ {parsed.agents.length} agents · {parsed.maxRounds} rounds
335
+ </span>
336
+ )}
337
+ <div className="flex-1" />
338
+ {error && <span className="text-[9px] text-red-400 truncate max-w-[250px]">{error}</span>}
339
+ <button
340
+ onClick={() => setShowYaml(v => !v)}
341
+ className={`text-[10px] px-2 py-0.5 rounded border ${showYaml ? 'border-[#7c5bf0] text-[#7c5bf0]' : 'border-[#3a3a5a] text-gray-400'} hover:text-white`}
342
+ >{showYaml ? 'Graph' : 'YAML'}</button>
343
+ <button onClick={handleSave} className="text-xs px-3 py-1 bg-green-600 text-white rounded hover:opacity-90">Save</button>
344
+ <button
345
+ onClick={() => { if (!yamlText || yamlText === initialYaml || confirm('Discard changes?')) onClose(); }}
346
+ className="text-xs px-3 py-1 text-gray-400 hover:text-white"
347
+ >Close</button>
348
+ </div>
349
+
350
+ {/* Content */}
351
+ {showYaml ? (
352
+ <textarea
353
+ value={yamlText}
354
+ onChange={e => { setYamlText(e.target.value); setError(''); }}
355
+ className="flex-1 p-4 text-xs font-mono bg-[#0a0a1a] text-gray-300 resize-none focus:outline-none leading-relaxed"
356
+ spellCheck={false}
357
+ />
358
+ ) : (
359
+ <div className="flex-1 relative">
360
+ {parsed ? (
361
+ <ReactFlow
362
+ nodes={nodes}
363
+ edges={edges}
364
+ onNodesChange={onNodesChange}
365
+ onEdgesChange={onEdgesChange}
366
+ nodeTypes={nodeTypes}
367
+ fitView
368
+ fitViewOptions={{ padding: 0.3 }}
369
+ nodesConnectable={false}
370
+ style={{ background: '#0a0a1a' }}
371
+ minZoom={0.3}
372
+ maxZoom={2}
373
+ >
374
+ <Background color="#1a1a3a" gap={20} />
375
+ <Controls />
376
+ </ReactFlow>
377
+ ) : (
378
+ <div className="flex-1 flex items-center justify-center h-full">
379
+ <div className="text-center space-y-2">
380
+ <div className="text-sm text-gray-500">Invalid or empty conversation YAML</div>
381
+ <button
382
+ onClick={() => setShowYaml(true)}
383
+ className="text-xs px-3 py-1 bg-[#7c5bf0] text-white rounded hover:opacity-90"
384
+ >Edit YAML</button>
385
+ </div>
386
+ </div>
387
+ )}
388
+
389
+ {/* Floating legend */}
390
+ {parsed && (
391
+ <div className="absolute bottom-4 left-4 bg-[#0a0a1a]/90 border border-[#3a3a5a] rounded-lg p-3 space-y-1.5 backdrop-blur-sm">
392
+ <div className="text-[8px] font-bold text-gray-400 uppercase">Legend</div>
393
+ <div className="flex items-center gap-2 text-[8px] text-gray-400">
394
+ <span className="w-3 h-0.5 bg-green-500 inline-block" /> Initial prompt
395
+ </div>
396
+ <div className="flex items-center gap-2 text-[8px] text-gray-400">
397
+ <span className="w-3 h-0.5 bg-[#7c5bf0] inline-block" style={{ borderBottom: '2px dashed #7c5bf0' }} /> Context flow
398
+ </div>
399
+ <div className="flex items-center gap-2 text-[8px] text-gray-400">
400
+ <span className="w-3 h-0.5 bg-orange-500 inline-block" style={{ borderBottom: '2px dashed #d09060' }} /> Next round loop
401
+ </div>
402
+ <div className="flex items-center gap-2 text-[8px] text-gray-400">
403
+ <span className="w-3 h-0.5 bg-red-500/40 inline-block" /> Stop check
404
+ </div>
405
+ </div>
406
+ )}
407
+ </div>
408
+ )}
409
+ </div>
410
+ );
411
+ }