@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.
- package/package.json +1 -1
- package/src/client.js +227 -1849
- package/src/domains/actions.js +19 -1
- package/src/domains/benchmarks.js +9 -9
- package/src/domains/capabilities.js +3 -3
- package/src/domains/context-assembly.js +16 -6
- package/src/domains/database.js +136 -7
- package/src/domains/design-intelligence.js +12 -12
- package/src/domains/execution-telemetry.js +14 -4
- package/src/domains/health.js +12 -1
- package/src/domains/loga.js +54 -9
- package/src/domains/notes-lab.js +3 -3
- package/src/domains/operator-status.js +31 -11
- package/src/domains/performance.js +15 -4
- package/src/domains/projections.js +65 -9
- package/src/domains/reports.js +16 -1
- package/src/domains/script-discovery.js +8 -5
- package/src/domains/scripts.js +45 -4
- package/src/domains/search-contacts.js +3 -3
- package/src/domains/self-learning.js +29 -6
- package/src/domains/self-optimization.js +15 -4
- package/src/domains/skill-governance.js +5 -3
- package/src/domains/skills.js +22 -9
- package/src/domains/tool-registry.js +18 -10
- package/src/index.js +1 -1
package/src/domains/actions.js
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
+
import { cleanText, isPlainObject } from '../utils/text.js';
|
|
2
|
+
|
|
1
3
|
export function createActionsDomain(client) {
|
|
2
4
|
return {
|
|
3
|
-
|
|
5
|
+
submitActionIntent: ({ action, target = {}, payload = {}, requiredScope, requestedBy } = {}) => {
|
|
6
|
+
const normalizedAction = cleanText(action);
|
|
7
|
+
if (!normalizedAction) {
|
|
8
|
+
throw new Error('action is required.');
|
|
9
|
+
}
|
|
10
|
+
return client._request('/api/gateway/actions/submit', {
|
|
11
|
+
method: 'POST',
|
|
12
|
+
body: {
|
|
13
|
+
action: normalizedAction,
|
|
14
|
+
target: isPlainObject(target) ? target : {},
|
|
15
|
+
payload: isPlainObject(payload) ? payload : {},
|
|
16
|
+
required_scope: cleanText(requiredScope) || 'ai-engine.write',
|
|
17
|
+
requested_by: cleanText(requestedBy),
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
submit: (request) => client.actions.submitActionIntent(request),
|
|
4
22
|
};
|
|
5
23
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export function createBenchmarksDomain(client) {
|
|
2
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: (
|
|
11
|
-
getBenchmarkRun: (benchmarkRunId) => client.
|
|
3
|
+
getSessionPerformanceMetrics: (request) => client.performance.getSessionPerformanceMetrics(request),
|
|
4
|
+
captureBenchmarkSnapshot: (body) => client.performance.captureBenchmarkSnapshot(body),
|
|
5
|
+
listBenchmarks: (request) => client.performance.listBenchmarks(request),
|
|
6
|
+
getBenchmarkMetrics: (benchmarkName) => client.performance.getBenchmarkMetrics(benchmarkName),
|
|
7
|
+
getBenchmarkDelta: (request) => client.performance.getBenchmarkDelta(request),
|
|
8
|
+
getBenchmarkTrend: (request) => client.performance.getBenchmarkTrend(request),
|
|
9
|
+
getPerformanceDashboard: (request) => client.performance.getPerformanceDashboard(request),
|
|
10
|
+
listRecentBenchmarkRuns: ({ limit } = {}) => client._request('/api/benchmarks/reasoners/runs/recent', { query: { limit } }),
|
|
11
|
+
getBenchmarkRun: (benchmarkRunId) => client._request(`/api/benchmarks/reasoners/runs/${benchmarkRunId}`),
|
|
12
12
|
};
|
|
13
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function createCapabilitiesDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
listCapabilities: () => client.
|
|
4
|
-
createCapability: (body) => client.
|
|
5
|
-
testCapability: (capabilityId, body) => client.
|
|
3
|
+
listCapabilities: () => client._request('/api/capabilities'),
|
|
4
|
+
createCapability: (body) => client._request('/api/capabilities', { method: 'POST', body }),
|
|
5
|
+
testCapability: (capabilityId, body = {}) => client._request(`/api/capabilities/${capabilityId}/test`, { method: 'POST', body }),
|
|
6
6
|
};
|
|
7
7
|
}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
export function createContextAssemblyDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
getContextAssemblyContract: (workflowRunId,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
getContextAssemblyContract: (workflowRunId, { stepRunId } = {}) => client._request(`/api/context-assembly/workflow-runs/${workflowRunId}/contract`, {
|
|
4
|
+
query: { step_run_id: stepRunId },
|
|
5
|
+
}),
|
|
6
|
+
getContextAssemblyStatus: (workflowRunId, { stepRunId } = {}) => client._request(`/api/context-assembly/workflow-runs/${workflowRunId}/status`, {
|
|
7
|
+
query: { step_run_id: stepRunId },
|
|
8
|
+
}),
|
|
9
|
+
getOperatorContext: (workflowRunId, { stepRunId } = {}) => client._request(`/api/operator/runs/${workflowRunId}/context`, {
|
|
10
|
+
query: { step_run_id: stepRunId },
|
|
11
|
+
}),
|
|
12
|
+
getContextFragments: (workflowRunId, { stepRunId } = {}) => client._request(`/api/operator/runs/${workflowRunId}/context/fragments`, {
|
|
13
|
+
query: { step_run_id: stepRunId },
|
|
14
|
+
}),
|
|
15
|
+
getContextReuse: (workflowRunId, { stepRunId } = {}) => client._request(`/api/operator/runs/${workflowRunId}/context/reuse`, {
|
|
16
|
+
query: { step_run_id: stepRunId },
|
|
17
|
+
}),
|
|
18
|
+
listPromptAssemblies: (workflowRunId) => client._request(`/api/operator/workflow-runs/${workflowRunId}/prompt-assemblies`),
|
|
9
19
|
};
|
|
10
20
|
}
|
package/src/domains/database.js
CHANGED
|
@@ -1,14 +1,143 @@
|
|
|
1
|
+
import { cleanList, cleanText, isPlainObject } from '../utils/text.js';
|
|
1
2
|
import { createDatabaseBackupsDomain } from './database/backups.js';
|
|
2
3
|
|
|
3
4
|
export function createDatabaseDomain(client) {
|
|
4
5
|
return {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
query: ({
|
|
7
|
+
surface,
|
|
8
|
+
contractKey,
|
|
9
|
+
parameters = {},
|
|
10
|
+
fields = [],
|
|
11
|
+
fieldAllowlist = [],
|
|
12
|
+
actorScopes = [],
|
|
13
|
+
requiredScopes = [],
|
|
14
|
+
shape = 'json',
|
|
15
|
+
requestedBy,
|
|
16
|
+
} = {}) => {
|
|
17
|
+
const normalizedSurface = cleanText(surface) || cleanText(contractKey);
|
|
18
|
+
if (!normalizedSurface) {
|
|
19
|
+
throw new Error('surface is required.');
|
|
20
|
+
}
|
|
21
|
+
const normalizedShape = cleanText(shape) || 'json';
|
|
22
|
+
if (!['json', 'table', 'cards', 'markdown'].includes(normalizedShape)) {
|
|
23
|
+
throw new Error('shape must be one of json, table, cards, or markdown.');
|
|
24
|
+
}
|
|
25
|
+
const normalizedFields = cleanList(fields);
|
|
26
|
+
const normalizedAllowlist = cleanList(fieldAllowlist);
|
|
27
|
+
const disallowedFields = normalizedFields.filter((field) => !normalizedAllowlist.includes(field));
|
|
28
|
+
if (normalizedAllowlist.length > 0 && disallowedFields.length > 0) {
|
|
29
|
+
throw new Error(`Requested fields are not allowed: ${disallowedFields.join(', ')}.`);
|
|
30
|
+
}
|
|
31
|
+
const normalizedActorScopes = cleanList(actorScopes);
|
|
32
|
+
const normalizedRequiredScopes = cleanList(requiredScopes);
|
|
33
|
+
const missingScopes = normalizedRequiredScopes.filter((scope) => !normalizedActorScopes.includes(scope));
|
|
34
|
+
if (missingScopes.length > 0) {
|
|
35
|
+
throw new Error(`Missing required scopes: ${missingScopes.join(', ')}.`);
|
|
36
|
+
}
|
|
37
|
+
return client._request('/api/gateway/query', {
|
|
38
|
+
method: 'POST',
|
|
39
|
+
body: {
|
|
40
|
+
surface: normalizedSurface,
|
|
41
|
+
parameters: isPlainObject(parameters) ? parameters : {},
|
|
42
|
+
fields: normalizedFields,
|
|
43
|
+
field_allowlist: normalizedAllowlist,
|
|
44
|
+
actor_scopes: normalizedActorScopes,
|
|
45
|
+
required_scopes: normalizedRequiredScopes,
|
|
46
|
+
shape: normalizedShape,
|
|
47
|
+
requested_by: cleanText(requestedBy),
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
createDatabaseBackup: ({ databaseName, outputName, noWait } = {}) => client._request('/api/operator/database/backups', {
|
|
52
|
+
method: 'POST',
|
|
53
|
+
body: {
|
|
54
|
+
database_name: databaseName,
|
|
55
|
+
output_name: outputName,
|
|
56
|
+
no_wait: noWait,
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
59
|
+
listDatabaseBackups: ({ prefix, limit } = {}) => client._request('/api/operator/database/backups', {
|
|
60
|
+
query: {
|
|
61
|
+
prefix,
|
|
62
|
+
limit,
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
getDatabaseBackup: ({ backupId } = {}) => client._request(`/api/operator/database/backups/${encodeURIComponent(backupId)}`),
|
|
66
|
+
listDatabaseBackupOperations: ({ databaseName, operationFilter, limit } = {}) => client._request('/api/operator/database/backups/operations', {
|
|
67
|
+
query: {
|
|
68
|
+
database_name: databaseName,
|
|
69
|
+
operation_filter: operationFilter,
|
|
70
|
+
limit,
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
73
|
+
runAzureSqlBacpacBackup: ({
|
|
74
|
+
databaseName,
|
|
75
|
+
storageAccount,
|
|
76
|
+
container,
|
|
77
|
+
resourceGroup,
|
|
78
|
+
serverName,
|
|
79
|
+
outputName,
|
|
80
|
+
adminUser,
|
|
81
|
+
adminPassword,
|
|
82
|
+
subscription,
|
|
83
|
+
storageKey,
|
|
84
|
+
skipContainerCreate,
|
|
85
|
+
noWait,
|
|
86
|
+
} = {}) => client._request('/api/operator/database/backups/azure-sql-bacpac', {
|
|
87
|
+
method: 'POST',
|
|
88
|
+
body: {
|
|
89
|
+
database_name: databaseName,
|
|
90
|
+
storage_account: storageAccount,
|
|
91
|
+
container,
|
|
92
|
+
resource_group: resourceGroup,
|
|
93
|
+
server_name: serverName,
|
|
94
|
+
output_name: outputName,
|
|
95
|
+
admin_user: adminUser,
|
|
96
|
+
admin_password: adminPassword,
|
|
97
|
+
subscription,
|
|
98
|
+
storage_key: storageKey,
|
|
99
|
+
skip_container_create: skipContainerCreate,
|
|
100
|
+
no_wait: noWait,
|
|
101
|
+
},
|
|
102
|
+
}),
|
|
103
|
+
listAzureSqlBacpacBackups: ({
|
|
104
|
+
storageAccount,
|
|
105
|
+
container,
|
|
106
|
+
resourceGroup,
|
|
107
|
+
serverName,
|
|
108
|
+
subscription,
|
|
109
|
+
storageKey,
|
|
110
|
+
prefix,
|
|
111
|
+
limit,
|
|
112
|
+
} = {}) => client._request('/api/operator/database/backups/azure-sql-bacpac', {
|
|
113
|
+
query: {
|
|
114
|
+
storage_account: storageAccount,
|
|
115
|
+
container,
|
|
116
|
+
resource_group: resourceGroup,
|
|
117
|
+
server_name: serverName,
|
|
118
|
+
subscription,
|
|
119
|
+
storage_key: storageKey,
|
|
120
|
+
prefix,
|
|
121
|
+
limit,
|
|
122
|
+
},
|
|
123
|
+
}),
|
|
124
|
+
listAzureSqlBacpacBackupOperations: ({
|
|
125
|
+
databaseName,
|
|
126
|
+
resourceGroup,
|
|
127
|
+
serverName,
|
|
128
|
+
subscription,
|
|
129
|
+
operationFilter,
|
|
130
|
+
limit,
|
|
131
|
+
} = {}) => client._request('/api/operator/database/backups/azure-sql-bacpac/operations', {
|
|
132
|
+
query: {
|
|
133
|
+
database_name: databaseName,
|
|
134
|
+
resource_group: resourceGroup,
|
|
135
|
+
server_name: serverName,
|
|
136
|
+
subscription,
|
|
137
|
+
operation_filter: operationFilter,
|
|
138
|
+
limit,
|
|
139
|
+
},
|
|
140
|
+
}),
|
|
12
141
|
backups: createDatabaseBackupsDomain(client),
|
|
13
142
|
};
|
|
14
143
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export function createDesignIntelligenceDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
getDesignIntelligenceDashboard: () => client.
|
|
4
|
-
listDesignDecisions: () => client.
|
|
5
|
-
getDesignDecision: (decisionId) => client.
|
|
6
|
-
getDesignDecisionVariants: (decisionId) => client.
|
|
7
|
-
getDesignDecisionCritique: (decisionId) => client.
|
|
8
|
-
getDesignDecisionLineage: (decisionId) => client.
|
|
9
|
-
listDesignPatterns: () => client.
|
|
10
|
-
getDecisionLabCanvas: () => client.
|
|
11
|
-
getDesignRecommendations: () => client.
|
|
12
|
-
getDesignPromotions: () => client.
|
|
13
|
-
previewDesignPromotion: (body) => client.
|
|
14
|
-
getDesignIntelligenceMetrics: () => client.
|
|
3
|
+
getDesignIntelligenceDashboard: () => client._request('/api/design-intelligence/dashboard'),
|
|
4
|
+
listDesignDecisions: () => client._request('/api/design-intelligence/decisions'),
|
|
5
|
+
getDesignDecision: (decisionId) => client._request(`/api/design-intelligence/decisions/${decisionId}`),
|
|
6
|
+
getDesignDecisionVariants: (decisionId) => client._request(`/api/design-intelligence/decisions/${decisionId}/variants`),
|
|
7
|
+
getDesignDecisionCritique: (decisionId) => client._request(`/api/design-intelligence/decisions/${decisionId}/critique`),
|
|
8
|
+
getDesignDecisionLineage: (decisionId) => client._request(`/api/design-intelligence/decisions/${decisionId}/lineage`),
|
|
9
|
+
listDesignPatterns: () => client._request('/api/design-intelligence/patterns'),
|
|
10
|
+
getDecisionLabCanvas: () => client._request('/api/design-intelligence/decision-lab/canvas'),
|
|
11
|
+
getDesignRecommendations: () => client._request('/api/design-intelligence/recommendations'),
|
|
12
|
+
getDesignPromotions: () => client._request('/api/design-intelligence/promotions'),
|
|
13
|
+
previewDesignPromotion: (body) => client._request('/api/design-intelligence/promotions/preview', { method: 'POST', body }),
|
|
14
|
+
getDesignIntelligenceMetrics: () => client._request('/api/design-intelligence/metrics'),
|
|
15
15
|
};
|
|
16
16
|
}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
export function createExecutionTelemetryDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
getExecutionTelemetryCurrent: () => client._request('/api/operator/execution-telemetry/current'),
|
|
4
|
+
getCurrent: () => client._request('/api/operator/execution-telemetry/current'),
|
|
5
|
+
listExecutionProcessRuns: ({ limit, artifactKind, status, since } = {}) => client._request('/api/operator/execution-telemetry/process-runs', {
|
|
6
|
+
query: { limit, artifact_kind: artifactKind, status, since },
|
|
7
|
+
}),
|
|
8
|
+
listProcessRuns: (request) => client.executionTelemetry.listExecutionProcessRuns(request),
|
|
9
|
+
getExecutionProcessRun: (processRunId) => client._request(`/api/operator/execution-telemetry/process-runs/${processRunId}`),
|
|
10
|
+
getProcessRun: (processRunId) => client.executionTelemetry.getExecutionProcessRun(processRunId),
|
|
11
|
+
getGeneratedExecutionUsability: ({ artifactPath, limit } = {}) => client._request('/api/operator/generated-execution-usability', {
|
|
12
|
+
query: { artifact_path: artifactPath, limit },
|
|
13
|
+
}),
|
|
14
|
+
getLogaGeneratedExecutionUsabilityProjection: ({ artifactPath, limit } = {}) => client._requestLogaProjection('/api/loga/ai-engine/generated-execution-usability', {
|
|
15
|
+
query: { artifact_path: artifactPath, limit },
|
|
16
|
+
}),
|
|
7
17
|
};
|
|
8
18
|
}
|
package/src/domains/health.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
export function createHealthDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
ping: () =>
|
|
3
|
+
ping: async () => {
|
|
4
|
+
const [health, workflow] = await Promise.all([
|
|
5
|
+
client._request('/healthz'),
|
|
6
|
+
client.currentWorkflowStatus(),
|
|
7
|
+
]);
|
|
8
|
+
return {
|
|
9
|
+
status: health.status || 'ok',
|
|
10
|
+
workflow_name: workflow?.summary?.workflow_name || null,
|
|
11
|
+
run_status: workflow?.summary?.run_status || null,
|
|
12
|
+
base_url: client.baseUrl,
|
|
13
|
+
};
|
|
14
|
+
},
|
|
4
15
|
};
|
|
5
16
|
}
|
package/src/domains/loga.js
CHANGED
|
@@ -1,13 +1,58 @@
|
|
|
1
1
|
export function createLogaDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
submitUxGateRemediation: (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
submitUxGateRemediation: ({
|
|
4
|
+
projectionType,
|
|
5
|
+
projectionId,
|
|
6
|
+
gateRunId,
|
|
7
|
+
findingIds,
|
|
8
|
+
remediationPayload,
|
|
9
|
+
sourceTruth = 'sql',
|
|
10
|
+
clientEvidence,
|
|
11
|
+
createdBy,
|
|
12
|
+
} = {}) => client._request('/api/loga/ux-gate-remediations', {
|
|
13
|
+
method: 'POST',
|
|
14
|
+
body: {
|
|
15
|
+
projectionType,
|
|
16
|
+
projectionId,
|
|
17
|
+
gateRunId,
|
|
18
|
+
findingIds,
|
|
19
|
+
remediationPayload,
|
|
20
|
+
sourceTruth,
|
|
21
|
+
clientEvidence,
|
|
22
|
+
createdBy,
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
listUxGateRemediations: ({ projectionType, status } = {}) => client._request('/api/loga/ux-gate-remediations', {
|
|
26
|
+
query: { projectionType, status },
|
|
27
|
+
}),
|
|
28
|
+
getUxGateRemediation: (remediationId) => client._request(`/api/loga/ux-gate-remediations/${remediationId}`),
|
|
29
|
+
appendUxRemediationTicketNote: (remediationId, {
|
|
30
|
+
noteKind,
|
|
31
|
+
body,
|
|
32
|
+
visibility,
|
|
33
|
+
authorActorId,
|
|
34
|
+
evidenceRefs,
|
|
35
|
+
metadata,
|
|
36
|
+
} = {}) => client._request(`/api/loga/ux-gate-remediations/${remediationId}/notes`, {
|
|
37
|
+
method: 'POST',
|
|
38
|
+
body: {
|
|
39
|
+
noteKind,
|
|
40
|
+
body,
|
|
41
|
+
visibility,
|
|
42
|
+
authorActorId,
|
|
43
|
+
evidenceRefs,
|
|
44
|
+
metadata,
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
47
|
+
listUxRemediationTicketNotes: (remediationId) => client._request(`/api/loga/ux-gate-remediations/${remediationId}/notes`),
|
|
48
|
+
promoteUxGateRemediationImplementationCandidate: (remediationId, { promotedBy } = {}) => client._request(`/api/loga/ux-gate-remediations/${remediationId}/implementation-candidate`, {
|
|
49
|
+
method: 'POST',
|
|
50
|
+
body: { promotedBy },
|
|
51
|
+
}),
|
|
52
|
+
getLogaUxGateRemediationProjection: (remediationId) => client._requestLogaProjection(`/api/operator/projections/ux-gate-remediations/${remediationId}`),
|
|
53
|
+
getUxGateRemediationProjection: (remediationId) => client.loga.getLogaUxGateRemediationProjection(remediationId),
|
|
54
|
+
getGeneratedExecutionUsabilityProjection: (query) => client._requestLogaProjection('/api/loga/ai-engine/generated-execution-usability', {
|
|
55
|
+
query,
|
|
56
|
+
}),
|
|
12
57
|
};
|
|
13
58
|
}
|
package/src/domains/notes-lab.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function createNotesLabDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
getNotesLabConfig: () => client.
|
|
4
|
-
submitNote: (body) => client.
|
|
5
|
-
approveNoteReview: (body) => client.
|
|
3
|
+
getNotesLabConfig: () => client._request('/api/notes-lab/config'),
|
|
4
|
+
submitNote: (body) => client._request('/api/notes-lab/submit', { method: 'POST', body }),
|
|
5
|
+
approveNoteReview: (body) => client._request('/api/notes-lab/approve-review', { method: 'POST', body }),
|
|
6
6
|
};
|
|
7
7
|
}
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
export function createOperatorStatusDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
currentWorkflowStatus: () => client.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
currentWorkflowStatus: () => client._request('/api/operator/current-workflow-status'),
|
|
4
|
+
getCurrentWorkflowStatus: () => client._request('/api/operator/current-workflow-status'),
|
|
5
|
+
currentArchitectureIntegrityStatus: () => client._request('/api/operator/current-architecture-integrity-status'),
|
|
6
|
+
getCurrentArchitectureIntegrityStatus: () => client._request('/api/operator/current-architecture-integrity-status'),
|
|
7
|
+
currentSecurityGovernanceStatus: ({ environment, topN } = {}) => client._request('/api/operator/current-security-governance-status', {
|
|
8
|
+
query: { environment, top_n: topN },
|
|
9
|
+
}),
|
|
10
|
+
getCurrentSecurityGovernanceStatus: (request) => client._request('/api/operator/current-security-governance-status', {
|
|
11
|
+
query: { environment: request?.environment, top_n: request?.topN },
|
|
12
|
+
}),
|
|
13
|
+
getExecutionTelemetryCurrent: () => client._request('/api/operator/execution-telemetry/current'),
|
|
14
|
+
listExecutionProcessRuns: ({ limit, artifactKind, status, since } = {}) => client._request('/api/operator/execution-telemetry/process-runs', {
|
|
15
|
+
query: { limit, artifact_kind: artifactKind, status, since },
|
|
16
|
+
}),
|
|
17
|
+
getExecutionProcessRun: (processRunId) => client._request(`/api/operator/execution-telemetry/process-runs/${processRunId}`),
|
|
18
|
+
getGeneratedExecutionUsability: ({ artifactPath, limit } = {}) => client._request('/api/operator/generated-execution-usability', {
|
|
19
|
+
query: { artifact_path: artifactPath, limit },
|
|
20
|
+
}),
|
|
21
|
+
getLogaGeneratedExecutionUsabilityProjection: ({ artifactPath, limit } = {}) => client._requestLogaProjection('/api/loga/ai-engine/generated-execution-usability', {
|
|
22
|
+
query: { artifact_path: artifactPath, limit },
|
|
23
|
+
}),
|
|
24
|
+
getAntiPatternRules: () => client._request('/api/governance/anti-pattern-rules'),
|
|
25
|
+
currentCodebaseShapeStatus: () => client._request('/api/operator/current-codebase-shape-status'),
|
|
26
|
+
getLatestMemoryProjection: () => client._request('/api/v1/latest-memory-projection'),
|
|
27
|
+
currentProjectStatus: ({ projectId } = {}) => client._request('/api/operator/current-project-status', {
|
|
28
|
+
query: { project_id: projectId },
|
|
29
|
+
}),
|
|
30
|
+
getDashboard: () => client._request('/api/dashboard'),
|
|
31
|
+
getCommunicationCapabilities: () => client._request('/api/agent-communications/capabilities'),
|
|
32
|
+
getCollaborationCapabilities: () => client._request('/api/agent-communications/collaboration-capabilities'),
|
|
33
|
+
getDeploymentCapabilities: () => client._request('/api/agent-communications/deployment-capabilities'),
|
|
14
34
|
};
|
|
15
35
|
}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
export function createPerformanceDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
getSessionPerformanceMetrics: (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
getSessionPerformanceMetrics: ({ clientType, workflowRunId, sessionId } = {}) => client._request('/api/operator/performance/sessions', {
|
|
4
|
+
query: { client_type: clientType, workflow_run_id: workflowRunId, session_id: sessionId },
|
|
5
|
+
}),
|
|
6
|
+
captureBenchmarkSnapshot: (body) => client._request('/api/operator/performance/benchmarks', { method: 'POST', body }),
|
|
7
|
+
listBenchmarks: ({ benchmarkScope } = {}) => client._request('/api/operator/performance/benchmarks', {
|
|
8
|
+
query: { benchmark_scope: benchmarkScope },
|
|
9
|
+
}),
|
|
10
|
+
getBenchmarkMetrics: (benchmarkName) => client._request(`/api/operator/performance/benchmarks/${benchmarkName}/metrics`),
|
|
11
|
+
getBenchmarkDelta: ({ baseline, current } = {}) => client._request('/api/operator/performance/delta', { query: { baseline, current } }),
|
|
12
|
+
getBenchmarkTrend: ({ metricKey, dimensionValue, limit } = {}) => client._request('/api/operator/performance/trend', {
|
|
13
|
+
query: { metric_key: metricKey, dimension_value: dimensionValue, limit },
|
|
14
|
+
}),
|
|
15
|
+
getPerformanceDashboard: ({ clientType, workflowRunId } = {}) => client._request('/api/operator/performance/dashboard', {
|
|
16
|
+
query: { client_type: clientType, workflow_run_id: workflowRunId },
|
|
17
|
+
}),
|
|
7
18
|
};
|
|
8
19
|
}
|
|
@@ -1,13 +1,69 @@
|
|
|
1
|
+
import { cleanText, isPlainObject } from '../utils/text.js';
|
|
2
|
+
|
|
1
3
|
export function createProjectionsDomain(client) {
|
|
2
4
|
return {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
renderProjection: ({ projectionType, viewContract = {}, requestedBy } = {}) => {
|
|
6
|
+
const normalizedProjectionType = cleanText(projectionType);
|
|
7
|
+
if (!normalizedProjectionType) {
|
|
8
|
+
throw new Error('projectionType is required.');
|
|
9
|
+
}
|
|
10
|
+
return client._request('/api/gateway/projections/render', {
|
|
11
|
+
method: 'POST',
|
|
12
|
+
body: {
|
|
13
|
+
projection_type: normalizedProjectionType,
|
|
14
|
+
view_contract: isPlainObject(viewContract) ? viewContract : {},
|
|
15
|
+
requested_by: cleanText(requestedBy),
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
render: (request) => client.projections.renderProjection(request),
|
|
20
|
+
getLogaOperatorHomeProjection: () => client._requestLogaProjection('/api/operator/projections/home'),
|
|
21
|
+
getLogaProjectCatalogProjection: () => client._requestLogaProjection('/api/operator/projections/project-catalog'),
|
|
22
|
+
getLogaProjectPortfolioProjection: () => client._requestLogaProjection('/api/operator/projections/project-portfolio'),
|
|
23
|
+
getLogaProjectRoadmapProjection: (projectId) => client._requestLogaProjection(`/api/operator/projections/projects/${projectId}/roadmap.md`),
|
|
24
|
+
getLogaRoadmapItemProjection: (projectId, itemKey) => client._requestLogaProjection(`/api/operator/projections/projects/${projectId}/roadmap/items/${itemKey}`),
|
|
25
|
+
getLogaWorkflowRunProjection: (workflowRunId) => client._requestLogaProjection(`/api/operator/projections/workflow-runs/${workflowRunId}`),
|
|
26
|
+
getLogaEvidencePacketProjection: (packetKey) => client._requestLogaProjection(`/api/operator/projections/evidence-packets/${packetKey}`),
|
|
27
|
+
getLogaTransferHomeProjection: () => client._requestLogaProjection('/api/operator/projections/transfers/home'),
|
|
28
|
+
getLogaTransferInboxProjection: ({ workflowRunId, recipientAgentSessionId, recipientRoleKey } = {}) => client._requestLogaProjection('/api/operator/projections/transfers/inbox', {
|
|
29
|
+
query: {
|
|
30
|
+
workflow_run_id: workflowRunId,
|
|
31
|
+
recipient_agent_session_id: recipientAgentSessionId,
|
|
32
|
+
recipient_role_key: recipientRoleKey,
|
|
33
|
+
},
|
|
34
|
+
}),
|
|
35
|
+
getLogaTransferPacketProjection: (workTransferPacketId) => client._requestLogaProjection(`/api/operator/projections/transfers/${workTransferPacketId}`),
|
|
36
|
+
getLogaTransferNegotiationEventsProjection: ({ workTransferPacketId, workflowRunId } = {}) => {
|
|
37
|
+
const path = workTransferPacketId
|
|
38
|
+
? `/api/operator/projections/transfers/${workTransferPacketId}/negotiation-events`
|
|
39
|
+
: '/api/operator/projections/transfers/negotiation-events';
|
|
40
|
+
return client._requestLogaProjection(path, {
|
|
41
|
+
query: { workflow_run_id: workflowRunId },
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
getLogaTransferFrictionLaneProjection: ({ workflowRunId } = {}) => client._requestLogaProjection('/api/operator/projections/transfers/friction-lane', {
|
|
45
|
+
query: { workflow_run_id: workflowRunId },
|
|
46
|
+
}),
|
|
47
|
+
getLogaTransferReceiptsProjection: ({ workTransferPacketId, workflowRunId } = {}) => client._requestLogaProjection('/api/operator/projections/transfers/receipts', {
|
|
48
|
+
query: {
|
|
49
|
+
work_transfer_packet_id: workTransferPacketId,
|
|
50
|
+
workflow_run_id: workflowRunId,
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
53
|
+
getLogaTransferClosureReviewProjection: (workTransferPacketId) => client._requestLogaProjection(`/api/operator/projections/transfers/${workTransferPacketId}/closure-review`),
|
|
54
|
+
getTransferChannelProjection: (transferChannelId) => {
|
|
55
|
+
const normalizedTransferChannelId = cleanText(transferChannelId);
|
|
56
|
+
if (!normalizedTransferChannelId) {
|
|
57
|
+
throw new Error('transferChannelId is required.');
|
|
58
|
+
}
|
|
59
|
+
return client._requestLogaProjection(`/api/operator/projections/transfers/channels/${encodeURIComponent(normalizedTransferChannelId)}`);
|
|
60
|
+
},
|
|
61
|
+
getTransferHomeProjection: () => client._requestLogaProjection('/api/operator/projections/transfers/home'),
|
|
62
|
+
getTransferInboxProjection: (request) => client.projections.getLogaTransferInboxProjection(request),
|
|
63
|
+
getTransferPacketProjection: (workTransferPacketId) => client.projections.getLogaTransferPacketProjection(workTransferPacketId),
|
|
64
|
+
getTransferNegotiationEventsProjection: (request) => client.projections.getLogaTransferNegotiationEventsProjection(request),
|
|
65
|
+
getTransferFrictionLaneProjection: (request) => client.projections.getLogaTransferFrictionLaneProjection(request),
|
|
66
|
+
getTransferReceiptsProjection: (request) => client.projections.getLogaTransferReceiptsProjection(request),
|
|
67
|
+
getTransferClosureReviewProjection: (workTransferPacketId) => client.projections.getLogaTransferClosureReviewProjection(workTransferPacketId),
|
|
12
68
|
};
|
|
13
69
|
}
|
package/src/domains/reports.js
CHANGED
|
@@ -2,7 +2,22 @@ import { cleanText, isPlainObject } from '../utils/text.js';
|
|
|
2
2
|
|
|
3
3
|
export function createReportsDomain(client) {
|
|
4
4
|
return {
|
|
5
|
-
|
|
5
|
+
runReport: ({ reportKey, definition = {}, requestedBy } = {}) => {
|
|
6
|
+
const normalizedReportKey = cleanText(reportKey);
|
|
7
|
+
if (!normalizedReportKey) {
|
|
8
|
+
throw new Error('reportKey is required.');
|
|
9
|
+
}
|
|
10
|
+
return client._request('/api/gateway/reports/run', {
|
|
11
|
+
method: 'POST',
|
|
12
|
+
body: {
|
|
13
|
+
report_key: normalizedReportKey,
|
|
14
|
+
definition: isPlainObject(definition) ? definition : {},
|
|
15
|
+
requested_by: cleanText(requestedBy),
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
run: (request) => client.reports.runReport(request),
|
|
20
|
+
runReportDefinition: ({ reportKey, definition = {}, requestedBy } = {}) => {
|
|
6
21
|
const normalizedReportKey = cleanText(reportKey);
|
|
7
22
|
if (!normalizedReportKey) {
|
|
8
23
|
throw new Error('reportKey is required.');
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export function createScriptDiscoveryDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
scanScripts: (body) => client.
|
|
4
|
-
listDiscoveredScriptAssets: (
|
|
5
|
-
listDiscoveredCapabilities: (
|
|
6
|
-
listWorkflowCandidates: (
|
|
7
|
-
promoteWorkflowCandidate: (workflowCandidateId, body) => client.
|
|
3
|
+
scanScripts: (body = {}) => client._request('/api/script-discovery/scan', { method: 'POST', body }),
|
|
4
|
+
listDiscoveredScriptAssets: ({ limit } = {}) => client._request('/api/script-discovery/script-assets', { query: { limit } }),
|
|
5
|
+
listDiscoveredCapabilities: ({ limit } = {}) => client._request('/api/script-discovery/discovered-capabilities', { query: { limit } }),
|
|
6
|
+
listWorkflowCandidates: ({ limit } = {}) => client._request('/api/script-discovery/workflow-candidates', { query: { limit } }),
|
|
7
|
+
promoteWorkflowCandidate: (workflowCandidateId, body = {}) => client._request(`/api/script-discovery/workflow-candidates/${workflowCandidateId}/promote`, {
|
|
8
|
+
method: 'POST',
|
|
9
|
+
body,
|
|
10
|
+
}),
|
|
8
11
|
};
|
|
9
12
|
}
|