@bpmsoftwaresolutions/ai-engine-client 1.1.2 → 1.1.4
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/package.json +1 -1
- package/src/index.js +45 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -280,8 +280,37 @@ export class AIEngineClient {
|
|
|
280
280
|
return this._request('/api/dashboard');
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
async startSessionGovernance(
|
|
284
|
-
|
|
283
|
+
async startSessionGovernance({
|
|
284
|
+
intent,
|
|
285
|
+
objective,
|
|
286
|
+
allowedScopes,
|
|
287
|
+
allowedMutationSurfaces,
|
|
288
|
+
requiredToolKeys,
|
|
289
|
+
sessionKey,
|
|
290
|
+
workflowRunId,
|
|
291
|
+
workflowId,
|
|
292
|
+
workflowSlug,
|
|
293
|
+
governedScope,
|
|
294
|
+
successCriteria,
|
|
295
|
+
disallowedSurfaces,
|
|
296
|
+
...rest
|
|
297
|
+
} = {}) {
|
|
298
|
+
return this._request('/api/v1/session-governance/startup', {
|
|
299
|
+
method: 'POST',
|
|
300
|
+
body: {
|
|
301
|
+
...rest,
|
|
302
|
+
objective: objective ?? intent,
|
|
303
|
+
allowed_mutation_surfaces: allowedMutationSurfaces ?? allowedScopes,
|
|
304
|
+
required_tool_keys: requiredToolKeys,
|
|
305
|
+
session_key: sessionKey,
|
|
306
|
+
workflow_run_id: workflowRunId,
|
|
307
|
+
workflow_id: workflowId,
|
|
308
|
+
workflow_slug: workflowSlug,
|
|
309
|
+
governed_scope: governedScope,
|
|
310
|
+
success_criteria: successCriteria,
|
|
311
|
+
disallowed_surfaces: disallowedSurfaces,
|
|
312
|
+
},
|
|
313
|
+
});
|
|
285
314
|
}
|
|
286
315
|
|
|
287
316
|
async startWork(body = {}) {
|
|
@@ -292,6 +321,20 @@ export class AIEngineClient {
|
|
|
292
321
|
return this._request('/api/turns/complete', { method: 'POST', body });
|
|
293
322
|
}
|
|
294
323
|
|
|
324
|
+
async evaluateTurnCompliance(sessionId) {
|
|
325
|
+
return this._request(`/api/v1/session-governance/${encodeURIComponent(sessionId)}/compliance`);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
async blockIfNonCompliant(sessionId) {
|
|
329
|
+
return this._request(`/api/v1/session-governance/${encodeURIComponent(sessionId)}/block-if-non-compliant`, {
|
|
330
|
+
method: 'POST',
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
async runCharter(body = {}) {
|
|
335
|
+
return this._request('/api/charters/run', { method: 'POST', body });
|
|
336
|
+
}
|
|
337
|
+
|
|
295
338
|
async persistAssistantTurn(body) {
|
|
296
339
|
return this._request('/api/v1/assistant-turns', { method: 'POST', body });
|
|
297
340
|
}
|