@fleetless/sdk 3.0.2 → 3.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
@@ -4,6 +4,25 @@ All notable changes to `@fleetless/sdk`. The format follows Keep a Changelog; th
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [3.1.0] — 2026-09-17
8
+
9
+ ### Added
10
+
11
+ - **`client.robots`** — `list()` answers the robots the caller reaches, with bridge state and published version; `describe(robotId)` answers the datasheet: every granted datapoint, action, service, publisher and camera with unit, decimals and parameter JSON Schema, plus the `action_history` and `assets` capabilities. The same rows and the same sheet the MCP tools `robots_list` and `robot_describe` answer, from the same server code. Needs a cloud that serves contracts 1.1.0.
12
+ - **`client.jobs.history(robotId, options?)`** — the run history the reference described since 3.0.0 and the package never shipped. Filters `slug`, `state`, `kind`, `limit`, `beforeSeq`, `fromMs`, `toMs`; page until `next_cursor` is `null`.
13
+
14
+ ### Changed
15
+
16
+ - Re-pinned to `@fleetless/contracts` 1.1.0. `ClientRobotListItem`, `McpRobotDatasheet`, `McpExposure`, `McpCapabilities`, `JobRun` and `JobRunListResponse` are re-exported.
17
+
18
+ ## [3.0.3] — 2026-09-16
19
+
20
+ - Published from GitHub Actions by npm trusted publishing: no publish token exists anywhere, and every version from this one on carries a provenance attestation linking it to the commit and the run that built it. `npm audit signatures` checks it.
21
+
22
+ - **The README is a lobby now, not the reference.** What Fleetless is, what this package does, one snippet, and links into docs.fleetless.dev; the seven walkthroughs it carried are the SDK reference's job. The four doc comments and the one runtime error message that sent a developer to a README section point at the SDK reference instead, and the test that resolved those pointers now refuses any new one.
23
+ - `RELEASING.md` no longer ships in the package; the published `CONTRIBUTING.md` points at it without a link.
24
+ - The prose guard treats a path into the company-site repository the way it treats every other sibling repository's path.
25
+
7
26
  ## [3.0.2] — 2026-09-07
8
27
 
9
28
  No API change, and one documentation example that now compiles. The guard
package/CONTRIBUTING.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Contributing to `@fleetless/sdk`
2
2
 
3
- This package is the TypeScript client for the Fleetless API. It is what a
4
- developer's own application calls, so a change here reaches every app built on
5
- it, and a change to what a method *sends* reaches the platform as well.
3
+ This is the TypeScript client for the Fleetless API — the thing a developer's
4
+ app calls directly. Change a method here and every app built on it feels it;
5
+ change what a method *sends* and the platform feels it too.
6
6
 
7
7
  ## Setup
8
8
 
@@ -14,12 +14,12 @@ corepack enable
14
14
  pnpm install
