@bpmsoftwaresolutions/ai-engine-client 1.1.86 → 1.1.88
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 +136 -4463
- package/src/domains/implementation-artifacts.js +61 -0
- package/src/domains/implementation-checks.js +41 -0
- package/src/domains/implementation-items.js +82 -89
- package/src/domains/implementation-packets.js +173 -0
- package/src/domains/implementation-tasks.js +125 -6
- package/src/domains/portfolio.js +125 -1
- package/src/domains/project-chartering.js +18 -0
- package/src/domains/project-reports.js +14 -0
- package/src/domains/project-resume.js +18 -0
- package/src/domains/projects.js +348 -24
- package/src/domains/repo.js +124 -21
- package/src/domains/reports.js +16 -1
- package/src/domains/retrieval-management.js +19 -10
- package/src/domains/retrieval-wrapper.js +39 -3
- package/src/domains/roadmap-reports.js +6 -0
- package/src/domains/workflow-composition.js +3416 -7
- package/src/domains/workflows.js +99 -0
- package/src/index.js +1 -1
- package/src/utils/task-binding.js +31 -0
- package/src/utils/verified-mutations.js +128 -0
package/src/domains/repo.js
CHANGED
|
@@ -1,25 +1,128 @@
|
|
|
1
1
|
export function createRepoDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
listRepositories
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
3
|
+
listRepositories({ limit } = {}) {
|
|
4
|
+
return client._request('/api/repo/repositories', {
|
|
5
|
+
query: { limit },
|
|
6
|
+
});
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
getRepository(repositoryId) {
|
|
10
|
+
return client._request(`/api/repo/repositories/${repositoryId}`);
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
listProjects({ repositoryId, repoKey, limit } = {}) {
|
|
14
|
+
return client._request('/api/repo/projects', {
|
|
15
|
+
query: { repository_id: repositoryId, repo_key: repoKey, limit },
|
|
16
|
+
});
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
getProject(projectId) {
|
|
20
|
+
return client._request(`/api/repo/projects/${projectId}`);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
listCodeFiles({ repositoryId, projectId, language, pathPrefix, page = 1, pageSize = 50 } = {}) {
|
|
24
|
+
return client._request('/api/repo/files', {
|
|
25
|
+
query: {
|
|
26
|
+
repository_id: repositoryId,
|
|
27
|
+
project_id: projectId,
|
|
28
|
+
language,
|
|
29
|
+
path_prefix: pathPrefix,
|
|
30
|
+
page,
|
|
31
|
+
page_size: pageSize,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
getCodeFile(fileId) {
|
|
37
|
+
return client._request(`/api/repo/files/${fileId}`);
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
getCodeFileContentWindow(fileId, { startLine = 1, endLine } = {}) {
|
|
41
|
+
return client._request(`/api/repo/files/${fileId}/content-window`, {
|
|
42
|
+
query: { start_line: startLine, end_line: endLine ?? startLine },
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
listCodeSymbolsByFile(fileId, { limit = 500 } = {}) {
|
|
47
|
+
return client._request(`/api/repo/files/${fileId}/symbols`, {
|
|
48
|
+
query: { limit },
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
getCodeSymbol(symbolId, { includeCode = false, maxLines = 120 } = {}) {
|
|
53
|
+
return client._request(`/api/repo/symbols/${symbolId}`, {
|
|
54
|
+
query: { include_code: includeCode, max_lines: maxLines },
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
searchSymbols({ query, projectScope, maxResults = 10 } = {}) {
|
|
59
|
+
return client._request('/api/repo/symbols/search', {
|
|
60
|
+
query: { query, project_scope: projectScope, max_results: maxResults },
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
getSymbolRelationships(symbolId, { relationshipType, depth = 1 } = {}) {
|
|
65
|
+
return client._request(`/api/repo/symbols/${symbolId}/relationships`, {
|
|
66
|
+
query: { relationship_type: relationshipType, depth },
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
listCodeRelationships({ repositoryId, projectId, relationshipType, limit = 100 } = {}) {
|
|
71
|
+
return client._request('/api/repo/relationships', {
|
|
72
|
+
query: { repository_id: repositoryId, project_id: projectId, relationship_type: relationshipType, limit },
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
listActionObservations({ repositoryId, projectPath, filePath, symbolId, actionKind, limit = 100 } = {}) {
|
|
77
|
+
return client._request('/api/repo/action-observations', {
|
|
78
|
+
query: { repository_id: repositoryId, project_path: projectPath, file_path: filePath, symbol_id: symbolId, action_kind: actionKind, limit },
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
listCodebaseShapeFindings({ repositoryId, projectPath, filePath, severity, status, limit = 100 } = {}) {
|
|
83
|
+
return client._request('/api/repo/shape/findings', {
|
|
84
|
+
query: { repository_id: repositoryId, project_path: projectPath, file_path: filePath, severity, status, limit },
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
listObjectFlowObservations({ repositoryId, projectPath, filePath, objectKind, boundaryKind, limit = 100 } = {}) {
|
|
89
|
+
return client._request('/api/repo/object-flow-observations', {
|
|
90
|
+
query: { repository_id: repositoryId, project_path: projectPath, file_path: filePath, object_kind: objectKind, boundary_kind: boundaryKind, limit },
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
getChangeAnalysis({ fileId, symbolId, limit = 25 } = {}) {
|
|
95
|
+
return client._request('/api/repo/change-analysis', {
|
|
96
|
+
query: { file_id: fileId, symbol_id: symbolId, limit },
|
|
97
|
+
});
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
listRefactorCandidates({ repositoryRoot, limit = 10 } = {}) {
|
|
101
|
+
return client._request('/api/repo/refactor-candidates', {
|
|
102
|
+
query: { repository_root: repositoryRoot, limit },
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
analyzeRefactorCandidate({ filePath, requestedBy, packetId, refactorIntent } = {}) {
|
|
107
|
+
return client._request('/api/repo/refactor-candidate-analysis', {
|
|
108
|
+
method: 'POST',
|
|
109
|
+
body: { file_path: filePath, requested_by: requestedBy, packet_id: packetId, refactor_intent: refactorIntent },
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
getRepoRetrievalPacket(retrievalPacketId) {
|
|
114
|
+
return client._request(`/api/repo/retrieval/packets/${retrievalPacketId}`);
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
getRepoRetrievalPacketFragments(retrievalPacketId) {
|
|
118
|
+
return client._request(`/api/repo/retrieval/packets/${retrievalPacketId}/fragments`);
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
evaluateProposalScope({ filePath, projectId, changeType = 'refactor', requestedBy, refactorIntent } = {}) {
|
|
122
|
+
return client._request('/api/repo/proposal-scope-evaluation', {
|
|
123
|
+
method: 'POST',
|
|
124
|
+
body: { file_path: filePath, project_id: projectId, change_type: changeType, requested_by: requestedBy, refactor_intent: refactorIntent },
|
|
125
|
+
});
|
|
126
|
+
},
|
|
24
127
|
};
|
|
25
128
|
}
|
package/src/domains/reports.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
+
import { cleanText, isPlainObject } from '../utils/text.js';
|
|
2
|
+
|
|
1
3
|
export function createReportsDomain(client) {
|
|
2
4
|
return {
|
|
3
|
-
run
|
|
5
|
+
run({ 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
|
+
},
|
|
4
19
|
};
|
|
5
20
|
}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
export function createRetrievalManagementDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
getRetrievalStatus: () => client.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
getRetrievalStatus: () => client._request('/api/operator/retrieval/status'),
|
|
4
|
+
|
|
5
|
+
getRetrievalProfileMetrics: () => client._request('/api/operator/retrieval/profiles/metrics'),
|
|
6
|
+
|
|
7
|
+
getRetrievalFeedbackMetrics: () => client._request('/api/operator/retrieval/feedback-metrics'),
|
|
8
|
+
|
|
9
|
+
getRetrievalQuery: (retrievalQueryId) => client._request(`/api/operator/retrieval/queries/${retrievalQueryId}`),
|
|
10
|
+
|
|
11
|
+
getRetrievalPacket: (retrievalPacketId) => client._request(`/api/operator/retrieval/packets/${retrievalPacketId}`),
|
|
12
|
+
|
|
13
|
+
generateRetrievalCandidates: (body) => client._request('/api/operator/retrieval/generate-candidates', { method: 'POST', body }),
|
|
14
|
+
|
|
15
|
+
selectRetrievalPacket: (body) => client._request('/api/operator/retrieval/select-packet', { method: 'POST', body }),
|
|
16
|
+
|
|
17
|
+
recordRetrievalFeedback: (body) => client._request('/api/operator/retrieval/feedback', { method: 'POST', body }),
|
|
18
|
+
|
|
19
|
+
deriveRetrievalOptimizationCandidates: (body) => client._request('/api/operator/retrieval/optimization-candidates', { method: 'POST', body }),
|
|
20
|
+
|
|
21
|
+
validatePromptAssembly: (body) => client._request('/api/operator/retrieval/validate-prompt-assembly', { method: 'POST', body }),
|
|
13
22
|
};
|
|
14
23
|
}
|
|
@@ -1,7 +1,43 @@
|
|
|
1
1
|
export function createRetrievalWrapperDomain(client) {
|
|
2
2
|
return {
|
|
3
|
-
getCommandCard
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
getCommandCard({ commandKey, alias, intentText, requestedBy } = {}) {
|
|
4
|
+
return client._request('/api/operator/retrieval/wrapper/command-card', {
|
|
5
|
+
query: { command_key: commandKey, alias, intent_text: intentText, requested_by: requestedBy },
|
|
6
|
+
});
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
resolveOperatingProcedure({ procedureKey, intentText, requestedBy } = {}) {
|
|
10
|
+
return client._request('/api/operator/retrieval/wrapper/operating-procedure', {
|
|
11
|
+
query: { procedure_key: procedureKey, intent_text: intentText, requested_by: requestedBy },
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
getSymbolDefinition({ symbolKey, qualifiedName, symbolName, projectScope, includeCode = true, maxLines = 120, requestedBy } = {}) {
|
|
16
|
+
return client._request('/api/operator/retrieval/wrapper/symbol-definition', {
|
|
17
|
+
query: {
|
|
18
|
+
symbol_key: symbolKey,
|
|
19
|
+
qualified_name: qualifiedName,
|
|
20
|
+
symbol_name: symbolName,
|
|
21
|
+
project_scope: projectScope,
|
|
22
|
+
include_code: includeCode,
|
|
23
|
+
max_lines: maxLines,
|
|
24
|
+
requested_by: requestedBy,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
getRelatedCode({ symbolKey, qualifiedName, relationshipType, depth = 1, includeCode = false, maxLines = 80, requestedBy } = {}) {
|
|
30
|
+
return client._request('/api/operator/retrieval/wrapper/related-code', {
|
|
31
|
+
query: {
|
|
32
|
+
symbol_key: symbolKey,
|
|
33
|
+
qualified_name: qualifiedName,
|
|
34
|
+
relationship_type: relationshipType,
|
|
35
|
+
depth,
|
|
36
|
+
include_code: includeCode,
|
|
37
|
+
max_lines: maxLines,
|
|
38
|
+
requested_by: requestedBy,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
},
|
|
6
42
|
};
|
|
7
43
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export function createRoadmapReportsDomain(client) {
|
|
2
|
+
return {
|
|
3
|
+
getProjectImplementationRoadmapReport: (projectId) => client._request(`/api/operator/projects/${projectId}/implementation-roadmap/report`),
|
|
4
|
+
downloadProjectImplementationRoadmapReportMarkdown: (projectId) => client._requestText(`/api/operator/projects/${projectId}/markdown-reports/implementation_roadmap/download`),
|
|
5
|
+
};
|
|
6
|
+
}
|