@opencode-ai/sdk 1.17.9 → 1.17.10

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.
@@ -1,7 +1,7 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: `${string}://${string}` | (string & {});
3
3
  };
4
- export type Event = EventModelsDevRefreshed | EventPluginAdded | EventIntegrationUpdated | EventCatalogUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextMoved | EventSessionNextPrompted | EventSessionNextPromptAdmitted | EventSessionNextPromptPromoted | EventSessionNextInterruptRequested | EventSessionNextContextUpdated | EventSessionNextSynthetic | EventSessionNextShellStarted | EventSessionNextShellEnded | EventSessionNextStepStarted | EventSessionNextStepEnded | EventSessionNextStepFailed | EventSessionNextTextStarted | EventSessionNextTextDelta | EventSessionNextTextEnded | EventSessionNextReasoningStarted | EventSessionNextReasoningDelta | EventSessionNextReasoningEnded | EventSessionNextToolInputStarted | EventSessionNextToolInputDelta | EventSessionNextToolInputEnded | EventSessionNextToolCalled | EventSessionNextToolProgress | EventSessionNextToolSuccess | EventSessionNextToolFailed | EventSessionNextRetried | EventSessionNextCompactionStarted | EventSessionNextCompactionDelta | EventSessionNextCompactionEnded | EventMessagePartDelta | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventFileEdited | EventPermissionV2Asked | EventPermissionV2Replied | EventReferenceUpdated | EventProjectDirectoriesUpdated | EventFileWatcherUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventQuestionV2Asked | EventQuestionV2Replied | EventQuestionV2Rejected | EventTodoUpdated | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventSessionStatus | EventSessionIdle | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionCompacted | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventServerConnected | EventGlobalDisposed | EventServerInstanceDisposed;
4
+ export type Event = EventModelsDevRefreshed | EventIntegrationUpdated | EventIntegrationConnectionUpdated | EventCatalogUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextMoved | EventSessionNextPrompted | EventSessionNextPromptAdmitted | EventSessionNextContextUpdated | EventSessionNextSynthetic | EventSessionNextShellStarted | EventSessionNextShellEnded | EventSessionNextStepStarted | EventSessionNextStepEnded | EventSessionNextStepFailed | EventSessionNextTextStarted | EventSessionNextTextDelta | EventSessionNextTextEnded | EventSessionNextReasoningStarted | EventSessionNextReasoningDelta | EventSessionNextReasoningEnded | EventSessionNextToolInputStarted | EventSessionNextToolInputDelta | EventSessionNextToolInputEnded | EventSessionNextToolCalled | EventSessionNextToolProgress | EventSessionNextToolSuccess | EventSessionNextToolFailed | EventSessionNextRetried | EventSessionNextCompactionStarted | EventSessionNextCompactionDelta | EventSessionNextCompactionEnded | EventMessagePartDelta | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventFileEdited | EventReferenceUpdated | EventPermissionV2Asked | EventPermissionV2Replied | EventPluginAdded | EventProjectDirectoriesUpdated | EventFileWatcherUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventQuestionV2Asked | EventQuestionV2Replied | EventQuestionV2Rejected | EventTodoUpdated | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectUpdated | EventSessionStatus | EventSessionIdle | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionCompacted | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventWorktreeReady | EventWorktreeFailed | EventServerConnected | EventGlobalDisposed | EventServerInstanceDisposed;
5
5
  export type QuestionReplied = {
6
6
  sessionID: string;
7
7
  requestID: string;
@@ -562,15 +562,15 @@ export type GlobalEvent = {
562
562
  };
563
563
  } | {
564
564
  id: string;
565
- type: "plugin.added";
565
+ type: "integration.updated";
566
566
  properties: {
567
- id: string;
567
+ [key: string]: unknown;
568
568
  };
569
569
  } | {
570
570
  id: string;
571
- type: "integration.updated";
571
+ type: "integration.connection.updated";
572
572
  properties: {
573
- [key: string]: unknown;
573
+ integrationID: string;
574
574
  };
575
575
  } | {
576
576
  id: string;
@@ -680,23 +680,6 @@ export type GlobalEvent = {
680
680
  prompt: Prompt;
681
681
  delivery: "steer" | "queue";
682
682
  };
683
- } | {
684
- id: string;
685
- type: "session.next.prompt.promoted";
686
- properties: {
687
- timestamp: number;
688
- sessionID: string;
689
- messageID: string;
690
- prompt: Prompt;
691
- timeCreated: number;
692
- };
693
- } | {
694
- id: string;
695
- type: "session.next.interrupt.requested";
696
- properties: {
697
- timestamp: number;
698
- sessionID: string;
699
- };
700
683
  } | {
701
684
  id: string;
702
685
  type: "session.next.context.updated";
@@ -1032,6 +1015,12 @@ export type GlobalEvent = {
1032
1015
  properties: {
1033
1016
  file: string;
1034
1017
  };
1018
+ } | {
1019
+ id: string;
1020
+ type: "reference.updated";
1021
+ properties: {
1022
+ [key: string]: unknown;
1023
+ };
1035
1024
  } | {
1036
1025
  id: string;
1037
1026
  type: "permission.v2.asked";
@@ -1056,9 +1045,9 @@ export type GlobalEvent = {
1056
1045
  };
1057
1046
  } | {
1058
1047
  id: string;
1059
- type: "reference.updated";
1048
+ type: "plugin.added";
1060
1049
  properties: {
1061
- [key: string]: unknown;
1050
+ id: string;
1062
1051
  };
1063
1052
  } | {
1064
1053
  id: string;
@@ -1337,7 +1326,7 @@ export type GlobalEvent = {
1337
1326
  properties: {
1338
1327
  [key: string]: unknown;
1339
1328
  };
1340
- } | EventServerInstanceDisposed | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextMoved | SyncEventSessionNextPrompted | SyncEventSessionNextPromptAdmitted | SyncEventSessionNextPromptPromoted | SyncEventSessionNextInterruptRequested | SyncEventSessionNextContextUpdated | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionEnded;
1329
+ } | EventServerInstanceDisposed | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextMoved | SyncEventSessionNextPrompted | SyncEventSessionNextPromptAdmitted | SyncEventSessionNextContextUpdated | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionEnded;
1341
1330
  };