15
15
  ```
16
16
 
17
- There are no private dependencies. `pnpm install` works from a clean checkout
18
- with nothing but a network connection to the npm registry — the wire schemas
19
- come from `@fleetless/contracts`, which is a public package.
17
+ No private dependencies — `pnpm install` needs nothing but a network
18
+ connection to npm. The wire schemas come from `@fleetless/contracts`, a
19
+ public package.
20
20
 
21
- `pnpm install` runs `prepare`, which builds `dist/`. Some of the checks below
22
- read the built bundle, so a fresh checkout is ready for them.
21
+ `pnpm install` runs `prepare` and builds `dist/`. Some checks below read the
22
+ built bundle, so a fresh checkout is already ready for them.
23
23
 
24
24
  ## The checks
25
25
 
@@ -32,94 +32,98 @@ read the built bundle, so a fresh checkout is ready for them.
32
32
 
33
33
  To run one test file, use `pnpm vitest run test/<name>.test.ts`.
34
34
 
35
- ## The rule this repository is most serious about: a real server, not a mocked `fetch`
35
+ ## 🔌 The rule this repository is most serious about: a real server, not a mocked `fetch`
36
36
 
37
37
  **The auth suites drive the SDK's own default `fetch` against a real
38
- `node:http` server** (`test/local-api.ts`), and no `fetch` option is passed to
39
- `createClient` in them.
38
+ `node:http` server** (`test/local-api.ts`) — no `fetch` option passed to
39
+ `createClient`.
40
40
 
41
- That is not ceremony. A suite that passes its own `fetch` never enters the code
42
- that actually ships: `client.ts` resolves `globalThis.fetch.bind(globalThis)`,
43
- and every assertion about "what the SDK sends" becomes an assertion about what
44
- a `vi.fn()` was asked to pretend to send. The two most expensive defects this
45
- package has had were both invisible to a mocked `fetch` and both obvious to a
46
- socket:
41
+ Not ceremony. A suite that supplies its own `fetch` never touches the code
42
+ that ships: `client.ts` resolves `globalThis.fetch.bind(globalThis)`, so "what
43
+ the SDK sends" becomes "what a `vi.fn()` agreed to pretend to send." This
44
+ package's two most expensive defects were both invisible to a mocked `fetch`
45
+ and both obvious to a socket:
47
46
 
48
47
  - `createClient` defaulted to a **detached** `globalThis.fetch`. A real
49
- browser's `fetch` is a Web IDL method that throws "Illegal invocation" unless
50
- its receiver is the global object. Node's undici does not enforce that check,
51
- so every test passed and every browser failed on the first call.
52
- - A path segment shaped like `../../../admin` reached a real server as a
53
- traversal, because the encoding was asserted against a double that never
54
- parsed the URL.
48
+ browser's `fetch` is a Web IDL method and throws "Illegal invocation"
49
+ unless the receiver is the global object; Node's undici doesn't check.
50
+ Every test passed, every browser failed on the first call.
51
+ - `../../../admin` reached a real server as a traversal — the encoding was
52
+ asserted against a double that never parsed the URL.
55
53
 
56
- So: **if your change is about what leaves the process, test it against
57
- `test/local-api.ts`.** A double is fine for testing branching, refcounting,
58
- timers and error mapping, and most of the suite uses one for exactly that.
54
+ **If your change touches what leaves the process, test it against
55
+ `test/local-api.ts`.** A double is fine for branching, refcounting, timers,
56
+ error mapping — most of the suite uses one for exactly that.
59
57
 
60
- `test/client.test.ts` carries a test named for this property on its own, so
61
- that removing it is visible in a diff rather than silent.
58
+ `test/client.test.ts` names a test for this property on its own, so removing
59
+ it shows up in a diff instead of in production.
62
60
 
63
61
  ## Licence headers
64
62
 
65
- Every source file carries the SPDX header `// SPDX-License-Identifier: MIT` as
66
- its first line — a `#!` shebang is the only thing allowed above it.
67
- `test/license-headers.test.ts` asserts this over the whole set, and it takes
68
- that set from `git ls-files` rather than from a list of directories, so a file
69
- added anywhere in the repository is swept the day it exists.
63
+ Every source file's first line is the SPDX header
64
+ `// SPDX-License-Identifier: MIT` — only a `#!` shebang may sit above it.
65
+ `test/license-headers.test.ts` checks the whole set, sourced from
66
+ `git ls-files` rather than a list of directories, so a new file is swept the
67
+ day it's added.
70
68
 
71
- ## Nothing internal reaches the published bytes
69
+ ## 📦 Nothing internal reaches the published bytes
72
70
 
73
71
  `tsup` bundles `@fleetless/contracts` **into** `dist/index.js` and
74
- `dist/index.cjs`, doc comments and all, and it writes the path each inlined
75
- module came from as a comment beside it. A comment written for the people who
76
- build this is therefore a comment an editor shows to somebody who installed it —
77
- and for four published versions that included German paragraphs, internal
78
- defect ids and an internal hostname, none of which appeared anywhere in this
79
- repository's source.
72
+ `dist/index.cjs` — doc comments and all — and writes the source path of each
73
+ inlined module as a comment beside it. A comment meant for the people who
74
+ build this is therefore a comment an editor shows to whoever installed it.
75
+ Four published versions did exactly that: German paragraphs, internal defect
76
+ ids, an internal hostname — none of it in this repository's source.
80
77
 
81
- Write a comment as what the code does for a caller. Never as how the behaviour
82
- was found, on which machine, under which internal ticket, or in which language
83
- the team happened to be thinking that day.
78
+ Write a comment for what the code does for a caller, not for how the
79
+ behaviour was found, on which machine, under which ticket, or in which
80
+ language the team happened to be thinking that day.
84
81
 
