@bpmsoftwaresolutions/ai-engine-client 1.1.20 → 1.1.22
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/README.md +2 -0
- package/package.json +1 -1
- package/src/index.js +115 -1
package/README.md
CHANGED
|
@@ -386,6 +386,8 @@ Low-level compatibility methods:
|
|
|
386
386
|
| `submitUxGateRemediation(body)` / `client.loga.submitUxGateRemediation(body)` | `POST /api/loga/ux-gate-remediations` | Create a governed SQL-backed remediation ticket for a UX gate failure. |
|
|
387
387
|
| `listUxGateRemediations({ projectionType, status })` / `client.loga.listUxGateRemediations(...)` | `GET /api/loga/ux-gate-remediations` | List governed UX gate remediation tickets. |
|
|
388
388
|
| `getUxGateRemediation(remediationId)` / `client.loga.getUxGateRemediation(...)` | `GET /api/loga/ux-gate-remediations/:remediationId` | Read one governed UX gate remediation ticket. |
|
|
389
|
+
| `appendUxRemediationTicketNote(remediationId, body)` / `client.loga.appendUxRemediationTicketNote(...)` | `POST /api/loga/ux-gate-remediations/:remediationId/notes` | Append a governed downstream-facing remediation note to a UX gate remediation ticket. |
|
|
390
|
+
| `listUxRemediationTicketNotes(remediationId)` / `client.loga.listUxRemediationTicketNotes(...)` | `GET /api/loga/ux-gate-remediations/:remediationId/notes` | List governed remediation notes for a UX gate remediation ticket. |
|
|
389
391
|
| `promoteUxGateRemediationImplementationCandidate(remediationId, { promotedBy })` / `client.loga.promoteUxGateRemediationImplementationCandidate(...)` | `POST /api/loga/ux-gate-remediations/:remediationId/implementation-candidate` | Promote a governed UX remediation ticket into a durable implementation packet candidate. |
|
|
390
392
|
| `getLogaUxGateRemediationProjection(remediationId)` / `client.loga.getUxGateRemediationProjection(...)` | `GET /api/operator/projections/ux-gate-remediations/:remediationId` | Review a governed UX remediation ticket and its linked implementation candidate as a LOGA runtime document. |
|
|
391
393
|
|
package/package.json
CHANGED
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.
|
|
2
|
+
export const AI_ENGINE_CLIENT_VERSION = '1.1.20';
|
|
3
3
|
export const GOVERNED_MUTATION_REQUIRED_CAPABILITIES = [
|
|
4
4
|
'executeVerifiedMutation',
|
|
5
5
|
'post_mutation_verification',
|
|
@@ -165,6 +165,8 @@ export class AIEngineClient {
|
|
|
165
165
|
submitUxGateRemediation: (payload) => this.submitUxGateRemediation(payload),
|
|
166
166
|
listUxGateRemediations: (query) => this.listUxGateRemediations(query),
|
|
167
167
|
getUxGateRemediation: (remediationId) => this.getUxGateRemediation(remediationId),
|
|
168
|
+
appendUxRemediationTicketNote: (remediationId, payload) => this.appendUxRemediationTicketNote(remediationId, payload),
|
|
169
|
+
listUxRemediationTicketNotes: (remediationId) => this.listUxRemediationTicketNotes(remediationId),
|
|
168
170
|
promoteUxGateRemediationImplementationCandidate: (remediationId, payload) =>
|
|
169
171
|
this.promoteUxGateRemediationImplementationCandidate(remediationId, payload),
|
|
170
172
|
getUxGateRemediationProjection: (remediationId) => this.getLogaUxGateRemediationProjection(remediationId),
|
|
@@ -418,6 +420,37 @@ export class AIEngineClient {
|
|
|
418
420
|
return this._request('/api/work/start', { method: 'POST', body });
|
|
419
421
|
}
|
|
420
422
|
|
|
423
|
+
async startClaimedWork({
|
|
424
|
+
claimName,
|
|
425
|
+
actorId,
|
|
426
|
+
intentId,
|
|
427
|
+
declaredScopeFiles,
|
|
428
|
+
allowedMutationSurfaces,
|
|
429
|
+
runtimeSessionId,
|
|
430
|
+
executionPurpose,
|
|
431
|
+
successCriteria,
|
|
432
|
+
mutationAllowed,
|
|
433
|
+
metadata,
|
|
434
|
+
...rest
|
|
435
|
+
} = {}) {
|
|
436
|
+
return this._request('/api/governance/claims/start-claimed-work', {
|
|
437
|
+
method: 'POST',
|
|
438
|
+
body: {
|
|
439
|
+
...rest,
|
|
440
|
+
claim_name: claimName,
|
|
441
|
+
actor_id: actorId,
|
|
442
|
+
intent_id: intentId,
|
|
443
|
+
declared_scope_files: declaredScopeFiles,
|
|
444
|
+
allowed_mutation_surfaces: allowedMutationSurfaces,
|
|
445
|
+
runtime_session_id: runtimeSessionId,
|
|
446
|
+
execution_purpose: executionPurpose,
|
|
447
|
+
success_criteria: successCriteria,
|
|
448
|
+
mutation_allowed: mutationAllowed,
|
|
449
|
+
metadata,
|
|
450
|
+
},
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
|
|
421
454
|
async claimWorkItem(body = {}) {
|
|
422
455
|
return this._request('/api/governance/claims/claim-work-item', { method: 'POST', body });
|
|
423
456
|
}
|
|
@@ -441,6 +474,62 @@ export class AIEngineClient {
|
|
|
441
474
|
});
|
|
442
475
|
}
|
|
443
476
|
|
|
477
|
+
/**
|
|
478
|
+
* Promote a governance claim from `missing_promoted_surface` to
|
|
479
|
+
* `promoted_surface_bound` by binding required tool definitions to the
|
|
480
|
+
* workflow and recording a completed claim signoff.
|
|
481
|
+
*
|
|
482
|
+
* @param {object} params
|
|
483
|
+
* @param {string} params.claimId - UUID of the claim to unblock.
|
|
484
|
+
* @param {string} params.workflowId - UUID of the target workflow.
|
|
485
|
+
* @param {string} params.contextSessionId - Oriented context session UUID.
|
|
486
|
+
* @param {string} params.actorId - Caller identity for audit trail.
|
|
487
|
+
* @param {string[]} params.requiredToolKeys - Tool keys to bind.
|
|
488
|
+
* @param {string} [params.intentId] - Default: 'code_mutation'.
|
|
489
|
+
* @param {string} [params.bindingScope] - Default: 'required'.
|
|
490
|
+
* @param {string} [params.usageMode] - Default: 'manual'.
|
|
491
|
+
* @param {string} [params.operatorScope]
|
|
492
|
+
* @param {object} [params.allowedArgumentPolicy]
|
|
493
|
+
* @returns {Promise<object>} Promotion result envelope.
|
|
494
|
+
*/
|
|
495
|
+
async promoteClaimSurface({
|
|
496
|
+
claimId,
|
|
497
|
+
workflowId,
|
|
498
|
+
contextSessionId,
|
|
499
|
+
actorId,
|
|
500
|
+
requiredToolKeys,
|
|
501
|
+
intentId,
|
|
502
|
+
bindingScope,
|
|
503
|
+
usageMode,
|
|
504
|
+
operatorScope,
|
|
505
|
+
allowedArgumentPolicy,
|
|
506
|
+
...rest
|
|
507
|
+
} = {}) {
|
|
508
|
+
if (!claimId) throw new Error('claimId is required.');
|
|
509
|
+
if (!workflowId) throw new Error('workflowId is required.');
|
|
510
|
+
if (!contextSessionId) throw new Error('contextSessionId is required.');
|
|
511
|
+
if (!actorId) throw new Error('actorId is required.');
|
|
512
|
+
if (!Array.isArray(requiredToolKeys) || requiredToolKeys.length === 0) {
|
|
513
|
+
throw new Error('requiredToolKeys must be a non-empty array.');
|
|
514
|
+
}
|
|
515
|
+
return this._request('/api/governance/claims/promote-surface', {
|
|
516
|
+
method: 'POST',
|
|
517
|
+
body: {
|
|
518
|
+
...rest,
|
|
519
|
+
claim_id: claimId,
|
|
520
|
+
workflow_id: workflowId,
|
|
521
|
+
context_session_id: contextSessionId,
|
|
522
|
+
actor_id: actorId,
|
|
523
|
+
required_tool_keys: requiredToolKeys,
|
|
524
|
+
intent_id: intentId,
|
|
525
|
+
binding_scope: bindingScope,
|
|
526
|
+
usage_mode: usageMode,
|
|
527
|
+
operator_scope: operatorScope,
|
|
528
|
+
allowed_argument_policy: allowedArgumentPolicy,
|
|
529
|
+
},
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
|
|
444
533
|
async completeTurn(body = {}) {
|
|
445
534
|
return this._request('/api/turns/complete', { method: 'POST', body });
|
|
446
535
|
}
|
|
@@ -994,6 +1083,31 @@ export class AIEngineClient {
|
|
|
994
1083
|
return this._request(`/api/loga/ux-gate-remediations/${remediationId}`);
|
|
995
1084
|
}
|
|
996
1085
|
|
|
1086
|
+
async appendUxRemediationTicketNote(remediationId, {
|
|
1087
|
+
noteKind,
|
|
1088
|
+
body,
|
|
1089
|
+
visibility,
|
|
1090
|
+
authorActorId,
|
|
1091
|
+
evidenceRefs,
|
|
1092
|
+
metadata,
|
|
1093
|
+
} = {}) {
|
|
1094
|
+
return this._request(`/api/loga/ux-gate-remediations/${remediationId}/notes`, {
|
|
1095
|
+
method: 'POST',
|
|
1096
|
+
body: {
|
|
1097
|
+
noteKind,
|
|
1098
|
+
body,
|
|
1099
|
+
visibility,
|
|
1100
|
+
authorActorId,
|
|
1101
|
+
evidenceRefs,
|
|
1102
|
+
metadata,
|
|
1103
|
+
},
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
async listUxRemediationTicketNotes(remediationId) {
|
|
1108
|
+
return this._request(`/api/loga/ux-gate-remediations/${remediationId}/notes`);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
997
1111
|
async promoteUxGateRemediationImplementationCandidate(remediationId, { promotedBy } = {}) {
|
|
998
1112
|
return this._request(`/api/loga/ux-gate-remediations/${remediationId}/implementation-candidate`, {
|
|
999
1113
|
method: 'POST',
|