@bpmsoftwaresolutions/ai-engine-client 1.1.4 → 1.1.6
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 +5 -0
- package/package.json +1 -1
- package/src/index.js +69 -0
package/README.md
CHANGED
|
@@ -381,9 +381,14 @@ Low-level compatibility methods:
|
|
|
381
381
|
| `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
382
|
| `getLogaWorkflowRunProjection(workflowRunId)` | `GET /api/operator/projections/workflow-runs/:workflowRunId` | Governed workflow run runtime markdown document. |
|
|
383
383
|
| `getLogaEvidencePacketProjection(packetKey)` | `GET /api/operator/projections/evidence-packets/:packetKey` | Governed evidence packet runtime markdown document. |
|
|
384
|
+
| `submitUxGateRemediation(body)` / `client.loga.submitUxGateRemediation(body)` | `POST /api/loga/ux-gate-remediations` | Create a governed SQL-backed remediation ticket for a UX gate failure. |
|
|
385
|
+
| `listUxGateRemediations({ projectionType, status })` / `client.loga.listUxGateRemediations(...)` | `GET /api/loga/ux-gate-remediations` | List governed UX gate remediation tickets. |
|
|
386
|
+
| `getUxGateRemediation(remediationId)` / `client.loga.getUxGateRemediation(...)` | `GET /api/loga/ux-gate-remediations/:remediationId` | Read one governed UX gate remediation ticket. |
|
|
384
387
|
|
|
385
388
|
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
389
|
|
|
390
|
+
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.
|
|
391
|
+
|
|
387
392
|
### Retrieval Wrapper
|
|
388
393
|
| Method | Description |
|
|
389
394
|
|---|---|
|
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 = {}) {
|
|
@@ -313,6 +318,35 @@ export class AIEngineClient {
|
|
|
313
318
|
});
|
|
314
319
|
}
|
|
315
320
|
|
|
321
|
+
async startReviewGovernance({
|
|
322
|
+
intent,
|
|
323
|
+
objective,
|
|
324
|
+
readScope,
|
|
325
|
+
requiredToolKeys,
|
|
326
|
+
sessionKey,
|
|
327
|
+
workflowRunId,
|
|
328
|
+
workflowId,
|
|
329
|
+
workflowSlug,
|
|
330
|
+
turnPersisted,
|
|
331
|
+
...rest
|
|
332
|
+
} = {}) {
|
|
333
|
+
return this._request('/api/v1/session-governance/review/startup', {
|
|
334
|
+
method: 'POST',
|
|
335
|
+
body: {
|
|
336
|
+
...rest,
|
|
337
|
+
intent: intent ?? 'review code',
|
|
338
|
+
objective: objective ?? intent,
|
|
339
|
+
read_scope: readScope,
|
|
340
|
+
required_tool_keys: requiredToolKeys,
|
|
341
|
+
session_key: sessionKey,
|
|
342
|
+
workflow_run_id: workflowRunId,
|
|
343
|
+
workflow_id: workflowId,
|
|
344
|
+
workflow_slug: workflowSlug ?? 'code-review/read-only',
|
|
345
|
+
turn_persisted: turnPersisted,
|
|
346
|
+
},
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
|
|
316
350
|
async startWork(body = {}) {
|
|
317
351
|
return this._request('/api/work/start', { method: 'POST', body });
|
|
318
352
|
}
|
|
@@ -831,6 +865,41 @@ export class AIEngineClient {
|
|
|
831
865
|
return this._requestLogaProjection(`/api/operator/projections/evidence-packets/${packetKey}`);
|
|
832
866
|
}
|
|
833
867
|
|
|
868
|
+
async submitUxGateRemediation({
|
|
869
|
+
projectionType,
|
|
870
|
+
projectionId,
|
|
871
|
+
gateRunId,
|
|
872
|
+
findingIds,
|
|
873
|
+
remediationPayload,
|
|
874
|
+
sourceTruth = 'sql',
|
|
875
|
+
clientEvidence,
|
|
876
|
+
createdBy,
|
|
877
|
+
} = {}) {
|
|
878
|
+
return this._request('/api/loga/ux-gate-remediations', {
|
|
879
|
+
method: 'POST',
|
|
880
|
+
body: {
|
|
881
|
+
projectionType,
|
|
882
|
+
projectionId,
|
|
883
|
+
gateRunId,
|
|
884
|
+
findingIds,
|
|
885
|
+
remediationPayload,
|
|
886
|
+
sourceTruth,
|
|
887
|
+
clientEvidence,
|
|
888
|
+
createdBy,
|
|
889
|
+
},
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
async listUxGateRemediations({ projectionType, status } = {}) {
|
|
894
|
+
return this._request('/api/loga/ux-gate-remediations', {
|
|
895
|
+
query: { projectionType, status },
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
async getUxGateRemediation(remediationId) {
|
|
900
|
+
return this._request(`/api/loga/ux-gate-remediations/${remediationId}`);
|
|
901
|
+
}
|
|
902
|
+
|
|
834
903
|
// ─── Roadmaps ──────────────────────────────────────────────────────────────
|
|
835
904
|
|
|
836
905
|
async listProjectRoadmaps({ includeInactive } = {}) {
|