@eng-ai/sdk 2.0.0 → 2.0.2
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 +42 -0
- package/LICENSE +21 -0
- package/README.md +6 -0
- package/package.json +5 -3
- package/src/client.js +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@eng-ai/sdk` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## 2.0.2 - 2026-04-05
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- JavaScript SDK default `baseUrl` updated:
|
|
10
|
+
- from `https://app.eng-ai.com/api/v2`
|
|
11
|
+
- to `https://api.eng-ai.com/api/v2`
|
|
12
|
+
- Python SDK default `base_url` aligned to `https://api.eng-ai.com/api/v2`.
|
|
13
|
+
|
|
14
|
+
## 2.0.1 - 2026-04-05
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- JavaScript SDK default `baseUrl` updated from local development URL to production endpoint:
|
|
19
|
+
- from `http://localhost:8000/api/v2`
|
|
20
|
+
- to `https://app.eng-ai.com/api/v2`
|
|
21
|
+
- Python SDK default `base_url` aligned to `https://app.eng-ai.com/api/v2`.
|
|
22
|
+
- Base URL normalization added (trailing slash is removed automatically).
|
|
23
|
+
|
|
24
|
+
## 2.0.0 - 2026-04-05
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Initial public release of `@eng-ai/sdk` on npm.
|
|
29
|
+
- External API v2 support for agent invocation in `POST /api/v2/sdk/agents/{agent_id}/invoke`.
|
|
30
|
+
- Request support for:
|
|
31
|
+
- `message`
|
|
32
|
+
- `project_id`
|
|
33
|
+
- `session_id`
|
|
34
|
+
- `context_digest`
|
|
35
|
+
- `normative_mode`
|
|
36
|
+
- `norm_id` (`auto` or explicit supported norm ID)
|
|
37
|
+
- Optional idempotency header support (`Idempotency-Key`).
|
|
38
|
+
- Normative RAG compatibility with citations payloads from SDK v2 responses.
|
|
39
|
+
|
|
40
|
+
### Security
|
|
41
|
+
|
|
42
|
+
- Package contains only SDK client artifacts (`src`, docs, license) and does not ship backend/core code.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ENG-AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -25,8 +25,14 @@ console.log(response.result.content);
|
|
|
25
25
|
console.log(response.normative?.citations ?? []);
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
Default base URL: `https://api.eng-ai.com/api/v2`.
|
|
29
|
+
|
|
28
30
|
## Security Notes
|
|
29
31
|
|
|
30
32
|
- Use your ENG-AI API key only in trusted server environments.
|
|
31
33
|
- Do not ship secrets in frontend bundles.
|
|
32
34
|
- Keep idempotency enabled for mutation-heavy integrations.
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eng-ai/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Official JavaScript SDK for ENG-AI External API v2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/client.js",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"src",
|
|
12
|
-
"README.md"
|
|
12
|
+
"README.md",
|
|
13
|
+
"CHANGELOG.md",
|
|
14
|
+
"LICENSE"
|
|
13
15
|
],
|
|
14
16
|
"scripts": {
|
|
15
17
|
"check:pack": "NPM_CONFIG_CACHE=${NPM_CONFIG_CACHE:-/tmp/engai-npm-cache} npm pack --dry-run"
|
|
@@ -22,7 +24,7 @@
|
|
|
22
24
|
"ai"
|
|
23
25
|
],
|
|
24
26
|
"author": "ENG-AI",
|
|
25
|
-
"license": "
|
|
27
|
+
"license": "MIT",
|
|
26
28
|
"publishConfig": {
|
|
27
29
|
"access": "public"
|
|
28
30
|
},
|
package/src/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class EngAIClient {
|
|
2
|
-
constructor(apiKey, baseUrl = "
|
|
2
|
+
constructor(apiKey, baseUrl = "https://api.eng-ai.com/api/v2") {
|
|
3
3
|
this.apiKey = apiKey;
|
|
4
|
-
this.baseUrl = baseUrl;
|
|
4
|
+
this.baseUrl = String(baseUrl || "").replace(/\/+$/, "");
|
|
5
5
|
this.headers = {
|
|
6
6
|
"X-API-Key": this.apiKey,
|
|
7
7
|
"Content-Type": "application/json",
|