feat(standards): codify codegen, ship generic Tier-B infra, add get_app_template + prompts; fix docs:// regressions

P0: fix doc:// -> docs:// across standards src/server/registry and regenerate stale mongo-ops bundle. P1: build recipe + spec-first routing now document the openapi-first codegen fast path (models/routes with --inject-request/--package). P4: CRUD template documents the model-vs-document id rule (BaseDocument owns id). P5: authless guidance (omit security keys). P6: template gains generic infra (http_cache, keyed SSE bus, KV port+in-memory+Redis), interfaces/openapi.py + .dockerignore + generic build test registered as components, and a get_app_template tool; genericity matrix marks LLM pool + human-in-loop as reference-app patterns. P7: intake/build/start_app/trial prompts. P8: template ships tests/integration/test_openapi_app_builds.py. Rebuilt standards + openapi-first bundles and re-collected.
This commit is contained in:
2026-10-13 03:26:51 +05:30
parent ef951a1913
commit fced40af59
109 changed files with 4082 additions and 5885 deletions

View File

@@ -2,77 +2,49 @@
"module": "mongo_ops.connection",
"content": {
"path": "mongo_ops.connection",
"docstring": "MongoDB connection management.",
"docstring": "# Summary\n\nMongoDB connection management.",
"objects": {
"asynccontextmanager": {
"name": "asynccontextmanager",
"kind": "alias",
"path": "mongo_ops.connection.asynccontextmanager",
"signature": "<bound method Alias.signature of Alias('asynccontextmanager', 'contextlib.asynccontextmanager')>",
"docstring": null
},
"Optional": {
"name": "Optional",
"kind": "alias",
"path": "mongo_ops.connection.Optional",
"signature": "<bound method Alias.signature of Alias('Optional', 'typing.Optional')>",
"docstring": null
},
"AsyncIOMotorClient": {
"name": "AsyncIOMotorClient",
"kind": "alias",
"path": "mongo_ops.connection.AsyncIOMotorClient",
"signature": "<bound method Alias.signature of Alias('AsyncIOMotorClient', 'motor.motor_asyncio.AsyncIOMotorClient')>",
"docstring": null
},
"AsyncIOMotorDatabase": {
"name": "AsyncIOMotorDatabase",
"kind": "alias",
"path": "mongo_ops.connection.AsyncIOMotorDatabase",
"signature": "<bound method Alias.signature of Alias('AsyncIOMotorDatabase', 'motor.motor_asyncio.AsyncIOMotorDatabase')>",
"docstring": null
},
"MongoConnectionManager": {
"name": "MongoConnectionManager",
"kind": "class",
"path": "mongo_ops.connection.MongoConnectionManager",
"signature": "<bound method Class.signature of Class('MongoConnectionManager', 8, 114)>",
"docstring": "Manages MongoDB connections with async lifecycle.\n\nThis class provides a singleton-like manager for the MongoDB client and \ndatabase instances, ensuring they are properly initialized and closed \nacross the application lifecycle.",
"signature": null,
"docstring": "Manages MongoDB connections with async lifecycle.\n\nThis class provides a singleton-like manager for the MongoDB client and\ndatabase instances, ensuring they are properly initialized and closed\nacross the application lifecycle.",
"members": {
"connect": {
"name": "connect",
"kind": "function",
"path": "mongo_ops.connection.MongoConnectionManager.connect",
"signature": "<bound method Function.signature of Function('connect', 22, 45)>",
"docstring": "Connect to MongoDB and initialize the shared client.\n\nArgs:\n uri: MongoDB connection URI (e.g., \"mongodb://localhost:27017\").\n db_name: Name of the database to use.\n **kwargs: Additional Motor client options (e.g., maxPoolSize).\n\nReturns:\n AsyncIOMotorDatabase: The initialized database instance."
"signature": "connect(uri: str, db_name: str, **kwargs: Any) -> AsyncIOMotorDatabase",
"docstring": "Connect to MongoDB and initialize the shared client.\n\nArgs:\n uri (str): MongoDB connection URI (e.g., \"mongodb://localhost:27017\").\n db_name (str): Name of the database to use.\n **kwargs: Additional Motor client options (e.g., maxPoolSize).\n\nReturns:\n AsyncIOMotorDatabase: The initialized database instance."
},
"disconnect": {
"name": "disconnect",
"kind": "function",
"path": "mongo_ops.connection.MongoConnectionManager.disconnect",
"signature": "<bound method Function.signature of Function('disconnect', 47, 55)>",
"signature": "disconnect() -> None",
"docstring": "Close the active MongoDB connection and cleanup resources."
},
"get_database": {
"name": "get_database",
"kind": "function",
"path": "mongo_ops.connection.MongoConnectionManager.get_database",
"signature": "<bound method Function.signature of Function('get_database', 57, 70)>",
"signature": "get_database() -> AsyncIOMotorDatabase",
"docstring": "Retrieve the current database instance.\n\nReturns:\n AsyncIOMotorDatabase: The active database instance.\n\nRaises:\n RuntimeError: If connect() has not been called yet."
},
"get_client": {
"name": "get_client",
"kind": "function",
"path": "mongo_ops.connection.MongoConnectionManager.get_client",
"signature": "<bound method Function.signature of Function('get_client', 72, 85)>",
"signature": "get_client() -> AsyncIOMotorClient",
"docstring": "Retrieve the current client instance.\n\nReturns:\n AsyncIOMotorClient: The active Motor client instance.\n\nRaises:\n RuntimeError: If connect() has not been called yet."
},
"lifespan": {
"name": "lifespan",
"kind": "function",
"path": "mongo_ops.connection.MongoConnectionManager.lifespan",
"signature": "<bound method Function.signature of Function('lifespan', 87, 114)>",
"docstring": "Async context manager for managing connection lifecycle.\n\nDesigned for use with FastAPI or other frameworks supporting \nlifespan management.\n\nArgs:\n uri: MongoDB connection URI.\n db_name: Name of the database.\n **kwargs: Additional Motor client options.\n\nYields:\n AsyncIOMotorDatabase: The active database instance.\n\nUsage:\n @asynccontextmanager\n async def lifespan(app: FastAPI):\n async with MongoConnectionManager.lifespan(uri, db_name):\n yield"
"signature": "lifespan(uri: str, db_name: str, **kwargs: Any) -> AbstractAsyncContextManager[AsyncIOMotorDatabase]",
"docstring": "Async context manager for managing connection lifecycle.\n\nDesigned for use with FastAPI or other frameworks supporting\nlifespan management.\n\nNotes:\n Connects to MongoDB on entry, yields the active database instance\n to the context body, and disconnects on exit.\n\nUsage:\n @asynccontextmanager\n async def lifespan(app: FastAPI):\n async with MongoConnectionManager.lifespan(uri, db_name):\n yield"
}
}
}