9 Commits

Author SHA1 Message Date
xiaoju cf716c5115 feat: implement RFC-20 Phase 1 variable CRUD operations
Add a complete variable system for json-cas that provides mutable named
bindings to immutable CAS nodes.

Features:
- ULID-based variable identifiers (26-char Crockford Base32)
- Hierarchical scope validation (must end with /)
- Schema validation on update (prevents type mismatches)
- SQLite persistence (~/.uncaged/json-cas/variables.db)
- CLI commands: var create, get, update, delete

Implementation:
- Core types in variable.ts (Variable, VariableId)
- VariableStore class with SQLite backend
- Custom error types (VariableNotFoundError, SchemaMismatchError, etc.)
- Comprehensive unit tests (16 tests)
- CLI integration tests (12 tests)
- All outputs use JSON format

Test coverage:
- Variable creation with scope validation
- CRUD operations (create, read, update, delete)
- Schema consistency enforcement
- Error handling for all edge cases
- Full lifecycle integration tests

All tests pass (158 total), build clean, lint clean.

Fixes #21

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-30 05:57:05 +00:00
xiaoju 98dc91e848 Revert "chore: normalize to bun monorepo conventions"
This reverts commit 064c9afa1e.
2026-05-29 04:45:50 +00:00
xiaoju 064c9afa1e chore: normalize to bun monorepo conventions
CI / check (push) Failing after 43s
Applied monorepo normalization:
- Updated TypeScript to use composite project references with NodeNext
- Configured Biome for linting and formatting
- Standardized package.json metadata across all packages
- Set up changesets for version management and npm publishing
- Added vitest test infrastructure to all packages
- Created Gitea Actions CI pipeline
- Added solve-issue workflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-29 04:39:36 +00:00
xiaomo 0e38fd3ea9 chore: remove deprecated json-cas-workflow package
Types moved to @uncaged/workflow-protocol. npm package deprecated.
2026-05-25 10:26:03 +00:00
xiaomo 4d7b439aaa chore: add release script and prepublishOnly guard 2026-05-25 09:35:50 +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
xiaoju 55b4a0a219 chore: add changesets, set version 0.1.0
小橘 <xiaoju@shazhou.work>
2026-05-18 02:48:58 +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 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