@kici-dev/orchestrator 0.14.2 → 0.16.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/__test-helpers__/peer-mutual-auth.d.ts +42 -0
- package/dist/__test-helpers__/scratch-db.d.ts +16 -0
- package/dist/agent/host-roster.d.ts +100 -37
- package/dist/agent/registry.d.ts +1 -8
- package/dist/app-on-error.d.ts +1 -1
- package/dist/app.d.ts +4 -2
- package/dist/artifacts/artifact-store.d.ts +0 -2
- package/dist/audit/access-log.d.ts +1 -1
- package/dist/cache/source-cache.d.ts +1 -1
- package/dist/cache/user-cache.d.ts +0 -28
- package/dist/cli/api-client.d.ts +27 -1
- package/dist/cli/commands/access-log.d.ts +1 -1
- package/dist/cli/commands/cold-store-impl.d.ts +7 -84
- package/dist/cli/commands/db.d.ts +1 -0
- package/dist/cli/commands/host.d.ts +3 -0
- package/dist/cli/commands/orchestrator-service/status.d.ts +2 -0
- package/dist/cli/commands/org.d.ts +12 -0
- package/dist/cli/commands/scaler.d.ts +14 -0
- package/dist/cli/commands/secret.d.ts +1 -45
- package/dist/cli/commands/service-health.d.ts +21 -13
- package/dist/cli/commands/shared/cli-action.d.ts +17 -0
- package/dist/cli/commands/shared/db.d.ts +5 -5
- package/dist/cli/commands/shared/org-id.d.ts +5 -0
- package/dist/cli/commands/shared/service-verbs.d.ts +19 -0
- package/dist/cli/commands/shared/table.d.ts +3 -0
- package/dist/cli/commands/shared/unbound-context-warning.d.ts +2 -22
- package/dist/cli/commands/source-manifest.d.ts +3 -3
- package/dist/cli/commands/source.d.ts +23 -0
- package/dist/cli/commands/trust-policy.d.ts +7 -31
- package/dist/cli/join.d.ts +2 -2
- package/dist/cli/kici-admin.d.ts +6 -1
- package/dist/cli/local-github-ingress-url.d.ts +6 -0
- package/dist/cli/root-option-routing.d.ts +46 -0
- package/dist/cli/webhook-url-notes.d.ts +15 -0
- package/dist/cli.js +10667 -8461
- package/dist/cluster/coordinator-credential.d.ts +21 -0
- package/dist/cluster/coordinator.d.ts +2 -2
- package/dist/cluster/index.d.ts +4 -4
- package/dist/cluster/join-client.d.ts +23 -21
- package/dist/cluster/join-handler.d.ts +24 -16
- package/dist/cluster/join-protocol-v2.d.ts +84 -0
- package/dist/cluster/join-token.d.ts +78 -56
- package/dist/cluster/peer-auth-coordinator.d.ts +16 -2
- package/dist/cluster/peer-client.d.ts +99 -5
- package/dist/cluster/peer-crypto.d.ts +60 -3
- package/dist/cluster/peer-discovery.d.ts +67 -0
- package/dist/cluster/peer-forget.d.ts +4 -9
- package/dist/cluster/peer-handler.d.ts +28 -6
- package/dist/cluster/peer-registry.d.ts +15 -1
- package/dist/cluster/peer-request-waiters.d.ts +26 -0
- package/dist/cluster/scaler-orphans-peer.d.ts +4 -9
- package/dist/cluster/scaler-reload-fanout.d.ts +29 -0
- package/dist/cluster/scaler-reload-peer.d.ts +16 -0
- package/dist/cluster/worker-cluster-settings.d.ts +1 -0
- package/dist/cold-store/load-access-log-range.d.ts +3 -3
- package/dist/cold-store/tables/access-log.d.ts +4 -12
- package/dist/cold-store/tables/event-log.d.ts +8 -19
- package/dist/cold-store/tables/execution-jobs.d.ts +7 -24
- package/dist/cold-store/tables/execution-runs.d.ts +6 -20
- package/dist/cold-store/tables/execution-steps.d.ts +8 -26
- package/dist/cold-store/tables/secret-audit-log.d.ts +4 -11
- package/dist/config/env-overlay.d.ts +3 -8
- package/dist/config/reload.d.ts +9 -2
- package/dist/config/schema.d.ts +16 -2
- package/dist/config/types.d.ts +6 -2
- package/dist/config.d.ts +22 -17
- package/dist/contexts/held-runs.d.ts +3 -6
- package/dist/dashboard/cursor.d.ts +12 -0
- package/dist/dashboard/handler.d.ts +5 -12
- package/dist/db/deferred-index-build.d.ts +42 -0
- package/dist/db/deferred-indexes.d.ts +3 -37
- package/dist/db/migrations/100_held_runs_hold_type_vocabulary.d.ts +3 -5
- package/dist/db/migrations/157_host_roster_identity_source.d.ts +21 -0
- package/dist/db/migrations/158_normalize_legacy_values.d.ts +4 -0
- package/dist/db/repos/org-ids-repo.d.ts +87 -0
- package/dist/db/schema-snapshot.generated.d.ts +3 -0
- package/dist/db/types.d.ts +21 -24
- package/dist/fault-injection-types.d.ts +0 -6
- package/dist/git/dispatch-git-auth.d.ts +6 -12
- package/dist/github-app-name-refresher/github-app-name-refresher.d.ts +25 -13
- package/dist/helpers/json.d.ts +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +357 -216
- package/dist/metrics/prometheus.d.ts +0 -5
- package/dist/oidc/id-token-claims.d.ts +1 -1
- package/dist/oidc/resolve-signer.d.ts +2 -4
- package/dist/orchestrator-core.d.ts +10 -3
- package/dist/pipeline/global-eval-round.d.ts +2 -26
- package/dist/pipeline/install-secrets-resolver.d.ts +0 -3
- package/dist/pipeline/manual-schedule.d.ts +1 -7
- package/dist/provenance/dispatch-context.d.ts +5 -7
- package/dist/provenance/pending-attestations-repo.d.ts +1 -1
- package/dist/provenance/trust-root.d.ts +4 -5
- package/dist/provenance/verify-deferred-capture.d.ts +3 -3
- package/dist/provider-registry.d.ts +13 -40
- package/dist/providers/github/manifest.d.ts +58 -7
- package/dist/providers/universal-git/ssh-auth.d.ts +0 -5
- package/dist/reporting/check-run-reporter.d.ts +8 -21
- package/dist/reporting/check-run-summary.d.ts +2 -2
- package/dist/reporting/execution-tracker.d.ts +1 -1
- package/dist/reporting/log-chunk-sink.d.ts +1 -1
- package/dist/reporting/run-summary-fields.d.ts +25 -0
- package/dist/reporting/s3-log-storage.d.ts +2 -2
- package/dist/routes/admin-access-log.d.ts +2 -9
- package/dist/routes/admin-backends.d.ts +2 -9
- package/dist/routes/admin-cluster-name.d.ts +2 -8
- package/dist/routes/admin-cluster-settings.d.ts +2 -8
- package/dist/routes/admin-config.d.ts +0 -3
- package/dist/routes/admin-contexts.d.ts +3 -11
- package/dist/routes/admin-db.d.ts +2 -9
- package/dist/routes/admin-env.d.ts +33 -0
- package/dist/routes/admin-event-dlq.d.ts +2 -9
- package/dist/routes/admin-event-inspect.d.ts +2 -9
- package/dist/routes/admin-event-log.d.ts +2 -9
- package/dist/routes/admin-events.d.ts +3 -13
- package/dist/routes/admin-held-runs.d.ts +2 -8
- package/dist/routes/admin-list-limit.d.ts +3 -0
- package/dist/routes/admin-maintenance.d.ts +2 -9
- package/dist/routes/admin-orchestrator-drain.d.ts +2 -9
- package/dist/routes/admin-org-settings.d.ts +2 -8
- package/dist/routes/admin-orgs.d.ts +27 -0
- package/dist/routes/admin-peer-forget.d.ts +2 -9
- package/dist/routes/admin-queue-execution.d.ts +3 -10
- package/dist/routes/admin-registrations.d.ts +3 -14
- package/dist/routes/admin-runs.d.ts +3 -14
- package/dist/routes/admin-scaler-orphans.d.ts +2 -9
- package/dist/routes/admin-scaler-reload.d.ts +41 -0
- package/dist/routes/admin-scheduled-jobs.d.ts +2 -9
- package/dist/routes/admin-signing-keys.d.ts +2 -9
- package/dist/routes/admin-sources.d.ts +28 -32
- package/dist/routes/admin-trust-policy.d.ts +2 -8
- package/dist/routes/admin.d.ts +29 -30
- package/dist/routes/cluster-join.d.ts +13 -0
- package/dist/routes/github-webhook.d.ts +13 -11
- package/dist/scaler/bare-metal-backend.d.ts +42 -1
- package/dist/scaler/config.d.ts +12 -84
- package/dist/scaler/file-reload.d.ts +48 -0
- package/dist/scaler/manager.d.ts +47 -33
- package/dist/scaler/scaler-state-store.d.ts +5 -0
- package/dist/scaler/types.d.ts +8 -9
- package/dist/secrets/job-secret-gate.d.ts +2 -5
- package/dist/secrets/secret-resolver.d.ts +2 -4
- package/dist/security/trust-policy-gate.d.ts +0 -4
- package/dist/server.d.ts +6 -17
- package/dist/server.js +10933 -10836
- package/dist/sources/source-manager.d.ts +0 -24
- package/dist/sources/webhook-url-resolvers.d.ts +60 -0
- package/dist/standalone.js +10457 -10060
- package/dist/worker/reroute-dispatch.d.ts +1 -0
- package/dist/worker/reroute-spawn-control.d.ts +1 -3
- package/dist/worker-core.d.ts +9 -2
- package/dist/ws/agent-handler.d.ts +3 -3
- package/dist/ws/dashboard-access.d.ts +57 -0
- package/dist/ws/dashboard-backends-handler.d.ts +1 -6
- package/dist/ws/dashboard-context-handler.d.ts +10 -15
- package/dist/ws/dashboard-fleet-handler.d.ts +4 -3
- package/dist/ws/dashboard-fleet-write-handler.d.ts +6 -5
- package/dist/ws/dashboard-global-workflows-handler.d.ts +1 -6
- package/dist/ws/dashboard-registrations-handler.d.ts +1 -7
- package/dist/ws/platform-client.d.ts +94 -327
- package/installer-image-digests.json +3 -3
- package/package.json +4 -4
- package/sbom.spdx.json +53 -53
- package/dist/cache/legacy-prefixes.d.ts +0 -19
- package/dist/cli/commands/agent-service/logs.d.ts +0 -14
- package/dist/cli/commands/agent-service/restart.d.ts +0 -12
- package/dist/cli/commands/agent-service/start.d.ts +0 -12
- package/dist/cli/commands/agent-service/stop.d.ts +0 -12
- package/dist/cli/commands/agent-service/uninstall.d.ts +0 -13
- package/dist/cli/commands/cache.d.ts +0 -51
- package/dist/cli/commands/orchestrator-service/logs.d.ts +0 -14
- package/dist/cli/commands/orchestrator-service/restart.d.ts +0 -12
- package/dist/cli/commands/orchestrator-service/start.d.ts +0 -12
- package/dist/cli/commands/orchestrator-service/stop.d.ts +0 -12
- package/dist/cli/commands/orchestrator-service/uninstall.d.ts +0 -13
- package/dist/git/inherited-secret.d.ts +0 -29
|
@@ -703,11 +703,6 @@ export declare const wsUnsupportedMessageSentTotal: import("@opentelemetry/api")
|
|
|
703
703
|
* `received_type`.
|
|
704
704
|
*/
|
|
705
705
|
export declare const wsNackReceivedTotal: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
706
|
-
/**
|
|
707
|
-
* Feature-gated sends the orchestrator SUPPRESSED because the Platform advertised
|
|
708
|
-
* a capability set that lacks the required flag. Labelled by `capability` + `type`.
|
|
709
|
-
*/
|
|
710
|
-
export declare const wsPlatformCapabilityGapTotal: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
711
706
|
/**
|
|
712
707
|
* Register every queued orchestrator observable gauge on the real meter.
|
|
713
708
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OIDC ID-token claims for orchestrator-side minting — shared by the
|
|
3
3
|
* production orchestrator-owned mint (`orchestrator-mint.ts`) and the local
|
|
4
|
-
* dev-signed identity (`local-mint.ts`).
|
|
4
|
+
* dev-signed identity (`local-mint.ts`). One claim shape, so
|
|
5
5
|
* every bundle carries the exact same claims the agent's statement builder +
|
|
6
6
|
* the engine verifier expect — the cross-check between the in-toto statement
|
|
7
7
|
* and the token claims is identical across all minters. The dev-signed path
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bounded wait for the orchestrator's provenance signer.
|
|
3
3
|
*
|
|
4
|
-
* A mint that arrives before any node has generated the key must
|
|
5
|
-
*
|
|
6
|
-
* orchestrator trust root), so the resolver waits for the key instead of
|
|
7
|
-
* deferring on the first miss. But the wait exists for ONE condition — a
|
|
4
|
+
* A mint that arrives before any node has generated the key must not fail,
|
|
5
|
+
* so the resolver waits for the key instead of deferring on the first miss. But the wait exists for ONE condition — a
|
|
8
6
|
* reconcile that returns `null` because a non-leader is still leaving key
|
|
9
7
|
* creation to the leader. A reconcile that THROWS is a different answer:
|
|
10
8
|
* a signing key sealed under a master key this process does not hold, or `db`
|
|
@@ -31,6 +31,7 @@ import { AgentMetricsAggregator } from './metrics/agent-metrics-aggregator.js';
|
|
|
31
31
|
import { SourceLocationStore } from './app.js';
|
|
32
32
|
import { ExecutionJobStatus, type PeerHeartbeat, type PeerLogsCollectRequest, type PeerToPeerMessage, type InvokeResult } from '@kici-dev/engine';
|
|
33
33
|
import { ScalerManager } from './scaler/index.js';
|
|
34
|
+
import { type ScalerFileReload } from './scaler/file-reload.js';
|
|
34
35
|
import type { ScalerConfig } from './scaler/index.js';
|
|
35
36
|
import type { CacheStorage } from './storage/index.js';
|
|
36
37
|
import { type ProvenanceTrustRoot } from './provenance/trust-root.js';
|
|
@@ -90,9 +91,9 @@ export interface OrchestratorSubsystems {
|
|
|
90
91
|
scalerConfig: ScalerConfig | null;
|
|
91
92
|
cacheStorage: CacheStorage | undefined;
|
|
92
93
|
/**
|
|
93
|
-
* Provenance trust root used to verify build-provenance bundles at ingest
|
|
94
|
-
*
|
|
95
|
-
*
|
|
94
|
+
* Provenance trust root used to verify build-provenance bundles at ingest:
|
|
95
|
+
* the orchestrator's own key set, the local dev plane's signer, or the
|
|
96
|
+
* configured `KICI_PROVENANCE_ISSUER`.
|
|
96
97
|
*/
|
|
97
98
|
provenanceTrustRoot: ProvenanceTrustRoot;
|
|
98
99
|
/**
|
|
@@ -174,6 +175,12 @@ export interface OrchestratorSubsystems {
|
|
|
174
175
|
* in setupCluster).
|
|
175
176
|
*/
|
|
176
177
|
answerPeerForgetRequest: PeerForgetRequestHandler;
|
|
178
|
+
/**
|
|
179
|
+
* Reloads this orchestrator's scaler config (`kici-admin scaler reload`,
|
|
180
|
+
* SIGHUP). Wired into every outgoing PeerClient to answer a
|
|
181
|
+
* peer.scaler.reload.request.
|
|
182
|
+
*/
|
|
183
|
+
scalerFileReload: ScalerFileReload;
|
|
177
184
|
getLocalInventory: () => Omit<PeerHeartbeat, 'type'>;
|
|
178
185
|
broadcastHeartbeatToAllPeers: () => void;
|
|
179
186
|
broadcastAgentTokenRevoke: (tokenId: string) => void;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* This module owns the partition, the grouping, and the dispatch-and-await. The
|
|
17
17
|
* caller decides what to do with the verdicts.
|
|
18
18
|
*/
|
|
19
|
-
import type {
|
|
19
|
+
import type { GlobalEvalCandidateResult, LockJobOrFactory, LockWorkflow, SimulatedEvent, WorkflowDecision } from '@kici-dev/engine';
|
|
20
20
|
import { type GlobalEvalRoundCache } from '../cache/global-eval-round-cache.js';
|
|
21
21
|
import type { PendingGlobalEvalTracker } from '../cache/pending-global-evals.js';
|
|
22
22
|
import type { ClusterSettingsReader } from '../cluster/cluster-settings-reader.js';
|
|
@@ -135,17 +135,12 @@ export interface GlobalEvalAgentRegistry {
|
|
|
135
135
|
arch: string;
|
|
136
136
|
version?: string | null;
|
|
137
137
|
}>;
|
|
138
|
-
/**
|
|
139
|
-
* Every registered agent, busy or idle. Optional so a test double can omit
|
|
140
|
-
* it; without it the up-front result-aware refusal never fires.
|
|
141
|
-
*/
|
|
138
|
+
/** Every registered agent, busy or idle. Optional so a test double can omit it. */
|
|
142
139
|
getAllEntries?(): Iterable<{
|
|
143
140
|
labels: ReadonlySet<string>;
|
|
144
141
|
platform: string;
|
|
145
142
|
arch: string;
|
|
146
143
|
version: string | null;
|
|
147
|
-
/** What the agent advertised on `agent.register`; `null` = supports nothing optional. */
|
|
148
|
-
capabilities: AgentCapabilities | null;
|
|
149
144
|
}>;
|
|
150
145
|
}
|
|
151
146
|
/**
|
|
@@ -226,25 +221,6 @@ export interface GlobalEvalRoundArgs {
|
|
|
226
221
|
* timeout message that says nothing about agent versions.
|
|
227
222
|
*/
|
|
228
223
|
export declare function unsupportedFleetReason(agentRegistry?: GlobalEvalAgentRegistry): string | null;
|
|
229
|
-
/**
|
|
230
|
-
* Why a candidate with a result-aware generator is refused before any round.
|
|
231
|
-
*
|
|
232
|
-
* An agent without the capability runs every generator in the round, a
|
|
233
|
-
* result-aware one included; that generator sees no upstream outputs and
|
|
234
|
-
* returns the wrong jobs.
|
|
235
|
-
*/
|
|
236
|
-
export declare const RESULT_AWARE_UNSUPPORTED_REASON: string;
|
|
237
|
-
/**
|
|
238
|
-
* Why no agent can run a round holding a result-aware generator, or `null`
|
|
239
|
-
* when one might.
|
|
240
|
-
*
|
|
241
|
-
* The same bar as {@link unsupportedFleetReason}: refused only on proof. That
|
|
242
|
-
* means init-runners ARE registered, every one reports a readable version, and
|
|
243
|
-
* none advertises the capability. An empty fleet, a busy capable agent, or an
|
|
244
|
-
* agent whose version cannot be read is not refused — the round queues on the
|
|
245
|
-
* agent-feature label, and a scaler or a registering agent can still serve it.
|
|
246
|
-
*/
|
|
247
|
-
export declare function resultAwareUnsupportedReason(agentRegistry?: GlobalEvalAgentRegistry): string | null;
|
|
248
224
|
/**
|
|
249
225
|
* Narrow one wire verdict into a value the dispatch path can trust.
|
|
250
226
|
*
|
|
@@ -116,9 +116,6 @@ export declare function validateRegistryUrlScheme(url: string, allowHttp: boolea
|
|
|
116
116
|
* it set one, otherwise the `HoldType` member its action implies. Column and
|
|
117
117
|
* gate share one vocabulary, so nothing is translated here.
|
|
118
118
|
*
|
|
119
|
-
* Distinct from the engine's `normalizePersistedHoldType`, which maps a value
|
|
120
|
-
* read back OUT of the column onto that same vocabulary.
|
|
121
|
-
*
|
|
122
119
|
* Exported for tests.
|
|
123
120
|
*/
|
|
124
121
|
export declare function resolveHoldType(action: 'hold' | 'wait' | 'queue', raw: string | undefined): string;
|
|
@@ -41,13 +41,7 @@ export declare function buildManualJobConfig(workflow: LockWorkflow, mat: Materi
|
|
|
41
41
|
source: import("@kici-dev/engine").LockSource | undefined;
|
|
42
42
|
workflowName: string;
|
|
43
43
|
steps: readonly import("@kici-dev/engine").LockStepEntry[];
|
|
44
|
-
needs: readonly (string |
|
|
45
|
-
name: string;
|
|
46
|
-
runOn: ("cancelled" | "cancelling" | "drift_dropped" | "failed" | "pending" | "queued" | "recovering" | "running" | "skipped" | "success" | "timed_out_stale" | "unroutable")[];
|
|
47
|
-
} | {
|
|
48
|
-
group: string;
|
|
49
|
-
runOn: ("cancelled" | "cancelling" | "drift_dropped" | "failed" | "pending" | "queued" | "recovering" | "running" | "skipped" | "success" | "timed_out_stale" | "unroutable")[];
|
|
50
|
-
})[];
|
|
44
|
+
needs: readonly (string | import("@kici-dev/engine").LockNeedsEntry | import("@kici-dev/engine").LockNeedsGroupEntry)[];
|
|
51
45
|
rules: readonly import("@kici-dev/engine").LockRule[] | undefined;
|
|
52
46
|
gitCredentials?: Readonly<Record<string, Readonly<Record<string, string>>>> | undefined;
|
|
53
47
|
dispatchInputs?: Record<string, unknown> | undefined;
|
|
@@ -31,13 +31,11 @@ import type { Database } from '../db/types.js';
|
|
|
31
31
|
* `repository` / `ref` / `sha` / `workflowRef` / `runId` / `jobId`, none of
|
|
32
32
|
* which depends on who signs the token. Only the statement's `builder.id`
|
|
33
33
|
* needs an issuer, and an unset one reproduces the `/orchestrator/unknown`
|
|
34
|
-
* builder the local guess has always recorded.
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* workflow name where the claim is `<name>@<sha>` — and the capture check
|
|
40
|
-
* then refused every one of its deferred attestations.
|
|
34
|
+
* builder the local guess has always recorded. Gating on the issuer would send
|
|
35
|
+
* an orchestrator without one back to the local guess —
|
|
36
|
+
* `repository: 'unknown/unknown'` for a `file://` clone, and a bare workflow
|
|
37
|
+
* name where the claim is `<name>@<sha>` — and the capture check would refuse
|
|
38
|
+
* every one of its deferred attestations.
|
|
41
39
|
*/
|
|
42
40
|
export declare function loadProvenanceContext(db: Kysely<Database>, runId: string, jobId: string, opts: {
|
|
43
41
|
issuer: string | undefined;
|
|
@@ -26,7 +26,7 @@ export declare class PendingAttestationsRepo {
|
|
|
26
26
|
/**
|
|
27
27
|
* List pending rows oldest-first, optionally scoped to a run. Terminally
|
|
28
28
|
* rejected rows (`rejected_at IS NOT NULL`) are excluded — the retrier never
|
|
29
|
-
* re-picks a row the
|
|
29
|
+
* re-picks a row the orchestrator definitively cannot mint.
|
|
30
30
|
*/
|
|
31
31
|
list(opts?: {
|
|
32
32
|
runId?: string;
|
|
@@ -6,15 +6,14 @@ import type { JSONWebKeySet } from 'jose';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function deriveJwksUri(issuer: string): string;
|
|
8
8
|
/**
|
|
9
|
-
* The orchestrator's view of the provenance trust root. The issuer
|
|
10
|
-
* the
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* The orchestrator's view of the provenance trust root. The issuer is fixed at
|
|
10
|
+
* construction: the orchestrator's own signing issuer, the local dev plane's
|
|
11
|
+
* `kici-local`, or the configured `KICI_PROVENANCE_ISSUER`. The JWKS is fetched
|
|
12
|
+
* lazily and cached with a single refetch-on-`kid`-miss.
|
|
13
13
|
*/
|
|
14
14
|
export interface ProvenanceTrustRoot {
|
|
15
15
|
getIssuer(): string | null;
|
|
16
16
|
getJwks(kid?: string): Promise<JSONWebKeySet | null>;
|
|
17
|
-
setIssuer(issuer: string | null): void;
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
19
|
* A trust root backed by the orchestrator's OWN signing keys
|
|
@@ -27,9 +27,9 @@ export type DeferredCaptureVerdict = {
|
|
|
27
27
|
* A rejection is a DROP: the job stays green and has no attestation.
|
|
28
28
|
* That is a degradation, whereas storing an unchecked statement re-introduces
|
|
29
29
|
* the forgery primitive — every gate that lets one through is the hole again.
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* A dispatch that carried no `provenanceContext` makes the agent freeze its
|
|
31
|
+
* local statement, which is dropped for the same reason, with the mismatched
|
|
32
|
+
* field named.
|
|
33
33
|
*/
|
|
34
34
|
export declare function checkDeferredCapture(deps: {
|
|
35
35
|
db: Kysely<Database>;
|
|
@@ -75,9 +75,9 @@ export interface ProviderBundle {
|
|
|
75
75
|
* registry.registerByRoutingKey('github:67890', bundleForApp2);
|
|
76
76
|
* const bundle = registry.getByRoutingKey('github:12345');
|
|
77
77
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
78
|
+
* A provider-wide default bundle, registered with `register(type)`, stands in
|
|
79
|
+
* for every routing key of that type that has no bundle of its own:
|
|
80
|
+
* registry.register('generic', genericBundle);
|
|
81
81
|
*/
|
|
82
82
|
export declare class ProviderRegistry {
|
|
83
83
|
private readonly bundles;
|
|
@@ -89,26 +89,16 @@ export declare class ProviderRegistry {
|
|
|
89
89
|
*/
|
|
90
90
|
registerByRoutingKey(routingKey: string, bundle: ProviderBundle): void;
|
|
91
91
|
/**
|
|
92
|
-
* Register
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* "{type}:default". Only works for single-app scenarios.
|
|
96
|
-
*
|
|
97
|
-
* For multi-app support, use registerByRoutingKey() instead.
|
|
92
|
+
* Register the provider-wide default bundle for `type`, stored under the
|
|
93
|
+
* synthetic routing key "{type}:default". It answers every routing key of
|
|
94
|
+
* that type that has no bundle of its own.
|
|
98
95
|
*/
|
|
99
96
|
register(type: ProviderType, bundle: ProviderBundle): void;
|
|
100
|
-
/**
|
|
101
|
-
* Get the provider bundle for a given type.
|
|
102
|
-
*
|
|
103
|
-
* Backward-compatible: returns the first bundle matching the provider type
|
|
104
|
-
* prefix. For multi-app, use getByRoutingKey() instead.
|
|
105
|
-
*/
|
|
106
|
-
get(type: ProviderType): ProviderBundle | undefined;
|
|
107
97
|
/**
|
|
108
98
|
* Whether a bundle is registered at EXACTLY this routing key.
|
|
109
99
|
*
|
|
110
|
-
* `getByRoutingKey` cannot answer this: it falls back to
|
|
111
|
-
*
|
|
100
|
+
* `getByRoutingKey` cannot answer this: it falls back to the type's default
|
|
101
|
+
* bundle, so it returns a bundle for a key it has never seen. A caller that
|
|
112
102
|
* needs to know whether the source's OWN bundle is present — rather than
|
|
113
103
|
* whether some bundle can be produced — has to ask here.
|
|
114
104
|
*/
|
|
@@ -117,17 +107,11 @@ export declare class ProviderRegistry {
|
|
|
117
107
|
* Get the provider bundle by routing key.
|
|
118
108
|
* Routing keys have the format "{provider}:{id}" (e.g., "github:12345").
|
|
119
109
|
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* `get()` cannot be a "the single configured app" shortcut the way it is for
|
|
126
|
-
* `github:` — it returns whichever `generic:`-prefixed bundle happens to sit
|
|
127
|
-
* first in insertion order, which may belong to a different source, or to a
|
|
128
|
-
* different ORGANIZATION. Only the shared default bundle (`generic:default`,
|
|
129
|
-
* the one that genuinely stands in for every plain generic source) is an
|
|
130
|
-
* acceptable stand-in, so that is the only fallback offered here.
|
|
110
|
+
* A key with no bundle of its own falls back only to its type's default
|
|
111
|
+
* bundle (`{type}:default`, e.g. `generic:default`, which stands in for every
|
|
112
|
+
* plain generic source). It never falls back to another key's bundle: that
|
|
113
|
+
* bundle belongs to a different App or source, possibly in a different
|
|
114
|
+
* organization.
|
|
131
115
|
*/
|
|
132
116
|
getByRoutingKey(routingKey: string): ProviderBundle | undefined;
|
|
133
117
|
/**
|
|
@@ -139,21 +123,10 @@ export declare class ProviderRegistry {
|
|
|
139
123
|
* Iterate over all registered bundles.
|
|
140
124
|
*/
|
|
141
125
|
getAll(): IterableIterator<[string, ProviderBundle]>;
|
|
142
|
-
/**
|
|
143
|
-
* Check if a provider type has at least one registered bundle.
|
|
144
|
-
*/
|
|
145
|
-
has(type: ProviderType): boolean;
|
|
146
126
|
/**
|
|
147
127
|
* Get all registered routing keys.
|
|
148
128
|
*/
|
|
149
129
|
getRoutingKeys(): string[];
|
|
150
|
-
/**
|
|
151
|
-
* Get routing keys matching a specific provider type.
|
|
152
|
-
*
|
|
153
|
-
* @param type - Provider type (e.g., "github")
|
|
154
|
-
* @returns Array of routing keys matching the type prefix
|
|
155
|
-
*/
|
|
156
|
-
getRoutingKeysForProvider(type: ProviderType): string[];
|
|
157
130
|
/**
|
|
158
131
|
* Remove a routing key and its bundle.
|
|
159
132
|
* Used during config reload when apps are removed.
|
|
@@ -41,6 +41,22 @@ export interface GithubAppManifest {
|
|
|
41
41
|
* does not receive events at it; the operator owns delivery.
|
|
42
42
|
*/
|
|
43
43
|
export declare function validateWebhookUrl(value: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Every permission and event a KiCI GitHub App needs. The manifest requests
|
|
46
|
+
* exactly these, and `kici-admin source refresh` reports an existing App that
|
|
47
|
+
* lacks any of them.
|
|
48
|
+
*/
|
|
49
|
+
export declare const GITHUB_APP_REQUIREMENTS: {
|
|
50
|
+
readonly permissions: {
|
|
51
|
+
readonly contents: 'read';
|
|
52
|
+
readonly metadata: 'read';
|
|
53
|
+
readonly pull_requests: 'read';
|
|
54
|
+
readonly checks: 'write';
|
|
55
|
+
readonly members: 'read';
|
|
56
|
+
readonly issues: 'read';
|
|
57
|
+
};
|
|
58
|
+
readonly events: readonly ["push", "pull_request", "check_run", "check_suite", "issue_comment"];
|
|
59
|
+
};
|
|
44
60
|
export declare function buildGithubAppManifest(input: GithubManifestInput): GithubAppManifest;
|
|
45
61
|
/** Credentials returned by GitHub's manifest-conversion endpoint. */
|
|
46
62
|
export interface GithubAppCredentials {
|
|
@@ -62,21 +78,56 @@ export interface GithubAppCredentials {
|
|
|
62
78
|
export declare function convertManifestCode(code: string, deps?: {
|
|
63
79
|
octokit?: Pick<Octokit, 'request'>;
|
|
64
80
|
}): Promise<GithubAppCredentials>;
|
|
81
|
+
/** What `GET /app` says about the App: identity plus its grant. */
|
|
82
|
+
export interface GithubAppIdentity {
|
|
83
|
+
name: string;
|
|
84
|
+
slug: string;
|
|
85
|
+
/** Events the App subscribes to. */
|
|
86
|
+
events: string[];
|
|
87
|
+
/** The App's permissions, name → access level. */
|
|
88
|
+
permissions: Record<string, string>;
|
|
89
|
+
}
|
|
65
90
|
/**
|
|
66
91
|
* Ask GitHub who this App is (`GET /app`, authenticated as the App via its
|
|
67
|
-
* JWT) and return its authoritative display `name` + `slug
|
|
68
|
-
*
|
|
69
|
-
* the
|
|
92
|
+
* JWT) and return its authoritative display `name` + `slug`, plus the events
|
|
93
|
+
* and permissions the App holds, which the requirement gap check reads. This is
|
|
94
|
+
* the single "fetch the App's identity from GitHub" helper, reused at source
|
|
95
|
+
* creation, by the daily refresher, and by `kici-admin source refresh`.
|
|
70
96
|
*
|
|
71
97
|
* GitHub is the source of truth: a rename in the GitHub UI changes the value
|
|
72
98
|
* `GET /app` returns, which is what keeps the dashboard name fresh.
|
|
73
99
|
*/
|
|
74
100
|
export declare function fetchGithubAppIdentity(creds: Pick<GithubAppCredentials, 'appId' | 'privateKey'>, deps?: {
|
|
75
101
|
appOctokit?: Pick<Octokit, 'request'>;
|
|
76
|
-
}): Promise<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
102
|
+
}): Promise<GithubAppIdentity>;
|
|
103
|
+
/** One installation's grant, as the gap check reads it. */
|
|
104
|
+
export interface GithubAppInstallationGrant {
|
|
105
|
+
id: number;
|
|
106
|
+
/** Login of the account the App is installed on (an enterprise's slug). */
|
|
107
|
+
account: string;
|
|
108
|
+
/** `Organization`, `User`, or null for an enterprise installation. */
|
|
109
|
+
accountType: string | null;
|
|
110
|
+
permissions: Record<string, string>;
|
|
111
|
+
}
|
|
112
|
+
/** Every installation of the App (`GET /app/installations`, all pages), as the App. */
|
|
113
|
+
export declare function listGithubAppInstallations(creds: Pick<GithubAppCredentials, 'appId' | 'privateKey'>, deps?: {
|
|
114
|
+
appOctokit?: Pick<Octokit, 'request'>;
|
|
115
|
+
}): Promise<GithubAppInstallationGrant[]>;
|
|
116
|
+
/** Required events and permissions an App or its installations lack. */
|
|
117
|
+
export interface GithubAppRequirementGaps {
|
|
118
|
+
missingEvents: string[];
|
|
119
|
+
missingPermissions: string[];
|
|
120
|
+
/** Installations that have not accepted a permission the App itself holds. */
|
|
121
|
+
installationsPendingApproval: Array<{
|
|
122
|
+
installationId: number;
|
|
123
|
+
account: string;
|
|
124
|
+
missingPermissions: string[];
|
|
125
|
+
}>;
|
|
126
|
+
}
|
|
127
|
+
/** Compare an App and its installations with {@link GITHUB_APP_REQUIREMENTS}. */
|
|
128
|
+
export declare function findGithubAppRequirementGaps(app: Pick<GithubAppIdentity, 'events' | 'permissions'>, installations: GithubAppInstallationGrant[]): GithubAppRequirementGaps;
|
|
129
|
+
/** Whether any gap array is non-empty. */
|
|
130
|
+
export declare function hasRequirementGaps(gaps: GithubAppRequirementGaps): boolean;
|
|
80
131
|
/**
|
|
81
132
|
* Poll GitHub (as the App, via a JWT) until at least one installation exists,
|
|
82
133
|
* returning the first installation's id + account login. Throws on timeout.
|
|
@@ -86,9 +86,4 @@ export declare function prepareSshAuthSync(opts: PrepareSshAuthOptions): SshAuth
|
|
|
86
86
|
* orchestrator's runtime user may have a populated ssh-agent.
|
|
87
87
|
*/
|
|
88
88
|
export declare function composeGitSshCommand(privateKeyPath: string, policy: SshHostKeyPolicy, knownHostsPath: string): string;
|
|
89
|
-
/**
|
|
90
|
-
* Shell-quote a path for embedding in `GIT_SSH_COMMAND`. Single-quotes the
|
|
91
|
-
* string and escapes embedded single quotes — matches POSIX shell parsing.
|
|
92
|
-
*/
|
|
93
|
-
export declare function quoteShell(path: string): string;
|
|
94
89
|
//# sourceMappingURL=ssh-auth.d.ts.map
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
* This CheckRunReporter handles execution lifecycle checks (queued, in_progress, completed per job/workflow).
|
|
26
26
|
* Future cleanup may unify both under CheckStatusPoster, but they serve different purposes today.
|
|
27
27
|
*/
|
|
28
|
-
import { type GitHubAppConfig } from '../providers/github/auth.js';
|
|
29
28
|
import type { ProviderRegistry } from '../provider-registry.js';
|
|
30
29
|
import type { StepLogBuffer } from './step-log-buffer.js';
|
|
31
30
|
import { type SourceLocationData } from './check-run-summary.js';
|
|
@@ -36,17 +35,11 @@ import { CheckRunConclusion, type TerminalJobStatus } from '@kici-dev/engine';
|
|
|
36
35
|
*/
|
|
37
36
|
interface CheckRunReporterDeps {
|
|
38
37
|
/**
|
|
39
|
-
* Provider registry for per-routing-key credential lookup
|
|
40
|
-
*
|
|
41
|
-
*
|
|
38
|
+
* Provider registry for per-routing-key credential lookup: the reporter
|
|
39
|
+
* resolves GitHub App credentials by routing key from the registry's
|
|
40
|
+
* CloneTokenProvider config.
|
|
42
41
|
*/
|
|
43
42
|
providerRegistry?: ProviderRegistry;
|
|
44
|
-
/**
|
|
45
|
-
* GitHub App config for creating Octokit instances.
|
|
46
|
-
* Fallback for backward compatibility when providerRegistry is not provided
|
|
47
|
-
* or when no routing key is available.
|
|
48
|
-
*/
|
|
49
|
-
githubConfig?: GitHubAppConfig;
|
|
50
43
|
/** Step log buffer for enriched failure summaries. */
|
|
51
44
|
stepLogBuffer?: StepLogBuffer;
|
|
52
45
|
/**
|
|
@@ -73,8 +66,7 @@ interface CheckRunReporterDeps {
|
|
|
73
66
|
* Resolver for the orchestrator's owning org public alias. Typically
|
|
74
67
|
* wired to `PlatformClient.getOrgPublicAlias()`. Returns the
|
|
75
68
|
* `oal_<12-char>` alias supplied by Platform on `auth.success`, or
|
|
76
|
-
* `undefined` before auth completes
|
|
77
|
-
* Platform that predates the alias plumbing.
|
|
69
|
+
* `undefined` before auth completes.
|
|
78
70
|
*/
|
|
79
71
|
getOrgPublicAlias?: () => string | undefined;
|
|
80
72
|
}
|
|
@@ -254,7 +246,7 @@ interface UpdateStepProgressOptions {
|
|
|
254
246
|
jobName: string;
|
|
255
247
|
stepIndex: number;
|
|
256
248
|
stepName: string;
|
|
257
|
-
state: 'running' | 'success' | 'failed' | 'skipped' | 'cancelled'
|
|
249
|
+
state: 'running' | 'success' | 'failed' | 'skipped' | 'cancelled';
|
|
258
250
|
durationMs?: number;
|
|
259
251
|
installationId?: number;
|
|
260
252
|
/** Routing key for per-app credential lookup (e.g., "github:12345"). */
|
|
@@ -526,14 +518,9 @@ export declare class CheckRunReporter {
|
|
|
526
518
|
*/
|
|
527
519
|
private persistBuildCreationPending;
|
|
528
520
|
/**
|
|
529
|
-
* Resolve GitHub App credentials for a given routing key
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
* 1. If providerRegistry is provided AND routingKey is given, look up the bundle
|
|
533
|
-
* by routing key and extract config from the CloneTokenProvider's getAppConfig().
|
|
534
|
-
* 2. Fall back to the direct githubConfig dep (backward compatible).
|
|
535
|
-
*
|
|
536
|
-
* Returns undefined if no config is available.
|
|
521
|
+
* Resolve GitHub App credentials for a given routing key from the bundle's
|
|
522
|
+
* CloneTokenProvider `getAppConfig()`. Returns undefined when no routing key,
|
|
523
|
+
* registry, bundle or GitHub provider is available.
|
|
537
524
|
*/
|
|
538
525
|
private resolveGithubConfig;
|
|
539
526
|
/**
|
|
@@ -17,7 +17,7 @@ import type { StepLogBuffer } from './step-log-buffer.js';
|
|
|
17
17
|
/** Step result data as sent by the agent in job.status data.stepResults. */
|
|
18
18
|
export interface StepResultData {
|
|
19
19
|
name: string;
|
|
20
|
-
status: 'success' | 'failed' | '
|
|
20
|
+
status: 'success' | 'failed' | 'skipped' | 'cancelled';
|
|
21
21
|
durationMs?: number;
|
|
22
22
|
error?: string;
|
|
23
23
|
exitCode?: number;
|
|
@@ -43,7 +43,7 @@ export interface CheckAnnotation {
|
|
|
43
43
|
/** Step progress entry for live updates. */
|
|
44
44
|
export interface StepProgressEntry {
|
|
45
45
|
name: string;
|
|
46
|
-
status: 'pending' | 'running' | 'success' | 'failed' | '
|
|
46
|
+
status: 'pending' | 'running' | 'success' | 'failed' | 'skipped' | 'cancelled';
|
|
47
47
|
durationMs?: number;
|
|
48
48
|
}
|
|
49
49
|
interface BuildCheckRunSummaryOptions {
|
|
@@ -24,7 +24,7 @@ export interface NormalizedLogChunk {
|
|
|
24
24
|
stepIndex: number;
|
|
25
25
|
lines: string[];
|
|
26
26
|
timestamp: number;
|
|
27
|
-
stream
|
|
27
|
+
stream: LogStream;
|
|
28
28
|
}
|
|
29
29
|
/** Which ingress produced the chunk. Stamped onto the two log counters. */
|
|
30
30
|
export type LogChunkSource = 'local' | 'peer';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The run fields every `onExecutionStatusChange` context built from an
|
|
3
|
+
* in-memory run carries, in one place so a new column cannot be forwarded from
|
|
4
|
+
* some status transitions and silently dropped from others.
|
|
5
|
+
*/
|
|
6
|
+
import type { ExecutionContext } from './execution-tracker.js';
|
|
7
|
+
type RunSummaryKey = 'workflowName' | 'provider' | 'repoIdentifier' | 'workflowRepoIdentifier' | 'sha' | 'installationId' | 'requestId' | 'routingKey' | 'ref' | 'triggerEvent' | 'commitMessage' | 'parentRunId' | 'originalRunId' | 'triggeredBy' | 'triggeredByAgentLabel' | 'triggerActorUsername' | 'triggerActorUserId';
|
|
8
|
+
/** The slice of a tracked run {@link runSummaryFields} reads. */
|
|
9
|
+
export type RunSummarySource = Pick<ExecutionContext, RunSummaryKey> & {
|
|
10
|
+
statusEpoch?: number | null;
|
|
11
|
+
};
|
|
12
|
+
/** The `statusEpoch` context field for a run, omitted at 0 (its default). */
|
|
13
|
+
export declare function statusEpochField(epoch: number | null | undefined): {
|
|
14
|
+
statusEpoch?: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The shared part of a run's status-change context.
|
|
18
|
+
*
|
|
19
|
+
* `workflowRepoIdentifier` is copied only when set, because its presence is
|
|
20
|
+
* what marks a cross-repository global run downstream. `localWorkingTree` is
|
|
21
|
+
* left to the caller: only some transitions forward it.
|
|
22
|
+
*/
|
|
23
|
+
export declare function runSummaryFields(run: RunSummarySource): Pick<ExecutionContext, RunSummaryKey | 'statusEpoch'>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=run-summary-fields.d.ts.map
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* finalize(path) at run completion.
|
|
23
23
|
*
|
|
24
24
|
* - finalize() seals the remaining tail buffer for a step key.
|
|
25
|
-
* - read() lists sealed segments (plus any
|
|
25
|
+
* - read() lists sealed segments (plus any single object written by
|
|
26
26
|
* append()) and streams them via the byte-offset cursor.
|
|
27
27
|
* - exists()/list() are segment-aware: `exists` is true when a single object or
|
|
28
28
|
* any segment is present; `list` collapses segment keys to their logical step
|
|
@@ -113,7 +113,7 @@ export declare class S3LogStorage implements LogStorage {
|
|
|
113
113
|
/**
|
|
114
114
|
* Single-object size (or null) + sealed segments in ascending seq order for a
|
|
115
115
|
* key. The single object is the content written by append() (single-shot
|
|
116
|
-
* writers)
|
|
116
|
+
* writers).
|
|
117
117
|
*/
|
|
118
118
|
private layout;
|
|
119
119
|
/** Fetch an inclusive byte range from one object. */
|
|
@@ -18,19 +18,12 @@
|
|
|
18
18
|
import { Hono } from 'hono';
|
|
19
19
|
import type { AccessLogWriter } from '../audit/access-log.js';
|
|
20
20
|
import type { TokenManager } from '../secrets/token-manager.js';
|
|
21
|
-
import type { RbacEnforcer
|
|
21
|
+
import type { RbacEnforcer } from '../secrets/rbac.js';
|
|
22
|
+
import { type AdminEnv } from './admin-env.js';
|
|
22
23
|
export interface AdminAccessLogRoutesDeps {
|
|
23
24
|
accessLog: AccessLogWriter;
|
|
24
25
|
tokenManager: TokenManager;
|
|
25
26
|
rbac: RbacEnforcer;
|
|
26
27
|
}
|
|
27
|
-
type AdminEnv = {
|
|
28
|
-
Variables: {
|
|
29
|
-
role: Role;
|
|
30
|
-
userId: string;
|
|
31
|
-
routingKey: string | null;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
28
|
export declare function createAdminAccessLogRoutes(deps: AdminAccessLogRoutesDeps): Hono<AdminEnv>;
|
|
35
|
-
export {};
|
|
36
29
|
//# sourceMappingURL=admin-access-log.d.ts.map
|
|
@@ -12,14 +12,7 @@ import { Hono } from 'hono';
|
|
|
12
12
|
import type { BackendSyncManager } from '@kici-dev/engine';
|
|
13
13
|
import type { BackendRegistry } from '../secrets/backend-registry.js';
|
|
14
14
|
import type { BackendHealthChecker } from '../secrets/backend-health.js';
|
|
15
|
-
import type
|
|
16
|
-
type AdminBackendsEnv = {
|
|
17
|
-
Variables: {
|
|
18
|
-
role: Role;
|
|
19
|
-
userId: string;
|
|
20
|
-
routingKey: string | null;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
15
|
+
import { type AdminEnv } from './admin-env.js';
|
|
23
16
|
interface BackendRouteDeps {
|
|
24
17
|
registry: BackendRegistry;
|
|
25
18
|
healthChecker: BackendHealthChecker;
|
|
@@ -31,6 +24,6 @@ interface BackendRouteDeps {
|
|
|
31
24
|
* @param deps - Backend route dependencies (registry, health checker, sync manager)
|
|
32
25
|
* @returns Hono app with backend routes
|
|
33
26
|
*/
|
|
34
|
-
export declare function createBackendRoutes(deps: BackendRouteDeps): Hono<
|
|
27
|
+
export declare function createBackendRoutes(deps: BackendRouteDeps): Hono<AdminEnv>;
|
|
35
28
|
export {};
|
|
36
29
|
//# sourceMappingURL=admin-backends.d.ts.map
|
|
@@ -25,8 +25,9 @@ import { Hono } from 'hono';
|
|
|
25
25
|
import type { Kysely } from 'kysely';
|
|
26
26
|
import { CLUSTER_NAME_REGEX } from '@kici-dev/engine/protocol/cluster-name';
|
|
27
27
|
import type { Database } from '../db/types.js';
|
|
28
|
-
import type { RbacEnforcer
|
|
28
|
+
import type { RbacEnforcer } from '../secrets/rbac.js';
|
|
29
29
|
import type { AccessLogWriter } from '../audit/access-log.js';
|
|
30
|
+
import { type AdminEnv } from './admin-env.js';
|
|
30
31
|
interface ClusterNameRouteDeps {
|
|
31
32
|
db: Kysely<Database>;
|
|
32
33
|
rbac: RbacEnforcer;
|
|
@@ -38,13 +39,6 @@ interface ClusterNameRouteDeps {
|
|
|
38
39
|
*/
|
|
39
40
|
accessLog?: AccessLogWriter;
|
|
40
41
|
}
|
|
41
|
-
type AdminEnv = {
|
|
42
|
-
Variables: {
|
|
43
|
-
role: Role;
|
|
44
|
-
userId: string;
|
|
45
|
-
routingKey: string | null;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
42
|
export declare function createClusterNameRoutes(deps: ClusterNameRouteDeps): Hono<AdminEnv>;
|
|
49
43
|
export { CLUSTER_NAME_REGEX };
|
|
50
44
|
//# sourceMappingURL=admin-cluster-name.d.ts.map
|