Commit eb637f3
authored
feat: surface structured rejection fields from gRPC response (RFC-008 B8) (#61)
* feat: surface structured rejection fields from gRPC response (RFC-008 B8)
- Regenerate mcp_pb2.py from updated proto with error_code,
rejection_detail, requested_capability, presented_capability
fields (15-18) and SCOPE_INSUFFICIENT enum value (9)
- Add SCOPE_INSUFFICIENT to deny_reason_map in evaluate_tool_access()
- Return error_code, requested_capability, presented_capability
in the evaluate_tool_access() result dict
- Restore try/except TypeError handler for descriptor pool collisions
* fix: address Copilot review feedback on RFC-008 B8
- Remove duplicated import block in mcp_pb2.py
- Remove grpcio>=1.76.0 version gate from mcp_pb2_grpc.py (SDK
supports grpcio>=1.60.0)
- Remove unused warnings import from mcp_pb2_grpc.py
- Add rejection_detail to evaluate_tool_access() return dict
- Add unit tests for structured rejection fields1 parent 8e7e36a commit eb637f3
4 files changed
Lines changed: 209 additions & 46 deletions
File tree
- capiscio_sdk/_rpc
- gen/capiscio/v1
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1607 | 1607 | | |
1608 | 1608 | | |
1609 | 1609 | | |
| 1610 | + | |
1610 | 1611 | | |
1611 | 1612 | | |
1612 | 1613 | | |
| |||
1636 | 1637 | | |
1637 | 1638 | | |
1638 | 1639 | | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
1639 | 1644 | | |
1640 | 1645 | | |
1641 | 1646 | | |
| |||
0 commit comments