{"_id":"@buildtovalue/anchor-git","_rev":"2-da2cb2b1944782a0232513f9d07bf355","name":"@buildtovalue/anchor-git","dist-tags":{"latest":"1.0.2-next.0"},"versions":{"1.0.1":{"name":"@buildtovalue/anchor-git","version":"1.0.1","keywords":["bpmn","anchor","git","trust","governance"],"license":"Apache-2.0","_id":"@buildtovalue/anchor-git@1.0.1","maintainers":[{"name":"danzeroum","email":"danzeroum@gmail.com"}],"homepage":"https://github.com/danzeroum/bpmn#readme","bugs":{"url":"https://github.com/danzeroum/bpmn/issues"},"dist":{"shasum":"bb515f4c0dee2dbfaf204be8183add7672a09f0c","tarball":"https://registry.npmjs.org/@buildtovalue/anchor-git/-/anchor-git-1.0.1.tgz","fileCount":16,"integrity":"sha512-eQg+wccaicKeAEcSRrwhbLf/zongKVmRMu8nwF2k8mlfCJiE6FtA1fJJ5IV3QGdVbrGVJK6F2hrPOshAvxpJGQ==","signatures":[{"sig":"MEYCIQCKCa7VrCnUsYUc57n8TKs74Jm+fYiGKoHwajuXau+bcQIhAJOp2ZVrkfx/4HtXtJo1n9AV37geY6G10obhMUUBMvBv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23875},"main":"./dist/cjs/index.js","type":"module","_from":"file:buildtovalue-anchor-git-1.0.1.tgz","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json && tsc -p tsconfig.cjs.json && node ../../scripts/write-cjs-package.mjs dist/cjs","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"danzeroum","email":"danzeroum@gmail.com"},"_resolved":"C:\\Users\\danni\\AppData\\Local\\Temp\\75a9dcb6266d30fb2da5e31f518619d7\\buildtovalue-anchor-git-1.0.1.tgz","_integrity":"sha512-eQg+wccaicKeAEcSRrwhbLf/zongKVmRMu8nwF2k8mlfCJiE6FtA1fJJ5IV3QGdVbrGVJK6F2hrPOshAvxpJGQ==","repository":{"url":"git+https://github.com/danzeroum/bpmn.git","type":"git","directory":"packages/anchor-git"},"_npmVersion":"10.9.3","description":"Git anchor adapter (Handoff 8): anchors the ledger chain head to a commit via a HOST-injected transport (the library never does network or shells out to git). Implements the AnchorAdapter contract from @buildtovalue/identity. Zero runtime dependencies.","directories":{},"sideEffects":false,"_nodeVersion":"22.20.0","dependencies":{"@buildtovalue/identity":"1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/anchor-git_1.0.1_1784345289923_0.6704652098766279","host":"s3://npm-registry-packages-npm-production"}},"1.0.2-next.0":{"name":"@buildtovalue/anchor-git","version":"1.0.2-next.0","description":"Git anchor adapter (Handoff 8): anchors the ledger chain head to a commit via a HOST-injected transport (the library never does network or shells out to git). Implements the AnchorAdapter contract from @buildtovalue/identity. Zero runtime dependencies.","license":"Apache-2.0","type":"module","sideEffects":false,"engines":{"node":">=20"},"main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/esm/index.d.ts","exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"dependencies":{"@buildtovalue/identity":"1.1.0-next.0"},"keywords":["bpmn","anchor","git","trust","governance"],"repository":{"type":"git","url":"git+https://github.com/danzeroum/bpmn.git","directory":"packages/anchor-git"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.build.json && tsc -p tsconfig.cjs.json && node ../../scripts/write-cjs-package.mjs dist/cjs","typecheck":"tsc -p tsconfig.json --noEmit"},"_id":"@buildtovalue/anchor-git@1.0.2-next.0","bugs":{"url":"https://github.com/danzeroum/bpmn/issues"},"homepage":"https://github.com/danzeroum/bpmn#readme","_integrity":"sha512-J09qApZKIfC1QN+7wKX6wpQv4fvJaosU8Ly6rzNrV9vP8kRr51x33paZTiznszAutStvp/XsBe44nGdlBXz6xA==","_resolved":"/tmp/e49344e641376c44fe91f49a25caffc0/buildtovalue-anchor-git-1.0.2-next.0.tgz","_from":"file:buildtovalue-anchor-git-1.0.2-next.0.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-J09qApZKIfC1QN+7wKX6wpQv4fvJaosU8Ly6rzNrV9vP8kRr51x33paZTiznszAutStvp/XsBe44nGdlBXz6xA==","shasum":"9511301a8e2b5775020b9ba36484b5901b9ad0ff","tarball":"https://registry.npmjs.org/@buildtovalue/anchor-git/-/anchor-git-1.0.2-next.0.tgz","fileCount":16,"unpackedSize":23643,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGvxbsLdufBgOx09lwUjkJ33D/BZA9ZNQVlTokpkm+XPAiAKDqsZw/918ldkYF8UNtPBHXOziSHTwpw2rFvBo1pQnA=="}]},"_npmUser":{"name":"danzeroum","email":"danzeroum@gmail.com"},"directories":{},"maintainers":[{"name":"danzeroum","email":"danzeroum@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/anchor-git_1.0.2-next.0_1784725568642_0.559540828457844"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-18T03:28:09.756Z","modified":"2026-07-22T13:06:08.943Z","1.0.1":"2026-07-18T03:28:10.060Z","1.0.2-next.0":"2026-07-22T13:06:08.776Z"},"bugs":{"url":"https://github.com/danzeroum/bpmn/issues"},"license":"Apache-2.0","homepage":"https://github.com/danzeroum/bpmn#readme","keywords":["bpmn","anchor","git","trust","governance"],"repository":{"type":"git","url":"git+https://github.com/danzeroum/bpmn.git","directory":"packages/anchor-git"},"description":"Git anchor adapter (Handoff 8): anchors the ledger chain head to a commit via a HOST-injected transport (the library never does network or shells out to git). Implements the AnchorAdapter contract from @buildtovalue/identity. Zero runtime dependencies.","maintainers":[{"name":"danzeroum","email":"danzeroum@gmail.com"}],"readme":"# @buildtovalue/anchor-git\n\nGit **anchor adapter** for BPMN governance (Handoff 8): anchors the ledger chain\nhead to a commit and verifies it later, implementing the `AnchorAdapter` contract\nfrom `@buildtovalue/identity`.\n\n## The host owns the transport (no network in the library)\n\nLike signing keys, the git transport is **injected by the host** — the library\nnever shells out to `git` nor does network. You provide `commit`/`read`; the\nadapter provides the anchor/verify semantics.\n\n```ts\nimport { createGitAnchor } from '@buildtovalue/anchor-git';\n\nconst anchor = createGitAnchor({\n  async commit(payload) {\n    // e.g. write payload to a signed commit on an `anchors` ref\n    return { ref: await host.commitToAnchorsRef(payload) };\n  },\n  async read(ref) {\n    return host.readAnchorsRef(ref); // undefined when unreachable\n  },\n});\n\nconst receipt = await anchor.anchor({ hash: head.hash, seq: head.seq });\n// later, against the current hash of the entry at receipt.head.seq:\nawait anchor.verify(receipt, currentHashAtSeq); // 'anchored' | 'mismatch' | 'unavailable'\n```\n\n## States (cercas §1.3 / §1.4)\n\n- `unavailable` → the store is unreachable; the UI shows **⏳ pendente** (the third\n  state) — the promotion does NOT regress, retry is offered.\n- `anchored` → the stored head still matches the current chain head.\n- `mismatch` → the chain was regenerated after anchoring (**cadeia ≠ âncora**) —\n  the case a local hash-chain alone never detects.\n\nDerive the UI state from these via `deriveAnchorState` in `@buildtovalue/identity`.\n\n## Decoupling\n\nConsumes only `@buildtovalue/identity` (the contracts) — pinned by\n`tests/independence.test.ts`. **Zero runtime dependencies.**\n","readmeFilename":"README.md"}