@shipfox/api-workflows-dto 2.0.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.
Files changed (87) hide show
  1. package/.turbo/turbo-build.log +2 -0
  2. package/.turbo/turbo-type$colon$emit.log +1 -0
  3. package/.turbo/turbo-type.log +1 -0
  4. package/CHANGELOG.md +46 -0
  5. package/LICENSE +21 -0
  6. package/dist/events.d.ts +316 -0
  7. package/dist/events.d.ts.map +1 -0
  8. package/dist/events.js +144 -0
  9. package/dist/events.js.map +1 -0
  10. package/dist/index.d.ts +5 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +6 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/schemas/agent-runtime-config.d.ts +7 -0
  15. package/dist/schemas/agent-runtime-config.d.ts.map +1 -0
  16. package/dist/schemas/agent-runtime-config.js +7 -0
  17. package/dist/schemas/agent-runtime-config.js.map +1 -0
  18. package/dist/schemas/checkout-token.d.ts +56 -0
  19. package/dist/schemas/checkout-token.d.ts.map +1 -0
  20. package/dist/schemas/checkout-token.js +44 -0
  21. package/dist/schemas/checkout-token.js.map +1 -0
  22. package/dist/schemas/checkout.d.ts +10 -0
  23. package/dist/schemas/checkout.d.ts.map +1 -0
  24. package/dist/schemas/checkout.js +10 -0
  25. package/dist/schemas/checkout.js.map +1 -0
  26. package/dist/schemas/index.d.ts +11 -0
  27. package/dist/schemas/index.d.ts.map +1 -0
  28. package/dist/schemas/index.js +12 -0
  29. package/dist/schemas/index.js.map +1 -0
  30. package/dist/schemas/job-execution.d.ts +116 -0
  31. package/dist/schemas/job-execution.d.ts.map +1 -0
  32. package/dist/schemas/job-execution.js +42 -0
  33. package/dist/schemas/job-execution.js.map +1 -0
  34. package/dist/schemas/job-listening.d.ts +93 -0
  35. package/dist/schemas/job-listening.d.ts.map +1 -0
  36. package/dist/schemas/job-listening.js +60 -0
  37. package/dist/schemas/job-listening.js.map +1 -0
  38. package/dist/schemas/job.d.ts +101 -0
  39. package/dist/schemas/job.d.ts.map +1 -0
  40. package/dist/schemas/job.js +43 -0
  41. package/dist/schemas/job.js.map +1 -0
  42. package/dist/schemas/log-outcome.d.ts +7 -0
  43. package/dist/schemas/log-outcome.d.ts.map +1 -0
  44. package/dist/schemas/log-outcome.js +7 -0
  45. package/dist/schemas/log-outcome.js.map +1 -0
  46. package/dist/schemas/step.d.ts +186 -0
  47. package/dist/schemas/step.d.ts.map +1 -0
  48. package/dist/schemas/step.js +137 -0
  49. package/dist/schemas/step.js.map +1 -0
  50. package/dist/schemas/workflow-run-detail.d.ts +807 -0
  51. package/dist/schemas/workflow-run-detail.d.ts.map +1 -0
  52. package/dist/schemas/workflow-run-detail.js +51 -0
  53. package/dist/schemas/workflow-run-detail.js.map +1 -0
  54. package/dist/schemas/workflow-run.d.ts +213 -0
  55. package/dist/schemas/workflow-run.d.ts.map +1 -0
  56. package/dist/schemas/workflow-run.js +112 -0
  57. package/dist/schemas/workflow-run.js.map +1 -0
  58. package/dist/tsconfig.test.tsbuildinfo +1 -0
  59. package/package.json +55 -0
  60. package/src/events.test.ts +362 -0
  61. package/src/events.ts +180 -0
  62. package/src/index.ts +130 -0
  63. package/src/schemas/agent-runtime-config.test.ts +17 -0
  64. package/src/schemas/agent-runtime-config.ts +8 -0
  65. package/src/schemas/checkout-token.test.ts +162 -0
  66. package/src/schemas/checkout-token.ts +45 -0
  67. package/src/schemas/checkout.test.ts +49 -0
  68. package/src/schemas/checkout.ts +11 -0
  69. package/src/schemas/index.ts +104 -0
  70. package/src/schemas/job-execution.test.ts +27 -0
  71. package/src/schemas/job-execution.ts +92 -0
  72. package/src/schemas/job-listening.test.ts +64 -0
  73. package/src/schemas/job-listening.ts +59 -0
  74. package/src/schemas/job.test.ts +42 -0
  75. package/src/schemas/job.ts +53 -0
  76. package/src/schemas/log-outcome.ts +5 -0
  77. package/src/schemas/step-source-location.test.ts +45 -0
  78. package/src/schemas/step.test.ts +176 -0
  79. package/src/schemas/step.ts +163 -0
  80. package/src/schemas/workflow-run-detail.ts +67 -0
  81. package/src/schemas/workflow-run.test.ts +59 -0
  82. package/src/schemas/workflow-run.ts +144 -0
  83. package/tsconfig.build.json +9 -0
  84. package/tsconfig.build.tsbuildinfo +1 -0
  85. package/tsconfig.json +3 -0
  86. package/tsconfig.test.json +8 -0
  87. package/vitest.config.ts +3 -0
