@arbidocs/sdk 0.4.11 → 0.4.14

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
@@ -4304,6 +4304,7 @@ async function streamSSE(response, callbacks = {}) {
4304
4304
  let metadata = null;
4305
4305
  let usage = null;
4306
4306
  let context = null;
4307
+ let completed = false;
4307
4308
  const eventHandlers = {
4308
4309
  // OpenAI Responses API events (dot-separated names from server)
4309
4310
  "response.created": (raw) => {
@@ -4354,6 +4355,7 @@ async function streamSSE(response, callbacks = {}) {
4354
4355
  },
4355
4356
  "response.completed": (raw) => {
4356
4357
  const data = JSON.parse(raw);
4358
+ completed = true;
4357
4359
  if (data.response?.usage) {
4358
4360
  usage = data.response.usage;
4359
4361
  callbacks.onUsage?.(data.response.usage);
@@ -4467,7 +4469,8 @@ async function streamSSE(response, callbacks = {}) {
4467
4469
  metadata,
4468
4470
  artifacts,
4469
4471
  usage,
4470
- context
4472
+ context,
4473
+ completed
4471
4474
  };
4472
4475
  }
4473
4476
  function formatStreamSummary(result, elapsedTime) {