@kici-dev/engine 0.1.26 → 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 +11 -4
- package/dist/approval/types.js +11 -4
- 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 +20 -11
- package/dist/audit/activity.d.ts +12 -12
- package/dist/audit/retention-policy.js +40 -22
- 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/{environment → context}/host-match.js +1 -1
- package/dist/context/index.d.ts +14 -0
- package/dist/context/index.js +12 -0
- package/dist/context/multi-context.d.ts +30 -0
- package/dist/context/multi-context.js +38 -0
- package/dist/context/scope-name.d.ts +29 -0
- package/dist/context/scope-name.js +49 -0
- package/dist/context/scope-resolver.d.ts +79 -0
- package/dist/{environment → context}/scope-resolver.js +47 -17
- package/dist/{environment → context}/scope-template.js +1 -1
- package/dist/{environment → context}/types.d.ts +25 -22
- package/dist/{environment → context}/types.js +3 -3
- package/dist/dev-ops/operations.d.ts +9 -1
- package/dist/dev-ops/operations.js +37 -20
- package/dist/diagnostics/infra-alert.d.ts +71 -0
- package/dist/diagnostics/infra-alert.js +60 -0
- package/dist/env/environment-allowlist.d.ts +26 -3
- package/dist/env/environment-allowlist.js +35 -1
- package/dist/fanout/materialize.d.ts +16 -0
- package/dist/fanout/materialize.js +34 -5
- package/dist/index.d.ts +16 -7
- package/dist/index.js +38 -23
- 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 -734
- package/dist/metrics/metric-catalog.generated.js +296 -32
- 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 +13 -0
- package/dist/protocol/dashboard-api-errors.js +17 -0
- package/dist/protocol/dashboard-write-operations.d.ts +143 -86
- package/dist/protocol/dashboard-write-operations.js +143 -69
- package/dist/protocol/messages/access-log.d.ts +438 -388
- package/dist/protocol/messages/access-log.js +24 -14
- 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 +74 -64
- package/dist/protocol/messages/agent-run-result.js +1 -1
- 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 +1232 -706
- package/dist/protocol/messages/dashboard.js +387 -220
- 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 +198 -62
- package/dist/protocol/messages/execution-status.js +114 -46
- 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 +603 -258
- 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/session-policy.d.ts +20 -0
- package/dist/protocol/session-policy.js +25 -0
- 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 +178 -47
- package/dist/trigger/types.js +82 -24
- 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 +26 -10
- package/sbom.spdx.json +10 -10
- package/dist/environment/index.d.ts +0 -6
- package/dist/environment/index.js +0 -5
- package/dist/environment/multi-env.d.ts +0 -30
- package/dist/environment/multi-env.js +0 -38
- package/dist/environment/scope-resolver.d.ts +0 -46
- 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
- /package/dist/{environment → context}/host-match.d.ts +0 -0
- /package/dist/{environment → context}/scope-template.d.ts +0 -0
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/** Simulated event shape embedded in test trigger messages. */
|
|
3
|
-
export declare const testEventSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodString;
|
|
5
|
-
action: z.ZodOptional<z.ZodString>;
|
|
6
|
-
targetBranch: z.ZodString;
|
|
7
|
-
sourceBranch: z.ZodOptional<z.ZodString>;
|
|
8
|
-
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
9
|
-
changedFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
/** Test trigger sent by CLI to orchestrator to initiate a test run. */
|
|
12
|
-
export declare const testTriggerSchema: z.ZodObject<{
|
|
13
|
-
type: z.ZodLiteral<"test.trigger">;
|
|
14
|
-
messageId: z.ZodString;
|
|
15
|
-
fixtureId: z.ZodString;
|
|
16
|
-
event: z.ZodObject<{
|
|
17
|
-
type: z.ZodString;
|
|
18
|
-
action: z.ZodOptional<z.ZodString>;
|
|
19
|
-
targetBranch: z.ZodString;
|
|
20
|
-
sourceBranch: z.ZodOptional<z.ZodString>;
|
|
21
|
-
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
22
|
-
changedFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
-
}, z.core.$strip>;
|
|
24
|
-
uploadId: z.ZodOptional<z.ZodString>;
|
|
25
|
-
routingKey: z.ZodString;
|
|
26
|
-
secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
27
|
-
workflowName: z.ZodOptional<z.ZodString>;
|
|
28
|
-
}, z.core.$strip>;
|
|
29
|
-
/** Test trigger response from orchestrator to CLI. */
|
|
30
|
-
export declare const testTriggerResponseSchema: z.ZodObject<{
|
|
31
|
-
type: z.ZodLiteral<"test.trigger.response">;
|
|
32
|
-
messageId: z.ZodString;
|
|
33
|
-
runId: z.ZodString;
|
|
34
|
-
observeUrl: z.ZodString;
|
|
35
|
-
status: z.ZodEnum<{
|
|
36
|
-
accepted: "accepted";
|
|
37
|
-
rejected: "rejected";
|
|
38
|
-
}>;
|
|
39
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
40
|
-
}, z.core.$strip>;
|
|
41
|
-
/** Test cancel request sent by CLI to orchestrator. */
|
|
42
|
-
export declare const testCancelSchema: z.ZodObject<{
|
|
43
|
-
type: z.ZodLiteral<"test.cancel">;
|
|
44
|
-
messageId: z.ZodString;
|
|
45
|
-
runId: z.ZodString;
|
|
46
|
-
}, z.core.$strip>;
|
|
47
|
-
/** Test cancel response from orchestrator to CLI. */
|
|
48
|
-
export declare const testCancelResponseSchema: z.ZodObject<{
|
|
49
|
-
type: z.ZodLiteral<"test.cancel.response">;
|
|
50
|
-
messageId: z.ZodString;
|
|
51
|
-
status: z.ZodEnum<{
|
|
52
|
-
cancelled: "cancelled";
|
|
53
|
-
not_found: "not_found";
|
|
54
|
-
already_complete: "already_complete";
|
|
55
|
-
}>;
|
|
56
|
-
}, z.core.$strip>;
|
|
57
|
-
export type TestTriggerResponse = z.infer<typeof testTriggerResponseSchema>;
|
|
58
|
-
export type TestCancelResponse = z.infer<typeof testCancelResponseSchema>;
|
|
59
|
-
//# sourceMappingURL=test-run.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { ExecutionState, ExecutionEvent } from './types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Error thrown when an invalid state transition is attempted.
|
|
4
|
-
*/
|
|
5
|
-
export declare class InvalidTransitionError extends Error {
|
|
6
|
-
readonly state: ExecutionState;
|
|
7
|
-
readonly event: ExecutionEvent;
|
|
8
|
-
constructor(state: ExecutionState, event: ExecutionEvent);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Attempt a state transition. Returns the new state or throws InvalidTransitionError.
|
|
12
|
-
*
|
|
13
|
-
* Pure function - no internal state.
|
|
14
|
-
*/
|
|
15
|
-
export declare function transition(state: ExecutionState, event: ExecutionEvent): ExecutionState;
|
|
16
|
-
/**
|
|
17
|
-
* Check whether a transition is valid without throwing.
|
|
18
|
-
*
|
|
19
|
-
* Pure function - no internal state.
|
|
20
|
-
*/
|
|
21
|
-
export declare function canTransition(state: ExecutionState, event: ExecutionEvent): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Check whether a state is terminal (no further transitions possible).
|
|
24
|
-
*
|
|
25
|
-
* Pure function - no internal state.
|
|
26
|
-
*/
|
|
27
|
-
export declare function isTerminal(state: ExecutionState): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Get the list of valid events for a given state.
|
|
30
|
-
*
|
|
31
|
-
* Pure function - no internal state.
|
|
32
|
-
*/
|
|
33
|
-
export declare function validEvents(state: ExecutionState): ExecutionEvent[];
|
|
34
|
-
//# sourceMappingURL=machine.d.ts.map
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
|
-
import { TERMINAL_STATES } from "./types.js";
|
|
3
|
-
//#region src/state-machine/machine.ts
|
|
4
|
-
/**
|
|
5
|
-
* Runtime transition table mapping each state to its valid event->nextState pairs.
|
|
6
|
-
* Terminal states have no entries (empty objects).
|
|
7
|
-
*/
|
|
8
|
-
const TRANSITIONS = {
|
|
9
|
-
pending: {
|
|
10
|
-
ENQUEUE: "queued",
|
|
11
|
-
CANCEL: "cancelled",
|
|
12
|
-
SKIP: "skipped",
|
|
13
|
-
HOLD: "held",
|
|
14
|
-
WAIT: "waiting"
|
|
15
|
-
},
|
|
16
|
-
queued: {
|
|
17
|
-
START: "running",
|
|
18
|
-
FAIL: "failed",
|
|
19
|
-
CANCEL: "cancelled"
|
|
20
|
-
},
|
|
21
|
-
running: {
|
|
22
|
-
SUCCEED: "success",
|
|
23
|
-
FAIL: "failed",
|
|
24
|
-
CANCEL: "cancelled",
|
|
25
|
-
CANCEL_GRACEFUL: "cancelling",
|
|
26
|
-
RECOVER: "recovering"
|
|
27
|
-
},
|
|
28
|
-
recovering: {
|
|
29
|
-
START: "running",
|
|
30
|
-
FAIL: "failed",
|
|
31
|
-
CANCEL: "cancelled"
|
|
32
|
-
},
|
|
33
|
-
cancelling: {
|
|
34
|
-
CANCEL_FORCE: "cancelled",
|
|
35
|
-
COMPLETE: "cancelled",
|
|
36
|
-
FAIL: "failed"
|
|
37
|
-
},
|
|
38
|
-
held: {
|
|
39
|
-
APPROVE: "queued",
|
|
40
|
-
REJECT: "cancelled",
|
|
41
|
-
EXPIRE: "cancelled",
|
|
42
|
-
CANCEL: "cancelled"
|
|
43
|
-
},
|
|
44
|
-
waiting: {
|
|
45
|
-
TIMER_DONE: "queued",
|
|
46
|
-
CANCEL: "cancelled"
|
|
47
|
-
},
|
|
48
|
-
success: {},
|
|
49
|
-
failed: {},
|
|
50
|
-
cancelled: {},
|
|
51
|
-
skipped: {}
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Error thrown when an invalid state transition is attempted.
|
|
55
|
-
*/
|
|
56
|
-
var InvalidTransitionError = class extends Error {
|
|
57
|
-
state;
|
|
58
|
-
event;
|
|
59
|
-
constructor(state, event) {
|
|
60
|
-
super(`Invalid transition: cannot apply event '${event}' in state '${state}'`);
|
|
61
|
-
this.name = "InvalidTransitionError";
|
|
62
|
-
this.state = state;
|
|
63
|
-
this.event = event;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Attempt a state transition. Returns the new state or throws InvalidTransitionError.
|
|
68
|
-
*
|
|
69
|
-
* Pure function - no internal state.
|
|
70
|
-
*/
|
|
71
|
-
function transition(state, event) {
|
|
72
|
-
const nextState = TRANSITIONS[state][event];
|
|
73
|
-
if (nextState === void 0) throw new InvalidTransitionError(state, event);
|
|
74
|
-
return nextState;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Check whether a transition is valid without throwing.
|
|
78
|
-
*
|
|
79
|
-
* Pure function - no internal state.
|
|
80
|
-
*/
|
|
81
|
-
function canTransition(state, event) {
|
|
82
|
-
return TRANSITIONS[state][event] !== void 0;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Check whether a state is terminal (no further transitions possible).
|
|
86
|
-
*
|
|
87
|
-
* Pure function - no internal state.
|
|
88
|
-
*/
|
|
89
|
-
function isTerminal(state) {
|
|
90
|
-
return TERMINAL_STATES.includes(state);
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Get the list of valid events for a given state.
|
|
94
|
-
*
|
|
95
|
-
* Pure function - no internal state.
|
|
96
|
-
*/
|
|
97
|
-
function validEvents(state) {
|
|
98
|
-
return Object.keys(TRANSITIONS[state]);
|
|
99
|
-
}
|
|
100
|
-
//#endregion
|
|
101
|
-
export { InvalidTransitionError, canTransition, isTerminal, transition, validEvents };
|
|
102
|
-
|
|
103
|
-
//# sourceMappingURL=machine.js.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Execution states for workflow, job, and step lifecycle tracking.
|
|
3
|
-
*
|
|
4
|
-
* State flow:
|
|
5
|
-
* pending -> queued -> running -> recovering -> running (reconnect)
|
|
6
|
-
* \ \ \-> failed (timeout)
|
|
7
|
-
* \ \ \-> cancelled
|
|
8
|
-
* \ \-> success
|
|
9
|
-
* \ \-> failed
|
|
10
|
-
* \ \-> cancelled (direct, no hooks)
|
|
11
|
-
* \ \-> cancelling (graceful, with hooks)
|
|
12
|
-
* \ \-> cancelled (CANCEL_FORCE or COMPLETE)
|
|
13
|
-
* \ \-> failed (hook failure)
|
|
14
|
-
* \-> failed
|
|
15
|
-
* \-> cancelled
|
|
16
|
-
* pending -> skipped
|
|
17
|
-
* pending -> cancelled
|
|
18
|
-
* pending -> held (protection: reviewer required)
|
|
19
|
-
* pending -> waiting (protection: wait timer)
|
|
20
|
-
* held -> queued (approved)
|
|
21
|
-
* held -> cancelled (rejected / expired)
|
|
22
|
-
* waiting -> queued (timer done)
|
|
23
|
-
* waiting -> cancelled
|
|
24
|
-
*/
|
|
25
|
-
export type ExecutionState = 'pending' | 'queued' | 'running' | 'recovering' | 'cancelling' | 'held' | 'waiting' | 'success' | 'failed' | 'cancelled' | 'skipped';
|
|
26
|
-
/**
|
|
27
|
-
* Events that trigger state transitions.
|
|
28
|
-
*/
|
|
29
|
-
export type ExecutionEvent = 'ENQUEUE' | 'START' | 'SUCCEED' | 'FAIL' | 'CANCEL' | 'CANCEL_GRACEFUL' | 'CANCEL_FORCE' | 'COMPLETE' | 'SKIP' | 'RECOVER' | 'HOLD' | 'APPROVE' | 'REJECT' | 'EXPIRE' | 'WAIT' | 'TIMER_DONE';
|
|
30
|
-
/**
|
|
31
|
-
* States from which no further transitions are possible.
|
|
32
|
-
*/
|
|
33
|
-
export declare const TERMINAL_STATES: readonly ExecutionState[];
|
|
34
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
|
-
//#region src/state-machine/types.ts
|
|
3
|
-
/**
|
|
4
|
-
* States from which no further transitions are possible.
|
|
5
|
-
*/
|
|
6
|
-
const TERMINAL_STATES = [
|
|
7
|
-
"success",
|
|
8
|
-
"failed",
|
|
9
|
-
"cancelled",
|
|
10
|
-
"skipped"
|
|
11
|
-
];
|
|
12
|
-
//#endregion
|
|
13
|
-
export { TERMINAL_STATES };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=types.js.map
|
|
File without changes
|
|
File without changes
|