Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ Important folders:
When a change affects public behavior, configuration, setup, or project guidance:

1. Update the relevant page under `src\CrestApps.Core.Docs\docs`
2. Update the changelog under `src\CrestApps.Core.Docs\docs\changelog`
2. Update the changelog for the active in-development release under `src\CrestApps.Core.Docs\docs\changelog`
3. Build the docs site

### Changelog conventions

- Changelog files are named after their version with no `v` prefix (for example `1.0.0.md`, `1.1.0.md`).
- The next planned release is **1.1.0**. Document all upcoming changes — new features, fixes, dependency upgrades, branching or workflow changes, and other notable repository-level updates — in `src\CrestApps.Core.Docs\docs\changelog\1.1.0.md` until it ships.
- When a new development cycle begins, add a changelog file for that version (again with no `v` prefix), register it in `src\CrestApps.Core.Docs\sidebars.js` and `src\CrestApps.Core.Docs\docs\changelog\index.md`, and document ongoing work there.

Keep the docs focused on `CrestApps.Core`. If you need to mention the Orchard Core implementation, treat it as a related downstream product and link to <https://orchardcore.crestapps.com>.

## Coding guidance
Expand Down
37 changes: 37 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Agent guidance

This file orients automated agents and contributors working in the `CrestApps.Core`
repository. The detailed conventions live in
[`.github/copilot-instructions.md`](.github/copilot-instructions.md); read that file
first and follow it for build, test, coding, and documentation rules.

## Project overview

`CrestApps.Core` is the standalone framework repository for the CrestApps shared
libraries (AI, orchestration, chat, templating, document processing, SignalR,
storage, and sample hosts), targeting .NET 10.

## Build and test

```bash
dotnet build .\CrestApps.Core.slnx -c Release /p:NuGetAudit=false
dotnet test .\tests\CrestApps.Core.Tests\CrestApps.Core.Tests.csproj -c Release /p:NuGetAudit=false
```

## Documentation and changelog discipline

When a change affects public behavior, configuration, setup, or project guidance,
update the relevant docs under `src\CrestApps.Core.Docs\docs` and build the docs site.

- Changelog files are named after their version with no `v` prefix (for example
`1.0.0.md`, `1.1.0.md`).
- The next planned release is **1.1.0**. Document all upcoming changes going forward —
new features, fixes, dependency upgrades, branching or workflow changes, and other
notable repository-level updates — in
`src\CrestApps.Core.Docs\docs\changelog\1.1.0.md` until it ships.
- When a new development cycle starts, add a changelog file for that version (again
with no `v` prefix), register it in `src\CrestApps.Core.Docs\sidebars.js` and
`src\CrestApps.Core.Docs\docs\changelog\index.md`, and document ongoing work there.

Keep the docs focused on `CrestApps.Core`. Treat the Orchard Core implementation as a
related downstream product and link to <https://orchardcore.crestapps.com>.
14 changes: 14 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
<Project>

<!--
OllamaSharp ships a Roslyn source generator (OllamaSharp.SourceGenerators) built
against a newer compiler than the currently pinned .NET SDK provides, which fails
the build with CS9057. The generator is not used by this repository, so strip it
from the analyzer set before compilation across every project (it also flows
transitively into hosts that reference the Ollama provider). Revisit once the
SDK's bundled Roslyn version catches up with the analyzer's target.
-->
<Target Name="RemoveIncompatibleOllamaSharpAnalyzers" BeforeTargets="CoreCompile">
<ItemGroup>
<Analyzer Remove="@(Analyzer)" Condition="$([System.String]::Copy('%(Analyzer.Identity)').Contains('OllamaSharp.SourceGenerators'))" />
</ItemGroup>
</Target>

