@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
|
@@ -3,7 +3,9 @@ import { CheckMode, CheckStepOutcome } from "../../check-mode.js";
|
|
|
3
3
|
import { SourceOrigin } from "../source-origin.js";
|
|
4
4
|
import { AttestationOrigin } from "../../provenance/attestation-origin.js";
|
|
5
5
|
import { actorPrincipalSchema } from "./actor.js";
|
|
6
|
-
import {
|
|
6
|
+
import { HeldRunStatus } from "../../context/held-run-status.js";
|
|
7
|
+
import { dashboardSealedEnvelopeSchema } from "./dashboard-sealed-write.js";
|
|
8
|
+
import { StepConcurrencyKind, initFailureSchema, stateReplayRunSchema } from "./execution-status.js";
|
|
7
9
|
import { agentRunResultSchema } from "./agent-run-result.js";
|
|
8
10
|
import { kiciBundleSchema } from "../../provenance/bundle.js";
|
|
9
11
|
import { dashboardAccessLogListRequestSchema, dashboardAccessLogListResponseSchema } from "./access-log.js";
|
|
@@ -15,6 +17,7 @@ import { ScalerBackendType } from "../../scaler/scaler-backend-type.js";
|
|
|
15
17
|
import { ApprovalDecision, HoldScope, approverClauseSchema } from "../../approval/types.js";
|
|
16
18
|
import { NeedsRunOn, OnUnreachableMode } from "../../trigger/types.js";
|
|
17
19
|
import { HostTargetSelector } from "../../labels-match.js";
|
|
20
|
+
import { ConcurrencyStrategy } from "../../context/concurrency-strategy.js";
|
|
18
21
|
import { HostInventoryEntry } from "../../inventory.js";
|
|
19
22
|
import { globalWorkflowsGetRequestSchema, globalWorkflowsGetResponseSchema, globalWorkflowsUpdateRequestSchema, globalWorkflowsUpdateResponseSchema } from "./dashboard-global-workflows.js";
|
|
20
23
|
import { z } from "zod";
|
|
@@ -44,6 +47,31 @@ const dashboardRunStructuredResponseSchema = z.object({
|
|
|
44
47
|
result: agentRunResultSchema.nullable(),
|
|
45
48
|
error: z.string().optional()
|
|
46
49
|
});
|
|
50
|
+
/**
|
|
51
|
+
* Request the current mirror-projection state of a single run from the
|
|
52
|
+
* orchestrator. Unlike `dashboard.run.detail` (a user-plane read that
|
|
53
|
+
* access-logs), this is a **system reconciliation read**: the Platform's
|
|
54
|
+
* `RunMirrorReconciler` issues it for a run stuck non-terminal in the mirror to
|
|
55
|
+
* recover a terminal frame dropped on a live connection. The `actor` is always a
|
|
56
|
+
* `system` principal, and the orchestrator does NOT write an access-log row.
|
|
57
|
+
*/
|
|
58
|
+
const dashboardRunStateRequestSchema = z.object({
|
|
59
|
+
type: z.literal("dashboard.run.state"),
|
|
60
|
+
requestId: z.string(),
|
|
61
|
+
actor: actorPrincipalSchema,
|
|
62
|
+
runId: z.string()
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* Response carrying the run's current `StateReplayRun` mirror-projection shape
|
|
66
|
+
* (the same shape `state.replay` carries), or `run: null` when the orchestrator
|
|
67
|
+
* has no such run. Consumed by `upsertRunMirror` on the Platform side.
|
|
68
|
+
*/
|
|
69
|
+
const dashboardRunStateResponseSchema = z.object({
|
|
70
|
+
type: z.literal("dashboard.run.state.response"),
|
|
71
|
+
requestId: z.string(),
|
|
72
|
+
run: stateReplayRunSchema.nullable(),
|
|
73
|
+
error: z.string().optional()
|
|
74
|
+
});
|
|
47
75
|
/** Request step logs from orchestrator. */
|
|
48
76
|
const dashboardStepLogsRequestSchema = z.object({
|
|
49
77
|
type: z.literal("dashboard.step.logs"),
|
|
@@ -104,6 +132,16 @@ const dashboardJobDetailSchema = z.object({
|
|
|
104
132
|
agentId: z.string().nullable(),
|
|
105
133
|
orchestratorId: z.string().nullable().optional(),
|
|
106
134
|
errorMessage: z.string().nullable(),
|
|
135
|
+
/**
|
|
136
|
+
* Why this job cannot currently be routed to any agent, present only while it
|
|
137
|
+
* is still queued and nothing in the fleet matches its `runsOn`; cleared once
|
|
138
|
+
* a matching agent or scaler backend appears.
|
|
139
|
+
*
|
|
140
|
+
* OPTIONAL, and must stay optional: the wire protocol is compatibility-
|
|
141
|
+
* protected, so an orchestrator that predates the unroutable probe simply
|
|
142
|
+
* omits it.
|
|
143
|
+
*/
|
|
144
|
+
routingReason: z.string().nullable().optional(),
|
|
107
145
|
/** Labels used for agent routing (e.g. ["kici:os:linux", "kici:arch:x64"]). */
|
|
108
146
|
runsOnLabels: z.array(z.string()).nullable().optional(),
|
|
109
147
|
/**
|
|
@@ -239,6 +277,50 @@ const dashboardAttestationsListResponseSchema = z.object({
|
|
|
239
277
|
type: z.literal("dashboard.attestations.list.response"),
|
|
240
278
|
requestId: z.string(),
|
|
241
279
|
attestations: z.array(attestationListItemSchema),
|
|
280
|
+
/**
|
|
281
|
+
* The provenance issuer that signs this orchestrator's attestations, when it
|
|
282
|
+
* owns signing (`KICI_ORCHESTRATOR_PROVENANCE_ISSUER`). The Platform surfaces
|
|
283
|
+
* it as `trustedIssuer` so the dashboard / CLI verify against the orchestrator
|
|
284
|
+
* that actually signed the bundles; absent → the Platform falls back to its own
|
|
285
|
+
* issuer (for historical Platform-signed bundles). Optional for backward
|
|
286
|
+
* compatibility with older orchestrators.
|
|
287
|
+
*/
|
|
288
|
+
trustedIssuer: z.string().nullable().optional(),
|
|
289
|
+
error: z.string().optional()
|
|
290
|
+
});
|
|
291
|
+
/** Request the named artifacts uploaded by a run. */
|
|
292
|
+
const dashboardArtifactsListRequestSchema = z.object({
|
|
293
|
+
type: z.literal("dashboard.artifacts.list"),
|
|
294
|
+
requestId: z.string(),
|
|
295
|
+
actor: actorPrincipalSchema,
|
|
296
|
+
runId: z.string()
|
|
297
|
+
});
|
|
298
|
+
/**
|
|
299
|
+
* Single artifact in the list response. `downloadUrl` is a presigned GET the
|
|
300
|
+
* dashboard links directly; it is omitted when the backing object could not be
|
|
301
|
+
* resolved (expired / missing), in which case the row still lists the metadata.
|
|
302
|
+
*/
|
|
303
|
+
const artifactListItemSchema = z.object({
|
|
304
|
+
name: z.string(),
|
|
305
|
+
jobId: z.string(),
|
|
306
|
+
sizeBytes: z.number(),
|
|
307
|
+
sha256: z.string(),
|
|
308
|
+
createdAt: z.string(),
|
|
309
|
+
downloadUrl: z.string().optional()
|
|
310
|
+
});
|
|
311
|
+
/** Response with the run's artifacts (correlates to dashboard.artifacts.list). */
|
|
312
|
+
const dashboardArtifactsListResponseSchema = z.object({
|
|
313
|
+
type: z.literal("dashboard.artifacts.list.response"),
|
|
314
|
+
requestId: z.string(),
|
|
315
|
+
artifacts: z.array(artifactListItemSchema),
|
|
316
|
+
/**
|
|
317
|
+
* Signature-validity window (seconds) of the presigned `downloadUrl`s in this
|
|
318
|
+
* response, from the storage backend's presigned-GET expiry; the dashboard
|
|
319
|
+
* refreshes the list on a fraction of it so a displayed link is never stale.
|
|
320
|
+
* Optional for backward compatibility with older orchestrators (mirrors
|
|
321
|
+
* `trustedIssuer`).
|
|
322
|
+
*/
|
|
323
|
+
downloadUrlExpiresInSeconds: z.number().int().positive().optional(),
|
|
242
324
|
error: z.string().optional()
|
|
243
325
|
});
|
|
244
326
|
/**
|
|
@@ -301,6 +383,8 @@ const dashboardAttestationsListAllResponseSchema = z.object({
|
|
|
301
383
|
page: z.number().int(),
|
|
302
384
|
pageSize: z.number().int(),
|
|
303
385
|
total: z.number().int(),
|
|
386
|
+
/** See `dashboardAttestationsListResponseSchema.trustedIssuer`. */
|
|
387
|
+
trustedIssuer: z.string().nullable().optional(),
|
|
304
388
|
error: z.string().optional()
|
|
305
389
|
});
|
|
306
390
|
/** Request a single attestation by id (detail page; inlines the one bundle). */
|
|
@@ -499,6 +583,12 @@ const runCancelResponseSchema = z.object({
|
|
|
499
583
|
type: z.literal("run.cancel.response"),
|
|
500
584
|
requestId: z.string(),
|
|
501
585
|
cancelledJobs: z.number().optional(),
|
|
586
|
+
/**
|
|
587
|
+
* True when the run was already terminal, so the cancel wrote nothing. Optional
|
|
588
|
+
* so an orchestrator that predates the field still parses: an absent value
|
|
589
|
+
* means "not reported", not "false".
|
|
590
|
+
*/
|
|
591
|
+
alreadyTerminal: z.boolean().optional(),
|
|
502
592
|
error: z.string().optional()
|
|
503
593
|
});
|
|
504
594
|
/** Request the original webhook payload for a run. */
|
|
@@ -601,6 +691,36 @@ const dashboardEventLogDetailResponseSchema = z.object({
|
|
|
601
691
|
item: eventLogListItemSchema.optional(),
|
|
602
692
|
error: z.string().optional()
|
|
603
693
|
});
|
|
694
|
+
/** Aggregate webhook-activity counts for a time window (org-scoped).
|
|
695
|
+
* Powers the Runs-page misconfig strip + the `kici runs` hint. No payloads,
|
|
696
|
+
* no repo identifiers — safe for all org members. */
|
|
697
|
+
const dashboardEventLogActivityRequestSchema = z.object({
|
|
698
|
+
type: z.literal("dashboard.event-log.activity"),
|
|
699
|
+
requestId: z.string(),
|
|
700
|
+
actor: actorPrincipalSchema,
|
|
701
|
+
orgId: z.string(),
|
|
702
|
+
/** ISO timestamp lower bound (inclusive). */
|
|
703
|
+
fromTimestamp: z.string(),
|
|
704
|
+
/** ISO timestamp upper bound (exclusive). */
|
|
705
|
+
toTimestamp: z.string()
|
|
706
|
+
});
|
|
707
|
+
/** Orchestrator-only bucketed counts over the window. `matched`/`unmatched`
|
|
708
|
+
* distinguish a trigger-no-match delivery from one that produced a run — a
|
|
709
|
+
* fact the Platform relay cannot compute (see the two-table architecture). */
|
|
710
|
+
const eventLogActivityCountsSchema = z.object({
|
|
711
|
+
total: z.number(),
|
|
712
|
+
matched: z.number(),
|
|
713
|
+
unmatched: z.number(),
|
|
714
|
+
lockfileMissing: z.number(),
|
|
715
|
+
lockfileCorrupt: z.number(),
|
|
716
|
+
failed: z.number()
|
|
717
|
+
});
|
|
718
|
+
const dashboardEventLogActivityResponseSchema = z.object({
|
|
719
|
+
type: z.literal("dashboard.event-log.activity.response"),
|
|
720
|
+
requestId: z.string(),
|
|
721
|
+
counts: eventLogActivityCountsSchema.optional(),
|
|
722
|
+
error: z.string().optional()
|
|
723
|
+
});
|
|
604
724
|
/**
|
|
605
725
|
* Reasons a chunked event-log payload stream may terminate without a body.
|
|
606
726
|
* The terminal chunk carries `isLast=true` plus one of these codes in
|
|
@@ -758,7 +878,6 @@ const dashboardEventDlqDiscardResponseSchema = z.object({
|
|
|
758
878
|
error: z.string().optional()
|
|
759
879
|
});
|
|
760
880
|
const contextTypeSchema = z.enum(["fixed", "glob"]);
|
|
761
|
-
const concurrencyStrategySchema = z.enum(["queue", "cancel-pending"]);
|
|
762
881
|
/** List all contexts for the org. */
|
|
763
882
|
const contextListRequestSchema = z.object({
|
|
764
883
|
type: z.literal("dashboard.contexts.list"),
|
|
@@ -819,7 +938,7 @@ const contextGetResponseSchema = z.object({
|
|
|
819
938
|
globPattern: z.string().nullable(),
|
|
820
939
|
branchRestrictions: z.array(z.string()).nullable(),
|
|
821
940
|
concurrencyLimit: z.number().nullable(),
|
|
822
|
-
concurrencyStrategy:
|
|
941
|
+
concurrencyStrategy: ConcurrencyStrategy.nullable(),
|
|
823
942
|
requiredReviewers: z.number().nullable(),
|
|
824
943
|
waitTimerSeconds: z.number().nullable(),
|
|
825
944
|
holdExpirySeconds: z.number().nullable(),
|
|
@@ -839,11 +958,11 @@ const contextCreateRequestSchema = z.object({
|
|
|
839
958
|
contextType: contextTypeSchema,
|
|
840
959
|
globPattern: z.string().optional(),
|
|
841
960
|
branchRestrictions: z.array(z.string()).optional(),
|
|
842
|
-
concurrencyLimit: z.number().optional(),
|
|
843
|
-
concurrencyStrategy:
|
|
961
|
+
concurrencyLimit: z.number().int().positive().optional(),
|
|
962
|
+
concurrencyStrategy: ConcurrencyStrategy.optional(),
|
|
844
963
|
requiredReviewers: z.number().optional(),
|
|
845
964
|
waitTimerSeconds: z.number().optional(),
|
|
846
|
-
holdExpirySeconds: z.number().optional(),
|
|
965
|
+
holdExpirySeconds: z.number().int().positive().optional(),
|
|
847
966
|
enabled: z.boolean().optional()
|
|
848
967
|
});
|
|
849
968
|
const contextCreateResponseSchema = z.object({
|
|
@@ -863,11 +982,11 @@ const contextUpdateRequestSchema = z.object({
|
|
|
863
982
|
contextType: contextTypeSchema.optional(),
|
|
864
983
|
globPattern: z.string().nullable().optional(),
|
|
865
984
|
branchRestrictions: z.array(z.string()).nullable().optional(),
|
|
866
|
-
concurrencyLimit: z.number().nullable().optional(),
|
|
867
|
-
concurrencyStrategy:
|
|
985
|
+
concurrencyLimit: z.number().int().positive().nullable().optional(),
|
|
986
|
+
concurrencyStrategy: ConcurrencyStrategy.nullable().optional(),
|
|
868
987
|
requiredReviewers: z.number().nullable().optional(),
|
|
869
988
|
waitTimerSeconds: z.number().nullable().optional(),
|
|
870
|
-
holdExpirySeconds: z.number().nullable().optional(),
|
|
989
|
+
holdExpirySeconds: z.number().int().positive().nullable().optional(),
|
|
871
990
|
enabled: z.boolean().optional()
|
|
872
991
|
})
|
|
873
992
|
});
|
|
@@ -930,16 +1049,25 @@ const contextVarsListResponseSchema = z.object({
|
|
|
930
1049
|
})).optional(),
|
|
931
1050
|
error: z.string().optional()
|
|
932
1051
|
});
|
|
933
|
-
/**
|
|
1052
|
+
/**
|
|
1053
|
+
* Set (create or update) a variable on an context.
|
|
1054
|
+
*
|
|
1055
|
+
* Under the `permissive` posture the browser sends the plaintext `value`.
|
|
1056
|
+
* Under the `encrypted` posture it sends a `sealed` envelope instead (the value
|
|
1057
|
+
* sealed to the orchestrator's X25519 key in the browser). Exactly one of
|
|
1058
|
+
* `value` / `sealed` is present; `value` stays optional for backward
|
|
1059
|
+
* compatibility with older dashboards that only ever send plaintext.
|
|
1060
|
+
*/
|
|
934
1061
|
const contextVarSetRequestSchema = z.object({
|
|
935
1062
|
type: z.literal("dashboard.contexts.variables.set"),
|
|
936
1063
|
requestId: z.string(),
|
|
937
1064
|
actor: actorPrincipalSchema,
|
|
938
1065
|
contextId: z.string(),
|
|
939
1066
|
key: z.string(),
|
|
940
|
-
value: z.string(),
|
|
1067
|
+
value: z.string().optional(),
|
|
1068
|
+
sealed: dashboardSealedEnvelopeSchema.optional(),
|
|
941
1069
|
locked: z.boolean().optional()
|
|
942
|
-
});
|
|
1070
|
+
}).refine((m) => m.value === void 0 !== (m.sealed === void 0), { message: "exactly one of value / sealed must be present" });
|
|
943
1071
|
const contextVarSetResponseSchema = z.object({
|
|
944
1072
|
type: z.literal("dashboard.contexts.variables.set.response"),
|
|
945
1073
|
requestId: z.string(),
|
|
@@ -1056,15 +1184,24 @@ const contextSecretsListResponseSchema = z.object({
|
|
|
1056
1184
|
})).optional(),
|
|
1057
1185
|
error: z.string().optional()
|
|
1058
1186
|
});
|
|
1059
|
-
/**
|
|
1187
|
+
/**
|
|
1188
|
+
* Set (create or update) a scoped secret.
|
|
1189
|
+
*
|
|
1190
|
+
* Under the `permissive` posture the browser sends the plaintext `value`.
|
|
1191
|
+
* Under the `encrypted` posture it sends a `sealed` envelope instead (the value
|
|
1192
|
+
* sealed to the orchestrator's X25519 key in the browser). Exactly one of
|
|
1193
|
+
* `value` / `sealed` is present; `value` stays optional for backward
|
|
1194
|
+
* compatibility with older dashboards that only ever send plaintext.
|
|
1195
|
+
*/
|
|
1060
1196
|
const contextSecretSetRequestSchema = z.object({
|
|
1061
1197
|
type: z.literal("dashboard.contexts.secrets.set"),
|
|
1062
1198
|
requestId: z.string(),
|
|
1063
1199
|
actor: actorPrincipalSchema,
|
|
1064
1200
|
scope: z.string(),
|
|
1065
1201
|
key: z.string(),
|
|
1066
|
-
value: z.string()
|
|
1067
|
-
|
|
1202
|
+
value: z.string().optional(),
|
|
1203
|
+
sealed: dashboardSealedEnvelopeSchema.optional()
|
|
1204
|
+
}).refine((m) => m.value === void 0 !== (m.sealed === void 0), { message: "exactly one of value / sealed must be present" });
|
|
1068
1205
|
const contextSecretSetResponseSchema = z.object({
|
|
1069
1206
|
type: z.literal("dashboard.contexts.secrets.set.response"),
|
|
1070
1207
|
requestId: z.string(),
|
|
@@ -1143,15 +1280,9 @@ const contextHistoryResponseSchema = z.object({
|
|
|
1143
1280
|
completedAt: z.coerce.string().nullable(),
|
|
1144
1281
|
context: z.string().nullable()
|
|
1145
1282
|
})).optional(),
|
|
1283
|
+
hasMore: z.boolean().optional(),
|
|
1146
1284
|
error: z.string().optional()
|
|
1147
1285
|
});
|
|
1148
|
-
/** Status values for held runs (approval queue). */
|
|
1149
|
-
const HeldRunStatus = z.enum([
|
|
1150
|
-
"pending",
|
|
1151
|
-
"approved",
|
|
1152
|
-
"rejected",
|
|
1153
|
-
"expired"
|
|
1154
|
-
]);
|
|
1155
1286
|
/** Queue type for held runs. */
|
|
1156
1287
|
const HeldRunQueueType = z.enum(["context", "security"]);
|
|
1157
1288
|
/** List held runs. */
|
|
@@ -1163,6 +1294,14 @@ const heldRunsListRequestSchema = z.object({
|
|
|
1163
1294
|
queueType: HeldRunQueueType.optional(),
|
|
1164
1295
|
runId: z.string().optional(),
|
|
1165
1296
|
/**
|
|
1297
|
+
* Narrow to a single hold by its `held_runs.id`. The Platform's held-run
|
|
1298
|
+
* approval gate uses this to resolve one hold's `holdType` before deciding
|
|
1299
|
+
* which permission the caller needs. Optional so an orchestrator that does
|
|
1300
|
+
* not know the field still answers the request — the Platform then narrows
|
|
1301
|
+
* client-side from the response.
|
|
1302
|
+
*/
|
|
1303
|
+
heldRunId: z.string().optional(),
|
|
1304
|
+
/**
|
|
1166
1305
|
* Target org the read must be scoped to, carried per-request by the Platform
|
|
1167
1306
|
* (the validated `:orgId` path param). The orchestrator honors this over its
|
|
1168
1307
|
* static connection-level org so a Platform-first `kici run remote` org —
|
|
@@ -1182,8 +1321,8 @@ const heldRunsListResponseSchema = z.object({
|
|
|
1182
1321
|
contextId: z.string().nullable(),
|
|
1183
1322
|
contextName: z.string().nullable(),
|
|
1184
1323
|
holdType: z.string(),
|
|
1185
|
-
queueType:
|
|
1186
|
-
status:
|
|
1324
|
+
queueType: z.string(),
|
|
1325
|
+
status: z.string(),
|
|
1187
1326
|
requestedAt: z.coerce.string(),
|
|
1188
1327
|
resolvedAt: z.coerce.string().nullable(),
|
|
1189
1328
|
resolvedBy: z.string().nullable(),
|
|
@@ -1859,11 +1998,13 @@ const testRelayCancelResponseSchema = z.object({
|
|
|
1859
1998
|
const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
1860
1999
|
dashboardRunDetailRequestSchema,
|
|
1861
2000
|
dashboardRunStructuredRequestSchema,
|
|
2001
|
+
dashboardRunStateRequestSchema,
|
|
1862
2002
|
dashboardStepLogsRequestSchema,
|
|
1863
2003
|
dashboardAttestationsListRequestSchema,
|
|
1864
2004
|
dashboardAttestationsListAllRequestSchema,
|
|
1865
2005
|
dashboardAttestationGetRequestSchema,
|
|
1866
2006
|
dashboardAttestationRetryRequestSchema,
|
|
2007
|
+
dashboardArtifactsListRequestSchema,
|
|
1867
2008
|
dashboardRunsListRequestSchema,
|
|
1868
2009
|
dashboardRunsFiltersRequestSchema,
|
|
1869
2010
|
dashboardSourcesListRequestSchema,
|
|
@@ -1914,6 +2055,7 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1914
2055
|
backendSyncRequestSchema,
|
|
1915
2056
|
backendTestRequestSchema,
|
|
1916
2057
|
dashboardEventLogListRequestSchema,
|
|
2058
|
+
dashboardEventLogActivityRequestSchema,
|
|
1917
2059
|
dashboardEventLogDetailRequestSchema,
|
|
1918
2060
|
dashboardEventLogPayloadStreamRequestSchema,
|
|
1919
2061
|
dashboardEventDlqListRequestSchema,
|
|
@@ -1933,11 +2075,13 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1933
2075
|
const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
1934
2076
|
dashboardRunDetailResponseSchema,
|
|
1935
2077
|
dashboardRunStructuredResponseSchema,
|
|
2078
|
+
dashboardRunStateResponseSchema,
|
|
1936
2079
|
dashboardStepLogsResponseSchema,
|
|
1937
2080
|
dashboardAttestationsListResponseSchema,
|
|
1938
2081
|
dashboardAttestationsListAllResponseSchema,
|
|
1939
2082
|
dashboardAttestationGetResponseSchema,
|
|
1940
2083
|
dashboardAttestationRetryResponseSchema,
|
|
2084
|
+
dashboardArtifactsListResponseSchema,
|
|
1941
2085
|
dashboardRunsListResponseSchema,
|
|
1942
2086
|
dashboardRunsFiltersResponseSchema,
|
|
1943
2087
|
dashboardSourcesListResponseSchema,
|
|
@@ -1988,6 +2132,7 @@ const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
|
1988
2132
|
backendSyncResponseSchema,
|
|
1989
2133
|
backendTestResponseSchema,
|
|
1990
2134
|
dashboardEventLogListResponseSchema,
|
|
2135
|
+
dashboardEventLogActivityResponseSchema,
|
|
1991
2136
|
dashboardEventLogDetailResponseSchema,
|
|
1992
2137
|
dashboardEventLogPayloadChunkSchema,
|
|
1993
2138
|
dashboardEventDlqListResponseSchema,
|
|
@@ -2092,13 +2237,21 @@ const runListItemSchema = z.object({
|
|
|
2092
2237
|
localWorkingTree: z.boolean(),
|
|
2093
2238
|
source: runListSourceSchema.nullable()
|
|
2094
2239
|
});
|
|
2095
|
-
/**
|
|
2240
|
+
/**
|
|
2241
|
+
* Cursor-paginated run list response envelope.
|
|
2242
|
+
*
|
|
2243
|
+
* Keyset (cursor) pagination: `nextCursor` fetches the next (older) page,
|
|
2244
|
+
* `prevCursor` the previous (newer) page — both opaque, `null` when there is no
|
|
2245
|
+
* such page. `hasMore` is true when an older page exists. `approxTotal` is a
|
|
2246
|
+
* cached, approximate match count for the "~N runs" label (not an exact total).
|
|
2247
|
+
*/
|
|
2096
2248
|
const runListResponseSchema = z.object({
|
|
2097
2249
|
runs: z.array(runListItemSchema),
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2250
|
+
nextCursor: z.string().nullable(),
|
|
2251
|
+
prevCursor: z.string().nullable(),
|
|
2252
|
+
hasMore: z.boolean(),
|
|
2253
|
+
approxTotal: z.number(),
|
|
2254
|
+
pageSize: z.number()
|
|
2102
2255
|
});
|
|
2103
2256
|
const diagnosticsInfraAgentSchema = z.object({
|
|
2104
2257
|
agentId: z.string(),
|
|
@@ -2151,11 +2304,25 @@ const diagnosticsInfraOrchestratorSchema = z.object({
|
|
|
2151
2304
|
* Self-reported deployment shape, used by the dashboard to build the correct
|
|
2152
2305
|
* per-orchestrator kici-admin invocation. Orchestrators that never reported
|
|
2153
2306
|
* it serialize as `mode: 'unknown'` with null container fields.
|
|
2307
|
+
*
|
|
2308
|
+
* `adminInvocation` is a shell command, not a pair of raw paths: either half
|
|
2309
|
+
* is single-quoted when its path holds whitespace, so it is rendered verbatim
|
|
2310
|
+
* and a reader that wants the shim path back has to split it as shell words
|
|
2311
|
+
* rather than on the last space.
|
|
2312
|
+
*
|
|
2313
|
+
* `adminPath` is the `windows` counterpart: the RAW, unquoted path of the
|
|
2314
|
+
* `kici-admin.cmd` launcher, null for every other mode and whenever it could
|
|
2315
|
+
* not be located. It is deliberately not a command — cmd.exe runs a
|
|
2316
|
+
* double-quoted path in command position while PowerShell only prints it, so
|
|
2317
|
+
* the renderer has to quote it per shell and a pre-quoted value would take
|
|
2318
|
+
* that choice away.
|
|
2154
2319
|
*/
|
|
2155
2320
|
deployment: z.object({
|
|
2156
2321
|
mode: DeploymentModeSchema,
|
|
2157
2322
|
containerName: z.string().nullable(),
|
|
2158
|
-
containerRuntime: DeploymentContainerRuntimeSchema.nullable()
|
|
2323
|
+
containerRuntime: DeploymentContainerRuntimeSchema.nullable(),
|
|
2324
|
+
adminInvocation: z.string().nullable(),
|
|
2325
|
+
adminPath: z.string().nullable()
|
|
2159
2326
|
}),
|
|
2160
2327
|
s3LogAccess: z.boolean().nullable().optional(),
|
|
2161
2328
|
agentCount: z.number(),
|
|
@@ -2189,6 +2356,16 @@ const diagnosticsInfraOrchestratorSchema = z.object({
|
|
|
2189
2356
|
})).optional(),
|
|
2190
2357
|
error: z.string().optional()
|
|
2191
2358
|
});
|
|
2359
|
+
/**
|
|
2360
|
+
* A single infrastructure health alert.
|
|
2361
|
+
*
|
|
2362
|
+
* Both vocabulary fields are `z.string()` on purpose. `InfraAlertType` and
|
|
2363
|
+
* `InfraAlertSeverity` (`diagnostics/infra-alert.ts`) name the *known*
|
|
2364
|
+
* vocabulary the producer mints from and the read-side consumers colour by; the
|
|
2365
|
+
* wire stays permissive because the `kici` CLI hard-parses this response while
|
|
2366
|
+
* pinned to an older version than the hosted Platform it is talking to. A
|
|
2367
|
+
* strict enum would fail the whole response rather than degrade one row.
|
|
2368
|
+
*/
|
|
2192
2369
|
const diagnosticsInfraAlertSchema = z.object({
|
|
2193
2370
|
type: z.string(),
|
|
2194
2371
|
message: z.string(),
|
|
@@ -2285,6 +2462,6 @@ const DashboardResponseErrorCode = z.enum([
|
|
|
2285
2462
|
"internal_error"
|
|
2286
2463
|
]);
|
|
2287
2464
|
//#endregion
|
|
2288
|
-
export { ContextDeleteErrorCode, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, HeldRunStatus, TestRelayType, attestationListFiltersSchema, attestationListItemSchema, attestationListSummarySchema, attestationVerifyStatusSchema, backendGetRequestSchema, backendGetResponseSchema, backendItemSchema, backendSyncRequestSchema, backendSyncResponseSchema, backendTestRequestSchema, backendTestResponseSchema, backendsListRequestSchema, backendsListResponseSchema, backendsSyncAllRequestSchema, backendsSyncAllResponseSchema, browserEventLogPayloadChunkSchema, contextBindingEntrySchema, contextBindingsListRequestSchema, contextBindingsSetRequestSchema, contextCreateRequestSchema, contextDeleteRequestSchema, contextGetRequestSchema, contextHistoryRequestSchema, contextListRequestSchema, contextSecretDeleteRequestSchema, contextSecretScopeCreateRequestSchema, contextSecretScopeDeleteRequestSchema, contextSecretScopeRenameRequestSchema, contextSecretSetRequestSchema, contextSecretsListRequestSchema, contextSourceOverrideDeleteRequestSchema, contextSourceOverrideSetRequestSchema, contextSourceOverridesListRequestSchema, contextTestAccessSetRequestSchema, contextUpdateRequestSchema, contextVarDeleteRequestSchema, contextVarSetRequestSchema, contextVarsListRequestSchema, 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, 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, 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 };
|
|
2465
|
+
export { ContextDeleteErrorCode, DASHBOARD_REQUEST_TYPES, DASHBOARD_REQUEST_TYPE_SET, DashboardResponseErrorCode, EventLogPayloadStreamError, FleetHostDisposition, HeldRunQueueType, HeldRunStatus, 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 };
|
|
2289
2466
|
|
|
2290
2467
|
//# sourceMappingURL=dashboard.js.map
|
|
@@ -1,38 +1,65 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/** How the orchestrator process itself was deployed (not how it runs agents). */
|
|
3
3
|
export declare const DeploymentModeSchema: z.ZodEnum<{
|
|
4
|
-
|
|
5
|
-
systemd: "systemd";
|
|
4
|
+
compose: "compose";
|
|
6
5
|
launchd: "launchd";
|
|
6
|
+
systemd: "systemd";
|
|
7
|
+
unknown: "unknown";
|
|
7
8
|
windows: "windows";
|
|
8
|
-
compose: "compose";
|
|
9
9
|
}>;
|
|
10
10
|
export type DeploymentMode = z.infer<typeof DeploymentModeSchema>;
|
|
11
11
|
/** Container runtime that launched a `compose`-mode orchestrator. */
|
|
12
12
|
export declare const DeploymentContainerRuntimeSchema: z.ZodEnum<{
|
|
13
|
-
podman: "podman";
|
|
14
13
|
docker: "docker";
|
|
14
|
+
podman: "podman";
|
|
15
15
|
}>;
|
|
16
16
|
export type DeploymentContainerRuntime = z.infer<typeof DeploymentContainerRuntimeSchema>;
|
|
17
17
|
/**
|
|
18
18
|
* The orchestrator's self-reported deployment shape, used to build the correct
|
|
19
|
-
* kici-admin invocation in the dashboard
|
|
19
|
+
* kici-admin invocation in the dashboard Infrastructure page. Container fields are
|
|
20
20
|
* populated only for the `compose` mode; a hand-run orchestrator reports
|
|
21
|
-
* `mode: 'unknown'` with no container fields.
|
|
21
|
+
* `mode: 'unknown'` with no container fields. `adminInvocation` is the pinned
|
|
22
|
+
* `<node> <kici-admin>` invocation for posix bare-metal (`systemd` / `launchd`),
|
|
23
|
+
* set by the orchestrator from its own `process.execPath` so a copied command
|
|
24
|
+
* runs under the unit's pinned runtime rather than whatever `node` the
|
|
25
|
+
* operator's shell resolves. The orchestrator locates the shim on disk and omits
|
|
26
|
+
* the field when it cannot, so a reader may always fall back to a PATH-resolved
|
|
27
|
+
* bare `kici-admin`. It is a live-host runtime path, carried only on the
|
|
28
|
+
* in-memory identity (never persisted).
|
|
29
|
+
*
|
|
30
|
+
* The value is a shell command, not a pair of raw paths: either half is
|
|
31
|
+
* single-quoted (POSIX `'\''` escaping) when its path holds whitespace or another
|
|
32
|
+
* shell metacharacter, so it can be pasted as-is. A reader that only displays it
|
|
33
|
+
* needs no special handling; a reader that wants the shim path back out has to
|
|
34
|
+
* split it as shell words rather than on the last space.
|
|
35
|
+
*
|
|
36
|
+
* `adminPath` is the Windows counterpart and is set only for `mode: 'windows'`:
|
|
37
|
+
* the absolute path of the `kici-admin.cmd` launcher, when the orchestrator can
|
|
38
|
+
* locate it. Unlike `adminInvocation` it is a RAW path and never a command —
|
|
39
|
+
* nothing about it is quoted or escaped. That is deliberate: cmd.exe runs a
|
|
40
|
+
* double-quoted path in command position while PowerShell merely *prints* it
|
|
41
|
+
* (it needs the `&` call operator), so the same path has to be written two
|
|
42
|
+
* different ways and only the reader knows which shell it is rendering for. A
|
|
43
|
+
* producer that pre-quoted would take that choice away. It is a live-host
|
|
44
|
+
* runtime path, carried only on the in-memory identity (never persisted), and
|
|
45
|
+
* omitted when the launcher cannot be located so a reader falls back to a
|
|
46
|
+
* PATH-resolved bare `kici-admin.cmd`.
|
|
22
47
|
*/
|
|
23
48
|
export declare const DeploymentIdentitySchema: z.ZodObject<{
|
|
24
49
|
mode: z.ZodEnum<{
|
|
25
|
-
|
|
26
|
-
systemd: "systemd";
|
|
50
|
+
compose: "compose";
|
|
27
51
|
launchd: "launchd";
|
|
52
|
+
systemd: "systemd";
|
|
53
|
+
unknown: "unknown";
|
|
28
54
|
windows: "windows";
|
|
29
|
-
compose: "compose";
|
|
30
55
|
}>;
|
|
31
56
|
containerName: z.ZodOptional<z.ZodString>;
|
|
32
57
|
containerRuntime: z.ZodOptional<z.ZodEnum<{
|
|
33
|
-
podman: "podman";
|
|
34
58
|
docker: "docker";
|
|
59
|
+
podman: "podman";
|
|
35
60
|
}>>;
|
|
61
|
+
adminInvocation: z.ZodOptional<z.ZodString>;
|
|
62
|
+
adminPath: z.ZodOptional<z.ZodString>;
|
|
36
63
|
}, z.core.$strip>;
|
|
37
64
|
export type DeploymentIdentity = z.infer<typeof DeploymentIdentitySchema>;
|
|
38
65
|
//# sourceMappingURL=deployment-identity.d.ts.map
|
|
@@ -13,14 +13,41 @@ const DeploymentModeSchema = z.enum([
|
|
|
13
13
|
const DeploymentContainerRuntimeSchema = z.enum(["podman", "docker"]);
|
|
14
14
|
/**
|
|
15
15
|
* The orchestrator's self-reported deployment shape, used to build the correct
|
|
16
|
-
* kici-admin invocation in the dashboard
|
|
16
|
+
* kici-admin invocation in the dashboard Infrastructure page. Container fields are
|
|
17
17
|
* populated only for the `compose` mode; a hand-run orchestrator reports
|
|
18
|
-
* `mode: 'unknown'` with no container fields.
|
|
18
|
+
* `mode: 'unknown'` with no container fields. `adminInvocation` is the pinned
|
|
19
|
+
* `<node> <kici-admin>` invocation for posix bare-metal (`systemd` / `launchd`),
|
|
20
|
+
* set by the orchestrator from its own `process.execPath` so a copied command
|
|
21
|
+
* runs under the unit's pinned runtime rather than whatever `node` the
|
|
22
|
+
* operator's shell resolves. The orchestrator locates the shim on disk and omits
|
|
23
|
+
* the field when it cannot, so a reader may always fall back to a PATH-resolved
|
|
24
|
+
* bare `kici-admin`. It is a live-host runtime path, carried only on the
|
|
25
|
+
* in-memory identity (never persisted).
|
|
26
|
+
*
|
|
27
|
+
* The value is a shell command, not a pair of raw paths: either half is
|
|
28
|
+
* single-quoted (POSIX `'\''` escaping) when its path holds whitespace or another
|
|
29
|
+
* shell metacharacter, so it can be pasted as-is. A reader that only displays it
|
|
30
|
+
* needs no special handling; a reader that wants the shim path back out has to
|
|
31
|
+
* split it as shell words rather than on the last space.
|
|
32
|
+
*
|
|
33
|
+
* `adminPath` is the Windows counterpart and is set only for `mode: 'windows'`:
|
|
34
|
+
* the absolute path of the `kici-admin.cmd` launcher, when the orchestrator can
|
|
35
|
+
* locate it. Unlike `adminInvocation` it is a RAW path and never a command —
|
|
36
|
+
* nothing about it is quoted or escaped. That is deliberate: cmd.exe runs a
|
|
37
|
+
* double-quoted path in command position while PowerShell merely *prints* it
|
|
38
|
+
* (it needs the `&` call operator), so the same path has to be written two
|
|
39
|
+
* different ways and only the reader knows which shell it is rendering for. A
|
|
40
|
+
* producer that pre-quoted would take that choice away. It is a live-host
|
|
41
|
+
* runtime path, carried only on the in-memory identity (never persisted), and
|
|
42
|
+
* omitted when the launcher cannot be located so a reader falls back to a
|
|
43
|
+
* PATH-resolved bare `kici-admin.cmd`.
|
|
19
44
|
*/
|
|
20
45
|
const DeploymentIdentitySchema = z.object({
|
|
21
46
|
mode: DeploymentModeSchema,
|
|
22
47
|
containerName: z.string().min(1).optional(),
|
|
23
|
-
containerRuntime: DeploymentContainerRuntimeSchema.optional()
|
|
48
|
+
containerRuntime: DeploymentContainerRuntimeSchema.optional(),
|
|
49
|
+
adminInvocation: z.string().min(1).optional(),
|
|
50
|
+
adminPath: z.string().min(1).optional()
|
|
24
51
|
});
|
|
25
52
|
//#endregion
|
|
26
53
|
export { DeploymentContainerRuntimeSchema, DeploymentIdentitySchema, DeploymentModeSchema };
|
|
@@ -16,12 +16,12 @@ import { z } from 'zod';
|
|
|
16
16
|
* the message.
|
|
17
17
|
*/
|
|
18
18
|
export declare const EventLogStatus: z.ZodEnum<{
|
|
19
|
-
failed: "failed";
|
|
20
|
-
received: "received";
|
|
21
|
-
processed: "processed";
|
|
22
19
|
duplicate: "duplicate";
|
|
23
|
-
|
|
20
|
+
failed: "failed";
|
|
24
21
|
lockfile_corrupt: "lockfile_corrupt";
|
|
22
|
+
lockfile_missing: "lockfile_missing";
|
|
23
|
+
processed: "processed";
|
|
24
|
+
received: "received";
|
|
25
25
|
}>;
|
|
26
26
|
export type EventLogStatus = z.infer<typeof EventLogStatus>;
|
|
27
27
|
/**
|
|
@@ -46,8 +46,8 @@ export type PayloadOmittedReason = z.infer<typeof PayloadOmittedReason>;
|
|
|
46
46
|
* - `direct` — Direct HTTP ingress (independent / hybrid mode).
|
|
47
47
|
*/
|
|
48
48
|
export declare const EventLogSource: z.ZodEnum<{
|
|
49
|
-
relay: "relay";
|
|
50
49
|
direct: "direct";
|
|
50
|
+
relay: "relay";
|
|
51
51
|
}>;
|
|
52
52
|
export type EventLogSource = z.infer<typeof EventLogSource>;
|
|
53
53
|
//# sourceMappingURL=event-log.d.ts.map
|