@anchrd/colab-sdk 0.1.6 → 0.1.8

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.
Files changed (75) hide show
  1. package/dist/actions/actions.d.ts +120 -112
  2. package/dist/actions/actions.js +29 -23
  3. package/dist/apps/apps.d.ts +8 -8
  4. package/dist/apps/apps.js +6 -6
  5. package/dist/archive/archive.d.ts +2 -2
  6. package/dist/archive/archive.js +2 -2
  7. package/dist/boards/boards.d.ts +60 -60
  8. package/dist/boards/boards.js +19 -19
  9. package/dist/columns/columns.d.ts +1 -1
  10. package/dist/columns/columns.js +1 -1
  11. package/dist/connections/connections.d.ts +15 -15
  12. package/dist/connections/connections.js +6 -6
  13. package/dist/connectors/connectors.d.ts +14 -14
  14. package/dist/connectors/connectors.js +7 -7
  15. package/dist/dashboards/dashboards.d.ts +3 -3
  16. package/dist/dashboards/dashboards.js +3 -3
  17. package/dist/directory/directory.d.ts +1 -1
  18. package/dist/directory/directory.js +1 -1
  19. package/dist/documents/documents.d.ts +6 -6
  20. package/dist/documents/documents.js +1 -1
  21. package/dist/events/events.d.ts +7 -7
  22. package/dist/events/events.js +4 -4
  23. package/dist/files/files.d.ts +19 -5
  24. package/dist/files/files.js +12 -6
  25. package/dist/functions/functions.d.ts +1 -1
  26. package/dist/functions/functions.js +1 -1
  27. package/dist/grammar/grammar.d.ts +1 -0
  28. package/dist/grammar/grammar.js +5 -1
  29. package/dist/grants/grants.d.ts +7 -7
  30. package/dist/grants/grants.js +5 -5
  31. package/dist/instructions/instructions.d.ts +3 -3
  32. package/dist/instructions/instructions.js +2 -2
  33. package/dist/interfaces/interfaces.d.ts +1 -1
  34. package/dist/interfaces/interfaces.js +1 -1
  35. package/dist/invitations/invitations.d.ts +8 -8
  36. package/dist/invitations/invitations.js +4 -4
  37. package/dist/links/links.d.ts +3 -3
  38. package/dist/links/links.js +2 -2
  39. package/dist/machines/machines.d.ts +5 -5
  40. package/dist/machines/machines.js +2 -2
  41. package/dist/messages/messages.d.ts +12 -12
  42. package/dist/messages/messages.js +5 -5
  43. package/dist/nodes/nodes.d.ts +58 -58
  44. package/dist/nodes/nodes.js +19 -19
  45. package/dist/operators/operators.d.ts +149 -43
  46. package/dist/operators/operators.js +88 -19
  47. package/dist/pages/pages.d.ts +22 -22
  48. package/dist/pages/pages.js +8 -6
  49. package/dist/profile/profile.d.ts +1 -1
  50. package/dist/profile/profile.js +1 -1
  51. package/dist/roles/roles.d.ts +12 -12
  52. package/dist/roles/roles.js +7 -7
  53. package/dist/runs/runs.d.ts +23 -23
  54. package/dist/runs/runs.js +9 -9
  55. package/dist/runtime-config.d.ts +1 -1
  56. package/dist/runtime-config.js +1 -1
  57. package/dist/sdk.d.ts +3 -3
  58. package/dist/sdk.js +3 -3
  59. package/dist/secrets/secrets.d.ts +5 -5
  60. package/dist/secrets/secrets.js +2 -2
  61. package/dist/services/services.d.ts +15 -15
  62. package/dist/services/services.js +6 -6
  63. package/dist/sso/sso.d.ts +4 -4
  64. package/dist/sso/sso.js +3 -3
  65. package/dist/tables/tables.d.ts +4 -4
  66. package/dist/tables/tables.js +4 -4
  67. package/dist/user-settings/user-settings.d.ts +1 -1
  68. package/dist/user-settings/user-settings.js +1 -1
  69. package/dist/users/users.d.ts +23 -23
  70. package/dist/users/users.js +9 -9
  71. package/dist/validation/validation.d.ts +11 -11
  72. package/dist/validation/validation.js +4 -4
  73. package/dist/versions/versions.d.ts +7 -7
  74. package/dist/versions/versions.js +2 -2
  75. package/package.json +1 -1
@@ -151,7 +151,7 @@ export declare const Credential: z.ZodObject<{
151
151
  createdAt: z.ZodISODateTime;
152
152
  createdBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
153
153
  updatedAt: z.ZodISODateTime;
154
- }, z.core.$strict>;
154
+ }, z.core.$strip>;
155
155
  export type Credential = z.infer<typeof Credential>;
