@bpmsoftwaresolutions/ai-engine-client 1.1.9 → 1.1.11
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 +10 -0
- package/package.json +1 -1
- package/src/index.js +63 -0
package/README.md
CHANGED
|
@@ -392,6 +392,16 @@ These methods return markdown as `text` and expose projection headers as top-lev
|
|
|
392
392
|
|
|
393
393
|
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.
|
|
394
394
|
|
|
395
|
+
### Generated Scripts
|
|
396
|
+
| Method | Endpoint | Description |
|
|
397
|
+
|---|---|---|
|
|
398
|
+
| `generateScript(body)` / `client.scripts.generate(body)` | `POST /api/scripts/generate` | Create a governed diagnostic-only helper script bound to claim, session, or workflow context. |
|
|
399
|
+
| `renderScript(scriptId)` / `client.scripts.render(scriptId)` | `GET /api/scripts/:scriptId/render` | Read the rendered helper script, shell-safe usage guidance, and SQL provenance. |
|
|
400
|
+
| `submitScriptArtifact(scriptId, body)` / `client.scripts.submitArtifact(scriptId, body)` | `POST /api/scripts/:scriptId/artifacts` | Submit governed execution evidence and attach a workflow artifact for the generated script run. |
|
|
401
|
+
| `getScriptRunEvidence({ workflowRunId, scriptId })` / `client.scripts.getRunEvidence(...)` | `GET /api/scripts/run-evidence` | List SQL-backed generated script runs and their evidence for a workflow run or one script id. |
|
|
402
|
+
|
|
403
|
+
Generated scripts are ephemeral helpers, not source-of-truth. The server keeps SQL authority over the run ledger and defaults each script to `diagnostic_only`, `local_helper`, and file/stdin-safe usage instead of fragile long inline commands.
|
|
404
|
+
|
|
395
405
|
### Retrieval Wrapper
|
|
396
406
|
| Method | Description |
|
|
397
407
|
|---|---|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -115,6 +115,12 @@ export class AIEngineClient {
|
|
|
115
115
|
this.promoteUxGateRemediationImplementationCandidate(remediationId, payload),
|
|
116
116
|
getUxGateRemediationProjection: (remediationId) => this.getLogaUxGateRemediationProjection(remediationId),
|
|
117
117
|
};
|
|
118
|
+
this.scripts = {
|
|
119
|
+
generate: (payload) => this.generateScript(payload),
|
|
120
|
+
render: (scriptId) => this.renderScript(scriptId),
|
|
121
|
+
submitArtifact: (scriptId, payload) => this.submitScriptArtifact(scriptId, payload),
|
|
122
|
+
getRunEvidence: (query) => this.getScriptRunEvidence(query),
|
|
123
|
+
};
|
|
118
124
|
}
|
|
119
125
|
|
|
120
126
|
static fromEnv(options = {}) {
|
|
@@ -922,6 +928,59 @@ export class AIEngineClient {
|
|
|
922
928
|
return this._requestLogaProjection(`/api/operator/projections/ux-gate-remediations/${remediationId}`);
|
|
923
929
|
}
|
|
924
930
|
|
|
931
|
+
async generateScript({
|
|
932
|
+
claimId,
|
|
933
|
+
contextSessionId,
|
|
934
|
+
workflowRunId,
|
|
935
|
+
intent = {},
|
|
936
|
+
renderSpec = {},
|
|
937
|
+
createdBy,
|
|
938
|
+
} = {}) {
|
|
939
|
+
return this._request('/api/scripts/generate', {
|
|
940
|
+
method: 'POST',
|
|
941
|
+
body: {
|
|
942
|
+
claimId,
|
|
943
|
+
contextSessionId,
|
|
944
|
+
workflowRunId,
|
|
945
|
+
intent,
|
|
946
|
+
renderSpec,
|
|
947
|
+
createdBy,
|
|
948
|
+
},
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
async renderScript(scriptId) {
|
|
953
|
+
return this._request(`/api/scripts/${scriptId}/render`);
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
async submitScriptArtifact(scriptId, {
|
|
957
|
+
workflowRunId,
|
|
958
|
+
output = {},
|
|
959
|
+
observations = [],
|
|
960
|
+
validation = {},
|
|
961
|
+
recordedBy,
|
|
962
|
+
} = {}) {
|
|
963
|
+
return this._request(`/api/scripts/${scriptId}/artifacts`, {
|
|
964
|
+
method: 'POST',
|
|
965
|
+
body: {
|
|
966
|
+
workflowRunId,
|
|
967
|
+
output,
|
|
968
|
+
observations,
|
|
969
|
+
validation,
|
|
970
|
+
recordedBy,
|
|
971
|
+
},
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
async getScriptRunEvidence({ workflowRunId, scriptId } = {}) {
|
|
976
|
+
return this._request('/api/scripts/run-evidence', {
|
|
977
|
+
query: {
|
|
978
|
+
workflowRunId,
|
|
979
|
+
scriptId,
|
|
980
|
+
},
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
|
|
925
984
|
// ─── Roadmaps ──────────────────────────────────────────────────────────────
|
|
926
985
|
|
|
927
986
|
async listProjectRoadmaps({ includeInactive } = {}) {
|
|
@@ -1053,6 +1112,10 @@ export class AIEngineClient {
|
|
|
1053
1112
|
return this._request(`/api/governed-implementation/packets/${packetId}`);
|
|
1054
1113
|
}
|
|
1055
1114
|
|
|
1115
|
+
async getImplementationItemAcceptanceChecks(implementationItemId) {
|
|
1116
|
+
return this._request(`/api/governed-implementation/items/${implementationItemId}/acceptance-checks`);
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1056
1119
|
async updateImplementationItemStatus(implementationItemId, body) {
|
|
1057
1120
|
return this._request(`/api/governed-implementation/items/${implementationItemId}/status`, {
|
|
1058
1121
|
method: 'PATCH', body,
|