@jsm-mit/tigi-sharded-package 0.15.0 → 0.16.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.
package/README.md CHANGED
@@ -15,8 +15,9 @@ ride (Skąd, Dokąd) and the rating of a past ride from the history; 0.13.0 (202
15
15
  the map-routes ticket of a driver (`mapTicketAsyncUnsafe`); 0.14.0 (2026-11-07) adds the map
16
16
  group of the environment (`mapRoutesCoordinatorAsyncUnsafe`); 0.15.0 (2026-11-08) renames the map
17
17
  "pass" to "ticket" (`mapPassAsyncUnsafe` → `mapTicketAsyncUnsafe`, `MapTicketRequest`, `MapTicketView`,
18
- the field `ticket`), together with the map package 0.4. Version 0.1.0 was the first to
19
- publish.
18
+ the field `ticket`), together with the map package 0.4; 0.16.0 (2026-11-09) adds the
19
+ map-places ticket of a signed-in rider (`ProfilesActor.placesTicketAsyncUnsafe`,
20
+ `mapPlacesCoordinatorAsyncUnsafe`). Version 0.1.0 was the first to publish.
20
21
 
21
22
  ## The rider
22
23
 
@@ -180,6 +181,22 @@ const map = new MapRoutesClient({ coordinatorId: mapCoordinatorId!, identity, ti
180
181
  variant first (`"Blocked: …"`, `"RateLimited: …"`); no map group in this environment is
181
182
  `InvalidData`; somebody without a driver canister is refused at inspection.
182
183
 
184
+ The address search of a rider (map-places, core C-31 … C-33): the copy for signed-out users
185
+ answers without a ticket; while it does not serve (paused under load, or none), a signed-in
186
+ rider asks the Tigi core for a map-places ticket — any signed-in rider who is not blocked:
187
+
188
+ ```ts
189
+ import { MapPlacesClient } from "@jsm-mit/map-places-replicated-shards-package";
190
+
191
+ const profiles = new ProfilesActor(coordinatorId, identity, { host });
192
+ const placesCoordinatorId = await profiles.mapPlacesCoordinatorAsyncUnsafe(); // undefined: none here
193
+ const places = new MapPlacesClient({ coordinatorId: placesCoordinatorId!, identity, ticketProvider: (r) => profiles.placesTicketAsyncUnsafe(r) });
194
+ ```
195
+
196
+ - The same identity for the ticket and the queries; the same refusals as the map ticket
197
+ (`RemoteCanisterError`, `InvalidData`); an anonymous or blocked rider is refused at
198
+ inspection.
199
+
183
200
  The Test Manager (stage and the test modes): `TestManagerActor.hasSimulatedDriversAsyncUnsafe`,
184
201
  `spawnDriversAsyncUnsafe` (12 drivers), `setSpeedUpAsyncUnsafe(request, 10)` before choosing.
185
202
  Offers of the simulator have `simulated: true`.
@@ -48,9 +48,9 @@ type TigiCore =
48
48
  /// joins the next daily bill of the room's OWN driver canister as it is (the chat priced
49
49
  /// it; no multiplier). A pool canister's share and a room of no canister of the registry
50
50
  /// are absorbed (the coordinator keeps paying them). Once per `batchId`.
51
- addChatShares: (args: ChatSharesArgs) -> (Result_36);
51
+ addChatShares: (args: ChatSharesArgs) -> (Result_37);
52
52
  /// Admins: a canister the core controls joins the demo pool (U-35).
53
- addPoolCanister: (args: CanisterArgs) -> (Result_7);
53
+ addPoolCanister: (args: CanisterArgs) -> (Result_8);
54
54
  /// Admins: a driver canister, or one driver in it (`driverKey`), is blocked; the workers
55
55
  /// drop it at once (WO-2).
56
56
  blockDriver: (args: BlockDriverArgs) -> (Result_2);
@@ -59,26 +59,26 @@ type TigiCore =
59
59
  /// F-20 (U-45): the caller — the driver signed in on the canister's own front — takes
60
60
  /// over the demo canister with the code of the link. Single use, 15 min; every refusal
61
61
  /// answers the same NotAuthorized. The room of the canister gets the caller (C-15).
62
- claimDriverCanister: (args: ClaimArgs) -> (Result_7);
62
+ claimDriverCanister: (args: ClaimArgs) -> (Result_8);
63
63
  clearLogs: () -> ();
64
64
  /// Admins (F-24): the chunks become THE app; drivers' canisters take it at their "Aktualizuj".
65
- commitDriverApk: (args: ApkCommitArgs) -> (Result_35);
65
+ commitDriverApk: (args: ApkCommitArgs) -> (Result_36);
66
66
  /// Admins: the chunks become THE module of their kind. A new driver wasm is released
67
67
  /// (F-11) and its hash goes to the workers.
68
- commitDriverWasm: (args: WasmCommitArgs) -> (Result_34);
68
+ commitDriverWasm: (args: WasmCommitArgs) -> (Result_35);
69
69
  /// Admins, localTest: an empty canister from the core's cycles joins the demo pool.
70
- createLocalPoolCanister: () -> (Result_7);
71
- createMyDriverCanister: () -> (Result_7);
70
+ createLocalPoolCanister: () -> (Result_8);
71
+ createMyDriverCanister: () -> (Result_8);
72
72
  /// Admins: the simulator, created once (F-18).
73
- ensureSimulator: () -> (Result_33);
73
+ ensureSimulator: () -> (Result_34);
74
74
  /// F-8: 15 min more for the holder of a demo canister.
75
- extendDemoLease: () -> (Result_7);
76
- getAdmins: () -> (Result_32) query;
75
+ extendDemoLease: () -> (Result_8);
76
+ getAdmins: () -> (Result_33) query;
77
77
  /// For the fronts (through the package): where the chat of this environment is. Null =
78
78
  /// no chat here yet. The room of a driver is `ChatRoomFunctions.driverRoomId`.
79
79
  getChatConfig: () -> (opt ChatConfig) query;
80
80
  /// Admins: how far the driver rooms are (C-15).
81
- getChatRoomsStatus: () -> (Result_31) query;
81
+ getChatRoomsStatus: () -> (Result_32) query;
82
82
  /// F-24 (public): the current app — what a driver canister compares its own with.
83
83
  getDriverApk: () -> (opt ApkInfo) query;
84
84
  /// F-24 (public): one chunk of the current app; a driver canister reads them in order.
@@ -87,43 +87,44 @@ type TigiCore =
87
87
  getDriverCanisterStatus: (args: CanisterArgs) ->
88
88
  (DriverCanisterStatus) query;
89
89
  /// Admins: the account of one driver canister (C-17 … C-20).
90
- getDriverFeeAccount: (args: CanisterArgs) -> (Result_30) query;
90
+ getDriverFeeAccount: (args: CanisterArgs) -> (Result_31) query;
91
91
  /// C-19: a driver canister of the registry asks for its bill — the events since its
92
92
  /// last settlement, priced on the fee's day. Called by the canister at its first
93
93
  /// "Przyjmuję zlecenia" of a day. A pool canister owes nothing (C-18).
94
- getDriverFeeBill: () -> (Result_29);
94
+ getDriverFeeBill: () -> (Result_30);
95
95
  /// Admins (stage 7): the aggregated rating of one driver (sum and count of stars; null =
96
96
  /// no rating yet) — the value the workers get through the outbox (C-6).
97
- getDriverRating: (args: DriverRatingArgs) -> (Result_25) query;
98
- getDriverRollout: () -> (Result_28) query;
99
- getFactoryStatus: () -> (Result_27) query;
97
+ getDriverRating: (args: DriverRatingArgs) -> (Result_26) query;
98
+ getDriverRollout: () -> (Result_29) query;
99
+ getFactoryStatus: () -> (Result_28) query;
100
100
  /// C-22: the rates, the day, the multiplier cached, the totals.
101
- getFeeStatus: () -> (Result_26) query;
101
+ getFeeStatus: () -> (Result_27) query;
102
102
  getLogs: () -> (text) query;
103
+ getMapPlacesConfig: () -> (opt MapPlacesConfig) query;
103
104
  getMapRoutesConfig: () -> (opt MapRoutesConfig) query;
104
105
  /// The caller's own canister, or the demo canister the caller holds now.
105
- getMyDriverCanister: () -> (Result_7) query;
106
+ getMyDriverCanister: () -> (Result_8) query;
106
107
  getMyProfile: () -> (Result_4) query;
107
108
  /// C-16, PF-4: the caller's own rating as a rider (sum and count of stars; null = no
108
109
  /// rating yet). Ratings reach the core in the workers' batches, up to a minute late.
109
- getMyRating: () -> (Result_25) query;
110
+ getMyRating: () -> (Result_26) query;
110
111
  /// C-8 (KU-4, stage 7): one line of the caller's history by its requestId — for the
111
112
  /// details screen after a reload and to show the rating after `rateMyRide`. Another
112
113
  /// rider's ride → `NotAuthorized`; not in the core (yet, K-9) → `NotFound`.
113
- getMyRide: (args: RequestIdArgs) -> (Result_24) query;
114
+ getMyRide: (args: RequestIdArgs) -> (Result_25) query;
114
115
  /// C-8: the caller's rides, newest first, with the places (KU-4) and whether the driver
115
116
  /// can still be rated (KU-5, C-23).
116
- getMyRides: (args: RidesPageArgs) -> (Result_23) query;
117
+ getMyRides: (args: RidesPageArgs) -> (Result_24) query;
117
118
  /// C-3: the names of up to MAX_PROFILES_PER_CALL principals; unknown ones are left out.
118
- getProfiles: (args: ProfilesArgs) -> (Result_22) query;
119
+ getProfiles: (args: ProfilesArgs) -> (Result_23) query;
119
120
  /// F-11: the driver wasms released so far, oldest first.
120
121
  getReleasedDriverWasms: () -> (vec ReleasedWasm) query;
121
122
  /// F-18: the simulator of this group; none in prod or before ensureSimulator.
122
123
  getSimulator: () -> (opt principal) query;
123
124
  /// Admins: the coordinator, the workers confirmed so far, the mode.
124
- getWiring: () -> (Result_21) query;
125
+ getWiring: () -> (Result_22) query;
125
126
  /// Admins: how far the outbox to the workers is (C-6, C-7).
126
- getWorkerOutbox: () -> (Result_20) query;
127
+ getWorkerOutbox: () -> (Result_21) query;
127
128
  /// Workers of the group: the core asks the coordinator once and remembers the worker,
128
129
  /// which then gets the network state through the outbox. A worker calls it once after
129
130
  /// its install. Answers true.
@@ -131,59 +132,66 @@ type TigiCore =
131
132
  /// Workers of the group: finished rides and ratings, at most MAX_RIDE_BATCH (C-4, C-5).
132
133
  /// Idempotent: a known requestId and a counted rating count once. Invalid entries are
133
134
  /// rejected and logged; the worker drops the whole batch after an ok.
134
- ingestRideBatch: (batch: RideBatch) -> (Result_19);
135
+ ingestRideBatch: (batch: RideBatch) -> (Result_20);
135
136
  /// C-14: the accounts gate of the chat (U-43). The chat core asks this group's
136
137
  /// coordinator WHERE (`accountsCanisterFor` → this core) and asks here: true = an
137
138
  /// account with a name exists for the principal and the rider is not blocked.
138
139
  isUser: ("principal": principal) -> (bool) query;
139
140
  /// F-5 … F-7: a demo canister for 15 min (outside prod). A fresh lease comes with a
140
141
  /// one-time claim code (F-20, U-45).
141
- leaseDemoDriverCanister: () -> (Result_18);
142
- listBlocks: (args: PageArgs) -> (Result_17) query;
143
- listDriverCanisters: (args: PageArgs) -> (Result_16) query;
142
+ leaseDemoDriverCanister: () -> (Result_19);
143
+ listBlocks: (args: PageArgs) -> (Result_18) query;
144
+ listDriverCanisters: (args: PageArgs) -> (Result_17) query;
144
145
  /// Admins: the accounts, 100 a page at most.
145
- listDriverFeeAccounts: (args: PageArgs) -> (Result_15) query;
146
+ listDriverFeeAccounts: (args: PageArgs) -> (Result_16) query;
146
147
  /// Admins: the driver rooms as the core wants them, 100 a page at most.
147
- listDriverRooms: (args: PageArgs) -> (Result_14) query;
148
+ listDriverRooms: (args: PageArgs) -> (Result_15) query;
148
149
  /// C-29, C-30: the map ticket of the calling driver (own or demo driver canister, not
149
150
  /// blocked), for an area and a bbox. The core asks the map coordinator WHERE (once, kept)
150
151
  /// and that ticket core for the ticket of the caller; a failed call forgets the place and is
151
152
  /// tried once more. A refusal of the map group comes back as `RemoteCanisterError` with
152
153
  /// its variant first ("Blocked: …").
153
- mapTicket: (args: MapTicketArgs) -> (Result_13);
154
+ mapTicket: (args: MapTicketArgs) -> (Result_12);
154
155
  /// F-20: a fresh claim code for the caller's running demo lease; the old one stops
155
156
  /// working.
156
- newClaimCode: () -> (Result_12);
157
+ newClaimCode: () -> (Result_14);
157
158
  /// C-20: the driver canister pays the bill of `day` with the cycles attached to this
158
159
  /// call. The core takes exactly the bill (the rest goes back), or nothing when less is
159
160
  /// attached (`FEE_SHORT`); a day paid already answers `accepted = 0`.
160
- payDriverFee: (args: FeePayArgs) -> (Result_11);
161
+ payDriverFee: (args: FeePayArgs) -> (Result_13);
162
+ /// C-32, C-33: the map-places ticket of the calling rider (signed in, not blocked) for an
163
+ /// area and a bbox — the search of Skąd / Dokąd while the copy of signed-out users does not
164
+ /// serve. As `mapTicket` (C-29): WHERE from the coordinator (kept), then the ticket core.
165
+ placesTicket: (args: MapTicketArgs) -> (Result_12);
161
166
  /// F-2 … F-4, F-10: the caller's own driver canister (localTest: from the core's cycles).
162
167
  /// F-1 (user 2026-10-31): what a driver canister costs now and the caller's account to pay to.
163
- quoteMyDriverCanister: () -> (Result_10);
168
+ quoteMyDriverCanister: () -> (Result_11);
164
169
  /// C-23 (KU-5, stage 7): the rider rates the driver of a finished ride from the history.
165
170
  /// Only the ride's rider; a completed ride within 24 h of its end (K-8); once per ride
166
171
  /// over both paths — a live rating through the worker and this one count once together
167
172
  /// (the first to reach the core). The driver's aggregate goes to the workers as a
168
173
  /// batch's does (C-6). Counted in the caller's `#account` pool.
169
- rateMyRide: (args: RateRideArgs) -> (Result_9);
174
+ rateMyRide: (args: RateRideArgs) -> (Result_10);
170
175
  removeAdmin: (args: PrincipalArgs) -> (Result_2);
171
176
  resumeDriverRollout: () -> (Result_3);
172
177
  /// Admins: the chat of this environment — the chat group's coordinator and the project
173
178
  /// (whose admin and accounts field are this group's coordinator). Every call sends every
174
179
  /// driver room again (a new project, a chat group set up again).
175
- setChatConfig: (args: ChatConfig) -> (Result_8);
180
+ setChatConfig: (args: ChatConfig) -> (Result_9);
176
181
  /// Admins, localTest only: new claim codes live this long (the local check of an
177
182
  /// expired code). Heap only: an upgrade brings back 15 min.
178
183
  setClaimCodeTtl: (args: ClaimTtlArgs) -> (Result);
179
184
  /// Admins (F-22, TIGI-DRIVER-MODES): the pool canister is installed again in the
180
185
  /// automat mode, driven by `automat` — the simulator's router on the droplet.
181
- setDemoDriverAutomat: (args: DemoAutomatArgs) -> (Result_7);
186
+ setDemoDriverAutomat: (args: DemoAutomatArgs) -> (Result_8);
182
187
  /// Admins: the cycles per event (C-18).
183
- setFeeRates: (rates: FeeRates) -> (Result_6);
188
+ setFeeRates: (rates: FeeRates) -> (Result_7);
184
189
  setLoggingEnabled: (enabled: bool) -> (Result_2);
185
190
  /// The coordinator only: the balance below which the core asks for cycles.
186
191
  setLowCyclesBelow: (value: nat) -> (Result_2);
192
+ /// C-31, admins: the map-places group of this environment (its coordinator). The Tigi
193
+ /// coordinator is the system there, as in map-routes (C-28).
194
+ setMapPlacesConfig: (args: MapPlacesConfig) -> (Result_6);
187
195
  /// C-28, admins: the map-routes group of this environment (its coordinator). The Tigi
188
196
  /// coordinator is the system there (`setSystem` in the map coordinator's front); the core
189
197
  /// names it in every `issueTicket` (C-29).
@@ -295,22 +303,22 @@ type RideBatch =
295
303
  type Result_9 =
296
304
  variant {
297
305
  err: Error;
298
- ok: RateRideOutcome;
306
+ ok: ChatConfig;
299
307
  };
300
308
  type Result_8 =
301
309
  variant {
302
310
  err: Error;
303
- ok: ChatConfig;
311
+ ok: DriverCanister;
304
312
  };
305
313
  type Result_7 =
306
314
  variant {
307
315
  err: Error;
308
- ok: DriverCanister;
316
+ ok: FeeRates;
309
317
  };
310
318
  type Result_6 =
311
319
  variant {
312
320
  err: Error;
313
- ok: FeeRates;
321
+ ok: MapPlacesConfig;
314
322
  };
315
323
  type Result_5 =
316
324
  variant {
@@ -322,92 +330,92 @@ type Result_4 =
322
330
  err: Error;
323
331
  ok: Profile;
324
332
  };
325
- type Result_36 =
333
+ type Result_37 =
326
334
  variant {
327
335
  err: Error;
328
336
  ok: ChatSharesAck;
329
337
  };
330
- type Result_35 =
338
+ type Result_36 =
331
339
  variant {
332
340
  err: Error;
333
341
  ok: ApkInfo;
334
342
  };
335
- type Result_34 =
343
+ type Result_35 =
336
344
  variant {
337
345
  err: Error;
338
346
  ok: WasmInfo;
339
347
  };
340
- type Result_33 =
348
+ type Result_34 =
341
349
  variant {
342
350
  err: Error;
343
351
  ok: principal;
344
352
  };
345
- type Result_32 =
353
+ type Result_33 =
346
354
  variant {
347
355
  err: Error;
348
356
  ok: vec principal;
349
357
  };
350
- type Result_31 =
358
+ type Result_32 =
351
359
  variant {
352
360
  err: Error;
353
361
  ok: ChatRoomsStatus;
354
362
  };
355
- type Result_30 =
363
+ type Result_31 =
356
364
  variant {
357
365
  err: Error;
358
366
  ok: DriverFeeAccountView;
359
367
  };
360
- type Result_3 =
368
+ type Result_30 =
361
369
  variant {
362
370
  err: Error;
363
- ok: RolloutView;
371
+ ok: FeeBillAnswer;
364
372
  };
365
- type Result_29 =
373
+ type Result_3 =
366
374
  variant {
367
375
  err: Error;
368
- ok: FeeBillAnswer;
376
+ ok: RolloutView;
369
377
  };
370
- type Result_28 =
378
+ type Result_29 =
371
379
  variant {
372
380
  err: Error;
373
381
  ok: opt RolloutView;
374
382
  };
375
- type Result_27 =
383
+ type Result_28 =
376
384
  variant {
377
385
  err: Error;
378
386
  ok: FactoryStatus;
379
387
  };
380
- type Result_26 =
388
+ type Result_27 =
381
389
  variant {
382
390
  err: Error;
383
391
  ok: FeeStatus;
384
392
  };
385
- type Result_25 =
393
+ type Result_26 =
386
394
  variant {
387
395
  err: Error;
388
396
  ok: opt Rating;
389
397
  };
390
- type Result_24 =
398
+ type Result_25 =
391
399
  variant {
392
400
  err: Error;
393
401
  ok: RideView;
394
402
  };
395
- type Result_23 =
403
+ type Result_24 =
396
404
  variant {
397
405
  err: Error;
398
406
  ok: RidesPage;
399
407
  };
400
- type Result_22 =
408
+ type Result_23 =
401
409
  variant {
402
410
  err: Error;
403
411
  ok: vec ProfileEntry;
404
412
  };
405
- type Result_21 =
413
+ type Result_22 =
406
414
  variant {
407
415
  err: Error;
408
416
  ok: Wiring;
409
417
  };
410
- type Result_20 =
418
+ type Result_21 =
411
419
  variant {
412
420
  err: Error;
413
421
  ok:
@@ -418,6 +426,11 @@ type Result_20 =
418
426
  subjects: nat;
419
427
  };
420
428
  };
429
+ type Result_20 =
430
+ variant {
431
+ err: Error;
432
+ ok: RideBatchResult;
433
+ };
421
434
  type Result_2 =
422
435
  variant {
423
436
  err: Error;
@@ -426,52 +439,52 @@ type Result_2 =
426
439
  type Result_19 =
427
440
  variant {
428
441
  err: Error;
429
- ok: RideBatchResult;
442
+ ok: LeaseAnswer;
430
443
  };
431
444
  type Result_18 =
432
445
  variant {
433
446
  err: Error;
434
- ok: LeaseAnswer;
447
+ ok: vec Block;
435
448
  };
436
449
  type Result_17 =
437
450
  variant {
438
451
  err: Error;
439
- ok: vec Block;
452
+ ok: DriverCanistersPage;
440
453
  };
441
454
  type Result_16 =
442
455
  variant {
443
456
  err: Error;
444
- ok: DriverCanistersPage;
457
+ ok: vec DriverFeeAccountView;
445
458
  };
446
459
  type Result_15 =
447
460
  variant {
448
461
  err: Error;
449
- ok: vec DriverFeeAccountView;
462
+ ok: vec DriverRoomView;
450
463
  };
451
464
  type Result_14 =
452
465
  variant {
453
466
  err: Error;
454
- ok: vec DriverRoomView;
467
+ ok: ClaimCode;
455
468
  };
456
469
  type Result_13 =
457
470
  variant {
458
471
  err: Error;
459
- ok: MapTicket;
472
+ ok: FeePaid;
460
473
  };
461
474
  type Result_12 =
462
475
  variant {
463
476
  err: Error;
464
- ok: ClaimCode;
477
+ ok: MapTicket;
465
478
  };
466
479
  type Result_11 =
467
480
  variant {
468
481
  err: Error;
469
- ok: FeePaid;
482
+ ok: DriverCanisterQuote;
470
483
  };
471
484
  type Result_10 =
472
485
  variant {
473
486
  err: Error;
474
- ok: DriverCanisterQuote;
487
+ ok: RateRideOutcome;
475
488
  };
476
489
  type Result_1 =
477
490
  variant {
@@ -564,6 +577,7 @@ type MapTicket =
564
577
  validUntilNs: nat64;
565
578
  };
566
579
  type MapRoutesConfig = record {coordinatorId: principal;};
580
+ type MapPlacesConfig = record {coordinatorId: principal;};
567
581
  type MapBbox =
568
582
  record {
569
583
  maxLat: float64;