@agents24/node 0.5.15 → 0.5.17
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 +5 -5
- package/dist/bff.cjs +14 -3
- package/dist/bff.cjs.map +1 -1
- package/dist/bff.d.cts +1 -1
- package/dist/bff.d.ts +1 -1
- package/dist/bff.js +14 -3
- package/dist/bff.js.map +1 -1
- package/dist/{client-DDOnbovv.d.cts → client-ChHref1j.d.cts} +3 -0
- package/dist/{client-DDOnbovv.d.ts → client-ChHref1j.d.ts} +3 -0
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/types/bff.d.ts.map +1 -1
- package/dist/types/embed.d.ts.map +1 -1
- package/dist/types/types.d.ts +3 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/bff.d.cts
CHANGED
package/dist/bff.d.ts
CHANGED
package/dist/bff.js
CHANGED
|
@@ -399,6 +399,7 @@ function messageBody(body) {
|
|
|
399
399
|
if (mode === "steer" && attachmentIds.length) throw new BffInputError(400, "STEER_TEXT_ONLY", "Steering supports text only.");
|
|
400
400
|
const requestedModelId = stringValue(body.requestedModelId) || void 0;
|
|
401
401
|
return {
|
|
402
|
+
clientSubmissionId: stringValue(body.clientSubmissionId),
|
|
402
403
|
mode,
|
|
403
404
|
input,
|
|
404
405
|
attachmentIds,
|
|
@@ -503,6 +504,7 @@ function createAgents24BffHandlerWithResolver(options, resolveCustomerIdentity)
|
|
|
503
504
|
...principal.externalSessionId ? { externalSessionId: principal.externalSessionId } : {},
|
|
504
505
|
integrationId,
|
|
505
506
|
runtimeTarget,
|
|
507
|
+
clientSubmissionId: stringValue(body.clientSubmissionId),
|
|
506
508
|
mode: "queue",
|
|
507
509
|
input,
|
|
508
510
|
attachmentIds,
|
|
@@ -515,6 +517,7 @@ function createAgents24BffHandlerWithResolver(options, resolveCustomerIdentity)
|
|
|
515
517
|
...agentVersionId ? { agent_version_id: agentVersionId } : {},
|
|
516
518
|
runtime_target: runtimeTarget,
|
|
517
519
|
...input ? { input } : {},
|
|
520
|
+
client_submission_id: stringValue(body.clientSubmissionId),
|
|
518
521
|
attachment_ids: attachmentIds,
|
|
519
522
|
...stringValue(body.requestedModelId) ? { requested_model_id: stringValue(body.requestedModelId) } : {},
|
|
520
523
|
tool_inputs: objectValue(body.toolInputs),
|
|
@@ -533,7 +536,9 @@ function createAgents24BffHandlerWithResolver(options, resolveCustomerIdentity)
|
|
|
533
536
|
metadata: objectValue(body.metadata),
|
|
534
537
|
client: objectValue(body.client),
|
|
535
538
|
cursor: 0
|
|
536
|
-
}, (event) =>
|
|
539
|
+
}, (event) => {
|
|
540
|
+
if (event.event !== "assistant.completed" || new URL(request.url).searchParams.get("stream_features")?.split(",").includes("assistant-completion-v1")) return write(event);
|
|
541
|
+
}, { signal: request.signal });
|
|
537
542
|
}, {
|
|
538
543
|
"X-Run-ID": admittedRunId,
|
|
539
544
|
...admission.thread_id ? { "X-Thread-ID": admission.thread_id } : {}
|
|
@@ -552,7 +557,9 @@ function createAgents24BffHandlerWithResolver(options, resolveCustomerIdentity)
|
|
|
552
557
|
runtime_target: runtimeTarget,
|
|
553
558
|
integration_id: integrationId,
|
|
554
559
|
...cursor === void 0 ? {} : { cursor: Number(cursor) }
|
|
555
|
-
}, (event) =>
|
|
560
|
+
}, (event) => {
|
|
561
|
+
if (event.event !== "assistant.completed" || new URL(request.url).searchParams.get("stream_features")?.split(",").includes("assistant-completion-v1")) return write(event);
|
|
562
|
+
}, {
|
|
556
563
|
idempotencyKey,
|
|
557
564
|
signal: request.signal
|
|
558
565
|
});
|
|
@@ -951,6 +958,7 @@ function createResolvedAgents24BffHandler(options) {
|
|
|
951
958
|
...resolution.principal.externalSessionId ? { externalSessionId: resolution.principal.externalSessionId } : {},
|
|
952
959
|
integrationId,
|
|
953
960
|
runtimeTarget,
|
|
961
|
+
clientSubmissionId: stringValue(body.clientSubmissionId),
|
|
954
962
|
mode: "queue",
|
|
955
963
|
input: input ?? "",
|
|
956
964
|
attachmentIds,
|
|
@@ -963,6 +971,7 @@ function createResolvedAgents24BffHandler(options) {
|
|
|
963
971
|
runtime_target: runtimeTarget,
|
|
964
972
|
integration_id: integrationId,
|
|
965
973
|
...input ? { input } : {},
|
|
974
|
+
client_submission_id: stringValue(body.clientSubmissionId),
|
|
966
975
|
attachment_ids: attachmentIds,
|
|
967
976
|
...stringValue(body.requestedModelId) ? { requested_model_id: stringValue(body.requestedModelId) } : {},
|
|
968
977
|
tool_inputs: objectValue(body.toolInputs),
|
|
@@ -979,7 +988,9 @@ function createResolvedAgents24BffHandler(options) {
|
|
|
979
988
|
metadata: objectValue(body.metadata),
|
|
980
989
|
client: objectValue(body.client),
|
|
981
990
|
cursor: 0
|
|
982
|
-
}, (event) =>
|
|
991
|
+
}, (event) => {
|
|
992
|
+
if (event.event !== "assistant.completed" || new URL(request.url).searchParams.get("stream_features")?.split(",").includes("assistant-completion-v1")) return write(event);
|
|
993
|
+
}, { signal: request.signal });
|
|
983
994
|
}, {
|
|
984
995
|
"X-Run-ID": admittedRunId,
|
|
985
996
|
...admission.thread_id ? { "X-Thread-ID": admission.thread_id } : {}
|