@kici-dev/orchestrator 0.8.0 → 0.9.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 (63) hide show
  1. package/dist/__test-helpers__/test-db.d.ts +21 -0
  2. package/dist/app.d.ts +6 -5
  3. package/dist/artifacts/artifact-store.d.ts +6 -10
  4. package/dist/cache/legacy-prefixes.d.ts +19 -0
  5. package/dist/cache/pending-precursor-db-watcher.d.ts +79 -0
  6. package/dist/cache/pending-tracker.d.ts +10 -0
  7. package/dist/cache/precursor-result.d.ts +68 -0
  8. package/dist/cache/source-cache.d.ts +2 -1
  9. package/dist/cache/user-cache.d.ts +37 -58
  10. package/dist/cli/api-client.d.ts +3 -6
  11. package/dist/cli/commands/cache.d.ts +51 -0
  12. package/dist/cli/commands/cluster-settings.d.ts +0 -11
  13. package/dist/cli/commands/trust-policy.d.ts +12 -42
  14. package/dist/cli/service/privilege.d.ts +27 -6
  15. package/dist/cli.js +1138 -845
  16. package/dist/cluster/cluster-settings-reader.d.ts +1 -3
  17. package/dist/cluster/coordinator.d.ts +2 -3
  18. package/dist/cluster/join-client.d.ts +1 -39
  19. package/dist/config.d.ts +0 -6
  20. package/dist/contexts/context-store.d.ts +3 -3
  21. package/dist/contexts/held-runs.d.ts +6 -6
  22. package/dist/contexts/protection/aggregate.d.ts +5 -5
  23. package/dist/dashboard/handler.d.ts +1 -1
  24. package/dist/db/migrations/142_sweep_deprecated_columns.d.ts +4 -0
  25. package/dist/db/migrations/143_execution_jobs_precursor_result.d.ts +26 -0
  26. package/dist/db/migrations/144_execution_runs_registration_window.d.ts +32 -0
  27. package/dist/db/types.d.ts +27 -13
  28. package/dist/index.js +115 -156
  29. package/dist/metrics/prometheus.d.ts +2 -2
  30. package/dist/oidc/id-token-claims.d.ts +9 -10
  31. package/dist/oidc/local-mint.d.ts +9 -12
  32. package/dist/oidc/oidc-mint-registration.d.ts +15 -28
  33. package/dist/oidc/orchestrator-mint.d.ts +10 -10
  34. package/dist/oidc/resolve-signer.d.ts +40 -0
  35. package/dist/orchestrator-core.d.ts +11 -0
  36. package/dist/pipeline/dispatch-matched-workflow.d.ts +1 -2
  37. package/dist/pipeline/job-contexts.d.ts +2 -2
  38. package/dist/provenance/attestation-retrier.d.ts +11 -1
  39. package/dist/provenance/retrier-mint.d.ts +35 -0
  40. package/dist/providers/github/normalizer.d.ts +1 -28
  41. package/dist/providers/local/normalizer.d.ts +1 -15
  42. package/dist/queue/job-queue.d.ts +2 -6
  43. package/dist/queue/terminalize-unroutable.d.ts +1 -1
  44. package/dist/reporting/execution-tracker.d.ts +107 -0
  45. package/dist/scaler/label-matcher.d.ts +0 -1
  46. package/dist/scaler/manager.d.ts +2 -24
  47. package/dist/scaler/scaler-state-store.d.ts +2 -2
  48. package/dist/security/global-workflow-policy.d.ts +3 -28
  49. package/dist/security/lock-source.d.ts +1 -1
  50. package/dist/security/trust-policy-gate.d.ts +0 -14
  51. package/dist/security/trust-policy-store.d.ts +2 -3
  52. package/dist/security/trust-resolver.d.ts +1 -2
  53. package/dist/server.js +2666 -2471
  54. package/dist/stale-detector/all-terminal-runs.d.ts +31 -0
  55. package/dist/stale-detector/stale-run-detector.d.ts +20 -0
  56. package/dist/standalone.js +2818 -2561
  57. package/dist/ws/dashboard-global-workflows-handler.d.ts +3 -4
  58. package/dist/ws/platform-client.d.ts +0 -15
  59. package/installer-image-digests.json +3 -3
  60. package/package.json +18 -17
  61. package/sbom.spdx.json +1178 -1352
  62. package/dist/ws/oidc-token-relay.d.ts +0 -79
  63. package/dist/ws/orch-rpc.d.ts +0 -9
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Responds to `dashboard.global-workflows.*` WS messages from Platform by
5
5
  * reading or upserting the `org_settings` row keyed by `customer_id`. The row
