@bpmsoftwaresolutions/ai-engine-client 1.1.88 → 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 +282 -2369
- package/src/domains/actions.js +19 -1
- package/src/domains/benchmarks.js +9 -9
- package/src/domains/capabilities.js +3 -3
- package/src/domains/charters.js +5 -0
- package/src/domains/claims.js +58 -0
- package/src/domains/commit-governance.js +68 -0
- package/src/domains/context-assembly.js +16 -6
- package/src/domains/context-orientation.js +48 -0
- package/src/domains/context-sessions.js +46 -0
- package/src/domains/database.js +136 -7
- package/src/domains/design-intelligence.js +12 -12
- package/src/domains/execution-eligibility.js +44 -0
- package/src/domains/execution-telemetry.js +14 -4
- package/src/domains/governed-implementation.js +7 -0
- 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/session-governance.js +64 -0
- package/src/domains/skill-governance.js +5 -3
- package/src/domains/skills.js +22 -9
- package/src/domains/tool-binding-approvals.js +102 -0
- package/src/domains/tool-registry.js +18 -10
- package/src/domains/verified-mutations.js +7 -0
- package/src/domains/work-start.js +192 -0
- package/src/domains/workflow-turns.js +6 -0
- package/src/index.js +1 -1
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
|
}
|
package/src/domains/scripts.js
CHANGED
|
@@ -1,8 +1,49 @@
|
|
|
1
1
|
export function createScriptsDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
4
|
-
getOrganization: (entityId) => client.
|
|
5
|
-
getContact: (contactId) => client.
|
|
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: (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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.
|
|
4
|
-
getSelfOptimizationCandidateQueue: (
|
|
5
|
-
|
|
6
|
-
|
|
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
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export function createSessionGovernanceDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
startSessionGovernance: ({
|
|
4
|
+
intent,
|
|
5
|
+
objective,
|
|
6
|
+
allowedScopes,
|
|
7
|
+
allowedMutationSurfaces,
|
|
8
|
+
requiredToolKeys,
|
|
9
|
+
sessionKey,
|
|
10
|
+
workflowRunId,
|
|
11
|
+
workflowId,
|
|
12
|
+
workflowSlug,
|
|
13
|
+
governedScope,
|
|
14
|
+
successCriteria,
|
|
15
|
+
disallowedSurfaces,
|
|
16
|
+
...rest
|
|
17
|
+
} = {}) => client._request('/api/v1/session-governance/startup', {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
body: {
|
|
20
|
+
...rest,
|
|
21
|
+
objective: objective ?? intent,
|
|
22
|
+
allowed_mutation_surfaces: allowedMutationSurfaces ?? allowedScopes,
|
|
23
|
+
required_tool_keys: requiredToolKeys,
|
|
24
|
+
session_key: sessionKey,
|
|
25
|
+
workflow_run_id: workflowRunId,
|
|
26
|
+
workflow_id: workflowId,
|
|
27
|
+
workflow_slug: workflowSlug,
|
|
28
|
+
governed_scope: governedScope,
|
|
29
|
+
success_criteria: successCriteria,
|
|
30
|
+
disallowed_surfaces: disallowedSurfaces,
|
|
31
|
+
},
|
|
32
|
+
}),
|
|
33
|
+
startReviewGovernance: ({
|
|
34
|
+
intent,
|
|
35
|
+
objective,
|
|
36
|
+
readScope,
|
|
37
|
+
requiredToolKeys,
|
|
38
|
+
sessionKey,
|
|
39
|
+
workflowRunId,
|
|
40
|
+
workflowId,
|
|
41
|
+
workflowSlug,
|
|
42
|
+
turnPersisted,
|
|
43
|
+
...rest
|
|
44
|
+
} = {}) => client._request('/api/v1/session-governance/review/startup', {
|
|
45
|
+
method: 'POST',
|
|
46
|
+
body: {
|
|
47
|
+
...rest,
|
|
48
|
+
intent: intent ?? 'review code',
|
|
49
|
+
objective: objective ?? intent,
|
|
50
|
+
read_scope: readScope,
|
|
51
|
+
required_tool_keys: requiredToolKeys,
|
|
52
|
+
session_key: sessionKey,
|
|
53
|
+
workflow_run_id: workflowRunId,
|
|
54
|
+
workflow_id: workflowId,
|
|
55
|
+
workflow_slug: workflowSlug ?? 'code-review/read-only',
|
|
56
|
+
turn_persisted: turnPersisted,
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
59
|
+
evaluateTurnCompliance: (sessionId) => client._request(`/api/v1/session-governance/${encodeURIComponent(sessionId)}/compliance`),
|
|
60
|
+
blockIfNonCompliant: (sessionId) => client._request(`/api/v1/session-governance/${encodeURIComponent(sessionId)}/block-if-non-compliant`, {
|
|
61
|
+
method: 'POST',
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export function createSkillGovernanceDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
createSkillGovernanceChange: (body) => client.
|
|
4
|
-
listSkillGovernanceChanges: (
|
|
5
|
-
|
|
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
|
}
|
package/src/domains/skills.js
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
export function createSkillsDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
currentSkillRegistryStatus: () => client.
|
|
4
|
-
getSkillContract: (
|
|
5
|
-
getSkillGovernance: (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export function createToolBindingApprovalsDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
createWorkflowToolBindingApprovalLane: ({
|
|
4
|
+
operatorActorType,
|
|
5
|
+
requesterActor,
|
|
6
|
+
requestedToolKeys,
|
|
7
|
+
blockedReason,
|
|
8
|
+
rollbackPlan,
|
|
9
|
+
requesterActorType,
|
|
10
|
+
operatorActorId,
|
|
11
|
+
targetWorkflowId,
|
|
12
|
+
targetWorkflowRunId,
|
|
13
|
+
relatedGapRecordIds,
|
|
14
|
+
requestedBindingScope,
|
|
15
|
+
riskClassification,
|
|
16
|
+
metadata,
|
|
17
|
+
...rest
|
|
18
|
+
} = {}) => {
|
|
19
|
+
if (!operatorActorType) throw new Error('operatorActorType is required.');
|
|
20
|
+
if (!requesterActor) throw new Error('requesterActor is required.');
|
|
21
|
+
if (!Array.isArray(requestedToolKeys) || requestedToolKeys.length === 0) {
|
|
22
|
+
throw new Error('requestedToolKeys must be a non-empty array.');
|
|
23
|
+
}
|
|
24
|
+
if (!blockedReason) throw new Error('blockedReason is required.');
|
|
25
|
+
if (!rollbackPlan) throw new Error('rollbackPlan is required.');
|
|
26
|
+
return client._request('/api/governance/bootstrap/workflow-tool-binding-approval/create', {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
body: {
|
|
29
|
+
...rest,
|
|
30
|
+
operator_actor_type: operatorActorType,
|
|
31
|
+
requester_actor: requesterActor,
|
|
32
|
+
requested_tool_keys: requestedToolKeys,
|
|
33
|
+
blocked_reason: blockedReason,
|
|
34
|
+
rollback_plan: rollbackPlan,
|
|
35
|
+
requester_actor_type: requesterActorType,
|
|
36
|
+
operator_actor_id: operatorActorId,
|
|
37
|
+
target_workflow_id: targetWorkflowId,
|
|
38
|
+
target_workflow_run_id: targetWorkflowRunId,
|
|
39
|
+
related_gap_record_ids: relatedGapRecordIds,
|
|
40
|
+
requested_binding_scope: requestedBindingScope,
|
|
41
|
+
risk_classification: riskClassification,
|
|
42
|
+
metadata,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
recordWorkflowToolBindingApprovalDecision: (approvalRequestId, {
|
|
47
|
+
operatorActorType,
|
|
48
|
+
decision,
|
|
49
|
+
operatorActorId,
|
|
50
|
+
decisionNotes,
|
|
51
|
+
decisionConditions,
|
|
52
|
+
...rest
|
|
53
|
+
} = {}) => {
|
|
54
|
+
if (!approvalRequestId) throw new Error('approvalRequestId is required.');
|
|
55
|
+
if (!operatorActorType) throw new Error('operatorActorType is required.');
|
|
56
|
+
if (!decision) throw new Error('decision is required.');
|
|
57
|
+
return client._request(`/api/governance/bootstrap/workflow-tool-binding-approval/${encodeURIComponent(approvalRequestId)}/approval-decision`, {
|
|
58
|
+
method: 'POST',
|
|
59
|
+
body: {
|
|
60
|
+
...rest,
|
|
61
|
+
operator_actor_type: operatorActorType,
|
|
62
|
+
operator_actor_id: operatorActorId,
|
|
63
|
+
decision,
|
|
64
|
+
decision_notes: decisionNotes,
|
|
65
|
+
decision_conditions: decisionConditions,
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
executeWorkflowToolBindingApprovalBinding: (approvalRequestId, {
|
|
70
|
+
operatorActorType,
|
|
71
|
+
operatorActorId,
|
|
72
|
+
...rest
|
|
73
|
+
} = {}) => {
|
|
74
|
+
if (!approvalRequestId) throw new Error('approvalRequestId is required.');
|
|
75
|
+
if (!operatorActorType) throw new Error('operatorActorType is required.');
|
|
76
|
+
return client._request(`/api/governance/bootstrap/workflow-tool-binding-approval/${encodeURIComponent(approvalRequestId)}/binding-execution`, {
|
|
77
|
+
method: 'POST',
|
|
78
|
+
body: {
|
|
79
|
+
...rest,
|
|
80
|
+
operator_actor_type: operatorActorType,
|
|
81
|
+
operator_actor_id: operatorActorId,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
revalidateWorkflowToolBindingStartup: (approvalRequestId, {
|
|
86
|
+
operatorActorType,
|
|
87
|
+
operatorActorId,
|
|
88
|
+
...rest
|
|
89
|
+
} = {}) => {
|
|
90
|
+
if (!approvalRequestId) throw new Error('approvalRequestId is required.');
|
|
91
|
+
if (!operatorActorType) throw new Error('operatorActorType is required.');
|
|
92
|
+
return client._request(`/api/governance/bootstrap/workflow-tool-binding-approval/${encodeURIComponent(approvalRequestId)}/startup-revalidation`, {
|
|
93
|
+
method: 'POST',
|
|
94
|
+
body: {
|
|
95
|
+
...rest,
|
|
96
|
+
operator_actor_type: operatorActorType,
|
|
97
|
+
operator_actor_id: operatorActorId,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|