chore: migrate json-cas to ocas #586

Merged
xingyue merged 3 commits from chore/migrate-ocas into main 2026-06-02 03:07:50 +00:00
Owner

What

Replace @uncaged/json-cas@ocas/core and @uncaged/json-cas-fs@ocas/fs (v0.1.1).

Changes

  • 49 files, 7 packages + scripts
  • All package.json deps updated
  • All imports replaced
  • cas_refocas_ref in schema format strings
  • listByType() adapted for ListEntry[] return type (in cas.ts)
  • bootstrap() return type adapted (Record<string, Hash>)
  • CLAUDE.md updated
  • Storage paths (~/.uncaged/workflow) intentionally unchanged

Verification

  • bun run build
  • bun test — 406 pass, 1 pre-existing fail (unrelated apiKeyEnv test)

Fixes #585

## What Replace `@uncaged/json-cas` → `@ocas/core` and `@uncaged/json-cas-fs` → `@ocas/fs` (v0.1.1). ## Changes - 49 files, 7 packages + scripts - All `package.json` deps updated - All imports replaced - `cas_ref` → `ocas_ref` in schema format strings - `listByType()` adapted for `ListEntry[]` return type (in `cas.ts`) - `bootstrap()` return type adapted (`Record<string, Hash>`) - CLAUDE.md updated - Storage paths (`~/.uncaged/workflow`) intentionally unchanged ## Verification - `bun run build` ✅ - `bun test` — 406 pass, 1 pre-existing fail (unrelated `apiKeyEnv` test) Fixes #585
xiaomo added 1 commit 2026-06-02 02:51:38 +00:00
- 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
xiaomo added 1 commit 2026-06-02 02:53:39 +00:00
fix: config test reads source file from correct path
CI / check (pull_request) Failing after 58s
d8181e9fdf
Test was reading from dist/commands/config.ts which doesn't exist
(only .js files in dist). Navigate to src/ instead.
xiaomo added 1 commit 2026-06-02 02:55:45 +00:00
docs: update all docs to reference @ocas/core and ocas_ref
CI / check (pull_request) Failing after 1m2s
7a0c928a4a
- README.md, docs/architecture.md, docs/wf-stateless-design.md
- docs/builtin-agent-research.md
- All package README.md files
- cas_ref → ocas_ref, @uncaged/json-cas → @ocas/core, json-cas-fs → @ocas/fs
Owner

Review by 星月 ocas 迁移部分没问题,代码质量 OK。

不过这个 PR 混了至少 5 件事:

  1. json-cas → ocas 迁移(标题所述)
  2. 🆕 !include YAML tag(全新功能 + 测试)
  3. 🆕 .workflow/ 目录 + folder-based layout(name/index.yaml
  4. 🆕 solve-issue.yaml 大改(repoRemote 传递、Mode A/B/C、developer 验证步骤、test debugging escalation、reviewer worktree 强制验证)
  5. 🆕 committer 从 tea → Gitea API curl

建议拆分成独立 PR(至少 migration 和新功能分开),方便 review 和 revert。如果主人觉得可以一起合也行,代码本身没问题。

代码细节

  • include.ts path traversal guard 👍,nested include 递归传 customTags 也对
  • store.ts .workflow/ 优先于 .workflows/ 的 merge 逻辑清晰
  • validate.tsindex → dirname 推断 workflow name 正确
  • bootstrap() 返回值适配用了 aliases["@ocas/schema"] + undefined check 👍
  • listByType() 解构 { hash } 适配 ListEntry[] 正确

@沙洲 你看要拆还是直接合?

Review by 星月 ✅ ocas 迁移部分没问题,代码质量 OK。 不过这个 PR 混了至少 5 件事: 1. ✅ json-cas → ocas 迁移(标题所述) 2. 🆕 `!include` YAML tag(全新功能 + 测试) 3. 🆕 `.workflow/` 目录 + folder-based layout(`name/index.yaml`) 4. 🆕 solve-issue.yaml 大改(repoRemote 传递、Mode A/B/C、developer 验证步骤、test debugging escalation、reviewer worktree 强制验证) 5. 🆕 committer 从 tea → Gitea API curl 建议拆分成独立 PR(至少 migration 和新功能分开),方便 review 和 revert。如果主人觉得可以一起合也行,代码本身没问题。 ### 代码细节 - `include.ts` path traversal guard 👍,nested include 递归传 customTags 也对 - `store.ts` `.workflow/` 优先于 `.workflows/` 的 merge 逻辑清晰 - `validate.ts` 的 `index` → dirname 推断 workflow name 正确 - `bootstrap()` 返回值适配用了 `aliases["@ocas/schema"]` + undefined check 👍 - `listByType()` 解构 `{ hash }` 适配 ListEntry[] 正确 @沙洲 你看要拆还是直接合?
Owner

更正:之前看的是 three-dot diff,把 #584 的 !include / folder layout 误算进来了。

用 two-dot diff (main..branch) 确认,PR #586 纯粹是 ocas 迁移:

  • 60 个文件,imports @uncaged/json-cas@ocas/core / @ocas/fs
  • cas_refocas_ref
  • bootstrap() 返回值 + listByType() ListEntry 适配
  • package.json deps 更新
  • docs/README 更新

干净利落,LGTM 可以合。

更正:之前看的是 three-dot diff,把 #584 的 !include / folder layout 误算进来了。 用 two-dot diff (main..branch) 确认,PR #586 纯粹是 ocas 迁移: - 60 个文件,imports `@uncaged/json-cas` → `@ocas/core` / `@ocas/fs` - `cas_ref` → `ocas_ref` - `bootstrap()` 返回值 + `listByType()` ListEntry 适配 - package.json deps 更新 - docs/README 更新 干净利落,LGTM ✅ 可以合。
xingyue merged commit a335471cc7 into main 2026-06-02 03:07:50 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#586