@kici-dev/orchestrator 0.15.0 → 0.16.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 (146) hide show
  1. package/dist/__test-helpers__/scratch-db.d.ts +16 -0
  2. package/dist/agent/registry.d.ts +1 -8
  3. package/dist/app-on-error.d.ts +1 -1
  4. package/dist/artifacts/artifact-store.d.ts +0 -2
  5. package/dist/audit/access-log.d.ts +1 -1
  6. package/dist/cache/source-cache.d.ts +1 -1
  7. package/dist/cache/user-cache.d.ts +0 -28
  8. package/dist/cli/api-client.d.ts +27 -1
  9. package/dist/cli/commands/access-log.d.ts +1 -1
  10. package/dist/cli/commands/cold-store-impl.d.ts +7 -84
  11. package/dist/cli/commands/db.d.ts +1 -0
  12. package/dist/cli/commands/orchestrator-service/status.d.ts +2 -0
  13. package/dist/cli/commands/org.d.ts +12 -0
  14. package/dist/cli/commands/scaler.d.ts +14 -0
  15. package/dist/cli/commands/secret.d.ts +1 -45
  16. package/dist/cli/commands/service-health.d.ts +21 -13
  17. package/dist/cli/commands/shared/cli-action.d.ts +17 -0
  18. package/dist/cli/commands/shared/db.d.ts +5 -5
  19. package/dist/cli/commands/shared/org-id.d.ts +5 -0
  20. package/dist/cli/commands/shared/service-verbs.d.ts +19 -0
  21. package/dist/cli/commands/shared/table.d.ts +3 -0
  22. package/dist/cli/commands/shared/unbound-context-warning.d.ts +2 -22
  23. package/dist/cli/commands/trust-policy.d.ts +7 -31
  24. package/dist/cli/kici-admin.d.ts +1 -1
  25. package/dist/cli.js +9863 -8201
  26. package/dist/cluster/coordinator.d.ts +2 -2
  27. package/dist/cluster/peer-client.d.ts +27 -1
  28. package/dist/cluster/peer-forget.d.ts +4 -9
  29. package/dist/cluster/peer-handler.d.ts +11 -1
  30. package/dist/cluster/peer-request-waiters.d.ts +26 -0
  31. package/dist/cluster/scaler-orphans-peer.d.ts +4 -9
  32. package/dist/cluster/scaler-reload-fanout.d.ts +29 -0
  33. package/dist/cluster/scaler-reload-peer.d.ts +16 -0
  34. package/dist/cluster/worker-cluster-settings.d.ts +1 -0
  35. package/dist/cold-store/load-access-log-range.d.ts +3 -3
  36. package/dist/cold-store/tables/access-log.d.ts +4 -12
  37. package/dist/cold-store/tables/event-log.d.ts +8 -19
  38. package/dist/cold-store/tables/execution-jobs.d.ts +7 -24
  39. package/dist/cold-store/tables/execution-runs.d.ts +6 -20
  40. package/dist/cold-store/tables/execution-steps.d.ts +8 -26
  41. package/dist/cold-store/tables/secret-audit-log.d.ts +4 -11
  42. package/dist/config/env-overlay.d.ts +3 -8
  43. package/dist/config/reload.d.ts +9 -2
  44. package/dist/config/schema.d.ts +2 -2
  45. package/dist/config/types.d.ts +2 -2
  46. package/dist/config.d.ts +13 -17
  47. package/dist/contexts/held-runs.d.ts +3 -6
  48. package/dist/dashboard/cursor.d.ts +12 -0
  49. package/dist/dashboard/handler.d.ts +5 -12
  50. package/dist/db/deferred-index-build.d.ts +42 -0
  51. package/dist/db/deferred-indexes.d.ts +3 -37
  52. package/dist/db/migrations/100_held_runs_hold_type_vocabulary.d.ts +3 -5
  53. package/dist/db/migrations/158_normalize_legacy_values.d.ts +4 -0
  54. package/dist/db/repos/org-ids-repo.d.ts +87 -0
  55. package/dist/db/schema-snapshot.generated.d.ts +3 -0
  56. package/dist/db/types.d.ts +5 -22
  57. package/dist/fault-injection-types.d.ts +0 -6
  58. package/dist/git/dispatch-git-auth.d.ts +6 -12
  59. package/dist/helpers/json.d.ts +3 -0
  60. package/dist/index.js +133 -136
  61. package/dist/metrics/prometheus.d.ts +0 -5
  62. package/dist/oidc/id-token-claims.d.ts +1 -1
  63. package/dist/oidc/resolve-signer.d.ts +2 -4
  64. package/dist/orchestrator-core.d.ts +10 -3
  65. package/dist/pipeline/global-eval-round.d.ts +2 -26
  66. package/dist/pipeline/install-secrets-resolver.d.ts +0 -3
  67. package/dist/pipeline/manual-schedule.d.ts +1 -7
  68. package/dist/provenance/dispatch-context.d.ts +5 -7
  69. package/dist/provenance/pending-attestations-repo.d.ts +1 -1
  70. package/dist/provenance/trust-root.d.ts +4 -5
  71. package/dist/provenance/verify-deferred-capture.d.ts +3 -3
  72. package/dist/provider-registry.d.ts +13 -40
  73. package/dist/providers/universal-git/ssh-auth.d.ts +0 -5
  74. package/dist/reporting/check-run-reporter.d.ts +8 -21
  75. package/dist/reporting/check-run-summary.d.ts +2 -2
  76. package/dist/reporting/execution-tracker.d.ts +1 -1
  77. package/dist/reporting/log-chunk-sink.d.ts +1 -1
  78. package/dist/reporting/run-summary-fields.d.ts +25 -0
  79. package/dist/reporting/s3-log-storage.d.ts +2 -2
  80. package/dist/routes/admin-access-log.d.ts +2 -9
  81. package/dist/routes/admin-backends.d.ts +2 -9
  82. package/dist/routes/admin-cluster-name.d.ts +2 -8
  83. package/dist/routes/admin-cluster-settings.d.ts +2 -8
  84. package/dist/routes/admin-config.d.ts +0 -3
  85. package/dist/routes/admin-contexts.d.ts +3 -11
  86. package/dist/routes/admin-db.d.ts +2 -9
  87. package/dist/routes/admin-env.d.ts +33 -0
  88. package/dist/routes/admin-event-dlq.d.ts +2 -9
  89. package/dist/routes/admin-event-inspect.d.ts +2 -9
  90. package/dist/routes/admin-event-log.d.ts +2 -9
  91. package/dist/routes/admin-events.d.ts +3 -13
  92. package/dist/routes/admin-held-runs.d.ts +2 -8
  93. package/dist/routes/admin-list-limit.d.ts +3 -0
  94. package/dist/routes/admin-maintenance.d.ts +2 -9
  95. package/dist/routes/admin-orchestrator-drain.d.ts +2 -9
  96. package/dist/routes/admin-org-settings.d.ts +2 -8
  97. package/dist/routes/admin-orgs.d.ts +27 -0
  98. package/dist/routes/admin-peer-forget.d.ts +2 -9
  99. package/dist/routes/admin-queue-execution.d.ts +3 -10
  100. package/dist/routes/admin-registrations.d.ts +3 -14
  101. package/dist/routes/admin-runs.d.ts +3 -14
  102. package/dist/routes/admin-scaler-orphans.d.ts +2 -9
  103. package/dist/routes/admin-scaler-reload.d.ts +41 -0
  104. package/dist/routes/admin-scheduled-jobs.d.ts +2 -9
  105. package/dist/routes/admin-signing-keys.d.ts +2 -9
  106. package/dist/routes/admin-sources.d.ts +2 -9
  107. package/dist/routes/admin-trust-policy.d.ts +2 -8
  108. package/dist/routes/admin.d.ts +15 -13
  109. package/dist/scaler/config.d.ts +12 -84
  110. package/dist/scaler/file-reload.d.ts +48 -0
  111. package/dist/scaler/manager.d.ts +47 -33
  112. package/dist/scaler/scaler-state-store.d.ts +5 -0
  113. package/dist/scaler/types.d.ts +1 -4
  114. package/dist/secrets/job-secret-gate.d.ts +2 -5
  115. package/dist/secrets/secret-resolver.d.ts +2 -4
  116. package/dist/security/trust-policy-gate.d.ts +0 -4
  117. package/dist/server.d.ts +6 -17
  118. package/dist/server.js +6693 -8005
  119. package/dist/standalone.js +5826 -6555
  120. package/dist/worker/reroute-dispatch.d.ts +1 -0
  121. package/dist/worker/reroute-spawn-control.d.ts +1 -3
  122. package/dist/worker-core.d.ts +9 -2
  123. package/dist/ws/agent-handler.d.ts +3 -3
  124. package/dist/ws/dashboard-access.d.ts +57 -0
  125. package/dist/ws/dashboard-backends-handler.d.ts +1 -6
  126. package/dist/ws/dashboard-context-handler.d.ts +10 -15
  127. package/dist/ws/dashboard-fleet-write-handler.d.ts +1 -6
  128. package/dist/ws/dashboard-global-workflows-handler.d.ts +1 -6
  129. package/dist/ws/dashboard-registrations-handler.d.ts +1 -7
  130. package/dist/ws/platform-client.d.ts +85 -330
  131. package/installer-image-digests.json +3 -3
  132. package/package.json +4 -4
  133. package/sbom.spdx.json +53 -53
  134. package/dist/cache/legacy-prefixes.d.ts +0 -19
  135. package/dist/cli/commands/agent-service/logs.d.ts +0 -14
  136. package/dist/cli/commands/agent-service/restart.d.ts +0 -12
  137. package/dist/cli/commands/agent-service/start.d.ts +0 -12
  138. package/dist/cli/commands/agent-service/stop.d.ts +0 -12
  139. package/dist/cli/commands/agent-service/uninstall.d.ts +0 -13
  140. package/dist/cli/commands/cache.d.ts +0 -51
  141. package/dist/cli/commands/orchestrator-service/logs.d.ts +0 -14
  142. package/dist/cli/commands/orchestrator-service/restart.d.ts +0 -12
  143. package/dist/cli/commands/orchestrator-service/start.d.ts +0 -12
  144. package/dist/cli/commands/orchestrator-service/stop.d.ts +0 -12
  145. package/dist/cli/commands/orchestrator-service/uninstall.d.ts +0 -13
  146. package/dist/git/inherited-secret.d.ts +0 -29
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * The two directory writers live in this namespace rather than one of their
19
19
  * own because they are the same org-trust concept as the policy, gated by the
