@kici-dev/orchestrator 0.1.14 → 0.1.16
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/README.md +13 -1
- package/dist/__test-helpers__/mock-db.d.ts +2 -0
- package/dist/agent/dispatcher.d.ts +110 -6
- package/dist/agent/registry.d.ts +14 -0
- package/dist/app.d.ts +36 -0
- package/dist/approvals/apply-decision.d.ts +60 -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/agent-job-failed-error.d.ts +13 -0
- package/dist/cache/dispatch-cache-ref-tracker.d.ts +45 -0
- package/dist/cache/index.d.ts +2 -0
- package/dist/cache/user-cache.d.ts +116 -0
- package/dist/cancel/cancel-run.d.ts +56 -0
- package/dist/cli/api-client.d.ts +24 -0
- package/dist/cli/commands/environment.d.ts +1 -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/scaler.d.ts +18 -0
- package/dist/cli/kici-admin.d.ts +10 -1
- package/dist/cli/service/image-digests.d.ts +21 -0
- package/dist/cli.js +4148 -455
- package/dist/cluster/peer-client.d.ts +23 -1
- package/dist/cluster/peer-handler.d.ts +9 -1
- package/dist/cluster/peer-registry.d.ts +6 -0
- package/dist/config/schema.d.ts +4 -0
- package/dist/config.d.ts +13 -0
- package/dist/dashboard/handler.d.ts +92 -1
- package/dist/db/migrations/026_event_log_lockfile_corrupt.d.ts +11 -0
- package/dist/db/migrations/027_workflow_timeout.d.ts +20 -0
- package/dist/db/migrations/028_org_settings_user_cache.d.ts +4 -0
- package/dist/db/migrations/029_dispatch_queue_attempts.d.ts +16 -0
- package/dist/db/migrations/030_held_runs_env_set_null.d.ts +13 -0
- package/dist/db/migrations/031_dispatch_queue_ack_deadline.d.ts +19 -0
- package/dist/db/migrations/032_org_settings_dispatch_ack_timeout.d.ts +14 -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/types.d.ts +89 -3
- 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/environments/environment-store.d.ts +14 -1
- package/dist/environments/held-runs.d.ts +69 -1
- package/dist/firecracker/host-network.d.ts +83 -0
- package/dist/firecracker/persist.d.ts +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +380 -40
- package/dist/lockfile-cache.d.ts +1 -1
- package/dist/metrics/prometheus.d.ts +8 -0
- package/dist/orchestrator-core.d.ts +13 -2
- package/dist/pipeline/dispatch-matched-workflow.d.ts +9 -0
- package/dist/pipeline/inline-eval.d.ts +17 -2
- package/dist/pipeline/process-webhook.d.ts +19 -0
- package/dist/pipeline/processor.d.ts +28 -1
- package/dist/pipeline/test-pipeline.d.ts +10 -0
- package/dist/providers/github/lock-file.d.ts +1 -1
- package/dist/providers/internal/lock-file-fetcher.d.ts +3 -2
- package/dist/queue/job-queue.d.ts +53 -1
- package/dist/reporting/execution-tracker.d.ts +3 -1
- package/dist/routes/admin-environments.d.ts +1 -0
- package/dist/routes/fleet.d.ts +20 -0
- package/dist/scaler/bare-metal-backend.d.ts +1 -0
- package/dist/scaler/config.d.ts +4 -2
- package/dist/scaler/container-backend.d.ts +3 -2
- package/dist/scaler/disk-guard.d.ts +27 -0
- package/dist/scaler/firecracker-backend.d.ts +35 -0
- package/dist/scaler/manager.d.ts +8 -0
- package/dist/scaler/nftables.d.ts +29 -3
- package/dist/scaler/reap-orphans.d.ts +27 -0
- package/dist/scaler/types.d.ts +28 -1
- package/dist/server.js +6138 -1587
- package/dist/stale-detector/stale-run-detector.d.ts +18 -0
- package/dist/stale-detector/workflow-deadline-detector.d.ts +49 -0
- package/dist/standalone.js +18499 -14925
- package/dist/storage/filesystem.d.ts +14 -4
- package/dist/storage/s3.d.ts +19 -5
- package/dist/storage/types.d.ts +32 -5
- package/dist/worker/in-memory-job-queue.d.ts +40 -7
- package/dist/ws/agent-handler.d.ts +45 -0
- package/dist/ws/dashboard-env-handler.d.ts +36 -0
- package/dist/ws/fleet-agent-collector.d.ts +23 -0
- package/dist/ws/platform-client.d.ts +10 -1
- package/installer-image-digests.json +7 -0
- package/package.json +15 -11
- package/sbom.spdx.json +62 -57
package/dist/scaler/types.d.ts
CHANGED
|
@@ -50,6 +50,20 @@ export interface EffectiveLimits {
|
|
|
50
50
|
cpus?: number;
|
|
51
51
|
memBytes?: number;
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Identity of the work a spawn was provisioned for, passed to
|
|
55
|
+
* `ScalerBackend.spawn()`. Backends surface it on the provisioned resource
|
|
56
|
+
* (container labels today) so an operator inspecting the backend — e.g.
|
|
57
|
+
* `podman ps` — can tell which job/run each agent serves, and so tests can
|
|
58
|
+
* select the exact container a trigger produced instead of guessing among
|
|
59
|
+
* concurrent kici-managed containers. Absent for unbound spawns (warm pool).
|
|
60
|
+
*/
|
|
61
|
+
export interface SpawnContext {
|
|
62
|
+
/** Execution job id the spawn is bound to. */
|
|
63
|
+
boundJobId?: string;
|
|
64
|
+
/** Execution run id the bound job belongs to. */
|
|
65
|
+
runId?: string;
|
|
66
|
+
}
|
|
53
67
|
/**
|
|
54
68
|
* Network policy controlling RFC1918 and internet access for agents in this label set.
|
|
55
69
|
*/
|
|
@@ -165,6 +179,14 @@ export interface ScalerBackend {
|
|
|
165
179
|
readonly labelSets: LabelSetConfig[];
|
|
166
180
|
/** Per-backend maximum agents */
|
|
167
181
|
readonly maxAgents: number;
|
|
182
|
+
/**
|
|
183
|
+
* Whether this backend spawns its agents on the orchestrator's own host.
|
|
184
|
+
* True for bare-metal and Firecracker (local processes / local VMs) and for
|
|
185
|
+
* container backends using a local runtime socket; false when the backend
|
|
186
|
+
* provisions elsewhere (remote container runtime, future cloud backends).
|
|
187
|
+
* Drives the static spawning-host display on the diagnostics page.
|
|
188
|
+
*/
|
|
189
|
+
readonly spawnsOnLocalHost: boolean;
|
|
168
190
|
/** Current count of agents managed by this backend (including spawning) */
|
|
169
191
|
getActiveCount(): number;
|
|
170
192
|
/**
|
|
@@ -177,10 +199,13 @@ export interface ScalerBackend {
|
|
|
177
199
|
* for this spawn. Computed by ScalerManager from the job/label-set/scaler
|
|
178
200
|
* default chain. When omitted (or both fields zero), the backend falls
|
|
179
201
|
* back to its label-set / default limits the same way it always has.
|
|
202
|
+
* @param spawnContext - Identity of the bound job/run this spawn serves
|
|
203
|
+
* (omitted for unbound spawns, e.g. warm pool). Backends surface it on
|
|
204
|
+
* the provisioned resource for operator inspection.
|
|
180
205
|
* @returns The managed agent tracking object
|
|
181
206
|
* @throws If the label set is not supported by this backend
|
|
182
207
|
*/
|
|
183
|
-
spawn(labelSet: string[], agentId: string, orchestratorUrl: string, onEvent?: ScalerEventCallback, effectiveLimits?: EffectiveLimits): Promise<ManagedAgent>;
|
|
208
|
+
spawn(labelSet: string[], agentId: string, orchestratorUrl: string, onEvent?: ScalerEventCallback, effectiveLimits?: EffectiveLimits, spawnContext?: SpawnContext): Promise<ManagedAgent>;
|
|
184
209
|
/**
|
|
185
210
|
* Destroy a specific managed agent.
|
|
186
211
|
* Docker: docker rm -f; Bare-metal: SIGTERM -> SIGKILL
|
|
@@ -223,6 +248,8 @@ export interface FirecrackerNetworkConfig {
|
|
|
223
248
|
gateway?: string;
|
|
224
249
|
/** Subnet mask for guest networking @default '255.255.255.0' */
|
|
225
250
|
netmask?: string;
|
|
251
|
+
/** nft table name for this coordinator's host bridge @default 'kici' */
|
|
252
|
+
table?: string;
|
|
226
253
|
}
|
|
227
254
|
/**
|
|
228
255
|
* Parsed and validated scaler configuration from YAML.
|