@anchrd/colab-sdk 0.1.7 → 0.1.9
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/actions/actions.d.ts +113 -113
- package/dist/actions/actions.js +21 -21
- package/dist/apps/apps.d.ts +8 -8
- package/dist/apps/apps.js +6 -6
- package/dist/archive/archive.d.ts +2 -2
- package/dist/archive/archive.js +2 -2
- package/dist/boards/boards.d.ts +60 -60
- package/dist/boards/boards.js +19 -19
- package/dist/columns/columns.d.ts +1 -1
- package/dist/columns/columns.js +1 -1
- package/dist/connections/connections.d.ts +15 -15
- package/dist/connections/connections.js +6 -6
- package/dist/connectors/connectors.d.ts +14 -14
- package/dist/connectors/connectors.js +7 -7
- package/dist/dashboards/dashboards.d.ts +3 -3
- package/dist/dashboards/dashboards.js +3 -3
- package/dist/directory/directory.d.ts +1 -1
- package/dist/directory/directory.js +1 -1
- package/dist/documents/documents.d.ts +6 -6
- package/dist/documents/documents.js +1 -1
- package/dist/events/events.d.ts +7 -7
- package/dist/events/events.js +4 -4
- package/dist/files/files.d.ts +19 -5
- package/dist/files/files.js +12 -6
- package/dist/functions/functions.d.ts +1 -1
- package/dist/functions/functions.js +1 -1
- package/dist/grammar/grammar.d.ts +1 -0
- package/dist/grammar/grammar.js +5 -1
- package/dist/grants/grants.d.ts +7 -7
- package/dist/grants/grants.js +5 -5
- package/dist/instructions/instructions.d.ts +3 -3
- package/dist/instructions/instructions.js +2 -2
- package/dist/interfaces/interfaces.d.ts +1 -1
- package/dist/interfaces/interfaces.js +1 -1
- package/dist/invitations/invitations.d.ts +8 -8
- package/dist/invitations/invitations.js +4 -4
- package/dist/links/links.d.ts +3 -3
- package/dist/links/links.js +2 -2
- package/dist/machines/machines.d.ts +5 -5
- package/dist/machines/machines.js +2 -2
- package/dist/messages/messages.d.ts +12 -12
- package/dist/messages/messages.js +5 -5
- package/dist/nodes/nodes.d.ts +58 -58
- package/dist/nodes/nodes.js +19 -19
- package/dist/operators/operators.d.ts +136 -46
- package/dist/operators/operators.js +80 -20
- package/dist/pages/pages.d.ts +22 -22
- package/dist/pages/pages.js +8 -6
- package/dist/profile/profile.d.ts +1 -1
- package/dist/profile/profile.js +1 -1
- package/dist/roles/roles.d.ts +12 -12
- package/dist/roles/roles.js +7 -7
- package/dist/runs/runs.d.ts +23 -23
- package/dist/runs/runs.js +9 -9
- package/dist/runtime-config.d.ts +1 -1
- package/dist/runtime-config.js +1 -1
- package/dist/sdk.d.ts +2 -2
- package/dist/sdk.js +2 -2
- package/dist/secrets/secrets.d.ts +5 -5
- package/dist/secrets/secrets.js +2 -2
- package/dist/services/services.d.ts +15 -15
- package/dist/services/services.js +6 -6
- package/dist/sso/sso.d.ts +4 -4
- package/dist/sso/sso.js +3 -3
- package/dist/tables/tables.d.ts +4 -4
- package/dist/tables/tables.js +4 -4
- package/dist/user-settings/user-settings.d.ts +1 -1
- package/dist/user-settings/user-settings.js +1 -1
- package/dist/users/users.d.ts +23 -23
- package/dist/users/users.js +9 -9
- package/dist/validation/validation.d.ts +11 -11
- package/dist/validation/validation.js +4 -4
- package/dist/versions/versions.d.ts +7 -7
- package/dist/versions/versions.js +2 -2
- 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.$
|
|
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.$
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
181
|
nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`credential_${string}`>>;
|
|
182
|
-
}, z.core.$
|
|
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.$
|
|
186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
187
187
|
ok: z.ZodLiteral<false>;
|
|
188
188
|
error: z.ZodString;
|
|
189
|
-
}, z.core.$
|
|
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.$
|
|
215
|
+
}, z.core.$strip>;
|
|
216
216
|
test: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
217
217
|
ok: z.ZodLiteral<true>;
|
|
218
|
-
}, z.core.$
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
219
|
ok: z.ZodLiteral<false>;
|
|
220
220
|
error: z.ZodString;
|
|
221
|
-
}, z.core.$
|
|
222
|
-
}, z.core.$
|
|
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.$
|
|
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.$
|
|
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.$
|
|
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.$
|
|
610
|
+
}, z.core.$strip>>;
|
|
611
611
|
nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
612
|
-
}, z.core.$
|
|
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,19 +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.$
|
|
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.$
|
|
649
|
+
}, z.core.$strip>;
|
|
649
650
|
export type OperatorRunTouched = z.infer<typeof OperatorRunTouched>;
|
|
650
651
|
export declare const OperatorRunInstructions: z.ZodObject<{
|
|
651
652
|
version: z.ZodNullable<z.ZodInt>;
|
|
652
653
|
status: z.ZodNullable<z.ZodString>;
|
|
653
654
|
cut: z.ZodBoolean;
|
|
654
|
-
}, z.core.$
|
|
655
|
+
}, z.core.$strip>;
|
|
655
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>;
|
|
656
662
|
export declare const OperatorRun: z.ZodObject<{
|
|
657
663
|
trigger: z.ZodEnum<{
|
|
658
664
|
schedule: "schedule";
|
|
@@ -663,6 +669,7 @@ export declare const OperatorRun: z.ZodObject<{
|
|
|
663
669
|
running: "running";
|
|
664
670
|
failed: "failed";
|
|
665
671
|
completed: "completed";
|
|
672
|
+
stopped: "stopped";
|
|
666
673
|
}>;
|
|
667
674
|
reason: z.ZodNullable<z.ZodEnum<{
|
|
668
675
|
error: "error";
|
|
@@ -678,12 +685,12 @@ export declare const OperatorRun: z.ZodObject<{
|
|
|
678
685
|
touched: z.ZodObject<{
|
|
679
686
|
processes: z.ZodArray<z.ZodString>;
|
|
680
687
|
connectors: z.ZodArray<z.ZodString>;
|
|
681
|
-
}, z.core.$
|
|
688
|
+
}, z.core.$strip>;
|
|
682
689
|
instructions: z.ZodNullable<z.ZodObject<{
|
|
683
690
|
version: z.ZodNullable<z.ZodInt>;
|
|
684
691
|
status: z.ZodNullable<z.ZodString>;
|
|
685
692
|
cut: z.ZodBoolean;
|
|
686
|
-
}, z.core.$
|
|
693
|
+
}, z.core.$strip>>;
|
|
687
694
|
credentialKind: z.ZodNullable<z.ZodEnum<{
|
|
688
695
|
subscription: "subscription";
|
|
689
696
|
apikey: "apikey";
|
|
@@ -695,7 +702,15 @@ export declare const OperatorRun: z.ZodObject<{
|
|
|
695
702
|
output: z.ZodInt;
|
|
696
703
|
cacheRead: z.ZodInt;
|
|
697
704
|
cacheWrite: z.ZodInt;
|
|
698
|
-
}, z.core.$
|
|
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>>;
|
|
699
714
|
startedAt: z.ZodISODateTime;
|
|
700
715
|
endedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
701
716
|
durationMs: z.ZodNullable<z.ZodInt>;
|
|
@@ -703,7 +718,7 @@ export declare const OperatorRun: z.ZodObject<{
|
|
|
703
718
|
machineName: z.ZodString;
|
|
704
719
|
machineArchivedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
705
720
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
706
|
-
}, z.core.$
|
|
721
|
+
}, z.core.$strip>;
|
|
707
722
|
export type OperatorRun = z.infer<typeof OperatorRun>;
|
|
708
723
|
export declare const OperatorRunListInput: z.ZodObject<{
|
|
709
724
|
machineId: z.ZodOptional<z.ZodTemplateLiteral<`user_${string}`>>;
|
|
@@ -716,6 +731,7 @@ export declare const OperatorRunListInput: z.ZodObject<{
|
|
|
716
731
|
running: "running";
|
|
717
732
|
failed: "failed";
|
|
718
733
|
completed: "completed";
|
|
734
|
+
stopped: "stopped";
|
|
719
735
|
}>>;
|
|
720
736
|
from: z.ZodOptional<z.ZodISODateTime>;
|
|
721
737
|
to: z.ZodOptional<z.ZodISODateTime>;
|
|
@@ -728,6 +744,71 @@ export declare const OperatorRunGetInput: z.ZodObject<{
|
|
|
728
744
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
729
745
|
}, z.core.$strict>;
|
|
730
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>;
|
|
731
812
|
export declare const OperatorRunUsage: z.ZodObject<{
|
|
732
813
|
byMachine: z.ZodArray<z.ZodObject<{
|
|
733
814
|
runs: z.ZodInt;
|
|
@@ -737,11 +818,11 @@ export declare const OperatorRunUsage: z.ZodObject<{
|
|
|
737
818
|
output: z.ZodInt;
|
|
738
819
|
cacheRead: z.ZodInt;
|
|
739
820
|
cacheWrite: z.ZodInt;
|
|
740
|
-
}, z.core.$
|
|
821
|
+
}, z.core.$strip>;
|
|
741
822
|
machineId: z.ZodTemplateLiteral<`user_${string}`>;
|
|
742
823
|
machineName: z.ZodString;
|
|
743
824
|
machineArchivedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
744
|
-
}, z.core.$
|
|
825
|
+
}, z.core.$strip>>;
|
|
745
826
|
byDay: z.ZodArray<z.ZodObject<{
|
|
746
827
|
runs: z.ZodInt;
|
|
747
828
|
costUsd: z.ZodNumber;
|
|
@@ -750,9 +831,9 @@ export declare const OperatorRunUsage: z.ZodObject<{
|
|
|
750
831
|
output: z.ZodInt;
|
|
751
832
|
cacheRead: z.ZodInt;
|
|
752
833
|
cacheWrite: z.ZodInt;
|
|
753
|
-
}, z.core.$
|
|
834
|
+
}, z.core.$strip>;
|
|
754
835
|
day: z.ZodISODate;
|
|
755
|
-
}, z.core.$
|
|
836
|
+
}, z.core.$strip>>;
|
|
756
837
|
byKind: z.ZodArray<z.ZodObject<{
|
|
757
838
|
runs: z.ZodInt;
|
|
758
839
|
costUsd: z.ZodNumber;
|
|
@@ -761,13 +842,13 @@ export declare const OperatorRunUsage: z.ZodObject<{
|
|
|
761
842
|
output: z.ZodInt;
|
|
762
843
|
cacheRead: z.ZodInt;
|
|
763
844
|
cacheWrite: z.ZodInt;
|
|
764
|
-
}, z.core.$
|
|
845
|
+
}, z.core.$strip>;
|
|
765
846
|
kind: z.ZodEnum<{
|
|
766
847
|
subscription: "subscription";
|
|
767
848
|
apikey: "apikey";
|
|
768
849
|
gateway: "gateway";
|
|
769
850
|
}>;
|
|
770
|
-
}, z.core.$
|
|
851
|
+
}, z.core.$strip>>;
|
|
771
852
|
byProvider: z.ZodArray<z.ZodObject<{
|
|
772
853
|
runs: z.ZodInt;
|
|
773
854
|
costUsd: z.ZodNumber;
|
|
@@ -776,13 +857,13 @@ export declare const OperatorRunUsage: z.ZodObject<{
|
|
|
776
857
|
output: z.ZodInt;
|
|
777
858
|
cacheRead: z.ZodInt;
|
|
778
859
|
cacheWrite: z.ZodInt;
|
|
779
|
-
}, z.core.$
|
|
860
|
+
}, z.core.$strip>;
|
|
780
861
|
provider: z.ZodEnum<{
|
|
781
862
|
claude: "claude";
|
|
782
863
|
codex: "codex";
|
|
783
864
|
gemini: "gemini";
|
|
784
865
|
}>;
|
|
785
|
-
}, z.core.$
|
|
866
|
+
}, z.core.$strip>>;
|
|
786
867
|
runs: z.ZodInt;
|
|
787
868
|
costUsd: z.ZodNumber;
|
|
788
869
|
tokens: z.ZodObject<{
|
|
@@ -790,8 +871,8 @@ export declare const OperatorRunUsage: z.ZodObject<{
|
|
|
790
871
|
output: z.ZodInt;
|
|
791
872
|
cacheRead: z.ZodInt;
|
|
792
873
|
cacheWrite: z.ZodInt;
|
|
793
|
-
}, z.core.$
|
|
794
|
-
}, z.core.$
|
|
874
|
+
}, z.core.$strip>;
|
|
875
|
+
}, z.core.$strip>;
|
|
795
876
|
export type OperatorRunUsage = z.infer<typeof OperatorRunUsage>;
|
|
796
877
|
export declare const OperatorRunList: z.ZodObject<{
|
|
797
878
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -804,6 +885,7 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
804
885
|
running: "running";
|
|
805
886
|
failed: "failed";
|
|
806
887
|
completed: "completed";
|
|
888
|
+
stopped: "stopped";
|
|
807
889
|
}>;
|
|
808
890
|
reason: z.ZodNullable<z.ZodEnum<{
|
|
809
891
|
error: "error";
|
|
@@ -819,12 +901,12 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
819
901
|
touched: z.ZodObject<{
|
|
820
902
|
processes: z.ZodArray<z.ZodString>;
|
|
821
903
|
connectors: z.ZodArray<z.ZodString>;
|
|
822
|
-
}, z.core.$
|
|
904
|
+
}, z.core.$strip>;
|
|
823
905
|
instructions: z.ZodNullable<z.ZodObject<{
|
|
824
906
|
version: z.ZodNullable<z.ZodInt>;
|
|
825
907
|
status: z.ZodNullable<z.ZodString>;
|
|
826
908
|
cut: z.ZodBoolean;
|
|
827
|
-
}, z.core.$
|
|
909
|
+
}, z.core.$strip>>;
|
|
828
910
|
credentialKind: z.ZodNullable<z.ZodEnum<{
|
|
829
911
|
subscription: "subscription";
|
|
830
912
|
apikey: "apikey";
|
|
@@ -836,7 +918,15 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
836
918
|
output: z.ZodInt;
|
|
837
919
|
cacheRead: z.ZodInt;
|
|
838
920
|
cacheWrite: z.ZodInt;
|
|
839
|
-
}, z.core.$
|
|
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>>;
|
|
840
930
|
startedAt: z.ZodISODateTime;
|
|
841
931
|
endedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
842
932
|
durationMs: z.ZodNullable<z.ZodInt>;
|
|
@@ -844,7 +934,7 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
844
934
|
machineName: z.ZodString;
|
|
845
935
|
machineArchivedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
846
936
|
runId: z.ZodTemplateLiteral<`run_${string}`>;
|
|
847
|
-
}, z.core.$
|
|
937
|
+
}, z.core.$strip>>;
|
|
848
938
|
nextCursor: z.ZodNullable<z.ZodTemplateLiteral<`run_${string}`>>;
|
|
849
939
|
usage: z.ZodObject<{
|
|
850
940
|
byMachine: z.ZodArray<z.ZodObject<{
|
|
@@ -855,11 +945,11 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
855
945
|
output: z.ZodInt;
|
|
856
946
|
cacheRead: z.ZodInt;
|
|
857
947
|
cacheWrite: z.ZodInt;
|
|
858
|
-
}, z.core.$
|
|
948
|
+
}, z.core.$strip>;
|
|
859
949
|
machineId: z.ZodTemplateLiteral<`user_${string}`>;
|
|
860
950
|
machineName: z.ZodString;
|
|
861
951
|
machineArchivedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
862
|
-
}, z.core.$
|
|
952
|
+
}, z.core.$strip>>;
|
|
863
953
|
byDay: z.ZodArray<z.ZodObject<{
|
|
864
954
|
runs: z.ZodInt;
|
|
865
955
|
costUsd: z.ZodNumber;
|
|
@@ -868,9 +958,9 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
868
958
|
output: z.ZodInt;
|
|
869
959
|
cacheRead: z.ZodInt;
|
|
870
960
|
cacheWrite: z.ZodInt;
|
|
871
|
-
}, z.core.$
|
|
961
|
+
}, z.core.$strip>;
|
|
872
962
|
day: z.ZodISODate;
|
|
873
|
-
}, z.core.$
|
|
963
|
+
}, z.core.$strip>>;
|
|
874
964
|
byKind: z.ZodArray<z.ZodObject<{
|
|
875
965
|
runs: z.ZodInt;
|
|
876
966
|
costUsd: z.ZodNumber;
|
|
@@ -879,13 +969,13 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
879
969
|
output: z.ZodInt;
|
|
880
970
|
cacheRead: z.ZodInt;
|
|
881
971
|
cacheWrite: z.ZodInt;
|
|
882
|
-
}, z.core.$
|
|
972
|
+
}, z.core.$strip>;
|
|
883
973
|
kind: z.ZodEnum<{
|
|
884
974
|
subscription: "subscription";
|
|
885
975
|
apikey: "apikey";
|
|
886
976
|
gateway: "gateway";
|
|
887
977
|
}>;
|
|
888
|
-
}, z.core.$
|
|
978
|
+
}, z.core.$strip>>;
|
|
889
979
|
byProvider: z.ZodArray<z.ZodObject<{
|
|
890
980
|
runs: z.ZodInt;
|
|
891
981
|
costUsd: z.ZodNumber;
|
|
@@ -894,13 +984,13 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
894
984
|
output: z.ZodInt;
|
|
895
985
|
cacheRead: z.ZodInt;
|
|
896
986
|
cacheWrite: z.ZodInt;
|
|
897
|
-
}, z.core.$
|
|
987
|
+
}, z.core.$strip>;
|
|
898
988
|
provider: z.ZodEnum<{
|
|
899
989
|
claude: "claude";
|
|
900
990
|
codex: "codex";
|
|
901
991
|
gemini: "gemini";
|
|
902
992
|
}>;
|
|
903
|
-
}, z.core.$
|
|
993
|
+
}, z.core.$strip>>;
|
|
904
994
|
runs: z.ZodInt;
|
|
905
995
|
costUsd: z.ZodNumber;
|
|
906
996
|
tokens: z.ZodObject<{
|
|
@@ -908,7 +998,7 @@ export declare const OperatorRunList: z.ZodObject<{
|
|
|
908
998
|
output: z.ZodInt;
|
|
909
999
|
cacheRead: z.ZodInt;
|
|
910
1000
|
cacheWrite: z.ZodInt;
|
|
911
|
-
}, z.core.$
|
|
912
|
-
}, z.core.$
|
|
913
|
-
}, z.core.$
|
|
1001
|
+
}, z.core.$strip>;
|
|
1002
|
+
}, z.core.$strip>;
|
|
1003
|
+
}, z.core.$strip>;
|
|
914
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.
|
|
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.
|
|
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.
|
|
203
|
-
z.
|
|
202
|
+
z.object({ ok: z.literal(true) }),
|
|
203
|
+
z.object({ ok: z.literal(false), error: z.string() }),
|
|
204
204
|
]);
|
|
205
|
-
export const CredentialTested = z.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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,24 +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.
|
|
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.
|
|
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
|
});
|
|
331
332
|
// The INSTRUCTIONS a run got as its system message (#581, E111): the version of the document in the
|
|
332
333
|
// Operator's root folder, its validation status then, and whether it was cut at the limit.
|
|
333
|
-
export const OperatorRunInstructions = z.
|
|
334
|
+
export const OperatorRunInstructions = z.object({
|
|
334
335
|
version: z.int().min(1).nullable(),
|
|
335
336
|
status: z.string().nullable(),
|
|
336
337
|
cut: z.boolean(),
|
|
337
338
|
});
|
|
339
|
+
export const OperatorRunAgents = z.object({
|
|
340
|
+
started: z.int().min(0),
|
|
341
|
+
running: z.int().min(0),
|
|
342
|
+
});
|
|
338
343
|
// Who ran, named by the backend (#448): the machine's name in `access`, archived ones included, and
|
|
339
344
|
// when the Operator was deleted (archived), so a run of a deleted Operator still says whose it was.
|
|
340
345
|
const RunMachine = {
|
|
@@ -342,7 +347,7 @@ const RunMachine = {
|
|
|
342
347
|
machineName: z.string(),
|
|
343
348
|
machineArchivedAt: z.iso.datetime().nullable(),
|
|
344
349
|
};
|
|
345
|
-
export const OperatorRun = z.
|
|
350
|
+
export const OperatorRun = z.object({
|
|
346
351
|
runId: OperatorRunId,
|
|
347
352
|
...RunMachine,
|
|
348
353
|
trigger: OperatorRunTrigger,
|
|
@@ -362,6 +367,11 @@ export const OperatorRun = z.strictObject({
|
|
|
362
367
|
// (#455). Through the Cloudflare AI Gateway the amount of its logs, for every provider (#470).
|
|
363
368
|
costUsd: z.number().nullable(),
|
|
364
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(),
|
|
365
375
|
startedAt: z.iso.datetime(),
|
|
366
376
|
endedAt: z.iso.datetime().nullable(),
|
|
367
377
|
durationMs: z.int().nullable(),
|
|
@@ -384,6 +394,56 @@ export const OperatorRunListInput = z.strictObject({
|
|
|
384
394
|
limit: Limit.optional().describe("Runs per page, 1 to 100. Leaving it out gives 50."),
|
|
385
395
|
});
|
|
386
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
|
+
});
|
|
387
447
|
const UsageSums = {
|
|
388
448
|
runs: z.int(),
|
|
389
449
|
costUsd: z.number(),
|
|
@@ -393,14 +453,14 @@ const UsageSums = {
|
|
|
393
453
|
// day (UTC), per credential kind, so cost and API equivalent stand apart, and per provider, so the
|
|
394
454
|
// tokens of Codex and Gemini, which report no amount, stand apart from Claude's (#455). `costUsd`
|
|
395
455
|
// sums the runs that carry an amount: Claude's, and every run through the AI Gateway (#470).
|
|
396
|
-
export const OperatorRunUsage = z.
|
|
456
|
+
export const OperatorRunUsage = z.object({
|
|
397
457
|
...UsageSums,
|
|
398
|
-
byMachine: z.array(z.
|
|
399
|
-
byDay: z.array(z.
|
|
400
|
-
byKind: z.array(z.
|
|
401
|
-
byProvider: z.array(z.
|
|
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 })),
|
|
402
462
|
});
|
|
403
|
-
export const OperatorRunList = z.
|
|
463
|
+
export const OperatorRunList = z.object({
|
|
404
464
|
items: z.array(OperatorRun),
|
|
405
465
|
nextCursor: OperatorRunId.nullable(),
|
|
406
466
|
usage: OperatorRunUsage,
|