@fleetless/sdk 3.1.1 → 4.1.0

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
@@ -1,9 +1,39 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to `@fleetless/sdk`. The format follows Keep a Changelog; the versions follow semver.
3
+ All notable changes to `@fleetless/sdk`. The format follows Keep a Changelog; the versions follow semver. A pull request that changes what a consumer sees adds its entry under `## [Unreleased]`; the release renames that heading to the version.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [4.1.0] — 2026-09-30
8
+
9
+ Built against `@fleetless/contracts` 5.0.0. Two changes to `Job` a consumer's code sees, so the next release is a major.
10
+
11
+ ### Added
12
+
13
+ - **`JobOrigin`** is re-exported: the type of `Job.origin`.
14
+
15
+ ### Changed
16
+
17
+ - **`Job.origin` is required**: `fleetless` for a job the cloud minted from an invocation, `external` for a goal the bridge found running on a published action without having sent it — started by anything else on the robot's ROS graph, or its own goal after the bridge lost the mapping. An external job has no parameters and no starter, and never appears in `jobs.history`. A hand-built `Job` (a test fixture, a mock) now needs the field.
18
+ - **`actions.cancel` is answered by the robot's action server.** It resolves once the server accepted the cancel, with the job usually still `running` — the end arrives as the job's own update. It rejects `cancel_rejected` when the server refused (`ERROR_REJECTED`), with `error.details.goals` listing each goal the cancel reached as `{ job_id, goal_id, return_code }` (`0`–`3`, or `null` when that goal's server did not answer); `bridge_timeout` when the bridge did not answer in time; and with the bridge's own code (e.g. `action_server_lost`) when it could not ask at all. Code that treated a resolved cancel as a stopped goal, or every rejection as "nothing was cancelled", needs to read these apart. Cancelling an `unknown` job cancels every `external` goal on its action.
19
+ - **`JobState` gains `unknown`**: the cloud cannot currently say whether the job is still running — the robot went offline, or its bridge did not report in time. Not terminal: only the robot's bridge moves the job on, to `running` or to how it ended. `lost` is now final. An exhaustive `switch` over `JobState` needs the new case; `services.call` keeps waiting through `unknown`, and `jobs.history` takes `state: 'unknown'`.
20
+
21
+ ## [4.0.0] — 2026-09-22
22
+
23
+ ### Added
24
+
25
+ - **`createClient({ credentials })`** — hand the client a bearer it does not own. `CredentialSource` is two methods: `token()` answers the current raw bearer or `null`, and `handleExpired()` says whether a `token_expired` is worth retrying. Mutually exclusive with `tokenStore` and `serverKey`, and `auth.login`/`auth.logout` refuse on it for the reason they refuse on a server key: there is no session here to start or end. For an embedder that already holds a session and refreshes it itself — without this it had to impersonate a token store, and a cloud-side `token_expired` arriving while its own clock still read live posted one empty refresh.
26
+
27
+ ### Changed
28
+
29
+ - **`BridgeState` gains `low_bandwidth`** (bridge protocol 3): whether the robot's bridge is in its low-bandwidth mode. Required, not optional.
30
+ - **`AssetListResponse` gains `store` (`bytes`, `used_bytes`) and `joint_state_slug`.**
31
+ - **`AssetListResponse.active_sync.failed[].details` changed shape**: `{ limit_bytes, size_bytes }` is now `{ store_bytes, used_bytes, size_bytes }`.
32
+
33
+ ### Removed
34
+
35
+ - **`AssetKind` `other` and the asset failure kind `too_large`.** A robot has one gigabyte of asset storage; there is no per-file limit. This is a major.
36
+
7
37
  ## [3.1.1] — 2026-09-17
8
38
 
9
39
  ### Fixed
package/CONTRIBUTING.md CHANGED
@@ -93,8 +93,9 @@ tell you what else has to move with it.
93
93
 
94
94
  **CI runs on GitHub Actions**, in this repository
95
95
  (`.github/workflows/verify.yml`) — the suite, on every push and every pull
96
- request. `release.yml` publishes on a release tag and calls that same file
97
- first, so a release is never checked by a different pipeline than a push.
96
+ request. `release.yml` (the **Release** button) calls that same file on the
97
+ commit it publishes, so a release is never checked by a different pipeline
98
+ than a push.
98
99
 
99
100
  **Your pull request is verified, a fork's included** — the same suite, the
100
101
  same file. GitHub holds a first-time contributor's first run until a
package/README.md CHANGED
@@ -95,10 +95,10 @@ Everything past this point lives at **[docs.fleetless.dev](https://docs.fleetles
95
95
  method, every option, and what each one deliberately does not do.
96
96
  - **[Getting started](https://docs.fleetless.dev/getting-started/)** — from a
97
97
  robot that has never connected to a value in your app.
98
- - **[Your own login UI](https://docs.fleetless.dev/recipes/app-auth/)** — the
99
- walkthrough for every sign-in screen.
100
- - **[Identity](https://docs.fleetless.dev/reference/identity/)** — the two
101
- identity spaces, and what a refusal licenses your UI to claim.
98
+ - **[App Starter](https://docs.fleetless.dev/recipes/app-starter/)** — every
99
+ sign-in screen, already built, on this SDK.
100
+ - **[Manage users and roles](https://docs.fleetless.dev/concepts/manage-users-and-roles/)** —
101
+ the two identity spaces, and what a refusal licenses your UI to claim.
102
102
  - **[REST and realtime API](https://docs.fleetless.dev/reference/api/)** —
103
103
  the wire underneath this package.
104
104
  - **[CHANGELOG.md](CHANGELOG.md)** — what changed in each version.