@trycua/cua-driver 0.23.2 → 0.25.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_sdk-ffi.js";
7
- import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterInt32, FfiConverterObject, FfiConverterObjectWithCallbacks, FfiConverterOptional, FfiConverterUInt32, FfiConverterUInt64, UniffiAbstractObject, UniffiError, UniffiInternalError, UniffiResult, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTraitInterfaceCall, uniffiTraitInterfaceCallAsyncWithError, uniffiTypeNameSymbol, } from "@ubjs/core";
7
+ import { AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterInt32, FfiConverterObject, FfiConverterObjectWithCallbacks, FfiConverterOptional, FfiConverterUInt32, FfiConverterUInt64, UniffiAbstractObject, UniffiError, UniffiInternalError, UniffiResult, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiRustCallAsync, uniffiTraitInterfaceCall, uniffiTraitInterfaceCallAsyncWithError, uniffiTraitInterfaceCallWithError, uniffiTypeNameSymbol, } from "@ubjs/core";
8
8
  import uniffiCuaDriverContractModule from "./cua_driver_contract.js";
9
9
  const { FfiConverterTypeActionResult, FfiConverterTypeClickInput, FfiConverterTypeClipboardReadInput, FfiConverterTypeClipboardWriteInput, FfiConverterTypeDragInput, FfiConverterTypeEndSessionInput, FfiConverterTypeEndSessionOutput, FfiConverterTypeEscalateSessionInput, FfiConverterTypeGetAgentCursorStateInput, FfiConverterTypeGetCursorPositionInput, FfiConverterTypeGetDesktopStateInput, FfiConverterTypeGetScreenSizeInput, FfiConverterTypeGetSessionInput, FfiConverterTypeGetSessionStateInput, FfiConverterTypeHotkeyInput, FfiConverterTypeInvokeMenuInput, FfiConverterTypeListSessionsInput, FfiConverterTypeListSessionsOutput, FfiConverterTypeMoveCursorInput, FfiConverterTypePressKeyInput, FfiConverterTypeScrollInput, FfiConverterTypeSessionOutput, FfiConverterTypeSessionStateOutput, FfiConverterTypeSetAgentCursorEnabledInput, FfiConverterTypeSetAgentCursorMotionInput, FfiConverterTypeSetAgentCursorThemeInput, FfiConverterTypeSetWindowFrameInput, FfiConverterTypeStartSessionInput, FfiConverterTypeStartSessionOutput, FfiConverterTypeTypeTextInput, FfiConverterTypeVerifyStateInput, FfiConverterTypeVerifyStateOutput } = uniffiCuaDriverContractModule.converters;
10
10
  const uniffiCaller = new UniffiRustCaller(() => ({ code: 0 }));
@@ -15,6 +15,49 @@ typeof process !== "object" ||
15
15
  process?.env?.NODE_ENV !== "production" ||
16
16
  false;
17
17
  // Public interface members begin here.
18
+ /**
19
+ * Connect the canonical typed Driver to a host-provided remote carrier.
20
+ */
21
+ export function connectRemoteChannel(channel) {
22
+ return FfiConverterTypeCuaDriver.lift(uniffiCaller.rustCallWithError(
23
+ /*liftError:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError),
24
+ /*caller:*/ (callStatus) => {
25
+ return nativeModule().uniffi_cua_driver_sdk_fn_func_connect_remote_channel(FfiConverterTypeForeignDriverEnvelopeChannel.lower(channel, nativeModule().rustbuffer_alloc), callStatus);
26
+ },
27
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
28
+ }
29
+ /**
30
+ * Bind a logical remote session without serializing its authority.
31
+ */
32
+ export async function createRemoteTrustedSession(driver, options, asyncOpts_) {
33
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
34
+ try {
35
+ return await uniffiRustCallAsync(
36
+ /*rustCaller:*/ uniffiCaller,
37
+ /*rustFutureFunc:*/ () => {
38
+ return nativeModule().uniffi_cua_driver_sdk_fn_func_create_remote_trusted_session(FfiConverterTypeCuaDriver.lower(driver, nativeModule().rustbuffer_alloc), FfiConverterTypeTrustedSessionOptions.lower(options, nativeModule().rustbuffer_alloc));
39
+ },
40
+ /*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_u64,
41
+ /*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_u64,
42
+ /*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_u64,
43
+ /*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_u64,
44
+ // Async returns always go through the JS-side converter: the
45
+ // FFI symbol returns the future handle (u64), and the user-level
46
+ // RustBuffer comes back via the shared `rust_future_complete_*`
47
+ // export. The bytes the runtime hands back must be deserialized
48
+ // here using the per-callable return-type converter.
49
+ /*liftFunc:*/ FfiConverterTypeCuaDriverSession.lift.bind(FfiConverterTypeCuaDriverSession),
50
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
51
+ /*asyncOpts:*/ asyncOpts_,
52
+ /*errorHandler:*/ FfiConverterTypeDriverError.lift.bind(FfiConverterTypeDriverError));
53
+ }
54
+ catch (__error) {
55
+ if (uniffiIsDebug && __error instanceof Error) {
56
+ __error.stack = __stack;
57
+ }
58
+ throw __error;
59
+ }
60
+ }
18
61
  /**
19
62
  * Generated-language host factory for a session-bound action surface.
20
63
  *
@@ -566,74 +609,920 @@ const FfiConverterTypeEmbeddedMcpConfiguration = (() => {
566
609
  args: FfiConverterSequenceString.read(from),
567
610
  environment: FfiConverterSequenceTypeEmbeddedEnvironmentVariable.read(from)
568
611
  };
569
- }
570
- write(value, into) {
571
- FfiConverterString.write(value.command, into);
572
- FfiConverterSequenceString.write(value.args, into);
573
- FfiConverterSequenceTypeEmbeddedEnvironmentVariable.write(value.environment, into);
574
- }
575
- allocationSize(value) {
576
- return FfiConverterString.allocationSize(value.command) +
577
- FfiConverterSequenceString.allocationSize(value.args) +
578
- FfiConverterSequenceTypeEmbeddedEnvironmentVariable.allocationSize(value.environment);
579
- }
580
- }
581
- ;
582
- return new FFIConverter();
583
- })();
584
- /**
585
- * Generated factory for {@link EmbeddedDriverConnection} record objects.
586
- */
587
- export const EmbeddedDriverConnection = (() => {
588
- const defaults = () => ({});
589
- const create = (() => {
590
- return uniffiCreateRecord(defaults);
591
- })();
592
- return Object.freeze({
593
- create,
594
- new: create,
595
- defaults: () => Object.freeze(defaults()),
596
- });
597
- })();
598
- const FfiConverterTypeEmbeddedDriverConnection = (() => {
599
- class FFIConverter extends AbstractFfiConverterByteArray {
600
- read(from) {
601
- return {
602
- socketPath: FfiConverterString.read(from),
603
- pid: FfiConverterUInt32.read(from),
604
- generation: FfiConverterString.read(from),
605
- driverVersion: FfiConverterString.read(from),
606
- contractVersion: FfiConverterString.read(from),
607
- mcpProtocolVersion: FfiConverterString.read(from),
608
- mcp: FfiConverterTypeEmbeddedMcpConfiguration.read(from)
612
+ }
613
+ write(value, into) {
614
+ FfiConverterString.write(value.command, into);
615
+ FfiConverterSequenceString.write(value.args, into);
616
+ FfiConverterSequenceTypeEmbeddedEnvironmentVariable.write(value.environment, into);
617
+ }
618
+ allocationSize(value) {
619
+ return FfiConverterString.allocationSize(value.command) +
620
+ FfiConverterSequenceString.allocationSize(value.args) +
621
+ FfiConverterSequenceTypeEmbeddedEnvironmentVariable.allocationSize(value.environment);
622
+ }
623
+ }
624
+ ;
625
+ return new FFIConverter();
626
+ })();
627
+ /**
628
+ * Generated factory for {@link EmbeddedDriverConnection} record objects.
629
+ */
630
+ export const EmbeddedDriverConnection = (() => {
631
+ const defaults = () => ({});
632
+ const create = (() => {
633
+ return uniffiCreateRecord(defaults);
634
+ })();
635
+ return Object.freeze({
636
+ create,
637
+ new: create,
638
+ defaults: () => Object.freeze(defaults()),
639
+ });
640
+ })();
641
+ const FfiConverterTypeEmbeddedDriverConnection = (() => {
642
+ class FFIConverter extends AbstractFfiConverterByteArray {
643
+ read(from) {
644
+ return {
645
+ socketPath: FfiConverterString.read(from),
646
+ pid: FfiConverterUInt32.read(from),
647
+ generation: FfiConverterString.read(from),
648
+ driverVersion: FfiConverterString.read(from),
649
+ contractVersion: FfiConverterString.read(from),
650
+ mcpProtocolVersion: FfiConverterString.read(from),
651
+ mcp: FfiConverterTypeEmbeddedMcpConfiguration.read(from)
652
+ };
653
+ }
654
+ write(value, into) {
655
+ FfiConverterString.write(value.socketPath, into);
656
+ FfiConverterUInt32.write(value.pid, into);
657
+ FfiConverterString.write(value.generation, into);
658
+ FfiConverterString.write(value.driverVersion, into);
659
+ FfiConverterString.write(value.contractVersion, into);
660
+ FfiConverterString.write(value.mcpProtocolVersion, into);
661
+ FfiConverterTypeEmbeddedMcpConfiguration.write(value.mcp, into);
662
+ }
663
+ allocationSize(value) {
664
+ return FfiConverterString.allocationSize(value.socketPath) +
665
+ FfiConverterUInt32.allocationSize(value.pid) +
666
+ FfiConverterString.allocationSize(value.generation) +
667
+ FfiConverterString.allocationSize(value.driverVersion) +
668
+ FfiConverterString.allocationSize(value.contractVersion) +
669
+ FfiConverterString.allocationSize(value.mcpProtocolVersion) +
670
+ FfiConverterTypeEmbeddedMcpConfiguration.allocationSize(value.mcp);
671
+ }
672
+ }
673
+ ;
674
+ return new FFIConverter();
675
+ })();
676
+ /**
677
+ * Generated factory for {@link EmbeddedDriverExit} record objects.
678
+ */
679
+ export const EmbeddedDriverExit = (() => {
680
+ const defaults = () => ({});
681
+ const create = (() => {
682
+ return uniffiCreateRecord(defaults);
683
+ })();
684
+ return Object.freeze({
685
+ create,
686
+ new: create,
687
+ defaults: () => Object.freeze(defaults()),
688
+ });
689
+ })();
690
+ const FfiConverterTypeEmbeddedDriverExit = (() => {
691
+ class FFIConverter extends AbstractFfiConverterByteArray {
692
+ read(from) {
693
+ return {
694
+ generation: FfiConverterString.read(from),
695
+ code: FfiConverterOptionalInt32.read(from),
696
+ success: FfiConverterBool.read(from)
697
+ };
698
+ }
699
+ write(value, into) {
700
+ FfiConverterString.write(value.generation, into);
701
+ FfiConverterOptionalInt32.write(value.code, into);
702
+ FfiConverterBool.write(value.success, into);
703
+ }
704
+ allocationSize(value) {
705
+ return FfiConverterString.allocationSize(value.generation) +
706
+ FfiConverterOptionalInt32.allocationSize(value.code) +
707
+ FfiConverterBool.allocationSize(value.success);
708
+ }
709
+ }
710
+ ;
711
+ return new FFIConverter();
712
+ })();
713
+ export var EmbeddedPermissionMode;
714
+ (function (EmbeddedPermissionMode) {
715
+ EmbeddedPermissionMode[EmbeddedPermissionMode["Standard"] = 0] = "Standard";
716
+ EmbeddedPermissionMode[EmbeddedPermissionMode["Bounded"] = 1] = "Bounded";
717
+ EmbeddedPermissionMode[EmbeddedPermissionMode["Unrestricted"] = 2] = "Unrestricted";
718
+ })(EmbeddedPermissionMode || (EmbeddedPermissionMode = {}));
719
+ const FfiConverterTypeEmbeddedPermissionMode = (() => {
720
+ const ordinalConverter = FfiConverterInt32;
721
+ class FFIConverter extends AbstractFfiConverterByteArray {
722
+ read(from) {
723
+ switch (ordinalConverter.read(from)) {
724
+ case 1: return EmbeddedPermissionMode.Standard;
725
+ case 2: return EmbeddedPermissionMode.Bounded;
726
+ case 3: return EmbeddedPermissionMode.Unrestricted;
727
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
728
+ }
729
+ }
730
+ write(value, into) {
731
+ switch (value) {
732
+ case EmbeddedPermissionMode.Standard: return ordinalConverter.write(1, into);
733
+ case EmbeddedPermissionMode.Bounded: return ordinalConverter.write(2, into);
734
+ case EmbeddedPermissionMode.Unrestricted: return ordinalConverter.write(3, into);
735
+ }
736
+ }
737
+ allocationSize(value) {
738
+ return ordinalConverter.allocationSize(0);
739
+ }
740
+ }
741
+ return new FFIConverter();
742
+ })();
743
+ /**
744
+ * Generated factory for {@link EmbeddedDriverHostOptions} record objects.
745
+ */
746
+ export const EmbeddedDriverHostOptions = (() => {
747
+ const defaults = () => ({
748
+ capabilityManifestPath: undefined,
749
+ approveCapabilityManifest: false,
750
+ noOverlay: false
751
+ });
752
+ const create = (() => {
753
+ return uniffiCreateRecord(defaults);
754
+ })();
755
+ return Object.freeze({
756
+ create,
757
+ new: create,
758
+ defaults: () => Object.freeze(defaults()),
759
+ });
760
+ })();
761
+ const FfiConverterTypeEmbeddedDriverHostOptions = (() => {
762
+ class FFIConverter extends AbstractFfiConverterByteArray {
763
+ read(from) {
764
+ return {
765
+ binaryPath: FfiConverterString.read(from),
766
+ hostBundleId: FfiConverterString.read(from),
767
+ socketPath: FfiConverterOptionalString.read(from),
768
+ startupTimeoutMs: FfiConverterOptionalUInt64.read(from),
769
+ shutdownTimeoutMs: FfiConverterOptionalUInt64.read(from),
770
+ permissionMode: FfiConverterOptionalTypeEmbeddedPermissionMode.read(from),
771
+ capabilityManifestPath: FfiConverterOptionalString.read(from),
772
+ approveCapabilityManifest: FfiConverterBool.read(from),
773
+ sessionPolicyPath: FfiConverterOptionalString.read(from),
774
+ approveSessionPolicy: FfiConverterBool.read(from),
775
+ dangerouslyBypassApprovals: FfiConverterBool.read(from),
776
+ environment: FfiConverterSequenceTypeEmbeddedEnvironmentVariable.read(from),
777
+ inheritStderr: FfiConverterBool.read(from),
778
+ noOverlay: FfiConverterBool.read(from)
779
+ };
780
+ }
781
+ write(value, into) {
782
+ FfiConverterString.write(value.binaryPath, into);
783
+ FfiConverterString.write(value.hostBundleId, into);
784
+ FfiConverterOptionalString.write(value.socketPath, into);
785
+ FfiConverterOptionalUInt64.write(value.startupTimeoutMs, into);
786
+ FfiConverterOptionalUInt64.write(value.shutdownTimeoutMs, into);
787
+ FfiConverterOptionalTypeEmbeddedPermissionMode.write(value.permissionMode, into);
788
+ FfiConverterOptionalString.write(value.capabilityManifestPath, into);
789
+ FfiConverterBool.write(value.approveCapabilityManifest, into);
790
+ FfiConverterOptionalString.write(value.sessionPolicyPath, into);
791
+ FfiConverterBool.write(value.approveSessionPolicy, into);
792
+ FfiConverterBool.write(value.dangerouslyBypassApprovals, into);
793
+ FfiConverterSequenceTypeEmbeddedEnvironmentVariable.write(value.environment, into);
794
+ FfiConverterBool.write(value.inheritStderr, into);
795
+ FfiConverterBool.write(value.noOverlay, into);
796
+ }
797
+ allocationSize(value) {
798
+ return FfiConverterString.allocationSize(value.binaryPath) +
799
+ FfiConverterString.allocationSize(value.hostBundleId) +
800
+ FfiConverterOptionalString.allocationSize(value.socketPath) +
801
+ FfiConverterOptionalUInt64.allocationSize(value.startupTimeoutMs) +
802
+ FfiConverterOptionalUInt64.allocationSize(value.shutdownTimeoutMs) +
803
+ FfiConverterOptionalTypeEmbeddedPermissionMode.allocationSize(value.permissionMode) +
804
+ FfiConverterOptionalString.allocationSize(value.capabilityManifestPath) +
805
+ FfiConverterBool.allocationSize(value.approveCapabilityManifest) +
806
+ FfiConverterOptionalString.allocationSize(value.sessionPolicyPath) +
807
+ FfiConverterBool.allocationSize(value.approveSessionPolicy) +
808
+ FfiConverterBool.allocationSize(value.dangerouslyBypassApprovals) +
809
+ FfiConverterSequenceTypeEmbeddedEnvironmentVariable.allocationSize(value.environment) +
810
+ FfiConverterBool.allocationSize(value.inheritStderr) +
811
+ FfiConverterBool.allocationSize(value.noOverlay);
812
+ }
813
+ }
814
+ ;
815
+ return new FFIConverter();
816
+ })();
817
+ /**
818
+ * Generated factory for {@link ForeignDriverChannelIdentity} record objects.
819
+ */
820
+ export const ForeignDriverChannelIdentity = (() => {
821
+ const defaults = () => ({});
822
+ const create = (() => {
823
+ return uniffiCreateRecord(defaults);
824
+ })();
825
+ return Object.freeze({
826
+ create,
827
+ new: create,
828
+ defaults: () => Object.freeze(defaults()),
829
+ });
830
+ })();
831
+ const FfiConverterTypeForeignDriverChannelIdentity = (() => {
832
+ class FFIConverter extends AbstractFfiConverterByteArray {
833
+ read(from) {
834
+ return {
835
+ authenticatedPrincipal: FfiConverterString.read(from),
836
+ connectionGeneration: FfiConverterString.read(from)
837
+ };
838
+ }
839
+ write(value, into) {
840
+ FfiConverterString.write(value.authenticatedPrincipal, into);
841
+ FfiConverterString.write(value.connectionGeneration, into);
842
+ }
843
+ allocationSize(value) {
844
+ return FfiConverterString.allocationSize(value.authenticatedPrincipal) +
845
+ FfiConverterString.allocationSize(value.connectionGeneration);
846
+ }
847
+ }
848
+ ;
849
+ return new FFIConverter();
850
+ })();
851
+ // Error type: ForeignDriverChannelError
852
+ export var ForeignDriverChannelError_Tags;
853
+ (function (ForeignDriverChannelError_Tags) {
854
+ ForeignDriverChannelError_Tags["Failed"] = "Failed";
855
+ })(ForeignDriverChannelError_Tags || (ForeignDriverChannelError_Tags = {}));
856
+ export const ForeignDriverChannelError = (() => {
857
+ class Failed_ extends UniffiError {
858
+ /**
859
+ * @private
860
+ * This field is private and should not be used, use `tag` instead.
861
+ */
862
+ [uniffiTypeNameSymbol] = "ForeignDriverChannelError";
863
+ tag = ForeignDriverChannelError_Tags.Failed;
864
+ inner;
865
+ constructor(inner) {
866
+ super("ForeignDriverChannelError", "Failed");
867
+ this.inner = Object.freeze(inner);
868
+ }
869
+ static new(inner) {
870
+ return new Failed_(inner);
871
+ }
872
+ static instanceOf(obj) {
873
+ return obj.tag === ForeignDriverChannelError_Tags.Failed;
874
+ }
875
+ static hasInner(obj) {
876
+ return Failed_.instanceOf(obj);
877
+ }
878
+ static getInner(obj) {
879
+ return obj.inner;
880
+ }
881
+ }
882
+ function instanceOf(obj) {
883
+ return obj[uniffiTypeNameSymbol] === "ForeignDriverChannelError";
884
+ }
885
+ return Object.freeze({
886
+ instanceOf,
887
+ Failed: Failed_
888
+ });
889
+ })();
890
+ // FfiConverter for enum ForeignDriverChannelError
891
+ const FfiConverterTypeForeignDriverChannelError = (() => {
892
+ const ordinalConverter = FfiConverterInt32;
893
+ class FFIConverter extends AbstractFfiConverterByteArray {
894
+ read(from) {
895
+ switch (ordinalConverter.read(from)) {
896
+ case 1: return new ForeignDriverChannelError.Failed({ reason: FfiConverterString.read(from) });
897
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
898
+ }
899
+ }
900
+ write(value, into) {
901
+ switch (value.tag) {
902
+ case ForeignDriverChannelError_Tags.Failed: {
903
+ ordinalConverter.write(1, into);
904
+ const inner = value.inner;
905
+ FfiConverterString.write(inner.reason, into);
906
+ return;
907
+ }
908
+ default:
909
+ // Throwing from here means that ForeignDriverChannelError_Tags hasn't matched an ordinal.
910
+ throw new UniffiInternalError.UnexpectedEnumCase();
911
+ }
912
+ }
913
+ allocationSize(value) {
914
+ switch (value.tag) {
915
+ case ForeignDriverChannelError_Tags.Failed: {
916
+ const inner = value.inner;
917
+ let size = ordinalConverter.allocationSize(1);
918
+ size += FfiConverterString.allocationSize(inner.reason);
919
+ return size;
920
+ }
921
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
922
+ }
923
+ }
924
+ }
925
+ return new FFIConverter();
926
+ })();
927
+ /**
928
+ * Generated factory for {@link ForeignDriverChannelCapabilities} record objects.
929
+ */
930
+ export const ForeignDriverChannelCapabilities = (() => {
931
+ const defaults = () => ({});
932
+ const create = (() => {
933
+ return uniffiCreateRecord(defaults);
934
+ })();
935
+ return Object.freeze({
936
+ create,
937
+ new: create,
938
+ defaults: () => Object.freeze(defaults()),
939
+ });
940
+ })();
941
+ const FfiConverterTypeForeignDriverChannelCapabilities = (() => {
942
+ class FFIConverter extends AbstractFfiConverterByteArray {
943
+ read(from) {
944
+ return {
945
+ minimumEnvelopeVersion: FfiConverterUInt32.read(from),
946
+ maximumEnvelopeVersion: FfiConverterUInt32.read(from),
947
+ supportsCancellation: FfiConverterBool.read(from)
948
+ };
949
+ }
950
+ write(value, into) {
951
+ FfiConverterUInt32.write(value.minimumEnvelopeVersion, into);
952
+ FfiConverterUInt32.write(value.maximumEnvelopeVersion, into);
953
+ FfiConverterBool.write(value.supportsCancellation, into);
954
+ }
955
+ allocationSize(value) {
956
+ return FfiConverterUInt32.allocationSize(value.minimumEnvelopeVersion) +
957
+ FfiConverterUInt32.allocationSize(value.maximumEnvelopeVersion) +
958
+ FfiConverterBool.allocationSize(value.supportsCancellation);
959
+ }
960
+ }
961
+ ;
962
+ return new FFIConverter();
963
+ })();
964
+ /**
965
+ * Generated factory for {@link ForeignDriverRequestEnvelope} record objects.
966
+ */
967
+ export const ForeignDriverRequestEnvelope = (() => {
968
+ const defaults = () => ({});
969
+ const create = (() => {
970
+ return uniffiCreateRecord(defaults);
971
+ })();
972
+ return Object.freeze({
973
+ create,
974
+ new: create,
975
+ defaults: () => Object.freeze(defaults()),
976
+ });
977
+ })();
978
+ const FfiConverterTypeForeignDriverRequestEnvelope = (() => {
979
+ class FFIConverter extends AbstractFfiConverterByteArray {
980
+ read(from) {
981
+ return {
982
+ envelopeVersion: FfiConverterUInt32.read(from),
983
+ requestId: FfiConverterString.read(from),
984
+ operation: FfiConverterString.read(from),
985
+ name: FfiConverterOptionalString.read(from),
986
+ argumentsJson: FfiConverterOptionalString.read(from),
987
+ deadlineUnixMs: FfiConverterUInt64.read(from)
988
+ };
989
+ }
990
+ write(value, into) {
991
+ FfiConverterUInt32.write(value.envelopeVersion, into);
992
+ FfiConverterString.write(value.requestId, into);
993
+ FfiConverterString.write(value.operation, into);
994
+ FfiConverterOptionalString.write(value.name, into);
995
+ FfiConverterOptionalString.write(value.argumentsJson, into);
996
+ FfiConverterUInt64.write(value.deadlineUnixMs, into);
997
+ }
998
+ allocationSize(value) {
999
+ return FfiConverterUInt32.allocationSize(value.envelopeVersion) +
1000
+ FfiConverterString.allocationSize(value.requestId) +
1001
+ FfiConverterString.allocationSize(value.operation) +
1002
+ FfiConverterOptionalString.allocationSize(value.name) +
1003
+ FfiConverterOptionalString.allocationSize(value.argumentsJson) +
1004
+ FfiConverterUInt64.allocationSize(value.deadlineUnixMs);
1005
+ }
1006
+ }
1007
+ ;
1008
+ return new FFIConverter();
1009
+ })();
1010
+ /**
1011
+ * Generated factory for {@link ForeignDriverResponseEnvelope} record objects.
1012
+ */
1013
+ export const ForeignDriverResponseEnvelope = (() => {
1014
+ const defaults = () => ({});
1015
+ const create = (() => {
1016
+ return uniffiCreateRecord(defaults);
1017
+ })();
1018
+ return Object.freeze({
1019
+ create,
1020
+ new: create,
1021
+ defaults: () => Object.freeze(defaults()),
1022
+ });
1023
+ })();
1024
+ const FfiConverterTypeForeignDriverResponseEnvelope = (() => {
1025
+ class FFIConverter extends AbstractFfiConverterByteArray {
1026
+ read(from) {
1027
+ return {
1028
+ envelopeVersion: FfiConverterUInt32.read(from),
1029
+ requestId: FfiConverterString.read(from),
1030
+ ok: FfiConverterBool.read(from),
1031
+ resultJson: FfiConverterOptionalString.read(from),
1032
+ error: FfiConverterOptionalString.read(from),
1033
+ errorCode: FfiConverterOptionalString.read(from),
1034
+ completionKnown: FfiConverterBool.read(from)
1035
+ };
1036
+ }
1037
+ write(value, into) {
1038
+ FfiConverterUInt32.write(value.envelopeVersion, into);
1039
+ FfiConverterString.write(value.requestId, into);
1040
+ FfiConverterBool.write(value.ok, into);
1041
+ FfiConverterOptionalString.write(value.resultJson, into);
1042
+ FfiConverterOptionalString.write(value.error, into);
1043
+ FfiConverterOptionalString.write(value.errorCode, into);
1044
+ FfiConverterBool.write(value.completionKnown, into);
1045
+ }
1046
+ allocationSize(value) {
1047
+ return FfiConverterUInt32.allocationSize(value.envelopeVersion) +
1048
+ FfiConverterString.allocationSize(value.requestId) +
1049
+ FfiConverterBool.allocationSize(value.ok) +
1050
+ FfiConverterOptionalString.allocationSize(value.resultJson) +
1051
+ FfiConverterOptionalString.allocationSize(value.error) +
1052
+ FfiConverterOptionalString.allocationSize(value.errorCode) +
1053
+ FfiConverterBool.allocationSize(value.completionKnown);
1054
+ }
1055
+ }
1056
+ ;
1057
+ return new FFIConverter();
1058
+ })();
1059
+ /**
1060
+ * Generated factory for {@link TrustedSessionOptions} record objects.
1061
+ */
1062
+ export const TrustedSessionOptions = (() => {
1063
+ const defaults = () => ({
1064
+ capabilityManifestPath: undefined,
1065
+ });
1066
+ const create = (() => {
1067
+ return uniffiCreateRecord(defaults);
1068
+ })();
1069
+ return Object.freeze({
1070
+ create,
1071
+ new: create,
1072
+ defaults: () => Object.freeze(defaults()),
1073
+ });
1074
+ })();
1075
+ const FfiConverterTypeTrustedSessionOptions = (() => {
1076
+ class FFIConverter extends AbstractFfiConverterByteArray {
1077
+ read(from) {
1078
+ return {
1079
+ publicSession: FfiConverterString.read(from),
1080
+ mode: FfiConverterTypeSessionPermissionMode.read(from),
1081
+ ttlSeconds: FfiConverterUInt64.read(from),
1082
+ idleTtlSeconds: FfiConverterUInt64.read(from),
1083
+ capabilityManifestPath: FfiConverterOptionalString.read(from),
1084
+ boundedManifestPath: FfiConverterOptionalString.read(from)
1085
+ };
1086
+ }
1087
+ write(value, into) {
1088
+ FfiConverterString.write(value.publicSession, into);
1089
+ FfiConverterTypeSessionPermissionMode.write(value.mode, into);
1090
+ FfiConverterUInt64.write(value.ttlSeconds, into);
1091
+ FfiConverterUInt64.write(value.idleTtlSeconds, into);
1092
+ FfiConverterOptionalString.write(value.capabilityManifestPath, into);
1093
+ FfiConverterOptionalString.write(value.boundedManifestPath, into);
1094
+ }
1095
+ allocationSize(value) {
1096
+ return FfiConverterString.allocationSize(value.publicSession) +
1097
+ FfiConverterTypeSessionPermissionMode.allocationSize(value.mode) +
1098
+ FfiConverterUInt64.allocationSize(value.ttlSeconds) +
1099
+ FfiConverterUInt64.allocationSize(value.idleTtlSeconds) +
1100
+ FfiConverterOptionalString.allocationSize(value.capabilityManifestPath) +
1101
+ FfiConverterOptionalString.allocationSize(value.boundedManifestPath);
1102
+ }
1103
+ }
1104
+ ;
1105
+ return new FFIConverter();
1106
+ })();
1107
+ /**
1108
+ * Trusted host implementation of the existing remote transport contract.
1109
+ * Identity is captured once when each channel is adapted. A bound channel
1110
+ * must retain its parent's authenticated principal and connection generation.
1111
+ */
1112
+ export class ForeignDriverEnvelopeChannelImpl extends UniffiAbstractObject {
1113
+ [uniffiTypeNameSymbol] = "ForeignDriverEnvelopeChannelImpl";
1114
+ [destructorGuardSymbol];
1115
+ [pointerLiteralSymbol];
1116
+ // No primary constructor declared for this class.
1117
+ constructor(pointer) {
1118
+ super();
1119
+ this[pointerLiteralSymbol] = pointer;
1120
+ this[destructorGuardSymbol] = uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.bless(pointer);
1121
+ }
1122
+ identity() {
1123
+ return ((__rb) => {
1124
+ try {
1125
+ return FfiConverterTypeForeignDriverChannelIdentity.lift(__rb);
1126
+ }
1127
+ finally {
1128
+ nativeModule().rustbuffer_free(__rb);
1129
+ }
1130
+ })(uniffiCaller.rustCallWithError(
1131
+ /*liftError:*/ FfiConverterTypeForeignDriverChannelError.lift.bind(FfiConverterTypeForeignDriverChannelError),
1132
+ /*caller:*/ (callStatus) => {
1133
+ return nativeModule().uniffi_cua_driver_sdk_fn_method_foreigndriverenvelopechannel_identity(uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.clonePointer(this), callStatus);
1134
+ },
1135
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString)));
1136
+ }
1137
+ async negotiate(asyncOpts_) {
1138
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
1139
+ try {
1140
+ return await uniffiRustCallAsync(
1141
+ /*rustCaller:*/ uniffiCaller,
1142
+ /*rustFutureFunc:*/ () => {
1143
+ return nativeModule().uniffi_cua_driver_sdk_fn_method_foreigndriverenvelopechannel_negotiate(uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.clonePointer(this));
1144
+ },
1145
+ /*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
1146
+ /*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
1147
+ /*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
1148
+ /*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
1149
+ // Async returns always go through the JS-side converter: the
1150
+ // FFI symbol returns the future handle (u64), and the user-level
1151
+ // RustBuffer comes back via the shared `rust_future_complete_*`
1152
+ // export. The bytes the runtime hands back must be deserialized
1153
+ // here using the per-callable return-type converter.
1154
+ /*liftFunc:*/ FfiConverterTypeForeignDriverChannelCapabilities.lift.bind(FfiConverterTypeForeignDriverChannelCapabilities),
1155
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1156
+ /*asyncOpts:*/ asyncOpts_,
1157
+ /*errorHandler:*/ FfiConverterTypeForeignDriverChannelError.lift.bind(FfiConverterTypeForeignDriverChannelError));
1158
+ }
1159
+ catch (__error) {
1160
+ if (uniffiIsDebug && __error instanceof Error) {
1161
+ __error.stack = __stack;
1162
+ }
1163
+ throw __error;
1164
+ }
1165
+ }
1166
+ async exchange(request, asyncOpts_) {
1167
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
1168
+ try {
1169
+ return await uniffiRustCallAsync(
1170
+ /*rustCaller:*/ uniffiCaller,
1171
+ /*rustFutureFunc:*/ () => {
1172
+ return nativeModule().uniffi_cua_driver_sdk_fn_method_foreigndriverenvelopechannel_exchange(uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.clonePointer(this), FfiConverterTypeForeignDriverRequestEnvelope.lower(request, nativeModule().rustbuffer_alloc));
1173
+ },
1174
+ /*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
1175
+ /*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
1176
+ /*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
1177
+ /*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
1178
+ // Async returns always go through the JS-side converter: the
1179
+ // FFI symbol returns the future handle (u64), and the user-level
1180
+ // RustBuffer comes back via the shared `rust_future_complete_*`
1181
+ // export. The bytes the runtime hands back must be deserialized
1182
+ // here using the per-callable return-type converter.
1183
+ /*liftFunc:*/ FfiConverterTypeForeignDriverResponseEnvelope.lift.bind(FfiConverterTypeForeignDriverResponseEnvelope),
1184
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1185
+ /*asyncOpts:*/ asyncOpts_,
1186
+ /*errorHandler:*/ FfiConverterTypeForeignDriverChannelError.lift.bind(FfiConverterTypeForeignDriverChannelError));
1187
+ }
1188
+ catch (__error) {
1189
+ if (uniffiIsDebug && __error instanceof Error) {
1190
+ __error.stack = __stack;
1191
+ }
1192
+ throw __error;
1193
+ }
1194
+ }
1195
+ async bindSession(options, asyncOpts_) {
1196
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
1197
+ try {
1198
+ return await uniffiRustCallAsync(
1199
+ /*rustCaller:*/ uniffiCaller,
1200
+ /*rustFutureFunc:*/ () => {
1201
+ return nativeModule().uniffi_cua_driver_sdk_fn_method_foreigndriverenvelopechannel_bind_session(uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.clonePointer(this), FfiConverterTypeTrustedSessionOptions.lower(options, nativeModule().rustbuffer_alloc));
1202
+ },
1203
+ /*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_rust_buffer,
1204
+ /*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_rust_buffer,
1205
+ /*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_rust_buffer,
1206
+ /*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_rust_buffer,
1207
+ // Async returns always go through the JS-side converter: the
1208
+ // FFI symbol returns the future handle (u64), and the user-level
1209
+ // RustBuffer comes back via the shared `rust_future_complete_*`
1210
+ // export. The bytes the runtime hands back must be deserialized
1211
+ // here using the per-callable return-type converter.
1212
+ /*liftFunc:*/ FfiConverterTypeForeignDriverBoundChannel.lift.bind(FfiConverterTypeForeignDriverBoundChannel),
1213
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1214
+ /*asyncOpts:*/ asyncOpts_,
1215
+ /*errorHandler:*/ FfiConverterTypeForeignDriverChannelError.lift.bind(FfiConverterTypeForeignDriverChannelError));
1216
+ }
1217
+ catch (__error) {
1218
+ if (uniffiIsDebug && __error instanceof Error) {
1219
+ __error.stack = __stack;
1220
+ }
1221
+ throw __error;
1222
+ }
1223
+ }
1224
+ async cancel(requestId, asyncOpts_) {
1225
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
1226
+ try {
1227
+ return await uniffiRustCallAsync(
1228
+ /*rustCaller:*/ uniffiCaller,
1229
+ /*rustFutureFunc:*/ () => {
1230
+ return nativeModule().uniffi_cua_driver_sdk_fn_method_foreigndriverenvelopechannel_cancel(uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.clonePointer(this), FfiConverterString.lower(requestId, nativeModule().rustbuffer_alloc));
1231
+ },
1232
+ /*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_void,
1233
+ /*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_void,
1234
+ /*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_void,
1235
+ /*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_void,
1236
+ /*liftFunc:*/ (_v) => { },
1237
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1238
+ /*asyncOpts:*/ asyncOpts_,
1239
+ /*errorHandler:*/ FfiConverterTypeForeignDriverChannelError.lift.bind(FfiConverterTypeForeignDriverChannelError));
1240
+ }
1241
+ catch (__error) {
1242
+ if (uniffiIsDebug && __error instanceof Error) {
1243
+ __error.stack = __stack;
1244
+ }
1245
+ throw __error;
1246
+ }
1247
+ }
1248
+ async close(asyncOpts_) {
1249
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
1250
+ try {
1251
+ return await uniffiRustCallAsync(
1252
+ /*rustCaller:*/ uniffiCaller,
1253
+ /*rustFutureFunc:*/ () => {
1254
+ return nativeModule().uniffi_cua_driver_sdk_fn_method_foreigndriverenvelopechannel_close(uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.clonePointer(this));
1255
+ },
1256
+ /*pollFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_poll_void,
1257
+ /*cancelFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_cancel_void,
1258
+ /*completeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_complete_void,
1259
+ /*freeFunc:*/ nativeModule().ffi_cua_driver_sdk_rust_future_free_void,
1260
+ /*liftFunc:*/ (_v) => { },
1261
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1262
+ /*asyncOpts:*/ asyncOpts_,
1263
+ /*errorHandler:*/ FfiConverterTypeForeignDriverChannelError.lift.bind(FfiConverterTypeForeignDriverChannelError));
1264
+ }
1265
+ catch (__error) {
1266
+ if (uniffiIsDebug && __error instanceof Error) {
1267
+ __error.stack = __stack;
1268
+ }
1269
+ throw __error;
1270
+ }
1271
+ }
1272
+ uniffiDestroy() {
1273
+ const ptr = this[destructorGuardSymbol];
1274
+ if (ptr !== undefined) {
1275
+ const pointer = uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.pointer(this);
1276
+ uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.freePointer(pointer);
1277
+ uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.unbless(ptr);
1278
+ delete this[destructorGuardSymbol];
1279
+ }
1280
+ }
1281
+ static instanceOf(obj_) {
1282
+ return uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.isConcreteType(obj_);
1283
+ }
1284
+ }
1285
+ const uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory = (() => {
1286
+ /// <reference lib="es2021" />
1287
+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry((heldValue) => {
1288
+ uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory.freePointer(heldValue);
1289
+ }) : null;
1290
+ return {
1291
+ create(pointer) {
1292
+ const instance = Object.create(ForeignDriverEnvelopeChannelImpl.prototype);
1293
+ instance[pointerLiteralSymbol] = pointer;
1294
+ instance[destructorGuardSymbol] = this.bless(pointer);
1295
+ instance[uniffiTypeNameSymbol] = "ForeignDriverEnvelopeChannelImpl";
1296
+ return instance;
1297
+ },
1298
+ bless(p) {
1299
+ const ptr = {
1300
+ p, // make sure this object doesn't get optimized away.
1301
+ markDestroyed: () => undefined,
1302
+ };
1303
+ if (registry) {
1304
+ registry.register(ptr, p, ptr);
1305
+ }
1306
+ return ptr;
1307
+ },
1308
+ unbless(ptr_) {
1309
+ if (registry) {
1310
+ registry.unregister(ptr_);
1311
+ }
1312
+ },
1313
+ pointer(obj_) {
1314
+ if (obj_[destructorGuardSymbol] === undefined) {
1315
+ throw new UniffiInternalError.UnexpectedNullPointer();
1316
+ }
1317
+ return obj_[pointerLiteralSymbol];
1318
+ },
1319
+ clonePointer(obj_) {
1320
+ const pointer = this.pointer(obj_);
1321
+ return uniffiCaller.rustCall(
1322
+ /*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_clone_foreigndriverenvelopechannel(pointer, callStatus),
1323
+ /*liftString:*/ FfiConverterString.lift);
1324
+ },
1325
+ freePointer(pointer) {
1326
+ uniffiCaller.rustCall(
1327
+ /*caller:*/ (callStatus) => nativeModule().uniffi_cua_driver_sdk_fn_free_foreigndriverenvelopechannel(pointer, callStatus),
1328
+ /*liftString:*/ FfiConverterString.lift);
1329
+ },
1330
+ isConcreteType(obj_) {
1331
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "ForeignDriverEnvelopeChannelImpl";
1332
+ },
1333
+ };
1334
+ })();
1335
+ const FfiConverterTypeForeignDriverEnvelopeChannel = new FfiConverterObjectWithCallbacks(uniffiTypeForeignDriverEnvelopeChannelImplObjectFactory);
1336
+ // Add a vtable for the callbacks that go in ForeignDriverEnvelopeChannel.
1337
+ // Put the implementation in a struct so we don't pollute the top-level namespace
1338
+ const uniffiCallbackInterfaceForeignDriverEnvelopeChannel = {
1339
+ // Create the VTable using a series of closures.
1340
+ // ts automatically converts these into C callback functions.
1341
+ vtable: {
1342
+ identity: (uniffiHandle) => {
1343
+ const uniffiMakeCall = () => {
1344
+ const jsCallback = FfiConverterTypeForeignDriverEnvelopeChannel.lift(uniffiHandle);
1345
+ return jsCallback.identity();
1346
+ };
1347
+ const uniffiResult = UniffiResult.ready();
1348
+ const uniffiHandleSuccess = (obj) => {
1349
+ UniffiResult.writeSuccess(uniffiResult, FfiConverterTypeForeignDriverChannelIdentity.lower(obj, nativeModule().rustbuffer_alloc));
1350
+ };
1351
+ const uniffiHandleError = (code, errBuf) => {
1352
+ UniffiResult.writeError(uniffiResult, code, errBuf);
1353
+ };
1354
+ uniffiTraitInterfaceCallWithError(
1355
+ /*makeCall:*/ uniffiMakeCall,
1356
+ /*handleSuccess:*/ uniffiHandleSuccess,
1357
+ /*handleError:*/ uniffiHandleError,
1358
+ /*isErrorType:*/ ForeignDriverChannelError.instanceOf,
1359
+ /*lowerError:*/ FfiConverterTypeForeignDriverChannelError.lower.bind(FfiConverterTypeForeignDriverChannelError),
1360
+ /*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),
1361
+ /*alloc:*/ nativeModule().rustbuffer_alloc);
1362
+ return uniffiResult;
1363
+ },
1364
+ negotiate: (uniffiHandle, uniffiFutureCallback, uniffiCallbackData) => {
1365
+ const uniffiMakeCall = async (signal) => {
1366
+ const jsCallback = FfiConverterTypeForeignDriverEnvelopeChannel.lift(uniffiHandle);
1367
+ return await jsCallback.negotiate({ signal });
1368
+ };
1369
+ const uniffiHandleSuccess = (returnValue) => {
1370
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1371
+ /* UniffiForeignFutureResultRustBuffer */ {
1372
+ return_value: FfiConverterTypeForeignDriverChannelCapabilities.lower(returnValue, nativeModule().rustbuffer_alloc),
1373
+ call_status: uniffiCaller.createCallStatus()
1374
+ });
1375
+ };
1376
+ const uniffiHandleError = (code, errorBuf) => {
1377
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1378
+ /* UniffiForeignFutureResultRustBuffer */ {
1379
+ return_value: /*empty*/ new Uint8Array(0),
1380
+ // TODO create callstatus with error.
1381
+ call_status: uniffiCaller.createErrorStatus(code, errorBuf),
1382
+ });
1383
+ };
1384
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
1385
+ /*makeCall:*/ uniffiMakeCall,
1386
+ /*handleSuccess:*/ uniffiHandleSuccess,
1387
+ /*handleError:*/ uniffiHandleError,
1388
+ /*isErrorType:*/ ForeignDriverChannelError.instanceOf,
1389
+ /*lowerError:*/ FfiConverterTypeForeignDriverChannelError.lower.bind(FfiConverterTypeForeignDriverChannelError),
1390
+ /*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),
1391
+ /*alloc:*/ nativeModule().rustbuffer_alloc);
1392
+ return uniffiForeignFuture;
1393
+ },
1394
+ exchange: (uniffiHandle, request, uniffiFutureCallback, uniffiCallbackData) => {
1395
+ const uniffiMakeCall = async (signal) => {
1396
+ const jsCallback = FfiConverterTypeForeignDriverEnvelopeChannel.lift(uniffiHandle);
1397
+ return await jsCallback.exchange(FfiConverterTypeForeignDriverRequestEnvelope.lift(request), { signal });
1398
+ };
1399
+ const uniffiHandleSuccess = (returnValue) => {
1400
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1401
+ /* UniffiForeignFutureResultRustBuffer */ {
1402
+ return_value: FfiConverterTypeForeignDriverResponseEnvelope.lower(returnValue, nativeModule().rustbuffer_alloc),
1403
+ call_status: uniffiCaller.createCallStatus()
1404
+ });
1405
+ };
1406
+ const uniffiHandleError = (code, errorBuf) => {
1407
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1408
+ /* UniffiForeignFutureResultRustBuffer */ {
1409
+ return_value: /*empty*/ new Uint8Array(0),
1410
+ // TODO create callstatus with error.
1411
+ call_status: uniffiCaller.createErrorStatus(code, errorBuf),
1412
+ });
1413
+ };
1414
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
1415
+ /*makeCall:*/ uniffiMakeCall,
1416
+ /*handleSuccess:*/ uniffiHandleSuccess,
1417
+ /*handleError:*/ uniffiHandleError,
1418
+ /*isErrorType:*/ ForeignDriverChannelError.instanceOf,
1419
+ /*lowerError:*/ FfiConverterTypeForeignDriverChannelError.lower.bind(FfiConverterTypeForeignDriverChannelError),
1420
+ /*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),
1421
+ /*alloc:*/ nativeModule().rustbuffer_alloc);
1422
+ return uniffiForeignFuture;
1423
+ },
1424
+ bind_session: (uniffiHandle, options, uniffiFutureCallback, uniffiCallbackData) => {
1425
+ const uniffiMakeCall = async (signal) => {
1426
+ const jsCallback = FfiConverterTypeForeignDriverEnvelopeChannel.lift(uniffiHandle);
1427
+ return await jsCallback.bindSession(FfiConverterTypeTrustedSessionOptions.lift(options), { signal });
1428
+ };
1429
+ const uniffiHandleSuccess = (returnValue) => {
1430
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1431
+ /* UniffiForeignFutureResultRustBuffer */ {
1432
+ return_value: FfiConverterTypeForeignDriverBoundChannel.lower(returnValue, nativeModule().rustbuffer_alloc),
1433
+ call_status: uniffiCaller.createCallStatus()
1434
+ });
1435
+ };
1436
+ const uniffiHandleError = (code, errorBuf) => {
1437
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1438
+ /* UniffiForeignFutureResultRustBuffer */ {
1439
+ return_value: /*empty*/ new Uint8Array(0),
1440
+ // TODO create callstatus with error.
1441
+ call_status: uniffiCaller.createErrorStatus(code, errorBuf),
1442
+ });
1443
+ };
1444
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
1445
+ /*makeCall:*/ uniffiMakeCall,
1446
+ /*handleSuccess:*/ uniffiHandleSuccess,
1447
+ /*handleError:*/ uniffiHandleError,
1448
+ /*isErrorType:*/ ForeignDriverChannelError.instanceOf,
1449
+ /*lowerError:*/ FfiConverterTypeForeignDriverChannelError.lower.bind(FfiConverterTypeForeignDriverChannelError),
1450
+ /*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),
1451
+ /*alloc:*/ nativeModule().rustbuffer_alloc);
1452
+ return uniffiForeignFuture;
1453
+ },
1454
+ cancel: (uniffiHandle, requestId, uniffiFutureCallback, uniffiCallbackData) => {
1455
+ const uniffiMakeCall = async (signal) => {
1456
+ const jsCallback = FfiConverterTypeForeignDriverEnvelopeChannel.lift(uniffiHandle);
1457
+ return await jsCallback.cancel(FfiConverterString.lift(requestId), { signal });
1458
+ };
1459
+ const uniffiHandleSuccess = (returnValue) => {
1460
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1461
+ /* UniffiForeignFutureResultVoid */ {
1462
+ call_status: uniffiCaller.createCallStatus()
1463
+ });
1464
+ };
1465
+ const uniffiHandleError = (code, errorBuf) => {
1466
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1467
+ /* UniffiForeignFutureResultVoid */ {
1468
+ // TODO create callstatus with error.
1469
+ call_status: uniffiCaller.createErrorStatus(code, errorBuf),
1470
+ });
1471
+ };
1472
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
1473
+ /*makeCall:*/ uniffiMakeCall,
1474
+ /*handleSuccess:*/ uniffiHandleSuccess,
1475
+ /*handleError:*/ uniffiHandleError,
1476
+ /*isErrorType:*/ ForeignDriverChannelError.instanceOf,
1477
+ /*lowerError:*/ FfiConverterTypeForeignDriverChannelError.lower.bind(FfiConverterTypeForeignDriverChannelError),
1478
+ /*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),
1479
+ /*alloc:*/ nativeModule().rustbuffer_alloc);
1480
+ return uniffiForeignFuture;
1481
+ },
1482
+ close: (uniffiHandle, uniffiFutureCallback, uniffiCallbackData) => {
1483
+ const uniffiMakeCall = async (signal) => {
1484
+ const jsCallback = FfiConverterTypeForeignDriverEnvelopeChannel.lift(uniffiHandle);
1485
+ return await jsCallback.close({ signal });
1486
+ };
1487
+ const uniffiHandleSuccess = (returnValue) => {
1488
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1489
+ /* UniffiForeignFutureResultVoid */ {
1490
+ call_status: uniffiCaller.createCallStatus()
1491
+ });
1492
+ };
1493
+ const uniffiHandleError = (code, errorBuf) => {
1494
+ uniffiFutureCallback.call(uniffiFutureCallback, uniffiCallbackData,
1495
+ /* UniffiForeignFutureResultVoid */ {
1496
+ // TODO create callstatus with error.
1497
+ call_status: uniffiCaller.createErrorStatus(code, errorBuf),
1498
+ });
609
1499
  };
1500
+ const uniffiForeignFuture = uniffiTraitInterfaceCallAsyncWithError(
1501
+ /*makeCall:*/ uniffiMakeCall,
1502
+ /*handleSuccess:*/ uniffiHandleSuccess,
1503
+ /*handleError:*/ uniffiHandleError,
1504
+ /*isErrorType:*/ ForeignDriverChannelError.instanceOf,
1505
+ /*lowerError:*/ FfiConverterTypeForeignDriverChannelError.lower.bind(FfiConverterTypeForeignDriverChannelError),
1506
+ /*lowerString:*/ FfiConverterString.lower.bind(FfiConverterString),
1507
+ /*alloc:*/ nativeModule().rustbuffer_alloc);
1508
+ return uniffiForeignFuture;
1509
+ },
1510
+ uniffi_free: (uniffiHandle) => {
1511
+ // this will throw a stale handle error if the handle isn't found.
1512
+ FfiConverterTypeForeignDriverEnvelopeChannel.drop(uniffiHandle);
1513
+ },
1514
+ uniffi_clone: (uniffiHandle) => {
1515
+ return FfiConverterTypeForeignDriverEnvelopeChannel.clone(uniffiHandle);
610
1516
  }
611
- write(value, into) {
612
- FfiConverterString.write(value.socketPath, into);
613
- FfiConverterUInt32.write(value.pid, into);
614
- FfiConverterString.write(value.generation, into);
615
- FfiConverterString.write(value.driverVersion, into);
616
- FfiConverterString.write(value.contractVersion, into);
617
- FfiConverterString.write(value.mcpProtocolVersion, into);
618
- FfiConverterTypeEmbeddedMcpConfiguration.write(value.mcp, into);
619
- }
620
- allocationSize(value) {
621
- return FfiConverterString.allocationSize(value.socketPath) +
622
- FfiConverterUInt32.allocationSize(value.pid) +
623
- FfiConverterString.allocationSize(value.generation) +
624
- FfiConverterString.allocationSize(value.driverVersion) +
625
- FfiConverterString.allocationSize(value.contractVersion) +
626
- FfiConverterString.allocationSize(value.mcpProtocolVersion) +
627
- FfiConverterTypeEmbeddedMcpConfiguration.allocationSize(value.mcp);
628
- }
629
- }
630
- ;
631
- return new FFIConverter();
632
- })();
1517
+ },
1518
+ register: () => {
1519
+ nativeModule().uniffi_cua_driver_sdk_fn_init_callback_vtable_foreigndriverenvelopechannel(uniffiCallbackInterfaceForeignDriverEnvelopeChannel.vtable);
1520
+ },
1521
+ };
633
1522
  /**
634
- * Generated factory for {@link EmbeddedDriverExit} record objects.
1523
+ * Generated factory for {@link ForeignDriverBoundChannel} record objects.
635
1524
  */
636
- export const EmbeddedDriverExit = (() => {
1525
+ export const ForeignDriverBoundChannel = (() => {
637
1526
  const defaults = () => ({});
638
1527
  const create = (() => {
639
1528
  return uniffiCreateRecord(defaults);
@@ -644,128 +1533,18 @@ export const EmbeddedDriverExit = (() => {
644
1533
  defaults: () => Object.freeze(defaults()),
645
1534
  });
646
1535
  })();
647
- const FfiConverterTypeEmbeddedDriverExit = (() => {
648
- class FFIConverter extends AbstractFfiConverterByteArray {
649
- read(from) {
650
- return {
651
- generation: FfiConverterString.read(from),
652
- code: FfiConverterOptionalInt32.read(from),
653
- success: FfiConverterBool.read(from)
654
- };
655
- }
656
- write(value, into) {
657
- FfiConverterString.write(value.generation, into);
658
- FfiConverterOptionalInt32.write(value.code, into);
659
- FfiConverterBool.write(value.success, into);
660
- }
661
- allocationSize(value) {
662
- return FfiConverterString.allocationSize(value.generation) +
663
- FfiConverterOptionalInt32.allocationSize(value.code) +
664
- FfiConverterBool.allocationSize(value.success);
665
- }
666
- }
667
- ;
668
- return new FFIConverter();
669
- })();
670
- export var EmbeddedPermissionMode;
671
- (function (EmbeddedPermissionMode) {
672
- EmbeddedPermissionMode[EmbeddedPermissionMode["Standard"] = 0] = "Standard";
673
- EmbeddedPermissionMode[EmbeddedPermissionMode["Bounded"] = 1] = "Bounded";
674
- EmbeddedPermissionMode[EmbeddedPermissionMode["Unrestricted"] = 2] = "Unrestricted";
675
- })(EmbeddedPermissionMode || (EmbeddedPermissionMode = {}));
676
- const FfiConverterTypeEmbeddedPermissionMode = (() => {
677
- const ordinalConverter = FfiConverterInt32;
678
- class FFIConverter extends AbstractFfiConverterByteArray {
679
- read(from) {
680
- switch (ordinalConverter.read(from)) {
681
- case 1: return EmbeddedPermissionMode.Standard;
682
- case 2: return EmbeddedPermissionMode.Bounded;
683
- case 3: return EmbeddedPermissionMode.Unrestricted;
684
- default: throw new UniffiInternalError.UnexpectedEnumCase();
685
- }
686
- }
687
- write(value, into) {
688
- switch (value) {
689
- case EmbeddedPermissionMode.Standard: return ordinalConverter.write(1, into);
690
- case EmbeddedPermissionMode.Bounded: return ordinalConverter.write(2, into);
691
- case EmbeddedPermissionMode.Unrestricted: return ordinalConverter.write(3, into);
692
- }
693
- }
694
- allocationSize(value) {
695
- return ordinalConverter.allocationSize(0);
696
- }
697
- }
698
- return new FFIConverter();
699
- })();
700
- /**
701
- * Generated factory for {@link EmbeddedDriverHostOptions} record objects.
702
- */
703
- export const EmbeddedDriverHostOptions = (() => {
704
- const defaults = () => ({
705
- capabilityManifestPath: undefined,
706
- approveCapabilityManifest: false,
707
- noOverlay: false
708
- });
709
- const create = (() => {
710
- return uniffiCreateRecord(defaults);
711
- })();
712
- return Object.freeze({
713
- create,
714
- new: create,
715
- defaults: () => Object.freeze(defaults()),
716
- });
717
- })();
718
- const FfiConverterTypeEmbeddedDriverHostOptions = (() => {
1536
+ const FfiConverterTypeForeignDriverBoundChannel = (() => {
719
1537
  class FFIConverter extends AbstractFfiConverterByteArray {
720
1538
  read(from) {
721
1539
  return {
722
- binaryPath: FfiConverterString.read(from),
723
- hostBundleId: FfiConverterString.read(from),
724
- socketPath: FfiConverterOptionalString.read(from),
725
- startupTimeoutMs: FfiConverterOptionalUInt64.read(from),
726
- shutdownTimeoutMs: FfiConverterOptionalUInt64.read(from),
727
- permissionMode: FfiConverterOptionalTypeEmbeddedPermissionMode.read(from),
728
- capabilityManifestPath: FfiConverterOptionalString.read(from),
729
- approveCapabilityManifest: FfiConverterBool.read(from),
730
- sessionPolicyPath: FfiConverterOptionalString.read(from),
731
- approveSessionPolicy: FfiConverterBool.read(from),
732
- dangerouslyBypassApprovals: FfiConverterBool.read(from),
733
- environment: FfiConverterSequenceTypeEmbeddedEnvironmentVariable.read(from),
734
- inheritStderr: FfiConverterBool.read(from),
735
- noOverlay: FfiConverterBool.read(from)
1540
+ channel: FfiConverterTypeForeignDriverEnvelopeChannel.read(from)
736
1541
  };
737
1542
  }
738
1543
  write(value, into) {
739
- FfiConverterString.write(value.binaryPath, into);
740
- FfiConverterString.write(value.hostBundleId, into);
741
- FfiConverterOptionalString.write(value.socketPath, into);
742
- FfiConverterOptionalUInt64.write(value.startupTimeoutMs, into);
743
- FfiConverterOptionalUInt64.write(value.shutdownTimeoutMs, into);
744
- FfiConverterOptionalTypeEmbeddedPermissionMode.write(value.permissionMode, into);
745
- FfiConverterOptionalString.write(value.capabilityManifestPath, into);
746
- FfiConverterBool.write(value.approveCapabilityManifest, into);
747
- FfiConverterOptionalString.write(value.sessionPolicyPath, into);
748
- FfiConverterBool.write(value.approveSessionPolicy, into);
749
- FfiConverterBool.write(value.dangerouslyBypassApprovals, into);
750
- FfiConverterSequenceTypeEmbeddedEnvironmentVariable.write(value.environment, into);
751
- FfiConverterBool.write(value.inheritStderr, into);
752
- FfiConverterBool.write(value.noOverlay, into);
1544
+ FfiConverterTypeForeignDriverEnvelopeChannel.write(value.channel, into);
753
1545
  }
754
1546
  allocationSize(value) {
755
- return FfiConverterString.allocationSize(value.binaryPath) +
756
- FfiConverterString.allocationSize(value.hostBundleId) +
757
- FfiConverterOptionalString.allocationSize(value.socketPath) +
758
- FfiConverterOptionalUInt64.allocationSize(value.startupTimeoutMs) +
759
- FfiConverterOptionalUInt64.allocationSize(value.shutdownTimeoutMs) +
760
- FfiConverterOptionalTypeEmbeddedPermissionMode.allocationSize(value.permissionMode) +
761
- FfiConverterOptionalString.allocationSize(value.capabilityManifestPath) +
762
- FfiConverterBool.allocationSize(value.approveCapabilityManifest) +
763
- FfiConverterOptionalString.allocationSize(value.sessionPolicyPath) +
764
- FfiConverterBool.allocationSize(value.approveSessionPolicy) +
765
- FfiConverterBool.allocationSize(value.dangerouslyBypassApprovals) +
766
- FfiConverterSequenceTypeEmbeddedEnvironmentVariable.allocationSize(value.environment) +
767
- FfiConverterBool.allocationSize(value.inheritStderr) +
768
- FfiConverterBool.allocationSize(value.noOverlay);
1547
+ return FfiConverterTypeForeignDriverEnvelopeChannel.allocationSize(value.channel);
769
1548
  }
770
1549
  }
771
1550
  ;
@@ -943,54 +1722,6 @@ const FfiConverterTypeToolResult = (() => {
943
1722
  ;
944
1723
  return new FFIConverter();
945
1724
  })();
946
- /**
947
- * Generated factory for {@link TrustedSessionOptions} record objects.
948
- */
949
- export const TrustedSessionOptions = (() => {
950
- const defaults = () => ({
951
- capabilityManifestPath: undefined,
952
- });
953
- const create = (() => {
954
- return uniffiCreateRecord(defaults);
955
- })();
956
- return Object.freeze({
957
- create,
958
- new: create,
959
- defaults: () => Object.freeze(defaults()),
960
- });
961
- })();
962
- const FfiConverterTypeTrustedSessionOptions = (() => {
963
- class FFIConverter extends AbstractFfiConverterByteArray {
964
- read(from) {
965
- return {
966
- publicSession: FfiConverterString.read(from),
967
- mode: FfiConverterTypeSessionPermissionMode.read(from),
968
- ttlSeconds: FfiConverterUInt64.read(from),
969
- idleTtlSeconds: FfiConverterUInt64.read(from),
970
- capabilityManifestPath: FfiConverterOptionalString.read(from),
971
- boundedManifestPath: FfiConverterOptionalString.read(from)
972
- };
973
- }
974
- write(value, into) {
975
- FfiConverterString.write(value.publicSession, into);
976
- FfiConverterTypeSessionPermissionMode.write(value.mode, into);
977
- FfiConverterUInt64.write(value.ttlSeconds, into);
978
- FfiConverterUInt64.write(value.idleTtlSeconds, into);
979
- FfiConverterOptionalString.write(value.capabilityManifestPath, into);
980
- FfiConverterOptionalString.write(value.boundedManifestPath, into);
981
- }
982
- allocationSize(value) {
983
- return FfiConverterString.allocationSize(value.publicSession) +
984
- FfiConverterTypeSessionPermissionMode.allocationSize(value.mode) +
985
- FfiConverterUInt64.allocationSize(value.ttlSeconds) +
986
- FfiConverterUInt64.allocationSize(value.idleTtlSeconds) +
987
- FfiConverterOptionalString.allocationSize(value.capabilityManifestPath) +
988
- FfiConverterOptionalString.allocationSize(value.boundedManifestPath);
989
- }
990
- }
991
- ;
992
- return new FFIConverter();
993
- })();
994
1725
  export var ActionCompletion;
995
1726
  (function (ActionCompletion) {
996
1727
  ActionCompletion[ActionCompletion["NotStarted"] = 0] = "NotStarted";
@@ -4545,6 +5276,12 @@ function uniffiEnsureInitialized() {
4545
5276
  if (bindingsContractVersion !== scaffoldingContractVersion) {
4546
5277
  throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
4547
5278
  }
5279
+ if (nativeModule().uniffi_cua_driver_sdk_checksum_func_connect_remote_channel() !== 54784) {
5280
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_connect_remote_channel");
5281
+ }
5282
+ if (nativeModule().uniffi_cua_driver_sdk_checksum_func_create_remote_trusted_session() !== 53066) {
5283
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_create_remote_trusted_session");
5284
+ }
4548
5285
  if (nativeModule().uniffi_cua_driver_sdk_checksum_func_create_trusted_session() !== 50573) {
4549
5286
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_func_create_trusted_session");
4550
5287
  }
@@ -4812,6 +5549,25 @@ function uniffiEnsureInitialized() {
4812
5549
  if (nativeModule().uniffi_cua_driver_sdk_checksum_method_embeddedcuadriverhost_wait_for_exit() !== 21124) {
4813
5550
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_embeddedcuadriverhost_wait_for_exit");
4814
5551
  }
5552
+ if (nativeModule().uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_identity() !== 13418) {
5553
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_identity");
5554
+ }
5555
+ if (nativeModule().uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_negotiate() !== 29939) {
5556
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_negotiate");
5557
+ }
5558
+ if (nativeModule().uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_exchange() !== 707) {
5559
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_exchange");
5560
+ }
5561
+ if (nativeModule().uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_bind_session() !== 6555) {
5562
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_bind_session");
5563
+ }
5564
+ if (nativeModule().uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_cancel() !== 60148) {
5565
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_cancel");
5566
+ }
5567
+ if (nativeModule().uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_close() !== 42601) {
5568
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cua_driver_sdk_checksum_method_foreigndriverenvelopechannel_close");
5569
+ }
5570
+ uniffiCallbackInterfaceForeignDriverEnvelopeChannel.register();
4815
5571
  uniffiCallbackInterfaceDriverActivityObserver.register();
4816
5572
  uniffiCallbackInterfaceDriverAuthorizationHost.register();
4817
5573
  }
@@ -4843,6 +5599,13 @@ export default Object.freeze({
4843
5599
  FfiConverterTypeEmbeddedEnvironmentVariable,
4844
5600
  FfiConverterTypeEmbeddedMcpConfiguration,
4845
5601
  FfiConverterTypeEmbeddedPermissionMode,
5602
+ FfiConverterTypeForeignDriverBoundChannel,
5603
+ FfiConverterTypeForeignDriverChannelCapabilities,
5604
+ FfiConverterTypeForeignDriverChannelError,
5605
+ FfiConverterTypeForeignDriverChannelIdentity,
5606
+ FfiConverterTypeForeignDriverEnvelopeChannel,
5607
+ FfiConverterTypeForeignDriverRequestEnvelope,
5608
+ FfiConverterTypeForeignDriverResponseEnvelope,
4846
5609
  FfiConverterTypeImageContent,
4847
5610
  FfiConverterTypeMacOsPermissionStatus,
4848
5611
  FfiConverterTypePrivateWorkerOptions,