@bpmsoftwaresolutions/ai-engine-client 1.1.89 → 1.1.90

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.
@@ -1,8 +1,49 @@
1
1
  export function createScriptsDomain(client) {
2
2
  return {
3
- generate: (payload) => client.generateScript(payload),
4
- render: (scriptId) => client.renderScript(scriptId),
5
- submitArtifact: (scriptId, payload) => client.submitScriptArtifact(scriptId, payload),
6
- getRunEvidence: (query) => client.getScriptRunEvidence(query),
3
+ generateScript: ({
4
+ claimId,
5
+ contextSessionId,
6
+ workflowRunId,
7
+ intent = {},
8
+ renderSpec = {},
9
+ createdBy,
10
+ } = {}) => client._request('/api/scripts/generate', {
11
+ method: 'POST',
12
+ body: {
13
+ claimId,
14
+ contextSessionId,
15
+ workflowRunId,
16
+ intent,
17
+ renderSpec,
18
+ createdBy,
19
+ },
20
+ }),
21
+ generate: (payload) => client.scripts.generateScript(payload),
22
+ renderScript: (scriptId) => client._request(`/api/scripts/${scriptId}/render`),
23
+ render: (scriptId) => client.scripts.renderScript(scriptId),
24
+ submitScriptArtifact: (scriptId, {
25
+ workflowRunId,
26
+ output = {},
27
+ observations = [],
28
+ validation = {},
29
+ recordedBy,
30
+ } = {}) => client._request(`/api/scripts/${scriptId}/artifacts`, {
31
+ method: 'POST',
32
+ body: {
33
+ workflowRunId,
34
+ output,
35
+ observations,
36
+ validation,
37
+ recordedBy,
38
+ },
39
+ }),
40
+ submitArtifact: (scriptId, payload) => client.scripts.submitScriptArtifact(scriptId, payload),
41
+ getScriptRunEvidence: ({ workflowRunId, scriptId } = {}) => client._request('/api/scripts/run-evidence', {
42
+ query: {
43
+ workflowRunId,
44
+ scriptId,
45
+ },
46
+ }),
47
+ getRunEvidence: (query) => client.scripts.getScriptRunEvidence(query),
7
48
  };
8
49
  }
@@ -1,7 +1,7 @@
1
1
  export function createSearchContactsDomain(client) {
2
2
  return {
3
- search: (query) => client.search(query),
4
- getOrganization: (entityId) => client.getOrganization(entityId),
5
- getContact: (contactId) => client.getContact(contactId),
3
+ search: (query) => client._request('/api/search', { query: { q: query } }),
4
+ getOrganization: (entityId) => client._request(`/api/organizations/${entityId}`),
5
+ getContact: (contactId) => client._request(`/api/contacts/${contactId}`),
6
6
  };
7
7
  }
@@ -1,10 +1,33 @@
1
1
  export function createSelfLearningDomain(client) {
2
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),
3
+ getSelfLearningPosture: ({ workflowRunId, limit } = {}) => client._request('/api/operator/self-learning/posture', {
4
+ query: { workflow_run_id: workflowRunId, limit },
5
+ }),
6
+ listLearningRecords: ({ workflowRunId, learningCategory, promotionReadiness, limit } = {}) => client._request('/api/operator/self-learning/records', {
7
+ query: {
8
+ workflow_run_id: workflowRunId,
9
+ learning_category: learningCategory,
10
+ promotion_readiness: promotionReadiness,
11
+ limit,
12
+ },
13
+ }),
14
+ getLearningRecord: (learningRecordId) => client._request(`/api/operator/self-learning/records/${learningRecordId}`),
15
+ listPromotionCandidates: ({ workflowRunId, learningCategory, promotionReadiness, limit } = {}) => client._request('/api/operator/self-learning/promotion-candidates', {
16
+ query: {
17
+ workflow_run_id: workflowRunId,
18
+ learning_category: learningCategory,
19
+ promotion_readiness: promotionReadiness,
20
+ limit,
21
+ },
22
+ }),
23
+ getPromotionCandidate: (candidateKey) => client._request(`/api/operator/self-learning/promotion-candidates/${candidateKey}`),
24
+ listPromotionFlows: ({ flowStatus, targetType, candidateKey, limit } = {}) => client._request('/api/operator/self-learning/promotion-flows', {
25
+ query: {
26
+ flow_status: flowStatus,
27
+ target_type: targetType,
28
+ candidate_key: candidateKey,
29
+ limit,
30
+ },
31
+ }),
9
32
  };
10
33
  }