6
- * holds the three per-org repo-pattern lists (allow / deny / elevate); each
6
+ * holds the per-org repo-pattern lists (allow / deny); each
7
7
  * entry is a `{routingKey?, pattern}` object that may optionally pin to one
8
8
  * source. The master enable switch is fleet-wide
9
9
  * (`cluster_settings.global_workflows_enabled`) and read-only here — projected
@@ -86,7 +86,6 @@ export declare class DashboardGlobalWorkflowsHandler {
86
86
  interface NormalizedPatch {
87
87
  allowedRepos: RepoPatternEntry[] | null;
88
88
  deniedRepos: RepoPatternEntry[] | null;
89
- elevatedRepos: RepoPatternEntry[] | null;
90
89
  }
91
90
  /**
92
91
  * Derive the effective storage state from an existing row (may be undefined)
@@ -97,8 +96,8 @@ export declare function buildPatch(existing: OrgSettings | undefined, msg: Globa
97
96
  /**
98
97
  * Project a row into the public settings shape. `enabled` is the effective
99
98
  * fleet-wide master switch, supplied by the caller (read-only here). When the
100
- * row does not yet exist, the three per-org lists project as null so callers
101
- * always get a renderable state.
99
+ * row does not yet exist, the per-org lists project as null so callers always
100
+ * get a renderable state.
102
101
  */
103
102
  export declare function rowToSettings(customerId: string, row: OrgSettings | undefined, enabled: boolean): GlobalWorkflowSettings;
104
103
  export {};
@@ -315,12 +315,6 @@ export declare class PlatformClient {
315
315
  * `source.register.ack` arrives, or rejected on timeout / disconnect.
316
316
  */
317
317
  private readonly pendingSourceRegistrations;
318
- /**
319
- * Generic orchestrator-initiated RPC correlation (e.g. the provenance OIDC
320
- * mint). The orchestrator sends a `requestId`-keyed request over the WS and
321
- * awaits the Platform's matching `.response`; rejected on timeout or close.
322
- */
323
- private readonly orchRpc;
324
318
  /**
325
319
  * Platform capabilities advertised on this connection (Platform → orchestrator
326
320
  * `platform.capabilities` frame). `undefined` means nothing advertised yet —
@@ -493,15 +487,6 @@ export declare class PlatformClient {
493
487
  * NOT in the OrchestratorToPlatformMessage union (they are in the separate log pull schema).
494
488
  */
495
489
  sendRaw(data: unknown): void;
496
- /**
497
- * Send an orchestrator-initiated request over the Platform WS and await its
498
- * typed `.response`. The reverse of the Platform's dashboard-RPC pattern: we
499
- * hold the pending map and resolve on the echoed requestId. Rejects on timeout
500
- * or connection close; protocol-level errors arrive inside the response body.
501
- * The request type is a member of the typed orch->Platform union, so it rides
502
- * the validated `send()` path.
503
- */
504
- sendRequestAndAwait<Res>(type: OrchestratorToPlatformMessage['type'], payload: Record<string, unknown>, timeoutMs?: number): Promise<Res>;
505
490
  /**
506
491
  * Register a new source at runtime (e.g., after config reload adds a new GitHub app).
507
492
  * Separate from the post-auth registration which sends all sources at once.
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "0.8.0",
2
+ "version": "0.9.0",
3
3
  "images": {
4
- "kici-agent": "sha256:81dbd07842282809140f620eceec60978793e1aea6972297b78933c2f66f34b1",
5
- "kici-orchestrator": "sha256:0cc0c914b0ce08cb1f3532073d1c70f18532024f69dceeb3a719f1160a62554f"
4
+ "kici-agent": "sha256:371b518421c505041bc8b52eae3ce92e888f25b2cc2d4914f32420dbbf11df55",
5
+ "kici-orchestrator": "sha256:58c36d0222832fcb82b0af33cdb46d474b97654b0051cb6c54fa96fca9a13af2"
6
6
  }
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kici-dev/orchestrator",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Customer-deployable orchestrator for the KiCI CI/CD stack. Receives webhook events (direct or via Platform relay), matches triggers against the lock file, and dispatches jobs to connected agents.",
5
5
  "keywords": [
6
6
  "ci",
@@ -30,6 +30,7 @@
30
30
  "files": [
31
31
  "dist",
32
32
  "!dist/**/*.map",
33
+ "!dist/server-test.js",
33
34
  "!dist/server-test.d.ts",
34
35
  "!dist/testing",
35
36
  "sbom.spdx.json",
@@ -62,23 +63,23 @@
62
63
  }
63
64
  },
