{"_id":"@bernierllc/nevar-graph-types","_rev":"2-3137e89d2f58af60b719f82bc24e93d0","name":"@bernierllc/nevar-graph-types","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"@bernierllc/nevar-graph-types","version":"0.0.1","license":"SEE LICENSE IN README.md","_id":"@bernierllc/nevar-graph-types@0.0.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"4ce0bf07923fee749f1b6a3e61613dc2851362b1","tarball":"https://registry.npmjs.org/@bernierllc/nevar-graph-types/-/nevar-graph-types-0.0.1.tgz","fileCount":2,"integrity":"sha512-+PckzHWcTzRom2tznShUg29yuZ6cvc52ohW3kjlmFc+LAuokMHY22CgIu7mXucxijGgciMyA7+1t/wqCd8UUTQ==","signatures":[{"sig":"MEUCIQDp+vJYSJFzXvQe+OhdkL6pkgLURGq8fYe9nUpJ/a+AVwIgEOE85SQPy4IlR2OZ2Afw7AO+iOM5QpF6wjzEya/uwjM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":385},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_npmVersion":"11.12.1","description":"Placeholder for OIDC trusted-publisher bootstrap. Real release follows via GitHub Actions.","directories":{},"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nevar-graph-types_0.0.1_1779119020636_0.296974355858185","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bernierllc/nevar-graph-types","version":"0.1.2","description":"Core type definitions and error classes for the Nevar typed-DAG graph capability","main":"dist/index.js","types":"dist/index.d.ts","keywords":["nevar","graph","dag","types","rules-engine","bernierllc"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","dependencies":{"@bernierllc/nevar-types":"0.1.0"},"devDependencies":{"@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.0.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc","test":"jest","test:run":"jest","test:coverage":"jest --coverage","lint":"eslint src __tests__ --ext .ts","clean":"rm -rf dist"},"_id":"@bernierllc/nevar-graph-types@0.1.2","_integrity":"sha512-gR7Jur+9/NiDoBnaZORMggTTcw9+7nu/MoxE9k9Jd2pMgXhoYeJP6cVNry3ziiCatrZHIVuqgm282k0fTtdkSw==","_resolved":"/private/var/folders/r0/wspnzd1s18sfjy10ffyv2qxw0000gn/T/18388006599cd94c8d034cb137545ff0/bernierllc-nevar-graph-types-0.1.2.tgz","_from":"file:bernierllc-nevar-graph-types-0.1.2.tgz","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-gR7Jur+9/NiDoBnaZORMggTTcw9+7nu/MoxE9k9Jd2pMgXhoYeJP6cVNry3ziiCatrZHIVuqgm282k0fTtdkSw==","shasum":"2b6e99fa0cceda5ba5277ed675881cddebb385e1","tarball":"https://registry.npmjs.org/@bernierllc/nevar-graph-types/-/nevar-graph-types-0.1.2.tgz","fileCount":30,"unpackedSize":82884,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEVonffKUJX80Kzl6MKICE4DGizNQwr4mF9b2dVhQLJrAiEA3Iw3Y+oigfaVI8bNCtht+mfOHh99WXMjDbgR6u7T5iw="}]},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nevar-graph-types_0.1.2_1779127282199_0.02127215053676923"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-18T15:43:40.546Z","modified":"2026-05-18T18:01:22.493Z","0.0.1":"2026-05-18T15:43:40.777Z","0.1.2":"2026-05-18T18:01:22.364Z"},"license":"SEE LICENSE IN LICENSE","description":"Core type definitions and error classes for the Nevar typed-DAG graph capability","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/nevar-graph-types\n\nCore type definitions and error classes for the Nevar typed-DAG graph capability.\n\n## Overview\n\nThis package provides all shared TypeScript interfaces and error classes used across the `nevar-graph-*` family. It is a pure types package — no runtime logic beyond error class constructors.\n\n## Installation\n\n```bash\npnpm add @bernierllc/nevar-graph-types\n```\n\n## Usage\n\n```typescript\nimport type {\n  PortType,\n  GraphDefinition,\n  GraphNode,\n  GraphEdge,\n  GraphRun,\n  GraphStepRecord,\n} from '@bernierllc/nevar-graph-types';\nimport { NevarGraphError } from '@bernierllc/nevar-graph-types';\n\nconst blogPort: PortType = { id: 'content-type:blog-post', label: 'Blog Post' };\n\nconst def: GraphDefinition = {\n  id: 'graph-1',\n  name: 'Content Pipeline',\n  description: 'Processes published posts',\n  ownerType: 'organization',\n  ownerId: 'org-123',\n  triggerKey: 'event:post.published',\n  rootNodeIds: ['node-fetch'],\n  nodes: [\n    { id: 'node-fetch', actionType: 'action:fetch-post', config: {} } as GraphNode,\n  ],\n  edges: [] as GraphEdge[],\n  metadata: {},\n  createdAt: new Date(),\n  updatedAt: new Date(),\n  isDeleted: false,\n};\n\ntry {\n  // consumer logic\n} catch (cause) {\n  throw new NevarGraphError('graph operation failed', { cause: cause as Error });\n}\n```\n\n## API\n\n### Types\n\n| Type | Purpose |\n|------|---------|\n| `PortType` | Identifies the data shape flowing into/out of a graph node |\n| `EdgeMapping` | Field-pair mapping from upstream output to downstream config |\n| `GraphNode` | A single node in a graph (references an ActionHandlerDefinition) |\n| `GraphEdge` | A directed edge between nodes, with optional condition |\n| `GraphDefinition` | Complete static graph configuration |\n| `GraphRun` | One execution of a graph definition |\n| `GraphStepRecord` | Per-node execution record within a run |\n\n### Errors\n\n| Class | Code | When |\n|-------|------|------|\n| `NevarGraphError` | `NEVAR_GRAPH_ERROR` | Base class — all nevar-graph errors extend this |\n\n## PortType Compatibility\n\n`PortType` is structurally identical to `ActionHandlerDefinition.inputType` / `outputType` from `@bernierllc/nevar-types`. This allows assigning `PortType` values to those fields without a circular import:\n\n```ts\nimport type { PortType } from '@bernierllc/nevar-graph-types';\nimport type { ActionHandlerDefinition } from '@bernierllc/nevar-types';\n\nconst myPort: PortType = { id: 'content-type:blog-post', label: 'Blog Post' };\n\nconst handler: ActionHandlerDefinition = {\n  // ...\n  inputType: myPort,   // PortType is structurally compatible\n  outputType: { id: 'content-type:social-draft' },\n};\n```\n\n## Integrations\n\n### Logger integration\nLogger integration is not applicable to this types-only package — there is no runtime code to instrument beyond error constructors. Consumer packages such as `@bernierllc/nevar-graph-executor` and `@bernierllc/nevar-graph-storage` perform structured logging via `@bernierllc/logger` (using `getErrorChain` / `formatErrorChain` against `NevarGraphError` chains exported from here).\n\n### NeverHub integration\nNeverHub integration is N/A for this package. As a pure types package it has no service surface to register with NeverHub. Consumer service/suite packages (graph-executor, graph-storage, the `nevar` suite) own the NeverHub registration and provide graceful degradation when NeverHub is unavailable.\n\n### Graceful degradation\nGraceful degradation is the package design principle: importing types and constructing `NevarGraphError` instances is a zero-side-effect operation. The package has no I/O, no environment dependencies, and no optional runtime — consumers can always import these types regardless of which optional integrations are wired up downstream.\n\n## Related Packages\n\n- `@bernierllc/nevar-graph-validator` — validates GraphDefinition objects\n- `@bernierllc/nevar-graph-storage` — storage interface and in-memory adapter\n- `@bernierllc/nevar-graph-executor` — executes graphs topologically\n- `@bernierllc/nevar-graph-adapter-prisma` — Prisma/PostgreSQL storage backend\n- `@bernierllc/nevar` — suite re-export (Graph namespace)\n\n## License\n\nCopyright (c) 2025 Bernier LLC. See LICENSE for details.\n","readmeFilename":"README.md","keywords":["nevar","graph","dag","types","rules-engine","bernierllc"],"author":{"name":"Bernier LLC"}}