@viamrobotics/sdk 0.70.0 → 0.72.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.
@@ -202,6 +202,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
202
202
  private worldStateStoreServiceClient;
203
203
  private currentRetryAttempt;
204
204
  private isReconnecting;
205
+ private connectionId;
205
206
  private onICEConnectionStateChange?;
206
207
  private onDataChannelClose?;
207
208
  private onTrack?;
@@ -246,7 +247,11 @@ export declare class RobotClient extends EventDispatcher implements Robot {
246
247
  readonly I: typeof import("../gen/robot/v1/robot_pb").CancelOperationRequest;
247
248
  readonly O: typeof import("../gen/robot/v1/robot_pb").CancelOperationResponse;
248
249
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
249
- };
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
+ */
250
255
  readonly blockForOperation: {
251
256
  readonly name: "BlockForOperation";
252
257
  readonly I: typeof import("../gen/robot/v1/robot_pb").BlockForOperationRequest;
@@ -269,7 +274,12 @@ export declare class RobotClient extends EventDispatcher implements Robot {
269
274
  readonly name: "StreamStatus";
270
275
  readonly I: typeof import("../gen/robot/v1/robot_pb").StreamStatusRequest;
271
276
  readonly O: typeof import("../gen/robot/v1/robot_pb").StreamStatusResponse;
272
- readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
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
+ */
273
283
  };
274
284
  readonly stopAll: {
275
285
  readonly name: "StopAll";
@@ -287,6 +297,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
287
297
  readonly name: "SendSessionHeartbeat";
288
298
  readonly I: typeof import("../gen/robot/v1/robot_pb").SendSessionHeartbeatRequest;
289
299
  readonly O: typeof import("../gen/robot/v1/robot_pb").SendSessionHeartbeatResponse;
300
+ /** Options required to dial a robot. */
290
301
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
291
302
  };
292
303
  readonly log: {
@@ -406,6 +417,11 @@ export declare class RobotClient extends EventDispatcher implements Robot {
406
417
  readonly name: "Stop";
407
418
  readonly I: typeof import("../gen/component/arm/v1/arm_pb").StopRequest;
408
419
  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
+ */
409
425
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
410
426
  };
411
427
  readonly isMoving: {
@@ -424,6 +440,12 @@ export declare class RobotClient extends EventDispatcher implements Robot {
424
440
  readonly name: "GetStatus";
425
441
  readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
426
442
  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
+ */
427
449
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
428
450
  };
429
451
  readonly getKinematics: {
@@ -485,6 +507,11 @@ export declare class RobotClient extends EventDispatcher implements Robot {
485
507
  readonly O: typeof import("../gen/component/base/v1/base_pb").IsMovingResponse;
486
508
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
487
509
  };
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
+ */
488
515
  readonly doCommand: {
489
516
  readonly name: "DoCommand";
490
517
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
@@ -496,12 +523,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
496
523
  readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
497
524
  readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
498
525
  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
- */
526
+ };
505
527
  readonly getGeometries: {
506
528
  readonly name: "GetGeometries";
507
529
  readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest;
@@ -510,7 +532,10 @@ export declare class RobotClient extends EventDispatcher implements Robot {
510
532
  };
511
533
  readonly getProperties: {
512
534
  readonly name: "GetProperties";
513
- readonly I: typeof import("../gen/component/base/v1/base_pb").GetPropertiesRequest;
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
+ */
514
539
  readonly O: typeof import("../gen/component/base/v1/base_pb").GetPropertiesResponse;
515
540
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
516
541
  };
@@ -593,6 +618,10 @@ export declare class RobotClient extends EventDispatcher implements Robot {
593
618
  };
594
619
  readonly setPowerMode: {
595
620
  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
+ */
596
625
  readonly I: typeof import("../gen/component/board/v1/board_pb").SetPowerModeRequest;
597
626
  readonly O: typeof import("../gen/component/board/v1/board_pb").SetPowerModeResponse;
598
627
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
@@ -682,7 +711,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
682
711
  readonly isMoving: {
683
712
  readonly name: "IsMoving";
684
713
  readonly I: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingRequest;
685
- readonly O: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingResponse;
714
+ readonly O: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingResponse; /** @default 10. */
686
715
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
687
716
  };
688
717
  readonly doCommand: {
@@ -767,13 +796,24 @@ export declare class RobotClient extends EventDispatcher implements Robot {
767
796
  readonly O: typeof import("../gen/component/gripper/v1/gripper_pb").IsHoldingSomethingResponse;
768
797
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
769
798
  };
799
+ readonly getCurrentInputs: {
800
+ readonly name: "GetCurrentInputs";
801
+ readonly I: typeof import("../gen/component/gripper/v1/gripper_pb").GetCurrentInputsRequest;
802
+ readonly O: typeof import("../gen/component/gripper/v1/gripper_pb").GetCurrentInputsResponse;
803
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
804
+ };
805
+ readonly goToInputs: {
806
+ readonly name: "GoToInputs";
807
+ readonly I: typeof import("../gen/component/gripper/v1/gripper_pb").GoToInputsRequest;
808
+ readonly O: typeof import("../gen/component/gripper/v1/gripper_pb").GoToInputsResponse;
809
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
810
+ };
770
811
  readonly doCommand: {
771
812
  readonly name: "DoCommand";
772
813
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
773
814
  readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
774
815
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
775
816
  };
776
- /** @default Number.POSITIVE_INFINITY */
777
817
  readonly getStatus: {
778
818
  readonly name: "GetStatus";
779
819
  readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
@@ -1000,7 +1040,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1000
1040
  readonly goTo: {
1001
1041
  readonly name: "GoTo";
1002
1042
  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. */
1043
+ readonly O: typeof import("../gen/component/motor/v1/motor_pb").GoToResponse;
1004
1044
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1005
1045
  };
1006
1046
  readonly setRPM: {
@@ -1011,10 +1051,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1011
1051
  };
1012
1052
  readonly resetZeroPosition: {
1013
1053
  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
1054
  readonly I: typeof import("../gen/component/motor/v1/motor_pb").ResetZeroPositionRequest;
1019
1055
  readonly O: typeof import("../gen/component/motor/v1/motor_pb").ResetZeroPositionResponse;
1020
1056
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
@@ -1211,18 +1247,14 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1211
1247
  readonly doCommand: {
1212
1248
  readonly name: "DoCommand";
1213
1249
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
1250
+ /** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
1214
1251
  readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
1215
1252
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1216
1253
  };
1217
1254
  readonly getStatus: {
1218
1255
  readonly name: "GetStatus";
1219
1256
  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
- */
1257
+ readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
1226
1258
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1227
1259
  };
1228
1260
  };
@@ -1279,13 +1311,14 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1279
1311
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1280
1312
  };
1281
1313
  readonly getStatus: {
1282
- readonly name: "GetStatus";
1283
- readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
1284
- readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
1285
- /**
1314
+ readonly name: "GetStatus"; /**
1286
1315
  * Set timeout in milliseconds for dialing. Default is defined by
1287
1316
  * DIAL_TIMEOUT. A value of 0 disables the timeout.
1317
+ *
1318
+ * @deprecated Use `dialTimeoutMs` instead.
1288
1319
  */
1320
+ readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
1321
+ readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
1289
1322
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1290
1323
  };
1291
1324
  };
@@ -1331,7 +1364,11 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1331
1364
  };
1332
1365
  readonly getGeometries: {
1333
1366
  readonly name: "GetGeometries";
1334
- readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest;
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
+ */
1335
1372
  readonly O: typeof import("../gen/common/v1/common_pb").GetGeometriesResponse;
1336
1373
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1337
1374
  };
@@ -1367,7 +1404,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1367
1404
  readonly doCommand: {
1368
1405
  readonly name: "DoCommand";
1369
1406
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
1370
- readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
1407
+ readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse; /** @default Number.POSITIVE_INFINITY */
1371
1408
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1372
1409
  };
1373
1410
  readonly getStatus: {
@@ -90,6 +90,7 @@ export type TransportFactory = (init: TransportInitOptions) => Transport;
90
90
  interface TransportInitOptions {
91
91
  baseUrl: string;
92
92
  }
93
+ export declare const wrapTransportWithDebugLogging: <T extends Transport>(transport: T, connectionId: string) => T;
93
94
  export declare const dialDirect: (address: string, opts?: DialOptions, transportCredentialsInclude?: boolean) => Promise<Transport>;
94
95
  export declare class AuthenticatedTransport implements Transport {
95
96
  protected readonly transport: Transport;
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/sdk",
3
- "version": "0.70.0",
3
+ "version": "0.72.0",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",