/** @jsxImportSource smithers-orchestrator */
import { createSmithers, Approval, Parallel, Sequence, ClaudeCodeAgent, approvalDecisionSchema } from "smithers-orchestrator";
import { z } from "zod";
const { Workflow, Task, smithers, outputs } = createSmithers({
deployApproval: approvalDecisionSchema,
deploy: z.object({ status: z.string() }),
docs: z.object({ status: z.string() }),
});
const agent = new ClaudeCodeAgent({ model: "claude-sonnet-5" });
export default smithers(() => (
<Workflow name="ship">
<Parallel>
<Sequence>
<Approval
id="approve-deploy"
async
output={outputs.deployApproval}
request={{ title: "Approve production deploy?" }}
/>
<Task id="deploy" output={outputs.deploy} needs={{ ok: "approve-deploy" }} agent={agent}>
Deploy to production once the gate is approved.
</Task>
</Sequence>
<Task id="update-docs" output={outputs.docs} agent={agent}>
Update the changelog. This lane proceeds while approval is pending.
</Task>
</Parallel>
</Workflow>
));