@@ -0,0 +1,101 @@
1
+ import { z } from 'zod';
2
+ export declare const jobStatusSchema: z.ZodEnum<{
3
+ cancelled: "cancelled";
4
+ pending: "pending";
5
+ running: "running";
6
+ succeeded: "succeeded";
7
+ failed: "failed";
8
+ skipped: "skipped";
9
+ }>;
10
+ export declare const jobStatusReasonSchema: z.ZodEnum<{
11
+ unknown: "unknown";
12
+ dependency_not_completed: "dependency_not_completed";
13
+ condition_false: "condition_false";
14
+ default_gate_rejected: "default_gate_rejected";
15
+ condition_rejected: "condition_rejected";
16
+ condition_errored: "condition_errored";
17
+ user_cancelled: "user_cancelled";
18
+ run_cancelled: "run_cancelled";
19
+ timed_out: "timed_out";
20
+ runner_lost: "runner_lost";
21
+ step_failed: "step_failed";
22
+ }>;
23
+ export declare const jobDtoSchema: z.ZodObject<{
24
+ id: z.ZodString;
25
+ run_attempt_id: z.ZodString;
26
+ key: z.ZodString;
27
+ name: z.ZodNullable<z.ZodString>;
28
+ mode: z.ZodEnum<{
29
+ one_shot: "one_shot";
30
+ listening: "listening";
31
+ }>;
32
+ status: z.ZodEnum<{
33
+ cancelled: "cancelled";
34
+ pending: "pending";
35
+ running: "running";
36
+ succeeded: "succeeded";
37
+ failed: "failed";
38
+ skipped: "skipped";
39
+ }>;
40
+ status_reason: z.ZodNullable<z.ZodEnum<{
41
+ unknown: "unknown";
42
+ dependency_not_completed: "dependency_not_completed";
43
+ condition_false: "condition_false";
44
+ default_gate_rejected: "default_gate_rejected";
45
+ condition_rejected: "condition_rejected";
46
+ condition_errored: "condition_errored";
47
+ user_cancelled: "user_cancelled";
48
+ run_cancelled: "run_cancelled";
49
+ timed_out: "timed_out";
50
+ runner_lost: "runner_lost";
51
+ step_failed: "step_failed";
52
+ }>>;
53
+ carried_over: z.ZodBoolean;
54
+ listening: z.ZodNullable<z.ZodObject<{
55
+ on: z.ZodArray<z.ZodObject<{
56
+ source: z.ZodString;
57
+ event: z.ZodString;
58
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
59
+ filter: z.ZodOptional<z.ZodString>;
60
+ }, z.core.$strip>>;
61
+ until: z.ZodNullable<z.ZodArray<z.ZodObject<{
62
+ source: z.ZodString;
63
+ event: z.ZodString;
64
+ inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
65
+ filter: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$strip>>>;
67
+ timeout_ms: z.ZodNullable<z.ZodNumber>;
68
+ max_executions: z.ZodNullable<z.ZodNumber>;
69
+ batch: z.ZodNullable<z.ZodObject<{
70
+ debounce_ms: z.ZodOptional<z.ZodNumber>;
71
+ max_size: z.ZodOptional<z.ZodNumber>;
72
+ max_wait_ms: z.ZodOptional<z.ZodNumber>;
73
+ }, z.core.$strip>>;
74
+ on_resolve: z.ZodEnum<{
75
+ finish: "finish";
76
+ cancel: "cancel";
77
+ }>;
78
+ execution_timeout_ms: z.ZodNullable<z.ZodNumber>;
79
+ name: z.ZodNullable<z.ZodString>;
80
+ }, z.core.$strip>>;
81
+ listener_status: z.ZodEnum<{
82
+ listening: "listening";
83
+ inactive: "inactive";
84
+ resolved: "resolved";
85
+ }>;
86
+ resolution_reason: z.ZodNullable<z.ZodEnum<{
87
+ until: "until";
88
+ timeout: "timeout";
89
+ max_executions: "max_executions";
90
+ cancelled: "cancelled";
91
+ }>>;
92
+ outputs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
93
+ dependencies: z.ZodArray<z.ZodString>;
94
+ position: z.ZodNumber;
95
+ created_at: z.ZodString;
96
+ updated_at: z.ZodString;
97
+ }, z.core.$strip>;
98
+ export type JobDto = z.infer<typeof jobDtoSchema>;
99
+ export type JobStatusDto = z.infer<typeof jobStatusSchema>;
100
+ export type JobStatusReasonDto = z.infer<typeof jobStatusReasonSchema>;
101
+ //# sourceMappingURL=job.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"job.d.ts","sourceRoot":"","sources":["../../src/schemas/job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAQtB,eAAO,MAAM,eAAe;;;;;;;EAO1B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAYhC,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBvB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { z } from 'zod';
2
+ import { jobListeningSchema, jobModeSchema, listenerStatusSchema, resolutionReasonSchema } from './job-listening.js';
3
+ export const jobStatusSchema = z.enum([
4
+ 'pending',
5
+ 'running',
6
+ 'succeeded',
7
+ 'failed',
8
+ 'cancelled',
9
+ 'skipped'
10
+ ]);
11
+ export const jobStatusReasonSchema = z.enum([
12
+ 'dependency_not_completed',
13
+ 'condition_false',
14
+ 'default_gate_rejected',
15
+ 'condition_rejected',
16
+ 'condition_errored',
17
+ 'user_cancelled',
18
+ 'run_cancelled',
19
+ 'timed_out',
20
+ 'runner_lost',
21
+ 'step_failed',
22
+ 'unknown'
23
+ ]);
24
+ export const jobDtoSchema = z.object({
25
+ id: z.string().uuid(),
26
+ run_attempt_id: z.string().uuid(),
27
+ key: z.string(),
28
+ name: z.string().nullable(),
29
+ mode: jobModeSchema,
30
+ status: jobStatusSchema,
31
+ status_reason: jobStatusReasonSchema.nullable(),
32
+ carried_over: z.boolean(),
33
+ listening: jobListeningSchema.nullable(),
34
+ listener_status: listenerStatusSchema,
35
+ resolution_reason: resolutionReasonSchema.nullable(),
36
+ outputs: z.record(z.string(), z.unknown()).nullable(),
37
+ dependencies: z.array(z.string()),
38
+ position: z.number(),
39
+ created_at: z.string(),
40
+ updated_at: z.string()
41
+ });
42
+
43
+ //# sourceMappingURL=job.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/schemas/job.ts"],"sourcesContent":["import {z} from 'zod';\nimport {\n jobListeningSchema,\n jobModeSchema,\n listenerStatusSchema,\n resolutionReasonSchema,\n} from './job-listening.js';\n\nexport const jobStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n 'skipped',\n]);\n\nexport const jobStatusReasonSchema = z.enum([\n 'dependency_not_completed',\n 'condition_false',\n 'default_gate_rejected',\n 'condition_rejected',\n 'condition_errored',\n 'user_cancelled',\n 'run_cancelled',\n 'timed_out',\n 'runner_lost',\n 'step_failed',\n 'unknown',\n]);\n\nexport const jobDtoSchema = z.object({\n id: z.string().uuid(),\n run_attempt_id: z.string().uuid(),\n key: z.string(),\n name: z.string().nullable(),\n mode: jobModeSchema,\n status: jobStatusSchema,\n status_reason: jobStatusReasonSchema.nullable(),\n carried_over: z.boolean(),\n listening: jobListeningSchema.nullable(),\n listener_status: listenerStatusSchema,\n resolution_reason: resolutionReasonSchema.nullable(),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n dependencies: z.array(z.string()),\n position: z.number(),\n created_at: z.string(),\n updated_at: z.string(),\n});\n\nexport type JobDto = z.infer<typeof jobDtoSchema>;\nexport type JobStatusDto = z.infer<typeof jobStatusSchema>;\nexport type JobStatusReasonDto = z.infer<typeof jobStatusReasonSchema>;\n"],"names":["z","jobListeningSchema","jobModeSchema","listenerStatusSchema","resolutionReasonSchema","jobStatusSchema","enum","jobStatusReasonSchema","jobDtoSchema","object","id","string","uuid","run_attempt_id","key","name","nullable","mode","status","status_reason","carried_over","boolean","listening","listener_status","resolution_reason","outputs","record","unknown","dependencies","array","position","number","created_at","updated_at"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SACEC,kBAAkB,EAClBC,aAAa,EACbC,oBAAoB,EACpBC,sBAAsB,QACjB,qBAAqB;AAE5B,OAAO,MAAMC,kBAAkBL,EAAEM,IAAI,CAAC;IACpC;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH,OAAO,MAAMC,wBAAwBP,EAAEM,IAAI,CAAC;IAC1C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH,OAAO,MAAME,eAAeR,EAAES,MAAM,CAAC;IACnCC,IAAIV,EAAEW,MAAM,GAAGC,IAAI;IACnBC,gBAAgBb,EAAEW,MAAM,GAAGC,IAAI;IAC/BE,KAAKd,EAAEW,MAAM;IACbI,MAAMf,EAAEW,MAAM,GAAGK,QAAQ;IACzBC,MAAMf;IACNgB,QAAQb;IACRc,eAAeZ,sBAAsBS,QAAQ;IAC7CI,cAAcpB,EAAEqB,OAAO;IACvBC,WAAWrB,mBAAmBe,QAAQ;IACtCO,iBAAiBpB;IACjBqB,mBAAmBpB,uBAAuBY,QAAQ;IAClDS,SAASzB,EAAE0B,MAAM,CAAC1B,EAAEW,MAAM,IAAIX,EAAE2B,OAAO,IAAIX,QAAQ;IACnDY,cAAc5B,EAAE6B,KAAK,CAAC7B,EAAEW,MAAM;IAC9BmB,UAAU9B,EAAE+B,MAAM;IAClBC,YAAYhC,EAAEW,MAAM;IACpBsB,YAAYjC,EAAEW,MAAM;AACtB,GAAG"}
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const logOutcomeSchema: z.ZodEnum<{
3
+ drained: "drained";
4
+ abandoned: "abandoned";
5
+ }>;
6
+ export type LogOutcomeDto = z.infer<typeof logOutcomeSchema>;
7
+ //# sourceMappingURL=log-outcome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-outcome.d.ts","sourceRoot":"","sources":["../../src/schemas/log-outcome.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,gBAAgB;;;EAAmC,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export const logOutcomeSchema = z.enum([
3
+ 'drained',
4
+ 'abandoned'
5
+ ]);
6
+
7
+ //# sourceMappingURL=log-outcome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/schemas/log-outcome.ts"],"sourcesContent":["import {z} from 'zod';\n\nexport const logOutcomeSchema = z.enum(['drained', 'abandoned']);\n\nexport type LogOutcomeDto = z.infer<typeof logOutcomeSchema>;\n"],"names":["z","logOutcomeSchema","enum"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,OAAO,MAAMC,mBAAmBD,EAAEE,IAAI,CAAC;IAAC;IAAW;CAAY,EAAE"}
@@ -0,0 +1,186 @@
1
+ import { z } from 'zod';
2
+ export declare const stepErrorReasonSchema: z.ZodEnum<{
3
+ checkout_failed: "checkout_failed";
4
+ checkout_auth_failed: "checkout_auth_failed";
5
+ checkout_unavailable: "checkout_unavailable";
6
+ git_unavailable: "git_unavailable";
7
+ workspace_prep_failed: "workspace_prep_failed";
8
+ setup_aborted: "setup_aborted";
9
+ config_unresolvable: "config_unresolvable";
10
+ output_invalid: "output_invalid";
11
+ agent_config_invalid: "agent_config_invalid";
12
+ agent_invocation_failed: "agent_invocation_failed";
13
+ }>;
14
+ export type StepErrorReasonDto = z.infer<typeof stepErrorReasonSchema>;
15
+ export declare const agentConfigIssueSchema: z.ZodEnum<{
16
+ step_config_invalid: "step_config_invalid";
17
+ provider_not_configured: "provider_not_configured";
18
+ provider_unsupported: "provider_unsupported";
19
+ model_unavailable: "model_unavailable";
20
+ credentials_invalid: "credentials_invalid";
21
+ }>;
22
+ export type AgentConfigIssueDto = z.infer<typeof agentConfigIssueSchema>;
23
+ export declare const stepErrorCategorySchema: z.ZodEnum<{
24
+ setup: "setup";
25
+ user: "user";
26
+ }>;
27
+ export type StepErrorCategoryDto = z.infer<typeof stepErrorCategorySchema>;
28
+ export declare const STEP_ERROR_MESSAGE_MAX_LENGTH = 2048;
29
+ export declare const stepErrorDtoSchema: z.ZodNullable<z.ZodObject<{
30
+ message: z.ZodString;
31
+ exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
32
+ signal: z.ZodOptional<z.ZodString>;
33
+ reason: z.ZodOptional<z.ZodEnum<{
34
+ checkout_failed: "checkout_failed";
35
+ checkout_auth_failed: "checkout_auth_failed";
36
+ checkout_unavailable: "checkout_unavailable";
37
+ git_unavailable: "git_unavailable";
38
+ workspace_prep_failed: "workspace_prep_failed";
39
+ setup_aborted: "setup_aborted";
40
+ config_unresolvable: "config_unresolvable";
41
+ output_invalid: "output_invalid";
42
+ agent_config_invalid: "agent_config_invalid";
43
+ agent_invocation_failed: "agent_invocation_failed";
44
+ }>>;
45
+ field: z.ZodOptional<z.ZodString>;
46
+ source: z.ZodOptional<z.ZodString>;
47
+ agent_config_issue: z.ZodOptional<z.ZodEnum<{
48
+ step_config_invalid: "step_config_invalid";
49
+ provider_not_configured: "provider_not_configured";
50
+ provider_unsupported: "provider_unsupported";
51
+ model_unavailable: "model_unavailable";
52
+ credentials_invalid: "credentials_invalid";
53
+ }>>;
54
+ category: z.ZodOptional<z.ZodEnum<{
55
+ setup: "setup";
56
+ user: "user";
57
+ }>>;
58
+ }, z.core.$strip>>;
59
+ export type StepErrorDto = z.infer<typeof stepErrorDtoSchema>;
60
+ export declare const stepSourceLocationSchema: z.ZodObject<{
61
+ start_line: z.ZodNumber;
62
+ end_line: z.ZodNumber;
63
+ }, z.core.$strip>;
64
+ export type StepSourceLocationDto = z.infer<typeof stepSourceLocationSchema>;
65
+ export declare const stepDtoSchema: z.ZodObject<{
66
+ id: z.ZodString;
67
+ job_execution_id: z.ZodString;
68
+ key: z.ZodNullable<z.ZodString>;
69
+ name: z.ZodString;
70
+ source_location: z.ZodNullable<z.ZodObject<{
71
+ start_line: z.ZodNumber;
72
+ end_line: z.ZodNumber;
73
+ }, z.core.$strip>>;
74
+ status: z.ZodString;
75
+ type: z.ZodString;
76
+ config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
77
+ error: z.ZodNullable<z.ZodObject<{
78
+ message: z.ZodString;
79
+ exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
80
+ signal: z.ZodOptional<z.ZodString>;
81
+ reason: z.ZodOptional<z.ZodEnum<{
82
+ checkout_failed: "checkout_failed";
83
+ checkout_auth_failed: "checkout_auth_failed";
84
+ checkout_unavailable: "checkout_unavailable";
85
+ git_unavailable: "git_unavailable";
86
+ workspace_prep_failed: "workspace_prep_failed";
87
+ setup_aborted: "setup_aborted";
88
+ config_unresolvable: "config_unresolvable";
89
+ output_invalid: "output_invalid";
90
+ agent_config_invalid: "agent_config_invalid";
91
+ agent_invocation_failed: "agent_invocation_failed";
92
+ }>>;
93
+ field: z.ZodOptional<z.ZodString>;
94
+ source: z.ZodOptional<z.ZodString>;
95
+ agent_config_issue: z.ZodOptional<z.ZodEnum<{
96
+ step_config_invalid: "step_config_invalid";
97
+ provider_not_configured: "provider_not_configured";
98
+ provider_unsupported: "provider_unsupported";
99
+ model_unavailable: "model_unavailable";
100
+ credentials_invalid: "credentials_invalid";
101
+ }>>;
102
+ category: z.ZodOptional<z.ZodEnum<{
103
+ setup: "setup";
104
+ user: "user";
105
+ }>>;
106
+ }, z.core.$strip>>;
107
+ position: z.ZodNumber;
108
+ current_attempt: z.ZodNumber;
109
+ created_at: z.ZodString;
110
+ updated_at: z.ZodString;
111
+ }, z.core.$strip>;
112
+ export type StepDto = z.infer<typeof stepDtoSchema>;
113
+ export declare const stepGateResultDtoSchema: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
114
+ kind: z.ZodLiteral<"none">;
115
+ }, z.core.$strip>, z.ZodObject<{
116
+ kind: z.ZodLiteral<"not_evaluated">;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ kind: z.ZodLiteral<"passed">;
119
+ passed: z.ZodLiteral<true>;
120
+ source: z.ZodString;
121
+ exit_code: z.ZodNullable<z.ZodNumber>;
122
+ }, z.core.$strip>, z.ZodObject<{
123
+ kind: z.ZodLiteral<"failed">;
124
+ passed: z.ZodLiteral<false>;
125
+ source: z.ZodString;
126
+ exit_code: z.ZodNullable<z.ZodNumber>;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ kind: z.ZodLiteral<"uncheckable">;
129
+ passed: z.ZodLiteral<false>;
130
+ uncheckable: z.ZodLiteral<true>;
131
+ reason: z.ZodString;
132
+ exit_code: z.ZodNullable<z.ZodNumber>;
133
+ }, z.core.$strip>, z.ZodObject<{
134
+ kind: z.ZodLiteral<"evaluation_error">;
135
+ reason: z.ZodString;
136
+ exit_code: z.ZodNullable<z.ZodNumber>;
137
+ }, z.core.$strip>, z.ZodObject<{
138
+ kind: z.ZodLiteral<"unknown">;
139
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
140
+ }, z.core.$strip>], "kind">>;
141
+ export type StepGateResultDto = z.infer<typeof stepGateResultDtoSchema>;
142
+ export declare const stepAttemptDtoSchema: z.ZodObject<{
143
+ id: z.ZodString;
144
+ step_id: z.ZodString;
145
+ attempt: z.ZodNumber;
146
+ execution_order: z.ZodNumber;
147
+ status: z.ZodString;
148
+ exit_code: z.ZodNullable<z.ZodNumber>;
149
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
150
+ outputs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
151
+ response: z.ZodNullable<z.ZodString>;
152
+ error: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
153
+ gate_result: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
154
+ kind: z.ZodLiteral<"none">;
155
+ }, z.core.$strip>, z.ZodObject<{
156
+ kind: z.ZodLiteral<"not_evaluated">;
157
+ }, z.core.$strip>, z.ZodObject<{
158
+ kind: z.ZodLiteral<"passed">;
159
+ passed: z.ZodLiteral<true>;
160
+ source: z.ZodString;
161
+ exit_code: z.ZodNullable<z.ZodNumber>;
162
+ }, z.core.$strip>, z.ZodObject<{
163
+ kind: z.ZodLiteral<"failed">;
164
+ passed: z.ZodLiteral<false>;
165
+ source: z.ZodString;
166
+ exit_code: z.ZodNullable<z.ZodNumber>;
167
+ }, z.core.$strip>, z.ZodObject<{
168
+ kind: z.ZodLiteral<"uncheckable">;
169
+ passed: z.ZodLiteral<false>;
170
+ uncheckable: z.ZodLiteral<true>;
171
+ reason: z.ZodString;
172
+ exit_code: z.ZodNullable<z.ZodNumber>;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ kind: z.ZodLiteral<"evaluation_error">;
175
+ reason: z.ZodString;
176
+ exit_code: z.ZodNullable<z.ZodNumber>;
177
+ }, z.core.$strip>, z.ZodObject<{
178
+ kind: z.ZodLiteral<"unknown">;
179
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
180
+ }, z.core.$strip>], "kind">>;
181
+ restart_feedback: z.ZodNullable<z.ZodString>;
182
+ started_at: z.ZodString;
183
+ finished_at: z.ZodNullable<z.ZodString>;
184
+ }, z.core.$strip>;
185
+ export type StepAttemptDto = z.infer<typeof stepAttemptDtoSchema>;
186
+ //# sourceMappingURL=step.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/schemas/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,C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,0 +1,137 @@
1
+ import { z } from 'zod';
2
+ // Machine-readable cause of a step failure, for DB troubleshooting. The runner
3
+ // reports it and the server stores it as-is. The `checkout_*`, `git_unavailable`,
4
+ // `workspace_prep_failed`, and `setup_aborted` values cover setup-phase failures.
5
+ // For agent steps the cause is split: `agent_config_invalid` is a user-fixable
6
+ // configuration error (unknown provider, missing provider credentials on the runner,
7
+ // wrong provider/model pair, missing model or prompt), while `agent_invocation_failed`
8
+ // covers a genuine provider/API failure once the config is valid (network, 5xx, auth
9
+ // rejected at call time). (Aborts are never reported: the step loop stops before reporting.)
10
+ export const stepErrorReasonSchema = z.enum([
11
+ 'checkout_failed',
12
+ 'checkout_auth_failed',
13
+ 'checkout_unavailable',
14
+ 'git_unavailable',
15
+ 'workspace_prep_failed',
16
+ 'setup_aborted',
17
+ 'config_unresolvable',
18
+ 'output_invalid',
19
+ 'agent_config_invalid',
20
+ 'agent_invocation_failed'
21
+ ]);
22
+ export const agentConfigIssueSchema = z.enum([
23
+ 'step_config_invalid',
24
+ 'provider_not_configured',
25
+ 'provider_unsupported',
26
+ 'model_unavailable',
27
+ 'credentials_invalid'
28
+ ]);
29
+ // Whether a failure is infrastructure (`setup`) or user-code (`user`). Server-derived
30
+ // from the step's type on the read path; the runner never sends it.
31
+ export const stepErrorCategorySchema = z.enum([
32
+ 'setup',
33
+ 'user'
34
+ ]);
35
+ export const STEP_ERROR_MESSAGE_MAX_LENGTH = 2048;
36
+ export const stepErrorDtoSchema = z.object({
37
+ message: z.string().max(STEP_ERROR_MESSAGE_MAX_LENGTH),
38
+ exit_code: z.number().int().nullable().optional(),
39
+ signal: z.string().optional(),
40
+ reason: stepErrorReasonSchema.optional(),
41
+ field: z.string().optional(),
42
+ source: z.string().optional(),
43
+ agent_config_issue: agentConfigIssueSchema.optional(),
44
+ category: stepErrorCategorySchema.optional()
45
+ }).refine((error)=>error.agent_config_issue === undefined || error.reason === 'agent_config_invalid', {
46
+ message: 'agent_config_issue requires reason to be agent_config_invalid',
47
+ path: [
48
+ 'agent_config_issue'
49
+ ]
50
+ }).nullable();
51
+ export const stepSourceLocationSchema = z.object({
52
+ start_line: z.number().int().positive(),
53
+ end_line: z.number().int().positive()
54
+ }).refine((value)=>value.end_line >= value.start_line, {
55
+ message: 'end_line must be greater than or equal to start_line',
56
+ path: [
57
+ 'end_line'
58
+ ]
59
+ });
60
+ export const stepDtoSchema = z.object({
61
+ id: z.string().uuid(),
62
+ job_execution_id: z.string().uuid(),
63
+ key: z.string().nullable(),
64
+ name: z.string(),
65
+ source_location: stepSourceLocationSchema.nullable(),
66
+ status: z.string(),
67
+ type: z.string(),
68
+ config: z.record(z.string(), z.unknown()),
69
+ error: stepErrorDtoSchema,
70
+ position: z.number(),
71
+ // Execution-attempt identity of the current projection (>1 after a restart).
72
+ current_attempt: z.number().int(),
73
+ created_at: z.string(),
74
+ updated_at: z.string()
75
+ });
76
+ export const stepGateResultDtoSchema = z.discriminatedUnion('kind', [
77
+ z.object({
78
+ kind: z.literal('none')
79
+ }),
80
+ z.object({
81
+ kind: z.literal('not_evaluated')
82
+ }),
83
+ z.object({
84
+ kind: z.literal('passed'),
85
+ passed: z.literal(true),
86
+ source: z.string(),
87
+ exit_code: z.number().int().nullable()
88
+ }),
89
+ z.object({
90
+ kind: z.literal('failed'),
91
+ passed: z.literal(false),
92
+ source: z.string(),
93
+ exit_code: z.number().int().nullable()
94
+ }),
95
+ z.object({
96
+ kind: z.literal('uncheckable'),
97
+ passed: z.literal(false),
98
+ uncheckable: z.literal(true),
99
+ reason: z.string(),
100
+ exit_code: z.number().int().nullable()
101
+ }),
102
+ z.object({
103
+ kind: z.literal('evaluation_error'),
104
+ reason: z.string(),
105
+ exit_code: z.number().int().nullable()
106
+ }),
107
+ z.object({
108
+ kind: z.literal('unknown'),
109
+ data: z.record(z.string(), z.unknown())
110
+ })
111
+ ]).nullable();
112
+ // One execution attempt of a step (the durable history behind the current
113
+ // projection). Surfaced in run details so a restarted step's attempts are visible.
114
+ export const stepAttemptDtoSchema = z.object({
115
+ id: z.string().uuid(),
116
+ step_id: z.string().uuid(),
117
+ attempt: z.number().int().positive(),
118
+ execution_order: z.number().int().positive(),
119
+ status: z.string(),
120
+ exit_code: z.number().int().nullable(),
121
+ // `output` and `error` are opaque audit blobs: the raw jsonb persisted for the
122
+ // attempt, NOT snake_case-normalized (their nested keys may be camelCase, e.g.
123
+ // `error.exitCode`). Consume the top-level snake_case `exit_code` for the
124
+ // numeric code; treat these as display/debug payloads.
125
+ output: z.record(z.string(), z.unknown()).nullable(),
126
+ outputs: z.record(z.string(), z.unknown()).nullable(),
127
+ response: z.string().nullable(),
128
+ error: z.record(z.string(), z.unknown()).nullable(),
129
+ // `unknown.data` is the raw jsonb gate payload for legacy or unrecognized
130
+ // rows; nested keys are not snake_case-normalized.
131
+ gate_result: stepGateResultDtoSchema,
132
+ restart_feedback: z.string().nullable(),
133
+ started_at: z.string(),
134
+ finished_at: z.string().nullable()
135
+ });
136
+
137
+ //# sourceMappingURL=step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/schemas/step.ts"],"sourcesContent":["import {z} from 'zod';\n\n// Machine-readable cause of a step failure, for DB troubleshooting. The runner\n// reports it and the server stores it as-is. The `checkout_*`, `git_unavailable`,\n// `workspace_prep_failed`, and `setup_aborted` values cover setup-phase failures.\n// For agent steps the cause is split: `agent_config_invalid` is a user-fixable\n// configuration error (unknown provider, missing provider credentials on the runner,\n// wrong provider/model pair, missing model or prompt), while `agent_invocation_failed`\n// covers a genuine provider/API failure once the config is valid (network, 5xx, auth\n// rejected at call time). (Aborts are never reported: the step loop stops before reporting.)\nexport const stepErrorReasonSchema = z.enum([\n 'checkout_failed',\n 'checkout_auth_failed',\n 'checkout_unavailable',\n 'git_unavailable',\n 'workspace_prep_failed',\n 'setup_aborted',\n 'config_unresolvable',\n 'output_invalid',\n 'agent_config_invalid',\n 'agent_invocation_failed',\n]);\n\nexport type StepErrorReasonDto = z.infer<typeof stepErrorReasonSchema>;\n\nexport const agentConfigIssueSchema = z.enum([\n 'step_config_invalid',\n 'provider_not_configured',\n 'provider_unsupported',\n 'model_unavailable',\n 'credentials_invalid',\n]);\n\nexport type AgentConfigIssueDto = z.infer<typeof agentConfigIssueSchema>;\n\n// Whether a failure is infrastructure (`setup`) or user-code (`user`). Server-derived\n// from the step's type on the read path; the runner never sends it.\nexport const stepErrorCategorySchema = z.enum(['setup', 'user']);\n\nexport type StepErrorCategoryDto = z.infer<typeof stepErrorCategorySchema>;\n\nexport const STEP_ERROR_MESSAGE_MAX_LENGTH = 2048;\n\nexport const stepErrorDtoSchema = z\n .object({\n message: z.string().max(STEP_ERROR_MESSAGE_MAX_LENGTH),\n exit_code: z.number().int().nullable().optional(),\n signal: z.string().optional(),\n reason: stepErrorReasonSchema.optional(),\n field: z.string().optional(),\n source: z.string().optional(),\n agent_config_issue: agentConfigIssueSchema.optional(),\n category: stepErrorCategorySchema.optional(),\n })\n .refine(\n (error) => error.agent_config_issue === undefined || error.reason === 'agent_config_invalid',\n {\n message: 'agent_config_issue requires reason to be agent_config_invalid',\n path: ['agent_config_issue'],\n },\n )\n .nullable();\n\nexport type StepErrorDto = z.infer<typeof stepErrorDtoSchema>;\n\nexport const stepSourceLocationSchema = z\n .object({\n start_line: z.number().int().positive(),\n end_line: z.number().int().positive(),\n })\n .refine((value) => value.end_line >= value.start_line, {\n message: 'end_line must be greater than or equal to start_line',\n path: ['end_line'],\n });\n\nexport type StepSourceLocationDto = z.infer<typeof stepSourceLocationSchema>;\n\nexport const stepDtoSchema = z.object({\n id: z.string().uuid(),\n job_execution_id: z.string().uuid(),\n key: z.string().nullable(),\n name: z.string(),\n source_location: stepSourceLocationSchema.nullable(),\n status: z.string(),\n type: z.string(),\n config: z.record(z.string(), z.unknown()),\n error: stepErrorDtoSchema,\n position: z.number(),\n // Execution-attempt identity of the current projection (>1 after a restart).\n current_attempt: z.number().int(),\n created_at: z.string(),\n updated_at: z.string(),\n});\n\nexport type StepDto = z.infer<typeof stepDtoSchema>;\n\nexport const stepGateResultDtoSchema = z\n .discriminatedUnion('kind', [\n z.object({\n kind: z.literal('none'),\n }),\n z.object({\n kind: z.literal('not_evaluated'),\n }),\n z.object({\n kind: z.literal('passed'),\n passed: z.literal(true),\n source: z.string(),\n exit_code: z.number().int().nullable(),\n }),\n z.object({\n kind: z.literal('failed'),\n passed: z.literal(false),\n source: z.string(),\n exit_code: z.number().int().nullable(),\n }),\n z.object({\n kind: z.literal('uncheckable'),\n passed: z.literal(false),\n uncheckable: z.literal(true),\n reason: z.string(),\n exit_code: z.number().int().nullable(),\n }),\n z.object({\n kind: z.literal('evaluation_error'),\n reason: z.string(),\n exit_code: z.number().int().nullable(),\n }),\n z.object({\n kind: z.literal('unknown'),\n data: z.record(z.string(), z.unknown()),\n }),\n ])\n .nullable();\n\nexport type StepGateResultDto = z.infer<typeof stepGateResultDtoSchema>;\n\n// One execution attempt of a step (the durable history behind the current\n// projection). Surfaced in run details so a restarted step's attempts are visible.\nexport const stepAttemptDtoSchema = z.object({\n id: z.string().uuid(),\n step_id: z.string().uuid(),\n attempt: z.number().int().positive(),\n execution_order: z.number().int().positive(),\n status: z.string(),\n exit_code: z.number().int().nullable(),\n // `output` and `error` are opaque audit blobs: the raw jsonb persisted for the\n // attempt, NOT snake_case-normalized (their nested keys may be camelCase, e.g.\n // `error.exitCode`). Consume the top-level snake_case `exit_code` for the\n // numeric code; treat these as display/debug payloads.\n output: z.record(z.string(), z.unknown()).nullable(),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n response: z.string().nullable(),\n error: z.record(z.string(), z.unknown()).nullable(),\n // `unknown.data` is the raw jsonb gate payload for legacy or unrecognized\n // rows; nested keys are not snake_case-normalized.\n gate_result: stepGateResultDtoSchema,\n restart_feedback: z.string().nullable(),\n started_at: z.string(),\n finished_at: z.string().nullable(),\n});\n\nexport type StepAttemptDto = z.infer<typeof stepAttemptDtoSchema>;\n"],"names":["z","stepErrorReasonSchema","enum","agentConfigIssueSchema","stepErrorCategorySchema","STEP_ERROR_MESSAGE_MAX_LENGTH","stepErrorDtoSchema","object","message","string","max","exit_code","number","int","nullable","optional","signal","reason","field","source","agent_config_issue","category","refine","error","undefined","path","stepSourceLocationSchema","start_line","positive","end_line","value","stepDtoSchema","id","uuid","job_execution_id","key","name","source_location","status","type","config","record","unknown","position","current_attempt","created_at","updated_at","stepGateResultDtoSchema","discriminatedUnion","kind","literal","passed","uncheckable","data","stepAttemptDtoSchema","step_id","attempt","execution_order","output","outputs","response","gate_result","restart_feedback","started_at","finished_at"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,+EAA+E;AAC/E,kFAAkF;AAClF,kFAAkF;AAClF,+EAA+E;AAC/E,qFAAqF;AACrF,uFAAuF;AACvF,qFAAqF;AACrF,6FAA6F;AAC7F,OAAO,MAAMC,wBAAwBD,EAAEE,IAAI,CAAC;IAC1C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AAIH,OAAO,MAAMC,yBAAyBH,EAAEE,IAAI,CAAC;IAC3C;IACA;IACA;IACA;IACA;CACD,EAAE;AAIH,sFAAsF;AACtF,oEAAoE;AACpE,OAAO,MAAME,0BAA0BJ,EAAEE,IAAI,CAAC;IAAC;IAAS;CAAO,EAAE;AAIjE,OAAO,MAAMG,gCAAgC,KAAK;AAElD,OAAO,MAAMC,qBAAqBN,EAC/BO,MAAM,CAAC;IACNC,SAASR,EAAES,MAAM,GAAGC,GAAG,CAACL;IACxBM,WAAWX,EAAEY,MAAM,GAAGC,GAAG,GAAGC,QAAQ,GAAGC,QAAQ;IAC/CC,QAAQhB,EAAES,MAAM,GAAGM,QAAQ;IAC3BE,QAAQhB,sBAAsBc,QAAQ;IACtCG,OAAOlB,EAAES,MAAM,GAAGM,QAAQ;IAC1BI,QAAQnB,EAAES,MAAM,GAAGM,QAAQ;IAC3BK,oBAAoBjB,uBAAuBY,QAAQ;IACnDM,UAAUjB,wBAAwBW,QAAQ;AAC5C,GACCO,M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