@viamrobotics/sdk 0.73.0 → 0.74.0-b.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.
Files changed (126) hide show
  1. package/dist/api-version.d.ts +1 -1
  2. package/dist/app/app-client.d.ts +186 -254
  3. package/dist/app/billing-client.d.ts +6 -15
  4. package/dist/app/data-client.d.ts +175 -252
  5. package/dist/app/ml-training-client.d.ts +5 -5
  6. package/dist/app/provisioning-client.d.ts +2 -4
  7. package/dist/app/viam-client.d.ts +1 -1
  8. package/dist/app/viam-transport.d.ts +1 -4
  9. package/dist/assert.d.ts +2 -3
  10. package/dist/components/arm/arm.d.ts +2 -2
  11. package/dist/components/arm/client.d.ts +1 -1
  12. package/dist/components/audio-out/audio-out.d.ts +6 -7
  13. package/dist/components/audioin.d.ts +1 -1
  14. package/dist/components/audioout.d.ts +1 -1
  15. package/dist/components/base/base.d.ts +10 -11
  16. package/dist/components/board/board.d.ts +8 -15
  17. package/dist/components/board/client.d.ts +1 -1
  18. package/dist/components/camera/camera.d.ts +2 -4
  19. package/dist/components/camera/client.d.ts +2 -2
  20. package/dist/components/encoder/encoder.d.ts +4 -5
  21. package/dist/components/encoder.d.ts +1 -1
  22. package/dist/components/gantry/gantry.d.ts +7 -10
  23. package/dist/components/generic/generic.d.ts +1 -4
  24. package/dist/components/gripper/gripper.d.ts +1 -2
  25. package/dist/components/input-controller/input-controller.d.ts +5 -15
  26. package/dist/components/inputcontroller.d.ts +1 -1
  27. package/dist/components/motor/motor.d.ts +17 -19
  28. package/dist/components/movement-sensor/movement-sensor.d.ts +14 -42
  29. package/dist/components/pose-tracker/pose-tracker.d.ts +1 -4
  30. package/dist/components/power-sensor/power-sensor.d.ts +6 -20
  31. package/dist/components/switch/switch.d.ts +2 -3
  32. package/dist/debug.d.ts +7 -15
  33. package/dist/events.d.ts +12 -10
  34. package/dist/extra/stream/client.d.ts +12 -11
  35. package/dist/extra/stream/stream.d.ts +1 -1
  36. package/dist/gen/app/agent/v1/agent_connect.d.ts +1 -1
  37. package/dist/gen/app/build/v1/build_connect.d.ts +1 -1
  38. package/dist/gen/app/cloudslam/v1/cloud_slam_connect.d.ts +1 -1
  39. package/dist/gen/app/data/v1/data_connect.d.ts +1 -1
  40. package/dist/gen/app/datapipelines/v1/data_pipelines_connect.d.ts +1 -1
  41. package/dist/gen/app/dataset/v1/dataset_connect.d.ts +1 -1
  42. package/dist/gen/app/datasync/v1/data_sync_connect.d.ts +1 -1
  43. package/dist/gen/app/mlinference/v1/ml_inference_connect.d.ts +1 -1
  44. package/dist/gen/app/mltraining/v1/ml_training_connect.d.ts +1 -1
  45. package/dist/gen/app/packages/v1/packages_connect.d.ts +1 -1
  46. package/dist/gen/app/v1/app_connect.d.ts +38 -2
  47. package/dist/gen/app/v1/app_pb.d.ts +278 -1
  48. package/dist/gen/app/v1/billing_connect.d.ts +1 -1
  49. package/dist/gen/app/v1/end_user_connect.d.ts +1 -1
  50. package/dist/gen/app/v1/robot_connect.d.ts +1 -1
  51. package/dist/gen/component/arm/v1/arm_connect.d.ts +1 -1
  52. package/dist/gen/component/audioin/v1/audioin_connect.d.ts +1 -1
  53. package/dist/gen/component/audioout/v1/audioout_connect.d.ts +1 -1
  54. package/dist/gen/component/base/v1/base_connect.d.ts +1 -1
  55. package/dist/gen/component/board/v1/board_connect.d.ts +1 -1
  56. package/dist/gen/component/button/v1/button_connect.d.ts +1 -1
  57. package/dist/gen/component/camera/v1/camera_connect.d.ts +1 -1
  58. package/dist/gen/component/encoder/v1/encoder_connect.d.ts +1 -1
  59. package/dist/gen/component/gantry/v1/gantry_connect.d.ts +1 -1
  60. package/dist/gen/component/generic/v1/generic_connect.d.ts +1 -1
  61. package/dist/gen/component/gripper/v1/gripper_connect.d.ts +1 -1
  62. package/dist/gen/component/inputcontroller/v1/input_controller_connect.d.ts +1 -1
  63. package/dist/gen/component/motor/v1/motor_connect.d.ts +1 -1
  64. package/dist/gen/component/movementsensor/v1/movementsensor_connect.d.ts +1 -1
  65. package/dist/gen/component/posetracker/v1/pose_tracker_connect.d.ts +1 -1
  66. package/dist/gen/component/powersensor/v1/powersensor_connect.d.ts +1 -1
  67. package/dist/gen/component/sensor/v1/sensor_connect.d.ts +1 -1
  68. package/dist/gen/component/servo/v1/servo_connect.d.ts +1 -1
  69. package/dist/gen/component/switch/v1/switch_connect.d.ts +1 -1
  70. package/dist/gen/component/testecho/v1/testecho_connect.d.ts +1 -1
  71. package/dist/gen/google/bytestream/bytestream_connect.d.ts +1 -1
  72. package/dist/gen/google/iam/v1/iam_policy_connect.d.ts +1 -1
  73. package/dist/gen/google/longrunning/operations_connect.d.ts +1 -1
  74. package/dist/gen/grpc/reflection/v1/reflection_connect.d.ts +1 -1
  75. package/dist/gen/opentelemetry/proto/collector/logs/v1/logs_service_connect.d.ts +1 -1
  76. package/dist/gen/opentelemetry/proto/collector/metrics/v1/metrics_service_connect.d.ts +1 -1
  77. package/dist/gen/opentelemetry/proto/collector/profiles/v1development/profiles_service_connect.d.ts +1 -1
  78. package/dist/gen/opentelemetry/proto/collector/trace/v1/trace_service_connect.d.ts +1 -1
  79. package/dist/gen/proto/rpc/examples/echo/v1/echo_connect.d.ts +1 -1
  80. package/dist/gen/proto/rpc/examples/echoresource/v1/echoresource_connect.d.ts +1 -1
  81. package/dist/gen/proto/rpc/v1/auth_connect.d.ts +1 -1
  82. package/dist/gen/proto/rpc/webrtc/v1/signaling_connect.d.ts +1 -1
  83. package/dist/gen/provisioning/v1/provisioning_connect.d.ts +1 -1
  84. package/dist/gen/robot/v1/robot_connect.d.ts +1 -1
  85. package/dist/gen/robot/v1/robot_pb.d.ts +115 -0
  86. package/dist/gen/service/datamanager/v1/data_manager_connect.d.ts +1 -1
  87. package/dist/gen/service/discovery/v1/discovery_connect.d.ts +1 -1
  88. package/dist/gen/service/generic/v1/generic_connect.d.ts +1 -1
  89. package/dist/gen/service/mlmodel/v1/mlmodel_connect.d.ts +1 -1
  90. package/dist/gen/service/motion/v1/motion_connect.d.ts +1 -1
  91. package/dist/gen/service/navigation/v1/navigation_connect.d.ts +1 -1
  92. package/dist/gen/service/sensors/v1/sensors_connect.d.ts +1 -1
  93. package/dist/gen/service/shell/v1/shell_connect.d.ts +1 -1
  94. package/dist/gen/service/slam/v1/slam_connect.d.ts +1 -1
  95. package/dist/gen/service/video/v1/video_connect.d.ts +1 -1
  96. package/dist/gen/service/vision/v1/vision_connect.d.ts +1 -1
  97. package/dist/gen/service/worldstatestore/v1/world_state_store_connect.d.ts +1 -1
  98. package/dist/gen/stream/v1/stream_connect.d.ts +1 -1
  99. package/dist/main.d.ts +11 -12
  100. package/dist/main.es.js +29098 -33211
  101. package/dist/main.umd.js +6 -7
  102. package/dist/robot/client.d.ts +59 -86
  103. package/dist/robot/dial.d.ts +7 -10
  104. package/dist/robot/robot.d.ts +29 -29
  105. package/dist/rpc/client-channel.d.ts +1 -1
  106. package/dist/rpc/client-stream.d.ts +4 -5
  107. package/dist/rpc/connection-closed-error.d.ts +1 -1
  108. package/dist/rpc/dial.d.ts +34 -41
  109. package/dist/rpc/signaling-exchange.d.ts +1 -1
  110. package/dist/rpc/stream-client-stream.d.ts +1 -1
  111. package/dist/rpc/unary-client-stream.d.ts +1 -1
  112. package/dist/services/data-manager/client.d.ts +5 -14
  113. package/dist/services/data-manager/data-manager.d.ts +1 -1
  114. package/dist/services/generic/client.d.ts +1 -1
  115. package/dist/services/generic/generic.d.ts +1 -2
  116. package/dist/services/motion/motion.d.ts +53 -78
  117. package/dist/services/navigation/client.d.ts +1 -1
  118. package/dist/services/navigation/navigation.d.ts +2 -4
  119. package/dist/services/slam/client.d.ts +1 -1
  120. package/dist/services/slam/slam.d.ts +4 -6
  121. package/dist/services/video/video.d.ts +2 -6
  122. package/dist/services/vision/vision.d.ts +13 -19
  123. package/dist/services/world-state-store/world-state-store.d.ts +6 -19
  124. package/dist/types.d.ts +5 -7
  125. package/dist/utils.d.ts +5 -5
  126. package/package.json +29 -29
