@kici-dev/orchestrator 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/agent/token-store.d.ts +4 -0
- package/dist/app.d.ts +3 -0
- package/dist/cache/pending-inits.d.ts +3 -2
- package/dist/cli/api-client.d.ts +8 -0
- package/dist/cli/commands/attestations-reverify.d.ts +18 -0
- package/dist/cli/commands/attestations.d.ts +3 -0
- package/dist/cli/commands/shared/versioned-upgrade.d.ts +52 -0
- package/dist/cli.js +2023 -343
- package/dist/config.d.ts +2 -0
- package/dist/dashboard/attestation-filters.d.ts +70 -0
- package/dist/dashboard/handler.d.ts +33 -1
- package/dist/db/migrations/054_local_working_tree.d.ts +15 -0
- package/dist/db/migrations/055_agent_token_mandatory_labels.d.ts +18 -0
- package/dist/db/migrations/056_execution_jobs_environments.d.ts +17 -0
- package/dist/db/migrations/057_step_concurrency.d.ts +4 -0
- package/dist/db/migrations/058_access_log_agent_label.d.ts +4 -0
- package/dist/db/migrations/059_attestation_verdict.d.ts +4 -0
- package/dist/db/migrations/060_run_trigger_actor.d.ts +4 -0
- package/dist/db/types.d.ts +55 -0
- package/dist/environments/protection/aggregate.d.ts +43 -0
- package/dist/environments/protection/satisfiability.d.ts +64 -0
- package/dist/index.js +9 -0
- package/dist/orchestrator-core.d.ts +8 -0
- package/dist/pipeline/dispatch-matched-workflow.d.ts +2 -0
- package/dist/pipeline/flatten-lock-steps.d.ts +11 -0
- package/dist/pipeline/inline-eval.d.ts +2 -1
- package/dist/pipeline/job-environments.d.ts +71 -0
- package/dist/pipeline/manual-schedule.d.ts +22 -0
- package/dist/pipeline/test-pipeline.d.ts +9 -0
- package/dist/provenance/trust-root.d.ts +24 -0
- package/dist/provenance/verify-at-ingest.d.ts +24 -0
- package/dist/reporting/agent-failure-category.d.ts +27 -0
- package/dist/reporting/agent-run-result-mapper.d.ts +13 -0
- package/dist/reporting/execution-tracker.d.ts +22 -2
- package/dist/reporting/run-aggregator.d.ts +161 -0
- package/dist/reporting/step-log-reader.d.ts +39 -0
- package/dist/routes/admin-registrations.d.ts +8 -0
- package/dist/routes/admin-runs.d.ts +7 -0
- package/dist/secrets/index.d.ts +1 -1
- package/dist/server.js +2798 -1148
- package/dist/standalone.js +2627 -1221
- package/dist/storage/loopback-guard.d.ts +49 -0
- package/dist/ws/agent-handler.d.ts +15 -1
- package/dist/ws/platform-client.d.ts +36 -1
- package/installer-image-digests.json +3 -3
- package/package.json +6 -8
- package/sbom.spdx.json +57 -57
- package/dist/secrets/crypto.d.ts +0 -49
|
@@ -19,11 +19,15 @@ export declare class AgentTokenStore {
|
|
|
19
19
|
* Static tokens have no expiry and are intended for manually-registered agents.
|
|
20
20
|
*
|
|
21
21
|
* @param opts.labels - Optional agent labels this token is authorized for.
|
|
22
|
+
* @param opts.mandatoryLabels - Optional taint labels (a Kubernetes-taint-style
|
|
23
|
+
* gate): a static agent registering with this token only accepts a job when
|
|
24
|
+
* every label here appears in the job's required labels. Undefined = no taint.
|
|
22
25
|
* @param opts.createdBy - Optional creator identifier (e.g. "cli:admin").
|
|
23
26
|
* @returns The plaintext token (shown once) and the DB row ID.
|
|
24
27
|
*/
|
|
25
28
|
createStatic(opts: {
|
|
26
29
|
labels?: string[];
|
|
30
|
+
mandatoryLabels?: string[];
|
|
27
31
|
createdBy?: string;
|
|
28
32
|
}): Promise<{
|
|
29
33
|
token: string;
|
package/dist/app.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ import type { PendingBuildTracker } from './cache/index.js';
|
|
|
37
37
|
import type { PendingInitTracker } from './cache/index.js';
|
|
38
38
|
import type { PendingDynamicTracker } from './cache/index.js';
|
|
39
39
|
import type { CacheStorage } from './storage/types.js';
|
|
40
|
+
import type { ProvenanceTrustRoot } from './provenance/trust-root.js';
|
|
40
41
|
import { type CheckRunReporter } from './reporting/check-run-reporter.js';
|
|
41
42
|
import type { ExecutionTracker } from './reporting/execution-tracker.js';
|
|
42
43
|
import type { LogWriter } from './reporting/log-writer.js';
|
|
@@ -108,6 +109,8 @@ export interface AppDependencies {
|
|
|
108
109
|
dispatchCacheRefs?: DispatchCacheRefTracker;
|
|
109
110
|
/** Cache storage backend (S3) for metadata operations on upload completion. */
|
|
110
111
|
cacheStorage?: CacheStorage;
|
|
112
|
+
/** Provenance trust root used to verify build-provenance bundles at ingest. */
|
|
113
|
+
provenanceTrustRoot?: ProvenanceTrustRoot;
|
|
111
114
|
/**
|
|
112
115
|
* Filesystem cache backend handle. Only set when KICI_STORAGE_TYPE is
|
|
113
116
|
* `filesystem`. Drives the /api/v1/cache/blob/* HTTP route that serves and
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The orchestrator dispatches an init job for dynamic environment resolution
|
|
5
5
|
* and waits for the agent to return the resolved field values
|
|
6
|
-
* (
|
|
6
|
+
* (environmentNames, env, concurrencyGroup). The underlying tracker logic lives
|
|
7
7
|
* in `PendingTracker<InitResult>`; this subclass wires the init-specific
|
|
8
8
|
* logger prefix and disconnect error.
|
|
9
9
|
*/
|
|
10
10
|
import { PendingTracker } from './pending-tracker.js';
|
|
11
11
|
export interface InitResult {
|
|
12
|
-
|
|
12
|
+
/** Resolved bound-environment names, in merge order (one per `environments` element). */
|
|
13
|
+
environmentNames?: string[];
|
|
13
14
|
env?: Record<string, string>;
|
|
14
15
|
concurrencyGroup?: string;
|
|
15
16
|
/**
|
package/dist/cli/api-client.d.ts
CHANGED
|
@@ -206,6 +206,7 @@ export declare class AdminApiClient {
|
|
|
206
206
|
revokeToken(id: string): Promise<void>;
|
|
207
207
|
createAgentToken(opts: {
|
|
208
208
|
labels?: string[];
|
|
209
|
+
mandatoryLabels?: string[];
|
|
209
210
|
}): Promise<{
|
|
210
211
|
id: string;
|
|
211
212
|
token: string;
|
|
@@ -373,6 +374,13 @@ export declare class AdminApiClient {
|
|
|
373
374
|
}): Promise<{
|
|
374
375
|
jobs: Array<Record<string, unknown>>;
|
|
375
376
|
}>;
|
|
377
|
+
/**
|
|
378
|
+
* Fetch the machine-first, provenance-tagged structured run result: typed
|
|
379
|
+
* job DAG, per-step exit codes / durations / statuses, derived failure
|
|
380
|
+
* category. Untrusted fields are envelope-tagged; secret values are never
|
|
381
|
+
* returned (only secret-output key names).
|
|
382
|
+
*/
|
|
383
|
+
getRunStructured(runId: string): Promise<Record<string, unknown>>;
|
|
376
384
|
/**
|
|
377
385
|
* Fetch the scrub status of the run's ephemeral key. Never returns the
|
|
378
386
|
* key material itself — only `{ exists, createdAt }`.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Kysely } from 'kysely';
|
|
2
|
+
import type { Database } from '../../db/types.js';
|
|
3
|
+
import type { CacheStorage } from '../../storage/types.js';
|
|
4
|
+
import type { ProvenanceTrustRoot } from '../../provenance/trust-root.js';
|
|
5
|
+
/**
|
|
6
|
+
* Backfill / refresh attestation verdicts. By default it re-evaluates only rows
|
|
7
|
+
* that have no usable verdict yet (`pending` / `unverifiable`) — the rollout
|
|
8
|
+
* path for rows recorded before verify-at-ingest, or before an org configured
|
|
9
|
+
* provenance. With `--all` it re-evaluates every row. Idempotent: re-running
|
|
10
|
+
* over already-verified rows (when `--all`) recomputes the same verdict.
|
|
11
|
+
*/
|
|
12
|
+
export declare function reverifyAttestations(db: Kysely<Database>, trustRoot: ProvenanceTrustRoot, storage: CacheStorage | undefined, opts: {
|
|
13
|
+
all: boolean;
|
|
14
|
+
}): Promise<{
|
|
15
|
+
updated: number;
|
|
16
|
+
scanned: number;
|
|
17
|
+
}>;
|
|
18
|
+
//# sourceMappingURL=attestations-reverify.d.ts.map
|
|
@@ -27,6 +27,7 @@ interface VersionedUpgradeOptions {
|
|
|
27
27
|
yes?: boolean;
|
|
28
28
|
cleanup?: boolean;
|
|
29
29
|
rollback?: boolean;
|
|
30
|
+
pick?: boolean;
|
|
30
31
|
force?: boolean;
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
@@ -74,6 +75,40 @@ export declare function resolveUpgradeTarget(args: {
|
|
|
74
75
|
* - windows: C:\Program Files\KiCI\<name>\
|
|
75
76
|
*/
|
|
76
77
|
export declare function getInstallBase(platform: ServicePlatform, name: string): string;
|
|
78
|
+
/** A choice row for the `--pick` interactive select. */
|
|
79
|
+
export interface PickChoice {
|
|
80
|
+
value: string;
|
|
81
|
+
name: string;
|
|
82
|
+
/** `false` when selectable; a reason string when disabled (inquirer renders it). */
|
|
83
|
+
disabled: boolean | string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Build the interactive `--pick` choices, newest-first (lexicographic, matching
|
|
87
|
+
* the rest of the versioned-directory handling). The currently-active version is
|
|
88
|
+
* labeled `(current)` and disabled so it cannot be selected — picking it would be
|
|
89
|
+
* a no-op restart.
|
|
90
|
+
*/
|
|
91
|
+
export declare function buildPickChoices(versions: string[], current: string | null): PickChoice[];
|
|
92
|
+
/**
|
|
93
|
+
* The versions a `--pick` switch may target: every installed version except the
|
|
94
|
+
* currently-active one. Empty when only the current version (or nothing) is
|
|
95
|
+
* installed — the caller turns that into a "nothing to pick" error.
|
|
96
|
+
*/
|
|
97
|
+
export declare function selectablePickTargets(versions: string[], current: string | null): string[];
|
|
98
|
+
/**
|
|
99
|
+
* Validate that `--pick` is not combined with a source/mode flag it conflicts
|
|
100
|
+
* with. `--pick` activates an already-installed version, so it never downloads
|
|
101
|
+
* (`--from`/`--url`), never takes an explicit `--version`, and is its own mode
|
|
102
|
+
* (not `--rollback`/`--cleanup`). Returns an error message, or null when OK.
|
|
103
|
+
*/
|
|
104
|
+
export declare function checkPickFlagConflicts(opts: {
|
|
105
|
+
pick?: boolean;
|
|
106
|
+
from?: string;
|
|
107
|
+
url?: string;
|
|
108
|
+
version?: string;
|
|
109
|
+
rollback?: boolean;
|
|
110
|
+
cleanup?: boolean;
|
|
111
|
+
}): string | null;
|
|
77
112
|
/**
|
|
78
113
|
* Perform a versioned directory upgrade for a KiCI component.
|
|
79
114
|
*
|
|
@@ -123,5 +158,22 @@ export declare function verifyNpmSourceLaunch(opts: {
|
|
|
123
158
|
force: boolean;
|
|
124
159
|
}): NpmSourceLaunchVerdict;
|
|
125
160
|
export declare function performVersionedUpgrade(component: UpgradeComponent, opts: VersionedUpgradeOptions): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Stop the service, switch the active version pointer to an already-installed
|
|
163
|
+
* versioned directory (atomic symlink on Unix; uninstall→install + version file
|
|
164
|
+
* on Windows), restart, and persist the new `kiciVersion` into the manifest.
|
|
165
|
+
*
|
|
166
|
+
* Shared by `--rollback` (switch to the previous version) and `--pick` (switch
|
|
167
|
+
* to any chosen installed version).
|
|
168
|
+
*/
|
|
169
|
+
export declare function switchToInstalledVersion(args: {
|
|
170
|
+
component: UpgradeComponent;
|
|
171
|
+
platform: ServicePlatform;
|
|
172
|
+
installBase: string;
|
|
173
|
+
config: ServiceConfig;
|
|
174
|
+
manager: ServiceManager;
|
|
175
|
+
resolvedInstance: ResolvedInstance;
|
|
176
|
+
targetVersion: string;
|
|
177
|
+
}): Promise<void>;
|
|
126
178
|
export {};
|
|
127
179
|
//# sourceMappingURL=versioned-upgrade.d.ts.map
|