@@ -1,8 +1,19 @@
1
1
  export function createSelfOptimizationDomain(client) {
2
2
  return {
3
- getSelfOptimizationDashboard: () => client.getSelfOptimizationDashboard(),
4
- getSelfOptimizationCandidateQueue: (request) => client.getSelfOptimizationCandidateQueue(request),
5
- getSelfOptimizationBacklogPosture: (request) => client.getSelfOptimizationBacklogPosture(request),
6
- getSelfOptimizationPendingHandoffs: (request) => client.getSelfOptimizationPendingHandoffs(request),
3
+ getSelfOptimizationDashboard: () => client._request('/api/operator/self-optimization/dashboard'),
4
+ getSelfOptimizationCandidateQueue: ({ objectiveCategory, impactPosture, blockedByDefault, limit } = {}) => client._request('/api/operator/self-optimization/candidate-queue', {
5
+ query: {
6
+ objective_category: objectiveCategory,
7
+ impact_posture: impactPosture,
8
+ blocked_by_default: blockedByDefault,
9
+ limit,
10
+ },
11
+ }),
12
+ getSelfOptimizationBacklogPosture: ({ snapshotKey } = {}) => client._request('/api/operator/self-optimization/backlog-posture', {
13
+ query: { snapshot_key: snapshotKey },
14
+ }),
15
+ getSelfOptimizationPendingHandoffs: ({ downstreamLane } = {}) => client._request('/api/operator/self-optimization/pending-handoffs', {
16
+ query: { downstream_lane: downstreamLane },
17
+ }),
7
18
  };
8
19
  }
@@ -1,7 +1,9 @@
1
1
  export function createSkillGovernanceDomain(client) {
2
2
  return {
3
- createSkillGovernanceChange: (body) => client.createSkillGovernanceChange(body),
4
- listSkillGovernanceChanges: (request) => client.listSkillGovernanceChanges(request),
5
- getSkillGovernanceChange: (governanceChangeId) => client.getSkillGovernanceChange(governanceChangeId),
3
+ createSkillGovernanceChange: (body) => client._request('/api/operator/skill-governance/changes', { method: 'POST', body }),
4
+ listSkillGovernanceChanges: ({ limit, processStatus, changeStatus } = {}) => client._request('/api/operator/skill-governance/changes', {
5
+ query: { limit, process_status: processStatus, change_status: changeStatus },
6
+ }),
7
+ getSkillGovernanceChange: (governanceChangeId) => client._request(`/api/operator/skill-governance/changes/${governanceChangeId}`),
6
8
  };
7
9
  }
@@ -1,13 +1,26 @@
1
1
  export function createSkillsDomain(client) {
2
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),
3
+ currentSkillRegistryStatus: () => client._request('/api/operator/current-skill-registry-status'),
4
+ getSkillContract: ({ skillId, skillKey } = {}) => client._request('/api/skills/contract', { query: { skill_id: skillId, skill_key: skillKey } }),
5
+ getSkillGovernance: ({ skillId, skillKey, skillVersionId } = {}) => client._request('/api/operator/skills/governance', {
6
+ query: { skill_id: skillId, skill_key: skillKey, skill_version_id: skillVersionId },
7
+ }),
8
+ createSkillContractDraft: (body) => client._request('/api/operator/skills/contracts/drafts', { method: 'POST', body }),
9
+ recordSkillPatternReview: (skillVersionId, body) => client._request(`/api/operator/skills/contracts/${skillVersionId}/pattern-reviews`, {
10
+ method: 'POST',
11
+ body,
12
+ }),
13
+ approveSkillContract: (skillVersionId, body = {}) => client._request(`/api/operator/skills/contracts/${skillVersionId}/approve`, {
14
+ method: 'POST',
15
+ body,
16
+ }),
17
+ createWorkflowSkillContract: (body) => client._request('/api/skills/workflow-contracts', { method: 'POST', body }),
18
+ listWorkflowSkillBindings: (workflowId, { workflowStepId } = {}) => client._request(`/api/workflows/${workflowId}/skill-bindings`, {
19
+ query: { workflow_step_id: workflowStepId },
20
+ }),
21
+ seedFrequentOperationSkills: ({ createdBy } = {}) => client._request('/api/operator/skills/seed-frequent-operations', {
22
+ method: 'POST',
23
+ body: { created_by: createdBy },
24
+ }),
12
25
  };
13
26
  }
@@ -1,14 +1,22 @@
1
1
  export function createToolRegistryDomain(client) {
2
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),
3
+ currentToolRegistryStatus: () => client._request('/api/operator/current-tool-registry-status'),
4
+ getWorkflowToolRegistry: ({ workflowId, workflowSlug } = {}) => client._request('/api/operator/workflow-tool-registry', {
5
+ query: { workflow_id: workflowId, workflow_slug: workflowSlug },
6
+ }),
7
+ currentAssistantToolContext: () => client._request('/api/operator/current-assistant-tool-context'),
8
+ getTool: (toolKey) => client._request(`/api/tools/${toolKey}`),
9
+ getToolHistory: (toolKey) => client._request(`/api/tools/${toolKey}/history`),
10
+ getToolInvocations: (toolKey) => client._request(`/api/tools/${toolKey}/invocations`),
11
+ getToolGovernance: (toolKey) => client._request(`/api/tools/${toolKey}/governance`),
12
+ getToolEventReplayBundle: (toolEventSummaryId) => client._request(`/api/operator/tool-events/${toolEventSummaryId}/replay-bundle`),
13
+ createToolReviewDecision: (toolKey, body) => client._request(`/api/governance/tools/${toolKey}/review-decisions`, {
14
+ method: 'POST',
15
+ body,
16
+ }),
17
+ createToolGateDecision: (toolKey, body) => client._request(`/api/governance/tools/${toolKey}/gate-decisions`, {
18
+ method: 'POST',
19
+ body,
20
+ }),
13
21
  };
14
22
  }
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.89';
2
+ export const AI_ENGINE_CLIENT_VERSION = '1.1.90';
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 {