@viamrobotics/sdk 0.70.0 → 0.73.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 (134) hide show
  1. package/dist/api-version.d.ts +1 -1
  2. package/dist/app/app-client.d.ts +130 -254
  3. package/dist/app/billing-client.d.ts +6 -15
  4. package/dist/app/data-client.d.ts +351 -244
  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 +30 -2
  13. package/dist/components/audio-out/client.d.ts +1 -0
  14. package/dist/components/audioin.d.ts +1 -1
  15. package/dist/components/audioout.d.ts +1 -1
  16. package/dist/components/base/base.d.ts +10 -11
  17. package/dist/components/board/board.d.ts +8 -15
  18. package/dist/components/board/client.d.ts +1 -1
  19. package/dist/components/camera/camera.d.ts +3 -5
  20. package/dist/components/camera/client.d.ts +2 -2
  21. package/dist/components/encoder/encoder.d.ts +4 -5
  22. package/dist/components/encoder.d.ts +1 -1
  23. package/dist/components/gantry/gantry.d.ts +7 -10
  24. package/dist/components/generic/generic.d.ts +1 -4
  25. package/dist/components/gripper/client.d.ts +2 -0
  26. package/dist/components/gripper/gripper.d.ts +30 -2
  27. package/dist/components/input-controller/input-controller.d.ts +5 -15
  28. package/dist/components/inputcontroller.d.ts +1 -1
  29. package/dist/components/motor/motor.d.ts +17 -19
  30. package/dist/components/movement-sensor/movement-sensor.d.ts +14 -42
  31. package/dist/components/pose-tracker/pose-tracker.d.ts +1 -4
  32. package/dist/components/power-sensor/power-sensor.d.ts +6 -20
  33. package/dist/components/switch/switch.d.ts +2 -3
  34. package/dist/debug.d.ts +74 -0
  35. package/dist/events.d.ts +12 -10
  36. package/dist/extra/stream/client.d.ts +12 -11
  37. package/dist/extra/stream/stream.d.ts +1 -1
  38. package/dist/gen/app/agent/v1/agent_connect.d.ts +1 -1
  39. package/dist/gen/app/build/v1/build_connect.d.ts +1 -1
  40. package/dist/gen/app/build/v1/build_pb.d.ts +30 -0
  41. package/dist/gen/app/cloudslam/v1/cloud_slam_connect.d.ts +1 -1
  42. package/dist/gen/app/data/v1/data_connect.d.ts +90 -2
  43. package/dist/gen/app/data/v1/data_pb.d.ts +562 -1
  44. package/dist/gen/app/datapipelines/v1/data_pipelines_connect.d.ts +1 -1
  45. package/dist/gen/app/dataset/v1/dataset_connect.d.ts +25 -3
  46. package/dist/gen/app/dataset/v1/dataset_pb.d.ts +227 -1
  47. package/dist/gen/app/datasync/v1/data_sync_connect.d.ts +1 -1
  48. package/dist/gen/app/mlinference/v1/ml_inference_connect.d.ts +1 -1
  49. package/dist/gen/app/mltraining/v1/ml_training_connect.d.ts +1 -1
  50. package/dist/gen/app/packages/v1/packages_connect.d.ts +1 -1
  51. package/dist/gen/app/v1/app_connect.d.ts +1 -1
  52. package/dist/gen/app/v1/billing_connect.d.ts +1 -1
  53. package/dist/gen/app/v1/end_user_connect.d.ts +1 -1
  54. package/dist/gen/app/v1/robot_connect.d.ts +1 -1
  55. package/dist/gen/common/v1/common_pb.d.ts +26 -0
  56. package/dist/gen/component/arm/v1/arm_connect.d.ts +1 -1
  57. package/dist/gen/component/arm/v1/arm_pb.d.ts +17 -0
  58. package/dist/gen/component/audioin/v1/audioin_connect.d.ts +1 -1
  59. package/dist/gen/component/audioout/v1/audioout_connect.d.ts +16 -2
  60. package/dist/gen/component/audioout/v1/audioout_pb.d.ts +115 -0
  61. package/dist/gen/component/base/v1/base_connect.d.ts +1 -1
  62. package/dist/gen/component/board/v1/board_connect.d.ts +1 -1
  63. package/dist/gen/component/button/v1/button_connect.d.ts +1 -1
  64. package/dist/gen/component/camera/v1/camera_connect.d.ts +1 -1
  65. package/dist/gen/component/encoder/v1/encoder_connect.d.ts +1 -1
  66. package/dist/gen/component/gantry/v1/gantry_connect.d.ts +1 -1
  67. package/dist/gen/component/generic/v1/generic_connect.d.ts +1 -1
  68. package/dist/gen/component/gripper/v1/gripper_connect.d.ts +24 -2
  69. package/dist/gen/component/gripper/v1/gripper_pb.d.ts +118 -0
  70. package/dist/gen/component/inputcontroller/v1/input_controller_connect.d.ts +1 -1
  71. package/dist/gen/component/motor/v1/motor_connect.d.ts +1 -1
  72. package/dist/gen/component/movementsensor/v1/movementsensor_connect.d.ts +1 -1
  73. package/dist/gen/component/posetracker/v1/pose_tracker_connect.d.ts +1 -1
  74. package/dist/gen/component/powersensor/v1/powersensor_connect.d.ts +1 -1
  75. package/dist/gen/component/sensor/v1/sensor_connect.d.ts +1 -1
  76. package/dist/gen/component/servo/v1/servo_connect.d.ts +1 -1
  77. package/dist/gen/component/switch/v1/switch_connect.d.ts +1 -1
  78. package/dist/gen/component/testecho/v1/testecho_connect.d.ts +1 -1
  79. package/dist/gen/google/bytestream/bytestream_connect.d.ts +1 -1
  80. package/dist/gen/google/iam/v1/iam_policy_connect.d.ts +1 -1
  81. package/dist/gen/google/longrunning/operations_connect.d.ts +1 -1
  82. package/dist/gen/grpc/reflection/v1/reflection_connect.d.ts +1 -1
  83. package/dist/gen/opentelemetry/proto/collector/logs/v1/logs_service_connect.d.ts +1 -1
  84. package/dist/gen/opentelemetry/proto/collector/metrics/v1/metrics_service_connect.d.ts +1 -1
  85. package/dist/gen/opentelemetry/proto/collector/profiles/v1development/profiles_service_connect.d.ts +1 -1
  86. package/dist/gen/opentelemetry/proto/collector/trace/v1/trace_service_connect.d.ts +1 -1
  87. package/dist/gen/proto/rpc/examples/echo/v1/echo_connect.d.ts +1 -1
  88. package/dist/gen/proto/rpc/examples/echoresource/v1/echoresource_connect.d.ts +1 -1
  89. package/dist/gen/proto/rpc/v1/auth_connect.d.ts +1 -1
  90. package/dist/gen/proto/rpc/webrtc/v1/signaling_connect.d.ts +1 -1
  91. package/dist/gen/provisioning/v1/provisioning_connect.d.ts +1 -1
  92. package/dist/gen/robot/v1/robot_connect.d.ts +1 -1
  93. package/dist/gen/service/datamanager/v1/data_manager_connect.d.ts +1 -1
  94. package/dist/gen/service/discovery/v1/discovery_connect.d.ts +1 -1
  95. package/dist/gen/service/generic/v1/generic_connect.d.ts +1 -1
  96. package/dist/gen/service/mlmodel/v1/mlmodel_connect.d.ts +1 -1
  97. package/dist/gen/service/motion/v1/motion_connect.d.ts +1 -1
  98. package/dist/gen/service/navigation/v1/navigation_connect.d.ts +1 -1
  99. package/dist/gen/service/sensors/v1/sensors_connect.d.ts +1 -1
  100. package/dist/gen/service/shell/v1/shell_connect.d.ts +1 -1
  101. package/dist/gen/service/slam/v1/slam_connect.d.ts +1 -1
  102. package/dist/gen/service/video/v1/video_connect.d.ts +1 -1
  103. package/dist/gen/service/vision/v1/vision_connect.d.ts +1 -1
  104. package/dist/gen/service/worldstatestore/v1/world_state_store_connect.d.ts +1 -1
  105. package/dist/gen/stream/v1/stream_connect.d.ts +1 -1
  106. package/dist/main.d.ts +12 -12
  107. package/dist/main.es.js +28872 -32280
  108. package/dist/main.umd.js +6 -7
  109. package/dist/robot/client.d.ts +68 -58
  110. package/dist/robot/dial.d.ts +7 -10
  111. package/dist/robot/robot.d.ts +27 -29
  112. package/dist/rpc/client-channel.d.ts +1 -1
  113. package/dist/rpc/client-stream.d.ts +4 -5
  114. package/dist/rpc/connection-closed-error.d.ts +1 -1
  115. package/dist/rpc/dial.d.ts +35 -41
  116. package/dist/rpc/index.d.ts +1 -1
  117. package/dist/rpc/signaling-exchange.d.ts +1 -1
  118. package/dist/rpc/stream-client-stream.d.ts +1 -1
  119. package/dist/rpc/unary-client-stream.d.ts +1 -1
  120. package/dist/services/data-manager/client.d.ts +5 -14
  121. package/dist/services/data-manager/data-manager.d.ts +1 -1
  122. package/dist/services/generic/client.d.ts +1 -1
  123. package/dist/services/generic/generic.d.ts +1 -2
  124. package/dist/services/motion/motion.d.ts +53 -78
  125. package/dist/services/navigation/client.d.ts +1 -1
  126. package/dist/services/navigation/navigation.d.ts +2 -4
  127. package/dist/services/slam/client.d.ts +1 -1
  128. package/dist/services/slam/slam.d.ts +4 -6
  129. package/dist/services/video/video.d.ts +2 -6
  130. package/dist/services/vision/vision.d.ts +13 -19
  131. package/dist/services/world-state-store/world-state-store.d.ts +6 -19
  132. package/dist/types.d.ts +5 -7
  133. package/dist/utils.d.ts +5 -5
  134. 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;
