@bpmsoftwaresolutions/ai-engine-client 1.1.27 → 1.1.29

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +29 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmsoftwaresolutions/ai-engine-client",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "description": "Thin npm client for the AI Engine operator and retrieval APIs",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const DEFAULT_TIMEOUT_MS = 30000;
2
- export const AI_ENGINE_CLIENT_VERSION = '1.1.27';
2
+ export const AI_ENGINE_CLIENT_VERSION = '1.1.29';
3
3
  export const GOVERNED_MUTATION_REQUIRED_CAPABILITIES = [
4
4
  'executeVerifiedMutation',
5
5
  'post_mutation_verification',
@@ -11,6 +11,7 @@ export const GOVERNED_MUTATION_REQUIRED_CAPABILITIES = [
11
11
  export const AI_ENGINE_CLIENT_CAPABILITIES = [
12
12
  ...GOVERNED_MUTATION_REQUIRED_CAPABILITIES,
13
13
  'execution_eligibility_read',
14
+ 'project_delivery_facade',
14
15
  'workflow_resume_context_read',
15
16
  ];
16
17
 
@@ -1403,13 +1404,19 @@ export class AIEngineClient {
1403
1404
  createdBy,
1404
1405
  parentTaskId,
1405
1406
  claimId,
1407
+ claimProjectId,
1408
+ projectId,
1406
1409
  claimedItemId,
1407
1410
  workflowRunId,
1408
1411
  agentSessionId,
1409
1412
  allowedMutationSurfaces,
1410
1413
  acknowledgedReminders,
1414
+ executionIntent,
1415
+ executionType,
1416
+ executionPurpose,
1411
1417
  } = {}) {
1412
1418
  const normalizedClaimId = cleanText(claimId);
1419
+ const normalizedClaimProjectId = cleanText(claimProjectId) || cleanText(projectId);
1413
1420
  const normalizedClaimedItemId = cleanText(claimedItemId) || implementationItemId;
1414
1421
  const normalizedWorkflowRunId = cleanText(workflowRunId);
1415
1422
  const normalizedAgentSessionId = cleanText(agentSessionId);
@@ -1419,8 +1426,27 @@ export class AIEngineClient {
1419
1426
  const normalizedAcknowledgedReminders = Array.isArray(acknowledgedReminders)
1420
1427
  ? acknowledgedReminders
1421
1428
  : undefined;
1429
+ const normalizedExecutionIntent = (() => {
1430
+ if (executionIntent && typeof executionIntent === 'object') {
1431
+ const execution_type = cleanText(executionIntent.execution_type) || cleanText(executionIntent.executionType);
1432
+ const execution_purpose = cleanText(executionIntent.execution_purpose) || cleanText(executionIntent.executionPurpose);
1433
+ if (execution_type || execution_purpose) {
1434
+ return {
1435
+ ...(execution_type ? { execution_type } : {}),
1436
+ ...(execution_purpose ? { execution_purpose } : {}),
1437
+ };
1438
+ }
1439
+ }
1440
+ const normalizedExecutionType = cleanText(executionType) || 'implementation_task';
1441
+ const normalizedExecutionPurpose = cleanText(executionPurpose) || cleanText(title) || 'implementation task';
1442
+ return {
1443
+ execution_type: normalizedExecutionType,
1444
+ execution_purpose: normalizedExecutionPurpose,
1445
+ };
1446
+ })();
1422
1447
  await this._assertExecutionEligibility({
1423
1448
  claim_id: normalizedClaimId,
1449
+ claim_project_id: normalizedClaimProjectId,
1424
1450
  claimed_item_id: normalizedClaimedItemId,
1425
1451
  workflow_run_id: normalizedWorkflowRunId,
1426
1452
  agent_session_id: normalizedAgentSessionId,
@@ -1444,11 +1470,13 @@ export class AIEngineClient {
1444
1470
  created_by: createdBy,
1445
1471
  parent_task_id: parentTaskId,
1446
1472
  claim_id: normalizedClaimId,
1473
+ claim_project_id: normalizedClaimProjectId,
1447
1474
  claimed_item_id: normalizedClaimedItemId,
1448
1475
  workflow_run_id: normalizedWorkflowRunId,
1449
1476
  agent_session_id: normalizedAgentSessionId,
1450
1477
  allowed_mutation_surfaces: normalizedAllowedMutationSurfaces,
1451
1478
  acknowledged_reminders: normalizedAcknowledgedReminders,
1479
+ execution_intent: normalizedExecutionIntent,
1452
1480
  },
1453
1481
  });
1454
1482
  }