64
65
  "dependencies": {
65
- "@aws-sdk/client-kms": "^3.1121.0",
66
- "@aws-sdk/client-s3": "^3.1121.0",
67
- "@aws-sdk/lib-storage": "^3.1121.0",
68
- "@aws-sdk/s3-request-presigner": "^3.1121.0",
66
+ "@aws-sdk/client-kms": "^3.1135.0",
67
+ "@aws-sdk/client-s3": "^3.1135.0",
68
+ "@aws-sdk/lib-storage": "^3.1135.0",
69
+ "@aws-sdk/s3-request-presigner": "^3.1135.0",
69
70
  "@hono/node-server": "^2.1.1",
70
- "@inquirer/prompts": "^8.7.0",
71
- "@octokit/auth-app": "^8.3.0",
71
+ "@inquirer/prompts": "^8.7.2",
72
+ "@octokit/auth-app": "^8.3.1",
72
73
  "@octokit/rest": "^22.0.1",
73
74
  "archiver": "^8.0.0",
74
75
  "commander": "^15.0.0",
75
76
  "croner": "^10.0.1",
76
77
  "dockerode": "^5.0.1",
77
78
  "hashi-vault-js": "^0.5.3",
78
- "hono": "^4.13.2",
79
- "jose": "^6.2.10",
79
+ "hono": "^4.13.7",
80
+ "jose": "^6.2.12",
80
81
  "jsonpath-plus": "^10.4.0",
81
- "jszip": "^3.10.1",
82
+ "jszip": "^3.10.2",
82
83
  "kysely": "^0.29.4",
83
84
  "lru-cache": "^11.5.2",
84
85
  "nanoid": "^6.0.1",
@@ -87,10 +88,10 @@
87
88
  "strip-ansi": "^7.2.0",
88
89
  "tar": "^7.5.22",
89
90
  "ws": "^8.21.3",
90
- "yaml": "^2.9.0",
91
- "zod": "^4.4.3",
92
- "@kici-dev/engine": "0.8.0",
93
- "@kici-dev/shared": "0.8.0"
91
+ "yaml": "^2.9.1",
92
+ "zod": "^4.6.5",
93
+ "@kici-dev/engine": "0.9.0",
94
+ "@kici-dev/shared": "0.9.0"
94
95
  },
95
96
  "kici": {
96
97
  "metrics": {
@@ -105,11 +106,11 @@
105
106
  "@types/dockerode": "^4.0.1",
106
107
  "@types/ws": "^8.18.1",
107
108
  "kysely-ctl": "^0.21.0",
108
- "@kici-dev/agent": "0.8.0"
109
+ "@kici-dev/agent": "0.9.0"
109
110
  },
110
111
  "scripts": {
111
- "build": "node ../../scripts/build-service.mjs && tsgo --emitDeclarationOnly",
112
- "typecheck": "tsgo --noEmit",
112
+ "build": "node ../../scripts/build-service.mjs && tsc --emitDeclarationOnly",
113
+ "typecheck": "tsc --noEmit",
113
114
  "test": "vitest run",
114
115
  "db:migrate": "kysely migrate:latest"
115
116
  }