@kici-dev/orchestrator 0.1.3 → 0.1.6

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 (73) hide show
  1. package/dist/agent/dispatcher.d.ts +26 -0
  2. package/dist/agent/ownership-tracker.d.ts +45 -3
  3. package/dist/app.d.ts +9 -3
  4. package/dist/audit/access-log.d.ts +7 -0
  5. package/dist/cli/api-client.d.ts +14 -0
  6. package/dist/cli/commands/cluster-name.d.ts +18 -0
  7. package/dist/cli/commands/db.d.ts +9 -6
  8. package/dist/cli/commands/org-settings.d.ts +2 -1
  9. package/dist/cli/commands/shared/secret-input.d.ts +46 -0
  10. package/dist/cli/commands/variable.d.ts +18 -0
  11. package/dist/cli/service/index.d.ts +1 -0
  12. package/dist/cli/service/launchd.d.ts +19 -0
  13. package/dist/cli/service/privilege.d.ts +21 -0
  14. package/dist/cli/wizard/orchestrator-wizard.d.ts +4 -2
  15. package/dist/cli.js +1074 -225
  16. package/dist/cluster/coordinator.d.ts +3 -3
  17. package/dist/cluster/join-token.d.ts +21 -13
  18. package/dist/cluster/peer-client.d.ts +9 -0
  19. package/dist/config/cluster-id.d.ts +23 -0
  20. package/dist/config/cluster-name.d.ts +39 -0
  21. package/dist/config.d.ts +8 -0
  22. package/dist/dashboard/handler.d.ts +54 -2
  23. package/dist/db/migrations/019_generic_sources_change_notify.d.ts +25 -0
  24. package/dist/db/migrations/020_org_settings_dashboard_write_policy.d.ts +17 -0
  25. package/dist/db/migrations/021_check_run_tracking.d.ts +26 -0
  26. package/dist/db/migrations/022_scaler_manager_state.d.ts +29 -0
  27. package/dist/db/migrations/023_dispatch_queue_recovery_deadline.d.ts +26 -0
  28. package/dist/db/types.d.ts +137 -0
  29. package/dist/events/event-store.d.ts +9 -2
  30. package/dist/events/trust-store.d.ts +7 -0
  31. package/dist/events/types.d.ts +33 -0
  32. package/dist/metrics/scheduled-jobs.d.ts +26 -5
  33. package/dist/orchestrator-core.d.ts +16 -2
  34. package/dist/pipeline/processor.d.ts +2 -2
  35. package/dist/pipeline/rerun.d.ts +2 -2
  36. package/dist/pipeline/test-pipeline.d.ts +2 -2
  37. package/dist/policy/dashboard-write-policy.d.ts +115 -0
  38. package/dist/queue/job-queue.d.ts +54 -1
  39. package/dist/reporting/{commit-status.d.ts → check-run-reporter.d.ts} +94 -16
  40. package/dist/reporting/check-run-tracking-store.d.ts +133 -0
  41. package/dist/routes/admin-access-log.d.ts +1 -0
  42. package/dist/routes/admin-backends.d.ts +9 -1
  43. package/dist/routes/admin-cluster-name.d.ts +50 -0
  44. package/dist/routes/admin-db.d.ts +9 -1
  45. package/dist/routes/admin-environments.d.ts +10 -6
  46. package/dist/routes/admin-event-dlq.d.ts +1 -0
  47. package/dist/routes/admin-event-log.d.ts +1 -0
  48. package/dist/routes/admin-events.d.ts +19 -0
  49. package/dist/routes/admin-maintenance.d.ts +9 -1
  50. package/dist/routes/admin-org-settings.d.ts +10 -1
  51. package/dist/routes/admin-queue-execution.d.ts +1 -0
  52. package/dist/routes/admin-registrations.d.ts +1 -0
  53. package/dist/routes/admin-runs.d.ts +1 -0
  54. package/dist/routes/admin-scheduled-jobs.d.ts +1 -0
  55. package/dist/routes/admin-sources.d.ts +24 -1
  56. package/dist/routes/admin.d.ts +22 -0
  57. package/dist/scaler/manager.d.ts +38 -0
  58. package/dist/scaler/scaler-state-store.d.ts +102 -0
  59. package/dist/secrets/routing-key-scope.d.ts +43 -0
  60. package/dist/server.js +10098 -6961
  61. package/dist/sources/build-platform-sources.d.ts +26 -0
  62. package/dist/sources/source-manager.d.ts +14 -0
  63. package/dist/stale-detector/stale-run-detector.d.ts +17 -5
  64. package/dist/standalone.js +7525 -5172
  65. package/dist/webhook/generic-sources-listener.d.ts +89 -0
  66. package/dist/webhook/register-source-bundle.d.ts +57 -0
  67. package/dist/ws/dashboard-backends-handler.d.ts +14 -0
  68. package/dist/ws/dashboard-env-handler.d.ts +7 -0
  69. package/dist/ws/dashboard-global-workflows-handler.d.ts +6 -0
  70. package/dist/ws/dashboard-registrations-handler.d.ts +7 -0
  71. package/dist/ws/platform-client.d.ts +57 -2
  72. package/package.json +3 -3
  73. package/sbom.spdx.json +40 -35
