@shipfox/expression 1.2.1 → 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.
- package/README.md +25 -12
- package/dist/expression/create-workflow-expression.d.ts.map +1 -1
- package/dist/expression/create-workflow-expression.js +5 -0
- package/dist/expression/create-workflow-expression.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/plan/context-key-access.d.ts +2 -0
- package/dist/plan/context-key-access.d.ts.map +1 -1
- package/dist/plan/context-key-access.js +3 -0
- package/dist/plan/context-key-access.js.map +1 -1
- package/dist/plan/evaluate-planned-predicate.d.ts.map +1 -1
- package/dist/plan/evaluate-planned-predicate.js +2 -2
- package/dist/plan/evaluate-planned-predicate.js.map +1 -1
- package/dist/run/hoist-run-command.d.ts +8 -0
- package/dist/run/hoist-run-command.d.ts.map +1 -1
- package/dist/run/hoist-run-command.js +28 -3
- package/dist/run/hoist-run-command.js.map +1 -1
- package/dist/run/shell-code-position.d.ts +21 -0
- package/dist/run/shell-code-position.d.ts.map +1 -0
- package/dist/run/shell-code-position.js +623 -0
- package/dist/run/shell-code-position.js.map +1 -0
- package/dist/run/shell-quoting.d.ts +5 -1
- package/dist/run/shell-quoting.d.ts.map +1 -1
- package/dist/run/shell-quoting.js +37 -6
- package/dist/run/shell-quoting.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/dist/workflow-context/workflow-context-docs.d.ts +185 -0
- package/dist/workflow-context/workflow-context-docs.d.ts.map +1 -0
- package/dist/workflow-context/workflow-context-docs.js +168 -0
- package/dist/workflow-context/workflow-context-docs.js.map +1 -0
- package/dist/workflow-context/workflow-context.d.ts +99 -114
- package/dist/workflow-context/workflow-context.d.ts.map +1 -1
- package/dist/workflow-context/workflow-context.js +201 -85
- package/dist/workflow-context/workflow-context.js.map +1 -1
- package/package.json +2 -2
- package/dist/template/extract-cel-untrusted-path-accesses.d.ts +0 -5
- package/dist/template/extract-cel-untrusted-path-accesses.d.ts.map +0 -1
- package/dist/template/extract-cel-untrusted-path-accesses.js +0 -140
- package/dist/template/extract-cel-untrusted-path-accesses.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { WorkflowExpressionEvaluationContext } from '../evaluator/evaluate-workflow-expression.js';
|
|
1
2
|
import type { ExpressionType, ExpressionTypeEnvironment } from '../expression/workflow-expression.js';
|
|
2
3
|
import { type OutputDeclarations } from '../outputs/output-declarations.js';
|
|
3
|
-
export declare const workflowContextNames: readonly ["run", "trigger", "event", "inputs", "job", "executions", "execution", "jobs", "needs", "steps", "step", "vars", "secrets"];
|
|
4
|
+
export declare const workflowContextNames: readonly ["workflow", "run", "trigger", "event", "inputs", "job", "executions", "execution", "jobs", "needs", "steps", "step", "vars", "secrets"];
|
|
4
5
|
export type WorkflowContextName = (typeof workflowContextNames)[number];
|
|
5
6
|
export declare const availabilitySites: readonly ["ingest", "run-creation", "execution-creation", "job-activation", "step-dispatch", "step-report", "execution-resolution", "job-resolution"];
|
|
6
7
|
export type AvailabilitySite = (typeof availabilitySites)[number];
|
|
@@ -26,22 +27,17 @@ export declare const workflowContextReservedRoots: {
|
|
|
26
27
|
};
|
|
27
28
|
};
|
|
28
29
|
export type WorkflowContextReservedRoot = keyof typeof workflowContextReservedRoots;
|
|
29
|
-
export declare const workflowContextTrustTiers: readonly ["trusted", "untrusted"];
|
|
30
|
-
export type WorkflowContextTrustTier = (typeof workflowContextTrustTiers)[number];
|
|
31
30
|
export type WorkflowContextShape = 'known' | 'open';
|
|
32
31
|
export interface TypedWorkflowContextDefinition {
|
|
33
32
|
readonly availability: AvailabilitySite;
|
|
34
|
-
readonly trustTier: WorkflowContextTrustTier;
|
|
35
33
|
readonly sensitivity: WorkflowContextSensitivity;
|
|
36
34
|
readonly host: 'server';
|
|
37
35
|
readonly shape: 'known';
|
|
38
36
|
readonly checkMode: 'typed';
|
|
39
37
|
readonly typeEnvironment: ExpressionTypeEnvironment;
|
|
40
|
-
readonly untrustedPaths?: readonly string[];
|
|
41
38
|
}
|
|
42
39
|
export interface OpenWorkflowContextDefinition {
|
|
43
40
|
readonly availability: AvailabilitySite;
|
|
44
|
-
readonly trustTier: WorkflowContextTrustTier;
|
|
45
41
|
readonly sensitivity: WorkflowContextSensitivity;
|
|
46
42
|
readonly host: 'server';
|
|
47
43
|
readonly shape: 'open';
|
|
@@ -49,7 +45,6 @@ export interface OpenWorkflowContextDefinition {
|
|
|
49
45
|
readonly literalKeyOnly?: boolean;
|
|
50
46
|
}
|
|
51
47
|
export interface RunnerWorkflowContextDefinition {
|
|
52
|
-
readonly trustTier: WorkflowContextTrustTier;
|
|
53
48
|
readonly sensitivity: 'ephemeral';
|
|
54
49
|
readonly host: 'runner';
|
|
55
50
|
readonly shape: 'open';
|
|
@@ -72,9 +67,24 @@ export declare function buildTypedRootsEnvironment(params: {
|
|
|
72
67
|
readonly needs?: readonly WorkflowJobTypeOverlay[];
|
|
73
68
|
}): ExpressionTypeEnvironment;
|
|
74
69
|
export declare const workflowContextDefinitions: {
|
|
70
|
+
readonly workflow: {
|
|
71
|
+
readonly availability: "run-creation";
|
|
72
|
+
readonly sensitivity: "persistable";
|
|
73
|
+
readonly host: "server";
|
|
74
|
+
readonly shape: "known";
|
|
75
|
+
readonly checkMode: "typed";
|
|
76
|
+
readonly typeEnvironment: {
|
|
77
|
+
readonly workflow: {
|
|
78
|
+
readonly kind: "object";
|
|
79
|
+
readonly fields: {
|
|
80
|
+
readonly id: "string";
|
|
81
|
+
readonly name: "string";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
75
86
|
readonly run: {
|
|
76
87
|
readonly availability: "run-creation";
|
|
77
|
-
readonly trustTier: "trusted";
|
|
78
88
|
readonly sensitivity: "persistable";
|
|
79
89
|
readonly host: "server";
|
|
80
90
|
readonly shape: "known";
|
|
@@ -84,8 +94,8 @@ export declare const workflowContextDefinitions: {
|
|
|
84
94
|
readonly kind: "object";
|
|
85
95
|
readonly fields: {
|
|
86
96
|
readonly id: "string";
|
|
97
|
+
readonly number: "int";
|
|
87
98
|
readonly name: "string";
|
|
88
|
-
readonly definition_id: "string";
|
|
89
99
|
readonly project_id: "string";
|
|
90
100
|
readonly workspace_id: "string";
|
|
91
101
|
readonly created_at: "timestamp";
|
|
@@ -95,7 +105,6 @@ export declare const workflowContextDefinitions: {
|
|
|
95
105
|
};
|
|
96
106
|
readonly trigger: {
|
|
97
107
|
readonly availability: "ingest";
|
|
98
|
-
readonly trustTier: "trusted";
|
|
99
108
|
readonly sensitivity: "persistable";
|
|
100
109
|
readonly host: "server";
|
|
101
110
|
readonly shape: "known";
|
|
@@ -104,6 +113,15 @@ export declare const workflowContextDefinitions: {
|
|
|
104
113
|
readonly trigger: {
|
|
105
114
|
readonly kind: "object";
|
|
106
115
|
readonly fields: {
|
|
116
|
+
readonly project: {
|
|
117
|
+
readonly kind: "object";
|
|
118
|
+
readonly fields: {
|
|
119
|
+
readonly id: "string";
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
readonly repository: "string";
|
|
123
|
+
readonly ref: "string";
|
|
124
|
+
readonly commit: "string";
|
|
107
125
|
readonly source: "string";
|
|
108
126
|
readonly event: "string";
|
|
109
127
|
};
|
|
@@ -112,7 +130,6 @@ export declare const workflowContextDefinitions: {
|
|
|
112
130
|
};
|
|
113
131
|
readonly event: {
|
|
114
132
|
readonly availability: "ingest";
|
|
115
|
-
readonly trustTier: "untrusted";
|
|
116
133
|
readonly sensitivity: "persistable";
|
|
117
134
|
readonly host: "server";
|
|
118
135
|
readonly shape: "open";
|
|
@@ -120,7 +137,6 @@ export declare const workflowContextDefinitions: {
|
|
|
120
137
|
};
|
|
121
138
|
readonly inputs: {
|
|
122
139
|
readonly availability: "run-creation";
|
|
123
|
-
readonly trustTier: "untrusted";
|
|
124
140
|
readonly sensitivity: "persistable";
|
|
125
141
|
readonly host: "server";
|
|
126
142
|
readonly shape: "open";
|
|
@@ -128,7 +144,6 @@ export declare const workflowContextDefinitions: {
|
|
|
128
144
|
};
|
|
129
145
|
readonly job: {
|
|
130
146
|
readonly availability: "run-creation";
|
|
131
|
-
readonly trustTier: "trusted";
|
|
132
147
|
readonly sensitivity: "persistable";
|
|
133
148
|
readonly host: "server";
|
|
134
149
|
readonly shape: "known";
|
|
@@ -138,13 +153,13 @@ export declare const workflowContextDefinitions: {
|
|
|
138
153
|
readonly kind: "object";
|
|
139
154
|
readonly fields: {
|
|
140
155
|
readonly key: "string";
|
|
156
|
+
readonly name: "string";
|
|
141
157
|
};
|
|
142
158
|
};
|
|
143
159
|
};
|
|
144
160
|
};
|
|
145
161
|
readonly executions: {
|
|
146
162
|
readonly availability: "execution-creation";
|
|
147
|
-
readonly trustTier: "trusted";
|
|
148
163
|
readonly sensitivity: "persistable";
|
|
149
164
|
readonly host: "server";
|
|
150
165
|
readonly shape: "known";
|
|
@@ -158,7 +173,6 @@ export declare const workflowContextDefinitions: {
|
|
|
158
173
|
readonly index: "int";
|
|
159
174
|
readonly name: "string";
|
|
160
175
|
readonly status: "string";
|
|
161
|
-
readonly failed: "bool";
|
|
162
176
|
readonly started_at: "timestamp";
|
|
163
177
|
readonly finished_at: "timestamp";
|
|
164
178
|
readonly events: {
|
|
@@ -166,14 +180,23 @@ export declare const workflowContextDefinitions: {
|
|
|
166
180
|
readonly element: {
|
|
167
181
|
readonly kind: "object";
|
|
168
182
|
readonly fields: {
|
|
169
|
-
readonly source: "string";
|
|
170
|
-
readonly event: "string";
|
|
171
|
-
readonly delivery_id: "string";
|
|
172
|
-
readonly received_at: "timestamp";
|
|
173
183
|
readonly data: {
|
|
174
184
|
readonly kind: "object";
|
|
175
185
|
readonly fields: {};
|
|
176
186
|
};
|
|
187
|
+
readonly project: {
|
|
188
|
+
readonly kind: "object";
|
|
189
|
+
readonly fields: {
|
|
190
|
+
readonly id: "string";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
readonly repository: "string";
|
|
194
|
+
readonly ref: "string";
|
|
195
|
+
readonly commit: "string";
|
|
196
|
+
readonly source: "string";
|
|
197
|
+
readonly event: "string";
|
|
198
|
+
readonly delivery_id: "string";
|
|
199
|
+
readonly received_at: "timestamp";
|
|
177
200
|
};
|
|
178
201
|
};
|
|
179
202
|
};
|
|
@@ -184,11 +207,9 @@ export declare const workflowContextDefinitions: {
|
|
|
184
207
|
};
|
|
185
208
|
};
|
|
186
209
|
};
|
|
187
|
-
readonly untrustedPaths: readonly ["events"];
|
|
188
210
|
};
|
|
189
211
|
readonly execution: {
|
|
190
212
|
readonly availability: "execution-creation";
|
|
191
|
-
readonly trustTier: "trusted";
|
|
192
213
|
readonly sensitivity: "persistable";
|
|
193
214
|
readonly host: "server";
|
|
194
215
|
readonly shape: "known";
|
|
@@ -197,10 +218,10 @@ export declare const workflowContextDefinitions: {
|
|
|
197
218
|
readonly execution: {
|
|
198
219
|
readonly kind: "object";
|
|
199
220
|
readonly fields: {
|
|
221
|
+
readonly failed: "bool";
|
|
200
222
|
readonly index: "int";
|
|
201
223
|
readonly name: "string";
|
|
202
224
|
readonly status: "string";
|
|
203
|
-
readonly failed: "bool";
|
|
204
225
|
readonly started_at: "timestamp";
|
|
205
226
|
readonly finished_at: "timestamp";
|
|
206
227
|
readonly events: {
|
|
@@ -208,14 +229,23 @@ export declare const workflowContextDefinitions: {
|
|
|
208
229
|
readonly element: {
|
|
209
230
|
readonly kind: "object";
|
|
210
231
|
readonly fields: {
|
|
211
|
-
readonly source: "string";
|
|
212
|
-
readonly event: "string";
|
|
213
|
-
readonly delivery_id: "string";
|
|
214
|
-
readonly received_at: "timestamp";
|
|
215
232
|
readonly data: {
|
|
216
233
|
readonly kind: "object";
|
|
217
234
|
readonly fields: {};
|
|
218
235
|
};
|
|
236
|
+
readonly project: {
|
|
237
|
+
readonly kind: "object";
|
|
238
|
+
readonly fields: {
|
|
239
|
+
readonly id: "string";
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
readonly repository: "string";
|
|
243
|
+
readonly ref: "string";
|
|
244
|
+
readonly commit: "string";
|
|
245
|
+
readonly source: "string";
|
|
246
|
+
readonly event: "string";
|
|
247
|
+
readonly delivery_id: "string";
|
|
248
|
+
readonly received_at: "timestamp";
|
|
219
249
|
};
|
|
220
250
|
};
|
|
221
251
|
};
|
|
@@ -225,11 +255,9 @@ export declare const workflowContextDefinitions: {
|
|
|
225
255
|
};
|
|
226
256
|
};
|
|
227
257
|
};
|
|
228
|
-
readonly untrustedPaths: readonly ["events"];
|
|
229
258
|
};
|
|
230
259
|
readonly jobs: {
|
|
231
260
|
readonly availability: "job-activation";
|
|
232
|
-
readonly trustTier: "untrusted";
|
|
233
261
|
readonly sensitivity: "persistable";
|
|
234
262
|
readonly host: "server";
|
|
235
263
|
readonly shape: "open";
|
|
@@ -237,7 +265,6 @@ export declare const workflowContextDefinitions: {
|
|
|
237
265
|
};
|
|
238
266
|
readonly needs: {
|
|
239
267
|
readonly availability: "job-activation";
|
|
240
|
-
readonly trustTier: "untrusted";
|
|
241
268
|
readonly sensitivity: "persistable";
|
|
242
269
|
readonly host: "server";
|
|
243
270
|
readonly shape: "known";
|
|
@@ -251,7 +278,6 @@ export declare const workflowContextDefinitions: {
|
|
|
251
278
|
};
|
|
252
279
|
readonly steps: {
|
|
253
280
|
readonly availability: "step-dispatch";
|
|
254
|
-
readonly trustTier: "trusted";
|
|
255
281
|
readonly sensitivity: "persistable";
|
|
256
282
|
readonly host: "server";
|
|
257
283
|
readonly shape: "open";
|
|
@@ -259,7 +285,6 @@ export declare const workflowContextDefinitions: {
|
|
|
259
285
|
};
|
|
260
286
|
readonly step: {
|
|
261
287
|
readonly availability: "step-dispatch";
|
|
262
|
-
readonly trustTier: "trusted";
|
|
263
288
|
readonly sensitivity: "persistable";
|
|
264
289
|
readonly host: "server";
|
|
265
290
|
readonly shape: "known";
|
|
@@ -268,6 +293,11 @@ export declare const workflowContextDefinitions: {
|
|
|
268
293
|
readonly step: {
|
|
269
294
|
readonly kind: "object";
|
|
270
295
|
readonly fields: {
|
|
296
|
+
readonly exit_code: "int";
|
|
297
|
+
readonly status: "string";
|
|
298
|
+
readonly outputs: {
|
|
299
|
+
readonly kind: "map";
|
|
300
|
+
};
|
|
271
301
|
readonly attempt: "int";
|
|
272
302
|
readonly is_retry: "bool";
|
|
273
303
|
readonly restart: {
|
|
@@ -319,19 +349,12 @@ export declare const workflowContextDefinitions: {
|
|
|
319
349
|
readonly feedback: "string";
|
|
320
350
|
};
|
|
321
351
|
};
|
|
322
|
-
readonly exit_code: "int";
|
|
323
|
-
readonly status: "string";
|
|
324
|
-
readonly outputs: {
|
|
325
|
-
readonly kind: "map";
|
|
326
|
-
};
|
|
327
352
|
};
|
|
328
353
|
};
|
|
329
354
|
};
|
|
330
|
-
readonly untrustedPaths: readonly ["outputs"];
|
|
331
355
|
};
|
|
332
356
|
readonly vars: {
|
|
333
357
|
readonly availability: "run-creation";
|
|
334
|
-
readonly trustTier: "trusted";
|
|
335
358
|
readonly sensitivity: "persistable";
|
|
336
359
|
readonly host: "server";
|
|
337
360
|
readonly shape: "open";
|
|
@@ -339,7 +362,6 @@ export declare const workflowContextDefinitions: {
|
|
|
339
362
|
readonly literalKeyOnly: true;
|
|
340
363
|
};
|
|
341
364
|
readonly secrets: {
|
|
342
|
-
readonly trustTier: "trusted";
|
|
343
365
|
readonly sensitivity: "ephemeral";
|
|
344
366
|
readonly host: "runner";
|
|
345
367
|
readonly shape: "open";
|
|
@@ -347,89 +369,40 @@ export declare const workflowContextDefinitions: {
|
|
|
347
369
|
readonly literalKeyOnly: true;
|
|
348
370
|
};
|
|
349
371
|
};
|
|
350
|
-
export type WorkflowInterpolationField = 'run' | 'env.value' | 'agent.prompt' | 'agent.model' | 'agent.provider' | 'agent.thinking' | 'job.runner' | 'job.outputs' | 'job.
|
|
372
|
+
export type WorkflowInterpolationField = 'run' | 'env.value' | 'agent.prompt' | 'agent.model' | 'agent.provider' | 'agent.thinking' | 'job.runner' | 'job.outputs' | 'workflow.run_name' | 'job.execution_name' | 'step.name' | 'step.working_directory' | 'step.feedback' | 'checkout.project' | 'checkout.connection' | 'checkout.repository' | 'checkout.ref' | 'checkout.path';
|
|
351
373
|
export declare const workflowFieldFailurePolicies: readonly ["fail", "degrade", "fail-closed"];
|
|
352
374
|
export type WorkflowFieldFailurePolicy = (typeof workflowFieldFailurePolicies)[number];
|
|
353
375
|
export type WorkflowInterpolationFailurePolicy = Exclude<WorkflowFieldFailurePolicy, 'fail-closed'>;
|
|
354
376
|
export interface WorkflowInterpolationFieldPolicy {
|
|
355
|
-
readonly acceptedTrustTiers: readonly WorkflowContextTrustTier[];
|
|
356
377
|
readonly acceptedHosts: readonly WorkflowContextHost[];
|
|
357
378
|
readonly failurePolicy: WorkflowInterpolationFailurePolicy;
|
|
358
|
-
readonly renderSanitize: boolean;
|
|
359
379
|
readonly minimumFillTarget?: AvailabilitySite;
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
364
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
365
|
-
readonly failurePolicy: "fail";
|
|
366
|
-
readonly renderSanitize: false;
|
|
367
|
-
};
|
|
368
|
-
readonly 'env.value': {
|
|
369
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
370
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
371
|
-
readonly failurePolicy: "fail";
|
|
372
|
-
readonly renderSanitize: false;
|
|
373
|
-
};
|
|
374
|
-
readonly 'agent.prompt': {
|
|
375
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
376
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
377
|
-
readonly failurePolicy: "fail";
|
|
378
|
-
readonly renderSanitize: false;
|
|
379
|
-
};
|
|
380
|
-
readonly 'agent.model': {
|
|
381
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
382
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
383
|
-
readonly failurePolicy: "fail";
|
|
384
|
-
readonly renderSanitize: false;
|
|
385
|
-
};
|
|
386
|
-
readonly 'agent.provider': {
|
|
387
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
388
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
389
|
-
readonly failurePolicy: "fail";
|
|
390
|
-
readonly renderSanitize: false;
|
|
391
|
-
};
|
|
392
|
-
readonly 'agent.thinking': {
|
|
393
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
394
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
395
|
-
readonly failurePolicy: "fail";
|
|
396
|
-
readonly renderSanitize: false;
|
|
380
|
+
readonly selfReference?: {
|
|
381
|
+
readonly root: WorkflowContextName;
|
|
382
|
+
readonly key: string;
|
|
397
383
|
};
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
401
|
-
readonly failurePolicy: "fail";
|
|
402
|
-
readonly renderSanitize: false;
|
|
403
|
-
};
|
|
404
|
-
readonly 'job.outputs': {
|
|
405
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
406
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
407
|
-
readonly failurePolicy: "fail";
|
|
408
|
-
readonly renderSanitize: false;
|
|
409
|
-
readonly minimumFillTarget: "execution-resolution";
|
|
410
|
-
};
|
|
411
|
-
readonly 'job.name': {
|
|
412
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
413
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
414
|
-
readonly failurePolicy: "degrade";
|
|
415
|
-
readonly renderSanitize: true;
|
|
416
|
-
};
|
|
417
|
-
readonly 'step.name': {
|
|
418
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
419
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
420
|
-
readonly failurePolicy: "degrade";
|
|
421
|
-
readonly renderSanitize: true;
|
|
422
|
-
};
|
|
423
|
-
readonly 'step.feedback': {
|
|
424
|
-
readonly acceptedTrustTiers: readonly ("trusted" | "untrusted")[];
|
|
425
|
-
readonly acceptedHosts: readonly ("server" | "runner")[];
|
|
426
|
-
readonly failurePolicy: "fail";
|
|
427
|
-
readonly renderSanitize: false;
|
|
428
|
-
};
|
|
429
|
-
};
|
|
384
|
+
}
|
|
385
|
+
export declare const workflowInterpolationFieldPolicies: Readonly<Record<WorkflowInterpolationField, WorkflowInterpolationFieldPolicy>>;
|
|
430
386
|
export declare const workflowInterpolationFields: readonly WorkflowInterpolationField[];
|
|
431
387
|
export declare const workflowPredicateFields: readonly ["step.success", "job.success", "trigger.filter", "listener.on", "listener.until", "job.if", "step.if"];
|
|
432
388
|
export type WorkflowPredicateField = (typeof workflowPredicateFields)[number];
|
|
389
|
+
/**
|
|
390
|
+
* The roots that the runtime passes to each server-evaluated predicate.
|
|
391
|
+
*
|
|
392
|
+
* This is intentionally narrower than lifecycle availability. A root can
|
|
393
|
+
* exist by the time a predicate runs and still not belong to that predicate's
|
|
394
|
+
* evaluation context.
|
|
395
|
+
*/
|
|
396
|
+
export declare const workflowPredicateContextRoots: {
|
|
397
|
+
readonly 'step.success': readonly ["step", "vars"];
|
|
398
|
+
readonly 'job.success': readonly ["executions", "jobs", "vars"];
|
|
399
|
+
readonly 'trigger.filter': readonly ["event", "trigger"];
|
|
400
|
+
readonly 'listener.on': readonly ["event", "workflow", "run", "trigger", "inputs", "vars", "job", "jobs"];
|
|
401
|
+
readonly 'listener.until': readonly ["event", "workflow", "run", "trigger", "inputs", "vars", "job", "jobs"];
|
|
402
|
+
readonly 'job.if': readonly ["workflow", "run", "trigger", "event", "inputs", "vars", "jobs", "needs"];
|
|
403
|
+
readonly 'step.if': readonly ["vars", "jobs", "execution", "step", "steps"];
|
|
404
|
+
};
|
|
405
|
+
export type WorkflowPredicateContextRoot<Field extends WorkflowPredicateField = WorkflowPredicateField> = (typeof workflowPredicateContextRoots)[Field][number];
|
|
433
406
|
export declare const workflowPredicateFieldFailurePolicy: "fail-closed";
|
|
434
407
|
export declare function getWorkflowContextDefinition(name: WorkflowContextName): WorkflowContextDefinition;
|
|
435
408
|
export declare function getWorkflowContextAvailability(name: WorkflowContextName): AvailabilitySite | undefined;
|
|
@@ -440,14 +413,26 @@ export declare function getWorkflowContextSensitivity(name: WorkflowContextName)
|
|
|
440
413
|
export declare function rootsAvailableAt(site: AvailabilitySite): readonly WorkflowContextName[];
|
|
441
414
|
export declare function unavailableRootsAt(roots: readonly WorkflowContextName[], site: AvailabilitySite): readonly WorkflowContextName[];
|
|
442
415
|
export declare function getWorkflowContextTypeEnvironment(name: WorkflowContextName): ExpressionTypeEnvironment | undefined;
|
|
443
|
-
export declare function getWorkflowContextUntrustedPaths(name: WorkflowContextName): readonly string[] | undefined;
|
|
444
|
-
export declare function workflowInterpolationFieldAcceptsTrustTier(field: WorkflowInterpolationField, trustTier: WorkflowContextTrustTier): boolean;
|
|
445
416
|
export declare function workflowInterpolationFieldAcceptsHost(field: WorkflowInterpolationField, host: WorkflowContextHost): boolean;
|
|
446
|
-
export declare function workflowInterpolationFieldAcceptsContext(field: WorkflowInterpolationField, context: WorkflowContextName): boolean;
|
|
447
417
|
export declare function workflowContextRootRequiresLiteralKey(root: string): boolean;
|
|
448
418
|
export declare function getWorkflowInterpolationFieldFailurePolicy(field: WorkflowInterpolationField): WorkflowInterpolationFailurePolicy;
|
|
419
|
+
export declare function getWorkflowInterpolationFieldSelfReference(field: WorkflowInterpolationField): WorkflowInterpolationFieldPolicy['selfReference'];
|
|
449
420
|
export declare function getWorkflowInterpolationFieldMinimumFillTarget(field: WorkflowInterpolationField): AvailabilitySite | undefined;
|
|
450
421
|
export declare function getWorkflowPredicateFieldMinimumFillTarget(field: WorkflowPredicateField): AvailabilitySite;
|
|
422
|
+
export declare function getWorkflowPredicateFieldTypeEnvironment(field: WorkflowPredicateField, root: WorkflowContextName): ExpressionTypeEnvironment | undefined;
|
|
423
|
+
export declare function getWorkflowPredicateContextRoots<Field extends WorkflowPredicateField>(field: Field): readonly WorkflowPredicateContextRoot<Field>[];
|
|
424
|
+
/**
|
|
425
|
+
* The roots a field can read, whichever kind of field it is.
|
|
426
|
+
*
|
|
427
|
+
* A predicate has an enumerated contract because the runtime assembles one
|
|
428
|
+
* context for it. A template has no single context: each reference is filled
|
|
429
|
+
* where its data arrives, so its only field-level constraint is which host can
|
|
430
|
+
* resolve it. Callers that document or check fields should use this instead of
|
|
431
|
+
* choosing a mechanism themselves.
|
|
432
|
+
*/
|
|
433
|
+
export declare function contextRootsForField(field: WorkflowPredicateField | WorkflowInterpolationField): readonly WorkflowContextName[];
|
|
434
|
+
export declare function isWorkflowPredicateField(field: string): field is WorkflowPredicateField;
|
|
435
|
+
export declare function projectWorkflowPredicateContext(field: WorkflowPredicateField, context: WorkflowExpressionEvaluationContext): WorkflowExpressionEvaluationContext;
|
|
451
436
|
export interface WorkflowContextAvailabilityReferenceEntry {
|
|
452
437
|
readonly root: WorkflowContextName | WorkflowContextReservedRoot;
|
|
453
438
|
readonly availability?: AvailabilitySite;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-context.d.ts","sourceRoot":"","sources":["../../src/workflow-context/workflow-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,cAAc,EAAE,yBAAyB,EAAC,MAAM,sCAAsC,CAAC;AACpG,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,mCAAmC,CAAC;AAE3C,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"workflow-context.d.ts","sourceRoot":"","sources":["../../src/workflow-context/workflow-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mCAAmC,EAAC,MAAM,8CAA8C,CAAC;AACt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