@shipfox/expression 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +25 -12
  2. package/dist/expression/create-workflow-expression.d.ts.map +1 -1
  3. package/dist/expression/create-workflow-expression.js +17 -3
  4. package/dist/expression/create-workflow-expression.js.map +1 -1
  5. package/dist/index.d.ts +4 -3
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +3 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/plan/context-key-access.d.ts +2 -0
  10. package/dist/plan/context-key-access.d.ts.map +1 -1
  11. package/dist/plan/context-key-access.js +3 -0
  12. package/dist/plan/context-key-access.js.map +1 -1
  13. package/dist/plan/evaluate-planned-predicate.d.ts.map +1 -1
  14. package/dist/plan/evaluate-planned-predicate.js +2 -2
  15. package/dist/plan/evaluate-planned-predicate.js.map +1 -1
  16. package/dist/run/hoist-run-command.d.ts +8 -0
  17. package/dist/run/hoist-run-command.d.ts.map +1 -1
  18. package/dist/run/hoist-run-command.js +28 -3
  19. package/dist/run/hoist-run-command.js.map +1 -1
  20. package/dist/run/shell-code-position.d.ts +21 -0
  21. package/dist/run/shell-code-position.d.ts.map +1 -0
  22. package/dist/run/shell-code-position.js +623 -0
  23. package/dist/run/shell-code-position.js.map +1 -0
  24. package/dist/run/shell-quoting.d.ts +5 -1
  25. package/dist/run/shell-quoting.d.ts.map +1 -1
  26. package/dist/run/shell-quoting.js +37 -6
  27. package/dist/run/shell-quoting.js.map +1 -1
  28. package/dist/tsconfig.test.tsbuildinfo +1 -1
  29. package/dist/workflow-context/workflow-context-docs.d.ts +185 -0
  30. package/dist/workflow-context/workflow-context-docs.d.ts.map +1 -0
  31. package/dist/workflow-context/workflow-context-docs.js +168 -0
  32. package/dist/workflow-context/workflow-context-docs.js.map +1 -0
  33. package/dist/workflow-context/workflow-context.d.ts +99 -114
  34. package/dist/workflow-context/workflow-context.d.ts.map +1 -1
  35. package/dist/workflow-context/workflow-context.js +201 -85
  36. package/dist/workflow-context/workflow-context.js.map +1 -1
  37. package/package.json +2 -2
  38. package/dist/template/extract-cel-untrusted-path-accesses.d.ts +0 -5
  39. package/dist/template/extract-cel-untrusted-path-accesses.d.ts.map +0 -1
  40. package/dist/template/extract-cel-untrusted-path-accesses.js +0 -140
  41. package/dist/template/extract-cel-untrusted-path-accesses.js.map +0 -1
