@trycua/cua-driver 0.19.3 → 0.21.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.
@@ -4,7 +4,7 @@
4
4
  /* eslint-disable */
5
5
  // @ts-nocheck
6
6
  import nativeModule from "./cua_driver_contract-ffi.js";
7
- import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterFloat64, FfiConverterInt32, FfiConverterInt64, FfiConverterOptional, FfiConverterUInt32, FfiConverterUInt64, UniffiInternalError, UniffiRustCaller, uniffiCreateFfiConverterString, uniffiCreateRecord, } from "@ubjs/core";
7
+ import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterFloat64, FfiConverterInt32, FfiConverterInt64, FfiConverterOptional, FfiConverterUInt32, FfiConverterUInt64, UniffiEnum, UniffiInternalError, UniffiRustCaller, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiTypeNameSymbol, } from "@ubjs/core";
8
8
  const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));
9
9
  const uniffiIsDebug =
10
10
  // @ts-ignore -- The process global might not be defined
@@ -402,6 +402,134 @@ const FfiConverterTypeBoundsExpectation = (() => {
402
402
  ;
403
403
  return new FFIConverter();
404
404
  })();
405
+ const stringConverter = (() => {
406
+ const encoder = new TextEncoder();
407
+ const decoder = new TextDecoder();
408
+ return {
409
+ stringToBytes: (s) => encoder.encode(s),
410
+ bytesToString: (ab) => decoder.decode(ab),
411
+ stringByteLength: (s) => encoder.encode(s).byteLength,
412
+ writeStringIntoBuffer: (s, buf, offset) => {
413
+ const view = new Uint8Array(buf.arrayBuffer, offset, buf.arrayBuffer.byteLength - offset);
414
+ return encoder.encodeInto(s, view).written;
415
+ },
416
+ readStringFromBuffer: (buf, offset, length) => decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),
417
+ };
418
+ })();
419
+ const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
420
+ // Enum: ActionTarget
421
+ export var ActionTarget_Tags;
422
+ (function (ActionTarget_Tags) {
423
+ ActionTarget_Tags["Window"] = "Window";
424
+ ActionTarget_Tags["Desktop"] = "Desktop";
425
+ })(ActionTarget_Tags || (ActionTarget_Tags = {}));
426
+ /**
427
+ * Exact capture/input target selected independently for each action.
428
+ *
429
+ * `display_id="primary"` is the portable desktop target in this release.
430
+ * Platforms that cannot address another display reject it explicitly rather
431
+ * than silently changing coordinate spaces.
432
+ */
433
+ export const ActionTarget = (() => {
434
+ class Window_ extends UniffiEnum {
435
+ /**
436
+ * @private
437
+ * This field is private and should not be used, use `tag` instead.
438
+ */
439
+ [uniffiTypeNameSymbol] = "ActionTarget";
440
+ tag = ActionTarget_Tags.Window;
441
+ inner;
442
+ constructor(inner) {
443
+ super("ActionTarget", "Window");
444
+ this.inner = Object.freeze(inner);
445
+ }
446
+ static new(inner) {
447
+ return new Window_(inner);
448
+ }
449
+ static instanceOf(obj) {
450
+ return obj.tag === ActionTarget_Tags.Window;
451
+ }
452
+ }
453
+ class Desktop_ extends UniffiEnum {
454
+ /**
455
+ * @private
456
+ * This field is private and should not be used, use `tag` instead.
457
+ */
458
+ [uniffiTypeNameSymbol] = "ActionTarget";
459
+ tag = ActionTarget_Tags.Desktop;
460
+ inner;
461
+ constructor(inner) {
462
+ super("ActionTarget", "Desktop");
463
+ this.inner = Object.freeze(inner);
464
+ }
465
+ static new(inner) {
466
+ return new Desktop_(inner);
467
+ }
468
+ static instanceOf(obj) {
469
+ return obj.tag === ActionTarget_Tags.Desktop;
470
+ }
471
+ }
472
+ function instanceOf(obj) {
473
+ return obj[uniffiTypeNameSymbol] === "ActionTarget";
474
+ }
475
+ return Object.freeze({
476
+ instanceOf,
477
+ Window: Window_,
478
+ Desktop: Desktop_
479
+ });
480
+ })();
481
+ // FfiConverter for enum ActionTarget
482
+ const FfiConverterTypeActionTarget = (() => {
483
+ const ordinalConverter = FfiConverterInt32;
484
+ class FFIConverter extends AbstractFfiConverterByteArray {
485
+ read(from) {
486
+ switch (ordinalConverter.read(from)) {
487
+ case 1: return new ActionTarget.Window({ pid: FfiConverterUInt32.read(from), windowId: FfiConverterUInt64.read(from) });
488
+ case 2: return new ActionTarget.Desktop({ displayId: FfiConverterString.read(from) });
489
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
490
+ }
491
+ }
492
+ write(value, into) {
493
+ switch (value.tag) {
494
+ case ActionTarget_Tags.Window: {
495
+ ordinalConverter.write(1, into);
496
+ const inner = value.inner;
497
+ FfiConverterUInt32.write(inner.pid, into);
498
+ FfiConverterUInt64.write(inner.windowId, into);
499
+ return;
500
+ }
501
+ case ActionTarget_Tags.Desktop: {
502
+ ordinalConverter.write(2, into);
503
+ const inner = value.inner;
504
+ FfiConverterString.write(inner.displayId, into);
505
+ return;
506
+ }
507
+ default:
508
+ // Throwing from here means that ActionTarget_Tags hasn't matched an ordinal.
509
+ throw new UniffiInternalError.UnexpectedEnumCase();
510
+ }
511
+ }
512
+ allocationSize(value) {
513
+ switch (value.tag) {
514
+ case ActionTarget_Tags.Window: {
515
+ const inner = value.inner;
516
+ let size = ordinalConverter.allocationSize(1);
517
+ size += FfiConverterUInt32.allocationSize(inner.pid);
518
+ size += FfiConverterUInt64.allocationSize(inner.windowId);
519
+ return size;
520
+ }
521
+ case ActionTarget_Tags.Desktop: {
522
+ const inner = value.inner;
523
+ let size = ordinalConverter.allocationSize(2);
524
+ size += FfiConverterString.allocationSize(inner.displayId);
525
+ return size;
526
+ }
527
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
528
+ }
529
+ }
530
+ }
531
+ return new FFIConverter();
532
+ })();
405
533
  export var DesktopScope;
