@bpmsoftwaresolutions/ai-engine-client 1.1.63 → 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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmsoftwaresolutions/ai-engine-client",
3
- "version": "1.1.63",
3
+ "version": "1.1.66",
4
4
  "description": "Thin npm client for the AI Engine operator and retrieval APIs",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
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() {
@@ -5680,6 +5707,45 @@ export class AIEngineClient {
5680
5707
  });
5681
5708
  }
5682
5709
 
5710
+ async checkGitShipReadiness({
5711
+ claimId,
5712
+ actorId,
5713
+ targetBranch,
5714
+ shipCommand,
5715
+ packageName,
5716
+ declaredScopeFiles,
5717
+ stagedFiles,
5718
+ dirtyFiles,
5719
+ branch,
5720
+ headSha,
5721
+ packageJsonVersion,
5722
+ facadeMinClientVersion,
5723
+ packageRelease,
5724
+ packageJsonHash,
5725
+ sdkVersionHash,
5726
+ } = {}) {
5727
+ return this._request('/api/commit-governance/ship-readiness', {
5728
+ method: 'POST',
5729
+ body: {
5730
+ claim_id: claimId,
5731
+ actor_id: actorId,
5732
+ target_branch: targetBranch,
5733
+ ship_command: shipCommand,
5734
+ package_name: packageName,
5735
+ declared_scope_files: declaredScopeFiles,
5736
+ staged_files: stagedFiles,
5737
+ dirty_files: dirtyFiles,
5738
+ branch,
5739
+ head_sha: headSha,
5740
+ package_json_version: packageJsonVersion,
5741
+ facade_min_client_version: facadeMinClientVersion,
5742
+ package_release: packageRelease,
5743
+ package_json_hash: packageJsonHash,
5744
+ sdk_version_hash: sdkVersionHash,
5745
+ },
5746
+ });
5747
+ }
5748
+
5683
5749
  async getCommitGovernanceEvaluation(evaluationId) {
5684
5750
  return this._request(`/api/commit-governance/evaluations/${encodeURIComponent(evaluationId)}`);
5685
5751
  }