@agent-cdp/protocol
v1.5.1
Published
Shared protocol types for agent-cdp daemon, CLI, and SDK integrations.
Readme
@agent-cdp/protocol
@agent-cdp/protocol contains the shared TypeScript types and command contracts used by the agent-cdp CLI, daemon, and runtime SDK bridge.
Install
npm install @agent-cdp/protocolFor workspace development from this repository:
pnpm install
pnpm run buildWhat it exports
- Discovery and target types such as
TargetDescriptor,StatusInfo, andDaemonInfo - IPC command and response unions such as
IpcCommandandIpcResponse - Runtime bridge request and response types such as
AgentRuntimeBridgeRequestandAgentRuntimeBridgeResponse - Shared binding names used by the runtime bridge:
AGENT_CDP_BINDING_NAMEandAGENT_CDP_RECEIVE_NAME
Usage
import type { AgentRuntimeBridgeRequest, TargetDescriptor } from "@agent-cdp/protocol";
import { AGENT_CDP_BINDING_NAME } from "@agent-cdp/protocol";
const request: AgentRuntimeBridgeRequest = {
id: "1",
command: { type: "js-profile-status" },
};
function describeTarget(target: TargetDescriptor) {
return `${target.kind}:${target.title}`;
}
console.log(AGENT_CDP_BINDING_NAME, request, describeTarget);