Commit 348f608
fix(types): address Greptile review feedback
Three issues from Greptile's review (4/5 confidence, all P1/P2):
1. Back-compat shim at `agentex.lib.types.acp` was missing two public
names from the original module: `RPC_SYNC_METHODS` and
`PARAMS_MODEL_BY_METHOD`. External consumers importing those from the
old path would have hit ImportError, breaking the PR's "zero install-
time impact" guarantee. Added both to the re-export list.
2. `agentex.protocol.json_rpc` silently dropped `from_attributes=True`
and `populate_by_name=True` config when switching from
`model_utils.BaseModel` to plain `pydantic.BaseModel`. Restored via
an explicit `model_config = ConfigDict(...)` on all three classes,
with a comment explaining why. The previous version inherited these
flags transitively; making them explicit + documented avoids drift.
3. All 10 CLI scaffolding templates (`agentex init`) generated
`from agentex.lib.types.acp import ...` — works via the shim but
immediately stale on the day this PR establishes
`agentex.protocol.acp` as canonical. Updated all templates to use
the new path so scaffolded code starts on the right foot.
Verified locally:
- ruff check . → All checks passed
- shim re-exports all 7 original symbols (5 classes + 2 module-level
constants), identity-checked vs canonical
- JSONRPCRequest/Response/Error all have
`model_config.get('from_attributes') is True` and
`populate_by_name is True`
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7590970 commit 348f608
12 files changed
Lines changed: 25 additions & 11 deletions
File tree
- src/agentex
- lib
- cli/templates
- default-langgraph/project
- default-pydantic-ai/project
- default/project
- sync-langgraph/project
- sync-openai-agents/project
- sync-pydantic-ai/project
- sync/project
- temporal-openai-agents/project
- temporal-pydantic-ai/project
- temporal/project
- types
- protocol
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments