@bpmsoftwaresolutions/ai-engine-client 1.1.5 → 1.1.7
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 +6 -0
- package/package.json +1 -1
- package/src/index.js +44 -0
package/README.md
CHANGED
|
@@ -335,6 +335,7 @@ const packet = await client.downloadExternalWorkflowRunArtifact('run-123', 'pack
|
|
|
335
335
|
|---|---|
|
|
336
336
|
| `ping()` | Health check + current workflow name/status. |
|
|
337
337
|
| `startSessionGovernance(body)` | Start a governed external session and return the `session_key` required for mutation-capable assistant turns. |
|
|
338
|
+
| `claimWorkItem(body)` | Bind an oriented, claim-locked context session to a concrete work item and return the active claim envelope. |
|
|
338
339
|
| `persistAssistantTurn(body)` | Persist an assistant turn to durable SQL through the API and return refreshed status projections. |
|
|
339
340
|
| `createExternalAudioRender({ text, voice, model, speed, file })` | Create a client-scoped external audio render using inline text or multipart upload. |
|
|
340
341
|
| `getExternalAudioRender(audioRenderRunId)` | Read external audio render status for the authenticated client. |
|
|
@@ -381,9 +382,14 @@ Low-level compatibility methods:
|
|
|
381
382
|
| `getLogaRoadmapItemProjection(projectId, itemKey)` | `GET /api/operator/projections/projects/:projectId/roadmap/items/:itemKey` | Governed roadmap item runtime markdown document with item-level navigation, related documents, actions, and evidence. |
|
|
382
383
|
| `getLogaWorkflowRunProjection(workflowRunId)` | `GET /api/operator/projections/workflow-runs/:workflowRunId` | Governed workflow run runtime markdown document. |
|
|
383
384
|
| `getLogaEvidencePacketProjection(packetKey)` | `GET /api/operator/projections/evidence-packets/:packetKey` | Governed evidence packet runtime markdown document. |
|
|
385
|
+
| `submitUxGateRemediation(body)` / `client.loga.submitUxGateRemediation(body)` | `POST /api/loga/ux-gate-remediations` | Create a governed SQL-backed remediation ticket for a UX gate failure. |
|
|
386
|
+
| `listUxGateRemediations({ projectionType, status })` / `client.loga.listUxGateRemediations(...)` | `GET /api/loga/ux-gate-remediations` | List governed UX gate remediation tickets. |
|
|
387
|
+
| `getUxGateRemediation(remediationId)` / `client.loga.getUxGateRemediation(...)` | `GET /api/loga/ux-gate-remediations/:remediationId` | Read one governed UX gate remediation ticket. |
|
|
384
388
|
|
|
385
389
|
These methods return markdown as `text` and expose projection headers as top-level fields plus `provenance`. LOGA should render the markdown emitted by AI Engine and use these metadata fields for contract validation, refresh behavior, evidence display, and action choreography.
|
|
386
390
|
|
|
391
|
+
UX gate remediation is not a generic note or implementation-item evidence path. LOGA clients should use `submitUxGateRemediation()` when a projection fails a UX gate and should include `sourceTruth: 'sql'`, the projection identity, affected finding ids, and client evidence about the failing gate.
|
|
392
|
+
|
|
387
393
|
### Retrieval Wrapper
|
|
388
394
|
| Method | Description |
|
|
389
395
|
|---|---|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -107,6 +107,11 @@ export class AIEngineClient {
|
|
|
107
107
|
if (typeof this.fetchImpl !== 'function') {
|
|
108
108
|
throw new Error('A fetch implementation is required. Use Node 18+ or supply fetchImpl.');
|
|
109
109
|
}
|
|
110
|
+
this.loga = {
|
|
111
|
+
submitUxGateRemediation: (payload) => this.submitUxGateRemediation(payload),
|
|
112
|
+
listUxGateRemediations: (query) => this.listUxGateRemediations(query),
|
|
113
|
+
getUxGateRemediation: (remediationId) => this.getUxGateRemediation(remediationId),
|
|
114
|
+
};
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
static fromEnv(options = {}) {
|
|
@@ -346,6 +351,10 @@ export class AIEngineClient {
|
|
|
346
351
|
return this._request('/api/work/start', { method: 'POST', body });
|
|
347
352
|
}
|
|
348
353
|
|
|
354
|
+
async claimWorkItem(body = {}) {
|
|
355
|
+
return this._request('/api/governance/claims/claim-work-item', { method: 'POST', body });
|
|
356
|
+
}
|
|
357
|
+
|
|
349
358
|
async completeTurn(body = {}) {
|
|
350
359
|
return this._request('/api/turns/complete', { method: 'POST', body });
|
|
351
360
|
}
|
|
@@ -860,6 +869,41 @@ export class AIEngineClient {
|
|
|
860
869
|
return this._requestLogaProjection(`/api/operator/projections/evidence-packets/${packetKey}`);
|
|
861
870
|
}
|
|
862
871
|
|
|
872
|
+
async submitUxGateRemediation({
|
|
873
|
+
projectionType,
|
|
874
|
+
projectionId,
|
|
875
|
+
gateRunId,
|
|
876
|
+
findingIds,
|
|
877
|
+
remediationPayload,
|
|
878
|
+
sourceTruth = 'sql',
|
|
879
|
+
clientEvidence,
|
|
880
|
+
createdBy,
|
|
881
|
+
} = {}) {
|
|
882
|
+
return this._request('/api/loga/ux-gate-remediations', {
|
|
883
|
+
method: 'POST',
|
|
884
|
+
body: {
|
|
885
|
+
projectionType,
|
|
886
|
+
projectionId,
|
|
887
|
+
gateRunId,
|
|
888
|
+
findingIds,
|
|
889
|
+
remediationPayload,
|
|
890
|
+
sourceTruth,
|
|
891
|
+
clientEvidence,
|
|
892
|
+
createdBy,
|
|
893
|
+
},
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
async listUxGateRemediations({ projectionType, status } = {}) {
|
|
898
|
+
return this._request('/api/loga/ux-gate-remediations', {
|
|
899
|
+
query: { projectionType, status },
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
async getUxGateRemediation(remediationId) {
|
|
904
|
+
return this._request(`/api/loga/ux-gate-remediations/${remediationId}`);
|
|
905
|
+
}
|
|
906
|
+
|
|
863
907
|
// ─── Roadmaps ──────────────────────────────────────────────────────────────
|
|
864
908
|
|
|
865
909
|
async listProjectRoadmaps({ includeInactive } = {}) {
|