{"_id":"@anokye-labs/kbexplorer-core","_rev":"4-cdf7507034c9b2c047af8544057571c7","name":"@anokye-labs/kbexplorer-core","dist-tags":{"latest":"0.6.0"},"versions":{"0.5.0":{"name":"@anokye-labs/kbexplorer-core","version":"0.5.0","license":"MIT","_id":"@anokye-labs/kbexplorer-core@0.5.0","maintainers":[{"name":"hoopsomuah","email":"hoop@somuah.com"}],"homepage":"https://github.com/anokye-labs/kbexplorer-core#readme","bugs":{"url":"https://github.com/anokye-labs/kbexplorer-core/issues"},"dist":{"shasum":"31ac8dd6025e5e78eac0414c84cea8937addba70","tarball":"https://registry.npmjs.org/@anokye-labs/kbexplorer-core/-/kbexplorer-core-0.5.0.tgz","fileCount":7,"integrity":"sha512-17jOOzmJaBg5/vvenG4bePy2ee2AP7wwO23OLuuzaVHMlFT/R1TnCbcp4IUTFWy4qNeHM2op8EvKbM5wakSrhQ==","signatures":[{"sig":"MEUCIBMvw6i9HZ9xmcYJrtvMs/6NoGO1Blp+lPx9dxrSJhVMAiEA+QV3roOvcCEeCTHHLnyWue4EuwZ+QLoXnPz/ktG817c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":186187},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"516779d4f1324eacd787a6e41ac61d25af9c3a5d","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"hoopsomuah","email":"hoop@somuah.com"},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/anokye-labs/kbexplorer-core.git","type":"git"},"_npmVersion":"11.16.0","description":"Shared contracts for kbexplorer: pure graph types, kg:// identity, relation taxonomy, JSON-LD helpers, and the Source / Provider / Representation interfaces.","directories":{},"_nodeVersion":"26.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^4.1.9","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/kbexplorer-core_0.5.0_1783048113400_0.6700525678995288","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@anokye-labs/kbexplorer-core","version":"0.5.1","license":"MIT","_id":"@anokye-labs/kbexplorer-core@0.5.1","maintainers":[{"name":"hoopsomuah","email":"hoop@somuah.com"}],"homepage":"https://github.com/anokye-labs/kbexplorer-core#readme","bugs":{"url":"https://github.com/anokye-labs/kbexplorer-core/issues"},"dist":{"shasum":"6fbb1da2522756979535c44e7fc3c812395bd632","tarball":"https://registry.npmjs.org/@anokye-labs/kbexplorer-core/-/kbexplorer-core-0.5.1.tgz","fileCount":7,"integrity":"sha512-cxt+mSTuUZqGDpl5uewgJlWAV6YULoO3zmGSJghPWc4RE03BLUjcOlNkbzGE7iSYfHOjh96wHy22ywu3gSMPEQ==","signatures":[{"sig":"MEQCIHFqBTNP7sVJbFV6G+hKtWNGHUq0LBa1TV8bzFUZAI7jAiA30CDZQq6LLBEzGXoZmBgCLLmR4eH2GkZjexvI7Wb/SQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anokye-labs%2fkbexplorer-core@0.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":198785},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"e5006372da8f954cf2a4815d4a8d8e0b9f00204b","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e2160f-2711-4a8e-a997-af21e0e7efef"}},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/anokye-labs/kbexplorer-core.git","type":"git"},"_npmVersion":"11.18.0","description":"Shared contracts for kbexplorer: pure graph types, kg:// identity, relation taxonomy, JSON-LD helpers, and the Source / Provider / Representation interfaces.","directories":{},"_nodeVersion":"22.23.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^4.1.9","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/kbexplorer-core_0.5.1_1783090233992_0.391509190774034","host":"s3://npm-registry-packages-npm-production"}},"0.5.2":{"name":"@anokye-labs/kbexplorer-core","version":"0.5.2","license":"MIT","_id":"@anokye-labs/kbexplorer-core@0.5.2","maintainers":[{"name":"hoopsomuah","email":"hoop@somuah.com"}],"homepage":"https://github.com/anokye-labs/kbexplorer-core#readme","bugs":{"url":"https://github.com/anokye-labs/kbexplorer-core/issues"},"dist":{"shasum":"efa16a50ce13201c9a5c18355527a5ca7ec28b88","tarball":"https://registry.npmjs.org/@anokye-labs/kbexplorer-core/-/kbexplorer-core-0.5.2.tgz","fileCount":7,"integrity":"sha512-P+Wyer2Q6jJyVgjHcW6iU4yIobYkHGaMA7rUFHnHUII1tpMyU30N3AxrdgxsKnhEpOZK8LNrMoFsG+L0W4KIaA==","signatures":[{"sig":"MEUCIQCxBYioFntEOAfYtyLZ5o5kwnsp1md7Rb5kaQWIv/OG0gIgIZxI8BLedRGxeNiPWYkUHyigjpvjo2jYgxqwp8eqw0c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anokye-labs%2fkbexplorer-core@0.5.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":199479},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"9c504fc8d1c54d2cd1cc9821216d32a11d40ff0f","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e2160f-2711-4a8e-a997-af21e0e7efef"}},"overrides":{"esbuild":"^0.28.1"},"repository":{"url":"git+https://github.com/anokye-labs/kbexplorer-core.git","type":"git"},"_npmVersion":"11.18.0","description":"Shared contracts for kbexplorer: pure graph types, kg:// identity, relation taxonomy, JSON-LD helpers, and the Source / Provider / Representation interfaces.","directories":{},"_nodeVersion":"22.23.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^4.1.9","typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/kbexplorer-core_0.5.2_1783166879202_0.7837228870551303","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@anokye-labs/kbexplorer-core","version":"0.6.0","description":"Shared contracts for kbexplorer: pure graph types, kg:// identity, relation taxonomy, JSON-LD helpers, and the Source / Provider / Representation interfaces.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/anokye-labs/kbexplorer-core.git"},"publishConfig":{"access":"public"},"type":"module","engines":{"node":">=22"},"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","typecheck":"tsc --noEmit","test":"vitest run","prepare":"npm run build"},"devDependencies":{"tsup":"^8.5.0","typescript":"^5.7.2","vitest":"^4.1.9"},"overrides":{"esbuild":"^0.28.1"},"gitHead":"dd1b3040f53f8036193a609d98c01be512ba0652","_id":"@anokye-labs/kbexplorer-core@0.6.0","bugs":{"url":"https://github.com/anokye-labs/kbexplorer-core/issues"},"homepage":"https://github.com/anokye-labs/kbexplorer-core#readme","_nodeVersion":"22.23.1","_npmVersion":"12.0.1","dist":{"integrity":"sha512-2f/TlPpj+K3MH5sppS/KSBRGwZCsAW1yeaJhpSWFCj6Tu4RPJZOC9ZwUHmAHneqOMJoLbWUcI0QCOIx9U9TszQ==","shasum":"329dfcb2c5fa01a84d2ae224d43b5d26c046364c","tarball":"https://registry.npmjs.org/@anokye-labs/kbexplorer-core/-/kbexplorer-core-0.6.0.tgz","fileCount":7,"unpackedSize":212557,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anokye-labs%2fkbexplorer-core@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDdfXM58kqoIQxcpIEg176+2XY7bbg7x2jDJmA+nZCDSAIhALZEoWU52aTkTpc/IaUDRfEdDqWa3VLM/+WJ88Pix9Hd"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f1e2160f-2711-4a8e-a997-af21e0e7efef"}},"directories":{},"maintainers":[{"name":"hoopsomuah","email":"hoop@somuah.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kbexplorer-core_0.6.0_1783823242220_0.9835133481444134"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-03T03:08:33.077Z","modified":"2026-07-12T02:27:22.669Z","0.5.0":"2026-07-03T03:08:33.543Z","0.5.1":"2026-07-03T14:50:34.146Z","0.5.2":"2026-07-04T12:07:59.339Z","0.6.0":"2026-07-12T02:27:22.360Z"},"bugs":{"url":"https://github.com/anokye-labs/kbexplorer-core/issues"},"license":"MIT","homepage":"https://github.com/anokye-labs/kbexplorer-core#readme","repository":{"type":"git","url":"git+https://github.com/anokye-labs/kbexplorer-core.git"},"description":"Shared contracts for kbexplorer: pure graph types, kg:// identity, relation taxonomy, JSON-LD helpers, and the Source / Provider / Representation interfaces.","maintainers":[{"name":"hoopsomuah","email":"hoop@somuah.com"}],"readme":"# @anokye-labs/kbexplorer-core\n\nShared contracts for the **kbexplorer** system. This package is the single source\nof truth for the types and interface seams that both\n[`kbexplorer-cli`](https://github.com/anokye-labs/kbexplorer-cli) and\n[`kbexplorer-template`](https://github.com/anokye-labs/kbexplorer-template) — and\nany third-party provider — depend on.\n\nIt is intentionally **dependency-free** and **side-effect-free**: pure data types\nand interfaces, no runtime engine, no I/O.\n\n## What lives here\n\n- **Graph types** — `KBNode` / `KBEdge` / `KBGraph` / `KBConfig` (pure data; no\n  styling, no engine imports).\n- **Identity** — configurable, source-agnostic addresses of the form\n  `<scheme>://<authority>/<body>`. The scheme is configurable (default `kg`), the\n  authority is optional (it names the system of record), and the **body is\n  opaque** — it names a resource and does not encode the entity's type, so an\n  entity can be re-typed or re-homed without its id changing. Mint addresses with\n  `buildAddress(body, { scheme, authority })`; configure defaults via\n  `KBConfig.identity`. The legacy `kg://<type>/<slug>` helpers (`buildId` /\n  `ID_RE`) are retained for back-compat.\n- **Relation taxonomy** — the canonical edge-relation vocabulary.\n- **JSON-LD helpers** — deterministic serialization of the pure graph.\n- **Seams** — the `Source`, `GraphProvider`, `ProviderRegistry`, `GraphStore`,\n  and `Representation` interfaces that make providers, optional content-addressed\n  caches, and render targets pluggable.\n\n## Architecture layers\n\nThis repository is the contracts layer of the kbexplorer stack. The responsibilities\nare intentionally split so new code lands in the right place:\n\n- **`kbexplorer-core`** — pure data types and interface seams only (`KBNode`,\n  `KBGraph`, `KBConfig`, `Source`, `GraphProvider`, `ProviderRegistry`,\n  `GraphStore`, `Representation`). No runtime, no I/O, no rendering, no browser\n  coupling.\n- **`kbexplorer-engine`** (new) — Node-safe implementation for provider\n  orchestration, parsing, identity minting, transforms, content-model building,\n  and sqlite-backed `GraphStore` implementations. It depends on `core` and must be\n  able to run under plain Node for offline/non-web graph management.\n- **Consumers** (`kbexplorer-template`, `kbexplorer-cli`) — platform-specific\n  adapters on top of `engine` (browser rendering + React viewers for the\n  template; CLI I/O, git/gh access, and LLM extraction for the CLI).\n\nNew logic belongs in the layer that owns the behavior. If a change is purely a\ncontract or seam, it belongs here in `kbexplorer-core`.\n\n> Phase 1 stands up the package; the contracts above are filled in by the\n> follow-up tasks tracked in this repo.\n\n## Consuming (git dependency)\n\nUntil this is published to npm, consumers depend on it directly from git. npm\nruns the package's `prepare` script on install, which builds `dist/`:\n\n```jsonc\n// package.json\n{\n  \"dependencies\": {\n    \"@anokye-labs/kbexplorer-core\": \"github:anokye-labs/kbexplorer-core#v0.1.0\"\n  }\n}\n```\n\nPin to a release tag (e.g. `#v0.1.0`) or a commit SHA — not a moving branch — so\nbuilds are reproducible.\n\n## Releases\n\n### 0.1.0\n\nFirst tagged release — the **Wave 0a** identity foundation. Strictly additive and\nback-compatible (defaults unchanged; `kg://` stays the default scheme, and\n`buildId` / `ID_RE` are retained as legacy helpers):\n\n- **Configurable, source-agnostic identity** — addresses of the form\n  `<scheme>://<authority>/<body>` with an **opaque** body (no embedded type). New:\n  `buildAddress` / `parseAddress` / `isAddress`, `AddressingOptions` /\n  `ParsedAddress`, and `KBConfig.identity` (`IdentityAddressingConfig`).\n- **Alias-based people** — `aliasBody` / `buildPersonAddress`, plus an optional\n  `alias?` on the `person` node source (display names are never identity).\n- **Markdown sources** — `NodeSourceFile.format` now includes `'markdown'`.\n\n## Develop\n\n```bash\nnpm ci\nnpm run typecheck\nnpm run build      # tsup -> dist/ (esm + cjs + d.ts)\nnpm test           # vitest\n```\n\n\n## Engines policy\n\n- **Libraries** (this package, @anokye-labs/kbexplorer-provider-rich-markdown, and future @anokye-labs/kbexplorer-engine) declare \u001bngines.node: \">=20\". Libraries set the floor for their consumers, so they must not require a *higher* Node version than any app that depends on them.\n- **Apps/CLIs** (kbexplorer-cli, kbexplorer-search, kbexplorer-template) may declare a higher floor (e.g. \">=22\") but must never require a *lower* floor than any library they depend on.\n- Rationale: an inverted policy (library requiring a newer Node than its consumer) silently breaks consumers on older-but-still-supported runtimes. Keep the library floor at or below every consumer's floor.","readmeFilename":"README.md"}