@bpmsoftwaresolutions/ai-engine-client 1.1.71 → 1.1.73
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 +118 -0
- package/package.json +1 -1
- package/src/client.js +11661 -0
- package/src/constants/agent-communications.js +40 -0
- package/src/constants/client.js +18 -0
- package/src/constants/governance.js +17 -0
- package/src/constants/loga.js +4 -0
- package/src/domains/benchmarks.js +13 -0
- package/src/domains/capabilities.js +7 -0
- package/src/domains/context-assembly.js +10 -0
- package/src/domains/database/backups.js +11 -0
- package/src/domains/gateway.js +8 -0
- package/src/domains/health.js +5 -0
- package/src/domains/implementation-tasks.js +10 -0
- package/src/domains/notes-lab.js +7 -0
- package/src/domains/operator/current-project.js +5 -0
- package/src/domains/operator-status.js +15 -0
- package/src/domains/performance.js +8 -0
- package/src/domains/repo.js +25 -0
- package/src/domains/retrieval-management.js +14 -0
- package/src/domains/retrieval-wrapper.js +7 -0
- package/src/domains/script-discovery.js +9 -0
- package/src/domains/search-contacts.js +7 -0
- package/src/domains/self-learning.js +10 -0
- package/src/domains/self-optimization.js +8 -0
- package/src/domains/skill-governance.js +7 -0
- package/src/domains/skills.js +13 -0
- package/src/domains/tool-registry.js +14 -0
- package/src/index.js +14 -6455
- package/src/transport/index.js +176 -0
- package/src/utils/http.js +83 -0
- package/src/utils/text.js +30 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const AGENT_COMMUNICATION_CONTRACT_VERSION = 'v1';
|
|
2
|
+
export const AGENT_COMMUNICATION_THREAD_TYPES = ['request', 'review', 'handoff', 'coordination', 'task', 'escalation'];
|
|
3
|
+
export const AGENT_COMMUNICATION_MESSAGE_KINDS = [
|
|
4
|
+
'request',
|
|
5
|
+
'response',
|
|
6
|
+
'review',
|
|
7
|
+
'handoff',
|
|
8
|
+
'blocker',
|
|
9
|
+
'evidence',
|
|
10
|
+
'decision_request',
|
|
11
|
+
'task_request',
|
|
12
|
+
'review_request',
|
|
13
|
+
'evidence_response',
|
|
14
|
+
];
|
|
15
|
+
export const AGENT_COMMUNICATION_TRANSFER_KINDS = [
|
|
16
|
+
'upstream_remediation',
|
|
17
|
+
'review_request',
|
|
18
|
+
'handoff',
|
|
19
|
+
'coordination',
|
|
20
|
+
'evidence_delivery',
|
|
21
|
+
];
|
|
22
|
+
export const AGENT_COMMUNICATION_TRANSFER_MODES = ['bundle', 'artifact_refs', 'inline_payload'];
|
|
23
|
+
export const AGENT_COMMUNICATION_TRANSFER_LIFECYCLE_STATES = [
|
|
24
|
+
'created',
|
|
25
|
+
'delivered',
|
|
26
|
+
'accepted',
|
|
27
|
+
'in_progress',
|
|
28
|
+
'responded',
|
|
29
|
+
'closed',
|
|
30
|
+
'failed',
|
|
31
|
+
'superseded',
|
|
32
|
+
];
|
|
33
|
+
export const AGENT_COMMUNICATION_TRANSFER_RECEIPT_TYPES = [
|
|
34
|
+
'delivery_receipt',
|
|
35
|
+
'acceptance_receipt',
|
|
36
|
+
'evidence_receipt',
|
|
37
|
+
'closure_receipt',
|
|
38
|
+
'failure_receipt',
|
|
39
|
+
];
|
|
40
|
+
export const AGENT_COMMUNICATION_RECIPIENT_MODES = ['role', 'agent_session'];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const PACKAGE_JSON_PATH = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..', 'package.json');
|
|
6
|
+
|
|
7
|
+
export const DEFAULT_TIMEOUT_MS = 30000;
|
|
8
|
+
|
|
9
|
+
export function readPackageVersion() {
|
|
10
|
+
const packageJson = JSON.parse(fs.readFileSync(PACKAGE_JSON_PATH, 'utf8'));
|
|
11
|
+
const version = String(packageJson.version || '').trim();
|
|
12
|
+
if (!version) {
|
|
13
|
+
throw new Error(`Missing package version in ${PACKAGE_JSON_PATH}.`);
|
|
14
|
+
}
|
|
15
|
+
return version;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const AI_ENGINE_CLIENT_VERSION = readPackageVersion();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const GOVERNED_MUTATION_REQUIRED_CAPABILITIES = [
|
|
2
|
+
'executeVerifiedMutation',
|
|
3
|
+
'post_mutation_verification',
|
|
4
|
+
'acceptance_check_read',
|
|
5
|
+
'artifact_manifest_read',
|
|
6
|
+
'decision_packet_read',
|
|
7
|
+
'claim_signoff',
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
export const AI_ENGINE_CLIENT_CAPABILITIES = [
|
|
11
|
+
...GOVERNED_MUTATION_REQUIRED_CAPABILITIES,
|
|
12
|
+
'execution_eligibility_read',
|
|
13
|
+
'project_delivery_facade',
|
|
14
|
+
'workflow_resume_context_read',
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
export const TASK_BOUND_SUBSTRATE_EXECUTION_POLICY = 'task_bound_substrate_execution/v1';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function createBenchmarksDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
getSessionPerformanceMetrics: (request) => client.getSessionPerformanceMetrics(request),
|
|
4
|
+
captureBenchmarkSnapshot: (body) => client.captureBenchmarkSnapshot(body),
|
|
5
|
+
listBenchmarks: (request) => client.listBenchmarks(request),
|
|
6
|
+
getBenchmarkMetrics: (benchmarkName) => client.getBenchmarkMetrics(benchmarkName),
|
|
7
|
+
getBenchmarkDelta: (request) => client.getBenchmarkDelta(request),
|
|
8
|
+
getBenchmarkTrend: (request) => client.getBenchmarkTrend(request),
|
|
9
|
+
getPerformanceDashboard: (request) => client.getPerformanceDashboard(request),
|
|
10
|
+
listRecentBenchmarkRuns: (request) => client.listRecentBenchmarkRuns(request),
|
|
11
|
+
getBenchmarkRun: (benchmarkRunId) => client.getBenchmarkRun(benchmarkRunId),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function createCapabilitiesDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
listCapabilities: () => client.listCapabilities(),
|
|
4
|
+
createCapability: (body) => client.createCapability(body),
|
|
5
|
+
testCapability: (capabilityId, body) => client.testCapability(capabilityId, body),
|
|
6
|
+
};
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function createContextAssemblyDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
getContextAssemblyContract: (workflowRunId, request) => client.getContextAssemblyContract(workflowRunId, request),
|
|
4
|
+
getContextAssemblyStatus: (workflowRunId, request) => client.getContextAssemblyStatus(workflowRunId, request),
|
|
5
|
+
getOperatorContext: (workflowRunId, request) => client.getOperatorContext(workflowRunId, request),
|
|
6
|
+
getContextFragments: (workflowRunId, request) => client.getContextFragments(workflowRunId, request),
|
|
7
|
+
getContextReuse: (workflowRunId, request) => client.getContextReuse(workflowRunId, request),
|
|
8
|
+
listPromptAssemblies: (workflowRunId) => client.listPromptAssemblies(workflowRunId),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function createDatabaseBackupsDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
createDatabaseBackup: (request) => client.createDatabaseBackup(request),
|
|
4
|
+
listDatabaseBackups: (request) => client.listDatabaseBackups(request),
|
|
5
|
+
getDatabaseBackup: (request) => client.getDatabaseBackup(request),
|
|
6
|
+
listDatabaseBackupOperations: (request) => client.listDatabaseBackupOperations(request),
|
|
7
|
+
runAzureSqlBacpacBackup: (request) => client.runAzureSqlBacpacBackup(request),
|
|
8
|
+
listAzureSqlBacpacBackups: (request) => client.listAzureSqlBacpacBackups(request),
|
|
9
|
+
listAzureSqlBacpacBackupOperations: (request) => client.listAzureSqlBacpacBackupOperations(request),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function createGatewayDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
query: (request) => client.query(request),
|
|
4
|
+
runReportDefinition: (request) => client.runReportDefinition(request),
|
|
5
|
+
renderProjection: (request) => client.renderProjection(request),
|
|
6
|
+
submitActionIntent: (request) => client.submitActionIntent(request),
|
|
7
|
+
};
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function createImplementationTasksDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
createImplementationTask: (implementationItemId, request) => client.createImplementationTask(implementationItemId, request),
|
|
4
|
+
listImplementationTasks: (implementationItemId) => client.listImplementationTasks(implementationItemId),
|
|
5
|
+
listImplementationSubtasks: (taskId) => client.listImplementationSubtasks(taskId),
|
|
6
|
+
updateImplementationTask: (taskId, updates) => client.updateImplementationTask(taskId, updates),
|
|
7
|
+
assignImplementationTask: (taskId, request) => client.assignImplementationTask(taskId, request),
|
|
8
|
+
completeImplementationTask: (taskId, request) => client.completeImplementationTask(taskId, request),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function createOperatorStatusDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
currentWorkflowStatus: () => client.currentWorkflowStatus(),
|
|
4
|
+
currentArchitectureIntegrityStatus: () => client.currentArchitectureIntegrityStatus(),
|
|
5
|
+
currentSecurityGovernanceStatus: (request) => client.currentSecurityGovernanceStatus(request),
|
|
6
|
+
getExecutionTelemetryCurrent: () => client.getExecutionTelemetryCurrent(),
|
|
7
|
+
listExecutionProcessRuns: (request) => client.listExecutionProcessRuns(request),
|
|
8
|
+
getExecutionProcessRun: (processRunId) => client.getExecutionProcessRun(processRunId),
|
|
9
|
+
getGeneratedExecutionUsability: (request) => client.getGeneratedExecutionUsability(request),
|
|
10
|
+
getLogaGeneratedExecutionUsabilityProjection: (request) => client.getLogaGeneratedExecutionUsabilityProjection(request),
|
|
11
|
+
getAntiPatternRules: () => client.getAntiPatternRules(),
|
|
12
|
+
currentCodebaseShapeStatus: () => client.currentCodebaseShapeStatus(),
|
|
13
|
+
getLatestMemoryProjection: () => client.getLatestMemoryProjection(),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function createPerformanceDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
getSessionPerformanceMetrics: (request) => client.getSessionPerformanceMetrics(request),
|
|
4
|
+
getBenchmarkDelta: (request) => client.getBenchmarkDelta(request),
|
|
5
|
+
getBenchmarkTrend: (request) => client.getBenchmarkTrend(request),
|
|
6
|
+
getPerformanceDashboard: (request) => client.getPerformanceDashboard(request),
|
|
7
|
+
};
|
|
8
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export function createRepoDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
listRepositories: (request) => client.listRepositories(request),
|
|
4
|
+
getRepository: (repositoryId) => client.getRepository(repositoryId),
|
|
5
|
+
listProjects: (request) => client.listProjects(request),
|
|
6
|
+
getProject: (projectId) => client.getProject(projectId),
|
|
7
|
+
listCodeFiles: (request) => client.listCodeFiles(request),
|
|
8
|
+
getCodeFile: (fileId) => client.getCodeFile(fileId),
|
|
9
|
+
getCodeFileContentWindow: (fileId, request) => client.getCodeFileContentWindow(fileId, request),
|
|
10
|
+
listCodeSymbolsByFile: (fileId, request) => client.listCodeSymbolsByFile(fileId, request),
|
|
11
|
+
getCodeSymbol: (symbolId, request) => client.getCodeSymbol(symbolId, request),
|
|
12
|
+
searchSymbols: (request) => client.searchSymbols(request),
|
|
13
|
+
getSymbolRelationships: (symbolId, request) => client.getSymbolRelationships(symbolId, request),
|
|
14
|
+
listCodeRelationships: (request) => client.listCodeRelationships(request),
|
|
15
|
+
listActionObservations: (request) => client.listActionObservations(request),
|
|
16
|
+
listCodebaseShapeFindings: (request) => client.listCodebaseShapeFindings(request),
|
|
17
|
+
listObjectFlowObservations: (request) => client.listObjectFlowObservations(request),
|
|
18
|
+
getChangeAnalysis: (request) => client.getChangeAnalysis(request),
|
|
19
|
+
listRefactorCandidates: (request) => client.listRefactorCandidates(request),
|
|
20
|
+
analyzeRefactorCandidate: (request) => client.analyzeRefactorCandidate(request),
|
|
21
|
+
getRepoRetrievalPacket: (retrievalPacketId) => client.getRepoRetrievalPacket(retrievalPacketId),
|
|
22
|
+
getRepoRetrievalPacketFragments: (retrievalPacketId) => client.getRepoRetrievalPacketFragments(retrievalPacketId),
|
|
23
|
+
evaluateProposalScope: (request) => client.evaluateProposalScope(request),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function createRetrievalManagementDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
getRetrievalStatus: () => client.getRetrievalStatus(),
|
|
4
|
+
getRetrievalProfileMetrics: () => client.getRetrievalProfileMetrics(),
|
|
5
|
+
getRetrievalFeedbackMetrics: () => client.getRetrievalFeedbackMetrics(),
|
|
6
|
+
getRetrievalQuery: (retrievalQueryId) => client.getRetrievalQuery(retrievalQueryId),
|
|
7
|
+
getRetrievalPacket: (retrievalPacketId) => client.getRetrievalPacket(retrievalPacketId),
|
|
8
|
+
generateRetrievalCandidates: (body) => client.generateRetrievalCandidates(body),
|
|
9
|
+
selectRetrievalPacket: (body) => client.selectRetrievalPacket(body),
|
|
10
|
+
recordRetrievalFeedback: (body) => client.recordRetrievalFeedback(body),
|
|
11
|
+
deriveRetrievalOptimizationCandidates: (body) => client.deriveRetrievalOptimizationCandidates(body),
|
|
12
|
+
validatePromptAssembly: (body) => client.validatePromptAssembly(body),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function createRetrievalWrapperDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
getCommandCard: (request) => client.getCommandCard(request),
|
|
4
|
+
getSymbolDefinition: (request) => client.getSymbolDefinition(request),
|
|
5
|
+
getRelatedCode: (request) => client.getRelatedCode(request),
|
|
6
|
+
};
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function createScriptDiscoveryDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
scanScripts: (body) => client.scanScripts(body),
|
|
4
|
+
listDiscoveredScriptAssets: (request) => client.listDiscoveredScriptAssets(request),
|
|
5
|
+
listDiscoveredCapabilities: (request) => client.listDiscoveredCapabilities(request),
|
|
6
|
+
listWorkflowCandidates: (request) => client.listWorkflowCandidates(request),
|
|
7
|
+
promoteWorkflowCandidate: (workflowCandidateId, body) => client.promoteWorkflowCandidate(workflowCandidateId, body),
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function createSelfLearningDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
getSelfLearningPosture: (request) => client.getSelfLearningPosture(request),
|
|
4
|
+
listLearningRecords: (request) => client.listLearningRecords(request),
|
|
5
|
+
getLearningRecord: (learningRecordId) => client.getLearningRecord(learningRecordId),
|
|
6
|
+
listPromotionCandidates: (request) => client.listPromotionCandidates(request),
|
|
7
|
+
getPromotionCandidate: (candidateKey) => client.getPromotionCandidate(candidateKey),
|
|
8
|
+
listPromotionFlows: (request) => client.listPromotionFlows(request),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function createSelfOptimizationDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
getSelfOptimizationDashboard: () => client.getSelfOptimizationDashboard(),
|
|
4
|
+
getSelfOptimizationCandidateQueue: (request) => client.getSelfOptimizationCandidateQueue(request),
|
|
5
|
+
getSelfOptimizationBacklogPosture: (request) => client.getSelfOptimizationBacklogPosture(request),
|
|
6
|
+
getSelfOptimizationPendingHandoffs: (request) => client.getSelfOptimizationPendingHandoffs(request),
|
|
7
|
+
};
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function createSkillGovernanceDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
createSkillGovernanceChange: (body) => client.createSkillGovernanceChange(body),
|
|
4
|
+
listSkillGovernanceChanges: (request) => client.listSkillGovernanceChanges(request),
|
|
5
|
+
getSkillGovernanceChange: (governanceChangeId) => client.getSkillGovernanceChange(governanceChangeId),
|
|
6
|
+
};
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function createSkillsDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
currentSkillRegistryStatus: () => client.currentSkillRegistryStatus(),
|
|
4
|
+
getSkillContract: (request) => client.getSkillContract(request),
|
|
5
|
+
getSkillGovernance: (request) => client.getSkillGovernance(request),
|
|
6
|
+
createSkillContractDraft: (body) => client.createSkillContractDraft(body),
|
|
7
|
+
recordSkillPatternReview: (skillVersionId, body) => client.recordSkillPatternReview(skillVersionId, body),
|
|
8
|
+
approveSkillContract: (skillVersionId, body) => client.approveSkillContract(skillVersionId, body),
|
|
9
|
+
createWorkflowSkillContract: (body) => client.createWorkflowSkillContract(body),
|
|
10
|
+
listWorkflowSkillBindings: (workflowId, request) => client.listWorkflowSkillBindings(workflowId, request),
|
|
11
|
+
seedFrequentOperationSkills: (request) => client.seedFrequentOperationSkills(request),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function createToolRegistryDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
currentToolRegistryStatus: () => client.currentToolRegistryStatus(),
|
|
4
|
+
getWorkflowToolRegistry: (request) => client.getWorkflowToolRegistry(request),
|
|
5
|
+
currentAssistantToolContext: () => client.currentAssistantToolContext(),
|
|
6
|
+
getTool: (toolKey) => client.getTool(toolKey),
|
|
7
|
+
getToolHistory: (toolKey) => client.getToolHistory(toolKey),
|
|
8
|
+
getToolInvocations: (toolKey) => client.getToolInvocations(toolKey),
|
|
9
|
+
getToolGovernance: (toolKey) => client.getToolGovernance(toolKey),
|
|
10
|
+
getToolEventReplayBundle: (toolEventSummaryId) => client.getToolEventReplayBundle(toolEventSummaryId),
|
|
11
|
+
createToolReviewDecision: (toolKey, body) => client.createToolReviewDecision(toolKey, body),
|
|
12
|
+
createToolGateDecision: (toolKey, body) => client.createToolGateDecision(toolKey, body),
|
|
13
|
+
};
|
|
14
|
+
}
|