@@ -202,6 +218,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
202
218
  private worldStateStoreServiceClient;
203
219
  private currentRetryAttempt;
204
220
  private isReconnecting;
221
+ private connectionId;
205
222
  private onICEConnectionStateChange?;
206
223
  private onDataChannelClose?;
207
224
  private onTrack?;
@@ -496,12 +513,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
496
513
  readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
497
514
  readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
498
515
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
499
- }; /**
500
- * When set, filters the signaling server's TURN list to only the server whose
501
- * parsed URI matches (compared by scheme, host, port, and transport —
502
- * defaulting transport to UDP if unspecified). Example:
503
- * `"turn:turn.viam.com:443"`
504
- */
516
+ };
505
517
  readonly getGeometries: {
506
518
  readonly name: "GetGeometries";
507
519
  readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest;
@@ -767,13 +779,24 @@ export declare class RobotClient extends EventDispatcher implements Robot {
767
779
  readonly O: typeof import("../gen/component/gripper/v1/gripper_pb").IsHoldingSomethingResponse;
768
780
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
769
781
  };
782
+ readonly getCurrentInputs: {
783
+ readonly name: "GetCurrentInputs";
784
+ readonly I: typeof import("../gen/component/gripper/v1/gripper_pb").GetCurrentInputsRequest;
785
+ readonly O: typeof import("../gen/component/gripper/v1/gripper_pb").GetCurrentInputsResponse;
786
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
787
+ };
788
+ readonly goToInputs: {
789
+ readonly name: "GoToInputs";
790
+ readonly I: typeof import("../gen/component/gripper/v1/gripper_pb").GoToInputsRequest;
791
+ readonly O: typeof import("../gen/component/gripper/v1/gripper_pb").GoToInputsResponse;
792
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
793
+ };
770
794
  readonly doCommand: {
771
795
  readonly name: "DoCommand";
772
796
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
773
797
  readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
774
798
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
775
799
  };
776
- /** @default Number.POSITIVE_INFINITY */
777
800
  readonly getStatus: {
778
801
  readonly name: "GetStatus";
779
802
  readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
@@ -1000,7 +1023,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1000
1023
  readonly goTo: {
1001
1024
  readonly name: "GoTo";
1002
1025
  readonly I: typeof import("../gen/component/motor/v1/motor_pb").GoToRequest;
1003
- readonly O: typeof import("../gen/component/motor/v1/motor_pb").GoToResponse; /** Options required to dial a robot via WebRTC. */
1026
+ readonly O: typeof import("../gen/component/motor/v1/motor_pb").GoToResponse;
1004
1027
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1005
1028
  };
1006
1029
  readonly setRPM: {
@@ -1011,10 +1034,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1011
1034
  };
1012
1035
  readonly resetZeroPosition: {
1013
1036
  readonly name: "ResetZeroPosition";
1014
- /**
1015
- * When true, sets ICE transport policy to relay-only so only TURN candidates
1016
- * are used. Useful for testing relay connectivity through a TURN server.
1017
- */
1018
1037
  readonly I: typeof import("../gen/component/motor/v1/motor_pb").ResetZeroPositionRequest;
1019
1038
  readonly O: typeof import("../gen/component/motor/v1/motor_pb").ResetZeroPositionResponse;
1020
1039
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
@@ -1217,12 +1236,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1217
1236
  readonly getStatus: {
1218
1237
  readonly name: "GetStatus";
1219
1238
  readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
1220
- readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse; /**
1221
- * Set timeout in milliseconds for dialing. Default is defined by
1222
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
1223
- *
1224
- * @deprecated Use `dialTimeoutMs` instead.
1225
- */
1239
+ readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
1226
1240
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1227
1241
  };
1228
1242
  };
@@ -1282,10 +1296,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1282
1296
  readonly name: "GetStatus";
1283
1297
  readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
1284
1298
  readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
1285
- /**
1286
- * Set timeout in milliseconds for dialing. Default is defined by
1287
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
1288
- */
1289
1299
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1290
1300
  };
1291
1301
  };
