@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
package/dist/secrets/rbac.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export type Role = 'owner' | 'admin' | 'auditor';
|
|
|
13
13
|
/**
|
|
14
14
|
* Permissions for the secrets management admin API.
|
|
15
15
|
*/
|
|
16
|
-
export type Permission = 'context.create' | 'context.read' | 'context.update' | 'context.delete' | 'secret.read' | 'secret.write' | 'secret.delete' | 'secret.reveal' | 'audit.read' | 'token.manage' | 'key.rotate' | 'run.read' | 'run.cancel' | 'event_log.read' | 'event_log.read_payload' | 'access_log.read' | 'scheduled_job.trigger' | 'event_dlq.read' | 'event_dlq.manage';
|
|
16
|
+
export type Permission = 'context.create' | 'context.read' | 'context.update' | 'context.delete' | 'secret.read' | 'secret.write' | 'secret.delete' | 'secret.reveal' | 'audit.read' | 'token.manage' | 'key.rotate' | 'run.read' | 'run.cancel' | 'event_log.read' | 'event_log.read_payload' | 'access_log.read' | 'scheduled_job.trigger' | 'attestation.retry' | 'event_dlq.read' | 'event_dlq.manage';
|
|
17
17
|
/**
|
|
18
18
|
* Error thrown when a role lacks the required permission.
|
|
19
19
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Secret resolver for dispatch-time secret resolution.
|
|
3
3
|
*
|
|
4
|
-
* Uses
|
|
5
|
-
* When a job dispatches with
|
|
6
|
-
* 1. Looks up the
|
|
7
|
-
* 2. Gets bindings for that
|
|
4
|
+
* Uses context bindings + scope resolver to match secrets from multiple backends.
|
|
5
|
+
* When a job dispatches with a context name, the resolver:
|
|
6
|
+
* 1. Looks up the context by name
|
|
7
|
+
* 2. Gets bindings for that context
|
|
8
8
|
* 3. Queries ALL registered backend stores for secrets
|
|
9
9
|
* 4. Prefixes each secret's scope with the backend name (e.g., pg:aws/prod)
|
|
10
|
-
* 5. Uses
|
|
10
|
+
* 5. Uses resolveSecretsForContext to match bindings against prefixed secrets
|
|
11
11
|
* 6. Returns a flat decrypted key-value map
|
|
12
12
|
*
|
|
13
13
|
* unreachable backends cause job failure (not silent skip).
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
* longest-path-wins uses scope path after stripping backend prefix.
|
|
16
16
|
* audit log includes backend name.
|
|
17
17
|
*/
|
|
18
|
-
import { type
|
|
18
|
+
import { type ContextBinding, type HostFacts, type ScopedSecret } from '@kici-dev/engine';
|
|
19
19
|
import type { Logger } from '@kici-dev/shared';
|
|
20
20
|
import type { AuditLogger } from './audit-logger.js';
|
|
21
21
|
/**
|
|
22
|
-
* Minimal
|
|
22
|
+
* Minimal context store interface (subset needed by resolver).
|
|
23
23
|
*/
|
|
24
|
-
export interface
|
|
24
|
+
export interface ContextStoreLike {
|
|
25
25
|
getByName(orgId: string, name: string): Promise<{
|
|
26
26
|
id: string;
|
|
27
27
|
name: string;
|
|
@@ -32,7 +32,7 @@ export interface EnvironmentStoreLike {
|
|
|
32
32
|
* Minimal binding store interface (subset needed by resolver).
|
|
33
33
|
*/
|
|
34
34
|
export interface BindingStoreLike {
|
|
35
|
-
|
|
35
|
+
getByContextId(contextId: string): Promise<ContextBinding[]>;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Minimal secret store interface (subset needed by resolver).
|
|
@@ -49,7 +49,7 @@ export interface SecretStoreLike {
|
|
|
49
49
|
* Dependencies for the SecretResolver.
|
|
50
50
|
*/
|
|
51
51
|
export interface SecretResolverDeps {
|
|
52
|
-
|
|
52
|
+
contextStore: ContextStoreLike;
|
|
53
53
|
bindingStore: BindingStoreLike;
|
|
54
54
|
/** Map of backend name to store. Replaces single secretStore. */
|
|
55
55
|
backendStores: Map<string, SecretStoreLike>;
|
|
@@ -69,16 +69,16 @@ export interface ResolvedSecretMeta {
|
|
|
69
69
|
* can flow through `ProcessingDeps.secretResolver`.
|
|
70
70
|
*/
|
|
71
71
|
export interface SecretResolverApi {
|
|
72
|
-
resolveForJob(orgId: string,
|
|
72
|
+
resolveForJob(orgId: string, contextName: string, hostCtx?: HostFacts): Promise<Record<string, string>>;
|
|
73
73
|
resolveNamed(orgId: string, scope: string, key: string, opts?: {
|
|
74
74
|
store?: string;
|
|
75
75
|
runId?: string;
|
|
76
76
|
jobId?: string;
|
|
77
77
|
}): Promise<string | null>;
|
|
78
|
-
resolveForJobWithMeta(orgId: string,
|
|
78
|
+
resolveForJobWithMeta(orgId: string, contextName: string, hostCtx?: HostFacts): Promise<Record<string, ResolvedSecretMeta>>;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* Resolves secrets for a job by matching
|
|
81
|
+
* Resolves secrets for a job by matching context bindings against scoped secrets
|
|
82
82
|
* from multiple backends.
|
|
83
83
|
*
|
|
84
84
|
* All backend stores are queried. Each secret's scope is prefixed with the backend
|
|
@@ -87,7 +87,7 @@ export interface SecretResolverApi {
|
|
|
87
87
|
* stripping the backend prefix.
|
|
88
88
|
*/
|
|
89
89
|
export declare class SecretResolver implements SecretResolverApi {
|
|
90
|
-
private readonly
|
|
90
|
+
private readonly contextStore;
|
|
91
91
|
private readonly bindingStore;
|
|
92
92
|
private readonly backendStores;
|
|
93
93
|
private readonly auditLogger;
|
|
@@ -97,17 +97,17 @@ export declare class SecretResolver implements SecretResolverApi {
|
|
|
97
97
|
* Resolve secrets for a job dispatch.
|
|
98
98
|
*
|
|
99
99
|
* @param orgId - Organization ID
|
|
100
|
-
* @param
|
|
100
|
+
* @param contextName - Context name to resolve secrets for
|
|
101
101
|
* @param hostCtx - Optional fan-out child identity for per-host resolution.
|
|
102
102
|
* When supplied, each binding is gated by its `host_pattern` and its
|
|
103
103
|
* `scope_pattern` is templated per-child; when omitted, only fleet-wide
|
|
104
104
|
* (`'**'`) non-templated bindings contribute.
|
|
105
105
|
* @returns Flat map of decrypted secret key-value pairs
|
|
106
106
|
*/
|
|
107
|
-
resolveForJob(orgId: string,
|
|
107
|
+
resolveForJob(orgId: string, contextName: string, hostCtx?: HostFacts): Promise<Record<string, string>>;
|
|
108
108
|
/**
|
|
109
109
|
* Resolve a single named secret by (orgId, scope, key), optionally scoped to
|
|
110
|
-
* a specific backend. Bypasses
|
|
110
|
+
* a specific backend. Bypasses context bindings — this is a direct
|
|
111
111
|
* lookup used for source-scoped credentials (e.g. universal-git PAT/SSH
|
|
112
112
|
* keys stored under `__source__/<sourceId>`).
|
|
113
113
|
*
|
|
@@ -130,7 +130,7 @@ export declare class SecretResolver implements SecretResolverApi {
|
|
|
130
130
|
*
|
|
131
131
|
* Returns the secret value along with which backend and scope provided it.
|
|
132
132
|
*/
|
|
133
|
-
resolveForJobWithMeta(orgId: string,
|
|
133
|
+
resolveForJobWithMeta(orgId: string, contextName: string, hostCtx?: HostFacts): Promise<Record<string, ResolvedSecretMeta>>;
|
|
134
134
|
/**
|
|
135
135
|
* Collect all secrets from all backend stores, prefixing scopes.
|
|
136
136
|
* Per /: unreachable backends are tracked but not fatal here.
|
|
@@ -142,7 +142,7 @@ export declare class SecretResolver implements SecretResolverApi {
|
|
|
142
142
|
*/
|
|
143
143
|
private buildDecryptFn;
|
|
144
144
|
/**
|
|
145
|
-
* Check if any failed backend could affect the job's
|
|
145
|
+
* Check if any failed backend could affect the job's context bindings.
|
|
146
146
|
* throw when a failed backend's scopes could match a binding and
|
|
147
147
|
* no healthy backend already satisfies that binding.
|
|
148
148
|
* jobs referencing only healthy backends succeed normally.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* approval/rejection of security holds. Verifies commenter identity
|
|
6
6
|
* via the trust policy cache and checks ci_trust:write+ before acting.
|
|
7
7
|
*/
|
|
8
|
-
import type { HeldRunStore } from '../
|
|
8
|
+
import type { HeldRunStore } from '../contexts/held-runs.js';
|
|
9
9
|
import { type IdentityLink, type PermissionLevel } from './trust-resolver.js';
|
|
10
10
|
import type { CheckStatusPoster as EngineCheckStatusPoster } from '@kici-dev/engine';
|
|
11
11
|
/** Parsed /kici command from a comment body. */
|