@kici-dev/orchestrator 0.4.0 → 0.6.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__/fake-scaler-state-store.d.ts +24 -0
- package/dist/__test-helpers__/mock-db-query.d.ts +130 -0
- package/dist/__test-helpers__/mock-db.d.ts +27 -0
- package/dist/agent/agent-version.d.ts +34 -0
- package/dist/agent/dispatcher.d.ts +151 -13
- package/dist/agent/host-roster.d.ts +37 -5
- package/dist/agent/registry.d.ts +2 -0
- package/dist/app.d.ts +56 -7
- package/dist/approvals/apply-decision.d.ts +67 -19
- package/dist/approvals/held-run-release-wiring.d.ts +45 -0
- package/dist/approvals/independent-wiring.d.ts +55 -0
- package/dist/approvals/resume-router.d.ts +9 -0
- package/dist/approvals/triggerer-subject.d.ts +37 -0
- package/dist/cache/dep-cache.d.ts +54 -10
- package/dist/cache/global-eval-round-cache.d.ts +95 -0
- package/dist/cache/index.d.ts +3 -0
- package/dist/cache/pending-global-evals.d.ts +42 -0
- package/dist/cache/pending-inits.d.ts +10 -0
- package/dist/cli/api-client.d.ts +18 -0
- package/dist/cli/commands/cluster-settings.d.ts +52 -3
- package/dist/cli/commands/diagnose.d.ts +6 -0
- package/dist/cli/commands/held-run.d.ts +58 -0
- package/dist/cli/commands/runs.d.ts +1 -0
- package/dist/cli/commands/trust-policy.d.ts +117 -12
- package/dist/cli/kici-admin.d.ts +10 -0
- package/dist/cli.js +2770 -938
- package/dist/cluster/cluster-identity.d.ts +3 -3
- package/dist/cluster/cluster-settings-reader.d.ts +59 -1
- package/dist/cluster/coordinator.d.ts +44 -0
- package/dist/cluster/index.d.ts +4 -0
- package/dist/cluster/peer-handler.d.ts +19 -0
- package/dist/cluster/peer-registry.d.ts +17 -0
- package/dist/cluster/plan-headroom-store.d.ts +26 -0
- package/dist/cluster/worker-eviction.d.ts +69 -0
- package/dist/cold-store/load-event-log-range.d.ts +10 -3
- package/dist/cold-store/load-secret-audit-log-range.d.ts +4 -3
- package/dist/cold-store/tables/secret-audit-log.d.ts +4 -3
- package/dist/config.d.ts +48 -21
- package/dist/content-requirements-cache.d.ts +55 -0
- package/dist/contexts/held-runs.d.ts +123 -16
- package/dist/contexts/protection/aggregate.d.ts +3 -2
- package/dist/contexts/protection/branch-gate.d.ts +15 -0
- package/dist/contexts/protection/concurrency-gate.d.ts +8 -2
- package/dist/contexts/protection/pipeline.d.ts +18 -0
- package/dist/contexts/release-queued-holds.d.ts +35 -0
- package/dist/dashboard/attestation-filters.d.ts +8 -0
- package/dist/dashboard/handler.d.ts +6 -24
- package/dist/db/migrations/109_cluster_settings_cache_knobs.d.ts +4 -0
- package/dist/db/migrations/110_cluster_settings_global_eval_knobs.d.ts +4 -0
- package/dist/db/migrations/111_cluster_settings_global_eval_wait.d.ts +4 -0
- package/dist/db/migrations/112_execution_runs_workflow_repo.d.ts +4 -0
- package/dist/db/migrations/113_execution_runs_workflow_repo_index.d.ts +30 -0
- package/dist/db/migrations/114_ingest_queue_claim.d.ts +4 -0
- package/dist/db/migrations/115_global_workflows_cluster_switch.d.ts +9 -0
- package/dist/db/migrations/116_org_plan_headroom.d.ts +4 -0
- package/dist/db/migrations/117_invoke_gate_proxy_jobs.d.ts +4 -0
- package/dist/db/migrations/118_invoke_gate_scheduling.d.ts +4 -0
- package/dist/db/migrations/119_scaler_ha_ownership.d.ts +4 -0
- package/dist/db/migrations/120_cluster_settings_scaler_reaper.d.ts +4 -0
- package/dist/db/migrations/121_org_settings_allow_untrusted_dockerfile_builds.d.ts +19 -0
- package/dist/db/migrations/122_host_roster_scaler_managed.d.ts +25 -0
- package/dist/db/migrations/123_workflow_registrations_default_branch.d.ts +24 -0
- package/dist/db/migrations/124_cluster_settings_provision_backoff.d.ts +4 -0
- package/dist/db/migrations/125_org_trust_directory.d.ts +30 -0
- package/dist/db/migrations/126_held_runs_posted_pending_check.d.ts +28 -0
- package/dist/db/migrations/127_org_trust_policy_approval_expiry_seconds.d.ts +26 -0
- package/dist/db/migrations/128_execution_runs_global_eval_round.d.ts +23 -0
- package/dist/db/migrations/129_execution_runs_dispatch_routing_key.d.ts +24 -0
- package/dist/db/migrations/130_scaler_provision_outcomes.d.ts +32 -0
- package/dist/db/types.d.ts +428 -12
- package/dist/entry-helpers.d.ts +28 -0
- package/dist/events/event-emitter.d.ts +22 -0
- package/dist/events/event-router.d.ts +87 -1
- package/dist/events/types.d.ts +2 -23
- package/dist/git/credential-broker.d.ts +94 -0
- package/dist/git/inherited-secret.d.ts +24 -0
- package/dist/git/installation-token.d.ts +38 -0
- package/dist/git/job-context.d.ts +13 -0
- package/dist/index.js +324 -84
- package/dist/metrics/agent-metrics-aggregator.d.ts +4 -4
- package/dist/metrics/prometheus.d.ts +170 -3
- package/dist/oidc/oidc-mint-registration.d.ts +7 -3
- package/dist/orchestrator-core.d.ts +91 -24
- package/dist/pipeline/content-filter.d.ts +71 -0
- package/dist/pipeline/direct-ingress-deps.d.ts +100 -0
- package/dist/pipeline/dispatch-matched-workflow.d.ts +521 -11
- package/dist/pipeline/global-eval-round.d.ts +307 -0
- package/dist/pipeline/internal-event-pipeline.d.ts +140 -0
- package/dist/pipeline/invoke-gate.d.ts +164 -0
- package/dist/pipeline/job-contexts.d.ts +16 -17
- package/dist/pipeline/needs-scheduler.d.ts +13 -0
- package/dist/pipeline/process-webhook.d.ts +126 -31
- package/dist/pipeline/processor.d.ts +282 -23
- package/dist/pipeline/rerun.d.ts +21 -0
- package/dist/pipeline/resume-workflow.d.ts +40 -7
- package/dist/pipeline/route-or-dispatch-jobs.d.ts +15 -0
- package/dist/pipeline/security-hold-check.d.ts +217 -0
- package/dist/pipeline/test-pipeline.d.ts +12 -0
- package/dist/pipeline/undispatched-hold-checks.d.ts +23 -0
- package/dist/pipeline/webhook-payload-store.d.ts +20 -0
- package/dist/policy/dashboard-write-policy-listener.d.ts +62 -0
- package/dist/policy/dashboard-write-policy.d.ts +14 -0
- package/dist/provenance/backfill-run.d.ts +10 -1
- package/dist/provider-registry.d.ts +47 -4
- package/dist/providers/github/check-status-poster.d.ts +33 -3
- package/dist/providers/github/commit-message.d.ts +20 -0
- package/dist/providers/github/file-contents.d.ts +40 -0
- package/dist/providers/github/index.d.ts +2 -2
- package/dist/providers/github/normalizer.d.ts +3 -2
- package/dist/providers/local/normalizer.d.ts +3 -5
- package/dist/providers/universal-git/config.d.ts +2 -0
- package/dist/providers/universal-git/index.d.ts +11 -2
- package/dist/providers/universal-git/normalizer.d.ts +10 -0
- package/dist/queue/cleanup.d.ts +7 -1
- package/dist/queue/job-queue.d.ts +112 -7
- package/dist/queue/terminalize-unroutable.d.ts +13 -0
- package/dist/registration/extractor.d.ts +3 -3
- package/dist/registration/registration-index.d.ts +7 -0
- package/dist/registration/registration-run-match.d.ts +47 -0
- package/dist/registration/registration-store.d.ts +22 -0
- package/dist/reporting/check-run-reporter.d.ts +146 -2
- package/dist/reporting/check-run-summary.d.ts +25 -1
- package/dist/reporting/execution-tracker.d.ts +324 -9
- package/dist/reporting/log-chunk-sink.d.ts +8 -5
- package/dist/reporting/run-aggregator.d.ts +4 -14
- package/dist/reporting/step-display-order.d.ts +43 -0
- package/dist/routes/admin-held-runs.d.ts +142 -0
- package/dist/routes/admin-org-settings.d.ts +5 -0
- package/dist/routes/admin-trust-policy.d.ts +34 -6
- package/dist/routes/admin.d.ts +15 -0
- package/dist/scaler/backend-factory.d.ts +55 -0
- package/dist/scaler/bare-metal-backend.d.ts +43 -5
- package/dist/scaler/claim-store.d.ts +119 -0
- package/dist/scaler/config.d.ts +4 -0
- package/dist/scaler/container-backend.d.ts +18 -4
- package/dist/scaler/container-routing.d.ts +23 -0
- package/dist/scaler/container-spawn.d.ts +28 -0
- package/dist/scaler/event-backend.d.ts +124 -0
- package/dist/scaler/event-provision-reaper.d.ts +350 -0
- package/dist/scaler/failure-tracker.d.ts +1 -1
- package/dist/scaler/firecracker-backend.d.ts +33 -6
- package/dist/scaler/index.d.ts +11 -1
- package/dist/scaler/label-matcher.d.ts +4 -3
- package/dist/scaler/manager.d.ts +905 -76
- package/dist/scaler/resolve-container-auth.d.ts +45 -0
- package/dist/scaler/scaler-events.d.ts +11 -0
- package/dist/scaler/scaler-state-store.d.ts +294 -10
- package/dist/scaler/types.d.ts +131 -13
- package/dist/scaler/warm-pool.d.ts +132 -29
- package/dist/security/comment-handler.d.ts +50 -11
- package/dist/security/global-workflow-policy.d.ts +52 -12
- package/dist/security/identity-link.d.ts +60 -0
- package/dist/security/lock-source.d.ts +11 -13
- package/dist/security/reduced-privilege-note.d.ts +59 -0
- package/dist/security/trust-directory-store.d.ts +233 -0
- package/dist/security/trust-policy-gate.d.ts +94 -59
- package/dist/security/trust-policy-store.d.ts +3 -0
- package/dist/security/trust-resolver.d.ts +14 -98
- package/dist/server.d.ts +11 -1
- package/dist/server.js +56329 -42234
- package/dist/stale-detector/gate-deadline-detector.d.ts +52 -0
- package/dist/stale-detector/stale-run-detector.d.ts +61 -3
- package/dist/standalone.js +37619 -23570
- package/dist/webhook/ingest-accept.d.ts +70 -0
- package/dist/webhook/ingest-overflow-buffer.d.ts +35 -4
- package/dist/webhook/ingest-overflow-replayer.d.ts +50 -6
- package/dist/worker/in-memory-job-queue.d.ts +1 -1
- package/dist/ws/agent-handler.d.ts +31 -4
- package/dist/ws/dashboard-context-handler.d.ts +28 -4
- package/dist/ws/dashboard-global-workflows-handler.d.ts +36 -9
- package/dist/ws/execution-status-frame.d.ts +32 -0
- package/dist/ws/failure-messages.d.ts +2 -0
- package/dist/ws/git-credential-relay.d.ts +39 -0
- package/dist/ws/oidc-token-relay.d.ts +6 -11
- package/dist/ws/platform-client.d.ts +68 -9
- package/dist/ws/test-relay-handlers.d.ts +35 -10
- package/installer-image-digests.json +3 -3
- package/package.json +24 -19
- package/sbom.spdx.json +868 -821
- package/dist/approvals/team-membership-lookup.d.ts +0 -13
- package/dist/pipeline/inline-eval.d.ts +0 -44
- package/dist/providers/github/contributor-resolver.d.ts +0 -30
- package/dist/security/contributor-cache.d.ts +0 -83
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Kysely } from 'kysely';
|
|
2
|
+
/**
|
|
3
|
+
* Add `org_trust_policy.approval_expiry_seconds` (nullable INTEGER).
|
|
4
|
+
*
|
|
5
|
+
* The authoritative security-hold window, at the granularity the existing
|
|
6
|
+
* `approval_expiry_hours` cannot express. Nullable rather than NOT NULL with a
|
|
7
|
+
* default, and deliberately NOT backfilled: NULL means "no seconds value was
|
|
8
|
+
* ever written", and every reader falls back to `approval_expiry_hours * 3600`
|
|
9
|
+
* for such a row. A backfill would have to guess, and a NOT NULL default would
|
|
10
|
+
* make a row written by an older build — which does not know the column —
|
|
11
|
+
* silently claim the default window instead of the hours the operator set.
|
|
12
|
+
*
|
|
13
|
+
* The same shape `contexts.hold_expiry_seconds` already uses for the same
|
|
14
|
+
* reason: "null = unset, the default window applies".
|
|
15
|
+
*
|
|
16
|
+
* `approval_expiry_hours` is kept. It is not dead — it is still the only window
|
|
17
|
+
* an older peer can read, and it is still what a partial write supplies — so
|
|
18
|
+
* dropping it would be a destructive schema change against a protected surface
|
|
19
|
+
* and would break a rollback outright (the column is NOT NULL with no default).
|
|
20
|
+
*
|
|
21
|
+
* Idempotent: guarded on column existence; a re-run on a DB that already has
|
|
22
|
+
* the column is a no-op.
|
|
23
|
+
*/
|
|
24
|
+
export declare function up(db: Kysely<unknown>): Promise<void>;
|
|
25
|
+
export declare function down(db: Kysely<unknown>): Promise<void>;
|
|
26
|
+
//# sourceMappingURL=127_org_trust_policy_approval_expiry_seconds.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Kysely } from 'kysely';
|
|
2
|
+
/**
|
|
3
|
+
* Add `execution_runs.is_global_eval_round boolean NOT NULL DEFAULT false` —
|
|
4
|
+
* the structural marker for a run row that records a global evaluation round
|
|
5
|
+
* rather than a workflow.
|
|
6
|
+
*
|
|
7
|
+
* The re-run path must recognise such a run: re-running it re-executes the
|
|
8
|
+
* evaluation, not a workflow. The only discriminator available to it otherwise
|
|
9
|
+
* is the round job's `__globaleval__` name prefix, which a customer workflow
|
|
10
|
+
* may carry — a name a customer chooses cannot decide which code path a re-run
|
|
11
|
+
* takes. A column stamped where the round failure is recorded is
|
|
12
|
+
* collision-proof.
|
|
13
|
+
*
|
|
14
|
+
* `NOT NULL DEFAULT false` because the question has exactly two answers: every
|
|
15
|
+
* pre-existing row is an ordinary run, and there is no third "unknown" reading
|
|
16
|
+
* a null would carry.
|
|
17
|
+
*
|
|
18
|
+
* Idempotent: the add is guarded on existence and the drop uses IF EXISTS, so a
|
|
19
|
+
* re-run is a no-op.
|
|
20
|
+
*/
|
|
21
|
+
export declare function up(db: Kysely<unknown>): Promise<void>;
|
|
22
|
+
export declare function down(db: Kysely<unknown>): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=128_execution_runs_global_eval_round.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Kysely } from 'kysely';
|
|
2
|
+
/**
|
|
3
|
+
* Add `execution_runs.dispatch_routing_key TEXT NULL` — the source whose
|
|
4
|
+
* credentials a run's `provider_context` actually holds.
|
|
5
|
+
*
|
|
6
|
+
* `routing_key` records the source the event ARRIVED on. For a cross-provider
|
|
7
|
+
* global workflow those are two different sources: the lock file resolves
|
|
8
|
+
* through another source's bundle, and `provider_context` is written from that
|
|
9
|
+
* source's credentials. Anything that pairs the inbound routing key with the
|
|
10
|
+
* stored context therefore hands one source's credentials to another source's
|
|
11
|
+
* API client — the re-run of a failed evaluation round did exactly that, and
|
|
12
|
+
* the resulting fetch either fails or reads the wrong tree.
|
|
13
|
+
*
|
|
14
|
+
* Nullable, with no default: NULL means "the same source the event arrived on",
|
|
15
|
+
* which is true of every run except a cross-provider dispatch and of every row
|
|
16
|
+
* written before this column existed. A default would have to name a routing
|
|
17
|
+
* key, and there is no cluster-wide one to name.
|
|
18
|
+
*
|
|
19
|
+
* Idempotent: the add is guarded on existence and the drop uses IF EXISTS, so a
|
|
20
|
+
* re-run is a no-op.
|
|
21
|
+
*/
|
|
22
|
+
export declare function up(db: Kysely<unknown>): Promise<void>;
|
|
23
|
+
export declare function down(db: Kysely<unknown>): Promise<void>;
|
|
24
|
+
//# sourceMappingURL=129_execution_runs_dispatch_routing_key.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Kysely } from 'kysely';
|
|
2
|
+
/**
|
|
3
|
+
* Durable per-provision outcome, keyed by agent id.
|
|
4
|
+
*
|
|
5
|
+
* `scaler_spawning_agents` is deleted the moment a provision is torn down, so
|
|
6
|
+
* its absence cannot tell "this provision was never adopted" from "this
|
|
7
|
+
* provision was adopted and has since been torn down". The stale-spawn prune
|
|
8
|
+
* has to separate exactly those two, because the first is a real external
|
|
9
|
+
* provisioning failure every coordinator must back off on, and the second is a
|
|
10
|
+
* healthy provision that must not be reported at all.
|
|
11
|
+
*
|
|
12
|
+
* This table carries the positive signal the spawn row cannot: the adoption is
|
|
13
|
+
* written in the same transaction that stamps `adopted_by`, and it outlives the
|
|
14
|
+
* spawn row's delete. Deliberately a separate table rather than a column on
|
|
15
|
+
* `scaler_spawning_agents`: that row's delete is what the per-coordinator
|
|
16
|
+
* provisioning backoff depends on, so it is left exactly as it is.
|
|
17
|
+
*
|
|
18
|
+
* `adopted_*` and `condemned_*` are independent. A provision that was adopted
|
|
19
|
+
* and later condemned by the reaper carries BOTH, and the condemn write never
|
|
20
|
+
* touches the adoption columns — losing the adoption fact would restore the
|
|
21
|
+
* misattribution this table exists to remove.
|
|
22
|
+
*
|
|
23
|
+
* Rows are purged by the leader-gated reaper once the spawn row is gone and the
|
|
24
|
+
* retention floor has passed; see `ScalerStateStore.purgeProvisionOutcomes`.
|
|
25
|
+
*
|
|
26
|
+
* Idempotent: both statements are guarded by IF NOT EXISTS, so a re-run is a
|
|
27
|
+
* no-op — including a re-run over a database that has the table but not the
|
|
28
|
+
* index, which an existence probe over the table alone would skip.
|
|
29
|
+
*/
|
|
30
|
+
export declare function up(db: Kysely<unknown>): Promise<void>;
|
|
31
|
+
export declare function down(db: Kysely<unknown>): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=130_scaler_provision_outcomes.d.ts.map
|