@@ -1434,7 +1444,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1434
1444
  stopAll(): Promise<void>;
1435
1445
  frameSystemConfig(transforms: Transform[]): Promise<import("../gen/robot/v1/robot_pb").FrameSystemConfig[]>;
1436
1446
  transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[], callOptions?: CallOptions): Promise<PoseInFrame>;
1437
- transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array>;
1447
+ transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array<ArrayBufferLike>>;
1438
1448
  getModelsFromModules(): Promise<import("../gen/robot/v1/robot_pb").ModuleModel[]>;
1439
1449
  getCloudMetadata(): Promise<import("../gen/robot/v1/robot_pb").GetCloudMetadataResponse>;
1440
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>;
@@ -57,8 +57,8 @@ export interface Robot {
57
57
  */
58
58
  cancelOperation(id: string): Promise<void>;
59
59
  /**
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.
60
+ * Blocks on the specified operation on the machine. This function will only return when the
61
+ * specific operation has finished or has been cancelled.
62
62
  *
63
63
  * @example
64
64
  *
@@ -72,8 +72,8 @@ export interface Robot {
72
72
  */
73
73
  blockForOperation(id: string): Promise<void>;
74
74
  /**
75
- * Cancel all current and outstanding operations for the robot and stop all
76
- * actuators and movement.
75
+ * Cancel all current and outstanding operations for the robot and stop all actuators and
76
+ * movement.
77
77
  *
78
78
  * @example
79
79
  *
@@ -81,8 +81,8 @@ export interface Robot {
81
81
  * await machine.stopAll();
82
82
  * ```
83
83
  *
84
- * @param extra - Any extra parameters to pass to the components' `stop`
85
- * methods, keyed on the component's resource name.
84
+ * @param extra - Any extra parameters to pass to the components' `stop` methods, keyed on the
85
+ * component's resource name.
86
86
  * @group Operations
87
87
  * @alpha
88
88
  */
@@ -101,29 +101,28 @@ export interface Robot {
101
101
  */
102
102
  frameSystemConfig(transform: Transform[]): Promise<FrameSystemConfig[]>;
103
103
  /**
104
- * Transform a given source Pose from the reference frame to a new specified
105
- * destination which is a reference frame.
104
+ * Transform a given source Pose from the reference frame to a new specified destination which is
105
+ * a reference frame.
106
106
  *
107
107
  * @param query - The pose that should be transformed
108
108
  * @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
109
+ * @param supplementalTransforms - Pose information on any additional reference frames that are
110
+ * needed to perform the transform
111
111
  * @group Frame System
112
112
  * @alpha
113
113
  */
114
114
  transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[], callOptions?: CallOptions): Promise<PoseInFrame>;
115
115
  /**
116
- * Transform a given source point cloud from the reference frame to a new
117
- * specified destination which is a reference frame.
116
+ * Transform a given source point cloud from the reference frame to a new specified destination
117
+ * which is a reference frame.
118
118
  *
119
119
  * @param pointCloudPCD - The point clouds to transform. This should be in the
120
120
  * {@link https://pointclouds.org/documentation/tutorials/pcd_file_format.html PCD format encoded into bytes}
121
121
  * @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.
122
+ * @param destination - The reference frame into which the source data should be transformed, if
123
+ * unset this defaults to the "world" reference frame. Do not move the robot between the
124
+ * generation of the initial pointcloud and the receipt of the transformed pointcloud because
125
+ * that will make the transformations inaccurate.
127
126
  * @group Frame System
128
127
  * @alpha
129
128
  */
@@ -170,13 +169,12 @@ export interface Robot {
170
169
  /**
171
170
  * Call a function when a connection event occurs.
172
171
  *
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`.
172
+ * Note that direct gRPC connections that disconnect will not emit a disconnect event. WebRTC
173
+ * connections that disconnect will emit a disconnect event. All connections emit events during
174
+ * manual calls of `connect` and `disconnect`.
177
175
  *
178
- * @param type - The event MachineConnectionEvent that was triggered, or all
179
- * connection events with 'connectionstatechange'.
176
+ * @param type - The event MachineConnectionEvent that was triggered, or all connection events
177
+ * with 'connectionstatechange'.
180
178
  * @param listener - The function to call
181
179
  * @alpha
182
180
  */
@@ -215,10 +213,10 @@ export interface Robot {
215
213
  * await machine.restartModule('namespace:module:model', 'my_model_name');
216
214
  * ```
217
215
  *
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
216
+ * @param moduleId - The id matching the module_id field of the registry module in your part
217
+ * configuration
218
+ * @param moduleName - The name matching the name field of the local/registry module in your part
219
+ * configuration
222
220
  * @group Modules
223
221
  * @alpha
224
222
  */
@@ -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
  }
@@ -90,6 +84,7 @@ export type TransportFactory = (init: TransportInitOptions) => Transport;
90
84
  interface TransportInitOptions {
91
85
  baseUrl: string;
92
86
  }
87
+ export declare const wrapTransportWithDebugLogging: <T extends Transport>(transport: T, connectionId: string) => T;
93
88
  export declare const dialDirect: (address: string, opts?: DialOptions, transportCredentialsInclude?: boolean) => Promise<Transport>;
94
89
  export declare class AuthenticatedTransport implements Transport {
95
90
  protected readonly transport: Transport;
@@ -105,12 +100,11 @@ export interface WebRTCConnection {
105
100
  dataChannel: RTCDataChannel;
106
101
  }
107
102
  /**
108
- * DialWebRTC makes a connection to given host by signaling with the address
109
- * provided. A Promise is returned upon successful connection that contains a
110
- * transport factory to use with gRPC client as well as the WebRTC
111
- * PeerConnection itself. Care should be taken with the PeerConnection and is
112
- * currently returned for experimental use. TODO(GOUT-7): figure out decent way
113
- * 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
114
108
  */
115
109
  export declare const dialWebRTC: (signalingAddress: string, host: string, dialOpts?: DialOptions, transportCredentialsInclude?: boolean) => Promise<WebRTCConnection>;
116
110
  export declare const validateDialOptions: (opts?: DialOptions) => void;
@@ -6,5 +6,5 @@ declare global {
6
6
  GRPC_TRACE_LOGGING?: boolean;
7
7
  } | undefined;
8
8
  }
9
- export { cloneHeaders, dialDirect, dialWebRTC, type DialOptions, type DialWebRTCOptions, type WebRTCConnection, } from './dial';
9
+ export { cloneHeaders, dialDirect, dialWebRTC, wrapTransportWithDebugLogging, type DialOptions, type DialWebRTCOptions, type WebRTCConnection, } from './dial';
10
10
  export { ConnectionClosedError } from './connection-closed-error';
@@ -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 {
@@ -1,6 +1,6 @@
1
1
  import type { Message, PartialMessage } from '@bufbuild/protobuf';
2
2
  import type { ContextValues, StreamResponse } from '@connectrpc/connect';
3
- import { ResponseHeaders, ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
3
+ import { type ResponseHeaders, type ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
4
4
  import { ClientStream } from './client-stream';
5
5
  export declare class StreamClientStream<I extends Message<I>, O extends Message<O>> extends ClientStream<I, O> {
6
6
  private awaitingHeadersResult?;
@@ -1,6 +1,6 @@
1
1
  import type { Message, PartialMessage } from '@bufbuild/protobuf';
2
2
  import type { ContextValues, UnaryResponse } from '@connectrpc/connect';
3
- import { ResponseHeaders, ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
3
+ import { type ResponseHeaders, type ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
4
4
  import { ClientStream } from './client-stream';
5
5
  export declare class UnaryClientStream<I extends Message<I>, O extends Message<O>> extends ClientStream<I, O> {
6
6
  private result?;