@kici-dev/orchestrator 0.9.1 → 0.10.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 (88) hide show
  1. package/dist/__test-helpers__/test-db.d.ts +14 -1
  2. package/dist/agent/dispatcher.d.ts +137 -41
  3. package/dist/agent/registry.d.ts +79 -2
  4. package/dist/app.d.ts +2 -0
  5. package/dist/cancel/cancel-held-run.d.ts +68 -0
  6. package/dist/cancel/cancel-route-answer.d.ts +21 -0
  7. package/dist/cancel/cancel-run.d.ts +32 -0
  8. package/dist/cli/api-client.d.ts +3 -0
  9. package/dist/cli/commands/context.d.ts +3 -1
  10. package/dist/cli/commands/runs.d.ts +7 -0
  11. package/dist/cli/commands/shared/unbound-context-warning.d.ts +43 -0
  12. package/dist/cli/commands/signing-key.d.ts +22 -1
  13. package/dist/cli.js +1273 -715
  14. package/dist/cluster/cluster-settings-reader.d.ts +1 -1
  15. package/dist/cluster/coordinator.d.ts +2 -0
  16. package/dist/cluster/live-coordinator-peer.d.ts +13 -0
  17. package/dist/config.d.ts +9 -0
  18. package/dist/contexts/context-store.d.ts +3 -2
  19. package/dist/contexts/protection/satisfiability.d.ts +6 -3
  20. package/dist/db/migrations/145_execution_runs_workflow_provenance.d.ts +4 -0
  21. package/dist/db/migrations/146_pending_job_contexts_context_resolution.d.ts +4 -0
  22. package/dist/db/migrations/147_sealed_job_secrets.d.ts +19 -0
  23. package/dist/db/migrations/148_cluster_settings_sealed_secrets_retry_backoff_ms.d.ts +21 -0
  24. package/dist/db/migrations/149_workflow_registrations_dep_cache_key.d.ts +4 -0
  25. package/dist/db/migrations/150_execution_runs_status_epoch.d.ts +18 -0
  26. package/dist/db/migrations/151_workflow_registrations_dep_cache_key_sha.d.ts +4 -0
  27. package/dist/db/repos/signing-keys-repo.d.ts +48 -3
  28. package/dist/db/types.d.ts +81 -1
  29. package/dist/git/clone-token-auth.d.ts +7 -0
  30. package/dist/git/dispatch-git-auth.d.ts +63 -0
  31. package/dist/lockfile-validate.d.ts +4 -2
  32. package/dist/metrics/prometheus.d.ts +1 -1
  33. package/dist/oidc/id-token-claims.d.ts +10 -0
  34. package/dist/oidc/oidc-mint-registration.d.ts +2 -0
  35. package/dist/oidc/orchestrator-mint.d.ts +25 -4
  36. package/dist/oidc/reconcile-signing-key.d.ts +31 -6
  37. package/dist/oidc/resolve-signer.d.ts +12 -6
  38. package/dist/pipeline/decorating-secret-resolver.d.ts +5 -3
  39. package/dist/pipeline/dispatch-matched-workflow.d.ts +105 -13
  40. package/dist/pipeline/dispatch-matched-workflow.test-helpers.d.ts +121 -0
  41. package/dist/pipeline/global-dispatch-identity.d.ts +76 -0
  42. package/dist/pipeline/global-dispatch.d.ts +91 -0
  43. package/dist/pipeline/global-eval-round.d.ts +56 -4
  44. package/dist/pipeline/global-round-hold.d.ts +41 -0
  45. package/dist/pipeline/held-context-data.d.ts +143 -0
  46. package/dist/pipeline/held-round-registrations.d.ts +40 -0
  47. package/dist/pipeline/install-gate.d.ts +93 -0
  48. package/dist/pipeline/install-secrets-resolver.d.ts +28 -13
  49. package/dist/pipeline/job-contexts.d.ts +21 -6
  50. package/dist/pipeline/pending-workflow-context.d.ts +15 -3
  51. package/dist/pipeline/process-webhook.d.ts +38 -1
  52. package/dist/pipeline/processor.d.ts +20 -0
  53. package/dist/pipeline/rerun-global.d.ts +28 -0
  54. package/dist/pipeline/rerun-inputs.d.ts +88 -0
  55. package/dist/pipeline/rerun.d.ts +25 -2
  56. package/dist/pipeline/resume-workflow.d.ts +36 -2
  57. package/dist/pipeline/unbound-job-context.d.ts +34 -0
  58. package/dist/pipeline/workflow-lock-at-sha.d.ts +67 -0
  59. package/dist/provenance/backfill-run.d.ts +5 -0
  60. package/dist/providers/github/check-status-poster.d.ts +4 -16
  61. package/dist/queue/job-queue.d.ts +127 -10
  62. package/dist/queue/terminalize-unroutable.d.ts +37 -4
  63. package/dist/registration/registration-index.d.ts +13 -1
  64. package/dist/registration/registration-store.d.ts +10 -1
  65. package/dist/reporting/execution-tracker.d.ts +149 -8
  66. package/dist/reporting/log-chunk-sink.d.ts +1 -1
  67. package/dist/reporting/log-writer.d.ts +14 -0
  68. package/dist/reporting/step-log-path.d.ts +8 -0
  69. package/dist/reporting/step-log-reader.d.ts +21 -3
  70. package/dist/routes/admin-signing-keys.d.ts +33 -0
  71. package/dist/scaler/agent-fit.d.ts +159 -0
  72. package/dist/scaler/container-routing.d.ts +16 -16
  73. package/dist/scaler/manager.d.ts +23 -17
  74. package/dist/secrets/context-secret-resolver.d.ts +1 -1
  75. package/dist/secrets/index.d.ts +1 -1
  76. package/dist/secrets/job-secret-gate.d.ts +25 -3
  77. package/dist/secrets/job-secret-seal.d.ts +36 -0
  78. package/dist/secrets/master-key-rotation.d.ts +7 -3
  79. package/dist/secrets/secret-resolver.d.ts +42 -23
  80. package/dist/server.js +27690 -23447
  81. package/dist/standalone.js +58162 -53103
  82. package/dist/worker/in-memory-job-queue.d.ts +12 -3
  83. package/dist/worker/reroute-dispatch.d.ts +35 -0
  84. package/dist/ws/agent-handler.d.ts +23 -10
  85. package/dist/ws/git-credential-relay.d.ts +16 -3
  86. package/installer-image-digests.json +3 -3
  87. package/package.json +4 -4
  88. package/sbom.spdx.json +53 -53
