Ground rules¶
These hold across the package, and reviews check for them.
- One path for every request. Adapters never call handlers. They call
CloudGMCPLayer.call_tool,read_resource,get_promptorcomplete, so policy, transforms, middleware, timeouts and audit apply the same way everywhere. - Framework-free core.
core.py,schema.py,context.py,layer.py,state.py,policy.py,transforms/andnative/use the standard library, pydantic and cloudg only.mcp,fastmcp,starletteanduvicornare imported inside functions. - Wire shapes come from cloudg. Every adapter lists primitives from the layer's
to_wire()dicts, so no framework re-derives a schema from a Python signature. - Python 3.11 compatible, typed, line length 100 (
ruff, target py311). - Tests run without network access or cloud credentials. Live tools are tested with the engine monkeypatched.