xingyue
93b96987a3
refactor: migrate threads index from YAML to ocas variable store (Phase 4b)
...
CI / check (pull_request) Failing after 12m38s
- Replace loadThreadsIndex/saveThreadsIndex with granular variable API:
loadAllThreads, getThread, setThread, deleteThread
- Variable: @uwf/thread/<thread-id>, value=head hash, tags=suspend metadata
- Auto-migration: threads.yaml → variables, renames to .migrated
- Updated ~20 call sites in thread.ts, step.ts, shared.ts
- workflow-util-agent: getActiveThreadEntry reads from variable store
- New test helper: seedThread/seedThreads
- biome fix: removed unused imports
- 22 files changed
Ref #11
2026-06-02 22:22:38 +08:00
xingyue
e067a2f25a
refactor: rebrand npm packages @uncaged/* → @united-workforce/*
...
CI / check (pull_request) Failing after 9m51s
Package mapping:
- @uncaged/cli-workflow → @united-workforce/cli
- @uncaged/workflow-protocol → @united-workforce/protocol
- @uncaged/workflow-util → @united-workforce/util
- @uncaged/workflow-util-agent → @united-workforce/util-agent
- @uncaged/workflow-agent-hermes → @united-workforce/agent-hermes
- @uncaged/workflow-agent-claude-code → @united-workforce/agent-claude-code
- @uncaged/workflow-agent-builtin → @united-workforce/agent-builtin
- @uncaged/workflow-dashboard → @united-workforce/dashboard
Changes:
- 8 package.json name + dependency refs
- 82 files: import statements updated
- .changeset/config.json updated
- CLAUDE.md updated
- bunfig.toml restored for preload
CLI command (uwf) and directory names unchanged.
Closes shazhou/united-workforce#8
2026-06-02 20:56:06 +08:00
xiaomo
10b478640d
feat: record suspend event as StepNode in CAS chain
...
- ThreadIndexEntry supports suspendedRole + suspendMessage metadata
- threads.yaml: suspended threads serialize as objects (backward compat)
- cmdThreadStepOnce writes step before marking thread suspended
- StepOutput extended with suspendedRole/suspendMessage fields
- thread show displays suspend message
Closes #589
2026-06-02 04:44:05 +00:00
xiaomo
ef0174a6f1
chore: migrate @uncaged/json-cas to @ocas/core, @uncaged/json-cas-fs to @ocas/fs
...
- Replace all package.json dependencies
- Update all imports across 7 packages + scripts
- cas_ref → ocas_ref in schema definitions
- listByType() adapted for ListEntry[] return type
- Update CLAUDE.md references
Fixes #585
2026-06-02 02:51:21 +00:00
xiaoju
dfdf0ac073
fix(cli-workflow): resolve step/thread commands on completed threads
...
Fixed issue #469 where `uwf step list`, `uwf step show`, and `uwf thread read`
failed with "thread not active" error when called on completed threads.
The root cause was that resolveHeadHash() in shared.ts only checked threads.yaml
(active threads index) but never fell back to history.jsonl (completed threads log).
Changes:
- Updated resolveHeadHash() in shared.ts to check history.jsonl as fallback
- Changed error message from "thread not active" to "thread not found"
- Added comprehensive test coverage:
- Unit tests for resolveHeadHash() with active/completed/missing threads
- Integration tests for cmdStepList() with completed threads
- Integration tests for cmdStepShow() with completed threads
- Regression tests for cmdThreadRead() with completed threads
All commands now work identically for active and completed threads.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-05-24 16:18:20 +00:00
xiaoju
669af841e1
refactor: address review feedback for CLI restructure
...
- Extract shared module (shared.ts) — walkChain, expandDeep, etc. deduplicated
- Hide step read command (half-baked, not ready for users)
- Remove cmdThreadKill dead code
- Revert unrelated protocol type change
- Revert unrelated package.json change
- Fix unused imports (biome)
Refs #463
2026-05-24 11:32:47 +00:00