@jush-agent/sdk 0.2.6250 → 0.2.6254

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.mts CHANGED
@@ -3823,6 +3823,8 @@ declare const errorBodySchema: z.ZodObject<{
3823
3823
  device_not_found: "device_not_found";
3824
3824
  device_managed: "device_managed";
3825
3825
  device_offline: "device_offline";
3826
+ device_lost: "device_lost";
3827
+ command_timed_out: "command_timed_out";
3826
3828
  not_a_paired_device: "not_a_paired_device";
3827
3829
  conversation_not_found: "conversation_not_found";
3828
3830
  block_not_found: "block_not_found";
@@ -3874,7 +3876,6 @@ declare const errorBodySchema: z.ZodObject<{
3874
3876
  forbidden_origin: "forbidden_origin";
3875
3877
  unknown_stream: "unknown_stream";
3876
3878
  upgrade_required: "upgrade_required";
3877
- too_many_lanes: "too_many_lanes";
3878
3879
  stream_failed: "stream_failed";
3879
3880
  id_unavailable: "id_unavailable";
3880
3881
  invalid_revision: "invalid_revision";
@@ -3956,6 +3957,11 @@ declare const errorBodySchema: z.ZodObject<{
3956
3957
  }>;
3957
3958
  savedCount: z.ZodInt;
3958
3959
  }, z.core.$strip>>>;
3960
+ output: z.ZodOptional<z.ZodNullable<z.ZodObject<{
3961
+ stdout: z.ZodString;
3962
+ stderr: z.ZodString;
3963
+ leftOutBytes: z.ZodInt;
3964
+ }, z.core.$strip>>>;
3959
3965
  requestId: z.ZodString;
3960
3966
  }, z.core.$strip>;
3961
3967
  type ErrorBody = z.infer<typeof errorBodySchema>;
@@ -4810,6 +4816,8 @@ declare const portAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4810
4816
  device_not_found: "device_not_found";
4811
4817
  device_managed: "device_managed";
4812
4818
  device_offline: "device_offline";
4819
+ device_lost: "device_lost";
4820
+ command_timed_out: "command_timed_out";
4813
4821
  not_a_paired_device: "not_a_paired_device";
4814
4822
  conversation_not_found: "conversation_not_found";
4815
4823
  block_not_found: "block_not_found";
@@ -4861,7 +4869,6 @@ declare const portAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4861
4869
  forbidden_origin: "forbidden_origin";
4862
4870
  unknown_stream: "unknown_stream";
4863
4871
  upgrade_required: "upgrade_required";
4864
- too_many_lanes: "too_many_lanes";
4865
4872
  stream_failed: "stream_failed";
4866
4873
  id_unavailable: "id_unavailable";
4867
4874
  invalid_revision: "invalid_revision";
@@ -4974,6 +4981,8 @@ declare const portAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4974
4981
  device_not_found: "device_not_found";
4975
4982
  device_managed: "device_managed";
4976
4983
  device_offline: "device_offline";
4984
+ device_lost: "device_lost";
4985
+ command_timed_out: "command_timed_out";
4977
4986
  not_a_paired_device: "not_a_paired_device";
4978
4987
  conversation_not_found: "conversation_not_found";
4979
4988
  block_not_found: "block_not_found";
@@ -5025,7 +5034,6 @@ declare const portAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5025
5034
  forbidden_origin: "forbidden_origin";
5026
5035
  unknown_stream: "unknown_stream";
5027
5036
  upgrade_required: "upgrade_required";
5028
- too_many_lanes: "too_many_lanes";
5029
5037
  stream_failed: "stream_failed";
5030
5038
  id_unavailable: "id_unavailable";
5031
5039
  invalid_revision: "invalid_revision";
@@ -5303,6 +5311,8 @@ declare const laneRefusalSchema: z.ZodObject<{
5303
5311
  device_not_found: "device_not_found";
5304
5312
  device_managed: "device_managed";
5305
5313
  device_offline: "device_offline";
5314
+ device_lost: "device_lost";
5315
+ command_timed_out: "command_timed_out";
5306
5316
  not_a_paired_device: "not_a_paired_device";
5307
5317
  conversation_not_found: "conversation_not_found";
5308
5318
  block_not_found: "block_not_found";
@@ -5354,7 +5364,6 @@ declare const laneRefusalSchema: z.ZodObject<{
5354
5364
  forbidden_origin: "forbidden_origin";
5355
5365
  unknown_stream: "unknown_stream";
5356
5366
  upgrade_required: "upgrade_required";
5357
- too_many_lanes: "too_many_lanes";
5358
5367
  stream_failed: "stream_failed";
5359
5368
  id_unavailable: "id_unavailable";
5360
5369
  invalid_revision: "invalid_revision";
@@ -5436,6 +5445,11 @@ declare const laneRefusalSchema: z.ZodObject<{
5436
5445
  }>;
5437
5446
  savedCount: z.ZodInt;
5438
5447
  }, z.core.$strip>>>;
5448
+ output: z.ZodOptional<z.ZodNullable<z.ZodObject<{
5449
+ stdout: z.ZodString;
5450
+ stderr: z.ZodString;
5451
+ leftOutBytes: z.ZodInt;
5452
+ }, z.core.$strip>>>;
5439
5453
  requestId: z.ZodString;
5440
5454
  }, z.core.$strip>;
5441
5455
  }, z.core.$strip>;
@@ -15607,7 +15621,123 @@ declare const conversationUpdateSchema: z.ZodObject<{
15607
15621
  }>>;
15608
15622
  permissionRequests: z.ZodInt;
15609
15623
  unreadPermissionRequests: z.ZodInt;
