@kici-dev/engine 0.1.15 → 0.1.17
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/dist/approval/types.d.ts +56 -0
- package/dist/approval/types.js +42 -0
- package/dist/audit/access-log-policy.js +5 -1
- package/dist/audit/activity.js +1 -1
- package/dist/audit/retention-policy.js +9 -1
- package/dist/bundler/index.js +1 -1
- package/dist/bundler/rolldown-config.js +1 -1
- package/dist/env/environment-allowlist.js +1 -1
- package/dist/environment/index.js +1 -1
- package/dist/environment/scope-resolver.js +1 -1
- package/dist/environment/types.d.ts +8 -0
- package/dist/environment/types.js +1 -1
- package/dist/fanout/materialize.d.ts +67 -0
- package/dist/fanout/materialize.js +119 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +10 -8
- package/dist/labels.js +1 -1
- package/dist/matrix/expand.d.ts +43 -0
- package/dist/matrix/expand.js +66 -0
- package/dist/matrix/format.d.ts +10 -0
- package/dist/matrix/format.js +19 -0
- package/dist/metrics/catalog-policy.js +8 -3
- package/dist/metrics/metric-catalog.generated.d.ts +1 -1
- package/dist/metrics/metric-catalog.generated.js +2 -2
- package/dist/protocol/analytics-events.js +1 -1
- package/dist/protocol/cluster-name.js +1 -1
- package/dist/protocol/dashboard-global-workflows.js +1 -1
- package/dist/protocol/dashboard-write-operations.js +1 -1
- package/dist/protocol/event-log-payload.js +1 -1
- package/dist/protocol/messages/access-log.d.ts +25 -5
- package/dist/protocol/messages/access-log.js +5 -1
- package/dist/protocol/messages/actor.js +1 -1
- package/dist/protocol/messages/auth.d.ts +1 -0
- package/dist/protocol/messages/auth.js +11 -2
- package/dist/protocol/messages/browser.js +1 -1
- package/dist/protocol/messages/capabilities.js +1 -1
- package/dist/protocol/messages/common.js +1 -1
- package/dist/protocol/messages/dashboard-global-workflows.js +1 -1
- package/dist/protocol/messages/dashboard.d.ts +1030 -50
- package/dist/protocol/messages/dashboard.js +377 -7
- package/dist/protocol/messages/event-log.js +1 -1
- package/dist/protocol/messages/execution-status.d.ts +13 -1
- package/dist/protocol/messages/execution-status.js +13 -3
- package/dist/protocol/messages/join.js +1 -1
- package/dist/protocol/messages/log-pull.js +1 -1
- package/dist/protocol/messages/observe.d.ts +1 -0
- package/dist/protocol/messages/oidc-token-relay.d.ts +31 -0
- package/dist/protocol/messages/oidc-token-relay.js +34 -0
- package/dist/protocol/messages/orchestrator-agent.d.ts +161 -0
- package/dist/protocol/messages/orchestrator-agent.js +117 -4
- package/dist/protocol/messages/peer.d.ts +76 -0
- package/dist/protocol/messages/peer.js +37 -2
- package/dist/protocol/messages/platform-orchestrator.d.ts +187 -10
- package/dist/protocol/messages/platform-orchestrator.js +13 -2
- package/dist/protocol/messages/run-events.js +1 -1
- package/dist/protocol/messages/scaler-event.js +1 -1
- package/dist/protocol/messages/source-registration.d.ts +7 -6
- package/dist/protocol/messages/source-registration.js +7 -6
- package/dist/protocol/version.js +1 -1
- package/dist/provenance/bundle.d.ts +54 -0
- package/dist/provenance/bundle.js +53 -0
- package/dist/provenance/dsse.d.ts +39 -0
- package/dist/provenance/dsse.js +53 -0
- package/dist/provenance/schema.d.ts +407 -0
- package/dist/provenance/schema.js +143 -0
- package/dist/provenance/verify.d.ts +71 -0
- package/dist/provenance/verify.js +135 -0
- package/dist/provider/changed-files-fetcher.js +1 -1
- package/dist/provider/check-run-conclusion.js +1 -1
- package/dist/provider/check-status-poster.js +1 -1
- package/dist/provider/clone-token-provider.js +1 -1
- package/dist/provider/contributor-resolver.js +1 -1
- package/dist/provider/index.js +1 -1
- package/dist/provider/lock-file-fetcher.js +1 -1
- package/dist/provider/lock-file-parse-error.js +3 -1
- package/dist/provider/repo-url-builder.js +1 -1
- package/dist/provider/types.d.ts +2 -2
- package/dist/provider/types.js +1 -1
- package/dist/provider/webhook-normalizer.js +1 -1
- package/dist/registration/registerable-trigger-type.js +1 -1
- package/dist/scaler/resource-types.js +1 -1
- package/dist/scaler/scaler-backend-type.js +1 -1
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/types.js +1 -1
- package/dist/state-machine/index.js +1 -1
- package/dist/state-machine/machine.js +1 -1
- package/dist/state-machine/types.js +1 -1
- package/dist/trigger/decision-trace.js +1 -1
- package/dist/trigger/jsonpath-matcher.js +1 -1
- package/dist/trigger/matcher.js +1 -1
- package/dist/trigger/trigger-event-type.js +1 -1
- package/dist/trigger/types.d.ts +34 -1
- package/dist/trigger/types.js +14 -5
- package/dist/webhook/signature.js +1 -1
- package/dist/ws/close-codes.js +1 -1
- package/dist/ws/rate-limiter.js +3 -1
- package/dist/ws/ws-like.js +1 -1
- package/package.json +23 -1
- package/sbom.spdx.json +55 -5
- package/dist/protocol/messages/observe.js +0 -70
- package/dist/protocol/messages/test-run.js +0 -52
- /package/dist/{chunk-gOLHoazu.js → chunk-BTugEXQM.js} +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared approval requirement + clause types.
|
|
3
|
+
*
|
|
4
|
+
* One normalized `ApprovalRequirement` is produced by both approval triggers —
|
|
5
|
+
* a mandatory environment policy and an explicit SDK `requireApproval` — and is
|
|
6
|
+
* consumed identically by the orchestrator gate, the resolver, the held-run
|
|
7
|
+
* store, and the agent step round-trip. Pure Zod (no node built-ins), so this
|
|
8
|
+
* module is safe in the browser-facing engine barrel.
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
/**
|
|
12
|
+
* A single approver clause. `{ team }` is satisfied by any member of the named
|
|
13
|
+
* team; `{ user }` by that specific user. A flat AND list of clauses must all
|
|
14
|
+
* be satisfied to release a held element.
|
|
15
|
+
*/
|
|
16
|
+
export declare const approverClauseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
17
|
+
team: z.ZodString;
|
|
18
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
19
|
+
user: z.ZodString;
|
|
20
|
+
}, z.core.$strict>]>;
|
|
21
|
+
export type ApproverClause = z.infer<typeof approverClauseSchema>;
|
|
22
|
+
/** Granularity of a held element. */
|
|
23
|
+
export declare const HoldScope: z.ZodEnum<{
|
|
24
|
+
job: "job";
|
|
25
|
+
step: "step";
|
|
26
|
+
workflow: "workflow";
|
|
27
|
+
}>;
|
|
28
|
+
export type HoldScope = z.infer<typeof HoldScope>;
|
|
29
|
+
/** What triggered the hold: an environment policy (mandatory) or SDK code (explicit). */
|
|
30
|
+
export declare const TriggerSource: z.ZodEnum<{
|
|
31
|
+
environment: "environment";
|
|
32
|
+
explicit: "explicit";
|
|
33
|
+
}>;
|
|
34
|
+
export type TriggerSource = z.infer<typeof TriggerSource>;
|
|
35
|
+
/**
|
|
36
|
+
* The normalized requirement attached to a held element. `clauses` is a flat
|
|
37
|
+
* AND list; an empty list means "any approval-capable org member". `expiresAt`
|
|
38
|
+
* is an ISO timestamp; on expiry the element is rejected.
|
|
39
|
+
*/
|
|
40
|
+
export declare const approvalRequirementSchema: z.ZodObject<{
|
|
41
|
+
clauses: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
42
|
+
team: z.ZodString;
|
|
43
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
44
|
+
user: z.ZodString;
|
|
45
|
+
}, z.core.$strict>]>>;
|
|
46
|
+
expiresAt: z.ZodString;
|
|
47
|
+
reason: z.ZodString;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type ApprovalRequirement = z.infer<typeof approvalRequirementSchema>;
|
|
50
|
+
/** An individual approve/reject decision recorded against a held element. */
|
|
51
|
+
export declare const ApprovalDecision: z.ZodEnum<{
|
|
52
|
+
approve: "approve";
|
|
53
|
+
reject: "reject";
|
|
54
|
+
}>;
|
|
55
|
+
export type ApprovalDecision = z.infer<typeof ApprovalDecision>;
|
|
56
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/approval/types.ts
|
|
4
|
+
/**
|
|
5
|
+
* Shared approval requirement + clause types.
|
|
6
|
+
*
|
|
7
|
+
* One normalized `ApprovalRequirement` is produced by both approval triggers —
|
|
8
|
+
* a mandatory environment policy and an explicit SDK `requireApproval` — and is
|
|
9
|
+
* consumed identically by the orchestrator gate, the resolver, the held-run
|
|
10
|
+
* store, and the agent step round-trip. Pure Zod (no node built-ins), so this
|
|
11
|
+
* module is safe in the browser-facing engine barrel.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* A single approver clause. `{ team }` is satisfied by any member of the named
|
|
15
|
+
* team; `{ user }` by that specific user. A flat AND list of clauses must all
|
|
16
|
+
* be satisfied to release a held element.
|
|
17
|
+
*/
|
|
18
|
+
const approverClauseSchema = z.union([z.object({ team: z.string().min(1) }).strict(), z.object({ user: z.string().min(1) }).strict()]);
|
|
19
|
+
/** Granularity of a held element. */
|
|
20
|
+
const HoldScope = z.enum([
|
|
21
|
+
"workflow",
|
|
22
|
+
"job",
|
|
23
|
+
"step"
|
|
24
|
+
]);
|
|
25
|
+
/** What triggered the hold: an environment policy (mandatory) or SDK code (explicit). */
|
|
26
|
+
const TriggerSource = z.enum(["environment", "explicit"]);
|
|
27
|
+
/**
|
|
28
|
+
* The normalized requirement attached to a held element. `clauses` is a flat
|
|
29
|
+
* AND list; an empty list means "any approval-capable org member". `expiresAt`
|
|
30
|
+
* is an ISO timestamp; on expiry the element is rejected.
|
|
31
|
+
*/
|
|
32
|
+
const approvalRequirementSchema = z.object({
|
|
33
|
+
clauses: z.array(approverClauseSchema),
|
|
34
|
+
expiresAt: z.string(),
|
|
35
|
+
reason: z.string()
|
|
36
|
+
});
|
|
37
|
+
/** An individual approve/reject decision recorded against a held element. */
|
|
38
|
+
const ApprovalDecision = z.enum(["approve", "reject"]);
|
|
39
|
+
//#endregion
|
|
40
|
+
export { ApprovalDecision, HoldScope, TriggerSource, approvalRequirementSchema, approverClauseSchema };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/audit/access-log-policy.ts
|
|
4
4
|
/**
|
|
@@ -58,6 +58,7 @@ const POLICY_BY_ACTION = {
|
|
|
58
58
|
kind: "sample",
|
|
59
59
|
allowedRate: .1
|
|
60
60
|
},
|
|
61
|
+
"attestations.read": { kind: "always" },
|
|
61
62
|
"event_log.list.read": {
|
|
62
63
|
kind: "sample",
|
|
63
64
|
allowedRate: .05
|
|
@@ -114,6 +115,7 @@ const POLICY_BY_ACTION = {
|
|
|
114
115
|
"run.cancel": { kind: "always" },
|
|
115
116
|
"run.rerun": { kind: "always" },
|
|
116
117
|
"run.manual_schedule": { kind: "always" },
|
|
118
|
+
"run.trigger": { kind: "always" },
|
|
117
119
|
"job.cancel": { kind: "always" },
|
|
118
120
|
"event_log.detail.read": { kind: "always" },
|
|
119
121
|
"event_log.payload.read": { kind: "always" },
|
|
@@ -136,6 +138,8 @@ const POLICY_BY_ACTION = {
|
|
|
136
138
|
"secret_scope.delete": { kind: "always" },
|
|
137
139
|
"held_run.approve": { kind: "always" },
|
|
138
140
|
"held_run.reject": { kind: "always" },
|
|
141
|
+
"held_run.request": { kind: "always" },
|
|
142
|
+
"held_run.expire": { kind: "always" },
|
|
139
143
|
"registration.disable": { kind: "always" },
|
|
140
144
|
"registration.delete": { kind: "always" },
|
|
141
145
|
"backend.sync": { kind: "always" },
|
package/dist/audit/activity.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
2
|
//#region src/audit/retention-policy.ts
|
|
3
3
|
/**
|
|
4
4
|
* Warm-retention days per `AccessLogAction`. Exhaustive over the enum so a
|
|
@@ -18,6 +18,7 @@ const ACCESS_LOG_WARM_DAYS = {
|
|
|
18
18
|
"sources.list.read": 30,
|
|
19
19
|
"run.orch_logs.read": 30,
|
|
20
20
|
"step.logs.read": 30,
|
|
21
|
+
"attestations.read": 30,
|
|
21
22
|
"event_log.list.read": 30,
|
|
22
23
|
"environment.list.read": 30,
|
|
23
24
|
"environment.get.read": 30,
|
|
@@ -41,6 +42,7 @@ const ACCESS_LOG_WARM_DAYS = {
|
|
|
41
42
|
"run.cancel": 180,
|
|
42
43
|
"run.rerun": 180,
|
|
43
44
|
"run.manual_schedule": 180,
|
|
45
|
+
"run.trigger": 180,
|
|
44
46
|
"job.cancel": 180,
|
|
45
47
|
"environment.create": 180,
|
|
46
48
|
"environment.update": 180,
|
|
@@ -52,6 +54,8 @@ const ACCESS_LOG_WARM_DAYS = {
|
|
|
52
54
|
"env_binding.set": 180,
|
|
53
55
|
"held_run.approve": 180,
|
|
54
56
|
"held_run.reject": 180,
|
|
57
|
+
"held_run.request": 180,
|
|
58
|
+
"held_run.expire": 180,
|
|
55
59
|
"registration.disable": 180,
|
|
56
60
|
"registration.delete": 180,
|
|
57
61
|
"backend.sync": 180,
|
|
@@ -252,6 +256,7 @@ const ACCESS_LOG_COLD_DAYS = {
|
|
|
252
256
|
"sources.list.read": 180,
|
|
253
257
|
"run.orch_logs.read": 180,
|
|
254
258
|
"step.logs.read": 180,
|
|
259
|
+
"attestations.read": 180,
|
|
255
260
|
"event_log.list.read": 180,
|
|
256
261
|
"environment.list.read": 180,
|
|
257
262
|
"environment.get.read": 180,
|
|
@@ -275,6 +280,7 @@ const ACCESS_LOG_COLD_DAYS = {
|
|
|
275
280
|
"run.cancel": 730,
|
|
276
281
|
"run.rerun": 730,
|
|
277
282
|
"run.manual_schedule": 730,
|
|
283
|
+
"run.trigger": 730,
|
|
278
284
|
"job.cancel": 730,
|
|
279
285
|
"environment.create": 730,
|
|
280
286
|
"environment.update": 730,
|
|
@@ -286,6 +292,8 @@ const ACCESS_LOG_COLD_DAYS = {
|
|
|
286
292
|
"env_binding.set": 730,
|
|
287
293
|
"held_run.approve": 730,
|
|
288
294
|
"held_run.reject": 730,
|
|
295
|
+
"held_run.request": 730,
|
|
296
|
+
"held_run.expire": 730,
|
|
289
297
|
"registration.disable": 730,
|
|
290
298
|
"registration.delete": 730,
|
|
291
299
|
"backend.sync": 730,
|
package/dist/bundler/index.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Environments are org-level entities that group secrets, variables,
|
|
5
5
|
* and protection rules for deployment targets (dev, staging, production).
|
|
6
6
|
*/
|
|
7
|
+
import type { ApproverClause } from '../approval/types.js';
|
|
7
8
|
/** Environment entity — org-level deployment target with protection rules. */
|
|
8
9
|
export interface Environment {
|
|
9
10
|
id: string;
|
|
@@ -94,5 +95,12 @@ export interface ProtectionGateResult {
|
|
|
94
95
|
reason?: string;
|
|
95
96
|
holdUntil?: string;
|
|
96
97
|
holdType?: 'reviewer' | 'timer' | 'concurrency' | 'security';
|
|
98
|
+
/**
|
|
99
|
+
* Approver clauses for a reviewer hold, mapped from the environment's
|
|
100
|
+
* `requiredReviewers`. Each reviewer string maps to a `{ user }` clause
|
|
101
|
+
* (team-named reviewers are a documented follow-up). Empty/undefined means
|
|
102
|
+
* "any approval-capable member".
|
|
103
|
+
*/
|
|
104
|
+
clauses?: ApproverClause[];
|
|
97
105
|
}
|
|
98
106
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
2
|
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type MatrixValues } from '../matrix/expand.js';
|
|
2
|
+
import type { LockJob } from '../trigger/types.js';
|
|
3
|
+
/** Hard cap on children per fanned job — mirrors the compiler's MAX_STATIC_MATRIX_JOBS. */
|
|
4
|
+
export declare const MAX_FANOUT_JOBS = 256;
|
|
5
|
+
/**
|
|
6
|
+
* Thrown when a job's matrix cannot be materialized into dispatchable children:
|
|
7
|
+
* zero combinations after exclude, or more combinations than {@link MAX_FANOUT_JOBS}.
|
|
8
|
+
* Callers map this onto the `matrix_expansion` init-failure category.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FanoutError extends Error {
|
|
11
|
+
readonly jobName: string;
|
|
12
|
+
readonly name = "FanoutError";
|
|
13
|
+
constructor(jobName: string, message: string);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* One dispatchable unit produced from a lock job. `variantKind` is `'matrix'`
|
|
17
|
+
* today; the shape is variant-agnostic so a future host fan-out can add `'host'`.
|
|
18
|
+
*/
|
|
19
|
+
export interface MaterializedJob {
|
|
20
|
+
/** The originating lock job. Its matrix/include/exclude are NOT dispatched as-is. */
|
|
21
|
+
lockJob: LockJob;
|
|
22
|
+
/** The lock job's name (the consumer-facing job identity). */
|
|
23
|
+
baseName: string;
|
|
24
|
+
/** `${baseName} (${suffix})` for fanned children, else `baseName`. */
|
|
25
|
+
expandedName: string;
|
|
26
|
+
/** Present only for fanned children. */
|
|
27
|
+
variantKind?: 'matrix';
|
|
28
|
+
/** The combination values for a fanned child; absent for non-fanned jobs. */
|
|
29
|
+
variantValues?: MatrixValues;
|
|
30
|
+
/**
|
|
31
|
+
* True when the job carries a dynamic matrix the orchestrator cannot expand —
|
|
32
|
+
* it must route through the agent-eval flow and be re-materialized from the result.
|
|
33
|
+
*/
|
|
34
|
+
pendingDynamicMatrix?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface FanoutResult {
|
|
37
|
+
jobs: MaterializedJob[];
|
|
38
|
+
/** baseName → expandedNames (length 1 for non-fanned jobs). Drives needs-edge expansion. */
|
|
39
|
+
expansionMap: Map<string, string[]>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The job-config envelope fields that identify a materialized child: the
|
|
43
|
+
* expanded `name`, the `baseJobName` (what the agent exposes as `ctx.job.name`),
|
|
44
|
+
* and `matrixValues` (exposed as `ctx.matrix`). Every dispatch site spreads
|
|
45
|
+
* these into its job config so the envelopes stay identical. The raw
|
|
46
|
+
* matrix/include/exclude are intentionally NOT included — they are consumed at
|
|
47
|
+
* dispatch time, not shipped to the agent.
|
|
48
|
+
*/
|
|
49
|
+
export declare function matrixEnvelopeFields(mat: MaterializedJob): {
|
|
50
|
+
name: string;
|
|
51
|
+
baseJobName: string;
|
|
52
|
+
matrixValues?: MatrixValues;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Build materialized children from a resolved dynamic-matrix combination list
|
|
56
|
+
* (produced by the agent eval flow). Mirrors the static-matrix branch of
|
|
57
|
+
* {@link materializeFanout} but takes the already-resolved combinations and
|
|
58
|
+
* enforces the same cap / zero-combination guards.
|
|
59
|
+
*/
|
|
60
|
+
export declare function materializeResolvedMatrix(lockJob: LockJob, combos: readonly MatrixValues[]): FanoutResult;
|
|
61
|
+
/**
|
|
62
|
+
* Expand each lock job's static matrix into N dispatchable children (one per
|
|
63
|
+
* combination), passing non-matrix and dynamic-matrix jobs through 1:1.
|
|
64
|
+
* Dynamic-matrix jobs are flagged `pendingDynamicMatrix` for the eval flow.
|
|
65
|
+
*/
|
|
66
|
+
export declare function materializeFanout(staticJobs: readonly LockJob[]): FanoutResult;
|
|
67
|
+
//# sourceMappingURL=materialize.d.ts.map
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
|
+
import { applyIncludeExclude, expandMatrix } from "../matrix/expand.js";
|
|
3
|
+
import { formatExpandedJobName } from "../matrix/format.js";
|
|
4
|
+
//#region src/fanout/materialize.ts
|
|
5
|
+
/** Hard cap on children per fanned job — mirrors the compiler's MAX_STATIC_MATRIX_JOBS. */
|
|
6
|
+
const MAX_FANOUT_JOBS = 256;
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a job's matrix cannot be materialized into dispatchable children:
|
|
9
|
+
* zero combinations after exclude, or more combinations than {@link MAX_FANOUT_JOBS}.
|
|
10
|
+
* Callers map this onto the `matrix_expansion` init-failure category.
|
|
11
|
+
*/
|
|
12
|
+
var FanoutError = class FanoutError extends Error {
|
|
13
|
+
jobName;
|
|
14
|
+
name = "FanoutError";
|
|
15
|
+
constructor(jobName, message) {
|
|
16
|
+
super(message);
|
|
17
|
+
this.jobName = jobName;
|
|
18
|
+
Object.setPrototypeOf(this, FanoutError.prototype);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The job-config envelope fields that identify a materialized child: the
|
|
23
|
+
* expanded `name`, the `baseJobName` (what the agent exposes as `ctx.job.name`),
|
|
24
|
+
* and `matrixValues` (exposed as `ctx.matrix`). Every dispatch site spreads
|
|
25
|
+
* these into its job config so the envelopes stay identical. The raw
|
|
26
|
+
* matrix/include/exclude are intentionally NOT included — they are consumed at
|
|
27
|
+
* dispatch time, not shipped to the agent.
|
|
28
|
+
*/
|
|
29
|
+
function matrixEnvelopeFields(mat) {
|
|
30
|
+
return {
|
|
31
|
+
name: mat.expandedName,
|
|
32
|
+
baseJobName: mat.baseName,
|
|
33
|
+
...mat.variantValues && { matrixValues: mat.variantValues }
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Build materialized children from a resolved dynamic-matrix combination list
|
|
38
|
+
* (produced by the agent eval flow). Mirrors the static-matrix branch of
|
|
39
|
+
* {@link materializeFanout} but takes the already-resolved combinations and
|
|
40
|
+
* enforces the same cap / zero-combination guards.
|
|
41
|
+
*/
|
|
42
|
+
function materializeResolvedMatrix(lockJob, combos) {
|
|
43
|
+
if (combos.length === 0) throw new FanoutError(lockJob.name, `dynamic matrix for job '${lockJob.name}' resolved to zero combinations`);
|
|
44
|
+
if (combos.length > 256) throw new FanoutError(lockJob.name, `dynamic matrix for job '${lockJob.name}' resolved to ${combos.length} combinations (max 256)`);
|
|
45
|
+
const jobs = [];
|
|
46
|
+
const names = [];
|
|
47
|
+
for (const variantValues of combos) {
|
|
48
|
+
const expandedName = formatExpandedJobName(lockJob.name, variantValues);
|
|
49
|
+
names.push(expandedName);
|
|
50
|
+
jobs.push({
|
|
51
|
+
lockJob,
|
|
52
|
+
baseName: lockJob.name,
|
|
53
|
+
expandedName,
|
|
54
|
+
variantKind: "matrix",
|
|
55
|
+
variantValues
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
jobs,
|
|
60
|
+
expansionMap: new Map([[lockJob.name, names]])
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Expand each lock job's static matrix into N dispatchable children (one per
|
|
65
|
+
* combination), passing non-matrix and dynamic-matrix jobs through 1:1.
|
|
66
|
+
* Dynamic-matrix jobs are flagged `pendingDynamicMatrix` for the eval flow.
|
|
67
|
+
*/
|
|
68
|
+
function materializeFanout(staticJobs) {
|
|
69
|
+
const jobs = [];
|
|
70
|
+
const expansionMap = /* @__PURE__ */ new Map();
|
|
71
|
+
for (const lockJob of staticJobs) {
|
|
72
|
+
const matrix = lockJob.matrix;
|
|
73
|
+
if (!matrix) {
|
|
74
|
+
jobs.push({
|
|
75
|
+
lockJob,
|
|
76
|
+
baseName: lockJob.name,
|
|
77
|
+
expandedName: lockJob.name
|
|
78
|
+
});
|
|
79
|
+
expansionMap.set(lockJob.name, [lockJob.name]);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if (matrix._type === "dynamic") {
|
|
83
|
+
jobs.push({
|
|
84
|
+
lockJob,
|
|
85
|
+
baseName: lockJob.name,
|
|
86
|
+
expandedName: lockJob.name,
|
|
87
|
+
pendingDynamicMatrix: true
|
|
88
|
+
});
|
|
89
|
+
expansionMap.set(lockJob.name, [lockJob.name]);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
const values = matrix.values;
|
|
93
|
+
if (!values) throw new FanoutError(lockJob.name, `static matrix for job '${lockJob.name}' has no values`);
|
|
94
|
+
const combos = applyIncludeExclude(expandMatrix(values), lockJob.include, lockJob.exclude);
|
|
95
|
+
if (combos.length === 0) throw new FanoutError(lockJob.name, `matrix for job '${lockJob.name}' expands to zero combinations`);
|
|
96
|
+
if (combos.length > 256) throw new FanoutError(lockJob.name, `matrix for job '${lockJob.name}' expands to ${combos.length} combinations (max 256)`);
|
|
97
|
+
const names = [];
|
|
98
|
+
for (const variantValues of combos) {
|
|
99
|
+
const expandedName = formatExpandedJobName(lockJob.name, variantValues);
|
|
100
|
+
names.push(expandedName);
|
|
101
|
+
jobs.push({
|
|
102
|
+
lockJob,
|
|
103
|
+
baseName: lockJob.name,
|
|
104
|
+
expandedName,
|
|
105
|
+
variantKind: "matrix",
|
|
106
|
+
variantValues
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
expansionMap.set(lockJob.name, names);
|
|
110
|
+
}
|
|
111
|
+
return {
|
|
112
|
+
jobs,
|
|
113
|
+
expansionMap
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { FanoutError, MAX_FANOUT_JOBS, materializeFanout, materializeResolvedMatrix, matrixEnvelopeFields };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=materialize.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './protocol/messages/execution-status.js';
|
|
|
18
18
|
export * from './protocol/messages/scaler-event.js';
|
|
19
19
|
export * from './protocol/messages/event-log.js';
|
|
20
20
|
export * from './protocol/messages/access-log.js';
|
|
21
|
+
export * from './approval/types.js';
|
|
21
22
|
export * from './audit/access-log-policy.js';
|
|
22
23
|
export * from './audit/retention-policy.js';
|
|
23
24
|
export * from './audit/activity.js';
|
|
@@ -30,8 +31,6 @@ export { sourceRegistrationSchema, sourceRegistrationAckSchema, sourceDeregister
|
|
|
30
31
|
export * from './protocol/messages/join.js';
|
|
31
32
|
export * from './protocol/messages/peer.js';
|
|
32
33
|
export * from './protocol/messages/orchestrator-agent.js';
|
|
33
|
-
export * from './protocol/messages/test-run.js';
|
|
34
|
-
export * from './protocol/messages/observe.js';
|
|
35
34
|
export * from './trigger/types.js';
|
|
36
35
|
export * from './trigger/trigger-event-type.js';
|
|
37
36
|
export * from './trigger/decision-trace.js';
|
|
@@ -52,4 +51,7 @@ export * from './scaler/scaler-backend-type.js';
|
|
|
52
51
|
export * from './scaler/resource-types.js';
|
|
53
52
|
export * from './registration/registerable-trigger-type.js';
|
|
54
53
|
export * from './bundler/index.js';
|
|
54
|
+
export { expandSingleDimension, expandMultiDimension, expandMatrix, applyIncludeExclude, type StaticMatrixArray, type StaticMatrixObject, type MatrixInclude, type MatrixExclude, type MatrixValues, } from './matrix/expand.js';
|
|
55
|
+
export { formatMatrixSuffix, formatExpandedJobName } from './matrix/format.js';
|
|
56
|
+
export * from './fanout/materialize.js';
|
|
55
57
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-BTugEXQM.js";
|
|
2
2
|
import { MIN_PROTOCOL_VERSION, PROTOCOL_VERSION } from "./protocol/version.js";
|
|
3
3
|
import { WS_MAX_PAYLOAD_BYTES, ackSchema, errorSchema, heartbeatSchema, nackSchema } from "./protocol/messages/common.js";
|
|
4
4
|
import { ActorType, actorPrincipalSchema, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema } from "./protocol/messages/actor.js";
|
|
@@ -10,7 +10,9 @@ import { AccessLogAction, AccessLogOutcome, AccessLogSource, AccessLogTargetType
|
|
|
10
10
|
import { browserJobContextSchema, browserRunEventSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, jobContextMessageSchema, runEventMessageSchema } from "./protocol/messages/run-events.js";
|
|
11
11
|
import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./protocol/messages/event-log.js";
|
|
12
12
|
import { ScalerBackendType } from "./scaler/scaler-backend-type.js";
|
|
13
|
-
import {
|
|
13
|
+
import { ApprovalDecision, HoldScope, TriggerSource, approvalRequirementSchema, approverClauseSchema } from "./approval/types.js";
|
|
14
|
+
import { IfFailedPolicy, NeedsEntrySchema, NeedsGroupEntrySchema, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob } from "./trigger/types.js";
|
|
15
|
+
import { EnvDeleteErrorCode, EventLogPayloadStreamError, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListItemSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, eventLogListItemSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, identityLinkItemSchema, identityLinkListResponseSchema, manualScheduleRequestSchema, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, orgMemberSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, runCancelRequestSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, trustPolicyResponseSchema } from "./protocol/messages/dashboard.js";
|
|
14
16
|
import { WEBHOOK_RELAY_CHUNK_SIZE, WEBHOOK_RELAY_MAX_BODY_BYTES, WebhookRelayResult, cacheStatsSchema, executionEventSchema, logChunkSchema, orchMetricsSchema, orchestratorToPlatformMessageSchema, peerDiscoverSchema, peerUpdateSchema, platformToOrchestratorMessageSchema, staleCheckrunCleanupSchema, trustPolicyUpdateSchema, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema } from "./protocol/messages/platform-orchestrator.js";
|
|
15
17
|
import { ScalerEventType } from "./protocol/messages/scaler-event.js";
|
|
16
18
|
import { AccessLogPolicyKind, POLICY_BY_ACTION, fnv1a32, shouldRecordAccess, shouldRecordSecretResolve } from "./audit/access-log-policy.js";
|
|
@@ -20,11 +22,8 @@ import { logPullOrchToPlatformSchema, logPullPlatformToOrchSchema } from "./prot
|
|
|
20
22
|
import { EVENT_LOG_PAYLOAD_CHUNK_BYTES } from "./protocol/event-log-payload.js";
|
|
21
23
|
import { browserAuthFailureSchema, browserAuthRefreshSchema, browserAuthRequestSchema, browserAuthSuccessSchema, browserErrorSchema, browserEventLogPayloadFetchSchema, browserGapSchema, browserJobNewSchema, browserJobStatusSchema, browserLogLinesSchema, browserLogStreamTerminatedReason, browserLogStreamTerminatedSchema, browserLogSubscribeSchema, browserLogUnsubscribeSchema, browserPingSchema, browserPongSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, platformToBrowserMessageSchema } from "./protocol/messages/browser.js";
|
|
22
24
|
import { joinRequestSchema, joinResponseSchema } from "./protocol/messages/join.js";
|
|
23
|
-
import { jobProgressSchema, jobRerouteAckSchema, jobRerouteSchema, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerScalerEventSchema, peerToPeerMessageSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema } from "./protocol/messages/peer.js";
|
|
24
|
-
import { CacheRefScope, JobRejectReason, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, gitAuthSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, registerAckSchema } from "./protocol/messages/orchestrator-agent.js";
|
|
25
|
-
import { testCancelResponseSchema, testCancelSchema, testEventSchema, testTriggerResponseSchema, testTriggerSchema } from "./protocol/messages/test-run.js";
|
|
26
|
-
import { observeCompleteSchema, observeLogSchema, observeStatusSchema, observeStepSchema, observeSubscribeSchema } from "./protocol/messages/observe.js";
|
|
27
|
-
import { NeedsEntrySchema, NeedsGroupEntrySchema, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob } from "./trigger/types.js";
|
|
25
|
+
import { fleetSelectionSchema, jobProgressSchema, jobRerouteAckSchema, jobRerouteSchema, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema } from "./protocol/messages/peer.js";
|
|
26
|
+
import { CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, gitAuthSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, provenanceUploadCompleteSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, registerAckSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema } from "./protocol/messages/orchestrator-agent.js";
|
|
28
27
|
import { TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES } from "./trigger/trigger-event-type.js";
|
|
29
28
|
import { createTraceEntry, createWorkflowDecision } from "./trigger/decision-trace.js";
|
|
30
29
|
import { matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchWorkflowTriggers } from "./trigger/matcher.js";
|
|
@@ -44,4 +43,7 @@ import { parseMemoryString, resourceRequestNestedSchema, resourceSpecSchema, val
|
|
|
44
43
|
import { RegisterableTriggerType } from "./registration/registerable-trigger-type.js";
|
|
45
44
|
import { createWorkflowBundleConfig } from "./bundler/rolldown-config.js";
|
|
46
45
|
import "./bundler/index.js";
|
|
47
|
-
|
|
46
|
+
import { applyIncludeExclude, expandMatrix, expandMultiDimension, expandSingleDimension } from "./matrix/expand.js";
|
|
47
|
+
import { formatExpandedJobName, formatMatrixSuffix } from "./matrix/format.js";
|
|
48
|
+
import { FanoutError, MAX_FANOUT_JOBS, materializeFanout, materializeResolvedMatrix, matrixEnvelopeFields } from "./fanout/materialize.js";
|
|
49
|
+
export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, ApprovalDecision, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckRunConclusion, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EnvDeleteErrorCode, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, FanoutError, HOST_LABEL_PREFIX, HeldRunQueueType, HeldRunStatus, HoldScope, IfFailedPolicy, InitFailureCategory, JobRejectReason, KICI_AGENT_ENV_PREFIX, KNOWN_ROLES, LockFileParseError, MAX_FANOUT_JOBS, MIN_PROTOCOL_VERSION, NeedsEntrySchema, NeedsGroupEntrySchema, ORCH_CAPABILITIES, OrchRole, POLICY_BY_ACTION, PROTOCOL_VERSION, PayloadOmittedReason, RegisterableTriggerType, SANDBOX_DEFAULT_VARS, SCHEMA_VERSION, SELF_REPORTED_LABEL_PREFIXES, ScalerBackendType, ScalerEventType, SourceProvider, SourceSubtype, StepApprovalOutcome, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, TestRelayType, TimeoutReason, TriggerSource, WEBHOOK_RELAY_CHUNK_SIZE, WEBHOOK_RELAY_MAX_BODY_BYTES, WS_CLOSE_AGENT_AUTH_FAILED, WS_CLOSE_AUTH_TIMEOUT, WS_CLOSE_CLUSTER_NAME_CONFLICT, WS_CLOSE_DISPATCH_ACK_TIMEOUT, WS_CLOSE_GOING_AWAY, WS_CLOSE_HEARTBEAT_TIMEOUT, WS_CLOSE_INTERNAL_ERROR, WS_CLOSE_INVALID_MESSAGE, WS_CLOSE_PLAN_LIMIT, WS_CLOSE_PROTOCOL_ERROR, WS_CLOSE_RUN_NOT_FOUND, WS_CLOSE_UNAUTHORIZED, WS_MAX_PAYLOAD_BYTES, WebhookRelayResult, WsRateLimiter, accessLogFilterSchema, accessLogItemSchema, accessLogWarmSqlCase, ackSchema, activityCursorSchema, activityFilterSchema, activityRowSchema, actorPrincipalSchema, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, agentTypeLabel, apiKeyActorSchema, applyIncludeExclude, approvalRequirementSchema, approverClauseSchema, attestationListItemSchema, auditLogColdDays, auditLogWarmDays, auditLogWarmSqlCase, authFailureSchema, authRequestSchema, authSuccessSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserAuthFailureSchema, browserAuthRefreshSchema, browserAuthRequestSchema, browserAuthSuccessSchema, browserErrorSchema, browserEventLogPayloadChunkSchema, browserEventLogPayloadFetchSchema, browserGapSchema, browserJobContextSchema, browserJobNewSchema, browserJobStatusSchema, browserLogLinesSchema, browserLogStreamTerminatedReason, browserLogStreamTerminatedSchema, browserLogSubscribeSchema, browserLogUnsubscribeSchema, browserPingSchema, browserPongSchema, browserRunEventSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, cacheStatsSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, createTraceEntry, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardJobDetailSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, errorSchema, eventEmitResponseSchema, eventEmitSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, expandMatrix, expandMultiDimension, expandSingleDimension, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, gitAuthSchema, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostLabel, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob, isSelfReportedLabel, isTerminal, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressSchema, jobRejectSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, logChunkSchema, logPullOrchToPlatformSchema, logPullPlatformToOrchSchema, manualScheduleRequestSchema, matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchScopePattern, matchWorkflowTriggers, materializeFanout, materializeResolvedMatrix, matrixEnvelopeFields, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, normalizeRunsOn, orchCapabilitiesSchema, orchMetricsSchema, orchestratorToAgentMessageSchema, orchestratorToPlatformMessageSchema, orgMemberSchema, parseActor, parseHostLabel, parseMemoryString, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerDiscoverSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, peerUpdateSchema, platformOperatorActorSchema, platformToBrowserMessageSchema, platformToOrchestratorMessageSchema, provenanceUploadCompleteSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, resolveRoleLabels, resolveRunIdSugar, resolveSecretsForEnvironment, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, transition, trustPolicyResponseSchema, trustPolicyUpdateSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema };
|
package/dist/labels.js
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Single-dimension static matrix: array of values */
|
|
2
|
+
export type StaticMatrixArray = string[];
|
|
3
|
+
/** Multi-dimensional static matrix: named dimensions with values */
|
|
4
|
+
export type StaticMatrixObject = Record<string, string[]>;
|
|
5
|
+
/** Include entries for adding specific matrix combinations */
|
|
6
|
+
export type MatrixInclude = Record<string, string>;
|
|
7
|
+
/** Exclude entries for removing specific matrix combinations */
|
|
8
|
+
export type MatrixExclude = Record<string, string>;
|
|
9
|
+
/**
|
|
10
|
+
* Matrix values as exposed to steps.
|
|
11
|
+
* Single-dimension: {value: 'linux'}
|
|
12
|
+
* Multi-dimensional: {os: 'linux', node: '18'}
|
|
13
|
+
*/
|
|
14
|
+
export interface MatrixValues {
|
|
15
|
+
/** Single-dimension: the value */
|
|
16
|
+
value?: string;
|
|
17
|
+
/** Multi-dimensional: named properties */
|
|
18
|
+
[dimension: string]: string | undefined;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Expand single-dimension matrix (array form) to MatrixValues array.
|
|
22
|
+
* Each value becomes {value: string}.
|
|
23
|
+
*/
|
|
24
|
+
export declare function expandSingleDimension(matrix: StaticMatrixArray): MatrixValues[];
|
|
25
|
+
/**
|
|
26
|
+
* Expand multi-dimensional matrix (object form) to MatrixValues array.
|
|
27
|
+
* Uses fast-cartesian to compute cartesian product of all dimensions.
|
|
28
|
+
* Dimension names are sorted for deterministic output.
|
|
29
|
+
*/
|
|
30
|
+
export declare function expandMultiDimension(matrix: StaticMatrixObject): MatrixValues[];
|
|
31
|
+
/**
|
|
32
|
+
* Unified expand function that dispatches to single or multi-dimensional expansion.
|
|
33
|
+
*/
|
|
34
|
+
export declare function expandMatrix(matrix: StaticMatrixArray | StaticMatrixObject): MatrixValues[];
|
|
35
|
+
/**
|
|
36
|
+
* Apply include/exclude modifications to expanded matrix combinations.
|
|
37
|
+
* Exclude first (remove matching), then include (add new).
|
|
38
|
+
*
|
|
39
|
+
* Exclude matches if ALL specified dimensions match.
|
|
40
|
+
* Include adds new combinations if they don't already exist.
|
|
41
|
+
*/
|
|
42
|
+
export declare function applyIncludeExclude(expanded: MatrixValues[], include?: MatrixInclude[], exclude?: MatrixExclude[]): MatrixValues[];
|
|
43
|
+
//# sourceMappingURL=expand.d.ts.map
|