@kici-dev/orchestrator 0.1.20 → 0.1.22
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/dispatcher.d.ts +44 -0
- package/dist/agent/host-roster-reaper.d.ts +2 -1
- package/dist/agent/host-roster.d.ts +54 -1
- package/dist/agent/registry.d.ts +22 -0
- package/dist/app.d.ts +5 -0
- package/dist/approvals/step-approval-bridge.d.ts +5 -0
- package/dist/cli/commands/source-manifest.d.ts +42 -0
- package/dist/cli/loopback-callback.d.ts +24 -0
- package/dist/cli/open-browser.d.ts +12 -0
- package/dist/cli/service/compose.d.ts +13 -0
- package/dist/cli/service/deploy-env.d.ts +31 -0
- package/dist/cli.js +1204 -256
- package/dist/cluster/coordinator.d.ts +5 -3
- package/dist/cluster/index.d.ts +2 -0
- package/dist/cluster/join-token.d.ts +27 -5
- package/dist/cluster/peer-auth-coordinator.d.ts +36 -0
- package/dist/cluster/peer-client.d.ts +34 -14
- package/dist/cluster/peer-credentials.d.ts +14 -2
- package/dist/cluster/peer-handler.d.ts +2 -2
- package/dist/cluster/rerouted-job-guard.d.ts +39 -0
- package/dist/config.d.ts +6 -0
- package/dist/dashboard/needs-edges.d.ts +4 -3
- package/dist/db/migrations/043_rerouted_to_peer.d.ts +4 -0
- package/dist/db/migrations/044_check_mode.d.ts +4 -0
- package/dist/db/migrations/045_host_properties.d.ts +16 -0
- package/dist/db/migrations/046_join_token_consumed_by_instance.d.ts +17 -0
- package/dist/db/migrations/047_needs_run_on.d.ts +4 -0
- package/dist/db/migrations/048_host_reboot_pending.d.ts +19 -0
- package/dist/db/migrations/049_held_runs_payload.d.ts +14 -0
- package/dist/db/migrations/050_sources_slug.d.ts +17 -0
- package/dist/db/types.d.ts +60 -5
- package/dist/deployment/deployment-identity.d.ts +9 -0
- package/dist/entry-helpers.d.ts +7 -0
- package/dist/environments/held-runs.d.ts +7 -1
- package/dist/github-app-name-refresher/github-app-name-refresher.d.ts +77 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1187 -33
- package/dist/lockfile-validate.d.ts +24 -0
- package/dist/orchestrator-core.d.ts +13 -1
- package/dist/pipeline/decorating-secret-resolver.d.ts +32 -0
- package/dist/pipeline/dispatch-matched-workflow.d.ts +127 -3
- package/dist/pipeline/install-secrets-resolver.d.ts +2 -2
- package/dist/pipeline/needs-scheduler.d.ts +22 -13
- package/dist/pipeline/processor.d.ts +2 -2
- package/dist/pipeline/test-pipeline.d.ts +37 -58
- package/dist/providers/github/manifest-form.d.ts +15 -0
- package/dist/providers/github/manifest.d.ts +103 -0
- package/dist/reporting/execution-tracker.d.ts +10 -1
- package/dist/routes/admin-sources.d.ts +18 -0
- package/dist/routes/admin.d.ts +8 -0
- package/dist/secrets/pg-secret-store.d.ts +9 -0
- package/dist/secrets/secret-resolver.d.ts +16 -1
- package/dist/server.js +4373 -2322
- package/dist/sources/source-store.d.ts +4 -0
- package/dist/sources/source-validator.d.ts +2 -0
- package/dist/stale-detector/reboot-deadline-sweep.d.ts +29 -0
- package/dist/stale-detector/stale-run-detector.d.ts +8 -0
- package/dist/standalone.js +3582 -1932
- package/dist/worker/in-memory-job-queue.d.ts +17 -0
- package/dist/worker/peer-outbox.d.ts +36 -0
- package/dist/worker/worker-outbox-relay.d.ts +13 -0
- package/dist/ws/agent-handler.d.ts +11 -6
- package/dist/ws/dashboard-fleet-handler.d.ts +33 -0
- package/dist/ws/dashboard-fleet-write-handler.d.ts +60 -0
- package/dist/ws/fleet-runs-on-all.d.ts +16 -0
- package/dist/ws/inventory-api.d.ts +17 -0
- package/dist/ws/platform-client.d.ts +13 -1
- package/dist/ws/test-relay-handlers.d.ts +4 -2
- package/installer-image-digests.json +3 -3
- package/package.json +4 -4
- package/sbom.spdx.json +77 -128
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { Hono } from 'hono';
|
|
12
12
|
import type { SourceStore } from '../sources/source-store.js';
|
|
13
13
|
import type { Role } from '../secrets/rbac.js';
|
|
14
|
+
import { type FetchGithubAppIdentity } from '../github-app-name-refresher/github-app-name-refresher.js';
|
|
14
15
|
interface SourceRouteDeps {
|
|
15
16
|
sourceStore: SourceStore;
|
|
16
17
|
/**
|
|
@@ -28,6 +29,23 @@ interface SourceRouteDeps {
|
|
|
28
29
|
webhookUrl: string | null;
|
|
29
30
|
webhookNote?: string;
|
|
30
31
|
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Resolve the org-scoped GitHub webhook URL for the manifest setup flow
|
|
34
|
+
* BEFORE any App exists. The GitHub webhook URL is org-scoped
|
|
35
|
+
* (`<base>/webhook/<orgId>/github`), not app-scoped, so it can be computed
|
|
36
|
+
* up front and baked into the App manifest. Returns null + a note when the
|
|
37
|
+
* orchestrator cannot yet resolve a public base or its org id.
|
|
38
|
+
*/
|
|
39
|
+
resolveGithubWebhookUrl?: () => Promise<{
|
|
40
|
+
webhookUrl: string | null;
|
|
41
|
+
webhookNote?: string;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Fetch a GitHub App's authoritative `{ name, slug }` from GitHub. Injectable
|
|
45
|
+
* for tests; defaults to the real `fetchGithubAppIdentity`. Used by the
|
|
46
|
+
* `source refresh` route.
|
|
47
|
+
*/
|
|
48
|
+
fetchAppIdentity?: FetchGithubAppIdentity;
|
|
31
49
|
}
|
|
32
50
|
type AdminSourcesEnv = {
|
|
33
51
|
Variables: {
|
package/dist/routes/admin.d.ts
CHANGED
|
@@ -77,6 +77,14 @@ export interface AdminRouteDeps {
|
|
|
77
77
|
webhookUrl: string | null;
|
|
78
78
|
webhookNote?: string;
|
|
79
79
|
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Optional -- resolves the org-scoped GitHub webhook URL for the manifest
|
|
82
|
+
* setup pre-flight (before any App exists). Wired in platform/hybrid mode.
|
|
83
|
+
*/
|
|
84
|
+
resolveGithubWebhookUrl?: () => Promise<{
|
|
85
|
+
webhookUrl: string | null;
|
|
86
|
+
webhookNote?: string;
|
|
87
|
+
}>;
|
|
80
88
|
/** Optional -- for DB migration endpoints. */
|
|
81
89
|
db?: Kysely<any>;
|
|
82
90
|
/** Optional -- for DB migration endpoints. */
|
|
@@ -10,6 +10,15 @@ import { type Kysely } from 'kysely';
|
|
|
10
10
|
import type { Database } from '../db/types.js';
|
|
11
11
|
import type { SecretStore } from '@kici-dev/engine';
|
|
12
12
|
import type { AuditLogger } from './audit-logger.js';
|
|
13
|
+
/**
|
|
14
|
+
* Thrown by `renameScope` when the named scope has no secret rows and no
|
|
15
|
+
* environment binding — i.e. there is nothing to rename. Consumers map this to
|
|
16
|
+
* a 404 (admin HTTP route) or a structured not-found response (dashboard path).
|
|
17
|
+
*/
|
|
18
|
+
export declare class SecretScopeNotFoundError extends Error {
|
|
19
|
+
readonly scope: string;
|
|
20
|
+
constructor(scope: string);
|
|
21
|
+
}
|
|
13
22
|
/**
|
|
14
23
|
* PostgreSQL secret store with AES-256-GCM encryption.
|
|
15
24
|
* Uses scoped_secrets table keyed by (org_id, scope, key).
|
|
@@ -62,6 +62,21 @@ export interface ResolvedSecretMeta {
|
|
|
62
62
|
backend: string;
|
|
63
63
|
scope: string;
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* The public secret-resolution surface consumed by the dispatch path and the
|
|
67
|
+
* universal-git provider. `SecretResolver` implements this; the test adapter's
|
|
68
|
+
* `DecoratingSecretResolver` (CLI-secret overlay) implements it too, so either
|
|
69
|
+
* can flow through `ProcessingDeps.secretResolver`.
|
|
70
|
+
*/
|
|
71
|
+
export interface SecretResolverApi {
|
|
72
|
+
resolveForJob(orgId: string, environmentName: string): Promise<Record<string, string>>;
|
|
73
|
+
resolveNamed(orgId: string, scope: string, key: string, opts?: {
|
|
74
|
+
store?: string;
|
|
75
|
+
runId?: string;
|
|
76
|
+
jobId?: string;
|
|
77
|
+
}): Promise<string | null>;
|
|
78
|
+
resolveForJobWithMeta(orgId: string, environmentName: string): Promise<Record<string, ResolvedSecretMeta>>;
|
|
79
|
+
}
|
|
65
80
|
/**
|
|
66
81
|
* Resolves secrets for a job by matching environment bindings against scoped secrets
|
|
67
82
|
* from multiple backends.
|
|
@@ -71,7 +86,7 @@ export interface ResolvedSecretMeta {
|
|
|
71
86
|
* are matched against binding patterns, and longest-path-wins uses the path AFTER
|
|
72
87
|
* stripping the backend prefix.
|
|
73
88
|
*/
|
|
74
|
-
export declare class SecretResolver {
|
|
89
|
+
export declare class SecretResolver implements SecretResolverApi {
|
|
75
90
|
private readonly environmentStore;
|
|
76
91
|
private readonly bindingStore;
|
|
77
92
|
private readonly backendStores;
|