@bpmsoftwaresolutions/ai-engine-client 1.1.71 → 1.1.74

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.
Files changed (40) hide show
  1. package/README.md +118 -0
  2. package/package.json +1 -1
  3. package/src/client.js +11633 -0
  4. package/src/constants/agent-communications.js +40 -0
  5. package/src/constants/client.js +18 -0
  6. package/src/constants/governance.js +17 -0
  7. package/src/constants/loga.js +4 -0
  8. package/src/domains/actions.js +5 -0
  9. package/src/domains/benchmarks.js +13 -0
  10. package/src/domains/capabilities.js +7 -0
  11. package/src/domains/context-assembly.js +10 -0
  12. package/src/domains/database/backups.js +11 -0
  13. package/src/domains/database.js +14 -0
  14. package/src/domains/design-intelligence.js +16 -0
  15. package/src/domains/execution-telemetry.js +8 -0
  16. package/src/domains/gateway.js +8 -0
  17. package/src/domains/health.js +5 -0
  18. package/src/domains/implementation-tasks.js +10 -0
  19. package/src/domains/loga.js +13 -0
  20. package/src/domains/notes-lab.js +7 -0
  21. package/src/domains/operator/current-project.js +5 -0
  22. package/src/domains/operator-status.js +15 -0
  23. package/src/domains/performance.js +8 -0
  24. package/src/domains/projections.js +13 -0
  25. package/src/domains/repo.js +25 -0
  26. package/src/domains/reports.js +5 -0
  27. package/src/domains/retrieval-management.js +14 -0
  28. package/src/domains/retrieval-wrapper.js +7 -0
  29. package/src/domains/script-discovery.js +9 -0
  30. package/src/domains/scripts.js +8 -0
  31. package/src/domains/search-contacts.js +7 -0
  32. package/src/domains/self-learning.js +10 -0
  33. package/src/domains/self-optimization.js +8 -0
  34. package/src/domains/skill-governance.js +7 -0
  35. package/src/domains/skills.js +13 -0
  36. package/src/domains/tool-registry.js +14 -0
  37. package/src/index.js +14 -6455
  38. package/src/transport/index.js +176 -0
  39. package/src/utils/http.js +83 -0
  40. package/src/utils/text.js +30 -0
package/README.md CHANGED
@@ -122,6 +122,113 @@ The helper:
122
122
 
123
123
  The backend still does not expose a project-scoped `getActiveClaim(projectId)` helper. This client records that gap and uses `claimIsValid(claimId)` plus claim creation when it needs a governed fallback path.
124
124
 
