smithers-orchestrator 0.1.18 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +192 -51
- package/bin/cli.ts +93 -45
- package/bunfig.toml +2 -4
- package/package.json +33 -19
- package/src/commands/cli-utils.test.ts +178 -0
- package/src/commands/cli-utils.ts +61 -0
- package/src/commands/db/current-view.test.ts +379 -0
- package/src/commands/db/current-view.ts +52 -0
- package/src/commands/db/executions-view.test.ts +270 -0
- package/src/commands/db/executions-view.ts +42 -0
- package/src/commands/db/help.test.ts +145 -0
- package/src/commands/db/help.ts +16 -0
- package/src/commands/db/index.test.ts +118 -0
- package/src/commands/db/index.ts +86 -0
- package/src/commands/db/memories-view.test.ts +366 -0
- package/src/commands/db/memories-view.ts +52 -0
- package/src/commands/db/recovery-view.test.ts +279 -0
- package/src/commands/db/recovery-view.ts +43 -0
- package/src/commands/db/state-view.test.ts +192 -0
- package/src/commands/db/state-view.ts +17 -0
- package/src/commands/db/stats-view.test.ts +194 -0
- package/src/commands/db/stats-view.ts +29 -0
- package/src/commands/db/transitions-view.test.ts +243 -0
- package/src/commands/db/transitions-view.ts +26 -0
- package/src/commands/db/view-utils.ts +39 -0
- package/src/commands/db.ts +11 -0
- package/src/commands/init.test.ts +178 -0
- package/src/{orchestrator/commands → commands}/init.ts +17 -25
- package/src/commands/monitor.test.ts +206 -0
- package/src/{orchestrator/commands → commands}/monitor.ts +10 -53
- package/src/commands/run.test.ts +216 -0
- package/src/{orchestrator/commands → commands}/run.ts +6 -34
- package/src/commands/test-utils.ts +15 -0
- package/src/components/Claude.test.tsx +1932 -11
- package/src/components/Claude.tsx +491 -88
- package/src/components/ClaudeApi.tsx +7 -4
- package/src/components/Constraints.tsx +3 -3
- package/src/components/Each.tsx +10 -0
- package/src/components/End.test.tsx +421 -0
- package/src/components/End.tsx +127 -0
- package/src/components/ExecutionContext.tsx +24 -0
- package/src/components/ExecutionGate.tsx +20 -0
- package/src/components/ExecutionScope.tsx +32 -0
- package/src/components/Git/Commit.test.tsx +501 -15
- package/src/components/Git/Commit.tsx +63 -29
- package/src/components/Git/Notes.test.tsx +511 -16
- package/src/components/Git/Notes.tsx +59 -26
- package/src/components/Git/index.ts +2 -2
- package/src/components/Hooks/OnCIFailure.test.tsx +587 -5
- package/src/components/Hooks/OnCIFailure.tsx +89 -64
- package/src/components/Hooks/PostCommit.test.tsx +731 -5
- package/src/components/Hooks/PostCommit.tsx +77 -38
- package/src/components/Hooks/index.ts +2 -2
- package/src/components/Human.tsx +50 -3
- package/src/components/If.tsx +27 -0
- package/src/components/JJ/Commit.test.tsx +164 -5
- package/src/components/JJ/Commit.tsx +48 -51
- package/src/components/JJ/Describe.test.tsx +96 -5
- package/src/components/JJ/Describe.tsx +41 -58
- package/src/components/JJ/Rebase.test.tsx +134 -5
- package/src/components/JJ/Rebase.tsx +47 -38
- package/src/components/JJ/Snapshot.test.tsx +159 -5
- package/src/components/JJ/Snapshot.tsx +42 -29
- package/src/components/JJ/Status.test.tsx +332 -5
- package/src/components/JJ/Status.tsx +47 -35
- package/src/components/JJ/index.ts +13 -5
- package/src/components/MCP/Sqlite.test.tsx +744 -0
- package/src/components/MCP/Sqlite.tsx +3 -3
- package/src/components/MCP/index.ts +1 -1
- package/src/components/Parallel.test.tsx +743 -0
- package/src/components/Parallel.tsx +40 -0
- package/src/components/Persona.tsx +4 -4
- package/src/components/Phase.test.tsx +827 -0
- package/src/components/Phase.tsx +175 -10
- package/src/components/PhaseContext.tsx +11 -0
- package/src/components/PhaseRegistry.test.tsx +428 -0
- package/src/components/PhaseRegistry.tsx +117 -0
- package/src/components/Ralph/utils.ts +35 -0
- package/src/components/Ralph.test.tsx +732 -21
- package/src/components/Ralph.tsx +100 -140
- package/src/components/Review/Review.tsx +292 -0
- package/src/components/Review/index.ts +2 -0
- package/src/components/Review/types.ts +51 -0
- package/src/components/Review.test.tsx +388 -4
- package/src/components/Review.tsx +3 -324
- package/src/components/Smithers.test.tsx +89 -0
- package/src/components/Smithers.tsx +395 -0
- package/src/components/SmithersProvider.test.ts +422 -0
- package/src/components/SmithersProvider.tsx +819 -0
- package/src/components/Step.test.tsx +783 -0
- package/src/components/Step.tsx +366 -8
- package/src/components/StepContext.tsx +11 -0
- package/src/components/Stop.tsx +11 -3
- package/src/components/Subagent.tsx +3 -3
- package/src/components/Task.tsx +3 -3
- package/src/components/While.tsx +107 -0
- package/src/components/Worktree.test.tsx +243 -0
- package/src/components/Worktree.tsx +141 -0
- package/src/components/WorktreeProvider.tsx +24 -0
- package/src/components/agents/ClaudeCodeCLI.ts +20 -0
- package/src/components/agents/SmithersCLI.test.ts +329 -0
- package/src/{orchestrator/components → components}/agents/SmithersCLI.ts +15 -6
- package/src/components/agents/claude-cli/arg-builder.test.ts +312 -0
- package/src/components/agents/claude-cli/arg-builder.ts +101 -0
- package/src/components/agents/claude-cli/executor.test.ts +805 -0
- package/src/components/agents/claude-cli/executor.ts +369 -0
- package/src/components/agents/claude-cli/index.ts +26 -0
- package/src/components/agents/claude-cli/message-parser.test.ts +390 -0
- package/src/components/agents/claude-cli/message-parser.ts +185 -0
- package/src/components/agents/claude-cli/output-parser.test.ts +217 -0
- package/src/components/agents/claude-cli/output-parser.ts +184 -0
- package/src/components/agents/claude-cli/stop-conditions.test.ts +517 -0
- package/src/components/agents/claude-cli/stop-conditions.ts +96 -0
- package/src/components/agents/types/agents.ts +251 -0
- package/src/components/agents/types/execution.ts +176 -0
- package/src/components/agents/types/index.ts +22 -0
- package/src/components/agents/types/schema.ts +16 -0
- package/src/components/agents/types/tools.ts +19 -0
- package/src/components/agents/types.ts +19 -0
- package/src/components/components.test.tsx +663 -13
- package/src/components/index.ts +77 -16
- package/src/core/index.test.ts +123 -0
- package/src/core/index.ts +3 -4
- package/src/db/agents.test.ts +703 -0
- package/src/db/agents.ts +199 -0
- package/src/db/artifacts.test.ts +436 -0
- package/src/db/artifacts.ts +78 -0
- package/src/db/build-state.test.ts +101 -0
- package/src/db/build-state.ts +160 -0
- package/src/db/execution.test.ts +803 -0
- package/src/db/execution.ts +132 -0
- package/src/db/human.test.ts +71 -0
- package/src/db/human.ts +237 -0
- package/src/db/index.test.ts +436 -0
- package/src/db/index.ts +316 -0
- package/src/db/memories.test.ts +1016 -0
- package/src/db/memories.ts +123 -0
- package/src/db/phases.test.ts +932 -0
- package/src/db/phases.ts +71 -0
- package/src/db/query.test.ts +226 -0
- package/src/db/query.ts +18 -0
- package/src/db/render-frames.test.ts +420 -0
- package/src/db/render-frames.ts +149 -0
- package/src/{orchestrator/db → db}/schema.sql +254 -97
- package/src/db/state.test.ts +667 -0
- package/src/db/state.ts +89 -0
- package/src/db/steps.test.ts +772 -0
- package/src/db/steps.ts +81 -0
- package/src/db/tasks.test.ts +600 -0
- package/src/db/tasks.ts +151 -0
- package/src/db/tools.test.ts +442 -0
- package/src/db/tools.ts +89 -0
- package/src/{orchestrator/db → db}/types.ts +82 -39
- package/src/db/utils.test.ts +191 -0
- package/src/db/utils.ts +17 -0
- package/src/db/vcs-queue.test.ts +312 -0
- package/src/db/vcs-queue.ts +66 -0
- package/src/db/vcs.test.ts +569 -0
- package/src/db/vcs.ts +344 -0
- package/src/debug/index.test.ts +307 -0
- package/src/debug/index.ts +230 -2
- package/src/hooks/ai-sdk.ts +47 -0
- package/src/hooks/index.test.ts +85 -0
- package/src/hooks/index.ts +7 -0
- package/src/hooks/useCaptureRenderFrame.test.tsx +267 -0
- package/src/hooks/useCaptureRenderFrame.ts +29 -0
- package/src/hooks/useCommitWithRetry.test.tsx +161 -0
- package/src/hooks/useCommitWithRetry.ts +62 -0
- package/src/hooks/useHuman.test.ts +138 -0
- package/src/hooks/useHuman.test.tsx +159 -0
- package/src/hooks/useHuman.ts +115 -0
- package/src/hooks/useHumanInteractive.test.ts +446 -0
- package/src/hooks/useHumanInteractive.test.tsx +59 -0
- package/src/hooks/useHumanInteractive.ts +255 -0
- package/src/hooks/useRalphCount.test.tsx +173 -0
- package/src/hooks/useRalphCount.ts +20 -0
- package/src/index.ts +10 -21
- package/src/jsx-runtime.test.ts +43 -206
- package/src/jsx-runtime.ts +4 -97
- package/src/jsx.d.ts +355 -17
- package/src/middleware/caching.ts +96 -0
- package/src/middleware/compose.ts +134 -0
- package/src/middleware/cost-tracking.ts +34 -0
- package/src/middleware/extract-json.ts +42 -0
- package/src/middleware/extract-reasoning.ts +41 -0
- package/src/middleware/index.ts +32 -0
- package/src/middleware/logging.ts +75 -0
- package/src/middleware/middleware.test.ts +318 -0
- package/src/middleware/rate-limiting.ts +77 -0
- package/src/middleware/redact-secrets.ts +38 -0
- package/src/middleware/retry.ts +47 -0
- package/src/middleware/timeout.ts +36 -0
- package/src/middleware/types.ts +39 -0
- package/src/middleware/validation.ts +36 -0
- package/src/monitor/haiku-summarizer.test.ts +253 -0
- package/src/{orchestrator/monitor → monitor}/haiku-summarizer.ts +5 -5
- package/src/monitor/index.ts +8 -0
- package/src/monitor/log-writer.test.ts +257 -0
- package/src/monitor/log-writer.ts +212 -0
- package/src/monitor/output-parser.test.ts +424 -0
- package/src/{orchestrator/monitor → monitor}/output-parser.ts +4 -4
- package/src/monitor/stream-formatter.test.ts +471 -0
- package/src/{orchestrator/monitor → monitor}/stream-formatter.ts +11 -11
- package/src/rate-limits/index.ts +15 -0
- package/src/rate-limits/middleware.test.ts +163 -0
- package/src/rate-limits/middleware.ts +28 -0
- package/src/rate-limits/monitor.test.ts +38 -0
- package/src/rate-limits/monitor.ts +134 -0
- package/src/rate-limits/providers/anthropic.test.ts +36 -0
- package/src/rate-limits/providers/anthropic.ts +67 -0
- package/src/rate-limits/providers/base.ts +1 -0
- package/src/rate-limits/providers/openai.test.ts +81 -0
- package/src/rate-limits/providers/openai.ts +94 -0
- package/src/rate-limits/store.test.ts +139 -0
- package/src/rate-limits/store.ts +83 -0
- package/src/rate-limits/throttle.test.ts +172 -0
- package/src/rate-limits/throttle.ts +66 -0
- package/src/rate-limits/types.ts +72 -0
- package/src/reactive-sqlite/database.test.ts +787 -0
- package/src/reactive-sqlite/database.ts +340 -0
- package/src/reactive-sqlite/hooks/context.test.tsx +418 -0
- package/src/reactive-sqlite/hooks/context.tsx +79 -0
- package/src/reactive-sqlite/hooks/index.ts +12 -0
- package/src/reactive-sqlite/hooks/shared.ts +79 -0
- package/src/reactive-sqlite/hooks/useMutation.test.tsx +583 -0
- package/src/reactive-sqlite/hooks/useMutation.ts +134 -0
- package/src/reactive-sqlite/hooks/useQuery.test.tsx +609 -0
- package/src/reactive-sqlite/hooks/useQuery.ts +173 -0
- package/src/reactive-sqlite/hooks/useQueryOne.test.tsx +419 -0
- package/src/reactive-sqlite/hooks/useQueryOne.ts +98 -0
- package/src/reactive-sqlite/hooks/useQueryValue.test.tsx +539 -0
- package/src/reactive-sqlite/hooks/useQueryValue.ts +95 -0
- package/src/reactive-sqlite/hooks.ts +7 -0
- package/src/reactive-sqlite/index.ts +58 -0
- package/src/reactive-sqlite/parser.test.ts +1330 -0
- package/src/reactive-sqlite/parser.ts +263 -0
- package/src/reactive-sqlite/row-tracking.test.ts +176 -0
- package/src/reactive-sqlite/types.ts +110 -0
- package/src/reconciler/README.md +300 -0
- package/src/reconciler/hooks-integration.test.tsx +383 -0
- package/src/reconciler/hooks.test.tsx +613 -0
- package/src/reconciler/hooks.ts +225 -0
- package/src/reconciler/host-config.test.ts +568 -0
- package/src/reconciler/host-config.ts +319 -0
- package/src/reconciler/index.ts +52 -0
- package/src/reconciler/jsx-runtime.test.tsx +449 -0
- package/src/reconciler/jsx-runtime.ts +51 -0
- package/src/reconciler/methods.test.ts +657 -0
- package/src/{solid/renderer-methods.ts → reconciler/methods.ts} +32 -8
- package/src/reconciler/root.test.tsx +54 -0
- package/src/reconciler/root.ts +187 -0
- package/src/reconciler/serialize-direct.test.ts +819 -0
- package/src/reconciler/serialize.test.ts +679 -0
- package/src/{core → reconciler}/serialize.ts +93 -4
- package/src/{core → reconciler}/types.ts +9 -7
- package/src/streaming/claude-parser.test.ts +207 -0
- package/src/streaming/claude-parser.ts +230 -0
- package/src/streaming/types.ts +18 -0
- package/src/streaming/v3-compat.test.ts +348 -0
- package/src/streaming/v3-compat.ts +62 -0
- package/src/{orchestrator/tools → tools}/ReportTool.test.ts +128 -73
- package/src/{orchestrator/tools → tools}/ReportTool.ts +29 -44
- package/src/tools/createSmithersTool.test.ts +75 -0
- package/src/tools/createSmithersTool.ts +76 -0
- package/src/tools/index.ts +34 -0
- package/src/tools/registry.test.ts +556 -0
- package/src/{orchestrator/tools → tools}/registry.ts +82 -45
- package/src/tools/smithers-mcp-server.test.ts +107 -0
- package/src/tools/smithers-mcp-server.ts +23 -0
- package/src/tools/tool-to-mcp.test.ts +216 -0
- package/src/tools/tool-to-mcp.ts +42 -0
- package/src/tools/types.ts +58 -0
- package/src/transport/smithers-chat-transport.test.ts +719 -0
- package/src/transport/smithers-chat-transport.ts +537 -0
- package/src/transport/types.ts +74 -0
- package/src/tui/App.test.tsx +356 -0
- package/src/tui/App.tsx +127 -0
- package/src/tui/README.md +489 -0
- package/src/tui/components/index.ts +5 -0
- package/src/tui/components/layout/Header.test.tsx +192 -0
- package/src/tui/components/layout/Header.tsx +37 -0
- package/src/tui/components/layout/StatusBar.test.tsx +211 -0
- package/src/tui/components/layout/StatusBar.tsx +45 -0
- package/src/tui/components/layout/TabBar.test.tsx +251 -0
- package/src/tui/components/layout/TabBar.tsx +49 -0
- package/src/tui/components/layout/index.ts +5 -0
- package/src/tui/components/shared/ScrollableList.test.tsx +212 -0
- package/src/tui/components/shared/ScrollableList.tsx +70 -0
- package/src/tui/components/shared/XMLViewer.test.tsx +196 -0
- package/src/tui/components/shared/XMLViewer.tsx +50 -0
- package/src/tui/components/shared/index.ts +4 -0
- package/src/tui/components/views/ChatInterface.test.tsx +33 -0
- package/src/tui/components/views/ChatInterface.tsx +131 -0
- package/src/tui/components/views/DatabaseExplorer.test.tsx +33 -0
- package/src/tui/components/views/DatabaseExplorer.tsx +156 -0
- package/src/tui/components/views/ExecutionTimeline.tsx +117 -0
- package/src/tui/components/views/HumanInteractionHandler.tsx +204 -0
- package/src/tui/components/views/RenderFrameInspector.tsx +110 -0
- package/src/tui/components/views/ReportViewer.tsx +158 -0
- package/src/tui/components/views/index.ts +8 -0
- package/src/tui/hooks/index.ts +9 -0
- package/src/tui/hooks/useClaudeChat.test.ts +257 -0
- package/src/tui/hooks/useClaudeChat.ts +71 -0
- package/src/tui/hooks/useHumanRequests.test.ts +434 -0
- package/src/tui/hooks/useHumanRequests.ts +81 -0
- package/src/tui/hooks/usePollEvents.test.ts +400 -0
- package/src/tui/hooks/usePollEvents.ts +79 -0
- package/src/tui/hooks/usePollTableData.test.ts +280 -0
- package/src/tui/hooks/usePollTableData.ts +46 -0
- package/src/tui/hooks/useRenderFrames.test.ts +449 -0
- package/src/tui/hooks/useRenderFrames.ts +75 -0
- package/src/tui/hooks/useReportGenerator.test.ts +316 -0
- package/src/tui/hooks/useReportGenerator.ts +69 -0
- package/src/tui/hooks/useSmithersConnection.test.ts +173 -0
- package/src/tui/hooks/useSmithersConnection.ts +102 -0
- package/src/tui/index.test.ts +43 -0
- package/src/tui/index.tsx +25 -0
- package/src/tui/opentui.d.ts +192 -0
- package/src/tui/services/claude-assistant.test.ts +56 -0
- package/src/tui/services/claude-assistant.ts +95 -0
- package/src/tui/services/index.ts +4 -0
- package/src/tui/services/report-generator.test.ts +73 -0
- package/src/tui/services/report-generator.ts +192 -0
- package/src/tui/utils/colors.test.ts +49 -0
- package/src/tui/utils/colors.ts +36 -0
- package/src/tui/utils/format.test.ts +83 -0
- package/src/tui/utils/format.ts +38 -0
- package/src/tui/utils/index.ts +4 -0
- package/src/utils/capture.test.ts +547 -0
- package/src/utils/capture.ts +436 -0
- package/src/utils/extract-text.test.ts +161 -0
- package/src/utils/extract-text.ts +14 -0
- package/src/utils/mcp-config.test.ts +490 -0
- package/src/{orchestrator/utils → utils}/mcp-config.ts +11 -9
- package/src/utils/scope.test.ts +184 -0
- package/src/utils/scope.ts +22 -0
- package/src/utils/structured-output/index.ts +14 -0
- package/src/utils/structured-output/prompt-generator.test.ts +356 -0
- package/src/utils/structured-output/prompt-generator.ts +46 -0
- package/src/utils/structured-output/types.ts +20 -0
- package/src/utils/structured-output/validator.test.ts +308 -0
- package/src/utils/structured-output/validator.ts +84 -0
- package/src/utils/structured-output/zod-converter.test.ts +276 -0
- package/src/utils/structured-output/zod-converter.ts +126 -0
- package/src/{orchestrator/utils → utils}/structured-output.test.ts +1 -1
- package/src/utils/structured-output.ts +18 -0
- package/src/utils/vcs/git.test.ts +138 -0
- package/src/utils/vcs/git.ts +294 -0
- package/src/utils/vcs/git.worktree.test.ts +139 -0
- package/src/utils/vcs/index.ts +51 -0
- package/src/utils/vcs/jj.test.ts +359 -0
- package/src/utils/vcs/jj.ts +178 -0
- package/src/utils/vcs/parsers.test.ts +441 -0
- package/src/utils/vcs/parsers.ts +76 -0
- package/src/utils/vcs/types.ts +69 -0
- package/src/utils/vcs.test.ts +1 -1
- package/src/utils/vcs.ts +2 -339
- package/templates/component.tsx.template +104 -0
- package/templates/hook.tsx.template +101 -0
- package/templates/main.tsx.template +143 -217
- package/templates/simple-agent.tsx.template +48 -0
- package/bin/cli.js +0 -14269
- package/preload.ts +0 -69
- package/src/core/execute.test.ts +0 -84
- package/src/core/execute.ts +0 -72
- package/src/core/root.test.ts +0 -83
- package/src/core/root.ts +0 -73
- package/src/core/serialize-direct.test.ts +0 -323
- package/src/core/serialize.test.ts +0 -205
- package/src/orchestrator/commands/db.ts +0 -332
- package/src/orchestrator/components/Claude.tsx +0 -247
- package/src/orchestrator/components/Orchestration.tsx +0 -236
- package/src/orchestrator/components/Phase.tsx +0 -117
- package/src/orchestrator/components/Smithers.tsx +0 -256
- package/src/orchestrator/components/SmithersProvider.tsx +0 -204
- package/src/orchestrator/components/Step.tsx +0 -173
- package/src/orchestrator/components/agents/ClaudeCodeCLI.ts +0 -558
- package/src/orchestrator/components/agents/SmithersCLI.test.ts +0 -138
- package/src/orchestrator/components/agents/types.ts +0 -449
- package/src/orchestrator/components/index.ts +0 -25
- package/src/orchestrator/db/execution.ts +0 -711
- package/src/orchestrator/db/index.ts +0 -704
- package/src/orchestrator/db/live-query.ts +0 -110
- package/src/orchestrator/db/memories.ts +0 -272
- package/src/orchestrator/db/state.ts +0 -257
- package/src/orchestrator/db/vcs.ts +0 -338
- package/src/orchestrator/integration.test.ts +0 -325
- package/src/orchestrator/monitor/log-writer.ts +0 -78
- package/src/orchestrator/monitor/output-parser.test.ts +0 -165
- package/src/orchestrator/monitor/stream-formatter.test.ts +0 -224
- package/src/orchestrator/tools/index.ts +0 -25
- package/src/orchestrator/tools/registry.test.ts +0 -234
- package/src/orchestrator/utils/mcp-config.test.ts +0 -143
- package/src/orchestrator/utils/structured-output.ts +0 -278
- package/src/solid/h.test.ts +0 -163
- package/src/solid/h.ts +0 -80
- package/src/solid/index.ts +0 -36
- package/src/solid/renderer-core.test.ts +0 -195
- package/src/solid/renderer.js +0 -141
- package/src/solid/renderer.ts +0 -68
- package/src/solid/root.ts +0 -89
- package/src/solid/simple-renderer.ts +0 -81
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@ I use Smithers for both long-term (weeks) agentic work, as well as one-off scrip
|
|
|
21
21
|
- [Installation](#installation)
|
|
22
22
|
- [Dependencies](#dependencies)
|
|
23
23
|
- [Usage](#usage)
|
|
24
|
+
- [AI SDK React Hooks](#ai-sdk-react-hooks)
|
|
24
25
|
- [Recipes](#recipes)
|
|
25
26
|
- [Features](#features)
|
|
26
27
|
- [Claude Component](#claude-component)
|
|
@@ -29,7 +30,11 @@ I use Smithers for both long-term (weeks) agentic work, as well as one-off scrip
|
|
|
29
30
|
- [MCP Tool Integration](#mcp-tool-integration)
|
|
30
31
|
- [Smithers Subagent](#smithers-subagent)
|
|
31
32
|
- [Git/JJ VCS Integration](#gitjj-vcs-integration)
|
|
33
|
+
- [Orchestration Lifecycle](#orchestration-lifecycle)
|
|
34
|
+
- [PhaseRegistry & Step](#phaseregistry--step)
|
|
35
|
+
- [Parallel Execution](#parallel-execution)
|
|
32
36
|
- [Database State Management](#database-state-management)
|
|
37
|
+
- [Rate Limit Monitoring](#rate-limit-monitoring)
|
|
33
38
|
- [Contributing](#contributing)
|
|
34
39
|
|
|
35
40
|
---
|
|
@@ -43,7 +48,7 @@ I wanted a tool that allows me to:
|
|
|
43
48
|
- **Persist state across sessions** - pick up where I left off, even days later
|
|
44
49
|
- **Mix short scripts with long-running workflows** - same syntax for a quick task or a week-long project
|
|
45
50
|
- **See what my agents are doing** - full observability with database logging and reports
|
|
46
|
-
- **Use reactive primitives** -
|
|
51
|
+
- **Use reactive primitives** - React state means my workflows respond to state changes automatically
|
|
47
52
|
- **Compose complex behaviors from simple components** - loops, phases, steps, and validation all snap together
|
|
48
53
|
- **Keep everything in version control** - workflows are just TypeScript files
|
|
49
54
|
|
|
@@ -54,11 +59,13 @@ I wanted a tool that allows me to:
|
|
|
54
59
|
### Install the Smithers Plugin for Claude Code
|
|
55
60
|
|
|
56
61
|
**Step 1:** Add the Smithers marketplace:
|
|
62
|
+
|
|
57
63
|
```bash
|
|
58
64
|
/plugin marketplace add evmts/smithers
|
|
59
65
|
```
|
|
60
66
|
|
|
61
67
|
**Step 2:** Install the plugin:
|
|
68
|
+
|
|
62
69
|
```bash
|
|
63
70
|
/plugin install smithers@smithers
|
|
64
71
|
```
|
|
@@ -70,7 +77,7 @@ This gives Claude Code the `smithers-orchestrator` skill for creating multi-agen
|
|
|
70
77
|
If you want to use Smithers components directly in your own scripts:
|
|
71
78
|
|
|
72
79
|
```bash
|
|
73
|
-
bun add smithers
|
|
80
|
+
bun add smithers-orchestrator
|
|
74
81
|
```
|
|
75
82
|
|
|
76
83
|
---
|
|
@@ -80,13 +87,12 @@ bun add smithers
|
|
|
80
87
|
### Required
|
|
81
88
|
|
|
82
89
|
- **[Bun](https://bun.sh/)** - JavaScript runtime (v1.0+)
|
|
83
|
-
- **[Claude Code](https://www.npmjs.com/package/@anthropic-ai/claude-code)** - `
|
|
90
|
+
- **[Claude Code](https://www.npmjs.com/package/@anthropic-ai/claude-code)** - `bun install -g @anthropic-ai/claude-code`
|
|
84
91
|
|
|
85
92
|
### Optional
|
|
86
93
|
|
|
87
94
|
- **[jj (Jujutsu)](https://github.com/martinvonz/jj)** - Alternative VCS with better snapshot support
|
|
88
|
-
- **
|
|
89
|
-
- **Codex CLI** - For OpenAI model support (coming soon)
|
|
95
|
+
- **[Codex CLI](https://github.com/openai/codex)** - Used for post-commit code reviews
|
|
90
96
|
|
|
91
97
|
---
|
|
92
98
|
|
|
@@ -106,17 +112,14 @@ Your agent understands the component model and generates correct, working orches
|
|
|
106
112
|
|
|
107
113
|
### State Persistence
|
|
108
114
|
|
|
109
|
-
All Smithers state is saved in a **
|
|
115
|
+
All Smithers state is saved in a **SQLite database** on your system that can be easily inspected:
|
|
110
116
|
|
|
111
117
|
```bash
|
|
112
118
|
# View execution history
|
|
113
|
-
smithers
|
|
119
|
+
smithers db executions
|
|
114
120
|
|
|
115
121
|
# View state for a specific execution
|
|
116
|
-
smithers
|
|
117
|
-
|
|
118
|
-
# Query the database directly
|
|
119
|
-
smithers-orchestrator db query "SELECT * FROM agents ORDER BY started_at DESC LIMIT 10"
|
|
122
|
+
smithers db state --execution-id abc123
|
|
120
123
|
```
|
|
121
124
|
|
|
122
125
|
### Basic Example
|
|
@@ -124,10 +127,10 @@ smithers-orchestrator db query "SELECT * FROM agents ORDER BY started_at DESC LI
|
|
|
124
127
|
```tsx
|
|
125
128
|
#!/usr/bin/env bun
|
|
126
129
|
|
|
127
|
-
import { createSmithersRoot } from "smithers";
|
|
128
|
-
import { createSmithersDB } from "smithers
|
|
129
|
-
import { SmithersProvider } from "smithers
|
|
130
|
-
import { Claude } from "smithers
|
|
130
|
+
import { createSmithersRoot } from "smithers-orchestrator";
|
|
131
|
+
import { createSmithersDB } from "smithers-orchestrator/db";
|
|
132
|
+
import { SmithersProvider } from "smithers-orchestrator/components/SmithersProvider";
|
|
133
|
+
import { Claude } from "smithers-orchestrator/components/Claude";
|
|
131
134
|
|
|
132
135
|
const db = await createSmithersDB({ path: ".smithers/my-task" });
|
|
133
136
|
const executionId = await db.execution.start("My Task", "scripts/my-task.tsx");
|
|
@@ -159,6 +162,41 @@ bun my-workflow.tsx
|
|
|
159
162
|
|
|
160
163
|
---
|
|
161
164
|
|
|
165
|
+
## AI SDK React Hooks
|
|
166
|
+
|
|
167
|
+
Smithers re-exports the Vercel AI SDK React hooks so you can import everything
|
|
168
|
+
from a single package:
|
|
169
|
+
|
|
170
|
+
```tsx
|
|
171
|
+
import { useChat, useCompletion, useSmithers } from "smithers-orchestrator";
|
|
172
|
+
|
|
173
|
+
function ChatUI() {
|
|
174
|
+
const { messages, sendMessage, status } = useChat({ api: "/api/chat" });
|
|
175
|
+
const { db } = useSmithers();
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
<div>
|
|
179
|
+
<p>Status: {status}</p>
|
|
180
|
+
{messages.map((message) => (
|
|
181
|
+
<div key={message.id}>{message.content}</div>
|
|
182
|
+
))}
|
|
183
|
+
<button onClick={() => sendMessage({ role: "user", content: "Hi" })}>
|
|
184
|
+
Send
|
|
185
|
+
</button>
|
|
186
|
+
</div>
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
You can also import directly from the hooks subpath:
|
|
192
|
+
|
|
193
|
+
```tsx
|
|
194
|
+
import { useChat } from "smithers-orchestrator/hooks";
|
|
195
|
+
import { useChat as useAiChat } from "smithers-orchestrator/hooks/ai-sdk";
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
162
200
|
## Recipes
|
|
163
201
|
|
|
164
202
|
### Multi-Phase Review Workflow
|
|
@@ -168,40 +206,38 @@ async function ReviewWorkflow() {
|
|
|
168
206
|
const phase = (await db.state.get("phase")) ?? "implement";
|
|
169
207
|
|
|
170
208
|
return (
|
|
171
|
-
<SmithersProvider db={db} executionId={executionId}>
|
|
209
|
+
<SmithersProvider db={db} executionId={executionId} maxIterations={10}>
|
|
172
210
|
<Orchestration globalTimeout={3600000}>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
)}
|
|
204
|
-
</Ralph>
|
|
211
|
+
{phase === "implement" && (
|
|
212
|
+
<Phase name="Implementation">
|
|
213
|
+
<Claude
|
|
214
|
+
model="sonnet"
|
|
215
|
+
onFinished={() => db.state.set("phase", "review")}
|
|
216
|
+
>
|
|
217
|
+
Implement the user authentication feature.
|
|
218
|
+
</Claude>
|
|
219
|
+
</Phase>
|
|
220
|
+
)}
|
|
221
|
+
|
|
222
|
+
{phase === "review" && (
|
|
223
|
+
<Phase name="Code Review">
|
|
224
|
+
<Review
|
|
225
|
+
target={{ type: "diff", ref: "main" }}
|
|
226
|
+
criteria={[
|
|
227
|
+
"No security vulnerabilities",
|
|
228
|
+
"Tests cover edge cases",
|
|
229
|
+
"Types are properly defined",
|
|
230
|
+
]}
|
|
231
|
+
onFinished={(review) => {
|
|
232
|
+
if (review.approved) {
|
|
233
|
+
db.state.set("phase", "complete");
|
|
234
|
+
} else {
|
|
235
|
+
db.state.set("phase", "implement");
|
|
236
|
+
}
|
|
237
|
+
}}
|
|
238
|
+
/>
|
|
239
|
+
</Phase>
|
|
240
|
+
)}
|
|
205
241
|
</Orchestration>
|
|
206
242
|
</SmithersProvider>
|
|
207
243
|
);
|
|
@@ -293,10 +329,12 @@ The core agent component that executes Claude with full tool access:
|
|
|
293
329
|
|
|
294
330
|
### Ralph Loop Controller
|
|
295
331
|
|
|
332
|
+
> **Prefer SmithersProvider.** The loop functionality is built into `<SmithersProvider>` with `maxIterations`. Use `<Ralph>` only for nested loops within a workflow.
|
|
333
|
+
|
|
296
334
|
Named after Ralph Wiggum's "I'm in danger" catchphrase - controls iterative loops that could run away:
|
|
297
335
|
|
|
298
336
|
```tsx
|
|
299
|
-
<
|
|
337
|
+
<SmithersProvider db={db} executionId={executionId} maxIterations={10}>
|
|
300
338
|
{/* Children re-render on each iteration */}
|
|
301
339
|
<Claude
|
|
302
340
|
onFinished={() => {
|
|
@@ -305,7 +343,7 @@ Named after Ralph Wiggum's "I'm in danger" catchphrase - controls iterative loop
|
|
|
305
343
|
>
|
|
306
344
|
Keep improving until tests pass.
|
|
307
345
|
</Claude>
|
|
308
|
-
</
|
|
346
|
+
</SmithersProvider>
|
|
309
347
|
```
|
|
310
348
|
|
|
311
349
|
### Structured Output with Zod
|
|
@@ -337,6 +375,37 @@ Give Claude access to external tools via Model Context Protocol:
|
|
|
337
375
|
</Claude>
|
|
338
376
|
```
|
|
339
377
|
|
|
378
|
+
### AI SDK Tool Format
|
|
379
|
+
|
|
380
|
+
Define tools with Zod schemas and pass them to Claude:
|
|
381
|
+
|
|
382
|
+
```tsx
|
|
383
|
+
import { z } from "zod";
|
|
384
|
+
import { createSmithersTool } from "smithers-orchestrator/tools";
|
|
385
|
+
|
|
386
|
+
const reportTool = createSmithersTool({
|
|
387
|
+
name: "report",
|
|
388
|
+
description: "Report progress to the orchestrator",
|
|
389
|
+
inputSchema: z.object({
|
|
390
|
+
message: z.string(),
|
|
391
|
+
severity: z.enum(["info", "warning", "error"]).optional(),
|
|
392
|
+
}),
|
|
393
|
+
execute: async ({ message, severity }, { db }) => {
|
|
394
|
+
await db.vcs.addReport({
|
|
395
|
+
type: "progress",
|
|
396
|
+
title: "Agent Report",
|
|
397
|
+
content: message,
|
|
398
|
+
severity: severity ?? "info",
|
|
399
|
+
});
|
|
400
|
+
return { success: true };
|
|
401
|
+
},
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
<Claude tools={[reportTool]}>
|
|
405
|
+
Report progress as you go.
|
|
406
|
+
</Claude>
|
|
407
|
+
```
|
|
408
|
+
|
|
340
409
|
### Smithers Subagent
|
|
341
410
|
|
|
342
411
|
Spawn a new Smithers instance to plan and execute complex subtasks:
|
|
@@ -353,6 +422,16 @@ Spawn a new Smithers instance to plan and execute complex subtasks:
|
|
|
353
422
|
</Smithers>
|
|
354
423
|
```
|
|
355
424
|
|
|
425
|
+
### Worktree
|
|
426
|
+
|
|
427
|
+
Run agents in isolated git worktrees:
|
|
428
|
+
|
|
429
|
+
```tsx
|
|
430
|
+
<Worktree branch="feature-auth" cleanup>
|
|
431
|
+
<Claude>Implement user authentication</Claude>
|
|
432
|
+
</Worktree>
|
|
433
|
+
```
|
|
434
|
+
|
|
356
435
|
### Git/JJ VCS Integration
|
|
357
436
|
|
|
358
437
|
First-class version control support:
|
|
@@ -366,6 +445,52 @@ First-class version control support:
|
|
|
366
445
|
<Commit autoDescribe />
|
|
367
446
|
```
|
|
368
447
|
|
|
448
|
+
### Orchestration Lifecycle
|
|
449
|
+
|
|
450
|
+
Global timeout and completion logic for workflows:
|
|
451
|
+
|
|
452
|
+
```tsx
|
|
453
|
+
<Orchestration
|
|
454
|
+
globalTimeout={3600000} // 1 hour max
|
|
455
|
+
onComplete={() => console.log("Workflow finished")}
|
|
456
|
+
onTimeout={() => console.log("Workflow timed out")}
|
|
457
|
+
>
|
|
458
|
+
{/* Your workflow components */}
|
|
459
|
+
</Orchestration>
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### PhaseRegistry & Step
|
|
463
|
+
|
|
464
|
+
Manage multi-phase sequential execution:
|
|
465
|
+
|
|
466
|
+
```tsx
|
|
467
|
+
<PhaseRegistry>
|
|
468
|
+
<Phase name="implement">
|
|
469
|
+
<Step name="write-code" snapshotBefore commitAfter commitMessage="feat: Implementation">
|
|
470
|
+
<Claude>Implement the feature</Claude>
|
|
471
|
+
</Step>
|
|
472
|
+
<Step name="write-tests">
|
|
473
|
+
<Claude>Write tests for the implementation</Claude>
|
|
474
|
+
</Step>
|
|
475
|
+
</Phase>
|
|
476
|
+
<Phase name="review">
|
|
477
|
+
<Review target={{ type: "diff", ref: "main" }} />
|
|
478
|
+
</Phase>
|
|
479
|
+
</PhaseRegistry>
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Parallel Execution
|
|
483
|
+
|
|
484
|
+
Run multiple agents concurrently within a step:
|
|
485
|
+
|
|
486
|
+
```tsx
|
|
487
|
+
<Parallel>
|
|
488
|
+
<Claude model="haiku">Quick task 1</Claude>
|
|
489
|
+
<Claude model="haiku">Quick task 2</Claude>
|
|
490
|
+
<Claude model="haiku">Quick task 3</Claude>
|
|
491
|
+
</Parallel>
|
|
492
|
+
```
|
|
493
|
+
|
|
369
494
|
### Database State Management
|
|
370
495
|
|
|
371
496
|
Persistent state that survives restarts:
|
|
@@ -384,6 +509,22 @@ const history = await db.state.getHistory("phase");
|
|
|
384
509
|
const all = await db.state.getAll();
|
|
385
510
|
```
|
|
386
511
|
|
|
512
|
+
### Rate Limit Monitoring
|
|
513
|
+
|
|
514
|
+
Track provider rate limit headroom and execution-scoped token usage:
|
|
515
|
+
|
|
516
|
+
```typescript
|
|
517
|
+
import { createRateLimitMonitor } from "smithers-orchestrator/rate-limits";
|
|
518
|
+
|
|
519
|
+
const monitor = createRateLimitMonitor({
|
|
520
|
+
anthropic: { apiKey: process.env.ANTHROPIC_API_KEY! },
|
|
521
|
+
db,
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
const status = await monitor.getStatus("anthropic", "claude-sonnet-4");
|
|
525
|
+
const usage = await monitor.getUsage(executionId);
|
|
526
|
+
```
|
|
527
|
+
|
|
387
528
|
---
|
|
388
529
|
|
|
389
530
|
## Contributing
|
|
@@ -398,4 +539,4 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
|
|
|
398
539
|
|
|
399
540
|
---
|
|
400
541
|
|
|
401
|
-
**Built with
|
|
542
|
+
**Built with React, powered by Claude.**
|
package/bin/cli.ts
CHANGED
|
@@ -1,69 +1,117 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
|
-
import { Command } from
|
|
4
|
-
import { init } from
|
|
5
|
-
import { run } from
|
|
6
|
-
import { monitor } from
|
|
7
|
-
import { dbCommand } from
|
|
3
|
+
import { Command } from "commander";
|
|
4
|
+
import { init } from "../src/commands/init.ts";
|
|
5
|
+
import { run } from "../src/commands/run.ts";
|
|
6
|
+
import { monitor } from "../src/commands/monitor.ts";
|
|
7
|
+
import { dbCommand } from "../src/commands/db.ts";
|
|
8
|
+
import { launchTUI } from "../src/tui/index.tsx";
|
|
9
|
+
import { DEFAULT_DB_DIR, DEFAULT_MAIN_FILE, resolveDbPaths } from "../src/commands/cli-utils.ts";
|
|
8
10
|
|
|
9
|
-
const program = new Command()
|
|
11
|
+
const program = new Command();
|
|
10
12
|
|
|
11
13
|
program
|
|
12
|
-
.name(
|
|
13
|
-
.description(
|
|
14
|
-
|
|
14
|
+
.name("smithers")
|
|
15
|
+
.description(
|
|
16
|
+
"CLI tool for multi-agent AI orchestration with Smithers framework",
|
|
17
|
+
)
|
|
18
|
+
.version("0.1.0");
|
|
15
19
|
|
|
16
20
|
program
|
|
17
|
-
.command(
|
|
18
|
-
.description(
|
|
19
|
-
.option(
|
|
20
|
-
|
|
21
|
+
.command("init")
|
|
22
|
+
.description("Create a new Smithers orchestration in .smithers/")
|
|
23
|
+
.option(
|
|
24
|
+
"-d, --dir <directory>",
|
|
25
|
+
"Directory to create .smithers in",
|
|
26
|
+
process.cwd(),
|
|
27
|
+
)
|
|
28
|
+
.action(init);
|
|
21
29
|
|
|
22
30
|
program
|
|
23
|
-
.command(
|
|
24
|
-
.description(
|
|
25
|
-
.
|
|
26
|
-
.action(run)
|
|
31
|
+
.command("run [file]")
|
|
32
|
+
.description("Run a Smithers orchestration file (default: .smithers/main.tsx)")
|
|
33
|
+
.action((file?: string) => run(file));
|
|
27
34
|
|
|
28
35
|
program
|
|
29
|
-
.command(
|
|
30
|
-
.description(
|
|
31
|
-
.option(
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
.command("monitor [file]")
|
|
37
|
+
.description("Run with LLM-friendly monitoring (recommended)")
|
|
38
|
+
.option(
|
|
39
|
+
"-f, --file <file>",
|
|
40
|
+
"Orchestration file to monitor",
|
|
41
|
+
DEFAULT_MAIN_FILE,
|
|
42
|
+
)
|
|
43
|
+
.option("--no-summary", "Disable Haiku summarization")
|
|
44
|
+
.action(monitor);
|
|
34
45
|
|
|
35
46
|
program
|
|
36
|
-
.command(
|
|
37
|
-
.description(
|
|
38
|
-
.option(
|
|
39
|
-
.action(dbCommand)
|
|
47
|
+
.command("db [subcommand]")
|
|
48
|
+
.description("Inspect and manage the SQLite database")
|
|
49
|
+
.option("--path <path>", "Database path", DEFAULT_DB_DIR)
|
|
50
|
+
.action(dbCommand);
|
|
40
51
|
|
|
41
|
-
// Hook trigger command - called by git hooks to notify orchestration
|
|
42
52
|
program
|
|
43
|
-
.command(
|
|
44
|
-
.description(
|
|
45
|
-
.option(
|
|
53
|
+
.command("tui")
|
|
54
|
+
.description("Launch observability TUI dashboard")
|
|
55
|
+
.option("-p, --path <path>", "Database path", ".smithers/data")
|
|
56
|
+
.action(async (options: { path: string }) => {
|
|
57
|
+
try {
|
|
58
|
+
await launchTUI({ dbPath: options.path });
|
|
59
|
+
} catch (error) {
|
|
60
|
+
console.error('❌ Failed to launch TUI:', error instanceof Error ? error.message : error);
|
|
61
|
+
if (!process.stdout.isTTY) {
|
|
62
|
+
console.error(' TUI requires an interactive terminal');
|
|
63
|
+
}
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const VALID_HOOK_TYPES = ['pre-commit', 'post-commit', 'pre-push', 'post-merge'] as const
|
|
69
|
+
|
|
70
|
+
program
|
|
71
|
+
.command("hook-trigger <type> <data>")
|
|
72
|
+
.description("Trigger a hook event (used by git hooks). Data must be valid JSON.")
|
|
73
|
+
.option("--path <path>", "Database path", DEFAULT_DB_DIR)
|
|
46
74
|
.action(async (type: string, data: string, options: { path: string }) => {
|
|
75
|
+
if (!VALID_HOOK_TYPES.includes(type as typeof VALID_HOOK_TYPES[number])) {
|
|
76
|
+
console.error(`❌ Invalid hook type: ${type}`)
|
|
77
|
+
console.error(` Valid types: ${VALID_HOOK_TYPES.join(', ')}`)
|
|
78
|
+
process.exit(1)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
let parsedData: unknown
|
|
47
82
|
try {
|
|
48
|
-
|
|
49
|
-
|
|
83
|
+
parsedData = JSON.parse(data)
|
|
84
|
+
} catch {
|
|
85
|
+
console.error(`❌ Invalid JSON data: ${data}`)
|
|
86
|
+
console.error(' Data must be valid JSON')
|
|
87
|
+
process.exit(1)
|
|
88
|
+
}
|
|
50
89
|
|
|
51
|
-
|
|
90
|
+
try {
|
|
91
|
+
const { createSmithersDB } = await import(
|
|
92
|
+
"../src/db/index.ts"
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
const { dbFile } = resolveDbPaths(options.path);
|
|
96
|
+
const db = createSmithersDB({ path: dbFile });
|
|
52
97
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
98
|
+
db.state.set(
|
|
99
|
+
"last_hook_trigger",
|
|
100
|
+
{
|
|
101
|
+
type,
|
|
102
|
+
data: parsedData,
|
|
103
|
+
timestamp: Date.now(),
|
|
104
|
+
},
|
|
105
|
+
"hook-trigger",
|
|
106
|
+
);
|
|
59
107
|
|
|
60
|
-
|
|
108
|
+
db.close();
|
|
61
109
|
|
|
62
|
-
console.log(`[Hook] Triggered: ${type}
|
|
110
|
+
console.log(`[Hook] Triggered: ${type}`);
|
|
63
111
|
} catch (error) {
|
|
64
|
-
console.error(
|
|
65
|
-
process.exit(1)
|
|
112
|
+
console.error("[Hook] Error:", error);
|
|
113
|
+
process.exit(1);
|
|
66
114
|
}
|
|
67
|
-
})
|
|
115
|
+
});
|
|
68
116
|
|
|
69
|
-
program.parse(process.argv)
|
|
117
|
+
program.parse(process.argv);
|
package/bunfig.toml
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
# Bun configuration for Smithers
|
|
2
2
|
# https://bun.sh/docs/runtime/bunfig
|
|
3
3
|
|
|
4
|
-
# Use bun-plugin-solid for Solid JSX transform
|
|
5
|
-
preload = ["./preload.ts"]
|
|
6
|
-
|
|
7
4
|
[install]
|
|
8
5
|
auto = "fallback"
|
|
9
6
|
|
|
10
7
|
[test]
|
|
11
|
-
preload = ["./
|
|
8
|
+
preload = ["./test/preload.ts"]
|
|
9
|
+
exclude = ["**/reference/**", "**/node_modules/**"]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smithers-orchestrator",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Build AI agents with
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Build AI agents with React - Declarative JSX for Claude orchestration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
7
7
|
"bin": {
|
|
@@ -9,26 +9,32 @@
|
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./src/index.ts",
|
|
12
|
-
"./jsx-runtime": "./src/jsx-runtime.ts",
|
|
13
|
-
"./jsx-dev-runtime": "./src/jsx-runtime.ts",
|
|
12
|
+
"./jsx-runtime": "./src/reconciler/jsx-runtime.ts",
|
|
13
|
+
"./jsx-dev-runtime": "./src/reconciler/jsx-runtime.ts",
|
|
14
14
|
"./core": "./src/core/index.ts",
|
|
15
|
-
"./
|
|
15
|
+
"./reconciler": "./src/reconciler/index.ts",
|
|
16
|
+
"./react": "./src/reconciler/index.ts",
|
|
16
17
|
"./components": "./src/components/index.ts",
|
|
17
18
|
"./components/Ralph": "./src/components/Ralph.tsx",
|
|
18
19
|
"./components/Review": "./src/components/Review.tsx",
|
|
19
20
|
"./components/Phase": "./src/components/Phase.tsx",
|
|
20
21
|
"./components/Step": "./src/components/Step.tsx",
|
|
22
|
+
"./components/Claude": "./src/components/Claude.tsx",
|
|
23
|
+
"./components/SmithersProvider": "./src/components/SmithersProvider.tsx",
|
|
24
|
+
"./components/Orchestration": "./src/components/Orchestration.tsx",
|
|
25
|
+
"./components/Smithers": "./src/components/Smithers.tsx",
|
|
21
26
|
"./components/JJ": "./src/components/JJ/index.ts",
|
|
22
27
|
"./components/Git": "./src/components/Git/index.ts",
|
|
23
28
|
"./components/Hooks": "./src/components/Hooks/index.ts",
|
|
24
29
|
"./components/MCP": "./src/components/MCP/index.ts",
|
|
25
|
-
"./
|
|
26
|
-
"./
|
|
27
|
-
"./
|
|
28
|
-
"./
|
|
29
|
-
"./
|
|
30
|
-
"./
|
|
31
|
-
"./
|
|
30
|
+
"./middleware": "./src/middleware/index.ts",
|
|
31
|
+
"./db": "./src/db/index.ts",
|
|
32
|
+
"./monitor": "./src/monitor/index.ts",
|
|
33
|
+
"./rate-limits": "./src/rate-limits/index.ts",
|
|
34
|
+
"./tools": "./src/tools/index.ts",
|
|
35
|
+
"./reactive-sqlite": "./src/reactive-sqlite/index.ts",
|
|
36
|
+
"./hooks": "./src/hooks/index.ts",
|
|
37
|
+
"./hooks/ai-sdk": "./src/hooks/ai-sdk.ts"
|
|
32
38
|
},
|
|
33
39
|
"files": [
|
|
34
40
|
"src",
|
|
@@ -43,18 +49,23 @@
|
|
|
43
49
|
"scripts": {
|
|
44
50
|
"build": "echo 'No build needed - Bun runs TypeScript directly'",
|
|
45
51
|
"typecheck": "tsc --noEmit",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
52
|
+
"lint": "oxlint src/",
|
|
53
|
+
"lint:fix": "oxlint --fix src/",
|
|
54
|
+
"test": "cd src && bun test .",
|
|
55
|
+
"test:watch": "cd src && bun test --watch .",
|
|
56
|
+
"check": "bun run typecheck && bun run lint && bun run test",
|
|
57
|
+
"prepare": "husky"
|
|
48
58
|
},
|
|
49
59
|
"dependencies": {
|
|
50
60
|
"@anthropic-ai/claude-agent-sdk": "^0.1.76",
|
|
51
61
|
"@anthropic-ai/sdk": "^0.71.2",
|
|
52
62
|
"@babel/core": "^7.28.6",
|
|
53
63
|
"@babel/preset-typescript": "^7.28.5",
|
|
54
|
-
"@
|
|
55
|
-
"
|
|
64
|
+
"@opentui/core": "^0.1.74",
|
|
65
|
+
"@opentui/react": "^0.1.74",
|
|
56
66
|
"commander": "^12.0.0",
|
|
57
|
-
"
|
|
67
|
+
"react": "^19.0.0",
|
|
68
|
+
"react-reconciler": "^0.32.0",
|
|
58
69
|
"zod": "^4.3.5"
|
|
59
70
|
},
|
|
60
71
|
"peerDependencies": {
|
|
@@ -62,13 +73,16 @@
|
|
|
62
73
|
},
|
|
63
74
|
"devDependencies": {
|
|
64
75
|
"@types/bun": "latest",
|
|
76
|
+
"@types/react": "^19.0.0",
|
|
77
|
+
"@types/react-reconciler": "^0.28.9",
|
|
78
|
+
"husky": "^9.1.7",
|
|
79
|
+
"oxlint": "^1.39.0",
|
|
65
80
|
"typescript": "^5.7.2"
|
|
66
81
|
},
|
|
67
82
|
"keywords": [
|
|
68
83
|
"ai",
|
|
69
84
|
"agent",
|
|
70
|
-
"
|
|
71
|
-
"solidjs",
|
|
85
|
+
"react",
|
|
72
86
|
"jsx",
|
|
73
87
|
"llm",
|
|
74
88
|
"claude",
|