@kb-labs/agent-contracts 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,4 @@
1
+ This project is licensed under the same terms as the KB Labs Plugin Template root project.
2
+
3
+ See the root LICENSE file at the repository root for full details.
4
+
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @kb-labs/agent-contracts
2
+
3
+ Shared type definitions and contracts for the KB Labs agent system. Provides TypeScript interfaces, event schemas, API routes, and Zod validation used by all other `agent-*` packages.
4
+
5
+ ## What's Inside
6
+
7
+ | Export | Description |
8
+ |--------|-------------|
9
+ | `types.ts` | Core types — `AgentConfig`, `AgentResult`, `SessionInfo`, `TurnInfo`, execution state |
10
+ | `events.ts` | Agent event system — `AgentEvent` union type covering full lifecycle |
11
+ | `ws-messages.ts` | WebSocket message contracts for real-time streaming |
12
+ | `verification.ts` | Quality gate types — `VerificationResult`, `GateConfig` |
13
+ | `turn.ts` | Turn-based interaction models |
14
+ | `schemas.ts` | Zod validation schemas for runtime input validation |
15
+ | `routes.ts` | API route definitions (`/api/v1/agents/*`) |
16
+ | `analytics.ts` | Analytics event type constants |
17
+ | `config-types.ts` | Configuration types, `DEFAULT_FILE_HISTORY_CONFIG` |
18
+ | `detailed-trace-types.ts` | Detailed trace event types for NDJSON tracing |
19
+ | `trace-command-response.ts` | Trace CLI command response types |
20
+
21
+ ## Usage
22
+
23
+ ```typescript
24
+ import type { AgentConfig, AgentResult } from '@kb-labs/agent-contracts';
25
+ import type { AgentEvent } from '@kb-labs/agent-contracts';
26
+ import { AgentRunRequestSchema } from '@kb-labs/agent-contracts';
27
+ ```
28
+
29
+ This package has **no runtime dependencies** on other agent packages — it's pure types + Zod schemas. Every other `agent-*` package depends on it.
30
+
31
+ ## Dependencies
32
+
33
+ - `zod` — runtime schema validation