156
156
  export declare const CredentialList: z.ZodObject<{
157
157
  items: z.ZodArray<z.ZodObject<{
@@ -177,16 +177,16 @@ export declare const CredentialList: z.ZodObject<{
177
177
  createdAt: z.ZodISODateTime;
178
178
  createdBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
179
179
  updatedAt: z.ZodISODateTime;
180
- }, z.core.$strict>>;
180
+ }, z.core.$strip>>;
181
181
  nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`credential_${string}`>>;
182
- }, z.core.$strict>;
182
+ }, z.core.$strip>;
183
183
  export type CredentialList = z.infer<typeof CredentialList>;
184
184
  export declare const CredentialTestResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
185
185
  ok: z.ZodLiteral<true>;
186
- }, z.core.$strict>, z.ZodObject<{
186
+ }, z.core.$strip>, z.ZodObject<{
187
187
  ok: z.ZodLiteral<false>;
188
188
  error: z.ZodString;
189
- }, z.core.$strict>], "ok">;
189
+ }, z.core.$strip>], "ok">;
190
190
  export type CredentialTestResult = z.infer<typeof CredentialTestResult>;
191
191
  export declare const CredentialTested: z.ZodObject<{
192
192
  credential: z.ZodObject<{
@@ -212,14 +212,14 @@ export declare const CredentialTested: z.ZodObject<{
212
212
  createdAt: z.ZodISODateTime;
213
213
  createdBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
214
214
  updatedAt: z.ZodISODateTime;
215
- }, z.core.$strict>;
215
+ }, z.core.$strip>;
216
216
  test: z.ZodDiscriminatedUnion<[z.ZodObject<{
217
217
  ok: z.ZodLiteral<true>;
218
- }, z.core.$strict>, z.ZodObject<{
218
+ }, z.core.$strip>, z.ZodObject<{
219
219
  ok: z.ZodLiteral<false>;
220
220
  error: z.ZodString;
221
- }, z.core.$strict>], "ok">;
222
- }, z.core.$strict>;
221
+ }, z.core.$strip>], "ok">;
222
+ }, z.core.$strip>;
223
223
  export type CredentialTested = z.infer<typeof CredentialTested>;
224
224
  export declare const Subagents: z.ZodObject<{
225
225
  allowed: z.ZodBoolean;
@@ -516,12 +516,12 @@ export declare const Operator: z.ZodObject<{
516
516
  running: z.ZodNullable<z.ZodObject<{
517
517
  runId: z.ZodTemplateLiteral<`run_${string}`>;
518
518
  startedAt: z.ZodISODateTime;
519
- }, z.core.$strict>>;
519
+ }, z.core.$strip>>;
520
520
  archivedAt: z.ZodNullable<z.ZodISODateTime>;
521
521
  createdAt: z.ZodISODateTime;
522
522
  createdBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
523
523
  updatedAt: z.ZodISODateTime;
524
- }, z.core.$strict>;
524
+ }, z.core.$strip>;
525
525
  export type Operator = z.infer<typeof Operator>;
526
526
  export declare const OperatorList: z.ZodObject<{
527
527
  items: z.ZodArray<z.ZodObject<{
@@ -602,14 +602,14 @@ export declare const OperatorList: z.ZodObject<{
602
602
  running: z.ZodNullable<z.ZodObject<{
603
603
  runId: z.ZodTemplateLiteral<`run_${string}`>;
604
604
  startedAt: z.ZodISODateTime;
605
- }, z.core.$strict>>;
605
+ }, z.core.$strip>>;
606
606
  archivedAt: z.ZodNullable<z.ZodISODateTime>;
607
607
  createdAt: z.ZodISODateTime;
608
608
  createdBy: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
609
609
  updatedAt: z.ZodISODateTime;
610
- }, z.core.$strict>>;
610
+ }, z.core.$strip>>;
611
611
  nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
612
- }, z.core.$strict>;
612
+ }, z.core.$strip>;
613
613
  export type OperatorList = z.infer<typeof OperatorList>;
614
614
  export declare const OperatorRunId: z.ZodTemplateLiteral<`run_${string}`>;
615
615
  export type OperatorRunId = z.infer<typeof OperatorRunId>;
@@ -617,6 +617,7 @@ export declare const OperatorRunStatus: z.ZodEnum<{
617
617
  running: "running";
618
618
  failed: "failed";
619
619
  completed: "completed";
620
+ stopped: "stopped";
620
621
  }>;
621
622
  export type OperatorRunStatus = z.infer<typeof OperatorRunStatus>;
622
623
  export declare const OperatorRunReason: z.ZodEnum<{
@@ -640,13 +641,24 @@ export declare const OperatorRunTokens: z.ZodObject<{
640
641
  output: z.ZodInt;
641
642
  cacheRead: z.ZodInt;
642
643
  cacheWrite: z.ZodInt;
643
- }, z.core.$strict>;
644
+ }, z.core.$strip>;
644
645
  export type OperatorRunTokens = z.infer<typeof OperatorRunTokens>;