85
- `test/published-prose.test.ts` enforces it over `dist/`, `src/`, `test/`,
86
- `scripts/` and the shipped markdown, and it will tell you which class of thing
87
- came back and on which line.
82
+ `test/published-prose.test.ts` checks `dist/`, `src/`, `test/`, `scripts/`
83
+ and the shipped markdown, and names which class of thing came back and on
84
+ which line.
88
85
 
89
86
  ## Pull requests
90
87
 
91
- **The public repository is not open yet.** It will be, and this section
92
- describes how it will work then. Until it exists, send patches and questions to
93
- <hello@fleetless.dev>. Either way, raise anything that changes an existing
94
- method signature or what a method sends before you write it, so we can say what
95
- else has to move with it.
96
-
97
- **CI runs on GitLab.** This repository is mirrored from an internal GitLab
98
- instance, which is where the pipeline that verifies and publishes it lives. You
99
- will not see a check run on your GitHub pull request; a maintainer runs the
100
- same checks, and the result comes back as a review comment. Run
101
- `pnpm typecheck && pnpm test && pnpm run test:pack` yourself before you open the
102
- pull request and you will have seen everything CI would tell you.
88
+ **The public repository is not open yet.** It will be — this section
89
+ describes how it works once it is. Until then, send patches and questions to
90
+ <hello@fleetless.dev>. Either way: raise anything that changes an existing
91
+ method signature or what a method sends *before* you write it, so we can
92
+ tell you what else has to move with it.
93
+
94
+ **CI runs on GitHub Actions**, in this repository
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.
98
+
99
+ **Your pull request is verified, a fork's included** — the same suite, the
100
+ same file. GitHub holds a first-time contributor's first run until a
101
+ maintainer approves it, so the checks can sit idle for a while before they
102
+ start; that is the queue, not a failure. The run reads the code and nothing
103
+ else: it is granted `contents: read`, no secret is available to it, and
104
+ publishing lives in a workflow a pull request cannot trigger. Running
105
+ `pnpm typecheck && pnpm test && pnpm run test:pack` yourself first still
106
+ saves you a round trip — it is everything `verify` will tell you.
103
107
 
104
108
  ## The CLA
105
109
 
106
- The first pull request you open will ask you to sign a Contributor Licence
107
- Agreement. It grants Dehne Robotik GmbH the right to license your contribution
108
- under terms other than MIT in future — that is the whole of what it is for, and
109
- it is why the project can relicense its own code later without having to find
110
- every past contributor. It does not take your copyright away and it does not
111
- stop you from using your own contribution however you like.
110
+ Your first pull request will ask you to sign a Contributor Licence Agreement.
111
+ It grants Dehne Robotik GmbH the right to license your contribution under
112
+ terms other than MIT later — that's the whole point, and why the project can
113
+ relicense without hunting down every past contributor. It doesn't take your
114
+ copyright, and it doesn't stop you from using your own contribution however
115
+ you like.
112
116
 
113
117
  ## Commit messages
114
118
 
115
119
  [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/):
116
- `feat:`, `fix:`, `docs:`, `chore:`, `ci:`, `refactor:`, `test:`. A change that
117
- alters an existing method's signature or what it sends is a breaking change;
118
- say so with a `!` and a `BREAKING CHANGE:` footer, because it decides the next
120
+ `feat:`, `fix:`, `docs:`, `chore:`, `ci:`, `refactor:`, `test:`. Changing an
121
+ existing method's signature or what it sends is breaking — mark it with a
122
+ `!` and a `BREAKING CHANGE:` footer, since that's what decides the next
119
123
  version number.
120
124
 
121
- Everything in this repository is written in **English** — code, comments,
122
- commit messages, documentation.
125
+ Everything here is written in **English** — code, comments, commit messages,
126
+ documentation.
123
127
 
124
128
  ## Code of conduct
125
129
 
@@ -127,5 +131,6 @@ By participating you agree to the [Code of Conduct](CODE_OF_CONDUCT.md).
127
131
 
128
132
  ## Releasing (maintainers)
129
133
 
130
- See [RELEASING.md](RELEASING.md). The pipeline publishes; `npm publish` from a
131
- working tree is not how a version gets to the registry.
134
+ See RELEASING.md in the repository — it is not part of the published
135
+ package. The `release` workflow publishes; `npm publish` from a working tree
136
+ is not how a version gets to the registry.