@kici-dev/engine 0.1.27 → 0.2.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 +954 -739
- package/dist/metrics/metric-catalog.generated.js +278 -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 +1022 -498
- package/dist/protocol/messages/dashboard.js +198 -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"),
|
|
@@ -239,6 +267,50 @@ const dashboardAttestationsListResponseSchema = z.object({
|
|
|
239
267
|
type: z.literal("dashboard.attestations.list.response"),
|
|
240
268
|
requestId: z.string(),
|
|
241
269
|
attestations: z.array(attestationListItemSchema),
|
|
270
|
+
/**
|
|
271
|
+
* The provenance issuer that signs this orchestrator's attestations, when it
|
|
272
|
+
* owns signing (`KICI_ORCHESTRATOR_PROVENANCE_ISSUER`). The Platform surfaces
|
|
273
|
+
* it as `trustedIssuer` so the dashboard / CLI verify against the orchestrator
|
|
274
|
+
* that actually signed the bundles; absent → the Platform falls back to its own
|
|
275
|
+
* issuer (for historical Platform-signed bundles). Optional for backward
|
|
276
|
+
* compatibility with older orchestrators.
|
|
277
|
+
*/
|
|
278
|
+
trustedIssuer: z.string().nullable().optional(),
|
|
279
|
+
error: z.string().optional()
|
|
280
|
+
});
|
|
281
|
+
/** Request the named artifacts uploaded by a run. */
|
|
282
|
+
const dashboardArtifactsListRequestSchema = z.object({
|
|
283
|
+
type: z.literal("dashboard.artifacts.list"),
|
|
284
|
+
requestId: z.string(),
|
|
285
|
+
actor: actorPrincipalSchema,
|
|
286
|
+
runId: z.string()
|
|
287
|
+
});
|
|
288
|
+
/**
|
|
289
|
+
* Single artifact in the list response. `downloadUrl` is a presigned GET the
|
|
290
|
+
* dashboard links directly; it is omitted when the backing object could not be
|
|
291
|
+
* resolved (expired / missing), in which case the row still lists the metadata.
|
|
292
|
+
*/
|
|
293
|
+
const artifactListItemSchema = z.object({
|
|
294
|
+
name: z.string(),
|
|
295
|
+
jobId: z.string(),
|
|
296
|
+
sizeBytes: z.number(),
|
|
297
|
+
sha256: z.string(),
|
|
298
|
+
createdAt: z.string(),
|
|
299
|
+
downloadUrl: z.string().optional()
|
|
300
|
+
});
|
|
301
|
+
/** Response with the run's artifacts (correlates to dashboard.artifacts.list). */
|
|
302
|
+
const dashboardArtifactsListResponseSchema = z.object({
|
|
303
|
+
type: z.literal("dashboard.artifacts.list.response"),
|
|
304
|
+
requestId: z.string(),
|
|
305
|
+
artifacts: z.array(artifactListItemSchema),
|
|
306
|
+
/**
|
|
307
|
+
* Signature-validity window (seconds) of the presigned `downloadUrl`s in this
|
|
308
|
+
* response, from the storage backend's presigned-GET expiry; the dashboard
|
|
309
|
+
* refreshes the list on a fraction of it so a displayed link is never stale.
|
|
310
|
+
* Optional for backward compatibility with older orchestrators (mirrors
|
|
311
|
+
* `trustedIssuer`).
|
|
312
|
+
*/
|
|
313
|
+
downloadUrlExpiresInSeconds: z.number().int().positive().optional(),
|
|
242
314
|
error: z.string().optional()
|
|
243
315
|
});
|
|
244
316
|
/**
|
|
@@ -301,6 +373,8 @@ const dashboardAttestationsListAllResponseSchema = z.object({
|
|
|
301
373
|
page: z.number().int(),
|
|
302
374
|
pageSize: z.number().int(),
|
|
303
375
|
total: z.number().int(),
|
|
376
|
+
/** See `dashboardAttestationsListResponseSchema.trustedIssuer`. */
|
|
377
|
+
trustedIssuer: z.string().nullable().optional(),
|
|
304
378
|
error: z.string().optional()
|
|
305
379
|
});
|
|
306
380
|
/** Request a single attestation by id (detail page; inlines the one bundle). */
|
|
@@ -499,6 +573,12 @@ const runCancelResponseSchema = z.object({
|
|
|
499
573
|
type: z.literal("run.cancel.response"),
|
|
500
574
|
requestId: z.string(),
|
|
501
575
|
cancelledJobs: z.number().optional(),
|
|
576
|
+
/**
|
|
577
|
+
* True when the run was already terminal, so the cancel wrote nothing. Optional
|
|
578
|
+
* so an orchestrator that predates the field still parses: an absent value
|
|
579
|
+
* means "not reported", not "false".
|
|
580
|
+
*/
|
|
581
|
+
alreadyTerminal: z.boolean().optional(),
|
|
502
582
|
error: z.string().optional()
|
|
503
583
|
});
|
|
504
584
|
/** Request the original webhook payload for a run. */
|
|
@@ -601,6 +681,36 @@ const dashboardEventLogDetailResponseSchema = z.object({
|
|
|
601
681
|
item: eventLogListItemSchema.optional(),
|
|
602
682
|
error: z.string().optional()
|
|
603
683
|
});
|
|
684
|
+
/** Aggregate webhook-activity counts for a time window (org-scoped).
|
|
685
|
+
* Powers the Runs-page misconfig strip + the `kici runs` hint. No payloads,
|
|
686
|
+
* no repo identifiers — safe for all org members. */
|
|
687
|
+
const dashboardEventLogActivityRequestSchema = z.object({
|
|
688
|
+
type: z.literal("dashboard.event-log.activity"),
|
|
689
|
+
requestId: z.string(),
|
|
690
|
+
actor: actorPrincipalSchema,
|
|
691
|
+
orgId: z.string(),
|
|
692
|
+
/** ISO timestamp lower bound (inclusive). */
|
|
693
|
+
fromTimestamp: z.string(),
|
|
694
|
+
/** ISO timestamp upper bound (exclusive). */
|
|
695
|
+
toTimestamp: z.string()
|
|
696
|
+
});
|
|
697
|
+
/** Orchestrator-only bucketed counts over the window. `matched`/`unmatched`
|
|
698
|
+
* distinguish a trigger-no-match delivery from one that produced a run — a
|
|
699
|
+
* fact the Platform relay cannot compute (see the two-table architecture). */
|
|
700
|
+
const eventLogActivityCountsSchema = z.object({
|
|
701
|
+
total: z.number(),
|
|
702
|
+
matched: z.number(),
|
|
703
|
+
unmatched: z.number(),
|
|
704
|
+
lockfileMissing: z.number(),
|
|
705
|
+
lockfileCorrupt: z.number(),
|
|
706
|
+
failed: z.number()
|
|
707
|
+
});
|
|
708
|
+
const dashboardEventLogActivityResponseSchema = z.object({
|
|
709
|
+
type: z.literal("dashboard.event-log.activity.response"),
|
|
710
|
+
requestId: z.string(),
|
|
711
|
+
counts: eventLogActivityCountsSchema.optional(),
|
|
712
|
+
error: z.string().optional()
|
|
713
|
+
});
|
|
604
714
|
/**
|
|
605
715
|
* Reasons a chunked event-log payload stream may terminate without a body.
|
|
606
716
|
* The terminal chunk carries `isLast=true` plus one of these codes in
|
|
@@ -758,7 +868,6 @@ const dashboardEventDlqDiscardResponseSchema = z.object({
|
|
|
758
868
|
error: z.string().optional()
|
|
759
869
|
});
|
|
760
870
|
const contextTypeSchema = z.enum(["fixed", "glob"]);
|
|
761
|
-
const concurrencyStrategySchema = z.enum(["queue", "cancel-pending"]);
|
|
762
871
|
/** List all contexts for the org. */
|
|
763
872
|
const contextListRequestSchema = z.object({
|
|
764
873
|
type: z.literal("dashboard.contexts.list"),
|
|
@@ -819,7 +928,7 @@ const contextGetResponseSchema = z.object({
|
|
|
819
928
|
globPattern: z.string().nullable(),
|
|
820
929
|
branchRestrictions: z.array(z.string()).nullable(),
|
|
821
930
|
concurrencyLimit: z.number().nullable(),
|
|
822
|
-
concurrencyStrategy:
|
|
931
|
+
concurrencyStrategy: ConcurrencyStrategy.nullable(),
|
|
823
932
|
requiredReviewers: z.number().nullable(),
|
|
824
933
|
waitTimerSeconds: z.number().nullable(),
|
|
825
934
|
holdExpirySeconds: z.number().nullable(),
|
|
@@ -839,11 +948,11 @@ const contextCreateRequestSchema = z.object({
|
|
|
839
948
|
contextType: contextTypeSchema,
|
|
840
949
|
globPattern: z.string().optional(),
|
|
841
950
|
branchRestrictions: z.array(z.string()).optional(),
|
|
842
|
-
concurrencyLimit: z.number().optional(),
|
|
843
|
-
concurrencyStrategy:
|
|
951
|
+
concurrencyLimit: z.number().int().positive().optional(),
|
|
952
|
+
concurrencyStrategy: ConcurrencyStrategy.optional(),
|
|
844
953
|
requiredReviewers: z.number().optional(),
|
|
845
954
|
waitTimerSeconds: z.number().optional(),
|
|
846
|
-
holdExpirySeconds: z.number().optional(),
|
|
955
|
+
holdExpirySeconds: z.number().int().positive().optional(),
|
|
847
956
|
enabled: z.boolean().optional()
|
|
848
957
|
});
|
|
849
958
|
const contextCreateResponseSchema = z.object({
|
|
@@ -863,11 +972,11 @@ const contextUpdateRequestSchema = z.object({
|
|
|
863
972
|
contextType: contextTypeSchema.optional(),
|
|
864
973
|
globPattern: z.string().nullable().optional(),
|
|
865
974
|
branchRestrictions: z.array(z.string()).nullable().optional(),
|
|
866
|
-
concurrencyLimit: z.number().nullable().optional(),
|
|
867
|
-
concurrencyStrategy:
|
|
975
|
+
concurrencyLimit: z.number().int().positive().nullable().optional(),
|
|
976
|
+
concurrencyStrategy: ConcurrencyStrategy.nullable().optional(),
|
|
868
977
|
requiredReviewers: z.number().nullable().optional(),
|
|
869
978
|
waitTimerSeconds: z.number().nullable().optional(),
|
|
870
|
-
holdExpirySeconds: z.number().nullable().optional(),
|
|
979
|
+
holdExpirySeconds: z.number().int().positive().nullable().optional(),
|
|
871
980
|
enabled: z.boolean().optional()
|
|
872
981
|
})
|
|
873
982
|
});
|
|
@@ -930,16 +1039,25 @@ const contextVarsListResponseSchema = z.object({
|
|
|
930
1039
|
})).optional(),
|
|
931
1040
|
error: z.string().optional()
|
|
932
1041
|
});
|
|
933
|
-
/**
|
|
1042
|
+
/**
|
|
1043
|
+
* Set (create or update) a variable on an context.
|
|
1044
|
+
*
|
|
1045
|
+
* Under the `permissive` posture the browser sends the plaintext `value`.
|
|
1046
|
+
* Under the `encrypted` posture it sends a `sealed` envelope instead (the value
|
|
1047
|
+
* sealed to the orchestrator's X25519 key in the browser). Exactly one of
|
|
1048
|
+
* `value` / `sealed` is present; `value` stays optional for backward
|
|
1049
|
+
* compatibility with older dashboards that only ever send plaintext.
|
|
1050
|
+
*/
|
|
934
1051
|
const contextVarSetRequestSchema = z.object({
|
|
935
1052
|
type: z.literal("dashboard.contexts.variables.set"),
|
|
936
1053
|
requestId: z.string(),
|
|
937
1054
|
actor: actorPrincipalSchema,
|
|
938
1055
|
contextId: z.string(),
|
|
939
1056
|
key: z.string(),
|
|
940
|
-
value: z.string(),
|
|
1057
|
+
value: z.string().optional(),
|
|
1058
|
+
sealed: dashboardSealedEnvelopeSchema.optional(),
|
|
941
1059
|
locked: z.boolean().optional()
|
|
942
|
-
});
|
|
1060
|
+
}).refine((m) => m.value === void 0 !== (m.sealed === void 0), { message: "exactly one of value / sealed must be present" });
|
|
943
1061
|
const contextVarSetResponseSchema = z.object({
|
|
944
1062
|
type: z.literal("dashboard.contexts.variables.set.response"),
|
|
945
1063
|
requestId: z.string(),
|
|
@@ -1056,15 +1174,24 @@ const contextSecretsListResponseSchema = z.object({
|
|
|
1056
1174
|
})).optional(),
|
|
1057
1175
|
error: z.string().optional()
|
|
1058
1176
|
});
|
|
1059
|
-
/**
|
|
1177
|
+
/**
|
|
1178
|
+
* Set (create or update) a scoped secret.
|
|
1179
|
+
*
|
|
1180
|
+
* Under the `permissive` posture the browser sends the plaintext `value`.
|
|
1181
|
+
* Under the `encrypted` posture it sends a `sealed` envelope instead (the value
|
|
1182
|
+
* sealed to the orchestrator's X25519 key in the browser). Exactly one of
|
|
1183
|
+
* `value` / `sealed` is present; `value` stays optional for backward
|
|
1184
|
+
* compatibility with older dashboards that only ever send plaintext.
|
|
1185
|
+
*/
|
|
1060
1186
|
const contextSecretSetRequestSchema = z.object({
|
|
1061
1187
|
type: z.literal("dashboard.contexts.secrets.set"),
|
|
1062
1188
|
requestId: z.string(),
|
|
1063
1189
|
actor: actorPrincipalSchema,
|
|
1064
1190
|
scope: z.string(),
|
|
1065
1191
|
key: z.string(),
|
|
1066
|
-
value: z.string()
|
|
1067
|
-
|
|
1192
|
+
value: z.string().optional(),
|
|
1193
|
+
sealed: dashboardSealedEnvelopeSchema.optional()
|
|
1194
|
+
}).refine((m) => m.value === void 0 !== (m.sealed === void 0), { message: "exactly one of value / sealed must be present" });
|
|
1068
1195
|
const contextSecretSetResponseSchema = z.object({
|
|
1069
1196
|
type: z.literal("dashboard.contexts.secrets.set.response"),
|
|
1070
1197
|
requestId: z.string(),
|
|
@@ -1143,15 +1270,9 @@ const contextHistoryResponseSchema = z.object({
|
|
|
1143
1270
|
completedAt: z.coerce.string().nullable(),
|
|
1144
1271
|
context: z.string().nullable()
|
|
1145
1272
|
})).optional(),
|
|
1273
|
+
hasMore: z.boolean().optional(),
|
|
1146
1274
|
error: z.string().optional()
|
|
1147
1275
|
});
|
|
1148
|
-
/** Status values for held runs (approval queue). */
|
|
1149
|
-
const HeldRunStatus = z.enum([
|
|
1150
|
-
"pending",
|
|
1151
|
-
"approved",
|
|
1152
|
-
"rejected",
|
|
1153
|
-
"expired"
|
|
1154
|
-
]);
|
|
1155
1276
|
/** Queue type for held runs. */
|
|
1156
1277
|
const HeldRunQueueType = z.enum(["context", "security"]);
|
|
1157
1278
|
/** List held runs. */
|
|
@@ -1163,6 +1284,14 @@ const heldRunsListRequestSchema = z.object({
|
|
|
1163
1284
|
queueType: HeldRunQueueType.optional(),
|
|
1164
1285
|
runId: z.string().optional(),
|
|
1165
1286
|
/**
|
|
1287
|
+
* Narrow to a single hold by its `held_runs.id`. The Platform's held-run
|
|
1288
|
+
* approval gate uses this to resolve one hold's `holdType` before deciding
|
|
1289
|
+
* which permission the caller needs. Optional so an orchestrator that does
|
|
1290
|
+
* not know the field still answers the request — the Platform then narrows
|
|
1291
|
+
* client-side from the response.
|
|
1292
|
+
*/
|
|
1293
|
+
heldRunId: z.string().optional(),
|
|
1294
|
+
/**
|
|
1166
1295
|
* Target org the read must be scoped to, carried per-request by the Platform
|
|
1167
1296
|
* (the validated `:orgId` path param). The orchestrator honors this over its
|
|
1168
1297
|
* static connection-level org so a Platform-first `kici run remote` org —
|
|
@@ -1182,8 +1311,8 @@ const heldRunsListResponseSchema = z.object({
|
|
|
1182
1311
|
contextId: z.string().nullable(),
|
|
1183
1312
|
contextName: z.string().nullable(),
|
|
1184
1313
|
holdType: z.string(),
|
|
1185
|
-
queueType:
|
|
1186
|
-
status:
|
|
1314
|
+
queueType: z.string(),
|
|
1315
|
+
status: z.string(),
|
|
1187
1316
|
requestedAt: z.coerce.string(),
|
|
1188
1317
|
resolvedAt: z.coerce.string().nullable(),
|
|
1189
1318
|
resolvedBy: z.string().nullable(),
|
|
@@ -1859,11 +1988,13 @@ const testRelayCancelResponseSchema = z.object({
|
|
|
1859
1988
|
const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
1860
1989
|
dashboardRunDetailRequestSchema,
|
|
1861
1990
|
dashboardRunStructuredRequestSchema,
|
|
1991
|
+
dashboardRunStateRequestSchema,
|
|
1862
1992
|
dashboardStepLogsRequestSchema,
|
|
1863
1993
|
dashboardAttestationsListRequestSchema,
|
|
1864
1994
|
dashboardAttestationsListAllRequestSchema,
|
|
1865
1995
|
dashboardAttestationGetRequestSchema,
|
|
1866
1996
|
dashboardAttestationRetryRequestSchema,
|
|
1997
|
+
dashboardArtifactsListRequestSchema,
|
|
1867
1998
|
dashboardRunsListRequestSchema,
|
|
1868
1999
|
dashboardRunsFiltersRequestSchema,
|
|
1869
2000
|
dashboardSourcesListRequestSchema,
|
|
@@ -1914,6 +2045,7 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1914
2045
|
backendSyncRequestSchema,
|
|
1915
2046
|
backendTestRequestSchema,
|
|
1916
2047
|
dashboardEventLogListRequestSchema,
|
|
2048
|
+
dashboardEventLogActivityRequestSchema,
|
|
1917
2049
|
dashboardEventLogDetailRequestSchema,
|
|
1918
2050
|
dashboardEventLogPayloadStreamRequestSchema,
|
|
1919
2051
|
dashboardEventDlqListRequestSchema,
|
|
@@ -1933,11 +2065,13 @@ const dashboardPlatformToOrchSchema = z.discriminatedUnion("type", [
|
|
|
1933
2065
|
const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
1934
2066
|
dashboardRunDetailResponseSchema,
|
|
1935
2067
|
dashboardRunStructuredResponseSchema,
|
|
2068
|
+
dashboardRunStateResponseSchema,
|
|
1936
2069
|
dashboardStepLogsResponseSchema,
|
|
1937
2070
|
dashboardAttestationsListResponseSchema,
|
|
1938
2071
|
dashboardAttestationsListAllResponseSchema,
|
|
1939
2072
|
dashboardAttestationGetResponseSchema,
|
|
1940
2073
|
dashboardAttestationRetryResponseSchema,
|
|
2074
|
+
dashboardArtifactsListResponseSchema,
|
|
1941
2075
|
dashboardRunsListResponseSchema,
|
|
1942
2076
|
dashboardRunsFiltersResponseSchema,
|
|
1943
2077
|
dashboardSourcesListResponseSchema,
|
|
@@ -1988,6 +2122,7 @@ const dashboardOrchToPlatformSchema = z.discriminatedUnion("type", [
|
|
|
1988
2122
|
backendSyncResponseSchema,
|
|
1989
2123
|
backendTestResponseSchema,
|
|
1990
2124
|
dashboardEventLogListResponseSchema,
|
|
2125
|
+
dashboardEventLogActivityResponseSchema,
|
|
1991
2126
|
dashboardEventLogDetailResponseSchema,
|
|
1992
2127
|
dashboardEventLogPayloadChunkSchema,
|
|
1993
2128
|
dashboardEventDlqListResponseSchema,
|
|
@@ -2092,13 +2227,21 @@ const runListItemSchema = z.object({
|
|
|
2092
2227
|
localWorkingTree: z.boolean(),
|
|
2093
2228
|
source: runListSourceSchema.nullable()
|
|
2094
2229
|
});
|
|
2095
|
-
/**
|
|
2230
|
+
/**
|
|
2231
|
+
* Cursor-paginated run list response envelope.
|
|
2232
|
+
*
|
|
2233
|
+
* Keyset (cursor) pagination: `nextCursor` fetches the next (older) page,
|
|
2234
|
+
* `prevCursor` the previous (newer) page — both opaque, `null` when there is no
|
|
2235
|
+
* such page. `hasMore` is true when an older page exists. `approxTotal` is a
|
|
2236
|
+
* cached, approximate match count for the "~N runs" label (not an exact total).
|
|
2237
|
+
*/
|
|
2096
2238
|
const runListResponseSchema = z.object({
|
|
2097
2239
|
runs: z.array(runListItemSchema),
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2240
|
+
nextCursor: z.string().nullable(),
|
|
2241
|
+
prevCursor: z.string().nullable(),
|
|
2242
|
+
hasMore: z.boolean(),
|
|
2243
|
+
approxTotal: z.number(),
|
|
2244
|
+
pageSize: z.number()
|
|
2102
2245
|
});
|
|
2103
2246
|
const diagnosticsInfraAgentSchema = z.object({
|
|
2104
2247
|
agentId: z.string(),
|
|
@@ -2151,11 +2294,25 @@ const diagnosticsInfraOrchestratorSchema = z.object({
|
|
|
2151
2294
|
* Self-reported deployment shape, used by the dashboard to build the correct
|
|
2152
2295
|
* per-orchestrator kici-admin invocation. Orchestrators that never reported
|
|
2153
2296
|
* it serialize as `mode: 'unknown'` with null container fields.
|
|
2297
|
+
*
|
|
2298
|
+
* `adminInvocation` is a shell command, not a pair of raw paths: either half
|
|
2299
|
+
* is single-quoted when its path holds whitespace, so it is rendered verbatim
|
|
2300
|
+
* and a reader that wants the shim path back has to split it as shell words
|
|
2301
|
+
* rather than on the last space.
|
|
2302
|
+
*
|
|
2303
|
+
* `adminPath` is the `windows` counterpart: the RAW, unquoted path of the
|
|
2304
|
+
* `kici-admin.cmd` launcher, null for every other mode and whenever it could
|
|
2305
|
+
* not be located. It is deliberately not a command — cmd.exe runs a
|
|
2306
|
+
* double-quoted path in command position while PowerShell only prints it, so
|
|
2307
|
+
* the renderer has to quote it per shell and a pre-quoted value would take
|
|
2308
|
+
* that choice away.
|
|
2154
2309
|
*/
|
|
2155
2310
|
deployment: z.object({
|
|
2156
2311
|
mode: DeploymentModeSchema,
|
|
2157
2312
|
containerName: z.string().nullable(),
|
|
2158
|
-
containerRuntime: DeploymentContainerRuntimeSchema.nullable()
|
|
2313
|
+
containerRuntime: DeploymentContainerRuntimeSchema.nullable(),
|
|
2314
|
+
adminInvocation: z.string().nullable(),
|
|
2315
|
+
adminPath: z.string().nullable()
|
|
2159
2316
|
}),
|
|
2160
2317
|
s3LogAccess: z.boolean().nullable().optional(),
|
|
2161
2318
|
agentCount: z.number(),
|
|
@@ -2189,6 +2346,16 @@ const diagnosticsInfraOrchestratorSchema = z.object({
|
|
|
2189
2346
|
})).optional(),
|
|
2190
2347
|
error: z.string().optional()
|
|
2191
2348
|
});
|
|
2349
|
+
/**
|
|
2350
|
+
* A single infrastructure health alert.
|
|
2351
|
+
*
|
|
2352
|
+
* Both vocabulary fields are `z.string()` on purpose. `InfraAlertType` and
|
|
2353
|
+
* `InfraAlertSeverity` (`diagnostics/infra-alert.ts`) name the *known*
|
|
2354
|
+
* vocabulary the producer mints from and the read-side consumers colour by; the
|
|
2355
|
+
* wire stays permissive because the `kici` CLI hard-parses this response while
|
|
2356
|
+
* pinned to an older version than the hosted Platform it is talking to. A
|
|
2357
|
+
* strict enum would fail the whole response rather than degrade one row.
|
|
2358
|
+
*/
|
|
2192
2359
|
const diagnosticsInfraAlertSchema = z.object({
|
|
2193
2360
|
type: z.string(),
|
|
2194
2361
|
message: z.string(),
|
|
@@ -2285,6 +2452,6 @@ const DashboardResponseErrorCode = z.enum([
|
|
|
2285
2452
|
"internal_error"
|
|
2286
2453
|
]);
|
|
2287
2454
|
//#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 };
|
|
2455
|
+
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
2456
|
|
|
2290
2457
|
//# 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
|