645
646
  export declare const OperatorRunTouched: z.ZodObject<{
646
647
  processes: z.ZodArray<z.ZodString>;
647
648
  connectors: z.ZodArray<z.ZodString>;
648
- }, z.core.$strict>;
649
+ }, z.core.$strip>;
649
650
  export type OperatorRunTouched = z.infer<typeof OperatorRunTouched>;
651
+ export declare const OperatorRunInstructions: z.ZodObject<{
652
+ version: z.ZodNullable<z.ZodInt>;
653
+ status: z.ZodNullable<z.ZodString>;
654
+ cut: z.ZodBoolean;
655
+ }, z.core.$strip>;
656
+ export type OperatorRunInstructions = z.infer<typeof OperatorRunInstructions>;
657
+ export declare const OperatorRunAgents: z.ZodObject<{
658
+ started: z.ZodInt;
659
+ running: z.ZodInt;
660
+ }, z.core.$strip>;
661
+ export type OperatorRunAgents = z.infer<typeof OperatorRunAgents>;
650
662
  export declare const OperatorRun: z.ZodObject<{
651
663
  trigger: z.ZodEnum<{
652
664
  schedule: "schedule";
@@ -657,6 +669,7 @@ export declare const OperatorRun: z.ZodObject<{
657
669
  running: "running";
658
670
  failed: "failed";
659
671
  completed: "completed";
672
+ stopped: "stopped";
660
673
  }>;
661
674
  reason: z.ZodNullable<z.ZodEnum<{
662
675
  error: "error";
@@ -672,7 +685,12 @@ export declare const OperatorRun: z.ZodObject<{
672
685
  touched: z.ZodObject<{
673
686
  processes: z.ZodArray<z.ZodString>;
674
687
  connectors: z.ZodArray<z.ZodString>;
675
- }, z.core.$strict>;
688
+ }, z.core.$strip>;
689
+ instructions: z.ZodNullable<z.ZodObject<{
690
+ version: z.ZodNullable<z.ZodInt>;
691
+ status: z.ZodNullable<z.ZodString>;
692
+ cut: z.ZodBoolean;
693
+ }, z.core.$strip>>;
676
694
  credentialKind: z.ZodNullable<z.ZodEnum<{
677
695
  subscription: "subscription";
678
696
  apikey: "apikey";
@@ -684,7 +702,15 @@ export declare const OperatorRun: z.ZodObject<{
684
702
  output: z.ZodInt;
685
703
  cacheRead: z.ZodInt;
686
704
  cacheWrite: z.ZodInt;
687
- }, z.core.$strict>>;
705
+ }, z.core.$strip>>;
706
+ agents: z.ZodNullable<z.ZodObject<{
707
+ started: z.ZodInt;
708
+ running: z.ZodInt;
709
+ }, z.core.$strip>>;
710
+ stoppedBy: z.ZodNullable<z.ZodObject<{
711
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
712
+ name: z.ZodString;
713
+ }, z.core.$strip>>;
688
714
  startedAt: z.ZodISODateTime;
689
715
  endedAt: z.ZodNullable<z.ZodISODateTime>;
690
716
  durationMs: z.ZodNullable<z.ZodInt>;
@@ -692,7 +718,7 @@ export declare const OperatorRun: z.ZodObject<{
692
718
  machineName: z.ZodString;
693
719
  machineArchivedAt: z.ZodNullable<z.ZodISODateTime>;
694
720
  runId: z.ZodTemplateLiteral<`run_${string}`>;
695
- }, z.core.$strict>;
721
+ }, z.core.$strip>;
696
722
  export type OperatorRun = z.infer<typeof OperatorRun>;
697
723
  export declare const OperatorRunListInput: z.ZodObject<{
698
724
  machineId: z.ZodOptional<z.ZodTemplateLiteral<`user_${string}`>>;
@@ -705,6 +731,7 @@ export declare const OperatorRunListInput: z.ZodObject<{
705
731
  running: "running";
706
732
  failed: "failed";
707
733
  completed: "completed";
734
+ stopped: "stopped";
708
735
  }>>;
709
736
  from: z.ZodOptional<z.ZodISODateTime>;
710
737
  to: z.ZodOptional<z.ZodISODateTime>;
@@ -717,6 +744,71 @@ export declare const OperatorRunGetInput: z.ZodObject<{
717
744
  runId: z.ZodTemplateLiteral<`run_${string}`>;
718
745
  }, z.core.$strict>;
719
746
  export type OperatorRunGetInput = z.infer<typeof OperatorRunGetInput>;
747
+ export declare const RunCancelInput: z.ZodObject<{
748
+ runId: z.ZodTemplateLiteral<`run_${string}`>;
749
+ }, z.core.$strict>;
750
+ export type RunCancelInput = z.infer<typeof RunCancelInput>;
751
+ export declare const OperatorRunStepKind: z.ZodEnum<{
752
+ error: "error";
753
+ text: "text";
754
+ thinking: "thinking";
755
+ tool: "tool";
756
+ result: "result";
757
+ agentstart: "agentstart";
758
+ agentend: "agentend";
759
+ truncated: "truncated";
760
+ }>;
761
+ export type OperatorRunStepKind = z.infer<typeof OperatorRunStepKind>;
762
+ export declare const OperatorRunStep: z.ZodObject<{
763
+ seq: z.ZodInt;
764
+ at: z.ZodISODateTime;
765
+ agentId: z.ZodNullable<z.ZodString>;
766
+ kind: z.ZodEnum<{
767
+ error: "error";
768
+ text: "text";
769
+ thinking: "thinking";
770
+ tool: "tool";
771
+ result: "result";
772
+ agentstart: "agentstart";
773
+ agentend: "agentend";
774
+ truncated: "truncated";
775
+ }>;
776
+ name: z.ZodNullable<z.ZodString>;
777
+ callId: z.ZodNullable<z.ZodString>;
778
+ text: z.ZodString;
779
+ failed: z.ZodBoolean;
780
+ }, z.core.$strip>;
781
+ export type OperatorRunStep = z.infer<typeof OperatorRunStep>;
782
+ export declare const RunStepListInput: z.ZodObject<{
783
+ runId: z.ZodTemplateLiteral<`run_${string}`>;
784
+ agentId: z.ZodOptional<z.ZodString>;
785
+ cursor: z.ZodOptional<z.ZodString>;
786
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
787
+ }, z.core.$strict>;
788
+ export type RunStepListInput = z.infer<typeof RunStepListInput>;
789
+ export declare const OperatorRunStepList: z.ZodObject<{
790
+ items: z.ZodArray<z.ZodObject<{
791
+ seq: z.ZodInt;
792
+ at: z.ZodISODateTime;
793
+ agentId: z.ZodNullable<z.ZodString>;
794
+ kind: z.ZodEnum<{
795
+ error: "error";
796
+ text: "text";
797
+ thinking: "thinking";
798
+ tool: "tool";
799
+ result: "result";
800
+ agentstart: "agentstart";
801
+ agentend: "agentend";
802
+ truncated: "truncated";
803
+ }>;
804
+ name: z.ZodNullable<z.ZodString>;
805
+ callId: z.ZodNullable<z.ZodString>;
806
+ text: z.ZodString;
807
+ failed: z.ZodBoolean;
808
+ }, z.core.$strip>>;
809
+ nextCursor: z.ZodNullable<z.ZodString>;
810
+ }, z.core.$strip>;
811
+ export type OperatorRunStepList = z.infer<typeof OperatorRunStepList>;
720
812
  export declare const OperatorRunUsage: z.ZodObject<{
721
813
  byMachine: z.ZodArray<z.ZodObject<{
722
814
  runs: z.ZodInt;
@@ -726,11 +818,11 @@ export declare const OperatorRunUsage: z.ZodObject<{
726
818
  output: z.ZodInt;
727
819
  cacheRead: z.ZodInt;
728
820
  cacheWrite: z.ZodInt;
729
- }, z.core.$strict>;
821
+ }, z.core.$strip>;
730
822
  machineId: z.ZodTemplateLiteral<`user_${string}`>;
731
823
  machineName: z.ZodString;
732
824
  machineArchivedAt: z.ZodNullable<z.ZodISODateTime>;
733
- }, z.core.$strict>>;
825
+ }, z.core.$strip>>;
734
826
  byDay: z.ZodArray<z.ZodObject<{
735
827
  runs: z.ZodInt;
736
828
  costUsd: z.ZodNumber;
@@ -739,9 +831,9 @@ export declare const OperatorRunUsage: z.ZodObject<{
739
831
  output: z.ZodInt;
740
832
  cacheRead: z.ZodInt;
741
833
  cacheWrite: z.ZodInt;
742
- }, z.core.$strict>;
834
+ }, z.core.$strip>;
743
835
  day: z.ZodISODate;
744
- }, z.core.$strict>>;
836
+ }, z.core.$strip>>;
745
837
  byKind: z.ZodArray<z.ZodObject<{
746
838
  runs: z.ZodInt;
747
839
  costUsd: z.ZodNumber;
@@ -750,13 +842,13 @@ export declare const OperatorRunUsage: z.ZodObject<{
750
842
  output: z.ZodInt;
751
843
  cacheRead: z.ZodInt;
752
844
  cacheWrite: z.ZodInt;
753
- }, z.core.$strict>;
845
+ }, z.core.$strip>;
754
846
  kind: z.ZodEnum<{
755
847
  subscription: "subscription";
756
848
  apikey: "apikey";
757
849
  gateway: "gateway";
758
850
  }>;
