@bpmsoftwaresolutions/ai-engine-client 1.1.24 → 1.1.25

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 +33 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmsoftwaresolutions/ai-engine-client",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
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.24';
2
+ export const AI_ENGINE_CLIENT_VERSION = '1.1.25';
3
3
  export const GOVERNED_MUTATION_REQUIRED_CAPABILITIES = [
4
4
  'executeVerifiedMutation',
5
5
  'post_mutation_verification',
@@ -1361,7 +1361,33 @@ export class AIEngineClient {
1361
1361
  notes,
1362
1362
  createdBy,
1363
1363
  parentTaskId,
1364
+ claimId,
1365
+ claimedItemId,
1366
+ workflowRunId,
1367
+ agentSessionId,
1368
+ allowedMutationSurfaces,
1369
+ acknowledgedReminders,
1364
1370
  } = {}) {
1371
+ const normalizedClaimId = cleanText(claimId);
1372
+ const normalizedClaimedItemId = cleanText(claimedItemId) || implementationItemId;
1373
+ const normalizedWorkflowRunId = cleanText(workflowRunId);
1374
+ const normalizedAgentSessionId = cleanText(agentSessionId);
1375
+ const normalizedAllowedMutationSurfaces = Array.isArray(allowedMutationSurfaces) && allowedMutationSurfaces.length > 0
1376
+ ? allowedMutationSurfaces
1377
+ : ['project_roadmap_task'];
1378
+ const normalizedAcknowledgedReminders = Array.isArray(acknowledgedReminders)
1379
+ ? acknowledgedReminders
1380
+ : undefined;
1381
+ await this._assertExecutionEligibility({
1382
+ claim_id: normalizedClaimId,
1383
+ claimed_item_id: normalizedClaimedItemId,
1384
+ workflow_run_id: normalizedWorkflowRunId,
1385
+ agent_session_id: normalizedAgentSessionId,
1386
+ allowed_mutation_surfaces: normalizedAllowedMutationSurfaces,
1387
+ acknowledged_reminders: normalizedAcknowledgedReminders || [],
1388
+ requested_mutation_surface: 'project_roadmap_task',
1389
+ verification_required: true,
1390
+ });
1365
1391
  return this._request(`/api/operator/implementation-items/${implementationItemId}/tasks`, {
1366
1392
  method: 'POST',
1367
1393
  body: {
@@ -1376,6 +1402,12 @@ export class AIEngineClient {
1376
1402
  notes,
1377
1403
  created_by: createdBy,
1378
1404
  parent_task_id: parentTaskId,
1405
+ claim_id: normalizedClaimId,
1406
+ claimed_item_id: normalizedClaimedItemId,
1407
+ workflow_run_id: normalizedWorkflowRunId,
1408
+ agent_session_id: normalizedAgentSessionId,
1409
+ allowed_mutation_surfaces: normalizedAllowedMutationSurfaces,
1410
+ acknowledged_reminders: normalizedAcknowledgedReminders,
1379
1411
  },
1380
1412
  });
1381
1413
  }