@pollen-robotics/reachy-mini-sdk 1.10.0-dev.0.main.9f78da7 → 1.10.0-dev.0.main.c8367cd

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 (121) hide show
  1. package/APP_CREATION_GUIDE.md +98 -0
  2. package/dist/lib/central-listener.d.ts +71 -0
  3. package/dist/lib/central-listener.d.ts.map +1 -0
  4. package/dist/lib/central-listener.js +277 -0
  5. package/dist/lib/central-listener.js.map +1 -0
  6. package/dist/lib/central-listener.test.d.ts +2 -0
  7. package/dist/lib/central-listener.test.d.ts.map +1 -0
  8. package/dist/lib/central-listener.test.js +378 -0
  9. package/dist/lib/central-listener.test.js.map +1 -0
  10. package/dist/lib/dc-watchdog.test.d.ts +2 -0
  11. package/dist/lib/dc-watchdog.test.d.ts.map +1 -0
  12. package/dist/lib/dc-watchdog.test.js +154 -0
  13. package/dist/lib/dc-watchdog.test.js.map +1 -0
  14. package/dist/lib/ensure-awake.test.d.ts +2 -0
  15. package/dist/lib/ensure-awake.test.d.ts.map +1 -0
  16. package/dist/lib/ensure-awake.test.js +117 -0
  17. package/dist/lib/ensure-awake.test.js.map +1 -0
  18. package/dist/lib/ice-grace.test.d.ts +2 -0
  19. package/dist/lib/ice-grace.test.d.ts.map +1 -0
  20. package/dist/lib/ice-grace.test.js +211 -0
  21. package/dist/lib/ice-grace.test.js.map +1 -0
  22. package/dist/lib/imu.test.d.ts +2 -0
  23. package/dist/lib/imu.test.d.ts.map +1 -0
  24. package/dist/lib/imu.test.js +78 -0
  25. package/dist/lib/imu.test.js.map +1 -0
  26. package/dist/lib/logger.d.ts +38 -0
  27. package/dist/lib/logger.d.ts.map +1 -0
  28. package/dist/lib/logger.js +81 -0
  29. package/dist/lib/logger.js.map +1 -0
  30. package/dist/lib/pending-replies.d.ts +127 -0
  31. package/dist/lib/pending-replies.d.ts.map +1 -0
  32. package/dist/lib/pending-replies.js +255 -0
  33. package/dist/lib/pending-replies.js.map +1 -0
  34. package/dist/lib/pending-replies.test.d.ts +2 -0
  35. package/dist/lib/pending-replies.test.d.ts.map +1 -0
  36. package/dist/lib/pending-replies.test.js +217 -0
  37. package/dist/lib/pending-replies.test.js.map +1 -0
  38. package/dist/lib/reachy-mini.d.ts +118 -94
  39. package/dist/lib/reachy-mini.d.ts.map +1 -1
  40. package/dist/lib/reachy-mini.js +427 -690
  41. package/dist/lib/reachy-mini.js.map +1 -1
  42. package/dist/lib/redial.test.d.ts +2 -0
  43. package/dist/lib/redial.test.d.ts.map +1 -0
  44. package/dist/lib/redial.test.js +206 -0
  45. package/dist/lib/redial.test.js.map +1 -0
  46. package/dist/lib/request.test.d.ts +2 -0
  47. package/dist/lib/request.test.d.ts.map +1 -0
  48. package/dist/lib/request.test.js +90 -0
  49. package/dist/lib/request.test.js.map +1 -0
  50. package/dist/lib/session-supervisor.d.ts +201 -0
  51. package/dist/lib/session-supervisor.d.ts.map +1 -0
  52. package/dist/lib/session-supervisor.js +520 -0
  53. package/dist/lib/session-supervisor.js.map +1 -0
  54. package/dist/lib/token-store.d.ts +50 -0
  55. package/dist/lib/token-store.d.ts.map +1 -0
  56. package/dist/lib/token-store.js +120 -0
  57. package/dist/lib/token-store.js.map +1 -0
  58. package/dist/lib/token-store.test.d.ts +2 -0
  59. package/dist/lib/token-store.test.d.ts.map +1 -0
  60. package/dist/lib/token-store.test.js +82 -0
  61. package/dist/lib/token-store.test.js.map +1 -0
  62. package/dist/lib/types.d.ts +261 -6
  63. package/dist/lib/types.d.ts.map +1 -1
  64. package/dist/lib/url-helpers.d.ts.map +1 -1
  65. package/dist/lib/url-helpers.js +3 -1
  66. package/dist/lib/url-helpers.js.map +1 -1
  67. package/dist/lib/version.d.ts +2 -0
  68. package/dist/lib/version.d.ts.map +1 -0
  69. package/dist/lib/version.js +5 -0
  70. package/dist/lib/version.js.map +1 -0
  71. package/dist/reachy-mini-sdk.d.ts +15 -1
  72. package/dist/reachy-mini-sdk.d.ts.map +1 -1
  73. package/dist/reachy-mini-sdk.js +12 -0
  74. package/dist/reachy-mini-sdk.js.map +1 -1
  75. package/host/dist/ReachyHost.d.ts.map +1 -1
  76. package/host/dist/chunks/centralRest-uXNMidlL.js +2315 -0
  77. package/host/dist/chunks/index-Beu4GNzi.js +821 -0
  78. package/host/dist/chunks/{mountHost-DztGlWwu.js → mountHost-BTTF4Uu9.js} +26739 -29305
  79. package/host/dist/components/DaemonUpdateGate.d.ts +65 -0
  80. package/host/dist/components/DaemonUpdateGate.d.ts.map +1 -0
  81. package/host/dist/components/ErrorView.d.ts.map +1 -1
  82. package/host/dist/components/HostErrorBoundary.d.ts +30 -0
  83. package/host/dist/components/HostErrorBoundary.d.ts.map +1 -0
  84. package/host/dist/components/PickerView.d.ts +16 -14
  85. package/host/dist/components/PickerView.d.ts.map +1 -1
  86. package/host/dist/components/PostOAuthSplash.d.ts +14 -9
  87. package/host/dist/components/PostOAuthSplash.d.ts.map +1 -1
  88. package/host/dist/components/ReachyHostShell.d.ts.map +1 -1
  89. package/host/dist/components/SignInView.d.ts.map +1 -1
  90. package/host/dist/components/TopBar.d.ts +5 -6
  91. package/host/dist/components/TopBar.d.ts.map +1 -1
  92. package/host/dist/embed/index.d.ts +8 -5
  93. package/host/dist/embed/index.d.ts.map +1 -1
  94. package/host/dist/entry/auto.js +2 -2
  95. package/host/dist/entry/embed.js +2 -2
  96. package/host/dist/hooks/useHostBridge.d.ts +35 -1
  97. package/host/dist/hooks/useHostBridge.d.ts.map +1 -1
  98. package/host/dist/hooks/useLatestDaemonVersion.d.ts +7 -0
  99. package/host/dist/hooks/useLatestDaemonVersion.d.ts.map +1 -0
  100. package/host/dist/hooks/useOAuth.d.ts +18 -0
  101. package/host/dist/hooks/useOAuth.d.ts.map +1 -1
  102. package/host/dist/hooks/useRobots.d.ts +0 -2
  103. package/host/dist/hooks/useRobots.d.ts.map +1 -1
  104. package/host/dist/index.js +3 -3
  105. package/host/dist/lib/daemonRelease.d.ts +84 -0
  106. package/host/dist/lib/daemonRelease.d.ts.map +1 -0
  107. package/host/dist/lib/protocol.d.ts +141 -7
  108. package/host/dist/lib/protocol.d.ts.map +1 -1
  109. package/host/dist/lib/rebootWatch.d.ts +51 -0
  110. package/host/dist/lib/rebootWatch.d.ts.map +1 -0
  111. package/host/dist/lib/sdk-types.d.ts +1 -1
  112. package/host/dist/lib/sdk-types.d.ts.map +1 -1
  113. package/host/dist/lib/sdkStaleness.d.ts +78 -0
  114. package/host/dist/lib/sdkStaleness.d.ts.map +1 -0
  115. package/host/dist/lib/settings.d.ts +16 -5
  116. package/host/dist/lib/settings.d.ts.map +1 -1
  117. package/package.json +9 -2
  118. package/host/dist/chunks/index-rW7LY0k3.js +0 -530
  119. package/host/dist/chunks/reachy-mini-DblK_lhG.js +0 -1749
  120. package/host/dist/lib/centralListener.d.ts +0 -73
  121. package/host/dist/lib/centralListener.d.ts.map +0 -1
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Daemon version gate for the standalone web shell. Two tiers: `block`
3
+ * below `MIN_SUPPORTED_DAEMON_VERSION`, a dismissable `notice` when
4
+ * merely behind latest - policy and rationale live in
5
+ * `lib/daemonRelease.ts` (and APP_CREATION_GUIDE §13.6). Web-only by
6
+ * construction: the mobile app points its iframe straight at the embed
7
+ * entry and runs its own gate, so this component is never mounted there.
8
+ *
9
+ * How an update ends
10
+ * ──────────────────
11
+ * The install finishes with a daemon restart, which kills the session.
12
+ * The embed reports that as `rebooting`, and from there the page has no
13
+ * link left to observe the robot: the shell tears the iframe down and
14
+ * hands us back over the picker, whose central polling tells us when
15
+ * the robot is online again. That is why this component never tries to
16
+ * resume the app itself - it returns the user to a picker that already
17
+ * knows how to reconnect.
18
+ */
19
+ import type { JSX } from 'react';
20
+ export interface DaemonUpdateProgress {
21
+ status: 'in_progress' | 'rebooting' | 'done' | 'failed';
22
+ line?: string | null;
23
+ error?: string | null;
24
+ }
25
+ export interface DaemonUpdateGateProps {
26
+ /** Daemon version the embed reported, or `null` while unknown. */
27
+ currentVersion: string | null;
28
+ /** Latest published release, or `null` when it can't be resolved. */
29
+ latestVersion: string | null;
30
+ /** Last `embed:update-progress` payload, or `null` before any. */
31
+ progress: DaemonUpdateProgress | null;
32
+ /** True once the robot we're updating is listed on central again
33
+ * AFTER having been seen absent at least once (the shell's
34
+ * offline-first reboot watch, see `lib/rebootWatch.ts` - a stale
35
+ * pre-reboot listing must not complete the gate). Only meaningful
36
+ * after the shell has torn the iframe down and resumed polling -
37
+ * `false` at every other point in the flow. */
38
+ robotBackOnline: boolean;
39
+ /** True once the embedded app is interactive. The soft notice waits
40
+ * for it so an optional offer doesn't land on top of the connecting
41
+ * splash; the blocking tier ignores it, since the whole point is to
42
+ * stop the user before the app opens. */
43
+ appLive: boolean;
44
+ /** Ask the embed to start the daemon update. */
45
+ onStartUpdate(): void;
46
+ /** The gate gave up on the update (its stall timer fired with the
47
+ * session still alive). The shell should relay `host:cancel-update`
48
+ * so the embed disarms its update-mode plumbing (sessionStopped
49
+ * translator + auto-reconnect stand-down) - otherwise the user's
50
+ * next NORMAL end-session replays a stale `rebooting` frame. */
51
+ onCancelUpdate?(): void;
52
+ /** Escape from the blocking tier: end the session and return to the
53
+ * picker. The block only paints AFTER `startSession()` succeeded
54
+ * (that's when `daemonVersion` arrives), so a live session and an
55
+ * awake robot sit behind the overlay - without this, closing the
56
+ * tab is the only way to release the app-slot lock. */
57
+ onExitApp?(): void;
58
+ /** The session is over (the daemon is restarting): drop the iframe
59
+ * and go back to the picker, keeping this overlay on top. */
60
+ onSessionLost(): void;
61
+ /** Dismiss the gate for the rest of this session. */
62
+ onDismiss(): void;
63
+ }
64
+ export declare function DaemonUpdateGate({ currentVersion, latestVersion, progress, robotBackOnline, appLive, onStartUpdate, onCancelUpdate, onExitApp, onSessionLost, onDismiss, }: DaemonUpdateGateProps): JSX.Element | null;
65
+ //# sourceMappingURL=DaemonUpdateGate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DaemonUpdateGate.d.ts","sourceRoot":"","sources":["../../src/components/DaemonUpdateGate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAyCjC,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;IACxD,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,qEAAqE;IACrE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kEAAkE;IAClE,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC;;;;;oDAKgD;IAChD,eAAe,EAAE,OAAO,CAAC;IACzB;;;8CAG0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,aAAa,IAAI,IAAI,CAAC;IACtB;;;;qEAIiE;IACjE,cAAc,CAAC,IAAI,IAAI,CAAC;IACxB;;;;4DAIwD;IACxD,SAAS,CAAC,IAAI,IAAI,CAAC;IACnB;kEAC8D;IAC9D,aAAa,IAAI,IAAI,CAAC;IACtB,qDAAqD;IACrD,SAAS,IAAI,IAAI,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,cAAc,EACd,aAAa,EACb,QAAQ,EACR,eAAe,EACf,OAAO,EACP,aAAa,EACb,cAAc,EACd,SAAS,EACT,aAAa,EACb,SAAS,GACV,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAsO5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorView.d.ts","sourceRoot":"","sources":["../../src/components/ErrorView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,IAAI,IAAI,CAAC;IACjB,cAAc,IAAI,IAAI,CAAC;CACxB;AAED,wBAAgB,SAAS,CAAC,EACxB,KAA8B,EAC9B,OAAO,EACP,MAAM,EACN,QAAQ,EACR,cAAc,GACf,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CA+D9B"}
1
+ {"version":3,"file":"ErrorView.d.ts","sourceRoot":"","sources":["../../src/components/ErrorView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAMjC,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,IAAI,IAAI,CAAC;IACjB,cAAc,IAAI,IAAI,CAAC;CACxB;AAED,wBAAgB,SAAS,CAAC,EACxB,KAA8B,EAC9B,OAAO,EACP,MAAM,EACN,QAAQ,EACR,cAAc,GACf,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAiE9B"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Top-level React error boundary for the host shell.
3
+ *
4
+ * A render-time throw anywhere in `ReachyHostShell` (a bad payload, a
5
+ * component bug, a null deref) would otherwise white-screen the whole
6
+ * host with no recovery path. This boundary catches it, logs the stack,
7
+ * and shows a themed fallback with a single outlined "Reload" action -
8
+ * a full page reload is the only safe recovery once the React tree is
9
+ * in an unknown state (the shell's own `error` phase can't be trusted
10
+ * after an uncaught render error).
11
+ *
12
+ * Mounted INSIDE the `ThemeProvider` (see `ReachyHost`) so the fallback
13
+ * inherits the host theme (colors, dark mode).
14
+ */
15
+ import { Component, type ErrorInfo, type ReactNode } from 'react';
16
+ export interface HostErrorBoundaryProps {
17
+ children: ReactNode;
18
+ }
19
+ interface HostErrorBoundaryState {
20
+ error: Error | null;
21
+ }
22
+ export declare class HostErrorBoundary extends Component<HostErrorBoundaryProps, HostErrorBoundaryState> {
23
+ state: HostErrorBoundaryState;
24
+ static getDerivedStateFromError(error: Error): HostErrorBoundaryState;
25
+ componentDidCatch(error: Error, info: ErrorInfo): void;
26
+ private readonly handleReload;
27
+ render(): ReactNode;
28
+ }
29
+ export {};
30
+ //# sourceMappingURL=HostErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HostErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/HostErrorBoundary.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWlE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,sBAAsB;IAC9B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,qBAAa,iBAAkB,SAAQ,SAAS,CAC9C,sBAAsB,EACtB,sBAAsB,CACvB;IACC,KAAK,EAAE,sBAAsB,CAAmB;IAEhD,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,sBAAsB;IAIrE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI;IAQtD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAE3B;IAEF,MAAM,IAAI,SAAS;CAsCpB"}
@@ -7,8 +7,8 @@
7
7
  * ┌──────────────────────────────────────────┐
8
8
  * │ (reachy-buste) │
9
9
  * │ │
10
- * │ Your Reachies │
11
- * │ N online · linked to your HF account │
10
+ * │ Your Reachies ( ↻ ) │ ← discreet auto-spinner,
11
+ * │ N online · linked to your HF account │ right of the title
12
12
  * │ │
13
13
  * │ ┌────────────────────────────────┐ │
14
14
  * │ │ [reachy] ● Name > │ │
@@ -16,24 +16,30 @@
16
16
  * │ ┌────────────────────────────────┐ │
17
17
  * │ │ [reachy] ● Other 🔒 │ │ (busy)
18
18
  * │ └────────────────────────────────┘ │
19
- * │ │
20
- * │ ────────────────────────────────────────│
21
- * │ ↻ Refresh │ Sticky bottom
22
19
  * └──────────────────────────────────────────┘
23
20
  *
24
21
  * - Hero illustration: `reachy-buste.svg`, same asset as the
25
22
  * splash, gives the screen a brand identity beyond the cards.
26
23
  * - Robot cards: avatar + name + hardware-id tag + trailing
27
24
  * chevron (or lock when busy).
28
- * - Sticky refresh: pinned to the bottom, out of the scrollable
29
- * area, so it's always one tap away.
25
+ * - Refresh: NOT a button anymore. The list refreshes on its own
26
+ * (realtime SSE + a 60 s safety-net poll in `useRobots`), so the
27
+ * former sticky "Refresh" button was pure redundancy. Mirroring
28
+ * the mobile ScanScreen, it's now a discreet NON-interactive
29
+ * spinner to the right of the title, faded in while a fetch is
30
+ * in flight.
31
+ * - Quiet initial load: the very first fetch (no data yet) collapses
32
+ * the whole screen to a single centered spinner - no hero, no
33
+ * header - so the first paint is calm while we wait on central.
30
34
  */
31
35
  import type { JSX } from 'react';
32
36
  import type { RobotInfo } from '../lib/sdk-types';
33
37
  export interface PickerViewProps {
34
38
  robots: RobotInfo[];
35
- /** `true` while the picker is fetching its first robot list or
36
- * the user just clicked "Refresh" - drives the header spinner. */
39
+ /** Any in-flight central fetch (initial load, safety-net poll, or
40
+ * SSE-triggered refetch). Drives the discreet auto-spinner to the
41
+ * right of the title; with no data yet, also the quiet initial
42
+ * paint (a bare centered spinner, no hero / header). */
37
43
  isRefreshing: boolean;
38
44
  /** Last error message from the central listener / REST fetch,
39
45
  * or `null` if everything's healthy. Surfaces as an error state
@@ -42,10 +48,6 @@ export interface PickerViewProps {
42
48
  error?: string | null;
43
49
  preselectedRobotId: string | null;
44
50
  onSelect(robotId: string): void;
45
- /** Asks the picker source to re-fetch the robot list. Defaults
46
- * to a no-op if the host has nothing to refresh; the spinner
47
- * still plays for ~1 s as visual feedback. */
48
- onRefresh?(): void;
49
51
  }
50
- export declare function PickerView({ robots, isRefreshing, error, preselectedRobotId, onSelect, onRefresh, }: PickerViewProps): JSX.Element;
52
+ export declare function PickerView({ robots, isRefreshing, error, preselectedRobotId, onSelect, }: PickerViewProps): JSX.Element;
51
53
  //# sourceMappingURL=PickerView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PickerView.d.ts","sourceRoot":"","sources":["../../src/components/PickerView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAkBjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB;uEACmE;IACnE,YAAY,EAAE,OAAO,CAAC;IACtB;;;+BAG2B;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;mDAE+C;IAC/C,SAAS,CAAC,IAAI,IAAI,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,YAAY,EACZ,KAAK,EACL,kBAAkB,EAClB,QAAQ,EACR,SAAS,GACV,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAkF/B"}
1
+ {"version":3,"file":"PickerView.d.ts","sourceRoot":"","sources":["../../src/components/PickerView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAiBjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB;;;6DAGyD;IACzD,YAAY,EAAE,OAAO,CAAC;IACtB;;;+BAG2B;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,YAAY,EACZ,KAAK,EACL,kBAAkB,EAClB,QAAQ,GACT,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CA8F/B"}
@@ -1,15 +1,20 @@
1
1
  /**
2
- * Covering splash shown on the OAuth return leg, while the SDK
3
- * resolves the cached token via `authenticate()`.
2
+ * Covering splash for the OAuth return leg, while the SDK resolves the
3
+ * cached token via `authenticate()`. Shows the HF logo and the
4
+ * "Signing you in…" heading: the user DID just authorise on
5
+ * huggingface.co, so both are promises we know we're keeping. (The
6
+ * plain boot leg - auth state still unknown - renders a bare neutral
7
+ * spinner inlined in `ReachyHostShell` instead: no OAuth branding for
8
+ * a user who didn't just sign in.)
4
9
  *
5
- * Without it the host would render `SignInView` (the "Continue
6
- * with Hugging Face" button) for the ~30-500 ms the in-flight
7
- * `authenticate()` takes, so the user briefly bounces back to the
8
- * sign-in button after already authorising on huggingface.co.
10
+ * Without this splash the host would render `SignInView` (the
11
+ * "Continue with Hugging Face" button) for the ~30-500 ms the
12
+ * in-flight `authenticate()` takes, so an authenticated user would
13
+ * briefly bounce back to the sign-in button.
9
14
  *
10
- * This splash deliberately mirrors `WelcomeBackOverlay`'s frame
11
- * (same `background.default` fill, same centred HF logo) so the
12
- * transition reads as one continuous beat:
15
+ * It deliberately mirrors `WelcomeBackOverlay`'s frame (same
16
+ * `background.default` fill, same centred HF logo) so the transition
17
+ * reads as one continuous beat:
13
18
  *
14
19
  * PostOAuthSplash (logo + spinner, no name)
15
20
  * → WelcomeBackOverlay ("Hello, <name>")
@@ -1 +1 @@
1
- {"version":3,"file":"PostOAuthSplash.d.ts","sourceRoot":"","sources":["../../src/components/PostOAuthSplash.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AA6BjC,wBAAgB,eAAe,IAAI,GAAG,CAAC,OAAO,CAuD7C"}
1
+ {"version":3,"file":"PostOAuthSplash.d.ts","sourceRoot":"","sources":["../../src/components/PostOAuthSplash.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAmCjC,wBAAgB,eAAe,IAAI,GAAG,CAAC,OAAO,CA2D7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"ReachyHostShell.d.ts","sourceRoot":"","sources":["../../src/components/ReachyHostShell.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjC,OAAO,KAAK,EAAE,kBAAkB,EAAa,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAEL,KAAK,aAAa,EAGlB,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AAoBzB,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAE/B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IAEjB,KAAK,EAAE,SAAS,CAAC;IACjB,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B;sCACkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;mEAC+D;IAC/D,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AA6DD,wBAAgB,eAAe,CAC7B,KAAK,EAAE,oBAAoB,GAC1B,GAAG,CAAC,OAAO,CAWb"}
1
+ {"version":3,"file":"ReachyHostShell.d.ts","sourceRoot":"","sources":["../../src/components/ReachyHostShell.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAQjC,OAAO,KAAK,EAAE,kBAAkB,EAAa,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAIL,KAAK,aAAa,EAGlB,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AAwDzB,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAE/B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IAEjB,KAAK,EAAE,SAAS,CAAC;IACjB,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B;sCACkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;mEAC+D;IAC/D,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AA6DD,wBAAgB,eAAe,CAC7B,KAAK,EAAE,oBAAoB,GAC1B,GAAG,CAAC,OAAO,CAWb"}
@@ -1 +1 @@
1
- {"version":3,"file":"SignInView.d.ts","sourceRoot":"","sources":["../../src/components/SignInView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,OAAO,CAAC;AAgB5C,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB;;;uDAGmD;IACnD,uBAAuB,EAAE,OAAO,CAAC;IACjC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,uBAAuB,EACvB,QAAQ,GACT,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAqK/B"}
1
+ {"version":3,"file":"SignInView.d.ts","sourceRoot":"","sources":["../../src/components/SignInView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,OAAO,CAAC;AAgB5C,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,CAAC;IAChB;;;uDAGmD;IACnD,uBAAuB,EAAE,OAAO,CAAC;IACjC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,uBAAuB,EACvB,QAAQ,GACT,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAyK/B"}
@@ -9,17 +9,16 @@
9
9
  *
10
10
  * Layout (signed in, streaming):
11
11
  *
12
- * [ logo ] Telepresence [ ⏻ End session ] [ avatar @user ▾ ]
12
+ * [ logo ] Telepresence [ End session ⏻ ] [ avatar @user ▾ ]
13
13
  *
14
14
  * UX rationale
15
15
  * ────────────
16
16
  * The destructive actions are visually distinct:
17
- * - "End session" is a labeled red button that ONLY renders while a
18
- * session is live. When there's no session it disappears, so the
17
+ * - "End session" is a labeled primary outlined button that ONLY renders
18
+ * while a session is live. When there's no session it disappears, so the
19
19
  * bar isn't cluttered with a permanent disabled glyph.
20
- * - "Sign out" lives inside an account menu opened by clicking the
21
- * avatar+username chip. Standard "click your face to see account
22
- * actions" pattern, prevents accidental sign-out clicks.
20
+ * - "Sign out" is a primary-colored logout icon button sitting to the
21
+ * right of the (borderless) account chip, mirroring the mobile app.
23
22
  *
24
23
  * Signed-out
25
24
  * ──────────
@@ -1 +1 @@
1
- {"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../../src/components/TopBar.t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GACV,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB;+CAC2C;IAC3C,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;kDAC8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;wEACoE;IACpE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC;;sDAEkD;IAClD,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC;qEACiE;IACjE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,IAAI,IAAI,CAAC;IAClB,YAAY,IAAI,IAAI,CAAC;CACtB;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,UAAiB,EACjB,QAAe,EACf,SAAS,EACT,QAAQ,EACR,SAAgB,EAChB,iBAAwB,EACxB,sBAA6B,EAC7B,SAAgB,EAChB,SAAS,EACT,YAAY,GACb,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA0J3B"}
@@ -23,8 +23,9 @@
23
23
  * 5. Wait for `host:init` (2 s soft timeout; on hit we proceed
24
24
  * from the hash creds alone via `liveStateFromCreds`, which
25
25
  * carries the same fields as `liveStateFromInit`).
26
- * 6. `connect()` → `startSession()` → `ensureAwake()`, emitting
27
- * `embed:app-state` at each step.
26
+ * 6. `connect()` → `startSession()` → wake (awaiting the full wake-up
27
+ * trajectory, not fire-and-forget), emitting `embed:app-state` at each
28
+ * step.
28
29
  * 7. Resolve `connectToHost()` with the live SDK handle.
29
30
  *
30
31
  * Strict Mode safety (APP_CREATION_GUIDE §13.5.4): the function is idempotent
@@ -115,9 +116,11 @@ export interface ConnectedHandle<TConfig = unknown> {
115
116
  */
116
117
  readonly media: RobotMedia;
117
118
  /** Register a teardown callback. Fires on `host:leaving`
118
- * (one-shot) or `pagehide`. Return a promise to keep the host
119
- * waiting (bounded by the host's `timeoutMs`). Returns an
120
- * unsubscribe function. */
119
+ * (one-shot) or `pagehide`. Callbacks are fire-and-forget: a
120
+ * returned promise is NOT awaited, but on the graceful-leave
121
+ * path async cleanup still gets several seconds of wall time
122
+ * because the `embed:left` ack only goes out after the sleep +
123
+ * motors-off sequence. Returns an unsubscribe function. */
121
124
  onLeave(cb: () => void | Promise<void>): () => void;
122
125
  /** Register a theme-change handler. */
123
126
  onThemeChange(cb: (theme: ThemeMode) => void): () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/embed/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,KAAK,EACV,iBAAiB,EACjB,QAAQ,EAMR,SAAS,EACV,MAAM,iBAAiB,CAAC;AAazB;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,EAAE,gBAAgB,GAAG,MAAM,IAAI,CAAC;IAC9C;;;;;;;OAOG;IACH,QAAQ,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IACzC;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;CACxC;AAED,8DAA8D;AAC9D,MAAM,WAAW,eAAe,CAAC,OAAO,GAAG,OAAO;IAChD,kEAAkE;IAClE,MAAM,EAAE,kBAAkB,CAAC;IAC3B,kDAAkD;IAClD,KAAK,EAAE,SAAS,CAAC;IACjB;+CAC2C;IAC3C,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,8CAA8C;IAC9C,OAAO,EAAE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MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,CAAC;IACpD,aAAa,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC1D,cAAc,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IACjE,WAAW,CAAC,KAAK,EAAE;QACjB,KAAK,EAAE,QAAQ,CAAC;QAChB,cAAc,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;QAC1C,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,GAAG,IAAI,CAAC;IACT,YAAY,IAAI,IAAI,CAAC;IACrB,WAAW,CACT,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAC3C,IAAI,CAAC;CACT;AAuCD;8BAC8B;AAC9B,wBAAsB,aAAa,CAAC,OAAO,GAAG,OAAO,EACnD,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAKnC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,GAAG,OAAO,EAC5D,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAOnC"}
@@ -1,5 +1,5 @@
1
- import { R as i } from "../chunks/reachy-mini-DblK_lhG.js";
2
- import { m as n } from "../chunks/mountHost-DztGlWwu.js";
1
+ import { R as i } from "../chunks/centralRest-uXNMidlL.js";
2
+ import { m as n } from "../chunks/mountHost-BTTF4Uu9.js";
3
3
  typeof window < "u" && (window.ReachyMini || (window.ReachyMini = i, window.dispatchEvent(new Event("reachymini:ready"))), window.ReachyMiniHost = { mountHost: n });
4
4
  export {
5
5
  n as mountHost
@@ -1,5 +1,5 @@
1
- import { R as i } from "../chunks/reachy-mini-DblK_lhG.js";
2
- import { a as n, c as o } from "../chunks/index-rW7LY0k3.js";
1
+ import { R as i } from "../chunks/centralRest-uXNMidlL.js";
2
+ import { a as n, c as o } from "../chunks/index-Beu4GNzi.js";
3
3
  typeof window < "u" && (window.ReachyMini || (window.ReachyMini = i, window.dispatchEvent(new Event("reachymini:ready"))), window.ReachyMiniHostEmbed = { connectToHost: o, connectToHostCredsOnly: n });
4
4
  export {
5
5
  o as connectToHost,
@@ -1,4 +1,4 @@
1
- import type { AppConnectingStep, AppPhase, ConfigPayload, HostInitMsg, LeavingReason, ThemeMode } from '../lib/protocol';
1
+ import type { AppConnectingStep, AppPhase, ConfigPayload, EmbedUpdateProgressMsg, HostInitMsg, LeavingReason, ThemeMode } from '../lib/protocol';
2
2
  export interface EmbedAppState {
3
3
  phase: AppPhase;
4
4
  connectingStep: AppConnectingStep | null;
@@ -9,6 +9,16 @@ export interface EmbedAppState {
9
9
  * TRUE link-latency signal available; `null` when not yet measured
10
10
  * or unavailable (e.g. iOS WKWebView). */
11
11
  rttMs: number | null;
12
+ /** Daemon version the embed read over its data channel, or `null`
13
+ * while unknown (not yet resolved, or a daemon predating
14
+ * `get_version`). The shell has no channel of its own, so this is
15
+ * its only version signal - see `DaemonUpdateGate`. */
16
+ daemonVersion: string | null;
17
+ /** Build version of the SDK bundle the app loaded, or `null` when
18
+ * the SDK predates the field (see `sdkVersion` in protocol.ts).
19
+ * The web shell itself has no use for it (same bundle as the
20
+ * embed); parsed for consumers that update independently. */
21
+ sdkVersion: string | null;
12
22
  }
13
23
  export interface UseHostBridgeOptions {
14
24
  /** Called once per session, when the embed posts
@@ -20,6 +30,11 @@ export interface UseHostBridgeOptions {
20
30
  /** App requests a clean leave (in-app button, etc.). Host
21
31
  * should run the same tear-down as a user-initiated end. */
22
32
  onRequestLeave(): void;
33
+ /** App finished its `host:leaving` tear-down (onLeave + the SDK's
34
+ * host-owned sleep/disable). The host can unmount now instead of
35
+ * waiting out its safety cap. Optional, like every additive
36
+ * callback: implementers outside this repo stay source-compatible. */
37
+ onLeft?(): void;
23
38
  /** App reported an error. Fatal errors should switch the host
24
39
  * to ErrorView; non-fatal can be toasted or logged. */
25
40
  onError(payload: {
@@ -27,6 +42,16 @@ export interface UseHostBridgeOptions {
27
42
  fatal: boolean;
28
43
  detail?: unknown;
29
44
  }): void;
45
+ /** Progress of a daemon update the host asked for via
46
+ * `sendStartUpdate`. Optional: hosts that never trigger one will
47
+ * never see these. */
48
+ onUpdateProgress?(payload: EmbedUpdateProgress): void;
49
+ }
50
+ /** Payload of an `embed:update-progress` envelope. */
51
+ export interface EmbedUpdateProgress {
52
+ status: EmbedUpdateProgressMsg['status'];
53
+ line: string | null;
54
+ error: string | null;
30
55
  }
31
56
  export interface HostBridge {
32
57
  /** `host:init`. Sends credentials + initial state to the embed. */
@@ -38,6 +63,15 @@ export interface HostBridge {
38
63
  /** `host:leaving`. Notify the embed to tear down. The host
39
64
  * unmounts the iframe after `timeoutMs` regardless. */
40
65
  sendLeaving(iframe: HTMLIFrameElement, reason: LeavingReason, timeoutMs: number): void;
66
+ /** `host:start-update`. Ask the embed to run the daemon's PyPI
67
+ * self-update on our behalf (only it holds a data channel).
68
+ * Fire-and-forget: an embed too old to know the message ignores it,
69
+ * so callers MUST have their own timeout. */
70
+ sendStartUpdate(iframe: HTMLIFrameElement, preRelease?: boolean): void;
71
+ /** `host:cancel-update`. The host gave up on the update (stall
72
+ * timeout): the embed should disarm its update-mode plumbing.
73
+ * Fire-and-forget, additive - older embeds ignore it. */
74
+ sendCancelUpdate(iframe: HTMLIFrameElement): void;
41
75
  }
42
76
  export declare function useHostBridge(opts: UseHostBridgeOptions): HostBridge;
43
77
  //# sourceMappingURL=useHostBridge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useHostBridge.d.ts","sourceRoot":"","sources":["../../src/hooks/useHostBridge.ts"],"names":[],"mappings":"AAqBA,O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UAAU;IACzB,mEAAmE;IACnE,QAAQ,CACN,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC,GACxD,IAAI,CAAC;IACR,gEAAgE;IAChE,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACpE,kEAAkE;IAClE,iBAAiB,CACf,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,aAAa,GACpB,IAAI,CAAC;IACR;4DACwD;IACxD,WAAW,CACT,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,GAChB,IAAI,CAAC;IACR;;;kDAG8C;IAC9C,eAAe,CAAC,MAAM,EAAE,iBAAiB,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvE;;8DAE0D;IAC1D,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACnD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,UAAU,CA4JpE"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Latest daemon version, or `null` until it resolves / when it can't be
3
+ * determined. Kicks off a single fetch on mount; `fetchLatestDaemonVersion`
4
+ * serves its localStorage cache when fresh, so this is usually instant.
5
+ */
6
+ export declare function useLatestDaemonVersion(): string | null;
7
+ //# sourceMappingURL=useLatestDaemonVersion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLatestDaemonVersion.d.ts","sourceRoot":"","sources":["../../src/hooks/useLatestDaemonVersion.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CActD"}
@@ -7,10 +7,28 @@ export interface OAuthState {
7
7
  /** Boot started from an OAuth redirect (i.e. `oauth-pending`
8
8
  * flag was set). Reset once `isAuthenticated` flips true. */
9
9
  isPostOauthReturn: boolean;
10
+ /** `false` until the boot-time `authenticate()` settles (or we
11
+ * know synchronously there's nothing to resolve). The shell
12
+ * uses this to keep a neutral splash up instead of flashing
13
+ * `SignInView` while the cached token is still resolving. */
14
+ authResolved: boolean;
10
15
  /** Async wrapper around `sdk.login()`. */
11
16
  signIn(): Promise<void>;
12
17
  /** Sync wrapper around `sdk.logout()` + mark signed-out. */
13
18
  signOut(): void;
14
19
  }
20
+ /**
21
+ * How long the boot splash may wait for the SDK bundle before giving
22
+ * up on auth resolution. Every path that resolves `authResolved`
23
+ * requires an `sdk` instance; if the bundle never loads (blocked CDN,
24
+ * stale Space asset, broken build) nothing would ever flip it and the
25
+ * shell would hold its neutral splash forever. Past this grace we
26
+ * declare "not signed in" so the shell lands on SignInView - with its
27
+ * local-dev missing-config hint, the one screen that can explain the
28
+ * situation. A late-arriving SDK still runs `authenticate()` and
29
+ * upgrades the state; the SignInView flash in that race is the
30
+ * accepted cost of never spinning forever.
31
+ */
32
+ export declare const SDK_LOAD_GRACE_MS = 8000;
15
33
  export declare function useOAuth(sdk: ReachyMiniInstance | null): OAuthState;
16
34
  //# sourceMappingURL=useOAuth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useOAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useOAuth.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAW3D,MAAM,WAAW,UAAU;IACzB,+DAA+D;IAC/D,eAAe,EAAE,OAAO,CAAC;IACzB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;kEAC8D;IAC9D,iBAAiB,EAAE,OAAO,CAAC;IAC3B,0CAA0C;IAC1C,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,4DAA4D;IAC5D,OAAO,IAAI,IAAI,CAAC;CACjB;AAsBD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI,GAAG,UAAU,CAsInE"}
1
+ {"version":3,"file":"useOAuth.d.ts","sourceRoot":"","sources":["../../src/hooks/useOAuth.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAgB3D,MAAM,WAAW,UAAU;IACzB,+DAA+D;IAC/D,eAAe,EAAE,OAAO,CAAC;IACzB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;kEAC8D;IAC9D,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;kEAG8D;IAC9D,YAAY,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,4DAA4D;IAC5D,OAAO,IAAI,IAAI,CAAC;CACjB;AAsBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,OAAQ,CAAC;AA2BvC,wBAAgB,QAAQ,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI,GAAG,UAAU,CAyLnE"}
@@ -7,8 +7,6 @@ export interface RobotsState {
7
7
  isRefreshing: boolean;
8
8
  /** Last error message or null. */
9
9
  error: string | null;
10
- /** Trigger an immediate REST refresh. */
11
- refresh(): void;
12
10
  }
13
11
  export declare function useRobots(opts: {
14
12
  hfToken: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"useRobots.d.ts","sourceRoot":"","sources":["../../src/hooks/useRobots.ts"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAIlD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,kDAAkD;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,YAAY,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,yCAAyC;IACzC,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,WAAW,CAqId"}
1
+ {"version":3,"file":"useRobots.d.ts","sourceRoot":"","sources":["../../src/hooks/useRobots.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAMlD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,kDAAkD;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,YAAY,EAAE,OAAO,CAAC;IACtB,kCAAkC;IAClC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,WAAW,CAwJd"}
@@ -1,6 +1,6 @@
1
- import { R as o } from "./chunks/reachy-mini-DblK_lhG.js";
2
- import { R as i, m as a } from "./chunks/mountHost-DztGlWwu.js";
3
- import { c as r, a as c } from "./chunks/index-rW7LY0k3.js";
1
+ import { R as o } from "./chunks/centralRest-uXNMidlL.js";
2
+ import { R as i, m as a } from "./chunks/mountHost-BTTF4Uu9.js";
3
+ import { c as r, a as c } from "./chunks/index-Beu4GNzi.js";
4
4
  import { PROTOCOL_VERSION as m, decodeCredsFromHash as w, encodeCredsToHash as h, isProtocolMessage as y } from "./lib/protocol.js";
5
5
  typeof window < "u" && !window.ReachyMini && (window.ReachyMini = o, window.dispatchEvent(new Event("reachymini:ready")));
6
6
  export {
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Daemon version policy for the standalone web shell.
3
+ *
4
+ * Why the shell cares
5
+ * ───────────────────
6
+ * A Space runs against whatever daemon the user's robot happens to have.
7
+ * Neither central nor the host holds a data channel, so the only version
8
+ * signal is the one the embed forwards on `embed:app-state` once its
9
+ * session is up (`daemonVersion`).
10
+ *
11
+ * Why this is softer than the mobile app
12
+ * ──────────────────────────────────────
13
+ * The mobile app blocks the moment the daemon is behind the latest
14
+ * GitHub release. That is defensible for a controlled first-party
15
+ * funnel; it is not for the web, where every published Space would turn
16
+ * a daemon release into a global kill switch for robots that were
17
+ * working fine a minute earlier. So the web policy has two tiers:
18
+ *
19
+ * block - the daemon is below `MIN_SUPPORTED_DAEMON_VERSION`, i.e.
20
+ * too old for the app contract to hold. Blocking is the only
21
+ * honest answer.
22
+ * notice - the daemon merely trails the latest release. Dismissable
23
+ * banner, the app stays usable.
24
+ *
25
+ * Fail-open discipline
26
+ * ────────────────────
27
+ * Every unknown resolves to "no action". An unparseable version, a
28
+ * daemon too old to answer `get_version`, an offline or rate-limited
29
+ * GitHub: none of these may ever cost the user their app. We only act
30
+ * on versions we positively understand.
31
+ */
32
+ /**
33
+ * Floor below which the shell refuses to run an app.
34
+ *
35
+ * Set to the first release that understands the WebRTC `start_update`
36
+ * command (reachy_mini#1208, v1.8.2), which makes it the lowest version
37
+ * we can still repair from here: under it, the gate's own "Update now"
38
+ * button would do nothing and the user has to go through the desktop
39
+ * app anyway.
40
+ */
41
+ export declare const MIN_SUPPORTED_DAEMON_VERSION = "1.8.2";
42
+ export interface SemVer {
43
+ major: number;
44
+ minor: number;
45
+ patch: number;
46
+ }
47
+ /**
48
+ * Parse a `MAJOR.MINOR.PATCH` string into a `SemVer`. Tolerates a
49
+ * leading `v` (GitHub tags) and trailing pre-release / build metadata
50
+ * (`1.8.2-rc1` → `1.8.2`). Returns `null` when the first three numeric
51
+ * components can't be read, so callers can fail-open.
52
+ */
53
+ export declare function parseSemver(value: string | null | undefined): SemVer | null;
54
+ /** Negative if `a < b`, positive if `a > b`, 0 if equal. */
55
+ export declare function compareSemver(a: SemVer, b: SemVer): number;
56
+ /**
57
+ * True only when BOTH versions parse AND `current` is strictly behind
58
+ * `latest`. Any unparseable input returns `false` (fail-open).
59
+ */
60
+ export declare function isDaemonOutdated(current: string | null | undefined, latest: string | null | undefined): boolean;
61
+ /**
62
+ * What the shell should do about this daemon.
63
+ *
64
+ * `'block'` - below the supported floor: hard gate.
65
+ * `'notice'` - behind the latest release: dismissable banner.
66
+ * `null` - up to date, or not enough information to judge.
67
+ */
68
+ export type DaemonUpdateSeverity = 'block' | 'notice';
69
+ export declare function daemonUpdateSeverity(current: string | null | undefined, latest: string | null | undefined): DaemonUpdateSeverity | null;
70
+ /**
71
+ * True when the daemon is new enough to install its own update over the
72
+ * data channel. Unknown / unparseable → false, so the caller points the
73
+ * user at the desktop app rather than offering a dead button.
74
+ */
75
+ export declare function supportsSelfUpdate(current: string | null | undefined): boolean;
76
+ /**
77
+ * Resolve the latest published daemon version (e.g. `"1.8.2"`), or
78
+ * `null` when it can't be determined. Cached in localStorage for
79
+ * `TTL_MS`: the unauthenticated GitHub API allows 60 requests per
80
+ * hour per IP, and a Space reloads far more often than daemons ship.
81
+ * Never throws.
82
+ */
83
+ export declare function fetchLatestDaemonVersion(): Promise<string | null>;
84
+ //# sourceMappingURL=daemonRelease.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daemonRelease.d.ts","sourceRoot":"","sources":["../../src/lib/daemonRelease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAWH;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,UAAU,CAAC;AAEpD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAS3E;AAED,4DAA4D;AAC5D,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,OAAO,CAKT;AAED;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEtD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAChC,oBAAoB,GAAG,IAAI,CAW7B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAI9E;AAsBD;;;;;;GAMG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBvE"}