@shipfox/api-workflows-dto 12.2.0 → 12.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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/events.d.ts +12 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +7 -0
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/evaluation-trace.d.ts +36 -0
- package/dist/schemas/evaluation-trace.d.ts.map +1 -0
- package/dist/schemas/evaluation-trace.js +25 -0
- package/dist/schemas/evaluation-trace.js.map +1 -0
- package/dist/schemas/index.d.ts +3 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +3 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/job-execution.d.ts +21 -0
- package/dist/schemas/job-execution.d.ts.map +1 -1
- package/dist/schemas/job.d.ts +18 -0
- package/dist/schemas/job.d.ts.map +1 -1
- package/dist/schemas/job.js +4 -0
- package/dist/schemas/job.js.map +1 -1
- package/dist/schemas/step.d.ts +89 -0
- package/dist/schemas/step.d.ts.map +1 -1
- package/dist/schemas/step.js +13 -0
- package/dist/schemas/step.js.map +1 -1
- package/dist/schemas/workflow-run-detail.d.ts +211 -0
- package/dist/schemas/workflow-run-detail.d.ts.map +1 -1
- package/dist/schemas/workflow-run-detail.js +11 -1
- package/dist/schemas/workflow-run-detail.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/events.test.ts +1 -0
- package/src/events.ts +7 -0
- package/src/index.ts +11 -0
- package/src/schemas/evaluation-trace.test.ts +40 -0
- package/src/schemas/evaluation-trace.ts +30 -0
- package/src/schemas/index.ts +13 -0
- package/src/schemas/job.test.ts +3 -0
- package/src/schemas/job.ts +4 -0
- package/src/schemas/step-source-location.test.ts +2 -0
- package/src/schemas/step.test.ts +17 -1
- package/src/schemas/step.ts +20 -0
- package/src/schemas/workflow-run-detail.ts +14 -1
- package/tsconfig.build.tsbuildinfo +1 -1
package/dist/schemas/step.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const STEP_STATUS_REASONS: readonly ['default_gate_rejected', 'condition_rejected', 'condition_errored'];
|
|
3
|
+
export declare const stepStatusReasonSchema: z.ZodEnum<{
|
|
4
|
+
condition_errored: "condition_errored";
|
|
5
|
+
condition_rejected: "condition_rejected";
|
|
6
|
+
default_gate_rejected: "default_gate_rejected";
|
|
7
|
+
}>;
|
|
8
|
+
export type StepStatusReasonDto = z.infer<typeof stepStatusReasonSchema>;
|
|
2
9
|
export declare const stepErrorReasonSchema: z.ZodEnum<{
|
|
3
10
|
agent_config_invalid: "agent_config_invalid";
|
|
4
11
|
agent_harness_unavailable: "agent_harness_unavailable";
|
|
@@ -78,8 +85,29 @@ export declare const stepDtoSchema: z.ZodObject<{
|
|
|
78
85
|
end_line: z.ZodNumber;
|
|
79
86
|
}, z.core.$strip>>;
|
|
80
87
|
status: z.ZodString;
|
|
88
|
+
status_reason: z.ZodNullable<z.ZodEnum<{
|
|
89
|
+
condition_errored: "condition_errored";
|
|
90
|
+
condition_rejected: "condition_rejected";
|
|
91
|
+
default_gate_rejected: "default_gate_rejected";
|
|
92
|
+
}>>;
|
|
81
93
|
type: z.ZodString;
|
|
82
94
|
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
95
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
96
|
+
expression: z.ZodString;
|
|
97
|
+
roots: z.ZodArray<z.ZodString>;
|
|
98
|
+
fill_target: z.ZodString;
|
|
99
|
+
evaluated_at: z.ZodString;
|
|
100
|
+
field: z.ZodString;
|
|
101
|
+
value: z.ZodOptional<z.ZodString>;
|
|
102
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
truncated: z.ZodLiteral<true>;
|
|
109
|
+
dropped: z.ZodNumber;
|
|
110
|
+
}, z.core.$strip>]>>>;
|
|
83
111
|
error: z.ZodNullable<z.ZodObject<{
|
|
84
112
|
message: z.ZodString;
|
|
85
113
|
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -192,4 +220,65 @@ export declare const stepAttemptDtoSchema: z.ZodObject<{
|
|
|
192
220
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
193
221
|
}, z.core.$strip>;
|
|
194
222
|
export type StepAttemptDto = z.infer<typeof stepAttemptDtoSchema>;
|
|
223
|
+
export declare const stepAttemptDetailDtoSchema: z.ZodObject<{
|
|
224
|
+
id: z.ZodString;
|
|
225
|
+
step_id: z.ZodString;
|
|
226
|
+
attempt: z.ZodNumber;
|
|
227
|
+
execution_order: z.ZodNumber;
|
|
228
|
+
status: z.ZodString;
|
|
229
|
+
exit_code: z.ZodNullable<z.ZodNumber>;
|
|
230
|
+
output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
231
|
+
outputs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
232
|
+
response: z.ZodNullable<z.ZodString>;
|
|
233
|
+
error: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
234
|
+
gate_result: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
235
|
+
kind: z.ZodLiteral<"none">;
|
|
236
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
237
|
+
kind: z.ZodLiteral<"not_evaluated">;
|
|
238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
+
kind: z.ZodLiteral<"passed">;
|
|
240
|
+
passed: z.ZodLiteral<true>;
|
|
241
|
+
source: z.ZodString;
|
|
242
|
+
exit_code: z.ZodNullable<z.ZodNumber>;
|
|
243
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
+
kind: z.ZodLiteral<"failed">;
|
|
245
|
+
passed: z.ZodLiteral<false>;
|
|
246
|
+
source: z.ZodString;
|
|
247
|
+
exit_code: z.ZodNullable<z.ZodNumber>;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
+
kind: z.ZodLiteral<"uncheckable">;
|
|
250
|
+
passed: z.ZodLiteral<false>;
|
|
251
|
+
uncheckable: z.ZodLiteral<true>;
|
|
252
|
+
reason: z.ZodString;
|
|
253
|
+
exit_code: z.ZodNullable<z.ZodNumber>;
|
|
254
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
255
|
+
kind: z.ZodLiteral<"evaluation_error">;
|
|
256
|
+
reason: z.ZodString;
|
|
257
|
+
exit_code: z.ZodNullable<z.ZodNumber>;
|
|
258
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
259
|
+
kind: z.ZodLiteral<"unknown">;
|
|
260
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
261
|
+
}, z.core.$strip>], "kind">>;
|
|
262
|
+
restart_feedback: z.ZodNullable<z.ZodString>;
|
|
263
|
+
started_at: z.ZodString;
|
|
264
|
+
finished_at: z.ZodNullable<z.ZodString>;
|
|
265
|
+
config: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
266
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
267
|
+
expression: z.ZodString;
|
|
268
|
+
roots: z.ZodArray<z.ZodString>;
|
|
269
|
+
fill_target: z.ZodString;
|
|
270
|
+
evaluated_at: z.ZodString;
|
|
271
|
+
field: z.ZodString;
|
|
272
|
+
value: z.ZodOptional<z.ZodString>;
|
|
273
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
274
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
276
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
277
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
278
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
279
|
+
truncated: z.ZodLiteral<true>;
|
|
280
|
+
dropped: z.ZodNumber;
|
|
281
|
+
}, z.core.$strip>]>>>;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
export type StepAttemptDetailDto = z.infer<typeof stepAttemptDetailDtoSchema>;
|
|
195
284
|
//# sourceMappingURL=step.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/schemas/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/schemas/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,mBAAmB,YAC9B,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,CACX,CAAC;AAEX,eAAO,MAAM,sBAAsB;;;;EAA8B,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAWzE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;EAchC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEvE,eAAO,MAAM,sBAAsB;;;;;;EAMjC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OA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
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { evaluationTraceSchema } from './evaluation-trace.js';
|
|
3
|
+
export const STEP_STATUS_REASONS = [
|
|
4
|
+
'default_gate_rejected',
|
|
5
|
+
'condition_rejected',
|
|
6
|
+
'condition_errored'
|
|
7
|
+
];
|
|
8
|
+
export const stepStatusReasonSchema = z.enum(STEP_STATUS_REASONS);
|
|
2
9
|
// Machine-readable cause of a step failure, for DB troubleshooting. The runner
|
|
3
10
|
// reports it and the server stores it as-is. The `checkout_*`, `git_unavailable`,
|
|
4
11
|
// `workspace_prep_failed`, and `setup_aborted` values cover checkout/setup failures.
|
|
@@ -68,8 +75,10 @@ export const stepDtoSchema = z.object({
|
|
|
68
75
|
name: z.string(),
|
|
69
76
|
source_location: stepSourceLocationSchema.nullable(),
|
|
70
77
|
status: z.string(),
|
|
78
|
+
status_reason: stepStatusReasonSchema.nullable(),
|
|
71
79
|
type: z.string(),
|
|
72
80
|
config: z.record(z.string(), z.unknown()),
|
|
81
|
+
evaluation_trace: evaluationTraceSchema.nullable(),
|
|
73
82
|
error: stepErrorDtoSchema,
|
|
74
83
|
position: z.number(),
|
|
75
84
|
// Execution-attempt identity of the current projection (>1 after a restart).
|
|
@@ -137,5 +146,9 @@ export const stepAttemptDtoSchema = z.object({
|
|
|
137
146
|
started_at: z.string(),
|
|
138
147
|
finished_at: z.string().nullable()
|
|
139
148
|
});
|
|
149
|
+
export const stepAttemptDetailDtoSchema = stepAttemptDtoSchema.extend({
|
|
150
|
+
config: z.record(z.string(), z.unknown()).nullable(),
|
|
151
|
+
evaluation_trace: evaluationTraceSchema.nullable()
|
|
152
|
+
});
|
|
140
153
|
|
|
141
154
|
//# sourceMappingURL=step.js.map
|
package/dist/schemas/step.js.map
CHANGED
|
@@ -1 +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 checkout/setup failures.\n// For agent steps the cause is split three ways: `agent_config_invalid` is a user-fixable\n// configuration error and carries an `agent_config_issue`; `agent_invocation_failed`\n// covers a provider/API failure once the configuration is valid; and\n// `agent_harness_unavailable` means the runner could not start its harness, so the model\n// was never called. The latter carries no `agent_config_issue`, because every issue code\n// names a user-fixable cause. (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 'checkout_path_invalid',\n 'checkout_destination_occupied',\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 'agent_harness_unavailable',\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,qFAAqF;AACrF,0FAA0F;AAC1F,qFAAqF;AACrF,qEAAqE;AACrE,yFAAyF;AACzF,yFAAyF;AACzF,iGAAiG;AACjG,OAAO,MAAMC,wBAAwBD,EAAEE,IAAI,CAAC;IAC1C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AAIH,OAAO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nimport {evaluationTraceSchema} from './evaluation-trace.js';\n\nexport const STEP_STATUS_REASONS = [\n 'default_gate_rejected',\n 'condition_rejected',\n 'condition_errored',\n] as const;\n\nexport const stepStatusReasonSchema = z.enum(STEP_STATUS_REASONS);\n\nexport type StepStatusReasonDto = z.infer<typeof stepStatusReasonSchema>;\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 checkout/setup failures.\n// For agent steps the cause is split three ways: `agent_config_invalid` is a user-fixable\n// configuration error and carries an `agent_config_issue`; `agent_invocation_failed`\n// covers a provider/API failure once the configuration is valid; and\n// `agent_harness_unavailable` means the runner could not start its harness, so the model\n// was never called. The latter carries no `agent_config_issue`, because every issue code\n// names a user-fixable cause. (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 'checkout_path_invalid',\n 'checkout_destination_occupied',\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 'agent_harness_unavailable',\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 status_reason: stepStatusReasonSchema.nullable(),\n type: z.string(),\n config: z.record(z.string(), z.unknown()),\n evaluation_trace: evaluationTraceSchema.nullable(),\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\nexport const stepAttemptDetailDtoSchema = stepAttemptDtoSchema.extend({\n config: z.record(z.string(), z.unknown()).nullable(),\n evaluation_trace: evaluationTraceSchema.nullable(),\n});\n\nexport type StepAttemptDetailDto = z.infer<typeof stepAttemptDetailDtoSchema>;\n"],"names":["z","evaluationTraceSchema","STEP_STATUS_REASONS","stepStatusReasonSchema","enum","stepErrorReasonSchema","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","status_reason","type","config","record","unknown","evaluation_trace","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","stepAttemptDetailDtoSchema","extend"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,qBAAqB,QAAO,wBAAwB;AAE5D,OAAO,MAAMC,sBAAsB;IACjC;IACA;IACA;CACD,CAAU;AAEX,OAAO,MAAMC,yBAAyBH,EAAEI,IAAI,CAACF,qBAAqB;AAIlE,+EAA+E;AAC/E,kFAAkF;AAClF,qFAAqF;AACrF,0FAA0F;AAC1F,qFAAqF;AACrF,qEAAqE;AACrE,yFAAyF;AACzF,yFAAyF;AACzF,iGAAiG;AACjG,OAAO,MAAMG,wBAAwBL,EAAEI,IAAI,CAAC;IAC1C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AAIH,OAAO,MAAME,yBAAyBN,EAAEI,IAAI,CAAC;IAC3C;IACA;IACA;IACA;IACA;CACD,EAAE;AAIH,sFAAsF;AACtF,oEAAoE;AACpE,OAAO,MAAMG,0BAA0BP,EAAEI,IAAI,CAAC;IAAC;IAAS;CAAO,EAAE;AAIjE,OAAO,MAAMI,gCAAgC,KAAK;AAElD,OAAO,MAAMC,qBAAqBT,EAC/BU,MAAM,CAAC;IACNC,SAASX,EAAEY,MAAM,GAAGC,GAAG,CAACL;IACxBM,WAAWd,EAAEe,MAAM,GAAGC,GAAG,GAAGC,QAAQ,GAAGC,QAAQ;IAC/CC,QAAQnB,EAAEY,MAAM,GAAGM,QAAQ;IAC3BE,QAAQf,sBAAsBa,QAAQ;IACtCG,OAAOrB,EAAEY,MAAM,GAAGM,QAAQ;IAC1BI,QAAQtB,EAAEY,MAAM,GAAGM,QAAQ;IAC3BK,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AAM,GAAGC,GAAG,GAAGe,QAAQ;IAClC+B,iBAAiB9D,EAAEe,MAAM,GAAGC,GAAG,GAAGe,QAAQ;IAC1CU,QAAQzC,EAAEY,MAAM;IAChBE,WAAWd,EAAEe,MAAM,GAAGC,GAAG,GAAGC,QAAQ;IACpC,+EAA+E;IAC/E,+EAA+E;IAC/E,0EAA0E;IAC1E,uDAAuD;IACvD8C,QAAQ/D,EAAE6C,MAAM,CAAC7C,EAAEY,MAAM,IAAIZ,EAAE8C,OAAO,IAAI7B,QAAQ;IAClD+C,SAAShE,EAAE6C,MAAM,CAAC7C,EAAEY,MAAM,IAAIZ,EAAE8C,OAAO,IAAI7B,QAAQ;IACnDgD,UAAUjE,EAAEY,MAAM,GAAGK,QAAQ;IAC7BS,OAAO1B,EAAE6C,MAAM,CAAC7C,EAAEY,MAAM,IAAIZ,EAAE8C,OAAO,IAAI7B,QAAQ;IACjD,0EAA0E;IAC1E,mDAAmD;IACnDiD,aAAad;IACbe,kBAAkBnE,EAAEY,MAAM,GAAGK,QAAQ;IACrCmD,YAAYpE,EAAEY,MAAM;IACpByD,aAAarE,EAAEY,MAAM,GAAGK,QAAQ;AAClC,GAAG;AAIH,OAAO,MAAMqD,6BAA6BX,qBAAqBY,MAAM,CAAC;IACpE3B,QAAQ5C,EAAE6C,MAAM,CAAC7C,EAAEY,MAAM,IAAIZ,EAAE8C,OAAO,IAAI7B,QAAQ;IAClD8B,kBAAkB9C,sBAAsBgB,QAAQ;AAClD,GAAG"}
|
|
@@ -19,6 +19,7 @@ export declare const jobExecutionDtoSchema: z.ZodObject<{
|
|
|
19
19
|
succeeded: "succeeded";
|
|
20
20
|
}>;
|
|
21
21
|
status_reason: z.ZodNullable<z.ZodString>;
|
|
22
|
+
runner: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
22
23
|
trigger_events: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
23
24
|
source: z.ZodString;
|
|
24
25
|
event: z.ZodString;
|
|
@@ -33,6 +34,22 @@ export declare const jobExecutionDtoSchema: z.ZodObject<{
|
|
|
33
34
|
data: z.ZodUnknown;
|
|
34
35
|
}, z.core.$strip>>>;
|
|
35
36
|
outputs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
37
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
38
|
+
expression: z.ZodString;
|
|
39
|
+
roots: z.ZodArray<z.ZodString>;
|
|
40
|
+
fill_target: z.ZodString;
|
|
41
|
+
evaluated_at: z.ZodString;
|
|
42
|
+
field: z.ZodString;
|
|
43
|
+
value: z.ZodOptional<z.ZodString>;
|
|
44
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
truncated: z.ZodLiteral<true>;
|
|
51
|
+
dropped: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>]>>>;
|
|
36
53
|
queued_at: z.ZodNullable<z.ZodString>;
|
|
37
54
|
started_at: z.ZodNullable<z.ZodString>;
|
|
38
55
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
@@ -51,8 +68,29 @@ export declare const workflowRunStepDetailDtoSchema: z.ZodObject<{
|
|
|
51
68
|
end_line: z.ZodNumber;
|
|
52
69
|
}, z.core.$strip>>;
|
|
53
70
|
status: z.ZodString;
|
|
71
|
+
status_reason: z.ZodNullable<z.ZodEnum<{
|
|
72
|
+
condition_errored: "condition_errored";
|
|
73
|
+
condition_rejected: "condition_rejected";
|
|
74
|
+
default_gate_rejected: "default_gate_rejected";
|
|
75
|
+
}>>;
|
|
54
76
|
type: z.ZodString;
|
|
55
77
|
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
78
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
79
|
+
expression: z.ZodString;
|
|
80
|
+
roots: z.ZodArray<z.ZodString>;
|
|
81
|
+
fill_target: z.ZodString;
|
|
82
|
+
evaluated_at: z.ZodString;
|
|
83
|
+
field: z.ZodString;
|
|
84
|
+
value: z.ZodOptional<z.ZodString>;
|
|
85
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
truncated: z.ZodLiteral<true>;
|
|
92
|
+
dropped: z.ZodNumber;
|
|
93
|
+
}, z.core.$strip>]>>>;
|
|
56
94
|
error: z.ZodNullable<z.ZodObject<{
|
|
57
95
|
message: z.ZodString;
|
|
58
96
|
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -166,6 +204,29 @@ export declare const workflowRunStepDetailDtoSchema: z.ZodObject<{
|
|
|
166
204
|
}, z.core.$strip>>;
|
|
167
205
|
}, z.core.$strip>;
|
|
168
206
|
export type WorkflowRunStepDetailDto = z.infer<typeof workflowRunStepDetailDtoSchema>;
|
|
207
|
+
export declare const stepAttemptDetailResponseSchema: z.ZodObject<{
|
|
208
|
+
step_id: z.ZodString;
|
|
209
|
+
attempt: z.ZodNumber;
|
|
210
|
+
authored_config: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
211
|
+
config: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
212
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
213
|
+
expression: z.ZodString;
|
|
214
|
+
roots: z.ZodArray<z.ZodString>;
|
|
215
|
+
fill_target: z.ZodString;
|
|
216
|
+
evaluated_at: z.ZodString;
|
|
217
|
+
field: z.ZodString;
|
|
218
|
+
value: z.ZodOptional<z.ZodString>;
|
|
219
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
220
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
221
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
223
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
224
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
225
|
+
truncated: z.ZodLiteral<true>;
|
|
226
|
+
dropped: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>]>>>;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
export type StepAttemptDetailResponseDto = z.infer<typeof stepAttemptDetailResponseSchema>;
|
|
169
230
|
export declare const workflowRunJobExecutionDetailDtoSchema: z.ZodObject<{
|
|
170
231
|
id: z.ZodString;
|
|
171
232
|
job_id: z.ZodString;
|
|
@@ -179,6 +240,7 @@ export declare const workflowRunJobExecutionDetailDtoSchema: z.ZodObject<{
|
|
|
179
240
|
succeeded: "succeeded";
|
|
180
241
|
}>;
|
|
181
242
|
status_reason: z.ZodNullable<z.ZodString>;
|
|
243
|
+
runner: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
182
244
|
trigger_events: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
183
245
|
source: z.ZodString;
|
|
184
246
|
event: z.ZodString;
|
|
@@ -193,6 +255,22 @@ export declare const workflowRunJobExecutionDetailDtoSchema: z.ZodObject<{
|
|
|
193
255
|
data: z.ZodUnknown;
|
|
194
256
|
}, z.core.$strip>>>;
|
|
195
257
|
outputs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
258
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
259
|
+
expression: z.ZodString;
|
|
260
|
+
roots: z.ZodArray<z.ZodString>;
|
|
261
|
+
fill_target: z.ZodString;
|
|
262
|
+
evaluated_at: z.ZodString;
|
|
263
|
+
field: z.ZodString;
|
|
264
|
+
value: z.ZodOptional<z.ZodString>;
|
|
265
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
266
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
267
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
268
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
269
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
270
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
271
|
+
truncated: z.ZodLiteral<true>;
|
|
272
|
+
dropped: z.ZodNumber;
|
|
273
|
+
}, z.core.$strip>]>>>;
|
|
196
274
|
queued_at: z.ZodNullable<z.ZodString>;
|
|
197
275
|
started_at: z.ZodNullable<z.ZodString>;
|
|
198
276
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
@@ -209,8 +287,29 @@ export declare const workflowRunJobExecutionDetailDtoSchema: z.ZodObject<{
|
|
|
209
287
|
end_line: z.ZodNumber;
|
|
210
288
|
}, z.core.$strip>>;
|
|
211
289
|
status: z.ZodString;
|
|
290
|
+
status_reason: z.ZodNullable<z.ZodEnum<{
|
|
291
|
+
condition_errored: "condition_errored";
|
|
292
|
+
condition_rejected: "condition_rejected";
|
|
293
|
+
default_gate_rejected: "default_gate_rejected";
|
|
294
|
+
}>>;
|
|
212
295
|
type: z.ZodString;
|
|
213
296
|
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
297
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
298
|
+
expression: z.ZodString;
|
|
299
|
+
roots: z.ZodArray<z.ZodString>;
|
|
300
|
+
fill_target: z.ZodString;
|
|
301
|
+
evaluated_at: z.ZodString;
|
|
302
|
+
field: z.ZodString;
|
|
303
|
+
value: z.ZodOptional<z.ZodString>;
|
|
304
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
305
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
306
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
307
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
308
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
309
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
310
|
+
truncated: z.ZodLiteral<true>;
|
|
311
|
+
dropped: z.ZodNumber;
|
|
312
|
+
}, z.core.$strip>]>>>;
|
|
214
313
|
error: z.ZodNullable<z.ZodObject<{
|
|
215
314
|
message: z.ZodString;
|
|
216
315
|
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -356,6 +455,24 @@ export declare const workflowRunJobDetailDtoSchema: z.ZodObject<{
|
|
|
356
455
|
user_cancelled: "user_cancelled";
|
|
357
456
|
}>>;
|
|
358
457
|
carried_over: z.ZodBoolean;
|
|
458
|
+
success: z.ZodNullable<z.ZodString>;
|
|
459
|
+
runner: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
460
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
461
|
+
expression: z.ZodString;
|
|
462
|
+
roots: z.ZodArray<z.ZodString>;
|
|
463
|
+
fill_target: z.ZodString;
|
|
464
|
+
evaluated_at: z.ZodString;
|
|
465
|
+
field: z.ZodString;
|
|
466
|
+
value: z.ZodOptional<z.ZodString>;
|
|
467
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
468
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
469
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
470
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
471
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
472
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
473
|
+
truncated: z.ZodLiteral<true>;
|
|
474
|
+
dropped: z.ZodNumber;
|
|
475
|
+
}, z.core.$strip>]>>>;
|
|
359
476
|
listening: z.ZodNullable<z.ZodObject<{
|
|
360
477
|
on: z.ZodArray<z.ZodObject<{
|
|
361
478
|
source: z.ZodString;
|
|
@@ -412,6 +529,7 @@ export declare const workflowRunJobDetailDtoSchema: z.ZodObject<{
|
|
|
412
529
|
succeeded: "succeeded";
|
|
413
530
|
}>;
|
|
414
531
|
status_reason: z.ZodNullable<z.ZodString>;
|
|
532
|
+
runner: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
415
533
|
trigger_events: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
416
534
|
source: z.ZodString;
|
|
417
535
|
event: z.ZodString;
|
|
@@ -426,6 +544,22 @@ export declare const workflowRunJobDetailDtoSchema: z.ZodObject<{
|
|
|
426
544
|
data: z.ZodUnknown;
|
|
427
545
|
}, z.core.$strip>>>;
|
|
428
546
|
outputs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
547
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
548
|
+
expression: z.ZodString;
|
|
549
|
+
roots: z.ZodArray<z.ZodString>;
|
|
550
|
+
fill_target: z.ZodString;
|
|
551
|
+
evaluated_at: z.ZodString;
|
|
552
|
+
field: z.ZodString;
|
|
553
|
+
value: z.ZodOptional<z.ZodString>;
|
|
554
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
555
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
556
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
557
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
558
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
559
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
560
|
+
truncated: z.ZodLiteral<true>;
|
|
561
|
+
dropped: z.ZodNumber;
|
|
562
|
+
}, z.core.$strip>]>>>;
|
|
429
563
|
queued_at: z.ZodNullable<z.ZodString>;
|
|
430
564
|
started_at: z.ZodNullable<z.ZodString>;
|
|
431
565
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
@@ -442,8 +576,29 @@ export declare const workflowRunJobDetailDtoSchema: z.ZodObject<{
|
|
|
442
576
|
end_line: z.ZodNumber;
|
|
443
577
|
}, z.core.$strip>>;
|
|
444
578
|
status: z.ZodString;
|
|
579
|
+
status_reason: z.ZodNullable<z.ZodEnum<{
|
|
580
|
+
condition_errored: "condition_errored";
|
|
581
|
+
condition_rejected: "condition_rejected";
|
|
582
|
+
default_gate_rejected: "default_gate_rejected";
|
|
583
|
+
}>>;
|
|
445
584
|
type: z.ZodString;
|
|
446
585
|
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
586
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
587
|
+
expression: z.ZodString;
|
|
588
|
+
roots: z.ZodArray<z.ZodString>;
|
|
589
|
+
fill_target: z.ZodString;
|
|
590
|
+
evaluated_at: z.ZodString;
|
|
591
|
+
field: z.ZodString;
|
|
592
|
+
value: z.ZodOptional<z.ZodString>;
|
|
593
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
594
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
595
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
596
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
597
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
598
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
599
|
+
truncated: z.ZodLiteral<true>;
|
|
600
|
+
dropped: z.ZodNumber;
|
|
601
|
+
}, z.core.$strip>]>>>;
|
|
447
602
|
error: z.ZodNullable<z.ZodObject<{
|
|
448
603
|
message: z.ZodString;
|
|
449
604
|
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -644,6 +799,24 @@ export declare const workflowRunDetailResponseSchema: z.ZodObject<{
|
|
|
644
799
|
user_cancelled: "user_cancelled";
|
|
645
800
|
}>>;
|
|
646
801
|
carried_over: z.ZodBoolean;
|
|
802
|
+
success: z.ZodNullable<z.ZodString>;
|
|
803
|
+
runner: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
804
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
805
|
+
expression: z.ZodString;
|
|
806
|
+
roots: z.ZodArray<z.ZodString>;
|
|
807
|
+
fill_target: z.ZodString;
|
|
808
|
+
evaluated_at: z.ZodString;
|
|
809
|
+
field: z.ZodString;
|
|
810
|
+
value: z.ZodOptional<z.ZodString>;
|
|
811
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
812
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
813
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
814
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
815
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
816
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
817
|
+
truncated: z.ZodLiteral<true>;
|
|
818
|
+
dropped: z.ZodNumber;
|
|
819
|
+
}, z.core.$strip>]>>>;
|
|
647
820
|
listening: z.ZodNullable<z.ZodObject<{
|
|
648
821
|
on: z.ZodArray<z.ZodObject<{
|
|
649
822
|
source: z.ZodString;
|
|
@@ -700,6 +873,7 @@ export declare const workflowRunDetailResponseSchema: z.ZodObject<{
|
|
|
700
873
|
succeeded: "succeeded";
|
|
701
874
|
}>;
|
|
702
875
|
status_reason: z.ZodNullable<z.ZodString>;
|
|
876
|
+
runner: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
703
877
|
trigger_events: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
704
878
|
source: z.ZodString;
|
|
705
879
|
event: z.ZodString;
|
|
@@ -714,6 +888,22 @@ export declare const workflowRunDetailResponseSchema: z.ZodObject<{
|
|
|
714
888
|
data: z.ZodUnknown;
|
|
715
889
|
}, z.core.$strip>>>;
|
|
716
890
|
outputs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
891
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
892
|
+
expression: z.ZodString;
|
|
893
|
+
roots: z.ZodArray<z.ZodString>;
|
|
894
|
+
fill_target: z.ZodString;
|
|
895
|
+
evaluated_at: z.ZodString;
|
|
896
|
+
field: z.ZodString;
|
|
897
|
+
value: z.ZodOptional<z.ZodString>;
|
|
898
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
899
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
900
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
901
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
902
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
903
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
904
|
+
truncated: z.ZodLiteral<true>;
|
|
905
|
+
dropped: z.ZodNumber;
|
|
906
|
+
}, z.core.$strip>]>>>;
|
|
717
907
|
queued_at: z.ZodNullable<z.ZodString>;
|
|
718
908
|
started_at: z.ZodNullable<z.ZodString>;
|
|
719
909
|
finished_at: z.ZodNullable<z.ZodString>;
|
|
@@ -730,8 +920,29 @@ export declare const workflowRunDetailResponseSchema: z.ZodObject<{
|
|
|
730
920
|
end_line: z.ZodNumber;
|
|
731
921
|
}, z.core.$strip>>;
|
|
732
922
|
status: z.ZodString;
|
|
923
|
+
status_reason: z.ZodNullable<z.ZodEnum<{
|
|
924
|
+
condition_errored: "condition_errored";
|
|
925
|
+
condition_rejected: "condition_rejected";
|
|
926
|
+
default_gate_rejected: "default_gate_rejected";
|
|
927
|
+
}>>;
|
|
733
928
|
type: z.ZodString;
|
|
734
929
|
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
930
|
+
evaluation_trace: z.ZodNullable<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
931
|
+
expression: z.ZodString;
|
|
932
|
+
roots: z.ZodArray<z.ZodString>;
|
|
933
|
+
fill_target: z.ZodString;
|
|
934
|
+
evaluated_at: z.ZodString;
|
|
935
|
+
field: z.ZodString;
|
|
936
|
+
value: z.ZodOptional<z.ZodString>;
|
|
937
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
938
|
+
expr_truncated: z.ZodOptional<z.ZodBoolean>;
|
|
939
|
+
reference: z.ZodOptional<z.ZodBoolean>;
|
|
940
|
+
degraded: z.ZodOptional<z.ZodBoolean>;
|
|
941
|
+
env_key: z.ZodOptional<z.ZodString>;
|
|
942
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
943
|
+
truncated: z.ZodLiteral<true>;
|
|
944
|
+
dropped: z.ZodNumber;
|
|
945
|
+
}, z.core.$strip>]>>>;
|
|
735
946
|
error: z.ZodNullable<z.ZodObject<{
|
|
736
947
|
message: z.ZodString;
|
|
737
948
|
exit_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-run-detail.d.ts","sourceRoot":"","sources":["../../src/schemas/workflow-run-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-run-detail.d.ts","sourceRoot":"","sources":["../../src/schemas/workflow-run-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAOtB,eAAO,MAAM,wBAAwB;;;;;;EAMnC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE,eAA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AAC,OAAO,6BAA6B,CAAC,CAAC;AAIpF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG1C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { evaluationTraceSchema } from './evaluation-trace.js';
|
|
2
3
|
import { jobDtoSchema } from './job.js';
|
|
3
4
|
import { workflowExecutionEventSchema } from './job-listening.js';
|
|
4
|
-
import { stepAttemptDtoSchema, stepDtoSchema } from './step.js';
|
|
5
|
+
import { stepAttemptDetailDtoSchema, stepAttemptDtoSchema, stepDtoSchema } from './step.js';
|
|
5
6
|
import { workflowRunAttemptDtoSchema, workflowRunResponseSchema } from './workflow-run.js';
|
|
6
7
|
export const jobExecutionStatusSchema = z.enum([
|
|
7
8
|
'pending',
|
|
@@ -17,8 +18,10 @@ export const jobExecutionDtoSchema = z.object({
|
|
|
17
18
|
name: z.string(),
|
|
18
19
|
status: jobExecutionStatusSchema,
|
|
19
20
|
status_reason: z.string().nullable(),
|
|
21
|
+
runner: z.array(z.string()).nullable(),
|
|
20
22
|
trigger_events: z.array(workflowExecutionEventSchema).default([]),
|
|
21
23
|
outputs: z.record(z.string(), z.unknown()).nullable(),
|
|
24
|
+
evaluation_trace: evaluationTraceSchema.nullable(),
|
|
22
25
|
queued_at: z.string().nullable(),
|
|
23
26
|
started_at: z.string().nullable(),
|
|
24
27
|
finished_at: z.string().nullable(),
|
|
@@ -35,6 +38,13 @@ export const workflowRunStepDetailDtoSchema = stepDtoSchema.extend({
|
|
|
35
38
|
gate_result: stepAttemptDtoSchema.shape.gate_result,
|
|
36
39
|
attempts: z.array(stepAttemptDtoSchema)
|
|
37
40
|
});
|
|
41
|
+
export const stepAttemptDetailResponseSchema = z.object({
|
|
42
|
+
step_id: z.string().uuid(),
|
|
43
|
+
attempt: stepAttemptDetailDtoSchema.shape.attempt,
|
|
44
|
+
authored_config: z.record(z.string(), z.unknown()).nullable(),
|
|
45
|
+
config: stepAttemptDetailDtoSchema.shape.config,
|
|
46
|
+
evaluation_trace: stepAttemptDetailDtoSchema.shape.evaluation_trace
|
|
47
|
+
});
|
|
38
48
|
export const workflowRunJobExecutionDetailDtoSchema = jobExecutionDtoSchema.extend({
|
|
39
49
|
steps: z.array(workflowRunStepDetailDtoSchema)
|
|
40
50
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schemas/workflow-run-detail.ts"],"sourcesContent":["import {z} from 'zod';\nimport {jobDtoSchema} from './job.js';\nimport {workflowExecutionEventSchema} from './job-listening.js';\nimport {stepAttemptDtoSchema, stepDtoSchema} from './step.js';\nimport {workflowRunAttemptDtoSchema, workflowRunResponseSchema} from './workflow-run.js';\n\nexport const jobExecutionStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport const jobExecutionDtoSchema = z.object({\n id: z.string().uuid(),\n job_id: z.string().uuid(),\n sequence: z.number().int().positive(),\n name: z.string(),\n status: jobExecutionStatusSchema,\n status_reason: z.string().nullable(),\n trigger_events: z.array(workflowExecutionEventSchema).default([]),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n queued_at: z.string().nullable(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n timed_out_at: z.string().nullable(),\n created_at: z.string(),\n updated_at: z.string(),\n});\n\nexport type JobExecutionDto = z.infer<typeof jobExecutionDtoSchema>;\n\n// A step with its attempt history: one entry per dispatched attempt (a restarted\n// step has more than one). `current_attempt` on the step points at the latest.\nexport const workflowRunStepDetailDtoSchema = stepDtoSchema.extend({\n exit_code: z.number().int().nullable(),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n response: z.string().nullable(),\n gate_result: stepAttemptDtoSchema.shape.gate_result,\n attempts: z.array(stepAttemptDtoSchema),\n});\n\nexport type WorkflowRunStepDetailDto = z.infer<typeof workflowRunStepDetailDtoSchema>;\n\nexport const workflowRunJobExecutionDetailDtoSchema = jobExecutionDtoSchema.extend({\n steps: z.array(workflowRunStepDetailDtoSchema),\n});\n\nexport type WorkflowRunJobExecutionDetailDto = z.infer<\n typeof workflowRunJobExecutionDetailDtoSchema\n>;\n\nexport const workflowRunJobDetailDtoSchema = jobDtoSchema.extend({\n job_executions: z.array(workflowRunJobExecutionDetailDtoSchema),\n});\n\nexport type WorkflowRunJobDetailDto = z.infer<typeof workflowRunJobDetailDtoSchema>;\n\n// The run detail read model returned by `GET /workflows/runs/:id`: a run plus its\n// jobs, each job's steps, and each step's attempt history.\nexport const workflowRunDetailResponseSchema = workflowRunResponseSchema.extend({\n run_attempt: workflowRunAttemptDtoSchema,\n jobs: z.array(workflowRunJobDetailDtoSchema),\n});\n\nexport type WorkflowRunDetailResponseDto = z.infer<typeof workflowRunDetailResponseSchema>;\n"],"names":["z","jobDtoSchema","workflowExecutionEventSchema","stepAttemptDtoSchema","stepDtoSchema","workflowRunAttemptDtoSchema","workflowRunResponseSchema","jobExecutionStatusSchema","enum","jobExecutionDtoSchema","object","id","string","uuid","job_id","sequence","number","int","positive","name","status","status_reason","nullable","
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/workflow-run-detail.ts"],"sourcesContent":["import {z} from 'zod';\nimport {evaluationTraceSchema} from './evaluation-trace.js';\nimport {jobDtoSchema} from './job.js';\nimport {workflowExecutionEventSchema} from './job-listening.js';\nimport {stepAttemptDetailDtoSchema, stepAttemptDtoSchema, stepDtoSchema} from './step.js';\nimport {workflowRunAttemptDtoSchema, workflowRunResponseSchema} from './workflow-run.js';\n\nexport const jobExecutionStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport const jobExecutionDtoSchema = z.object({\n id: z.string().uuid(),\n job_id: z.string().uuid(),\n sequence: z.number().int().positive(),\n name: z.string(),\n status: jobExecutionStatusSchema,\n status_reason: z.string().nullable(),\n runner: z.array(z.string()).nullable(),\n trigger_events: z.array(workflowExecutionEventSchema).default([]),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n evaluation_trace: evaluationTraceSchema.nullable(),\n queued_at: z.string().nullable(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n timed_out_at: z.string().nullable(),\n created_at: z.string(),\n updated_at: z.string(),\n});\n\nexport type JobExecutionDto = z.infer<typeof jobExecutionDtoSchema>;\n\n// A step with its attempt history: one entry per dispatched attempt (a restarted\n// step has more than one). `current_attempt` on the step points at the latest.\nexport const workflowRunStepDetailDtoSchema = stepDtoSchema.extend({\n exit_code: z.number().int().nullable(),\n outputs: z.record(z.string(), z.unknown()).nullable(),\n response: z.string().nullable(),\n gate_result: stepAttemptDtoSchema.shape.gate_result,\n attempts: z.array(stepAttemptDtoSchema),\n});\n\nexport type WorkflowRunStepDetailDto = z.infer<typeof workflowRunStepDetailDtoSchema>;\n\nexport const stepAttemptDetailResponseSchema = z.object({\n step_id: z.string().uuid(),\n attempt: stepAttemptDetailDtoSchema.shape.attempt,\n authored_config: z.record(z.string(), z.unknown()).nullable(),\n config: stepAttemptDetailDtoSchema.shape.config,\n evaluation_trace: stepAttemptDetailDtoSchema.shape.evaluation_trace,\n});\n\nexport type StepAttemptDetailResponseDto = z.infer<typeof stepAttemptDetailResponseSchema>;\n\nexport const workflowRunJobExecutionDetailDtoSchema = jobExecutionDtoSchema.extend({\n steps: z.array(workflowRunStepDetailDtoSchema),\n});\n\nexport type WorkflowRunJobExecutionDetailDto = z.infer<\n typeof workflowRunJobExecutionDetailDtoSchema\n>;\n\nexport const workflowRunJobDetailDtoSchema = jobDtoSchema.extend({\n job_executions: z.array(workflowRunJobExecutionDetailDtoSchema),\n});\n\nexport type WorkflowRunJobDetailDto = z.infer<typeof workflowRunJobDetailDtoSchema>;\n\n// The run detail read model returned by `GET /workflows/runs/:id`: a run plus its\n// jobs, each job's steps, and each step's attempt history.\nexport const workflowRunDetailResponseSchema = workflowRunResponseSchema.extend({\n run_attempt: workflowRunAttemptDtoSchema,\n jobs: z.array(workflowRunJobDetailDtoSchema),\n});\n\nexport type WorkflowRunDetailResponseDto = z.infer<typeof workflowRunDetailResponseSchema>;\n"],"names":["z","evaluationTraceSchema","jobDtoSchema","workflowExecutionEventSchema","stepAttemptDetailDtoSchema","stepAttemptDtoSchema","stepDtoSchema","workflowRunAttemptDtoSchema","workflowRunResponseSchema","jobExecutionStatusSchema","enum","jobExecutionDtoSchema","object","id","string","uuid","job_id","sequence","number","int","positive","name","status","status_reason","nullable","runner","array","trigger_events","default","outputs","record","unknown","evaluation_trace","queued_at","started_at","finished_at","timed_out_at","created_at","updated_at","workflowRunStepDetailDtoSchema","extend","exit_code","response","gate_result","shape","attempts","stepAttemptDetailResponseSchema","step_id","attempt","authored_config","config","workflowRunJobExecutionDetailDtoSchema","steps","workflowRunJobDetailDtoSchema","job_executions","workflowRunDetailResponseSchema","run_attempt","jobs"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,qBAAqB,QAAO,wBAAwB;AAC5D,SAAQC,YAAY,QAAO,WAAW;AACtC,SAAQC,4BAA4B,QAAO,qBAAqB;AAChE,SAAQC,0BAA0B,EAAEC,oBAAoB,EAAEC,aAAa,QAAO,YAAY;AAC1F,SAAQC,2BAA2B,EAAEC,yBAAyB,QAAO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