@jsm-mit/tigi-sharded-package 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -206,9 +206,10 @@ type RequestClosed = record {
206
206
  driverKey : text;
207
207
  reason : CloseReason;
208
208
  };
209
- type Result = variant { Ok : vec RouteTaskView; Err : SimulatorError };
210
- type Result_1 = variant { Ok; Err : SimulatorError };
211
- type Result_2 = variant { Ok : SpawnResult; Err : SimulatorError };
209
+ type Result = variant { Ok : opt SpawnPlace; Err : SimulatorError };
210
+ type Result_1 = variant { Ok : vec RouteTaskView; Err : SimulatorError };
211
+ type Result_2 = variant { Ok; Err : SimulatorError };
212
+ type Result_3 = variant { Ok : SpawnResult; Err : SimulatorError };
212
213
  // `variant { ok : RideView; err : ProtocolError }`.
213
214
  type RideAnswer = variant { ok : RideView; err : ProtocolError };
214
215
  type RideOrder = record {
@@ -296,6 +297,8 @@ type SpawnArgs = record {
296
297
  // None = 12.
297
298
  count : opt nat8;
298
299
  };
300
+ // S-N15: the centre of the last `spawnDrivers` and its time.
301
+ type SpawnPlace = record { center : Geo; atNs : nat64 };
299
302
  type SpawnResult = record {
300
303
  // Why some were not registered.
301
304
  problems : vec text;
@@ -312,12 +315,16 @@ type SpeedUpArgs = record {
312
315
  service : (InitArgs) -> {
313
316
  // S-14 (KK-33): the rider cancels before `inProgress`, once.
314
317
  cancelRide : (RideRef) -> (ProtocolAnswer);
318
+ // S-N15: where testers last asked for drivers — the router moves the automat driver
319
+ // canister near it (TIGI-DRIVER-MODES). None until the first search after an install or
320
+ // an upgrade.
321
+ getLastSpawn : () -> (Result) query;
315
322
  getLicence : (RideRef) -> (LicenceAnswer) query;
316
323
  getRide : (RideRef) -> (RideAnswer) query;
317
324
  // S-N14 (P-19): the line of the ride for its rider, while the ride is active.
318
325
  getRideRoute : (RideRef) -> (RouteAnswer) query;
319
- // S-N13: the quote requests that wait for a route (at most 5 s each), the oldest first.
320
- getRouteTasks : () -> (Result) query;
326
+ // S-N13: the quote requests that wait for a route (at most 10 s each), the oldest first.
327
+ getRouteTasks : () -> (Result_1) query;
321
328
  getStatus : () -> (SimulatorStatus) query;
322
329
  http_request : (HttpRequest) -> (HttpResponse) query;
323
330
  protocolVersion : () -> (nat32) query;
@@ -330,13 +337,13 @@ service : (InitArgs) -> {
330
337
  rideOrder : (RideOrder) -> (ProtocolAnswer);
331
338
  // S-N13: the core only (an admin's `setSimulatorRouter`): the one principal that routes the
332
339
  // virtual drivers' quotes, like a driver's front; none = the straight line again.
333
- setRouter : (SetRouterArgs) -> (Result_1);
340
+ setRouter : (SetRouterArgs) -> (Result_2);
334
341
  // S-15: ×10 for one request (`requestId`), not the whole canister.
335
- setSpeedUp : (SpeedUpArgs) -> (Result_1);
342
+ setSpeedUp : (SpeedUpArgs) -> (Result_2);
336
343
  // S-2, S-3: virtual drivers around a point, each registered in the worker of its cell
337
344
  // with `validUntilNs` (30 min) instead of a pulse.
338
- spawnDrivers : (SpawnArgs) -> (Result_2);
345
+ spawnDrivers : (SpawnArgs) -> (Result_3);
339
346
  // S-N13: the router's route for one virtual driver — metres, seconds, the line. The quote
340
347
  // goes with it at its moment (S-8), or at once when that moment has passed.
341
- submitRoute : (SimRouteResult) -> (Result_1);
348
+ submitRoute : (SimRouteResult) -> (Result_2);
342
349
  }
@@ -288,11 +288,13 @@ export interface RequestClosed {
288
288
  'driverKey' : string,
289
289
  'reason' : CloseReason,
290
290
  }
291
- export type Result = { 'Ok' : Array<RouteTaskView> } |
291
+ export type Result = { 'Ok' : [] | [SpawnPlace] } |
292
292
  { 'Err' : SimulatorError };
293
- export type Result_1 = { 'Ok' : null } |
293
+ export type Result_1 = { 'Ok' : Array<RouteTaskView> } |
294
294
  { 'Err' : SimulatorError };
295
- export type Result_2 = { 'Ok' : SpawnResult } |
295
+ export type Result_2 = { 'Ok' : null } |
296
+ { 'Err' : SimulatorError };
297
+ export type Result_3 = { 'Ok' : SpawnResult } |
296
298
  { 'Err' : SimulatorError };
297
299
  /**
298
300
  * `variant { ok : RideView; err : ProtocolError }`.
@@ -409,6 +411,10 @@ export interface SpawnArgs {
409
411
  */
410
412
  'count' : [] | [number],
411
413
  }
414
+ /**
415
+ * S-N15: the centre of the last `spawnDrivers` and its time.
416
+ */
417
+ export interface SpawnPlace { 'center' : Geo, 'atNs' : bigint }
412
418
  export interface SpawnResult {
413
419
  /**
414
420
  * Why some were not registered.
@@ -433,6 +439,12 @@ export interface _SERVICE {
433
439
  * S-14 (KK-33): the rider cancels before `inProgress`, once.
434
440
  */
435
441
  'cancelRide' : ActorMethod<[RideRef], ProtocolAnswer>,
442
+ /**
443
+ * S-N15: where testers last asked for drivers — the router moves the automat driver
444
+ * canister near it (TIGI-DRIVER-MODES). None until the first search after an install or
445
+ * an upgrade.
446
+ */
447
+ 'getLastSpawn' : ActorMethod<[], Result>,
436
448
  'getLicence' : ActorMethod<[RideRef], LicenceAnswer>,
437
449
  'getRide' : ActorMethod<[RideRef], RideAnswer>,
438
450
  /**
@@ -440,9 +452,9 @@ export interface _SERVICE {
440
452
  */
441
453
  'getRideRoute' : ActorMethod<[RideRef], RouteAnswer>,
442
454
  /**
443
- * S-N13: the quote requests that wait for a route (at most 5 s each), the oldest first.
455
+ * S-N13: the quote requests that wait for a route (at most 10 s each), the oldest first.
444
456
  */
445
- 'getRouteTasks' : ActorMethod<[], Result>,
457
+ 'getRouteTasks' : ActorMethod<[], Result_1>,
446
458
  'getStatus' : ActorMethod<[], SimulatorStatus>,
447
459
  'http_request' : ActorMethod<[HttpRequest], HttpResponse>,
448
460
  'protocolVersion' : ActorMethod<[], number>,
@@ -463,21 +475,21 @@ export interface _SERVICE {
463
475
  * S-N13: the core only (an admin's `setSimulatorRouter`): the one principal that routes the
464
476
  * virtual drivers' quotes, like a driver's front; none = the straight line again.
465
477
  */
466
- 'setRouter' : ActorMethod<[SetRouterArgs], Result_1>,
478
+ 'setRouter' : ActorMethod<[SetRouterArgs], Result_2>,
467
479
  /**
468
480
  * S-15: ×10 for one request (`requestId`), not the whole canister.
469
481
  */
470
- 'setSpeedUp' : ActorMethod<[SpeedUpArgs], Result_1>,
482
+ 'setSpeedUp' : ActorMethod<[SpeedUpArgs], Result_2>,
471
483
  /**
472
484
  * S-2, S-3: virtual drivers around a point, each registered in the worker of its cell
473
485
  * with `validUntilNs` (30 min) instead of a pulse.
474
486
  */
475
- 'spawnDrivers' : ActorMethod<[SpawnArgs], Result_2>,
487
+ 'spawnDrivers' : ActorMethod<[SpawnArgs], Result_3>,
476
488
  /**
477
489
  * S-N13: the router's route for one virtual driver — metres, seconds, the line. The quote
478
490
  * goes with it at its moment (S-8), or at once when that moment has passed.
479
491
  */
480
- 'submitRoute' : ActorMethod<[SimRouteResult], Result_1>,
492
+ 'submitRoute' : ActorMethod<[SimRouteResult], Result_2>,
481
493
  }
482
494
  export declare const idlFactory: IDL.InterfaceFactory;
483
495
  export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -28,6 +28,18 @@ export const idlFactory = ({ IDL }) => {
28
28
  'ok' : IDL.Null,
29
29
  'err' : ProtocolError,
30
30
  });
31
+ const Geo = IDL.Record({ 'lat' : IDL.Float64, 'lng' : IDL.Float64 });
32
+ const SpawnPlace = IDL.Record({ 'center' : Geo, 'atNs' : IDL.Nat64 });
33
+ const SimulatorError = IDL.Variant({
34
+ 'RemoteCanisterError' : IDL.Text,
35
+ 'NotFound' : IDL.Null,
36
+ 'NotAuthorized' : IDL.Text,
37
+ 'InvalidData' : IDL.Text,
38
+ });
39
+ const Result = IDL.Variant({
40
+ 'Ok' : IDL.Opt(SpawnPlace),
41
+ 'Err' : SimulatorError,
42
+ });
31
43
  const Licence = IDL.Record({
32
44
  'mimeType' : IDL.Text,
33
45
  'image' : IDL.Vec(IDL.Nat8),
@@ -59,7 +71,6 @@ export const idlFactory = ({ IDL }) => {
59
71
  'carPhotoCount' : IDL.Nat8,
60
72
  'hasLicencePhoto' : IDL.Bool,
61
73
  });
62
- const Geo = IDL.Record({ 'lat' : IDL.Float64, 'lng' : IDL.Float64 });
63
74
  const RideView = IDL.Record({
64
75
  'status' : RideStatus,
65
76
  'requestId' : IDL.Text,
@@ -80,13 +91,7 @@ export const idlFactory = ({ IDL }) => {
80
91
  'pickup' : Geo,
81
92
  'driverKey' : IDL.Text,
82
93
  });
83
- const SimulatorError = IDL.Variant({
84
- 'RemoteCanisterError' : IDL.Text,
85
- 'NotFound' : IDL.Null,
86
- 'NotAuthorized' : IDL.Text,
87
- 'InvalidData' : IDL.Text,
88
- });
89
- const Result = IDL.Variant({
94
+ const Result_1 = IDL.Variant({
90
95
  'Ok' : IDL.Vec(RouteTaskView),
91
96
  'Err' : SimulatorError,
92
97
  });
@@ -150,7 +155,7 @@ export const idlFactory = ({ IDL }) => {
150
155
  'rider' : IDL.Principal,
151
156
  });
152
157
  const SetRouterArgs = IDL.Record({ 'router' : IDL.Opt(IDL.Principal) });
153
- const Result_1 = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : SimulatorError });
158
+ const Result_2 = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : SimulatorError });
154
159
  const SpeedUpArgs = IDL.Record({
155
160
  'requestId' : IDL.Text,
156
161
  'factor' : IDL.Nat8,
@@ -162,7 +167,7 @@ export const idlFactory = ({ IDL }) => {
162
167
  'registered' : IDL.Nat32,
163
168
  'validUntilNs' : IDL.Nat64,
164
169
  });
165
- const Result_2 = IDL.Variant({ 'Ok' : SpawnResult, 'Err' : SimulatorError });
170
+ const Result_3 = IDL.Variant({ 'Ok' : SpawnResult, 'Err' : SimulatorError });
166
171
  const SimRouteResult = IDL.Record({
167
172
  'requestId' : IDL.Text,
168
173
  'rideMeters' : IDL.Nat32,
@@ -174,20 +179,21 @@ export const idlFactory = ({ IDL }) => {
174
179
  });
175
180
  return IDL.Service({
176
181
  'cancelRide' : IDL.Func([RideRef], [ProtocolAnswer], []),
182
+ 'getLastSpawn' : IDL.Func([], [Result], ['query']),
177
183
  'getLicence' : IDL.Func([RideRef], [LicenceAnswer], ['query']),
178
184
  'getRide' : IDL.Func([RideRef], [RideAnswer], ['query']),
179
185
  'getRideRoute' : IDL.Func([RideRef], [RouteAnswer], ['query']),
180
- 'getRouteTasks' : IDL.Func([], [Result], ['query']),
186
+ 'getRouteTasks' : IDL.Func([], [Result_1], ['query']),
181
187
  'getStatus' : IDL.Func([], [SimulatorStatus], ['query']),
182
188
  'http_request' : IDL.Func([HttpRequest], [HttpResponse], ['query']),
183
189
  'protocolVersion' : IDL.Func([], [IDL.Nat32], ['query']),
184
190
  'quoteRequest' : IDL.Func([QuoteRequest], [ProtocolAnswer], []),
185
191
  'requestClosed' : IDL.Func([RequestClosed], [], []),
186
192
  'rideOrder' : IDL.Func([RideOrder], [ProtocolAnswer], []),
187
- 'setRouter' : IDL.Func([SetRouterArgs], [Result_1], []),
188
- 'setSpeedUp' : IDL.Func([SpeedUpArgs], [Result_1], []),
189
- 'spawnDrivers' : IDL.Func([SpawnArgs], [Result_2], []),
190
- 'submitRoute' : IDL.Func([SimRouteResult], [Result_1], []),
193
+ 'setRouter' : IDL.Func([SetRouterArgs], [Result_2], []),
194
+ 'setSpeedUp' : IDL.Func([SpeedUpArgs], [Result_2], []),
195
+ 'spawnDrivers' : IDL.Func([SpawnArgs], [Result_3], []),
196
+ 'submitRoute' : IDL.Func([SimRouteResult], [Result_2], []),
191
197
  });
192
198
  };
193
199
  export const init = ({ IDL }) => {
@@ -203,6 +203,7 @@ type RequestRideArgs =
203
203
  destination: Geo;
204
204
  pickup: Geo;
205
205
  radiusMeters: nat32;
206
+ realDriversOnly: opt bool;
206
207
  requestId: RequestId;
207
208
  riderName: text;
208
209
  };
@@ -193,6 +193,7 @@ export interface RequestRef { 'requestId' : RequestId }
193
193
  export interface RequestRideArgs {
194
194
  'destination' : Geo,
195
195
  'requestId' : RequestId,
196
+ 'realDriversOnly' : [] | [boolean],
196
197
  'pickup' : Geo,
197
198
  'radiusMeters' : number,
198
199
  'riderName' : string,
@@ -272,6 +272,7 @@ export const idlFactory = ({ IDL }) => {
272
272
  const RequestRideArgs = IDL.Record({
273
273
  'destination' : Geo,
274
274
  'requestId' : RequestId,
275
+ 'realDriversOnly' : IDL.Opt(IDL.Bool),
275
276
  'pickup' : Geo,
276
277
  'radiusMeters' : IDL.Nat32,
277
278
  'riderName' : IDL.Text,
@@ -30,6 +30,8 @@ interface RequestState {
30
30
  widened: boolean;
31
31
  othersClosed: boolean;
32
32
  sawOffer: boolean;
33
+ /** ZO-23: kept for the widening and "Szukaj ponownie". */
34
+ realDriversOnly?: boolean;
33
35
  accepted?: {
34
36
  worker: string;
35
37
  canister: string;
@@ -43,6 +45,11 @@ export interface RequestRideArgs {
43
45
  riderName?: string;
44
46
  /** Only for tests and resumed flows: the id of the request (1–64 characters). */
45
47
  requestId?: string;
48
+ /**
49
+ * ZO-23 (test builds): true = the simulator's drivers are not asked, only real driver
50
+ * canisters (the Test Manager's switch). Left out = everyone, as before.
51
+ */
52
+ realDriversOnly?: boolean;
46
53
  }
47
54
  /**
48
55
  * The refusal key of a worker's answer (WO-N9): `ALREADY_OPEN`, `NOT_MY_AREA`, `FULL`,
@@ -1 +1 @@
1
- {"version":3,"file":"rides-actor.d.ts","sourceRoot":"","sources":["../../src/actors/rides-actor.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAKpD,OAAO,EAAgJ,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC7M,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAA2B,KAAK,GAAG,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAa,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAInI,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAC1C,eAAO,MAAM,kBAAkB,OAAQ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ACU,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAW1F;;;;;;;OAOG;IACU,uBAAuB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAW1E;;;;;;OAMG;IACU,sBAAsB,IAAI,OAAO,CAAC,WAAW,CAAC;IAoB3D;;;OAGG;IACU,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAM/C;;;;;OAKG;IACU,kBAAkB,IAAI,OAAO,CAAC,QAAQ,CAAC;IAKpD;;;;;OAKG;IACU,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC;IAKnD;;;;OAIG;IACU,qBAAqB,IAAI,OAAO,CAAC,WAAW,CAAC;IAO1D;;;;;;;;;OASG;IACU,uBAAuB,IAAI,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAOtE;;;;;;OAMG;IACU,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAOnE,4IAA4I;IAC5I,OAAO,CAAC,WAAW;YAML,kBAAkB;YAkBlB,UAAU;IA8DxB,iHAAiH;YACnG,gBAAgB;IAS9B,6FAA6F;YAC/E,UAAU;YASV,kBAAkB;YAalB,mBAAmB;YAOnB,WAAW;CAG5B"}
@@ -89,6 +89,7 @@ export class RidesActor {
89
89
  widened: false,
90
90
  othersClosed: false,
91
91
  sawOffer: false,
92
+ ...(args.realDriversOnly ? { realDriversOnly: true } : {}),
92
93
  };
93
94
  const request = new RideRequest(this.group, this.identity, this.options, state, () => this.simulatorIdAsync());
94
95
  await request.placeAsyncUnsafe(SEARCH_RADIUS_METERS);
@@ -193,7 +194,7 @@ export class RideRequest {
193
194
  const workers = (await workersForAsync(this.group, this.state.pickup, radiusMeters, fresh)).filter((worker) => !tried.has(worker));
194
195
  const results = await Promise.allSettled(workers.map(async (worker) => {
195
196
  tried.add(worker);
196
- await this.group.onWorkerAsyncUnsafe(worker, (actor) => actor.requestRide({ requestId: this.state.requestId, pickup: this.state.pickup, destination: this.state.destination, riderName: this.state.riderName, radiusMeters }));
197
+ await this.group.onWorkerAsyncUnsafe(worker, (actor) => actor.requestRide({ requestId: this.state.requestId, pickup: this.state.pickup, destination: this.state.destination, riderName: this.state.riderName, radiusMeters, realDriversOnly: this.state.realDriversOnly ? [true] : [] }));
197
198
  return worker;
198
199
  }));
199
200
  let staleMap = false;
@@ -387,6 +388,7 @@ export class RideRequest {
387
388
  widened: false,
388
389
  othersClosed: false,
389
390
  sawOffer: false,
391
+ ...(this.state.realDriversOnly ? { realDriversOnly: true } : {}),
390
392
  };
391
393
  const request = new RideRequest(this.group, this.identity, this.options, state, this.simulatorIdAsync);
392
394
  await request.placeAsyncUnsafe(SEARCH_RADIUS_METERS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsm-mit/tigi-sharded-package",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "The one package of the Tigi network group: takes the coordinator's id and hides the coordinator, the core and the workers — for a consumer the group is one canister; plus the rider's few driver-canister endpoints (U-14).",
5
5
  "homepage": "https://github.com/JSM-Tigi/tigi-sharded/tree/master/package#readme",
6
6
  "repository": {
@@ -59,11 +59,11 @@
59
59
  "tigiSharded": {
60
60
  "repo": "tigi-sharded",
61
61
  "repoUrl": "https://github.com/JSM-Tigi/tigi-sharded",
62
- "commit": "45ef3143fba15b541f6a7eeb710791ba95716964"
62
+ "commit": "148160dc78284db42f421146b0b68d5404bb6926"
63
63
  },
64
64
  "tigiDriverRust": {
65
65
  "repo": "tigi-driver-rust",
66
66
  "repoUrl": "https://github.com/JSM-Tigi/tigi-driver-rust",
67
- "commit": "f7aca49c36c7eddeea623e69f10d15203100a67e"
67
+ "commit": "d39d7dc2b06358a570c3f07cbba17900297047a3"
68
68
  }
69
69
  }