@jsm-mit/tigi-sharded-package 0.1.0 → 0.3.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 +85 -2
- package/declarations/coordinator/coordinator.did +68 -31
- package/declarations/coordinator/coordinator.did.d.ts +90 -30
- package/declarations/coordinator/coordinator.did.js +55 -31
- package/declarations/core/core.did +146 -40
- package/declarations/core/core.did.d.ts +137 -41
- package/declarations/core/core.did.js +93 -34
- package/dist/actors/driver-canisters-actor.d.ts +77 -0
- package/dist/actors/driver-canisters-actor.d.ts.map +1 -0
- package/dist/actors/driver-canisters-actor.js +147 -0
- package/dist/actors/profiles-actor.d.ts +9 -1
- package/dist/actors/profiles-actor.d.ts.map +1 -1
- package/dist/actors/profiles-actor.js +16 -0
- package/dist/actors/rides-actor.d.ts +12 -1
- package/dist/actors/rides-actor.d.ts.map +1 -1
- package/dist/actors/rides-actor.js +17 -0
- package/dist/chat.d.ts +51 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +87 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/interfaces.d.ts +47 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/package.json +6 -4
|
@@ -11,6 +11,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
11
11
|
'workers' : IDL.Vec(IDL.Principal),
|
|
12
12
|
'deployAdmins' : IDL.Vec(IDL.Principal),
|
|
13
13
|
});
|
|
14
|
+
const AccountsPlace = IDL.Variant({
|
|
15
|
+
'canister' : IDL.Principal,
|
|
16
|
+
'coordinator' : IDL.Principal,
|
|
17
|
+
});
|
|
14
18
|
const PrincipalArgs = IDL.Record({ 'principal' : IDL.Principal });
|
|
15
19
|
const CoordinatorError = IDL.Variant({
|
|
16
20
|
'NoCycles' : IDL.Text,
|
|
@@ -86,6 +90,20 @@ export const idlFactory = ({ IDL }) => {
|
|
|
86
90
|
'Ok' : IDL.Vec(IDL.Text),
|
|
87
91
|
'Err' : CoordinatorError,
|
|
88
92
|
});
|
|
93
|
+
const ChatAdminMethod = IDL.Variant({
|
|
94
|
+
'updateRoom' : IDL.Null,
|
|
95
|
+
'createRoom' : IDL.Null,
|
|
96
|
+
'deleteRoom' : IDL.Null,
|
|
97
|
+
});
|
|
98
|
+
const ForwardChatAdminArgs = IDL.Record({
|
|
99
|
+
'method' : ChatAdminMethod,
|
|
100
|
+
'args' : IDL.Vec(IDL.Nat8),
|
|
101
|
+
'chatCoordinator' : IDL.Principal,
|
|
102
|
+
});
|
|
103
|
+
const Result_7 = IDL.Variant({
|
|
104
|
+
'Ok' : IDL.Vec(IDL.Nat8),
|
|
105
|
+
'Err' : CoordinatorError,
|
|
106
|
+
});
|
|
89
107
|
const CoreWiring = IDL.Record({
|
|
90
108
|
'mode' : Mode,
|
|
91
109
|
'knownWorkers' : IDL.Vec(IDL.Principal),
|
|
@@ -97,7 +115,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
97
115
|
'canister' : IDL.Principal,
|
|
98
116
|
'admins' : IDL.Opt(IDL.Vec(IDL.Principal)),
|
|
99
117
|
});
|
|
100
|
-
const
|
|
118
|
+
const Result_8 = IDL.Variant({ 'Ok' : CoreLive, 'Err' : CoordinatorError });
|
|
101
119
|
const Event = IDL.Record({
|
|
102
120
|
'id' : IDL.Nat64,
|
|
103
121
|
'atNs' : IDL.Nat64,
|
|
@@ -203,7 +221,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
203
221
|
'creationInFlight' : IDL.Bool,
|
|
204
222
|
'prefixes' : IDL.Vec(PrefixEntry),
|
|
205
223
|
});
|
|
206
|
-
const
|
|
224
|
+
const Result_9 = IDL.Variant({ 'Ok' : Status, 'Err' : CoordinatorError });
|
|
207
225
|
const WorkerConfig = IDL.Record({
|
|
208
226
|
'fullAtHeapBytes' : IDL.Nat,
|
|
209
227
|
'load' : LoadThresholds,
|
|
@@ -228,7 +246,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
228
246
|
'error' : IDL.Opt(IDL.Text),
|
|
229
247
|
'canister' : IDL.Principal,
|
|
230
248
|
});
|
|
231
|
-
const
|
|
249
|
+
const Result_10 = IDL.Variant({
|
|
232
250
|
'Ok' : IDL.Vec(WorkerLive),
|
|
233
251
|
'Err' : CoordinatorError,
|
|
234
252
|
});
|
|
@@ -254,22 +272,22 @@ export const idlFactory = ({ IDL }) => {
|
|
|
254
272
|
'load' : TestLoadArgs,
|
|
255
273
|
'canister' : IDL.Principal,
|
|
256
274
|
});
|
|
257
|
-
const
|
|
275
|
+
const Result_11 = IDL.Variant({ 'Ok' : IDL.Bool, 'Err' : CoordinatorError });
|
|
258
276
|
const CanisterArgs = IDL.Record({ 'canister' : IDL.Principal });
|
|
259
277
|
const Dependents = IDL.Record({
|
|
260
278
|
'core' : IDL.Opt(IDL.Principal),
|
|
261
279
|
'workers' : IDL.Vec(IDL.Principal),
|
|
262
280
|
});
|
|
263
281
|
const GeohashesArgs = IDL.Record({ 'geohashes' : IDL.Vec(IDL.Text) });
|
|
264
|
-
const
|
|
282
|
+
const Result_12 = IDL.Variant({
|
|
265
283
|
'Ok' : IDL.Vec(WorkerRecord),
|
|
266
284
|
'Err' : CoordinatorError,
|
|
267
285
|
});
|
|
268
|
-
const
|
|
286
|
+
const Result_13 = IDL.Variant({
|
|
269
287
|
'Ok' : CoreRecord,
|
|
270
288
|
'Err' : CoordinatorError,
|
|
271
289
|
});
|
|
272
|
-
const
|
|
290
|
+
const Result_14 = IDL.Variant({
|
|
273
291
|
'Ok' : WorkerStatus,
|
|
274
292
|
'Err' : CoordinatorError,
|
|
275
293
|
});
|
|
@@ -283,7 +301,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
283
301
|
'sinceNs' : IDL.Nat64,
|
|
284
302
|
'lastError' : IDL.Opt(IDL.Text),
|
|
285
303
|
});
|
|
286
|
-
const
|
|
304
|
+
const Result_15 = IDL.Variant({
|
|
287
305
|
'Ok' : Dependents,
|
|
288
306
|
'Err' : CoordinatorError,
|
|
289
307
|
});
|
|
@@ -294,7 +312,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
294
312
|
'cyclesPerWorker' : IDL.Opt(IDL.Nat),
|
|
295
313
|
'spread' : IDL.Opt(IDL.Bool),
|
|
296
314
|
});
|
|
297
|
-
const
|
|
315
|
+
const Result_16 = IDL.Variant({ 'Ok' : Config, 'Err' : CoordinatorError });
|
|
298
316
|
const CoreLoggingArgs = IDL.Record({ 'enabled' : IDL.Bool });
|
|
299
317
|
const WorkerConfigOutcome = IDL.Record({
|
|
300
318
|
'error' : IDL.Opt(IDL.Text),
|
|
@@ -304,7 +322,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
304
322
|
'stored' : WorkerConfigArgs,
|
|
305
323
|
'workers' : IDL.Vec(WorkerConfigOutcome),
|
|
306
324
|
});
|
|
307
|
-
const
|
|
325
|
+
const Result_17 = IDL.Variant({
|
|
308
326
|
'Ok' : SetWorkerConfigResult,
|
|
309
327
|
'Err' : CoordinatorError,
|
|
310
328
|
});
|
|
@@ -312,7 +330,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
312
330
|
'open' : IDL.Bool,
|
|
313
331
|
'canister' : IDL.Principal,
|
|
314
332
|
});
|
|
315
|
-
const
|
|
333
|
+
const Result_18 = IDL.Variant({
|
|
316
334
|
'Ok' : WorkerView,
|
|
317
335
|
'Err' : CoordinatorError,
|
|
318
336
|
});
|
|
@@ -320,17 +338,22 @@ export const idlFactory = ({ IDL }) => {
|
|
|
320
338
|
'worker' : IDL.Principal,
|
|
321
339
|
'prefixes' : IDL.Vec(IDL.Text),
|
|
322
340
|
});
|
|
323
|
-
const
|
|
341
|
+
const Result_19 = IDL.Variant({
|
|
324
342
|
'Ok' : SplitResult,
|
|
325
343
|
'Err' : CoordinatorError,
|
|
326
344
|
});
|
|
327
|
-
const
|
|
345
|
+
const Result_20 = IDL.Variant({ 'Ok' : IDL.Nat, 'Err' : CoordinatorError });
|
|
328
346
|
const WasmChunkArgs = IDL.Record({
|
|
329
347
|
'bytes' : IDL.Vec(IDL.Nat8),
|
|
330
348
|
'index' : IDL.Nat32,
|
|
331
349
|
});
|
|
332
|
-
const
|
|
350
|
+
const Result_21 = IDL.Variant({ 'Ok' : IDL.Nat64, 'Err' : CoordinatorError });
|
|
333
351
|
return IDL.Service({
|
|
352
|
+
'accountsCanisterFor' : IDL.Func(
|
|
353
|
+
[IDL.Principal],
|
|
354
|
+
[IDL.Opt(AccountsPlace)],
|
|
355
|
+
['query'],
|
|
356
|
+
),
|
|
334
357
|
'addCoreAdmin' : IDL.Func([PrincipalArgs], [Result], []),
|
|
335
358
|
'addDeployAdmin' : IDL.Func([PrincipalArgs], [Result_1], []),
|
|
336
359
|
'assignPrefix' : IDL.Func([AssignPrefixArgs], [Result_2], []),
|
|
@@ -342,16 +365,17 @@ export const idlFactory = ({ IDL }) => {
|
|
|
342
365
|
'deleteWorker' : IDL.Func([DeleteWorkerArgs], [Result_5], []),
|
|
343
366
|
'dismissRoleRequest' : IDL.Func([], [Result_1], []),
|
|
344
367
|
'drainWorker' : IDL.Func([DrainWorkerArgs], [Result_6], []),
|
|
345
|
-
'
|
|
368
|
+
'forwardChatAdmin' : IDL.Func([ForwardChatAdminArgs], [Result_7], []),
|
|
369
|
+
'getCoreStatus' : IDL.Func([], [Result_8], ['composite_query']),
|
|
346
370
|
'getHomeCanister' : IDL.Func([], [IDL.Opt(IDL.Principal)], ['query']),
|
|
347
371
|
'getPrefixMap' : IDL.Func([], [IDL.Vec(PrefixEntry)], ['query']),
|
|
348
372
|
'getRoles' : IDL.Func([], [Roles], ['query']),
|
|
349
|
-
'getStatus' : IDL.Func([], [
|
|
350
|
-
'getWorkersStatus' : IDL.Func([], [
|
|
373
|
+
'getStatus' : IDL.Func([], [Result_9], ['query']),
|
|
374
|
+
'getWorkersStatus' : IDL.Func([], [Result_10], ['composite_query']),
|
|
351
375
|
'handOverSuperadmin' : IDL.Func([], [Result_1], []),
|
|
352
376
|
'hasDependents' : IDL.Func([], [IDL.Bool], ['query']),
|
|
353
377
|
'http_request' : IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
354
|
-
'injectWorkerTestLoad' : IDL.Func([InjectTestLoadArgs], [
|
|
378
|
+
'injectWorkerTestLoad' : IDL.Func([InjectTestLoadArgs], [Result_11], []),
|
|
355
379
|
'installCore' : IDL.Func([], [Result_3], []),
|
|
356
380
|
'installWorker' : IDL.Func([CanisterArgs], [Result_4], []),
|
|
357
381
|
'isWorker' : IDL.Func([CanisterArgs], [IDL.Bool], ['query']),
|
|
@@ -362,9 +386,9 @@ export const idlFactory = ({ IDL }) => {
|
|
|
362
386
|
[IDL.Vec(IDL.Opt(IDL.Principal))],
|
|
363
387
|
['query'],
|
|
364
388
|
),
|
|
365
|
-
'readQueryLoads' : IDL.Func([], [
|
|
366
|
-
'refreshCore' : IDL.Func([], [
|
|
367
|
-
'refreshWorker' : IDL.Func([CanisterArgs], [
|
|
389
|
+
'readQueryLoads' : IDL.Func([], [Result_12], []),
|
|
390
|
+
'refreshCore' : IDL.Func([], [Result_13], []),
|
|
391
|
+
'refreshWorker' : IDL.Func([CanisterArgs], [Result_14], []),
|
|
368
392
|
'removeCoreAdmin' : IDL.Func([PrincipalArgs], [Result], []),
|
|
369
393
|
'removeDeployAdmin' : IDL.Func([PrincipalArgs], [Result_1], []),
|
|
370
394
|
'reportCoreLowCycles' : IDL.Func([ReportLowCyclesArgs], [], []),
|
|
@@ -373,19 +397,19 @@ export const idlFactory = ({ IDL }) => {
|
|
|
373
397
|
'reportLowCycles' : IDL.Func([ReportLowCyclesArgs], [], []),
|
|
374
398
|
'reportOutboxStuck' : IDL.Func([ReportOutboxStuckArgs], [], []),
|
|
375
399
|
'requestSuperadmin' : IDL.Func([], [Result_1], []),
|
|
376
|
-
'resetGroup' : IDL.Func([], [
|
|
377
|
-
'setConfig' : IDL.Func([SetConfigArgs], [
|
|
378
|
-
'setCoreLoggingEnabled' : IDL.Func([CoreLoggingArgs], [
|
|
379
|
-
'setWorkerConfig' : IDL.Func([WorkerConfigArgs], [
|
|
380
|
-
'setWorkerOpen' : IDL.Func([SetWorkerOpenArgs], [
|
|
381
|
-
'splitWorker' : IDL.Func([CanisterArgs], [
|
|
400
|
+
'resetGroup' : IDL.Func([], [Result_15], []),
|
|
401
|
+
'setConfig' : IDL.Func([SetConfigArgs], [Result_16], []),
|
|
402
|
+
'setCoreLoggingEnabled' : IDL.Func([CoreLoggingArgs], [Result_11], []),
|
|
403
|
+
'setWorkerConfig' : IDL.Func([WorkerConfigArgs], [Result_17], []),
|
|
404
|
+
'setWorkerOpen' : IDL.Func([SetWorkerOpenArgs], [Result_18], []),
|
|
405
|
+
'splitWorker' : IDL.Func([CanisterArgs], [Result_19], []),
|
|
382
406
|
'takeCycles' : IDL.Func([], [IDL.Nat], []),
|
|
383
|
-
'topUpCore' : IDL.Func([], [
|
|
384
|
-
'topUpWorker' : IDL.Func([CanisterArgs], [
|
|
407
|
+
'topUpCore' : IDL.Func([], [Result_20], []),
|
|
408
|
+
'topUpWorker' : IDL.Func([CanisterArgs], [Result_20], []),
|
|
385
409
|
'upgradeCore' : IDL.Func([], [Result_3], []),
|
|
386
410
|
'upgradeWorker' : IDL.Func([CanisterArgs], [Result_3], []),
|
|
387
|
-
'uploadCoreWasmChunk' : IDL.Func([WasmChunkArgs], [
|
|
388
|
-
'uploadWorkerWasmChunk' : IDL.Func([WasmChunkArgs], [
|
|
411
|
+
'uploadCoreWasmChunk' : IDL.Func([WasmChunkArgs], [Result_21], []),
|
|
412
|
+
'uploadWorkerWasmChunk' : IDL.Func([WasmChunkArgs], [Result_21], []),
|
|
389
413
|
'workerFor' : IDL.Func([IDL.Text], [IDL.Opt(IDL.Principal)], ['query']),
|
|
390
414
|
});
|
|
391
415
|
};
|
|
@@ -40,46 +40,58 @@ type TigiCore =
|
|
|
40
40
|
/// Admins: an admin more (the coordinator adds the people who rule the group).
|
|
41
41
|
addAdmin: (args: PrincipalArgs) -> (Result_2);
|
|
42
42
|
/// Admins: a canister the core controls joins the demo pool (U-35).
|
|
43
|
-
addPoolCanister: (args: CanisterArgs) -> (
|
|
43
|
+
addPoolCanister: (args: CanisterArgs) -> (Result_17);
|
|
44
44
|
/// Admins: a driver canister, or one driver in it (`driverKey`), is blocked; the workers
|
|
45
45
|
/// drop it at once (WO-2).
|
|
46
46
|
blockDriver: (args: BlockDriverArgs) -> (Result_2);
|
|
47
47
|
/// Admins: a rider is blocked (core.md, accepted 2026-10-22).
|
|
48
48
|
blockRider: (args: BlockRiderArgs) -> (Result_2);
|
|
49
|
+
/// F-20 (U-45): the caller — the driver signed in on the canister's own front — takes
|
|
50
|
+
/// over the demo canister with the code of the link. Single use, 15 min; every refusal
|
|
51
|
+
/// answers the same NotAuthorized. The room of the canister gets the caller (C-15).
|
|
52
|
+
claimDriverCanister: (args: ClaimArgs) -> (Result_17);
|
|
49
53
|
clearLogs: () -> ();
|
|
50
54
|
/// Admins: the chunks become THE module of their kind. A new driver wasm is released
|
|
51
55
|
/// (F-11) and its hash goes to the workers.
|
|
52
|
-
commitDriverWasm: (args: WasmCommitArgs) -> (
|
|
56
|
+
commitDriverWasm: (args: WasmCommitArgs) -> (Result_23);
|
|
53
57
|
/// Admins, localTest: an empty canister from the core's cycles joins the demo pool.
|
|
54
|
-
createLocalPoolCanister: () -> (
|
|
58
|
+
createLocalPoolCanister: () -> (Result_17);
|
|
55
59
|
/// F-2 … F-4, F-10: the caller's own driver canister (localTest: from the core's cycles).
|
|
56
|
-
createMyDriverCanister: () -> (
|
|
60
|
+
createMyDriverCanister: () -> (Result_17);
|
|
57
61
|
/// Admins: the simulator, created once (F-18).
|
|
58
|
-
ensureSimulator: () -> (
|
|
62
|
+
ensureSimulator: () -> (Result_22);
|
|
59
63
|
/// F-8: 15 min more for the holder of a demo canister.
|
|
60
|
-
extendDemoLease: () -> (
|
|
61
|
-
getAdmins: () -> (
|
|
64
|
+
extendDemoLease: () -> (Result_17);
|
|
65
|
+
getAdmins: () -> (Result_21) query;
|
|
66
|
+
/// For the fronts (through the package): where the chat of this environment is. Null =
|
|
67
|
+
/// no chat here yet. The room of a driver is `ChatRoomFunctions.driverRoomId`.
|
|
68
|
+
getChatConfig: () -> (opt ChatConfig) query;
|
|
69
|
+
/// Admins: how far the driver rooms are (C-15).
|
|
70
|
+
getChatRoomsStatus: () -> (Result_20) query;
|
|
62
71
|
/// WO-1, WO-2: what the core knows of a canister — for the workers and anybody.
|
|
63
72
|
getDriverCanisterStatus: (args: CanisterArgs) ->
|
|
64
73
|
(DriverCanisterStatus) query;
|
|
65
|
-
getDriverRollout: () -> (
|
|
66
|
-
getFactoryStatus: () -> (
|
|
74
|
+
getDriverRollout: () -> (Result_19) query;
|
|
75
|
+
getFactoryStatus: () -> (Result_18) query;
|
|
67
76
|
getLogs: () -> (text) query;
|
|
68
77
|
/// The caller's own canister, or the demo canister the caller holds now.
|
|
69
|
-
getMyDriverCanister: () -> (
|
|
78
|
+
getMyDriverCanister: () -> (Result_17) query;
|
|
70
79
|
getMyProfile: () -> (Result_4) query;
|
|
80
|
+
/// C-16, PF-4: the caller's own rating as a rider (sum and count of stars; null = no
|
|
81
|
+
/// rating yet). Ratings reach the core in the workers' batches, up to a minute late.
|
|
82
|
+
getMyRating: () -> (Result_16) query;
|
|
71
83
|
/// C-8: the caller's rides, newest first.
|
|
72
|
-
getMyRides: (args: RidesPageArgs) -> (
|
|
84
|
+
getMyRides: (args: RidesPageArgs) -> (Result_15) query;
|
|
73
85
|
/// C-3: the names of up to MAX_PROFILES_PER_CALL principals; unknown ones are left out.
|
|
74
|
-
getProfiles: (args: ProfilesArgs) -> (
|
|
86
|
+
getProfiles: (args: ProfilesArgs) -> (Result_14) query;
|
|
75
87
|
/// F-11: the driver wasms released so far, oldest first.
|
|
76
88
|
getReleasedDriverWasms: () -> (vec ReleasedWasm) query;
|
|
77
89
|
/// F-18: the simulator of this group; none in prod or before ensureSimulator.
|
|
78
90
|
getSimulator: () -> (opt principal) query;
|
|
79
91
|
/// Admins: the coordinator, the workers confirmed so far, the mode.
|
|
80
|
-
getWiring: () -> (
|
|
92
|
+
getWiring: () -> (Result_13) query;
|
|
81
93
|
/// Admins: how far the outbox to the workers is (C-6, C-7).
|
|
82
|
-
getWorkerOutbox: () -> (
|
|
94
|
+
getWorkerOutbox: () -> (Result_12) query;
|
|
83
95
|
/// Workers of the group: the core asks the coordinator once and remembers the worker,
|
|
84
96
|
/// which then gets the network state through the outbox. A worker calls it once after
|
|
85
97
|
/// its install. Answers true.
|
|
@@ -87,13 +99,30 @@ type TigiCore =
|
|
|
87
99
|
/// Workers of the group: finished rides and ratings, at most MAX_RIDE_BATCH (C-4, C-5).
|
|
88
100
|
/// Idempotent: a known requestId and a counted rating count once. Invalid entries are
|
|
89
101
|
/// rejected and logged; the worker drops the whole batch after an ok.
|
|
90
|
-
ingestRideBatch: (batch: RideBatch) -> (
|
|
91
|
-
///
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
ingestRideBatch: (batch: RideBatch) -> (Result_11);
|
|
103
|
+
/// C-14: the accounts gate of the chat (U-43). The chat core asks this group's
|
|
104
|
+
/// coordinator WHERE (`accountsCanisterFor` → this core) and asks here: true = an
|
|
105
|
+
/// account with a name exists for the principal and the rider is not blocked.
|
|
106
|
+
isUser: ("principal": principal) -> (bool) query;
|
|
107
|
+
/// F-5 … F-7: a demo canister for 15 min (outside prod). A fresh lease comes with a
|
|
108
|
+
/// one-time claim code (F-20, U-45).
|
|
109
|
+
leaseDemoDriverCanister: () -> (Result_10);
|
|
110
|
+
listBlocks: (args: PageArgs) -> (Result_9) query;
|
|
111
|
+
listDriverCanisters: (args: PageArgs) -> (Result_8) query;
|
|
112
|
+
/// Admins: the driver rooms as the core wants them, 100 a page at most.
|
|
113
|
+
listDriverRooms: (args: PageArgs) -> (Result_7) query;
|
|
114
|
+
/// F-20: a fresh claim code for the caller's running demo lease; the old one stops
|
|
115
|
+
/// working.
|
|
116
|
+
newClaimCode: () -> (Result_6);
|
|
95
117
|
removeAdmin: (args: PrincipalArgs) -> (Result_2);
|
|
96
118
|
resumeDriverRollout: () -> (Result_3);
|
|
119
|
+
/// Admins: the chat of this environment — the chat group's coordinator and the project
|
|
120
|
+
/// (whose admin and accounts field are this group's coordinator). Every call sends every
|
|
121
|
+
/// driver room again (a new project, a chat group set up again).
|
|
122
|
+
setChatConfig: (args: ChatConfig) -> (Result_5);
|
|
123
|
+
/// Admins, localTest only: new claim codes live this long (the local check of an
|
|
124
|
+
/// expired code). Heap only: an upgrade brings back 15 min.
|
|
125
|
+
setClaimCodeTtl: (args: ClaimTtlArgs) -> (Result);
|
|
97
126
|
setLoggingEnabled: (enabled: bool) -> (Result_2);
|
|
98
127
|
/// The coordinator only: the balance below which the core asks for cycles.
|
|
99
128
|
setLowCyclesBelow: (value: nat) -> (Result_2);
|
|
@@ -176,33 +205,27 @@ type RideBatch =
|
|
|
176
205
|
type Result_9 =
|
|
177
206
|
variant {
|
|
178
207
|
err: Error;
|
|
179
|
-
ok:
|
|
180
|
-
record {
|
|
181
|
-
headSeq: nat64;
|
|
182
|
-
laggingWorkers: nat;
|
|
183
|
-
lastError: opt text;
|
|
184
|
-
subjects: nat;
|
|
185
|
-
};
|
|
208
|
+
ok: vec Block;
|
|
186
209
|
};
|
|
187
210
|
type Result_8 =
|
|
188
211
|
variant {
|
|
189
212
|
err: Error;
|
|
190
|
-
ok:
|
|
213
|
+
ok: DriverCanistersPage;
|
|
191
214
|
};
|
|
192
215
|
type Result_7 =
|
|
193
216
|
variant {
|
|
194
217
|
err: Error;
|
|
195
|
-
ok:
|
|
218
|
+
ok: vec DriverRoomView;
|
|
196
219
|
};
|
|
197
220
|
type Result_6 =
|
|
198
221
|
variant {
|
|
199
222
|
err: Error;
|
|
200
|
-
ok:
|
|
223
|
+
ok: ClaimCode;
|
|
201
224
|
};
|
|
202
225
|
type Result_5 =
|
|
203
226
|
variant {
|
|
204
227
|
err: Error;
|
|
205
|
-
ok:
|
|
228
|
+
ok: ChatConfig;
|
|
206
229
|
};
|
|
207
230
|
type Result_4 =
|
|
208
231
|
variant {
|
|
@@ -214,55 +237,86 @@ type Result_3 =
|
|
|
214
237
|
err: Error;
|
|
215
238
|
ok: RolloutView;
|
|
216
239
|
};
|
|
240
|
+
type Result_23 =
|
|
241
|
+
variant {
|
|
242
|
+
err: Error;
|
|
243
|
+
ok: WasmInfo;
|
|
244
|
+
};
|
|
245
|
+
type Result_22 =
|
|
246
|
+
variant {
|
|
247
|
+
err: Error;
|
|
248
|
+
ok: principal;
|
|
249
|
+
};
|
|
250
|
+
type Result_21 =
|
|
251
|
+
variant {
|
|
252
|
+
err: Error;
|
|
253
|
+
ok: vec principal;
|
|
254
|
+
};
|
|
255
|
+
type Result_20 =
|
|
256
|
+
variant {
|
|
257
|
+
err: Error;
|
|
258
|
+
ok: ChatRoomsStatus;
|
|
259
|
+
};
|
|
217
260
|
type Result_2 =
|
|
218
261
|
variant {
|
|
219
262
|
err: Error;
|
|
220
263
|
ok: bool;
|
|
221
264
|
};
|
|
265
|
+
type Result_19 =
|
|
266
|
+
variant {
|
|
267
|
+
err: Error;
|
|
268
|
+
ok: opt RolloutView;
|
|
269
|
+
};
|
|
222
270
|
type Result_18 =
|
|
223
271
|
variant {
|
|
224
272
|
err: Error;
|
|
225
|
-
ok:
|
|
273
|
+
ok: FactoryStatus;
|
|
226
274
|
};
|
|
227
275
|
type Result_17 =
|
|
228
276
|
variant {
|
|
229
277
|
err: Error;
|
|
230
|
-
ok:
|
|
278
|
+
ok: DriverCanister;
|
|
231
279
|
};
|
|
232
280
|
type Result_16 =
|
|
233
281
|
variant {
|
|
234
282
|
err: Error;
|
|
235
|
-
ok:
|
|
283
|
+
ok: opt Rating;
|
|
236
284
|
};
|
|
237
285
|
type Result_15 =
|
|
238
286
|
variant {
|
|
239
287
|
err: Error;
|
|
240
|
-
ok:
|
|
288
|
+
ok: RidesPage;
|
|
241
289
|
};
|
|
242
290
|
type Result_14 =
|
|
243
291
|
variant {
|
|
244
292
|
err: Error;
|
|
245
|
-
ok:
|
|
293
|
+
ok: vec ProfileEntry;
|
|
246
294
|
};
|
|
247
295
|
type Result_13 =
|
|
248
296
|
variant {
|
|
249
297
|
err: Error;
|
|
250
|
-
ok:
|
|
298
|
+
ok: Wiring;
|
|
251
299
|
};
|
|
252
300
|
type Result_12 =
|
|
253
301
|
variant {
|
|
254
302
|
err: Error;
|
|
255
|
-
ok:
|
|
303
|
+
ok:
|
|
304
|
+
record {
|
|
305
|
+
headSeq: nat64;
|
|
306
|
+
laggingWorkers: nat;
|
|
307
|
+
lastError: opt text;
|
|
308
|
+
subjects: nat;
|
|
309
|
+
};
|
|
256
310
|
};
|
|
257
311
|
type Result_11 =
|
|
258
312
|
variant {
|
|
259
313
|
err: Error;
|
|
260
|
-
ok:
|
|
314
|
+
ok: RideBatchResult;
|
|
261
315
|
};
|
|
262
316
|
type Result_10 =
|
|
263
317
|
variant {
|
|
264
318
|
err: Error;
|
|
265
|
-
ok:
|
|
319
|
+
ok: LeaseAnswer;
|
|
266
320
|
};
|
|
267
321
|
type Result_1 =
|
|
268
322
|
variant {
|
|
@@ -294,6 +348,11 @@ type RatingEntry =
|
|
|
294
348
|
side: RatingSide;
|
|
295
349
|
stars: nat8;
|
|
296
350
|
};
|
|
351
|
+
type Rating =
|
|
352
|
+
record {
|
|
353
|
+
count: nat;
|
|
354
|
+
sum: nat;
|
|
355
|
+
};
|
|
297
356
|
type ProfilesArgs = record {principals: vec principal;};
|
|
298
357
|
type ProfileEntry =
|
|
299
358
|
record {
|
|
@@ -324,10 +383,22 @@ type Mode =
|
|
|
324
383
|
stage;
|
|
325
384
|
test;
|
|
326
385
|
};
|
|
386
|
+
type LeasedCanister =
|
|
387
|
+
record {
|
|
388
|
+
blocked: bool;
|
|
389
|
+
canister: principal;
|
|
390
|
+
claim: opt ClaimCode;
|
|
391
|
+
createdAtNs: int;
|
|
392
|
+
installedAtNs: opt int;
|
|
393
|
+
kind: DriverCanisterKind;
|
|
394
|
+
leaseUntilNs: opt int;
|
|
395
|
+
moduleHash: opt blob;
|
|
396
|
+
owner: principal;
|
|
397
|
+
};
|
|
327
398
|
type LeaseAnswer =
|
|
328
399
|
variant {
|
|
329
400
|
busy: record {untilNs: int;};
|
|
330
|
-
leased:
|
|
401
|
+
leased: LeasedCanister;
|
|
331
402
|
};
|
|
332
403
|
type InitArgs =
|
|
333
404
|
record {
|
|
@@ -362,6 +433,15 @@ type Error =
|
|
|
362
433
|
details: ErrorDetails;
|
|
363
434
|
logsJson: text;
|
|
364
435
|
};
|
|
436
|
+
type DriverRoomView =
|
|
437
|
+
record {
|
|
438
|
+
canister: principal;
|
|
439
|
+
driverKey: text;
|
|
440
|
+
lastError: opt text;
|
|
441
|
+
recipient: principal;
|
|
442
|
+
roomId: text;
|
|
443
|
+
synced: bool;
|
|
444
|
+
};
|
|
365
445
|
type DriverCanistersPage =
|
|
366
446
|
record {
|
|
367
447
|
canisters: vec DriverCanister;
|
|
@@ -389,6 +469,32 @@ type DriverCanister =
|
|
|
389
469
|
moduleHash: opt blob;
|
|
390
470
|
owner: principal;
|
|
391
471
|
};
|
|
472
|
+
type ClaimTtlArgs = record {seconds: nat;};
|
|
473
|
+
type ClaimCode =
|
|
474
|
+
record {
|
|
475
|
+
canister: principal;
|
|
476
|
+
code: text;
|
|
477
|
+
expiresAtNs: int;
|
|
478
|
+
};
|
|
479
|
+
type ClaimArgs =
|
|
480
|
+
record {
|
|
481
|
+
canister: principal;
|
|
482
|
+
code: text;
|
|
483
|
+
};
|
|
484
|
+
type ChatRoomsStatus =
|
|
485
|
+
record {
|
|
486
|
+
config: opt ChatConfig;
|
|
487
|
+
failures: nat;
|
|
488
|
+
lastError: opt text;
|
|
489
|
+
pending: nat;
|
|
490
|
+
pendingSinceNs: opt int;
|
|
491
|
+
rooms: nat;
|
|
492
|
+
};
|
|
493
|
+
type ChatConfig =
|
|
494
|
+
record {
|
|
495
|
+
chatCoordinatorId: principal;
|
|
496
|
+
projectId: text;
|
|
497
|
+
};
|
|
392
498
|
type CanisterArgs = record {canister: principal;};
|
|
393
499
|
type BlockTarget =
|
|
394
500
|
variant {
|