@bpmsoftwaresolutions/ai-engine-client 1.0.0-beta.0 → 1.0.0-beta.1
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 +14 -0
- package/package.json +1 -1
- package/src/index.js +63 -0
package/README.md
CHANGED
|
@@ -86,6 +86,20 @@ const client = AIEngineClient.fromEnv();
|
|
|
86
86
|
| `getSymbolDefinition({ symbolName, qualifiedName, ... })` | Symbol/code definition lookup. |
|
|
87
87
|
| `getRelatedCode({ symbolKey, qualifiedName, relationshipType, ... })` | Related code lookup. |
|
|
88
88
|
|
|
89
|
+
### Repo Inventory
|
|
90
|
+
| Method | Description |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `listRepositories({ limit })` | List inventoried repositories. |
|
|
93
|
+
| `getRepository(repositoryId)` | Get repository detail. |
|
|
94
|
+
| `listProjects({ repositoryId, repoKey, limit })` | List inventoried projects. |
|
|
95
|
+
| `getProject(projectId)` | Get project detail. |
|
|
96
|
+
| `listCodeFiles({ repositoryId, projectId, language, pathPrefix, page, pageSize })` | Page through inventoried code files. |
|
|
97
|
+
| `getCodeFile(fileId)` | Get file detail. |
|
|
98
|
+
| `listCodeSymbolsByFile(fileId, { limit })` | List symbols discovered in a file. |
|
|
99
|
+
| `getCodeSymbol(symbolId, { includeCode, maxLines })` | Get symbol detail. |
|
|
100
|
+
| `searchSymbols({ query, projectScope, maxResults })` | Search inventoried symbols. |
|
|
101
|
+
| `getSymbolRelationships(symbolId, { relationshipType, depth })` | Read symbol relationships from the inventory graph. |
|
|
102
|
+
|
|
89
103
|
### Retrieval Management
|
|
90
104
|
| Method | Description |
|
|
91
105
|
|---|---|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -126,6 +126,69 @@ export class AIEngineClient {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
// ─── Repo Inventory ───────────────────────────────────────────────────────
|
|
130
|
+
|
|
131
|
+
async listRepositories({ limit } = {}) {
|
|
132
|
+
return this._request('/api/repo/repositories', {
|
|
133
|
+
query: { limit },
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
async getRepository(repositoryId) {
|
|
138
|
+
return this._request(`/api/repo/repositories/${repositoryId}`);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
async listProjects({ repositoryId, repoKey, limit } = {}) {
|
|
142
|
+
return this._request('/api/repo/projects', {
|
|
143
|
+
query: { repository_id: repositoryId, repo_key: repoKey, limit },
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
async getProject(projectId) {
|
|
148
|
+
return this._request(`/api/repo/projects/${projectId}`);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
async listCodeFiles({ repositoryId, projectId, language, pathPrefix, page = 1, pageSize = 50 } = {}) {
|
|
152
|
+
return this._request('/api/repo/files', {
|
|
153
|
+
query: {
|
|
154
|
+
repository_id: repositoryId,
|
|
155
|
+
project_id: projectId,
|
|
156
|
+
language,
|
|
157
|
+
path_prefix: pathPrefix,
|
|
158
|
+
page,
|
|
159
|
+
page_size: pageSize,
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
async getCodeFile(fileId) {
|
|
165
|
+
return this._request(`/api/repo/files/${fileId}`);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
async listCodeSymbolsByFile(fileId, { limit = 500 } = {}) {
|
|
169
|
+
return this._request(`/api/repo/files/${fileId}/symbols`, {
|
|
170
|
+
query: { limit },
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
async getCodeSymbol(symbolId, { includeCode = false, maxLines = 120 } = {}) {
|
|
175
|
+
return this._request(`/api/repo/symbols/${symbolId}`, {
|
|
176
|
+
query: { include_code: includeCode, max_lines: maxLines },
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
async searchSymbols({ query, projectScope, maxResults = 10 } = {}) {
|
|
181
|
+
return this._request('/api/repo/symbols/search', {
|
|
182
|
+
query: { query, project_scope: projectScope, max_results: maxResults },
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
async getSymbolRelationships(symbolId, { relationshipType, depth = 1 } = {}) {
|
|
187
|
+
return this._request(`/api/repo/symbols/${symbolId}/relationships`, {
|
|
188
|
+
query: { relationship_type: relationshipType, depth },
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
129
192
|
// ─── Retrieval Management ──────────────────────────────────────────────────
|
|
130
193
|
|
|
131
194
|
async getRetrievalStatus() {
|