@bpmsoftwaresolutions/ai-engine-client 1.1.17 → 1.1.18

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 +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmsoftwaresolutions/ai-engine-client",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
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.17';
2
+ export const AI_ENGINE_CLIENT_VERSION = '1.1.18';
3
3
  export const GOVERNED_MUTATION_REQUIRED_CAPABILITIES = [
4
4
  'executeVerifiedMutation',
5
5
  'post_mutation_verification',
@@ -2100,8 +2100,14 @@ export class AIEngineClient {
2100
2100
  if (eligibility?.execution_eligible && eligibility?.mutation_allowed) {
2101
2101
  return eligibility;
2102
2102
  }
2103
+ const remediation = cleanText(eligibility?.remediation_command);
2104
+ const verification = cleanText(eligibility?.verification_command);
2103
2105
  throw buildEligibilityError(
2104
- `Execution eligibility gate blocked mutation${cleanText(body?.requested_mutation_surface) ? ` on ${cleanText(body.requested_mutation_surface)}` : ''}.`,
2106
+ [
2107
+ `Execution eligibility gate blocked mutation${cleanText(body?.requested_mutation_surface) ? ` on ${cleanText(body.requested_mutation_surface)}` : ''}.`,
2108
+ remediation ? `Fix: ${remediation}` : null,
2109
+ verification ? `Then verify: ${verification}` : null,
2110
+ ].filter(Boolean).join(' '),
2105
2111
  {
2106
2112
  required_gate: eligibility?.required_gate || 'execution_eligibility.required_gate',
2107
2113
  execution_eligibility: eligibility ?? null,