@kici-dev/orchestrator 0.15.0 → 0.17.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 (161) 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/approvals/apply-decision.d.ts +12 -1
  5. package/dist/artifacts/artifact-store.d.ts +0 -2
  6. package/dist/audit/access-log.d.ts +1 -1
  7. package/dist/cache/source-cache.d.ts +1 -1
  8. package/dist/cache/user-cache.d.ts +0 -28
  9. package/dist/cli/api-client.d.ts +35 -1
  10. package/dist/cli/commands/access-log.d.ts +1 -1
  11. package/dist/cli/commands/api-key.d.ts +11 -4
  12. package/dist/cli/commands/cold-store-impl.d.ts +7 -84
  13. package/dist/cli/commands/db.d.ts +1 -0
  14. package/dist/cli/commands/orchestrator-service/status.d.ts +2 -0
  15. package/dist/cli/commands/org.d.ts +12 -0
  16. package/dist/cli/commands/scaler.d.ts +14 -0
  17. package/dist/cli/commands/secret.d.ts +1 -45
  18. package/dist/cli/commands/service-health.d.ts +21 -13
  19. package/dist/cli/commands/shared/cli-action.d.ts +17 -0
  20. package/dist/cli/commands/shared/db.d.ts +5 -5
  21. package/dist/cli/commands/shared/org-id.d.ts +5 -0
  22. package/dist/cli/commands/shared/service-verbs.d.ts +19 -0
  23. package/dist/cli/commands/shared/table.d.ts +3 -0
  24. package/dist/cli/commands/shared/unbound-context-warning.d.ts +2 -22
  25. package/dist/cli/commands/trust-policy.d.ts +7 -31
  26. package/dist/cli/kici-admin.d.ts +1 -1
  27. package/dist/cli.js +9865 -8203
  28. package/dist/cluster/coordinator.d.ts +2 -2
  29. package/dist/cluster/peer-client.d.ts +27 -1
  30. package/dist/cluster/peer-forget.d.ts +4 -9
  31. package/dist/cluster/peer-handler.d.ts +11 -1
  32. package/dist/cluster/peer-request-waiters.d.ts +26 -0
  33. package/dist/cluster/scaler-orphans-peer.d.ts +4 -9
  34. package/dist/cluster/scaler-reload-fanout.d.ts +29 -0
  35. package/dist/cluster/scaler-reload-peer.d.ts +16 -0
  36. package/dist/cluster/worker-cluster-settings.d.ts +1 -0
  37. package/dist/cold-store/load-access-log-range.d.ts +3 -3
  38. package/dist/cold-store/tables/access-log.d.ts +4 -12
  39. package/dist/cold-store/tables/event-log.d.ts +8 -19
  40. package/dist/cold-store/tables/execution-jobs.d.ts +7 -24
  41. package/dist/cold-store/tables/execution-runs.d.ts +6 -20
  42. package/dist/cold-store/tables/execution-steps.d.ts +8 -26
  43. package/dist/cold-store/tables/secret-audit-log.d.ts +4 -11
  44. package/dist/config/env-overlay.d.ts +3 -8
  45. package/dist/config/reload.d.ts +9 -2
  46. package/dist/config/schema.d.ts +2 -2
  47. package/dist/config/types.d.ts +2 -2
  48. package/dist/config.d.ts +13 -17
  49. package/dist/contexts/held-runs.d.ts +3 -6
  50. package/dist/dashboard/cursor.d.ts +12 -0
  51. package/dist/dashboard/handler.d.ts +5 -12
  52. package/dist/db/deferred-index-build.d.ts +42 -0
  53. package/dist/db/deferred-indexes.d.ts +3 -37
  54. package/dist/db/migrations/100_held_runs_hold_type_vocabulary.d.ts +3 -5
  55. package/dist/db/migrations/158_normalize_legacy_values.d.ts +4 -0
  56. package/dist/db/repos/org-ids-repo.d.ts +87 -0
  57. package/dist/db/schema-snapshot.generated.d.ts +3 -0
  58. package/dist/db/types.d.ts +5 -22
  59. package/dist/fault-injection-types.d.ts +0 -6
  60. package/dist/git/dispatch-git-auth.d.ts +6 -12
  61. package/dist/helpers/json.d.ts +3 -0
  62. package/dist/index.js +144 -140
  63. package/dist/metrics/prometheus.d.ts +0 -5
  64. package/dist/oidc/id-token-claims.d.ts +1 -1
  65. package/dist/oidc/resolve-signer.d.ts +2 -4
  66. package/dist/orchestrator-core.d.ts +10 -3
  67. package/dist/pipeline/global-eval-round.d.ts +2 -26
  68. package/dist/pipeline/install-secrets-resolver.d.ts +0 -3
  69. package/dist/pipeline/manual-schedule.d.ts +1 -7
  70. package/dist/pipeline/test-pipeline.d.ts +8 -7
  71. package/dist/provenance/dispatch-context.d.ts +5 -7
  72. package/dist/provenance/pending-attestations-repo.d.ts +1 -1
  73. package/dist/provenance/trust-root.d.ts +4 -5
  74. package/dist/provenance/verify-deferred-capture.d.ts +3 -3
  75. package/dist/provider-registry.d.ts +13 -40
  76. package/dist/providers/universal-git/ssh-auth.d.ts +0 -5
  77. package/dist/queue/terminalize-unroutable.d.ts +5 -0
  78. package/dist/reporting/check-run-reporter.d.ts +8 -21
  79. package/dist/reporting/check-run-summary.d.ts +2 -2
  80. package/dist/reporting/execution-tracker.d.ts +1 -1
  81. package/dist/reporting/log-chunk-sink.d.ts +1 -1
  82. package/dist/reporting/run-summary-fields.d.ts +25 -0
  83. package/dist/reporting/s3-log-storage.d.ts +2 -2
  84. package/dist/routes/admin-access-log.d.ts +2 -9
  85. package/dist/routes/admin-auth.d.ts +2 -0
  86. package/dist/routes/admin-backends.d.ts +2 -9
  87. package/dist/routes/admin-cluster-name.d.ts +2 -8
  88. package/dist/routes/admin-cluster-settings.d.ts +2 -8
  89. package/dist/routes/admin-config.d.ts +0 -3
  90. package/dist/routes/admin-contexts.d.ts +3 -11
  91. package/dist/routes/admin-db.d.ts +2 -9
  92. package/dist/routes/admin-env.d.ts +33 -0
  93. package/dist/routes/admin-event-dlq.d.ts +2 -9
  94. package/dist/routes/admin-event-inspect.d.ts +2 -9
  95. package/dist/routes/admin-event-log.d.ts +2 -9
  96. package/dist/routes/admin-events.d.ts +3 -13
  97. package/dist/routes/admin-held-runs.d.ts +2 -8
  98. package/dist/routes/admin-list-limit.d.ts +3 -0
  99. package/dist/routes/admin-maintenance.d.ts +2 -9
  100. package/dist/routes/admin-orchestrator-drain.d.ts +2 -9
  101. package/dist/routes/admin-org-settings.d.ts +2 -8
  102. package/dist/routes/admin-orgs.d.ts +27 -0
  103. package/dist/routes/admin-peer-forget.d.ts +2 -9
  104. package/dist/routes/admin-queue-execution.d.ts +3 -10
  105. package/dist/routes/admin-registrations.d.ts +3 -14
  106. package/dist/routes/admin-runs.d.ts +3 -14
  107. package/dist/routes/admin-scaler-orphans.d.ts +2 -9
  108. package/dist/routes/admin-scaler-reload.d.ts +41 -0
  109. package/dist/routes/admin-scheduled-jobs.d.ts +2 -9
  110. package/dist/routes/admin-signing-keys.d.ts +2 -9
  111. package/dist/routes/admin-sources.d.ts +2 -9
  112. package/dist/routes/admin-trust-policy.d.ts +2 -8
  113. package/dist/routes/admin.d.ts +15 -13
  114. package/dist/routes/caller-identity.d.ts +52 -0
  115. package/dist/routes/test-direct.d.ts +46 -0
  116. package/dist/routes/uploads.d.ts +12 -11
  117. package/dist/scaler/config.d.ts +12 -84
  118. package/dist/scaler/file-reload.d.ts +48 -0
  119. package/dist/scaler/manager.d.ts +47 -33
  120. package/dist/scaler/scaler-state-store.d.ts +5 -0
  121. package/dist/scaler/types.d.ts +1 -4
  122. package/dist/secrets/job-secret-gate.d.ts +2 -5
  123. package/dist/secrets/rbac.d.ts +5 -1
  124. package/dist/secrets/routing-key-scope.d.ts +1 -0
  125. package/dist/secrets/secret-resolver.d.ts +2 -4
  126. package/dist/secrets/token-manager.d.ts +1 -0
  127. package/dist/security/trust-policy-gate.d.ts +0 -4
  128. package/dist/server.d.ts +6 -17
  129. package/dist/server.js +9890 -10851
  130. package/dist/standalone.js +6928 -6576
  131. package/dist/storage/s3.d.ts +7 -7
  132. package/dist/storage/types.d.ts +4 -4
  133. package/dist/worker/reroute-dispatch.d.ts +1 -0
  134. package/dist/worker/reroute-spawn-control.d.ts +1 -3
  135. package/dist/worker-core.d.ts +9 -2
  136. package/dist/ws/agent-handler.d.ts +3 -3
  137. package/dist/ws/dashboard-access.d.ts +57 -0
  138. package/dist/ws/dashboard-backends-handler.d.ts +1 -6
  139. package/dist/ws/dashboard-context-handler.d.ts +10 -15
  140. package/dist/ws/dashboard-fleet-write-handler.d.ts +1 -6
  141. package/dist/ws/dashboard-global-workflows-handler.d.ts +1 -6
  142. package/dist/ws/dashboard-registrations-handler.d.ts +1 -7
  143. package/dist/ws/platform-client.d.ts +85 -330
  144. package/dist/ws/test-relay-handlers.d.ts +16 -9
  145. package/installer-image-digests.json +3 -3
  146. package/package.json +4 -4
  147. package/sbom.spdx.json +53 -53
  148. package/dist/cache/legacy-prefixes.d.ts +0 -19
  149. package/dist/cli/commands/agent-service/logs.d.ts +0 -14
  150. package/dist/cli/commands/agent-service/restart.d.ts +0 -12
  151. package/dist/cli/commands/agent-service/start.d.ts +0 -12
  152. package/dist/cli/commands/agent-service/stop.d.ts +0 -12
  153. package/dist/cli/commands/agent-service/uninstall.d.ts +0 -13
  154. package/dist/cli/commands/cache.d.ts +0 -51
  155. package/dist/cli/commands/orchestrator-service/logs.d.ts +0 -14
  156. package/dist/cli/commands/orchestrator-service/restart.d.ts +0 -12
  157. package/dist/cli/commands/orchestrator-service/start.d.ts +0 -12
  158. package/dist/cli/commands/orchestrator-service/stop.d.ts +0 -12
  159. package/dist/cli/commands/orchestrator-service/uninstall.d.ts +0 -13
  160. package/dist/git/inherited-secret.d.ts +0 -29
  161. package/dist/scaler/container-spawn.d.ts +0 -28
