@bpmsoftwaresolutions/ai-engine-client 1.1.33 → 1.1.35
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 +38 -0
- package/package.json +1 -1
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -72,6 +72,11 @@ const persistedTurn = await client.persistAssistantTurn({
|
|
|
72
72
|
assistant_summary: 'Completed the implementation step and persisted the governed turn.',
|
|
73
73
|
changed_files: ['src/web/app.py'],
|
|
74
74
|
});
|
|
75
|
+
|
|
76
|
+
const telemetry = await client.getExecutionTelemetryCurrent();
|
|
77
|
+
const processRuns = await client.listExecutionProcessRuns({ limit: 25 });
|
|
78
|
+
const generatedUsability = await client.getGeneratedExecutionUsability();
|
|
79
|
+
const logaUsability = await client.getLogaGeneratedExecutionUsabilityProjection();
|
|
75
80
|
```
|
|
76
81
|
|
|
77
82
|
## Integration Notes
|
|
@@ -194,6 +199,39 @@ renderLogaMarkdown(projection.text, {
|
|
|
194
199
|
});
|
|
195
200
|
```
|
|
196
201
|
|
|
202
|
+
### Execution Telemetry Monitoring
|
|
203
|
+
|
|
204
|
+
Use the telemetry methods when you want downstream consumers to read the governed API instead of generated files.
|
|
205
|
+
|
|
206
|
+
```js
|
|
207
|
+
const current = await client.getExecutionTelemetryCurrent();
|
|
208
|
+
const runs = await client.listExecutionProcessRuns({ limit: 25, artifactKind: 'generated_script' });
|
|
209
|
+
const run = await client.getExecutionProcessRun('process-run-1');
|
|
210
|
+
const generated = await client.getGeneratedExecutionUsability();
|
|
211
|
+
const logaProjection = await client.getLogaGeneratedExecutionUsabilityProjection();
|
|
212
|
+
|
|
213
|
+
console.log(current.status, runs.process_run_count, run.process_run_id);
|
|
214
|
+
console.log(generated.projection_type, logaProjection.projectionType);
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
The telemetry and LOGA surfaces are read-only and SQL-backed:
|
|
218
|
+
|
|
219
|
+
- `getExecutionTelemetryCurrent()`
|
|
220
|
+
- `listExecutionProcessRuns({ limit, artifactKind, status, since })`
|
|
221
|
+
- `getExecutionProcessRun(processRunId)`
|
|
222
|
+
- `getGeneratedExecutionUsability()`
|
|
223
|
+
- `getLogaGeneratedExecutionUsabilityProjection()`
|
|
224
|
+
|
|
225
|
+
Example shell consumer:
|
|
226
|
+
|
|
227
|
+
- [`examples/monitoring/read-execution-telemetry.mjs`](/Users/sidney/source/repos/bpm/internal/ai-engine/examples/monitoring/read-execution-telemetry.mjs)
|
|
228
|
+
|
|
229
|
+
Run it with:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
AI_ENGINE_BASE_URL="..." AI_ENGINE_ACCESS_TOKEN="..." npm run example:monitoring
|
|
233
|
+
```
|
|
234
|
+
|
|
197
235
|
### fromEnv
|
|
198
236
|
|
|
199
237
|
```js
|
package/package.json
CHANGED
package/src/index.js
CHANGED