Three scenarios testing the full CLI pipeline:
1. Linear workflow (planner → worker → $END): CAS chain integrity
2. Loop workflow (developer ↔ reviewer): moderator routing through cycles
3. Role mismatch detection: agent catches routing bugs
Uses workflow add → thread start → thread exec with uwf-mock,
verifying CAS state, thread lifecycle, and error handling.
Updated assertions to use getThread().status === 'completed'
(aligned with PR #45 unified thread storage).
Refs #33
New package @united-workforce/agent-mock (uwf-mock CLI):
- Reads pre-scripted outputs from a YAML mock data file (--mock-data)
- Counts existing CAS chain steps to determine step index
- Validates expected role matches actual moderator routing
- Stores minimal detail node in CAS for valid step refs
- Zero LLM, instant execution, 100% deterministic
Usage in config.yaml:
agents:
mock:
command: uwf-mock
args: ["--mock-data", "./fixtures/scenario.yaml"]
Refs #33
uwf thread resume now supports completed threads:
- Evaluates workflow graph from $START to find first role
- Clears completed state (status → idle, completedAt → null)
- Builds resume prompt with supplement context
- Full CAS chain preserved for rich context
Suspended resume behavior unchanged.
Cancelled/idle threads still rejected.
425 tests pass.
Part of #39, closes#43
- store.ts: all threads in @uwf/thread/* with status tag
- Remove HISTORY_VAR_PREFIX, ThreadHistoryLine, deleteThread
- Add loadActiveThreads, loadHistoryThreads, completeThread
- Add migrateHistoryVarsToThreadVars migration
- thread.ts: replace deleteThread+addHistoryEntry with completeThread
- shared.ts: remove findHistoryEntry fallback
- Update all tests for unified storage model
422 tests pass.
Part of #39, closes#41, closes#42
- ThreadIndexEntry gains status and completedAt fields
- createThreadIndexEntry defaults to idle/null
- normalizeThreadIndexEntry backward-compat defaults
- updateThreadHead resets to idle (衔尾蛇 resume prep)
- markThreadSuspended sets status=suspended
- New markThreadCompleted(entry, status, now) function
- serializeThreadIndexEntry includes new fields
Part of #39, closes#40
- @ocas/core and @ocas/fs upgraded from ^0.2.2 to ^0.3.0
- agent-hermes: replace better-sqlite3 with node:sqlite (DatabaseSync)
- Remove better-sqlite3 and @types/better-sqlite3 dependencies
- Fix remaining bun references in cli test helpers (execFileSync)
Refs #28
- Add missing await on store.cas.put() in run.ts:192
- Replace #!/usr/bin/env bun → #!/usr/bin/env node in all CLI bins
- Update issue-551 test to assert node shebang
- Update issue-551 test: assert bun engines removed (not present)
- Migrate session-detail tests from bun:sqlite to better-sqlite3 API
(db.exec for DDL, db.prepare().run() for inserts)
Refs #26
Remove migrateStorageIfNeeded() which created symlinks from
~/.uncaged/workflow → ~/.uwf and ~/.uncaged/json-cas → ~/.ocas.
This was temporary migration support. Users who still have old paths
can run a one-time copy manually.
Zero 'uncaged' references remain in active codebase.
createAgentStore was calling getCasDir(storageRoot) which resolves to
~/.uwf/cas/, but since Phase 3 all CAS data lives in ~/.ocas/.
getActiveThreadEntry already used getGlobalCasDir() correctly, causing
a split where thread lookup succeeded but CAS node reads failed.
Found during e2e walkthrough after Phase 0-5 migration.
- Remove entire 'uwf cas' command group from CLI
- Delete commands/cas.ts (only used by CLI + tests)
- Delete cas.test.ts and cas-exit-code.test.ts
- Update workflow YAMLs: uwf cas get/has/refs/walk → ocas
- Update e2e-walkthrough script to use ocas
- Update docs and reference files
- Keep store-global-cas.test.ts (internal CAS store tests)
CAS operations now go through 'ocas' CLI exclusively.
Agent text storage handled internally by uwf pipeline.
Closes#10
Delete all archived packages from legacy-packages/.
These were preserved for reference in the old repo but are
not needed in the new united-workforce repo.
Ref: shazhou/united-workforce#7
Problems on macOS:
- `-v $HOME:$HOME` let container's bun install overwrite host bun
binary (Linux ARM64 replaced macOS ARM64)
- Container couldn't reach host LLM endpoints (localhost != host)
- Hardcoded `~/repos/workflow` path didn't exist on all machines
Fixes:
- Mount source read-only (`-v $(pwd):/workspace:ro`) + copy inside
- Use container-local HOME (/root) to isolate bun/npm installs
- Add `--add-host=host.docker.internal:host-gateway` for Linux compat
- `docker cp` host config + sed localhost→host.docker.internal
- Use `debate.yaml` instead of `solve-issue.yaml` (no $SUSPEND dep)
- Fix cancel test: `--status cancelled` not `--status completed`
Verified: full 6-step walkthrough passes on macOS, host bun intact.
The $SUSPEND edge for insufficient_info uses {{{reason}}} template
variable, but the frontmatter schema was missing the reason field.
This caused workflow validation to reject the workflow on thread start.
Fixed in all 3 copies: .workflows/, examples/, workflows/