@shipfox/api-workflows-dto 12.6.0 → 13.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.
@@ -1,2 +1,2 @@
1
1
  $ shipfox-swc
2
- Successfully compiled: 16 files with swc (287.48ms)
2
+ Successfully compiled: 16 files with swc (178.69ms)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @shipfox/api-workflows-dto
2
2
 
3
+ ## 13.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - af6b31e: Expose ordered queued and terminal workflow job-execution facts, and release terminal runner reservations once no uncancelled lease remains.
8
+
9
+ ## 12.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 4df5e37: Workflow run list items and run detail now carry `has_started_job_execution`, reporting whether any
14
+ job execution of the attempt reached a runner. Run surfaces no longer show a client-derived `Queued`
15
+ state: the run list and run detail present the API attempt status and duration, and read the new
16
+ field to label a finished run's duration as run or elapsed time.
17
+
3
18
  ## 12.6.0
4
19
 
5
20
  ### Minor Changes
package/dist/events.d.ts CHANGED
@@ -2,7 +2,8 @@ import { z } from 'zod';
2
2
  export declare const WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED: 'workflows.workflow_run_attempt.created';
3
3
  export declare const WORKFLOWS_WORKFLOW_RUN_TERMINATED: 'workflows.workflow_run.terminated';
4
4
  export declare const WORKFLOWS_WORKFLOW_RUN_CANCELLED: 'workflows.workflow_run.cancelled';
5
- export declare const WORKFLOWS_JOB_EXECUTION_TIMED_OUT: 'workflows.job_execution.timed_out';
5
+ export declare const WORKFLOWS_JOB_EXECUTION_TERMINATED: 'workflows.job_execution.terminated';
6
+ export declare const WORKFLOWS_JOB_EXECUTION_QUEUED: 'workflows.job_execution.queued';
6
7
  export declare const WORKFLOWS_JOB_ACTIVATED: 'workflows.job.activated';
7
8
  export declare const WORKFLOWS_JOB_EVENT_DELIVERED: 'workflows.job_event.delivered';
8
9
  export declare const WORKFLOWS_JOB_TERMINATED: 'workflows.job.terminated';
@@ -51,12 +52,45 @@ export declare const workflowsWorkflowRunCancelledSchema: z.ZodObject<{
51
52
  projectId: z.ZodString;
52
53
  }, z.core.$strip>;
53
54
  export type WorkflowsWorkflowRunCancelledEventDto = z.infer<typeof workflowsWorkflowRunCancelledSchema>;
