{"_id":"@best-agent/protocol","_rev":"3-0a868cef236088728236d7bb3d8f005f","name":"@best-agent/protocol","dist-tags":{"latest":"0.0.2-beta.8","beta":"0.0.2-beta.2"},"versions":{"0.0.1-beta.1":{"name":"@best-agent/protocol","version":"0.0.1-beta.1","_id":"@best-agent/protocol@0.0.1-beta.1","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"dist":{"shasum":"c61cf0d9c52552e65fd837438eaafd8713b9e610","tarball":"https://registry.npmjs.org/@best-agent/protocol/-/protocol-0.0.1-beta.1.tgz","fileCount":44,"integrity":"sha512-63+pl8eyZEWsNlpdMwW8XZe/vtw/cXhwHtYsgmqUw4AuI5g7W6WVONcOOyEDKT0hzsxjjqrYAeLMSL1IemAsKA==","signatures":[{"sig":"MEYCIQCsNPDPSSjPkP5+0pQ3uw3DtM5TdB+Y3y9M3ZLAv/NF+QIhAIT/XHf8ryXjpgifm8bjH9ZAEG2dJX51zMYrEmmiM5Cq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":318779},"main":"./dist/index.js","type":"module","_from":"file:best-agent-protocol-0.0.1-beta.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./ids":{"types":"./dist/ids.d.ts","default":"./dist/ids.js"},"./events":{"types":"./dist/events.d.ts","default":"./dist/events.js"},"./authoring":{"types":"./dist/authoring.d.ts","default":"./dist/authoring.js"}},"scripts":{"release":"pnpm -w build && pnpm publish --access public --no-git-checks"},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/5fe67a549a4536251c07e121aa9c1b98/best-agent-protocol-0.0.1-beta.1.tgz","_integrity":"sha512-63+pl8eyZEWsNlpdMwW8XZe/vtw/cXhwHtYsgmqUw4AuI5g7W6WVONcOOyEDKT0hzsxjjqrYAeLMSL1IemAsKA==","_npmVersion":"10.9.2","description":"Shared public contract for `best-agent`.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"@best-agent/foundation":"0.0.1-beta.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/protocol_0.0.1-beta.1_1779708559999_0.10376864989972945","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-beta.2":{"name":"@best-agent/protocol","version":"0.0.2-beta.2","_id":"@best-agent/protocol@0.0.2-beta.2","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"dist":{"shasum":"a5d044fa098832c306cb5af94ce0ec6ca896f86a","tarball":"https://registry.npmjs.org/@best-agent/protocol/-/protocol-0.0.2-beta.2.tgz","fileCount":44,"integrity":"sha512-kVY8sl0tR+yNOR+UT53M8s5jIX2idkV+3BF8Nx4IxKGnynYIH+pF0Oe+Igd8ElO0c5gvAexLpMoZ3vRAr0RWkA==","signatures":[{"sig":"MEQCIFFYtzj5szxxI9g9RCnPDbgbBGcKyXoRXhA8RVW1k5FLAiA/QtUP0GTJFLRX3v3dPnyUMdgYk66IAadGNhcEPiT50Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":318779},"main":"./dist/index.js","type":"module","_from":"file:best-agent-protocol-0.0.2-beta.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./ids":{"types":"./dist/ids.d.ts","default":"./dist/ids.js"},"./events":{"types":"./dist/events.d.ts","default":"./dist/events.js"},"./authoring":{"types":"./dist/authoring.d.ts","default":"./dist/authoring.js"}},"scripts":{"release":"pnpm -w build && pnpm publish --access public --no-git-checks"},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/2c89ad9c229dca5ba395d2227016b3b4/best-agent-protocol-0.0.2-beta.2.tgz","_integrity":"sha512-kVY8sl0tR+yNOR+UT53M8s5jIX2idkV+3BF8Nx4IxKGnynYIH+pF0Oe+Igd8ElO0c5gvAexLpMoZ3vRAr0RWkA==","_npmVersion":"10.9.2","description":"Shared public contract for `best-agent`.","directories":{},"_nodeVersion":"23.11.0","dependencies":{"@best-agent/foundation":"0.0.2-beta.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/protocol_0.0.2-beta.2_1779794949857_0.596107673145867","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-beta.8":{"name":"@best-agent/protocol","version":"0.0.2-beta.8","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./authoring":{"types":"./dist/authoring.d.ts","default":"./dist/authoring.js"},"./events":{"types":"./dist/events.d.ts","default":"./dist/events.js"},"./ids":{"types":"./dist/ids.d.ts","default":"./dist/ids.js"}},"dependencies":{"@best-agent/foundation":"0.0.2-beta.8"},"scripts":{"release":"pnpm -w build && pnpm publish --access public --no-git-checks"},"_id":"@best-agent/protocol@0.0.2-beta.8","description":"Shared public contract for `best-agent`.","_integrity":"sha512-cItjAaECoeP3jkpB0l8Q+916/A3dACizqvw4m660dpz68e5TfWh7V+uruxyFJ/nzBmya3pk8G7M/9TirpOVZFA==","_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/5b4d70cfb20eaa4f388a496cc205316b/best-agent-protocol-0.0.2-beta.8.tgz","_from":"file:best-agent-protocol-0.0.2-beta.8.tgz","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-cItjAaECoeP3jkpB0l8Q+916/A3dACizqvw4m660dpz68e5TfWh7V+uruxyFJ/nzBmya3pk8G7M/9TirpOVZFA==","shasum":"013dec3aad17a3aece718685d5ab9eb56e24b2ba","tarball":"https://registry.npmjs.org/@best-agent/protocol/-/protocol-0.0.2-beta.8.tgz","fileCount":44,"unpackedSize":322674,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFCo6XuruW1q3VvU82gnDRSz9oRFtaG9NOGe7ejfsyB6AiEAudVq/2IuknU7d9GxRHiWZAsdAtOaIQWFyOyaKXzWKBk="}]},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"directories":{},"maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/protocol_0.0.2-beta.8_1780387068727_0.5670545619731493"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T11:29:19.878Z","modified":"2026-06-02T07:57:48.994Z","0.0.1-beta.1":"2026-05-25T11:29:20.135Z","0.0.2-beta.2":"2026-05-26T11:29:10.013Z","0.0.2-beta.8":"2026-06-02T07:57:48.876Z"},"description":"Shared public contract for `best-agent`.","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"readme":"# @best-agent/protocol\n\nShared public contract for `best-agent`.\n\n## Main Exports\n\nAuthoring helpers:\n\n- `defineTool(...)`\n- `defineSkill(...)`\n- plain `ContributionDefinition` objects\n\nKey public types:\n\n- thread and turn types:\n  - `Thread`\n  - `ThreadDetail`\n  - `ThreadListItem`\n  - `ThreadMode`\n  - `TurnStatus`\n- discovery and config:\n  - `ProviderConfig`\n  - `AgentDefinition`\n  - `AgentDefinitionModelStrategy`\n  - `AgentLoopKind`\n  - `AgentProfileSummary`\n  - `ToolConflictStrategy`\n  - `ToolSummary`\n  - `SkillSummary`\n  - `ExtensionSummary`\n  - `McpServerSummary`\n- runtime events:\n  - `EventEnvelope`\n  - `ServerEventType`\n  - approval, workflow, research, telemetry, and compaction event shapes\n- cross-session memory and approvals:\n  - `ProjectMemoryRecord`\n  - `GuardianAssessment`\n  - `HostedPreToolUseRequest`\n  - `HostedPostToolUseRequest`\n- graph-owned kernel types:\n  - `PlanProjection`\n  - `NodeContract`\n  - `ClosurePolicy`\n  - `Verdict`\n  - `VerdictRecord`\n  - `ContinuitySnapshot`\n  - `NodePacket`\n- request and response types for:\n  - thread lifecycle\n  - approvals\n  - run/stream/interrupt/queue/steer\n  - diagnostics and compaction\n  - research queries\n  - `RpcMethodMap` for method-to-params/result dispatch typing\n\n## Features\n\n- one typed contract shared by `app-server`, `acp-server`, `sdk-ts`, hosted contributions, and runtime internals\n- one method-to-params/result map shared by `server`, `sdk-ts`, and gateway clients\n- structured tool inputs via `inputSchema`\n- composition primitives for `AgentDefinition` and tool conflict handling\n- first-class thread modes, queue/steer controls, diagnostics, telemetry, workflows, and research\n\n## Example\n\n```ts\nimport { defineSkill, defineTool, type ContributionDefinition, type ProviderConfig } from \"@best-agent/protocol\";\n\nconst provider: ProviderConfig = {\n  kind: \"openai\",\n  model: \"gpt-5-mini\",\n};\n\nconst echoTool = defineTool({\n  name: \"echo-json\",\n  description: \"Echo text from a JSON payload.\",\n  inputSchema: {\n    type: \"object\",\n    properties: {\n      text: { type: \"string\" },\n    },\n    required: [\"text\"],\n  },\n});\n\nconst summarySkill = defineSkill({\n  id: \"concise\",\n  name: \"Concise\",\n  description: \"Respond briefly.\",\n  content: \"Keep answers short.\",\n});\n\nexport const contribution: ContributionDefinition = {\n  name: \"demo\",\n  tools: [echoTool],\n  skills: [summarySkill],\n};\n```\n\n## Does Not Own\n\n- runtime logic\n- storage implementations\n- provider calls\n- tool execution\n\nIf a type must cross a process boundary, it belongs here.\n","readmeFilename":"README.md"}