20
- * same mode rule against the same `--customer-id`, and reached through the same
20
+ * same mode rule against the same `--org`, and reached through the same
21
21
  * admin route file. Splitting them out would put half of "who may approve" in a
22
22
  * second top-level command with its own copy of that story. They are siblings
23
23
  * of the `directory` reader rather than subcommands under it, because turning
@@ -40,11 +40,7 @@ import type { AdminApiClient } from '../api-client.js';
40
40
  export interface TrustPolicyView {
41
41
  customerId: string;
42
42
  forkPolicy?: string;
43
- approvalExpiryHours?: number;
44
- /**
45
- * The authoritative hold window. Absent from any orchestrator that predates
46
- * it, in which case `approvalExpiryHours` is the only window on offer.
47
- */
43
+ /** The hold window, in seconds. */
48
44
  approvalExpirySeconds?: number;
49
45
  source: string | null;
50
46
  updatedAt: string | null;
@@ -62,21 +58,13 @@ export declare function formatPolicy(policy: TrustPolicyView, format: string): s
62
58
  * touched to a policy they never set, so the reader of `trust-policy show`
63
59
  * is told outright — with where to look for each individual drop.
64
60
  *
65
- * Returns the lines rather than printing them so the check is unit-testable,
66
- * matching `policyExpiryWarnings` below.
61
+ * Returns the lines rather than printing them so the check is unit-testable.
67
62
  */
68
63
  export declare function forkDropWarnings(policy: TrustPolicyView): string[];
69
64
  /**
70
- * Render the enforced hold window.
71
- *
72
- * A whole number of hours still prints as `72 h`, exactly as it always did, so
73
- * no existing policy's output moves. Anything finer prints in seconds, because
74
- * the hours spelling cannot express it and rounding would report a window the
75
- * orchestrator is not applying.
76
- *
77
- * A policy carrying neither field is an orchestrator old enough to have
78
- * resolved no policy at all (see {@link TrustPolicyView}); one carrying only
79
- * hours is an orchestrator that predates the seconds window.
65
+ * Render the enforced hold window in the duration spelling `--approval-expiry`
66
+ * takes (`72h`, `1h30m`). A policy carrying no window is an orchestrator old
67
+ * enough to have resolved no policy at all (see {@link TrustPolicyView}).
80
68
  */
81
69
  export declare function formatExpiry(policy: TrustPolicyView): string;
82
70
  /**
@@ -86,17 +74,6 @@ export declare function formatExpiry(policy: TrustPolicyView): string;
86
74
  * clear local message naming the accepted values instead of a 400 from the API.
87
75
  */
88
76
  export declare function buildPolicyPatch(opts: Record<string, string | undefined>): Record<string, string | number>;
89
- /**
90
- * Warn when a patch names both spellings of the hold window.
91
- *
92
- * The route resolves this deterministically — the more specific seconds value
93
- * wins — but an operator who passed both asked for two different things, so the
94
- * one that is not applied is named rather than dropped in silence.
95
- *
96
- * Returns the lines rather than printing them so the check is unit-testable,
97
- * matching `forkDropWarnings` above.
98
- */
99
- export declare function policyExpiryWarnings(patch: Record<string, string | number>): string[];
100
77
  /** One identity link as the directory route reports it. */
101
78
  interface DirectoryIdentityLink {
102
79
  userId: string;
@@ -154,8 +131,7 @@ export declare function formatDirectoryAge(updatedAt: string, now: number): stri
154
131
  * The connected wording is a `Note:` and the disconnected one a `Warning:`,
155
132
  * because the two ask for different things: one states a property of the design
156
133
  * the reader should know, the other names a condition they should act on. The
157
- * `Warning:` producers above — `forkDropWarnings` and `policyExpiryWarnings` —
158
- * are both of the second kind.
134
+ * `Warning:` producer above, `forkDropWarnings`, is of the second kind.
159
135
  *
160
136
  * Returns the lines rather than printing them so the check is unit-testable,
161
137
  * matching `forkDropWarnings` above.
@@ -6,7 +6,7 @@
6
6
  * through the orchestrator's admin HTTP API.
7
7
  *
8
8
  * Global options:
9
- * --url / -u Orchestrator URL (env: KICI_ADMIN_URL, default: http://localhost:8080)
9
+ * --url / -u Orchestrator URL (env: KICI_ADMIN_URL, default: http://localhost:4000)
10
10
  * --token / -t Admin API token (env: KICI_ADMIN_TOKEN, required)
11
11
  * -V / --cli-version / --version Print the CLI version (--version only before a command)
12
12
  *