@kici-dev/engine 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/audit/access-log-policy.js +1 -0
  2. package/dist/audit/retention-policy.js +2 -0
  3. package/dist/billing/subscription-status.d.ts +38 -0
  4. package/dist/billing/subscription-status.js +63 -0
  5. package/dist/context/host-match.d.ts +25 -2
  6. package/dist/context/host-match.js +29 -7
  7. package/dist/index.d.ts +6 -1
  8. package/dist/index.js +10 -5
  9. package/dist/labels/compile.d.ts +3 -1
  10. package/dist/labels/compile.js +10 -5
  11. package/dist/labels-canonical.d.ts +36 -0
  12. package/dist/labels-canonical.js +21 -0
  13. package/dist/labels-match.d.ts +38 -7
  14. package/dist/labels-match.js +45 -9
  15. package/dist/metrics/catalog-policy.js +6 -1
  16. package/dist/metrics/metric-catalog.generated.d.ts +97 -2
  17. package/dist/metrics/metric-catalog.generated.js +116 -2
  18. package/dist/protocol/dashboard-write-operations.d.ts +17 -0
  19. package/dist/protocol/dashboard-write-operations.js +20 -3
  20. package/dist/protocol/messages/access-log.d.ts +5 -0
  21. package/dist/protocol/messages/access-log.js +1 -0
  22. package/dist/protocol/messages/config-paths.d.ts +20 -0
  23. package/dist/protocol/messages/config-paths.js +27 -0
  24. package/dist/protocol/messages/dashboard.d.ts +137 -0
  25. package/dist/protocol/messages/dashboard.js +80 -2
  26. package/dist/protocol/messages/event-log.d.ts +6 -0
  27. package/dist/protocol/messages/event-log.js +6 -0
  28. package/dist/protocol/messages/orchestrator-agent.d.ts +32 -0
  29. package/dist/protocol/messages/orchestrator-agent.js +52 -5
  30. package/dist/protocol/messages/peer.d.ts +3 -0
  31. package/dist/protocol/messages/peer.js +6 -1
  32. package/dist/protocol/messages/platform-orchestrator.d.ts +36 -0
  33. package/dist/protocol/messages/source-registration.d.ts +5 -0
  34. package/dist/protocol/messages/source-registration.js +8 -0
  35. package/dist/provenance/id-token-event-claims.d.ts +142 -0
  36. package/dist/provenance/id-token-event-claims.js +113 -0
  37. package/dist/provenance/statement-hash.d.ts +14 -5
  38. package/dist/provenance/statement-hash.js +14 -5
  39. package/dist/provenance/verify.d.ts +21 -0
  40. package/dist/provenance/verify.js +26 -16
  41. package/dist/regex-flags.d.ts +32 -0
  42. package/dist/regex-flags.js +43 -0
  43. package/dist/trigger/compiled-matchers.d.ts +9 -2
  44. package/dist/trigger/compiled-matchers.js +14 -5
  45. package/dist/trigger/decision-trace.d.ts +1 -1
  46. package/dist/trigger/decision-trace.js +1 -1
  47. package/dist/trigger/text-match.d.ts +8 -3
  48. package/dist/trigger/text-match.js +11 -5
  49. package/dist/trigger/trigger-event-type.d.ts +16 -0
  50. package/dist/trigger/trigger-event-type.js +25 -1
  51. package/dist/trigger/types.d.ts +55 -4
  52. package/dist/trigger/types.js +5 -1
  53. package/dist/ws/close-codes.d.ts +8 -0
  54. package/dist/ws/close-codes.js +9 -1
  55. package/package.json +1 -1
  56. package/sbom.spdx.json +5 -5
