@kici-dev/engine 0.1.16 → 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.
Files changed (98) hide show
  1. package/dist/approval/types.js +1 -1
  2. package/dist/audit/access-log-policy.js +3 -1
  3. package/dist/audit/activity.js +1 -1
  4. package/dist/audit/retention-policy.js +5 -1
  5. package/dist/bundler/index.js +1 -1
  6. package/dist/bundler/rolldown-config.js +1 -1
  7. package/dist/env/environment-allowlist.js +1 -1
  8. package/dist/environment/index.js +1 -1
  9. package/dist/environment/scope-resolver.js +1 -1
  10. package/dist/environment/types.js +1 -1
  11. package/dist/fanout/materialize.d.ts +67 -0
  12. package/dist/fanout/materialize.js +119 -0
  13. package/dist/index.d.ts +3 -2
  14. package/dist/index.js +8 -7
  15. package/dist/labels.js +1 -1
  16. package/dist/matrix/expand.d.ts +43 -0
  17. package/dist/matrix/expand.js +66 -0
  18. package/dist/matrix/format.d.ts +10 -0
  19. package/dist/matrix/format.js +19 -0
  20. package/dist/metrics/catalog-policy.js +8 -3
  21. package/dist/metrics/metric-catalog.generated.d.ts +1 -1
  22. package/dist/metrics/metric-catalog.generated.js +2 -2
  23. package/dist/protocol/analytics-events.js +1 -1
  24. package/dist/protocol/cluster-name.js +1 -1
  25. package/dist/protocol/dashboard-global-workflows.js +1 -1
  26. package/dist/protocol/dashboard-write-operations.js +1 -1
  27. package/dist/protocol/event-log-payload.js +1 -1
  28. package/dist/protocol/messages/access-log.d.ts +15 -5
  29. package/dist/protocol/messages/access-log.js +3 -1
  30. package/dist/protocol/messages/actor.js +1 -1
  31. package/dist/protocol/messages/auth.d.ts +1 -0
  32. package/dist/protocol/messages/auth.js +11 -2
  33. package/dist/protocol/messages/browser.js +1 -1
  34. package/dist/protocol/messages/capabilities.js +1 -1
  35. package/dist/protocol/messages/common.js +1 -1
  36. package/dist/protocol/messages/dashboard-global-workflows.js +1 -1
  37. package/dist/protocol/messages/dashboard.d.ts +976 -56
  38. package/dist/protocol/messages/dashboard.js +362 -6
  39. package/dist/protocol/messages/event-log.js +1 -1
  40. package/dist/protocol/messages/execution-status.d.ts +13 -1
  41. package/dist/protocol/messages/execution-status.js +13 -3
  42. package/dist/protocol/messages/join.js +1 -1
  43. package/dist/protocol/messages/log-pull.js +1 -1
  44. package/dist/protocol/messages/observe.d.ts +1 -0
  45. package/dist/protocol/messages/oidc-token-relay.d.ts +31 -0
  46. package/dist/protocol/messages/oidc-token-relay.js +34 -0
  47. package/dist/protocol/messages/orchestrator-agent.d.ts +41 -0
  48. package/dist/protocol/messages/orchestrator-agent.js +33 -2
  49. package/dist/protocol/messages/peer.js +1 -1
  50. package/dist/protocol/messages/platform-orchestrator.d.ts +171 -4
  51. package/dist/protocol/messages/platform-orchestrator.js +1 -1
  52. package/dist/protocol/messages/run-events.js +1 -1
  53. package/dist/protocol/messages/scaler-event.js +1 -1
  54. package/dist/protocol/messages/source-registration.d.ts +7 -6
  55. package/dist/protocol/messages/source-registration.js +7 -6
  56. package/dist/protocol/version.js +1 -1
  57. package/dist/provenance/bundle.d.ts +54 -0
  58. package/dist/provenance/bundle.js +53 -0
  59. package/dist/provenance/dsse.d.ts +39 -0
  60. package/dist/provenance/dsse.js +53 -0
  61. package/dist/provenance/schema.js +1 -1
  62. package/dist/provenance/verify.d.ts +71 -0
  63. package/dist/provenance/verify.js +135 -0
  64. package/dist/provider/changed-files-fetcher.js +1 -1
  65. package/dist/provider/check-run-conclusion.js +1 -1
  66. package/dist/provider/check-status-poster.js +1 -1
  67. package/dist/provider/clone-token-provider.js +1 -1
  68. package/dist/provider/contributor-resolver.js +1 -1
  69. package/dist/provider/index.js +1 -1
  70. package/dist/provider/lock-file-fetcher.js +1 -1
  71. package/dist/provider/lock-file-parse-error.js +3 -1
  72. package/dist/provider/repo-url-builder.js +1 -1
  73. package/dist/provider/types.d.ts +2 -2
  74. package/dist/provider/types.js +1 -1
  75. package/dist/provider/webhook-normalizer.js +1 -1
  76. package/dist/registration/registerable-trigger-type.js +1 -1
  77. package/dist/scaler/resource-types.js +1 -1
  78. package/dist/scaler/scaler-backend-type.js +1 -1
  79. package/dist/secrets/index.js +1 -1
  80. package/dist/secrets/types.js +1 -1
  81. package/dist/state-machine/index.js +1 -1
  82. package/dist/state-machine/machine.js +1 -1
  83. package/dist/state-machine/types.js +1 -1
  84. package/dist/trigger/decision-trace.js +1 -1
  85. package/dist/trigger/jsonpath-matcher.js +1 -1
  86. package/dist/trigger/matcher.js +1 -1
  87. package/dist/trigger/trigger-event-type.js +1 -1
  88. package/dist/trigger/types.d.ts +13 -1
  89. package/dist/trigger/types.js +13 -5
  90. package/dist/webhook/signature.js +1 -1
  91. package/dist/ws/close-codes.js +1 -1
  92. package/dist/ws/rate-limiter.js +3 -1
  93. package/dist/ws/ws-like.js +1 -1
  94. package/package.json +19 -1
  95. package/sbom.spdx.json +55 -5
  96. package/dist/protocol/messages/observe.js +0 -70
  97. package/dist/protocol/messages/test-run.js +0 -52
  98. /package/dist/{chunk-gOLHoazu.js → chunk-BTugEXQM.js} +0 -0
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  import { z } from "zod";
3
3
  //#region src/approval/types.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
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" },
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  import { ActorType } from "../protocol/messages/actor.js";
3
3
  import { AccessLogOutcome } from "../protocol/messages/access-log.js";
