@eng-ai/sdk 2.7.0 → 2.8.0

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 CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to `@eng-ai/sdk` will be documented in this file.
4
4
 
5
+ ## 2.8.0 - 2026-04-09
6
+
7
+ ### Added
8
+
9
+ - External Project Knowledge APIs (v2) in SDK:
10
+ - `getProjectKnowledgeStatus(projectId)`
11
+ - `listProjectKnowledgeIssues(projectId, { onlyOpen?, limit? })`
12
+ - `rebuildProjectKnowledge(projectId, { idempotencyKey? })`
13
+ - Enables API-key integrations to monitor and trigger project knowledge rebuilds directly through SDK.
14
+
5
15
  ## 2.7.0 - 2026-04-09
6
16
 
7
17
  ### Added
package/README.md CHANGED
@@ -81,6 +81,21 @@ 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 knowledgeIssues = await client.listProjectKnowledgeIssues(project.id, {
89
+ onlyOpen: true,
90
+ limit: 10
91
+ });
92
+ await client.rebuildProjectKnowledge(project.id, {
93
+ idempotencyKey: `knowledge-rebuild-${project.id}`
94
+ });
95
+
96
+ console.log(knowledgeStatus.status, knowledgeIssues.length);
97
+ ```
98
+
84
99
  Project documents (tags, filters, upload, update):
85
100
 
86
101
  ```js
@@ -127,6 +142,12 @@ Supported automation plan actions:
127
142
  - `rejectAutomationPlan(projectId, planId, note?, { idempotencyKey? })`
128
143
  - `applyAutomationPlan(projectId, planId, { idempotencyKey? })`
129
144
 
145
+ Supported project knowledge actions:
146
+
147
+ - `getProjectKnowledgeStatus(projectId)`
148
+ - `listProjectKnowledgeIssues(projectId, { onlyOpen?, limit? })`
149
+ - `rebuildProjectKnowledge(projectId, { idempotencyKey? })`
150
+
130
151
  External user settings (API key owner scope):
131
152
 
132
153
  ```js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eng-ai/sdk",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Official JavaScript SDK for ENG-AI External API v2",
5
5
  "type": "module",
6
6
  "main": "./src/client.js",
package/src/client.js CHANGED
@@ -678,6 +678,51 @@ 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 rebuildProjectKnowledge(projectId, options = {}) {
710
+ const normalizedProjectId = this._requireNonEmptyString(projectId, "projectId");
711
+ const headers = {};
712
+ const idempotencyKey = options?.idempotencyKey ?? options?.idempotency_key;
713
+ if (idempotencyKey) {
714
+ headers["Idempotency-Key"] = idempotencyKey;
715
+ }
716
+ return await this._request(
717
+ `/projects/${encodeURIComponent(normalizedProjectId)}/knowledge/rebuild`,
718
+ {
719
+ method: "POST",
720
+ headers,
721
+ body: {},
722
+ }
723
+ );
724
+ }
725
+
681
726
  async setProjectAutonomyMode(projectId, mode, options = {}) {
682
727
  const normalizedProjectId = this._requireNonEmptyString(projectId, "projectId");
683
728
  const normalizedMode = String(mode || "").trim().toLowerCase();