@@ -206,6 +206,32 @@ export declare class Dispatcher {
206
206
  * from a previous orchestrator instance.
207
207
  */
208
208
  startRecoveryTimer(jobId: string, agentId: string, runId: string): Promise<void>;
209
+ /**
210
+ * Rebuild the in-memory `recoveringJobs` Map from persisted
211
+ * `dispatch_queue` rows after a coord boot / Raft leader switch.
212
+ *
213
+ * For each `status='recovering'` row:
214
+ * - if `recovery_deadline` is in the future, recreate a setTimeout
215
+ * with the remaining window so the local sweep still fires.
216
+ * - if the deadline is already in the past, leave the row alone —
217
+ * the leader-gated `sweepExpiredRecoveries()` will pick it up on
218
+ * its next tick (which avoids two coords racing to mark the same
219
+ * job failed during recovery).
220
+ * - rows with NULL deadline (pre-migration recovering jobs) are
221
+ * fast-failed by the sweep on its first run.
222
+ */
223
+ recoverState(): Promise<void>;
224
+ /**
225
+ * Leader-gated sweep: mark every `recovering` row whose
226
+ * `recovery_deadline < now` as `failed` and fire the per-job
227
+ * `onRecoveryTimeout` hook. Intended to run on the Raft leader at a
228
+ * fixed interval so jobs whose owning coord crashed mid-recovery
229
+ * still reach a terminal state.
230
+ *
231
+ * Safe to call on non-leaders (idempotent due to the WHERE clause)
232
+ * but skipping the call on followers avoids redundant DB updates.
233
+ */
234
+ sweepExpiredRecoveries(): Promise<number>;
209
235
  /**
210
236
  * Stop all recovery timers. Called during graceful shutdown.
211
237
  */
@@ -13,6 +13,18 @@
13
13
  interface OwnershipTrackerOpts {
14
14
  /** Check if a job is owned by the given agent (active or in grace window). */
15
15
  isJobOwnedByAgent: (agentId: string, jobId: string) => boolean;
16
+ /**
17
+ * Optional DB-backed fallback. Returns true when the orchestrator
18
+ * DB shows the (agent, job) pair as previously owned by this coord
19
+ * OR a sibling coord — i.e. either currently `dispatched`/`recovering`
20
+ * with the same `agent_id` / `recovery_agent_id`, or recently
21
+ * `completed`/`failed`. When a Raft leader switch wipes the
22
+ * in-memory `agentJobs` Map on the replacement coord, this fallback
23
+ * accepts late `log.chunk` / `step.status` chunks from agents that
24
+ * are still draining instead of rejecting them as ownership
25
+ * violations.
26
+ */
27
+ isJobOwnedByAgentInDb?: (agentId: string, jobId: string) => Promise<boolean>;
16
28
  /** Callback to disconnect an agent after escalation. */
17
29
  onDisconnect: (agentId: string, reason: string) => void;
18
30
  /** Number of violations before escalation (default: 5). */
@@ -22,23 +34,53 @@ interface OwnershipTrackerOpts {
22
34
  }
23
35
  export declare class OwnershipTracker {
24
36
  private readonly isJobOwnedByAgent;
37
+ private readonly isJobOwnedByAgentInDb?;
25
38
  private readonly onDisconnect;
26
39
  private readonly violationThreshold;
27
40
  private readonly violationWindowMs;
28
41
  private readonly violations;
42
+ /**
43
+ * L1 cache of `(agentId, jobId)` pairs proven by a positive DB
44
+ * fallback. Pre-empts a synchronous warn-and-reject for the very
45
+ * next chunk on the same pair, since `checkOwnership` is called
46
+ * once per inbound message and the local Map repopulation lags
47
+ * behind. The cache is intentionally small (per-agent capped) and
48
+ * is cleaned on agent disconnect via `cleanup(agentId)`.
49
+ */
50
+ private readonly dbAccepted;
29
51
  constructor(opts: OwnershipTrackerOpts);
30
52
  /**
31
- * Check if an agent owns a job. Returns true if ownership is valid.
32
- * On violation: logs warning, records violation, may escalate to disconnect.
53
+ * Synchronous ownership check. Returns true if ownership is valid
54
+ * per the in-memory dispatcher OR a previously-accepted DB fallback.
55
+ *
56
+ * Returns false WITHOUT recording a violation when a DB fallback is
57
+ * configured: the caller is expected to invoke `validateAsync` to
58
+ * confirm or reject the ownership before treating it as a real
59
+ * violation. This makes the writer idempotent across HA failover —
60
+ * a `log.chunk` arriving on the replacement coord doesn't get
61
+ * counted as a violation just because the local Map is empty.
33
62
  */
34
63
  checkOwnership(agentId: string, jobId: string, messageType: string): boolean;
64
+ /**
65
+ * Async fallback used by message handlers that want HA-safe
66
+ * acceptance of post-failover chunks. Returns true if the DB shows
67
+ * the (agent, job) pair as currently or recently owned by any coord
68
+ * in the cluster. On true, caches the result so subsequent same-pair
69
+ * chunks return true synchronously via `checkOwnership`. On false,
70
+ * records a violation exactly once (no recursive recordViolation
71
+ * from the synchronous call site — `checkOwnership` skipped it
72
+ * when the DB fallback was configured).
73
+ */
74
+ validateAsync(agentId: string, jobId: string, messageType: string): Promise<boolean>;
35
75
  /**
36
76
  * Record a violation for an agent. If threshold is exceeded within the
37
77
  * violation window, triggers disconnect escalation.
38
78
  */
39
79
  private recordViolation;
40
80
  /**
41
- * Clean up violation tracking for a disconnected agent.
81
+ * Clean up violation tracking AND the DB-accepted cache for a
82
+ * disconnected agent. Avoids cross-agent leakage when the same
83
+ * agent id is later reused.
42
84
  */
43
85
  cleanup(agentId: string): void;
44
86
  }
package/dist/app.d.ts CHANGED
@@ -34,7 +34,7 @@ import type { PendingBuildTracker } from './cache/index.js';
34
34
  import type { PendingInitTracker } from './cache/index.js';
35
35
  import type { PendingDynamicTracker } from './cache/index.js';
36
36
  import type { CacheStorage } from './storage/types.js';
37
- import { type CommitStatusReporter } from './reporting/commit-status.js';
37
+ import { type CheckRunReporter } from './reporting/check-run-reporter.js';
38
38
  import type { ExecutionTracker } from './reporting/execution-tracker.js';
39
39
  import type { LogWriter } from './reporting/log-writer.js';
40
40
  import type { LogStorage } from './reporting/log-storage.js';
@@ -108,7 +108,7 @@ export interface AppDependencies {
108
108
  /** Pending dynamic tracker for DynamicJobFn evaluation coordination. */
109
109
  pendingDynamics?: PendingDynamicTracker;
110
110
  /** Commit status reporter for setting pending/success/failure/error on commits. Optional. */
111
- commitStatusReporter?: CommitStatusReporter;
111
+ checkRunReporter?: CheckRunReporter;
112
112
  /** Execution tracker for DB persistence of execution state. Optional — requires database. */
113
113
  executionTracker?: ExecutionTracker;
114
114
  /** Log writer for persisting agent log chunks. Optional — requires database. */
@@ -123,6 +123,12 @@ export interface AppDependencies {
123
123
  ownershipTracker?: OwnershipTracker;
124
124
  /** Admin API route dependencies. Optional -- only mounted when secrets management is configured. */
125
125
  adminDeps?: AdminRouteDeps;
126
+ /**
127
+ * Resolves the public webhook URL for a newly added source (for
128
+ * `kici-admin source add` output). Built by the entry point where the
129
+ * Platform client + config are in scope; passed into the admin source routes.
130
+ */
131
+ resolveSourceWebhookUrl?: AdminRouteDeps['resolveSourceWebhookUrl'];
126
132
  /** Config admin API route dependencies. Optional -- mounted when config management is available. */
127
133
  configRouteDeps?: ConfigRouteDeps;
128
134
  /** Event router for internal event delivery. Optional -- if not set, event routing is inactive. */
@@ -202,7 +208,7 @@ export interface AppDependencies {
202
208
  /**
203
209
  * In-memory cache for step source locations extracted from lock files.
204
210
  * Keyed by `workflowName:jobName`, stores source location arrays indexed by step index.
205
- * Populated during webhook processing, used by CommitStatusReporter for annotations.
211
+ * Populated during webhook processing, used by CheckRunReporter for annotations.
206
212
  */
207
213
  export declare class SourceLocationStore {
208
214
  private readonly cache;
@@ -15,6 +15,13 @@ export interface AccessLogRecord {
15
15
  source: AccessLogSource;
16
16
  outcome: AccessLogOutcome;
17
17
  errorMessage?: string | null;
18
+ /**
19
+ * Extra key/value pairs merged into `actor_meta` on insert. Lets
20
+ * callers attach action-specific context (e.g. which dashboard-write
21
+ * operation flipped) without overloading other columns. Values must
22
+ * be JSON-serialisable.
23
+ */
24
+ meta?: Record<string, unknown>;
18
25
  }
19
26
  export interface AccessLogQueryFilter {
20
27
  orgId?: string;
@@ -59,6 +59,10 @@ export declare class AdminApiClient {
59
59
  * Public PATCH request returning parsed JSON.
60
60
  */
61
61
  patch<T>(path: string, body: unknown): Promise<T>;
62
+ /**
63
+ * Public PUT request returning parsed JSON.
64
+ */
65
+ put<T>(path: string, body: unknown): Promise<T>;
62
66
  /**
63
67
  * Public DELETE request returning parsed JSON.
64
68
  */
@@ -75,6 +79,16 @@ export declare class AdminApiClient {
75
79
  }>;
76
80
  setSecret(orgId: string, scope: string, key: string, value: string): Promise<void>;
77
81
  deleteSecret(orgId: string, scope: string, key: string): Promise<void>;
82
+ listVariables(orgId: string, environment: string): Promise<{
83
+ variables: Array<{
84
+ key: string;
85
+ value: string;
86
+ locked: boolean;
87
+ updated_at: string;
88
+ }>;
89
+ }>;
90
+ setVariable(orgId: string, environment: string, key: string, value: string, locked?: boolean): Promise<void>;
91
+ deleteVariable(orgId: string, environment: string, key: string): Promise<void>;
78
92
  rotateKey(): Promise<{
79
93
  reEncrypted: number;
80
94
  reEncryptedConfigs: number;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Cluster-name management commands for kici-admin.
3
+ *
4
+ * Subcommand namespace: `kici-admin cluster-name {get,set}`.
5
+ *
6
+ * The cluster name is the human-friendly identifier that surfaces on
7
+ * Platform's connection registry and in the dashboard's per-orch URL
8
+ * segment. Mutating it requires admin access (RBAC `secret.write`).
9
+ *
10
+ * Talks to the orchestrator admin API directly (not the Platform
11
+ * dashboard proxy), so the CLI stays operable even when Platform is
12
+ * unavailable. Backed by
13
+ * `packages/orchestrator/src/routes/admin-cluster-name.ts`.
14
+ */
15
+ import type { Command } from 'commander';
16
+ import type { AdminApiClient } from '../api-client.js';
17
+ export declare function registerClusterNameCommands(program: Command, getClient: () => AdminApiClient): void;
18
+ //# sourceMappingURL=cluster-name.d.ts.map
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * Database management commands for kici-admin.
3
3
  *
4
- * db migrate Run pending migrations (HTTP — orchestrator must be up)
5
- * db fresh DROP + CREATE + migrate + store content hash (direct DB)
6
- * db ensure <name> CREATE DATABASE IF NOT EXISTS (direct DB)
7
- * db create-role CREATE ROLE LOGIN [CREATEDB] (direct DB)
8
- * db create-readonly-user Read-only role + GRANT SELECT (direct DB)
9
- * db check-schema Compare bundled migrations vs live schema (direct DB)
4
+ * db migrate Run pending migrations (HTTP — orchestrator must be up)
5
+ * db fresh DROP + CREATE + migrate + store content hash (direct DB)
6
+ * db ensure <name> CREATE DATABASE IF NOT EXISTS (direct DB)
7
+ * db create-role CREATE ROLE LOGIN [CREATEDB] (direct DB)
8
+ * db create-readonly-user Read-only role + GRANT SELECT (direct DB)
9
+ * db check-schema Compare bundled migrations vs live schema (direct DB)
10
+ * db collation-check Check pg_database.datcollversion vs running libc (direct DB)
11
+ * db reindex REINDEX DATABASE CONCURRENTLY (direct DB)
12
+ * db refresh-collation-version ALTER DATABASE REFRESH COLLATION VERSION (direct DB)
10
13
  *
11
14
  * The direct-DB subcommands cannot go through HTTP because the target database
12
15
  * may not exist yet or is about to be dropped. They follow the same pattern
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Org-settings management commands for kici-admin.
3
3
  *
4
- * Subcommand namespace: `kici-admin org-settings global-workflows <subcommand>`.
4
+ * Subcommand namespace: `kici-admin org-settings global-workflows <subcommand>`
5
+ * and `kici-admin org-settings dashboard-writes <subcommand>`.
5
6
  *
6
7
  * Talks to the orchestrator admin API directly (not the Platform dashboard
7
8
  * proxy), so the CLI stays operable even when Platform is unavailable. Backed
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Shared input-mode helper for `kici-admin secret set` and
3
+ * `kici-admin variable set`.
4
+ *
5
+ * Resolves a value from exactly one of:
6
+ * --value <plaintext> — argv literal (warned; goes into shell history)
7
+ * --prompt — interactive no-echo prompt (TTY only)
8
+ * --from-stdin — pipe (full stdin until EOF)
9
+ * --from-file <path> — file contents (--trim default-on)
10
+ * --from-env <VAR> — env var contents
11
+ *
12
+ * Default-mode resolution when no flag is provided:
13
+ * TTY -> --prompt
14
+ * non-TTY -> --from-stdin
15
+ *
16
+ * Optional checks:
17
+ * --confirm-fingerprint <hex> — SHA-256 fingerprint guard against
18
+ * paste corruption.
19
+ *
20
+ * The helper does NOT print to stdout (it returns the value). It DOES
21
+ * write to stderr for the `--value` warning, the prompt label, and any
22
+ * "empty value" warning. Stdout is reserved for the caller's confirmation
23
+ * output so the caller's `--dry-run` summary stays clean.
24
+ */
25
+ export interface SecretInputOptions {
26
+ value?: string;
27
+ fromStdin?: boolean;
28
+ fromFile?: string;
29
+ fromEnv?: string;
30
+ prompt?: boolean;
31
+ trim?: boolean;
32
+ confirmFingerprint?: string;
33
+ }
34
+ export interface SecretInputResult {
35
+ value: string;
36
+ /** Which input mode supplied the value (after default resolution). */
37
+ source: 'value' | 'stdin' | 'file' | 'env' | 'prompt';
38
+ }
39
+ export declare function resolveSecretInput(opts: SecretInputOptions, stderr?: NodeJS.WritableStream, stdin?: NodeJS.ReadStream): Promise<SecretInputResult>;
40
+ /**
41
+ * Compute the canonical SHA-256 fingerprint for a value. Helper for
42
+ * callers (tests, --dry-run output) that want to display the same hex
43
+ * the user would pass to `--confirm-fingerprint`.
44
+ */
45
+ export declare function fingerprintValue(value: string): string;
46
+ //# sourceMappingURL=secret-input.d.ts.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Environment variable management commands for kici-admin.
3
+ *
4
+ * kici-admin variable list <orgId> <environment>
5
+ * kici-admin variable get <orgId> <environment> <key>
6
+ * kici-admin variable set <orgId> <environment> <key> [--value | --from-stdin | --from-file | --from-env | --prompt]
7
+ * kici-admin variable delete <orgId> <environment> <key>
8
+ *
9
+ * Org-level environment variables are plaintext-at-rest in the
10
+ * orchestrator's DB; the dashboard write path is gated by the
11
+ * `variables.set` / `variables.delete` switches in the dashboard-write
12
+ * policy. This CLI is the always-available authority path when the
13
+ * dashboard is disabled for either switch.
14
+ */
15
+ import type { Command } from 'commander';
16
+ import type { AdminApiClient } from '../api-client.js';
17
+ export declare function registerVariableCommands(program: Command, getClient: () => AdminApiClient): void;
18
+ //# sourceMappingURL=variable.d.ts.map
@@ -9,6 +9,7 @@
9
9
  export type { ServiceManager, ServiceConfig, ServiceStatus, ServiceState, ServicePlatform, RestartPolicy, LogOptions, } from './types.js';
10
10
  export { DEFAULT_RESTART_POLICY } from './types.js';
11
11
  export { detectPlatform, isRoot, getConfigDir, getLogDir, getCacheDir } from './platform-detect.js';
12
+ export { resolveUserLevel, type PrivilegeOpts } from './privilege.js';
12
13
  import type { ServiceManager, ServicePlatform } from './types.js';
13
14
  /**
14
15
  * Create a ServiceManager for the given platform.
@@ -22,6 +22,25 @@ export declare class LaunchdServiceManager implements ServiceManager {
22
22
  * Visible for testing.
23
23
  */
24
24
  generatePlist(config: ServiceConfig): string;
25
+ /**
26
+ * Resolve the launchctl domain string for a service config.
27
+ *
28
+ * - User-level (LaunchAgent at `~/Library/LaunchAgents/…`) → `gui/<uid>`
29
+ * - System-level (LaunchDaemon at `/Library/LaunchDaemons/…`) → `system`
30
+ *
31
+ * The legacy `launchctl load` / `unload` verbs implicitly inferred the
32
+ * domain from the plist's filesystem location, but they fail silently on
33
+ * headless macOS hosts where no GUI session exists (the `gui/<uid>` domain
34
+ * is not available without a console login). The modern `bootstrap` /
35
+ * `bootout` / `kickstart` / `kill` verbs take the domain explicitly, so a
36
+ * system-level LaunchDaemon loads regardless of whether anyone is logged
37
+ * in at the console — exactly what we need for headless deploy targets.
38
+ */
39
+ private domain;
40
+ /** `<domain>/<label>` — the target string for kickstart/kill/print/enable. */
41
+ private domainTarget;
42
+ /** Is the service currently loaded in its target domain? */
43
+ private isLoaded;
25
44
  install(config: ServiceConfig): Promise<void>;
26
45
  uninstall(config: ServiceConfig): Promise<void>;
27
46
  start(config: ServiceConfig): Promise<void>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Resolve the system-vs-user privilege level for a service lifecycle command.
3
+ *
4
+ * Five CLI verbs (install / start / stop / restart / uninstall) need to agree
5
+ * on whether they're operating against the user-level service
6
+ * (~/Library/LaunchAgents, `systemctl --user`) or the system-level one
7
+ * (/Library/LaunchDaemons, `systemctl`). Default behavior (no flag) is to
8
+ * auto-detect based on UID — non-root → user-level, root → system-level.
9
+ *
10
+ * Explicit `--system` / `--user-level` flags override the auto-detect.
11
+ * They're mutually exclusive: passing both throws. Passing `--system`
12
+ * without root throws with an actionable "re-run under sudo" message.
13
+ */
14
+ export interface PrivilegeOpts {
15
+ /** Force system-level install/lifecycle. Requires root. */
16
+ system?: boolean;
17
+ /** Force user-level install/lifecycle. */
18
+ userLevel?: boolean;
19
+ }
20
+ export declare function resolveUserLevel(opts: PrivilegeOpts): boolean;
21
+ //# sourceMappingURL=privilege.d.ts.map
@@ -11,6 +11,7 @@ interface OrchestratorInstallConfig {
11
11
  databaseUrl: string;
12
12
  port: number;
13
13
  secretsKey: string;
14
+ bootstrapAdminToken: string;
14
15
  platformUrl?: string;
15
16
  platformToken?: string;
16
17
  /** Source to add after orchestrator is running. */
@@ -30,8 +31,9 @@ interface OrchestratorInstallConfig {
30
31
  * 2. Database URL
31
32
  * 3. Port
32
33
  * 4. Secrets encryption key
33
- * 5. Platform URL + token (if platform/hybrid mode)
34
- * 6. Webhook secret (if hybrid/independent mode)
34
+ * 5. Bootstrap admin token (for kici-admin authentication)
35
+ * 6. Platform URL + token (if platform/hybrid mode)
36
+ * 7. Webhook secret (if hybrid/independent mode)
35
37
  */
36
38
  export declare function runOrchestratorWizard(): Promise<OrchestratorInstallConfig>;
37
39
  export {};