{"_id":"@agenteer/core","_rev":"2-be070c7d677aaa773bb4fd3fd4fb4b01","name":"@agenteer/core","dist-tags":{"latest":"1.0.0-rc.2"},"versions":{"1.0.0-rc.1":{"name":"@agenteer/core","version":"1.0.0-rc.1","keywords":["agenteer","agent","agents","agentic","runtime","capability","context","llm","workflow","orchestration"],"author":{"url":"https://github.com/salehsquared","name":"salehsquared"},"license":"MIT","_id":"@agenteer/core@1.0.0-rc.1","maintainers":[{"name":"salehsquared","email":"salehmostafamain@gmail.com"}],"homepage":"https://github.com/salehsquared/agenteer#readme","bugs":{"url":"https://github.com/salehsquared/agenteer/issues"},"dist":{"shasum":"726316ef22ee1ec3ac52992625a1264d5a099d23","tarball":"https://registry.npmjs.org/@agenteer/core/-/core-1.0.0-rc.1.tgz","fileCount":177,"integrity":"sha512-s8o5vjm4c/28mOGGgtEFjx9ZDU5D5fomD1R7WGYRXyex2PMvBYRHmPIz1Sh9uPWPwEcAqIDmYQDY2qQhMMf9QQ==","signatures":[{"sig":"MEYCIQCidRy2uH6Sxh5MQKV9rVS/MAugZdV8JfjN/HDsltFa9gIhAJ5MZvtgoOeQbOzPHnS74pEgrwTKg8qvIgrjjydY7Xnl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":597319},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"3cbe3b072857a24a3a496b120c69c4d01cc9a488","scripts":{"test":"vitest run","build":"tsc -b","typecheck":"tsc --noEmit"},"_npmUser":{"name":"salehsquared","email":"salehmostafamain@gmail.com"},"repository":{"url":"git+https://github.com/salehsquared/agenteer.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Core runtime, Node primitive, and context store for Agenteer — a debuggable, capability-gated agentic framework.","directories":{},"_nodeVersion":"20.17.0","dependencies":{"zod":"^4.3.6","yaml":"^2.8.2","@agenteer/trust":"1.0.0-rc.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.0-rc.1_1776180452096_0.3306226002708008","host":"s3://npm-registry-packages-npm-production"}},"1.0.0-rc.2":{"name":"@agenteer/core","version":"1.0.0-rc.2","description":"Core runtime, Node primitive, and context store for Agenteer — a debuggable, capability-gated agentic framework.","keywords":["agenteer","agent","agents","agentic","runtime","capability","context","llm","workflow","orchestration"],"author":{"name":"salehsquared","url":"https://github.com/salehsquared"},"license":"MIT","homepage":"https://github.com/salehsquared/agenteer#readme","bugs":{"url":"https://github.com/salehsquared/agenteer/issues"},"repository":{"type":"git","url":"git+https://github.com/salehsquared/agenteer.git","directory":"packages/core"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"engines":{"node":">=20"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -b","typecheck":"tsc --noEmit","test":"vitest run"},"dependencies":{"@agenteer/trust":"1.0.0-rc.2","yaml":"^2.8.2","zod":"^4.3.6"},"devDependencies":{"vitest":"^3.2.4"},"_id":"@agenteer/core@1.0.0-rc.2","gitHead":"ee68c161faabbe38bd1f8c1118b3046dbb06ee55","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-xUC9RwvVvXdf1hEpVSRTa6CZssUEDIx2ptJ+VS90UM8FMLvMd1Qt9DlYikodOMaqnRcq1UKsI4aIFcc5okzJzQ==","shasum":"e623c05f23d423ed8a1b4d9148a9ce28d1374e1e","tarball":"https://registry.npmjs.org/@agenteer/core/-/core-1.0.0-rc.2.tgz","fileCount":139,"unpackedSize":367723,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDmGpngEDY6Au/KT4/GWtJjVyE3Y2wuA6tkKqLlrUDekQIhAM18UAnsLI/hvyQv9oK5ZJ9O0+ODGF8XcEc+Wo2IclCJ"}]},"_npmUser":{"name":"salehsquared","email":"salehmostafamain@gmail.com"},"directories":{},"maintainers":[{"name":"salehsquared","email":"salehmostafamain@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_1.0.0-rc.2_1776223118235_0.7305623981821052"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-14T15:27:32.031Z","modified":"2026-04-15T03:18:38.586Z","1.0.0-rc.1":"2026-04-14T15:27:32.314Z","1.0.0-rc.2":"2026-04-15T03:18:38.459Z"},"bugs":{"url":"https://github.com/salehsquared/agenteer/issues"},"author":{"name":"salehsquared","url":"https://github.com/salehsquared"},"license":"MIT","homepage":"https://github.com/salehsquared/agenteer#readme","keywords":["agenteer","agent","agents","agentic","runtime","capability","context","llm","workflow","orchestration"],"repository":{"type":"git","url":"git+https://github.com/salehsquared/agenteer.git","directory":"packages/core"},"description":"Core runtime, Node primitive, and context store for Agenteer — a debuggable, capability-gated agentic framework.","maintainers":[{"name":"salehsquared","email":"salehmostafamain@gmail.com"}],"readme":"# @agenteer/core\n\nCore runtime for [Agenteer](https://github.com/salehsquared/agenteer) — a debuggable agentic framework where every piece of state (context, evidence, permission decisions) is inspectable, replayable, and bounded by an explicit capability grammar.\n\nThis package provides the **runtime primitives**: the Node type, the runtime loop, the context store (in-memory + file-backed), the event bus, the permission kernel, the manifest schema, and session persistence. It has one runtime dependency on `@agenteer/trust` for evidence records.\n\n## Install\n\n```bash\nnpm install @agenteer/core @agenteer/trust zod\n```\n\nRequires **Node ≥ 20**.\n\n## 30-second example\n\n```ts\nimport {\n  InMemoryContextStore,\n  InMemoryNodeRegistry,\n  MemoryEvidenceSink,\n  Runtime,\n  makeManifest,\n  type Node,\n} from \"@agenteer/core\";\nimport { z } from \"zod\";\n\nconst manifest = makeManifest({\n  id: \"@example/node-hello\",\n  name: \"hello\",\n  description: \"Says hello.\",\n  determinism: \"deterministic\",\n  required_actions: [],\n});\n\nconst registry = new InMemoryNodeRegistry();\nregistry.register(\n  manifest,\n  (): Node<{ who: string }, { greeting: string }> => ({\n    manifest,\n    inputSchema: z.object({ who: z.string() }),\n    outputSchema: z.object({ greeting: z.string() }),\n    ctx: [],\n    model: null,\n    async execute(input) {\n      return {\n        kind: \"output\",\n        value: { greeting: `hello, ${input.original.who}` },\n        evidence: { verdict: \"pass\" },\n      };\n    },\n  }),\n);\n\nconst runtime = new Runtime({\n  registry,\n  contextStore: new InMemoryContextStore(),\n  evidenceSink: new MemoryEvidenceSink(),\n});\n\nconst outcome = await runtime.run(\n  { manifest_id: manifest.id, input: { who: \"world\" }, correlation: \"root\" },\n  [`spawn:${manifest.id}`],\n);\nconsole.log(outcome.rootResult);\n```\n\n## What you get\n\n- **`Runtime`** — the main driver. Authorizes each spawn against a capability envelope, dispatches nodes, applies ctx patches, records evidence.\n- **`InMemoryContextStore` / `FileContextStore`** — content-addressable, immutable context items with slice materialization and staleness propagation.\n- **`InMemoryNodeRegistry`** — map of `manifest_id` → factory. Nodes lookup and instantiate via the registry.\n- **Permission kernel** — `authorizeSpawn`, `isSubset`, `intersect`, capability grammar parser. Parents can attenuate; children cannot escalate.\n- **Manifest schema** — Zod-backed schema for `NodeManifest` with ajv JSON-Schema bridging available via `@agenteer/registry`.\n- **Session persistence** — `SessionState`, `SessionRecorder`, and `recordedAnswerResolver` for `ask_user` / `approval_gate` pause/resume.\n- **Events** — typed emitter with `node_start`, `node_complete`, `evidence_collected`, `ctx_scope_restricted`, etc.\n- **Explainers** — `explainPermissionDenial` and `explainManifestIssues` turn kernel denials into actionable error text.\n\n## Capability grammar\n\nA capability is a string like `fs.read:/tmp/**`, `model:claude-*`, `tool:gh`, or `net.http:api.github.com/**`. Eleven resource types; glob-scoped; used to gate every `spawn` and every `callAction`.\n\n```\n<type>:<scope>\n```\n\n`fs.read`, `fs.write`, and `fs.delete` scopes must be absolute paths or `*`. `shell.exec` is scopeless, so use `shell.exec:` with an empty scope. `net.http` scopes cover host/path only; the runtime does not encode HTTP method as a separate capability dimension.\n\nChildren must declare required capabilities in their manifest. The runtime intersects parent grants with child requirements; the child runs with the intersection. If the intersection is empty or doesn't cover a needed capability, the spawn is denied at authorize time, before any code runs. See [capabilities.md](https://github.com/salehsquared/agenteer/blob/main/docs/capabilities.md) for the full grammar.\n\n## License\n\nMIT — see LICENSE.\n","readmeFilename":"README.md"}