@kici-dev/engine 0.1.23 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/approval/types.d.ts +1 -1
- package/dist/audit/access-log-policy.d.ts +4 -1
- package/dist/audit/access-log-policy.js +9 -1
- package/dist/audit/activity.d.ts +2 -2
- package/dist/audit/retention-policy.js +2 -0
- package/dist/environment/index.d.ts +2 -0
- package/dist/environment/index.js +3 -1
- package/dist/environment/multi-env.d.ts +30 -0
- package/dist/environment/multi-env.js +38 -0
- package/dist/environment/types.d.ts +8 -2
- package/dist/environment/types.js +18 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +14 -8
- package/dist/inputs/index.d.ts +1 -0
- package/dist/inputs/index.js +2 -1
- package/dist/inputs/schedule.d.ts +19 -0
- package/dist/inputs/schedule.js +33 -0
- package/dist/mcp/tool-schemas.d.ts +41 -0
- package/dist/mcp/tool-schemas.js +49 -0
- package/dist/metrics/metric-catalog.generated.d.ts +20 -0
- package/dist/metrics/metric-catalog.generated.js +24 -0
- package/dist/protocol/messages/access-log.d.ts +29 -15
- package/dist/protocol/messages/access-log.js +3 -1
- package/dist/protocol/messages/actor.d.ts +8 -0
- package/dist/protocol/messages/actor.js +17 -3
- package/dist/protocol/messages/agent-run-result.d.ts +350 -0
- package/dist/protocol/messages/agent-run-result.js +123 -0
- package/dist/protocol/messages/auth.d.ts +2 -0
- package/dist/protocol/messages/auth.js +10 -1
- package/dist/protocol/messages/capabilities.d.ts +2 -0
- package/dist/protocol/messages/capabilities.js +15 -2
- package/dist/protocol/messages/dashboard-global-workflows.d.ts +8 -0
- package/dist/protocol/messages/dashboard.d.ts +1376 -42
- package/dist/protocol/messages/dashboard.js +161 -6
- package/dist/protocol/messages/execution-status.d.ts +52 -1
- package/dist/protocol/messages/execution-status.js +115 -54
- package/dist/protocol/messages/orchestrator-agent.d.ts +21 -5
- package/dist/protocol/messages/orchestrator-agent.js +5 -1
- package/dist/protocol/messages/pat-kind.d.ts +16 -0
- package/dist/protocol/messages/pat-kind.js +17 -0
- package/dist/protocol/messages/peer.d.ts +7 -7
- package/dist/protocol/messages/platform-orchestrator.d.ts +393 -7
- package/dist/protocol/messages/platform-orchestrator.js +3 -3
- package/dist/protocol/messages/run-events.d.ts +5 -1
- package/dist/provider/check-run-conclusion.d.ts +1 -1
- package/dist/trigger/types.d.ts +35 -7
- package/dist/trigger/types.js +7 -2
- package/package.json +1 -1
- package/sbom.spdx.json +5 -5
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../../chunk-BTugEXQM.js";
|
|
2
2
|
import { heartbeatSchema } from "./common.js";
|
|
3
|
-
import { orchCapabilitiesSchema } from "./capabilities.js";
|
|
4
|
-
import { authFailureSchema, authRequestSchema, authSuccessSchema } from "./auth.js";
|
|
5
3
|
import { executionStatusSchema, jobStatusForwardSchema, stateReplaySchema, stepStatusForwardSchema } from "./execution-status.js";
|
|
6
|
-
import { sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema } from "./source-registration.js";
|
|
7
4
|
import { jobContextMessageSchema, runEventMessageSchema } from "./run-events.js";
|
|
5
|
+
import { sourceDeregisterAckSchema, sourceDeregisterSchema, sourceRegistrationAckSchema, sourceRegistrationSchema } from "./source-registration.js";
|
|
8
6
|
import { dashboardPlatformToOrchSchema } from "./dashboard.js";
|
|
7
|
+
import { orchCapabilitiesSchema } from "./capabilities.js";
|
|
8
|
+
import { authFailureSchema, authRequestSchema, authSuccessSchema } from "./auth.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/protocol/messages/platform-orchestrator.ts
|
|
11
11
|
/** Trust policy update pushed from Platform to orchestrator when policy or identity links change. */
|
|
@@ -14,8 +14,8 @@ export declare const runEventMessageSchema: z.ZodObject<{
|
|
|
14
14
|
eventType: z.ZodString;
|
|
15
15
|
timestampMs: z.ZodNumber;
|
|
16
16
|
sourceService: z.ZodEnum<{
|
|
17
|
-
platform: "platform";
|
|
18
17
|
agent: "agent";
|
|
18
|
+
platform: "platform";
|
|
19
19
|
orchestrator: "orchestrator";
|
|
20
20
|
}>;
|
|
21
21
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -125,6 +125,10 @@ export declare const dashboardOrchLogsRequestSchema: z.ZodObject<{
|
|
|
125
125
|
actor: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
126
126
|
type: z.ZodLiteral<"user">;
|
|
127
127
|
sub: z.ZodString;
|
|
128
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
129
|
+
patId: z.ZodString;
|
|
130
|
+
label: z.ZodString;
|
|
131
|
+
}, z.core.$strip>>;
|
|
128
132
|
}, z.core.$strip>, z.ZodObject<{
|
|
129
133
|
type: z.ZodLiteral<"api_key">;
|
|
130
134
|
keyId: z.ZodString;
|
|
@@ -8,8 +8,8 @@ import { z } from 'zod';
|
|
|
8
8
|
export declare const CheckRunConclusion: z.ZodEnum<{
|
|
9
9
|
success: "success";
|
|
10
10
|
cancelled: "cancelled";
|
|
11
|
-
failure: "failure";
|
|
12
11
|
timed_out: "timed_out";
|
|
12
|
+
failure: "failure";
|
|
13
13
|
}>;
|
|
14
14
|
export type CheckRunConclusion = z.infer<typeof CheckRunConclusion>;
|
|
15
15
|
//# sourceMappingURL=check-run-conclusion.d.ts.map
|
package/dist/trigger/types.d.ts
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* Schema version 24: adds LockJob.runsOnPick (deterministic single-host selection).
|
|
20
20
|
* Schema version 25: adds LockStep.retry (step retry policy data subset; retryIf is execution-only).
|
|
21
21
|
* Schema version 26: adds LockJob.includeUninitialized (runsOnAll fans out to declared-but-un-agented hosts, bringing up a temporary init-runner per fresh box).
|
|
22
|
+
* Schema version 27: adds LockScheduleTrigger.inputs (defaults-only schedule dispatch inputs).
|
|
22
23
|
*/
|
|
23
24
|
import { z } from 'zod';
|
|
24
25
|
import type { ProviderType } from '../provider/types.js';
|
|
@@ -27,7 +28,7 @@ import type { InputsDescriptorMap } from '../inputs/descriptor.js';
|
|
|
27
28
|
import { LabelMatcher } from '../labels-match.js';
|
|
28
29
|
import { ExecutionJobStatus } from '../protocol/messages/execution-status.js';
|
|
29
30
|
/** Schema version - increment on breaking changes */
|
|
30
|
-
export declare const SCHEMA_VERSION:
|
|
31
|
+
export declare const SCHEMA_VERSION: 29;
|
|
31
32
|
/**
|
|
32
33
|
* Normalized approval config carried in the lock file. Produced by the compiler
|
|
33
34
|
* from an SDK `approval` at any of the three levels; consumed by the
|
|
@@ -292,6 +293,8 @@ export interface LockScheduleTrigger {
|
|
|
292
293
|
readonly cronExpression: string;
|
|
293
294
|
readonly timezone: string;
|
|
294
295
|
readonly description?: string;
|
|
296
|
+
/** Typed schedule-input descriptors (from `schedule({ inputs })`); defaults-only. */
|
|
297
|
+
readonly inputs?: InputsDescriptorMap;
|
|
295
298
|
}
|
|
296
299
|
/**
|
|
297
300
|
* Lifecycle trigger in lock file.
|
|
@@ -336,6 +339,8 @@ export interface LockRule {
|
|
|
336
339
|
* Minimal representation - agents load full step functions from source.
|
|
337
340
|
*/
|
|
338
341
|
export interface LockStep {
|
|
342
|
+
/** Discriminator for the step union; absent/`'sequential'` is an ordinary step. */
|
|
343
|
+
readonly kind?: 'sequential';
|
|
339
344
|
readonly name: string;
|
|
340
345
|
readonly hasOutputs: boolean;
|
|
341
346
|
/** When true, job proceeds even if this step fails. */
|
|
@@ -358,6 +363,24 @@ export interface LockStep {
|
|
|
358
363
|
/** Normalized approval gate; when set the step pauses for a human approval. */
|
|
359
364
|
readonly approval?: LockApproval;
|
|
360
365
|
}
|
|
366
|
+
/**
|
|
367
|
+
* A concurrent group of sequential steps in the lock file. Children run
|
|
368
|
+
* concurrently behind a join barrier; the group wrapper itself consumes no
|
|
369
|
+
* flat step index (its children carry the indices). No nesting is allowed.
|
|
370
|
+
*/
|
|
371
|
+
export interface LockParallelStep {
|
|
372
|
+
readonly kind: 'parallel';
|
|
373
|
+
readonly name: string;
|
|
374
|
+
/** Cancel in-flight siblings when the first child fails (default true). */
|
|
375
|
+
readonly failFast: boolean;
|
|
376
|
+
/** Maximum children running at once; queued children report `pending`. */
|
|
377
|
+
readonly maxParallel?: number;
|
|
378
|
+
readonly children: readonly LockStep[];
|
|
379
|
+
}
|
|
380
|
+
/** A lock-file entry in a job's `steps` array: an ordinary step or a parallel group. */
|
|
381
|
+
export type LockStepEntry = LockStep | LockParallelStep;
|
|
382
|
+
/** Type guard distinguishing a parallel group from an ordinary lock step. */
|
|
383
|
+
export declare function isLockParallelStep(entry: LockStepEntry): entry is LockParallelStep;
|
|
361
384
|
/**
|
|
362
385
|
* Inline expression value for pure dynamic functions.
|
|
363
386
|
* The compiler serializes pure functions as { _type: 'inline', expression: '(event) => ...' }
|
|
@@ -483,9 +506,9 @@ export type RunsOnAllInput = string | RegExp | readonly (string | RegExp)[] | {
|
|
|
483
506
|
* never return), independent of this policy.
|
|
484
507
|
*/
|
|
485
508
|
export declare const OnUnreachableMode: z.ZodEnum<{
|
|
509
|
+
hold: "hold";
|
|
486
510
|
skip: "skip";
|
|
487
511
|
fail: "fail";
|
|
488
|
-
hold: "hold";
|
|
489
512
|
}>;
|
|
490
513
|
export type OnUnreachableMode = z.infer<typeof OnUnreachableMode>;
|
|
491
514
|
/**
|
|
@@ -538,16 +561,21 @@ export interface LockJob {
|
|
|
538
561
|
readonly needs: readonly (string | NeedsEntry | NeedsGroupEntry)[];
|
|
539
562
|
/** Group names this job depends on (populated by compiler from dynamicGroup refs). */
|
|
540
563
|
readonly dependsOnGroups?: readonly string[];
|
|
541
|
-
readonly steps: readonly
|
|
564
|
+
readonly steps: readonly LockStepEntry[];
|
|
542
565
|
readonly matrix?: LockMatrix;
|
|
543
566
|
readonly include?: readonly Record<string, string>[];
|
|
544
567
|
readonly exclude?: readonly Record<string, string>[];
|
|
545
568
|
readonly rules?: readonly LockRule[];
|
|
546
569
|
readonly description?: string;
|
|
547
|
-
/**
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
570
|
+
/**
|
|
571
|
+
* Deployment environments in merge order. Each entry is a static name or inline
|
|
572
|
+
* expression (pure function); `dynamic` is set when it is a function resolved at
|
|
573
|
+
* two-phase eval. Later entries override earlier ones on name collisions.
|
|
574
|
+
*/
|
|
575
|
+
readonly environments?: ReadonlyArray<{
|
|
576
|
+
value: string | LockInlineValue;
|
|
577
|
+
dynamic: boolean;
|
|
578
|
+
}>;
|
|
551
579
|
/** Static environment variables or inline expression (pure function). */
|
|
552
580
|
readonly env?: Record<string, string> | LockInlineValue;
|
|
553
581
|
/** When true, env is dynamic (function) -- resolved at orchestrator two-phase eval or inline. */
|
package/dist/trigger/types.js
CHANGED
|
@@ -23,9 +23,14 @@ import { z } from "zod";
|
|
|
23
23
|
* Schema version 24: adds LockJob.runsOnPick (deterministic single-host selection).
|
|
24
24
|
* Schema version 25: adds LockStep.retry (step retry policy data subset; retryIf is execution-only).
|
|
25
25
|
* Schema version 26: adds LockJob.includeUninitialized (runsOnAll fans out to declared-but-un-agented hosts, bringing up a temporary init-runner per fresh box).
|
|
26
|
+
* Schema version 27: adds LockScheduleTrigger.inputs (defaults-only schedule dispatch inputs).
|
|
26
27
|
*/
|
|
27
28
|
/** Schema version - increment on breaking changes */
|
|
28
|
-
const SCHEMA_VERSION =
|
|
29
|
+
const SCHEMA_VERSION = 29;
|
|
30
|
+
/** Type guard distinguishing a parallel group from an ordinary lock step. */
|
|
31
|
+
function isLockParallelStep(entry) {
|
|
32
|
+
return entry.kind === "parallel";
|
|
33
|
+
}
|
|
29
34
|
/** Type guard for inline expression values */
|
|
30
35
|
function isLockInlineValue(value) {
|
|
31
36
|
return typeof value === "object" && value !== null && value._type === "inline";
|
|
@@ -115,6 +120,6 @@ function isLockDynamicJobFn(job) {
|
|
|
115
120
|
return job._type === "dynamic";
|
|
116
121
|
}
|
|
117
122
|
//#endregion
|
|
118
|
-
export { NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, RunsOnPick, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockStaticJob, resolveWhenToRunOn };
|
|
123
|
+
export { NeedsEntrySchema, NeedsGroupEntrySchema, NeedsRunOn, NeedsWhen, OnUnreachableMode, RunsOnPick, SCHEMA_VERSION, isLockDynamicJobFn, isLockInlineValue, isLockParallelStep, isLockStaticJob, resolveWhenToRunOn };
|
|
119
124
|
|
|
120
125
|
//# sourceMappingURL=types.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kici-dev/engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"description": "Shared business logic for the KiCI CI/CD stack: protocol, triggers, state machine, and provider interfaces used by the Platform relay, orchestrator, and compiler.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
package/sbom.spdx.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"spdxVersion": "SPDX-2.3",
|
|
3
3
|
"dataLicense": "CC0-1.0",
|
|
4
4
|
"SPDXID": "SPDXRef-DOCUMENT",
|
|
5
|
-
"name": "@kici-dev/engine@0.1.
|
|
6
|
-
"documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.1.
|
|
5
|
+
"name": "@kici-dev/engine@0.1.24",
|
|
6
|
+
"documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.1.24/915641e1-bf02-4cc8-a165-ac232d710e4f",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-06-
|
|
8
|
+
"created": "2026-06-28T16:24:19Z",
|
|
9
9
|
"creators": [
|
|
10
10
|
"Tool: kici-sbom-generator"
|
|
11
11
|
]
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
{
|
|
55
55
|
"SPDXID": "SPDXRef-RootPackage",
|
|
56
56
|
"name": "@kici-dev/engine",
|
|
57
|
-
"versionInfo": "0.1.
|
|
57
|
+
"versionInfo": "0.1.24",
|
|
58
58
|
"downloadLocation": "NOASSERTION",
|
|
59
59
|
"filesAnalyzed": false,
|
|
60
60
|
"licenseConcluded": "NOASSERTION",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
{
|
|
66
66
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
67
67
|
"referenceType": "purl",
|
|
68
|
-
"referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.
|
|
68
|
+
"referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.24"
|
|
69
69
|
}
|
|
70
70
|
],
|
|
71
71
|
"description": "Shared business logic for the KiCI CI/CD stack: protocol, triggers, state machine, and provider interfaces used by the Platform relay, orchestrator, and compiler.",
|