@@ -0,0 +1,185 @@
1
+ import type { WorkflowContextName } from './workflow-context.js';
2
+ /**
3
+ * Reader-facing descriptions for every context root and property.
4
+ *
5
+ * They live beside the type registry so a new field cannot ship undescribed:
6
+ * the documentation generator renders types from the registry and looks up each
7
+ * property here, and its check fails on a property with no description or a
8
+ * description for a property that no longer exists.
9
+ */
10
+ export interface WorkflowContextDoc {
11
+ readonly root: WorkflowContextName;
12
+ readonly summary: string;
13
+ /** Why an open-shape root has no property table. */
14
+ readonly shapeNote?: string;
15
+ /** Prefix shown in the property column, such as `needs[*].`. */
16
+ readonly propertyPrefix?: string;
17
+ /** Description per property path, relative to the root. */
18
+ readonly fields?: Readonly<Record<string, string>>;
19
+ /** Paths whose element shape another root already documents. */
20
+ readonly collapse?: readonly string[];
21
+ }
22
+ export declare const workflowContextDocs: readonly [{
23
+ readonly root: "workflow";
24
+ readonly summary: "The workflow definition this run came from.";
25
+ readonly fields: {
26
+ readonly id: "Identifier of the workflow definition.";
27
+ readonly name: "Workflow `name` from the definition.";
28
+ };
29
+ }, {
30
+ readonly root: "run";
31
+ readonly summary: "The current run.";
32
+ readonly fields: {
33
+ readonly id: "Identifier of the run.";
34
+ readonly number: "Sequential run number within the workflow definition.";
35
+ readonly name: "Resolved run name, or the workflow name when `run_name` is not set.";
36
+ readonly project_id: "Identifier of the project that owns the run.";
37
+ readonly workspace_id: "Identifier of the workspace that owns the run.";
38
+ readonly created_at: "Time the run was created.";
39
+ };
40
+ }, {
41
+ readonly root: "trigger";
42
+ readonly summary: "The trigger that started the run.";
43
+ readonly fields: {
44
+ readonly source: "Integration connection slug, or `manual` or `cron`.";
45
+ readonly event: "Shipfox event name that matched the trigger.";
46
+ readonly project: "Shipfox project resolved from the event repository. Null when there is none.";
47
+ readonly 'project.id': "Identifier of the resolved project.";
48
+ readonly repository: "Repository the event came from, as `owner/name`. Null when there is none.";
49
+ readonly ref: "Git ref the event carried. Null when there is none.";
50
+ readonly commit: "Commit SHA the event carried. Null when there is none.";
51
+ };
52
+ }, {
53
+ readonly root: "event";
54
+ readonly summary: "The raw payload of the event that started the run.";
55
+ readonly shapeNote: "The provider owns this payload, so it has no fixed shape. Each provider page under [Integrations](/integrations) lists the events Shipfox delivers and links the payload each one carries.";
56
+ }, {
57
+ readonly root: "inputs";
58
+ readonly summary: "Values the trigger `with` block passed into the run.";
59
+ readonly shapeNote: "The keys are the ones the trigger declares. See [trigger fields](/reference/workflow-schema#trigger-fields).";
60
+ }, {
61
+ readonly root: "job";
62
+ readonly summary: "The current job.";
63
+ readonly fields: {
64
+ readonly key: "Key of the job in the `jobs` map.";
65
+ readonly name: "Job `name`, or the job key when no name is set.";
66
+ };
67
+ }, {
68
+ readonly root: "executions";
69
+ readonly summary: "Every execution of the current job.";
70
+ readonly propertyPrefix: "executions[*].";
71
+ readonly fields: {
72
+ readonly index: "Position of the execution in its job, starting at zero.";
73
+ readonly name: "Resolved execution name, or the job name when `execution_name` is not set.";
74
+ readonly status: "Final status of the execution.";
75
+ readonly started_at: "Time the execution started.";
76
+ readonly finished_at: "Time the execution finished.";
77
+ readonly events: "Listener events in the batch that started this execution. Empty for a standard job.";
78
+ readonly 'events[*].source': "Integration connection slug that delivered the event.";
79
+ readonly 'events[*].event': "Shipfox event name.";
80
+ readonly 'events[*].delivery_id': "Identifier of the provider delivery.";
81
+ readonly 'events[*].received_at': "Time Shipfox received the event.";
82
+ readonly 'events[*].project': "Shipfox project resolved from the event repository. Null when there is none.";
83
+ readonly 'events[*].project.id': "Identifier of the resolved project.";
84
+ readonly 'events[*].repository': "Repository the event came from, as `owner/name`. Null when there is none.";
85
+ readonly 'events[*].ref': "Git ref the event carried. Null when there is none.";
86
+ readonly 'events[*].commit': "Commit SHA the event carried. Null when there is none.";
87
+ readonly 'events[*].data': "Raw event payload. The provider owns its shape.";
88
+ readonly outputs: "Outputs the execution produced, keyed by output name.";
89
+ };
90
+ }, {
91
+ readonly root: "execution";
92
+ readonly summary: "The current execution of the job.";
93
+ readonly fields: {
94
+ readonly failed: "Whether an earlier step in this execution failed.";
95
+ readonly index: "Position of the execution in its job, starting at zero.";
96
+ readonly name: "Resolved execution name, or the job name when `execution_name` is not set.";
97
+ readonly status: "Final status of the execution.";
98
+ readonly started_at: "Time the execution started.";
99
+ readonly finished_at: "Time the execution finished.";
100
+ readonly events: "Listener events in the batch that started this execution. Empty for a standard job.";
101
+ readonly 'events[*].source': "Integration connection slug that delivered the event.";
102
+ readonly 'events[*].event': "Shipfox event name.";
103
+ readonly 'events[*].delivery_id': "Identifier of the provider delivery.";
104
+ readonly 'events[*].received_at': "Time Shipfox received the event.";
105
+ readonly 'events[*].project': "Shipfox project resolved from the event repository. Null when there is none.";
106
+ readonly 'events[*].project.id': "Identifier of the resolved project.";
107
+ readonly 'events[*].repository': "Repository the event came from, as `owner/name`. Null when there is none.";
108
+ readonly 'events[*].ref': "Git ref the event carried. Null when there is none.";
109
+ readonly 'events[*].commit': "Commit SHA the event carried. Null when there is none.";
110
+ readonly 'events[*].data': "Raw event payload. The provider owns its shape.";
111
+ readonly outputs: "Outputs the execution produced, keyed by output name.";
112
+ };
113
+ }, {
114
+ readonly root: "jobs";
115
+ readonly summary: "Upstream jobs, keyed by job key.";
116
+ readonly shapeNote: "The keys are the job keys the workflow declares.";
117
+ readonly propertyPrefix: "jobs.<job_key>.";
118
+ readonly fields: {
119
+ readonly key: "Key of the job in the `jobs` map.";
120
+ readonly status: "Final status of the job.";
121
+ readonly outputs: "Declared job outputs, keyed by output name.";
122
+ readonly executions: "Executions of the job, each with the properties of the `execution` context. A standard job has one.";
123
+ };
124
+ readonly collapse: readonly ["executions"];
125
+ }, {
126
+ readonly root: "needs";
127
+ readonly summary: "The jobs this job declares in `needs`.";
128
+ readonly propertyPrefix: "needs[*].";
129
+ readonly fields: {
130
+ readonly key: "Key of the job in the `jobs` map.";
131
+ readonly status: "Final status of the job.";
132
+ readonly outputs: "Declared job outputs, keyed by output name.";
133
+ readonly executions: "Executions of the job, each with the properties of the `execution` context. A standard job has one.";
134
+ };
135
+ readonly collapse: readonly ["executions"];
136
+ }, {
137
+ readonly root: "steps";
138
+ readonly summary: "Earlier steps of the current job, keyed by step key.";
139
+ readonly shapeNote: "The keys are the step keys the workflow declares.";
140
+ readonly propertyPrefix: "steps.<step_key>.";
141
+ readonly fields: {
142
+ readonly status: "Final status of the step.";
143
+ readonly exit_code: "Exit code of the most recent finished attempt.";
144
+ readonly outputs: "Declared step outputs of the most recent finished attempt.";
145
+ readonly response: "Final agent response. Absent on a run step.";
146
+ readonly gate: "Gate result of the most recent finished attempt. Absent when the step has no gate.";
147
+ readonly 'gate.passed': "Whether the gate expression passed.";
148
+ readonly 'gate.source': "Gate expression that produced the result.";
149
+ readonly 'gate.reason': "Why Shipfox could not check the gate.";
150
+ readonly 'gate.exit_code': "Exit code the gate read.";
151
+ readonly attempts: "Every finished attempt of the step, oldest first.";
152
+ readonly 'attempts[*].status': "Final status of the attempt.";
153
+ readonly 'attempts[*].exit_code': "Exit code the attempt reported.";
154
+ readonly 'attempts[*].outputs': "Declared outputs the attempt reported.";
155
+ readonly 'attempts[*].response': "Final agent response of the attempt. Absent on a run step.";
156
+ readonly 'attempts[*].gate': "Gate result of the attempt. Absent when the step has no gate.";
157
+ readonly 'attempts[*].gate.passed': "Whether the gate expression passed.";
158
+ readonly 'attempts[*].gate.source': "Gate expression that produced the result.";
159
+ readonly 'attempts[*].gate.reason': "Why Shipfox could not check the gate.";
160
+ readonly 'attempts[*].gate.exit_code': "Exit code the gate read.";
161
+ };
162
+ }, {
163
+ readonly root: "step";
164
+ readonly summary: "The current step. Its properties depend on the field that reads it.";
165
+ readonly fields: {
166
+ readonly attempt: "Attempt number of the step, starting at one. Not readable in `gate.success`.";
167
+ readonly is_retry: "Whether this is a repeat attempt. Not readable in `gate.success`.";
168
+ readonly restart: "Set when a gate restarted this step. Not readable in `gate.success`.";
169
+ readonly 'restart.from': "The step whose gate restarted this attempt, with the properties of a `steps` entry. Not readable in `gate.success`.";
170
+ readonly 'restart.feedback': "Feedback the restarting gate produced. Not readable in `gate.success`.";
171
+ readonly exit_code: "Exit code the step reported. Readable in `gate.success` only.";
172
+ readonly status: "Status the step reported. Readable in `gate.success` only.";
173
+ readonly outputs: "Outputs the step reported. Readable in `gate.success` only.";
174
+ };
175
+ readonly collapse: readonly ["restart.from"];
176
+ }, {
177
+ readonly root: "vars";
178
+ readonly summary: "Workspace and project variables.";
179
+ readonly shapeNote: "The keys are the variable names the workspace defines. See [Secrets and variables](/reference/secrets-variables).";
180
+ }, {
181
+ readonly root: "secrets";
182
+ readonly summary: "Workspace and project secrets.";
183
+ readonly shapeNote: "The keys are the secret names the workspace defines. See [Secrets and variables](/reference/secrets-variables).";
184
+ }];
185
+ //# sourceMappingURL=workflow-context-docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-context-docs.d.ts","sourceRoot":"","sources":["../../src/workflow-context/workflow-context-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE/D;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAsDD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsHkB,CAAC"}
@@ -0,0 +1,168 @@
1
+ const executionFields = {
2
+ index: 'Position of the execution in its job, starting at zero.',
3
+ name: 'Resolved execution name, or the job name when `execution_name` is not set.',
4
+ status: 'Final status of the execution.',
5
+ started_at: 'Time the execution started.',
6
+ finished_at: 'Time the execution finished.',
7
+ events: 'Listener events in the batch that started this execution. Empty for a standard job.',
8
+ 'events[*].source': 'Integration connection slug that delivered the event.',
9
+ 'events[*].event': 'Shipfox event name.',
10
+ 'events[*].delivery_id': 'Identifier of the provider delivery.',
11
+ 'events[*].received_at': 'Time Shipfox received the event.',
12
+ 'events[*].project': 'Shipfox project resolved from the event repository. Null when there is none.',
13
+ 'events[*].project.id': 'Identifier of the resolved project.',
14
+ 'events[*].repository': 'Repository the event came from, as `owner/name`. Null when there is none.',
15
+ 'events[*].ref': 'Git ref the event carried. Null when there is none.',
16
+ 'events[*].commit': 'Commit SHA the event carried. Null when there is none.',
17
+ 'events[*].data': 'Raw event payload. The provider owns its shape.',
18
+ outputs: 'Outputs the execution produced, keyed by output name.'
19
+ };
20
+ const jobEntityFields = {
21
+ key: 'Key of the job in the `jobs` map.',
22
+ status: 'Final status of the job.',
23
+ outputs: 'Declared job outputs, keyed by output name.',
24
+ executions: 'Executions of the job, each with the properties of the `execution` context. A standard job has one.'
25
+ };
26
+ const stepEntityFields = {
27
+ status: 'Final status of the step.',
28
+ exit_code: 'Exit code of the most recent finished attempt.',
29
+ outputs: 'Declared step outputs of the most recent finished attempt.',
30
+ response: 'Final agent response. Absent on a run step.',
31
+ gate: 'Gate result of the most recent finished attempt. Absent when the step has no gate.',
32
+ 'gate.passed': 'Whether the gate expression passed.',
33
+ 'gate.source': 'Gate expression that produced the result.',
34
+ 'gate.reason': 'Why Shipfox could not check the gate.',
35
+ 'gate.exit_code': 'Exit code the gate read.',
36
+ attempts: 'Every finished attempt of the step, oldest first.',
37
+ 'attempts[*].status': 'Final status of the attempt.',
38
+ 'attempts[*].exit_code': 'Exit code the attempt reported.',
39
+ 'attempts[*].outputs': 'Declared outputs the attempt reported.',
40
+ 'attempts[*].response': 'Final agent response of the attempt. Absent on a run step.',
41
+ 'attempts[*].gate': 'Gate result of the attempt. Absent when the step has no gate.',
42
+ 'attempts[*].gate.passed': 'Whether the gate expression passed.',
43
+ 'attempts[*].gate.source': 'Gate expression that produced the result.',
44
+ 'attempts[*].gate.reason': 'Why Shipfox could not check the gate.',
45
+ 'attempts[*].gate.exit_code': 'Exit code the gate read.'
46
+ };
47
+ export const workflowContextDocs = [
48
+ {
49
+ root: 'workflow',
50
+ summary: 'The workflow definition this run came from.',
51
+ fields: {
52
+ id: 'Identifier of the workflow definition.',
53
+ name: 'Workflow `name` from the definition.'
54
+ }
55
+ },
56
+ {
57
+ root: 'run',
58
+ summary: 'The current run.',
59
+ fields: {
60
+ id: 'Identifier of the run.',
61
+ number: 'Sequential run number within the workflow definition.',
62
+ name: 'Resolved run name, or the workflow name when `run_name` is not set.',
63
+ project_id: 'Identifier of the project that owns the run.',
64
+ workspace_id: 'Identifier of the workspace that owns the run.',
65
+ created_at: 'Time the run was created.'
66
+ }
67
+ },
68
+ {
69
+ root: 'trigger',
70
+ summary: 'The trigger that started the run.',
71
+ fields: {
72
+ source: 'Integration connection slug, or `manual` or `cron`.',
73
+ event: 'Shipfox event name that matched the trigger.',
74
+ project: 'Shipfox project resolved from the event repository. Null when there is none.',
75
+ 'project.id': 'Identifier of the resolved project.',
76
+ repository: 'Repository the event came from, as `owner/name`. Null when there is none.',
77
+ ref: 'Git ref the event carried. Null when there is none.',
78
+ commit: 'Commit SHA the event carried. Null when there is none.'
79
+ }
80
+ },
81
+ {
82
+ root: 'event',
83
+ summary: 'The raw payload of the event that started the run.',
84
+ shapeNote: 'The provider owns this payload, so it has no fixed shape. Each provider page under [Integrations](/integrations) lists the events Shipfox delivers and links the payload each one carries.'
85
+ },
86
+ {
87
+ root: 'inputs',
88
+ summary: 'Values the trigger `with` block passed into the run.',
89
+ shapeNote: 'The keys are the ones the trigger declares. See [trigger fields](/reference/workflow-schema#trigger-fields).'
90
+ },
91
+ {
92
+ root: 'job',
93
+ summary: 'The current job.',
94
+ fields: {
95
+ key: 'Key of the job in the `jobs` map.',
96
+ name: 'Job `name`, or the job key when no name is set.'
97
+ }
98
+ },
99
+ {
100
+ root: 'executions',
101
+ summary: 'Every execution of the current job.',
102
+ propertyPrefix: 'executions[*].',
103
+ fields: executionFields
104
+ },
105
+ {
106
+ root: 'execution',
107
+ summary: 'The current execution of the job.',
108
+ fields: {
109
+ ...executionFields,
110
+ failed: 'Whether an earlier step in this execution failed.'
111
+ }
112
+ },
113
+ {
114
+ root: 'jobs',
115
+ summary: 'Upstream jobs, keyed by job key.',
116
+ shapeNote: 'The keys are the job keys the workflow declares.',
117
+ propertyPrefix: 'jobs.<job_key>.',
118
+ fields: jobEntityFields,
119
+ collapse: [
120
+ 'executions'
121
+ ]
122
+ },
123
+ {
124
+ root: 'needs',
125
+ summary: 'The jobs this job declares in `needs`.',
126
+ propertyPrefix: 'needs[*].',
127
+ fields: jobEntityFields,
128
+ collapse: [
129
+ 'executions'
130
+ ]
131
+ },
132
+ {
133
+ root: 'steps',
134
+ summary: 'Earlier steps of the current job, keyed by step key.',
135
+ shapeNote: 'The keys are the step keys the workflow declares.',
136
+ propertyPrefix: 'steps.<step_key>.',
137
+ fields: stepEntityFields
138
+ },
139
+ {
140
+ root: 'step',
141
+ summary: 'The current step. Its properties depend on the field that reads it.',
142
+ fields: {
143
+ attempt: 'Attempt number of the step, starting at one. Not readable in `gate.success`.',
144
+ is_retry: 'Whether this is a repeat attempt. Not readable in `gate.success`.',
145
+ restart: 'Set when a gate restarted this step. Not readable in `gate.success`.',
146
+ 'restart.from': 'The step whose gate restarted this attempt, with the properties of a `steps` entry. Not readable in `gate.success`.',
147
+ 'restart.feedback': 'Feedback the restarting gate produced. Not readable in `gate.success`.',
148
+ exit_code: 'Exit code the step reported. Readable in `gate.success` only.',
149
+ status: 'Status the step reported. Readable in `gate.success` only.',
150
+ outputs: 'Outputs the step reported. Readable in `gate.success` only.'
151
+ },
152
+ collapse: [
153
+ 'restart.from'
154
+ ]
155
+ },
156
+ {
157
+ root: 'vars',
158
+ summary: 'Workspace and project variables.',
159
+ shapeNote: 'The keys are the variable names the workspace defines. See [Secrets and variables](/reference/secrets-variables).'
160
+ },
161
+ {
162
+ root: 'secrets',
163
+ summary: 'Workspace and project secrets.',
164
+ shapeNote: 'The keys are the secret names the workspace defines. See [Secrets and variables](/reference/secrets-variables).'
165
+ }
166
+ ];
167
+
168
+ //# sourceMappingURL=workflow-context-docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/workflow-context/workflow-context-docs.ts"],"sourcesContent":["import type {WorkflowContextName} from './workflow-context.js';\n\n/**\n * Reader-facing descriptions for every context root and property.\n *\n * They live beside the type registry so a new field cannot ship undescribed:\n * the documentation generator renders types from the registry and looks up each\n * property here, and its check fails on a property with no description or a\n * description for a property that no longer exists.\n */\nexport interface WorkflowContextDoc {\n readonly root: WorkflowContextName;\n readonly summary: string;\n /** Why an open-shape root has no property table. */\n readonly shapeNote?: string;\n /** Prefix shown in the property column, such as `needs[*].`. */\n readonly propertyPrefix?: string;\n /** Description per property path, relative to the root. */\n readonly fields?: Readonly<Record<string, string>>;\n /** Paths whose element shape another root already documents. */\n readonly collapse?: readonly string[];\n}\n\nconst executionFields = {\n index: 'Position of the execution in its job, starting at zero.',\n name: 'Resolved execution name, or the job name when `execution_name` is not set.',\n status: 'Final status of the execution.',\n started_at: 'Time the execution started.',\n finished_at: 'Time the execution finished.',\n events: 'Listener events in the batch that started this execution. Empty for a standard job.',\n 'events[*].source': 'Integration connection slug that delivered the event.',\n 'events[*].event': 'Shipfox event name.',\n 'events[*].delivery_id': 'Identifier of the provider delivery.',\n 'events[*].received_at': 'Time Shipfox received the event.',\n 'events[*].project':\n 'Shipfox project resolved from the event repository. Null when there is none.',\n 'events[*].project.id': 'Identifier of the resolved project.',\n 'events[*].repository':\n 'Repository the event came from, as `owner/name`. Null when there is none.',\n 'events[*].ref': 'Git ref the event carried. Null when there is none.',\n 'events[*].commit': 'Commit SHA the event carried. Null when there is none.',\n 'events[*].data': 'Raw event payload. The provider owns its shape.',\n outputs: 'Outputs the execution produced, keyed by output name.',\n} as const;\n\nconst jobEntityFields = {\n key: 'Key of the job in the `jobs` map.',\n status: 'Final status of the job.',\n outputs: 'Declared job outputs, keyed by output name.',\n executions:\n 'Executions of the job, each with the properties of the `execution` context. A standard job has one.',\n} as const;\n\nconst stepEntityFields = {\n status: 'Final status of the step.',\n exit_code: 'Exit code of the most recent finished attempt.',\n outputs: 'Declared step outputs of the most recent finished attempt.',\n response: 'Final agent response. Absent on a run step.',\n gate: 'Gate result of the most recent finished attempt. Absent when the step has no gate.',\n 'gate.passed': 'Whether the gate expression passed.',\n 'gate.source': 'Gate expression that produced the result.',\n 'gate.reason': 'Why Shipfox could not check the gate.',\n 'gate.exit_code': 'Exit code the gate read.',\n attempts: 'Every finished attempt of the step, oldest first.',\n 'attempts[*].status': 'Final status of the attempt.',\n 'attempts[*].exit_code': 'Exit code the attempt reported.',\n 'attempts[*].outputs': 'Declared outputs the attempt reported.',\n 'attempts[*].response': 'Final agent response of the attempt. Absent on a run step.',\n 'attempts[*].gate': 'Gate result of the attempt. Absent when the step has no gate.',\n 'attempts[*].gate.passed': 'Whether the gate expression passed.',\n 'attempts[*].gate.source': 'Gate expression that produced the result.',\n 'attempts[*].gate.reason': 'Why Shipfox could not check the gate.',\n 'attempts[*].gate.exit_code': 'Exit code the gate read.',\n} as const;\n\nexport const workflowContextDocs = [\n {\n root: 'workflow',\n summary: 'The workflow definition this run came from.',\n fields: {\n id: 'Identifier of the workflow definition.',\n name: 'Workflow `name` from the definition.',\n },\n },\n {\n root: 'run',\n summary: 'The current run.',\n fields: {\n id: 'Identifier of the run.',\n number: 'Sequential run number within the workflow definition.',\n name: 'Resolved run name, or the workflow name when `run_name` is not set.',\n project_id: 'Identifier of the project that owns the run.',\n workspace_id: 'Identifier of the workspace that owns the run.',\n created_at: 'Time the run was created.',\n },\n },\n {\n root: 'trigger',\n summary: 'The trigger that started the run.',\n fields: {\n source: 'Integration connection slug, or `manual` or `cron`.',\n event: 'Shipfox event name that matched the trigger.',\n project: 'Shipfox project resolved from the event repository. Null when there is none.',\n 'project.id': 'Identifier of the resolved project.',\n repository: 'Repository the event came from, as `owner/name`. Null when there is none.',\n ref: 'Git ref the event carried. Null when there is none.',\n commit: 'Commit SHA the event carried. Null when there is none.',\n },\n },\n {\n root: 'event',\n summary: 'The raw payload of the event that started the run.',\n shapeNote:\n 'The provider owns this payload, so it has no fixed shape. Each provider page under [Integrations](/integrations) lists the events Shipfox delivers and links the payload each one carries.',\n },\n {\n root: 'inputs',\n summary: 'Values the trigger `with` block passed into the run.',\n shapeNote:\n 'The keys are the ones the trigger declares. See [trigger fields](/reference/workflow-schema#trigger-fields).',\n },\n {\n root: 'job',\n summary: 'The current job.',\n fields: {\n key: 'Key of the job in the `jobs` map.',\n name: 'Job `name`, or the job key when no name is set.',\n },\n },\n {\n root: 'executions',\n summary: 'Every execution of the current job.',\n propertyPrefix: 'executions[*].',\n fields: executionFields,\n },\n {\n root: 'execution',\n summary: 'The current execution of the job.',\n fields: {\n ...executionFields,\n failed: 'Whether an earlier step in this execution failed.',\n },\n },\n {\n root: 'jobs',\n summary: 'Upstream jobs, keyed by job key.',\n shapeNote: 'The keys are the job keys the workflow declares.',\n propertyPrefix: 'jobs.<job_key>.',\n fields: jobEntityFields,\n collapse: ['executions'],\n },\n {\n root: 'needs',\n summary: 'The jobs this job declares in `needs`.',\n propertyPrefix: 'needs[*].',\n fields: jobEntityFields,\n collapse: ['executions'],\n },\n {\n root: 'steps',\n summary: 'Earlier steps of the current job, keyed by step key.',\n shapeNote: 'The keys are the step keys the workflow declares.',\n propertyPrefix: 'steps.<step_key>.',\n fields: stepEntityFields,\n },\n {\n root: 'step',\n summary: 'The current step. Its properties depend on the field that reads it.',\n fields: {\n attempt: 'Attempt number of the step, starting at one. Not readable in `gate.success`.',\n is_retry: 'Whether this is a repeat attempt. Not readable in `gate.success`.',\n restart: 'Set when a gate restarted this step. Not readable in `gate.success`.',\n 'restart.from':\n 'The step whose gate restarted this attempt, with the properties of a `steps` entry. Not readable in `gate.success`.',\n 'restart.feedback': 'Feedback the restarting gate produced. Not readable in `gate.success`.',\n exit_code: 'Exit code the step reported. Readable in `gate.success` only.',\n status: 'Status the step reported. Readable in `gate.success` only.',\n outputs: 'Outputs the step reported. Readable in `gate.success` only.',\n },\n collapse: ['restart.from'],\n },\n {\n root: 'vars',\n summary: 'Workspace and project variables.',\n shapeNote:\n 'The keys are the variable names the workspace defines. See [Secrets and variables](/reference/secrets-variables).',\n },\n {\n root: 'secrets',\n summary: 'Workspace and project secrets.',\n shapeNote:\n 'The keys are the secret names the workspace defines. See [Secrets and variables](/reference/secrets-variables).',\n },\n] as const satisfies readonly WorkflowContextDoc[];\n"],"names":["executionFields","index","name","status","started_at","finished_at","events","outputs","jobEntityFields","key","executions","stepEntityFields","exit_code","response","gate","attempts","workflowContextDocs","root","summary","fields","id","number","project_id","workspace_id","created_at","source","event","project","repository","ref","commit","shapeNote","propertyPrefix","failed","collapse","attempt","is_retry","restart"],"mappings":"AAuBA,MAAMA,kBAAkB;IACtBC,OAAO;IACPC,MAAM;IACNC,QAAQ;IACRC,YAAY;IACZC,aAAa;IACbC,QAAQ;IACR,oBAAoB;IACpB,mBAAmB;IACnB,yBAAyB;IACzB,yBAAyB;IACzB,qBACE;IACF,wBAAwB;IACxB,wBACE;IACF,iBAAiB;IACjB,oBAAoB;IACpB,kBAAkB;IAClBC,SAAS;AACX;AAEA,MAAMC,kBAAkB;IACtBC,KAAK;IACLN,QAAQ;IACRI,SAAS;IACTG,YACE;AACJ;AAEA,MAAMC,mBAAmB;IACvBR,QAAQ;IACRS,WAAW;IACXL,SAAS;IACTM,UAAU;IACVC,MAAM;IACN,eAAe;IACf,eAAe;IACf,eAAe;IACf,kBAAkB;IAClBC,UAAU;IACV,sBAAsB;IACtB,yBAAyB;IACzB,uBAAuB;IACvB,wBAAwB;IACxB,oBAAoB;IACpB,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;IAC3B,8BAA8B;AAChC;AAEA,OAAO,MAAMC,sBAAsB;IACjC;QACEC,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNC,IAAI;YACJlB,MAAM;QACR;IACF;IACA;QACEe,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNC,IAAI;YACJC,QAAQ;YACRnB,MAAM;YACNoB,YAAY;YACZC,cAAc;YACdC,YAAY;QACd;IACF;IACA;QACEP,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNM,QAAQ;YACRC,OAAO;YACPC,SAAS;YACT,cAAc;YACdC,YAAY;YACZC,KAAK;YACLC,QAAQ;QACV;IACF;IACA;QACEb,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;IACA;QACEd,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;IACA;QACEd,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNV,KAAK;YACLP,MAAM;QACR;IACF;IACA;QACEe,MAAM;QACNC,SAAS;QACTc,gBAAgB;QAChBb,QAAQnB;IACV;IACA;QACEiB,MAAM;QACNC,SAAS;QACTC,QAAQ;YACN,GAAGnB,eAAe;YAClBiC,QAAQ;QACV;IACF;IACA;QACEhB,MAAM;QACNC,SAAS;QACTa,WAAW;QACXC,gBAAgB;QAChBb,QAAQX;QACR0B,UAAU;YAAC;SAAa;IAC1B;IACA;QACEjB,MAAM;QACNC,SAAS;QACTc,gBAAgB;QAChBb,QAAQX;QACR0B,UAAU;YAAC;SAAa;IAC1B;IACA;QACEjB,MAAM;QACNC,SAAS;QACTa,WAAW;QACXC,gBAAgB;QAChBb,QAAQR;IACV;IACA;QACEM,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNgB,SAAS;YACTC,UAAU;YACVC,SAAS;YACT,gBACE;YACF,oBAAoB;YACpBzB,WAAW;YACXT,QAAQ;YACRI,SAAS;QACX;QACA2B,UAAU;YAAC;SAAe;IAC5B;IACA;QACEjB,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;IACA;QACEd,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;CACD,CAAkD"}