759
- }, z.core.$strict>>;
851
+ }, z.core.$strip>>;
760
852
  byProvider: z.ZodArray<z.ZodObject<{
761
853
  runs: z.ZodInt;
762
854
  costUsd: z.ZodNumber;
@@ -765,13 +857,13 @@ export declare const OperatorRunUsage: z.ZodObject<{
765
857
  output: z.ZodInt;
766
858
  cacheRead: z.ZodInt;
767
859
  cacheWrite: z.ZodInt;
768
- }, z.core.$strict>;
860
+ }, z.core.$strip>;
769
861
  provider: z.ZodEnum<{
770
862
  claude: "claude";
771
863
  codex: "codex";
772
864
  gemini: "gemini";
773
865
  }>;
774
- }, z.core.$strict>>;
866
+ }, z.core.$strip>>;
775
867
  runs: z.ZodInt;
776
868
  costUsd: z.ZodNumber;
777
869
  tokens: z.ZodObject<{
@@ -779,8 +871,8 @@ export declare const OperatorRunUsage: z.ZodObject<{
779
871
  output: z.ZodInt;
780
872
  cacheRead: z.ZodInt;
781
873
  cacheWrite: z.ZodInt;
782
- }, z.core.$strict>;
783
- }, z.core.$strict>;
874
+ }, z.core.$strip>;
875
+ }, z.core.$strip>;
784
876
  export type OperatorRunUsage = z.infer<typeof OperatorRunUsage>;
