@kici-dev/orchestrator 0.11.0 → 0.13.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.
Files changed (158) hide show
  1. package/dist/__test-helpers__/mock-db-query.d.ts +4 -5
  2. package/dist/agent/agent-version.d.ts +5 -5
  3. package/dist/agent/dispatcher.d.ts +48 -0
  4. package/dist/agent/registry.d.ts +38 -9
  5. package/dist/agent-packaging/node-runtime-members.d.ts +14 -0
  6. package/dist/app.d.ts +9 -3
  7. package/dist/approvals/apply-decision.d.ts +1 -1
  8. package/dist/audit/access-log.d.ts +2 -3
  9. package/dist/cache/cache-upload-settle.d.ts +75 -0
  10. package/dist/cache/pending-inits.d.ts +9 -0
  11. package/dist/cancel/cancel-run.d.ts +22 -4
  12. package/dist/cancel/peer-job-cancel.d.ts +50 -0
  13. package/dist/cancel/sweep-stuck-cancelling.d.ts +3 -1
  14. package/dist/cli/commands/access-log.d.ts +3 -3
  15. package/dist/cli/commands/agent-service/agent-env.d.ts +20 -0
  16. package/dist/cli/commands/agent-service/status.d.ts +3 -3
  17. package/dist/cli/commands/attestations.d.ts +1 -1
  18. package/dist/cli/commands/context.d.ts +2 -2
  19. package/dist/cli/commands/event-dlq.d.ts +5 -6
  20. package/dist/cli/commands/event-log.d.ts +2 -3
  21. package/dist/cli/commands/execution.d.ts +1 -3
  22. package/dist/cli/commands/local-hook.d.ts +3 -2
  23. package/dist/cli/commands/local-trigger.d.ts +7 -0
  24. package/dist/cli/commands/orchestrator-service/status.d.ts +10 -3
  25. package/dist/cli/commands/queue.d.ts +1 -2
  26. package/dist/cli/commands/runs.d.ts +2 -3
  27. package/dist/cli/commands/service-health.d.ts +68 -0
  28. package/dist/cli/commands/shared/env-file-mode.d.ts +3 -2
  29. package/dist/cli/commands/shared/upgrade-safety.d.ts +11 -5
  30. package/dist/cli/commands/shared/versioned-upgrade.d.ts +119 -7
  31. package/dist/cli/commands/workflow.d.ts +3 -4
  32. package/dist/cli/open-browser.d.ts +1 -1
  33. package/dist/cli/service/entrypoint.d.ts +18 -0
  34. package/dist/cli/service/image-digests.d.ts +10 -0
  35. package/dist/cli/service/index.d.ts +4 -2
  36. package/dist/cli/service/instance/manifest.d.ts +39 -0
  37. package/dist/cli/service/launchd.d.ts +45 -10
  38. package/dist/cli/service/shutdown-grace.d.ts +35 -0
  39. package/dist/cli/service/types.d.ts +9 -0
  40. package/dist/cli/service/windows-acl.d.ts +40 -0
  41. package/dist/cli/service/windows-env-file.d.ts +45 -0
  42. package/dist/cli/service/windows.d.ts +13 -0
  43. package/dist/cli.js +2601 -1232
  44. package/dist/cluster/cluster-identity.d.ts +4 -4
  45. package/dist/cluster/coordinator-credential.d.ts +45 -0
  46. package/dist/cluster/coordinator.d.ts +18 -2
  47. package/dist/cluster/index.d.ts +1 -0
  48. package/dist/cluster/instance-heartbeat.d.ts +6 -1
  49. package/dist/cluster/join-token.d.ts +4 -2
  50. package/dist/cluster/leader-gated-scheduler.d.ts +7 -1
  51. package/dist/cluster/peer-auth-coordinator.d.ts +13 -0
  52. package/dist/cluster/peer-client.d.ts +4 -0
  53. package/dist/cluster/peer-credentials.d.ts +32 -1
  54. package/dist/cluster/raft-state.d.ts +6 -0
  55. package/dist/cluster/raft.d.ts +16 -2
  56. package/dist/cold-store/load-access-log-range.d.ts +3 -3
  57. package/dist/cold-store/load-event-log-range.d.ts +1 -1
  58. package/dist/cold-store/load-secret-audit-log-range.d.ts +2 -2
  59. package/dist/cold-store/orchestrator-cold-store.d.ts +9 -11
  60. package/dist/cold-store/tables/access-log.d.ts +2 -2
  61. package/dist/cold-store/tables/event-log.d.ts +4 -10
  62. package/dist/cold-store/tables/execution-jobs.d.ts +1 -1
  63. package/dist/cold-store/tables/execution-runs.d.ts +4 -4
  64. package/dist/cold-store/tables/execution-steps.d.ts +1 -1
  65. package/dist/cold-store/tables/secret-audit-log.d.ts +3 -3
  66. package/dist/config.d.ts +6 -1
  67. package/dist/contexts/held-runs.d.ts +2 -2
  68. package/dist/dashboard/attestation-filters.d.ts +1 -1
  69. package/dist/dashboard/handler.d.ts +8 -8
  70. package/dist/db/deferred-indexes.d.ts +2 -2
  71. package/dist/db/migrations/005_cold_store_chunk_counter.d.ts +2 -4
  72. package/dist/db/migrations/006_runs_jobs_steps_archived_at.d.ts +4 -4
  73. package/dist/db/migrations/007_audit_logs_archived_at.d.ts +6 -9
  74. package/dist/db/migrations/008_event_log_archived_at.d.ts +4 -6
  75. package/dist/db/migrations/010_cold_store_chunks.d.ts +2 -2
  76. package/dist/db/migrations/012_peer_credentials_active_uniq.d.ts +2 -4
  77. package/dist/db/migrations/016_org_settings_allow_http_npm.d.ts +2 -2
  78. package/dist/db/migrations/045_host_properties.d.ts +1 -1
  79. package/dist/db/migrations/046_join_token_consumed_by_instance.d.ts +1 -1
  80. package/dist/db/migrations/048_host_reboot_pending.d.ts +1 -1
  81. package/dist/db/migrations/049_held_runs_payload.d.ts +1 -1
  82. package/dist/db/migrations/050_sources_slug.d.ts +1 -1
  83. package/dist/db/migrations/051_binding_host_pattern.d.ts +1 -1
  84. package/dist/db/migrations/052_host_reach_metadata.d.ts +1 -1
  85. package/dist/db/migrations/053_agent_token_single_use.d.ts +1 -1
  86. package/dist/db/migrations/054_local_working_tree.d.ts +1 -1
  87. package/dist/db/migrations/055_agent_token_mandatory_labels.d.ts +1 -1
  88. package/dist/db/migrations/056_execution_jobs_environments.d.ts +1 -1
  89. package/dist/db/migrations/064_execution_jobs_skipped_environments.d.ts +1 -1
  90. package/dist/db/migrations/152_org_settings_cache_upload_settle_timeout.d.ts +15 -0
  91. package/dist/db/migrations/153_execution_runs_cancel_force.d.ts +16 -0
  92. package/dist/db/types.d.ts +27 -13
  93. package/dist/events/types.d.ts +1 -1
  94. package/dist/fault-injection-types.d.ts +2 -2
  95. package/dist/firecracker/host-network.d.ts +21 -3
  96. package/dist/firecracker/net-interfaces.d.ts +1 -1
  97. package/dist/helpers/run-detached.d.ts +12 -0
  98. package/dist/index.js +242 -67
  99. package/dist/oidc/db-signer.d.ts +1 -1
  100. package/dist/pipeline/changed-files.d.ts +51 -0
  101. package/dist/pipeline/cross-source-tally.d.ts +21 -0
  102. package/dist/pipeline/degraded-reason.d.ts +8 -0
  103. package/dist/pipeline/dispatch-matched-workflow.d.ts +10 -0
  104. package/dist/pipeline/global-eval-round.d.ts +5 -4
  105. package/dist/pipeline/processor.d.ts +11 -3
  106. package/dist/pipeline/rerun-inputs.d.ts +16 -7
  107. package/dist/provenance/retrier-mint.d.ts +1 -1
  108. package/dist/provenance/trust-root.d.ts +3 -3
  109. package/dist/providers/github/changed-files.d.ts +14 -4
  110. package/dist/providers/universal-git/changed-files.d.ts +6 -0
  111. package/dist/providers/universal-git/clone-token.d.ts +9 -13
  112. package/dist/providers/universal-git/config.d.ts +4 -0
  113. package/dist/providers/universal-git/index.d.ts +1 -2
  114. package/dist/providers/universal-git/normalizer.d.ts +2 -3
  115. package/dist/providers/universal-git/ssh-auth.d.ts +4 -4
  116. package/dist/queue/cleanup.d.ts +2 -2
  117. package/dist/queue/job-queue.d.ts +6 -6
  118. package/dist/queue/scheduled-job.d.ts +5 -7
  119. package/dist/registration/extractor.d.ts +1 -1
  120. package/dist/registration/registration-index.d.ts +1 -1
  121. package/dist/reporting/execution-tracker.d.ts +3 -3
  122. package/dist/routes/admin-access-log.d.ts +1 -1
  123. package/dist/routes/admin-auth.d.ts +2 -2
  124. package/dist/routes/admin-event-log.d.ts +2 -2
  125. package/dist/routes/admin-runs.d.ts +3 -3
  126. package/dist/routes/admin-scheduled-jobs.d.ts +2 -3
  127. package/dist/routes/health.d.ts +9 -0
  128. package/dist/scaler/container-backend.d.ts +3 -1
  129. package/dist/scaler/container-runtime.d.ts +9 -0
  130. package/dist/scaler/firecracker-backend.d.ts +15 -10
  131. package/dist/scaler/firecracker-extra-hosts.d.ts +20 -0
  132. package/dist/scaler/machine-ledger.d.ts +3 -4
  133. package/dist/scaler/manager.d.ts +26 -2
  134. package/dist/scaler/scaler-state-store.d.ts +1 -1
  135. package/dist/scaler/types.d.ts +4 -1
  136. package/dist/secrets/audit-logger.d.ts +2 -2
  137. package/dist/security/reduced-privilege-note.d.ts +2 -3
  138. package/dist/security/trust-policy-store.d.ts +3 -3
  139. package/dist/server.d.ts +2 -1
  140. package/dist/server.js +4955 -3206
  141. package/dist/stale-detector/stale-run-detector.d.ts +1 -1
  142. package/dist/stale-detector/workflow-deadline-detector.d.ts +7 -1
  143. package/dist/standalone.d.ts +1 -1
  144. package/dist/standalone.js +12944 -11243
  145. package/dist/storage/filesystem.d.ts +1 -1
  146. package/dist/storage/index.d.ts +1 -1
  147. package/dist/storage/s3.d.ts +36 -0
  148. package/dist/storage/sign-url.d.ts +2 -1
  149. package/dist/storage/types.d.ts +2 -2
  150. package/dist/ws/agent-handler.d.ts +58 -6
  151. package/dist/ws/agent-heartbeat.d.ts +4 -5
  152. package/dist/ws/dashboard-context-handler.d.ts +1 -1
  153. package/dist/ws/platform-client.d.ts +44 -32
  154. package/dist/ws/server-options.d.ts +1 -1
  155. package/dist/ws/test-relay-handlers.d.ts +1 -1
  156. package/installer-image-digests.json +3 -3
  157. package/package.json +5 -5
  158. package/sbom.spdx.json +53 -53
