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,49 +2,14 @@
"module": "mongo_ops.cache.backend",
"content": {
"path": "mongo_ops.cache.backend",
"docstring": "Cache backend abstraction.",
"docstring": "# Summary\n\nCache backend abstraction.",
"objects": {
"ABC": {
"name": "ABC",
"kind": "alias",
"path": "mongo_ops.cache.backend.ABC",
"signature": "<bound method Alias.signature of Alias('ABC', 'abc.ABC')>",
"docstring": null
},
"abstractmethod": {
"name": "abstractmethod",
"kind": "alias",
"path": "mongo_ops.cache.backend.abstractmethod",
"signature": "<bound method Alias.signature of Alias('abstractmethod', 'abc.abstractmethod')>",
"docstring": null
},
"dataclass": {
"name": "dataclass",
"kind": "alias",
"path": "mongo_ops.cache.backend.dataclass",
"signature": "<bound method Alias.signature of Alias('dataclass', 'dataclasses.dataclass')>",
"docstring": null
},
"Optional": {
"name": "Optional",
"kind": "alias",
"path": "mongo_ops.cache.backend.Optional",
"signature": "<bound method Alias.signature of Alias('Optional', 'typing.Optional')>",
"docstring": null
},
"ObjectId": {
"name": "ObjectId",
"kind": "alias",
"path": "mongo_ops.cache.backend.ObjectId",
"signature": "<bound method Alias.signature of Alias('ObjectId', 'bson.ObjectId')>",
"docstring": null
},
"CacheStats": {
"name": "CacheStats",
"kind": "class",
"path": "mongo_ops.cache.backend.CacheStats",
"signature": "<bound method Class.signature of Class('CacheStats', 9, 16)>",
"docstring": null,
"signature": "CacheStats(hits: int = 0, misses: int = 0, sets: int = 0, deletes: int = 0, current_size: int = 0, max_size: int = 0)",
"docstring": "Snapshot of cache usage and activity counters.\n\nAttributes:\n hits (int):\n Number of get() calls that found a value.\n misses (int):\n Number of get() calls that returned None.\n sets (int):\n Number of values written to the cache.\n deletes (int):\n Number of keys removed.\n current_size (int):\n Number of entries currently held.\n max_size (int):\n Maximum number of entries the cache allows (0 = unbounded).",
"members": {
"hits": {
"name": "hits",
@@ -94,8 +59,8 @@
"name": "CircularReferenceError",
"kind": "class",
"path": "mongo_ops.cache.backend.CircularReferenceError",
"signature": "<bound method Class.signature of Class('CircularReferenceError', 19, 24)>",
"docstring": null,
"signature": "CircularReferenceError(collection: str, doc_id: ObjectId, path: list[str])",
"docstring": "Raised when population detects a cycle in the reference graph.\n\nAttributes:\n collection (str):\n Collection where the cycle was detected.\n doc_id (ObjectId):\n Document ID where the cycle was detected.\n path (list[str]):\n Ordered labels describing the visited reference path.",
"members": {
"collection": {
"name": "collection",
@@ -124,64 +89,64 @@
"name": "CacheBackend",
"kind": "class",
"path": "mongo_ops.cache.backend.CacheBackend",
"signature": "<bound method Class.signature of Class('CacheBackend', 27, 58)>",
"docstring": null,
"signature": null,
"docstring": "Abstract interface for cache backends.\n\nImplementations store byte-encoded values keyed by string, track usage\nstatistics, and manage their own lifecycle. The in-memory and Redis\nbackends both implement this contract.",
"members": {
"get": {
"name": "get",
"kind": "function",
"path": "mongo_ops.cache.backend.CacheBackend.get",
"signature": "<bound method Function.signature of Function('get', 28, 30)>",
"docstring": null
"signature": "get(key: str) -> bytes | None",
"docstring": "Fetch a value from the cache.\n\nArgs:\n key (str):\n The cache key.\n\nReturns:\n Optional[bytes]: The cached bytes, or None on a miss."
},
"set": {
"name": "set",
"kind": "function",
"path": "mongo_ops.cache.backend.CacheBackend.set",
"signature": "<bound method Function.signature of Function('set', 32, 34)>",
"docstring": null
"signature": "set(key: str, value: bytes, ttl: int | None = None) -> None",
"docstring": "Store a value in the cache.\n\nArgs:\n key (str):\n The cache key.\n value (bytes):\n The byte-encoded value to store.\n ttl (Optional[int]):\n Time-to-live in seconds. When None, the backend default\n applies."
},
"delete": {
"name": "delete",
"kind": "function",
"path": "mongo_ops.cache.backend.CacheBackend.delete",
"signature": "<bound method Function.signature of Function('delete', 36, 38)>",
"docstring": null
"signature": "delete(key: str) -> None",
"docstring": "Remove a key from the cache.\n\nArgs:\n key (str):\n The cache key."
},
"exists": {
"name": "exists",
"kind": "function",
"path": "mongo_ops.cache.backend.CacheBackend.exists",
"signature": "<bound method Function.signature of Function('exists', 40, 42)>",
"docstring": null
"signature": "exists(key: str) -> bool",
"docstring": "Check whether a key is present.\n\nArgs:\n key (str):\n The cache key.\n\nReturns:\n bool: True if the key exists, False otherwise."
},
"clear_pattern": {
"name": "clear_pattern",
"kind": "function",
"path": "mongo_ops.cache.backend.CacheBackend.clear_pattern",
"signature": "<bound method Function.signature of Function('clear_pattern', 44, 46)>",
"docstring": null
"signature": "clear_pattern(pattern: str) -> None",
"docstring": "Remove all keys matching a glob pattern.\n\nArgs:\n pattern (str):\n Glob-style pattern; a trailing `*` matches prefixes."
},
"get_stats": {
"name": "get_stats",
"kind": "function",
"path": "mongo_ops.cache.backend.CacheBackend.get_stats",
"signature": "<bound method Function.signature of Function('get_stats', 48, 50)>",
"docstring": null
"signature": "get_stats() -> CacheStats",
"docstring": "Return a snapshot of cache statistics.\n\nReturns:\n CacheStats: A copy of the current stats counters."
},
"initialize": {
"name": "initialize",
"kind": "function",
"path": "mongo_ops.cache.backend.CacheBackend.initialize",
"signature": "<bound method Function.signature of Function('initialize', 52, 54)>",
"docstring": null
"signature": "initialize() -> None",
"docstring": "Start background resources owned by the backend.\n\nShould be called once during application startup, after the\nrepositories are connected."
},
"shutdown": {
"name": "shutdown",
"kind": "function",
"path": "mongo_ops.cache.backend.CacheBackend.shutdown",
"signature": "<bound method Function.signature of Function('shutdown', 56, 58)>",
"docstring": null
"signature": "shutdown() -> None",
"docstring": "Stop and release background resources.\n\nShould be called once during application shutdown."
}
}
}