abb-rws-client 0.5.0 → 0.7.2

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 (63) hide show
  1. package/CHANGELOG.md +203 -0
  2. package/README.md +215 -28
  3. package/dist/HttpSession.d.ts.map +1 -1
  4. package/dist/HttpSession.js +18 -1
  5. package/dist/HttpSession.js.map +1 -1
  6. package/dist/IRWSAdapter.d.ts +421 -0
  7. package/dist/IRWSAdapter.d.ts.map +1 -0
  8. package/dist/IRWSAdapter.js +2 -0
  9. package/dist/IRWSAdapter.js.map +1 -0
  10. package/dist/Logger.d.ts +35 -0
  11. package/dist/Logger.d.ts.map +1 -0
  12. package/dist/Logger.js +24 -0
  13. package/dist/Logger.js.map +1 -0
  14. package/dist/MultiRobotManager.d.ts +56 -0
  15. package/dist/MultiRobotManager.d.ts.map +1 -0
  16. package/dist/MultiRobotManager.js +129 -0
  17. package/dist/MultiRobotManager.js.map +1 -0
  18. package/dist/RWS1Adapter.d.ts +297 -0
  19. package/dist/RWS1Adapter.d.ts.map +1 -0
  20. package/dist/RWS1Adapter.js +870 -0
  21. package/dist/RWS1Adapter.js.map +1 -0
  22. package/dist/RWS2Adapter.d.ts +20 -0
  23. package/dist/RWS2Adapter.d.ts.map +1 -0
  24. package/dist/RWS2Adapter.js +19 -0
  25. package/dist/RWS2Adapter.js.map +1 -0
  26. package/dist/ResourceMapper.d.ts +9 -2
  27. package/dist/ResourceMapper.d.ts.map +1 -1
  28. package/dist/ResourceMapper.js +11 -3
  29. package/dist/ResourceMapper.js.map +1 -1
  30. package/dist/RobotManager.d.ts +536 -0
  31. package/dist/RobotManager.d.ts.map +1 -0
  32. package/dist/RobotManager.js +1523 -0
  33. package/dist/RobotManager.js.map +1 -0
  34. package/dist/RwsClient.d.ts +33 -3
  35. package/dist/RwsClient.d.ts.map +1 -1
  36. package/dist/RwsClient.js +74 -10
  37. package/dist/RwsClient.js.map +1 -1
  38. package/dist/RwsClient2.d.ts +438 -0
  39. package/dist/RwsClient2.d.ts.map +1 -0
  40. package/dist/RwsClient2.js +1672 -0
  41. package/dist/RwsClient2.js.map +1 -0
  42. package/dist/XhtmlParser.d.ts +24 -0
  43. package/dist/XhtmlParser.d.ts.map +1 -0
  44. package/dist/XhtmlParser.js +56 -0
  45. package/dist/XhtmlParser.js.map +1 -0
  46. package/dist/detect.d.ts +54 -0
  47. package/dist/detect.d.ts.map +1 -0
  48. package/dist/detect.js +187 -0
  49. package/dist/detect.js.map +1 -0
  50. package/dist/index.d.ts +29 -2
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +30 -2
  53. package/dist/index.js.map +1 -1
  54. package/dist/types.d.ts +2 -2
  55. package/dist/types.d.ts.map +1 -1
  56. package/dist/types.js.map +1 -1
  57. package/examples/01-quickstart-auto.mjs +20 -0
  58. package/examples/02-rws1-explicit.mjs +30 -0
  59. package/examples/03-rws2-explicit.mjs +26 -0
  60. package/examples/04-multi-robot.mjs +35 -0
  61. package/examples/05-remote-control-rmmp.mjs +52 -0
  62. package/examples/06-pull-module-source.mjs +38 -0
  63. package/package.json +30 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,203 @@
