@kici-dev/orchestrator 0.1.3 → 0.1.5

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 (66) hide show
  1. package/dist/agent/dispatcher.d.ts +26 -0
  2. package/dist/agent/ownership-tracker.d.ts +45 -3
  3. package/dist/audit/access-log.d.ts +7 -0
  4. package/dist/cli/api-client.d.ts +14 -0
  5. package/dist/cli/commands/cluster-name.d.ts +18 -0
  6. package/dist/cli/commands/db.d.ts +9 -6
  7. package/dist/cli/commands/org-settings.d.ts +2 -1
  8. package/dist/cli/commands/shared/secret-input.d.ts +46 -0
  9. package/dist/cli/commands/variable.d.ts +18 -0
  10. package/dist/cli/service/index.d.ts +1 -0
  11. package/dist/cli/service/launchd.d.ts +19 -0
  12. package/dist/cli/service/privilege.d.ts +21 -0
  13. package/dist/cli/wizard/orchestrator-wizard.d.ts +4 -2
  14. package/dist/cli.js +1056 -236
  15. package/dist/cluster/join-token.d.ts +21 -13
  16. package/dist/cluster/peer-client.d.ts +9 -0
  17. package/dist/config/cluster-id.d.ts +23 -0
  18. package/dist/config/cluster-name.d.ts +39 -0
  19. package/dist/config.d.ts +6 -0
  20. package/dist/dashboard/handler.d.ts +54 -2
  21. package/dist/db/migrations/019_generic_sources_change_notify.d.ts +25 -0
  22. package/dist/db/migrations/020_org_settings_dashboard_write_policy.d.ts +17 -0
  23. package/dist/db/migrations/021_check_run_tracking.d.ts +26 -0
  24. package/dist/db/migrations/022_scaler_manager_state.d.ts +29 -0
  25. package/dist/db/migrations/023_dispatch_queue_recovery_deadline.d.ts +26 -0
  26. package/dist/db/types.d.ts +137 -0
  27. package/dist/events/event-store.d.ts +9 -2
  28. package/dist/events/trust-store.d.ts +7 -0
  29. package/dist/events/types.d.ts +33 -0
  30. package/dist/metrics/scheduled-jobs.d.ts +26 -5
  31. package/dist/orchestrator-core.d.ts +7 -0
  32. package/dist/policy/dashboard-write-policy.d.ts +115 -0
  33. package/dist/queue/job-queue.d.ts +54 -1
  34. package/dist/reporting/check-run-tracking-store.d.ts +133 -0
  35. package/dist/reporting/commit-status.d.ts +87 -9
  36. package/dist/routes/admin-access-log.d.ts +1 -0
  37. package/dist/routes/admin-backends.d.ts +9 -1
  38. package/dist/routes/admin-cluster-name.d.ts +50 -0
  39. package/dist/routes/admin-db.d.ts +9 -1
  40. package/dist/routes/admin-environments.d.ts +10 -6
  41. package/dist/routes/admin-event-dlq.d.ts +1 -0
  42. package/dist/routes/admin-event-log.d.ts +1 -0
  43. package/dist/routes/admin-events.d.ts +19 -0
  44. package/dist/routes/admin-maintenance.d.ts +9 -1
  45. package/dist/routes/admin-org-settings.d.ts +10 -1
  46. package/dist/routes/admin-queue-execution.d.ts +1 -0
  47. package/dist/routes/admin-registrations.d.ts +1 -0
  48. package/dist/routes/admin-runs.d.ts +1 -0
  49. package/dist/routes/admin-scheduled-jobs.d.ts +1 -0
  50. package/dist/routes/admin-sources.d.ts +9 -1
  51. package/dist/routes/admin.d.ts +8 -0
  52. package/dist/scaler/manager.d.ts +38 -0
  53. package/dist/scaler/scaler-state-store.d.ts +102 -0
  54. package/dist/secrets/routing-key-scope.d.ts +43 -0
  55. package/dist/server.js +9846 -6884
  56. package/dist/stale-detector/stale-run-detector.d.ts +14 -2
  57. package/dist/standalone.js +6120 -3838
  58. package/dist/webhook/generic-sources-listener.d.ts +74 -0
  59. package/dist/webhook/register-source-bundle.d.ts +57 -0
  60. package/dist/ws/dashboard-backends-handler.d.ts +14 -0
  61. package/dist/ws/dashboard-env-handler.d.ts +7 -0
  62. package/dist/ws/dashboard-global-workflows-handler.d.ts +6 -0
  63. package/dist/ws/dashboard-registrations-handler.d.ts +7 -0
  64. package/dist/ws/platform-client.d.ts +30 -1
  65. package/package.json +3 -3
  66. package/sbom.spdx.json +40 -35
@@ -96,8 +96,20 @@ export declare class StaleRunDetector {
96
96
  private scanStaleRunningJobsNullHeartbeat;
97
97
  /**
98
98
  * Sub-scan C: Find dispatched entries that were never acknowledged.
99
- * Only checks 'dispatched' status (job sent to agent but agent never started it).
100
- * 'queued' jobs are legitimately waiting for agents and handled by queue timeout instead.
99
+ *
100
+ * Only catches dispatches that the agent never started i.e., the
101
+ * dispatch_queue row is still 'dispatched' AND there is no
102
+ * execution_jobs row in 'running' state. When the agent has reported
103
+ * the job as running (so execution_jobs.status='running'), heartbeat
104
+ * supervision falls to sub-scans A and B, which look at
105
+ * `execution_jobs.last_heartbeat_at`. Without this filter, a long
106
+ * job whose first step legitimately exceeds the dispatch threshold
107
+ * (e.g. an inline `npm install` for a workflow that imports
108
+ * `@kici-dev/sdk`) would be marked stale here before sub-scan A's
109
+ * heartbeat path has a chance to keep it alive.
110
+ *
111
+ * 'queued' jobs are legitimately waiting for agents and handled by
112
+ * the queue timeout in {@link JobQueue.markExpired} instead.
101
113
  */
102
114
  private scanStaleDispatchedJobs;
103
115
  /**