pi-better-subagents 0.26.2 → 0.27.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.
@@ -0,0 +1,648 @@
1
+ // Generated from packages/operation-coordinator/src/types.ts. Do not edit directly.
2
+ /**
3
+ * Public record and call shapes for the durable operation coordinator.
4
+ *
5
+ * The store owns dependency records, phase transitions, resume claims, evidence
6
+ * pins and the result outbox. It owns no provider transport, no tool execution,
7
+ * no model call and no permission decision. Callers keep launch authority,
8
+ * continuation admission and interpretation of the evidence.
9
+ *
10
+ * Identity rules that the API itself enforces:
11
+ *
12
+ * - an operation's owner, task id and launch token are immutable after
13
+ * registration; a different caller writing a terminal outcome is refused;
14
+ * - a wait belongs to exactly one owner identity, and only that owner may cancel
15
+ * it or acknowledge its evidence;
16
+ * - one owner identity holds at most one pending wait generation, and every
17
+ * mutation names the generation it acts on;
18
+ * - a resume attempt id and launch token are persisted before the attempt is
19
+ * spawned, so a crash is reconciled instead of relaunched.
20
+ */
21
+
22
+ /** Schema version this build writes and accepts. Any other version is refused. */
23
+ export const SCHEMA_VERSION = 1;
24
+
25
+ /** Who receives an operation's result and decides what happens next. */
26
+ export type OwnerKind = "parent-session" | "worker-conversation";
27
+
28
+ /**
29
+ * Execution owner: the parent session or worker conversation that interprets
30
+ * terminal evidence. `workspace` is the binding that must still exist for a
31
+ * continuation, so it is part of the recorded identity.
32
+ */
33
+ export interface OwnerIdentity {
34
+ kind: OwnerKind;
35
+ /** Foreground session id or worker conversation id. Never a display label. */
36
+ sessionId: string;
37
+ /** Canonical workspace path the owner is bound to. */
38
+ workspace: string;
39
+ /** Plan/workflow branch binding, when the owner is on one. */
40
+ branchId?: string | null;
41
+ /** Goal binding, when the owner is on one. */
42
+ goalId?: string | null;
43
+ }
44
+
45
+ /**
46
+ * Observer health, reported separately from the wait phase. A wait does not
47
+ * look healthy merely because it exists.
48
+ */
49
+ export type ObserverHealth = "active" | "unmonitored" | "lost";
50
+
51
+ /** An operation is `terminal` once exactly one terminal revision is recorded. */
52
+ export type OperationPhase = "running" | "terminal";
53
+
54
+ /** Every terminal outcome resolves a dependency. None of them implies success. */
55
+ export type TerminalOutcome = "succeeded" | "failed" | "cancelled" | "lost";
56
+
57
+ /** Kinds of retained evidence reference. Never a credential or env value. */
58
+ export type EvidenceKind = "terminal-record" | "log" | "summary" | "artifact";
59
+
60
+ export type WaitPhase =
61
+ | "registering"
62
+ | "parking"
63
+ | "waiting"
64
+ | "ready"
65
+ | "resuming"
66
+ | "consumed"
67
+ | "held"
68
+ | "cancelled";
69
+
70
+ /** Phases that no longer accept automatic continuation. */
71
+ export const TERMINAL_WAIT_PHASES: readonly WaitPhase[] = ["consumed", "cancelled"];
72
+
73
+ // ---- operation registration ---------------------------------------------
74
+
75
+ /** Observer identity: which adapter observed the operation, and at what version. */
76
+ export interface ObserverIdentity {
77
+ kind: string;
78
+ version: string;
79
+ }
80
+
81
+ /**
82
+ * Supervision identity: the host process that owns observation. It is mutable
83
+ * (a replacement host takes over on reload) while launch identity is not.
84
+ */
85
+ export interface SupervisionIdentity {
86
+ /** Host that owns supervision, e.g. the Pi process id plus a start token. */
87
+ hostId: string;
88
+ /** Runner process identity, when a separate runner owns the operation. */
89
+ runnerId?: string | null;
90
+ /** Process start token of the runner, used to reject a recycled pid. */
91
+ processStartToken?: string | null;
92
+ }
93
+
94
+ export interface RegisterOperationInput {
95
+ /** Durable execution id, distinct from any caller-supplied intent id. */
96
+ operationId: string;
97
+ /** Background task id. One durable operation per task launch. */
98
+ taskId: string;
99
+ /**
100
+ * Token persisted before the runner starts. The runner claims this token
101
+ * before executing, so a lost launch acknowledgement is reconciled on the
102
+ * same token instead of issuing a second execution.
103
+ */
104
+ launchToken: string;
105
+ owner: OwnerIdentity;
106
+ observer: ObserverIdentity;
107
+ supervision?: SupervisionIdentity | null;
108
+ /** Reference to the permission/authority snapshot. Never credential material. */
109
+ authorityRef?: string | null;
110
+ /** Caller retry-correlation id. Not an execution identity and not a grant. */
111
+ intentRef?: string | null;
112
+ }
113
+
114
+ export interface OperationRecord {
115
+ operationId: string;
116
+ taskId: string;
117
+ launchToken: string;
118
+ owner: OwnerIdentity;
119
+ observer: ObserverIdentity;
120
+ supervision: SupervisionIdentity | null;
121
+ authorityRef: string | null;
122
+ intentRef: string | null;
123
+ phase: OperationPhase;
124
+ health: ObserverHealth;
125
+ /** Why the observer is unmonitored or lost, when it is. */
126
+ healthReason: string | null;
127
+ /** `0` while the operation runs; `1` once its single terminal revision exists. */
128
+ terminalRevision: number;
129
+ terminalOutcome: TerminalOutcome | null;
130
+ /** Terminal event id that produced the revision, for idempotent replay. */
131
+ terminalEventId: string | null;
132
+ /** True when retention removed detail; the outcome still stands. */
133
+ terminalDetailLost: boolean;
134
+ /** Why the terminal outcome was recorded; required when evidence was absent or lost. */
135
+ terminalReason: string | null;
136
+ createdAt: number;
137
+ updatedAt: number;
138
+ terminalAt: number | null;
139
+ }
140
+
141
+ export interface RegisterOperationResult {
142
+ operation: OperationRecord;
143
+ /** False when the same launch identity was already registered (idempotent replay). */
144
+ created: boolean;
145
+ }
146
+
147
+ export interface RecordSupervisionInput {
148
+ operationId: string;
149
+ /** Must be the recorded owner; a replacement host acts for the same owner. */
150
+ owner: OwnerIdentity;
151
+ supervision?: SupervisionIdentity | null;
152
+ health?: ObserverHealth;
153
+ reason?: string | null;
154
+ }
155
+
156
+ // ---- terminal outcome ---------------------------------------------------
157
+
158
+ /**
159
+ * One retained evidence reference. `summary` is bounded and is what an
160
+ * interpreter may read after logs were reclaimed; `detailLost` records that
161
+ * retention removed detail, so no exit code is ever recreated from a missing pid.
162
+ */
163
+ export interface EvidenceRefInput {
164
+ kind: EvidenceKind;
165
+ /** Retained path, artifact id or record key. Never a credential or env value. */
166
+ ref: string;
167
+ summary?: string;
168
+ detailLost?: boolean;
169
+ bytes?: number;
170
+ }
171
+
172
+ export interface OperationEvidenceRecord extends EvidenceRefInput {
173
+ operationId: string;
174
+ terminalRevision: number;
175
+ ordinal: number;
176
+ detailLost: boolean;
177
+ capturedAt: number;
178
+ }
179
+
180
+ export interface RecordTerminalOutcomeInput {
181
+ operationId: string;
182
+ /** Unique terminal event id from the supervisor. A retry must reuse it. */
183
+ eventId: string;
184
+ outcome: TerminalOutcome;
185
+ /** The recorded owner, or the supervisor acting for it. Mismatch is refused. */
186
+ owner: OwnerIdentity;
187
+ evidence?: EvidenceRefInput[];
188
+ /** True when the terminal record itself is gone (lost evidence). */
189
+ detailLost?: boolean;
190
+ /** Why the operation ended, required when evidence is absent or lost. */
191
+ reason?: string;
192
+ }
193
+
194
+ export interface RecordTerminalOutcomeResult {
195
+ operation: OperationRecord;
196
+ /** True when this call created the terminal revision; false on idempotent replay. */
197
+ recorded: boolean;
198
+ /** Outbox events for this terminal revision (empty when already delivered earlier). */
199
+ outbox: OutboxEventRecord[];
200
+ /** Wait generations that moved to `ready` because of this revision. */
201
+ ready: WaitRecord[];
202
+ }
203
+
204
+ /** Filter for `listOperations`. */
205
+ export interface OperationFilter {
206
+ owner?: OwnerIdentity;
207
+ phase?: OperationPhase;
208
+ taskId?: string;
209
+ }
210
+
211
+ // ---- waits --------------------------------------------------------------
212
+
213
+ /**
214
+ * Dependency edge to one operation. `owner` (default) requires the operation to
215
+ * be owned by the waiting owner. `explicit` records a cross-owner link for a
216
+ * shared observer; it grants no authority over the operation.
217
+ */
218
+ export interface WaitDependencyInput {
219
+ operationId: string;
220
+ link?: "owner" | "explicit";
221
+ }
222
+
223
+ /**
224
+ * Checkpoint intent for a worker that will park. Recorded in `registering` and
225
+ * required before the wait can reach `waiting` or `ready`.
226
+ */
227
+ export interface WaitParkIntent {
228
+ /** Attempt that committed the tool result and will exit. */
229
+ attemptId: string;
230
+ /** Native session checkpoint identity the tool result was committed into. */
231
+ checkpointId: string;
232
+ /** Conversation writer lease released after that attempt exited. */
233
+ writerLeaseId?: string | null;
234
+ }
235
+
236
+ export interface RegisterWaitInput {
237
+ /**
238
+ * Stable wait identity reused across generations. Omit to mint one. A new
239
+ * generation may only start after the previous generation is consumed or
240
+ * cancelled.
241
+ */
242
+ waitId?: string;
243
+ owner: OwnerIdentity;
244
+ /** All-settled dependencies. Every listed operation must be terminal. */
245
+ dependencies: WaitDependencyInput[];
246
+ /** Next reasoning step. Cannot change tools, model, role, permissions or authorization. */
247
+ continuationNote: string;
248
+ /** Present for a worker parking; absent for a responsive parent. */
249
+ park?: WaitParkIntent | null;
250
+ origin?: {
251
+ taskIds?: string[];
252
+ assignmentRef?: string | null;
253
+ attemptId?: string | null;
254
+ };
255
+ }
256
+
257
+ export interface WaitDependencyRecord {
258
+ operationId: string;
259
+ link: "owner" | "explicit";
260
+ /** `0` while unsettled; the operation's terminal revision once settled. */
261
+ terminalRevision: number;
262
+ terminalOutcome: TerminalOutcome | null;
263
+ settledAt: number | null;
264
+ }
265
+
266
+ export interface WaitAcknowledgement {
267
+ disposition: AcknowledgeDisposition;
268
+ note: string;
269
+ /** Exact evidence revisions interpreted by the owner. */
270
+ revisions: Array<{ operationId: string; revision: number }>;
271
+ acknowledgedAt: number;
272
+ }
273
+
274
+ export interface WaitRecord {
275
+ waitId: string;
276
+ generation: number;
277
+ owner: OwnerIdentity;
278
+ phase: WaitPhase;
279
+ phaseReason: string | null;
280
+ /** Incremented by every cancellation; invalidates claims taken before it. */
281
+ cancelEpoch: number;
282
+ continuationNote: string;
283
+ park: WaitParkIntent | null;
284
+ origin: RegisterWaitInput["origin"] | null;
285
+ dependencies: WaitDependencyRecord[];
286
+ /** True when every dependency has a terminal revision. */
287
+ settled: boolean;
288
+ settledAt: number | null;
289
+ acknowledgement: WaitAcknowledgement | null;
290
+ createdAt: number;
291
+ updatedAt: number;
292
+ }
293
+
294
+ export interface RegisterWaitResult {
295
+ wait: WaitRecord;
296
+ /** True when every dependency was already terminal inside the registration transaction. */
297
+ settledAtRegistration: boolean;
298
+ /** Result delivery enqueued because the dependencies were already settled. */
299
+ outbox: OutboxEventRecord[];
300
+ }
301
+
302
+ export interface TransitionWaitPhaseInput {
303
+ waitId: string;
304
+ generation: number;
305
+ /** Current phase the caller believes it is acting on. Mismatch is refused. */
306
+ from: WaitPhase;
307
+ /** `consumed`/`cancelled` have their own calls; `resuming` needs a claim. */
308
+ to: "parking" | "waiting" | "ready" | "held";
309
+ reason?: string;
310
+ /**
311
+ * Required for a parked wait leaving `parking`. All three facts must hold:
312
+ * the checkpoint was committed, the writer lease was released, and the
313
+ * original writer process was observed gone.
314
+ */
315
+ proof?: {
316
+ checkpointRecorded: boolean;
317
+ writerLeaseReleased: boolean;
318
+ /** Must be `true`; an absent or false value cannot prove writer quiescence. */
319
+ writerPidGone?: boolean;
320
+ };
321
+ }
322
+
323
+ export interface TransitionWaitPhaseResult {
324
+ wait: WaitRecord;
325
+ outbox: OutboxEventRecord[];
326
+ }
327
+
328
+ export interface CancelWaitInput {
329
+ waitId: string;
330
+ generation: number;
331
+ /** Epoch the caller observed. A stale epoch means cancellation already happened. */
332
+ expectedCancelEpoch: number;
333
+ owner: OwnerIdentity;
334
+ reason: string;
335
+ }
336
+
337
+ export interface CancelWaitResult {
338
+ wait: WaitRecord;
339
+ /** Resume claims invalidated by this cancellation. */
340
+ invalidatedClaimIds: string[];
341
+ /** Outbox deliveries voided by this cancellation. */
342
+ voidedOutboxIds: string[];
343
+ }
344
+
345
+ export interface WaitRef {
346
+ waitId: string;
347
+ /** Omit for the latest generation. Mutations always require it. */
348
+ generation?: number;
349
+ }
350
+
351
+ export interface WaitFilter {
352
+ owner?: OwnerIdentity;
353
+ phase?: WaitPhase | readonly WaitPhase[];
354
+ /** Only generations that can still accept a result (`consumed`/`cancelled` excluded). */
355
+ pendingOnly?: boolean;
356
+ }
357
+
358
+ // ---- resume claims ------------------------------------------------------
359
+
360
+ /**
361
+ * Lease identity for the process that may publish an attempt. Validation uses
362
+ * process identity, not elapsed time alone.
363
+ */
364
+ export interface ResumeLeaseIdentity {
365
+ /** Stable id of the supervising host process. */
366
+ ownerId: string;
367
+ pid?: number | null;
368
+ processStartToken?: string | null;
369
+ }
370
+
371
+ export type ResumeClaimState = "claimed" | "published" | "released" | "invalidated";
372
+
373
+ export interface ResumeClaimRecord {
374
+ claimId: string;
375
+ /** Unique execution token the runner claims; a second claim gets a new token. */
376
+ claimToken: string;
377
+ waitId: string;
378
+ generation: number;
379
+ cancelEpoch: number;
380
+ state: ResumeClaimState;
381
+ /** Attempt id chosen before spawn. Null until published. */
382
+ attemptId: string | null;
383
+ /** Launch token the child publishes before admitting model execution. */
384
+ launchToken: string | null;
385
+ lease: ResumeLeaseIdentity;
386
+ /** Native checkpoint the continuation will reopen. */
387
+ reservedCheckpointId: string;
388
+ claimedAt: number;
389
+ publishedAt: number | null;
390
+ releasedAt: number | null;
391
+ invalidatedAt: number | null;
392
+ reason: string | null;
393
+ }
394
+
395
+ export interface ClaimResumeInput {
396
+ waitId: string;
397
+ generation: number;
398
+ /** Epoch observed immediately before claiming. */
399
+ expectedCancelEpoch: number;
400
+ lease: ResumeLeaseIdentity;
401
+ reservedCheckpointId: string;
402
+ }
403
+
404
+ export interface ResumeClaimResult {
405
+ claim: ResumeClaimRecord;
406
+ wait: WaitRecord;
407
+ }
408
+
409
+ export interface PublishResumeAttemptInput {
410
+ waitId: string;
411
+ generation: number;
412
+ claimId: string;
413
+ claimToken: string;
414
+ /** Attempt id persisted before spawn. */
415
+ attemptId: string;
416
+ /** Execution token the child publishes before admitting model execution. */
417
+ launchToken: string;
418
+ }
419
+
420
+ export interface PublishResumeAttemptResult {
421
+ claim: ResumeClaimRecord;
422
+ wait: WaitRecord;
423
+ /** False for an idempotent replay of the same attempt and token. */
424
+ published: boolean;
425
+ }
426
+
427
+ export interface ReleaseResumeClaimInput {
428
+ waitId: string;
429
+ generation: number;
430
+ claimId: string;
431
+ claimToken: string;
432
+ /** `ready` when admission failed before spawn; `held` when it is uncertain. */
433
+ outcome: "ready" | "held";
434
+ reason: string;
435
+ }
436
+
437
+ export interface ReleaseResumeClaimResult {
438
+ claim: ResumeClaimRecord;
439
+ wait: WaitRecord;
440
+ }
441
+
442
+ /**
443
+ * Proof that the published resume attempt can never interpret the generation:
444
+ * its writer process is gone and its conversation writer lease is free. A live
445
+ * writer or an unverifiable identity must never be passed here.
446
+ */
447
+ export interface ResumeAttemptExitProof {
448
+ writerPidGone: boolean;
449
+ writerLeaseReleased: boolean;
450
+ }
451
+
452
+ /**
453
+ * Move a published resume generation to `held` after the attempt exited without
454
+ * interpreting it. This is not a cancellation: the cancellation epoch is kept, the
455
+ * evidence pins stay, and the generation remains visible to its owner. The claim
456
+ * is invalidated (it can never publish again), which is what makes a second
457
+ * automatic attempt impossible.
458
+ */
459
+ export interface HoldFailedResumeInput {
460
+ waitId: string;
461
+ generation: number;
462
+ claimId: string;
463
+ claimToken: string;
464
+ attemptId: string;
465
+ launchToken: string;
466
+ proof: ResumeAttemptExitProof;
467
+ /** Why the attempt never interpreted the generation; retained on both records. */
468
+ reason: string;
469
+ }
470
+
471
+ export interface HoldFailedResumeResult {
472
+ wait: WaitRecord;
473
+ claim: ResumeClaimRecord;
474
+ /** False for an idempotent replay of the same held generation. */
475
+ applied: boolean;
476
+ }
477
+
478
+ export interface ResumeClaimFilter {
479
+ waitId?: string;
480
+ generation?: number;
481
+ state?: ResumeClaimState | readonly ResumeClaimState[];
482
+ }
483
+
484
+ // ---- evidence reads and pins -------------------------------------------
485
+
486
+ export interface RecordEvidenceReadInput {
487
+ waitId: string;
488
+ generation: number;
489
+ /** Must be the wait owner: interpretation belongs to the owner. */
490
+ owner: OwnerIdentity;
491
+ operationId: string;
492
+ /** Exact terminal revision that was read. */
493
+ terminalRevision: number;
494
+ }
495
+
496
+ export interface EvidenceReadRecord {
497
+ waitId: string;
498
+ generation: number;
499
+ operationId: string;
500
+ terminalRevision: number;
501
+ reader: OwnerIdentity;
502
+ readAt: number;
503
+ }
504
+
505
+ export interface RecordEvidenceReadResult {
506
+ read: EvidenceReadRecord;
507
+ /** False for a repeated read of the same revision (idempotent). */
508
+ recorded: boolean;
509
+ }
510
+
511
+ export interface RecordEvidencePinInput {
512
+ waitId: string;
513
+ generation: number;
514
+ operationId: string;
515
+ terminalRevision: number;
516
+ kind: EvidenceKind;
517
+ ref: string;
518
+ summary?: string;
519
+ detailLost?: boolean;
520
+ bytes?: number;
521
+ }
522
+
523
+ export interface EvidencePinRecord {
524
+ pinId: string;
525
+ waitId: string;
526
+ generation: number;
527
+ operationId: string;
528
+ terminalRevision: number;
529
+ kind: EvidenceKind;
530
+ ref: string;
531
+ summary: string | null;
532
+ detailLost: boolean;
533
+ bytes: number | null;
534
+ pinnedAt: number;
535
+ releasedAt: number | null;
536
+ releaseReason: string | null;
537
+ }
538
+
539
+ export interface RecordEvidencePinResult {
540
+ pin: EvidencePinRecord;
541
+ /** False when the same reference was already pinned for this generation. */
542
+ recorded: boolean;
543
+ }
544
+
545
+ // ---- interpretation acknowledgement ------------------------------------
546
+
547
+ /** Dispositions accepted by `acknowledgeResult`. None of them completes a goal. */
548
+ export type AcknowledgeDisposition = "continue" | "blocked" | "assignment-complete";
549
+
550
+ export interface AcknowledgeResultInput {
551
+ waitId: string;
552
+ generation: number;
553
+ owner: OwnerIdentity;
554
+ disposition: AcknowledgeDisposition;
555
+ /** Interpretation note persisted against the exact evidence revisions. */
556
+ note: string;
557
+ /** Exact terminal revisions claimed. A mismatch is refused. */
558
+ terminalRevisions: Array<{ operationId: string; revision: number }>;
559
+ }
560
+
561
+ export interface AcknowledgeResultOutput {
562
+ wait: WaitRecord;
563
+ /** Result deliveries marked consumed by this acknowledgement. */
564
+ acknowledgedOutboxIds: string[];
565
+ /** Evidence pins released after consumption. */
566
+ releasedPinIds: string[];
567
+ }
568
+
569
+ // ---- outbox -------------------------------------------------------------
570
+
571
+ export type OutboxState = "pending" | "claimed" | "delivered" | "acknowledged" | "voided";
572
+
573
+ export interface OutboxDispatchClaim {
574
+ token: string;
575
+ claimedBy: string;
576
+ claimedAt: number;
577
+ }
578
+
579
+ export interface OutboxEventRecord {
580
+ eventId: string;
581
+ operationId: string;
582
+ /** Terminal revision this event delivers. Unique per wait generation. */
583
+ terminalRevision: number;
584
+ waitId: string;
585
+ generation: number;
586
+ recipient: OwnerIdentity;
587
+ /** Evidence pinned for this event, so a reclaimed log cannot erase the result. */
588
+ evidence: EvidencePinRecord[];
589
+ state: OutboxState;
590
+ /** Delivery attempts so far, retained across releases. */
591
+ attempts: number;
592
+ dispatchClaim: OutboxDispatchClaim | null;
593
+ createdAt: number;
594
+ claimedAt: number | null;
595
+ deliveredAt: number | null;
596
+ acknowledgedAt: number | null;
597
+ voidedAt: number | null;
598
+ /** Recovery reason from a failed dispatch or a void. */
599
+ reason: string | null;
600
+ }
601
+
602
+ export interface OutboxFilter {
603
+ recipient?: OwnerIdentity;
604
+ state?: OutboxState | readonly OutboxState[];
605
+ waitId?: string;
606
+ generation?: number;
607
+ operationId?: string;
608
+ }
609
+
610
+ export interface ClaimOutboxInput {
611
+ /** Restrict to one wait generation. Omit to claim across a recipient. */
612
+ waitId?: string;
613
+ generation?: number;
614
+ /** Restrict to deliveries addressed to this owner identity. */
615
+ recipient?: OwnerIdentity;
616
+ /** Unique token for this dispatch attempt. */
617
+ claimToken: string;
618
+ /** Who is dispatching (host/extension identity). */
619
+ claimedBy: string;
620
+ /** Maximum number of events to claim (default 10). */
621
+ limit?: number;
622
+ }
623
+
624
+ export interface OutboxDispatchInput {
625
+ eventId: string;
626
+ claimToken: string;
627
+ }
628
+
629
+ export interface ReleaseOutboxInput {
630
+ eventId: string;
631
+ claimToken: string;
632
+ /** Why the delivery was released; retained without consuming the result. */
633
+ reason: string;
634
+ }
635
+
636
+ // ---- store options ------------------------------------------------------
637
+
638
+ export interface StoreOptions {
639
+ /**
640
+ * SQLite file path. Tests pass a temporary path; production passes the Pi
641
+ * agent directory. `:memory:` is accepted for throwaway stores only.
642
+ */
643
+ path: string;
644
+ /** How long SQLite waits for a competing writer. Default 5000 ms. */
645
+ busyTimeoutMs?: number;
646
+ /** Clock seam for deterministic tests. Defaults to `Date.now`. */
647
+ now?: () => number;
648
+ }