@kici-dev/orchestrator 0.1.26 → 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/app.d.ts +13 -4
- package/dist/approvals/apply-decision.d.ts +1 -1
- package/dist/approvals/step-approval-bridge.d.ts +1 -1
- package/dist/cache/pending-inits.d.ts +4 -4
- package/dist/cli/api-client.d.ts +29 -4
- package/dist/cli/commands/context.d.ts +25 -0
- package/dist/cli/commands/debug-bundle.d.ts +1 -1
- package/dist/cli/commands/variable.d.ts +6 -6
- package/dist/cli/service/windows.d.ts +6 -0
- package/dist/cli.js +526 -340
- package/dist/config.d.ts +16 -0
- package/dist/contexts/binding-store.d.ts +36 -0
- package/dist/contexts/context-store.d.ts +87 -0
- package/dist/{environments → contexts}/held-runs.d.ts +15 -15
- package/dist/{environments → contexts}/index.d.ts +1 -1
- package/dist/contexts/protection/aggregate.d.ts +43 -0
- package/dist/contexts/protection/branch-gate.d.ts +5 -0
- package/dist/contexts/protection/concurrency-gate.d.ts +7 -0
- package/dist/{environments → contexts}/protection/pipeline.d.ts +3 -3
- package/dist/contexts/protection/reviewer-gate.d.ts +7 -0
- package/dist/{environments → contexts}/protection/satisfiability.d.ts +21 -21
- package/dist/contexts/protection/trust-gate.d.ts +7 -0
- package/dist/contexts/protection/wait-timer-gate.d.ts +7 -0
- package/dist/contexts/variable-store.d.ts +39 -0
- package/dist/dashboard/attestation-filters.d.ts +10 -8
- package/dist/dashboard/handler.d.ts +28 -2
- package/dist/db/migrations/067_environments_to_contexts.d.ts +36 -0
- package/dist/db/migrations/068_request_idempotency.d.ts +17 -0
- package/dist/db/types.d.ts +78 -59
- package/dist/github-app-name-refresher/github-app-name-refresher.d.ts +1 -1
- package/dist/index.js +21 -6
- package/dist/metrics/prometheus.d.ts +2 -0
- package/dist/oidc/id-token-claims.d.ts +63 -0
- package/dist/oidc/jwt.d.ts +15 -0
- package/dist/oidc/local-dev-signer.d.ts +31 -0
- package/dist/oidc/local-mint.d.ts +77 -0
- package/dist/oidc/oidc-mint-registration.d.ts +49 -0
- package/dist/pipeline/decorating-secret-resolver.d.ts +4 -4
- package/dist/pipeline/dispatch-matched-workflow.d.ts +3 -3
- package/dist/pipeline/inline-eval.d.ts +2 -2
- package/dist/pipeline/install-secrets-resolver.d.ts +13 -13
- package/dist/pipeline/{job-environments.d.ts → job-contexts.d.ts} +23 -23
- package/dist/pipeline/manual-schedule.d.ts +8 -1
- package/dist/pipeline/processor.d.ts +6 -6
- package/dist/pipeline/request-idempotency.d.ts +28 -0
- package/dist/pipeline/rerun.d.ts +8 -0
- package/dist/pipeline/resume-workflow.d.ts +1 -1
- package/dist/pipeline/test-pipeline.d.ts +2 -2
- package/dist/provenance/trust-root.d.ts +7 -0
- package/dist/provider-registry.d.ts +8 -0
- package/dist/providers/local/index.d.ts +1 -0
- package/dist/providers/local/local-source-config.d.ts +1 -0
- package/dist/reporting/execution-tracker.d.ts +17 -7
- package/dist/reporting/run-aggregator.d.ts +5 -5
- package/dist/routes/admin-contexts.d.ts +47 -0
- package/dist/routes/admin-registrations.d.ts +2 -2
- package/dist/routes/github-webhook.d.ts +2 -2
- package/dist/secrets/context-secret-resolver.d.ts +30 -0
- package/dist/secrets/index.d.ts +1 -1
- package/dist/secrets/pg-secret-store.d.ts +3 -3
- package/dist/secrets/rbac.d.ts +1 -1
- package/dist/secrets/secret-resolver.d.ts +19 -19
- package/dist/security/comment-handler.d.ts +1 -1
- package/dist/server.js +1770 -1196
- package/dist/stale-detector/stale-run-detector.d.ts +1 -1
- package/dist/standalone.js +1649 -747
- package/dist/storage/blob-routes.d.ts +16 -0
- package/dist/ws/{dashboard-env-handler.d.ts → dashboard-context-handler.d.ts} +15 -15
- package/dist/ws/oidc-token-relay.d.ts +6 -0
- package/installer-image-digests.json +3 -3
- package/package.json +4 -4
- package/sbom.spdx.json +50 -50
- package/dist/cli/commands/environment.d.ts +0 -25
- package/dist/environments/binding-store.d.ts +0 -36
- package/dist/environments/environment-store.d.ts +0 -87
- package/dist/environments/protection/aggregate.d.ts +0 -43
- package/dist/environments/protection/branch-gate.d.ts +0 -5
- package/dist/environments/protection/concurrency-gate.d.ts +0 -7
- package/dist/environments/protection/reviewer-gate.d.ts +0 -7
- package/dist/environments/protection/trust-gate.d.ts +0 -7
- package/dist/environments/protection/wait-timer-gate.d.ts +0 -7
- package/dist/environments/variable-store.d.ts +0 -39
- package/dist/routes/admin-environments.d.ts +0 -47
|
@@ -11,9 +11,25 @@
|
|
|
11
11
|
* filesystem backend is active (`deps.fsCache` truthy in app.ts).
|
|
12
12
|
*/
|
|
13
13
|
import type { Hono } from 'hono';
|
|
14
|
+
/**
|
|
15
|
+
* URL prefix for the filesystem-backend blob transfer route. The app-level
|
|
16
|
+
* webhook body-size cap MUST exempt this prefix: blob PUTs carry internal
|
|
17
|
+
* artifacts (dependency tarballs up to `cacheMaxTarballBytes`, 500MB by
|
|
18
|
+
* default), which the S3 backend uploads direct-to-S3 uncapped. Binding them
|
|
19
|
+
* to the tenant-webhook body limit would 413 legitimate large caches on the
|
|
20
|
+
* filesystem backend. The PUT route below enforces its own `maxUploadBytes`
|
|
21
|
+
* bound instead.
|
|
22
|
+
*/
|
|
23
|
+
export declare const CACHE_BLOB_PATH_PREFIX = "/api/v1/cache/blob/";
|
|
14
24
|
export interface FsCacheRouteDeps {
|
|
15
25
|
basePath: string;
|
|
16
26
|
signingSecret: string;
|
|
27
|
+
/**
|
|
28
|
+
* Upper bound on a single blob PUT, in bytes. Aligned with the dep-cache's
|
|
29
|
+
* `cacheMaxTarballBytes` (500MB default) so the filesystem backend accepts
|
|
30
|
+
* the same artifact sizes the S3 backend does.
|
|
31
|
+
*/
|
|
32
|
+
maxUploadBytes: number;
|
|
17
33
|
}
|
|
18
34
|
/** Mount filesystem-backend cache routes onto an existing Hono app. */
|
|
19
35
|
export declare function registerBlobRoutes(app: Hono, deps: FsCacheRouteDeps): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Dashboard
|
|
2
|
+
* Dashboard context handler for the orchestrator.
|
|
3
3
|
*
|
|
4
|
-
* Responds to dashboard.
|
|
5
|
-
* from Platform by calling the appropriate stores (
|
|
4
|
+
* Responds to dashboard.contexts.* and dashboard.held-runs.* WS messages
|
|
5
|
+
* from Platform by calling the appropriate stores (ContextStore, VariableStore,
|
|
6
6
|
* BindingStore, PgSecretStore) and sending typed responses.
|
|
7
7
|
*
|
|
8
8
|
* Each handler:
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
* 3. Returns a response message with requestId and data (or error)
|
|
12
12
|
*/
|
|
13
13
|
import { type Kysely } from 'kysely';
|
|
14
|
-
import type { HeldRunStore, ReleaseSignal } from '../
|
|
14
|
+
import type { HeldRunStore, ReleaseSignal } from '../contexts/held-runs.js';
|
|
15
15
|
import type { TeamMembershipLookup } from '../approvals/approval-resolver.js';
|
|
16
16
|
import type { DashboardPlatformToOrchMessage } from '@kici-dev/engine';
|
|
17
|
-
import type {
|
|
18
|
-
import type { VariableStore } from '../
|
|
19
|
-
import type { BindingStore } from '../
|
|
17
|
+
import type { ContextStore } from '../contexts/context-store.js';
|
|
18
|
+
import type { VariableStore } from '../contexts/variable-store.js';
|
|
19
|
+
import type { BindingStore } from '../contexts/binding-store.js';
|
|
20
20
|
import type { Database } from '../db/types.js';
|
|
21
21
|
import type { AccessLogWriter } from '../audit/access-log.js';
|
|
22
22
|
/** Secret store interface (subset of PgSecretStore methods used here). */
|
|
@@ -29,12 +29,12 @@ interface SecretStoreForDashboard {
|
|
|
29
29
|
renameScope?(orgId: string, oldScope: string, newScope: string): Promise<void>;
|
|
30
30
|
deleteScope?(orgId: string, scope: string): Promise<void>;
|
|
31
31
|
}
|
|
32
|
-
export interface
|
|
32
|
+
export interface DashboardContextHandlerDeps {
|
|
33
33
|
/** Organization ID for all operations. */
|
|
34
34
|
orgId: string;
|
|
35
35
|
/** Send a response message back to Platform over the WS connection. */
|
|
36
36
|
send: (msg: unknown) => void;
|
|
37
|
-
|
|
37
|
+
contextStore: ContextStore;
|
|
38
38
|
variableStore: VariableStore;
|
|
39
39
|
bindingStore: BindingStore;
|
|
40
40
|
secretStore: SecretStoreForDashboard;
|
|
@@ -72,15 +72,15 @@ export interface ApprovalHandlerDeps {
|
|
|
72
72
|
rejectWorkflow?: (runId: string) => Promise<void>;
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
* Handler for all dashboard
|
|
75
|
+
* Handler for all dashboard context and held run WS messages.
|
|
76
76
|
*
|
|
77
77
|
* Dispatches incoming messages by type and calls the appropriate store.
|
|
78
78
|
*/
|
|
79
|
-
export declare class
|
|
79
|
+
export declare class DashboardContextHandler {
|
|
80
80
|
private readonly deps;
|
|
81
81
|
private routingKey;
|
|
82
82
|
private readonly accessLog;
|
|
83
|
-
constructor(deps:
|
|
83
|
+
constructor(deps: DashboardContextHandlerDeps);
|
|
84
84
|
/** Update the orgId used for all operations (called when resolved from DB). */
|
|
85
85
|
setOrgId(orgId: string): void;
|
|
86
86
|
/** Update the routing key bound to access_log rows. */
|
|
@@ -105,8 +105,8 @@ export declare class DashboardEnvHandler {
|
|
|
105
105
|
handleMessage(msg: DashboardPlatformToOrchMessage): Promise<boolean>;
|
|
106
106
|
private handleEnvList;
|
|
107
107
|
/**
|
|
108
|
-
* Map each
|
|
109
|
-
* its scope bindings. Joins `
|
|
108
|
+
* Map each context id to the distinct secret key names reachable through
|
|
109
|
+
* its scope bindings. Joins `context_bindings` → `scoped_secrets` on the
|
|
110
110
|
* scope pattern, excluding the `__empty__` sentinel. Returns key names only —
|
|
111
111
|
* never values. Scoped to the caller-resolved org (the request's target org,
|
|
112
112
|
* or the connection-level org on the legacy path).
|
|
@@ -159,4 +159,4 @@ export declare class DashboardEnvHandler {
|
|
|
159
159
|
private sendError;
|
|
160
160
|
}
|
|
161
161
|
export {};
|
|
162
|
-
//# sourceMappingURL=dashboard-
|
|
162
|
+
//# sourceMappingURL=dashboard-context-handler.d.ts.map
|
|
@@ -58,6 +58,12 @@ export interface OidcTokenHandlerDeps {
|
|
|
58
58
|
* OIDC audience (config.testMintDeferAudience). Ignored unless `testMode`.
|
|
59
59
|
*/
|
|
60
60
|
testMintDeferAudience?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Test-only: force the *initial* agent mint to defer for this OIDC audience
|
|
63
|
+
* (config.testMintRejectAudience) so a pending row is created, which the
|
|
64
|
+
* retrier then terminally rejects. Ignored unless `testMode`.
|
|
65
|
+
*/
|
|
66
|
+
testMintRejectAudience?: string;
|
|
61
67
|
}
|
|
62
68
|
/**
|
|
63
69
|
* Build the agent.api handler for `OIDC_TOKEN_REQUEST_METHOD`. Validates the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.27",
|
|
3
3
|
"images": {
|
|
4
|
-
"kici-agent": "sha256:
|
|
5
|
-
"kici-orchestrator": "sha256:
|
|
4
|
+
"kici-agent": "sha256:301120d679c7f199df1836bedde1ef896c9742f5212cd70753b84e89df195995",
|
|
5
|
+
"kici-orchestrator": "sha256:03af091cc946da7b037ce048867684d8fcc3528fd1320fa7a408627ad2a55f76"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kici-dev/orchestrator",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "Customer-deployable orchestrator for the KiCI CI/CD stack. Receives webhook events (direct or via Platform relay), matches triggers against the lock file, and dispatches jobs to connected agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"ws": "^8.21.0",
|
|
85
85
|
"yaml": "^2.9.0",
|
|
86
86
|
"zod": "^4.4.3",
|
|
87
|
-
"@kici-dev/
|
|
88
|
-
"@kici-dev/
|
|
87
|
+
"@kici-dev/shared": "0.1.27",
|
|
88
|
+
"@kici-dev/engine": "0.1.27"
|
|
89
89
|
},
|
|
90
90
|
"kici": {
|
|
91
91
|
"metrics": {
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@types/archiver": "^8.0.0",
|
|
100
100
|
"@types/dockerode": "^4.0.1",
|
|
101
101
|
"kysely-ctl": "^0.21.0",
|
|
102
|
-
"@kici-dev/agent": "0.1.
|
|
102
|
+
"@kici-dev/agent": "0.1.27"
|
|
103
103
|
},
|
|
104
104
|
"scripts": {
|
|
105
105
|
"build": "node ../../scripts/build-service.mjs && tsc --emitDeclarationOnly",
|
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/orchestrator@0.1.
|
|
6
|
-
"documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Forchestrator/0.1.
|
|
5
|
+
"name": "@kici-dev/orchestrator@0.1.27",
|
|
6
|
+
"documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Forchestrator/0.1.27/2f6c4db6-3778-40e2-9732-c3fe34e2314d",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-07-
|
|
8
|
+
"created": "2026-07-10T06:04:18Z",
|
|
9
9
|
"creators": [
|
|
10
10
|
"Tool: kici-sbom-generator"
|
|
11
11
|
]
|
|
@@ -1190,9 +1190,9 @@
|
|
|
1190
1190
|
"homepage": "https://ericsmekens.github.io/jsep/tree/master/packages/regex#readme"
|
|
1191
1191
|
},
|
|
1192
1192
|
{
|
|
1193
|
-
"SPDXID": "SPDXRef-Package--kici-dev-core-0.1.
|
|
1193
|
+
"SPDXID": "SPDXRef-Package--kici-dev-core-0.1.27",
|
|
1194
1194
|
"name": "@kici-dev/core",
|
|
1195
|
-
"versionInfo": "0.1.
|
|
1195
|
+
"versionInfo": "0.1.27",
|
|
1196
1196
|
"downloadLocation": "NOASSERTION",
|
|
1197
1197
|
"filesAnalyzed": false,
|
|
1198
1198
|
"licenseConcluded": "NOASSERTION",
|
|
@@ -1203,16 +1203,16 @@
|
|
|
1203
1203
|
{
|
|
1204
1204
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
1205
1205
|
"referenceType": "purl",
|
|
1206
|
-
"referenceLocator": "pkg:npm/%40kici-dev/core@0.1.
|
|
1206
|
+
"referenceLocator": "pkg:npm/%40kici-dev/core@0.1.27"
|
|
1207
1207
|
}
|
|
1208
1208
|
],
|
|
1209
1209
|
"description": "Light shared utilities for the KiCI stack (logging, errors, formatting, crypto, zx init, the TypeScript ESM loader hook). No server-side dependencies.",
|
|
1210
1210
|
"homepage": "https://kici.dev"
|
|
1211
1211
|
},
|
|
1212
1212
|
{
|
|
1213
|
-
"SPDXID": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
1213
|
+
"SPDXID": "SPDXRef-Package--kici-dev-engine-0.1.27",
|
|
1214
1214
|
"name": "@kici-dev/engine",
|
|
1215
|
-
"versionInfo": "0.1.
|
|
1215
|
+
"versionInfo": "0.1.27",
|
|
1216
1216
|
"downloadLocation": "NOASSERTION",
|
|
1217
1217
|
"filesAnalyzed": false,
|
|
1218
1218
|
"licenseConcluded": "NOASSERTION",
|
|
@@ -1223,7 +1223,7 @@
|
|
|
1223
1223
|
{
|
|
1224
1224
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
1225
1225
|
"referenceType": "purl",
|
|
1226
|
-
"referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.
|
|
1226
|
+
"referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.27"
|
|
1227
1227
|
}
|
|
1228
1228
|
],
|
|
1229
1229
|
"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.",
|
|
@@ -1232,7 +1232,7 @@
|
|
|
1232
1232
|
{
|
|
1233
1233
|
"SPDXID": "SPDXRef-RootPackage",
|
|
1234
1234
|
"name": "@kici-dev/orchestrator",
|
|
1235
|
-
"versionInfo": "0.1.
|
|
1235
|
+
"versionInfo": "0.1.27",
|
|
1236
1236
|
"downloadLocation": "NOASSERTION",
|
|
1237
1237
|
"filesAnalyzed": false,
|
|
1238
1238
|
"licenseConcluded": "NOASSERTION",
|
|
@@ -1243,16 +1243,16 @@
|
|
|
1243
1243
|
{
|
|
1244
1244
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
1245
1245
|
"referenceType": "purl",
|
|
1246
|
-
"referenceLocator": "pkg:npm/%40kici-dev/orchestrator@0.1.
|
|
1246
|
+
"referenceLocator": "pkg:npm/%40kici-dev/orchestrator@0.1.27"
|
|
1247
1247
|
}
|
|
1248
1248
|
],
|
|
1249
1249
|
"description": "Customer-deployable orchestrator for the KiCI CI/CD stack. Receives webhook events (direct or via Platform relay), matches triggers against the lock file, and dispatches jobs to connected agents.",
|
|
1250
1250
|
"homepage": "https://kici.dev"
|
|
1251
1251
|
},
|
|
1252
1252
|
{
|
|
1253
|
-
"SPDXID": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
1253
|
+
"SPDXID": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
1254
1254
|
"name": "@kici-dev/shared",
|
|
1255
|
-
"versionInfo": "0.1.
|
|
1255
|
+
"versionInfo": "0.1.27",
|
|
1256
1256
|
"downloadLocation": "NOASSERTION",
|
|
1257
1257
|
"filesAnalyzed": false,
|
|
1258
1258
|
"licenseConcluded": "NOASSERTION",
|
|
@@ -1263,7 +1263,7 @@
|
|
|
1263
1263
|
{
|
|
1264
1264
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
1265
1265
|
"referenceType": "purl",
|
|
1266
|
-
"referenceLocator": "pkg:npm/%40kici-dev/shared@0.1.
|
|
1266
|
+
"referenceLocator": "pkg:npm/%40kici-dev/shared@0.1.27"
|
|
1267
1267
|
}
|
|
1268
1268
|
],
|
|
1269
1269
|
"description": "Shared utilities for the KiCI CI/CD stack — logging, zx setup, crypto, telemetry, health and metrics routes. No business logic.",
|
|
@@ -8201,57 +8201,57 @@
|
|
|
8201
8201
|
"relationshipType": "DEPENDS_ON"
|
|
8202
8202
|
},
|
|
8203
8203
|
{
|
|
8204
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
8204
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.27",
|
|
8205
8205
|
"relatedSpdxElement": "SPDXRef-Package-oxc-transform-0.135.0",
|
|
8206
8206
|
"relationshipType": "DEPENDS_ON"
|
|
8207
8207
|
},
|
|
8208
8208
|
{
|
|
8209
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
8209
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.27",
|
|
8210
8210
|
"relatedSpdxElement": "SPDXRef-Package-picocolors-1.1.1",
|
|
8211
8211
|
"relationshipType": "DEPENDS_ON"
|
|
8212
8212
|
},
|
|
8213
8213
|
{
|
|
8214
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
8214
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.27",
|
|
8215
8215
|
"relatedSpdxElement": "SPDXRef-Package-winston-daily-rotate-file-5.0.0",
|
|
8216
8216
|
"relationshipType": "DEPENDS_ON"
|
|
8217
8217
|
},
|
|
8218
8218
|
{
|
|
8219
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
8219
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.27",
|
|
8220
8220
|
"relatedSpdxElement": "SPDXRef-Package-winston-3.19.0",
|
|
8221
8221
|
"relationshipType": "DEPENDS_ON"
|
|
8222
8222
|
},
|
|
8223
8223
|
{
|
|
8224
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
8224
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.27",
|
|
8225
8225
|
"relatedSpdxElement": "SPDXRef-Package-zod-4.4.3",
|
|
8226
8226
|
"relationshipType": "DEPENDS_ON"
|
|
8227
8227
|
},
|
|
8228
8228
|
{
|
|
8229
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
8229
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.27",
|
|
8230
8230
|
"relatedSpdxElement": "SPDXRef-Package-zx-8.8.5",
|
|
8231
8231
|
"relationshipType": "DEPENDS_ON"
|
|
8232
8232
|
},
|
|
8233
8233
|
{
|
|
8234
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
8234
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.27",
|
|
8235
8235
|
"relatedSpdxElement": "SPDXRef-Package-jose-6.2.3",
|
|
8236
8236
|
"relationshipType": "DEPENDS_ON"
|
|
8237
8237
|
},
|
|
8238
8238
|
{
|
|
8239
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
8239
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.27",
|
|
8240
8240
|
"relatedSpdxElement": "SPDXRef-Package-jsonpath-plus-10.4.0",
|
|
8241
8241
|
"relationshipType": "DEPENDS_ON"
|
|
8242
8242
|
},
|
|
8243
8243
|
{
|
|
8244
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
8244
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.27",
|
|
8245
8245
|
"relatedSpdxElement": "SPDXRef-Package-picomatch-4.0.4",
|
|
8246
8246
|
"relationshipType": "DEPENDS_ON"
|
|
8247
8247
|
},
|
|
8248
8248
|
{
|
|
8249
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
8249
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.27",
|
|
8250
8250
|
"relatedSpdxElement": "SPDXRef-Package-safe-regex-2.1.1",
|
|
8251
8251
|
"relationshipType": "DEPENDS_ON"
|
|
8252
8252
|
},
|
|
8253
8253
|
{
|
|
8254
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
8254
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.27",
|
|
8255
8255
|
"relatedSpdxElement": "SPDXRef-Package-zod-4.4.3",
|
|
8256
8256
|
"relationshipType": "DEPENDS_ON"
|
|
8257
8257
|
},
|
|
@@ -8287,12 +8287,12 @@
|
|
|
8287
8287
|
},
|
|
8288
8288
|
{
|
|
8289
8289
|
"spdxElementId": "SPDXRef-RootPackage",
|
|
8290
|
-
"relatedSpdxElement": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
8290
|
+
"relatedSpdxElement": "SPDXRef-Package--kici-dev-engine-0.1.27",
|
|
8291
8291
|
"relationshipType": "DEPENDS_ON"
|
|
8292
8292
|
},
|
|
8293
8293
|
{
|
|
8294
8294
|
"spdxElementId": "SPDXRef-RootPackage",
|
|
8295
|
-
"relatedSpdxElement": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8295
|
+
"relatedSpdxElement": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8296
8296
|
"relationshipType": "DEPENDS_ON"
|
|
8297
8297
|
},
|
|
8298
8298
|
{
|
|
@@ -8401,112 +8401,112 @@
|
|
|
8401
8401
|
"relationshipType": "DEPENDS_ON"
|
|
8402
8402
|
},
|
|
8403
8403
|
{
|
|
8404
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8404
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8405
8405
|
"relatedSpdxElement": "SPDXRef-Package--aws-sdk-client-s3-3.1064.0",
|
|
8406
8406
|
"relationshipType": "DEPENDS_ON"
|
|
8407
8407
|
},
|
|
8408
8408
|
{
|
|
8409
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8410
|
-
"relatedSpdxElement": "SPDXRef-Package--kici-dev-core-0.1.
|
|
8409
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8410
|
+
"relatedSpdxElement": "SPDXRef-Package--kici-dev-core-0.1.27",
|
|
8411
8411
|
"relationshipType": "DEPENDS_ON"
|
|
8412
8412
|
},
|
|
8413
8413
|
{
|
|
8414
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8414
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8415
8415
|
"relatedSpdxElement": "SPDXRef-Package--opentelemetry-api-1.9.1",
|
|
8416
8416
|
"relationshipType": "DEPENDS_ON"
|
|
8417
8417
|
},
|
|
8418
8418
|
{
|
|
8419
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8419
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8420
8420
|
"relatedSpdxElement": "SPDXRef-Package--opentelemetry-exporter-metrics-otlp-http-0.218.0",
|
|
8421
8421
|
"relationshipType": "DEPENDS_ON"
|
|
8422
8422
|
},
|
|
8423
8423
|
{
|
|
8424
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8424
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8425
8425
|
"relatedSpdxElement": "SPDXRef-Package--opentelemetry-exporter-prometheus-0.218.0",
|
|
8426
8426
|
"relationshipType": "DEPENDS_ON"
|
|
8427
8427
|
},
|
|
8428
8428
|
{
|
|
8429
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8429
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8430
8430
|
"relatedSpdxElement": "SPDXRef-Package--opentelemetry-exporter-trace-otlp-http-0.218.0",
|
|
8431
8431
|
"relationshipType": "DEPENDS_ON"
|
|
8432
8432
|
},
|
|
8433
8433
|
{
|
|
8434
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8434
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8435
8435
|
"relatedSpdxElement": "SPDXRef-Package--opentelemetry-instrumentation-runtime-node-0.31.0",
|
|
8436
8436
|
"relationshipType": "DEPENDS_ON"
|
|
8437
8437
|
},
|
|
8438
8438
|
{
|
|
8439
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8439
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8440
8440
|
"relatedSpdxElement": "SPDXRef-Package--opentelemetry-resources-2.7.1",
|
|
8441
8441
|
"relationshipType": "DEPENDS_ON"
|
|
8442
8442
|
},
|
|
8443
8443
|
{
|
|
8444
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8444
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8445
8445
|
"relatedSpdxElement": "SPDXRef-Package--opentelemetry-sdk-node-0.218.0",
|
|
8446
8446
|
"relationshipType": "DEPENDS_ON"
|
|
8447
8447
|
},
|
|
8448
8448
|
{
|
|
8449
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8449
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8450
8450
|
"relatedSpdxElement": "SPDXRef-Package--opentelemetry-semantic-conventions-1.41.1",
|
|
8451
8451
|
"relationshipType": "DEPENDS_ON"
|
|
8452
8452
|
},
|
|
8453
8453
|
{
|
|
8454
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8454
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8455
8455
|
"relatedSpdxElement": "SPDXRef-Package-archiver-8.0.0",
|
|
8456
8456
|
"relationshipType": "DEPENDS_ON"
|
|
8457
8457
|
},
|
|
8458
8458
|
{
|
|
8459
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8459
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8460
8460
|
"relatedSpdxElement": "SPDXRef-Package-diff-9.0.0",
|
|
8461
8461
|
"relationshipType": "DEPENDS_ON"
|
|
8462
8462
|
},
|
|
8463
8463
|
{
|
|
8464
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8464
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8465
8465
|
"relatedSpdxElement": "SPDXRef-Package-hono-4.12.25",
|
|
8466
8466
|
"relationshipType": "DEPENDS_ON"
|
|
8467
8467
|
},
|
|
8468
8468
|
{
|
|
8469
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8469
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8470
8470
|
"relatedSpdxElement": "SPDXRef-Package-kysely-0.29.2",
|
|
8471
8471
|
"relationshipType": "DEPENDS_ON"
|
|
8472
8472
|
},
|
|
8473
8473
|
{
|
|
8474
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8474
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8475
8475
|
"relatedSpdxElement": "SPDXRef-Package-oxc-transform-0.135.0",
|
|
8476
8476
|
"relationshipType": "DEPENDS_ON"
|
|
8477
8477
|
},
|
|
8478
8478
|
{
|
|
8479
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8479
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8480
8480
|
"relatedSpdxElement": "SPDXRef-Package-pg-8.21.0",
|
|
8481
8481
|
"relationshipType": "DEPENDS_ON"
|
|
8482
8482
|
},
|
|
8483
8483
|
{
|
|
8484
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8484
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8485
8485
|
"relatedSpdxElement": "SPDXRef-Package-picocolors-1.1.1",
|
|
8486
8486
|
"relationshipType": "DEPENDS_ON"
|
|
8487
8487
|
},
|
|
8488
8488
|
{
|
|
8489
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8489
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8490
8490
|
"relatedSpdxElement": "SPDXRef-Package-winston-daily-rotate-file-5.0.0",
|
|
8491
8491
|
"relationshipType": "DEPENDS_ON"
|
|
8492
8492
|
},
|
|
8493
8493
|
{
|
|
8494
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8494
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8495
8495
|
"relatedSpdxElement": "SPDXRef-Package-winston-3.19.0",
|
|
8496
8496
|
"relationshipType": "DEPENDS_ON"
|
|
8497
8497
|
},
|
|
8498
8498
|
{
|
|
8499
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8499
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8500
8500
|
"relatedSpdxElement": "SPDXRef-Package-yaml-2.9.0",
|
|
8501
8501
|
"relationshipType": "DEPENDS_ON"
|
|
8502
8502
|
},
|
|
8503
8503
|
{
|
|
8504
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8504
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8505
8505
|
"relatedSpdxElement": "SPDXRef-Package-zod-4.4.3",
|
|
8506
8506
|
"relationshipType": "DEPENDS_ON"
|
|
8507
8507
|
},
|
|
8508
8508
|
{
|
|
8509
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.
|
|
8509
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-shared-0.1.27",
|
|
8510
8510
|
"relatedSpdxElement": "SPDXRef-Package-zx-8.8.5",
|
|
8511
8511
|
"relationshipType": "DEPENDS_ON"
|
|
8512
8512
|
},
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Environment management CLI commands for kici-admin.
|
|
3
|
-
*
|
|
4
|
-
* environment create — upsert an environment
|
|
5
|
-
* environment bind — bind a scope pattern to an environment
|
|
6
|
-
* environment set-policy — update policy fields (branch, reviewers, timers, trust)
|
|
7
|
-
* environment list — list environments for an org
|
|
8
|
-
* environment show — show a single environment with variables + bindings
|
|
9
|
-
* environment delete — delete an environment (cascades bindings, variables, overrides; held-run history survives; pending held runs block with a clear error, resolved holds do not)
|
|
10
|
-
* environment create-template — create/update an environment template + its seed variables
|
|
11
|
-
*
|
|
12
|
-
* Each command supports two modes (stage-4 pattern from `maintenance.ts`):
|
|
13
|
-
*
|
|
14
|
-
* HTTP mode (default): requires `--url` + `--token`, routes through the
|
|
15
|
-
* orchestrator admin HTTP API at /api/v1/admin/environments.
|
|
16
|
-
*
|
|
17
|
-
* Direct-DB mode: activated when `--database-url` is passed (or
|
|
18
|
-
* KICI_DATABASE_URL / DATABASE_URL is set). Opens its own pool and runs the
|
|
19
|
-
* SQL directly via *Direct helpers in @kici-dev/shared. Used by E2E
|
|
20
|
-
* `globalSetup` helpers that need to seed envs before the orchestrator is up.
|
|
21
|
-
*/
|
|
22
|
-
import type { Command } from 'commander';
|
|
23
|
-
import type { AdminApiClient } from '../api-client.js';
|
|
24
|
-
export declare function registerEnvironmentCommands(program: Command, getClient: () => AdminApiClient): void;
|
|
25
|
-
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Binding store -- scope-to-environment binding CRUD.
|
|
3
|
-
*
|
|
4
|
-
* Bindings map scope patterns (e.g. 'aws/prod/**') to environments,
|
|
5
|
-
* controlling which scoped secrets are available in each environment.
|
|
6
|
-
*/
|
|
7
|
-
import type { Kysely } from 'kysely';
|
|
8
|
-
import type { Database, EnvironmentBinding } from '../db/types.js';
|
|
9
|
-
/**
|
|
10
|
-
* A scope→environment binding with its host selector. `hostPattern` defaults to
|
|
11
|
-
* `'**'` (all hosts) when omitted.
|
|
12
|
-
*/
|
|
13
|
-
export interface BindingInput {
|
|
14
|
-
scopePattern: string;
|
|
15
|
-
hostPattern?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Data access layer for environment bindings.
|
|
19
|
-
*/
|
|
20
|
-
export declare class BindingStore {
|
|
21
|
-
private readonly db;
|
|
22
|
-
constructor(db: Kysely<Database>);
|
|
23
|
-
/** List all bindings for an environment. */
|
|
24
|
-
list(orgId: string, environmentId: string): Promise<EnvironmentBinding[]>;
|
|
25
|
-
/**
|
|
26
|
-
* Replace all bindings for an environment in a transaction.
|
|
27
|
-
*
|
|
28
|
-
* Deletes existing bindings and inserts the new set atomically. Each binding
|
|
29
|
-
* carries a `scopePattern` and an optional `hostPattern` (defaulting to
|
|
30
|
-
* `'**'`). Pass an empty array to clear all bindings.
|
|
31
|
-
*/
|
|
32
|
-
set(orgId: string, environmentId: string, bindings: BindingInput[]): Promise<void>;
|
|
33
|
-
/** Find bindings for an environment (alias for list, used by secret resolver). */
|
|
34
|
-
findBindingsForEnvironment(orgId: string, environmentId: string): Promise<EnvironmentBinding[]>;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=binding-store.d.ts.map
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { type Kysely } from 'kysely';
|
|
2
|
-
import type { Environment as EngineEnvironment } from '@kici-dev/engine';
|
|
3
|
-
import type { Database, Environment } from '../db/types.js';
|
|
4
|
-
/** Thrown by `delete` when pending held runs reference the environment. */
|
|
5
|
-
export declare class EnvironmentDeleteBlockedError extends Error {
|
|
6
|
-
readonly pendingCount: number;
|
|
7
|
-
constructor(pendingCount: number);
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Map a DB environment row (snake_case) to the engine Environment type (camelCase).
|
|
11
|
-
*
|
|
12
|
-
* Kysely returns JSONB columns as strings; this function parses them into arrays.
|
|
13
|
-
*/
|
|
14
|
-
export declare function toEnvironment(row: Environment): EngineEnvironment;
|
|
15
|
-
/** Fields accepted when creating an environment. */
|
|
16
|
-
export interface EnvironmentCreateInput {
|
|
17
|
-
name: string;
|
|
18
|
-
type?: 'fixed' | 'glob';
|
|
19
|
-
globPattern?: string | null;
|
|
20
|
-
branchRestrictions?: string[];
|
|
21
|
-
triggerTypeFilters?: string[];
|
|
22
|
-
repoPatterns?: string[];
|
|
23
|
-
concurrencyLimit?: number | null;
|
|
24
|
-
concurrencyStrategy?: 'queue' | 'cancel-pending';
|
|
25
|
-
concurrencyTimeoutMs?: number;
|
|
26
|
-
requiredReviewers?: string[] | null;
|
|
27
|
-
waitTimerSeconds?: number | null;
|
|
28
|
-
holdExpirySeconds?: number;
|
|
29
|
-
minimumTrust?: 'known' | 'trusted' | null;
|
|
30
|
-
allowLocalExecution?: boolean;
|
|
31
|
-
enabled?: boolean;
|
|
32
|
-
createdBy?: string | null;
|
|
33
|
-
}
|
|
34
|
-
/** Fields accepted when updating an environment. */
|
|
35
|
-
export interface EnvironmentUpdateInput {
|
|
36
|
-
name?: string;
|
|
37
|
-
type?: 'fixed' | 'glob';
|
|
38
|
-
globPattern?: string | null;
|
|
39
|
-
branchRestrictions?: string[];
|
|
40
|
-
triggerTypeFilters?: string[];
|
|
41
|
-
repoPatterns?: string[];
|
|
42
|
-
concurrencyLimit?: number | null;
|
|
43
|
-
concurrencyStrategy?: 'queue' | 'cancel-pending';
|
|
44
|
-
concurrencyTimeoutMs?: number;
|
|
45
|
-
requiredReviewers?: string[] | null;
|
|
46
|
-
waitTimerSeconds?: number | null;
|
|
47
|
-
holdExpirySeconds?: number;
|
|
48
|
-
minimumTrust?: 'known' | 'trusted' | null;
|
|
49
|
-
allowLocalExecution?: boolean;
|
|
50
|
-
enabled?: boolean;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Data access layer for environments.
|
|
54
|
-
*/
|
|
55
|
-
export declare class EnvironmentStore {
|
|
56
|
-
private readonly db;
|
|
57
|
-
constructor(db: Kysely<Database>);
|
|
58
|
-
/** List all environments for an org, ordered by name. */
|
|
59
|
-
list(orgId: string): Promise<Environment[]>;
|
|
60
|
-
/** Get a single environment by org + id. Returns null if not found. */
|
|
61
|
-
get(orgId: string, id: string): Promise<Environment | null>;
|
|
62
|
-
/** Get a single environment by org + name. Returns null if not found. */
|
|
63
|
-
getByName(orgId: string, name: string): Promise<Environment | null>;
|
|
64
|
-
/** Create a new environment. Returns the created row. */
|
|
65
|
-
create(orgId: string, data: EnvironmentCreateInput): Promise<Environment>;
|
|
66
|
-
/** Update an environment. Returns the updated row, or null if not found. */
|
|
67
|
-
update(orgId: string, id: string, updates: EnvironmentUpdateInput): Promise<Environment | null>;
|
|
68
|
-
/**
|
|
69
|
-
* Delete an environment.
|
|
70
|
-
*
|
|
71
|
-
* Bindings, variables, and source overrides cascade away via their FK.
|
|
72
|
-
* Terminal held-run history survives with a null `environment_id` (the FK
|
|
73
|
-
* uses ON DELETE SET NULL). Pending held runs still reference the
|
|
74
|
-
* environment, so deletion is blocked with `EnvironmentDeleteBlockedError`
|
|
75
|
-
* until they are approved or rejected.
|
|
76
|
-
*/
|
|
77
|
-
delete(orgId: string, id: string): Promise<boolean>;
|
|
78
|
-
/**
|
|
79
|
-
* Match an environment name against org environments.
|
|
80
|
-
*
|
|
81
|
-
* First tries exact name match (for fixed environments).
|
|
82
|
-
* If no exact match, scans glob-type environments and uses picomatch.
|
|
83
|
-
* Returns the first matching environment or null.
|
|
84
|
-
*/
|
|
85
|
-
matchEnvironment(orgId: string, name: string): Promise<Environment | null>;
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=environment-store.d.ts.map
|