{
  "name": "@adhd/sox-graph-store",
  "version": "0.12.4",
  "description": "Bi-temporal graph store — nodes + edges over SQLite with t_valid/t_invalid correctness, tExpires TTL, content-hash dedup, FTS5 sync, namespace isolation, and supersession chains. Schema migration via Drizzle ORM (ADR-0008). GraphBackendCapabilities flags prevent silent misuse of bitemporal / FTS / metadata-filter features.",
  "license": "MIT",
  "private": false,
  "publishConfig": {
    "access": "public"
  },
  "engines": {
    "node": ">=22"
  },
  "type": "module",
  "main": "./dist/index.js",
  "types": "./dist/index.d.ts",
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "default": "./dist/index.js"
    },
    "./package.json": "./package.json"
  },
  "files": [
    "dist",
    "drizzle/migrations"
  ],
  "dependencies": {
    "@adhd/sox-store-adapter": "^0.13.3",
    "@adhd/sox-telemetry": "^0.4.1"
  },
  "devDependencies": {
    "drizzle-kit": "^0.31.10"
  },
  "sox": {
    "area": "data",
    "group": "graph",
    "assets": [
      "drizzle/migrations"
    ],
    "concerns": [
      "schema migration via Drizzle ORM (ADR-0008) — drizzle-kit generated, applied at startup",
      "bi-temporal nodes (t_valid / t_invalid) + tExpires TTL + isStale derived field",
      "namespace isolation (NodeMeta.namespace — hard graph partition, default: \"global\")",
      "content-hash dedup (writeGraph / writeNodeBatch atomic transactions)",
      "FTS5 sync triggers (searchNodes scored by mechanism-agnostic score field)",
      "supersession chains (supersede / touch / getSupersessionChain)",
      "edge upsert idempotency (writeEdge — safe for re-projection)",
      "graph traversal (getNeighbors / getNeighborsWithEdges / isReachable / getSubgraph)",
      "GraphBackendCapabilities (bitemporal / fullTextSearch / metadataFilter flags)",
      "confidence as first-class epistemic field (distinct from importance ranking weight)",
      "DEPENDS_ON edge rel for typed dependency graphs (plan DAGs, tool dep trees)",
      "node.kind non-memory reuse contract (BL-295) — the node.kind CHECK constraint is a fixed enum (episode/entity/claim/community/session/generic) and is NEVER extended per consumer. A non-memory reuse case (e.g. a component registry) writes with kind:'generic' and carries its own sub-kind (e.g. 'component') in tags/metadata instead of registering a new kind. writeNode()'s kind param defaults to 'episode' and is validated against DEFAULT_NODE_KINDS, throwing ConstraintError for anything outside the enum."
    ],
    "invariants": [
      "records are NEVER deleted — invalidate() sets t_invalid (audit-preserving), supersede() mints a new node linked by SUPERSEDES",
      "touch() updates mutable metadata (tExpires, confidence, name, tags) without minting a new node or SUPERSEDES edge — THROWS if nodeId is invalidated or missing",
      "writeEdge() is upsert-idempotent on (src, dst, rel) — safe to call on re-projection",
      "writeGraph() / writeNodeBatch() are atomic (single SQLite transaction) — all or nothing",
      "transaction() hands the callback a GraphTransaction (AdapterTransaction + typed tx-bound writeNode/writeEdge/invalidateEdge/touch/getNodeByUid/...) — every typed call runs on the transaction and delegates to the same typePolicy/uniquenessPolicy-validating internals the bare backend uses, never a raw-SQL bypass; the raw AdapterTransaction surface is preserved so existing callbacks keep working",
      "searchNodes() returns [] (not an error) when capabilities.fullTextSearch === false",
      "NodeFilter.validAt is honored only when capabilities.bitemporal === true, ignored silently otherwise",
      "namespace is a hard isolation field (not a tag/filter convention) — absent → \"global\"",
      "kind is one of DEFAULT_NODE_KINDS ('episode'|'entity'|'claim'|'community'|'session'|'generic'); an out-of-enum kind throws ConstraintError rather than a raw SQLite CHECK failure — there is no per-consumer kind registration"
    ],
    "entrypoints": [
      "dist/index.js"
    ],
    "externalConsumers": [
      {
        "name": "@adhd/backlog",
        "repo": "/Users/nix/dev/node/adhd",
        "path": "entrypoint/backlog",
        "note": "direct dep (^range)"
      }
    ]
  },
  "keywords": [
    "graph",
    "sqlite",
    "bi-temporal",
    "database",
    "store",
    "typescript"
  ],
  "repository": {
    "type": "git",
    "url": "git+https://github.com/PseudoSky/adhd.git"
  },
  "homepage": "https://github.com/PseudoSky/adhd"
}