125
+ ### Agent Communication Channels
126
+
127
+ Use `establishAgentCommunicationChannel(...)` when you want the client to compose the governed transfer-channel handshake end to end for a project or work packet.
128
+
129
+ ```js
130
+ const channel = await client.establishAgentCommunicationChannel({
131
+ projectIdentifier: charter.project_id,
132
+ });
133
+ ```
134
+
135
+ The helper composes:
136
+
137
+ - `resumeProjectWork(...)` or `startWork(...)`
138
+ - `transferWorkPacket(...)`
139
+ - `openTransferChannel(...)`
140
+ - `joinTransferChannel(...)` or `resumeTransferChannel(...)`
141
+ - `postCollaborationHeartbeat(...)`
142
+ - `getTransferChannelProjection(...)` when available
143
+
144
+ The returned result includes `missing_surfaces[]` so the client can record any absent transfer-channel projection or lifecycle surface while still returning a safe partial view tied to governed work.
145
+
146
+ ### Inter-Agent Messaging Loop
147
+
148
+ Use `runInterAgentMessagingLoop(...)` when a governed transfer channel already exists and the agent needs to send a reply, start an expected-message watch, acknowledge the observed message, heartbeat the channel, and close it only when closure criteria are explicit.
149
+
150
+ ```js
151
+ const loop = await client.runInterAgentMessagingLoop({
152
+ channelId: channel.channel_id,
153
+ workTransferPacketId: channel.transfer_packet_id,
154
+ replyBodyMarkdown: 'Confirmed. Proceeding with the next step.',
155
+ closeWhenAcknowledged: true,
156
+ });
157
+ ```
158
+
159
+ The helper composes:
160
+
161
+ - `resumeTransferChannel(...)`
162
+ - `replyToTransferChannel(...)`
163
+ - `startMessageWatch(...)`
164
+ - `acknowledgeExpectedMessage(...)`
165
+ - `postCollaborationHeartbeat(...)`
166
+ - `closeTransferChannel(...)` when the closure criteria are explicit and satisfied
167
+ - `getTransferChannelProjection(...)` when available
168
+
169
+ `missing_surfaces[]` records any absent reply/watch/ack/close/projection surface so the helper can return a safe partial result rather than inventing a free-floating message flow.
170
+
171
+ ### Cross-Agent Remediation Tickets
172
+
173
+ Use `createCrossAgentRemediationTicket(...)` when one agent needs to file a governed remediation ticket for another agent from an existing channel, finding, blocker, failed check, or workflow gap.
174
+
175
+ ```js
176
+ const ticket = await client.createCrossAgentRemediationTicket({
177
+ channelId: channel.channel_id,
178
+ workTransferPacketId: channel.transfer_packet_id,
179
+ assignedTo: 'agent-upstream',
180
+ requestedBy: 'agent-downstream',
181
+ sourceRef: 'finding-42',
182
+ blockerSummary: 'Remediation ownership needs to move upstream.',
183
+ expectedResponse: 'Assignee acknowledgement',
184
+ });
185
+ ```
186
+
187
+ The helper composes:
188
+
189
+ - `resumeTransferChannel(...)` when a channel is supplied
190
+ - `transferWorkPacket(...)` when ownership must move
191
+ - `raiseCollaborationBlocker(...)`
192
+ - `reviewCollaborationProposal(...)` when a proposal id is supplied
193
+ - `startMessageWatch(...)`
194
+ - `postCollaborationHeartbeat(...)`
195
+ - `getTransferChannelProjection(...)` when available
196
+
197
+ The helper returns `remediation_ticket_id` or `blocker_id`, plus `missing_surfaces[]` so callers can see any absent governed surface without pretending the ticket was fully established.
198
+
199
+ ### Refactoring Bundle Transfer
200
+
201
+ Use `transferRefactoringBundle(...)` when one agent needs to package a governed refactoring/remediation bundle and hand it to another agent through the transfer substrate.
202
+
203
+ ```js
204
+ const bundle = await client.transferRefactoringBundle({
205
+ projectIdentifier: 'project-1',
206
+ sourceAgent: 'agent-downstream',
207
+ targetAgent: 'agent-upstream',
208
+ sourceRef: 'refactor-42',
209
+ problemStatement: 'Extract the transport orchestration into a shared helper.',
210
+ affectedFilesOrSymbols: ['src/index.js', 'transferRefactoringBundle'],
211
+ recommendedAction: 'Create a shared transfer orchestration helper.',
212
+ acceptanceCriteria: ['bundle received', 'ownership assigned', 'acknowledgement posted'],
213
+ evidenceRefs: ['commit:abc123'],
214
+ riskLevel: 'medium',
215
+ handoffNotes: 'Please review and wire the new helper into the bundle flow.',
216
+ });
217
+ ```
218
+
219
+ The helper composes:
220
+
221
+ - `resumeProjectWork(...)` or `startWork(...)`
222
+ - `transferWorkPacket(...)`
223
+ - `openTransferChannel(...)` or `resumeTransferChannel(...)`
224
+ - `assignCollaborationOwnership(...)`
225
+ - `postCollaborationProposal(...)`
226
+ - `startMessageWatch(...)`
227
+ - `postCollaborationHeartbeat(...)`
228
+ - `getTransferChannelProjection(...)` when available
229
+
230
+ The helper returns `missing_surfaces[]` for any absent transfer, ownership, proposal, watch, heartbeat, or projection surface, and it fails closed if no explicit target agent is supplied.
231
+
125
232
  ## Integration Notes
126
233
 
127
234
  ### Auth Modes
@@ -765,6 +872,17 @@ Engine returns the required gate and next action.
765
872
  | `getPortfolioBundle()` | Portfolio bundle. |
766
873
  | `getPortfolioClosureReadiness({ projectLimit, includeInactive, includeLogaPortfolioProjection, includeLogaRoadmapProjections })` | Read-only portfolio readiness view that composes bundle, project list, roadmap summaries, active items, and open task counts into a conservative closure-ready flag. |
767
874
 
