@adecore/agent-contracts 0.17.0-beta.1 → 0.17.0-beta.2

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.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +27 -8
  3. package/package.json +1 -1
package/LICENSE CHANGED
@@ -6,7 +6,7 @@ FSL-1.1-MIT
6
6
 
7
7
  ## Notice
8
8
 
9
- Copyright 2026 Bas Milius
9
+ Copyright 2026 - present Bas Milius
10
10
 
11
11
  ## Terms and Conditions
12
12
 
package/README.md CHANGED
@@ -1,20 +1,39 @@
1
1
  # @adecore/agent-contracts
2
2
 
3
- Zod schemas and TypeScript contracts shared by agent chat hosts and clients. The package covers conversations, attachments, approvals, providers, model selections, accounts, tasks, worktrees, and usage. It is browser safe and contains no process or transport implementation.
3
+ [![npm](https://img.shields.io/npm/v/@adecore/agent-contracts)](https://www.npmjs.com/package/@adecore/agent-contracts)
4
+ [![Docs](https://img.shields.io/badge/docs-adecore.dev-blue)](https://adecore.dev/agent-contracts/)
5
+
6
+ The Zod schemas and TypeScript types an agent chat host and its clients share: the frames on the wire, the requests and events, a chat and its items, providers, models, accounts, tasks, worktrees and usage. It opens no connection and starts no process, so a browser, a preload and a backend can all import it.
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ bun add @adecore/agent-contracts
12
+ ```
13
+
14
+ ## Use
4
15
 
5
16
  ```ts
6
17
  import { AGENT_REQUEST_SCHEMAS, parseRequest } from '@adecore/agent-contracts';
7
- import type { FramePort } from '@adecore/agent-contracts/port';
8
18
 
9
- const payload = AGENT_REQUEST_SCHEMAS['chat.send'].payload.parse({ chatId: 'chat-1', text: 'Hello' });
19
+ const frame = parseRequest(incoming);
20
+ if (frame.ok && frame.value.type === 'chat.send') {
21
+ const payload = AGENT_REQUEST_SCHEMAS['chat.send'].payload.parse(frame.value.payload);
22
+ }
10
23
  ```
11
24
 
12
- Envelope parsing checks frame structure. Persisted and wire discriminants, including the historical host-owned subagent origin, remain unchanged during the package migration. Validate payloads and correlated results against the selected table schema too. A consumer supplies transport ownership, authorization, and any larger host protocol.
25
+ The root exports everything. Each group also has a subpath of its own: `agent`, `chat`, `envelope`, `ids`, `model`, `port`, `protocol`, `provider-accounts`, `task`, `text`, `usage` and `worktree`.
13
26
 
14
- The [documentation](https://adecore.dev/agent-contracts/) covers [setup](https://adecore.dev/agent-contracts/getting-started), [frames and replay](https://adecore.dev/agent-contracts/frames-and-events), [conversation content](https://adecore.dev/agent-contracts/conversation), [providers/accounts](https://adecore.dev/agent-contracts/providers-and-accounts), [tasks/usage](https://adecore.dev/agent-contracts/tasks-and-usage), and [entrypoints/compatibility](https://adecore.dev/agent-contracts/validation-and-compatibility).
27
+ ## Documentation
15
28
 
16
- The root reexports all groups. Supported subpaths are `agent`, `chat`, `envelope`, `ids`, `model`, `port`, `protocol`, `provider-accounts`, `task`, `text`, `usage`, and `worktree`.
29
+ | Page | What it covers |
30
+ |---|---|
31
+ | [Overview](https://adecore.dev/agent-contracts/) | Install, a first check and the entry points |
32
+ | [Protocol](https://adecore.dev/agent-contracts/protocol) | Frames, the request and event tables, replay and adding requests |
33
+ | [Conversation](https://adecore.dev/agent-contracts/conversation) | A chat's info and items, attachments, approvals, bookmarks and forks |
34
+ | [Providers and accounts](https://adecore.dev/agent-contracts/providers-and-accounts) | Agent kinds, model catalogs, capabilities, runtime modes and accounts |
35
+ | [Tasks and usage](https://adecore.dev/agent-contracts/tasks-and-usage) | Tasks, worktrees, token totals, summaries and plan limits |
17
36
 
18
- This package is private at `0.0.0`, pending publication setup. In the local workspace, build it with `bun run --cwd packages/agent-contracts build`, then run its `typecheck` and `test` scripts. Default exports use compiled JavaScript/declarations; the `source` condition uses TypeScript. Build it before the backend and React packages.
37
+ ## License
19
38
 
20
- Transferred code retains FSL-1.1-MIT. See [LICENSE](./LICENSE).
39
+ FSL-1.1-MIT. See [LICENSE](./LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agent-contracts",
3
- "version": "0.17.0-beta.1",
3
+ "version": "0.17.0-beta.2",
4
4
  "description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
5
5
  "type": "module",
6
6
  "exports": {