xiaoju
2a71454c10
refactor: extract @uncaged/workflow-util-agent + smart prompt
...
- New package: spawn-cli + build-agent-prompt shared utils
- Smart prompt: start + meta summaries for middle steps + last step full
- Cursor/Hermes adapters now import from util-agent (no duplicate code)
- 109 tests pass, biome clean
Closes #14
小橘 <xiaoju@shazhou.work >
2026-05-06 07:17:59 +00:00
xiaoju
db5cbd49e2
feat: @uncaged/workflow-template-solve-issue — first workflow template
...
planner → coder → reviewer → committer flow with retry logic.
- createSolveIssueWorkflow factory (agent-agnostic)
- buildSolveIssueDescriptor with zod@4 JSON Schema
- Moderator: reviewer reject → coder retry, maxRounds → END
- 103 tests pass, biome clean
Closes #13
小橘 <xiaoju@shazhou.work >
2026-05-06 07:04:28 +00:00
xiaoju
78d883ec5d
feat: @uncaged/workflow-role-committer + @uncaged/workflow-role-reviewer
...
- Committer: git add/commit/push with LLM-generated branch+message
- Reviewer: code review role with approval meta
- Both use zod@4 schemas, no nerve-core deps
- 98 tests pass, biome clean
Closes #12
小橘 <xiaoju@shazhou.work >
2026-05-06 06:59:44 +00:00
xiaoju
f21014fcdd
feat: @uncaged/workflow-agent-cursor + @uncaged/workflow-agent-hermes
...
- Cursor adapter: spawn cursor-agent CLI, auto/specified model
- Hermes adapter: spawn hermes chat CLI
- Both: AgentFn interface, no nerve-core deps, Result-based config validation
- 93 tests pass, biome clean
Closes #10 , Closes #11
小橘 <xiaoju@shazhou.work >
2026-05-06 06:54:24 +00:00
xiaoju
c2a8f2d81b
feat: @uncaged/workflow-role-llm — role factory + zod@4 schema
...
Migrated from nerve/workflow-utils:
- createRole with zod@4 schema → typed meta + JSON Schema
- createLlmAdapter — LLM provider abstraction
- llmExtract/llmExtractWithRetry — structured output extraction
- decorateRole/withDryRun/onFail — role decorators
- buildDescriptorFromRoles — auto-generate descriptor from zod schemas
- Zero nerve-core dependencies
- 83 tests pass, biome clean
Closes #9
小橘 <xiaoju@shazhou.work >
2026-05-06 06:50:19 +00:00
xiaoju
3467b772e6
refactor: named exports (run + descriptor), remove build pipeline
...
- Bundle contract: export const run + export const descriptor (no default export)
- add only accepts .esm.js, extracts descriptor via dynamic import → .yaml
- Removed: build-pipeline, generate-types, json-schema-to-ts
- Worker loads mod.run instead of mod.default
- Biome: no more noDefaultExport overrides for bundles
- 62 tests pass, biome clean
Closes #8
小橘 <xiaoju@shazhou.work >
2026-05-06 06:39:15 +00:00
xiaoju
e670047e6a
feat: build pipeline — .ts → .esm.js + .yaml + .d.ts 三件套
...
- add command auto-detects .ts vs .esm.js input
- .ts: Bun.build → bundle + descriptor extraction + JSON Schema → .d.ts
- .esm.js: requires .yaml alongside, .d.ts optional
- JSON Schema → TypeScript type converter
- hello-world example workflow
- 63 tests pass, biome clean
Closes #7
小橘 <xiaoju@shazhou.work >
2026-05-06 06:26:14 +00:00
xiaoju
47e8fdf5b3
chore: replace hand-written xxhashjs.d.ts with @types/xxhashjs
...
小橘 <xiaoju@shazhou.work >
2026-05-06 06:21:46 +00:00
xiaoju
dfbba0f58c
feat: Phase 4 — fork threads + bun publish verified
...
- fork-thread.ts: parse .data.jsonl, trim steps by role
- cmd-fork.ts: --from-role <role> or retry last step
- engine: forkFrom lineage tracking, prefilled step replay
- worker: accept steps in run IPC command
- bun publish --dry-run: both packages pass
- 53 tests pass, biome clean
Closes #5
小橘 <xiaoju@shazhou.work >
2026-05-06 05:45:01 +00:00
xiaoju
0becafeb44
feat: Phase 3 — version history/rollback + pause/resume threads
...
- CLI: history, rollback, pause, resume commands
- Registry: rollbackWorkflowToHistoryHash
- Engine: awaitAfterEachYield hook for pause gate
- Worker: ThreadPauseGate with Promise-based latch
- TCP IPC: bidirectional response for kill/pause/resume
- 44 tests pass, biome clean
小橘 <xiaoju@shazhou.work >
2026-05-06 05:36:33 +00:00
xiaoju
9943f21f5c
refactor: WorkflowFn input → ThreadInput, remove threadId from bundle contract
...
- WorkflowFn first param is now ThreadInput { prompt, steps }
- threadId removed from WorkflowFnOptions and ThreadContext (engine-only)
- createRoleModerator seeds context from input.steps (fork/resume ready)
- New test: pre-filled steps skip already-completed roles
Closes #6
小橘 <xiaoju@shazhou.work >
2026-05-06 05:27:14 +00:00
xiaoju
9a4cec2b2d
docs(rfc-001): WorkflowFn input → ThreadInput for fork/resume support
...
- First param is now { prompt, steps } instead of bare prompt
- steps: [] for new thread, pre-filled for fork/resume
- createRoleModerator naturally handles resume via moderator routing
- No special replay logic needed
小橘 <xiaoju@shazhou.work >
2026-05-06 05:25:00 +00:00
xiaoju
7582a88d6b
feat: Phase 2 — Thread lifecycle, execution engine, worker, CLI
...
- types.ts: START/END, RoleMeta, ThreadContext, Role, Moderator, WorkflowDefinition
- engine.ts: executeThread with JSONL persistence + AbortSignal
- worker.ts: per-bundle process, TCP IPC, kill individual threads
- CLI: run/ps/kill/threads/thread/thread rm commands
- 32 tests pass, biome clean
小橘 <xiaoju@shazhou.work >
2026-05-06 04:59:54 +00:00
xiaoju
01e930df8f
docs(rfc-001): add execution model — Role, Moderator, Agent types
...
Ported from nerve's workflow types. Covers ThreadContext, StartStep,
RoleStep, Moderator (pure router), Role (async actor), AgentFn (LLM adapter),
WorkflowDefinition, and execution flow.
小橘 <xiaoju@shazhou.work >
2026-05-06 04:41:52 +00:00
xiaoju
8939194133
init: bun workspace + RFC-001 workflow engine design
...
- @uncaged/workflow (core lib) + @uncaged/cli-workflow (CLI)
- RFC-001: full design doc covering storage, threading, CLI
小橘 <xiaoju@shazhou.work >
2026-05-06 04:20:05 +00:00