@@ -1,7 +1,7 @@
1
1
  import { type ServiceType } from '@bufbuild/protobuf';
2
2
  import { type CallOptions, type Client } from '@connectrpc/connect';
3
3
  import { type Credentials } from '../app/viam-transport';
4
- import { EventDispatcher } from '../events';
4
+ import { EventDispatcher, MachineConnectionEvent } from '../events';
5
5
  import type { PoseInFrame, Transform } from '../gen/common/v1/common_pb';
6
6
  import { GetModelsFromModulesRequest, GetPoseRequest, RestartModuleRequest, TransformPCDRequest, TransformPoseRequest } from '../gen/robot/v1/robot_pb';
7
7
  import type { Robot } from './robot';
@@ -25,9 +25,9 @@ export interface DialWebRTCConf {
25
25
  abort: boolean;
26
26
  };
27
27
  /**
28
- * Called when a non-retryable error is encountered during reconnection.
29
- * Return true to treat the error as retryable. Does not override
30
- * reconnectMaxAttempts — retries are still bounded by that limit.
28
+ * Called when a non-retryable error is encountered during reconnection. Return true to treat the
29
+ * error as retryable. Does not override reconnectMaxAttempts — retries are still bounded by that
30
+ * limit.
31
31
  */
32
32
  shouldRetryOnError?: () => boolean;
