You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,7 @@ If no new rule is detected -> do not update the file.
194
194
- For search-quality improvements, prefer mathematical or statistical ranking changes over hardcoded phrase lists or ad-hoc query text hacks, because the user explicitly wants tokenizer search to improve through general scoring behavior rather than manual exceptions.
195
195
- Prefer framework-provided in-memory caching primitives such as `IMemoryCache` over custom process-local storage implementations when they cover the lifecycle and lookup needs, because self-rolled memory stores age poorly and make scaling/concurrency behavior harder to trust.
196
196
- Never keep legacy compatibility shims, obsolete paths, or lingering documentation references to removed implementations when a replacement is accepted, because this repository should converge on the current design instead of carrying dead historical baggage.
197
+
- Never leave `ManagedCode`-prefixed DI/setup extension method names such as `AddManagedCodeMcpGateway(...)` in the public API once concise `McpGateway` naming is available, because these branded leftovers make the package surface inconsistent and read like stale legacy.
197
198
198
199
### Critical (NEVER violate)
199
200
@@ -234,6 +235,7 @@ If no new rule is detected -> do not update the file.
234
235
- Direct fixes over preserving legacy compatibility paths when cleanup or review-driven corrections are requested
235
236
- Framework-provided caching primitives over self-rolled in-memory stores when the package only needs process-local cache semantics
236
237
- Removing replaced code paths completely instead of keeping legacy mentions or compatibility leftovers
238
+
- Concise `McpGateway` public registration/init API names without leftover `ManagedCode` branding
237
239
238
240
### Dislikes
239
241
@@ -243,3 +245,4 @@ If no new rule is detected -> do not update the file.
243
245
- Shipping behavior without tests
244
246
- Self-rolled in-memory storage when standard .NET caching abstractions already fit the scenario
245
247
- Legacy/obsolete compatibility leftovers after a replacement is accepted
248
+
-`ManagedCode`-prefixed public DI/setup API names that should have been cleaned up
DI --> Registry["IMcpGatewayRegistry / McpGatewayRegistry"]
26
26
DI --> ToolSet["McpGatewayToolSet"]
27
-
DI --> Warmup["AddManagedCodeMcpGatewayIndexWarmup()"]
27
+
DI --> Warmup["AddMcpGatewayIndexWarmup()"]
28
28
Gateway --> Runtime["McpGatewayRuntime"]
29
29
Registry --> Snapshot["Catalog snapshots"]
30
30
Runtime --> Snapshot
@@ -78,7 +78,7 @@ Cons:
78
78
Positive:
79
79
80
80
- public DI wiring is explicit: `IMcpGateway` for runtime work, `IMcpGatewayRegistry` for catalog mutation, `McpGatewayToolSet` for meta-tools
81
-
- hosts get lazy behavior by default and optional eager warmup through `InitializeManagedCodeMcpGatewayAsync()` or `AddManagedCodeMcpGatewayIndexWarmup()`
81
+
- hosts get lazy behavior by default and optional eager warmup through `InitializeMcpGatewayAsync()` or `AddMcpGatewayIndexWarmup()`
82
82
- cancellation now propagates into source loading, embedding generation, and embedding-store I/O during index builds
83
83
- runtime rebuilds after registry mutations remain automatic without forcing every host into startup code
84
84
@@ -98,7 +98,7 @@ Mitigations:
98
98
99
99
-`IMcpGateway` MUST remain the public runtime facade for build, list, search, invoke, and meta-tool creation.
100
100
-`IMcpGatewayRegistry` MUST remain the public mutation surface for adding tools and MCP sources after container build.
101
-
-`AddManagedCodeMcpGateway(...)` MUST register `IMcpGateway`, `IMcpGatewayRegistry`, and `McpGatewayToolSet`.
101
+
-`AddMcpGateway(...)` MUST register `IMcpGateway`, `IMcpGatewayRegistry`, and `McpGatewayToolSet`.
102
102
- Index builds MUST be lazy by default and MUST rebuild automatically after registry mutations invalidate the snapshot.
103
103
- Hosted warmup MUST stay optional and MUST use the same runtime/index path as normal gateway operations.
104
104
- Cancellation of `BuildIndexAsync(...)` MUST propagate into underlying source loading and embedding work.
privateconststringToolIdOrToolNameRequiredMessage="Either ToolId or ToolName is required.";
47
47
privateconststringToolIdNotFoundMessageTemplate="Tool '{0}' was not found.";
48
48
privateconststringToolNameAmbiguousMessageTemplate="Tool '{0}' is ambiguous. Use ToolId or specify SourceId explicitly.";
49
-
privateconststringCatalogSourceMissingMessage="ManagedCode.MCPGateway requires IMcpGatewayRegistry to be registered in the service provider. Use AddManagedCodeMcpGateway(...) to wire the package services.";
49
+
privateconststringCatalogSourceMissingMessage="ManagedCode.MCPGateway requires IMcpGatewayRegistry to be registered in the service provider. Use AddMcpGateway(...) to wire the package services.";
50
50
privateconststringFailedToLoadGatewaySourceLogMessage="Failed to load gateway source {SourceId}.";
51
51
privateconststringEmbeddingGenerationFailedLogMessage="Gateway embedding generation failed. Falling back to lexical search.";
52
52
privateconststringGatewayIndexRebuiltLogMessage="Gateway index rebuilt. Tools={ToolCount} VectorizedTools={VectorizedToolCount}.";
0 commit comments