1
+ # Changelog
2
+
3
+ All notable changes to `abb-rws-client` are documented here.
4
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [0.7.2] — 2026-05-08
8
+
9
+ ### Documentation
10
+
11
+ - **Fixed the embarrassing compatibility table** that incorrectly claimed
12
+ RobotWare 7.x / OmniCore was "Not compatible". The package has supported
13
+ both protocols since v0.7.0 — the table was a stale leftover from when
14
+ only RWS 1.0 shipped. Now correctly shows both ✅, with live-tested
15
+ versions called out (RW7.21 + RW6.16).
16
+ - **Documented `RobotManager` higher-level surface** — the README's
17
+ API-reference tables only covered the protocol-level `RwsClient`, so
18
+ callers couldn't see what `RobotManager` adds on top: RMMP, mastership
19
+ status, opmode auto-routing, backup, FK, service-routine call,
20
+ tool/wobj activation, CFG write surface, DIPC messaging, file volumes,
21
+ module source, compress, value validation. New section lists all of
22
+ these with descriptions.
23
+ - **Clarified RWS 2.0 subscription quirks** — the polling-fallback
24
+ paragraph now names the specific RWS 2.0 VC `robapi2_subscription`
25
+ rejection that triggers the fallback, rather than implying it's
26
+ always 5s polling.
27
+ - **Session-pool clarifications** — IRC5's 70-session number was being
28
+ presented as universal; called out OmniCore's also-finite-but-different
29
+ pool with the empirical 503-once-full behaviour we observed during
30
+ protocol probes.
31
+ - **`RobotManager` polling cadence** correctly described as hybrid:
32
+ 5 s when WS subscriptions handle state changes, 1 s when polling
33
+ covers everything.
34
+
35
+ No code changes — pure README updates. `RwsClient`, `RwsClient2`,
36
+ `RobotManager`, `MultiRobotManager`, `createClient`, all examples and
37
+ unit tests are bit-for-bit identical to v0.7.1.
38
+
39
+ ## [0.7.1] — 2026-05-07
40
+
41
+ ### Added
42
+
43
+ - **RMMP (Remote Mastership Privilege)** is now part of the public `RobotManager`
44
+ surface — `getRmmpPrivilege()` and `requestRmmp(level)`. The `withMastership()`
45
+ helper now also gates on RMMP, so any modify operation in AUTO mode will
46
+ automatically request RMMP and surface an actionable error ("approve the
47
+ popup on the FlexPendant") when the operator hasn't granted remote control
48
+ yet. This matches RobotStudio Online's behaviour and removes the most common
49
+ cause of mastership-acquired-but-403 failures.
50
+ - **Service-routine / arbitrary PROC call** — `callServiceRoutine(task, name,
51
+ args?)` lets a remote client kick off a service routine (calibration, brake
52
+ check, custom service procs) without going through the FlexPendant's
53
+ Service Routine menu.
54
+ - **Tool / Work-object activation** — `setActiveTool(mechunit, name)` and
55
+ `setActiveWobj(mechunit, name)` switch the active persistent tooldata /
56
+ wobjdata mid-session.
57
+ - **Module metadata** — `getModuleInfo(task, module)` exposed publicly (was
58
+ adapter-only). Returns path, attributes, type, line count.
59
+ - **Backup restore** — `restoreBackup(name)` exposed publicly (was adapter-only).
60
+ - **Backup status** type-narrowed — `getBackupStatus()` now returns the full
61
+ `{ active; progress?; phase? }` shape on every code path (no more union
62
+ with bare `{ active }`).
63
+ - **CFG write surface** exposed publicly with mastership wrapping —
64
+ `setCfgInstance`, `createCfgInstance`, `removeCfgInstance`, `loadCfgFile`,
65
+ `saveCfgFile`. Each acquires `'edit'` mastership for the duration of the
66
+ call.
67
+ - **DIPC public API** — `listDipcQueues`, `createDipcQueue`, `sendDipcMessage`,
68
+ `readDipcMessage`, `removeDipcQueue` exposed on `RobotManager`.
69
+ - **File volumes** — `listFileVolumes()` returns the controller's available
70
+ volumes (HOME, BACKUP, DATA, ADDINDATA, PRODUCTS, RAMDISK, TEMP).
71
+ - **Compress** — `compressPath(source, destination)` for archiving controller
72
+ files in-place.
73
+ - **Mastership status** — `getMastershipStatus(domain)` returns
74
+ `{ mastership; uid?; application? }`. Useful for diagnosing 403s ("which
75
+ client / FlexPendant is currently holding the lock?").
76
+
77
+ ### Improved
78
+
79
+ - `getRobotType`, `getProgramPointer`, `getMotionPointer` now have explicit
80
+ return-type annotations on the `RobotManager` wrappers — TypeScript no
81
+ longer collapses the empty-default into a property-less union.
82
+
83
+ ### No breaking changes
84
+
85
+ - All additions are new methods or default-no-op widening. Existing callers
86
+ using `RobotManager` keep working without any changes.
87
+
88
+ ## [0.7.0] — 2026-05-06
89
+
90
+ This release adds RWS 2.0 (OmniCore / RobotWare 7) support, multi-robot
91
+ management, auto-detection helpers, and a full set of higher-level building
92
+ blocks. The package now legitimately covers BOTH RWS protocols ABB ships,
93
+ including the long-tail endpoints (devices, all-IO-devices, mastership
94
+ extras, forward kinematics) that were missing from prior versions.
95
+
96
+ ### Added
97
+
98
+ - **`RwsClient2`** — RWS 2.0 protocol client for OmniCore controllers.
99
+ HTTP Basic auth, XHTML responses (`Accept: application/xhtml+xml;v=2.0`),
100
+ path-based actions (`/rw/rapid/execution/stop`), `'edit'` mastership
101
+ domain, `HOME` file-service prefix, self-signed-TLS tolerance for VCs,
102
+ WebSocket subscriptions via `robapi2_subscription` subprotocol.
103
+
104
+ - **`IRWSAdapter`** — common interface implemented by both RWS 1.0 and 2.0
105
+ adapters. ~140 methods covering panel, RAPID exec, modules, variables,
106
+ motion, system, event log, I/O, file service, CFG database, mastership,
107
+ backup, DIPC, vision, safety, virtual time, certs, registry, jog, IK/FK.
108
+
109
+ - **`RWS1Adapter`** / **`RWS2Adapter`** — wrappers that satisfy `IRWSAdapter`
110
+ on top of `RwsClient` and `RwsClient2` respectively. Use these when you
111
+ want a single typed handle that works across both protocols.
112
+
113
+ - **`RobotManager`** — high-level connection lifecycle: auto port discovery,
114
+ protocol auto-detection, polling, WebSocket subscriptions with polling
115
+ fallback, reconnect-on-failure, state events. `onError` listener lets the
116
+ host (CLI / UI) decide how to surface failures.
117
+
118
+ - **`MultiRobotManager`** — orchestrates several `RobotManager` instances.
119
+ Tracks an "active" robot for UIs that show one at a time, while polling
120
+ state for all. `onError` cascades to every existing and future robot.
121
+
122
+ - **`createClient(opts)`** / **`createAdapter(opts)`** — auto-detect helpers
123
+ that probe the WWW-Authenticate header and return the matching client
124
+ (or `IRWSAdapter`) already connected. Probes common RWS ports if `port`
125
+ is omitted (5466, 9403, 443, 80, 11811).
126
+
127
+ - **`probeProtocol(host, port, https)`** / **`probeHost(host)`** — lower-level
128
+ protocol detection for callers that want explicit control.
129
+
130
+ - **Mastership extras** (RWS 2.0 + partial RWS 1.0):
131
+ - `requestMastershipAll()` / `releaseMastershipAll()` — all-domains in one call
132
+ - `requestMastershipWithId(domain)` / `releaseMastershipWithId(domain, id)` —
133
+ token-based mastership that survives session loss; useful for clients
134
+ that periodically reconnect (RWS 2.0 only)
135
+ - `resetMastershipWatchdog()` — heartbeat for RobotWare 7.8+ during long
136
+ RAPID runs
137
+ - `getMastershipStatus(domain)` / `listMastershipDomains()` — read state
138
+
139
+ - **Devices** — both `/rw/devices` (system hardware/software inventory) and
140
+ `/rw/iosystem/devices` (all configured I/O devices across networks):
141
+ - `listSystemDevices()` — top-level groupings (HW_DEVICES, SW_RESOURCES)
142
+ - `getDeviceTree(group)` — drill into a group
143
+ - `listAllIoDevices()` — flat list of every I/O device with state
144
+
145
+ - **Forward Kinematics** — `calcCartesianFromJoints(joints, mechunit?, tool?, wobj?)`,
146
+ the missing mirror of `calcJointsFromCartesian`. Same VC-license caveat as IK:
147
+ virtual controllers without PC Interface 616-1 reject the call (clean error
148
+ message; no NaN leakage).
149
+
150
+ - **`XhtmlParser`** — exported for advanced users parsing RWS 2.0 responses
151
+ manually. Handles span / li / state extraction with regex.
152
+
153
+ - **`setLogger(impl)`** — pluggable logging interface. The lib ships with a
154
+ no-op default; hosts (e.g. the VS Code extension) install their own
155
+ backend (output channel, console, file, etc.).
156
+
157
+ - **`RwsErrorCode`**: new value `'PROTOCOL_DETECT_FAILED'` for cases where
158
+ no RWS endpoint answers on the probed port(s).
159
+
160
+ - `examples/` directory with four scripts: quickstart-auto, rws1-explicit,
161
+ rws2-explicit, multi-robot.
162
+
163
+ ### Changed
164
+
165
+ - **README** rewritten for dual-protocol support. Quick Start now uses
166
+ `createClient` for the typical case; explicit-protocol usage documented.
167
+
168
+ - **`RwsClient.disconnect()`** now calls `GET /logout` server-side before
169
+ clearing the local session. Without this, the controller-side session
170
+ lingered for several minutes, holding any acquired mastership and
171
+ filling the controller's session pool. Live-verified.
172
+
173
+ - **`RwsClient` createDirectory**: params now in body (`fs-action=create`
174
+ in body, not URL query). Live-verified — RWS 1.0 fileservice returns
175
+ HTTP 400 "Invalid/No Query Parameter" for the URL-query form.
176
+
177
+ - **`RwsClient` copyFile**: `fs-newname` now sends only the basename of the
178
+ destination path. RWS 1.0 fileservice copy operates within the source's
179
+ directory — passing a full path returns 400 "Invalid". Cross-directory
180
+ copy must use read+upload.
181
+
182
+ - `package.json`: added `description`, `keywords`, `homepage`, `repository`,
183
+ `engines.node`, `prepublishOnly` script. Removed invalid self-reference
184
+ in `dependencies`. Added `@types/ws` to devDependencies.
185
+
186
+ ### Compatibility
187
+
188
+ - **Node.js 18+** required (matches existing minimum).
189
+ - **No breaking changes for existing RWS 1.0 users.** `RwsClient` and its
190
+ type exports are unchanged in behavior except for the bug fixes above.
191
+ - New names (`RwsClient2`, `RobotManager`, etc.) sit alongside the old API.
192
+
193
+ ## [0.6.0] — 2026-04-30
194
+
195
+ - WebSocket subscriptions via `subscribe(resources, handler)`.
196
+ - Generic `request(method, path, body?)` escape hatch for RWS endpoints
197
+ not covered by typed methods.
198
+ - ~57 typed RWS 1.0 methods.
199
+
200
+ ## [0.5.0] and earlier
201
+
202
+ - Initial RWS 1.0 client: HTTP Digest auth, session cookie management,
203
+ request rate limiting, automatic re-authentication, typed `RwsError`.
package/README.md CHANGED
@@ -1,15 +1,17 @@
1
1
  # abb-rws-client
2
2
 
3
- A typed TypeScript/Node.js HTTP and WebSocket client for **ABB IRC5 robot controllers** using [Robot Web Services (RWS) 1.0](https://developercenter.robotstudio.com/api/rwsApi/).
3
+ A typed TypeScript/Node.js client for **ABB Robot Web Services** both protocols ABB ships:
4
4
 
5
- > **Compatibility:** RWS 1.0 / RobotWare 6.x only.
6
- > Not compatible with OmniCore, RobotWare 7.x, or RWS 2.0.
5
+ - **RWS 1.0** — IRC5 / RobotWare 6.x → `RwsClient`
6
+ - **RWS 2.0** OmniCore / RobotWare 7.x `RwsClient2`
7
+
8
+ > **Compatibility:** dual-protocol since v0.7.0. Single-line auto-detection via `createClient()` if you don't know which one your controller speaks.
7
9
 
8
10
  ---
9
11
 
10
12
  ## VS Code Extension
11
13
 
12
- Prefer a GUI? The companion VS Code extension gives you live status, motion data, RAPID control, I/O signals, event log, and file management directly from the sidebar — no code required.
14
+ Prefer a GUI? The companion VS Code extension gives you live status, motion data, RAPID control, I/O signals, event log, file management, and CFG database editing directly from the sidebar — no code required. Works against both IRC5 and OmniCore.
13
15
 
14
16
  **[ABB Robot (RWS) — VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=merajsafari.abb-rws)**
15
17
 
@@ -17,14 +19,17 @@ Prefer a GUI? The companion VS Code extension gives you live status, motion data
17
19
 
18
20
  ## Features
19
21
 
20
- - HTTP Digest Authentication (RFC 2617) no external auth libraries
21
- - Session cookie management (`ABBCX`, `-http-session-`) with automatic reuse
22
- - Request rate limiting (< 20 req/sec, configurable)
23
- - Automatic re-authentication after session expiry
24
- - WebSocket subscriptions for real-time events
25
- - Auto-reconnect on WebSocket disconnect (3 retries, exponential backoff)
22
+ - **Dual-protocol** RWS 1.0 (Digest, JSON) and RWS 2.0 (Basic, XHTML;v=2.0)
23
+ - **Auto-detection** `createClient(host)` probes the auth challenge and returns the right client
24
+ - **Multi-robot** `MultiRobotManager` for orchestrating several controllers in one process
25
+ - **Connection lifecycle** `RobotManager` handles port discovery, polling, WebSocket subscriptions with polling fallback, reconnect-on-failure
26
+ - **Typed adapter pattern** `IRWSAdapter` lets you write code that works across both protocols
27
+ - **WebSocket subscriptions** for real-time events (panel state, RAPID exec, signals, persvar, elog, jointtarget, …)
28
+ - Session cookie management (IRC5: avoids the controller's 70-session pool fill; OmniCore: avoids 503 lockout from session-pool exhaustion)
29
+ - Automatic `/logout` on disconnect to release server-side mastership and free the session slot
30
+ - Request rate limiting (< 20 req/sec)
26
31
  - Fully typed public API — every method throws `RwsError` with a typed `code`
27
- - Zero runtime dependencies Node.js built-ins only
32
+ - Single dependency: `ws` (only one we don't reimplement)
28
33
 
29
34
  ---
30
35
 
@@ -34,18 +39,63 @@ Prefer a GUI? The companion VS Code extension gives you live status, motion data
34
39
  npm install abb-rws-client
35
40
  ```
36
41
 
37
- **Requirements:** Node.js 18+ (WebSocket subscriptions require Node 21+ or Node 18 with `--experimental-websocket`).
42
+ **Requirements:** Node.js 18+.
38
43
 
39
44
  ---
40
45
 
41
- ## Quick Start
46
+ ## Quick Start (auto-detect)
47
+
48
+ The simplest path: `createClient` probes the controller and returns the right protocol's client.
49
+
50
+ ```ts
51
+ import { createClient, RwsClient2 } from 'abb-rws-client';
52
+
53
+ const client = await createClient({
54
+ host: '192.168.125.1',
55
+ // username/password default to 'Admin' / 'robotics' (built-in admin account, full UAS grants)
56
+ });
57
+
58
+ console.log(`Connected via ${client instanceof RwsClient2 ? 'RWS 2.0' : 'RWS 1.0'}`);
59
+
60
+ const state = await client.getControllerState(); // 'motoron' | 'motoroff' | …
61
+ const mode = await client.getOperationMode(); // 'AUTO' | 'MANR' | 'MANF'
62
+ const joints = await client.getJointPositions(); // { rax_1, …, rax_6 }
63
+
64
+ await client.disconnect();
65
+ ```
66
+
67
+ If you only target one protocol, skip the helper and instantiate the client directly. See [`examples/`](./examples/) for runnable scripts.
68
+
69
+ ---
70
+
71
+ ## Choosing a client
72
+
73
+ | Controller | Protocol | Class | Auth | Default port |
74
+ |---|---|---|---|---|
75
+ | **IRC5** (RobotWare 6.x) | RWS 1.0 | `RwsClient` | HTTP Digest | 80 (real), 80 / 11811 (VC) |
76
+ | **OmniCore** (RobotWare 7.x) | RWS 2.0 | `RwsClient2` | HTTP Basic | 443 (real), 5466 (VC HTTPS) |
77
+
78
+ Both classes expose **the same method names** for ~140 endpoints (controller state, RAPID execution, modules, variables, motion, I/O, file service, CFG database, mastership, event log, etc.). The protocol differences (URL shapes, response format, mastership-domain naming, `$HOME` vs `HOME`) are handled internally — your code looks the same.
79
+
80
+ If you need a single typed reference that holds either:
81
+
82
+ ```ts
83
+ import { createAdapter, type IRWSAdapter } from 'abb-rws-client';
84
+
85
+ const adapter: IRWSAdapter = await createAdapter({ host: '192.168.125.1' });
86
+ // adapter is RWS1Adapter or RWS2Adapter — both implement IRWSAdapter
87
+ ```
88
+
89
+ ---
90
+
91
+ ## RWS 1.0 explicit usage
42
92
 
43
93
  ```ts
44
94
  import { RwsClient, RwsError } from 'abb-rws-client';
45
95
 
46
96
  const client = new RwsClient({
47
97
  host: '192.168.125.1',
48
- username: 'Default User',
98
+ username: 'Admin',
49
99
  password: 'robotics',
50
100
  });
51
101
 
@@ -85,6 +135,138 @@ await client.disconnect();
85
135
 
86
136
  ---
87
137
 
138
+ ## RWS 2.0 explicit usage
139
+
140
+ ```ts
141
+ import { RwsClient2 } from 'abb-rws-client';
142
+
143
+ // RWS 2.0 takes a base URL (scheme + host + port).
144
+ // Real OmniCore: https://<host>:443
145
+ // OmniCore VC: https://127.0.0.1:5466
146
+ const client = new RwsClient2(
147
+ 'https://127.0.0.1:5466',
148
+ 'Admin',
149
+ 'robotics',
150
+ );
151
+
152
+ await client.connect();
153
+
154
+ // Same method names as RWS 1.0 — only the underlying protocol differs.
155
+ console.log('state:', await client.getControllerState());
156
+ console.log('joints:', await client.getJointPositions());
157
+
158
+ // RAPID variable read — RWS 2.0 symbol API uses suffix-style URLs internally
159
+ // (`/rw/rapid/symbol/{symburl}/data`); the method shape is the same.
160
+ const tool0 = await client.getRapidVariable('T_ROB1', 'BASE', 'tool0');
161
+
162
+ // WebSocket subscriptions over `robapi2_subscription` subprotocol.
163
+ const unsubscribe = await client.subscribe(
164
+ ['controllerstate', 'execution'],
165
+ (event) => console.log(event.resource, '=', event.value),
166
+ );
167
+
168
+ await unsubscribe();
169
+ await client.disconnect();
170
+ ```
171
+
172
+ ### Notable RWS 2.0 quirks (handled automatically)
173
+
174
+ These are documented because they bite anyone who tries to write an RWS 2.0 client from scratch:
175
+
176
+ - **HTTP Basic auth**, not Digest (RWS 1.0).
177
+ - **XHTML responses only** — `Accept: application/json` returns 406. Library uses `Accept: application/xhtml+xml;v=2.0`.
178
+ - **Path-based actions** — `/rw/rapid/execution/stop`, not `?action=stop`.
179
+ - **Mastership domains collapsed** — both `'rapid'` and `'cfg'` map to `'edit'`. The adapter maps internally so either name works.
180
+ - **File service home** is `'HOME'`, not `'$HOME'`.
181
+ - **Symbol API path is suffix-style** — `/rw/rapid/symbol/{symburl}/data` (RWS 1.0 puts `/data` at the front).
182
+ - **Module unload** is `POST /rw/rapid/tasks/{task}/unloadmod` with body, NOT `DELETE` on the module URL (returns 405).
183
+ - **Self-signed TLS** on virtual controllers — library uses `rejectUnauthorized: false` for HTTPS.
184
+ - **WebSocket subscription URL** comes from the `Location` header (real hardware) or the XHTML body (VC). Subprotocol: `robapi2_subscription`.
185
+
186
+ ---
187
+
188
+ ## Multi-robot orchestration
189
+
190
+ For applications that talk to several controllers, use `MultiRobotManager`:
191
+
192
+ ```ts
193
+ import { MultiRobotManager } from 'abb-rws-client';
194
+
195
+ const multi = MultiRobotManager.fromConfigs([
196
+ { id: 'cell-A', name: 'Cell A IRB120', host: '192.168.125.1', port: 80, useHttps: false, username: 'Admin', password: 'robotics' },
197
+ { id: 'cell-B', name: 'Cell B IRB1200', host: '192.168.125.2', port: 443, useHttps: true, username: 'Admin', password: 'robotics' },
198
+ ]);
199
+
200
+ multi.onError((msg, actions) => {
201
+ console.error(`Robot error: ${msg}`);
202
+ return Promise.resolve(undefined); // headless: just log
203
+ });
204
+
205
+ multi.onDidChange(() => {
206
+ console.log(`active=${multi.activeId} state=${multi.state.ctrlstate}`);
207
+ });
208
+
209
+ for (const { id } of multi.entries) {
210
+ await multi.connectRobot(id);
211
+ }
212
+ // One robot is "active" at a time (handy for UIs); state for all is polled.
213
+ multi.setActive('cell-B');
214
+ ```
215
+
216
+ `MultiRobotManager` wraps individual `RobotManager` instances. Each `RobotManager` handles its own:
217
+ - Auto port discovery (probes 5466 / 9403 / 443 / 80 / 11811 in that order, plus a wide-scan fallback when none of those answer — RobotStudio assigns random VC ports above 30000)
218
+ - Protocol auto-detection (`WWW-Authenticate: Digest` → RWS 1.0; `Basic` → RWS 2.0)
219
+ - Hybrid polling cadence: **5 s when WebSocket subscriptions are active** (positions only — state-change resources stream over WS); **1 s when subscriptions failed** (full state coverage via polling)
220
+ - WebSocket subscriptions with automatic polling fallback (RWS 2.0 VC notably rejects the `robapi2_subscription` subprotocol — fallback kicks in)
221
+ - Reconnect-on-failure (3-strike, surfaces via `onError` listener)
222
+ - Clean `GET /logout` on disconnect — releases server-side mastership and frees the session slot
223
+
224
+ You can also create a `RobotManager` directly if you only have one robot.
225
+
226
+ ---
227
+
228
+ ## `RobotManager` — higher-level surface
229
+
230
+ `RobotManager` wraps either client with operational helpers that handle mastership, polling, and protocol differences for you. In addition to delegating every protocol method to the underlying client, it exposes:
231
+
232
+ - **`getRmmpPrivilege()`**, **`requestRmmp(level)`** — Remote Mastership Privilege management. Required on OmniCore in AUTO mode for any modify op.
233
+ - **`getMastershipStatus(domain?)`** — read who currently holds rapid/cfg/motion mastership (uid + application name).
234
+ - **`setOperationMode('AUTO' | 'MANR' | 'MANF')`** — VC-only switch with auto-routing through MANR for AUTO ↔ MANF (the controller rejects direct transitions). Acquires `edit` mastership for the higher-privilege direction.
235
+ - **`setSpeedRatio(0..100)`** — wraps `edit` mastership; uses the live-verified `?action=setspeedratio&speed-ratio=N` form on RWS 2.0 (the bare endpoint returns 400).
236
+ - **`createBackup(name)`**, **`restoreBackup(name)`**, **`getBackupStatus()`**, **`listBackups()`** — `/ctrl/backup/...`
237
+ - **`callServiceRoutine(task, name, args?)`** — invoke a service routine remotely (calibration, brake check, etc.).
238
+ - **`calcJointsFromCartesian(...)`** — inverse kinematics. **`calcCartesianFromJoints(...)`** — forward kinematics.
239
+ - **`setActiveTool(mechunit, name)`**, **`setActiveWobj(mechunit, name)`** — switch active persistent tooldata / wobjdata.
240
+ - **CFG write** — `setCfgInstance` / `createCfgInstance` / `removeCfgInstance` / `loadCfgFile` / `saveCfgFile`. Each acquires `edit` mastership for the duration.
241
+ - **DIPC** — `listDipcQueues` / `createDipcQueue` / `sendDipcMessage` / `readDipcMessage` / `removeDipcQueue`. Bidirectional messaging between RAPID and external clients.
242
+ - **`listFileVolumes()`** — every controller volume (HOME, BACKUP, DATA, ADDINDATA, PRODUCTS, RAMDISK, TEMP).
243
+ - **`getModuleSource(task, name)`** — pull a module's RAPID text in one call.
244
+ - **`compressPath(source, dest)`** — controller-side compression.
245
+ - **`validateRapidValue(task, value, datatype)`** — pre-flight a literal before writing.
246
+
247
+ Every method returns `Promise<...>` and throws `RwsError` on failure.
248
+
249
+ ---
250
+
251
+ ## Logging
252
+
253
+ The lib ships a no-op logger by default. Hosts (CLIs, services, the VS Code extension) install their own:
254
+
255
+ ```ts
256
+ import { setLogger } from 'abb-rws-client';
257
+
258
+ setLogger({
259
+ info: (msg) => console.log(`[info] ${msg}`),
260
+ warn: (msg) => console.warn(`[warn] ${msg}`),
261
+ error: (msg, err) => console.error(`[error] ${msg}`, err),
262
+ show: () => { /* bring log surface to front; no-op for CLIs */ },
263
+ });
264
+ ```
265
+
266
+ Internal lifecycle events (connect/disconnect, polling cycles, subscription state, error recovery) flow through this.
267
+
268
+ ---
269
+
88
270
  ## API Reference
89
271
 
90
272
  ### Constructor
@@ -97,7 +279,7 @@ new RwsClient(options: RwsClientOptions)
97
279
  |--------|------|---------|-------------|
98
280
  | `host` | `string` | — | Controller IP or hostname |
99
281
  | `port` | `number` | `80` | HTTP port |
100
- | `username` | `string` | `'Default User'` | RWS username |
282
+ | `username` | `string` | `'Admin'` | RWS username |
101
283
  | `password` | `string` | `'robotics'` | RWS password |
102
284
  | `requestIntervalMs` | `number` | `55` | Min ms between requests (enforces < 20 req/sec) |
103
285
  | `timeout` | `number` | `5000` | Request timeout in ms |
@@ -301,7 +483,7 @@ try {
301
483
 
302
484
  ## Session Persistence
303
485
 
304
- The IRC5 controller allows a maximum of **70 concurrent RWS sessions**. Persist the session cookie across restarts to always reuse the same slot:
486
+ IRC5 controllers allow a maximum of **70 concurrent RWS sessions**; OmniCore controllers also have a finite session pool (the exact number isn't published, but heavy probing without `/logout` returns HTTP 503 once it fills). Persist the session cookie across restarts to always reuse the same slot — the lib calls `/logout` on `disconnect()` to free the slot cleanly, but a saved cookie is the most robust path:
305
487
 
306
488
  ```ts
307
489
  import fs from 'fs';
@@ -322,14 +504,16 @@ await client.connect(); // reuses the existing session slot
322
504
 
323
505
  ## Rate Limits
324
506
 
325
- | Constraint | Value |
326
- |------------|-------|
327
- | Max request rate | 20 req/sec |
328
- | Client enforced interval | 55 ms between requests |
329
- | Max concurrent sessions | 70 |
330
- | Session inactivity timeout | 5 minutes |
331
- | Max session lifetime | 25 minutes |
332
- | Max file upload | 800 MB |
507
+ | Constraint | Value | Source |
508
+ |------------|-------|--------|
509
+ | Max request rate | 20 req/sec | Both protocols (controller-enforced) |
510
+ | Client-enforced interval | 55 ms between requests | This package, default |
511
+ | Max concurrent sessions | 70 (IRC5) / finite (OmniCore) | Controller-enforced |
512
+ | Session inactivity timeout | 5 minutes (IRC5) | Controller-enforced |
513
+ | Max session lifetime | 25 minutes (IRC5) | Controller-enforced |
514
+ | Max file upload | 800 MB (IRC5) | Controller-enforced; OmniCore is similar |
515
+
516
+ OmniCore-specific limits aren't fully documented by ABB; what the lib observes empirically matches the IRC5 numbers within an order of magnitude.
333
517
 
334
518
  ---
335
519
 
@@ -337,10 +521,13 @@ await client.connect(); // reuses the existing session slot
337
521
 
338
522
  | | RobotWare 6.x (RWS 1.0) | RobotWare 7.x (RWS 2.0) |
339
523
  |--|--|--|
340
- | This package | ✅ Supported | Not compatible |
341
- | IRC5 controller | ✅ | n/a |
342
- | OmniCore controller | n/a | |
343
- | RobotStudio virtual | ✅ (127.0.0.1) | |
524
+ | This package | ✅ `RwsClient` | `RwsClient2` |
525
+ | IRC5 controller (real) | ✅ | n/a |
526
+ | OmniCore controller (real) | n/a | |
527
+ | RobotStudio virtual controller | ✅ (RW6.x VC) | (RW7.x VC) |
528
+ | Auto-detect from one entry point | ✅ via `createClient()` | ✅ via `createClient()` |
529
+
530
+ **Live-tested matrix** as of v0.7.1: RobotWare 7.21 (OmniCore VC, RWS 2.0), RobotWare 6.16 (IRC5 VC, RWS 1.0). 116 unit tests + 339 live protocol-coverage tests pass against both.
344
531
 
345
532
  ---
346
533
 
@@ -1 +1 @@
1
- {"version":3,"file":"HttpSession.d.ts","sourceRoot":"","sources":["../src/HttpSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,YAAY,CAAC;AAchE,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC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AAO,CAAC,gBAAgB,CAAK;IAE7B,0DAA0D;IAC1D,OAAO,CAAC,YAAY,CAAoC;IAExD,yDAAyD;IACzD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAiB;gBAE/C,OAAO,EAAE,kBAAkB;IAqBvC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAIxC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAIxD,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC;IAInE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAI3C,yEAAyE;IACzE,eAAe,IAAI,MAAM;IAIzB,yFAAyF;IACzF,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAKjC;;;;;;;;OAQG;IACH,YAAY,IAAI,IAAI;IAMpB;;;;OAIG;IACH,OAAO,CAAC,OAAO;YAsBD,OAAO;IA4ErB,iFAAiF;YACnE,QAAQ;IAoDtB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA8B5B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,eAAe;IAwCvB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAyBpB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,IAAI;IAIZ,OAAO,CAAC,aAAa;CAetB"}
@@ -13,6 +13,7 @@
13
13
  */
14
14
  import { createHash, randomBytes } from 'node:crypto';
15
15
  import { RwsError } from './types.js';
16
+ import { Logger } from './Logger.js';
16
17
  // ─── Helpers ─────────────────────────────────────────────────────────────────
17
18
  function md5(s) {
18
19
  return createHash('md5').update(s).digest('hex');
@@ -117,6 +118,11 @@ export class HttpSession {
117
118
  }
118
119
  // ─── Core request execution ─────────────────────────────────────────────────
119
120
  async execute(method, path, body) {
121
+ const startedAt = Date.now();
122
+ const bodyPreview = body
123
+ ? (typeof body === 'string' ? body : Buffer.from(body).toString('utf8')).slice(0, 200)
124
+ : undefined;
125
+ Logger.trace?.('http.req', `RWS1 ${method} ${path}`, { protocol: 'rws1', method, path, bodyPreview });
120
126
  // Auto re-authenticate if the session may have expired.
121
127
  // Only clear digest auth state — keep the session cookie so the controller
122
128
  // reuses the same session slot instead of creating a new one.
@@ -129,13 +135,14 @@ export class HttpSession {
129
135
  if (response.status === 401) {
130
136
  const wwwAuth = response.headers.get('www-authenticate');
131
137
  if (!wwwAuth) {
138
+ Logger.trace?.('http.err', `RWS1 ${method} ${path} → 401 (no auth header)`, { protocol: 'rws1', method, path });
132
139
  throw new RwsError('401 without WWW-Authenticate header', 'AUTH_FAILED', 401);
133
140
  }
134
141
  this.digestChallenge = this.parseDigestChallenge(wwwAuth);
135
142
  this.nonceCount = 0;
136
143
  response = await this.rawFetch(method, path, body);
137
144
  if (response.status === 401) {
138
- // Second 401 credentials are wrong
145
+ Logger.trace?.('http.err', `RWS1 ${method} ${path} → 401 (auth failed)`, { protocol: 'rws1', method, path });
139
146
  throw new RwsError('Authentication failed — check username and password', 'AUTH_FAILED', 401);
140
147
  }
141
148
  }
@@ -144,13 +151,23 @@ export class HttpSession {
144
151
  await sleep(200);
145
152
  response = await this.rawFetch(method, path, body);
146
153
  if (response.status === 503) {
154
+ Logger.trace?.('http.err', `RWS1 ${method} ${path} → 503 busy`, { protocol: 'rws1', method, path });
147
155
  throw new RwsError('Controller busy (503) — retry later', 'CONTROLLER_BUSY', 503);
148
156
  }
149
157
  }
150
158
  if (!this.isOk(response.status)) {
151
159
  const bodyText = await response.text().catch(() => '');
160
+ Logger.trace?.('http.err', `RWS1 ${method} ${path} → ${response.status}`, {
161
+ protocol: 'rws1', method, path, status: response.status,
162
+ durationMs: Date.now() - startedAt,
163
+ bodyPreview: bodyText.slice(0, 300),
164
+ });
152
165
  throw new RwsError(`HTTP ${response.status} from ${method} ${path}`, this.mapHttpStatus(response.status), response.status, bodyText);
153
166
  }
167
+ Logger.trace?.('http.res', `RWS1 ${method} ${path} → ${response.status}`, {
168
+ protocol: 'rws1', method, path, status: response.status,
169
+ durationMs: Date.now() - startedAt,
170
+ });
154
171
  // Store cookies from response
155
172
  this.storeCookies(response.headers);
156
173
  this.lastActivityTime = Date.now();
@@ -1 +1 @@
1
- {"version":3,"file":"HttpSession.js","sourceRoot":"","sources":["../src/HttpSession.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,gFAAgF;AAEhF,SAAS,GAAG,CAAC,CAAS;IACpB,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAcD,gFAAgF;AAEhF,MAAM,OAAO,WAAW;IACL,OAAO,CAAS;IAChB,QAAQ,CAAS;IACjB,QAAQ,CAAS;IACjB,iBAAiB,CAAS;IAC1B,SAAS,CAAS;IAEnC,2DAA2D;IACnD,OAAO,GAAwB,IAAI,GAAG,EAAE,CAAC;IAEjD,yDAAyD;IACjD,eAAe,GAA2B,IAAI,CAAC;IAEvD,sEAAsE;IAC9D,UAAU,GAAG,CAAC,CAAC;IAEvB,gDAAgD;IACxC,eAAe,GAAG,CAAC,CAAC;IAE5B,iFAAiF;IACzE,gBAAgB,GAAG,CAAC,CAAC;IAE7B,0DAA0D;IAClD,YAAY,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAC;IAExD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