@agents24/node 0.5.18 → 0.5.19

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractHash": "39792de00fbe302638c6304df42bd350e3a953ed030cd0cbd8a844411a386e83",
2
+ "contractHash": "fd1cf185e985009da193ee0155964976b70aef6888d8bb545eec6732fc57909c",
3
3
  "contractVersion": "0.3.0",
4
4
  "corpus": "conformance/v1/corpus.json",
5
5
  "generatedBy": "@agents24/sdk-contract",
@@ -19,7 +19,7 @@
19
19
  "runtime": "run-stream.v3"
20
20
  },
21
21
  "@agents24/node": {
22
- "contract": "39792de00fbe302638c6304df42bd350e3a953ed030cd0cbd8a844411a386e83",
22
+ "contract": "fd1cf185e985009da193ee0155964976b70aef6888d8bb545eec6732fc57909c",
23
23
  "node": "^22.0.0 || ^24.0.0"
24
24
  },
25
25
  "@agents24/react": {
@@ -31,7 +31,7 @@
31
31
  "protocolOwner": "@agents24/client"
32
32
  },
33
33
  "agents24": {
34
- "contract": "39792de00fbe302638c6304df42bd350e3a953ed030cd0cbd8a844411a386e83",
34
+ "contract": "fd1cf185e985009da193ee0155964976b70aef6888d8bb545eec6732fc57909c",
35
35
  "python": ">=3.10"
36
36
  }
37
37
  },
package/dist/index.cjs CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  var crypto = require('crypto');
4
4
  var protocol = require('@agents24/client/protocol');
5
+ var client = require('@agents24/client');
5
6
 
6
7
  // src/http.ts
7
8
 
@@ -511,8 +512,6 @@ var ClientSessionsNamespace = class {
511
512
  );
512
513
  }
513
514
  };
514
-
515
- // src/embed.ts
516
515
  var EmbedNamespace = class {
517
516
  constructor(http) {
518
517
  this.http = http;
@@ -848,7 +847,7 @@ var EmbedNamespace = class {
848
847
  if (options.threadId) form.set("thread_id", options.threadId);
849
848
  if (options.runtimeTarget) form.set("runtime_target", options.runtimeTarget);
850
849
  if (options.integrationId) form.set("integration_id", options.integrationId);
851
- for (const file of options.files) form.append("files", file, file.name);
850
+ for (const file of options.files) form.append("files", file.slice(0, file.size, client.normalizeAttachmentMimeType(file.type, file.name)), file.name);
852
851
  const response = await this.http.fetchOrThrow(this.http.url(`/public/embed/agents/${agentId}/attachments/upload`), {
853
852
  method: "POST",
854
853
  headers: this.http.multipartHeaders(void 0, { idempotencyKey: options.idempotencyKey }, true),