@codingfrees/uap-device-control 0.1.21 → 0.1.22

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.
@@ -624,7 +624,7 @@ import path4 from "node:path";
624
624
  // package.json
625
625
  var package_default = {
626
626
  name: "@codingfrees/uap-device-control",
627
- version: "0.1.21",
627
+ version: "0.1.22",
628
628
  description: "Cross-platform outbound UAP Device Control client",
629
629
  type: "module",
630
630
  bin: {
@@ -1794,12 +1794,19 @@ async function remoteSession(origin, stateDirectory, engine, fetcher = fetch, si
1794
1794
  log?.({ event: "remote.session", status: "connected", deviceId, agentVersion: UAP_DEVICE_CONTROL_AGENT_VERSION });
1795
1795
  const inFlight = /* @__PURE__ */ new Set();
1796
1796
  const dispatched = /* @__PURE__ */ new Set();
1797
+ let browserExecution = Promise.resolve(void 0);
1797
1798
  let resultFailure;
1799
+ const execute4 = (command, workspaceId) => {
1800
+ if (!command.capability.startsWith("browser.")) return engine.execute(command.capability, command.parameters, { workspaceId });
1801
+ const current = browserExecution.then(() => engine.execute(command.capability, command.parameters, { workspaceId }));
1802
+ browserExecution = current.catch(() => void 0);
1803
+ return current;
1804
+ };
1798
1805
  const complete = async (command, workspaceId) => {
1799
1806
  const startedAt = Date.now();
1800
1807
  let outcome;
1801
1808
  try {
1802
- const output = await engine.execute(command.capability, command.parameters, { workspaceId });
1809
+ const output = await execute4(command, workspaceId);
1803
1810
  outcome = { ok: true, output };
1804
1811
  } catch (error) {
1805
1812
  outcome = { ok: false, error: safeError(error) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingfrees/uap-device-control",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Cross-platform outbound UAP Device Control client",
5
5
  "type": "module",
6
6
  "bin": {