324 Commits

Author SHA1 Message Date
xiaoju 5d871a1357 Merge pull request 'chore: bump @ocas/core to 0.4.1' (#96) from chore/bump-core-0.4.1 into main
CI / check (push) Successful in 6m16s
2026-06-07 15:46:31 +00:00
xiaoju 01cf04fb3a docs: rewrite changelogs — per-package scope, add dates, fix 0.4.1 entry
CI / check (pull_request) Successful in 2m52s
2026-06-07 15:34:13 +00:00
xiaoju 1531255698 chore: bump @ocas/core to 0.4.1
CI / check (pull_request) Successful in 2m38s
2026-06-07 15:20:19 +00:00
xingyue 1f5eb7883c Merge pull request 'chore: remove legacy-packages/' (#95) from chore/remove-legacy-packages into main
CI / check (push) Successful in 2m51s
chore: remove legacy-packages/ (#95)
2026-06-07 15:13:29 +00:00
xiaomo db4072396b chore: remove legacy-packages/ and docs/ — outdated content
CI / check (pull_request) Successful in 5m47s
- legacy-packages/e2e-check.yaml: old CLI name, bun, wrong repo path
- docs/sync-readme.md: generic README convention, not needed
- Remove stale CLAUDE.md reference to docs/
2026-06-07 15:00:44 +00:00
xingyue 40dacee1be Merge pull request 'fix: gc must traverse oneOf and preserve template content' (#94) from fix/93-gc-collectrefs-oneof into main
CI / check (push) Successful in 2m38s
2026-06-07 13:36:08 +00:00
xiaoju 4659258693 fix: gc must traverse oneOf and preserve template content
CI / check (pull_request) Successful in 3m46s
collectRefs silently skipped oneOf even though it is in the meta-schema's
allowed keys. uwf step nodes use the standard JSON-Schema idiom
oneOf: [{type:"null"}, {type:"string", format:"ocas_ref"}] for nullable
prev/detail/start refs, so walk() never reached the chain and gc swept
the intermediate steps as false orphans. Mirror the anyOf branch in
collectRefs so every oneOf variant contributes refs.

Also align gc with closure.ts Phase 3: walk @ocas/template/text/<schema>
content for every reachable schema so rendered template nodes survive
when their schema is reachable, and are still collected when the schema
itself is unreachable.

Fixes #93
2026-06-07 13:06:59 +00:00
xiaomo f5eef854a3 Merge pull request 'chore: release @ocas/core@0.4.0, @ocas/fs@0.4.0, @ocas/cli@0.4.0' (#92) from release/v0.4.0 into main
CI / check (push) Successful in 4m5s
2026-06-07 06:10:55 +00:00
xiaoju 741fea9e51 release: v0.4.0
CI / check (pull_request) Successful in 2m20s
@ocas/cli@v0.4.0 @ocas/core@v0.4.0 @ocas/fs@v0.4.0
2026-06-07 13:25:45 +08:00
xingyue 522b782571 chore: release @ocas/core@0.4.0, @ocas/fs@0.4.0, @ocas/cli@0.4.0 2026-06-07 13:25:10 +08:00
xiaomo 949663545f Merge pull request 'docs: add changeset skip-rebuild rule to CLAUDE.md' (#90) from chore/claude-md-changeset-rule into main
CI / check (push) Successful in 3m48s
Merge PR #90: docs: add changeset skip-rebuild rule to CLAUDE.md
2026-06-07 03:57:32 +00:00
xiaomo 544226041e Merge pull request 'feat: add ocas export / import — CAS closure bundling' (#91) from fix/83-export-import into main
CI / check (push) Successful in 3m10s
Merge PR #91: feat: add ocas export / import — CAS closure bundling (#83)
2026-06-07 03:48:37 +00:00
xiaoju dbfaf01031 docs: add export/import to README/cards; tidy bundle.ts imports
CI / check (pull_request) Successful in 2m35s
Address reviewer feedback on #83:

- Replace dynamic `await import("./bootstrap-capable.js")` in
  bundle.ts with a static top-of-file import (no real cycle exists,
  bootstrap.ts is already statically imported).
- Remove unused `bootstrapSym` Symbol.for() / `void bootstrapSym`
  dead code in importBundle.
- Move the misplaced `import { decode } from "cborg"` to the top of
  bundle.ts with the other imports.
- Document the new `export` / `import` commands and `--store`,
  `--scope`, `-o` flags in:
  - root README.md (commands + global flags)
  - packages/cli/README.md (command table + bundles section + global flags)
  - packages/cli/prompts/usage.md (`ocas prompt usage` output)
  - packages/core/README.md (Closure & Bundles API surface)
  - .cards/cli.md (bundle commands + --store architecture note)
2026-06-07 03:19:59 +00:00
xiaoju 4ba3a00de9 feat: add CAS closure export/import bundles
Implements `ocas export` / `ocas import` for shipping a self-contained
closure of CAS nodes, variables and tags between stores, plus a
read-only `--store <bundle.tar>` flag for inspecting bundles without
extracting them.

- core: computeClosure walks refs + schema chains and gathers vars/tags
- core: exportBundle / importBundle / loadBundleStore use a custom
  POSIX/ustar tar (no external deps); content-addressed dedup on import,
  optional --scope remap of non-@ocas variable names
- core: new @ocas/output/export and @ocas/output/import builtin schemas
- cli: new export and import commands, --store read-only mode, write
  commands rejected with a clear error when --store is set

Closes #83
2026-06-07 01:13:36 +00:00
xiaoju b2430172a2 docs: add changeset skip-rebuild rule to CLAUDE.md
CI / check (pull_request) Successful in 1m47s
No need to re-run build/test after adding a changeset markdown file.

小橘 🍊(NEKO Team)
2026-06-07 00:32:10 +00:00
xiaomo dd5cb49168 Merge pull request 'perf: implement lazy loading in FsStore (#85)' (#89) from fix/85-fsstore-lazy-loading into main
CI / check (push) Successful in 1m46s
Merge PR #89: perf: implement lazy loading in FsStore (#85)
2026-06-07 00:31:31 +00:00
xiaoju 48c099ba03 perf: implement lazy loading in FsStore
CI / check (pull_request) Successful in 1m40s
FsStore previously CBOR-decoded all .bin nodes into memory at startup,
making cold-open O(n) in time and memory. Now it scans only filenames
into a Set<Hash> at init and reads/decodes nodes from disk on first
get(). has() and listAll() use the filename set; put() write-throughs
to cache; delete() clears cache and disk. Index/meta migration still
performs a one-time scan when _index/ is missing.

Adds 12 new tests (L1-L12) covering startup-no-decode, lazy get,
filename-based has/listAll, write-through put, delete cleanup, list
operations, and migration/bootstrap regression. All existing tests
pass unchanged.

Fixes #85
2026-06-07 00:25:39 +00:00
xiaomo 22ec210813 Merge pull request 'docs: add efficiency guidelines to CLAUDE.md' (#88) from chore/claude-md-efficiency into main
CI / check (push) Successful in 1m42s
Merge PR #88: docs: add efficiency guidelines to CLAUDE.md
2026-06-06 23:51:12 +00:00
xiaoju 578973fd62 docs: add efficiency guidelines to CLAUDE.md
CI / check (pull_request) Successful in 1m44s
Reduce Claude Code agent overhead: skip malware comments on trusted code,
stop re-verifying after tests pass.

小橘 🍊(NEKO Team)
2026-06-06 23:47:12 +00:00
xiaomo 3e93794c59 Merge pull request 'fix: move CAS node files into nodes/ subdirectory (#84)' (#87) from fix/84-nodes-subdirectory into main
CI / check (push) Successful in 1m37s
Merge PR #87: fix: move CAS node files into nodes/ subdirectory (#84)
2026-06-06 23:46:07 +00:00
xiaoju 3b089c2291 fix: move CAS node files into nodes/ subdirectory
CI / check (pull_request) Successful in 1m45s
Restructure the FsStore on-disk layout so that all `<HASH>.bin` node
files live under a `nodes/` subdirectory of the store root, instead of
being interleaved with metadata directories (`_index/`, `_store.db`,
`_meta`) at the top level.

Pre-existing flat-layout stores are auto-migrated on first open: any
`.bin` files found in the store root are renamed (not copied) into
`nodes/`. Migration is idempotent and safe to re-run.

Fixes #84
2026-06-06 23:37:19 +00:00
xiaoju 5414332b7f Merge pull request 'chore: sync solve-issue workflow from uwf canonical version' (#86) from chore/sync-solve-issue-workflow into main
CI / check (push) Successful in 1m48s
2026-06-06 22:45:08 +00:00
xiaoju 146e7f4b69 chore: add changeset + doc update requirements to developer/reviewer
CI / check (pull_request) Successful in 1m49s
Developer: steps 12-13 — add changeset with correct bump type, update docs
Reviewer: checks 6-7 — verify changeset exists, docs updated for user-facing changes

小橘 🍊
2026-06-06 22:43:01 +00:00
xiaoju 071864c339 chore: sync solve-issue workflow from uwf canonical version
CI / check (pull_request) Successful in 1m46s
- Mode A/B/C logic for fresh issue / existing PR / tester bounce-back
- bun→pnpm references
- repoRemote frontmatter field
- Simplified oneOf schema (no redundant 'type: object')

小橘 🍊
2026-06-06 22:35:44 +00:00
xingyue 24bd04b884 Merge pull request 'chore: add changeset for prompt bootstrap rename' (#82) from chore/changeset-bootstrap into main
CI / check (push) Successful in 1m42s
2026-06-06 21:58:26 +00:00
xiaomo 7ae13289a9 chore: add changeset for prompt setup→bootstrap rename
CI / check (pull_request) Successful in 1m47s
2026-06-06 21:43:26 +00:00
xiaoju 0e71f4d88d Merge pull request 'chore: rename prompt setup→bootstrap, programmatic generation, bun→pnpm cleanup' (#81) from chore/80-bootstrap-cleanup into main
CI / check (push) Successful in 3m7s
2026-06-06 14:34:37 +00:00
xiaoju 7871db748f feat: add 'ocas prompt list' subcommand
CI / check (pull_request) Successful in 4m55s
Implements the missing 'list' case referenced in bootstrap output.

小橘 🍊
2026-06-06 14:29:22 +00:00
xiaoju e3c84c5794 chore: rename prompt setup→bootstrap, programmatic generation, bun→pnpm cleanup
CI / check (pull_request) Successful in 2m59s
Part 1: Rename 'ocas prompt setup' → 'ocas prompt bootstrap' in CLI
Part 2: Replace static setup.md with cmdPromptBootstrap() function
  - CLI_VERSION injected dynamically (same pattern as uwf)
  - Covers fresh install + upgrade scenarios
  - Includes preflight checks, skill install, e2e verification
Part 3: Clean up bun references in workflow YAML files
  - .workflows/retrospect-workflow.yaml: bun→pnpm
  - .workflows/solve-issue.yaml: bun→pnpm
  - .workflows/e2e-check.yaml: archived to legacy-packages/

Fixes #80
小橘 🍊
2026-06-06 14:03:24 +00:00
xiaomo 693feb19e2 Merge pull request 'chore: update workflow $START from _ to new/resume' (#79) from chore/uwf-start-new-resume into main
CI / check (push) Successful in 2m3s
2026-06-05 10:09:05 +00:00
xiaoju 050fc8eee4 chore: update workflow $START from _ to new/resume
CI / check (pull_request) Successful in 5m22s
Align with united-workforce#101 — $START now requires explicit
'new' and 'resume' status keys instead of magic '_'.

Refs shazhou/united-workforce#101
2026-06-05 09:57:24 +00:00
xiaoju 7c145597d5 Merge pull request 'fix: add allowBuilds for pnpm 11 CI' (#78) from fix/ci-allow-builds into main
CI / check (push) Successful in 1m50s
2026-06-04 10:46:07 +00:00
xiaoju 73db7b9cac fix: add allowBuilds for pnpm 11 CI
CI / check (pull_request) Successful in 2m10s
2026-06-04 10:39:12 +00:00
xiaoju 02a1c18ac5 Merge pull request 'fix: use corepack for pnpm in CI' (#77) from fix/ci-pnpm-setup into main
CI / check (push) Failing after 1m50s
2026-06-04 10:32:59 +00:00
xiaoju 1bd4edbdd1 fix: disable pnpm minimumReleaseAge in CI
CI / check (pull_request) Failing after 1m21s
pnpm 11 defaults minimumReleaseAge to 1440 min. Set to 0 in
pnpm-workspace.yaml for our own packages.
2026-06-04 10:13:46 +00:00
xiaoju 49f096b18f fix: use corepack for pnpm in CI
CI / check (pull_request) Failing after 32s
Drop pnpm/action-setup (requires explicit version), use corepack enable instead.
Also align Node to 22 (consistent with uwf).

Closes #76
2026-06-04 10:07:28 +00:00
xiaomo 0dfc26fcfe Merge pull request 'chore: add Gitea CI workflow' (#76) from chore/add-ci into main
CI / check (push) Failing after 16s
chore: add Gitea CI workflow (#76)
2026-06-04 09:38:05 +00:00
xiaoju 6b9ebd1796 chore: add Gitea CI workflow (build + lint + test)
CI / check (pull_request) Failing after 1m18s
小橘 🍊(NEKO Team)
2026-06-04 09:36:51 +00:00
xiaomo b3879c583a Merge pull request 'chore: use proman test instead of vitest run' (#75) from chore/proman-test-script into main
chore: use proman test instead of vitest run (#75)
2026-06-04 01:57:23 +00:00
xingyue 01d4f0fa14 chore: use proman test instead of vitest run 2026-06-04 09:51:30 +08:00
xiaomo d79d0227fa Merge pull request 'fix: resolve prompt files from package root instead of dist' (#74) from fix/prompt-path into main
fix: resolve prompt files from package root, suppress ExperimentalWarning in tests (#74)
2026-06-04 00:38:14 +00:00
tuanzi e4e4ce0f73 fix: suppress SQLite ExperimentalWarning in edge-cases and schema-validation tests
The local runCli helpers in edge-cases.test.ts (Phase 3/4/7) and raw
execFileSync calls in schema-validation.test.ts (tests 2.1, 2.3) were
missing NODE_NO_WARNINGS=1, causing ExperimentalWarning to leak into
stderr snapshots. Added env override to match what helpers.runCli
already does.
2026-06-04 00:36:38 +00:00
tuanzi 13b12ef50c fix: resolve prompt files from package root instead of dist
prompts/*.md files are not copied to dist/ during tsc build,
causing `ocas prompt setup/usage` to fail with ENOENT.

- Change join(__dirname, "prompts") → join(__dirname, "..", "prompts")
- Add prompts/ to package.json "files" for npm publishing
- Update snapshots (Node.js SQLite ExperimentalWarning + version string)
2026-06-04 00:11:28 +00:00
xiaomo a9d43abf28 release: @ocas/cli@0.3.1 @ocas/cli@0.3.1 2026-06-04 00:01:29 +00:00
xiaomo 6f054f6447 fix(cli): update prompts — bun→pnpm, remove stale --var-db flag 2026-06-03 23:49:11 +00:00
xiaomo 5e9b266ebd docs: add pkg descriptions/keywords/engines, fix core README
Fixes #70, #71, #72, #73
2026-06-03 23:23:48 +00:00
xiaomo c4d9205eb2 docs: update all documentation for node:sqlite, pnpm, proman workflow
- README: bun → pnpm, update API examples, add Node >=22.5.0 requirement
- CLAUDE.md: replace 3-phase release process with proman bump/publish
- Package READMEs: fix package names, update storage/API descriptions
- Cards: update store.md (sqlite), cli.md (db filename, remove --var-db)
- docs/sync-readme.md: update to proman workflow
2026-06-03 23:21:30 +00:00
xiaoju 9d17be8b7b release: v0.3.0 v0.3.0 2026-06-03 23:06:00 +00:00
xiaomo 7e9bd26fec fix: suppress ExperimentalWarning in tests via NODE_NO_WARNINGS env
- Use NODE_NO_WARNINGS=1 in execFileSync env instead of --no-warnings flag
- Remove overly broad process.removeAllListeners('warning') from CLI entry
- Add engines field requiring Node >=22.5.0 (node:sqlite availability)
- Update proman to 0.4.2
2026-06-03 23:02:43 +00:00
xiaomo 3168bf55c3 chore: add changeset for node:sqlite migration 2026-06-03 22:30:15 +00:00