Skip to content

Commit 9f237a0

Browse files
docs(claude): document agentex.protocol/* canonical location + shim policy
Per Declan's review on this PR — document the protocol-types migration in CLAUDE.md so future contributors know: - `src/agentex/protocol/` is the canonical home for slim-safe wire types (acp.py + json_rpc.py); imports allowed from a future REST-only install. - `src/agentex/lib/types/{acp,json_rpc}.py` are back-compat shims — re-exporting from the canonical path. Existing user imports unaffected; new code should target agentex.protocol.*. - Other `lib/types/*` modules (tracing, agent_card, credentials, fastacp, llm_messages, converters) stay in place because they have heavier transitive deps that aren't slim-safe. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d1ad15f commit 9f237a0

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,27 @@ The package provides the `agentex` CLI with these main commands:
5555

5656
### Code Structure
5757
- `/src/agentex/` - Core SDK and generated API client code
58+
- `/src/agentex/protocol/` - **Canonical** location for wire-protocol shapes
59+
(JSON-RPC envelopes, ACP method-param types). Depends only on `pydantic`
60+
and the Stainless-generated `agentex.types.*` surface, so it is safe to
61+
import from a future slim REST-only install.
62+
- `acp.py` - `RPCMethod`, `CreateTaskParams`, `SendMessageParams`,
63+
`SendEventParams`, `CancelTaskParams`, `RPC_SYNC_METHODS`,
64+
`PARAMS_MODEL_BY_METHOD`
65+
- `json_rpc.py` - `JSONRPCRequest`, `JSONRPCResponse`, `JSONRPCError`
5866
- `/src/agentex/lib/` - Custom library code (not modified by code generator)
5967
- `/cli/` - Command-line interface implementation
6068
- `/core/` - Core services, adapters, and temporal workflows
6169
- `/sdk/` - SDK utilities and FastACP implementation
6270
- `/types/` - Custom type definitions
71+
- `acp.py`, `json_rpc.py` - **back-compat shims** re-exporting from
72+
`agentex.protocol.*`. Existing `from agentex.lib.types.{acp,json_rpc}
73+
import ...` keeps working; new code should import from the canonical
74+
`agentex.protocol.*` paths.
75+
- Other modules (`tracing`, `agent_card`, `credentials`, `fastacp`,
76+
`llm_messages`, `converters`, etc.) stay here — they have heavier
77+
transitive deps (temporal, openai-agents, model_utils/yaml) and
78+
aren't slim-safe.
6379
- `/utils/` - Utility functions
6480
- `/examples/` - Example implementations and tutorials
6581
- `/tests/` - Test suites

0 commit comments

Comments
 (0)