@kici-dev/orchestrator 0.1.15 → 0.1.17
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 +18 -1
- package/dist/app.d.ts +25 -0
- package/dist/approvals/apply-decision.d.ts +70 -0
- package/dist/approvals/approval-resolver.d.ts +66 -0
- package/dist/approvals/step-approval-bridge.d.ts +72 -0
- package/dist/approvals/team-membership-lookup.d.ts +13 -0
- package/dist/cache/pending-inits.d.ts +5 -0
- package/dist/cache/user-cache.d.ts +1 -1
- package/dist/cli/api-client.d.ts +35 -0
- package/dist/cli/commands/firecracker/index.d.ts +11 -0
- package/dist/cli/commands/firecracker/provision.d.ts +13 -0
- package/dist/cli/commands/firecracker/teardown.d.ts +3 -0
- package/dist/cli/commands/firecracker/verify.d.ts +3 -0
- package/dist/cli/commands/local-hook.d.ts +15 -0
- package/dist/cli/commands/local-trigger.d.ts +24 -0
- package/dist/cli/commands/remote-source.d.ts +17 -0
- package/dist/cli/commands/scaler.d.ts +18 -0
- package/dist/cli/commands/shared/versioned-upgrade.d.ts +14 -0
- package/dist/cli/kici-admin.d.ts +23 -1
- package/dist/cli/service/image-digests.d.ts +21 -0
- package/dist/cli.js +4320 -490
- package/dist/cluster/peer-client.d.ts +23 -1
- package/dist/cluster/peer-handler.d.ts +9 -1
- package/dist/config.d.ts +0 -4
- package/dist/dashboard/handler.d.ts +26 -2
- package/dist/dashboard/needs-edges.d.ts +13 -0
- package/dist/db/migrations/033_org_settings_approval.d.ts +19 -0
- package/dist/db/migrations/034_held_runs_generalize.d.ts +24 -0
- package/dist/db/migrations/035_pending_workflow_contexts.d.ts +11 -0
- package/dist/db/migrations/036_attestations.d.ts +15 -0
- package/dist/db/migrations/037_generic_sources_provider_type_local.d.ts +19 -0
- package/dist/db/migrations/038_remote_sources.d.ts +14 -0
- package/dist/db/types.d.ts +135 -11
- package/dist/diagnostics/bundle-writer.d.ts +1 -17
- package/dist/diagnostics/checks/firecracker-network.d.ts +13 -0
- package/dist/diagnostics/checks/index.d.ts +2 -1
- package/dist/diagnostics/fleet-collector.d.ts +52 -0
- package/dist/diagnostics/fleet-constants.d.ts +8 -0
- package/dist/diagnostics/fleet-selection.d.ts +15 -0
- package/dist/diagnostics/fleet-topology.d.ts +47 -0
- package/dist/diagnostics/fleet-wiring.d.ts +60 -0
- package/dist/entry-helpers.d.ts +7 -29
- package/dist/environments/held-runs.d.ts +93 -1
- package/dist/firecracker/host-network.d.ts +83 -0
- package/dist/firecracker/persist.d.ts +14 -0
- package/dist/index.js +25 -6
- package/dist/metrics/prometheus.d.ts +4 -2
- package/dist/orchestrator-core.d.ts +57 -1
- package/dist/pipeline/dispatch-matched-workflow.d.ts +18 -1
- package/dist/pipeline/install-secrets-resolver.d.ts +32 -5
- package/dist/pipeline/needs-scheduler.d.ts +12 -10
- package/dist/pipeline/pending-workflow-context.d.ts +44 -0
- package/dist/pipeline/processor.d.ts +28 -4
- package/dist/pipeline/remote-source-store.d.ts +21 -0
- package/dist/pipeline/resume-workflow.d.ts +26 -0
- package/dist/providers/local/index.d.ts +33 -0
- package/dist/providers/local/local-source-config.d.ts +17 -0
- package/dist/providers/{internal → local}/lock-file-fetcher.d.ts +6 -6
- package/dist/providers/{internal → local}/normalizer.d.ts +28 -28
- package/dist/providers/{internal → local}/repo-url-builder.d.ts +6 -6
- package/dist/reporting/execution-tracker.d.ts +33 -0
- package/dist/routes/admin-events.d.ts +3 -4
- package/dist/routes/fleet.d.ts +20 -0
- package/dist/routes/uploads.d.ts +36 -26
- package/dist/scaler/config.d.ts +4 -2
- package/dist/scaler/disk-guard.d.ts +27 -0
- package/dist/scaler/firecracker-backend.d.ts +18 -0
- package/dist/scaler/manager.d.ts +6 -0
- package/dist/scaler/nftables.d.ts +4 -0
- package/dist/scaler/reap-orphans.d.ts +27 -0
- package/dist/scaler/types.d.ts +2 -0
- package/dist/server.js +26929 -23511
- package/dist/sources/build-platform-sources.d.ts +4 -2
- package/dist/stale-detector/stale-run-detector.d.ts +32 -1
- package/dist/standalone.js +16941 -15329
- package/dist/storage/filesystem.d.ts +2 -1
- package/dist/storage/s3.d.ts +2 -1
- package/dist/storage/types.d.ts +7 -0
- package/dist/webhook/generic-sources-listener.d.ts +4 -0
- package/dist/webhook/generic-sources.d.ts +37 -11
- package/dist/webhook/register-source-bundle.d.ts +14 -4
- package/dist/ws/agent-handler.d.ts +49 -0
- package/dist/ws/dashboard-dispatch-guard.d.ts +21 -0
- package/dist/ws/dashboard-env-handler.d.ts +47 -0
- package/dist/ws/fleet-agent-collector.d.ts +23 -0
- package/dist/ws/oidc-token-relay.d.ts +59 -0
- package/dist/ws/platform-client.d.ts +30 -1
- package/dist/ws/test-relay-handlers.d.ts +112 -0
- package/installer-image-digests.json +7 -0
- package/package.json +6 -5
- package/sbom.spdx.json +112 -57
- package/dist/providers/internal/index.d.ts +0 -32
- package/dist/routes/test-trigger.d.ts +0 -41
- package/dist/ws/observer-handler.d.ts +0 -42
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AppConfig } from '../config.js';
|
|
2
1
|
import type { SourceManager } from './source-manager.js';
|
|
3
2
|
import type { ProviderSource } from '../entry-helpers.js';
|
|
4
3
|
/** One active generic-webhook routing-key row (subset consumed here). */
|
|
@@ -7,6 +6,9 @@ export interface GenericRoutingKeyRow {
|
|
|
7
6
|
provider_type: string;
|
|
8
7
|
name: string;
|
|
9
8
|
has_git_config: boolean;
|
|
9
|
+
/** Raw `git_config` JSONB — used to check a local source's per-row
|
|
10
|
+
* `repoBasePath` reachability before advertising its routing key. */
|
|
11
|
+
git_config: string | Record<string, unknown> | null;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* Build the full provider-source list the orchestrator advertises to the
|
|
@@ -22,5 +24,5 @@ export interface GenericRoutingKeyRow {
|
|
|
22
24
|
* The generic-row loader is injected (rather than taking a `db`) so the merge
|
|
23
25
|
* logic is unit-testable without a live database.
|
|
24
26
|
*/
|
|
25
|
-
export declare function buildPlatformProviderSources(sourceManager: Pick<SourceManager, 'getSources'>, loadGenericRows: () => Promise<GenericRoutingKeyRow[]
|
|
27
|
+
export declare function buildPlatformProviderSources(sourceManager: Pick<SourceManager, 'getSources'>, loadGenericRows: () => Promise<GenericRoutingKeyRow[]>): Promise<ProviderSource[]>;
|
|
26
28
|
//# sourceMappingURL=build-platform-sources.d.ts.map
|
|
@@ -22,7 +22,9 @@ import type { CheckRunReporter } from '../reporting/check-run-reporter.js';
|
|
|
22
22
|
import type { ScalerManager } from '../scaler/manager.js';
|
|
23
23
|
import type { Dispatcher } from '../agent/dispatcher.js';
|
|
24
24
|
import type { AgentRegistry } from '../agent/registry.js';
|
|
25
|
-
import type { HeldRunStore } from '../environments/held-runs.js';
|
|
25
|
+
import type { HeldRunStore, ReleaseSignal } from '../environments/held-runs.js';
|
|
26
|
+
import type { StepApprovalBridge } from '../approvals/step-approval-bridge.js';
|
|
27
|
+
import type { AccessLogWriter } from '../audit/access-log.js';
|
|
26
28
|
export interface StaleRunDetectorDeps {
|
|
27
29
|
db: Kysely<Database>;
|
|
28
30
|
executionTracker: ExecutionTracker;
|
|
@@ -36,6 +38,18 @@ export interface StaleRunDetectorDeps {
|
|
|
36
38
|
scanIntervalMs: number;
|
|
37
39
|
/** Held run store for expiring overdue held runs. Optional -- if not set, held run cleanup is skipped. */
|
|
38
40
|
heldRunStore?: HeldRunStore;
|
|
41
|
+
/** Step-approval bridge — notified when a step-scoped hold expires so the waiting agent fails the step. Optional. */
|
|
42
|
+
stepApprovalBridge?: StepApprovalBridge;
|
|
43
|
+
/** Fail a whole run when a job/workflow-scoped approval hold expires. Optional. */
|
|
44
|
+
failRun?: (runId: string, reason: string) => Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Resume a workflow whose install-gate wait-timer hold has elapsed. Wired to
|
|
47
|
+
* the same `resumeWorkflow` path as reviewer approvals. Optional -- if not
|
|
48
|
+
* set, wait-timer workflow holds are not auto-released.
|
|
49
|
+
*/
|
|
50
|
+
onWorkflowRelease?: (signal: ReleaseSignal) => Promise<void>;
|
|
51
|
+
/** Access-log writer for the orchestrator audit stream. Optional -- if not set, expiry audit rows (`held_run.expire`) are skipped. */
|
|
52
|
+
accessLogWriter?: AccessLogWriter;
|
|
39
53
|
}
|
|
40
54
|
export declare class StaleRunDetector {
|
|
41
55
|
private readonly db;
|
|
@@ -47,8 +61,25 @@ export declare class StaleRunDetector {
|
|
|
47
61
|
private readonly staleThresholdMs;
|
|
48
62
|
private readonly scanIntervalMs;
|
|
49
63
|
private readonly heldRunStore?;
|
|
64
|
+
private readonly stepApprovalBridge?;
|
|
65
|
+
private readonly failRun?;
|
|
66
|
+
private readonly onWorkflowRelease?;
|
|
67
|
+
private readonly accessLogWriter?;
|
|
50
68
|
private interval;
|
|
51
69
|
constructor(deps: StaleRunDetectorDeps);
|
|
70
|
+
/**
|
|
71
|
+
* Release workflow install-gate wait-timer holds whose timer has elapsed.
|
|
72
|
+
* Runs BEFORE `expireOverdueHolds` so a wait hold resumes the workflow rather
|
|
73
|
+
* than being failed by the expire-and-fail sweep.
|
|
74
|
+
*/
|
|
75
|
+
private releaseDueWaitHolds;
|
|
76
|
+
/**
|
|
77
|
+
* Expire overdue approval holds. Routes each overdue hold by scope BEFORE the
|
|
78
|
+
* bulk status flip: step-scoped holds notify the waiting agent (which fails
|
|
79
|
+
* the step), job/workflow-scoped holds fail the whole run. Then the bulk
|
|
80
|
+
* `expireOverdue()` flips every overdue row to `expired`.
|
|
81
|
+
*/
|
|
82
|
+
private expireOverdueHolds;
|
|
52
83
|
/**
|
|
53
84
|
* Clean up orphaned jobs left in 'recovering' state from a previous orchestrator instance.
|
|
54
85
|
*
|