Skip to content
Closed
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
6 changes: 3 additions & 3 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1234,11 +1234,11 @@
{
"allOf": [
{
"$ref": "#/$defs/SetProvidersRequest"
"$ref": "#/$defs/SetProviderRequest"
}
],
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nReplaces the configuration for a provider.",
"title": "SetProvidersRequest"
"title": "SetProviderRequest"
},
{
"allOf": [
Expand Down Expand Up @@ -6382,7 +6382,7 @@
}
]
},
"SetProvidersRequest": {
"SetProviderRequest": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for `providers/set`.\n\nReplaces the full configuration for one provider id.",
"properties": {
"_meta": {
Expand Down
6 changes: 3 additions & 3 deletions src/acp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {
ListSessionsResponse,
ResumeSessionRequest,
ResumeSessionResponse,
SetProvidersRequest,
SetProviderRequest,
DisableProvidersRequest,
DisableProvidersResponse,
CreateElicitationRequest,
Expand Down Expand Up @@ -1867,7 +1867,7 @@ describe("Connection", () => {
});

it("handles providers request lifecycle", async () => {
let receivedSetRequest: SetProvidersRequest | undefined;
let receivedSetRequest: SetProviderRequest | undefined;
let receivedDisableRequest: DisableProvidersRequest | undefined;

class TestClient implements Client {
Expand Down Expand Up @@ -1935,7 +1935,7 @@ describe("Connection", () => {
};
}

async unstable_setProvider(params: SetProvidersRequest): Promise<void> {
async unstable_setProvider(params: SetProviderRequest): Promise<void> {
receivedSetRequest = params;
}

Expand Down
8 changes: 4 additions & 4 deletions src/acp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class AgentSideConnection {
if (!agent.unstable_setProvider) {
throw RequestError.methodNotFound(method);
}
const validatedParams = validate.zSetProvidersRequest.parse(params);
const validatedParams = validate.zSetProviderRequest.parse(params);
const result = await agent.unstable_setProvider(validatedParams);
return result ?? {};
}
Expand Down Expand Up @@ -1001,10 +1001,10 @@ export class ClientSideConnection implements Agent {
* @experimental
*/
unstable_setProvider(
params: schema.SetProvidersRequest,
params: schema.SetProviderRequest,
): Promise<schema.SetProvidersResponse> {
return this.connection.sendRequest<
schema.SetProvidersRequest,
schema.SetProviderRequest,
schema.SetProvidersResponse
>(schema.AGENT_METHODS.providers_set, params, emptyObjectResponse);
}
Expand Down Expand Up @@ -2144,7 +2144,7 @@ export interface Agent {
* @experimental
*/
unstable_setProvider?(
params: schema.SetProvidersRequest,
params: schema.SetProviderRequest,
): Promise<schema.SetProvidersResponse | void>;
/**
* **UNSTABLE**
Expand Down
2 changes: 1 addition & 1 deletion src/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export type {
SessionNotification,
SessionResumeCapabilities,
SessionUpdate,
SetProvidersRequest,
SetProviderRequest,
SetProvidersResponse,
SetSessionConfigOptionRequest,
SetSessionConfigOptionResponse,
Expand Down
4 changes: 2 additions & 2 deletions src/schema/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ export type ClientRequest = {
| InitializeRequest
| AuthenticateRequest
| ListProvidersRequest
| SetProvidersRequest
| SetProviderRequest
| DisableProvidersRequest
| LogoutRequest
| NewSessionRequest
Expand Down Expand Up @@ -5098,7 +5098,7 @@ export type SessionUpdate =
*
* @experimental
*/
export type SetProvidersRequest = {
export type SetProviderRequest = {
/**
* The _meta property is reserved by ACP to allow clients and agents to attach additional
* metadata to their interactions. Implementations MUST NOT make assumptions about values at
Expand Down
4 changes: 2 additions & 2 deletions src/schema/zod.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ export const zSessionCapabilities = z.object({
*
* @experimental
*/
export const zSetProvidersRequest = z.object({
export const zSetProviderRequest = z.object({
_meta: z.record(z.string(), z.unknown()).nullish(),
apiType: zLlmProtocol,
baseUrl: z.string(),
Expand Down Expand Up @@ -3205,7 +3205,7 @@ export const zClientRequest = z.object({
zInitializeRequest,
zAuthenticateRequest,
zListProvidersRequest,
zSetProvidersRequest,
zSetProviderRequest,
zDisableProvidersRequest,
zLogoutRequest,
zNewSessionRequest,
Expand Down