Commit Graph

274 Commits

Author SHA1 Message Date
xiaoju 385815534f Merge pull request 'refactor(core): update all functions to accept OcasStore (single param)' (#46) from fix/41-ocas-store-single-param into main 2026-06-02 09:05:57 +00:00
xiaoju e53f473fc2 refactor(core): update all functions to accept OcasStore (single param)
- bootstrap(store) — uses store.cas + store.var
- gc(store) — uses store.cas + store.var
- render/renderAsync/renderDirect — uses store.cas + store.var for templates
- refs/walk/validate/getSchema/putSchema — uses store.cas
- wrapEnvelope — uses store.cas + store.var
- registerOutputTemplates — uses store.cas + store.var
- Remove VariableStore SQLite class from @ocas/core
- Zero bun:sqlite imports in core
- Update @ocas/fs and @ocas/cli to new signatures
- 560 tests pass

Fixes #41
2026-06-02 08:15:07 +00:00
xiaoju 8c075b3310 Merge pull request 'feat(core): MemoryStore returns OcasStore (cas + var + tag)' (#45) from fix/40-memorystore-ocas into main 2026-06-02 06:54:24 +00:00
xiaoju 0f10580937 test: update snapshots for Phase 2 changes 2026-06-02 06:54:09 +00:00
xiaoju 56e3253829 feat(core): MemoryStore returns OcasStore (cas + var + tag)
Rewrite createMemoryStore() to return an OcasStore with three sub-stores:
cas, var, tag. The cas sub-store keeps the existing Map-based logic, but
its put is now synchronous; the in-memory VarStore and TagStore are new
Map-based implementations of the types defined in #39.

The legacy Store.put signature is widened to Hash | Promise<Hash> so that
the new sync cas can still be passed to helpers (bootstrap, gc, render,
schema, …) that have not yet been migrated to the unified surface.

Tests in packages/core were mechanically updated from store.* to
store.cas.* and new test suites for VarStore (var-store.test.ts) and
TagStore (tag-store.test.ts) cover the spec from issue #40.

Closes #40

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-02 06:30:01 +00:00
xiaoju 7ff3e438be Merge pull request 'feat(core): define CasStore, VarStore, TagStore, Store types' (#44) from fix/39-store-types into main 2026-06-02 05:56:07 +00:00
xiaoju 828514def5 feat(core): define CasStore, VarStore, TagStore, Store types
Fixes #39
2026-06-02 05:54:32 +00:00
xiaoju c83e98cd7e docs: use @ocas/ prefix consistently in test names, comments, and error messages 2026-06-02 04:40:06 +00:00
xiaoju db5272a64a docs(cli): fix README — use @ocas/schema instead of @schema shorthand 2026-06-02 04:29:01 +00:00
xiaoju e1c4fb86bc chore: restore workspace:* deps on main 2026-06-02 04:27:01 +00:00
xiaoju 0f1bf0383a chore: merge release v0.1.2 2026-06-02 04:27:01 +00:00
xiaoju 3d19707e7b chore: release v0.1.2 v0.1.2 2026-06-02 04:26:49 +00:00
xiaoju 20922d92c2 chore: publish 0.1.2-rc.2 2026-06-02 04:19:23 +00:00
xiaoju b22da63bf8 chore: update changeset description for postinstall → help hint change 2026-06-02 04:06:56 +00:00
xiaoju 45f0d83af3 fix(cli): replace postinstall with help hint, update setup to guide old skill cleanup
- Remove postinstall script (blocked by bun security policy)
- Add agent skill hint with version to help output
- Update setup.md to guide cleanup of old skill versions
2026-06-02 04:06:43 +00:00
xiaoju 56f003077a chore: publish 0.1.2-rc.1 2026-06-02 03:37:43 +00:00
xiaoju 52ebd9ed8e chore: prepare release/0.1.2 — fix workspace deps to 0.1.1 2026-06-02 03:32:49 +00:00
xiaoju ec6db5f494 fix(cli): use bun for postinstall (consistent with cli runtime) 2026-06-02 03:24:19 +00:00
xiaoju 5d54c0988c fix(cli): use node instead of sh for postinstall (Windows compat) 2026-06-02 03:22:20 +00:00
xiaoju fbcd1b5b0e chore: add changeset for postinstall message 2026-06-02 03:21:11 +00:00
xiaoju 191926428a feat(cli): add postinstall message guiding agents to run ocas prompt setup 2026-06-02 03:18:38 +00:00
xiaoju 077537ea5b chore: add changesets for #35 render newline fix and #37 LSP errors fix 2026-06-02 03:14:20 +00:00
xiaoju 84386f8a63 docs: add 0.1.0 initial release entries to CHANGELOGs 2026-06-02 03:10:43 +00:00
xiaoju eebdeb23da chore: clean up CHANGELOGs — remove pre-OCAS history
Drop all entries from the uncaged/json-cas era (≤0.6.0). OCAS starts
at 0.1.0; only 0.1.1+ entries are relevant.
2026-06-02 03:09:15 +00:00
xiaoju 350ee3d7b5 style: fix all biome warnings and infos
- Use template literals instead of string concatenation
- Remove unused imports and variables
- Use export type for type-only exports
- Use literal keys instead of computed string keys
2026-06-02 03:07:34 +00:00
xiaoju 02a364eb0b Merge pull request 'fix: resolve all TypeScript LSP errors in CLI package' (#37) from fix/36-cli-lsp-errors into main 2026-06-02 02:59:18 +00:00
xiaoju 8176a228b2 fix: resolve all TypeScript LSP errors in CLI package
1. CLI tsconfig: disable composite/declaration/declarationMap, enable
   noEmit — CLI runs via bun, never compiled by tsc. Eliminates all
   TS6059/TS6307 rootDir errors.

2. Use conditional spread to filter undefined values before passing to
   renderAsync/renderDirect/tag — satisfies exactOptionalPropertyTypes.

3. Fix TS2304: schemaHash not in scope in template delete catch block,
   use schemaInput instead.

Fixes #36
2026-06-02 02:58:47 +00:00
xiaomo 2952b953b3 Merge pull request 'fix: render trailing newline and pipe mode template rendering' (#35) from fix/33-34-render-bugs into main 2026-06-02 02:39:43 +00:00
xiaoju 1554fbc719 fix: render trailing newline and pipe mode template rendering
- Add trailing newline to all render output (#33)
- Fix render -p pipe mode to resolve hash values through renderAsync
  with template support instead of renderDirect (#34)
- Always open varStore in render command (needed for pipe+hash path)
- Update test expectations for trailing newline

Fixes #33
Fixes #34
2026-06-02 02:34:36 +00:00
xiaoju 3d903eaff8 chore: restore workspace:* deps on main 2026-06-02 02:08:29 +00:00
xiaoju d8f2abbe12 chore: merge release v0.1.1 2026-06-02 02:08:15 +00:00
xiaoju 0919f71f7e chore(release): v0.1.1
- ocas prompt usage/setup commands
- --version flag
- CHANGELOG cleanup: fix package names @uncaged/* → @ocas/*
v0.1.1
2026-06-02 02:07:48 +00:00
xiaoju 944f6c3254 chore: bump version to 0.1.1-rc.2 2026-06-02 02:00:58 +00:00
xiaoju 6bc767d37e docs: update release process — three-phase prepare/candidate/finalize
Changeset files are only consumed once at finalize. Prerelease (rc)
never touches changesets or CHANGELOG.
2026-06-02 01:52:32 +00:00
xiaoju efb0a0e721 chore: add changeset for --version flag 2026-06-02 00:46:23 +00:00
xiaoju 5f544c019f feat: add --version flag to CLI
Reads version from package.json and prints to stdout.

Fixes #32
2026-06-02 00:39:22 +00:00
xiaoju ab1e6df774 feat: add --version flag to CLI
Reads version from package.json and prints to stdout.

Fixes #32
2026-06-02 00:39:16 +00:00
xiaoju b43bbef80f chore: update release scripts and CLAUDE.md
- prepare-release.sh: delete consumed changesets from main after branching
- publish.sh: add --rc flag for prerelease (rc.N, auto-increment)
- publish.sh: auto-fix workspace:* and version in all packages
- publish.sh: auto-restore workspace:* on main after final release
- CLAUDE.md: document changeset-on-main, prerelease, and final release flows
2026-06-02 00:14:07 +00:00
xiaoju b687ff82b3 style: biome format fixes 2026-06-02 00:12:43 +00:00
xiaoju 04433e81ab chore: set version 0.1.1-rc.1 for prerelease 2026-06-02 00:01:57 +00:00
xiaoju c9829e70ee chore: fix workspace deps for publish 2026-06-02 00:01:50 +00:00
xiaoju b19f38c41a style: biome format fixes 2026-06-02 00:01:37 +00:00
xiaoju 52072a0065 chore(release): prepare v0.1.1 2026-06-02 00:01:25 +00:00
xiaoju ec9e04c5c6 chore: add changeset for prompt commands 2026-06-01 23:56:16 +00:00
xiaomo 558a70fc04 Merge pull request 'feat: add ocas prompt usage/setup commands' (#31) from feat/prompt-command into main 2026-06-01 23:54:12 +00:00
xiaoju 656c780270 feat: add ocas prompt usage and ocas prompt setup commands
- `ocas prompt usage` — outputs skill body (SKILL.md content without frontmatter)
- `ocas prompt setup` — outputs agent installation instructions

Prompt content is bundled with the CLI and versioned with it.
2026-06-01 23:53:12 +00:00
xiaoju 307fa032ad chore: restore workspace:* deps on main 2026-06-01 17:09:59 +00:00
xiaoju 46d7991002 chore: merge release v0.1.0 2026-06-01 17:09:41 +00:00
xiaoju 60d7897206 chore(release): v0.1.0 — fix workspace deps for publish v0.1.0 2026-06-01 17:09:21 +00:00
xiaoju 54188a1015 fix: restore core version to 0.1.0 2026-06-01 17:01:28 +00:00