1342
1331
  /**
1343
1332
  * Log level
@@ -2282,6 +2271,7 @@ export type ProviderNotFoundError = {
2282
2271
  providerID: string;
2283
2272
  message: string;
2284
2273
  };
2274
+ export type V2Event = V2EventModelsDevRefreshed | V2EventIntegrationUpdated | V2EventIntegrationConnectionUpdated | V2EventCatalogUpdated | V2EventSessionCreated | V2EventSessionUpdated | V2EventSessionDeleted | V2EventMessageUpdated | V2EventMessageRemoved | V2EventMessagePartUpdated | V2EventMessagePartRemoved | V2EventSessionNextAgentSwitched | V2EventSessionNextModelSwitched | V2EventSessionNextMoved | V2EventSessionNextPrompted | V2EventSessionNextPromptAdmitted | V2EventSessionNextContextUpdated | V2EventSessionNextSynthetic | V2EventSessionNextShellStarted | V2EventSessionNextShellEnded | V2EventSessionNextStepStarted | V2EventSessionNextStepEnded | V2EventSessionNextStepFailed | V2EventSessionNextTextStarted | V2EventSessionNextTextDelta | V2EventSessionNextTextEnded | V2EventSessionNextReasoningStarted | V2EventSessionNextReasoningDelta | V2EventSessionNextReasoningEnded | V2EventSessionNextToolInputStarted | V2EventSessionNextToolInputDelta | V2EventSessionNextToolInputEnded | V2EventSessionNextToolCalled | V2EventSessionNextToolProgress | V2EventSessionNextToolSuccess | V2EventSessionNextToolFailed | V2EventSessionNextRetried | V2EventSessionNextCompactionStarted | V2EventSessionNextCompactionDelta | V2EventSessionNextCompactionEnded | V2EventMessagePartDelta | V2EventSessionDiff | V2EventSessionError | V2EventInstallationUpdated | V2EventInstallationUpdateAvailable | V2EventFileEdited | V2EventReferenceUpdated | V2EventPermissionV2Asked | V2EventPermissionV2Replied | V2EventPluginAdded | V2EventProjectDirectoriesUpdated | V2EventFileWatcherUpdated | V2EventPtyCreated | V2EventPtyUpdated | V2EventPtyExited | V2EventPtyDeleted | V2EventQuestionV2Asked | V2EventQuestionV2Replied | V2EventQuestionV2Rejected | V2EventTodoUpdated | V2EventLspUpdated | V2EventPermissionAsked | V2EventPermissionReplied | V2EventTuiPromptAppend | V2EventTuiCommandExecute | V2EventTuiToastShow | V2EventTuiSessionSelect | V2EventMcpToolsChanged | V2EventMcpBrowserOpenFailed | V2EventCommandExecuted | V2EventProjectUpdated | V2EventSessionStatus | V2EventSessionIdle | V2EventQuestionAsked | V2EventQuestionReplied | V2EventQuestionRejected | V2EventSessionCompacted | V2EventVcsBranchUpdated | V2EventWorkspaceReady | V2EventWorkspaceFailed | V2EventWorkspaceStatus | V2EventWorktreeReady | V2EventWorktreeFailed | V2EventServerConnected | V2EventGlobalDisposed;
2285
2275
  export type ForbiddenError = {
2286
2276
  _tag: "ForbiddenError";
2287
2277
  message: string;
@@ -2330,6 +2320,16 @@ export type EventTuiSessionSelect2 = {
2330
2320
  sessionID: string;
2331
2321
  };
2332
2322
  };
2323
+ export type CredentialValue = CredentialOAuth | CredentialKey;
2324
+ export type IntegrationInputs = {
2325
+ [key: string]: string;
2326
+ };
2327
+ export type IntegrationMethod = IntegrationOAuthMethod | IntegrationKeyMethod | IntegrationEnvMethod;
2328
+ export type IntegrationRef = {
2329
+ id: string;
2330
+ name: string;
2331
+ };
2332
+ export type SkillV2Source = SkillV2DirectorySource | SkillV2UrlSource | SkillV2EmbeddedSource;
2333
2333
  export type MoveSessionDestination = {
2334
2334
  directory: string;
2335
2335
  };
@@ -2609,37 +2609,6 @@ export type SyncEventSessionNextPromptAdmitted = {
2609
2609
  };
2610
2610
  };
2611
2611
  };
2612
- export type SyncEventSessionNextPromptPromoted = {
2613
- type: "sync";
2614
- id: string;
2615
- syncEvent: {
2616
- type: "session.next.prompt.promoted.1";
2617
- id: string;
2618
- seq: number;
2619
- aggregateID: string;
2620
- data: {
2621
- timestamp: number;
2622
- sessionID: string;
2623
- messageID: string;
2624
- prompt: Prompt;
2625
- timeCreated: number;
2626
- };
2627
- };
2628
- };
2629
- export type SyncEventSessionNextInterruptRequested = {
2630
- type: "sync";
2631
- id: string;
2632
- syncEvent: {
2633
- type: "session.next.interrupt.requested.1";
2634
- id: string;
2635
- seq: number;
2636
- aggregateID: string;
2637
- data: {
2638
- timestamp: number;
2639
- sessionID: string;
2640
- };
2641
- };
2642
- };
2643
2612
  export type SyncEventSessionNextContextUpdated = {
2644
2613
  type: "sync";
2645
2614
  id: string;
@@ -3020,7 +2989,7 @@ export type SyncEventSessionNextCompactionEnded = {
3020
2989
  type: "sync";
3021
2990
  id: string;
3022
2991
  syncEvent: {
3023
- type: "session.next.compaction.ended.2";
2992
+ type: "session.next.compaction.ended.1";
3024
2993
  id: string;
3025
2994
  seq: number;
3026
2995
  aggregateID: string;
@@ -3367,19 +3336,6 @@ export type ModelV2Info = {
3367
3336
  body: {
3368
3337
  [key: string]: unknown;
3369
3338
  };
3370
- generation?: {
3371
- maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3372
- temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3373
- topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3374
- topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3375
- frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3376
- presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3377
- seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3378
- stop?: Array<string>;
3379
- };
3380
- options?: {
3381
- [key: string]: unknown;
3382
- };
3383
3339
  variant?: string;
3384
3340
  };
3385
3341
  variants: Array<{
@@ -3390,22 +3346,9 @@ export type ModelV2Info = {
3390
3346
  body: {
3391
3347
  [key: string]: unknown;
3392
3348
  };
3393
- generation?: {
3394
- maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3395
- temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3396
- topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3397
- topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3398
- frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3399
- presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3400
- seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3401
- stop?: Array<string>;
3402
- };
3403
- options?: {
3404
- [key: string]: unknown;
3405
- };
3406
3349
  }>;
3407
3350
  time: {
3408
- released: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3351
+ released: number;
3409
3352
  };
3410
3353
  cost: Array<{
3411
3354
  tier?: {
@@ -3429,6 +3372,7 @@ export type ModelV2Info = {
3429
3372
  };
3430
3373
  export type ProviderV2Info = {
3431
3374
  id: string;
3375
+ integrationID?: string;
3432
3376
  name: string;
3433
3377
  disabled?: boolean;
3434
3378
  api: {
@@ -3491,72 +3435,1693 @@ export type IntegrationEnvMethod = {
3491
3435
  type: "env";
3492
3436
  names: Array<string>;
3493
3437
  };
3494
- export type ConnectionCredentialInfo = {
3495
- type: "credential";
3438
+ export type ConnectionCredentialInfo = {
3439
+ type: "credential";
3440
+ id: string;
3441
+ label: string;
3442
+ };
3443
+ export type ConnectionEnvInfo = {
3444
+ type: "env";
3445
+ name: string;
3446
+ };
3447
+ export type ConnectionInfo = ConnectionCredentialInfo | ConnectionEnvInfo;
3448
+ export type IntegrationInfo = {
3449
+ id: string;
3450
+ name: string;
3451
+ methods: Array<IntegrationMethod>;
3452
+ connections: Array<ConnectionInfo>;
3453
+ };
3454
+ export type IntegrationAttempt = {
3455
+ attemptID: string;
3456
+ url: string;
3457
+ instructions: string;
3458
+ mode: "auto" | "code";
3459
+ time: {
3460
+ created: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3461
+ expires: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3462
+ };
3463
+ };
3464
+ export type PermissionV2Request = {
3465
+ id: string;
3466
+ sessionID: string;
3467
+ action: string;
3468
+ resources: Array<string>;
3469
+ save?: Array<string>;
3470
+ metadata?: {
3471
+ [key: string]: unknown;
3472
+ };
3473
+ source?: PermissionV2Source;
3474
+ };
3475
+ export type PermissionSavedInfo = {
3476
+ id: string;
3477
+ projectID: string;
3478
+ action: string;
3479
+ resource: string;
3480
+ };
3481
+ export type FileSystemEntry = {
3482
+ path: string;
3483
+ type: "file" | "directory";
3484
+ };
3485
+ export type CommandV2Info = {
3486
+ name: string;
3487
+ template: string;
3488
+ description?: string;
3489
+ agent?: string;
3490
+ model?: {
3491
+ id: string;
3492
+ providerID: string;
3493
+ variant?: string;
3494
+ };
3495
+ subtask?: boolean;
3496
+ };
3497
+ export type SkillV2Info = {
3498
+ name: string;
3499
+ description?: string;
3500
+ slash?: boolean;
3501
+ location: string;
3502
+ content: string;
3503
+ };
3504
+ export type V2EventModelsDevRefreshed = {
3505
+ id: string;
3506
+ metadata?: {
3507
+ [key: string]: unknown;
3508
+ };
3509
+ durable?: {
3510
+ aggregateID: string;
3511
+ seq: number;
3512
+ version: number;
3513
+ };
3514
+ location?: LocationRef;
3515
+ type: "models-dev.refreshed";
3516
+ data: {
3517
+ [key: string]: unknown;
3518
+ };
3519
+ };
3520
+ export type V2EventIntegrationUpdated = {
3521
+ id: string;
3522
+ metadata?: {
3523
+ [key: string]: unknown;
3524
+ };
3525
+ durable?: {
3526
+ aggregateID: string;
3527
+ seq: number;
3528
+ version: number;
3529
+ };
3530
+ location?: LocationRef;
3531
+ type: "integration.updated";
3532
+ data: {
3533
+ [key: string]: unknown;
3534
+ };
3535
+ };
3536
+ export type V2EventIntegrationConnectionUpdated = {
3537
+ id: string;
3538
+ metadata?: {
3539
+ [key: string]: unknown;
3540
+ };
3541
+ durable?: {
3542
+ aggregateID: string;
3543
+ seq: number;
3544
+ version: number;
3545
+ };
3546
+ location?: LocationRef;
3547
+ type: "integration.connection.updated";
3548
+ data: {
3549
+ integrationID: string;
3550
+ };
3551
+ };
3552
+ export type V2EventCatalogUpdated = {
3553
+ id: string;
3554
+ metadata?: {
3555
+ [key: string]: unknown;
3556
+ };
3557
+ durable?: {
3558
+ aggregateID: string;
3559
+ seq: number;
3560
+ version: number;
3561
+ };
3562
+ location?: LocationRef;
3563
+ type: "catalog.updated";
3564
+ data: {
3565
+ [key: string]: unknown;
3566
+ };
3567
+ };
3568
+ export type V2EventSessionCreated = {
3569
+ id: string;
3570
+ metadata?: {
3571
+ [key: string]: unknown;
3572
+ };
3573
+ durable?: {
3574
+ aggregateID: string;
3575
+ seq: number;
3576
+ version: number;
3577
+ };
3578
+ location?: LocationRef;
3579
+ type: "session.created";
3580
+ data: {
3581
+ sessionID: string;
3582
+ info: Session;
3583
+ };
3584
+ };
3585
+ export type V2EventSessionUpdated = {
3586
+ id: string;
3587
+ metadata?: {
3588
+ [key: string]: unknown;
3589
+ };
3590
+ durable?: {
3591
+ aggregateID: string;
3592
+ seq: number;
3593
+ version: number;
3594
+ };
3595
+ location?: LocationRef;
3596
+ type: "session.updated";
3597
+ data: {
3598
+ sessionID: string;
3599
+ info: Session;
3600
+ };
3601
+ };
3602
+ export type V2EventSessionDeleted = {
3603
+ id: string;
3604
+ metadata?: {
3605
+ [key: string]: unknown;
3606
+ };
3607
+ durable?: {
3608
+ aggregateID: string;
3609
+ seq: number;
3610
+ version: number;
3611
+ };
3612
+ location?: LocationRef;
3613
+ type: "session.deleted";
3614
+ data: {
3615
+ sessionID: string;
3616
+ info: Session;
3617
+ };
3618
+ };
3619
+ export type V2EventMessageUpdated = {
3620
+ id: string;
3621
+ metadata?: {
3622
+ [key: string]: unknown;
3623
+ };
3624
+ durable?: {
3625
+ aggregateID: string;
3626
+ seq: number;
3627
+ version: number;
3628
+ };
3629
+ location?: LocationRef;
3630
+ type: "message.updated";
3631
+ data: {
3632
+ sessionID: string;
3633
+ info: Message;
3634
+ };
3635
+ };
3636
+ export type V2EventMessageRemoved = {
3637
+ id: string;
3638
+ metadata?: {
3639
+ [key: string]: unknown;
3640
+ };
3641
+ durable?: {
3642
+ aggregateID: string;
3643
+ seq: number;
3644
+ version: number;
3645
+ };
3646
+ location?: LocationRef;
3647
+ type: "message.removed";
3648
+ data: {
3649
+ sessionID: string;
3650
+ messageID: string;
3651
+ };
3652
+ };
3653
+ export type V2EventMessagePartUpdated = {
3654
+ id: string;
3655
+ metadata?: {
3656
+ [key: string]: unknown;
3657
+ };
3658
+ durable?: {
3659
+ aggregateID: string;
3660
+ seq: number;
3661
+ version: number;
3662
+ };
3663
+ location?: LocationRef;
3664
+ type: "message.part.updated";
3665
+ data: {
3666
+ sessionID: string;
3667
+ part: Part;
3668
+ time: number;
3669
+ };
3670
+ };
3671
+ export type V2EventMessagePartRemoved = {
3672
+ id: string;
3673
+ metadata?: {
3674
+ [key: string]: unknown;
3675
+ };
3676
+ durable?: {
3677
+ aggregateID: string;
3678
+ seq: number;
3679
+ version: number;
3680
+ };
3681
+ location?: LocationRef;
3682
+ type: "message.part.removed";
3683
+ data: {
3684
+ sessionID: string;
3685
+ messageID: string;
3686
+ partID: string;
3687
+ };
3688
+ };
3689
+ export type V2EventSessionNextAgentSwitched = {
3690
+ id: string;
3691
+ metadata?: {
3692
+ [key: string]: unknown;
3693
+ };
3694
+ durable?: {
3695
+ aggregateID: string;
3696
+ seq: number;
3697
+ version: number;
3698
+ };
3699
+ location?: LocationRef;
3700
+ type: "session.next.agent.switched";
3701
+ data: {
3702
+ timestamp: number;
3703
+ sessionID: string;
3704
+ messageID: string;
3705
+ agent: string;
3706
+ };
3707
+ };
3708
+ export type V2EventSessionNextModelSwitched = {
3709
+ id: string;
3710
+ metadata?: {
3711
+ [key: string]: unknown;
3712
+ };
3713
+ durable?: {
3714
+ aggregateID: string;
3715
+ seq: number;
3716
+ version: number;
3717
+ };
3718
+ location?: LocationRef;
3719
+ type: "session.next.model.switched";
3720
+ data: {
3721
+ timestamp: number;
3722
+ sessionID: string;
3723
+ messageID: string;
3724
+ model: {
3725
+ id: string;
3726
+ providerID: string;
3727
+ variant?: string;
3728
+ };
3729
+ };
3730
+ };
3731
+ export type V2EventSessionNextMoved = {
3732
+ id: string;
3733
+ metadata?: {
3734
+ [key: string]: unknown;
3735
+ };
3736
+ durable?: {
3737
+ aggregateID: string;
3738
+ seq: number;
3739
+ version: number;
3740
+ };
3741
+ location?: LocationRef;
3742
+ type: "session.next.moved";
3743
+ data: {
3744
+ timestamp: number;
3745
+ sessionID: string;
3746
+ location: LocationRef;
3747
+ subdirectory?: string;
3748
+ };
3749
+ };
3750
+ export type V2EventSessionNextPrompted = {
3751
+ id: string;
3752
+ metadata?: {
3753
+ [key: string]: unknown;
3754
+ };
3755
+ durable?: {
3756
+ aggregateID: string;
3757
+ seq: number;
3758
+ version: number;
3759
+ };
3760
+ location?: LocationRef;
3761
+ type: "session.next.prompted";
3762
+ data: {
3763
+ timestamp: number;
3764
+ sessionID: string;
3765
+ messageID: string;
3766
+ prompt: Prompt;
3767
+ delivery: "steer" | "queue";
3768
+ };
3769
+ };
3770
+ export type V2EventSessionNextPromptAdmitted = {
3771
+ id: string;
3772
+ metadata?: {
3773
+ [key: string]: unknown;
3774
+ };
3775
+ durable?: {
3776
+ aggregateID: string;
3777
+ seq: number;
3778
+ version: number;
3779
+ };
3780
+ location?: LocationRef;
3781
+ type: "session.next.prompt.admitted";
3782
+ data: {
3783
+ timestamp: number;
3784
+ sessionID: string;
3785
+ messageID: string;
3786
+ prompt: Prompt;
3787
+ delivery: "steer" | "queue";
3788
+ };
3789
+ };
3790
+ export type V2EventSessionNextContextUpdated = {
3791
+ id: string;
3792
+ metadata?: {
3793
+ [key: string]: unknown;
3794
+ };
3795
+ durable?: {
3796
+ aggregateID: string;
3797
+ seq: number;
3798
+ version: number;
3799
+ };
3800
+ location?: LocationRef;
3801
+ type: "session.next.context.updated";
3802
+ data: {
3803
+ timestamp: number;
3804
+ sessionID: string;
3805
+ messageID: string;
3806
+ text: string;
3807
+ };
3808
+ };
3809
+ export type V2EventSessionNextSynthetic = {
3810
+ id: string;
3811
+ metadata?: {
3812
+ [key: string]: unknown;
3813
+ };
3814
+ durable?: {
3815
+ aggregateID: string;
3816
+ seq: number;
3817
+ version: number;
3818
+ };
3819
+ location?: LocationRef;
3820
+ type: "session.next.synthetic";
3821
+ data: {
3822
+ timestamp: number;
3823
+ sessionID: string;
3824
+ messageID: string;
3825
+ text: string;
3826
+ };
3827
+ };
3828
+ export type V2EventSessionNextShellStarted = {
3829
+ id: string;
3830
+ metadata?: {
3831
+ [key: string]: unknown;
3832
+ };
3833
+ durable?: {
3834
+ aggregateID: string;
3835
+ seq: number;
3836
+ version: number;
3837
+ };
3838
+ location?: LocationRef;
3839
+ type: "session.next.shell.started";
3840
+ data: {
3841
+ timestamp: number;
3842
+ sessionID: string;
3843
+ messageID: string;
3844
+ callID: string;
3845
+ command: string;
3846
+ };
3847
+ };
3848
+ export type V2EventSessionNextShellEnded = {
3849
+ id: string;
3850
+ metadata?: {
3851
+ [key: string]: unknown;
3852
+ };
3853
+ durable?: {
3854
+ aggregateID: string;
3855
+ seq: number;
3856
+ version: number;
3857
+ };
3858
+ location?: LocationRef;
3859
+ type: "session.next.shell.ended";
3860
+ data: {
3861
+ timestamp: number;
3862
+ sessionID: string;
3863
+ callID: string;
3864
+ output: string;
3865
+ };
3866
+ };
3867
+ export type V2EventSessionNextStepStarted = {
3868
+ id: string;
3869
+ metadata?: {
3870
+ [key: string]: unknown;
3871
+ };
3872
+ durable?: {
3873
+ aggregateID: string;
3874
+ seq: number;
3875
+ version: number;
3876
+ };
3877
+ location?: LocationRef;
3878
+ type: "session.next.step.started";
3879
+ data: {
3880
+ timestamp: number;
3881
+ sessionID: string;
3882
+ assistantMessageID: string;
3883
+ agent: string;
3884
+ model: {
3885
+ id: string;
3886
+ providerID: string;
3887
+ variant?: string;
3888
+ };
3889
+ snapshot?: string;
3890
+ };
3891
+ };
3892
+ export type V2EventSessionNextStepEnded = {
3893
+ id: string;
3894
+ metadata?: {
3895
+ [key: string]: unknown;
3896
+ };
3897
+ durable?: {
3898
+ aggregateID: string;
3899
+ seq: number;
3900
+ version: number;
3901
+ };
3902
+ location?: LocationRef;
3903
+ type: "session.next.step.ended";
3904
+ data: {
3905
+ timestamp: number;
3906
+ sessionID: string;
3907
+ assistantMessageID: string;
3908
+ finish: string;
3909
+ cost: number;
3910
+ tokens: {
3911
+ input: number;
3912
+ output: number;
3913
+ reasoning: number;
3914
+ cache: {
3915
+ read: number;
3916
+ write: number;
3917
+ };
3918
+ };
3919
+ snapshot?: string;
3920
+ };
3921
+ };
3922
+ export type V2EventSessionNextStepFailed = {
3923
+ id: string;
3924
+ metadata?: {
3925
+ [key: string]: unknown;
3926
+ };
3927
+ durable?: {
3928
+ aggregateID: string;
3929
+ seq: number;
3930
+ version: number;
3931
+ };
3932
+ location?: LocationRef;
3933
+ type: "session.next.step.failed";
3934
+ data: {
3935
+ timestamp: number;
3936
+ sessionID: string;
3937
+ assistantMessageID: string;
3938
+ error: SessionErrorUnknown;
3939
+ };
3940
+ };
3941
+ export type V2EventSessionNextTextStarted = {
3942
+ id: string;
3943
+ metadata?: {
3944
+ [key: string]: unknown;
3945
+ };
3946
+ durable?: {
3947
+ aggregateID: string;
3948
+ seq: number;
3949
+ version: number;
3950
+ };
3951
+ location?: LocationRef;
3952
+ type: "session.next.text.started";
3953
+ data: {
3954
+ timestamp: number;
3955
+ sessionID: string;
3956
+ assistantMessageID: string;
3957
+ textID: string;
3958
+ };
3959
+ };
3960
+ export type V2EventSessionNextTextDelta = {
3961
+ id: string;
3962
+ metadata?: {
3963
+ [key: string]: unknown;
3964
+ };
3965
+ durable?: {
3966
+ aggregateID: string;
3967
+ seq: number;
3968
+ version: number;
3969
+ };
3970
+ location?: LocationRef;
3971
+ type: "session.next.text.delta";
3972
+ data: {
3973
+ timestamp: number;
3974
+ sessionID: string;
3975
+ assistantMessageID: string;
3976
+ textID: string;
3977
+ delta: string;
3978
+ };
3979
+ };
3980
+ export type V2EventSessionNextTextEnded = {
3981
+ id: string;
3982
+ metadata?: {
3983
+ [key: string]: unknown;
3984
+ };
3985
+ durable?: {
3986
+ aggregateID: string;
3987
+ seq: number;
3988
+ version: number;
3989
+ };
3990
+ location?: LocationRef;
3991
+ type: "session.next.text.ended";
3992
+ data: {
3993
+ timestamp: number;
3994
+ sessionID: string;
3995
+ assistantMessageID: string;
3996
+ textID: string;
3997
+ text: string;
3998
+ };
3999
+ };
4000
+ export type V2EventSessionNextReasoningStarted = {
4001
+ id: string;
4002
+ metadata?: {
4003
+ [key: string]: unknown;
4004
+ };
4005
+ durable?: {
4006
+ aggregateID: string;
4007
+ seq: number;
4008
+ version: number;
4009
+ };
4010
+ location?: LocationRef;
4011
+ type: "session.next.reasoning.started";
4012
+ data: {
4013
+ timestamp: number;
4014
+ sessionID: string;
4015
+ assistantMessageID: string;
4016
+ reasoningID: string;
4017
+ providerMetadata?: {
4018
+ [key: string]: {
4019
+ [key: string]: unknown;
4020
+ };
4021
+ };
4022
+ };
4023
+ };
4024
+ export type V2EventSessionNextReasoningDelta = {
4025
+ id: string;
4026
+ metadata?: {
4027
+ [key: string]: unknown;
4028
+ };
4029
+ durable?: {
4030
+ aggregateID: string;
4031
+ seq: number;
4032
+ version: number;
4033
+ };
4034
+ location?: LocationRef;
4035
+ type: "session.next.reasoning.delta";
4036
+ data: {
4037
+ timestamp: number;
4038
+ sessionID: string;
4039
+ assistantMessageID: string;
4040
+ reasoningID: string;
4041
+ delta: string;
4042
+ };
4043
+ };
4044
+ export type V2EventSessionNextReasoningEnded = {
4045
+ id: string;
4046
+ metadata?: {
4047
+ [key: string]: unknown;
4048
+ };
4049
+ durable?: {
4050
+ aggregateID: string;
4051
+ seq: number;
4052
+ version: number;
4053
+ };
4054
+ location?: LocationRef;
4055
+ type: "session.next.reasoning.ended";
4056
+ data: {
4057
+ timestamp: number;
4058
+ sessionID: string;
4059
+ assistantMessageID: string;
4060
+ reasoningID: string;
4061
+ text: string;
4062
+ providerMetadata?: {
4063
+ [key: string]: {
4064
+ [key: string]: unknown;
4065
+ };
4066
+ };
4067
+ };
4068
+ };
4069
+ export type V2EventSessionNextToolInputStarted = {
4070
+ id: string;
4071
+ metadata?: {
4072
+ [key: string]: unknown;
4073
+ };
4074
+ durable?: {
4075
+ aggregateID: string;
4076
+ seq: number;
4077
+ version: number;
4078
+ };
4079
+ location?: LocationRef;
4080
+ type: "session.next.tool.input.started";
4081
+ data: {
4082
+ timestamp: number;
4083
+ sessionID: string;
4084
+ assistantMessageID: string;
4085
+ callID: string;
4086
+ name: string;
4087
+ };
4088
+ };
4089
+ export type V2EventSessionNextToolInputDelta = {
4090
+ id: string;
4091
+ metadata?: {
4092
+ [key: string]: unknown;
4093
+ };
4094
+ durable?: {
4095
+ aggregateID: string;
4096
+ seq: number;
4097
+ version: number;
4098
+ };
4099
+ location?: LocationRef;
4100
+ type: "session.next.tool.input.delta";
4101
+ data: {
4102
+ timestamp: number;
4103
+ sessionID: string;
4104
+ assistantMessageID: string;
4105
+ callID: string;
4106
+ delta: string;
4107
+ };
4108
+ };
4109
+ export type V2EventSessionNextToolInputEnded = {
4110
+ id: string;
4111
+ metadata?: {
4112
+ [key: string]: unknown;
4113
+ };
4114
+ durable?: {
4115
+ aggregateID: string;
4116
+ seq: number;
4117
+ version: number;
4118
+ };
4119
+ location?: LocationRef;
4120
+ type: "session.next.tool.input.ended";
4121
+ data: {
4122
+ timestamp: number;
4123
+ sessionID: string;
4124
+ assistantMessageID: string;
4125
+ callID: string;
4126
+ text: string;
4127
+ };
4128
+ };
4129
+ export type V2EventSessionNextToolCalled = {
4130
+ id: string;
4131
+ metadata?: {
4132
+ [key: string]: unknown;
4133
+ };
4134
+ durable?: {
4135
+ aggregateID: string;
4136
+ seq: number;
4137
+ version: number;
4138
+ };
4139
+ location?: LocationRef;
4140
+ type: "session.next.tool.called";
4141
+ data: {
4142
+ timestamp: number;
4143
+ sessionID: string;
4144
+ assistantMessageID: string;
4145
+ callID: string;
4146
+ tool: string;
4147
+ input: {
4148
+ [key: string]: unknown;
4149
+ };
4150
+ provider: {
4151
+ executed: boolean;
4152
+ metadata?: {
4153
+ [key: string]: {
4154
+ [key: string]: unknown;
4155
+ };
4156
+ };
4157
+ };
4158
+ };
4159
+ };
4160
+ export type V2EventSessionNextToolProgress = {
4161
+ id: string;
4162
+ metadata?: {
4163
+ [key: string]: unknown;
4164
+ };
4165
+ durable?: {
4166
+ aggregateID: string;
4167
+ seq: number;
4168
+ version: number;
4169
+ };
4170
+ location?: LocationRef;
4171
+ type: "session.next.tool.progress";
4172
+ data: {
4173
+ timestamp: number;
4174
+ sessionID: string;
4175
+ assistantMessageID: string;
4176
+ callID: string;
4177
+ structured: {
4178
+ [key: string]: unknown;
4179
+ };
4180
+ content: Array<ToolTextContent | ToolFileContent>;
4181
+ };
4182
+ };
4183
+ export type V2EventSessionNextToolSuccess = {
4184
+ id: string;
4185
+ metadata?: {
4186
+ [key: string]: unknown;
4187
+ };
4188
+ durable?: {
4189
+ aggregateID: string;
4190
+ seq: number;
4191
+ version: number;
4192
+ };
4193
+ location?: LocationRef;
4194
+ type: "session.next.tool.success";
4195
+ data: {
4196
+ timestamp: number;
4197
+ sessionID: string;
4198
+ assistantMessageID: string;
4199
+ callID: string;
4200
+ structured: {
4201
+ [key: string]: unknown;
4202
+ };
4203
+ content: Array<ToolTextContent | ToolFileContent>;
4204
+ outputPaths?: Array<string>;
4205
+ result?: unknown;
4206
+ provider: {
4207
+ executed: boolean;
4208
+ metadata?: {
4209
+ [key: string]: {
4210
+ [key: string]: unknown;
4211
+ };
4212
+ };
4213
+ };
4214
+ };
4215
+ };
4216
+ export type V2EventSessionNextToolFailed = {
4217
+ id: string;
4218
+ metadata?: {
4219
+ [key: string]: unknown;
4220
+ };
4221
+ durable?: {
4222
+ aggregateID: string;
4223
+ seq: number;
4224
+ version: number;
4225
+ };
4226
+ location?: LocationRef;
4227
+ type: "session.next.tool.failed";
4228
+ data: {
4229
+ timestamp: number;
4230
+ sessionID: string;
4231
+ assistantMessageID: string;
4232
+ callID: string;
4233
+ error: SessionErrorUnknown;
4234
+ result?: unknown;
4235
+ provider: {
4236
+ executed: boolean;
4237
+ metadata?: {
4238
+ [key: string]: {
4239
+ [key: string]: unknown;
4240
+ };
4241
+ };
4242
+ };
4243
+ };
4244
+ };
4245
+ export type V2EventSessionNextRetried = {
4246
+ id: string;
4247
+ metadata?: {
4248
+ [key: string]: unknown;
4249
+ };
4250
+ durable?: {
4251
+ aggregateID: string;
4252
+ seq: number;
4253
+ version: number;
4254
+ };
4255
+ location?: LocationRef;
4256
+ type: "session.next.retried";
4257
+ data: {
4258
+ timestamp: number;
4259
+ sessionID: string;
4260
+ attempt: number;
4261
+ error: SessionNextRetryError;
4262
+ };
4263
+ };
4264
+ export type V2EventSessionNextCompactionStarted = {
4265
+ id: string;
4266
+ metadata?: {
4267
+ [key: string]: unknown;
4268
+ };
4269
+ durable?: {
4270
+ aggregateID: string;
4271
+ seq: number;
4272
+ version: number;
4273
+ };
4274
+ location?: LocationRef;
4275
+ type: "session.next.compaction.started";
4276
+ data: {
4277
+ timestamp: number;
4278
+ sessionID: string;
4279
+ messageID: string;
4280
+ reason: "auto" | "manual";
4281
+ };
4282
+ };
4283
+ export type V2EventSessionNextCompactionDelta = {
4284
+ id: string;
4285
+ metadata?: {
4286
+ [key: string]: unknown;
4287
+ };
4288
+ durable?: {
4289
+ aggregateID: string;
4290
+ seq: number;
4291
+ version: number;
4292
+ };
4293
+ location?: LocationRef;
4294
+ type: "session.next.compaction.delta";
4295
+ data: {
4296
+ timestamp: number;
4297
+ sessionID: string;
4298
+ messageID: string;
4299
+ text: string;
4300
+ };
4301
+ };
4302
+ export type V2EventSessionNextCompactionEnded = {
4303
+ id: string;
4304
+ metadata?: {
4305
+ [key: string]: unknown;
4306
+ };
4307
+ durable?: {
4308
+ aggregateID: string;
4309
+ seq: number;
4310
+ version: number;
4311
+ };
4312
+ location?: LocationRef;
4313
+ type: "session.next.compaction.ended";
4314
+ data: {
4315
+ timestamp: number;
4316
+ sessionID: string;
4317
+ messageID: string;
4318
+ reason: "auto" | "manual";
4319
+ text: string;
4320
+ recent: string;
4321
+ };
4322
+ };
4323
+ export type V2EventMessagePartDelta = {
4324
+ id: string;
4325
+ metadata?: {
4326
+ [key: string]: unknown;
4327
+ };
4328
+ durable?: {
4329
+ aggregateID: string;
4330
+ seq: number;
4331
+ version: number;
4332
+ };
4333
+ location?: LocationRef;
4334
+ type: "message.part.delta";
4335
+ data: {
4336
+ sessionID: string;
4337
+ messageID: string;
4338
+ partID: string;
4339
+ field: string;
4340
+ delta: string;
4341
+ };
4342
+ };
4343
+ export type V2EventSessionDiff = {
4344
+ id: string;
4345
+ metadata?: {
4346
+ [key: string]: unknown;
4347
+ };
4348
+ durable?: {
4349
+ aggregateID: string;
4350
+ seq: number;
4351
+ version: number;
4352
+ };
4353
+ location?: LocationRef;
4354
+ type: "session.diff";
4355
+ data: {
4356
+ sessionID: string;
4357
+ diff: Array<SnapshotFileDiff>;
4358
+ };
4359
+ };
4360
+ export type V2EventSessionError = {
4361
+ id: string;
4362
+ metadata?: {
4363
+ [key: string]: unknown;
4364
+ };
4365
+ durable?: {
4366
+ aggregateID: string;
4367
+ seq: number;
4368
+ version: number;
4369
+ };
4370
+ location?: LocationRef;
4371
+ type: "session.error";
4372
+ data: {
4373
+ sessionID?: string;
4374
+ error?: ProviderAuthError | UnknownError | MessageOutputLengthError | MessageAbortedError | StructuredOutputError | ContextOverflowError | ContentFilterError | ApiError;
4375
+ };
4376
+ };
4377
+ export type V2EventInstallationUpdated = {
4378
+ id: string;
4379
+ metadata?: {
4380
+ [key: string]: unknown;
4381
+ };
4382
+ durable?: {
4383
+ aggregateID: string;
4384
+ seq: number;
4385
+ version: number;
4386
+ };
4387
+ location?: LocationRef;
4388
+ type: "installation.updated";
4389
+ data: {
4390
+ version: string;
4391
+ };
4392
+ };
4393
+ export type V2EventInstallationUpdateAvailable = {
4394
+ id: string;
4395
+ metadata?: {
4396
+ [key: string]: unknown;
4397
+ };
4398
+ durable?: {
4399
+ aggregateID: string;
4400
+ seq: number;
4401
+ version: number;
4402
+ };
4403
+ location?: LocationRef;
4404
+ type: "installation.update-available";
4405
+ data: {
4406
+ version: string;
4407
+ };
4408
+ };
4409
+ export type V2EventFileEdited = {
4410
+ id: string;
4411
+ metadata?: {
4412
+ [key: string]: unknown;
4413
+ };
4414
+ durable?: {
4415
+ aggregateID: string;
4416
+ seq: number;
4417
+ version: number;
4418
+ };
4419
+ location?: LocationRef;
4420
+ type: "file.edited";
4421
+ data: {
4422
+ file: string;
4423
+ };
4424
+ };
4425
+ export type V2EventReferenceUpdated = {
4426
+ id: string;
4427
+ metadata?: {
4428
+ [key: string]: unknown;
4429
+ };
4430
+ durable?: {
4431
+ aggregateID: string;
4432
+ seq: number;
4433
+ version: number;
4434
+ };
4435
+ location?: LocationRef;
4436
+ type: "reference.updated";
4437
+ data: {
4438
+ [key: string]: unknown;
4439
+ };
4440
+ };
4441
+ export type V2EventPermissionV2Asked = {
4442
+ id: string;
4443
+ metadata?: {
4444
+ [key: string]: unknown;
4445
+ };
4446
+ durable?: {
4447
+ aggregateID: string;
4448
+ seq: number;
4449
+ version: number;
4450
+ };
4451
+ location?: LocationRef;
4452
+ type: "permission.v2.asked";
4453
+ data: {
4454
+ id: string;
4455
+ sessionID: string;
4456
+ action: string;
4457
+ resources: Array<string>;
4458
+ save?: Array<string>;
4459
+ metadata?: {
4460
+ [key: string]: unknown;
4461
+ };
4462
+ source?: PermissionV2Source;
4463
+ };
4464
+ };
4465
+ export type V2EventPermissionV2Replied = {
4466
+ id: string;
4467
+ metadata?: {
4468
+ [key: string]: unknown;
4469
+ };
4470
+ durable?: {
4471
+ aggregateID: string;
4472
+ seq: number;
4473
+ version: number;
4474
+ };
4475
+ location?: LocationRef;
4476
+ type: "permission.v2.replied";
4477
+ data: {
4478
+ sessionID: string;
4479
+ requestID: string;
4480
+ reply: PermissionV2Reply;
4481
+ };
4482
+ };
4483
+ export type V2EventPluginAdded = {
4484
+ id: string;
4485
+ metadata?: {
4486
+ [key: string]: unknown;
4487
+ };
4488
+ durable?: {
4489
+ aggregateID: string;
4490
+ seq: number;
4491
+ version: number;
4492
+ };
4493
+ location?: LocationRef;
4494
+ type: "plugin.added";
4495
+ data: {
4496
+ id: string;
4497
+ };
4498
+ };
4499
+ export type V2EventProjectDirectoriesUpdated = {
4500
+ id: string;
4501
+ metadata?: {
4502
+ [key: string]: unknown;
4503
+ };
4504
+ durable?: {
4505
+ aggregateID: string;
4506
+ seq: number;
4507
+ version: number;
4508
+ };
4509
+ location?: LocationRef;
4510
+ type: "project.directories.updated";
4511
+ data: {
4512
+ projectID: string;
4513
+ };
4514
+ };
4515
+ export type V2EventFileWatcherUpdated = {
4516
+ id: string;
4517
+ metadata?: {
4518
+ [key: string]: unknown;
4519
+ };
4520
+ durable?: {
4521
+ aggregateID: string;
4522
+ seq: number;
4523
+ version: number;
4524
+ };
4525
+ location?: LocationRef;
4526
+ type: "file.watcher.updated";
4527
+ data: {
4528
+ file: string;
4529
+ event: "add" | "change" | "unlink";
4530
+ };
4531
+ };
4532
+ export type V2EventPtyCreated = {
4533
+ id: string;
4534
+ metadata?: {
4535
+ [key: string]: unknown;
4536
+ };
4537
+ durable?: {
4538
+ aggregateID: string;
4539
+ seq: number;
4540
+ version: number;
4541
+ };
4542
+ location?: LocationRef;
4543
+ type: "pty.created";
4544
+ data: {
4545
+ info: Pty;
4546
+ };
4547
+ };
4548
+ export type V2EventPtyUpdated = {
4549
+ id: string;
4550
+ metadata?: {
4551
+ [key: string]: unknown;
4552
+ };
4553
+ durable?: {
4554
+ aggregateID: string;
4555
+ seq: number;
4556
+ version: number;
4557
+ };
4558
+ location?: LocationRef;
4559
+ type: "pty.updated";
4560
+ data: {
4561
+ info: Pty;
4562
+ };
4563
+ };
4564
+ export type V2EventPtyExited = {
4565
+ id: string;
4566
+ metadata?: {
4567
+ [key: string]: unknown;
4568
+ };
4569
+ durable?: {
4570
+ aggregateID: string;
4571
+ seq: number;
4572
+ version: number;
4573
+ };
4574
+ location?: LocationRef;
4575
+ type: "pty.exited";
4576
+ data: {
4577
+ id: string;
4578
+ exitCode: number;
4579
+ };
4580
+ };
4581
+ export type V2EventPtyDeleted = {
4582
+ id: string;
4583
+ metadata?: {
4584
+ [key: string]: unknown;
4585
+ };
4586
+ durable?: {
4587
+ aggregateID: string;
4588
+ seq: number;
4589
+ version: number;
4590
+ };
4591
+ location?: LocationRef;
4592
+ type: "pty.deleted";
4593
+ data: {
4594
+ id: string;
4595
+ };
4596
+ };
4597
+ export type V2EventQuestionV2Asked = {
4598
+ id: string;
4599
+ metadata?: {
4600
+ [key: string]: unknown;
4601
+ };
4602
+ durable?: {
4603
+ aggregateID: string;
4604
+ seq: number;
4605
+ version: number;
4606
+ };
4607
+ location?: LocationRef;
4608
+ type: "question.v2.asked";
4609
+ data: {
4610
+ id: string;
4611
+ sessionID: string;
4612
+ /**
4613
+ * Questions to ask
4614
+ */
4615
+ questions: Array<QuestionV2Info>;
4616
+ tool?: QuestionV2Tool;
4617
+ };
4618
+ };
4619
+ export type V2EventQuestionV2Replied = {
4620
+ id: string;
4621
+ metadata?: {
4622
+ [key: string]: unknown;
4623
+ };
4624
+ durable?: {
4625
+ aggregateID: string;
4626
+ seq: number;
4627
+ version: number;
4628
+ };
4629
+ location?: LocationRef;
4630
+ type: "question.v2.replied";
4631
+ data: {
4632
+ sessionID: string;
4633
+ requestID: string;
4634
+ answers: Array<QuestionV2Answer>;
4635
+ };
4636
+ };
4637
+ export type V2EventQuestionV2Rejected = {
4638
+ id: string;
4639
+ metadata?: {
4640
+ [key: string]: unknown;
4641
+ };
4642
+ durable?: {
4643
+ aggregateID: string;
4644
+ seq: number;
4645
+ version: number;
4646
+ };
4647
+ location?: LocationRef;
4648
+ type: "question.v2.rejected";
4649
+ data: {
4650
+ sessionID: string;
4651
+ requestID: string;
4652
+ };
4653
+ };
4654
+ export type V2EventTodoUpdated = {
4655
+ id: string;
4656
+ metadata?: {
4657
+ [key: string]: unknown;
4658
+ };
4659
+ durable?: {
4660
+ aggregateID: string;
4661
+ seq: number;
4662
+ version: number;
4663
+ };
4664
+ location?: LocationRef;
4665
+ type: "todo.updated";
4666
+ data: {
4667
+ sessionID: string;
4668
+ todos: Array<Todo>;
4669
+ };
4670
+ };
4671
+ export type V2EventLspUpdated = {
4672
+ id: string;
4673
+ metadata?: {
4674
+ [key: string]: unknown;
4675
+ };
4676
+ durable?: {
4677
+ aggregateID: string;
4678
+ seq: number;
4679
+ version: number;
4680
+ };
4681
+ location?: LocationRef;
4682
+ type: "lsp.updated";
4683
+ data: {
4684
+ [key: string]: unknown;
4685
+ };
4686
+ };
4687
+ export type V2EventPermissionAsked = {
4688
+ id: string;
4689
+ metadata?: {
4690
+ [key: string]: unknown;
4691
+ };
4692
+ durable?: {
4693
+ aggregateID: string;
4694
+ seq: number;
4695
+ version: number;
4696
+ };
4697
+ location?: LocationRef;
4698
+ type: "permission.asked";
4699
+ data: {
4700
+ id: string;
4701
+ sessionID: string;
4702
+ permission: string;
4703
+ patterns: Array<string>;
4704
+ metadata: {
4705
+ [key: string]: unknown;
4706
+ };
4707
+ always: Array<string>;
4708
+ tool?: {
4709
+ messageID: string;
4710
+ callID: string;
4711
+ };
4712
+ };
4713
+ };
4714
+ export type V2EventPermissionReplied = {
4715
+ id: string;
4716
+ metadata?: {
4717
+ [key: string]: unknown;
4718
+ };
4719
+ durable?: {
4720
+ aggregateID: string;
4721
+ seq: number;
4722
+ version: number;
4723
+ };
4724
+ location?: LocationRef;
4725
+ type: "permission.replied";
4726
+ data: {
4727
+ sessionID: string;
4728
+ requestID: string;
4729
+ reply: "once" | "always" | "reject";
4730
+ };
4731
+ };
4732
+ export type V2EventTuiPromptAppend = {
4733
+ id: string;
4734
+ metadata?: {
4735
+ [key: string]: unknown;
4736
+ };
4737
+ durable?: {
4738
+ aggregateID: string;
4739
+ seq: number;
4740
+ version: number;
4741
+ };
4742
+ location?: LocationRef;
4743
+ type: "tui.prompt.append";
4744
+ data: {
4745
+ text: string;
4746
+ };
4747
+ };
4748
+ export type V2EventTuiCommandExecute = {
4749
+ id: string;
4750
+ metadata?: {
4751
+ [key: string]: unknown;
4752
+ };
4753
+ durable?: {
4754
+ aggregateID: string;
4755
+ seq: number;
4756
+ version: number;
4757
+ };
4758
+ location?: LocationRef;
4759
+ type: "tui.command.execute";
4760
+ data: {
4761
+ command: "session.list" | "session.new" | "session.share" | "session.interrupt" | "session.compact" | "session.page.up" | "session.page.down" | "session.line.up" | "session.line.down" | "session.half.page.up" | "session.half.page.down" | "session.first" | "session.last" | "prompt.clear" | "prompt.submit" | "agent.cycle" | string;
4762
+ };
4763
+ };
4764
+ export type V2EventTuiToastShow = {
4765
+ id: string;
4766
+ metadata?: {
4767
+ [key: string]: unknown;
4768
+ };
4769
+ durable?: {
4770
+ aggregateID: string;
4771
+ seq: number;
4772
+ version: number;
4773
+ };
4774
+ location?: LocationRef;
4775
+ type: "tui.toast.show";
4776
+ data: {
4777
+ title?: string;
4778
+ message: string;
4779
+ variant: "info" | "success" | "warning" | "error";
4780
+ duration?: number;
4781
+ };
4782
+ };
4783
+ export type V2EventTuiSessionSelect = {
4784
+ id: string;
4785
+ metadata?: {
4786
+ [key: string]: unknown;
4787
+ };
4788
+ durable?: {
4789
+ aggregateID: string;
4790
+ seq: number;
4791
+ version: number;
4792
+ };
4793
+ location?: LocationRef;
4794
+ type: "tui.session.select";
4795
+ data: {
4796
+ /**
4797
+ * Session ID to navigate to
4798
+ */
4799
+ sessionID: string;
4800
+ };
4801
+ };
4802
+ export type V2EventMcpToolsChanged = {
4803
+ id: string;
4804
+ metadata?: {
4805
+ [key: string]: unknown;
4806
+ };
4807
+ durable?: {
4808
+ aggregateID: string;
4809
+ seq: number;
4810
+ version: number;
4811
+ };
4812
+ location?: LocationRef;
4813
+ type: "mcp.tools.changed";
4814
+ data: {
4815
+ server: string;
4816
+ };
4817
+ };
4818
+ export type V2EventMcpBrowserOpenFailed = {
4819
+ id: string;
4820
+ metadata?: {
4821
+ [key: string]: unknown;
4822
+ };
4823
+ durable?: {
4824
+ aggregateID: string;
4825
+ seq: number;
4826
+ version: number;
4827
+ };
4828
+ location?: LocationRef;
4829
+ type: "mcp.browser.open.failed";
4830
+ data: {
4831
+ mcpName: string;
4832
+ url: string;
4833
+ };
4834
+ };
4835
+ export type V2EventCommandExecuted = {
4836
+ id: string;
4837
+ metadata?: {
4838
+ [key: string]: unknown;
4839
+ };
4840
+ durable?: {
4841
+ aggregateID: string;
4842
+ seq: number;
4843
+ version: number;
4844
+ };
4845
+ location?: LocationRef;
4846
+ type: "command.executed";
4847
+ data: {
4848
+ name: string;
4849
+ sessionID: string;
4850
+ arguments: string;
4851
+ messageID: string;
4852
+ };
4853
+ };
4854
+ export type V2EventProjectUpdated = {
4855
+ id: string;
4856
+ metadata?: {
4857
+ [key: string]: unknown;
4858
+ };
4859
+ durable?: {
4860
+ aggregateID: string;
4861
+ seq: number;
4862
+ version: number;
4863
+ };
4864
+ location?: LocationRef;
4865
+ type: "project.updated";
4866
+ data: {
4867
+ id: string;
4868
+ worktree: string;
4869
+ vcs?: "git";
4870
+ name?: string;
4871
+ icon?: {
4872
+ url?: string;
4873
+ override?: string;
4874
+ color?: string;
4875
+ };
4876
+ commands?: {
4877
+ /**
4878
+ * Startup script to run when creating a new workspace (worktree)
4879
+ */
4880
+ start?: string;
4881
+ };
4882
+ time: {
4883
+ created: number;
4884
+ updated: number;
4885
+ initialized?: number;
4886
+ };
4887
+ sandboxes: Array<string>;
4888
+ };
4889
+ };
4890
+ export type V2EventSessionStatus = {
4891
+ id: string;
4892
+ metadata?: {
4893
+ [key: string]: unknown;
4894
+ };
4895
+ durable?: {
4896
+ aggregateID: string;
4897
+ seq: number;
4898
+ version: number;
4899
+ };
4900
+ location?: LocationRef;
4901
+ type: "session.status";
4902
+ data: {
4903
+ sessionID: string;
4904
+ status: SessionStatus;
4905
+ };
4906
+ };
4907
+ export type V2EventSessionIdle = {
4908
+ id: string;
4909
+ metadata?: {
4910
+ [key: string]: unknown;
4911
+ };
4912
+ durable?: {
4913
+ aggregateID: string;
4914
+ seq: number;
4915
+ version: number;
4916
+ };
4917
+ location?: LocationRef;
4918
+ type: "session.idle";
4919
+ data: {
4920
+ sessionID: string;
4921
+ };
4922
+ };
4923
+ export type V2EventQuestionAsked = {
4924
+ id: string;
4925
+ metadata?: {
4926
+ [key: string]: unknown;
4927
+ };
4928
+ durable?: {
4929
+ aggregateID: string;
4930
+ seq: number;
4931
+ version: number;
4932
+ };
4933
+ location?: LocationRef;
4934
+ type: "question.asked";
4935
+ data: {
4936
+ id: string;
4937
+ sessionID: string;
4938
+ /**
4939
+ * Questions to ask
4940
+ */
4941
+ questions: Array<QuestionInfo>;
4942
+ tool?: QuestionTool;
4943
+ };
4944
+ };
4945
+ export type V2EventQuestionReplied = {
4946
+ id: string;
4947
+ metadata?: {
4948
+ [key: string]: unknown;
4949
+ };
4950
+ durable?: {
4951
+ aggregateID: string;
4952
+ seq: number;
4953
+ version: number;
4954
+ };
4955
+ location?: LocationRef;
4956
+ type: "question.replied";
4957
+ data: {
4958
+ sessionID: string;
4959
+ requestID: string;
4960
+ answers: Array<QuestionAnswer>;
4961
+ };
4962
+ };
4963
+ export type V2EventQuestionRejected = {
4964
+ id: string;
4965
+ metadata?: {
4966
+ [key: string]: unknown;
4967
+ };
4968
+ durable?: {
4969
+ aggregateID: string;
4970
+ seq: number;
4971
+ version: number;
4972
+ };
4973
+ location?: LocationRef;
4974
+ type: "question.rejected";
4975
+ data: {
4976
+ sessionID: string;
4977
+ requestID: string;
4978
+ };
4979
+ };
4980
+ export type V2EventSessionCompacted = {
4981
+ id: string;
4982
+ metadata?: {
4983
+ [key: string]: unknown;
4984
+ };
4985
+ durable?: {
4986
+ aggregateID: string;
4987
+ seq: number;
4988
+ version: number;
4989
+ };
4990
+ location?: LocationRef;
4991
+ type: "session.compacted";
4992
+ data: {
4993
+ sessionID: string;
4994
+ };
4995
+ };
4996
+ export type V2EventVcsBranchUpdated = {
3496
4997
  id: string;
3497
- label: string;
3498
- };
3499
- export type ConnectionEnvInfo = {
3500
- type: "env";
3501
- name: string;
4998
+ metadata?: {
4999
+ [key: string]: unknown;
5000
+ };
5001
+ durable?: {
5002
+ aggregateID: string;
5003
+ seq: number;
5004
+ version: number;
5005
+ };
5006
+ location?: LocationRef;
5007
+ type: "vcs.branch.updated";
5008
+ data: {
5009
+ branch?: string;
5010
+ };
3502
5011
  };