@@ -1,5 +1,14 @@
1
+ import { type BuildFingerprint } from '@kici-dev/shared';
1
2
  import type { Kysely } from 'kysely';
2
3
  import type { Database } from '../db/types.js';
4
+ /**
5
+ * The fields the orchestrator adds to its `/health` body. The route below
6
+ * returns this type, and `kici-admin orchestrator status` renders it.
7
+ */
8
+ export interface OrchestratorLivenessInfo extends BuildFingerprint {
9
+ /** ISO-8601 time the orchestrator bundle was built. */
10
+ buildDate: string;
11
+ }
3
12
  export interface HealthRoutesDeps {
4
13
  /** Optional DB instance for readiness checks */
5
14
  db?: Kysely<Database>;
@@ -41,7 +41,7 @@ export interface ContainerScalerBackendOptions {
41
41
  runtime?: 'docker' | 'podman' | 'auto';
42
42
  /** Default resource limits applied when label set has none */
43
43
  defaultResources?: ResourceRequest;
44
- /** Extra host:IP mappings injected into spawned containers (e.g. ["verdaccio.local:host-gateway"]) */
44
+ /** Extra host:IP mappings injected into spawned containers (e.g. ["registry.local:host-gateway"]) */
45
45
  extraHosts?: string[];
46
46
  /** Disable nftables-based network isolation (default: true). Set to false when nft is unavailable (e.g. rootless containers without NET_ADMIN). */
47
47
  networkIsolation?: boolean;
@@ -211,6 +211,8 @@ export declare class ContainerScalerBackend implements ScalerBackend {
211
211
  * Returns the count of cleaned containers plus reaped rules.
212
212
  */
213
213
  cleanupOrphans(): Promise<number>;
214
+ /** Stop and remove one orphaned agent container; true when it was removed. */
215
+ private removeOrphan;
214
216
  /**
215
217
  * Remove containers this backend spawned for one agent id.
216
218
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The container runtime behind a configured socket path.
3
+ *
4
+ * A path containing `podman` is Podman; any other path is Docker. The container
5
+ * backend reads a configured `socketPath` this way, and the runtime it picks
6
+ * only labels the agents' log source and the scaler diagnostics.
7
+ */
8
+ export declare function containerRuntimeForSocketPath(socketPath: string): 'docker' | 'podman';
9
+ //# sourceMappingURL=container-runtime.d.ts.map
@@ -21,13 +21,6 @@ import type { IpAllocator, IpAllocationResult } from './ip-allocator.js';
21
21
  import type { AgentTokenStore } from '../agent/token-store.js';
22
22
  import { type FirecrackerBridgeConfig, type BridgeHealth, type ExecOptions } from '../firecracker/host-network.js';
23
23
  import type { ScalerBackend, ScalerDestroyContext, ScalerEntry, ManagedAgent, LabelSetConfig, ScalerEventCallback, ValidationResult, EffectiveLimits, SpawnContext } from './types.js';
24
- /**
25
- * Infrastructure interfaces that share the `kici-` prefix but must NEVER be
26
- * deleted by the orphan sweep. Bridges (kici-br0/kici-br1) carry all VM
27
- * traffic; kici-m01 is the staging metadata interface. Losing any of these
28
- * kills all running VMs.
29
- */
30
- export declare const PROTECTED_INTERFACES: readonly string[];
31
24
  /** Extended ManagedAgent that includes the allocated IP for cleanup */
32
25
  export interface FirecrackerManagedAgent extends ManagedAgent {
33
26
  /** Allocated IP address for TAP/IP release during destroy */
@@ -80,6 +73,11 @@ export interface FirecrackerScalerBackendOptions {
80
73
  cidr?: string;
81
74
  /** Gateway IP for guest networking */
82
75
  gateway: string;
76
+ /**
77
+ * Extra `host:address` mappings the rootfs `/init` appends to each guest's
78
+ * `/etc/hosts`; `host-gateway` resolves to {@link gateway}. None by default.
79
+ */
80
+ extraHosts?: string[];
83
81
  /** Netmask for guest networking */
84
82
  netmask: string;
85
83
  /** nft table name for host-network diagnostics. @default 'kici' */
@@ -145,6 +143,8 @@ export declare class FirecrackerScalerBackend implements ScalerBackend {
145
143
  private readonly bridgeName;
146
144
  private readonly cidr;
147
145
  private readonly gateway;
146
+ /** The MMDS `kici-extra-hosts` value, or undefined when the scaler maps no host. */
147
+ private readonly guestExtraHosts;
148
148
  /** Host services the orchestrator directed agents at, as `hostAccess` entries. */
149
149
  private readonly hostServices?;
150
150
  private readonly netmask;
@@ -180,6 +180,11 @@ export declare class FirecrackerScalerBackend implements ScalerBackend {
180
180
  * because `cleanupFailedSpawn` removes the tracking entry.
181
181
  */
182
182
  private abandonSpawn;
183
+ /**
184
+ * {@link abandonSpawn} from a path that cannot await it (an abort listener, a
185
+ * process exit handler). A failure is logged.
186
+ */
187
+ private abandonSpawnDetached;
183
188
  getScalerContext(agentId: string): Record<string, unknown> | undefined;
184
189
  /**
185
190
  * Bridge config for host-network diagnostics (read-only snapshot).
@@ -305,9 +310,9 @@ export declare class FirecrackerScalerBackend implements ScalerBackend {
305
310
  /**
306
311
  * Default interval for periodic orphan sweeps (15 minutes).
307
312
  *
308
- * Long-running orchestrators need in-process orphan sweeps because the
309
- * external kici-leak-sweep timer skips TAP cleanup while a staging
310
- * orchestrator is active (to avoid racing spawns). Without this, leaked
313
+ * Long-running orchestrators need in-process orphan sweeps because a
314
+ * host-level cleanup job skips TAP cleanup while an orchestrator is active
315
+ * (to avoid racing spawns). Without this, leaked
311
316
  * TAPs accumulate until the orchestrator restarts — which can be weeks.
312
317
  */
313
318
  private static readonly ORPHAN_SWEEP_INTERVAL_MS;
@@ -0,0 +1,20 @@
1
+ /** The address keyword for the bridge gateway, as the container runtimes spell it. */
2
+ export declare const HOST_GATEWAY = "host-gateway";
3
+ export interface ExtraHost {
4
+ host: string;
5
+ /** An IPv4 or IPv6 address, or {@link HOST_GATEWAY}. */
6
+ address: string;
7
+ }
8
+ /**
9
+ * Parse one `host:address` entry. The host ends at the first colon, so an
10
+ * IPv6 address keeps its own colons. Throws on a malformed entry.
11
+ */
12
+ export declare function parseExtraHost(entry: string): ExtraHost;
13
+ /**
14
+ * The MMDS value the rootfs `/init` reads: `host:address` pairs joined by
15
+ * commas, with `host-gateway` replaced by `gateway`. `undefined` when the
16
+ * scaler configures no mapping, so the guest gets none. Throws on a malformed
17
+ * entry, and on `host-gateway` when `gateway` is not an IP address.
18
+ */
19
+ export declare function renderGuestExtraHosts(entries: readonly string[] | undefined, gateway: string): string | undefined;
20
+ //# sourceMappingURL=firecracker-extra-hosts.d.ts.map
@@ -13,10 +13,9 @@
13
13
  * `mkdir` succeeds for exactly one caller when the directory does not exist,
14
14
  * so it works as a portable `flock` substitute without any native dependency.
15
15
  *
16
- * The plan considered `proper-lockfile` and `fs-ext` first; neither is a
17
- * transitive dep today (`pnpm why proper-lockfile` and `pnpm why fs-ext`
18
- * both empty), so we use the documented `mkdir` fallback. This avoids
19
- * adding a native binding for the sake of a single locking primitive.
16
+ * Neither `proper-lockfile` nor `fs-ext` is a dependency, so this uses the
17
+ * `mkdir` lock instead. This avoids adding a native binding for the sake of
18
+ * a single locking primitive.
20
19
  *
21
20
  * ## Crash safety
22
21
  *
@@ -11,6 +11,21 @@ import { ScaleDownReason } from './scaler-events.js';
11
11
  import { type ScalerAgentView } from './agent-fit.js';
12
12
  import type { ScalerEventEmitterLike } from './event-backend.js';
13
13
  import type { ClaimStore, ClaimedCredentials } from './claim-store.js';
14
+ /**
15
+ * How long a graceful shutdown waits for the scaler backends to stop their
16
+ * agents. It is the first window inside the coordinator's 30 s shutdown limit,
17
+ * and every later step (the HTTP stop grace, the database drain) still has to
18
+ * fit after it.
19
+ *
20
+ * A container stop normally takes at most its own 10 s stop timeout, but the
21
+ * container runtime can take far longer: a Docker daemon that misses a
22
+ * container's exit waits out the stop timeout and then another 10 s for its
23
+ * kill, and one such container held the whole step for 29.7 s. Past this
24
+ * window the orchestrator logs each backend still stopping and continues. The
25
+ * runtime finishes the stop on its own, and the next start's orphan cleanup
26
+ * removes any agent container that is still there.
27
+ */
28
+ export declare const SCALER_SHUTDOWN_GRACE_MS = 15000;
14
29
  import type { BackendFailureSummary } from './failure-tracker.js';
15
30
  import type { ScalerBackend, ScalerConfig, ScalerEntry, ScaleResult, ScalerEvent, ResourceCap, ValidationResult, ResolvedContainerSpawn } from './types.js';
16
31
  import type { ScalerStateStore, ScalerStateRecovery, ReapCandidate } from './scaler-state-store.js';
@@ -948,9 +963,12 @@ export declare class ScalerManager {
948
963
  */
949
964
  private completeLocalRegistration;
950
965
  /**
951
- * Called from agent-handler.ts when an agent disconnects.
966
+ * Called from agent-handler.ts when an agent disconnects. `reason` is what an
967
+ * event scaler's scale-down carries: `shutdown` for an ordinary disconnect,
968
+ * `heartbeat-timeout` for an agent the orchestrator dropped without waiting
969
+ * for its socket.
952
970
  */
953
- onAgentDisconnected(agentId: string): void;
971
+ onAgentDisconnected(agentId: string, reason?: ScaleDownReason): void;
954
972
  /**
955
973
  * Tear down a stranded provision the `EventProvisionReaper` found.
956
974
  *
@@ -1145,6 +1163,12 @@ export declare class ScalerManager {
1145
1163
  * Sum of all backends' active count + spawning agents.
1146
1164
  */
1147
1165
  getGlobalActiveCount(): number;
1166
+ /**
1167
+ * Shut every backend down in parallel, waiting at most
1168
+ * {@link SCALER_SHUTDOWN_GRACE_MS} for the slowest. A backend still stopping
1169
+ * when the window closes is logged by name and left to finish on its own.
1170
+ */
1171
+ private shutdownBackendsWithinGrace;
1148
1172
  /**
1149
1173
  * Stop warm pool, shutdown all backends, clear tracking maps.
1150
1174
  */
@@ -346,7 +346,7 @@ export declare class ScalerStateStore {
346
346
  * the prune's verdict does not depend on it. It is written because the row
347
347
  * is the only surviving account of what became of a provision once the spawn
348
348
  * row is gone — which is what an operator investigating a torn-down
349
- * provision, and the E2E that pins this behaviour, read it for.
349
+ * provision reads it for.
350
350
  */
351
351
  recordProvisionCondemned(agentId: string, scalerName: string, reason: string): Promise<void>;
352
352
  /**
@@ -476,7 +476,10 @@ export interface ScalerEntry {
476
476
  runtime?: 'docker' | 'podman' | 'auto';
477
477
  /** Orchestrator URL for spawned agents to connect back to */
478
478
  orchestratorUrl?: string;
479
- /** Extra host:IP mappings injected into spawned containers (e.g. ["verdaccio.local:host-gateway"]) */
479
+ /**
480
+ * Extra host:IP mappings for spawned agents (e.g. ["registry.local:host-gateway"]): the
481
+ * container runtime's ExtraHosts, or each Firecracker guest's /etc/hosts.
482
+ */
480
483
  extraHosts?: string[];
481
484
  /** Disable nftables-based network isolation for container backend (default: true). Set to false when nft is unavailable. */
482
485
  networkIsolation?: boolean;
@@ -4,7 +4,7 @@
4
4
  * Records all secret access/denial events to the secret_audit_log table
5
5
  * for compliance and security monitoring.
6
6
  *
7
- * Phase D: query() supports cold-store read-through via the optional
7
+ * query() supports cold-store read-through via the optional
8
8
  * `coldStore` constructor argument and an `includeArchived` query
9
9
  * filter. Hot-only behavior is unchanged when neither is supplied.
10
10
  */
@@ -54,7 +54,7 @@ export declare class AuditLogger {
54
54
  limit?: number;
55
55
  offset?: number;
56
56
  /**
57
- * Phase D opt-in. When true, falls through to cold-store via
57
+ * Opt-in. When true, falls through to cold-store via
58
58
  * `loadSecretAuditLogRange` for any portion of the requested
59
59
  * window past the warm cutoff. Default false preserves the
60
60
  * original semantics.
@@ -56,9 +56,8 @@ export declare const REDUCED_PRIVILEGE_MARKER = "**Reduced privileges (untrusted
56
56
  * event, and an untrusted tier also reaches an internal-event child run that
57
57
  * inherited it.
58
58
  *
59
- * Kept in step with the dashboard's reduced-privilege banner
60
- * (`packages/dashboard/src/components/run-detail/degraded-run-banner.tsx`),
61
- * which describes the same run and may be read beside these checks.
59
+ * Kept in step with the dashboard's reduced-privilege banner, which
60
+ * describes the same run and may be read beside these checks.
62
61
  */
63
62
  export declare function buildReducedPrivilegeNote(tier: string | null | undefined, lockFileSource?: string | null): string | null;
64
63
  //# sourceMappingURL=reduced-privilege-note.d.ts.map
@@ -67,9 +67,9 @@ export declare class TrustPolicyStore {
67
67
  }
68
68
  /**
69
69
  * Build a TrustPolicyStore backed by its own connection pool to the given
70
- * orchestrator database URL. Mirrors `createHeldRunStoreFromUrl`; consumed by
71
- * E2E tests that assert the pushed policy is persisted in the real deployed
72
- * orchestrator DB rather than held in process memory.
70
+ * orchestrator database URL. Mirrors `createHeldRunStoreFromUrl`; exported for
71
+ * tests that assert the pushed policy is persisted in a real orchestrator DB
72
+ * rather than held in process memory.
73
73
  */
74
74
  export declare function createTrustPolicyStoreFromUrl(databaseUrl: string, opts?: {
75
75
  maxConnections?: number;
package/dist/server.d.ts CHANGED
@@ -7,12 +7,13 @@
7
7
  *
8
8
  * Both modes connect a PlatformClient to the Platform relay and run an agent WS server.
9
9
  *
10
- * Startup sequence follows packages/platform/src/server.ts pattern:
10
+ * Startup sequence (the same one the Platform follows):
11
11
  * config -> DB -> migrations -> provider registry -> dispatcher -> PlatformClient -> app -> HTTP -> heartbeat
12
12
  *
13
13
  * Graceful shutdown in reverse order:
14
14
  * Platform client -> agent WS -> heartbeat -> HTTP -> DB
15
15
  */
16
+ import '@kici-dev/shared/load-service-env-file';
16
17
  import type { OrchestratorFaultInjection } from './fault-injection-types.js';
17
18
  /**
18
19
  * Boot the Platform-connected orchestrator. Factored out of the module entry so