diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a26a785..90e2c85 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,11 +103,14 @@ The host serves one MCP server at `/mcp` (Streamable HTTP, stateless, [ADR 0021] - **Adding tools:** a context's `.Mcp` adapter (its folder of `RimBank.Mcp`, [ADR 0025](docs/adr/0025-one-api-project.md)) exposes one `IMcpServerBuilder` extension, for example `AddPartyReferenceDataDirectoryTools()`, which calls `WithTools<…>()`. The context's module calls only that extension in `AddMcpTools`. Never call `AddMcpServer`, `WithHttpTransport` or `MapMcp` from a context. A tool name registered twice stops the host. - **Names:** one tool per BIAN operation, `_[_]` in snake_case, set explicitly with `[McpServerTool(Name = …)]`. The description is the BIAN operation's description. +- **Authorisation:** every context tool carries `[ToolOperation(OperationId)]` from `RimBank.Mcp`, with the same BIAN operation id as its endpoint's `RequireOperation`, so it needs the same policy and scope ([ADR 0038](docs/adr/0038-per-operation-authorisation-policies.md), [ADR 0039](docs/adr/0039-party-mcp-tools.md)). A caller without the scope does not see the tool in `tools/list`, and a call gets `isError` with the `shared.forbidden` (403) Problem Details. Do not use `[Authorize]` on tools: the SDK would refuse the call with a JSON-RPC error instead. +- **Arguments and results:** arguments are the tool method's camelCase parameters. A command tool takes a required `idempotencyKey` and builds the same core command as its endpoint. A tool's result is its own record in its `.Mcp` folder that mirrors the endpoint's response (same BIAN property names) plus `version`, the entry's stream version that HTTP sends as `ETag`. Answer with `ToolResults.Structured(...)`. `.Mcp` never references `.Api`, so a parity test in `RimBank.Mcp.Tests` proves both channels give the same JSON and the same Problem Details. - **Annotations:** set `ReadOnly`, `Destructive`, `Idempotent` and `OpenWorld` on every tool, following the table in ADR 0021. `Retrieve` tools are read-only queries. Every other tool is a command with an idempotency key. - **Errors:** a tool dispatches through `IMessageBus` and answers with `result.ToToolResult(...)` from `RimBank.Mcp`. A failed `Result` becomes `isError` with the same Problem Details as HTTP. Never throw for a business failure. The host's tool error filter adds `instance` and `traceId`, turns arguments the SDK cannot bind into `shared.tool-arguments-invalid` (400), and turns any exception into `shared.unexpected` (500) with no exception text. - **Caller:** a tool call carries the token's subject to the message bus like an HTTP call. Do not read the token in a tool. - **Connecting a local client:** start the AppHost, then point MCP Inspector (`npx @modelcontextprotocol/inspector`) or Claude Code at the host's `/mcp` URL from the Aspire dashboard. Use client ID `rimbank-mcp-client` (public, PKCE, loopback redirects `http://127.0.0.1:` and `http://localhost:6274`). Sign in as `rimbank-developer` / `rimbank-developer-local-only`. Both are dev-only and published on purpose. -- **Tests** connect the SDK's `McpClient` in-process over `HttpClientTransport`, using the test server's `HttpClient` with a `TestTokens` bearer token (`McpTestHost` in `tests/RimBank.Host.Tests/Mcp`). +- **Calling the Party tools:** once signed in, call `party_reference_data_directory_register` with `{ "partyType": "Person", "idempotencyKey": "demo-1" }`, then `party_reference_data_directory_retrieve` with the returned `PartyReferenceDataDirectoryEntryId` as `partyReferenceDataDirectoryEntryId`. An unknown id answers `isError` with the 404 Problem Details. +- **Tests** connect the SDK's `McpClient` in-process over `HttpClientTransport`, using the test server's `HttpClient` with a `TestTokens` bearer token (`McpTestHost` in `tests/RimBank.Host.Tests/Mcp`). A context's tools are tested in `tests/RimBank.Mcp.Tests///` against the real host and PostgreSQL (`PartyMcpHost`), including a tool-catalog test (each implemented operation has its tool, named after it, with its policy and annotations) and HTTP parity tests. ### Errors diff --git a/docs/adr/0021-mcp-wiring-and-tool-conventions.md b/docs/adr/0021-mcp-wiring-and-tool-conventions.md index 7d8a7c7..4ffb926 100644 --- a/docs/adr/0021-mcp-wiring-and-tool-conventions.md +++ b/docs/adr/0021-mcp-wiring-and-tool-conventions.md @@ -59,7 +59,7 @@ How contexts register tools: | Update the Demographics Behavior Qualifier | `party_reference_data_directory_update_demographics` | | Retrieve a Current Account Payment | `current_account_retrieve_payment` | -The name is set explicitly with `[McpServerTool(Name = …)]`. The description is the BIAN operation's description, and the input schema reuses the `.Api` request model (tech-stack §6). +The name is set explicitly with `[McpServerTool(Name = …)]`. The description is the BIAN operation's description, and the input schema reuses the `.Api` request model (tech-stack §6). *Amended by [ADR 0039](0039-party-mcp-tools.md):* tools take camelCase parameters, and their results mirror the `.Api` response models with a `version`, proven equal by parity tests, because `.Mcp` never references `.Api`. **Annotations.** Every tool sets all four hints explicitly, so it never relies on the SDK or the protocol defaults (the protocol default for `destructiveHint` is `true`): diff --git a/docs/adr/0022-mcp-authorization-and-tool-errors.md b/docs/adr/0022-mcp-authorization-and-tool-errors.md index a4d81d8..397884f 100644 --- a/docs/adr/0022-mcp-authorization-and-tool-errors.md +++ b/docs/adr/0022-mcp-authorization-and-tool-errors.md @@ -72,6 +72,7 @@ The realm also gains the user `rimbank-developer` (password `rimbank-developer-l ## Consequences +- *Amended by [ADR 0039](0039-party-mcp-tools.md):* `RimBank.Mcp` also holds `ToolResults.Structured`, `[ToolOperation]` and the `ToolAuthorizationFilter` added by `AddRimBankToolAuthorization()`. A call refused by its operation's policy is an `isError` result with `shared.forbidden` (403), and the SDK's `AddAuthorizationFilters` is not used. - *Amended by [ADR 0025](0025-one-api-project.md):* a context's MCP tools are a folder of `RimBank.Mcp` (namespace `RimBank...Mcp`), next to these conventions, not a project of their own. - A `.Mcp` adapter (1.16) answers with `await bus.InvokeAsync>(…)` and then `.ToToolResult(…)`. The filter takes care of the trace, `instance`, unbindable arguments and unexpected failures. CONTRIBUTING "MCP" says so. - MCP Inspector or Claude Code can connect to a local AppHost: they follow the 401 to the metadata, sign `rimbank-developer` in through `rimbank-mcp-client`, and call `/mcp` with the token. CONTRIBUTING describes it. diff --git a/docs/adr/0038-per-operation-authorisation-policies.md b/docs/adr/0038-per-operation-authorisation-policies.md index 6f330cb..2c2d040 100644 --- a/docs/adr/0038-per-operation-authorisation-policies.md +++ b/docs/adr/0038-per-operation-authorisation-policies.md @@ -65,7 +65,7 @@ The Party Reference Data Directory has 13 operations: 8 commands (Register, Upda - Test tokens grant every catalog scope by default (`TestTokens.Issue(scopes: …)`), so tests that are not about authorisation keep working. Denial tests pass explicit scopes. - Deployments must grant callers the scopes they need. A token without any RimBank scope can no longer call a BIAN operation. - Follow-ups: - - **1.16 / 1.17:** each MCP tool carries its operation's policy (`[Authorize(Policy = …)]` with `AddAuthorizationFilters`), and a test checks that the tool and the endpoint share it. + - **1.16 / 1.17:** each MCP tool carries its operation's policy, and a test checks that the tool and the endpoint share it. *Done in [ADR 0039](0039-party-mcp-tools.md) with `[ToolOperation(OperationId)]` instead of `[Authorize]`, so that a refused call is the `shared.forbidden` Problem Details.* - **4.14:** the money-moving scope, a third scope next to read and write for the Deposit and Payment operations. - **7.2 / later:** resource-level authorisation (which party a caller may see) is not part of this decision. - **7.x:** scope provisioning in the production identity provider. diff --git a/docs/adr/0039-party-mcp-tools.md b/docs/adr/0039-party-mcp-tools.md new file mode 100644 index 0000000..ebc4857 --- /dev/null +++ b/docs/adr/0039-party-mcp-tools.md @@ -0,0 +1,75 @@ +# 0039. Party MCP tools: arguments, results and authorisation + +- Status: Accepted +- Date: 2026-11-09 +- Roadmap phase: 1.16 + +## Context + +Mission principle 6 says an AI agent reaches every service domain through MCP tools that are thin adapters over the same core as HTTP. Principle 8 says an MCP error is the same Problem Details as on HTTP. Roadmap 1.16 adds the first context tools: Register and Retrieve of the Party Reference Data Directory's Control Record ([PartyReferenceDataDirectory.yaml](../../doc-0/release14.0.0/apis-iso20022_ext-ddd/oas3/yamls/PartyReferenceDataDirectory.yaml), [ADR 0024](0024-party-reference-data-directory-mapping.md)). The earlier decisions left four questions open: + +- **Models.** Tech-stack §6 and [ADR 0021](0021-mcp-wiring-and-tool-conventions.md) said input schemas "reuse the `.Api` request models", but the rule `mcp-dependencies` forbids `.Mcp` → `.Api`. +- **Version.** HTTP sends an entry's stream version as `ETag`. MCP has no headers, and the Update tools of 1.17 need an `expectedVersion` ([ADR 0027](0027-optimistic-concurrency-for-commands.md)). +- **Authorisation.** [ADR 0038](0038-per-operation-authorisation-policies.md) planned `[Authorize(Policy = …)]` with the SDK's `AddAuthorizationFilters()`. Pinned on SDK 2.3.1 in this phase: + - the SDK's filter always runs before any other call-tool filter, whatever the order they are added in; + - it refuses a call with a JSON-RPC error (`-32600`, "Access forbidden"), with no Problem Details; + - without that filter, a tool that carries `[Authorize]` fails with "Authorization filter was not invoked". +- **Where the code lives.** `RimBank.Mcp` held only the shared conventions, which reference no core and no Wolverine. + +## Options considered + +**Models** +1. **Relax `mcp-dependencies`** so that `.Mcp` uses the `.Api` request and response types. There would be one type per body, but the two driving adapters would be coupled and could no longer move separately when a context is extracted (tech-stack §2). +2. **Mirror records in the `.Mcp` folder**, proven equal to the HTTP bodies by parity tests. + +**Denied calls** +1. **Keep `[Authorize]`** and accept the JSON-RPC error. This breaks principle 8. +2. **Catch the SDK's exception** in `ToolErrorFilter`. This is not possible, because the SDK's filter runs first. +3. **A RimBank attribute and RimBank filters.** `[ToolOperation(OperationId)]` names the policy. A RimBank call-tool filter checks it and answers `shared.forbidden`, and a list-tools filter hides the tool. The tool carries no `IAuthorizeData`, so the SDK's authorization filters are not needed. + +## Decision + +**Models (option 2).** Each tool has its own result record in its `.Mcp` folder. It has the BIAN property names of the endpoint's response, plus **`version`**: the entry's stream version, the value HTTP sends as `ETag` and the `expectedVersion` of later commands. There is no `If-None-Match`/304 on MCP. `ToolResults.Structured(value)` (root of `RimBank.Mcp`) puts the JSON, written with the web defaults HTTP uses, in `structuredContent` and in one text block. + +**Arguments.** Tools take camelCase method parameters with a description, not a body record. Only the arguments that change the outcome are taken: +- Register takes `partyType` and `idempotencyKey`. BIAN's ignored `PartyReference` and `DirectoryEntryDate*` fields are not offered to agents. +- Retrieve takes `partyReferenceDataDirectoryEntryId`. +- Both arguments of Register are required in the input schema, so a missing one is `shared.tool-arguments-invalid` (ADR 0022). The values go through the same core validation as HTTP: + - `IdempotencyKey.TryCreate`, so an empty or invalid key is `shared.idempotency-key-invalid`; + - `PartyTypes.FromBianName`; + - `PartyReferenceDataDirectoryEntryId.TryCreate`. + + They then dispatch the same `RegisterParty` and `RetrievePartyReferenceDataDirectoryEntry` through `IMessageBus`. The command is idempotent through the existing policy ([ADR 0018](0018-idempotency-keys-for-commands.md)), and the query reads only the inline view. + +**Authorisation (option 3).** A tool carries `[ToolOperation("")]`, the same id and so the same policy and scope as its endpoint's `RequireOperation` (ADR 0038). `AddRimBankToolAuthorization()`, added by the host after `AddRimBankToolErrors()`, registers `ToolAuthorizationFilter`: +- **`tools/call`:** it finds the tool by name and evaluates the named policy with `IAuthorizationService`. If the policy is not met, the answer is `isError` with the `shared.forbidden` (403) Problem Details, and nothing is dispatched or stored. The tool error filter adds `instance` and `traceId`. +- **`tools/list`:** it removes the tools whose policy the caller does not meet, as the SDK's filter would. +- An unknown policy name throws, so the call is `shared.unexpected` and never runs without its policy. +- A tool without the attribute needs only the authenticated caller of `/mcp`. Only test fakes are like that. Every context tool has one, which the tool catalog test checks. + +**Layout.** `RimBank.Mcp` references `RimBank.Core` and `WolverineFx` for its context folders. Those folders follow the `.Mcp` row of tech-stack §4. The root namespace `RimBank.Mcp` still uses neither, which `shared-mcp-dependencies` keeps checking. The Party tools are `RegisterPartyTool` and `RetrievePartyReferenceDataDirectoryEntryTool` in `src/RimBank.Mcp/Party/PartyReferenceDataDirectory/`, namespace `RimBank.Party.PartyReferenceDataDirectory.Mcp`. They are registered by `AddPartyReferenceDataDirectoryTools()`, which the module's `AddMcpTools` calls. + +**Tool catalog guard (pulled forward from 1.17).** A test checks: +- the tool list equals the implemented operations of the `OperationPolicyCatalog`, minus a named list of the operations whose tools 1.17 adds; +- every tool is named after its `[ToolOperation]` id by the ADR 0021 rule; +- every tool carries the ADR 0021 annotations of its kind (a query is `ReadOnly`; every tool is non-destructive, idempotent and closed-world). + +1.17 empties the list. + +## Consequences + +- Tech-stack §3.3, §4 and §6 and CONTRIBUTING "MCP" are updated. ADR 0021 ("input schemas reuse the `.Api` request models"), ADR 0022 (call-tool filters) and ADR 0038 (`[Authorize]` on tools) get notes that point here. +- A mirror record can drift from its HTTP model. The parity tests catch drift in members and values for every implemented tool, and 1.17 adds them for each new tool. +- If a later SDK lets a filter see its authorization denial, or answers it as a tool error, this decision can be revisited. The attribute would then become `[Authorize]`, and the tests stay. +- RimBank's tool list filter replaces the SDK's for these tools. Resources and prompts are not used. +- Follow-ups: + - **1.17:** Update and BQ tools with `expectedVersion`, and an empty catalog list. + - **4.14:** money-moving tools behind their own scope, off by default. + - **7.9:** rate limiting and the tool-call audit query. +- Proven by: + - `tests/RimBank.Host.Tests/Mcp/McpToolAuthorizationTests`: list filtering, `shared.forbidden` in both directions, and allowed calls; + - `tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/`: + - `RegisterPartyToolTests` and `RetrievePartyReferenceDataDirectoryEntryToolTests`: results, idempotency, errors, authorisation, and nothing stored on refusal; + - `PartyToolCatalogTests`; + - `PartyMcpParityTests`: bodies, `version` against `ETag`, and Problem Details for an invalid party type, a reused key, a malformed or unknown id and a missing scope; + - the unchanged architecture rules `mcp-dependencies`, `shared-mcp-dependencies` and `http-and-mcp-adapters-live-in-shared-projects`. diff --git a/specs/2026-11-09-party-mcp-register-retrieve/plan.md b/specs/2026-11-09-party-mcp-register-retrieve/plan.md new file mode 100644 index 0000000..062b24e --- /dev/null +++ b/specs/2026-11-09-party-mcp-register-retrieve/plan.md @@ -0,0 +1,65 @@ +# Plan: MCP adapter: Register & Retrieve + +## 1. MCP wiring for context tools +- [x] `src/RimBank.Mcp/RimBank.Mcp.csproj`: reference `RimBank.Core` and `WolverineFx` (for `IMessageBus`), and update the header comment (root conventions stay core-free; context folders follow tech-stack §4's `.Mcp` row). +- [x] `RimBank.Host/Mcp/McpComposition.AddRimBankMcp`: add `AddRimBankToolAuthorization()` after `AddRimBankToolErrors()` and before the modules' tools. This replaces the SDK's `AddAuthorizationFilters()`, whose denial cannot be mapped (ADR 0039). +- [x] Pin the SDK 2.3.1 denial behaviour with a fake tool `[Authorize(Policy = …)]` in `RimBank.Host.Tests/Mcp`: a denied call and a filtered `tools/list`. +- [x] `ToolOperationAttribute` and `ToolAuthorizationFilter` (call: `shared.forbidden` 403 with `instance` and `traceId`; list: hide the tool). They are pinned by `McpToolAuthorizationTests` with a fake authorized module. +- [x] `dotnet test tests/RimBank.Architecture.Tests`: `shared-mcp-dependencies`, `mcp-dependencies` and `assembly-names` stay green. + +## 2. ADR 0039 +- [x] `docs/adr/0039-party-mcp-tools.md`, following [requirements.md](requirements.md) "ADRs to write". +- [x] Add amendment notes to ADR 0021 (input schemas are mirrored) and ADR 0022 (the forbidden mapping and authorization filters). + +## 3. Register tool (command) +- [x] `src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Registration/`, namespace `RimBank.Party.PartyReferenceDataDirectory.Mcp`: + - `RegisterPartyArguments` mirrors `RegisterPartyRequest` (BIAN names), with `ToCommand(IdempotencyKey)` reusing `PartyTypes.FromBianName`. + - `RegisterPartyResult` mirrors `RegisterPartyResponse` and adds `version`. + - `RegisterPartyTool` has `[McpServerToolType]`, and its method has: + - `[McpServerTool(Name = "party_reference_data_directory_register", ReadOnly = false, Destructive = false, Idempotent = true, OpenWorld = false)]`; + - `[ToolOperation(OperationId)]`, with `OperationId = "PartyReferenceDataDirectoryEntry/Register"`; + - a BIAN description. + - The tool validates `idempotencyKey` with `IdempotencyKey.TryCreate`, then calls `bus.InvokeAsync>`, then `.ToToolResult(…)` with structured content and a JSON text block. +- [x] `PartyReferenceDataDirectoryTools.AddPartyReferenceDataDirectoryTools(this IMcpServerBuilder)`: `WithTools()`. +- [x] `RimBank.Host/Modules/Party/PartyReferenceDataDirectoryModule.AddMcpTools`: call the extension, and update the class summary. +- [x] `tests/RimBank.Mcp.Tests`: references to `RimBank.Host`, `RimBank.Host.Testing`, Testcontainers.PostgreSql, Alba and `ModelContextProtocol` (client). Add `Party/PartyReferenceDataDirectory/`: + - `PartyMcpHost` (host on its own database, in-process `McpClient` with `TestTokens`, and an Alba handle for parity); + - the `PostgresqlServer` assembly fixture. +- [x] `Registration/RegisterPartyToolTests`: + - the round-trip, and a stored stream; + - the same key replays the same result, with one stream; + - a different payload with the same key is 409 `shared.idempotency-key-reused`; + - a missing or invalid key is 400; + - a missing or invalid `PartyType` is 400 with the `party.*` code; + - the read scope only is `shared.forbidden` and hidden from the list, with no stream stored. + +## 4. Retrieve tool (query) +- [x] `Retrieval/`: + - `RetrievePartyReferenceDataDirectoryEntryResult` mirrors the `.Api` response and adds `version`. + - `RetrievePartyReferenceDataDirectoryEntryTool`: + - `[McpServerTool(Name = "party_reference_data_directory_retrieve", ReadOnly = true, Destructive = false, Idempotent = true, OpenWorld = false)]`; + - `[ToolOperation("PartyReferenceDataDirectoryEntry/Retrieve")]`; + - the argument `partyReferenceDataDirectoryEntryId`; + - an invalid id returns `EntryIdInvalid`; + - it calls `InvokeAsync>`. +- [x] Register it in `AddPartyReferenceDataDirectoryTools`. +- [x] `Retrieval/RetrievePartyReferenceDataDirectoryEntryToolTests`: + - found, with `version` equal to the HTTP `ETag`; + - an unknown id is 404 `isError`; + - a malformed id is 400; + - the write scope only is `shared.forbidden`. + +## 5. Guards, parity and docs +- [x] `PartyToolCatalogTests`: + - `tools/list` (all scopes) equals the snake_case names of the `OperationPolicyCatalog` operations minus the named 1.17 allow-list; + - each tool's descriptor has all four annotations as in the ADR 0021 table, and a non-empty description and input schema; + - each tool's `[ToolOperation]` policy equals an endpoint's `OperationId` and the catalog kind (query is `ReadOnly`). +- [x] `PartyMcpParityTests` (the minimum the Definition of done requires): + - Register and Retrieve through MCP and through HTTP give equal JSON for the BIAN fields (ids and dates normalised), and MCP's `version` equals HTTP's `ETag`; + - for invalid party type, unknown id and reused key, the Problem Details `type`, `status`, `errorCode` and `errors` are equal. +- [x] Docs: + - tech-stack §3.3 (`RimBank.Mcp` and `RimBank.Mcp.Tests` lines) and §6 (mirrored models, `version`, `shared.forbidden`); + - CONTRIBUTING "MCP" (how to add a tool; a call from MCP Inspector); + - tick roadmap 1.16; + - fill in "Proven by" in ADR 0039. +- [x] `dotnet build`, `dotnet test`, `dotnet format --verify-no-changes`. diff --git a/specs/2026-11-09-party-mcp-register-retrieve/requirements.md b/specs/2026-11-09-party-mcp-register-retrieve/requirements.md new file mode 100644 index 0000000..650a6ff --- /dev/null +++ b/specs/2026-11-09-party-mcp-register-retrieve/requirements.md @@ -0,0 +1,92 @@ +# MCP adapter: Register & Retrieve + +Roadmap phase: 1.16 +Branch: plan/1.16-party-mcp-register-retrieve + +## Context +Mission principle 6 says every service domain is usable by AI agents through MCP tools that are thin adapters over the same core as HTTP. Principle 8 says an MCP error is the same Problem Details as on HTTP. The wiring already exists. `/mcp` runs Streamable HTTP in stateless mode with the module hook `AddMcpTools` ([ADR 0021](../../docs/adr/0021-mcp-wiring-and-tool-conventions.md)). `RimBank.Mcp` provides `ToToolResult` and `ToolErrorFilter`, and the protected-resource metadata is in place ([ADR 0022](../../docs/adr/0022-mcp-authorization-and-tool-errors.md)). The per-operation policies and their scopes exist too ([ADR 0038](../../docs/adr/0038-per-operation-authorisation-policies.md)). But no context ships a tool yet, so `tools/list` is "method not available". + +This phase adds the first context tools as the folder `Party/PartyReferenceDataDirectory/` of **`RimBank.Mcp`**, namespace `RimBank.Party.PartyReferenceDataDirectory.Mcp`. There is no per-context `.Mcp` project ([ADR 0025](../../docs/adr/0025-one-api-project.md), [ADR 0026](../../docs/adr/0026-flat-context-namespaces.md)). The phase covers the two BIAN operations of the Control Record in [PartyReferenceDataDirectory.yaml](../../doc-0/release14.0.0/apis-iso20022_ext-ddd/oas3/yamls/PartyReferenceDataDirectory.yaml): `PartyReferenceDataDirectoryEntry/Register` and `PartyReferenceDataDirectoryEntry/Retrieve`. + +Depends on 0.15, 0.16, 1.5, 1.7 and 1.15, all merged. It unblocks 1.17 (Update and the BQ tools reuse the pattern, the test host and the tool-list guard), 4.14 (money-moving tools) and 7.9 (MCP hardening). + +**CQRS split** (tech-stack §8): +- **Command (write side):** `party_reference_data_directory_register` dispatches the existing `RegisterParty` through `IMessageBus.InvokeAsync>`. It answers from the acknowledgement, never from a read model. Idempotency comes from the existing `CommandIdempotencyPolicy` ([ADR 0018](../../docs/adr/0018-idempotency-keys-for-commands.md)), fed by a required `idempotencyKey` argument. +- **Query (read side):** `party_reference_data_directory_retrieve` dispatches the existing `RetrievePartyReferenceDataDirectoryEntry`. It reads only the existing `PartyReferenceDataDirectoryEntryView` through `PartyDirectoryEnquiry`, an **inline** projection. **No read model is added or changed**, so there is no new projection or rebuild work. + +## Scope +### In scope +- **Project references:** `RimBank.Mcp` gains `RimBank.Core` and Wolverine (`IMessageBus` only), as tech-stack §4 already allows for a context's `.Mcp` part. The root namespace `RimBank.Mcp` still references neither, and `shared-mcp-dependencies` keeps checking that. +- **Tool `party_reference_data_directory_register`:** + - Arguments: `partyType` and `idempotencyKey`, both required. BIAN's ignored Register fields are not offered (ADR 0039). + - Answer: `structuredContent` with the BIAN Register response fields and the entry's `version`, and the same JSON as text. + - Annotations: `ReadOnly=false`, `Destructive=false`, `Idempotent=true`, `OpenWorld=false`. + - The description comes from the BIAN operation. +- **Tool `party_reference_data_directory_retrieve`:** + - Argument: `partyReferenceDataDirectoryEntryId` (string, validated like the route value). + - Answer: the BIAN Retrieve response fields and `version`, so that 1.17's Update tool can get its `expectedVersion` ([ADR 0027](../../docs/adr/0027-optimistic-concurrency-for-commands.md)). + - Annotations: `ReadOnly=true`, `Destructive=false`, `Idempotent=true`, `OpenWorld=false`. +- **MCP models as mirrors:** the `.Mcp` folder has its own argument and result records with the BIAN property names, mirroring the `.Api` models. `mcp-dependencies` (.Mcp never references .Api) is unchanged. A parity guard proves that the MCP JSON equals the HTTP JSON. +- **Authorisation:** + - Each tool carries `[ToolOperation("")]`, the same named policy as its endpoint (ADR 0038). It is not `[Authorize]`, because the SDK's filter would refuse with a JSON-RPC error (see Open questions). + - `ToolAuthorizationFilter` (added by `AddRimBankToolAuthorization()`) hides a tool the caller may not use from `tools/list`. + - **A denied call becomes an `isError` result with `shared.forbidden` (403) Problem Details**, from the same filter. Nothing is dispatched, so nothing is stored. +- **Errors:** every failure uses `ToToolResult`: + - an invalid `PartyType` is `party.party-type-required` or `party.party-type-invalid` (400); + - a reused key is 409, and a key in use is 409; + - an invalid id is 400, and an unknown entry is 404; + - an unbindable or missing argument is `shared.tool-arguments-invalid`. +- **Wiring:** + - One extension, `AddPartyReferenceDataDirectoryTools()`, in the `.Mcp` folder. + - `PartyReferenceDataDirectoryModule.AddMcpTools` calls it. + - With the tools registered, `tools/list` is served. +- **Tool-list guard, pulled forward from 1.17:** + - A test checks that the registered tools are exactly the snake_case names of the catalog's implemented BIAN operations (`OperationPolicyCatalog`). A named allow-list holds the 11 operations that get their tools in 1.17. + - A test checks that each tool's policy equals its endpoint's name and operation id. + - 1.17 empties the allow-list. +- **Docs:** + - ADR 0039. + - tech-stack §3.3 (the `RimBank.Mcp` and `RimBank.Mcp.Tests` lines) and §6 ("input schemas reuse the `.Api` request models" becomes "mirror them, proven equal by a parity test"). + - CONTRIBUTING "MCP": adding a tool, and calling it from MCP Inspector or Claude Code. + - The comments of `PartyReferenceDataDirectoryModule` and `RimBank.Mcp.csproj`. + - The roadmap tick. + +### Out of scope +- The Update, Demographics, Reference, Associations and BankRelations tools, and an empty allow-list (**1.17**). +- Money-moving scope, default-off switch and `destructive` tools (**4.14**). +- Per-client rate limiting and the tool-call audit query (**7.9**). The caller already reaches the envelope through `ActorRelay` (ADR 0022). +- An HTTP-style `If-None-Match` / 304 on Retrieve. MCP has no conditional requests: the result always carries `version`. +- Sharing one model type between `.Api` and `.Mcp`, for example by relaxing `mcp-dependencies`. That option was rejected (see Decisions). +- New architecture rules for tool names and annotations. The tool-list and annotation tests cover them for now, and ADR 0021 leaves the rules to "if reviews show they are needed". + +## Decisions +| Decision | Choice | Rationale | +|---|---|---| +| Tool set | Register and Retrieve only | The roadmap row. One reviewable PR, and 1.17 repeats the pattern. | +| Argument and result models | `.Mcp` mirrors the `.Api` models with BIAN property names, and a parity test proves equal JSON | User's choice. It keeps `mcp-dependencies` and lets each adapter move alone when a context is extracted (tech-stack §2). The parity test is what stops drift. Amends tech-stack §6's "reuse". | +| Version on results | A `version` field next to the BIAN fields in `structuredContent` | MCP has no `ETag` header. Update in 1.17 needs `expectedVersion` (ADR 0027). The BIAN conformance subset check (ADR 0037) applies to HTTP bodies only, and ADR 0039 records the extra field. | +| Idempotency key | Required tool argument `idempotencyKey`, passed into `RegisterParty` like the header value | ADR 0018 and 0021: every command tool takes a key. The same `IdempotencyKey.TryCreate` errors as HTTP. | +| Authorisation | `[ToolOperation(OperationId)]`, checked by RimBank's call and list filters | ADR 0038 follow-up. Same policies and scopes as HTTP (principle 6). `[Authorize]` was dropped during implementation (see Open questions). | +| Denied tool call | An `isError` result with `shared.forbidden` Problem Details | User's choice. Principle 8: MCP errors are the same Problem Details as on HTTP. The tool stays hidden from `tools/list`. | +| Tool arguments | camelCase method parameters, only those that change the outcome | Found in implementation: parameters give a flat, described input schema. A body record would make agents nest their arguments. | +| Operation ids in `.Mcp` | Literal constants in each tool type, cross-checked against the `.Api` endpoints by a test | `.Mcp` cannot reference `.Api`, and the core holds no transport names. The test makes a typo fail CI. | +| Tool-list guard | Pulled forward from 1.17, with an allow-list of the operations not yet covered | User's choice. The guard exists before the tools multiply, and 1.17 only shrinks the list. | +| Test home | `RimBank.Mcp.Tests` gains a Party folder with a Testcontainers host (namespace `RimBank.Party.PartyReferenceDataDirectory.Mcp.Tests`) | Tech-stack §3.3 and §9: "per context from 1.16: MCP client → tools … parity". | +| Order of work | Wiring → ADR → Register → Retrieve → module and docs | User's choice. The build is green after each group. | + +## ADRs to write +- **0039 Party MCP tools: arguments, results and authorisation** (written). It covers: + - mirrored models with a parity guard (amends tech-stack §6); + - the `version` field on results, and no 304 on MCP; + - the `idempotencyKey` argument; + - `[ToolOperation]` and the RimBank authorisation filters, with `shared.forbidden` (amends ADR 0022 and ADR 0038); + - `RimBank.Mcp`'s new references for its context folders, while its root stays core-free; + - the tool-list guard and its 1.17 allow-list. + +## Open questions +Answered during implementation (ADR 0039): +- **SDK 2.3.1 authorization denial:** + - The SDK's `AddAuthorizationFilters` filter always runs before RimBank's filters, and refuses with a JSON-RPC `-32600` that no filter can map. + - Without that filter, a tool with `[Authorize]` fails. + - So tools carry `[ToolOperation]`, and RimBank's own filters apply the policy to calls and to the list. +- **Input schema:** tools take flat camelCase parameters with `[Description]`. An empty idempotency key is `shared.idempotency-key-invalid`, as on HTTP. A missing argument is `shared.tool-arguments-invalid`. diff --git a/specs/2026-11-09-party-mcp-register-retrieve/validation.md b/specs/2026-11-09-party-mcp-register-retrieve/validation.md new file mode 100644 index 0000000..10f8af0 --- /dev/null +++ b/specs/2026-11-09-party-mcp-register-retrieve/validation.md @@ -0,0 +1,44 @@ +# Validation: MCP adapter: Register & Retrieve + +## Done when (from roadmap) +> **1.16 MCP adapter: Register & Retrieve:** `RimBank.Party.PartyReferenceDataDirectory.Mcp` tools for Register (command) and Retrieve (query, `readOnly`), with a parity test against the HTTP endpoints. +> + Definition of done (roadmap.md) + +`RimBank.Party.PartyReferenceDataDirectory.Mcp` is the namespace of the Party folder in `RimBank.Mcp`, not a project (ADR 0025). + +## Automated checks +The chosen focus is MCP client tests. The parity, authorisation and tool-list checks below are kept at minimum size because the roadmap row, the Definition of done ("an MCP tool, with a parity test") and the scope decisions (mirrored models, `shared.forbidden`, guard pulled forward) need them. + +- [ ] **MCP client tests**: `tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/`, with Testcontainers PostgreSQL and the in-process SDK client: + - [ ] `tools/list` shows `party_reference_data_directory_register` and `party_reference_data_directory_retrieve`, each with a description, an input schema and the four annotations of the ADR 0021 table. Retrieve is `readOnly=true`, Register is `readOnly=false`, and both are `destructive=false`, `idempotent=true` and `openWorld=false`. + - [ ] Register, then Retrieve, is a round-trip. Retrieve's `version` equals Register's. + - [ ] Idempotency: the same key gives the same result and one stream. Another payload with that key is an `isError` 409 `shared.idempotency-key-reused`. An empty or invalid key is 400 `shared.idempotency-key-invalid`, and a missing one is `shared.tool-arguments-invalid`. + - [ ] An invalid or blank `partyType` is `isError` 400 `party.party-type-invalid` or `party.party-type-required`. + - [ ] An unknown entry is `isError` 404. A malformed id is `isError` 400. Unbindable arguments are `shared.tool-arguments-invalid`. + - [ ] Every `isError` result has Problem Details in `structuredContent`, the same JSON as text, `instance: /mcp`, a `traceId`, and no stack trace. +- [ ] **Authorisation**: + - [ ] With the read scope only, register is hidden from `tools/list`, a call is `isError` 403 `shared.forbidden`, and no stream or outcome is stored. + - [ ] With the write scope only, the same holds for retrieve. +- [ ] **Parity**: `PartyMcpParityTests`. MCP and HTTP give equal BIAN fields, MCP's `version` equals HTTP's `ETag`, and the shared error cases have equal Problem Details (`type`, `status`, `errorCode`, `errors`). +- [ ] **Tool-list guard**: `PartyToolCatalogTests`. The tools equal the implemented catalog operations minus the named 1.17 allow-list, and each tool's policy is its endpoint's `OperationId`. +- [ ] **Host**: `RimBank.Host.Tests/Mcp`. A fake `[ToolOperation]` tool is hidden without its scope and refused with `shared.forbidden`. The existing `McpToolErrorTests`, `McpAuthorizationTests` and `McpCallerTests` stay green. +- [ ] **Architecture**: `RimBank.Architecture.Tests` green, in particular `mcp-dependencies`, `shared-mcp-dependencies`, `shared-mcp-only-in-mcp-and-host`, `assembly-names`, `context-namespaces-stop-at-the-adapter`, `adapters-dispatch-through-the-message-bus` and `cross-context-isolation`. +- [ ] **Unchanged suites green**: `RimBank.Api.Tests` (incl. `AuthorisationTests`, `OperationAuthorizationCoverageTests` and conformance), `RimBank.Core.Tests` and `RimBank.Postgresql.Tests`. +- [ ] `dotnet format --verify-no-changes`. +- [ ] GitHub Actions CI green (build, test, format, CodeQL). + +## Manual / demo checks +Optional; not chosen as a merge gate. +- [ ] `aspire run`, then MCP Inspector (`npx @modelcontextprotocol/inspector`) on `http://localhost:/mcp`. Sign in as `rimbank-developer`. + - [ ] Call `party_reference_data_directory_register` with `{ "partyType": "Person", "idempotencyKey": "demo-1" }`. It returns the entry id and `version` 1. + - [ ] Call `party_reference_data_directory_retrieve` with that id. It returns the same entry. + - [ ] Call `party_reference_data_directory_retrieve` with a random v7 GUID. It returns `isError` with 404 Problem Details. + +## Merge criteria +- [ ] All checks above pass in CI. +- [ ] Roadmap checkbox 1.16 ticked in the same PR. +- [ ] ADR 0039 written. ADR 0021 and 0022 amendment notes added. +- [ ] tech-stack §3.3 and §6, and CONTRIBUTING "MCP", updated. +- [ ] No tool arguments, PII or tokens in logs (`ModelContextProtocol` log category stays at `Warning`, ADR 0021). +- [ ] No per-context `.Mcp` project, and no `.Mcp` → `.Api` reference. +- [ ] The PR is opened with the `open-phase-pr` skill (labels, milestone, board, `Closes #`). diff --git a/specs/roadmap.md b/specs/roadmap.md index 070e55f..a75c9ed 100644 --- a/specs/roadmap.md +++ b/specs/roadmap.md @@ -62,7 +62,7 @@ - [x] **1.13 Published language:** `PartyReferenceDataDirectoryEntryCreated/Updated` integration events, mapped from domain events (not from read models), carrying the state consumers need, versioned, published through the outbox, and pinned by a schema contract test. - [x] **1.14 Conformance:** OpenAPI and AsyncAPI conformance tests green for the implemented subset. - [x] **1.15 Authorisation policies:** per-operation policies (separate scopes for command and query operations), with tests. -- [ ] **1.16 MCP adapter: Register & Retrieve:** `RimBank.Party.PartyReferenceDataDirectory.Mcp` tools for Register (command) and Retrieve (query, `readOnly`), with a parity test against the HTTP endpoints. +- [x] **1.16 MCP adapter: Register & Retrieve:** `RimBank.Party.PartyReferenceDataDirectory.Mcp` tools for Register (command) and Retrieve (query, `readOnly`), with a parity test against the HTTP endpoints. - [ ] **1.17 MCP adapter: remaining operations:** Update and BQ tools; a test that the tool list matches the implemented BIAN operations. ## Stage 2: Product Directory diff --git a/specs/tech-stack.md b/specs/tech-stack.md index 4683312..c585708 100644 --- a/specs/tech-stack.md +++ b/specs/tech-stack.md @@ -87,7 +87,7 @@ Before a service domain is created, its mapping must be checked against the BIAN │ ├─ RimBank.Api/ # the HTTP API of every context, one folder per context (ADR 0025) │ │ ├─ (root) # namespace RimBank.Api: the Idempotency-Key header (ADR 0018), stream-version entity tags (ETag, If-None-Match, If-Match: ADR 0027) │ │ └─ Party/PartyReferenceDataDirectory/ # namespace RimBank.Party.PartyReferenceDataDirectory.Api for every folder: Registration/, Retrieval/, Update/, Demographics/, Reference/, Associations/, BankRelations/ -│ ├─ RimBank.Mcp/ # MCP conventions at its root: Error → isError Problem Details, the tool error filter (ADR 0022); each context's tools as a folder from 1.16 (ADR 0025) +│ ├─ RimBank.Mcp/ # MCP conventions at its root: Error → isError Problem Details, the tool error and authorisation filters (ADR 0022, ADR 0039); each context's tools as a folder // (ADR 0025) │ ├─ RimBank.Postgresql/ # Marten conventions every .Postgresql uses: per-context store, role, views, rebuild (ADR 0016); Wolverine wiring with write and read ports (ADR 0017); command idempotency (ADR 0018); one retry on a lost concurrency race (ADR 0027); published-language message identities (ADR 0036) │ ├─ RimBank.Core/ # the core of every context: domain + application logic, one folder per context (ADR 0023) │ │ ├─ Party/PartyReferenceDataDirectory/ # namespace RimBank.Party.PartyReferenceDataDirectory for every folder (§3.4, ADR 0026) @@ -104,7 +104,7 @@ Before a service domain is created, its mapping must be checked against the BIAN ├─ RimBank.Problems.Tests/ # the Error → Problem Details mapping (ADR 0015) ├─ RimBank.Api.Tests/ # same folders as RimBank.Api (ADR 0025): the HTTP conventions at the root; per context, HTTP through the real host (Alba, Testcontainers), Problem Details and BIAN conformance │ └─ Party/PartyReferenceDataDirectory/ - ├─ RimBank.Mcp.Tests/ # the Error → tool result mapping (ADR 0022); per context from 1.16: MCP client → tools, Problem Details errors, parity with the HTTP API + ├─ RimBank.Mcp.Tests/ # the Error → tool result mapping (ADR 0022); per context folder: MCP client → tools against the real host and PostgreSQL, Problem Details errors, authorisation, the tool catalog, parity with the HTTP API (ADR 0039) ├─ RimBank.Postgresql.Tests/ # store, messaging and idempotency conventions with two test-only fake contexts, Testcontainers (ADR 0016–0018) ├─ RimBank.Host.Testing/ # shared helpers for in-memory host tests: test-signed access tokens (ADR 0019), used by Host.Tests, Api.Tests and Mcp.Tests ├─ RimBank.SharedKernel.Testing/ # shared test helpers: typed ID contract (ADR 0008), FsCheck money generators (ADR 0009), decider/projection helpers (0.6) @@ -228,7 +228,7 @@ Value objects that belong to one context (for example party identifiers, names, | `.Postgresql` | Its own core, SharedKernel, `RimBank.Postgresql`, Marten, Wolverine.Marten | `.Api`, `.Mcp`, other contexts | | `RimBank.Problems` | SharedKernel, ASP.NET Core | Cores, adapters, other composition projects ([ADR 0015](../docs/adr/0015-problem-details-mapping.md)) | | `RimBank.Api` (root namespace: the HTTP conventions) | SharedKernel, `RimBank.Problems`, ASP.NET Core; used only by `.Api` folders and `RimBank.Host` | Cores, other adapters, Marten, Wolverine ([ADR 0018](../docs/adr/0018-idempotency-keys-for-commands.md), [ADR 0025](../docs/adr/0025-one-api-project.md)) | -| `RimBank.Mcp` | SharedKernel, `RimBank.Problems`, ASP.NET Core, MCP C# SDK; used only by `.Mcp` adapters and `RimBank.Host` | Cores, other adapters, Marten, Wolverine ([ADR 0022](../docs/adr/0022-mcp-authorization-and-tool-errors.md)) | +| `RimBank.Mcp` (its root namespace; the context folders follow the `.Mcp` row) | SharedKernel, `RimBank.Problems`, ASP.NET Core, MCP C# SDK; used only by `.Mcp` adapters and `RimBank.Host` | Cores, other adapters, Marten, Wolverine ([ADR 0022](../docs/adr/0022-mcp-authorization-and-tool-errors.md), [ADR 0039](../docs/adr/0039-party-mcp-tools.md)) | | `RimBank.Postgresql` | SharedKernel, Marten (with JasperFx, Weasel, Npgsql), Wolverine (`Wolverine.Marten`, `Wolverine.Postgresql`), Microsoft.Extensions abstractions; used only by `.Postgresql` adapters and by `RimBank.Host` for its own message store. It also adds the idempotency policy to every command handler ([ADR 0018](../docs/adr/0018-idempotency-keys-for-commands.md)) | Cores, other adapters, other composition projects, ASP.NET Core ([ADR 0016](../docs/adr/0016-per-context-marten-stores.md), [ADR 0017](../docs/adr/0017-wolverine-wiring.md)) | | `RimBank.Host` | All adapters and `RimBank.Core` (composition only) | Business logic | @@ -271,9 +271,9 @@ The architecture tests tell these roles apart by SharedKernel markers ([ADR 0012 - **MCP is a driving adapter alongside `.Api`.** A context's `.Mcp` adapter (its folder of `RimBank.Mcp`, [ADR 0025](../docs/adr/0025-one-api-project.md)) sends the same core commands and queries through `IMessageBus`. It never calls the HTTP API and never contains business logic, so the HTTP and MCP channels cannot drift apart. - **Hosting:** all contexts' MCP tools are registered in `RimBank.Host` and exposed at a single `/mcp` endpoint over Streamable HTTP in stateless mode. Each context hands its tools to the host through its module's `AddMcpTools(IMcpServerBuilder)`, which calls the one extension its `.Mcp` adapter exposes; contexts never configure the transport or map the route, and a tool name registered twice stops the host ([ADR 0021](../docs/adr/0021-mcp-wiring-and-tool-conventions.md)). When a context is extracted, its `.Mcp` adapter moves with it. -- **Naming:** each tool maps 1:1 to a BIAN operation, named `_[_]` in snake_case (for example `party_reference_data_directory_register` and `current_account_retrieve_payment`). Descriptions come from the BIAN operation description, and input schemas reuse the `.Api` request models. +- **Naming:** each tool maps 1:1 to a BIAN operation, named `_[_]` in snake_case (for example `party_reference_data_directory_register` and `current_account_retrieve_payment`). Descriptions come from the BIAN operation description. Arguments are the tool's camelCase parameters (a command tool adds a required `idempotencyKey`), and a result mirrors the `.Api` response model with BIAN's property names plus `version`, the stream version HTTP sends as `ETag`. `.Mcp` never references `.Api`: parity tests prove both channels give the same JSON and Problem Details ([ADR 0039](../docs/adr/0039-party-mcp-tools.md)). - **Tool annotations:** every tool sets `readOnly`, `destructive`, `idempotent` and `openWorld` explicitly (table in ADR 0021). Retrieve tools dispatch queries and are marked `readOnly`; every other tool dispatches a command. Operations that move money or close facilities are marked `destructive` and are not `idempotent` unless an idempotency key is supplied. -- **Security:** the MCP endpoint follows the MCP authorization spec (OAuth 2.1, with Keycloak as the authorization server): a 401 on `/mcp` points to the RFC 9728 protected-resource metadata, which names the realm, and tokens carry the same `rimbank-api` audience as HTTP ([ADR 0022](../docs/adr/0022-mcp-authorization-and-tool-errors.md)). Tool calls go through the same per-BIAN-operation authorisation policies as HTTP: a tool carries the policy named by its operation id, and the metadata lists every policy scope in `scopes_supported` ([ADR 0038](../docs/adr/0038-per-operation-authorisation-policies.md)). Money-moving tools need a dedicated scope and are disabled by default, so each deployment must turn them on explicitly. +- **Security:** the MCP endpoint follows the MCP authorization spec (OAuth 2.1, with Keycloak as the authorization server): a 401 on `/mcp` points to the RFC 9728 protected-resource metadata, which names the realm, and tokens carry the same `rimbank-api` audience as HTTP ([ADR 0022](../docs/adr/0022-mcp-authorization-and-tool-errors.md)). Tool calls go through the same per-BIAN-operation authorisation policies as HTTP: a tool carries the policy named by its operation id (`[ToolOperation(OperationId)]`), a caller without its scope does not see it in `tools/list` and gets the `shared.forbidden` Problem Details on a call, and the metadata lists every policy scope in `scopes_supported` ([ADR 0038](../docs/adr/0038-per-operation-authorisation-policies.md), [ADR 0039](../docs/adr/0039-party-mcp-tools.md)). Money-moving tools need a dedicated scope and are disabled by default, so each deployment must turn them on explicitly. - **Errors:** a business or validation failure returns a tool result with `isError: true` whose content (and `structuredContent`) is the Problem Details JSON (same `type`, `errorCode` and `traceId` as HTTP, ADR 0021). Adapters return failures with `ToToolResult` from `RimBank.Mcp`, whose call-tool filter turns unbindable arguments into `shared.tool-arguments-invalid` and any exception into `shared.unexpected` ([ADR 0022](../docs/adr/0022-mcp-authorization-and-tool-errors.md)). Stack traces and internal details are never exposed. - **Audit:** every tool call records the MCP client identity and a correlation ID in event metadata, as HTTP calls do. diff --git a/src/RimBank.Host/Mcp/McpComposition.cs b/src/RimBank.Host/Mcp/McpComposition.cs index 11c3789..3ef4b0c 100644 --- a/src/RimBank.Host/Mcp/McpComposition.cs +++ b/src/RimBank.Host/Mcp/McpComposition.cs @@ -41,6 +41,7 @@ public static TBuilder AddRimBankMcp(this TBuilder builder, IReadOnlyL .AddMcpServer(options => options.ServerInfo = new Implementation { Name = ServerName, Version = ServerVersion }) .WithHttpTransport(options => options.SessionMode = HttpServerSessionMode.Stateless) .AddRimBankToolErrors() + .AddRimBankToolAuthorization() .AddServiceDomainMcpTools(modules); return builder; diff --git a/src/RimBank.Host/Modules/Party/PartyReferenceDataDirectoryModule.cs b/src/RimBank.Host/Modules/Party/PartyReferenceDataDirectoryModule.cs index 2187acd..f62c1ea 100644 --- a/src/RimBank.Host/Modules/Party/PartyReferenceDataDirectoryModule.cs +++ b/src/RimBank.Host/Modules/Party/PartyReferenceDataDirectoryModule.cs @@ -1,4 +1,5 @@ using RimBank.Party.PartyReferenceDataDirectory.Api; +using RimBank.Party.PartyReferenceDataDirectory.Mcp; using RimBank.Party.PartyReferenceDataDirectory.Postgresql; namespace RimBank.Host; @@ -6,7 +7,7 @@ namespace RimBank.Host; /// /// The Party Reference Data Directory (BIAN service domain, business domain Party): its store, inline view, and write /// and read ports, so its command and query handlers run on the host's bus, and its HTTP endpoints (ADR 0014, -/// ADR 0024), each protected by its operation's policy (ADR 0038). Its MCP tools arrive in roadmap 1.16. +/// ADR 0024) and MCP tools (ADR 0021, ADR 0039), each protected by its operation's policy (ADR 0038). /// public sealed class PartyReferenceDataDirectoryModule : IServiceDomainModule { @@ -23,9 +24,7 @@ public sealed class PartyReferenceDataDirectoryModule : IServiceDomainModule public void AddServices(IHostApplicationBuilder builder) => builder.AddPartyReferenceDataDirectoryPostgresql(); /// - public void AddMcpTools(IMcpServerBuilder tools) - { - } + public void AddMcpTools(IMcpServerBuilder tools) => tools.AddPartyReferenceDataDirectoryTools(); /// public void AddOperationPolicies(OperationPolicies policies) diff --git a/src/RimBank.Host/packages.lock.json b/src/RimBank.Host/packages.lock.json index 2945b72..9344bca 100644 --- a/src/RimBank.Host/packages.lock.json +++ b/src/RimBank.Host/packages.lock.json @@ -596,8 +596,10 @@ "type": "Project", "dependencies": { "ModelContextProtocol.AspNetCore": "[2.3.1, )", + "RimBank.Core": "[0.1.0-alpha, )", "RimBank.Problems": "[0.1.0-alpha, )", - "RimBank.SharedKernel": "[0.1.0-alpha, )" + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "WolverineFx": "[6.62.0, )" } }, "rimbank.party.partyreferencedatadirectory.postgresql": { diff --git a/src/RimBank.Mcp/Errors/ToolAuthorizationFilter.cs b/src/RimBank.Mcp/Errors/ToolAuthorizationFilter.cs new file mode 100644 index 0000000..bdbd545 --- /dev/null +++ b/src/RimBank.Mcp/Errors/ToolAuthorizationFilter.cs @@ -0,0 +1,86 @@ +using System.Security.Claims; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using ModelContextProtocol.Protocol; +using ModelContextProtocol.Server; +using RimBank.Problems; + +namespace RimBank.Mcp; + +/// +/// Applies each tool's (ADR 0038, ADR 0039): a caller who does not meet the +/// operation's policy does not see the tool in tools/list, and a call is refused with the +/// shared.forbidden (403) Problem Details HTTP returns for the same refusal, before the tool runs. +/// +/// +/// A tool without the attribute only needs the authenticated caller that /mcp requires (ADR 0019). Every +/// context tool declares its operation, which the tool catalog tests check. An unknown policy name makes ASP.NET Core +/// throw, so the call fails as shared.unexpected and never runs without its policy. +/// +public static class ToolAuthorizationFilter +{ + /// Wraps the next call-tool handler. + /// The next handler (the tool). + /// The wrapping handler. + public static McpRequestHandler WrapCall( + McpRequestHandler next) + { + ArgumentNullException.ThrowIfNull(next); + + return async (context, cancellationToken) => + { + var operationId = OperationOf(context.Server, context.Params?.Name); + if (operationId is null || context.Services is not { } services + || await IsAllowedAsync(services, context.User, operationId)) + { + return await next(context, cancellationToken); + } + + var httpContext = services.GetService()?.HttpContext; + return httpContext is null + ? ToolProblem.Create(SharedProblems.Forbidden) + : ToolProblem.Create(SharedProblems.Forbidden, httpContext); + }; + } + + /// Wraps the next list-tools handler. + /// The next handler (the SDK's tool list). + /// The wrapping handler, which removes the tools the caller may not use. + public static McpRequestHandler WrapList( + McpRequestHandler next) + { + ArgumentNullException.ThrowIfNull(next); + + return async (context, cancellationToken) => + { + var result = await next(context, cancellationToken); + if (context.Services is not { } services) + { + return result; + } + + var allowed = new List(result.Tools.Count); + foreach (var tool in result.Tools) + { + var operationId = OperationOf(context.Server, tool.Name); + if (operationId is null || await IsAllowedAsync(services, context.User, operationId)) + { + allowed.Add(tool); + } + } + + result.Tools = allowed; + return result; + }; + } + + private static string? OperationOf(McpServer server, string? toolName) => + toolName is not null && server.ServerOptions.ToolCollection?.TryGetPrimitive(toolName, out var tool) == true + ? tool.Metadata.OfType().SingleOrDefault()?.OperationId + : null; + + private static async Task IsAllowedAsync(IServiceProvider services, ClaimsPrincipal? user, string operationId) => + (await services.GetRequiredService().AuthorizeAsync(user ?? new ClaimsPrincipal(), operationId)) + .Succeeded; +} diff --git a/src/RimBank.Mcp/Errors/ToolOperationAttribute.cs b/src/RimBank.Mcp/Errors/ToolOperationAttribute.cs new file mode 100644 index 0000000..ecb7e2a --- /dev/null +++ b/src/RimBank.Mcp/Errors/ToolOperationAttribute.cs @@ -0,0 +1,19 @@ +namespace RimBank.Mcp; + +/// +/// The BIAN operation a tool performs, and so the authorisation policy a caller must meet to see and call it: the policy +/// named by , the same one the operation's HTTP endpoint requires (ADR 0038, ADR 0039). +/// +/// +/// It replaces [Authorize(Policy = …)] on tools. With the SDK 2.3.1, [Authorize] needs the SDK's +/// authorization filters, which always run first and refuse a call with a JSON-RPC error, so the caller could not get the +/// shared.forbidden Problem Details HTTP returns (mission principle 8). +/// applies this attribute instead. +/// +/// The BIAN operation id, for example PartyReferenceDataDirectoryEntry/Register. +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] +public sealed class ToolOperationAttribute(string operationId) : Attribute +{ + /// The BIAN operation id, which is also the name of its authorisation policy. + public string OperationId { get; } = operationId; +} diff --git a/src/RimBank.Mcp/McpServerBuilderExtensions.cs b/src/RimBank.Mcp/McpServerBuilderExtensions.cs index 814219c..5b52ba8 100644 --- a/src/RimBank.Mcp/McpServerBuilderExtensions.cs +++ b/src/RimBank.Mcp/McpServerBuilderExtensions.cs @@ -19,4 +19,23 @@ public static IMcpServerBuilder AddRimBankToolErrors(this IMcpServerBuilder mcp) mcp.Services.AddHttpContextAccessor(); return mcp.WithRequestFilters(filters => filters.AddCallToolFilter(ToolErrorFilter.Wrap)); } + + /// + /// Makes every tool's apply (ADR 0038, ADR 0039): a caller who does not meet the + /// operation's policy does not see the tool in tools/list, and a call gets the shared.forbidden Problem + /// Details as an error result (). + /// + /// The MCP server builder, after . + /// The same builder. + public static IMcpServerBuilder AddRimBankToolAuthorization(this IMcpServerBuilder mcp) + { + ArgumentNullException.ThrowIfNull(mcp); + + mcp.Services.AddHttpContextAccessor(); + return mcp.WithRequestFilters(filters => + { + filters.AddCallToolFilter(ToolAuthorizationFilter.WrapCall); + filters.AddListToolsFilter(ToolAuthorizationFilter.WrapList); + }); + } } diff --git a/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/PartyReferenceDataDirectoryTools.cs b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/PartyReferenceDataDirectoryTools.cs new file mode 100644 index 0000000..f8ac9e8 --- /dev/null +++ b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/PartyReferenceDataDirectoryTools.cs @@ -0,0 +1,19 @@ +using Microsoft.Extensions.DependencyInjection; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp; + +/// The Party Reference Data Directory's MCP tools, registered by its host module (ADR 0021, ADR 0039). +public static class PartyReferenceDataDirectoryTools +{ + /// Adds a tool for each implemented BIAN operation that has one (roadmap 1.16; the others in 1.17). + /// The host's MCP server builder. + /// The same builder. + public static IMcpServerBuilder AddPartyReferenceDataDirectoryTools(this IMcpServerBuilder tools) + { + ArgumentNullException.ThrowIfNull(tools); + + return tools + .WithTools() + .WithTools(); + } +} diff --git a/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Registration/RegisterPartyResult.cs b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Registration/RegisterPartyResult.cs new file mode 100644 index 0000000..2e49bc7 --- /dev/null +++ b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Registration/RegisterPartyResult.cs @@ -0,0 +1,48 @@ +using System.Text.Json.Serialization; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp; + +/// +/// The result of party_reference_data_directory_register: the fields of the HTTP Register response with BIAN's +/// names, which it mirrors (a parity test proves the JSON is equal, ADR 0039), and the entry's , +/// which HTTP sends as the ETag header. +/// +/// The new entry: the id of later operations. +/// BIAN PartyType: Person or Organisation. +/// BIAN DirectoryEntryDateType: always OpenDate on Register. +/// BIAN DirectoryEntryDate: when the directory registered the party. +/// The entry's Demographics. +/// The entry's Reference. +/// The entry's BankRelations. +/// The entry's version: the expectedVersion of a later command (ADR 0027). +public sealed record RegisterPartyResult( + [property: JsonPropertyName("PartyReferenceDataDirectoryEntryId")] Guid PartyReferenceDataDirectoryEntryId, + [property: JsonPropertyName("PartyType")] string PartyType, + [property: JsonPropertyName("DirectoryEntryDateType")] string DirectoryEntryDateType, + [property: JsonPropertyName("DirectoryEntryDate")] DateTimeOffset DirectoryEntryDate, + [property: JsonPropertyName("DemographicsId")] Guid DemographicsId, + [property: JsonPropertyName("ReferenceId")] Guid ReferenceId, + [property: JsonPropertyName("BankRelationsId")] Guid BankRelationsId, + [property: JsonPropertyName("version")] long Version) +{ + /// The DirectoryEntryDateType of the date Register records. + public const string OpenDate = "OpenDate"; + + /// The result for . + /// The outcome of . + /// The tool's result. + public static RegisterPartyResult From(RegisterPartyAcknowledged acknowledged) + { + ArgumentNullException.ThrowIfNull(acknowledged); + + return new RegisterPartyResult( + acknowledged.EntryId.Value, + acknowledged.PartyType.ToString(), + OpenDate, + acknowledged.OpenDate, + acknowledged.DemographicsId.Value, + acknowledged.PartyReferenceId.Value, + acknowledged.BankRelationsId.Value, + acknowledged.Version); + } +} diff --git a/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Registration/RegisterPartyTool.cs b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Registration/RegisterPartyTool.cs new file mode 100644 index 0000000..3619d3e --- /dev/null +++ b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Registration/RegisterPartyTool.cs @@ -0,0 +1,57 @@ +using System.ComponentModel; +using ModelContextProtocol.Protocol; +using ModelContextProtocol.Server; +using RimBank.Mcp; +using RimBank.SharedKernel; +using Wolverine; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp; + +/// +/// party_reference_data_directory_register: BIAN PartyReferenceDataDirectoryEntry/Register, a command +/// (ADR 0024). It dispatches , as POST /PartyReferenceDataDirectory/Register does, and +/// answers from its acknowledgement, never from a read model (tech-stack §5, §6, ADR 0039). +/// +[McpServerToolType] +public sealed class RegisterPartyTool +{ + /// The tool's name (ADR 0021). + public const string Name = "party_reference_data_directory_register"; + + /// The BIAN operation id, which names the tool's authorisation policy (ADR 0038). + public const string OperationId = "PartyReferenceDataDirectoryEntry/Register"; + + /// + /// Registers a party, as the HTTP endpoint does: the same command, the same idempotency and the same errors. + /// + /// BIAN PartyType. + /// The command's idempotency key (ADR 0018). + /// The host's message bus. + /// The call's cancellation. + /// The new entry with its version, or the Problem Details of the error. + [McpServerTool(Name = Name, Title = "Register a party", ReadOnly = false, Destructive = false, Idempotent = true, OpenWorld = false)] + [ToolOperation(OperationId)] + [Description( + "BIAN Party Reference Data Directory: register a customer entity in the catalog. Creates a directory entry for a " + + "Person or an Organisation, with its Demographics, Reference and BankRelations, and returns their ids and the " + + "entry's version (send it as expectedVersion to change the entry). The open date is the time of registration. " + + "Calling again with the same idempotencyKey and arguments returns the same entry.")] + public static async Task RegisterAsync( + [Description("BIAN PartyType: Person or Organisation (case-sensitive).")] string partyType, + [Description("A key of 1 to 255 visible ASCII characters, unique per registration. Reusing it with other arguments is a conflict.")] string idempotencyKey, + IMessageBus bus, + CancellationToken cancellationToken) + { + ArgumentNullException.ThrowIfNull(bus); + + var command = IdempotencyKey.TryCreate(idempotencyKey) + .Bind(key => PartyTypes.FromBianName(partyType).Map(type => new RegisterParty(type, key))); + if (command.IsFailure) + { + return ToolProblem.Create(command.Error); + } + + var outcome = await bus.InvokeAsync>(command.Value, cancellationToken); + return outcome.ToToolResult(acknowledged => ToolResults.Structured(RegisterPartyResult.From(acknowledged))); + } +} diff --git a/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Retrieval/RetrievePartyReferenceDataDirectoryEntryResult.cs b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Retrieval/RetrievePartyReferenceDataDirectoryEntryResult.cs new file mode 100644 index 0000000..6206929 --- /dev/null +++ b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Retrieval/RetrievePartyReferenceDataDirectoryEntryResult.cs @@ -0,0 +1,51 @@ +using System.Text.Json.Serialization; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp; + +/// +/// The result of party_reference_data_directory_retrieve: the fields of the HTTP Retrieve response with BIAN's +/// names, which it mirrors (a parity test proves the JSON is equal, ADR 0039), and the entry's , +/// which HTTP sends as the ETag header. It is built only from the entry's view (tech-stack §5). +/// +/// The entry. +/// BIAN PartyType: Person or Organisation. +/// BIAN DirectoryEntryDateType: OpenDate, the date of DirectoryEntryDate. +/// BIAN DirectoryEntryDate: when the directory registered the party. +/// The entry's Demographics. +/// The entry's Reference. +/// The entry's BankRelations. +/// The entry's last Update. Omitted until the first one. +/// The entry's version: the expectedVersion of a later command (ADR 0027). +public sealed record RetrievePartyReferenceDataDirectoryEntryResult( + [property: JsonPropertyName("PartyReferenceDataDirectoryEntryId")] Guid PartyReferenceDataDirectoryEntryId, + [property: JsonPropertyName("PartyType")] string PartyType, + [property: JsonPropertyName("DirectoryEntryDateType")] string DirectoryEntryDateType, + [property: JsonPropertyName("DirectoryEntryDate")] DateTimeOffset DirectoryEntryDate, + [property: JsonPropertyName("DemographicsId")] Guid DemographicsId, + [property: JsonPropertyName("ReferenceId")] Guid ReferenceId, + [property: JsonPropertyName("BankRelationsId")] Guid BankRelationsId, + [property: JsonPropertyName("RefreshDate"), JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] DateTimeOffset? RefreshDate, + [property: JsonPropertyName("version")] long Version) +{ + /// The DirectoryEntryDateType of the entry's open date. + public const string OpenDate = "OpenDate"; + + /// The result for . + /// The entry's read model. + /// The tool's result. + public static RetrievePartyReferenceDataDirectoryEntryResult From(PartyReferenceDataDirectoryEntryView view) + { + ArgumentNullException.ThrowIfNull(view); + + return new RetrievePartyReferenceDataDirectoryEntryResult( + view.Id, + view.PartyType.ToString(), + OpenDate, + view.OpenDate, + view.DemographicsId.Value, + view.PartyReferenceId.Value, + view.BankRelationsId.Value, + view.RefreshDate, + view.Version); + } +} diff --git a/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Retrieval/RetrievePartyReferenceDataDirectoryEntryTool.cs b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Retrieval/RetrievePartyReferenceDataDirectoryEntryTool.cs new file mode 100644 index 0000000..ac53e14 --- /dev/null +++ b/src/RimBank.Mcp/Party/PartyReferenceDataDirectory/Retrieval/RetrievePartyReferenceDataDirectoryEntryTool.cs @@ -0,0 +1,54 @@ +using System.ComponentModel; +using ModelContextProtocol.Protocol; +using ModelContextProtocol.Server; +using RimBank.Mcp; +using RimBank.SharedKernel; +using Wolverine; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp; + +/// +/// party_reference_data_directory_retrieve: BIAN PartyReferenceDataDirectoryEntry/Retrieve, a query +/// (ADR 0024). It dispatches , as +/// GET /PartyReferenceDataDirectory/{id}/Retrieve does, and answers only from the entry's view (tech-stack §5, +/// §6, ADR 0039). +/// +[McpServerToolType] +public sealed class RetrievePartyReferenceDataDirectoryEntryTool +{ + /// The tool's name (ADR 0021). + public const string Name = "party_reference_data_directory_retrieve"; + + /// The BIAN operation id, which names the tool's authorisation policy (ADR 0038). + public const string OperationId = "PartyReferenceDataDirectoryEntry/Retrieve"; + + /// Retrieves a directory entry, as the HTTP endpoint does: the same query and the same errors. + /// The entry's id, as Register returned it. + /// The host's message bus. + /// The call's cancellation. + /// The entry with its version, or the Problem Details of the error. + [McpServerTool(Name = Name, Title = "Retrieve a party directory entry", ReadOnly = true, Destructive = false, Idempotent = true, OpenWorld = false)] + [ToolOperation(OperationId)] + [Description( + "BIAN Party Reference Data Directory: retrieve details about a customer directory entry. Returns the party type, " + + "the open date, the last refresh date if any, the ids of its Demographics, Reference and BankRelations, and the " + + "entry's version (send it as expectedVersion to change the entry).")] + public static async Task RetrieveAsync( + [Description("The PartyReferenceDataDirectoryEntryId that Register returned.")] string partyReferenceDataDirectoryEntryId, + IMessageBus bus, + CancellationToken cancellationToken) + { + ArgumentNullException.ThrowIfNull(bus); + + var entryId = PartyReferenceDataDirectoryEntryId.TryCreate(partyReferenceDataDirectoryEntryId); + if (entryId.IsFailure) + { + return ToolProblem.Create(PartyReferenceDataDirectoryEntryErrors.EntryIdInvalid); + } + + var view = await bus.InvokeAsync>( + new RetrievePartyReferenceDataDirectoryEntry(entryId.Value), + cancellationToken); + return view.ToToolResult(found => ToolResults.Structured(RetrievePartyReferenceDataDirectoryEntryResult.From(found))); + } +} diff --git a/src/RimBank.Mcp/RimBank.Mcp.csproj b/src/RimBank.Mcp/RimBank.Mcp.csproj index 925c7e6..03fc2be 100644 --- a/src/RimBank.Mcp/RimBank.Mcp.csproj +++ b/src/RimBank.Mcp/RimBank.Mcp.csproj @@ -1,9 +1,12 @@ RimBank.Mcp @@ -15,9 +18,11 @@ + + diff --git a/src/RimBank.Mcp/ToolResults.cs b/src/RimBank.Mcp/ToolResults.cs new file mode 100644 index 0000000..74714f1 --- /dev/null +++ b/src/RimBank.Mcp/ToolResults.cs @@ -0,0 +1,29 @@ +using System.Text.Json; +using ModelContextProtocol.Protocol; + +namespace RimBank.Mcp; + +/// The success shape of every RimBank tool (ADR 0039). +public static class ToolResults +{ + /// + /// as the result's structuredContent, and the same JSON as its one text block for + /// clients that read only text, as does for errors. It is serialized with the web defaults + /// HTTP uses, so a tool's JSON is that of the HTTP response it mirrors. + /// + /// The tool's result model. + /// The result, built from a command's acknowledgement or a query's view. + /// The success tool result. + public static CallToolResult Structured(T value) + { + ArgumentNullException.ThrowIfNull(value); + + var json = JsonSerializer.Serialize(value, JsonSerializerOptions.Web); + return new CallToolResult + { + IsError = false, + StructuredContent = JsonElement.Parse(json), + Content = [new TextContentBlock { Text = json }], + }; + } +} diff --git a/src/RimBank.Mcp/packages.lock.json b/src/RimBank.Mcp/packages.lock.json index 2dc1836..aaac299 100644 --- a/src/RimBank.Mcp/packages.lock.json +++ b/src/RimBank.Mcp/packages.lock.json @@ -11,6 +11,65 @@ "ModelContextProtocol": "[2.3.1]" } }, + "WolverineFx": { + "type": "Direct", + "requested": "[6.62.0, )", + "resolved": "6.62.0", + "contentHash": "0KashWEcGtbB0ugMpcupHFaeS9iq8vRA+FXAGM7O2hEGJWsMxah5B663Z1TBwHD3LhhODWiuC5mSeU0GR50YGA==", + "dependencies": { + "Cronos": "0.11.0", + "JasperFx": "2.100.1", + "JasperFx.Events": "2.100.1", + "JasperFx.SourceGenerator": "2.100.1", + "NewId": "4.0.1" + } + }, + "Cronos": { + "type": "Transitive", + "resolved": "0.11.0", + "contentHash": "ovNrFIuKTbeNYx+1Tne8DkY/nJ+bRoS0/bTrCBzeAuMvLbX2nJprwcdRqZIwwLRsaghqBU932QvJ6mryTycc/A==" + }, + "FastExpressionCompiler": { + "type": "Transitive", + "resolved": "5.4.1", + "contentHash": "nqMykMspK5cQd35Y8ulQzAujxCcCwZVUne32pC5xNpXqrbPCuKOPMWkKHJ3LveAZPm6dsVvump0TJ1SZ9RzfTQ==" + }, + "ImTools": { + "type": "Transitive", + "resolved": "4.0.0", + "contentHash": "dms0JfLKC9AQbQX/EdpRjn59EjEvaCxIgv1z9YxbEQb5SiOVoo7vlIKdEySeEwUkWhN05rZnNpUpG+aw5VqPVQ==" + }, + "JasperFx": { + "type": "Transitive", + "resolved": "2.100.1", + "contentHash": "w/+2y30g2dcqWLz4666RtxSRQEMCieQprOZAoaJoFUKfC3GPehbYElzgNbqzZomKkcw7w70mgyg1QoiYy8SaAQ==", + "dependencies": { + "FastExpressionCompiler": "5.4.1", + "ImTools": "4.0.0", + "Microsoft.Bcl.TimeProvider": "10.0.0", + "Polly.Core": "8.6.5", + "Spectre.Console": "0.55.0", + "System.Linq.Dynamic.Core": "1.7.4" + } + }, + "JasperFx.Events": { + "type": "Transitive", + "resolved": "2.100.1", + "contentHash": "b0N1bnZmRqlIOKsct6dIqN5AqR7K1fpviFQpt+Pq/bptVLq9ev16bAnb6KvX5PQ7N++dXOBvV2X4yRUK7tW3Rw==", + "dependencies": { + "JasperFx": "2.100.1" + } + }, + "JasperFx.SourceGenerator": { + "type": "Transitive", + "resolved": "2.100.1", + "contentHash": "m8k2mdJfJcQ+Xvbtkh/oxf/fFmC6lNfyBSbb3SPN5bqO4cxEL6S6P6MVMAwoYjHcnlN1AgzjzgTlgznFPG3IPw==" + }, + "Microsoft.Bcl.TimeProvider": { + "type": "Transitive", + "resolved": "10.0.0", + "contentHash": "bUubrBD6tRJE3V1kvRloYc6NymH3R5oFKjAS9e0ELNx6u0ZR+zjps9dDQyjgqN/rArzl7f+21KGszj3YRN7F2Q==" + }, "Microsoft.Extensions.AI.Abstractions": { "type": "Transitive", "resolved": "10.11.0", @@ -32,6 +91,44 @@ "Microsoft.Extensions.AI.Abstractions": "10.11.0" } }, + "NewId": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "jegBasNndmG21G3BmT51suFDCIz/sLN81j+IxmkZ4iWoaDi8LygeHiyNnYbXz5OQh9nCRJFIx1+PJrlYi1Gc9Q==" + }, + "Polly.Core": { + "type": "Transitive", + "resolved": "8.6.5", + "contentHash": "t+sUVrIwvo7UmsgHGgOG9F0GDZSRIm47u2ylH17Gvcv1q5hNEwgD5GoBlFyc0kh/pebmPyrAgvGsR/65ZBaXlg==" + }, + "Spectre.Console": { + "type": "Transitive", + "resolved": "0.55.0", + "contentHash": "2TVhUHFsDux0Z+y2Hv4bFsOMuON4SuotEEKkMparFkp5Rm259naaaEQrN4Sv6C1cbsiGKPjfkJDGgUp+hZPjTw==", + "dependencies": { + "Spectre.Console.Ansi": "0.55.0" + } + }, + "Spectre.Console.Ansi": { + "type": "Transitive", + "resolved": "0.55.0", + "contentHash": "GIfgOvuF8MpU52bprhwtDEtx0gmVIGOepM8bw0lH/TSMD0rg1Xp+5Y53kPG8rFVdcpbNANlhDQ5mEVVPO3/2Tg==" + }, + "System.Linq.Dynamic.Core": { + "type": "Transitive", + "resolved": "1.7.4", + "contentHash": "2VJGKUdPjA59aqv/ehvBS+oVoFQqqsiVZlbcyDmuwypgy96Ss1/b8U13Yufk0TXtzveMWAPQAfnZzH+bs1r7Vw==" + }, + "rimbank.core": { + "type": "Project", + "dependencies": { + "RimBank.Party.PartyReferenceDataDirectory.PublishedLanguage": "[0.1.0-alpha, )", + "RimBank.SharedKernel": "[0.1.0-alpha, )" + } + }, + "rimbank.party.partyreferencedatadirectory.publishedlanguage": { + "type": "Project" + }, "rimbank.problems": { "type": "Project", "dependencies": { diff --git a/tests/RimBank.Api.Tests/packages.lock.json b/tests/RimBank.Api.Tests/packages.lock.json index 1dcab38..3865569 100644 --- a/tests/RimBank.Api.Tests/packages.lock.json +++ b/tests/RimBank.Api.Tests/packages.lock.json @@ -1242,8 +1242,10 @@ "type": "Project", "dependencies": { "ModelContextProtocol.AspNetCore": "[2.3.1, )", + "RimBank.Core": "[0.1.0-alpha, )", "RimBank.Problems": "[0.1.0-alpha, )", - "RimBank.SharedKernel": "[0.1.0-alpha, )" + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "WolverineFx": "[6.62.0, )" } }, "rimbank.party.partyreferencedatadirectory.postgresql": { diff --git a/tests/RimBank.Architecture.Tests/packages.linux-x64.lock.json b/tests/RimBank.Architecture.Tests/packages.linux-x64.lock.json index d1aa7d9..6c35b71 100644 --- a/tests/RimBank.Architecture.Tests/packages.linux-x64.lock.json +++ b/tests/RimBank.Architecture.Tests/packages.linux-x64.lock.json @@ -1615,15 +1615,23 @@ "type": "Project", "dependencies": { "ModelContextProtocol.AspNetCore": "[2.3.1, )", + "RimBank.Core": "[0.1.0-alpha, )", "RimBank.Problems": "[0.1.0-alpha, )", - "RimBank.SharedKernel": "[0.1.0-alpha, )" + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "WolverineFx": "[6.62.0, )" } }, "rimbank.mcp.tests": { "type": "Project", "dependencies": { + "Alba": "[8.5.3, )", + "Microsoft.AspNetCore.Mvc.Testing": "[10.0.14, )", + "RimBank.Host": "[0.1.0-alpha, )", + "RimBank.Host.Testing": "[0.1.0-alpha, )", "RimBank.Mcp": "[0.1.0-alpha, )", + "RimBank.SharedKernel.Testing": "[0.1.0-alpha, )", "Shouldly": "[4.3.0, )", + "Testcontainers.PostgreSql": "[4.16.0, )", "xunit.v3": "[4.0.2, )" } }, diff --git a/tests/RimBank.Architecture.Tests/packages.win-x64.lock.json b/tests/RimBank.Architecture.Tests/packages.win-x64.lock.json index 9b04925..ea09024 100644 --- a/tests/RimBank.Architecture.Tests/packages.win-x64.lock.json +++ b/tests/RimBank.Architecture.Tests/packages.win-x64.lock.json @@ -1615,15 +1615,23 @@ "type": "Project", "dependencies": { "ModelContextProtocol.AspNetCore": "[2.3.1, )", + "RimBank.Core": "[0.1.0-alpha, )", "RimBank.Problems": "[0.1.0-alpha, )", - "RimBank.SharedKernel": "[0.1.0-alpha, )" + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "WolverineFx": "[6.62.0, )" } }, "rimbank.mcp.tests": { "type": "Project", "dependencies": { + "Alba": "[8.5.3, )", + "Microsoft.AspNetCore.Mvc.Testing": "[10.0.14, )", + "RimBank.Host": "[0.1.0-alpha, )", + "RimBank.Host.Testing": "[0.1.0-alpha, )", "RimBank.Mcp": "[0.1.0-alpha, )", + "RimBank.SharedKernel.Testing": "[0.1.0-alpha, )", "Shouldly": "[4.3.0, )", + "Testcontainers.PostgreSql": "[4.16.0, )", "xunit.v3": "[4.0.2, )" } }, diff --git a/tests/RimBank.Host.Testing/packages.lock.json b/tests/RimBank.Host.Testing/packages.lock.json index 549b89a..4ca988b 100644 --- a/tests/RimBank.Host.Testing/packages.lock.json +++ b/tests/RimBank.Host.Testing/packages.lock.json @@ -927,8 +927,10 @@ "type": "Project", "dependencies": { "ModelContextProtocol.AspNetCore": "[2.3.1, )", + "RimBank.Core": "[0.1.0-alpha, )", "RimBank.Problems": "[0.1.0-alpha, )", - "RimBank.SharedKernel": "[0.1.0-alpha, )" + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "WolverineFx": "[6.62.0, )" } }, "rimbank.party.partyreferencedatadirectory.postgresql": { diff --git a/tests/RimBank.Host.Tests/Mcp/McpAuthorizedServiceDomainModule.cs b/tests/RimBank.Host.Tests/Mcp/McpAuthorizedServiceDomainModule.cs new file mode 100644 index 0000000..6e6a48d --- /dev/null +++ b/tests/RimBank.Host.Tests/Mcp/McpAuthorizedServiceDomainModule.cs @@ -0,0 +1,58 @@ +using System.ComponentModel; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using ModelContextProtocol.Server; +using RimBank.Mcp; + +namespace RimBank.Host.Tests; + +/// +/// A test-only module whose tools carry the policy of their operation, as a context's .Mcp tools do +/// (ADR 0038, ADR 0039): one query on and one command on . +/// +internal sealed class McpAuthorizedServiceDomainModule : IServiceDomainModule +{ + public const string ReadScope = "fake-authorized-service-domain:read"; + + public const string WriteScope = "fake-authorized-service-domain:write"; + + public string ServiceDomain => "FakeAuthorizedServiceDomain"; + + public void AddServices(IHostApplicationBuilder builder) + { + } + + public void AddOperationPolicies(OperationPolicies policies) => + policies + .AddQuery(FakeAuthorizedServiceDomainTools.RetrieveOperationId, ReadScope) + .AddCommand(FakeAuthorizedServiceDomainTools.RegisterOperationId, WriteScope); + + public void AddMcpTools(IMcpServerBuilder tools) => tools.WithTools(); + + public void MapEndpoints(IEndpointRouteBuilder endpoints) + { + } +} + +[McpServerToolType] +internal sealed class FakeAuthorizedServiceDomainTools +{ + public const string RetrieveName = "fake_authorized_service_domain_retrieve"; + + public const string RetrieveOperationId = "FakeAuthorizedServiceDomainEntry/Retrieve"; + + public const string RegisterName = "fake_authorized_service_domain_register"; + + public const string RegisterOperationId = "FakeAuthorizedServiceDomainEntry/Register"; + + [McpServerTool(Name = RetrieveName, ReadOnly = true, Idempotent = true, Destructive = false, OpenWorld = false)] + [ToolOperation(RetrieveOperationId)] + [Description("Retrieves the fake authorized service domain's fixed entry.")] + public static string Retrieve() => "retrieved"; + + [McpServerTool(Name = RegisterName, ReadOnly = false, Idempotent = true, Destructive = false, OpenWorld = false)] + [ToolOperation(RegisterOperationId)] + [Description("Registers nothing; it only proves the command policy.")] + public static string Register() => "registered"; +} diff --git a/tests/RimBank.Host.Tests/Mcp/McpToolAuthorizationTests.cs b/tests/RimBank.Host.Tests/Mcp/McpToolAuthorizationTests.cs new file mode 100644 index 0000000..2ecbeb5 --- /dev/null +++ b/tests/RimBank.Host.Tests/Mcp/McpToolAuthorizationTests.cs @@ -0,0 +1,70 @@ +using System.Text.Json; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.TestHost; +using ModelContextProtocol.Client; +using ModelContextProtocol.Protocol; + +namespace RimBank.Host.Tests; + +// Roadmap 1.16: a tool carries its operation's policy, as its endpoint does (ADR 0038). A caller without the scope does +// not see the tool, and a call is refused with the shared.forbidden Problem Details HTTP returns (ADR 0039). +public sealed class McpToolAuthorizationTests +{ + [Fact] + public async Task The_tool_list_holds_only_the_tools_the_scopes_allow() + { + await using var app = await McpTestHost.StartAsync(new McpAuthorizedServiceDomainModule()); + await using var client = await ConnectAsync(app, McpAuthorizedServiceDomainModule.ReadScope); + + var tools = await client.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken); + + tools.Select(tool => tool.Name).ShouldBe([FakeAuthorizedServiceDomainTools.RetrieveName]); + } + + [Theory] + [InlineData(McpAuthorizedServiceDomainModule.ReadScope, FakeAuthorizedServiceDomainTools.RegisterName)] + [InlineData(McpAuthorizedServiceDomainModule.WriteScope, FakeAuthorizedServiceDomainTools.RetrieveName)] + public async Task A_call_without_the_operations_scope_is_a_forbidden_problem(string scope, string tool) + { + await using var app = await McpTestHost.StartAsync(new McpAuthorizedServiceDomainModule()); + await using var client = await ConnectAsync(app, scope); + + var result = await client.CallToolAsync(tool, cancellationToken: TestContext.Current.CancellationToken); + + result.IsError.ShouldBe(true); + var problem = result.StructuredContent!.Value; + problem.GetProperty("status").GetInt32().ShouldBe(403); + problem.GetProperty("errorCode").GetString().ShouldBe("shared.forbidden"); + problem.GetProperty("instance").GetString().ShouldBe(McpComposition.EndpointPath); + problem.GetProperty("traceId").GetString().ShouldNotBeNullOrEmpty(); + JsonElement.Parse(((TextContentBlock)result.Content.Single()).Text).GetRawText().ShouldBe(problem.GetRawText()); + } + + [Theory] + [InlineData(McpAuthorizedServiceDomainModule.ReadScope, FakeAuthorizedServiceDomainTools.RetrieveName, "retrieved")] + [InlineData(McpAuthorizedServiceDomainModule.WriteScope, FakeAuthorizedServiceDomainTools.RegisterName, "registered")] + public async Task A_call_with_the_operations_scope_runs_the_tool(string scope, string tool, string answer) + { + await using var app = await McpTestHost.StartAsync(new McpAuthorizedServiceDomainModule()); + await using var client = await ConnectAsync(app, scope); + + var result = await client.CallToolAsync(tool, cancellationToken: TestContext.Current.CancellationToken); + + result.IsError.ShouldNotBe(true); + ((TextContentBlock)result.Content.Single()).Text.ShouldBe(answer); + } + + private static Task ConnectAsync(WebApplication app, string scope) + { + var http = TestTokens.Authenticated(app.GetTestClient(), [scope]); + var transport = new HttpClientTransport( + new HttpClientTransportOptions + { + Endpoint = new Uri(http.BaseAddress!, McpComposition.EndpointPath), + TransportMode = HttpTransportMode.StreamableHttp, + }, + http, + ownsHttpClient: true); + return McpClient.CreateAsync(transport, cancellationToken: TestContext.Current.CancellationToken); + } +} diff --git a/tests/RimBank.Host.Tests/packages.lock.json b/tests/RimBank.Host.Tests/packages.lock.json index 59b11d8..cb89b53 100644 --- a/tests/RimBank.Host.Tests/packages.lock.json +++ b/tests/RimBank.Host.Tests/packages.lock.json @@ -1105,8 +1105,10 @@ "type": "Project", "dependencies": { "ModelContextProtocol.AspNetCore": "[2.3.1, )", + "RimBank.Core": "[0.1.0-alpha, )", "RimBank.Problems": "[0.1.0-alpha, )", - "RimBank.SharedKernel": "[0.1.0-alpha, )" + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "WolverineFx": "[6.62.0, )" } }, "rimbank.party.partyreferencedatadirectory.postgresql": { diff --git a/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PartyMcpHost.cs b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PartyMcpHost.cs new file mode 100644 index 0000000..9d5f86e --- /dev/null +++ b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PartyMcpHost.cs @@ -0,0 +1,104 @@ +using System.Text.Json; +using Alba; +using ModelContextProtocol.Client; +using ModelContextProtocol.Protocol; +using Npgsql; +using RimBank.Host; +using RimBank.Host.Testing; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp.Tests; + +/// +/// A started RimBank.Host on its own database, reached through the SDK's MCP client at /mcp and, for +/// parity tests, through HTTP (Alba). Disposing it stops the host. +/// +public sealed class PartyMcpHost(IAlbaHost host, NpgsqlDataSource administrator) : IAsyncDisposable +{ + /// The number of entry streams the context's store holds. + public const string Streams = "SELECT count(*) FROM party_reference_data_directory.mt_streams"; + + /// The number of command outcomes the idempotency policy stored (ADR 0018). + public const string Outcomes = "SELECT count(*) FROM party_reference_data_directory.mt_doc_idempotentoutcome"; + + private readonly List _clients = []; + + /// The host, to run HTTP scenarios against. + public IAlbaHost Alba => host; + + /// + /// An MCP client whose token grants , or every scope the host knows when they are not given. + /// + public async Task ConnectAsync(IEnumerable? scopes = null) + { + var http = TestTokens.Authenticated(host.Server.CreateClient(), scopes); + var transport = new HttpClientTransport( + new HttpClientTransportOptions + { + Endpoint = new Uri(http.BaseAddress!, McpComposition.EndpointPath), + TransportMode = HttpTransportMode.StreamableHttp, + }, + http, + ownsHttpClient: true); + var client = await McpClient.CreateAsync(transport, cancellationToken: TestContext.Current.CancellationToken); + _clients.Add(client); + return client; + } + + /// Calls with , as a client with every scope. + public async Task CallAsync(string tool, Dictionary arguments, IEnumerable? scopes = null) + { + var client = await ConnectAsync(scopes); + return await client.CallToolAsync(tool, arguments, cancellationToken: TestContext.Current.CancellationToken); + } + + /// Runs a single-value query as the administrator, to look at what was stored. + public async Task ScalarAsync(string sql) + { + await using var command = administrator.CreateCommand(sql); + return (T)(await command.ExecuteScalarAsync(TestContext.Current.CancellationToken))!; + } + + public async ValueTask DisposeAsync() + { + foreach (var client in _clients) + { + await client.DisposeAsync(); + } + + await host.DisposeAsync(); + await administrator.DisposeAsync(); + } +} + +/// Reads what a tool answered. +public static class ToolAnswers +{ + /// The structured content of a successful result, after checking that the text block holds the same JSON. + public static JsonElement Success(this CallToolResult result) + { + result.IsError.ShouldNotBe(true, Text(result)); + return SameAsText(result); + } + + /// The Problem Details of an error result, after checking that the text block holds the same JSON. + public static JsonElement Problem(this CallToolResult result, int status, string errorCode) + { + result.IsError.ShouldBe(true); + var problem = SameAsText(result); + problem.GetProperty("status").GetInt32().ShouldBe(status); + problem.GetProperty("errorCode").GetString().ShouldBe(errorCode); + problem.GetProperty("instance").GetString().ShouldBe(McpComposition.EndpointPath); + problem.GetProperty("traceId").GetString().ShouldNotBeNullOrEmpty(); + return problem; + } + + private static JsonElement SameAsText(CallToolResult result) + { + var structured = result.StructuredContent.ShouldNotBeNull(); + // The SDK writes structuredContent again on the wire (escaping '+' as +), so the values are compared. + JsonElement.DeepEquals(JsonElement.Parse(Text(result)), structured).ShouldBeTrue(Text(result)); + return structured; + } + + private static string Text(CallToolResult result) => ((TextContentBlock)result.Content.Single()).Text; +} diff --git a/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PartyMcpParityTests.cs b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PartyMcpParityTests.cs new file mode 100644 index 0000000..f698e7d --- /dev/null +++ b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PartyMcpParityTests.cs @@ -0,0 +1,159 @@ +using System.Text.Json; +using Alba; +using Microsoft.Net.Http.Headers; +using ModelContextProtocol.Protocol; +using RimBank.Host; +using RimBank.Host.Testing; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp.Tests; + +// Roadmap 1.16: the same operation answers the same on HTTP and MCP. The tool's result mirrors the HTTP body, with the +// ETag as its version, and an error is the same Problem Details (mission principles 6 and 8, tech-stack §6, ADR 0039). +public sealed class PartyMcpParityTests(PostgresqlServer server) +{ + private const string Register = "/PartyReferenceDataDirectory/Register"; + + /// The Problem Details members that do not depend on the request. + private static readonly string[] _problemMembers = ["type", "title", "status", "detail", "errorCode", "errors"]; + + [Fact] + public async Task Register_gives_the_http_body_and_the_etag_as_version() + { + await using var host = await server.StartHostAsync(); + + var http = await host.Alba.Scenario(_ => PostRegister(_, """{ "PartyType": "Person" }""", "parity-http")); + var tool = (await RegisterPartyToolTests.RegisterAsync(host, "Person", "parity-mcp")).Success(); + + var body = await http.ReadAsJsonAsync(); + Members(tool).ShouldBe([.. Members(body), "version"]); + foreach (var member in new[] { "PartyType", "DirectoryEntryDateType", "DirectoryEntryDate" }) + { + JsonElement.DeepEquals(tool.GetProperty(member), body.GetProperty(member)).ShouldBeTrue(member); + } + + ETagOf(http).ShouldBe(tool.GetProperty("version").GetInt64()); + } + + [Fact] + public async Task Retrieve_gives_the_http_body_and_the_etag_as_version() + { + await using var host = await server.StartHostAsync(); + var id = (await RegisterPartyToolTests.RegisterAsync(host, "Organisation", "parity-retrieve")).Success() + .GetProperty("PartyReferenceDataDirectoryEntryId").GetGuid(); + + var http = await host.Alba.Scenario(_ => GetRetrieve(_, id.ToString(), 200)); + var tool = (await RetrievePartyReferenceDataDirectoryEntryToolTests.RetrieveAsync(host, id.ToString())).Success(); + + var body = await http.ReadAsJsonAsync(); + JsonElement.DeepEquals(Without(tool, "version"), body).ShouldBeTrue($"{tool} vs {body}"); + ETagOf(http).ShouldBe(tool.GetProperty("version").GetInt64()); + } + + [Theory] + [InlineData("Alien")] + [InlineData("")] + public async Task An_invalid_party_type_is_the_same_problem(string partyType) + { + await using var host = await server.StartHostAsync(); + + var http = await host.Alba.Scenario(_ => + { + PostRegister(_, JsonSerializer.Serialize(new { PartyType = partyType }), "parity-invalid-http"); + _.StatusCodeShouldBe(400); + }); + var tool = await RegisterPartyToolTests.RegisterAsync(host, partyType, "parity-invalid-mcp"); + + await ShouldBeSameProblemAsync(http, tool); + } + + [Fact] + public async Task A_reused_idempotency_key_is_the_same_problem() + { + await using var host = await server.StartHostAsync(); + await host.Alba.Scenario(_ => PostRegister(_, """{ "PartyType": "Person" }""", "parity-reused")); + (await RegisterPartyToolTests.RegisterAsync(host, "Person", "parity-reused-mcp")).Success(); + + var http = await host.Alba.Scenario(_ => + { + PostRegister(_, """{ "PartyType": "Organisation" }""", "parity-reused"); + _.StatusCodeShouldBe(409); + }); + var tool = await RegisterPartyToolTests.RegisterAsync(host, "Organisation", "parity-reused-mcp"); + + await ShouldBeSameProblemAsync(http, tool); + } + + [Theory] + [InlineData("not-a-guid", 400)] + [InlineData("01a1b031-8dc0-74cc-a63a-f954f0f3f1f4", 404)] + public async Task A_malformed_or_unknown_id_is_the_same_problem(string id, int status) + { + await using var host = await server.StartHostAsync(); + + var http = await host.Alba.Scenario(_ => GetRetrieve(_, id, status)); + var tool = await RetrievePartyReferenceDataDirectoryEntryToolTests.RetrieveAsync(host, id); + + await ShouldBeSameProblemAsync(http, tool); + } + + [Fact] + public async Task A_missing_scope_is_the_same_problem() + { + await using var host = await server.StartHostAsync(); + var readOnly = TestTokens.Issue(scopes: [PartyReferenceDataDirectoryModule.ReadScope]); + + var http = await host.Alba.Scenario(_ => + { + _.Post.Text("""{ "PartyType": "Person" }""").ToUrl(Register); + _.WithRequestHeader(HeaderNames.ContentType, "application/json"); + _.WithRequestHeader(HeaderNames.Authorization, "Bearer " + readOnly); + _.WithRequestHeader("Idempotency-Key", "parity-forbidden"); + _.StatusCodeShouldBe(403); + }); + var tool = await host.CallAsync( + RegisterPartyTool.Name, + new() { ["partyType"] = "Person", ["idempotencyKey"] = "parity-forbidden" }, + [PartyReferenceDataDirectoryModule.ReadScope]); + + await ShouldBeSameProblemAsync(http, tool); + } + + private static async Task ShouldBeSameProblemAsync(IScenarioResult http, CallToolResult tool) + { + var expected = await http.ReadAsJsonAsync(); + http.Context.Response.ContentType.ShouldBe("application/problem+json"); + var actual = tool.Problem(expected.GetProperty("status").GetInt32(), expected.GetProperty("errorCode").GetString()!); + foreach (var member in _problemMembers) + { + expected.TryGetProperty(member, out var wanted).ShouldBe(actual.TryGetProperty(member, out var got), member); + if (wanted.ValueKind != JsonValueKind.Undefined) + { + JsonElement.DeepEquals(got, wanted).ShouldBeTrue($"{member}: {got} vs {wanted}"); + } + } + } + + private static void PostRegister(Scenario scenario, string body, string key) + { + scenario.Post.Text(body).ToUrl(Register); + scenario.WithRequestHeader(HeaderNames.ContentType, "application/json"); + scenario.WithRequestHeader(HeaderNames.Authorization, "Bearer " + TestTokens.Issue()); + scenario.WithRequestHeader("Idempotency-Key", key); + } + + private static void GetRetrieve(Scenario scenario, string id, int status) + { + scenario.Get.Url($"/PartyReferenceDataDirectory/{id}/Retrieve"); + scenario.WithRequestHeader(HeaderNames.Authorization, "Bearer " + TestTokens.Issue()); + scenario.StatusCodeShouldBe(status); + } + + private static long ETagOf(IScenarioResult http) => + long.Parse(http.Context.Response.Headers.ETag.ToString().Trim('"'), System.Globalization.CultureInfo.InvariantCulture); + + private static string[] Members(JsonElement element) => [.. element.EnumerateObject().Select(property => property.Name)]; + + private static JsonElement Without(JsonElement element, string member) => + JsonSerializer.SerializeToElement( + element.EnumerateObject().Where(property => property.Name != member).ToDictionary(property => property.Name, property => property.Value)); +} diff --git a/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PartyToolCatalogTests.cs b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PartyToolCatalogTests.cs new file mode 100644 index 0000000..2cc6dd6 --- /dev/null +++ b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PartyToolCatalogTests.cs @@ -0,0 +1,115 @@ +using System.Text.Json; +using Microsoft.Extensions.DependencyInjection; +using ModelContextProtocol.Server; +using RimBank.Host; +using RimBank.Mcp; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp.Tests; + +// Roadmap 1.16, pulled forward from 1.17: the tool list matches the implemented BIAN operations, each tool is named after +// its operation, carries its operation's policy and the annotations of its kind (ADR 0021, ADR 0038, ADR 0039). +public sealed class PartyToolCatalogTests(PostgresqlServer server) +{ + private const string ServiceDomainTool = "party_reference_data_directory"; + + private const string ControlRecord = "PartyReferenceDataDirectoryEntry"; + + /// The implemented operations whose tools roadmap 1.17 adds. 1.17 empties this list. + private static readonly string[] _toolsIn117 = + [ + "PartyReferenceDataDirectoryEntry/Update", + "Demographics/Update", + "Demographics/Exchange", + "Demographics/Retrieve", + "Reference/Update", + "Reference/Retrieve", + "Associations/Register", + "Associations/Update", + "Associations/Retrieve", + "BankRelations/Update", + "BankRelations/Retrieve", + ]; + + [Fact] + public async Task The_tool_list_is_the_implemented_operations_that_have_their_tool_yet() + { + await using var host = await server.StartHostAsync(); + var catalog = host.Alba.Services.GetRequiredService(); + var client = await host.ConnectAsync(); + + var tools = await client.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken); + + _toolsIn117.ShouldBeSubsetOf(catalog.Policies.Select(policy => policy.OperationId)); + tools.Select(tool => tool.Name).Order(StringComparer.Ordinal).ShouldBe( + catalog.Policies + .Select(policy => policy.OperationId) + .Except(_toolsIn117, StringComparer.Ordinal) + .Select(ToolName) + .Order(StringComparer.Ordinal)); + } + + [Fact] + public async Task Each_tool_carries_its_operations_policy_and_the_annotations_of_its_kind() + { + await using var host = await server.StartHostAsync(); + var catalog = host.Alba.Services.GetRequiredService(); + var tools = host.Alba.Services.GetServices().ToList(); + + tools.ShouldNotBeEmpty(); + foreach (var tool in tools) + { + var operationId = tool.Metadata.OfType().ShouldHaveSingleItem().OperationId; + var policy = catalog.Find(operationId).ShouldNotBeNull($"{tool.ProtocolTool.Name} names an operation no policy protects"); + tool.ProtocolTool.Name.ShouldBe(ToolName(operationId)); + tool.ProtocolTool.Description.ShouldNotBeNullOrWhiteSpace(); + tool.ProtocolTool.InputSchema.GetProperty("properties").EnumerateObject().ShouldNotBeEmpty(); + var annotations = tool.ProtocolTool.Annotations.ShouldNotBeNull(); + annotations.ReadOnlyHint.ShouldBe(policy.Kind == OperationKind.Query, tool.ProtocolTool.Name); + annotations.DestructiveHint.ShouldBe(false, tool.ProtocolTool.Name); + annotations.IdempotentHint.ShouldBe(true, tool.ProtocolTool.Name); + annotations.OpenWorldHint.ShouldBe(false, tool.ProtocolTool.Name); + } + } + + [Fact] + public async Task A_command_tool_requires_its_idempotency_key() + { + await using var host = await server.StartHostAsync(); + + var register = host.Alba.Services.GetServices().Single(tool => tool.ProtocolTool.Name == RegisterPartyTool.Name); + + register.ProtocolTool.InputSchema.GetProperty("required").EnumerateArray().Select(name => name.GetString()) + .ShouldBe(["partyType", "idempotencyKey"], ignoreOrder: true); + } + + [Fact] + public async Task A_query_tool_takes_no_idempotency_key() + { + await using var host = await server.StartHostAsync(); + + var retrieve = host.Alba.Services.GetServices() + .Single(tool => tool.ProtocolTool.Name == RetrievePartyReferenceDataDirectoryEntryTool.Name); + + retrieve.ProtocolTool.InputSchema.GetProperty("properties").EnumerateObject().Select(property => property.Name) + .ShouldBe(["partyReferenceDataDirectoryEntryId"]); + retrieve.ProtocolTool.InputSchema.GetProperty("required").ValueKind.ShouldBe(JsonValueKind.Array); + } + + /// + /// The tool name of a BIAN operation (ADR 0021): <service_domain>_<operation> for the Control + /// Record, <service_domain>_<operation>_<behavior_qualifier> for a Behavior Qualifier. + /// + private static string ToolName(string operationId) + { + var (target, operation) = operationId.Split('/') switch + { + [var first, var second] => (first, second), + _ => throw new ArgumentException($"'{operationId}' is not a BIAN operation id.", nameof(operationId)), + }; + return target == ControlRecord + ? $"{ServiceDomainTool}_{SnakeCase(operation)}" + : $"{ServiceDomainTool}_{SnakeCase(operation)}_{SnakeCase(target)}"; + } + + private static string SnakeCase(string name) => JsonNamingPolicy.SnakeCaseLower.ConvertName(name); +} diff --git a/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PostgresqlServer.cs b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PostgresqlServer.cs new file mode 100644 index 0000000..78ccf7b --- /dev/null +++ b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/PostgresqlServer.cs @@ -0,0 +1,104 @@ +using System.Security.Cryptography; +using Alba; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Npgsql; +using RimBank.Host; +using RimBank.Host.Testing; +using RimBank.Postgresql; +using RimBank.SharedKernel.Testing; +using Testcontainers.PostgreSql; + +[assembly: AssemblyFixture(typeof(RimBank.Party.PartyReferenceDataDirectory.Mcp.Tests.PostgresqlServer))] + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp.Tests; + +/// +/// One PostgreSQL container for the whole test assembly. Each test gets its own database and its own +/// RimBank.Host, started one at a time because the context's role is shared by every database on the server +/// (ADR 0016). +/// +public sealed class PostgresqlServer : IAsyncLifetime +{ + /// The time every test host runs at: the open date of every registered party. + public static readonly DateTimeOffset Now = new(2026, 11, 6, 9, 30, 0, TimeSpan.Zero); + + private const string ServiceDomain = "PartyReferenceDataDirectory"; + + private static readonly SemaphoreSlim _startup = new(1, 1); + + private readonly PostgreSqlContainer _container = new PostgreSqlBuilder("postgres:17-alpine").Build(); + + /// The password of the context roles, generated per test run and never written anywhere. + private string RolePassword { get; } = Convert.ToHexString(RandomNumberGenerator.GetBytes(24)); + + public async ValueTask InitializeAsync() => await _container.StartAsync(); + + public async ValueTask DisposeAsync() => await _container.DisposeAsync(); + + /// + /// Starts RimBank.Host exactly as Program composes it, in , on a new + /// database, trusting and running at . The default Test environment + /// behaves like Production (HTTPS authority, no request-binding exceptions) except that the stores create their + /// schema, which Production never does (ADR 0016). With , every log entry from Debug up is also + /// captured there. + /// + public async Task StartHostAsync(string environment = "Test", CapturedLogs? logs = null) + { + var database = await CreateDatabaseAsync(); + await _startup.WaitAsync(TestContext.Current.CancellationToken); + try + { + var host = await AlbaHost.For(web => + { + web.UseEnvironment(environment); + web.UseSetting("ConnectionStrings:rimbank", AdministratorConnectionString(database)); + web.UseSetting($"ConnectionStrings:{ServiceDomain}", RoleConnectionString(database, ServiceDomain)); + web.UseSetting($"ConnectionStrings:{MessagingNodeRegistration.MessagingNode.ConnectionStringName}", RoleConnectionString(database, MessagingNodeRegistration.MessagingNode.Value)); + web.UseSetting("RimBank:Postgresql:ProvisionRoles", "true"); + web.UseSetting(AuthenticationComposition.AuthorityKey, TestTokens.Issuer); + if (logs is not null) + { + web.UseSetting("Logging:LogLevel:Default", "Debug"); + } + + web.ConfigureServices(services => + { + services.TrustTestTokens(); + services.AddSingleton(new FixedTimeProvider(Now)); + if (logs is not null) + { + services.AddSingleton(logs); + } + }); + }); + + return new PartyMcpHost(host, NpgsqlDataSource.Create(AdministratorConnectionString(database))); + } + finally + { + _startup.Release(); + } + } + + private async Task CreateDatabaseAsync() + { + var database = "test_" + Guid.CreateVersion7().ToString("N"); + await using var dataSource = NpgsqlDataSource.Create(_container.GetConnectionString()); + await using var command = dataSource.CreateCommand($"CREATE DATABASE {database}"); + await command.ExecuteNonQueryAsync(TestContext.Current.CancellationToken); + return database; + } + + private string AdministratorConnectionString(string database) => + new NpgsqlConnectionStringBuilder(_container.GetConnectionString()) { Database = database }.ConnectionString; + + private string RoleConnectionString(string database, string serviceDomain) => + new NpgsqlConnectionStringBuilder(_container.GetConnectionString()) + { + Database = database, + Username = ServiceDomainName.Parse(serviceDomain).RoleName, + Password = RolePassword, + }.ConnectionString; +} diff --git a/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/Registration/RegisterPartyToolTests.cs b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/Registration/RegisterPartyToolTests.cs new file mode 100644 index 0000000..f5ca4d7 --- /dev/null +++ b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/Registration/RegisterPartyToolTests.cs @@ -0,0 +1,127 @@ +using RimBank.Host; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp.Tests; + +// Roadmap 1.16: party_reference_data_directory_register sends the same RegisterParty as the HTTP endpoint, with the same +// idempotency and errors (specs/tech-stack.md §6, ADR 0039). +public sealed class RegisterPartyToolTests(PostgresqlServer server) +{ + private static readonly string[] _ids = ["PartyReferenceDataDirectoryEntryId", "DemographicsId", "ReferenceId", "BankRelationsId"]; + + [Fact] + public async Task Register_answers_the_new_entry_with_its_version() + { + await using var host = await server.StartHostAsync(); + + var entry = (await RegisterAsync(host, "Person", "register-1")).Success(); + + entry.GetProperty("PartyType").GetString().ShouldBe("Person"); + entry.GetProperty("DirectoryEntryDateType").GetString().ShouldBe("OpenDate"); + entry.GetProperty("DirectoryEntryDate").GetDateTimeOffset().ShouldBe(PostgresqlServer.Now); + entry.GetProperty("version").GetInt64().ShouldBe(1); + _ids.Select(name => entry.GetProperty(name).GetGuid()) + .ShouldAllBe(id => id != Guid.Empty && id.Version == 7); + (await host.ScalarAsync( + $"SELECT type FROM party_reference_data_directory.mt_events WHERE stream_id = '{entry.GetProperty("PartyReferenceDataDirectoryEntryId").GetGuid()}'")) + .ShouldBe("party_registered"); + } + + [Fact] + public async Task The_same_key_and_arguments_replay_the_first_answer() + { + await using var host = await server.StartHostAsync(); + + var first = (await RegisterAsync(host, "Organisation", "register-twice")).Success(); + var second = (await RegisterAsync(host, "Organisation", "register-twice")).Success(); + + second.GetRawText().ShouldBe(first.GetRawText()); + (await host.ScalarAsync(PartyMcpHost.Streams)).ShouldBe(1); + } + + [Fact] + public async Task The_same_key_with_other_arguments_is_a_conflict() + { + await using var host = await server.StartHostAsync(); + (await RegisterAsync(host, "Person", "register-conflict")).Success(); + + (await RegisterAsync(host, "Organisation", "register-conflict")).Problem(409, "shared.idempotency-key-reused"); + + (await host.ScalarAsync(PartyMcpHost.Streams)).ShouldBe(1); + } + + [Theory] + [InlineData("")] + [InlineData("has space")] + public async Task A_blank_or_invalid_idempotency_key_is_refused(string key) + { + await using var host = await server.StartHostAsync(); + + (await RegisterAsync(host, "Person", key)).Problem(400, "shared.idempotency-key-invalid"); + + await NothingStoredAsync(host); + } + + [Fact] + public async Task A_too_long_idempotency_key_is_refused() + { + await using var host = await server.StartHostAsync(); + + (await RegisterAsync(host, "Person", new string('k', 256))).Problem(400, "shared.idempotency-key-invalid"); + + await NothingStoredAsync(host); + } + + [Theory] + [InlineData("", "party.party-type-required")] + [InlineData("Alien", "party.party-type-invalid")] + [InlineData("person", "party.party-type-invalid")] + public async Task A_blank_or_unknown_party_type_is_a_validation_problem(string partyType, string errorCode) + { + await using var host = await server.StartHostAsync(); + + var problem = (await RegisterAsync(host, partyType, "register-invalid")).Problem(400, errorCode); + + problem.GetProperty("errors").GetProperty("PartyType").GetArrayLength().ShouldBe(1); + await NothingStoredAsync(host); + } + + [Theory] + [InlineData("partyType")] + [InlineData("idempotencyKey")] + public async Task A_missing_argument_is_a_tool_arguments_problem(string missing) + { + await using var host = await server.StartHostAsync(); + var arguments = new Dictionary { ["partyType"] = "Person", ["idempotencyKey"] = "register-missing" }; + arguments.Remove(missing); + + (await host.CallAsync(RegisterPartyTool.Name, arguments)).Problem(400, "shared.tool-arguments-invalid"); + + await NothingStoredAsync(host); + } + + [Fact] + public async Task A_caller_with_only_the_read_scope_neither_sees_nor_registers() + { + await using var host = await server.StartHostAsync(); + var client = await host.ConnectAsync([PartyReferenceDataDirectoryModule.ReadScope]); + + var tools = await client.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken); + var result = await host.CallAsync( + RegisterPartyTool.Name, + new() { ["partyType"] = "Person", ["idempotencyKey"] = "register-denied" }, + [PartyReferenceDataDirectoryModule.ReadScope]); + + tools.Select(tool => tool.Name).ShouldNotContain(RegisterPartyTool.Name); + result.Problem(403, "shared.forbidden"); + await NothingStoredAsync(host); + } + + internal static Task RegisterAsync(PartyMcpHost host, string partyType, string key) => + host.CallAsync(RegisterPartyTool.Name, new() { ["partyType"] = partyType, ["idempotencyKey"] = key }); + + private static async Task NothingStoredAsync(PartyMcpHost host) + { + (await host.ScalarAsync(PartyMcpHost.Streams)).ShouldBe(0); + (await host.ScalarAsync(PartyMcpHost.Outcomes)).ShouldBe(0); + } +} diff --git a/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/Retrieval/RetrievePartyReferenceDataDirectoryEntryToolTests.cs b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/Retrieval/RetrievePartyReferenceDataDirectoryEntryToolTests.cs new file mode 100644 index 0000000..fb1c281 --- /dev/null +++ b/tests/RimBank.Mcp.Tests/Party/PartyReferenceDataDirectory/Retrieval/RetrievePartyReferenceDataDirectoryEntryToolTests.cs @@ -0,0 +1,68 @@ +using RimBank.Host; + +namespace RimBank.Party.PartyReferenceDataDirectory.Mcp.Tests; + +// Roadmap 1.16: party_reference_data_directory_retrieve sends the same query as the HTTP endpoint and answers only from +// the entry's inline view (specs/tech-stack.md §6, §8, ADR 0039). +public sealed class RetrievePartyReferenceDataDirectoryEntryToolTests(PostgresqlServer server) +{ + [Fact] + public async Task Retrieve_answers_the_registered_entry_with_its_version() + { + await using var host = await server.StartHostAsync(); + var registered = (await RegisterPartyToolTests.RegisterAsync(host, "Organisation", "retrieve-1")).Success(); + var id = registered.GetProperty("PartyReferenceDataDirectoryEntryId").GetGuid(); + + var entry = (await RetrieveAsync(host, id.ToString())).Success(); + + entry.GetProperty("PartyReferenceDataDirectoryEntryId").GetGuid().ShouldBe(id); + entry.GetProperty("PartyType").GetString().ShouldBe("Organisation"); + entry.GetProperty("DirectoryEntryDateType").GetString().ShouldBe("OpenDate"); + entry.GetProperty("DirectoryEntryDate").GetDateTimeOffset().ShouldBe(PostgresqlServer.Now); + foreach (var name in new[] { "DemographicsId", "ReferenceId", "BankRelationsId" }) + { + entry.GetProperty(name).GetGuid().ShouldBe(registered.GetProperty(name).GetGuid()); + } + + entry.TryGetProperty("RefreshDate", out _).ShouldBeFalse(); + entry.GetProperty("version").GetInt64().ShouldBe(registered.GetProperty("version").GetInt64()); + } + + [Fact] + public async Task An_unknown_entry_is_a_not_found_problem() + { + await using var host = await server.StartHostAsync(); + + (await RetrieveAsync(host, Guid.CreateVersion7().ToString())).Problem(404, PartyReferenceDataDirectoryEntryErrors.PartyNotFound.Code); + } + + [Theory] + [InlineData("not-a-guid")] + [InlineData("00000000-0000-0000-0000-000000000000")] + public async Task A_malformed_id_is_a_validation_problem(string id) + { + await using var host = await server.StartHostAsync(); + + (await RetrieveAsync(host, id)).Problem(400, PartyReferenceDataDirectoryEntryErrors.EntryIdInvalid.Code); + } + + [Fact] + public async Task A_caller_with_only_the_write_scope_neither_sees_nor_retrieves() + { + await using var host = await server.StartHostAsync(); + var registered = (await RegisterPartyToolTests.RegisterAsync(host, "Person", "retrieve-denied")).Success(); + var client = await host.ConnectAsync([PartyReferenceDataDirectoryModule.WriteScope]); + + var tools = await client.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken); + var result = await host.CallAsync( + RetrievePartyReferenceDataDirectoryEntryTool.Name, + new() { ["partyReferenceDataDirectoryEntryId"] = registered.GetProperty("PartyReferenceDataDirectoryEntryId").GetGuid().ToString() }, + [PartyReferenceDataDirectoryModule.WriteScope]); + + tools.Select(tool => tool.Name).ShouldNotContain(RetrievePartyReferenceDataDirectoryEntryTool.Name); + result.Problem(403, "shared.forbidden"); + } + + internal static Task RetrieveAsync(PartyMcpHost host, string id) => + host.CallAsync(RetrievePartyReferenceDataDirectoryEntryTool.Name, new() { ["partyReferenceDataDirectoryEntryId"] = id }); +} diff --git a/tests/RimBank.Mcp.Tests/RimBank.Mcp.Tests.csproj b/tests/RimBank.Mcp.Tests/RimBank.Mcp.Tests.csproj index f0d783e..7e967f0 100644 --- a/tests/RimBank.Mcp.Tests/RimBank.Mcp.Tests.csproj +++ b/tests/RimBank.Mcp.Tests/RimBank.Mcp.Tests.csproj @@ -1,4 +1,10 @@ + Exe RimBank.Mcp.Tests @@ -7,10 +13,16 @@ + + + + + + diff --git a/tests/RimBank.Mcp.Tests/packages.lock.json b/tests/RimBank.Mcp.Tests/packages.lock.json index 9f8f788..c81a9aa 100644 --- a/tests/RimBank.Mcp.Tests/packages.lock.json +++ b/tests/RimBank.Mcp.Tests/packages.lock.json @@ -2,6 +2,28 @@ "version": 2, "dependencies": { "net10.0": { + "Alba": { + "type": "Direct", + "requested": "[8.5.3, )", + "resolved": "8.5.3", + "contentHash": "E4YOI8oaY4MUP63Xhl+xzuViycIE8sIw5XlIRbbqJg7UV04RrA1crUEXt4Pj9ezzvaQZJxol2J8gMeUpykLRQw==", + "dependencies": { + "IdentityModel": "6.2.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "10.0.0", + "Microsoft.AspNetCore.Mvc.Testing": "10.0.0" + } + }, + "Microsoft.AspNetCore.Mvc.Testing": { + "type": "Direct", + "requested": "[10.0.14, )", + "resolved": "10.0.14", + "contentHash": "l3eFye4Bv4oGT1Ag8pFtZ6WM0LhR9PkNiDH1AYitZW2LAaFWl1FgF4Dj7wY4Fp/BqCZ4LLkBGLw+NE/CA5k6mQ==", + "dependencies": { + "Microsoft.AspNetCore.TestHost": "10.0.14", + "Microsoft.Extensions.DependencyModel": "10.0.14", + "Microsoft.Extensions.Hosting": "10.0.14" + } + }, "Shouldly": { "type": "Direct", "requested": "[4.3.0, )", @@ -12,6 +34,15 @@ "EmptyFiles": "4.4.0" } }, + "Testcontainers.PostgreSql": { + "type": "Direct", + "requested": "[4.16.0, )", + "resolved": "4.16.0", + "contentHash": "QqvFS8Oj+i6deH3QJOMd7jgFF9P3h7RZ37wOaoR97ZahMcSYMYCb+COR4nUVznT1d7EavEcZdUs1QV0ow69JiA==", + "dependencies": { + "Testcontainers": "4.16.0" + } + }, "xunit.v3": { "type": "Direct", "requested": "[4.0.2, )", @@ -21,6 +52,16 @@ "xunit.v3.mtp-v2": "[4.0.2]" } }, + "BouncyCastle.Cryptography": { + "type": "Transitive", + "resolved": "2.7.0", + "contentHash": "U+12df8UEWHgBi04YVf/Lgi2dy3SItlIYvHjjEVa/BngCQIzDCDRBk50DDByCfDvSbe5pRNFr3b7UrVK2kMcLw==" + }, + "Cronos": { + "type": "Transitive", + "resolved": "0.11.0", + "contentHash": "ovNrFIuKTbeNYx+1Tne8DkY/nJ+bRoS0/bTrCBzeAuMvLbX2nJprwcdRqZIwwLRsaghqBU932QvJ6mryTycc/A==" + }, "DiffEngine": { "type": "Transitive", "resolved": "11.3.0", @@ -30,26 +71,305 @@ "System.Management": "6.0.1" } }, + "Docker.DotNet.Enhanced": { + "type": "Transitive", + "resolved": "4.3.3", + "contentHash": "nGicLwvd42FhRk+khY5uS6cx49ErNdwYKnYBg0F4m4BDKLp/R77AVmmN9xAiqI3W/wN5ZCHkdUhgxf5ORkZuFQ==", + "dependencies": { + "Docker.DotNet.Enhanced.Handler.Abstractions": "4.3.3", + "Docker.DotNet.Enhanced.LegacyHttp": "4.3.3", + "Docker.DotNet.Enhanced.NPipe": "4.3.3", + "Docker.DotNet.Enhanced.NativeHttp": "4.3.3", + "Docker.DotNet.Enhanced.Unix": "4.3.3", + "Microsoft.Extensions.Logging.Abstractions": "8.0.3" + } + }, + "Docker.DotNet.Enhanced.Handler.Abstractions": { + "type": "Transitive", + "resolved": "4.3.3", + "contentHash": "9Cp8hOgtynixcDoAs9lnEaQosluojSYmiW3fsLsLIVfZjlq/fznSIZNUhnmyT4Xo1Iyuok/y49WL/25O47u0Pw==", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "8.0.3" + } + }, + "Docker.DotNet.Enhanced.LegacyHttp": { + "type": "Transitive", + "resolved": "4.3.3", + "contentHash": "7j3M16emv9PAQN7VwFn23xLYNj8GJmwPOcogveHkaWnOCqiC+anRaNKQwqIBNApM1AuwZKivehTKTPmmrjUUnw==", + "dependencies": { + "Docker.DotNet.Enhanced.Handler.Abstractions": "4.3.3" + } + }, + "Docker.DotNet.Enhanced.NativeHttp": { + "type": "Transitive", + "resolved": "4.3.3", + "contentHash": "iNzK+jRFeEMobSA7l/h4ARwCKOOefOWtVN5/RB0ft6/6H6IQXvVUuOgGyZAjYLBT7TsyClRYno2B904f3dtBuQ==", + "dependencies": { + "Docker.DotNet.Enhanced.Handler.Abstractions": "4.3.3" + } + }, + "Docker.DotNet.Enhanced.NPipe": { + "type": "Transitive", + "resolved": "4.3.3", + "contentHash": "ZTLYufuEfY0e6qLOgeH9QgXx2KYuoABRVaY5A8rsggyLgYqbDj9rCRfVAhHPCUv83S7pVxDHy+Tvm/BnxjWVpg==", + "dependencies": { + "Docker.DotNet.Enhanced.Handler.Abstractions": "4.3.3" + } + }, + "Docker.DotNet.Enhanced.Unix": { + "type": "Transitive", + "resolved": "4.3.3", + "contentHash": "ypo8qNbmvHw1t9VfpRTMogCw2vht6VjkXzlGYUUeP2H2bf83USURdla1maW1njn2oq2rfLUFOGMfmt+A37QU2w==", + "dependencies": { + "Docker.DotNet.Enhanced.Handler.Abstractions": "4.3.3" + } + }, + "Docker.DotNet.Enhanced.X509": { + "type": "Transitive", + "resolved": "4.3.3", + "contentHash": "oBDibWezEv4hgj3RIQxI3DVcxkNV1MdrD0d/jhjUu+h3DL+qc0wlkQva15kkwMatXmC/hWp1VP0DMoFXe+BmEw==", + "dependencies": { + "Docker.DotNet.Enhanced.Handler.Abstractions": "4.3.3" + } + }, "EmptyFiles": { "type": "Transitive", "resolved": "4.4.0", "contentHash": "gwJEfIGS7FhykvtZoscwXj/XwW+mJY6UbAZk+qtLKFUGWC95kfKXnj8VkxsZQnWBxJemM/q664rGLN5nf+OHZw==" }, + "FastExpressionCompiler": { + "type": "Transitive", + "resolved": "5.4.1", + "contentHash": "nqMykMspK5cQd35Y8ulQzAujxCcCwZVUne32pC5xNpXqrbPCuKOPMWkKHJ3LveAZPm6dsVvump0TJ1SZ9RzfTQ==" + }, + "FSharp.Core": { + "type": "Transitive", + "resolved": "5.0.2", + "contentHash": "DpcajqENgb3VXaHw1FKfVS+TWwEzck1PCajqLwBAVrtd1lfxd7T8JISVZBdV1mX9+2g48+tIgpNaVJWObdMrBw==" + }, + "Humanizer.Core": { + "type": "Transitive", + "resolved": "2.14.1", + "contentHash": "lQKvtaTDOXnoVJ20ibTuSIOf2i0uO0MPbDhd1jm238I+U/2ZnRENj0cktKZhtchBMtCUSRQ5v4xBCUbKNmyVMw==" + }, + "IdentityModel": { + "type": "Transitive", + "resolved": "6.2.0", + "contentHash": "4AXZ6Tp+DNwrSSeBziiX/231i8ZpD77A9nEMyc68gLSCWG0kgWsIBeFquYcBebiIPkfB7GEXzCYuuLeR1QZJIQ==" + }, + "ImTools": { + "type": "Transitive", + "resolved": "4.0.0", + "contentHash": "dms0JfLKC9AQbQX/EdpRjn59EjEvaCxIgv1z9YxbEQb5SiOVoo7vlIKdEySeEwUkWhN05rZnNpUpG+aw5VqPVQ==" + }, + "JasperFx": { + "type": "Transitive", + "resolved": "2.100.1", + "contentHash": "w/+2y30g2dcqWLz4666RtxSRQEMCieQprOZAoaJoFUKfC3GPehbYElzgNbqzZomKkcw7w70mgyg1QoiYy8SaAQ==", + "dependencies": { + "FastExpressionCompiler": "5.4.1", + "ImTools": "4.0.0", + "Microsoft.Bcl.TimeProvider": "10.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0", + "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "10.0.0", + "Microsoft.Extensions.Hosting": "10.0.0", + "Microsoft.Extensions.ObjectPool": "10.0.0", + "Polly.Core": "8.6.5", + "Spectre.Console": "0.55.0", + "System.Linq.Dynamic.Core": "1.7.4" + } + }, + "JasperFx.Events": { + "type": "Transitive", + "resolved": "2.100.1", + "contentHash": "b0N1bnZmRqlIOKsct6dIqN5AqR7K1fpviFQpt+Pq/bptVLq9ev16bAnb6KvX5PQ7N++dXOBvV2X4yRUK7tW3Rw==", + "dependencies": { + "JasperFx": "2.100.1" + } + }, + "JasperFx.RuntimeCompiler": { + "type": "Transitive", + "resolved": "5.1.0", + "contentHash": "L1pDbSJIEeATXeRYXJ9zULKRMFo7s+zGMgrNb8Gax6X2IyeQjOa6aQbDOzPobkbAGYTwyWDfqEjwjlWU6/e2Mw==", + "dependencies": { + "JasperFx": "2.100.0", + "Microsoft.CodeAnalysis": "5.0.0", + "Microsoft.CodeAnalysis.CSharp": "5.0.0", + "Microsoft.CodeAnalysis.Scripting": "5.0.0", + "Microsoft.Extensions.Logging.Abstractions": "10.0.0" + } + }, + "JasperFx.SourceGenerator": { + "type": "Transitive", + "resolved": "2.100.1", + "contentHash": "m8k2mdJfJcQ+Xvbtkh/oxf/fFmC6lNfyBSbb3SPN5bqO4cxEL6S6P6MVMAwoYjHcnlN1AgzjzgTlgznFPG3IPw==" + }, "Microsoft.ApplicationInsights": { "type": "Transitive", "resolved": "2.23.0", "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" }, + "Microsoft.AspNetCore.Authentication.JwtBearer": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "DeE+Bq2OqB3FikFkZk+7gFBeLOQhkSolejLrbi+a9zpfvXtW1Ff6Nd6DIvHXIm+pc4aM4+52vDy3jnuau0qoUQ==", + "dependencies": { + "Microsoft.IdentityModel.Protocols.OpenIdConnect": "8.19.2" + } + }, + "Microsoft.AspNetCore.Authentication.OpenIdConnect": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "UfkKr9EP+LBgnFfxwkfnZzta7XkalCroZWoxg2yW9dt8iPXO7bJYpcmyFIeM+FLcAlOKZeduP93XhuCcfWaYIQ==", + "dependencies": { + "Microsoft.IdentityModel.Protocols.OpenIdConnect": "8.19.2" + } + }, + "Microsoft.AspNetCore.TestHost": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "u4AX1M5Uzmw7V3NCdJJO4ITwH0DDDufyzmVlksE4QguVd23Co8adaREMp2VahlRB5f/rmtaFYVJIA1iIFnchmQ==" + }, "Microsoft.Bcl.AsyncInterfaces": { "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg==" + "resolved": "9.0.0", + "contentHash": "owmu2Cr3IQ8yQiBleBHlGk8dSQ12oaF2e7TpzwJKEl4m84kkZJjEY1n33L67Y3zM5jPOjmmbdHjbfiL0RqcMRQ==" + }, + "Microsoft.Bcl.Cryptography": { + "type": "Transitive", + "resolved": "10.0.12", + "contentHash": "gRMy9aW3sAZxKGQwfIh5i/sB7gqCLnhRowjyuCYnZEqM3LyZ+SUi9MlMc4pq3a+ddUflo86yp7vJ9lOy3u0xBw==" + }, + "Microsoft.Bcl.TimeProvider": { + "type": "Transitive", + "resolved": "10.0.0", + "contentHash": "bUubrBD6tRJE3V1kvRloYc6NymH3R5oFKjAS9e0ELNx6u0ZR+zjps9dDQyjgqN/rArzl7f+21KGszj3YRN7F2Q==" + }, + "Microsoft.CodeAnalysis": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "X7vItpZDkGm4NS2wp4P1S07Z1e61LaBWDW5tPXE1c6z5/x9KbF2RymhAPoYg7Qoiyk7odEZ6EjBEJ47p3dBpYQ==", + "dependencies": { + "Humanizer.Core": "2.14.1", + "Microsoft.Bcl.AsyncInterfaces": "9.0.0", + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.CSharp.Workspaces": "[5.0.0]", + "Microsoft.CodeAnalysis.VisualBasic.Workspaces": "[5.0.0]", + "System.Composition": "9.0.0" + } + }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "Transitive", + "resolved": "3.11.0", + "contentHash": "v/EW3UE8/lbEYHoC2Qq7AR/DnmvpgdtAMndfQNmpuIMx/Mto8L5JnuCfdBYtgvalQOtfNCnxFejxuRrryvUTsg==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "ZXRAdvH6GiDeHRyd3q/km8Z44RoM6FBWHd+gen/la81mVnAdHTEsEkO5J0TCNXBymAcx5UYKt5TvgKBhaLJEow==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.11.0" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "5DSyJ9bk+ATuDy7fp2Zt0mJStDVKbBoiz1DyfAwSa+k4H4IwykAUcV3URelw5b8/iVbfSaOwkwmPUZH6opZKCw==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.Common": "[5.0.0]" + } + }, + "Microsoft.CodeAnalysis.CSharp.Scripting": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "1sGloRYbG3743ut/+vuXy9/WaRQTm7mDtp71rBaVSmKpFntvo5Hcro1ubg6/3SeeLtiFYJl7V3Dk0Fo3CGlnHA==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.CSharp": "[5.0.0]", + "Microsoft.CodeAnalysis.Common": "[5.0.0]", + "Microsoft.CodeAnalysis.Scripting.Common": "[5.0.0]" + } + }, + "Microsoft.CodeAnalysis.CSharp.Workspaces": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "Al/Q8B+yO8odSqGVpSvrShMFDvlQdIBU//F3E6Rb0YdiLSALE9wh/pvozPNnfmh5HDnvU+mkmSjpz4hQO++jaA==", + "dependencies": { + "Humanizer.Core": "2.14.1", + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.CSharp": "[5.0.0]", + "Microsoft.CodeAnalysis.Common": "[5.0.0]", + "Microsoft.CodeAnalysis.Workspaces.Common": "[5.0.0]", + "System.Composition": "9.0.0" + } + }, + "Microsoft.CodeAnalysis.Scripting": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "/KgZdm6kRTrR/O2jqXxU5GWREYhtVmqcNWczyPt8hsQkFGFK/C6CrLWfG44FCUn0aPHGDRBHYjXlGosQ/H8oXw==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.CSharp.Scripting": "[5.0.0]" + } + }, + "Microsoft.CodeAnalysis.Scripting.Common": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "XTulByMNxqXGCgMeODUoG2h4oK4/nLv1BcawRVcjv+UZHMpoaymtdaq3cJqlNrEvYEcbU48g5swJ3RhY1m3fBg==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.Common": "[5.0.0]" + } + }, + "Microsoft.CodeAnalysis.VisualBasic": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "sUBWvHs2HgHGA+b716dgjS7JiXGen5ntyohAurPLR1ZiZzFp3FlnVA7GrMTqVGdVJTVqiC3c4K8k1bk0gj6IPg==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.Common": "[5.0.0]" + } + }, + "Microsoft.CodeAnalysis.VisualBasic.Workspaces": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "Nom4UuZVEZGaV6Qa+joJR/BawXZMtflvQJFKc0SaUc3LrZr/8LmRY5cn8mbvLOWIVfwWkQz+cVE6eQKu9qa65g==", + "dependencies": { + "Humanizer.Core": "2.14.1", + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.Common": "[5.0.0]", + "Microsoft.CodeAnalysis.VisualBasic": "[5.0.0]", + "Microsoft.CodeAnalysis.Workspaces.Common": "[5.0.0]", + "System.Composition": "9.0.0" + } + }, + "Microsoft.CodeAnalysis.Workspaces.Common": { + "type": "Transitive", + "resolved": "5.0.0", + "contentHash": "ZbUmIvT6lqTNKiv06Jl5wf0MTMi1vQ1oH7ou4CLcs2C/no/L7EhP3T8y3XXvn9VbqMcJaJnEsNA1jwYUMgc5jg==", + "dependencies": { + "Humanizer.Core": "2.14.1", + "Microsoft.CodeAnalysis.Analyzers": "3.11.0", + "Microsoft.CodeAnalysis.Common": "[5.0.0]", + "System.Composition": "9.0.0" + } }, "Microsoft.Extensions.AI.Abstractions": { "type": "Transitive", "resolved": "10.11.0", "contentHash": "h4DX/TdJU4fk1GGaf19n6Kujkj6VXbGeL4UEOsQ8+ZJC5fVApPauokCtvBP684BYbczUYZQNfo1mbmyHG4WVSg==" }, + "Microsoft.Extensions.AmbientMetadata.Application": { + "type": "Transitive", + "resolved": "10.11.0", + "contentHash": "aMCm7C6CexZT8W/p8zRp4BoxSnqRs3MmkBF7FvPIXC92b7vqs2SL0J+mVJi5W2Mk9Vb4ZRFWe9sdzFew6zUl1w==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.13", + "Microsoft.Extensions.Hosting.Abstractions": "10.0.13", + "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.13" + } + }, "Microsoft.Extensions.Caching.Abstractions": { "type": "Transitive", "resolved": "10.0.13", @@ -58,6 +378,36 @@ "Microsoft.Extensions.Primitives": "10.0.13" } }, + "Microsoft.Extensions.Caching.Memory": { + "type": "Transitive", + "resolved": "10.0.0", + "contentHash": "krK19MKp0BNiR9rpBDW7PKSrTMLVlifS9am3CVc4O1Jq6GWz0o4F+sw5OSL4L3mVd56W8l6JRgghUa2KB51vOw==", + "dependencies": { + "Microsoft.Extensions.Caching.Abstractions": "10.0.0", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0", + "Microsoft.Extensions.Logging.Abstractions": "10.0.0", + "Microsoft.Extensions.Options": "10.0.0", + "Microsoft.Extensions.Primitives": "10.0.0" + } + }, + "Microsoft.Extensions.Compliance.Abstractions": { + "type": "Transitive", + "resolved": "10.11.0", + "contentHash": "2mjAb3Sm5k6uNeI+IyXpggYMpfdDDGgZSwUm9QQsm5QgZboJWbm2eU+6wNMrlfFEao11yq6JS1zXI7SVQQ0NuQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.13", + "Microsoft.Extensions.ObjectPool": "10.0.13" + } + }, + "Microsoft.Extensions.Configuration": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "UcnvaEaMvRckDDhyqY1OZkFwBqpZArkHFKB6dWaQWT9XTuNttNNX8Cqsb/Sic2LfJxsMLJUXnYrxY3iX5LN9pQ==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14", + "Microsoft.Extensions.Primitives": "10.0.14" + } + }, "Microsoft.Extensions.Configuration.Abstractions": { "type": "Transitive", "resolved": "10.0.14", @@ -66,49 +416,387 @@ "Microsoft.Extensions.Primitives": "10.0.14" } }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { + "Microsoft.Extensions.Configuration.Binder": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "brDb5kgle2iY2lWHgeV/KOqnBEpVnlMFigGJ/WW7KP9Nj6C/t53f/h5boYyVXB0bEhgpL+ctbewDJMI+zAMj1w==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.14", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14" + } + }, + "Microsoft.Extensions.Configuration.CommandLine": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "/9IqkBeB7mE1enbN4Cfeu4HFPU9uR1JSJh2qwXfwr7SYBxETkTKRht/LoPfajmmlh+BJlH3jm79CLhQPFb9ovw==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.14", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14" + } + }, + "Microsoft.Extensions.Configuration.EnvironmentVariables": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "jB0UiYjpnneoBH1ZeXPlHYt4zUme6SZlnstL6gsH/0O/d5rOuN5lSIlOIfxXzapl8tAi7QmYOEogP09g/wcHzA==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.14", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14" + } + }, + "Microsoft.Extensions.Configuration.FileExtensions": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "NBIfm8vWNi3UJ9OI9thvREJeV6KzEdPjQ4ONdH+yPWutGBpVnwLbXiEqdEFaGAFYpAluGCfyCwKFgH9pd2scfw==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.14", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.14", + "Microsoft.Extensions.FileProviders.Physical": "10.0.14", + "Microsoft.Extensions.Primitives": "10.0.14" + } + }, + "Microsoft.Extensions.Configuration.Json": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "4Tn8eNg85x+ICDN4OLC7Dl/xvZNREZIf7VSOAdT4Q4KYf5Ip1zAk+0BAx8BsRTomgEpCYV4kKsNNnP/ZXUbQkw==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.14", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14", + "Microsoft.Extensions.Configuration.FileExtensions": "10.0.14", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.14" + } + }, + "Microsoft.Extensions.Configuration.UserSecrets": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "z+dvl9uQnNzvq6Xco+UQyeujpP/BHs+ahHLPCBMxR5GW6M4JcsN1tupEgn5uWgR1fGCfmxS4QJEMt6eyizXGUA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14", + "Microsoft.Extensions.Configuration.Json": "10.0.14", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.14", + "Microsoft.Extensions.FileProviders.Physical": "10.0.14" + } + }, + "Microsoft.Extensions.DependencyInjection": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "2LzcuVjemeXR+WdY9wGIr8iGb7fYsDAit+IScxXX2XJnX0b++mWcE/WO6fEGIqhdMfSQM2ZS5JGMHYZix7YXZg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14" + } + }, + "Microsoft.Extensions.DependencyInjection.Abstractions": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "QtpQzuSZVyTPCuHW058yCs9Nj0394uUkNyFHS813nOmK9UgUdBdaprJ5PPsBgsQIpxADTsTkbaMMonykem6qdw==" + }, + "Microsoft.Extensions.DependencyInjection.AutoActivation": { + "type": "Transitive", + "resolved": "10.11.0", + "contentHash": "h/sovspxVmT2DTIbWORMG0Gi3zVcPQzNl3kbwtpo0LoUXYbe2+66wQqZYwaF2ZWKN8HDdHv5yoc7d0DbDBBlnA==", + "dependencies": { + "Microsoft.Extensions.Hosting.Abstractions": "10.0.13" + } + }, + "Microsoft.Extensions.DependencyModel": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "N8OcqM0370wSXMJ3ZxO66rSElHrIgxvpfUn0vV7zRj7NvKo0nfwgEoTmC3Yz3860o60IaQ4KIPyeLIGX9EeNWA==" + }, + "Microsoft.Extensions.Diagnostics": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "80VqW8eKxQaxBOLDNpLUdxOlxzWn/jqBSxNBCfD8GCjcshNDpFvUgKh8uvvZwvkfBbwmNPWPWHyy9F+RLd1dlQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.14", + "Microsoft.Extensions.Diagnostics.Abstractions": "10.0.14", + "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.14" + } + }, + "Microsoft.Extensions.Diagnostics.Abstractions": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "vm+PPso6vOwGeX52MdOPh6z/R6KHgxQUwqq7k7Jc9jhy2JOxO2KB4xfoJQBBp2Ni8M4zKgJ4r2a1dgrYG7+MKw==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", + "Microsoft.Extensions.Options": "10.0.14" + } + }, + "Microsoft.Extensions.Diagnostics.ExceptionSummarization": { + "type": "Transitive", + "resolved": "10.11.0", + "contentHash": "Dp/FaAPo3U9h3HsWT1dcdRRV//rm+MQF5iKpY/WxL5swwV+wZNE5eyJZ0kgy9Upl/kHz4ejpiLMloxDIuJaoJQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.13" + } + }, + "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "Rz5jWujGFSbOL7lBrw5gHegramz+hFpXb2lWX0amGRUFZFkxbCtgQisy05nqm1KehrZJJInB8ahLGbdOl/cQsA==" + }, + "Microsoft.Extensions.Features": { + "type": "Transitive", + "resolved": "10.0.13", + "contentHash": "7xLogOKNBYYWbUUEMOPfuirfcYG8iBNQ4TOc3aUzJpiRD7tyQqzYWhDPXAk2kOuJTd7ImcGtdT1HEQTC9VljuQ==" + }, + "Microsoft.Extensions.FileProviders.Abstractions": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "rAqf2Em2ZjLqNbcLJlboQnXNyJP604F960TsCKNiP00Ur6ExIc1mcwmNb8L2eTRT8RC8UKx/GjecoWcW2Sj7bw==", + "dependencies": { + "Microsoft.Extensions.Primitives": "10.0.14" + } + }, + "Microsoft.Extensions.FileProviders.Physical": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "dcp6eCIk6ZpE3CTNmIna0ifgxsPel/MtOc23/Y/AJlD9SZZr7bhlKK2DAXYlrz81yMkMi6el/LHHUFKCZ3ufuQ==", + "dependencies": { + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.14", + "Microsoft.Extensions.FileSystemGlobbing": "10.0.14", + "Microsoft.Extensions.Primitives": "10.0.14" + } + }, + "Microsoft.Extensions.FileSystemGlobbing": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "xt6c/PWLL6+CiBiZA3PWRSfkwcPh+HCwiOLrgSUkhzBT7lrT/+QpIKPeuCQyDPspwOuG1q0cbJhuiGpRjr4UNQ==" + }, + "Microsoft.Extensions.Http": { + "type": "Transitive", + "resolved": "10.0.13", + "contentHash": "2SuPNVERI5WMYOYMnc6l6OZcI1bN6DEwQcKokDPcf5FiukN7seLvhBTJgqf/Kb4mqQlwPE9idUdt0TaETCre7w==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.13", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.13", + "Microsoft.Extensions.Diagnostics": "10.0.13", + "Microsoft.Extensions.Logging": "10.0.13", + "Microsoft.Extensions.Logging.Abstractions": "10.0.13", + "Microsoft.Extensions.Options": "10.0.13" + } + }, + "Microsoft.Extensions.Http.Diagnostics": { + "type": "Transitive", + "resolved": "10.11.0", + "contentHash": "iFcxcuMF/21LO+tDqDyzYVvokJUH03cNalmOJhmjyQSMV3dR4JAgcUBTV1iVH/yruC8wG2RNjvW0xcUgYqmrGg==", + "dependencies": { + "Microsoft.Extensions.Http": "10.0.13", + "Microsoft.Extensions.Telemetry": "10.11.0" + } + }, + "Microsoft.Extensions.Logging": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "O2fXL6JmtkFwkigxS8fPTQpLXxGDjgZco5D+h88s++Cl0bDCs023PVkpNoifciJ+f30I82jnp8tpwF0wCLdFtA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection": "10.0.14", + "Microsoft.Extensions.Logging.Abstractions": "10.0.14", + "Microsoft.Extensions.Options": "10.0.14" + } + }, + "Microsoft.Extensions.Logging.Abstractions": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "SwcbEBtkECq3D2oywvHkm46fyrX9Dd2JPWphDnHUc2+cUWR1Mdo41atAjh/9iZjgQxuvbKfZKXqostT/LZfefA==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14" + } + }, + "Microsoft.Extensions.Logging.Configuration": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "CfFSNbVSXSl8UTH453c0HoY5owcpaY1PMh1xsB+3NWcEq6WUSPHRotydbnMJtmw7Kybp6cTba8e+/uaJI52ANw==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.14", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14", + "Microsoft.Extensions.Configuration.Binder": "10.0.14", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", + "Microsoft.Extensions.Logging": "10.0.14", + "Microsoft.Extensions.Logging.Abstractions": "10.0.14", + "Microsoft.Extensions.Options": "10.0.14", + "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.14" + } + }, + "Microsoft.Extensions.Logging.Console": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "8Qx57p3sUAajSZHLQf8eihZqMtSIeI4fZ1JVpL4fvg4QqSbbgJkN0X0owX1cVJJRW2Xw4uqtVv9F7LgdXOBQHQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", + "Microsoft.Extensions.Logging": "10.0.14", + "Microsoft.Extensions.Logging.Abstractions": "10.0.14", + "Microsoft.Extensions.Logging.Configuration": "10.0.14", + "Microsoft.Extensions.Options": "10.0.14" + } + }, + "Microsoft.Extensions.Logging.Debug": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "8e79uonXzgIsZbdgc5pa2Ybk5W+vUbd+gfGS50E+BW9ApRv9s0qL1DTyqLv7VQEPxTHS/l8Y0AtS7K8do+TczQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", + "Microsoft.Extensions.Logging": "10.0.14", + "Microsoft.Extensions.Logging.Abstractions": "10.0.14" + } + }, + "Microsoft.Extensions.Logging.EventLog": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "4HbWayQiJdw0lYthC45rElah2mJJeSlHDu3rcIrinGe95JdOt6I/vWQTNUFXiujIsHv3Z8MyA79ZC5P1Ww+jNg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", + "Microsoft.Extensions.Logging": "10.0.14", + "Microsoft.Extensions.Logging.Abstractions": "10.0.14", + "Microsoft.Extensions.Options": "10.0.14", + "System.Diagnostics.EventLog": "10.0.14" + } + }, + "Microsoft.Extensions.Logging.EventSource": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "Q06Q90D3qnrsKtf1QlaMELCED3ZdMV5SGIRIERUQTTSCoqTNKSitx3KMRgLdxBeqI5ZcbOu5InOu6xQ6o6zmUg==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", + "Microsoft.Extensions.Logging": "10.0.14", + "Microsoft.Extensions.Logging.Abstractions": "10.0.14", + "Microsoft.Extensions.Options": "10.0.14", + "Microsoft.Extensions.Primitives": "10.0.14" + } + }, + "Microsoft.Extensions.ObjectPool": { + "type": "Transitive", + "resolved": "10.0.13", + "contentHash": "NX3bhcc0WitPKAVc9Zfi8jeEPClhfEmobUJM4a4bkWhJcBt5IWg6lCrItUoFy4whLjU+atXktURYCweQlR7wfg==" + }, + "Microsoft.Extensions.Options": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "EeN/33S418m9oWEaZY4N5T+BNxtOqNTIFoFbIgBKwylh4OJPKIWFAzbIhpTdNbwUs26MhkmbLCAbdY+YCJ1dIQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", + "Microsoft.Extensions.Primitives": "10.0.14" + } + }, + "Microsoft.Extensions.Options.ConfigurationExtensions": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "4wcIU0rE04ejEfCwHTftu9O8fgH6CRYCe+tseRapikUBn1Kic3QdO7ku22SwFyLrzdWGYPUZMEgv57ZYuuc5gA==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14", + "Microsoft.Extensions.Configuration.Binder": "10.0.14", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", + "Microsoft.Extensions.Options": "10.0.14", + "Microsoft.Extensions.Primitives": "10.0.14" + } + }, + "Microsoft.Extensions.Primitives": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "1bbZqqCJTPba3inTADExbp/9PsGVyvGOX3zr6tFr7ySCgVkX9Lpw7BV0TizktNItd3SsbUu1sQfSAYm1GZMoNw==" + }, + "Microsoft.Extensions.Resilience": { + "type": "Transitive", + "resolved": "10.11.0", + "contentHash": "GbN7R2BOoZf3F7aK02nz9kWf6ttbvVzpw1orGG30VmrKTmRV6pasQOCfF2fjKXyHIMC/lAiBEYHCKjgf0OiGvQ==", + "dependencies": { + "Microsoft.Extensions.Diagnostics": "10.0.13", + "Microsoft.Extensions.Diagnostics.ExceptionSummarization": "10.11.0", + "Microsoft.Extensions.Options.ConfigurationExtensions": "10.0.13", + "Microsoft.Extensions.Telemetry.Abstractions": "10.11.0", + "Polly.Extensions": "8.4.2", + "Polly.RateLimiting": "8.4.2" + } + }, + "Microsoft.Extensions.ServiceDiscovery.Abstractions": { + "type": "Transitive", + "resolved": "10.11.0", + "contentHash": "QzST85xtGR86sXg9kI8f4/+ziBo/B1JC93IEoMmy2g03vaxZZuxmmPrrWX6QeL4Knb1IzouXLyXWppx77tUPYg==", + "dependencies": { + "Microsoft.Extensions.Configuration.Abstractions": "10.0.13", + "Microsoft.Extensions.Configuration.Binder": "10.0.13", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.13", + "Microsoft.Extensions.Features": "10.0.13", + "Microsoft.Extensions.Logging.Abstractions": "10.0.13", + "Microsoft.Extensions.Options": "10.0.13", + "Microsoft.Extensions.Primitives": "10.0.13" + } + }, + "Microsoft.Extensions.Telemetry": { + "type": "Transitive", + "resolved": "10.11.0", + "contentHash": "2meCfABvkLPtEBBwGzItIGnhrex1AEn2N+dHvxB5UoozeX/xTtBuUz5BRdjNI5oNgd5T31kC69WWw3BHDc9iZA==", + "dependencies": { + "Microsoft.Extensions.AmbientMetadata.Application": "10.11.0", + "Microsoft.Extensions.DependencyInjection.AutoActivation": "10.11.0", + "Microsoft.Extensions.Logging.Configuration": "10.0.13", + "Microsoft.Extensions.ObjectPool": "10.0.13", + "Microsoft.Extensions.Telemetry.Abstractions": "10.11.0" + } + }, + "Microsoft.Extensions.Telemetry.Abstractions": { + "type": "Transitive", + "resolved": "10.11.0", + "contentHash": "FzcHRan/C2g5X5KD0kPlL4tTROFRpM8sqcXfOIi6FGLsw/d2yoOYMbLJ5hyb8N5QgOVW7e1TdwEN4zVUfcwfdw==", + "dependencies": { + "Microsoft.Extensions.Compliance.Abstractions": "10.11.0", + "Microsoft.Extensions.Logging.Abstractions": "10.0.13", + "Microsoft.Extensions.ObjectPool": "10.0.13", + "Microsoft.Extensions.Options": "10.0.13" + } + }, + "Microsoft.IdentityModel.Abstractions": { + "type": "Transitive", + "resolved": "8.19.2", + "contentHash": "HJbo/lnSfNHUfphPRT910poQc4T2/9+8svFLvzuaYHGAOJ2Tu+oEDqpX0BVP3BJ4OuUM1kylEKyaiX2fCAK3Cw==" + }, + "Microsoft.IdentityModel.JsonWebTokens": { "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "QtpQzuSZVyTPCuHW058yCs9Nj0394uUkNyFHS813nOmK9UgUdBdaprJ5PPsBgsQIpxADTsTkbaMMonykem6qdw==" + "resolved": "8.19.2", + "contentHash": "ui3fuBT4fs8kdKfBthI4NzLYIBIneEVS8UrL1JVBzAn80UiKmngBBi0BEByE7n/9c+EElcfFlCMFFTqpkBSLNA==", + "dependencies": { + "Microsoft.IdentityModel.Tokens": "8.19.2" + } }, - "Microsoft.Extensions.Diagnostics.Abstractions": { + "Microsoft.IdentityModel.Logging": { "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "vm+PPso6vOwGeX52MdOPh6z/R6KHgxQUwqq7k7Jc9jhy2JOxO2KB4xfoJQBBp2Ni8M4zKgJ4r2a1dgrYG7+MKw==", + "resolved": "8.19.2", + "contentHash": "r5YLDIxGOnkVJHrqXv/iD1FM1CgGrQOdriXuvuWvTPmKbnGANhEysq9XKmN6IHjf2a+9bAGEpnoRBsAQlvJU5w==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", - "Microsoft.Extensions.Options": "10.0.14" + "Microsoft.IdentityModel.Abstractions": "8.19.2" } }, - "Microsoft.Extensions.FileProviders.Abstractions": { + "Microsoft.IdentityModel.Protocols": { "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "rAqf2Em2ZjLqNbcLJlboQnXNyJP604F960TsCKNiP00Ur6ExIc1mcwmNb8L2eTRT8RC8UKx/GjecoWcW2Sj7bw==", + "resolved": "8.19.2", + "contentHash": "sGxSsSrZXNmca6D+jHH2rVRyo2nNRd/g4H9CFbPmLLq0xgoH1U0orLWE5minfijw7+zq49tBs7txenbfAErRoQ==", "dependencies": { - "Microsoft.Extensions.Primitives": "10.0.14" + "Microsoft.IdentityModel.Tokens": "8.19.2" } }, - "Microsoft.Extensions.Logging.Abstractions": { + "Microsoft.IdentityModel.Protocols.OpenIdConnect": { "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "SwcbEBtkECq3D2oywvHkm46fyrX9Dd2JPWphDnHUc2+cUWR1Mdo41atAjh/9iZjgQxuvbKfZKXqostT/LZfefA==", + "resolved": "8.19.2", + "contentHash": "1XOcyY36cVymzE3qKdzKaUEZ4Pzt7ZpSa14JZoPPK1NLFUkQDs85TCqpV6XDo0YjFXj6nVK00AfOHppjghjhtw==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14" + "Microsoft.IdentityModel.Protocols": "8.19.2", + "System.IdentityModel.Tokens.Jwt": "8.19.2" } }, - "Microsoft.Extensions.Options": { + "Microsoft.IdentityModel.Tokens": { "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "EeN/33S418m9oWEaZY4N5T+BNxtOqNTIFoFbIgBKwylh4OJPKIWFAzbIhpTdNbwUs26MhkmbLCAbdY+YCJ1dIQ==", + "resolved": "8.19.2", + "contentHash": "GtPC1S02uH1gOO4fQ+zRysIicKmEXaYFP8PIkdJYXqMyruYhopre4ozVHp0XiDSA0+GJvOZH9prxCPvgBMg4Ww==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", - "Microsoft.Extensions.Primitives": "10.0.14" + "Microsoft.Bcl.Cryptography": "10.0.2", + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.IdentityModel.Logging": "8.19.2" } }, - "Microsoft.Extensions.Primitives": { + "Microsoft.IO.RecyclableMemoryStream": { "type": "Transitive", - "resolved": "10.0.14", - "contentHash": "1bbZqqCJTPba3inTADExbp/9PsGVyvGOX3zr6tFr7ySCgVkX9Lpw7BV0TizktNItd3SsbUu1sQfSAYm1GZMoNw==" + "resolved": "3.0.1", + "contentHash": "s/s20YTVY9r9TPfTrN5g8zPF1YhwxyqO6PxUkrYTGI2B+OGPe9AdajWZrLhFqXIvqIW23fnUE4+ztrUWNU1+9g==" }, "Microsoft.Testing.Extensions.Telemetry": { "type": "Transitive", @@ -164,11 +852,204 @@ "Microsoft.Extensions.Logging.Abstractions": "10.0.13" } }, + "NetTopologySuite": { + "type": "Transitive", + "resolved": "2.5.0", + "contentHash": "5/+2O2ADomEdUn09mlSigACdqvAf0m/pVPGtIPEPQWnyrVykYY0NlfXLIdkMgi41kvH9kNrPqYaFBTZtHYH7Xw==" + }, + "NetTopologySuite.IO.PostGis": { + "type": "Transitive", + "resolved": "2.1.0", + "contentHash": "3W8XTFz8iP6GQ5jDXK1/LANHiU+988k1kmmuPWNKcJLpmSg6CvFpbTpz+s4+LBzkAp64wHGOldSlkSuzYfrIKA==", + "dependencies": { + "NetTopologySuite": "[2.0.0, 3.0.0-A)" + } + }, + "NewId": { + "type": "Transitive", + "resolved": "4.0.1", + "contentHash": "jegBasNndmG21G3BmT51suFDCIz/sLN81j+IxmkZ4iWoaDi8LygeHiyNnYbXz5OQh9nCRJFIx1+PJrlYi1Gc9Q==" + }, + "Npgsql": { + "type": "Transitive", + "resolved": "9.0.4", + "contentHash": "68BASXH0FAEuL/J4J0eRfYC8/3vzqQTmoW8zDzNf0JgaVxc7LZeEkS6jaG0ib3voFLxY5ZiCwJG+uQM+mzuu0Q==", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "8.0.2" + } + }, + "Npgsql.NetTopologySuite": { + "type": "Transitive", + "resolved": "9.0.4", + "contentHash": "7AwBLPz8EPmgAXveZ55K0Tz/9bNb8j4VI4pkTOQjyHrce8wWfAA9pefm3REidy+Kt2UFiAWef34YVi7sb/kB4A==", + "dependencies": { + "NetTopologySuite": "2.5.0", + "NetTopologySuite.IO.PostGIS": "2.1.0", + "Npgsql": "9.0.4" + } + }, + "OpenTelemetry": { + "type": "Transitive", + "resolved": "1.20.1", + "contentHash": "+XDw3fYbiv1a40aFnDJSQleeuUJciXuhoIA19XmcGhT47Hy/xZRqk8NCjHUDKrg72Ixjthicecp8ygBDNeH/Jw==", + "dependencies": { + "Microsoft.Extensions.Configuration.EnvironmentVariables": "10.0.0", + "Microsoft.Extensions.Diagnostics.Abstractions": "10.0.0", + "Microsoft.Extensions.Logging.Configuration": "10.0.0", + "OpenTelemetry.Api.ProviderBuilderExtensions": "1.20.1" + } + }, + "OpenTelemetry.Api": { + "type": "Transitive", + "resolved": "1.20.1", + "contentHash": "QO9hlwadOdJGR4vDpJyDnl9B62v7epIBSTIHUA4C+bCtrRaB4TWmYSnu3QVOIe7caH8dt7NaHRei6zebESJJyw==" + }, + "OpenTelemetry.Api.ProviderBuilderExtensions": { + "type": "Transitive", + "resolved": "1.20.1", + "contentHash": "eDzDY/jTBqRytkYECmVKF7ZP5sKmCIqv1SSnA5BSWltIIvc3931TOMRyCW1qCGNIgmtldtJhISnsmFNxOCfauQ==", + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0", + "OpenTelemetry.Api": "1.20.1" + } + }, + "Patched.DistributedLock.Core": { + "type": "Transitive", + "resolved": "1.0.11", + "contentHash": "JUDAhM5ca24AxE+3OGFYGQoPszKkEOLX7jykJgglJxam668Cf5aHmB/MOJR7/fWZPWFC0egwQ9S9yQyzrFaECA==" + }, + "Patched.DistributedLock.Postgres": { + "type": "Transitive", + "resolved": "1.3.3", + "contentHash": "dCk328m177iENwX1TpUhoYapIAncPwYbeahz8YPb3IXMalteLl6p2w+cSmhDMptlu9zesjUGBYLmHi4Mu3X5fw==", + "dependencies": { + "Npgsql": "8.0.6", + "Patched.DistributedLock.Core": "[1.0.11, 1.1.0)" + } + }, + "Polly.Core": { + "type": "Transitive", + "resolved": "8.6.5", + "contentHash": "t+sUVrIwvo7UmsgHGgOG9F0GDZSRIm47u2ylH17Gvcv1q5hNEwgD5GoBlFyc0kh/pebmPyrAgvGsR/65ZBaXlg==" + }, + "Polly.Extensions": { + "type": "Transitive", + "resolved": "8.4.2", + "contentHash": "GZ9vRVmR0jV2JtZavt+pGUsQ1O1cuRKG7R7VOZI6ZDy9y6RNPvRvXK1tuS4ffUrv8L0FTea59oEuQzgS0R7zSA==", + "dependencies": { + "Microsoft.Extensions.Logging.Abstractions": "8.0.0", + "Microsoft.Extensions.Options": "8.0.0", + "Polly.Core": "8.4.2" + } + }, + "Polly.RateLimiting": { + "type": "Transitive", + "resolved": "8.4.2", + "contentHash": "ehTImQ/eUyO07VYW2WvwSmU9rRH200SKJ/3jku9rOkyWE0A2JxNFmAVms8dSn49QLSjmjFRRSgfNyOgr/2PSmA==", + "dependencies": { + "Polly.Core": "8.4.2", + "System.Threading.RateLimiting": "8.0.0" + } + }, + "SharpZipLib": { + "type": "Transitive", + "resolved": "1.4.2", + "contentHash": "yjj+3zgz8zgXpiiC3ZdF/iyTBbz2fFvMxZFEBPUcwZjIvXOf37Ylm+K58hqMfIBt5JgU/Z2uoUS67JmTLe973A==" + }, + "Spectre.Console": { + "type": "Transitive", + "resolved": "0.55.0", + "contentHash": "2TVhUHFsDux0Z+y2Hv4bFsOMuON4SuotEEKkMparFkp5Rm259naaaEQrN4Sv6C1cbsiGKPjfkJDGgUp+hZPjTw==", + "dependencies": { + "Spectre.Console.Ansi": "0.55.0" + } + }, + "Spectre.Console.Ansi": { + "type": "Transitive", + "resolved": "0.55.0", + "contentHash": "GIfgOvuF8MpU52bprhwtDEtx0gmVIGOepM8bw0lH/TSMD0rg1Xp+5Y53kPG8rFVdcpbNANlhDQ5mEVVPO3/2Tg==" + }, + "SSH.NET": { + "type": "Transitive", + "resolved": "2026.0.0", + "contentHash": "Yu9dirPq8l3oaat0+OQ7K0nUf5MmYltpia5UGqsApTG4zTPvBC1cxbNnC3NERij26dUST0A3Ef1QdHSn5ArbWQ==", + "dependencies": { + "BouncyCastle.Cryptography": "2.7.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.3" + } + }, "System.CodeDom": { "type": "Transitive", "resolved": "6.0.0", "contentHash": "CPc6tWO1LAer3IzfZufDBRL+UZQcj5uS207NHALQzP84Vp/z6wF0Aa0YZImOQY8iStY0A2zI/e3ihKNPfUm8XA==" }, + "System.Composition": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "3Djj70fFTraOarSKmRnmRy/zm4YurICm+kiCtI0dYRqGJnLX6nJ+G3WYuFJ173cAPax/gh96REcbNiVqcrypFQ==", + "dependencies": { + "System.Composition.AttributedModel": "9.0.0", + "System.Composition.Convention": "9.0.0", + "System.Composition.Hosting": "9.0.0", + "System.Composition.Runtime": "9.0.0", + "System.Composition.TypedParts": "9.0.0" + } + }, + "System.Composition.AttributedModel": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "iri00l/zIX9g4lHMY+Nz0qV1n40+jFYAmgsaiNn16xvt2RDwlqByNG4wgblagnDYxm3YSQQ0jLlC/7Xlk9CzyA==" + }, + "System.Composition.Convention": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "+vuqVP6xpi582XIjJi6OCsIxuoTZfR0M7WWufk3uGDeCl3wGW6KnpylUJ3iiXdPByPE0vR5TjJgR6hDLez4FQg==", + "dependencies": { + "System.Composition.AttributedModel": "9.0.0" + } + }, + "System.Composition.Hosting": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "OFqSeFeJYr7kHxDfaViGM1ymk7d4JxK//VSoNF9Ux0gpqkLsauDZpu89kTHHNdCWfSljbFcvAafGyBoY094btQ==", + "dependencies": { + "System.Composition.Runtime": "9.0.0" + } + }, + "System.Composition.Runtime": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "w1HOlQY1zsOWYussjFGZCEYF2UZXgvoYnS94NIu2CBnAGMbXFAX8PY8c92KwUItPmowal68jnVLBCzdrWLeEKA==" + }, + "System.Composition.TypedParts": { + "type": "Transitive", + "resolved": "9.0.0", + "contentHash": "aRZlojCCGEHDKqh43jaDgaVpYETsgd7Nx4g1zwLKMtv4iTo0627715ajEFNpEEBTgLmvZuv8K0EVxc3sM4NWJA==", + "dependencies": { + "System.Composition.AttributedModel": "9.0.0", + "System.Composition.Hosting": "9.0.0", + "System.Composition.Runtime": "9.0.0" + } + }, + "System.Diagnostics.EventLog": { + "type": "Transitive", + "resolved": "10.0.14", + "contentHash": "O/RzNwWoDzehkLlAG9hR8xooY5L41U7VUaYlcKvE3+FhHohBJqF10oLUzuv0v59VeJ62hv3uw9VoeX12zej7Sg==" + }, + "System.IdentityModel.Tokens.Jwt": { + "type": "Transitive", + "resolved": "8.19.2", + "contentHash": "gqhDC/icByKEutygpr+OFgAmjwTVowyzFjWB8K0q1ww8uFj5a1BQNL+QvijUl9uhq4p8OdDwcAIrjVC+eC9FVA==", + "dependencies": { + "Microsoft.IdentityModel.JsonWebTokens": "8.19.2", + "Microsoft.IdentityModel.Tokens": "8.19.2" + } + }, + "System.Linq.Dynamic.Core": { + "type": "Transitive", + "resolved": "1.7.4", + "contentHash": "2VJGKUdPjA59aqv/ehvBS+oVoFQqqsiVZlbcyDmuwypgy96Ss1/b8U13Yufk0TXtzveMWAPQAfnZzH+bs1r7Vw==" + }, "System.Management": { "type": "Transitive", "resolved": "6.0.1", @@ -182,6 +1063,70 @@ "resolved": "6.0.1", "contentHash": "IQ4NXP/B3Ayzvw0rDQzVTYsCKyy0Jp9KI6aYcK7UnGVlR9+Awz++TIPCQtPYfLJfOpm8ajowMR09V7quD3sEHw==" }, + "System.Threading.RateLimiting": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "7mu9v0QDv66ar3DpGSZHg9NuNcxDaaAcnMULuZlaTpP9+hwXhrxNGsF5GmLkSHxFdb5bBc1TzeujsRgTrPWi+Q==" + }, + "Testcontainers": { + "type": "Transitive", + "resolved": "4.16.0", + "contentHash": "JmMUZk6ZXQovbGQjaMB+YxOR0PbJTdYjOYjRcrm5LrA2dhLVMuCbhVGGunzCGIQfFMUB5Lno2LPOHMMuaGmuIg==", + "dependencies": { + "Docker.DotNet.Enhanced": "4.3.3", + "Docker.DotNet.Enhanced.X509": "4.3.3", + "Microsoft.Extensions.Logging.Abstractions": "8.0.3", + "SSH.NET": "2026.0.0", + "SharpZipLib": "1.4.2" + } + }, + "Weasel.Core": { + "type": "Transitive", + "resolved": "9.49.0", + "contentHash": "MppUhhd4TvosEMyvERSM8krsxjmyoHhIlaob9zLAqbM17pxiOqWtilfCtuJGTjRb4XSpqFNG5iWuXGC83F1eOw==", + "dependencies": { + "JasperFx": "2.100.0" + } + }, + "Weasel.Postgresql": { + "type": "Transitive", + "resolved": "9.49.0", + "contentHash": "CHHlzjsWbnge1HS5T6HX1gbqyZe/0KrYjvHYcqhqSqFUz/Y60fXgAKp6nXWclTdnwFjsx1dO/Moi/ljxWK8qmQ==", + "dependencies": { + "JasperFx.Events": "2.100.0", + "Npgsql": "9.0.4", + "Npgsql.NetTopologySuite": "9.0.4", + "Patched.DistributedLock.Postgres": "1.3.3", + "Weasel.Core": "9.49.0" + } + }, + "Weasel.Storage": { + "type": "Transitive", + "resolved": "9.49.0", + "contentHash": "01SQezcrwFNrJEMmxdcEL1FxfwPxLswQNuV1OwKQVjk25amcqjhgcI2bE5khXKwagwGACtgWkDEPU+WMDStb3A==", + "dependencies": { + "JasperFx.Events": "2.100.0", + "Weasel.Core": "9.49.0" + } + }, + "WolverineFx.Postgresql": { + "type": "Transitive", + "resolved": "6.62.0", + "contentHash": "dJlLhIwcKWfFk04BXU+MT7Co+o1D5WrToLdXbS1nhVSFfY2RYPxyaiitFQrSCFvd56mu+oB6wZsdqi6g/nfgVQ==", + "dependencies": { + "Weasel.Postgresql": "9.49.0", + "WolverineFx.RDBMS": "6.62.0" + } + }, + "WolverineFx.RDBMS": { + "type": "Transitive", + "resolved": "6.62.0", + "contentHash": "RtHmuHImLXXo5P1C1i0UWZPT35M96PKkkSrwcACv/0zBYcisa5lB4tImCa4z0PnPxMu6iE5A8R6M5Ux1VFwaEg==", + "dependencies": { + "Weasel.Core": "9.49.0", + "WolverineFx": "6.62.0" + } + }, "xunit.analyzers": { "type": "Transitive", "resolved": "2.2.0", @@ -242,12 +1187,70 @@ "xunit.v3.runner.common": "[4.0.2]" } }, + "rimbank.api": { + "type": "Project", + "dependencies": { + "RimBank.Core": "[0.1.0-alpha, )", + "RimBank.Problems": "[0.1.0-alpha, )", + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "WolverineFx": "[6.62.0, )" + } + }, + "rimbank.core": { + "type": "Project", + "dependencies": { + "RimBank.Party.PartyReferenceDataDirectory.PublishedLanguage": "[0.1.0-alpha, )", + "RimBank.SharedKernel": "[0.1.0-alpha, )" + } + }, + "rimbank.host": { + "type": "Project", + "dependencies": { + "Aspire.Keycloak.Authentication": "[13.6.4-preview.1.26523.11, )", + "ModelContextProtocol.AspNetCore": "[2.3.1, )", + "RimBank.Api": "[0.1.0-alpha, )", + "RimBank.Mcp": "[0.1.0-alpha, )", + "RimBank.Party.PartyReferenceDataDirectory.Postgresql": "[0.1.0-alpha, )", + "RimBank.Postgresql": "[0.1.0-alpha, )", + "RimBank.Problems": "[0.1.0-alpha, )", + "RimBank.ServiceDefaults": "[0.1.0-alpha, )", + "WolverineFx.RuntimeCompilation": "[6.62.0, )" + } + }, + "rimbank.host.testing": { + "type": "Project", + "dependencies": { + "RimBank.Host": "[0.1.0-alpha, )" + } + }, "rimbank.mcp": { "type": "Project", "dependencies": { "ModelContextProtocol.AspNetCore": "[2.3.1, )", + "RimBank.Core": "[0.1.0-alpha, )", "RimBank.Problems": "[0.1.0-alpha, )", - "RimBank.SharedKernel": "[0.1.0-alpha, )" + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "WolverineFx": "[6.62.0, )" + } + }, + "rimbank.party.partyreferencedatadirectory.postgresql": { + "type": "Project", + "dependencies": { + "RimBank.Core": "[0.1.0-alpha, )", + "RimBank.Postgresql": "[0.1.0-alpha, )" + } + }, + "rimbank.party.partyreferencedatadirectory.publishedlanguage": { + "type": "Project" + }, + "rimbank.postgresql": { + "type": "Project", + "dependencies": { + "Marten": "[9.58.0, )", + "Microsoft.Extensions.Diagnostics.HealthChecks": "[10.0.14, )", + "Microsoft.Extensions.Hosting.Abstractions": "[10.0.14, )", + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "WolverineFx.Marten": "[6.62.0, )" } }, "rimbank.problems": { @@ -256,9 +1259,119 @@ "RimBank.SharedKernel": "[0.1.0-alpha, )" } }, + "rimbank.servicedefaults": { + "type": "Project", + "dependencies": { + "Microsoft.AspNetCore.OpenApi": "[10.0.14, )", + "Microsoft.Extensions.Http.Resilience": "[10.11.0, )", + "Microsoft.Extensions.ServiceDiscovery": "[10.11.0, )", + "OpenTelemetry.Exporter.OpenTelemetryProtocol": "[1.20.1, )", + "OpenTelemetry.Extensions.Hosting": "[1.20.1, )", + "OpenTelemetry.Instrumentation.AspNetCore": "[1.20.1, )", + "OpenTelemetry.Instrumentation.Http": "[1.20.1, )", + "OpenTelemetry.Instrumentation.Runtime": "[1.20.1, )", + "Scalar.AspNetCore": "[2.18.7, )" + } + }, "rimbank.sharedkernel": { "type": "Project" }, + "rimbank.sharedkernel.testing": { + "type": "Project", + "dependencies": { + "FsCheck": "[3.6.0, )", + "RimBank.SharedKernel": "[0.1.0-alpha, )", + "Shouldly": "[4.3.0, )", + "xunit.v3.extensibility.core": "[4.0.2, )" + } + }, + "Aspire.Keycloak.Authentication": { + "type": "CentralTransitive", + "requested": "[13.6.4-preview.1.26523.11, )", + "resolved": "13.6.4-preview.1.26523.11", + "contentHash": "CUTkjUo9JAGqKWw5NuvJbXn1j/EDQV1xkl0p/kIxDr3eh/GNABsDv5/a6wy4pxFZHRr1oiogIkhcRcX7rOW6kA==", + "dependencies": { + "Microsoft.AspNetCore.Authentication.JwtBearer": "10.0.12", + "Microsoft.AspNetCore.Authentication.OpenIdConnect": "10.0.12", + "Microsoft.Bcl.Cryptography": "10.0.12", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.12", + "Microsoft.Extensions.Logging.Abstractions": "10.0.12" + } + }, + "FsCheck": { + "type": "CentralTransitive", + "requested": "[3.6.0, )", + "resolved": "3.6.0", + "contentHash": "XjZ5sWf/QKLqB9aMKG7FvrT/8Ak2fPo0ygRstindBWZWU8P3EcmvYJ5UkX0daIL4+bZeaiD9ThkftGlIx3ZewQ==", + "dependencies": { + "FSharp.Core": "5.0.2" + } + }, + "Marten": { + "type": "CentralTransitive", + "requested": "[9.58.0, )", + "resolved": "9.58.0", + "contentHash": "vSBKMmcvgHXyJrHvddSnJRYT2dGNaQtcQDq9tzpDxbRsoAQTtYH3XK+jo132dkcpZLw8fMQXPGZmZmF9gSKFLQ==", + "dependencies": { + "JasperFx": "2.100.0", + "JasperFx.Events": "2.100.0", + "Microsoft.Extensions.Hosting.Abstractions": "10.0.0", + "Microsoft.IO.RecyclableMemoryStream": "3.0.1", + "Weasel.Postgresql": "9.49.0", + "Weasel.Storage": "9.49.0" + } + }, + "Microsoft.AspNetCore.OpenApi": { + "type": "CentralTransitive", + "requested": "[10.0.14, )", + "resolved": "10.0.14", + "contentHash": "3M6yO4nv8fmvM/1X7DqQcMxw/ptNLBcUzZt19SBEyfZF32gqZuwoPNnYd1xlDnFvQOGOkZDncf7p9E24blcTkQ==", + "dependencies": { + "Microsoft.OpenApi": "[2.12.2, 3.0.0)" + } + }, + "Microsoft.Extensions.Diagnostics.HealthChecks": { + "type": "CentralTransitive", + "requested": "[10.0.14, )", + "resolved": "10.0.14", + "contentHash": "QwCCJ8J80dwDgNk4YZJWjFqq0UEoiNr3E3V7ZQRQLdlgkYS6MmB3gn5rQe2rc8Y815CpCy5DIujcRxYEksJK+g==", + "dependencies": { + "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "10.0.14", + "Microsoft.Extensions.Hosting.Abstractions": "10.0.14", + "Microsoft.Extensions.Logging.Abstractions": "10.0.14", + "Microsoft.Extensions.Options": "10.0.14" + } + }, + "Microsoft.Extensions.Hosting": { + "type": "CentralTransitive", + "requested": "[10.0.14, )", + "resolved": "10.0.14", + "contentHash": "q3f2GLZebtxWG/pDtckPrgIWV22pVmSLSLEkncdmbUz7Z6atwF2wn9ag5cZCc/ndcGe7ffHJom98scauFG+oNQ==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.14", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.14", + "Microsoft.Extensions.Configuration.Binder": "10.0.14", + "Microsoft.Extensions.Configuration.CommandLine": "10.0.14", + "Microsoft.Extensions.Configuration.EnvironmentVariables": "10.0.14", + "Microsoft.Extensions.Configuration.FileExtensions": "10.0.14", + "Microsoft.Extensions.Configuration.Json": "10.0.14", + "Microsoft.Extensions.Configuration.UserSecrets": "10.0.14", + "Microsoft.Extensions.DependencyInjection": "10.0.14", + "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.14", + "Microsoft.Extensions.Diagnostics": "10.0.14", + "Microsoft.Extensions.FileProviders.Abstractions": "10.0.14", + "Microsoft.Extensions.FileProviders.Physical": "10.0.14", + "Microsoft.Extensions.Hosting.Abstractions": "10.0.14", + "Microsoft.Extensions.Logging": "10.0.14", + "Microsoft.Extensions.Logging.Abstractions": "10.0.14", + "Microsoft.Extensions.Logging.Configuration": "10.0.14", + "Microsoft.Extensions.Logging.Console": "10.0.14", + "Microsoft.Extensions.Logging.Debug": "10.0.14", + "Microsoft.Extensions.Logging.EventLog": "10.0.14", + "Microsoft.Extensions.Logging.EventSource": "10.0.14", + "Microsoft.Extensions.Options": "10.0.14" + } + }, "Microsoft.Extensions.Hosting.Abstractions": { "type": "CentralTransitive", "requested": "[10.0.14, )", @@ -272,6 +1385,33 @@ "Microsoft.Extensions.Logging.Abstractions": "10.0.14" } }, + "Microsoft.Extensions.Http.Resilience": { + "type": "CentralTransitive", + "requested": "[10.11.0, )", + "resolved": "10.11.0", + "contentHash": "6/YEoPCcQLzExm4x4FH5c38JffbhkMaTtXsrDmYNozt9KRtdXK3TsDeuKSBZJno+41oIDGBONb2up0zCsuEERw==", + "dependencies": { + "Microsoft.Extensions.Http.Diagnostics": "10.11.0", + "Microsoft.Extensions.ObjectPool": "10.0.13", + "Microsoft.Extensions.Resilience": "10.11.0" + } + }, + "Microsoft.Extensions.ServiceDiscovery": { + "type": "CentralTransitive", + "requested": "[10.11.0, )", + "resolved": "10.11.0", + "contentHash": "l1jvoPCZYEZOE2JZzcnzHLo1BBN/s+Azj8+FX0WRbqHoJY7QVq7cvTHasDWi1pixr0dXxbyC4HKt68Xm2KKpqQ==", + "dependencies": { + "Microsoft.Extensions.Http": "10.0.13", + "Microsoft.Extensions.ServiceDiscovery.Abstractions": "10.11.0" + } + }, + "Microsoft.OpenApi": { + "type": "CentralTransitive", + "requested": "[2.13.0, )", + "resolved": "2.13.0", + "contentHash": "wavlgBYnn7uU/ZGhFHNl0UlDOlwz+6KRduKkqdCCbfxxANaQ1rmBpETVGdwXanAM6twQOxsvI3CBEGF4OScbeQ==" + }, "ModelContextProtocol.AspNetCore": { "type": "CentralTransitive", "requested": "[2.3.1, )", @@ -281,6 +1421,103 @@ "ModelContextProtocol": "[2.3.1]" } }, + "OpenTelemetry.Exporter.OpenTelemetryProtocol": { + "type": "CentralTransitive", + "requested": "[1.20.1, )", + "resolved": "1.20.1", + "contentHash": "IlO8F0Y01ki0N5hJaeFJ5j3MVYJdbyNpDF9g7goU8wA3o8r/+ir9WJNnmte7QlUzM3iSV/aIuev1fqwF1CZOqg==", + "dependencies": { + "OpenTelemetry": "1.20.1" + } + }, + "OpenTelemetry.Extensions.Hosting": { + "type": "CentralTransitive", + "requested": "[1.20.1, )", + "resolved": "1.20.1", + "contentHash": "wnoK07COxyQBR47QwP80SIO4cpD2xeF4PrBDYFXDMnhDLmOP4nN0Szy1wCBLo5UABU1I4xwWRGzZM0bFdCbRog==", + "dependencies": { + "Microsoft.Extensions.Hosting.Abstractions": "10.0.0", + "OpenTelemetry": "1.20.1" + } + }, + "OpenTelemetry.Instrumentation.AspNetCore": { + "type": "CentralTransitive", + "requested": "[1.20.1, )", + "resolved": "1.20.1", + "contentHash": "pDO+Ed5iblMTvSVGcXzoLp8q20XHhXmK0wD/H3PGNHwDFlwZpV+bDWd/Euo6hNB4E0ruqzTFD76Btm+m0uCYNw==", + "dependencies": { + "OpenTelemetry.Api.ProviderBuilderExtensions": "[1.20.1, 2.0.0)" + } + }, + "OpenTelemetry.Instrumentation.Http": { + "type": "CentralTransitive", + "requested": "[1.20.1, )", + "resolved": "1.20.1", + "contentHash": "XJTM6imVztxLraOrzsdlZf5shdH9TVeEWNBxpyepB5e3Gy+KNeQf2hyic398210UxqlPtt4iOkBELtjfIFTzug==", + "dependencies": { + "Microsoft.Extensions.Configuration": "10.0.0", + "Microsoft.Extensions.Options": "10.0.0", + "OpenTelemetry.Api.ProviderBuilderExtensions": "[1.20.1, 2.0.0)" + } + }, + "OpenTelemetry.Instrumentation.Runtime": { + "type": "CentralTransitive", + "requested": "[1.20.1, )", + "resolved": "1.20.1", + "contentHash": "1ngVOV2ZYqFy38g2g+vZ50poeF66GJtinITBDB7TNRP4fmrDxYYyPfs1uGrPHkhJJRV5I7mElPFOctvlatu41w==", + "dependencies": { + "OpenTelemetry.Api": "[1.20.1, 2.0.0)" + } + }, + "Scalar.AspNetCore": { + "type": "CentralTransitive", + "requested": "[2.18.7, )", + "resolved": "2.18.7", + "contentHash": "JrNu0Sm4TVeJ//ptvAS3yRbT0oobfR8qp0ecf3HIS9zX4V7uSABr+VYEyWT7uyXjhN2ZTrZ/cpwKv7zHjlK8Gg==" + }, + "WolverineFx": { + "type": "CentralTransitive", + "requested": "[6.62.0, )", + "resolved": "6.62.0", + "contentHash": "0KashWEcGtbB0ugMpcupHFaeS9iq8vRA+FXAGM7O2hEGJWsMxah5B663Z1TBwHD3LhhODWiuC5mSeU0GR50YGA==", + "dependencies": { + "Cronos": "0.11.0", + "JasperFx": "2.100.1", + "JasperFx.Events": "2.100.1", + "JasperFx.SourceGenerator": "2.100.1", + "Microsoft.Extensions.Caching.Memory": "10.0.0", + "Microsoft.Extensions.Configuration": "10.0.0", + "Microsoft.Extensions.Configuration.Abstractions": "10.0.0", + "Microsoft.Extensions.Configuration.Binder": "10.0.0", + "Microsoft.Extensions.Configuration.Json": "10.0.0", + "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions": "10.0.0", + "Microsoft.Extensions.Hosting": "10.0.0", + "Microsoft.Extensions.Hosting.Abstractions": "10.0.0", + "Microsoft.Extensions.ObjectPool": "10.0.2", + "NewId": "4.0.1" + } + }, + "WolverineFx.Marten": { + "type": "CentralTransitive", + "requested": "[6.62.0, )", + "resolved": "6.62.0", + "contentHash": "eaPfxqsm1VSOuvdWa164qwWoy3acJHhWOUOUCWQEGKdJ28F41fsTzasd1VNzC0Q19w7Y08f94JJ0F7w7nl2kLA==", + "dependencies": { + "Marten": "9.58.0", + "Weasel.Storage": "9.49.0", + "WolverineFx.Postgresql": "6.62.0" + } + }, + "WolverineFx.RuntimeCompilation": { + "type": "CentralTransitive", + "requested": "[6.62.0, )", + "resolved": "6.62.0", + "contentHash": "EQBoUADd7T6ORo/8zltUYt35j0dgKCNUoeGHw2bvZWoNgN/bNQ2HF/4wnjnLPZKLKqbDI72t2WnFZgS47Ugvyw==", + "dependencies": { + "JasperFx.RuntimeCompiler": "5.1.0", + "WolverineFx": "6.62.0" + } + }, "xunit.v3.extensibility.core": { "type": "CentralTransitive", "requested": "[4.0.2, )",