{"_id":"@dleangen/cage-history","_rev":"4-04fb47e73535a3f56e061a48a9a550e1","name":"@dleangen/cage-history","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"@dleangen/cage-history","version":"0.0.1","license":"MIT","_id":"@dleangen/cage-history@0.0.1","maintainers":[{"name":"dleangen","email":"npm@leangen.net"}],"homepage":"https://github.com/dleangen/cage-history#readme","bugs":{"url":"https://github.com/dleangen/cage-history/issues"},"dist":{"shasum":"f61e8962937fd0224ddbf93b8fe7a4f3c099f315","tarball":"https://registry.npmjs.org/@dleangen/cage-history/-/cage-history-0.0.1.tgz","fileCount":3,"integrity":"sha512-R/pB+qsMOzrKoSqhBwwSVIgooy77t/XC/9ew8XtOFih84zTh+Wruw+RxtDWOCn7cPBlaYMbmRtZvj74QjdmAsQ==","signatures":[{"sig":"MEUCIQDhlKE3VNekEOANT0R7+6U7QI63zysNFePHhWBJebcSKgIgEVaBJ6XO6GlR1ALPVRe/QceVIm+f+WOmdnMRrHBf1a8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2019},"gitHead":"4a46def33afa24f5b14d5a6072724befeced0f5b","_npmUser":{"name":"dleangen","email":"npm@leangen.net"},"repository":{"url":"git+https://github.com/dleangen/cage-history.git","type":"git"},"_npmVersion":"11.6.1","description":"Conversation history conventions for CAGE-enabled projects.","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cage-history_0.0.1_1773630435301_0.36135618496529576","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@dleangen/cage-history","version":"0.0.2","license":"MIT","_id":"@dleangen/cage-history@0.0.2","maintainers":[{"name":"dleangen","email":"npm@leangen.net"}],"homepage":"https://github.com/dleangen/cage-history#readme","bugs":{"url":"https://github.com/dleangen/cage-history/issues"},"dist":{"shasum":"b3ddb6aba3f66b070b94d22a2dd4f0eebedd5b5a","tarball":"https://registry.npmjs.org/@dleangen/cage-history/-/cage-history-0.0.2.tgz","fileCount":2,"integrity":"sha512-sZJZQ28jg+HVqI6Gn3Q3seRbwlJNDb2adXJWlJLWShMZXM+ycjGO6kFuIaIconS7ht6CE9wwUvsbOqEnwBEdEw==","signatures":[{"sig":"MEYCIQDQtuiSWidVqrNGkeULcD7rrGN8E9yuXucfY2GcFbMezAIhAJGmNdZY5KrH9qqzDPmJGGVazC6GQS1vEGcAv/KDvRLx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dleangen%2fcage-history@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":949},"gitHead":"be914e8ad1635ad3af5d5bf8506381d470f3195d","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:00fbaae6-3f68-42c0-bb89-ac176f0ff5fe"}},"repository":{"url":"git+https://github.com/dleangen/cage-history.git","type":"git"},"_npmVersion":"11.9.0","description":"Conversation history conventions for CAGE-enabled projects.","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cage-history_0.0.2_1773630954994_0.8023923277787017","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@dleangen/cage-history","version":"0.1.0","keywords":["oclif","cage","git","history"],"author":{"name":"dleangen"},"license":"UNLICENSED","_id":"@dleangen/cage-history@0.1.0","maintainers":[{"name":"dleangen","email":"npm@leangen.net"}],"homepage":"https://github.com/dleangen/cage-history","bugs":{"url":"https://github.com/dleangen/cage-history/issues"},"bin":{"cage-history":"bin/run.js"},"dist":{"shasum":"8f4f5723b347cbd0b29bd11c6f261e5839974c56","tarball":"https://registry.npmjs.org/@dleangen/cage-history/-/cage-history-0.1.0.tgz","fileCount":23,"integrity":"sha512-ga/+vUW9vgYZ53vG9EE3Qyf8ApIyYIJRDUtiH6xAJJsjqDKhU4PO++ArtYAWhzgrqWSwdLdWWo7ALdcTP2wgVg==","signatures":[{"sig":"MEYCIQCjAT446tpUx71YkvHQGWxg+/BMeLMo6zcTWZNkjY13VAIhAIqTFQChqiT6TNbZL1hFlRMQVm8lzNq/wUfsdiLwvkWk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55916},"main":"dist/index.js","oclif":{"bin":"cage-history","dirname":"cage-history","plugins":["@oclif/plugin-help","@oclif/plugin-plugins"],"commands":"./dist/commands","topicSeparator":" "},"types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"e978ed3272cc01d2ef01bc277491f698db8cacf6","scripts":{"lint":"eslint","test":"mocha --forbid-only \"test/**/*.test.ts\"","build":"shx rm -rf dist && tsc -b","prepack":"oclif manifest && oclif readme","version":"oclif readme && git add README.md","postpack":"shx rm -f oclif.manifest.json","posttest":"npm run lint"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:00fbaae6-3f68-42c0-bb89-ac176f0ff5fe"}},"repository":{"url":"git+https://github.com/dleangen/cage-history.git","type":"git"},"_npmVersion":"11.16.0","description":"Curated, ID-anchored index over a CAGE project's own git history.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"js-yaml":"^4","@oclif/core":"^4","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5"},"_hasShrinkwrap":false,"devDependencies":{"shx":"^0.3.3","chai":"^4","mocha":"^11","oclif":"^4","eslint":"^9","ts-node":"^10","typescript":"^5","@oclif/test":"^4","@types/chai":"^4","@types/node":"^18","@types/mocha":"^10","@types/js-yaml":"^4","typescript-eslint":"^8","eslint-config-prettier":"^10"},"_npmOperationalInternal":{"tmp":"tmp/cage-history_0.1.0_1786399495430_0.9714160615270093","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@dleangen/cage-history","description":"Curated, ID-anchored index over a CAGE project's own git history.","version":"0.2.0","author":{"name":"dleangen"},"bin":{"cage-history":"bin/run.js"},"bugs":{"url":"https://github.com/dleangen/cage-history/issues"},"dependencies":{"@oclif/core":"^4","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^5","js-yaml":"^4"},"devDependencies":{"@oclif/test":"^4","@types/chai":"^4","@types/js-yaml":"^4","@types/mocha":"^10","@types/node":"^18","chai":"^4","eslint":"^9","eslint-config-prettier":"^10","mocha":"^11","oclif":"^4","shx":"^0.3.3","ts-node":"^10","typescript":"^5","typescript-eslint":"^8"},"engines":{"node":">=18.0.0"},"homepage":"https://github.com/dleangen/cage-history","keywords":["oclif","cage","git","history"],"license":"UNLICENSED","main":"dist/index.js","oclif":{"bin":"cage-history","dirname":"cage-history","commands":"./dist/commands","plugins":["@oclif/plugin-help","@oclif/plugin-plugins"],"topicSeparator":" "},"repository":{"type":"git","url":"git+https://github.com/dleangen/cage-history.git"},"scripts":{"build":"shx rm -rf dist && tsc -b","lint":"eslint","postpack":"shx rm -f oclif.manifest.json","posttest":"npm run lint","prepack":"oclif manifest && oclif readme","test":"mocha --forbid-only \"test/**/*.test.ts\"","version":"oclif readme && git add README.md"},"types":"dist/index.d.ts","gitHead":"303c3f5fd9f97e0b972741b587db606c81ba5ed3","_id":"@dleangen/cage-history@0.2.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-W7cyiMAsj8763g6wpB2Hh7vmXoScKK8vLCX/pz/laU/J7Dx/3kccS3BxRIcPK0Y55OS6gTt0fEl0bkC5dpOVvQ==","shasum":"a9d327ffa4e1e2fd8196fd9576c1568348dc06f0","tarball":"https://registry.npmjs.org/@dleangen/cage-history/-/cage-history-0.2.0.tgz","fileCount":27,"unpackedSize":67989,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDOUSZ5OkViOPbDW3zOquDOnXxSrw9o1MUHv+Y+e9IhhQIhAJX4nFTH2+JlCNVxsMPjw84Mm5AGXHPHRvqIcKr3yL15"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:00fbaae6-3f68-42c0-bb89-ac176f0ff5fe"}},"directories":{},"maintainers":[{"name":"dleangen","email":"npm@leangen.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cage-history_0.2.0_1786403514234_0.7925630922372813"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-16T03:07:15.223Z","modified":"2026-08-10T23:11:54.565Z","0.0.1":"2026-03-16T03:07:15.441Z","0.0.2":"2026-03-16T03:15:55.130Z","0.1.0":"2026-08-10T22:04:55.580Z","0.2.0":"2026-08-10T23:11:54.400Z"},"bugs":{"url":"https://github.com/dleangen/cage-history/issues"},"author":{"name":"dleangen"},"license":"UNLICENSED","homepage":"https://github.com/dleangen/cage-history","keywords":["oclif","cage","git","history"],"repository":{"type":"git","url":"git+https://github.com/dleangen/cage-history.git"},"description":"Curated, ID-anchored index over a CAGE project's own git history.","maintainers":[{"name":"dleangen","email":"npm@leangen.net"}],"readme":"# cage-history\n\n`cage-history` builds a curated, ID-anchored index over a CAGE project's own git history — so\n\"what happened here, and why\" is a lookup, not an archaeology exercise. See\n[RFC-0006](https://github.com/dleangen/cage-history/issues/1) for the full design rationale.\n\n> **Status:** v1 (git history only — see RFC-0006 for the scope decision and\n> [PROP-2026-0002](https://github.com/dleangen/cage-thinking/blob/main/proposals/open/PROP-2026-0002.yaml)\n> for the design doc this shipped from) accepted as filed by\n> [ADR-0002](https://github.com/dleangen/cage-thinking/blob/main/adr/LOG.yaml). v1.5\n> (branch-topology flagging, live GitHub PR discovery — both below) shipped on top, scoped in\n> [#7](https://github.com/dleangen/cage-history/issues/7).\n\n## What it does\n\nPoint at an ID, get back where it actually went:\n\n```bash\ncage-history build --repo . --branch session/some-feature\ncage-history lookup CAGE-2026-0107\n```\n\n```yaml\nid: CAGE-2026-0107\nrepos:\n  - name: cage-issues\nterminal_state: landed\nlast_built: '2026-08-09T22:00:00.000Z'\nlanding:\n  strategy: message_match\n  repo: cage-issues\n  commit: a4d2968\n  confidence: high\nsuperseded_by: null\n```\n\n`terminal_state` is a closed enum (`landed` / `superseded` / `open` / `rejected` /\n`unresolved`) — automation says \"I don't know\" explicitly rather than guessing. `landing`\nalways reports which strategy resolved it (`sha_match` / `message_match` / `content_match`), so\na direct SHA match is never presented the same way as a lower-confidence content match. See\nRFC-0006 for why: maintainer rebase-before-land workflows change commit SHAs on the way to\n`main`, and independently-authored equivalent fixes land under unrelated commits — naive\n`git log`/PR-state checks get both of these wrong.\n\n## Usage\n\n```bash\ncage-history build \\\n  --repo <path>            # local repo to scan (repeatable; default \".\")\n  --target <branch>        # branch considered \"landed\" (default \"main\")\n  --branch <name>          # a not-yet-landed candidate branch to resolve (repeatable)\n  --open <name>            # mark a --branch as known-still-open (repeatable)\n  --closed <name>          # mark a --branch as known-closed-unmerged (repeatable)\n  --pr <branch>=<number>   # associate a --branch with its PR/issue number, so message-match\n                           # also catches \"fix(#123)\"-style commits that never spell out the\n                           # ID itself (repeatable)\n  --meta <branch>=<name>   # a --branch's intended base — enables the branch-topology (\"comb\")\n                           # check: flags if the branch actually forked from --target instead\n                           # of <name>'s own tip (repeatable)\n  --live                   # auto-discover open PRs for each --repo via `gh pr list` (uses gh's\n                           # own stored auth), layered on top of the manual flags above rather\n                           # than replacing them — best-effort, never fails the build if gh\n                           # isn't installed/authenticated or the repo has no GitHub remote\n  --window-days <n>        # only consider target commits within this many days of a branch's\n                           # own last commit for message/content match (default 90)\n  --pattern <regex>        # override the default ID pattern\n  --out <file>             # output path (default .cage/history/index.yaml)\n\ncage-history lookup <ID> --index <file>   # default index .cage/history/index.yaml\n```\n\nA `--branch` given neither `--open` nor `--closed` (and not discovered as open via `--live`)\nresolves to `unknown` — the CLI never guesses a status it doesn't actually have. That's what\nmakes `unresolved` reachable at all: without a known status, a branch with no landing match\nfalls through to `unresolved`, not a silently assumed `open`.\n\nThe default ID pattern matches `<PROJECT>-<YEAR>-<NUMBER>`-shaped IDs generically (e.g.\n`CAGE-2026-0107`, `LVGOV-2026-0011`) — not hardcoded to any one project's prefix.\n\n`topology_warning` on a record (`undefined` = no `--meta` given, `null` = checked and clean, an\nobject = violated) reports if a `--branch` forked from `--target` directly instead of its\ndeclared `--meta` branch's own tip — the \"comb\" convention violation, not just staleness.\n\n## Installation\n\n```bash\nnpm install @dleangen/cage-history\n```\n\n## CAGE ecosystem\n\n| Package | Description |\n|---------|-------------|\n| [cage-core](https://github.com/dleangen/cage-core) | Agent protocol specification |\n| [cage-cli](https://github.com/dleangen/cage-cli) | CLI for scaffolding CAGE-enabled projects |\n| [cage-git](https://github.com/dleangen/cage-git) | Git workflow mechanics — makes history |\n| **cage-history** | Curates and indexes history after the fact (this package) |\n| [cage-management](https://github.com/dleangen/cage-management) | Management tooling for CAGE projects |\n| [cage-iam](https://github.com/dleangen/cage-iam) | Generic Zanzibar-style Identity and Access Management design |\n| [cage-documents](https://github.com/dleangen/cage-documents) | Per-repo document storage with namespace/index convention |\n\n## License\n\nProprietary — © 2026 David Leangen. All rights reserved.\n","readmeFilename":"README.md"}