4
4
  import { z } from "zod";
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
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,
@@ -254,6 +256,7 @@ const ACCESS_LOG_COLD_DAYS = {
254
256
  "sources.list.read": 180,
255
257
  "run.orch_logs.read": 180,
256
258
  "step.logs.read": 180,
259
+ "attestations.read": 180,
257
260
  "event_log.list.read": 180,
258
261
  "environment.list.read": 180,
259
262
  "environment.get.read": 180,
@@ -277,6 +280,7 @@ const ACCESS_LOG_COLD_DAYS = {
277
280
  "run.cancel": 730,
278
281
  "run.rerun": 730,
279
282
  "run.manual_schedule": 730,
283
+ "run.trigger": 730,
280
284
  "job.cancel": 730,
281
285
  "environment.create": 730,
282
286
  "environment.update": 730,
@@ -1,3 +1,3 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  import { createWorkflowBundleConfig } from "./rolldown-config.js";
3
3
  export { createWorkflowBundleConfig };
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  //#region src/bundler/rolldown-config.ts
3
3
  /**
4
4
  * Create a rolldown configuration for workflow bundling.
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  //#region src/env/environment-allowlist.ts
3
3
  /**
4
4
  * Shared environment allowlist constants for KiCI.
@@ -1,3 +1,3 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  import { matchScopePattern, resolveSecretsForEnvironment, stripScopePrefix } from "./scope-resolver.js";
3
3
  export { matchScopePattern, resolveSecretsForEnvironment, stripScopePrefix };
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  import picomatch from "picomatch";
3
3
  //#region src/environment/scope-resolver.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import "../chunk-gOLHoazu.js";
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
@@ -31,8 +31,6 @@ export { sourceRegistrationSchema, sourceRegistrationAckSchema, sourceDeregister
31
31
  export * from './protocol/messages/join.js';
32
32
  export * from './protocol/messages/peer.js';
33
33
  export * from './protocol/messages/orchestrator-agent.js';
34
- export * from './protocol/messages/test-run.js';
35
- export * from './protocol/messages/observe.js';
36
34
  export * from './trigger/types.js';
37
35
  export * from './trigger/trigger-event-type.js';
38
36
  export * from './trigger/decision-trace.js';
@@ -53,4 +51,7 @@ export * from './scaler/scaler-backend-type.js';
53
51
  export * from './scaler/resource-types.js';
54
52
  export * from './registration/registerable-trigger-type.js';
55
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';
56
57
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-gOLHoazu.js";
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";
@@ -11,7 +11,8 @@ import { browserJobContextSchema, browserRunEventSchema, dashboardOrchLogsReques
11
11
  import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./protocol/messages/event-log.js";
12
12
  import { ScalerBackendType } from "./scaler/scaler-backend-type.js";
13
13
  import { ApprovalDecision, HoldScope, TriggerSource, approvalRequirementSchema, approverClauseSchema } from "./approval/types.js";
14
- import { EnvDeleteErrorCode, EventLogPayloadStreamError, HeldRunQueueType, HeldRunStatus, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, 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, 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, runRerunRequestSchema, trustPolicyResponseSchema } from "./protocol/messages/dashboard.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";
15
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";
16
17
  import { ScalerEventType } from "./protocol/messages/scaler-event.js";
17
18
  import { AccessLogPolicyKind, POLICY_BY_ACTION, fnv1a32, shouldRecordAccess, shouldRecordSecretResolve } from "./audit/access-log-policy.js";
@@ -22,10 +23,7 @@ import { EVENT_LOG_PAYLOAD_CHUNK_BYTES } from "./protocol/event-log-payload.js";
22
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";
23
24
  import { joinRequestSchema, joinResponseSchema } from "./protocol/messages/join.js";
24
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";
25
- 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, registerAckSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema } from "./protocol/messages/orchestrator-agent.js";
26
- import { testCancelResponseSchema, testCancelSchema, testEventSchema, testTriggerResponseSchema, testTriggerSchema } from "./protocol/messages/test-run.js";
27
- import { observeCompleteSchema, observeLogSchema, observeStatusSchema, observeStepSchema, observeSubscribeSchema } from "./protocol/messages/observe.js";
28
- import { NeedsEntrySchema, NeedsGroupEntrySchema, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob } from "./trigger/types.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";
29
27
  import { TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES } from "./trigger/trigger-event-type.js";
30
28
  import { createTraceEntry, createWorkflowDecision } from "./trigger/decision-trace.js";
31
29
  import { matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchWorkflowTriggers } from "./trigger/matcher.js";
@@ -45,4 +43,7 @@ import { parseMemoryString, resourceRequestNestedSchema, resourceSpecSchema, val
45
43
  import { RegisterableTriggerType } from "./registration/registerable-trigger-type.js";
46
44
  import { createWorkflowBundleConfig } from "./bundler/rolldown-config.js";
47
45
  import "./bundler/index.js";
48
- 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, HOST_LABEL_PREFIX, HeldRunQueueType, HeldRunStatus, HoldScope, InitFailureCategory, JobRejectReason, KICI_AGENT_ENV_PREFIX, KNOWN_ROLES, LockFileParseError, 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, 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, approvalRequirementSchema, approverClauseSchema, 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, 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, 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, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, fleetSelectionSchema, fnv1a32, 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, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, normalizeRunsOn, observeCompleteSchema, observeLogSchema, observeStatusSchema, observeStepSchema, observeSubscribeSchema, 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, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, resolveRoleLabels, resolveRunIdSugar, resolveSecretsForEnvironment, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testCancelResponseSchema, testCancelSchema, testEventSchema, testTriggerResponseSchema, testTriggerSchema, transition, trustPolicyResponseSchema, trustPolicyUpdateSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema };
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
@@ -1,4 +1,4 @@
1
- import "./chunk-gOLHoazu.js";
1
+ import "./chunk-BTugEXQM.js";
2
2
  //#region src/labels.ts
3
3
  /**
4
4
  * Structured auto-labels with category prefixes.
@@ -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
@@ -0,0 +1,66 @@
1
+ import "../chunk-BTugEXQM.js";
2
+ import fastCartesian from "fast-cartesian";
3
+ //#region src/matrix/expand.ts
4
+ /**
5
+ * Expand single-dimension matrix (array form) to MatrixValues array.
6
+ * Each value becomes {value: string}.
7
+ */
8
+ function expandSingleDimension(matrix) {
9
+ return matrix.map((value) => ({ value }));
10
+ }
11
+ /**
12
+ * Expand multi-dimensional matrix (object form) to MatrixValues array.
13
+ * Uses fast-cartesian to compute cartesian product of all dimensions.
14
+ * Dimension names are sorted for deterministic output.
15
+ */
16
+ function expandMultiDimension(matrix) {
17
+ const dimensions = Object.entries(matrix);
18
+ if (dimensions.length === 0) return [];
19
+ dimensions.sort((a, b) => a[0].localeCompare(b[0]));
20
+ const names = dimensions.map(([name]) => name);
21
+ return fastCartesian(dimensions.map(([, values]) => values)).map((combo) => {
22
+ const result = {};
23
+ names.forEach((name, idx) => {
24
+ result[name] = combo[idx];
25
+ });
26
+ return result;
27
+ });
28
+ }
29
+ /**
30
+ * Unified expand function that dispatches to single or multi-dimensional expansion.
31
+ */
32
+ function expandMatrix(matrix) {
33
+ if (Array.isArray(matrix)) return expandSingleDimension(matrix);
34
+ return expandMultiDimension(matrix);
35
+ }
36
+ /**
37
+ * Apply include/exclude modifications to expanded matrix combinations.
38
+ * Exclude first (remove matching), then include (add new).
39
+ *
40
+ * Exclude matches if ALL specified dimensions match.
41
+ * Include adds new combinations if they don't already exist.
42
+ */
43
+ function applyIncludeExclude(expanded, include, exclude) {
44
+ let result = [...expanded];
45
+ if (exclude && exclude.length > 0) result = result.filter((combo) => {
46
+ return !exclude.some((excl) => {
47
+ const exclEntries = Object.entries(excl);
48
+ if (exclEntries.length === 0) return false;
49
+ return exclEntries.every(([key, value]) => combo[key] === value);
50
+ });
51
+ });
52
+ if (include && include.length > 0) for (const incl of include) {
53
+ const inclKeys = Object.keys(incl);
54
+ if (inclKeys.length === 0) continue;
55
+ if (!result.some((combo) => {
56
+ const comboKeys = Object.keys(combo);
57
+ if (inclKeys.length !== comboKeys.length) return false;
58
+ return inclKeys.every((key) => combo[key] === incl[key]);
59
+ })) result.push(incl);
60
+ }
61
+ return result;
62
+ }
63
+ //#endregion
64
+ export { applyIncludeExclude, expandMatrix, expandMultiDimension, expandSingleDimension };
65
+
66
+ //# sourceMappingURL=expand.js.map
@@ -0,0 +1,10 @@
1
+ import type { MatrixValues } from './expand.js';
2
+ /**
3
+ * Format matrix values into a display string for the job name.
4
+ * Single-dimension: "node-18"
5
+ * Multi-dimensional: "linux, 18"
6
+ */
7
+ export declare function formatMatrixSuffix(matrixValues: MatrixValues): string;
8
+ /** Expanded child job name: `${baseName} (${suffix})`. MUST match the local executor. */
9
+ export declare function formatExpandedJobName(baseName: string, matrixValues: MatrixValues): string;
10
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1,19 @@
1
+ import "../chunk-BTugEXQM.js";
2
+ //#region src/matrix/format.ts
3
+ /**
4
+ * Format matrix values into a display string for the job name.
5
+ * Single-dimension: "node-18"
6
+ * Multi-dimensional: "linux, 18"
7
+ */
8
+ function formatMatrixSuffix(matrixValues) {
9
+ if ("value" in matrixValues && matrixValues.value !== void 0) return matrixValues.value;
10
+ return Object.values(matrixValues).filter((v) => v !== void 0).join(", ");
11
+ }
12
+ /** Expanded child job name: `${baseName} (${suffix})`. MUST match the local executor. */
13
+ function formatExpandedJobName(baseName, matrixValues) {
14
+ return `${baseName} (${formatMatrixSuffix(matrixValues)})`;
15
+ }
16
+ //#endregion
17
+ export { formatExpandedJobName, formatMatrixSuffix };
18
+
19
+ //# sourceMappingURL=format.js.map
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  import { MetricNames, MetricService } from "./metric-catalog.generated.js";
3
3
  //#region src/metrics/catalog-policy.ts
4
4
  /**
@@ -138,7 +138,11 @@ const METRIC_LABEL_POLICY = {
138
138
  machinePool: { maxUniqueValues: 50 }
139
139
  },
140
140
  kici_orch_install_secrets_decisions_total: {
141
- decision: { values: ["pass", "reject"] },
141
+ decision: { values: [
142
+ "pass",
143
+ "reject",
144
+ "hold"
145
+ ] },
142
146
  reason: { values: [
143
147
  "ok",
144
148
  "malformed_ref",
@@ -148,7 +152,8 @@ const METRIC_LABEL_POLICY = {
148
152
  "env_not_found",
149
153
  "protection_rule_block",
150
154
  "missing_token",
151
- "missing_install_env"
155
+ "missing_install_env",
156
+ "held"
152
157
  ] }
153
158
  },
154
159
  kici_orch_install_secrets_npm_registry_used_total: {
@@ -431,7 +431,7 @@ export declare const MetricDescription: {
431
431
  readonly KICI_ORCH_EXECUTIONS_TOTAL: "Total number of execution runs";
432
432
  readonly KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: "Total number of GitHub check run API calls";
433
433
  readonly KICI_ORCH_INSTALL_SECRETS_CONTRIBUTOR_STRIPPED_TOTAL: "Dispatches where registry tokens were stripped because the contributor tier was not `trusted`";
434
- readonly KICI_ORCH_INSTALL_SECRETS_DECISIONS_TOTAL: "Total install-secrets resolution decisions (pass / reject + reason)";
434
+ readonly KICI_ORCH_INSTALL_SECRETS_DECISIONS_TOTAL: "Total install-secrets resolution decisions (pass / reject / hold + reason)";
435
435
  readonly KICI_ORCH_INSTALL_SECRETS_NPM_REGISTRY_USED_TOTAL: "Total registry / installEnv entries successfully resolved per channel / provider / scope";
436
436
  readonly KICI_ORCH_INSTALL_SECRETS_TOKEN_RESOLUTION_DURATION_SECONDS: "Duration of per-environment secret resolution during install-secrets evaluation";
437
437
  readonly KICI_ORCH_JOB_CONSECUTIVE_FAILURES: "Consecutive failures for each scheduled job since its last success";
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  //#region src/metrics/metric-catalog.generated.ts
3
3
  const MetricNames = {
4
4
  KICI_AGENT_CLONE_DURATION_SECONDS: "kici_agent_clone_duration_seconds",
@@ -440,7 +440,7 @@ const MetricDescription = {
440
440
  KICI_ORCH_EXECUTIONS_TOTAL: "Total number of execution runs",
441
441
  KICI_ORCH_GITHUB_CHECK_RUN_TOTAL: "Total number of GitHub check run API calls",
442
442
  KICI_ORCH_INSTALL_SECRETS_CONTRIBUTOR_STRIPPED_TOTAL: "Dispatches where registry tokens were stripped because the contributor tier was not `trusted`",
443
- KICI_ORCH_INSTALL_SECRETS_DECISIONS_TOTAL: "Total install-secrets resolution decisions (pass / reject + reason)",
443
+ KICI_ORCH_INSTALL_SECRETS_DECISIONS_TOTAL: "Total install-secrets resolution decisions (pass / reject / hold + reason)",
444
444
  KICI_ORCH_INSTALL_SECRETS_NPM_REGISTRY_USED_TOTAL: "Total registry / installEnv entries successfully resolved per channel / provider / scope",
445
445
  KICI_ORCH_INSTALL_SECRETS_TOKEN_RESOLUTION_DURATION_SECONDS: "Duration of per-environment secret resolution during install-secrets evaluation",
446
446
  KICI_ORCH_JOB_CONSECUTIVE_FAILURES: "Consecutive failures for each scheduled job since its last success",
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  import { z } from "zod";
3
3
  //#region src/protocol/analytics-events.ts
4
4
  const AnalyticsEvent = z.enum([
@@ -1,4 +1,4 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  import { z } from "zod";
3
3
  //#region src/protocol/cluster-name.ts
4
4
  /**
@@ -1,3 +1,3 @@
1
- import "../chunk-gOLHoazu.js";
1
+ import "../chunk-BTugEXQM.js";
2
2
  import { globalWorkflowSettingsSchema, globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema, repoPatternEntrySchema } from "./messages/dashboard-global-workflows.js";
3
3
  export { globalWorkflowSettingsSchema, globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema, repoPatternEntrySchema };