@resolveio/server-lib 22.3.137 → 22.3.139
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/package.json +1 -1
- package/util/ai-runner-manager-policy.d.ts +79 -0
- package/util/ai-runner-manager-policy.js +199 -0
- package/util/ai-runner-manager-policy.js.map +1 -1
- package/util/aicoder-runner-v6.d.ts +3 -1
- package/util/aicoder-runner-v6.js +5 -1
- package/util/aicoder-runner-v6.js.map +1 -1
- package/util/support-runner-v5.d.ts +3 -1
- package/util/support-runner-v5.js +5 -1
- package/util/support-runner-v5.js.map +1 -1
package/package.json
CHANGED
|
@@ -114,6 +114,82 @@ export interface ResolveIOAIManagerRecoveryActionPacket {
|
|
|
114
114
|
blockedReason?: string;
|
|
115
115
|
createdAt: string;
|
|
116
116
|
}
|
|
117
|
+
export type ResolveIOAIManagerRecoveryActionDispatchAction = 'run_evidence_probe' | 'run_read_only_diagnosis' | 'run_infra_repair' | 'run_compile_repair' | 'run_journey_contract_repair' | 'run_business_assertion_repair' | 'run_release_repair' | 'run_targeted_product_repair' | 'advance' | 'continue_gate' | 'park_manual';
|
|
118
|
+
export type ResolveIOAIManagerRecoveryActionDispatchStatus = 'queued' | 'started' | 'completed' | 'failed' | 'parked';
|
|
119
|
+
export interface ResolveIOAIManagerRecoveryActionDispatchRecord {
|
|
120
|
+
dispatchId: string;
|
|
121
|
+
actionId: string;
|
|
122
|
+
checkpointId: string;
|
|
123
|
+
probeId: string;
|
|
124
|
+
mode: ResolveIOAIManagerRecoveryAutomationMode;
|
|
125
|
+
dispatchAction: ResolveIOAIManagerRecoveryActionDispatchAction;
|
|
126
|
+
status: ResolveIOAIManagerRecoveryActionDispatchStatus;
|
|
127
|
+
evidenceHash: string;
|
|
128
|
+
blockerFingerprint: string;
|
|
129
|
+
productRepairAllowed: boolean;
|
|
130
|
+
expensiveModelAllowed: boolean;
|
|
131
|
+
reason: string;
|
|
132
|
+
artifactPaths: string[];
|
|
133
|
+
startedAt?: string;
|
|
134
|
+
completedAt?: string;
|
|
135
|
+
createdAt: string;
|
|
136
|
+
}
|
|
137
|
+
export interface ResolveIOAIManagerRecoveryActionDispatchInput {
|
|
138
|
+
action?: ResolveIOAIManagerRecoveryActionPacket;
|
|
139
|
+
history?: ResolveIOAIManagerRecoveryActionDispatchRecord[];
|
|
140
|
+
current?: ResolveIOAIManagerFailureRecord;
|
|
141
|
+
operatorApproved?: boolean;
|
|
142
|
+
now?: Date | string;
|
|
143
|
+
}
|
|
144
|
+
export interface ResolveIOAIManagerRecoveryActionDispatchDecision {
|
|
145
|
+
dispatchAction: ResolveIOAIManagerRecoveryActionDispatchAction;
|
|
146
|
+
allowed: boolean;
|
|
147
|
+
reason: string;
|
|
148
|
+
status: ResolveIOAIManagerRecoveryActionDispatchStatus;
|
|
149
|
+
canRunProductRepair: boolean;
|
|
150
|
+
canRunExpensiveModel: boolean;
|
|
151
|
+
shouldRecordDispatch: boolean;
|
|
152
|
+
requiresNewEvidence: boolean;
|
|
153
|
+
newEvidence: boolean;
|
|
154
|
+
dispatchRecord?: ResolveIOAIManagerRecoveryActionDispatchRecord;
|
|
155
|
+
}
|
|
156
|
+
export type ResolveIOAIManagerRecoveryExecutionPhase = 'evidence' | 'diagnosis' | 'infra' | 'compile' | 'journey' | 'business_proof' | 'release' | 'product_repair' | 'advance' | 'manual';
|
|
157
|
+
export interface ResolveIOAIManagerRecoveryExecutionDirectiveInput {
|
|
158
|
+
action?: ResolveIOAIManagerRecoveryActionPacket;
|
|
159
|
+
dispatchDecision?: ResolveIOAIManagerRecoveryActionDispatchDecision;
|
|
160
|
+
current?: ResolveIOAIManagerFailureRecord;
|
|
161
|
+
surface?: string;
|
|
162
|
+
now?: Date | string;
|
|
163
|
+
}
|
|
164
|
+
export interface ResolveIOAIManagerRecoveryExecutionDirective {
|
|
165
|
+
directiveId: string;
|
|
166
|
+
surface: string;
|
|
167
|
+
dispatchAction: ResolveIOAIManagerRecoveryActionDispatchAction;
|
|
168
|
+
phase: ResolveIOAIManagerRecoveryExecutionPhase;
|
|
169
|
+
allowed: boolean;
|
|
170
|
+
status: ResolveIOAIManagerRecoveryActionDispatchStatus;
|
|
171
|
+
reason: string;
|
|
172
|
+
lane: string;
|
|
173
|
+
stepType: string;
|
|
174
|
+
nextActionLabel: string;
|
|
175
|
+
rerunReason: string;
|
|
176
|
+
evidenceOnly: boolean;
|
|
177
|
+
autoRunnable: boolean;
|
|
178
|
+
productRepairAllowed: boolean;
|
|
179
|
+
expensiveModelAllowed: boolean;
|
|
180
|
+
canRunProductRepair: boolean;
|
|
181
|
+
canRunExpensiveModel: boolean;
|
|
182
|
+
canResetLoopAfterEvidence: boolean;
|
|
183
|
+
requiresNewEvidence: boolean;
|
|
184
|
+
newEvidence: boolean;
|
|
185
|
+
maxAttemptsBeforePark: number;
|
|
186
|
+
requiredArtifacts: string[];
|
|
187
|
+
nextCommands: string[];
|
|
188
|
+
successCriteria: string[];
|
|
189
|
+
forbiddenActions: string[];
|
|
190
|
+
dispatchRecord?: ResolveIOAIManagerRecoveryActionDispatchRecord;
|
|
191
|
+
createdAt: string;
|
|
192
|
+
}
|
|
117
193
|
export interface ResolveIOAIManagerRecoveryCheckpointInput {
|
|
118
194
|
plan: ResolveIOAIManagerRecoveryPlan;
|
|
119
195
|
current?: ResolveIOAIManagerFailureRecord;
|
|
@@ -198,6 +274,9 @@ export declare function hashResolveIOAIManagerEvidence(record: ResolveIOAIManage
|
|
|
198
274
|
export declare function buildResolveIOAIManagerRecoveryCheckpoint(input: ResolveIOAIManagerRecoveryCheckpointInput): ResolveIOAIManagerRecoveryCheckpoint;
|
|
199
275
|
export declare function buildResolveIOAIManagerRecoveryEvidenceProbe(input: ResolveIOAIManagerRecoveryEvidenceProbeInput): ResolveIOAIManagerRecoveryEvidenceProbe;
|
|
200
276
|
export declare function buildResolveIOAIManagerRecoveryActionPacket(input: ResolveIOAIManagerRecoveryActionPacketInput): ResolveIOAIManagerRecoveryActionPacket;
|
|
277
|
+
export declare function decideResolveIOAIManagerRecoveryActionDispatch(input: ResolveIOAIManagerRecoveryActionDispatchInput): ResolveIOAIManagerRecoveryActionDispatchDecision;
|
|
278
|
+
export declare function appendResolveIOAIManagerRecoveryActionDispatch(history: ResolveIOAIManagerRecoveryActionDispatchRecord[] | undefined, record: ResolveIOAIManagerRecoveryActionDispatchRecord | undefined, limit?: number): ResolveIOAIManagerRecoveryActionDispatchRecord[];
|
|
279
|
+
export declare function buildResolveIOAIManagerRecoveryExecutionDirective(input: ResolveIOAIManagerRecoveryExecutionDirectiveInput): ResolveIOAIManagerRecoveryExecutionDirective;
|
|
201
280
|
export declare function decideResolveIOAIManagerRecoveryGate(input: ResolveIOAIManagerRecoveryGateInput): ResolveIOAIManagerRecoveryGateDecision;
|
|
202
281
|
export declare function buildResolveIOAIManagerRecoveryPlan(input?: ResolveIOAIManagerRecoveryPlanInput): ResolveIOAIManagerRecoveryPlan;
|
|
203
282
|
export declare function decideResolveIOAIManagerPolicy(input: ResolveIOAIManagerPolicyInput): ResolveIOAIManagerPolicyDecision;
|
|
@@ -53,6 +53,9 @@ exports.hashResolveIOAIManagerEvidence = hashResolveIOAIManagerEvidence;
|
|
|
53
53
|
exports.buildResolveIOAIManagerRecoveryCheckpoint = buildResolveIOAIManagerRecoveryCheckpoint;
|
|
54
54
|
exports.buildResolveIOAIManagerRecoveryEvidenceProbe = buildResolveIOAIManagerRecoveryEvidenceProbe;
|
|
55
55
|
exports.buildResolveIOAIManagerRecoveryActionPacket = buildResolveIOAIManagerRecoveryActionPacket;
|
|
56
|
+
exports.decideResolveIOAIManagerRecoveryActionDispatch = decideResolveIOAIManagerRecoveryActionDispatch;
|
|
57
|
+
exports.appendResolveIOAIManagerRecoveryActionDispatch = appendResolveIOAIManagerRecoveryActionDispatch;
|
|
58
|
+
exports.buildResolveIOAIManagerRecoveryExecutionDirective = buildResolveIOAIManagerRecoveryExecutionDirective;
|
|
56
59
|
exports.decideResolveIOAIManagerRecoveryGate = decideResolveIOAIManagerRecoveryGate;
|
|
57
60
|
exports.buildResolveIOAIManagerRecoveryPlan = buildResolveIOAIManagerRecoveryPlan;
|
|
58
61
|
exports.decideResolveIOAIManagerPolicy = decideResolveIOAIManagerPolicy;
|
|
@@ -417,6 +420,202 @@ function buildResolveIOAIManagerRecoveryActionPacket(input) {
|
|
|
417
420
|
stopWhen: stopWhen
|
|
418
421
|
} }, (mode === 'collect_evidence' ? { blockedReason: 'Manager parked this loop until the recovery action records new evidence.' } : {})), { createdAt: now });
|
|
419
422
|
}
|
|
423
|
+
function dispatchActionForMode(mode) {
|
|
424
|
+
var map = {
|
|
425
|
+
advance: 'advance',
|
|
426
|
+
collect_evidence: 'run_evidence_probe',
|
|
427
|
+
read_only_diagnosis: 'run_read_only_diagnosis',
|
|
428
|
+
repair_infra: 'run_infra_repair',
|
|
429
|
+
repair_compile: 'run_compile_repair',
|
|
430
|
+
repair_journey_contract: 'run_journey_contract_repair',
|
|
431
|
+
repair_business_assertion: 'run_business_assertion_repair',
|
|
432
|
+
repair_release: 'run_release_repair',
|
|
433
|
+
targeted_product_repair: 'run_targeted_product_repair',
|
|
434
|
+
manual_review: 'park_manual',
|
|
435
|
+
continue_gate: 'continue_gate'
|
|
436
|
+
};
|
|
437
|
+
return map[mode] || 'park_manual';
|
|
438
|
+
}
|
|
439
|
+
function buildRecoveryDispatchRecord(action, dispatchAction, status, reason, current, now) {
|
|
440
|
+
var evidenceHash = (current === null || current === void 0 ? void 0 : current.evidenceHash) || action.checkpointId || action.actionId;
|
|
441
|
+
var blockerFingerprint = resolveResolveIOAIManagerBlockerFingerprint(current, action.objective);
|
|
442
|
+
var artifactPaths = cleanList(current === null || current === void 0 ? void 0 : current.artifactPaths, 20, 500);
|
|
443
|
+
var createdAt = isoNow(now);
|
|
444
|
+
return __assign(__assign(__assign({ dispatchId: stableHash('mgr-dispatch', {
|
|
445
|
+
actionId: action.actionId,
|
|
446
|
+
dispatchAction: dispatchAction,
|
|
447
|
+
evidenceHash: evidenceHash,
|
|
448
|
+
blockerFingerprint: blockerFingerprint,
|
|
449
|
+
status: status
|
|
450
|
+
}), actionId: action.actionId, checkpointId: action.checkpointId, probeId: action.probeId, mode: action.mode, dispatchAction: dispatchAction, status: status, evidenceHash: evidenceHash, blockerFingerprint: blockerFingerprint, productRepairAllowed: action.productRepairAllowed && dispatchAction === 'run_targeted_product_repair', expensiveModelAllowed: action.expensiveModelAllowed && dispatchAction !== 'run_evidence_probe', reason: reason, artifactPaths: artifactPaths }, (status === 'started' ? { startedAt: createdAt } : {})), (status === 'completed' ? { completedAt: createdAt } : {})), { createdAt: createdAt });
|
|
451
|
+
}
|
|
452
|
+
function decideResolveIOAIManagerRecoveryActionDispatch(input) {
|
|
453
|
+
var action = input.action;
|
|
454
|
+
var history = Array.isArray(input.history) ? input.history.filter(Boolean).slice(-50) : [];
|
|
455
|
+
var current = input.current || {};
|
|
456
|
+
if (!action) {
|
|
457
|
+
return {
|
|
458
|
+
dispatchAction: 'park_manual',
|
|
459
|
+
allowed: false,
|
|
460
|
+
reason: 'recovery_dispatch_missing_action',
|
|
461
|
+
status: 'parked',
|
|
462
|
+
canRunProductRepair: false,
|
|
463
|
+
canRunExpensiveModel: false,
|
|
464
|
+
shouldRecordDispatch: false,
|
|
465
|
+
requiresNewEvidence: true,
|
|
466
|
+
newEvidence: false
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
var dispatchAction = dispatchActionForMode(action.mode);
|
|
470
|
+
var evidenceHash = current.evidenceHash || action.checkpointId || action.actionId;
|
|
471
|
+
var blockerFingerprint = resolveResolveIOAIManagerBlockerFingerprint(current, action.objective);
|
|
472
|
+
var sameActionHistory = history.filter(function (entry) { return entry.actionId === action.actionId; });
|
|
473
|
+
var sameEvidenceHistory = sameActionHistory.filter(function (entry) { return entry.evidenceHash === evidenceHash
|
|
474
|
+
&& entry.blockerFingerprint === blockerFingerprint; });
|
|
475
|
+
var activeDispatch = sameEvidenceHistory.find(function (entry) { return entry.status === 'queued' || entry.status === 'started'; });
|
|
476
|
+
var completedDispatch = sameEvidenceHistory.find(function (entry) { return entry.status === 'completed' || entry.status === 'failed'; });
|
|
477
|
+
var newEvidence = sameActionHistory.length > 0 && sameEvidenceHistory.length === 0;
|
|
478
|
+
var requiresNewEvidence = action.retryPolicy.requireNewEvidence === true;
|
|
479
|
+
var manualOnly = action.mode === 'manual_review' || !action.autoRunnable;
|
|
480
|
+
var productDispatch = dispatchAction === 'run_targeted_product_repair';
|
|
481
|
+
var expensiveDispatch = !['run_evidence_probe', 'advance', 'continue_gate', 'park_manual'].includes(dispatchAction);
|
|
482
|
+
if (manualOnly && input.operatorApproved !== true) {
|
|
483
|
+
var record_1 = buildRecoveryDispatchRecord(action, 'park_manual', 'parked', 'recovery_dispatch_requires_manual_review', current, input.now);
|
|
484
|
+
return {
|
|
485
|
+
dispatchAction: 'park_manual',
|
|
486
|
+
allowed: false,
|
|
487
|
+
reason: record_1.reason,
|
|
488
|
+
status: 'parked',
|
|
489
|
+
canRunProductRepair: false,
|
|
490
|
+
canRunExpensiveModel: false,
|
|
491
|
+
shouldRecordDispatch: true,
|
|
492
|
+
requiresNewEvidence: requiresNewEvidence,
|
|
493
|
+
newEvidence: newEvidence,
|
|
494
|
+
dispatchRecord: record_1
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
if (productDispatch && action.productRepairAllowed !== true) {
|
|
498
|
+
var record_2 = buildRecoveryDispatchRecord(action, 'park_manual', 'parked', 'recovery_dispatch_product_repair_not_allowed', current, input.now);
|
|
499
|
+
return {
|
|
500
|
+
dispatchAction: 'park_manual',
|
|
501
|
+
allowed: false,
|
|
502
|
+
reason: record_2.reason,
|
|
503
|
+
status: 'parked',
|
|
504
|
+
canRunProductRepair: false,
|
|
505
|
+
canRunExpensiveModel: false,
|
|
506
|
+
shouldRecordDispatch: true,
|
|
507
|
+
requiresNewEvidence: true,
|
|
508
|
+
newEvidence: newEvidence,
|
|
509
|
+
dispatchRecord: record_2
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
if (activeDispatch) {
|
|
513
|
+
return {
|
|
514
|
+
dispatchAction: 'park_manual',
|
|
515
|
+
allowed: false,
|
|
516
|
+
reason: 'recovery_dispatch_already_running_for_same_evidence',
|
|
517
|
+
status: 'parked',
|
|
518
|
+
canRunProductRepair: false,
|
|
519
|
+
canRunExpensiveModel: false,
|
|
520
|
+
shouldRecordDispatch: false,
|
|
521
|
+
requiresNewEvidence: true,
|
|
522
|
+
newEvidence: false
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
if (completedDispatch && requiresNewEvidence && !newEvidence) {
|
|
526
|
+
var record_3 = buildRecoveryDispatchRecord(action, 'park_manual', 'parked', 'recovery_dispatch_same_evidence_already_attempted', current, input.now);
|
|
527
|
+
return {
|
|
528
|
+
dispatchAction: 'park_manual',
|
|
529
|
+
allowed: false,
|
|
530
|
+
reason: record_3.reason,
|
|
531
|
+
status: 'parked',
|
|
532
|
+
canRunProductRepair: false,
|
|
533
|
+
canRunExpensiveModel: false,
|
|
534
|
+
shouldRecordDispatch: true,
|
|
535
|
+
requiresNewEvidence: true,
|
|
536
|
+
newEvidence: false,
|
|
537
|
+
dispatchRecord: record_3
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
var status = dispatchAction === 'advance' || dispatchAction === 'continue_gate'
|
|
541
|
+
? 'completed'
|
|
542
|
+
: 'started';
|
|
543
|
+
var record = buildRecoveryDispatchRecord(action, dispatchAction, status, 'recovery_dispatch_allowed', current, input.now);
|
|
544
|
+
return {
|
|
545
|
+
dispatchAction: dispatchAction,
|
|
546
|
+
allowed: true,
|
|
547
|
+
reason: 'recovery_dispatch_allowed',
|
|
548
|
+
status: status,
|
|
549
|
+
canRunProductRepair: productDispatch && action.productRepairAllowed === true,
|
|
550
|
+
canRunExpensiveModel: expensiveDispatch && action.expensiveModelAllowed === true,
|
|
551
|
+
shouldRecordDispatch: true,
|
|
552
|
+
requiresNewEvidence: requiresNewEvidence,
|
|
553
|
+
newEvidence: newEvidence,
|
|
554
|
+
dispatchRecord: record
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
function appendResolveIOAIManagerRecoveryActionDispatch(history, record, limit) {
|
|
558
|
+
if (limit === void 0) { limit = 50; }
|
|
559
|
+
var existing = Array.isArray(history) ? history.filter(Boolean) : [];
|
|
560
|
+
if (!record) {
|
|
561
|
+
return existing.slice(-limit);
|
|
562
|
+
}
|
|
563
|
+
var deduped = existing.filter(function (entry) { return entry.dispatchId !== record.dispatchId; });
|
|
564
|
+
return __spreadArray(__spreadArray([], __read(deduped), false), [record], false).slice(-limit);
|
|
565
|
+
}
|
|
566
|
+
function recoveryExecutionPhaseForDispatch(dispatchAction) {
|
|
567
|
+
var map = {
|
|
568
|
+
run_evidence_probe: 'evidence',
|
|
569
|
+
run_read_only_diagnosis: 'diagnosis',
|
|
570
|
+
run_infra_repair: 'infra',
|
|
571
|
+
run_compile_repair: 'compile',
|
|
572
|
+
run_journey_contract_repair: 'journey',
|
|
573
|
+
run_business_assertion_repair: 'business_proof',
|
|
574
|
+
run_release_repair: 'release',
|
|
575
|
+
run_targeted_product_repair: 'product_repair',
|
|
576
|
+
advance: 'advance',
|
|
577
|
+
continue_gate: 'advance',
|
|
578
|
+
park_manual: 'manual'
|
|
579
|
+
};
|
|
580
|
+
return map[dispatchAction] || 'manual';
|
|
581
|
+
}
|
|
582
|
+
function recoveryDirectiveReason(action, decision, current) {
|
|
583
|
+
var blocker = cleanText((current === null || current === void 0 ? void 0 : current.blocker) || (current === null || current === void 0 ? void 0 : current.summary) || '', 260);
|
|
584
|
+
var label = cleanText(action === null || action === void 0 ? void 0 : action.label, 120) || decision.dispatchAction;
|
|
585
|
+
var objective = cleanText(action === null || action === void 0 ? void 0 : action.objective, 260);
|
|
586
|
+
return [
|
|
587
|
+
"MANAGER_RECOVERY:".concat(decision.dispatchAction),
|
|
588
|
+
"label=".concat(label),
|
|
589
|
+
decision.reason ? "reason=".concat(decision.reason) : '',
|
|
590
|
+
blocker ? "blocker=".concat(blocker) : '',
|
|
591
|
+
objective ? "objective=".concat(objective) : ''
|
|
592
|
+
].filter(Boolean).join(' | ');
|
|
593
|
+
}
|
|
594
|
+
function buildResolveIOAIManagerRecoveryExecutionDirective(input) {
|
|
595
|
+
var _a, _b, _c, _d;
|
|
596
|
+
var action = input.action;
|
|
597
|
+
var dispatchDecision = input.dispatchDecision || decideResolveIOAIManagerRecoveryActionDispatch({
|
|
598
|
+
action: action,
|
|
599
|
+
current: input.current,
|
|
600
|
+
now: input.now
|
|
601
|
+
});
|
|
602
|
+
var dispatchAction = dispatchDecision.dispatchAction;
|
|
603
|
+
var now = isoNow(input.now);
|
|
604
|
+
var phase = recoveryExecutionPhaseForDispatch(dispatchAction);
|
|
605
|
+
var lane = cleanText((action === null || action === void 0 ? void 0 : action.lane) || ((_a = input.current) === null || _a === void 0 ? void 0 : _a.lane) || '', 120);
|
|
606
|
+
var stepType = cleanText((action === null || action === void 0 ? void 0 : action.stepType) || ((_b = input.current) === null || _b === void 0 ? void 0 : _b.stepType) || '', 120);
|
|
607
|
+
var rerunReason = recoveryDirectiveReason(action, dispatchDecision, input.current);
|
|
608
|
+
var surface = cleanText(input.surface || 'runner', 120);
|
|
609
|
+
return __assign(__assign({ directiveId: stableHash('mgr-directive', {
|
|
610
|
+
surface: surface,
|
|
611
|
+
actionId: (action === null || action === void 0 ? void 0 : action.actionId) || '',
|
|
612
|
+
dispatchAction: dispatchAction,
|
|
613
|
+
reason: dispatchDecision.reason,
|
|
614
|
+
evidenceHash: ((_c = dispatchDecision.dispatchRecord) === null || _c === void 0 ? void 0 : _c.evidenceHash) || ((_d = input.current) === null || _d === void 0 ? void 0 : _d.evidenceHash) || ''
|
|
615
|
+
}), surface: surface, dispatchAction: dispatchAction, phase: phase, allowed: dispatchDecision.allowed, status: dispatchDecision.status, reason: dispatchDecision.reason, lane: lane, stepType: stepType, nextActionLabel: cleanText(action === null || action === void 0 ? void 0 : action.label, 160) || dispatchAction, rerunReason: rerunReason, evidenceOnly: (action === null || action === void 0 ? void 0 : action.evidenceOnly) !== false || dispatchAction === 'run_evidence_probe', autoRunnable: (action === null || action === void 0 ? void 0 : action.autoRunnable) === true, productRepairAllowed: (action === null || action === void 0 ? void 0 : action.productRepairAllowed) === true, expensiveModelAllowed: (action === null || action === void 0 ? void 0 : action.expensiveModelAllowed) === true, canRunProductRepair: dispatchDecision.canRunProductRepair, canRunExpensiveModel: dispatchDecision.canRunExpensiveModel, canResetLoopAfterEvidence: (action === null || action === void 0 ? void 0 : action.canResetLoopAfterEvidence) === true, requiresNewEvidence: dispatchDecision.requiresNewEvidence, newEvidence: dispatchDecision.newEvidence, maxAttemptsBeforePark: Math.max(1, Number((action === null || action === void 0 ? void 0 : action.maxAttemptsBeforePark) || 1) || 1), requiredArtifacts: cleanList(action === null || action === void 0 ? void 0 : action.requiredArtifacts, 20, 500), nextCommands: cleanList(action === null || action === void 0 ? void 0 : action.nextCommands, 20, 500), successCriteria: cleanList(action === null || action === void 0 ? void 0 : action.successCriteria, 20, 500), forbiddenActions: (action === null || action === void 0 ? void 0 : action.productRepairAllowed) === true
|
|
616
|
+
? []
|
|
617
|
+
: ['Do not run product-code repair from this directive unless canRunProductRepair is true.'] }, (dispatchDecision.dispatchRecord ? { dispatchRecord: dispatchDecision.dispatchRecord } : {})), { createdAt: now });
|
|
618
|
+
}
|
|
420
619
|
function listHasNewEntry(current, previous) {
|
|
421
620
|
var existing = new Set(previous.map(function (entry) { return cleanText(entry, 500); }).filter(Boolean));
|
|
422
621
|
return current.some(function (entry) {
|