unfazed 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,6 +57,26 @@ export type CreateDeploymentInput = {
57
57
  spaMode?: boolean | null | undefined;
58
58
  workspaceID: string | number;
59
59
  };
60
+ export type CreateRunInput = {
61
+ /** "human" routes the harness's permission prompts to you (the run BLOCKS until you answer); empty keeps the harness's own defaults. */
62
+ approval?: string | null | undefined;
63
+ command?: string | null | undefined;
64
+ harness?: string | null | undefined;
65
+ includeFiles?: boolean | null | undefined;
66
+ maxSeconds?: number | null | undefined;
67
+ memoryMiB?: number | null | undefined;
68
+ metadata?: unknown;
69
+ /** "plan" asks the harness to write a plan without acting; empty does the task. */
70
+ mode?: string | null | undefined;
71
+ /** The run this one continues; usually set through followUpRun. */
72
+ parentRunID?: string | number | null | undefined;
73
+ prompt?: string | null | undefined;
74
+ /** Shell commands run in /work before the harness; the first failure fails the run. */
75
+ setup?: Array<string> | null | undefined;
76
+ /** Skills fetched into .claude/skills before the harness, as owner/repo:path. */
77
+ skills?: Array<string> | null | undefined;
78
+ workspaceID: string | number;
79
+ };
60
80
  export type CurrentActorKind =
61
81
  /** An automated caller using a self-registered bearer token. Subject to free-tier usage/resource limits; a user can claim it to link it to their account. */
62
82
  'AGENT'
@@ -79,6 +99,14 @@ export type DeploymentKind =
79
99
  /** A persistent always-on Linux VM with a per-workspace data disk (docs/agent-box.md). */
80
100
  'BOX' | 'SERVICE' | 'STATIC';
81
101
  export type DeploymentStatus = 'BUILDING' | 'FAILED' | 'READY';
