@m8tes/sdk 0.1.0-alpha.4 → 0.1.0-alpha.5

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.d.cts CHANGED
@@ -206,6 +206,10 @@ interface Run {
206
206
  /** Provider behind an OAuth subscription route: claude, openai, xai, or gemini. */
207
207
  auth_provider?: string | null;
208
208
  retryable?: boolean;
209
+ /** Whether this run performed any non-read-only action. Null when not computed. */
210
+ repeats_actions?: boolean | null;
211
+ /** Whether the offered recovery would repeat an action; latest turn only for chat. */
212
+ recovery_repeats_actions?: boolean | null;
209
213
  retry_of_run_id?: number | null;
210
214
  retry_count?: number;
211
215
  output_data?: JsonObject | null;
@@ -465,6 +469,8 @@ interface Usage {
465
469
  cost_limit: string;
466
470
  period_end: string;
467
471
  subscription_status: string | null;
472
+ /** Authoritative eligibility for the model-subscription-funded Free path. */
473
+ free_path_available: boolean;
468
474
  overage_enabled: boolean;
469
475
  overage_used_cents: number;
470
476
  /** Ceiling on overage spend per period. Runs stop billing overage once reached. */
@@ -1398,6 +1404,9 @@ interface RunsResource {
1398
1404
  * If the run already did something visible (sent a message, changed data), the
1399
1405
  * API refuses with a 409 `retry_needs_confirmation`; pass `confirm: true` to
1400
1406
  * proceed. Check `run.retryable` first to avoid a guaranteed conflict.
1407
+ * Provider auth, quota, own-subscription rate-limit, and availability failures
1408
+ * follow the account's current connected/preferred provider. Other failures
1409
+ * replay the original concrete model; `use_credits` pins m8tes credits.
1401
1410
  */
1402
1411
  retry(runId: number, params?: {
1403
1412
  confirm?: boolean;
@@ -1405,7 +1414,8 @@ interface RunsResource {
1405
1414
  }): Promise<Run>;
1406
1415
  /** Join a run already in flight. Throws `RunNotStreamingError` if it has finished. */
1407
1416
  stream(runId: number, options?: RunStreamOptions): RunStream;
1408
- /** Continue the conversation on an existing run, streaming the reply. */
1417
+ /** Continue the same run, streaming only this follow-up. After a provider failure,
1418
+ * the reply follows the account's current connected/preferred provider. */
1409
1419
  reply(runId: number, message: string, options?: RunStreamOptions): RunStream;
1410
1420
  /** GET /runs/{id}. Pass `user_id` to scope to one end-user (required when the
1411
1421
  * account has strict multi-tenant mode on). */
@@ -1716,7 +1726,7 @@ interface WebhooksResource {
1716
1726
  */
1717
1727
 
1718
1728
  /** Kept in lockstep with package.json "version" — guarded by test/version.test.ts. */
1719
- declare const M8TES_SDK_VERSION = "0.1.0-alpha.4";
1729
+ declare const M8TES_SDK_VERSION = "0.1.0-alpha.5";
1720
1730
  declare class M8tes {
1721
1731
  readonly runs: RunsResource;
1722
1732
  readonly agents: AgentsResource;
package/dist/index.d.ts CHANGED
@@ -206,6 +206,10 @@ interface Run {
206
206
  /** Provider behind an OAuth subscription route: claude, openai, xai, or gemini. */
207
207
  auth_provider?: string | null;
208
208
  retryable?: boolean;
209
+ /** Whether this run performed any non-read-only action. Null when not computed. */
210
+ repeats_actions?: boolean | null;
211
+ /** Whether the offered recovery would repeat an action; latest turn only for chat. */
212
+ recovery_repeats_actions?: boolean | null;
209
213
  retry_of_run_id?: number | null;
210
214
  retry_count?: number;
211
215
  output_data?: JsonObject | null;
@@ -465,6 +469,8 @@ interface Usage {
465
469
  cost_limit: string;
466
470
  period_end: string;
467
471
  subscription_status: string | null;
472
+ /** Authoritative eligibility for the model-subscription-funded Free path. */
473
+ free_path_available: boolean;
468
474
  overage_enabled: boolean;
469
475
  overage_used_cents: number;
470
476
  /** Ceiling on overage spend per period. Runs stop billing overage once reached. */
@@ -1398,6 +1404,9 @@ interface RunsResource {
1398
1404
  * If the run already did something visible (sent a message, changed data), the
1399
1405
  * API refuses with a 409 `retry_needs_confirmation`; pass `confirm: true` to
1400
1406
  * proceed. Check `run.retryable` first to avoid a guaranteed conflict.
1407
+ * Provider auth, quota, own-subscription rate-limit, and availability failures
1408
+ * follow the account's current connected/preferred provider. Other failures
1409
+ * replay the original concrete model; `use_credits` pins m8tes credits.
1401
1410
  */
1402
1411
  retry(runId: number, params?: {
1403
1412
  confirm?: boolean;
@@ -1405,7 +1414,8 @@ interface RunsResource {
1405
1414
  }): Promise<Run>;
1406
1415
  /** Join a run already in flight. Throws `RunNotStreamingError` if it has finished. */
1407
1416
  stream(runId: number, options?: RunStreamOptions): RunStream;
1408
- /** Continue the conversation on an existing run, streaming the reply. */
1417
+ /** Continue the same run, streaming only this follow-up. After a provider failure,
1418
+ * the reply follows the account's current connected/preferred provider. */
1409
1419
  reply(runId: number, message: string, options?: RunStreamOptions): RunStream;
1410
1420
  /** GET /runs/{id}. Pass `user_id` to scope to one end-user (required when the
1411
1421
  * account has strict multi-tenant mode on). */
@@ -1716,7 +1726,7 @@ interface WebhooksResource {
1716
1726
  */
1717
1727
 
1718
1728
  /** Kept in lockstep with package.json "version" — guarded by test/version.test.ts. */
1719
- declare const M8TES_SDK_VERSION = "0.1.0-alpha.4";
1729
+ declare const M8TES_SDK_VERSION = "0.1.0-alpha.5";
1720
1730
  declare class M8tes {
1721
1731
  readonly runs: RunsResource;
1722
1732
  readonly agents: AgentsResource;
package/dist/index.js CHANGED
@@ -405,8 +405,12 @@ function createUsersResource(http) {
405
405
  // src/resources/billing.ts
406
406
  function createBillingResource(http) {
407
407
  return {
408
- usage() {
409
- return http.request("GET", "/usage/");
408
+ async usage() {
409
+ const usage = await http.request("GET", "/usage/");
410
+ return {
411
+ ...usage,
412
+ free_path_available: usage.free_path_available ?? false
413
+ };
410
414
  },
411
415
  usageTimeseries(params = {}) {
412
416
  const { agent_id, teammate_id, ...rest } = params;
@@ -421,8 +425,14 @@ function createBillingResource(http) {
421
425
  plans() {
422
426
  return http.request("GET", "/billing/plans");
423
427
  },
424
- setOverage(params) {
425
- return http.request("PATCH", "/billing/overage", { body: toBody({ ...params }) });
428
+ async setOverage(params) {
429
+ const usage = await http.request("PATCH", "/billing/overage", {
430
+ body: toBody({ ...params })
431
+ });
432
+ return {
433
+ ...usage,
434
+ free_path_available: usage.free_path_available ?? false
435
+ };
426
436
  },
427
437
  balance() {
428
438
  return http.request("GET", "/billing/balance");
@@ -1238,7 +1248,7 @@ function createWebhooksResource(http) {
1238
1248
  }
1239
1249
 
1240
1250
  // src/index.ts
1241
- var M8TES_SDK_VERSION = "0.1.0-alpha.4";
1251
+ var M8TES_SDK_VERSION = "0.1.0-alpha.5";
1242
1252
  var M8tes = class {
1243
1253
  runs;
1244
1254
  agents;