@@ -1,23 +1,3 @@
1
- /**
2
- * The warning `kici-admin context create` and `kici-admin secret set` print
3
- * when a context's secrets cannot reach any job.
4
- *
5
- * A job that lists a context in its `contexts:` receives the context's
6
- * secrets only through the context's scope bindings: the secret resolver reads
7
- * the bindings of the context row the job's declared name matched — a fixed
8
- * context by its exact name, a glob context by its pattern — and returns
9
- * nothing when there are none. So such a context with no binding delivers no
10
- * secret to those jobs, whatever its scopes hold, and nothing fails loudly — a
11
- * workflow's `ctx.secrets.get()` throws at run time instead. A
12
- * `<context>:<key>` git-credential or registry reference to a fixed context
13
- * still reads the scope named after it, through a deprecated fallback; a glob
14
- * context has no such fallback. The warning names the context, that fallback
15
- * where it applies, and the `context bind` command that fixes it.
16
- *
17
- * Advisory only: the lookup runs after the command's own write succeeded, and
18
- * a failed lookup prints nothing, so the command's exit code never changes.
19
- */
20
- import { ContextType } from '@kici-dev/engine';
21
1
  /** The one admin API call the lookup needs, so any client shape satisfies it. */
22
2
  export interface ContextLookupClient {
23
3
  get<T>(path: string): Promise<T>;
@@ -32,8 +12,8 @@ export interface WarnIfContextUnboundArgs {
32
12
  /** Where the warning goes; stderr by default. */
33
13
  warn?: (line: string) => void;
34
14
  }
35
- /** The warning line for a context of `type` with no binding. */
36
- export declare function unboundContextWarning(orgId: string, name: string, type: ContextType): string;
15
+ /** The warning line for a context with no binding. */
16
+ export declare function unboundContextWarning(orgId: string, name: string): string;
37
17
  /**
38
18
  * Print the unbound-context warning when `name` is a context a job can resolve
39
19
  * through (a fixed or glob context, `ContextType`) that has no binding. A
@@ -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
  *