@opencode/client 0.0.0-reserved → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -2
- package/dist/contract.d.ts +1 -0
- package/dist/contract.js +1 -0
- package/dist/effect/api/api.d.ts +2698 -0
- package/dist/effect/api/api.js +0 -0
- package/dist/effect/api.d.ts +8 -0
- package/dist/effect/api.js +0 -0
- package/dist/effect/client.d.ts +2464 -0
- package/dist/effect/client.js +29 -0
- package/dist/effect/generated/client-error.d.ts +7 -0
- package/dist/effect/generated/client-error.js +5 -0
- package/dist/effect/generated/client.d.ts +2463 -0
- package/dist/effect/generated/client.js +603 -0
- package/dist/effect/generated/index.d.ts +2 -0
- package/dist/effect/generated/index.js +2 -0
- package/dist/effect/index.d.ts +35 -0
- package/dist/effect/index.js +30 -0
- package/dist/effect/rpc.d.ts +20 -0
- package/dist/effect/rpc.js +49 -0
- package/dist/effect/service.d.ts +78 -0
- package/dist/effect/service.js +259 -0
- package/dist/promise/api.d.ts +24 -0
- package/dist/promise/api.js +0 -0
- package/dist/promise/client.d.ts +257 -0
- package/dist/promise/client.js +13 -0
- package/dist/promise/generated/client-error.d.ts +6 -0
- package/dist/promise/generated/client-error.js +8 -0
- package/dist/promise/generated/client.d.ts +264 -0
- package/dist/promise/generated/client.js +1426 -0
- package/dist/promise/generated/index.d.ts +3 -0
- package/dist/promise/generated/index.js +3 -0
- package/dist/promise/generated/types.d.ts +8777 -0
- package/dist/promise/generated/types.js +30 -0
- package/dist/promise/index.d.ts +6 -0
- package/dist/promise/index.js +2 -0
- package/dist/promise/rpc.d.ts +32 -0
- package/dist/promise/rpc.js +86 -0
- package/dist/promise/service.d.ts +26 -0
- package/dist/promise/service.js +247 -0
- package/dist/pty-handoff.d.ts +9 -0
- package/dist/pty-handoff.js +121 -0
- package/dist/rpc-runtime.d.ts +21 -0
- package/dist/rpc-runtime.js +32 -0
- package/dist/service-contender.d.ts +11 -0
- package/dist/service-contender.js +56 -0
- package/dist/service-timing.d.ts +13 -0
- package/dist/service-timing.js +19 -0
- package/dist/service-version.d.ts +2 -0
- package/dist/service-version.js +9 -0
- package/dist/service.d.ts +52 -0
- package/dist/service.js +0 -0
- package/dist/shared-events.d.ts +11 -0
- package/dist/shared-events.js +137 -0
- package/dist/solid/connection.d.ts +37 -0
- package/dist/solid/connection.js +246 -0
- package/dist/solid/data.d.ts +201 -0
- package/dist/solid/data.js +1731 -0
- package/dist/solid/index.d.ts +3 -0
- package/dist/solid/index.js +3 -0
- package/dist/solid/pty.d.ts +22 -0
- package/dist/solid/pty.js +43 -0
- package/package.json +76 -6
|
@@ -0,0 +1,2698 @@
|
|
|
1
|
+
import type { Effect, Stream } from "effect";
|
|
2
|
+
import type { Location } from "@opencode/schema/location";
|
|
3
|
+
import type { Agent } from "@opencode/schema/agent";
|
|
4
|
+
import type { Plugin } from "@opencode/schema/plugin";
|
|
5
|
+
import type { Workspace } from "@opencode/schema/workspace";
|
|
6
|
+
import type { Session } from "@opencode/schema/session";
|
|
7
|
+
import type { AbsolutePath } from "@opencode/schema/schema";
|
|
8
|
+
import type { Project } from "@opencode/schema/project";
|
|
9
|
+
import type { RelativePath } from "@opencode/schema/schema";
|
|
10
|
+
import type { Brand } from "effect";
|
|
11
|
+
import type { Model } from "@opencode/schema/model";
|
|
12
|
+
import type { DateTime } from "effect";
|
|
13
|
+
import type { Permission } from "@opencode/schema/permission";
|
|
14
|
+
import type { SessionMessage } from "@opencode/schema/session-message";
|
|
15
|
+
import type { SessionInbox } from "@opencode/schema/session-inbox";
|
|
16
|
+
import type { PromptInput } from "@opencode/schema/prompt-input";
|
|
17
|
+
import type { AgentAttachment } from "@opencode/schema/prompt";
|
|
18
|
+
import type { Skill } from "@opencode/schema/skill";
|
|
19
|
+
import type { Event } from "@opencode/schema/event";
|
|
20
|
+
import type { InstructionEntry } from "@opencode/schema/instruction-entry";
|
|
21
|
+
import type { Schema } from "effect";
|
|
22
|
+
import type { EventLog } from "@opencode/schema/event-log";
|
|
23
|
+
import type { Shell } from "@opencode/schema/shell";
|
|
24
|
+
import type { Provider } from "@opencode/schema/provider";
|
|
25
|
+
import type { Integration } from "@opencode/schema/integration";
|
|
26
|
+
import type { Form } from "@opencode/schema/form";
|
|
27
|
+
import type { Mcp } from "@opencode/schema/mcp";
|
|
28
|
+
import type { Credential } from "@opencode/schema/credential";
|
|
29
|
+
import type { PermissionSaved } from "@opencode/schema/permission-saved";
|
|
30
|
+
import type { FileSystem } from "@opencode/schema/filesystem";
|
|
31
|
+
import type { Command } from "@opencode/schema/command";
|
|
32
|
+
import type { OpenCodeEvent } from "@opencode/protocol/groups/event";
|
|
33
|
+
import type { Pty } from "@opencode/schema/pty";
|
|
34
|
+
import type { PtyTicket } from "@opencode/schema/pty-ticket";
|
|
35
|
+
import type { Reference } from "@opencode/schema/reference";
|
|
36
|
+
import type { Worktree } from "@opencode/schema/worktree";
|
|
37
|
+
import type { Vcs } from "@opencode/schema/vcs";
|
|
38
|
+
import type { FileDiff } from "@opencode/schema/file-diff";
|
|
39
|
+
import type { WebSearch } from "@opencode/schema/websearch";
|
|
40
|
+
import type { Config } from "@opencode/schema/config";
|
|
41
|
+
export type HealthGetOutput = {
|
|
42
|
+
readonly healthy: true;
|
|
43
|
+
readonly version: string;
|
|
44
|
+
readonly pid: number;
|
|
45
|
+
};
|
|
46
|
+
export type HealthGetOperation<E = never> = () => Effect.Effect<HealthGetOutput, E>;
|
|
47
|
+
export interface HealthApi<E = never> {
|
|
48
|
+
readonly get: HealthGetOperation<E>;
|
|
49
|
+
}
|
|
50
|
+
export type ServerGetOutput = {
|
|
51
|
+
readonly urls: ReadonlyArray<string>;
|
|
52
|
+
};
|
|
53
|
+
export type ServerGetOperation<E = never> = () => Effect.Effect<ServerGetOutput, E>;
|
|
54
|
+
export interface ServerApi<E = never> {
|
|
55
|
+
readonly get: ServerGetOperation<E>;
|
|
56
|
+
}
|
|
57
|
+
export type LocationGetInput = {
|
|
58
|
+
readonly location?: {
|
|
59
|
+
readonly directory?: string | undefined;
|
|
60
|
+
readonly workspace?: string | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
};
|
|
63
|
+
export type LocationGetOutput = Location.Info;
|
|
64
|
+
export type LocationGetOperation<E = never> = (input?: LocationGetInput) => Effect.Effect<LocationGetOutput, E>;
|
|
65
|
+
export interface LocationApi<E = never> {
|
|
66
|
+
readonly get: LocationGetOperation<E>;
|
|
67
|
+
}
|
|
68
|
+
export type AgentListInput = {
|
|
69
|
+
readonly location?: {
|
|
70
|
+
readonly directory?: string | undefined;
|
|
71
|
+
readonly workspace?: string | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
};
|
|
74
|
+
export type AgentListOutput = {
|
|
75
|
+
readonly location: Location.Info;
|
|
76
|
+
readonly data: ReadonlyArray<Agent.Info>;
|
|
77
|
+
};
|
|
78
|
+
export type AgentListOperation<E = never> = (input?: AgentListInput) => Effect.Effect<AgentListOutput, E>;
|
|
79
|
+
export type AgentGetInput = {
|
|
80
|
+
readonly agentID: Agent.ID;
|
|
81
|
+
readonly location?: {
|
|
82
|
+
readonly directory?: string | undefined;
|
|
83
|
+
readonly workspace?: string | undefined;
|
|
84
|
+
} | undefined;
|
|
85
|
+
};
|
|
86
|
+
export type AgentGetOutput = {
|
|
87
|
+
readonly location: Location.Info;
|
|
88
|
+
readonly data: Agent.Info;
|
|
89
|
+
};
|
|
90
|
+
export type AgentGetOperation<E = never> = (input: AgentGetInput) => Effect.Effect<AgentGetOutput, E>;
|
|
91
|
+
export interface AgentApi<E = never> {
|
|
92
|
+
readonly list: AgentListOperation<E>;
|
|
93
|
+
readonly get: AgentGetOperation<E>;
|
|
94
|
+
}
|
|
95
|
+
export type PluginListInput = {
|
|
96
|
+
readonly location?: {
|
|
97
|
+
readonly directory?: string | undefined;
|
|
98
|
+
readonly workspace?: string | undefined;
|
|
99
|
+
} | undefined;
|
|
100
|
+
};
|
|
101
|
+
export type PluginListOutput = {
|
|
102
|
+
readonly location: Location.Info;
|
|
103
|
+
readonly data: ReadonlyArray<Plugin.Info>;
|
|
104
|
+
};
|
|
105
|
+
export type PluginListOperation<E = never> = (input?: PluginListInput) => Effect.Effect<PluginListOutput, E>;
|
|
106
|
+
export type PluginAwaitActivationInput = {
|
|
107
|
+
readonly location?: {
|
|
108
|
+
readonly directory?: string | undefined;
|
|
109
|
+
readonly workspace?: string | undefined;
|
|
110
|
+
} | undefined;
|
|
111
|
+
};
|
|
112
|
+
export type PluginAwaitActivationOutput = void;
|
|
113
|
+
export type PluginAwaitActivationOperation<E = never> = (input?: PluginAwaitActivationInput) => Effect.Effect<PluginAwaitActivationOutput, E>;
|
|
114
|
+
export type PluginCheckInput = {
|
|
115
|
+
readonly location?: {
|
|
116
|
+
readonly directory?: string | undefined;
|
|
117
|
+
readonly workspace?: string | undefined;
|
|
118
|
+
} | undefined;
|
|
119
|
+
readonly target?: string | undefined;
|
|
120
|
+
};
|
|
121
|
+
export type PluginCheckOutput = {
|
|
122
|
+
readonly location: Location.Info;
|
|
123
|
+
readonly data: ReadonlyArray<Plugin.Info>;
|
|
124
|
+
};
|
|
125
|
+
export type PluginCheckOperation<E = never> = (input?: PluginCheckInput) => Effect.Effect<PluginCheckOutput, E>;
|
|
126
|
+
export type PluginUpdateInput = {
|
|
127
|
+
readonly location?: {
|
|
128
|
+
readonly directory?: string | undefined;
|
|
129
|
+
readonly workspace?: string | undefined;
|
|
130
|
+
} | undefined;
|
|
131
|
+
readonly targets: ReadonlyArray<string>;
|
|
132
|
+
};
|
|
133
|
+
export type PluginUpdateOutput = void;
|
|
134
|
+
export type PluginUpdateOperation<E = never> = (input: PluginUpdateInput) => Effect.Effect<PluginUpdateOutput, E>;
|
|
135
|
+
export interface PluginApi<E = never> {
|
|
136
|
+
readonly list: PluginListOperation<E>;
|
|
137
|
+
readonly awaitActivation: PluginAwaitActivationOperation<E>;
|
|
138
|
+
readonly check: PluginCheckOperation<E>;
|
|
139
|
+
readonly update: PluginUpdateOperation<E>;
|
|
140
|
+
}
|
|
141
|
+
export type SessionListInput = {
|
|
142
|
+
readonly workspace?: Workspace.ID | undefined;
|
|
143
|
+
readonly limit?: number | undefined;
|
|
144
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
145
|
+
readonly search?: string | undefined;
|
|
146
|
+
readonly parentID?: Session.ID | null | undefined;
|
|
147
|
+
readonly directory?: AbsolutePath | undefined;
|
|
148
|
+
readonly project?: Project.ID | undefined;
|
|
149
|
+
readonly subpath?: RelativePath | undefined;
|
|
150
|
+
readonly cursor?: (string & Brand.Brand<"SessionsCursor">) | undefined;
|
|
151
|
+
};
|
|
152
|
+
export type SessionListOutput = {
|
|
153
|
+
readonly data: ReadonlyArray<Session.Info>;
|
|
154
|
+
readonly cursor: {
|
|
155
|
+
readonly previous?: (string & Brand.Brand<"SessionsCursor">) | undefined;
|
|
156
|
+
readonly next?: (string & Brand.Brand<"SessionsCursor">) | undefined;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
export type SessionListOperation<E = never> = (input?: SessionListInput) => Effect.Effect<SessionListOutput, E>;
|
|
160
|
+
export type SessionStatsInput = {
|
|
161
|
+
readonly from?: number | undefined;
|
|
162
|
+
readonly to?: number | undefined;
|
|
163
|
+
readonly project?: Project.ID | undefined;
|
|
164
|
+
readonly timezone?: string | undefined;
|
|
165
|
+
readonly tools?: "none" | "summary" | "detail" | undefined;
|
|
166
|
+
};
|
|
167
|
+
export type SessionStatsOutput = {
|
|
168
|
+
readonly range: {
|
|
169
|
+
readonly from: DateTime.Utc;
|
|
170
|
+
readonly to: DateTime.Utc;
|
|
171
|
+
};
|
|
172
|
+
readonly sessions: number;
|
|
173
|
+
readonly subagents: number;
|
|
174
|
+
readonly prompts: number;
|
|
175
|
+
readonly steps: number;
|
|
176
|
+
readonly tokens: {
|
|
177
|
+
readonly input: number;
|
|
178
|
+
readonly output: number;
|
|
179
|
+
readonly reasoning: number;
|
|
180
|
+
readonly cache: {
|
|
181
|
+
readonly read: number;
|
|
182
|
+
readonly write: number;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
readonly cost: number & Brand.Brand<"Money.USD">;
|
|
186
|
+
readonly tools: {
|
|
187
|
+
readonly mode: "none";
|
|
188
|
+
} | {
|
|
189
|
+
readonly mode: "summary";
|
|
190
|
+
readonly totals: {
|
|
191
|
+
readonly calls: number;
|
|
192
|
+
readonly succeeded: number;
|
|
193
|
+
readonly failed: number;
|
|
194
|
+
readonly unfinished: number;
|
|
195
|
+
};
|
|
196
|
+
} | {
|
|
197
|
+
readonly mode: "detail";
|
|
198
|
+
readonly totals: {
|
|
199
|
+
readonly calls: number;
|
|
200
|
+
readonly succeeded: number;
|
|
201
|
+
readonly failed: number;
|
|
202
|
+
readonly unfinished: number;
|
|
203
|
+
};
|
|
204
|
+
readonly usage: ReadonlyArray<{
|
|
205
|
+
readonly name: string;
|
|
206
|
+
readonly calls: number;
|
|
207
|
+
readonly succeeded: number;
|
|
208
|
+
readonly failed: number;
|
|
209
|
+
readonly unfinished: number;
|
|
210
|
+
readonly durationP50?: number | undefined;
|
|
211
|
+
}>;
|
|
212
|
+
};
|
|
213
|
+
readonly activeDays: number;
|
|
214
|
+
readonly streak: number;
|
|
215
|
+
readonly activity: ReadonlyArray<{
|
|
216
|
+
readonly date: string;
|
|
217
|
+
readonly steps: number;
|
|
218
|
+
}>;
|
|
219
|
+
readonly models: ReadonlyArray<{
|
|
220
|
+
readonly model: Model.Ref;
|
|
221
|
+
readonly steps: number;
|
|
222
|
+
readonly tokens: {
|
|
223
|
+
readonly input: number;
|
|
224
|
+
readonly output: number;
|
|
225
|
+
readonly reasoning: number;
|
|
226
|
+
readonly cache: {
|
|
227
|
+
readonly read: number;
|
|
228
|
+
readonly write: number;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
readonly cost: number & Brand.Brand<"Money.USD">;
|
|
232
|
+
}>;
|
|
233
|
+
};
|
|
234
|
+
export type SessionStatsOperation<E = never> = (input?: SessionStatsInput) => Effect.Effect<SessionStatsOutput, E>;
|
|
235
|
+
export type SessionCreateInput = {
|
|
236
|
+
readonly id?: Session.ID | undefined;
|
|
237
|
+
readonly title?: string | undefined;
|
|
238
|
+
readonly agent?: Agent.ID | undefined;
|
|
239
|
+
readonly model?: Model.Ref | undefined;
|
|
240
|
+
readonly location?: Location.Ref | undefined;
|
|
241
|
+
readonly metadata?: Session.Metadata | undefined;
|
|
242
|
+
readonly permissions?: Permission.Ruleset | undefined;
|
|
243
|
+
};
|
|
244
|
+
export type SessionCreateOutput = Session.Info;
|
|
245
|
+
export type SessionCreateOperation<E = never> = (input?: SessionCreateInput) => Effect.Effect<SessionCreateOutput, E>;
|
|
246
|
+
export type SessionImportInput = {
|
|
247
|
+
readonly info: Session.Info;
|
|
248
|
+
readonly messages: ReadonlyArray<SessionMessage.Info>;
|
|
249
|
+
readonly location?: Location.Ref | undefined;
|
|
250
|
+
};
|
|
251
|
+
export type SessionImportOutput = Session.Info;
|
|
252
|
+
export type SessionImportOperation<E = never> = (input: SessionImportInput) => Effect.Effect<SessionImportOutput, E>;
|
|
253
|
+
export type SessionExportInput = {
|
|
254
|
+
readonly sessionID: Session.ID;
|
|
255
|
+
readonly sanitize?: boolean | undefined;
|
|
256
|
+
};
|
|
257
|
+
export type SessionExportOutput = {
|
|
258
|
+
readonly info: Session.Info;
|
|
259
|
+
readonly messages: ReadonlyArray<SessionMessage.Info>;
|
|
260
|
+
};
|
|
261
|
+
export type SessionExportOperation<E = never> = (input: SessionExportInput) => Effect.Effect<SessionExportOutput, E>;
|
|
262
|
+
export type SessionActiveOutput = {
|
|
263
|
+
readonly [x: Session.ID]: {
|
|
264
|
+
readonly type: "running";
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
export type SessionActiveOperation<E = never> = () => Effect.Effect<SessionActiveOutput, E>;
|
|
268
|
+
export type SessionGetInput = {
|
|
269
|
+
readonly sessionID: Session.ID;
|
|
270
|
+
};
|
|
271
|
+
export type SessionGetOutput = Session.Info;
|
|
272
|
+
export type SessionGetOperation<E = never> = (input: SessionGetInput) => Effect.Effect<SessionGetOutput, E>;
|
|
273
|
+
export type SessionRemoveInput = {
|
|
274
|
+
readonly sessionID: Session.ID;
|
|
275
|
+
};
|
|
276
|
+
export type SessionRemoveOutput = void;
|
|
277
|
+
export type SessionRemoveOperation<E = never> = (input: SessionRemoveInput) => Effect.Effect<SessionRemoveOutput, E>;
|
|
278
|
+
export type SessionForkInput = {
|
|
279
|
+
readonly sessionID: Session.ID;
|
|
280
|
+
readonly boundary: Session.ForkRequestBoundary;
|
|
281
|
+
};
|
|
282
|
+
export type SessionForkOutput = Session.Info;
|
|
283
|
+
export type SessionForkOperation<E = never> = (input: SessionForkInput) => Effect.Effect<SessionForkOutput, E>;
|
|
284
|
+
export type SessionSwitchAgentInput = {
|
|
285
|
+
readonly sessionID: Session.ID;
|
|
286
|
+
readonly agent: Agent.ID;
|
|
287
|
+
};
|
|
288
|
+
export type SessionSwitchAgentOutput = void;
|
|
289
|
+
export type SessionSwitchAgentOperation<E = never> = (input: SessionSwitchAgentInput) => Effect.Effect<SessionSwitchAgentOutput, E>;
|
|
290
|
+
export type SessionSwitchModelInput = {
|
|
291
|
+
readonly sessionID: Session.ID;
|
|
292
|
+
readonly model: Model.Ref;
|
|
293
|
+
};
|
|
294
|
+
export type SessionSwitchModelOutput = void;
|
|
295
|
+
export type SessionSwitchModelOperation<E = never> = (input: SessionSwitchModelInput) => Effect.Effect<SessionSwitchModelOutput, E>;
|
|
296
|
+
export type SessionRenameInput = {
|
|
297
|
+
readonly sessionID: Session.ID;
|
|
298
|
+
readonly title: string;
|
|
299
|
+
};
|
|
300
|
+
export type SessionRenameOutput = void;
|
|
301
|
+
export type SessionRenameOperation<E = never> = (input: SessionRenameInput) => Effect.Effect<SessionRenameOutput, E>;
|
|
302
|
+
export type SessionMoveInput = {
|
|
303
|
+
readonly sessionID: Session.ID;
|
|
304
|
+
readonly directory: AbsolutePath;
|
|
305
|
+
readonly workspaceID?: Workspace.ID | undefined;
|
|
306
|
+
readonly delivery?: SessionInbox.Delivery | undefined;
|
|
307
|
+
};
|
|
308
|
+
export type SessionMoveOutput = void;
|
|
309
|
+
export type SessionMoveOperation<E = never> = (input: SessionMoveInput) => Effect.Effect<SessionMoveOutput, E>;
|
|
310
|
+
export type SessionPromptInput = {
|
|
311
|
+
readonly sessionID: Session.ID;
|
|
312
|
+
readonly id?: SessionMessage.ID | undefined;
|
|
313
|
+
readonly text: string;
|
|
314
|
+
readonly files?: ReadonlyArray<PromptInput.FileAttachment> | undefined;
|
|
315
|
+
readonly agents?: ReadonlyArray<AgentAttachment> | undefined;
|
|
316
|
+
readonly skills?: ReadonlyArray<PromptInput.SkillAttachment> | undefined;
|
|
317
|
+
readonly metadata?: {
|
|
318
|
+
readonly [x: string]: unknown;
|
|
319
|
+
} | undefined;
|
|
320
|
+
readonly delivery?: SessionInbox.Delivery | undefined;
|
|
321
|
+
readonly resume?: boolean | undefined;
|
|
322
|
+
};
|
|
323
|
+
export type SessionPromptOutput = SessionInbox.User;
|
|
324
|
+
export type SessionPromptOperation<E = never> = (input: SessionPromptInput) => Effect.Effect<SessionPromptOutput, E>;
|
|
325
|
+
export type SessionCommandInput = {
|
|
326
|
+
readonly sessionID: Session.ID;
|
|
327
|
+
readonly command: string;
|
|
328
|
+
readonly text: string;
|
|
329
|
+
readonly files?: ReadonlyArray<PromptInput.FileAttachment> | undefined;
|
|
330
|
+
readonly agents?: ReadonlyArray<AgentAttachment> | undefined;
|
|
331
|
+
readonly skills?: ReadonlyArray<PromptInput.SkillAttachment> | undefined;
|
|
332
|
+
readonly delivery?: SessionInbox.Delivery | undefined;
|
|
333
|
+
};
|
|
334
|
+
export type SessionCommandOutput = void;
|
|
335
|
+
export type SessionCommandOperation<E = never> = (input: SessionCommandInput) => Effect.Effect<SessionCommandOutput, E>;
|
|
336
|
+
export type SessionSkillInput = {
|
|
337
|
+
readonly sessionID: Session.ID;
|
|
338
|
+
readonly id?: SessionMessage.ID | undefined;
|
|
339
|
+
readonly skill: Skill.ID;
|
|
340
|
+
readonly resume?: boolean | undefined;
|
|
341
|
+
};
|
|
342
|
+
export type SessionSkillOutput = void;
|
|
343
|
+
export type SessionSkillOperation<E = never> = (input: SessionSkillInput) => Effect.Effect<SessionSkillOutput, E>;
|
|
344
|
+
export type SessionSyntheticInput = {
|
|
345
|
+
readonly sessionID: Session.ID;
|
|
346
|
+
readonly id?: SessionMessage.ID | undefined;
|
|
347
|
+
readonly text: string;
|
|
348
|
+
readonly description?: string | undefined;
|
|
349
|
+
readonly metadata?: {
|
|
350
|
+
readonly [x: string]: unknown;
|
|
351
|
+
} | undefined;
|
|
352
|
+
readonly delivery?: SessionInbox.Delivery | undefined;
|
|
353
|
+
readonly resume?: boolean | undefined;
|
|
354
|
+
};
|
|
355
|
+
export type SessionSyntheticOutput = SessionInbox.Synthetic;
|
|
356
|
+
export type SessionSyntheticOperation<E = never> = (input: SessionSyntheticInput) => Effect.Effect<SessionSyntheticOutput, E>;
|
|
357
|
+
export type SessionShellInput = {
|
|
358
|
+
readonly sessionID: Session.ID;
|
|
359
|
+
readonly id?: Event.ID | undefined;
|
|
360
|
+
readonly command: string;
|
|
361
|
+
};
|
|
362
|
+
export type SessionShellOutput = void;
|
|
363
|
+
export type SessionShellOperation<E = never> = (input: SessionShellInput) => Effect.Effect<SessionShellOutput, E>;
|
|
364
|
+
export type SessionCompactInput = {
|
|
365
|
+
readonly sessionID: Session.ID;
|
|
366
|
+
readonly id?: SessionMessage.ID | undefined;
|
|
367
|
+
readonly delivery?: SessionInbox.Delivery | undefined;
|
|
368
|
+
};
|
|
369
|
+
export type SessionCompactOutput = SessionInbox.Compaction;
|
|
370
|
+
export type SessionCompactOperation<E = never> = (input: SessionCompactInput) => Effect.Effect<SessionCompactOutput, E>;
|
|
371
|
+
export type SessionWaitInput = {
|
|
372
|
+
readonly sessionID: Session.ID;
|
|
373
|
+
};
|
|
374
|
+
export type SessionWaitOutput = void;
|
|
375
|
+
export type SessionWaitOperation<E = never> = (input: SessionWaitInput) => Effect.Effect<SessionWaitOutput, E>;
|
|
376
|
+
export type SessionRevertStageInput = {
|
|
377
|
+
readonly sessionID: Session.ID;
|
|
378
|
+
readonly messageID: SessionMessage.ID;
|
|
379
|
+
readonly files?: boolean | undefined;
|
|
380
|
+
};
|
|
381
|
+
export type SessionRevertStageOutput = Session.Revert;
|
|
382
|
+
export type SessionRevertStageOperation<E = never> = (input: SessionRevertStageInput) => Effect.Effect<SessionRevertStageOutput, E>;
|
|
383
|
+
export type SessionRevertClearInput = {
|
|
384
|
+
readonly sessionID: Session.ID;
|
|
385
|
+
};
|
|
386
|
+
export type SessionRevertClearOutput = void;
|
|
387
|
+
export type SessionRevertClearOperation<E = never> = (input: SessionRevertClearInput) => Effect.Effect<SessionRevertClearOutput, E>;
|
|
388
|
+
export type SessionRevertCommitInput = {
|
|
389
|
+
readonly sessionID: Session.ID;
|
|
390
|
+
};
|
|
391
|
+
export type SessionRevertCommitOutput = void;
|
|
392
|
+
export type SessionRevertCommitOperation<E = never> = (input: SessionRevertCommitInput) => Effect.Effect<SessionRevertCommitOutput, E>;
|
|
393
|
+
export type SessionContextInput = {
|
|
394
|
+
readonly sessionID: Session.ID;
|
|
395
|
+
};
|
|
396
|
+
export type SessionContextOutput = ReadonlyArray<SessionMessage.Info>;
|
|
397
|
+
export type SessionContextOperation<E = never> = (input: SessionContextInput) => Effect.Effect<SessionContextOutput, E>;
|
|
398
|
+
export type SessionInboxListInput = {
|
|
399
|
+
readonly sessionID: Session.ID;
|
|
400
|
+
};
|
|
401
|
+
export type SessionInboxListOutput = ReadonlyArray<SessionInbox.Info>;
|
|
402
|
+
export type SessionInboxListOperation<E = never> = (input: SessionInboxListInput) => Effect.Effect<SessionInboxListOutput, E>;
|
|
403
|
+
export type SessionInboxCancelInput = {
|
|
404
|
+
readonly sessionID: Session.ID;
|
|
405
|
+
readonly inboxID: SessionMessage.ID;
|
|
406
|
+
};
|
|
407
|
+
export type SessionInboxCancelOutput = void;
|
|
408
|
+
export type SessionInboxCancelOperation<E = never> = (input: SessionInboxCancelInput) => Effect.Effect<SessionInboxCancelOutput, E>;
|
|
409
|
+
export type SessionInboxSteerInput = {
|
|
410
|
+
readonly sessionID: Session.ID;
|
|
411
|
+
readonly inboxID: SessionMessage.ID;
|
|
412
|
+
};
|
|
413
|
+
export type SessionInboxSteerOutput = void;
|
|
414
|
+
export type SessionInboxSteerOperation<E = never> = (input: SessionInboxSteerInput) => Effect.Effect<SessionInboxSteerOutput, E>;
|
|
415
|
+
export type SessionInboxQueueInput = {
|
|
416
|
+
readonly sessionID: Session.ID;
|
|
417
|
+
readonly inboxID: SessionMessage.ID;
|
|
418
|
+
};
|
|
419
|
+
export type SessionInboxQueueOutput = void;
|
|
420
|
+
export type SessionInboxQueueOperation<E = never> = (input: SessionInboxQueueInput) => Effect.Effect<SessionInboxQueueOutput, E>;
|
|
421
|
+
export type SessionInstructionsEntryListInput = {
|
|
422
|
+
readonly sessionID: Session.ID;
|
|
423
|
+
};
|
|
424
|
+
export type SessionInstructionsEntryListOutput = ReadonlyArray<InstructionEntry.Info>;
|
|
425
|
+
export type SessionInstructionsEntryListOperation<E = never> = (input: SessionInstructionsEntryListInput) => Effect.Effect<SessionInstructionsEntryListOutput, E>;
|
|
426
|
+
export type SessionInstructionsEntryPutInput = {
|
|
427
|
+
readonly sessionID: Session.ID;
|
|
428
|
+
readonly key: InstructionEntry.Key;
|
|
429
|
+
readonly value: Schema.Json;
|
|
430
|
+
};
|
|
431
|
+
export type SessionInstructionsEntryPutOutput = void;
|
|
432
|
+
export type SessionInstructionsEntryPutOperation<E = never> = (input: SessionInstructionsEntryPutInput) => Effect.Effect<SessionInstructionsEntryPutOutput, E>;
|
|
433
|
+
export type SessionInstructionsEntryRemoveInput = {
|
|
434
|
+
readonly sessionID: Session.ID;
|
|
435
|
+
readonly key: InstructionEntry.Key;
|
|
436
|
+
};
|
|
437
|
+
export type SessionInstructionsEntryRemoveOutput = void;
|
|
438
|
+
export type SessionInstructionsEntryRemoveOperation<E = never> = (input: SessionInstructionsEntryRemoveInput) => Effect.Effect<SessionInstructionsEntryRemoveOutput, E>;
|
|
439
|
+
export type SessionGenerateInput = {
|
|
440
|
+
readonly sessionID: Session.ID;
|
|
441
|
+
readonly prompt: string;
|
|
442
|
+
};
|
|
443
|
+
export type SessionGenerateOutput = {
|
|
444
|
+
readonly text: string;
|
|
445
|
+
};
|
|
446
|
+
export type SessionGenerateOperation<E = never> = (input: SessionGenerateInput) => Effect.Effect<SessionGenerateOutput, E>;
|
|
447
|
+
export type SessionLogInput = {
|
|
448
|
+
readonly sessionID: Session.ID;
|
|
449
|
+
readonly after?: Event.Seq | undefined;
|
|
450
|
+
readonly follow?: boolean | undefined;
|
|
451
|
+
};
|
|
452
|
+
export type SessionLogOutput = ({
|
|
453
|
+
readonly id: Event.ID;
|
|
454
|
+
readonly created: number;
|
|
455
|
+
readonly metadata?: {
|
|
456
|
+
readonly [x: string]: unknown;
|
|
457
|
+
} | undefined;
|
|
458
|
+
readonly type: "session.created";
|
|
459
|
+
readonly durable: {
|
|
460
|
+
readonly aggregateID: string;
|
|
461
|
+
readonly seq: Event.Seq;
|
|
462
|
+
readonly version: Event.Version;
|
|
463
|
+
};
|
|
464
|
+
readonly location?: Location.Ref | undefined;
|
|
465
|
+
readonly data: {
|
|
466
|
+
readonly sessionID: Session.ID;
|
|
467
|
+
readonly projectID: Project.ID;
|
|
468
|
+
readonly location: Location.Ref;
|
|
469
|
+
readonly subpath?: RelativePath | undefined;
|
|
470
|
+
readonly parentID?: Session.ID | undefined;
|
|
471
|
+
readonly slug: string;
|
|
472
|
+
readonly title?: string | undefined;
|
|
473
|
+
readonly agent?: Agent.ID | undefined;
|
|
474
|
+
readonly model?: Model.Ref | undefined;
|
|
475
|
+
readonly metadata?: Session.Metadata | undefined;
|
|
476
|
+
readonly permissions?: Permission.Ruleset | undefined;
|
|
477
|
+
readonly version: string;
|
|
478
|
+
};
|
|
479
|
+
} | {
|
|
480
|
+
readonly id: Event.ID;
|
|
481
|
+
readonly created: number;
|
|
482
|
+
readonly metadata?: {
|
|
483
|
+
readonly [x: string]: unknown;
|
|
484
|
+
} | undefined;
|
|
485
|
+
readonly type: "session.agent.selected";
|
|
486
|
+
readonly durable: {
|
|
487
|
+
readonly aggregateID: string;
|
|
488
|
+
readonly seq: Event.Seq;
|
|
489
|
+
readonly version: Event.Version;
|
|
490
|
+
};
|
|
491
|
+
readonly location?: Location.Ref | undefined;
|
|
492
|
+
readonly data: {
|
|
493
|
+
readonly sessionID: Session.ID;
|
|
494
|
+
readonly agent: Agent.ID;
|
|
495
|
+
readonly previous?: Agent.ID | undefined;
|
|
496
|
+
};
|
|
497
|
+
} | {
|
|
498
|
+
readonly id: Event.ID;
|
|
499
|
+
readonly created: number;
|
|
500
|
+
readonly metadata?: {
|
|
501
|
+
readonly [x: string]: unknown;
|
|
502
|
+
} | undefined;
|
|
503
|
+
readonly type: "session.model.selected";
|
|
504
|
+
readonly durable: {
|
|
505
|
+
readonly aggregateID: string;
|
|
506
|
+
readonly seq: Event.Seq;
|
|
507
|
+
readonly version: Event.Version;
|
|
508
|
+
};
|
|
509
|
+
readonly location?: Location.Ref | undefined;
|
|
510
|
+
readonly data: {
|
|
511
|
+
readonly sessionID: Session.ID;
|
|
512
|
+
readonly model: Model.Ref;
|
|
513
|
+
readonly previous?: Model.Ref | undefined;
|
|
514
|
+
};
|
|
515
|
+
} | {
|
|
516
|
+
readonly id: Event.ID;
|
|
517
|
+
readonly created: number;
|
|
518
|
+
readonly metadata?: {
|
|
519
|
+
readonly [x: string]: unknown;
|
|
520
|
+
} | undefined;
|
|
521
|
+
readonly type: "session.moved";
|
|
522
|
+
readonly durable: {
|
|
523
|
+
readonly aggregateID: string;
|
|
524
|
+
readonly seq: Event.Seq;
|
|
525
|
+
readonly version: Event.Version;
|
|
526
|
+
};
|
|
527
|
+
readonly location?: Location.Ref | undefined;
|
|
528
|
+
readonly data: {
|
|
529
|
+
readonly sessionID: Session.ID;
|
|
530
|
+
readonly location: Location.Ref;
|
|
531
|
+
readonly projectID: Project.ID;
|
|
532
|
+
readonly subpath?: RelativePath | undefined;
|
|
533
|
+
};
|
|
534
|
+
} | {
|
|
535
|
+
readonly id: Event.ID;
|
|
536
|
+
readonly created: number;
|
|
537
|
+
readonly metadata?: {
|
|
538
|
+
readonly [x: string]: unknown;
|
|
539
|
+
} | undefined;
|
|
540
|
+
readonly type: "session.renamed";
|
|
541
|
+
readonly durable: {
|
|
542
|
+
readonly aggregateID: string;
|
|
543
|
+
readonly seq: Event.Seq;
|
|
544
|
+
readonly version: Event.Version;
|
|
545
|
+
};
|
|
546
|
+
readonly location?: Location.Ref | undefined;
|
|
547
|
+
readonly data: {
|
|
548
|
+
readonly sessionID: Session.ID;
|
|
549
|
+
readonly title: string;
|
|
550
|
+
};
|
|
551
|
+
} | {
|
|
552
|
+
readonly id: Event.ID;
|
|
553
|
+
readonly created: number;
|
|
554
|
+
readonly metadata?: {
|
|
555
|
+
readonly [x: string]: unknown;
|
|
556
|
+
} | undefined;
|
|
557
|
+
readonly type: "session.permissions.updated";
|
|
558
|
+
readonly durable: {
|
|
559
|
+
readonly aggregateID: string;
|
|
560
|
+
readonly seq: Event.Seq;
|
|
561
|
+
readonly version: Event.Version;
|
|
562
|
+
};
|
|
563
|
+
readonly location?: Location.Ref | undefined;
|
|
564
|
+
readonly data: {
|
|
565
|
+
readonly sessionID: Session.ID;
|
|
566
|
+
readonly permissions: Permission.Ruleset;
|
|
567
|
+
};
|
|
568
|
+
} | {
|
|
569
|
+
readonly id: Event.ID;
|
|
570
|
+
readonly created: number;
|
|
571
|
+
readonly metadata?: {
|
|
572
|
+
readonly [x: string]: unknown;
|
|
573
|
+
} | undefined;
|
|
574
|
+
readonly type: "session.viewed";
|
|
575
|
+
readonly durable: {
|
|
576
|
+
readonly aggregateID: string;
|
|
577
|
+
readonly seq: Event.Seq;
|
|
578
|
+
readonly version: Event.Version;
|
|
579
|
+
};
|
|
580
|
+
readonly location?: Location.Ref | undefined;
|
|
581
|
+
readonly data: {
|
|
582
|
+
readonly sessionID: Session.ID;
|
|
583
|
+
readonly idle: number;
|
|
584
|
+
};
|
|
585
|
+
} | {
|
|
586
|
+
readonly id: Event.ID;
|
|
587
|
+
readonly created: number;
|
|
588
|
+
readonly metadata?: {
|
|
589
|
+
readonly [x: string]: unknown;
|
|
590
|
+
} | undefined;
|
|
591
|
+
readonly type: "session.deleted";
|
|
592
|
+
readonly durable: {
|
|
593
|
+
readonly aggregateID: string;
|
|
594
|
+
readonly seq: Event.Seq;
|
|
595
|
+
readonly version: Event.Version;
|
|
596
|
+
};
|
|
597
|
+
readonly location?: Location.Ref | undefined;
|
|
598
|
+
readonly data: {
|
|
599
|
+
readonly sessionID: Session.ID;
|
|
600
|
+
};
|
|
601
|
+
} | {
|
|
602
|
+
readonly id: Event.ID;
|
|
603
|
+
readonly created: number;
|
|
604
|
+
readonly metadata?: {
|
|
605
|
+
readonly [x: string]: unknown;
|
|
606
|
+
} | undefined;
|
|
607
|
+
readonly type: "session.forked";
|
|
608
|
+
readonly durable: {
|
|
609
|
+
readonly aggregateID: string;
|
|
610
|
+
readonly seq: Event.Seq;
|
|
611
|
+
readonly version: Event.Version;
|
|
612
|
+
};
|
|
613
|
+
readonly location?: Location.Ref | undefined;
|
|
614
|
+
readonly data: {
|
|
615
|
+
readonly sessionID: Session.ID;
|
|
616
|
+
readonly parentID: Session.ID;
|
|
617
|
+
readonly boundary: Session.ForkBoundary;
|
|
618
|
+
readonly instructions?: {
|
|
619
|
+
readonly [x: string & Brand.Brand<"Instruction.Key">]: string & Brand.Brand<"Instruction.Hash">;
|
|
620
|
+
} | undefined;
|
|
621
|
+
readonly instructionEntries?: InstructionEntry.Snapshot | undefined;
|
|
622
|
+
};
|
|
623
|
+
} | {
|
|
624
|
+
readonly id: Event.ID;
|
|
625
|
+
readonly created: number;
|
|
626
|
+
readonly metadata?: {
|
|
627
|
+
readonly [x: string]: unknown;
|
|
628
|
+
} | undefined;
|
|
629
|
+
readonly type: "session.inbox.delivered";
|
|
630
|
+
readonly durable: {
|
|
631
|
+
readonly aggregateID: string;
|
|
632
|
+
readonly seq: Event.Seq;
|
|
633
|
+
readonly version: Event.Version;
|
|
634
|
+
};
|
|
635
|
+
readonly location?: Location.Ref | undefined;
|
|
636
|
+
readonly data: {
|
|
637
|
+
readonly sessionID: Session.ID;
|
|
638
|
+
readonly inboxID: SessionMessage.ID;
|
|
639
|
+
};
|
|
640
|
+
} | {
|
|
641
|
+
readonly id: Event.ID;
|
|
642
|
+
readonly created: number;
|
|
643
|
+
readonly metadata?: {
|
|
644
|
+
readonly [x: string]: unknown;
|
|
645
|
+
} | undefined;
|
|
646
|
+
readonly type: "session.inbox.enqueued";
|
|
647
|
+
readonly durable: {
|
|
648
|
+
readonly aggregateID: string;
|
|
649
|
+
readonly seq: Event.Seq;
|
|
650
|
+
readonly version: Event.Version;
|
|
651
|
+
};
|
|
652
|
+
readonly location?: Location.Ref | undefined;
|
|
653
|
+
readonly data: {
|
|
654
|
+
readonly sessionID: Session.ID;
|
|
655
|
+
readonly inboxID: SessionMessage.ID;
|
|
656
|
+
readonly item: SessionInbox.Item;
|
|
657
|
+
};
|
|
658
|
+
} | {
|
|
659
|
+
readonly id: Event.ID;
|
|
660
|
+
readonly created: number;
|
|
661
|
+
readonly metadata?: {
|
|
662
|
+
readonly [x: string]: unknown;
|
|
663
|
+
} | undefined;
|
|
664
|
+
readonly type: "session.inbox.cancelled";
|
|
665
|
+
readonly durable: {
|
|
666
|
+
readonly aggregateID: string;
|
|
667
|
+
readonly seq: Event.Seq;
|
|
668
|
+
readonly version: Event.Version;
|
|
669
|
+
};
|
|
670
|
+
readonly location?: Location.Ref | undefined;
|
|
671
|
+
readonly data: {
|
|
672
|
+
readonly sessionID: Session.ID;
|
|
673
|
+
readonly inboxID: SessionMessage.ID;
|
|
674
|
+
};
|
|
675
|
+
} | {
|
|
676
|
+
readonly id: Event.ID;
|
|
677
|
+
readonly created: number;
|
|
678
|
+
readonly metadata?: {
|
|
679
|
+
readonly [x: string]: unknown;
|
|
680
|
+
} | undefined;
|
|
681
|
+
readonly type: "session.inbox.delivery.changed";
|
|
682
|
+
readonly durable: {
|
|
683
|
+
readonly aggregateID: string;
|
|
684
|
+
readonly seq: Event.Seq;
|
|
685
|
+
readonly version: Event.Version;
|
|
686
|
+
};
|
|
687
|
+
readonly location?: Location.Ref | undefined;
|
|
688
|
+
readonly data: {
|
|
689
|
+
readonly sessionID: Session.ID;
|
|
690
|
+
readonly inboxID: SessionMessage.ID;
|
|
691
|
+
readonly delivery: SessionInbox.Delivery;
|
|
692
|
+
};
|
|
693
|
+
} | {
|
|
694
|
+
readonly id: Event.ID;
|
|
695
|
+
readonly created: number;
|
|
696
|
+
readonly metadata?: {
|
|
697
|
+
readonly [x: string]: unknown;
|
|
698
|
+
} | undefined;
|
|
699
|
+
readonly type: "session.execution.started";
|
|
700
|
+
readonly durable: {
|
|
701
|
+
readonly aggregateID: string;
|
|
702
|
+
readonly seq: Event.Seq;
|
|
703
|
+
readonly version: Event.Version;
|
|
704
|
+
};
|
|
705
|
+
readonly location?: Location.Ref | undefined;
|
|
706
|
+
readonly data: {
|
|
707
|
+
readonly sessionID: Session.ID;
|
|
708
|
+
};
|
|
709
|
+
} | {
|
|
710
|
+
readonly id: Event.ID;
|
|
711
|
+
readonly created: number;
|
|
712
|
+
readonly metadata?: {
|
|
713
|
+
readonly [x: string]: unknown;
|
|
714
|
+
} | undefined;
|
|
715
|
+
readonly type: "session.execution.succeeded";
|
|
716
|
+
readonly durable: {
|
|
717
|
+
readonly aggregateID: string;
|
|
718
|
+
readonly seq: Event.Seq;
|
|
719
|
+
readonly version: Event.Version;
|
|
720
|
+
};
|
|
721
|
+
readonly location?: Location.Ref | undefined;
|
|
722
|
+
readonly data: {
|
|
723
|
+
readonly sessionID: Session.ID;
|
|
724
|
+
};
|
|
725
|
+
} | {
|
|
726
|
+
readonly id: Event.ID;
|
|
727
|
+
readonly created: number;
|
|
728
|
+
readonly metadata?: {
|
|
729
|
+
readonly [x: string]: unknown;
|
|
730
|
+
} | undefined;
|
|
731
|
+
readonly type: "session.execution.failed";
|
|
732
|
+
readonly durable: {
|
|
733
|
+
readonly aggregateID: string;
|
|
734
|
+
readonly seq: Event.Seq;
|
|
735
|
+
readonly version: Event.Version;
|
|
736
|
+
};
|
|
737
|
+
readonly location?: Location.Ref | undefined;
|
|
738
|
+
readonly data: {
|
|
739
|
+
readonly sessionID: Session.ID;
|
|
740
|
+
readonly error: {
|
|
741
|
+
readonly type: string;
|
|
742
|
+
readonly message: string;
|
|
743
|
+
readonly status?: number | undefined;
|
|
744
|
+
};
|
|
745
|
+
};
|
|
746
|
+
} | {
|
|
747
|
+
readonly id: Event.ID;
|
|
748
|
+
readonly created: number;
|
|
749
|
+
readonly metadata?: {
|
|
750
|
+
readonly [x: string]: unknown;
|
|
751
|
+
} | undefined;
|
|
752
|
+
readonly type: "session.execution.interrupted";
|
|
753
|
+
readonly durable: {
|
|
754
|
+
readonly aggregateID: string;
|
|
755
|
+
readonly seq: Event.Seq;
|
|
756
|
+
readonly version: Event.Version;
|
|
757
|
+
};
|
|
758
|
+
readonly location?: Location.Ref | undefined;
|
|
759
|
+
readonly data: {
|
|
760
|
+
readonly sessionID: Session.ID;
|
|
761
|
+
readonly reason: "user" | "shutdown" | "superseded" | "inactivity";
|
|
762
|
+
};
|
|
763
|
+
} | {
|
|
764
|
+
readonly id: Event.ID;
|
|
765
|
+
readonly created: number;
|
|
766
|
+
readonly metadata?: {
|
|
767
|
+
readonly [x: string]: unknown;
|
|
768
|
+
} | undefined;
|
|
769
|
+
readonly type: "session.instructions.updated";
|
|
770
|
+
readonly durable: {
|
|
771
|
+
readonly aggregateID: string;
|
|
772
|
+
readonly seq: Event.Seq;
|
|
773
|
+
readonly version: Event.Version;
|
|
774
|
+
};
|
|
775
|
+
readonly location?: Location.Ref | undefined;
|
|
776
|
+
readonly data: {
|
|
777
|
+
readonly sessionID: Session.ID;
|
|
778
|
+
readonly delta: {
|
|
779
|
+
readonly [x: string]: (string & Brand.Brand<"Instruction.Hash">) | "removed";
|
|
780
|
+
};
|
|
781
|
+
readonly text?: string | undefined;
|
|
782
|
+
};
|
|
783
|
+
} | {
|
|
784
|
+
readonly id: Event.ID;
|
|
785
|
+
readonly created: number;
|
|
786
|
+
readonly metadata?: {
|
|
787
|
+
readonly [x: string]: unknown;
|
|
788
|
+
} | undefined;
|
|
789
|
+
readonly type: "session.synthetic";
|
|
790
|
+
readonly durable: {
|
|
791
|
+
readonly aggregateID: string;
|
|
792
|
+
readonly seq: Event.Seq;
|
|
793
|
+
readonly version: Event.Version;
|
|
794
|
+
};
|
|
795
|
+
readonly location?: Location.Ref | undefined;
|
|
796
|
+
readonly data: {
|
|
797
|
+
readonly sessionID: Session.ID;
|
|
798
|
+
readonly text: string;
|
|
799
|
+
readonly description?: string | undefined;
|
|
800
|
+
readonly metadata?: {
|
|
801
|
+
readonly [x: string]: unknown;
|
|
802
|
+
} | undefined;
|
|
803
|
+
};
|
|
804
|
+
} | {
|
|
805
|
+
readonly id: Event.ID;
|
|
806
|
+
readonly created: number;
|
|
807
|
+
readonly metadata?: {
|
|
808
|
+
readonly [x: string]: unknown;
|
|
809
|
+
} | undefined;
|
|
810
|
+
readonly type: "session.skill.activated";
|
|
811
|
+
readonly durable: {
|
|
812
|
+
readonly aggregateID: string;
|
|
813
|
+
readonly seq: Event.Seq;
|
|
814
|
+
readonly version: Event.Version;
|
|
815
|
+
};
|
|
816
|
+
readonly location?: Location.Ref | undefined;
|
|
817
|
+
readonly data: {
|
|
818
|
+
readonly sessionID: Session.ID;
|
|
819
|
+
readonly id: Skill.ID;
|
|
820
|
+
readonly name: Skill.Name;
|
|
821
|
+
readonly text: string;
|
|
822
|
+
};
|
|
823
|
+
} | {
|
|
824
|
+
readonly id: Event.ID;
|
|
825
|
+
readonly created: number;
|
|
826
|
+
readonly metadata?: {
|
|
827
|
+
readonly [x: string]: unknown;
|
|
828
|
+
} | undefined;
|
|
829
|
+
readonly type: "session.shell.started";
|
|
830
|
+
readonly durable: {
|
|
831
|
+
readonly aggregateID: string;
|
|
832
|
+
readonly seq: Event.Seq;
|
|
833
|
+
readonly version: Event.Version;
|
|
834
|
+
};
|
|
835
|
+
readonly location?: Location.Ref | undefined;
|
|
836
|
+
readonly data: {
|
|
837
|
+
readonly sessionID: Session.ID;
|
|
838
|
+
readonly shell: Shell.Info;
|
|
839
|
+
};
|
|
840
|
+
} | {
|
|
841
|
+
readonly id: Event.ID;
|
|
842
|
+
readonly created: number;
|
|
843
|
+
readonly metadata?: {
|
|
844
|
+
readonly [x: string]: unknown;
|
|
845
|
+
} | undefined;
|
|
846
|
+
readonly type: "session.shell.ended";
|
|
847
|
+
readonly durable: {
|
|
848
|
+
readonly aggregateID: string;
|
|
849
|
+
readonly seq: Event.Seq;
|
|
850
|
+
readonly version: Event.Version;
|
|
851
|
+
};
|
|
852
|
+
readonly location?: Location.Ref | undefined;
|
|
853
|
+
readonly data: {
|
|
854
|
+
readonly sessionID: Session.ID;
|
|
855
|
+
readonly shell: Shell.Info;
|
|
856
|
+
readonly output: {
|
|
857
|
+
readonly output: string;
|
|
858
|
+
readonly cursor: number;
|
|
859
|
+
readonly size: number;
|
|
860
|
+
readonly truncated: boolean;
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
} | {
|
|
864
|
+
readonly id: Event.ID;
|
|
865
|
+
readonly created: number;
|
|
866
|
+
readonly metadata?: {
|
|
867
|
+
readonly [x: string]: unknown;
|
|
868
|
+
} | undefined;
|
|
869
|
+
readonly type: "session.step.started";
|
|
870
|
+
readonly durable: {
|
|
871
|
+
readonly aggregateID: string;
|
|
872
|
+
readonly seq: Event.Seq;
|
|
873
|
+
readonly version: Event.Version;
|
|
874
|
+
};
|
|
875
|
+
readonly location?: Location.Ref | undefined;
|
|
876
|
+
readonly data: {
|
|
877
|
+
readonly sessionID: Session.ID;
|
|
878
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
879
|
+
readonly agent: Agent.ID;
|
|
880
|
+
readonly model: Model.Ref;
|
|
881
|
+
readonly snapshot?: (string & Brand.Brand<"Snapshot.ID">) | undefined;
|
|
882
|
+
};
|
|
883
|
+
} | {
|
|
884
|
+
readonly id: Event.ID;
|
|
885
|
+
readonly created: number;
|
|
886
|
+
readonly metadata?: {
|
|
887
|
+
readonly [x: string]: unknown;
|
|
888
|
+
} | undefined;
|
|
889
|
+
readonly type: "session.step.streamed";
|
|
890
|
+
readonly durable: {
|
|
891
|
+
readonly aggregateID: string;
|
|
892
|
+
readonly seq: Event.Seq;
|
|
893
|
+
readonly version: Event.Version;
|
|
894
|
+
};
|
|
895
|
+
readonly location?: Location.Ref | undefined;
|
|
896
|
+
readonly data: {
|
|
897
|
+
readonly sessionID: Session.ID;
|
|
898
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
899
|
+
};
|
|
900
|
+
} | {
|
|
901
|
+
readonly id: Event.ID;
|
|
902
|
+
readonly created: number;
|
|
903
|
+
readonly metadata?: {
|
|
904
|
+
readonly [x: string]: unknown;
|
|
905
|
+
} | undefined;
|
|
906
|
+
readonly type: "session.step.ended";
|
|
907
|
+
readonly durable: {
|
|
908
|
+
readonly aggregateID: string;
|
|
909
|
+
readonly seq: Event.Seq;
|
|
910
|
+
readonly version: Event.Version;
|
|
911
|
+
};
|
|
912
|
+
readonly location?: Location.Ref | undefined;
|
|
913
|
+
readonly data: {
|
|
914
|
+
readonly sessionID: Session.ID;
|
|
915
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
916
|
+
readonly finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
|
|
917
|
+
readonly rawFinish?: string | undefined;
|
|
918
|
+
readonly providerState?: SessionMessage.ProviderState | undefined;
|
|
919
|
+
readonly cost: number & Brand.Brand<"Money.USD">;
|
|
920
|
+
readonly tokens: {
|
|
921
|
+
readonly input: number;
|
|
922
|
+
readonly output: number;
|
|
923
|
+
readonly reasoning: number;
|
|
924
|
+
readonly cache: {
|
|
925
|
+
readonly read: number;
|
|
926
|
+
readonly write: number;
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
readonly snapshot?: (string & Brand.Brand<"Snapshot.ID">) | undefined;
|
|
930
|
+
readonly files?: ReadonlyArray<RelativePath> | undefined;
|
|
931
|
+
};
|
|
932
|
+
} | {
|
|
933
|
+
readonly id: Event.ID;
|
|
934
|
+
readonly created: number;
|
|
935
|
+
readonly metadata?: {
|
|
936
|
+
readonly [x: string]: unknown;
|
|
937
|
+
} | undefined;
|
|
938
|
+
readonly type: "session.step.failed";
|
|
939
|
+
readonly durable: {
|
|
940
|
+
readonly aggregateID: string;
|
|
941
|
+
readonly seq: Event.Seq;
|
|
942
|
+
readonly version: Event.Version;
|
|
943
|
+
};
|
|
944
|
+
readonly location?: Location.Ref | undefined;
|
|
945
|
+
readonly data: {
|
|
946
|
+
readonly sessionID: Session.ID;
|
|
947
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
948
|
+
readonly error: {
|
|
949
|
+
readonly type: string;
|
|
950
|
+
readonly message: string;
|
|
951
|
+
readonly status?: number | undefined;
|
|
952
|
+
};
|
|
953
|
+
readonly finish?: "content-filter" | undefined;
|
|
954
|
+
readonly rawFinish?: string | undefined;
|
|
955
|
+
readonly providerState?: SessionMessage.ProviderState | undefined;
|
|
956
|
+
readonly cost?: (number & Brand.Brand<"Money.USD">) | undefined;
|
|
957
|
+
readonly tokens?: {
|
|
958
|
+
readonly input: number;
|
|
959
|
+
readonly output: number;
|
|
960
|
+
readonly reasoning: number;
|
|
961
|
+
readonly cache: {
|
|
962
|
+
readonly read: number;
|
|
963
|
+
readonly write: number;
|
|
964
|
+
};
|
|
965
|
+
} | undefined;
|
|
966
|
+
readonly snapshot?: (string & Brand.Brand<"Snapshot.ID">) | undefined;
|
|
967
|
+
readonly files?: ReadonlyArray<RelativePath> | undefined;
|
|
968
|
+
};
|
|
969
|
+
} | {
|
|
970
|
+
readonly id: Event.ID;
|
|
971
|
+
readonly created: number;
|
|
972
|
+
readonly metadata?: {
|
|
973
|
+
readonly [x: string]: unknown;
|
|
974
|
+
} | undefined;
|
|
975
|
+
readonly type: "session.text.started";
|
|
976
|
+
readonly durable: {
|
|
977
|
+
readonly aggregateID: string;
|
|
978
|
+
readonly seq: Event.Seq;
|
|
979
|
+
readonly version: Event.Version;
|
|
980
|
+
};
|
|
981
|
+
readonly location?: Location.Ref | undefined;
|
|
982
|
+
readonly data: {
|
|
983
|
+
readonly sessionID: Session.ID;
|
|
984
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
985
|
+
readonly ordinal: number;
|
|
986
|
+
};
|
|
987
|
+
} | {
|
|
988
|
+
readonly id: Event.ID;
|
|
989
|
+
readonly created: number;
|
|
990
|
+
readonly metadata?: {
|
|
991
|
+
readonly [x: string]: unknown;
|
|
992
|
+
} | undefined;
|
|
993
|
+
readonly type: "session.text.ended";
|
|
994
|
+
readonly durable: {
|
|
995
|
+
readonly aggregateID: string;
|
|
996
|
+
readonly seq: Event.Seq;
|
|
997
|
+
readonly version: Event.Version;
|
|
998
|
+
};
|
|
999
|
+
readonly location?: Location.Ref | undefined;
|
|
1000
|
+
readonly data: {
|
|
1001
|
+
readonly sessionID: Session.ID;
|
|
1002
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
1003
|
+
readonly ordinal: number;
|
|
1004
|
+
readonly text: string;
|
|
1005
|
+
readonly state?: SessionMessage.ProviderState | undefined;
|
|
1006
|
+
};
|
|
1007
|
+
} | {
|
|
1008
|
+
readonly id: Event.ID;
|
|
1009
|
+
readonly created: number;
|
|
1010
|
+
readonly metadata?: {
|
|
1011
|
+
readonly [x: string]: unknown;
|
|
1012
|
+
} | undefined;
|
|
1013
|
+
readonly type: "session.reasoning.started";
|
|
1014
|
+
readonly durable: {
|
|
1015
|
+
readonly aggregateID: string;
|
|
1016
|
+
readonly seq: Event.Seq;
|
|
1017
|
+
readonly version: Event.Version;
|
|
1018
|
+
};
|
|
1019
|
+
readonly location?: Location.Ref | undefined;
|
|
1020
|
+
readonly data: {
|
|
1021
|
+
readonly sessionID: Session.ID;
|
|
1022
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
1023
|
+
readonly ordinal: number;
|
|
1024
|
+
readonly state?: SessionMessage.ProviderState | undefined;
|
|
1025
|
+
};
|
|
1026
|
+
} | {
|
|
1027
|
+
readonly id: Event.ID;
|
|
1028
|
+
readonly created: number;
|
|
1029
|
+
readonly metadata?: {
|
|
1030
|
+
readonly [x: string]: unknown;
|
|
1031
|
+
} | undefined;
|
|
1032
|
+
readonly type: "session.reasoning.ended";
|
|
1033
|
+
readonly durable: {
|
|
1034
|
+
readonly aggregateID: string;
|
|
1035
|
+
readonly seq: Event.Seq;
|
|
1036
|
+
readonly version: Event.Version;
|
|
1037
|
+
};
|
|
1038
|
+
readonly location?: Location.Ref | undefined;
|
|
1039
|
+
readonly data: {
|
|
1040
|
+
readonly sessionID: Session.ID;
|
|
1041
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
1042
|
+
readonly ordinal: number;
|
|
1043
|
+
readonly text: string;
|
|
1044
|
+
readonly state?: SessionMessage.ProviderState | undefined;
|
|
1045
|
+
};
|
|
1046
|
+
} | {
|
|
1047
|
+
readonly id: Event.ID;
|
|
1048
|
+
readonly created: number;
|
|
1049
|
+
readonly metadata?: {
|
|
1050
|
+
readonly [x: string]: unknown;
|
|
1051
|
+
} | undefined;
|
|
1052
|
+
readonly type: "session.tool.input.started";
|
|
1053
|
+
readonly durable: {
|
|
1054
|
+
readonly aggregateID: string;
|
|
1055
|
+
readonly seq: Event.Seq;
|
|
1056
|
+
readonly version: Event.Version;
|
|
1057
|
+
};
|
|
1058
|
+
readonly location?: Location.Ref | undefined;
|
|
1059
|
+
readonly data: {
|
|
1060
|
+
readonly sessionID: Session.ID;
|
|
1061
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
1062
|
+
readonly id: string;
|
|
1063
|
+
readonly name: string;
|
|
1064
|
+
};
|
|
1065
|
+
} | {
|
|
1066
|
+
readonly id: Event.ID;
|
|
1067
|
+
readonly created: number;
|
|
1068
|
+
readonly metadata?: {
|
|
1069
|
+
readonly [x: string]: unknown;
|
|
1070
|
+
} | undefined;
|
|
1071
|
+
readonly type: "session.tool.input.ended";
|
|
1072
|
+
readonly durable: {
|
|
1073
|
+
readonly aggregateID: string;
|
|
1074
|
+
readonly seq: Event.Seq;
|
|
1075
|
+
readonly version: Event.Version;
|
|
1076
|
+
};
|
|
1077
|
+
readonly location?: Location.Ref | undefined;
|
|
1078
|
+
readonly data: {
|
|
1079
|
+
readonly sessionID: Session.ID;
|
|
1080
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
1081
|
+
readonly id: string;
|
|
1082
|
+
readonly text: string;
|
|
1083
|
+
};
|
|
1084
|
+
} | {
|
|
1085
|
+
readonly id: Event.ID;
|
|
1086
|
+
readonly created: number;
|
|
1087
|
+
readonly metadata?: {
|
|
1088
|
+
readonly [x: string]: unknown;
|
|
1089
|
+
} | undefined;
|
|
1090
|
+
readonly type: "session.tool.called";
|
|
1091
|
+
readonly durable: {
|
|
1092
|
+
readonly aggregateID: string;
|
|
1093
|
+
readonly seq: Event.Seq;
|
|
1094
|
+
readonly version: Event.Version;
|
|
1095
|
+
};
|
|
1096
|
+
readonly location?: Location.Ref | undefined;
|
|
1097
|
+
readonly data: {
|
|
1098
|
+
readonly sessionID: Session.ID;
|
|
1099
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
1100
|
+
readonly id: string;
|
|
1101
|
+
readonly input: {
|
|
1102
|
+
readonly [x: string]: unknown;
|
|
1103
|
+
};
|
|
1104
|
+
readonly executed: boolean;
|
|
1105
|
+
readonly state?: SessionMessage.ProviderState | undefined;
|
|
1106
|
+
};
|
|
1107
|
+
} | {
|
|
1108
|
+
readonly id: Event.ID;
|
|
1109
|
+
readonly created: number;
|
|
1110
|
+
readonly metadata?: {
|
|
1111
|
+
readonly [x: string]: unknown;
|
|
1112
|
+
} | undefined;
|
|
1113
|
+
readonly type: "session.tool.success";
|
|
1114
|
+
readonly durable: {
|
|
1115
|
+
readonly aggregateID: string;
|
|
1116
|
+
readonly seq: Event.Seq;
|
|
1117
|
+
readonly version: Event.Version;
|
|
1118
|
+
};
|
|
1119
|
+
readonly location?: Location.Ref | undefined;
|
|
1120
|
+
readonly data: {
|
|
1121
|
+
readonly sessionID: Session.ID;
|
|
1122
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
1123
|
+
readonly id: string;
|
|
1124
|
+
readonly content: readonly [
|
|
1125
|
+
({
|
|
1126
|
+
readonly type: "text";
|
|
1127
|
+
readonly text: string;
|
|
1128
|
+
} | {
|
|
1129
|
+
readonly type: "file";
|
|
1130
|
+
readonly uri: string;
|
|
1131
|
+
readonly mime: string;
|
|
1132
|
+
readonly name?: string | undefined;
|
|
1133
|
+
}),
|
|
1134
|
+
...Array<{
|
|
1135
|
+
readonly type: "text";
|
|
1136
|
+
readonly text: string;
|
|
1137
|
+
} | {
|
|
1138
|
+
readonly type: "file";
|
|
1139
|
+
readonly uri: string;
|
|
1140
|
+
readonly mime: string;
|
|
1141
|
+
readonly name?: string | undefined;
|
|
1142
|
+
}>
|
|
1143
|
+
];
|
|
1144
|
+
readonly metadata?: {
|
|
1145
|
+
readonly [x: string]: Schema.Json;
|
|
1146
|
+
} | undefined;
|
|
1147
|
+
readonly executed: boolean;
|
|
1148
|
+
readonly resultState?: SessionMessage.ProviderState | undefined;
|
|
1149
|
+
};
|
|
1150
|
+
} | {
|
|
1151
|
+
readonly id: Event.ID;
|
|
1152
|
+
readonly created: number;
|
|
1153
|
+
readonly metadata?: {
|
|
1154
|
+
readonly [x: string]: unknown;
|
|
1155
|
+
} | undefined;
|
|
1156
|
+
readonly type: "session.tool.failed";
|
|
1157
|
+
readonly durable: {
|
|
1158
|
+
readonly aggregateID: string;
|
|
1159
|
+
readonly seq: Event.Seq;
|
|
1160
|
+
readonly version: Event.Version;
|
|
1161
|
+
};
|
|
1162
|
+
readonly location?: Location.Ref | undefined;
|
|
1163
|
+
readonly data: {
|
|
1164
|
+
readonly sessionID: Session.ID;
|
|
1165
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
1166
|
+
readonly id: string;
|
|
1167
|
+
readonly error: {
|
|
1168
|
+
readonly type: string;
|
|
1169
|
+
readonly message: string;
|
|
1170
|
+
readonly status?: number | undefined;
|
|
1171
|
+
};
|
|
1172
|
+
readonly content?: readonly [
|
|
1173
|
+
({
|
|
1174
|
+
readonly type: "text";
|
|
1175
|
+
readonly text: string;
|
|
1176
|
+
} | {
|
|
1177
|
+
readonly type: "file";
|
|
1178
|
+
readonly uri: string;
|
|
1179
|
+
readonly mime: string;
|
|
1180
|
+
readonly name?: string | undefined;
|
|
1181
|
+
}),
|
|
1182
|
+
...Array<{
|
|
1183
|
+
readonly type: "text";
|
|
1184
|
+
readonly text: string;
|
|
1185
|
+
} | {
|
|
1186
|
+
readonly type: "file";
|
|
1187
|
+
readonly uri: string;
|
|
1188
|
+
readonly mime: string;
|
|
1189
|
+
readonly name?: string | undefined;
|
|
1190
|
+
}>
|
|
1191
|
+
] | undefined;
|
|
1192
|
+
readonly metadata?: {
|
|
1193
|
+
readonly [x: string]: Schema.Json;
|
|
1194
|
+
} | undefined;
|
|
1195
|
+
readonly executed: boolean;
|
|
1196
|
+
readonly resultState?: SessionMessage.ProviderState | undefined;
|
|
1197
|
+
};
|
|
1198
|
+
} | {
|
|
1199
|
+
readonly id: Event.ID;
|
|
1200
|
+
readonly created: number;
|
|
1201
|
+
readonly metadata?: {
|
|
1202
|
+
readonly [x: string]: unknown;
|
|
1203
|
+
} | undefined;
|
|
1204
|
+
readonly type: "session.retry.scheduled";
|
|
1205
|
+
readonly durable: {
|
|
1206
|
+
readonly aggregateID: string;
|
|
1207
|
+
readonly seq: Event.Seq;
|
|
1208
|
+
readonly version: Event.Version;
|
|
1209
|
+
};
|
|
1210
|
+
readonly location?: Location.Ref | undefined;
|
|
1211
|
+
readonly data: {
|
|
1212
|
+
readonly sessionID: Session.ID;
|
|
1213
|
+
readonly assistantMessageID: SessionMessage.ID;
|
|
1214
|
+
readonly attempt: number;
|
|
1215
|
+
readonly at: number;
|
|
1216
|
+
readonly error: {
|
|
1217
|
+
readonly type: string;
|
|
1218
|
+
readonly message: string;
|
|
1219
|
+
readonly status?: number | undefined;
|
|
1220
|
+
};
|
|
1221
|
+
};
|
|
1222
|
+
} | {
|
|
1223
|
+
readonly id: Event.ID;
|
|
1224
|
+
readonly created: number;
|
|
1225
|
+
readonly metadata?: {
|
|
1226
|
+
readonly [x: string]: unknown;
|
|
1227
|
+
} | undefined;
|
|
1228
|
+
readonly type: "session.compaction.started";
|
|
1229
|
+
readonly durable: {
|
|
1230
|
+
readonly aggregateID: string;
|
|
1231
|
+
readonly seq: Event.Seq;
|
|
1232
|
+
readonly version: Event.Version;
|
|
1233
|
+
};
|
|
1234
|
+
readonly location?: Location.Ref | undefined;
|
|
1235
|
+
readonly data: {
|
|
1236
|
+
readonly sessionID: Session.ID;
|
|
1237
|
+
readonly reason: "auto" | "manual";
|
|
1238
|
+
readonly recent: string;
|
|
1239
|
+
readonly inputID?: SessionMessage.ID | undefined;
|
|
1240
|
+
};
|
|
1241
|
+
} | {
|
|
1242
|
+
readonly id: Event.ID;
|
|
1243
|
+
readonly created: number;
|
|
1244
|
+
readonly metadata?: {
|
|
1245
|
+
readonly [x: string]: unknown;
|
|
1246
|
+
} | undefined;
|
|
1247
|
+
readonly type: "session.compaction.ended";
|
|
1248
|
+
readonly durable: {
|
|
1249
|
+
readonly aggregateID: string;
|
|
1250
|
+
readonly seq: Event.Seq;
|
|
1251
|
+
readonly version: Event.Version;
|
|
1252
|
+
};
|
|
1253
|
+
readonly location?: Location.Ref | undefined;
|
|
1254
|
+
readonly data: {
|
|
1255
|
+
readonly sessionID: Session.ID;
|
|
1256
|
+
readonly reason: "auto" | "manual";
|
|
1257
|
+
readonly model?: Model.Ref | undefined;
|
|
1258
|
+
readonly providerState?: SessionMessage.ProviderState | undefined;
|
|
1259
|
+
readonly providerContext?: {
|
|
1260
|
+
readonly version: 1;
|
|
1261
|
+
readonly provenance: {
|
|
1262
|
+
readonly providerID: Provider.ID;
|
|
1263
|
+
readonly provider: string;
|
|
1264
|
+
readonly modelID: string;
|
|
1265
|
+
readonly route: string;
|
|
1266
|
+
readonly protocol: string;
|
|
1267
|
+
readonly endpoint: string;
|
|
1268
|
+
};
|
|
1269
|
+
readonly messages: Schema.Json;
|
|
1270
|
+
} | undefined;
|
|
1271
|
+
readonly text: string;
|
|
1272
|
+
readonly recent: string;
|
|
1273
|
+
readonly cost?: (number & Brand.Brand<"Money.USD">) | undefined;
|
|
1274
|
+
readonly tokens?: {
|
|
1275
|
+
readonly input: number;
|
|
1276
|
+
readonly output: number;
|
|
1277
|
+
readonly reasoning: number;
|
|
1278
|
+
readonly cache: {
|
|
1279
|
+
readonly read: number;
|
|
1280
|
+
readonly write: number;
|
|
1281
|
+
};
|
|
1282
|
+
} | undefined;
|
|
1283
|
+
};
|
|
1284
|
+
} | {
|
|
1285
|
+
readonly id: Event.ID;
|
|
1286
|
+
readonly created: number;
|
|
1287
|
+
readonly metadata?: {
|
|
1288
|
+
readonly [x: string]: unknown;
|
|
1289
|
+
} | undefined;
|
|
1290
|
+
readonly type: "session.compaction.failed";
|
|
1291
|
+
readonly durable: {
|
|
1292
|
+
readonly aggregateID: string;
|
|
1293
|
+
readonly seq: Event.Seq;
|
|
1294
|
+
readonly version: Event.Version;
|
|
1295
|
+
};
|
|
1296
|
+
readonly location?: Location.Ref | undefined;
|
|
1297
|
+
readonly data: {
|
|
1298
|
+
readonly sessionID: Session.ID;
|
|
1299
|
+
readonly reason: "auto" | "manual";
|
|
1300
|
+
readonly error: {
|
|
1301
|
+
readonly type: string;
|
|
1302
|
+
readonly message: string;
|
|
1303
|
+
readonly status?: number | undefined;
|
|
1304
|
+
};
|
|
1305
|
+
readonly inputID?: SessionMessage.ID | undefined;
|
|
1306
|
+
readonly cost?: (number & Brand.Brand<"Money.USD">) | undefined;
|
|
1307
|
+
readonly tokens?: {
|
|
1308
|
+
readonly input: number;
|
|
1309
|
+
readonly output: number;
|
|
1310
|
+
readonly reasoning: number;
|
|
1311
|
+
readonly cache: {
|
|
1312
|
+
readonly read: number;
|
|
1313
|
+
readonly write: number;
|
|
1314
|
+
};
|
|
1315
|
+
} | undefined;
|
|
1316
|
+
};
|
|
1317
|
+
} | {
|
|
1318
|
+
readonly id: Event.ID;
|
|
1319
|
+
readonly created: number;
|
|
1320
|
+
readonly metadata?: {
|
|
1321
|
+
readonly [x: string]: unknown;
|
|
1322
|
+
} | undefined;
|
|
1323
|
+
readonly type: "session.revert.staged";
|
|
1324
|
+
readonly durable: {
|
|
1325
|
+
readonly aggregateID: string;
|
|
1326
|
+
readonly seq: Event.Seq;
|
|
1327
|
+
readonly version: Event.Version;
|
|
1328
|
+
};
|
|
1329
|
+
readonly location?: Location.Ref | undefined;
|
|
1330
|
+
readonly data: {
|
|
1331
|
+
readonly sessionID: Session.ID;
|
|
1332
|
+
readonly revert: Session.Revert;
|
|
1333
|
+
};
|
|
1334
|
+
} | {
|
|
1335
|
+
readonly id: Event.ID;
|
|
1336
|
+
readonly created: number;
|
|
1337
|
+
readonly metadata?: {
|
|
1338
|
+
readonly [x: string]: unknown;
|
|
1339
|
+
} | undefined;
|
|
1340
|
+
readonly type: "session.revert.cleared";
|
|
1341
|
+
readonly durable: {
|
|
1342
|
+
readonly aggregateID: string;
|
|
1343
|
+
readonly seq: Event.Seq;
|
|
1344
|
+
readonly version: Event.Version;
|
|
1345
|
+
};
|
|
1346
|
+
readonly location?: Location.Ref | undefined;
|
|
1347
|
+
readonly data: {
|
|
1348
|
+
readonly sessionID: Session.ID;
|
|
1349
|
+
};
|
|
1350
|
+
} | {
|
|
1351
|
+
readonly id: Event.ID;
|
|
1352
|
+
readonly created: number;
|
|
1353
|
+
readonly metadata?: {
|
|
1354
|
+
readonly [x: string]: unknown;
|
|
1355
|
+
} | undefined;
|
|
1356
|
+
readonly type: "session.revert.committed";
|
|
1357
|
+
readonly durable: {
|
|
1358
|
+
readonly aggregateID: string;
|
|
1359
|
+
readonly seq: Event.Seq;
|
|
1360
|
+
readonly version: Event.Version;
|
|
1361
|
+
};
|
|
1362
|
+
readonly location?: Location.Ref | undefined;
|
|
1363
|
+
readonly data: {
|
|
1364
|
+
readonly sessionID: Session.ID;
|
|
1365
|
+
readonly to: SessionMessage.ID;
|
|
1366
|
+
};
|
|
1367
|
+
} | {
|
|
1368
|
+
readonly id: Event.ID;
|
|
1369
|
+
readonly created: number;
|
|
1370
|
+
readonly metadata?: {
|
|
1371
|
+
readonly [x: string]: unknown;
|
|
1372
|
+
} | undefined;
|
|
1373
|
+
readonly type: "session.usage.recorded";
|
|
1374
|
+
readonly durable: {
|
|
1375
|
+
readonly aggregateID: string;
|
|
1376
|
+
readonly seq: Event.Seq;
|
|
1377
|
+
readonly version: Event.Version;
|
|
1378
|
+
};
|
|
1379
|
+
readonly location?: Location.Ref | undefined;
|
|
1380
|
+
readonly data: {
|
|
1381
|
+
readonly sessionID: Session.ID;
|
|
1382
|
+
readonly source: "title" | "compaction";
|
|
1383
|
+
readonly cost: number & Brand.Brand<"Money.USD">;
|
|
1384
|
+
readonly tokens: {
|
|
1385
|
+
readonly input: number;
|
|
1386
|
+
readonly output: number;
|
|
1387
|
+
readonly reasoning: number;
|
|
1388
|
+
readonly cache: {
|
|
1389
|
+
readonly read: number;
|
|
1390
|
+
readonly write: number;
|
|
1391
|
+
};
|
|
1392
|
+
};
|
|
1393
|
+
};
|
|
1394
|
+
} | {
|
|
1395
|
+
readonly id: Event.ID;
|
|
1396
|
+
readonly created: number;
|
|
1397
|
+
readonly metadata?: {
|
|
1398
|
+
readonly [x: string]: unknown;
|
|
1399
|
+
} | undefined;
|
|
1400
|
+
readonly type: "session.message.content.updated";
|
|
1401
|
+
readonly durable: {
|
|
1402
|
+
readonly aggregateID: string;
|
|
1403
|
+
readonly seq: Event.Seq;
|
|
1404
|
+
readonly version: Event.Version;
|
|
1405
|
+
};
|
|
1406
|
+
readonly location?: Location.Ref | undefined;
|
|
1407
|
+
readonly data: {
|
|
1408
|
+
readonly sessionID: Session.ID;
|
|
1409
|
+
readonly messageID: SessionMessage.ID;
|
|
1410
|
+
readonly content: ReadonlyArray<SessionMessage.AssistantContentEncoded>;
|
|
1411
|
+
};
|
|
1412
|
+
}) | EventLog.Synced;
|
|
1413
|
+
export type SessionLogOperation<E = never> = (input: SessionLogInput) => Stream.Stream<SessionLogOutput, E>;
|
|
1414
|
+
export type SessionInterruptInput = {
|
|
1415
|
+
readonly sessionID: Session.ID;
|
|
1416
|
+
readonly continue?: boolean | undefined;
|
|
1417
|
+
};
|
|
1418
|
+
export type SessionInterruptOutput = {
|
|
1419
|
+
readonly interrupted: boolean;
|
|
1420
|
+
};
|
|
1421
|
+
export type SessionInterruptOperation<E = never> = (input: SessionInterruptInput) => Effect.Effect<SessionInterruptOutput, E>;
|
|
1422
|
+
export type SessionBackgroundInput = {
|
|
1423
|
+
readonly sessionID: Session.ID;
|
|
1424
|
+
};
|
|
1425
|
+
export type SessionBackgroundOutput = void;
|
|
1426
|
+
export type SessionBackgroundOperation<E = never> = (input: SessionBackgroundInput) => Effect.Effect<SessionBackgroundOutput, E>;
|
|
1427
|
+
export type SessionMessageInput = {
|
|
1428
|
+
readonly sessionID: Session.ID;
|
|
1429
|
+
readonly messageID: SessionMessage.ID;
|
|
1430
|
+
};
|
|
1431
|
+
export type SessionMessageOutput = SessionMessage.Info;
|
|
1432
|
+
export type SessionMessageOperation<E = never> = (input: SessionMessageInput) => Effect.Effect<SessionMessageOutput, E>;
|
|
1433
|
+
export type SessionEnvironmentInput = {
|
|
1434
|
+
readonly sessionID: Session.ID;
|
|
1435
|
+
readonly variables: {
|
|
1436
|
+
readonly [x: string]: string;
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
export type SessionEnvironmentOutput = void;
|
|
1440
|
+
export type SessionEnvironmentOperation<E = never> = (input: SessionEnvironmentInput) => Effect.Effect<SessionEnvironmentOutput, E>;
|
|
1441
|
+
export type SessionViewInput = {
|
|
1442
|
+
readonly sessionID: Session.ID;
|
|
1443
|
+
readonly idle: number;
|
|
1444
|
+
};
|
|
1445
|
+
export type SessionViewOutput = void;
|
|
1446
|
+
export type SessionViewOperation<E = never> = (input: SessionViewInput) => Effect.Effect<SessionViewOutput, E>;
|
|
1447
|
+
export interface SessionApi<E = never> {
|
|
1448
|
+
readonly list: SessionListOperation<E>;
|
|
1449
|
+
readonly stats: SessionStatsOperation<E>;
|
|
1450
|
+
readonly create: SessionCreateOperation<E>;
|
|
1451
|
+
readonly import: SessionImportOperation<E>;
|
|
1452
|
+
readonly export: SessionExportOperation<E>;
|
|
1453
|
+
readonly active: SessionActiveOperation<E>;
|
|
1454
|
+
readonly get: SessionGetOperation<E>;
|
|
1455
|
+
readonly remove: SessionRemoveOperation<E>;
|
|
1456
|
+
readonly fork: SessionForkOperation<E>;
|
|
1457
|
+
readonly switchAgent: SessionSwitchAgentOperation<E>;
|
|
1458
|
+
readonly switchModel: SessionSwitchModelOperation<E>;
|
|
1459
|
+
readonly rename: SessionRenameOperation<E>;
|
|
1460
|
+
readonly move: SessionMoveOperation<E>;
|
|
1461
|
+
readonly prompt: SessionPromptOperation<E>;
|
|
1462
|
+
readonly command: SessionCommandOperation<E>;
|
|
1463
|
+
readonly skill: SessionSkillOperation<E>;
|
|
1464
|
+
readonly synthetic: SessionSyntheticOperation<E>;
|
|
1465
|
+
readonly shell: SessionShellOperation<E>;
|
|
1466
|
+
readonly compact: SessionCompactOperation<E>;
|
|
1467
|
+
readonly wait: SessionWaitOperation<E>;
|
|
1468
|
+
readonly revert: {
|
|
1469
|
+
readonly stage: SessionRevertStageOperation<E>;
|
|
1470
|
+
readonly clear: SessionRevertClearOperation<E>;
|
|
1471
|
+
readonly commit: SessionRevertCommitOperation<E>;
|
|
1472
|
+
};
|
|
1473
|
+
readonly context: SessionContextOperation<E>;
|
|
1474
|
+
readonly inbox: {
|
|
1475
|
+
readonly list: SessionInboxListOperation<E>;
|
|
1476
|
+
readonly cancel: SessionInboxCancelOperation<E>;
|
|
1477
|
+
readonly steer: SessionInboxSteerOperation<E>;
|
|
1478
|
+
readonly queue: SessionInboxQueueOperation<E>;
|
|
1479
|
+
};
|
|
1480
|
+
readonly instructions: {
|
|
1481
|
+
readonly entry: {
|
|
1482
|
+
readonly list: SessionInstructionsEntryListOperation<E>;
|
|
1483
|
+
readonly put: SessionInstructionsEntryPutOperation<E>;
|
|
1484
|
+
readonly remove: SessionInstructionsEntryRemoveOperation<E>;
|
|
1485
|
+
};
|
|
1486
|
+
};
|
|
1487
|
+
readonly generate: SessionGenerateOperation<E>;
|
|
1488
|
+
readonly log: SessionLogOperation<E>;
|
|
1489
|
+
readonly interrupt: SessionInterruptOperation<E>;
|
|
1490
|
+
readonly background: SessionBackgroundOperation<E>;
|
|
1491
|
+
readonly message: SessionMessageOperation<E>;
|
|
1492
|
+
readonly environment: SessionEnvironmentOperation<E>;
|
|
1493
|
+
readonly view: SessionViewOperation<E>;
|
|
1494
|
+
}
|
|
1495
|
+
export type MessageListInput = {
|
|
1496
|
+
readonly sessionID: Session.ID;
|
|
1497
|
+
readonly limit?: number | undefined;
|
|
1498
|
+
readonly order?: "asc" | "desc" | undefined;
|
|
1499
|
+
readonly cursor?: string | undefined;
|
|
1500
|
+
readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
|
|
1501
|
+
};
|
|
1502
|
+
export type MessageListOutput = {
|
|
1503
|
+
readonly data: ReadonlyArray<SessionMessage.Info>;
|
|
1504
|
+
readonly cursor: {
|
|
1505
|
+
readonly previous?: string | undefined;
|
|
1506
|
+
readonly next?: string | undefined;
|
|
1507
|
+
};
|
|
1508
|
+
};
|
|
1509
|
+
export type MessageListOperation<E = never> = (input: MessageListInput) => Effect.Effect<MessageListOutput, E>;
|
|
1510
|
+
export interface MessageApi<E = never> {
|
|
1511
|
+
readonly list: MessageListOperation<E>;
|
|
1512
|
+
}
|
|
1513
|
+
export type ModelListInput = {
|
|
1514
|
+
readonly location?: {
|
|
1515
|
+
readonly directory?: string | undefined;
|
|
1516
|
+
readonly workspace?: string | undefined;
|
|
1517
|
+
} | undefined;
|
|
1518
|
+
};
|
|
1519
|
+
export type ModelListOutput = {
|
|
1520
|
+
readonly location: Location.Info;
|
|
1521
|
+
readonly data: ReadonlyArray<Model.Info>;
|
|
1522
|
+
};
|
|
1523
|
+
export type ModelListOperation<E = never> = (input?: ModelListInput) => Effect.Effect<ModelListOutput, E>;
|
|
1524
|
+
export type ModelDefaultInput = {
|
|
1525
|
+
readonly location?: {
|
|
1526
|
+
readonly directory?: string | undefined;
|
|
1527
|
+
readonly workspace?: string | undefined;
|
|
1528
|
+
} | undefined;
|
|
1529
|
+
};
|
|
1530
|
+
export type ModelDefaultOutput = {
|
|
1531
|
+
readonly location: Location.Info;
|
|
1532
|
+
readonly data: Model.Info | undefined;
|
|
1533
|
+
};
|
|
1534
|
+
export type ModelDefaultOperation<E = never> = (input?: ModelDefaultInput) => Effect.Effect<ModelDefaultOutput, E>;
|
|
1535
|
+
export interface ModelApi<E = never> {
|
|
1536
|
+
readonly list: ModelListOperation<E>;
|
|
1537
|
+
readonly default: ModelDefaultOperation<E>;
|
|
1538
|
+
}
|
|
1539
|
+
export type GenerateTextInput = {
|
|
1540
|
+
readonly prompt: string;
|
|
1541
|
+
readonly model?: Model.Ref | undefined;
|
|
1542
|
+
};
|
|
1543
|
+
export type GenerateTextOutput = {
|
|
1544
|
+
readonly text: string;
|
|
1545
|
+
};
|
|
1546
|
+
export type GenerateTextOperation<E = never> = (input: GenerateTextInput) => Effect.Effect<GenerateTextOutput, E>;
|
|
1547
|
+
export interface GenerateApi<E = never> {
|
|
1548
|
+
readonly text: GenerateTextOperation<E>;
|
|
1549
|
+
}
|
|
1550
|
+
export type ProviderListInput = {
|
|
1551
|
+
readonly location?: {
|
|
1552
|
+
readonly directory?: string | undefined;
|
|
1553
|
+
readonly workspace?: string | undefined;
|
|
1554
|
+
} | undefined;
|
|
1555
|
+
};
|
|
1556
|
+
export type ProviderListOutput = {
|
|
1557
|
+
readonly location: Location.Info;
|
|
1558
|
+
readonly data: ReadonlyArray<Provider.Info>;
|
|
1559
|
+
};
|
|
1560
|
+
export type ProviderListOperation<E = never> = (input?: ProviderListInput) => Effect.Effect<ProviderListOutput, E>;
|
|
1561
|
+
export type ProviderGetInput = {
|
|
1562
|
+
readonly providerID: Provider.ID;
|
|
1563
|
+
readonly location?: {
|
|
1564
|
+
readonly directory?: string | undefined;
|
|
1565
|
+
readonly workspace?: string | undefined;
|
|
1566
|
+
} | undefined;
|
|
1567
|
+
};
|
|
1568
|
+
export type ProviderGetOutput = {
|
|
1569
|
+
readonly location: Location.Info;
|
|
1570
|
+
readonly data: Provider.Info;
|
|
1571
|
+
};
|
|
1572
|
+
export type ProviderGetOperation<E = never> = (input: ProviderGetInput) => Effect.Effect<ProviderGetOutput, E>;
|
|
1573
|
+
export interface ProviderApi<E = never> {
|
|
1574
|
+
readonly list: ProviderListOperation<E>;
|
|
1575
|
+
readonly get: ProviderGetOperation<E>;
|
|
1576
|
+
}
|
|
1577
|
+
export type IntegrationListInput = {
|
|
1578
|
+
readonly location?: {
|
|
1579
|
+
readonly directory?: string | undefined;
|
|
1580
|
+
readonly workspace?: string | undefined;
|
|
1581
|
+
} | undefined;
|
|
1582
|
+
};
|
|
1583
|
+
export type IntegrationListOutput = {
|
|
1584
|
+
readonly location: Location.Info;
|
|
1585
|
+
readonly data: ReadonlyArray<Integration.Info>;
|
|
1586
|
+
};
|
|
1587
|
+
export type IntegrationListOperation<E = never> = (input?: IntegrationListInput) => Effect.Effect<IntegrationListOutput, E>;
|
|
1588
|
+
export type IntegrationGetInput = {
|
|
1589
|
+
readonly integrationID: Integration.ID;
|
|
1590
|
+
readonly location?: {
|
|
1591
|
+
readonly directory?: string | undefined;
|
|
1592
|
+
readonly workspace?: string | undefined;
|
|
1593
|
+
} | undefined;
|
|
1594
|
+
};
|
|
1595
|
+
export type IntegrationGetOutput = {
|
|
1596
|
+
readonly location: Location.Info;
|
|
1597
|
+
readonly data: Integration.Info | undefined;
|
|
1598
|
+
};
|
|
1599
|
+
export type IntegrationGetOperation<E = never> = (input: IntegrationGetInput) => Effect.Effect<IntegrationGetOutput, E>;
|
|
1600
|
+
export type IntegrationWellknownAddInput = {
|
|
1601
|
+
readonly location?: {
|
|
1602
|
+
readonly directory?: string | undefined;
|
|
1603
|
+
readonly workspace?: string | undefined;
|
|
1604
|
+
} | undefined;
|
|
1605
|
+
readonly url: string;
|
|
1606
|
+
};
|
|
1607
|
+
export type IntegrationWellknownAddOutput = void;
|
|
1608
|
+
export type IntegrationWellknownAddOperation<E = never> = (input: IntegrationWellknownAddInput) => Effect.Effect<IntegrationWellknownAddOutput, E>;
|
|
1609
|
+
export type IntegrationConnectKeyInput = {
|
|
1610
|
+
readonly integrationID: Integration.ID;
|
|
1611
|
+
readonly location?: {
|
|
1612
|
+
readonly directory?: string | undefined;
|
|
1613
|
+
readonly workspace?: string | undefined;
|
|
1614
|
+
} | undefined;
|
|
1615
|
+
readonly key: string;
|
|
1616
|
+
readonly answer?: Form.Answer | undefined;
|
|
1617
|
+
readonly label?: string | undefined;
|
|
1618
|
+
};
|
|
1619
|
+
export type IntegrationConnectKeyOutput = void;
|
|
1620
|
+
export type IntegrationConnectKeyOperation<E = never> = (input: IntegrationConnectKeyInput) => Effect.Effect<IntegrationConnectKeyOutput, E>;
|
|
1621
|
+
export type IntegrationOauthConnectInput = {
|
|
1622
|
+
readonly integrationID: Integration.ID;
|
|
1623
|
+
readonly location?: {
|
|
1624
|
+
readonly directory?: string | undefined;
|
|
1625
|
+
readonly workspace?: string | undefined;
|
|
1626
|
+
} | undefined;
|
|
1627
|
+
readonly methodID: Integration.MethodID;
|
|
1628
|
+
readonly answer?: Form.Answer | undefined;
|
|
1629
|
+
readonly label?: string | undefined;
|
|
1630
|
+
};
|
|
1631
|
+
export type IntegrationOauthConnectOutput = {
|
|
1632
|
+
readonly location: Location.Info;
|
|
1633
|
+
readonly data: Integration.Attempt;
|
|
1634
|
+
};
|
|
1635
|
+
export type IntegrationOauthConnectOperation<E = never> = (input: IntegrationOauthConnectInput) => Effect.Effect<IntegrationOauthConnectOutput, E>;
|
|
1636
|
+
export type IntegrationOauthStatusInput = {
|
|
1637
|
+
readonly integrationID: Integration.ID;
|
|
1638
|
+
readonly attemptID: Integration.AttemptID;
|
|
1639
|
+
readonly location?: {
|
|
1640
|
+
readonly directory?: string | undefined;
|
|
1641
|
+
readonly workspace?: string | undefined;
|
|
1642
|
+
} | undefined;
|
|
1643
|
+
};
|
|
1644
|
+
export type IntegrationOauthStatusOutput = {
|
|
1645
|
+
readonly location: Location.Info;
|
|
1646
|
+
readonly data: Integration.AttemptStatus;
|
|
1647
|
+
};
|
|
1648
|
+
export type IntegrationOauthStatusOperation<E = never> = (input: IntegrationOauthStatusInput) => Effect.Effect<IntegrationOauthStatusOutput, E>;
|
|
1649
|
+
export type IntegrationOauthCompleteInput = {
|
|
1650
|
+
readonly integrationID: Integration.ID;
|
|
1651
|
+
readonly attemptID: Integration.AttemptID;
|
|
1652
|
+
readonly location?: {
|
|
1653
|
+
readonly directory?: string | undefined;
|
|
1654
|
+
readonly workspace?: string | undefined;
|
|
1655
|
+
} | undefined;
|
|
1656
|
+
readonly code?: string | undefined;
|
|
1657
|
+
};
|
|
1658
|
+
export type IntegrationOauthCompleteOutput = void;
|
|
1659
|
+
export type IntegrationOauthCompleteOperation<E = never> = (input: IntegrationOauthCompleteInput) => Effect.Effect<IntegrationOauthCompleteOutput, E>;
|
|
1660
|
+
export type IntegrationOauthCancelInput = {
|
|
1661
|
+
readonly integrationID: Integration.ID;
|
|
1662
|
+
readonly attemptID: Integration.AttemptID;
|
|
1663
|
+
readonly location?: {
|
|
1664
|
+
readonly directory?: string | undefined;
|
|
1665
|
+
readonly workspace?: string | undefined;
|
|
1666
|
+
} | undefined;
|
|
1667
|
+
};
|
|
1668
|
+
export type IntegrationOauthCancelOutput = void;
|
|
1669
|
+
export type IntegrationOauthCancelOperation<E = never> = (input: IntegrationOauthCancelInput) => Effect.Effect<IntegrationOauthCancelOutput, E>;
|
|
1670
|
+
export type IntegrationCommandConnectInput = {
|
|
1671
|
+
readonly integrationID: Integration.ID;
|
|
1672
|
+
readonly location?: {
|
|
1673
|
+
readonly directory?: string | undefined;
|
|
1674
|
+
readonly workspace?: string | undefined;
|
|
1675
|
+
} | undefined;
|
|
1676
|
+
readonly methodID: Integration.MethodID;
|
|
1677
|
+
readonly label?: string | undefined;
|
|
1678
|
+
};
|
|
1679
|
+
export type IntegrationCommandConnectOutput = {
|
|
1680
|
+
readonly location: Location.Info;
|
|
1681
|
+
readonly data: Integration.CommandAttempt;
|
|
1682
|
+
};
|
|
1683
|
+
export type IntegrationCommandConnectOperation<E = never> = (input: IntegrationCommandConnectInput) => Effect.Effect<IntegrationCommandConnectOutput, E>;
|
|
1684
|
+
export type IntegrationCommandStatusInput = {
|
|
1685
|
+
readonly integrationID: Integration.ID;
|
|
1686
|
+
readonly attemptID: Integration.AttemptID;
|
|
1687
|
+
readonly location?: {
|
|
1688
|
+
readonly directory?: string | undefined;
|
|
1689
|
+
readonly workspace?: string | undefined;
|
|
1690
|
+
} | undefined;
|
|
1691
|
+
};
|
|
1692
|
+
export type IntegrationCommandStatusOutput = {
|
|
1693
|
+
readonly location: Location.Info;
|
|
1694
|
+
readonly data: Integration.CommandAttemptStatus;
|
|
1695
|
+
};
|
|
1696
|
+
export type IntegrationCommandStatusOperation<E = never> = (input: IntegrationCommandStatusInput) => Effect.Effect<IntegrationCommandStatusOutput, E>;
|
|
1697
|
+
export type IntegrationCommandCancelInput = {
|
|
1698
|
+
readonly integrationID: Integration.ID;
|
|
1699
|
+
readonly attemptID: Integration.AttemptID;
|
|
1700
|
+
readonly location?: {
|
|
1701
|
+
readonly directory?: string | undefined;
|
|
1702
|
+
readonly workspace?: string | undefined;
|
|
1703
|
+
} | undefined;
|
|
1704
|
+
};
|
|
1705
|
+
export type IntegrationCommandCancelOutput = void;
|
|
1706
|
+
export type IntegrationCommandCancelOperation<E = never> = (input: IntegrationCommandCancelInput) => Effect.Effect<IntegrationCommandCancelOutput, E>;
|
|
1707
|
+
export interface IntegrationApi<E = never> {
|
|
1708
|
+
readonly list: IntegrationListOperation<E>;
|
|
1709
|
+
readonly get: IntegrationGetOperation<E>;
|
|
1710
|
+
readonly wellknown: {
|
|
1711
|
+
readonly add: IntegrationWellknownAddOperation<E>;
|
|
1712
|
+
};
|
|
1713
|
+
readonly connect: {
|
|
1714
|
+
readonly key: IntegrationConnectKeyOperation<E>;
|
|
1715
|
+
};
|
|
1716
|
+
readonly oauth: {
|
|
1717
|
+
readonly connect: IntegrationOauthConnectOperation<E>;
|
|
1718
|
+
readonly status: IntegrationOauthStatusOperation<E>;
|
|
1719
|
+
readonly complete: IntegrationOauthCompleteOperation<E>;
|
|
1720
|
+
readonly cancel: IntegrationOauthCancelOperation<E>;
|
|
1721
|
+
};
|
|
1722
|
+
readonly command: {
|
|
1723
|
+
readonly connect: IntegrationCommandConnectOperation<E>;
|
|
1724
|
+
readonly status: IntegrationCommandStatusOperation<E>;
|
|
1725
|
+
readonly cancel: IntegrationCommandCancelOperation<E>;
|
|
1726
|
+
};
|
|
1727
|
+
}
|
|
1728
|
+
export type McpListInput = {
|
|
1729
|
+
readonly location?: {
|
|
1730
|
+
readonly directory?: string | undefined;
|
|
1731
|
+
readonly workspace?: string | undefined;
|
|
1732
|
+
} | undefined;
|
|
1733
|
+
};
|
|
1734
|
+
export type McpListOutput = {
|
|
1735
|
+
readonly location: Location.Info;
|
|
1736
|
+
readonly data: ReadonlyArray<Mcp.Server>;
|
|
1737
|
+
};
|
|
1738
|
+
export type McpListOperation<E = never> = (input?: McpListInput) => Effect.Effect<McpListOutput, E>;
|
|
1739
|
+
export type McpAddInput = {
|
|
1740
|
+
readonly server: string;
|
|
1741
|
+
readonly location?: {
|
|
1742
|
+
readonly directory?: string | undefined;
|
|
1743
|
+
readonly workspace?: string | undefined;
|
|
1744
|
+
} | undefined;
|
|
1745
|
+
readonly config: Mcp.LocalConfig | Mcp.RemoteConfig;
|
|
1746
|
+
};
|
|
1747
|
+
export type McpAddOutput = void;
|
|
1748
|
+
export type McpAddOperation<E = never> = (input: McpAddInput) => Effect.Effect<McpAddOutput, E>;
|
|
1749
|
+
export type McpRemoveInput = {
|
|
1750
|
+
readonly server: string;
|
|
1751
|
+
readonly location?: {
|
|
1752
|
+
readonly directory?: string | undefined;
|
|
1753
|
+
readonly workspace?: string | undefined;
|
|
1754
|
+
} | undefined;
|
|
1755
|
+
};
|
|
1756
|
+
export type McpRemoveOutput = void;
|
|
1757
|
+
export type McpRemoveOperation<E = never> = (input: McpRemoveInput) => Effect.Effect<McpRemoveOutput, E>;
|
|
1758
|
+
export type McpConnectInput = {
|
|
1759
|
+
readonly server: string;
|
|
1760
|
+
readonly location?: {
|
|
1761
|
+
readonly directory?: string | undefined;
|
|
1762
|
+
readonly workspace?: string | undefined;
|
|
1763
|
+
} | undefined;
|
|
1764
|
+
};
|
|
1765
|
+
export type McpConnectOutput = void;
|
|
1766
|
+
export type McpConnectOperation<E = never> = (input: McpConnectInput) => Effect.Effect<McpConnectOutput, E>;
|
|
1767
|
+
export type McpDisconnectInput = {
|
|
1768
|
+
readonly server: string;
|
|
1769
|
+
readonly location?: {
|
|
1770
|
+
readonly directory?: string | undefined;
|
|
1771
|
+
readonly workspace?: string | undefined;
|
|
1772
|
+
} | undefined;
|
|
1773
|
+
};
|
|
1774
|
+
export type McpDisconnectOutput = void;
|
|
1775
|
+
export type McpDisconnectOperation<E = never> = (input: McpDisconnectInput) => Effect.Effect<McpDisconnectOutput, E>;
|
|
1776
|
+
export type McpResourceCatalogInput = {
|
|
1777
|
+
readonly location?: {
|
|
1778
|
+
readonly directory?: string | undefined;
|
|
1779
|
+
readonly workspace?: string | undefined;
|
|
1780
|
+
} | undefined;
|
|
1781
|
+
};
|
|
1782
|
+
export type McpResourceCatalogOutput = {
|
|
1783
|
+
readonly location: Location.Info;
|
|
1784
|
+
readonly data: Mcp.ResourceCatalog;
|
|
1785
|
+
};
|
|
1786
|
+
export type McpResourceCatalogOperation<E = never> = (input?: McpResourceCatalogInput) => Effect.Effect<McpResourceCatalogOutput, E>;
|
|
1787
|
+
export interface McpApi<E = never> {
|
|
1788
|
+
readonly list: McpListOperation<E>;
|
|
1789
|
+
readonly add: McpAddOperation<E>;
|
|
1790
|
+
readonly remove: McpRemoveOperation<E>;
|
|
1791
|
+
readonly connect: McpConnectOperation<E>;
|
|
1792
|
+
readonly disconnect: McpDisconnectOperation<E>;
|
|
1793
|
+
readonly resource: {
|
|
1794
|
+
readonly catalog: McpResourceCatalogOperation<E>;
|
|
1795
|
+
};
|
|
1796
|
+
}
|
|
1797
|
+
export type CredentialUpdateInput = {
|
|
1798
|
+
readonly credentialID: Credential.ID;
|
|
1799
|
+
readonly location?: {
|
|
1800
|
+
readonly directory?: string | undefined;
|
|
1801
|
+
readonly workspace?: string | undefined;
|
|
1802
|
+
} | undefined;
|
|
1803
|
+
readonly label: string;
|
|
1804
|
+
};
|
|
1805
|
+
export type CredentialUpdateOutput = void;
|
|
1806
|
+
export type CredentialUpdateOperation<E = never> = (input: CredentialUpdateInput) => Effect.Effect<CredentialUpdateOutput, E>;
|
|
1807
|
+
export type CredentialActivateInput = {
|
|
1808
|
+
readonly credentialID: Credential.ID;
|
|
1809
|
+
readonly location?: {
|
|
1810
|
+
readonly directory?: string | undefined;
|
|
1811
|
+
readonly workspace?: string | undefined;
|
|
1812
|
+
} | undefined;
|
|
1813
|
+
};
|
|
1814
|
+
export type CredentialActivateOutput = void;
|
|
1815
|
+
export type CredentialActivateOperation<E = never> = (input: CredentialActivateInput) => Effect.Effect<CredentialActivateOutput, E>;
|
|
1816
|
+
export type CredentialRemoveInput = {
|
|
1817
|
+
readonly credentialID: Credential.ID;
|
|
1818
|
+
readonly location?: {
|
|
1819
|
+
readonly directory?: string | undefined;
|
|
1820
|
+
readonly workspace?: string | undefined;
|
|
1821
|
+
} | undefined;
|
|
1822
|
+
};
|
|
1823
|
+
export type CredentialRemoveOutput = void;
|
|
1824
|
+
export type CredentialRemoveOperation<E = never> = (input: CredentialRemoveInput) => Effect.Effect<CredentialRemoveOutput, E>;
|
|
1825
|
+
export interface CredentialApi<E = never> {
|
|
1826
|
+
readonly update: CredentialUpdateOperation<E>;
|
|
1827
|
+
readonly activate: CredentialActivateOperation<E>;
|
|
1828
|
+
readonly remove: CredentialRemoveOperation<E>;
|
|
1829
|
+
}
|
|
1830
|
+
export type ProjectListOutput = ReadonlyArray<Project.Info>;
|
|
1831
|
+
export type ProjectListOperation<E = never> = () => Effect.Effect<ProjectListOutput, E>;
|
|
1832
|
+
export type ProjectUpdateInput = {
|
|
1833
|
+
readonly projectID: Project.ID;
|
|
1834
|
+
readonly canonical?: AbsolutePath | undefined;
|
|
1835
|
+
readonly name?: string | undefined;
|
|
1836
|
+
readonly icon?: Project.Icon | undefined;
|
|
1837
|
+
readonly commands?: Project.Commands | undefined;
|
|
1838
|
+
};
|
|
1839
|
+
export type ProjectUpdateOutput = Project.Info;
|
|
1840
|
+
export type ProjectUpdateOperation<E = never> = (input: ProjectUpdateInput) => Effect.Effect<ProjectUpdateOutput, E>;
|
|
1841
|
+
export type ProjectCurrentInput = {
|
|
1842
|
+
readonly location?: {
|
|
1843
|
+
readonly directory?: string | undefined;
|
|
1844
|
+
readonly workspace?: string | undefined;
|
|
1845
|
+
} | undefined;
|
|
1846
|
+
};
|
|
1847
|
+
export type ProjectCurrentOutput = Project.Current;
|
|
1848
|
+
export type ProjectCurrentOperation<E = never> = (input?: ProjectCurrentInput) => Effect.Effect<ProjectCurrentOutput, E>;
|
|
1849
|
+
export interface ProjectApi<E = never> {
|
|
1850
|
+
readonly list: ProjectListOperation<E>;
|
|
1851
|
+
readonly update: ProjectUpdateOperation<E>;
|
|
1852
|
+
readonly current: ProjectCurrentOperation<E>;
|
|
1853
|
+
}
|
|
1854
|
+
export type FormRequestListInput = {
|
|
1855
|
+
readonly location?: {
|
|
1856
|
+
readonly directory?: string | undefined;
|
|
1857
|
+
readonly workspace?: string | undefined;
|
|
1858
|
+
} | undefined;
|
|
1859
|
+
};
|
|
1860
|
+
export type FormRequestListOutput = {
|
|
1861
|
+
readonly location: Location.Info;
|
|
1862
|
+
readonly data: ReadonlyArray<Form.Info>;
|
|
1863
|
+
};
|
|
1864
|
+
export type FormRequestListOperation<E = never> = (input?: FormRequestListInput) => Effect.Effect<FormRequestListOutput, E>;
|
|
1865
|
+
export type FormListInput = {
|
|
1866
|
+
readonly sessionID: string;
|
|
1867
|
+
};
|
|
1868
|
+
export type FormListOutput = ReadonlyArray<Form.Info>;
|
|
1869
|
+
export type FormListOperation<E = never> = (input: FormListInput) => Effect.Effect<FormListOutput, E>;
|
|
1870
|
+
export type FormCreateInput = {
|
|
1871
|
+
readonly sessionID: string;
|
|
1872
|
+
readonly id?: Form.ID | undefined;
|
|
1873
|
+
readonly title: string;
|
|
1874
|
+
readonly metadata?: Form.Metadata | undefined;
|
|
1875
|
+
readonly fields: Form.Fields;
|
|
1876
|
+
};
|
|
1877
|
+
export type FormCreateOutput = Form.Info;
|
|
1878
|
+
export type FormCreateOperation<E = never> = (input: FormCreateInput) => Effect.Effect<FormCreateOutput, E>;
|
|
1879
|
+
export type FormGetInput = {
|
|
1880
|
+
readonly sessionID: string;
|
|
1881
|
+
readonly formID: Form.ID;
|
|
1882
|
+
};
|
|
1883
|
+
export type FormGetOutput = Form.Info;
|
|
1884
|
+
export type FormGetOperation<E = never> = (input: FormGetInput) => Effect.Effect<FormGetOutput, E>;
|
|
1885
|
+
export type FormStateInput = {
|
|
1886
|
+
readonly sessionID: string;
|
|
1887
|
+
readonly formID: Form.ID;
|
|
1888
|
+
};
|
|
1889
|
+
export type FormStateOutput = Form.State;
|
|
1890
|
+
export type FormStateOperation<E = never> = (input: FormStateInput) => Effect.Effect<FormStateOutput, E>;
|
|
1891
|
+
export type FormReplyInput = {
|
|
1892
|
+
readonly sessionID: string;
|
|
1893
|
+
readonly formID: Form.ID;
|
|
1894
|
+
readonly answer: Form.Answer;
|
|
1895
|
+
};
|
|
1896
|
+
export type FormReplyOutput = void;
|
|
1897
|
+
export type FormReplyOperation<E = never> = (input: FormReplyInput) => Effect.Effect<FormReplyOutput, E>;
|
|
1898
|
+
export type FormCancelInput = {
|
|
1899
|
+
readonly sessionID: string;
|
|
1900
|
+
readonly formID: Form.ID;
|
|
1901
|
+
};
|
|
1902
|
+
export type FormCancelOutput = void;
|
|
1903
|
+
export type FormCancelOperation<E = never> = (input: FormCancelInput) => Effect.Effect<FormCancelOutput, E>;
|
|
1904
|
+
export interface FormApi<E = never> {
|
|
1905
|
+
readonly request: {
|
|
1906
|
+
readonly list: FormRequestListOperation<E>;
|
|
1907
|
+
};
|
|
1908
|
+
readonly list: FormListOperation<E>;
|
|
1909
|
+
readonly create: FormCreateOperation<E>;
|
|
1910
|
+
readonly get: FormGetOperation<E>;
|
|
1911
|
+
readonly state: FormStateOperation<E>;
|
|
1912
|
+
readonly reply: FormReplyOperation<E>;
|
|
1913
|
+
readonly cancel: FormCancelOperation<E>;
|
|
1914
|
+
}
|
|
1915
|
+
export type PermissionRequestListInput = {
|
|
1916
|
+
readonly location?: {
|
|
1917
|
+
readonly directory?: string | undefined;
|
|
1918
|
+
readonly workspace?: string | undefined;
|
|
1919
|
+
} | undefined;
|
|
1920
|
+
};
|
|
1921
|
+
export type PermissionRequestListOutput = {
|
|
1922
|
+
readonly location: Location.Info;
|
|
1923
|
+
readonly data: ReadonlyArray<Permission.Request>;
|
|
1924
|
+
};
|
|
1925
|
+
export type PermissionRequestListOperation<E = never> = (input?: PermissionRequestListInput) => Effect.Effect<PermissionRequestListOutput, E>;
|
|
1926
|
+
export type PermissionSavedListInput = {
|
|
1927
|
+
readonly projectID?: Project.ID | undefined;
|
|
1928
|
+
};
|
|
1929
|
+
export type PermissionSavedListOutput = ReadonlyArray<PermissionSaved.Info>;
|
|
1930
|
+
export type PermissionSavedListOperation<E = never> = (input?: PermissionSavedListInput) => Effect.Effect<PermissionSavedListOutput, E>;
|
|
1931
|
+
export type PermissionSavedRemoveInput = {
|
|
1932
|
+
readonly id: PermissionSaved.ID;
|
|
1933
|
+
};
|
|
1934
|
+
export type PermissionSavedRemoveOutput = void;
|
|
1935
|
+
export type PermissionSavedRemoveOperation<E = never> = (input: PermissionSavedRemoveInput) => Effect.Effect<PermissionSavedRemoveOutput, E>;
|
|
1936
|
+
export type PermissionCreateInput = {
|
|
1937
|
+
readonly sessionID: Session.ID;
|
|
1938
|
+
readonly id?: Permission.ID | undefined;
|
|
1939
|
+
readonly action: string;
|
|
1940
|
+
readonly resources: ReadonlyArray<string>;
|
|
1941
|
+
readonly save?: ReadonlyArray<string> | undefined;
|
|
1942
|
+
readonly metadata?: {
|
|
1943
|
+
readonly [x: string]: unknown;
|
|
1944
|
+
} | undefined;
|
|
1945
|
+
readonly source?: Permission.Source | undefined;
|
|
1946
|
+
readonly agent?: Agent.ID | undefined;
|
|
1947
|
+
};
|
|
1948
|
+
export type PermissionCreateOutput = {
|
|
1949
|
+
readonly id: Permission.ID;
|
|
1950
|
+
readonly effect: Permission.Effect;
|
|
1951
|
+
};
|
|
1952
|
+
export type PermissionCreateOperation<E = never> = (input: PermissionCreateInput) => Effect.Effect<PermissionCreateOutput, E>;
|
|
1953
|
+
export type PermissionListInput = {
|
|
1954
|
+
readonly sessionID: Session.ID;
|
|
1955
|
+
};
|
|
1956
|
+
export type PermissionListOutput = ReadonlyArray<Permission.Request>;
|
|
1957
|
+
export type PermissionListOperation<E = never> = (input: PermissionListInput) => Effect.Effect<PermissionListOutput, E>;
|
|
1958
|
+
export type PermissionGetInput = {
|
|
1959
|
+
readonly sessionID: Session.ID;
|
|
1960
|
+
readonly requestID: Permission.ID;
|
|
1961
|
+
};
|
|
1962
|
+
export type PermissionGetOutput = Permission.Request;
|
|
1963
|
+
export type PermissionGetOperation<E = never> = (input: PermissionGetInput) => Effect.Effect<PermissionGetOutput, E>;
|
|
1964
|
+
export type PermissionReplyInput = {
|
|
1965
|
+
readonly sessionID: Session.ID;
|
|
1966
|
+
readonly requestID: Permission.ID;
|
|
1967
|
+
readonly reply: Permission.Reply;
|
|
1968
|
+
readonly message?: string | undefined;
|
|
1969
|
+
};
|
|
1970
|
+
export type PermissionReplyOutput = void;
|
|
1971
|
+
export type PermissionReplyOperation<E = never> = (input: PermissionReplyInput) => Effect.Effect<PermissionReplyOutput, E>;
|
|
1972
|
+
export type PermissionRulesInput = {
|
|
1973
|
+
readonly sessionID: Session.ID;
|
|
1974
|
+
readonly permissions: Permission.Ruleset;
|
|
1975
|
+
};
|
|
1976
|
+
export type PermissionRulesOutput = void;
|
|
1977
|
+
export type PermissionRulesOperation<E = never> = (input: PermissionRulesInput) => Effect.Effect<PermissionRulesOutput, E>;
|
|
1978
|
+
export interface PermissionApi<E = never> {
|
|
1979
|
+
readonly request: {
|
|
1980
|
+
readonly list: PermissionRequestListOperation<E>;
|
|
1981
|
+
};
|
|
1982
|
+
readonly saved: {
|
|
1983
|
+
readonly list: PermissionSavedListOperation<E>;
|
|
1984
|
+
readonly remove: PermissionSavedRemoveOperation<E>;
|
|
1985
|
+
};
|
|
1986
|
+
readonly create: PermissionCreateOperation<E>;
|
|
1987
|
+
readonly list: PermissionListOperation<E>;
|
|
1988
|
+
readonly get: PermissionGetOperation<E>;
|
|
1989
|
+
readonly reply: PermissionReplyOperation<E>;
|
|
1990
|
+
readonly rules: PermissionRulesOperation<E>;
|
|
1991
|
+
}
|
|
1992
|
+
export type FileListInput = {
|
|
1993
|
+
readonly location?: {
|
|
1994
|
+
readonly directory?: string | undefined;
|
|
1995
|
+
readonly workspace?: string | undefined;
|
|
1996
|
+
} | undefined;
|
|
1997
|
+
readonly path?: string | undefined;
|
|
1998
|
+
};
|
|
1999
|
+
export type FileListOutput = {
|
|
2000
|
+
readonly location: Location.Info;
|
|
2001
|
+
readonly data: ReadonlyArray<FileSystem.Entry>;
|
|
2002
|
+
};
|
|
2003
|
+
export type FileListOperation<E = never> = (input?: FileListInput) => Effect.Effect<FileListOutput, E>;
|
|
2004
|
+
export type FileFindInput = {
|
|
2005
|
+
readonly location?: {
|
|
2006
|
+
readonly directory?: string | undefined;
|
|
2007
|
+
readonly workspace?: string | undefined;
|
|
2008
|
+
} | undefined;
|
|
2009
|
+
readonly query: string;
|
|
2010
|
+
readonly type?: "file" | "directory" | undefined;
|
|
2011
|
+
readonly limit?: number | undefined;
|
|
2012
|
+
};
|
|
2013
|
+
export type FileFindOutput = {
|
|
2014
|
+
readonly location: Location.Info;
|
|
2015
|
+
readonly data: ReadonlyArray<FileSystem.Entry>;
|
|
2016
|
+
};
|
|
2017
|
+
export type FileFindOperation<E = never> = (input: FileFindInput) => Effect.Effect<FileFindOutput, E>;
|
|
2018
|
+
export interface FileApi<E = never> {
|
|
2019
|
+
readonly list: FileListOperation<E>;
|
|
2020
|
+
readonly find: FileFindOperation<E>;
|
|
2021
|
+
}
|
|
2022
|
+
export type CommandListInput = {
|
|
2023
|
+
readonly location?: {
|
|
2024
|
+
readonly directory?: string | undefined;
|
|
2025
|
+
readonly workspace?: string | undefined;
|
|
2026
|
+
} | undefined;
|
|
2027
|
+
};
|
|
2028
|
+
export type CommandListOutput = {
|
|
2029
|
+
readonly location: Location.Info;
|
|
2030
|
+
readonly data: ReadonlyArray<Command.Info>;
|
|
2031
|
+
};
|
|
2032
|
+
export type CommandListOperation<E = never> = (input?: CommandListInput) => Effect.Effect<CommandListOutput, E>;
|
|
2033
|
+
export interface CommandApi<E = never> {
|
|
2034
|
+
readonly list: CommandListOperation<E>;
|
|
2035
|
+
}
|
|
2036
|
+
export type SkillListInput = {
|
|
2037
|
+
readonly location?: {
|
|
2038
|
+
readonly directory?: string | undefined;
|
|
2039
|
+
readonly workspace?: string | undefined;
|
|
2040
|
+
} | undefined;
|
|
2041
|
+
};
|
|
2042
|
+
export type SkillListOutput = {
|
|
2043
|
+
readonly location: Location.Info;
|
|
2044
|
+
readonly data: ReadonlyArray<Skill.Info>;
|
|
2045
|
+
};
|
|
2046
|
+
export type SkillListOperation<E = never> = (input?: SkillListInput) => Effect.Effect<SkillListOutput, E>;
|
|
2047
|
+
export interface SkillApi<E = never> {
|
|
2048
|
+
readonly list: SkillListOperation<E>;
|
|
2049
|
+
}
|
|
2050
|
+
export type RpcCallInput = {
|
|
2051
|
+
readonly rpcID: string;
|
|
2052
|
+
readonly method: string;
|
|
2053
|
+
readonly location?: {
|
|
2054
|
+
readonly directory?: string | undefined;
|
|
2055
|
+
readonly workspace?: string | undefined;
|
|
2056
|
+
} | undefined;
|
|
2057
|
+
readonly input?: unknown | undefined;
|
|
2058
|
+
};
|
|
2059
|
+
export type RpcCallOutput = {
|
|
2060
|
+
readonly output?: unknown;
|
|
2061
|
+
};
|
|
2062
|
+
export type RpcCallOperation<E = never> = (input: RpcCallInput) => Effect.Effect<RpcCallOutput, E>;
|
|
2063
|
+
export interface RpcApi<E = never> {
|
|
2064
|
+
readonly call: RpcCallOperation<E>;
|
|
2065
|
+
}
|
|
2066
|
+
export type EventSubscribeOutput = OpenCodeEvent;
|
|
2067
|
+
export type EventSubscribeOperation<E = never> = () => Stream.Stream<EventSubscribeOutput, E>;
|
|
2068
|
+
export interface EventApi<E = never> {
|
|
2069
|
+
readonly subscribe: EventSubscribeOperation<E>;
|
|
2070
|
+
}
|
|
2071
|
+
export type PtyListInput = {
|
|
2072
|
+
readonly location?: {
|
|
2073
|
+
readonly directory?: string | undefined;
|
|
2074
|
+
readonly workspace?: string | undefined;
|
|
2075
|
+
} | undefined;
|
|
2076
|
+
};
|
|
2077
|
+
export type PtyListOutput = {
|
|
2078
|
+
readonly location: Location.Info;
|
|
2079
|
+
readonly data: ReadonlyArray<Pty.Info>;
|
|
2080
|
+
};
|
|
2081
|
+
export type PtyListOperation<E = never> = (input?: PtyListInput) => Effect.Effect<PtyListOutput, E>;
|
|
2082
|
+
export type PtyCreateInput = {
|
|
2083
|
+
readonly location?: {
|
|
2084
|
+
readonly directory?: string | undefined;
|
|
2085
|
+
readonly workspace?: string | undefined;
|
|
2086
|
+
} | undefined;
|
|
2087
|
+
readonly command?: string | undefined;
|
|
2088
|
+
readonly args?: ReadonlyArray<string> | undefined;
|
|
2089
|
+
readonly cwd?: string | undefined;
|
|
2090
|
+
readonly title?: string | undefined;
|
|
2091
|
+
readonly env?: {
|
|
2092
|
+
readonly [x: string]: string;
|
|
2093
|
+
} | undefined;
|
|
2094
|
+
};
|
|
2095
|
+
export type PtyCreateOutput = {
|
|
2096
|
+
readonly location: Location.Info;
|
|
2097
|
+
readonly data: Pty.Info;
|
|
2098
|
+
};
|
|
2099
|
+
export type PtyCreateOperation<E = never> = (input?: PtyCreateInput) => Effect.Effect<PtyCreateOutput, E>;
|
|
2100
|
+
export type PtyGetInput = {
|
|
2101
|
+
readonly ptyID: Pty.ID;
|
|
2102
|
+
readonly location?: {
|
|
2103
|
+
readonly directory?: string | undefined;
|
|
2104
|
+
readonly workspace?: string | undefined;
|
|
2105
|
+
} | undefined;
|
|
2106
|
+
};
|
|
2107
|
+
export type PtyGetOutput = {
|
|
2108
|
+
readonly location: Location.Info;
|
|
2109
|
+
readonly data: Pty.Info;
|
|
2110
|
+
};
|
|
2111
|
+
export type PtyGetOperation<E = never> = (input: PtyGetInput) => Effect.Effect<PtyGetOutput, E>;
|
|
2112
|
+
export type PtyUpdateInput = {
|
|
2113
|
+
readonly ptyID: Pty.ID;
|
|
2114
|
+
readonly location?: {
|
|
2115
|
+
readonly directory?: string | undefined;
|
|
2116
|
+
readonly workspace?: string | undefined;
|
|
2117
|
+
} | undefined;
|
|
2118
|
+
readonly title?: string | undefined;
|
|
2119
|
+
readonly size?: {
|
|
2120
|
+
readonly rows: number;
|
|
2121
|
+
readonly cols: number;
|
|
2122
|
+
} | undefined;
|
|
2123
|
+
};
|
|
2124
|
+
export type PtyUpdateOutput = {
|
|
2125
|
+
readonly location: Location.Info;
|
|
2126
|
+
readonly data: Pty.Info;
|
|
2127
|
+
};
|
|
2128
|
+
export type PtyUpdateOperation<E = never> = (input: PtyUpdateInput) => Effect.Effect<PtyUpdateOutput, E>;
|
|
2129
|
+
export type PtyRemoveInput = {
|
|
2130
|
+
readonly ptyID: Pty.ID;
|
|
2131
|
+
readonly location?: {
|
|
2132
|
+
readonly directory?: string | undefined;
|
|
2133
|
+
readonly workspace?: string | undefined;
|
|
2134
|
+
} | undefined;
|
|
2135
|
+
};
|
|
2136
|
+
export type PtyRemoveOutput = void;
|
|
2137
|
+
export type PtyRemoveOperation<E = never> = (input: PtyRemoveInput) => Effect.Effect<PtyRemoveOutput, E>;
|
|
2138
|
+
export type PtyConnectTokenInput = {
|
|
2139
|
+
readonly ptyID: Pty.ID;
|
|
2140
|
+
readonly location?: {
|
|
2141
|
+
readonly directory?: string | undefined;
|
|
2142
|
+
readonly workspace?: string | undefined;
|
|
2143
|
+
} | undefined;
|
|
2144
|
+
readonly "x-opencode-ticket"?: string | undefined;
|
|
2145
|
+
};
|
|
2146
|
+
export type PtyConnectTokenOutput = {
|
|
2147
|
+
readonly location: Location.Info;
|
|
2148
|
+
readonly data: PtyTicket.ConnectToken;
|
|
2149
|
+
};
|
|
2150
|
+
export type PtyConnectTokenOperation<E = never> = (input: PtyConnectTokenInput) => Effect.Effect<PtyConnectTokenOutput, E>;
|
|
2151
|
+
export interface PtyApi<E = never> {
|
|
2152
|
+
readonly list: PtyListOperation<E>;
|
|
2153
|
+
readonly create: PtyCreateOperation<E>;
|
|
2154
|
+
readonly get: PtyGetOperation<E>;
|
|
2155
|
+
readonly update: PtyUpdateOperation<E>;
|
|
2156
|
+
readonly remove: PtyRemoveOperation<E>;
|
|
2157
|
+
readonly connect: {
|
|
2158
|
+
readonly token: PtyConnectTokenOperation<E>;
|
|
2159
|
+
};
|
|
2160
|
+
}
|
|
2161
|
+
export type ExperimentalPersistentPtyReadInput = {
|
|
2162
|
+
readonly sessionID: Session.ID;
|
|
2163
|
+
readonly lines?: number | undefined;
|
|
2164
|
+
};
|
|
2165
|
+
export type ExperimentalPersistentPtyReadOutput = {
|
|
2166
|
+
readonly ptyID: Pty.ID;
|
|
2167
|
+
readonly title: string;
|
|
2168
|
+
readonly cwd: string;
|
|
2169
|
+
readonly foregroundProcess: string | null;
|
|
2170
|
+
readonly screen: {
|
|
2171
|
+
readonly text: string;
|
|
2172
|
+
readonly cols: number;
|
|
2173
|
+
readonly rows: number;
|
|
2174
|
+
readonly cursor: {
|
|
2175
|
+
readonly x: number;
|
|
2176
|
+
readonly y: number;
|
|
2177
|
+
};
|
|
2178
|
+
};
|
|
2179
|
+
} | null;
|
|
2180
|
+
export type ExperimentalPersistentPtyReadOperation<E = never> = (input: ExperimentalPersistentPtyReadInput) => Effect.Effect<ExperimentalPersistentPtyReadOutput, E>;
|
|
2181
|
+
export type ExperimentalPersistentPtyListInput = {
|
|
2182
|
+
readonly sessionID: Session.ID;
|
|
2183
|
+
};
|
|
2184
|
+
export type ExperimentalPersistentPtyListOutput = ReadonlyArray<{
|
|
2185
|
+
readonly id: Pty.ID;
|
|
2186
|
+
readonly title: string;
|
|
2187
|
+
readonly command: string;
|
|
2188
|
+
readonly args: ReadonlyArray<string>;
|
|
2189
|
+
readonly cwd: string;
|
|
2190
|
+
readonly status: "running" | "exited";
|
|
2191
|
+
readonly pid: number;
|
|
2192
|
+
readonly exitCode?: number | undefined;
|
|
2193
|
+
readonly sessionID: Session.ID;
|
|
2194
|
+
readonly foregroundProcess: string | null;
|
|
2195
|
+
readonly size: {
|
|
2196
|
+
readonly cols: number;
|
|
2197
|
+
readonly rows: number;
|
|
2198
|
+
};
|
|
2199
|
+
readonly output: {
|
|
2200
|
+
readonly head: number;
|
|
2201
|
+
readonly tail: number;
|
|
2202
|
+
};
|
|
2203
|
+
}>;
|
|
2204
|
+
export type ExperimentalPersistentPtyListOperation<E = never> = (input: ExperimentalPersistentPtyListInput) => Effect.Effect<ExperimentalPersistentPtyListOutput, E>;
|
|
2205
|
+
export type ExperimentalPersistentPtyCreateInput = {
|
|
2206
|
+
readonly sessionID: Session.ID;
|
|
2207
|
+
readonly command?: string | undefined;
|
|
2208
|
+
readonly args: ReadonlyArray<string>;
|
|
2209
|
+
readonly cwd?: string | undefined;
|
|
2210
|
+
readonly title: string;
|
|
2211
|
+
readonly env: {
|
|
2212
|
+
readonly [x: string]: string;
|
|
2213
|
+
};
|
|
2214
|
+
readonly size?: {
|
|
2215
|
+
readonly cols: number;
|
|
2216
|
+
readonly rows: number;
|
|
2217
|
+
} | undefined;
|
|
2218
|
+
};
|
|
2219
|
+
export type ExperimentalPersistentPtyCreateOutput = {
|
|
2220
|
+
readonly id: Pty.ID;
|
|
2221
|
+
readonly title: string;
|
|
2222
|
+
readonly command: string;
|
|
2223
|
+
readonly args: ReadonlyArray<string>;
|
|
2224
|
+
readonly cwd: string;
|
|
2225
|
+
readonly status: "running" | "exited";
|
|
2226
|
+
readonly pid: number;
|
|
2227
|
+
readonly exitCode?: number | undefined;
|
|
2228
|
+
readonly sessionID: Session.ID;
|
|
2229
|
+
readonly foregroundProcess: string | null;
|
|
2230
|
+
readonly size: {
|
|
2231
|
+
readonly cols: number;
|
|
2232
|
+
readonly rows: number;
|
|
2233
|
+
};
|
|
2234
|
+
readonly output: {
|
|
2235
|
+
readonly head: number;
|
|
2236
|
+
readonly tail: number;
|
|
2237
|
+
};
|
|
2238
|
+
};
|
|
2239
|
+
export type ExperimentalPersistentPtyCreateOperation<E = never> = (input: ExperimentalPersistentPtyCreateInput) => Effect.Effect<ExperimentalPersistentPtyCreateOutput, E>;
|
|
2240
|
+
export type ExperimentalPersistentPtyShutdownOutput = void;
|
|
2241
|
+
export type ExperimentalPersistentPtyShutdownOperation<E = never> = () => Effect.Effect<ExperimentalPersistentPtyShutdownOutput, E>;
|
|
2242
|
+
export type ExperimentalPersistentPtyHandoffOutput = {
|
|
2243
|
+
readonly handoff: {
|
|
2244
|
+
readonly directory: string;
|
|
2245
|
+
readonly instanceID: string;
|
|
2246
|
+
readonly ticket: string;
|
|
2247
|
+
readonly expiresAt: number;
|
|
2248
|
+
} | null;
|
|
2249
|
+
};
|
|
2250
|
+
export type ExperimentalPersistentPtyHandoffOperation<E = never> = () => Effect.Effect<ExperimentalPersistentPtyHandoffOutput, E>;
|
|
2251
|
+
export type ExperimentalPersistentPtyGetInput = {
|
|
2252
|
+
readonly ptyID: Pty.ID;
|
|
2253
|
+
};
|
|
2254
|
+
export type ExperimentalPersistentPtyGetOutput = {
|
|
2255
|
+
readonly id: Pty.ID;
|
|
2256
|
+
readonly title: string;
|
|
2257
|
+
readonly command: string;
|
|
2258
|
+
readonly args: ReadonlyArray<string>;
|
|
2259
|
+
readonly cwd: string;
|
|
2260
|
+
readonly status: "running" | "exited";
|
|
2261
|
+
readonly pid: number;
|
|
2262
|
+
readonly exitCode?: number | undefined;
|
|
2263
|
+
readonly sessionID: Session.ID;
|
|
2264
|
+
readonly foregroundProcess: string | null;
|
|
2265
|
+
readonly size: {
|
|
2266
|
+
readonly cols: number;
|
|
2267
|
+
readonly rows: number;
|
|
2268
|
+
};
|
|
2269
|
+
readonly output: {
|
|
2270
|
+
readonly head: number;
|
|
2271
|
+
readonly tail: number;
|
|
2272
|
+
};
|
|
2273
|
+
};
|
|
2274
|
+
export type ExperimentalPersistentPtyGetOperation<E = never> = (input: ExperimentalPersistentPtyGetInput) => Effect.Effect<ExperimentalPersistentPtyGetOutput, E>;
|
|
2275
|
+
export type ExperimentalPersistentPtyUpdateInput = {
|
|
2276
|
+
readonly ptyID: Pty.ID;
|
|
2277
|
+
readonly attachmentID?: string | undefined;
|
|
2278
|
+
readonly size: {
|
|
2279
|
+
readonly cols: number;
|
|
2280
|
+
readonly rows: number;
|
|
2281
|
+
};
|
|
2282
|
+
};
|
|
2283
|
+
export type ExperimentalPersistentPtyUpdateOutput = {
|
|
2284
|
+
readonly id: Pty.ID;
|
|
2285
|
+
readonly title: string;
|
|
2286
|
+
readonly command: string;
|
|
2287
|
+
readonly args: ReadonlyArray<string>;
|
|
2288
|
+
readonly cwd: string;
|
|
2289
|
+
readonly status: "running" | "exited";
|
|
2290
|
+
readonly pid: number;
|
|
2291
|
+
readonly exitCode?: number | undefined;
|
|
2292
|
+
readonly sessionID: Session.ID;
|
|
2293
|
+
readonly foregroundProcess: string | null;
|
|
2294
|
+
readonly size: {
|
|
2295
|
+
readonly cols: number;
|
|
2296
|
+
readonly rows: number;
|
|
2297
|
+
};
|
|
2298
|
+
readonly output: {
|
|
2299
|
+
readonly head: number;
|
|
2300
|
+
readonly tail: number;
|
|
2301
|
+
};
|
|
2302
|
+
};
|
|
2303
|
+
export type ExperimentalPersistentPtyUpdateOperation<E = never> = (input: ExperimentalPersistentPtyUpdateInput) => Effect.Effect<ExperimentalPersistentPtyUpdateOutput, E>;
|
|
2304
|
+
export type ExperimentalPersistentPtySnapshotInput = {
|
|
2305
|
+
readonly ptyID: Pty.ID;
|
|
2306
|
+
};
|
|
2307
|
+
export type ExperimentalPersistentPtySnapshotOutput = {
|
|
2308
|
+
readonly info: {
|
|
2309
|
+
readonly id: Pty.ID;
|
|
2310
|
+
readonly title: string;
|
|
2311
|
+
readonly command: string;
|
|
2312
|
+
readonly args: ReadonlyArray<string>;
|
|
2313
|
+
readonly cwd: string;
|
|
2314
|
+
readonly status: "running" | "exited";
|
|
2315
|
+
readonly pid: number;
|
|
2316
|
+
readonly exitCode?: number | undefined;
|
|
2317
|
+
readonly sessionID: Session.ID;
|
|
2318
|
+
readonly foregroundProcess: string | null;
|
|
2319
|
+
readonly size: {
|
|
2320
|
+
readonly cols: number;
|
|
2321
|
+
readonly rows: number;
|
|
2322
|
+
};
|
|
2323
|
+
readonly output: {
|
|
2324
|
+
readonly head: number;
|
|
2325
|
+
readonly tail: number;
|
|
2326
|
+
};
|
|
2327
|
+
};
|
|
2328
|
+
readonly text: string;
|
|
2329
|
+
readonly checkpoint: globalThis.Uint8Array;
|
|
2330
|
+
readonly cursor: {
|
|
2331
|
+
readonly x: number;
|
|
2332
|
+
readonly y: number;
|
|
2333
|
+
};
|
|
2334
|
+
};
|
|
2335
|
+
export type ExperimentalPersistentPtySnapshotOperation<E = never> = (input: ExperimentalPersistentPtySnapshotInput) => Effect.Effect<ExperimentalPersistentPtySnapshotOutput, E>;
|
|
2336
|
+
export type ExperimentalPersistentPtyRemoveInput = {
|
|
2337
|
+
readonly ptyID: Pty.ID;
|
|
2338
|
+
};
|
|
2339
|
+
export type ExperimentalPersistentPtyRemoveOutput = void;
|
|
2340
|
+
export type ExperimentalPersistentPtyRemoveOperation<E = never> = (input: ExperimentalPersistentPtyRemoveInput) => Effect.Effect<ExperimentalPersistentPtyRemoveOutput, E>;
|
|
2341
|
+
export type ExperimentalPersistentPtyConnectTokenInput = {
|
|
2342
|
+
readonly ptyID: Pty.ID;
|
|
2343
|
+
readonly "x-opencode-ticket"?: string | undefined;
|
|
2344
|
+
};
|
|
2345
|
+
export type ExperimentalPersistentPtyConnectTokenOutput = PtyTicket.ConnectToken;
|
|
2346
|
+
export type ExperimentalPersistentPtyConnectTokenOperation<E = never> = (input: ExperimentalPersistentPtyConnectTokenInput) => Effect.Effect<ExperimentalPersistentPtyConnectTokenOutput, E>;
|
|
2347
|
+
export interface ExperimentalApi<E = never> {
|
|
2348
|
+
readonly persistentPty: {
|
|
2349
|
+
readonly read: ExperimentalPersistentPtyReadOperation<E>;
|
|
2350
|
+
readonly list: ExperimentalPersistentPtyListOperation<E>;
|
|
2351
|
+
readonly create: ExperimentalPersistentPtyCreateOperation<E>;
|
|
2352
|
+
readonly shutdown: ExperimentalPersistentPtyShutdownOperation<E>;
|
|
2353
|
+
readonly handoff: ExperimentalPersistentPtyHandoffOperation<E>;
|
|
2354
|
+
readonly get: ExperimentalPersistentPtyGetOperation<E>;
|
|
2355
|
+
readonly update: ExperimentalPersistentPtyUpdateOperation<E>;
|
|
2356
|
+
readonly snapshot: ExperimentalPersistentPtySnapshotOperation<E>;
|
|
2357
|
+
readonly remove: ExperimentalPersistentPtyRemoveOperation<E>;
|
|
2358
|
+
readonly connectToken: ExperimentalPersistentPtyConnectTokenOperation<E>;
|
|
2359
|
+
};
|
|
2360
|
+
}
|
|
2361
|
+
export type ShellListInput = {
|
|
2362
|
+
readonly location?: {
|
|
2363
|
+
readonly directory?: string | undefined;
|
|
2364
|
+
readonly workspace?: string | undefined;
|
|
2365
|
+
} | undefined;
|
|
2366
|
+
};
|
|
2367
|
+
export type ShellListOutput = {
|
|
2368
|
+
readonly location: Location.Info;
|
|
2369
|
+
readonly data: ReadonlyArray<Shell.Info>;
|
|
2370
|
+
};
|
|
2371
|
+
export type ShellListOperation<E = never> = (input?: ShellListInput) => Effect.Effect<ShellListOutput, E>;
|
|
2372
|
+
export type ShellCreateInput = {
|
|
2373
|
+
readonly location?: {
|
|
2374
|
+
readonly directory?: string | undefined;
|
|
2375
|
+
readonly workspace?: string | undefined;
|
|
2376
|
+
} | undefined;
|
|
2377
|
+
readonly command: string;
|
|
2378
|
+
readonly cwd?: string | undefined;
|
|
2379
|
+
readonly timeout: number;
|
|
2380
|
+
readonly metadata?: {
|
|
2381
|
+
readonly [x: string]: unknown;
|
|
2382
|
+
} | undefined;
|
|
2383
|
+
};
|
|
2384
|
+
export type ShellCreateOutput = {
|
|
2385
|
+
readonly location: Location.Info;
|
|
2386
|
+
readonly data: Shell.Info;
|
|
2387
|
+
};
|
|
2388
|
+
export type ShellCreateOperation<E = never> = (input: ShellCreateInput) => Effect.Effect<ShellCreateOutput, E>;
|
|
2389
|
+
export type ShellGetInput = {
|
|
2390
|
+
readonly id: Shell.ID;
|
|
2391
|
+
readonly location?: {
|
|
2392
|
+
readonly directory?: string | undefined;
|
|
2393
|
+
readonly workspace?: string | undefined;
|
|
2394
|
+
} | undefined;
|
|
2395
|
+
};
|
|
2396
|
+
export type ShellGetOutput = {
|
|
2397
|
+
readonly location: Location.Info;
|
|
2398
|
+
readonly data: Shell.Info;
|
|
2399
|
+
};
|
|
2400
|
+
export type ShellGetOperation<E = never> = (input: ShellGetInput) => Effect.Effect<ShellGetOutput, E>;
|
|
2401
|
+
export type ShellTimeoutInput = {
|
|
2402
|
+
readonly id: Shell.ID;
|
|
2403
|
+
readonly location?: {
|
|
2404
|
+
readonly directory?: string | undefined;
|
|
2405
|
+
readonly workspace?: string | undefined;
|
|
2406
|
+
} | undefined;
|
|
2407
|
+
readonly timeout: number;
|
|
2408
|
+
};
|
|
2409
|
+
export type ShellTimeoutOutput = {
|
|
2410
|
+
readonly location: Location.Info;
|
|
2411
|
+
readonly data: Shell.Info;
|
|
2412
|
+
};
|
|
2413
|
+
export type ShellTimeoutOperation<E = never> = (input: ShellTimeoutInput) => Effect.Effect<ShellTimeoutOutput, E>;
|
|
2414
|
+
export type ShellOutputInput = {
|
|
2415
|
+
readonly id: Shell.ID;
|
|
2416
|
+
readonly location?: {
|
|
2417
|
+
readonly directory?: string | undefined;
|
|
2418
|
+
readonly workspace?: string | undefined;
|
|
2419
|
+
} | undefined;
|
|
2420
|
+
readonly cursor?: number | undefined;
|
|
2421
|
+
readonly limit?: number | undefined;
|
|
2422
|
+
};
|
|
2423
|
+
export type ShellOutputOutput = {
|
|
2424
|
+
readonly location: Location.Info;
|
|
2425
|
+
readonly data: {
|
|
2426
|
+
readonly output: string;
|
|
2427
|
+
readonly cursor: number;
|
|
2428
|
+
readonly size: number;
|
|
2429
|
+
readonly truncated: boolean;
|
|
2430
|
+
};
|
|
2431
|
+
};
|
|
2432
|
+
export type ShellOutputOperation<E = never> = (input: ShellOutputInput) => Effect.Effect<ShellOutputOutput, E>;
|
|
2433
|
+
export type ShellRemoveInput = {
|
|
2434
|
+
readonly id: Shell.ID;
|
|
2435
|
+
readonly location?: {
|
|
2436
|
+
readonly directory?: string | undefined;
|
|
2437
|
+
readonly workspace?: string | undefined;
|
|
2438
|
+
} | undefined;
|
|
2439
|
+
};
|
|
2440
|
+
export type ShellRemoveOutput = void;
|
|
2441
|
+
export type ShellRemoveOperation<E = never> = (input: ShellRemoveInput) => Effect.Effect<ShellRemoveOutput, E>;
|
|
2442
|
+
export interface ShellApi<E = never> {
|
|
2443
|
+
readonly list: ShellListOperation<E>;
|
|
2444
|
+
readonly create: ShellCreateOperation<E>;
|
|
2445
|
+
readonly get: ShellGetOperation<E>;
|
|
2446
|
+
readonly timeout: ShellTimeoutOperation<E>;
|
|
2447
|
+
readonly output: ShellOutputOperation<E>;
|
|
2448
|
+
readonly remove: ShellRemoveOperation<E>;
|
|
2449
|
+
}
|
|
2450
|
+
export type ReferenceListInput = {
|
|
2451
|
+
readonly location?: {
|
|
2452
|
+
readonly directory?: string | undefined;
|
|
2453
|
+
readonly workspace?: string | undefined;
|
|
2454
|
+
} | undefined;
|
|
2455
|
+
};
|
|
2456
|
+
export type ReferenceListOutput = {
|
|
2457
|
+
readonly location: Location.Info;
|
|
2458
|
+
readonly data: ReadonlyArray<Reference.Info>;
|
|
2459
|
+
};
|
|
2460
|
+
export type ReferenceListOperation<E = never> = (input?: ReferenceListInput) => Effect.Effect<ReferenceListOutput, E>;
|
|
2461
|
+
export interface ReferenceApi<E = never> {
|
|
2462
|
+
readonly list: ReferenceListOperation<E>;
|
|
2463
|
+
}
|
|
2464
|
+
export type WorktreeListInput = {
|
|
2465
|
+
readonly location?: {
|
|
2466
|
+
readonly directory?: string | undefined;
|
|
2467
|
+
readonly workspace?: string | undefined;
|
|
2468
|
+
} | undefined;
|
|
2469
|
+
};
|
|
2470
|
+
export type WorktreeListOutput = Worktree.List;
|
|
2471
|
+
export type WorktreeListOperation<E = never> = (input?: WorktreeListInput) => Effect.Effect<WorktreeListOutput, E>;
|
|
2472
|
+
export type WorktreeCreateInput = {
|
|
2473
|
+
readonly location?: {
|
|
2474
|
+
readonly directory?: string | undefined;
|
|
2475
|
+
readonly workspace?: string | undefined;
|
|
2476
|
+
} | undefined;
|
|
2477
|
+
readonly strategy?: Worktree.StrategyID | undefined;
|
|
2478
|
+
readonly from?: AbsolutePath | undefined;
|
|
2479
|
+
readonly branch?: string | undefined;
|
|
2480
|
+
readonly directory?: AbsolutePath | undefined;
|
|
2481
|
+
readonly name?: string | undefined;
|
|
2482
|
+
};
|
|
2483
|
+
export type WorktreeCreateOutput = Worktree.Info;
|
|
2484
|
+
export type WorktreeCreateOperation<E = never> = (input?: WorktreeCreateInput) => Effect.Effect<WorktreeCreateOutput, E>;
|
|
2485
|
+
export type WorktreeRemoveInput = {
|
|
2486
|
+
readonly location?: {
|
|
2487
|
+
readonly directory?: string | undefined;
|
|
2488
|
+
readonly workspace?: string | undefined;
|
|
2489
|
+
} | undefined;
|
|
2490
|
+
readonly directory: AbsolutePath;
|
|
2491
|
+
readonly force: boolean;
|
|
2492
|
+
};
|
|
2493
|
+
export type WorktreeRemoveOutput = void;
|
|
2494
|
+
export type WorktreeRemoveOperation<E = never> = (input: WorktreeRemoveInput) => Effect.Effect<WorktreeRemoveOutput, E>;
|
|
2495
|
+
export type WorktreeRefreshInput = {
|
|
2496
|
+
readonly location?: {
|
|
2497
|
+
readonly directory?: string | undefined;
|
|
2498
|
+
readonly workspace?: string | undefined;
|
|
2499
|
+
} | undefined;
|
|
2500
|
+
};
|
|
2501
|
+
export type WorktreeRefreshOutput = void;
|
|
2502
|
+
export type WorktreeRefreshOperation<E = never> = (input?: WorktreeRefreshInput) => Effect.Effect<WorktreeRefreshOutput, E>;
|
|
2503
|
+
export interface WorktreeApi<E = never> {
|
|
2504
|
+
readonly list: WorktreeListOperation<E>;
|
|
2505
|
+
readonly create: WorktreeCreateOperation<E>;
|
|
2506
|
+
readonly remove: WorktreeRemoveOperation<E>;
|
|
2507
|
+
readonly refresh: WorktreeRefreshOperation<E>;
|
|
2508
|
+
}
|
|
2509
|
+
export type WorkspaceCreateInput = {
|
|
2510
|
+
readonly id?: Workspace.ID | undefined;
|
|
2511
|
+
readonly provider: string;
|
|
2512
|
+
};
|
|
2513
|
+
export type WorkspaceCreateOutput = Workspace.ID;
|
|
2514
|
+
export type WorkspaceCreateOperation<E = never> = (input: WorkspaceCreateInput) => Effect.Effect<WorkspaceCreateOutput, E>;
|
|
2515
|
+
export type WorkspaceDestroyInput = {
|
|
2516
|
+
readonly workspaceID: Workspace.ID;
|
|
2517
|
+
};
|
|
2518
|
+
export type WorkspaceDestroyOutput = Workspace.DestroyResult;
|
|
2519
|
+
export type WorkspaceDestroyOperation<E = never> = (input: WorkspaceDestroyInput) => Effect.Effect<WorkspaceDestroyOutput, E>;
|
|
2520
|
+
export interface WorkspaceApi<E = never> {
|
|
2521
|
+
readonly create: WorkspaceCreateOperation<E>;
|
|
2522
|
+
readonly destroy: WorkspaceDestroyOperation<E>;
|
|
2523
|
+
}
|
|
2524
|
+
export type VcsGetInput = {
|
|
2525
|
+
readonly location?: {
|
|
2526
|
+
readonly directory?: string | undefined;
|
|
2527
|
+
readonly workspace?: string | undefined;
|
|
2528
|
+
} | undefined;
|
|
2529
|
+
};
|
|
2530
|
+
export type VcsGetOutput = {
|
|
2531
|
+
readonly location: Location.Info;
|
|
2532
|
+
readonly data: Vcs.Info;
|
|
2533
|
+
};
|
|
2534
|
+
export type VcsGetOperation<E = never> = (input?: VcsGetInput) => Effect.Effect<VcsGetOutput, E>;
|
|
2535
|
+
export type VcsBaseInput = {
|
|
2536
|
+
readonly location?: {
|
|
2537
|
+
readonly directory?: string | undefined;
|
|
2538
|
+
readonly workspace?: string | undefined;
|
|
2539
|
+
} | undefined;
|
|
2540
|
+
};
|
|
2541
|
+
export type VcsBaseOutput = {
|
|
2542
|
+
readonly location: Location.Info;
|
|
2543
|
+
readonly data: Vcs.Base | null;
|
|
2544
|
+
};
|
|
2545
|
+
export type VcsBaseOperation<E = never> = (input?: VcsBaseInput) => Effect.Effect<VcsBaseOutput, E>;
|
|
2546
|
+
export type VcsStatusInput = {
|
|
2547
|
+
readonly location?: {
|
|
2548
|
+
readonly directory?: string | undefined;
|
|
2549
|
+
readonly workspace?: string | undefined;
|
|
2550
|
+
} | undefined;
|
|
2551
|
+
};
|
|
2552
|
+
export type VcsStatusOutput = {
|
|
2553
|
+
readonly location: Location.Info;
|
|
2554
|
+
readonly data: ReadonlyArray<Vcs.FileStatus>;
|
|
2555
|
+
};
|
|
2556
|
+
export type VcsStatusOperation<E = never> = (input?: VcsStatusInput) => Effect.Effect<VcsStatusOutput, E>;
|
|
2557
|
+
export type VcsBranchesInput = {
|
|
2558
|
+
readonly location?: {
|
|
2559
|
+
readonly directory?: string | undefined;
|
|
2560
|
+
readonly workspace?: string | undefined;
|
|
2561
|
+
} | undefined;
|
|
2562
|
+
readonly search?: string | undefined;
|
|
2563
|
+
readonly limit?: number | undefined;
|
|
2564
|
+
};
|
|
2565
|
+
export type VcsBranchesOutput = {
|
|
2566
|
+
readonly location: Location.Info;
|
|
2567
|
+
readonly data: Vcs.BranchList;
|
|
2568
|
+
};
|
|
2569
|
+
export type VcsBranchesOperation<E = never> = (input?: VcsBranchesInput) => Effect.Effect<VcsBranchesOutput, E>;
|
|
2570
|
+
export type VcsDiffInput = {
|
|
2571
|
+
readonly location?: {
|
|
2572
|
+
readonly directory?: string | undefined;
|
|
2573
|
+
readonly workspace?: string | undefined;
|
|
2574
|
+
} | undefined;
|
|
2575
|
+
readonly mode: Vcs.Mode;
|
|
2576
|
+
readonly base?: string | undefined;
|
|
2577
|
+
readonly context?: number | undefined;
|
|
2578
|
+
};
|
|
2579
|
+
export type VcsDiffOutput = {
|
|
2580
|
+
readonly location: Location.Info;
|
|
2581
|
+
readonly data: ReadonlyArray<FileDiff.Info>;
|
|
2582
|
+
};
|
|
2583
|
+
export type VcsDiffOperation<E = never> = (input: VcsDiffInput) => Effect.Effect<VcsDiffOutput, E>;
|
|
2584
|
+
export interface VcsApi<E = never> {
|
|
2585
|
+
readonly get: VcsGetOperation<E>;
|
|
2586
|
+
readonly base: VcsBaseOperation<E>;
|
|
2587
|
+
readonly status: VcsStatusOperation<E>;
|
|
2588
|
+
readonly branches: VcsBranchesOperation<E>;
|
|
2589
|
+
readonly diff: VcsDiffOperation<E>;
|
|
2590
|
+
}
|
|
2591
|
+
export type DebugLocationListOutput = ReadonlyArray<Location.Ref>;
|
|
2592
|
+
export type DebugLocationListOperation<E = never> = () => Effect.Effect<DebugLocationListOutput, E>;
|
|
2593
|
+
export type DebugLocationEvictInput = {
|
|
2594
|
+
readonly location?: {
|
|
2595
|
+
readonly directory?: string | undefined;
|
|
2596
|
+
readonly workspace?: string | undefined;
|
|
2597
|
+
} | undefined;
|
|
2598
|
+
};
|
|
2599
|
+
export type DebugLocationEvictOutput = void;
|
|
2600
|
+
export type DebugLocationEvictOperation<E = never> = (input?: DebugLocationEvictInput) => Effect.Effect<DebugLocationEvictOutput, E>;
|
|
2601
|
+
export interface DebugApi<E = never> {
|
|
2602
|
+
readonly location: {
|
|
2603
|
+
readonly list: DebugLocationListOperation<E>;
|
|
2604
|
+
readonly evict: DebugLocationEvictOperation<E>;
|
|
2605
|
+
};
|
|
2606
|
+
}
|
|
2607
|
+
export type MigrationV1StatusOutput = {
|
|
2608
|
+
readonly status: "required" | "completed";
|
|
2609
|
+
} | {
|
|
2610
|
+
readonly status: "running";
|
|
2611
|
+
readonly progress: {
|
|
2612
|
+
readonly label: string;
|
|
2613
|
+
readonly numerator?: number | undefined;
|
|
2614
|
+
readonly denominator?: number | undefined;
|
|
2615
|
+
};
|
|
2616
|
+
} | {
|
|
2617
|
+
readonly status: "error";
|
|
2618
|
+
readonly error: string;
|
|
2619
|
+
};
|
|
2620
|
+
export type MigrationV1StatusOperation<E = never> = () => Effect.Effect<MigrationV1StatusOutput, E>;
|
|
2621
|
+
export interface MigrationApi<E = never> {
|
|
2622
|
+
readonly v1: {
|
|
2623
|
+
readonly status: MigrationV1StatusOperation<E>;
|
|
2624
|
+
};
|
|
2625
|
+
}
|
|
2626
|
+
export type WebsearchProvidersInput = {
|
|
2627
|
+
readonly location?: {
|
|
2628
|
+
readonly directory?: string | undefined;
|
|
2629
|
+
readonly workspace?: string | undefined;
|
|
2630
|
+
} | undefined;
|
|
2631
|
+
};
|
|
2632
|
+
export type WebsearchProvidersOutput = {
|
|
2633
|
+
readonly location: Location.Info;
|
|
2634
|
+
readonly data: ReadonlyArray<WebSearch.Provider>;
|
|
2635
|
+
};
|
|
2636
|
+
export type WebsearchProvidersOperation<E = never> = (input?: WebsearchProvidersInput) => Effect.Effect<WebsearchProvidersOutput, E>;
|
|
2637
|
+
export type WebsearchQueryInput = {
|
|
2638
|
+
readonly location?: {
|
|
2639
|
+
readonly directory?: string | undefined;
|
|
2640
|
+
readonly workspace?: string | undefined;
|
|
2641
|
+
} | undefined;
|
|
2642
|
+
readonly query: string;
|
|
2643
|
+
readonly providerID?: WebSearch.ID | undefined;
|
|
2644
|
+
};
|
|
2645
|
+
export type WebsearchQueryOutput = {
|
|
2646
|
+
readonly location: Location.Info;
|
|
2647
|
+
readonly data: WebSearch.Response;
|
|
2648
|
+
};
|
|
2649
|
+
export type WebsearchQueryOperation<E = never> = (input: WebsearchQueryInput) => Effect.Effect<WebsearchQueryOutput, E>;
|
|
2650
|
+
export interface WebsearchApi<E = never> {
|
|
2651
|
+
readonly providers: WebsearchProvidersOperation<E>;
|
|
2652
|
+
readonly query: WebsearchQueryOperation<E>;
|
|
2653
|
+
}
|
|
2654
|
+
export type ConfigGetInput = {
|
|
2655
|
+
readonly location?: {
|
|
2656
|
+
readonly directory?: string | undefined;
|
|
2657
|
+
readonly workspace?: string | undefined;
|
|
2658
|
+
} | undefined;
|
|
2659
|
+
};
|
|
2660
|
+
export type ConfigGetOutput = ReadonlyArray<Config.Entry>;
|
|
2661
|
+
export type ConfigGetOperation<E = never> = (input?: ConfigGetInput) => Effect.Effect<ConfigGetOutput, E>;
|
|
2662
|
+
export interface ConfigApi<E = never> {
|
|
2663
|
+
readonly get: ConfigGetOperation<E>;
|
|
2664
|
+
}
|
|
2665
|
+
export interface AppApi<E = never> {
|
|
2666
|
+
readonly health: HealthApi<E>;
|
|
2667
|
+
readonly server: ServerApi<E>;
|
|
2668
|
+
readonly location: LocationApi<E>;
|
|
2669
|
+
readonly agent: AgentApi<E>;
|
|
2670
|
+
readonly plugin: PluginApi<E>;
|
|
2671
|
+
readonly session: SessionApi<E>;
|
|
2672
|
+
readonly message: MessageApi<E>;
|
|
2673
|
+
readonly model: ModelApi<E>;
|
|
2674
|
+
readonly generate: GenerateApi<E>;
|
|
2675
|
+
readonly provider: ProviderApi<E>;
|
|
2676
|
+
readonly integration: IntegrationApi<E>;
|
|
2677
|
+
readonly mcp: McpApi<E>;
|
|
2678
|
+
readonly credential: CredentialApi<E>;
|
|
2679
|
+
readonly project: ProjectApi<E>;
|
|
2680
|
+
readonly form: FormApi<E>;
|
|
2681
|
+
readonly permission: PermissionApi<E>;
|
|
2682
|
+
readonly file: FileApi<E>;
|
|
2683
|
+
readonly command: CommandApi<E>;
|
|
2684
|
+
readonly skill: SkillApi<E>;
|
|
2685
|
+
readonly rpc: RpcApi<E>;
|
|
2686
|
+
readonly event: EventApi<E>;
|
|
2687
|
+
readonly pty: PtyApi<E>;
|
|
2688
|
+
readonly experimental: ExperimentalApi<E>;
|
|
2689
|
+
readonly shell: ShellApi<E>;
|
|
2690
|
+
readonly reference: ReferenceApi<E>;
|
|
2691
|
+
readonly worktree: WorktreeApi<E>;
|
|
2692
|
+
readonly workspace: WorkspaceApi<E>;
|
|
2693
|
+
readonly vcs: VcsApi<E>;
|
|
2694
|
+
readonly debug: DebugApi<E>;
|
|
2695
|
+
readonly migration: MigrationApi<E>;
|
|
2696
|
+
readonly websearch: WebsearchApi<E>;
|
|
2697
|
+
readonly config: ConfigApi<E>;
|
|
2698
|
+
}
|