406
534
  (function (DesktopScope) {
407
535
  DesktopScope[DesktopScope["Desktop"] = 0] = "Desktop";
@@ -426,21 +554,6 @@ const FfiConverterTypeDesktopScope = (() => {
426
554
  }
427
555
  return new FFIConverter();
428
556
  })();
429
- const stringConverter = (() => {
430
- const encoder = new TextEncoder();
431
- const decoder = new TextDecoder();
432
- return {
433
- stringToBytes: (s) => encoder.encode(s),
434
- bytesToString: (ab) => decoder.decode(ab),
435
- stringByteLength: (s) => encoder.encode(s).byteLength,
436
- writeStringIntoBuffer: (s, buf, offset) => {
437
- const view = new Uint8Array(buf.arrayBuffer, offset, buf.arrayBuffer.byteLength - offset);
438
- return encoder.encodeInto(s, view).written;
439
- },
440
- readStringFromBuffer: (buf, offset, length) => decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),
441
- };
442
- })();
443
- const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
444
557
  export var ClickButton;
445
558
  (function (ClickButton) {
446
559
  ClickButton[ClickButton["Left"] = 0] = "Left";
@@ -491,7 +604,8 @@ const FfiConverterTypeClickInput = (() => {
491
604
  return {
492
605
  x: FfiConverterFloat64.read(from),
493
606
  y: FfiConverterFloat64.read(from),
494
- scope: FfiConverterTypeDesktopScope.read(from),
607
+ target: FfiConverterOptionalTypeActionTarget.read(from),
608
+ scope: FfiConverterOptionalTypeDesktopScope.read(from),
495
609
  session: FfiConverterOptionalString.read(from),
496
610
  button: FfiConverterOptionalTypeClickButton.read(from),
497
611
  count: FfiConverterOptionalUInt32.read(from)
@@ -500,7 +614,8 @@ const FfiConverterTypeClickInput = (() => {
500
614
  write(value, into) {
501
615
  FfiConverterFloat64.write(value.x, into);
502
616
  FfiConverterFloat64.write(value.y, into);
503
- FfiConverterTypeDesktopScope.write(value.scope, into);
617
+ FfiConverterOptionalTypeActionTarget.write(value.target, into);
618
+ FfiConverterOptionalTypeDesktopScope.write(value.scope, into);
504
619
  FfiConverterOptionalString.write(value.session, into);
505
620
  FfiConverterOptionalTypeClickButton.write(value.button, into);
506
621
  FfiConverterOptionalUInt32.write(value.count, into);
@@ -508,7 +623,8 @@ const FfiConverterTypeClickInput = (() => {
508
623
  allocationSize(value) {
509
624
  return FfiConverterFloat64.allocationSize(value.x) +
510
625
  FfiConverterFloat64.allocationSize(value.y) +
511
- FfiConverterTypeDesktopScope.allocationSize(value.scope) +
626
+ FfiConverterOptionalTypeActionTarget.allocationSize(value.target) +
627
+ FfiConverterOptionalTypeDesktopScope.allocationSize(value.scope) +
512
628
  FfiConverterOptionalString.allocationSize(value.session) +
513
629
  FfiConverterOptionalTypeClickButton.allocationSize(value.button) +
514
630
  FfiConverterOptionalUInt32.allocationSize(value.count);
@@ -998,7 +1114,8 @@ const FfiConverterTypeDragInput = (() => {
998
1114
  fromY: FfiConverterFloat64.read(from),
999
1115
  toX: FfiConverterFloat64.read(from),
1000
1116
  toY: FfiConverterFloat64.read(from),
1001
- scope: FfiConverterTypeDesktopScope.read(from),
1117
+ target: FfiConverterOptionalTypeActionTarget.read(from),
1118
+ scope: FfiConverterOptionalTypeDesktopScope.read(from),
1002
1119
  session: FfiConverterOptionalString.read(from),
1003
1120
  durationMs: FfiConverterOptionalUInt64.read(from),
1004
1121
  steps: FfiConverterOptionalUInt64.read(from),
@@ -1011,7 +1128,8 @@ const FfiConverterTypeDragInput = (() => {
1011
1128
  FfiConverterFloat64.write(value.fromY, into);
1012
1129
  FfiConverterFloat64.write(value.toX, into);
1013
1130
  FfiConverterFloat64.write(value.toY, into);
1014
- FfiConverterTypeDesktopScope.write(value.scope, into);
1131
+ FfiConverterOptionalTypeActionTarget.write(value.target, into);
1132
+ FfiConverterOptionalTypeDesktopScope.write(value.scope, into);
1015
1133
  FfiConverterOptionalString.write(value.session, into);
1016
1134
  FfiConverterOptionalUInt64.write(value.durationMs, into);
1017
1135
  FfiConverterOptionalUInt64.write(value.steps, into);
@@ -1023,7 +1141,8 @@ const FfiConverterTypeDragInput = (() => {
1023
1141
  FfiConverterFloat64.allocationSize(value.fromY) +
1024
1142
  FfiConverterFloat64.allocationSize(value.toX) +
1025
1143
  FfiConverterFloat64.allocationSize(value.toY) +
1026
- FfiConverterTypeDesktopScope.allocationSize(value.scope) +
1144
+ FfiConverterOptionalTypeActionTarget.allocationSize(value.target) +
1145
+ FfiConverterOptionalTypeDesktopScope.allocationSize(value.scope) +
1027
1146
  FfiConverterOptionalString.allocationSize(value.session) +
1028
1147
  FfiConverterOptionalUInt64.allocationSize(value.durationMs) +
1029
1148
  FfiConverterOptionalUInt64.allocationSize(value.steps) +
@@ -1129,14 +1248,14 @@ const FfiConverterTypeEndSessionInput = (() => {
1129
1248
  class FFIConverter extends AbstractFfiConverterByteArray {
1130
1249
  read(from) {
1131
1250
  return {
1132
- session: FfiConverterString.read(from)
1251
+ session: FfiConverterOptionalString.read(from)
1133
1252
  };
1134
1253
  }
1135
1254
  write(value, into) {
1136
- FfiConverterString.write(value.session, into);
1255
+ FfiConverterOptionalString.write(value.session, into);
1137
1256
  }
1138
1257
  allocationSize(value) {
1139
- return FfiConverterString.allocationSize(value.session);
1258
+ return FfiConverterOptionalString.allocationSize(value.session);
1140
1259
  }
1141
1260
  }
1142
1261
  ;
@@ -1422,6 +1541,37 @@ const FfiConverterTypeGetScreenSizeInput = (() => {
1422
1541
  ;
1423
1542
  return new FFIConverter();
1424
1543
  })();
1544
+ /**
1545
+ * Generated factory for {@link GetSessionInput} record objects.
1546
+ */
1547
+ export const GetSessionInput = (() => {
1548
+ const defaults = () => ({});
1549
+ const create = (() => {
1550
+ return uniffiCreateRecord(defaults);
1551
+ })();
1552
+ return Object.freeze({
1553
+ create,
1554
+ new: create,
1555
+ defaults: () => Object.freeze(defaults()),
1556
+ });
1557
+ })();
1558
+ const FfiConverterTypeGetSessionInput = (() => {
1559
+ class FFIConverter extends AbstractFfiConverterByteArray {
1560
+ read(from) {
1561
+ return {
1562
+ session: FfiConverterOptionalString.read(from)
1563
+ };
1564
+ }
1565
+ write(value, into) {
1566
+ FfiConverterOptionalString.write(value.session, into);
1567
+ }
1568
+ allocationSize(value) {
1569
+ return FfiConverterOptionalString.allocationSize(value.session);
1570
+ }
1571
+ }
1572
+ ;
1573
+ return new FFIConverter();
1574
+ })();
1425
1575
  /**
1426
1576
  * Generated factory for {@link GetSessionStateInput} record objects.
1427
1577
  */
@@ -1440,14 +1590,14 @@ const FfiConverterTypeGetSessionStateInput = (() => {
1440
1590
  class FFIConverter extends AbstractFfiConverterByteArray {
1441
1591
  read(from) {
1442
1592
  return {
1443
- session: FfiConverterString.read(from)
1593
+ session: FfiConverterOptionalString.read(from)
1444
1594
  };
1445
1595
  }
1446
1596
  write(value, into) {
1447
- FfiConverterString.write(value.session, into);
1597
+ FfiConverterOptionalString.write(value.session, into);
1448
1598
  }
1449
1599
  allocationSize(value) {
1450
- return FfiConverterString.allocationSize(value.session);
1600
+ return FfiConverterOptionalString.allocationSize(value.session);
1451
1601
  }
1452
1602
  }
1453
1603
  ;
@@ -1472,18 +1622,21 @@ const FfiConverterTypeHotkeyInput = (() => {
1472
1622
  read(from) {
1473
1623
  return {
1474
1624
  keys: FfiConverterSequenceString.read(from),
1475
- scope: FfiConverterTypeDesktopScope.read(from),
1625
+ target: FfiConverterOptionalTypeActionTarget.read(from),
1626
+ scope: FfiConverterOptionalTypeDesktopScope.read(from),
1476
1627
  session: FfiConverterOptionalString.read(from)
1477
1628
  };
1478
1629
  }
1479
1630
  write(value, into) {
1480
1631
  FfiConverterSequenceString.write(value.keys, into);
1481
- FfiConverterTypeDesktopScope.write(value.scope, into);
1632
+ FfiConverterOptionalTypeActionTarget.write(value.target, into);
1633
+ FfiConverterOptionalTypeDesktopScope.write(value.scope, into);
1482
1634
  FfiConverterOptionalString.write(value.session, into);
1483
1635
  }
1484
1636
  allocationSize(value) {
1485
1637
  return FfiConverterSequenceString.allocationSize(value.keys) +
1486
- FfiConverterTypeDesktopScope.allocationSize(value.scope) +
1638
+ FfiConverterOptionalTypeActionTarget.allocationSize(value.target) +
1639
+ FfiConverterOptionalTypeDesktopScope.allocationSize(value.scope) +
1487
1640
  FfiConverterOptionalString.allocationSize(value.session);
1488
1641
  }
1489
1642
  }
@@ -1530,6 +1683,225 @@ const FfiConverterTypeInvokeMenuInput = (() => {
1530
1683
  ;
1531
1684
  return new FFIConverter();
1532
1685
  })();
1686
+ /**
1687
+ * Generated factory for {@link ListSessionsInput} record objects.
1688
+ */
1689
+ export const ListSessionsInput = (() => {
1690
+ const defaults = () => ({});
1691
+ const create = (() => {
1692
+ return uniffiCreateRecord(defaults);
1693
+ })();
1694
+ return Object.freeze({
1695
+ create,
1696
+ new: create,
1697
+ defaults: () => Object.freeze(defaults()),
1698
+ });
1699
+ })();
1700
+ const FfiConverterTypeListSessionsInput = (() => {
1701
+ class FFIConverter extends AbstractFfiConverterByteArray {
1702
+ read(from) {
1703
+ return {
1704
+ limit: FfiConverterOptionalUInt32.read(from),
1705
+ cursor: FfiConverterOptionalString.read(from)
1706
+ };
1707
+ }
1708
+ write(value, into) {
1709
+ FfiConverterOptionalUInt32.write(value.limit, into);
1710
+ FfiConverterOptionalString.write(value.cursor, into);
1711
+ }
1712
+ allocationSize(value) {
1713
+ return FfiConverterOptionalUInt32.allocationSize(value.limit) +
1714
+ FfiConverterOptionalString.allocationSize(value.cursor);
1715
+ }
1716
+ }
1717
+ ;
1718
+ return new FFIConverter();
1719
+ })();
1720
+ export var SessionLifecycleState;
1721
+ (function (SessionLifecycleState) {
1722
+ SessionLifecycleState[SessionLifecycleState["Active"] = 0] = "Active";
1723
+ SessionLifecycleState[SessionLifecycleState["Ending"] = 1] = "Ending";
1724
+ })(SessionLifecycleState || (SessionLifecycleState = {}));
1725
+ const FfiConverterTypeSessionLifecycleState = (() => {
1726
+ const ordinalConverter = FfiConverterInt32;
1727
+ class FFIConverter extends AbstractFfiConverterByteArray {
1728
+ read(from) {
1729
+ switch (ordinalConverter.read(from)) {
1730
+ case 1: return SessionLifecycleState.Active;
1731
+ case 2: return SessionLifecycleState.Ending;
1732
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
1733
+ }
1734
+ }
1735
+ write(value, into) {
1736
+ switch (value) {
1737
+ case SessionLifecycleState.Active: return ordinalConverter.write(1, into);
1738
+ case SessionLifecycleState.Ending: return ordinalConverter.write(2, into);
1739
+ }
1740
+ }
1741
+ allocationSize(value) {
1742
+ return ordinalConverter.allocationSize(0);
1743
+ }
1744
+ }
1745
+ return new FFIConverter();
1746
+ })();
1747
+ export var SessionClientKindOutput;
1748
+ (function (SessionClientKindOutput) {
1749
+ SessionClientKindOutput[SessionClientKindOutput["Cli"] = 0] = "Cli";
1750
+ SessionClientKindOutput[SessionClientKindOutput["Direct"] = 1] = "Direct";
1751
+ SessionClientKindOutput[SessionClientKindOutput["Mcp"] = 2] = "Mcp";
1752
+ SessionClientKindOutput[SessionClientKindOutput["PythonSdk"] = 3] = "PythonSdk";
1753
+ SessionClientKindOutput[SessionClientKindOutput["TypescriptSdk"] = 4] = "TypescriptSdk";
1754
+ })(SessionClientKindOutput || (SessionClientKindOutput = {}));
1755
+ const FfiConverterTypeSessionClientKindOutput = (() => {
1756
+ const ordinalConverter = FfiConverterInt32;
1757
+ class FFIConverter extends AbstractFfiConverterByteArray {
1758
+ read(from) {
1759
+ switch (ordinalConverter.read(from)) {
1760
+ case 1: return SessionClientKindOutput.Cli;
1761
+ case 2: return SessionClientKindOutput.Direct;
1762
+ case 3: return SessionClientKindOutput.Mcp;
1763
+ case 4: return SessionClientKindOutput.PythonSdk;
1764
+ case 5: return SessionClientKindOutput.TypescriptSdk;
1765
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
1766
+ }
1767
+ }
1768
+ write(value, into) {
1769
+ switch (value) {
1770
+ case SessionClientKindOutput.Cli: return ordinalConverter.write(1, into);
1771
+ case SessionClientKindOutput.Direct: return ordinalConverter.write(2, into);
1772
+ case SessionClientKindOutput.Mcp: return ordinalConverter.write(3, into);
1773
+ case SessionClientKindOutput.PythonSdk: return ordinalConverter.write(4, into);
1774
+ case SessionClientKindOutput.TypescriptSdk: return ordinalConverter.write(5, into);
1775
+ }
1776
+ }
1777
+ allocationSize(value) {
1778
+ return ordinalConverter.allocationSize(0);
1779
+ }
1780
+ }
1781
+ return new FFIConverter();
1782
+ })();
1783
+ export var SessionTransportOutput;
1784
+ (function (SessionTransportOutput) {
1785
+ SessionTransportOutput[SessionTransportOutput["Cli"] = 0] = "Cli";
1786
+ SessionTransportOutput[SessionTransportOutput["Daemon"] = 1] = "Daemon";
1787
+ SessionTransportOutput[SessionTransportOutput["McpStdio"] = 2] = "McpStdio";
1788
+ SessionTransportOutput[SessionTransportOutput["McpHttp"] = 3] = "McpHttp";
1789
+ })(SessionTransportOutput || (SessionTransportOutput = {}));
1790
+ const FfiConverterTypeSessionTransportOutput = (() => {
1791
+ const ordinalConverter = FfiConverterInt32;
1792
+ class FFIConverter extends AbstractFfiConverterByteArray {
1793
+ read(from) {
1794
+ switch (ordinalConverter.read(from)) {
1795
+ case 1: return SessionTransportOutput.Cli;
1796
+ case 2: return SessionTransportOutput.Daemon;
1797
+ case 3: return SessionTransportOutput.McpStdio;
1798
+ case 4: return SessionTransportOutput.McpHttp;
1799
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
1800
+ }
1801
+ }
1802
+ write(value, into) {
1803
+ switch (value) {
1804
+ case SessionTransportOutput.Cli: return ordinalConverter.write(1, into);
1805
+ case SessionTransportOutput.Daemon: return ordinalConverter.write(2, into);
1806
+ case SessionTransportOutput.McpStdio: return ordinalConverter.write(3, into);
1807
+ case SessionTransportOutput.McpHttp: return ordinalConverter.write(4, into);
1808
+ }
1809
+ }
1810
+ allocationSize(value) {
1811
+ return ordinalConverter.allocationSize(0);
1812
+ }
1813
+ }
1814
+ return new FFIConverter();
1815
+ })();
1816
+ /**
1817
+ * Generated factory for {@link SessionOutput} record objects.
1818
+ */
1819
+ export const SessionOutput = (() => {
1820
+ const defaults = () => ({});
1821
+ const create = (() => {
1822
+ return uniffiCreateRecord(defaults);
1823
+ })();
1824
+ return Object.freeze({
1825
+ create,
1826
+ new: create,
1827
+ defaults: () => Object.freeze(defaults()),
1828
+ });
1829
+ })();
1830
+ const FfiConverterTypeSessionOutput = (() => {
1831
+ class FFIConverter extends AbstractFfiConverterByteArray {
1832
+ read(from) {
1833
+ return {
1834
+ session: FfiConverterOptionalString.read(from),
1835
+ implicit: FfiConverterBool.read(from),
1836
+ state: FfiConverterTypeSessionLifecycleState.read(from),
1837
+ clientKind: FfiConverterTypeSessionClientKindOutput.read(from),
1838
+ transport: FfiConverterTypeSessionTransportOutput.read(from),
1839
+ cursorVisible: FfiConverterBool.read(from),
1840
+ recordingActive: FfiConverterBool.read(from),
1841
+ idleSeconds: FfiConverterUInt64.read(from),
1842
+ expiresInSeconds: FfiConverterUInt64.read(from)
1843
+ };
1844
+ }
1845
+ write(value, into) {
1846
+ FfiConverterOptionalString.write(value.session, into);
1847
+ FfiConverterBool.write(value.implicit, into);
1848
+ FfiConverterTypeSessionLifecycleState.write(value.state, into);
1849
+ FfiConverterTypeSessionClientKindOutput.write(value.clientKind, into);
1850
+ FfiConverterTypeSessionTransportOutput.write(value.transport, into);
1851
+ FfiConverterBool.write(value.cursorVisible, into);
1852
+ FfiConverterBool.write(value.recordingActive, into);
1853
+ FfiConverterUInt64.write(value.idleSeconds, into);
1854
+ FfiConverterUInt64.write(value.expiresInSeconds, into);
1855
+ }
1856
+ allocationSize(value) {
1857
+ return FfiConverterOptionalString.allocationSize(value.session) +
1858
+ FfiConverterBool.allocationSize(value.implicit) +
1859
+ FfiConverterTypeSessionLifecycleState.allocationSize(value.state) +
1860
+ FfiConverterTypeSessionClientKindOutput.allocationSize(value.clientKind) +
1861
+ FfiConverterTypeSessionTransportOutput.allocationSize(value.transport) +
1862
+ FfiConverterBool.allocationSize(value.cursorVisible) +
1863
+ FfiConverterBool.allocationSize(value.recordingActive) +
1864
+ FfiConverterUInt64.allocationSize(value.idleSeconds) +
1865
+ FfiConverterUInt64.allocationSize(value.expiresInSeconds);
1866
+ }
1867
+ }
1868
+ ;
1869
+ return new FFIConverter();
1870
+ })();
1871
+ /**
1872
+ * Generated factory for {@link ListSessionsOutput} record objects.
1873
+ */
1874
+ export const ListSessionsOutput = (() => {
1875
+ const defaults = () => ({});
1876
+ const create = (() => {
1877
+ return uniffiCreateRecord(defaults);
1878
+ })();
1879
+ return Object.freeze({
1880
+ create,
1881
+ new: create,
1882
+ defaults: () => Object.freeze(defaults()),
1883
+ });
1884
+ })();
1885
+ const FfiConverterTypeListSessionsOutput = (() => {
1886
+ class FFIConverter extends AbstractFfiConverterByteArray {
1887
+ read(from) {
1888
+ return {
1889
+ sessions: FfiConverterSequenceTypeSessionOutput.read(from),
1890
+ nextCursor: FfiConverterOptionalString.read(from)
1891
+ };
1892
+ }
1893
+ write(value, into) {
1894
+ FfiConverterSequenceTypeSessionOutput.write(value.sessions, into);
1895
+ FfiConverterOptionalString.write(value.nextCursor, into);
1896
+ }
1897
+ allocationSize(value) {
1898
+ return FfiConverterSequenceTypeSessionOutput.allocationSize(value.sessions) +
1899
+ FfiConverterOptionalString.allocationSize(value.nextCursor);
1900
+ }
1901
+ }
1902
+ ;
1903
+ return new FFIConverter();
1904
+ })();
1533
1905
  /**
1534
1906
  * Generated factory for {@link MoveCursorInput} record objects.
1535
1907
  */
@@ -1550,20 +1922,23 @@ const FfiConverterTypeMoveCursorInput = (() => {
1550
1922
  return {
1551
1923
  x: FfiConverterFloat64.read(from),
1552
1924
  y: FfiConverterFloat64.read(from),
1553
- scope: FfiConverterTypeDesktopScope.read(from),
1925
+ target: FfiConverterOptionalTypeActionTarget.read(from),
1926
+ scope: FfiConverterOptionalTypeDesktopScope.read(from),
1554
1927
  session: FfiConverterOptionalString.read(from)
1555
1928
  };
1556
1929
  }
1557
1930
  write(value, into) {
1558
1931
  FfiConverterFloat64.write(value.x, into);
1559
1932
  FfiConverterFloat64.write(value.y, into);
1560
- FfiConverterTypeDesktopScope.write(value.scope, into);
1933
+ FfiConverterOptionalTypeActionTarget.write(value.target, into);
1934
+ FfiConverterOptionalTypeDesktopScope.write(value.scope, into);
1561
1935
  FfiConverterOptionalString.write(value.session, into);
1562
1936
  }
1563
1937
  allocationSize(value) {
1564
1938
  return FfiConverterFloat64.allocationSize(value.x) +
1565
1939
  FfiConverterFloat64.allocationSize(value.y) +
1566
- FfiConverterTypeDesktopScope.allocationSize(value.scope) +
1940
+ FfiConverterOptionalTypeActionTarget.allocationSize(value.target) +
1941
+ FfiConverterOptionalTypeDesktopScope.allocationSize(value.scope) +
1567
1942
  FfiConverterOptionalString.allocationSize(value.session);
1568
1943
  }
1569
1944
  }
@@ -1701,20 +2076,23 @@ const FfiConverterTypePressKeyInput = (() => {
1701
2076
  read(from) {
1702
2077
  return {
1703
2078
  key: FfiConverterString.read(from),
1704
- scope: FfiConverterTypeDesktopScope.read(from),
2079
+ target: FfiConverterOptionalTypeActionTarget.read(from),
2080
+ scope: FfiConverterOptionalTypeDesktopScope.read(from),
1705
2081
  session: FfiConverterOptionalString.read(from),
1706
2082
  modifiers: FfiConverterOptionalSequenceString.read(from)
1707
2083
  };
1708
2084
  }
1709
2085
  write(value, into) {
1710
2086
  FfiConverterString.write(value.key, into);
1711
- FfiConverterTypeDesktopScope.write(value.scope, into);
2087
+ FfiConverterOptionalTypeActionTarget.write(value.target, into);
2088
+ FfiConverterOptionalTypeDesktopScope.write(value.scope, into);
1712
2089
  FfiConverterOptionalString.write(value.session, into);
1713
2090
  FfiConverterOptionalSequenceString.write(value.modifiers, into);
1714
2091
  }
1715
2092
  allocationSize(value) {
1716
2093
  return FfiConverterString.allocationSize(value.key) +
1717
- FfiConverterTypeDesktopScope.allocationSize(value.scope) +
2094
+ FfiConverterOptionalTypeActionTarget.allocationSize(value.target) +
2095
+ FfiConverterOptionalTypeDesktopScope.allocationSize(value.scope) +
1718
2096
  FfiConverterOptionalString.allocationSize(value.session) +
1719
2097
  FfiConverterOptionalSequenceString.allocationSize(value.modifiers);
1720
2098
  }
@@ -1803,7 +2181,8 @@ const FfiConverterTypeScrollInput = (() => {
1803
2181
  x: FfiConverterFloat64.read(from),
1804
2182
  y: FfiConverterFloat64.read(from),
1805
2183
  direction: FfiConverterTypeScrollDirection.read(from),
1806
- scope: FfiConverterTypeDesktopScope.read(from),
2184
+ target: FfiConverterOptionalTypeActionTarget.read(from),
2185
+ scope: FfiConverterOptionalTypeDesktopScope.read(from),
1807
2186
  session: FfiConverterOptionalString.read(from),
1808
2187
  by: FfiConverterOptionalTypeScrollBy.read(from),
1809
2188
  amount: FfiConverterOptionalUInt64.read(from)
@@ -1813,7 +2192,8 @@ const FfiConverterTypeScrollInput = (() => {
1813
2192
  FfiConverterFloat64.write(value.x, into);
1814
2193
  FfiConverterFloat64.write(value.y, into);
1815
2194
  FfiConverterTypeScrollDirection.write(value.direction, into);
1816
- FfiConverterTypeDesktopScope.write(value.scope, into);
2195
+ FfiConverterOptionalTypeActionTarget.write(value.target, into);
2196
+ FfiConverterOptionalTypeDesktopScope.write(value.scope, into);
1817
2197
  FfiConverterOptionalString.write(value.session, into);
1818
2198
  FfiConverterOptionalTypeScrollBy.write(value.by, into);
1819
2199
  FfiConverterOptionalUInt64.write(value.amount, into);
@@ -1822,7 +2202,8 @@ const FfiConverterTypeScrollInput = (() => {
1822
2202
  return FfiConverterFloat64.allocationSize(value.x) +
1823
2203
  FfiConverterFloat64.allocationSize(value.y) +
1824
2204
  FfiConverterTypeScrollDirection.allocationSize(value.direction) +
1825
- FfiConverterTypeDesktopScope.allocationSize(value.scope) +
2205
+ FfiConverterOptionalTypeActionTarget.allocationSize(value.target) +
2206
+ FfiConverterOptionalTypeDesktopScope.allocationSize(value.scope) +
1826
2207
  FfiConverterOptionalString.allocationSize(value.session) +
1827
2208
  FfiConverterOptionalTypeScrollBy.allocationSize(value.by) +
1828
2209
  FfiConverterOptionalUInt64.allocationSize(value.amount);
@@ -2232,18 +2613,18 @@ const FfiConverterTypeStartSessionInput = (() => {
2232
2613
  class FFIConverter extends AbstractFfiConverterByteArray {
2233
2614
  read(from) {
2234
2615
  return {
2235
- session: FfiConverterString.read(from),
2616
+ session: FfiConverterOptionalString.read(from),
2236
2617
  captureScope: FfiConverterOptionalTypeCaptureScope.read(from),
2237
2618
  cursorTheme: FfiConverterOptionalTypeCursorThemeSelection.read(from)
2238
2619
  };
2239
2620
  }
2240
2621
  write(value, into) {
2241
- FfiConverterString.write(value.session, into);
2622
+ FfiConverterOptionalString.write(value.session, into);
2242
2623
  FfiConverterOptionalTypeCaptureScope.write(value.captureScope, into);
2243
2624
  FfiConverterOptionalTypeCursorThemeSelection.write(value.cursorTheme, into);
2244
2625
  }
2245
2626
  allocationSize(value) {
2246
- return FfiConverterString.allocationSize(value.session) +
2627
+ return FfiConverterOptionalString.allocationSize(value.session) +
2247
2628
  FfiConverterOptionalTypeCaptureScope.allocationSize(value.captureScope) +
2248
2629
  FfiConverterOptionalTypeCursorThemeSelection.allocationSize(value.cursorTheme);
2249
2630
  }
@@ -2375,18 +2756,21 @@ const FfiConverterTypeTypeTextInput = (() => {
2375
2756
  read(from) {
2376
2757
  return {
2377
2758
  text: FfiConverterString.read(from),
2378
- scope: FfiConverterTypeDesktopScope.read(from),
2759
+ target: FfiConverterOptionalTypeActionTarget.read(from),
2760
+ scope: FfiConverterOptionalTypeDesktopScope.read(from),
2379
2761
  session: FfiConverterOptionalString.read(from)
2380
2762
  };
2381
2763
  }
2382
2764
  write(value, into) {
2383
2765
  FfiConverterString.write(value.text, into);
2384
- FfiConverterTypeDesktopScope.write(value.scope, into);
2766
+ FfiConverterOptionalTypeActionTarget.write(value.target, into);
2767
+ FfiConverterOptionalTypeDesktopScope.write(value.scope, into);
2385
2768
  FfiConverterOptionalString.write(value.session, into);
2386
2769
  }
2387
2770
  allocationSize(value) {
2388
2771
  return FfiConverterString.allocationSize(value.text) +
2389
- FfiConverterTypeDesktopScope.allocationSize(value.scope) +
2772
+ FfiConverterOptionalTypeActionTarget.allocationSize(value.target) +
2773
+ FfiConverterOptionalTypeDesktopScope.allocationSize(value.scope) +
2390
2774
  FfiConverterOptionalString.allocationSize(value.session);
2391
2775
  }
2392
2776
  }
@@ -2527,6 +2911,10 @@ const FfiConverterOptionalSequenceTypeActionEvidence = new FfiConverterOptional(
2527
2911
  const FfiConverterOptionalTypeActionEscalation = new FfiConverterOptional(FfiConverterTypeActionEscalation);
2528
2912
  // FfiConverter for number | undefined
2529
2913
  const FfiConverterOptionalFloat64 = new FfiConverterOptional(FfiConverterFloat64);
2914
+ // FfiConverter for ActionTarget | undefined
2915
+ const FfiConverterOptionalTypeActionTarget = new FfiConverterOptional(FfiConverterTypeActionTarget);
2916
+ // FfiConverter for DesktopScope | undefined
2917
+ const FfiConverterOptionalTypeDesktopScope = new FfiConverterOptional(FfiConverterTypeDesktopScope);
2530
2918
  // FfiConverter for string | undefined
2531
2919
  const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
2532
2920
  // FfiConverter for ClickButton | undefined
@@ -2541,6 +2929,8 @@ const FfiConverterOptionalSequenceString = new FfiConverterOptional(FfiConverter
2541
2929
  const FfiConverterOptionalBoolean = new FfiConverterOptional(FfiConverterBool);
2542
2930
  // FfiConverter for CursorPointOutput | undefined
2543
2931
  const FfiConverterOptionalTypeCursorPointOutput = new FfiConverterOptional(FfiConverterTypeCursorPointOutput);
2932
+ // FfiConverter for Array<SessionOutput>
2933
+ const FfiConverterSequenceTypeSessionOutput = new FfiConverterArray(FfiConverterTypeSessionOutput);
2544
2934
  // FfiConverter for UnknownReason | undefined
2545
2935
  const FfiConverterOptionalTypeUnknownReason = new FfiConverterOptional(FfiConverterTypeUnknownReason);
2546
2936
  // FfiConverter for ScrollBy | undefined
@@ -2593,6 +2983,7 @@ export default Object.freeze({
2593
2983
  FfiConverterTypeActionEvidenceKind,
2594
2984
  FfiConverterTypeActionResult,
2595
2985
  FfiConverterTypeActionRoute,
2986
+ FfiConverterTypeActionTarget,
2596
2987
  FfiConverterTypeBoundsExpectation,
2597
2988
  FfiConverterTypeCaptureScope,
2598
2989
  FfiConverterTypeClickButton,
@@ -2622,9 +3013,12 @@ export default Object.freeze({
2622
3013
  FfiConverterTypeGetCursorPositionInput,
2623
3014
  FfiConverterTypeGetDesktopStateInput,
2624
3015
  FfiConverterTypeGetScreenSizeInput,
3016
+ FfiConverterTypeGetSessionInput,
2625
3017
  FfiConverterTypeGetSessionStateInput,
2626
3018
  FfiConverterTypeHotkeyInput,
2627
3019
  FfiConverterTypeInvokeMenuInput,
3020
+ FfiConverterTypeListSessionsInput,
3021
+ FfiConverterTypeListSessionsOutput,
2628
3022
  FfiConverterTypeMoveCursorInput,
2629
3023
  FfiConverterTypePlatform,
2630
3024
  FfiConverterTypePredicateOutcome,
@@ -2632,7 +3026,11 @@ export default Object.freeze({
2632
3026
  FfiConverterTypeScrollBy,
2633
3027
  FfiConverterTypeScrollDirection,
2634
3028
  FfiConverterTypeScrollInput,
3029
+ FfiConverterTypeSessionClientKindOutput,
3030
+ FfiConverterTypeSessionLifecycleState,
3031
+ FfiConverterTypeSessionOutput,
2635
3032
  FfiConverterTypeSessionStateOutput,
3033
+ FfiConverterTypeSessionTransportOutput,
2636
3034
  FfiConverterTypeSetAgentCursorEnabledInput,
2637
3035
  FfiConverterTypeSetAgentCursorEnabledOutput,
2638
3036
  FfiConverterTypeSetAgentCursorMotionInput,