@opencode-ai/sdk 1.14.50 → 1.14.51
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/dist/v2/gen/types.gen.d.ts +8 -360
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type ClientOptions = {
|
|
2
2
|
baseUrl: `${string}://${string}` | (string & {});
|
|
3
3
|
};
|
|
4
|
-
export type Event = EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow1 | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventInstallationUpdated | EventInstallationUpdateAvailable |
|
|
4
|
+
export type Event = EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow1 | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventInstallationUpdated | EventInstallationUpdateAvailable | EventServerConnected | EventGlobalDisposed;
|
|
5
5
|
export type OAuth = {
|
|
6
6
|
type: "oauth";
|
|
7
7
|
refresh: string;
|
|
@@ -609,7 +609,7 @@ export type GlobalEvent = {
|
|
|
609
609
|
directory: string;
|
|
610
610
|
project?: string;
|
|
611
611
|
workspace?: string;
|
|
612
|
-
payload: EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventInstallationUpdated | EventInstallationUpdateAvailable |
|
|
612
|
+
payload: EventServerInstanceDisposed | EventFileEdited | EventFileWatcherUpdated | EventLspClientDiagnostics | EventLspUpdated | EventMessagePartDelta | EventPermissionAsked | EventPermissionReplied | EventSessionDiff | EventSessionError | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventTodoUpdated | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventInstallationUpdated | EventInstallationUpdateAvailable | EventServerConnected | EventGlobalDisposed | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextPrompted | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextDelta | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningDelta | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputDelta | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionDelta | SyncEventSessionNextCompactionEnded;
|
|
613
613
|
};
|
|
614
614
|
/**
|
|
615
615
|
* Log level
|
|
@@ -2176,84 +2176,18 @@ export type EventInstallationUpdateAvailable = {
|
|
|
2176
2176
|
version: string;
|
|
2177
2177
|
};
|
|
2178
2178
|
};
|
|
2179
|
-
export type
|
|
2180
|
-
id: string;
|
|
2181
|
-
type: "message.updated";
|
|
2182
|
-
properties: {
|
|
2183
|
-
sessionID: string;
|
|
2184
|
-
info: Message;
|
|
2185
|
-
};
|
|
2186
|
-
};
|
|
2187
|
-
export type EventMessageRemoved = {
|
|
2188
|
-
id: string;
|
|
2189
|
-
type: "message.removed";
|
|
2190
|
-
properties: {
|
|
2191
|
-
sessionID: string;
|
|
2192
|
-
messageID: string;
|
|
2193
|
-
};
|
|
2194
|
-
};
|
|
2195
|
-
export type EventMessagePartUpdated = {
|
|
2196
|
-
id: string;
|
|
2197
|
-
type: "message.part.updated";
|
|
2198
|
-
properties: {
|
|
2199
|
-
sessionID: string;
|
|
2200
|
-
part: Part;
|
|
2201
|
-
time: number;
|
|
2202
|
-
};
|
|
2203
|
-
};
|
|
2204
|
-
export type EventMessagePartRemoved = {
|
|
2205
|
-
id: string;
|
|
2206
|
-
type: "message.part.removed";
|
|
2207
|
-
properties: {
|
|
2208
|
-
sessionID: string;
|
|
2209
|
-
messageID: string;
|
|
2210
|
-
partID: string;
|
|
2211
|
-
};
|
|
2212
|
-
};
|
|
2213
|
-
export type EventSessionCreated = {
|
|
2214
|
-
id: string;
|
|
2215
|
-
type: "session.created";
|
|
2216
|
-
properties: {
|
|
2217
|
-
sessionID: string;
|
|
2218
|
-
info: Session;
|
|
2219
|
-
};
|
|
2220
|
-
};
|
|
2221
|
-
export type EventSessionUpdated = {
|
|
2222
|
-
id: string;
|
|
2223
|
-
type: "session.updated";
|
|
2224
|
-
properties: {
|
|
2225
|
-
sessionID: string;
|
|
2226
|
-
info: Session;
|
|
2227
|
-
};
|
|
2228
|
-
};
|
|
2229
|
-
export type EventSessionDeleted = {
|
|
2230
|
-
id: string;
|
|
2231
|
-
type: "session.deleted";
|
|
2232
|
-
properties: {
|
|
2233
|
-
sessionID: string;
|
|
2234
|
-
info: Session;
|
|
2235
|
-
};
|
|
2236
|
-
};
|
|
2237
|
-
export type EventSessionNextAgentSwitched = {
|
|
2179
|
+
export type EventServerConnected = {
|
|
2238
2180
|
id: string;
|
|
2239
|
-
type: "
|
|
2181
|
+
type: "server.connected";
|
|
2240
2182
|
properties: {
|
|
2241
|
-
|
|
2242
|
-
sessionID: string;
|
|
2243
|
-
agent: string;
|
|
2183
|
+
[key: string]: unknown;
|
|
2244
2184
|
};
|
|
2245
2185
|
};
|
|
2246
|
-
export type
|
|
2186
|
+
export type EventGlobalDisposed = {
|
|
2247
2187
|
id: string;
|
|
2248
|
-
type: "
|
|
2188
|
+
type: "global.disposed";
|
|
2249
2189
|
properties: {
|
|
2250
|
-
|
|
2251
|
-
sessionID: string;
|
|
2252
|
-
model: {
|
|
2253
|
-
id: string;
|
|
2254
|
-
providerID: string;
|
|
2255
|
-
variant: string;
|
|
2256
|
-
};
|
|
2190
|
+
[key: string]: unknown;
|
|
2257
2191
|
};
|
|
2258
2192
|
};
|
|
2259
2193
|
export type PromptSource = {
|
|
@@ -2283,196 +2217,10 @@ export type PromptReferenceAttachment = {
|
|
|
2283
2217
|
problem?: string;
|
|
2284
2218
|
source?: PromptSource;
|
|
2285
2219
|
};
|
|
2286
|
-
export type EventSessionNextPrompted = {
|
|
2287
|
-
id: string;
|
|
2288
|
-
type: "session.next.prompted";
|
|
2289
|
-
properties: {
|
|
2290
|
-
timestamp: number;
|
|
2291
|
-
sessionID: string;
|
|
2292
|
-
prompt: Prompt;
|
|
2293
|
-
};
|
|
2294
|
-
};
|
|
2295
|
-
export type EventSessionNextSynthetic = {
|
|
2296
|
-
id: string;
|
|
2297
|
-
type: "session.next.synthetic";
|
|
2298
|
-
properties: {
|
|
2299
|
-
timestamp: number;
|
|
2300
|
-
sessionID: string;
|
|
2301
|
-
text: string;
|
|
2302
|
-
};
|
|
2303
|
-
};
|
|
2304
|
-
export type EventSessionNextShellStarted = {
|
|
2305
|
-
id: string;
|
|
2306
|
-
type: "session.next.shell.started";
|
|
2307
|
-
properties: {
|
|
2308
|
-
timestamp: number;
|
|
2309
|
-
sessionID: string;
|
|
2310
|
-
callID: string;
|
|
2311
|
-
command: string;
|
|
2312
|
-
};
|
|
2313
|
-
};
|
|
2314
|
-
export type EventSessionNextShellEnded = {
|
|
2315
|
-
id: string;
|
|
2316
|
-
type: "session.next.shell.ended";
|
|
2317
|
-
properties: {
|
|
2318
|
-
timestamp: number;
|
|
2319
|
-
sessionID: string;
|
|
2320
|
-
callID: string;
|
|
2321
|
-
output: string;
|
|
2322
|
-
};
|
|
2323
|
-
};
|
|
2324
|
-
export type EventSessionNextStepStarted = {
|
|
2325
|
-
id: string;
|
|
2326
|
-
type: "session.next.step.started";
|
|
2327
|
-
properties: {
|
|
2328
|
-
timestamp: number;
|
|
2329
|
-
sessionID: string;
|
|
2330
|
-
agent: string;
|
|
2331
|
-
model: {
|
|
2332
|
-
id: string;
|
|
2333
|
-
providerID: string;
|
|
2334
|
-
variant: string;
|
|
2335
|
-
};
|
|
2336
|
-
snapshot?: string;
|
|
2337
|
-
};
|
|
2338
|
-
};
|
|
2339
|
-
export type EventSessionNextStepEnded = {
|
|
2340
|
-
id: string;
|
|
2341
|
-
type: "session.next.step.ended";
|
|
2342
|
-
properties: {
|
|
2343
|
-
timestamp: number;
|
|
2344
|
-
sessionID: string;
|
|
2345
|
-
finish: string;
|
|
2346
|
-
cost: number;
|
|
2347
|
-
tokens: {
|
|
2348
|
-
input: number;
|
|
2349
|
-
output: number;
|
|
2350
|
-
reasoning: number;
|
|
2351
|
-
cache: {
|
|
2352
|
-
read: number;
|
|
2353
|
-
write: number;
|
|
2354
|
-
};
|
|
2355
|
-
};
|
|
2356
|
-
snapshot?: string;
|
|
2357
|
-
};
|
|
2358
|
-
};
|
|
2359
2220
|
export type SessionErrorUnknown = {
|
|
2360
2221
|
type: "unknown";
|
|
2361
2222
|
message: string;
|
|
2362
2223
|
};
|
|
2363
|
-
export type EventSessionNextStepFailed = {
|
|
2364
|
-
id: string;
|
|
2365
|
-
type: "session.next.step.failed";
|
|
2366
|
-
properties: {
|
|
2367
|
-
timestamp: number;
|
|
2368
|
-
sessionID: string;
|
|
2369
|
-
error: SessionErrorUnknown;
|
|
2370
|
-
};
|
|
2371
|
-
};
|
|
2372
|
-
export type EventSessionNextTextStarted = {
|
|
2373
|
-
id: string;
|
|
2374
|
-
type: "session.next.text.started";
|
|
2375
|
-
properties: {
|
|
2376
|
-
timestamp: number;
|
|
2377
|
-
sessionID: string;
|
|
2378
|
-
};
|
|
2379
|
-
};
|
|
2380
|
-
export type EventSessionNextTextDelta = {
|
|
2381
|
-
id: string;
|
|
2382
|
-
type: "session.next.text.delta";
|
|
2383
|
-
properties: {
|
|
2384
|
-
timestamp: number;
|
|
2385
|
-
sessionID: string;
|
|
2386
|
-
delta: string;
|
|
2387
|
-
};
|
|
2388
|
-
};
|
|
2389
|
-
export type EventSessionNextTextEnded = {
|
|
2390
|
-
id: string;
|
|
2391
|
-
type: "session.next.text.ended";
|
|
2392
|
-
properties: {
|
|
2393
|
-
timestamp: number;
|
|
2394
|
-
sessionID: string;
|
|
2395
|
-
text: string;
|
|
2396
|
-
};
|
|
2397
|
-
};
|
|
2398
|
-
export type EventSessionNextReasoningStarted = {
|
|
2399
|
-
id: string;
|
|
2400
|
-
type: "session.next.reasoning.started";
|
|
2401
|
-
properties: {
|
|
2402
|
-
timestamp: number;
|
|
2403
|
-
sessionID: string;
|
|
2404
|
-
reasoningID: string;
|
|
2405
|
-
};
|
|
2406
|
-
};
|
|
2407
|
-
export type EventSessionNextReasoningDelta = {
|
|
2408
|
-
id: string;
|
|
2409
|
-
type: "session.next.reasoning.delta";
|
|
2410
|
-
properties: {
|
|
2411
|
-
timestamp: number;
|
|
2412
|
-
sessionID: string;
|
|
2413
|
-
reasoningID: string;
|
|
2414
|
-
delta: string;
|
|
2415
|
-
};
|
|
2416
|
-
};
|
|
2417
|
-
export type EventSessionNextReasoningEnded = {
|
|
2418
|
-
id: string;
|
|
2419
|
-
type: "session.next.reasoning.ended";
|
|
2420
|
-
properties: {
|
|
2421
|
-
timestamp: number;
|
|
2422
|
-
sessionID: string;
|
|
2423
|
-
reasoningID: string;
|
|
2424
|
-
text: string;
|
|
2425
|
-
};
|
|
2426
|
-
};
|
|
2427
|
-
export type EventSessionNextToolInputStarted = {
|
|
2428
|
-
id: string;
|
|
2429
|
-
type: "session.next.tool.input.started";
|
|
2430
|
-
properties: {
|
|
2431
|
-
timestamp: number;
|
|
2432
|
-
sessionID: string;
|
|
2433
|
-
callID: string;
|
|
2434
|
-
name: string;
|
|
2435
|
-
};
|
|
2436
|
-
};
|
|
2437
|
-
export type EventSessionNextToolInputDelta = {
|
|
2438
|
-
id: string;
|
|
2439
|
-
type: "session.next.tool.input.delta";
|
|
2440
|
-
properties: {
|
|
2441
|
-
timestamp: number;
|
|
2442
|
-
sessionID: string;
|
|
2443
|
-
callID: string;
|
|
2444
|
-
delta: string;
|
|
2445
|
-
};
|
|
2446
|
-
};
|
|
2447
|
-
export type EventSessionNextToolInputEnded = {
|
|
2448
|
-
id: string;
|
|
2449
|
-
type: "session.next.tool.input.ended";
|
|
2450
|
-
properties: {
|
|
2451
|
-
timestamp: number;
|
|
2452
|
-
sessionID: string;
|
|
2453
|
-
callID: string;
|
|
2454
|
-
text: string;
|
|
2455
|
-
};
|
|
2456
|
-
};
|
|
2457
|
-
export type EventSessionNextToolCalled = {
|
|
2458
|
-
id: string;
|
|
2459
|
-
type: "session.next.tool.called";
|
|
2460
|
-
properties: {
|
|
2461
|
-
timestamp: number;
|
|
2462
|
-
sessionID: string;
|
|
2463
|
-
callID: string;
|
|
2464
|
-
tool: string;
|
|
2465
|
-
input: {
|
|
2466
|
-
[key: string]: unknown;
|
|
2467
|
-
};
|
|
2468
|
-
provider: {
|
|
2469
|
-
executed: boolean;
|
|
2470
|
-
metadata?: {
|
|
2471
|
-
[key: string]: unknown;
|
|
2472
|
-
};
|
|
2473
|
-
};
|
|
2474
|
-
};
|
|
2475
|
-
};
|
|
2476
2224
|
export type ToolTextContent = {
|
|
2477
2225
|
type: "text";
|
|
2478
2226
|
text: string;
|
|
@@ -2483,54 +2231,6 @@ export type ToolFileContent = {
|
|
|
2483
2231
|
mime: string;
|
|
2484
2232
|
name?: string;
|
|
2485
2233
|
};
|
|
2486
|
-
export type EventSessionNextToolProgress = {
|
|
2487
|
-
id: string;
|
|
2488
|
-
type: "session.next.tool.progress";
|
|
2489
|
-
properties: {
|
|
2490
|
-
timestamp: number;
|
|
2491
|
-
sessionID: string;
|
|
2492
|
-
callID: string;
|
|
2493
|
-
structured: {
|
|
2494
|
-
[key: string]: unknown;
|
|
2495
|
-
};
|
|
2496
|
-
content: Array<ToolTextContent | ToolFileContent>;
|
|
2497
|
-
};
|
|
2498
|
-
};
|
|
2499
|
-
export type EventSessionNextToolSuccess = {
|
|
2500
|
-
id: string;
|
|
2501
|
-
type: "session.next.tool.success";
|
|
2502
|
-
properties: {
|
|
2503
|
-
timestamp: number;
|
|
2504
|
-
sessionID: string;
|
|
2505
|
-
callID: string;
|
|
2506
|
-
structured: {
|
|
2507
|
-
[key: string]: unknown;
|
|
2508
|
-
};
|
|
2509
|
-
content: Array<ToolTextContent | ToolFileContent>;
|
|
2510
|
-
provider: {
|
|
2511
|
-
executed: boolean;
|
|
2512
|
-
metadata?: {
|
|
2513
|
-
[key: string]: unknown;
|
|
2514
|
-
};
|
|
2515
|
-
};
|
|
2516
|
-
};
|
|
2517
|
-
};
|
|
2518
|
-
export type EventSessionNextToolFailed = {
|
|
2519
|
-
id: string;
|
|
2520
|
-
type: "session.next.tool.failed";
|
|
2521
|
-
properties: {
|
|
2522
|
-
timestamp: number;
|
|
2523
|
-
sessionID: string;
|
|
2524
|
-
callID: string;
|
|
2525
|
-
error: SessionErrorUnknown;
|
|
2526
|
-
provider: {
|
|
2527
|
-
executed: boolean;
|
|
2528
|
-
metadata?: {
|
|
2529
|
-
[key: string]: unknown;
|
|
2530
|
-
};
|
|
2531
|
-
};
|
|
2532
|
-
};
|
|
2533
|
-
};
|
|
2534
2234
|
export type SessionNextRetryError = {
|
|
2535
2235
|
message: string;
|
|
2536
2236
|
statusCode?: number;
|
|
@@ -2543,58 +2243,6 @@ export type SessionNextRetryError = {
|
|
|
2543
2243
|
[key: string]: string;
|
|
2544
2244
|
};
|
|
2545
2245
|
};
|
|
2546
|
-
export type EventSessionNextRetried = {
|
|
2547
|
-
id: string;
|
|
2548
|
-
type: "session.next.retried";
|
|
2549
|
-
properties: {
|
|
2550
|
-
timestamp: number;
|
|
2551
|
-
sessionID: string;
|
|
2552
|
-
attempt: number;
|
|
2553
|
-
error: SessionNextRetryError;
|
|
2554
|
-
};
|
|
2555
|
-
};
|
|
2556
|
-
export type EventSessionNextCompactionStarted = {
|
|
2557
|
-
id: string;
|
|
2558
|
-
type: "session.next.compaction.started";
|
|
2559
|
-
properties: {
|
|
2560
|
-
timestamp: number;
|
|
2561
|
-
sessionID: string;
|
|
2562
|
-
reason: "auto" | "manual";
|
|
2563
|
-
};
|
|
2564
|
-
};
|
|
2565
|
-
export type EventSessionNextCompactionDelta = {
|
|
2566
|
-
id: string;
|
|
2567
|
-
type: "session.next.compaction.delta";
|
|
2568
|
-
properties: {
|
|
2569
|
-
timestamp: number;
|
|
2570
|
-
sessionID: string;
|
|
2571
|
-
text: string;
|
|
2572
|
-
};
|
|
2573
|
-
};
|
|
2574
|
-
export type EventSessionNextCompactionEnded = {
|
|
2575
|
-
id: string;
|
|
2576
|
-
type: "session.next.compaction.ended";
|
|
2577
|
-
properties: {
|
|
2578
|
-
timestamp: number;
|
|
2579
|
-
sessionID: string;
|
|
2580
|
-
text: string;
|
|
2581
|
-
include?: string;
|
|
2582
|
-
};
|
|
2583
|
-
};
|
|
2584
|
-
export type EventServerConnected = {
|
|
2585
|
-
id: string;
|
|
2586
|
-
type: "server.connected";
|
|
2587
|
-
properties: {
|
|
2588
|
-
[key: string]: unknown;
|
|
2589
|
-
};
|
|
2590
|
-
};
|
|
2591
|
-
export type EventGlobalDisposed = {
|
|
2592
|
-
id: string;
|
|
2593
|
-
type: "global.disposed";
|
|
2594
|
-
properties: {
|
|
2595
|
-
[key: string]: unknown;
|
|
2596
|
-
};
|
|
2597
|
-
};
|
|
2598
2246
|
export type SessionInfo = {
|
|
2599
2247
|
id: string;
|
|
2600
2248
|
parentID?: string;
|