1559975518
SharedKernel: Autonomy dial enum; IModelClient (ModelRequest/ModelCompletion);
IApiConfigResolver (+ ApiConfigSummary/ResolvedApiConfig) — server-side, decrypted.
Integrations module:
- ApiConfig entity (org-scoped) + IntegrationsDbContext (schema "integrations") +
InitialIntegrations migration; the key is AES-256-GCM encrypted at rest (key derived from
Encryption:MasterKey) and never returned to a client.
- Model adapters: StubModelClient (no-network, provider "stub"/"echo"), an OpenAI-compatible
HTTP adapter, and a ModelClientRouter; ApiConfigResolver decrypts server-side only.
- Endpoints: POST/GET/DELETE /api/integrations/api-configs and POST .../{id}/test. Create/
test/delete require ManageApiKeys (owner); listing requires ConfigureAgents (assign-only,
no key). Dev master key in appsettings; override Encryption__MasterKey in prod.
Verified: build green; ArchitectureTests 8/8 (Integrations references only SharedKernel);
IntegrationTests 26/26 incl. a BYOK flow — key never appears in any response, the connection
test succeeds (stub), and a Member is 403'd from create + list.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
50 lines
1.7 KiB
INI
50 lines
1.7 KiB
INI
root = true
|
|
|
|
[*]
|
|
charset = utf-8
|
|
end_of_line = lf
|
|
insert_final_newline = true
|
|
trim_trailing_whitespace = true
|
|
indent_style = space
|
|
indent_size = 4
|
|
|
|
[*.{json,js,jsx,ts,tsx,yml,yaml,css,html}]
|
|
indent_size = 2
|
|
|
|
[*.{csproj,props,targets,xml}]
|
|
indent_size = 2
|
|
|
|
[*.md]
|
|
trim_trailing_whitespace = false
|
|
|
|
[*.cs]
|
|
# Namespaces
|
|
csharp_style_namespace_declarations = file_scoped:warning
|
|
# usings
|
|
dotnet_sort_system_directives_first = true
|
|
csharp_using_directive_placement = outside_namespace:warning
|
|
# var / modern C#
|
|
csharp_style_var_when_type_is_apparent = true:suggestion
|
|
csharp_prefer_braces = true:suggestion
|
|
csharp_style_prefer_primary_constructors = true:suggestion
|
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
|
|
# Prefer readonly
|
|
dotnet_style_readonly_field = true:warning
|
|
|
|
# Quiet a few analyzer rules that are noisy for a young codebase / skeleton.
|
|
# CA1515: types can be internal — intentionally relaxed (public module/contract surface).
|
|
dotnet_diagnostic.CA1515.severity = none
|
|
# CA1812: internal class never instantiated — false positives on DI-resolved types.
|
|
dotnet_diagnostic.CA1812.severity = none
|
|
# CA2007: ConfigureAwait — not needed in ASP.NET Core / worker (no sync context).
|
|
dotnet_diagnostic.CA2007.severity = none
|
|
# CA1848 / CA1873: LoggerMessage-delegate perf rules — opt-in perf, not worth enforcing in V1.
|
|
dotnet_diagnostic.CA1848.severity = none
|
|
dotnet_diagnostic.CA1873.severity = none
|
|
# CA1031: a model/test boundary intentionally catches broadly to report any failure as a result.
|
|
dotnet_diagnostic.CA1031.severity = none
|
|
|
|
# EF Core migrations are tool-generated — don't style-police them.
|
|
[**/Migrations/*.cs]
|
|
generated_code = true
|