Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d69fafb
move storage to the client manager
mattzcarey Nov 14, 2025
5ae0fc1
fix: url missing after page load
mattzcarey Nov 14, 2025
06d8204
fix: dots
mattzcarey Nov 14, 2025
3d297e3
fix: callback handling is now in client manager with 2 stage storage.
mattzcarey Nov 14, 2025
a2a5337
some auth edge cases
mattzcarey Nov 14, 2025
3e64892
make storage sync for the moment to reduce complexity
mattzcarey Nov 14, 2025
9215674
better default states
mattzcarey Nov 14, 2025
050ea26
cancel button on frontend
mattzcarey Nov 14, 2025
6a8de3f
remove openai from agents package.json
mattzcarey Nov 14, 2025
1c5d5a9
unify mcp storage
mattzcarey Nov 14, 2025
3078663
fix lock file
mattzcarey Nov 14, 2025
c6cfcfc
fix: tests
mattzcarey Nov 14, 2025
6f13b13
feat: more refactor
mattzcarey Nov 14, 2025
3cecc93
tools tests
mattzcarey Nov 14, 2025
fcf7aa9
update x402
mattzcarey Nov 14, 2025
8268b7e
fix: types
mattzcarey Nov 14, 2025
dc1237c
update default model in playground
mattzcarey Nov 14, 2025
fcc2948
Merge branch 'main' into feat/mcp-storage-adapter
mattzcarey Nov 14, 2025
55d2452
reasoning card
mattzcarey Nov 14, 2025
2e37160
Apply suggestion from @mattzcarey
mattzcarey Nov 17, 2025
1e936c7
fix: from review
mattzcarey Nov 17, 2025
d909624
add smooth scrolling
mattzcarey Nov 17, 2025
3e616d4
fix: calling restore onstart and json schema the rest of the time
mattzcarey Nov 17, 2025
5161b0d
fix: oauth tests
mattzcarey Nov 17, 2025
0fc2de9
remove smooth scroll :(
mattzcarey Nov 17, 2025
d5b672e
make tests smaller
mattzcarey Nov 17, 2025
1c138ec
rename to client for review
mattzcarey Nov 18, 2025
d3f5182
revert changes to mcp.connect()
mattzcarey Nov 18, 2025
021c167
make storage async
mattzcarey Nov 18, 2025
704d07c
fix readonly nit
mattzcarey Nov 18, 2025
0a7acad
revert remove openai ai sdk provider
mattzcarey Nov 18, 2025
64c4a7d
remove public storage api
mattzcarey Nov 18, 2025
e09b3cb
add todos for ensureJsonSchema
mattzcarey Nov 18, 2025
cf448d8
fix: mcp server states and unify observability to the mcp client mana…
mattzcarey Nov 18, 2025
9eac678
remove callback cache
mattzcarey Nov 18, 2025
d8a1d4f
dead
mattzcarey Nov 18, 2025
f482b0c
createConnection. in memory method
mattzcarey Nov 18, 2025
5ef1e8b
add tests
mattzcarey Nov 18, 2025
51fca96
changeset
mattzcarey Nov 18, 2025
67033d8
Merge branch 'main' into feat/mcp-storage-adapter
mattzcarey Nov 18, 2025
7ad9317
formatting
mattzcarey Nov 18, 2025
d1f479f
claude comments
mattzcarey Nov 18, 2025
0966d6c
remove redundant checks
mattzcarey Nov 18, 2025
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
24 changes: 24 additions & 0 deletions .changeset/plenty-friends-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"agents": minor
---

### Breaking Changes

- **`getMcpServers()` is now async**: Changed from synchronous to asynchronous method to support storage operations
- **`DurableObjectOAuthClientProvider` constructor**: Now accepts `OAuthClientStorage` interface instead of `DurableObjectStorage`

### New Features

- **`MCPClientManager` API changes**:
- New `registerServer()` method to register servers (replaces part of `connect()`)
- New `connectToServer()` method to establish connection (replaces part of `connect()`)
- `connect()` method deprecated (still works for backward compatibility)
- Requires `MCPClientStorage` interface implementation (provided via `AgentMCPClientStorage`)
- **Storage abstraction layer**: New `MCPClientStorage` and `OAuthClientStorage` interfaces enable custom storage implementations beyond Durable Objects
- **Connection state observability**: New `onServerStateChanged()` event for tracking all server state changes
- **Improved reconnect logic**: `restoreConnectionsFromStorage()` handles failed connections

### Bug Fixes

- Fixed failed connections not being recreated on restore
- Fixed redundant storage operations during connection restoration
2 changes: 2 additions & 0 deletions packages/agents/src/ai-chat-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ export class AIChatAgent<Env = unknown, State = unknown> extends Agent<
override async onRequest(request: Request): Promise<Response> {
return this._tryCatchChat(() => {
const url = new URL(request.url);

if (url.pathname.endsWith("/get-messages")) {
const messages = this._loadMessagesFromDb();
return Response.json(messages);
}

return super.onRequest(request);
});
}
Expand Down
Loading
Loading