@rivetkit/engine-runner-protocol 25.7.1-rc.1 → 25.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +203 -0
- package/package.json +32 -32
- package/dist/index.d.ts +0 -345
- package/dist/index.js +0 -999
package/LICENSE
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2023 Rivet Gaming, Inc.
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
203
|
+
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
2
|
+
"name": "@rivetkit/engine-runner-protocol",
|
|
3
|
+
"version": "25.7.2",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
"import": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"default": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"require": {
|
|
12
|
+
"types": "./dist/index.d.cts",
|
|
13
|
+
"default": "./dist/index.cjs"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist/**/*.js",
|
|
18
|
+
"dist/**/*.d.ts"
|
|
19
|
+
],
|
|
20
|
+
"types": "dist/index.d.ts",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@bare-ts/lib": "^0.4.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/node": "^20.0.0",
|
|
26
|
+
"typescript": "^5.0.0",
|
|
27
|
+
"tsup": "^8.4.0"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsup src/index.ts",
|
|
31
|
+
"clean": "rm -rf dist",
|
|
32
|
+
"check-types": "tsc --noEmit"
|
|
33
|
+
}
|
|
34
34
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import * as bare from '@bare-ts/lib';
|
|
2
|
-
|
|
3
|
-
type i64 = bigint;
|
|
4
|
-
type u32 = number;
|
|
5
|
-
type u64 = bigint;
|
|
6
|
-
type Id = string;
|
|
7
|
-
declare function readId(bc: bare.ByteCursor): Id;
|
|
8
|
-
declare function writeId(bc: bare.ByteCursor, x: Id): void;
|
|
9
|
-
type Json = string;
|
|
10
|
-
declare function readJson(bc: bare.ByteCursor): Json;
|
|
11
|
-
declare function writeJson(bc: bare.ByteCursor, x: Json): void;
|
|
12
|
-
type KvKey = ArrayBuffer;
|
|
13
|
-
declare function readKvKey(bc: bare.ByteCursor): KvKey;
|
|
14
|
-
declare function writeKvKey(bc: bare.ByteCursor, x: KvKey): void;
|
|
15
|
-
type KvValue = ArrayBuffer;
|
|
16
|
-
declare function readKvValue(bc: bare.ByteCursor): KvValue;
|
|
17
|
-
declare function writeKvValue(bc: bare.ByteCursor, x: KvValue): void;
|
|
18
|
-
type KvMetadata = {
|
|
19
|
-
readonly version: ArrayBuffer;
|
|
20
|
-
readonly createTs: i64;
|
|
21
|
-
};
|
|
22
|
-
declare function readKvMetadata(bc: bare.ByteCursor): KvMetadata;
|
|
23
|
-
declare function writeKvMetadata(bc: bare.ByteCursor, x: KvMetadata): void;
|
|
24
|
-
type KvListAllQuery = null;
|
|
25
|
-
type KvListRangeQuery = {
|
|
26
|
-
readonly start: KvKey;
|
|
27
|
-
readonly end: KvKey;
|
|
28
|
-
readonly exclusive: boolean;
|
|
29
|
-
};
|
|
30
|
-
declare function readKvListRangeQuery(bc: bare.ByteCursor): KvListRangeQuery;
|
|
31
|
-
declare function writeKvListRangeQuery(bc: bare.ByteCursor, x: KvListRangeQuery): void;
|
|
32
|
-
type KvListPrefixQuery = {
|
|
33
|
-
readonly key: KvKey;
|
|
34
|
-
};
|
|
35
|
-
declare function readKvListPrefixQuery(bc: bare.ByteCursor): KvListPrefixQuery;
|
|
36
|
-
declare function writeKvListPrefixQuery(bc: bare.ByteCursor, x: KvListPrefixQuery): void;
|
|
37
|
-
type KvListQuery = {
|
|
38
|
-
readonly tag: "KvListAllQuery";
|
|
39
|
-
readonly val: KvListAllQuery;
|
|
40
|
-
} | {
|
|
41
|
-
readonly tag: "KvListRangeQuery";
|
|
42
|
-
readonly val: KvListRangeQuery;
|
|
43
|
-
} | {
|
|
44
|
-
readonly tag: "KvListPrefixQuery";
|
|
45
|
-
readonly val: KvListPrefixQuery;
|
|
46
|
-
};
|
|
47
|
-
declare function readKvListQuery(bc: bare.ByteCursor): KvListQuery;
|
|
48
|
-
declare function writeKvListQuery(bc: bare.ByteCursor, x: KvListQuery): void;
|
|
49
|
-
type ActorName = {
|
|
50
|
-
readonly metadata: Json;
|
|
51
|
-
};
|
|
52
|
-
declare function readActorName(bc: bare.ByteCursor): ActorName;
|
|
53
|
-
declare function writeActorName(bc: bare.ByteCursor, x: ActorName): void;
|
|
54
|
-
declare enum StopCode {
|
|
55
|
-
Ok = "Ok",
|
|
56
|
-
Error = "Error"
|
|
57
|
-
}
|
|
58
|
-
declare function readStopCode(bc: bare.ByteCursor): StopCode;
|
|
59
|
-
declare function writeStopCode(bc: bare.ByteCursor, x: StopCode): void;
|
|
60
|
-
type ActorIntentSleep = null;
|
|
61
|
-
type ActorIntentStop = null;
|
|
62
|
-
type ActorIntent = {
|
|
63
|
-
readonly tag: "ActorIntentSleep";
|
|
64
|
-
readonly val: ActorIntentSleep;
|
|
65
|
-
} | {
|
|
66
|
-
readonly tag: "ActorIntentStop";
|
|
67
|
-
readonly val: ActorIntentStop;
|
|
68
|
-
};
|
|
69
|
-
declare function readActorIntent(bc: bare.ByteCursor): ActorIntent;
|
|
70
|
-
declare function writeActorIntent(bc: bare.ByteCursor, x: ActorIntent): void;
|
|
71
|
-
type ActorStateRunning = null;
|
|
72
|
-
type ActorStateStopped = {
|
|
73
|
-
readonly code: StopCode;
|
|
74
|
-
readonly message: string | null;
|
|
75
|
-
};
|
|
76
|
-
declare function readActorStateStopped(bc: bare.ByteCursor): ActorStateStopped;
|
|
77
|
-
declare function writeActorStateStopped(bc: bare.ByteCursor, x: ActorStateStopped): void;
|
|
78
|
-
type ActorState = {
|
|
79
|
-
readonly tag: "ActorStateRunning";
|
|
80
|
-
readonly val: ActorStateRunning;
|
|
81
|
-
} | {
|
|
82
|
-
readonly tag: "ActorStateStopped";
|
|
83
|
-
readonly val: ActorStateStopped;
|
|
84
|
-
};
|
|
85
|
-
declare function readActorState(bc: bare.ByteCursor): ActorState;
|
|
86
|
-
declare function writeActorState(bc: bare.ByteCursor, x: ActorState): void;
|
|
87
|
-
type EventActorIntent = {
|
|
88
|
-
readonly actorId: Id;
|
|
89
|
-
readonly generation: u32;
|
|
90
|
-
readonly intent: ActorIntent;
|
|
91
|
-
};
|
|
92
|
-
declare function readEventActorIntent(bc: bare.ByteCursor): EventActorIntent;
|
|
93
|
-
declare function writeEventActorIntent(bc: bare.ByteCursor, x: EventActorIntent): void;
|
|
94
|
-
type EventActorStateUpdate = {
|
|
95
|
-
readonly actorId: Id;
|
|
96
|
-
readonly generation: u32;
|
|
97
|
-
readonly state: ActorState;
|
|
98
|
-
};
|
|
99
|
-
declare function readEventActorStateUpdate(bc: bare.ByteCursor): EventActorStateUpdate;
|
|
100
|
-
declare function writeEventActorStateUpdate(bc: bare.ByteCursor, x: EventActorStateUpdate): void;
|
|
101
|
-
type EventActorSetAlarm = {
|
|
102
|
-
readonly actorId: Id;
|
|
103
|
-
readonly generation: u32;
|
|
104
|
-
readonly alarmTs: i64 | null;
|
|
105
|
-
};
|
|
106
|
-
declare function readEventActorSetAlarm(bc: bare.ByteCursor): EventActorSetAlarm;
|
|
107
|
-
declare function writeEventActorSetAlarm(bc: bare.ByteCursor, x: EventActorSetAlarm): void;
|
|
108
|
-
type Event = {
|
|
109
|
-
readonly tag: "EventActorIntent";
|
|
110
|
-
readonly val: EventActorIntent;
|
|
111
|
-
} | {
|
|
112
|
-
readonly tag: "EventActorStateUpdate";
|
|
113
|
-
readonly val: EventActorStateUpdate;
|
|
114
|
-
} | {
|
|
115
|
-
readonly tag: "EventActorSetAlarm";
|
|
116
|
-
readonly val: EventActorSetAlarm;
|
|
117
|
-
};
|
|
118
|
-
declare function readEvent(bc: bare.ByteCursor): Event;
|
|
119
|
-
declare function writeEvent(bc: bare.ByteCursor, x: Event): void;
|
|
120
|
-
type EventWrapper = {
|
|
121
|
-
readonly index: i64;
|
|
122
|
-
readonly inner: Event;
|
|
123
|
-
};
|
|
124
|
-
declare function readEventWrapper(bc: bare.ByteCursor): EventWrapper;
|
|
125
|
-
declare function writeEventWrapper(bc: bare.ByteCursor, x: EventWrapper): void;
|
|
126
|
-
type ActorConfig = {
|
|
127
|
-
readonly name: string;
|
|
128
|
-
readonly key: string | null;
|
|
129
|
-
readonly createTs: i64;
|
|
130
|
-
readonly input: ArrayBuffer | null;
|
|
131
|
-
};
|
|
132
|
-
declare function readActorConfig(bc: bare.ByteCursor): ActorConfig;
|
|
133
|
-
declare function writeActorConfig(bc: bare.ByteCursor, x: ActorConfig): void;
|
|
134
|
-
type CommandStartActor = {
|
|
135
|
-
readonly actorId: Id;
|
|
136
|
-
readonly generation: u32;
|
|
137
|
-
readonly config: ActorConfig;
|
|
138
|
-
};
|
|
139
|
-
declare function readCommandStartActor(bc: bare.ByteCursor): CommandStartActor;
|
|
140
|
-
declare function writeCommandStartActor(bc: bare.ByteCursor, x: CommandStartActor): void;
|
|
141
|
-
type CommandStopActor = {
|
|
142
|
-
readonly actorId: Id;
|
|
143
|
-
readonly generation: u32;
|
|
144
|
-
};
|
|
145
|
-
declare function readCommandStopActor(bc: bare.ByteCursor): CommandStopActor;
|
|
146
|
-
declare function writeCommandStopActor(bc: bare.ByteCursor, x: CommandStopActor): void;
|
|
147
|
-
type Command = {
|
|
148
|
-
readonly tag: "CommandStartActor";
|
|
149
|
-
readonly val: CommandStartActor;
|
|
150
|
-
} | {
|
|
151
|
-
readonly tag: "CommandStopActor";
|
|
152
|
-
readonly val: CommandStopActor;
|
|
153
|
-
};
|
|
154
|
-
declare function readCommand(bc: bare.ByteCursor): Command;
|
|
155
|
-
declare function writeCommand(bc: bare.ByteCursor, x: Command): void;
|
|
156
|
-
type CommandWrapper = {
|
|
157
|
-
readonly index: i64;
|
|
158
|
-
readonly inner: Command;
|
|
159
|
-
};
|
|
160
|
-
declare function readCommandWrapper(bc: bare.ByteCursor): CommandWrapper;
|
|
161
|
-
declare function writeCommandWrapper(bc: bare.ByteCursor, x: CommandWrapper): void;
|
|
162
|
-
type ToServerInit = {
|
|
163
|
-
readonly name: string;
|
|
164
|
-
readonly version: u32;
|
|
165
|
-
readonly totalSlots: u32;
|
|
166
|
-
readonly lastCommandIdx: i64 | null;
|
|
167
|
-
readonly prepopulateActorNames: ReadonlyMap<string, ActorName> | null;
|
|
168
|
-
readonly metadata: Json | null;
|
|
169
|
-
};
|
|
170
|
-
declare function readToServerInit(bc: bare.ByteCursor): ToServerInit;
|
|
171
|
-
declare function writeToServerInit(bc: bare.ByteCursor, x: ToServerInit): void;
|
|
172
|
-
type ToServerEvents = readonly EventWrapper[];
|
|
173
|
-
declare function readToServerEvents(bc: bare.ByteCursor): ToServerEvents;
|
|
174
|
-
declare function writeToServerEvents(bc: bare.ByteCursor, x: ToServerEvents): void;
|
|
175
|
-
type ToServerAckCommands = {
|
|
176
|
-
readonly lastCommandIdx: i64;
|
|
177
|
-
};
|
|
178
|
-
declare function readToServerAckCommands(bc: bare.ByteCursor): ToServerAckCommands;
|
|
179
|
-
declare function writeToServerAckCommands(bc: bare.ByteCursor, x: ToServerAckCommands): void;
|
|
180
|
-
type ToServerStopping = null;
|
|
181
|
-
type ToServerPing = {
|
|
182
|
-
readonly ts: i64;
|
|
183
|
-
};
|
|
184
|
-
declare function readToServerPing(bc: bare.ByteCursor): ToServerPing;
|
|
185
|
-
declare function writeToServerPing(bc: bare.ByteCursor, x: ToServerPing): void;
|
|
186
|
-
type KvGetRequest = {
|
|
187
|
-
readonly keys: readonly KvKey[];
|
|
188
|
-
};
|
|
189
|
-
declare function readKvGetRequest(bc: bare.ByteCursor): KvGetRequest;
|
|
190
|
-
declare function writeKvGetRequest(bc: bare.ByteCursor, x: KvGetRequest): void;
|
|
191
|
-
type KvListRequest = {
|
|
192
|
-
readonly query: KvListQuery;
|
|
193
|
-
readonly reverse: boolean | null;
|
|
194
|
-
readonly limit: u64 | null;
|
|
195
|
-
};
|
|
196
|
-
declare function readKvListRequest(bc: bare.ByteCursor): KvListRequest;
|
|
197
|
-
declare function writeKvListRequest(bc: bare.ByteCursor, x: KvListRequest): void;
|
|
198
|
-
type KvPutRequest = {
|
|
199
|
-
readonly keys: readonly KvKey[];
|
|
200
|
-
readonly values: readonly KvValue[];
|
|
201
|
-
};
|
|
202
|
-
declare function readKvPutRequest(bc: bare.ByteCursor): KvPutRequest;
|
|
203
|
-
declare function writeKvPutRequest(bc: bare.ByteCursor, x: KvPutRequest): void;
|
|
204
|
-
type KvDeleteRequest = {
|
|
205
|
-
readonly keys: readonly KvKey[];
|
|
206
|
-
};
|
|
207
|
-
declare function readKvDeleteRequest(bc: bare.ByteCursor): KvDeleteRequest;
|
|
208
|
-
declare function writeKvDeleteRequest(bc: bare.ByteCursor, x: KvDeleteRequest): void;
|
|
209
|
-
type KvDropRequest = null;
|
|
210
|
-
type KvRequestData = {
|
|
211
|
-
readonly tag: "KvGetRequest";
|
|
212
|
-
readonly val: KvGetRequest;
|
|
213
|
-
} | {
|
|
214
|
-
readonly tag: "KvListRequest";
|
|
215
|
-
readonly val: KvListRequest;
|
|
216
|
-
} | {
|
|
217
|
-
readonly tag: "KvPutRequest";
|
|
218
|
-
readonly val: KvPutRequest;
|
|
219
|
-
} | {
|
|
220
|
-
readonly tag: "KvDeleteRequest";
|
|
221
|
-
readonly val: KvDeleteRequest;
|
|
222
|
-
} | {
|
|
223
|
-
readonly tag: "KvDropRequest";
|
|
224
|
-
readonly val: KvDropRequest;
|
|
225
|
-
};
|
|
226
|
-
declare function readKvRequestData(bc: bare.ByteCursor): KvRequestData;
|
|
227
|
-
declare function writeKvRequestData(bc: bare.ByteCursor, x: KvRequestData): void;
|
|
228
|
-
type ToServerKvRequest = {
|
|
229
|
-
readonly actorId: Id;
|
|
230
|
-
readonly requestId: u32;
|
|
231
|
-
readonly data: KvRequestData;
|
|
232
|
-
};
|
|
233
|
-
declare function readToServerKvRequest(bc: bare.ByteCursor): ToServerKvRequest;
|
|
234
|
-
declare function writeToServerKvRequest(bc: bare.ByteCursor, x: ToServerKvRequest): void;
|
|
235
|
-
type ToServer = {
|
|
236
|
-
readonly tag: "ToServerInit";
|
|
237
|
-
readonly val: ToServerInit;
|
|
238
|
-
} | {
|
|
239
|
-
readonly tag: "ToServerEvents";
|
|
240
|
-
readonly val: ToServerEvents;
|
|
241
|
-
} | {
|
|
242
|
-
readonly tag: "ToServerAckCommands";
|
|
243
|
-
readonly val: ToServerAckCommands;
|
|
244
|
-
} | {
|
|
245
|
-
readonly tag: "ToServerStopping";
|
|
246
|
-
readonly val: ToServerStopping;
|
|
247
|
-
} | {
|
|
248
|
-
readonly tag: "ToServerPing";
|
|
249
|
-
readonly val: ToServerPing;
|
|
250
|
-
} | {
|
|
251
|
-
readonly tag: "ToServerKvRequest";
|
|
252
|
-
readonly val: ToServerKvRequest;
|
|
253
|
-
};
|
|
254
|
-
declare function readToServer(bc: bare.ByteCursor): ToServer;
|
|
255
|
-
declare function writeToServer(bc: bare.ByteCursor, x: ToServer): void;
|
|
256
|
-
declare function encodeToServer(x: ToServer, config?: Partial<bare.Config>): Uint8Array;
|
|
257
|
-
declare function decodeToServer(bytes: Uint8Array): ToServer;
|
|
258
|
-
type ProtocolMetadata = {
|
|
259
|
-
readonly runnerLostThreshold: i64;
|
|
260
|
-
};
|
|
261
|
-
declare function readProtocolMetadata(bc: bare.ByteCursor): ProtocolMetadata;
|
|
262
|
-
declare function writeProtocolMetadata(bc: bare.ByteCursor, x: ProtocolMetadata): void;
|
|
263
|
-
type ToClientInit = {
|
|
264
|
-
readonly runnerId: Id;
|
|
265
|
-
readonly lastEventIdx: i64;
|
|
266
|
-
readonly metadata: ProtocolMetadata;
|
|
267
|
-
};
|
|
268
|
-
declare function readToClientInit(bc: bare.ByteCursor): ToClientInit;
|
|
269
|
-
declare function writeToClientInit(bc: bare.ByteCursor, x: ToClientInit): void;
|
|
270
|
-
type ToClientCommands = readonly CommandWrapper[];
|
|
271
|
-
declare function readToClientCommands(bc: bare.ByteCursor): ToClientCommands;
|
|
272
|
-
declare function writeToClientCommands(bc: bare.ByteCursor, x: ToClientCommands): void;
|
|
273
|
-
type ToClientAckEvents = {
|
|
274
|
-
readonly lastEventIdx: i64;
|
|
275
|
-
};
|
|
276
|
-
declare function readToClientAckEvents(bc: bare.ByteCursor): ToClientAckEvents;
|
|
277
|
-
declare function writeToClientAckEvents(bc: bare.ByteCursor, x: ToClientAckEvents): void;
|
|
278
|
-
type KvErrorResponse = {
|
|
279
|
-
readonly message: string;
|
|
280
|
-
};
|
|
281
|
-
declare function readKvErrorResponse(bc: bare.ByteCursor): KvErrorResponse;
|
|
282
|
-
declare function writeKvErrorResponse(bc: bare.ByteCursor, x: KvErrorResponse): void;
|
|
283
|
-
type KvGetResponse = {
|
|
284
|
-
readonly keys: readonly KvKey[];
|
|
285
|
-
readonly values: readonly KvValue[];
|
|
286
|
-
readonly metadata: readonly KvMetadata[];
|
|
287
|
-
};
|
|
288
|
-
declare function readKvGetResponse(bc: bare.ByteCursor): KvGetResponse;
|
|
289
|
-
declare function writeKvGetResponse(bc: bare.ByteCursor, x: KvGetResponse): void;
|
|
290
|
-
type KvListResponse = {
|
|
291
|
-
readonly keys: readonly KvKey[];
|
|
292
|
-
readonly values: readonly KvValue[];
|
|
293
|
-
readonly metadata: readonly KvMetadata[];
|
|
294
|
-
};
|
|
295
|
-
declare function readKvListResponse(bc: bare.ByteCursor): KvListResponse;
|
|
296
|
-
declare function writeKvListResponse(bc: bare.ByteCursor, x: KvListResponse): void;
|
|
297
|
-
type KvPutResponse = null;
|
|
298
|
-
type KvDeleteResponse = null;
|
|
299
|
-
type KvDropResponse = null;
|
|
300
|
-
type KvResponseData = {
|
|
301
|
-
readonly tag: "KvErrorResponse";
|
|
302
|
-
readonly val: KvErrorResponse;
|
|
303
|
-
} | {
|
|
304
|
-
readonly tag: "KvGetResponse";
|
|
305
|
-
readonly val: KvGetResponse;
|
|
306
|
-
} | {
|
|
307
|
-
readonly tag: "KvListResponse";
|
|
308
|
-
readonly val: KvListResponse;
|
|
309
|
-
} | {
|
|
310
|
-
readonly tag: "KvPutResponse";
|
|
311
|
-
readonly val: KvPutResponse;
|
|
312
|
-
} | {
|
|
313
|
-
readonly tag: "KvDeleteResponse";
|
|
314
|
-
readonly val: KvDeleteResponse;
|
|
315
|
-
} | {
|
|
316
|
-
readonly tag: "KvDropResponse";
|
|
317
|
-
readonly val: KvDropResponse;
|
|
318
|
-
};
|
|
319
|
-
declare function readKvResponseData(bc: bare.ByteCursor): KvResponseData;
|
|
320
|
-
declare function writeKvResponseData(bc: bare.ByteCursor, x: KvResponseData): void;
|
|
321
|
-
type ToClientKvResponse = {
|
|
322
|
-
readonly requestId: u32;
|
|
323
|
-
readonly data: KvResponseData;
|
|
324
|
-
};
|
|
325
|
-
declare function readToClientKvResponse(bc: bare.ByteCursor): ToClientKvResponse;
|
|
326
|
-
declare function writeToClientKvResponse(bc: bare.ByteCursor, x: ToClientKvResponse): void;
|
|
327
|
-
type ToClient = {
|
|
328
|
-
readonly tag: "ToClientInit";
|
|
329
|
-
readonly val: ToClientInit;
|
|
330
|
-
} | {
|
|
331
|
-
readonly tag: "ToClientCommands";
|
|
332
|
-
readonly val: ToClientCommands;
|
|
333
|
-
} | {
|
|
334
|
-
readonly tag: "ToClientAckEvents";
|
|
335
|
-
readonly val: ToClientAckEvents;
|
|
336
|
-
} | {
|
|
337
|
-
readonly tag: "ToClientKvResponse";
|
|
338
|
-
readonly val: ToClientKvResponse;
|
|
339
|
-
};
|
|
340
|
-
declare function readToClient(bc: bare.ByteCursor): ToClient;
|
|
341
|
-
declare function writeToClient(bc: bare.ByteCursor, x: ToClient): void;
|
|
342
|
-
declare function encodeToClient(x: ToClient, config?: Partial<bare.Config>): Uint8Array;
|
|
343
|
-
declare function decodeToClient(bytes: Uint8Array): ToClient;
|
|
344
|
-
|
|
345
|
-
export { type ActorConfig, type ActorIntent, type ActorIntentSleep, type ActorIntentStop, type ActorName, type ActorState, type ActorStateRunning, type ActorStateStopped, type Command, type CommandStartActor, type CommandStopActor, type CommandWrapper, type Event, type EventActorIntent, type EventActorSetAlarm, type EventActorStateUpdate, type EventWrapper, type Id, type Json, type KvDeleteRequest, type KvDeleteResponse, type KvDropRequest, type KvDropResponse, type KvErrorResponse, type KvGetRequest, type KvGetResponse, type KvKey, type KvListAllQuery, type KvListPrefixQuery, type KvListQuery, type KvListRangeQuery, type KvListRequest, type KvListResponse, type KvMetadata, type KvPutRequest, type KvPutResponse, type KvRequestData, type KvResponseData, type KvValue, type ProtocolMetadata, StopCode, type ToClient, type ToClientAckEvents, type ToClientCommands, type ToClientInit, type ToClientKvResponse, type ToServer, type ToServerAckCommands, type ToServerEvents, type ToServerInit, type ToServerKvRequest, type ToServerPing, type ToServerStopping, decodeToClient, decodeToServer, encodeToClient, encodeToServer, type i64, readActorConfig, readActorIntent, readActorName, readActorState, readActorStateStopped, readCommand, readCommandStartActor, readCommandStopActor, readCommandWrapper, readEvent, readEventActorIntent, readEventActorSetAlarm, readEventActorStateUpdate, readEventWrapper, readId, readJson, readKvDeleteRequest, readKvErrorResponse, readKvGetRequest, readKvGetResponse, readKvKey, readKvListPrefixQuery, readKvListQuery, readKvListRangeQuery, readKvListRequest, readKvListResponse, readKvMetadata, readKvPutRequest, readKvRequestData, readKvResponseData, readKvValue, readProtocolMetadata, readStopCode, readToClient, readToClientAckEvents, readToClientCommands, readToClientInit, readToClientKvResponse, readToServer, readToServerAckCommands, readToServerEvents, readToServerInit, readToServerKvRequest, readToServerPing, type u32, type u64, writeActorConfig, writeActorIntent, writeActorName, writeActorState, writeActorStateStopped, writeCommand, writeCommandStartActor, writeCommandStopActor, writeCommandWrapper, writeEvent, writeEventActorIntent, writeEventActorSetAlarm, writeEventActorStateUpdate, writeEventWrapper, writeId, writeJson, writeKvDeleteRequest, writeKvErrorResponse, writeKvGetRequest, writeKvGetResponse, writeKvKey, writeKvListPrefixQuery, writeKvListQuery, writeKvListRangeQuery, writeKvListRequest, writeKvListResponse, writeKvMetadata, writeKvPutRequest, writeKvRequestData, writeKvResponseData, writeKvValue, writeProtocolMetadata, writeStopCode, writeToClient, writeToClientAckEvents, writeToClientCommands, writeToClientInit, writeToClientKvResponse, writeToServer, writeToServerAckCommands, writeToServerEvents, writeToServerInit, writeToServerKvRequest, writeToServerPing };
|