54
- export declare const workflowsJobExecutionTimedOutSchema: z.ZodObject<{
55
+ export declare const workflowsJobExecutionQueuedSchema: z.ZodObject<{
55
56
  jobId: z.ZodString;
56
57
  jobExecutionId: z.ZodString;
58
+ workflowRunId: z.ZodString;
59
+ workflowRunAttemptId: z.ZodString;
60
+ workspaceId: z.ZodString;
61
+ projectId: z.ZodString;
62
+ requiredLabels: z.ZodArray<z.ZodString>;
63
+ queuedAt: z.ZodString;
64
+ }, z.core.$strip>;
65
+ export type WorkflowsJobExecutionQueuedEventDto = z.infer<typeof workflowsJobExecutionQueuedSchema>;
66
+ export declare const workflowsJobExecutionTerminatedSchema: z.ZodObject<{
67
+ jobId: z.ZodString;
68
+ jobExecutionId: z.ZodString;
69
+ workflowRunId: z.ZodString;
57
70
  workflowRunAttemptId: z.ZodString;
71
+ status: z.ZodEnum<{
72
+ cancelled: "cancelled";
73
+ failed: "failed";
74
+ succeeded: "succeeded";
75
+ }>;
76
+ statusReason: z.ZodNullable<z.ZodEnum<{
77
+ condition_errored: "condition_errored";
78
+ condition_false: "condition_false";
79
+ condition_rejected: "condition_rejected";
80
+ default_gate_rejected: "default_gate_rejected";
81
+ dependency_not_completed: "dependency_not_completed";
82
+ output_invalid: "output_invalid";
83
+ output_too_large: "output_too_large";
84
+ run_cancelled: "run_cancelled";
85
+ runner_lost: "runner_lost";
86
+ step_failed: "step_failed";
87
+ timed_out: "timed_out";
88
+ unknown: "unknown";
89
+ user_cancelled: "user_cancelled";
90
+ }>>;
91
+ statusReasonMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
92
  }, z.core.$strip>;
59
- export type WorkflowsJobExecutionTimedOutEventDto = z.infer<typeof workflowsJobExecutionTimedOutSchema>;
93
+ export type WorkflowsJobExecutionTerminatedEventDto = z.infer<typeof workflowsJobExecutionTerminatedSchema>;
60
94
  export type ListenerFilterExpressionType = 'string' | 'int' | 'double' | 'bool' | 'null' | 'timestamp' | {
61
95
  kind: 'object';
62
96
  fields: Record<string, ListenerFilterExpressionType>;
@@ -195,7 +229,8 @@ export interface WorkflowsEventMapDto {
195
229
  [WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED]: WorkflowsWorkflowRunAttemptCreatedEventDto;
196
230
  [WORKFLOWS_WORKFLOW_RUN_TERMINATED]: WorkflowsWorkflowRunTerminatedEventDto;
197
231
  [WORKFLOWS_WORKFLOW_RUN_CANCELLED]: WorkflowsWorkflowRunCancelledEventDto;
198
- [WORKFLOWS_JOB_EXECUTION_TIMED_OUT]: WorkflowsJobExecutionTimedOutEventDto;
232
+ [WORKFLOWS_JOB_EXECUTION_QUEUED]: WorkflowsJobExecutionQueuedEventDto;
233
+ [WORKFLOWS_JOB_EXECUTION_TERMINATED]: WorkflowsJobExecutionTerminatedEventDto;
199
234
  [WORKFLOWS_JOB_ACTIVATED]: WorkflowsJobActivatedEventDto;
200
235
  [WORKFLOWS_JOB_EVENT_DELIVERED]: WorkflowsJobEventDeliveredEventDto;
201
236
  [WORKFLOWS_JOB_TERMINATED]: WorkflowsJobTerminatedEventDto;
@@ -227,10 +262,42 @@ export declare const workflowsEventSchemas: {
227
262
  workflowRunAttemptId: z.ZodString;
228
263
  projectId: z.ZodString;
229
264
  }, z.core.$strip>;
230
- "workflows.job_execution.timed_out": z.ZodObject<{
265
+ "workflows.job_execution.queued": z.ZodObject<{
231
266
  jobId: z.ZodString;
232
267
  jobExecutionId: z.ZodString;
268
+ workflowRunId: z.ZodString;
269
+ workflowRunAttemptId: z.ZodString;
270
+ workspaceId: z.ZodString;
271
+ projectId: z.ZodString;
272
+ requiredLabels: z.ZodArray<z.ZodString>;
273
+ queuedAt: z.ZodString;
274
+ }, z.core.$strip>;
275
+ "workflows.job_execution.terminated": z.ZodObject<{
276
+ jobId: z.ZodString;
277
+ jobExecutionId: z.ZodString;
278
+ workflowRunId: z.ZodString;
233
279
  workflowRunAttemptId: z.ZodString;
280
+ status: z.ZodEnum<{
281
+ cancelled: "cancelled";
282
+ failed: "failed";
283
+ succeeded: "succeeded";
284
+ }>;
285
+ statusReason: z.ZodNullable<z.ZodEnum<{
286
+ condition_errored: "condition_errored";
287
+ condition_false: "condition_false";
288
+ condition_rejected: "condition_rejected";
289
+ default_gate_rejected: "default_gate_rejected";
290
+ dependency_not_completed: "dependency_not_completed";
291
+ output_invalid: "output_invalid";
292
+ output_too_large: "output_too_large";
293
+ run_cancelled: "run_cancelled";
294
+ runner_lost: "runner_lost";
295
+ step_failed: "step_failed";
296
+ timed_out: "timed_out";
297
+ unknown: "unknown";
298
+ user_cancelled: "user_cancelled";
299
+ }>>;
300
+ statusReasonMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
301
  }, z.core.$strip>;
235
302
  "workflows.job.activated": z.ZodDiscriminatedUnion<[z.ZodObject<{
236
303
  jobId: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAOtB,eAAO,MAAM,sCAAsC,EACjD,wCAAiD,CAAC;AAEpD,eAAO,MAAM,iCAAiC,EAAG,mCAA4C,CAAC;AAE9F,eAAO,MAAM,gCAAgC,EAAG,kCAA2C,CAAC;AAC5F,eAAO,MAAM,iCAAiC,EAAG,mCAA4C,CAAC;AAC9F,eAAO,MAAM,uBAAuB,EAAG,yBAAkC,CAAC;AAC1E,eAAO,MAAM,6BAA6B,EAAG,+BAAwC,CAAC;AAGtF,eAAO,MAAM,wBAAwB,EAAG,0BAAmC,CAAC;AAI5E,eAAO,MAAM,2BAA2B,EAAG,6BAAsC,CAAC;AAKlF,eAAO,MAAM,+BAA+B,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYuB,CAAC"}
package/dist/events.js CHANGED
@@ -8,7 +8,11 @@ export const WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED = 'workflows.workflow_run_at
8
8
  export const WORKFLOWS_WORKFLOW_RUN_TERMINATED = 'workflows.workflow_run.terminated';
9
9
  // Intent fact for cooperative run cancellation. Consumers use this to stop orchestration.
10
10
  export const WORKFLOWS_WORKFLOW_RUN_CANCELLED = 'workflows.workflow_run.cancelled';
11
- export const WORKFLOWS_JOB_EXECUTION_TIMED_OUT = 'workflows.job_execution.timed_out';
11
+ // Terminal fact for a job execution, written in the same transaction as every
12
+ // transition to succeeded, failed, or cancelled.
13
+ export const WORKFLOWS_JOB_EXECUTION_TERMINATED = 'workflows.job_execution.terminated';
14
+ // Scheduling fact for a job execution, written when workflows first records it as queued.
15
+ export const WORKFLOWS_JOB_EXECUTION_QUEUED = 'workflows.job_execution.queued';
12
16
  export const WORKFLOWS_JOB_ACTIVATED = 'workflows.job.activated';
13
17
  export const WORKFLOWS_JOB_EVENT_DELIVERED = 'workflows.job_event.delivered';
14
18
  // Terminal fact for a job: the single reliable "this job is over" signal, written in
@@ -57,10 +61,24 @@ export const workflowsWorkflowRunCancelledSchema = z.object({
57
61
  workflowRunAttemptId: nonEmptyStringSchema,
58
62
  projectId: nonEmptyStringSchema
59
63
  });
60
- export const workflowsJobExecutionTimedOutSchema = z.object({
64
+ export const workflowsJobExecutionQueuedSchema = z.object({
61
65
  jobId: nonEmptyStringSchema,
62
66
  jobExecutionId: nonEmptyStringSchema,
63
- workflowRunAttemptId: nonEmptyStringSchema
67
+ workflowRunId: nonEmptyStringSchema,
68
+ workflowRunAttemptId: nonEmptyStringSchema,
69
+ workspaceId: nonEmptyStringSchema,
70
+ projectId: nonEmptyStringSchema,
71
+ requiredLabels: z.array(nonEmptyStringSchema).min(1),
72
+ queuedAt: z.string().datetime()
73
+ });
74
+ export const workflowsJobExecutionTerminatedSchema = z.object({
75
+ jobId: nonEmptyStringSchema,
76
+ jobExecutionId: nonEmptyStringSchema,
77
+ workflowRunId: nonEmptyStringSchema,
78
+ workflowRunAttemptId: nonEmptyStringSchema,
79
+ status: workflowRunTerminalStatusSchema,
80
+ statusReason: jobStatusReasonSchema.nullable(),
81
+ statusReasonMessage: z.string().nullable().optional()
64
82
  });
65
83
  const workflowsJobActivatedBaseSchema = z.object({
66
84
  jobId: nonEmptyStringSchema,
@@ -163,7 +181,8 @@ export const workflowsEventSchemas = {
163
181
  [WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED]: workflowsWorkflowRunAttemptCreatedSchema,
164
182
  [WORKFLOWS_WORKFLOW_RUN_TERMINATED]: workflowsWorkflowRunTerminatedSchema,
165
183
  [WORKFLOWS_WORKFLOW_RUN_CANCELLED]: workflowsWorkflowRunCancelledSchema,
166
- [WORKFLOWS_JOB_EXECUTION_TIMED_OUT]: workflowsJobExecutionTimedOutSchema,
184
+ [WORKFLOWS_JOB_EXECUTION_QUEUED]: workflowsJobExecutionQueuedSchema,
185
+ [WORKFLOWS_JOB_EXECUTION_TERMINATED]: workflowsJobExecutionTerminatedSchema,
167
186
  [WORKFLOWS_JOB_ACTIVATED]: workflowsJobActivatedSchema,
168
187
  [WORKFLOWS_JOB_EVENT_DELIVERED]: workflowsJobEventDeliveredSchema,
169
188
  [WORKFLOWS_JOB_TERMINATED]: workflowsJobTerminatedSchema,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/events.ts"],"sourcesContent":["import {z} from 'zod';\nimport {jobStatusReasonSchema} from './schemas/job.js';\nimport {listeningTriggerSchema} from './schemas/job-listening.js';\nimport {logOutcomeSchema} from './schemas/log-outcome.js';\n\nconst nonEmptyStringSchema = z.string().nonempty();\n\nexport const WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED =\n 'workflows.workflow_run_attempt.created' as const;\n// Terminal fact for a workflow run, written in the same transaction as the status flip.\nexport const WORKFLOWS_WORKFLOW_RUN_TERMINATED = 'workflows.workflow_run.terminated' as const;\n// Intent fact for cooperative run cancellation. Consumers use this to stop orchestration.\nexport const WORKFLOWS_WORKFLOW_RUN_CANCELLED = 'workflows.workflow_run.cancelled' as const;\nexport const WORKFLOWS_JOB_EXECUTION_TIMED_OUT = 'workflows.job_execution.timed_out' as const;\nexport const WORKFLOWS_JOB_ACTIVATED = 'workflows.job.activated' as const;\nexport const WORKFLOWS_JOB_EVENT_DELIVERED = 'workflows.job_event.delivered' as const;\n// Terminal fact for a job: the single reliable \"this job is over\" signal, written in\n// the same transaction as the status flip, on every terminal path.\nexport const WORKFLOWS_JOB_TERMINATED = 'workflows.job.terminated' as const;\n// Internal signal, not a terminal fact: a job's steps have all settled, so the\n// on-job-steps-settled subscriber can raise the Temporal JOB_FINISHED_SIGNAL. Fires\n// before the job row is terminal; observe WORKFLOWS_JOB_TERMINATED for the outcome.\nexport const WORKFLOWS_JOB_STEPS_SETTLED = 'workflows.job.steps_settled' as const;\n// Written in the same transaction as a durable gate restart: the failed attempt\n// plus the rewind of the projection from `restart_from`. The pull-based runner\n// re-dispatches the rewound step on its next pull, so consumers must treat this\n// at-least-once outbox event as idempotent audit data.\nexport const WORKFLOWS_STEP_RESTART_ENQUEUED = 'workflows.step.restart_enqueued' as const;\nexport const WORKFLOWS_STEP_ATTEMPT_TERMINATED = 'workflows.step_attempt.terminated' as const;\n\nexport const workflowsWorkflowRunAttemptCreatedSchema = z.object({\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n attempt: z.number().int().positive(),\n workspaceId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n definitionId: nonEmptyStringSchema,\n});\nexport type WorkflowsWorkflowRunAttemptCreatedEventDto = z.infer<\n typeof workflowsWorkflowRunAttemptCreatedSchema\n>;\n\n// Keep outbox terminal statuses narrower than the public status schemas, which\n// also carry pending/running and job-only skipped.\nexport const workflowRunTerminalStatusSchema = z.enum(['succeeded', 'failed', 'cancelled']);\nexport const jobTerminalStatusSchema = z.enum(['succeeded', 'failed', 'cancelled', 'skipped']);\nexport const terminalStatusSchema = workflowRunTerminalStatusSchema;\n\nexport const workflowsWorkflowRunTerminatedSchema = z.object({\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n status: workflowRunTerminalStatusSchema,\n});\nexport type WorkflowsWorkflowRunTerminatedEventDto = z.infer<\n typeof workflowsWorkflowRunTerminatedSchema\n>;\n\nexport const workflowsWorkflowRunCancelledSchema = z.object({\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n});\nexport type WorkflowsWorkflowRunCancelledEventDto = z.infer<\n typeof workflowsWorkflowRunCancelledSchema\n>;\n\nexport const workflowsJobExecutionTimedOutSchema = z.object({\n jobId: nonEmptyStringSchema,\n jobExecutionId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n});\nexport type WorkflowsJobExecutionTimedOutEventDto = z.infer<\n typeof workflowsJobExecutionTimedOutSchema\n>;\n\nconst workflowsJobActivatedBaseSchema = z.object({\n jobId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n});\n\n// Keep this passive DTO schema local so the transport package does not depend on expression runtime code.\nexport type ListenerFilterExpressionType =\n | 'string'\n | 'int'\n | 'double'\n | 'bool'\n | 'null'\n | 'timestamp'\n | {kind: 'object'; fields: Record<string, ListenerFilterExpressionType>}\n | {kind: 'map'}\n | {kind: 'list'; element: ListenerFilterExpressionType};\n\nconst listenerFilterExpressionTypeSchema: z.ZodType<ListenerFilterExpressionType> = z.lazy(() =>\n z.union([\n z.enum(['string', 'int', 'double', 'bool', 'null', 'timestamp']),\n z.object({\n kind: z.literal('object'),\n fields: z.record(z.string(), listenerFilterExpressionTypeSchema),\n }),\n z.object({kind: z.literal('map')}),\n z.object({kind: z.literal('list'), element: listenerFilterExpressionTypeSchema}),\n ]),\n);\n\nexport const listenerFilterOutputTypesSchema = z.record(\n z.string(),\n z.record(z.string(), listenerFilterExpressionTypeSchema),\n);\nexport type ListenerFilterOutputTypes = z.infer<typeof listenerFilterOutputTypesSchema>;\n\nconst resolvedListeningTriggerSchema = listeningTriggerSchema.extend({\n filter_snapshot: z.record(z.string(), z.unknown()).optional(),\n filter_output_types: listenerFilterOutputTypesSchema.optional(),\n});\n\nexport const workflowsJobActivatedSchema = z.discriminatedUnion('mode', [\n workflowsJobActivatedBaseSchema.extend({\n mode: z.literal('one_shot'),\n on: z.array(resolvedListeningTriggerSchema).nullable().optional(),\n until: z.array(resolvedListeningTriggerSchema).nullable().optional(),\n }),\n workflowsJobActivatedBaseSchema.extend({\n mode: z.literal('listening'),\n on: z.array(resolvedListeningTriggerSchema).nonempty(),\n until: z.array(resolvedListeningTriggerSchema).nullable(),\n }),\n]);\nexport type WorkflowsJobActivatedEventDto = z.infer<typeof workflowsJobActivatedSchema>;\n\nexport const workflowsJobEventDeliveredSchema = z.object({\n jobId: nonEmptyStringSchema,\n disposition: z.enum(['fire', 'resolve']),\n eventRef: nonEmptyStringSchema,\n eventName: nonEmptyStringSchema,\n});\nexport type WorkflowsJobEventDeliveredEventDto = z.infer<typeof workflowsJobEventDeliveredSchema>;\n\nexport const workflowsJobTerminatedSchema = z.object({\n jobId: nonEmptyStringSchema,\n // Optional for compatibility with terminal events written before the current execution\n // identity became part of the event contract. New events always include the value, or null\n // when the job was terminated before an execution was created.\n jobExecutionId: nonEmptyStringSchema.nullable().optional(),\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n status: jobTerminalStatusSchema,\n statusReason: jobStatusReasonSchema.nullable(),\n statusReasonMessage: z.string().nullable().optional(),\n});\nexport type WorkflowsJobTerminatedEventDto = z.infer<typeof workflowsJobTerminatedSchema>;\n\nconst settledStatusSchema = z.enum(['succeeded', 'failed']);\n\nexport const workflowsJobStepsSettledSchema = z.object({\n jobId: nonEmptyStringSchema,\n jobExecutionId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n status: settledStatusSchema,\n});\nexport type WorkflowsJobStepsSettledEventDto = z.infer<typeof workflowsJobStepsSettledSchema>;\n\nexport const workflowsStepRestartEnqueuedSchema = z.object({\n jobId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n failedStepId: nonEmptyStringSchema,\n failedStepAttempt: z.number(),\n restartFromStepId: nonEmptyStringSchema,\n feedback: nonEmptyStringSchema,\n});\nexport type WorkflowsStepRestartEnqueuedEventDto = z.infer<\n typeof workflowsStepRestartEnqueuedSchema\n>;\n\nexport const workflowsStepAttemptTerminatedSchema = z.object({\n jobId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n stepId: nonEmptyStringSchema,\n attempt: z.number().int().positive(),\n // Optional so the subscriber can continue to consume terminal events written\n // before the status field was added. New outbox events always include it.\n status: terminalStatusSchema.optional(),\n logOutcome: logOutcomeSchema,\n});\nexport type WorkflowsStepAttemptTerminatedEventDto = z.infer<\n typeof workflowsStepAttemptTerminatedSchema\n>;\n\nexport interface WorkflowsEventMapDto {\n [WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED]: WorkflowsWorkflowRunAttemptCreatedEventDto;\n [WORKFLOWS_WORKFLOW_RUN_TERMINATED]: WorkflowsWorkflowRunTerminatedEventDto;\n [WORKFLOWS_WORKFLOW_RUN_CANCELLED]: WorkflowsWorkflowRunCancelledEventDto;\n [WORKFLOWS_JOB_EXECUTION_TIMED_OUT]: WorkflowsJobExecutionTimedOutEventDto;\n [WORKFLOWS_JOB_ACTIVATED]: WorkflowsJobActivatedEventDto;\n [WORKFLOWS_JOB_EVENT_DELIVERED]: WorkflowsJobEventDeliveredEventDto;\n [WORKFLOWS_JOB_TERMINATED]: WorkflowsJobTerminatedEventDto;\n [WORKFLOWS_JOB_STEPS_SETTLED]: WorkflowsJobStepsSettledEventDto;\n [WORKFLOWS_STEP_RESTART_ENQUEUED]: WorkflowsStepRestartEnqueuedEventDto;\n [WORKFLOWS_STEP_ATTEMPT_TERMINATED]: WorkflowsStepAttemptTerminatedEventDto;\n}\n\nexport const workflowsEventSchemas = {\n [WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED]: workflowsWorkflowRunAttemptCreatedSchema,\n [WORKFLOWS_WORKFLOW_RUN_TERMINATED]: workflowsWorkflowRunTerminatedSchema,\n [WORKFLOWS_WORKFLOW_RUN_CANCELLED]: workflowsWorkflowRunCancelledSchema,\n [WORKFLOWS_JOB_EXECUTION_TIMED_OUT]: workflowsJobExecutionTimedOutSchema,\n [WORKFLOWS_JOB_ACTIVATED]: workflowsJobActivatedSchema,\n [WORKFLOWS_JOB_EVENT_DELIVERED]: workflowsJobEventDeliveredSchema,\n [WORKFLOWS_JOB_TERMINATED]: workflowsJobTerminatedSchema,\n [WORKFLOWS_JOB_STEPS_SETTLED]: workflowsJobStepsSettledSchema,\n [WORKFLOWS_STEP_RESTART_ENQUEUED]: workflowsStepRestartEnqueuedSchema,\n [WORKFLOWS_STEP_ATTEMPT_TERMINATED]: workflowsStepAttemptTerminatedSchema,\n} satisfies Record<keyof WorkflowsEventMapDto, z.ZodType>;\n"],"names":["z","jobStatusReasonSchema","listeningTriggerSchema","logOutcomeSchema","nonEmptyStringSchema","string","nonempty","WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED","WORKFLOWS_WORKFLOW_RUN_TERMINATED","WORKFLOWS_WORKFLOW_RUN_CANCELLED","WORKFLOWS_JOB_EXECUTION_TIMED_OUT","WORKFLOWS_JOB_ACTIVATED","WORKFLOWS_JOB_EVENT_DELIVERED","WORKFLOWS_JOB_TERMINATED","WORKFLOWS_JOB_STEPS_SETTLED","WORKFLOWS_STEP_RESTART_ENQUEUED","WORKFLOWS_STEP_ATTEMPT_TERMINATED","workflowsWorkflowRunAttemptCreatedSchema","object","workflowRunId","workflowRunAttemptId","attempt","number","int","positive","workspaceId","projectId","definitionId","workflowRunTerminalStatusSchema","enum","jobTerminalStatusSchema","terminalStatusSchema","workflowsWorkflowRunTerminatedSchema","status","workflowsWorkflowRunCancelledSchema","workflowsJobExecutionTimedOutSchema","jobId","jobExecutionId","workflowsJobActivatedBaseSchema","listenerFilterExpressionTypeSchema","lazy","union","kind","literal","fields","record","element","listenerFilterOutputTypesSchema","resolvedListeningTriggerSchema","extend","filter_snapshot","unknown","optional","filter_output_types","workflowsJobActivatedSchema","discriminatedUnion","mode","on","array","nullable","until","workflowsJobEventDeliveredSchema","disposition","eventRef","eventName","workflowsJobTerminatedSchema","statusReason","statusReasonMessage","settledStatusSchema","workflowsJobStepsSettledSchema","workflowsStepRestartEnqueuedSchema","failedStepId","failedStepAttempt","restartFromStepId","feedback","workflowsStepAttemptTerminatedSchema","stepId","logOutcome","workflowsEventSchemas"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,qBAAqB,QAAO,mBAAmB;AACvD,SAAQC,sBAAsB,QAAO,6BAA6B;AAClE,SAAQC,gBAAgB,QAAO,2BAA2B;AAE1D,MAAMC,uBAAuBJ,EAAEK,MAAM,GAAGC,QAAQ;AAEhD,OAAO,MAAMC,yCACX,yCAAkD;AACpD,wFAAwF;AACxF,OAAO,MAAMC,oCAAoC,oCAA6C;AAC9F,0FAA0F;AAC1F,OAAO,MAAMC,mCAAmC,mCAA4C;AAC5F,OAAO,MAAMC,oCAAoC,oCAA6C;AAC9F,OAAO,MAAMC,0BAA0B,0BAAmC;AAC1E,OAAO,MAAMC,gCAAgC,gCAAyC;AACtF,qFA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IACrC,CAACxB,wBAAwB,EAAE2C;IAC3B,CAAC1C,8BAA8B,EAAEiD;IACjC,CAAChD,yBAAyB,EAAEoD;IAC5B,CAACnD,4BAA4B,EAAEuD;IAC/B,CAACtD,gCAAgC,EAAEuD;IACnC,CAACtD,kCAAkC,EAAE2D;AACvC,EAA0D"}
1
+ {"version":3,"sources":["../src/events.ts"],"sourcesContent":["import {z} from 'zod';\nimport {jobStatusReasonSchema} from './schemas/job.js';\nimport {listeningTriggerSchema} from './schemas/job-listening.js';\nimport {logOutcomeSchema} from './schemas/log-outcome.js';\n\nconst nonEmptyStringSchema = z.string().nonempty();\n\nexport const WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED =\n 'workflows.workflow_run_attempt.created' as const;\n// Terminal fact for a workflow run, written in the same transaction as the status flip.\nexport const WORKFLOWS_WORKFLOW_RUN_TERMINATED = 'workflows.workflow_run.terminated' as const;\n// Intent fact for cooperative run cancellation. Consumers use this to stop orchestration.\nexport const WORKFLOWS_WORKFLOW_RUN_CANCELLED = 'workflows.workflow_run.cancelled' as const;\n// Terminal fact for a job execution, written in the same transaction as every\n// transition to succeeded, failed, or cancelled.\nexport const WORKFLOWS_JOB_EXECUTION_TERMINATED = 'workflows.job_execution.terminated' as const;\n// Scheduling fact for a job execution, written when workflows first records it as queued.\nexport const WORKFLOWS_JOB_EXECUTION_QUEUED = 'workflows.job_execution.queued' as const;\nexport const WORKFLOWS_JOB_ACTIVATED = 'workflows.job.activated' as const;\nexport const WORKFLOWS_JOB_EVENT_DELIVERED = 'workflows.job_event.delivered' as const;\n// Terminal fact for a job: the single reliable \"this job is over\" signal, written in\n// the same transaction as the status flip, on every terminal path.\nexport const WORKFLOWS_JOB_TERMINATED = 'workflows.job.terminated' as const;\n// Internal signal, not a terminal fact: a job's steps have all settled, so the\n// on-job-steps-settled subscriber can raise the Temporal JOB_FINISHED_SIGNAL. Fires\n// before the job row is terminal; observe WORKFLOWS_JOB_TERMINATED for the outcome.\nexport const WORKFLOWS_JOB_STEPS_SETTLED = 'workflows.job.steps_settled' as const;\n// Written in the same transaction as a durable gate restart: the failed attempt\n// plus the rewind of the projection from `restart_from`. The pull-based runner\n// re-dispatches the rewound step on its next pull, so consumers must treat this\n// at-least-once outbox event as idempotent audit data.\nexport const WORKFLOWS_STEP_RESTART_ENQUEUED = 'workflows.step.restart_enqueued' as const;\nexport const WORKFLOWS_STEP_ATTEMPT_TERMINATED = 'workflows.step_attempt.terminated' as const;\n\nexport const workflowsWorkflowRunAttemptCreatedSchema = z.object({\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n attempt: z.number().int().positive(),\n workspaceId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n definitionId: nonEmptyStringSchema,\n});\nexport type WorkflowsWorkflowRunAttemptCreatedEventDto = z.infer<\n typeof workflowsWorkflowRunAttemptCreatedSchema\n>;\n\n// Keep outbox terminal statuses narrower than the public status schemas, which\n// also carry pending/running and job-only skipped.\nexport const workflowRunTerminalStatusSchema = z.enum(['succeeded', 'failed', 'cancelled']);\nexport const jobTerminalStatusSchema = z.enum(['succeeded', 'failed', 'cancelled', 'skipped']);\nexport const terminalStatusSchema = workflowRunTerminalStatusSchema;\n\nexport const workflowsWorkflowRunTerminatedSchema = z.object({\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n status: workflowRunTerminalStatusSchema,\n});\nexport type WorkflowsWorkflowRunTerminatedEventDto = z.infer<\n typeof workflowsWorkflowRunTerminatedSchema\n>;\n\nexport const workflowsWorkflowRunCancelledSchema = z.object({\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n});\nexport type WorkflowsWorkflowRunCancelledEventDto = z.infer<\n typeof workflowsWorkflowRunCancelledSchema\n>;\n\nexport const workflowsJobExecutionQueuedSchema = z.object({\n jobId: nonEmptyStringSchema,\n jobExecutionId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n requiredLabels: z.array(nonEmptyStringSchema).min(1),\n queuedAt: z.string().datetime(),\n});\nexport type WorkflowsJobExecutionQueuedEventDto = z.infer<typeof workflowsJobExecutionQueuedSchema>;\n\nexport const workflowsJobExecutionTerminatedSchema = z.object({\n jobId: nonEmptyStringSchema,\n jobExecutionId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n status: workflowRunTerminalStatusSchema,\n statusReason: jobStatusReasonSchema.nullable(),\n statusReasonMessage: z.string().nullable().optional(),\n});\nexport type WorkflowsJobExecutionTerminatedEventDto = z.infer<\n typeof workflowsJobExecutionTerminatedSchema\n>;\n\nconst workflowsJobActivatedBaseSchema = z.object({\n jobId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n});\n\n// Keep this passive DTO schema local so the transport package does not depend on expression runtime code.\nexport type ListenerFilterExpressionType =\n | 'string'\n | 'int'\n | 'double'\n | 'bool'\n | 'null'\n | 'timestamp'\n | {kind: 'object'; fields: Record<string, ListenerFilterExpressionType>}\n | {kind: 'map'}\n | {kind: 'list'; element: ListenerFilterExpressionType};\n\nconst listenerFilterExpressionTypeSchema: z.ZodType<ListenerFilterExpressionType> = z.lazy(() =>\n z.union([\n z.enum(['string', 'int', 'double', 'bool', 'null', 'timestamp']),\n z.object({\n kind: z.literal('object'),\n fields: z.record(z.string(), listenerFilterExpressionTypeSchema),\n }),\n z.object({kind: z.literal('map')}),\n z.object({kind: z.literal('list'), element: listenerFilterExpressionTypeSchema}),\n ]),\n);\n\nexport const listenerFilterOutputTypesSchema = z.record(\n z.string(),\n z.record(z.string(), listenerFilterExpressionTypeSchema),\n);\nexport type ListenerFilterOutputTypes = z.infer<typeof listenerFilterOutputTypesSchema>;\n\nconst resolvedListeningTriggerSchema = listeningTriggerSchema.extend({\n filter_snapshot: z.record(z.string(), z.unknown()).optional(),\n filter_output_types: listenerFilterOutputTypesSchema.optional(),\n});\n\nexport const workflowsJobActivatedSchema = z.discriminatedUnion('mode', [\n workflowsJobActivatedBaseSchema.extend({\n mode: z.literal('one_shot'),\n on: z.array(resolvedListeningTriggerSchema).nullable().optional(),\n until: z.array(resolvedListeningTriggerSchema).nullable().optional(),\n }),\n workflowsJobActivatedBaseSchema.extend({\n mode: z.literal('listening'),\n on: z.array(resolvedListeningTriggerSchema).nonempty(),\n until: z.array(resolvedListeningTriggerSchema).nullable(),\n }),\n]);\nexport type WorkflowsJobActivatedEventDto = z.infer<typeof workflowsJobActivatedSchema>;\n\nexport const workflowsJobEventDeliveredSchema = z.object({\n jobId: nonEmptyStringSchema,\n disposition: z.enum(['fire', 'resolve']),\n eventRef: nonEmptyStringSchema,\n eventName: nonEmptyStringSchema,\n});\nexport type WorkflowsJobEventDeliveredEventDto = z.infer<typeof workflowsJobEventDeliveredSchema>;\n\nexport const workflowsJobTerminatedSchema = z.object({\n jobId: nonEmptyStringSchema,\n // Optional for compatibility with terminal events written before the current execution\n // identity became part of the event contract. New events always include the value, or null\n // when the job was terminated before an execution was created.\n jobExecutionId: nonEmptyStringSchema.nullable().optional(),\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n status: jobTerminalStatusSchema,\n statusReason: jobStatusReasonSchema.nullable(),\n statusReasonMessage: z.string().nullable().optional(),\n});\nexport type WorkflowsJobTerminatedEventDto = z.infer<typeof workflowsJobTerminatedSchema>;\n\nconst settledStatusSchema = z.enum(['succeeded', 'failed']);\n\nexport const workflowsJobStepsSettledSchema = z.object({\n jobId: nonEmptyStringSchema,\n jobExecutionId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n status: settledStatusSchema,\n});\nexport type WorkflowsJobStepsSettledEventDto = z.infer<typeof workflowsJobStepsSettledSchema>;\n\nexport const workflowsStepRestartEnqueuedSchema = z.object({\n jobId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n failedStepId: nonEmptyStringSchema,\n failedStepAttempt: z.number(),\n restartFromStepId: nonEmptyStringSchema,\n feedback: nonEmptyStringSchema,\n});\nexport type WorkflowsStepRestartEnqueuedEventDto = z.infer<\n typeof workflowsStepRestartEnqueuedSchema\n>;\n\nexport const workflowsStepAttemptTerminatedSchema = z.object({\n jobId: nonEmptyStringSchema,\n workflowRunId: nonEmptyStringSchema,\n workflowRunAttemptId: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n projectId: nonEmptyStringSchema,\n stepId: nonEmptyStringSchema,\n attempt: z.number().int().positive(),\n // Optional so the subscriber can continue to consume terminal events written\n // before the status field was added. New outbox events always include it.\n status: terminalStatusSchema.optional(),\n logOutcome: logOutcomeSchema,\n});\nexport type WorkflowsStepAttemptTerminatedEventDto = z.infer<\n typeof workflowsStepAttemptTerminatedSchema\n>;\n\nexport interface WorkflowsEventMapDto {\n [WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED]: WorkflowsWorkflowRunAttemptCreatedEventDto;\n [WORKFLOWS_WORKFLOW_RUN_TERMINATED]: WorkflowsWorkflowRunTerminatedEventDto;\n [WORKFLOWS_WORKFLOW_RUN_CANCELLED]: WorkflowsWorkflowRunCancelledEventDto;\n [WORKFLOWS_JOB_EXECUTION_QUEUED]: WorkflowsJobExecutionQueuedEventDto;\n [WORKFLOWS_JOB_EXECUTION_TERMINATED]: WorkflowsJobExecutionTerminatedEventDto;\n [WORKFLOWS_JOB_ACTIVATED]: WorkflowsJobActivatedEventDto;\n [WORKFLOWS_JOB_EVENT_DELIVERED]: WorkflowsJobEventDeliveredEventDto;\n [WORKFLOWS_JOB_TERMINATED]: WorkflowsJobTerminatedEventDto;\n [WORKFLOWS_JOB_STEPS_SETTLED]: WorkflowsJobStepsSettledEventDto;\n [WORKFLOWS_STEP_RESTART_ENQUEUED]: WorkflowsStepRestartEnqueuedEventDto;\n [WORKFLOWS_STEP_ATTEMPT_TERMINATED]: WorkflowsStepAttemptTerminatedEventDto;\n}\n\nexport const workflowsEventSchemas = {\n [WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED]: workflowsWorkflowRunAttemptCreatedSchema,\n [WORKFLOWS_WORKFLOW_RUN_TERMINATED]: workflowsWorkflowRunTerminatedSchema,\n [WORKFLOWS_WORKFLOW_RUN_CANCELLED]: workflowsWorkflowRunCancelledSchema,\n [WORKFLOWS_JOB_EXECUTION_QUEUED]: workflowsJobExecutionQueuedSchema,\n [WORKFLOWS_JOB_EXECUTION_TERMINATED]: workflowsJobExecutionTerminatedSchema,\n [WORKFLOWS_JOB_ACTIVATED]: workflowsJobActivatedSchema,\n [WORKFLOWS_JOB_EVENT_DELIVERED]: workflowsJobEventDeliveredSchema,\n [WORKFLOWS_JOB_TERMINATED]: workflowsJobTerminatedSchema,\n [WORKFLOWS_JOB_STEPS_SETTLED]: workflowsJobStepsSettledSchema,\n [WORKFLOWS_STEP_RESTART_ENQUEUED]: workflowsStepRestartEnqueuedSchema,\n [WORKFLOWS_STEP_ATTEMPT_TERMINATED]: workflowsStepAttemptTerminatedSchema,\n} satisfies Record<keyof WorkflowsEventMapDto, z.ZodType>;\n"],"names":["z","jobStatusReasonSchema","listeningTriggerSchema","logOutcomeSchema","nonEmptyStringSchema","string","nonempty","WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED","WORKFLOWS_WORKFLOW_RUN_TERMINATED","WORKFLOWS_WORKFLOW_RUN_CANCELLED","WORKFLOWS_JOB_EXECUTION_TERMINATED","WORKFLOWS_JOB_EXECUTION_QUEUED","WORKFLOWS_JOB_ACTIVATED","WORKFLOWS_JOB_EVENT_DELIVERED","WORKFLOWS_JOB_TERMINATED","WORKFLOWS_JOB_STEPS_SETTLED","WORKFLOWS_STEP_RESTART_ENQUEUED","WORKFLOWS_STEP_ATTEMPT_TERMINATED","workflowsWorkflowRunAttemptCreatedSchema","object","workflowRunId","workflowRunAttemptId","attempt","number","int","positive","workspaceId","projectId","definitionId","workflowRunTerminalStatusSchema","enum","jobTerminalStatusSchema","terminalStatusSchema","workflowsWorkflowRunTerminatedSchema","status","workflowsWorkflowRunCancelledSchema","workflowsJobExecutionQueuedSchema","jobId","jobExecutionId","requiredLabels","array","min","queuedAt","datetime","workflowsJobExecutionTerminatedSchema","statusReason","nullable","statusReasonMessage","optional","workflowsJobActivatedBaseSchema","listenerFilterExpressionTypeSchema","lazy","union","kind","literal","fields","record","element","listenerFilterOutputTypesSchema","resolvedListeningTriggerSchema","extend","filter_snapshot","unknown","filter_output_types","workflowsJobActivatedSchema","discriminatedUnion","mode","on","until","workflowsJobEventDeliveredSchema","disposition","eventRef","eventName","workflowsJobTerminatedSchema","settledStatusSchema","workflowsJobStepsSettledSchema","workflowsStepRestartEnqueuedSchema","failedStepId","failedStepAttempt","restartFromStepId","feedback","workflowsStepAttemptTerminatedSchema","stepId","logOutcome","workflowsEventSchemas"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,qBAAqB,QAAO,mBAAmB;AACvD,SAAQC,sBAAsB,QAAO,6BAA6B;AAClE,SAAQC,gBAAgB,QAAO,2BAA2B;AAE1D,MAAMC,uBAAuBJ,EAAEK,MAAM,GAAGC,QAAQ;AAEhD,OAAO,MAAMC,yCACX,yCAAkD;AACpD,wFAAwF;AACxF,OAAO,MAAMC,oCAAoC,oCAA6C;AAC9F,0FAA0F;AAC1F,OAAO,MAAMC,mCAAmC,mCAA4C;AAC5F,8EAA8E;AAC9E,iDAAiD;AACjD,OAAO,MAAMC,qCAAqC,qCAA8C;AAChG,0FAA0F;AAC1F,OAAO,MAAMC,iCAAiC,iCAA0C;AACxF,OAAO,MAAMC,0BAA0B,0BAAmC;AAC1E,OAAO,MAAMC,gCAAgC,gCAAyC;AACtF,qFAAqF;A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CAAC;IAC3DkB,OAAOjC;IACPgB,eAAehB;IACfiB,sBAAsBjB;IACtBsB,aAAatB;IACbuB,WAAWvB;IACX8E,QAAQ9E;IACRkB,SAAStB,EAAEuB,MAAM,GAAGC,GAAG,GAAGC,QAAQ;IAClC,6EAA6E;IAC7E,0EAA0E;IAC1ES,QAAQF,qBAAqBgB,QAAQ;IACrCmC,YAAYhF;AACd,GAAG;AAmBH,OAAO,MAAMiF,wBAAwB;IACnC,CAAC7E,uCAAuC,EAAEW;IAC1C,CAACV,kCAAkC,EAAEyB;IACrC,CAACxB,iCAAiC,EAAE0B;IACpC,CAACxB,+BAA+B,EAAEyB;IAClC,CAAC1B,mCAAmC,EAAEkC;IACtC,CAAChC,wBAAwB,EAAEoD;IAC3B,CAACnD,8BAA8B,EAAEwD;IACjC,CAACvD,yBAAyB,EAAE2D;IAC5B,CAAC1D,4BAA4B,EAAE4D;IAC/B,CAAC3D,gCAAgC,EAAE4D;IACnC,CAAC3D,kCAAkC,EAAEgE;AACvC,EAA0D"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { type AgentConfigIssueDto, type AgentRuntimeConfigQueryDto, agentConfigIssueSchema, agentRuntimeConfigQuerySchema, type CheckoutIntentDto, type CheckoutResultDto, type CheckoutTokenAuthDto, type CheckoutTokenParamsDto, type CheckoutTokenQueryDto, type CheckoutTokenResponseDto, checkoutIntentSchema, checkoutResultSchema, checkoutTokenAuthSchema, checkoutTokenParamsSchema, checkoutTokenQuerySchema, checkoutTokenResponseSchema, type EvaluationTraceDto, type EvaluationTraceEntryDto, evaluationTraceEntrySchema, evaluationTraceSchema, type JobDto, type JobExecutionDto, type JobListeningDto, type JobModeDto, type JobStatusDto, type JobStatusReasonDto, jobDtoSchema, jobExecutionStatusSchema, jobListeningBatchSchema, jobListeningSchema, jobModeSchema, jobStatusReasonSchema, jobStatusSchema, type ListenerStatusDto, type ListeningTriggerDto, type LogOutcomeDto, listenerStatusSchema, listeningTriggerSchema, logOutcomeSchema, type NextStepResponseDto, nextStepResponseSchema, type ReportStepBodyDto, type ReportStepResponseDto, type RerunWorkflowRunBodyDto, type ResolutionReasonDto, reportStepBodySchema, reportStepResponseSchema, rerunWorkflowRunBodySchema, resolutionReasonSchema, STEP_ERROR_MESSAGE_MAX_LENGTH, STEP_RESPONSE_MAX_LENGTH, STEP_STATUS_REASONS, type StepAttemptDetailDto, type StepAttemptDetailResponseDto, type StepAttemptDto, type StepDto, type StepErrorCategoryDto, type StepErrorDto, type StepErrorReasonDto, type StepGateResultDto, type StepStatusReasonDto, stepAttemptDetailDtoSchema, stepAttemptDetailResponseSchema, stepAttemptDtoSchema, stepDtoSchema, stepErrorCategorySchema, stepErrorDtoSchema, stepErrorReasonSchema, stepGateResultDtoSchema, stepStatusReasonSchema, type TriggerEventsBatchDto, triggerEventsBatchSchema, type WorkflowExecutionContextDto, type WorkflowExecutionEventDto, type WorkflowRunAggregatesQueryDto, type WorkflowRunAggregatesResponseDto, type WorkflowRunAttemptDto, type WorkflowRunAttemptsResponseDto, type WorkflowRunDetailResponseDto, type WorkflowRunDto, type WorkflowRunJobDetailDto, type WorkflowRunJobExecutionDetailDto, type WorkflowRunListQueryDto, type WorkflowRunListResponseDto, type WorkflowRunRerunModeDto, type WorkflowRunResponseDto, type WorkflowRunStatusDto, type WorkflowRunStepDetailDto, workflowExecutionContextSchema, workflowExecutionEventSchema, workflowRunAggregatesQuerySchema, workflowRunAggregatesResponseSchema, workflowRunAttemptDtoSchema, workflowRunAttemptsResponseSchema, workflowRunDetailResponseSchema, workflowRunDtoSchema, workflowRunJobDetailDtoSchema, workflowRunJobDisplayStatusCountDtoSchema, workflowRunJobExecutionDetailDtoSchema, workflowRunJobStatusCountDtoSchema, workflowRunJobSummaryDtoSchema, workflowRunListItemSchema, workflowRunListQuerySchema, workflowRunListResponseSchema, workflowRunRerunModeSchema, workflowRunResponseSchema, workflowRunStatusSchema, workflowRunStepDetailDtoSchema, } from '#schemas/index.js';
2
2
  export { type StepSourceLocationDto, stepSourceLocationSchema } from '#schemas/step.js';
3
3
  export { WORKFLOW_RUN_JOB_PREVIEW_LIMIT, type WorkflowRunJobDisplayStatusCountDto, type WorkflowRunJobStatusCountDto, type WorkflowRunJobSummaryDto, type WorkflowRunListItemDto, type WorkflowRunTriggerReferenceDto, type WorkflowSourceSnapshotDto, workflowRunTriggerReferenceSchema, workflowSourceSnapshotSchema, } from '#schemas/workflow-run.js';
4
- export { jobTerminalStatusSchema, type ListenerFilterExpressionType, type ListenerFilterOutputTypes, listenerFilterOutputTypesSchema, terminalStatusSchema, WORKFLOWS_JOB_ACTIVATED, WORKFLOWS_JOB_EVENT_DELIVERED, WORKFLOWS_JOB_EXECUTION_TIMED_OUT, WORKFLOWS_JOB_STEPS_SETTLED, WORKFLOWS_JOB_TERMINATED, WORKFLOWS_STEP_ATTEMPT_TERMINATED, WORKFLOWS_STEP_RESTART_ENQUEUED, WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED, WORKFLOWS_WORKFLOW_RUN_CANCELLED, WORKFLOWS_WORKFLOW_RUN_TERMINATED, type WorkflowsEventMapDto, type WorkflowsJobActivatedEventDto, type WorkflowsJobEventDeliveredEventDto, type WorkflowsJobExecutionTimedOutEventDto, type WorkflowsJobStepsSettledEventDto, type WorkflowsJobTerminatedEventDto, type WorkflowsStepAttemptTerminatedEventDto, type WorkflowsStepRestartEnqueuedEventDto, type WorkflowsWorkflowRunAttemptCreatedEventDto, type WorkflowsWorkflowRunCancelledEventDto, type WorkflowsWorkflowRunTerminatedEventDto, workflowRunTerminalStatusSchema, workflowsEventSchemas, workflowsJobActivatedSchema, workflowsJobEventDeliveredSchema, workflowsJobExecutionTimedOutSchema, workflowsJobStepsSettledSchema, workflowsJobTerminatedSchema, workflowsStepAttemptTerminatedSchema, workflowsStepRestartEnqueuedSchema, workflowsWorkflowRunAttemptCreatedSchema, workflowsWorkflowRunCancelledSchema, workflowsWorkflowRunTerminatedSchema, } from './events.js';
4
+ export { jobTerminalStatusSchema, type ListenerFilterExpressionType, type ListenerFilterOutputTypes, listenerFilterOutputTypesSchema, terminalStatusSchema, WORKFLOWS_JOB_ACTIVATED, WORKFLOWS_JOB_EVENT_DELIVERED, WORKFLOWS_JOB_EXECUTION_QUEUED, WORKFLOWS_JOB_EXECUTION_TERMINATED, WORKFLOWS_JOB_STEPS_SETTLED, WORKFLOWS_JOB_TERMINATED, WORKFLOWS_STEP_ATTEMPT_TERMINATED, WORKFLOWS_STEP_RESTART_ENQUEUED, WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED, WORKFLOWS_WORKFLOW_RUN_CANCELLED, WORKFLOWS_WORKFLOW_RUN_TERMINATED, type WorkflowsEventMapDto, type WorkflowsJobActivatedEventDto, type WorkflowsJobEventDeliveredEventDto, type WorkflowsJobExecutionQueuedEventDto, type WorkflowsJobExecutionTerminatedEventDto, type WorkflowsJobStepsSettledEventDto, type WorkflowsJobTerminatedEventDto, type WorkflowsStepAttemptTerminatedEventDto, type WorkflowsStepRestartEnqueuedEventDto, type WorkflowsWorkflowRunAttemptCreatedEventDto, type WorkflowsWorkflowRunCancelledEventDto, type WorkflowsWorkflowRunTerminatedEventDto, workflowRunTerminalStatusSchema, workflowsEventSchemas, workflowsJobActivatedSchema, workflowsJobEventDeliveredSchema, workflowsJobExecutionQueuedSchema, workflowsJobExecutionTerminatedSchema, workflowsJobStepsSettledSchema, workflowsJobTerminatedSchema, workflowsStepAttemptTerminatedSchema, workflowsStepRestartEnqueuedSchema, workflowsWorkflowRunAttemptCreatedSchema, workflowsWorkflowRunCancelledSchema, workflowsWorkflowRunTerminatedSchema, } from './events.js';
5
5
  export { assertWorkingDirectory, InvalidWorkingDirectoryError } from './working-directory.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,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A8B,EAC9B,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,+BAA+B,EAC/B,oBAAoB,EACpB,uBAAuB,EACvB,6BAA6B,EAC7B,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,wBAAwB,EACxB,iCAAiC,EACjC,+BAA+B,EAC/B,sCAAsC,EACtC,gCAAgC,EAChC,iCAAiC,EACjC,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,KAAK,uCAAuC,EAC5C,KAAK,gCAAgC,EACrC,KAAK,8BAA8B,EACnC,KAAK,sCAAsC,EAC3C,KAAK,oCAAoC,EACzC,KAAK,0CAA0C,EAC/C,KAAK,qCAAqC,EAC1C,KAAK,sCAAsC,EAC3C,+BAA+B,EAC/B,qBAAqB,EACrB,2BAA2B,EAC3B,gCAAgC,EAChC,iCAAiC,EACjC,qCAAqC,EACrC,8BAA8B,EAC9B,4BAA4B,EAC5B,oCAAoC,EACpC,kCAAkC,EAClC,wCAAwC,EACxC,mCAAmC,EACnC,oCAAoC,GACrC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,sBAAsB,EAAE,4BAA4B,EAAC,MAAM,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { agentConfigIssueSchema, agentRuntimeConfigQuerySchema, checkoutIntentSchema, checkoutResultSchema, checkoutTokenAuthSchema, checkoutTokenParamsSchema, checkoutTokenQuerySchema, checkoutTokenResponseSchema, evaluationTraceEntrySchema, evaluationTraceSchema, jobDtoSchema, jobExecutionStatusSchema, jobListeningBatchSchema, jobListeningSchema, jobModeSchema, jobStatusReasonSchema, jobStatusSchema, listenerStatusSchema, listeningTriggerSchema, logOutcomeSchema, nextStepResponseSchema, reportStepBodySchema, reportStepResponseSchema, rerunWorkflowRunBodySchema, resolutionReasonSchema, STEP_ERROR_MESSAGE_MAX_LENGTH, STEP_RESPONSE_MAX_LENGTH, STEP_STATUS_REASONS, stepAttemptDetailDtoSchema, stepAttemptDetailResponseSchema, stepAttemptDtoSchema, stepDtoSchema, stepErrorCategorySchema, stepErrorDtoSchema, stepErrorReasonSchema, stepGateResultDtoSchema, stepStatusReasonSchema, triggerEventsBatchSchema, workflowExecutionContextSchema, workflowExecutionEventSchema, workflowRunAggregatesQuerySchema, workflowRunAggregatesResponseSchema, workflowRunAttemptDtoSchema, workflowRunAttemptsResponseSchema, workflowRunDetailResponseSchema, workflowRunDtoSchema, workflowRunJobDetailDtoSchema, workflowRunJobDisplayStatusCountDtoSchema, workflowRunJobExecutionDetailDtoSchema, workflowRunJobStatusCountDtoSchema, workflowRunJobSummaryDtoSchema, workflowRunListItemSchema, workflowRunListQuerySchema, workflowRunListResponseSchema, workflowRunRerunModeSchema, workflowRunResponseSchema, workflowRunStatusSchema, workflowRunStepDetailDtoSchema } from '#schemas/index.js';
2
2
  export { stepSourceLocationSchema } from '#schemas/step.js';
3
3
  export { WORKFLOW_RUN_JOB_PREVIEW_LIMIT, workflowRunTriggerReferenceSchema, workflowSourceSnapshotSchema } from '#schemas/workflow-run.js';
4
- export { jobTerminalStatusSchema, listenerFilterOutputTypesSchema, terminalStatusSchema, WORKFLOWS_JOB_ACTIVATED, WORKFLOWS_JOB_EVENT_DELIVERED, WORKFLOWS_JOB_EXECUTION_TIMED_OUT, WORKFLOWS_JOB_STEPS_SETTLED, WORKFLOWS_JOB_TERMINATED, WORKFLOWS_STEP_ATTEMPT_TERMINATED, WORKFLOWS_STEP_RESTART_ENQUEUED, WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED, WORKFLOWS_WORKFLOW_RUN_CANCELLED, WORKFLOWS_WORKFLOW_RUN_TERMINATED, workflowRunTerminalStatusSchema, workflowsEventSchemas, workflowsJobActivatedSchema, workflowsJobEventDeliveredSchema, workflowsJobExecutionTimedOutSchema, workflowsJobStepsSettledSchema, workflowsJobTerminatedSchema, workflowsStepAttemptTerminatedSchema, workflowsStepRestartEnqueuedSchema, workflowsWorkflowRunAttemptCreatedSchema, workflowsWorkflowRunCancelledSchema, workflowsWorkflowRunTerminatedSchema } from './events.js';
4
+ export { jobTerminalStatusSchema, listenerFilterOutputTypesSchema, terminalStatusSchema, WORKFLOWS_JOB_ACTIVATED, WORKFLOWS_JOB_EVENT_DELIVERED, WORKFLOWS_JOB_EXECUTION_QUEUED, WORKFLOWS_JOB_EXECUTION_TERMINATED, WORKFLOWS_JOB_STEPS_SETTLED, WORKFLOWS_JOB_TERMINATED, WORKFLOWS_STEP_ATTEMPT_TERMINATED, WORKFLOWS_STEP_RESTART_ENQUEUED, WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED, WORKFLOWS_WORKFLOW_RUN_CANCELLED, WORKFLOWS_WORKFLOW_RUN_TERMINATED, workflowRunTerminalStatusSchema, workflowsEventSchemas, workflowsJobActivatedSchema, workflowsJobEventDeliveredSchema, workflowsJobExecutionQueuedSchema, workflowsJobExecutionTerminatedSchema, workflowsJobStepsSettledSchema, workflowsJobTerminatedSchema, workflowsStepAttemptTerminatedSchema, workflowsStepRestartEnqueuedSchema, workflowsWorkflowRunAttemptCreatedSchema, workflowsWorkflowRunCancelledSchema, workflowsWorkflowRunTerminatedSchema } from './events.js';
5
5
  export { assertWorkingDirectory, InvalidWorkingDirectoryError } from './working-directory.js';
6
6
 
7
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n type AgentConfigIssueDto,\n type AgentRuntimeConfigQueryDto,\n agentConfigIssueSchema,\n agentRuntimeConfigQuerySchema,\n type CheckoutIntentDto,\n type CheckoutResultDto,\n type CheckoutTokenAuthDto,\n type CheckoutTokenParamsDto,\n type CheckoutTokenQueryDto,\n type CheckoutTokenResponseDto,\n checkoutIntentSchema,\n checkoutResultSchema,\n checkoutTokenAuthSchema,\n checkoutTokenParamsSchema,\n checkoutTokenQuerySchema,\n checkoutTokenResponseSchema,\n type EvaluationTraceDto,\n type EvaluationTraceEntryDto,\n evaluationTraceEntrySchema,\n evaluationTraceSchema,\n type JobDto,\n type JobExecutionDto,\n type JobListeningDto,\n type JobModeDto,\n type JobStatusDto,\n type JobStatusReasonDto,\n jobDtoSchema,\n jobExecutionStatusSchema,\n jobListeningBatchSchema,\n jobListeningSchema,\n jobModeSchema,\n jobStatusReasonSchema,\n jobStatusSchema,\n type ListenerStatusDto,\n type ListeningTriggerDto,\n type LogOutcomeDto,\n listenerStatusSchema,\n listeningTriggerSchema,\n logOutcomeSchema,\n type NextStepResponseDto,\n nextStepResponseSchema,\n type ReportStepBodyDto,\n type ReportStepResponseDto,\n type RerunWorkflowRunBodyDto,\n type ResolutionReasonDto,\n reportStepBodySchema,\n reportStepResponseSchema,\n rerunWorkflowRunBodySchema,\n resolutionReasonSchema,\n STEP_ERROR_MESSAGE_MAX_LENGTH,\n STEP_RESPONSE_MAX_LENGTH,\n STEP_STATUS_REASONS,\n type StepAttemptDetailDto,\n type StepAttemptDetailResponseDto,\n type StepAttemptDto,\n type StepDto,\n type StepErrorCategoryDto,\n type StepErrorDto,\n type StepErrorReasonDto,\n type StepGateResultDto,\n type StepStatusReasonDto,\n stepAttemptDetailDtoSchema,\n stepAttemptDetailResponseSchema,\n stepAttemptDtoSchema,\n stepDtoSchema,\n stepErrorCategorySchema,\n stepErrorDtoSchema,\n stepErrorReasonSchema,\n stepGateResultDtoSchema,\n stepStatusReasonSchema,\n type TriggerEventsBatchDto,\n triggerEventsBatchSchema,\n type WorkflowExecutionContextDto,\n type WorkflowExecutionEventDto,\n type WorkflowRunAggregatesQueryDto,\n type WorkflowRunAggregatesResponseDto,\n type WorkflowRunAttemptDto,\n type WorkflowRunAttemptsResponseDto,\n type WorkflowRunDetailResponseDto,\n type WorkflowRunDto,\n type WorkflowRunJobDetailDto,\n type WorkflowRunJobExecutionDetailDto,\n type WorkflowRunListQueryDto,\n type WorkflowRunListResponseDto,\n type WorkflowRunRerunModeDto,\n type WorkflowRunResponseDto,\n type WorkflowRunStatusDto,\n type WorkflowRunStepDetailDto,\n workflowExecutionContextSchema,\n workflowExecutionEventSchema,\n workflowRunAggregatesQuerySchema,\n workflowRunAggregatesResponseSchema,\n workflowRunAttemptDtoSchema,\n workflowRunAttemptsResponseSchema,\n workflowRunDetailResponseSchema,\n workflowRunDtoSchema,\n workflowRunJobDetailDtoSchema,\n workflowRunJobDisplayStatusCountDtoSchema,\n workflowRunJobExecutionDetailDtoSchema,\n workflowRunJobStatusCountDtoSchema,\n workflowRunJobSummaryDtoSchema,\n workflowRunListItemSchema,\n workflowRunListQuerySchema,\n workflowRunListResponseSchema,\n workflowRunRerunModeSchema,\n workflowRunResponseSchema,\n workflowRunStatusSchema,\n workflowRunStepDetailDtoSchema,\n} from '#schemas/index.js';\nexport {type StepSourceLocationDto, stepSourceLocationSchema} from '#schemas/step.js';\nexport {\n WORKFLOW_RUN_JOB_PREVIEW_LIMIT,\n type WorkflowRunJobDisplayStatusCountDto,\n type WorkflowRunJobStatusCountDto,\n type WorkflowRunJobSummaryDto,\n type WorkflowRunListItemDto,\n type WorkflowRunTriggerReferenceDto,\n type WorkflowSourceSnapshotDto,\n workflowRunTriggerReferenceSchema,\n workflowSourceSnapshotSchema,\n} from '#schemas/workflow-run.js';\nexport {\n jobTerminalStatusSchema,\n type ListenerFilterExpressionType,\n type ListenerFilterOutputTypes,\n listenerFilterOutputTypesSchema,\n terminalStatusSchema,\n WORKFLOWS_JOB_ACTIVATED,\n WORKFLOWS_JOB_EVENT_DELIVERED,\n WORKFLOWS_JOB_EXECUTION_TIMED_OUT,\n WORKFLOWS_JOB_STEPS_SETTLED,\n WORKFLOWS_JOB_TERMINATED,\n WORKFLOWS_STEP_ATTEMPT_TERMINATED,\n WORKFLOWS_STEP_RESTART_ENQUEUED,\n WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED,\n WORKFLOWS_WORKFLOW_RUN_CANCELLED,\n WORKFLOWS_WORKFLOW_RUN_TERMINATED,\n type WorkflowsEventMapDto,\n type WorkflowsJobActivatedEventDto,\n type WorkflowsJobEventDeliveredEventDto,\n type WorkflowsJobExecutionTimedOutEventDto,\n type WorkflowsJobStepsSettledEventDto,\n type WorkflowsJobTerminatedEventDto,\n type WorkflowsStepAttemptTerminatedEventDto,\n type WorkflowsStepRestartEnqueuedEventDto,\n type WorkflowsWorkflowRunAttemptCreatedEventDto,\n type WorkflowsWorkflowRunCancelledEventDto,\n type WorkflowsWorkflowRunTerminatedEventDto,\n workflowRunTerminalStatusSchema,\n workflowsEventSchemas,\n workflowsJobActivatedSchema,\n workflowsJobEventDeliveredSchema,\n workflowsJobExecutionTimedOutSchema,\n workflowsJobStepsSettledSchema,\n workflowsJobTerminatedSchema,\n workflowsStepAttemptTerminatedSchema,\n workflowsStepRestartEnqueuedSchema,\n workflowsWorkflowRunAttemptCreatedSchema,\n workflowsWorkflowRunCancelledSchema,\n workflowsWorkflowRunTerminatedSchema,\n} from './events.js';\nexport {assertWorkingDirectory, InvalidWorkingDirectoryError} from './working-directory.js';\n"],"names":["agentConfigIssueSchema","agentRuntimeConfigQuerySchema","checkoutIntentSchema","checkoutResultSchema","checkoutTokenAuthSchema","checkoutTokenParamsSchema","checkoutTokenQuerySchema","checkoutTokenResponseSchema","evaluationTraceEntrySchema","evaluationTraceSchema","jobDtoSchema","jobExecutionStatusSchema","jobListeningBatchSchema","jobListeningSchema","jobModeSchema","jobStatusReasonSchema","jobStatusSchema","listenerStatusSchema","listeningTriggerSchema","logOutcomeSchema","nextStepResponseSchema","reportStepBodySchema","reportStepResponseSchema","rerunWorkflowRunBodySchema","resolutionReasonSchema","STEP_ERROR_MESSAGE_MAX_LENGTH","STEP_RESPONSE_MAX_LENGTH","STEP_STATUS_REASONS","stepAttemptDetailDtoSchema","stepAttemptDetailResponseSchema","stepAttemptDtoSchema","stepDtoSchema","stepErrorCategorySchema","stepErrorDtoSchema","stepErrorReasonSchema","stepGateResultDtoSchema","stepStatusReasonSchema","triggerEventsBatchSchema","workflowExecutionContextSchema","workflowExecutionEventSchema","workflowRunAggregatesQuerySchema","workflowRunAggregatesResponseSchema","workflowRunAttemptDtoSchema","workflowRunAttemptsResponseSchema","workflowRunDetailResponseSchema","workflowRunDtoSchema","workflowRunJobDetailDtoSchema","workflowRunJobDisplayStatusCountDtoSchema","workflowRunJobExecutionDetailDtoSchema","workflowRunJobStatusCountDtoSchema","workflowRunJobSummaryDtoSchema","workflowRunListItemSchema","workflowRunListQuerySchema","workflowRunListResponseSchema","workflowRunRerunModeSchema","workflowRunResponseSchema","workflowRunStatusSchema","workflowRunStepDetailDtoSchema","stepSourceLocationSchema","WORKFLOW_RUN_JOB_PREVIEW_LIMIT","workflowRunTriggerReferenceSchema","workflowSourceSnapshotSchema","jobTerminalStatusSchema","listenerFilterOutputTypesSchema","terminalStatusSchema","WORKFLOWS_JOB_ACTIVATED","WORKFLOWS_JOB_EVENT_DELIVERED","WORKFLOWS_JOB_EXECUTION_TIMED_OUT","WORKFLOWS_JOB_STEPS_SETTLED","WORKFLOWS_JOB_TERMINATED","WORKFLOWS_STEP_ATTEMPT_TERMINATED","WORKFLOWS_STEP_RESTART_ENQUEUED","WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED","WORKFLOWS_WORKFLOW_RUN_CANCELLED","WORKFLOWS_WORKFLOW_RUN_TERMINATED","workflowRunTerminalStatusSchema","workflowsEventSchemas","workflowsJobActivatedSchema","workflowsJobEventDeliveredSchema","workflowsJobExecutionTimedOutSchema","workflowsJobStepsSettledSchema","workflowsJobTerminatedSchema","workflowsStepAttemptTerminatedSchema","workflowsStepRestartEnqueuedSchema","workflowsWorkflowRunAttemptCreatedSchema","workflowsWorkflowRunCancelledSchema","workflowsWorkflowRunTerminatedSchema","assertWorkingDirectory","InvalidWorkingDirectoryError"],"mappings":"AAAA,SAGEA,sBAAsB,EACtBC,6BAA6B,EAO7BC,oBAAoB,EACpBC,oBAAoB,EACpBC,uBAAuB,EACvBC,yBAAyB,EACzBC,wBAAwB,EACxBC,2BAA2B,EAG3BC,0BAA0B,EAC1BC,qBAAqB,EAOrBC,YAAY,EACZC,wBAAwB,EACxBC,uBAAuB,EACvBC,kBAAkB,EAClBC,aAAa,EACbC,qBAAqB,EACrBC,eAAe,EAIfC,oBAAoB,EACpBC,sBAAsB,EACtBC,gBAAgB,EAEhBC,sBAAsB,EAKtBC,oBAAoB,EACpBC,wBAAwB,EACxBC,0BAA0B,EAC1BC,sBAAsB,EACtBC,6BAA6B,EAC7BC,wBAAwB,EACxBC,mBAAmB,EAUnBC,0BAA0B,EAC1BC,+BAA+B,EAC/BC,oBAAoB,EACpBC,aAAa,EACbC,uBAAuB,EACvBC,kBAAkB,EAClBC,qBAAqB,EACrBC,uBAAuB,EACvBC,sBAAsB,EAEtBC,wBAAwB,EAiBxBC,8BAA8B,EAC9BC,4BAA4B,EAC5BC,gCAAgC,EAChCC,mCAAmC,EACnCC,2BAA2B,EAC3BC,iCAAiC,EACjCC,+BAA+B,EAC/BC,oBAAoB,EACpBC,6BAA6B,EAC7BC,yCAAyC,EACzCC,sCAAsC,EACtCC,kCAAkC,EAClCC,8BAA8B,EAC9BC,yBAAyB,EACzBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,0BAA0B,EAC1BC,yBAAyB,EACzBC,uBAAuB,EACvBC,8BAA8B,QACzB,oBAAoB;AAC3B,SAAoCC,wBAAwB,QAAO,mBAAmB;AACtF,SACEC,8BAA8B,EAO9BC,iCAAiC,EACjCC,4BAA4B,QACvB,2BAA2B;AAClC,SACEC,uBAAuB,EAGvBC,+BAA+B,EAC/BC,oBAAoB,EACpBC,uBAAuB,EACvBC,6BAA6B,EAC7BC,iCAAiC,EACjCC,2BAA2B,EAC3BC,wBAAwB,EACxBC,iCAAiC,EACjCC,+BAA+B,EAC/BC,sCAAsC,EACtCC,gCAAgC,EAChCC,iCAAiC,EAYjCC,+BAA+B,EAC/BC,qBAAqB,EACrBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,mCAAmC,EACnCC,8BAA8B,EAC9BC,4BAA4B,EAC5BC,oCAAoC,EACpCC,kCAAkC,EAClCC,wCAAwC,EACxCC,mCAAmC,EACnCC,oCAAoC,QAC/B,cAAc;AACrB,SAAQC,sBAAsB,EAAEC,4BAA4B,QAAO,yBAAyB"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n type AgentConfigIssueDto,\n type AgentRuntimeConfigQueryDto,\n agentConfigIssueSchema,\n agentRuntimeConfigQuerySchema,\n type CheckoutIntentDto,\n type CheckoutResultDto,\n type CheckoutTokenAuthDto,\n type CheckoutTokenParamsDto,\n type CheckoutTokenQueryDto,\n type CheckoutTokenResponseDto,\n checkoutIntentSchema,\n checkoutResultSchema,\n checkoutTokenAuthSchema,\n checkoutTokenParamsSchema,\n checkoutTokenQuerySchema,\n checkoutTokenResponseSchema,\n type EvaluationTraceDto,\n type EvaluationTraceEntryDto,\n evaluationTraceEntrySchema,\n evaluationTraceSchema,\n type JobDto,\n type JobExecutionDto,\n type JobListeningDto,\n type JobModeDto,\n type JobStatusDto,\n type JobStatusReasonDto,\n jobDtoSchema,\n jobExecutionStatusSchema,\n jobListeningBatchSchema,\n jobListeningSchema,\n jobModeSchema,\n jobStatusReasonSchema,\n jobStatusSchema,\n type ListenerStatusDto,\n type ListeningTriggerDto,\n type LogOutcomeDto,\n listenerStatusSchema,\n listeningTriggerSchema,\n logOutcomeSchema,\n type NextStepResponseDto,\n nextStepResponseSchema,\n type ReportStepBodyDto,\n type ReportStepResponseDto,\n type RerunWorkflowRunBodyDto,\n type ResolutionReasonDto,\n reportStepBodySchema,\n reportStepResponseSchema,\n rerunWorkflowRunBodySchema,\n resolutionReasonSchema,\n STEP_ERROR_MESSAGE_MAX_LENGTH,\n STEP_RESPONSE_MAX_LENGTH,\n STEP_STATUS_REASONS,\n type StepAttemptDetailDto,\n type StepAttemptDetailResponseDto,\n type StepAttemptDto,\n type StepDto,\n type StepErrorCategoryDto,\n type StepErrorDto,\n type StepErrorReasonDto,\n type StepGateResultDto,\n type StepStatusReasonDto,\n stepAttemptDetailDtoSchema,\n stepAttemptDetailResponseSchema,\n stepAttemptDtoSchema,\n stepDtoSchema,\n stepErrorCategorySchema,\n stepErrorDtoSchema,\n stepErrorReasonSchema,\n stepGateResultDtoSchema,\n stepStatusReasonSchema,\n type TriggerEventsBatchDto,\n triggerEventsBatchSchema,\n type WorkflowExecutionContextDto,\n type WorkflowExecutionEventDto,\n type WorkflowRunAggregatesQueryDto,\n type WorkflowRunAggregatesResponseDto,\n type WorkflowRunAttemptDto,\n type WorkflowRunAttemptsResponseDto,\n type WorkflowRunDetailResponseDto,\n type WorkflowRunDto,\n type WorkflowRunJobDetailDto,\n type WorkflowRunJobExecutionDetailDto,\n type WorkflowRunListQueryDto,\n type WorkflowRunListResponseDto,\n type WorkflowRunRerunModeDto,\n type WorkflowRunResponseDto,\n type WorkflowRunStatusDto,\n type WorkflowRunStepDetailDto,\n workflowExecutionContextSchema,\n workflowExecutionEventSchema,\n workflowRunAggregatesQuerySchema,\n workflowRunAggregatesResponseSchema,\n workflowRunAttemptDtoSchema,\n workflowRunAttemptsResponseSchema,\n workflowRunDetailResponseSchema,\n workflowRunDtoSchema,\n workflowRunJobDetailDtoSchema,\n workflowRunJobDisplayStatusCountDtoSchema,\n workflowRunJobExecutionDetailDtoSchema,\n workflowRunJobStatusCountDtoSchema,\n workflowRunJobSummaryDtoSchema,\n workflowRunListItemSchema,\n workflowRunListQuerySchema,\n workflowRunListResponseSchema,\n workflowRunRerunModeSchema,\n workflowRunResponseSchema,\n workflowRunStatusSchema,\n workflowRunStepDetailDtoSchema,\n} from '#schemas/index.js';\nexport {type StepSourceLocationDto, stepSourceLocationSchema} from '#schemas/step.js';\nexport {\n WORKFLOW_RUN_JOB_PREVIEW_LIMIT,\n type WorkflowRunJobDisplayStatusCountDto,\n type WorkflowRunJobStatusCountDto,\n type WorkflowRunJobSummaryDto,\n type WorkflowRunListItemDto,\n type WorkflowRunTriggerReferenceDto,\n type WorkflowSourceSnapshotDto,\n workflowRunTriggerReferenceSchema,\n workflowSourceSnapshotSchema,\n} from '#schemas/workflow-run.js';\nexport {\n jobTerminalStatusSchema,\n type ListenerFilterExpressionType,\n type ListenerFilterOutputTypes,\n listenerFilterOutputTypesSchema,\n terminalStatusSchema,\n WORKFLOWS_JOB_ACTIVATED,\n WORKFLOWS_JOB_EVENT_DELIVERED,\n WORKFLOWS_JOB_EXECUTION_QUEUED,\n WORKFLOWS_JOB_EXECUTION_TERMINATED,\n WORKFLOWS_JOB_STEPS_SETTLED,\n WORKFLOWS_JOB_TERMINATED,\n WORKFLOWS_STEP_ATTEMPT_TERMINATED,\n WORKFLOWS_STEP_RESTART_ENQUEUED,\n WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED,\n WORKFLOWS_WORKFLOW_RUN_CANCELLED,\n WORKFLOWS_WORKFLOW_RUN_TERMINATED,\n type WorkflowsEventMapDto,\n type WorkflowsJobActivatedEventDto,\n type WorkflowsJobEventDeliveredEventDto,\n type WorkflowsJobExecutionQueuedEventDto,\n type WorkflowsJobExecutionTerminatedEventDto,\n type WorkflowsJobStepsSettledEventDto,\n type WorkflowsJobTerminatedEventDto,\n type WorkflowsStepAttemptTerminatedEventDto,\n type WorkflowsStepRestartEnqueuedEventDto,\n type WorkflowsWorkflowRunAttemptCreatedEventDto,\n type WorkflowsWorkflowRunCancelledEventDto,\n type WorkflowsWorkflowRunTerminatedEventDto,\n workflowRunTerminalStatusSchema,\n workflowsEventSchemas,\n workflowsJobActivatedSchema,\n workflowsJobEventDeliveredSchema,\n workflowsJobExecutionQueuedSchema,\n workflowsJobExecutionTerminatedSchema,\n workflowsJobStepsSettledSchema,\n workflowsJobTerminatedSchema,\n workflowsStepAttemptTerminatedSchema,\n workflowsStepRestartEnqueuedSchema,\n workflowsWorkflowRunAttemptCreatedSchema,\n workflowsWorkflowRunCancelledSchema,\n workflowsWorkflowRunTerminatedSchema,\n} from './events.js';\nexport {assertWorkingDirectory, InvalidWorkingDirectoryError} from './working-directory.js';\n"],"names":["agentConfigIssueSchema","agentRuntimeConfigQuerySchema","checkoutIntentSchema","checkoutResultSchema","checkoutTokenAuthSchema","checkoutTokenParamsSchema","checkoutTokenQuerySchema","checkoutTokenResponseSchema","evaluationTraceEntrySchema","evaluationTraceSchema","jobDtoSchema","jobExecutionStatusSchema","jobListeningBatchSchema","jobListeningSchema","jobModeSchema","jobStatusReasonSchema","jobStatusSchema","listenerStatusSchema","listeningTriggerSchema","logOutcomeSchema","nextStepResponseSchema","reportStepBodySchema","reportStepResponseSchema","rerunWorkflowRunBodySchema","resolutionReasonSchema","STEP_ERROR_MESSAGE_MAX_LENGTH","STEP_RESPONSE_MAX_LENGTH","STEP_STATUS_REASONS","stepAttemptDetailDtoSchema","stepAttemptDetailResponseSchema","stepAttemptDtoSchema","stepDtoSchema","stepErrorCategorySchema","stepErrorDtoSchema","stepErrorReasonSchema","stepGateResultDtoSchema","stepStatusReasonSchema","triggerEventsBatchSchema","workflowExecutionContextSchema","workflowExecutionEventSchema","workflowRunAggregatesQuerySchema","workflowRunAggregatesResponseSchema","workflowRunAttemptDtoSchema","workflowRunAttemptsResponseSchema","workflowRunDetailResponseSchema","workflowRunDtoSchema","workflowRunJobDetailDtoSchema","workflowRunJobDisplayStatusCountDtoSchema","workflowRunJobExecutionDetailDtoSchema","workflowRunJobStatusCountDtoSchema","workflowRunJobSummaryDtoSchema","workflowRunListItemSchema","workflowRunListQuerySchema","workflowRunListResponseSchema","workflowRunRerunModeSchema","workflowRunResponseSchema","workflowRunStatusSchema","workflowRunStepDetailDtoSchema","stepSourceLocationSchema","WORKFLOW_RUN_JOB_PREVIEW_LIMIT","workflowRunTriggerReferenceSchema","workflowSourceSnapshotSchema","jobTerminalStatusSchema","listenerFilterOutputTypesSchema","terminalStatusSchema","WORKFLOWS_JOB_ACTIVATED","WORKFLOWS_JOB_EVENT_DELIVERED","WORKFLOWS_JOB_EXECUTION_QUEUED","WORKFLOWS_JOB_EXECUTION_TERMINATED","WORKFLOWS_JOB_STEPS_SETTLED","WORKFLOWS_JOB_TERMINATED","WORKFLOWS_STEP_ATTEMPT_TERMINATED","WORKFLOWS_STEP_RESTART_ENQUEUED","WORKFLOWS_WORKFLOW_RUN_ATTEMPT_CREATED","WORKFLOWS_WORKFLOW_RUN_CANCELLED","WORKFLOWS_WORKFLOW_RUN_TERMINATED","workflowRunTerminalStatusSchema","workflowsEventSchemas","workflowsJobActivatedSchema","workflowsJobEventDeliveredSchema","workflowsJobExecutionQueuedSchema","workflowsJobExecutionTerminatedSchema","workflowsJobStepsSettledSchema","workflowsJobTerminatedSchema","workflowsStepAttemptTerminatedSchema","workflowsStepRestartEnqueuedSchema","workflowsWorkflowRunAttemptCreatedSchema","workflowsWorkflowRunCancelledSchema","workflowsWorkflowRunTerminatedSchema","assertWorkingDirectory","InvalidWorkingDirectoryError"],"mappings":"AAAA,SAGEA,sBAAsB,EACtBC,6BAA6B,EAO7BC,oBAAoB,EACpBC,oBAAoB,EACpBC,uBAAuB,EACvBC,yBAAyB,EACzBC,wBAAwB,EACxBC,2BAA2B,EAG3BC,0BAA0B,EAC1BC,qBAAqB,EAOrBC,YAAY,EACZC,wBAAwB,EACxBC,uBAAuB,EACvBC,kBAAkB,EAClBC,aAAa,EACbC,qBAAqB,EACrBC,eAAe,EAIfC,oBAAoB,EACpBC,sBAAsB,EACtBC,gBAAgB,EAEhBC,sBAAsB,EAKtBC,oBAAoB,EACpBC,wBAAwB,EACxBC,0BAA0B,EAC1BC,sBAAsB,EACtBC,6BAA6B,EAC7BC,wBAAwB,EACxBC,mBAAmB,EAUnBC,0BAA0B,EAC1BC,+BAA+B,EAC/BC,oBAAoB,EACpBC,aAAa,EACbC,uBAAuB,EACvBC,kBAAkB,EAClBC,qBAAqB,EACrBC,uBAAuB,EACvBC,sBAAsB,EAEtBC,wBAAwB,EAiBxBC,8BAA8B,EAC9BC,4BAA4B,EAC5BC,gCAAgC,EAChCC,mCAAmC,EACnCC,2BAA2B,EAC3BC,iCAAiC,EACjCC,+BAA+B,EAC/BC,oBAAoB,EACpBC,6BAA6B,EAC7BC,yCAAyC,EACzCC,sCAAsC,EACtCC,kCAAkC,EAClCC,8BAA8B,EAC9BC,yBAAyB,EACzBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,0BAA0B,EAC1BC,yBAAyB,EACzBC,uBAAuB,EACvBC,8BAA8B,QACzB,oBAAoB;AAC3B,SAAoCC,wBAAwB,QAAO,mBAAmB;AACtF,SACEC,8BAA8B,EAO9BC,iCAAiC,EACjCC,4BAA4B,QACvB,2BAA2B;AAClC,SACEC,uBAAuB,EAGvBC,+BAA+B,EAC/BC,oBAAoB,EACpBC,uBAAuB,EACvBC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,kCAAkC,EAClCC,2BAA2B,EAC3BC,wBAAwB,EACxBC,iCAAiC,EACjCC,+BAA+B,EAC/BC,sCAAsC,EACtCC,gCAAgC,EAChCC,iCAAiC,EAajCC,+BAA+B,EAC/BC,qBAAqB,EACrBC,2BAA2B,EAC3BC,gCAAgC,EAChCC,iCAAiC,EACjCC,qCAAqC,EACrCC,8BAA8B,EAC9BC,4BAA4B,EAC5BC,oCAAoC,EACpCC,kCAAkC,EAClCC,wCAAwC,EACxCC,mCAAmC,EACnCC,oCAAoC,QAC/B,cAAc;AACrB,SAAQC,sBAAsB,EAAEC,4BAA4B,QAAO,yBAAyB"}
@@ -1058,6 +1058,7 @@ export declare const workflowRunDetailResponseSchema: z.ZodObject<{
1058
1058
  }, z.core.$strip>>;
1059
1059
  }, z.core.$strip>>;
1060
1060
  }, z.core.$strip>>;
1061
+ has_started_job_execution: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1061
1062
  }, z.core.$strip>;
1062
1063
  export type WorkflowRunDetailResponseDto = z.infer<typeof workflowRunDetailResponseSchema>;
1063
1064
  //# sourceMappingURL=workflow-run-detail.d.ts.map
@@ -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;AAWtB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;iBAM1C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE3F,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEjD,CAAC;AAEH,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAExC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAIpF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW1C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
@@ -49,7 +49,14 @@ export const workflowRunJobDetailDtoSchema = jobDtoSchema.extend({
49
49
  // jobs, each job's steps, and each step's attempt history.
50
50
  export const workflowRunDetailResponseSchema = workflowRunResponseSchema.extend({
51
51
  run_attempt: workflowRunAttemptDtoSchema,
52
- jobs: z.array(workflowRunJobDetailDtoSchema)
52
+ jobs: z.array(workflowRunJobDetailDtoSchema),
53
+ /**
54
+ * Whether any job execution of this attempt reached its runner. Redundant with the executions
55
+ * below, and deliberately so: the server decides it once for both this response and the run
56
+ * list, which is what keeps the two surfaces from reaching different answers.
57
+ *
58
+ * Defaults to started for the same rollout reason as the list item's copy.
59
+ */ has_started_job_execution: z.boolean().optional().default(true)
53
60
  });
54
61
 
55
62
  //# sourceMappingURL=workflow-run-detail.js.map
@@ -1 +1 @@
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 {\n jobExecutionStatusSchema,\n workflowRunAttemptDtoSchema,\n workflowRunResponseSchema,\n} from './workflow-run.js';\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 status_reason_message: z.string().nullable().optional(),\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","jobExecutionStatusSchema","workflowRunAttemptDtoSchema","workflowRunResponseSchema","jobExecutionDtoSchema","object","id","string","uuid","job_id","sequence","number","int","positive","name","status","status_reason","nullable","status_reason_message","optional","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,0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C7BqB,aAAavC,qBAAqBwC,KAAK,CAACD,WAAW;IACnDE,UAAU9C,EAAE2B,KAAK,CAACtB;AACpB,GAAG;AAIH,OAAO,MAAM0C,kCAAkC/C,EAAEW,MAAM,CAAC;IACtDqC,SAAShD,EAAEa,MAAM,GAAGC,IAAI;IACxBmC,SAAS7C,2BAA2ByC,KAAK,CAACI,OAAO;IACjDC,iBAAiBlD,EAAE+B,MAAM,CAAC/B,EAAEa,MAAM,IAAIb,EAAEgC,OAAO,IAAIT,QAAQ;IAC3D4B,QAAQ/C,2BAA2ByC,KAAK,CAACM,MAAM;IAC/ClB,kBAAkB7B,2BAA2ByC,KAAK,CAACZ,gBAAgB;AACrE,GAAG;AAIH,OAAO,MAAMmB,yCAAyC1C,sBAAsB+B,MAAM,CAAC;IACjFY,OAAOrD,EAAE2B,KAAK,CAACa;AACjB,GAAG;AAMH,OAAO,MAAMc,gCAAgCpD,aAAauC,MAAM,CAAC;IAC/Dc,gBAAgBvD,EAAE2B,KAAK,CAACyB;AAC1B,GAAG;AAIH,kFAAkF;AAClF,2DAA2D;AAC3D,OAAO,MAAMI,kCAAkC/C,0BAA0BgC,MAAM,CAAC;IAC9EgB,aAAajD;IACbkD,MAAM1D,EAAE2B,KAAK,CAAC2B;AAChB,GAAG"}
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 {\n jobExecutionStatusSchema,\n workflowRunAttemptDtoSchema,\n workflowRunResponseSchema,\n} from './workflow-run.js';\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 status_reason_message: z.string().nullable().optional(),\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 * Whether any job execution of this attempt reached its runner. Redundant with the executions\n * below, and deliberately so: the server decides it once for both this response and the run\n * list, which is what keeps the two surfaces from reaching different answers.\n *\n * Defaults to started for the same rollout reason as the list item's copy.\n */\n has_started_job_execution: z.boolean().optional().default(true),\n});\n\nexport type WorkflowRunDetailResponseDto = z.infer<typeof workflowRunDetailResponseSchema>;\n"],"names":["z","evaluationTraceSchema","jobDtoSchema","workflowExecutionEventSchema","stepAttemptDetailDtoSchema","stepAttemptDtoSchema","stepDtoSchema","jobExecutionStatusSchema","workflowRunAttemptDtoSchema","workflowRunResponseSchema","jobExecutionDtoSchema","object","id","string","uuid","job_id","sequence","number","int","positive","name","status","status_reason","nullable","status_reason_message","optional","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","has_started_job_execution","boolean"],"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,SACEC,wBAAwB,EACxBC,2BAA2B,EAC3BC,yBAAyB,QACpB,oBAAoB;AAE3B,OAAO,MAAMC,wBAAwBV,EAAEW,MAAM,CAAC;IAC5CC,IAAIZ,EAAEa,MAAM,GAAGC,IAAI;IACnBC,QAAQf,EAAEa,MAAM,GAAGC,IAAI;IACvBE,UAAUhB,EAAEiB,MAAM,GA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M,IAAIb,EAAEgC,OAAO,IAAIT,QAAQ;IAC3D4B,QAAQ/C,2BAA2ByC,KAAK,CAACM,MAAM;IAC/ClB,kBAAkB7B,2BAA2ByC,KAAK,CAACZ,gBAAgB;AACrE,GAAG;AAIH,OAAO,MAAMmB,yCAAyC1C,sBAAsB+B,MAAM,CAAC;IACjFY,OAAOrD,EAAE2B,KAAK,CAACa;AACjB,GAAG;AAMH,OAAO,MAAMc,gCAAgCpD,aAAauC,MAAM,CAAC;IAC/Dc,gBAAgBvD,EAAE2B,KAAK,CAACyB;AAC1B,GAAG;AAIH,kFAAkF;AAClF,2DAA2D;AAC3D,OAAO,MAAMI,kCAAkC/C,0BAA0BgC,MAAM,CAAC;IAC9EgB,aAAajD;IACbkD,MAAM1D,EAAE2B,KAAK,CAAC2B;IACd;;;;;;GAMC,GACDK,2BAA2B3D,EAAE4D,OAAO,GAAGnC,QAAQ,GAAGI,OAAO,CAAC;AAC5D,GAAG"}
@@ -339,6 +339,7 @@ export declare const workflowRunListItemSchema: z.ZodObject<{
339
339
  }>, z.ZodLiteral<"listening">]>;
340
340
  count: z.ZodNumber;
341
341
  }, z.core.$strip>>>;
342
+ has_started_job_execution: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
342
343
  }, z.core.$strip>;
343
344
  export type WorkflowRunListItemDto = z.input<typeof workflowRunListItemSchema>;
344
345
  export declare const workflowRunListResponseSchema: z.ZodObject<{
@@ -429,6 +430,7 @@ export declare const workflowRunListResponseSchema: z.ZodObject<{
429
430
  }>, z.ZodLiteral<"listening">]>;
430
431
  count: z.ZodNumber;
431
432
  }, z.core.$strip>>>;
433
+ has_started_job_execution: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
432
434
  }, z.core.$strip>>;
433
435
  next_cursor: z.ZodNullable<z.ZodString>;
434
436
  filtered_total_count: z.ZodNullable<z.ZodNumber>;
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../src/schemas/workflow-run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;;;;;iBAGpD,CAAC;AAEH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBpC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE/E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIxC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAOvF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;iBAM9C,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
@@ -149,7 +149,14 @@ export const workflowRunListItemSchema = workflowRunResponseSchema.extend({
149
149
  /**
150
150
  * Display-state counts over every job of the attempt, including those past the preview.
151
151
  * Optional so a new web client can consume an older API response during rollout.
152
- */ job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional()
152
+ */ job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional(),
153
+ /**
154
+ * Whether any job execution in the attempt reached its runner. A `cancelled` job does not say
155
+ * this on its own, so the counts above cannot answer it.
156
+ *
157
+ * Defaults to started, so an older API response during a rollout keeps the reading a run had
158
+ * before this field existed rather than claiming work that ran never began.
159
+ */ has_started_job_execution: z.boolean().optional().default(true)
153
160
  });
154
161
  export const workflowRunListResponseSchema = z.object({
155
162
  runs: z.array(workflowRunListItemSchema),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/workflow-run.ts"],"sourcesContent":["import {z} from 'zod';\nimport {jobStatusSchema} from './job.js';\nimport {jobModeSchema, listenerStatusSchema} from './job-listening.js';\n\nexport const workflowRunStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport type WorkflowRunStatusDto = z.infer<typeof workflowRunStatusSchema>;\n\nexport const jobExecutionStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport const workflowRunRerunModeSchema = z.enum(['all', 'failed']);\n\nexport type WorkflowRunRerunModeDto = z.infer<typeof workflowRunRerunModeSchema>;\n\nexport const rerunWorkflowRunBodySchema = z.object({\n mode: workflowRunRerunModeSchema,\n});\n\nexport type RerunWorkflowRunBodyDto = z.infer<typeof rerunWorkflowRunBodySchema>;\n\nconst isoDateTimeSchema = z.string().datetime();\nconst runListQueryBaseSchema = z.object({\n project_id: z.string().uuid(),\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n status: workflowRunStatusSchema.optional(),\n definition_id: z.string().uuid().optional(),\n trigger_source: z.string().optional(),\n created_from: isoDateTimeSchema.optional(),\n created_to: isoDateTimeSchema.optional(),\n});\n\nfunction validateDateWindow(\n value: {created_from?: string | undefined; created_to?: string | undefined},\n ctx: z.RefinementCtx,\n) {\n if (!value.created_from || !value.created_to) return;\n const from = new Date(value.created_from);\n const to = new Date(value.created_to);\n if (from > to) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'created_from must be before or equal to created_to',\n path: ['created_from'],\n });\n return;\n }\n\n const maxWindowMs = 365 * 24 * 60 * 60 * 1000;\n if (to.getTime() - from.getTime() > maxWindowMs) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'created date window must be 365 days or less',\n path: ['created_to'],\n });\n }\n}\n\nexport const workflowRunListQuerySchema = runListQueryBaseSchema.superRefine(validateDateWindow);\n\nexport type WorkflowRunListQueryDto = z.infer<typeof workflowRunListQuerySchema>;\n\nexport const workflowRunAggregatesQuerySchema = runListQueryBaseSchema\n .omit({limit: true, cursor: true})\n .superRefine(validateDateWindow);\n\nexport type WorkflowRunAggregatesQueryDto = z.infer<typeof workflowRunAggregatesQuerySchema>;\n\nexport const workflowSourceSnapshotSchema = z.object({\n content: z.string(),\n format: z.literal('yaml'),\n});\n\nexport type WorkflowSourceSnapshotDto = z.infer<typeof workflowSourceSnapshotSchema>;\n\n// Provider-neutral trigger facts captured at run creation. Every field is nullable because\n// only source-control triggers resolve one at all, and a given payload may name a ref\n// without naming an actor.\nexport const workflowRunTriggerReferenceSchema = z.object({\n repository: z.string().nullable(),\n ref: z.string().nullable(),\n commit: z.string().nullable(),\n actor: z.string().nullable(),\n});\n\nexport type WorkflowRunTriggerReferenceDto = z.infer<typeof workflowRunTriggerReferenceSchema>;\n\nexport const workflowRunDtoSchema = z.object({\n id: z.string().uuid(),\n project_id: z.string().uuid(),\n definition_id: z.string().uuid(),\n number: z.number().int().positive(),\n name: z.string(),\n workflow_name: z.string(),\n status: workflowRunStatusSchema,\n current_attempt: z.number().int().positive(),\n latest_attempt: z.number().int().positive(),\n trigger_provider: z.string().nullable(),\n trigger_source: z.string(),\n trigger_event: z.string(),\n trigger_payload: z.record(z.string(), z.unknown()),\n trigger_reference: workflowRunTriggerReferenceSchema.nullable(),\n inputs: z.record(z.string(), z.unknown()).nullable(),\n source_snapshot: workflowSourceSnapshotSchema.nullable(),\n created_at: z.string(),\n updated_at: z.string(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n});\n\nexport type WorkflowRunDto = z.infer<typeof workflowRunDtoSchema>;\n\nexport const workflowRunAttemptDtoSchema = z.object({\n id: z.string().uuid(),\n workflow_run_id: z.string().uuid(),\n attempt: z.number().int().positive(),\n status: workflowRunStatusSchema,\n created_at: z.string(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n rerun_mode: workflowRunRerunModeSchema.nullable(),\n});\n\nexport type WorkflowRunAttemptDto = z.infer<typeof workflowRunAttemptDtoSchema>;\n\nexport const workflowRunResponseSchema = workflowRunDtoSchema;\n\nexport type WorkflowRunResponseDto = z.infer<typeof workflowRunResponseSchema>;\n\nexport const workflowRunAttemptsResponseSchema = z.object({\n attempts: z.array(workflowRunAttemptDtoSchema),\n});\n\nexport type WorkflowRunAttemptsResponseDto = z.infer<typeof workflowRunAttemptsResponseSchema>;\n\n// The run list renders a status glyph per job so a failing run can be read without being\n// opened. Runtime state comes from the selected execution rather than the job verdict, while\n// mode and listener status let the client apply the same display rule as run detail. These\n// fields default to the pre-display-state contract so a web client can roll out before or\n// alongside an API deployment without rejecting an older response.\nexport const workflowRunJobSummaryDtoSchema = z.object({\n id: z.string().uuid(),\n key: z.string(),\n name: z.string().nullable(),\n status: jobStatusSchema,\n mode: jobModeSchema.optional().default('one_shot'),\n listener_status: listenerStatusSchema.optional().default('inactive'),\n execution_status: jobExecutionStatusSchema.nullable().optional().default(null),\n position: z.number().int().nonnegative(),\n});\n\nexport type WorkflowRunJobSummaryDto = z.input<typeof workflowRunJobSummaryDtoSchema>;\n\n/**\n * How many jobs a run list row carries in graph order.\n *\n * A workflow has no job limit, and the list is polled while runs are active, so the row\n * cannot carry every job of every run on the page. This bound is the API's, deliberately set\n * above what any current surface draws: a client is free to show fewer without a server\n * change, and `job_status_counts` still describes the jobs beyond it.\n */\nexport const WORKFLOW_RUN_JOB_PREVIEW_LIMIT = 16;\n\n/** The persisted job verdict and how many of the run's jobs carry it, counted over all of them. */\nexport const workflowRunJobStatusCountDtoSchema = z.object({\n status: jobStatusSchema,\n count: z.number().int().positive(),\n});\n\nexport type WorkflowRunJobStatusCountDto = z.infer<typeof workflowRunJobStatusCountDtoSchema>;\n\n/** One display status and how many of the run's jobs render it, counted over all of them. */\nexport const workflowRunJobDisplayStatusCountDtoSchema = z.object({\n status: jobStatusSchema.or(z.literal('listening')),\n count: z.number().int().positive(),\n});\n\nexport type WorkflowRunJobDisplayStatusCountDto = z.infer<\n typeof workflowRunJobDisplayStatusCountDtoSchema\n>;\n\nexport const workflowRunListItemSchema = workflowRunResponseSchema.extend({\n /** Up to `WORKFLOW_RUN_JOB_PREVIEW_LIMIT` jobs in graph order, not the whole set. */\n jobs: z.array(workflowRunJobSummaryDtoSchema).max(WORKFLOW_RUN_JOB_PREVIEW_LIMIT),\n /** Persisted verdict counts, kept stable so older web clients can consume new responses. */\n job_status_counts: z.array(workflowRunJobStatusCountDtoSchema),\n /**\n * Display-state counts over every job of the attempt, including those past the preview.\n * Optional so a new web client can consume an older API response during rollout.\n */\n job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional(),\n});\n\nexport type WorkflowRunListItemDto = z.input<typeof workflowRunListItemSchema>;\n\nexport const workflowRunListResponseSchema = z.object({\n runs: z.array(workflowRunListItemSchema),\n next_cursor: z.string().nullable(),\n filtered_total_count: z.number().int().nonnegative().nullable(),\n});\n\nexport type WorkflowRunListResponseDto = z.input<typeof workflowRunListResponseSchema>;\n\nconst aggregateBucketSchema = z.object({\n value: z.string(),\n count: z.number().int().nonnegative(),\n});\n\nexport const workflowRunAggregatesResponseSchema = z.object({\n status: z.array(\n z.object({value: workflowRunStatusSchema, count: z.number().int().nonnegative()}),\n ),\n trigger_source: z.array(aggregateBucketSchema),\n workflow: z.array(aggregateBucketSchema),\n});\n\nexport type WorkflowRunAggregatesResponseDto = z.infer<typeof workflowRunAggregatesResponseSchema>;\n"],"names":["z","jobStatusSchema","jobModeSchema","listenerStatusSchema","workflowRunStatusSchema","enum","jobExecutionStatusSchema","workflowRunRerunModeSchema","rerunWorkflowRunBodySchema","object","mode","isoDateTimeSchema","string","datetime","runListQueryBaseSchema","project_id","uuid","limit","coerce","number","int","min","max","default","cursor","optional","status","definition_id","trigger_source","created_from","created_to","validateDateWindow","value","ctx","from","Date","to","addIssue","code","ZodIssueCode","custom","message","path","maxWindowMs","getTime","workflowRunListQuerySchema","superRefine","workflowRunAggregatesQuerySchema","omit","workflowSourceSnapshotSchema","content","format","literal","workflowRunTriggerReferenceSchema","repository","nullable","ref","commit","actor","workflowRunDtoSchema","id","positive","name","workflow_name","current_attempt","latest_attempt","trigger_provider","trigger_event","trigger_payload","record","unknown","trigger_reference","inputs","source_snapshot","created_at","updated_at","started_at","finished_at","workflowRunAttemptDtoSchema","workflow_run_id","attempt","rerun_mode","workflowRunResponseSchema","workflowRunAttemptsResponseSchema","attempts","array","workflowRunJobSummaryDtoSchema","key","listener_status","execution_status","position","nonnegative","WORKFLOW_RUN_JOB_PREVIEW_LIMIT","workflowRunJobStatusCountDtoSchema","count","workflowRunJobDisplayStatusCountDtoSchema","or","workflowRunListItemSchema","extend","jobs","job_status_counts","job_display_status_counts","workflowRunListResponseSchema","runs","next_cursor","filtered_total_count","aggregateBucketSchema","workflowRunAggregatesResponseSchema","workflow"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,eAAe,QAAO,WAAW;AACzC,SAAQC,aAAa,EAAEC,oBAAoB,QAAO,qBAAqB;AAEvE,OAAO,MAAMC,0BAA0BJ,EAAEK,IAAI,CAAC;IAC5C;IACA;IACA;IACA;IACA;CACD,EAAE;AAIH,OAAO,MAAMC,2BAA2BN,EAAEK,IAAI,CAAC;IAC7C;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH,OAAO,MAAME,6BAA6BP,EAAEK,IAAI,CAAC;IAAC;IAAO;CAAS,EAAE;AAIpE,OAAO,MAAMG,6BAA6BR,EAAES,MAAM,CAAC;IACjDC,MAAMH;AACR,GAAG;AAIH,MAAMI,oBAAoBX,EAAEY,MAAM,GAAGC,QAAQ;AAC7C,MAAMC,yBAAyBd,EAAES,MAAM,CAAC;IACtCM,YAAYf,EAAEY,MAAM,GAAGI,IAAI;IAC3BC,OAAOjB,EAAEkB,MAAM,CAACC,MAAM,GAAGC,GAAG,GAAGC,GAAG,CAAC,GAAGC,GAAG,CAAC,KAAKC,OAAO,CAAC;IACvDC,QAAQx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EAAEoD,OAAO,CAAC;IACrC0C,OAAO9F,EAAEmB,MAAM,GAAGC,GAAG,GAAGyC,QAAQ;AAClC,GAAG;AAMH,OAAO,MAAMoC,4BAA4Bf,0BAA0BgB,MAAM,CAAC;IACxE,mFAAmF,GACnFC,MAAMnG,EAAEqF,KAAK,CAACC,gCAAgChE,GAAG,CAACsE;IAClD,0FAA0F,GAC1FQ,mBAAmBpG,EAAEqF,KAAK,CAACQ;IAC3B;;;GAGC,GACDQ,2BAA2BrG,EAAEqF,KAAK,CAACU,2CAA2CtE,QAAQ;AACxF,GAAG;AAIH,OAAO,MAAM6E,gCAAgCtG,EAAES,MAAM,CAAC;IACpD8F,MAAMvG,EAAEqF,KAAK,CAACY;IACdO,aAAaxG,EAAEY,MAAM,GAAG2C,QAAQ;IAChCkD,sBAAsBzG,EAAEmB,MAAM,GAAGC,GAAG,GAAGuE,WAAW,GAAGpC,QAAQ;AAC/D,GAAG;AAIH,MAAMmD,wBAAwB1G,EAAES,MAAM,CAAC;IACrCuB,OAAOhC,EAAEY,MAAM;IACfkF,OAAO9F,EAAEmB,MAAM,GAAGC,GAAG,GAAGuE,WAAW;AACrC;AAEA,OAAO,MAAMgB,sCAAsC3G,EAAES,MAAM,CAAC;IAC1DiB,QAAQ1B,EAAEqF,KAAK,CACbrF,EAAES,MAAM,CAAC;QAACuB,OAAO5B;QAAyB0F,OAAO9F,EAAEmB,MAAM,GAAGC,GAAG,GAAGuE,WAAW;IAAE;IAEjF/D,gBAAgB5B,EAAEqF,KAAK,CAACqB;IACxBE,UAAU5G,EAAEqF,KAAK,CAACqB;AACpB,GAAG"}
