@runtypelabs/sdk 4.8.1 → 4.9.0

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/index.d.ts CHANGED
@@ -3240,6 +3240,826 @@ interface paths {
3240
3240
  patch?: never;
3241
3241
  trace?: never;
3242
3242
  };
3243
+ "/v1/apps": {
3244
+ parameters: {
3245
+ query?: never;
3246
+ header?: never;
3247
+ path?: never;
3248
+ cookie?: never;
3249
+ };
3250
+ /**
3251
+ * List apps
3252
+ * @description List apps for the authenticated owner, newest first.
3253
+ */
3254
+ get: {
3255
+ parameters: {
3256
+ query?: never;
3257
+ header?: never;
3258
+ path?: never;
3259
+ cookie?: never;
3260
+ };
3261
+ requestBody?: never;
3262
+ responses: {
3263
+ /** @description Apps */
3264
+ 200: {
3265
+ headers: {
3266
+ [name: string]: unknown;
3267
+ };
3268
+ content: {
3269
+ "application/json": {
3270
+ data: {
3271
+ activeVersionId: string | null;
3272
+ clientTokenId: string | null;
3273
+ createdAt: string;
3274
+ description: string | null;
3275
+ hostname: string;
3276
+ id: string;
3277
+ name: string;
3278
+ shortId: string;
3279
+ slug: string;
3280
+ /** @enum {string} */
3281
+ status: "active" | "suspended";
3282
+ updatedAt: string;
3283
+ url: string;
3284
+ /** @enum {string} */
3285
+ visibility: "public" | "unlisted";
3286
+ }[];
3287
+ };
3288
+ };
3289
+ };
3290
+ /** @description Unauthorized */
3291
+ 401: {
3292
+ headers: {
3293
+ [name: string]: unknown;
3294
+ };
3295
+ content: {
3296
+ "application/json": components["schemas"]["Error"];
3297
+ };
3298
+ };
3299
+ /** @description Insufficient permissions */
3300
+ 403: {
3301
+ headers: {
3302
+ [name: string]: unknown;
3303
+ };
3304
+ content: {
3305
+ "application/json": components["schemas"]["Error"];
3306
+ };
3307
+ };
3308
+ /** @description Internal server error */
3309
+ 500: {
3310
+ headers: {
3311
+ [name: string]: unknown;
3312
+ };
3313
+ content: {
3314
+ "application/json": components["schemas"]["Error"];
3315
+ };
3316
+ };
3317
+ };
3318
+ };
3319
+ put?: never;
3320
+ /**
3321
+ * Create an app
3322
+ * @description Create an app. The hostname is {slug}-{shortId}.runtype.run; a client token scoped to that origin is auto-provisioned. Upload a version and activate it to start serving.
3323
+ */
3324
+ post: {
3325
+ parameters: {
3326
+ query?: never;
3327
+ header?: never;
3328
+ path?: never;
3329
+ cookie?: never;
3330
+ };
3331
+ requestBody: {
3332
+ content: {
3333
+ "application/json": {
3334
+ description?: string;
3335
+ name: string;
3336
+ /** @description Hostname slug: lowercase letters, digits, and hyphens; must start with a letter. The app serves at {slug}-{shortId}.runtype.run. */
3337
+ slug: string;
3338
+ /**
3339
+ * @default unlisted
3340
+ * @enum {string}
3341
+ */
3342
+ visibility?: "public" | "unlisted";
3343
+ };
3344
+ };
3345
+ };
3346
+ responses: {
3347
+ /** @description App created */
3348
+ 201: {
3349
+ headers: {
3350
+ [name: string]: unknown;
3351
+ };
3352
+ content: {
3353
+ "application/json": {
3354
+ activeVersionId: string | null;
3355
+ clientTokenId: string | null;
3356
+ createdAt: string;
3357
+ description: string | null;
3358
+ hostname: string;
3359
+ id: string;
3360
+ name: string;
3361
+ shortId: string;
3362
+ slug: string;
3363
+ /** @enum {string} */
3364
+ status: "active" | "suspended";
3365
+ updatedAt: string;
3366
+ url: string;
3367
+ /** @enum {string} */
3368
+ visibility: "public" | "unlisted";
3369
+ };
3370
+ };
3371
+ };
3372
+ /** @description Invalid input */
3373
+ 400: {
3374
+ headers: {
3375
+ [name: string]: unknown;
3376
+ };
3377
+ content: {
3378
+ "application/json": components["schemas"]["Error"];
3379
+ };
3380
+ };
3381
+ /** @description Unauthorized */
3382
+ 401: {
3383
+ headers: {
3384
+ [name: string]: unknown;
3385
+ };
3386
+ content: {
3387
+ "application/json": components["schemas"]["Error"];
3388
+ };
3389
+ };
3390
+ /** @description Plan limit reached */
3391
+ 402: {
3392
+ headers: {
3393
+ [name: string]: unknown;
3394
+ };
3395
+ content: {
3396
+ "application/json": components["schemas"]["Error"];
3397
+ };
3398
+ };
3399
+ /** @description Insufficient permissions */
3400
+ 403: {
3401
+ headers: {
3402
+ [name: string]: unknown;
3403
+ };
3404
+ content: {
3405
+ "application/json": components["schemas"]["Error"];
3406
+ };
3407
+ };
3408
+ /** @description Internal server error */
3409
+ 500: {
3410
+ headers: {
3411
+ [name: string]: unknown;
3412
+ };
3413
+ content: {
3414
+ "application/json": components["schemas"]["Error"];
3415
+ };
3416
+ };
3417
+ };
3418
+ };
3419
+ delete?: never;
3420
+ options?: never;
3421
+ head?: never;
3422
+ patch?: never;
3423
+ trace?: never;
3424
+ };
3425
+ "/v1/apps/{id}": {
3426
+ parameters: {
3427
+ query?: never;
3428
+ header?: never;
3429
+ path?: never;
3430
+ cookie?: never;
3431
+ };
3432
+ /** Get an app */
3433
+ get: {
3434
+ parameters: {
3435
+ query?: never;
3436
+ header?: never;
3437
+ path: {
3438
+ id: string;
3439
+ };
3440
+ cookie?: never;
3441
+ };
3442
+ requestBody?: never;
3443
+ responses: {
3444
+ /** @description App */
3445
+ 200: {
3446
+ headers: {
3447
+ [name: string]: unknown;
3448
+ };
3449
+ content: {
3450
+ "application/json": {
3451
+ activeVersionId: string | null;
3452
+ clientTokenId: string | null;
3453
+ createdAt: string;
3454
+ description: string | null;
3455
+ hostname: string;
3456
+ id: string;
3457
+ name: string;
3458
+ shortId: string;
3459
+ slug: string;
3460
+ /** @enum {string} */
3461
+ status: "active" | "suspended";
3462
+ updatedAt: string;
3463
+ url: string;
3464
+ /** @enum {string} */
3465
+ visibility: "public" | "unlisted";
3466
+ };
3467
+ };
3468
+ };
3469
+ /** @description Invalid id */
3470
+ 400: {
3471
+ headers: {
3472
+ [name: string]: unknown;
3473
+ };
3474
+ content: {
3475
+ "application/json": components["schemas"]["Error"];
3476
+ };
3477
+ };
3478
+ /** @description Unauthorized */
3479
+ 401: {
3480
+ headers: {
3481
+ [name: string]: unknown;
3482
+ };
3483
+ content: {
3484
+ "application/json": components["schemas"]["Error"];
3485
+ };
3486
+ };
3487
+ /** @description Insufficient permissions */
3488
+ 403: {
3489
+ headers: {
3490
+ [name: string]: unknown;
3491
+ };
3492
+ content: {
3493
+ "application/json": components["schemas"]["Error"];
3494
+ };
3495
+ };
3496
+ /** @description Not found */
3497
+ 404: {
3498
+ headers: {
3499
+ [name: string]: unknown;
3500
+ };
3501
+ content: {
3502
+ "application/json": components["schemas"]["Error"];
3503
+ };
3504
+ };
3505
+ };
3506
+ };
3507
+ put?: never;
3508
+ post?: never;
3509
+ /**
3510
+ * Delete an app
3511
+ * @description Delete an app, its versions, and its routing. Stored bundle files are cleaned up in the background; the auto-provisioned client token is deactivated.
3512
+ */
3513
+ delete: {
3514
+ parameters: {
3515
+ query?: never;
3516
+ header?: never;
3517
+ path: {
3518
+ id: string;
3519
+ };
3520
+ cookie?: never;
3521
+ };
3522
+ requestBody?: never;
3523
+ responses: {
3524
+ /** @description Deleted */
3525
+ 200: {
3526
+ headers: {
3527
+ [name: string]: unknown;
3528
+ };
3529
+ content: {
3530
+ "application/json": {
3531
+ success: boolean;
3532
+ };
3533
+ };
3534
+ };
3535
+ /** @description Invalid id */
3536
+ 400: {
3537
+ headers: {
3538
+ [name: string]: unknown;
3539
+ };
3540
+ content: {
3541
+ "application/json": components["schemas"]["Error"];
3542
+ };
3543
+ };
3544
+ /** @description Unauthorized */
3545
+ 401: {
3546
+ headers: {
3547
+ [name: string]: unknown;
3548
+ };
3549
+ content: {
3550
+ "application/json": components["schemas"]["Error"];
3551
+ };
3552
+ };
3553
+ /** @description Insufficient permissions */
3554
+ 403: {
3555
+ headers: {
3556
+ [name: string]: unknown;
3557
+ };
3558
+ content: {
3559
+ "application/json": components["schemas"]["Error"];
3560
+ };
3561
+ };
3562
+ /** @description Not found */
3563
+ 404: {
3564
+ headers: {
3565
+ [name: string]: unknown;
3566
+ };
3567
+ content: {
3568
+ "application/json": components["schemas"]["Error"];
3569
+ };
3570
+ };
3571
+ /** @description Internal server error */
3572
+ 500: {
3573
+ headers: {
3574
+ [name: string]: unknown;
3575
+ };
3576
+ content: {
3577
+ "application/json": components["schemas"]["Error"];
3578
+ };
3579
+ };
3580
+ };
3581
+ };
3582
+ options?: never;
3583
+ head?: never;
3584
+ /**
3585
+ * Update an app
3586
+ * @description Update name, description, visibility, or status. Setting status to suspended makes the edge serve 410 for the app.
3587
+ */
3588
+ patch: {
3589
+ parameters: {
3590
+ query?: never;
3591
+ header?: never;
3592
+ path: {
3593
+ id: string;
3594
+ };
3595
+ cookie?: never;
3596
+ };
3597
+ requestBody: {
3598
+ content: {
3599
+ "application/json": {
3600
+ description?: string | null;
3601
+ name?: string;
3602
+ /** @enum {string} */
3603
+ status?: "active" | "suspended";
3604
+ /** @enum {string} */
3605
+ visibility?: "public" | "unlisted";
3606
+ };
3607
+ };
3608
+ };
3609
+ responses: {
3610
+ /** @description Updated app */
3611
+ 200: {
3612
+ headers: {
3613
+ [name: string]: unknown;
3614
+ };
3615
+ content: {
3616
+ "application/json": {
3617
+ activeVersionId: string | null;
3618
+ clientTokenId: string | null;
3619
+ createdAt: string;
3620
+ description: string | null;
3621
+ hostname: string;
3622
+ id: string;
3623
+ name: string;
3624
+ shortId: string;
3625
+ slug: string;
3626
+ /** @enum {string} */
3627
+ status: "active" | "suspended";
3628
+ updatedAt: string;
3629
+ url: string;
3630
+ /** @enum {string} */
3631
+ visibility: "public" | "unlisted";
3632
+ };
3633
+ };
3634
+ };
3635
+ /** @description Invalid input */
3636
+ 400: {
3637
+ headers: {
3638
+ [name: string]: unknown;
3639
+ };
3640
+ content: {
3641
+ "application/json": components["schemas"]["Error"];
3642
+ };
3643
+ };
3644
+ /** @description Unauthorized */
3645
+ 401: {
3646
+ headers: {
3647
+ [name: string]: unknown;
3648
+ };
3649
+ content: {
3650
+ "application/json": components["schemas"]["Error"];
3651
+ };
3652
+ };
3653
+ /** @description Plan limit reached */
3654
+ 402: {
3655
+ headers: {
3656
+ [name: string]: unknown;
3657
+ };
3658
+ content: {
3659
+ "application/json": components["schemas"]["Error"];
3660
+ };
3661
+ };
3662
+ /** @description Insufficient permissions */
3663
+ 403: {
3664
+ headers: {
3665
+ [name: string]: unknown;
3666
+ };
3667
+ content: {
3668
+ "application/json": components["schemas"]["Error"];
3669
+ };
3670
+ };
3671
+ /** @description Not found */
3672
+ 404: {
3673
+ headers: {
3674
+ [name: string]: unknown;
3675
+ };
3676
+ content: {
3677
+ "application/json": components["schemas"]["Error"];
3678
+ };
3679
+ };
3680
+ /** @description Internal server error */
3681
+ 500: {
3682
+ headers: {
3683
+ [name: string]: unknown;
3684
+ };
3685
+ content: {
3686
+ "application/json": components["schemas"]["Error"];
3687
+ };
3688
+ };
3689
+ };
3690
+ };
3691
+ trace?: never;
3692
+ };
3693
+ "/v1/apps/{id}/activate": {
3694
+ parameters: {
3695
+ query?: never;
3696
+ header?: never;
3697
+ path?: never;
3698
+ cookie?: never;
3699
+ };
3700
+ get?: never;
3701
+ put?: never;
3702
+ /**
3703
+ * Activate an app version
3704
+ * @description Flip the active-version pointer to the given version (deploy or rollback). Syncs the app client token to the manifest capabilities and updates edge routing.
3705
+ */
3706
+ post: {
3707
+ parameters: {
3708
+ query?: never;
3709
+ header?: never;
3710
+ path: {
3711
+ id: string;
3712
+ };
3713
+ cookie?: never;
3714
+ };
3715
+ requestBody: {
3716
+ content: {
3717
+ "application/json": {
3718
+ versionId: string;
3719
+ };
3720
+ };
3721
+ };
3722
+ responses: {
3723
+ /** @description Activated */
3724
+ 200: {
3725
+ headers: {
3726
+ [name: string]: unknown;
3727
+ };
3728
+ content: {
3729
+ "application/json": {
3730
+ app: {
3731
+ activeVersionId: string | null;
3732
+ clientTokenId: string | null;
3733
+ createdAt: string;
3734
+ description: string | null;
3735
+ hostname: string;
3736
+ id: string;
3737
+ name: string;
3738
+ shortId: string;
3739
+ slug: string;
3740
+ /** @enum {string} */
3741
+ status: "active" | "suspended";
3742
+ updatedAt: string;
3743
+ url: string;
3744
+ /** @enum {string} */
3745
+ visibility: "public" | "unlisted";
3746
+ };
3747
+ version: {
3748
+ appId: string;
3749
+ bundleHash: string;
3750
+ createdAt: string;
3751
+ createdBy: string;
3752
+ fileCount: number;
3753
+ id: string;
3754
+ manifest: {
3755
+ /** @enum {string} */
3756
+ auth: "none" | "optional" | "required";
3757
+ capabilities: {
3758
+ agents: string[];
3759
+ flows: string[];
3760
+ };
3761
+ data: {
3762
+ /** @enum {string} */
3763
+ access: "read" | "read-write";
3764
+ namespace: string;
3765
+ }[];
3766
+ description?: string;
3767
+ name: string;
3768
+ };
3769
+ sizeBytes: number;
3770
+ /** @enum {string} */
3771
+ status: "uploaded" | "active" | "superseded";
3772
+ versionNumber: number;
3773
+ };
3774
+ };
3775
+ };
3776
+ };
3777
+ /** @description Invalid input */
3778
+ 400: {
3779
+ headers: {
3780
+ [name: string]: unknown;
3781
+ };
3782
+ content: {
3783
+ "application/json": components["schemas"]["Error"];
3784
+ };
3785
+ };
3786
+ /** @description Unauthorized */
3787
+ 401: {
3788
+ headers: {
3789
+ [name: string]: unknown;
3790
+ };
3791
+ content: {
3792
+ "application/json": components["schemas"]["Error"];
3793
+ };
3794
+ };
3795
+ /** @description Insufficient permissions */
3796
+ 403: {
3797
+ headers: {
3798
+ [name: string]: unknown;
3799
+ };
3800
+ content: {
3801
+ "application/json": components["schemas"]["Error"];
3802
+ };
3803
+ };
3804
+ /** @description Not found */
3805
+ 404: {
3806
+ headers: {
3807
+ [name: string]: unknown;
3808
+ };
3809
+ content: {
3810
+ "application/json": components["schemas"]["Error"];
3811
+ };
3812
+ };
3813
+ /** @description Internal server error */
3814
+ 500: {
3815
+ headers: {
3816
+ [name: string]: unknown;
3817
+ };
3818
+ content: {
3819
+ "application/json": components["schemas"]["Error"];
3820
+ };
3821
+ };
3822
+ };
3823
+ };
3824
+ delete?: never;
3825
+ options?: never;
3826
+ head?: never;
3827
+ patch?: never;
3828
+ trace?: never;
3829
+ };
3830
+ "/v1/apps/{id}/versions": {
3831
+ parameters: {
3832
+ query?: never;
3833
+ header?: never;
3834
+ path?: never;
3835
+ cookie?: never;
3836
+ };
3837
+ /**
3838
+ * List an app's versions
3839
+ * @description List all versions of an app, newest first.
3840
+ */
3841
+ get: {
3842
+ parameters: {
3843
+ query?: never;
3844
+ header?: never;
3845
+ path: {
3846
+ id: string;
3847
+ };
3848
+ cookie?: never;
3849
+ };
3850
+ requestBody?: never;
3851
+ responses: {
3852
+ /** @description Versions */
3853
+ 200: {
3854
+ headers: {
3855
+ [name: string]: unknown;
3856
+ };
3857
+ content: {
3858
+ "application/json": {
3859
+ data: {
3860
+ appId: string;
3861
+ bundleHash: string;
3862
+ createdAt: string;
3863
+ createdBy: string;
3864
+ fileCount: number;
3865
+ id: string;
3866
+ manifest: {
3867
+ /** @enum {string} */
3868
+ auth: "none" | "optional" | "required";
3869
+ capabilities: {
3870
+ agents: string[];
3871
+ flows: string[];
3872
+ };
3873
+ data: {
3874
+ /** @enum {string} */
3875
+ access: "read" | "read-write";
3876
+ namespace: string;
3877
+ }[];
3878
+ description?: string;
3879
+ name: string;
3880
+ };
3881
+ sizeBytes: number;
3882
+ /** @enum {string} */
3883
+ status: "uploaded" | "active" | "superseded";
3884
+ versionNumber: number;
3885
+ }[];
3886
+ };
3887
+ };
3888
+ };
3889
+ /** @description Invalid id */
3890
+ 400: {
3891
+ headers: {
3892
+ [name: string]: unknown;
3893
+ };
3894
+ content: {
3895
+ "application/json": components["schemas"]["Error"];
3896
+ };
3897
+ };
3898
+ /** @description Unauthorized */
3899
+ 401: {
3900
+ headers: {
3901
+ [name: string]: unknown;
3902
+ };
3903
+ content: {
3904
+ "application/json": components["schemas"]["Error"];
3905
+ };
3906
+ };
3907
+ /** @description Insufficient permissions */
3908
+ 403: {
3909
+ headers: {
3910
+ [name: string]: unknown;
3911
+ };
3912
+ content: {
3913
+ "application/json": components["schemas"]["Error"];
3914
+ };
3915
+ };
3916
+ /** @description Not found */
3917
+ 404: {
3918
+ headers: {
3919
+ [name: string]: unknown;
3920
+ };
3921
+ content: {
3922
+ "application/json": components["schemas"]["Error"];
3923
+ };
3924
+ };
3925
+ };
3926
+ };
3927
+ put?: never;
3928
+ /**
3929
+ * Upload an app version
3930
+ * @description Upload a zip bundle as a new version. The bundle must contain index.html and runtype.app.json at the root. Uploading does not change what is served; call activate to deploy.
3931
+ */
3932
+ post: {
3933
+ parameters: {
3934
+ query?: never;
3935
+ header?: never;
3936
+ path: {
3937
+ id: string;
3938
+ };
3939
+ cookie?: never;
3940
+ };
3941
+ /** @description The app bundle as a zip archive. */
3942
+ requestBody: {
3943
+ content: {
3944
+ "application/zip": string;
3945
+ };
3946
+ };
3947
+ responses: {
3948
+ /** @description Version uploaded */
3949
+ 201: {
3950
+ headers: {
3951
+ [name: string]: unknown;
3952
+ };
3953
+ content: {
3954
+ "application/json": {
3955
+ appId: string;
3956
+ bundleHash: string;
3957
+ createdAt: string;
3958
+ createdBy: string;
3959
+ fileCount: number;
3960
+ id: string;
3961
+ manifest: {
3962
+ /** @enum {string} */
3963
+ auth: "none" | "optional" | "required";
3964
+ capabilities: {
3965
+ agents: string[];
3966
+ flows: string[];
3967
+ };
3968
+ data: {
3969
+ /** @enum {string} */
3970
+ access: "read" | "read-write";
3971
+ namespace: string;
3972
+ }[];
3973
+ description?: string;
3974
+ name: string;
3975
+ };
3976
+ sizeBytes: number;
3977
+ /** @enum {string} */
3978
+ status: "uploaded" | "active" | "superseded";
3979
+ versionNumber: number;
3980
+ };
3981
+ };
3982
+ };
3983
+ /** @description Invalid bundle */
3984
+ 400: {
3985
+ headers: {
3986
+ [name: string]: unknown;
3987
+ };
3988
+ content: {
3989
+ "application/json": components["schemas"]["Error"];
3990
+ };
3991
+ };
3992
+ /** @description Unauthorized */
3993
+ 401: {
3994
+ headers: {
3995
+ [name: string]: unknown;
3996
+ };
3997
+ content: {
3998
+ "application/json": components["schemas"]["Error"];
3999
+ };
4000
+ };
4001
+ /** @description Plan limit reached */
4002
+ 402: {
4003
+ headers: {
4004
+ [name: string]: unknown;
4005
+ };
4006
+ content: {
4007
+ "application/json": components["schemas"]["Error"];
4008
+ };
4009
+ };
4010
+ /** @description Insufficient permissions */
4011
+ 403: {
4012
+ headers: {
4013
+ [name: string]: unknown;
4014
+ };
4015
+ content: {
4016
+ "application/json": components["schemas"]["Error"];
4017
+ };
4018
+ };
4019
+ /** @description Not found */
4020
+ 404: {
4021
+ headers: {
4022
+ [name: string]: unknown;
4023
+ };
4024
+ content: {
4025
+ "application/json": components["schemas"]["Error"];
4026
+ };
4027
+ };
4028
+ /** @description Manifest uses reserved features */
4029
+ 422: {
4030
+ headers: {
4031
+ [name: string]: unknown;
4032
+ };
4033
+ content: {
4034
+ "application/json": components["schemas"]["Error"];
4035
+ };
4036
+ };
4037
+ /** @description Internal server error */
4038
+ 500: {
4039
+ headers: {
4040
+ [name: string]: unknown;
4041
+ };
4042
+ content: {
4043
+ "application/json": components["schemas"]["Error"];
4044
+ };
4045
+ };
4046
+ /** @description App storage not configured */
4047
+ 503: {
4048
+ headers: {
4049
+ [name: string]: unknown;
4050
+ };
4051
+ content: {
4052
+ "application/json": components["schemas"]["Error"];
4053
+ };
4054
+ };
4055
+ };
4056
+ };
4057
+ delete?: never;
4058
+ options?: never;
4059
+ head?: never;
4060
+ patch?: never;
4061
+ trace?: never;
4062
+ };
3243
4063
  "/v1/assets/preview/{orgId}/{assetId}": {
3244
4064
  parameters: {
3245
4065
  query?: never;
@@ -3428,7 +4248,7 @@ interface paths {
3428
4248
  };
3429
4249
  /**
3430
4250
  * Get current user info
3431
- * @description Get the current user and organization info from the Clerk session.
4251
+ * @description Get the current user and organization info for the authenticated caller (Clerk session or API key).
3432
4252
  */
3433
4253
  get: {
3434
4254
  parameters: {
@@ -39355,6 +40175,12 @@ interface LocalToolExecutionLoopSnapshot {
39355
40175
  }
39356
40176
  interface ExecuteWithLocalToolsOptions {
39357
40177
  onLocalToolResult?: (snapshot: LocalToolExecutionLoopSnapshot) => AgentCompleteEvent | null | undefined;
40178
+ /**
40179
+ * Polled after each local tool execution. Returning true ends the session
40180
+ * early (synthetic `agent_complete`) so queued user steering can be
40181
+ * delivered at the next session boundary instead of after the full session.
40182
+ */
40183
+ shouldInterrupt?: () => boolean;
39358
40184
  }
39359
40185
  /**
39360
40186
  * Status of a long-task agent run
@@ -39610,6 +40436,20 @@ interface RunTaskOptions {
39610
40436
  workflow?: WorkflowDefinition;
39611
40437
  /** IDs of built-in tools to enable for the agent (e.g., "exa", "firecrawl", "dalle") */
39612
40438
  toolIds?: string[];
40439
+ /**
40440
+ * Mid-run steering queue: called at every session boundary; returned
40441
+ * messages are DRAINED and injected as user steering at the start of the
40442
+ * next session's context. Pair with `hasQueuedUserMessages` to also end
40443
+ * in-flight sessions early at the next local-tool pause.
40444
+ */
40445
+ getQueuedUserMessages?: () => string[] | undefined;
40446
+ /**
40447
+ * Non-draining peek at the steering queue. When it returns true after a
40448
+ * local tool executes, the current session ends early (synthetic
40449
+ * `agent_complete`) so the queued steering is delivered within seconds
40450
+ * instead of after the session completes.
40451
+ */
40452
+ hasQueuedUserMessages?: () => boolean;
39613
40453
  }
39614
40454
  /**
39615
40455
  * Final result returned by `agents.runTask()`