@rise-maritime/keelson-js 0.6.0-pre.7 → 0.6.0-pre.9

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/dist/index.d.ts CHANGED
@@ -183,6 +183,67 @@ export declare function getInterfaceDefinition(interfaceAndVersion: string): {
183
183
  readonly options: {};
184
184
  };
185
185
  };
186
+ } | {
187
+ readonly name: "ScenarioControl";
188
+ readonly fullName: "keelson.interfaces.scenario_control.ScenarioControl";
189
+ readonly methods: {
190
+ readonly load: {
191
+ readonly name: "load";
192
+ readonly requestType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").LoadRequest>;
193
+ readonly requestStream: false;
194
+ readonly responseType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").LoadResponse>;
195
+ readonly responseStream: false;
196
+ readonly options: {};
197
+ };
198
+ readonly start: {
199
+ readonly name: "start";
200
+ readonly requestType: import("./interfaces/google/protobuf/empty").MessageFns<import("./interfaces/google/protobuf/empty").Empty>;
201
+ readonly requestStream: false;
202
+ readonly responseType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").StartResponse>;
203
+ readonly responseStream: false;
204
+ readonly options: {};
205
+ };
206
+ readonly pause: {
207
+ readonly name: "pause";
208
+ readonly requestType: import("./interfaces/google/protobuf/empty").MessageFns<import("./interfaces/google/protobuf/empty").Empty>;
209
+ readonly requestStream: false;
210
+ readonly responseType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").PauseResponse>;
211
+ readonly responseStream: false;
212
+ readonly options: {};
213
+ };
214
+ readonly stop: {
215
+ readonly name: "stop";
216
+ readonly requestType: import("./interfaces/google/protobuf/empty").MessageFns<import("./interfaces/google/protobuf/empty").Empty>;
217
+ readonly requestStream: false;
218
+ readonly responseType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").StopResponse>;
219
+ readonly responseStream: false;
220
+ readonly options: {};
221
+ };
222
+ readonly reset: {
223
+ readonly name: "reset";
224
+ readonly requestType: import("./interfaces/google/protobuf/empty").MessageFns<import("./interfaces/google/protobuf/empty").Empty>;
225
+ readonly requestStream: false;
226
+ readonly responseType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").ResetResponse>;
227
+ readonly responseStream: false;
228
+ readonly options: {};
229
+ };
230
+ readonly step: {
231
+ readonly name: "step";
232
+ readonly requestType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").StepRequest>;
233
+ readonly requestStream: false;
234
+ readonly responseType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").StepResponse>;
235
+ readonly responseStream: false;
236
+ readonly options: {};
237
+ };
238
+ readonly set_rate: {
239
+ readonly name: "set_rate";
240
+ readonly requestType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").SetRateRequest>;
241
+ readonly requestStream: false;
242
+ readonly responseType: import("./interfaces/ScenarioControl").MessageFns<import("./interfaces/ScenarioControl").SetRateResponse>;
243
+ readonly responseStream: false;
244
+ readonly options: {};
245
+ };
246
+ };
186
247
  } | {
187
248
  readonly name: "SimulationControl";
188
249
  readonly fullName: "keelson.interfaces.simulation_control.SimulationControl";
@@ -0,0 +1,144 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Empty } from "./google/protobuf/empty";
3
+ export declare const protobufPackage = "keelson.interfaces.scenario_control";
4
+ export interface LoadRequest {
5
+ /**
6
+ * Identifier of the scenario to load, as the responder understands it —
7
+ * an id within a configured library, or a path it can resolve. Left
8
+ * deliberately opaque: what a scenario *is* varies by simulator, and
9
+ * pinning a schema here would bind every implementation to one.
10
+ */
11
+ scenario: string;
12
+ }
13
+ export interface StepRequest {
14
+ /**
15
+ * Number of fixed steps to advance. Zero is a no-op that still replies
16
+ * OK, so a caller can poll the resulting tick without special-casing.
17
+ */
18
+ ticks: number;
19
+ }
20
+ export interface SetRateRequest {
21
+ /**
22
+ * Wall-clock scaling of simulated time. 1.0 is real time, 0.0 is
23
+ * unpaced; negative replies OUT_OF_RANGE.
24
+ */
25
+ rate: number;
26
+ }
27
+ /**
28
+ * One response message per RPC. Each is dedicated to its method so an
29
+ * individual command can grow a return field later without a breaking
30
+ * type change and without that field bleeding onto the other commands.
31
+ */
32
+ export interface LoadResponse {
33
+ }
34
+ export interface StartResponse {
35
+ }
36
+ export interface PauseResponse {
37
+ }
38
+ export interface StopResponse {
39
+ }
40
+ export interface ResetResponse {
41
+ }
42
+ export interface SetRateResponse {
43
+ }
44
+ export interface StepResponse {
45
+ /**
46
+ * Where the clock came to rest. Returned rather than left to the status
47
+ * broadcast because the caller of a deterministic step needs to know
48
+ * which tick it just produced, without racing a 1 Hz status sample.
49
+ */
50
+ tick: number;
51
+ simulationTime: Date | undefined;
52
+ }
53
+ export declare const LoadRequest: MessageFns<LoadRequest>;
54
+ export declare const StepRequest: MessageFns<StepRequest>;
55
+ export declare const SetRateRequest: MessageFns<SetRateRequest>;
56
+ export declare const LoadResponse: MessageFns<LoadResponse>;
57
+ export declare const StartResponse: MessageFns<StartResponse>;
58
+ export declare const PauseResponse: MessageFns<PauseResponse>;
59
+ export declare const StopResponse: MessageFns<StopResponse>;
60
+ export declare const ResetResponse: MessageFns<ResetResponse>;
61
+ export declare const SetRateResponse: MessageFns<SetRateResponse>;
62
+ export declare const StepResponse: MessageFns<StepResponse>;
63
+ export type ScenarioControlDefinition = typeof ScenarioControlDefinition;
64
+ export declare const ScenarioControlDefinition: {
65
+ readonly name: "ScenarioControl";
66
+ readonly fullName: "keelson.interfaces.scenario_control.ScenarioControl";
67
+ readonly methods: {
68
+ readonly load: {
69
+ readonly name: "load";
70
+ readonly requestType: MessageFns<LoadRequest>;
71
+ readonly requestStream: false;
72
+ readonly responseType: MessageFns<LoadResponse>;
73
+ readonly responseStream: false;
74
+ readonly options: {};
75
+ };
76
+ readonly start: {
77
+ readonly name: "start";
78
+ readonly requestType: import("./google/protobuf/empty").MessageFns<Empty>;
79
+ readonly requestStream: false;
80
+ readonly responseType: MessageFns<StartResponse>;
81
+ readonly responseStream: false;
82
+ readonly options: {};
83
+ };
84
+ readonly pause: {
85
+ readonly name: "pause";
86
+ readonly requestType: import("./google/protobuf/empty").MessageFns<Empty>;
87
+ readonly requestStream: false;
88
+ readonly responseType: MessageFns<PauseResponse>;
89
+ readonly responseStream: false;
90
+ readonly options: {};
91
+ };
92
+ readonly stop: {
93
+ readonly name: "stop";
94
+ readonly requestType: import("./google/protobuf/empty").MessageFns<Empty>;
95
+ readonly requestStream: false;
96
+ readonly responseType: MessageFns<StopResponse>;
97
+ readonly responseStream: false;
98
+ readonly options: {};
99
+ };
100
+ readonly reset: {
101
+ readonly name: "reset";
102
+ readonly requestType: import("./google/protobuf/empty").MessageFns<Empty>;
103
+ readonly requestStream: false;
104
+ readonly responseType: MessageFns<ResetResponse>;
105
+ readonly responseStream: false;
106
+ readonly options: {};
107
+ };
108
+ readonly step: {
109
+ readonly name: "step";
110
+ readonly requestType: MessageFns<StepRequest>;
111
+ readonly requestStream: false;
112
+ readonly responseType: MessageFns<StepResponse>;
113
+ readonly responseStream: false;
114
+ readonly options: {};
115
+ };
116
+ readonly set_rate: {
117
+ readonly name: "set_rate";
118
+ readonly requestType: MessageFns<SetRateRequest>;
119
+ readonly requestStream: false;
120
+ readonly responseType: MessageFns<SetRateResponse>;
121
+ readonly responseStream: false;
122
+ readonly options: {};
123
+ };
124
+ };
125
+ };
126
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
127
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
128
+ [K in keyof T]?: DeepPartial<T[K]>;
129
+ } : Partial<T>;
130
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
131
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
132
+ [K in keyof P]: Exact<P[K], I[K]>;
133
+ } & {
134
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
135
+ };
136
+ export interface MessageFns<T> {
137
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
138
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
139
+ fromJSON(object: any): T;
140
+ toJSON(message: T): unknown;
141
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
142
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
143
+ }
144
+ export {};