{"_id":"@agent-dispatch/core","_rev":"2-e7a9e3658ccb8a93725562acec5506ac","name":"@agent-dispatch/core","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@agent-dispatch/core","version":"0.1.0","license":"Apache-2.0","_id":"@agent-dispatch/core@0.1.0","maintainers":[{"name":"vamgan","email":"vamilg@gmail.com"}],"homepage":"https://github.com/agent-dispatch/core#readme","bugs":{"url":"https://github.com/agent-dispatch/core/issues"},"dist":{"shasum":"f954edb10e4fad42432556ba1b170540b698c224","tarball":"https://registry.npmjs.org/@agent-dispatch/core/-/core-0.1.0.tgz","fileCount":5,"integrity":"sha512-3ZQU9NF/CPd0uPiSErYFLElMykyhFCdR/CzyF2KqqMHYxWTY9EMppUr65xCE1va25HC0WJQPZQaukr7isDstsg==","signatures":[{"sig":"MEUCIQC1zBaj/0crEJfOyI9zAc4mGYBlgBxvFZ3vhe09UNjRSwIgPDXF6exuVL4jmhP0gLnj6hYO26bbbY4SMc4lRByiNT8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33361},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c7402aab9f1375ea8c884eb8c7bf2957ac2f17f9","scripts":{"test":"vitest run","build":"tsup src/index.ts --format esm --dts --clean","typecheck":"tsc --noEmit"},"_npmUser":{"name":"vamgan","email":"vamilg@gmail.com"},"repository":{"url":"git+https://github.com/agent-dispatch/core.git","type":"git"},"_npmVersion":"10.9.4","description":"Provider-neutral runtime contracts and dispatch orchestration for AgentDispatch.","directories":{},"_nodeVersion":"22.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","vitest":"^2.1.8","typescript":"^5.7.3","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1778458507307_0.41919997309750134","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@agent-dispatch/core","version":"0.1.2","description":"Provider-neutral runtime contracts and dispatch orchestration for AgentDispatch.","keywords":["agentdispatch","agents","mcp","model-context-protocol","cloud-agents","subagents","agent-orchestration","typescript"],"type":"module","license":"Apache-2.0","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsup src/index.ts --format esm --dts --clean","test":"vitest run","typecheck":"tsc --noEmit"},"devDependencies":{"@types/node":"^22.10.2","tsup":"^8.3.5","typescript":"^5.7.3","vitest":"^4.1.7"},"repository":{"type":"git","url":"git+https://github.com/agent-dispatch/core.git"},"bugs":{"url":"https://github.com/agent-dispatch/core/issues"},"homepage":"https://github.com/agent-dispatch/core#readme","publishConfig":{"access":"public"},"engines":{"node":">=20.19"},"gitHead":"fff785b00dd5e6a437f54bab968c6cf40f756c3a","_id":"@agent-dispatch/core@0.1.2","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-K9V5kbVpyXhyMIfKp5rOmWQwtZodu/zrdjGGRsLoGmBNEdbPByxDQw22t7L41vvgiUEo5xe2hPhX5PI8cNw/Yg==","shasum":"f3d5f5cb90a11ed5687048cec9d40dd3a5f5b489","tarball":"https://registry.npmjs.org/@agent-dispatch/core/-/core-0.1.2.tgz","fileCount":5,"unpackedSize":40686,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agent-dispatch%2fcore@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID2PU00u4FKakBNYk+T1GYmXbwrS5VbbdWomeQFlgPXlAiEAj9ou45sAUCCGoPDvxxW+AFOlHxSGp+fBiDblNhkClGs="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c89b9fd1-448f-4cab-94bd-74caff377ba0"}},"directories":{},"maintainers":[{"name":"vamgan","email":"vamilg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.1.2_1780205333332_0.3582872912937487"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-11T00:15:07.208Z","modified":"2026-05-31T05:28:53.766Z","0.1.0":"2026-05-11T00:15:07.484Z","0.1.2":"2026-05-31T05:28:53.496Z"},"bugs":{"url":"https://github.com/agent-dispatch/core/issues"},"license":"Apache-2.0","homepage":"https://github.com/agent-dispatch/core#readme","repository":{"type":"git","url":"git+https://github.com/agent-dispatch/core.git"},"description":"Provider-neutral runtime contracts and dispatch orchestration for AgentDispatch.","maintainers":[{"name":"vamgan","email":"vamilg@gmail.com"}],"readme":"# @agent-dispatch/core\n\n[![npm](https://img.shields.io/npm/v/@agent-dispatch/core.svg)](https://www.npmjs.com/package/@agent-dispatch/core)\n[![CI](https://github.com/agent-dispatch/core/actions/workflows/ci.yml/badge.svg)](https://github.com/agent-dispatch/core/actions/workflows/ci.yml)\n[![license](https://img.shields.io/npm/l/@agent-dispatch/core.svg)](https://www.npmjs.com/package/@agent-dispatch/core)\n\nProvider-neutral runtime primitives for AgentDispatch: the MCP control plane that lets a lead agent spawn, monitor, and interact with cloud subagents without binding itself to one cloud API.\n\n## Why this package exists\n\nAgents should not need to know whether a long-running task runs on AWS AgentCore, Cloud Run, Azure Container Apps, Kubernetes, or a local worker. They should ask for a capability, account profile, task type, and target. `@agent-dispatch/core` defines that stable contract and keeps every adapter compatible with the rest of the system.\n\nSee the [release workflow](https://github.com/agent-dispatch/core/blob/main/docs/release.md) for the npm publishing workflow and the dependency-order checklist for the separate `agent-dispatch` repositories.\n\n```mermaid\nflowchart LR\n  A[\"Lead agent\\n(OpenClaw, Hermes, Codex, Claude Code)\"] --> B[\"AgentDispatch core\"]\n  B --> C[\"Backend adapter\"]\n  C --> D[\"Cloud runtime\"]\n  D --> E[\"Cloud subagent\"]\n```\n\n## What core owns\n\n- Provider-neutral models for `Provider`, `Capability`, `AccountProfile`, `Target`, `Task`, `Runtime`, `Session`, `Event`, and `Artifact`.\n- Adapter registration and routing by `provider + capability + task_type + target.mode`.\n- Durable task lifecycle orchestration with pluggable stores.\n- Runtime protocol metadata for A2A, MCP, AG-UI, and HTTP interaction planes.\n- Clarification-safe request validation so MCP servers can ask for missing runtime inputs before dispatch.\n\n## Adapter contract\n\nEvery provider adapter implements the same shape:\n\n```ts\ninterface BackendAdapter {\n  provider: string;\n  capabilities(): AdapterCapability[];\n  resolveTarget(request: DispatchRequest): Promise<ResolvedTarget>;\n  provision(request: ProvisionRequest): Promise<ProvisionResult>;\n  prepareTask?(request: PrepareTaskRequest): Promise<PrepareTaskResult>;\n  startTask(request: StartTaskRequest): Promise<StartTaskResult>;\n  streamEvents(taskId: string): AsyncIterable<RuntimeEvent>;\n  cancel(taskId: string): Promise<CancelResult>;\n  cleanup(target: RuntimeTarget): Promise<CleanupResult>;\n}\n```\n\nAdapters translate provider-neutral requests into provider APIs, then return provider-neutral task handles, events, artifacts, and optional `cloudAgent` metadata. Provider-specific values stay in adapter config or `target.details`; the MCP server and SDK do not import provider SDK types.\n\n## Install\n\n```bash\nnpm install @agent-dispatch/core\n```\n\n## Example\n\n```ts\nimport { RuntimeService } from \"@agent-dispatch/core\";\n\nconst runtime = new RuntimeService({\n  adapters: [awsAgentCoreAdapter],\n  store,\n  config\n});\n\nconst task = await runtime.dispatchTask({\n  provider: \"aws\",\n  accountProfile: \"dev-aws\",\n  capability: \"agent-runtime\",\n  taskType: \"agent.run\",\n  target: { mode: \"session\", protocol: \"a2a\" },\n  input: {\n    instruction: \"Analyze this repository and produce a migration plan.\"\n  }\n});\n```\n\n## Package role\n\n`@agent-dispatch/core` is the compatibility anchor. All adapters depend on it. It depends on no adapters. If a future provider needs a new feature, the design goal is to extend core once and keep the agent-facing MCP tools stable.\n\n## Development\n\n```bash\nnpm install\nnpm run typecheck\nnpm test\nnpm run build\n```\n","readmeFilename":"README.md","keywords":["agentdispatch","agents","mcp","model-context-protocol","cloud-agents","subagents","agent-orchestration","typescript"]}