@ai-matrx/api 0.1.20 → 0.1.21

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.
Files changed (130) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/account.d.cts +1 -1
  3. package/dist/account.d.ts +1 -1
  4. package/dist/agents.cjs +12 -12
  5. package/dist/agents.d.cts +1 -1
  6. package/dist/agents.d.ts +1 -1
  7. package/dist/agents.js +2 -2
  8. package/dist/ai.cjs +3 -3
  9. package/dist/ai.d.cts +1 -1
  10. package/dist/ai.d.ts +1 -1
  11. package/dist/ai.js +2 -2
  12. package/dist/apps.cjs +6 -6
  13. package/dist/apps.d.cts +1 -1
  14. package/dist/apps.d.ts +1 -1
  15. package/dist/apps.js +2 -2
  16. package/dist/architecture.cjs +11 -11
  17. package/dist/architecture.d.cts +1 -1
  18. package/dist/architecture.d.ts +1 -1
  19. package/dist/architecture.js +2 -2
  20. package/dist/audio.cjs +5 -5
  21. package/dist/audio.d.cts +1 -1
  22. package/dist/audio.d.ts +1 -1
  23. package/dist/audio.js +2 -2
  24. package/dist/chat.cjs +12 -12
  25. package/dist/chat.d.cts +1 -1
  26. package/dist/chat.d.ts +1 -1
  27. package/dist/chat.js +2 -2
  28. package/dist/{chunk-PKYPPATQ.cjs → chunk-2SXAAKGV.cjs} +45 -100
  29. package/dist/{chunk-JRPLPAIX.js → chunk-ER7WV43R.js} +4 -88
  30. package/dist/chunk-FNIYADWI.cjs +59 -0
  31. package/dist/{chunk-PIPE5OML.js → chunk-KIEAFMKB.js} +46 -100
  32. package/dist/{chunk-EV7AXV2X.cjs → chunk-SME66TWP.cjs} +7 -100
  33. package/dist/chunk-YTEOFGFC.js +57 -0
  34. package/dist/code.cjs +7 -7
  35. package/dist/code.d.cts +1 -1
  36. package/dist/code.d.ts +1 -1
  37. package/dist/code.js +2 -2
  38. package/dist/commerce.d.cts +1 -1
  39. package/dist/commerce.d.ts +1 -1
  40. package/dist/communications.cjs +5 -5
  41. package/dist/communications.d.cts +1 -1
  42. package/dist/communications.d.ts +1 -1
  43. package/dist/communications.js +2 -2
  44. package/dist/computer.cjs +5 -5
  45. package/dist/computer.d.cts +1 -1
  46. package/dist/computer.d.ts +1 -1
  47. package/dist/computer.js +2 -2
  48. package/dist/content.cjs +5 -5
  49. package/dist/content.d.cts +1 -1
  50. package/dist/content.d.ts +1 -1
  51. package/dist/content.js +2 -2
  52. package/dist/crm.cjs +3 -3
  53. package/dist/crm.d.cts +1 -1
  54. package/dist/crm.d.ts +1 -1
  55. package/dist/crm.js +2 -2
  56. package/dist/data.cjs +4 -4
  57. package/dist/data.d.cts +1 -1
  58. package/dist/data.d.ts +1 -1
  59. package/dist/data.js +2 -2
  60. package/dist/education.cjs +5 -5
  61. package/dist/education.d.cts +1 -1
  62. package/dist/education.d.ts +1 -1
  63. package/dist/education.js +2 -2
  64. package/dist/files.cjs +21 -21
  65. package/dist/files.d.cts +1 -1
  66. package/dist/files.d.ts +1 -1
  67. package/dist/files.js +2 -2
  68. package/dist/human-resources.d.cts +1 -1
  69. package/dist/human-resources.d.ts +1 -1
  70. package/dist/{index-YFW4xNti.d.cts → index-BXLIDtlM.d.cts} +1 -1
  71. package/dist/{index-YFW4xNti.d.ts → index-BXLIDtlM.d.ts} +1 -1
  72. package/dist/index.cjs +86 -129
  73. package/dist/index.d.cts +7 -122
  74. package/dist/index.d.ts +7 -122
  75. package/dist/index.js +8 -15
  76. package/dist/integrations.cjs +4 -4
  77. package/dist/integrations.d.cts +1 -1
  78. package/dist/integrations.d.ts +1 -1
  79. package/dist/integrations.js +2 -2
  80. package/dist/intelligence.cjs +8 -8
  81. package/dist/intelligence.d.cts +2 -2
  82. package/dist/intelligence.d.ts +2 -2
  83. package/dist/intelligence.js +3 -3
  84. package/dist/{keys.generated-DPvmbTFD.d.cts → keys.generated-DE-t9kzx.d.cts} +2 -2
  85. package/dist/{keys.generated-DPvmbTFD.d.ts → keys.generated-DE-t9kzx.d.ts} +2 -2
  86. package/dist/knowledge.cjs +43 -43
  87. package/dist/knowledge.d.cts +1 -1
  88. package/dist/knowledge.d.ts +1 -1
  89. package/dist/knowledge.js +2 -2
  90. package/dist/legal.cjs +7 -7
  91. package/dist/legal.d.cts +1 -1
  92. package/dist/legal.d.ts +1 -1
  93. package/dist/legal.js +2 -2
  94. package/dist/marketing.cjs +77 -77
  95. package/dist/marketing.d.cts +1 -1
  96. package/dist/marketing.d.ts +1 -1
  97. package/dist/marketing.js +2 -2
  98. package/dist/masterwork.cjs +33 -33
  99. package/dist/masterwork.d.cts +1 -1
  100. package/dist/masterwork.d.ts +1 -1
  101. package/dist/masterwork.js +2 -2
  102. package/dist/media.cjs +12 -12
  103. package/dist/media.d.cts +1 -1
  104. package/dist/media.d.ts +1 -1
  105. package/dist/media.js +2 -2
  106. package/dist/net.cjs +20 -19
  107. package/dist/net.js +2 -1
  108. package/dist/platform.cjs +4 -4
  109. package/dist/platform.d.cts +1 -1
  110. package/dist/platform.d.ts +1 -1
  111. package/dist/platform.js +2 -2
  112. package/dist/publish.cjs +8 -8
  113. package/dist/publish.d.cts +1 -1
  114. package/dist/publish.d.ts +1 -1
  115. package/dist/publish.js +2 -2
  116. package/dist/stream.cjs +11 -11
  117. package/dist/stream.d.cts +1 -1
  118. package/dist/stream.d.ts +1 -1
  119. package/dist/stream.js +2 -2
  120. package/dist/types.d.cts +2 -2
  121. package/dist/types.d.ts +2 -2
  122. package/dist/web.cjs +27 -27
  123. package/dist/web.d.cts +1 -1
  124. package/dist/web.d.ts +1 -1
  125. package/dist/web.js +2 -2
  126. package/dist/workflows.cjs +14 -14
  127. package/dist/workflows.d.cts +1 -1
  128. package/dist/workflows.d.ts +1 -1
  129. package/dist/workflows.js +2 -2
  130. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -1,8 +1,9 @@
