@kici-dev/engine 0.1.13 → 0.1.15
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/README.md +13 -1
- package/dist/audit/access-log-policy.js +12 -0
- package/dist/audit/retention-policy.js +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -7
- package/dist/labels.d.ts +7 -0
- package/dist/labels.js +11 -2
- package/dist/metrics/metric-catalog.generated.d.ts +50 -0
- package/dist/metrics/metric-catalog.generated.js +60 -0
- package/dist/protocol/analytics-events.d.ts +16 -0
- package/dist/protocol/analytics-events.js +20 -0
- package/dist/protocol/dashboard-write-operations.d.ts +4 -1
- package/dist/protocol/dashboard-write-operations.js +11 -1
- package/dist/protocol/messages/access-log.d.ts +16 -0
- package/dist/protocol/messages/access-log.js +3 -0
- package/dist/protocol/messages/actor.d.ts +2 -0
- package/dist/protocol/messages/actor.js +12 -2
- package/dist/protocol/messages/auth.d.ts +1 -0
- package/dist/protocol/messages/capabilities.d.ts +1 -0
- package/dist/protocol/messages/dashboard-global-workflows.d.ts +2 -0
- package/dist/protocol/messages/dashboard.d.ts +685 -6
- package/dist/protocol/messages/dashboard.js +183 -10
- package/dist/protocol/messages/event-log.d.ts +4 -0
- package/dist/protocol/messages/event-log.js +4 -0
- package/dist/protocol/messages/execution-status.d.ts +133 -0
- package/dist/protocol/messages/execution-status.js +83 -3
- package/dist/protocol/messages/orchestrator-agent.d.ts +164 -0
- package/dist/protocol/messages/orchestrator-agent.js +118 -2
- package/dist/protocol/messages/peer.d.ts +13 -0
- package/dist/protocol/messages/peer.js +14 -1
- package/dist/protocol/messages/platform-orchestrator.d.ts +188 -0
- package/dist/protocol/messages/platform-orchestrator.js +3 -55
- package/dist/protocol/messages/run-events.d.ts +1 -0
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.js +2 -1
- package/dist/provider/lock-file-parse-error.d.ts +14 -0
- package/dist/provider/lock-file-parse-error.js +22 -0
- package/dist/trigger/types.d.ts +8 -1
- package/dist/trigger/types.js +3 -1
- package/dist/ws/close-codes.d.ts +7 -0
- package/dist/ws/close-codes.js +8 -1
- package/package.json +15 -8
- package/sbom.spdx.json +5 -5
package/dist/provider/index.js
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown by a LockFileFetcher when a lock file is present at the repo ref but
|
|
3
|
+
* cannot be parsed or validated (empty content, invalid JSON, missing/invalid
|
|
4
|
+
* schemaVersion). Distinct from "not found" (the fetcher returns null) and from
|
|
5
|
+
* transient fetch errors (plain Error). The orchestrator routes this to a
|
|
6
|
+
* `lock_resolution` init-failure run.
|
|
7
|
+
*/
|
|
8
|
+
export declare class LockFileParseError extends Error {
|
|
9
|
+
readonly repoIdentifier: string;
|
|
10
|
+
readonly ref: string;
|
|
11
|
+
readonly name = "LockFileParseError";
|
|
12
|
+
constructor(repoIdentifier: string, ref: string, message: string);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=lock-file-parse-error.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "../chunk-gOLHoazu.js";
|
|
2
|
+
//#region src/provider/lock-file-parse-error.ts
|
|
3
|
+
/**
|
|
4
|
+
* Thrown by a LockFileFetcher when a lock file is present at the repo ref but
|
|
5
|
+
* cannot be parsed or validated (empty content, invalid JSON, missing/invalid
|
|
6
|
+
* schemaVersion). Distinct from "not found" (the fetcher returns null) and from
|
|
7
|
+
* transient fetch errors (plain Error). The orchestrator routes this to a
|
|
8
|
+
* `lock_resolution` init-failure run.
|
|
9
|
+
*/
|
|
10
|
+
var LockFileParseError = class LockFileParseError extends Error {
|
|
11
|
+
name = "LockFileParseError";
|
|
12
|
+
constructor(repoIdentifier, ref, message) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.repoIdentifier = repoIdentifier;
|
|
15
|
+
this.ref = ref;
|
|
16
|
+
Object.setPrototypeOf(this, LockFileParseError.prototype);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { LockFileParseError };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=lock-file-parse-error.js.map
|
package/dist/trigger/types.d.ts
CHANGED
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
* Schema version 9: adds repos/notRepos repo pattern fields to git-event triggers for global workflow matching.
|
|
9
9
|
* Schema version 10: removes notRepos/notPaths fields, negative patterns use ! prefix in repos/paths arrays.
|
|
10
10
|
* Schema version 11: adds LockInlineValue type for pure function inline evaluation.
|
|
11
|
+
* Schema version 14: adds declarative cache specs to LockJob and LockStep.
|
|
12
|
+
* Schema version 15: adds per-job init config(s) to LockJob.
|
|
11
13
|
*/
|
|
12
14
|
import { z } from 'zod';
|
|
13
15
|
import type { ProviderType } from '../provider/types.js';
|
|
14
16
|
/** Schema version - increment on breaking changes */
|
|
15
|
-
export declare const SCHEMA_VERSION:
|
|
17
|
+
export declare const SCHEMA_VERSION: 15;
|
|
16
18
|
/**
|
|
17
19
|
* Source file reference with meaningful path.
|
|
18
20
|
* Format: file is relative path from git root, export uses hash syntax.
|
|
@@ -381,6 +383,8 @@ export interface LockJob {
|
|
|
381
383
|
readonly concurrencyGroup?: string | LockInlineValue;
|
|
382
384
|
/** When true, concurrencyGroup is dynamic (function) -- resolved at orchestrator two-phase eval or inline. */
|
|
383
385
|
readonly dynamicConcurrencyGroup?: boolean;
|
|
386
|
+
/** Total job wall-clock timeout in milliseconds (init + all steps + hooks). Threaded to the agent via jobConfig. */
|
|
387
|
+
readonly timeout?: number;
|
|
384
388
|
/**
|
|
385
389
|
* Resource request and limit for this job.
|
|
386
390
|
* Threaded from SDK `Job.resources` to the orchestrator scaler for cap accounting
|
|
@@ -454,6 +458,8 @@ export interface LockWorkflow {
|
|
|
454
458
|
readonly cancelInProgress?: boolean;
|
|
455
459
|
readonly max?: number;
|
|
456
460
|
};
|
|
461
|
+
/** Whole-run wall-clock timeout in milliseconds. Read by the orchestrator at run creation to set the run deadline. */
|
|
462
|
+
readonly timeout?: number;
|
|
457
463
|
}
|
|
458
464
|
/**
|
|
459
465
|
* Complete lock file structure.
|
|
@@ -470,6 +476,7 @@ export interface LockWorkflow {
|
|
|
470
476
|
* v10 removes notRepos/notPaths fields; negative patterns use ! prefix in repos/paths arrays.
|
|
471
477
|
* v11 adds LockInlineValue type for pure function inline evaluation.
|
|
472
478
|
* v12 adds workflow-level registries and installEnv for private npm registry auth.
|
|
479
|
+
* v13 adds job-level and workflow-level timeout.
|
|
473
480
|
*/
|
|
474
481
|
export interface LockFile {
|
|
475
482
|
readonly schemaVersion: typeof SCHEMA_VERSION;
|
package/dist/trigger/types.js
CHANGED
|
@@ -11,9 +11,11 @@ import { z } from "zod";
|
|
|
11
11
|
* Schema version 9: adds repos/notRepos repo pattern fields to git-event triggers for global workflow matching.
|
|
12
12
|
* Schema version 10: removes notRepos/notPaths fields, negative patterns use ! prefix in repos/paths arrays.
|
|
13
13
|
* Schema version 11: adds LockInlineValue type for pure function inline evaluation.
|
|
14
|
+
* Schema version 14: adds declarative cache specs to LockJob and LockStep.
|
|
15
|
+
* Schema version 15: adds per-job init config(s) to LockJob.
|
|
14
16
|
*/
|
|
15
17
|
/** Schema version - increment on breaking changes */
|
|
16
|
-
const SCHEMA_VERSION =
|
|
18
|
+
const SCHEMA_VERSION = 15;
|
|
17
19
|
/** Type guard for inline expression values */
|
|
18
20
|
function isLockInlineValue(value) {
|
|
19
21
|
return typeof value === "object" && value !== null && value._type === "inline";
|
package/dist/ws/close-codes.d.ts
CHANGED
|
@@ -31,4 +31,11 @@ export declare const WS_CLOSE_PLAN_LIMIT = 4020;
|
|
|
31
31
|
export declare const WS_CLOSE_CLUSTER_NAME_CONFLICT = 4011;
|
|
32
32
|
/** The connection was closed because the requested run was not found. */
|
|
33
33
|
export declare const WS_CLOSE_RUN_NOT_FOUND = 4030;
|
|
34
|
+
/**
|
|
35
|
+
* The connection was closed because a job dispatch went unacknowledged past
|
|
36
|
+
* its deadline. The orchestrator treats the dispatch as lost, requeues the
|
|
37
|
+
* job, and disconnects the unresponsive agent (scaler-managed agents are then
|
|
38
|
+
* destroyed by their normal lifecycle; static agents reconnect and re-sync).
|
|
39
|
+
*/
|
|
40
|
+
export declare const WS_CLOSE_DISPATCH_ACK_TIMEOUT = 4031;
|
|
34
41
|
//# sourceMappingURL=close-codes.d.ts.map
|
package/dist/ws/close-codes.js
CHANGED
|
@@ -33,7 +33,14 @@ const WS_CLOSE_PLAN_LIMIT = 4020;
|
|
|
33
33
|
const WS_CLOSE_CLUSTER_NAME_CONFLICT = 4011;
|
|
34
34
|
/** The connection was closed because the requested run was not found. */
|
|
35
35
|
const WS_CLOSE_RUN_NOT_FOUND = 4030;
|
|
36
|
+
/**
|
|
37
|
+
* The connection was closed because a job dispatch went unacknowledged past
|
|
38
|
+
* its deadline. The orchestrator treats the dispatch as lost, requeues the
|
|
39
|
+
* job, and disconnects the unresponsive agent (scaler-managed agents are then
|
|
40
|
+
* destroyed by their normal lifecycle; static agents reconnect and re-sync).
|
|
41
|
+
*/
|
|
42
|
+
const WS_CLOSE_DISPATCH_ACK_TIMEOUT = 4031;
|
|
36
43
|
//#endregion
|
|
37
|
-
export { WS_CLOSE_AGENT_AUTH_FAILED, WS_CLOSE_AUTH_TIMEOUT, WS_CLOSE_CLUSTER_NAME_CONFLICT, WS_CLOSE_GOING_AWAY, WS_CLOSE_HEARTBEAT_TIMEOUT, WS_CLOSE_INTERNAL_ERROR, WS_CLOSE_INVALID_MESSAGE, WS_CLOSE_PLAN_LIMIT, WS_CLOSE_PROTOCOL_ERROR, WS_CLOSE_RUN_NOT_FOUND, WS_CLOSE_UNAUTHORIZED };
|
|
44
|
+
export { WS_CLOSE_AGENT_AUTH_FAILED, WS_CLOSE_AUTH_TIMEOUT, WS_CLOSE_CLUSTER_NAME_CONFLICT, WS_CLOSE_DISPATCH_ACK_TIMEOUT, WS_CLOSE_GOING_AWAY, WS_CLOSE_HEARTBEAT_TIMEOUT, WS_CLOSE_INTERNAL_ERROR, WS_CLOSE_INVALID_MESSAGE, WS_CLOSE_PLAN_LIMIT, WS_CLOSE_PROTOCOL_ERROR, WS_CLOSE_RUN_NOT_FOUND, WS_CLOSE_UNAUTHORIZED };
|
|
38
45
|
|
|
39
46
|
//# sourceMappingURL=close-codes.js.map
|
package/package.json
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kici-dev/engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
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
|
-
"kici",
|
|
7
6
|
"ci",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
7
|
+
"cicd",
|
|
8
|
+
"continuous-integration",
|
|
10
9
|
"typescript",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"engine",
|
|
14
|
-
"protocol"
|
|
10
|
+
"workflow",
|
|
11
|
+
"engine"
|
|
15
12
|
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/kici-dev/kici-public.git",
|
|
16
|
+
"directory": "packages/engine"
|
|
17
|
+
},
|
|
18
|
+
"bugs": "https://github.com/kici-dev/kici-public/issues",
|
|
16
19
|
"homepage": "https://kici.dev",
|
|
17
20
|
"author": {
|
|
18
21
|
"name": "KiCI",
|
|
@@ -54,6 +57,10 @@
|
|
|
54
57
|
"import": "./dist/protocol/dashboard-write-operations.js",
|
|
55
58
|
"types": "./dist/protocol/dashboard-write-operations.d.ts"
|
|
56
59
|
},
|
|
60
|
+
"./protocol/analytics-events": {
|
|
61
|
+
"import": "./dist/protocol/analytics-events.js",
|
|
62
|
+
"types": "./dist/protocol/analytics-events.d.ts"
|
|
63
|
+
},
|
|
57
64
|
"./protocol/cluster-name": {
|
|
58
65
|
"import": "./dist/protocol/cluster-name.js",
|
|
59
66
|
"types": "./dist/protocol/cluster-name.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.15",
|
|
6
|
+
"documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fengine/0.1.15/f9f3b4dd-cddc-43ee-a94e-621967a6b013",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-
|
|
8
|
+
"created": "2026-06-11T03:03:20Z",
|
|
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.15",
|
|
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.15"
|
|
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.",
|