@omirion/orbit-sdk 0.3.1 → 0.5.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.
@@ -5,7 +5,7 @@ A terminal UI demo of `@omirion/orbit-sdk` built with [Ink](https://github.com/v
5
5
  1. **List devices**. `orbit.devices.list()`
6
6
  2. **Select the first one**. `orbit.devices.get(id)` (the full device carries the `deviceTypeSlug` needed to decode telemetry)
7
7
  3. **Show latest telemetry**. `orbit.telemetry.latest(id)` joined to the type manifest via `decodeSample()`
8
- 4. **Run the RPC command flow**. A sequence of `orbit.commands.exec(id, { name, args })` calls, run in order, stopping at the first failure
8
+ 4. **Run the RPC command flow**. A sequence of `orbit.commands.exec(id, { name, args, requestId })` calls, run in order, stopping at the first failure
9
9
 
10
10
  The command flow drives an attached Android device over adb:
11
11
 
@@ -433,11 +433,13 @@ function App() {
433
433
  if (i > 0 && COMMAND_DELAY_MS > 0) await sleep(COMMAND_DELAY_MS);
434
434
  dispatch({ type: "cmd", i, status: "active" });
435
435
  try {
436
- const result = await orbit.commands.exec(device.id, {
436
+ const commandRequest = {
437
+ requestId: crypto.randomUUID(),
437
438
  name: COMMANDS[i].name,
438
439
  args: COMMANDS[i].args,
439
440
  timeoutMs: 15000,
440
- });
441
+ };
442
+ const result = await orbit.commands.exec(device.id, commandRequest);
441
443
  if (result.success) {
442
444
  dispatch({ type: "cmd", i, status: "ok", result });
443
445
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omirion/orbit-sdk",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "description": "Official TypeScript SDK for the Omirion Orbit public API (/api/v1).",
5
5
  "license": "MIT",
6
6
  "type": "module",