|
|
@@ -40,6 +40,7 @@ import {
|
|
|
} from '../api/workspace.schema.ts'
|
|
|
import { commandExecuteValueSchema, commandListValueSchema } from '../api/commands.schema.ts'
|
|
|
import { skillListValueSchema } from '../api/skills.schema.ts'
|
|
|
+import { agentPresetListValueSchema } from '../api/agent-presets.schema.ts'
|
|
|
import {
|
|
|
goalCreateValueSchema,
|
|
|
goalEditValueSchema,
|
|
|
@@ -119,6 +120,9 @@ export interface IApiClient {
|
|
|
skills: {
|
|
|
list(payload: RequestPayload<'skill.list'>, signal?: AbortSignal): Promise<RpcResponse<ResponseValue<'skill.list'>>>
|
|
|
}
|
|
|
+ readonly agentPresets: {
|
|
|
+ list(payload: RequestPayload<'agentPreset.list'>, signal?: AbortSignal): Promise<RpcResponse<ResponseValue<'agentPreset.list'>>>
|
|
|
+ }
|
|
|
events: {
|
|
|
mux(payload: Parameters<ApiProxy['events']['mux']>[0]['payload'], signal: AbortSignal, onOpen?: () => void): AsyncIterable<RpcRequest<MuxFrame>>
|
|
|
host(payload: Parameters<ApiProxy['events']['host']>[0]['payload'], signal: AbortSignal, onOpen?: () => void): AsyncIterable<RpcRequest<HostFrame>>
|
|
|
@@ -185,6 +189,7 @@ const UNARY_VALUE_SCHEMAS: { [K in keyof RpcMethodMap]: z.ZodType<Wire<ResponseV
|
|
|
'command.list': commandListValueSchema,
|
|
|
'command.execute': commandExecuteValueSchema,
|
|
|
'skill.list': skillListValueSchema,
|
|
|
+ 'agentPreset.list': agentPresetListValueSchema,
|
|
|
'goal.create': goalCreateValueSchema,
|
|
|
'goal.edit': goalEditValueSchema,
|
|
|
'goal.pause': goalPauseValueSchema,
|
|
|
@@ -443,6 +448,11 @@ export abstract class AbstractApiClient implements IApiClient {
|
|
|
list: (payload, signal) => this.callUnary('skill.list', payload, signal),
|
|
|
}
|
|
|
|
|
|
+ readonly agentPresets = {
|
|
|
+ list: (payload: RequestPayload<'agentPreset.list'>, signal?: AbortSignal) =>
|
|
|
+ this.callUnary('agentPreset.list', payload, signal),
|
|
|
+ }
|
|
|
+
|
|
|
readonly goals: IApiClient['goals'] = {
|
|
|
create: (payload, signal) => this.callUnary('goal.create', payload, signal),
|
|
|
edit: (payload, signal) => this.callUnary('goal.edit', payload, signal),
|