@eng-ai/sdk 2.7.0 → 2.8.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/CHANGELOG.md +18 -0
- package/README.md +25 -0
- package/package.json +1 -1
- package/src/client.js +60 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@eng-ai/sdk` will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 2.8.1 - 2026-04-09
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- External Project Knowledge pages API (v2) in SDK:
|
|
10
|
+
- `listProjectKnowledgePages(projectId, { limit? })`
|
|
11
|
+
- Enables external integrations to inspect compiled knowledge pages (`wiki/index/log`) for user-facing observability.
|
|
12
|
+
|
|
13
|
+
## 2.8.0 - 2026-04-09
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- External Project Knowledge APIs (v2) in SDK:
|
|
18
|
+
- `getProjectKnowledgeStatus(projectId)`
|
|
19
|
+
- `listProjectKnowledgeIssues(projectId, { onlyOpen?, limit? })`
|
|
20
|
+
- `rebuildProjectKnowledge(projectId, { idempotencyKey? })`
|
|
21
|
+
- Enables API-key integrations to monitor and trigger project knowledge rebuilds directly through SDK.
|
|
22
|
+
|
|
5
23
|
## 2.7.0 - 2026-04-09
|
|
6
24
|
|
|
7
25
|
### Added
|
package/README.md
CHANGED
|
@@ -81,6 +81,24 @@ const context = await client.getProjectContext(project.id);
|
|
|
81
81
|
console.log(context.autonomous_tasks_mode);
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
+
Project knowledge (status, lint issues, manual rebuild):
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
const knowledgeStatus = await client.getProjectKnowledgeStatus(project.id);
|
|
88
|
+
const knowledgePages = await client.listProjectKnowledgePages(project.id, {
|
|
89
|
+
limit: 20
|
|
90
|
+
});
|
|
91
|
+
const knowledgeIssues = await client.listProjectKnowledgeIssues(project.id, {
|
|
92
|
+
onlyOpen: true,
|
|
93
|
+
limit: 10
|
|
94
|
+
});
|
|
95
|
+
await client.rebuildProjectKnowledge(project.id, {
|
|
96
|
+
idempotencyKey: `knowledge-rebuild-${project.id}`
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
console.log(knowledgeStatus.status, knowledgePages.length, knowledgeIssues.length);
|
|
100
|
+
```
|
|
101
|
+
|
|
84
102
|
Project documents (tags, filters, upload, update):
|
|
85
103
|
|
|
86
104
|
```js
|
|
@@ -127,6 +145,13 @@ Supported automation plan actions:
|
|
|
127
145
|
- `rejectAutomationPlan(projectId, planId, note?, { idempotencyKey? })`
|
|
128
146
|
- `applyAutomationPlan(projectId, planId, { idempotencyKey? })`
|
|
129
147
|
|
|
148
|
+
Supported project knowledge actions:
|
|
149
|
+
|
|
150
|
+
- `getProjectKnowledgeStatus(projectId)`
|
|
151
|
+
- `listProjectKnowledgePages(projectId, { limit? })`
|
|
152
|
+
- `listProjectKnowledgeIssues(projectId, { onlyOpen?, limit? })`
|
|
153
|
+
- `rebuildProjectKnowledge(projectId, { idempotencyKey? })`
|
|
154
|
+
|
|
130
155
|
External user settings (API key owner scope):
|
|
131
156
|
|
|
132
157
|
```js
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -678,6 +678,66 @@ export class EngAIClient {
|
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
|
|
681
|
+
async getProjectKnowledgeStatus(projectId) {
|
|
682
|
+
const normalizedProjectId = this._requireNonEmptyString(projectId, "projectId");
|
|
683
|
+
return await this._request(
|
|
684
|
+
`/projects/${encodeURIComponent(normalizedProjectId)}/knowledge/status`,
|
|
685
|
+
{
|
|
686
|
+
method: "GET",
|
|
687
|
+
}
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
async listProjectKnowledgeIssues(projectId, options = {}) {
|
|
692
|
+
const normalizedProjectId = this._requireNonEmptyString(projectId, "projectId");
|
|
693
|
+
const query = new URLSearchParams();
|
|
694
|
+
if (options.onlyOpen !== undefined) {
|
|
695
|
+
query.set("only_open", String(!!options.onlyOpen));
|
|
696
|
+
}
|
|
697
|
+
if (options.limit !== undefined && options.limit !== null) {
|
|
698
|
+
query.set("limit", String(options.limit));
|
|
699
|
+
}
|
|
700
|
+
const suffix = query.toString() ? `?${query.toString()}` : "";
|
|
701
|
+
return await this._request(
|
|
702
|
+
`/projects/${encodeURIComponent(normalizedProjectId)}/knowledge/issues${suffix}`,
|
|
703
|
+
{
|
|
704
|
+
method: "GET",
|
|
705
|
+
}
|
|
706
|
+
);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
async listProjectKnowledgePages(projectId, options = {}) {
|
|
710
|
+
const normalizedProjectId = this._requireNonEmptyString(projectId, "projectId");
|
|
711
|
+
const query = new URLSearchParams();
|
|
712
|
+
if (options.limit !== undefined && options.limit !== null) {
|
|
713
|
+
query.set("limit", String(options.limit));
|
|
714
|
+
}
|
|
715
|
+
const suffix = query.toString() ? `?${query.toString()}` : "";
|
|
716
|
+
return await this._request(
|
|
717
|
+
`/projects/${encodeURIComponent(normalizedProjectId)}/knowledge/pages${suffix}`,
|
|
718
|
+
{
|
|
719
|
+
method: "GET",
|
|
720
|
+
}
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
async rebuildProjectKnowledge(projectId, options = {}) {
|
|
725
|
+
const normalizedProjectId = this._requireNonEmptyString(projectId, "projectId");
|
|
726
|
+
const headers = {};
|
|
727
|
+
const idempotencyKey = options?.idempotencyKey ?? options?.idempotency_key;
|
|
728
|
+
if (idempotencyKey) {
|
|
729
|
+
headers["Idempotency-Key"] = idempotencyKey;
|
|
730
|
+
}
|
|
731
|
+
return await this._request(
|
|
732
|
+
`/projects/${encodeURIComponent(normalizedProjectId)}/knowledge/rebuild`,
|
|
733
|
+
{
|
|
734
|
+
method: "POST",
|
|
735
|
+
headers,
|
|
736
|
+
body: {},
|
|
737
|
+
}
|
|
738
|
+
);
|
|
739
|
+
}
|
|
740
|
+
|
|
681
741
|
async setProjectAutonomyMode(projectId, mode, options = {}) {
|
|
682
742
|
const normalizedProjectId = this._requireNonEmptyString(projectId, "projectId");
|
|
683
743
|
const normalizedMode = String(mode || "").trim().toLowerCase();
|