@eng-ai/sdk 2.8.7 → 2.8.9

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,33 @@
2
2
 
3
3
  All notable changes to `@eng-ai/sdk` will be documented in this file.
4
4
 
5
+ ## 2.8.9 - 2026-06-26
6
+
7
+ ### Added
8
+
9
+ - Azure OpenAI settings serialization support:
10
+ - `azure_openai_endpoint`
11
+ - `azure_openai_region`
12
+ - `azure_openai_api_version`
13
+ - `getDesktopOrchestrationManifest()` for authenticated desktop orchestration discovery.
14
+
15
+ ## 2.8.8 - 2026-06-25
16
+
17
+ ### Added
18
+
19
+ - Desktop Cloud contract v1 support for private local-context invocations:
20
+ - `desktop_contract_version`
21
+ - `client_context`
22
+ - `privacy`
23
+ - `chat_history`
24
+ - `project_id`
25
+ - `getCapabilities()` for authenticated Desktop capability checks.
26
+ - `validateCredentials()` using authenticated non-mutating External API v2 settings lookup.
27
+
28
+ ### Security
29
+
30
+ - Desktop `privacy.mode="no_persistence"` payloads can be forwarded without dropping required privacy/context fields.
31
+
5
32
  ## 2.8.7 - 2026-04-22
6
33
 
7
34
  ### Added
package/README.md CHANGED
@@ -95,6 +95,37 @@ console.log(sessions.map((item) => item.id));
95
95
  console.log(session.messages.length);
96
96
  ```
97
97
 
98
+ Desktop private local-context invocation:
99
+
100
+ ```js
101
+ const capabilities = await client.getCapabilities();
102
+ if (!capabilities.no_persistence || capabilities.desktop_contract_version < 1) {
103
+ throw new Error("ENG-AI Cloud does not support the Desktop privacy contract");
104
+ }
105
+
106
+ const response = await client.invokeAgent("contract_manager", {
107
+ message: "Analise os trechos locais e crie a tarefa de revisão",
108
+ desktopContractVersion: 1,
109
+ projectId: "project-id",
110
+ clientContext: {
111
+ digest: "sha256-local-context",
112
+ chunks: [
113
+ {
114
+ document_id: "local-doc-id",
115
+ chunk_index: 0,
116
+ text: "Trecho bounded do índice local",
117
+ score: 0.91
118
+ }
119
+ ]
120
+ },
121
+ chatHistory: [{ role: "user", content: "Histórico local bounded" }],
122
+ privacy: { mode: "no_persistence", allow_project_mutations: true },
123
+ idempotencyKey: "desktop-project-mutation-uuid"
124
+ });
125
+
126
+ console.log(response.privacy.persisted); // false
127
+ ```
128
+
98
129
  Task autonomy mode by project:
99
130
 
100
131
  ```js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eng-ai/sdk",
3
- "version": "2.8.7",
3
+ "version": "2.8.9",
4
4
  "description": "Official JavaScript SDK for ENG-AI External API v2",
5
5
  "type": "module",
6
6
  "main": "./src/client.js",
@@ -18,6 +18,7 @@
18
18
  "LICENSE"
19
19
  ],
20
20
  "scripts": {
21
+ "check:contract": "node ./test-contract.mjs",
21
22
  "check:pack": "NPM_CONFIG_CACHE=${NPM_CONFIG_CACHE:-/tmp/engai-npm-cache} npm pack --dry-run"
22
23
  },
23
24
  "keywords": [
package/src/client.js CHANGED
@@ -400,9 +400,17 @@ export class EngAIClient {
400
400
  ? { message: payload }
401
401
  : {
402
402
  message: payload?.message,
403
+ desktop_contract_version:
404
+ payload?.desktopContractVersion ?? payload?.desktop_contract_version,
403
405
  project_id: payload?.projectId ?? payload?.project_id,
404
406
  session_id: payload?.sessionId ?? payload?.session_id,
405
407
  context_digest: payload?.contextDigest ?? payload?.context_digest,
408
+ chat_history: payload?.chatHistory ?? payload?.chat_history,
409
+ client_context: payload?.clientContext ?? payload?.client_context,
410
+ privacy: payload?.privacy,
411
+ attachments: payload?.attachments,
412
+ provider: payload?.provider,
413
+ model: payload?.model,
406
414
  normative_mode:
407
415
  (payload?.normativeMode ?? payload?.normative_mode) ||
408
416
  (payload?.normId ?? payload?.norm_id)
@@ -437,6 +445,18 @@ export class EngAIClient {
437
445
  });
438
446
  }
439
447
 
448
+ async getCapabilities() {
449
+ return await this._request("/sdk/capabilities", {
450
+ method: "GET",
451
+ });
452
+ }
453
+
454
+ async validateCredentials() {
455
+ return await this._request("/settings/llm", {
456
+ method: "GET",
457
+ });
458
+ }
459
+
440
460
  async listSdkSessions(options = {}) {
441
461
  const query = new URLSearchParams();
442
462
  if (options.limit !== undefined) query.set("limit", String(options.limit));
@@ -625,6 +645,10 @@ export class EngAIClient {
625
645
  vertex_location: payload?.vertexLocation ?? payload?.vertex_location,
626
646
  vertex_service_account_json:
627
647
  payload?.vertexServiceAccountJson ?? payload?.vertex_service_account_json,
648
+ azure_openai_endpoint: payload?.azureOpenaiEndpoint ?? payload?.azure_openai_endpoint,
649
+ azure_openai_region: payload?.azureOpenaiRegion ?? payload?.azure_openai_region,
650
+ azure_openai_api_version:
651
+ payload?.azureOpenaiApiVersion ?? payload?.azure_openai_api_version,
628
652
  preferred_timezone: payload?.preferredTimezone ?? payload?.preferred_timezone,
629
653
  };
630
654
 
@@ -640,6 +664,12 @@ export class EngAIClient {
640
664
  });
641
665
  }
642
666
 
667
+ async getDesktopOrchestrationManifest() {
668
+ return await this._request("/desktop/orchestration-manifest", {
669
+ method: "GET",
670
+ });
671
+ }
672
+
643
673
  async setVoiceLiveEnabled(enabled) {
644
674
  return await this._request("/settings/voice-live", {
645
675
  method: "PUT",