Commit Graph

38 Commits

Author SHA1 Message Date
xiaomo e00a23dd80 docs: add READMEs for all packages, move sync-readme to docs/ 2026-05-25 09:51:54 +00:00
xiaomo d2225c8cdf chore: add sync-readme cursor rule 2026-05-25 09:46:19 +00:00
xiaomo 4d7b439aaa chore: add release script and prepublishOnly guard 2026-05-25 09:35:50 +00:00
xiaoju ccca0e60d1 chore: sync solve-issue.yaml from workflow repo
- $status discriminated union frontmatter
- Portable paths (.worktrees/ relative to repo root)
- Developer failed exit
- Reviewer rejected carries worktree field

小橘 🍊(NEKO Team)
2026-05-25 09:21:29 +00:00
xiaomo b7aa90d8e6 chore: add *.tsbuildinfo to .gitignore, remove duplicate dist/ entry 2026-05-25 04:14:14 +00:00
xiaomo 9a1954f6f9 fix: resolve lint errors — remove useless constructor, fix import ordering, replace as any with as unknown as JSONSchema in tests, apply biome formatting 2026-05-25 04:09:47 +00:00
xiaomo b062fcbc44 fix: add tsconfig paths for workspace package resolution
bun workspace:^ deps don't create node_modules symlinks,
so tsc can't resolve @uncaged/* packages by name.
Add explicit paths mapping to fix tsc --build.
2026-05-25 04:08:14 +00:00
xiaomo 0706307e85 fix: align all packages to 0.5.0 and restore workspace:^ deps
- All @uncaged/* packages → 0.5.0 (fixed versioning per changesets config)
- Restore workspace:^ for internal deps (was broken to ^0.3.0/^0.4.0)
- Regenerate bun.lock (removes duplicate npm registry entries)
2026-05-25 04:05:17 +00:00
xiaoju d57a454b78 docs: add CLAUDE.md with project conventions and code standards 2026-05-25 04:03:08 +00:00
xiaomo 34847cae59 Merge pull request 'feat!: self-validating meta-schema for putSchema' (#16) from fix/15-self-validating-meta-schema into main 2026-05-25 03:53:11 +00:00
xiaoju 054d78296a feat!: self-validating meta-schema for putSchema
Replace bootstrap payload with a JSON Schema meta-schema describing
our supported schema subset. putSchema now validates input schemas
against the meta-schema before storing, rejecting invalid schemas
with SchemaValidationError.

- bootstrap.ts: self-describing meta-schema (type, properties, required,
  additionalProperties, anyOf, items, format, title, enum, const, description)
- schema.ts: recursive isValidSchema(), SchemaValidationError class
- index.ts: export SchemaValidationError
- package.json: bump 0.4.0 → 1.0.0 (breaking change)

BREAKING CHANGE: meta-schema hash changed, old CAS data invalid.

Fixes #15
2026-05-25 03:51:43 +00:00
xiaoju 8f54dcfa7c chore: remove hardcoded paths from solve-issue workflow
Use git rev-parse, git worktree list, and git remote to detect
paths dynamically. No more ~/repos/ assumptions.

— 小橘 🍊(NEKO Team)
2026-05-25 01:43:40 +00:00
xiaoju 7828dd1c41 chore: generalize solve-issue workflow for any repo
Remove hardcoded ~/repos/workflow paths. Use git rev-parse and
basename to detect repo root and worktree base dynamically.

— 小橘 🍊(NEKO Team)
2026-05-25 01:40:48 +00:00
xiaoju a30af6efb5 chore: use workflow project's solve-issue with tester/committer
Replace minimal version with full 5-role workflow from workflow project.

— 小橘 🍊(NEKO Team)
2026-05-25 01:36:50 +00:00
xiaoju 712f930072 chore: add solve-issue workflow definition
— 小橘 🍊(NEKO Team)
2026-05-25 01:35:27 +00:00
scottwei cfe791180b Merge pull request 'feat: remove Store.list() from interface' (#14) from issue-11-remove-store-list into main
Reviewed-on: uncaged/json-cas#14
2026-05-25 01:35:02 +00:00
xiaoju 09526b63da fix: json-cas-fs and json-cas-workflow depend on json-cas ^0.4.0
小橘 🍊(NEKO Team)
2026-05-19 10:21:41 +00:00
xiaoju 00f191e105 chore: bump to 0.4.0
小橘 🍊(NEKO Team)
2026-05-19 10:19:38 +00:00
xiaoju 52cb7a30ba fix: publish compiled .js + .d.ts instead of raw .ts sources
- Add tsc --build pipeline for json-cas, json-cas-fs, json-cas-workflow
- Update package.json exports to point to dist/ (types + import)
- Fix Store type error: use BootstrapCapableStore for stores with bootstrap
- Export BootstrapCapableStore type from json-cas
- Fix meta-schema: nodeSchema now uses real JSON Schema (draft 2020-12)
- Exclude test files from tsc compilation

Breaking: bootstrap hash changes due to meta-schema payload update.

小橘 🍊(NEKO Team)
2026-05-19 10:18:31 +00:00
Scott Wei 1b53cf5ff8 feat: remove Store.list() from interface
Removes the list() method from the Store type and all implementations.
Callers now use listByType() or has() instead.

The CLI 'list' subcommand is removed. 'schema list' now uses
listByType(metaHash) to enumerate schemas.

Closes #11
2026-05-19 01:24:12 +08:00
xiaoju 17ed619900 chore: release @uncaged/* 0.3.0 2026-05-18 15:00:40 +00:00
xiaomo bad62a82a9 Merge pull request 'feat: disallow self-referencing nodes except via bootstrap()' (#13) from feat/12-no-null-type into main 2026-05-18 14:59:17 +00:00
xiaoju 4989cd31ba Remove null from Store.put typeHash parameter
Self-referencing nodes are created only through bootstrap() via an internal BOOTSTRAP_STORE symbol on memory and fs store implementations. put() always requires a Hash typeHash and uses computeHash.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 14:54:40 +00:00
xiaoju 38aad696fc chore: release @uncaged/* 0.2.0 2026-05-18 14:15:33 +00:00
xiaomo fb81f5a429 Merge pull request 'feat: add listByType(typeHash) to Store interface' (#10) from feat/9-list-by-type into main 2026-05-18 14:13:16 +00:00
xiaoju 5fc475704b feat: add listByType(typeHash) to Store interface
Implement in-memory type index and fs append-only _index files. Rebuild index from existing .bin nodes on first load when _index is missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 14:11:53 +00:00
xiaoju 6e77e4a110 fix: replace workspace:^ deps with real versions + merge cli global store path
- All packages bumped to 0.1.3 via changesets (fixed group)
- Replace workspace:^ with ^0.1.x in json-cas-fs, json-cas-workflow, cli-json-cas
- Merge PR #8: cli default store path → ~/.uncaged/json-cas/

Co-authored-by: 星月 🌙 (SORA Team)
小橘 🍊(NEKO Team)
2026-05-18 10:47:12 +00:00
xiaoju a3a21b153c fix: replace workspace:^ with ^0.1.1 in json-cas-fs deps 2026-05-18 10:43:22 +00:00
xingyue 32e634c3f1 cli: use ~/.uncaged/json-cas as default store path
Change default store directory from .cas/ (relative to cwd) to
~/.uncaged/json-cas/ (global fixed path). --store flag retained
as override.
2026-05-18 18:42:47 +08:00
xingyue d937ac6225 fix: disambiguate ajv default import for verbatimModuleSyntax consumers
Fixes TS2351 when json-cas source is resolved by downstream projects
(e.g. workflow) that use verbatimModuleSyntax + moduleResolution bundler.
2026-05-18 12:24:22 +08:00
xiaoju bf6aabe29d chore: bump to 0.1.1
小橘 <xiaoju@shazhou.work>
2026-05-18 02:52:38 +00:00
xiaoju 55b4a0a219 chore: add changesets, set version 0.1.0
小橘 <xiaoju@shazhou.work>
2026-05-18 02:48:58 +00:00
xiaoju 5d2af0e08a feat: workflow schema registration (@uncaged/json-cas-workflow)
- 11 JSON Schemas: agent, role-schema, role, workflow, thread-start,
  thread-step, thread-end, content, react-session, react-turn, react-tool-call
- registerWorkflowSchemas(store) → type hash map
- TypeScript types for all schema payloads
- Fixed core: AJV cas_ref format, collectRefs for anyOf/items/additionalProperties
- 43 new tests (107 total), biome clean

Closes uncaged/json-cas#7
小橘 <xiaoju@shazhou.work>
2026-05-18 02:10:19 +00:00
xiaoju 1ff719bf8b feat: Phase 4 — CLI (@uncaged/cli-json-cas)
- Full CLI: init, bootstrap, schema (put/get/list/validate),
  put, get, has, verify, list, refs, walk, hash, cat
- --store flag, --json compact output, --format tree
- biome override: noConsole off for CLI package
- 64 tests passing

Closes #6
小橘 <xiaoju@shazhou.work>
2026-05-17 09:37:27 +00:00
xiaoju 49b1d5d665 feat: Phase 3 — filesystem backend (@uncaged/json-cas-fs)
- createFsStore(dir) implementing Store interface
- CBOR binary blob storage with atomic writes (tmp+rename)
- Auto-create directory, idempotent put
- 15 new tests (64 total), biome clean

Closes #5
小橘 <xiaoju@shazhou.work>
2026-05-17 09:31:04 +00:00
xiaoju 913419981c feat: Phase 2 — schema system (JSON Schema + cas_ref + traversal)
- putSchema/getSchema for storing JSON Schemas as CAS nodes
- validate() with AJV for payload validation against schema
- refs() extracts cas_ref fields from schema for DAG edges
- walk() BFS traversal with cycle detection
- Bootstrap meta-schema self-reference verified
- 49 tests passing, biome clean

Closes #4
小橘 <xiaoju@shazhou.work>
2026-05-17 09:27:46 +00:00
xiaoju 9aac38238a feat: Phase 1 — core primitives (hash + CBOR + memory store)
- CBOR deterministic encoding (cborg, RFC 8949 §4.2)
- XXH64 → 13-char Crockford Base32 hashing
- createMemoryStore() with idempotent put
- verify() integrity check
- bootstrap() self-referencing meta-schema seed
- 23 tests passing, biome clean

Closes #3
小橘 <xiaoju@shazhou.work>
2026-05-17 09:23:05 +00:00
xiaoju 9645e37ab5 Initial commit 2026-05-17 09:00:36 +00:00