102
+ export type FollowUpRunInput = {
103
+ approval?: string | null | undefined;
104
+ maxSeconds?: number | null | undefined;
105
+ metadata?: unknown;
106
+ mode?: string | null | undefined;
107
+ prompt: string;
108
+ runID: string | number;
109
+ };
82
110
  export type ListDeploymentsInput = {
83
111
  alias?: string | null | undefined;
84
112
  kind?: DeploymentKind | null | undefined;
@@ -87,6 +115,12 @@ export type ListDeploymentsInput = {
87
115
  order?: string | null | undefined;
88
116
  workspaceID?: string | number | null | undefined;
89
117
  };
118
+ export type ListRunsInput = {
119
+ limit?: number | null | undefined;
120
+ offset?: number | null | undefined;
121
+ status?: RunStatus | null | undefined;
122
+ workspaceID?: string | number | null | undefined;
123
+ };
90
124
  export type ListWorkspaceFilesInput = {
91
125
  limit?: number | null | undefined;
92
126
  offset?: number | null | undefined;
@@ -99,6 +133,9 @@ export type ReadWorkspaceFileInput = {
99
133
  path: string;
100
134
  workspaceID: string | number;
101
135
  };
136
+ export type RunStatus =
137
+ /** Waiting for a human's answer (see Run.question); the VM stays up and the wall clock keeps running. */
138
+ 'BLOCKED' | 'CANCELLED' | 'FAILED' | 'QUEUED' | 'RUNNING' | 'SUCCEEDED';
102
139
  export type ServiceMode =
103
140
  /** Keeps a supervised VM running 24/7 (resource-expensive). Reserve for services that must stay warm (low first-request latency), do background work between requests, or run a frequent cron. */
104
141
  'ALWAYS_ON'
@@ -732,6 +769,353 @@ export type SdkListAppEnvQuery = {
732
769
  updatedAt: string;
733
770
  }>;
734
771
  };
772
+ export type RunFieldsFragment = {
773
+ id: string;
774
+ workspaceID: string;
775
+ ownerId: string;
776
+ status: RunStatus;
777
+ rawStatus: string;
778
+ command: string | null;
779
+ harness: string | null;
780
+ prompt: string | null;
781
+ setup: Array<string>;
782
+ skills: Array<string>;
783
+ approval: string;
784
+ mode: string;
785
+ parentRunID: string | null;
786
+ depth: number;
787
+ memoryMiB: number;
788
+ maxSeconds: number;
789
+ metadata: unknown;
790
+ error: string | null;
791
+ exitCode: number | null;
792
+ vmID: string | null;
793
+ transcriptAvailable: boolean;
794
+ createdAt: string;
795
+ startedAt: string | null;
796
+ settledAt: string | null;
797
+ question: {
798
+ id: string;
799
+ text: string;
800
+ options: Array<string>;
801
+ askedAt: string;
802
+ } | null;
803
+ usage: {
804
+ vmSeconds: number;
805
+ memoryMiB: number;
806
+ mibSeconds: number;
807
+ };
808
+ };
809
+ export type SdkCreateRunMutationVariables = Exact<{
810
+ input: CreateRunInput;
811
+ }>;
812
+ export type SdkCreateRunMutation = {
813
+ createRun: {
814
+ id: string;
815
+ workspaceID: string;
816
+ ownerId: string;
817
+ status: RunStatus;
818
+ rawStatus: string;
819
+ command: string | null;
820
+ harness: string | null;
821
+ prompt: string | null;
822
+ setup: Array<string>;
823
+ skills: Array<string>;
824
+ approval: string;
825
+ mode: string;
826
+ parentRunID: string | null;
827
+ depth: number;
828
+ memoryMiB: number;
829
+ maxSeconds: number;
830
+ metadata: unknown;
831
+ error: string | null;
832
+ exitCode: number | null;
833
+ vmID: string | null;
834
+ transcriptAvailable: boolean;
835
+ createdAt: string;
836
+ startedAt: string | null;
837
+ settledAt: string | null;
838
+ question: {
839
+ id: string;
840
+ text: string;
841
+ options: Array<string>;
842
+ askedAt: string;
843
+ } | null;
844
+ usage: {
845
+ vmSeconds: number;
846
+ memoryMiB: number;
847
+ mibSeconds: number;
848
+ };
849
+ };
850
+ };
851
+ export type SdkGetRunQueryVariables = Exact<{
852
+ id: string | number;
853
+ }>;
854
+ export type SdkGetRunQuery = {
855
+ run: {
856
+ id: string;
857
+ workspaceID: string;
858
+ ownerId: string;
859
+ status: RunStatus;
860
+ rawStatus: string;
861
+ command: string | null;
862
+ harness: string | null;
863
+ prompt: string | null;
864
+ setup: Array<string>;
865
+ skills: Array<string>;
866
+ approval: string;
867
+ mode: string;
868
+ parentRunID: string | null;
869
+ depth: number;
870
+ memoryMiB: number;
871
+ maxSeconds: number;
872
+ metadata: unknown;
873
+ error: string | null;
874
+ exitCode: number | null;
875
+ vmID: string | null;
876
+ transcriptAvailable: boolean;
877
+ createdAt: string;
878
+ startedAt: string | null;
879
+ settledAt: string | null;
880
+ question: {
881
+ id: string;
882
+ text: string;
883
+ options: Array<string>;
884
+ askedAt: string;
885
+ } | null;
886
+ usage: {
887
+ vmSeconds: number;
888
+ memoryMiB: number;
889
+ mibSeconds: number;
890
+ };
891
+ };
892
+ };
893
+ export type SdkPollRunQueryVariables = Exact<{
894
+ id: string | number;
895
+ }>;
896
+ export type SdkPollRunQuery = {
897
+ run: {
898
+ id: string;
899
+ status: RunStatus;
900
+ error: string | null;
901
+ exitCode: number | null;
902
+ };
903
+ };
904
+ export type SdkListRunsQueryVariables = Exact<{
905
+ input?: ListRunsInput | null | undefined;
906
+ }>;
907
+ export type SdkListRunsQuery = {
908
+ runs: {
909
+ total: number;
910
+ limit: number;
911
+ offset: number;
912
+ hasMore: boolean;
913
+ nextOffset: number | null;
914
+ items: Array<{
915
+ id: string;
916
+ workspaceID: string;
917
+ ownerId: string;
918
+ status: RunStatus;
919
+ rawStatus: string;
920
+ command: string | null;
921
+ harness: string | null;
922
+ prompt: string | null;
923
+ setup: Array<string>;
924
+ skills: Array<string>;
925
+ approval: string;
926
+ mode: string;
927
+ parentRunID: string | null;
928
+ depth: number;
929
+ memoryMiB: number;
930
+ maxSeconds: number;
931
+ metadata: unknown;
932
+ error: string | null;
933
+ exitCode: number | null;
934
+ vmID: string | null;
935
+ transcriptAvailable: boolean;
936
+ createdAt: string;
937
+ startedAt: string | null;
938
+ settledAt: string | null;
939
+ question: {
940
+ id: string;
941
+ text: string;
942
+ options: Array<string>;
943
+ askedAt: string;
944
+ } | null;
945
+ usage: {
946
+ vmSeconds: number;
947
+ memoryMiB: number;
948
+ mibSeconds: number;
949
+ };
950
+ }>;
951
+ };
952
+ };
953
+ export type SdkCancelRunMutationVariables = Exact<{
954
+ id: string | number;
955
+ }>;
956
+ export type SdkCancelRunMutation = {
957
+ cancelRun: {
958
+ id: string;
959
+ workspaceID: string;
960
+ ownerId: string;
961
+ status: RunStatus;
962
+ rawStatus: string;
963
+ command: string | null;
964
+ harness: string | null;
965
+ prompt: string | null;
966
+ setup: Array<string>;
967
+ skills: Array<string>;
968
+ approval: string;
969
+ mode: string;
970
+ parentRunID: string | null;
971
+ depth: number;
972
+ memoryMiB: number;
973
+ maxSeconds: number;
974
+ metadata: unknown;
975
+ error: string | null;
976
+ exitCode: number | null;
977
+ vmID: string | null;
978
+ transcriptAvailable: boolean;
979
+ createdAt: string;
980
+ startedAt: string | null;
981
+ settledAt: string | null;
982
+ question: {
983
+ id: string;
984
+ text: string;
985
+ options: Array<string>;
986
+ askedAt: string;
987
+ } | null;
988
+ usage: {
989
+ vmSeconds: number;
990
+ memoryMiB: number;
991
+ mibSeconds: number;
992
+ };
993
+ };
994
+ };
995
+ export type SdkRunEventsQueryVariables = Exact<{
996
+ runID: string | number;
997
+ limit?: number | null | undefined;
998
+ }>;
999
+ export type SdkRunEventsQuery = {
1000
+ runEvents: Array<{
1001
+ id: string;
1002
+ runID: string;
1003
+ type: string;
1004
+ severity: DeploymentEventSeverity;
1005
+ message: string;
1006
+ metadata: unknown;
1007
+ createdAt: string;
1008
+ }>;
1009
+ };
1010
+ export type SdkRunConsoleQueryVariables = Exact<{
1011
+ id: string | number;
1012
+ tailBytes?: number | null | undefined;
1013
+ }>;
1014
+ export type SdkRunConsoleQuery = {
1015
+ runConsole: {
1016
+ runID: string;
1017
+ running: boolean;
1018
+ text: string;
1019
+ };
1020
+ };
1021
+ export type SdkRunTranscriptQueryVariables = Exact<{
1022
+ id: string | number;
1023
+ tailBytes?: number | null | undefined;
1024
+ }>;
1025
+ export type SdkRunTranscriptQuery = {
1026
+ runTranscript: {
1027
+ runID: string;
1028
+ available: boolean;
1029
+ text: string;
1030
+ totalBytes: number;
1031
+ truncated: boolean;
1032
+ };
1033
+ };
1034
+ export type SdkAnswerRunMutationVariables = Exact<{
1035
+ id: string | number;
1036
+ answer: string;
1037
+ }>;
1038
+ export type SdkAnswerRunMutation = {
1039
+ answerRun: {
1040
+ id: string;
1041
+ workspaceID: string;
1042
+ ownerId: string;
1043
+ status: RunStatus;
1044
+ rawStatus: string;
1045
+ command: string | null;
1046
+ harness: string | null;
1047
+ prompt: string | null;
1048
+ setup: Array<string>;
1049
+ skills: Array<string>;
1050
+ approval: string;
1051
+ mode: string;
1052
+ parentRunID: string | null;
1053
+ depth: number;
1054
+ memoryMiB: number;
1055
+ maxSeconds: number;
1056
+ metadata: unknown;
1057
+ error: string | null;
1058
+ exitCode: number | null;
1059
+ vmID: string | null;
1060
+ transcriptAvailable: boolean;
1061
+ createdAt: string;
1062
+ startedAt: string | null;
1063
+ settledAt: string | null;
1064
+ question: {
1065
+ id: string;
1066
+ text: string;
1067
+ options: Array<string>;
1068
+ askedAt: string;
1069
+ } | null;
1070
+ usage: {
1071
+ vmSeconds: number;
1072
+ memoryMiB: number;
1073
+ mibSeconds: number;
1074
+ };
1075
+ };
1076
+ };
1077
+ export type SdkFollowUpRunMutationVariables = Exact<{
1078
+ input: FollowUpRunInput;
1079
+ }>;
1080
+ export type SdkFollowUpRunMutation = {
1081
+ followUpRun: {
1082
+ id: string;
1083
+ workspaceID: string;
1084
+ ownerId: string;
1085
+ status: RunStatus;
1086
+ rawStatus: string;
1087
+ command: string | null;
1088
+ harness: string | null;
1089
+ prompt: string | null;
1090
+ setup: Array<string>;
1091
+ skills: Array<string>;
1092
+ approval: string;
1093
+ mode: string;
1094
+ parentRunID: string | null;
1095
+ depth: number;
1096
+ memoryMiB: number;
1097
+ maxSeconds: number;
1098
+ metadata: unknown;
1099
+ error: string | null;
1100
+ exitCode: number | null;
1101
+ vmID: string | null;
1102
+ transcriptAvailable: boolean;
1103
+ createdAt: string;
1104
+ startedAt: string | null;
1105
+ settledAt: string | null;
1106
+ question: {
1107
+ id: string;
1108
+ text: string;
1109
+ options: Array<string>;
1110
+ askedAt: string;
1111
+ } | null;
1112
+ usage: {
1113
+ vmSeconds: number;
1114
+ memoryMiB: number;
1115
+ mibSeconds: number;
1116
+ };
1117
+ };
1118
+ };
735
1119
  export declare class TypedDocumentString<TResult, TVariables> extends String implements DocumentTypeDecoration<TResult, TVariables> {
736
1120
  __apiType?: NonNullable<DocumentTypeDecoration<TResult, TVariables>['__apiType']>;
737
1121
  private value;
@@ -740,6 +1124,7 @@ export declare class TypedDocumentString<TResult, TVariables> extends String imp
740
1124
  toString(): string & DocumentTypeDecoration<TResult, TVariables>;
741
1125
  }
742
1126
  export declare const DeploymentFieldsFragmentDoc: TypedDocumentString<DeploymentFieldsFragment, unknown>;
1127
+ export declare const RunFieldsFragmentDoc: TypedDocumentString<RunFieldsFragment, unknown>;
743
1128
  export declare const SdkWhoamiDocument: TypedDocumentString<SdkWhoamiQuery, SdkWhoamiQueryVariables>;
744
1129
  export declare const SdkCreateWorkspaceDocument: TypedDocumentString<SdkCreateWorkspaceMutation, SdkCreateWorkspaceMutationVariables>;
745
1130
  export declare const SdkListWorkspacesDocument: TypedDocumentString<SdkListWorkspacesQuery, SdkListWorkspacesQueryVariables>;
@@ -772,4 +1157,14 @@ export declare const SdkSetAppSecretDocument: TypedDocumentString<SdkSetAppSecre
772
1157
  export declare const SdkRemoveAppEnvDocument: TypedDocumentString<SdkRemoveAppEnvMutation, SdkRemoveAppEnvMutationVariables>;
773
1158
  export declare const SdkInheritAppEnvDocument: TypedDocumentString<SdkInheritAppEnvMutation, SdkInheritAppEnvMutationVariables>;
774
1159
  export declare const SdkListAppEnvDocument: TypedDocumentString<SdkListAppEnvQuery, SdkListAppEnvQueryVariables>;
1160
+ export declare const SdkCreateRunDocument: TypedDocumentString<SdkCreateRunMutation, SdkCreateRunMutationVariables>;
1161
+ export declare const SdkGetRunDocument: TypedDocumentString<SdkGetRunQuery, SdkGetRunQueryVariables>;
1162
+ export declare const SdkPollRunDocument: TypedDocumentString<SdkPollRunQuery, SdkPollRunQueryVariables>;
1163
+ export declare const SdkListRunsDocument: TypedDocumentString<SdkListRunsQuery, SdkListRunsQueryVariables>;
1164
+ export declare const SdkCancelRunDocument: TypedDocumentString<SdkCancelRunMutation, SdkCancelRunMutationVariables>;
1165
+ export declare const SdkRunEventsDocument: TypedDocumentString<SdkRunEventsQuery, SdkRunEventsQueryVariables>;
1166
+ export declare const SdkRunConsoleDocument: TypedDocumentString<SdkRunConsoleQuery, SdkRunConsoleQueryVariables>;
1167
+ export declare const SdkRunTranscriptDocument: TypedDocumentString<SdkRunTranscriptQuery, SdkRunTranscriptQueryVariables>;
1168
+ export declare const SdkAnswerRunDocument: TypedDocumentString<SdkAnswerRunMutation, SdkAnswerRunMutationVariables>;
1169
+ export declare const SdkFollowUpRunDocument: TypedDocumentString<SdkFollowUpRunMutation, SdkFollowUpRunMutationVariables>;
775
1170
  export {};