<Target Name="RegenerateFrameworkAssemblyAttributes"
BeforeTargets="GenerateTargetFrameworkMonikerAttribute"
Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true' and '$(TargetFrameworkMonikerAssemblyAttributesPath)' != ''">
Expand Down
54 changes: 27 additions & 27 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<ModelContextProtocolVersion>1.4.0</ModelContextProtocolVersion>
<GitHubCopilotSdkVersion>1.0.5</GitHubCopilotSdkVersion>
<ModelContextProtocolVersion>2.0.0</ModelContextProtocolVersion>
<GitHubCopilotSdkVersion>1.0.8</GitHubCopilotSdkVersion>
</PropertyGroup>
<ItemGroup>
<!-- Miscellaneous Packages -->
<PackageVersion Include="A2A" Version="0.3.4-preview" />
<PackageVersion Include="A2A.AspNetCore" Version="0.3.4-preview" />
<PackageVersion Include="Anthropic" Version="12.35.1" />
<PackageVersion Include="Anthropic" Version="12.39.0" />
<PackageVersion Include="DocumentFormat.OpenXml" Version="3.5.1" />
<PackageVersion Include="Elastic.Clients.Elasticsearch" Version="[8.19.23,9.0.0)" />
<PackageVersion Include="Fluid.Core" Version="2.31.0" />
Expand All @@ -22,15 +22,15 @@
<PackageVersion Include="MongoDB.Driver" Version="3.4.0" />
<PackageVersion Include="Npgsql" Version="10.0.3" />
<PackageVersion Include="Pgvector" Version="0.3.2" />
<PackageVersion Include="NLog" Version="6.1.3" />
<PackageVersion Include="NLog.Web.AspNetCore" Version="6.1.3" />
<PackageVersion Include="OllamaSharp" Version="5.4.25" />
<PackageVersion Include="NLog" Version="6.1.4" />
<PackageVersion Include="NLog.Web.AspNetCore" Version="6.1.4" />
<PackageVersion Include="OllamaSharp" Version="5.4.30" />
<PackageVersion Include="PdfPig" Version="0.1.15" />
<PackageVersion Include="PDFsharp-MigraDoc" Version="6.2.4" />
<PackageVersion Include="SSH.NET" Version="2025.1.0" />
<PackageVersion Include="YesSql.Abstractions" Version="5.4.7" />
<PackageVersion Include="YesSql.Core" Version="5.4.7" />
<PackageVersion Include="YesSql.Provider.Sqlite" Version="5.4.7" />
<PackageVersion Include="YesSql.Abstractions" Version="6.0.0" />
<PackageVersion Include="YesSql.Core" Version="6.0.0" />
<PackageVersion Include="YesSql.Provider.Sqlite" Version="6.0.0" />
<PackageVersion Include="ZString" Version="2.6.0" />
</ItemGroup>
<ItemGroup>
Expand All @@ -43,29 +43,29 @@
<PackageVersion Include="Azure.Identity" Version="1.21.0" />
<PackageVersion Include="Azure.Search.Documents" Version="12.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="10.0.9" />
<PackageVersion Include="Microsoft.CognitiveServices.Speech" Version="1.50.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.9" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.AI" Version="10.7.0" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="10.7.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="10.0.10" />
<PackageVersion Include="Microsoft.CognitiveServices.Speech" Version="1.51.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.10" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.10" />
<PackageVersion Include="Microsoft.Extensions.AI" Version="10.8.3" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="10.8.3" />
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="10.0.0-preview.1.25559.3" />
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="10.7.0" />
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="10.8.3" />
<PackageVersion Include="Microsoft.Extensions.DataIngestion" Version="10.4.0-preview.1.26160.2" />
<PackageVersion Include="Microsoft.Extensions.DataIngestion.Markdig" Version="10.4.0-preview.1.26160.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="10.7.0" />
<PackageVersion Include="Microsoft.Extensions.Localization.Abstractions" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.9" />
<PackageVersion Include="Microsoft.Extensions.Resilience" Version="10.7.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.10" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="10.0.10" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="10.8.0" />
<PackageVersion Include="Microsoft.Extensions.Localization.Abstractions" Version="10.0.10" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.10" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.10" />
<PackageVersion Include="Microsoft.Extensions.Resilience" Version="10.8.0" />
<PackageVersion Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="2.0.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.300" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.301" />
</ItemGroup>
<ItemGroup>
<!-- Testing Packages -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
<PackageVersion Include="Microsoft.Playwright" Version="1.61.0" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="xunit.analyzers" Version="1.27.0" />
Expand All @@ -87,10 +87,10 @@
</ItemGroup>
<ItemGroup>
<!-- Transitive Packages -->
<PackageVersion Include="Microsoft.Bcl.Memory" Version="10.0.9" />
<PackageVersion Include="Microsoft.Bcl.Memory" Version="10.0.10" />
<PackageVersion Include="Nerdbank.MessagePack" Version="1.2.4" />
<PackageVersion Include="MessagePack" Version="3.1.7" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.9" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.10" />
<PackageVersion Include="SQLitePCLRaw.lib.e_sqlite3" Version="3.50.3" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ page will be updated as changes land after 1.0.0.

## Highlights

_No changes yet. Highlights will be documented here as features are merged for 1.1.0._
- upgrades the framework's dependency baseline, including YesSql 6.0 (new `ISession.SaveAsync` signature), the Model Context Protocol 2.0 packages, the GitHub Copilot SDK 1.0.8 (new `PermissionsApi.SetAllowAllAsync` mode-based API), Anthropic 12.39.0, OllamaSharp 5.4.30, the .NET 10.0.10 runtime/extension packages, and the `Microsoft.Extensions.AI` 10.8.3 packages
4 changes: 2 additions & 2 deletions src/CrestApps.Core.Docs/docs/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ This section tracks `CrestApps.Core` releases and notable repository-level chang

| Version | Highlights |
| --- | --- |
| [1.1.0](v1.1.0) | Next release, currently in development (nightly and preview builds) |
| [1.0.0](v1.0.0) | Initial standalone release plus merged configuration catalogs, automatic AI tool dependency expansion, clearer quick-start guidance, and deployment configuration diagnostics |
| [1.1.0](1.1.0) | Next release, currently in development (nightly and preview builds) |
| [1.0.0](1.0.0) | Initial standalone release plus merged configuration catalogs, automatic AI tool dependency expansion, clearer quick-start guidance, and deployment configuration diagnostics |
4 changes: 2 additions & 2 deletions src/CrestApps.Core.Docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ const sidebars = {
label: 'Changelog',
items: [
'changelog/index',
'changelog/v1.1.0',
'changelog/v1.0.0',
'changelog/1.1.0',
'changelog/1.0.0',
],
},
'glossary',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ This section tracks `CrestApps.Core` releases and notable repository-level chang