875
+ ### Warehouse
876
+ | Method | Description |
877
+ |---|---|
878
+ | `registerModernizationAsset({ projectIdentifier, assetName, assetType, sourceRef, originSystem, businessContext, suspectedValue, knownRisks, relatedProjectId, evidenceRefs, handoffNotes, assignedClassifier, classificationRequired })` | Register a modernization asset intake record when the backend surface exists, attach governed intake evidence or observations when available, and optionally hand off classification to another agent through the transfer substrate. Missing asset-intake or observation surfaces are recorded in `missing_surfaces[]`, and generated markdown projections are treated only as display metadata. |
879
+ | `classifyModernizationAsset({ projectIdentifier, assetId, intakeRecordId, assetType, sourceRef, classificationCategory, domainArea, reusePotential, modernizationNeed, knownRisks, evidenceRefs, recommendedNextStep, classificationConfidence, reviewRequired, assignedReviewer, handoffNotes })` | Classify a registered modernization asset into reusable warehouse categories using caller-supplied evidence only. The helper looks up the registered asset or intake record when that backend surface exists, records missing classification surfaces in `missing_surfaces[]`, and can hand the review to another agent through the transfer substrate without treating generated projections as authority. |
880
+ | `discoverSalvageCandidates({ projectIdentifier, assetId, intakeRecordId, classificationId, sourceRef, classificationCategory, domainArea, reusePotential, modernizationNeed, knownRisks, evidenceRefs, recommendedNextStep, reviewRequired, assignedReviewer, relatedSymbols, relatedQualifiedNames, relatedFilePaths, candidateSearchIntent, candidateSearchQuery, maxCandidates })` | Identify salvage candidates from a classified modernization asset using governed inventory and retrieval surfaces only. The helper records missing code-discovery surfaces in `missing_surfaces[]`, composes symbol and related-code lookup when available, and can hand the candidate review to another agent without inspecting local files or generated projections as authority. |
881
+ | `createModernizationWorkPacket({ projectIdentifier, assetId, intakeRecordId, classificationId, selectedCandidates, candidateIds, sourceRef, packetTitle, problemStatement, recommendedModernization, affectedFilesOrSymbols, acceptanceCriteria, riskLevel, evidenceRefs, wrapperExecutionRequired, handoffNotes, targetAgent, assignedOwner, collaborationRequired, channelId, transferChannelId })` | Convert selected salvage candidates into a governed modernization work packet. The helper prefers governed packet and candidate records when available, falls back to `transferWorkPacket(...)` when the dedicated packet surface is missing, and records any absent packet, candidate, proposal, channel, watch, or heartbeat surfaces in `missing_surfaces[]`. Generated projections remain display metadata only. |
882
+ | `requestModernizationWrapperExecution({ projectIdentifier, modernizationPacketId, wrapperName, wrapperContractRef, sourceRef, executionScope, allowedBlastRadius, requiredEvidence, acceptanceCriteria, riskLevel, targetAgent, handoffNotes, collaborationRequired, channelId, transferChannelId, wrapperExecutionRequired })` | Turn a modernization work packet into a governed wrapper execution request. The helper prefers a dedicated wrapper-request surface when available, falls back to `transferWorkPacket(...)` as the safe governed handoff when that surface is missing, and records missing packet, wrapper-request, channel, ownership, watch, or heartbeat surfaces in `missing_surfaces[]`. Generated projections remain display metadata only. |
883
+ | `getModernizationWrapperEvidence({ projectIdentifier, modernizationPacketId, wrapperExecutionRequestId, wrapperExecutionId, sourceRef, includeOperations, includeFileManifest, includeVerificationSummary, includeProjection })` | Read back wrapper evidence for a modernization packet or wrapper execution request without inventing evidence or treating projections as authority. The helper prefers a governed wrapper-evidence bundle when available, falls back to component reads only when those surfaces exist, and records missing packet, request, evidence, operation-log, manifest, verification, or projection surfaces in `missing_surfaces[]`. |
884
+ | `decideModernizationGate({ projectIdentifier, modernizationPacketId, wrapperExecutionRequestId, wrapperExecutionId, sourceRef, requiredEvidence, acceptanceCriteria, decisionMode, decisionBand, reviewer, reviewRequired, riskLevel, rationale, recordDecision, reviewChannelId, implementationItemId, submittedBy })` | Turn wrapper evidence into a conservative modernization gate recommendation or recorded gate decision. The helper requires complete wrapper evidence before it can recommend a pass, records missing packet, evidence, acceptance-criteria, gate-decision, evidence-link, watch, heartbeat, or projection surfaces in `missing_surfaces[]`, and treats generated projections as display metadata only. |
885
+
768
886
  ### Self-Learning
769
887
  | Method | Description |
770
888
  |---|---|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpmsoftwaresolutions/ai-engine-client",
3
- "version": "1.1.71",
3
+ "version": "1.1.74",
4
4
  "description": "Thin npm client for the AI Engine operator and retrieval APIs",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",