@@ -176,6 +176,7 @@ const POLICY_BY_ACTION = {
176
176
  "db.reindex": { kind: "always" },
177
177
  "db.refresh_collation_version": { kind: "always" },
178
178
  "access_log.list.read": { kind: "always" },
179
+ "admin_tokens.list.read": { kind: "always" },
179
180
  "event_dlq.list.read": {
180
181
  kind: "sample",
181
182
  allowedRate: .2
@@ -41,6 +41,7 @@ const ACCESS_LOG_WARM_DAYS = {
41
41
  "context_var.list.read": 180,
42
42
  "source_override.list.read": 180,
43
43
  "access_log.list.read": 180,
44
+ "admin_tokens.list.read": 180,
44
45
  "secret.list.read": 180,
45
46
  "run.cancel": 180,
46
47
  "run.rerun": 180,
@@ -296,6 +297,7 @@ const ACCESS_LOG_COLD_DAYS = {
296
297
  "context_var.list.read": 730,
297
298
  "source_override.list.read": 730,
298
299
  "access_log.list.read": 730,
300
+ "admin_tokens.list.read": 730,
299
301
  "secret.list.read": 730,
300
302
  "run.cancel": 730,
301
303
  "run.rerun": 730,
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * The Stripe subscription-status vocabulary, as stored in
4
+ * `organizations.stripe_subscription_status`.
5
+ *
6
+ * Lives in the engine rather than the Platform package for the same reason
7
+ * `plan-type.ts` does: the browser dashboard must classify a status with the
8
+ * same predicate the Platform route uses, and it cannot import a private
9
+ * package. Pure Zod with no Node built-ins, so it is safe on the engine barrel.
10
+ *
11
+ * The stored column is plain text written straight from Stripe, so read it with
12
+ * `safeParse` — a status Stripe adds later must not fail a whole response.
13
+ */
14
+ export declare const StripeSubscriptionStatus: z.ZodEnum<{
15
+ active: "active";
16
+ canceled: "canceled";
17
+ incomplete: "incomplete";
18
+ incomplete_expired: "incomplete_expired";
19
+ past_due: "past_due";
20
+ paused: "paused";
21
+ trialing: "trialing";
22
+ unpaid: "unpaid";
23
+ }>;
24
+ export type StripeSubscriptionStatus = z.infer<typeof StripeSubscriptionStatus>;
25
+ /**
26
+ * Error code the checkout route returns when the org already holds a
27
+ * subscription Stripe is still honouring.
28
+ */
29
+ export declare const SUBSCRIPTION_EXISTS_CODE = "SUBSCRIPTION_EXISTS";
30
+ /**
31
+ * Does this stored `(subscriptionId, status)` pair block a new Checkout?
32
+ *
33
+ * Both halves matter: an org whose subscription genuinely ended has a null
34
+ * `stripe_subscription_id` (written by the `customer.subscription.deleted`
35
+ * handler) and must reach checkout normally.
36
+ */
37
+ export declare function blocksNewCheckout(subscriptionId: string | null | undefined, status: string | null | undefined): boolean;
38
+ //# sourceMappingURL=subscription-status.d.ts.map
@@ -0,0 +1,63 @@
1
+ import "../rolldown-runtime-ClRpJifh.js";
2
+ import { z } from "zod";
3
+ //#region src/billing/subscription-status.ts
4
+ /**
5
+ * The Stripe subscription-status vocabulary, as stored in
6
+ * `organizations.stripe_subscription_status`.
7
+ *
8
+ * Lives in the engine rather than the Platform package for the same reason
9
+ * `plan-type.ts` does: the browser dashboard must classify a status with the
10
+ * same predicate the Platform route uses, and it cannot import a private
11
+ * package. Pure Zod with no Node built-ins, so it is safe on the engine barrel.
12
+ *
13
+ * The stored column is plain text written straight from Stripe, so read it with
14
+ * `safeParse` — a status Stripe adds later must not fail a whole response.
15
+ */
16
+ const StripeSubscriptionStatus = z.enum([
17
+ "incomplete",
18
+ "incomplete_expired",
19
+ "trialing",
20
+ "active",
21
+ "past_due",
22
+ "canceled",
23
+ "unpaid",
24
+ "paused"
25
+ ]);
26
+ /**
27
+ * Error code the checkout route returns when the org already holds a
28
+ * subscription Stripe is still honouring.
29
+ */
30
+ const SUBSCRIPTION_EXISTS_CODE = "SUBSCRIPTION_EXISTS";
31
+ /**
32
+ * Statuses in which a second Checkout would create a second live subscription.
33
+ *
34
+ * `active` and `trialing` are plainly live. `past_due` is too: Stripe is still
35
+ * retrying the invoice and the subscription is still attached to the customer,
36
+ * so a second checkout leaves the customer paying twice — and cancelling
37
+ * "the old plan" afterwards fires `customer.subscription.deleted` for that id,
38
+ * which downgrades the org while the second subscription keeps charging.
39
+ *
40
+ * A plan change from any of these belongs in the Stripe Billing Portal, which
41
+ * is configured for prorated in-place changes.
42
+ */
43
+ const CHECKOUT_BLOCKING_STATUSES = /* @__PURE__ */ new Set([
44
+ StripeSubscriptionStatus.enum.active,
45
+ StripeSubscriptionStatus.enum.trialing,
46
+ StripeSubscriptionStatus.enum.past_due
47
+ ]);
48
+ /**
49
+ * Does this stored `(subscriptionId, status)` pair block a new Checkout?
50
+ *
51
+ * Both halves matter: an org whose subscription genuinely ended has a null
52
+ * `stripe_subscription_id` (written by the `customer.subscription.deleted`
53
+ * handler) and must reach checkout normally.
54
+ */
55
+ function blocksNewCheckout(subscriptionId, status) {
56
+ if (!subscriptionId) return false;
57
+ const parsed = StripeSubscriptionStatus.safeParse(status);
58
+ return parsed.success && CHECKOUT_BLOCKING_STATUSES.has(parsed.data);
59
+ }
60
+ //#endregion
61
+ export { SUBSCRIPTION_EXISTS_CODE, StripeSubscriptionStatus, blocksNewCheckout };
62
+
63
+ //# sourceMappingURL=subscription-status.js.map
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Identity facts of a single fan-out child, matched against a binding's
3
3
  * `host_pattern`. `agentId` / `host` are the stable dispatch identity; `labels`
4
- * is the host's label set. The union of all three is the match target.
4
+ * is the host's label set. All three are match targets, but not on the same
5
+ * terms — see {@link matchHostPattern}.
5
6
  */
6
7
  export interface HostFacts {
7
8
  agentId: string;
@@ -13,7 +14,29 @@ export interface HostFacts {
13
14
  *
14
15
  * `'**'` / empty matches every host. Otherwise the pattern is compiled once
15
16
  * (exact / glob / regex, same selector grammar as `runsOnAll`) and tested
16
- * against the union `[agentId, host, ...labels]` — true if any element matches.
17
+ * against `agentId`, `host` and every label — true if any of them matches. The
18
+ * three are NOT compared on the same terms:
19
+ *
20
+ * - **The agent id compares exactly.** A pattern bound to `prod-01` must never
21
+ * bind to an agent `PROD-01` — a scoped secret would reach a host it was not
22
+ * written for. An agent id is an opaque identifier with no case convention,
23
+ * so there is no case to fold away.
24
+ * - **Hostnames and labels compare case-insensitively.** The roster stores
25
+ * both canonical, so the pattern is folded to meet them; without this a
26
+ * binding written as `host_pattern: 'Docker'` would silently stop matching a
27
+ * `docker` label, and one written as `'Build-Box-01'` would stop matching the
28
+ * hostname it names. Folding the host arm also settles an asymmetry: a
29
+ * hostname is already reachable case-insensitively through its derived
30
+ * `kici:host:<hostname>` label, so leaving the host arm exact made the same
31
+ * host match under one spelling of the pattern and not the other.
32
+ *
33
+ * The host arm carries one guard. `facts.host` is not reliably a hostname:
34
+ * both callers fall back to the agent id when the roster row has no hostname
35
+ * (`row.hostname ?? row.agent_id`, `mat.host ?? mat.pinnedAgentId`), so folding
36
+ * it unconditionally would fold an identifier in disguise and let a binding on
37
+ * `prod-01` reach an agent `PROD-01`. That fallback is redundant here — when
38
+ * `facts.host` IS the agent id it was already compared exactly on the first arm
39
+ * — so skipping the host arm in that case loses no match.
17
40
  */
18
41
  export declare function matchHostPattern(facts: HostFacts, pattern: string): boolean;
19
42
  /**
@@ -1,5 +1,6 @@
1
1
  import "../rolldown-runtime-ClRpJifh.js";
2
- import { matcherMatches } from "../labels-match.js";
2
+ import { canonicalizeLabel } from "../labels-canonical.js";
3
+ import { canonicalizeMatcher, matcherMatches } from "../labels-match.js";
3
4
  import { assertSafeRegex } from "../safe-regex.js";
4
5
  import { toLabelMatcher } from "../labels/compile.js";
5
6
  //#region src/context/host-match.ts
@@ -41,16 +42,37 @@ function compileHostPattern(pattern) {
41
42
  *
42
43
  * `'**'` / empty matches every host. Otherwise the pattern is compiled once
43
44
  * (exact / glob / regex, same selector grammar as `runsOnAll`) and tested
44
- * against the union `[agentId, host, ...labels]` — true if any element matches.
45
+ * against `agentId`, `host` and every label — true if any of them matches. The
46
+ * three are NOT compared on the same terms:
47
+ *
48
+ * - **The agent id compares exactly.** A pattern bound to `prod-01` must never
49
+ * bind to an agent `PROD-01` — a scoped secret would reach a host it was not
50
+ * written for. An agent id is an opaque identifier with no case convention,
51
+ * so there is no case to fold away.
52
+ * - **Hostnames and labels compare case-insensitively.** The roster stores
53
+ * both canonical, so the pattern is folded to meet them; without this a
54
+ * binding written as `host_pattern: 'Docker'` would silently stop matching a
55
+ * `docker` label, and one written as `'Build-Box-01'` would stop matching the
56
+ * hostname it names. Folding the host arm also settles an asymmetry: a
57
+ * hostname is already reachable case-insensitively through its derived
58
+ * `kici:host:<hostname>` label, so leaving the host arm exact made the same
59
+ * host match under one spelling of the pattern and not the other.
60
+ *
61
+ * The host arm carries one guard. `facts.host` is not reliably a hostname:
62
+ * both callers fall back to the agent id when the roster row has no hostname
63
+ * (`row.hostname ?? row.agent_id`, `mat.host ?? mat.pinnedAgentId`), so folding
64
+ * it unconditionally would fold an identifier in disguise and let a binding on
65
+ * `prod-01` reach an agent `PROD-01`. That fallback is redundant here — when
66
+ * `facts.host` IS the agent id it was already compared exactly on the first arm
67
+ * — so skipping the host arm in that case loses no match.
45
68
  */
46
69
  function matchHostPattern(facts, pattern) {
47
70
  if (matchesAllHosts(pattern)) return true;
48
71
  const matcher = compileHostPattern(pattern);
49
- return [
50
- facts.agentId,
51
- facts.host,
52
- ...facts.labels
53
- ].some((c) => matcherMatches(matcher, c));
72
+ if (matcherMatches(matcher, facts.agentId)) return true;
73
+ const labelMatcher = canonicalizeMatcher(matcher);
74
+ if (facts.host !== facts.agentId && matcherMatches(labelMatcher, canonicalizeLabel(facts.host))) return true;
75
+ return facts.labels.some((l) => matcherMatches(labelMatcher, canonicalizeLabel(l)));
54
76
  }
55
77
  /**
56
78
  * Rank a `host_pattern` by specificity for precedence: an exact literal (2)
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  export * from './protocol/version.js';
11
11
  export * from './protocol/source-origin.js';
12
12
  export * from './provenance/attestation-origin.js';
13
+ export * from './provenance/id-token-event-claims.js';
13
14
  export * from './protocol/messages/common.js';
14
15
  export * from './protocol/messages/actor.js';
15
16
  export * from './protocol/messages/pat-kind.js';
@@ -26,6 +27,7 @@ export * from './protocol/messages/agent-dev-ops.js';
26
27
  export * from './protocol/messages/heartbeat-health.js';
27
28
  export * from './dev-ops/operations.js';
28
29
  export * from './protocol/messages/deployment-identity.js';
30
+ export * from './protocol/messages/config-paths.js';
29
31
  export * from './protocol/messages/scaler-event.js';
30
32
  export * from './protocol/messages/event-log.js';
31
33
  export * from './protocol/messages/access-log.js';
@@ -43,6 +45,7 @@ export * from './protocol/messages/join.js';
43
45
  export * from './protocol/messages/peer.js';
44
46
  export * from './protocol/messages/log-stream.js';
45
47
  export * from './protocol/messages/orchestrator-agent.js';
48
+ export * from './regex-flags.js';
46
49
  export * from './sandbox/capabilities.js';
47
50
  export * from './trigger/types.js';
48
51
  export * from './trigger/text-match.js';
@@ -68,7 +71,8 @@ export { deriveOsArchLabels, derivePlatformTaints, PLATFORM_TAINT_LABELS, Scaler
68
71
  export type { NormalizedRunsOn } from './labels.js';
69
72
  export type { AgentRole } from './labels.js';
70
73
  export type { ScalerPlatform } from './labels.js';
71
- export { LabelMatcher, matcherMatches, matcherSatisfiedBy, partitionMatchers, compileRegexMatcher, HostTargetValue, HostTargetSelector, hostSatisfiesTarget, } from './labels-match.js';
74
+ export { type CanonicalLabel, canonicalizeLabel, canonicalizeLabels, canonicalizeLabelSet, } from './labels-canonical.js';
75
+ export { LabelMatcher, type CanonicalMatcher, canonicalizeMatcher, matcherMatches, matcherSatisfiedBy, partitionMatchers, compileRegexMatcher, HostTargetValue, HostTargetSelector, hostSatisfiesTarget, } from './labels-match.js';
72
76
  export * from './inventory.js';
73
77
  export * from './scaler/scaler-backend-type.js';
74
78
  export * from './scaler/scaler-events.js';
@@ -81,5 +85,6 @@ export * from './fanout/materialize.js';
81
85
  export * from './check-mode.js';
82
86
  export * from './artifacts/name.js';
83
87
  export * from './billing/plan-type.js';
88
+ export * from './billing/subscription-status.js';
84
89
  export * from './diagnostics/infra-alert.js';
85
90
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -3,6 +3,8 @@ import { CheckMode, CheckStepOutcome } from "./check-mode.js";
3
3
  import { FORK_POLICY_IGNORE_MIN_PROTOCOL_VERSION, MIN_PROTOCOL_VERSION, PROTOCOL_VERSION } from "./protocol/version.js";
4
4
  import { SourceOrigin } from "./protocol/source-origin.js";
5
5
  import { AttestationOrigin } from "./provenance/attestation-origin.js";
6
+ import { PULL_REQUEST_FAMILY_TRIGGER_EVENTS, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, isPullRequestFamilyTriggerEvent } from "./trigger/trigger-event-type.js";
7
+ import { UNRESOLVED_CLAIM, buildEventClaims, buildIdTokenSubject, provenanceContextSchema } from "./provenance/id-token-event-claims.js";
6
8
  import { NACK_EXEMPT_MESSAGE_TYPES, WS_MAX_PAYLOAD_BYTES, ackSchema, buildUnsupportedMessageNack, errorSchema, heartbeatSchema, nackSchema } from "./protocol/messages/common.js";
7
9
  import { ACTOR_AGENT_SUFFIX, ActorType, actorPrincipalSchema, agentLabelOf, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema } from "./protocol/messages/actor.js";
8
10
  import { PatKind } from "./protocol/messages/pat-kind.js";
@@ -18,16 +20,19 @@ import { AccessLogAction, AccessLogOutcome, AccessLogSource, AccessLogTargetType
18
20
  import { browserJobContextSchema, browserRunEventSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, jobContextMessageSchema, runEventMessageSchema } from "./protocol/messages/run-events.js";
19
21
  import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./protocol/messages/event-log.js";
20
22
  import { DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema } from "./protocol/messages/deployment-identity.js";
23
+ import { ConfigPathsSchema } from "./protocol/messages/config-paths.js";
21
24
  import { OWN_INGRESS_MODES, OrchestratorMode, PLATFORM_CONNECTED_MODES, RELAY_INGRESS_MODES, SourceProvider, SourceSubtype, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema } from "./protocol/messages/source-registration.js";
22
25
  import { INTERNAL_EVENT_NAME_PREFIX, KICI_EVENT_NAME_PREFIX, ScalerBackendType, reservedEventNamePrefix } from "./scaler/scaler-backend-type.js";
23
26
  import { ApprovalDecision, HoldScope, TriggerSource, approvalRequirementSchema, approvalTimeoutSecondsSchema, approverClauseSchema } from "./approval/types.js";
24
27
  import { CANONICAL_STATUSES, LEGACY_STATUS_ALIASES, STATUS_FAILURE_CLASS, STATUS_PRECEDENCE, StatusFailureClass, isFailureStatus, toCanonicalStatus, worstStatus } from "./status/presentation.js";
25
28
  import { BREAKING_FLOOR, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, RunsOnPick, SANDBOX_NETWORK_MODES, SCHEMA_VERSION, changedFilesStatusSchema, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, resolveContentFormat, resolveWhenToRunOn } from "./trigger/types.js";
26
- import { HostTargetSelector, HostTargetValue, LabelMatcher, compileRegexMatcher, hostSatisfiesTarget, matcherMatches, matcherSatisfiedBy, partitionMatchers } from "./labels-match.js";
29
+ import { canonicalizeLabel, canonicalizeLabelSet, canonicalizeLabels } from "./labels-canonical.js";
30
+ import { normalizeRegexFlags, stripStatefulRegexFlags } from "./regex-flags.js";
31
+ import { HostTargetSelector, HostTargetValue, LabelMatcher, canonicalizeMatcher, compileRegexMatcher, hostSatisfiesTarget, matcherMatches, matcherSatisfiedBy, partitionMatchers } from "./labels-match.js";
27
32
  import { ConcurrencyStrategy, DEFAULT_CONCURRENCY_STRATEGY } from "./context/concurrency-strategy.js";
28
33
  import { HostInventoryEntry, HostPropertyValue, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, coerceHostPropertyValue, parseHostPropertyAssignments } from "./inventory.js";
29
34
  import { REGEX_NEGATIVE_ASSERTION, isNegatedPattern, negatedPatternReason } from "./repo/pattern-negation.js";
30
- import { ContextDeleteErrorCode, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, TestRelayType, artifactListItemSchema, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, contextBindingEntrySchema, contextBindingsListRequestSchema, contextBindingsSetRequestSchema, contextCreateRequestSchema, contextDeleteRequestSchema, contextGetRequestSchema, contextHistoryRequestSchema, contextHistoryResponseSchema, contextListRequestSchema, contextSecretDeleteRequestSchema, contextSecretScopeCreateRequestSchema, contextSecretScopeDeleteRequestSchema, contextSecretScopeRenameRequestSchema, contextSecretSetRequestSchema, contextSecretsListRequestSchema, contextSourceOverrideDeleteRequestSchema, contextSourceOverrideSetRequestSchema, contextSourceOverridesListRequestSchema, contextTestAccessSetRequestSchema, contextUpdateRequestSchema, contextVarDeleteRequestSchema, contextVarSetRequestSchema, contextVarsListRequestSchema, dashboardArtifactsListRequestSchema, dashboardArtifactsListResponseSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationRetryRequestSchema, dashboardAttestationRetryResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogActivityRequestSchema, dashboardEventLogActivityResponseSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStateRequestSchema, dashboardRunStateResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfraAlertSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, eventLogActivityCountsSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, 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";
35
+ import { ContextDeleteErrorCode, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, TestRelayType, artifactListItemSchema, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, contextBindingEntrySchema, contextBindingsListRequestSchema, contextBindingsSetRequestSchema, contextCreateRequestSchema, contextDeleteRequestSchema, contextGetRequestSchema, contextHistoryRequestSchema, contextHistoryResponseSchema, contextListRequestSchema, contextSecretDeleteRequestSchema, contextSecretScopeCreateRequestSchema, contextSecretScopeDeleteRequestSchema, contextSecretScopeRenameRequestSchema, contextSecretSetRequestSchema, contextSecretsListRequestSchema, contextSourceOverrideDeleteRequestSchema, contextSourceOverrideSetRequestSchema, contextSourceOverridesListRequestSchema, contextTestAccessSetRequestSchema, contextUpdateRequestSchema, contextVarDeleteRequestSchema, contextVarSetRequestSchema, contextVarsListRequestSchema, dashboardAdminTokenSummarySchema, dashboardAdminTokensListRequestSchema, dashboardAdminTokensListResponseSchema, dashboardArtifactsListRequestSchema, dashboardArtifactsListResponseSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationRetryRequestSchema, dashboardAttestationRetryResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogActivityRequestSchema, dashboardEventLogActivityResponseSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStateRequestSchema, dashboardRunStateResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfraAlertSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, eventLogActivityCountsSchema, eventLogListItemSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, 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";
31
36
  import { ORCH_AGENT_CAPABILITIES, ORCH_CAPABILITIES, OrchRole, PLATFORM_CAPABILITIES, hasOrchAgentCapability, hasOrchCapability, hasPlatformCapability, orchAgentCapabilitiesSchema, orchCapabilitiesSchema, platformCapabilitiesSchema } from "./protocol/messages/capabilities.js";
32
37
  import { authFailureSchema, authRequestSchema, authSuccessSchema } from "./protocol/messages/auth.js";
33
38
  import { LogStream } from "./protocol/messages/log-stream.js";
@@ -47,7 +52,6 @@ import { fleetSelectionSchema, jobProgressAckSchema, jobProgressSchema, jobRerou
47
52
  import { ArtifactCompleteAckOutcome, ArtifactDownloadOutcome, ArtifactRejectReason, ArtifactUploadOutcome, CacheRefScope, JobRejectReason, StepApprovalOutcome, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, artifactsDownloadRequestSchema, artifactsDownloadResponseSchema, artifactsUploadCompleteAckSchema, artifactsUploadCompleteSchema, artifactsUploadRequestSchema, artifactsUploadResponseSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, configAckSchema, eventEmitResponseSchema, eventEmitSchema, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetLogsRequestSchema, gitAuthSchema, globalEvalCandidateResultSchema, globalEvalRoundResultSchema, invokeResultSchema, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, provenanceUploadCompleteSchema, provenanceUploadDeferSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, registerAckSchema, scalerClaimCredentialsResponseSchema, scalerClaimCredentialsSchema, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, upstreamSnapshotSchema } from "./protocol/messages/orchestrator-agent.js";
48
53
  import { KNOWN_LINUX_CAPABILITIES, canonicalizeCapability, isKnownCapability } from "./sandbox/capabilities.js";
49
54
  import { compileSafeRegex, describeTextMatch, evaluateTextMatch, textMatchHasQuery } from "./trigger/text-match.js";
50
- import { TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES } from "./trigger/trigger-event-type.js";
51
55
  import { REDACTED_TRACE_FIELD, TRACE_TEXT_MAX, TRACE_TRUNCATION_WORKFLOW_NAME, TraceCheck, TraceVerdict, appendChecks, createCommitMessageTraceEntry, createContentRequirementsTraceEntry, createDispatchFailureTraceEntry, createGlobalFilterTraceEntry, createTraceEntry, createTraceTruncationMarker, createWorkflowDecision, truncateDecisionsToByteBudget, truncateTraceText, utf8ByteLength } from "./trigger/decision-trace.js";
52
56
  import { getRepoGlobMatcher } from "./trigger/compiled-matchers.js";
53
57
  import { matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchTrigger, matchWorkflowTriggers } from "./trigger/matcher.js";
@@ -65,7 +69,7 @@ import { CheckRunConclusion } from "./provider/check-run-conclusion.js";
65
69
  import "./provider/index.js";
66
70
  import { githubIngressPath, githubWebhookPath } from "./webhook/webhook-url-format.js";
67
71
  import { PING_EVENT_TYPE, SUBSCRIBABLE_WEBHOOK_EVENT_TYPES, SubscribableWebhookEventType, WebhookEventType } from "./webhook/event-types.js";
68
- import { 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_REBALANCE, WS_CLOSE_UNAUTHORIZED } from "./ws/close-codes.js";
72
+ import { 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_REBALANCE, WS_CLOSE_SUPERSEDED_BY_RECONNECT, WS_CLOSE_UNAUTHORIZED } from "./ws/close-codes.js";
69
73
  import { WsRateLimiter } from "./ws/rate-limiter.js";
70
74
  import { AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, KICI_AGENT_ENV_PREFIX, SANDBOX_DEFAULT_VARS, TRUSTED_ENV_SCRUB_EXACT, buildTrustedPassthroughEnv, isTrustedEnvScrubbed } from "./env/environment-allowlist.js";
71
75
  import "./secrets/index.js";
@@ -88,5 +92,6 @@ import { formatExpandedJobName, formatMatrixSuffix } from "./matrix/format.js";
88
92
  import { FanoutCause, FanoutError, MAX_FANOUT_JOBS, MAX_MATRIX_MATERIALIZATION, VariantKind, fanoutEnvelopeFields, hostEnvelopeFields, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields } from "./fanout/materialize.js";
89
93
  import { ARTIFACT_INVALID_NAME_PREFIX, ARTIFACT_NAME_MAX_LENGTH, ArtifactNameSchema, artifactInvalidNameError, checkArtifactName } from "./artifacts/name.js";
90
94
  import { PLAN_TYPES, PaidPlanType, PlanType, isPaidTier, planRank } from "./billing/plan-type.js";
95
+ import { SUBSCRIPTION_EXISTS_CODE, StripeSubscriptionStatus, blocksNewCheckout } from "./billing/subscription-status.js";
91
96
  import { INFRA_ALERT_TYPES, InfraAlertSeverity, InfraAlertType, normalizeInfraAlertSeverity } from "./diagnostics/infra-alert.js";
92
- export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, ACTOR_AGENT_SUFFIX, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, ARTIFACT_INVALID_NAME_PREFIX, ARTIFACT_NAME_MAX_LENGTH, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, AgentFailureCategory, ApprovalDecision, ArtifactCompleteAckOutcome, ArtifactDownloadOutcome, ArtifactNameSchema, ArtifactRejectReason, ArtifactUploadOutcome, AttestationOrigin, BREAKING_FLOOR, CANONICAL_STATUSES, CAPABILITY_LABEL_PREFIX, CLUSTER_MEMBERSHIP_MAX_WORKERS, CONTAINER_BUILD_RUNTIME_LABEL, CONTEXTS_MAX, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckMode, CheckRunConclusion, CheckStepOutcome, CiTrustLevel, ConcurrencyStrategy, ContextDeleteErrorCode, ContextGateRejectReason, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DEAD_ORCH_FAILURE_REASON, DEFAULT_APPROVAL_EXPIRY_HOURS, DEFAULT_APPROVAL_EXPIRY_SECONDS, DEFAULT_CONCURRENCY_STRATEGY, DEFAULT_HOLD_EXPIRY_SECONDS, DEVELOPER_OPERATIONS, DashboardResponseErrorCode, DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema, DispatchInputError, DispatchInputType, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, FORK_POLICY_IGNORE_MIN_PROTOCOL_VERSION, FanoutCause, FanoutError, FleetHostDisposition, ForkPolicy, HEARTBEAT_CLOSE_MS, HEARTBEAT_DEGRADED_MS, HEARTBEAT_FRESH_MS, HEARTBEAT_STALE_THRESHOLD_SECONDS, HEARTBEAT_UNHEALTHY_MARK_MS, HOST_LABEL_PREFIX, HeldRunQueueType, HeldRunStatus, HoldScope, HoldType, HostInventoryEntry, HostPropertyValue, HostTargetSelector, HostTargetValue, INFRA_ALERT_TYPES, INIT_LABEL, INIT_RUNNER_ROLE_LABEL, INSTALL_JOB_ID_PREFIX, INTERNAL_EVENT_NAME_PREFIX, InfraAlertSeverity, InfraAlertType, InitFailureCategory, InputDescriptor, InputsDescriptorMapSchema, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, JobKind, JobRejectReason, KICI_AGENT_ENV_PREFIX, KICI_EVENT_NAME_PREFIX, KNOWN_LINUX_CAPABILITIES, KNOWN_ROLES, LEGACY_STATUS_ALIASES, LabelMatcher, LockFileParseError, LogStream, MAX_APPROVAL_EXPIRY_HOURS, MAX_APPROVAL_EXPIRY_SECONDS, MAX_FANOUT_JOBS, MAX_JOBS_PER_RUN, MAX_MATRIX_MATERIALIZATION, MIN_APPROVAL_EXPIRY_SECONDS, MIN_PROTOCOL_VERSION, MatrixShapeError, NACK_EXEMPT_MESSAGE_TYPES, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, ORCH_AGENT_CAPABILITIES, ORCH_CAPABILITIES, ORCH_TO_PLATFORM_RECOGNIZED_TYPES, OWN_INGRESS_MODES, OnUnreachableMode, OrchLogPhase, OrchRole, OrchestratorMode, PING_EVENT_TYPE, PLAN_TYPES, PLATFORM_CAPABILITIES, PLATFORM_CONNECTED_MODES, PLATFORM_TAINT_LABELS, PLATFORM_TO_ORCH_RECOGNIZED_TYPES, POLICY_BY_ACTION, PRIVILEGED_ROOT_LABEL, PROTOCOL_VERSION, PaidPlanType, PatKind, PayloadOmittedReason, PlanType, REDACTED_TRACE_FIELD, REGEX_NEGATIVE_ASSERTION, RELAY_INGRESS_MODES, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, RUNTIME_LABEL_PREFIX, RegisterableTriggerType, RunFailureClass, RunsOnPick, RuntimeFact, SANDBOX_DEFAULT_VARS, SANDBOX_NETWORK_MODES, SCALER_EVENT_NAMES, SCHEMA_VERSION, SCOPE_NAME_MAX_LENGTH, SCOPE_SEGMENT_PATTERN, SECONDS_PER_HOUR, SECRET_KEY_MAX_LENGTH, SECRET_KEY_PATTERN, SECURITY_HOLD_JOB_IDS, SECURITY_HOLD_JOB_LABELS, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, STATE_REPLAY_MAX_RUNS, STATUS_FAILURE_CLASS, STATUS_FREE_TEXT_MAX, STATUS_ID_MAX, STATUS_PRECEDENCE, SUBSCRIBABLE_WEBHOOK_EVENT_TYPES, ScaleDownReason, ScalerArch, ScalerBackendType, ScalerEventType, ScalerOs, ScalerScaleDownPayload, ScalerScaleUpPayload, ScopeNameError, SecretKeyError, SetupStepType, SourceOrigin, SourceProvider, SourceSubtype, StatusFailureClass, StepApprovalOutcome, StepConcurrencyKind, SubscribableWebhookEventType, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TERMINAL_STEP_STATES, TRACE_TEXT_MAX, TRACE_TRUNCATION_WORKFLOW_NAME, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, TRIGGER_TYPE_TO_EVENT_TYPES, TRUSTED_ENV_SCRUB_EXACT, TestRelayType, TimeoutReason, TraceCheck, TraceVerdict, TriggerSource, TrustTierSchema, UnsupportedDispatchInputError, VariantKind, WEBHOOK_RELAY_CHUNK_SIZE, WEBHOOK_RELAY_MAX_BODY_BYTES, WORKFLOW_MODIFICATION_JOB_ID, 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_REBALANCE, WS_CLOSE_UNAUTHORIZED, WS_MAX_PAYLOAD_BYTES, WebhookEventType, WebhookRelayResult, WsRateLimiter, accessLogFilterSchema, accessLogItemSchema, accessLogWarmSqlCase, ackSchema, activityCursorSchema, activityFilterSchema, activityRowSchema, actorPrincipalSchema, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentDiagnosticsConnectionSchema, agentDiagnosticsSchema, agentJobResultSchema, agentLabelOf, agentLogChunkSchema, agentMetricsSchema, agentOrchestratorSummarySchema, agentOrgSummarySchema, agentRegisterSchema, agentRunListItemSchema, agentRunResultSchema, agentSecretScopeSchema, agentStatusSchema, agentStepLogsSchema, agentStepResultSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, agentTypeLabel, agentWorkflowSummarySchema, apiKeyActorSchema, appendChecks, applyIncludeExclude, approvalExpiryHoursOf, approvalExpirySecondsOf, approvalRequirementSchema, approvalTimeoutSecondsSchema, approveRunToolSchema, approverClauseSchema, artifactInvalidNameError, artifactListItemSchema, artifactsDownloadRequestSchema, artifactsDownloadResponseSchema, artifactsUploadCompleteAckSchema, artifactsUploadCompleteSchema, artifactsUploadRequestSchema, artifactsUploadResponseSchema, assertScheduleInputsSatisfiable, assertValidScopeName, assertValidSecretKey, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, 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, browserOrchLogLinesSchema, browserOrchLogSubscribeSchema, browserOrchLogUnsubscribeSchema, browserPingSchema, browserPongSchema, browserRunEventSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, buildTrustedPassthroughEnv, buildUnsupportedMessageNack, buildZodFromDescriptor, buildZodObjectFromMap, cacheStatsSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, cancelRunToolSchema, cancelRunsByBranchToolSchema, canonicalizeCapability, capabilityLabel, changedFilesStatusSchema, checkArtifactName, clusterMembershipSchema, coerceDispatchInputs, coerceHostPropertyValue, collectDiscriminatorTypes, compileRegexMatcher, compileSafeRegex, configAckSchema, connectionHealthStatusSchema, contextBindingEntrySchema, contextBindingsListRequestSchema, contextBindingsSetRequestSchema, contextCreateRequestSchema, contextDeleteRequestSchema, contextGetRequestSchema, contextHistoryRequestSchema, contextHistoryResponseSchema, contextListRequestSchema, contextSecretDeleteRequestSchema, contextSecretScopeCreateRequestSchema, contextSecretScopeDeleteRequestSchema, contextSecretScopeRenameRequestSchema, contextSecretSetRequestSchema, contextSecretsListRequestSchema, contextSourceOverrideDeleteRequestSchema, contextSourceOverrideSetRequestSchema, contextSourceOverridesListRequestSchema, contextTestAccessSetRequestSchema, contextUpdateRequestSchema, contextVarDeleteRequestSchema, contextVarSetRequestSchema, contextVarsListRequestSchema, createCommitMessageTraceEntry, createContentRequirementsTraceEntry, createDispatchFailureTraceEntry, createGlobalFilterTraceEntry, createTraceEntry, createTraceTruncationMarker, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardArtifactsListRequestSchema, dashboardArtifactsListResponseSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationRetryRequestSchema, dashboardAttestationRetryResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogActivityRequestSchema, dashboardEventLogActivityResponseSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStateRequestSchema, dashboardRunStateResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, derivePlatformTaints, describeTextMatch, developerOpsForEntrypoint, diagnosticsInfraAlertSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, errorSchema, evaluateTextMatch, eventEmitResponseSchema, eventEmitSchema, eventLogActivityCountsSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, expandMatrix, expandMultiDimension, expandSingleDimension, extractInputDescriptor, extractInputsDescriptorMap, fanoutEnvelopeFields, findDuplicateCombination, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetLogsRequestSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getDiagnosticsToolSchema, getRepoGlobMatcher, getRunToolSchema, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, getStepLogsToolSchema, gitAuthSchema, githubIngressPath, githubWebhookPath, globalEvalCandidateResultSchema, globalEvalRoundResultSchema, hasOrchAgentCapability, hasOrchCapability, hasPlatformCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, hostSatisfiesTarget, hostToScalerPlatform, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, installGateJobId, invokeResultSchema, isFailureStatus, isInputSatisfiableFromDefaults, isKnownCapability, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, isMintedRef, isNegatedPattern, isPaidTier, isSecurityHoldJobId, isSelfReportedLabel, isSetupStepType, isTrustedEnvScrubbed, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressAckSchema, jobProgressSchema, jobRejectSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, listOrchestratorsToolSchema, listOrgsToolSchema, listRunsToolSchema, listSecretsToolSchema, listWorkflowsToolSchema, logChunkSchema, logPullOrchToPlatformSchema, logPullPlatformToOrchSchema, manualScheduleRequestSchema, matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchScopePattern, matchTrigger, matchWorkflowTriggers, matchWorkflowsForEvent, matcherMatches, matcherSatisfiedBy, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixCombinationCount, matrixEnvelopeFields, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, mergeOrderedMaps, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, negatedPatternReason, nodeArchToScalerArch, nodePlatformToScalerOs, normalizeInfraAlertSeverity, normalizeMatrixInput, normalizePersistedHoldType, normalizeRunsOn, orchAgentCapabilitiesSchema, orchCapabilitiesSchema, orchLogChunkSchema, orchMetricsSchema, orchestratorToAgentMessageSchema, orchestratorToPlatformMessageSchema, orgMemberSchema, parseActor, parseHostLabel, parseHostPropertyAssignments, parseInputPairs, parseMemoryString, partitionMatchers, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerClusterSettingsRequestSchema, peerClusterSettingsResponseSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerDiscoverSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, peerUpdateSchema, persistedHoldTypeSpellings, planHeadroomSchema, planRank, platformCapabilitiesMessageSchema, platformCapabilitiesSchema, platformOperatorActorSchema, platformToBrowserMessageSchema, platformToOrchestratorMessageSchema, platformToOsArchLabels, platformToTaints, prepareEventBuckets, provenanceUploadCompleteSchema, provenanceUploadDeferSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, rejectRunToolSchema, renderFenced, rerunRunToolSchema, reservedEventNamePrefix, resolveContentFormat, resolveHeldRunId, resolveRoleLabels, resolveRunIdSugar, resolveScheduleInputs, resolveSecretsForContext, resolveSecretsWithProvenance, resolveWhenToRunOn, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, runtimeLabel, scalerAgentLabels, scalerClaimCredentialsResponseSchema, scalerClaimCredentialsSchema, scalerLabel, scalerPlatformSchema, scheduleTriggerKey, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplayRunSchema, stateReplaySchema, statusOptionsForLevel, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, textMatchHasQuery, toCanonicalStatus, triggerRunToolSchema, truncateDecisionsToByteBudget, truncateTraceText, trustPolicyResponseSchema, trustPolicySchema, trustPolicyUpdateSchema, trustedContributorHoldReason, unknownContributorHoldReason, untrusted, upstreamSnapshotSchema, userActorSchema, utf8ByteLength, validateNoReservedLabels, validateResourceRequest, validateScopeName, validateSecretKey, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema, workerClusterSettingsSchema, worstStatus, wrapUntrusted };
97
+ export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, ACTOR_AGENT_SUFFIX, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, ARTIFACT_INVALID_NAME_PREFIX, ARTIFACT_NAME_MAX_LENGTH, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, AgentFailureCategory, ApprovalDecision, ArtifactCompleteAckOutcome, ArtifactDownloadOutcome, ArtifactNameSchema, ArtifactRejectReason, ArtifactUploadOutcome, AttestationOrigin, BREAKING_FLOOR, CANONICAL_STATUSES, CAPABILITY_LABEL_PREFIX, CLUSTER_MEMBERSHIP_MAX_WORKERS, CONTAINER_BUILD_RUNTIME_LABEL, CONTEXTS_MAX, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckMode, CheckRunConclusion, CheckStepOutcome, CiTrustLevel, ConcurrencyStrategy, ConfigPathsSchema, ContextDeleteErrorCode, ContextGateRejectReason, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DEAD_ORCH_FAILURE_REASON, DEFAULT_APPROVAL_EXPIRY_HOURS, DEFAULT_APPROVAL_EXPIRY_SECONDS, DEFAULT_CONCURRENCY_STRATEGY, DEFAULT_HOLD_EXPIRY_SECONDS, DEVELOPER_OPERATIONS, DashboardResponseErrorCode, DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema, DispatchInputError, DispatchInputType, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, FORK_POLICY_IGNORE_MIN_PROTOCOL_VERSION, FanoutCause, FanoutError, FleetHostDisposition, ForkPolicy, HEARTBEAT_CLOSE_MS, HEARTBEAT_DEGRADED_MS, HEARTBEAT_FRESH_MS, HEARTBEAT_STALE_THRESHOLD_SECONDS, HEARTBEAT_UNHEALTHY_MARK_MS, HOST_LABEL_PREFIX, HeldRunQueueType, HeldRunStatus, HoldScope, HoldType, HostInventoryEntry, HostPropertyValue, HostTargetSelector, HostTargetValue, INFRA_ALERT_TYPES, INIT_LABEL, INIT_RUNNER_ROLE_LABEL, INSTALL_JOB_ID_PREFIX, INTERNAL_EVENT_NAME_PREFIX, InfraAlertSeverity, InfraAlertType, InitFailureCategory, InputDescriptor, InputsDescriptorMapSchema, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, JobKind, JobRejectReason, KICI_AGENT_ENV_PREFIX, KICI_EVENT_NAME_PREFIX, KNOWN_LINUX_CAPABILITIES, KNOWN_ROLES, LEGACY_STATUS_ALIASES, LabelMatcher, LockFileParseError, LogStream, MAX_APPROVAL_EXPIRY_HOURS, MAX_APPROVAL_EXPIRY_SECONDS, MAX_FANOUT_JOBS, MAX_JOBS_PER_RUN, MAX_MATRIX_MATERIALIZATION, MIN_APPROVAL_EXPIRY_SECONDS, MIN_PROTOCOL_VERSION, MatrixShapeError, NACK_EXEMPT_MESSAGE_TYPES, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, ORCH_AGENT_CAPABILITIES, ORCH_CAPABILITIES, ORCH_TO_PLATFORM_RECOGNIZED_TYPES, OWN_INGRESS_MODES, OnUnreachableMode, OrchLogPhase, OrchRole, OrchestratorMode, PING_EVENT_TYPE, PLAN_TYPES, PLATFORM_CAPABILITIES, PLATFORM_CONNECTED_MODES, PLATFORM_TAINT_LABELS, PLATFORM_TO_ORCH_RECOGNIZED_TYPES, POLICY_BY_ACTION, PRIVILEGED_ROOT_LABEL, PROTOCOL_VERSION, PULL_REQUEST_FAMILY_TRIGGER_EVENTS, PaidPlanType, PatKind, PayloadOmittedReason, PlanType, REDACTED_TRACE_FIELD, REGEX_NEGATIVE_ASSERTION, RELAY_INGRESS_MODES, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, RUNTIME_LABEL_PREFIX, RegisterableTriggerType, RunFailureClass, RunsOnPick, RuntimeFact, SANDBOX_DEFAULT_VARS, SANDBOX_NETWORK_MODES, SCALER_EVENT_NAMES, SCHEMA_VERSION, SCOPE_NAME_MAX_LENGTH, SCOPE_SEGMENT_PATTERN, SECONDS_PER_HOUR, SECRET_KEY_MAX_LENGTH, SECRET_KEY_PATTERN, SECURITY_HOLD_JOB_IDS, SECURITY_HOLD_JOB_LABELS, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, STATE_REPLAY_MAX_RUNS, STATUS_FAILURE_CLASS, STATUS_FREE_TEXT_MAX, STATUS_ID_MAX, STATUS_PRECEDENCE, SUBSCRIBABLE_WEBHOOK_EVENT_TYPES, SUBSCRIPTION_EXISTS_CODE, ScaleDownReason, ScalerArch, ScalerBackendType, ScalerEventType, ScalerOs, ScalerScaleDownPayload, ScalerScaleUpPayload, ScopeNameError, SecretKeyError, SetupStepType, SourceOrigin, SourceProvider, SourceSubtype, StatusFailureClass, StepApprovalOutcome, StepConcurrencyKind, StripeSubscriptionStatus, SubscribableWebhookEventType, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TERMINAL_STEP_STATES, TRACE_TEXT_MAX, TRACE_TRUNCATION_WORKFLOW_NAME, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, TRIGGER_TYPE_TO_EVENT_TYPES, TRUSTED_ENV_SCRUB_EXACT, TestRelayType, TimeoutReason, TraceCheck, TraceVerdict, TriggerSource, TrustTierSchema, UNRESOLVED_CLAIM, UnsupportedDispatchInputError, VariantKind, WEBHOOK_RELAY_CHUNK_SIZE, WEBHOOK_RELAY_MAX_BODY_BYTES, WORKFLOW_MODIFICATION_JOB_ID, 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_REBALANCE, WS_CLOSE_SUPERSEDED_BY_RECONNECT, WS_CLOSE_UNAUTHORIZED, WS_MAX_PAYLOAD_BYTES, WebhookEventType, WebhookRelayResult, WsRateLimiter, accessLogFilterSchema, accessLogItemSchema, accessLogWarmSqlCase, ackSchema, activityCursorSchema, activityFilterSchema, activityRowSchema, actorPrincipalSchema, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentDiagnosticsConnectionSchema, agentDiagnosticsSchema, agentJobResultSchema, agentLabelOf, agentLogChunkSchema, agentMetricsSchema, agentOrchestratorSummarySchema, agentOrgSummarySchema, agentRegisterSchema, agentRunListItemSchema, agentRunResultSchema, agentSecretScopeSchema, agentStatusSchema, agentStepLogsSchema, agentStepResultSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, agentTypeLabel, agentWorkflowSummarySchema, apiKeyActorSchema, appendChecks, applyIncludeExclude, approvalExpiryHoursOf, approvalExpirySecondsOf, approvalRequirementSchema, approvalTimeoutSecondsSchema, approveRunToolSchema, approverClauseSchema, artifactInvalidNameError, artifactListItemSchema, artifactsDownloadRequestSchema, artifactsDownloadResponseSchema, artifactsUploadCompleteAckSchema, artifactsUploadCompleteSchema, artifactsUploadRequestSchema, artifactsUploadResponseSchema, assertScheduleInputsSatisfiable, assertValidScopeName, assertValidSecretKey, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, auditLogColdDays, auditLogWarmDays, auditLogWarmSqlCase, authFailureSchema, authRequestSchema, authSuccessSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, blocksNewCheckout, browserAuthFailureSchema, browserAuthRefreshSchema, browserAuthRequestSchema, browserAuthSuccessSchema, browserErrorSchema, browserEventLogPayloadChunkSchema, browserEventLogPayloadFetchSchema, browserGapSchema, browserJobContextSchema, browserJobNewSchema, browserJobStatusSchema, browserLogLinesSchema, browserLogStreamTerminatedReason, browserLogStreamTerminatedSchema, browserLogSubscribeSchema, browserLogUnsubscribeSchema, browserOrchLogLinesSchema, browserOrchLogSubscribeSchema, browserOrchLogUnsubscribeSchema, browserPingSchema, browserPongSchema, browserRunEventSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, buildEventClaims, buildIdTokenSubject, buildTrustedPassthroughEnv, buildUnsupportedMessageNack, buildZodFromDescriptor, buildZodObjectFromMap, cacheStatsSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, cancelRunToolSchema, cancelRunsByBranchToolSchema, canonicalizeCapability, canonicalizeLabel, canonicalizeLabelSet, canonicalizeLabels, canonicalizeMatcher, capabilityLabel, changedFilesStatusSchema, checkArtifactName, clusterMembershipSchema, coerceDispatchInputs, coerceHostPropertyValue, collectDiscriminatorTypes, compileRegexMatcher, compileSafeRegex, configAckSchema, connectionHealthStatusSchema, contextBindingEntrySchema, contextBindingsListRequestSchema, contextBindingsSetRequestSchema, contextCreateRequestSchema, contextDeleteRequestSchema, contextGetRequestSchema, contextHistoryRequestSchema, contextHistoryResponseSchema, contextListRequestSchema, contextSecretDeleteRequestSchema, contextSecretScopeCreateRequestSchema, contextSecretScopeDeleteRequestSchema, contextSecretScopeRenameRequestSchema, contextSecretSetRequestSchema, contextSecretsListRequestSchema, contextSourceOverrideDeleteRequestSchema, contextSourceOverrideSetRequestSchema, contextSourceOverridesListRequestSchema, contextTestAccessSetRequestSchema, contextUpdateRequestSchema, contextVarDeleteRequestSchema, contextVarSetRequestSchema, contextVarsListRequestSchema, createCommitMessageTraceEntry, createContentRequirementsTraceEntry, createDispatchFailureTraceEntry, createGlobalFilterTraceEntry, createTraceEntry, createTraceTruncationMarker, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardAdminTokenSummarySchema, dashboardAdminTokensListRequestSchema, dashboardAdminTokensListResponseSchema, dashboardArtifactsListRequestSchema, dashboardArtifactsListResponseSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationRetryRequestSchema, dashboardAttestationRetryResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogActivityRequestSchema, dashboardEventLogActivityResponseSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStateRequestSchema, dashboardRunStateResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, derivePlatformTaints, describeTextMatch, developerOpsForEntrypoint, diagnosticsInfraAlertSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, errorSchema, evaluateTextMatch, eventEmitResponseSchema, eventEmitSchema, eventLogActivityCountsSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, expandMatrix, expandMultiDimension, expandSingleDimension, extractInputDescriptor, extractInputsDescriptorMap, fanoutEnvelopeFields, findDuplicateCombination, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetLogsRequestSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getDiagnosticsToolSchema, getRepoGlobMatcher, getRunToolSchema, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, getStepLogsToolSchema, gitAuthSchema, githubIngressPath, githubWebhookPath, globalEvalCandidateResultSchema, globalEvalRoundResultSchema, hasOrchAgentCapability, hasOrchCapability, hasPlatformCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, hostSatisfiesTarget, hostToScalerPlatform, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, installGateJobId, invokeResultSchema, isFailureStatus, isInputSatisfiableFromDefaults, isKnownCapability, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, isMintedRef, isNegatedPattern, isPaidTier, isPullRequestFamilyTriggerEvent, isSecurityHoldJobId, isSelfReportedLabel, isSetupStepType, isTrustedEnvScrubbed, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressAckSchema, jobProgressSchema, jobRejectSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, listOrchestratorsToolSchema, listOrgsToolSchema, listRunsToolSchema, listSecretsToolSchema, listWorkflowsToolSchema, logChunkSchema, logPullOrchToPlatformSchema, logPullPlatformToOrchSchema, manualScheduleRequestSchema, matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchScopePattern, matchTrigger, matchWorkflowTriggers, matchWorkflowsForEvent, matcherMatches, matcherSatisfiedBy, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixCombinationCount, matrixEnvelopeFields, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, mergeOrderedMaps, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, negatedPatternReason, nodeArchToScalerArch, nodePlatformToScalerOs, normalizeInfraAlertSeverity, normalizeMatrixInput, normalizePersistedHoldType, normalizeRegexFlags, normalizeRunsOn, orchAgentCapabilitiesSchema, orchCapabilitiesSchema, orchLogChunkSchema, orchMetricsSchema, orchestratorToAgentMessageSchema, orchestratorToPlatformMessageSchema, orgMemberSchema, parseActor, parseHostLabel, parseHostPropertyAssignments, parseInputPairs, parseMemoryString, partitionMatchers, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerClusterSettingsRequestSchema, peerClusterSettingsResponseSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerDiscoverSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, peerUpdateSchema, persistedHoldTypeSpellings, planHeadroomSchema, planRank, platformCapabilitiesMessageSchema, platformCapabilitiesSchema, platformOperatorActorSchema, platformToBrowserMessageSchema, platformToOrchestratorMessageSchema, platformToOsArchLabels, platformToTaints, prepareEventBuckets, provenanceContextSchema, provenanceUploadCompleteSchema, provenanceUploadDeferSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, rejectRunToolSchema, renderFenced, rerunRunToolSchema, reservedEventNamePrefix, resolveContentFormat, resolveHeldRunId, resolveRoleLabels, resolveRunIdSugar, resolveScheduleInputs, resolveSecretsForContext, resolveSecretsWithProvenance, resolveWhenToRunOn, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, runtimeLabel, scalerAgentLabels, scalerClaimCredentialsResponseSchema, scalerClaimCredentialsSchema, scalerLabel, scalerPlatformSchema, scheduleTriggerKey, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplayRunSchema, stateReplaySchema, statusOptionsForLevel, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, stripStatefulRegexFlags, systemActorSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, textMatchHasQuery, toCanonicalStatus, triggerRunToolSchema, truncateDecisionsToByteBudget, truncateTraceText, trustPolicyResponseSchema, trustPolicySchema, trustPolicyUpdateSchema, trustedContributorHoldReason, unknownContributorHoldReason, untrusted, upstreamSnapshotSchema, userActorSchema, utf8ByteLength, validateNoReservedLabels, validateResourceRequest, validateScopeName, validateSecretKey, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema, workerClusterSettingsSchema, worstStatus, wrapUntrusted };
@@ -3,7 +3,9 @@ import { assertSafeRegex } from '../safe-regex.js';
3
3
  export { assertSafeRegex };
4
4
  /**
5
5
  * Convert one author selector element into a `LabelMatcher`.
6
- * - `RegExp` → regex matcher (source + flags captured verbatim).
6
+ * - `RegExp` → regex matcher (source captured verbatim; `g` and `y` dropped —
7
+ * a label matcher asks one yes/no question per label, and the reader loops it
8
+ * over a set, so a sticky instance would resume mid-string on the next label).
7
9
  * - string that picomatch detects as a glob → regex via `picomatch.makeRe`.
8
10
  * - any other string → exact.
9
11
  * `ctx` is a human label (e.g. "job 'web' runsOn") used in ReDoS errors.
@@ -1,31 +1,36 @@
1
1
  import "../rolldown-runtime-ClRpJifh.js";
2
+ import { stripStatefulRegexFlags } from "../regex-flags.js";
2
3
  import { assertSafeRegex } from "../safe-regex.js";
3
4
  import picomatch from "picomatch";
4
5
  //#region src/labels/compile.ts
5
6
  /**
6
7
  * Convert one author selector element into a `LabelMatcher`.
7
- * - `RegExp` → regex matcher (source + flags captured verbatim).
8
+ * - `RegExp` → regex matcher (source captured verbatim; `g` and `y` dropped —
9
+ * a label matcher asks one yes/no question per label, and the reader loops it
10
+ * over a set, so a sticky instance would resume mid-string on the next label).
8
11
  * - string that picomatch detects as a glob → regex via `picomatch.makeRe`.
9
12
  * - any other string → exact.
10
13
  * `ctx` is a human label (e.g. "job 'web' runsOn") used in ReDoS errors.
11
14
  */
12
15
  function toLabelMatcher(el, ctx) {
13
16
  if (el instanceof RegExp) {
14
- assertSafeRegex(el.source, el.flags, ctx);
17
+ const flags = stripStatefulRegexFlags(el.flags);
18
+ assertSafeRegex(el.source, flags, ctx);
15
19
  return {
16
20
  kind: "regex",
17
21
  source: el.source,
18
- flags: el.flags
22
+ flags
19
23
  };
20
24
  }
21
25
  if (picomatch.scan(el).isGlob) {
22
26
  const re = picomatch.makeRe(el);
23
27
  if (!(re instanceof RegExp)) throw new Error(`${ctx}: glob '${el}' is not a valid pattern`);
24
- assertSafeRegex(re.source, re.flags, ctx);
28
+ const flags = stripStatefulRegexFlags(re.flags);
29
+ assertSafeRegex(re.source, flags, ctx);
25
30
  return {
26
31
  kind: "regex",
27
32
  source: re.source,
28
- flags: re.flags
33
+ flags
29
34
  };
30
35
  }
31
36
  return {
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The canonical form of a runner label, and the intended way to produce one.
3
+ *
4
+ * Label matching folds case. Rather than fold at each of the many comparison
5
+ * sites — where one forgotten call reintroduces a silent no-match — labels are
6
+ * canonicalized once at each ingress into the matching domain, and every
7
+ * comparison downstream stays an O(1) `Set.has` over already-canonical strings.
8
+ *
9
+ * The brand is what stops a future ingress from skipping the fold: a plain
10
+ * `string` will not satisfy a `CanonicalLabel` parameter, so the compiler
11
+ * demands the call. It is a type-level marker with no runtime representation.
12
+ *
13
+ * Deliberately NOT applied to `matcherMatches`, which `matchHostPattern` uses
14
+ * to match agent IDs — an agent id is an opaque identifier, not a label, and
15
+ * must stay case-sensitive. Hostnames DO fold (they are case-insensitive by
16
+ * DNS convention), but only on the arm that has ruled out the agent-id
17
+ * fallback — see `matchHostPattern`.
18
+ *
19
+ * Pure string logic with no imports, so it is safe for the browser barrel.
20
+ */
21
+ declare const CANONICAL_LABEL: unique symbol;
22
+ /** A label that has been folded to its canonical (lowercase) form. */
23
+ export type CanonicalLabel = string & {
24
+ readonly [CANONICAL_LABEL]: true;
25
+ };
26
+ /** Fold one label to canonical form. Idempotent. */
27
+ export declare function canonicalizeLabel(raw: string): CanonicalLabel;
28
+ /**
29
+ * Fold a list, preserving order and length. Case-only duplicates survive as
30
+ * duplicates — use {@link canonicalizeLabelSet} when they should collapse.
31
+ */
32
+ export declare function canonicalizeLabels(raw: readonly string[]): CanonicalLabel[];
33
+ /** Fold into a Set, collapsing case-only duplicates. */
34
+ export declare function canonicalizeLabelSet(raw: readonly string[]): Set<CanonicalLabel>;
35
+ export {};
36
+ //# sourceMappingURL=labels-canonical.d.ts.map
@@ -0,0 +1,21 @@
1
+ import "./rolldown-runtime-ClRpJifh.js";
2
+ //#region src/labels-canonical.ts
3
+ /** Fold one label to canonical form. Idempotent. */
4
+ function canonicalizeLabel(raw) {
5
+ return raw.trim().toLowerCase();
6
+ }
7
+ /**
8
+ * Fold a list, preserving order and length. Case-only duplicates survive as
9
+ * duplicates — use {@link canonicalizeLabelSet} when they should collapse.
10
+ */
11
+ function canonicalizeLabels(raw) {
12
+ return raw.map(canonicalizeLabel);
13
+ }
14
+ /** Fold into a Set, collapsing case-only duplicates. */
15
+ function canonicalizeLabelSet(raw) {
16
+ return new Set(raw.map(canonicalizeLabel));
17
+ }
18
+ //#endregion
19
+ export { canonicalizeLabel, canonicalizeLabelSet, canonicalizeLabels };
20
+
21
+ //# sourceMappingURL=labels-canonical.js.map
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { type CanonicalLabel } from './labels-canonical.js';
2
3
  /**
3
4
  * A single label selector element after compilation. Globs are converted to
4
5
  * regex at compile time, so the lock file only ever carries `exact` or `regex`.
@@ -15,15 +16,44 @@ export declare const LabelMatcher: z.ZodDiscriminatedUnion<[z.ZodObject<{
15
16
  flags: z.ZodString;
16
17
  }, z.core.$strip>], "kind">;
17
18
  export type LabelMatcher = z.infer<typeof LabelMatcher>;
18
- /** Compile (and cache) the `RegExp` for a regex matcher. */
19
+ /**
20
+ * A {@link LabelMatcher} that has been through {@link canonicalizeMatcher}: an
21
+ * `exact` value folded to canonical form, a `regex` compiled case-insensitively.
22
+ *
23
+ * Branded for the same reason `CanonicalLabel` is — so a matcher read straight
24
+ * off a lock file cannot be compared against a canonical label set by accident.
25
+ */
26
+ declare const CANONICAL_MATCHER: unique symbol;
27
+ export type CanonicalMatcher = LabelMatcher & {
28
+ readonly [CANONICAL_MATCHER]: true;
29
+ };
30
+ /**
31
+ * Compile (and cache) the `RegExp` for a regex matcher.
32
+ *
33
+ * `g` and `y` are stripped before compiling and before building the memo key.
34
+ * They are worse than useless here: `matcherSatisfiedBy` below loops `.test()`
35
+ * over a label *set*, so one successful match would leave `lastIndex` pointing
36
+ * into the middle of the next label. Stripping at the reader also tolerates a
37
+ * lock file written by a compiler that predates the producer-side strip.
38
+ */
19
39
  export declare function compileRegexMatcher(m: {
20
40
  source: string;
21
41
  flags: string;
22
42
  }): RegExp;
23
43
  /** Whether a single label string satisfies the matcher. */
24
44
  export declare function matcherMatches(m: LabelMatcher, label: string): boolean;
25
- /** Whether some label in the set satisfies the matcher. */
26
- export declare function matcherSatisfiedBy(m: LabelMatcher, labels: ReadonlySet<string>): boolean;
45
+ /**
46
+ * Fold a matcher into the canonical matching domain.
47
+ *
48
+ * `exact` values lowercase directly. A regex source CANNOT be lowercased
49
+ * without corrupting the pattern (character classes, escapes, anchors), so the
50
+ * `i` flag carries the fold instead. This is the ONLY place `i` is added:
51
+ * `compileRegexMatcher` must stay flag-faithful because `matchHostPattern`
52
+ * uses it to match agent IDs, which are not labels.
53
+ */
54
+ export declare function canonicalizeMatcher(m: LabelMatcher): CanonicalMatcher;
55
+ /** Whether some label in the canonical set satisfies the canonical matcher. */
56
+ export declare function matcherSatisfiedBy(m: CanonicalMatcher, labels: ReadonlySet<CanonicalLabel>): boolean;
27
57
  export declare const HostTargetValue: z.ZodObject<{
28
58
  include: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
29
59
  kind: z.ZodLiteral<"exact">;
@@ -75,10 +105,11 @@ export type HostTargetSelector = z.infer<typeof HostTargetSelector>;
75
105
  * True iff the host's labels satisfy EVERY target value: all of a value's
76
106
  * include matchers match and none of its exclude matchers match.
77
107
  */
78
- export declare function hostSatisfiesTarget(labels: ReadonlySet<string>, target: HostTargetSelector): boolean;
79
- /** Split a matcher list into exact label strings and the remaining regex matchers. */
108
+ export declare function hostSatisfiesTarget(labels: ReadonlySet<CanonicalLabel>, target: HostTargetSelector): boolean;
109
+ /** Split a matcher list into canonical exact labels and canonical regex matchers. */
80
110
  export declare function partitionMatchers(ms: readonly LabelMatcher[]): {
81
- exact: string[];
82
- regex: LabelMatcher[];
111
+ exact: CanonicalLabel[];
112
+ regex: CanonicalMatcher[];
83
113
  };
114
+ export {};
84
115
  //# sourceMappingURL=labels-match.d.ts.map