15610
- scheduled: z.ZodBoolean;
15624
+ schedules: z.ZodArray<z.ZodObject<{
15625
+ id: z.ZodString;
15626
+ name: z.ZodString;
15627
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
15628
+ kind: z.ZodLiteral<"time">;
15629
+ timing: z.ZodDiscriminatedUnion<[z.ZodObject<{
15630
+ kind: z.ZodLiteral<"once">;
15631
+ at: z.ZodISODateTime;
15632
+ }, z.core.$strip>, z.ZodObject<{
15633
+ kind: z.ZodLiteral<"repeat">;
15634
+ repeat: z.ZodObject<{
15635
+ every: z.ZodInt;
15636
+ unit: z.ZodEnum<{
15637
+ days: "days";
15638
+ weeks: "weeks";
15639
+ months: "months";
15640
+ years: "years";
15641
+ }>;
15642
+ start: z.ZodNullable<z.ZodString>;
15643
+ }, z.core.$strip>;
15644
+ tasks: z.ZodArray<z.ZodObject<{
15645
+ id: z.ZodString;
15646
+ time: z.ZodString;
15647
+ days: z.ZodArray<z.ZodEnum<{
15648
+ mon: "mon";
15649
+ tue: "tue";
15650
+ wed: "wed";
15651
+ thu: "thu";
15652
+ fri: "fri";
15653
+ sat: "sat";
15654
+ sun: "sun";
15655
+ }>>;
15656
+ day: z.ZodDiscriminatedUnion<[z.ZodObject<{
15657
+ kind: z.ZodLiteral<"date">;
15658
+ date: z.ZodInt;
15659
+ }, z.core.$strip>, z.ZodObject<{
15660
+ kind: z.ZodLiteral<"last_day">;
15661
+ }, z.core.$strip>, z.ZodObject<{
15662
+ kind: z.ZodLiteral<"weekday">;
15663
+ week: z.ZodEnum<{
15664
+ first: "first";
15665
+ second: "second";
15666
+ third: "third";
15667
+ fourth: "fourth";
15668
+ last: "last";
15669
+ }>;
15670
+ weekday: z.ZodEnum<{
15671
+ mon: "mon";
15672
+ tue: "tue";
15673
+ wed: "wed";
15674
+ thu: "thu";
15675
+ fri: "fri";
15676
+ sat: "sat";
15677
+ sun: "sun";
15678
+ }>;
15679
+ }, z.core.$strip>, z.ZodObject<{
15680
+ kind: z.ZodLiteral<"working_day">;
15681
+ which: z.ZodEnum<{
15682
+ first: "first";
15683
+ last: "last";
15684
+ }>;
15685
+ }, z.core.$strip>], "kind">;
15686
+ month: z.ZodInt;
15687
+ holidays: z.ZodNullable<z.ZodObject<{
15688
+ country: z.ZodString;
15689
+ region: z.ZodNullable<z.ZodString>;
15690
+ }, z.core.$strip>>;
15691
+ prompt: z.ZodString;
15692
+ }, z.core.$strip>>;
15693
+ }, z.core.$strip>, z.ZodObject<{
15694
+ kind: z.ZodLiteral<"every">;
15695
+ minutes: z.ZodInt;
15696
+ }, z.core.$strip>, z.ZodObject<{
15697
+ kind: z.ZodLiteral<"cron">;
15698
+ expression: z.ZodString;
15699
+ }, z.core.$strip>], "kind">;
15700
+ }, z.core.$strip>, z.ZodObject<{
15701
+ kind: z.ZodLiteral<"change">;
15702
+ command: z.ZodString;
15703
+ everyMinutes: z.ZodInt;
15704
+ }, z.core.$strip>, z.ZodObject<{
15705
+ kind: z.ZodLiteral<"url">;
15706
+ }, z.core.$strip>, z.ZodObject<{
15707
+ kind: z.ZodLiteral<"done">;
15708
+ conversation: z.ZodString;
15709
+ }, z.core.$strip>], "kind">;
15710
+ timeZone: z.ZodString;
15711
+ paused: z.ZodBoolean;
15712
+ nextAt: z.ZodNullable<z.ZodISODateTime>;
15713
+ lastRun: z.ZodNullable<z.ZodObject<{
15714
+ at: z.ZodISODateTime;
15715
+ state: z.ZodEnum<{
15716
+ running: "running";
15717
+ failed: "failed";
15718
+ done: "done";
15719
+ skipped: "skipped";
15720
+ notified: "notified";
15721
+ }>;
15722
+ note: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
15723
+ kind: z.ZodLiteral<"offline">;
15724
+ device: z.ZodString;
15725
+ }, z.core.$strip>, z.ZodObject<{
15726
+ kind: z.ZodLiteral<"limit">;
15727
+ limit: z.ZodInt;
15728
+ calls: z.ZodInt;
15729
+ }, z.core.$strip>, z.ZodObject<{
15730
+ kind: z.ZodLiteral<"command_timed_out">;
15731
+ }, z.core.$strip>, z.ZodObject<{
15732
+ kind: z.ZodLiteral<"command_failed">;
15733
+ message: z.ZodString;
15734
+ }, z.core.$strip>, z.ZodObject<{
15735
+ kind: z.ZodLiteral<"turn_failed">;
15736
+ message: z.ZodString;
15737
+ code: z.ZodNullable<z.ZodString>;
15738
+ }, z.core.$strip>], "kind">>;
15739
+ }, z.core.$strip>>;
15740
+ }, z.core.$strip>>;
15611
15741
  work: z.ZodObject<{
15612
15742
  revision: z.ZodInt;
15613
15743
  tabs: z.ZodArray<z.ZodObject<{
@@ -15757,123 +15887,6 @@ declare const conversationUpdateSchema: z.ZodObject<{
15757
15887
  createdAt: z.ZodISODateTime;
15758
15888
  }, z.core.$strip>], "kind">>;
15759
15889
  }, z.core.$strip>;