785
877
  export declare const OperatorRunList: z.ZodObject<{
786
878
  items: z.ZodArray<z.ZodObject<{
@@ -793,6 +885,7 @@ export declare const OperatorRunList: z.ZodObject<{
793
885
  running: "running";
794
886
  failed: "failed";
795
887
  completed: "completed";
888
+ stopped: "stopped";
796
889
  }>;
797
890
  reason: z.ZodNullable<z.ZodEnum<{
798
891
  error: "error";
@@ -808,7 +901,12 @@ export declare const OperatorRunList: z.ZodObject<{
808
901
  touched: z.ZodObject<{
809
902
  processes: z.ZodArray<z.ZodString>;
810
903
  connectors: z.ZodArray<z.ZodString>;
811
- }, z.core.$strict>;
904
+ }, z.core.$strip>;
905
+ instructions: z.ZodNullable<z.ZodObject<{
906
+ version: z.ZodNullable<z.ZodInt>;
907
+ status: z.ZodNullable<z.ZodString>;
908
+ cut: z.ZodBoolean;
909
+ }, z.core.$strip>>;
812
910
  credentialKind: z.ZodNullable<z.ZodEnum<{
813
911
  subscription: "subscription";
814
912
  apikey: "apikey";
@@ -820,7 +918,15 @@ export declare const OperatorRunList: z.ZodObject<{
820
918
  output: z.ZodInt;
821
919
  cacheRead: z.ZodInt;
822
920
  cacheWrite: z.ZodInt;
823
- }, z.core.$strict>>;
921
+ }, z.core.$strip>>;
922
+ agents: z.ZodNullable<z.ZodObject<{
923
+ started: z.ZodInt;
924
+ running: z.ZodInt;
925
+ }, z.core.$strip>>;
926
+ stoppedBy: z.ZodNullable<z.ZodObject<{
927
+ userId: z.ZodTemplateLiteral<`user_${string}`>;
928
+ name: z.ZodString;
929
+ }, z.core.$strip>>;
824
930
  startedAt: z.ZodISODateTime;
825
931
  endedAt: z.ZodNullable<z.ZodISODateTime>;
826
932
  durationMs: z.ZodNullable<z.ZodInt>;
@@ -828,7 +934,7 @@ export declare const OperatorRunList: z.ZodObject<{
828
934
  machineName: z.ZodString;
829
935
  machineArchivedAt: z.ZodNullable<z.ZodISODateTime>;
830
936
  runId: z.ZodTemplateLiteral<`run_${string}`>;
831
- }, z.core.$strict>>;
937
+ }, z.core.$strip>>;
832
938
  nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`run_${string}`>>;
833
939
  usage: z.ZodObject<{
834
940
  byMachine: z.ZodArray<z.ZodObject<{
@@ -839,11 +945,11 @@ export declare const OperatorRunList: z.ZodObject<{
839
945
  output: z.ZodInt;
840
946
  cacheRead: z.ZodInt;
841
947
  cacheWrite: z.ZodInt;
842
- }, z.core.$strict>;
948
+ }, z.core.$strip>;
843
949
  machineId: z.ZodTemplateLiteral<`user_${string}`>;
844
950
  machineName: z.ZodString;
845
951
  machineArchivedAt: z.ZodNullable<z.ZodISODateTime>;
846
- }, z.core.$strict>>;
952
+ }, z.core.$strip>>;
847
953
  byDay: z.ZodArray<z.ZodObject<{
848
954
  runs: z.ZodInt;
849
955
  costUsd: z.ZodNumber;
@@ -852,9 +958,9 @@ export declare const OperatorRunList: z.ZodObject<{
852
958
  output: z.ZodInt;
853
959
  cacheRead: z.ZodInt;
854
960
  cacheWrite: z.ZodInt;
855
- }, z.core.$strict>;
961
+ }, z.core.$strip>;
856
962
  day: z.ZodISODate;
857
- }, z.core.$strict>>;
963
+ }, z.core.$strip>>;
858
964
  byKind: z.ZodArray<z.ZodObject<{
859
965
  runs: z.ZodInt;
860
966
  costUsd: z.ZodNumber;
@@ -863,13 +969,13 @@ export declare const OperatorRunList: z.ZodObject<{
863
969
  output: z.ZodInt;
864
970
  cacheRead: z.ZodInt;
865
971
  cacheWrite: z.ZodInt;
866
- }, z.core.$strict>;
972
+ }, z.core.$strip>;
867
973
  kind: z.ZodEnum<{
868
974
  subscription: "subscription";
869
975
  apikey: "apikey";
870
976
  gateway: "gateway";
871
977
  }>;
