{"_id":"@aggreggator-labs/vault","name":"@aggreggator-labs/vault","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@aggreggator-labs/vault","version":"0.0.1","description":"The vault mechanics as a pure library: manifest, naming, neighbours, commit shape","type":"module","bin":{"vault-check":"bin/vault-check.ts","vault-watch":"bin/vault-watch.ts"},"exports":{"./hash":"./src/hash.ts","./manifest":"./src/manifest.ts","./items":"./src/items.ts","./shape":"./src/shape.ts","./transitions":"./src/transitions.ts","./watch":"./src/watch.ts","./save":"./src/save.ts","./check":"./src/check.ts","./presets":"./src/presets.ts","./views":"./src/views.ts","./transport":"./src/transport.ts"},"repository":{"type":"git","url":"git+https://github.com/aggreggator-labs/dotfiles.git","directory":"npm/vault"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"bd1c303d59501a361eeef529682ebb58f4de6884","_id":"@aggreggator-labs/vault@0.0.1","bugs":{"url":"https://github.com/aggreggator-labs/dotfiles/issues"},"homepage":"https://github.com/aggreggator-labs/dotfiles#readme","_nodeVersion":"26.8.1","_npmVersion":"11.19.0","dist":{"integrity":"sha512-rwArPzn5txE8mw+jW2gSeDhqIte+gpohqw4wAkaPBWRbS2BF/z4dPZv3gZ6hzpNKQvgZdaoEqAeuuygCJeFYKQ==","shasum":"dc99529eaea3ec42871ed225be53bbc5b38f635d","tarball":"https://registry.npmjs.org/@aggreggator-labs/vault/-/vault-0.0.1.tgz","fileCount":15,"unpackedSize":87097,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCetgiAEjL4U1ZJafBQtEPWQAzry+u9LCPzRWssASbmXQIgbueXmkUjeNG3JL4oSp+4AjaTbMLOjKU/3+uP1SP+EJc="}]},"_npmUser":{"name":"aggreggator-labs","email":"labs-npmjs@aggreggator.de"},"directories":{},"maintainers":[{"name":"aggreggator-labs","email":"labs-npmjs@aggreggator.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vault_0.0.1_1788784898076_0.3886098492763954"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-07T12:41:37.828Z","0.0.1":"2026-09-07T12:41:38.207Z","modified":"2026-09-07T12:41:38.498Z"},"maintainers":[{"name":"aggreggator-labs","email":"labs-npmjs@aggreggator.de"}],"description":"The vault mechanics as a pure library: manifest, naming, neighbours, commit shape","homepage":"https://github.com/aggreggator-labs/dotfiles#readme","repository":{"type":"git","url":"git+https://github.com/aggreggator-labs/dotfiles.git","directory":"npm/vault"},"bugs":{"url":"https://github.com/aggreggator-labs/dotfiles/issues"},"license":"MIT","readme":"# @aggreggator-labs/vault\n\nThe vault mechanics as a pure library. No git, no filesystem, no\nnetwork: every function takes data and returns data, so the rules\nin `docs/notes/vault-*.md` can be tested as claims.\n\nWhat each module decides:\n\n- `hash` — archive name length, birthday reserve, naming\n- `manifest` — parse `VAULT.md`, compile presets, six checks\n- `check` — read vaults from disk and run the checks: what\n  `vault-check` does\n- `items` — path to item, `NNNN-` formatting, neighbours\n- `shape` — commit shape, and what a user delete becomes\n- `watch` — what sits in the inbox or unsaved, reported, never\n  written\n- `save` — the grace timer and the save: pure commits, a branch,\n  a pull request\n- `presets` — `presets/*.md` next to the vaults, resolved by\n  name, never copied\n- `views` — `--around` and `--listing`: compiled, printed, never\n  stored\n- `transport` — git-backed: every operation is one pure commit\n\n## Where the rules come from\n\n- `hash_length = 7 + width` and the reserve it keeps:\n  `docs/notes/vault-width-and-hash-length.md`\n- presets, reference not copy, lists override wholesale:\n  `docs/notes/vault-presets.md`\n- the twelve fields and the six checks:\n  `docs/notes/vault-manifest.md`\n- neighbours from the number, gaps as a drift signal:\n  `docs/notes/vault-neighbours.md`\n- delete as a rename into the archive:\n  `docs/notes/vault-delete-as-archive.md`\n\n## What it is not\n\n`transport` is the one module that touches git. Every operation\nis explicit - add, edit, move, triage, remove - stages only its\nown paths, commits, measures the commit's shape and undoes it if\nthe shape is not the expected one. A refusal throws with the\nreason the user sees and leaves the tree as it was. The tests in\n`tests/vault-*.test.ts` are the executable form of the notes;\nwhen a note and a test disagree, one of them is wrong and the\ntest says which.\n\nNot published yet. Version `0.0.1` is the shape of the package,\nnot a release.\n\n## Running the check on a real vault\n\n```bash\nbun npm/vault/bin/vault-check.ts ../poe2/docs/plans\nbun npm/vault/bin/vault-check.ts ../poe2/docs/notes --json\n```\n\nReads `VAULT.md`, treats every subdirectory as a state and every\nentry in it as an item, and prints the manifest and tree\nfindings. Exit 1 when something was found, 2 when the directory\nis not a vault root. Presets are read from `presets/*.md` in the\nvault's parent directory, else in the repository root; a preset\nthat is named and not found is a finding. `--effective` prints\nthe compiled configuration, which is never stored. Several vault\ndirectories at once run the cross-vault checks: `numbers_with`\nduplicates and `exports_to`/`imports_from` agreement.\n\nTwo things the first real run taught the reader: a `README.md`\ninside a state is not an item, and at the root the **number**\ndecides — a file with `width` digits is an item in the implicit\nstate, a file without them is the inbox\n(`docs/notes/vault-flat-and-staged.md`). A file whose frontmatter\nsays `type: snapshot` is skipped, as poe2's notes `VAULT.md`\nprescribes.\n","readmeFilename":"README.md","_rev":"1-d35c0c0302b9ccec83e0a7e5fc54aa44"}