15760
- schedules: z.ZodArray<z.ZodObject<{
15761
- id: z.ZodString;
15762
- name: z.ZodString;
15763
- trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
15764
- kind: z.ZodLiteral<"time">;
15765
- timing: z.ZodDiscriminatedUnion<[z.ZodObject<{
15766
- kind: z.ZodLiteral<"once">;
15767
- at: z.ZodISODateTime;
15768
- }, z.core.$strip>, z.ZodObject<{
15769
- kind: z.ZodLiteral<"repeat">;
15770
- repeat: z.ZodObject<{
15771
- every: z.ZodInt;
15772
- unit: z.ZodEnum<{
15773
- days: "days";
15774
- weeks: "weeks";
15775
- months: "months";
15776
- years: "years";
15777
- }>;
15778
- start: z.ZodNullable<z.ZodString>;
15779
- }, z.core.$strip>;
15780
- tasks: z.ZodArray<z.ZodObject<{
15781
- id: z.ZodString;
15782
- time: z.ZodString;
15783
- days: z.ZodArray<z.ZodEnum<{
15784
- mon: "mon";
15785
- tue: "tue";
15786
- wed: "wed";
15787
- thu: "thu";
15788
- fri: "fri";
15789
- sat: "sat";
15790
- sun: "sun";
15791
- }>>;
15792
- day: z.ZodDiscriminatedUnion<[z.ZodObject<{
15793
- kind: z.ZodLiteral<"date">;
15794
- date: z.ZodInt;
15795
- }, z.core.$strip>, z.ZodObject<{
15796
- kind: z.ZodLiteral<"last_day">;
15797
- }, z.core.$strip>, z.ZodObject<{
15798
- kind: z.ZodLiteral<"weekday">;
15799
- week: z.ZodEnum<{
15800
- first: "first";
15801
- second: "second";
15802
- third: "third";
15803
- fourth: "fourth";
15804
- last: "last";
15805
- }>;
15806
- weekday: z.ZodEnum<{
15807
- mon: "mon";
15808
- tue: "tue";
15809
- wed: "wed";
15810
- thu: "thu";
15811
- fri: "fri";
15812
- sat: "sat";
15813
- sun: "sun";
15814
- }>;
15815
- }, z.core.$strip>, z.ZodObject<{
15816
- kind: z.ZodLiteral<"working_day">;
15817
- which: z.ZodEnum<{
15818
- first: "first";
15819
- last: "last";
15820
- }>;
15821
- }, z.core.$strip>], "kind">;
15822
- month: z.ZodInt;
15823
- holidays: z.ZodNullable<z.ZodObject<{
15824
- country: z.ZodString;
15825
- region: z.ZodNullable<z.ZodString>;
15826
- }, z.core.$strip>>;
15827
- prompt: z.ZodString;
15828
- }, z.core.$strip>>;
15829
- }, z.core.$strip>, z.ZodObject<{
15830
- kind: z.ZodLiteral<"every">;
15831
- minutes: z.ZodInt;
15832
- }, z.core.$strip>, z.ZodObject<{
15833
- kind: z.ZodLiteral<"cron">;
15834
- expression: z.ZodString;
15835
- }, z.core.$strip>], "kind">;
15836
- }, z.core.$strip>, z.ZodObject<{
15837
- kind: z.ZodLiteral<"change">;
15838
- command: z.ZodString;
15839
- everyMinutes: z.ZodInt;
15840
- }, z.core.$strip>, z.ZodObject<{
15841
- kind: z.ZodLiteral<"url">;
15842
- }, z.core.$strip>, z.ZodObject<{
15843
- kind: z.ZodLiteral<"done">;
15844
- conversation: z.ZodString;
15845
- }, z.core.$strip>], "kind">;
15846
- timeZone: z.ZodString;
15847
- paused: z.ZodBoolean;
15848
- nextAt: z.ZodNullable<z.ZodISODateTime>;
15849
- lastRun: z.ZodNullable<z.ZodObject<{
15850
- at: z.ZodISODateTime;
15851
- state: z.ZodEnum<{
15852
- running: "running";
15853
- failed: "failed";
15854
- done: "done";
15855
- skipped: "skipped";
15856
- notified: "notified";
15857
- }>;
15858
- note: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
15859
- kind: z.ZodLiteral<"offline">;
15860
- device: z.ZodString;
15861
- }, z.core.$strip>, z.ZodObject<{
15862
- kind: z.ZodLiteral<"limit">;
15863
- limit: z.ZodInt;
15864
- calls: z.ZodInt;
15865
- }, z.core.$strip>, z.ZodObject<{
15866
- kind: z.ZodLiteral<"command_timed_out">;
15867
- }, z.core.$strip>, z.ZodObject<{
15868
- kind: z.ZodLiteral<"command_failed">;
15869
- message: z.ZodString;
15870
- }, z.core.$strip>, z.ZodObject<{
15871
- kind: z.ZodLiteral<"turn_failed">;
15872
- message: z.ZodString;
15873
- code: z.ZodNullable<z.ZodString>;
15874
- }, z.core.$strip>], "kind">>;
15875
- }, z.core.$strip>>;
15876
- }, z.core.$strip>>;
15877
15890
  endedCommands: z.ZodArray<z.ZodObject<{
15878
15891
  commandId: z.ZodString;
15879
15892
  node: z.ZodString;
@@ -15925,6 +15938,7 @@ declare const conversationUpdateSchema: z.ZodObject<{
15925
15938
  plugins: "plugins";
15926
15939
  }>;
15927
15940
  code: z.ZodEnum<{
15941
+ command_timed_out: "command_timed_out";
15928
15942
  unauthenticated: "unauthenticated";
15929
15943
  not_found: "not_found";
15930
15944
  invalid_body: "invalid_body";
@@ -15972,6 +15986,7 @@ declare const conversationUpdateSchema: z.ZodObject<{
15972
15986
  device_not_found: "device_not_found";
15973
15987
  device_managed: "device_managed";
15974
15988
  device_offline: "device_offline";
15989
+ device_lost: "device_lost";
15975
15990
  not_a_paired_device: "not_a_paired_device";
15976
15991
  conversation_not_found: "conversation_not_found";
15977
15992
  block_not_found: "block_not_found";
@@ -16023,7 +16038,6 @@ declare const conversationUpdateSchema: z.ZodObject<{
16023
16038
  forbidden_origin: "forbidden_origin";
16024
16039
  unknown_stream: "unknown_stream";
16025
16040
  upgrade_required: "upgrade_required";
16026
- too_many_lanes: "too_many_lanes";
16027
16041
  stream_failed: "stream_failed";
16028
16042
  id_unavailable: "id_unavailable";
16029
16043
  invalid_revision: "invalid_revision";
@@ -16117,8 +16131,8 @@ declare const deviceDtoSchema: z.ZodObject<{
16117
16131
  claimedAt: z.ZodISODateTime;
16118
16132
  lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
16119
16133
  state: z.ZodEnum<{
16120
- updating: "updating";
16121
16134
  offline: "offline";
16135
+ updating: "updating";
16122
16136
  online: "online";
16123
16137
  }>;
16124
16138
  downloadPercent: z.ZodNullable<z.ZodInt>;
@@ -16963,8 +16977,8 @@ declare const coreStateSchema: z.ZodObject<{
16963
16977
  claimedAt: z.ZodISODateTime;
16964
16978
  lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
16965
16979
  state: z.ZodEnum<{
16966
- updating: "updating";
16967
16980
  offline: "offline";
16981
+ updating: "updating";
16968
16982
  online: "online";
16969
16983
  }>;
16970
16984
  downloadPercent: z.ZodNullable<z.ZodInt>;
@@ -17077,20 +17091,136 @@ declare const coreStateSchema: z.ZodObject<{
17077
17091
  }>>;
17078
17092
  permissionRequests: z.ZodInt;
17079
17093
  unreadPermissionRequests: z.ZodInt;
17080
- scheduled: z.ZodBoolean;
17081
- work: z.ZodObject<{
17082
- revision: z.ZodInt;
17083
- tabs: z.ZodArray<z.ZodObject<{
17084
- id: z.ZodString;
17085
- kind: z.ZodString;
17086
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
17087
- }, z.core.$strip>>;
17088
- windows: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
17089
- }, z.core.$strip>;
17090
- }, z.core.$strip>>;
17091
- logins: z.ZodArray<z.ZodObject<{
17092
- id: z.ZodString;
17093
- providerId: z.ZodNullable<z.ZodString>;
17094
+ schedules: z.ZodArray<z.ZodObject<{
17095
+ id: z.ZodString;
17096
+ name: z.ZodString;
17097
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
17098
+ kind: z.ZodLiteral<"time">;
17099
+ timing: z.ZodDiscriminatedUnion<[z.ZodObject<{
17100
+ kind: z.ZodLiteral<"once">;
17101
+ at: z.ZodISODateTime;
17102
+ }, z.core.$strip>, z.ZodObject<{
17103
+ kind: z.ZodLiteral<"repeat">;
17104
+ repeat: z.ZodObject<{
17105
+ every: z.ZodInt;
17106
+ unit: z.ZodEnum<{
17107
+ days: "days";
17108
+ weeks: "weeks";
17109
+ months: "months";
17110
+ years: "years";
17111
+ }>;
17112
+ start: z.ZodNullable<z.ZodString>;
17113
+ }, z.core.$strip>;
17114
+ tasks: z.ZodArray<z.ZodObject<{
17115
+ id: z.ZodString;
17116
+ time: z.ZodString;
17117
+ days: z.ZodArray<z.ZodEnum<{
17118
+ mon: "mon";
17119
+ tue: "tue";
17120
+ wed: "wed";
17121
+ thu: "thu";
17122
+ fri: "fri";
17123
+ sat: "sat";
17124
+ sun: "sun";
17125
+ }>>;
17126
+ day: z.ZodDiscriminatedUnion<[z.ZodObject<{
17127
+ kind: z.ZodLiteral<"date">;
17128
+ date: z.ZodInt;
17129
+ }, z.core.$strip>, z.ZodObject<{
17130
+ kind: z.ZodLiteral<"last_day">;
17131
+ }, z.core.$strip>, z.ZodObject<{
17132
+ kind: z.ZodLiteral<"weekday">;
17133
+ week: z.ZodEnum<{
17134
+ first: "first";
17135
+ second: "second";
17136
+ third: "third";
17137
+ fourth: "fourth";
17138
+ last: "last";
17139
+ }>;
17140
+ weekday: z.ZodEnum<{
17141
+ mon: "mon";
17142
+ tue: "tue";
17143
+ wed: "wed";
17144
+ thu: "thu";
17145
+ fri: "fri";
17146
+ sat: "sat";
17147
+ sun: "sun";
17148
+ }>;
17149
+ }, z.core.$strip>, z.ZodObject<{
17150
+ kind: z.ZodLiteral<"working_day">;
17151
+ which: z.ZodEnum<{
17152
+ first: "first";
17153
+ last: "last";
17154
+ }>;
17155
+ }, z.core.$strip>], "kind">;
17156
+ month: z.ZodInt;
17157
+ holidays: z.ZodNullable<z.ZodObject<{
17158
+ country: z.ZodString;
17159
+ region: z.ZodNullable<z.ZodString>;
17160
+ }, z.core.$strip>>;
17161
+ prompt: z.ZodString;
17162
+ }, z.core.$strip>>;
17163
+ }, z.core.$strip>, z.ZodObject<{
17164
+ kind: z.ZodLiteral<"every">;
17165
+ minutes: z.ZodInt;
17166
+ }, z.core.$strip>, z.ZodObject<{
17167
+ kind: z.ZodLiteral<"cron">;
17168
+ expression: z.ZodString;
17169
+ }, z.core.$strip>], "kind">;
17170
+ }, z.core.$strip>, z.ZodObject<{
17171
+ kind: z.ZodLiteral<"change">;
17172
+ command: z.ZodString;
17173
+ everyMinutes: z.ZodInt;
17174
+ }, z.core.$strip>, z.ZodObject<{
17175
+ kind: z.ZodLiteral<"url">;
17176
+ }, z.core.$strip>, z.ZodObject<{
17177
+ kind: z.ZodLiteral<"done">;
17178
+ conversation: z.ZodString;
17179
+ }, z.core.$strip>], "kind">;
17180
+ timeZone: z.ZodString;
17181
+ paused: z.ZodBoolean;
17182
+ nextAt: z.ZodNullable<z.ZodISODateTime>;
17183
+ lastRun: z.ZodNullable<z.ZodObject<{
17184
+ at: z.ZodISODateTime;
17185
+ state: z.ZodEnum<{
17186
+ running: "running";
17187
+ failed: "failed";
17188
+ done: "done";
17189
+ skipped: "skipped";
17190
+ notified: "notified";
17191
+ }>;
17192
+ note: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
17193
+ kind: z.ZodLiteral<"offline">;
17194
+ device: z.ZodString;
17195
+ }, z.core.$strip>, z.ZodObject<{
17196
+ kind: z.ZodLiteral<"limit">;
17197
+ limit: z.ZodInt;
17198
+ calls: z.ZodInt;
17199
+ }, z.core.$strip>, z.ZodObject<{
17200
+ kind: z.ZodLiteral<"command_timed_out">;
17201
+ }, z.core.$strip>, z.ZodObject<{
17202
+ kind: z.ZodLiteral<"command_failed">;
17203
+ message: z.ZodString;
17204
+ }, z.core.$strip>, z.ZodObject<{
17205
+ kind: z.ZodLiteral<"turn_failed">;
17206
+ message: z.ZodString;
17207
+ code: z.ZodNullable<z.ZodString>;
17208
+ }, z.core.$strip>], "kind">>;
17209
+ }, z.core.$strip>>;
17210
+ }, z.core.$strip>>;
17211
+ work: z.ZodObject<{
17212
+ revision: z.ZodInt;
17213
+ tabs: z.ZodArray<z.ZodObject<{
17214
+ id: z.ZodString;
17215
+ kind: z.ZodString;
17216
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
17217
+ }, z.core.$strip>>;
17218
+ windows: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
17219
+ }, z.core.$strip>;
17220
+ }, z.core.$strip>>;
17221
+ logins: z.ZodArray<z.ZodObject<{
17222
+ id: z.ZodString;
17223
+ providerId: z.ZodNullable<z.ZodString>;
17094
17224
  providerType: z.ZodString;
17095
17225
  login: z.ZodDiscriminatedUnion<[z.ZodObject<{
17096
17226
  status: z.ZodLiteral<"pending">;
@@ -17644,6 +17774,444 @@ declare const pushMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
17644
17774
  body: z.ZodString;
17645
17775
  }, z.core.$strip>], "kind">;
17646
17776
  type PushMessage = z.infer<typeof pushMessageSchema>;
17777
+ /** One run of a schedule. */
17778
+ declare const scheduleRunDtoSchema: z.ZodObject<{
17779
+ id: z.ZodString;
17780
+ cause: z.ZodEnum<{
17781
+ url: "url";
17782
+ time: "time";
17783
+ change: "change";
17784
+ done: "done";
17785
+ now: "now";
17786
+ }>;
17787
+ at: z.ZodISODateTime;
17788
+ taskId: z.ZodNullable<z.ZodString>;
17789
+ state: z.ZodEnum<{
17790
+ running: "running";
17791
+ failed: "failed";
17792
+ done: "done";
17793
+ skipped: "skipped";
17794
+ notified: "notified";
17795
+ }>;
17796
+ note: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
17797
+ kind: z.ZodLiteral<"offline">;
17798
+ device: z.ZodString;
17799
+ }, z.core.$strip>, z.ZodObject<{
17800
+ kind: z.ZodLiteral<"limit">;
17801
+ limit: z.ZodInt;
17802
+ calls: z.ZodInt;
17803
+ }, z.core.$strip>, z.ZodObject<{
17804
+ kind: z.ZodLiteral<"command_timed_out">;
17805
+ }, z.core.$strip>, z.ZodObject<{
17806
+ kind: z.ZodLiteral<"command_failed">;
17807
+ message: z.ZodString;
17808
+ }, z.core.$strip>, z.ZodObject<{
17809
+ kind: z.ZodLiteral<"turn_failed">;
17810
+ message: z.ZodString;
17811
+ code: z.ZodNullable<z.ZodString>;
17812
+ }, z.core.$strip>], "kind">>;
17813
+ line: z.ZodNullable<z.ZodString>;
17814
+ turn: z.ZodNullable<z.ZodString>;
17815
+ }, z.core.$strip>;
17816
+ type ScheduleRunDto = z.infer<typeof scheduleRunDtoSchema>;
17817
+ /** A schedule as `jush schedule` shows it, with its latest runs. */
17818
+ declare const scheduleDtoSchema: z.ZodObject<{
17819
+ id: z.ZodString;
17820
+ name: z.ZodString;
17821
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
17822
+ kind: z.ZodLiteral<"time">;
17823
+ timing: z.ZodDiscriminatedUnion<[z.ZodObject<{
17824
+ kind: z.ZodLiteral<"once">;
17825
+ at: z.ZodISODateTime;
17826
+ }, z.core.$strip>, z.ZodObject<{
17827
+ kind: z.ZodLiteral<"repeat">;
17828
+ repeat: z.ZodObject<{
17829
+ every: z.ZodInt;
17830
+ unit: z.ZodEnum<{
17831
+ days: "days";
17832
+ weeks: "weeks";
17833
+ months: "months";
17834
+ years: "years";
17835
+ }>;
17836
+ start: z.ZodNullable<z.ZodString>;
17837
+ }, z.core.$strip>;
17838
+ tasks: z.ZodArray<z.ZodObject<{
17839
+ id: z.ZodString;
17840
+ time: z.ZodString;
17841
+ days: z.ZodArray<z.ZodEnum<{
17842
+ mon: "mon";
17843
+ tue: "tue";
17844
+ wed: "wed";
17845
+ thu: "thu";
17846
+ fri: "fri";
17847
+ sat: "sat";
17848
+ sun: "sun";
17849
+ }>>;
17850
+ day: z.ZodDiscriminatedUnion<[z.ZodObject<{
17851
+ kind: z.ZodLiteral<"date">;
17852
+ date: z.ZodInt;
17853
+ }, z.core.$strip>, z.ZodObject<{
17854
+ kind: z.ZodLiteral<"last_day">;
17855
+ }, z.core.$strip>, z.ZodObject<{
17856
+ kind: z.ZodLiteral<"weekday">;
17857
+ week: z.ZodEnum<{
17858
+ first: "first";
17859
+ second: "second";
17860
+ third: "third";
17861
+ fourth: "fourth";
17862
+ last: "last";
17863
+ }>;
17864
+ weekday: z.ZodEnum<{
17865
+ mon: "mon";
17866
+ tue: "tue";
17867
+ wed: "wed";
17868
+ thu: "thu";
17869
+ fri: "fri";
17870
+ sat: "sat";
17871
+ sun: "sun";
17872
+ }>;
17873
+ }, z.core.$strip>, z.ZodObject<{
17874
+ kind: z.ZodLiteral<"working_day">;
17875
+ which: z.ZodEnum<{
17876
+ first: "first";
17877
+ last: "last";
17878
+ }>;
17879
+ }, z.core.$strip>], "kind">;
17880
+ month: z.ZodInt;
17881
+ holidays: z.ZodNullable<z.ZodObject<{
17882
+ country: z.ZodString;
17883
+ region: z.ZodNullable<z.ZodString>;
17884
+ }, z.core.$strip>>;
17885
+ prompt: z.ZodString;
17886
+ }, z.core.$strip>>;
17887
+ }, z.core.$strip>, z.ZodObject<{
17888
+ kind: z.ZodLiteral<"every">;
17889
+ minutes: z.ZodInt;
17890
+ }, z.core.$strip>, z.ZodObject<{
17891
+ kind: z.ZodLiteral<"cron">;
17892
+ expression: z.ZodString;
17893
+ }, z.core.$strip>], "kind">;
17894
+ }, z.core.$strip>, z.ZodObject<{
17895
+ kind: z.ZodLiteral<"change">;
17896
+ command: z.ZodString;
17897
+ everyMinutes: z.ZodInt;
17898
+ }, z.core.$strip>, z.ZodObject<{
17899
+ kind: z.ZodLiteral<"url">;
17900
+ }, z.core.$strip>, z.ZodObject<{
17901
+ kind: z.ZodLiteral<"done">;
17902
+ conversation: z.ZodString;
17903
+ }, z.core.$strip>], "kind">;
17904
+ timeZone: z.ZodString;
17905
+ maxRunsPerDay: z.ZodNullable<z.ZodInt>;
17906
+ ifBusy: z.ZodEnum<{
17907
+ queue: "queue";
17908
+ steer: "steer";
17909
+ }>;
17910
+ prompt: z.ZodString;
17911
+ paused: z.ZodBoolean;
17912
+ nextAt: z.ZodNullable<z.ZodISODateTime>;
17913
+ createdAt: z.ZodISODateTime;
17914
+ createdIn: z.ZodNullable<z.ZodObject<{
17915
+ node: z.ZodString;
17916
+ turn: z.ZodString;
17917
+ }, z.core.$strip>>;
17918
+ editedIn: z.ZodNullable<z.ZodObject<{
17919
+ node: z.ZodString;
17920
+ turn: z.ZodString;
17921
+ }, z.core.$strip>>;
17922
+ runs: z.ZodArray<z.ZodObject<{
17923
+ id: z.ZodString;
17924
+ cause: z.ZodEnum<{
17925
+ url: "url";
17926
+ time: "time";
17927
+ change: "change";
17928
+ done: "done";
17929
+ now: "now";
17930
+ }>;
17931
+ at: z.ZodISODateTime;
17932
+ taskId: z.ZodNullable<z.ZodString>;
17933
+ state: z.ZodEnum<{
17934
+ running: "running";
17935
+ failed: "failed";
17936
+ done: "done";
17937
+ skipped: "skipped";
17938
+ notified: "notified";
17939
+ }>;
17940
+ note: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
17941
+ kind: z.ZodLiteral<"offline">;
17942
+ device: z.ZodString;
17943
+ }, z.core.$strip>, z.ZodObject<{
17944
+ kind: z.ZodLiteral<"limit">;
17945
+ limit: z.ZodInt;
17946
+ calls: z.ZodInt;
17947
+ }, z.core.$strip>, z.ZodObject<{
17948
+ kind: z.ZodLiteral<"command_timed_out">;
17949
+ }, z.core.$strip>, z.ZodObject<{
17950
+ kind: z.ZodLiteral<"command_failed">;
17951
+ message: z.ZodString;
17952
+ }, z.core.$strip>, z.ZodObject<{
17953
+ kind: z.ZodLiteral<"turn_failed">;
17954
+ message: z.ZodString;
17955
+ code: z.ZodNullable<z.ZodString>;
17956
+ }, z.core.$strip>], "kind">>;
17957
+ line: z.ZodNullable<z.ZodString>;
17958
+ turn: z.ZodNullable<z.ZodString>;
17959
+ }, z.core.$strip>>;
17960
+ }, z.core.$strip>;
17961
+ type ScheduleDto = z.infer<typeof scheduleDtoSchema>;
17962
+ /**
17963
+ * A schedule a program made or changed, with a URL trigger's secret when
17964
+ * the change made one: the only time the secret is shown.
17965
+ */
17966
+ declare const scheduleAnswerSchema: z.ZodObject<{
17967
+ schedule: z.ZodObject<{
17968
+ id: z.ZodString;
17969
+ name: z.ZodString;
17970
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
17971
+ kind: z.ZodLiteral<"time">;
17972
+ timing: z.ZodDiscriminatedUnion<[z.ZodObject<{
17973
+ kind: z.ZodLiteral<"once">;
17974
+ at: z.ZodISODateTime;
17975
+ }, z.core.$strip>, z.ZodObject<{
17976
+ kind: z.ZodLiteral<"repeat">;
17977
+ repeat: z.ZodObject<{
17978
+ every: z.ZodInt;
17979
+ unit: z.ZodEnum<{
17980
+ days: "days";
17981
+ weeks: "weeks";
17982
+ months: "months";
17983
+ years: "years";
17984
+ }>;
17985
+ start: z.ZodNullable<z.ZodString>;
17986
+ }, z.core.$strip>;
17987
+ tasks: z.ZodArray<z.ZodObject<{
17988
+ id: z.ZodString;
17989
+ time: z.ZodString;
17990
+ days: z.ZodArray<z.ZodEnum<{
17991
+ mon: "mon";
17992
+ tue: "tue";
17993
+ wed: "wed";
17994
+ thu: "thu";
17995
+ fri: "fri";
17996
+ sat: "sat";
17997
+ sun: "sun";
17998
+ }>>;
17999
+ day: z.ZodDiscriminatedUnion<[z.ZodObject<{
18000
+ kind: z.ZodLiteral<"date">;
18001
+ date: z.ZodInt;
18002
+ }, z.core.$strip>, z.ZodObject<{
18003
+ kind: z.ZodLiteral<"last_day">;
18004
+ }, z.core.$strip>, z.ZodObject<{
18005
+ kind: z.ZodLiteral<"weekday">;
18006
+ week: z.ZodEnum<{
18007
+ first: "first";
18008
+ second: "second";
18009
+ third: "third";
18010
+ fourth: "fourth";
18011
+ last: "last";
18012
+ }>;
18013
+ weekday: z.ZodEnum<{
18014
+ mon: "mon";
18015
+ tue: "tue";
18016
+ wed: "wed";
18017
+ thu: "thu";
18018
+ fri: "fri";
18019
+ sat: "sat";
18020
+ sun: "sun";
18021
+ }>;
18022
+ }, z.core.$strip>, z.ZodObject<{
18023
+ kind: z.ZodLiteral<"working_day">;
18024
+ which: z.ZodEnum<{
18025
+ first: "first";
18026
+ last: "last";
18027
+ }>;
18028
+ }, z.core.$strip>], "kind">;
18029
+ month: z.ZodInt;
18030
+ holidays: z.ZodNullable<z.ZodObject<{
18031
+ country: z.ZodString;
18032
+ region: z.ZodNullable<z.ZodString>;
18033
+ }, z.core.$strip>>;
18034
+ prompt: z.ZodString;
18035
+ }, z.core.$strip>>;
18036
+ }, z.core.$strip>, z.ZodObject<{
18037
+ kind: z.ZodLiteral<"every">;
18038
+ minutes: z.ZodInt;
18039
+ }, z.core.$strip>, z.ZodObject<{
18040
+ kind: z.ZodLiteral<"cron">;
18041
+ expression: z.ZodString;
18042
+ }, z.core.$strip>], "kind">;
18043
+ }, z.core.$strip>, z.ZodObject<{
18044
+ kind: z.ZodLiteral<"change">;
18045
+ command: z.ZodString;
18046
+ everyMinutes: z.ZodInt;
18047
+ }, z.core.$strip>, z.ZodObject<{
18048
+ kind: z.ZodLiteral<"url">;
18049
+ }, z.core.$strip>, z.ZodObject<{
18050
+ kind: z.ZodLiteral<"done">;
18051
+ conversation: z.ZodString;
18052
+ }, z.core.$strip>], "kind">;
18053
+ timeZone: z.ZodString;
18054
+ maxRunsPerDay: z.ZodNullable<z.ZodInt>;
18055
+ ifBusy: z.ZodEnum<{
18056
+ queue: "queue";
18057
+ steer: "steer";
18058
+ }>;
18059
+ prompt: z.ZodString;
18060
+ paused: z.ZodBoolean;
18061
+ nextAt: z.ZodNullable<z.ZodISODateTime>;
18062
+ createdAt: z.ZodISODateTime;
18063
+ createdIn: z.ZodNullable<z.ZodObject<{
18064
+ node: z.ZodString;
18065
+ turn: z.ZodString;
18066
+ }, z.core.$strip>>;
18067
+ editedIn: z.ZodNullable<z.ZodObject<{
18068
+ node: z.ZodString;
18069
+ turn: z.ZodString;
18070
+ }, z.core.$strip>>;
18071
+ runs: z.ZodArray<z.ZodObject<{
18072
+ id: z.ZodString;
18073
+ cause: z.ZodEnum<{
18074
+ url: "url";
18075
+ time: "time";
18076
+ change: "change";
18077
+ done: "done";
18078
+ now: "now";
18079
+ }>;
18080
+ at: z.ZodISODateTime;
18081
+ taskId: z.ZodNullable<z.ZodString>;
18082
+ state: z.ZodEnum<{
18083
+ running: "running";
18084
+ failed: "failed";
18085
+ done: "done";
18086
+ skipped: "skipped";
18087
+ notified: "notified";
18088
+ }>;
18089
+ note: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
18090
+ kind: z.ZodLiteral<"offline">;
18091
+ device: z.ZodString;
18092
+ }, z.core.$strip>, z.ZodObject<{
18093
+ kind: z.ZodLiteral<"limit">;
18094
+ limit: z.ZodInt;
18095
+ calls: z.ZodInt;
18096
+ }, z.core.$strip>, z.ZodObject<{
18097
+ kind: z.ZodLiteral<"command_timed_out">;
18098
+ }, z.core.$strip>, z.ZodObject<{
18099
+ kind: z.ZodLiteral<"command_failed">;
18100
+ message: z.ZodString;
18101
+ }, z.core.$strip>, z.ZodObject<{
18102
+ kind: z.ZodLiteral<"turn_failed">;
18103
+ message: z.ZodString;
18104
+ code: z.ZodNullable<z.ZodString>;
18105
+ }, z.core.$strip>], "kind">>;
18106
+ line: z.ZodNullable<z.ZodString>;
18107
+ turn: z.ZodNullable<z.ZodString>;
18108
+ }, z.core.$strip>>;
18109
+ }, z.core.$strip>;
18110
+ secret: z.ZodNullable<z.ZodString>;
18111
+ }, z.core.$strip>;
18112
+ type ScheduleAnswer = z.infer<typeof scheduleAnswerSchema>;
18113
+ /**
18114
+ * What `jush schedule create` and `edit`, and a program's
18115
+ * `POST /conversations/:id/schedules` and `PATCH` of one, change; a new
18116
+ * schedule starts from its defaults, *New Schedule*, every day with one task
18117
+ * at 09:00 and no message, which waits if the conversation is busy, and
18118
+ * takes these over them. It is on unless the patch pauses it.
18119
+ */
18120
+ declare const schedulePatchSchema: z.ZodObject<{
18121
+ name: z.ZodOptional<z.ZodString>;
18122
+ trigger: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
18123
+ kind: z.ZodLiteral<"time">;
18124
+ timing: z.ZodDiscriminatedUnion<[z.ZodObject<{
18125
+ kind: z.ZodLiteral<"once">;
18126
+ at: z.ZodISODateTime;
18127
+ }, z.core.$strip>, z.ZodObject<{
18128
+ kind: z.ZodLiteral<"repeat">;
18129
+ repeat: z.ZodObject<{
18130
+ every: z.ZodInt;
18131
+ unit: z.ZodEnum<{
18132
+ days: "days";
18133
+ weeks: "weeks";
18134
+ months: "months";
18135
+ years: "years";
18136
+ }>;
18137
+ start: z.ZodNullable<z.ZodString>;
18138
+ }, z.core.$strip>;
18139
+ tasks: z.ZodArray<z.ZodObject<{
18140
+ id: z.ZodString;
18141
+ time: z.ZodString;
18142
+ days: z.ZodArray<z.ZodEnum<{
18143
+ mon: "mon";
18144
+ tue: "tue";
18145
+ wed: "wed";
18146
+ thu: "thu";
18147
+ fri: "fri";
18148
+ sat: "sat";
18149
+ sun: "sun";
18150
+ }>>;
18151
+ day: z.ZodDiscriminatedUnion<[z.ZodObject<{
18152
+ kind: z.ZodLiteral<"date">;
18153
+ date: z.ZodInt;
18154
+ }, z.core.$strip>, z.ZodObject<{
18155
+ kind: z.ZodLiteral<"last_day">;
18156
+ }, z.core.$strip>, z.ZodObject<{
18157
+ kind: z.ZodLiteral<"weekday">;
18158
+ week: z.ZodEnum<{
18159
+ first: "first";
18160
+ second: "second";
18161
+ third: "third";
18162
+ fourth: "fourth";
18163
+ last: "last";
18164
+ }>;
18165
+ weekday: z.ZodEnum<{
18166
+ mon: "mon";
18167
+ tue: "tue";
18168
+ wed: "wed";
18169
+ thu: "thu";
18170
+ fri: "fri";
18171
+ sat: "sat";
18172
+ sun: "sun";
18173
+ }>;
18174
+ }, z.core.$strip>, z.ZodObject<{
18175
+ kind: z.ZodLiteral<"working_day">;
18176
+ which: z.ZodEnum<{
18177
+ first: "first";
18178
+ last: "last";
18179
+ }>;
18180
+ }, z.core.$strip>], "kind">;
18181
+ month: z.ZodInt;
18182
+ holidays: z.ZodNullable<z.ZodObject<{
18183
+ country: z.ZodString;
18184
+ region: z.ZodNullable<z.ZodString>;
18185
+ }, z.core.$strip>>;
18186
+ prompt: z.ZodString;
18187
+ }, z.core.$strip>>;
18188
+ }, z.core.$strip>, z.ZodObject<{
18189
+ kind: z.ZodLiteral<"every">;
18190
+ minutes: z.ZodInt;
18191
+ }, z.core.$strip>, z.ZodObject<{
18192
+ kind: z.ZodLiteral<"cron">;
18193
+ expression: z.ZodString;
18194
+ }, z.core.$strip>], "kind">;
18195
+ }, z.core.$strip>, z.ZodObject<{
18196
+ kind: z.ZodLiteral<"change">;
18197
+ command: z.ZodString;
18198
+ everyMinutes: z.ZodInt;
18199
+ }, z.core.$strip>, z.ZodObject<{
18200
+ kind: z.ZodLiteral<"url">;
18201
+ }, z.core.$strip>, z.ZodObject<{
18202
+ kind: z.ZodLiteral<"done">;
18203
+ conversation: z.ZodString;
18204
+ }, z.core.$strip>], "kind">>;
18205
+ timeZone: z.ZodOptional<z.ZodString>;
18206
+ maxRunsPerDay: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
18207
+ ifBusy: z.ZodOptional<z.ZodEnum<{
18208
+ queue: "queue";
18209
+ steer: "steer";
18210
+ }>>;
18211
+ prompt: z.ZodOptional<z.ZodString>;
18212
+ paused: z.ZodOptional<z.ZodBoolean>;
18213
+ }, z.core.$strict>;
18214
+ type SchedulePatch = z.infer<typeof schedulePatchSchema>;
17647
18215
  /** What the program answers: how the notification `id` went. */