872
- }, z.core.$strict>>;
978
+ }, z.core.$strip>>;
873
979
  byProvider: z.ZodArray<z.ZodObject<{
874
980
  runs: z.ZodInt;
875
981
  costUsd: z.ZodNumber;
@@ -878,13 +984,13 @@ export declare const OperatorRunList: z.ZodObject<{
878
984
  output: z.ZodInt;
879
985
  cacheRead: z.ZodInt;
880
986
  cacheWrite: z.ZodInt;
881
- }, z.core.$strict>;
987
+ }, z.core.$strip>;
882
988
  provider: z.ZodEnum<{
883
989
  claude: "claude";
884
990
  codex: "codex";
885
991
  gemini: "gemini";
886
992
  }>;
887
- }, z.core.$strict>>;
993
+ }, z.core.$strip>>;
888
994
  runs: z.ZodInt;
889
995
  costUsd: z.ZodNumber;
890
996
  tokens: z.ZodObject<{
@@ -892,7 +998,7 @@ export declare const OperatorRunList: z.ZodObject<{
892
998
  output: z.ZodInt;
893
999
  cacheRead: z.ZodInt;
894
1000
  cacheWrite: z.ZodInt;
895
- }, z.core.$strict>;
896
- }, z.core.$strict>;
897
- }, z.core.$strict>;
1001
+ }, z.core.$strip>;
1002
+ }, z.core.$strip>;
1003
+ }, z.core.$strip>;
898
1004
  export type OperatorRunList = z.infer<typeof OperatorRunList>;
@@ -175,7 +175,7 @@ export const CredentialUpdateInput = z
175
175
  export const CredentialTestInput = z.strictObject({ credentialId: CredentialId });
176
176
  // "Trennen": the value is deleted at once and without archive. Refused while an Operator uses it.
177
177
  export const CredentialRevokeInput = z.strictObject({ credentialId: CredentialId });
