Skip to content

Commit 177a978

Browse files
committed
Publish Agent Framework as rc4 package
1 parent 9351ac6 commit 177a978

File tree

7 files changed

+44
-6
lines changed

7 files changed

+44
-6
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616

1717
outputs:
1818
version: ${{ steps.version.outputs.version }}
19+
agent_framework_version: ${{ steps.version.outputs.agent_framework_version }}
1920

2021
steps:
2122
- name: Checkout
@@ -40,20 +41,33 @@ jobs:
4041
id: version
4142
run: |
4243
VERSION=$(grep -oPm1 "(?<=<Version>)[^<]+" Directory.Build.props)
44+
AGENT_FRAMEWORK_SUFFIX=$(grep -oPm1 "(?<=<AgentFrameworkPackageVersionSuffix>)[^<]+" Directory.Build.props)
4345
if [ -z "$VERSION" ]; then
4446
echo "Failed to resolve package version from Directory.Build.props"
4547
exit 1
4648
fi
49+
if [ -z "$AGENT_FRAMEWORK_SUFFIX" ]; then
50+
echo "Failed to resolve Agent Framework package suffix from Directory.Build.props"
51+
exit 1
52+
fi
53+
AGENT_FRAMEWORK_VERSION="$VERSION-$AGENT_FRAMEWORK_SUFFIX"
4754
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
55+
echo "agent_framework_version=$AGENT_FRAMEWORK_VERSION" >> "$GITHUB_OUTPUT"
4856
echo "Version from Directory.Build.props: $VERSION"
57+
echo "Agent Framework package version: $AGENT_FRAMEWORK_VERSION"
4958
5059
- name: Validate semantic version
5160
run: |
5261
VERSION="${{ steps.version.outputs.version }}"
62+
AGENT_FRAMEWORK_VERSION="${{ steps.version.outputs.agent_framework_version }}"
5363
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
5464
echo "Version '$VERSION' is not a valid semantic version."
5565
exit 1
5666
fi
67+
if [[ ! "$AGENT_FRAMEWORK_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
68+
echo "Agent Framework version '$AGENT_FRAMEWORK_VERSION' is not a valid semantic version."
69+
exit 1
70+
fi
5771
5872
- name: Restore dependencies
5973
run: dotnet restore ManagedCode.CodexSharpSDK.slnx
@@ -67,8 +81,18 @@ jobs:
6781
- name: Codex CLI smoke tests
6882
run: dotnet test --project CodexSharpSDK.Tests/CodexSharpSDK.Tests.csproj --configuration Release --no-build -- --treenode-filter "/*/*/*/CodexCli_Smoke_*"
6983

70-
- name: Pack NuGet package
71-
run: dotnet pack CodexSharpSDK/CodexSharpSDK.csproj --configuration Release --no-build -p:IncludeSymbols=false -p:SymbolPackageFormat=snupkg --output ./artifacts
84+
- name: Pack NuGet packages
85+
run: |
86+
mkdir -p ./artifacts
87+
dotnet pack CodexSharpSDK/CodexSharpSDK.csproj --configuration Release --no-build -p:IncludeSymbols=false -p:SymbolPackageFormat=snupkg --output ./artifacts
88+
dotnet pack CodexSharpSDK.Extensions.AgentFramework/CodexSharpSDK.Extensions.AgentFramework.csproj --configuration Release --no-build -p:IncludeSymbols=false -p:SymbolPackageFormat=snupkg --output ./artifacts
89+
90+
- name: Validate packed artifacts
91+
run: |
92+
VERSION="${{ steps.version.outputs.version }}"
93+
AGENT_FRAMEWORK_VERSION="${{ steps.version.outputs.agent_framework_version }}"
94+
test -f "./artifacts/ManagedCode.CodexSharpSDK.$VERSION.nupkg"
95+
test -f "./artifacts/ManagedCode.CodexSharpSDK.Extensions.AgentFramework.$AGENT_FRAMEWORK_VERSION.nupkg"
7296
7397
- name: Upload artifacts
7498
uses: actions/upload-artifact@v4
@@ -86,6 +110,7 @@ jobs:
86110
outputs:
87111
published: ${{ steps.publish.outputs.published }}
88112
version: ${{ needs.build.outputs.version }}
113+
agent_framework_version: ${{ needs.build.outputs.agent_framework_version }}
89114

90115
steps:
91116
- name: Checkout
@@ -193,6 +218,7 @@ jobs:
193218
id: release_notes
194219
run: |
195220
VERSION="${{ needs.publish-nuget.outputs.version }}"
221+
AGENT_FRAMEWORK_VERSION="${{ needs.publish-nuget.outputs.agent_framework_version }}"
196222
CURRENT_TAG="v$VERSION"
197223
PREVIOUS_TAG="${{ steps.prev_tag.outputs.previous_tag }}"
198224
@@ -229,9 +255,10 @@ jobs:
229255
fi
230256
231257
echo "" >> release_notes.md
232-
echo "## NuGet Package" >> release_notes.md
258+
echo "## NuGet Packages" >> release_notes.md
233259
echo "" >> release_notes.md
234260
echo "- [ManagedCode.CodexSharpSDK v$VERSION](https://www.nuget.org/packages/ManagedCode.CodexSharpSDK/$VERSION)" >> release_notes.md
261+
echo "- [ManagedCode.CodexSharpSDK.Extensions.AgentFramework v$AGENT_FRAMEWORK_VERSION](https://www.nuget.org/packages/ManagedCode.CodexSharpSDK.Extensions.AgentFramework/$AGENT_FRAMEWORK_VERSION)" >> release_notes.md
235262
236263
echo "" >> release_notes.md
237264
echo "---" >> release_notes.md

CodexSharpSDK.Extensions.AgentFramework/CodexSharpSDK.Extensions.AgentFramework.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>.NET Microsoft Agent Framework adapter for CodexSharpSDK, providing AIAgent registration helpers.</Description>
4+
<PackageDescription>$(Description)</PackageDescription>
45
<PackageId>ManagedCode.CodexSharpSDK.Extensions.AgentFramework</PackageId>
56
<RootNamespace>ManagedCode.CodexSharpSDK.Extensions.AgentFramework</RootNamespace>
67
<AssemblyName>ManagedCode.CodexSharpSDK.Extensions.AgentFramework</AssemblyName>
8+
<PackageVersion>$(Version)-$(AgentFrameworkPackageVersionSuffix)</PackageVersion>
9+
<Version>$(PackageVersion)</Version>
710
<PackageTags>codex;openai;sdk;ai;agent;cli;microsoft-agent-framework;aiagent</PackageTags>
811
<GenerateDocumentationFile>true</GenerateDocumentationFile>
912
<NoWarn>$(NoWarn);CS1591</NoWarn>

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<PublishRepositoryUrl>true</PublishRepositoryUrl>
3333
<EmbedUntrackedSources>true</EmbedUntrackedSources>
3434
<EnablePackageValidation>true</EnablePackageValidation>
35+
<AgentFrameworkPackageVersionSuffix>rc4</AgentFrameworkPackageVersionSuffix>
3536
<Version>1.1.0</Version>
3637
<PackageVersion>$(Version)</PackageVersion>
3738
</PropertyGroup>

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,11 @@ See [docs/Features/meai-integration.md](https://github.com/managedcode/CodexShar
393393
An optional adapter package lets you use CodexSharpSDK with Microsoft Agent Framework `AIAgent`.
394394

395395
```bash
396-
dotnet add package ManagedCode.CodexSharpSDK.Extensions.AgentFramework
396+
dotnet add package ManagedCode.CodexSharpSDK.Extensions.AgentFramework --prerelease
397397
```
398398

399+
This package currently ships as a prerelease because it depends on `Microsoft.Agents.AI` `1.0.0-rc4`.
400+
399401
### Basic usage
400402

401403
```csharp

docs/ADR/004-microsoft-agent-framework-integration.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Key points:
3939
1. Keep MAF dependency out of core SDK and out of `ManagedCode.CodexSharpSDK.Extensions.AI`.
4040
2. Reuse the existing `IChatClient` adapter instead of creating a bespoke Codex-specific `AIAgent`.
4141
3. Expose DI helpers for both non-keyed and keyed `AIAgent` registration to make the integration first-class for host applications.
42+
4. Keep the package itself on a prerelease version track while `Microsoft.Agents.AI` is prerelease so NuGet packaging remains valid.
4243

4344
## Diagram
4445

@@ -169,7 +170,7 @@ Mitigation:
169170
## Rollout and migration
170171

171172
- Migration steps:
172-
- consumers that want MAF install `ManagedCode.CodexSharpSDK.Extensions.AgentFramework`
173+
- consumers that want MAF install `ManagedCode.CodexSharpSDK.Extensions.AgentFramework` as a prerelease package
173174
- optionally continue using `CodexChatClient` directly with `AsAIAgent(...)`
174175
- Backwards compatibility:
175176
- no breaking changes to existing public APIs

docs/Features/agent-framework-integration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Enable CodexSharpSDK consumers to use Microsoft Agent Framework (`AIAgent`) on t
6060
4. `AddKeyedCodexAIAgent()` MUST register keyed `IChatClient` and keyed `AIAgent` using the same service key.
6161
5. Agent configuration supplied through `ChatClientAgentOptions` MUST flow into the created agent without mutating Codex-specific chat client defaults.
6262
6. Codex provider metadata exposed through `ChatClientMetadata` MUST remain available from the agent-resolved chat client.
63+
7. `ManagedCode.CodexSharpSDK.Extensions.AgentFramework` MUST publish as a prerelease package while its `Microsoft.Agents.AI` dependency remains prerelease, and consumer install docs MUST use prerelease-aware instructions.
6364

6465
---
6566

@@ -181,6 +182,7 @@ flowchart LR
181182
## Definition of Done
182183

183184
- `ManagedCode.CodexSharpSDK.Extensions.AgentFramework` exists as a separate opt-in package.
185+
- `ManagedCode.CodexSharpSDK.Extensions.AgentFramework` uses a project-specific prerelease package version aligned to the current `Microsoft.Agents.AI` RC dependency.
184186
- Direct `CodexChatClient` + `AsAIAgent(...)` usage is documented in `README.md`.
185187
- DI helpers register non-keyed and keyed `AIAgent` instances over Codex chat clients.
186188
- Automated tests cover happy path and keyed-edge path registration behaviour.

docs/Features/release-and-sync-automation.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Keep package quality and upstream Codex CLI parity automatically verified throug
3939
- Release workflow must build/test before pack/publish.
4040
- Release workflow must read package version from `Directory.Build.props`.
4141
- Release workflow must validate semantic version format before packaging.
42-
- Release workflow must fail if the produced `.nupkg` version does not match `Directory.Build.props`.
42+
- Release workflow must fail if the produced core `.nupkg` version does not match `Directory.Build.props`.
43+
- Release workflow must also pack `ManagedCode.CodexSharpSDK.Extensions.AgentFramework` and use the project-specific prerelease suffix from `Directory.Build.props`.
4344
- Release workflow must use generated GitHub release notes.
4445
- Release workflow must create/push git tag `v<version>` before publishing GitHub release.
4546
- Codex CLI watch runs daily and opens issue when upstream `openai/codex` changed since pinned submodule SHA.
@@ -75,6 +76,7 @@ flowchart LR
7576
- `dotnet build ManagedCode.CodexSharpSDK.slnx -c Release -warnaserror`
7677
- `dotnet test --solution ManagedCode.CodexSharpSDK.slnx -c Release`
7778
- `dotnet pack CodexSharpSDK/CodexSharpSDK.csproj -c Release --no-build -o artifacts`
79+
- `dotnet pack CodexSharpSDK.Extensions.AgentFramework/CodexSharpSDK.Extensions.AgentFramework.csproj -c Release --no-build -o artifacts`
7880

7981
### Workflow mapping
8082

0 commit comments

Comments
 (0)