@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.
@@ -139,6 +139,7 @@ type StreamRequestOptions = RequestOptions & {
139
139
  signal?: AbortSignal;
140
140
  };
141
141
  type AgentStreamRequest = {
142
+ client_submission_id?: string;
142
143
  input?: string;
143
144
  messages?: Array<Record<string, unknown>>;
144
145
  attachment_ids?: string[];
@@ -171,6 +172,7 @@ type StreamResult = {
171
172
  queuePosition?: number | null;
172
173
  };
173
174
  type EmbedStreamRequest = {
175
+ client_submission_id?: string;
174
176
  agent_version_id?: string;
175
177
  input?: string;
176
178
  messages?: Array<Record<string, unknown>>;
@@ -284,6 +286,7 @@ type EmbedThreadMessageScope = {
284
286
  integrationId: string;
285
287
  };
286
288
  type EmbedThreadMessageSubmit = EmbedThreadMessageScope & {
289
+ clientSubmissionId?: string;
287
290
  mode: "queue" | "steer";
288
291
  input: string;
289
292
  attachmentIds?: string[];
@@ -139,6 +139,7 @@ type StreamRequestOptions = RequestOptions & {
139
139
  signal?: AbortSignal;
140
140
  };
141
141
  type AgentStreamRequest = {
142
+ client_submission_id?: string;
142
143
  input?: string;
143
144
  messages?: Array<Record<string, unknown>>;
144
145
  attachment_ids?: string[];
@@ -171,6 +172,7 @@ type StreamResult = {
171
172
  queuePosition?: number | null;
172
173
  };
173
174
  type EmbedStreamRequest = {
175
+ client_submission_id?: string;
174
176
  agent_version_id?: string;
175
177
  input?: string;
176
178
  messages?: Array<Record<string, unknown>>;
@@ -284,6 +286,7 @@ type EmbedThreadMessageScope = {
284
286
  integrationId: string;
285
287
  };
286
288
  type EmbedThreadMessageSubmit = EmbedThreadMessageScope & {
289
+ clientSubmissionId?: string;
287
290
  mode: "queue" | "steer";
288
291
  input: string;
289
292
  attachmentIds?: string[];
package/dist/index.cjs CHANGED
@@ -281,7 +281,7 @@ var AgentsNamespace = class {
281
281
  });
282
282
  }
283
283
  async stream(agentId, payload, onEvent, mode, options = {}) {
284
- const response = await this.http.fetchOrThrow(this.http.url(`/agents/${agentId}/stream`, { mode }), {
284
+ const response = await this.http.fetchOrThrow(this.http.url(`/agents/${agentId}/stream`, { mode, stream_features: "assistant-completion-v1" }), {
285
285
  method: "POST",
286
286
  headers: this.http.streamHeaders(),
287
287
  body: JSON.stringify(payload),
@@ -525,7 +525,7 @@ var EmbedNamespace = class {
525
525
  return this.stream(`/public/embed/agents/${agentId}/runs/${runId}/stream`, payload, onEvent, options);
526
526
  }
527
527
  async stream(path, payload, onEvent, options) {
528
- const response = await this.http.fetchOrThrow(this.http.url(path), {
528
+ const response = await this.http.fetchOrThrow(this.http.url(path, { stream_features: "assistant-completion-v1" }), {
529
529
  method: "POST",
530
530
  headers: this.http.streamHeaders(void 0, options, true),
531
531
  body: JSON.stringify(payload),
@@ -638,6 +638,7 @@ var EmbedNamespace = class {
638
638
  external_session_id: payload.externalSessionId,
639
639
  integration_id: payload.integrationId,
640
640
  runtime_target: payload.runtimeTarget ?? "published",
641
+ client_submission_id: payload.clientSubmissionId,
641
642
  mode: payload.mode,
642
643
  input: payload.input,
643
644
  attachment_ids: payload.attachmentIds ?? [],