@shipfox/api-workflows-dto 12.0.0 → 12.1.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/schemas/job-execution.d.ts +4 -0
- package/dist/schemas/job-execution.d.ts.map +1 -1
- package/dist/schemas/step.d.ts +6 -0
- package/dist/schemas/step.d.ts.map +1 -1
- package/dist/schemas/step.js +3 -1
- package/dist/schemas/step.js.map +1 -1
- package/dist/schemas/workflow-run-detail.d.ts +8 -0
- package/dist/schemas/workflow-run-detail.d.ts.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/schemas/step.test.ts +12 -0
- package/src/schemas/step.ts +3 -1
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 15 files with swc (
|
|
2
|
+
Successfully compiled: 15 files with swc (243.87ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,8 @@ export declare const nextStepResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
26
26
|
checkout_failed: "checkout_failed";
|
|
27
27
|
checkout_auth_failed: "checkout_auth_failed";
|
|
28
28
|
checkout_unavailable: "checkout_unavailable";
|
|
29
|
+
checkout_path_invalid: "checkout_path_invalid";
|
|
30
|
+
checkout_destination_occupied: "checkout_destination_occupied";
|
|
29
31
|
git_unavailable: "git_unavailable";
|
|
30
32
|
workspace_prep_failed: "workspace_prep_failed";
|
|
31
33
|
setup_aborted: "setup_aborted";
|
|
@@ -84,6 +86,8 @@ export declare const reportStepBodySchema: z.ZodObject<{
|
|
|
84
86
|
checkout_failed: "checkout_failed";
|
|
85
87
|
checkout_auth_failed: "checkout_auth_failed";
|
|
86
88
|
checkout_unavailable: "checkout_unavailable";
|
|
89
|
+
checkout_path_invalid: "checkout_path_invalid";
|
|
90
|
+
checkout_destination_occupied: "checkout_destination_occupied";
|
|
87
91
|
git_unavailable: "git_unavailable";
|
|
88
92
|
workspace_prep_failed: "workspace_prep_failed";
|
|
89
93
|
setup_aborted: "setup_aborted";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-execution.d.ts","sourceRoot":"","sources":["../../src/schemas/job-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,eAAO,MAAM,wBAAwB,QAAW,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"job-execution.d.ts","sourceRoot":"","sources":["../../src/schemas/job-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,eAAO,MAAM,wBAAwB,QAAW,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAwBjC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEzE,eAAO,MAAM,oBAAoB;;;;;iBAO0C,CAAC;AAC5E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAErE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2C7B,CAAC;AAEL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAErE,eAAO,MAAM,wBAAwB;;;iBAOnC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/schemas/step.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export declare const stepErrorReasonSchema: z.ZodEnum<{
|
|
|
3
3
|
checkout_failed: "checkout_failed";
|
|
4
4
|
checkout_auth_failed: "checkout_auth_failed";
|
|
5
5
|
checkout_unavailable: "checkout_unavailable";
|
|
6
|
+
checkout_path_invalid: "checkout_path_invalid";
|
|
7
|
+
checkout_destination_occupied: "checkout_destination_occupied";
|
|
6
8
|
git_unavailable: "git_unavailable";
|
|
7
9
|
workspace_prep_failed: "workspace_prep_failed";
|
|
8
10
|
setup_aborted: "setup_aborted";
|
|
@@ -35,6 +37,8 @@ export declare const stepErrorDtoSchema: z.ZodNullable<z.ZodObject<{
|
|
|
35
37
|
checkout_failed: "checkout_failed";
|
|
36
38
|
checkout_auth_failed: "checkout_auth_failed";
|
|
37
39
|
checkout_unavailable: "checkout_unavailable";
|
|
40
|
+
checkout_path_invalid: "checkout_path_invalid";
|
|
41
|
+
checkout_destination_occupied: "checkout_destination_occupied";
|
|
38
42
|
git_unavailable: "git_unavailable";
|
|
39
43
|
workspace_prep_failed: "workspace_prep_failed";
|
|
40
44
|
setup_aborted: "setup_aborted";
|
|
@@ -84,6 +88,8 @@ export declare const stepDtoSchema: z.ZodObject<{
|
|
|
84
88
|
checkout_failed: "checkout_failed";
|
|
85
89
|
checkout_auth_failed: "checkout_auth_failed";
|
|
86
90
|
checkout_unavailable: "checkout_unavailable";
|
|
91
|
+
checkout_path_invalid: "checkout_path_invalid";
|
|
92
|
+
checkout_destination_occupied: "checkout_destination_occupied";
|
|
87
93
|
git_unavailable: "git_unavailable";
|
|
88
94
|
workspace_prep_failed: "workspace_prep_failed";
|
|
89
95
|
setup_aborted: "setup_aborted";
|
|
@@ -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;AAWtB,eAAO,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/schemas/step.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
// Machine-readable cause of a step failure, for DB troubleshooting. The runner
|
|
3
3
|
// reports it and the server stores it as-is. The `checkout_*`, `git_unavailable`,
|
|
4
|
-
// `workspace_prep_failed`, and `setup_aborted` values cover setup
|
|
4
|
+
// `workspace_prep_failed`, and `setup_aborted` values cover checkout/setup failures.
|
|
5
5
|
// For agent steps the cause is split three ways: `agent_config_invalid` is a user-fixable
|
|
6
6
|
// configuration error and carries an `agent_config_issue`; `agent_invocation_failed`
|
|
7
7
|
// covers a provider/API failure once the configuration is valid; and
|
|
@@ -12,6 +12,8 @@ export const stepErrorReasonSchema = z.enum([
|
|
|
12
12
|
'checkout_failed',
|
|
13
13
|
'checkout_auth_failed',
|
|
14
14
|
'checkout_unavailable',
|
|
15
|
+
'checkout_path_invalid',
|
|
16
|
+
'checkout_destination_occupied',
|
|
15
17
|
'git_unavailable',
|
|
16
18
|
'workspace_prep_failed',
|
|
17
19
|
'setup_aborted',
|
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 setup-phase 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 '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,kFAAkF;AAClF,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;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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AC3CyB,IAAIhC,EAAES,MAAM,GAAGwB,IAAI;IACnBsB,SAASvD,EAAES,MAAM,GAAGwB,IAAI;IACxBuB,SAASxD,EAAEY,MAAM,GAAGC,GAAG,GAAGe,QAAQ;IAClC6B,iBAAiBzD,EAAEY,MAAM,GAAGC,GAAG,GAAGe,QAAQ;IAC1CU,QAAQtC,EAAES,MAAM;IAChBE,WAAWX,EAAEY,MAAM,GAAGC,GAAG,GAAGC,QAAQ;IACpC,+EAA+E;IAC/E,+EAA+E;IAC/E,0EAA0E;IAC1E,uDAAuD;IACvD4C,QAAQ1D,EAAEyC,MAAM,CAACzC,EAAES,MAAM,IAAIT,EAAE0C,OAAO,IAAI5B,QAAQ;IAClD6C,SAAS3D,EAAEyC,MAAM,CAACzC,EAAES,MAAM,IAAIT,EAAE0C,OAAO,IAAI5B,QAAQ;IACnD8C,UAAU5D,EAAES,MAAM,GAAGK,QAAQ;IAC7BS,OAAOvB,EAAEyC,MAAM,CAACzC,EAAES,MAAM,IAAIT,EAAE0C,OAAO,IAAI5B,QAAQ;IACjD,0EAA0E;IAC1E,mDAAmD;IACnD+C,aAAad;IACbe,kBAAkB9D,EAAES,MAAM,GAAGK,QAAQ;IACrCiD,YAAY/D,EAAES,MAAM;IACpBuD,aAAahE,EAAES,MAAM,GAAGK,QAAQ;AAClC,GAAG"}
|
|
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,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;IACxB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AAuBtD,EAAEO,MAAM,CAAC;IAC3CyB,IAAIhC,EAAES,MAAM,GAAGwB,IAAI;IACnBsB,SAASvD,EAAES,MAAM,GAAGwB,IAAI;IACxBuB,SAASxD,EAAEY,MAAM,GAAGC,GAAG,GAAGe,QAAQ;IAClC6B,iBAAiBzD,EAAEY,MAAM,GAAGC,GAAG,GAAGe,QAAQ;IAC1CU,QAAQtC,EAAES,MAAM;IAChBE,WAAWX,EAAEY,MAAM,GAAGC,GAAG,GAAGC,QAAQ;IACpC,+EAA+E;IAC/E,+EAA+E;IAC/E,0EAA0E;IAC1E,uDAAuD;IACvD4C,QAAQ1D,EAAEyC,MAAM,CAACzC,EAAES,MAAM,IAAIT,EAAE0C,OAAO,IAAI5B,QAAQ;IAClD6C,SAAS3D,EAAEyC,MAAM,CAACzC,EAAES,MAAM,IAAIT,EAAE0C,OAAO,IAAI5B,QAAQ;IACnD8C,UAAU5D,EAAES,MAAM,GAAGK,QAAQ;IAC7BS,OAAOvB,EAAEyC,MAAM,CAACzC,EAAES,MAAM,IAAIT,EAAE0C,OAAO,IAAI5B,QAAQ;IACjD,0EAA0E;IAC1E,mDAAmD;IACnD+C,aAAad;IACbe,kBAAkB9D,EAAES,MAAM,GAAGK,QAAQ;IACrCiD,YAAY/D,EAAES,MAAM;IACpBuD,aAAahE,EAAES,MAAM,GAAGK,QAAQ;AAClC,GAAG"}
|
|
@@ -61,6 +61,8 @@ export declare const workflowRunStepDetailDtoSchema: z.ZodObject<{
|
|
|
61
61
|
checkout_failed: "checkout_failed";
|
|
62
62
|
checkout_auth_failed: "checkout_auth_failed";
|
|
63
63
|
checkout_unavailable: "checkout_unavailable";
|
|
64
|
+
checkout_path_invalid: "checkout_path_invalid";
|
|
65
|
+
checkout_destination_occupied: "checkout_destination_occupied";
|
|
64
66
|
git_unavailable: "git_unavailable";
|
|
65
67
|
workspace_prep_failed: "workspace_prep_failed";
|
|
66
68
|
setup_aborted: "setup_aborted";
|
|
@@ -217,6 +219,8 @@ export declare const workflowRunJobExecutionDetailDtoSchema: z.ZodObject<{
|
|
|
217
219
|
checkout_failed: "checkout_failed";
|
|
218
220
|
checkout_auth_failed: "checkout_auth_failed";
|
|
219
221
|
checkout_unavailable: "checkout_unavailable";
|
|
222
|
+
checkout_path_invalid: "checkout_path_invalid";
|
|
223
|
+
checkout_destination_occupied: "checkout_destination_occupied";
|
|
220
224
|
git_unavailable: "git_unavailable";
|
|
221
225
|
workspace_prep_failed: "workspace_prep_failed";
|
|
222
226
|
setup_aborted: "setup_aborted";
|
|
@@ -448,6 +452,8 @@ export declare const workflowRunJobDetailDtoSchema: z.ZodObject<{
|
|
|
448
452
|
checkout_failed: "checkout_failed";
|
|
449
453
|
checkout_auth_failed: "checkout_auth_failed";
|
|
450
454
|
checkout_unavailable: "checkout_unavailable";
|
|
455
|
+
checkout_path_invalid: "checkout_path_invalid";
|
|
456
|
+
checkout_destination_occupied: "checkout_destination_occupied";
|
|
451
457
|
git_unavailable: "git_unavailable";
|
|
452
458
|
workspace_prep_failed: "workspace_prep_failed";
|
|
453
459
|
setup_aborted: "setup_aborted";
|
|
@@ -734,6 +740,8 @@ export declare const workflowRunDetailResponseSchema: z.ZodObject<{
|
|
|
734
740
|
checkout_failed: "checkout_failed";
|
|
735
741
|
checkout_auth_failed: "checkout_auth_failed";
|
|
736
742
|
checkout_unavailable: "checkout_unavailable";
|
|
743
|
+
checkout_path_invalid: "checkout_path_invalid";
|
|
744
|
+
checkout_destination_occupied: "checkout_destination_occupied";
|
|
737
745
|
git_unavailable: "git_unavailable";
|
|
738
746
|
workspace_prep_failed: "workspace_prep_failed";
|
|
739
747
|
setup_aborted: "setup_aborted";
|
|
@@ -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;AAMtB,eAAO,MAAM,wBAAwB;;;;;;EAMn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