xiaoju
495c000356
refactor(workflow): split @uncaged/workflow-runtime from engine (Phase 1)
...
Create packages/workflow-runtime with the minimal runtime subset:
- Types (WorkflowFn, RoleOutput, AgentBinding, etc.)
- createWorkflow (pure orchestration, zero I/O)
- validateWorkflowDescriptor
- Result/ok/err, START/END constants
Zero external dependencies (zod as peer only).
Zero node:fs/node:path imports.
Engine (@uncaged/workflow) now depends on workflow-runtime and
provides CAS/merkle/extract implementations via injection.
Refs #121 , relates #122
2026-05-08 06:29:49 +00:00
xiaomo
7e662f9287
Merge pull request 'feat(cli): add serve command — Hono HTTP API server' ( #119 ) from feat/118-serve-api into main
2026-05-08 03:12:44 +00:00
xingyue
3ed38c65ec
feat(cli): add serve command — Hono HTTP API server
...
Adds `uncaged-workflow serve` command that exposes workflow data
via a local HTTP API for the upcoming Web UI (RFC #118 Phase 1).
Routes:
- GET /healthz — health check
- GET /api/workflows — list registered workflows
- GET /api/workflows/:name — show workflow details
- GET /api/workflows/:name/history — version history
- GET /api/threads — list threads (optional ?workflow= filter)
- GET /api/threads/running — list running threads
- GET /api/threads/:id — show thread records (parsed JSONL)
- GET /api/cas — list CAS hashes
- GET /api/cas/:hash — get CAS content
- POST /api/cas — store content, returns hash
- DELETE /api/cas/:hash — remove CAS entry
- POST /api/cas/gc — garbage collect
Default: 127.0.0.1:7860, configurable via --port/-p and --host.
Refs: #118
2026-05-08 11:07:13 +08:00
xiaoju
38f2b0eeb2
Merge pull request 'chore: bump all packages to 0.2.0' ( #117 ) from chore/bump-0.2.0 into main
2026-05-08 02:55:49 +00:00
xiaoju
586a0f824e
chore: gitignore .npmrc (contains auth token)
2026-05-08 02:55:35 +00:00
xiaoju
178f6c7519
chore: bump all packages to 0.2.0
2026-05-08 02:55:29 +00:00
xiaomo
3153ab26f6
Merge pull request 'feat(engine): supervisor scene — opt-in LLM thread stop (Phase 3)' ( #116 ) from feat/110-phase3-supervisor into main
2026-05-08 02:45:20 +00:00
xiaoju
014c442ed2
feat(engine): add supervisor scene — opt-in LLM-based thread stop (Phase 3)
...
Supervisor replaces maxRounds as primary stop mechanism. Every N rounds
(configurable via supervisorInterval, default 3), the engine calls a
cheap LLM to evaluate thread progress and decide continue/stop.
- New engine/supervisor.ts: runSupervisor + parseSupervisorDecisionText
- Supervisor is opt-in: no models.supervisor configured = always continue
- WorkflowConfig gains supervisorInterval (default 3, 0 to disable)
- Engine calls supervisor after each supervisorInterval rounds
- 256 tests pass, 14 new tests for supervisor logic
Refs #110
2026-05-08 02:38:54 +00:00
xingyue
1f7851d5e3
chore: remove outdated examples/ folder
...
Delete examples/ workspace and remove from workspaces config.
2026-05-08 10:32:57 +08:00
xiaomo
e68790dfc7
Merge pull request 'chore: remove all deprecated code' ( #115 ) from chore/114-remove-deprecated into main
2026-05-08 02:29:15 +00:00
xingyue
520b17b351
chore: remove all deprecated code
...
- Remove createThreadCas alias (CAS is global, not per-thread)
- Remove formatSkillDoc() legacy compat shim
- Remove help command (replaced by skill)
- Remove all 13 DEPRECATED_ALIASES flat commands + printDeprecation
- Fix CAS prompts in develop roles: remove stale <THREAD_ID> param
- Update README.md to remove createThreadCas reference
- Net: -86 lines, 241 tests pass
Closes #114
2026-05-08 10:27:27 +08:00
xiaomo
085cdcd3f4
Merge pull request 'feat: engine injects extract provider at runtime (Phase 2)' ( #113 ) from feat/110-phase2-migrate-extract into main
2026-05-08 02:23:58 +00:00
xiaoju
a8c1c158d6
feat: engine injects extract provider at runtime (Phase 2)
...
- createWorkflow(def, binding) — no more extract/llmProvider params
- Engine resolves extract provider from workflow.yaml via resolveModel
- WorkflowFnOptions now carries extract + llmProvider (engine-injected)
- Delete extract-provider.ts, inline maxDepth helper
- Template packages simplified: only take agent binding
- Breaking change: bundles no longer carry provider config
Refs #110
2026-05-08 02:21:45 +00:00
xiaomo
83649fd836
Merge pull request 'docs: add README.md to all 8 packages' ( #112 ) from docs/package-readmes into main
2026-05-08 02:19:25 +00:00
xingyue
a5c09adae6
docs: add README.md to all 8 packages
...
Each README includes: package description, install instructions,
usage example, API overview, and (for templates) role/moderator flow.
Packages documented:
- @uncaged/workflow (core)
- @uncaged/cli-workflow (CLI)
- @uncaged/workflow-agent-cursor
- @uncaged/workflow-agent-hermes
- @uncaged/workflow-agent-llm
- @uncaged/workflow-template-develop
- @uncaged/workflow-template-solve-issue
- @uncaged/workflow-util-agent
2026-05-08 10:17:40 +08:00
xiaomo
9e6cd9d615
Merge pull request 'feat: unified provider/model configuration (Phase 1)' ( #111 ) from feat/110-phase1-config-layer into main
2026-05-08 02:15:23 +00:00
xiaoju
1f1128ff4a
fix: address PR #111 review feedback
...
- Extract validateWorkspaceSegment to commands/init/validate.ts
- Unify splitProviderModelRef in config/, used by both resolve-model and registry-normalize
- Warn on missing models.default during parse (tag Z2KP9NWQ)
2026-05-08 02:14:20 +00:00
xiaoju
aa01283ce1
feat: unified provider/model configuration (Phase 1)
...
- New src/config/ folder: resolveModel(config, scene) with fallback to default
- WorkflowConfig now has providers + models instead of extract
- Delete ExtractProviderConfig, getExtractProvider uses resolveModel('extract')
- New resolve-model tests, updated existing tests
Refs #110
2026-05-08 02:08:19 +00:00
xiaoju
f81e2a8aac
Merge pull request 'chore: enforce folder module discipline in @uncaged/cli-workflow' ( #109 ) from chore/108-cli-module-discipline into main
2026-05-08 01:46:03 +00:00
xiaoju
2b38e583be
chore: enforce folder module discipline in @uncaged/cli-workflow
...
Each commands/ subfolder (cas, init, thread, workflow) now has:
- types.ts for all type definitions
- index.ts with pure re-exports only
- External imports go through index.ts
Closes #108
2026-05-08 01:42:32 +00:00
xiaoju
4ff1394224
Merge pull request 'chore: enforce folder module discipline in @uncaged/workflow' ( #107 ) from chore/106-workflow-module-discipline into main
2026-05-08 01:39:48 +00:00
xiaoju
2bbe5a3d0e
chore: enforce folder module discipline in @uncaged/workflow
...
Each folder now has:
- types.ts for all type definitions
- index.ts with pure re-exports only
- Cross-folder imports go through index.ts
Closes #106
2026-05-08 01:37:23 +00:00
xiaoju
a4237c0462
docs: add folder module discipline rules to CLAUDE.md
...
Four rules: index.ts entry point, types.ts for types, single export source,
index.ts is pure re-exports. Also fix stale build command reference.
Refs #102
2026-05-08 01:29:22 +00:00
xiaomo
321e5b1379
Merge pull request 'chore(cli): remove unused <thread-id> from CAS commands' ( #105 ) from chore/cleanup-cas-thread-id into main
2026-05-08 01:25:33 +00:00
xingyue
7c3e14c473
chore(cli): remove unused <thread-id> from CAS commands
...
CAS is global (not per-thread). The underlying cmdCas* functions
already dropped threadId in #103 , but the CLI dispatch layer still
required it from users. Now cleaned up:
- cas get <hash> (was: cas get <thread-id> <hash>)
- cas put <content> (was: cas put <thread-id> <content>)
- cas list (was: cas list <thread-id>)
- cas rm <hash> (was: cas rm <thread-id> <hash>)
- skill.ts develop topic updated to match
2026-05-08 09:23:39 +08:00
xiaoju
aecce595e8
Merge pull request 'refactor: organize workflow/src into 6 module folders' ( #104 ) from refactor/102-module-folders into main
2026-05-08 01:23:24 +00:00
xiaoju
cf17dedac3
refactor: organize workflow/src into 6 module folders
...
Move 34 flat modules into cas/, registry/, bundle/, extract/, engine/, util/.
Move gc.ts to engine/ (was in cas/) to avoid cas→engine reverse dependency.
Dependency direction: util ← cas ← extract ← engine, util ← registry ← bundle.
No logic changes — only file locations and import paths.
Refs #102
2026-05-08 01:22:01 +00:00
xiaomo
661fdbb263
Merge pull request 'refactor(cli): Phase 4 cleanup — dedup, extract, deprecate' ( #103 ) from refactor/97-phase4-cleanup into main
2026-05-08 01:17:17 +00:00
xingyue
201abf98ce
refactor(cli): Phase 4 cleanup — dedup, extract, deprecate
...
- bundle-store.ts: remove private pathExists, import from fs-utils
- thread-scan.ts: extract parseFirstJsonLineObject helper, dedup first-line parsing
- commands/workflow/add-argv.ts: extract parseAddArgv from add.ts
- commands/thread/fork-argv.ts: extract parseForkArgv from fork.ts
- commands/cas/*.ts: remove unused _threadId params from cmdCas* functions
- cli-dispatch.ts: add deprecation warning to help command
- commands/init/templates.ts: extract template strings from template.ts
- cli-color.ts: extract shouldUseColor, highlightLiveRole, dimGreyLine from live.ts
- 242 tests pass, biome clean
Closes #97
2026-05-08 09:14:40 +08:00
xiaomo
665965fd01
Merge pull request 'refactor(cli): split cli-dispatch.ts into group dispatchers + usage module' ( #101 ) from refactor/96-phase3-split-dispatch into main
2026-05-08 01:07:04 +00:00
xingyue
6a99f84025
refactor(cli): split cli-dispatch.ts into group dispatchers + usage module
...
- cli-dispatch.ts: 775 → 149 lines (top-level routing only)
- cli-usage.ts: usage formatting (formatCliUsage, formatUsageCommandLines)
- cli-command-types.ts: shared types (DispatchFn, CommandEntry, CommandGroup)
- cli-registry.ts: getCommandRegistry() assembling all group tables
- cli-usage-context.ts: decouple usage from registry (avoids circular deps)
- commands/{workflow,thread,cas,init}/dispatch.ts: group-specific dispatch
functions + subcommand tables
- 242 tests pass, CLI output identical, biome clean
Refs #96
2026-05-08 09:04:27 +08:00
xiaomo
f61474bec0
Merge pull request 'refactor(cli): merge kill/pause/resume into control.ts + extract readWorkerCtl' ( #100 ) from refactor/95-phase2-control-merge into main
2026-05-08 00:58:11 +00:00
xingyue
9bdb18afd0
refactor(cli): merge kill/pause/resume into control.ts + extract readWorkerCtl
...
- Merge three near-identical files (kill.ts, pause.ts, resume.ts) into
commands/thread/control.ts with parameterized cmdThreadControl()
- Extract readWorkerCtl() into worker-spawn.ts to eliminate duplicated
WorkerCtl parsing logic
- Update cli-dispatch.ts and test imports
- Net reduction: ~59 lines
Refs #95
2026-05-08 08:55:25 +08:00
xiaomo
2af299f3ce
Merge pull request 'refactor(cli): restructure cmd-*.ts into commands/ subdirectories' ( #98 ) from refactor/93-phase1-directory-restructure into main
2026-05-08 00:48:30 +00:00
xiaoju
d9f79c60a1
Merge pull request 'chore: remove unused build scripts' ( #99 ) from chore/remove-build-scripts into main
2026-05-08 00:46:54 +00:00
xiaoju
485bfcb0b6
chore: remove unused build scripts
...
All packages are pure Bun/TS — no build step needed.
The build scripts were all placeholder `echo 'TODO'` anyway.
2026-05-08 00:46:35 +00:00
xiaoju
a47ed06ea5
Merge pull request 'docs: create README.md, update architecture.md for current structure' ( #89 ) from docs/88-readme-architecture-cleanup into main
2026-05-08 00:42:16 +00:00
xingyue
2ef004eecf
refactor(cli): restructure cmd-*.ts into commands/ subdirectories
...
Reorganize flat cmd-*.ts files into commands/{workflow,thread,cas,init}/
subdirectories that strictly mirror the CLI subcommand hierarchy:
- workflow/: add, list, show, rm, history, rollback
- thread/: run, list, show, rm, fork, ps, kill, live, pause, resume
- cas/: get, put, list, rm, gc
- init/: workspace, template
Each group has an index.ts re-export. Split multi-command files
(cmd-cas.ts, cmd-thread.ts, cmd-init.ts) into per-subcommand files.
Rename cmd-help.ts → skill.ts to match the primary command name.
Update all import paths in cli-dispatch.ts and test files.
Pure structural change — no logic modifications.
Ref: #93 , closes #94
2026-05-08 00:36:54 +08:00
xiaoju
2616259a0f
Merge pull request 'feat(reviewer): enrich prompt with conventions + CLI awareness' ( #92 ) from feat/91-reviewer-prompt into main
2026-05-07 16:27:08 +00:00
xiaoju
23b2c3b47d
feat(reviewer): enrich prompt with conventions awareness + strict verdicts
...
- Read preparer's conventions from thread context
- Review checklist: correctness, conventions, consistency, edge cases
- No nits: every issue is blocking, approve only at zero issues
- Generic prompt, no workflow-specific concepts
Closes #91
小橘 🍊
2026-05-07 16:25:31 +00:00
xiaoju
7d3954097d
docs: fix deprecated CLI commands in README
...
- workflow add (was: add)
- workflow list (was: list)
- thread list (was: threads)
- thread show (was: thread)
小橘 🍊
2026-05-07 16:15:29 +00:00
xiaoju
4a925b98af
docs: create README.md, update architecture.md for current structure
...
- Create root README.md with project intro, concepts, packages, quickstart
- Remove workflow-role-* references from docs/architecture.md
- Roles now live inside template packages (src/roles/)
- Clean up untracked dist/packages/workflow-role-* remnants
Fixes #88
2026-05-07 16:10:37 +00:00
xingyue
bfea771a52
Merge pull request 'fix(cli): improve usage format + fix skill index title' ( #86 ) from fix/85-usage-format into main
2026-05-07 15:33:27 +00:00
xiaoju
5e411a1f19
fix(cli): improve usage output format + fix skill index title
...
- Usage: grouped sections with titles, aligned descriptions
- Header: 'uncaged-workflow — workflow engine CLI'
- Footer: 'Use <command> --help for subcommand details.'
- Fix skill index title: 'uncaged-workflow skill' (was: help --skill)
- 242 tests pass
Closes #85
小橘 🍊
2026-05-07 15:31:48 +00:00
xingyue
21238f7825
Merge pull request 'fix(cli): usage not red + skill subcommand + --help flag' ( #84 ) from fix/83-cli-ux into main
2026-05-07 15:19:08 +00:00
xiaoju
6b3aa4ce35
fix(cli): usage not red + skill subcommand + --help flag on groups
...
1. No-args usage uses printCliLine (not printCliError), exit 1
2. 'skill [topic]' as first-class command (help --skill kept as compat)
3. 'workflow --help', 'thread --help' etc. show group subcommands
4. Role prompts updated: 'uncaged-workflow skill develop'
240 tests (6 new), build clean.
Closes #83
小橘 🍊
2026-05-07 15:17:20 +00:00
xingyue
f042c9d640
Merge pull request 'feat(cli): help --skill <topic> for context-specific agent docs' ( #82 ) from feat/81-skill-topics into main
2026-05-07 15:08:41 +00:00
xiaoju
66bca9ef03
feat(cli): help --skill <topic> — context-specific docs for agents
...
- help --skill (no args) → lists available topics
- help --skill cli → full CLI reference (was: help --skill)
- help --skill develop → thread ID, CAS, meta output guide for roles
- help --skill author → bundle structure, descriptor, role definition
- Role prompts updated: planner/coder reference 'help --skill develop'
- Legacy formatSkillDoc() preserved for compat
- 234 tests (15 new), build clean
Closes #81
小橘 🍊
2026-05-07 15:03:08 +00:00
xiaoju
309af39447
Merge pull request 'fix(cli): review nits — live --latest args + dispatchInit consistency' ( #79 ) from fix/75-nits into main
2026-05-07 14:54:28 +00:00
xiaoju
86a422f7e2
fix(cli): nits from review — live --latest in args, dispatchInit uses dispatchGroup
...
小橘 🍊
2026-05-07 14:54:02 +00:00