@pollen-robotics/reachy-mini-sdk 1.8.0 → 1.8.1

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.
Files changed (67) hide show
  1. package/APP_CREATION_GUIDE.md +1795 -0
  2. package/README.md +2 -5
  3. package/dist/animation/distance.d.ts +87 -0
  4. package/dist/animation/distance.d.ts.map +1 -0
  5. package/dist/animation/distance.js +140 -0
  6. package/dist/animation/distance.js.map +1 -0
  7. package/dist/animation/index.d.ts +34 -0
  8. package/dist/animation/index.d.ts.map +1 -0
  9. package/dist/animation/index.js +33 -0
  10. package/dist/animation/index.js.map +1 -0
  11. package/dist/animation/pose.d.ts +40 -0
  12. package/dist/animation/pose.d.ts.map +1 -0
  13. package/dist/animation/pose.js +15 -0
  14. package/dist/animation/pose.js.map +1 -0
  15. package/dist/animation/presets.d.ts +85 -0
  16. package/dist/animation/presets.d.ts.map +1 -0
  17. package/dist/animation/presets.js +82 -0
  18. package/dist/animation/presets.js.map +1 -0
  19. package/dist/animation/safe-return.d.ts +90 -0
  20. package/dist/animation/safe-return.d.ts.map +1 -0
  21. package/dist/animation/safe-return.js +123 -0
  22. package/dist/animation/safe-return.js.map +1 -0
  23. package/dist/lib/reachy-mini.d.ts +99 -0
  24. package/dist/lib/reachy-mini.d.ts.map +1 -1
  25. package/dist/lib/reachy-mini.js +314 -9
  26. package/dist/lib/reachy-mini.js.map +1 -1
  27. package/dist/lib/types.d.ts +27 -0
  28. package/dist/lib/types.d.ts.map +1 -1
  29. package/host/README.md +14 -12
  30. package/host/dist/ReachyHost.d.ts +2 -1
  31. package/host/dist/ReachyHost.d.ts.map +1 -1
  32. package/host/dist/chunks/index-lMs2sCXG.js +439 -0
  33. package/host/dist/chunks/{mountHost-D7cgkU9Q.js → mountHost-DjE5zE9R.js} +11142 -11014
  34. package/host/dist/chunks/{reachy-mini-B1hlBmDQ.js → reachy-mini-GHNS4GSp.js} +494 -307
  35. package/host/dist/components/PickerView.d.ts.map +1 -1
  36. package/host/dist/components/PostOAuthSplash.d.ts +25 -0
  37. package/host/dist/components/PostOAuthSplash.d.ts.map +1 -0
  38. package/host/dist/components/ReachyHostShell.d.ts.map +1 -1
  39. package/host/dist/components/TopBar.d.ts +8 -1
  40. package/host/dist/components/TopBar.d.ts.map +1 -1
  41. package/host/dist/components/WelcomeBackOverlay.d.ts.map +1 -1
  42. package/host/dist/embed/index.d.ts +3 -2
  43. package/host/dist/embed/index.d.ts.map +1 -1
  44. package/host/dist/entry/auto.js +2 -2
  45. package/host/dist/entry/embed.js +2 -2
  46. package/host/dist/hooks/useHostBridge.d.ts +6 -0
  47. package/host/dist/hooks/useHostBridge.d.ts.map +1 -1
  48. package/host/dist/hooks/useSdk.d.ts.map +1 -1
  49. package/host/dist/index.js +3 -3
  50. package/host/dist/lib/protocol.d.ts +17 -3
  51. package/host/dist/lib/protocol.d.ts.map +1 -1
  52. package/host/dist/lib/settings.d.ts +3 -2
  53. package/host/dist/lib/settings.d.ts.map +1 -1
  54. package/host/dist/mountHost.d.ts.map +1 -1
  55. package/host/dist/ui/design/IdentityChipBar.d.ts +46 -0
  56. package/host/dist/ui/design/IdentityChipBar.d.ts.map +1 -0
  57. package/host/dist/ui/design/LinkQualityBars.d.ts +32 -0
  58. package/host/dist/ui/design/LinkQualityBars.d.ts.map +1 -0
  59. package/host/dist/ui/design/MetaPill.d.ts +41 -0
  60. package/host/dist/ui/design/MetaPill.d.ts.map +1 -0
  61. package/host/dist/ui/design/TransportChip.d.ts +39 -0
  62. package/host/dist/ui/design/TransportChip.d.ts.map +1 -0
  63. package/package.json +7 -4
  64. package/CHANGELOG.md +0 -188
  65. package/host/APP_AUTHOR_GUIDE.md +0 -646
  66. package/host/SPEC.md +0 -618
  67. package/host/dist/chunks/index-CyLPysJS.js +0 -400
