@rozenite/agent-shared
v1.6.0
Published
Shared types and utilities for Rozenite agent packages
Downloads
17,894
Readme

Shared Agent types and message contracts for Rozenite packages.
@rozenite/agent-shared contains the shared type definitions used by Rozenite Agent packages. It defines the Agent tool shape, the message protocol for registering and calling tools, and the shared AGENT_PLUGIN_ID constant used by the bridge packages.
Features
- Shared Tool Types: Common
AgentTooland JSON-schema-like input types - Message Contracts: Typed payloads for register, unregister, call, and result messages
- Single Protocol Constant: Shared
AGENT_PLUGIN_IDfor the Agent transport - Package Reuse: Intended for bridge and runtime packages that implement Agent support
Installation
Install the shared package as a dependency:
npm install @rozenite/agent-sharedExports
This package exports:
AGENT_PLUGIN_IDAgentToolJSONSchema7DevToolsPluginMessageRegisterToolPayloadUnregisterToolPayloadToolCallPayloadToolResultPayloadRegisterToolMessageUnregisterToolMessageToolCallMessageToolResultMessageAgentMessage
Usage
import {
AGENT_PLUGIN_ID,
type AgentTool,
type ToolCallMessage,
} from '@rozenite/agent-shared';
const tool: AgentTool = {
name: 'example.echo',
description: 'Echo a value back to the caller.',
inputSchema: {
type: 'object',
properties: {
value: { type: 'string' },
},
required: ['value'],
},
};
console.log(AGENT_PLUGIN_ID);Made with ❤️ at Callstack
rozenite is an open source project and will always remain free to use. If you think it's cool, please star it 🌟.
Callstack is a group of React and React Native geeks, contact us at [email protected] if you need any help with these or just want to say hi!
Like the project? ⚛️ Join the team who does amazing stuff for clients and drives React Native Open Source! 🔥
