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
eda00d1c8e
docs(rfc-001): bundle contract → AsyncGenerator, Role/Moderator → helper pattern
...
Breaking design change:
- Section 2: WorkflowFn is now an AsyncGenerator that yields RoleOutput
- Section 8: Role/Moderator demoted from contract to optional helper
- Engine controls the loop via generator protocol (DIP)
- Zero injection — bundles don't import engine types
小橘 <xiaoju@shazhou.work >
2026-05-06 05:18:56 +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
e9729fbe3a
chore: add structured logging convention + ban console.*
...
- biome.json: noConsole rule (nursery)
- CLAUDE.md: logging section — fixed 8-char Crockford Base32 tag per call site,
createLogger() API, CLI exception documented
小橘 <xiaoju@shazhou.work >
2026-05-06 04:33:33 +00:00
xiaoju
eeb5fa0d75
chore: add coding conventions from nerve
...
- CLAUDE.md: functional-first, type over interface, no optional props, Result type
- biome.json: lint + format config (Biome 1.9)
- tsconfig.json: strict mode, composite project references
- .cursor/rules: global conventions + no-dynamic-import
Adapted from uncaged/nerve for bun workspace.
小橘 <xiaoju@shazhou.work >
2026-05-06 04:26:03 +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