Skip to content

Commit 2c50037

Browse files
committed
Remove 0.3-preview traceability files and migration notes
- Delete all 20 *.cs.book.txt files (ch04 + ch05 preview snapshots) - Remove 'Notes on the 1.x API surface' section from README - Fix AgentThread -> AgentSession in ch04 sample README
1 parent 06e8aad commit 2c50037

24 files changed

Lines changed: 29 additions & 799 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- [Pre-print version pinning conventions](pre_print_versions.md) — Canonical version pins as of 2026-05-09 review.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Pre-print version pinning conventions
3+
description: Canonical package version pins for the Generative AI in .NET book and known consistency hotspots
4+
type: project
5+
---
6+
7+
Canonical version targets for the manuscript (verified 2026-05-09):
8+
9+
- Microsoft.Extensions.AI 10.5.1 (Evaluation pkg stays at 10.5.0)
10+
- Microsoft.Agents.AI 1.3.0 (Workflows / OpenAI / Foundry stable; A2A / Hosting preview 1.3.0-preview.*)
11+
- ModelContextProtocol 1.2.0 (single facade package; .Client / .Server packages retired in 1.x)
12+
- Anthropic.SDK 5.10.0 (uses local `AnthropicChatClient` adapter due to MEAI.Abstractions binding gap)
13+
- OllamaSharp 5.4.25
14+
- OpenAI 2.10.0
15+
- Azure.AI.OpenAI 2.1.0
16+
17+
**Why:** These are the pins agreed for the v1.0-first-print tag.
18+
19+
**How to apply:** When reviewing or editing prose, treat any of the following as defects:
20+
- "Microsoft.Extensions.AI 9.x" / "9.4.0" / floating "9.*" in csproj snippets — should be 10.x (10.5.1).
21+
- "OllamaSharp 5.1.12" — should be 5.4.25.
22+
- Any "Last validated" blockquote that says 9.x — should match 10.5.1.
23+
- Any csproj `Version="9.*"` in chapters 4/5 — should be 10.* now.
24+
- `using ModelContextProtocol.Client;` or `.Server;` in **prose package lists** is fine because the namespaces are preserved for backward compat; only flag if it's listed as a separate **package** to install.
25+
- `AgentSession` is the correct name (not `AgentThread`); methods are `SerializeSessionAsync` / `DeserializeSessionAsync`.
26+
27+
Citation URLs always use the `v1.0-first-print` tag, never `master`/`main`. Branch on the companion repo is `master`. The book repo is also `master`.

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,20 +151,6 @@ CI catches build-level drift but not all runtime regressions. For the model-ID s
151151

152152
Use a **tag** in any URL you cite from the book -- never `master`.
153153

154-
## Notes on the 1.x API surface (Agent Framework 1.3 / MCP 1.2)
155-
156-
All samples target `Microsoft.Agents.AI` 1.3 and `ModelContextProtocol` 1.2. The manuscript was originally drafted against the 0.3.x previews, so a few printed snippets differ from what's checked in here. The original 0.3-preview snippets are preserved alongside the live code as `*.cs.book.txt` for traceability. The shape changes that recur most often:
157-
158-
- `ChatClientAgentOptions` no longer carries `Instructions` / `Tools` -- they move to `ChatClientAgentOptions.ChatOptions` (`Instructions`, `Tools`) or to the string-arg `ChatClientAgent` constructor.
159-
- `AgentThread` -> `AgentSession`; `AgentRunResponse` -> `AgentResponse`; `AIAgent.GetNewThread()` -> `AIAgent.CreateSessionAsync(...)`. Session serialization is `agent.SerializeSessionAsync(session)` / `agent.DeserializeSessionAsync(jsonElement)`.
160-
- `WorkflowBuilder()` parameterless ctor is gone -- the start executor is passed to the constructor (`new WorkflowBuilder(start)`). `Executor.From` / `FromAsync` lambdas became `new FunctionExecutor<TIn, TOut>(id, handler)`. `SetOutputExecutor` -> `WithOutputFrom(...)`. `workflow.RunAsync(...)` was replaced by `InProcessExecution.RunAsync(workflow, input)`.
161-
- The `AsBuilder().Use(...)` middleware delegate now receives `(messages, session, options, innerAgent, ct)` -- you call `innerAgent.RunAsync(...)` instead of a `next` delegate.
162-
- `ModelContextProtocol.Client` / `ModelContextProtocol.Server` are no longer separate packages -- everything is in `ModelContextProtocol` / `ModelContextProtocol.Core` / `ModelContextProtocol.AspNetCore`. `McpClientTool` extends `AIFunction` directly (no `.AsAIFunction()` needed); rename via `tool.WithName(...)`.
163-
- Server bootstrap is `.AddMcpServer().WithHttpTransport().WithToolsFromAssembly()` then `app.MapMcp(...)`. `WithHttpServerTransport(...)` and `HttpTransportType.Sse` have been retired -- streamable HTTP is the only HTTP transport.
164-
- Client transports: `StreamableHttpClientTransport` -> `HttpClientTransport` (with `HttpClientTransportOptions`). `SseClientTransport` is gone.
165-
- A2A server hosting requires implementing `A2A.IAgentHandler`, registering it via `services.AddA2AAgent<THandler>(agentCard)`, then `app.MapA2A("/path")` from `A2A.AspNetCore`. The 0.3-preview's one-liner `app.MapA2A(agent, "/path")` no longer exists.
166-
- `McpClient.OnToolsListChanged(...)` was replaced by `client.RegisterNotificationHandler(NotificationMethods.ToolListChangedNotification, handler)`, which returns an `IAsyncDisposable`.
167-
168154
## Contributing
169155

170156
Issues are welcome -- bugs, builds broken by transitive package drift, samples whose APIs have moved on, README mistakes. Pull requests are welcome too, especially:

samples/ch04-agent-framework/04.2.1-hello-agent/Program.cs.book.txt

Lines changed: 0 additions & 31 deletions
This file was deleted.

samples/ch04-agent-framework/04.2.4-anthropic-agents/Program.cs.book.txt

Lines changed: 0 additions & 33 deletions
This file was deleted.

samples/ch04-agent-framework/04.3-persistent-session/Program.cs.book.txt

Lines changed: 0 additions & 46 deletions
This file was deleted.

samples/ch04-agent-framework/04.4-tools-and-approval/Program.cs.book.txt

Lines changed: 0 additions & 44 deletions
This file was deleted.

samples/ch04-agent-framework/04.5-agent-middleware/Program.cs.book.txt

Lines changed: 0 additions & 40 deletions
This file was deleted.

samples/ch04-agent-framework/04.6.3-text-processing-walkthrough/Program.cs.book.txt

Lines changed: 0 additions & 36 deletions
This file was deleted.

samples/ch04-agent-framework/04.6.7-content-workflow/Program.cs.book.txt

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)