@harness-engineering/orchestrator 0.2.13 → 0.2.15
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.
- package/dist/index.d.mts +15 -3
- package/dist/index.d.ts +15 -3
- package/dist/index.js +369 -57
- package/dist/index.mjs +357 -45
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Issue, AgentEvent, WorkflowConfig, IssueTrackerClient, TokenUsage, ConcernSignal, ScopeTier, EscalationConfig, RoutingDecision, Result, WorkflowDefinition, TrackerConfig, WorkspaceConfig, HooksConfig, AgentBackend, SessionStartParams, AgentSession, AgentError, TurnParams, TurnResult } from '@harness-engineering/types';
|
|
2
|
-
import { EnrichedSpec, ComplexityScore, SimulationResult, IntelligencePipeline } from '@harness-engineering/intelligence';
|
|
2
|
+
import { EnrichedSpec, ComplexityScore, SimulationResult, IntelligencePipeline, WeightedRecommendation } from '@harness-engineering/intelligence';
|
|
3
3
|
import { GraphStore } from '@harness-engineering/graph';
|
|
4
4
|
import { execFile } from 'node:child_process';
|
|
5
5
|
import { EventEmitter } from 'node:events';
|
|
@@ -362,6 +362,8 @@ interface TickEvent {
|
|
|
362
362
|
complexityScores?: Map<string, ComplexityScore>;
|
|
363
363
|
/** Pre-computed PESL simulation results from intelligence pipeline (issueId -> result) */
|
|
364
364
|
simulationResults?: Map<string, SimulationResult>;
|
|
365
|
+
/** Pre-computed persona recommendations from specialization scorer (issueId -> recommendations) */
|
|
366
|
+
personaRecommendations?: Map<string, WeightedRecommendation[]>;
|
|
365
367
|
}
|
|
366
368
|
interface WorkerExitEvent {
|
|
367
369
|
type: 'worker_exit';
|
|
@@ -381,6 +383,8 @@ interface RetryFiredEvent {
|
|
|
381
383
|
candidates: Issue[];
|
|
382
384
|
/** Caller-supplied wall clock (ms since epoch). Keeps state machine pure. */
|
|
383
385
|
nowMs: number;
|
|
386
|
+
/** Pre-computed concern signals from intelligence pipeline (issueId → signals) */
|
|
387
|
+
concernSignals?: Map<string, ConcernSignal[]>;
|
|
384
388
|
}
|
|
385
389
|
interface StallDetectedEvent {
|
|
386
390
|
type: 'stall_detected';
|
|
@@ -456,6 +460,8 @@ interface ClaimEffect {
|
|
|
456
460
|
backend?: 'local' | 'primary';
|
|
457
461
|
/** Retry attempt number, if this is a retry dispatch */
|
|
458
462
|
attempt: number | null;
|
|
463
|
+
/** Persona recommended by specialization scoring, if available */
|
|
464
|
+
suggestedPersona?: string;
|
|
459
465
|
}
|
|
460
466
|
|
|
461
467
|
/**
|
|
@@ -1126,6 +1132,10 @@ declare class Orchestrator extends EventEmitter {
|
|
|
1126
1132
|
private enrichedSpecsByIssue;
|
|
1127
1133
|
/** Tracks recently-failed intelligence analysis to avoid re-requesting every tick */
|
|
1128
1134
|
private analysisFailureCache;
|
|
1135
|
+
/** Abort controllers and PIDs for running agent tasks — used by stopIssue to cancel in-flight work.
|
|
1136
|
+
* The PID is stored here because the running entry may be deleted by the state machine
|
|
1137
|
+
* before the stop effect executes (e.g., stall_detected removes the entry first). */
|
|
1138
|
+
private abortControllers;
|
|
1129
1139
|
/** Guards against overlapping ticks when a tick takes longer than the polling interval */
|
|
1130
1140
|
private tickInProgress;
|
|
1131
1141
|
/** Timestamp of the last stale branch sweep (at most once per hour) */
|
|
@@ -1148,8 +1158,8 @@ declare class Orchestrator extends EventEmitter {
|
|
|
1148
1158
|
private createBackend;
|
|
1149
1159
|
/**
|
|
1150
1160
|
* Creates a TaskRunner for the maintenance scheduler.
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1161
|
+
* CheckCommandRunner and CommandExecutor use real child_process execution.
|
|
1162
|
+
* AgentDispatcher remains stubbed (requires full skill dispatch integration).
|
|
1153
1163
|
*/
|
|
1154
1164
|
private createMaintenanceTaskRunner;
|
|
1155
1165
|
/**
|
|
@@ -1188,6 +1198,8 @@ declare class Orchestrator extends EventEmitter {
|
|
|
1188
1198
|
* and an interaction is queued so a human can create the PR manually.
|
|
1189
1199
|
*/
|
|
1190
1200
|
private cleanWorkspaceWithGuard;
|
|
1201
|
+
/** Run the beforeRemove hook for a workspace. Failures are logged but non-fatal. */
|
|
1202
|
+
private runBeforeRemoveHook;
|
|
1191
1203
|
/**
|
|
1192
1204
|
* Delegates to PRDetector.filterCandidatesWithOpenPRs.
|
|
1193
1205
|
* @see PRDetector#filterCandidatesWithOpenPRs
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Issue, AgentEvent, WorkflowConfig, IssueTrackerClient, TokenUsage, ConcernSignal, ScopeTier, EscalationConfig, RoutingDecision, Result, WorkflowDefinition, TrackerConfig, WorkspaceConfig, HooksConfig, AgentBackend, SessionStartParams, AgentSession, AgentError, TurnParams, TurnResult } from '@harness-engineering/types';
|
|
2
|
-
import { EnrichedSpec, ComplexityScore, SimulationResult, IntelligencePipeline } from '@harness-engineering/intelligence';
|
|
2
|
+
import { EnrichedSpec, ComplexityScore, SimulationResult, IntelligencePipeline, WeightedRecommendation } from '@harness-engineering/intelligence';
|
|
3
3
|
import { GraphStore } from '@harness-engineering/graph';
|
|
4
4
|
import { execFile } from 'node:child_process';
|
|
5
5
|
import { EventEmitter } from 'node:events';
|
|
@@ -362,6 +362,8 @@ interface TickEvent {
|
|
|
362
362
|
complexityScores?: Map<string, ComplexityScore>;
|
|
363
363
|
/** Pre-computed PESL simulation results from intelligence pipeline (issueId -> result) */
|
|
364
364
|
simulationResults?: Map<string, SimulationResult>;
|
|
365
|
+
/** Pre-computed persona recommendations from specialization scorer (issueId -> recommendations) */
|
|
366
|
+
personaRecommendations?: Map<string, WeightedRecommendation[]>;
|
|
365
367
|
}
|
|
366
368
|
interface WorkerExitEvent {
|
|
367
369
|
type: 'worker_exit';
|
|
@@ -381,6 +383,8 @@ interface RetryFiredEvent {
|
|
|
381
383
|
candidates: Issue[];
|
|
382
384
|
/** Caller-supplied wall clock (ms since epoch). Keeps state machine pure. */
|
|
383
385
|
nowMs: number;
|
|
386
|
+
/** Pre-computed concern signals from intelligence pipeline (issueId → signals) */
|
|
387
|
+
concernSignals?: Map<string, ConcernSignal[]>;
|
|
384
388
|
}
|
|
385
389
|
interface StallDetectedEvent {
|
|
386
390
|
type: 'stall_detected';
|
|
@@ -456,6 +460,8 @@ interface ClaimEffect {
|
|
|
456
460
|
backend?: 'local' | 'primary';
|
|
457
461
|
/** Retry attempt number, if this is a retry dispatch */
|
|
458
462
|
attempt: number | null;
|
|
463
|
+
/** Persona recommended by specialization scoring, if available */
|
|
464
|
+
suggestedPersona?: string;
|
|
459
465
|
}
|
|
460
466
|
|
|
461
467
|
/**
|
|
@@ -1126,6 +1132,10 @@ declare class Orchestrator extends EventEmitter {
|
|
|
1126
1132
|
private enrichedSpecsByIssue;
|
|
1127
1133
|
/** Tracks recently-failed intelligence analysis to avoid re-requesting every tick */
|
|
1128
1134
|
private analysisFailureCache;
|
|
1135
|
+
/** Abort controllers and PIDs for running agent tasks — used by stopIssue to cancel in-flight work.
|
|
1136
|
+
* The PID is stored here because the running entry may be deleted by the state machine
|
|
1137
|
+
* before the stop effect executes (e.g., stall_detected removes the entry first). */
|
|
1138
|
+
private abortControllers;
|
|
1129
1139
|
/** Guards against overlapping ticks when a tick takes longer than the polling interval */
|
|
1130
1140
|
private tickInProgress;
|
|
1131
1141
|
/** Timestamp of the last stale branch sweep (at most once per hour) */
|
|
@@ -1148,8 +1158,8 @@ declare class Orchestrator extends EventEmitter {
|
|
|
1148
1158
|
private createBackend;
|
|
1149
1159
|
/**
|
|
1150
1160
|
* Creates a TaskRunner for the maintenance scheduler.
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1161
|
+
* CheckCommandRunner and CommandExecutor use real child_process execution.
|
|
1162
|
+
* AgentDispatcher remains stubbed (requires full skill dispatch integration).
|
|
1153
1163
|
*/
|
|
1154
1164
|
private createMaintenanceTaskRunner;
|
|
1155
1165
|
/**
|
|
@@ -1188,6 +1198,8 @@ declare class Orchestrator extends EventEmitter {
|
|
|
1188
1198
|
* and an interaction is queued so a human can create the PR manually.
|
|
1189
1199
|
*/
|
|
1190
1200
|
private cleanWorkspaceWithGuard;
|
|
1201
|
+
/** Run the beforeRemove hook for a workspace. Failures are logged but non-fatal. */
|
|
1202
|
+
private runBeforeRemoveHook;
|
|
1191
1203
|
/**
|
|
1192
1204
|
* Delegates to PRDetector.filterCandidatesWithOpenPRs.
|
|
1193
1205
|
* @see PRDetector#filterCandidatesWithOpenPRs
|