1
1
  'use strict';
2
2
 
3
+ var chunkFNIYADWI_cjs = require('./chunk-FNIYADWI.cjs');
3
4
  var chunkMVXD6WI6_cjs = require('./chunk-MVXD6WI6.cjs');
4
- var chunkEV7AXV2X_cjs = require('./chunk-EV7AXV2X.cjs');
5
- var chunkPKYPPATQ_cjs = require('./chunk-PKYPPATQ.cjs');
5
+ var chunkSME66TWP_cjs = require('./chunk-SME66TWP.cjs');
6
+ var chunk2SXAAKGV_cjs = require('./chunk-2SXAAKGV.cjs');
6
7
  var format = require('@ai-matrx/kit/format');
7
8
 
8
9
  // src/core/call.ts
@@ -43,7 +44,7 @@ function buildMatrxRequestBody(body, scope) {
43
44
  }
44
45
  const bodyOrganizationId = base.organization_id;
45
46
  if (scope.organization_id !== void 0 && bodyOrganizationId !== void 0 && (typeof bodyOrganizationId !== "string" || bodyOrganizationId.trim() !== scope.organization_id)) {
46
- throw new chunkEV7AXV2X_cjs.OrganizationContextError(
47
+ throw new chunkSME66TWP_cjs.OrganizationContextError(
47
48
  "organization_context_mismatch",
48
49
  "Request body organization_id must match the request context organization."
49
50
  );
@@ -115,14 +116,14 @@ function parseMatrxNdjsonResponse(response, signal, hooks = {}) {
115
116
  };
116
117
  async function* events() {
117
118
  if (!response.body) {
118
- throw new chunkEV7AXV2X_cjs.BackendApiError({
119
+ throw new chunkSME66TWP_cjs.BackendApiError({
119
120
  code: "internal_error",
120
121
  detail: "Response has no body",
121
122
  userMessage: "No response received from server"
122
123
  });
123
124
  }
124
125
  try {
125
- for await (const envelope of chunkEV7AXV2X_cjs.readMatrxNdjsonStream(response.body, {
126
+ for await (const envelope of chunkSME66TWP_cjs.readMatrxNdjsonStream(response.body, {
126
127
  ...signal ? { signal } : {},
127
128
  ...hooks.onMalformedLine ? { onMalformedLine: hooks.onMalformedLine } : {},
128
129
  ...hooks.onUnknownEnvelope ? { onUnknownEnvelope: hooks.onUnknownEnvelope } : {}
@@ -134,7 +135,7 @@ function parseMatrxNdjsonResponse(response, signal, hooks = {}) {
134
135
  if (signal?.aborted || error instanceof Error && error.name === "AbortError") {
135
136
  return;
136
137
  }
137
- const transportError = error instanceof chunkEV7AXV2X_cjs.BackendApiError ? error : new chunkEV7AXV2X_cjs.StreamTransportError({
138
+ const transportError = error instanceof chunkSME66TWP_cjs.BackendApiError ? error : new chunkSME66TWP_cjs.StreamTransportError({
138
139
  detail: error instanceof Error ? error.message : "The response stream ended unexpectedly.",
139
140
  details: error,
140
141
  ...ids.requestId ? { requestId: ids.requestId } : {}
@@ -151,7 +152,7 @@ async function httpErrorFrom(response) {
151
152
  const serverDetail = await response.json().catch(() => void 0);
152
153
  return {
153
154
  type: response.status >= 400 && response.status < 500 ? "validation_error" : "http_error",
154
- message: chunkEV7AXV2X_cjs.extractMatrxErrorMessage(serverDetail) ?? bareStatusSentence(response.status),
155
+ message: chunkSME66TWP_cjs.extractMatrxErrorMessage(serverDetail) ?? bareStatusSentence(response.status),
155
156
  status: response.status,
156
157
  serverDetail
157
158
  };
@@ -159,7 +160,7 @@ async function httpErrorFrom(response) {
159
160
  async function executeMatrxCall(request, hooks = {}) {
160
161
  const upper = request.method.toUpperCase();
161
162
  const sendsBody = request.stream || upper !== "GET" && upper !== "HEAD";
162
- const { response } = await chunkEV7AXV2X_cjs.sendOnWire({
163
+ const { response } = await chunkSME66TWP_cjs.sendOnWire({
163
164
  url: request.url,
164
165
  method: request.method,
165
166
  headers: request.headers,
@@ -167,8 +168,7 @@ async function executeMatrxCall(request, hooks = {}) {
167
168
  ...request.signal ? { signal: request.signal } : {},
168
169
  connectTimeoutMs: request.connectTimeoutMs ?? DEFAULT_CONNECT_TIMEOUT_MS,
169
170
  totalTimeoutMs: request.stream ? null : request.totalTimeoutMs === void 0 ? DEFAULT_JSON_TOTAL_TIMEOUT_MS : request.totalTimeoutMs,
170
- ...request.stream ? { stream: true } : {},
171
- ...hooks.onProtocolDowngrade ? { onProtocolDowngrade: hooks.onProtocolDowngrade } : {}
171
+ ...request.stream ? { stream: true } : {}
172
172
  });
173
173
  const requestId = response.headers.get("X-Request-ID");
174
174
  const conversationId = response.headers.get("X-Conversation-ID");
@@ -210,11 +210,11 @@ async function sendMatrxRequest(url, init = {}, options = {}) {
210
210
  headers[name] = value;
211
211
  });
212
212
  const fetchOptions = {};
213
- for (const key of chunkEV7AXV2X_cjs.WIRE_FETCH_OPTION_KEYS) {
213
+ for (const key of chunkSME66TWP_cjs.WIRE_FETCH_OPTION_KEYS) {
214
214
  if (init[key] !== void 0) fetchOptions[key] = init[key];
215
215
  }
216
216
  try {
217
- const { response } = await chunkEV7AXV2X_cjs.sendOnWire({
217
+ const { response } = await chunkSME66TWP_cjs.sendOnWire({
218
218
  url,
219
219
  method: init.method ?? "GET",
220
220
  fetchOptions,
@@ -229,25 +229,25 @@ async function sendMatrxRequest(url, init = {}, options = {}) {
229
229
  });
230
230
  return response;
231
231
  } catch (error) {
232
- if (chunkPKYPPATQ_cjs.isNetError(error) && error.code === "aborted") {
232
+ if (chunk2SXAAKGV_cjs.isNetError(error) && error.code === "aborted") {
233
233
  throw callerSignal?.reason instanceof Error ? callerSignal.reason : new DOMException("The request was cancelled.", "AbortError");
234
234
  }
235
- if (options.timeoutMs !== void 0 && chunkPKYPPATQ_cjs.isNetError(error) && (error.code === "connect-timeout" || error.code === "total-timeout")) {
236
- throw new chunkEV7AXV2X_cjs.BackendApiError({
235
+ if (options.timeoutMs !== void 0 && chunk2SXAAKGV_cjs.isNetError(error) && (error.code === "connect-timeout" || error.code === "total-timeout")) {
236
+ throw new chunkSME66TWP_cjs.BackendApiError({
237
237
  code: "request_timeout",
238
238
  detail: `${init.method ?? "GET"} ${url} exceeded ${options.timeoutMs}ms`,
239
239
  userMessage: "The request timed out \u2014 please retry.",
240
240
  status: 504
241
241
  });
242
242
  }
243
- if (chunkPKYPPATQ_cjs.isNetError(error) && (error.code === "network" || error.code === "offline")) {
243
+ if (chunk2SXAAKGV_cjs.isNetError(error) && (error.code === "network" || error.code === "offline")) {
244
244
  throw error.cause instanceof Error ? error.cause : error;
245
245
  }
246
246
  throw error;
247
247
  }
248
248
  }
249
249
  async function readMatrxJsonResponse(response) {
250
- if (!response.ok) throw await chunkEV7AXV2X_cjs.parseHttpError(response);
250
+ if (!response.ok) throw await chunkSME66TWP_cjs.parseHttpError(response);
251
251
  if (response.status === 204) return null;
252
252
  return await response.json();
253
253
  }
@@ -257,7 +257,7 @@ function classifyStatus(status) {
257
257
  return status >= 400 && status < 500 ? "validation_error" : "http_error";
258
258
  }
259
259
  function normalizeMatrxError(err) {
260
- if (err instanceof chunkEV7AXV2X_cjs.OrganizationContextError) {
260
+ if (err instanceof chunkSME66TWP_cjs.OrganizationContextError) {
261
261
  return {
262
262
  type: "validation_error",
263
263
  message: err.message,
@@ -269,7 +269,7 @@ function normalizeMatrxError(err) {
269
269
  if (err instanceof DOMException && err.name === "AbortError") {
270
270
  return { type: "abort_error", message: "Request was cancelled." };
271
271
  }
272
- if (err instanceof chunkEV7AXV2X_cjs.MatrxApiError) {
272
+ if (err instanceof chunkSME66TWP_cjs.MatrxApiError) {
273
273
  return {
274
274
  type: classifyStatus(err.status),
275
275
  message: honestTransportMessage(err.message, err.status),
@@ -279,7 +279,7 @@ function normalizeMatrxError(err) {
279
279
  name: err.name
280
280
  };
281
281
  }
282
- if (err instanceof chunkEV7AXV2X_cjs.BackendApiError) {
282
+ if (err instanceof chunkSME66TWP_cjs.BackendApiError) {
283
283
  return {
284
284
  type: "network_error",
285
285
  message: honestTransportMessage(
@@ -292,7 +292,7 @@ function normalizeMatrxError(err) {
292
292
  ...err.details !== null ? { serverDetail: err.details } : {}
293
293
  };
294
294
  }
295
- if (chunkPKYPPATQ_cjs.isNetError(err)) {
295
+ if (chunk2SXAAKGV_cjs.isNetError(err)) {
296
296
  if (err.code === "aborted") {
297
297
  return { type: "abort_error", message: err.message };
298
298
  }
@@ -326,7 +326,7 @@ function normalizeMatrxError(err) {
326
326
  }
327
327
  return { type: "network_error", message: err.message };
328
328
  }
329
- return { type: "unknown", message: chunkPKYPPATQ_cjs.extractErrorMessage(err) };
329
+ return { type: "unknown", message: chunk2SXAAKGV_cjs.extractErrorMessage(err) };
330
330
  }
331
331
  var PRODUCTION_CONNECT_TIMEOUT_MS = 15e3;
332
332
  function stripContentType(headers) {
@@ -359,7 +359,6 @@ function createMatrxTransport(options) {
359
359
  resolveTarget,
360
360
  credentials,
361
361
  organizationId,
362
- aiApiVersion,
363
362
  connectTimeoutMs = PRODUCTION_CONNECT_TIMEOUT_MS,
364
363
  totalTimeoutMs = null,
365
364
  expectedErrorStatuses,
@@ -374,27 +373,22 @@ function createMatrxTransport(options) {
374
373
  );
375
374
  }
376
375
  const resolve = resolveTarget ?? (() => ({ baseUrl }));
377
- const resolveVersion = () => {
378
- if (aiApiVersion === void 0) return chunkEV7AXV2X_cjs.MATRX_AI_API_VERSION_DEFAULT;
379
- return typeof aiApiVersion === "function" ? aiApiVersion() : aiApiVersion;
380
- };
381
376
  const resolveOrganizationId = (callOrganizationId) => {
382
377
  if (organizationId === void 0) return null;
383
- if (callOrganizationId !== null) return chunkEV7AXV2X_cjs.requireOrganizationContext(callOrganizationId);
378
+ if (callOrganizationId !== null) return chunkSME66TWP_cjs.requireOrganizationContext(callOrganizationId);
384
379
  const candidate = typeof organizationId === "function" ? organizationId() : organizationId;
385
- return chunkEV7AXV2X_cjs.requireOrganizationContext(candidate);
380
+ return chunkSME66TWP_cjs.requireOrganizationContext(candidate);
386
381
  };
387
382
  return {
388
383
  async fetch(path, init) {
389
384
  const target = await resolve(init);
390
385
  const callOrganizationId = readOrganizationHeader(init.headers);
391
- const versionedPath = chunkEV7AXV2X_cjs.applyAiApiVersion(path, resolveVersion());
392
- const url = `${target.baseUrl}${versionedPath}`;
386
+ const url = `${target.baseUrl}${path}`;
393
387
  const policyHeaders = stripContentType(target.policyHeaders ?? {});
394
388
  let overHeaders = callOrganizationId === null ? policyHeaders : stripOrganizationHeader(policyHeaders);
395
389
  const orgId = resolveOrganizationId(callOrganizationId);
396
390
  if (orgId !== null) {
397
- overHeaders = chunkEV7AXV2X_cjs.applyOrganizationContextHeader(overHeaders, orgId);
391
+ overHeaders = chunkSME66TWP_cjs.applyOrganizationContextHeader(overHeaders, orgId);
398
392
  }
399
393
  const wireHeaders = callOrganizationId === null ? { ...init.headers } : stripOrganizationHeader({ ...init.headers });
400
394
  const info = {
@@ -407,7 +401,7 @@ function createMatrxTransport(options) {
407
401
  diagnostics?.onRequest?.(info);
408
402
  let response;
409
403
  try {
410
- ({ response } = await chunkEV7AXV2X_cjs.sendOnWire(
404
+ ({ response } = await chunkSME66TWP_cjs.sendOnWire(
411
405
  {
412
406
  url,
413
407
  method: init.method,
@@ -417,8 +411,7 @@ function createMatrxTransport(options) {
417
411
  ...init.signal ? { signal: init.signal } : {},
418
412
  ...init.onUploadProgress ? { onUploadProgress: init.onUploadProgress } : {},
419
413
  connectTimeoutMs,
420
- totalTimeoutMs,
421
- ...diagnostics?.onProtocolDowngrade ? { onProtocolDowngrade: diagnostics.onProtocolDowngrade } : {}
414
+ totalTimeoutMs
422
415
  },
423
416
  {
424
417
  ...credentials ? { credentials } : {},
@@ -432,11 +425,11 @@ function createMatrxTransport(options) {
432
425
  }
433
426
  if (!response.ok && !expectedErrorStatuses?.includes(response.status)) {
434
427
  const serverDetail = await response.clone().json().catch(() => void 0);
435
- const code = chunkEV7AXV2X_cjs.extractMatrxErrorCode(serverDetail);
428
+ const code = chunkSME66TWP_cjs.extractMatrxErrorCode(serverDetail);
436
429
  diagnostics?.onError?.(
437
430
  {
438
431
  type: classifyStatus(response.status),
439
- message: chunkEV7AXV2X_cjs.extractMatrxErrorMessage(serverDetail) ?? `HTTP ${response.status}`,
432
+ message: chunkSME66TWP_cjs.extractMatrxErrorMessage(serverDetail) ?? `HTTP ${response.status}`,
440
433
  status: response.status,
441
434
  serverDetail,
442
435
  ...code ? { code } : {}
@@ -715,7 +708,7 @@ async function readServerDetail(response) {
715
708
  }
716
709
  }
717
710
  async function throwApiError(path, response) {
718
- throw new chunkEV7AXV2X_cjs.MatrxApiError({
711
+ throw new chunkSME66TWP_cjs.MatrxApiError({
719
712
  status: response.status,
720
713
  path,
721
714
  serverDetail: await readServerDetail(response)
@@ -736,7 +729,7 @@ function toRunHandle(response, options) {
736
729
  return {
737
730
  requestId: response.headers.get("X-Request-ID"),
738
731
  conversationId: response.headers.get("X-Conversation-ID"),
739
- events: chunkEV7AXV2X_cjs.readMatrxNdjsonStream(response.body, {
732
+ events: chunkSME66TWP_cjs.readMatrxNdjsonStream(response.body, {
740
733
  ...options.signal ? { signal: options.signal } : {},
741
734
  ...options.maxReadAhead !== void 0 ? { maxReadAhead: options.maxReadAhead } : {},
742
735
  ...options.onMalformedLine ? { onMalformedLine: options.onMalformedLine } : {},
@@ -759,7 +752,7 @@ async function requestStream(transport, path, options) {
759
752
  });
760
753
  if (!response.ok) return throwApiError(path, response);
761
754
  if (!response.body) {
762
- throw new chunkEV7AXV2X_cjs.MatrxApiError({
755
+ throw new chunkSME66TWP_cjs.MatrxApiError({
763
756
  status: response.status,
764
757
  path,
765
758
  serverDetail: { code: "missing_response_body" },
@@ -819,7 +812,7 @@ async function getRuntimeOperationStatus(transport, requestId, options = {}) {
819
812
  { method: "GET", ...options.signal ? { signal: options.signal } : {} }
820
813
  );
821
814
  } catch (error) {
822
- if (error instanceof chunkEV7AXV2X_cjs.MatrxApiError && error.status === 404) return null;
815
+ if (error instanceof chunkSME66TWP_cjs.MatrxApiError && error.status === 404) return null;
823
816
  throw error;
824
817
  }
825
818
  }
@@ -834,7 +827,7 @@ async function getRuntimeOperationsByLink(transport, linkKind, linkId, options =
834
827
  { method: "GET", ...options.signal ? { signal: options.signal } : {} }
835
828
  );
836
829
  } catch (error) {
837
- if (error instanceof chunkEV7AXV2X_cjs.MatrxApiError && error.status === 404) return null;
830
+ if (error instanceof chunkSME66TWP_cjs.MatrxApiError && error.status === 404) return null;
838
831
  throw error;
839
832
  }
840
833
  }
@@ -875,7 +868,7 @@ async function* followRuntimeOperationEvents(transport, executionId, options = {
875
868
  ...options.signal ? { signal: options.signal } : {}
876
869
  }
877
870
  );
878
- const frames = chunkEV7AXV2X_cjs.readMatrxSseStream(
871
+ const frames = chunkSME66TWP_cjs.readMatrxSseStream(
879
872
  response.body,
880
873
  options.onIncomplete ? { onIncomplete: options.onIncomplete } : {}
881
874
  );
@@ -1078,7 +1071,7 @@ async function openMatrxStream(transport, path, options = {}) {
1078
1071
  return toRunHandle(response, options);
1079
1072
  }
1080
1073
  function withRunOrganization(transport, organizationId) {
1081
- const orgId = chunkEV7AXV2X_cjs.requireOrganizationContext(organizationId);
1074
+ const orgId = chunkSME66TWP_cjs.requireOrganizationContext(organizationId);
1082
1075
  return {
1083
1076
  fetch: (path, init) => transport.fetch(path, {
1084
1077
  ...init,
@@ -1105,7 +1098,7 @@ async function followWorkflowRunEvents(transport, runId, options) {
1105
1098
  throw error;
1106
1099
  }
1107
1100
  try {
1108
- for await (const frame of chunkEV7AXV2X_cjs.readMatrxSseStream(
1101
+ for await (const frame of chunkSME66TWP_cjs.readMatrxSseStream(
1109
1102
  response.body
1110
1103
  )) {
1111
1104
  if (frame.event === "end") return { ended: true };
@@ -1151,7 +1144,7 @@ async function resumeOrRejoin(transport, resumeCall, options) {
1151
1144
  } catch (error) {
1152
1145
  const target = readLiveRunRejoin(error);
1153
1146
  if (!target) {
1154
- if (error instanceof chunkEV7AXV2X_cjs.MatrxApiError && isResumeConflict(error)) {
1147
+ if (error instanceof chunkSME66TWP_cjs.MatrxApiError && isResumeConflict(error)) {
1155
1148
  return { kind: "resume_conflict", error };
1156
1149
  }
1157
1150
  throw error;
@@ -1567,7 +1560,7 @@ async function reportProviderSessionUsage(transport, usage, options = {}) {
1567
1560
  });
1568
1561
  return "ok";
1569
1562
  } catch (error) {
1570
- if (error instanceof chunkEV7AXV2X_cjs.MatrxApiError) {
1563
+ if (error instanceof chunkSME66TWP_cjs.MatrxApiError) {
1571
1564
  const status = error.status;
1572
1565
  if (status >= 400 && status < 500 && status !== 401 && status !== 408 && status !== 425 && status !== 429) {
1573
1566
  console.warn(`[provider-usage] server refused ${usage.provider} usage ${usage.usage_id} (${status})`);
@@ -2249,6 +2242,10 @@ var ENDPOINTS = {
2249
2242
  }
2250
2243
  };
2251
2244
 
2245
+ Object.defineProperty(exports, "monitorStream", {
2246
+ enumerable: true,
2247
+ get: function () { return chunkFNIYADWI_cjs.monitorStream; }
2248
+ });
2252
2249
  Object.defineProperty(exports, "API_KEY_PREFIX", {
2253
2250
  enumerable: true,
2254
2251
  get: function () { return chunkMVXD6WI6_cjs.API_KEY_PREFIX; }
@@ -2267,211 +2264,171 @@ Object.defineProperty(exports, "toCredentialsPort", {
2267
2264
  });
2268
2265
  Object.defineProperty(exports, "BackendApiError", {
2269
2266
  enumerable: true,
2270
- get: function () { return chunkEV7AXV2X_cjs.BackendApiError; }
2267
+ get: function () { return chunkSME66TWP_cjs.BackendApiError; }
2271
2268
  });
2272
2269
  Object.defineProperty(exports, "CONTRACT_SHA256", {
2273
2270
  enumerable: true,
2274
- get: function () { return chunkEV7AXV2X_cjs.CONTRACT_SHA256; }
2271
+ get: function () { return chunkSME66TWP_cjs.CONTRACT_SHA256; }
2275
2272
  });
2276
2273
  Object.defineProperty(exports, "DEPLOYMENTS", {
2277
2274
  enumerable: true,
2278
- get: function () { return chunkEV7AXV2X_cjs.DEPLOYMENTS; }
2275
+ get: function () { return chunkSME66TWP_cjs.DEPLOYMENTS; }
2279
2276
  });
2280
2277
  Object.defineProperty(exports, "DOMAINS", {
2281
2278
  enumerable: true,
2282
- get: function () { return chunkEV7AXV2X_cjs.DOMAINS; }
2283
- });
2284
- Object.defineProperty(exports, "MATRX_AI_API_VERSION_DEFAULT", {
2285
- enumerable: true,
2286
- get: function () { return chunkEV7AXV2X_cjs.MATRX_AI_API_VERSION_DEFAULT; }
2279
+ get: function () { return chunkSME66TWP_cjs.DOMAINS; }
2287
2280
  });
2288
2281
  Object.defineProperty(exports, "MatrxApiError", {
2289
2282
  enumerable: true,
2290
- get: function () { return chunkEV7AXV2X_cjs.MatrxApiError; }
2283
+ get: function () { return chunkSME66TWP_cjs.MatrxApiError; }
2291
2284
  });
2292
2285
  Object.defineProperty(exports, "OrganizationContextError", {
2293
2286
  enumerable: true,
2294
- get: function () { return chunkEV7AXV2X_cjs.OrganizationContextError; }
2287
+ get: function () { return chunkSME66TWP_cjs.OrganizationContextError; }
2295
2288
  });
2296
2289
  Object.defineProperty(exports, "StreamTransportError", {
2297
2290
  enumerable: true,
2298
- get: function () { return chunkEV7AXV2X_cjs.StreamTransportError; }
2299
- });
2300
- Object.defineProperty(exports, "V2_COVERED_AI_PATH_TEMPLATES", {
2301
- enumerable: true,
2302
- get: function () { return chunkEV7AXV2X_cjs.V2_COVERED_AI_PATH_TEMPLATES; }
2303
- });
2304
- Object.defineProperty(exports, "aiVersionPathOverrides", {
2305
- enumerable: true,
2306
- get: function () { return chunkEV7AXV2X_cjs.aiVersionPathOverrides; }
2307
- });
2308
- Object.defineProperty(exports, "applyAiApiVersion", {
2309
- enumerable: true,
2310
- get: function () { return chunkEV7AXV2X_cjs.applyAiApiVersion; }
2291
+ get: function () { return chunkSME66TWP_cjs.StreamTransportError; }
2311
2292
  });
2312
2293
  Object.defineProperty(exports, "applyOrganizationContextHeader", {
2313
2294
  enumerable: true,
2314
- get: function () { return chunkEV7AXV2X_cjs.applyOrganizationContextHeader; }
2295
+ get: function () { return chunkSME66TWP_cjs.applyOrganizationContextHeader; }
2315
2296
  });
2316
2297
  Object.defineProperty(exports, "assertOrganizationMatchesOperation", {
2317
2298
  enumerable: true,
2318
- get: function () { return chunkEV7AXV2X_cjs.assertOrganizationMatchesOperation; }
2299
+ get: function () { return chunkSME66TWP_cjs.assertOrganizationMatchesOperation; }
2319
2300
  });
2320
2301
  Object.defineProperty(exports, "assertQueryOrganizationMatchesContext", {
2321
2302
  enumerable: true,
2322
- get: function () { return chunkEV7AXV2X_cjs.assertQueryOrganizationMatchesContext; }
2303
+ get: function () { return chunkSME66TWP_cjs.assertQueryOrganizationMatchesContext; }
2323
2304
  });
2324
2305
  Object.defineProperty(exports, "createApi", {
2325
2306
  enumerable: true,
2326
- get: function () { return chunkEV7AXV2X_cjs.createApi; }
2307
+ get: function () { return chunkSME66TWP_cjs.createApi; }
2327
2308
  });
2328
2309
  Object.defineProperty(exports, "createOrganizationOperation", {
2329
2310
  enumerable: true,
2330
- get: function () { return chunkEV7AXV2X_cjs.createOrganizationOperation; }
2311
+ get: function () { return chunkSME66TWP_cjs.createOrganizationOperation; }
2331
2312
  });
2332
2313
  Object.defineProperty(exports, "describeBackendFailure", {
2333
2314
  enumerable: true,
2334
- get: function () { return chunkEV7AXV2X_cjs.describeBackendFailure; }
2315
+ get: function () { return chunkSME66TWP_cjs.describeBackendFailure; }
2335
2316
  });
2336
2317
  Object.defineProperty(exports, "extractMatrxErrorCode", {
2337
2318
  enumerable: true,
2338
- get: function () { return chunkEV7AXV2X_cjs.extractMatrxErrorCode; }
2319
+ get: function () { return chunkSME66TWP_cjs.extractMatrxErrorCode; }
2339
2320
  });
2340
2321
  Object.defineProperty(exports, "extractMatrxErrorMessage", {
2341
2322
  enumerable: true,
2342
- get: function () { return chunkEV7AXV2X_cjs.extractMatrxErrorMessage; }
2343
- });
2344
- Object.defineProperty(exports, "fetchWithMatrxProtocolFallback", {
2345
- enumerable: true,
2346
- get: function () { return chunkEV7AXV2X_cjs.fetchWithMatrxProtocolFallback; }
2323
+ get: function () { return chunkSME66TWP_cjs.extractMatrxErrorMessage; }
2347
2324
  });
2348
2325
  Object.defineProperty(exports, "getUserMessage", {
2349
2326
  enumerable: true,
2350
- get: function () { return chunkEV7AXV2X_cjs.getUserMessage; }
2327
+ get: function () { return chunkSME66TWP_cjs.getUserMessage; }
2351
2328
  });
2352
2329
  Object.defineProperty(exports, "isBinaryType", {
2353
2330
  enumerable: true,
2354
- get: function () { return chunkEV7AXV2X_cjs.isBinaryType; }
2355
- });
2356
- Object.defineProperty(exports, "isCoveredAiPath", {
2357
- enumerable: true,
2358
- get: function () { return chunkEV7AXV2X_cjs.isCoveredAiPath; }
2331
+ get: function () { return chunkSME66TWP_cjs.isBinaryType; }
2359
2332
  });
2360
2333
  Object.defineProperty(exports, "isGenericUserMessage", {
2361
2334
  enumerable: true,
2362
- get: function () { return chunkEV7AXV2X_cjs.isGenericUserMessage; }
2335
+ get: function () { return chunkSME66TWP_cjs.isGenericUserMessage; }
2363
2336
  });
2364
2337
  Object.defineProperty(exports, "isStreamTransportLost", {
2365
2338
  enumerable: true,
2366
- get: function () { return chunkEV7AXV2X_cjs.isStreamTransportLost; }
2367
- });
2368
- Object.defineProperty(exports, "isV2Path", {
2369
- enumerable: true,
2370
- get: function () { return chunkEV7AXV2X_cjs.isV2Path; }
2339
+ get: function () { return chunkSME66TWP_cjs.isStreamTransportLost; }
2371
2340
  });
2372
2341
  Object.defineProperty(exports, "openJsonOrStream", {
2373
2342
  enumerable: true,
2374
- get: function () { return chunkEV7AXV2X_cjs.openJsonOrStream; }
2343
+ get: function () { return chunkSME66TWP_cjs.openJsonOrStream; }
2375
2344
  });
2376
2345
  Object.defineProperty(exports, "openStream", {
2377
2346
  enumerable: true,
2378
- get: function () { return chunkEV7AXV2X_cjs.openStream; }
2347
+ get: function () { return chunkSME66TWP_cjs.openStream; }
2379
2348
  });
2380
2349
  Object.defineProperty(exports, "parseCallApiError", {
2381
2350
  enumerable: true,
2382
- get: function () { return chunkEV7AXV2X_cjs.parseCallApiError; }
2351
+ get: function () { return chunkSME66TWP_cjs.parseCallApiError; }
2383
2352
  });
2384
2353
  Object.defineProperty(exports, "parseHttpError", {
2385
2354
  enumerable: true,
2386
- get: function () { return chunkEV7AXV2X_cjs.parseHttpError; }
2355
+ get: function () { return chunkSME66TWP_cjs.parseHttpError; }
2387
2356
  });
2388
2357
  Object.defineProperty(exports, "parseHttpErrorBody", {
2389
2358
  enumerable: true,
2390
- get: function () { return chunkEV7AXV2X_cjs.parseHttpErrorBody; }
2359
+ get: function () { return chunkSME66TWP_cjs.parseHttpErrorBody; }
2391
2360
  });
2392
2361
  Object.defineProperty(exports, "parsePersistedBackendError", {
2393
2362
  enumerable: true,
2394
- get: function () { return chunkEV7AXV2X_cjs.parsePersistedBackendError; }
2363
+ get: function () { return chunkSME66TWP_cjs.parsePersistedBackendError; }
2395
2364
  });
2396
2365
  Object.defineProperty(exports, "parseStreamError", {
2397
2366
  enumerable: true,
2398
- get: function () { return chunkEV7AXV2X_cjs.parseStreamError; }
2367
+ get: function () { return chunkSME66TWP_cjs.parseStreamError; }
2399
2368
  });
2400
2369
  Object.defineProperty(exports, "requireOrganizationContext", {
2401
2370
  enumerable: true,
2402
- get: function () { return chunkEV7AXV2X_cjs.requireOrganizationContext; }
2403
- });
2404
- Object.defineProperty(exports, "toV1FallbackUrl", {
2405
- enumerable: true,
2406
- get: function () { return chunkEV7AXV2X_cjs.toV1FallbackUrl; }
2407
- });
2408
- Object.defineProperty(exports, "toV2Path", {
2409
- enumerable: true,
2410
- get: function () { return chunkEV7AXV2X_cjs.toV2Path; }
2371
+ get: function () { return chunkSME66TWP_cjs.requireOrganizationContext; }
2411
2372
  });
2412
2373
  Object.defineProperty(exports, "unwrapUpstreamError", {
2413
2374
  enumerable: true,
2414
- get: function () { return chunkEV7AXV2X_cjs.unwrapUpstreamError; }
2375
+ get: function () { return chunkSME66TWP_cjs.unwrapUpstreamError; }
2415
2376
  });
2416
2377
  Object.defineProperty(exports, "AbortedError", {
2417
2378
  enumerable: true,
2418
- get: function () { return chunkPKYPPATQ_cjs.AbortedError; }
2379
+ get: function () { return chunk2SXAAKGV_cjs.AbortedError; }
2419
2380
  });
2420
2381
  Object.defineProperty(exports, "ConnectTimeoutError", {
2421
2382
  enumerable: true,
2422
- get: function () { return chunkPKYPPATQ_cjs.ConnectTimeoutError; }
2383
+ get: function () { return chunk2SXAAKGV_cjs.ConnectTimeoutError; }
2423
2384
  });
2424
2385
  Object.defineProperty(exports, "HeartbeatTimeoutError", {
2425
2386
  enumerable: true,
2426
- get: function () { return chunkPKYPPATQ_cjs.HeartbeatTimeoutError; }
2387
+ get: function () { return chunk2SXAAKGV_cjs.HeartbeatTimeoutError; }
2427
2388
  });
2428
2389
  Object.defineProperty(exports, "HttpError", {
2429
2390
  enumerable: true,
2430
- get: function () { return chunkPKYPPATQ_cjs.HttpError; }
2391
+ get: function () { return chunk2SXAAKGV_cjs.HttpError; }
2431
2392
  });
2432
2393
  Object.defineProperty(exports, "NetError", {
2433
2394
  enumerable: true,
2434
- get: function () { return chunkPKYPPATQ_cjs.NetError; }
2395
+ get: function () { return chunk2SXAAKGV_cjs.NetError; }
2435
2396
  });
2436
2397
  Object.defineProperty(exports, "NetworkError", {
2437
2398
  enumerable: true,
2438
- get: function () { return chunkPKYPPATQ_cjs.NetworkError; }
2399
+ get: function () { return chunk2SXAAKGV_cjs.NetworkError; }
2439
2400
  });
2440
2401
  Object.defineProperty(exports, "OfflineError", {
2441
2402
  enumerable: true,
2442
- get: function () { return chunkPKYPPATQ_cjs.OfflineError; }
2403
+ get: function () { return chunk2SXAAKGV_cjs.OfflineError; }
2443
2404
  });
2444
2405
  Object.defineProperty(exports, "TotalTimeoutError", {
2445
2406
  enumerable: true,
2446
- get: function () { return chunkPKYPPATQ_cjs.TotalTimeoutError; }
2407
+ get: function () { return chunk2SXAAKGV_cjs.TotalTimeoutError; }
2447
2408
  });
2448
2409
  Object.defineProperty(exports, "extractErrorMessage", {
2449
2410
  enumerable: true,
2450
- get: function () { return chunkPKYPPATQ_cjs.extractErrorMessage; }
2411
+ get: function () { return chunk2SXAAKGV_cjs.extractErrorMessage; }
2451
2412
  });
2452
2413
  Object.defineProperty(exports, "isNetError", {
2453
2414
  enumerable: true,
2454
- get: function () { return chunkPKYPPATQ_cjs.isNetError; }
2415
+ get: function () { return chunk2SXAAKGV_cjs.isNetError; }
2455
2416
  });
2456
2417
  Object.defineProperty(exports, "isTransportFailure", {
2457
2418
  enumerable: true,
2458
- get: function () { return chunkPKYPPATQ_cjs.isTransportFailure; }
2459
- });
2460
- Object.defineProperty(exports, "monitorStream", {
2461
- enumerable: true,
2462
- get: function () { return chunkPKYPPATQ_cjs.monitorStream; }
2419
+ get: function () { return chunk2SXAAKGV_cjs.isTransportFailure; }
2463
2420
  });
2464
2421
  Object.defineProperty(exports, "resilientFetch", {
2465
2422
  enumerable: true,
2466
- get: function () { return chunkPKYPPATQ_cjs.resilientFetch; }
2423
+ get: function () { return chunk2SXAAKGV_cjs.resilientFetch; }
2467
2424
  });
2468
2425
  Object.defineProperty(exports, "toNetError", {
2469
2426
  enumerable: true,
2470
- get: function () { return chunkPKYPPATQ_cjs.toNetError; }
2427
+ get: function () { return chunk2SXAAKGV_cjs.toNetError; }
2471
2428
  });
2472
2429
  Object.defineProperty(exports, "withRetry", {
2473
2430
  enumerable: true,
2474
- get: function () { return chunkPKYPPATQ_cjs.withRetry; }
2431
+ get: function () { return chunk2SXAAKGV_cjs.withRetry; }
2475
2432
  });
2476
2433
  exports.ENDPOINTS = ENDPOINTS;
2477
2434
  exports.MATRX_LIVE_STREAM_UNAVAILABLE = MATRX_LIVE_STREAM_UNAVAILABLE;