@kici-dev/engine 0.1.25 → 0.1.27
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 +3 -3
- package/dist/approval/types.js +3 -3
- package/dist/audit/access-log-policy.js +12 -11
- package/dist/audit/retention-policy.js +24 -22
- package/dist/context/host-match.d.ts +25 -0
- package/dist/{environment → context}/host-match.js +1 -1
- package/dist/context/index.d.ts +6 -0
- package/dist/context/index.js +5 -0
- package/dist/context/multi-context.d.ts +30 -0
- package/dist/context/multi-context.js +38 -0
- package/dist/context/scope-resolver.d.ts +46 -0
- package/dist/{environment → context}/scope-resolver.js +6 -6
- package/dist/context/scope-template.d.ts +18 -0
- package/dist/{environment → context}/scope-template.js +1 -1
- package/dist/context/types.d.ts +119 -0
- package/dist/{environment → context}/types.js +3 -3
- package/dist/dev-ops/operations.d.ts +1 -1
- package/dist/dev-ops/operations.js +1 -1
- package/dist/env/environment-allowlist.d.ts +23 -0
- package/dist/env/environment-allowlist.js +35 -1
- package/dist/fanout/materialize.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/metrics/metric-catalog.generated.d.ts +15 -10
- package/dist/metrics/metric-catalog.generated.js +18 -12
- package/dist/protocol/dashboard-api-errors.d.ts +12 -0
- package/dist/protocol/dashboard-api-errors.js +13 -0
- package/dist/protocol/dashboard-write-operations.d.ts +22 -22
- package/dist/protocol/dashboard-write-operations.js +52 -52
- package/dist/protocol/messages/access-log.d.ts +65 -60
- package/dist/protocol/messages/access-log.js +13 -12
- package/dist/protocol/messages/agent-run-result.d.ts +2 -2
- package/dist/protocol/messages/agent-run-result.js +1 -1
- package/dist/protocol/messages/auth.d.ts +7 -7
- package/dist/protocol/messages/capabilities.d.ts +7 -7
- package/dist/protocol/messages/dashboard.d.ts +235 -233
- package/dist/protocol/messages/dashboard.js +191 -191
- package/dist/protocol/messages/execution-status.d.ts +9 -9
- package/dist/protocol/messages/execution-status.js +8 -8
- package/dist/protocol/messages/platform-orchestrator.d.ts +75 -74
- package/dist/protocol/session-policy.d.ts +20 -0
- package/dist/protocol/session-policy.js +25 -0
- package/dist/trigger/types.d.ts +7 -6
- package/dist/trigger/types.js +2 -1
- package/package.json +15 -7
- package/sbom.spdx.json +5 -5
- package/dist/environment/index.js +0 -5
- package/dist/environment/multi-env.js +0 -38
package/dist/trigger/types.d.ts
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
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
22
|
* Schema version 27: adds LockScheduleTrigger.inputs (defaults-only schedule dispatch inputs).
|
|
23
|
+
* Schema version 30: renames job-level `environments` to `contexts`.
|
|
23
24
|
*/
|
|
24
25
|
import { z } from 'zod';
|
|
25
26
|
import type { ProviderType } from '../provider/types.js';
|
|
@@ -28,7 +29,7 @@ import type { InputsDescriptorMap } from '../inputs/descriptor.js';
|
|
|
28
29
|
import { LabelMatcher } from '../labels-match.js';
|
|
29
30
|
import { ExecutionJobStatus } from '../protocol/messages/execution-status.js';
|
|
30
31
|
/** Schema version - increment on breaking changes */
|
|
31
|
-
export declare const SCHEMA_VERSION:
|
|
32
|
+
export declare const SCHEMA_VERSION: 30;
|
|
32
33
|
/**
|
|
33
34
|
* Normalized approval config carried in the lock file. Produced by the compiler
|
|
34
35
|
* from an SDK `approval` at any of the three levels; consumed by the
|
|
@@ -568,11 +569,11 @@ export interface LockJob {
|
|
|
568
569
|
readonly rules?: readonly LockRule[];
|
|
569
570
|
readonly description?: string;
|
|
570
571
|
/**
|
|
571
|
-
*
|
|
572
|
+
* Bound contexts in merge order. Each entry is a static name or inline
|
|
572
573
|
* expression (pure function); `dynamic` is set when it is a function resolved at
|
|
573
574
|
* two-phase eval. Later entries override earlier ones on name collisions.
|
|
574
575
|
*/
|
|
575
|
-
readonly
|
|
576
|
+
readonly contexts?: ReadonlyArray<{
|
|
576
577
|
value: string | LockInlineValue;
|
|
577
578
|
dynamic: boolean;
|
|
578
579
|
}>;
|
|
@@ -622,13 +623,13 @@ export type LockJobOrFactory = LockJob | LockDynamicJobFn;
|
|
|
622
623
|
/**
|
|
623
624
|
* Private npm registry declaration in the lock file.
|
|
624
625
|
* Carries the URL/scope/secret-reference but NOT the resolved token —
|
|
625
|
-
* the orchestrator resolves the token at dispatch time via the per-
|
|
626
|
+
* the orchestrator resolves the token at dispatch time via the per-context
|
|
626
627
|
* secretResolver.resolveForJob path.
|
|
627
628
|
*/
|
|
628
629
|
export interface LockRegistry {
|
|
629
630
|
readonly url: string;
|
|
630
631
|
readonly scope?: string;
|
|
631
|
-
/** Qualified secret reference: `<
|
|
632
|
+
/** Qualified secret reference: `<context>:<secret-name>`. */
|
|
632
633
|
readonly tokenSecret: string;
|
|
633
634
|
readonly alwaysAuth?: boolean;
|
|
634
635
|
}
|
|
@@ -660,7 +661,7 @@ export interface LockWorkflow {
|
|
|
660
661
|
*/
|
|
661
662
|
readonly registries?: readonly LockRegistry[];
|
|
662
663
|
/**
|
|
663
|
-
* Extra qualified secret refs (`<
|
|
664
|
+
* Extra qualified secret refs (`<context>:<secret-name>`) to project as
|
|
664
665
|
* env vars on the install subprocess for use with a customer-committed `.kici/.npmrc`.
|
|
665
666
|
*/
|
|
666
667
|
readonly installEnv?: readonly string[];
|
package/dist/trigger/types.js
CHANGED
|
@@ -24,9 +24,10 @@ import { z } from "zod";
|
|
|
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
26
|
* Schema version 27: adds LockScheduleTrigger.inputs (defaults-only schedule dispatch inputs).
|
|
27
|
+
* Schema version 30: renames job-level `environments` to `contexts`.
|
|
27
28
|
*/
|
|
28
29
|
/** Schema version - increment on breaking changes */
|
|
29
|
-
const SCHEMA_VERSION =
|
|
30
|
+
const SCHEMA_VERSION = 30;
|
|
30
31
|
/** Type guard distinguishing a parallel group from an ordinary lock step. */
|
|
31
32
|
function isLockParallelStep(entry) {
|
|
32
33
|
return entry.kind === "parallel";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kici-dev/engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
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",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"import": "./dist/labels/compile.js",
|
|
54
54
|
"types": "./dist/labels/compile.d.ts"
|
|
55
55
|
},
|
|
56
|
-
"./
|
|
57
|
-
"import": "./dist/
|
|
58
|
-
"types": "./dist/
|
|
56
|
+
"./context/host-match": {
|
|
57
|
+
"import": "./dist/context/host-match.js",
|
|
58
|
+
"types": "./dist/context/host-match.d.ts"
|
|
59
59
|
},
|
|
60
|
-
"./
|
|
61
|
-
"import": "./dist/
|
|
62
|
-
"types": "./dist/
|
|
60
|
+
"./context/scope-template": {
|
|
61
|
+
"import": "./dist/context/scope-template.js",
|
|
62
|
+
"types": "./dist/context/scope-template.d.ts"
|
|
63
63
|
},
|
|
64
64
|
"./protocol/dashboard-global-workflows": {
|
|
65
65
|
"import": "./dist/protocol/dashboard-global-workflows.js",
|
|
@@ -69,6 +69,14 @@
|
|
|
69
69
|
"import": "./dist/protocol/dashboard-write-operations.js",
|
|
70
70
|
"types": "./dist/protocol/dashboard-write-operations.d.ts"
|
|
71
71
|
},
|
|
72
|
+
"./protocol/dashboard-api-errors": {
|
|
73
|
+
"import": "./dist/protocol/dashboard-api-errors.js",
|
|
74
|
+
"types": "./dist/protocol/dashboard-api-errors.d.ts"
|
|
75
|
+
},
|
|
76
|
+
"./protocol/session-policy": {
|
|
77
|
+
"import": "./dist/protocol/session-policy.js",
|
|
78
|
+
"types": "./dist/protocol/session-policy.d.ts"
|
|
79
|
+
},
|
|
72
80
|
"./protocol/analytics-events": {
|
|
73
81
|
"import": "./dist/protocol/analytics-events.js",
|
|
74
82
|
"types": "./dist/protocol/analytics-events.d.ts"
|
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.27",
|
|
6
|
+
"documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.1.27/39ac3307-cb59-412e-8755-43c06127909d",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-07-
|
|
8
|
+
"created": "2026-07-10T06:03:53Z",
|
|
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.27",
|
|
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.27"
|
|
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.",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
|
-
import { TrustTierSchema } from "./types.js";
|
|
3
|
-
import { matchScopePattern, resolveSecretsForEnvironment, stripScopePrefix } from "./scope-resolver.js";
|
|
4
|
-
import { EnvGateRejectReason, mergeOrderedMaps } from "./multi-env.js";
|
|
5
|
-
export { EnvGateRejectReason, TrustTierSchema, matchScopePattern, mergeOrderedMaps, resolveSecretsForEnvironment, stripScopePrefix };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/environment/multi-env.ts
|
|
4
|
-
/**
|
|
5
|
-
* Multi-environment merge helpers shared across the orchestrator dispatch path.
|
|
6
|
-
*
|
|
7
|
-
* A job may bind several deployment environments in order; their resolved
|
|
8
|
-
* secrets/variables are folded last-wins (a later environment's key overrides an
|
|
9
|
-
* earlier one) and their protection gates combine all-must-pass. This module is
|
|
10
|
-
* browser-safe (pure functions + a Zod enum, no Node built-ins) so it can be
|
|
11
|
-
* exported from the engine environment barrel.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Reason a single bound environment rejects a run under all-must-pass
|
|
15
|
-
* aggregation. Used to name which environment and which rule blocked dispatch.
|
|
16
|
-
*/
|
|
17
|
-
const EnvGateRejectReason = z.enum([
|
|
18
|
-
"branch_restricted",
|
|
19
|
-
"trigger_filtered",
|
|
20
|
-
"repo_unmatched",
|
|
21
|
-
"trust_too_low",
|
|
22
|
-
"env_disabled",
|
|
23
|
-
"env_not_found"
|
|
24
|
-
]);
|
|
25
|
-
/**
|
|
26
|
-
* Fold an ordered list of per-environment resolved maps into one. Later entries
|
|
27
|
-
* override earlier keys (last-wins), matching the documented merge order for
|
|
28
|
-
* `environments: [...]`.
|
|
29
|
-
*/
|
|
30
|
-
function mergeOrderedMaps(maps) {
|
|
31
|
-
const out = {};
|
|
32
|
-
for (const m of maps) Object.assign(out, m);
|
|
33
|
-
return out;
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { EnvGateRejectReason, mergeOrderedMaps };
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=multi-env.js.map
|