@@ -1132,7 +1137,7 @@ function HomeSessionSearchResultRow(props: {
function HomeSessionGroupHeader(props: { title: string; onNewSession?: () => void }) {
const language = useLanguage()
return (
-
+
{props.title}
{(onNewSession) => (
@@ -1189,22 +1194,24 @@ function HomeSessionRow(props: {
-
-
- }
- aria-label={language.t("common.archive")}
- onClick={(event) => {
- event.preventDefault()
- event.stopPropagation()
- void props.archiveSession(props.record.session)
- }}
- />
-
-
+
+
+
+ }
+ aria-label={language.t("common.archive")}
+ onClick={(event) => {
+ event.preventDefault()
+ event.stopPropagation()
+ void props.archiveSession(props.record.session)
+ }}
+ />
+
+
+
)
}
diff --git a/packages/app/src/pages/layout-new.tsx b/packages/app/src/pages/layout-new.tsx
index f9222cdeb7..329b7c56b0 100644
--- a/packages/app/src/pages/layout-new.tsx
+++ b/packages/app/src/pages/layout-new.tsx
@@ -1,26 +1,18 @@
import { createEffect, Suspense, type ParentProps } from "solid-js"
-import { useNavigate, useParams } from "@solidjs/router"
+import { useNavigate } from "@solidjs/router"
import { DebugBar } from "@/components/debug-bar"
import { HelpButton } from "@/components/help-button"
import { Titlebar, type TitlebarUpdate } from "@/components/titlebar"
-import { useNotification } from "@/context/notification"
import { usePlatform } from "@/context/platform"
import { setNavigate } from "@/utils/notification-click"
import { setV2Toast, ToastRegion } from "@/utils/toast"
export default function NewLayout(props: ParentProps) {
const platform = usePlatform()
- const notification = useNotification()
const navigate = useNavigate()
- const params = useParams<{ id?: string }>()
setNavigate(navigate)
createEffect(() => setV2Toast(true))
- createEffect(() => {
- if (!notification.ready() || !params.id) return
- if (notification.session.unseenCount(params.id) === 0) return
- notification.session.markViewed(params.id)
- })
const update: TitlebarUpdate = {
version: () => {
@@ -44,7 +36,7 @@ export default function NewLayout(props: ParentProps) {
{props.children}
- {import.meta.env.DEV &&
}
+ {import.meta.env.DEV &&
}
diff --git a/packages/client/README.md b/packages/client/README.md
index fc16795075..8c53e47c7e 100644
--- a/packages/client/README.md
+++ b/packages/client/README.md
@@ -7,7 +7,7 @@ Private generation target for clients derived directly from OpenCode's authorita
- `@opencode-ai/client`: zero-Effect Promise client using `fetch`.
- `@opencode-ai/client/effect`: rich Effect network client using an environment-provided `HttpClient`.
-The generated surface starts with the Session group from Server's concrete API. The build compiler reads `@opencode-ai/server/api`; the generated Effect runtime imports a client-local projection built from Protocol, with a generation-equivalence test preventing transport drift. Run `bun run generate` after changing the contract and `bun run check:generated` to detect committed-output drift.
+The generated surface includes every standard HTTP group from Server's concrete API. The build compiler reads `@opencode-ai/server/api`; the generated Effect runtime imports a client-local projection built from Protocol, with a generation-equivalence test preventing transport drift. Custom transports such as the PTY WebSocket connection remain outside the generic HTTP client. Run `bun run generate` after changing the contract and `bun run check:generated` to detect committed-output drift.
The Effect entrypoint uses canonical decoded values such as `Session.ID`, `Location.Ref`, and `Prompt`. These datatypes come from the lightweight `@opencode-ai/schema` package and are re-exported so callers depend only on the client surface. Protocol owns endpoint construction and middleware placement; Server supplies the concrete middleware keys used by the build-time API.
diff --git a/packages/client/script/build.ts b/packages/client/script/build.ts
index 35ce8387a8..aeec4b3e34 100644
--- a/packages/client/script/build.ts
+++ b/packages/client/script/build.ts
@@ -1,20 +1,27 @@
import { NodeFileSystem } from "@effect/platform-node"
import { compile, emitEffectImported, emitPromise, write } from "@opencode-ai/httpapi-codegen"
-import { Api } from "@opencode-ai/server/api"
+import { ClientApi, endpointNames, groupNames, omitEndpoints } from "../src/contract"
import { Effect } from "effect"
-import { HttpApi } from "effect/unstable/httpapi"
import { fileURLToPath } from "url"
-const contract = compile(HttpApi.make("opencode-client").add(Api.groups["server.session"]), {
- groupNames: { "server.session": "sessions" },
-})
+const contract = compile(ClientApi, { groupNames, endpointNames, omitEndpoints })
await Effect.runPromise(
Effect.all(
[
- write(emitPromise(contract), fileURLToPath(new URL("../src/generated", import.meta.url))),
write(
- emitEffectImported(contract, { module: "../contract", group: "SessionGroup" }),
+ emitPromise(contract, {
+ outputTypes: {
+ "events.subscribe": {
+ name: "OpenCodeEventEncoded",
+ import: 'import type { OpenCodeEventEncoded } from "@opencode-ai/protocol/groups/event"',
+ },
+ },
+ }),
+ fileURLToPath(new URL("../src/generated", import.meta.url)),
+ ),
+ write(
+ emitEffectImported(contract, { module: "../contract", api: "ClientApi" }),
fileURLToPath(new URL("../src/generated-effect", import.meta.url)),
),
],
diff --git a/packages/client/src/contract.ts b/packages/client/src/contract.ts
index 2190c130ca..413fea9dc3 100644
--- a/packages/client/src/contract.ts
+++ b/packages/client/src/contract.ts
@@ -11,9 +11,43 @@ class SessionLocationMiddleware extends HttpApiMiddleware.Service
+type RawClient = HttpApiClient.ForApi
const mapClientError = (error: E) =>
HttpClientError.isHttpClientError(error) || Schema.isSchemaError(error) || Sse.Retry.is(error)
? new ClientError({ cause: error })
: error
-type Endpoint0_0Request = Parameters[0]
-type Endpoint0_0Input = {
- readonly workspace?: Endpoint0_0Request["query"]["workspace"]
- readonly limit?: Endpoint0_0Request["query"]["limit"]
- readonly order?: Endpoint0_0Request["query"]["order"]
- readonly search?: Endpoint0_0Request["query"]["search"]
- readonly directory?: Endpoint0_0Request["query"]["directory"]
- readonly project?: Endpoint0_0Request["query"]["project"]
- readonly subpath?: Endpoint0_0Request["query"]["subpath"]
- readonly cursor?: Endpoint0_0Request["query"]["cursor"]
+const Endpoint0_0 = (raw: RawClient["server.health"]) => () =>
+ raw["health.get"]({}).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup0 = (raw: RawClient["server.health"]) => ({ get: Endpoint0_0(raw) })
+
+type Endpoint1_0Request = Parameters[0]
+type Endpoint1_0Input = { readonly location?: Endpoint1_0Request["query"]["location"] }
+const Endpoint1_0 = (raw: RawClient["server.location"]) => (input?: Endpoint1_0Input) =>
+ raw["location.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup1 = (raw: RawClient["server.location"]) => ({ get: Endpoint1_0(raw) })
+
+type Endpoint2_0Request = Parameters[0]
+type Endpoint2_0Input = { readonly location?: Endpoint2_0Request["query"]["location"] }
+const Endpoint2_0 = (raw: RawClient["server.agent"]) => (input?: Endpoint2_0Input) =>
+ raw["agent.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup2 = (raw: RawClient["server.agent"]) => ({ list: Endpoint2_0(raw) })
+
+type Endpoint3_0Request = Parameters[0]
+type Endpoint3_0Input = {
+ readonly workspace?: Endpoint3_0Request["query"]["workspace"]
+ readonly limit?: Endpoint3_0Request["query"]["limit"]
+ readonly order?: Endpoint3_0Request["query"]["order"]
+ readonly search?: Endpoint3_0Request["query"]["search"]
+ readonly directory?: Endpoint3_0Request["query"]["directory"]
+ readonly project?: Endpoint3_0Request["query"]["project"]
+ readonly subpath?: Endpoint3_0Request["query"]["subpath"]
+ readonly cursor?: Endpoint3_0Request["query"]["cursor"]
}
-const Endpoint0_0 = (raw: RawClient["server.session"]) => (input?: Endpoint0_0Input) =>
+const Endpoint3_0 = (raw: RawClient["server.session"]) => (input?: Endpoint3_0Input) =>
raw["session.list"]({
query: {
- workspace: input?.workspace,
- limit: input?.limit,
- order: input?.order,
- search: input?.search,
- directory: input?.directory,
- project: input?.project,
- subpath: input?.subpath,
- cursor: input?.cursor,
+ workspace: input?.["workspace"],
+ limit: input?.["limit"],
+ order: input?.["order"],
+ search: input?.["search"],
+ directory: input?.["directory"],
+ project: input?.["project"],
+ subpath: input?.["subpath"],
+ cursor: input?.["cursor"],
},
}).pipe(Effect.mapError(mapClientError))
-type Endpoint0_1Request = Parameters[0]
-type Endpoint0_1Input = {
- readonly id?: Endpoint0_1Request["payload"]["id"]
- readonly agent?: Endpoint0_1Request["payload"]["agent"]
- readonly model?: Endpoint0_1Request["payload"]["model"]
- readonly location?: Endpoint0_1Request["payload"]["location"]
+type Endpoint3_1Request = Parameters[0]
+type Endpoint3_1Input = {
+ readonly id?: Endpoint3_1Request["payload"]["id"]
+ readonly agent?: Endpoint3_1Request["payload"]["agent"]
+ readonly model?: Endpoint3_1Request["payload"]["model"]
+ readonly location?: Endpoint3_1Request["payload"]["location"]
}
-const Endpoint0_1 = (raw: RawClient["server.session"]) => (input?: Endpoint0_1Input) =>
+const Endpoint3_1 = (raw: RawClient["server.session"]) => (input?: Endpoint3_1Input) =>
raw["session.create"]({
- payload: { id: input?.id, agent: input?.agent, model: input?.model, location: input?.location },
+ payload: { id: input?.["id"], agent: input?.["agent"], model: input?.["model"], location: input?.["location"] },
}).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
-const Endpoint0_2 = (raw: RawClient["server.session"]) => () =>
+const Endpoint3_2 = (raw: RawClient["server.session"]) => () =>
raw["session.active"]({}).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
-type Endpoint0_3Request = Parameters[0]
-type Endpoint0_3Input = { readonly sessionID: Endpoint0_3Request["params"]["sessionID"] }
-const Endpoint0_3 = (raw: RawClient["server.session"]) => (input: Endpoint0_3Input) =>
- raw["session.get"]({ params: { sessionID: input.sessionID } }).pipe(
+type Endpoint3_3Request = Parameters[0]
+type Endpoint3_3Input = { readonly sessionID: Endpoint3_3Request["params"]["sessionID"] }
+const Endpoint3_3 = (raw: RawClient["server.session"]) => (input: Endpoint3_3Input) =>
+ raw["session.get"]({ params: { sessionID: input["sessionID"] } }).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
-type Endpoint0_4Request = Parameters[0]
-type Endpoint0_4Input = {
- readonly sessionID: Endpoint0_4Request["params"]["sessionID"]
- readonly agent: Endpoint0_4Request["payload"]["agent"]
+type Endpoint3_4Request = Parameters[0]
+type Endpoint3_4Input = {
+ readonly sessionID: Endpoint3_4Request["params"]["sessionID"]
+ readonly agent: Endpoint3_4Request["payload"]["agent"]
}
-const Endpoint0_4 = (raw: RawClient["server.session"]) => (input: Endpoint0_4Input) =>
- raw["session.switchAgent"]({ params: { sessionID: input.sessionID }, payload: { agent: input.agent } }).pipe(
+const Endpoint3_4 = (raw: RawClient["server.session"]) => (input: Endpoint3_4Input) =>
+ raw["session.switchAgent"]({ params: { sessionID: input["sessionID"] }, payload: { agent: input["agent"] } }).pipe(
Effect.mapError(mapClientError),
)
-type Endpoint0_5Request = Parameters[0]
-type Endpoint0_5Input = {
- readonly sessionID: Endpoint0_5Request["params"]["sessionID"]
- readonly model: Endpoint0_5Request["payload"]["model"]
+type Endpoint3_5Request = Parameters[0]
+type Endpoint3_5Input = {
+ readonly sessionID: Endpoint3_5Request["params"]["sessionID"]
+ readonly model: Endpoint3_5Request["payload"]["model"]
}
-const Endpoint0_5 = (raw: RawClient["server.session"]) => (input: Endpoint0_5Input) =>
- raw["session.switchModel"]({ params: { sessionID: input.sessionID }, payload: { model: input.model } }).pipe(
+const Endpoint3_5 = (raw: RawClient["server.session"]) => (input: Endpoint3_5Input) =>
+ raw["session.switchModel"]({ params: { sessionID: input["sessionID"] }, payload: { model: input["model"] } }).pipe(
Effect.mapError(mapClientError),
)
-type Endpoint0_6Request = Parameters[0]
-type Endpoint0_6Input = {
- readonly sessionID: Endpoint0_6Request["params"]["sessionID"]
- readonly title: Endpoint0_6Request["payload"]["title"]
+type Endpoint3_6Request = Parameters[0]
+type Endpoint3_6Input = {
+ readonly sessionID: Endpoint3_6Request["params"]["sessionID"]
+ readonly title: Endpoint3_6Request["payload"]["title"]
}
-const Endpoint0_6 = (raw: RawClient["server.session"]) => (input: Endpoint0_6Input) =>
- raw["session.rename"]({ params: { sessionID: input.sessionID }, payload: { title: input.title } }).pipe(
+const Endpoint3_6 = (raw: RawClient["server.session"]) => (input: Endpoint3_6Input) =>
+ raw["session.rename"]({ params: { sessionID: input["sessionID"] }, payload: { title: input["title"] } }).pipe(
Effect.mapError(mapClientError),
)
-type Endpoint0_7Request = Parameters[0]
-type Endpoint0_7Input = {
- readonly sessionID: Endpoint0_7Request["params"]["sessionID"]
- readonly id?: Endpoint0_7Request["payload"]["id"]
- readonly prompt: Endpoint0_7Request["payload"]["prompt"]
- readonly delivery?: Endpoint0_7Request["payload"]["delivery"]
- readonly resume?: Endpoint0_7Request["payload"]["resume"]
+type Endpoint3_7Request = Parameters[0]
+type Endpoint3_7Input = {
+ readonly sessionID: Endpoint3_7Request["params"]["sessionID"]
+ readonly id?: Endpoint3_7Request["payload"]["id"]
+ readonly prompt: Endpoint3_7Request["payload"]["prompt"]
+ readonly delivery?: Endpoint3_7Request["payload"]["delivery"]
+ readonly resume?: Endpoint3_7Request["payload"]["resume"]
}
-const Endpoint0_7 = (raw: RawClient["server.session"]) => (input: Endpoint0_7Input) =>
+const Endpoint3_7 = (raw: RawClient["server.session"]) => (input: Endpoint3_7Input) =>
raw["session.prompt"]({
- params: { sessionID: input.sessionID },
- payload: { id: input.id, prompt: input.prompt, delivery: input.delivery, resume: input.resume },
+ params: { sessionID: input["sessionID"] },
+ payload: { id: input["id"], prompt: input["prompt"], delivery: input["delivery"], resume: input["resume"] },
}).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
-type Endpoint0_8Request = Parameters[0]
-type Endpoint0_8Input = { readonly sessionID: Endpoint0_8Request["params"]["sessionID"] }
-const Endpoint0_8 = (raw: RawClient["server.session"]) => (input: Endpoint0_8Input) =>
- raw["session.compact"]({ params: { sessionID: input.sessionID } }).pipe(Effect.mapError(mapClientError))
+type Endpoint3_8Request = Parameters[0]
+type Endpoint3_8Input = { readonly sessionID: Endpoint3_8Request["params"]["sessionID"] }
+const Endpoint3_8 = (raw: RawClient["server.session"]) => (input: Endpoint3_8Input) =>
+ raw["session.compact"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
-type Endpoint0_9Request = Parameters[0]
-type Endpoint0_9Input = { readonly sessionID: Endpoint0_9Request["params"]["sessionID"] }
-const Endpoint0_9 = (raw: RawClient["server.session"]) => (input: Endpoint0_9Input) =>
- raw["session.wait"]({ params: { sessionID: input.sessionID } }).pipe(Effect.mapError(mapClientError))
+type Endpoint3_9Request = Parameters[0]
+type Endpoint3_9Input = { readonly sessionID: Endpoint3_9Request["params"]["sessionID"] }
+const Endpoint3_9 = (raw: RawClient["server.session"]) => (input: Endpoint3_9Input) =>
+ raw["session.wait"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
-type Endpoint0_10Request = Parameters[0]
-type Endpoint0_10Input = {
- readonly sessionID: Endpoint0_10Request["params"]["sessionID"]
- readonly messageID: Endpoint0_10Request["payload"]["messageID"]
- readonly files?: Endpoint0_10Request["payload"]["files"]
+type Endpoint3_10Request = Parameters[0]
+type Endpoint3_10Input = {
+ readonly sessionID: Endpoint3_10Request["params"]["sessionID"]
+ readonly messageID: Endpoint3_10Request["payload"]["messageID"]
+ readonly files?: Endpoint3_10Request["payload"]["files"]
}
-const Endpoint0_10 = (raw: RawClient["server.session"]) => (input: Endpoint0_10Input) =>
+const Endpoint3_10 = (raw: RawClient["server.session"]) => (input: Endpoint3_10Input) =>
raw["session.revert.stage"]({
- params: { sessionID: input.sessionID },
- payload: { messageID: input.messageID, files: input.files },
+ params: { sessionID: input["sessionID"] },
+ payload: { messageID: input["messageID"], files: input["files"] },
}).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
-type Endpoint0_11Request = Parameters[0]
-type Endpoint0_11Input = { readonly sessionID: Endpoint0_11Request["params"]["sessionID"] }
-const Endpoint0_11 = (raw: RawClient["server.session"]) => (input: Endpoint0_11Input) =>
- raw["session.revert.clear"]({ params: { sessionID: input.sessionID } }).pipe(Effect.mapError(mapClientError))
+type Endpoint3_11Request = Parameters[0]
+type Endpoint3_11Input = { readonly sessionID: Endpoint3_11Request["params"]["sessionID"] }
+const Endpoint3_11 = (raw: RawClient["server.session"]) => (input: Endpoint3_11Input) =>
+ raw["session.revert.clear"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
-type Endpoint0_12Request = Parameters[0]
-type Endpoint0_12Input = { readonly sessionID: Endpoint0_12Request["params"]["sessionID"] }
-const Endpoint0_12 = (raw: RawClient["server.session"]) => (input: Endpoint0_12Input) =>
- raw["session.revert.commit"]({ params: { sessionID: input.sessionID } }).pipe(Effect.mapError(mapClientError))
+type Endpoint3_12Request = Parameters[0]
+type Endpoint3_12Input = { readonly sessionID: Endpoint3_12Request["params"]["sessionID"] }
+const Endpoint3_12 = (raw: RawClient["server.session"]) => (input: Endpoint3_12Input) =>
+ raw["session.revert.commit"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
-type Endpoint0_13Request = Parameters[0]
-type Endpoint0_13Input = { readonly sessionID: Endpoint0_13Request["params"]["sessionID"] }
-const Endpoint0_13 = (raw: RawClient["server.session"]) => (input: Endpoint0_13Input) =>
- raw["session.context"]({ params: { sessionID: input.sessionID } }).pipe(
+type Endpoint3_13Request = Parameters[0]
+type Endpoint3_13Input = { readonly sessionID: Endpoint3_13Request["params"]["sessionID"] }
+const Endpoint3_13 = (raw: RawClient["server.session"]) => (input: Endpoint3_13Input) =>
+ raw["session.context"]({ params: { sessionID: input["sessionID"] } }).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
-type Endpoint0_14Request = Parameters[0]
-type Endpoint0_14Input = {
- readonly sessionID: Endpoint0_14Request["params"]["sessionID"]
- readonly after?: Endpoint0_14Request["query"]["after"]
+type Endpoint3_14Request = Parameters[0]
+type Endpoint3_14Input = {
+ readonly sessionID: Endpoint3_14Request["params"]["sessionID"]
+ readonly limit?: Endpoint3_14Request["query"]["limit"]
+ readonly after?: Endpoint3_14Request["query"]["after"]
}
-const Endpoint0_14 = (raw: RawClient["server.session"]) => (input: Endpoint0_14Input) =>
+const Endpoint3_14 = (raw: RawClient["server.session"]) => (input: Endpoint3_14Input) =>
+ raw["session.history"]({
+ params: { sessionID: input["sessionID"] },
+ query: { limit: input["limit"], after: input["after"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint3_15Request = Parameters[0]
+type Endpoint3_15Input = {
+ readonly sessionID: Endpoint3_15Request["params"]["sessionID"]
+ readonly after?: Endpoint3_15Request["query"]["after"]
+}
+const Endpoint3_15 = (raw: RawClient["server.session"]) => (input: Endpoint3_15Input) =>
Stream.unwrap(
- raw["session.events"]({ params: { sessionID: input.sessionID }, query: { after: input.after } }).pipe(
+ raw["session.events"]({ params: { sessionID: input["sessionID"] }, query: { after: input["after"] } }).pipe(
Effect.mapError(mapClientError),
Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError))),
),
)
-type Endpoint0_15Request = Parameters[0]
-type Endpoint0_15Input = { readonly sessionID: Endpoint0_15Request["params"]["sessionID"] }
-const Endpoint0_15 = (raw: RawClient["server.session"]) => (input: Endpoint0_15Input) =>
- raw["session.interrupt"]({ params: { sessionID: input.sessionID } }).pipe(Effect.mapError(mapClientError))
+type Endpoint3_16Request = Parameters[0]
+type Endpoint3_16Input = { readonly sessionID: Endpoint3_16Request["params"]["sessionID"] }
+const Endpoint3_16 = (raw: RawClient["server.session"]) => (input: Endpoint3_16Input) =>
+ raw["session.interrupt"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError))
-type Endpoint0_16Request = Parameters[0]
-type Endpoint0_16Input = {
- readonly sessionID: Endpoint0_16Request["params"]["sessionID"]
- readonly messageID: Endpoint0_16Request["params"]["messageID"]
+type Endpoint3_17Request = Parameters[0]
+type Endpoint3_17Input = {
+ readonly sessionID: Endpoint3_17Request["params"]["sessionID"]
+ readonly messageID: Endpoint3_17Request["params"]["messageID"]
}
-const Endpoint0_16 = (raw: RawClient["server.session"]) => (input: Endpoint0_16Input) =>
- raw["session.message"]({ params: { sessionID: input.sessionID, messageID: input.messageID } }).pipe(
+const Endpoint3_17 = (raw: RawClient["server.session"]) => (input: Endpoint3_17Input) =>
+ raw["session.message"]({ params: { sessionID: input["sessionID"], messageID: input["messageID"] } }).pipe(
Effect.mapError(mapClientError),
Effect.map((value) => value.data),
)
-const adaptGroup0 = (raw: RawClient["server.session"]) => ({
- list: Endpoint0_0(raw),
- create: Endpoint0_1(raw),
- active: Endpoint0_2(raw),
- get: Endpoint0_3(raw),
- switchAgent: Endpoint0_4(raw),
- switchModel: Endpoint0_5(raw),
- rename: Endpoint0_6(raw),
- prompt: Endpoint0_7(raw),
- compact: Endpoint0_8(raw),
- wait: Endpoint0_9(raw),
- stage: Endpoint0_10(raw),
- clear: Endpoint0_11(raw),
- commit: Endpoint0_12(raw),
- context: Endpoint0_13(raw),
- events: Endpoint0_14(raw),
- interrupt: Endpoint0_15(raw),
- message: Endpoint0_16(raw),
+const adaptGroup3 = (raw: RawClient["server.session"]) => ({
+ list: Endpoint3_0(raw),
+ create: Endpoint3_1(raw),
+ active: Endpoint3_2(raw),
+ get: Endpoint3_3(raw),
+ switchAgent: Endpoint3_4(raw),
+ switchModel: Endpoint3_5(raw),
+ rename: Endpoint3_6(raw),
+ prompt: Endpoint3_7(raw),
+ compact: Endpoint3_8(raw),
+ wait: Endpoint3_9(raw),
+ stage: Endpoint3_10(raw),
+ clear: Endpoint3_11(raw),
+ commit: Endpoint3_12(raw),
+ context: Endpoint3_13(raw),
+ history: Endpoint3_14(raw),
+ events: Endpoint3_15(raw),
+ interrupt: Endpoint3_16(raw),
+ message: Endpoint3_17(raw),
})
-const adaptClient = (raw: RawClient) => ({ sessions: adaptGroup0(raw["server.session"]) })
+type Endpoint4_0Request = Parameters[0]
+type Endpoint4_0Input = {
+ readonly sessionID: Endpoint4_0Request["params"]["sessionID"]
+ readonly limit?: Endpoint4_0Request["query"]["limit"]
+ readonly order?: Endpoint4_0Request["query"]["order"]
+ readonly cursor?: Endpoint4_0Request["query"]["cursor"]
+}
+const Endpoint4_0 = (raw: RawClient["server.message"]) => (input: Endpoint4_0Input) =>
+ raw["session.messages"]({
+ params: { sessionID: input["sessionID"] },
+ query: { limit: input["limit"], order: input["order"], cursor: input["cursor"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup4 = (raw: RawClient["server.message"]) => ({ list: Endpoint4_0(raw) })
+
+type Endpoint5_0Request = Parameters[0]
+type Endpoint5_0Input = { readonly location?: Endpoint5_0Request["query"]["location"] }
+const Endpoint5_0 = (raw: RawClient["server.model"]) => (input?: Endpoint5_0Input) =>
+ raw["model.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup5 = (raw: RawClient["server.model"]) => ({ list: Endpoint5_0(raw) })
+
+type Endpoint6_0Request = Parameters[0]
+type Endpoint6_0Input = { readonly location?: Endpoint6_0Request["query"]["location"] }
+const Endpoint6_0 = (raw: RawClient["server.provider"]) => (input?: Endpoint6_0Input) =>
+ raw["provider.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint6_1Request = Parameters[0]
+type Endpoint6_1Input = {
+ readonly providerID: Endpoint6_1Request["params"]["providerID"]
+ readonly location?: Endpoint6_1Request["query"]["location"]
+}
+const Endpoint6_1 = (raw: RawClient["server.provider"]) => (input: Endpoint6_1Input) =>
+ raw["provider.get"]({ params: { providerID: input["providerID"] }, query: { location: input["location"] } }).pipe(
+ Effect.mapError(mapClientError),
+ )
+
+const adaptGroup6 = (raw: RawClient["server.provider"]) => ({ list: Endpoint6_0(raw), get: Endpoint6_1(raw) })
+
+type Endpoint7_0Request = Parameters[0]
+type Endpoint7_0Input = { readonly location?: Endpoint7_0Request["query"]["location"] }
+const Endpoint7_0 = (raw: RawClient["server.integration"]) => (input?: Endpoint7_0Input) =>
+ raw["integration.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint7_1Request = Parameters[0]
+type Endpoint7_1Input = {
+ readonly integrationID: Endpoint7_1Request["params"]["integrationID"]
+ readonly location?: Endpoint7_1Request["query"]["location"]
+}
+const Endpoint7_1 = (raw: RawClient["server.integration"]) => (input: Endpoint7_1Input) =>
+ raw["integration.get"]({
+ params: { integrationID: input["integrationID"] },
+ query: { location: input["location"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint7_2Request = Parameters[0]
+type Endpoint7_2Input = {
+ readonly integrationID: Endpoint7_2Request["params"]["integrationID"]
+ readonly location?: Endpoint7_2Request["query"]["location"]
+ readonly key: Endpoint7_2Request["payload"]["key"]
+ readonly label?: Endpoint7_2Request["payload"]["label"]
+}
+const Endpoint7_2 = (raw: RawClient["server.integration"]) => (input: Endpoint7_2Input) =>
+ raw["integration.connect.key"]({
+ params: { integrationID: input["integrationID"] },
+ query: { location: input["location"] },
+ payload: { key: input["key"], label: input["label"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint7_3Request = Parameters[0]
+type Endpoint7_3Input = {
+ readonly integrationID: Endpoint7_3Request["params"]["integrationID"]
+ readonly location?: Endpoint7_3Request["query"]["location"]
+ readonly methodID: Endpoint7_3Request["payload"]["methodID"]
+ readonly inputs: Endpoint7_3Request["payload"]["inputs"]
+ readonly label?: Endpoint7_3Request["payload"]["label"]
+}
+const Endpoint7_3 = (raw: RawClient["server.integration"]) => (input: Endpoint7_3Input) =>
+ raw["integration.connect.oauth"]({
+ params: { integrationID: input["integrationID"] },
+ query: { location: input["location"] },
+ payload: { methodID: input["methodID"], inputs: input["inputs"], label: input["label"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint7_4Request = Parameters[0]
+type Endpoint7_4Input = {
+ readonly attemptID: Endpoint7_4Request["params"]["attemptID"]
+ readonly location?: Endpoint7_4Request["query"]["location"]
+}
+const Endpoint7_4 = (raw: RawClient["server.integration"]) => (input: Endpoint7_4Input) =>
+ raw["integration.attempt.status"]({
+ params: { attemptID: input["attemptID"] },
+ query: { location: input["location"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint7_5Request = Parameters[0]
+type Endpoint7_5Input = {
+ readonly attemptID: Endpoint7_5Request["params"]["attemptID"]
+ readonly location?: Endpoint7_5Request["query"]["location"]
+ readonly code?: Endpoint7_5Request["payload"]["code"]
+}
+const Endpoint7_5 = (raw: RawClient["server.integration"]) => (input: Endpoint7_5Input) =>
+ raw["integration.attempt.complete"]({
+ params: { attemptID: input["attemptID"] },
+ query: { location: input["location"] },
+ payload: { code: input["code"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint7_6Request = Parameters[0]
+type Endpoint7_6Input = {
+ readonly attemptID: Endpoint7_6Request["params"]["attemptID"]
+ readonly location?: Endpoint7_6Request["query"]["location"]
+}
+const Endpoint7_6 = (raw: RawClient["server.integration"]) => (input: Endpoint7_6Input) =>
+ raw["integration.attempt.cancel"]({
+ params: { attemptID: input["attemptID"] },
+ query: { location: input["location"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup7 = (raw: RawClient["server.integration"]) => ({
+ list: Endpoint7_0(raw),
+ get: Endpoint7_1(raw),
+ connectKey: Endpoint7_2(raw),
+ connectOauth: Endpoint7_3(raw),
+ attemptStatus: Endpoint7_4(raw),
+ attemptComplete: Endpoint7_5(raw),
+ attemptCancel: Endpoint7_6(raw),
+})
+
+type Endpoint8_0Request = Parameters[0]
+type Endpoint8_0Input = {
+ readonly credentialID: Endpoint8_0Request["params"]["credentialID"]
+ readonly location?: Endpoint8_0Request["query"]["location"]
+ readonly label: Endpoint8_0Request["payload"]["label"]
+}
+const Endpoint8_0 = (raw: RawClient["server.credential"]) => (input: Endpoint8_0Input) =>
+ raw["credential.update"]({
+ params: { credentialID: input["credentialID"] },
+ query: { location: input["location"] },
+ payload: { label: input["label"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint8_1Request = Parameters[0]
+type Endpoint8_1Input = {
+ readonly credentialID: Endpoint8_1Request["params"]["credentialID"]
+ readonly location?: Endpoint8_1Request["query"]["location"]
+}
+const Endpoint8_1 = (raw: RawClient["server.credential"]) => (input: Endpoint8_1Input) =>
+ raw["credential.remove"]({
+ params: { credentialID: input["credentialID"] },
+ query: { location: input["location"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup8 = (raw: RawClient["server.credential"]) => ({ update: Endpoint8_0(raw), remove: Endpoint8_1(raw) })
+
+type Endpoint9_0Request = Parameters[0]
+type Endpoint9_0Input = { readonly location?: Endpoint9_0Request["query"]["location"] }
+const Endpoint9_0 = (raw: RawClient["server.permission"]) => (input?: Endpoint9_0Input) =>
+ raw["permission.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint9_1Request = Parameters[0]
+type Endpoint9_1Input = { readonly projectID?: Endpoint9_1Request["query"]["projectID"] }
+const Endpoint9_1 = (raw: RawClient["server.permission"]) => (input?: Endpoint9_1Input) =>
+ raw["permission.saved.list"]({ query: { projectID: input?.["projectID"] } }).pipe(
+ Effect.mapError(mapClientError),
+ Effect.map((value) => value.data),
+ )
+
+type Endpoint9_2Request = Parameters[0]
+type Endpoint9_2Input = { readonly id: Endpoint9_2Request["params"]["id"] }
+const Endpoint9_2 = (raw: RawClient["server.permission"]) => (input: Endpoint9_2Input) =>
+ raw["permission.saved.remove"]({ params: { id: input["id"] } }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint9_3Request = Parameters[0]
+type Endpoint9_3Input = {
+ readonly sessionID: Endpoint9_3Request["params"]["sessionID"]
+ readonly id?: Endpoint9_3Request["payload"]["id"]
+ readonly action: Endpoint9_3Request["payload"]["action"]
+ readonly resources: Endpoint9_3Request["payload"]["resources"]
+ readonly save?: Endpoint9_3Request["payload"]["save"]
+ readonly metadata?: Endpoint9_3Request["payload"]["metadata"]
+ readonly source?: Endpoint9_3Request["payload"]["source"]
+ readonly agent?: Endpoint9_3Request["payload"]["agent"]
+}
+const Endpoint9_3 = (raw: RawClient["server.permission"]) => (input: Endpoint9_3Input) =>
+ raw["session.permission.create"]({
+ params: { sessionID: input["sessionID"] },
+ payload: {
+ id: input["id"],
+ action: input["action"],
+ resources: input["resources"],
+ save: input["save"],
+ metadata: input["metadata"],
+ source: input["source"],
+ agent: input["agent"],
+ },
+ }).pipe(
+ Effect.mapError(mapClientError),
+ Effect.map((value) => value.data),
+ )
+
+type Endpoint9_4Request = Parameters[0]
+type Endpoint9_4Input = { readonly sessionID: Endpoint9_4Request["params"]["sessionID"] }
+const Endpoint9_4 = (raw: RawClient["server.permission"]) => (input: Endpoint9_4Input) =>
+ raw["session.permission.list"]({ params: { sessionID: input["sessionID"] } }).pipe(
+ Effect.mapError(mapClientError),
+ Effect.map((value) => value.data),
+ )
+
+type Endpoint9_5Request = Parameters[0]
+type Endpoint9_5Input = {
+ readonly sessionID: Endpoint9_5Request["params"]["sessionID"]
+ readonly requestID: Endpoint9_5Request["params"]["requestID"]
+}
+const Endpoint9_5 = (raw: RawClient["server.permission"]) => (input: Endpoint9_5Input) =>
+ raw["session.permission.get"]({ params: { sessionID: input["sessionID"], requestID: input["requestID"] } }).pipe(
+ Effect.mapError(mapClientError),
+ Effect.map((value) => value.data),
+ )
+
+type Endpoint9_6Request = Parameters[0]
+type Endpoint9_6Input = {
+ readonly sessionID: Endpoint9_6Request["params"]["sessionID"]
+ readonly requestID: Endpoint9_6Request["params"]["requestID"]
+ readonly reply: Endpoint9_6Request["payload"]["reply"]
+ readonly message?: Endpoint9_6Request["payload"]["message"]
+}
+const Endpoint9_6 = (raw: RawClient["server.permission"]) => (input: Endpoint9_6Input) =>
+ raw["session.permission.reply"]({
+ params: { sessionID: input["sessionID"], requestID: input["requestID"] },
+ payload: { reply: input["reply"], message: input["message"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup9 = (raw: RawClient["server.permission"]) => ({
+ listRequests: Endpoint9_0(raw),
+ listSaved: Endpoint9_1(raw),
+ removeSaved: Endpoint9_2(raw),
+ create: Endpoint9_3(raw),
+ list: Endpoint9_4(raw),
+ get: Endpoint9_5(raw),
+ reply: Endpoint9_6(raw),
+})
+
+type Endpoint10_0Request = Parameters[0]
+type Endpoint10_0Input = {
+ readonly location?: Endpoint10_0Request["query"]["location"]
+ readonly path?: Endpoint10_0Request["query"]["path"]
+}
+const Endpoint10_0 = (raw: RawClient["server.fs"]) => (input?: Endpoint10_0Input) =>
+ raw["fs.list"]({ query: { location: input?.["location"], path: input?.["path"] } }).pipe(
+ Effect.mapError(mapClientError),
+ )
+
+type Endpoint10_1Request = Parameters[0]
+type Endpoint10_1Input = {
+ readonly location?: Endpoint10_1Request["query"]["location"]
+ readonly query: Endpoint10_1Request["query"]["query"]
+ readonly type?: Endpoint10_1Request["query"]["type"]
+ readonly limit?: Endpoint10_1Request["query"]["limit"]
+}
+const Endpoint10_1 = (raw: RawClient["server.fs"]) => (input: Endpoint10_1Input) =>
+ raw["fs.find"]({
+ query: { location: input["location"], query: input["query"], type: input["type"], limit: input["limit"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup10 = (raw: RawClient["server.fs"]) => ({ list: Endpoint10_0(raw), find: Endpoint10_1(raw) })
+
+type Endpoint11_0Request = Parameters[0]
+type Endpoint11_0Input = { readonly location?: Endpoint11_0Request["query"]["location"] }
+const Endpoint11_0 = (raw: RawClient["server.command"]) => (input?: Endpoint11_0Input) =>
+ raw["command.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup11 = (raw: RawClient["server.command"]) => ({ list: Endpoint11_0(raw) })
+
+type Endpoint12_0Request = Parameters[0]
+type Endpoint12_0Input = { readonly location?: Endpoint12_0Request["query"]["location"] }
+const Endpoint12_0 = (raw: RawClient["server.skill"]) => (input?: Endpoint12_0Input) =>
+ raw["skill.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup12 = (raw: RawClient["server.skill"]) => ({ list: Endpoint12_0(raw) })
+
+const Endpoint13_0 = (raw: RawClient["server.event"]) => () =>
+ Stream.unwrap(
+ raw["event.subscribe"]({}).pipe(
+ Effect.mapError(mapClientError),
+ Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError))),
+ ),
+ )
+
+const adaptGroup13 = (raw: RawClient["server.event"]) => ({ subscribe: Endpoint13_0(raw) })
+
+type Endpoint14_0Request = Parameters[0]
+type Endpoint14_0Input = { readonly location?: Endpoint14_0Request["query"]["location"] }
+const Endpoint14_0 = (raw: RawClient["server.pty"]) => (input?: Endpoint14_0Input) =>
+ raw["pty.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint14_1Request = Parameters[0]
+type Endpoint14_1Input = {
+ readonly location?: Endpoint14_1Request["query"]["location"]
+ readonly command?: Endpoint14_1Request["payload"]["command"]
+ readonly args?: Endpoint14_1Request["payload"]["args"]
+ readonly cwd?: Endpoint14_1Request["payload"]["cwd"]
+ readonly title?: Endpoint14_1Request["payload"]["title"]
+ readonly env?: Endpoint14_1Request["payload"]["env"]
+}
+const Endpoint14_1 = (raw: RawClient["server.pty"]) => (input?: Endpoint14_1Input) =>
+ raw["pty.create"]({
+ query: { location: input?.["location"] },
+ payload: {
+ command: input?.["command"],
+ args: input?.["args"],
+ cwd: input?.["cwd"],
+ title: input?.["title"],
+ env: input?.["env"],
+ },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint14_2Request = Parameters[0]
+type Endpoint14_2Input = {
+ readonly ptyID: Endpoint14_2Request["params"]["ptyID"]
+ readonly location?: Endpoint14_2Request["query"]["location"]
+}
+const Endpoint14_2 = (raw: RawClient["server.pty"]) => (input: Endpoint14_2Input) =>
+ raw["pty.get"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(
+ Effect.mapError(mapClientError),
+ )
+
+type Endpoint14_3Request = Parameters[0]
+type Endpoint14_3Input = {
+ readonly ptyID: Endpoint14_3Request["params"]["ptyID"]
+ readonly location?: Endpoint14_3Request["query"]["location"]
+ readonly title?: Endpoint14_3Request["payload"]["title"]
+ readonly size?: Endpoint14_3Request["payload"]["size"]
+}
+const Endpoint14_3 = (raw: RawClient["server.pty"]) => (input: Endpoint14_3Input) =>
+ raw["pty.update"]({
+ params: { ptyID: input["ptyID"] },
+ query: { location: input["location"] },
+ payload: { title: input["title"], size: input["size"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint14_4Request = Parameters[0]
+type Endpoint14_4Input = {
+ readonly ptyID: Endpoint14_4Request["params"]["ptyID"]
+ readonly location?: Endpoint14_4Request["query"]["location"]
+}
+const Endpoint14_4 = (raw: RawClient["server.pty"]) => (input: Endpoint14_4Input) =>
+ raw["pty.remove"]({ params: { ptyID: input["ptyID"] }, query: { location: input["location"] } }).pipe(
+ Effect.mapError(mapClientError),
+ )
+
+const adaptGroup14 = (raw: RawClient["server.pty"]) => ({
+ list: Endpoint14_0(raw),
+ create: Endpoint14_1(raw),
+ get: Endpoint14_2(raw),
+ update: Endpoint14_3(raw),
+ remove: Endpoint14_4(raw),
+})
+
+type Endpoint15_0Request = Parameters[0]
+type Endpoint15_0Input = { readonly location?: Endpoint15_0Request["query"]["location"] }
+const Endpoint15_0 = (raw: RawClient["server.question"]) => (input?: Endpoint15_0Input) =>
+ raw["question.request.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint15_1Request = Parameters[0]
+type Endpoint15_1Input = { readonly sessionID: Endpoint15_1Request["params"]["sessionID"] }
+const Endpoint15_1 = (raw: RawClient["server.question"]) => (input: Endpoint15_1Input) =>
+ raw["session.question.list"]({ params: { sessionID: input["sessionID"] } }).pipe(
+ Effect.mapError(mapClientError),
+ Effect.map((value) => value.data),
+ )
+
+type Endpoint15_2Request = Parameters[0]
+type Endpoint15_2Input = {
+ readonly sessionID: Endpoint15_2Request["params"]["sessionID"]
+ readonly requestID: Endpoint15_2Request["params"]["requestID"]
+ readonly answers: Endpoint15_2Request["payload"]["answers"]
+}
+const Endpoint15_2 = (raw: RawClient["server.question"]) => (input: Endpoint15_2Input) =>
+ raw["session.question.reply"]({
+ params: { sessionID: input["sessionID"], requestID: input["requestID"] },
+ payload: { answers: input["answers"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint15_3Request = Parameters[0]
+type Endpoint15_3Input = {
+ readonly sessionID: Endpoint15_3Request["params"]["sessionID"]
+ readonly requestID: Endpoint15_3Request["params"]["requestID"]
+}
+const Endpoint15_3 = (raw: RawClient["server.question"]) => (input: Endpoint15_3Input) =>
+ raw["session.question.reject"]({ params: { sessionID: input["sessionID"], requestID: input["requestID"] } }).pipe(
+ Effect.mapError(mapClientError),
+ )
+
+const adaptGroup15 = (raw: RawClient["server.question"]) => ({
+ listRequests: Endpoint15_0(raw),
+ list: Endpoint15_1(raw),
+ reply: Endpoint15_2(raw),
+ reject: Endpoint15_3(raw),
+})
+
+type Endpoint16_0Request = Parameters[0]
+type Endpoint16_0Input = { readonly location?: Endpoint16_0Request["query"]["location"] }
+const Endpoint16_0 = (raw: RawClient["server.reference"]) => (input?: Endpoint16_0Input) =>
+ raw["reference.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup16 = (raw: RawClient["server.reference"]) => ({ list: Endpoint16_0(raw) })
+
+type Endpoint17_0Request = Parameters[0]
+type Endpoint17_0Input = {
+ readonly projectID: Endpoint17_0Request["params"]["projectID"]
+ readonly location?: Endpoint17_0Request["query"]["location"]
+ readonly strategy: Endpoint17_0Request["payload"]["strategy"]
+ readonly directory: Endpoint17_0Request["payload"]["directory"]
+ readonly name?: Endpoint17_0Request["payload"]["name"]
+}
+const Endpoint17_0 = (raw: RawClient["server.projectCopy"]) => (input: Endpoint17_0Input) =>
+ raw["projectCopy.create"]({
+ params: { projectID: input["projectID"] },
+ query: { location: input["location"] },
+ payload: { strategy: input["strategy"], directory: input["directory"], name: input["name"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint17_1Request = Parameters[0]
+type Endpoint17_1Input = {
+ readonly projectID: Endpoint17_1Request["params"]["projectID"]
+ readonly location?: Endpoint17_1Request["query"]["location"]
+ readonly directory: Endpoint17_1Request["payload"]["directory"]
+ readonly force: Endpoint17_1Request["payload"]["force"]
+}
+const Endpoint17_1 = (raw: RawClient["server.projectCopy"]) => (input: Endpoint17_1Input) =>
+ raw["projectCopy.remove"]({
+ params: { projectID: input["projectID"] },
+ query: { location: input["location"] },
+ payload: { directory: input["directory"], force: input["force"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+type Endpoint17_2Request = Parameters[0]
+type Endpoint17_2Input = {
+ readonly projectID: Endpoint17_2Request["params"]["projectID"]
+ readonly location?: Endpoint17_2Request["query"]["location"]
+}
+const Endpoint17_2 = (raw: RawClient["server.projectCopy"]) => (input: Endpoint17_2Input) =>
+ raw["projectCopy.refresh"]({
+ params: { projectID: input["projectID"] },
+ query: { location: input["location"] },
+ }).pipe(Effect.mapError(mapClientError))
+
+const adaptGroup17 = (raw: RawClient["server.projectCopy"]) => ({
+ create: Endpoint17_0(raw),
+ remove: Endpoint17_1(raw),
+ refresh: Endpoint17_2(raw),
+})
+
+const adaptClient = (raw: RawClient) => ({
+ health: adaptGroup0(raw["server.health"]),
+ location: adaptGroup1(raw["server.location"]),
+ agents: adaptGroup2(raw["server.agent"]),
+ sessions: adaptGroup3(raw["server.session"]),
+ messages: adaptGroup4(raw["server.message"]),
+ models: adaptGroup5(raw["server.model"]),
+ providers: adaptGroup6(raw["server.provider"]),
+ integrations: adaptGroup7(raw["server.integration"]),
+ credentials: adaptGroup8(raw["server.credential"]),
+ permissions: adaptGroup9(raw["server.permission"]),
+ files: adaptGroup10(raw["server.fs"]),
+ commands: adaptGroup11(raw["server.command"]),
+ skills: adaptGroup12(raw["server.skill"]),
+ events: adaptGroup13(raw["server.event"]),
+ ptys: adaptGroup14(raw["server.pty"]),
+ questions: adaptGroup15(raw["server.question"]),
+ references: adaptGroup16(raw["server.reference"]),
+ projectCopies: adaptGroup17(raw["server.projectCopy"]),
+})
export const make = (options?: { readonly baseUrl?: URL | string }) =>
- HttpApiClient.make(Api, options).pipe(Effect.map(adaptClient))
+ HttpApiClient.make(ClientApi, options).pipe(Effect.map(adaptClient))
diff --git a/packages/client/src/generated/client.ts b/packages/client/src/generated/client.ts
index e1484e43dc..bbef1018ba 100644
--- a/packages/client/src/generated/client.ts
+++ b/packages/client/src/generated/client.ts
@@ -1,4 +1,9 @@
import type {
+ HealthGetOutput,
+ LocationGetInput,
+ LocationGetOutput,
+ AgentsListInput,
+ AgentsListOutput,
SessionsListInput,
SessionsListOutput,
SessionsCreateInput,
@@ -26,12 +31,89 @@ import type {
SessionsCommitOutput,
SessionsContextInput,
SessionsContextOutput,
+ SessionsHistoryInput,
+ SessionsHistoryOutput,
SessionsEventsInput,
SessionsEventsOutput,
SessionsInterruptInput,
SessionsInterruptOutput,
SessionsMessageInput,
SessionsMessageOutput,
+ MessagesListInput,
+ MessagesListOutput,
+ ModelsListInput,
+ ModelsListOutput,
+ ProvidersListInput,
+ ProvidersListOutput,
+ ProvidersGetInput,
+ ProvidersGetOutput,
+ IntegrationsListInput,
+ IntegrationsListOutput,
+ IntegrationsGetInput,
+ IntegrationsGetOutput,
+ IntegrationsConnectKeyInput,
+ IntegrationsConnectKeyOutput,
+ IntegrationsConnectOauthInput,
+ IntegrationsConnectOauthOutput,
+ IntegrationsAttemptStatusInput,
+ IntegrationsAttemptStatusOutput,
+ IntegrationsAttemptCompleteInput,
+ IntegrationsAttemptCompleteOutput,
+ IntegrationsAttemptCancelInput,
+ IntegrationsAttemptCancelOutput,
+ CredentialsUpdateInput,
+ CredentialsUpdateOutput,
+ CredentialsRemoveInput,
+ CredentialsRemoveOutput,
+ PermissionsListRequestsInput,
+ PermissionsListRequestsOutput,
+ PermissionsListSavedInput,
+ PermissionsListSavedOutput,
+ PermissionsRemoveSavedInput,
+ PermissionsRemoveSavedOutput,
+ PermissionsCreateInput,
+ PermissionsCreateOutput,
+ PermissionsListInput,
+ PermissionsListOutput,
+ PermissionsGetInput,
+ PermissionsGetOutput,
+ PermissionsReplyInput,
+ PermissionsReplyOutput,
+ FilesListInput,
+ FilesListOutput,
+ FilesFindInput,
+ FilesFindOutput,
+ CommandsListInput,
+ CommandsListOutput,
+ SkillsListInput,
+ SkillsListOutput,
+ EventsSubscribeOutput,
+ PtysListInput,
+ PtysListOutput,
+ PtysCreateInput,
+ PtysCreateOutput,
+ PtysGetInput,
+ PtysGetOutput,
+ PtysUpdateInput,
+ PtysUpdateOutput,
+ PtysRemoveInput,
+ PtysRemoveOutput,
+ QuestionsListRequestsInput,
+ QuestionsListRequestsOutput,
+ QuestionsListInput,
+ QuestionsListOutput,
+ QuestionsReplyInput,
+ QuestionsReplyOutput,
+ QuestionsRejectInput,
+ QuestionsRejectOutput,
+ ReferencesListInput,
+ ReferencesListOutput,
+ ProjectCopiesCreateInput,
+ ProjectCopiesCreateOutput,
+ ProjectCopiesRemoveInput,
+ ProjectCopiesRemoveOutput,
+ ProjectCopiesRefreshInput,
+ ProjectCopiesRefreshOutput,
} from "./types"
import { ClientError } from "./client-error"
@@ -167,6 +249,41 @@ export function make(options: ClientOptions) {
})
return {
+ health: {
+ get: (requestOptions?: RequestOptions) =>
+ request(
+ { method: "GET", path: `/api/health`, successStatus: 200, declaredStatuses: [401, 400], empty: false },
+ requestOptions,
+ ),
+ },
+ location: {
+ get: (input?: LocationGetInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/location`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ },
+ agents: {
+ list: (input?: AgentsListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/agent`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ },
sessions: {
list: (input?: SessionsListInput, requestOptions?: RequestOptions) =>
request(
@@ -174,14 +291,14 @@ export function make(options: ClientOptions) {
method: "GET",
path: `/api/session`,
query: {
- workspace: input?.workspace,
- limit: input?.limit,
- order: input?.order,
- search: input?.search,
- directory: input?.directory,
- project: input?.project,
- subpath: input?.subpath,
- cursor: input?.cursor,
+ workspace: input?.["workspace"],
+ limit: input?.["limit"],
+ order: input?.["order"],
+ search: input?.["search"],
+ directory: input?.["directory"],
+ project: input?.["project"],
+ subpath: input?.["subpath"],
+ cursor: input?.["cursor"],
},
successStatus: 200,
declaredStatuses: [400, 401],
@@ -194,7 +311,12 @@ export function make(options: ClientOptions) {
{
method: "POST",
path: `/api/session`,
- body: { id: input?.id, agent: input?.agent, model: input?.model, location: input?.location },
+ body: {
+ id: input?.["id"],
+ agent: input?.["agent"],
+ model: input?.["model"],
+ location: input?.["location"],
+ },
successStatus: 200,
declaredStatuses: [401, 400],
empty: false,
@@ -228,7 +350,7 @@ export function make(options: ClientOptions) {
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/agent`,
- body: { agent: input.agent },
+ body: { agent: input["agent"] },
successStatus: 204,
declaredStatuses: [404, 400, 401],
empty: true,
@@ -240,7 +362,7 @@ export function make(options: ClientOptions) {
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/model`,
- body: { model: input.model },
+ body: { model: input["model"] },
successStatus: 204,
declaredStatuses: [404, 400, 401],
empty: true,
@@ -252,7 +374,7 @@ export function make(options: ClientOptions) {
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/rename`,
- body: { title: input.title },
+ body: { title: input["title"] },
successStatus: 204,
declaredStatuses: [404, 400, 401],
empty: true,
@@ -264,7 +386,7 @@ export function make(options: ClientOptions) {
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/prompt`,
- body: { id: input.id, prompt: input.prompt, delivery: input.delivery, resume: input.resume },
+ body: { id: input["id"], prompt: input["prompt"], delivery: input["delivery"], resume: input["resume"] },
successStatus: 200,
declaredStatuses: [409, 404, 400, 401],
empty: false,
@@ -298,7 +420,7 @@ export function make(options: ClientOptions) {
{
method: "POST",
path: `/api/session/${encodeURIComponent(input.sessionID)}/revert/stage`,
- body: { messageID: input.messageID, files: input.files },
+ body: { messageID: input["messageID"], files: input["files"] },
successStatus: 200,
declaredStatuses: [404, 409, 500, 400, 401],
empty: false,
@@ -338,12 +460,24 @@ export function make(options: ClientOptions) {
},
requestOptions,
).then((value) => value.data),
+ history: (input: SessionsHistoryInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/session/${encodeURIComponent(input.sessionID)}/history`,
+ query: { limit: input["limit"], after: input["after"] },
+ successStatus: 200,
+ declaredStatuses: [404, 400, 401],
+ empty: false,
+ },
+ requestOptions,
+ ),
events: (input: SessionsEventsInput, requestOptions?: RequestOptions): AsyncIterable =>
sse(
{
method: "GET",
path: `/api/session/${encodeURIComponent(input.sessionID)}/event`,
- query: { after: input.after },
+ query: { after: input["after"] },
successStatus: 200,
declaredStatuses: [404, 400, 401],
empty: false,
@@ -373,6 +507,500 @@ export function make(options: ClientOptions) {
requestOptions,
).then((value) => value.data),
},
+ messages: {
+ list: (input: MessagesListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/session/${encodeURIComponent(input.sessionID)}/message`,
+ query: { limit: input["limit"], order: input["order"], cursor: input["cursor"] },
+ successStatus: 200,
+ declaredStatuses: [400, 404, 500, 401],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ },
+ models: {
+ list: (input?: ModelsListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/model`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [503, 401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ },
+ providers: {
+ list: (input?: ProvidersListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/provider`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [503, 401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ get: (input: ProvidersGetInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/provider/${encodeURIComponent(input.providerID)}`,
+ query: { location: input["location"] },
+ successStatus: 200,
+ declaredStatuses: [404, 503, 401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ },
+ integrations: {
+ list: (input?: IntegrationsListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/integration`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ get: (input: IntegrationsGetInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/integration/${encodeURIComponent(input.integrationID)}`,
+ query: { location: input["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ connectKey: (input: IntegrationsConnectKeyInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "POST",
+ path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/key`,
+ query: { location: input["location"] },
+ body: { key: input["key"], label: input["label"] },
+ successStatus: 204,
+ declaredStatuses: [400, 401],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ connectOauth: (input: IntegrationsConnectOauthInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "POST",
+ path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/oauth`,
+ query: { location: input["location"] },
+ body: { methodID: input["methodID"], inputs: input["inputs"], label: input["label"] },
+ successStatus: 200,
+ declaredStatuses: [400, 401],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ attemptStatus: (input: IntegrationsAttemptStatusInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/integration/attempt/${encodeURIComponent(input.attemptID)}`,
+ query: { location: input["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ attemptComplete: (input: IntegrationsAttemptCompleteInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "POST",
+ path: `/api/integration/attempt/${encodeURIComponent(input.attemptID)}/complete`,
+ query: { location: input["location"] },
+ body: { code: input["code"] },
+ successStatus: 204,
+ declaredStatuses: [400, 401],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ attemptCancel: (input: IntegrationsAttemptCancelInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "DELETE",
+ path: `/api/integration/attempt/${encodeURIComponent(input.attemptID)}`,
+ query: { location: input["location"] },
+ successStatus: 204,
+ declaredStatuses: [401, 400],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ },
+ credentials: {
+ update: (input: CredentialsUpdateInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "PATCH",
+ path: `/api/credential/${encodeURIComponent(input.credentialID)}`,
+ query: { location: input["location"] },
+ body: { label: input["label"] },
+ successStatus: 204,
+ declaredStatuses: [401, 400],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ remove: (input: CredentialsRemoveInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "DELETE",
+ path: `/api/credential/${encodeURIComponent(input.credentialID)}`,
+ query: { location: input["location"] },
+ successStatus: 204,
+ declaredStatuses: [401, 400],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ },
+ permissions: {
+ listRequests: (input?: PermissionsListRequestsInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/permission/request`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ listSaved: (input?: PermissionsListSavedInput, requestOptions?: RequestOptions) =>
+ request<{ readonly data: PermissionsListSavedOutput }>(
+ {
+ method: "GET",
+ path: `/api/permission/saved`,
+ query: { projectID: input?.["projectID"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ).then((value) => value.data),
+ removeSaved: (input: PermissionsRemoveSavedInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "DELETE",
+ path: `/api/permission/saved/${encodeURIComponent(input.id)}`,
+ successStatus: 204,
+ declaredStatuses: [401, 400],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ create: (input: PermissionsCreateInput, requestOptions?: RequestOptions) =>
+ request<{ readonly data: PermissionsCreateOutput }>(
+ {
+ method: "POST",
+ path: `/api/session/${encodeURIComponent(input.sessionID)}/permission`,
+ body: {
+ id: input["id"],
+ action: input["action"],
+ resources: input["resources"],
+ save: input["save"],
+ metadata: input["metadata"],
+ source: input["source"],
+ agent: input["agent"],
+ },
+ successStatus: 200,
+ declaredStatuses: [404, 400, 401],
+ empty: false,
+ },
+ requestOptions,
+ ).then((value) => value.data),
+ list: (input: PermissionsListInput, requestOptions?: RequestOptions) =>
+ request<{ readonly data: PermissionsListOutput }>(
+ {
+ method: "GET",
+ path: `/api/session/${encodeURIComponent(input.sessionID)}/permission`,
+ successStatus: 200,
+ declaredStatuses: [404, 400, 401],
+ empty: false,
+ },
+ requestOptions,
+ ).then((value) => value.data),
+ get: (input: PermissionsGetInput, requestOptions?: RequestOptions) =>
+ request<{ readonly data: PermissionsGetOutput }>(
+ {
+ method: "GET",
+ path: `/api/session/${encodeURIComponent(input.sessionID)}/permission/${encodeURIComponent(input.requestID)}`,
+ successStatus: 200,
+ declaredStatuses: [404, 400, 401],
+ empty: false,
+ },
+ requestOptions,
+ ).then((value) => value.data),
+ reply: (input: PermissionsReplyInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "POST",
+ path: `/api/session/${encodeURIComponent(input.sessionID)}/permission/${encodeURIComponent(input.requestID)}/reply`,
+ body: { reply: input["reply"], message: input["message"] },
+ successStatus: 204,
+ declaredStatuses: [404, 400, 401],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ },
+ files: {
+ list: (input?: FilesListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/fs/list`,
+ query: { location: input?.["location"], path: input?.["path"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ find: (input: FilesFindInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/fs/find`,
+ query: { location: input["location"], query: input["query"], type: input["type"], limit: input["limit"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ },
+ commands: {
+ list: (input?: CommandsListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/command`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ },
+ skills: {
+ list: (input?: SkillsListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/skill`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ },
+ events: {
+ subscribe: (requestOptions?: RequestOptions): AsyncIterable =>
+ sse(
+ { method: "GET", path: `/api/event`, successStatus: 200, declaredStatuses: [401, 400], empty: false },
+ requestOptions,
+ ),
+ },
+ ptys: {
+ list: (input?: PtysListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/pty`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ create: (input?: PtysCreateInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "POST",
+ path: `/api/pty`,
+ query: { location: input?.["location"] },
+ body: {
+ command: input?.["command"],
+ args: input?.["args"],
+ cwd: input?.["cwd"],
+ title: input?.["title"],
+ env: input?.["env"],
+ },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ get: (input: PtysGetInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/pty/${encodeURIComponent(input.ptyID)}`,
+ query: { location: input["location"] },
+ successStatus: 200,
+ declaredStatuses: [404, 401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ update: (input: PtysUpdateInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "PUT",
+ path: `/api/pty/${encodeURIComponent(input.ptyID)}`,
+ query: { location: input["location"] },
+ body: { title: input["title"], size: input["size"] },
+ successStatus: 200,
+ declaredStatuses: [404, 401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ remove: (input: PtysRemoveInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "DELETE",
+ path: `/api/pty/${encodeURIComponent(input.ptyID)}`,
+ query: { location: input["location"] },
+ successStatus: 204,
+ declaredStatuses: [404, 401, 400],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ },
+ questions: {
+ listRequests: (input?: QuestionsListRequestsInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/question/request`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ list: (input: QuestionsListInput, requestOptions?: RequestOptions) =>
+ request<{ readonly data: QuestionsListOutput }>(
+ {
+ method: "GET",
+ path: `/api/session/${encodeURIComponent(input.sessionID)}/question`,
+ successStatus: 200,
+ declaredStatuses: [404, 400, 401],
+ empty: false,
+ },
+ requestOptions,
+ ).then((value) => value.data),
+ reply: (input: QuestionsReplyInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "POST",
+ path: `/api/session/${encodeURIComponent(input.sessionID)}/question/${encodeURIComponent(input.requestID)}/reply`,
+ body: { answers: input["answers"] },
+ successStatus: 204,
+ declaredStatuses: [404, 400, 401],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ reject: (input: QuestionsRejectInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "POST",
+ path: `/api/session/${encodeURIComponent(input.sessionID)}/question/${encodeURIComponent(input.requestID)}/reject`,
+ successStatus: 204,
+ declaredStatuses: [404, 400, 401],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ },
+ references: {
+ list: (input?: ReferencesListInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "GET",
+ path: `/api/reference`,
+ query: { location: input?.["location"] },
+ successStatus: 200,
+ declaredStatuses: [401, 400],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ },
+ projectCopies: {
+ create: (input: ProjectCopiesCreateInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "POST",
+ path: `/experimental/project/${encodeURIComponent(input.projectID)}/copy`,
+ query: { location: input["location"] },
+ body: { strategy: input["strategy"], directory: input["directory"], name: input["name"] },
+ successStatus: 200,
+ declaredStatuses: [400, 401],
+ empty: false,
+ },
+ requestOptions,
+ ),
+ remove: (input: ProjectCopiesRemoveInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "DELETE",
+ path: `/experimental/project/${encodeURIComponent(input.projectID)}/copy`,
+ query: { location: input["location"] },
+ body: { directory: input["directory"], force: input["force"] },
+ successStatus: 204,
+ declaredStatuses: [400, 401],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ refresh: (input: ProjectCopiesRefreshInput, requestOptions?: RequestOptions) =>
+ request(
+ {
+ method: "POST",
+ path: `/experimental/project/${encodeURIComponent(input.projectID)}/copy/refresh`,
+ query: { location: input["location"] },
+ successStatus: 204,
+ declaredStatuses: [400, 401],
+ empty: true,
+ },
+ requestOptions,
+ ),
+ },
}
}
diff --git a/packages/client/src/generated/types.ts b/packages/client/src/generated/types.ts
index 2b4ebd048b..4251e4f969 100644
--- a/packages/client/src/generated/types.ts
+++ b/packages/client/src/generated/types.ts
@@ -1,3 +1,5 @@
+import type { OpenCodeEventEncoded } from "@opencode-ai/protocol/groups/event"
+
export type JsonValue =
| null
| boolean
@@ -6,9 +8,9 @@ export type JsonValue =
| ReadonlyArray
| { readonly [key: string]: JsonValue }
-export type InvalidCursorError = { readonly _tag: "InvalidCursorError"; readonly message: string }
-export const isInvalidCursorError = (value: unknown): value is InvalidCursorError =>
- typeof value === "object" && value !== null && "_tag" in value && value._tag === "InvalidCursorError"
+export type UnauthorizedError = { readonly _tag: "UnauthorizedError"; readonly message: string }
+export const isUnauthorizedError = (value: unknown): value is UnauthorizedError =>
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "UnauthorizedError"
export type InvalidRequestError = {
readonly _tag: "InvalidRequestError"
@@ -17,11 +19,11 @@ export type InvalidRequestError = {
readonly field?: string | undefined
}
export const isInvalidRequestError = (value: unknown): value is InvalidRequestError =>
- typeof value === "object" && value !== null && "_tag" in value && value._tag === "InvalidRequestError"
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "InvalidRequestError"
-export type UnauthorizedError = { readonly _tag: "UnauthorizedError"; readonly message: string }
-export const isUnauthorizedError = (value: unknown): value is UnauthorizedError =>
- typeof value === "object" && value !== null && "_tag" in value && value._tag === "UnauthorizedError"
+export type InvalidCursorError = { readonly _tag: "InvalidCursorError"; readonly message: string }
+export const isInvalidCursorError = (value: unknown): value is InvalidCursorError =>
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "InvalidCursorError"
export type SessionNotFoundError = {
readonly _tag: "SessionNotFoundError"
@@ -29,7 +31,7 @@ export type SessionNotFoundError = {
readonly message: string
}
export const isSessionNotFoundError = (value: unknown): value is SessionNotFoundError =>
- typeof value === "object" && value !== null && "_tag" in value && value._tag === "SessionNotFoundError"
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "SessionNotFoundError"
export type ConflictError = {
readonly _tag: "ConflictError"
@@ -37,7 +39,7 @@ export type ConflictError = {
readonly resource?: string | undefined
}
export const isConflictError = (value: unknown): value is ConflictError =>
- typeof value === "object" && value !== null && "_tag" in value && value._tag === "ConflictError"
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "ConflictError"
export type ServiceUnavailableError = {
readonly _tag: "ServiceUnavailableError"
@@ -45,7 +47,7 @@ export type ServiceUnavailableError = {
readonly service?: string | undefined
}
export const isServiceUnavailableError = (value: unknown): value is ServiceUnavailableError =>
- typeof value === "object" && value !== null && "_tag" in value && value._tag === "ServiceUnavailableError"
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "ServiceUnavailableError"
export type MessageNotFoundError = {
readonly _tag: "MessageNotFoundError"
@@ -54,7 +56,7 @@ export type MessageNotFoundError = {
readonly message: string
}
export const isMessageNotFoundError = (value: unknown): value is MessageNotFoundError =>
- typeof value === "object" && value !== null && "_tag" in value && value._tag === "MessageNotFoundError"
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "MessageNotFoundError"
export type SessionBusyError = {
readonly _tag: "SessionBusyError"
@@ -62,7 +64,7 @@ export type SessionBusyError = {
readonly message: string
}
export const isSessionBusyError = (value: unknown): value is SessionBusyError =>
- typeof value === "object" && value !== null && "_tag" in value && value._tag === "SessionBusyError"
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "SessionBusyError"
export type UnknownError = {
readonly _tag: "UnknownError"
@@ -70,12 +72,94 @@ export type UnknownError = {
readonly ref?: string | undefined
}
export const isUnknownError = (value: unknown): value is UnknownError =>
- typeof value === "object" && value !== null && "_tag" in value && value._tag === "UnknownError"
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "UnknownError"
+
+export type ProviderNotFoundError = {
+ readonly _tag: "ProviderNotFoundError"
+ readonly providerID: string
+ readonly message: string
+}
+export const isProviderNotFoundError = (value: unknown): value is ProviderNotFoundError =>
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "ProviderNotFoundError"
+
+export type PermissionNotFoundError = {
+ readonly _tag: "PermissionNotFoundError"
+ readonly requestID: string
+ readonly message: string
+}
+export const isPermissionNotFoundError = (value: unknown): value is PermissionNotFoundError =>
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "PermissionNotFoundError"
+
+export type PtyNotFoundError = { readonly _tag: "PtyNotFoundError"; readonly ptyID: string; readonly message: string }
+export const isPtyNotFoundError = (value: unknown): value is PtyNotFoundError =>
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "PtyNotFoundError"
+
+export type QuestionNotFoundError = {
+ readonly _tag: "QuestionNotFoundError"
+ readonly requestID: string
+ readonly message: string
+}
+export const isQuestionNotFoundError = (value: unknown): value is QuestionNotFoundError =>
+ typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "QuestionNotFoundError"
+
+export type ProjectCopyError = {
+ readonly name: "ProjectCopyError"
+ readonly data: { readonly message: string; readonly forceRequired?: boolean | undefined }
+}
+export const isProjectCopyError = (value: unknown): value is ProjectCopyError =>
+ typeof value === "object" && value !== null && "name" in value && value["name"] === "ProjectCopyError"
+
+export type HealthGetOutput = { readonly healthy: true }
+
+export type LocationGetInput = {
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type LocationGetOutput = {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+}
+
+export type AgentsListInput = {
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type AgentsListOutput = {
+ readonly location: {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+ }
+ readonly data: ReadonlyArray<{
+ readonly id: string
+ readonly model?: { readonly id: string; readonly providerID: string; readonly variant?: string }
+ readonly request: {
+ readonly headers: { readonly [x: string]: string }
+ readonly body: { readonly [x: string]: JsonValue }
+ }
+ readonly system?: string
+ readonly description?: string
+ readonly mode: "subagent" | "primary" | "all"
+ readonly hidden: boolean
+ readonly color?: string | "primary" | "secondary" | "accent" | "success" | "warning" | "error" | "info"
+ readonly steps?: number
+ readonly permissions: ReadonlyArray<{
+ readonly action: string
+ readonly resource: string
+ readonly effect: "allow" | "deny" | "ask"
+ }>
+ }>
+}
export type SessionsListInput = {
readonly workspace?: {
readonly workspace?: string | undefined
- readonly limit?: string | undefined
+ readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly directory?: string | undefined
@@ -85,7 +169,7 @@ export type SessionsListInput = {
}["workspace"]
readonly limit?: {
readonly workspace?: string | undefined
- readonly limit?: string | undefined
+ readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly directory?: string | undefined
@@ -95,7 +179,7 @@ export type SessionsListInput = {
}["limit"]
readonly order?: {
readonly workspace?: string | undefined
- readonly limit?: string | undefined
+ readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly directory?: string | undefined
@@ -105,7 +189,7 @@ export type SessionsListInput = {
}["order"]
readonly search?: {
readonly workspace?: string | undefined
- readonly limit?: string | undefined
+ readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly directory?: string | undefined
@@ -115,7 +199,7 @@ export type SessionsListInput = {
}["search"]
readonly directory?: {
readonly workspace?: string | undefined
- readonly limit?: string | undefined
+ readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly directory?: string | undefined
@@ -125,7 +209,7 @@ export type SessionsListInput = {
}["directory"]
readonly project?: {
readonly workspace?: string | undefined
- readonly limit?: string | undefined
+ readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly directory?: string | undefined
@@ -135,7 +219,7 @@ export type SessionsListInput = {
}["project"]
readonly subpath?: {
readonly workspace?: string | undefined
- readonly limit?: string | undefined
+ readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly directory?: string | undefined
@@ -145,7 +229,7 @@ export type SessionsListInput = {
}["subpath"]
readonly cursor?: {
readonly workspace?: string | undefined
- readonly limit?: string | undefined
+ readonly limit?: number | undefined
readonly order?: "asc" | "desc" | undefined
readonly search?: string | undefined
readonly directory?: string | undefined
@@ -607,9 +691,477 @@ export type SessionsContextOutput = {
>
}["data"]
+export type SessionsHistoryInput = {
+ readonly sessionID: { readonly sessionID: string }["sessionID"]
+ readonly limit?: { readonly limit?: number | undefined; readonly after?: number | undefined }["limit"]
+ readonly after?: { readonly limit?: number | undefined; readonly after?: number | undefined }["after"]
+}
+
+export type SessionsHistoryOutput = {
+ readonly data: ReadonlyArray<
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.agent.switched"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly messageID: string
+ readonly agent: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.model.switched"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly messageID: string
+ readonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.moved"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly location: { readonly directory: string; readonly workspaceID?: string }
+ readonly subdirectory?: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.renamed"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: { readonly timestamp: number; readonly sessionID: string; readonly title: string }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.prompted"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly messageID: string
+ readonly prompt: {
+ readonly text: string
+ readonly files?: ReadonlyArray<{
+ readonly uri: string
+ readonly mime: string
+ readonly name?: string
+ readonly description?: string
+ readonly source?: { readonly start: number; readonly end: number; readonly text: string }
+ }>
+ readonly agents?: ReadonlyArray<{
+ readonly name: string
+ readonly source?: { readonly start: number; readonly end: number; readonly text: string }
+ }>
+ }
+ readonly delivery: "steer" | "queue"
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.prompt.admitted"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly messageID: string
+ readonly prompt: {
+ readonly text: string
+ readonly files?: ReadonlyArray<{
+ readonly uri: string
+ readonly mime: string
+ readonly name?: string
+ readonly description?: string
+ readonly source?: { readonly start: number; readonly end: number; readonly text: string }
+ }>
+ readonly agents?: ReadonlyArray<{
+ readonly name: string
+ readonly source?: { readonly start: number; readonly end: number; readonly text: string }
+ }>
+ }
+ readonly delivery: "steer" | "queue"
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.context.updated"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly messageID: string
+ readonly text: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.synthetic"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly messageID: string
+ readonly text: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.shell.started"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly messageID: string
+ readonly callID: string
+ readonly command: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.shell.ended"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly callID: string
+ readonly output: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.step.started"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly agent: string
+ readonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }
+ readonly snapshot?: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.step.ended"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly finish: string
+ readonly cost: number
+ readonly tokens: {
+ readonly input: number
+ readonly output: number
+ readonly reasoning: number
+ readonly cache: { readonly read: number; readonly write: number }
+ }
+ readonly snapshot?: string
+ readonly files?: ReadonlyArray
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.step.failed"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly error: { readonly type: "unknown"; readonly message: string }
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.text.started"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly textID: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.text.ended"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly textID: string
+ readonly text: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.tool.input.started"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly callID: string
+ readonly name: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.tool.input.ended"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly callID: string
+ readonly text: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.tool.called"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly callID: string
+ readonly tool: string
+ readonly input: { readonly [x: string]: JsonValue }
+ readonly provider: {
+ readonly executed: boolean
+ readonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }
+ }
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.tool.progress"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly callID: string
+ readonly structured: { readonly [x: string]: JsonValue }
+ readonly content: ReadonlyArray<
+ | { readonly type: "text"; readonly text: string }
+ | { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
+ >
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.tool.success"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly callID: string
+ readonly structured: { readonly [x: string]: JsonValue }
+ readonly content: ReadonlyArray<
+ | { readonly type: "text"; readonly text: string }
+ | { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
+ >
+ readonly outputPaths?: ReadonlyArray
+ readonly result?: JsonValue
+ readonly provider: {
+ readonly executed: boolean
+ readonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }
+ }
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.tool.failed"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly callID: string
+ readonly error: { readonly type: "unknown"; readonly message: string }
+ readonly result?: JsonValue
+ readonly provider: {
+ readonly executed: boolean
+ readonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }
+ }
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.reasoning.started"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly reasoningID: string
+ readonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.reasoning.ended"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly assistantMessageID: string
+ readonly reasoningID: string
+ readonly text: string
+ readonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.retried"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly attempt: number
+ readonly error: {
+ readonly message: string
+ readonly statusCode?: number
+ readonly isRetryable: boolean
+ readonly responseHeaders?: { readonly [x: string]: string }
+ readonly responseBody?: string
+ readonly metadata?: { readonly [x: string]: string }
+ }
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.compaction.started"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly messageID: string
+ readonly reason: "auto" | "manual"
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.compaction.ended"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly messageID: string
+ readonly reason: "auto" | "manual"
+ readonly text: string
+ readonly recent: string
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.revert.staged"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: {
+ readonly timestamp: number
+ readonly sessionID: string
+ readonly revert: {
+ readonly messageID: string
+ readonly partID?: string
+ readonly snapshot?: string
+ readonly diff?: string
+ readonly files?: ReadonlyArray<{
+ readonly path: string
+ readonly status: "added" | "modified" | "deleted"
+ readonly additions: number
+ readonly deletions: number
+ readonly patch: string
+ }>
+ }
+ }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.revert.cleared"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: { readonly timestamp: number; readonly sessionID: string }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly type: "session.next.revert.committed"
+ readonly durable?: { readonly aggregateID: string; readonly seq: number; readonly version: number }
+ readonly location?: { readonly directory: string; readonly workspaceID?: string }
+ readonly data: { readonly timestamp: number; readonly sessionID: string; readonly messageID: string }
+ }
+ >
+ readonly hasMore: boolean
+}
+
export type SessionsEventsInput = {
readonly sessionID: { readonly sessionID: string }["sessionID"]
- readonly after?: { readonly after?: string | undefined }["after"]
+ readonly after?: { readonly after?: number | undefined }["after"]
}
export type SessionsEventsOutput =
@@ -1231,3 +1783,1056 @@ export type SessionsMessageOutput = {
readonly time: { readonly created: number }
}
}["data"]
+
+export type MessagesListInput = {
+ readonly sessionID: { readonly sessionID: string }["sessionID"]
+ readonly limit?: {
+ readonly limit?: number | undefined
+ readonly order?: "asc" | "desc" | undefined
+ readonly cursor?: string | undefined
+ }["limit"]
+ readonly order?: {
+ readonly limit?: number | undefined
+ readonly order?: "asc" | "desc" | undefined
+ readonly cursor?: string | undefined
+ }["order"]
+ readonly cursor?: {
+ readonly limit?: number | undefined
+ readonly order?: "asc" | "desc" | undefined
+ readonly cursor?: string | undefined
+ }["cursor"]
+}
+
+export type MessagesListOutput = {
+ readonly data: ReadonlyArray<
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly time: { readonly created: number }
+ readonly type: "agent-switched"
+ readonly agent: string
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly time: { readonly created: number }
+ readonly type: "model-switched"
+ readonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly time: { readonly created: number }
+ readonly text: string
+ readonly files?: ReadonlyArray<{
+ readonly uri: string
+ readonly mime: string
+ readonly name?: string
+ readonly description?: string
+ readonly source?: { readonly start: number; readonly end: number; readonly text: string }
+ }>
+ readonly agents?: ReadonlyArray<{
+ readonly name: string
+ readonly source?: { readonly start: number; readonly end: number; readonly text: string }
+ }>
+ readonly type: "user"
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly time: { readonly created: number }
+ readonly sessionID: string
+ readonly text: string
+ readonly type: "synthetic"
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly time: { readonly created: number }
+ readonly type: "system"
+ readonly text: string
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly time: { readonly created: number; readonly completed?: number }
+ readonly type: "shell"
+ readonly callID: string
+ readonly command: string
+ readonly output: string
+ }
+ | {
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly time: { readonly created: number; readonly completed?: number }
+ readonly type: "assistant"
+ readonly agent: string
+ readonly model: { readonly id: string; readonly providerID: string; readonly variant?: string }
+ readonly content: ReadonlyArray<
+ | { readonly type: "text"; readonly id: string; readonly text: string }
+ | {
+ readonly type: "reasoning"
+ readonly id: string
+ readonly text: string
+ readonly providerMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }
+ readonly time?: { readonly created: number; readonly completed?: number }
+ }
+ | {
+ readonly type: "tool"
+ readonly id: string
+ readonly name: string
+ readonly provider?: {
+ readonly executed: boolean
+ readonly metadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }
+ readonly resultMetadata?: { readonly [x: string]: { readonly [x: string]: JsonValue } }
+ }
+ readonly state:
+ | { readonly status: "pending"; readonly input: string }
+ | {
+ readonly status: "running"
+ readonly input: { readonly [x: string]: JsonValue }
+ readonly structured: { readonly [x: string]: JsonValue }
+ readonly content: ReadonlyArray<
+ | { readonly type: "text"; readonly text: string }
+ | { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
+ >
+ }
+ | {
+ readonly status: "completed"
+ readonly input: { readonly [x: string]: JsonValue }
+ readonly attachments?: ReadonlyArray<{
+ readonly uri: string
+ readonly mime: string
+ readonly name?: string
+ readonly description?: string
+ readonly source?: { readonly start: number; readonly end: number; readonly text: string }
+ }>
+ readonly content: ReadonlyArray<
+ | { readonly type: "text"; readonly text: string }
+ | { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
+ >
+ readonly outputPaths?: ReadonlyArray
+ readonly structured: { readonly [x: string]: JsonValue }
+ readonly result?: JsonValue
+ }
+ | {
+ readonly status: "error"
+ readonly input: { readonly [x: string]: JsonValue }
+ readonly content: ReadonlyArray<
+ | { readonly type: "text"; readonly text: string }
+ | { readonly type: "file"; readonly uri: string; readonly mime: string; readonly name?: string }
+ >
+ readonly structured: { readonly [x: string]: JsonValue }
+ readonly error: { readonly type: "unknown"; readonly message: string }
+ readonly result?: JsonValue
+ }
+ readonly time: {
+ readonly created: number
+ readonly ran?: number
+ readonly completed?: number
+ readonly pruned?: number
+ }
+ }
+ >
+ readonly snapshot?: { readonly start?: string; readonly end?: string; readonly files?: ReadonlyArray }
+ readonly finish?: string
+ readonly cost?: number
+ readonly tokens?: {
+ readonly input: number
+ readonly output: number
+ readonly reasoning: number
+ readonly cache: { readonly read: number; readonly write: number }
+ }
+ readonly error?: { readonly type: "unknown"; readonly message: string }
+ }
+ | {
+ readonly type: "compaction"
+ readonly reason: "auto" | "manual"
+ readonly summary: string
+ readonly recent: string
+ readonly id: string
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly time: { readonly created: number }
+ }
+ >
+ readonly cursor: { readonly previous?: string | null; readonly next?: string | null }
+}
+
+export type ModelsListInput = {
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type ModelsListOutput = {
+ readonly location: {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+ }
+ readonly data: ReadonlyArray<{
+ readonly id: string
+ readonly providerID: string
+ readonly family?: string
+ readonly name: string
+ readonly api:
+ | {
+ readonly id: string
+ readonly type: "aisdk"
+ readonly package: string
+ readonly url?: string
+ readonly settings?: { readonly [x: string]: JsonValue }
+ }
+ | {
+ readonly id: string
+ readonly type: "native"
+ readonly url?: string
+ readonly settings: { readonly [x: string]: JsonValue }
+ }
+ readonly capabilities: {
+ readonly tools: boolean
+ readonly input: ReadonlyArray
+ readonly output: ReadonlyArray
+ }
+ readonly request: {
+ readonly headers: { readonly [x: string]: string }
+ readonly body: { readonly [x: string]: JsonValue }
+ readonly variant?: string
+ }
+ readonly variants: ReadonlyArray<{
+ readonly id: string
+ readonly headers: { readonly [x: string]: string }
+ readonly body: { readonly [x: string]: JsonValue }
+ }>
+ readonly time: { readonly released: number }
+ readonly cost: ReadonlyArray<{
+ readonly tier?: { readonly type: "context"; readonly size: number }
+ readonly input: number
+ readonly output: number
+ readonly cache: { readonly read: number; readonly write: number }
+ }>
+ readonly status: "alpha" | "beta" | "deprecated" | "active"
+ readonly enabled: boolean
+ readonly limit: { readonly context: number; readonly input?: number; readonly output: number }
+ }>
+}
+
+export type ProvidersListInput = {
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type ProvidersListOutput = {
+ readonly location: {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+ }
+ readonly data: ReadonlyArray<{
+ readonly id: string
+ readonly integrationID?: string
+ readonly name: string
+ readonly disabled?: boolean
+ readonly api:
+ | {
+ readonly type: "aisdk"
+ readonly package: string
+ readonly url?: string
+ readonly settings?: { readonly [x: string]: JsonValue }
+ }
+ | { readonly type: "native"; readonly url?: string; readonly settings: { readonly [x: string]: JsonValue } }
+ readonly request: {
+ readonly headers: { readonly [x: string]: string }
+ readonly body: { readonly [x: string]: JsonValue }
+ }
+ }>
+}
+
+export type ProvidersGetInput = {
+ readonly providerID: { readonly providerID: string }["providerID"]
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type ProvidersGetOutput = {
+ readonly location: {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+ }
+ readonly data: {
+ readonly id: string
+ readonly integrationID?: string
+ readonly name: string
+ readonly disabled?: boolean
+ readonly api:
+ | {
+ readonly type: "aisdk"
+ readonly package: string
+ readonly url?: string
+ readonly settings?: { readonly [x: string]: JsonValue }
+ }
+ | { readonly type: "native"; readonly url?: string; readonly settings: { readonly [x: string]: JsonValue } }
+ readonly request: {
+ readonly headers: { readonly [x: string]: string }
+ readonly body: { readonly [x: string]: JsonValue }
+ }
+ }
+}
+
+export type IntegrationsListInput = {
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type IntegrationsListOutput = {
+ readonly location: {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+ }
+ readonly data: ReadonlyArray<{
+ readonly id: string
+ readonly name: string
+ readonly methods: ReadonlyArray<
+ | {
+ readonly id: string
+ readonly type: "oauth"
+ readonly label: string
+ readonly prompts?: ReadonlyArray<
+ | {
+ readonly type: "text"
+ readonly key: string
+ readonly message: string
+ readonly placeholder?: string
+ readonly when?: { readonly key: string; readonly op: "eq" | "neq"; readonly value: string }
+ }
+ | {
+ readonly type: "select"
+ readonly key: string
+ readonly message: string
+ readonly options: ReadonlyArray<{
+ readonly label: string
+ readonly value: string
+ readonly hint?: string
+ }>
+ readonly when?: { readonly key: string; readonly op: "eq" | "neq"; readonly value: string }
+ }
+ >
+ }
+ | { readonly type: "key"; readonly label?: string }
+ | { readonly type: "env"; readonly names: ReadonlyArray }
+ >
+ readonly connections: ReadonlyArray<
+ | { readonly type: "credential"; readonly id: string; readonly label: string }
+ | { readonly type: "env"; readonly name: string }
+ >
+ }>
+}
+
+export type IntegrationsGetInput = {
+ readonly integrationID: { readonly integrationID: string }["integrationID"]
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type IntegrationsGetOutput = {
+ readonly location: {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+ }
+ readonly data: {
+ readonly id: string
+ readonly name: string
+ readonly methods: ReadonlyArray<
+ | {
+ readonly id: string
+ readonly type: "oauth"
+ readonly label: string
+ readonly prompts?: ReadonlyArray<
+ | {
+ readonly type: "text"
+ readonly key: string
+ readonly message: string
+ readonly placeholder?: string
+ readonly when?: { readonly key: string; readonly op: "eq" | "neq"; readonly value: string }
+ }
+ | {
+ readonly type: "select"
+ readonly key: string
+ readonly message: string
+ readonly options: ReadonlyArray<{
+ readonly label: string
+ readonly value: string
+ readonly hint?: string
+ }>
+ readonly when?: { readonly key: string; readonly op: "eq" | "neq"; readonly value: string }
+ }
+ >
+ }
+ | { readonly type: "key"; readonly label?: string }
+ | { readonly type: "env"; readonly names: ReadonlyArray }
+ >
+ readonly connections: ReadonlyArray<
+ | { readonly type: "credential"; readonly id: string; readonly label: string }
+ | { readonly type: "env"; readonly name: string }
+ >
+ } | null
+}
+
+export type IntegrationsConnectKeyInput = {
+ readonly integrationID: { readonly integrationID: string }["integrationID"]
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+ readonly key: { readonly key: string; readonly label?: string | undefined }["key"]
+ readonly label?: { readonly key: string; readonly label?: string | undefined }["label"]
+}
+
+export type IntegrationsConnectKeyOutput = void
+
+export type IntegrationsConnectOauthInput = {
+ readonly integrationID: { readonly integrationID: string }["integrationID"]
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+ readonly methodID: {
+ readonly methodID: string
+ readonly inputs: { readonly [x: string]: string }
+ readonly label?: string | undefined
+ }["methodID"]
+ readonly inputs: {
+ readonly methodID: string
+ readonly inputs: { readonly [x: string]: string }
+ readonly label?: string | undefined
+ }["inputs"]
+ readonly label?: {
+ readonly methodID: string
+ readonly inputs: { readonly [x: string]: string }
+ readonly label?: string | undefined
+ }["label"]
+}
+
+export type IntegrationsConnectOauthOutput = {
+ readonly location: {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+ }
+ readonly data: {
+ readonly attemptID: string
+ readonly url: string
+ readonly instructions: string
+ readonly mode: "auto" | "code"
+ readonly time: {
+ readonly created: number | "Infinity" | "-Infinity" | "NaN"
+ readonly expires: number | "Infinity" | "-Infinity" | "NaN"
+ }
+ }
+}
+
+export type IntegrationsAttemptStatusInput = {
+ readonly attemptID: { readonly attemptID: string }["attemptID"]
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type IntegrationsAttemptStatusOutput = {
+ readonly location: {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+ }
+ readonly data:
+ | {
+ readonly status: "pending"
+ readonly time: {
+ readonly created: number | "Infinity" | "-Infinity" | "NaN"
+ readonly expires: number | "Infinity" | "-Infinity" | "NaN"
+ }
+ }
+ | {
+ readonly status: "complete"
+ readonly time: {
+ readonly created: number | "Infinity" | "-Infinity" | "NaN"
+ readonly expires: number | "Infinity" | "-Infinity" | "NaN"
+ }
+ }
+ | {
+ readonly status: "failed"
+ readonly message: string
+ readonly time: {
+ readonly created: number | "Infinity" | "-Infinity" | "NaN"
+ readonly expires: number | "Infinity" | "-Infinity" | "NaN"
+ }
+ }
+ | {
+ readonly status: "expired"
+ readonly time: {
+ readonly created: number | "Infinity" | "-Infinity" | "NaN"
+ readonly expires: number | "Infinity" | "-Infinity" | "NaN"
+ }
+ }
+}
+
+export type IntegrationsAttemptCompleteInput = {
+ readonly attemptID: { readonly attemptID: string }["attemptID"]
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+ readonly code?: { readonly code?: string | undefined }["code"]
+}
+
+export type IntegrationsAttemptCompleteOutput = void
+
+export type IntegrationsAttemptCancelInput = {
+ readonly attemptID: { readonly attemptID: string }["attemptID"]
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type IntegrationsAttemptCancelOutput = void
+
+export type CredentialsUpdateInput = {
+ readonly credentialID: { readonly credentialID: string }["credentialID"]
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+ readonly label: { readonly label: string }["label"]
+}
+
+export type CredentialsUpdateOutput = void
+
+export type CredentialsRemoveInput = {
+ readonly credentialID: { readonly credentialID: string }["credentialID"]
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type CredentialsRemoveOutput = void
+
+export type PermissionsListRequestsInput = {
+ readonly location?: {
+ readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
+ }["location"]
+}
+
+export type PermissionsListRequestsOutput = {
+ readonly location: {
+ readonly directory: string
+ readonly workspaceID?: string
+ readonly project: { readonly id: string; readonly directory: string }
+ }
+ readonly data: ReadonlyArray<{
+ readonly id: string
+ readonly sessionID: string
+ readonly action: string
+ readonly resources: ReadonlyArray
+ readonly save?: ReadonlyArray
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }
+ }>
+}
+
+export type PermissionsListSavedInput = {
+ readonly projectID?: { readonly projectID?: string | undefined }["projectID"]
+}
+
+export type PermissionsListSavedOutput = {
+ readonly data: ReadonlyArray<{
+ readonly id: string
+ readonly projectID: string
+ readonly action: string
+ readonly resource: string
+ }>
+}["data"]
+
+export type PermissionsRemoveSavedInput = { readonly id: { readonly id: string }["id"] }
+
+export type PermissionsRemoveSavedOutput = void
+
+export type PermissionsCreateInput = {
+ readonly sessionID: { readonly sessionID: string }["sessionID"]
+ readonly id?: {
+ readonly id?: string | null
+ readonly action: string
+ readonly resources: ReadonlyArray
+ readonly save?: ReadonlyArray
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }
+ readonly agent?: string | null
+ }["id"]
+ readonly action: {
+ readonly id?: string | null
+ readonly action: string
+ readonly resources: ReadonlyArray
+ readonly save?: ReadonlyArray
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }
+ readonly agent?: string | null
+ }["action"]
+ readonly resources: {
+ readonly id?: string | null
+ readonly action: string
+ readonly resources: ReadonlyArray
+ readonly save?: ReadonlyArray
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }
+ readonly agent?: string | null
+ }["resources"]
+ readonly save?: {
+ readonly id?: string | null
+ readonly action: string
+ readonly resources: ReadonlyArray
+ readonly save?: ReadonlyArray
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }
+ readonly agent?: string | null
+ }["save"]
+ readonly metadata?: {
+ readonly id?: string | null
+ readonly action: string
+ readonly resources: ReadonlyArray
+ readonly save?: ReadonlyArray
+ readonly metadata?: { readonly [x: string]: JsonValue }
+ readonly source?: { readonly type: "tool"; readonly messageID: string; readonly callID: string }
+ readonly agent?: string | null
+ }["metadata"]
+ readonly source?: {
+ readonly id?: string | null
+ readonly action: string
+ readonly resources: ReadonlyArray