@bpmsoftwaresolutions/ai-engine-client 1.1.3 → 1.1.5
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 +70 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -280,8 +280,66 @@ 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
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
async startReviewGovernance({
|
|
317
|
+
intent,
|
|
318
|
+
objective,
|
|
319
|
+
readScope,
|
|
320
|
+
requiredToolKeys,
|
|
321
|
+
sessionKey,
|
|
322
|
+
workflowRunId,
|
|
323
|
+
workflowId,
|
|
324
|
+
workflowSlug,
|
|
325
|
+
turnPersisted,
|
|
326
|
+
...rest
|
|
327
|
+
} = {}) {
|
|
328
|
+
return this._request('/api/v1/session-governance/review/startup', {
|
|
329
|
+
method: 'POST',
|
|
330
|
+
body: {
|
|
331
|
+
...rest,
|
|
332
|
+
intent: intent ?? 'review code',
|
|
333
|
+
objective: objective ?? intent,
|
|
334
|
+
read_scope: readScope,
|
|
335
|
+
required_tool_keys: requiredToolKeys,
|
|
336
|
+
session_key: sessionKey,
|
|
337
|
+
workflow_run_id: workflowRunId,
|
|
338
|
+
workflow_id: workflowId,
|
|
339
|
+
workflow_slug: workflowSlug ?? 'code-review/read-only',
|
|
340
|
+
turn_persisted: turnPersisted,
|
|
341
|
+
},
|
|
342
|
+
});
|
|
285
343
|
}
|
|
286
344
|
|
|
287
345
|
async startWork(body = {}) {
|
|
@@ -292,6 +350,16 @@ export class AIEngineClient {
|
|
|
292
350
|
return this._request('/api/turns/complete', { method: 'POST', body });
|
|
293
351
|
}
|
|
294
352
|
|
|
353
|
+
async evaluateTurnCompliance(sessionId) {
|
|
354
|
+
return this._request(`/api/v1/session-governance/${encodeURIComponent(sessionId)}/compliance`);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
async blockIfNonCompliant(sessionId) {
|
|
358
|
+
return this._request(`/api/v1/session-governance/${encodeURIComponent(sessionId)}/block-if-non-compliant`, {
|
|
359
|
+
method: 'POST',
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
|
|
295
363
|
async runCharter(body = {}) {
|
|
296
364
|
return this._request('/api/charters/run', { method: 'POST', body });
|
|
297
365
|
}
|