@amigo-ai/platform-sdk 0.29.0 → 0.32.0

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/dist/index.cjs CHANGED
@@ -2175,10 +2175,14 @@ var ConversationsResource = class extends WorkspaceScopedResource {
2175
2175
  );
2176
2176
  }
2177
2177
  /**
2178
- * Send a message and receive the agent's response as an SSE stream.
2178
+ * Send a message and receive the agent's response as an SSE byte stream.
2179
2179
  *
2180
- * Returns a `ReadableStream` of SSE bytes. Use `EventSourceParserStream`
2181
- * (from `eventsource-parser/stream`) to parse into typed `TurnStreamEvent`.
2180
+ * Targets the explicit always-SSE endpoint
2181
+ * `POST /v1/{ws}/conversations/{id}/turns/stream`, so the response is
2182
+ * always `text/event-stream` regardless of `Accept` negotiation. Returns
2183
+ * a `ReadableStream` of raw bytes; use `EventSourceParserStream` (from
2184
+ * `eventsource-parser/stream`) to parse into typed `TurnStreamEvent`,
2185
+ * or use the higher-level {@link streamTurn} which hides the parser.
2182
2186
  *
2183
2187
  * @example
2184
2188
  * ```ts
@@ -2194,7 +2198,7 @@ var ConversationsResource = class extends WorkspaceScopedResource {
2194
2198
  */
2195
2199
  async createTurnStream(conversationId, request, options) {
2196
2200
  const result = await this.client.POST(
2197
- "/v1/{workspace_id}/conversations/{conversation_id}/turns",
2201
+ "/v1/{workspace_id}/conversations/{conversation_id}/turns/stream",
2198
2202
  {
2199
2203
  params: {
2200
2204
  path: { workspace_id: this.workspaceId, conversation_id: conversationId },
@@ -2203,7 +2207,6 @@ var ConversationsResource = class extends WorkspaceScopedResource {
2203
2207
  }
2204
2208
  },
2205
2209
  body: request,
2206
- headers: { Accept: "text/event-stream" },
2207
2210
  parseAs: "stream",
2208
2211
  signal: options?.signal
2209
2212
  }