@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,5 @@
1
+ #!/bin/bash
2
+ # dev-test.sh — Start Forge test instance (port 4000, data ~/.forge-test)
3
+
4
+ mkdir -p ~/.forge-test
5
+ PORT=4000 TERMINAL_PORT=4001 FORGE_DATA_DIR=~/.forge-test FORGE_EXTERNAL_SERVICES=0 npx next dev --turbopack -p 4000
@@ -0,0 +1,144 @@
1
+ # 本地部署 — Mac 上运行,手机监控
2
+
3
+ ---
4
+
5
+ ## 1. 手机访问本地 Mac 的方案
6
+
7
+ 核心问题:你的 Mac 在局域网内,手机怎么访问?
8
+
9
+ ### 方案对比
10
+
11
+ | 方案 | 原理 | 优点 | 缺点 |
12
+ |------|----------------------------------------|------|------|
13
+ | **同一 WiFi 局域网** | Mac 开 Web 服务,手机直接访问 `192.168.x.x:8403` | 零配置、零成本 | 只能在家用 |
14
+ | **Tailscale** | 虚拟局域网,任何网络下设备互通 | 免费、安全、无需公网 IP | 需要装客户端 |
15
+ | **Cloudflare Tunnel** | 免费内网穿透,给你一个公网域名 | 免费、HTTPS、不开端口 | 依赖 Cloudflare |
16
+ | **ngrok** | 临时隧道 | 一行命令搞定 | 免费版地址每次变 |
17
+ | **frp** | 自建内网穿透 | 完全自控 | 需要一台有公网 IP 的服务器 |
18
+
19
+ ### 推荐组合:Tailscale(推荐) + 局域网(备选)
20
+
21
+ ```
22
+ ┌─────────────────────────────────┐
23
+ │ 你的 Mac │
24
+ │ │
25
+ │ my-workflow server │
26
+ │ ├── REST API :8403 │
27
+ │ ├── WebSocket :8403/ws │
28
+ │ └── Dashboard :8403 │
29
+ │ │
30
+ │ Tailscale IP: 100.x.x.x │
31
+ │ 局域网 IP: 192.168.x.x │
32
+ └──────────┬──────────────────────┘
33
+
34
+ │ Tailscale 虚拟网络(加密)
35
+
36
+ ┌──────────┴──────────────────────┐
37
+ │ 你的手机 │
38
+ │ │
39
+ │ 浏览器 → 100.x.x.x:8403 │ ← 任何网络下都能访问
40
+ │ 或 Safari → 192.168.x.x:8403 │ ← 同一 WiFi 下
41
+ │ │
42
+ └─────────────────────────────────┘
43
+ ```
44
+
45
+ **Tailscale 的好处:**
46
+ - 免费(个人用户 100 台设备)
47
+ - Mac 和手机都装一个客户端就完了
48
+ - 在公司、咖啡厅、4G 网络下都能访问你家里的 Mac
49
+ - 加密传输,不暴露任何端口到公网
50
+ - 以后迁移到云服务器,只需要在服务器上装 Tailscale,手机地址改一下就行
51
+
52
+ ### 快速开始
53
+
54
+ ```bash
55
+ # 1. Mac 安装 Tailscale
56
+ brew install tailscale
57
+ # 或从 Mac App Store 安装
58
+
59
+ # 2. 登录
60
+ tailscale up
61
+
62
+ # 3. 查看你的 Tailscale IP
63
+ tailscale ip -4
64
+ # 输出: 100.64.x.x
65
+
66
+ # 4. 手机安装 Tailscale App,同一账号登录
67
+
68
+ # 5. 启动 my-workflow
69
+ mw server start
70
+ # → Dashboard: http://100.64.x.x:8403
71
+
72
+ # 手机浏览器打开这个地址即可
73
+ ```
74
+
75
+ ### Mac 不休眠配置
76
+
77
+ 如果你想离开电脑后 agent 继续跑:
78
+
79
+ ```bash
80
+ # 方法 1: 系统设置 → 电池 → 防止自动休眠(接电源时)
81
+
82
+ # 方法 2: 命令行临时阻止休眠
83
+ caffeinate -d -i -s &
84
+
85
+ # 方法 3: 用 launchd 注册为系统服务(推荐)
86
+ # 即使合盖,接着电源也不休眠
87
+ # 见下方 "注册为系统服务" 部分
88
+ ```
89
+
90
+ ### 注册为系统服务(开机自启 + 崩溃自重启)
91
+
92
+ ```xml
93
+ <!-- ~/Library/LaunchAgents/com.zliu.my-workflow.plist -->
94
+ <?xml version="1.0" encoding="UTF-8"?>
95
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
96
+ "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
97
+ <plist version="1.0">
98
+ <dict>
99
+ <key>Label</key>
100
+ <string>com.zliu.my-workflow</string>
101
+ <key>ProgramArguments</key>
102
+ <array>
103
+ <string>/usr/local/bin/mw</string>
104
+ <string>server</string>
105
+ <string>start</string>
106
+ <string>--foreground</string>
107
+ </array>
108
+ <key>RunAtLoad</key>
109
+ <true/>
110
+ <key>KeepAlive</key>
111
+ <true/>
112
+ <key>StandardOutPath</key>
113
+ <string>/tmp/my-workflow.log</string>
114
+ <key>StandardErrorPath</key>
115
+ <string>/tmp/my-workflow.err</string>
116
+ </dict>
117
+ </plist>
118
+ ```
119
+
120
+ ```bash
121
+ # 注册服务
122
+ launchctl load ~/Library/LaunchAgents/com.zliu.my-workflow.plist
123
+
124
+ # 查看状态
125
+ launchctl list | grep my-workflow
126
+ ```
127
+
128
+ ---
129
+
130
+ ## 2. 未来迁移到云端
131
+
132
+ 本地跑通后,迁移非常简单:
133
+
134
+ ```
135
+ 本地开发阶段:
136
+ 手机 → Tailscale → Mac:8403
137
+
138
+ 迁移到云端:
139
+ 手机 → Tailscale → VPS:8403 (只是 IP 变了)
140
+
141
+ 手机 → https://workflow.yourdomain.com (Cloudflare Tunnel)
142
+ ```
143
+
144
+ 不需要改任何代码,只是服务跑在不同的机器上。
@@ -0,0 +1,330 @@
1
+ # Multi-Agent Workflow (Roadmap)
2
+
3
+ > 让多个 Claude Code 实例协作完成复杂任务,相互传递信息和中间产物。
4
+
5
+ ## 动机
6
+
7
+ 当前的 Flow 系统是线性的:每个 step 独立运行一个 Claude Code,step 之间没有数据传递。真实的复杂工程场景需要:
8
+
9
+ - **Agent A** 做架构设计 → 把设计文档传给 **Agent B** 写代码 → **Agent C** review + 测试
10
+ - 多个 Agent 并行工作在不同模块,通过共享 artifact 协调
11
+ - Agent 完成后触发下游 Agent,形成 DAG(有向无环图)执行流
12
+
13
+ ## 设计分析
14
+
15
+ ### 核心概念
16
+
17
+ ```
18
+ Pipeline (一次执行实例)
19
+ └─ Workflow (YAML 定义)
20
+ └─ Node (一个 Agent 节点)
21
+ ├─ inputs: 从上游节点或用户获取
22
+ ├─ action: 运行 Claude Code prompt
23
+ ├─ outputs: 产出 artifact(文本、文件、diff)
24
+ └─ routes: 根据条件决定下游节点
25
+ ```
26
+
27
+ **与现有系统的关系:**
28
+ - `Node` 对应现有的 `Task`(一次 Claude Code 执行)
29
+ - `Workflow` 扩展现有的 `Flow`(从线性 steps → DAG nodes)
30
+ - `Pipeline` 是新增的,表示一次 workflow 运行实例
31
+
32
+ ### YAML 定义格式
33
+
34
+ ```yaml
35
+ name: feature-implementation
36
+ description: "从需求到 PR 的完整流程"
37
+
38
+ # 全局变量,所有节点可用
39
+ vars:
40
+ project: my-app
41
+
42
+ nodes:
43
+ architect:
44
+ project: "{{vars.project}}"
45
+ prompt: |
46
+ 分析以下需求并输出技术方案文档(markdown),包括:
47
+ 1. 架构设计
48
+ 2. 需要修改的文件列表
49
+ 3. 接口定义
50
+ 需求:{{input.requirement}}
51
+ outputs:
52
+ - name: design_doc
53
+ extract: result # 从 Claude 的 result 中提取
54
+
55
+ implement:
56
+ project: "{{vars.project}}"
57
+ depends_on: [architect]
58
+ prompt: |
59
+ 按照以下技术方案实现代码:
60
+ {{nodes.architect.outputs.design_doc}}
61
+ outputs:
62
+ - name: diff
63
+ extract: git_diff
64
+
65
+ review:
66
+ project: "{{vars.project}}"
67
+ depends_on: [implement]
68
+ prompt: |
69
+ Review 以下代码改动,检查:
70
+ 1. 是否符合设计方案
71
+ 2. 是否有 bug 或安全问题
72
+ 3. 测试覆盖
73
+
74
+ 设计方案:
75
+ {{nodes.architect.outputs.design_doc}}
76
+
77
+ 代码改动:
78
+ {{nodes.implement.outputs.diff}}
79
+ outputs:
80
+ - name: review_result
81
+ extract: result
82
+ routes:
83
+ - condition: "{{outputs.review_result contains 'LGTM'}}"
84
+ next: create_pr
85
+ - condition: default
86
+ next: fix
87
+
88
+ fix:
89
+ project: "{{vars.project}}"
90
+ depends_on: [review]
91
+ prompt: |
92
+ 根据 Review 意见修复代码:
93
+ {{nodes.review.outputs.review_result}}
94
+ routes:
95
+ - next: review # 循环回 review(需要设定最大循环次数)
96
+ max_iterations: 3
97
+
98
+ create_pr:
99
+ project: "{{vars.project}}"
100
+ depends_on: [review]
101
+ prompt: |
102
+ 为当前改动创建 Pull Request,标题和描述基于:
103
+ {{nodes.architect.outputs.design_doc}}
104
+ ```
105
+
106
+ ### 并行执行
107
+
108
+ ```yaml
109
+ nodes:
110
+ frontend:
111
+ project: my-app-web
112
+ prompt: "实现前端登录页面..."
113
+
114
+ backend:
115
+ project: my-app-api
116
+ prompt: "实现后端 auth API..."
117
+
118
+ integration:
119
+ depends_on: [frontend, backend] # 等两个都完成
120
+ project: my-app-web
121
+ prompt: |
122
+ 前端和后端都已完成,进行集成:
123
+ 前端改动:{{nodes.frontend.outputs.diff}}
124
+ 后端改动:{{nodes.backend.outputs.diff}}
125
+ ```
126
+
127
+ ### 数据传递机制
128
+
129
+ 节点之间传递信息有三种方式:
130
+
131
+ | 方式 | 说明 | 适用场景 |
132
+ |------|------|----------|
133
+ | **Output Extraction** | 从 Claude 的 result/diff 中自动提取 | 文本结果、设计文档 |
134
+ | **File Artifact** | Claude 生成的文件保存到共享目录 | 代码文件、配置 |
135
+ | **Git State** | 通过 git branch/commit 传递代码改动 | 同一 repo 的代码接力 |
136
+
137
+ ```yaml
138
+ nodes:
139
+ generate_config:
140
+ prompt: "生成 API schema 文件到 shared/api-schema.json"
141
+ outputs:
142
+ - name: schema_file
143
+ type: file
144
+ path: "shared/api-schema.json"
145
+
146
+ use_config:
147
+ depends_on: [generate_config]
148
+ prompt: |
149
+ 根据这个 schema 生成客户端代码:
150
+ {{read_file(nodes.generate_config.outputs.schema_file)}}
151
+ ```
152
+
153
+ ### 实现方案(基于现有架构)
154
+
155
+ #### Phase 1:扩展 Flow → DAG
156
+
157
+ **改动点:**
158
+
159
+ 1. **`src/types/index.ts`** — 新增类型:
160
+ ```typescript
161
+ export interface WorkflowNode {
162
+ id: string;
163
+ project: string;
164
+ prompt: string; // 支持模板语法 {{...}}
165
+ dependsOn?: string[]; // 上游节点 ID
166
+ outputs?: NodeOutput[];
167
+ routes?: NodeRoute[];
168
+ maxIterations?: number; // 防止无限循环
169
+ }
170
+
171
+ export interface NodeOutput {
172
+ name: string;
173
+ extract: 'result' | 'git_diff' | 'file';
174
+ path?: string; // for file type
175
+ }
176
+
177
+ export interface NodeRoute {
178
+ condition: string; // 模板表达式
179
+ next: string; // 目标节点 ID
180
+ }
181
+
182
+ export interface Workflow {
183
+ name: string;
184
+ description?: string;
185
+ vars?: Record<string, string>;
186
+ nodes: Record<string, WorkflowNode>;
187
+ input?: Record<string, string>; // 启动时需要的输入
188
+ }
189
+
190
+ export interface Pipeline {
191
+ id: string;
192
+ workflowName: string;
193
+ status: 'running' | 'done' | 'failed' | 'cancelled';
194
+ input: Record<string, any>;
195
+ nodeStates: Record<string, PipelineNodeState>;
196
+ createdAt: string;
197
+ completedAt?: string;
198
+ }
199
+
200
+ export interface PipelineNodeState {
201
+ status: TaskStatus;
202
+ taskId?: string; // 关联的 Task ID
203
+ outputs: Record<string, any>;
204
+ iterations: number;
205
+ startedAt?: string;
206
+ completedAt?: string;
207
+ }
208
+ ```
209
+
210
+ 2. **`lib/pipeline-engine.ts`** — 新增 Pipeline 执行引擎:
211
+ - `startPipeline(workflowName, input)` → 创建 Pipeline,解析 DAG,启动无依赖节点
212
+ - `onTaskComplete(taskId)` → 检查下游节点是否 ready,触发执行
213
+ - `resolveTemplate(template, context)` → 解析 `{{...}}` 模板
214
+ - `evaluateRoute(routes, outputs)` → 条件路由
215
+ - `extractOutput(task, outputDef)` → 从 Task 结果中提取 output
216
+ - 状态持久化到 SQLite `pipelines` 表
217
+
218
+ 3. **`lib/task-manager.ts`** — 小改动:
219
+ - `createTask` 增加 `pipelineId` 和 `nodeId` 字段
220
+ - Task 完成时触发 `pipeline-engine.onTaskComplete`
221
+
222
+ 4. **`lib/flows.ts`** — 兼容升级:
223
+ - 旧格式(线性 steps)自动转换为 DAG(每个 step depends_on 上一个)
224
+ - 新格式支持 `nodes` 字段
225
+
226
+ 5. **UI 改动:**
227
+ - Pipeline 视图:DAG 可视化,显示节点状态和数据流
228
+ - 节点详情:点击查看 prompt(渲染后)、outputs、关联 task
229
+ - 启动 workflow 时可填入 input 参数
230
+
231
+ 6. **API 路由:**
232
+ - `POST /api/pipelines` — 启动 pipeline
233
+ - `GET /api/pipelines` — 列表
234
+ - `GET /api/pipelines/[id]` — 详情(含 DAG 状态)
235
+ - `POST /api/pipelines/[id]/cancel` — 取消
236
+
237
+ 7. **CLI:**
238
+ - `forge run <workflow> --input requirement="实现用户注册功能"`
239
+ - `forge pipeline <id>` — 查看 pipeline 状态
240
+ - `forge pipelines` — 列表
241
+
242
+ #### Phase 2:实时协作(高级)
243
+
244
+ 更高级的场景——Agent 不是等上游完全结束才开始,而是通过消息通道实时交互:
245
+
246
+ ```yaml
247
+ nodes:
248
+ coder:
249
+ prompt: "实现功能..."
250
+ channels:
251
+ - name: questions
252
+ direction: out
253
+ target: architect
254
+
255
+ architect:
256
+ prompt: "你是架构师,回答 coder 的问题..."
257
+ channels:
258
+ - name: questions
259
+ direction: in
260
+ source: coder
261
+ ```
262
+
263
+ 这需要:
264
+ - 两个 Claude Code 进程同时运行
265
+ - 中间消息总线(可基于 SQLite + polling 或 WebSocket)
266
+ - 一个 Agent 的 output 实时注入另一个 Agent 的 stdin(通过 `--resume` + append message)
267
+
268
+ **复杂度高,建议 Phase 1 稳定后再考虑。**
269
+
270
+ ### 执行流程示意
271
+
272
+ ```
273
+ User: forge run feature-implementation --input requirement="Add OAuth login"
274
+
275
+
276
+ Pipeline created (id: pip-abc123)
277
+
278
+ ▼ (resolve input template)
279
+ [architect] ──prompt──▶ Claude Code ──result──▶ design_doc
280
+
281
+ ▼ (depends_on satisfied)
282
+ [implement] ──prompt(with design_doc)──▶ Claude Code ──git_diff──▶ diff
283
+
284
+
285
+ [review] ──prompt(with design_doc + diff)──▶ Claude Code ──result──▶ review_result
286
+
287
+ ├── "LGTM" ──▶ [create_pr]
288
+
289
+ └── else ──▶ [fix] ──▶ [review] (loop, max 3)
290
+ ```
291
+
292
+ ### SQLite Schema
293
+
294
+ ```sql
295
+ CREATE TABLE pipelines (
296
+ id TEXT PRIMARY KEY,
297
+ workflow_name TEXT NOT NULL,
298
+ status TEXT NOT NULL DEFAULT 'running',
299
+ input TEXT, -- JSON
300
+ node_states TEXT, -- JSON: Record<nodeId, PipelineNodeState>
301
+ created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
302
+ completed_at DATETIME
303
+ );
304
+
305
+ -- tasks 表增加:
306
+ ALTER TABLE tasks ADD COLUMN pipeline_id TEXT;
307
+ ALTER TABLE tasks ADD COLUMN node_id TEXT;
308
+ ```
309
+
310
+ ### 工作量评估
311
+
312
+ | 模块 | 工作量 | 说明 |
313
+ |------|--------|------|
314
+ | 类型定义 | 小 | 新增 Workflow/Pipeline/Node 类型 |
315
+ | YAML 解析 | 小 | 扩展现有 flows.ts |
316
+ | 模板引擎 | 中 | `{{...}}` 解析 + output 引用 |
317
+ | Pipeline 引擎 | 大 | DAG 调度、状态管理、条件路由 |
318
+ | Task Manager 集成 | 小 | 增加 pipeline/node 关联 |
319
+ | Pipeline UI | 大 | DAG 可视化、实时状态 |
320
+ | CLI 扩展 | 小 | 新增 pipeline 命令 |
321
+ | **总计** | **~3-5 天** | Phase 1 完整可用 |
322
+
323
+ ### 关键设计决策
324
+
325
+ 1. **模板语法**:用 `{{...}}` Mustache 风格,简单够用,不引入 Handlebars 依赖
326
+ 2. **Output 提取**:默认取 Claude 的 `result` 字段;`git_diff` 取 task 的 diff;`file` 读指定路径
327
+ 3. **循环保护**:`max_iterations` 默认 3,防止 review → fix 无限循环
328
+ 4. **错误处理**:单节点失败 → 标记该节点 failed → 下游节点 skip → Pipeline 标记 failed
329
+ 5. **并发**:同 project 的节点串行(现有 `runningProjects` 锁),不同 project 的节点并行
330
+ 6. **向后兼容**:现有线性 Flow YAML 无需修改,自动适配
@@ -0,0 +1,106 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="1050.000000pt" height="1102.000000pt" viewBox="0 0 1050.000000 1102.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <g transform="translate(0.000000,1102.000000) scale(0.100000,-0.100000)"
9
+ fill="#000000" stroke="none">
10
+ <path d="M0 5510 l0 -5510 5250 0 5250 0 0 5510 0 5510 -5250 0 -5250 0 0
11
+ -5510z m2410 3369 c37 -18 164 -120 395 -319 584 -503 1025 -883 1101 -946 39
12
+ -34 111 -96 159 -138 52 -45 96 -76 109 -76 12 0 233 45 492 99 258 55 503
13
+ 106 544 115 67 13 83 14 137 1 74 -17 147 -33 398 -85 105 -21 233 -48 285
14
+ -60 237 -52 327 -70 350 -70 25 0 127 84 655 541 61 52 162 139 225 193 63 54
15
+ 171 147 240 207 475 410 597 512 643 536 74 38 198 44 279 13 66 -24 145 -92
16
+ 181 -153 60 -101 57 -27 57 -1656 l0 -1492 54 -217 c57 -224 150 -590 185
17
+ -722 10 -41 38 -147 62 -235 23 -88 47 -185 54 -215 7 -30 16 -67 20 -82 6
18
+ -25 5 -28 -19 -28 -15 0 -29 6 -32 14 -4 11 -13 12 -35 6 -16 -5 -68 -12 -114
19
+ -15 l-84 -7 -6 29 c-4 15 -9 35 -12 43 -2 8 -29 110 -58 225 -30 116 -75 289
20
+ -100 385 -25 96 -81 316 -125 488 l-80 313 0 1495 c0 1664 5 1554 -65 1554
21
+ -29 0 -49 -13 -123 -77 -88 -77 -479 -412 -617 -528 -40 -33 -213 -181 -385
22
+ -330 -173 -148 -399 -343 -504 -432 -121 -105 -197 -163 -211 -163 -21 0 -115
23
+ 19 -525 106 -204 43 -302 64 -500 105 l-155 32 -115 -23 c-63 -12 -155 -31
24
+ -205 -42 -49 -11 -133 -28 -185 -39 -52 -11 -124 -27 -160 -34 -259 -56 -505
25
+ -105 -526 -105 -17 0 -66 36 -162 119 -341 296 -862 743 -1486 1275 -166 142
26
+ -194 156 -230 120 -9 -8 -17 -16 -18 -17 -2 -1 -5 -688 -8 -1527 l-5 -1525
27
+ -53 -195 c-28 -107 -79 -298 -111 -425 -33 -126 -72 -275 -86 -330 -15 -55
28
+ -46 -177 -70 -271 -64 -248 -50 -226 -142 -219 -129 10 -144 11 -149 3 -8 -13
29
+ -54 -9 -54 5 0 6 5 28 11 47 6 19 17 60 24 90 11 50 115 454 165 645 12 44 56
30
+ 213 98 375 l77 295 5 1540 5 1540 33 67 c40 81 117 155 193 186 78 31 202 27
31
+ 279 -9z m560 -1324 c0 -85 0 -85 -26 -85 -36 0 -81 -29 -94 -59 -6 -14 -14
32
+ -112 -19 -217 -9 -212 -21 -257 -83 -309 l-30 -25 40 -44 c58 -63 73 -120 78
33
+ -301 2 -82 4 -160 4 -173 0 -37 52 -82 94 -82 l36 0 0 -85 0 -85 -47 0 c-107
34
+ 1 -190 39 -237 111 -42 63 -56 137 -56 294 0 77 -3 157 -6 177 -9 50 -43 85
35
+ -98 100 l-46 12 0 78 c0 77 0 78 28 84 111 24 115 34 123 268 6 204 13 236 58
36
+ 307 45 72 133 113 254 118 l27 1 0 -85z m4810 42 c117 -58 150 -147 150 -406
37
+ 0 -192 17 -229 113 -246 l38 -7 -3 -76 -3 -75 -49 -17 c-84 -28 -89 -41 -97
38
+ -254 -4 -101 -10 -199 -14 -218 -17 -79 -79 -154 -153 -185 -19 -8 -66 -15
39
+ -106 -16 l-71 -2 0 80 0 79 45 8 c81 13 86 27 93 239 7 208 18 258 73 316 19
40
+ 20 34 37 34 38 0 1 -16 19 -35 40 -52 57 -65 109 -66 254 0 196 -10 259 -43
41
+ 287 -15 13 -45 27 -67 30 l-39 7 0 77 c0 54 4 80 13 83 32 12 126 -6 187 -36z
42
+ m-3638 -2314 c233 -236 490 -501 596 -615 72 -77 72 -77 72 -133 l0 -57 -177
43
+ -181 c-455 -467 -688 -697 -710 -697 -23 0 -198 181 -198 206 0 7 159 173 354
44
+ 369 195 195 353 357 350 360 -17 18 -186 194 -424 438 -154 159 -282 293 -284
45
+ 299 -3 10 197 218 210 218 3 0 98 -93 211 -207z m2473 -1633 l0 -145 -95 -6
46
+ c-121 -9 -1077 -8 -1320 0 l-185 6 -3 134 c-2 90 1 138 9 147 10 12 136 14
47
+ 803 12 l791 -3 0 -145z m-4912 -141 c21 -35 42 -73 48 -84 22 -47 71 -129 86
48
+ -143 14 -14 16 -14 25 1 5 9 14 17 20 17 7 0 6 -5 -2 -15 -6 -8 -9 -19 -5 -26
49
+ 4 -6 2 -15 -5 -19 -9 -5 -5 -20 13 -56 13 -27 28 -59 32 -72 4 -13 25 -55 47
50
+ -93 38 -65 44 -106 16 -97 -11 4 -40 53 -160 278 -66 123 -173 337 -188 374
51
+ -10 28 -10 29 12 14 13 -9 40 -44 61 -79z m7221 54 c-4 -16 -28 -68 -54 -118
52
+ -26 -49 -80 -153 -120 -230 -40 -77 -90 -170 -112 -207 -21 -36 -38 -71 -38
53
+ -77 0 -13 -27 -15 -34 -2 -3 5 8 41 24 79 17 39 30 78 30 87 0 9 5 13 11 9 8
54
+ -4 9 1 4 17 -4 13 -4 21 0 17 5 -4 14 0 21 10 9 13 10 20 1 31 -10 12 -9 14 4
55
+ 9 17 -7 40 30 132 212 74 146 149 240 131 163z m-284 -35 c-7 -18 -33 -75 -57
56
+ -126 -24 -51 -43 -99 -43 -106 0 -7 -7 -19 -15 -26 -9 -7 -13 -20 -10 -30 3
57
+ -10 -5 -26 -21 -41 -14 -13 -46 -59 -71 -101 -30 -53 -49 -75 -59 -71 -8 3
58
+ -14 9 -14 13 0 28 233 461 252 468 4 2 8 8 8 13 0 11 33 47 39 43 2 -2 -2 -18
59
+ -9 -36z m-6543 -260 c99 -190 119 -235 106 -241 -18 -11 -8 -24 -87 113 -87
60
+ 148 -108 179 -124 180 -14 0 -36 49 -27 58 3 4 8 -4 12 -16 3 -12 10 -22 15
61
+ -22 5 0 0 17 -11 38 -28 52 -51 111 -51 132 0 10 -5 20 -12 22 -7 3 -8 9 -3
62
+ 18 15 24 52 -34 182 -282z m-231 54 c-18 -18 -29 -12 -20 11 3 9 12 13 21 10
63
+ 13 -5 13 -8 -1 -21z m6779 -162 c3 -5 1 -10 -4 -10 -6 0 -11 5 -11 10 0 6 2
64
+ 10 4 10 3 0 8 -4 11 -10z m-751 -568 c-22 -19 -66 -52 -99 -75 -33 -22 -99
65
+ -69 -146 -103 -48 -35 -89 -64 -93 -64 -3 0 -14 -7 -23 -16 -17 -14 -69 -51
66
+ -248 -174 -36 -25 -107 -74 -158 -110 -51 -36 -100 -69 -109 -75 -8 -5 -43
67
+ -30 -78 -55 -34 -25 -75 -53 -92 -62 -17 -9 -34 -21 -37 -25 -15 -20 -72 -53
68
+ -82 -47 -12 7 48 63 69 64 6 0 12 4 12 8 0 5 33 31 72 58 40 27 77 53 83 57
69
+ 16 12 252 181 414 295 73 52 180 126 205 142 27 17 67 46 204 147 62 45 106
70
+ 71 121 70 22 -1 21 -4 -15 -35z m-5149 -18 c5 -5 30 -23 54 -39 25 -15 50 -32
71
+ 55 -37 6 -5 65 -47 131 -93 66 -46 125 -88 130 -92 6 -4 30 -21 55 -37 25 -16
72
+ 72 -50 105 -75 58 -45 100 -75 134 -96 9 -5 32 -22 51 -37 20 -14 71 -50 115
73
+ -79 44 -29 97 -71 119 -93 21 -21 36 -34 32 -28 -12 20 10 13 36 -10 14 -13
74
+ 35 -30 47 -38 11 -8 21 -20 21 -28 0 -12 -27 2 -75 40 -5 5 -53 37 -105 71
75
+ -134 89 -261 177 -285 197 -11 10 -74 54 -140 99 -66 45 -147 102 -180 126
76
+ -70 52 -161 116 -183 130 -12 7 -140 100 -181 131 -1 1 0 7 3 13 7 11 39 -2
77
+ 61 -25z m5388 -81 c-5 -12 -3 -14 8 -8 68 39 -178 -142 -435 -320 -154 -106
78
+ -291 -203 -384 -270 -53 -39 -135 -96 -182 -127 -102 -69 -351 -246 -383 -273
79
+ -52 -44 -168 -104 -167 -88 1 11 75 67 195 148 96 65 153 106 288 206 34 25
80
+ 107 76 162 114 93 63 384 273 467 337 20 15 39 28 43 28 3 0 45 29 93 64 78
81
+ 57 294 206 299 206 1 0 -1 -7 -4 -17z m-5615 -47 c71 -47 139 -94 159 -111 6
82
+ -5 49 -36 95 -68 46 -32 162 -114 258 -183 96 -69 231 -164 300 -211 122 -85
83
+ 260 -185 290 -210 8 -7 24 -19 35 -27 11 -8 17 -17 13 -21 -7 -8 -42 10 -84
84
+ 42 -16 12 -76 54 -134 93 -58 39 -143 98 -190 131 -47 33 -96 68 -110 77 -26
85
+ 17 -177 125 -195 139 -5 4 -30 21 -55 38 -25 16 -95 66 -156 111 -61 45 -122
86
+ 87 -135 94 -25 14 -113 79 -140 105 -9 8 -20 15 -26 15 -5 0 -10 7 -10 15 0
87
+ 23 13 19 85 -29z m1347 -667 c11 -17 -1 -21 -15 -4 -8 9 -8 15 -2 15 6 0 14
88
+ -5 17 -11z m2850 1 c10 -16 -258 -206 -276 -195 -15 10 0 25 19 18 9 -3 14 -3
89
+ 10 2 -9 9 26 42 53 50 11 4 19 11 19 17 0 6 3 8 7 5 3 -4 16 5 29 18 13 14 27
90
+ 25 31 26 4 0 28 15 53 34 53 40 47 37 55 25z m-2795 -49 c-1 -15 -2 -15 -13 0
91
+ -7 9 -19 14 -27 12 -13 -4 -13 -3 -1 5 19 13 41 4 41 -17z m178 -117 c34 -27
92
+ 37 -39 8 -28 -9 3 -14 10 -11 14 3 4 -8 10 -23 13 -15 4 -40 19 -57 34 -16 15
93
+ -43 35 -58 43 -16 8 -24 16 -18 18 6 2 8 8 5 14 -7 11 99 -63 154 -108z m-190
94
+ -152 c62 -43 76 -62 47 -62 -8 0 -15 3 -15 8 0 4 -15 13 -32 21 -18 8 -35 17
95
+ -38 20 -3 3 -27 22 -55 40 -27 19 -52 37 -55 41 -3 3 -24 18 -47 33 -25 18
96
+ -40 34 -36 43 5 13 36 -6 231 -144z m452 28 c0 -5 -15 -10 -34 -10 -19 0 -38
97
+ 5 -41 10 -4 6 10 10 34 10 23 0 41 -4 41 -10z m685 5 c-25 -8 -675 -12 -675
98
+ -4 0 5 141 9 343 8 188 0 338 -2 332 -4z m705 -5 c-96 -3 -249 -3 -340 0 -113
99
+ 4 -58 6 175 6 246 0 291 -2 165 -6z m263 3 c-7 -2 -21 -2 -30 0 -10 3 -4 5 12
100
+ 5 17 0 24 -2 18 -5z m165 0 c-21 -2 -57 -2 -80 0 -24 2 -7 4 37 4 44 0 63 -2
101
+ 43 -4z m401 -119 c-6 -7 -15 -12 -19 -9 -5 3 -11 1 -15 -5 -4 -6 -11 -7 -17
102
+ -4 -5 4 2 14 18 25 30 20 52 15 33 -7z m-134 -84 c3 -5 -3 -10 -15 -10 -12 0
103
+ -18 5 -15 10 3 6 10 10 15 10 5 0 12 -4 15 -10z m-71 -39 c3 -5 -11 -7 -32 -4
104
+ -49 7 -54 13 -9 13 20 0 38 -4 41 -9z"/>
105
+ </g>
106
+ </svg>
@@ -0,0 +1,52 @@
1
+ import { useState, useRef, useCallback } from 'react';
2
+
3
+ interface UseSidebarResizeOptions {
4
+ defaultWidth?: number;
5
+ minWidth?: number;
6
+ maxWidth?: number;
7
+ }
8
+
9
+ /**
10
+ * Provides drag-to-resize behaviour for a vertical split panel sidebar.
11
+ *
12
+ * Usage:
13
+ * const { sidebarWidth, onSidebarDragStart } = useSidebarResize({ defaultWidth: 224 });
14
+ *
15
+ * <aside style={{ width: sidebarWidth }} className="flex flex-col shrink-0 overflow-hidden">…</aside>
16
+ * <div onMouseDown={onSidebarDragStart} className="w-1 cursor-col-resize shrink-0 bg-[var(--border)] hover:bg-[var(--accent)]/50" />
17
+ * <main className="flex-1 min-w-0">…</main>
18
+ */
19
+ export function useSidebarResize({
20
+ defaultWidth = 224,
21
+ minWidth = 120,
22
+ maxWidth = 480,
23
+ }: UseSidebarResizeOptions = {}) {
24
+ const [sidebarWidth, setSidebarWidth] = useState(defaultWidth);
25
+ // Track the in-progress drag without causing re-renders in the move handler
26
+ const dragRef = useRef<{ startX: number; startW: number } | null>(null);
27
+ // Keep a mutable copy so the stable onSidebarDragStart callback always reads the latest width
28
+ const widthRef = useRef(defaultWidth);
29
+
30
+ const onSidebarDragStart = useCallback((e: React.MouseEvent) => {
31
+ e.preventDefault();
32
+ dragRef.current = { startX: e.clientX, startW: widthRef.current };
33
+
34
+ const onMove = (ev: MouseEvent) => {
35
+ if (!dragRef.current) return;
36
+ const next = Math.max(minWidth, Math.min(maxWidth, dragRef.current.startW + ev.clientX - dragRef.current.startX));
37
+ widthRef.current = next;
38
+ setSidebarWidth(next);
39
+ };
40
+
41
+ const onUp = () => {
42
+ dragRef.current = null;
43
+ window.removeEventListener('mousemove', onMove);
44
+ window.removeEventListener('mouseup', onUp);
45
+ };
46
+
47
+ window.addEventListener('mousemove', onMove);
48
+ window.addEventListener('mouseup', onUp);
49
+ }, [minWidth, maxWidth]);
50
+
51
+ return { sidebarWidth, onSidebarDragStart };
52
+ }
@@ -0,0 +1,29 @@
1
+ #!/bin/bash
2
+ # install.sh — Install Forge globally, ready to run
3
+ #
4
+ # Usage:
5
+ # ./install.sh # from npm
6
+ # ./install.sh local # from local source
7
+
8
+ set -e
9
+
10
+ if [ "$1" = "local" ] || [ "$1" = "--local" ]; then
11
+ echo "[forge] Installing from local source..."
12
+ npm uninstall -g @aion0/forge 2>/dev/null || true
13
+ npm link
14
+ echo "[forge] Building..."
15
+ pnpm build || echo "[forge] Build completed with warnings (non-critical)"
16
+ else
17
+ echo "[forge] Installing from npm..."
18
+ rm -rf "$(npm root -g)/@aion0/forge" 2>/dev/null || true
19
+ npm cache clean --force 2>/dev/null || true
20
+ # Install from /tmp to avoid pnpm node_modules conflict
21
+ (cd /tmp && npm install -g @aion0/forge)
22
+ echo "[forge] Building..."
23
+ cd "$(npm root -g)/@aion0/forge" && (npx next build || echo "[forge] Build completed with warnings") && cd -
24
+ fi
25
+
26
+ echo ""
27
+ echo "[forge] Done."
28
+ forge --version
29
+ echo "Run: forge server start"