17648
18216
  declare const starterAnswerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
17649
18217
  type: z.ZodLiteral<"sending">;
@@ -18643,6 +19211,23 @@ type ConversationEvent = ClientSessionEvent | {
18643
19211
  type: 'permission';
18644
19212
  permission: Permission;
18645
19213
  };
19214
+ /**
19215
+ * A conversation's schedules, as `jush schedule` acts on them; each call is
19216
+ * one of the core's routes, and opens no lane.
19217
+ */
19218
+ interface ConversationSchedules {
19219
+ /** Makes one from the patch over the defaults `jush schedule create` takes; it is on unless the patch pauses it. */
19220
+ create(patch: SchedulePatch): Promise<ScheduleAnswer>;
19221
+ get(id: string): Promise<ScheduleDto>;
19222
+ /** Changes what the patch names. */
19223
+ update(id: string, patch: SchedulePatch): Promise<ScheduleAnswer>;
19224
+ /** Removes it and its runs' records. */
19225
+ remove(id: string): Promise<void>;
19226
+ /** Runs it now, of the repeat's task `task`; resolves with the run as it started, before its message names a turn. */
19227
+ run(id: string, task?: string): Promise<ScheduleRunDto>;
19228
+ /** Its runs before the run `before`, newest first, 50 at most; the latest without it. */
19229
+ runs(id: string, before?: string): Promise<ScheduleRunDto[]>;
19230
+ }
18646
19231
  declare class Conversation {
18647
19232
  readonly id: string;
18648
19233
  private readonly routes;
@@ -18660,6 +19245,7 @@ declare class Conversation {
18660
19245
  private reopening;
18661
19246
  /** Whether the lane dropped again while it was being opened again. */
18662
19247
  private droppedAgain;
19248
+ readonly schedules: ConversationSchedules;
18663
19249
  constructor(id: string, routes: CoreRoutes);
18664
19250
  /** Opens the conversation's lane, once; each action opens it first. */
18665
19251
  open(): Promise<ConversationClient>;
@@ -19006,6 +19592,28 @@ declare class Providers {
19006
19592
  signIn(login: SubscriptionLogin): Promise<SignIn>;
19007
19593
  private signInOf;
19008
19594
  }
19595
+ /** Where and how `device.exec` runs a script. */
19596
+ interface ExecOptions {
19597
+ /** The directory it starts in; the home directory the device's runner reported by default. */
19598
+ cwd?: string;
19599
+ /** The variables it starts with, above the device's own environment. */
19600
+ env?: Record<string, string>;
19601
+ /** What it reads on its standard input, which then ends. */
19602
+ stdin?: string;
19603
+ /** How many milliseconds it may run before it is stopped on the device; 0, the default, or `Infinity` for no limit. */
19604
+ timeout?: number;
19605
+ /** Stops it; the run rejects with its reason, as a `fetch` does. */
19606
+ signal?: AbortSignal;
19607
+ }
19608
+ /** How a script `device.exec` ran exited, and what it printed, read as UTF-8. */
19609
+ interface ExecResult {
19610
+ /** Its exit status, as the agent's shell reports one. */
19611
+ exitCode: number;
19612
+ stdout: string;
19613
+ stderr: string;
19614
+ /** The bytes missing from `stdout` and `stderr`: a device keeps 16 MiB of a script's output and leaves out the middle of more, and a read of it that failed keeps only its first and newest bytes. */
19615
+ leftOutBytes: number;
19616
+ }
19009
19617
  /** A device of the core, which a runner serves: one that dialed the process, or over a channel the program gives it. */
19010
19618
  declare class Device {
19011
19619
  private readonly listed;
@@ -19038,6 +19646,17 @@ declare class Device {
19038
19646
  * `connect` does; a command that exits before is stopped and fails it.
19039
19647
  */
19040
19648
  spawn(command?: readonly string[]): Promise<ChildProcess>;
19649
+ /**
19650
+ * Runs `script` on the device, outside any conversation, as the agent's
19651
+ * shell runs a command, and resolves once it exited, whatever its status.
19652
+ * Rejects with a `JushError` when it has no status: `device_offline`, when
19653
+ * it never ran; `command_timed_out`, when it ran past `timeout` and was
19654
+ * stopped (`SIGTERM`, then `SIGKILL` 5 seconds later), with what it printed
19655
+ * in `body.output`; `device_lost`, when the device lost it or its input was
19656
+ * cut; `backend_closing`, when the core closed while it ran, whose device
19657
+ * stops it when it connects again.
19658
+ */
19659
+ exec(script: string, options?: ExecOptions): Promise<ExecResult>;
19041
19660
  /**
19042
19661
  * Revokes the device, as the app's Revoke does: its token opens nothing
19043
19662
  * from then on, the commands running on it are lost, and the commands of
@@ -19138,4 +19757,4 @@ declare class Jush {
19138
19757
  private call;
19139
19758
  }
19140
19759
  //#endregion
19141
- export { type AcceptedSocket, type CommandCall, Conversation, type ConversationEvent, type ConversationOptions, Conversations, Core, Device, Devices, type GroupDefinition, type Input, Jush, type JushConnection, JushError, type JushOptions, type LeafDefinition, type Notified, type Permission, type Plugin, type PluginDefinition, type PluginPort, PortFailure, type ProviderAccounts, Providers, type SignIn, type Turn, definePlugin, leaf };
19760
+ export { type AcceptedSocket, type CommandCall, Conversation, type ConversationEvent, type ConversationOptions, type ConversationSchedules, Conversations, Core, Device, Devices, type ExecOptions, type ExecResult, type GroupDefinition, type Input, Jush, type JushConnection, JushError, type JushOptions, type LeafDefinition, type Notified, type Permission, type Plugin, type PluginDefinition, type PluginPort, PortFailure, type ProviderAccounts, Providers, type SignIn, type Turn, definePlugin, leaf };