@kici-dev/engine 0.1.27 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/approval/types.d.ts +8 -1
- package/dist/approval/types.js +8 -1
- package/dist/artifacts/name.d.ts +60 -0
- package/dist/artifacts/name.js +71 -0
- package/dist/audit/access-log-policy.d.ts +1 -1
- package/dist/audit/access-log-policy.js +8 -0
- package/dist/audit/activity.d.ts +12 -12
- package/dist/audit/retention-policy.js +16 -0
- package/dist/billing/plan-type.d.ts +53 -0
- package/dist/billing/plan-type.js +70 -0
- package/dist/bundler/rolldown-config.d.ts +3 -3
- package/dist/check-mode.d.ts +1 -1
- package/dist/context/concurrency-strategy.d.ts +34 -0
- package/dist/context/concurrency-strategy.js +35 -0
- package/dist/context/held-run-job-id.d.ts +45 -0
- package/dist/context/held-run-job-id.js +56 -0
- package/dist/context/held-run-status.d.ts +33 -0
- package/dist/context/held-run-status.js +37 -0
- package/dist/context/hold-expiry.d.ts +20 -0
- package/dist/context/hold-expiry.js +25 -0
- package/dist/context/hold-reason.d.ts +33 -0
- package/dist/context/hold-reason.js +23 -0
- package/dist/context/hold-type.d.ts +40 -0
- package/dist/context/hold-type.js +61 -0
- package/dist/context/index.d.ts +9 -1
- package/dist/context/index.js +9 -2
- package/dist/context/multi-context.d.ts +3 -3
- package/dist/context/scope-name.d.ts +29 -0
- package/dist/context/scope-name.js +49 -0
- package/dist/context/scope-resolver.d.ts +33 -0
- package/dist/context/scope-resolver.js +45 -15
- package/dist/context/types.d.ts +8 -5
- package/dist/dev-ops/operations.d.ts +8 -0
- package/dist/dev-ops/operations.js +36 -19
- package/dist/diagnostics/infra-alert.d.ts +71 -0
- package/dist/diagnostics/infra-alert.js +60 -0
- package/dist/env/environment-allowlist.d.ts +4 -4
- package/dist/fanout/materialize.d.ts +16 -0
- package/dist/fanout/materialize.js +32 -3
- package/dist/index.d.ts +15 -6
- package/dist/index.js +34 -19
- package/dist/inputs/descriptor.d.ts +9 -9
- package/dist/inventory.d.ts +4 -4
- package/dist/labels.d.ts +82 -2
- package/dist/labels.js +119 -1
- package/dist/matrix/expand.d.ts +49 -2
- package/dist/matrix/expand.js +102 -13
- package/dist/matrix/format.d.ts +6 -1
- package/dist/matrix/format.js +6 -1
- package/dist/mcp/held-run-resolve.d.ts +7 -10
- package/dist/mcp/held-run-resolve.js +33 -7
- package/dist/metrics/catalog-policy.js +4 -4
- package/dist/metrics/metric-catalog.generated.d.ts +959 -739
- package/dist/metrics/metric-catalog.generated.js +284 -20
- package/dist/metrics/metric-kind-compat.d.ts +26 -0
- package/dist/metrics/metric-kind-compat.js +33 -0
- package/dist/protocol/analytics-events.d.ts +6 -6
- package/dist/protocol/dashboard-api-errors.d.ts +1 -0
- package/dist/protocol/dashboard-api-errors.js +5 -1
- package/dist/protocol/dashboard-write-operations.d.ts +143 -86
- package/dist/protocol/dashboard-write-operations.js +91 -17
- package/dist/protocol/messages/access-log.d.ts +437 -392
- package/dist/protocol/messages/access-log.js +11 -2
- package/dist/protocol/messages/actor.d.ts +2 -2
- package/dist/protocol/messages/agent-dev-ops.d.ts +4 -2
- package/dist/protocol/messages/agent-dev-ops.js +2 -5
- package/dist/protocol/messages/agent-run-result.d.ts +72 -62
- package/dist/protocol/messages/auth.d.ts +35 -23
- package/dist/protocol/messages/browser.d.ts +81 -5
- package/dist/protocol/messages/browser.js +53 -2
- package/dist/protocol/messages/capabilities.d.ts +106 -31
- package/dist/protocol/messages/capabilities.js +94 -10
- package/dist/protocol/messages/common.d.ts +45 -2
- package/dist/protocol/messages/common.js +64 -3
- package/dist/protocol/messages/dashboard-sealed-write.d.ts +52 -0
- package/dist/protocol/messages/dashboard-sealed-write.js +57 -0
- package/dist/protocol/messages/dashboard.d.ts +1026 -498
- package/dist/protocol/messages/dashboard.js +208 -31
- package/dist/protocol/messages/deployment-identity.d.ts +37 -10
- package/dist/protocol/messages/deployment-identity.js +30 -3
- package/dist/protocol/messages/event-log.d.ts +5 -5
- package/dist/protocol/messages/execution-status.d.ts +189 -53
- package/dist/protocol/messages/execution-status.js +108 -40
- package/dist/protocol/messages/heartbeat-health.d.ts +83 -0
- package/dist/protocol/messages/heartbeat-health.js +87 -0
- package/dist/protocol/messages/log-stream.d.ts +18 -0
- package/dist/protocol/messages/log-stream.js +19 -0
- package/dist/protocol/messages/oidc-mint.d.ts +7 -0
- package/dist/protocol/messages/oidc-mint.js +7 -0
- package/dist/protocol/messages/orchestrator-agent.d.ts +264 -67
- package/dist/protocol/messages/orchestrator-agent.js +170 -5
- package/dist/protocol/messages/pat-kind.d.ts +1 -1
- package/dist/protocol/messages/peer.d.ts +122 -58
- package/dist/protocol/messages/peer.js +37 -2
- package/dist/protocol/messages/platform-orchestrator.d.ts +561 -217
- package/dist/protocol/messages/platform-orchestrator.js +131 -21
- package/dist/protocol/messages/run-events.d.ts +5 -5
- package/dist/protocol/messages/scaler-event.d.ts +3 -3
- package/dist/protocol/messages/source-registration.d.ts +56 -13
- package/dist/protocol/messages/source-registration.js +49 -6
- package/dist/protocol/source-origin.d.ts +1 -1
- package/dist/provenance/attestation-origin.d.ts +1 -1
- package/dist/provenance/schema.d.ts +11 -11
- package/dist/provenance/verify.js +2 -1
- package/dist/provider/changed-files-fetcher.d.ts +21 -2
- package/dist/provider/check-run-conclusion.d.ts +2 -2
- package/dist/provider/check-status-poster.d.ts +23 -0
- package/dist/provider/index.d.ts +2 -2
- package/dist/registration/registerable-trigger-type.d.ts +14 -13
- package/dist/registration/registerable-trigger-type.js +1 -0
- package/dist/sandbox/capabilities.d.ts +6 -0
- package/dist/sandbox/capabilities.js +57 -0
- package/dist/scaler/scaler-backend-type.d.ts +1 -1
- package/dist/status/presentation.d.ts +89 -0
- package/dist/status/presentation.js +163 -0
- package/dist/trigger/compiled-matchers.d.ts +13 -0
- package/dist/trigger/compiled-matchers.js +44 -0
- package/dist/trigger/event-buckets.d.ts +44 -0
- package/dist/trigger/event-buckets.js +93 -0
- package/dist/trigger/matcher.d.ts +7 -3
- package/dist/trigger/matcher.js +53 -15
- package/dist/trigger/schedule-key.d.ts +14 -0
- package/dist/trigger/schedule-key.js +21 -0
- package/dist/trigger/trigger-event-type.d.ts +1 -1
- package/dist/trigger/trigger-event-type.js +2 -0
- package/dist/trigger/types.d.ts +173 -43
- package/dist/trigger/types.js +82 -25
- package/dist/webhook/event-types.d.ts +56 -0
- package/dist/webhook/event-types.js +59 -0
- package/dist/ws/ws-like.d.ts +13 -0
- package/package.json +12 -4
- package/sbom.spdx.json +10 -10
- package/dist/environment/host-match.d.ts +0 -25
- package/dist/environment/index.d.ts +0 -6
- package/dist/environment/multi-env.d.ts +0 -30
- package/dist/environment/scope-resolver.d.ts +0 -46
- package/dist/environment/scope-template.d.ts +0 -18
- package/dist/environment/types.d.ts +0 -119
- package/dist/package-manager.d.ts +0 -20
- package/dist/protocol/messages/observe.d.ts +0 -76
- package/dist/protocol/messages/saas-orchestrator.d.ts +0 -2179
- package/dist/protocol/messages/test-run.d.ts +0 -59
- package/dist/state-machine/index.d.ts +0 -2
- package/dist/state-machine/index.js +0 -3
- package/dist/state-machine/machine.d.ts +0 -34
- package/dist/state-machine/machine.js +0 -103
- package/dist/state-machine/types.d.ts +0 -34
- package/dist/state-machine/types.js +0 -15
package/dist/index.js
CHANGED
|
@@ -3,29 +3,34 @@ import { CheckMode, CheckStepOutcome } from "./check-mode.js";
|
|
|
3
3
|
import { 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 { WS_MAX_PAYLOAD_BYTES, ackSchema, errorSchema, heartbeatSchema, nackSchema } from "./protocol/messages/common.js";
|
|
6
|
+
import { NACK_EXEMPT_MESSAGE_TYPES, WS_MAX_PAYLOAD_BYTES, ackSchema, buildUnsupportedMessageNack, errorSchema, heartbeatSchema, nackSchema } from "./protocol/messages/common.js";
|
|
7
7
|
import { ActorType, actorPrincipalSchema, agentLabelOf, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema } from "./protocol/messages/actor.js";
|
|
8
8
|
import { PatKind } from "./protocol/messages/pat-kind.js";
|
|
9
9
|
import { approveRunToolSchema, cancelRunToolSchema, cancelRunsByBranchToolSchema, getDiagnosticsToolSchema, getRunToolSchema, getStepLogsToolSchema, listOrchestratorsToolSchema, listOrgsToolSchema, listRunsToolSchema, listSecretsToolSchema, listWorkflowsToolSchema, rejectRunToolSchema, rerunRunToolSchema, triggerRunToolSchema } from "./mcp/tool-schemas.js";
|
|
10
|
+
import { HeldRunStatus } from "./context/held-run-status.js";
|
|
10
11
|
import { resolveHeldRunId } from "./mcp/held-run-resolve.js";
|
|
11
12
|
import { renderFenced } from "./mcp/fence.js";
|
|
12
|
-
import { CONTEXTS_MAX, CacheOutcome, CacheRunEventType, CacheStepType, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, MAX_JOBS_PER_RUN, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, STATE_REPLAY_MAX_RUNS, STATUS_FREE_TEXT_MAX, STATUS_ID_MAX, StepConcurrencyKind, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, statusOptionsForLevel, stepStatusForwardSchema } from "./protocol/messages/execution-status.js";
|
|
13
|
+
import { CONTEXTS_MAX, CacheOutcome, CacheRunEventType, CacheStepType, DEAD_ORCH_FAILURE_REASON, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, MAX_JOBS_PER_RUN, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, RunFailureClass, STATE_REPLAY_MAX_RUNS, STATUS_FREE_TEXT_MAX, STATUS_ID_MAX, StepConcurrencyKind, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TERMINAL_STEP_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplayRunSchema, stateReplaySchema, statusOptionsForLevel, stepStatusForwardSchema } from "./protocol/messages/execution-status.js";
|
|
13
14
|
import { TrustTierSchema } from "./context/types.js";
|
|
14
15
|
import { AgentFailureCategory, agentJobResultSchema, agentRunListItemSchema, agentRunResultSchema, agentStepLogsSchema, agentStepResultSchema, agentWorkflowSummarySchema, untrusted, wrapUntrusted } from "./protocol/messages/agent-run-result.js";
|
|
15
16
|
import { AccessLogAction, AccessLogOutcome, AccessLogSource, AccessLogTargetType, accessLogFilterSchema, accessLogItemSchema, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./protocol/messages/access-log.js";
|
|
16
17
|
import { browserJobContextSchema, browserRunEventSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, jobContextMessageSchema, runEventMessageSchema } from "./protocol/messages/run-events.js";
|
|
17
18
|
import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./protocol/messages/event-log.js";
|
|
18
19
|
import { DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema } from "./protocol/messages/deployment-identity.js";
|
|
19
|
-
import { SourceProvider, SourceSubtype, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema } from "./protocol/messages/source-registration.js";
|
|
20
|
+
import { OWN_INGRESS_MODES, OrchestratorMode, PLATFORM_CONNECTED_MODES, RELAY_INGRESS_MODES, SourceProvider, SourceSubtype, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema } from "./protocol/messages/source-registration.js";
|
|
20
21
|
import { ScalerBackendType } from "./scaler/scaler-backend-type.js";
|
|
21
|
-
import { ApprovalDecision, HoldScope, TriggerSource, approvalRequirementSchema, approverClauseSchema } from "./approval/types.js";
|
|
22
|
-
import {
|
|
22
|
+
import { ApprovalDecision, HoldScope, TriggerSource, approvalRequirementSchema, approvalTimeoutSecondsSchema, approverClauseSchema } from "./approval/types.js";
|
|
23
|
+
import { CANONICAL_STATUSES, LEGACY_STATUS_ALIASES, STATUS_FAILURE_CLASS, STATUS_PRECEDENCE, StatusFailureClass, isFailureStatus, toCanonicalStatus, worstStatus } from "./status/presentation.js";
|
|
24
|
+
import { BREAKING_FLOOR, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, RunsOnPick, SANDBOX_NETWORK_MODES, SCHEMA_VERSION, changedFilesStatusSchema, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, resolveWhenToRunOn } from "./trigger/types.js";
|
|
23
25
|
import { HostTargetSelector, HostTargetValue, LabelMatcher, compileRegexMatcher, hostSatisfiesTarget, matcherMatches, matcherSatisfiedBy, partitionMatchers } from "./labels-match.js";
|
|
26
|
+
import { ConcurrencyStrategy, DEFAULT_CONCURRENCY_STRATEGY } from "./context/concurrency-strategy.js";
|
|
24
27
|
import { HostInventoryEntry, HostPropertyValue, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, coerceHostPropertyValue, parseHostPropertyAssignments } from "./inventory.js";
|
|
25
|
-
import { ContextDeleteErrorCode, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType,
|
|
26
|
-
import { ORCH_CAPABILITIES, OrchRole, hasOrchCapability, orchCapabilitiesSchema } from "./protocol/messages/capabilities.js";
|
|
28
|
+
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";
|
|
29
|
+
import { ORCH_AGENT_CAPABILITIES, ORCH_CAPABILITIES, OrchRole, PLATFORM_CAPABILITIES, hasOrchAgentCapability, hasOrchCapability, hasPlatformCapability, orchAgentCapabilitiesSchema, orchCapabilitiesSchema, platformCapabilitiesSchema } from "./protocol/messages/capabilities.js";
|
|
27
30
|
import { authFailureSchema, authRequestSchema, authSuccessSchema } from "./protocol/messages/auth.js";
|
|
28
|
-
import {
|
|
31
|
+
import { LogStream } from "./protocol/messages/log-stream.js";
|
|
32
|
+
import { DEFAULT_APPROVAL_EXPIRY_HOURS, ORCH_TO_PLATFORM_RECOGNIZED_TYPES, OrchLogPhase, PLATFORM_TO_ORCH_RECOGNIZED_TYPES, WEBHOOK_RELAY_CHUNK_SIZE, WEBHOOK_RELAY_MAX_BODY_BYTES, WebhookRelayResult, cacheStatsSchema, collectDiscriminatorTypes, executionEventSchema, logChunkSchema, orchLogChunkSchema, orchMetricsSchema, orchestratorToPlatformMessageSchema, peerDiscoverSchema, peerUpdateSchema, platformCapabilitiesMessageSchema, platformToOrchestratorMessageSchema, staleCheckrunCleanupSchema, trustPolicySchema, trustPolicyUpdateSchema, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema } from "./protocol/messages/platform-orchestrator.js";
|
|
33
|
+
import { HEARTBEAT_CLOSE_MS, HEARTBEAT_DEGRADED_MS, HEARTBEAT_FRESH_MS, HEARTBEAT_STALE_THRESHOLD_SECONDS, HEARTBEAT_UNHEALTHY_MARK_MS, connectionHealthStatusSchema } from "./protocol/messages/heartbeat-health.js";
|
|
29
34
|
import { agentDiagnosticsConnectionSchema, agentDiagnosticsSchema, agentOrchestratorSummarySchema, agentOrgSummarySchema, agentSecretScopeSchema } from "./protocol/messages/agent-dev-ops.js";
|
|
30
35
|
import { DEVELOPER_OPERATIONS, developerOpsForEntrypoint } from "./dev-ops/operations.js";
|
|
31
36
|
import { ScalerEventType } from "./protocol/messages/scaler-event.js";
|
|
@@ -34,38 +39,48 @@ import { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, accessLogWarmSqlCase, audit
|
|
|
34
39
|
import { ActivityFilterSource, ActivityRowSource, activityCursorSchema, activityFilterSchema, activityRowSchema, decodeActivityCursor, encodeActivityCursor, resolveRunIdSugar } from "./audit/activity.js";
|
|
35
40
|
import { logPullOrchToPlatformSchema, logPullPlatformToOrchSchema } from "./protocol/messages/log-pull.js";
|
|
36
41
|
import { EVENT_LOG_PAYLOAD_CHUNK_BYTES } from "./protocol/event-log-payload.js";
|
|
37
|
-
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";
|
|
42
|
+
import { browserAuthFailureSchema, browserAuthRefreshSchema, browserAuthRequestSchema, browserAuthSuccessSchema, browserErrorSchema, browserEventLogPayloadFetchSchema, browserGapSchema, browserJobNewSchema, browserJobStatusSchema, browserLogLinesSchema, browserLogStreamTerminatedReason, browserLogStreamTerminatedSchema, browserLogSubscribeSchema, browserLogUnsubscribeSchema, browserOrchLogLinesSchema, browserOrchLogSubscribeSchema, browserOrchLogUnsubscribeSchema, browserPingSchema, browserPongSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, platformToBrowserMessageSchema } from "./protocol/messages/browser.js";
|
|
38
43
|
import { joinRequestSchema, joinResponseSchema } from "./protocol/messages/join.js";
|
|
39
|
-
import { fleetSelectionSchema, jobProgressAckSchema, 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";
|
|
40
|
-
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, provenanceUploadDeferSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, registerAckSchema, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, upstreamSnapshotSchema } from "./protocol/messages/orchestrator-agent.js";
|
|
44
|
+
import { fleetSelectionSchema, jobProgressAckSchema, jobProgressSchema, jobRerouteAckSchema, jobRerouteSchema, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerClusterSettingsRequestSchema, peerClusterSettingsResponseSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, workerClusterSettingsSchema } from "./protocol/messages/peer.js";
|
|
45
|
+
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, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobDispatchSchema, jobRejectSchema, jobStatusSchema, orchestratorToAgentMessageSchema, provenanceUploadCompleteSchema, provenanceUploadDeferSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, registerAckSchema, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, upstreamSnapshotSchema } from "./protocol/messages/orchestrator-agent.js";
|
|
46
|
+
import { KNOWN_LINUX_CAPABILITIES, canonicalizeCapability, isKnownCapability } from "./sandbox/capabilities.js";
|
|
41
47
|
import { TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES } from "./trigger/trigger-event-type.js";
|
|
42
48
|
import { createTraceEntry, createWorkflowDecision } from "./trigger/decision-trace.js";
|
|
43
|
-
import { matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchWorkflowTriggers } from "./trigger/matcher.js";
|
|
49
|
+
import { matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchTrigger, matchWorkflowTriggers } from "./trigger/matcher.js";
|
|
50
|
+
import { TRIGGER_TYPE_TO_EVENT_TYPES, matchWorkflowsForEvent, prepareEventBuckets } from "./trigger/event-buckets.js";
|
|
51
|
+
import { scheduleTriggerKey } from "./trigger/schedule-key.js";
|
|
44
52
|
import { DispatchInputType, InputDescriptor, InputsDescriptorMapSchema } from "./inputs/descriptor.js";
|
|
45
53
|
import { UnsupportedDispatchInputError, extractInputDescriptor, extractInputsDescriptorMap } from "./inputs/extract.js";
|
|
46
54
|
import { buildZodFromDescriptor, buildZodObjectFromMap } from "./inputs/build.js";
|
|
47
55
|
import { DispatchInputError, coerceDispatchInputs, parseInputPairs } from "./inputs/coerce.js";
|
|
48
56
|
import { assertScheduleInputsSatisfiable, isInputSatisfiableFromDefaults, resolveScheduleInputs } from "./inputs/schedule.js";
|
|
49
57
|
import "./inputs/index.js";
|
|
50
|
-
import { isTerminal, transition } from "./state-machine/machine.js";
|
|
51
|
-
import "./state-machine/index.js";
|
|
52
58
|
import { LockFileParseError } from "./provider/lock-file-parse-error.js";
|
|
53
59
|
import { CheckRunConclusion } from "./provider/check-run-conclusion.js";
|
|
54
60
|
import "./provider/index.js";
|
|
55
61
|
import { githubIngressPath, githubWebhookPath } from "./webhook/webhook-url-format.js";
|
|
62
|
+
import { PING_EVENT_TYPE, SUBSCRIBABLE_WEBHOOK_EVENT_TYPES, SubscribableWebhookEventType, WebhookEventType } from "./webhook/event-types.js";
|
|
56
63
|
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";
|
|
57
64
|
import { WsRateLimiter } from "./ws/rate-limiter.js";
|
|
58
65
|
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";
|
|
59
66
|
import "./secrets/index.js";
|
|
60
|
-
import {
|
|
67
|
+
import { HoldType, normalizePersistedHoldType, persistedHoldTypeSpellings } from "./context/hold-type.js";
|
|
68
|
+
import { trustedContributorHoldReason, unknownContributorHoldReason } from "./context/hold-reason.js";
|
|
69
|
+
import { INSTALL_JOB_ID_PREFIX, SECURITY_HOLD_JOB_IDS, SECURITY_HOLD_JOB_LABELS, WORKFLOW_MODIFICATION_JOB_ID, installGateJobId } from "./context/held-run-job-id.js";
|
|
70
|
+
import { DEFAULT_HOLD_EXPIRY_SECONDS } from "./context/hold-expiry.js";
|
|
71
|
+
import { matchScopePattern, resolveSecretsForContext, resolveSecretsWithProvenance, stripScopePrefix } from "./context/scope-resolver.js";
|
|
61
72
|
import { ContextGateRejectReason, mergeOrderedMaps } from "./context/multi-context.js";
|
|
73
|
+
import { SCOPE_NAME_MAX_LENGTH, SCOPE_SEGMENT_PATTERN, ScopeNameError, assertValidScopeName, validateScopeName } from "./context/scope-name.js";
|
|
62
74
|
import "./context/index.js";
|
|
63
|
-
import { CAPABILITY_LABEL_PREFIX, HOST_LABEL_PREFIX, INIT_LABEL, KNOWN_ROLES, PRIVILEGED_ROOT_LABEL, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, agentTypeLabel, capabilityLabel, deriveOsArchLabels, hostLabel, isSelfReportedLabel, mergeAutoLabels, normalizeRunsOn, parseHostLabel, resolveRoleLabels, scalerAgentLabels, scalerLabel, validateNoReservedLabels } from "./labels.js";
|
|
75
|
+
import { CAPABILITY_LABEL_PREFIX, HOST_LABEL_PREFIX, INIT_LABEL, KNOWN_ROLES, PLATFORM_TAINT_LABELS, PRIVILEGED_ROOT_LABEL, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, ScalerArch, ScalerOs, agentTypeLabel, capabilityLabel, deriveOsArchLabels, derivePlatformTaints, hostLabel, hostToScalerPlatform, isSelfReportedLabel, mergeAutoLabels, nodeArchToScalerArch, nodePlatformToScalerOs, normalizeRunsOn, parseHostLabel, platformToOsArchLabels, platformToTaints, resolveRoleLabels, scalerAgentLabels, scalerLabel, scalerPlatformSchema, validateNoReservedLabels } from "./labels.js";
|
|
64
76
|
import { parseMemoryString, resourceRequestNestedSchema, resourceSpecSchema, validateResourceRequest } from "./scaler/resource-types.js";
|
|
65
77
|
import { RegisterableTriggerType } from "./registration/registerable-trigger-type.js";
|
|
66
78
|
import { createWorkflowBundleConfig } from "./bundler/rolldown-config.js";
|
|
67
79
|
import "./bundler/index.js";
|
|
68
|
-
import { applyIncludeExclude, expandMatrix, expandMultiDimension, expandSingleDimension } from "./matrix/expand.js";
|
|
80
|
+
import { MatrixShapeError, applyIncludeExclude, expandMatrix, expandMultiDimension, expandSingleDimension, findDuplicateCombination, matrixCombinationCount, normalizeMatrixInput } from "./matrix/expand.js";
|
|
69
81
|
import { formatExpandedJobName, formatMatrixSuffix } from "./matrix/format.js";
|
|
70
|
-
import { FanoutCause, FanoutError, MAX_FANOUT_JOBS, VariantKind, fanoutEnvelopeFields, hostEnvelopeFields, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields } from "./fanout/materialize.js";
|
|
71
|
-
export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, AgentFailureCategory, ApprovalDecision, AttestationOrigin, CAPABILITY_LABEL_PREFIX, CONTEXTS_MAX, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckMode, CheckRunConclusion, CheckStepOutcome, ContextDeleteErrorCode, ContextGateRejectReason, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DEVELOPER_OPERATIONS, DashboardResponseErrorCode, DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema, DispatchInputError, DispatchInputType, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EventLogPayloadStreamError, EventLogSource, EventLogStatus, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, FanoutCause, FanoutError, FleetHostDisposition, HOST_LABEL_PREFIX, HeldRunQueueType, HeldRunStatus, HoldScope, HostInventoryEntry, HostPropertyValue, HostTargetSelector, HostTargetValue, INIT_LABEL, InitFailureCategory, InputDescriptor, InputsDescriptorMapSchema, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, JobRejectReason, KICI_AGENT_ENV_PREFIX, KNOWN_ROLES, LabelMatcher, LockFileParseError, MAX_FANOUT_JOBS, MAX_JOBS_PER_RUN, MIN_PROTOCOL_VERSION, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, ORCH_CAPABILITIES, OnUnreachableMode, OrchRole, POLICY_BY_ACTION, PRIVILEGED_ROOT_LABEL, PROTOCOL_VERSION, PatKind, PayloadOmittedReason, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, RegisterableTriggerType, RunsOnPick, SANDBOX_DEFAULT_VARS, SCHEMA_VERSION, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, STATE_REPLAY_MAX_RUNS, STATUS_FREE_TEXT_MAX, STATUS_ID_MAX, ScalerBackendType, ScalerEventType, SourceOrigin, SourceProvider, SourceSubtype, StepApprovalOutcome, StepConcurrencyKind, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, TRUSTED_ENV_SCRUB_EXACT, TestRelayType, TimeoutReason, TriggerSource, TrustTierSchema, UnsupportedDispatchInputError, VariantKind, 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_REBALANCE, WS_CLOSE_UNAUTHORIZED, WS_MAX_PAYLOAD_BYTES, 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, applyIncludeExclude, approvalRequirementSchema, approveRunToolSchema, approverClauseSchema, assertScheduleInputsSatisfiable, 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, browserPingSchema, browserPongSchema, browserRunEventSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, buildTrustedPassthroughEnv, buildZodFromDescriptor, buildZodObjectFromMap, cacheStatsSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, cancelRunToolSchema, cancelRunsByBranchToolSchema, capabilityLabel, coerceDispatchInputs, coerceHostPropertyValue, compileRegexMatcher, configAckSchema, contextBindingEntrySchema, contextBindingsListRequestSchema, contextBindingsSetRequestSchema, contextCreateRequestSchema, contextDeleteRequestSchema, contextGetRequestSchema, contextHistoryRequestSchema, contextListRequestSchema, contextSecretDeleteRequestSchema, contextSecretScopeCreateRequestSchema, contextSecretScopeDeleteRequestSchema, contextSecretScopeRenameRequestSchema, contextSecretSetRequestSchema, contextSecretsListRequestSchema, contextSourceOverrideDeleteRequestSchema, contextSourceOverrideSetRequestSchema, contextSourceOverridesListRequestSchema, contextTestAccessSetRequestSchema, contextUpdateRequestSchema, contextVarDeleteRequestSchema, contextVarSetRequestSchema, contextVarsListRequestSchema, createTraceEntry, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, dashboardAttestationRetryRequestSchema, dashboardAttestationRetryResponseSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListAllRequestSchema, dashboardAttestationsListAllResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, developerOpsForEntrypoint, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, errorSchema, eventEmitResponseSchema, eventEmitSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, expandMatrix, expandMultiDimension, expandSingleDimension, extractInputDescriptor, extractInputsDescriptorMap, fanoutEnvelopeFields, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetLogsRequestSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getDiagnosticsToolSchema, getRunToolSchema, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, getStepLogsToolSchema, gitAuthSchema, githubIngressPath, githubWebhookPath, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, hostSatisfiesTarget, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, isInputSatisfiableFromDefaults, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, isSelfReportedLabel, isTerminal, 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, matchWorkflowTriggers, matcherMatches, matcherSatisfiedBy, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, mergeOrderedMaps, minAccessLogWarmDays, minAuditLogWarmDays, minSecretAuditLogWarmDays, nackSchema, normalizeRunsOn, orchCapabilitiesSchema, orchMetricsSchema, orchestratorToAgentMessageSchema, orchestratorToPlatformMessageSchema, orgMemberSchema, parseActor, parseHostLabel, parseHostPropertyAssignments, parseInputPairs, parseMemoryString, partitionMatchers, peerAgentTokenRevokeSchema, peerAuthRequestSchema, peerAuthResponseSchema, peerCapabilitiesSchema, peerConfigReloadResponseSchema, peerConfigReloadSchema, peerDiscoverSchema, peerFromPeerMessageSchema, peerHeartbeatSchema, peerHelloResponseSchema, peerHelloSchema, peerJobCancelSchema, peerLeavingSchema, peerLogsCollectChunkSchema, peerLogsCollectErrorSchema, peerLogsCollectRequestSchema, peerScalerEventSchema, peerToPeerMessageSchema, peerUpdateSchema, platformOperatorActorSchema, platformToBrowserMessageSchema, platformToOrchestratorMessageSchema, provenanceUploadCompleteSchema, provenanceUploadDeferSchema, provenanceUploadRequestSchema, provenanceUploadResponseSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, rejectRunToolSchema, renderFenced, rerunRunToolSchema, resolveHeldRunId, resolveRoleLabels, resolveRunIdSugar, resolveScheduleInputs, resolveSecretsForContext, resolveWhenToRunOn, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, statusOptionsForLevel, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, transition, triggerRunToolSchema, trustPolicyResponseSchema, trustPolicyUpdateSchema, untrusted, upstreamSnapshotSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema, wrapUntrusted };
|
|
82
|
+
import { FanoutCause, FanoutError, MAX_FANOUT_JOBS, MAX_MATRIX_MATERIALIZATION, VariantKind, fanoutEnvelopeFields, hostEnvelopeFields, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields } from "./fanout/materialize.js";
|
|
83
|
+
import { ARTIFACT_INVALID_NAME_PREFIX, ARTIFACT_NAME_MAX_LENGTH, ArtifactNameSchema, artifactInvalidNameError, checkArtifactName } from "./artifacts/name.js";
|
|
84
|
+
import { PLAN_TYPES, PaidPlanType, PlanType, isPaidTier, planRank } from "./billing/plan-type.js";
|
|
85
|
+
import { INFRA_ALERT_TYPES, InfraAlertSeverity, InfraAlertType, normalizeInfraAlertSeverity } from "./diagnostics/infra-alert.js";
|
|
86
|
+
export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, 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, CONTEXTS_MAX, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckMode, CheckRunConclusion, CheckStepOutcome, ConcurrencyStrategy, ContextDeleteErrorCode, ContextGateRejectReason, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DEAD_ORCH_FAILURE_REASON, DEFAULT_APPROVAL_EXPIRY_HOURS, 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, FanoutCause, FanoutError, FleetHostDisposition, 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, INSTALL_JOB_ID_PREFIX, InfraAlertSeverity, InfraAlertType, InitFailureCategory, InputDescriptor, InputsDescriptorMapSchema, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, JobRejectReason, KICI_AGENT_ENV_PREFIX, KNOWN_LINUX_CAPABILITIES, KNOWN_ROLES, LEGACY_STATUS_ALIASES, LabelMatcher, LockFileParseError, LogStream, MAX_FANOUT_JOBS, MAX_JOBS_PER_RUN, MAX_MATRIX_MATERIALIZATION, 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, RELAY_INGRESS_MODES, REPO_IDENTIFIER_MAX, RUNS_ON_LABELS_MAX, RegisterableTriggerType, RunFailureClass, RunsOnPick, SANDBOX_DEFAULT_VARS, SANDBOX_NETWORK_MODES, SCHEMA_VERSION, SCOPE_NAME_MAX_LENGTH, SCOPE_SEGMENT_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, ScalerArch, ScalerBackendType, ScalerEventType, ScalerOs, ScopeNameError, SourceOrigin, SourceProvider, SourceSubtype, StatusFailureClass, StepApprovalOutcome, StepConcurrencyKind, SubscribableWebhookEventType, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TERMINAL_STEP_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, TRIGGER_TYPE_TO_EVENT_TYPES, TRUSTED_ENV_SCRUB_EXACT, TestRelayType, TimeoutReason, 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, applyIncludeExclude, approvalRequirementSchema, approvalTimeoutSecondsSchema, approveRunToolSchema, approverClauseSchema, artifactInvalidNameError, artifactListItemSchema, artifactsDownloadRequestSchema, artifactsDownloadResponseSchema, artifactsUploadCompleteAckSchema, artifactsUploadCompleteSchema, artifactsUploadRequestSchema, artifactsUploadResponseSchema, assertScheduleInputsSatisfiable, assertValidScopeName, 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, coerceDispatchInputs, coerceHostPropertyValue, collectDiscriminatorTypes, compileRegexMatcher, 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, createTraceEntry, 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, developerOpsForEntrypoint, diagnosticsInfraAlertSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, errorSchema, 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, getRunToolSchema, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, getStepLogsToolSchema, gitAuthSchema, githubIngressPath, githubWebhookPath, hasOrchAgentCapability, hasOrchCapability, hasPlatformCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, hostSatisfiesTarget, hostToScalerPlatform, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, installGateJobId, isFailureStatus, isInputSatisfiableFromDefaults, isKnownCapability, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, isPaidTier, isSelfReportedLabel, 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, 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, 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, resolveHeldRunId, resolveRoleLabels, resolveRunIdSugar, resolveScheduleInputs, resolveSecretsForContext, resolveSecretsWithProvenance, resolveWhenToRunOn, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, scalerAgentLabels, 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, toCanonicalStatus, triggerRunToolSchema, trustPolicyResponseSchema, trustPolicySchema, trustPolicyUpdateSchema, trustedContributorHoldReason, unknownContributorHoldReason, untrusted, upstreamSnapshotSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, validateScopeName, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema, workerClusterSettingsSchema, worstStatus, wrapUntrusted };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/** The closed set of input value types persisted in the lockfile. */
|
|
3
3
|
export declare const DispatchInputType: z.ZodEnum<{
|
|
4
|
-
string: "string";
|
|
5
|
-
number: "number";
|
|
6
4
|
boolean: "boolean";
|
|
7
5
|
enum: "enum";
|
|
8
|
-
literal: "literal";
|
|
9
6
|
integer: "integer";
|
|
7
|
+
literal: "literal";
|
|
8
|
+
number: "number";
|
|
9
|
+
string: "string";
|
|
10
10
|
}>;
|
|
11
11
|
export type DispatchInputTypeT = z.infer<typeof DispatchInputType>;
|
|
12
12
|
/** JSON-safe, lossless descriptor of one declared dispatch input. */
|
|
13
13
|
export declare const InputDescriptor: z.ZodObject<{
|
|
14
14
|
type: z.ZodEnum<{
|
|
15
|
-
string: "string";
|
|
16
|
-
number: "number";
|
|
17
15
|
boolean: "boolean";
|
|
18
16
|
enum: "enum";
|
|
19
|
-
literal: "literal";
|
|
20
17
|
integer: "integer";
|
|
18
|
+
literal: "literal";
|
|
19
|
+
number: "number";
|
|
20
|
+
string: "string";
|
|
21
21
|
}>;
|
|
22
22
|
optional: z.ZodDefault<z.ZodBoolean>;
|
|
23
23
|
nullable: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -32,12 +32,12 @@ export declare const InputDescriptor: z.ZodObject<{
|
|
|
32
32
|
export type InputDescriptorT = z.infer<typeof InputDescriptor>;
|
|
33
33
|
export declare const InputsDescriptorMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
34
34
|
type: z.ZodEnum<{
|
|
35
|
-
string: "string";
|
|
36
|
-
number: "number";
|
|
37
35
|
boolean: "boolean";
|
|
38
36
|
enum: "enum";
|
|
39
|
-
literal: "literal";
|
|
40
37
|
integer: "integer";
|
|
38
|
+
literal: "literal";
|
|
39
|
+
number: "number";
|
|
40
|
+
string: "string";
|
|
41
41
|
}>;
|
|
42
42
|
optional: z.ZodDefault<z.ZodBoolean>;
|
|
43
43
|
nullable: z.ZodDefault<z.ZodBoolean>;
|
package/dist/inventory.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export type HostPropertyValue = z.infer<typeof HostPropertyValue>;
|
|
|
19
19
|
* absence; `ephemeral` hosts are GC'd past their ttl.
|
|
20
20
|
*/
|
|
21
21
|
export declare const InventoryLifecycleClass: z.ZodEnum<{
|
|
22
|
-
static: "static";
|
|
23
22
|
ephemeral: "ephemeral";
|
|
23
|
+
static: "static";
|
|
24
24
|
}>;
|
|
25
25
|
export type InventoryLifecycleClass = z.infer<typeof InventoryLifecycleClass>;
|
|
26
26
|
/**
|
|
@@ -31,8 +31,8 @@ export type InventoryLifecycleClass = z.infer<typeof InventoryLifecycleClass>;
|
|
|
31
31
|
*/
|
|
32
32
|
export declare const InventoryHostStatus: z.ZodEnum<{
|
|
33
33
|
ready: "ready";
|
|
34
|
-
unreachable: "unreachable";
|
|
35
34
|
stale: "stale";
|
|
35
|
+
unreachable: "unreachable";
|
|
36
36
|
}>;
|
|
37
37
|
export type InventoryHostStatus = z.infer<typeof InventoryHostStatus>;
|
|
38
38
|
/** Canonical queryable inventory record for one roster host. */
|
|
@@ -44,13 +44,13 @@ export declare const HostInventoryEntry: z.ZodObject<{
|
|
|
44
44
|
platform: z.ZodNullable<z.ZodString>;
|
|
45
45
|
arch: z.ZodNullable<z.ZodString>;
|
|
46
46
|
lifecycleClass: z.ZodEnum<{
|
|
47
|
-
static: "static";
|
|
48
47
|
ephemeral: "ephemeral";
|
|
48
|
+
static: "static";
|
|
49
49
|
}>;
|
|
50
50
|
status: z.ZodEnum<{
|
|
51
51
|
ready: "ready";
|
|
52
|
-
unreachable: "unreachable";
|
|
53
52
|
stale: "stale";
|
|
53
|
+
unreachable: "unreachable";
|
|
54
54
|
}>;
|
|
55
55
|
lastSeen: z.ZodString;
|
|
56
56
|
}, z.core.$strip>;
|
package/dist/labels.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
1
2
|
/**
|
|
2
3
|
* Structured auto-labels with category prefixes.
|
|
3
4
|
*
|
|
@@ -30,6 +31,85 @@
|
|
|
30
31
|
* Derive kici:os: and kici:arch: labels from platform and architecture strings.
|
|
31
32
|
*/
|
|
32
33
|
export declare function deriveOsArchLabels(platform: string, arch: string): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Plain OS/arch labels that gate a bare-metal scaler as a mandatory taint.
|
|
36
|
+
* A pool whose declared labels include one of these only accepts jobs that
|
|
37
|
+
* explicitly request that platform. Linux and x64/amd64 are the defaults and
|
|
38
|
+
* are absent on purpose — an unqualified `runsOn: 'bare-metal'` job must still
|
|
39
|
+
* land on a Linux-x64 scaler.
|
|
40
|
+
*/
|
|
41
|
+
export declare const PLATFORM_TAINT_LABELS: Set<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Intersect a pool's declared labels with {@link PLATFORM_TAINT_LABELS},
|
|
44
|
+
* returning the de-duplicated plain platform-taint labels (lowercased) in
|
|
45
|
+
* input order.
|
|
46
|
+
*/
|
|
47
|
+
export declare function derivePlatformTaints(declaredLabels: string[]): string[];
|
|
48
|
+
/**
|
|
49
|
+
* Operating systems a scaler pool can declare via the structured `platform`
|
|
50
|
+
* field. `linux` is the default and carries no taint; `macos` / `windows` are
|
|
51
|
+
* non-default and taint the pool.
|
|
52
|
+
*/
|
|
53
|
+
export declare const ScalerOs: z.ZodEnum<{
|
|
54
|
+
linux: "linux";
|
|
55
|
+
macos: "macos";
|
|
56
|
+
windows: "windows";
|
|
57
|
+
}>;
|
|
58
|
+
export type ScalerOs = z.infer<typeof ScalerOs>;
|
|
59
|
+
/**
|
|
60
|
+
* CPU architectures a scaler pool can declare via the structured `platform`
|
|
61
|
+
* field. `x64` is the default and carries no taint; `arm64` taints the pool.
|
|
62
|
+
*/
|
|
63
|
+
export declare const ScalerArch: z.ZodEnum<{
|
|
64
|
+
arm64: "arm64";
|
|
65
|
+
x64: "x64";
|
|
66
|
+
}>;
|
|
67
|
+
export type ScalerArch = z.infer<typeof ScalerArch>;
|
|
68
|
+
/**
|
|
69
|
+
* Structured platform of a scaler pool: the single source of truth for both the
|
|
70
|
+
* auto-injected `kici:os:*` / `kici:arch:*` labels and the mandatory platform
|
|
71
|
+
* taint. Declaring it once removes the ambiguity of matching plain string
|
|
72
|
+
* labels against a denylist.
|
|
73
|
+
*/
|
|
74
|
+
export declare const scalerPlatformSchema: z.ZodObject<{
|
|
75
|
+
os: z.ZodEnum<{
|
|
76
|
+
linux: "linux";
|
|
77
|
+
macos: "macos";
|
|
78
|
+
windows: "windows";
|
|
79
|
+
}>;
|
|
80
|
+
arch: z.ZodEnum<{
|
|
81
|
+
arm64: "arm64";
|
|
82
|
+
x64: "x64";
|
|
83
|
+
}>;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
export type ScalerPlatform = z.infer<typeof scalerPlatformSchema>;
|
|
86
|
+
/**
|
|
87
|
+
* Derive the `kici:os:*` / `kici:arch:*` labels for a declared structured
|
|
88
|
+
* platform. Reuses {@link deriveOsArchLabels} so the label shape is identical to
|
|
89
|
+
* the host-reported form (e.g. `windows` yields both `kici:os:windows` and
|
|
90
|
+
* `kici:os:win32`).
|
|
91
|
+
*/
|
|
92
|
+
export declare function platformToOsArchLabels(platform: ScalerPlatform): string[];
|
|
93
|
+
/**
|
|
94
|
+
* Derive the plain platform-taint labels for a declared structured platform.
|
|
95
|
+
* Returns the canonical tokens (`macos`, `windows`, `arm64`) that a job's
|
|
96
|
+
* `runsOn` must include to allocate on the pool. The linux/x64 default carries
|
|
97
|
+
* no taint. Unlike {@link derivePlatformTaints} (which intersects declared
|
|
98
|
+
* labels against a denylist), this derives from the structured field, so a pool
|
|
99
|
+
* labeled `windows-2022` still taints correctly.
|
|
100
|
+
*/
|
|
101
|
+
export declare function platformToTaints(platform: ScalerPlatform): string[];
|
|
102
|
+
/** Map an `os.platform()` string to a `ScalerOs`, or null when unrecognised. */
|
|
103
|
+
export declare function nodePlatformToScalerOs(nodePlatform: string): ScalerOs | null;
|
|
104
|
+
/** Map an `os.arch()` string to a `ScalerArch`, or null when unrecognised. */
|
|
105
|
+
export declare function nodeArchToScalerArch(nodeArch: string): ScalerArch | null;
|
|
106
|
+
/**
|
|
107
|
+
* Build a structured platform from the host's `os.platform()` / `os.arch()`.
|
|
108
|
+
* Returns null when either component is not one of the supported enum values,
|
|
109
|
+
* so a caller can fall back to the legacy host-label derivation for exotic
|
|
110
|
+
* hosts.
|
|
111
|
+
*/
|
|
112
|
+
export declare function hostToScalerPlatform(nodePlatform: string, nodeArch: string): ScalerPlatform | null;
|
|
33
113
|
/** Prefix for the agent self-reported hostname label. */
|
|
34
114
|
export declare const HOST_LABEL_PREFIX = "kici:host:";
|
|
35
115
|
/**
|
|
@@ -74,7 +154,7 @@ export declare function normalizeRunsOn(runsOn: string | string[] | {
|
|
|
74
154
|
* - builder: can run __build__ jobs (dependency cache compilation)
|
|
75
155
|
* - init-runner: can run __init__ jobs (workspace initialization)
|
|
76
156
|
*/
|
|
77
|
-
export declare const KNOWN_ROLES: readonly [
|
|
157
|
+
export declare const KNOWN_ROLES: readonly ['builder', 'init-runner'];
|
|
78
158
|
/** Agent role type derived from KNOWN_ROLES. */
|
|
79
159
|
export type AgentRole = (typeof KNOWN_ROLES)[number];
|
|
80
160
|
/** Reserved label prefix — labels starting with this are system-managed. */
|
|
@@ -140,7 +220,7 @@ export declare function scalerAgentLabels(labelSet: string[], backendType: strin
|
|
|
140
220
|
* platform facts, not authorization grants, so the orchestrator's register-time
|
|
141
221
|
* label-scope gate does not require an ephemeral token to be bound to them.
|
|
142
222
|
*/
|
|
143
|
-
export declare const SELF_REPORTED_LABEL_PREFIXES: readonly [
|
|
223
|
+
export declare const SELF_REPORTED_LABEL_PREFIXES: readonly ['kici:os:', 'kici:arch:', 'kici:host:'];
|
|
144
224
|
/**
|
|
145
225
|
* True if a label is a self-reported platform fact (os/arch/host) rather than a
|
|
146
226
|
* scaler-assigned, authorization-bearing label. Used by the agent register-time
|
package/dist/labels.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "./rolldown-runtime-ClRpJifh.js";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
//#region src/labels.ts
|
|
3
4
|
/**
|
|
4
5
|
* Structured auto-labels with category prefixes.
|
|
@@ -56,6 +57,123 @@ function deriveOsArchLabels(platform, arch) {
|
|
|
56
57
|
}
|
|
57
58
|
return labels;
|
|
58
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Plain OS/arch labels that gate a bare-metal scaler as a mandatory taint.
|
|
62
|
+
* A pool whose declared labels include one of these only accepts jobs that
|
|
63
|
+
* explicitly request that platform. Linux and x64/amd64 are the defaults and
|
|
64
|
+
* are absent on purpose — an unqualified `runsOn: 'bare-metal'` job must still
|
|
65
|
+
* land on a Linux-x64 scaler.
|
|
66
|
+
*/
|
|
67
|
+
const PLATFORM_TAINT_LABELS = /* @__PURE__ */ new Set([
|
|
68
|
+
"windows",
|
|
69
|
+
"win32",
|
|
70
|
+
"macos",
|
|
71
|
+
"darwin",
|
|
72
|
+
"arm64",
|
|
73
|
+
"aarch64",
|
|
74
|
+
"arm"
|
|
75
|
+
]);
|
|
76
|
+
/**
|
|
77
|
+
* Intersect a pool's declared labels with {@link PLATFORM_TAINT_LABELS},
|
|
78
|
+
* returning the de-duplicated plain platform-taint labels (lowercased) in
|
|
79
|
+
* input order.
|
|
80
|
+
*/
|
|
81
|
+
function derivePlatformTaints(declaredLabels) {
|
|
82
|
+
const seen = /* @__PURE__ */ new Set();
|
|
83
|
+
for (const raw of declaredLabels) {
|
|
84
|
+
const label = raw.toLowerCase();
|
|
85
|
+
if (PLATFORM_TAINT_LABELS.has(label)) seen.add(label);
|
|
86
|
+
}
|
|
87
|
+
return [...seen];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Operating systems a scaler pool can declare via the structured `platform`
|
|
91
|
+
* field. `linux` is the default and carries no taint; `macos` / `windows` are
|
|
92
|
+
* non-default and taint the pool.
|
|
93
|
+
*/
|
|
94
|
+
const ScalerOs = z.enum([
|
|
95
|
+
"linux",
|
|
96
|
+
"macos",
|
|
97
|
+
"windows"
|
|
98
|
+
]);
|
|
99
|
+
/**
|
|
100
|
+
* CPU architectures a scaler pool can declare via the structured `platform`
|
|
101
|
+
* field. `x64` is the default and carries no taint; `arm64` taints the pool.
|
|
102
|
+
*/
|
|
103
|
+
const ScalerArch = z.enum(["x64", "arm64"]);
|
|
104
|
+
/**
|
|
105
|
+
* Structured platform of a scaler pool: the single source of truth for both the
|
|
106
|
+
* auto-injected `kici:os:*` / `kici:arch:*` labels and the mandatory platform
|
|
107
|
+
* taint. Declaring it once removes the ambiguity of matching plain string
|
|
108
|
+
* labels against a denylist.
|
|
109
|
+
*/
|
|
110
|
+
const scalerPlatformSchema = z.object({
|
|
111
|
+
os: ScalerOs,
|
|
112
|
+
arch: ScalerArch
|
|
113
|
+
}).strict();
|
|
114
|
+
/** Map a structured `ScalerOs` back to the `os.platform()` string it represents. */
|
|
115
|
+
function scalerOsToNodePlatform(os) {
|
|
116
|
+
switch (os) {
|
|
117
|
+
case "linux": return "linux";
|
|
118
|
+
case "macos": return "darwin";
|
|
119
|
+
case "windows": return "win32";
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Derive the `kici:os:*` / `kici:arch:*` labels for a declared structured
|
|
124
|
+
* platform. Reuses {@link deriveOsArchLabels} so the label shape is identical to
|
|
125
|
+
* the host-reported form (e.g. `windows` yields both `kici:os:windows` and
|
|
126
|
+
* `kici:os:win32`).
|
|
127
|
+
*/
|
|
128
|
+
function platformToOsArchLabels(platform) {
|
|
129
|
+
return deriveOsArchLabels(scalerOsToNodePlatform(platform.os), platform.arch);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Derive the plain platform-taint labels for a declared structured platform.
|
|
133
|
+
* Returns the canonical tokens (`macos`, `windows`, `arm64`) that a job's
|
|
134
|
+
* `runsOn` must include to allocate on the pool. The linux/x64 default carries
|
|
135
|
+
* no taint. Unlike {@link derivePlatformTaints} (which intersects declared
|
|
136
|
+
* labels against a denylist), this derives from the structured field, so a pool
|
|
137
|
+
* labeled `windows-2022` still taints correctly.
|
|
138
|
+
*/
|
|
139
|
+
function platformToTaints(platform) {
|
|
140
|
+
const taints = [];
|
|
141
|
+
if (platform.os === "macos") taints.push("macos");
|
|
142
|
+
else if (platform.os === "windows") taints.push("windows");
|
|
143
|
+
if (platform.arch === "arm64") taints.push("arm64");
|
|
144
|
+
return taints;
|
|
145
|
+
}
|
|
146
|
+
/** Map an `os.platform()` string to a `ScalerOs`, or null when unrecognised. */
|
|
147
|
+
function nodePlatformToScalerOs(nodePlatform) {
|
|
148
|
+
switch (nodePlatform) {
|
|
149
|
+
case "linux": return "linux";
|
|
150
|
+
case "darwin": return "macos";
|
|
151
|
+
case "win32": return "windows";
|
|
152
|
+
default: return null;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/** Map an `os.arch()` string to a `ScalerArch`, or null when unrecognised. */
|
|
156
|
+
function nodeArchToScalerArch(nodeArch) {
|
|
157
|
+
switch (nodeArch) {
|
|
158
|
+
case "x64": return "x64";
|
|
159
|
+
case "arm64": return "arm64";
|
|
160
|
+
default: return null;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Build a structured platform from the host's `os.platform()` / `os.arch()`.
|
|
165
|
+
* Returns null when either component is not one of the supported enum values,
|
|
166
|
+
* so a caller can fall back to the legacy host-label derivation for exotic
|
|
167
|
+
* hosts.
|
|
168
|
+
*/
|
|
169
|
+
function hostToScalerPlatform(nodePlatform, nodeArch) {
|
|
170
|
+
const os = nodePlatformToScalerOs(nodePlatform);
|
|
171
|
+
const arch = nodeArchToScalerArch(nodeArch);
|
|
172
|
+
return os && arch ? {
|
|
173
|
+
os,
|
|
174
|
+
arch
|
|
175
|
+
} : null;
|
|
176
|
+
}
|
|
59
177
|
/** Prefix for the agent self-reported hostname label. */
|
|
60
178
|
const HOST_LABEL_PREFIX = "kici:host:";
|
|
61
179
|
/**
|
|
@@ -234,6 +352,6 @@ function separateLabels(labels) {
|
|
|
234
352
|
};
|
|
235
353
|
}
|
|
236
354
|
//#endregion
|
|
237
|
-
export { CAPABILITY_LABEL_PREFIX, HOST_LABEL_PREFIX, INIT_LABEL, KNOWN_ROLES, PRIVILEGED_ROOT_LABEL, RESERVED_LABEL_PREFIX, ROLE_LABEL_PREFIX, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, agentTypeLabel, capabilityLabel, deriveOsArchLabels, hostLabel, isAutoLabel, isSelfReportedLabel, mergeAutoLabels, normalizeRunsOn, parseHostLabel, resolveRoleLabels, roleToLabel, scalerAgentLabels, scalerLabel, separateLabels, validateNoReservedLabels };
|
|
355
|
+
export { CAPABILITY_LABEL_PREFIX, HOST_LABEL_PREFIX, INIT_LABEL, KNOWN_ROLES, PLATFORM_TAINT_LABELS, PRIVILEGED_ROOT_LABEL, RESERVED_LABEL_PREFIX, ROLE_LABEL_PREFIX, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, ScalerArch, ScalerOs, agentTypeLabel, capabilityLabel, deriveOsArchLabels, derivePlatformTaints, hostLabel, hostToScalerPlatform, isAutoLabel, isSelfReportedLabel, mergeAutoLabels, nodeArchToScalerArch, nodePlatformToScalerOs, normalizeRunsOn, parseHostLabel, platformToOsArchLabels, platformToTaints, resolveRoleLabels, roleToLabel, scalerAgentLabels, scalerLabel, scalerPlatformSchema, separateLabels, validateNoReservedLabels };
|
|
238
356
|
|
|
239
357
|
//# sourceMappingURL=labels.js.map
|
package/dist/matrix/expand.d.ts
CHANGED
|
@@ -17,6 +17,31 @@ export interface MatrixValues {
|
|
|
17
17
|
/** Multi-dimensional: named properties */
|
|
18
18
|
[dimension: string]: string | undefined;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Thrown when a matrix value does not match the documented contract — a
|
|
22
|
+
* `string[]` or a `Record<string, string[]>`. A static matrix is guaranteed by
|
|
23
|
+
* the lock-file schema, but a dynamic matrix returns arbitrary runtime data, so
|
|
24
|
+
* the contract has to be enforced here rather than by the type system.
|
|
25
|
+
*/
|
|
26
|
+
export declare class MatrixShapeError extends Error {
|
|
27
|
+
readonly name = "MatrixShapeError";
|
|
28
|
+
constructor(message: string);
|
|
29
|
+
}
|
|
30
|
+
/** A validated matrix input: dimensions sorted, elements coerced to strings. */
|
|
31
|
+
export type NormalizedMatrix = {
|
|
32
|
+
kind: 'array';
|
|
33
|
+
values: string[];
|
|
34
|
+
} | {
|
|
35
|
+
kind: 'object';
|
|
36
|
+
dimensions: Array<[name: string, values: string[]]>;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Validate and normalize a matrix value. Accepts the two documented shapes,
|
|
40
|
+
* coercing numeric and boolean elements to strings (they already reach job
|
|
41
|
+
* names as strings), and rejects everything else with the contract in the
|
|
42
|
+
* message. Dimensions are sorted here so expansion stays deterministic.
|
|
43
|
+
*/
|
|
44
|
+
export declare function normalizeMatrixInput(input: unknown): NormalizedMatrix;
|
|
20
45
|
/**
|
|
21
46
|
* Compute the cartesian product of the given value sets in row-major order.
|
|
22
47
|
* An empty set list yields a single empty tuple; any empty set yields no tuples.
|
|
@@ -34,9 +59,31 @@ export declare function expandSingleDimension(matrix: StaticMatrixArray): Matrix
|
|
|
34
59
|
*/
|
|
35
60
|
export declare function expandMultiDimension(matrix: StaticMatrixObject): MatrixValues[];
|
|
36
61
|
/**
|
|
37
|
-
*
|
|
62
|
+
* Validated entry point: normalizes an untrusted matrix value, then dispatches
|
|
63
|
+
* to single- or multi-dimensional expansion. {@link expandSingleDimension} and
|
|
64
|
+
* {@link expandMultiDimension} remain available for a caller that already holds
|
|
65
|
+
* a typed value; this is the one to use for anything crossing a runtime
|
|
66
|
+
* boundary, such as the return value of a dynamic matrix function.
|
|
67
|
+
*/
|
|
68
|
+
export declare function expandMatrix(input: unknown): MatrixValues[];
|
|
69
|
+
/**
|
|
70
|
+
* How many combinations a matrix would expand to, computed WITHOUT building
|
|
71
|
+
* them. Callers use this to refuse an oversized matrix before allocating it —
|
|
72
|
+
* the product is checked, never materialized.
|
|
73
|
+
*/
|
|
74
|
+
export declare function matrixCombinationCount(input: unknown): number;
|
|
75
|
+
/**
|
|
76
|
+
* The first combination whose key collides with an earlier one, or `null` when
|
|
77
|
+
* every combination is distinct.
|
|
78
|
+
*
|
|
79
|
+
* `keyOf` decides what "the same combination" means. Callers that own a job name
|
|
80
|
+
* pass a renderer for the expanded name, because the collision that actually
|
|
81
|
+
* hurts is two children sharing a name — they are indistinguishable to an
|
|
82
|
+
* operator and ambiguous as a needs-edge target. Two structurally different
|
|
83
|
+
* combinations can still render the same name, so name-keying is strictly
|
|
84
|
+
* stronger than the structural default.
|
|
38
85
|
*/
|
|
39
|
-
export declare function
|
|
86
|
+
export declare function findDuplicateCombination(combos: readonly MatrixValues[], keyOf?: (combo: MatrixValues) => string): MatrixValues | null;
|
|
40
87
|
/**
|
|
41
88
|
* Apply include/exclude modifications to expanded matrix combinations.
|
|
42
89
|
* Exclude first (remove matching), then include (add new).
|