@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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractHash": "4eafcf792d4e39243e0d8261c45959252f575ff291d3bba9d722d0d172588e22",
2
+ "contractHash": "8bc171524458786bf938b66ec15fe511e9359792c9eee5f2e852f8d00920c679",
3
3
  "contractVersion": "0.3.0",
4
4
  "corpus": "conformance/v1/corpus.json",
5
5
  "generatedBy": "@agents24/sdk-contract",
@@ -15,11 +15,11 @@
15
15
  "reactDom": ">=19 <20"
16
16
  },
17
17
  "@agents24/client": {
18
- "contract": "37437aff006eec5ea404f4259bf2e8cb0ba442ecc5aa72b4d39964530899d58a",
18
+ "contract": "0394b689ce7604b444b11c8792050fae0c1da4233d6b318d22832c3b89516a4a",
19
19
  "runtime": "run-stream.v3"
20
20
  },
21
21
  "@agents24/node": {
22
- "contract": "4eafcf792d4e39243e0d8261c45959252f575ff291d3bba9d722d0d172588e22",
22
+ "contract": "8bc171524458786bf938b66ec15fe511e9359792c9eee5f2e852f8d00920c679",
23
23
  "node": "^22.0.0 || ^24.0.0"
24
24
  },
25
25
  "@agents24/react": {
@@ -27,11 +27,11 @@
27
27
  "react": ">=19 <20"
28
28
  },
29
29
  "@talmudpedia/runtime-sdk": {
30
- "contract": "37437aff006eec5ea404f4259bf2e8cb0ba442ecc5aa72b4d39964530899d58a",
30
+ "contract": "0394b689ce7604b444b11c8792050fae0c1da4233d6b318d22832c3b89516a4a",
31
31
  "protocolOwner": "@agents24/client"
32
32
  },
33
33
  "agents24": {
34
- "contract": "4eafcf792d4e39243e0d8261c45959252f575ff291d3bba9d722d0d172588e22",
34
+ "contract": "8bc171524458786bf938b66ec15fe511e9359792c9eee5f2e852f8d00920c679",
35
35
  "python": ">=3.10"
36
36
  }
37
37
  },
package/dist/bff.cjs CHANGED
@@ -401,6 +401,7 @@ function messageBody(body) {
401
401
  if (mode === "steer" && attachmentIds.length) throw new BffInputError(400, "STEER_TEXT_ONLY", "Steering supports text only.");
402
402
  const requestedModelId = stringValue(body.requestedModelId) || void 0;
403
403
  return {
404
+ clientSubmissionId: stringValue(body.clientSubmissionId),
404
405
  mode,
405
406
  input,
406
407
  attachmentIds,
@@ -505,6 +506,7 @@ function createAgents24BffHandlerWithResolver(options, resolveCustomerIdentity)
505
506
  ...principal.externalSessionId ? { externalSessionId: principal.externalSessionId } : {},
506
507
  integrationId,
507
508
  runtimeTarget,
509
+ clientSubmissionId: stringValue(body.clientSubmissionId),
508
510
  mode: "queue",
509
511
  input,
510
512
  attachmentIds,
@@ -517,6 +519,7 @@ function createAgents24BffHandlerWithResolver(options, resolveCustomerIdentity)
517
519
  ...agentVersionId ? { agent_version_id: agentVersionId } : {},
518
520
  runtime_target: runtimeTarget,
519
521
  ...input ? { input } : {},
522
+ client_submission_id: stringValue(body.clientSubmissionId),
520
523
  attachment_ids: attachmentIds,
521
524
  ...stringValue(body.requestedModelId) ? { requested_model_id: stringValue(body.requestedModelId) } : {},
522
525
  tool_inputs: objectValue(body.toolInputs),
@@ -535,7 +538,9 @@ function createAgents24BffHandlerWithResolver(options, resolveCustomerIdentity)
535
538
  metadata: objectValue(body.metadata),
536
539
  client: objectValue(body.client),
537
540
  cursor: 0
538
- }, (event) => write(event), { signal: request.signal });
541
+ }, (event) => {
542
+ if (event.event !== "assistant.completed" || new URL(request.url).searchParams.get("stream_features")?.split(",").includes("assistant-completion-v1")) return write(event);
543
+ }, { signal: request.signal });
539
544
  }, {
540
545
  "X-Run-ID": admittedRunId,
541
546
  ...admission.thread_id ? { "X-Thread-ID": admission.thread_id } : {}
@@ -554,7 +559,9 @@ function createAgents24BffHandlerWithResolver(options, resolveCustomerIdentity)
554
559
  runtime_target: runtimeTarget,
555
560
  integration_id: integrationId,
556
561
  ...cursor === void 0 ? {} : { cursor: Number(cursor) }
557
- }, (event) => write(event), {
562
+ }, (event) => {
563
+ if (event.event !== "assistant.completed" || new URL(request.url).searchParams.get("stream_features")?.split(",").includes("assistant-completion-v1")) return write(event);
564
+ }, {
558
565
  idempotencyKey,
559
566
  signal: request.signal
560
567
  });
@@ -953,6 +960,7 @@ function createResolvedAgents24BffHandler(options) {
953
960
  ...resolution.principal.externalSessionId ? { externalSessionId: resolution.principal.externalSessionId } : {},
954
961
  integrationId,
955
962
  runtimeTarget,
963
+ clientSubmissionId: stringValue(body.clientSubmissionId),
956
964
  mode: "queue",
957
965
  input: input ?? "",
958
966
  attachmentIds,
@@ -965,6 +973,7 @@ function createResolvedAgents24BffHandler(options) {
965
973
  runtime_target: runtimeTarget,
966
974
  integration_id: integrationId,
967
975
  ...input ? { input } : {},
976
+ client_submission_id: stringValue(body.clientSubmissionId),
968
977
  attachment_ids: attachmentIds,
969
978
  ...stringValue(body.requestedModelId) ? { requested_model_id: stringValue(body.requestedModelId) } : {},
970
979
  tool_inputs: objectValue(body.toolInputs),
@@ -981,7 +990,9 @@ function createResolvedAgents24BffHandler(options) {
981
990
  metadata: objectValue(body.metadata),
982
991
  client: objectValue(body.client),
983
992
  cursor: 0
984
- }, (event) => write(event), { signal: request.signal });
993
+ }, (event) => {
994
+ if (event.event !== "assistant.completed" || new URL(request.url).searchParams.get("stream_features")?.split(",").includes("assistant-completion-v1")) return write(event);
995
+ }, { signal: request.signal });
985
996
  }, {
986
997
  "X-Run-ID": admittedRunId,
987
998
  ...admission.thread_id ? { "X-Thread-ID": admission.thread_id } : {}