33
33
  serviceHost?: string;
@@ -35,21 +35,19 @@ export interface DialWebRTCConf {
35
35
  iceServers?: ICEServer[];
36
36
  priority?: number;
37
37
  /**
38
- * When true, sets ICE transport policy to relay-only so only TURN candidates
39
- * are used. Useful for testing relay connectivity through a TURN server.
38
+ * When true, sets ICE transport policy to relay-only so only TURN candidates are used. Useful for
39
+ * testing relay connectivity through a TURN server.
40
40
  */
41
41
  forceRelay?: boolean;
42
42
  /**
43
- * When true, strips TURN servers from the ICE configuration so only host and
44
- * server-reflexive candidates are used. Useful for testing direct
45
- * connectivity without relay fallback.
43
+ * When true, strips TURN servers from the ICE configuration so only host and server-reflexive
44
+ * candidates are used. Useful for testing direct connectivity without relay fallback.
46
45
  */
47
46
  forceP2P?: boolean;
48
47
  /**
49
- * When set, filters the signaling server's TURN list to only the server whose
50
- * parsed URI matches (compared by scheme, host, port, and transport —
51
- * defaulting transport to UDP if unspecified). Example:
52
- * `"turn:turn.viam.com:443"`
48
+ * When set, filters the signaling server's TURN list to only the server whose parsed URI matches
49
+ * (compared by scheme, host, port, and transport — defaulting transport to UDP if unspecified).
50
+ * Example: `"turn:turn.viam.com:443"`
53
51
  */
54
52
  turnUri?: string;
55
53
  /** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
@@ -59,20 +57,20 @@ export interface DialWebRTCConf {
59
57
  /** Overrides the port of the matched TURN URI. */
60
58
  turnPort?: number;
61
59
  /**
62
- * When true, the connection to the signaling server is made over plain HTTP
63
- * (no TLS). Use this when connecting to a robot running with `no_tls: true`.
60
+ * When true, the connection to the signaling server is made over plain HTTP (no TLS). Use this
61
+ * when connecting to a robot running with `no_tls: true`.
64
62
  */
65
63
  signalingInsecure?: boolean;
66
64
  /**
67
- * Set timeout in milliseconds for dialing. Default is defined by
68
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
65
+ * Set timeout in milliseconds for dialing. Default is defined by DIAL_TIMEOUT. A value of 0
66
+ * disables the timeout.
69
67
  *
70
68
  * @deprecated Use `dialTimeoutMs` instead.
71
69
  */
72
70
  dialTimeout?: number;
73
71
  /**
74
- * Set timeout in milliseconds for dialing. Default is defined by
75
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
72
+ * Set timeout in milliseconds for dialing. Default is defined by DIAL_TIMEOUT. A value of 0
73
+ * disables the timeout.
76
74
  */
77
75
  dialTimeoutMs?: number;
78
76
  extraHeaders?: Record<string, string>;
@@ -89,21 +87,21 @@ export interface DialDirectConf {
89
87
  abort: boolean;
90
88
  };
91
89
  /**
92
- * Called when a non-retryable error is encountered during reconnection.
93
- * Return true to treat the error as retryable. Does not override
94
- * reconnectMaxAttempts — retries are still bounded by that limit.
90
+ * Called when a non-retryable error is encountered during reconnection. Return true to treat the
91
+ * error as retryable. Does not override reconnectMaxAttempts — retries are still bounded by that
92
+ * limit.
95
93
  */
96
94
  shouldRetryOnError?: () => boolean;
97
95
  /**
98
- * Set timeout in milliseconds for dialing. Default is defined by
99
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
96
+ * Set timeout in milliseconds for dialing. Default is defined by DIAL_TIMEOUT. A value of 0
97
+ * disables the timeout.
100
98
  *
101
99
  * @deprecated Use `dialTimeoutMs` instead.
102
100
  */
103
101
  dialTimeout?: number;
104
102
  /**
105
- * Set timeout in milliseconds for dialing. Default is defined by
106
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
103
+ * Set timeout in milliseconds for dialing. Default is defined by DIAL_TIMEOUT. A value of 0
104
+ * disables the timeout.
107
105
  */
108
106
  dialTimeoutMs?: number;
109
107
  extraHeaders?: Record<string, string>;
@@ -140,31 +138,49 @@ export interface ConnectOptions {
140
138
  creds?: Credentials;
141
139
  priority?: number;
142
140
  /**
143
- * Set timeout in milliseconds for dialing. Default is defined by
144
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
141
+ * Set timeout in milliseconds for dialing. Default is defined by DIAL_TIMEOUT. A value of 0
142
+ * disables the timeout.
145
143
  *
146
144
  * @deprecated Use `dialTimeoutMs` instead.
147
145
  */
148
146
  dialTimeout?: number;
149
147
  /**
150
- * Set timeout in milliseconds for dialing. Default is defined by
151
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
148
+ * Set timeout in milliseconds for dialing. Default is defined by DIAL_TIMEOUT. A value of 0
149
+ * disables the timeout.
152
150
  */
153
151
  dialTimeoutMs?: number;
154
152
  extraHeaders?: Record<string, string>;
155
153
  }
156
154
  export declare const isDialWebRTCConf: (value: DialConf) => value is DialWebRTCConf;
157
- /**
158
- * Validates a DialConf passed to createRobotClient. Throws an error for invalid
159
- * configs.
160
- */
155
+ /** Validates a DialConf passed to createRobotClient. Throws an error for invalid configs. */
161
156
  export declare const validateDialConf: (conf: DialConf) => void;
157
+ interface RobotClientDispatchEvents {
158
+ track: RTCTrackEvent;
159
+ connectionstatechange: {
160
+ eventType: MachineConnectionEvent;
161
+ };
162
+ [MachineConnectionEvent.CONNECTING]: Record<string, never>;
163
+ [MachineConnectionEvent.CONNECTED]: Record<string, never>;
164
+ [MachineConnectionEvent.DISCONNECTING]: Record<string, never>;
165
+ [MachineConnectionEvent.DISCONNECTED]: Event | {
166
+ error?: Error;
167
+ };
168
+ [MachineConnectionEvent.DIALING]: {
169
+ method: 'webrtc' | 'grpc';
170
+ attempt: number;
171
+ };
172
+ [MachineConnectionEvent.RECONNECTING]: Event | undefined;
173
+ [MachineConnectionEvent.RECONNECTION_FAILED]: {
174
+ error: unknown;
175
+ attempts: number;
176
+ };
177
+ }
162
178
  /**
163
179
  * A gRPC-web client for a Robot.
164
180
  *
165
181
  * @group Clients
166
182
  */
167
- export declare class RobotClient extends EventDispatcher implements Robot {
183
+ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEvents> implements Robot {
168
184
  private serviceHost;
169
185
  private readonly webrtcOptions;
170
186
  private readonly directOptions;
@@ -247,11 +263,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
247
263
  readonly I: typeof import("../gen/robot/v1/robot_pb").CancelOperationRequest;
248
264
  readonly O: typeof import("../gen/robot/v1/robot_pb").CancelOperationResponse;
249
265
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
250
- }; /**
251
- * Called when a non-retryable error is encountered during reconnection.
252
- * Return true to treat the error as retryable. Does not override
253
- * reconnectMaxAttempts — retries are still bounded by that limit.
254
- */
266
+ };
255
267
  readonly blockForOperation: {
256
268
  readonly name: "BlockForOperation";
257
269
  readonly I: typeof import("../gen/robot/v1/robot_pb").BlockForOperationRequest;
@@ -274,12 +286,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
274
286
  readonly name: "StreamStatus";
275
287
  readonly I: typeof import("../gen/robot/v1/robot_pb").StreamStatusRequest;
276
288
  readonly O: typeof import("../gen/robot/v1/robot_pb").StreamStatusResponse;
277
- readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming; /**
278
- * Set timeout in milliseconds for dialing. Default is defined by
279
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
280
- *
281
- * @deprecated Use `dialTimeoutMs` instead.
282
- */
289
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
283
290
  };
284
291
  readonly stopAll: {
285
292
  readonly name: "StopAll";
@@ -297,7 +304,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
297
304
  readonly name: "SendSessionHeartbeat";
298
305
  readonly I: typeof import("../gen/robot/v1/robot_pb").SendSessionHeartbeatRequest;
299
306
  readonly O: typeof import("../gen/robot/v1/robot_pb").SendSessionHeartbeatResponse;
300
- /** Options required to dial a robot. */
301
307
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
302
308
  };
303
309
  readonly log: {
@@ -417,11 +423,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
417
423
  readonly name: "Stop";
418
424
  readonly I: typeof import("../gen/component/arm/v1/arm_pb").StopRequest;
419
425
  readonly O: typeof import("../gen/component/arm/v1/arm_pb").StopResponse;
420
- /**
421
- * When true, strips TURN servers from the ICE configuration so only host and
422
- * server-reflexive candidates are used. Useful for testing direct
423
- * connectivity without relay fallback.
424
- */
425
426
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
426
427
  };
427
428
  readonly isMoving: {
@@ -440,12 +441,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
440
441
  readonly name: "GetStatus";
441
442
  readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
442
443
  readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
443
- /**
444
- * Set timeout in milliseconds for dialing. Default is defined by
445
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
446
- *
447
- * @deprecated Use `dialTimeoutMs` instead.
448
- */
449
444
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
450
445
  };
451
446
  readonly getKinematics: {
@@ -507,11 +502,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
507
502
  readonly O: typeof import("../gen/component/base/v1/base_pb").IsMovingResponse;
508
503
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
509
504
  };
510
- /**
511
- * Called when a non-retryable error is encountered during reconnection.
512
- * Return true to treat the error as retryable. Does not override
513
- * reconnectMaxAttempts — retries are still bounded by that limit.
514
- */
515
505
  readonly doCommand: {
516
506
  readonly name: "DoCommand";
517
507
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
@@ -532,10 +522,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
532
522
  };
533
523
  readonly getProperties: {
534
524
  readonly name: "GetProperties";
535
- readonly I: typeof import("../gen/component/base/v1/base_pb").GetPropertiesRequest; /**
536
- * When true, the connection to the signaling server is made over plain HTTP
537
- * (no TLS). Use this when connecting to a robot running with `no_tls: true`.
538
- */
525
+ readonly I: typeof import("../gen/component/base/v1/base_pb").GetPropertiesRequest;
539
526
  readonly O: typeof import("../gen/component/base/v1/base_pb").GetPropertiesResponse;
540
527
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
541
528
  };
@@ -618,10 +605,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
618
605
  };
