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

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/CHANGELOG.md CHANGED
@@ -15,6 +15,28 @@ All notable changes to `@m8tes/sdk`.
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [0.1.0-alpha.4] — 2026-08-21
19
+
20
+ ### Changed
21
+
22
+ - `runs.retry(..., { use_credits: true })` pins the platform default model (m8tes credits) instead of replaying a failed OAuth model.
23
+
24
+ ### Added
25
+
26
+ - **`Agent.active_run_id`** (plus typed `last_active_at` / `active_run_count`) —
27
+ roster liveness for messaging discovery; `active_run_id` is set only when
28
+ exactly one live run exists.
29
+ - **`modelConnections.clearDefault()`** — clear the account model-plan default
30
+ (`DELETE /model-connections/preferred-default`) so platform mates fall back to
31
+ m8tes credits.
32
+ - **`RunOutcome.delivery_channel` and `RunOutcome.needs_reply_count`** — mirror
33
+ `GET /runs/{id}/outcome` after agentic scheduled delivery (`set_run_delivery`).
34
+ - **`tasks.create` / `tasks.update` `permission_mode`.** Same closed union as
35
+ agents (`autonomous` / `approval` / `plan`). Also typed on the `Task` response.
36
+
37
+ - `agents.update(..., { visibility: "organization" })` — share an agent with its
38
+ organization (mirrors the Python SDK and `PATCH /api/v2/agents/{id}`).
39
+
18
40
  ## [0.1.0-alpha.3] — 2026-08-19
19
41
 
20
42
  ### Changed
package/dist/index.cjs CHANGED
@@ -1613,6 +1613,13 @@ function createModelConnectionsResource(http) {
1613
1613
  },
1614
1614
  disconnect(provider) {
1615
1615
  return http.request("DELETE", `/model-connections/${seg(provider)}`);
1616
+ },
1617
+ async clearDefault() {
1618
+ const res = await http.request(
1619
+ "DELETE",
1620
+ "/model-connections/preferred-default"
1621
+ );
1622
+ return Boolean(res?.cleared);
1616
1623
  }
1617
1624
  };
1618
1625
  }
@@ -2092,11 +2099,14 @@ function createRunsResource(http) {
2092
2099
  wait(runId, options = {}) {
2093
2100
  return waitForRun(pollDeps(options.user_id), runId, options);
2094
2101
  },
2095
- // `confirm` is a QUERY param and the route takes no body (verified against
2096
- // fastapi/app/routers/v2/runs.py::retry_run), so send neither.
2102
+ // `confirm` / `use_credits` are QUERY params and the route takes no body
2103
+ // (verified against fastapi/app/routers/v2/runs.py::retry_run).
2097
2104
  retry(runId, params = {}) {
2098
2105
  return http.request("POST", `/runs/${seg(runId)}/retry`, {
2099
- query: params.confirm ? toQuery({ confirm: true }) : ""
2106
+ query: toQuery({
2107
+ confirm: params.confirm ? true : void 0,
2108
+ use_credits: params.use_credits ? true : void 0
2109
+ })
2100
2110
  });
2101
2111
  },
2102
2112
  stream(runId, options) {
@@ -2331,7 +2341,7 @@ function createWebhooksResource(http) {
2331
2341
  }
2332
2342
 
2333
2343
  // src/index.ts
2334
- var M8TES_SDK_VERSION = "0.1.0-alpha.3";
2344
+ var M8TES_SDK_VERSION = "0.1.0-alpha.4";
2335
2345
  var M8tes = class {
2336
2346
  runs;
2337
2347
  agents;