diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 28cad270..2cf5cae6 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -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 . ## Coding guidance diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..5a43f5dd --- /dev/null +++ b/AGENTS.md @@ -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 . diff --git a/Directory.Build.targets b/Directory.Build.targets index c45b70b4..2498ef05 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,5 +1,19 @@ + + + + + + + diff --git a/Directory.Packages.props b/Directory.Packages.props index aab61254..96879521 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -2,14 +2,14 @@ true true - 1.4.0 - 1.0.5 + 2.0.0 + 1.0.8 - + @@ -22,15 +22,15 @@ - - - + + + - - - + + + @@ -43,29 +43,29 @@ - - - - - - + + + + + + - + - - - - - - - + + + + + + + - + - + @@ -87,10 +87,10 @@ - + - + \ No newline at end of file diff --git a/src/CrestApps.Core.Docs/docs/changelog/v1.0.0.md b/src/CrestApps.Core.Docs/docs/changelog/1.0.0.md similarity index 100% rename from src/CrestApps.Core.Docs/docs/changelog/v1.0.0.md rename to src/CrestApps.Core.Docs/docs/changelog/1.0.0.md diff --git a/src/CrestApps.Core.Docs/docs/changelog/v1.1.0.md b/src/CrestApps.Core.Docs/docs/changelog/1.1.0.md similarity index 56% rename from src/CrestApps.Core.Docs/docs/changelog/v1.1.0.md rename to src/CrestApps.Core.Docs/docs/changelog/1.1.0.md index 0608ee62..4c07d9c9 100644 --- a/src/CrestApps.Core.Docs/docs/changelog/v1.1.0.md +++ b/src/CrestApps.Core.Docs/docs/changelog/1.1.0.md @@ -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 diff --git a/src/CrestApps.Core.Docs/docs/changelog/index.md b/src/CrestApps.Core.Docs/docs/changelog/index.md index 05722498..9b8cda40 100644 --- a/src/CrestApps.Core.Docs/docs/changelog/index.md +++ b/src/CrestApps.Core.Docs/docs/changelog/index.md @@ -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 | diff --git a/src/CrestApps.Core.Docs/sidebars.js b/src/CrestApps.Core.Docs/sidebars.js index 4a59aea6..c9e45181 100644 --- a/src/CrestApps.Core.Docs/sidebars.js +++ b/src/CrestApps.Core.Docs/sidebars.js @@ -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', diff --git a/src/CrestApps.Core.Docs/versioned_docs/version-1.0/changelog/v1.0.0.md b/src/CrestApps.Core.Docs/versioned_docs/version-1.0/changelog/1.0.0.md similarity index 100% rename from src/CrestApps.Core.Docs/versioned_docs/version-1.0/changelog/v1.0.0.md rename to src/CrestApps.Core.Docs/versioned_docs/version-1.0/changelog/1.0.0.md diff --git a/src/CrestApps.Core.Docs/versioned_docs/version-1.0/changelog/index.md b/src/CrestApps.Core.Docs/versioned_docs/version-1.0/changelog/index.md index 39fad1db..8be5a520 100644 --- a/src/CrestApps.Core.Docs/versioned_docs/version-1.0/changelog/index.md +++ b/src/CrestApps.Core.Docs/versioned_docs/version-1.0/changelog/index.md @@ -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 | diff --git a/src/CrestApps.Core.Docs/versioned_sidebars/version-1.0-sidebars.json b/src/CrestApps.Core.Docs/versioned_sidebars/version-1.0-sidebars.json index 65d511c2..7587d728 100644 --- a/src/CrestApps.Core.Docs/versioned_sidebars/version-1.0-sidebars.json +++ b/src/CrestApps.Core.Docs/versioned_sidebars/version-1.0-sidebars.json @@ -93,7 +93,7 @@ "label": "Changelog", "items": [ "changelog/index", - "changelog/v1.0.0" + "changelog/1.0.0" ] }, "glossary" diff --git a/src/Primitives/CrestApps.Core.AI.Copilot/Services/CopilotOrchestrator.cs b/src/Primitives/CrestApps.Core.AI.Copilot/Services/CopilotOrchestrator.cs index 6737fe05..f6d70749 100644 --- a/src/Primitives/CrestApps.Core.AI.Copilot/Services/CopilotOrchestrator.cs +++ b/src/Primitives/CrestApps.Core.AI.Copilot/Services/CopilotOrchestrator.cs @@ -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 diff --git a/src/Stores/CrestApps.Core.Data.YesSql/Services/DocumentCatalog.cs b/src/Stores/CrestApps.Core.Data.YesSql/Services/DocumentCatalog.cs index c1902460..4e589d8a 100644 --- a/src/Stores/CrestApps.Core.Data.YesSql/Services/DocumentCatalog.cs +++ b/src/Stores/CrestApps.Core.Data.YesSql/Services/DocumentCatalog.cs @@ -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); } /// @@ -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); } /// diff --git a/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionExtractedDataStore.cs b/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionExtractedDataStore.cs index a696cf45..9fc5f8dc 100644 --- a/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionExtractedDataStore.cs +++ b/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionExtractedDataStore.cs @@ -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; } @@ -80,7 +80,7 @@ public async Task SaveAsync( } } - await _session.SaveAsync(existing, _collection); + await _session.SaveAsync(existing, false, _collection, CancellationToken.None); } /// diff --git a/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionManager.cs b/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionManager.cs index a6efc6e1..d7f629a8 100644 --- a/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionManager.cs +++ b/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionManager.cs @@ -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; } @@ -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); } /// diff --git a/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionStore.cs b/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionStore.cs index cde92ede..25bf79dc 100644 --- a/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionStore.cs +++ b/src/Stores/CrestApps.Core.Data.YesSql/Services/YesSqlAIChatSessionStore.cs @@ -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; } @@ -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) diff --git a/tests/CrestApps.Core.Tests/Framework/Mvc/YesSqlAIChatSessionExtractedDataStoreTests.cs b/tests/CrestApps.Core.Tests/Framework/Mvc/YesSqlAIChatSessionExtractedDataStoreTests.cs index d2176c06..418a9734 100644 --- a/tests/CrestApps.Core.Tests/Framework/Mvc/YesSqlAIChatSessionExtractedDataStoreTests.cs +++ b/tests/CrestApps.Core.Tests/Framework/Mvc/YesSqlAIChatSessionExtractedDataStoreTests.cs @@ -55,8 +55,8 @@ public async Task SaveAsync_WhenUpdatingStoredRecord_CopiesValuesCaseInsensitive var session = CreateSessionStore(existing); object stagedRecord = null; session - .Setup(store => store.SaveAsync(It.IsAny(), It.IsAny(), It.IsAny())) - .Callback((saved, _, _) => stagedRecord = saved) + .Setup(store => store.SaveAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Callback((saved, _, _, _) => stagedRecord = saved) .Returns(Task.CompletedTask); var extractedDataStore = new YesSqlAIChatSessionExtractedDataStore( session.Object, diff --git a/tests/CrestApps.Core.Tests/Framework/Mvc/YesSqlAIChatSessionManagerTests.cs b/tests/CrestApps.Core.Tests/Framework/Mvc/YesSqlAIChatSessionManagerTests.cs index fbaecb95..431c28d8 100644 --- a/tests/CrestApps.Core.Tests/Framework/Mvc/YesSqlAIChatSessionManagerTests.cs +++ b/tests/CrestApps.Core.Tests/Framework/Mvc/YesSqlAIChatSessionManagerTests.cs @@ -328,8 +328,9 @@ public async Task SaveAsync_WithStoredSession_CopiesMutableContainersBeforeStagi .Setup(session => session.SaveAsync( It.IsAny(), It.IsAny(), - It.IsAny())) - .Callback((session, _, _) => stagedSession = (AIChatSession)session) + It.IsAny(), + It.IsAny())) + .Callback((session, _, _, _) => stagedSession = (AIChatSession)session) .Returns(Task.CompletedTask); var sessionManager = new YesSqlAIChatSessionManager( new Mock(MockBehavior.Strict).Object,