1
+ {"version":3,"sources":["../../src/schemas/workflow-run.ts"],"sourcesContent":["import {z} from 'zod';\nimport {jobStatusSchema} from './job.js';\nimport {jobModeSchema, listenerStatusSchema} from './job-listening.js';\n\nexport const workflowRunStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport type WorkflowRunStatusDto = z.infer<typeof workflowRunStatusSchema>;\n\nexport const jobExecutionStatusSchema = z.enum([\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n]);\n\nexport const workflowRunRerunModeSchema = z.enum(['all', 'failed']);\n\nexport type WorkflowRunRerunModeDto = z.infer<typeof workflowRunRerunModeSchema>;\n\nexport const rerunWorkflowRunBodySchema = z.object({\n mode: workflowRunRerunModeSchema,\n});\n\nexport type RerunWorkflowRunBodyDto = z.infer<typeof rerunWorkflowRunBodySchema>;\n\nconst isoDateTimeSchema = z.string().datetime();\nconst runListQueryBaseSchema = z.object({\n project_id: z.string().uuid(),\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n status: workflowRunStatusSchema.optional(),\n definition_id: z.string().uuid().optional(),\n trigger_source: z.string().optional(),\n created_from: isoDateTimeSchema.optional(),\n created_to: isoDateTimeSchema.optional(),\n});\n\nfunction validateDateWindow(\n value: {created_from?: string | undefined; created_to?: string | undefined},\n ctx: z.RefinementCtx,\n) {\n if (!value.created_from || !value.created_to) return;\n const from = new Date(value.created_from);\n const to = new Date(value.created_to);\n if (from > to) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'created_from must be before or equal to created_to',\n path: ['created_from'],\n });\n return;\n }\n\n const maxWindowMs = 365 * 24 * 60 * 60 * 1000;\n if (to.getTime() - from.getTime() > maxWindowMs) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'created date window must be 365 days or less',\n path: ['created_to'],\n });\n }\n}\n\nexport const workflowRunListQuerySchema = runListQueryBaseSchema.superRefine(validateDateWindow);\n\nexport type WorkflowRunListQueryDto = z.infer<typeof workflowRunListQuerySchema>;\n\nexport const workflowRunAggregatesQuerySchema = runListQueryBaseSchema\n .omit({limit: true, cursor: true})\n .superRefine(validateDateWindow);\n\nexport type WorkflowRunAggregatesQueryDto = z.infer<typeof workflowRunAggregatesQuerySchema>;\n\nexport const workflowSourceSnapshotSchema = z.object({\n content: z.string(),\n format: z.literal('yaml'),\n});\n\nexport type WorkflowSourceSnapshotDto = z.infer<typeof workflowSourceSnapshotSchema>;\n\n// Provider-neutral trigger facts captured at run creation. Every field is nullable because\n// only source-control triggers resolve one at all, and a given payload may name a ref\n// without naming an actor.\nexport const workflowRunTriggerReferenceSchema = z.object({\n repository: z.string().nullable(),\n ref: z.string().nullable(),\n commit: z.string().nullable(),\n actor: z.string().nullable(),\n});\n\nexport type WorkflowRunTriggerReferenceDto = z.infer<typeof workflowRunTriggerReferenceSchema>;\n\nexport const workflowRunDtoSchema = z.object({\n id: z.string().uuid(),\n project_id: z.string().uuid(),\n definition_id: z.string().uuid(),\n number: z.number().int().positive(),\n name: z.string(),\n workflow_name: z.string(),\n status: workflowRunStatusSchema,\n current_attempt: z.number().int().positive(),\n latest_attempt: z.number().int().positive(),\n trigger_provider: z.string().nullable(),\n trigger_source: z.string(),\n trigger_event: z.string(),\n trigger_payload: z.record(z.string(), z.unknown()),\n trigger_reference: workflowRunTriggerReferenceSchema.nullable(),\n inputs: z.record(z.string(), z.unknown()).nullable(),\n source_snapshot: workflowSourceSnapshotSchema.nullable(),\n created_at: z.string(),\n updated_at: z.string(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n});\n\nexport type WorkflowRunDto = z.infer<typeof workflowRunDtoSchema>;\n\nexport const workflowRunAttemptDtoSchema = z.object({\n id: z.string().uuid(),\n workflow_run_id: z.string().uuid(),\n attempt: z.number().int().positive(),\n status: workflowRunStatusSchema,\n created_at: z.string(),\n started_at: z.string().nullable(),\n finished_at: z.string().nullable(),\n rerun_mode: workflowRunRerunModeSchema.nullable(),\n});\n\nexport type WorkflowRunAttemptDto = z.infer<typeof workflowRunAttemptDtoSchema>;\n\nexport const workflowRunResponseSchema = workflowRunDtoSchema;\n\nexport type WorkflowRunResponseDto = z.infer<typeof workflowRunResponseSchema>;\n\nexport const workflowRunAttemptsResponseSchema = z.object({\n attempts: z.array(workflowRunAttemptDtoSchema),\n});\n\nexport type WorkflowRunAttemptsResponseDto = z.infer<typeof workflowRunAttemptsResponseSchema>;\n\n// The run list renders a status glyph per job so a failing run can be read without being\n// opened. Runtime state comes from the selected execution rather than the job verdict, while\n// mode and listener status let the client apply the same display rule as run detail. These\n// fields default to the pre-display-state contract so a web client can roll out before or\n// alongside an API deployment without rejecting an older response.\nexport const workflowRunJobSummaryDtoSchema = z.object({\n id: z.string().uuid(),\n key: z.string(),\n name: z.string().nullable(),\n status: jobStatusSchema,\n mode: jobModeSchema.optional().default('one_shot'),\n listener_status: listenerStatusSchema.optional().default('inactive'),\n execution_status: jobExecutionStatusSchema.nullable().optional().default(null),\n position: z.number().int().nonnegative(),\n});\n\nexport type WorkflowRunJobSummaryDto = z.input<typeof workflowRunJobSummaryDtoSchema>;\n\n/**\n * How many jobs a run list row carries in graph order.\n *\n * A workflow has no job limit, and the list is polled while runs are active, so the row\n * cannot carry every job of every run on the page. This bound is the API's, deliberately set\n * above what any current surface draws: a client is free to show fewer without a server\n * change, and `job_status_counts` still describes the jobs beyond it.\n */\nexport const WORKFLOW_RUN_JOB_PREVIEW_LIMIT = 16;\n\n/** The persisted job verdict and how many of the run's jobs carry it, counted over all of them. */\nexport const workflowRunJobStatusCountDtoSchema = z.object({\n status: jobStatusSchema,\n count: z.number().int().positive(),\n});\n\nexport type WorkflowRunJobStatusCountDto = z.infer<typeof workflowRunJobStatusCountDtoSchema>;\n\n/** One display status and how many of the run's jobs render it, counted over all of them. */\nexport const workflowRunJobDisplayStatusCountDtoSchema = z.object({\n status: jobStatusSchema.or(z.literal('listening')),\n count: z.number().int().positive(),\n});\n\nexport type WorkflowRunJobDisplayStatusCountDto = z.infer<\n typeof workflowRunJobDisplayStatusCountDtoSchema\n>;\n\nexport const workflowRunListItemSchema = workflowRunResponseSchema.extend({\n /** Up to `WORKFLOW_RUN_JOB_PREVIEW_LIMIT` jobs in graph order, not the whole set. */\n jobs: z.array(workflowRunJobSummaryDtoSchema).max(WORKFLOW_RUN_JOB_PREVIEW_LIMIT),\n /** Persisted verdict counts, kept stable so older web clients can consume new responses. */\n job_status_counts: z.array(workflowRunJobStatusCountDtoSchema),\n /**\n * Display-state counts over every job of the attempt, including those past the preview.\n * Optional so a new web client can consume an older API response during rollout.\n */\n job_display_status_counts: z.array(workflowRunJobDisplayStatusCountDtoSchema).optional(),\n /**\n * Whether any job execution in the attempt reached its runner. A `cancelled` job does not say\n * this on its own, so the counts above cannot answer it.\n *\n * Defaults to started, so an older API response during a rollout keeps the reading a run had\n * before this field existed rather than claiming work that ran never began.\n */\n has_started_job_execution: z.boolean().optional().default(true),\n});\n\nexport type WorkflowRunListItemDto = z.input<typeof workflowRunListItemSchema>;\n\nexport const workflowRunListResponseSchema = z.object({\n runs: z.array(workflowRunListItemSchema),\n next_cursor: z.string().nullable(),\n filtered_total_count: z.number().int().nonnegative().nullable(),\n});\n\nexport type WorkflowRunListResponseDto = z.input<typeof workflowRunListResponseSchema>;\n\nconst aggregateBucketSchema = z.object({\n value: z.string(),\n count: z.number().int().nonnegative(),\n});\n\nexport const workflowRunAggregatesResponseSchema = z.object({\n status: z.array(\n z.object({value: workflowRunStatusSchema, count: z.number().int().nonnegative()}),\n ),\n trigger_source: z.array(aggregateBucketSchema),\n workflow: z.array(aggregateBucketSchema),\n});\n\nexport type WorkflowRunAggregatesResponseDto = z.infer<typeof workflowRunAggregatesResponseSchema>;\n"],"names":["z","jobStatusSchema","jobModeSchema","listenerStatusSchema","workflowRunStatusSchema","enum","jobExecutionStatusSchema","workflowRunRerunModeSchema","rerunWorkflowRunBodySchema","object","mode","isoDateTimeSchema","string","datetime","runListQueryBaseSchema","project_id","uuid","limit","coerce","number","int","min","max","default","cursor","optional","status","definition_id","trigger_source","created_from","created_to","validateDateWindow","value","ctx","from","Date","to","addIssue","code","ZodIssueCode","custom","message","path","maxWindowMs","getTime","workflowRunListQuerySchema","superRefine","workflowRunAggregatesQuerySchema","omit","workflowSourceSnapshotSchema","content","format","literal","workflowRunTriggerReferenceSchema","repository","nullable","ref","commit","actor","workflowRunDtoSchema","id","positive","name","workflow_name","current_attempt","latest_attempt","trigger_provider","trigger_event","trigger_payload","record","unknown","trigger_reference","inputs","source_snapshot","created_at","updated_at","started_at","finished_at","workflowRunAttemptDtoSchema","workflow_run_id","attempt","rerun_mode","workflowRunResponseSchema","workflowRunAttemptsResponseSchema","attempts","array","workflowRunJobSummaryDtoSchema","key","listener_status","execution_status","position","nonnegative","WORKFLOW_RUN_JOB_PREVIEW_LIMIT","workflowRunJobStatusCountDtoSchema","count","workflowRunJobDisplayStatusCountDtoSchema","or","workflowRunListItemSchema","extend","jobs","job_status_counts","job_display_status_counts","has_started_job_execution","boolean","workflowRunListResponseSchema","runs","next_cursor","filtered_total_count","aggregateBucketSchema","workflowRunAggregatesResponseSchema","workflow"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,eAAe,QAAO,WAAW;AACzC,SAAQC,aAAa,EAAEC,oBAAoB,QAAO,qBAAqB;AAEvE,OAAO,MAAMC,0BAA0BJ,EAAEK,IAAI,CAAC;IAC5C;IACA;IACA;IACA;IACA;CACD,EAAE;AAIH,OAAO,MAAMC,2BAA2BN,EAAEK,IAAI,CAAC;IAC7C;IACA;IACA;IACA;IACA;CACD,EAAE;AAEH,OAAO,MAAME,6BAA6BP,EAAEK,IAAI,CAAC;IAAC;IAAO;CAAS,EAAE;AAIpE,OAAO,MAAMG,6BAA6BR,EAAES,MAAM,CAAC;IACjDC,MAAMH;AACR,GAAG;AAIH,MAAMI,oBAAoBX,EAAEY,MAAM,GAAGC,QAAQ;AAC7C,MAAMC,yBAAyBd,EAAES,MAAM,CAAC;IACtCM,YAAYf,EAAEY,MAAM,GAAGI,IAAI;IAC3BC,OAAOjB,EAAEkB,MAAM,CAACC,MAAM,GAAGC,GAAG,GAAGC,GAAG,CAAC,GAAGC,GAAG,CAAC,KAAKC,OAAO,CAAC;IACvDC,QAAQxB,EAAEY,MAAM,GAAGa,QAAQ;IAC3BC,QAAQtB,w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