@amigo-ai/platform-sdk 0.29.0 → 0.31.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.mjs CHANGED
@@ -2067,10 +2067,14 @@ var ConversationsResource = class extends WorkspaceScopedResource {
2067
2067
  );
2068
2068
  }
2069
2069
  /**
2070
- * Send a message and receive the agent's response as an SSE stream.
2070
+ * Send a message and receive the agent's response as an SSE byte stream.
2071
2071
  *
2072
- * Returns a `ReadableStream` of SSE bytes. Use `EventSourceParserStream`
2073
- * (from `eventsource-parser/stream`) to parse into typed `TurnStreamEvent`.
2072
+ * Targets the explicit always-SSE endpoint
2073
+ * `POST /v1/{ws}/conversations/{id}/turns/stream`, so the response is
2074
+ * always `text/event-stream` regardless of `Accept` negotiation. Returns
2075
+ * a `ReadableStream` of raw bytes; use `EventSourceParserStream` (from
2076
+ * `eventsource-parser/stream`) to parse into typed `TurnStreamEvent`,
2077
+ * or use the higher-level {@link streamTurn} which hides the parser.
2074
2078
  *
2075
2079
  * @example
2076
2080
  * ```ts
@@ -2086,7 +2090,7 @@ var ConversationsResource = class extends WorkspaceScopedResource {
2086
2090
  */
2087
2091
  async createTurnStream(conversationId, request, options) {
2088
2092
  const result = await this.client.POST(
2089
- "/v1/{workspace_id}/conversations/{conversation_id}/turns",
2093
+ "/v1/{workspace_id}/conversations/{conversation_id}/turns/stream",
2090
2094
  {
2091
2095
  params: {
2092
2096
  path: { workspace_id: this.workspaceId, conversation_id: conversationId },
@@ -2095,7 +2099,6 @@ var ConversationsResource = class extends WorkspaceScopedResource {
2095
2099
  }
2096
2100
  },
2097
2101
  body: request,
2098
- headers: { Accept: "text/event-stream" },
2099
2102
  parseAs: "stream",
2100
2103
  signal: options?.signal
2101
2104
  }