3503
- export type ConnectionInfo = ConnectionCredentialInfo | ConnectionEnvInfo;
3504
- export type IntegrationInfo = {
5012
+ export type V2EventWorkspaceReady = {
3505
5013
  id: string;
3506
- name: string;
3507
- methods: Array<IntegrationOAuthMethod | IntegrationKeyMethod | IntegrationEnvMethod>;
3508
- connections: Array<ConnectionInfo>;
5014
+ metadata?: {
5015
+ [key: string]: unknown;
5016
+ };
5017
+ durable?: {
5018
+ aggregateID: string;
5019
+ seq: number;
5020
+ version: number;
5021
+ };
5022
+ location?: LocationRef;
5023
+ type: "workspace.ready";
5024
+ data: {
5025
+ name: string;
5026
+ };
3509
5027
  };
3510
- export type IntegrationAttempt = {
3511
- attemptID: string;
3512
- url: string;
3513
- instructions: string;
3514
- mode: "auto" | "code";
3515
- time: {
3516
- created: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
3517
- expires: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
5028
+ export type V2EventWorkspaceFailed = {
5029
+ id: string;
5030
+ metadata?: {
5031
+ [key: string]: unknown;
5032
+ };
5033
+ durable?: {
5034
+ aggregateID: string;
5035
+ seq: number;
5036
+ version: number;
5037
+ };
5038
+ location?: LocationRef;
5039
+ type: "workspace.failed";
5040
+ data: {
5041
+ message: string;
3518
5042
  };
3519
5043
  };
3520
- export type PermissionV2Request = {
5044
+ export type V2EventWorkspaceStatus = {
3521
5045
  id: string;
3522
- sessionID: string;
3523
- action: string;
3524
- resources: Array<string>;
3525
- save?: Array<string>;
3526
5046
  metadata?: {
3527
5047
  [key: string]: unknown;
3528
5048
  };
3529
- source?: PermissionV2Source;
5049
+ durable?: {
5050
+ aggregateID: string;
5051
+ seq: number;
5052
+ version: number;
5053
+ };
5054
+ location?: LocationRef;
5055
+ type: "workspace.status";
5056
+ data: {
5057
+ workspaceID: string;
5058
+ status: "connected" | "connecting" | "disconnected" | "error";
5059
+ };
3530
5060
  };
3531
- export type PermissionSavedInfo = {
5061
+ export type V2EventWorktreeReady = {
3532
5062
  id: string;
3533
- projectID: string;
3534
- action: string;
3535
- resource: string;
5063
+ metadata?: {
5064
+ [key: string]: unknown;
5065
+ };
5066
+ durable?: {
5067
+ aggregateID: string;
5068
+ seq: number;
5069
+ version: number;
5070
+ };
5071
+ location?: LocationRef;
5072
+ type: "worktree.ready";
5073
+ data: {
5074
+ name: string;
5075
+ branch?: string;
5076
+ };
3536
5077
  };
3537
- export type FileSystemEntry = {
3538
- path: string;
3539
- type: "file" | "directory";
3540
- mime: string;
5078
+ export type V2EventWorktreeFailed = {
5079
+ id: string;
5080
+ metadata?: {
5081
+ [key: string]: unknown;
5082
+ };
5083
+ durable?: {
5084
+ aggregateID: string;
5085
+ seq: number;
5086
+ version: number;
5087
+ };
5088
+ location?: LocationRef;
5089
+ type: "worktree.failed";
5090
+ data: {
5091
+ message: string;
5092
+ };
3541
5093
  };
3542
- export type CommandV2Info = {
3543
- name: string;
3544
- template: string;
3545
- description?: string;
3546
- agent?: string;
3547
- model?: {
3548
- id: string;
3549
- providerID: string;
3550
- variant?: string;
5094
+ export type V2EventServerConnected = {
5095
+ id: string;
5096
+ metadata?: {
5097
+ [key: string]: unknown;
5098
+ };
5099
+ durable?: {
5100
+ aggregateID: string;
5101
+ seq: number;
5102
+ version: number;
5103
+ };
5104
+ location?: LocationRef;
5105
+ type: "server.connected";
5106
+ data: {
5107
+ [key: string]: unknown;
3551
5108
  };
3552
- subtask?: boolean;
3553
5109
  };
3554
- export type SkillV2Info = {
3555
- name: string;
3556
- description?: string;
3557
- slash?: boolean;
3558
- location: string;
3559
- content: string;
5110
+ export type V2EventGlobalDisposed = {
5111
+ id: string;
5112
+ metadata?: {
5113
+ [key: string]: unknown;
5114
+ };
5115
+ durable?: {
5116
+ aggregateID: string;
5117
+ seq: number;
5118
+ version: number;
5119
+ };
5120
+ location?: LocationRef;
5121
+ type: "global.disposed";
5122
+ data: {
5123
+ [key: string]: unknown;
5124
+ };
3560
5125
  };
3561
5126
  export type QuestionV2Request = {
3562
5127
  id: string;
@@ -3603,18 +5168,18 @@ export type EventModelsDevRefreshed = {
3603
5168
  [key: string]: unknown;
3604
5169
  };
3605
5170
  };
3606
- export type EventPluginAdded = {
5171
+ export type EventIntegrationUpdated = {
3607
5172
  id: string;
3608
- type: "plugin.added";
5173
+ type: "integration.updated";
3609
5174
  properties: {
3610
- id: string;
5175
+ [key: string]: unknown;
3611
5176
  };
3612
5177
  };
3613
- export type EventIntegrationUpdated = {
5178
+ export type EventIntegrationConnectionUpdated = {
3614
5179
  id: string;
3615
- type: "integration.updated";
5180
+ type: "integration.connection.updated";
3616
5181
  properties: {
3617
- [key: string]: unknown;
5182
+ integrationID: string;
3618
5183
  };
3619
5184
  };
3620
5185
  export type EventCatalogUpdated = {
@@ -3738,25 +5303,6 @@ export type EventSessionNextPromptAdmitted = {
3738
5303
  delivery: "steer" | "queue";
3739
5304
  };
3740
5305
  };
3741
- export type EventSessionNextPromptPromoted = {
3742
- id: string;
3743
- type: "session.next.prompt.promoted";
3744
- properties: {
3745
- timestamp: number;
3746
- sessionID: string;
3747
- messageID: string;
3748
- prompt: Prompt;
3749
- timeCreated: number;
3750
- };
3751
- };
3752
- export type EventSessionNextInterruptRequested = {
3753
- id: string;
3754
- type: "session.next.interrupt.requested";
3755
- properties: {
3756
- timestamp: number;
3757
- sessionID: string;
3758
- };
3759
- };
3760
5306
  export type EventSessionNextContextUpdated = {
3761
5307
  id: string;
3762
5308
  type: "session.next.context.updated";
@@ -4122,6 +5668,13 @@ export type EventFileEdited = {
4122
5668
  file: string;
4123
5669
  };
4124
5670
  };
5671
+ export type EventReferenceUpdated = {
5672
+ id: string;
5673
+ type: "reference.updated";
5674
+ properties: {
5675
+ [key: string]: unknown;
5676
+ };
5677
+ };
4125
5678
  export type EventPermissionV2Asked = {
4126
5679
  id: string;
4127
5680
  type: "permission.v2.asked";
@@ -4146,11 +5699,11 @@ export type EventPermissionV2Replied = {
4146
5699
  reply: PermissionV2Reply;
4147
5700
  };
4148
5701
  };
4149
- export type EventReferenceUpdated = {
5702
+ export type EventPluginAdded = {
4150
5703
  id: string;
4151
- type: "reference.updated";
5704
+ type: "plugin.added";
4152
5705
  properties: {
4153
- [key: string]: unknown;
5706
+ id: string;
4154
5707
  };
4155
5708
  };
4156
5709
  export type EventProjectDirectoriesUpdated = {
@@ -4431,6 +5984,35 @@ export type EventGlobalDisposed = {
4431
5984
  [key: string]: unknown;
4432
5985
  };
4433
5986
  };
5987
+ export type CredentialOAuth = {
5988
+ type: "oauth";
5989
+ methodID: string;
5990
+ refresh: string;
5991
+ access: string;
5992
+ expires: number;
5993
+ metadata?: {
5994
+ [key: string]: unknown;
5995
+ };
5996
+ };
5997
+ export type CredentialKey = {
5998
+ type: "key";
5999
+ key: string;
6000
+ metadata?: {
6001
+ [key: string]: unknown;
6002
+ };
6003
+ };
6004
+ export type SkillV2DirectorySource = {
6005
+ type: "directory";
6006
+ path: string;
6007
+ };
6008
+ export type SkillV2UrlSource = {
6009
+ type: "url";
6010
+ url: string;
6011
+ };
6012
+ export type SkillV2EmbeddedSource = {
6013
+ type: "embedded";
6014
+ skill: SkillV2Info;
6015
+ };
4434
6016
  export type BadRequestError = {
4435
6017
  name: "BadRequest";
4436
6018
  data: {
@@ -8124,6 +9706,74 @@ export type V2SessionGetResponses = {
8124
9706
  };
8125
9707
  };
8126
9708
  export type V2SessionGetResponse = V2SessionGetResponses[keyof V2SessionGetResponses];
9709
+ export type V2SessionSwitchAgentData = {
9710
+ body: {
9711
+ agent: string;
9712
+ };
9713
+ path: {
9714
+ sessionID: string;
9715
+ };
9716
+ query?: never;
9717
+ url: "/api/session/{sessionID}/agent";
9718
+ };
9719
+ export type V2SessionSwitchAgentErrors = {
9720
+ /**
9721
+ * InvalidRequestError
9722
+ */
9723
+ 400: InvalidRequestError;
9724
+ /**
9725
+ * UnauthorizedError
9726
+ */
9727
+ 401: UnauthorizedError;
9728
+ /**
9729
+ * SessionNotFoundError
9730
+ */
9731
+ 404: SessionNotFoundError;
9732
+ };
9733
+ export type V2SessionSwitchAgentError = V2SessionSwitchAgentErrors[keyof V2SessionSwitchAgentErrors];
9734
+ export type V2SessionSwitchAgentResponses = {
9735
+ /**
9736
+ * <No Content>
9737
+ */
9738
+ 204: void;
9739
+ };
9740
+ export type V2SessionSwitchAgentResponse = V2SessionSwitchAgentResponses[keyof V2SessionSwitchAgentResponses];
9741
+ export type V2SessionSwitchModelData = {
9742
+ body: {
9743
+ model: {
9744
+ id: string;
9745
+ providerID: string;
9746
+ variant?: string;
9747
+ };
9748
+ };
9749
+ path: {
9750
+ sessionID: string;
9751
+ };
9752
+ query?: never;
9753
+ url: "/api/session/{sessionID}/model";
9754
+ };
9755
+ export type V2SessionSwitchModelErrors = {
9756
+ /**
9757
+ * InvalidRequestError
9758
+ */
9759
+ 400: InvalidRequestError;
9760
+ /**
9761
+ * UnauthorizedError
9762
+ */
9763
+ 401: UnauthorizedError;
9764
+ /**
9765
+ * SessionNotFoundError
9766
+ */
9767
+ 404: SessionNotFoundError;
9768
+ };
9769
+ export type V2SessionSwitchModelError = V2SessionSwitchModelErrors[keyof V2SessionSwitchModelErrors];
9770
+ export type V2SessionSwitchModelResponses = {
9771
+ /**
9772
+ * <No Content>
9773
+ */
9774
+ 204: void;
9775
+ };
9776
+ export type V2SessionSwitchModelResponse = V2SessionSwitchModelResponses[keyof V2SessionSwitchModelResponses];
8127
9777
  export type V2SessionPromptData = {
8128
9778
  body: {
8129
9779
  id?: string;
@@ -9067,12 +10717,7 @@ export type V2SkillListResponse = V2SkillListResponses[keyof V2SkillListResponse
9067
10717
  export type V2EventSubscribeData = {
9068
10718
  body?: never;
9069
10719
  path?: never;
9070
- query?: {
9071
- location?: {
9072
- directory?: string;
9073
- workspace?: string;
9074
- };
9075
- };
10720
+ query?: never;
9076
10721
  url: "/api/event";
9077
10722
  };
9078
10723
  export type V2EventSubscribeErrors = {
@@ -9088,9 +10733,9 @@ export type V2EventSubscribeErrors = {
9088
10733
  export type V2EventSubscribeError = V2EventSubscribeErrors[keyof V2EventSubscribeErrors];
9089
10734
  export type V2EventSubscribeResponses = {
9090
10735
  /**
9091
- * Success
10736
+ * Event stream
9092
10737
  */
9093
- 200: string;
10738
+ 200: V2Event;
9094
10739
  };
9095
10740
  export type V2EventSubscribeResponse = V2EventSubscribeResponses[keyof V2EventSubscribeResponses];
9096
10741
  export type V2PtyListData = {