package/CHANGELOG.md DELETED
@@ -1,188 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to `@pollen-robotics/reachy-mini-sdk` are
4
- documented here. The format follows
5
- [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions
6
- are kept in lock-step with the Reachy Mini Python daemon and are
7
- driven from `pyproject.toml` at the repo root (the npm publish CI
8
- overrides the `version` placeholder in `package.json`).
9
-
10
- The host shell shares this package's version (single source of
11
- truth); the wire protocol is versioned separately in
12
- `PROTOCOL_VERSION` (see [host/SPEC.md §11](./host/SPEC.md#11-backlog)).
13
-
14
- ## Unreleased — succeeds 1.7.3
15
-
16
- > **Breaking change.** Every app currently using
17
- > `@pollen-robotics/reachy-mini-host` has to update its imports
18
- > when it upgrades. Existing `1.7.x` installs keep working against
19
- > the legacy `reachy-mini-host@1.7.x` tarball that stays on npm;
20
- > only consumers who upgrade past `1.7.3` need to migrate. The
21
- > target version is intentionally left unset in this PR — it will
22
- > be picked at release time when `pyproject.toml` is bumped from
23
- > `1.7.3` to the next number (the npm publish CI mirrors that bump
24
- > into the package manifest).
25
-
26
- **Single-package release: `@pollen-robotics/reachy-mini-host` is folded
27
- into `@pollen-robotics/reachy-mini-sdk`.** App authors install,
28
- version, and import from one entry point. The old package stays
29
- available on npm at `1.7.x` for one minor cycle for graceful
30
- migration and will then be `npm deprecate`d with a pointer to the
31
- new subpaths.
32
-
33
- ### Migration
34
-
35
- ```diff
36
- - "@pollen-robotics/reachy-mini-host": "^1.7.x",
37
- - "@pollen-robotics/reachy-mini-sdk": "^1.7.x"
38
- + "@pollen-robotics/reachy-mini-sdk": "^<next-release>"
39
- ```
40
-
41
- ```diff
42
- - import { mountHost } from '@pollen-robotics/reachy-mini-host/auto';
43
- - import { connectToHost } from '@pollen-robotics/reachy-mini-host/embed';
44
- - import { PROTOCOL_VERSION } from '@pollen-robotics/reachy-mini-host/protocol';
45
- + import { mountHost } from '@pollen-robotics/reachy-mini-sdk/host/auto';
46
- + import { connectToHost } from '@pollen-robotics/reachy-mini-sdk/host/embed';
47
- + import { PROTOCOL_VERSION } from '@pollen-robotics/reachy-mini-sdk/host/protocol';
48
- ```
49
-
50
- The host CDN bundles also moved:
51
-
52
- ```diff
53
- - https://cdn.jsdelivr.net/npm/@pollen-robotics/reachy-mini-host@1/dist/entry/auto.js
54
- + https://cdn.jsdelivr.net/npm/@pollen-robotics/reachy-mini-sdk@1/host/dist/entry/auto.js
55
- ```
56
-
57
- ### Added
58
-
59
- - New subpath exports on `@pollen-robotics/reachy-mini-sdk`:
60
- - `./host` — `mountHost`, `connectToHost`, types
61
- - `./host/auto` — CDN auto bundle for standalone apps
62
- - `./host/embed` — CDN embed bundle for the iframe side
63
- - `./host/protocol` — `PROTOCOL_VERSION`, `decodeCredsFromHash`, etc.
64
- - `reachy-mini-sdk.d.ts` ships next to `reachy-mini-sdk.js` as the
65
- canonical SDK type surface. The host re-exports from there
66
- (`host/src/lib/sdk-types.ts` is now a thin barrel), removing the
67
- earlier duplication TODO.
68
-
69
- ### Changed
70
-
71
- - The host bundles (`./host`, `./host/auto`, `./host/embed`) now
72
- import the SDK runtime directly and self-assign
73
- `window.ReachyMini` (when unset) at module-load time, dispatching
74
- `reachymini:ready`. App `index.html` files no longer need a
75
- separate `<script type="module">` to load the SDK on the global,
76
- and `useSdk` + `connectToHost` no longer race against a
77
- late-arriving global. Apps that still set `window.ReachyMini`
78
- themselves are unaffected — we only assign when it's missing.
79
- - Log-prefix tag harmonised to `[reachy-mini-sdk/host]` /
80
- `[reachy-mini-sdk/host/embed]` for greppability.
81
- - Internal repo layout: `js/sdk/*` collapsed into `js/*` now that
82
- there is only one package. The host source lives at `js/host/`,
83
- the SDK runtime at `js/reachy-mini-sdk.js`, the package manifest
84
- at `js/package.json`. No effect on consumers; only the
85
- `repository.directory` field and the npm-publish CI working
86
- directory changed.
87
-
88
- ### Removed
89
-
90
- - Workspace coordinator `js/package.json` (was an npm workspace
91
- root) and `js/package-lock.json` at the workspace level. The
92
- single package's lockfile lives at `js/package-lock.json`.
93
- - `@pollen-robotics/reachy-mini-host` package manifest — the host
94
- ships under `@pollen-robotics/reachy-mini-sdk/host*` now. The
95
- legacy npm package stays on `1.7.x` for one minor cycle for
96
- graceful migration, then will be `npm deprecate`d.
97
-
98
- ### SDK changes drafted between 1.7.3 and the package merge
99
-
100
- The following landed on `main` after `1.7.3` was published but
101
- were never released on their own; they ship with this release:
102
-
103
- - **Breaking (SDK)**: `wakeUp()` and `gotoSleep()` now return
104
- `Promise<void>` (previously `boolean`). The promise resolves on
105
- the daemon's `{command, completed: true}` response, after the
106
- trajectory player has fully landed. Apps that previously relied
107
- on the boolean return are unaffected in practice; apps that
108
- *want* to await trajectory completion (e.g. to chain
109
- `setMotorMode("disabled")` after a `gotoSleep`) can now do so
110
- without racing.
111
- - **SDK**: both motion helpers take an optional `{ timeoutMs }`
112
- (default 8000 ms). The promise rejects on session teardown
113
- (`stopSession` / `disconnect`) so consumers never wait forever
114
- on an interrupted trajectory.
115
- - **SDK**: `POST /send` responses with a 4xx / 5xx status now
116
- produce a `console.warn` carrying the rejected message `type`
117
- and the response body, making racy `setPeerStatus` /
118
- `endSession` failures easier to diagnose.
119
- - **Host types**: `src/lib/sdk-types.ts` refreshed to cover the
120
- full SDK public surface (`autoConnect`, `gotoTarget`,
121
- `setMotorTorque`, `subscribeLogs`, `requestState`, version /
122
- hardware-id helpers, `robotState`, `isEmbedded`, jitter buffer
123
- option, `autoStartFromUrl`). The motion helpers now type as
124
- `Promise<void>` to match the SDK.
125
-
126
- ## 0.3.0 - 2026-05-16 (unreleased)
127
-
128
- **This release is a full rewrite of the package against
129
- [SPEC.md v1.0](./host/SPEC.md).** The public surface and the wire
130
- protocol both change in incompatible ways.
131
-
132
- ### Breaking changes
133
-
134
- - **API**: `mountHost()` options reduced to the documented surface
135
- (`appName`, `appIconUrl`, `appEmoji`, `enableMicrophone`,
136
- `clientId`, `devToken`, `target`). The following are removed:
137
- - `theme: { light, dark }` (host owns its bundled MUI theme).
138
- - `skipTheme` (no consumer-driven theming).
139
- - `skipAuth` (host owns OAuth).
140
- - **API**: `ConnectedHandle` reduced to the documented surface.
141
- The following are removed:
142
- - `sendCustom()` / `onCustom()` (no free-form bidi channel).
143
- - `requestConfigUpdate()` (apps don't push config upstream).
144
- - **API**: `devToken` payload renamed `{ token, username }` →
145
- `{ token, userName }` for camelCase consistency with `appName`
146
- and `hostName`.
147
- - **API**: `ConnectedHandle.username` renamed to `ConnectedHandle.userName`.
148
- - **Protocol**: `host:custom` / `embed:custom` removed.
149
- - **Protocol**: `embed:request-config-update` removed.
150
- - **Host shell**: removed the legacy `?app=<owner>/<space>`
151
- branding-swap behaviour. The host renders exactly the app it
152
- ships with, never another. Multi-app routing now lives in the
153
- mobile catalog only.
154
-
155
- ### Added
156
-
157
- - `SPEC.md` (v1.0): behavioural contract, state machines,
158
- 4 engineering invariants (single SDK per tab, token hygiene,
159
- bundle pinning, React Strict Mode safety).
160
- - `APP_AUTHOR_GUIDE.md`: step-by-step guide for building a new
161
- app on top of the host.
162
- - `REBUILD_PLAN.md`: project plan tracking the rewrite (deleted
163
- once 0.3.0 ships).
164
- - `LICENSE` (MIT).
165
-
166
- ### Changed
167
-
168
- - **Documentation**: replaced the legacy `SPEC.md` (823 lines,
169
- ambitious-future spec) with a focused v1.0 spec (~620 lines)
170
- matching what we actually want to ship.
171
- - **Package metadata**: `repository.url` now points at the
172
- host-only repo. `homepage` and `bugs` added.
173
- - **Versioning policy**: stays permissive pre-1.0 (see SPEC §11
174
- "Versioning policy"); each minor release between 0.x.y may
175
- ship breaking changes. Semver-strict starts at 1.0.
176
-
177
- ### Why a rewrite instead of a refactor
178
-
179
- See `REBUILD_PLAN.md` § "Why a rebuild, not a refactor". TL;DR:
180
- the API surface shrinks too much, and the previous code carried
181
- half-implemented features (protocol-version negotiation,
182
- heartbeat, custom channels) that were cheaper to retype than to
183
- selectively remove.
184
-
185
- ## 0.2.0 - 2026-05-15
186
-
187
- Initial extraction of the host shell into a standalone package.
188
- Predates the SPEC.md v1.0 rewrite; deprecated in favour of 0.3.0.