Skip to content

chore(release): memory-core 0.2.0 - account vault + discover schema#15

Merged
vreshch merged 1 commit into
masterfrom
feat/account-discover-schema
Jul 6, 2026
Merged

chore(release): memory-core 0.2.0 - account vault + discover schema#15
vreshch merged 1 commit into
masterfrom
feat/account-discover-schema

Conversation

@vreshch

@vreshch vreshch commented Jul 6, 2026

Copy link
Copy Markdown
Member

What

Prepares the config layer for the agentage account sync channel (decision V4). Additive minor: 0.1.3 -> 0.2.0.

Changes

  • isAccountVault(entry) - exported predicate; the reserved agentage origin is the account-channel sentinel (promoted from the internal isAgentage). No new per-entry fields; an account vault is the existing flat shape { path, origin: [{ remote: "agentage", interval? }] }.
  • discover[] on the config schema + DiscoverRoot type - optional discovery roots { path, autosync?=true, ignore?: string[] }. Validated and passed through; the watching/persistence lives in the CLI daemon.
  • scanDiscoverRoots(config, deps?) - pure, fs-injectable helper that enumerates candidate account vaults in the account shape (path + agentage origin + mcp:['local']), skipping names that fail the vault-name rule ^[A-Za-z0-9_-]{1,64}$, are ignored, or already match a registered vault by name or resolved path. autosync:false -> interval:0. No writes.
  • Published JSON Schema - schema/vaults.schema.json derived from the live zod schema (buildVaultsJsonSchema, z.toJSONSchema), committed and added to the npm files whitelist. npm run generate-schema regenerates it; a drift test deep-equals committed vs live so drift fails CI. Consumers resolve it via vaultsSchemaPath().
  • Existing vaultsDir/autodiscover zero-config behavior untouched.
  • README: account entry shape + discover[].

New exports

isAccountVault, scanDiscoverRoots, DiscoverCandidate, ScanDeps, DiscoverRoot, isValidVaultName, VAULT_NAME_PATTERN, buildVaultsJsonSchema, vaultsSchemaPath, VAULTS_SCHEMA_FILENAME.

Verification

npm run verify green locally: type-check + lint + format:check + build + 104 tests (89 pre-existing + 15 new). npm ci in sync.

Prepare the config layer for the agentage account sync channel (V4).

- Export isAccountVault(entry): the reserved "agentage" origin is the
  account channel sentinel (promoted from the internal isAgentage).
- Add discover[] to the config schema + types: optional discovery roots
  { path, autosync?, ignore? }. Shape only - the CLI daemon watches them.
- Add scanDiscoverRoots(config, deps?): pure, fs-injectable enumeration of
  candidate account vaults in the flat account shape (path + agentage
  origin + local mcp), filtering by vault-name rule, ignore, and
  already-registered name/path; autosync:false -> interval 0.
- Publish the config JSON Schema: schema/vaults.schema.json (zod
  toJSONSchema, committed + in the npm files whitelist) with a
  generate-schema script and a drift test; export vaultsSchemaPath().
- README: account entry shape + discover[]. Version 0.1.3 -> 0.2.0.
@vreshch vreshch marked this pull request as ready for review July 6, 2026 15:18
@vreshch vreshch merged commit 9653e42 into master Jul 6, 2026
1 check passed
@vreshch vreshch deleted the feat/account-discover-schema branch July 6, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant