@stryke/capnp 0.12.32 → 0.12.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/README.md +18 -9
  2. package/bin/capnpc.cjs +9 -8304
  3. package/bin/capnpc.d.cts +4 -2
  4. package/bin/capnpc.d.cts.map +1 -0
  5. package/bin/capnpc.d.mts +8 -0
  6. package/bin/capnpc.d.mts.map +1 -0
  7. package/bin/capnpc.mjs +11 -0
  8. package/bin/capnpc.mjs.map +1 -0
  9. package/dist/compile-DN7i0G3X.d.mts +40 -0
  10. package/dist/compile-DN7i0G3X.d.mts.map +1 -0
  11. package/dist/compile-DOMgXQRn.cjs +1 -0
  12. package/dist/compile-DccxA7WZ.d.cts +40 -0
  13. package/dist/compile-DccxA7WZ.d.cts.map +1 -0
  14. package/dist/compile-cQ918Wl_.mjs +2 -0
  15. package/dist/compile-cQ918Wl_.mjs.map +1 -0
  16. package/dist/compile.cjs +1 -11
  17. package/dist/compile.d.cts +3 -39
  18. package/dist/compile.d.mts +3 -0
  19. package/dist/compile.mjs +1 -0
  20. package/dist/dist-BzGdCkHS.cjs +1 -0
  21. package/dist/dist-CvDcvswe.mjs +2 -0
  22. package/dist/dist-CvDcvswe.mjs.map +1 -0
  23. package/dist/helpers-BIiGufva.cjs +6 -0
  24. package/dist/helpers-BYBeqv2d.mjs +7 -0
  25. package/dist/helpers-BYBeqv2d.mjs.map +1 -0
  26. package/dist/helpers.cjs +1 -7
  27. package/dist/helpers.d.cts +5 -4
  28. package/dist/helpers.d.cts.map +1 -0
  29. package/dist/{helpers.d.ts → helpers.d.mts} +5 -4
  30. package/dist/helpers.d.mts.map +1 -0
  31. package/dist/helpers.mjs +1 -0
  32. package/dist/index.cjs +1 -134
  33. package/dist/index.d.cts +4 -6
  34. package/dist/index.d.mts +4 -0
  35. package/dist/index.mjs +1 -0
  36. package/dist/rpc.cjs +1 -139
  37. package/dist/rpc.d.cts +62 -59
  38. package/dist/rpc.d.cts.map +1 -0
  39. package/dist/rpc.d.mts +74 -0
  40. package/dist/rpc.d.mts.map +1 -0
  41. package/dist/rpc.mjs +2 -0
  42. package/dist/rpc.mjs.map +1 -0
  43. package/dist/types-B2gKzfwi.cjs +1 -0
  44. package/dist/types-D52qMMoK.d.cts +55 -0
  45. package/dist/types-D52qMMoK.d.cts.map +1 -0
  46. package/dist/types-DBd3Wi0H.d.mts +55 -0
  47. package/dist/types-DBd3Wi0H.d.mts.map +1 -0
  48. package/dist/types-y_yfxLs5.mjs +2 -0
  49. package/dist/types-y_yfxLs5.mjs.map +1 -0
  50. package/dist/types.cjs +1 -7
  51. package/dist/types.d.cts +2 -53
  52. package/dist/types.d.mts +2 -0
  53. package/dist/types.mjs +1 -0
  54. package/package.json +42 -69
  55. package/schemas/cpp.cjs +1 -7
  56. package/schemas/cpp.d.cts +3 -1
  57. package/schemas/cpp.d.cts.map +1 -0
  58. package/schemas/cpp.d.mts +5 -0
  59. package/schemas/cpp.d.mts.map +1 -0
  60. package/schemas/cpp.mjs +2 -0
  61. package/schemas/cpp.mjs.map +1 -0
  62. package/schemas/index-CDymg4xL.d.mts +96 -0
  63. package/schemas/index-CDymg4xL.d.mts.map +1 -0
  64. package/schemas/index-b7dam4EA.d.cts +96 -0
  65. package/schemas/index-b7dam4EA.d.cts.map +1 -0
  66. package/schemas/persistent.cjs +1 -171
  67. package/schemas/persistent.d.cts +55 -55
  68. package/schemas/persistent.d.cts.map +1 -0
  69. package/schemas/{persistent.d.ts → persistent.d.mts} +55 -55
  70. package/schemas/persistent.d.mts.map +1 -0
  71. package/schemas/persistent.mjs +2 -0
  72. package/schemas/persistent.mjs.map +1 -0
  73. package/schemas/rpc-twoparty.cjs +1 -209
  74. package/schemas/rpc-twoparty.d.cts +76 -74
  75. package/schemas/rpc-twoparty.d.cts.map +1 -0
  76. package/schemas/{rpc-twoparty.d.ts → rpc-twoparty.d.mts} +76 -74
  77. package/schemas/rpc-twoparty.d.mts.map +1 -0
  78. package/schemas/rpc-twoparty.mjs +2 -0
  79. package/schemas/rpc-twoparty.mjs.map +1 -0
  80. package/schemas/rpc.cjs +1 -2563
  81. package/schemas/rpc.d.cts +749 -747
  82. package/schemas/rpc.d.cts.map +1 -0
  83. package/schemas/{rpc.d.ts → rpc.d.mts} +749 -747
  84. package/schemas/rpc.d.mts.map +1 -0
  85. package/schemas/rpc.mjs +2 -0
  86. package/schemas/rpc.mjs.map +1 -0
  87. package/schemas/schema.cjs +1 -2718
  88. package/schemas/schema.d.cts +984 -982
  89. package/schemas/schema.d.cts.map +1 -0
  90. package/schemas/schema.d.mts +1456 -0
  91. package/schemas/schema.d.mts.map +1 -0
  92. package/schemas/schema.mjs +2 -0
  93. package/schemas/schema.mjs.map +1 -0
  94. package/schemas/src-CtkguuVd.mjs +7 -0
  95. package/schemas/src-CtkguuVd.mjs.map +1 -0
  96. package/schemas/src-DqnIPdOg.cjs +6 -0
  97. package/schemas/ts.cjs +1 -7
  98. package/schemas/ts.d.cts +3 -1
  99. package/schemas/ts.d.cts.map +1 -0
  100. package/schemas/ts.d.mts +5 -0
  101. package/schemas/ts.d.mts.map +1 -0
  102. package/schemas/ts.mjs +2 -0
  103. package/schemas/ts.mjs.map +1 -0
  104. package/bin/capnpc.d.ts +0 -6
  105. package/bin/capnpc.js +0 -8273
  106. package/dist/chunk-CCU32X36.js +0 -15
  107. package/dist/chunk-GI42NGKQ.js +0 -3305
  108. package/dist/chunk-H32XGT26.js +0 -4107
  109. package/dist/chunk-JREA5Q77.js +0 -1082
  110. package/dist/chunk-KMCJ5MIQ.cjs +0 -3305
  111. package/dist/chunk-KO6NZLWH.cjs +0 -1082
  112. package/dist/chunk-LFP6TIPQ.cjs +0 -4760
  113. package/dist/chunk-NN62B5Z3.cjs +0 -4107
  114. package/dist/chunk-R2JXWA7Q.cjs +0 -15
  115. package/dist/chunk-SHUYVCID.js +0 -6
  116. package/dist/chunk-USNT2KNT.cjs +0 -6
  117. package/dist/chunk-ZIENMW4V.js +0 -4760
  118. package/dist/compile.d.ts +0 -39
  119. package/dist/compile.js +0 -11
  120. package/dist/helpers.js +0 -7
  121. package/dist/index.d.ts +0 -6
  122. package/dist/index.js +0 -134
  123. package/dist/rpc.d.ts +0 -71
  124. package/dist/rpc.js +0 -139
  125. package/dist/types.d.ts +0 -53
  126. package/dist/types.js +0 -7
  127. package/schemas/chunk-RNSYVJGA.cjs +0 -4700
  128. package/schemas/chunk-SHUYVCID.js +0 -6
  129. package/schemas/chunk-SW2MRW3B.js +0 -4700
  130. package/schemas/chunk-USNT2KNT.cjs +0 -6
  131. package/schemas/cpp.d.ts +0 -3
  132. package/schemas/cpp.js +0 -7
  133. package/schemas/persistent.js +0 -171
  134. package/schemas/rpc-twoparty.js +0 -209
  135. package/schemas/rpc.js +0 -2563
  136. package/schemas/schema.d.ts +0 -1454
  137. package/schemas/schema.js +0 -2718
  138. package/schemas/ts.d.ts +0 -3
  139. package/schemas/ts.js +0 -7
package/schemas/rpc.cjs CHANGED
@@ -1,2563 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15; var _class16; var _class17; var _class18; var _class19; var _class20;
2
-
3
-
4
-
5
-
6
-
7
-
8
- var _chunkRNSYVJGAcjs = require('./chunk-RNSYVJGA.cjs');
9
-
10
-
11
- var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
12
-
13
- // schemas/rpc.ts
14
- var _capnpFileId = BigInt("0xb312981b2552a250");
15
- var Message_Which = {
16
- /**
17
- * The sender previously received this message from the peer but didn't understand it or doesn't
18
- * yet implement the functionality that was requested. So, the sender is echoing the message
19
- * back. In some cases, the receiver may be able to recover from this by pretending the sender
20
- * had taken some appropriate "null" action.
21
- *
22
- * For example, say `resolve` is received by a level 0 implementation (because a previous call
23
- * or return happened to contain a promise). The level 0 implementation will echo it back as
24
- * `unimplemented`. The original sender can then simply release the cap to which the promise
25
- * had resolved, thus avoiding a leak.
26
- *
27
- * For any message type that introduces a question, if the message comes back unimplemented,
28
- * the original sender may simply treat it as if the question failed with an exception.
29
- *
30
- * In cases where there is no sensible way to react to an `unimplemented` message (without
31
- * resource leaks or other serious problems), the connection may need to be aborted. This is
32
- * a gray area; different implementations may take different approaches.
33
- *
34
- */
35
- UNIMPLEMENTED: 0,
36
- /**
37
- * Sent when a connection is being aborted due to an unrecoverable error. This could be e.g.
38
- * because the sender received an invalid or nonsensical message or because the sender had an
39
- * internal error. The sender will shut down the outgoing half of the connection after `abort`
40
- * and will completely close the connection shortly thereafter (it's up to the sender how much
41
- * of a time buffer they want to offer for the client to receive the `abort` before the
42
- * connection is reset).
43
- *
44
- */
45
- ABORT: 1,
46
- /**
47
- * Request the peer's bootstrap interface.
48
- *
49
- */
50
- BOOTSTRAP: 8,
51
- /**
52
- * Begin a method call.
53
- *
54
- */
55
- CALL: 2,
56
- /**
57
- * Complete a method call.
58
- *
59
- */
60
- RETURN: 3,
61
- /**
62
- * Release a returned answer / cancel a call.
63
- *
64
- */
65
- FINISH: 4,
66
- /**
67
- * Resolve a previously-sent promise.
68
- *
69
- */
70
- RESOLVE: 5,
71
- /**
72
- * Release a capability so that the remote object can be deallocated.
73
- *
74
- */
75
- RELEASE: 6,
76
- /**
77
- * Lift an embargo used to enforce E-order over promise resolution.
78
- *
79
- */
80
- DISEMBARGO: 13,
81
- /**
82
- * Obsolete request to save a capability, resulting in a SturdyRef. This has been replaced
83
- * by the `Persistent` interface defined in `persistent.capnp`. This operation was never
84
- * implemented.
85
- *
86
- */
87
- OBSOLETE_SAVE: 7,
88
- /**
89
- * Obsolete way to delete a SturdyRef. This operation was never implemented.
90
- *
91
- */
92
- OBSOLETE_DELETE: 9,
93
- /**
94
- * Provide a capability to a third party.
95
- *
96
- */
97
- PROVIDE: 10,
98
- /**
99
- * Accept a capability provided by a third party.
100
- *
101
- */
102
- ACCEPT: 11,
103
- /**
104
- * Directly connect to the common root of two or more proxied caps.
105
- *
106
- */
107
- JOIN: 12
108
- };
109
- var Message = (_class = class _Message extends _chunkRNSYVJGAcjs.Struct {
110
- static {
111
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Message");
112
- }
113
- static __initStatic() {this.UNIMPLEMENTED = Message_Which.UNIMPLEMENTED}
114
- static __initStatic2() {this.ABORT = Message_Which.ABORT}
115
- static __initStatic3() {this.BOOTSTRAP = Message_Which.BOOTSTRAP}
116
- static __initStatic4() {this.CALL = Message_Which.CALL}
117
- static __initStatic5() {this.RETURN = Message_Which.RETURN}
118
- static __initStatic6() {this.FINISH = Message_Which.FINISH}
119
- static __initStatic7() {this.RESOLVE = Message_Which.RESOLVE}
120
- static __initStatic8() {this.RELEASE = Message_Which.RELEASE}
121
- static __initStatic9() {this.DISEMBARGO = Message_Which.DISEMBARGO}
122
- static __initStatic10() {this.OBSOLETE_SAVE = Message_Which.OBSOLETE_SAVE}
123
- static __initStatic11() {this.OBSOLETE_DELETE = Message_Which.OBSOLETE_DELETE}
124
- static __initStatic12() {this.PROVIDE = Message_Which.PROVIDE}
125
- static __initStatic13() {this.ACCEPT = Message_Which.ACCEPT}
126
- static __initStatic14() {this.JOIN = Message_Which.JOIN}
127
- static __initStatic15() {this._capnp = {
128
- displayName: "Message",
129
- id: "91b79f1f808db032",
130
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1)
131
- }}
132
- _adoptUnimplemented(value) {
133
- _chunkRNSYVJGAcjs.utils.setUint16(0, 0, this);
134
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
135
- }
136
- _disownUnimplemented() {
137
- return _chunkRNSYVJGAcjs.utils.disown(this.unimplemented);
138
- }
139
- /**
140
- * The sender previously received this message from the peer but didn't understand it or doesn't
141
- * yet implement the functionality that was requested. So, the sender is echoing the message
142
- * back. In some cases, the receiver may be able to recover from this by pretending the sender
143
- * had taken some appropriate "null" action.
144
- *
145
- * For example, say `resolve` is received by a level 0 implementation (because a previous call
146
- * or return happened to contain a promise). The level 0 implementation will echo it back as
147
- * `unimplemented`. The original sender can then simply release the cap to which the promise
148
- * had resolved, thus avoiding a leak.
149
- *
150
- * For any message type that introduces a question, if the message comes back unimplemented,
151
- * the original sender may simply treat it as if the question failed with an exception.
152
- *
153
- * In cases where there is no sensible way to react to an `unimplemented` message (without
154
- * resource leaks or other serious problems), the connection may need to be aborted. This is
155
- * a gray area; different implementations may take different approaches.
156
- *
157
- */
158
- get unimplemented() {
159
- _chunkRNSYVJGAcjs.utils.testWhich("unimplemented", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 0, this);
160
- return _chunkRNSYVJGAcjs.utils.getStruct(0, _Message, this);
161
- }
162
- _hasUnimplemented() {
163
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
164
- }
165
- _initUnimplemented() {
166
- _chunkRNSYVJGAcjs.utils.setUint16(0, 0, this);
167
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, _Message, this);
168
- }
169
- get _isUnimplemented() {
170
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 0;
171
- }
172
- set unimplemented(value) {
173
- _chunkRNSYVJGAcjs.utils.setUint16(0, 0, this);
174
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
175
- }
176
- _adoptAbort(value) {
177
- _chunkRNSYVJGAcjs.utils.setUint16(0, 1, this);
178
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
179
- }
180
- _disownAbort() {
181
- return _chunkRNSYVJGAcjs.utils.disown(this.abort);
182
- }
183
- /**
184
- * Sent when a connection is being aborted due to an unrecoverable error. This could be e.g.
185
- * because the sender received an invalid or nonsensical message or because the sender had an
186
- * internal error. The sender will shut down the outgoing half of the connection after `abort`
187
- * and will completely close the connection shortly thereafter (it's up to the sender how much
188
- * of a time buffer they want to offer for the client to receive the `abort` before the
189
- * connection is reset).
190
- *
191
- */
192
- get abort() {
193
- _chunkRNSYVJGAcjs.utils.testWhich("abort", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 1, this);
194
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Exception, this);
195
- }
196
- _hasAbort() {
197
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
198
- }
199
- _initAbort() {
200
- _chunkRNSYVJGAcjs.utils.setUint16(0, 1, this);
201
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Exception, this);
202
- }
203
- get _isAbort() {
204
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 1;
205
- }
206
- set abort(value) {
207
- _chunkRNSYVJGAcjs.utils.setUint16(0, 1, this);
208
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
209
- }
210
- _adoptBootstrap(value) {
211
- _chunkRNSYVJGAcjs.utils.setUint16(0, 8, this);
212
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
213
- }
214
- _disownBootstrap() {
215
- return _chunkRNSYVJGAcjs.utils.disown(this.bootstrap);
216
- }
217
- /**
218
- * Request the peer's bootstrap interface.
219
- *
220
- */
221
- get bootstrap() {
222
- _chunkRNSYVJGAcjs.utils.testWhich("bootstrap", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 8, this);
223
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Bootstrap, this);
224
- }
225
- _hasBootstrap() {
226
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
227
- }
228
- _initBootstrap() {
229
- _chunkRNSYVJGAcjs.utils.setUint16(0, 8, this);
230
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Bootstrap, this);
231
- }
232
- get _isBootstrap() {
233
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 8;
234
- }
235
- set bootstrap(value) {
236
- _chunkRNSYVJGAcjs.utils.setUint16(0, 8, this);
237
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
238
- }
239
- _adoptCall(value) {
240
- _chunkRNSYVJGAcjs.utils.setUint16(0, 2, this);
241
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
242
- }
243
- _disownCall() {
244
- return _chunkRNSYVJGAcjs.utils.disown(this.call);
245
- }
246
- /**
247
- * Begin a method call.
248
- *
249
- */
250
- get call() {
251
- _chunkRNSYVJGAcjs.utils.testWhich("call", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 2, this);
252
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Call, this);
253
- }
254
- _hasCall() {
255
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
256
- }
257
- _initCall() {
258
- _chunkRNSYVJGAcjs.utils.setUint16(0, 2, this);
259
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Call, this);
260
- }
261
- get _isCall() {
262
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 2;
263
- }
264
- set call(value) {
265
- _chunkRNSYVJGAcjs.utils.setUint16(0, 2, this);
266
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
267
- }
268
- _adoptReturn(value) {
269
- _chunkRNSYVJGAcjs.utils.setUint16(0, 3, this);
270
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
271
- }
272
- _disownReturn() {
273
- return _chunkRNSYVJGAcjs.utils.disown(this.return);
274
- }
275
- /**
276
- * Complete a method call.
277
- *
278
- */
279
- get return() {
280
- _chunkRNSYVJGAcjs.utils.testWhich("return", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 3, this);
281
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Return, this);
282
- }
283
- _hasReturn() {
284
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
285
- }
286
- _initReturn() {
287
- _chunkRNSYVJGAcjs.utils.setUint16(0, 3, this);
288
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Return, this);
289
- }
290
- get _isReturn() {
291
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 3;
292
- }
293
- set return(value) {
294
- _chunkRNSYVJGAcjs.utils.setUint16(0, 3, this);
295
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
296
- }
297
- _adoptFinish(value) {
298
- _chunkRNSYVJGAcjs.utils.setUint16(0, 4, this);
299
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
300
- }
301
- _disownFinish() {
302
- return _chunkRNSYVJGAcjs.utils.disown(this.finish);
303
- }
304
- /**
305
- * Release a returned answer / cancel a call.
306
- *
307
- */
308
- get finish() {
309
- _chunkRNSYVJGAcjs.utils.testWhich("finish", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 4, this);
310
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Finish, this);
311
- }
312
- _hasFinish() {
313
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
314
- }
315
- _initFinish() {
316
- _chunkRNSYVJGAcjs.utils.setUint16(0, 4, this);
317
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Finish, this);
318
- }
319
- get _isFinish() {
320
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 4;
321
- }
322
- set finish(value) {
323
- _chunkRNSYVJGAcjs.utils.setUint16(0, 4, this);
324
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
325
- }
326
- _adoptResolve(value) {
327
- _chunkRNSYVJGAcjs.utils.setUint16(0, 5, this);
328
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
329
- }
330
- _disownResolve() {
331
- return _chunkRNSYVJGAcjs.utils.disown(this.resolve);
332
- }
333
- /**
334
- * Resolve a previously-sent promise.
335
- *
336
- */
337
- get resolve() {
338
- _chunkRNSYVJGAcjs.utils.testWhich("resolve", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 5, this);
339
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Resolve, this);
340
- }
341
- _hasResolve() {
342
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
343
- }
344
- _initResolve() {
345
- _chunkRNSYVJGAcjs.utils.setUint16(0, 5, this);
346
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Resolve, this);
347
- }
348
- get _isResolve() {
349
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 5;
350
- }
351
- set resolve(value) {
352
- _chunkRNSYVJGAcjs.utils.setUint16(0, 5, this);
353
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
354
- }
355
- _adoptRelease(value) {
356
- _chunkRNSYVJGAcjs.utils.setUint16(0, 6, this);
357
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
358
- }
359
- _disownRelease() {
360
- return _chunkRNSYVJGAcjs.utils.disown(this.release);
361
- }
362
- /**
363
- * Release a capability so that the remote object can be deallocated.
364
- *
365
- */
366
- get release() {
367
- _chunkRNSYVJGAcjs.utils.testWhich("release", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 6, this);
368
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Release, this);
369
- }
370
- _hasRelease() {
371
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
372
- }
373
- _initRelease() {
374
- _chunkRNSYVJGAcjs.utils.setUint16(0, 6, this);
375
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Release, this);
376
- }
377
- get _isRelease() {
378
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 6;
379
- }
380
- set release(value) {
381
- _chunkRNSYVJGAcjs.utils.setUint16(0, 6, this);
382
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
383
- }
384
- _adoptDisembargo(value) {
385
- _chunkRNSYVJGAcjs.utils.setUint16(0, 13, this);
386
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
387
- }
388
- _disownDisembargo() {
389
- return _chunkRNSYVJGAcjs.utils.disown(this.disembargo);
390
- }
391
- /**
392
- * Lift an embargo used to enforce E-order over promise resolution.
393
- *
394
- */
395
- get disembargo() {
396
- _chunkRNSYVJGAcjs.utils.testWhich("disembargo", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 13, this);
397
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Disembargo, this);
398
- }
399
- _hasDisembargo() {
400
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
401
- }
402
- _initDisembargo() {
403
- _chunkRNSYVJGAcjs.utils.setUint16(0, 13, this);
404
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Disembargo, this);
405
- }
406
- get _isDisembargo() {
407
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 13;
408
- }
409
- set disembargo(value) {
410
- _chunkRNSYVJGAcjs.utils.setUint16(0, 13, this);
411
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
412
- }
413
- _adoptObsoleteSave(value) {
414
- _chunkRNSYVJGAcjs.utils.setUint16(0, 7, this);
415
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
416
- }
417
- _disownObsoleteSave() {
418
- return _chunkRNSYVJGAcjs.utils.disown(this.obsoleteSave);
419
- }
420
- /**
421
- * Obsolete request to save a capability, resulting in a SturdyRef. This has been replaced
422
- * by the `Persistent` interface defined in `persistent.capnp`. This operation was never
423
- * implemented.
424
- *
425
- */
426
- get obsoleteSave() {
427
- _chunkRNSYVJGAcjs.utils.testWhich("obsoleteSave", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 7, this);
428
- return _chunkRNSYVJGAcjs.utils.getPointer(0, this);
429
- }
430
- _hasObsoleteSave() {
431
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
432
- }
433
- get _isObsoleteSave() {
434
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 7;
435
- }
436
- set obsoleteSave(value) {
437
- _chunkRNSYVJGAcjs.utils.setUint16(0, 7, this);
438
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
439
- }
440
- _adoptObsoleteDelete(value) {
441
- _chunkRNSYVJGAcjs.utils.setUint16(0, 9, this);
442
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
443
- }
444
- _disownObsoleteDelete() {
445
- return _chunkRNSYVJGAcjs.utils.disown(this.obsoleteDelete);
446
- }
447
- /**
448
- * Obsolete way to delete a SturdyRef. This operation was never implemented.
449
- *
450
- */
451
- get obsoleteDelete() {
452
- _chunkRNSYVJGAcjs.utils.testWhich("obsoleteDelete", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 9, this);
453
- return _chunkRNSYVJGAcjs.utils.getPointer(0, this);
454
- }
455
- _hasObsoleteDelete() {
456
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
457
- }
458
- get _isObsoleteDelete() {
459
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 9;
460
- }
461
- set obsoleteDelete(value) {
462
- _chunkRNSYVJGAcjs.utils.setUint16(0, 9, this);
463
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
464
- }
465
- _adoptProvide(value) {
466
- _chunkRNSYVJGAcjs.utils.setUint16(0, 10, this);
467
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
468
- }
469
- _disownProvide() {
470
- return _chunkRNSYVJGAcjs.utils.disown(this.provide);
471
- }
472
- /**
473
- * Provide a capability to a third party.
474
- *
475
- */
476
- get provide() {
477
- _chunkRNSYVJGAcjs.utils.testWhich("provide", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 10, this);
478
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Provide, this);
479
- }
480
- _hasProvide() {
481
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
482
- }
483
- _initProvide() {
484
- _chunkRNSYVJGAcjs.utils.setUint16(0, 10, this);
485
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Provide, this);
486
- }
487
- get _isProvide() {
488
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 10;
489
- }
490
- set provide(value) {
491
- _chunkRNSYVJGAcjs.utils.setUint16(0, 10, this);
492
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
493
- }
494
- _adoptAccept(value) {
495
- _chunkRNSYVJGAcjs.utils.setUint16(0, 11, this);
496
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
497
- }
498
- _disownAccept() {
499
- return _chunkRNSYVJGAcjs.utils.disown(this.accept);
500
- }
501
- /**
502
- * Accept a capability provided by a third party.
503
- *
504
- */
505
- get accept() {
506
- _chunkRNSYVJGAcjs.utils.testWhich("accept", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 11, this);
507
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Accept, this);
508
- }
509
- _hasAccept() {
510
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
511
- }
512
- _initAccept() {
513
- _chunkRNSYVJGAcjs.utils.setUint16(0, 11, this);
514
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Accept, this);
515
- }
516
- get _isAccept() {
517
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 11;
518
- }
519
- set accept(value) {
520
- _chunkRNSYVJGAcjs.utils.setUint16(0, 11, this);
521
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
522
- }
523
- _adoptJoin(value) {
524
- _chunkRNSYVJGAcjs.utils.setUint16(0, 12, this);
525
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
526
- }
527
- _disownJoin() {
528
- return _chunkRNSYVJGAcjs.utils.disown(this.join);
529
- }
530
- /**
531
- * Directly connect to the common root of two or more proxied caps.
532
- *
533
- */
534
- get join() {
535
- _chunkRNSYVJGAcjs.utils.testWhich("join", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 12, this);
536
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Join, this);
537
- }
538
- _hasJoin() {
539
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
540
- }
541
- _initJoin() {
542
- _chunkRNSYVJGAcjs.utils.setUint16(0, 12, this);
543
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Join, this);
544
- }
545
- get _isJoin() {
546
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 12;
547
- }
548
- set join(value) {
549
- _chunkRNSYVJGAcjs.utils.setUint16(0, 12, this);
550
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
551
- }
552
- toString() {
553
- return "Message_" + super.toString();
554
- }
555
- which() {
556
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this);
557
- }
558
- }, _class.__initStatic(), _class.__initStatic2(), _class.__initStatic3(), _class.__initStatic4(), _class.__initStatic5(), _class.__initStatic6(), _class.__initStatic7(), _class.__initStatic8(), _class.__initStatic9(), _class.__initStatic10(), _class.__initStatic11(), _class.__initStatic12(), _class.__initStatic13(), _class.__initStatic14(), _class.__initStatic15(), _class);
559
- var Bootstrap = (_class2 = class extends _chunkRNSYVJGAcjs.Struct {
560
- static {
561
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Bootstrap");
562
- }
563
- static __initStatic16() {this._capnp = {
564
- displayName: "Bootstrap",
565
- id: "e94ccf8031176ec4",
566
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1)
567
- }}
568
- /**
569
- * A new question ID identifying this request, which will eventually receive a Return message
570
- * containing the restored capability.
571
- *
572
- */
573
- get questionId() {
574
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
575
- }
576
- set questionId(value) {
577
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
578
- }
579
- _adoptDeprecatedObjectId(value) {
580
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
581
- }
582
- _disownDeprecatedObjectId() {
583
- return _chunkRNSYVJGAcjs.utils.disown(this.deprecatedObjectId);
584
- }
585
- /**
586
- * ** DEPRECATED **
587
- *
588
- * A Vat may export multiple bootstrap interfaces. In this case, `deprecatedObjectId` specifies
589
- * which one to return. If this pointer is null, then the default bootstrap interface is returned.
590
- *
591
- * As of version 0.5, use of this field is deprecated. If a service wants to export multiple
592
- * bootstrap interfaces, it should instead define a single bootstrap interface that has methods
593
- * that return each of the other interfaces.
594
- *
595
- * **History**
596
- *
597
- * In the first version of Cap'n Proto RPC (0.4.x) the `Bootstrap` message was called `Restore`.
598
- * At the time, it was thought that this would eventually serve as the way to restore SturdyRefs
599
- * (level 2). Meanwhile, an application could offer its "main" interface on a well-known
600
- * (non-secret) SturdyRef.
601
- *
602
- * Since level 2 RPC was not implemented at the time, the `Restore` message was in practice only
603
- * used to obtain the main interface. Since most applications had only one main interface that
604
- * they wanted to restore, they tended to designate this with a null `objectId`.
605
- *
606
- * Unfortunately, the earliest version of the EZ RPC interfaces set a precedent of exporting
607
- * multiple main interfaces by allowing them to be exported under string names. In this case,
608
- * `objectId` was a Text value specifying the name.
609
- *
610
- * All of this proved problematic for several reasons:
611
- *
612
- * - The arrangement assumed that a client wishing to restore a SturdyRef would know exactly what
613
- * machine to connect to and would be able to immediately restore a SturdyRef on connection.
614
- * However, in practice, the ability to restore SturdyRefs is itself a capability that may
615
- * require going through an authentication process to obtain. Thus, it makes more sense to
616
- * define a "restorer service" as a full Cap'n Proto interface. If this restorer interface is
617
- * offered as the vat's bootstrap interface, then this is equivalent to the old arrangement.
618
- *
619
- * - Overloading "Restore" for the purpose of obtaining well-known capabilities encouraged the
620
- * practice of exporting singleton services with string names. If singleton services are desired,
621
- * it is better to have one main interface that has methods that can be used to obtain each
622
- * service, in order to get all the usual benefits of schemas and type checking.
623
- *
624
- * - Overloading "Restore" also had a security problem: Often, "main" or "well-known"
625
- * capabilities exported by a vat are in fact not public: they are intended to be accessed only
626
- * by clients who are capable of forming a connection to the vat. This can lead to trouble if
627
- * the client itself has other clients and wishes to forward some `Restore` requests from those
628
- * external clients -- it has to be very careful not to allow through `Restore` requests
629
- * addressing the default capability.
630
- *
631
- * For example, consider the case of a sandboxed Sandstorm application and its supervisor. The
632
- * application exports a default capability to its supervisor that provides access to
633
- * functionality that only the supervisor is supposed to access. Meanwhile, though, applications
634
- * may publish other capabilities that may be persistent, in which case the application needs
635
- * to field `Restore` requests that could come from anywhere. These requests of course have to
636
- * pass through the supervisor, as all communications with the outside world must. But, the
637
- * supervisor has to be careful not to honor an external request addressing the application's
638
- * default capability, since this capability is privileged. Unfortunately, the default
639
- * capability cannot be given an unguessable name, because then the supervisor itself would not
640
- * be able to address it!
641
- *
642
- * As of Cap'n Proto 0.5, `Restore` has been renamed to `Bootstrap` and is no longer planned for
643
- * use in restoring SturdyRefs.
644
- *
645
- * Note that 0.4 also defined a message type called `Delete` that, like `Restore`, addressed a
646
- * SturdyRef, but indicated that the client would not restore the ref again in the future. This
647
- * operation was never implemented, so it was removed entirely. If a "delete" operation is desired,
648
- * it should exist as a method on the same interface that handles restoring SturdyRefs. However,
649
- * the utility of such an operation is questionable. You wouldn't be able to rely on it for
650
- * garbage collection since a client could always disappear permanently without remembering to
651
- * delete all its SturdyRefs, thus leaving them dangling forever. Therefore, it is advisable to
652
- * design systems such that SturdyRefs never represent "owned" pointers.
653
- *
654
- * For example, say a SturdyRef points to an image file hosted on some server. That image file
655
- * should also live inside a collection (a gallery, perhaps) hosted on the same server, owned by
656
- * a user who can delete the image at any time. If the user deletes the image, the SturdyRef
657
- * stops working. On the other hand, if the SturdyRef is discarded, this has no effect on the
658
- * existence of the image in its collection.
659
- *
660
- */
661
- get deprecatedObjectId() {
662
- return _chunkRNSYVJGAcjs.utils.getPointer(0, this);
663
- }
664
- _hasDeprecatedObjectId() {
665
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
666
- }
667
- set deprecatedObjectId(value) {
668
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
669
- }
670
- toString() {
671
- return "Bootstrap_" + super.toString();
672
- }
673
- }, _class2.__initStatic16(), _class2);
674
- var Call_SendResultsTo_Which = {
675
- /**
676
- * Send the return message back to the caller (the usual).
677
- *
678
- */
679
- CALLER: 0,
680
- /**
681
- * **(level 1)**
682
- *
683
- * Don't actually return the results to the sender. Instead, hold on to them and await
684
- * instructions from the sender regarding what to do with them. In particular, the sender
685
- * may subsequently send a `Return` for some other call (which the receiver had previously made
686
- * to the sender) with `takeFromOtherQuestion` set. The results from this call are then used
687
- * as the results of the other call.
688
- *
689
- * When `yourself` is used, the receiver must still send a `Return` for the call, but sets the
690
- * field `resultsSentElsewhere` in that `Return` rather than including the results.
691
- *
692
- * This feature can be used to implement tail calls in which a call from Vat A to Vat B ends up
693
- * returning the result of a call from Vat B back to Vat A.
694
- *
695
- * In particular, the most common use case for this feature is when Vat A makes a call to a
696
- * promise in Vat B, and then that promise ends up resolving to a capability back in Vat A.
697
- * Vat B must forward all the queued calls on that promise back to Vat A, but can set `yourself`
698
- * in the calls so that the results need not pass back through Vat B.
699
- *
700
- * For example:
701
- * - Alice, in Vat A, calls foo() on Bob in Vat B.
702
- * - Alice makes a pipelined call bar() on the promise returned by foo().
703
- * - Later on, Bob resolves the promise from foo() to point at Carol, who lives in Vat A (next
704
- * to Alice).
705
- * - Vat B dutifully forwards the bar() call to Carol. Let us call this forwarded call bar'().
706
- * Notice that bar() and bar'() are travelling in opposite directions on the same network
707
- * link.
708
- * - The `Call` for bar'() has `sendResultsTo` set to `yourself`.
709
- * - Vat B sends a `Return` for bar() with `takeFromOtherQuestion` set in place of the results,
710
- * with the value set to the question ID of bar'(). Vat B does not wait for bar'() to return,
711
- * as doing so would introduce unnecessary round trip latency.
712
- * - Vat A receives bar'() and delivers it to Carol.
713
- * - When bar'() returns, Vat A sends a `Return` for bar'() to Vat B, with `resultsSentElsewhere`
714
- * set in place of results.
715
- * - Vat A sends a `Finish` for the bar() call to Vat B.
716
- * - Vat B receives the `Finish` for bar() and sends a `Finish` for bar'().
717
- *
718
- */
719
- YOURSELF: 1,
720
- /**
721
- * **(level 3)**
722
- *
723
- * The call's result should be returned to a different vat. The receiver (the callee) expects
724
- * to receive an `Accept` message from the indicated vat, and should return the call's result
725
- * to it, rather than to the sender of the `Call`.
726
- *
727
- * This operates much like `yourself`, above, except that Carol is in a separate Vat C. `Call`
728
- * messages are sent from Vat A -> Vat B and Vat B -> Vat C. A `Return` message is sent from
729
- * Vat B -> Vat A that contains `acceptFromThirdParty` in place of results. When Vat A sends
730
- * an `Accept` to Vat C, it receives back a `Return` containing the call's actual result. Vat C
731
- * also sends a `Return` to Vat B with `resultsSentElsewhere`.
732
- *
733
- */
734
- THIRD_PARTY: 2
735
- };
736
- var Call_SendResultsTo = (_class3 = class extends _chunkRNSYVJGAcjs.Struct {
737
- static {
738
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Call_SendResultsTo");
739
- }
740
- static __initStatic17() {this.CALLER = Call_SendResultsTo_Which.CALLER}
741
- static __initStatic18() {this.YOURSELF = Call_SendResultsTo_Which.YOURSELF}
742
- static __initStatic19() {this.THIRD_PARTY = Call_SendResultsTo_Which.THIRD_PARTY}
743
- static __initStatic20() {this._capnp = {
744
- displayName: "sendResultsTo",
745
- id: "dae8b0f61aab5f99",
746
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(24, 3)
747
- }}
748
- get _isCaller() {
749
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this) === 0;
750
- }
751
- set caller(_) {
752
- _chunkRNSYVJGAcjs.utils.setUint16(6, 0, this);
753
- }
754
- get _isYourself() {
755
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this) === 1;
756
- }
757
- set yourself(_) {
758
- _chunkRNSYVJGAcjs.utils.setUint16(6, 1, this);
759
- }
760
- _adoptThirdParty(value) {
761
- _chunkRNSYVJGAcjs.utils.setUint16(6, 2, this);
762
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(2, this));
763
- }
764
- _disownThirdParty() {
765
- return _chunkRNSYVJGAcjs.utils.disown(this.thirdParty);
766
- }
767
- /**
768
- * **(level 3)**
769
- *
770
- * The call's result should be returned to a different vat. The receiver (the callee) expects
771
- * to receive an `Accept` message from the indicated vat, and should return the call's result
772
- * to it, rather than to the sender of the `Call`.
773
- *
774
- * This operates much like `yourself`, above, except that Carol is in a separate Vat C. `Call`
775
- * messages are sent from Vat A -> Vat B and Vat B -> Vat C. A `Return` message is sent from
776
- * Vat B -> Vat A that contains `acceptFromThirdParty` in place of results. When Vat A sends
777
- * an `Accept` to Vat C, it receives back a `Return` containing the call's actual result. Vat C
778
- * also sends a `Return` to Vat B with `resultsSentElsewhere`.
779
- *
780
- */
781
- get thirdParty() {
782
- _chunkRNSYVJGAcjs.utils.testWhich("thirdParty", _chunkRNSYVJGAcjs.utils.getUint16(6, this), 2, this);
783
- return _chunkRNSYVJGAcjs.utils.getPointer(2, this);
784
- }
785
- _hasThirdParty() {
786
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(2, this));
787
- }
788
- get _isThirdParty() {
789
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this) === 2;
790
- }
791
- set thirdParty(value) {
792
- _chunkRNSYVJGAcjs.utils.setUint16(6, 2, this);
793
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(2, this));
794
- }
795
- toString() {
796
- return "Call_SendResultsTo_" + super.toString();
797
- }
798
- which() {
799
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this);
800
- }
801
- }, _class3.__initStatic17(), _class3.__initStatic18(), _class3.__initStatic19(), _class3.__initStatic20(), _class3);
802
- var Call = (_class4 = class _Call extends _chunkRNSYVJGAcjs.Struct {
803
- static {
804
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Call");
805
- }
806
- static __initStatic21() {this._capnp = {
807
- displayName: "Call",
808
- id: "836a53ce789d4cd4",
809
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(24, 3),
810
- defaultAllowThirdPartyTailCall: _chunkRNSYVJGAcjs.getBitMask.call(void 0, false, 0),
811
- defaultNoPromisePipelining: _chunkRNSYVJGAcjs.getBitMask.call(void 0, false, 1),
812
- defaultOnlyPromisePipeline: _chunkRNSYVJGAcjs.getBitMask.call(void 0, false, 2)
813
- }}
814
- /**
815
- * A number, chosen by the caller, that identifies this call in future messages. This number
816
- * must be different from all other calls originating from the same end of the connection (but
817
- * may overlap with question IDs originating from the opposite end). A fine strategy is to use
818
- * sequential question IDs, but the recipient should not assume this.
819
- *
820
- * A question ID can be reused once both:
821
- * - A matching Return has been received from the callee.
822
- * - A matching Finish has been sent from the caller.
823
- *
824
- */
825
- get questionId() {
826
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
827
- }
828
- set questionId(value) {
829
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
830
- }
831
- _adoptTarget(value) {
832
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
833
- }
834
- _disownTarget() {
835
- return _chunkRNSYVJGAcjs.utils.disown(this.target);
836
- }
837
- /**
838
- * The object that should receive this call.
839
- *
840
- */
841
- get target() {
842
- return _chunkRNSYVJGAcjs.utils.getStruct(0, MessageTarget, this);
843
- }
844
- _hasTarget() {
845
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
846
- }
847
- _initTarget() {
848
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, MessageTarget, this);
849
- }
850
- set target(value) {
851
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
852
- }
853
- /**
854
- * The type ID of the interface being called. Each capability may implement multiple interfaces.
855
- *
856
- */
857
- get interfaceId() {
858
- return _chunkRNSYVJGAcjs.utils.getUint64(8, this);
859
- }
860
- set interfaceId(value) {
861
- _chunkRNSYVJGAcjs.utils.setUint64(8, value, this);
862
- }
863
- /**
864
- * The ordinal number of the method to call within the requested interface.
865
- *
866
- */
867
- get methodId() {
868
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this);
869
- }
870
- set methodId(value) {
871
- _chunkRNSYVJGAcjs.utils.setUint16(4, value, this);
872
- }
873
- /**
874
- * Indicates whether or not the receiver is allowed to send a `Return` containing
875
- * `acceptFromThirdParty`. Level 3 implementations should set this true. Otherwise, the callee
876
- * will have to proxy the return in the case of a tail call to a third-party vat.
877
- *
878
- */
879
- get allowThirdPartyTailCall() {
880
- return _chunkRNSYVJGAcjs.utils.getBit(128, this, _Call._capnp.defaultAllowThirdPartyTailCall);
881
- }
882
- set allowThirdPartyTailCall(value) {
883
- _chunkRNSYVJGAcjs.utils.setBit(128, value, this, _Call._capnp.defaultAllowThirdPartyTailCall);
884
- }
885
- /**
886
- * If true, the sender promises that it won't make any promise-pipelined calls on the results of
887
- * this call. If it breaks this promise, the receiver may throw an arbitrary error from such
888
- * calls.
889
- *
890
- * The receiver may use this as an optimization, by skipping the bookkeeping needed for pipelining
891
- * when no pipelined calls are expected. The sender typically sets this to false when the method's
892
- * schema does not specify any return capabilities.
893
- *
894
- */
895
- get noPromisePipelining() {
896
- return _chunkRNSYVJGAcjs.utils.getBit(129, this, _Call._capnp.defaultNoPromisePipelining);
897
- }
898
- set noPromisePipelining(value) {
899
- _chunkRNSYVJGAcjs.utils.setBit(129, value, this, _Call._capnp.defaultNoPromisePipelining);
900
- }
901
- /**
902
- * If true, the sender only plans to use this call to make pipelined calls. The receiver need not
903
- * send a `Return` message (but is still allowed to do so).
904
- *
905
- * Since the sender does not know whether a `Return` will be sent, it must release all state
906
- * related to the call when it sends `Finish`. However, in the case that the callee does not
907
- * recognize this hint and chooses to send a `Return`, then technically the caller is not allowed
908
- * to reuse the question ID until it receives said `Return`. This creates a conundrum: How does
909
- * the caller decide when it's OK to reuse the ID? To sidestep the problem, the C++ implementation
910
- * uses high-numbered IDs (with the high-order bit set) for such calls, and cycles through the
911
- * IDs in order. If all 2^31 IDs in this space are used without ever seeing a `Return`, then the
912
- * implementation assumes that the other end is in fact honoring the hint, and the ID counter is
913
- * allowed to loop around. If a `Return` is ever seen when `onlyPromisePipeline` was set, then
914
- * the implementation stops using this hint.
915
- *
916
- */
917
- get onlyPromisePipeline() {
918
- return _chunkRNSYVJGAcjs.utils.getBit(130, this, _Call._capnp.defaultOnlyPromisePipeline);
919
- }
920
- set onlyPromisePipeline(value) {
921
- _chunkRNSYVJGAcjs.utils.setBit(130, value, this, _Call._capnp.defaultOnlyPromisePipeline);
922
- }
923
- _adoptParams(value) {
924
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(1, this));
925
- }
926
- _disownParams() {
927
- return _chunkRNSYVJGAcjs.utils.disown(this.params);
928
- }
929
- /**
930
- * The call parameters. `params.content` is a struct whose fields correspond to the parameters of
931
- * the method.
932
- *
933
- */
934
- get params() {
935
- return _chunkRNSYVJGAcjs.utils.getStruct(1, Payload, this);
936
- }
937
- _hasParams() {
938
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(1, this));
939
- }
940
- _initParams() {
941
- return _chunkRNSYVJGAcjs.utils.initStructAt(1, Payload, this);
942
- }
943
- set params(value) {
944
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(1, this));
945
- }
946
- /**
947
- * Where should the return message be sent?
948
- *
949
- */
950
- get sendResultsTo() {
951
- return _chunkRNSYVJGAcjs.utils.getAs(Call_SendResultsTo, this);
952
- }
953
- _initSendResultsTo() {
954
- return _chunkRNSYVJGAcjs.utils.getAs(Call_SendResultsTo, this);
955
- }
956
- toString() {
957
- return "Call_" + super.toString();
958
- }
959
- }, _class4.__initStatic21(), _class4);
960
- var Return_Which = {
961
- /**
962
- * Equal to the QuestionId of the corresponding `Call` message.
963
- *
964
- */
965
- RESULTS: 0,
966
- /**
967
- * If true, all capabilities that were in the params should be considered released. The sender
968
- * must not send separate `Release` messages for them. Level 0 implementations in particular
969
- * should always set this true. This defaults true because if level 0 implementations forget to
970
- * set it they'll never notice (just silently leak caps), but if level >=1 implementations forget
971
- * to set it to false they'll quickly get errors.
972
- *
973
- * The receiver should act as if the sender had sent a release message with count=1 for each
974
- * CapDescriptor in the original Call message.
975
- *
976
- */
977
- EXCEPTION: 1,
978
- /**
979
- * The result.
980
- *
981
- * For regular method calls, `results.content` points to the result struct.
982
- *
983
- * For a `Return` in response to an `Accept` or `Bootstrap`, `results` contains a single
984
- * capability (rather than a struct), and `results.content` is just a capability pointer with
985
- * index 0. A `Finish` is still required in this case.
986
- *
987
- */
988
- CANCELED: 2,
989
- /**
990
- * Indicates that the call failed and explains why.
991
- *
992
- */
993
- RESULTS_SENT_ELSEWHERE: 3,
994
- /**
995
- * Indicates that the call was canceled due to the caller sending a Finish message
996
- * before the call had completed.
997
- *
998
- */
999
- TAKE_FROM_OTHER_QUESTION: 4,
1000
- /**
1001
- * This is set when returning from a `Call` that had `sendResultsTo` set to something other
1002
- * than `caller`.
1003
- *
1004
- * It doesn't matter too much when this is sent, as the receiver doesn't need to do anything
1005
- * with it, but the C++ implementation appears to wait for the call to finish before sending
1006
- * this.
1007
- *
1008
- */
1009
- ACCEPT_FROM_THIRD_PARTY: 5
1010
- };
1011
- var Return = (_class5 = class _Return extends _chunkRNSYVJGAcjs.Struct {
1012
- static {
1013
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Return");
1014
- }
1015
- static __initStatic22() {this.RESULTS = Return_Which.RESULTS}
1016
- static __initStatic23() {this.EXCEPTION = Return_Which.EXCEPTION}
1017
- static __initStatic24() {this.CANCELED = Return_Which.CANCELED}
1018
- static __initStatic25() {this.RESULTS_SENT_ELSEWHERE = Return_Which.RESULTS_SENT_ELSEWHERE}
1019
- static __initStatic26() {this.TAKE_FROM_OTHER_QUESTION = Return_Which.TAKE_FROM_OTHER_QUESTION}
1020
- static __initStatic27() {this.ACCEPT_FROM_THIRD_PARTY = Return_Which.ACCEPT_FROM_THIRD_PARTY}
1021
- static __initStatic28() {this._capnp = {
1022
- displayName: "Return",
1023
- id: "9e19b28d3db3573a",
1024
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(16, 1),
1025
- defaultReleaseParamCaps: _chunkRNSYVJGAcjs.getBitMask.call(void 0, true, 0),
1026
- defaultNoFinishNeeded: _chunkRNSYVJGAcjs.getBitMask.call(void 0, false, 1)
1027
- }}
1028
- /**
1029
- * Equal to the QuestionId of the corresponding `Call` message.
1030
- *
1031
- */
1032
- get answerId() {
1033
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1034
- }
1035
- set answerId(value) {
1036
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1037
- }
1038
- /**
1039
- * If true, all capabilities that were in the params should be considered released. The sender
1040
- * must not send separate `Release` messages for them. Level 0 implementations in particular
1041
- * should always set this true. This defaults true because if level 0 implementations forget to
1042
- * set it they'll never notice (just silently leak caps), but if level >=1 implementations forget
1043
- * to set it to false they'll quickly get errors.
1044
- *
1045
- * The receiver should act as if the sender had sent a release message with count=1 for each
1046
- * CapDescriptor in the original Call message.
1047
- *
1048
- */
1049
- get releaseParamCaps() {
1050
- return _chunkRNSYVJGAcjs.utils.getBit(32, this, _Return._capnp.defaultReleaseParamCaps);
1051
- }
1052
- set releaseParamCaps(value) {
1053
- _chunkRNSYVJGAcjs.utils.setBit(32, value, this, _Return._capnp.defaultReleaseParamCaps);
1054
- }
1055
- /**
1056
- * If true, the sender does not need the receiver to send a `Finish` message; its answer table
1057
- * entry has already been cleaned up. This implies that the results do not contain any
1058
- * capabilities, since the `Finish` message would normally release those capabilities from
1059
- * promise pipelining responsibility. The caller may still send a `Finish` message if it wants,
1060
- * which will be silently ignored by the callee.
1061
- *
1062
- */
1063
- get noFinishNeeded() {
1064
- return _chunkRNSYVJGAcjs.utils.getBit(33, this, _Return._capnp.defaultNoFinishNeeded);
1065
- }
1066
- set noFinishNeeded(value) {
1067
- _chunkRNSYVJGAcjs.utils.setBit(33, value, this, _Return._capnp.defaultNoFinishNeeded);
1068
- }
1069
- _adoptResults(value) {
1070
- _chunkRNSYVJGAcjs.utils.setUint16(6, 0, this);
1071
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1072
- }
1073
- _disownResults() {
1074
- return _chunkRNSYVJGAcjs.utils.disown(this.results);
1075
- }
1076
- /**
1077
- * The result.
1078
- *
1079
- * For regular method calls, `results.content` points to the result struct.
1080
- *
1081
- * For a `Return` in response to an `Accept` or `Bootstrap`, `results` contains a single
1082
- * capability (rather than a struct), and `results.content` is just a capability pointer with
1083
- * index 0. A `Finish` is still required in this case.
1084
- *
1085
- */
1086
- get results() {
1087
- _chunkRNSYVJGAcjs.utils.testWhich("results", _chunkRNSYVJGAcjs.utils.getUint16(6, this), 0, this);
1088
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Payload, this);
1089
- }
1090
- _hasResults() {
1091
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1092
- }
1093
- _initResults() {
1094
- _chunkRNSYVJGAcjs.utils.setUint16(6, 0, this);
1095
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Payload, this);
1096
- }
1097
- get _isResults() {
1098
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this) === 0;
1099
- }
1100
- set results(value) {
1101
- _chunkRNSYVJGAcjs.utils.setUint16(6, 0, this);
1102
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1103
- }
1104
- _adoptException(value) {
1105
- _chunkRNSYVJGAcjs.utils.setUint16(6, 1, this);
1106
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1107
- }
1108
- _disownException() {
1109
- return _chunkRNSYVJGAcjs.utils.disown(this.exception);
1110
- }
1111
- /**
1112
- * Indicates that the call failed and explains why.
1113
- *
1114
- */
1115
- get exception() {
1116
- _chunkRNSYVJGAcjs.utils.testWhich("exception", _chunkRNSYVJGAcjs.utils.getUint16(6, this), 1, this);
1117
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Exception, this);
1118
- }
1119
- _hasException() {
1120
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1121
- }
1122
- _initException() {
1123
- _chunkRNSYVJGAcjs.utils.setUint16(6, 1, this);
1124
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Exception, this);
1125
- }
1126
- get _isException() {
1127
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this) === 1;
1128
- }
1129
- set exception(value) {
1130
- _chunkRNSYVJGAcjs.utils.setUint16(6, 1, this);
1131
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1132
- }
1133
- get _isCanceled() {
1134
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this) === 2;
1135
- }
1136
- set canceled(_) {
1137
- _chunkRNSYVJGAcjs.utils.setUint16(6, 2, this);
1138
- }
1139
- get _isResultsSentElsewhere() {
1140
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this) === 3;
1141
- }
1142
- set resultsSentElsewhere(_) {
1143
- _chunkRNSYVJGAcjs.utils.setUint16(6, 3, this);
1144
- }
1145
- /**
1146
- * The sender has also sent (before this message) a `Call` with the given question ID and with
1147
- * `sendResultsTo.yourself` set, and the results of that other call should be used as the
1148
- * results here. `takeFromOtherQuestion` can only used once per question.
1149
- *
1150
- */
1151
- get takeFromOtherQuestion() {
1152
- _chunkRNSYVJGAcjs.utils.testWhich("takeFromOtherQuestion", _chunkRNSYVJGAcjs.utils.getUint16(6, this), 4, this);
1153
- return _chunkRNSYVJGAcjs.utils.getUint32(8, this);
1154
- }
1155
- get _isTakeFromOtherQuestion() {
1156
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this) === 4;
1157
- }
1158
- set takeFromOtherQuestion(value) {
1159
- _chunkRNSYVJGAcjs.utils.setUint16(6, 4, this);
1160
- _chunkRNSYVJGAcjs.utils.setUint32(8, value, this);
1161
- }
1162
- _adoptAcceptFromThirdParty(value) {
1163
- _chunkRNSYVJGAcjs.utils.setUint16(6, 5, this);
1164
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1165
- }
1166
- _disownAcceptFromThirdParty() {
1167
- return _chunkRNSYVJGAcjs.utils.disown(this.acceptFromThirdParty);
1168
- }
1169
- /**
1170
- * **(level 3)**
1171
- *
1172
- * The caller should contact a third-party vat to pick up the results. An `Accept` message
1173
- * sent to the vat will return the result. This pairs with `Call.sendResultsTo.thirdParty`.
1174
- * It should only be used if the corresponding `Call` had `allowThirdPartyTailCall` set.
1175
- *
1176
- */
1177
- get acceptFromThirdParty() {
1178
- _chunkRNSYVJGAcjs.utils.testWhich("acceptFromThirdParty", _chunkRNSYVJGAcjs.utils.getUint16(6, this), 5, this);
1179
- return _chunkRNSYVJGAcjs.utils.getPointer(0, this);
1180
- }
1181
- _hasAcceptFromThirdParty() {
1182
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1183
- }
1184
- get _isAcceptFromThirdParty() {
1185
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this) === 5;
1186
- }
1187
- set acceptFromThirdParty(value) {
1188
- _chunkRNSYVJGAcjs.utils.setUint16(6, 5, this);
1189
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1190
- }
1191
- toString() {
1192
- return "Return_" + super.toString();
1193
- }
1194
- which() {
1195
- return _chunkRNSYVJGAcjs.utils.getUint16(6, this);
1196
- }
1197
- }, _class5.__initStatic22(), _class5.__initStatic23(), _class5.__initStatic24(), _class5.__initStatic25(), _class5.__initStatic26(), _class5.__initStatic27(), _class5.__initStatic28(), _class5);
1198
- var Finish = (_class6 = class _Finish extends _chunkRNSYVJGAcjs.Struct {
1199
- static {
1200
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Finish");
1201
- }
1202
- static __initStatic29() {this._capnp = {
1203
- displayName: "Finish",
1204
- id: "d37d2eb2c2f80e63",
1205
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 0),
1206
- defaultReleaseResultCaps: _chunkRNSYVJGAcjs.getBitMask.call(void 0, true, 0),
1207
- defaultRequireEarlyCancellationWorkaround: _chunkRNSYVJGAcjs.getBitMask.call(void 0, true, 1)
1208
- }}
1209
- /**
1210
- * ID of the call whose result is to be released.
1211
- *
1212
- */
1213
- get questionId() {
1214
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1215
- }
1216
- set questionId(value) {
1217
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1218
- }
1219
- /**
1220
- * If true, all capabilities that were in the results should be considered released. The sender
1221
- * must not send separate `Release` messages for them. Level 0 implementations in particular
1222
- * should always set this true. This defaults true because if level 0 implementations forget to
1223
- * set it they'll never notice (just silently leak caps), but if level >=1 implementations forget
1224
- * set it false they'll quickly get errors.
1225
- *
1226
- */
1227
- get releaseResultCaps() {
1228
- return _chunkRNSYVJGAcjs.utils.getBit(32, this, _Finish._capnp.defaultReleaseResultCaps);
1229
- }
1230
- set releaseResultCaps(value) {
1231
- _chunkRNSYVJGAcjs.utils.setBit(32, value, this, _Finish._capnp.defaultReleaseResultCaps);
1232
- }
1233
- /**
1234
- * If true, if the RPC system receives this Finish message before the original call has even been
1235
- * delivered, it should defer cancellation util after delivery. In particular, this gives the
1236
- * destination object a chance to opt out of cancellation, e.g. as controlled by the
1237
- * `allowCancellation` annotation defined in `c++.capnp`.
1238
- *
1239
- * This is a work-around. Versions 1.0 and up of Cap'n Proto always set this to false. However,
1240
- * older versions of Cap'n Proto unintentionally exhibited this errant behavior by default, and
1241
- * as a result programs built with older versions could be inadvertently relying on their peers
1242
- * to implement the behavior. The purpose of this flag is to let newer versions know when the
1243
- * peer is an older version, so that it can attempt to work around the issue.
1244
- *
1245
- * See also comments in handleFinish() in rpc.c++ for more details.
1246
- *
1247
- */
1248
- get requireEarlyCancellationWorkaround() {
1249
- return _chunkRNSYVJGAcjs.utils.getBit(33, this, _Finish._capnp.defaultRequireEarlyCancellationWorkaround);
1250
- }
1251
- set requireEarlyCancellationWorkaround(value) {
1252
- _chunkRNSYVJGAcjs.utils.setBit(33, value, this, _Finish._capnp.defaultRequireEarlyCancellationWorkaround);
1253
- }
1254
- toString() {
1255
- return "Finish_" + super.toString();
1256
- }
1257
- }, _class6.__initStatic29(), _class6);
1258
- var Resolve_Which = {
1259
- /**
1260
- * The ID of the promise to be resolved.
1261
- *
1262
- * Unlike all other instances of `ExportId` sent from the exporter, the `Resolve` message does
1263
- * _not_ increase the reference count of `promiseId`. In fact, it is expected that the receiver
1264
- * will release the export soon after receiving `Resolve`, and the sender will not send this
1265
- * `ExportId` again until it has been released and recycled.
1266
- *
1267
- * When an export ID sent over the wire (e.g. in a `CapDescriptor`) is indicated to be a promise,
1268
- * this indicates that the sender will follow up at some point with a `Resolve` message. If the
1269
- * same `promiseId` is sent again before `Resolve`, still only one `Resolve` is sent. If the
1270
- * same ID is sent again later _after_ a `Resolve`, it can only be because the export's
1271
- * reference count hit zero in the meantime and the ID was re-assigned to a new export, therefore
1272
- * this later promise does _not_ correspond to the earlier `Resolve`.
1273
- *
1274
- * If a promise ID's reference count reaches zero before a `Resolve` is sent, the `Resolve`
1275
- * message may or may not still be sent (the `Resolve` may have already been in-flight when
1276
- * `Release` was sent, but if the `Release` is received before `Resolve` then there is no longer
1277
- * any reason to send a `Resolve`). Thus a `Resolve` may be received for a promise of which
1278
- * the receiver has no knowledge, because it already released it earlier. In this case, the
1279
- * receiver should simply release the capability to which the promise resolved.
1280
- *
1281
- */
1282
- CAP: 0,
1283
- /**
1284
- * The object to which the promise resolved.
1285
- *
1286
- * The sender promises that from this point forth, until `promiseId` is released, it shall
1287
- * simply forward all messages to the capability designated by `cap`. This is true even if
1288
- * `cap` itself happens to designate another promise, and that other promise later resolves --
1289
- * messages sent to `promiseId` shall still go to that other promise, not to its resolution.
1290
- * This is important in the case that the receiver of the `Resolve` ends up sending a
1291
- * `Disembargo` message towards `promiseId` in order to control message ordering -- that
1292
- * `Disembargo` really needs to reflect back to exactly the object designated by `cap` even
1293
- * if that object is itself a promise.
1294
- *
1295
- */
1296
- EXCEPTION: 1
1297
- };
1298
- var Resolve = (_class7 = class extends _chunkRNSYVJGAcjs.Struct {
1299
- static {
1300
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Resolve");
1301
- }
1302
- static __initStatic30() {this.CAP = Resolve_Which.CAP}
1303
- static __initStatic31() {this.EXCEPTION = Resolve_Which.EXCEPTION}
1304
- static __initStatic32() {this._capnp = {
1305
- displayName: "Resolve",
1306
- id: "bbc29655fa89086e",
1307
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1)
1308
- }}
1309
- /**
1310
- * The ID of the promise to be resolved.
1311
- *
1312
- * Unlike all other instances of `ExportId` sent from the exporter, the `Resolve` message does
1313
- * _not_ increase the reference count of `promiseId`. In fact, it is expected that the receiver
1314
- * will release the export soon after receiving `Resolve`, and the sender will not send this
1315
- * `ExportId` again until it has been released and recycled.
1316
- *
1317
- * When an export ID sent over the wire (e.g. in a `CapDescriptor`) is indicated to be a promise,
1318
- * this indicates that the sender will follow up at some point with a `Resolve` message. If the
1319
- * same `promiseId` is sent again before `Resolve`, still only one `Resolve` is sent. If the
1320
- * same ID is sent again later _after_ a `Resolve`, it can only be because the export's
1321
- * reference count hit zero in the meantime and the ID was re-assigned to a new export, therefore
1322
- * this later promise does _not_ correspond to the earlier `Resolve`.
1323
- *
1324
- * If a promise ID's reference count reaches zero before a `Resolve` is sent, the `Resolve`
1325
- * message may or may not still be sent (the `Resolve` may have already been in-flight when
1326
- * `Release` was sent, but if the `Release` is received before `Resolve` then there is no longer
1327
- * any reason to send a `Resolve`). Thus a `Resolve` may be received for a promise of which
1328
- * the receiver has no knowledge, because it already released it earlier. In this case, the
1329
- * receiver should simply release the capability to which the promise resolved.
1330
- *
1331
- */
1332
- get promiseId() {
1333
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1334
- }
1335
- set promiseId(value) {
1336
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1337
- }
1338
- _adoptCap(value) {
1339
- _chunkRNSYVJGAcjs.utils.setUint16(4, 0, this);
1340
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1341
- }
1342
- _disownCap() {
1343
- return _chunkRNSYVJGAcjs.utils.disown(this.cap);
1344
- }
1345
- /**
1346
- * The object to which the promise resolved.
1347
- *
1348
- * The sender promises that from this point forth, until `promiseId` is released, it shall
1349
- * simply forward all messages to the capability designated by `cap`. This is true even if
1350
- * `cap` itself happens to designate another promise, and that other promise later resolves --
1351
- * messages sent to `promiseId` shall still go to that other promise, not to its resolution.
1352
- * This is important in the case that the receiver of the `Resolve` ends up sending a
1353
- * `Disembargo` message towards `promiseId` in order to control message ordering -- that
1354
- * `Disembargo` really needs to reflect back to exactly the object designated by `cap` even
1355
- * if that object is itself a promise.
1356
- *
1357
- */
1358
- get cap() {
1359
- _chunkRNSYVJGAcjs.utils.testWhich("cap", _chunkRNSYVJGAcjs.utils.getUint16(4, this), 0, this);
1360
- return _chunkRNSYVJGAcjs.utils.getStruct(0, CapDescriptor, this);
1361
- }
1362
- _hasCap() {
1363
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1364
- }
1365
- _initCap() {
1366
- _chunkRNSYVJGAcjs.utils.setUint16(4, 0, this);
1367
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, CapDescriptor, this);
1368
- }
1369
- get _isCap() {
1370
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this) === 0;
1371
- }
1372
- set cap(value) {
1373
- _chunkRNSYVJGAcjs.utils.setUint16(4, 0, this);
1374
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1375
- }
1376
- _adoptException(value) {
1377
- _chunkRNSYVJGAcjs.utils.setUint16(4, 1, this);
1378
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1379
- }
1380
- _disownException() {
1381
- return _chunkRNSYVJGAcjs.utils.disown(this.exception);
1382
- }
1383
- /**
1384
- * Indicates that the promise was broken.
1385
- *
1386
- */
1387
- get exception() {
1388
- _chunkRNSYVJGAcjs.utils.testWhich("exception", _chunkRNSYVJGAcjs.utils.getUint16(4, this), 1, this);
1389
- return _chunkRNSYVJGAcjs.utils.getStruct(0, Exception, this);
1390
- }
1391
- _hasException() {
1392
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1393
- }
1394
- _initException() {
1395
- _chunkRNSYVJGAcjs.utils.setUint16(4, 1, this);
1396
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, Exception, this);
1397
- }
1398
- get _isException() {
1399
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this) === 1;
1400
- }
1401
- set exception(value) {
1402
- _chunkRNSYVJGAcjs.utils.setUint16(4, 1, this);
1403
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1404
- }
1405
- toString() {
1406
- return "Resolve_" + super.toString();
1407
- }
1408
- which() {
1409
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this);
1410
- }
1411
- }, _class7.__initStatic30(), _class7.__initStatic31(), _class7.__initStatic32(), _class7);
1412
- var Release = (_class8 = class extends _chunkRNSYVJGAcjs.Struct {
1413
- static {
1414
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Release");
1415
- }
1416
- static __initStatic33() {this._capnp = {
1417
- displayName: "Release",
1418
- id: "ad1a6c0d7dd07497",
1419
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 0)
1420
- }}
1421
- /**
1422
- * What to release.
1423
- *
1424
- */
1425
- get id() {
1426
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1427
- }
1428
- set id(value) {
1429
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1430
- }
1431
- /**
1432
- * The amount by which to decrement the reference count. The export is only actually released
1433
- * when the reference count reaches zero.
1434
- *
1435
- */
1436
- get referenceCount() {
1437
- return _chunkRNSYVJGAcjs.utils.getUint32(4, this);
1438
- }
1439
- set referenceCount(value) {
1440
- _chunkRNSYVJGAcjs.utils.setUint32(4, value, this);
1441
- }
1442
- toString() {
1443
- return "Release_" + super.toString();
1444
- }
1445
- }, _class8.__initStatic33(), _class8);
1446
- var Disembargo_Context_Which = {
1447
- /**
1448
- * The sender is requesting a disembargo on a promise that is known to resolve back to a
1449
- * capability hosted by the sender. As soon as the receiver has echoed back all pipelined calls
1450
- * on this promise, it will deliver the Disembargo back to the sender with `receiverLoopback`
1451
- * set to the same value as `senderLoopback`. This value is chosen by the sender, and since
1452
- * it is also consumed be the sender, the sender can use whatever strategy it wants to make sure
1453
- * the value is unambiguous.
1454
- *
1455
- * The receiver must verify that the target capability actually resolves back to the sender's
1456
- * vat. Otherwise, the sender has committed a protocol error and should be disconnected.
1457
- *
1458
- */
1459
- SENDER_LOOPBACK: 0,
1460
- /**
1461
- * The receiver previously sent a `senderLoopback` Disembargo towards a promise resolving to
1462
- * this capability, and that Disembargo is now being echoed back.
1463
- *
1464
- */
1465
- RECEIVER_LOOPBACK: 1,
1466
- /**
1467
- * **(level 3)**
1468
- *
1469
- * The sender is requesting a disembargo on a promise that is known to resolve to a third-party
1470
- * capability that the sender is currently in the process of accepting (using `Accept`).
1471
- * The receiver of this `Disembargo` has an outstanding `Provide` on said capability. The
1472
- * receiver should now send a `Disembargo` with `provide` set to the question ID of that
1473
- * `Provide` message.
1474
- *
1475
- * See `Accept.embargo` for an example.
1476
- *
1477
- */
1478
- ACCEPT: 2,
1479
- /**
1480
- * **(level 3)**
1481
- *
1482
- * The sender is requesting a disembargo on a capability currently being provided to a third
1483
- * party. The question ID identifies the `Provide` message previously sent by the sender to
1484
- * this capability. On receipt, the receiver (the capability host) shall release the embargo
1485
- * on the `Accept` message that it has received from the third party. See `Accept.embargo` for
1486
- * an example.
1487
- *
1488
- */
1489
- PROVIDE: 3
1490
- };
1491
- var Disembargo_Context = (_class9 = class extends _chunkRNSYVJGAcjs.Struct {
1492
- static {
1493
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Disembargo_Context");
1494
- }
1495
- static __initStatic34() {this.SENDER_LOOPBACK = Disembargo_Context_Which.SENDER_LOOPBACK}
1496
- static __initStatic35() {this.RECEIVER_LOOPBACK = Disembargo_Context_Which.RECEIVER_LOOPBACK}
1497
- static __initStatic36() {this.ACCEPT = Disembargo_Context_Which.ACCEPT}
1498
- static __initStatic37() {this.PROVIDE = Disembargo_Context_Which.PROVIDE}
1499
- static __initStatic38() {this._capnp = {
1500
- displayName: "context",
1501
- id: "d562b4df655bdd4d",
1502
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1)
1503
- }}
1504
- /**
1505
- * The sender is requesting a disembargo on a promise that is known to resolve back to a
1506
- * capability hosted by the sender. As soon as the receiver has echoed back all pipelined calls
1507
- * on this promise, it will deliver the Disembargo back to the sender with `receiverLoopback`
1508
- * set to the same value as `senderLoopback`. This value is chosen by the sender, and since
1509
- * it is also consumed be the sender, the sender can use whatever strategy it wants to make sure
1510
- * the value is unambiguous.
1511
- *
1512
- * The receiver must verify that the target capability actually resolves back to the sender's
1513
- * vat. Otherwise, the sender has committed a protocol error and should be disconnected.
1514
- *
1515
- */
1516
- get senderLoopback() {
1517
- _chunkRNSYVJGAcjs.utils.testWhich("senderLoopback", _chunkRNSYVJGAcjs.utils.getUint16(4, this), 0, this);
1518
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1519
- }
1520
- get _isSenderLoopback() {
1521
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this) === 0;
1522
- }
1523
- set senderLoopback(value) {
1524
- _chunkRNSYVJGAcjs.utils.setUint16(4, 0, this);
1525
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1526
- }
1527
- /**
1528
- * The receiver previously sent a `senderLoopback` Disembargo towards a promise resolving to
1529
- * this capability, and that Disembargo is now being echoed back.
1530
- *
1531
- */
1532
- get receiverLoopback() {
1533
- _chunkRNSYVJGAcjs.utils.testWhich("receiverLoopback", _chunkRNSYVJGAcjs.utils.getUint16(4, this), 1, this);
1534
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1535
- }
1536
- get _isReceiverLoopback() {
1537
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this) === 1;
1538
- }
1539
- set receiverLoopback(value) {
1540
- _chunkRNSYVJGAcjs.utils.setUint16(4, 1, this);
1541
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1542
- }
1543
- get _isAccept() {
1544
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this) === 2;
1545
- }
1546
- set accept(_) {
1547
- _chunkRNSYVJGAcjs.utils.setUint16(4, 2, this);
1548
- }
1549
- /**
1550
- * **(level 3)**
1551
- *
1552
- * The sender is requesting a disembargo on a capability currently being provided to a third
1553
- * party. The question ID identifies the `Provide` message previously sent by the sender to
1554
- * this capability. On receipt, the receiver (the capability host) shall release the embargo
1555
- * on the `Accept` message that it has received from the third party. See `Accept.embargo` for
1556
- * an example.
1557
- *
1558
- */
1559
- get provide() {
1560
- _chunkRNSYVJGAcjs.utils.testWhich("provide", _chunkRNSYVJGAcjs.utils.getUint16(4, this), 3, this);
1561
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1562
- }
1563
- get _isProvide() {
1564
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this) === 3;
1565
- }
1566
- set provide(value) {
1567
- _chunkRNSYVJGAcjs.utils.setUint16(4, 3, this);
1568
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1569
- }
1570
- toString() {
1571
- return "Disembargo_Context_" + super.toString();
1572
- }
1573
- which() {
1574
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this);
1575
- }
1576
- }, _class9.__initStatic34(), _class9.__initStatic35(), _class9.__initStatic36(), _class9.__initStatic37(), _class9.__initStatic38(), _class9);
1577
- var Disembargo = (_class10 = class extends _chunkRNSYVJGAcjs.Struct {
1578
- static {
1579
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Disembargo");
1580
- }
1581
- static __initStatic39() {this._capnp = {
1582
- displayName: "Disembargo",
1583
- id: "f964368b0fbd3711",
1584
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1)
1585
- }}
1586
- _adoptTarget(value) {
1587
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1588
- }
1589
- _disownTarget() {
1590
- return _chunkRNSYVJGAcjs.utils.disown(this.target);
1591
- }
1592
- /**
1593
- * What is to be disembargoed.
1594
- *
1595
- */
1596
- get target() {
1597
- return _chunkRNSYVJGAcjs.utils.getStruct(0, MessageTarget, this);
1598
- }
1599
- _hasTarget() {
1600
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1601
- }
1602
- _initTarget() {
1603
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, MessageTarget, this);
1604
- }
1605
- set target(value) {
1606
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1607
- }
1608
- get context() {
1609
- return _chunkRNSYVJGAcjs.utils.getAs(Disembargo_Context, this);
1610
- }
1611
- _initContext() {
1612
- return _chunkRNSYVJGAcjs.utils.getAs(Disembargo_Context, this);
1613
- }
1614
- toString() {
1615
- return "Disembargo_" + super.toString();
1616
- }
1617
- }, _class10.__initStatic39(), _class10);
1618
- var Provide = (_class11 = class extends _chunkRNSYVJGAcjs.Struct {
1619
- static {
1620
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Provide");
1621
- }
1622
- static __initStatic40() {this._capnp = {
1623
- displayName: "Provide",
1624
- id: "9c6a046bfbc1ac5a",
1625
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 2)
1626
- }}
1627
- /**
1628
- * Question ID to be held open until the recipient has received the capability. A result will be
1629
- * returned once the third party has successfully received the capability. The sender must at some
1630
- * point send a `Finish` message as with any other call, and that message can be used to cancel the
1631
- * whole operation.
1632
- *
1633
- */
1634
- get questionId() {
1635
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1636
- }
1637
- set questionId(value) {
1638
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1639
- }
1640
- _adoptTarget(value) {
1641
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1642
- }
1643
- _disownTarget() {
1644
- return _chunkRNSYVJGAcjs.utils.disown(this.target);
1645
- }
1646
- /**
1647
- * What is to be provided to the third party.
1648
- *
1649
- */
1650
- get target() {
1651
- return _chunkRNSYVJGAcjs.utils.getStruct(0, MessageTarget, this);
1652
- }
1653
- _hasTarget() {
1654
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1655
- }
1656
- _initTarget() {
1657
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, MessageTarget, this);
1658
- }
1659
- set target(value) {
1660
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1661
- }
1662
- _adoptRecipient(value) {
1663
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(1, this));
1664
- }
1665
- _disownRecipient() {
1666
- return _chunkRNSYVJGAcjs.utils.disown(this.recipient);
1667
- }
1668
- /**
1669
- * Identity of the third party that is expected to pick up the capability.
1670
- *
1671
- */
1672
- get recipient() {
1673
- return _chunkRNSYVJGAcjs.utils.getPointer(1, this);
1674
- }
1675
- _hasRecipient() {
1676
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(1, this));
1677
- }
1678
- set recipient(value) {
1679
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(1, this));
1680
- }
1681
- toString() {
1682
- return "Provide_" + super.toString();
1683
- }
1684
- }, _class11.__initStatic40(), _class11);
1685
- var Accept = (_class12 = class extends _chunkRNSYVJGAcjs.Struct {
1686
- static {
1687
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Accept");
1688
- }
1689
- static __initStatic41() {this._capnp = {
1690
- displayName: "Accept",
1691
- id: "d4c9b56290554016",
1692
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1)
1693
- }}
1694
- /**
1695
- * A new question ID identifying this accept message, which will eventually receive a Return
1696
- * message containing the provided capability (or the call result in the case of a redirected
1697
- * return).
1698
- *
1699
- */
1700
- get questionId() {
1701
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1702
- }
1703
- set questionId(value) {
1704
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1705
- }
1706
- _adoptProvision(value) {
1707
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1708
- }
1709
- _disownProvision() {
1710
- return _chunkRNSYVJGAcjs.utils.disown(this.provision);
1711
- }
1712
- /**
1713
- * Identifies the provided object to be picked up.
1714
- *
1715
- */
1716
- get provision() {
1717
- return _chunkRNSYVJGAcjs.utils.getPointer(0, this);
1718
- }
1719
- _hasProvision() {
1720
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1721
- }
1722
- set provision(value) {
1723
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1724
- }
1725
- /**
1726
- * If true, this accept shall be temporarily embargoed. The resulting `Return` will not be sent,
1727
- * and any pipelined calls will not be delivered, until the embargo is released. The receiver
1728
- * (the capability host) will expect the provider (the vat that sent the `Provide` message) to
1729
- * eventually send a `Disembargo` message with the field `context.provide` set to the question ID
1730
- * of the original `Provide` message. At that point, the embargo is released and the queued
1731
- * messages are delivered.
1732
- *
1733
- * For example:
1734
- * - Alice, in Vat A, holds a promise P, which currently points toward Vat B.
1735
- * - Alice calls foo() on P. The `Call` message is sent to Vat B.
1736
- * - The promise P in Vat B ends up resolving to Carol, in Vat C.
1737
- * - Vat B sends a `Provide` message to Vat C, identifying Vat A as the recipient.
1738
- * - Vat B sends a `Resolve` message to Vat A, indicating that the promise has resolved to a
1739
- * `ThirdPartyCapId` identifying Carol in Vat C.
1740
- * - Vat A sends an `Accept` message to Vat C to pick up the capability. Since Vat A knows that
1741
- * it has an outstanding call to the promise, it sets `embargo` to `true` in the `Accept`
1742
- * message.
1743
- * - Vat A sends a `Disembargo` message to Vat B on promise P, with `context.accept` set.
1744
- * - Alice makes a call bar() to promise P, which is now pointing towards Vat C. Alice doesn't
1745
- * know anything about the mechanics of promise resolution happening under the hood, but she
1746
- * expects that bar() will be delivered after foo() because that is the order in which she
1747
- * initiated the calls.
1748
- * - Vat A sends the bar() call to Vat C, as a pipelined call on the result of the `Accept` (which
1749
- * hasn't returned yet, due to the embargo). Since calls to the newly-accepted capability
1750
- * are embargoed, Vat C does not deliver the call yet.
1751
- * - At some point, Vat B forwards the foo() call from the beginning of this example on to Vat C.
1752
- * - Vat B forwards the `Disembargo` from Vat A on to vat C. It sets `context.provide` to the
1753
- * question ID of the `Provide` message it had sent previously.
1754
- * - Vat C receives foo() before `Disembargo`, thus allowing it to correctly deliver foo()
1755
- * before delivering bar().
1756
- * - Vat C receives `Disembargo` from Vat B. It can now send a `Return` for the `Accept` from
1757
- * Vat A, as well as deliver bar().
1758
- *
1759
- */
1760
- get embargo() {
1761
- return _chunkRNSYVJGAcjs.utils.getBit(32, this);
1762
- }
1763
- set embargo(value) {
1764
- _chunkRNSYVJGAcjs.utils.setBit(32, value, this);
1765
- }
1766
- toString() {
1767
- return "Accept_" + super.toString();
1768
- }
1769
- }, _class12.__initStatic41(), _class12);
1770
- var Join = (_class13 = class extends _chunkRNSYVJGAcjs.Struct {
1771
- static {
1772
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Join");
1773
- }
1774
- static __initStatic42() {this._capnp = {
1775
- displayName: "Join",
1776
- id: "fbe1980490e001af",
1777
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 2)
1778
- }}
1779
- /**
1780
- * Question ID used to respond to this Join. (Note that this ID only identifies one part of the
1781
- * request for one hop; each part has a different ID and relayed copies of the request have
1782
- * (probably) different IDs still.)
1783
- *
1784
- * The receiver will reply with a `Return` whose `results` is a JoinResult. This `JoinResult`
1785
- * is relayed from the joined object's host, possibly with transformation applied as needed
1786
- * by the network.
1787
- *
1788
- * Like any return, the result must be released using a `Finish`. However, this release
1789
- * should not occur until the joiner has either successfully connected to the joined object.
1790
- * Vats relaying a `Join` message similarly must not release the result they receive until the
1791
- * return they relayed back towards the joiner has itself been released. This allows the
1792
- * joined object's host to detect when the Join operation is canceled before completing -- if
1793
- * it receives a `Finish` for one of the join results before the joiner successfully
1794
- * connects. It can then free any resources it had allocated as part of the join.
1795
- *
1796
- */
1797
- get questionId() {
1798
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1799
- }
1800
- set questionId(value) {
1801
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1802
- }
1803
- _adoptTarget(value) {
1804
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1805
- }
1806
- _disownTarget() {
1807
- return _chunkRNSYVJGAcjs.utils.disown(this.target);
1808
- }
1809
- /**
1810
- * The capability to join.
1811
- *
1812
- */
1813
- get target() {
1814
- return _chunkRNSYVJGAcjs.utils.getStruct(0, MessageTarget, this);
1815
- }
1816
- _hasTarget() {
1817
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1818
- }
1819
- _initTarget() {
1820
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, MessageTarget, this);
1821
- }
1822
- set target(value) {
1823
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1824
- }
1825
- _adoptKeyPart(value) {
1826
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(1, this));
1827
- }
1828
- _disownKeyPart() {
1829
- return _chunkRNSYVJGAcjs.utils.disown(this.keyPart);
1830
- }
1831
- /**
1832
- * A part of the join key. These combine to form the complete join key, which is used to establish
1833
- * a direct connection.
1834
- *
1835
- */
1836
- get keyPart() {
1837
- return _chunkRNSYVJGAcjs.utils.getPointer(1, this);
1838
- }
1839
- _hasKeyPart() {
1840
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(1, this));
1841
- }
1842
- set keyPart(value) {
1843
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(1, this));
1844
- }
1845
- toString() {
1846
- return "Join_" + super.toString();
1847
- }
1848
- }, _class13.__initStatic42(), _class13);
1849
- var MessageTarget_Which = {
1850
- /**
1851
- * This message is to a capability or promise previously imported by the caller (exported by
1852
- * the receiver).
1853
- *
1854
- */
1855
- IMPORTED_CAP: 0,
1856
- /**
1857
- * This message is to a capability that is expected to be returned by another call that has not
1858
- * yet been completed.
1859
- *
1860
- * At level 0, this is supported only for addressing the result of a previous `Bootstrap`, so
1861
- * that initial startup doesn't require a round trip.
1862
- *
1863
- */
1864
- PROMISED_ANSWER: 1
1865
- };
1866
- var MessageTarget = (_class14 = class extends _chunkRNSYVJGAcjs.Struct {
1867
- static {
1868
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "MessageTarget");
1869
- }
1870
- static __initStatic43() {this.IMPORTED_CAP = MessageTarget_Which.IMPORTED_CAP}
1871
- static __initStatic44() {this.PROMISED_ANSWER = MessageTarget_Which.PROMISED_ANSWER}
1872
- static __initStatic45() {this._capnp = {
1873
- displayName: "MessageTarget",
1874
- id: "95bc14545813fbc1",
1875
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1)
1876
- }}
1877
- /**
1878
- * This message is to a capability or promise previously imported by the caller (exported by
1879
- * the receiver).
1880
- *
1881
- */
1882
- get importedCap() {
1883
- _chunkRNSYVJGAcjs.utils.testWhich("importedCap", _chunkRNSYVJGAcjs.utils.getUint16(4, this), 0, this);
1884
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
1885
- }
1886
- get _isImportedCap() {
1887
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this) === 0;
1888
- }
1889
- set importedCap(value) {
1890
- _chunkRNSYVJGAcjs.utils.setUint16(4, 0, this);
1891
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
1892
- }
1893
- _adoptPromisedAnswer(value) {
1894
- _chunkRNSYVJGAcjs.utils.setUint16(4, 1, this);
1895
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1896
- }
1897
- _disownPromisedAnswer() {
1898
- return _chunkRNSYVJGAcjs.utils.disown(this.promisedAnswer);
1899
- }
1900
- /**
1901
- * This message is to a capability that is expected to be returned by another call that has not
1902
- * yet been completed.
1903
- *
1904
- * At level 0, this is supported only for addressing the result of a previous `Bootstrap`, so
1905
- * that initial startup doesn't require a round trip.
1906
- *
1907
- */
1908
- get promisedAnswer() {
1909
- _chunkRNSYVJGAcjs.utils.testWhich("promisedAnswer", _chunkRNSYVJGAcjs.utils.getUint16(4, this), 1, this);
1910
- return _chunkRNSYVJGAcjs.utils.getStruct(0, PromisedAnswer, this);
1911
- }
1912
- _hasPromisedAnswer() {
1913
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1914
- }
1915
- _initPromisedAnswer() {
1916
- _chunkRNSYVJGAcjs.utils.setUint16(4, 1, this);
1917
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, PromisedAnswer, this);
1918
- }
1919
- get _isPromisedAnswer() {
1920
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this) === 1;
1921
- }
1922
- set promisedAnswer(value) {
1923
- _chunkRNSYVJGAcjs.utils.setUint16(4, 1, this);
1924
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1925
- }
1926
- toString() {
1927
- return "MessageTarget_" + super.toString();
1928
- }
1929
- which() {
1930
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this);
1931
- }
1932
- }, _class14.__initStatic43(), _class14.__initStatic44(), _class14.__initStatic45(), _class14);
1933
- var Payload = (_class15 = class _Payload extends _chunkRNSYVJGAcjs.Struct {
1934
- static {
1935
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Payload");
1936
- }
1937
- static __initStatic46() {this._capnp = {
1938
- displayName: "Payload",
1939
- id: "9a0e61223d96743b",
1940
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(0, 2)
1941
- }}
1942
-
1943
- _adoptContent(value) {
1944
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1945
- }
1946
- _disownContent() {
1947
- return _chunkRNSYVJGAcjs.utils.disown(this.content);
1948
- }
1949
- /**
1950
- * Some Cap'n Proto data structure. Capability pointers embedded in this structure index into
1951
- * `capTable`.
1952
- *
1953
- */
1954
- get content() {
1955
- return _chunkRNSYVJGAcjs.utils.getPointer(0, this);
1956
- }
1957
- _hasContent() {
1958
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
1959
- }
1960
- set content(value) {
1961
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
1962
- }
1963
- _adoptCapTable(value) {
1964
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(1, this));
1965
- }
1966
- _disownCapTable() {
1967
- return _chunkRNSYVJGAcjs.utils.disown(this.capTable);
1968
- }
1969
- /**
1970
- * Descriptors corresponding to the cap pointers in `content`.
1971
- *
1972
- */
1973
- get capTable() {
1974
- return _chunkRNSYVJGAcjs.utils.getList(1, _Payload._CapTable, this);
1975
- }
1976
- _hasCapTable() {
1977
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(1, this));
1978
- }
1979
- _initCapTable(length) {
1980
- return _chunkRNSYVJGAcjs.utils.initList(1, _Payload._CapTable, length, this);
1981
- }
1982
- set capTable(value) {
1983
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(1, this));
1984
- }
1985
- toString() {
1986
- return "Payload_" + super.toString();
1987
- }
1988
- }, _class15.__initStatic46(), _class15);
1989
- var CapDescriptor_Which = {
1990
- /**
1991
- * There is no capability here. This `CapDescriptor` should not appear in the payload content.
1992
- * A `none` CapDescriptor can be generated when an application inserts a capability into a
1993
- * message and then later changes its mind and removes it -- rewriting all of the other
1994
- * capability pointers may be hard, so instead a tombstone is left, similar to the way a removed
1995
- * struct or list instance is zeroed out of the message but the space is not reclaimed.
1996
- * Hopefully this is unusual.
1997
- *
1998
- */
1999
- NONE: 0,
2000
- /**
2001
- * The ID of a capability in the sender's export table (receiver's import table). It may be a
2002
- * newly allocated table entry, or an existing entry (increments the reference count).
2003
- *
2004
- */
2005
- SENDER_HOSTED: 1,
2006
- /**
2007
- * A promise that the sender will resolve later. The sender will send exactly one Resolve
2008
- * message at a future point in time to replace this promise. Note that even if the same
2009
- * `senderPromise` is received multiple times, only one `Resolve` is sent to cover all of
2010
- * them. If `senderPromise` is released before the `Resolve` is sent, the sender (of this
2011
- * `CapDescriptor`) may choose not to send the `Resolve` at all.
2012
- *
2013
- */
2014
- SENDER_PROMISE: 2,
2015
- /**
2016
- * A capability (or promise) previously exported by the receiver (imported by the sender).
2017
- *
2018
- */
2019
- RECEIVER_HOSTED: 3,
2020
- /**
2021
- * A capability expected to be returned in the results of a currently-outstanding call posed
2022
- * by the sender.
2023
- *
2024
- */
2025
- RECEIVER_ANSWER: 4,
2026
- /**
2027
- * **(level 3)**
2028
- *
2029
- * A capability that lives in neither the sender's nor the receiver's vat. The sender needs
2030
- * to form a direct connection to a third party to pick up the capability.
2031
- *
2032
- * Level 1 and 2 implementations that receive a `thirdPartyHosted` may simply send calls to its
2033
- * `vine` instead.
2034
- *
2035
- */
2036
- THIRD_PARTY_HOSTED: 5
2037
- };
2038
- var CapDescriptor = (_class16 = class _CapDescriptor extends _chunkRNSYVJGAcjs.Struct {
2039
- static {
2040
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "CapDescriptor");
2041
- }
2042
- static __initStatic47() {this.NONE = CapDescriptor_Which.NONE}
2043
- static __initStatic48() {this.SENDER_HOSTED = CapDescriptor_Which.SENDER_HOSTED}
2044
- static __initStatic49() {this.SENDER_PROMISE = CapDescriptor_Which.SENDER_PROMISE}
2045
- static __initStatic50() {this.RECEIVER_HOSTED = CapDescriptor_Which.RECEIVER_HOSTED}
2046
- static __initStatic51() {this.RECEIVER_ANSWER = CapDescriptor_Which.RECEIVER_ANSWER}
2047
- static __initStatic52() {this.THIRD_PARTY_HOSTED = CapDescriptor_Which.THIRD_PARTY_HOSTED}
2048
- static __initStatic53() {this._capnp = {
2049
- displayName: "CapDescriptor",
2050
- id: "8523ddc40b86b8b0",
2051
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1),
2052
- defaultAttachedFd: _chunkRNSYVJGAcjs.getUint8Mask.call(void 0, 255)
2053
- }}
2054
- get _isNone() {
2055
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 0;
2056
- }
2057
- set none(_) {
2058
- _chunkRNSYVJGAcjs.utils.setUint16(0, 0, this);
2059
- }
2060
- /**
2061
- * The ID of a capability in the sender's export table (receiver's import table). It may be a
2062
- * newly allocated table entry, or an existing entry (increments the reference count).
2063
- *
2064
- */
2065
- get senderHosted() {
2066
- _chunkRNSYVJGAcjs.utils.testWhich("senderHosted", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 1, this);
2067
- return _chunkRNSYVJGAcjs.utils.getUint32(4, this);
2068
- }
2069
- get _isSenderHosted() {
2070
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 1;
2071
- }
2072
- set senderHosted(value) {
2073
- _chunkRNSYVJGAcjs.utils.setUint16(0, 1, this);
2074
- _chunkRNSYVJGAcjs.utils.setUint32(4, value, this);
2075
- }
2076
- /**
2077
- * A promise that the sender will resolve later. The sender will send exactly one Resolve
2078
- * message at a future point in time to replace this promise. Note that even if the same
2079
- * `senderPromise` is received multiple times, only one `Resolve` is sent to cover all of
2080
- * them. If `senderPromise` is released before the `Resolve` is sent, the sender (of this
2081
- * `CapDescriptor`) may choose not to send the `Resolve` at all.
2082
- *
2083
- */
2084
- get senderPromise() {
2085
- _chunkRNSYVJGAcjs.utils.testWhich("senderPromise", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 2, this);
2086
- return _chunkRNSYVJGAcjs.utils.getUint32(4, this);
2087
- }
2088
- get _isSenderPromise() {
2089
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 2;
2090
- }
2091
- set senderPromise(value) {
2092
- _chunkRNSYVJGAcjs.utils.setUint16(0, 2, this);
2093
- _chunkRNSYVJGAcjs.utils.setUint32(4, value, this);
2094
- }
2095
- /**
2096
- * A capability (or promise) previously exported by the receiver (imported by the sender).
2097
- *
2098
- */
2099
- get receiverHosted() {
2100
- _chunkRNSYVJGAcjs.utils.testWhich("receiverHosted", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 3, this);
2101
- return _chunkRNSYVJGAcjs.utils.getUint32(4, this);
2102
- }
2103
- get _isReceiverHosted() {
2104
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 3;
2105
- }
2106
- set receiverHosted(value) {
2107
- _chunkRNSYVJGAcjs.utils.setUint16(0, 3, this);
2108
- _chunkRNSYVJGAcjs.utils.setUint32(4, value, this);
2109
- }
2110
- _adoptReceiverAnswer(value) {
2111
- _chunkRNSYVJGAcjs.utils.setUint16(0, 4, this);
2112
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
2113
- }
2114
- _disownReceiverAnswer() {
2115
- return _chunkRNSYVJGAcjs.utils.disown(this.receiverAnswer);
2116
- }
2117
- /**
2118
- * A capability expected to be returned in the results of a currently-outstanding call posed
2119
- * by the sender.
2120
- *
2121
- */
2122
- get receiverAnswer() {
2123
- _chunkRNSYVJGAcjs.utils.testWhich("receiverAnswer", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 4, this);
2124
- return _chunkRNSYVJGAcjs.utils.getStruct(0, PromisedAnswer, this);
2125
- }
2126
- _hasReceiverAnswer() {
2127
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
2128
- }
2129
- _initReceiverAnswer() {
2130
- _chunkRNSYVJGAcjs.utils.setUint16(0, 4, this);
2131
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, PromisedAnswer, this);
2132
- }
2133
- get _isReceiverAnswer() {
2134
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 4;
2135
- }
2136
- set receiverAnswer(value) {
2137
- _chunkRNSYVJGAcjs.utils.setUint16(0, 4, this);
2138
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
2139
- }
2140
- _adoptThirdPartyHosted(value) {
2141
- _chunkRNSYVJGAcjs.utils.setUint16(0, 5, this);
2142
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
2143
- }
2144
- _disownThirdPartyHosted() {
2145
- return _chunkRNSYVJGAcjs.utils.disown(this.thirdPartyHosted);
2146
- }
2147
- /**
2148
- * **(level 3)**
2149
- *
2150
- * A capability that lives in neither the sender's nor the receiver's vat. The sender needs
2151
- * to form a direct connection to a third party to pick up the capability.
2152
- *
2153
- * Level 1 and 2 implementations that receive a `thirdPartyHosted` may simply send calls to its
2154
- * `vine` instead.
2155
- *
2156
- */
2157
- get thirdPartyHosted() {
2158
- _chunkRNSYVJGAcjs.utils.testWhich("thirdPartyHosted", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 5, this);
2159
- return _chunkRNSYVJGAcjs.utils.getStruct(0, ThirdPartyCapDescriptor, this);
2160
- }
2161
- _hasThirdPartyHosted() {
2162
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
2163
- }
2164
- _initThirdPartyHosted() {
2165
- _chunkRNSYVJGAcjs.utils.setUint16(0, 5, this);
2166
- return _chunkRNSYVJGAcjs.utils.initStructAt(0, ThirdPartyCapDescriptor, this);
2167
- }
2168
- get _isThirdPartyHosted() {
2169
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 5;
2170
- }
2171
- set thirdPartyHosted(value) {
2172
- _chunkRNSYVJGAcjs.utils.setUint16(0, 5, this);
2173
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
2174
- }
2175
- /**
2176
- * If the RPC message in which this CapDescriptor was delivered also had file descriptors
2177
- * attached, and `fd` is a valid index into the list of attached file descriptors, then
2178
- * that file descriptor should be attached to this capability. If `attachedFd` is out-of-bounds
2179
- * for said list, then no FD is attached.
2180
- *
2181
- * For example, if the RPC message arrived over a Unix socket, then file descriptors may be
2182
- * attached by sending an SCM_RIGHTS ancillary message attached to the data bytes making up the
2183
- * raw message. Receivers who wish to opt into FD passing should arrange to receive SCM_RIGHTS
2184
- * whenever receiving an RPC message. Senders who wish to send FDs need not verify whether the
2185
- * receiver knows how to receive them, because the operating system will automatically discard
2186
- * ancillary messages like SCM_RIGHTS if the receiver doesn't ask to receive them, including
2187
- * automatically closing any FDs.
2188
- *
2189
- * It is up to the application protocol to define what capabilities are expected to have file
2190
- * descriptors attached, and what those FDs mean. But, for example, an application could use this
2191
- * to open a file on disk and then transmit the open file descriptor to a sandboxed process that
2192
- * does not otherwise have permission to access the filesystem directly. This is usually an
2193
- * optimization: the sending process could instead provide an RPC interface supporting all the
2194
- * operations needed (such as reading and writing a file), but by passing the file descriptor
2195
- * directly, the recipient can often perform operations much more efficiently. Application
2196
- * designers are encouraged to provide such RPC interfaces and automatically fall back to them
2197
- * when FD passing is not available, so that the application can still work when the parties are
2198
- * remote over a network.
2199
- *
2200
- * An attached FD is most often associated with a `senderHosted` descriptor. It could also make
2201
- * sense in the case of `thirdPartyHosted`: in this case, the sender is forwarding the FD that
2202
- * they received from the third party, so that the receiver can start using it without first
2203
- * interacting with the third party. This is an optional optimization -- the middleman may choose
2204
- * not to forward capabilities, in which case the receiver will need to complete the handshake
2205
- * with the third party directly before receiving the FD. If an implementation receives a second
2206
- * attached FD after having already received one previously (e.g. both in a `thirdPartyHosted`
2207
- * CapDescriptor and then later again when receiving the final capability directly from the
2208
- * third party), the implementation should discard the later FD and stick with the original. At
2209
- * present, there is no known reason why other capability types (e.g. `receiverHosted`) would want
2210
- * to carry an attached FD, but we reserve the right to define a meaning for this in the future.
2211
- *
2212
- * Each file descriptor attached to the message must be used in no more than one CapDescriptor,
2213
- * so that the receiver does not need to use dup() or refcounting to handle the possibility of
2214
- * multiple capabilities using the same descriptor. If multiple CapDescriptors do point to the
2215
- * same FD index, then the receiver can arbitrarily choose which capability ends up having the
2216
- * FD attached.
2217
- *
2218
- * To mitigate DoS attacks, RPC implementations should limit the number of FDs they are willing to
2219
- * receive in a single message to a small value. If a message happens to contain more than that,
2220
- * the list is truncated. Moreover, in some cases, FD passing needs to be blocked entirely for
2221
- * security or implementation reasons, in which case the list may be truncated to zero. Hence,
2222
- * `attachedFd` might point past the end of the list, which the implementation should treat as if
2223
- * no FD was attached at all.
2224
- *
2225
- * The type of this field was chosen to be UInt8 because Linux supports sending only a maximum
2226
- * of 253 file descriptors in an SCM_RIGHTS message anyway, and CapDescriptor had two bytes of
2227
- * padding left -- so after adding this, there is still one byte for a future feature.
2228
- * Conveniently, this also means we're able to use 0xff as the default value, which will always
2229
- * be out-of-range (of course, the implementation should explicitly enforce that 255 descriptors
2230
- * cannot be sent at once, rather than relying on Linux to do so).
2231
- *
2232
- */
2233
- get attachedFd() {
2234
- return _chunkRNSYVJGAcjs.utils.getUint8(2, this, _CapDescriptor._capnp.defaultAttachedFd);
2235
- }
2236
- set attachedFd(value) {
2237
- _chunkRNSYVJGAcjs.utils.setUint8(2, value, this, _CapDescriptor._capnp.defaultAttachedFd);
2238
- }
2239
- toString() {
2240
- return "CapDescriptor_" + super.toString();
2241
- }
2242
- which() {
2243
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this);
2244
- }
2245
- }, _class16.__initStatic47(), _class16.__initStatic48(), _class16.__initStatic49(), _class16.__initStatic50(), _class16.__initStatic51(), _class16.__initStatic52(), _class16.__initStatic53(), _class16);
2246
- var PromisedAnswer_Op_Which = {
2247
- /**
2248
- * Does nothing. This member is mostly defined so that we can make `Op` a union even
2249
- * though (as of this writing) only one real operation is defined.
2250
- *
2251
- */
2252
- NOOP: 0,
2253
- /**
2254
- * Get a pointer field within a struct. The number is an index into the pointer section, NOT
2255
- * a field ordinal, so that the receiver does not need to understand the schema.
2256
- *
2257
- */
2258
- GET_POINTER_FIELD: 1
2259
- };
2260
- var PromisedAnswer_Op = (_class17 = class extends _chunkRNSYVJGAcjs.Struct {
2261
- static {
2262
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "PromisedAnswer_Op");
2263
- }
2264
- static __initStatic54() {this.NOOP = PromisedAnswer_Op_Which.NOOP}
2265
- static __initStatic55() {this.GET_POINTER_FIELD = PromisedAnswer_Op_Which.GET_POINTER_FIELD}
2266
- static __initStatic56() {this._capnp = {
2267
- displayName: "Op",
2268
- id: "f316944415569081",
2269
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 0)
2270
- }}
2271
- get _isNoop() {
2272
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 0;
2273
- }
2274
- set noop(_) {
2275
- _chunkRNSYVJGAcjs.utils.setUint16(0, 0, this);
2276
- }
2277
- /**
2278
- * Get a pointer field within a struct. The number is an index into the pointer section, NOT
2279
- * a field ordinal, so that the receiver does not need to understand the schema.
2280
- *
2281
- */
2282
- get getPointerField() {
2283
- _chunkRNSYVJGAcjs.utils.testWhich("getPointerField", _chunkRNSYVJGAcjs.utils.getUint16(0, this), 1, this);
2284
- return _chunkRNSYVJGAcjs.utils.getUint16(2, this);
2285
- }
2286
- get _isGetPointerField() {
2287
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this) === 1;
2288
- }
2289
- set getPointerField(value) {
2290
- _chunkRNSYVJGAcjs.utils.setUint16(0, 1, this);
2291
- _chunkRNSYVJGAcjs.utils.setUint16(2, value, this);
2292
- }
2293
- toString() {
2294
- return "PromisedAnswer_Op_" + super.toString();
2295
- }
2296
- which() {
2297
- return _chunkRNSYVJGAcjs.utils.getUint16(0, this);
2298
- }
2299
- }, _class17.__initStatic54(), _class17.__initStatic55(), _class17.__initStatic56(), _class17);
2300
- var PromisedAnswer = (_class18 = class _PromisedAnswer extends _chunkRNSYVJGAcjs.Struct {
2301
- static {
2302
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "PromisedAnswer");
2303
- }
2304
- static __initStatic57() {this.Op = PromisedAnswer_Op}
2305
- static __initStatic58() {this._capnp = {
2306
- displayName: "PromisedAnswer",
2307
- id: "d800b1d6cd6f1ca0",
2308
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1)
2309
- }}
2310
-
2311
- /**
2312
- * ID of the question (in the sender's question table / receiver's answer table) whose answer is
2313
- * expected to contain the capability.
2314
- *
2315
- */
2316
- get questionId() {
2317
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
2318
- }
2319
- set questionId(value) {
2320
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
2321
- }
2322
- _adoptTransform(value) {
2323
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
2324
- }
2325
- _disownTransform() {
2326
- return _chunkRNSYVJGAcjs.utils.disown(this.transform);
2327
- }
2328
- /**
2329
- * Operations / transformations to apply to the result in order to get the capability actually
2330
- * being addressed. E.g. if the result is a struct and you want to call a method on a capability
2331
- * pointed to by a field of the struct, you need a `getPointerField` op.
2332
- *
2333
- */
2334
- get transform() {
2335
- return _chunkRNSYVJGAcjs.utils.getList(0, _PromisedAnswer._Transform, this);
2336
- }
2337
- _hasTransform() {
2338
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
2339
- }
2340
- _initTransform(length) {
2341
- return _chunkRNSYVJGAcjs.utils.initList(0, _PromisedAnswer._Transform, length, this);
2342
- }
2343
- set transform(value) {
2344
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
2345
- }
2346
- toString() {
2347
- return "PromisedAnswer_" + super.toString();
2348
- }
2349
- }, _class18.__initStatic57(), _class18.__initStatic58(), _class18);
2350
- var ThirdPartyCapDescriptor = (_class19 = class extends _chunkRNSYVJGAcjs.Struct {
2351
- static {
2352
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "ThirdPartyCapDescriptor");
2353
- }
2354
- static __initStatic59() {this._capnp = {
2355
- displayName: "ThirdPartyCapDescriptor",
2356
- id: "d37007fde1f0027d",
2357
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 1)
2358
- }}
2359
- _adoptId(value) {
2360
- _chunkRNSYVJGAcjs.utils.adopt(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
2361
- }
2362
- _disownId() {
2363
- return _chunkRNSYVJGAcjs.utils.disown(this.id);
2364
- }
2365
- /**
2366
- * Identifies the third-party host and the specific capability to accept from it.
2367
- *
2368
- */
2369
- get id() {
2370
- return _chunkRNSYVJGAcjs.utils.getPointer(0, this);
2371
- }
2372
- _hasId() {
2373
- return !_chunkRNSYVJGAcjs.utils.isNull(_chunkRNSYVJGAcjs.utils.getPointer(0, this));
2374
- }
2375
- set id(value) {
2376
- _chunkRNSYVJGAcjs.utils.copyFrom(value, _chunkRNSYVJGAcjs.utils.getPointer(0, this));
2377
- }
2378
- /**
2379
- * A proxy for the third-party object exported by the sender. In CapTP terminology this is called
2380
- * a "vine", because it is an indirect reference to the third-party object that snakes through the
2381
- * sender vat. This serves two purposes:
2382
- *
2383
- * * Level 1 and 2 implementations that don't understand how to connect to a third party may
2384
- * simply send calls to the vine. Such calls will be forwarded to the third-party by the
2385
- * sender.
2386
- *
2387
- * * Level 3 implementations must release the vine only once they have successfully picked up the
2388
- * object from the third party. This ensures that the capability is not released by the sender
2389
- * prematurely.
2390
- *
2391
- * The sender will close the `Provide` request that it has sent to the third party as soon as
2392
- * it receives either a `Call` or a `Release` message directed at the vine.
2393
- *
2394
- */
2395
- get vineId() {
2396
- return _chunkRNSYVJGAcjs.utils.getUint32(0, this);
2397
- }
2398
- set vineId(value) {
2399
- _chunkRNSYVJGAcjs.utils.setUint32(0, value, this);
2400
- }
2401
- toString() {
2402
- return "ThirdPartyCapDescriptor_" + super.toString();
2403
- }
2404
- }, _class19.__initStatic59(), _class19);
2405
- var Exception_Type = {
2406
- /**
2407
- * A generic problem occurred, and it is believed that if the operation were repeated without
2408
- * any change in the state of the world, the problem would occur again.
2409
- *
2410
- * A client might respond to this error by logging it for investigation by the developer and/or
2411
- * displaying it to the user.
2412
- *
2413
- */
2414
- FAILED: 0,
2415
- /**
2416
- * The request was rejected due to a temporary lack of resources.
2417
- *
2418
- * Examples include:
2419
- * - There's not enough CPU time to keep up with incoming requests, so some are rejected.
2420
- * - The server ran out of RAM or disk space during the request.
2421
- * - The operation timed out (took significantly longer than it should have).
2422
- *
2423
- * A client might respond to this error by scheduling to retry the operation much later. The
2424
- * client should NOT retry again immediately since this would likely exacerbate the problem.
2425
- *
2426
- */
2427
- OVERLOADED: 1,
2428
- /**
2429
- * The method failed because a connection to some necessary capability was lost.
2430
- *
2431
- * Examples include:
2432
- * - The client introduced the server to a third-party capability, the connection to that third
2433
- * party was subsequently lost, and then the client requested that the server use the dead
2434
- * capability for something.
2435
- * - The client previously requested that the server obtain a capability from some third party.
2436
- * The server returned a capability to an object wrapping the third-party capability. Later,
2437
- * the server's connection to the third party was lost.
2438
- * - The capability has been revoked. Revocation does not necessarily mean that the client is
2439
- * no longer authorized to use the capability; it is often used simply as a way to force the
2440
- * client to repeat the setup process, perhaps to efficiently move them to a new back-end or
2441
- * get them to recognize some other change that has occurred.
2442
- *
2443
- * A client should normally respond to this error by releasing all capabilities it is currently
2444
- * holding related to the one it called and then re-creating them by restoring SturdyRefs and/or
2445
- * repeating the method calls used to create them originally. In other words, disconnect and
2446
- * start over. This should in turn cause the server to obtain a new copy of the capability that
2447
- * it lost, thus making everything work.
2448
- *
2449
- * If the client receives another `disconnected` error in the process of rebuilding the
2450
- * capability and retrying the call, it should treat this as an `overloaded` error: the network
2451
- * is currently unreliable, possibly due to load or other temporary issues.
2452
- *
2453
- */
2454
- DISCONNECTED: 2,
2455
- /**
2456
- * The server doesn't implement the requested method. If there is some other method that the
2457
- * client could call (perhaps an older and/or slower interface), it should try that instead.
2458
- * Otherwise, this should be treated like `failed`.
2459
- *
2460
- */
2461
- UNIMPLEMENTED: 3
2462
- };
2463
- var Exception = (_class20 = class extends _chunkRNSYVJGAcjs.Struct {
2464
- static {
2465
- _chunkUSNT2KNTcjs.__name.call(void 0, this, "Exception");
2466
- }
2467
- static __initStatic60() {this.Type = Exception_Type}
2468
- static __initStatic61() {this._capnp = {
2469
- displayName: "Exception",
2470
- id: "d625b7063acf691a",
2471
- size: new (0, _chunkRNSYVJGAcjs.ObjectSize)(8, 2)
2472
- }}
2473
- /**
2474
- * Human-readable failure description.
2475
- *
2476
- */
2477
- get reason() {
2478
- return _chunkRNSYVJGAcjs.utils.getText(0, this);
2479
- }
2480
- set reason(value) {
2481
- _chunkRNSYVJGAcjs.utils.setText(0, value, this);
2482
- }
2483
- /**
2484
- * The type of the error. The purpose of this enum is not to describe the error itself, but
2485
- * rather to describe how the client might want to respond to the error.
2486
- *
2487
- */
2488
- get type() {
2489
- return _chunkRNSYVJGAcjs.utils.getUint16(4, this);
2490
- }
2491
- set type(value) {
2492
- _chunkRNSYVJGAcjs.utils.setUint16(4, value, this);
2493
- }
2494
- /**
2495
- * OBSOLETE. Ignore.
2496
- *
2497
- */
2498
- get obsoleteIsCallersFault() {
2499
- return _chunkRNSYVJGAcjs.utils.getBit(0, this);
2500
- }
2501
- set obsoleteIsCallersFault(value) {
2502
- _chunkRNSYVJGAcjs.utils.setBit(0, value, this);
2503
- }
2504
- /**
2505
- * OBSOLETE. See `type` instead.
2506
- *
2507
- */
2508
- get obsoleteDurability() {
2509
- return _chunkRNSYVJGAcjs.utils.getUint16(2, this);
2510
- }
2511
- set obsoleteDurability(value) {
2512
- _chunkRNSYVJGAcjs.utils.setUint16(2, value, this);
2513
- }
2514
- /**
2515
- * Stack trace text from the remote server. The format is not specified. By default,
2516
- * implementations do not provide stack traces; the application must explicitly enable them
2517
- * when desired.
2518
- *
2519
- */
2520
- get trace() {
2521
- return _chunkRNSYVJGAcjs.utils.getText(1, this);
2522
- }
2523
- set trace(value) {
2524
- _chunkRNSYVJGAcjs.utils.setText(1, value, this);
2525
- }
2526
- toString() {
2527
- return "Exception_" + super.toString();
2528
- }
2529
- }, _class20.__initStatic60(), _class20.__initStatic61(), _class20);
2530
- Payload._CapTable = _chunkRNSYVJGAcjs.CompositeList.call(void 0, CapDescriptor);
2531
- PromisedAnswer._Transform = _chunkRNSYVJGAcjs.CompositeList.call(void 0, PromisedAnswer_Op);
2532
-
2533
-
2534
-
2535
-
2536
-
2537
-
2538
-
2539
-
2540
-
2541
-
2542
-
2543
-
2544
-
2545
-
2546
-
2547
-
2548
-
2549
-
2550
-
2551
-
2552
-
2553
-
2554
-
2555
-
2556
-
2557
-
2558
-
2559
-
2560
-
2561
-
2562
-
2563
- exports.Accept = Accept; exports.Bootstrap = Bootstrap; exports.Call = Call; exports.Call_SendResultsTo = Call_SendResultsTo; exports.Call_SendResultsTo_Which = Call_SendResultsTo_Which; exports.CapDescriptor = CapDescriptor; exports.CapDescriptor_Which = CapDescriptor_Which; exports.Disembargo = Disembargo; exports.Disembargo_Context = Disembargo_Context; exports.Disembargo_Context_Which = Disembargo_Context_Which; exports.Exception = Exception; exports.Exception_Type = Exception_Type; exports.Finish = Finish; exports.Join = Join; exports.Message = Message; exports.MessageTarget = MessageTarget; exports.MessageTarget_Which = MessageTarget_Which; exports.Message_Which = Message_Which; exports.Payload = Payload; exports.PromisedAnswer = PromisedAnswer; exports.PromisedAnswer_Op = PromisedAnswer_Op; exports.PromisedAnswer_Op_Which = PromisedAnswer_Op_Which; exports.Provide = Provide; exports.Release = Release; exports.Resolve = Resolve; exports.Resolve_Which = Resolve_Which; exports.Return = Return; exports.Return_Which = Return_Which; exports.ThirdPartyCapDescriptor = ThirdPartyCapDescriptor; exports._capnpFileId = _capnpFileId;
1
+ const e=require(`./src-DqnIPdOg.cjs`);let t=require(`./shared/capnp-es.0-_cOx6D.mjs`),n=require(`./shared/capnp-es.BvfUH5E6.mjs`);const r=BigInt(`0xb312981b2552a250`),i={UNIMPLEMENTED:0,ABORT:1,BOOTSTRAP:8,CALL:2,RETURN:3,FINISH:4,RESOLVE:5,RELEASE:6,DISEMBARGO:13,OBSOLETE_SAVE:7,OBSOLETE_DELETE:9,PROVIDE:10,ACCEPT:11,JOIN:12};var a=class n extends t.S{static UNIMPLEMENTED=i.UNIMPLEMENTED;static ABORT=i.ABORT;static BOOTSTRAP=i.BOOTSTRAP;static CALL=i.CALL;static RETURN=i.RETURN;static FINISH=i.FINISH;static RESOLVE=i.RESOLVE;static RELEASE=i.RELEASE;static DISEMBARGO=i.DISEMBARGO;static OBSOLETE_SAVE=i.OBSOLETE_SAVE;static OBSOLETE_DELETE=i.OBSOLETE_DELETE;static PROVIDE=i.PROVIDE;static ACCEPT=i.ACCEPT;static JOIN=i.JOIN;static _capnp={displayName:`Message`,id:`91b79f1f808db032`,size:new t.O(8,1)};_adoptUnimplemented(t){e.t.setUint16(0,0,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownUnimplemented(){return e.t.disown(this.unimplemented)}get unimplemented(){return e.t.testWhich(`unimplemented`,e.t.getUint16(0,this),0,this),e.t.getStruct(0,n,this)}_hasUnimplemented(){return!e.t.isNull(e.t.getPointer(0,this))}_initUnimplemented(){return e.t.setUint16(0,0,this),e.t.initStructAt(0,n,this)}get _isUnimplemented(){return e.t.getUint16(0,this)===0}set unimplemented(t){e.t.setUint16(0,0,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptAbort(t){e.t.setUint16(0,1,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownAbort(){return e.t.disown(this.abort)}get abort(){return e.t.testWhich(`abort`,e.t.getUint16(0,this),1,this),e.t.getStruct(0,M,this)}_hasAbort(){return!e.t.isNull(e.t.getPointer(0,this))}_initAbort(){return e.t.setUint16(0,1,this),e.t.initStructAt(0,M,this)}get _isAbort(){return e.t.getUint16(0,this)===1}set abort(t){e.t.setUint16(0,1,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptBootstrap(t){e.t.setUint16(0,8,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownBootstrap(){return e.t.disown(this.bootstrap)}get bootstrap(){return e.t.testWhich(`bootstrap`,e.t.getUint16(0,this),8,this),e.t.getStruct(0,o,this)}_hasBootstrap(){return!e.t.isNull(e.t.getPointer(0,this))}_initBootstrap(){return e.t.setUint16(0,8,this),e.t.initStructAt(0,o,this)}get _isBootstrap(){return e.t.getUint16(0,this)===8}set bootstrap(t){e.t.setUint16(0,8,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptCall(t){e.t.setUint16(0,2,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownCall(){return e.t.disown(this.call)}get call(){return e.t.testWhich(`call`,e.t.getUint16(0,this),2,this),e.t.getStruct(0,l,this)}_hasCall(){return!e.t.isNull(e.t.getPointer(0,this))}_initCall(){return e.t.setUint16(0,2,this),e.t.initStructAt(0,l,this)}get _isCall(){return e.t.getUint16(0,this)===2}set call(t){e.t.setUint16(0,2,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptReturn(t){e.t.setUint16(0,3,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownReturn(){return e.t.disown(this.return)}get return(){return e.t.testWhich(`return`,e.t.getUint16(0,this),3,this),e.t.getStruct(0,d,this)}_hasReturn(){return!e.t.isNull(e.t.getPointer(0,this))}_initReturn(){return e.t.setUint16(0,3,this),e.t.initStructAt(0,d,this)}get _isReturn(){return e.t.getUint16(0,this)===3}set return(t){e.t.setUint16(0,3,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptFinish(t){e.t.setUint16(0,4,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownFinish(){return e.t.disown(this.finish)}get finish(){return e.t.testWhich(`finish`,e.t.getUint16(0,this),4,this),e.t.getStruct(0,f,this)}_hasFinish(){return!e.t.isNull(e.t.getPointer(0,this))}_initFinish(){return e.t.setUint16(0,4,this),e.t.initStructAt(0,f,this)}get _isFinish(){return e.t.getUint16(0,this)===4}set finish(t){e.t.setUint16(0,4,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptResolve(t){e.t.setUint16(0,5,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownResolve(){return e.t.disown(this.resolve)}get resolve(){return e.t.testWhich(`resolve`,e.t.getUint16(0,this),5,this),e.t.getStruct(0,m,this)}_hasResolve(){return!e.t.isNull(e.t.getPointer(0,this))}_initResolve(){return e.t.setUint16(0,5,this),e.t.initStructAt(0,m,this)}get _isResolve(){return e.t.getUint16(0,this)===5}set resolve(t){e.t.setUint16(0,5,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptRelease(t){e.t.setUint16(0,6,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownRelease(){return e.t.disown(this.release)}get release(){return e.t.testWhich(`release`,e.t.getUint16(0,this),6,this),e.t.getStruct(0,h,this)}_hasRelease(){return!e.t.isNull(e.t.getPointer(0,this))}_initRelease(){return e.t.setUint16(0,6,this),e.t.initStructAt(0,h,this)}get _isRelease(){return e.t.getUint16(0,this)===6}set release(t){e.t.setUint16(0,6,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptDisembargo(t){e.t.setUint16(0,13,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownDisembargo(){return e.t.disown(this.disembargo)}get disembargo(){return e.t.testWhich(`disembargo`,e.t.getUint16(0,this),13,this),e.t.getStruct(0,v,this)}_hasDisembargo(){return!e.t.isNull(e.t.getPointer(0,this))}_initDisembargo(){return e.t.setUint16(0,13,this),e.t.initStructAt(0,v,this)}get _isDisembargo(){return e.t.getUint16(0,this)===13}set disembargo(t){e.t.setUint16(0,13,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptObsoleteSave(t){e.t.setUint16(0,7,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownObsoleteSave(){return e.t.disown(this.obsoleteSave)}get obsoleteSave(){return e.t.testWhich(`obsoleteSave`,e.t.getUint16(0,this),7,this),e.t.getPointer(0,this)}_hasObsoleteSave(){return!e.t.isNull(e.t.getPointer(0,this))}get _isObsoleteSave(){return e.t.getUint16(0,this)===7}set obsoleteSave(t){e.t.setUint16(0,7,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptObsoleteDelete(t){e.t.setUint16(0,9,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownObsoleteDelete(){return e.t.disown(this.obsoleteDelete)}get obsoleteDelete(){return e.t.testWhich(`obsoleteDelete`,e.t.getUint16(0,this),9,this),e.t.getPointer(0,this)}_hasObsoleteDelete(){return!e.t.isNull(e.t.getPointer(0,this))}get _isObsoleteDelete(){return e.t.getUint16(0,this)===9}set obsoleteDelete(t){e.t.setUint16(0,9,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptProvide(t){e.t.setUint16(0,10,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownProvide(){return e.t.disown(this.provide)}get provide(){return e.t.testWhich(`provide`,e.t.getUint16(0,this),10,this),e.t.getStruct(0,y,this)}_hasProvide(){return!e.t.isNull(e.t.getPointer(0,this))}_initProvide(){return e.t.setUint16(0,10,this),e.t.initStructAt(0,y,this)}get _isProvide(){return e.t.getUint16(0,this)===10}set provide(t){e.t.setUint16(0,10,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptAccept(t){e.t.setUint16(0,11,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownAccept(){return e.t.disown(this.accept)}get accept(){return e.t.testWhich(`accept`,e.t.getUint16(0,this),11,this),e.t.getStruct(0,b,this)}_hasAccept(){return!e.t.isNull(e.t.getPointer(0,this))}_initAccept(){return e.t.setUint16(0,11,this),e.t.initStructAt(0,b,this)}get _isAccept(){return e.t.getUint16(0,this)===11}set accept(t){e.t.setUint16(0,11,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptJoin(t){e.t.setUint16(0,12,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownJoin(){return e.t.disown(this.join)}get join(){return e.t.testWhich(`join`,e.t.getUint16(0,this),12,this),e.t.getStruct(0,x,this)}_hasJoin(){return!e.t.isNull(e.t.getPointer(0,this))}_initJoin(){return e.t.setUint16(0,12,this),e.t.initStructAt(0,x,this)}get _isJoin(){return e.t.getUint16(0,this)===12}set join(t){e.t.setUint16(0,12,this),e.t.copyFrom(t,e.t.getPointer(0,this))}toString(){return`Message_`+super.toString()}which(){return e.t.getUint16(0,this)}},o=class extends t.S{static _capnp={displayName:`Bootstrap`,id:`e94ccf8031176ec4`,size:new t.O(8,1)};get questionId(){return e.t.getUint32(0,this)}set questionId(t){e.t.setUint32(0,t,this)}_adoptDeprecatedObjectId(t){e.t.adopt(t,e.t.getPointer(0,this))}_disownDeprecatedObjectId(){return e.t.disown(this.deprecatedObjectId)}get deprecatedObjectId(){return e.t.getPointer(0,this)}_hasDeprecatedObjectId(){return!e.t.isNull(e.t.getPointer(0,this))}set deprecatedObjectId(t){e.t.copyFrom(t,e.t.getPointer(0,this))}toString(){return`Bootstrap_`+super.toString()}};const s={CALLER:0,YOURSELF:1,THIRD_PARTY:2};var c=class extends t.S{static CALLER=s.CALLER;static YOURSELF=s.YOURSELF;static THIRD_PARTY=s.THIRD_PARTY;static _capnp={displayName:`sendResultsTo`,id:`dae8b0f61aab5f99`,size:new t.O(24,3)};get _isCaller(){return e.t.getUint16(6,this)===0}set caller(t){e.t.setUint16(6,0,this)}get _isYourself(){return e.t.getUint16(6,this)===1}set yourself(t){e.t.setUint16(6,1,this)}_adoptThirdParty(t){e.t.setUint16(6,2,this),e.t.adopt(t,e.t.getPointer(2,this))}_disownThirdParty(){return e.t.disown(this.thirdParty)}get thirdParty(){return e.t.testWhich(`thirdParty`,e.t.getUint16(6,this),2,this),e.t.getPointer(2,this)}_hasThirdParty(){return!e.t.isNull(e.t.getPointer(2,this))}get _isThirdParty(){return e.t.getUint16(6,this)===2}set thirdParty(t){e.t.setUint16(6,2,this),e.t.copyFrom(t,e.t.getPointer(2,this))}toString(){return`Call_SendResultsTo_`+super.toString()}which(){return e.t.getUint16(6,this)}},l=class r extends t.S{static _capnp={displayName:`Call`,id:`836a53ce789d4cd4`,size:new t.O(24,3),defaultAllowThirdPartyTailCall:n.g(!1,0),defaultNoPromisePipelining:n.g(!1,1),defaultOnlyPromisePipeline:n.g(!1,2)};get questionId(){return e.t.getUint32(0,this)}set questionId(t){e.t.setUint32(0,t,this)}_adoptTarget(t){e.t.adopt(t,e.t.getPointer(0,this))}_disownTarget(){return e.t.disown(this.target)}get target(){return e.t.getStruct(0,C,this)}_hasTarget(){return!e.t.isNull(e.t.getPointer(0,this))}_initTarget(){return e.t.initStructAt(0,C,this)}set target(t){e.t.copyFrom(t,e.t.getPointer(0,this))}get interfaceId(){return e.t.getUint64(8,this)}set interfaceId(t){e.t.setUint64(8,t,this)}get methodId(){return e.t.getUint16(4,this)}set methodId(t){e.t.setUint16(4,t,this)}get allowThirdPartyTailCall(){return e.t.getBit(128,this,r._capnp.defaultAllowThirdPartyTailCall)}set allowThirdPartyTailCall(t){e.t.setBit(128,t,this,r._capnp.defaultAllowThirdPartyTailCall)}get noPromisePipelining(){return e.t.getBit(129,this,r._capnp.defaultNoPromisePipelining)}set noPromisePipelining(t){e.t.setBit(129,t,this,r._capnp.defaultNoPromisePipelining)}get onlyPromisePipeline(){return e.t.getBit(130,this,r._capnp.defaultOnlyPromisePipeline)}set onlyPromisePipeline(t){e.t.setBit(130,t,this,r._capnp.defaultOnlyPromisePipeline)}_adoptParams(t){e.t.adopt(t,e.t.getPointer(1,this))}_disownParams(){return e.t.disown(this.params)}get params(){return e.t.getStruct(1,w,this)}_hasParams(){return!e.t.isNull(e.t.getPointer(1,this))}_initParams(){return e.t.initStructAt(1,w,this)}set params(t){e.t.copyFrom(t,e.t.getPointer(1,this))}get sendResultsTo(){return e.t.getAs(c,this)}_initSendResultsTo(){return e.t.getAs(c,this)}toString(){return`Call_`+super.toString()}};const u={RESULTS:0,EXCEPTION:1,CANCELED:2,RESULTS_SENT_ELSEWHERE:3,TAKE_FROM_OTHER_QUESTION:4,ACCEPT_FROM_THIRD_PARTY:5};var d=class r extends t.S{static RESULTS=u.RESULTS;static EXCEPTION=u.EXCEPTION;static CANCELED=u.CANCELED;static RESULTS_SENT_ELSEWHERE=u.RESULTS_SENT_ELSEWHERE;static TAKE_FROM_OTHER_QUESTION=u.TAKE_FROM_OTHER_QUESTION;static ACCEPT_FROM_THIRD_PARTY=u.ACCEPT_FROM_THIRD_PARTY;static _capnp={displayName:`Return`,id:`9e19b28d3db3573a`,size:new t.O(16,1),defaultReleaseParamCaps:n.g(!0,0),defaultNoFinishNeeded:n.g(!1,1)};get answerId(){return e.t.getUint32(0,this)}set answerId(t){e.t.setUint32(0,t,this)}get releaseParamCaps(){return e.t.getBit(32,this,r._capnp.defaultReleaseParamCaps)}set releaseParamCaps(t){e.t.setBit(32,t,this,r._capnp.defaultReleaseParamCaps)}get noFinishNeeded(){return e.t.getBit(33,this,r._capnp.defaultNoFinishNeeded)}set noFinishNeeded(t){e.t.setBit(33,t,this,r._capnp.defaultNoFinishNeeded)}_adoptResults(t){e.t.setUint16(6,0,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownResults(){return e.t.disown(this.results)}get results(){return e.t.testWhich(`results`,e.t.getUint16(6,this),0,this),e.t.getStruct(0,w,this)}_hasResults(){return!e.t.isNull(e.t.getPointer(0,this))}_initResults(){return e.t.setUint16(6,0,this),e.t.initStructAt(0,w,this)}get _isResults(){return e.t.getUint16(6,this)===0}set results(t){e.t.setUint16(6,0,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptException(t){e.t.setUint16(6,1,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownException(){return e.t.disown(this.exception)}get exception(){return e.t.testWhich(`exception`,e.t.getUint16(6,this),1,this),e.t.getStruct(0,M,this)}_hasException(){return!e.t.isNull(e.t.getPointer(0,this))}_initException(){return e.t.setUint16(6,1,this),e.t.initStructAt(0,M,this)}get _isException(){return e.t.getUint16(6,this)===1}set exception(t){e.t.setUint16(6,1,this),e.t.copyFrom(t,e.t.getPointer(0,this))}get _isCanceled(){return e.t.getUint16(6,this)===2}set canceled(t){e.t.setUint16(6,2,this)}get _isResultsSentElsewhere(){return e.t.getUint16(6,this)===3}set resultsSentElsewhere(t){e.t.setUint16(6,3,this)}get takeFromOtherQuestion(){return e.t.testWhich(`takeFromOtherQuestion`,e.t.getUint16(6,this),4,this),e.t.getUint32(8,this)}get _isTakeFromOtherQuestion(){return e.t.getUint16(6,this)===4}set takeFromOtherQuestion(t){e.t.setUint16(6,4,this),e.t.setUint32(8,t,this)}_adoptAcceptFromThirdParty(t){e.t.setUint16(6,5,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownAcceptFromThirdParty(){return e.t.disown(this.acceptFromThirdParty)}get acceptFromThirdParty(){return e.t.testWhich(`acceptFromThirdParty`,e.t.getUint16(6,this),5,this),e.t.getPointer(0,this)}_hasAcceptFromThirdParty(){return!e.t.isNull(e.t.getPointer(0,this))}get _isAcceptFromThirdParty(){return e.t.getUint16(6,this)===5}set acceptFromThirdParty(t){e.t.setUint16(6,5,this),e.t.copyFrom(t,e.t.getPointer(0,this))}toString(){return`Return_`+super.toString()}which(){return e.t.getUint16(6,this)}},f=class r extends t.S{static _capnp={displayName:`Finish`,id:`d37d2eb2c2f80e63`,size:new t.O(8,0),defaultReleaseResultCaps:n.g(!0,0),defaultRequireEarlyCancellationWorkaround:n.g(!0,1)};get questionId(){return e.t.getUint32(0,this)}set questionId(t){e.t.setUint32(0,t,this)}get releaseResultCaps(){return e.t.getBit(32,this,r._capnp.defaultReleaseResultCaps)}set releaseResultCaps(t){e.t.setBit(32,t,this,r._capnp.defaultReleaseResultCaps)}get requireEarlyCancellationWorkaround(){return e.t.getBit(33,this,r._capnp.defaultRequireEarlyCancellationWorkaround)}set requireEarlyCancellationWorkaround(t){e.t.setBit(33,t,this,r._capnp.defaultRequireEarlyCancellationWorkaround)}toString(){return`Finish_`+super.toString()}};const p={CAP:0,EXCEPTION:1};var m=class extends t.S{static CAP=p.CAP;static EXCEPTION=p.EXCEPTION;static _capnp={displayName:`Resolve`,id:`bbc29655fa89086e`,size:new t.O(8,1)};get promiseId(){return e.t.getUint32(0,this)}set promiseId(t){e.t.setUint32(0,t,this)}_adoptCap(t){e.t.setUint16(4,0,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownCap(){return e.t.disown(this.cap)}get cap(){return e.t.testWhich(`cap`,e.t.getUint16(4,this),0,this),e.t.getStruct(0,E,this)}_hasCap(){return!e.t.isNull(e.t.getPointer(0,this))}_initCap(){return e.t.setUint16(4,0,this),e.t.initStructAt(0,E,this)}get _isCap(){return e.t.getUint16(4,this)===0}set cap(t){e.t.setUint16(4,0,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptException(t){e.t.setUint16(4,1,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownException(){return e.t.disown(this.exception)}get exception(){return e.t.testWhich(`exception`,e.t.getUint16(4,this),1,this),e.t.getStruct(0,M,this)}_hasException(){return!e.t.isNull(e.t.getPointer(0,this))}_initException(){return e.t.setUint16(4,1,this),e.t.initStructAt(0,M,this)}get _isException(){return e.t.getUint16(4,this)===1}set exception(t){e.t.setUint16(4,1,this),e.t.copyFrom(t,e.t.getPointer(0,this))}toString(){return`Resolve_`+super.toString()}which(){return e.t.getUint16(4,this)}},h=class extends t.S{static _capnp={displayName:`Release`,id:`ad1a6c0d7dd07497`,size:new t.O(8,0)};get id(){return e.t.getUint32(0,this)}set id(t){e.t.setUint32(0,t,this)}get referenceCount(){return e.t.getUint32(4,this)}set referenceCount(t){e.t.setUint32(4,t,this)}toString(){return`Release_`+super.toString()}};const g={SENDER_LOOPBACK:0,RECEIVER_LOOPBACK:1,ACCEPT:2,PROVIDE:3};var _=class extends t.S{static SENDER_LOOPBACK=g.SENDER_LOOPBACK;static RECEIVER_LOOPBACK=g.RECEIVER_LOOPBACK;static ACCEPT=g.ACCEPT;static PROVIDE=g.PROVIDE;static _capnp={displayName:`context`,id:`d562b4df655bdd4d`,size:new t.O(8,1)};get senderLoopback(){return e.t.testWhich(`senderLoopback`,e.t.getUint16(4,this),0,this),e.t.getUint32(0,this)}get _isSenderLoopback(){return e.t.getUint16(4,this)===0}set senderLoopback(t){e.t.setUint16(4,0,this),e.t.setUint32(0,t,this)}get receiverLoopback(){return e.t.testWhich(`receiverLoopback`,e.t.getUint16(4,this),1,this),e.t.getUint32(0,this)}get _isReceiverLoopback(){return e.t.getUint16(4,this)===1}set receiverLoopback(t){e.t.setUint16(4,1,this),e.t.setUint32(0,t,this)}get _isAccept(){return e.t.getUint16(4,this)===2}set accept(t){e.t.setUint16(4,2,this)}get provide(){return e.t.testWhich(`provide`,e.t.getUint16(4,this),3,this),e.t.getUint32(0,this)}get _isProvide(){return e.t.getUint16(4,this)===3}set provide(t){e.t.setUint16(4,3,this),e.t.setUint32(0,t,this)}toString(){return`Disembargo_Context_`+super.toString()}which(){return e.t.getUint16(4,this)}},v=class extends t.S{static _capnp={displayName:`Disembargo`,id:`f964368b0fbd3711`,size:new t.O(8,1)};_adoptTarget(t){e.t.adopt(t,e.t.getPointer(0,this))}_disownTarget(){return e.t.disown(this.target)}get target(){return e.t.getStruct(0,C,this)}_hasTarget(){return!e.t.isNull(e.t.getPointer(0,this))}_initTarget(){return e.t.initStructAt(0,C,this)}set target(t){e.t.copyFrom(t,e.t.getPointer(0,this))}get context(){return e.t.getAs(_,this)}_initContext(){return e.t.getAs(_,this)}toString(){return`Disembargo_`+super.toString()}},y=class extends t.S{static _capnp={displayName:`Provide`,id:`9c6a046bfbc1ac5a`,size:new t.O(8,2)};get questionId(){return e.t.getUint32(0,this)}set questionId(t){e.t.setUint32(0,t,this)}_adoptTarget(t){e.t.adopt(t,e.t.getPointer(0,this))}_disownTarget(){return e.t.disown(this.target)}get target(){return e.t.getStruct(0,C,this)}_hasTarget(){return!e.t.isNull(e.t.getPointer(0,this))}_initTarget(){return e.t.initStructAt(0,C,this)}set target(t){e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptRecipient(t){e.t.adopt(t,e.t.getPointer(1,this))}_disownRecipient(){return e.t.disown(this.recipient)}get recipient(){return e.t.getPointer(1,this)}_hasRecipient(){return!e.t.isNull(e.t.getPointer(1,this))}set recipient(t){e.t.copyFrom(t,e.t.getPointer(1,this))}toString(){return`Provide_`+super.toString()}},b=class extends t.S{static _capnp={displayName:`Accept`,id:`d4c9b56290554016`,size:new t.O(8,1)};get questionId(){return e.t.getUint32(0,this)}set questionId(t){e.t.setUint32(0,t,this)}_adoptProvision(t){e.t.adopt(t,e.t.getPointer(0,this))}_disownProvision(){return e.t.disown(this.provision)}get provision(){return e.t.getPointer(0,this)}_hasProvision(){return!e.t.isNull(e.t.getPointer(0,this))}set provision(t){e.t.copyFrom(t,e.t.getPointer(0,this))}get embargo(){return e.t.getBit(32,this)}set embargo(t){e.t.setBit(32,t,this)}toString(){return`Accept_`+super.toString()}},x=class extends t.S{static _capnp={displayName:`Join`,id:`fbe1980490e001af`,size:new t.O(8,2)};get questionId(){return e.t.getUint32(0,this)}set questionId(t){e.t.setUint32(0,t,this)}_adoptTarget(t){e.t.adopt(t,e.t.getPointer(0,this))}_disownTarget(){return e.t.disown(this.target)}get target(){return e.t.getStruct(0,C,this)}_hasTarget(){return!e.t.isNull(e.t.getPointer(0,this))}_initTarget(){return e.t.initStructAt(0,C,this)}set target(t){e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptKeyPart(t){e.t.adopt(t,e.t.getPointer(1,this))}_disownKeyPart(){return e.t.disown(this.keyPart)}get keyPart(){return e.t.getPointer(1,this)}_hasKeyPart(){return!e.t.isNull(e.t.getPointer(1,this))}set keyPart(t){e.t.copyFrom(t,e.t.getPointer(1,this))}toString(){return`Join_`+super.toString()}};const S={IMPORTED_CAP:0,PROMISED_ANSWER:1};var C=class extends t.S{static IMPORTED_CAP=S.IMPORTED_CAP;static PROMISED_ANSWER=S.PROMISED_ANSWER;static _capnp={displayName:`MessageTarget`,id:`95bc14545813fbc1`,size:new t.O(8,1)};get importedCap(){return e.t.testWhich(`importedCap`,e.t.getUint16(4,this),0,this),e.t.getUint32(0,this)}get _isImportedCap(){return e.t.getUint16(4,this)===0}set importedCap(t){e.t.setUint16(4,0,this),e.t.setUint32(0,t,this)}_adoptPromisedAnswer(t){e.t.setUint16(4,1,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownPromisedAnswer(){return e.t.disown(this.promisedAnswer)}get promisedAnswer(){return e.t.testWhich(`promisedAnswer`,e.t.getUint16(4,this),1,this),e.t.getStruct(0,k,this)}_hasPromisedAnswer(){return!e.t.isNull(e.t.getPointer(0,this))}_initPromisedAnswer(){return e.t.setUint16(4,1,this),e.t.initStructAt(0,k,this)}get _isPromisedAnswer(){return e.t.getUint16(4,this)===1}set promisedAnswer(t){e.t.setUint16(4,1,this),e.t.copyFrom(t,e.t.getPointer(0,this))}toString(){return`MessageTarget_`+super.toString()}which(){return e.t.getUint16(4,this)}},w=class n extends t.S{static _capnp={displayName:`Payload`,id:`9a0e61223d96743b`,size:new t.O(0,2)};static _CapTable;_adoptContent(t){e.t.adopt(t,e.t.getPointer(0,this))}_disownContent(){return e.t.disown(this.content)}get content(){return e.t.getPointer(0,this)}_hasContent(){return!e.t.isNull(e.t.getPointer(0,this))}set content(t){e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptCapTable(t){e.t.adopt(t,e.t.getPointer(1,this))}_disownCapTable(){return e.t.disown(this.capTable)}get capTable(){return e.t.getList(1,n._CapTable,this)}_hasCapTable(){return!e.t.isNull(e.t.getPointer(1,this))}_initCapTable(t){return e.t.initList(1,n._CapTable,t,this)}set capTable(t){e.t.copyFrom(t,e.t.getPointer(1,this))}toString(){return`Payload_`+super.toString()}};const T={NONE:0,SENDER_HOSTED:1,SENDER_PROMISE:2,RECEIVER_HOSTED:3,RECEIVER_ANSWER:4,THIRD_PARTY_HOSTED:5};var E=class r extends t.S{static NONE=T.NONE;static SENDER_HOSTED=T.SENDER_HOSTED;static SENDER_PROMISE=T.SENDER_PROMISE;static RECEIVER_HOSTED=T.RECEIVER_HOSTED;static RECEIVER_ANSWER=T.RECEIVER_ANSWER;static THIRD_PARTY_HOSTED=T.THIRD_PARTY_HOSTED;static _capnp={displayName:`CapDescriptor`,id:`8523ddc40b86b8b0`,size:new t.O(8,1),defaultAttachedFd:n.a(255)};get _isNone(){return e.t.getUint16(0,this)===0}set none(t){e.t.setUint16(0,0,this)}get senderHosted(){return e.t.testWhich(`senderHosted`,e.t.getUint16(0,this),1,this),e.t.getUint32(4,this)}get _isSenderHosted(){return e.t.getUint16(0,this)===1}set senderHosted(t){e.t.setUint16(0,1,this),e.t.setUint32(4,t,this)}get senderPromise(){return e.t.testWhich(`senderPromise`,e.t.getUint16(0,this),2,this),e.t.getUint32(4,this)}get _isSenderPromise(){return e.t.getUint16(0,this)===2}set senderPromise(t){e.t.setUint16(0,2,this),e.t.setUint32(4,t,this)}get receiverHosted(){return e.t.testWhich(`receiverHosted`,e.t.getUint16(0,this),3,this),e.t.getUint32(4,this)}get _isReceiverHosted(){return e.t.getUint16(0,this)===3}set receiverHosted(t){e.t.setUint16(0,3,this),e.t.setUint32(4,t,this)}_adoptReceiverAnswer(t){e.t.setUint16(0,4,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownReceiverAnswer(){return e.t.disown(this.receiverAnswer)}get receiverAnswer(){return e.t.testWhich(`receiverAnswer`,e.t.getUint16(0,this),4,this),e.t.getStruct(0,k,this)}_hasReceiverAnswer(){return!e.t.isNull(e.t.getPointer(0,this))}_initReceiverAnswer(){return e.t.setUint16(0,4,this),e.t.initStructAt(0,k,this)}get _isReceiverAnswer(){return e.t.getUint16(0,this)===4}set receiverAnswer(t){e.t.setUint16(0,4,this),e.t.copyFrom(t,e.t.getPointer(0,this))}_adoptThirdPartyHosted(t){e.t.setUint16(0,5,this),e.t.adopt(t,e.t.getPointer(0,this))}_disownThirdPartyHosted(){return e.t.disown(this.thirdPartyHosted)}get thirdPartyHosted(){return e.t.testWhich(`thirdPartyHosted`,e.t.getUint16(0,this),5,this),e.t.getStruct(0,A,this)}_hasThirdPartyHosted(){return!e.t.isNull(e.t.getPointer(0,this))}_initThirdPartyHosted(){return e.t.setUint16(0,5,this),e.t.initStructAt(0,A,this)}get _isThirdPartyHosted(){return e.t.getUint16(0,this)===5}set thirdPartyHosted(t){e.t.setUint16(0,5,this),e.t.copyFrom(t,e.t.getPointer(0,this))}get attachedFd(){return e.t.getUint8(2,this,r._capnp.defaultAttachedFd)}set attachedFd(t){e.t.setUint8(2,t,this,r._capnp.defaultAttachedFd)}toString(){return`CapDescriptor_`+super.toString()}which(){return e.t.getUint16(0,this)}};const D={NOOP:0,GET_POINTER_FIELD:1};var O=class extends t.S{static NOOP=D.NOOP;static GET_POINTER_FIELD=D.GET_POINTER_FIELD;static _capnp={displayName:`Op`,id:`f316944415569081`,size:new t.O(8,0)};get _isNoop(){return e.t.getUint16(0,this)===0}set noop(t){e.t.setUint16(0,0,this)}get getPointerField(){return e.t.testWhich(`getPointerField`,e.t.getUint16(0,this),1,this),e.t.getUint16(2,this)}get _isGetPointerField(){return e.t.getUint16(0,this)===1}set getPointerField(t){e.t.setUint16(0,1,this),e.t.setUint16(2,t,this)}toString(){return`PromisedAnswer_Op_`+super.toString()}which(){return e.t.getUint16(0,this)}},k=class n extends t.S{static Op=O;static _capnp={displayName:`PromisedAnswer`,id:`d800b1d6cd6f1ca0`,size:new t.O(8,1)};static _Transform;get questionId(){return e.t.getUint32(0,this)}set questionId(t){e.t.setUint32(0,t,this)}_adoptTransform(t){e.t.adopt(t,e.t.getPointer(0,this))}_disownTransform(){return e.t.disown(this.transform)}get transform(){return e.t.getList(0,n._Transform,this)}_hasTransform(){return!e.t.isNull(e.t.getPointer(0,this))}_initTransform(t){return e.t.initList(0,n._Transform,t,this)}set transform(t){e.t.copyFrom(t,e.t.getPointer(0,this))}toString(){return`PromisedAnswer_`+super.toString()}},A=class extends t.S{static _capnp={displayName:`ThirdPartyCapDescriptor`,id:`d37007fde1f0027d`,size:new t.O(8,1)};_adoptId(t){e.t.adopt(t,e.t.getPointer(0,this))}_disownId(){return e.t.disown(this.id)}get id(){return e.t.getPointer(0,this)}_hasId(){return!e.t.isNull(e.t.getPointer(0,this))}set id(t){e.t.copyFrom(t,e.t.getPointer(0,this))}get vineId(){return e.t.getUint32(0,this)}set vineId(t){e.t.setUint32(0,t,this)}toString(){return`ThirdPartyCapDescriptor_`+super.toString()}};const j={FAILED:0,OVERLOADED:1,DISCONNECTED:2,UNIMPLEMENTED:3};var M=class extends t.S{static Type=j;static _capnp={displayName:`Exception`,id:`d625b7063acf691a`,size:new t.O(8,2)};get reason(){return e.t.getText(0,this)}set reason(t){e.t.setText(0,t,this)}get type(){return e.t.getUint16(4,this)}set type(t){e.t.setUint16(4,t,this)}get obsoleteIsCallersFault(){return e.t.getBit(0,this)}set obsoleteIsCallersFault(t){e.t.setBit(0,t,this)}get obsoleteDurability(){return e.t.getUint16(2,this)}set obsoleteDurability(t){e.t.setUint16(2,t,this)}get trace(){return e.t.getText(1,this)}set trace(t){e.t.setText(1,t,this)}toString(){return`Exception_`+super.toString()}};w._CapTable=n.C(E),k._Transform=n.C(O),exports.Accept=b,exports.Bootstrap=o,exports.Call=l,exports.Call_SendResultsTo=c,exports.Call_SendResultsTo_Which=s,exports.CapDescriptor=E,exports.CapDescriptor_Which=T,exports.Disembargo=v,exports.Disembargo_Context=_,exports.Disembargo_Context_Which=g,exports.Exception=M,exports.Exception_Type=j,exports.Finish=f,exports.Join=x,exports.Message=a,exports.MessageTarget=C,exports.MessageTarget_Which=S,exports.Message_Which=i,exports.Payload=w,exports.PromisedAnswer=k,exports.PromisedAnswer_Op=O,exports.PromisedAnswer_Op_Which=D,exports.Provide=y,exports.Release=h,exports.Resolve=m,exports.Resolve_Which=p,exports.Return=d,exports.Return_Which=u,exports.ThirdPartyCapDescriptor=A,exports._capnpFileId=r;