@bpmsoftwaresolutions/ai-engine-client 1.1.101 → 1.1.103

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
@@ -1,6 +1,6 @@
1
1
  # @bpmsoftwaresolutions/ai-engine-client
2
2
 
3
- Full-surface npm client for the AI Engine. Covers every operator, workflow, project, retrieval, performance, and governance endpoint exposed by the deployed service.
3
+ Full-surface npm client for the AI Engine. The SDK is now workflow-oriented and composed from focused domain modules, shared transport, and compatibility aliases.
4
4
 
5
5
  No repo clone required. Install the package, point it at the Azure service, and call any method.
6
6
 
@@ -79,15 +79,130 @@ const generatedUsability = await client.getGeneratedExecutionUsability();
79
79
  const logaUsability = await client.getLogaGeneratedExecutionUsabilityProjection();
80
80
  ```
81
81
 
82
+ ## Architecture Overview
83
+
84
+ The composed SDK follows this flow:
85
+
86
+ `AIEngineClient` → composed namespaces → focused domain modules → shared transport → compatibility aliases → governed request-contract testing
87
+
88
+ | File | Role |
89
+ |---|---|
90
+ | `index.js` | Public barrel only. Re-exports the client, version, and constants. |
91
+ | `client.js` | Constructor, composition root, transport bridge, namespace attachment, and thin compatibility wiring. |
92
+ | `domains/*` | Canonical implementation ownership for endpoint bodies and workflow helpers. |
93
+ | `compat/*` | Compatibility alias and facade preservation. |
94
+ | `transport/*` | Shared request execution, auth header handling, and response shaping. |
95
+ | `utils/*` | Shared normalization, parsing, and helper utilities used across domains. |
96
+ | `test/request-contract-fixtures.*` | Request-contract parity fixtures that guard the public surface. |
97
+
98
+ ### Domain Topology
99
+
100
+ | Namespace | Responsibility |
101
+ |---|---|
102
+ | `projects` | Project lifecycle, bundle surfaces, closure readiness, and completion views |
103
+ | `projectChartering` | Project charter creation and roadmap bootstrap helpers |
104
+ | `roadmaps` | Roadmap state, active item lookup, and task-surface visibility |
105
+ | `implementationPackets` | Implementation packet operations and workflow binding |
106
+ | `implementationItems` | Item status, activity, and verified mutation surfaces |
107
+ | `implementationChecks` | Acceptance-check retrieval and status updates |
108
+ | `implementationArtifacts` | Artifact manifest, decision packets, and verification |
109
+ | `implementationEvidence` | Evidence attachment and proof collection |
110
+ | `implementationGates` | Gate decisions for implementation packet review |
111
+ | `agentComms` | Governed multi-agent communication and transfer primitives |
112
+ | `collaboration` | Collaboration proposals, blockers, ownership, and heartbeats |
113
+ | `executionTelemetry` | Execution telemetry, process runs, and monitoring views |
114
+ | `projections` | LOGA/runtime markdown projections and navigation surfaces |
115
+ | `retrieval` | Symbol and code retrieval helpers |
116
+ | `workflows` | Workflow definitions and workflow-run surfaces |
117
+ | `workflowComposition` | Legacy modernization composition helpers and compatibility surface |
118
+ | `database` | Query, backups, and schema inspection helpers |
119
+ | `skills` | Skill contracts and skill governance |
120
+ | `toolRegistry` | Tool registry lookup and tool-governance surfaces |
121
+ | `capabilities` | Capability discovery and smoke-test surfaces |
122
+ | `performance` | Session performance and benchmark summaries |
123
+ | `designIntelligence` | Design decision, critique, promotion, and recommendation surfaces |
124
+ | `notesLab` | Note submission and review workflow |
125
+ | `searchContacts` | Organization and contact lookup |
126
+ | `benchmarks` | Benchmark run history and trend lookup |
127
+
128
+ ## Workflow-Oriented SDK Model
129
+
130
+ The SDK is workflow-oriented, not a pile of 370+ isolated methods. Domain namespaces compose into executable workflows, and those workflows map to governed AI Engine operations.
131
+
132
+ Common workflow families include:
133
+
134
+ - Agent Session Startup
135
+ - Project Chartering
136
+ - Governed Work / Claims
137
+ - Roadmap Item Execution
138
+ - Commit Governance
139
+ - Agent Communication
140
+ - Work Transfer & Handoff
141
+ - Workflow Governance
142
+ - Code Analysis & Refactoring
143
+ - Retrieval-Augmented Prompt Assembly
144
+ - Warehouse Modernization Pipeline
145
+
146
+ For full workflow chains, see `docs/sdk-workflow-taxonomy.md`.
147
+
148
+ Namespace paths are canonical. Top-level methods remain supported compatibility aliases.
149
+
150
+ ### Workflow Example
151
+
152
+ ```js
153
+ const client = AIEngineClient.fromEnv();
154
+
155
+ const startup = await client.projectResume.resumeProjectWork({
156
+ projectIdentifier: 'my-project',
157
+ actorMode: 'agent',
158
+ executionIntent: 'continue roadmap delivery',
159
+ });
160
+
161
+ const activeItem = await client.roadmaps.getProjectRoadmapActiveItem(
162
+ startup.project.project_id,
163
+ );
164
+
165
+ const checks = await client.implementationChecks.getImplementationItemAcceptanceChecks(
166
+ activeItem.implementation_item_id,
167
+ );
168
+ ```
169
+
170
+ ## Workflow and Governance Posture
171
+
172
+ The SDK is not just CRUD transport. It wraps workflow orchestration, governed execution, claims, session governance, multi-agent coordination, LOGA projections, and evidence-backed workflow delivery.
173
+
174
+ Execution substrate primitives such as `startWork()`, `completeTurn()`, and `runCharter()` exist to move work through governed stages instead of leaving the caller to assemble those chains manually.
175
+
176
+ ## Repo-less Retrieval Posture
177
+
178
+ The retrieval and code-intelligence namespaces are designed for bounded retrieval, symbol lookup, intent discovery, repo-less operation, and governed code-context assembly.
179
+
180
+ That means the SDK can be used against deployed service state without requiring a local repo clone, while still preserving provenance and the workflow boundaries that make the result safe to execute.
181
+
182
+ ## Multi-Agent Coordination
183
+
184
+ Transfer packets, communication channels, receipts, message watches, presence, handoffs, and collaboration proposals are exposed as governed coordination primitives.
185
+
186
+ The SDK intentionally models these flows as structured workflows rather than free-form chat so that every cross-agent exchange remains auditable and tied to a bounded work surface.
187
+
82
188
  ## Namespaces
83
189
 
84
- The client keeps the top-level compatibility methods, but the extracted domain namespaces are the preferred way to navigate the SDK:
190
+ The extracted domain namespaces are the preferred way to navigate the SDK. Top-level compatibility methods remain available for backward compatibility.
85
191
 
86
192
  - `client.portfolio` for portfolio status and closure-readiness views
87
193
  - `client.workflowComposition` for modernization and workflow-composition helpers
88
194
  - `client.warehouse` as a legacy compatibility alias for the workflow-composition helpers
89
195
  - `client.projects`, `client.roadmaps`, `client.projectChartering`, and other domain namespaces for the thinner wrapper surfaces
90
196
 
197
+ Preferred usage is namespace-first:
198
+
199
+ ```js
200
+ await client.projects.getProjectBundle(projectId);
201
+ await client.roadmaps.getProjectRoadmap(projectId);
202
+ await client.executionTelemetry.getExecutionTelemetryCurrent();
203
+ await client.agentComms.openTransferChannel({ projectIdentifier: projectId });
204
+ ```
205
+
91
206
  The legacy top-level methods still work, so existing callers can move gradually:
92
207
 
93
208
  ```js
@@ -284,6 +399,8 @@ Header behavior is:
284
399
  - If bearer auth is not configured and `clientId` is provided, the client also sends `X-Client-Id`.
285
400
  - The client always sends `X-Actor-Id` for audit trails unless overridden.
286
401
 
402
+ `tokenProvider` is the preferred boundary for short-lived bearer credentials, with API-key compatibility mode preserved for deployments that still rely on shared keys. The service is expected to migrate toward bearer-oriented OIDC/OAuth flows, but the client preserves the legacy auth shape so existing deployments keep working.
403
+
287
404
  That means this package wraps both operator/governed routes and selected external `/api/v1/*` routes. Pick the auth mode that matches the route family exposed by your deployment.
288
405
 
289
406
  ### Route Families
@@ -353,6 +470,12 @@ await fs.promises.writeFile('render.mp3', Buffer.from(audio.arrayBuffer));
353
470
 
354
471
  LOGA should use the `getLoga*Projection()` methods for runtime documents. These endpoints are governed AI Engine transformations: durable SQL state is normalized into typed projection models, transformed into versioned structured markdown, and served with provenance, refresh, and action metadata for LOGA to render.
355
472
 
473
+ The flow is:
474
+
475
+ `SQL truth` → `projection generation` → `structured markdown` → `LOGA runtime rendering`
476
+
477
+ Markdown is projection, not authority. Provenance metadata is preserved so renderers can validate origin, version, and refresh behavior before displaying the result. These projections are versioned runtime documents, not free-form documentation files.
478
+
356
479
  The client exposes the transport metadata from response headers so LOGA can validate the contract before rendering:
357
480
 
358
481
  - `logaContract`: currently `ai-engine-ui/v1`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmsoftwaresolutions/ai-engine-client",
3
- "version": "1.1.101",
3
+ "version": "1.1.103",
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/client.js CHANGED
@@ -146,6 +146,7 @@ export class AIEngineClient {
146
146
  this.reports = createReportsDomain(this);
147
147
  this.projections = createProjectionsDomain(this);
148
148
  this.workflowComposition = createWorkflowCompositionDomain(this);
149
+ this.workflowComposition.searchCodeByIntent = (request) => this.searchCodeByIntent(request);
149
150
  this.warehouse = createWarehouseDomain(this);
150
151
  this.actions = createActionsDomain(this);
151
152
  this.transferBundles = createTransferBundlesDomain(this);
@@ -162,6 +163,7 @@ export class AIEngineClient {
162
163
  this.collaborationDomain = createCollaborationDomain(this);
163
164
  this.agentComms = createAgentCommunicationsFacade(this);
164
165
  this.collaboration = createCollaborationFacade(this);
166
+ this.collaboration.postCollaborationProposal = (request) => this.postCollaborationProposal(request);
165
167
  }
166
168
 
167
169
  static fromEnv(options = {}) {
@@ -5,6 +5,7 @@ export const COMPATIBILITY_ALIAS_GROUPS = [
5
5
  'ping',
6
6
  'query',
7
7
  'getPortfolioClosureReadiness',
8
+ 'searchCodeByIntent',
8
9
  'registerModernizationAsset',
9
10
  'classifyModernizationAsset',
10
11
  'discoverSalvageCandidates',
@@ -187,7 +188,7 @@ export function installClientCompatibilityDelegates(ClientClass) {
187
188
  defineCompatibilityMethods(proto, 'presence', ['getPresenceBoard', 'getChannelPresence', 'markParticipantOnline', 'markParticipantOffline', 'whoIsOnline', 'findOnlineParticipant', 'sendToParticipant', 'sendToRole', 'postPresenceHeartbeat']);
188
189
  defineCompatibilityMethods(proto, 'collaborationDomain', ['reviewCollaborationProposal', 'reviseCollaborationProposal', 'postCollaborationProposal', 'acceptCollaborationProposal', 'assignCollaborationOwnership', 'raiseCollaborationBlocker', 'resolveCollaborationBlocker', 'postCollaborationHeartbeat', 'beginCollaborationImplementation', 'requestCollaborationClosure']);
189
190
  defineCompatibilityMethods(proto, 'transferBundles', ['transferWorkPacket', 'getTransferBundle', 'listTransferBundles', 'createTransferReceipt', 'listTransferReceipts', 'createCommunicationBundle', 'getCommunicationBundle', 'listCommunicationBundles', 'addCommunicationBundleItem', 'uploadCommunicationBundle', 'attachCommunicationBundleToMessage', 'recordCommunicationBundleReceipt', 'recordCommunicationBundleCleanupEvent', 'claimCommunicationBundle', 'recordCommunicationTransferReceipt']);
190
- defineCompatibilityMethods(proto, 'workflowComposition', ['registerModernizationAsset', 'classifyModernizationAsset', 'discoverSalvageCandidates', 'createModernizationWorkPacket', 'requestModernizationWrapperExecution', 'getModernizationWrapperEvidence', 'decideModernizationGate']);
191
+ defineCompatibilityMethods(proto, 'workflowComposition', ['registerModernizationAsset', 'classifyModernizationAsset', 'discoverSalvageCandidates', 'createModernizationWorkPacket', 'requestModernizationWrapperExecution', 'getModernizationWrapperEvidence', 'decideModernizationGate', 'searchCodeByIntent']);
191
192
  defineCompatibilityMethods(proto, 'currentProject', ['currentProjectStatus']);
192
193
  defineCompatibilityMethods(proto, 'projections', ['renderProjection', 'getLogaOperatorHomeProjection', 'getLogaProjectCatalogProjection', 'getLogaProjectPortfolioProjection', 'getLogaProjectRoadmapProjection', 'getLogaRoadmapItemProjection', 'getLogaWorkflowRunProjection', 'getLogaEvidencePacketProjection', 'getLogaTransferHomeProjection', 'getLogaTransferInboxProjection', 'getLogaTransferPacketProjection', 'getLogaTransferNegotiationEventsProjection', 'getLogaTransferFrictionLaneProjection', 'getLogaTransferReceiptsProjection', 'getLogaTransferClosureReviewProjection', 'getTransferChannelProjection']);
193
194
  defineCompatibilityAliases(proto, 'projections', { getLogaTransferChannelThreadProjection: 'getTransferChannelProjection' });
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { AIEngineClient, createAIEngineClient } from './client.js';
2
- export const AI_ENGINE_CLIENT_VERSION = '1.1.101';
2
+ export const AI_ENGINE_CLIENT_VERSION = '1.1.103';
3
3
  export { GOVERNED_MUTATION_REQUIRED_CAPABILITIES, AI_ENGINE_CLIENT_CAPABILITIES, TASK_BOUND_SUBSTRATE_EXECUTION_POLICY } from './constants/governance.js';
4
4
  export { LOGA_CONTRACT, LOGA_INTERACTION_CONTRACT, LOGA_NAVIGATION_CONTRACT, LOGA_PROJECTION_WORKFLOW } from './constants/loga.js';
5
5
  export {