619
606
  readonly setPowerMode: {
620
607
  readonly name: "SetPowerMode";
621
- /**
622
- * Set timeout in milliseconds for dialing. Default is defined by
623
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
624
- */
625
608
  readonly I: typeof import("../gen/component/board/v1/board_pb").SetPowerModeRequest;
626
609
  readonly O: typeof import("../gen/component/board/v1/board_pb").SetPowerModeResponse;
627
610
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
@@ -711,7 +694,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
711
694
  readonly isMoving: {
712
695
  readonly name: "IsMoving";
713
696
  readonly I: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingRequest;
714
- readonly O: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingResponse; /** @default 10. */
697
+ readonly O: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingResponse;
715
698
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
716
699
  };
717
700
  readonly doCommand: {
@@ -1247,7 +1230,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1247
1230
  readonly doCommand: {
1248
1231
  readonly name: "DoCommand";
1249
1232
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
1250
- /** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
1251
1233
  readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
1252
1234
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1253
1235
  };
@@ -1311,12 +1293,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1311
1293
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1312
1294
  };
1313
1295
  readonly getStatus: {
1314
- readonly name: "GetStatus"; /**
1315
- * Set timeout in milliseconds for dialing. Default is defined by
1316
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
1317
- *
1318
- * @deprecated Use `dialTimeoutMs` instead.
1319
- */
1296
+ readonly name: "GetStatus";
1320
1297
  readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
1321
1298
  readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
1322
1299
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
@@ -1364,11 +1341,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1364
1341
  };
1365
1342
  readonly getGeometries: {
1366
1343
  readonly name: "GetGeometries";
1367
- readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest; /**
1368
- * Called when a non-retryable error is encountered during reconnection.
1369
- * Return true to treat the error as retryable. Does not override
1370
- * reconnectMaxAttempts — retries are still bounded by that limit.
1371
- */
1344
+ readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest;
1372
1345
  readonly O: typeof import("../gen/common/v1/common_pb").GetGeometriesResponse;
1373
1346
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1374
1347
  };
@@ -1404,7 +1377,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1404
1377
  readonly doCommand: {
1405
1378
  readonly name: "DoCommand";
1406
1379
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
1407
- readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse; /** @default Number.POSITIVE_INFINITY */
1380
+ readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
1408
1381
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1409
1382
  };
1410
1383
  readonly getStatus: {
@@ -1471,7 +1444,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1471
1444
  stopAll(): Promise<void>;
1472
1445
  frameSystemConfig(transforms: Transform[]): Promise<import("../gen/robot/v1/robot_pb").FrameSystemConfig[]>;
1473
1446
  transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[], callOptions?: CallOptions): Promise<PoseInFrame>;
1474
- transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array>;
1447
+ transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array<ArrayBufferLike>>;
1475
1448
  getModelsFromModules(): Promise<import("../gen/robot/v1/robot_pb").ModuleModel[]>;
1476
1449
  getCloudMetadata(): Promise<import("../gen/robot/v1/robot_pb").GetCloudMetadataResponse>;
1477
1450
  resourceNames(): Promise<import("../gen/common/v1/common_pb").ResourceName[]>;
@@ -1,17 +1,14 @@
1
1
  import { RobotClient, type DialConf } from './client';
2
2
  /**
3
- * Connect to a robot via WebRTC or gRPC and return a RobotClient after
4
- * connecting successfully.
3
+ * Connect to a robot via WebRTC or gRPC and return a RobotClient after connecting successfully.
5
4
  *
6
- * The initial connection method is determined by whether a
7
- * {@link DialWebRTCConf} or {@link DialDirectConf} is passed in as the first
8
- * argument.
5
+ * The initial connection method is determined by whether a {@link DialWebRTCConf} or
6
+ * {@link DialDirectConf} is passed in as the first argument.
9
7
  *
10
- * Reconnect is enabled by default and disabled with `noReconnect`. When
11
- * enabled, this function will re-attempt to reconnect if initial connection is
12
- * unsuccessful using backoff.
8
+ * Reconnect is enabled by default and disabled with `noReconnect`. When enabled, this function will
9
+ * re-attempt to reconnect if initial connection is unsuccessful using backoff.
13
10
  *
14
- * If `noReconnect` is specified and connecting via WebRTC fails, then this
15
- * function will automatically re-attempt to connect via gRPC directly.
11
+ * If `noReconnect` is specified and connecting via WebRTC fails, then this function will
12
+ * automatically re-attempt to connect via gRPC directly.
16
13
  */
17
14
  export declare const createRobotClient: (conf: DialConf) => Promise<RobotClient>;
@@ -1,7 +1,7 @@
1
1
  import type { PlainMessage, Struct } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
- import { MachineConnectionEvent } from '../events';
4
- import * as proto from '../gen/robot/v1/robot_pb';
3
+ import { type MachineConnectionEvent } from '../events';
4
+ import type * as proto from '../gen/robot/v1/robot_pb';
5
5
  import type { PoseInFrame, ResourceName, Transform } from '../types';
6
6
  export type CloudMetadata = PlainMessage<proto.GetCloudMetadataResponse>;
7
7
  export type ConfigStatus = PlainMessage<proto.ConfigStatus>;
@@ -10,6 +10,8 @@ export type JobStatus = PlainMessage<proto.JobStatus>;
10
10
  export type MachineStatus = PlainMessage<proto.GetMachineStatusResponse>;
11
11
  export type MachineStatusState = proto.GetMachineStatusResponse_State;
12
12
  export type ModuleModel = PlainMessage<proto.ModuleModel>;
13
+ export type ModuleStatus = PlainMessage<proto.ModuleStatus>;
14
+ export type ModuleStatusState = proto.ModuleStatus_State;
13
15
  export type ResourceRPCSubtype = PlainMessage<proto.ResourceRPCSubtype>;
14
16
  export type ResourceStatus = PlainMessage<proto.ResourceStatus>;
15
17
  export type Session = PlainMessage<proto.Session>;
@@ -57,8 +59,8 @@ export interface Robot {
57
59
  */
58
60
  cancelOperation(id: string): Promise<void>;
59
61
  /**
60
- * Blocks on the specified operation on the machine. This function will only
61
- * return when the specific operation has finished or has been cancelled.
62
+ * Blocks on the specified operation on the machine. This function will only return when the
63
+ * specific operation has finished or has been cancelled.
62
64
  *
63
65
  * @example
64
66
  *
@@ -72,8 +74,8 @@ export interface Robot {
72
74
  */
73
75
  blockForOperation(id: string): Promise<void>;
74
76
  /**
75
- * Cancel all current and outstanding operations for the robot and stop all
76
- * actuators and movement.
77
+ * Cancel all current and outstanding operations for the robot and stop all actuators and
78
+ * movement.
77
79
  *
78
80
  * @example
79
81
  *
@@ -81,8 +83,8 @@ export interface Robot {
81
83
  * await machine.stopAll();
82
84
  * ```
83
85
  *
84
- * @param extra - Any extra parameters to pass to the components' `stop`
85
- * methods, keyed on the component's resource name.
86
+ * @param extra - Any extra parameters to pass to the components' `stop` methods, keyed on the
87
+ * component's resource name.
86
88
  * @group Operations
87
89
  * @alpha
88
90
  */
@@ -101,29 +103,28 @@ export interface Robot {
101
103
  */
102
104
  frameSystemConfig(transform: Transform[]): Promise<FrameSystemConfig[]>;
103
105
  /**
104
- * Transform a given source Pose from the reference frame to a new specified
105
- * destination which is a reference frame.
106
+ * Transform a given source Pose from the reference frame to a new specified destination which is
107
+ * a reference frame.
106
108
  *
107
109
  * @param query - The pose that should be transformed
108
110
  * @param destination - The name of the reference frame to transform the given
109
- * @param supplementalTransforms - Pose information on any additional
110
- * reference frames that are needed to perform the transform
111
+ * @param supplementalTransforms - Pose information on any additional reference frames that are
112
+ * needed to perform the transform
111
113
  * @group Frame System
112
114
  * @alpha
113
115
  */
114
116
  transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[], callOptions?: CallOptions): Promise<PoseInFrame>;
115
117
  /**
116
- * Transform a given source point cloud from the reference frame to a new
117
- * specified destination which is a reference frame.
118
+ * Transform a given source point cloud from the reference frame to a new specified destination
119
+ * which is a reference frame.
118
120
  *
119
121
  * @param pointCloudPCD - The point clouds to transform. This should be in the
120
122
  * {@link https://pointclouds.org/documentation/tutorials/pcd_file_format.html PCD format encoded into bytes}
121
123
  * @param source - The reference frame of the point cloud.
122
- * @param destination - The reference frame into which the source data should
123
- * be transformed, if unset this defaults to the "world" reference frame. Do
124
- * not move the robot between the generation of the initial pointcloud and
125
- * the receipt of the transformed pointcloud because that will make the
126
- * transformations inaccurate.
124
+ * @param destination - The reference frame into which the source data should be transformed, if
125
+ * unset this defaults to the "world" reference frame. Do not move the robot between the
126
+ * generation of the initial pointcloud and the receipt of the transformed pointcloud because
127
+ * that will make the transformations inaccurate.
127
128
  * @group Frame System
128
129
  * @alpha
129
130
  */
@@ -170,13 +171,12 @@ export interface Robot {
170
171
  /**
171
172
  * Call a function when a connection event occurs.
172
173
  *
173
- * Note that direct gRPC connections that disconnect will not emit a
174
- * disconnect event. WebRTC connections that disconnect will emit a disconnect
175
- * event. All connections emit events during manual calls of `connect` and
176
- * `disconnect`.
174
+ * Note that direct gRPC connections that disconnect will not emit a disconnect event. WebRTC
175
+ * connections that disconnect will emit a disconnect event. All connections emit events during
176
+ * manual calls of `connect` and `disconnect`.
177
177
  *
178
- * @param type - The event MachineConnectionEvent that was triggered, or all
179
- * connection events with 'connectionstatechange'.
178
+ * @param type - The event MachineConnectionEvent that was triggered, or all connection events
179
+ * with 'connectionstatechange'.
180
180
  * @param listener - The function to call
181
181
  * @alpha
182
182
  */
@@ -215,10 +215,10 @@ export interface Robot {
215
215
  * await machine.restartModule('namespace:module:model', 'my_model_name');
216
216
  * ```
217
217
  *
218
- * @param moduleId - The id matching the module_id field of the registry
219
- * module in your part configuration
220
- * @param moduleName - The name matching the name field of the local/registry
221
- * module in your part configuration
218
+ * @param moduleId - The id matching the module_id field of the registry module in your part
219
+ * configuration
220
+ * @param moduleName - The name matching the name field of the local/registry module in your part
221
+ * configuration
222
222
  * @group Modules
223
223
  * @alpha
224
224
  */
@@ -1,6 +1,6 @@
1
1
  import type { AnyMessage, Message, MethodInfo, PartialMessage, ServiceType } from '@bufbuild/protobuf';
2
2
  import type { ContextValues, StreamResponse, Transport, UnaryResponse } from '@connectrpc/connect';
3
- import { RequestHeaders, RequestMessage, Stream } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
3
+ import { type RequestHeaders, type RequestMessage, Stream } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
4
4
  import { BaseChannel } from './base-channel';
5
5
  export declare class ClientChannel extends BaseChannel implements Transport {
6
6
  private streamIDCounter;
@@ -1,15 +1,14 @@
1
1
  import type { AnyMessage, Message, MethodInfo, ServiceType } from '@bufbuild/protobuf';
2
- import { Metadata, RequestHeaders, Response, ResponseHeaders, ResponseTrailers, Stream } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
2
+ import { Metadata, RequestHeaders, type Response, type ResponseHeaders, type ResponseTrailers, type Stream } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
3
3
  import { BaseStream } from './base-stream';
4
4
  import type { ClientChannel } from './client-channel';
5
5
  export interface ClientStreamConstructor<T extends ClientStream<I, O>, I extends Message<I> = AnyMessage, O extends Message<O> = AnyMessage> {
6
6
  new (channel: ClientChannel, stream: Stream, onDone: (id: bigint) => void, service: ServiceType, method: MethodInfo<I, O>, header: HeadersInit | undefined): T;
7
7
  }
8
8
  /**
9
- * A ClientStream provides all the facilities needed to invoke and manage a gRPC
10
- * stream at a low-level. Implementors like UnaryClientStream and
11
- * StreamClientStream handle the method specific flow of unary/stream
12
- * operations.
9
+ * A ClientStream provides all the facilities needed to invoke and manage a gRPC stream at a
10
+ * low-level. Implementors like UnaryClientStream and StreamClientStream handle the method specific
11
+ * flow of unary/stream operations.
13
12
  */
14
13
  export declare abstract class ClientStream<I extends Message<I> = AnyMessage, O extends Message<O> = AnyMessage> extends BaseStream {
15
14
  protected readonly channel: ClientChannel;
@@ -1,5 +1,5 @@
1
1
  export declare class ConnectionClosedError extends Error {
2
2
  readonly name = "ConnectionClosedError";
3
3
  constructor(msg: string);
4
- static isError(error: unknown): boolean;
4
+ static isError(error: unknown): error is Error;
5
5
  }
@@ -1,55 +1,51 @@
1
- import { Message } from '@bufbuild/protobuf';
1
+ import { type Message } from '@bufbuild/protobuf';
2
2
  import type { AnyMessage, MethodInfo, PartialMessage, ServiceType } from '@bufbuild/protobuf';
3
3
  import type { ContextValues, StreamResponse, Transport, UnaryResponse } from '@connectrpc/connect';
4
4
  import { type Credentials } from '../app/viam-transport';
5
5
  export interface DialOptions {
6
- credentials?: Credentials | undefined;
6
+ credentials?: Credentials;
7
7
  webrtcOptions?: DialWebRTCOptions;
8
- externalAuthAddress?: string | undefined;
9
- externalAuthToEntity?: string | undefined;
8
+ externalAuthAddress?: string;
9
+ externalAuthToEntity?: string;
10
10
  /**
11
- * `accessToken` allows a pre-authenticated client to dial with an
12
- * authorization header. Direct dial will have the access token appended to
13
- * the "Authorization: Bearer" header. WebRTC dial will appened it to the
14
- * signaling server communication
11
+ * `accessToken` allows a pre-authenticated client to dial with an authorization header. Direct
12
+ * dial will have the access token appended to the "Authorization: Bearer" header. WebRTC dial
13
+ * will appened it to the signaling server communication
15
14
  *
16
15
  * If enabled, other auth options have no affect. Eg. authEntity, credentials,
17
- * externalAuthAddress, externalAuthToEntity,
18
- * webrtcOptions.signalingAccessToken
16
+ * externalAuthAddress, externalAuthToEntity, webrtcOptions.signalingAccessToken
19
17
  */
20
- accessToken?: string | undefined;
18
+ accessToken?: string;
21
19
  /**
22
20
  * Set timeout in milliseconds for dialing.
23
21
  *
24
22
  * @deprecated Use `dialTimeoutMs` instead.
25
23
  */
26
- dialTimeout?: number | undefined;
24
+ dialTimeout?: number;
27
25
  /** Set timeout in milliseconds for dialing. */
28
- dialTimeoutMs?: number | undefined;
26
+ dialTimeoutMs?: number;
29
27
  extraHeaders?: Headers;
30
28
  }
31
29
  export interface DialWebRTCOptions {
32
30
  disableTrickleICE: boolean;
33
31
  rtcConfig?: RTCConfiguration;
34
32
  /**
35
- * SignalingExternalAuthAddress is the address to perform external auth yet.
36
- * This is unlikely to be needed since the signaler is typically in the same
37
- * place where authentication happens.
33
+ * SignalingExternalAuthAddress is the address to perform external auth yet. This is unlikely to
34
+ * be needed since the signaler is typically in the same place where authentication happens.
38
35
  */
39
36
  signalingExternalAuthAddress?: string;
40
37
  /**
41
- * SignalingExternalAuthToEntity is the entity to authenticate for after
42
- * externally authenticating. This is unlikely to be needed since the signaler
43
- * is typically in the same place where authentication happens.
38
+ * SignalingExternalAuthToEntity is the entity to authenticate for after externally
39
+ * authenticating. This is unlikely to be needed since the signaler is typically in the same place
40
+ * where authentication happens.
44
41
  */
45
42
  signalingExternalAuthToEntity?: string;
46
43
  signalingCredentials?: Credentials;
47
44
  /**
48
- * `signalingAccessToken` allows a pre-authenticated client to dial with an
49
- * authorization header to the signaling server. This skips the Authenticate()
50
- * request to the singaling server or external auth but does not skip the
51
- * AuthenticateTo() request to retrieve the credentials at the external auth
52
- * endpoint.
45
+ * `signalingAccessToken` allows a pre-authenticated client to dial with an authorization header
46
+ * to the signaling server. This skips the Authenticate() request to the singaling server or
47
+ * external auth but does not skip the AuthenticateTo() request to retrieve the credentials at the
48
+ * external auth endpoint.
53
49
  *
54
50
  * If enabled, other auth options have no affect. Eg. authEntity, credentials,
55
51
  * signalingAuthEntity, signalingCredentials.
@@ -57,21 +53,19 @@ export interface DialWebRTCOptions {
57
53
  signalingAccessToken?: string;
58
54
  additionalSdpFields?: Record<string, string | number>;
59
55
  /**
60
- * When true, sets ICE transport policy to relay-only so only TURN candidates
61
- * are used. Useful for testing relay connectivity through a TURN server.
56
+ * When true, sets ICE transport policy to relay-only so only TURN candidates are used. Useful for
57
+ * testing relay connectivity through a TURN server.
62
58
  */
63
59
  forceRelay?: boolean;
64
60
  /**
65
- * When true, strips TURN servers from the ICE configuration so only host and
66
- * server-reflexive candidates are used. Useful for testing direct
67
- * connectivity without relay fallback.
61
+ * When true, strips TURN servers from the ICE configuration so only host and server-reflexive
62
+ * candidates are used. Useful for testing direct connectivity without relay fallback.
68
63
  */
69
64
  forceP2P?: boolean;
70
65
  /**
71
- * When set, filters the signaling server's TURN list to only the server whose
72
- * parsed URI matches (compared by scheme, host, port, and transport —
73
- * defaulting transport to UDP if unspecified). Example:
74
- * `"turn:turn.viam.com:443"`
66
+ * When set, filters the signaling server's TURN list to only the server whose parsed URI matches
67
+ * (compared by scheme, host, port, and transport — defaulting transport to UDP if unspecified).
68
+ * Example: `"turn:turn.viam.com:443"`
75
69
  */
76
70
  turnUri?: string;
77
71
  /** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
@@ -81,8 +75,8 @@ export interface DialWebRTCOptions {
81
75
  /** Overrides the port of the matched TURN URI. */
82
76
  turnPort?: number;
83
77
  /**
84
- * When true, the connection to the signaling server is made over plain HTTP
85
- * (no TLS). Use this when connecting to a robot running with `no_tls: true`.
78
+ * When true, the connection to the signaling server is made over plain HTTP (no TLS). Use this
79
+ * when connecting to a robot running with `no_tls: true`.
86
80
  */
87
81
  signalingInsecure?: boolean;
88
82
  }
@@ -106,12 +100,11 @@ export interface WebRTCConnection {
106
100
  dataChannel: RTCDataChannel;
107
101
  }
108
102
  /**
109
- * DialWebRTC makes a connection to given host by signaling with the address
110
- * provided. A Promise is returned upon successful connection that contains a
111
- * transport factory to use with gRPC client as well as the WebRTC
112
- * PeerConnection itself. Care should be taken with the PeerConnection and is
113
- * currently returned for experimental use. TODO(GOUT-7): figure out decent way
114
- * to handle reconnect on connection termination
103
+ * DialWebRTC makes a connection to given host by signaling with the address provided. A Promise is
104
+ * returned upon successful connection that contains a transport factory to use with gRPC client as
105
+ * well as the WebRTC PeerConnection itself. Care should be taken with the PeerConnection and is
106
+ * currently returned for experimental use. TODO(GOUT-7): figure out decent way to handle reconnect
107
+ * on connection termination
115
108
  */
116
109
  export declare const dialWebRTC: (signalingAddress: string, host: string, dialOpts?: DialOptions, transportCredentialsInclude?: boolean) => Promise<WebRTCConnection>;
117
110
  export declare const validateDialOptions: (opts?: DialOptions) => void;
@@ -1,5 +1,5 @@
1
1
  import type { CallOptions, Client } from '@connectrpc/connect';
2
- import { SignalingService } from '../gen/proto/rpc/webrtc/v1/signaling_connect';
2
+ import { type SignalingService } from '../gen/proto/rpc/webrtc/v1/signaling_connect';
3
3
  import { ClientChannel } from './client-channel';
4
4
  import type { DialWebRTCOptions } from './dial';
5
5
  export declare class SignalingExchange {