@bpmsoftwaresolutions/ai-engine-client 1.1.64 → 1.1.66
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 +4 -1
- package/package.json +1 -1
- package/src/index.js +27 -0
package/README.md
CHANGED
|
@@ -143,6 +143,8 @@ console.log(claimed.claim_id, claimed.context_session_id);
|
|
|
143
143
|
|
|
144
144
|
This complements the lower-level flow exposed by `openContextSession()`, `acknowledgeReminder()`, `completeOrientation()`, `lockContextSessionClaim()`, `claimWorkItem()`, and `signoffClaim()`.
|
|
145
145
|
|
|
146
|
+
For closure and write preflights, call `claimIsValid(claimId)` before you attempt roadmap mutations. The client does not yet expose a project-scoped `getActiveClaim(projectId)` helper because the backend currently only offers claim reads by claim id or by context session.
|
|
147
|
+
|
|
146
148
|
### Text and Binary Downloads
|
|
147
149
|
|
|
148
150
|
Some methods do not return plain JSON:
|
|
@@ -422,8 +424,8 @@ const packet = await client.downloadExternalWorkflowRunArtifact('run-123', 'pack
|
|
|
422
424
|
| `ping()` | Health check + current workflow name/status. |
|
|
423
425
|
| `startSessionGovernance(body)` | Start a governed external session and return the `session_key` required for mutation-capable assistant turns. |
|
|
424
426
|
| `claimWorkItem(body)` | Bind an oriented, claim-locked context session to a concrete work item and return the active claim envelope. |
|
|
427
|
+
| `claimIsValid(claimId)` | Read a claim by id and confirm that it is still active before attempting a governed write. |
|
|
425
428
|
| `persistAssistantTurn(body)` | Persist an assistant turn to durable SQL through the API and return refreshed status projections. |
|
|
426
|
-
| `resumeProjectWork({ projectIdentifier, actorMode, executionIntent, requireClaim, workflowRunLimit })` | Canonical project startup and hydration call that resolves the continuation brief, active item, required tools, allowed scope, and next governed action from a project identifier. |
|
|
427
429
|
| `createExternalAudioRender({ text, voice, model, speed, file })` | Create a client-scoped external audio render using inline text or multipart upload. |
|
|
428
430
|
| `getExternalAudioRender(audioRenderRunId)` | Read external audio render status for the authenticated client. |
|
|
429
431
|
| `downloadExternalAudioRender(audioRenderRunId)` | Download the rendered MP3 artifact for the authenticated client. |
|
|
@@ -593,6 +595,7 @@ Generated scripts are ephemeral helpers, not source-of-truth. The server keeps S
|
|
|
593
595
|
| `downloadProjectMarkdownReport(projectId, reportType)` | Download a rendered markdown report as text plus filename metadata. |
|
|
594
596
|
| `downloadProjectCharterReportMarkdown(projectId)` | Download the charter markdown report. |
|
|
595
597
|
| `getProjectBundle(projectId)` | Get current status, charter report, and roadmap report in one payload. |
|
|
598
|
+
| `resumeProjectWork({ projectIdentifier, actorMode, executionIntent, requireClaim, workflowRunLimit })` | Resume the governed continuation brief for a project. |
|
|
596
599
|
|
|
597
600
|
### Roadmaps
|
|
598
601
|
| Method | Description |
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -3558,6 +3558,11 @@ export class AIEngineClient {
|
|
|
3558
3558
|
return this._request(`/api/governance/claims/${encodeURIComponent(claimId)}`);
|
|
3559
3559
|
}
|
|
3560
3560
|
|
|
3561
|
+
async claimIsValid(claimId) {
|
|
3562
|
+
const claim = await this.getClaim(claimId);
|
|
3563
|
+
return cleanText(claim?.status) === 'active';
|
|
3564
|
+
}
|
|
3565
|
+
|
|
3561
3566
|
async getExecutionEligibility(body = {}) {
|
|
3562
3567
|
return this._request('/api/governance/execution-eligibility', {
|
|
3563
3568
|
method: 'POST',
|
|
@@ -4368,6 +4373,28 @@ export class AIEngineClient {
|
|
|
4368
4373
|
return this._request(`/api/operator/projects/${projectId}/bundle`);
|
|
4369
4374
|
}
|
|
4370
4375
|
|
|
4376
|
+
async resumeProjectWork({
|
|
4377
|
+
projectIdentifier,
|
|
4378
|
+
projectId,
|
|
4379
|
+
actorMode,
|
|
4380
|
+
executionIntent,
|
|
4381
|
+
requireClaim,
|
|
4382
|
+
workflowRunLimit,
|
|
4383
|
+
} = {}) {
|
|
4384
|
+
const normalizedProjectIdentifier = cleanText(projectIdentifier) || cleanText(projectId);
|
|
4385
|
+
if (!normalizedProjectIdentifier) {
|
|
4386
|
+
throw new Error('projectIdentifier is required.');
|
|
4387
|
+
}
|
|
4388
|
+
return this._request(`/api/operator/projects/${encodeURIComponent(normalizedProjectIdentifier)}/resume-context`, {
|
|
4389
|
+
query: {
|
|
4390
|
+
actor_mode: actorMode,
|
|
4391
|
+
execution_intent: executionIntent,
|
|
4392
|
+
require_claim: requireClaim,
|
|
4393
|
+
workflow_run_limit: workflowRunLimit,
|
|
4394
|
+
},
|
|
4395
|
+
});
|
|
4396
|
+
}
|
|
4397
|
+
|
|
4371
4398
|
// LOGA projections are governed runtime documents, not static reports.
|
|
4372
4399
|
|
|
4373
4400
|
async getLogaOperatorHomeProjection() {
|