@bpmsoftwaresolutions/ai-engine-client 1.1.18 → 1.1.20

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
@@ -378,6 +378,7 @@ Low-level compatibility methods:
378
378
  |---|---|---|
379
379
  | `getLogaOperatorHomeProjection()` | `GET /api/operator/projections/home` | Governed operator home runtime markdown document. |
380
380
  | `getLogaProjectCatalogProjection()` | `GET /api/operator/projections/project-catalog` | Governed project catalog runtime markdown document. |
381
+ | `getLogaProjectPortfolioProjection()` | `GET /api/operator/projections/project-portfolio` | Governed portfolio rollup runtime markdown document with SQL-backed completion metrics and project buckets. |
381
382
  | `getLogaProjectRoadmapProjection(projectId)` | `GET /api/operator/projections/projects/:projectId/roadmap.md` | Governed project roadmap runtime markdown document. |
382
383
  | `getLogaRoadmapItemProjection(projectId, itemKey)` | `GET /api/operator/projections/projects/:projectId/roadmap/items/:itemKey` | Governed roadmap item runtime markdown document with item-level navigation, related documents, actions, and evidence. |
383
384
  | `getLogaWorkflowRunProjection(workflowRunId)` | `GET /api/operator/projections/workflow-runs/:workflowRunId` | Governed workflow run runtime markdown document. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmsoftwaresolutions/ai-engine-client",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
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
@@ -1,5 +1,5 @@
1
1
  const DEFAULT_TIMEOUT_MS = 30000;
2
- export const AI_ENGINE_CLIENT_VERSION = '1.1.18';
2
+ export const AI_ENGINE_CLIENT_VERSION = '1.1.19';
3
3
  export const GOVERNED_MUTATION_REQUIRED_CAPABILITIES = [
4
4
  'executeVerifiedMutation',
5
5
  'post_mutation_verification',
@@ -939,6 +939,10 @@ export class AIEngineClient {
939
939
  return this._requestLogaProjection('/api/operator/projections/project-catalog');
940
940
  }
941
941
 
942
+ async getLogaProjectPortfolioProjection() {
943
+ return this._requestLogaProjection('/api/operator/projections/project-portfolio');
944
+ }
945
+
942
946
  async getLogaProjectRoadmapProjection(projectId) {
943
947
  return this._requestLogaProjection(`/api/operator/projections/projects/${projectId}/roadmap.md`);
944
948
  }
@@ -2135,6 +2139,14 @@ export class AIEngineClient {
2135
2139
  throw error;
2136
2140
  }
2137
2141
  return payload;
2142
+ } catch (error) {
2143
+ if (error?.name === 'AbortError') {
2144
+ const timeoutError = new Error(`Request to ${url.pathname} timed out after ${this.timeoutMs}ms.`);
2145
+ timeoutError.code = 'REQUEST_TIMEOUT';
2146
+ timeoutError.status = 0;
2147
+ throw timeoutError;
2148
+ }
2149
+ throw error;
2138
2150
  } finally {
2139
2151
  clearTimeout(timeoutHandle);
2140
2152
  }
@@ -2173,6 +2185,14 @@ export class AIEngineClient {
2173
2185
  fileName: parseContentDispositionFilename(contentDisposition),
2174
2186
  headers: Object.fromEntries(response.headers.entries()),
2175
2187
  };
2188
+ } catch (error) {
2189
+ if (error?.name === 'AbortError') {
2190
+ const timeoutError = new Error(`Request to ${url.pathname} timed out after ${this.timeoutMs}ms.`);
2191
+ timeoutError.code = 'REQUEST_TIMEOUT';
2192
+ timeoutError.status = 0;
2193
+ throw timeoutError;
2194
+ }
2195
+ throw error;
2176
2196
  } finally {
2177
2197
  clearTimeout(timeoutHandle);
2178
2198
  }
@@ -2219,6 +2239,14 @@ export class AIEngineClient {
2219
2239
  contentType,
2220
2240
  fileName: parseContentDispositionFilename(contentDisposition),
2221
2241
  };
2242
+ } catch (error) {
2243
+ if (error?.name === 'AbortError') {
2244
+ const timeoutError = new Error(`Request to ${url.pathname} timed out after ${this.timeoutMs}ms.`);
2245
+ timeoutError.code = 'REQUEST_TIMEOUT';
2246
+ timeoutError.status = 0;
2247
+ throw timeoutError;
2248
+ }
2249
+ throw error;
2222
2250
  } finally {
2223
2251
  clearTimeout(timeoutHandle);
2224
2252
  }