@kici-dev/orchestrator 0.1.10 → 0.1.11

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.
@@ -91,7 +91,7 @@ export declare class Dispatcher {
91
91
  /** Optional hook called when no agent matches the job's labels.
92
92
  * When set, receives the per-job `resources` so the scaler can apply
93
93
  * per-scaler / per-orchestrator / per-machine caps before spawning. */
94
- onNoMatchingAgent?: (labels: string[], jobId: string, excludeLabels: string[], resources?: ResourceRequest) => Promise<ScaleResult>;
94
+ onNoMatchingAgent?: (labels: string[], jobId: string, runId: string, excludeLabels: string[], resources?: ResourceRequest) => Promise<ScaleResult>;
95
95
  /** Max reconnection delay from agent config (default 60s). Used to derive grace period. */
96
96
  maxReconnectDelayMs?: number;
97
97
  /** Callback when a recovery timer expires and the job is permanently failed. */
@@ -36,6 +36,19 @@ export interface ServiceConfig {
36
36
  * (e.g. `["/opt/kici/dist/server.js"]`); empty for a self-launching binary.
37
37
  */
38
38
  args?: string[];
39
+ /**
40
+ * Node bin dir to guarantee on the generated unit's PATH.
41
+ *
42
+ * The bare-metal scaler spawns the kici-agent node script, so `node` must be
43
+ * findable on the orchestrator's PATH. When the service is installed with an
44
+ * explicit `--binary` (a wrapper script), {@link executablePath} points at the
45
+ * wrapper, not node — so its dirname is the wrong directory. The install path
46
+ * sets this to `path.dirname(process.execPath)` (the node actually running the
47
+ * install command), which is the correct node bin dir regardless of `--binary`.
48
+ * Optional: lifecycle commands that don't regenerate the unit leave it unset,
49
+ * and the unit generators fall back to `dirname(executablePath)`.
50
+ */
51
+ nodeBinDir?: string;
39
52
  /** Path to the environment file (.env). */
40
53
  envFilePath: string;
41
54
  /** Working directory for the service process. */