@@ -0,0 +1,43 @@
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
+ /** The one admin API call the lookup needs, so any client shape satisfies it. */
22
+ export interface ContextLookupClient {
23
+ get<T>(path: string): Promise<T>;
24
+ }
25
+ export interface WarnIfContextUnboundArgs {
26
+ orgId: string;
27
+ /** The context name; for `secret set` this is the scope the secret was written to. */
28
+ name: string;
29
+ /** Direct-DB mode when set; otherwise the admin API through `client`. */
30
+ dbUrl: string | null;
31
+ client?: ContextLookupClient;
32
+ /** Where the warning goes; stderr by default. */
33
+ warn?: (line: string) => void;
34
+ }
35
+ /** The warning line for a context of `type` with no binding. */
36
+ export declare function unboundContextWarning(orgId: string, name: string, type: ContextType): string;
37
+ /**
38
+ * Print the unbound-context warning when `name` is a context a job can resolve
39
+ * through (a fixed or glob context, `ContextType`) that has no binding. A
40
+ * template row is a seed for other contexts, not a job context, and stays silent.
41
+ */
42
+ export declare function warnIfContextUnbound(args: WarnIfContextUnboundArgs): Promise<void>;
43
+ //# sourceMappingURL=unbound-context-warning.d.ts.map
@@ -1,3 +1,24 @@
1
1
  import type { Command } from 'commander';
2
- export declare function registerSigningKeyCommands(program: Command): void;
2
+ import { OrchestratorSigningKeyRepo } from '../../db/repos/signing-keys-repo.js';
3
+ import type { AdminApiClient } from '../api-client.js';
4
+ /** Outcome of {@link generateInitialSigningKey}. */
5
+ export type InitialSigningKeyOutcome = {
6
+ created: true;
7
+ kid: string;
8
+ } | {
9
+ created: false;
10
+ activeKid: string;
11
+ };
12
+ /**
13
+ * Generate the initial db-custody key and activate it only while no key is
14
+ * active. Orchestrator nodes create the key on their own, so a node may win the
15
+ * race after the command's check; the node's key then stays active, because the
16
+ * nodes already sign with it, and its kid is returned.
17
+ */
18
+ export declare function generateInitialSigningKey(repo: OrchestratorSigningKeyRepo, secretKey: string): Promise<InitialSigningKeyOutcome>;
19
+ /**
20
+ * Register `kici-admin signing-key`. `tryGetClient` returns null when no admin
21
+ * token is configured, so `list` can name both of its data sources.
22
+ */
23
+ export declare function registerSigningKeyCommands(program: Command, tryGetClient: () => AdminApiClient | null): void;
3
24
  //# sourceMappingURL=signing-key.d.ts.map