@jsm-mit/tigi-sharded-package 0.7.0 → 0.9.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/declarations/core/core.did +103 -53
- package/declarations/core/core.did.d.ts +101 -53
- package/declarations/core/core.did.js +86 -49
- package/dist/actors/driver-canisters-actor.d.ts +20 -1
- package/dist/actors/driver-canisters-actor.d.ts.map +1 -1
- package/dist/actors/driver-canisters-actor.js +25 -0
- package/dist/actors/rides-actor.d.ts +2 -0
- package/dist/actors/rides-actor.d.ts.map +1 -1
- package/dist/actors/rides-actor.js +15 -2
- package/dist/group/group.d.ts +11 -0
- package/dist/group/group.d.ts.map +1 -1
- package/dist/group/group.js +17 -0
- package/dist/interfaces.d.ts +14 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -48,7 +48,7 @@ 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) -> (
|
|
51
|
+
addChatShares: (args: ChatSharesArgs) -> (Result_34);
|
|
52
52
|
/// Admins: a canister the core controls joins the demo pool (U-35).
|
|
53
53
|
addPoolCanister: (args: CanisterArgs) -> (Result_6);
|
|
54
54
|
/// Admins: a driver canister, or one driver in it (`driverKey`), is blocked; the workers
|
|
@@ -61,63 +61,68 @@ type TigiCore =
|
|
|
61
61
|
/// answers the same NotAuthorized. The room of the canister gets the caller (C-15).
|
|
62
62
|
claimDriverCanister: (args: ClaimArgs) -> (Result_6);
|
|
63
63
|
clearLogs: () -> ();
|
|
64
|
+
/// Admins (F-24): the chunks become THE app; drivers' canisters take it at their "Aktualizuj".
|
|
65
|
+
commitDriverApk: (args: ApkCommitArgs) -> (Result_33);
|
|
64
66
|
/// Admins: the chunks become THE module of their kind. A new driver wasm is released
|
|
65
67
|
/// (F-11) and its hash goes to the workers.
|
|
66
|
-
commitDriverWasm: (args: WasmCommitArgs) -> (
|
|
68
|
+
commitDriverWasm: (args: WasmCommitArgs) -> (Result_32);
|
|
67
69
|
/// Admins, localTest: an empty canister from the core's cycles joins the demo pool.
|
|
68
70
|
createLocalPoolCanister: () -> (Result_6);
|
|
69
|
-
/// F-2 … F-4, F-10: the caller's own driver canister (localTest: from the core's cycles).
|
|
70
71
|
createMyDriverCanister: () -> (Result_6);
|
|
71
72
|
/// Admins: the simulator, created once (F-18).
|
|
72
|
-
ensureSimulator: () -> (
|
|
73
|
+
ensureSimulator: () -> (Result_31);
|
|
73
74
|
/// F-8: 15 min more for the holder of a demo canister.
|
|
74
75
|
extendDemoLease: () -> (Result_6);
|
|
75
|
-
getAdmins: () -> (
|
|
76
|
+
getAdmins: () -> (Result_30) query;
|
|
76
77
|
/// For the fronts (through the package): where the chat of this environment is. Null =
|
|
77
78
|
/// no chat here yet. The room of a driver is `ChatRoomFunctions.driverRoomId`.
|
|
78
79
|
getChatConfig: () -> (opt ChatConfig) query;
|
|
79
80
|
/// Admins: how far the driver rooms are (C-15).
|
|
80
|
-
getChatRoomsStatus: () -> (
|
|
81
|
+
getChatRoomsStatus: () -> (Result_29) query;
|
|
82
|
+
/// F-24 (public): the current app — what a driver canister compares its own with.
|
|
83
|
+
getDriverApk: () -> (opt ApkInfo) query;
|
|
84
|
+
/// F-24 (public): one chunk of the current app; a driver canister reads them in order.
|
|
85
|
+
getDriverApkChunk: (index: nat32) -> (opt blob) query;
|
|
81
86
|
/// WO-1, WO-2: what the core knows of a canister — for the workers and anybody.
|
|
82
87
|
getDriverCanisterStatus: (args: CanisterArgs) ->
|
|
83
88
|
(DriverCanisterStatus) query;
|
|
84
89
|
/// Admins: the account of one driver canister (C-17 … C-20).
|
|
85
|
-
getDriverFeeAccount: (args: CanisterArgs) -> (
|
|
90
|
+
getDriverFeeAccount: (args: CanisterArgs) -> (Result_28) query;
|
|
86
91
|
/// C-19: a driver canister of the registry asks for its bill — the events since its
|
|
87
92
|
/// last settlement, priced on the fee's day. Called by the canister at its first
|
|
88
93
|
/// "Przyjmuję zlecenia" of a day. A pool canister owes nothing (C-18).
|
|
89
|
-
getDriverFeeBill: () -> (
|
|
94
|
+
getDriverFeeBill: () -> (Result_27);
|
|
90
95
|
/// Admins (stage 7): the aggregated rating of one driver (sum and count of stars; null =
|
|
91
96
|
/// no rating yet) — the value the workers get through the outbox (C-6).
|
|
92
|
-
getDriverRating: (args: DriverRatingArgs) -> (
|
|
93
|
-
getDriverRollout: () -> (
|
|
94
|
-
getFactoryStatus: () -> (
|
|
97
|
+
getDriverRating: (args: DriverRatingArgs) -> (Result_23) query;
|
|
98
|
+
getDriverRollout: () -> (Result_26) query;
|
|
99
|
+
getFactoryStatus: () -> (Result_25) query;
|
|
95
100
|
/// C-22: the rates, the day, the multiplier cached, the totals.
|
|
96
|
-
getFeeStatus: () -> (
|
|
101
|
+
getFeeStatus: () -> (Result_24) query;
|
|
97
102
|
getLogs: () -> (text) query;
|
|
98
103
|
/// The caller's own canister, or the demo canister the caller holds now.
|
|
99
104
|
getMyDriverCanister: () -> (Result_6) query;
|
|
100
105
|
getMyProfile: () -> (Result_4) query;
|
|
101
106
|
/// C-16, PF-4: the caller's own rating as a rider (sum and count of stars; null = no
|
|
102
107
|
/// rating yet). Ratings reach the core in the workers' batches, up to a minute late.
|
|
103
|
-
getMyRating: () -> (
|
|
108
|
+
getMyRating: () -> (Result_23) query;
|
|
104
109
|
/// C-8 (KU-4, stage 7): one line of the caller's history by its requestId — for the
|
|
105
110
|
/// details screen after a reload and to show the rating after `rateMyRide`. Another
|
|
106
111
|
/// rider's ride → `NotAuthorized`; not in the core (yet, K-9) → `NotFound`.
|
|
107
|
-
getMyRide: (args: RequestIdArgs) -> (
|
|
112
|
+
getMyRide: (args: RequestIdArgs) -> (Result_22) query;
|
|
108
113
|
/// C-8: the caller's rides, newest first, with the places (KU-4) and whether the driver
|
|
109
114
|
/// can still be rated (KU-5, C-23).
|
|
110
|
-
getMyRides: (args: RidesPageArgs) -> (
|
|
115
|
+
getMyRides: (args: RidesPageArgs) -> (Result_21) query;
|
|
111
116
|
/// C-3: the names of up to MAX_PROFILES_PER_CALL principals; unknown ones are left out.
|
|
112
|
-
getProfiles: (args: ProfilesArgs) -> (
|
|
117
|
+
getProfiles: (args: ProfilesArgs) -> (Result_20) query;
|
|
113
118
|
/// F-11: the driver wasms released so far, oldest first.
|
|
114
119
|
getReleasedDriverWasms: () -> (vec ReleasedWasm) query;
|
|
115
120
|
/// F-18: the simulator of this group; none in prod or before ensureSimulator.
|
|
116
121
|
getSimulator: () -> (opt principal) query;
|
|
117
122
|
/// Admins: the coordinator, the workers confirmed so far, the mode.
|
|
118
|
-
getWiring: () -> (
|
|
123
|
+
getWiring: () -> (Result_19) query;
|
|
119
124
|
/// Admins: how far the outbox to the workers is (C-6, C-7).
|
|
120
|
-
getWorkerOutbox: () -> (
|
|
125
|
+
getWorkerOutbox: () -> (Result_18) query;
|
|
121
126
|
/// Workers of the group: the core asks the coordinator once and remembers the worker,
|
|
122
127
|
/// which then gets the network state through the outbox. A worker calls it once after
|
|
123
128
|
/// its install. Answers true.
|
|
@@ -125,27 +130,30 @@ type TigiCore =
|
|
|
125
130
|
/// Workers of the group: finished rides and ratings, at most MAX_RIDE_BATCH (C-4, C-5).
|
|
126
131
|
/// Idempotent: a known requestId and a counted rating count once. Invalid entries are
|
|
127
132
|
/// rejected and logged; the worker drops the whole batch after an ok.
|
|
128
|
-
ingestRideBatch: (batch: RideBatch) -> (
|
|
133
|
+
ingestRideBatch: (batch: RideBatch) -> (Result_17);
|
|
129
134
|
/// C-14: the accounts gate of the chat (U-43). The chat core asks this group's
|
|
130
135
|
/// coordinator WHERE (`accountsCanisterFor` → this core) and asks here: true = an
|
|
131
136
|
/// account with a name exists for the principal and the rider is not blocked.
|
|
132
137
|
isUser: ("principal": principal) -> (bool) query;
|
|
133
138
|
/// F-5 … F-7: a demo canister for 15 min (outside prod). A fresh lease comes with a
|
|
134
139
|
/// one-time claim code (F-20, U-45).
|
|
135
|
-
leaseDemoDriverCanister: () -> (
|
|
136
|
-
listBlocks: (args: PageArgs) -> (
|
|
137
|
-
listDriverCanisters: (args: PageArgs) -> (
|
|
140
|
+
leaseDemoDriverCanister: () -> (Result_16);
|
|
141
|
+
listBlocks: (args: PageArgs) -> (Result_15) query;
|
|
142
|
+
listDriverCanisters: (args: PageArgs) -> (Result_14) query;
|
|
138
143
|
/// Admins: the accounts, 100 a page at most.
|
|
139
|
-
listDriverFeeAccounts: (args: PageArgs) -> (
|
|
144
|
+
listDriverFeeAccounts: (args: PageArgs) -> (Result_13) query;
|
|
140
145
|
/// Admins: the driver rooms as the core wants them, 100 a page at most.
|
|
141
|
-
listDriverRooms: (args: PageArgs) -> (
|
|
146
|
+
listDriverRooms: (args: PageArgs) -> (Result_12) query;
|
|
142
147
|
/// F-20: a fresh claim code for the caller's running demo lease; the old one stops
|
|
143
148
|
/// working.
|
|
144
|
-
newClaimCode: () -> (
|
|
149
|
+
newClaimCode: () -> (Result_11);
|
|
145
150
|
/// C-20: the driver canister pays the bill of `day` with the cycles attached to this
|
|
146
151
|
/// call. The core takes exactly the bill (the rest goes back), or nothing when less is
|
|
147
152
|
/// attached (`FEE_SHORT`); a day paid already answers `accepted = 0`.
|
|
148
|
-
payDriverFee: (args: FeePayArgs) -> (
|
|
153
|
+
payDriverFee: (args: FeePayArgs) -> (Result_10);
|
|
154
|
+
/// F-2 … F-4, F-10: the caller's own driver canister (localTest: from the core's cycles).
|
|
155
|
+
/// F-1 (user 2026-10-31): what a driver canister costs now and the caller's account to pay to.
|
|
156
|
+
quoteMyDriverCanister: () -> (Result_9);
|
|
149
157
|
/// C-23 (KU-5, stage 7): the rider rates the driver of a finished ride from the history.
|
|
150
158
|
/// Only the ride's rider; a completed ride within 24 h of its end (K-8); once per ride
|
|
151
159
|
/// over both paths — a live rating through the worker and this one count once together
|
|
@@ -184,6 +192,8 @@ type TigiCore =
|
|
|
184
192
|
unblockRider: (args: UnblockRiderArgs) -> (Result_2);
|
|
185
193
|
/// Admins: the simulator gets the current simulator wasm (stop → upgrade → start).
|
|
186
194
|
upgradeSimulator: () -> (Result_1);
|
|
195
|
+
/// Admins (F-24): one chunk of a new Android app.
|
|
196
|
+
uploadDriverApkChunk: (args: ApkChunkArgs) -> (Result);
|
|
187
197
|
/// Admins: one chunk of a new driver or simulator module (gzipped: ~0.7 MB).
|
|
188
198
|
uploadDriverWasmChunk: (args: WasmChunkArgs) -> (Result);
|
|
189
199
|
};
|
|
@@ -274,7 +284,7 @@ type RideBatch =
|
|
|
274
284
|
type Result_9 =
|
|
275
285
|
variant {
|
|
276
286
|
err: Error;
|
|
277
|
-
ok:
|
|
287
|
+
ok: DriverCanisterQuote;
|
|
278
288
|
};
|
|
279
289
|
type Result_8 =
|
|
280
290
|
variant {
|
|
@@ -301,21 +311,31 @@ type Result_4 =
|
|
|
301
311
|
err: Error;
|
|
302
312
|
ok: Profile;
|
|
303
313
|
};
|
|
304
|
-
type
|
|
314
|
+
type Result_34 =
|
|
305
315
|
variant {
|
|
306
316
|
err: Error;
|
|
307
317
|
ok: ChatSharesAck;
|
|
308
318
|
};
|
|
309
|
-
type
|
|
319
|
+
type Result_33 =
|
|
320
|
+
variant {
|
|
321
|
+
err: Error;
|
|
322
|
+
ok: ApkInfo;
|
|
323
|
+
};
|
|
324
|
+
type Result_32 =
|
|
310
325
|
variant {
|
|
311
326
|
err: Error;
|
|
312
327
|
ok: WasmInfo;
|
|
313
328
|
};
|
|
314
|
-
type
|
|
329
|
+
type Result_31 =
|
|
315
330
|
variant {
|
|
316
331
|
err: Error;
|
|
317
332
|
ok: principal;
|
|
318
333
|
};
|
|
334
|
+
type Result_30 =
|
|
335
|
+
variant {
|
|
336
|
+
err: Error;
|
|
337
|
+
ok: vec principal;
|
|
338
|
+
};
|
|
319
339
|
type Result_3 =
|
|
320
340
|
variant {
|
|
321
341
|
err: Error;
|
|
@@ -324,52 +344,52 @@ type Result_3 =
|
|
|
324
344
|
type Result_29 =
|
|
325
345
|
variant {
|
|
326
346
|
err: Error;
|
|
327
|
-
ok:
|
|
347
|
+
ok: ChatRoomsStatus;
|
|
328
348
|
};
|
|
329
349
|
type Result_28 =
|
|
330
350
|
variant {
|
|
331
351
|
err: Error;
|
|
332
|
-
ok:
|
|
352
|
+
ok: DriverFeeAccountView;
|
|
333
353
|
};
|
|
334
354
|
type Result_27 =
|
|
335
355
|
variant {
|
|
336
356
|
err: Error;
|
|
337
|
-
ok:
|
|
357
|
+
ok: FeeBillAnswer;
|
|
338
358
|
};
|
|
339
359
|
type Result_26 =
|
|
340
360
|
variant {
|
|
341
361
|
err: Error;
|
|
342
|
-
ok:
|
|
362
|
+
ok: opt RolloutView;
|
|
343
363
|
};
|
|
344
364
|
type Result_25 =
|
|
345
365
|
variant {
|
|
346
366
|
err: Error;
|
|
347
|
-
ok:
|
|
367
|
+
ok: FactoryStatus;
|
|
348
368
|
};
|
|
349
369
|
type Result_24 =
|
|
350
370
|
variant {
|
|
351
371
|
err: Error;
|
|
352
|
-
ok:
|
|
372
|
+
ok: FeeStatus;
|
|
353
373
|
};
|
|
354
374
|
type Result_23 =
|
|
355
375
|
variant {
|
|
356
376
|
err: Error;
|
|
357
|
-
ok:
|
|
377
|
+
ok: opt Rating;
|
|
358
378
|
};
|
|
359
379
|
type Result_22 =
|
|
360
380
|
variant {
|
|
361
381
|
err: Error;
|
|
362
|
-
ok:
|
|
382
|
+
ok: RideView;
|
|
363
383
|
};
|
|
364
384
|
type Result_21 =
|
|
365
385
|
variant {
|
|
366
386
|
err: Error;
|
|
367
|
-
ok:
|
|
387
|
+
ok: RidesPage;
|
|
368
388
|
};
|
|
369
389
|
type Result_20 =
|
|
370
390
|
variant {
|
|
371
391
|
err: Error;
|
|
372
|
-
ok:
|
|
392
|
+
ok: vec ProfileEntry;
|
|
373
393
|
};
|
|
374
394
|
type Result_2 =
|
|
375
395
|
variant {
|
|
@@ -377,16 +397,11 @@ type Result_2 =
|
|
|
377
397
|
ok: bool;
|
|
378
398
|
};
|
|
379
399
|
type Result_19 =
|
|
380
|
-
variant {
|
|
381
|
-
err: Error;
|
|
382
|
-
ok: vec ProfileEntry;
|
|
383
|
-
};
|
|
384
|
-
type Result_18 =
|
|
385
400
|
variant {
|
|
386
401
|
err: Error;
|
|
387
402
|
ok: Wiring;
|
|
388
403
|
};
|
|
389
|
-
type
|
|
404
|
+
type Result_18 =
|
|
390
405
|
variant {
|
|
391
406
|
err: Error;
|
|
392
407
|
ok:
|
|
@@ -397,41 +412,46 @@ type Result_17 =
|
|
|
397
412
|
subjects: nat;
|
|
398
413
|
};
|
|
399
414
|
};
|
|
400
|
-
type
|
|
415
|
+
type Result_17 =
|
|
401
416
|
variant {
|
|
402
417
|
err: Error;
|
|
403
418
|
ok: RideBatchResult;
|
|
404
419
|
};
|
|
405
|
-
type
|
|
420
|
+
type Result_16 =
|
|
406
421
|
variant {
|
|
407
422
|
err: Error;
|
|
408
423
|
ok: LeaseAnswer;
|
|
409
424
|
};
|
|
410
|
-
type
|
|
425
|
+
type Result_15 =
|
|
411
426
|
variant {
|
|
412
427
|
err: Error;
|
|
413
428
|
ok: vec Block;
|
|
414
429
|
};
|
|
415
|
-
type
|
|
430
|
+
type Result_14 =
|
|
416
431
|
variant {
|
|
417
432
|
err: Error;
|
|
418
433
|
ok: DriverCanistersPage;
|
|
419
434
|
};
|
|
420
|
-
type
|
|
435
|
+
type Result_13 =
|
|
421
436
|
variant {
|
|
422
437
|
err: Error;
|
|
423
438
|
ok: vec DriverFeeAccountView;
|
|
424
439
|
};
|
|
425
|
-
type
|
|
440
|
+
type Result_12 =
|
|
426
441
|
variant {
|
|
427
442
|
err: Error;
|
|
428
443
|
ok: vec DriverRoomView;
|
|
429
444
|
};
|
|
430
|
-
type
|
|
445
|
+
type Result_11 =
|
|
431
446
|
variant {
|
|
432
447
|
err: Error;
|
|
433
448
|
ok: ClaimCode;
|
|
434
449
|
};
|
|
450
|
+
type Result_10 =
|
|
451
|
+
variant {
|
|
452
|
+
err: Error;
|
|
453
|
+
ok: FeePaid;
|
|
454
|
+
};
|
|
435
455
|
type Result_1 =
|
|
436
456
|
variant {
|
|
437
457
|
err: Error;
|
|
@@ -670,6 +690,15 @@ type DriverCanisterStatus =
|
|
|
670
690
|
moduleHash: opt blob;
|
|
671
691
|
registered: bool;
|
|
672
692
|
};
|
|
693
|
+
type DriverCanisterQuote =
|
|
694
|
+
record {
|
|
695
|
+
accountId: blob;
|
|
696
|
+
balanceE8s: nat;
|
|
697
|
+
minimumE8s: nat;
|
|
698
|
+
priceCycles: nat;
|
|
699
|
+
suggestedE8s: nat;
|
|
700
|
+
xdrPermyriadPerIcp: nat;
|
|
701
|
+
};
|
|
673
702
|
type DriverCanisterKind =
|
|
674
703
|
variant {
|
|
675
704
|
own;
|
|
@@ -773,4 +802,25 @@ type Block =
|
|
|
773
802
|
reason: text;
|
|
774
803
|
target: BlockTarget;
|
|
775
804
|
};
|
|
805
|
+
type ApkInfo =
|
|
806
|
+
record {
|
|
807
|
+
chunks: nat32;
|
|
808
|
+
committedAtNs: int;
|
|
809
|
+
sha256: blob;
|
|
810
|
+
size: nat;
|
|
811
|
+
versionCode: nat32;
|
|
812
|
+
versionName: text;
|
|
813
|
+
};
|
|
814
|
+
type ApkCommitArgs =
|
|
815
|
+
record {
|
|
816
|
+
chunks: nat32;
|
|
817
|
+
sha256: blob;
|
|
818
|
+
versionCode: nat32;
|
|
819
|
+
versionName: text;
|
|
820
|
+
};
|
|
821
|
+
type ApkChunkArgs =
|
|
822
|
+
record {
|
|
823
|
+
bytes: blob;
|
|
824
|
+
index: nat32;
|
|
825
|
+
};
|
|
776
826
|
service : (init: InitArgs) -> TigiCore
|