@kici-dev/engine 0.1.23 → 0.1.24
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 +1 -1
- package/dist/audit/access-log-policy.d.ts +4 -1
- package/dist/audit/access-log-policy.js +9 -1
- package/dist/audit/activity.d.ts +2 -2
- package/dist/audit/retention-policy.js +2 -0
- package/dist/environment/index.d.ts +2 -0
- package/dist/environment/index.js +3 -1
- package/dist/environment/multi-env.d.ts +30 -0
- package/dist/environment/multi-env.js +38 -0
- package/dist/environment/types.d.ts +8 -2
- package/dist/environment/types.js +18 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +14 -8
- package/dist/inputs/index.d.ts +1 -0
- package/dist/inputs/index.js +2 -1
- package/dist/inputs/schedule.d.ts +19 -0
- package/dist/inputs/schedule.js +33 -0
- package/dist/mcp/tool-schemas.d.ts +41 -0
- package/dist/mcp/tool-schemas.js +49 -0
- package/dist/metrics/metric-catalog.generated.d.ts +20 -0
- package/dist/metrics/metric-catalog.generated.js +24 -0
- package/dist/protocol/messages/access-log.d.ts +29 -15
- package/dist/protocol/messages/access-log.js +3 -1
- package/dist/protocol/messages/actor.d.ts +8 -0
- package/dist/protocol/messages/actor.js +17 -3
- package/dist/protocol/messages/agent-run-result.d.ts +350 -0
- package/dist/protocol/messages/agent-run-result.js +123 -0
- package/dist/protocol/messages/auth.d.ts +2 -0
- package/dist/protocol/messages/auth.js +10 -1
- package/dist/protocol/messages/capabilities.d.ts +2 -0
- package/dist/protocol/messages/capabilities.js +15 -2
- package/dist/protocol/messages/dashboard-global-workflows.d.ts +8 -0
- package/dist/protocol/messages/dashboard.d.ts +1376 -42
- package/dist/protocol/messages/dashboard.js +161 -6
- package/dist/protocol/messages/execution-status.d.ts +52 -1
- package/dist/protocol/messages/execution-status.js +115 -54
- package/dist/protocol/messages/orchestrator-agent.d.ts +21 -5
- package/dist/protocol/messages/orchestrator-agent.js +5 -1
- package/dist/protocol/messages/pat-kind.d.ts +16 -0
- package/dist/protocol/messages/pat-kind.js +17 -0
- package/dist/protocol/messages/peer.d.ts +7 -7
- package/dist/protocol/messages/platform-orchestrator.d.ts +393 -7
- package/dist/protocol/messages/platform-orchestrator.js +3 -3
- package/dist/protocol/messages/run-events.d.ts +5 -1
- package/dist/provider/check-run-conclusion.d.ts +1 -1
- package/dist/trigger/types.d.ts +35 -7
- package/dist/trigger/types.js +7 -2
- package/package.json +1 -1
- package/sbom.spdx.json +5 -5
package/dist/approval/types.d.ts
CHANGED
|
@@ -22,8 +22,8 @@ export type ApproverClause = z.infer<typeof approverClauseSchema>;
|
|
|
22
22
|
/** Granularity of a held element. */
|
|
23
23
|
export declare const HoldScope: z.ZodEnum<{
|
|
24
24
|
job: "job";
|
|
25
|
-
step: "step";
|
|
26
25
|
workflow: "workflow";
|
|
26
|
+
step: "step";
|
|
27
27
|
}>;
|
|
28
28
|
export type HoldScope = z.infer<typeof HoldScope>;
|
|
29
29
|
/** What triggered the hold: an environment policy (mandatory) or SDK code (explicit). */
|
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
* 1. `outcome !== 'allowed'` → always record (denied/error are full-fidelity).
|
|
12
12
|
* 2. `actor.type === 'platform_operator'` → always record (compliance: any
|
|
13
13
|
* activity by a non-org member must be auditable in full).
|
|
14
|
-
* 3.
|
|
14
|
+
* 3. agent-attributed actor (`actor.agent` present) → always record. The
|
|
15
|
+
* agent-provenance guarantee is that every action an agent takes is fully
|
|
16
|
+
* auditable; a sampled subset would break it.
|
|
17
|
+
* 4. The per-action `POLICY_BY_ACTION` decision (`always` / `sample` /
|
|
15
18
|
* `rate_limit`).
|
|
16
19
|
*
|
|
17
20
|
* Browser-safe: this module MUST NOT import any Node built-ins (`node:crypto`
|
|
@@ -14,7 +14,10 @@ import { z } from "zod";
|
|
|
14
14
|
* 1. `outcome !== 'allowed'` → always record (denied/error are full-fidelity).
|
|
15
15
|
* 2. `actor.type === 'platform_operator'` → always record (compliance: any
|
|
16
16
|
* activity by a non-org member must be auditable in full).
|
|
17
|
-
* 3.
|
|
17
|
+
* 3. agent-attributed actor (`actor.agent` present) → always record. The
|
|
18
|
+
* agent-provenance guarantee is that every action an agent takes is fully
|
|
19
|
+
* auditable; a sampled subset would break it.
|
|
20
|
+
* 4. The per-action `POLICY_BY_ACTION` decision (`always` / `sample` /
|
|
18
21
|
* `rate_limit`).
|
|
19
22
|
*
|
|
20
23
|
* Browser-safe: this module MUST NOT import any Node built-ins (`node:crypto`
|
|
@@ -38,6 +41,10 @@ const POLICY_BY_ACTION = {
|
|
|
38
41
|
kind: "sample",
|
|
39
42
|
allowedRate: .05
|
|
40
43
|
},
|
|
44
|
+
"run.structured.read": {
|
|
45
|
+
kind: "sample",
|
|
46
|
+
allowedRate: .05
|
|
47
|
+
},
|
|
41
48
|
"runs.list.read": {
|
|
42
49
|
kind: "sample",
|
|
43
50
|
allowedRate: .05
|
|
@@ -206,6 +213,7 @@ function actorKey(actor) {
|
|
|
206
213
|
function shouldRecordAccess(action, outcome, actor, requestId, limiter) {
|
|
207
214
|
if (outcome !== "allowed") return true;
|
|
208
215
|
if (actor.type === "platform_operator") return true;
|
|
216
|
+
if (actor.type === "user" && actor.agent) return true;
|
|
209
217
|
const policy = POLICY_BY_ACTION[action];
|
|
210
218
|
switch (policy.kind) {
|
|
211
219
|
case "always": return true;
|
package/dist/audit/activity.d.ts
CHANGED
|
@@ -73,10 +73,10 @@ export declare const activityRowSchema: z.ZodObject<{
|
|
|
73
73
|
details: z.ZodNullable<z.ZodUnknown>;
|
|
74
74
|
requestId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
75
|
origin: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
76
|
+
agent: "agent";
|
|
76
77
|
platform_proxy: "platform_proxy";
|
|
77
78
|
admin_http: "admin_http";
|
|
78
79
|
admin_cli: "admin_cli";
|
|
79
|
-
agent: "agent";
|
|
80
80
|
}>>>;
|
|
81
81
|
}, z.core.$strip>;
|
|
82
82
|
export type ActivityRow = z.infer<typeof activityRowSchema>;
|
|
@@ -106,10 +106,10 @@ export declare const activityFilterSchema: z.ZodObject<{
|
|
|
106
106
|
denied: "denied";
|
|
107
107
|
}>>;
|
|
108
108
|
origin: z.ZodOptional<z.ZodEnum<{
|
|
109
|
+
agent: "agent";
|
|
109
110
|
platform_proxy: "platform_proxy";
|
|
110
111
|
admin_http: "admin_http";
|
|
111
112
|
admin_cli: "admin_cli";
|
|
112
|
-
agent: "agent";
|
|
113
113
|
}>>;
|
|
114
114
|
targetType: z.ZodOptional<z.ZodString>;
|
|
115
115
|
targetId: z.ZodOptional<z.ZodString>;
|
|
@@ -13,6 +13,7 @@ import "../chunk-BTugEXQM.js";
|
|
|
13
13
|
*/
|
|
14
14
|
const ACCESS_LOG_WARM_DAYS = {
|
|
15
15
|
"run.detail.read": 30,
|
|
16
|
+
"run.structured.read": 30,
|
|
16
17
|
"runs.list.read": 30,
|
|
17
18
|
"runs.filters.read": 30,
|
|
18
19
|
"sources.list.read": 30,
|
|
@@ -257,6 +258,7 @@ function secretAuditLogWarmSqlCase() {
|
|
|
257
258
|
*/
|
|
258
259
|
const ACCESS_LOG_COLD_DAYS = {
|
|
259
260
|
"run.detail.read": 180,
|
|
261
|
+
"run.structured.read": 180,
|
|
260
262
|
"runs.list.read": 180,
|
|
261
263
|
"runs.filters.read": 180,
|
|
262
264
|
"sources.list.read": 180,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { Environment, EnvironmentBinding, EnvironmentVariable, EnvironmentSourceOverride, ScopedSecret, HeldRun, ProtectionGateResult, TrustTier, } from './types.js';
|
|
2
|
+
export { TrustTierSchema } from './types.js';
|
|
2
3
|
export { resolveSecretsForEnvironment, matchScopePattern, stripScopePrefix, } from './scope-resolver.js';
|
|
3
4
|
export type { HostFacts } from './host-match.js';
|
|
5
|
+
export { mergeOrderedMaps, EnvGateRejectReason } from './multi-env.js';
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import "../chunk-BTugEXQM.js";
|
|
2
|
+
import { TrustTierSchema } from "./types.js";
|
|
2
3
|
import { matchScopePattern, resolveSecretsForEnvironment, stripScopePrefix } from "./scope-resolver.js";
|
|
3
|
-
|
|
4
|
+
import { EnvGateRejectReason, mergeOrderedMaps } from "./multi-env.js";
|
|
5
|
+
export { EnvGateRejectReason, TrustTierSchema, matchScopePattern, mergeOrderedMaps, resolveSecretsForEnvironment, stripScopePrefix };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Multi-environment merge helpers shared across the orchestrator dispatch path.
|
|
3
|
+
*
|
|
4
|
+
* A job may bind several deployment environments in order; their resolved
|
|
5
|
+
* secrets/variables are folded last-wins (a later environment's key overrides an
|
|
6
|
+
* earlier one) and their protection gates combine all-must-pass. This module is
|
|
7
|
+
* browser-safe (pure functions + a Zod enum, no Node built-ins) so it can be
|
|
8
|
+
* exported from the engine environment barrel.
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
/**
|
|
12
|
+
* Reason a single bound environment rejects a run under all-must-pass
|
|
13
|
+
* aggregation. Used to name which environment and which rule blocked dispatch.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EnvGateRejectReason: z.ZodEnum<{
|
|
16
|
+
branch_restricted: "branch_restricted";
|
|
17
|
+
trigger_filtered: "trigger_filtered";
|
|
18
|
+
repo_unmatched: "repo_unmatched";
|
|
19
|
+
trust_too_low: "trust_too_low";
|
|
20
|
+
env_disabled: "env_disabled";
|
|
21
|
+
env_not_found: "env_not_found";
|
|
22
|
+
}>;
|
|
23
|
+
export type EnvGateRejectReason = z.infer<typeof EnvGateRejectReason>;
|
|
24
|
+
/**
|
|
25
|
+
* Fold an ordered list of per-environment resolved maps into one. Later entries
|
|
26
|
+
* override earlier keys (last-wins), matching the documented merge order for
|
|
27
|
+
* `environments: [...]`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function mergeOrderedMaps(maps: ReadonlyArray<Record<string, string>>): Record<string, string>;
|
|
30
|
+
//# sourceMappingURL=multi-env.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/environment/multi-env.ts
|
|
4
|
+
/**
|
|
5
|
+
* Multi-environment merge helpers shared across the orchestrator dispatch path.
|
|
6
|
+
*
|
|
7
|
+
* A job may bind several deployment environments in order; their resolved
|
|
8
|
+
* secrets/variables are folded last-wins (a later environment's key overrides an
|
|
9
|
+
* earlier one) and their protection gates combine all-must-pass. This module is
|
|
10
|
+
* browser-safe (pure functions + a Zod enum, no Node built-ins) so it can be
|
|
11
|
+
* exported from the engine environment barrel.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Reason a single bound environment rejects a run under all-must-pass
|
|
15
|
+
* aggregation. Used to name which environment and which rule blocked dispatch.
|
|
16
|
+
*/
|
|
17
|
+
const EnvGateRejectReason = z.enum([
|
|
18
|
+
"branch_restricted",
|
|
19
|
+
"trigger_filtered",
|
|
20
|
+
"repo_unmatched",
|
|
21
|
+
"trust_too_low",
|
|
22
|
+
"env_disabled",
|
|
23
|
+
"env_not_found"
|
|
24
|
+
]);
|
|
25
|
+
/**
|
|
26
|
+
* Fold an ordered list of per-environment resolved maps into one. Later entries
|
|
27
|
+
* override earlier keys (last-wins), matching the documented merge order for
|
|
28
|
+
* `environments: [...]`.
|
|
29
|
+
*/
|
|
30
|
+
function mergeOrderedMaps(maps) {
|
|
31
|
+
const out = {};
|
|
32
|
+
for (const m of maps) Object.assign(out, m);
|
|
33
|
+
return out;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { EnvGateRejectReason, mergeOrderedMaps };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=multi-env.js.map
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Environments are org-level entities that group secrets, variables,
|
|
5
5
|
* and protection rules for deployment targets (dev, staging, production).
|
|
6
6
|
*/
|
|
7
|
+
import { z } from 'zod';
|
|
7
8
|
import type { ApproverClause } from '../approval/types.js';
|
|
8
9
|
/** Environment entity — org-level deployment target with protection rules. */
|
|
9
10
|
export interface Environment {
|
|
@@ -79,8 +80,13 @@ export interface EnvironmentSourceOverride {
|
|
|
79
80
|
createdAt: string;
|
|
80
81
|
updatedAt: string;
|
|
81
82
|
}
|
|
82
|
-
/** Trust tier for contributor-based CI execution gating. */
|
|
83
|
-
export
|
|
83
|
+
/** Trust tier for contributor-based CI execution gating (single source of truth). */
|
|
84
|
+
export declare const TrustTierSchema: z.ZodEnum<{
|
|
85
|
+
unknown: "unknown";
|
|
86
|
+
known: "known";
|
|
87
|
+
trusted: "trusted";
|
|
88
|
+
}>;
|
|
89
|
+
export type TrustTier = z.infer<typeof TrustTierSchema>;
|
|
84
90
|
/** Held run record for protection gate enforcement. */
|
|
85
91
|
export interface HeldRun {
|
|
86
92
|
id: string;
|
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
import "../chunk-BTugEXQM.js";
|
|
2
|
-
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/environment/types.ts
|
|
4
|
+
/**
|
|
5
|
+
* Environment types for KiCI's deployment environment model.
|
|
6
|
+
*
|
|
7
|
+
* Environments are org-level entities that group secrets, variables,
|
|
8
|
+
* and protection rules for deployment targets (dev, staging, production).
|
|
9
|
+
*/
|
|
10
|
+
/** Trust tier for contributor-based CI execution gating (single source of truth). */
|
|
11
|
+
const TrustTierSchema = z.enum([
|
|
12
|
+
"trusted",
|
|
13
|
+
"known",
|
|
14
|
+
"unknown"
|
|
15
|
+
]);
|
|
16
|
+
//#endregion
|
|
17
|
+
export { TrustTierSchema };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -11,10 +11,13 @@
|
|
|
11
11
|
export * from './protocol/version.js';
|
|
12
12
|
export * from './protocol/messages/common.js';
|
|
13
13
|
export * from './protocol/messages/actor.js';
|
|
14
|
+
export * from './protocol/messages/pat-kind.js';
|
|
15
|
+
export * from './mcp/tool-schemas.js';
|
|
14
16
|
export * from './protocol/messages/auth.js';
|
|
15
17
|
export * from './protocol/messages/capabilities.js';
|
|
16
18
|
export { webhookRelaySchema, webhookRelayStartSchema, webhookRelayChunkSchema, webhookAckSchema, WebhookRelayResult, WEBHOOK_RELAY_MAX_BODY_BYTES, WEBHOOK_RELAY_CHUNK_SIZE, executionEventSchema, logChunkSchema, peerDiscoverSchema, peerUpdateSchema, cacheStatsSchema, orchMetricsSchema, platformToOrchestratorMessageSchema, orchestratorToPlatformMessageSchema, type WebhookRelay, type WebhookRelayStart, type WebhookRelayChunk, type WebhookAck, type LogChunk, type PeerDiscover, type PeerUpdate, type CacheStats, type OrchMetrics, trustPolicyUpdateSchema, type TrustPolicyUpdate, staleCheckrunCleanupSchema, type StaleCheckrunCleanup, type PlatformToOrchestratorMessage, type OrchestratorToPlatformMessage, } from './protocol/messages/platform-orchestrator.js';
|
|
17
19
|
export * from './protocol/messages/execution-status.js';
|
|
20
|
+
export * from './protocol/messages/agent-run-result.js';
|
|
18
21
|
export * from './protocol/messages/deployment-identity.js';
|
|
19
22
|
export * from './protocol/messages/scaler-event.js';
|
|
20
23
|
export * from './protocol/messages/event-log.js';
|
package/dist/index.js
CHANGED
|
@@ -3,20 +3,24 @@ import { CheckMode, CheckStepOutcome } from "./check-mode.js";
|
|
|
3
3
|
import { MIN_PROTOCOL_VERSION, PROTOCOL_VERSION } from "./protocol/version.js";
|
|
4
4
|
import { WS_MAX_PAYLOAD_BYTES, ackSchema, errorSchema, heartbeatSchema, nackSchema } from "./protocol/messages/common.js";
|
|
5
5
|
import { ActorType, actorPrincipalSchema, apiKeyActorSchema, flattenActor, parseActor, platformOperatorActorSchema, serviceAccountActorSchema, stringifyActor, systemActorSchema, userActorSchema } from "./protocol/messages/actor.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { CacheOutcome, CacheRunEventType, CacheStepType, ExecutionJobStatus, ExecutionRunStatus, ExecutionStepStatus, InitFailureCategory, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TimeoutReason, executionStatusSchema, initFailureSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema } from "./protocol/messages/execution-status.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { PatKind } from "./protocol/messages/pat-kind.js";
|
|
7
|
+
import { cancelRunToolSchema, getRunToolSchema, getStepLogsToolSchema, listRunsToolSchema, listWorkflowsToolSchema, rerunRunToolSchema, triggerRunToolSchema } from "./mcp/tool-schemas.js";
|
|
8
|
+
import { CacheOutcome, CacheRunEventType, CacheStepType, ENVIRONMENTS_MAX, 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, stepStatusForwardSchema } from "./protocol/messages/execution-status.js";
|
|
9
|
+
import { TrustTierSchema } from "./environment/types.js";
|
|
10
|
+
import { AgentFailureCategory, agentJobResultSchema, agentRunResultSchema, agentStepLogsSchema, agentStepResultSchema, untrusted, wrapUntrusted } from "./protocol/messages/agent-run-result.js";
|
|
11
11
|
import { AccessLogAction, AccessLogOutcome, AccessLogSource, AccessLogTargetType, accessLogFilterSchema, accessLogItemSchema, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./protocol/messages/access-log.js";
|
|
12
12
|
import { browserJobContextSchema, browserRunEventSchema, dashboardOrchLogsRequestSchema, dashboardOrchLogsResponseSchema, jobContextMessageSchema, runEventMessageSchema } from "./protocol/messages/run-events.js";
|
|
13
13
|
import { EventLogSource, EventLogStatus, PayloadOmittedReason } from "./protocol/messages/event-log.js";
|
|
14
|
+
import { DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema } from "./protocol/messages/deployment-identity.js";
|
|
15
|
+
import { SourceProvider, SourceSubtype, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema } from "./protocol/messages/source-registration.js";
|
|
14
16
|
import { ScalerBackendType } from "./scaler/scaler-backend-type.js";
|
|
15
17
|
import { ApprovalDecision, HoldScope, TriggerSource, approvalRequirementSchema, approverClauseSchema } from "./approval/types.js";
|
|
16
|
-
import { NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, RunsOnPick, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob, resolveWhenToRunOn } from "./trigger/types.js";
|
|
18
|
+
import { NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, RunsOnPick, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, resolveWhenToRunOn } from "./trigger/types.js";
|
|
17
19
|
import { HostTargetSelector, HostTargetValue, LabelMatcher, compileRegexMatcher, hostSatisfiesTarget, matcherMatches, matcherSatisfiedBy, partitionMatchers } from "./labels-match.js";
|
|
18
20
|
import { HostInventoryEntry, HostPropertyValue, InventoryHostStatus, InventoryLifecycleClass, InventorySelectorSchema, coerceHostPropertyValue, parseHostPropertyAssignments } from "./inventory.js";
|
|
19
|
-
import { EnvDeleteErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListItemSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationsApiResponseSchema, dashboardAttestationsListRequestSchema, dashboardAttestationsListResponseSchema, dashboardDiagnosticsRequestSchema, dashboardDiagnosticsResponseSchema, dashboardEventDlqCountRequestSchema, dashboardEventDlqDiscardRequestSchema, dashboardEventDlqListItemSchema, dashboardEventDlqListRequestSchema, dashboardEventDlqRetryRequestSchema, dashboardEventLogDetailRequestSchema, dashboardEventLogListRequestSchema, dashboardEventLogPayloadChunkSchema, dashboardEventLogPayloadStreamRequestSchema, dashboardFleetHostRequestSchema, dashboardFleetHostResponseSchema, dashboardFleetHostsRequestSchema, dashboardFleetHostsResponseSchema, dashboardFleetPreviewRequestSchema, dashboardFleetPreviewResponseSchema, dashboardFleetWorkflowsForHostRequestSchema, dashboardFleetWorkflowsForHostResponseSchema, dashboardJobDetailSchema, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingEntrySchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, 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";
|
|
21
|
+
import { DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EnvDeleteErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, 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, dashboardOrchToPlatformSchema, dashboardPayloadRequestSchema, dashboardPlatformToOrchSchema, dashboardRunDetailApiResponseSchema, dashboardRunDetailRequestSchema, dashboardRunDetailResponseSchema, dashboardRunStructuredRequestSchema, dashboardRunStructuredResponseSchema, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, envBindingEntrySchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, 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";
|
|
22
|
+
import { ORCH_CAPABILITIES, OrchRole, hasOrchCapability, orchCapabilitiesSchema } from "./protocol/messages/capabilities.js";
|
|
23
|
+
import { authFailureSchema, authRequestSchema, authSuccessSchema } from "./protocol/messages/auth.js";
|
|
20
24
|
import { WEBHOOK_RELAY_CHUNK_SIZE, WEBHOOK_RELAY_MAX_BODY_BYTES, WebhookRelayResult, cacheStatsSchema, executionEventSchema, logChunkSchema, orchMetricsSchema, orchestratorToPlatformMessageSchema, peerDiscoverSchema, peerUpdateSchema, platformToOrchestratorMessageSchema, staleCheckrunCleanupSchema, trustPolicyUpdateSchema, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema } from "./protocol/messages/platform-orchestrator.js";
|
|
21
25
|
import { ScalerEventType } from "./protocol/messages/scaler-event.js";
|
|
22
26
|
import { AccessLogPolicyKind, POLICY_BY_ACTION, fnv1a32, shouldRecordAccess, shouldRecordSecretResolve } from "./audit/access-log-policy.js";
|
|
@@ -35,6 +39,7 @@ import { DispatchInputType, InputDescriptor, InputsDescriptorMapSchema } from ".
|
|
|
35
39
|
import { UnsupportedDispatchInputError, extractInputDescriptor, extractInputsDescriptorMap } from "./inputs/extract.js";
|
|
36
40
|
import { buildZodFromDescriptor, buildZodObjectFromMap } from "./inputs/build.js";
|
|
37
41
|
import { DispatchInputError, coerceDispatchInputs, parseInputPairs } from "./inputs/coerce.js";
|
|
42
|
+
import { assertScheduleInputsSatisfiable, isInputSatisfiableFromDefaults, resolveScheduleInputs } from "./inputs/schedule.js";
|
|
38
43
|
import "./inputs/index.js";
|
|
39
44
|
import { isTerminal, transition } from "./state-machine/machine.js";
|
|
40
45
|
import "./state-machine/index.js";
|
|
@@ -47,6 +52,7 @@ import { WsRateLimiter } from "./ws/rate-limiter.js";
|
|
|
47
52
|
import { AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, KICI_AGENT_ENV_PREFIX, SANDBOX_DEFAULT_VARS } from "./env/environment-allowlist.js";
|
|
48
53
|
import "./secrets/index.js";
|
|
49
54
|
import { matchScopePattern, resolveSecretsForEnvironment, stripScopePrefix } from "./environment/scope-resolver.js";
|
|
55
|
+
import { EnvGateRejectReason, mergeOrderedMaps } from "./environment/multi-env.js";
|
|
50
56
|
import "./environment/index.js";
|
|
51
57
|
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";
|
|
52
58
|
import { parseMemoryString, resourceRequestNestedSchema, resourceSpecSchema, validateResourceRequest } from "./scaler/resource-types.js";
|
|
@@ -56,4 +62,4 @@ import "./bundler/index.js";
|
|
|
56
62
|
import { applyIncludeExclude, expandMatrix, expandMultiDimension, expandSingleDimension } from "./matrix/expand.js";
|
|
57
63
|
import { formatExpandedJobName, formatMatrixSuffix } from "./matrix/format.js";
|
|
58
64
|
import { FanoutCause, FanoutError, MAX_FANOUT_JOBS, VariantKind, fanoutEnvelopeFields, hostEnvelopeFields, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields } from "./fanout/materialize.js";
|
|
59
|
-
export { ACCESS_LOG_COLD_DAYS, ACCESS_LOG_WARM_DAYS, AGENT_REQUIRED_KICI_VARS, ALLOWED_SYSTEM_VARS, AccessLogAction, AccessLogOutcome, AccessLogPolicyKind, AccessLogSource, AccessLogTargetType, ActivityFilterSource, ActivityRowSource, ActorType, ApprovalDecision, CAPABILITY_LABEL_PREFIX, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckMode, CheckRunConclusion, CheckStepOutcome, DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema, DispatchInputError, DispatchInputType, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EnvDeleteErrorCode, 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, MIN_PROTOCOL_VERSION, NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, ORCH_CAPABILITIES, OnUnreachableMode, OrchRole, POLICY_BY_ACTION, PRIVILEGED_ROOT_LABEL, PROTOCOL_VERSION, PayloadOmittedReason, RegisterableTriggerType, RunsOnPick, SANDBOX_DEFAULT_VARS, SCHEMA_VERSION, SELF_REPORTED_LABEL_PREFIXES, SSH_TRANSPORT_CAPABILITY, ScalerBackendType, ScalerEventType, SourceProvider, SourceSubtype, StepApprovalOutcome, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, TestRelayType, TimeoutReason, TriggerSource, 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_RUN_NOT_FOUND, WS_CLOSE_UNAUTHORIZED, WS_MAX_PAYLOAD_BYTES, WebhookRelayResult, WsRateLimiter, accessLogFilterSchema, accessLogItemSchema, accessLogWarmSqlCase, ackSchema, activityCursorSchema, activityFilterSchema, activityRowSchema, actorPrincipalSchema, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentStatusSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, agentTypeLabel, apiKeyActorSchema, applyIncludeExclude, approvalRequirementSchema, approverClauseSchema, attestationListItemSchema, auditLogColdDays, auditLogWarmDays, auditLogWarmSqlCase, authFailureSchema, authRequestSchema, authSuccessSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserAuthFailureSchema, browserAuthRefreshSchema, browserAuthRequestSchema, browserAuthSuccessSchema, browserErrorSchema, browserEventLogPayloadChunkSchema, browserEventLogPayloadFetchSchema, browserGapSchema, browserJobContextSchema, browserJobNewSchema, browserJobStatusSchema, browserLogLinesSchema, browserLogStreamTerminatedReason, browserLogStreamTerminatedSchema, browserLogSubscribeSchema, browserLogUnsubscribeSchema, browserPingSchema, browserPongSchema, browserRunEventSchema, browserRunNewSchema, browserRunStatusSchema, browserStatusSubscribeSchema, browserStatusUnsubscribeSchema, browserStepStatusSchema, browserToPlatformMessageSchema, buildZodFromDescriptor, buildZodObjectFromMap, cacheStatsSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, capabilityLabel, coerceDispatchInputs, coerceHostPropertyValue, compileRegexMatcher, configAckSchema, createTraceEntry, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardAttestationsApiResponseSchema, 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, dashboardRunSummarySchema, dashboardRunsFiltersRequestSchema, dashboardRunsFiltersResponseSchema, dashboardRunsListRequestSchema, dashboardRunsListResponseSchema, dashboardScalerAgentsRequestSchema, dashboardScalerAgentsResponseSchema, dashboardScalerCapacityRequestSchema, dashboardScalerCapacityResponseSchema, dashboardSourceSummarySchema, dashboardSourcesListRequestSchema, dashboardSourcesListResponseSchema, dashboardStepLogsApiResponseSchema, dashboardStepLogsRequestSchema, dashboardStepLogsResponseSchema, decodeActivityCursor, deriveOsArchLabels, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, envBindingEntrySchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, errorSchema, eventEmitResponseSchema, eventEmitSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, expandMatrix, expandMultiDimension, expandSingleDimension, extractInputDescriptor, extractInputsDescriptorMap, fanoutEnvelopeFields, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetLogsRequestSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, gitAuthSchema, githubWebhookPath, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, hostSatisfiesTarget, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob, isSelfReportedLabel, isTerminal, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressAckSchema, jobProgressSchema, jobRejectSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, logChunkSchema, logPullOrchToPlatformSchema, logPullPlatformToOrchSchema, manualScheduleRequestSchema, matchAllWorkflows, matchBranchPattern, matchPathPatterns, matchRepoPatterns, matchScopePattern, matchWorkflowTriggers, matcherMatches, matcherSatisfiedBy, materializeFanout, materializeResolvedHosts, materializeResolvedMatrix, matrixEnvelopeFields, memberIdentityLinkSchema, memberListResponseSchema, memberRoleAssignmentSchema, mergeAutoLabels, 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, provenanceUploadRequestSchema, provenanceUploadResponseSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, resolveRoleLabels, resolveRunIdSugar, resolveSecretsForEnvironment, resolveWhenToRunOn, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, stepApprovalPayloadSchema, stepApprovalRequestSchema, stepApprovalResolvedSchema, stepStatusForwardSchema, stringifyActor, stripScopePrefix, systemActorSchema, testRelayCancelRequestSchema, testRelayCancelResponseSchema, testRelayRunLogsRequestSchema, testRelayRunLogsResponseSchema, testRelayRunStatusRequestSchema, testRelayRunStatusResponseSchema, testRelayTriggerRequestSchema, testRelayTriggerResponseSchema, testRelayUploadsInitRequestSchema, testRelayUploadsInitResponseSchema, transition, trustPolicyResponseSchema, trustPolicyUpdateSchema, upstreamSnapshotSchema, userActorSchema, validateNoReservedLabels, validateResourceRequest, webhookAckSchema, webhookRelayChunkSchema, webhookRelaySchema, webhookRelayStartSchema };
|
|
65
|
+
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, CAPABILITY_LABEL_PREFIX, CacheOutcome, CacheRefScope, CacheRunEventType, CacheStepType, CheckMode, CheckRunConclusion, CheckStepOutcome, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema, DispatchInputError, DispatchInputType, ENVIRONMENTS_MAX, EVENT_LOG_PAYLOAD_CHUNK_BYTES, EnvDeleteErrorCode, EnvGateRejectReason, 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, SourceProvider, SourceSubtype, StepApprovalOutcome, StepConcurrencyKind, TERMINAL_JOB_STATES, TERMINAL_RUN_STATES, TRIGGER_EVENT_META, TRIGGER_EVENT_TYPES, 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_RUN_NOT_FOUND, WS_CLOSE_UNAUTHORIZED, WS_MAX_PAYLOAD_BYTES, WebhookRelayResult, WsRateLimiter, accessLogFilterSchema, accessLogItemSchema, accessLogWarmSqlCase, ackSchema, activityCursorSchema, activityFilterSchema, activityRowSchema, actorPrincipalSchema, agentApiRequestSchema, agentApiResponseSchema, agentAuthFailureSchema, agentAuthRequestSchema, agentAuthSuccessSchema, agentJobResultSchema, agentLogChunkSchema, agentMetricsSchema, agentRegisterSchema, agentRunResultSchema, agentStatusSchema, agentStepLogsSchema, agentStepResultSchema, agentStepStatusSchema, agentToOrchestratorMessageSchema, agentTypeLabel, apiKeyActorSchema, applyIncludeExclude, approvalRequirementSchema, 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, buildZodFromDescriptor, buildZodObjectFromMap, cacheStatsSchema, cacheUserRestoreRequestSchema, cacheUserRestoreResponseSchema, cacheUserSaveCompleteSchema, cacheUserSaveRequestSchema, cacheUserSaveResponseSchema, cancelRunToolSchema, capabilityLabel, coerceDispatchInputs, coerceHostPropertyValue, compileRegexMatcher, configAckSchema, createTraceEntry, createWorkflowBundleConfig, createWorkflowDecision, dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema, dashboardAttestationGetRequestSchema, dashboardAttestationGetResponseSchema, 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, diagnosticsInfrastructureResponseSchema, diagnosticsSummaryResponseSchema, encodeActivityCursor, envBindingEntrySchema, envBindingsListRequestSchema, envBindingsSetRequestSchema, envCreateRequestSchema, envDeleteRequestSchema, envGetRequestSchema, envHistoryRequestSchema, envListRequestSchema, envSecretDeleteRequestSchema, envSecretScopeCreateRequestSchema, envSecretScopeDeleteRequestSchema, envSecretScopeRenameRequestSchema, envSecretSetRequestSchema, envSecretsListRequestSchema, envSourceOverrideDeleteRequestSchema, envSourceOverrideSetRequestSchema, envSourceOverridesListRequestSchema, envTestAccessSetRequestSchema, envUpdateRequestSchema, envVarDeleteRequestSchema, envVarSetRequestSchema, envVarsListRequestSchema, errorSchema, eventEmitResponseSchema, eventEmitSchema, eventLogListItemSchema, executionEventSchema, executionStatusSchema, expandMatrix, expandMultiDimension, expandSingleDimension, extractInputDescriptor, extractInputsDescriptorMap, fanoutEnvelopeFields, flattenActor, fleetBundleChunkSchema, fleetBundleErrorSchema, fleetHostDeclareRequestSchema, fleetHostDeclareResponseSchema, fleetHostRemoveRequestSchema, fleetHostRemoveResponseSchema, fleetHostWorkflowSchema, fleetLogsRequestSchema, fleetPinnedRunSchema, fleetPreviewHostSchema, fleetSelectionSchema, fnv1a32, formatExpandedJobName, formatMatrixSuffix, getAccessLogColdDays, getAccessLogWarmDays, getAuditLogColdDays, getAuditLogWarmDays, getRunToolSchema, getSecretAuditLogColdDays, getSecretAuditLogWarmDays, getStepLogsToolSchema, gitAuthSchema, githubWebhookPath, hasOrchCapability, heartbeatSchema, heldRunApproveRequestSchema, heldRunRejectRequestSchema, heldRunsListRequestSchema, hostEnvelopeFields, hostLabel, hostSatisfiesTarget, identityLinkItemSchema, identityLinkListResponseSchema, initFailureSchema, isInputSatisfiableFromDefaults, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, isSelfReportedLabel, isTerminal, jobAckSchema, jobCancelSchema, jobConcurrencyAckSchema, jobConcurrencyReportSchema, jobContextMessageSchema, jobDispatchSchema, jobProgressAckSchema, jobProgressSchema, jobRejectSchema, jobRerouteAckSchema, jobRerouteSchema, jobStatusForwardSchema, jobStatusSchema, joinRequestSchema, joinResponseSchema, listRunsToolSchema, 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, provenanceUploadRequestSchema, provenanceUploadResponseSchema, raftAppendEntriesSchema, raftVoteRequestSchema, raftVoteResponseSchema, registerAckSchema, registrationDeleteRequestSchema, registrationDisableRequestSchema, registrationItemSchema, registrationsListRequestSchema, registrationsListResponseSchema, rerunRunToolSchema, resolveRoleLabels, resolveRunIdSugar, resolveScheduleInputs, resolveSecretsForEnvironment, resolveWhenToRunOn, resourceRequestNestedSchema, resourceSpecSchema, runCancelRequestSchema, runEventMessageSchema, runEventSchema, runLineageResponseSchema, runListItemSchema, runListResponseSchema, runRerunRequestSchema, scalerAgentLabels, scalerLabel, secretAuditLogColdDays, secretAuditLogWarmDays, secretAuditLogWarmSqlCase, serviceAccountActorSchema, shouldRecordAccess, shouldRecordSecretResolve, sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema, staleCheckrunCleanupSchema, stateReplaySchema, 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 };
|
package/dist/inputs/index.d.ts
CHANGED
package/dist/inputs/index.js
CHANGED
|
@@ -3,4 +3,5 @@ import { DispatchInputType, InputDescriptor, InputsDescriptorMapSchema } from ".
|
|
|
3
3
|
import { UnsupportedDispatchInputError, extractInputDescriptor, extractInputsDescriptorMap } from "./extract.js";
|
|
4
4
|
import { buildZodFromDescriptor, buildZodObjectFromMap } from "./build.js";
|
|
5
5
|
import { DispatchInputError, coerceDispatchInputs, parseInputPairs } from "./coerce.js";
|
|
6
|
-
|
|
6
|
+
import { assertScheduleInputsSatisfiable, isInputSatisfiableFromDefaults, resolveScheduleInputs } from "./schedule.js";
|
|
7
|
+
export { DispatchInputError, DispatchInputType, InputDescriptor, InputsDescriptorMapSchema, UnsupportedDispatchInputError, assertScheduleInputsSatisfiable, buildZodFromDescriptor, buildZodObjectFromMap, coerceDispatchInputs, extractInputDescriptor, extractInputsDescriptorMap, isInputSatisfiableFromDefaults, parseInputPairs, resolveScheduleInputs };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InputDescriptorT, InputsDescriptorMap } from './descriptor.js';
|
|
2
|
+
/**
|
|
3
|
+
* A schedule input resolves with no operator value, so it must be satisfiable
|
|
4
|
+
* from an empty value set: it either declares a default or is optional. Bare
|
|
5
|
+
* required and bare nullable inputs are not satisfiable (Zod still requires the
|
|
6
|
+
* key to be present).
|
|
7
|
+
*/
|
|
8
|
+
export declare function isInputSatisfiableFromDefaults(d: InputDescriptorT): boolean;
|
|
9
|
+
/** Throw naming the first schedule input that can never resolve on a fire. */
|
|
10
|
+
export declare function assertScheduleInputsSatisfiable(map: InputsDescriptorMap): void;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve defaults-only schedule inputs (no operator pairs). Returns undefined
|
|
13
|
+
* when the trigger declares no inputs or nothing resolves to a value. Throws
|
|
14
|
+
* `DispatchInputError` on an invalid descriptor — compile-time validation
|
|
15
|
+
* (`assertScheduleInputsSatisfiable`) makes this unreachable for a
|
|
16
|
+
* freshly-compiled lock; no silent fallback.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveScheduleInputs(map: InputsDescriptorMap | undefined): Record<string, unknown> | undefined;
|
|
19
|
+
//# sourceMappingURL=schedule.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
|
+
import { coerceDispatchInputs } from "./coerce.js";
|
|
3
|
+
//#region src/inputs/schedule.ts
|
|
4
|
+
/**
|
|
5
|
+
* A schedule input resolves with no operator value, so it must be satisfiable
|
|
6
|
+
* from an empty value set: it either declares a default or is optional. Bare
|
|
7
|
+
* required and bare nullable inputs are not satisfiable (Zod still requires the
|
|
8
|
+
* key to be present).
|
|
9
|
+
*/
|
|
10
|
+
function isInputSatisfiableFromDefaults(d) {
|
|
11
|
+
return d.default !== void 0 || d.optional === true;
|
|
12
|
+
}
|
|
13
|
+
/** Throw naming the first schedule input that can never resolve on a fire. */
|
|
14
|
+
function assertScheduleInputsSatisfiable(map) {
|
|
15
|
+
for (const [name, d] of Object.entries(map)) if (!isInputSatisfiableFromDefaults(d)) throw new Error(`schedule input "${name}" must declare a .default() or be .optional() — schedule triggers fire with no operator input`);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Resolve defaults-only schedule inputs (no operator pairs). Returns undefined
|
|
19
|
+
* when the trigger declares no inputs or nothing resolves to a value. Throws
|
|
20
|
+
* `DispatchInputError` on an invalid descriptor — compile-time validation
|
|
21
|
+
* (`assertScheduleInputsSatisfiable`) makes this unreachable for a
|
|
22
|
+
* freshly-compiled lock; no silent fallback.
|
|
23
|
+
*/
|
|
24
|
+
function resolveScheduleInputs(map) {
|
|
25
|
+
if (!map || Object.keys(map).length === 0) return void 0;
|
|
26
|
+
const r = coerceDispatchInputs({}, map);
|
|
27
|
+
if ("error" in r) throw r.error;
|
|
28
|
+
return Object.keys(r.values).length > 0 ? r.values : void 0;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { assertScheduleInputsSatisfiable, isInputSatisfiableFromDefaults, resolveScheduleInputs };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=schedule.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod argument schemas for the KiCI MCP tools.
|
|
3
|
+
*
|
|
4
|
+
* Browser-safe (zod only) and shared between the Platform-hosted developer MCP
|
|
5
|
+
* and the sibling orchestrator-side admin MCP so both expose an identical tool
|
|
6
|
+
* argument contract. Each export is a Zod *raw shape* (a plain object of Zod
|
|
7
|
+
* fields) so it can be passed directly as an MCP tool `inputSchema`.
|
|
8
|
+
*/
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
export declare const listRunsToolSchema: {
|
|
11
|
+
orgId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
status: z.ZodOptional<z.ZodString>;
|
|
13
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
};
|
|
15
|
+
export declare const getRunToolSchema: {
|
|
16
|
+
orgId: z.ZodOptional<z.ZodString>;
|
|
17
|
+
runId: z.ZodString;
|
|
18
|
+
};
|
|
19
|
+
export declare const getStepLogsToolSchema: {
|
|
20
|
+
orgId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
runId: z.ZodString;
|
|
22
|
+
jobId: z.ZodString;
|
|
23
|
+
stepIndex: z.ZodNumber;
|
|
24
|
+
};
|
|
25
|
+
export declare const listWorkflowsToolSchema: {
|
|
26
|
+
orgId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
};
|
|
28
|
+
export declare const cancelRunToolSchema: {
|
|
29
|
+
orgId: z.ZodOptional<z.ZodString>;
|
|
30
|
+
runId: z.ZodString;
|
|
31
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
};
|
|
33
|
+
export declare const rerunRunToolSchema: {
|
|
34
|
+
orgId: z.ZodOptional<z.ZodString>;
|
|
35
|
+
runId: z.ZodString;
|
|
36
|
+
};
|
|
37
|
+
export declare const triggerRunToolSchema: {
|
|
38
|
+
orgId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
registrationId: z.ZodString;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=tool-schemas.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/mcp/tool-schemas.ts
|
|
4
|
+
/**
|
|
5
|
+
* Zod argument schemas for the KiCI MCP tools.
|
|
6
|
+
*
|
|
7
|
+
* Browser-safe (zod only) and shared between the Platform-hosted developer MCP
|
|
8
|
+
* and the sibling orchestrator-side admin MCP so both expose an identical tool
|
|
9
|
+
* argument contract. Each export is a Zod *raw shape* (a plain object of Zod
|
|
10
|
+
* fields) so it can be passed directly as an MCP tool `inputSchema`.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Optional organization id. When the calling user belongs to exactly one org
|
|
14
|
+
* it is resolved automatically; pass it explicitly when a member of several.
|
|
15
|
+
*/
|
|
16
|
+
const orgIdArg = z.string().min(1).optional().describe("Organization id. Optional when you belong to exactly one organization.");
|
|
17
|
+
const listRunsToolSchema = {
|
|
18
|
+
orgId: orgIdArg,
|
|
19
|
+
status: z.string().optional().describe("Filter by run status (e.g. success, failed, running)."),
|
|
20
|
+
limit: z.number().int().min(1).max(100).optional().describe("Maximum number of runs to return (default 20).")
|
|
21
|
+
};
|
|
22
|
+
const getRunToolSchema = {
|
|
23
|
+
orgId: orgIdArg,
|
|
24
|
+
runId: z.string().min(1).describe("The run id to fetch.")
|
|
25
|
+
};
|
|
26
|
+
const getStepLogsToolSchema = {
|
|
27
|
+
orgId: orgIdArg,
|
|
28
|
+
runId: z.string().min(1).describe("The run id."),
|
|
29
|
+
jobId: z.string().min(1).describe("The job id within the run."),
|
|
30
|
+
stepIndex: z.number().int().min(0).describe("Zero-based step index within the job.")
|
|
31
|
+
};
|
|
32
|
+
const listWorkflowsToolSchema = { orgId: orgIdArg };
|
|
33
|
+
const cancelRunToolSchema = {
|
|
34
|
+
orgId: orgIdArg,
|
|
35
|
+
runId: z.string().min(1).describe("The run id to cancel."),
|
|
36
|
+
force: z.boolean().optional().describe("Force-cancel (SIGKILL, skip cleanup hooks).")
|
|
37
|
+
};
|
|
38
|
+
const rerunRunToolSchema = {
|
|
39
|
+
orgId: orgIdArg,
|
|
40
|
+
runId: z.string().min(1).describe("The run id to re-run.")
|
|
41
|
+
};
|
|
42
|
+
const triggerRunToolSchema = {
|
|
43
|
+
orgId: orgIdArg,
|
|
44
|
+
registrationId: z.string().min(1).describe("The workflow registration id to trigger.")
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { cancelRunToolSchema, getRunToolSchema, getStepLogsToolSchema, listRunsToolSchema, listWorkflowsToolSchema, rerunRunToolSchema, triggerRunToolSchema };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=tool-schemas.js.map
|
|
@@ -86,13 +86,17 @@ export declare const MetricNames: {
|
|
|
86
86
|
readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "kici_platform_log_lines_forwarded_total";
|
|
87
87
|
readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "kici_platform_metrics_query_rate_limited_total";
|
|
88
88
|
readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "kici_platform_mimir_relay_errors_total";
|
|
89
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "kici_platform_notifications_delivered_total";
|
|
90
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "kici_platform_notifications_suppressed_total";
|
|
89
91
|
readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "kici_platform_orch_metrics_filtered_total";
|
|
90
92
|
readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "kici_platform_orphan_connections_swept_total";
|
|
91
93
|
readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "kici_platform_pg_pool_client_errors_total";
|
|
94
|
+
readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "kici_platform_plan_cap_check_errors_total";
|
|
92
95
|
readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "kici_platform_stale_orchestrators_total";
|
|
93
96
|
readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "kici_platform_stale_platform_connections_evicted_total";
|
|
94
97
|
readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "kici_platform_stale_runs_failed_total";
|
|
95
98
|
readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "kici_platform_step_status_forwards_total";
|
|
99
|
+
readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: "kici_platform_ws_org_rate_limited_total";
|
|
96
100
|
readonly KICI_REGISTRATIONS_TOTAL: "kici_registrations_total";
|
|
97
101
|
readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "kici_universal_git_registration_errors_total";
|
|
98
102
|
readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: "kici_user_registration_notify_total";
|
|
@@ -222,13 +226,17 @@ export declare const MetricLabels: {
|
|
|
222
226
|
readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: readonly [];
|
|
223
227
|
readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: readonly ["org_id"];
|
|
224
228
|
readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: readonly ["reason"];
|
|
229
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: readonly ["channel_type", "result"];
|
|
230
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: readonly ["org_id"];
|
|
225
231
|
readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: readonly ["reason", "metric"];
|
|
226
232
|
readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: readonly [];
|
|
227
233
|
readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: readonly ["source"];
|
|
234
|
+
readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: readonly ["org_id"];
|
|
228
235
|
readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: readonly [];
|
|
229
236
|
readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: readonly ["org_id"];
|
|
230
237
|
readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: readonly [];
|
|
231
238
|
readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: readonly ["state"];
|
|
239
|
+
readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: readonly ["org_id"];
|
|
232
240
|
readonly KICI_REGISTRATIONS_TOTAL: readonly [];
|
|
233
241
|
readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: readonly ["reason"];
|
|
234
242
|
readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: readonly ["result"];
|
|
@@ -357,13 +365,17 @@ export declare const MetricKind: {
|
|
|
357
365
|
readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "counter";
|
|
358
366
|
readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "counter";
|
|
359
367
|
readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "counter";
|
|
368
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "counter";
|
|
369
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "counter";
|
|
360
370
|
readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "counter";
|
|
361
371
|
readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "counter";
|
|
362
372
|
readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "counter";
|
|
373
|
+
readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "counter";
|
|
363
374
|
readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "counter";
|
|
364
375
|
readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "counter";
|
|
365
376
|
readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "counter";
|
|
366
377
|
readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "counter";
|
|
378
|
+
readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: "counter";
|
|
367
379
|
readonly KICI_REGISTRATIONS_TOTAL: "counter";
|
|
368
380
|
readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "counter";
|
|
369
381
|
readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: "counter";
|
|
@@ -492,13 +504,17 @@ export declare const MetricDescription: {
|
|
|
492
504
|
readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "Total log lines forwarded from orchestrators";
|
|
493
505
|
readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "Total dashboard metric-query requests rate-limited (429).";
|
|
494
506
|
readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "Total Mimir push-relay errors (Platform-embedded metrics). Labels: reason.";
|
|
507
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "Notification delivery attempts that reached a terminal outcome";
|
|
508
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "Run-terminal notifications suppressed by the per-org notification quota";
|
|
495
509
|
readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "Orchestrator-pushed metric data points dropped or rewritten by the catalog allow-list. Labels: reason, metric.";
|
|
496
510
|
readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "Total orphan connections swept from platform_connections";
|
|
497
511
|
readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "Total pg connection errors absorbed without a process restart";
|
|
512
|
+
readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "WS connection rejected because the plan-limit check errored (fail-closed)";
|
|
498
513
|
readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "Total orchestrators detected as permanently disconnected";
|
|
499
514
|
readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "platform_connections rows evicted by source.register DB dedup (same-instance reconnect path)";
|
|
500
515
|
readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "Total execution runs failed due to orchestrator staleness";
|
|
501
516
|
readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "Total step status forwards received";
|
|
517
|
+
readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: "Inbound orchestrator messages dropped by the per-org aggregate WS rate limit";
|
|
502
518
|
readonly KICI_REGISTRATIONS_TOTAL: "Total user registrations (new personal orgs created on first login)";
|
|
503
519
|
readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "Errors encountered while registering universal-git provider bundles";
|
|
504
520
|
readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: "New-user Telegram notifications by result (sent|failed)";
|
|
@@ -634,13 +650,17 @@ export declare const MetricService: {
|
|
|
634
650
|
readonly KICI_PLATFORM_LOG_LINES_FORWARDED_TOTAL: "platform";
|
|
635
651
|
readonly KICI_PLATFORM_METRICS_QUERY_RATE_LIMITED_TOTAL: "platform";
|
|
636
652
|
readonly KICI_PLATFORM_MIMIR_RELAY_ERRORS_TOTAL: "platform";
|
|
653
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_DELIVERED_TOTAL: "platform";
|
|
654
|
+
readonly KICI_PLATFORM_NOTIFICATIONS_SUPPRESSED_TOTAL: "platform";
|
|
637
655
|
readonly KICI_PLATFORM_ORCH_METRICS_FILTERED_TOTAL: "platform";
|
|
638
656
|
readonly KICI_PLATFORM_ORPHAN_CONNECTIONS_SWEPT_TOTAL: "platform";
|
|
639
657
|
readonly KICI_PLATFORM_PG_POOL_CLIENT_ERRORS_TOTAL: "platform";
|
|
658
|
+
readonly KICI_PLATFORM_PLAN_CAP_CHECK_ERRORS_TOTAL: "platform";
|
|
640
659
|
readonly KICI_PLATFORM_STALE_ORCHESTRATORS_TOTAL: "platform";
|
|
641
660
|
readonly KICI_PLATFORM_STALE_PLATFORM_CONNECTIONS_EVICTED_TOTAL: "platform";
|
|
642
661
|
readonly KICI_PLATFORM_STALE_RUNS_FAILED_TOTAL: "platform";
|
|
643
662
|
readonly KICI_PLATFORM_STEP_STATUS_FORWARDS_TOTAL: "platform";
|
|
663
|
+
readonly KICI_PLATFORM_WS_ORG_RATE_LIMITED_TOTAL: "platform";
|
|
644
664
|
readonly KICI_REGISTRATIONS_TOTAL: "platform";
|
|
645
665
|
readonly KICI_UNIVERSAL_GIT_REGISTRATION_ERRORS_TOTAL: "orchestrator";
|
|
646
666
|
readonly KICI_USER_REGISTRATION_NOTIFY_TOTAL: "platform";
|