178
- export const Credential = z.strictObject({
178
+ export const Credential = z.object({
179
179
  credentialId: CredentialId,
180
180
  // Null for a gateway credential, which serves the Operators of every provider (#470).
181
181
  provider: OperatorProvider.nullable(),
@@ -193,16 +193,16 @@ export const Credential = z.strictObject({
193
193
  createdBy: UserId.nullable(),
194
194
  updatedAt: z.iso.datetime(),
195
195
  });
196
- export const CredentialList = z.strictObject({
196
+ export const CredentialList = z.object({
197
197
  items: z.array(Credential),
198
198
  nextCursor: CredentialId.nullable(),
199
199
  });
200
200
  // The smallest call at the provider with the stored value. An error names the outcome, never a value.
201
201
  export const CredentialTestResult = z.discriminatedUnion("ok", [
202
- z.strictObject({ ok: z.literal(true) }),
203
- z.strictObject({ ok: z.literal(false), error: z.string() }),
202
+ z.object({ ok: z.literal(true) }),
203
+ z.object({ ok: z.literal(false), error: z.string() }),
204
204
  ]);
205
- export const CredentialTested = z.strictObject({
205
+ export const CredentialTested = z.object({
206
206
  credential: Credential,
207
207
  test: CredentialTestResult,
208
208
  });
@@ -270,7 +270,7 @@ export const MachineDisableInput = z.strictObject({ machineId: MachineId });
270
270
  export const MachineEnableInput = z.strictObject({ machineId: MachineId });
271
271
  // Deleting an Operator archives its machine in `access`; nothing is deleted.
272
272
  export const OperatorMachineArchiveInput = z.strictObject({ machineId: MachineId });
273
- export const Operator = z.strictObject({
273
+ export const Operator = z.object({
274
274
  machineId: MachineId,
275
275
  // The machine's name in `access`, read now.
276
276
  name: z.string(),
@@ -285,13 +285,13 @@ export const Operator = z.strictObject({
285
285
  pausedAt: z.iso.datetime().nullable(),
286
286
  // "läuft" (#337): the run in progress, beside the state, so a paused Operator can still finish
287
287
  // the run it started; null while none runs.
288
- running: z.strictObject({ runId: idSchema("run"), startedAt: z.iso.datetime() }).nullable(),
288
+ running: z.object({ runId: idSchema("run"), startedAt: z.iso.datetime() }).nullable(),
289
289
  archivedAt: z.iso.datetime().nullable(),
290
290
  createdAt: z.iso.datetime(),
291
291
  createdBy: UserId.nullable(),
292
292
  updatedAt: z.iso.datetime(),
293
293
  });
294
- export const OperatorList = z.strictObject({
294
+ export const OperatorList = z.object({
295
295
  items: z.array(Operator),
296
296
  nextCursor: MachineId.nullable(),
297
297
  });
@@ -299,8 +299,9 @@ export const OperatorList = z.strictObject({
299
299
  // The runs of an Operator (#337, Einstellungen › Operator › Protokoll und Nutzung, E75, E81, E82).
300
300
  // A run's id is `run_…` like a run of `intelligence`: both are the resource `run`, in two databases.
301
301
  export const OperatorRunId = idSchema("run").describe("The Operator run's id, `run_…`, as operator_run_list returned it.");
302
- // `running` until the runner reports; then `completed` or `failed` with its reason (E82).
303
- export const OperatorRunStatus = z.enum(["running", "completed", "failed"]);
302
+ // `running` until the runner reports; then `completed` or `failed` with its reason (E82), or
303
+ // `stopped` when an admin stopped it by hand (E112): no failure, and no run follows for it.
304
+ export const OperatorRunStatus = z.enum(["running", "completed", "failed", "stopped"]);
304
305
  // Why a run failed (E82): the container did not start (`container`), the provider refused or was
305
306
  // overloaded (`provider`), the longest run was reached (`timeout`), Claude Code crashed or ended with
306
307
  // an error (`crash`), it ended without its closing message (`noresult`), the package itself broke
@@ -317,17 +318,28 @@ export const OperatorRunReason = z.enum([
317
318
  ]);
318
319
  // What woke it: a change after the quiet minutes, a fixed time, or the retry after a failure.
319
320
  export const OperatorRunTrigger = z.enum(["change", "schedule", "retry"]);
320
- export const OperatorRunTokens = z.strictObject({
321
+ export const OperatorRunTokens = z.object({
321
322
  input: z.int().min(0),
322
323
  output: z.int().min(0),
323
324
  cacheRead: z.int().min(0),
324
325
  cacheWrite: z.int().min(0),
325
326
  });
326
327
  // The processes and connectors a run touched, as the runner names them (#338).
327
- export const OperatorRunTouched = z.strictObject({
328
+ export const OperatorRunTouched = z.object({
328
329
  processes: z.array(z.string().max(200)).max(200),
329
330
  connectors: z.array(z.string().max(200)).max(200),
330
331
  });
332
+ // The INSTRUCTIONS a run got as its system message (#581, E111): the version of the document in the
333
+ // Operator's root folder, its validation status then, and whether it was cut at the limit.
334
+ export const OperatorRunInstructions = z.object({
335
+ version: z.int().min(1).nullable(),
336
+ status: z.string().nullable(),
337
+ cut: z.boolean(),
338
+ });
339
+ export const OperatorRunAgents = z.object({
340
+ started: z.int().min(0),
341
+ running: z.int().min(0),
342
+ });
331
343
  // Who ran, named by the backend (#448): the machine's name in `access`, archived ones included, and
332
344
  // when the Operator was deleted (archived), so a run of a deleted Operator still says whose it was.
333
345
  const RunMachine = {
@@ -335,7 +347,7 @@ const RunMachine = {
335
347
  machineName: z.string(),
336
348
  machineArchivedAt: z.iso.datetime().nullable(),
337
349
  };
338
- export const OperatorRun = z.strictObject({
350
+ export const OperatorRun = z.object({
339
351
  runId: OperatorRunId,
340
352
  ...RunMachine,
341
353
  trigger: OperatorRunTrigger,
@@ -346,6 +358,8 @@ export const OperatorRun = z.strictObject({
346
358
  // The summary the Operator wrote at the end itself.
347
359
  summary: z.string().nullable(),
348
360
  touched: OperatorRunTouched,
361
+ // Null when the run got none: no text in its INSTRUCTIONS, or a run from before #581.
362
+ instructions: OperatorRunInstructions.nullable(),
349
363
  // The credential's kind decides how the cost reads: `apikey` is cost, `subscription` the API
350
364
  // equivalent (E81).
351
365
  credentialKind: CredentialKind.nullable(),
@@ -353,6 +367,11 @@ export const OperatorRun = z.strictObject({
353
367
  // (#455). Through the Cloudflare AI Gateway the amount of its logs, for every provider (#470).
354
368
  costUsd: z.number().nullable(),
355
369
  tokens: OperatorRunTokens.nullable(),
370
+ // The subagents the run started, and how many of them run now (E112); null for a run before
371
+ // they were counted. Only Claude Code has subagents (E99).
372
+ agents: OperatorRunAgents.nullable(),
373
+ // Who stopped it (E112), named by the backend; null unless `status` is `stopped`.
374
+ stoppedBy: z.object({ userId: UserId, name: z.string() }).nullable(),
356
375
  startedAt: z.iso.datetime(),
357
376
  endedAt: z.iso.datetime().nullable(),
358
377
  durationMs: z.int().nullable(),
@@ -375,6 +394,56 @@ export const OperatorRunListInput = z.strictObject({
375
394
  limit: Limit.optional().describe("Runs per page, 1 to 100. Leaving it out gives 50."),
376
395
  });
377
396
  export const OperatorRunGetInput = z.strictObject({ runId: OperatorRunId });
397
+ // Stopping a run by hand (E112): its container ends, the run ends `stopped`.
398
+ export const RunCancelInput = z.strictObject({ runId: OperatorRunId });
399
+ // One step of a run as its CLI's output showed it (E112): what the model wrote, a tool it called
400
+ // with a short form of the input, the shortened result, a subagent's start and end. `agentId` is
401
+ // the id of the call that started the subagent the step belongs to (`parent_tool_use_id` of Claude
402
+ // Code), null for the main agent. `callId` ties a result to its call and a subagent's end to its
403
+ // start. `at` is the moment Colab read the step, within a few seconds.
404
+ export const OperatorRunStepKind = z.enum([
405
+ "text",
406
+ "thinking",
407
+ "tool",
408
+ "result",
409
+ "agentstart",
410
+ "agentend",
411
+ "error",
412
+ "truncated",
413
+ ]);
414
+ export const OperatorRunStep = z.object({
415
+ seq: z.int().min(0),
416
+ at: z.iso.datetime(),
417
+ agentId: z.string().nullable(),
418
+ kind: OperatorRunStepKind,
419
+ // The tool's name as the CLI called it (`mcp__colab__intelligence_task_get`, `Bash`), or the
420
+ // subagent's type; null for text.
421
+ name: z.string().nullable(),
422
+ callId: z.string().nullable(),
423
+ // Shortened; never a credential's value, nothing under a key like `token` or `secret`.
424
+ text: z.string(),
425
+ failed: z.boolean(),
426
+ });
427
+ // A step's position in its run, as text: the cursor of the next page.
428
+ const StepCursor = z
429
+ .string()
430
+ .regex(/^\d{1,6}$/)
431
+ .describe("The nextCursor of the previous page, for the steps after it; oldest first.");
432
+ export const RunStepListInput = z.strictObject({
433
+ runId: OperatorRunId,
434
+ agentId: z
435
+ .string()
436
+ .min(1)
437
+ .max(200)
438
+ .optional()
439
+ .describe("Only the steps of this subagent: the callId of its agentstart step. Leaving it out gives every step."),
440
+ cursor: StepCursor.optional(),
441
+ limit: Limit.optional().describe("Steps per page, 1 to 100. Leaving it out gives 100."),
442
+ });
443
+ export const OperatorRunStepList = z.object({
444
+ items: z.array(OperatorRunStep),
445
+ nextCursor: StepCursor.nullable(),
446
+ });
378
447
  const UsageSums = {
379
448
  runs: z.int(),
380
449
  costUsd: z.number(),
@@ -384,14 +453,14 @@ const UsageSums = {
384
453
  // day (UTC), per credential kind, so cost and API equivalent stand apart, and per provider, so the
385
454
  // tokens of Codex and Gemini, which report no amount, stand apart from Claude's (#455). `costUsd`
386
455
  // sums the runs that carry an amount: Claude's, and every run through the AI Gateway (#470).
387
- export const OperatorRunUsage = z.strictObject({
456
+ export const OperatorRunUsage = z.object({
388
457
  ...UsageSums,
389
- byMachine: z.array(z.strictObject({ ...RunMachine, ...UsageSums })),
390
- byDay: z.array(z.strictObject({ day: z.iso.date(), ...UsageSums })),
391
- byKind: z.array(z.strictObject({ kind: CredentialKind, ...UsageSums })),
392
- byProvider: z.array(z.strictObject({ provider: OperatorProvider, ...UsageSums })),
458
+ byMachine: z.array(z.object({ ...RunMachine, ...UsageSums })),
459
+ byDay: z.array(z.object({ day: z.iso.date(), ...UsageSums })),
460
+ byKind: z.array(z.object({ kind: CredentialKind, ...UsageSums })),
461
+ byProvider: z.array(z.object({ provider: OperatorProvider, ...UsageSums })),
393
462
  });
394
- export const OperatorRunList = z.strictObject({
463
+ export const OperatorRunList = z.object({
395
464
  items: z.array(OperatorRun),
396
465
  nextCursor: OperatorRunId.nullable(),
397
466
  usage: OperatorRunUsage,