feat(core): add durable session fork event

This commit is contained in:
Dax Raad 2026-06-29 16:13:51 -04:00
commit b2d46ecd7e
11 changed files with 582 additions and 82 deletions

View file

@ -11,6 +11,8 @@ import type {
SessionsActiveOutput,
SessionsGetInput,
SessionsGetOutput,
SessionsForkInput,
SessionsForkOutput,
SessionsSwitchAgentInput,
SessionsSwitchAgentOutput,
SessionsSwitchModelInput,
@ -361,6 +363,18 @@ export function make(options: ClientOptions) {
},
requestOptions,
).then((value) => value.data),
fork: (input: SessionsForkInput, requestOptions?: RequestOptions) =>
request<{ readonly data: SessionsForkOutput }>(
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/fork`,
body: { messageID: input["messageID"] },
successStatus: 200,
declaredStatuses: [404, 400, 401],
empty: false,
},
requestOptions,
).then((value) => value.data),
switchAgent: (input: SessionsSwitchAgentInput, requestOptions?: RequestOptions) =>
request<SessionsSwitchAgentOutput>(
{