@kici-dev/orchestrator 0.1.27 → 0.2.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__/mock-db.d.ts +2 -0
- package/dist/agent/dispatcher.d.ts +52 -2
- package/dist/agent/host-roster-reaper.d.ts +1 -2
- package/dist/agent/host-roster.d.ts +34 -0
- package/dist/agent/ownership-refusal.d.ts +12 -0
- package/dist/agent/ownership-tracker.d.ts +64 -16
- package/dist/agent/token-store.d.ts +13 -0
- package/dist/agent-packaging/availability.d.ts +27 -0
- package/dist/agent-packaging/build-package.d.ts +16 -0
- package/dist/agent-packaging/download.d.ts +30 -0
- package/dist/agent-packaging/index.d.ts +9 -0
- package/dist/agent-packaging/install-closure.d.ts +30 -0
- package/dist/agent-packaging/node-binary.d.ts +26 -0
- package/dist/agent-packaging/refresh.d.ts +50 -0
- package/dist/agent-packaging/store.d.ts +15 -0
- package/dist/agent-packaging/upload.d.ts +24 -0
- package/dist/app-on-error.d.ts +29 -0
- package/dist/app.d.ts +56 -4
- package/dist/artifacts/artifact-store.d.ts +233 -0
- package/dist/artifacts/failure-messages.d.ts +46 -0
- package/dist/audit/access-log.d.ts +18 -1
- package/dist/cache/dep-cache.d.ts +15 -0
- package/dist/cache/user-cache.d.ts +37 -0
- package/dist/cancel/cancel-run.d.ts +10 -3
- package/dist/cancel/dashboard-cancel-handler.d.ts +19 -0
- package/dist/cli/api-client.d.ts +22 -1
- package/dist/cli/commands/agent-package.d.ts +34 -0
- package/dist/cli/commands/check-run.d.ts +26 -0
- package/dist/cli/commands/cluster-settings.d.ts +55 -0
- package/dist/cli/commands/dashboard-encryption-key.d.ts +3 -0
- package/dist/cli/commands/db-backup.d.ts +71 -0
- package/dist/cli/commands/orchestrator-service/drain.d.ts +31 -0
- package/dist/cli/commands/orchestrator-service/index.d.ts +7 -4
- package/dist/cli/commands/orchestrator-service/install-env.d.ts +58 -0
- package/dist/cli/commands/secret.d.ts +45 -1
- package/dist/cli/commands/shared/admin-cli-access-log.d.ts +46 -0
- package/dist/cli/commands/shared/versioned-upgrade.d.ts +65 -2
- package/dist/cli/commands/signing-key.d.ts +3 -0
- package/dist/cli/commands/source.d.ts +12 -0
- package/dist/cli/commands/token.d.ts +9 -0
- package/dist/cli/commands/trust-policy.d.ts +48 -0
- package/dist/cli/join.d.ts +1 -1
- package/dist/cli/service/index.d.ts +2 -2
- package/dist/cli/service/instance/manifest.d.ts +17 -0
- package/dist/cli/service/instance/resolve.d.ts +11 -0
- package/dist/cli/wizard/orchestrator-wizard.d.ts +39 -11
- package/dist/cli.js +9818 -3408
- package/dist/cluster/cluster-settings-reader.d.ts +78 -0
- package/dist/cluster/coordinator.d.ts +81 -9
- package/dist/cluster/join-client.d.ts +1 -1
- package/dist/cluster/leader-gated-scheduler.d.ts +50 -0
- package/dist/cluster/orphan-recovery.d.ts +14 -0
- package/dist/cluster/peer-client.d.ts +12 -2
- package/dist/cluster/peer-handler.d.ts +15 -4
- package/dist/cluster/peer-registry.d.ts +12 -0
- package/dist/cluster/verified-issuer-poller.d.ts +11 -0
- package/dist/cluster/verified-issuer.d.ts +63 -0
- package/dist/cold-store/tables/access-log.d.ts +1 -1
- package/dist/cold-store/tables/event-log.d.ts +1 -1
- package/dist/cold-store/tables/execution-jobs.d.ts +1 -1
- package/dist/cold-store/tables/execution-runs.d.ts +1 -1
- package/dist/cold-store/tables/execution-steps.d.ts +1 -1
- package/dist/cold-store/tables/secret-audit-log.d.ts +1 -1
- package/dist/config/loader.d.ts +1 -1
- package/dist/config/resolver.d.ts +2 -1
- package/dist/config/schema.d.ts +8 -6
- package/dist/config/types.d.ts +3 -2
- package/dist/config.d.ts +363 -53
- package/dist/contexts/context-store.d.ts +21 -8
- package/dist/contexts/glob-specificity.d.ts +30 -0
- package/dist/contexts/held-runs.d.ts +51 -19
- package/dist/contexts/protection/aggregate.d.ts +2 -2
- package/dist/contexts/protection/concurrency-gate.d.ts +0 -3
- package/dist/contexts/protection/reviewer-gate.d.ts +0 -3
- package/dist/contexts/protection/satisfiability.d.ts +1 -1
- package/dist/contexts/protection/trust-gate.d.ts +0 -3
- package/dist/contexts/protection/wait-timer-gate.d.ts +0 -3
- package/dist/cron/cron-scheduler.d.ts +24 -4
- package/dist/cron/cron-store.d.ts +21 -7
- package/dist/dashboard/attestation-filters.d.ts +92 -74
- package/dist/dashboard/handler.d.ts +35 -1
- package/dist/db/migration-test-harness.d.ts +41 -0
- package/dist/db/migrations/069_reroute_tunables.d.ts +21 -0
- package/dist/db/migrations/070_execution_runs_failure_class.d.ts +4 -0
- package/dist/db/migrations/071_batch_accumulation.d.ts +26 -0
- package/dist/db/migrations/072_dispatch_queue_run_id_index.d.ts +15 -0
- package/dist/db/migrations/073_org_settings_ingest_concurrency.d.ts +13 -0
- package/dist/db/migrations/074_normalize_zero_concurrency_limit.d.ts +13 -0
- package/dist/db/migrations/075_ingest_overflow_buffer.d.ts +16 -0
- package/dist/db/migrations/076_artifacts.d.ts +19 -0
- package/dist/db/migrations/077_backup_runs.d.ts +13 -0
- package/dist/db/migrations/078_org_settings_backup_staleness.d.ts +12 -0
- package/dist/db/migrations/079_org_settings_scaler_spawn_timeout.d.ts +14 -0
- package/dist/db/migrations/080_cluster_settings.d.ts +17 -0
- package/dist/db/migrations/081_org_settings_queue_timeout.d.ts +19 -0
- package/dist/db/migrations/082_host_s3_reachable.d.ts +16 -0
- package/dist/db/migrations/083_org_settings_artifact_caps.d.ts +18 -0
- package/dist/db/migrations/084_orchestrator_signing_keys.d.ts +20 -0
- package/dist/db/migrations/085_cluster_settings_reroute_flap_grace_ms.d.ts +12 -0
- package/dist/db/migrations/086_cluster_settings_max_fanout_hosts.d.ts +12 -0
- package/dist/db/migrations/087_cluster_settings_event_router_rate_limit.d.ts +12 -0
- package/dist/db/migrations/088_cluster_settings_cache_max_tarball_bytes.d.ts +12 -0
- package/dist/db/migrations/089_cluster_settings_cache_ttl_days.d.ts +12 -0
- package/dist/db/migrations/090_cluster_settings_concurrency_wait_timeout_ms.d.ts +12 -0
- package/dist/db/migrations/091_cluster_settings_agent_token_ttl_ms.d.ts +12 -0
- package/dist/db/migrations/092_cluster_settings_version.d.ts +16 -0
- package/dist/db/migrations/093_org_settings_sandbox_allowlist.d.ts +4 -0
- package/dist/db/migrations/094_dashboard_encryption_keys.d.ts +21 -0
- package/dist/db/migrations/095_dashboard_write_policy_tristate.d.ts +20 -0
- package/dist/db/migrations/096_multi_schedule_cron_last_fired.d.ts +4 -0
- package/dist/db/migrations/097_execution_runs_pr_number.d.ts +4 -0
- package/dist/db/migrations/098_execution_runs_customer_id.d.ts +4 -0
- package/dist/db/migrations/099_cluster_settings_dashboard_verified_issuer.d.ts +21 -0
- package/dist/db/migrations/100_held_runs_hold_type_vocabulary.d.ts +31 -0
- package/dist/db/migrations/101_contexts_hold_expiry_drop_default.d.ts +31 -0
- package/dist/db/migrations/102_dispatch_queue_agent_id.d.ts +20 -0
- package/dist/db/migrations/103_cluster_settings_ownership_db_check_timeout_ms.d.ts +20 -0
- package/dist/db/migrations/104_check_run_terminal_sent.d.ts +22 -0
- package/dist/db/migrations/105_org_trust_policy.d.ts +19 -0
- package/dist/db/migrations/106_cluster_settings_check_run_tracking_ttl_days.d.ts +18 -0
- package/dist/db/migrations/107_check_run_tracking_updated_at_index.d.ts +23 -0
- package/dist/db/repos/dashboard-encryption-keys-repo.d.ts +48 -0
- package/dist/db/repos/signing-keys-repo.d.ts +34 -0
- package/dist/db/types.d.ts +421 -7
- package/dist/deployment/deployment-identity.d.ts +87 -2
- package/dist/diagnostics/checks/backup.d.ts +18 -0
- package/dist/diagnostics/checks/index.d.ts +2 -1
- package/dist/diagnostics/fleet-collector.d.ts +1 -1
- package/dist/drain/drain-controller.d.ts +52 -0
- package/dist/events/batch-accumulator.d.ts +63 -0
- package/dist/events/circuit-breaker.d.ts +9 -3
- package/dist/events/event-emitter.d.ts +31 -0
- package/dist/events/event-retry-scanner.d.ts +12 -2
- package/dist/events/event-router.d.ts +29 -0
- package/dist/firecracker/host-network.d.ts +2 -0
- package/dist/firecracker/net-interfaces.d.ts +14 -0
- package/dist/github-app-name-refresher/github-app-name-refresher.d.ts +18 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +604 -16
- package/dist/lockfile-cache.d.ts +4 -0
- package/dist/lockfile-validate.d.ts +16 -9
- package/dist/metrics/prometheus.d.ts +112 -15
- package/dist/oidc/aws-kms-signer.d.ts +37 -0
- package/dist/oidc/command-signer.d.ts +23 -0
- package/dist/oidc/db-signer.d.ts +48 -0
- package/dist/oidc/id-token-claims.d.ts +22 -9
- package/dist/oidc/jwt.d.ts +5 -2
- package/dist/oidc/local-dev-signer.d.ts +1 -1
- package/dist/oidc/oidc-mint-registration.d.ts +27 -11
- package/dist/oidc/orchestrator-mint.d.ts +97 -0
- package/dist/oidc/orchestrator-signer-factory.d.ts +33 -0
- package/dist/oidc/reconcile-signing-key.d.ts +21 -0
- package/dist/oidc/signer.d.ts +25 -0
- package/dist/oidc/signing-key-status.d.ts +23 -0
- package/dist/orchestrator-core.d.ts +42 -2
- package/dist/pipeline/decorating-secret-resolver.d.ts +3 -2
- package/dist/pipeline/dispatch-matched-workflow.d.ts +41 -0
- package/dist/pipeline/install-secrets-resolver.d.ts +12 -1
- package/dist/pipeline/manual-schedule.d.ts +20 -13
- package/dist/pipeline/pending-workflow-context.d.ts +1 -1
- package/dist/pipeline/process-webhook.d.ts +57 -2
- package/dist/pipeline/processor.d.ts +44 -8
- package/dist/pipeline/rerun.d.ts +12 -13
- package/dist/pipeline/resolve-sandbox-grant.d.ts +28 -0
- package/dist/pipeline/route-or-dispatch-jobs.d.ts +71 -0
- package/dist/pipeline/sandbox-allowlist-reader.d.ts +33 -0
- package/dist/policy/dashboard-write-policy.d.ts +9 -4
- package/dist/provenance/backfill-run.d.ts +1 -0
- package/dist/provenance/trust-root.d.ts +13 -0
- package/dist/providers/generic/normalizer.d.ts +1 -1
- package/dist/providers/github/auth.d.ts +1 -1
- package/dist/providers/github/changed-files.d.ts +14 -6
- package/dist/providers/github/check-status-poster.d.ts +19 -3
- package/dist/providers/github/contributor-resolver.d.ts +1 -1
- package/dist/providers/github/lock-file.d.ts +1 -1
- package/dist/providers/github/normalizer.d.ts +1 -1
- package/dist/providers/github/repo-url.d.ts +1 -1
- package/dist/providers/local/lock-file-fetcher.d.ts +1 -1
- package/dist/providers/local/normalizer.d.ts +1 -1
- package/dist/providers/local/repo-url-builder.d.ts +1 -1
- package/dist/providers/universal-git/changed-files.d.ts +8 -7
- package/dist/providers/universal-git/clone-token.d.ts +1 -1
- package/dist/providers/universal-git/config.d.ts +4 -4
- package/dist/providers/universal-git/index.d.ts +5 -1
- package/dist/providers/universal-git/lock-file.d.ts +6 -1
- package/dist/providers/universal-git/normalizer.d.ts +1 -1
- package/dist/providers/universal-git/repo-url.d.ts +1 -1
- package/dist/queue/cleanup.d.ts +69 -8
- package/dist/queue/job-queue.d.ts +94 -14
- package/dist/queue/scheduled-job.d.ts +2 -2
- package/dist/registration/registration-index.d.ts +1 -1
- package/dist/reporting/agent-failure-category.d.ts +4 -1
- package/dist/reporting/check-run-reporter.d.ts +34 -14
- package/dist/reporting/check-run-tracking-store.d.ts +70 -8
- package/dist/reporting/execution-tracker.d.ts +156 -10
- package/dist/reporting/fs-log-storage.d.ts +31 -2
- package/dist/reporting/job-check-run-completion.d.ts +50 -0
- package/dist/reporting/log-chunk-sink.d.ts +47 -0
- package/dist/reporting/log-retention.d.ts +16 -0
- package/dist/reporting/log-storage.d.ts +64 -4
- package/dist/reporting/log-writer.d.ts +22 -7
- package/dist/reporting/peer-log-normalize.d.ts +14 -0
- package/dist/reporting/run-aggregator.d.ts +32 -32
- package/dist/reporting/s3-log-storage.d.ts +102 -8
- package/dist/routes/admin-auth.d.ts +90 -0
- package/dist/routes/admin-cluster-settings.d.ts +31 -0
- package/dist/routes/admin-events.d.ts +3 -0
- package/dist/routes/admin-orchestrator-drain.d.ts +35 -0
- package/dist/routes/admin-runs.d.ts +9 -0
- package/dist/routes/admin-sources.d.ts +7 -0
- package/dist/routes/admin-trust-policy.d.ts +49 -0
- package/dist/routes/admin.d.ts +15 -1
- package/dist/routes/github-webhook.d.ts +9 -3
- package/dist/routes/provenance-oidc.d.ts +38 -0
- package/dist/routes/verify-attestation.d.ts +21 -0
- package/dist/scaler/bare-metal-backend.d.ts +9 -2
- package/dist/scaler/config.d.ts +25 -4
- package/dist/scaler/container-backend.d.ts +9 -1
- package/dist/scaler/firecracker-backend.d.ts +29 -2
- package/dist/scaler/index.d.ts +1 -1
- package/dist/scaler/manager.d.ts +166 -8
- package/dist/scaler/pending-scale-sweeper.d.ts +35 -0
- package/dist/scaler/types.d.ts +75 -6
- package/dist/secrets/backend-registry.d.ts +32 -1
- package/dist/secrets/dashboard-encryption-key.d.ts +48 -0
- package/dist/secrets/ephemeral-keys.d.ts +16 -0
- package/dist/secrets/pg-secret-store.d.ts +10 -0
- package/dist/secrets/rbac.d.ts +5 -1
- package/dist/secrets/routing-key-scope.d.ts +6 -0
- package/dist/secrets/scope-routing.d.ts +126 -0
- package/dist/secrets/secret-resolver.d.ts +1 -14
- package/dist/secrets/token-manager.d.ts +5 -1
- package/dist/security/contributor-cache.d.ts +9 -1
- package/dist/security/trust-policy-gate.d.ts +117 -0
- package/dist/security/trust-policy-store.d.ts +78 -0
- package/dist/server.js +35769 -25052
- package/dist/sources/source-manager.d.ts +24 -0
- package/dist/stale-detector/stale-run-detector.d.ts +7 -0
- package/dist/standalone.js +34831 -25317
- package/dist/storage/filesystem.d.ts +17 -0
- package/dist/storage/key-discriminator.d.ts +20 -0
- package/dist/storage/s3.d.ts +2 -0
- package/dist/storage/types.d.ts +16 -0
- package/dist/webhook/dedup.d.ts +9 -1
- package/dist/webhook/event-log.d.ts +13 -2
- package/dist/webhook/generic-sources-listener.d.ts +4 -0
- package/dist/webhook/ingest-admission.d.ts +140 -0
- package/dist/webhook/ingest-overflow-buffer.d.ts +27 -0
- package/dist/webhook/ingest-overflow-replayer.d.ts +49 -0
- package/dist/webhook/ingest-overflow-types.d.ts +73 -0
- package/dist/webhook/loop-lag-source.d.ts +40 -0
- package/dist/webhook/observed-relay-guard.d.ts +40 -0
- package/dist/webhook/org-ingest-cap-reader.d.ts +24 -0
- package/dist/webhook/register-source-bundle.d.ts +3 -0
- package/dist/webhook/relay-reinject.d.ts +43 -0
- package/dist/worker/in-memory-job-queue.d.ts +8 -3
- package/dist/worker-core.d.ts +10 -0
- package/dist/ws/agent-api-registry.d.ts +20 -0
- package/dist/ws/agent-handler.d.ts +63 -7
- package/dist/ws/bringup-api.d.ts +99 -0
- package/dist/ws/dashboard-context-handler.d.ts +28 -10
- package/dist/ws/dashboard-run-state-handler.d.ts +31 -0
- package/dist/ws/failure-messages.d.ts +29 -0
- package/dist/ws/oidc-token-relay.d.ts +9 -0
- package/dist/ws/ownership-gate.d.ts +22 -0
- package/dist/ws/platform-client.d.ts +96 -1
- package/dist/ws/replay-chunker.d.ts +37 -0
- package/installer-image-digests.json +3 -3
- package/package.json +22 -21
- package/sbom.spdx.json +1240 -1788
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Kysely } from 'kysely';
|
|
2
|
-
import type { Context as EngineContext } from '@kici-dev/engine';
|
|
2
|
+
import type { ConcurrencyStrategy, Context as EngineContext } from '@kici-dev/engine';
|
|
3
3
|
import type { Database, Context } from '../db/types.js';
|
|
4
4
|
/** Thrown by `delete` when pending held runs reference the context. */
|
|
5
5
|
export declare class ContextDeleteBlockedError extends Error {
|
|
@@ -21,7 +21,7 @@ export interface ContextCreateInput {
|
|
|
21
21
|
triggerTypeFilters?: string[];
|
|
22
22
|
repoPatterns?: string[];
|
|
23
23
|
concurrencyLimit?: number | null;
|
|
24
|
-
concurrencyStrategy?:
|
|
24
|
+
concurrencyStrategy?: ConcurrencyStrategy;
|
|
25
25
|
concurrencyTimeoutMs?: number;
|
|
26
26
|
requiredReviewers?: string[] | null;
|
|
27
27
|
waitTimerSeconds?: number | null;
|
|
@@ -31,20 +31,30 @@ export interface ContextCreateInput {
|
|
|
31
31
|
enabled?: boolean;
|
|
32
32
|
createdBy?: string | null;
|
|
33
33
|
}
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Fields accepted when updating a context.
|
|
36
|
+
*
|
|
37
|
+
* Convention for every nullable column: `undefined` means "the caller did not
|
|
38
|
+
* mention this field, leave the column alone"; `null` means "clear it". The two
|
|
39
|
+
* are distinct on the wire (`contextUpdateRequestSchema` declares these fields
|
|
40
|
+
* `.nullable().optional()`), so the handler forwards both verbatim and `update`
|
|
41
|
+
* below writes the column's cleared state for an explicit `null` — SQL NULL for
|
|
42
|
+
* the nullable columns, and the empty array for `branchRestrictions`, whose
|
|
43
|
+
* column is `jsonb NOT NULL DEFAULT '[]'`.
|
|
44
|
+
*/
|
|
35
45
|
export interface ContextUpdateInput {
|
|
36
46
|
name?: string;
|
|
37
47
|
type?: 'fixed' | 'glob';
|
|
38
48
|
globPattern?: string | null;
|
|
39
|
-
branchRestrictions?: string[];
|
|
49
|
+
branchRestrictions?: string[] | null;
|
|
40
50
|
triggerTypeFilters?: string[];
|
|
41
51
|
repoPatterns?: string[];
|
|
42
52
|
concurrencyLimit?: number | null;
|
|
43
|
-
concurrencyStrategy?:
|
|
53
|
+
concurrencyStrategy?: ConcurrencyStrategy | null;
|
|
44
54
|
concurrencyTimeoutMs?: number;
|
|
45
55
|
requiredReviewers?: string[] | null;
|
|
46
56
|
waitTimerSeconds?: number | null;
|
|
47
|
-
holdExpirySeconds?: number;
|
|
57
|
+
holdExpirySeconds?: number | null;
|
|
48
58
|
minimumTrust?: 'known' | 'trusted' | null;
|
|
49
59
|
allowLocalExecution?: boolean;
|
|
50
60
|
enabled?: boolean;
|
|
@@ -79,8 +89,11 @@ export declare class ContextStore {
|
|
|
79
89
|
* Match a context name against org contexts.
|
|
80
90
|
*
|
|
81
91
|
* First tries exact name match (for fixed contexts).
|
|
82
|
-
* If no exact match, scans glob-type contexts and uses picomatch.
|
|
83
|
-
*
|
|
92
|
+
* If no exact match, scans glob-type contexts and uses picomatch. When the
|
|
93
|
+
* name matches more than one glob pattern, the most-specific pattern wins
|
|
94
|
+
* (most literal characters; ties break toward fewer wildcards, then name
|
|
95
|
+
* ascending) so the winning context — and its protection rules — is
|
|
96
|
+
* deterministic across dispatches. Returns the matching context or null.
|
|
84
97
|
*/
|
|
85
98
|
matchContext(orgId: string, name: string): Promise<Context | null>;
|
|
86
99
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specificity scoring for glob environment patterns.
|
|
3
|
+
*
|
|
4
|
+
* Used to resolve which glob context governs a run when an environment name
|
|
5
|
+
* matches more than one pattern. The most-specific pattern (most literal
|
|
6
|
+
* characters) wins; ties break toward fewer wildcards, then name ascending —
|
|
7
|
+
* a total, deterministic order.
|
|
8
|
+
*/
|
|
9
|
+
export interface GlobSpecificity {
|
|
10
|
+
/** Count of characters that are NOT glob metacharacters. Higher = more specific. */
|
|
11
|
+
literals: number;
|
|
12
|
+
/** Count of characters that ARE glob metacharacters. Lower = more specific. */
|
|
13
|
+
wildcards: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function globSpecificityScore(pattern: string): GlobSpecificity;
|
|
16
|
+
/**
|
|
17
|
+
* Compares two glob contexts, ranking the more specific first.
|
|
18
|
+
* Returns <0 when `a` is more specific than `b`, >0 when less, 0 only when
|
|
19
|
+
* pattern-score and name are identical.
|
|
20
|
+
*
|
|
21
|
+
* Order: literals desc, then wildcards asc, then name asc.
|
|
22
|
+
*/
|
|
23
|
+
export declare function compareGlobSpecificity(a: {
|
|
24
|
+
pattern: string;
|
|
25
|
+
name: string;
|
|
26
|
+
}, b: {
|
|
27
|
+
pattern: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}): number;
|
|
30
|
+
//# sourceMappingURL=glob-specificity.d.ts.map
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Manages the lifecycle: pending -> approved/rejected/expired.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { Kysely } from 'kysely';
|
|
7
|
+
import { z } from 'zod';
|
|
7
8
|
import { type ApprovalRequirement, type ApproverClause, type StepApprovalPayload, ApprovalDecision, HoldScope, TriggerSource } from '@kici-dev/engine';
|
|
8
9
|
import type { Database, HeldRun, HeldRunApproval } from '../db/types.js';
|
|
9
10
|
/** Status values for held runs (held_runs table). */
|
|
@@ -14,11 +15,23 @@ export declare enum HeldRunStatus {
|
|
|
14
15
|
Expired = "expired",
|
|
15
16
|
Released = "released"
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Reason a run was held in the security queue. Persisted verbatim in
|
|
20
|
+
* `held_runs.reason` and switched on by `buildSecurityHoldSummary`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const SecurityHoldReason: z.ZodEnum<{
|
|
23
|
+
context_trust: "context_trust";
|
|
24
|
+
fork_pr: "fork_pr";
|
|
25
|
+
unknown_contributor: "unknown_contributor";
|
|
26
|
+
workflow_modification: "workflow_modification";
|
|
27
|
+
}>;
|
|
28
|
+
export type SecurityHoldReason = z.infer<typeof SecurityHoldReason>;
|
|
17
29
|
/** Data required to create a held run. */
|
|
18
30
|
export interface CreateHeldRunData {
|
|
19
31
|
runId: string;
|
|
20
32
|
jobId: string;
|
|
21
|
-
|
|
33
|
+
/** Bound context id, or null for context-free holds (e.g. workflow_modification). */
|
|
34
|
+
contextId: string | null;
|
|
22
35
|
holdType: string;
|
|
23
36
|
reason: string;
|
|
24
37
|
expiresAt: Date;
|
|
@@ -46,8 +59,8 @@ export interface CreateHoldData {
|
|
|
46
59
|
/** Queue type: 'context' (default) or 'security'. */
|
|
47
60
|
queueType?: 'context' | 'security';
|
|
48
61
|
/**
|
|
49
|
-
* Held-run `hold_type` discriminator
|
|
50
|
-
*
|
|
62
|
+
* Held-run `hold_type` discriminator — an engine `HoldType` member. Defaults
|
|
63
|
+
* to `reviewer`. The workflow install gate sets `timer` / `concurrency` so
|
|
51
64
|
* the automated release sweeps can find their rows.
|
|
52
65
|
*/
|
|
53
66
|
holdType?: string;
|
|
@@ -152,6 +165,16 @@ export declare class HeldRunStore {
|
|
|
152
165
|
listAll(orgId: string, options?: ListHeldRunsOptions): Promise<HeldRun[]>;
|
|
153
166
|
/** List held runs for an org filtered by queue type with optional filters. */
|
|
154
167
|
listByQueueType(orgId: string, queueType: 'context' | 'security', options?: ListHeldRunsOptions): Promise<HeldRun[]>;
|
|
168
|
+
/**
|
|
169
|
+
* List pending `security` holds whose run belongs to a specific PR (and repo).
|
|
170
|
+
*
|
|
171
|
+
* Joins `execution_runs` on `run_id` and filters by `repo_identifier` +
|
|
172
|
+
* `pr_number` so `/kici approve|reject` only affects the commented PR's holds
|
|
173
|
+
* rather than every pending security hold in the org. A run with a NULL
|
|
174
|
+
* `pr_number` (non-PR run, or a legacy run predating the column) never matches
|
|
175
|
+
* the equality predicate, so such holds are never released here — fail-closed.
|
|
176
|
+
*/
|
|
177
|
+
listPendingSecurityHoldsForPr(orgId: string, repoIdentifier: string, prNumber: number): Promise<HeldRun[]>;
|
|
155
178
|
/**
|
|
156
179
|
* Approve a pending held run, enforcing queue_type boundary.
|
|
157
180
|
* Prevents context approvals from approving security holds and vice versa.
|
|
@@ -167,23 +190,20 @@ export declare class HeldRunStore {
|
|
|
167
190
|
*/
|
|
168
191
|
listOverdue(): Promise<HeldRun[]>;
|
|
169
192
|
/**
|
|
170
|
-
* Release overdue workflow
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* `
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
193
|
+
* Release overdue workflow timer holds. The install-gate wait action pauses
|
|
194
|
+
* the workflow as a held run; on timer expiry it must RESUME (not fail like
|
|
195
|
+
* a reviewer-hold expiry). Flips each overdue pending `hold_type` timer,
|
|
196
|
+
* `hold_scope='workflow'` row to `released` and returns a `ReleaseSignal`
|
|
197
|
+
* per row so the caller can resume the workflow. Runs BEFORE
|
|
198
|
+
* `expireOverdue()` so these rows leave the pending pool before the
|
|
199
|
+
* expire-and-fail sweep sees them.
|
|
200
|
+
*
|
|
201
|
+
* The filter matches every persisted spelling of the timer hold type, so a
|
|
202
|
+
* row an un-upgraded orchestrator wrote as `wait_timer` still resumes rather
|
|
203
|
+
* than falling through to the expire-and-fail sweep. `hold_scope` is what
|
|
204
|
+
* keeps job-scoped dispatch-gate timer holds out of this sweep.
|
|
177
205
|
*/
|
|
178
206
|
releaseDueWaitHolds(): Promise<ReleaseSignal[]>;
|
|
179
|
-
/**
|
|
180
|
-
* Release the oldest pending workflow `concurrency` hold for a group. Called
|
|
181
|
-
* when a concurrency slot frees on run completion. Flips the oldest matching
|
|
182
|
-
* pending row to `released` and returns its `ReleaseSignal`, or null when no
|
|
183
|
-
* concurrency hold is queued for the group. `group` matches the held row's
|
|
184
|
-
* `context_id` (workflow-level install concurrency keys on the env id).
|
|
185
|
-
*/
|
|
186
|
-
releaseConcurrencyHold(orgId: string, group: string): Promise<ReleaseSignal | null>;
|
|
187
207
|
/**
|
|
188
208
|
* Expire overdue pending runs. Called by the stale detector.
|
|
189
209
|
* Sets status to 'expired' and resolved_at to now() for all
|
|
@@ -192,4 +212,16 @@ export declare class HeldRunStore {
|
|
|
192
212
|
*/
|
|
193
213
|
expireOverdue(): Promise<number>;
|
|
194
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Build a HeldRunStore backed by its own connection pool to the given
|
|
217
|
+
* orchestrator database URL. Mirrors `createPeerCredentialStoreFromUrl` /
|
|
218
|
+
* `createJoinTokenManagerFromUrl`; consumed by E2E tests that exercise the
|
|
219
|
+
* PR-scoped hold selection against the real deployed orchestrator DB.
|
|
220
|
+
*/
|
|
221
|
+
export declare function createHeldRunStoreFromUrl(databaseUrl: string, opts?: {
|
|
222
|
+
maxConnections?: number;
|
|
223
|
+
}): {
|
|
224
|
+
store: HeldRunStore;
|
|
225
|
+
dispose: () => Promise<void>;
|
|
226
|
+
};
|
|
195
227
|
//# sourceMappingURL=held-runs.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContextGateRejectReason, type Context } from '@kici-dev/engine';
|
|
1
|
+
import { ContextGateRejectReason, type ConcurrencyStrategy, type Context } from '@kici-dev/engine';
|
|
2
2
|
import type { JobDispatchContext } from './pipeline.js';
|
|
3
3
|
/** A single context's rejection under all-must-pass aggregation. */
|
|
4
4
|
export interface ContextGateRejection {
|
|
@@ -13,7 +13,7 @@ export interface EffectiveProtection {
|
|
|
13
13
|
waitTimerSeconds: number | null;
|
|
14
14
|
holdExpirySeconds: number;
|
|
15
15
|
concurrencyLimit: number | null;
|
|
16
|
-
concurrencyStrategy:
|
|
16
|
+
concurrencyStrategy: ConcurrencyStrategy;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Evaluate each context's hard reject gates against the run context. A name
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Concurrency gate -- checks concurrency limits.
|
|
3
|
-
*/
|
|
4
1
|
import type { Context, ProtectionGateResult } from '@kici-dev/engine';
|
|
5
2
|
/** Evaluate concurrency limits for the context. */
|
|
6
3
|
export declare function evaluateConcurrencyGate(env: Context, currentRunningCount: number, _concurrencyGroup: string): ProtectionGateResult;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reviewer gate -- checks required reviewers.
|
|
3
|
-
*/
|
|
4
1
|
import type { Context, ProtectionGateResult } from '@kici-dev/engine';
|
|
5
2
|
/** Evaluate reviewer requirements for the context. */
|
|
6
3
|
export declare function evaluateReviewerGate(env: Context): ProtectionGateResult;
|
|
@@ -22,9 +22,9 @@ import { z } from 'zod';
|
|
|
22
22
|
import type { Context } from '@kici-dev/engine';
|
|
23
23
|
/** Which decidable rule made a binding unsatisfiable. */
|
|
24
24
|
export declare const UnsatisfiableRule: z.ZodEnum<{
|
|
25
|
+
branch: "branch";
|
|
25
26
|
enabled: "enabled";
|
|
26
27
|
repo: "repo";
|
|
27
|
-
branch: "branch";
|
|
28
28
|
trigger: "trigger";
|
|
29
29
|
}>;
|
|
30
30
|
export type UnsatisfiableRule = z.infer<typeof UnsatisfiableRule>;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trust gate -- checks contributor trust tier against context minimumTrust.
|
|
3
|
-
*/
|
|
4
1
|
import type { Context, ProtectionGateResult, TrustTier } from '@kici-dev/engine';
|
|
5
2
|
/** Evaluate minimumTrust requirements for the context. */
|
|
6
3
|
export declare function evaluateTrustGate(env: Context, trustTier: TrustTier | undefined): ProtectionGateResult;
|
|
@@ -2,7 +2,7 @@ import type { Kysely } from 'kysely';
|
|
|
2
2
|
import type { Database } from '../db/types.js';
|
|
3
3
|
import type { RegistrationIndex } from '../registration/registration-index.js';
|
|
4
4
|
import type { EventRouter } from '../events/event-router.js';
|
|
5
|
-
import type
|
|
5
|
+
import { type CronStore } from './cron-store.js';
|
|
6
6
|
interface CronSchedulerOptions {
|
|
7
7
|
db: Kysely<Database>;
|
|
8
8
|
registrationIndex: RegistrationIndex;
|
|
@@ -32,9 +32,14 @@ export declare class CronScheduler {
|
|
|
32
32
|
private readonly cronStore;
|
|
33
33
|
private readonly eventRouter;
|
|
34
34
|
private readonly evaluationIntervalMs;
|
|
35
|
-
private
|
|
36
|
-
private isLeader;
|
|
35
|
+
private readonly scheduler;
|
|
37
36
|
private lastFiredCache;
|
|
37
|
+
/**
|
|
38
|
+
* Set when the leader-election cache load fails. While true, each evaluation
|
|
39
|
+
* tick re-attempts the load (see reloadCacheAfterFailure) so a transient DB
|
|
40
|
+
* error at leader election does not leave the cache cold for the whole tenure.
|
|
41
|
+
*/
|
|
42
|
+
private cacheLoadPending;
|
|
38
43
|
constructor(options: CronSchedulerOptions);
|
|
39
44
|
/**
|
|
40
45
|
* Called when this orchestrator becomes the Raft leader.
|
|
@@ -64,15 +69,30 @@ export declare class CronScheduler {
|
|
|
64
69
|
* fires the schedule.
|
|
65
70
|
*/
|
|
66
71
|
evaluate(): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Re-attempt the last-fired cache load after an earlier failure at leader
|
|
74
|
+
* election. On success, clears the pending flag; on repeated failure, leaves
|
|
75
|
+
* it set so the next tick tries again. Evaluation continues either way — the
|
|
76
|
+
* DB-side tryClaimFire guard prevents double-fires with a stale or cold cache.
|
|
77
|
+
*/
|
|
78
|
+
private reloadCacheAfterFailure;
|
|
67
79
|
/**
|
|
68
80
|
* Recover missed schedules after becoming leader.
|
|
69
81
|
* Same logic as evaluate() but logs recovery context.
|
|
70
82
|
*/
|
|
71
83
|
private recoverMissedSchedules;
|
|
72
84
|
/**
|
|
73
|
-
* Evaluate a single registration and fire
|
|
85
|
+
* Evaluate a single registration and fire every due schedule trigger.
|
|
86
|
+
*
|
|
87
|
+
* A workflow may declare multiple `schedule()` triggers; each is tracked and
|
|
88
|
+
* fired independently (keyed per (registration, schedule)), so a second or
|
|
89
|
+
* third schedule is never silently skipped.
|
|
74
90
|
*/
|
|
75
91
|
private evaluateRegistration;
|
|
92
|
+
/**
|
|
93
|
+
* Evaluate one schedule trigger of a registration and fire if due.
|
|
94
|
+
*/
|
|
95
|
+
private evaluateScheduleTrigger;
|
|
76
96
|
}
|
|
77
97
|
export {};
|
|
78
98
|
//# sourceMappingURL=cron-scheduler.d.ts.map
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import type { Kysely, Transaction } from 'kysely';
|
|
2
2
|
import type { Database } from '../db/types.js';
|
|
3
3
|
type DbExecutor = Kysely<Database> | Transaction<Database>;
|
|
4
|
+
/**
|
|
5
|
+
* In-memory cache key uniting a registration and one of its schedules.
|
|
6
|
+
*
|
|
7
|
+
* A workflow may declare several `schedule()` triggers, each tracked
|
|
8
|
+
* independently in `cron_last_fired` keyed by (registration_id, schedule_key).
|
|
9
|
+
* The space separator is unambiguous: a registration id is a UUID and a
|
|
10
|
+
* schedule key is `${cronExpression}\n${timezone}` — neither contains a space
|
|
11
|
+
* at the boundary that could collide.
|
|
12
|
+
*/
|
|
13
|
+
export declare function cronCacheKey(registrationId: string, scheduleKey: string): string;
|
|
4
14
|
/**
|
|
5
15
|
* DB persistence for cron last-fired tracking.
|
|
6
16
|
*
|
|
7
|
-
* Tracks the last time each
|
|
17
|
+
* Tracks the last time each (registration, schedule) was fired — a workflow
|
|
18
|
+
* with multiple `schedule()` triggers has one row per distinct schedule.
|
|
8
19
|
* Used by CronScheduler for fire-once-on-recovery after leader transitions.
|
|
9
20
|
* Uses upsert (INSERT ON CONFLICT UPDATE) for atomic idempotent writes.
|
|
10
21
|
*/
|
|
@@ -12,11 +23,14 @@ export declare class CronStore {
|
|
|
12
23
|
private readonly db;
|
|
13
24
|
constructor(db: Kysely<Database>);
|
|
14
25
|
/**
|
|
15
|
-
* Atomically claim a cron fire
|
|
16
|
-
*
|
|
26
|
+
* Atomically claim a cron fire for one schedule of a registration: only
|
|
27
|
+
* succeeds if no other orchestrator has already fired this (registration,
|
|
28
|
+
* schedule) at a time >= firedAt.
|
|
17
29
|
*
|
|
18
30
|
* Uses INSERT ... ON CONFLICT with a WHERE guard so the upsert only writes
|
|
19
|
-
* when `last_fired_at < firedAt` (or the row doesn't exist yet).
|
|
31
|
+
* when `last_fired_at < firedAt` (or the row doesn't exist yet). The conflict
|
|
32
|
+
* target is the composite key (registration_id, schedule_key) so two distinct
|
|
33
|
+
* schedules of the same registration claim independently.
|
|
20
34
|
*
|
|
21
35
|
* Accepts an optional executor (Kysely DB handle or Transaction). The cron
|
|
22
36
|
* fire path passes a Transaction so the claim and the subsequent
|
|
@@ -27,10 +41,10 @@ export declare class CronStore {
|
|
|
27
41
|
* Returns true if this call won the race (the fire should proceed).
|
|
28
42
|
* Returns false if another node already recorded a fire >= firedAt.
|
|
29
43
|
*/
|
|
30
|
-
tryClaimFire(registrationId: string, firedAt: Date, executor?: DbExecutor): Promise<boolean>;
|
|
44
|
+
tryClaimFire(registrationId: string, scheduleKey: string, firedAt: Date, executor?: DbExecutor): Promise<boolean>;
|
|
31
45
|
/**
|
|
32
|
-
* Get all last-fired records as a Map
|
|
33
|
-
* Used for bulk loading during leader recovery.
|
|
46
|
+
* Get all last-fired records as a Map keyed by `cronCacheKey(registrationId,
|
|
47
|
+
* scheduleKey)`. Used for bulk loading during leader recovery.
|
|
34
48
|
*/
|
|
35
49
|
getAll(): Promise<Map<string, Date>>;
|
|
36
50
|
}
|
|
@@ -12,55 +12,64 @@ import type { Database } from '../db/types.js';
|
|
|
12
12
|
* lists (repository / workflow come back null).
|
|
13
13
|
*/
|
|
14
14
|
export declare function baseAttestationsQuery(db: Kysely<Database>): import("kysely").SelectQueryBuilder<{
|
|
15
|
+
access_log: import("../db/types.js").AccessLogTable;
|
|
16
|
+
admin_tokens: import("../db/types.js").AdminTokenTable;
|
|
17
|
+
agent_tokens: import("../db/types.js").AgentTokenTable;
|
|
18
|
+
artifacts: import("../db/types.js").ArtifactsTable;
|
|
19
|
+
attestations: import("../db/types.js").AttestationsTable;
|
|
20
|
+
backup_runs: import("../db/types.js").BackupRunsTable;
|
|
21
|
+
batch_accumulation_items: import("../db/types.js").BatchAccumulationItemsTable;
|
|
22
|
+
batch_accumulation_windows: import("../db/types.js").BatchAccumulationWindowsTable;
|
|
23
|
+
check_run_tracking: import("../db/types.js").CheckRunTrackingTable;
|
|
15
24
|
cluster_meta: import("../db/types.js").ClusterMetaTable;
|
|
25
|
+
cluster_settings: import("../db/types.js").ClusterSettingsTable;
|
|
26
|
+
cold_store_chunk_counts: import("../db/types.js").ColdStoreChunkCountsTable;
|
|
27
|
+
cold_store_chunks: import("../db/types.js").ColdStoreChunksTable;
|
|
28
|
+
concurrency_groups: import("../db/types.js").ConcurrencyGroupsTable;
|
|
29
|
+
config_versions: import("../db/types.js").ConfigVersionTable;
|
|
30
|
+
context_bindings: import("../db/types.js").ContextBindingsTable;
|
|
31
|
+
context_source_overrides: import("../db/types.js").ContextSourceOverridesTable;
|
|
32
|
+
context_variables: import("../db/types.js").ContextVariablesTable;
|
|
16
33
|
contexts: import("../db/types.js").ContextsTable;
|
|
17
|
-
|
|
18
|
-
|
|
34
|
+
cron_last_fired: import("../db/types.js").CronLastFiredTable;
|
|
35
|
+
cross_repo_trust: import("../db/types.js").CrossRepoTrustTable;
|
|
36
|
+
dashboard_encryption_keys: import("../db/types.js").DashboardEncryptionKeysTable;
|
|
19
37
|
dedup_cache: import("../db/types.js").DedupCacheTable;
|
|
20
|
-
|
|
21
|
-
|
|
38
|
+
dispatch_queue: import("../db/types.js").DispatchQueueTable;
|
|
39
|
+
event_log: import("../db/types.js").EventLogTable;
|
|
40
|
+
execution_job_needs: import("../db/types.js").ExecutionJobNeedsTable;
|
|
22
41
|
execution_jobs: import("../db/types.js").ExecutionJobTable;
|
|
42
|
+
execution_runs: import("kysely").Nullable<import("../db/types.js").ExecutionRunTable>;
|
|
23
43
|
execution_steps: import("../db/types.js").ExecutionStepTable;
|
|
24
|
-
raft_state: import("../db/types.js").RaftStateTable;
|
|
25
|
-
secret_audit_log: import("../db/types.js").SecretAuditLogTable;
|
|
26
|
-
scoped_secrets: import("../db/types.js").ScopedSecretsTable;
|
|
27
|
-
context_bindings: import("../db/types.js").ContextBindingsTable;
|
|
28
|
-
context_variables: import("../db/types.js").ContextVariablesTable;
|
|
29
|
-
context_source_overrides: import("../db/types.js").ContextSourceOverridesTable;
|
|
30
|
-
held_runs: import("../db/types.js").HeldRunsTable;
|
|
31
|
-
held_run_approvals: import("../db/types.js").HeldRunApprovalsTable;
|
|
32
|
-
admin_tokens: import("../db/types.js").AdminTokenTable;
|
|
33
|
-
agent_tokens: import("../db/types.js").AgentTokenTable;
|
|
34
|
-
config_versions: import("../db/types.js").ConfigVersionTable;
|
|
35
|
-
kici_events: import("../db/types.js").KiciEventTable;
|
|
36
44
|
generic_webhook_sources: import("../db/types.js").GenericWebhookSourceTable;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
run_ephemeral_keys: import("../db/types.js").RunEphemeralKeysTable;
|
|
43
|
-
run_secret_outputs: import("../db/types.js").RunSecretOutputsTable;
|
|
44
|
-
concurrency_groups: import("../db/types.js").ConcurrencyGroupsTable;
|
|
45
|
-
sources: import("../db/types.js").SourcesTable;
|
|
45
|
+
held_run_approvals: import("../db/types.js").HeldRunApprovalsTable;
|
|
46
|
+
held_runs: import("../db/types.js").HeldRunsTable;
|
|
47
|
+
host_roster: import("../db/types.js").HostRosterTable;
|
|
48
|
+
ingest_overflow_buffer: import("../db/types.js").IngestOverflowBufferTable;
|
|
49
|
+
ip_allocations: import("../db/types.js").IpAllocationTable;
|
|
46
50
|
join_tokens: import("../db/types.js").JoinTokenTable;
|
|
51
|
+
kici_events: import("../db/types.js").KiciEventTable;
|
|
52
|
+
orchestrator_signing_keys: import("../db/types.js").OrchestratorSigningKeysTable;
|
|
47
53
|
org_settings: import("../db/types.js").OrgSettingsTable;
|
|
48
|
-
|
|
54
|
+
org_trust_policy: import("../db/types.js").OrgTrustPolicyTable;
|
|
55
|
+
pending_attestations: import("../db/types.js").PendingAttestationsTable;
|
|
49
56
|
pending_job_contexts: import("../db/types.js").PendingJobContextsTable;
|
|
50
57
|
pending_workflow_contexts: import("../db/types.js").PendingWorkflowContextsTable;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
cold_store_chunk_counts: import("../db/types.js").ColdStoreChunkCountsTable;
|
|
54
|
-
cold_store_chunks: import("../db/types.js").ColdStoreChunksTable;
|
|
55
|
-
check_run_tracking: import("../db/types.js").CheckRunTrackingTable;
|
|
56
|
-
scaler_spawning_agents: import("../db/types.js").ScalerSpawningAgentsTable;
|
|
57
|
-
scaler_agent_jobs: import("../db/types.js").ScalerAgentJobsTable;
|
|
58
|
-
scaler_reservations: import("../db/types.js").ScalerReservationsTable;
|
|
59
|
-
attestations: import("../db/types.js").AttestationsTable;
|
|
60
|
-
pending_attestations: import("../db/types.js").PendingAttestationsTable;
|
|
58
|
+
raft_state: import("../db/types.js").RaftStateTable;
|
|
59
|
+
registry_versions: import("../db/types.js").RegistryVersionsTable;
|
|
61
60
|
remote_sources: import("../db/types.js").RemoteSourcesTable;
|
|
62
61
|
request_idempotency: import("../db/types.js").RequestIdempotencyTable;
|
|
63
|
-
|
|
62
|
+
run_ephemeral_keys: import("../db/types.js").RunEphemeralKeysTable;
|
|
63
|
+
run_secret_outputs: import("../db/types.js").RunSecretOutputsTable;
|
|
64
|
+
scaler_agent_jobs: import("../db/types.js").ScalerAgentJobsTable;
|
|
65
|
+
scaler_reservations: import("../db/types.js").ScalerReservationsTable;
|
|
66
|
+
scaler_spawning_agents: import("../db/types.js").ScalerSpawningAgentsTable;
|
|
67
|
+
scoped_secrets: import("../db/types.js").ScopedSecretsTable;
|
|
68
|
+
secret_audit_log: import("../db/types.js").SecretAuditLogTable;
|
|
69
|
+
sources: import("../db/types.js").SourcesTable;
|
|
70
|
+
test_uploads: import("../db/types.js").TestUploadsTable;
|
|
71
|
+
workflow_registrations: import("../db/types.js").WorkflowRegistrationsTable;
|
|
72
|
+
}, "attestations" | "execution_jobs" | "execution_runs", {}>;
|
|
64
73
|
export type AttestationsBaseQuery = ReturnType<typeof baseAttestationsQuery>;
|
|
65
74
|
/**
|
|
66
75
|
* Base query for the deferred-attestation outbox (`pending_attestations`),
|
|
@@ -74,55 +83,64 @@ export type AttestationsBaseQuery = ReturnType<typeof baseAttestationsQuery>;
|
|
|
74
83
|
* run / job still lists (repository / workflow / job name come back null).
|
|
75
84
|
*/
|
|
76
85
|
export declare function basePendingAttestationsQuery(db: Kysely<Database>): import("kysely").SelectQueryBuilder<{
|
|
86
|
+
access_log: import("../db/types.js").AccessLogTable;
|
|
87
|
+
admin_tokens: import("../db/types.js").AdminTokenTable;
|
|
88
|
+
agent_tokens: import("../db/types.js").AgentTokenTable;
|
|
89
|
+
artifacts: import("../db/types.js").ArtifactsTable;
|
|
90
|
+
attestations: import("../db/types.js").AttestationsTable;
|
|
91
|
+
backup_runs: import("../db/types.js").BackupRunsTable;
|
|
92
|
+
batch_accumulation_items: import("../db/types.js").BatchAccumulationItemsTable;
|
|
93
|
+
batch_accumulation_windows: import("../db/types.js").BatchAccumulationWindowsTable;
|
|
94
|
+
check_run_tracking: import("../db/types.js").CheckRunTrackingTable;
|
|
77
95
|
cluster_meta: import("../db/types.js").ClusterMetaTable;
|
|
96
|
+
cluster_settings: import("../db/types.js").ClusterSettingsTable;
|
|
97
|
+
cold_store_chunk_counts: import("../db/types.js").ColdStoreChunkCountsTable;
|
|
98
|
+
cold_store_chunks: import("../db/types.js").ColdStoreChunksTable;
|
|
99
|
+
concurrency_groups: import("../db/types.js").ConcurrencyGroupsTable;
|
|
100
|
+
config_versions: import("../db/types.js").ConfigVersionTable;
|
|
101
|
+
context_bindings: import("../db/types.js").ContextBindingsTable;
|
|
102
|
+
context_source_overrides: import("../db/types.js").ContextSourceOverridesTable;
|
|
103
|
+
context_variables: import("../db/types.js").ContextVariablesTable;
|
|
78
104
|
contexts: import("../db/types.js").ContextsTable;
|
|
79
|
-
|
|
80
|
-
|
|
105
|
+
cron_last_fired: import("../db/types.js").CronLastFiredTable;
|
|
106
|
+
cross_repo_trust: import("../db/types.js").CrossRepoTrustTable;
|
|
107
|
+
dashboard_encryption_keys: import("../db/types.js").DashboardEncryptionKeysTable;
|
|
81
108
|
dedup_cache: import("../db/types.js").DedupCacheTable;
|
|
82
|
-
|
|
83
|
-
|
|
109
|
+
dispatch_queue: import("../db/types.js").DispatchQueueTable;
|
|
110
|
+
event_log: import("../db/types.js").EventLogTable;
|
|
111
|
+
execution_job_needs: import("../db/types.js").ExecutionJobNeedsTable;
|
|
84
112
|
execution_jobs: import("kysely").Nullable<import("../db/types.js").ExecutionJobTable>;
|
|
113
|
+
execution_runs: import("kysely").Nullable<import("../db/types.js").ExecutionRunTable>;
|
|
85
114
|
execution_steps: import("../db/types.js").ExecutionStepTable;
|
|
86
|
-
raft_state: import("../db/types.js").RaftStateTable;
|
|
87
|
-
secret_audit_log: import("../db/types.js").SecretAuditLogTable;
|
|
88
|
-
scoped_secrets: import("../db/types.js").ScopedSecretsTable;
|
|
89
|
-
context_bindings: import("../db/types.js").ContextBindingsTable;
|
|
90
|
-
context_variables: import("../db/types.js").ContextVariablesTable;
|
|
91
|
-
context_source_overrides: import("../db/types.js").ContextSourceOverridesTable;
|
|
92
|
-
held_runs: import("../db/types.js").HeldRunsTable;
|
|
93
|
-
held_run_approvals: import("../db/types.js").HeldRunApprovalsTable;
|
|
94
|
-
admin_tokens: import("../db/types.js").AdminTokenTable;
|
|
95
|
-
agent_tokens: import("../db/types.js").AgentTokenTable;
|
|
96
|
-
config_versions: import("../db/types.js").ConfigVersionTable;
|
|
97
|
-
kici_events: import("../db/types.js").KiciEventTable;
|
|
98
115
|
generic_webhook_sources: import("../db/types.js").GenericWebhookSourceTable;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
run_ephemeral_keys: import("../db/types.js").RunEphemeralKeysTable;
|
|
105
|
-
run_secret_outputs: import("../db/types.js").RunSecretOutputsTable;
|
|
106
|
-
concurrency_groups: import("../db/types.js").ConcurrencyGroupsTable;
|
|
107
|
-
sources: import("../db/types.js").SourcesTable;
|
|
116
|
+
held_run_approvals: import("../db/types.js").HeldRunApprovalsTable;
|
|
117
|
+
held_runs: import("../db/types.js").HeldRunsTable;
|
|
118
|
+
host_roster: import("../db/types.js").HostRosterTable;
|
|
119
|
+
ingest_overflow_buffer: import("../db/types.js").IngestOverflowBufferTable;
|
|
120
|
+
ip_allocations: import("../db/types.js").IpAllocationTable;
|
|
108
121
|
join_tokens: import("../db/types.js").JoinTokenTable;
|
|
122
|
+
kici_events: import("../db/types.js").KiciEventTable;
|
|
123
|
+
orchestrator_signing_keys: import("../db/types.js").OrchestratorSigningKeysTable;
|
|
109
124
|
org_settings: import("../db/types.js").OrgSettingsTable;
|
|
110
|
-
|
|
125
|
+
org_trust_policy: import("../db/types.js").OrgTrustPolicyTable;
|
|
126
|
+
pending_attestations: import("../db/types.js").PendingAttestationsTable;
|
|
111
127
|
pending_job_contexts: import("../db/types.js").PendingJobContextsTable;
|
|
112
128
|
pending_workflow_contexts: import("../db/types.js").PendingWorkflowContextsTable;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
cold_store_chunk_counts: import("../db/types.js").ColdStoreChunkCountsTable;
|
|
116
|
-
cold_store_chunks: import("../db/types.js").ColdStoreChunksTable;
|
|
117
|
-
check_run_tracking: import("../db/types.js").CheckRunTrackingTable;
|
|
118
|
-
scaler_spawning_agents: import("../db/types.js").ScalerSpawningAgentsTable;
|
|
119
|
-
scaler_agent_jobs: import("../db/types.js").ScalerAgentJobsTable;
|
|
120
|
-
scaler_reservations: import("../db/types.js").ScalerReservationsTable;
|
|
121
|
-
attestations: import("../db/types.js").AttestationsTable;
|
|
122
|
-
pending_attestations: import("../db/types.js").PendingAttestationsTable;
|
|
129
|
+
raft_state: import("../db/types.js").RaftStateTable;
|
|
130
|
+
registry_versions: import("../db/types.js").RegistryVersionsTable;
|
|
123
131
|
remote_sources: import("../db/types.js").RemoteSourcesTable;
|
|
124
132
|
request_idempotency: import("../db/types.js").RequestIdempotencyTable;
|
|
125
|
-
|
|
133
|
+
run_ephemeral_keys: import("../db/types.js").RunEphemeralKeysTable;
|
|
134
|
+
run_secret_outputs: import("../db/types.js").RunSecretOutputsTable;
|
|
135
|
+
scaler_agent_jobs: import("../db/types.js").ScalerAgentJobsTable;
|
|
136
|
+
scaler_reservations: import("../db/types.js").ScalerReservationsTable;
|
|
137
|
+
scaler_spawning_agents: import("../db/types.js").ScalerSpawningAgentsTable;
|
|
138
|
+
scoped_secrets: import("../db/types.js").ScopedSecretsTable;
|
|
139
|
+
secret_audit_log: import("../db/types.js").SecretAuditLogTable;
|
|
140
|
+
sources: import("../db/types.js").SourcesTable;
|
|
141
|
+
test_uploads: import("../db/types.js").TestUploadsTable;
|
|
142
|
+
workflow_registrations: import("../db/types.js").WorkflowRegistrationsTable;
|
|
143
|
+
}, "execution_jobs" | "execution_runs" | "pending_attestations", {}>;
|
|
126
144
|
/**
|
|
127
145
|
* Apply org-wide attestation filters to the base query. Digest is exact-match;
|
|
128
146
|
* name is an ILIKE substring; status / repository / workflow / job are equality;
|