@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.
- package/compatibility.json +3 -3
- package/dist/index.cjs +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/types/embed.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'crypto';
|
|
2
2
|
import { createSseParser, parseObservationControl, parseRuntimeSsePayload, parseThreadSummarySsePayload } from '@agents24/client/protocol';
|
|
3
3
|
export { CONTRACT_HASH, RUNTIME_PROTOCOL_VERSION, THREAD_SUMMARY_PROTOCOL_VERSION, compressionFromContextWindow, createContextWindowTracker, mergeContextWindow, mergeContextWindowUpdate, normalizeContextCompression, normalizeContextWindow, parseRuntimeEvent, parseRuntimeSsePayload, parseThreadSummarySsePayload, validateResponseBlock, validateRuntimeEvent, validateThreadSummaryEvent } from '@agents24/client/protocol';
|
|
4
|
+
import { normalizeAttachmentMimeType } from '@agents24/client';
|
|
4
5
|
|
|
5
6
|
// src/http.ts
|
|
6
7
|
|
|
@@ -510,8 +511,6 @@ var ClientSessionsNamespace = class {
|
|
|
510
511
|
);
|
|
511
512
|
}
|
|
512
513
|
};
|
|
513
|
-
|
|
514
|
-
// src/embed.ts
|
|
515
514
|
var EmbedNamespace = class {
|
|
516
515
|
constructor(http) {
|
|
517
516
|
this.http = http;
|
|
@@ -847,7 +846,7 @@ var EmbedNamespace = class {
|
|
|
847
846
|
if (options.threadId) form.set("thread_id", options.threadId);
|
|
848
847
|
if (options.runtimeTarget) form.set("runtime_target", options.runtimeTarget);
|
|
849
848
|
if (options.integrationId) form.set("integration_id", options.integrationId);
|
|
850
|
-
for (const file of options.files) form.append("files", file, file.name);
|
|
849
|
+
for (const file of options.files) form.append("files", file.slice(0, file.size, normalizeAttachmentMimeType(file.type, file.name)), file.name);
|
|
851
850
|
const response = await this.http.fetchOrThrow(this.http.url(`/public/embed/agents/${agentId}/attachments/upload`), {
|
|
852
851
|
method: "POST",
|
|
853
852
|
headers: this.http.multipartHeaders(void 0, { idempotencyKey: options.idempotencyKey }, true),
|