@bpmsoftwaresolutions/ai-engine-client 1.1.27 → 1.1.28
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/src/index.js +27 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1403,13 +1403,19 @@ export class AIEngineClient {
|
|
|
1403
1403
|
createdBy,
|
|
1404
1404
|
parentTaskId,
|
|
1405
1405
|
claimId,
|
|
1406
|
+
claimProjectId,
|
|
1407
|
+
projectId,
|
|
1406
1408
|
claimedItemId,
|
|
1407
1409
|
workflowRunId,
|
|
1408
1410
|
agentSessionId,
|
|
1409
1411
|
allowedMutationSurfaces,
|
|
1410
1412
|
acknowledgedReminders,
|
|
1413
|
+
executionIntent,
|
|
1414
|
+
executionType,
|
|
1415
|
+
executionPurpose,
|
|
1411
1416
|
} = {}) {
|
|
1412
1417
|
const normalizedClaimId = cleanText(claimId);
|
|
1418
|
+
const normalizedClaimProjectId = cleanText(claimProjectId) || cleanText(projectId);
|
|
1413
1419
|
const normalizedClaimedItemId = cleanText(claimedItemId) || implementationItemId;
|
|
1414
1420
|
const normalizedWorkflowRunId = cleanText(workflowRunId);
|
|
1415
1421
|
const normalizedAgentSessionId = cleanText(agentSessionId);
|
|
@@ -1419,8 +1425,27 @@ export class AIEngineClient {
|
|
|
1419
1425
|
const normalizedAcknowledgedReminders = Array.isArray(acknowledgedReminders)
|
|
1420
1426
|
? acknowledgedReminders
|
|
1421
1427
|
: undefined;
|
|
1428
|
+
const normalizedExecutionIntent = (() => {
|
|
1429
|
+
if (executionIntent && typeof executionIntent === 'object') {
|
|
1430
|
+
const execution_type = cleanText(executionIntent.execution_type) || cleanText(executionIntent.executionType);
|
|
1431
|
+
const execution_purpose = cleanText(executionIntent.execution_purpose) || cleanText(executionIntent.executionPurpose);
|
|
1432
|
+
if (execution_type || execution_purpose) {
|
|
1433
|
+
return {
|
|
1434
|
+
...(execution_type ? { execution_type } : {}),
|
|
1435
|
+
...(execution_purpose ? { execution_purpose } : {}),
|
|
1436
|
+
};
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
const normalizedExecutionType = cleanText(executionType) || 'implementation_task';
|
|
1440
|
+
const normalizedExecutionPurpose = cleanText(executionPurpose) || cleanText(title) || 'implementation task';
|
|
1441
|
+
return {
|
|
1442
|
+
execution_type: normalizedExecutionType,
|
|
1443
|
+
execution_purpose: normalizedExecutionPurpose,
|
|
1444
|
+
};
|
|
1445
|
+
})();
|
|
1422
1446
|
await this._assertExecutionEligibility({
|
|
1423
1447
|
claim_id: normalizedClaimId,
|
|
1448
|
+
claim_project_id: normalizedClaimProjectId,
|
|
1424
1449
|
claimed_item_id: normalizedClaimedItemId,
|
|
1425
1450
|
workflow_run_id: normalizedWorkflowRunId,
|
|
1426
1451
|
agent_session_id: normalizedAgentSessionId,
|
|
@@ -1444,11 +1469,13 @@ export class AIEngineClient {
|
|
|
1444
1469
|
created_by: createdBy,
|
|
1445
1470
|
parent_task_id: parentTaskId,
|
|
1446
1471
|
claim_id: normalizedClaimId,
|
|
1472
|
+
claim_project_id: normalizedClaimProjectId,
|
|
1447
1473
|
claimed_item_id: normalizedClaimedItemId,
|
|
1448
1474
|
workflow_run_id: normalizedWorkflowRunId,
|
|
1449
1475
|
agent_session_id: normalizedAgentSessionId,
|
|
1450
1476
|
allowed_mutation_surfaces: normalizedAllowedMutationSurfaces,
|
|
1451
1477
|
acknowledged_reminders: normalizedAcknowledgedReminders,
|
|
1478
|
+
execution_intent: normalizedExecutionIntent,
|
|
1452
1479
|
},
|
|
1453
1480
|
});
|
|
1454
1481
|
}
|