| Version | Highlights |
| --- | --- |
| [1.0.0](v1.0.0) | Initial standalone release plus merged configuration catalogs, automatic AI tool dependency expansion, clearer quick-start guidance, and deployment configuration diagnostics |
| [1.0.0](1.0.0) | Initial standalone release plus merged configuration catalogs, automatic AI tool dependency expansion, clearer quick-start guidance, and deployment configuration diagnostics |
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"label": "Changelog",
"items": [
"changelog/index",
"changelog/v1.0.0"
"changelog/1.0.0"
]
},
"glossary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ private static async Task ApplyAllowAllPermissionsAsync(CopilotSession session,
return;
}

await session.Rpc.Permissions.SetAllowAllAsync(true, GitHub.Copilot.Rpc.PermissionsSetAllowAllSource.Rpc, cancellationToken);
await session.Rpc.Permissions.SetAllowAllAsync(GitHub.Copilot.Rpc.PermissionsAllowAllMode.On, source: GitHub.Copilot.Rpc.PermissionsSetAllowAllSource.Rpc, cancellationToken: cancellationToken);
}
#pragma warning restore GHCP001

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public async ValueTask CreateAsync(T record, CancellationToken cancellationToken

await SavingAsync(record);

await Session.SaveAsync(record, CollectionName);
await Session.SaveAsync(record, false, CollectionName, CancellationToken.None);
}

/// <summary>
Expand All @@ -197,7 +197,7 @@ public async ValueTask UpdateAsync(T record, CancellationToken cancellationToken

await SavingAsync(record);

await Session.SaveAsync(record, CollectionName);
await Session.SaveAsync(record, false, CollectionName, CancellationToken.None);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async Task SaveAsync(

if (existing is null)
{
await _session.SaveAsync(record, _collection);
await _session.SaveAsync(record, false, _collection, CancellationToken.None);

return;
}
Expand Down Expand Up @@ -80,7 +80,7 @@ public async Task SaveAsync(
}
}

await _session.SaveAsync(existing, _collection);
await _session.SaveAsync(existing, false, _collection, CancellationToken.None);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public async Task SaveAsync(AIChatSession chatSession, CancellationToken cancell

if (storedSession == null)
{
await _session.SaveAsync(chatSession, _collection);
await _session.SaveAsync(chatSession, false, _collection, CancellationToken.None);

return;
}
Expand All @@ -185,7 +185,7 @@ public async Task SaveAsync(AIChatSession chatSession, CancellationToken cancell
CopySession(chatSession, storedSession);
}

await _session.SaveAsync(storedSession, _collection);
await _session.SaveAsync(storedSession, false, _collection, CancellationToken.None);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public async Task SaveAsync(AIChatSession chatSession, CancellationToken cancell

if (storedSession == null)
{
await _session.SaveAsync(chatSession, _collection);
await _session.SaveAsync(chatSession, false, _collection, CancellationToken.None);

return;
}
Expand All @@ -112,7 +112,7 @@ public async Task SaveAsync(AIChatSession chatSession, CancellationToken cancell
CopySession(chatSession, storedSession);
}

await _session.SaveAsync(storedSession, _collection);
await _session.SaveAsync(storedSession, false, _collection, CancellationToken.None);
}

private static void CopySession(AIChatSession source, AIChatSession destination)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public async Task SaveAsync_WhenUpdatingStoredRecord_CopiesValuesCaseInsensitive
var session = CreateSessionStore(existing);
object stagedRecord = null;
session
.Setup(store => store.SaveAsync(It.IsAny<object>(), It.IsAny<bool>(), It.IsAny<string>()))
.Callback<object, bool, string>((saved, _, _) => stagedRecord = saved)
.Setup(store => store.SaveAsync(It.IsAny<object>(), It.IsAny<bool>(), It.IsAny<string>(), It.IsAny<CancellationToken>()))
.Callback<object, bool, string, CancellationToken>((saved, _, _, _) => stagedRecord = saved)
.Returns(Task.CompletedTask);
var extractedDataStore = new YesSqlAIChatSessionExtractedDataStore(
session.Object,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@ public async Task SaveAsync_WithStoredSession_CopiesMutableContainersBeforeStagi
.Setup(session => session.SaveAsync(
It.IsAny<AIChatSession>(),
It.IsAny<bool>(),
It.IsAny<string>()))
.Callback<object, bool, string>((session, _, _) => stagedSession = (AIChatSession)session)
It.IsAny<string>(),
It.IsAny<CancellationToken>()))
.Callback<object, bool, string, CancellationToken>((session, _, _, _) => stagedSession = (AIChatSession)session)
.Returns(Task.CompletedTask);
var sessionManager = new YesSqlAIChatSessionManager(
new Mock<IHttpContextAccessor>(MockBehavior.Strict).Object,
Expand Down
Loading