@m8tes/sdk 0.1.0-alpha.3 → 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/CHANGELOG.md +41 -0
- package/dist/index.cjs +28 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +28 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,47 @@ All notable changes to `@m8tes/sdk`.
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.1.0-alpha.5] — 2026-08-22
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- `Run.recovery_repeats_actions` reports whether the offered recovery would repeat
|
|
23
|
+
a side effect; chat recovery is scoped to the failed follow-up and
|
|
24
|
+
`Run.repeats_actions` keeps its whole-run meaning.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Retry and reply recover provider auth, quota, own-subscription rate-limit, and
|
|
29
|
+
availability failures through the account's current connected/preferred provider.
|
|
30
|
+
Chat recovery resends only the failed follow-up on the same run.
|
|
31
|
+
|
|
32
|
+
## [0.1.0-alpha.4] — 2026-08-21
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- `runs.retry(..., { use_credits: true })` pins the platform default model (m8tes credits) instead of replaying a failed OAuth model.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- **`Usage.free_path_available`.** Mirrors `GET /usage` so clients can render
|
|
41
|
+
the Free continuation path from the same authoritative billing predicate as
|
|
42
|
+
activation; false means the account must use paid-plan recovery. `usage()`
|
|
43
|
+
also defaults an omitted field to false when talking to an older server.
|
|
44
|
+
|
|
45
|
+
- **`Agent.active_run_id`** (plus typed `last_active_at` / `active_run_count`) —
|
|
46
|
+
roster liveness for messaging discovery; `active_run_id` is set only when
|
|
47
|
+
exactly one live run exists.
|
|
48
|
+
- **`modelConnections.clearDefault()`** — clear the account model-plan default
|
|
49
|
+
(`DELETE /model-connections/preferred-default`) so platform mates fall back to
|
|
50
|
+
m8tes credits.
|
|
51
|
+
- **`RunOutcome.delivery_channel` and `RunOutcome.needs_reply_count`** — mirror
|
|
52
|
+
`GET /runs/{id}/outcome` after agentic scheduled delivery (`set_run_delivery`).
|
|
53
|
+
- **`tasks.create` / `tasks.update` `permission_mode`.** Same closed union as
|
|
54
|
+
agents (`autonomous` / `approval` / `plan`). Also typed on the `Task` response.
|
|
55
|
+
|
|
56
|
+
- `agents.update(..., { visibility: "organization" })` — share an agent with its
|
|
57
|
+
organization (mirrors the Python SDK and `PATCH /api/v2/agents/{id}`).
|
|
58
|
+
|
|
18
59
|
## [0.1.0-alpha.3] — 2026-08-19
|
|
19
60
|
|
|
20
61
|
### Changed
|
package/dist/index.cjs
CHANGED
|
@@ -1508,8 +1508,12 @@ function createUsersResource(http) {
|
|
|
1508
1508
|
// src/resources/billing.ts
|
|
1509
1509
|
function createBillingResource(http) {
|
|
1510
1510
|
return {
|
|
1511
|
-
usage() {
|
|
1512
|
-
|
|
1511
|
+
async usage() {
|
|
1512
|
+
const usage = await http.request("GET", "/usage/");
|
|
1513
|
+
return {
|
|
1514
|
+
...usage,
|
|
1515
|
+
free_path_available: usage.free_path_available ?? false
|
|
1516
|
+
};
|
|
1513
1517
|
},
|
|
1514
1518
|
usageTimeseries(params = {}) {
|
|
1515
1519
|
const { agent_id, teammate_id, ...rest } = params;
|
|
@@ -1524,8 +1528,14 @@ function createBillingResource(http) {
|
|
|
1524
1528
|
plans() {
|
|
1525
1529
|
return http.request("GET", "/billing/plans");
|
|
1526
1530
|
},
|
|
1527
|
-
setOverage(params) {
|
|
1528
|
-
|
|
1531
|
+
async setOverage(params) {
|
|
1532
|
+
const usage = await http.request("PATCH", "/billing/overage", {
|
|
1533
|
+
body: toBody({ ...params })
|
|
1534
|
+
});
|
|
1535
|
+
return {
|
|
1536
|
+
...usage,
|
|
1537
|
+
free_path_available: usage.free_path_available ?? false
|
|
1538
|
+
};
|
|
1529
1539
|
},
|
|
1530
1540
|
balance() {
|
|
1531
1541
|
return http.request("GET", "/billing/balance");
|
|
@@ -1613,6 +1623,13 @@ function createModelConnectionsResource(http) {
|
|
|
1613
1623
|
},
|
|
1614
1624
|
disconnect(provider) {
|
|
1615
1625
|
return http.request("DELETE", `/model-connections/${seg(provider)}`);
|
|
1626
|
+
},
|
|
1627
|
+
async clearDefault() {
|
|
1628
|
+
const res = await http.request(
|
|
1629
|
+
"DELETE",
|
|
1630
|
+
"/model-connections/preferred-default"
|
|
1631
|
+
);
|
|
1632
|
+
return Boolean(res?.cleared);
|
|
1616
1633
|
}
|
|
1617
1634
|
};
|
|
1618
1635
|
}
|
|
@@ -2092,11 +2109,14 @@ function createRunsResource(http) {
|
|
|
2092
2109
|
wait(runId, options = {}) {
|
|
2093
2110
|
return waitForRun(pollDeps(options.user_id), runId, options);
|
|
2094
2111
|
},
|
|
2095
|
-
// `confirm`
|
|
2096
|
-
// fastapi/app/routers/v2/runs.py::retry_run)
|
|
2112
|
+
// `confirm` / `use_credits` are QUERY params and the route takes no body
|
|
2113
|
+
// (verified against fastapi/app/routers/v2/runs.py::retry_run).
|
|
2097
2114
|
retry(runId, params = {}) {
|
|
2098
2115
|
return http.request("POST", `/runs/${seg(runId)}/retry`, {
|
|
2099
|
-
query:
|
|
2116
|
+
query: toQuery({
|
|
2117
|
+
confirm: params.confirm ? true : void 0,
|
|
2118
|
+
use_credits: params.use_credits ? true : void 0
|
|
2119
|
+
})
|
|
2100
2120
|
});
|
|
2101
2121
|
},
|
|
2102
2122
|
stream(runId, options) {
|
|
@@ -2331,7 +2351,7 @@ function createWebhooksResource(http) {
|
|
|
2331
2351
|
}
|
|
2332
2352
|
|
|
2333
2353
|
// src/index.ts
|
|
2334
|
-
var M8TES_SDK_VERSION = "0.1.0-alpha.
|
|
2354
|
+
var M8TES_SDK_VERSION = "0.1.0-alpha.5";
|
|
2335
2355
|
var M8tes = class {
|
|
2336
2356
|
runs;
|
|
2337
2357
|
agents;
|