@resolveio/server-lib 22.3.198 → 22.3.199
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
CHANGED
|
@@ -2245,6 +2245,129 @@ function supportNextActionContractGate(contract, now, required) {
|
|
|
2245
2245
|
metadata: __assign(__assign({}, metadata), { blockers: blockers, missingSafetyFlags: missingSafetyFlags })
|
|
2246
2246
|
};
|
|
2247
2247
|
}
|
|
2248
|
+
function supportManagerExecutionPacketObject(ticket, job, evidence, nextActionContract) {
|
|
2249
|
+
var ticketAutomation = plainObject(ticket.automation);
|
|
2250
|
+
var ticketManager = plainObject(ticketAutomation.manager || ticket.manager);
|
|
2251
|
+
var autonomousDecision = plainObject(job.supportV5AutonomousDecision
|
|
2252
|
+
|| job.support_v5_autonomous_decision
|
|
2253
|
+
|| evidence.supportV5AutonomousDecision
|
|
2254
|
+
|| evidence.support_v5_autonomous_decision
|
|
2255
|
+
|| ticket.supportV5AutonomousDecision
|
|
2256
|
+
|| ticket.support_v5_autonomous_decision);
|
|
2257
|
+
var explicitPacket = evidenceObject(autonomousDecision.managerExecutionPacket, autonomousDecision.manager_execution_packet, job.supportV5ManagerExecutionPacket, job.support_v5_manager_execution_packet, job.managerExecutionPacket, job.manager_execution_packet, evidence.supportV5ManagerExecutionPacket, evidence.support_v5_manager_execution_packet, evidence.managerExecutionPacket, evidence.manager_execution_packet, ticket.supportV5ManagerExecutionPacket, ticket.support_v5_manager_execution_packet, ticket.managerExecutionPacket, ticket.manager_execution_packet, ticketManager.managerExecutionPacket, ticketManager.manager_execution_packet);
|
|
2258
|
+
if (Object.keys(explicitPacket).length) {
|
|
2259
|
+
return explicitPacket;
|
|
2260
|
+
}
|
|
2261
|
+
if (nextActionContract && Object.keys(nextActionContract).length) {
|
|
2262
|
+
try {
|
|
2263
|
+
return (0, support_runner_v5_1.buildResolveIOSupportManagerExecutionPacket)(nextActionContract);
|
|
2264
|
+
}
|
|
2265
|
+
catch (_a) {
|
|
2266
|
+
return {};
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
return {};
|
|
2270
|
+
}
|
|
2271
|
+
function supportManagerExecutionPacketMetadata(packet) {
|
|
2272
|
+
var _a, _b, _c, _d;
|
|
2273
|
+
var validation = plainObject(packet.validation);
|
|
2274
|
+
var validationBlockers = cleanStringList(validation.blockers, 40, 500);
|
|
2275
|
+
var directBlockers = cleanStringList(packet.blockers, 40, 500);
|
|
2276
|
+
return {
|
|
2277
|
+
packetId: cleanText(packet.packetId || packet.packet_id, 200),
|
|
2278
|
+
status: cleanText(packet.status, 120),
|
|
2279
|
+
action: cleanText(packet.action, 160),
|
|
2280
|
+
label: cleanText(packet.label, 300),
|
|
2281
|
+
primaryCommand: cleanText(packet.primaryCommand || packet.primary_command, 240),
|
|
2282
|
+
lane: cleanText(packet.lane, 120),
|
|
2283
|
+
stepType: cleanText(packet.stepType || packet.step_type, 120),
|
|
2284
|
+
executeNow: booleanFlag((_a = packet.executeNow) !== null && _a !== void 0 ? _a : packet.execute_now),
|
|
2285
|
+
canRunWithoutCodexMonitor: booleanFlag((_b = packet.canRunWithoutCodexMonitor) !== null && _b !== void 0 ? _b : packet.can_run_without_codex_monitor),
|
|
2286
|
+
codexFallbackRequired: booleanFlag((_c = packet.codexFallbackRequired) !== null && _c !== void 0 ? _c : packet.codex_fallback_required),
|
|
2287
|
+
retryScope: cleanText(packet.retryScope || packet.retry_scope, 120),
|
|
2288
|
+
maxAttemptsBeforeFreshEvidence: numberValue((_d = packet.maxAttemptsBeforeFreshEvidence) !== null && _d !== void 0 ? _d : packet.max_attempts_before_fresh_evidence),
|
|
2289
|
+
costRisk: cleanText(packet.costRisk || packet.cost_risk, 120),
|
|
2290
|
+
proofRequiredBeforeContinuation: cleanStringList(packet.proofRequiredBeforeContinuation || packet.proof_required_before_continuation, 40, 500),
|
|
2291
|
+
expectedStateTransition: cleanText(packet.expectedStateTransition || packet.expected_state_transition, 1000),
|
|
2292
|
+
stopConditions: cleanStringList(packet.stopConditions || packet.stop_conditions, 40, 500),
|
|
2293
|
+
forbiddenActions: cleanStringList(packet.forbiddenActions || packet.forbidden_actions, 40, 500),
|
|
2294
|
+
ownerFiles: cleanStringList(packet.ownerFiles || packet.owner_files, 40, 500),
|
|
2295
|
+
nextCommands: cleanStringList(packet.nextCommands || packet.next_commands, 40, 500),
|
|
2296
|
+
blockers: Array.from(new Set(__spreadArray(__spreadArray([], __read(directBlockers), false), __read(validationBlockers), false))).slice(0, 40),
|
|
2297
|
+
validation: {
|
|
2298
|
+
valid: booleanFlag(validation.valid),
|
|
2299
|
+
status: cleanText(validation.status, 120),
|
|
2300
|
+
blockers: validationBlockers,
|
|
2301
|
+
warnings: cleanStringList(validation.warnings, 40, 500)
|
|
2302
|
+
},
|
|
2303
|
+
createdAt: cleanText(packet.createdAt || packet.created_at, 120)
|
|
2304
|
+
};
|
|
2305
|
+
}
|
|
2306
|
+
function supportManagerExecutionPacketGate(packet, now, required) {
|
|
2307
|
+
if (required === void 0) { required = false; }
|
|
2308
|
+
if (!packet || !Object.keys(packet).length) {
|
|
2309
|
+
if (!required) {
|
|
2310
|
+
return undefined;
|
|
2311
|
+
}
|
|
2312
|
+
var blocker = 'Support V5 run is missing a manager execution packet, so the console cannot prove the next action can execute without side Codex monitoring.';
|
|
2313
|
+
return {
|
|
2314
|
+
key: 'support_manager_execution_packet',
|
|
2315
|
+
label: 'Support manager execution packet',
|
|
2316
|
+
status: 'blocked',
|
|
2317
|
+
reason: blocker,
|
|
2318
|
+
evidenceRefs: [],
|
|
2319
|
+
recordedAt: isoNow(now),
|
|
2320
|
+
metadata: {
|
|
2321
|
+
required: true,
|
|
2322
|
+
missingPacket: true,
|
|
2323
|
+
executeNow: false,
|
|
2324
|
+
canRunWithoutCodexMonitor: false,
|
|
2325
|
+
codexFallbackRequired: true,
|
|
2326
|
+
blockers: [blocker],
|
|
2327
|
+
validation: {
|
|
2328
|
+
valid: false,
|
|
2329
|
+
status: 'blocked',
|
|
2330
|
+
blockers: [blocker],
|
|
2331
|
+
warnings: []
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
};
|
|
2335
|
+
}
|
|
2336
|
+
var metadata = supportManagerExecutionPacketMetadata(packet);
|
|
2337
|
+
var blockers = cleanStringList(metadata.blockers, 40, 500);
|
|
2338
|
+
if (metadata.validation.valid !== true) {
|
|
2339
|
+
blockers.push('Manager execution packet is missing validated next-action contract proof.');
|
|
2340
|
+
}
|
|
2341
|
+
if (metadata.codexFallbackRequired === true) {
|
|
2342
|
+
blockers.push('Manager execution packet still requires Codex fallback.');
|
|
2343
|
+
}
|
|
2344
|
+
if (metadata.canRunWithoutCodexMonitor === false) {
|
|
2345
|
+
blockers.push('Manager execution packet does not prove Codex-monitor independence.');
|
|
2346
|
+
}
|
|
2347
|
+
var status = blockers.length
|
|
2348
|
+
? 'blocked'
|
|
2349
|
+
: metadata.status === 'auto_ready' && metadata.executeNow === true
|
|
2350
|
+
? 'pass'
|
|
2351
|
+
: metadata.status === 'manual_required'
|
|
2352
|
+
? 'warn'
|
|
2353
|
+
: 'blocked';
|
|
2354
|
+
var actionLabel = metadata.label || metadata.action || metadata.primaryCommand || 'support manager action';
|
|
2355
|
+
return {
|
|
2356
|
+
key: 'support_manager_execution_packet',
|
|
2357
|
+
label: 'Support manager execution packet',
|
|
2358
|
+
status: status,
|
|
2359
|
+
reason: status === 'pass'
|
|
2360
|
+
? "Support manager execution packet allows ".concat(actionLabel, " without side Codex monitoring.")
|
|
2361
|
+
: status === 'warn'
|
|
2362
|
+
? "Support manager execution packet for ".concat(actionLabel, " requires a human decision before execution.")
|
|
2363
|
+
: (blockers.join(' ') || "Support manager execution packet for ".concat(actionLabel, " is not auto-ready.")),
|
|
2364
|
+
evidenceRefs: cleanStringList(__spreadArray(__spreadArray(__spreadArray([], __read(metadata.proofRequiredBeforeContinuation), false), [
|
|
2365
|
+
metadata.expectedStateTransition
|
|
2366
|
+
], false), __read(metadata.stopConditions), false), 40, 500),
|
|
2367
|
+
recordedAt: isoNow(now || metadata.createdAt),
|
|
2368
|
+
metadata: __assign(__assign({}, metadata), { blockers: blockers })
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2248
2371
|
function supportDiagnosisEvidencePackObject(ticket, job, evidence) {
|
|
2249
2372
|
var ticketAutomation = plainObject(ticket.automation);
|
|
2250
2373
|
var ticketManager = plainObject(ticketAutomation.manager || ticket.manager);
|
|
@@ -3332,7 +3455,7 @@ function applyAssistantAnswerQualityGate(qa, decision, now) {
|
|
|
3332
3455
|
}
|
|
3333
3456
|
function buildSupportAIRunFromEvidence(input) {
|
|
3334
3457
|
var e_32, _a, e_33, _b;
|
|
3335
|
-
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72;
|
|
3458
|
+
var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90;
|
|
3336
3459
|
var ticket = input.ticket || {};
|
|
3337
3460
|
var job = input.job || {};
|
|
3338
3461
|
var evidence = buildSupportQaEvidence(input);
|
|
@@ -3344,8 +3467,8 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
3344
3467
|
addSourceId(sourceIds, 'jobId', job._id || job.id || job.jobId);
|
|
3345
3468
|
addSourceId(sourceIds, 'buildPlanId', job.buildPlanId || ticket.buildPlanId);
|
|
3346
3469
|
try {
|
|
3347
|
-
for (var
|
|
3348
|
-
var event_1 =
|
|
3470
|
+
for (var _91 = __values(asArray(input.taskEvents)), _92 = _91.next(); !_92.done; _92 = _91.next()) {
|
|
3471
|
+
var event_1 = _92.value;
|
|
3349
3472
|
pushEvent(events, {
|
|
3350
3473
|
type: event_1.type === 'human_intervention' ? 'human_intervention' : 'log',
|
|
3351
3474
|
category: cleanText(event_1.category || event_1.phase || event_1.type, 160),
|
|
@@ -3362,13 +3485,13 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
3362
3485
|
catch (e_32_1) { e_32 = { error: e_32_1 }; }
|
|
3363
3486
|
finally {
|
|
3364
3487
|
try {
|
|
3365
|
-
if (
|
|
3488
|
+
if (_92 && !_92.done && (_a = _91.return)) _a.call(_91);
|
|
3366
3489
|
}
|
|
3367
3490
|
finally { if (e_32) throw e_32.error; }
|
|
3368
3491
|
}
|
|
3369
3492
|
try {
|
|
3370
|
-
for (var
|
|
3371
|
-
var aiJob =
|
|
3493
|
+
for (var _93 = __values(asArray(input.aiJobs)), _94 = _93.next(); !_94.done; _94 = _93.next()) {
|
|
3494
|
+
var aiJob = _94.value;
|
|
3372
3495
|
pushEvent(events, {
|
|
3373
3496
|
type: aiJob.model ? 'model_call' : 'log',
|
|
3374
3497
|
category: cleanText(aiJob.category || aiJob.phase || aiJob.runner, 160),
|
|
@@ -3386,7 +3509,7 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
3386
3509
|
catch (e_33_1) { e_33 = { error: e_33_1 }; }
|
|
3387
3510
|
finally {
|
|
3388
3511
|
try {
|
|
3389
|
-
if (
|
|
3512
|
+
if (_94 && !_94.done && (_b = _93.return)) _b.call(_93);
|
|
3390
3513
|
}
|
|
3391
3514
|
finally { if (e_33) throw e_33.error; }
|
|
3392
3515
|
}
|
|
@@ -3460,6 +3583,19 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
3460
3583
|
metadata: nextActionContractGate.metadata
|
|
3461
3584
|
});
|
|
3462
3585
|
}
|
|
3586
|
+
var managerExecutionPacket = supportManagerExecutionPacketObject(ticket, job, evidence, nextActionContract);
|
|
3587
|
+
var managerExecutionPacketGate = supportManagerExecutionPacketGate(managerExecutionPacket, input.now, nextActionContractRequired);
|
|
3588
|
+
if (managerExecutionPacketGate) {
|
|
3589
|
+
gates.push(managerExecutionPacketGate);
|
|
3590
|
+
pushEvent(events, {
|
|
3591
|
+
type: 'log',
|
|
3592
|
+
category: 'support_manager_execution_packet',
|
|
3593
|
+
message: managerExecutionPacketGate.reason,
|
|
3594
|
+
artifactPaths: managerExecutionPacketGate.evidenceRefs,
|
|
3595
|
+
recordedAt: managerExecutionPacketGate.recordedAt,
|
|
3596
|
+
metadata: managerExecutionPacketGate.metadata
|
|
3597
|
+
});
|
|
3598
|
+
}
|
|
3463
3599
|
var managerRecoveryExecutionProof = plainObject(evidence.managerRecoveryExecutionProof || evidence.manager_recovery_execution_proof);
|
|
3464
3600
|
var recoveryExecutionProofGate = managerRecoveryExecutionProofGate(managerRecoveryExecutionProof, input.now);
|
|
3465
3601
|
if (recoveryExecutionProofGate) {
|
|
@@ -3720,19 +3856,38 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
3720
3856
|
sameFailureCount: Number(((_36 = nextActionContractGate.metadata) === null || _36 === void 0 ? void 0 : _36.sameFailureCount) || 0),
|
|
3721
3857
|
blockers: cleanStringList((_37 = nextActionContractGate.metadata) === null || _37 === void 0 ? void 0 : _37.blockers, 20, 500)
|
|
3722
3858
|
} : undefined,
|
|
3859
|
+
managerExecutionPacket: managerExecutionPacketGate ? {
|
|
3860
|
+
status: cleanText((_38 = managerExecutionPacketGate.metadata) === null || _38 === void 0 ? void 0 : _38.status, 120),
|
|
3861
|
+
gateStatus: managerExecutionPacketGate.status,
|
|
3862
|
+
action: cleanText((_39 = managerExecutionPacketGate.metadata) === null || _39 === void 0 ? void 0 : _39.action, 160),
|
|
3863
|
+
primaryCommand: cleanText((_40 = managerExecutionPacketGate.metadata) === null || _40 === void 0 ? void 0 : _40.primaryCommand, 240),
|
|
3864
|
+
executeNow: ((_41 = managerExecutionPacketGate.metadata) === null || _41 === void 0 ? void 0 : _41.executeNow) === true,
|
|
3865
|
+
canRunWithoutCodexMonitor: ((_42 = managerExecutionPacketGate.metadata) === null || _42 === void 0 ? void 0 : _42.canRunWithoutCodexMonitor) === true,
|
|
3866
|
+
codexFallbackRequired: ((_43 = managerExecutionPacketGate.metadata) === null || _43 === void 0 ? void 0 : _43.codexFallbackRequired) === true,
|
|
3867
|
+
retryScope: cleanText((_44 = managerExecutionPacketGate.metadata) === null || _44 === void 0 ? void 0 : _44.retryScope, 120),
|
|
3868
|
+
maxAttemptsBeforeFreshEvidence: Number(((_45 = managerExecutionPacketGate.metadata) === null || _45 === void 0 ? void 0 : _45.maxAttemptsBeforeFreshEvidence) || 0),
|
|
3869
|
+
costRisk: cleanText((_46 = managerExecutionPacketGate.metadata) === null || _46 === void 0 ? void 0 : _46.costRisk, 120),
|
|
3870
|
+
validationStatus: cleanText((_48 = (_47 = managerExecutionPacketGate.metadata) === null || _47 === void 0 ? void 0 : _47.validation) === null || _48 === void 0 ? void 0 : _48.status, 120),
|
|
3871
|
+
validationValid: ((_50 = (_49 = managerExecutionPacketGate.metadata) === null || _49 === void 0 ? void 0 : _49.validation) === null || _50 === void 0 ? void 0 : _50.valid) === true,
|
|
3872
|
+
proofRequiredBeforeContinuation: cleanStringList((_51 = managerExecutionPacketGate.metadata) === null || _51 === void 0 ? void 0 : _51.proofRequiredBeforeContinuation, 20, 500),
|
|
3873
|
+
stopConditions: cleanStringList((_52 = managerExecutionPacketGate.metadata) === null || _52 === void 0 ? void 0 : _52.stopConditions, 20, 500),
|
|
3874
|
+
forbiddenActions: cleanStringList((_53 = managerExecutionPacketGate.metadata) === null || _53 === void 0 ? void 0 : _53.forbiddenActions, 20, 500),
|
|
3875
|
+
ownerFiles: cleanStringList((_54 = managerExecutionPacketGate.metadata) === null || _54 === void 0 ? void 0 : _54.ownerFiles, 40, 500),
|
|
3876
|
+
blockers: cleanStringList((_55 = managerExecutionPacketGate.metadata) === null || _55 === void 0 ? void 0 : _55.blockers, 20, 500)
|
|
3877
|
+
} : undefined,
|
|
3723
3878
|
managerRecoveryExecutionProof: recoveryExecutionProofGate ? {
|
|
3724
|
-
status: cleanText((
|
|
3879
|
+
status: cleanText((_56 = recoveryExecutionProofGate.metadata) === null || _56 === void 0 ? void 0 : _56.status, 120),
|
|
3725
3880
|
gateStatus: recoveryExecutionProofGate.status,
|
|
3726
|
-
canContinueRun: ((
|
|
3727
|
-
canRunProductRepair: ((
|
|
3728
|
-
canRunExpensiveModel: ((
|
|
3729
|
-
canResetLoopBudget: ((
|
|
3730
|
-
newEvidence: ((
|
|
3731
|
-
materialEvidence: ((
|
|
3732
|
-
evidenceStrength: cleanText((
|
|
3733
|
-
nextAllowedAction: cleanText((
|
|
3734
|
-
missingEvidence: cleanStringList((
|
|
3735
|
-
blockers: cleanStringList((
|
|
3881
|
+
canContinueRun: ((_57 = recoveryExecutionProofGate.metadata) === null || _57 === void 0 ? void 0 : _57.canContinueRun) === true,
|
|
3882
|
+
canRunProductRepair: ((_58 = recoveryExecutionProofGate.metadata) === null || _58 === void 0 ? void 0 : _58.canRunProductRepair) === true,
|
|
3883
|
+
canRunExpensiveModel: ((_59 = recoveryExecutionProofGate.metadata) === null || _59 === void 0 ? void 0 : _59.canRunExpensiveModel) === true,
|
|
3884
|
+
canResetLoopBudget: ((_60 = recoveryExecutionProofGate.metadata) === null || _60 === void 0 ? void 0 : _60.canResetLoopBudget) === true,
|
|
3885
|
+
newEvidence: ((_61 = recoveryExecutionProofGate.metadata) === null || _61 === void 0 ? void 0 : _61.newEvidence) === true,
|
|
3886
|
+
materialEvidence: ((_62 = recoveryExecutionProofGate.metadata) === null || _62 === void 0 ? void 0 : _62.materialEvidence) === true,
|
|
3887
|
+
evidenceStrength: cleanText((_63 = recoveryExecutionProofGate.metadata) === null || _63 === void 0 ? void 0 : _63.evidenceStrength, 120),
|
|
3888
|
+
nextAllowedAction: cleanText((_64 = recoveryExecutionProofGate.metadata) === null || _64 === void 0 ? void 0 : _64.nextAllowedAction, 180),
|
|
3889
|
+
missingEvidence: cleanStringList((_65 = recoveryExecutionProofGate.metadata) === null || _65 === void 0 ? void 0 : _65.missingEvidence, 20, 500),
|
|
3890
|
+
blockers: cleanStringList((_66 = recoveryExecutionProofGate.metadata) === null || _66 === void 0 ? void 0 : _66.blockers, 20, 500)
|
|
3736
3891
|
} : undefined,
|
|
3737
3892
|
customerReplyPolicy: Object.keys(customerReplyPolicy).length ? {
|
|
3738
3893
|
action: cleanText(customerReplyPolicy.action, 120),
|
|
@@ -3740,31 +3895,31 @@ function buildSupportAIRunFromEvidence(input) {
|
|
|
3740
3895
|
canDraftCustomerReply: customerReplyPolicy.canDraftCustomerReply === true || customerReplyPolicy.can_draft_customer_reply === true,
|
|
3741
3896
|
canSendCustomerReply: customerReplyPolicy.canSendCustomerReply === true || customerReplyPolicy.can_send_customer_reply === true,
|
|
3742
3897
|
reason: cleanText(customerReplyPolicy.reason, 1000),
|
|
3743
|
-
reviewType: cleanText(((
|
|
3744
|
-
|| ((
|
|
3745
|
-
|| ((
|
|
3746
|
-
primaryAction: cleanText(((
|
|
3747
|
-
|| ((
|
|
3748
|
-
|| ((
|
|
3898
|
+
reviewType: cleanText(((_67 = customerReplyPolicy.humanReviewPacket) === null || _67 === void 0 ? void 0 : _67.reviewType)
|
|
3899
|
+
|| ((_68 = customerReplyPolicy.human_review_packet) === null || _68 === void 0 ? void 0 : _68.review_type)
|
|
3900
|
+
|| ((_69 = customerReplyPolicy.human_review_packet) === null || _69 === void 0 ? void 0 : _69.reviewType), 160),
|
|
3901
|
+
primaryAction: cleanText(((_70 = customerReplyPolicy.humanReviewPacket) === null || _70 === void 0 ? void 0 : _70.primaryAction)
|
|
3902
|
+
|| ((_71 = customerReplyPolicy.human_review_packet) === null || _71 === void 0 ? void 0 : _71.primary_action)
|
|
3903
|
+
|| ((_72 = customerReplyPolicy.human_review_packet) === null || _72 === void 0 ? void 0 : _72.primaryAction), 160),
|
|
3749
3904
|
clarificationContract: customerReplyPolicy.clarificationContract || customerReplyPolicy.clarification_contract ? {
|
|
3750
|
-
status: cleanText(((
|
|
3751
|
-
missingField: cleanText(((
|
|
3752
|
-
oneQuestionOnly: ((
|
|
3753
|
-
parksTicketUntilCustomerReply: ((
|
|
3905
|
+
status: cleanText(((_73 = customerReplyPolicy.clarificationContract) === null || _73 === void 0 ? void 0 : _73.status) || ((_74 = customerReplyPolicy.clarification_contract) === null || _74 === void 0 ? void 0 : _74.status), 120),
|
|
3906
|
+
missingField: cleanText(((_75 = customerReplyPolicy.clarificationContract) === null || _75 === void 0 ? void 0 : _75.missingField) || ((_76 = customerReplyPolicy.clarification_contract) === null || _76 === void 0 ? void 0 : _76.missing_field), 120),
|
|
3907
|
+
oneQuestionOnly: ((_77 = customerReplyPolicy.clarificationContract) === null || _77 === void 0 ? void 0 : _77.oneQuestionOnly) === true || ((_78 = customerReplyPolicy.clarification_contract) === null || _78 === void 0 ? void 0 : _78.one_question_only) === true,
|
|
3908
|
+
parksTicketUntilCustomerReply: ((_79 = customerReplyPolicy.clarificationContract) === null || _79 === void 0 ? void 0 : _79.parksTicketUntilCustomerReply) === true || ((_80 = customerReplyPolicy.clarification_contract) === null || _80 === void 0 ? void 0 : _80.parks_ticket_until_customer_reply) === true
|
|
3754
3909
|
} : undefined
|
|
3755
3910
|
} : undefined,
|
|
3756
3911
|
customerReplyReadiness: customerReplyReadinessGate ? {
|
|
3757
|
-
status: cleanText((
|
|
3912
|
+
status: cleanText((_81 = customerReplyReadinessGate.metadata) === null || _81 === void 0 ? void 0 : _81.status, 120),
|
|
3758
3913
|
gateStatus: customerReplyReadinessGate.status,
|
|
3759
|
-
primaryCommand: cleanText((
|
|
3760
|
-
policyAction: cleanText((
|
|
3761
|
-
canDraftCustomerReply: ((
|
|
3762
|
-
canSendCustomerReply: ((
|
|
3763
|
-
requiresHumanApproval: ((
|
|
3764
|
-
proofBacked: ((
|
|
3765
|
-
businessProofReady: ((
|
|
3766
|
-
releaseReady: ((
|
|
3767
|
-
blockers: cleanStringList((
|
|
3914
|
+
primaryCommand: cleanText((_82 = customerReplyReadinessGate.metadata) === null || _82 === void 0 ? void 0 : _82.primaryCommand, 180),
|
|
3915
|
+
policyAction: cleanText((_83 = customerReplyReadinessGate.metadata) === null || _83 === void 0 ? void 0 : _83.policyAction, 120),
|
|
3916
|
+
canDraftCustomerReply: ((_84 = customerReplyReadinessGate.metadata) === null || _84 === void 0 ? void 0 : _84.canDraftCustomerReply) === true,
|
|
3917
|
+
canSendCustomerReply: ((_85 = customerReplyReadinessGate.metadata) === null || _85 === void 0 ? void 0 : _85.canSendCustomerReply) === true,
|
|
3918
|
+
requiresHumanApproval: ((_86 = customerReplyReadinessGate.metadata) === null || _86 === void 0 ? void 0 : _86.requiresHumanApproval) === true,
|
|
3919
|
+
proofBacked: ((_87 = customerReplyReadinessGate.metadata) === null || _87 === void 0 ? void 0 : _87.proofBacked) === true,
|
|
3920
|
+
businessProofReady: ((_88 = customerReplyReadinessGate.metadata) === null || _88 === void 0 ? void 0 : _88.businessProofReady) === true,
|
|
3921
|
+
releaseReady: ((_89 = customerReplyReadinessGate.metadata) === null || _89 === void 0 ? void 0 : _89.releaseReady) === true,
|
|
3922
|
+
blockers: cleanStringList((_90 = customerReplyReadinessGate.metadata) === null || _90 === void 0 ? void 0 : _90.blockers, 20, 500)
|
|
3768
3923
|
} : undefined
|
|
3769
3924
|
}
|
|
3770
3925
|
});
|