@indigoai-us/hq-cli 5.345.92 → 5.345.93

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/command-catalog.generated.d.ts +252 -0
  3. package/dist/command-catalog.generated.js +306 -0
  4. package/dist/command-registration-plan.d.ts +6 -0
  5. package/dist/command-registration-plan.js +1 -0
  6. package/dist/commands/capacity.d.ts +71 -0
  7. package/dist/commands/capacity.js +666 -0
  8. package/dist/commands/integrations-connect.js +64 -5
  9. package/dist/commands/lanes-accounts.d.ts +1 -0
  10. package/dist/commands/lanes-accounts.js +6 -0
  11. package/dist/lib/capacity/accounts.d.ts +36 -0
  12. package/dist/lib/capacity/accounts.js +90 -0
  13. package/dist/lib/capacity/collect.d.ts +33 -0
  14. package/dist/lib/capacity/collect.js +164 -0
  15. package/dist/lib/capacity/collectors/claude-oauth.d.ts +145 -0
  16. package/dist/lib/capacity/collectors/claude-oauth.js +1211 -0
  17. package/dist/lib/capacity/collectors/claude-statusline.d.ts +72 -0
  18. package/dist/lib/capacity/collectors/claude-statusline.js +436 -0
  19. package/dist/lib/capacity/collectors/codex.d.ts +120 -0
  20. package/dist/lib/capacity/collectors/codex.js +1134 -0
  21. package/dist/lib/capacity/collectors/grok.d.ts +86 -0
  22. package/dist/lib/capacity/collectors/grok.js +588 -0
  23. package/dist/lib/capacity/lane-login.d.ts +29 -0
  24. package/dist/lib/capacity/lane-login.js +91 -0
  25. package/dist/lib/capacity/ledger.d.ts +399 -0
  26. package/dist/lib/capacity/ledger.js +1441 -0
  27. package/dist/lib/capacity/project.d.ts +12 -0
  28. package/dist/lib/capacity/project.js +264 -0
  29. package/dist/lib/capacity/read.d.ts +62 -0
  30. package/dist/lib/capacity/read.js +264 -0
  31. package/dist/lib/capacity/refusal.d.ts +30 -0
  32. package/dist/lib/capacity/refusal.js +183 -0
  33. package/dist/lib/capacity/scheduler.d.ts +76 -0
  34. package/dist/lib/capacity/scheduler.js +800 -0
  35. package/dist/lib/capacity/sign-in.d.ts +103 -0
  36. package/dist/lib/capacity/sign-in.js +517 -0
  37. package/dist/lib/capacity/widget.d.ts +22 -0
  38. package/dist/lib/capacity/widget.js +418 -0
  39. package/dist/lib/lanes/spawn.js +12 -0
  40. package/dist/lib/mesh/live/daemon/run.d.ts +5 -0
  41. package/dist/lib/mesh/live/daemon/run.js +29 -1
  42. package/package.json +1 -1
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Vendor sign-in for `hq capacity login`.
3
+ *
4
+ * Home creation, the vendor command, and the registry write are
5
+ * `runAccountsLogin` from the lanes account command. This file only
6
+ * builds the context that command already expects.
7
+ */
8
+ import type { Ctx } from "../../commands/lanes-shared.js";
9
+ export interface LaneLoginInput {
10
+ provider: string;
11
+ accountId: string;
12
+ hqRoot?: string;
13
+ hostname?: string;
14
+ homedir?: () => string;
15
+ env?: NodeJS.ProcessEnv;
16
+ spawnLogin?: Ctx["spawnLogin"];
17
+ /**
18
+ * Runs `claude auth status` after login. On macOS Claude Code keeps the
19
+ * credential in the Keychain, so there is no credentials file and the lane
20
+ * login confirms sign-in through this probe. Defaults to the lanes probe.
21
+ */
22
+ probeProvider?: Ctx["probeProvider"];
23
+ }
24
+ export interface LaneLoginResult {
25
+ id: string;
26
+ home: string;
27
+ }
28
+ export declare function loginLaneAccount(input: LaneLoginInput): Promise<LaneLoginResult>;
29
+ //# sourceMappingURL=lane-login.d.ts.map
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Vendor sign-in for `hq capacity login`.
3
+ *
4
+ * Home creation, the vendor command, and the registry write are
5
+ * `runAccountsLogin` from the lanes account command. This file only
6
+ * builds the context that command already expects.
7
+ */
8
+ import { spawn } from "node:child_process";
9
+ import * as fs from "node:fs";
10
+ import * as os from "node:os";
11
+ import * as path from "node:path";
12
+ import { createLaneAccountsHandlers } from "../../commands/lanes-accounts.js";
13
+ import { resolveLanesHqRoot } from "../lanes/hq-root.js";
14
+ import { defaultProbe } from "../lanes/models.js";
15
+ const ACCOUNT_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
16
+ const RESERVED_ACCOUNT_IDS = new Set(["a", "default"]);
17
+ export async function loginLaneAccount(input) {
18
+ if (!ACCOUNT_ID_PATTERN.test(input.accountId) || RESERVED_ACCOUNT_IDS.has(input.accountId)) {
19
+ throw new Error(`Refusing account id ${input.accountId}. Use letters, numbers, dots, underscores, or hyphens, and not a reserved id.`);
20
+ }
21
+ const hqRoot = input.hqRoot ?? resolveLanesHqRoot({ env: input.env });
22
+ let captured;
23
+ const handlers = createLaneAccountsHandlers(handlerDeps((value) => {
24
+ captured = value;
25
+ }));
26
+ // One registry write. capacityOnly stores enabled:false and the capacity-only
27
+ // reason in that write, re-checking whether lanes already use the account.
28
+ await handlers.runAccountsLogin(loginCtx(input, hqRoot), input.provider, input.accountId, {
29
+ capacityOnly: true,
30
+ });
31
+ const account = captured?.account;
32
+ if (!account?.id || !account.home) {
33
+ throw new Error(`lanes accounts login did not register ${input.provider} ${input.accountId}`);
34
+ }
35
+ return { id: account.id, home: account.home };
36
+ }
37
+ function handlerDeps(printJson) {
38
+ return {
39
+ automaticBalanceMoveHistoryReason: () => unused("automaticBalanceMoveHistoryReason"),
40
+ ensureDir: (dir) => {
41
+ fs.mkdirSync(dir, { recursive: true });
42
+ },
43
+ laneWithRecoveredProviderSession: () => unused("laneWithRecoveredProviderSession"),
44
+ loadClaudeBalanceHostSnapshots: () => unused("loadClaudeBalanceHostSnapshots"),
45
+ parseRemoteJson: () => unused("parseRemoteJson"),
46
+ prepareAccountMove: () => unused("prepareAccountMove"),
47
+ printJson,
48
+ readClaudeAccountBalanceSignalsEnabled: () => unused("readClaudeAccountBalanceSignalsEnabled"),
49
+ reconcileHostFromCtx: () => unused("reconcileHostFromCtx"),
50
+ resolveCallerPath: (callerCwd, filePath) => path.resolve(callerCwd, filePath),
51
+ };
52
+ }
53
+ function loginCtx(input, hqRoot) {
54
+ const fields = {
55
+ hqRoot: () => hqRoot,
56
+ callerCwd: () => hqRoot,
57
+ cwd: () => hqRoot,
58
+ env: input.env ?? process.env,
59
+ hostname: () => input.hostname ?? os.hostname(),
60
+ homedir: input.homedir ?? os.homedir,
61
+ existsSync: (target) => fs.existsSync(target),
62
+ spawnLogin: input.spawnLogin ?? defaultSpawnLogin,
63
+ probeProvider: input.probeProvider ?? defaultProbe,
64
+ };
65
+ return new Proxy(fields, {
66
+ get(target, prop) {
67
+ if (prop in target)
68
+ return target[prop];
69
+ return () => {
70
+ throw new Error(`capacity login does not use lanes ctx.${String(prop)}`);
71
+ };
72
+ },
73
+ });
74
+ }
75
+ function defaultSpawnLogin(opts) {
76
+ return new Promise((resolve, reject) => {
77
+ const child = spawn(opts.command, opts.args, {
78
+ env: opts.env,
79
+ cwd: opts.cwd,
80
+ stdio: "inherit",
81
+ });
82
+ child.on("error", reject);
83
+ child.on("close", (code) => {
84
+ resolve({ status: code ?? 1 });
85
+ });
86
+ });
87
+ }
88
+ function unused(name) {
89
+ throw new Error(`capacity login does not use ${name}`);
90
+ }
91
+ //# sourceMappingURL=lane-login.js.map
@@ -0,0 +1,399 @@
1
+ /**
2
+ * Personal capacity ledger under ~/.hq/capacity/.
3
+ *
4
+ * Daily files events-YYYY-MM-DD.jsonl are the append-only event log (one
5
+ * O_APPEND write under 4 KB). rebuildNow() replays those files, plus a
6
+ * legacy events.jsonl if a fixture dropped one, into now.json. The now.json
7
+ * rewrite holds a TTL lock reclaimed after 30 seconds.
8
+ *
9
+ * Root is HQ_CAPACITY_ROOT, or an explicit option, so tests never touch the
10
+ * real home directory. No network, child process, or provider call.
11
+ */
12
+ export declare const CAPACITY_DIRNAME = "capacity";
13
+ export declare const CAPACITY_LOCK_TTL_MS = 30000;
14
+ export declare const CAPACITY_LOCK_NAME = "now.lock";
15
+ export declare const NOW_FILE_NAME = "now.json";
16
+ export declare const COLLECTOR_FILE_NAME = "collector.json";
17
+ export declare const LEGACY_EVENTS_NAME = "events.jsonl";
18
+ export declare const MAX_APPEND_BYTES = 4096;
19
+ export declare const EVENT_RETENTION_DAYS = 14;
20
+ export declare const BURN_WINDOW_MS: number;
21
+ export declare const DIR_MODE = 448;
22
+ export declare const FILE_MODE = 384;
23
+ /** US-001 redaction shapes: Claude OAuth, and Codex / Grok bearer JWTs. */
24
+ export declare const PROVIDER_TOKEN_LEAK: RegExp;
25
+ export declare const READING_SOURCES: readonly ["statusline", "oauth-usage", "codex-jsonl", "codex-app-server", "grok-billing", "refusal"];
26
+ export type ReadingSource = (typeof READING_SOURCES)[number];
27
+ export declare const LIMIT_KINDS: readonly ["session", "weekly_all", "weekly_scoped", "credits", "prepaid", "on_demand", "unknown"];
28
+ export type LimitKind = (typeof LIMIT_KINDS)[number];
29
+ export declare const CONFIDENCE_VALUES: readonly ["observed", "fetched", "inferred", "unknown"];
30
+ export type ReadingConfidence = (typeof CONFIDENCE_VALUES)[number];
31
+ export declare const CAPACITY_STATES: readonly ["ok", "warn", "exhausted", "unknown", "reset-pending"];
32
+ export type CapacityState = (typeof CAPACITY_STATES)[number];
33
+ export declare class LedgerMissing extends Error {
34
+ readonly code: "LEDGER_MISSING";
35
+ constructor();
36
+ }
37
+ export declare class LedgerCorrupt extends Error {
38
+ readonly code: "LEDGER_CORRUPT";
39
+ constructor();
40
+ }
41
+ export declare class LedgerBusy extends Error {
42
+ readonly code: "LEDGER_BUSY";
43
+ constructor();
44
+ }
45
+ export declare class LedgerRejected extends Error {
46
+ readonly code: "LEDGER_REJECTED";
47
+ constructor(message: string);
48
+ }
49
+ export interface ReadingLimit {
50
+ limitId: string;
51
+ kind: LimitKind;
52
+ scope: string | null;
53
+ usedPercent: number | null;
54
+ windowMinutes: number | null;
55
+ resetsAt: string | null;
56
+ balance: string | number | null;
57
+ planType: string | null;
58
+ /** Present on credits readings. Omitted for window readings. */
59
+ hasCredits?: boolean | null;
60
+ /** Present on credits readings. Omitted for window readings. */
61
+ unlimited?: boolean | null;
62
+ /** Claude weekly_scoped_shares allowance. Omitted for other readings. */
63
+ allowancePercentOfWeekly?: number | null;
64
+ }
65
+ export interface ReadingLimitInput extends Omit<ReadingLimit, "resetsAt"> {
66
+ resetsAt: string | number | null;
67
+ }
68
+ export interface Reading {
69
+ readingId: string;
70
+ observedAt: string;
71
+ provider: string;
72
+ accountId: string;
73
+ source: ReadingSource;
74
+ cliVersion: string;
75
+ limit: ReadingLimit;
76
+ confidence: ReadingConfidence;
77
+ parserVersion: string;
78
+ error?: string;
79
+ /** Codex snapshot flag. Omitted when the source did not report it. */
80
+ rateLimitReachedType?: string | null;
81
+ /** Codex snapshot flag. Omitted when the source did not report it. */
82
+ spendControlReached?: boolean | null;
83
+ /** Lane account id, or `default` for the implicit provider home. */
84
+ accountLabel?: string;
85
+ /** Every label that resolved to this reading's account. */
86
+ accountLabels?: string[];
87
+ /** Organization or plan name. Emails are dropped and never stored. */
88
+ organization?: string | null;
89
+ /** Provider home this reading was collected from. */
90
+ accountHome?: string;
91
+ }
92
+ export interface ReadingInput extends Omit<Reading, "limit"> {
93
+ limit: ReadingLimitInput;
94
+ }
95
+ export interface ParserFailureEvent {
96
+ event: "parser_failure";
97
+ observedAt: string;
98
+ provider: string;
99
+ source: ReadingSource;
100
+ error: string;
101
+ accountId?: string;
102
+ cliVersion?: string;
103
+ parserVersion?: string;
104
+ limitId?: string;
105
+ accountLabel?: string;
106
+ accountLabels?: string[];
107
+ organization?: string | null;
108
+ accountHome?: string;
109
+ }
110
+ export interface RateLimitResetCredit {
111
+ id: string;
112
+ resetType: string | null;
113
+ status: string | null;
114
+ grantedAt: number | null;
115
+ expiresAt: number | null;
116
+ title: string | null;
117
+ description: string | null;
118
+ }
119
+ export interface RateLimitResetCredits {
120
+ availableCount: number | null;
121
+ credits: RateLimitResetCredit[];
122
+ }
123
+ /** Codex fields that belong on the provider entry, not on one limit row. */
124
+ export interface ProviderMetaEvent {
125
+ event: "provider_meta";
126
+ observedAt: string;
127
+ provider: string;
128
+ source: ReadingSource;
129
+ ordinaryUsageAllowed: boolean | null;
130
+ rateLimitResetCredits: RateLimitResetCredits | null;
131
+ accountId?: string;
132
+ cliVersion?: string;
133
+ parserVersion?: string;
134
+ }
135
+ export type LedgerEvent = Reading | ParserFailureEvent | ProviderMetaEvent;
136
+ export interface NowLimit {
137
+ limitId: string;
138
+ accountId: string;
139
+ kind: LimitKind;
140
+ scope: string | null;
141
+ usedPercent: number | null;
142
+ windowMinutes: number | null;
143
+ resetsAt: string | null;
144
+ secondsToReset: number | null;
145
+ burnRatePercentPerHour: number | null;
146
+ balance: string | number | null;
147
+ planType: string | null;
148
+ state: CapacityState;
149
+ source: ReadingSource;
150
+ confidence: ReadingConfidence;
151
+ observedAt: string;
152
+ readingId: string;
153
+ cliVersion: string;
154
+ parserVersion: string;
155
+ lastError: string | null;
156
+ hasCredits?: boolean | null;
157
+ unlimited?: boolean | null;
158
+ /** Claude weekly_scoped_shares allowance. Omitted for other limits. */
159
+ allowancePercentOfWeekly?: number | null;
160
+ rateLimitReachedType?: string | null;
161
+ spendControlReached?: boolean | null;
162
+ }
163
+ export type AccountAuthState = "ok" | "expired" | "signed_out" | "unknown";
164
+ export interface NowAccount {
165
+ accountId: string;
166
+ labels: string[];
167
+ organization: string | null;
168
+ homes: string[];
169
+ state: CapacityState;
170
+ /** False when the credential exists but the access token is past expiry. */
171
+ signedOut: boolean;
172
+ authState: AccountAuthState;
173
+ /** Latest reading or failure time. Null on views written before US-012. */
174
+ observedAt?: string | null;
175
+ reason: string | null;
176
+ fixCommand: string | null;
177
+ limits: NowLimit[];
178
+ }
179
+ export interface NowProvider {
180
+ provider: string;
181
+ state: CapacityState;
182
+ lastError: string | null;
183
+ limits: NowLimit[];
184
+ /** Set only after a Codex app-server read stored provider meta. */
185
+ ordinaryUsageAllowed?: boolean | null;
186
+ rateLimitResetCredits?: RateLimitResetCredits | null;
187
+ /** Present when a reading or signed-out failure named an account. */
188
+ accounts?: NowAccount[];
189
+ }
190
+ export interface NowView {
191
+ machineId: string;
192
+ hqCliVersion: string;
193
+ generatedAt: string;
194
+ providers: NowProvider[];
195
+ }
196
+ /** On/off mark for the resident collector. The directory alone is not the mark. */
197
+ export interface CollectorMark {
198
+ enabled: boolean;
199
+ updatedAt: string;
200
+ }
201
+ export declare const readingJsonSchema: {
202
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
203
+ readonly $id: "hq-capacity-reading.v1";
204
+ readonly type: "object";
205
+ readonly additionalProperties: false;
206
+ readonly required: readonly ["readingId", "observedAt", "provider", "accountId", "source", "cliVersion", "limit", "confidence", "parserVersion"];
207
+ readonly properties: {
208
+ readonly readingId: {
209
+ readonly type: "string";
210
+ readonly minLength: 1;
211
+ };
212
+ readonly observedAt: {
213
+ readonly type: "string";
214
+ readonly pattern: string;
215
+ };
216
+ readonly provider: {
217
+ readonly type: "string";
218
+ readonly minLength: 1;
219
+ };
220
+ readonly accountId: {
221
+ readonly type: "string";
222
+ readonly minLength: 1;
223
+ };
224
+ readonly source: {
225
+ readonly type: "string";
226
+ readonly enum: readonly ["statusline", "oauth-usage", "codex-jsonl", "codex-app-server", "grok-billing", "refusal"];
227
+ };
228
+ readonly cliVersion: {
229
+ readonly type: "string";
230
+ readonly minLength: 1;
231
+ };
232
+ readonly limit: {
233
+ readonly type: "object";
234
+ readonly additionalProperties: false;
235
+ readonly required: readonly ["limitId", "kind", "scope", "usedPercent", "windowMinutes", "resetsAt", "balance", "planType"];
236
+ readonly properties: {
237
+ readonly limitId: {
238
+ readonly type: "string";
239
+ readonly minLength: 1;
240
+ };
241
+ readonly kind: {
242
+ readonly type: "string";
243
+ readonly enum: readonly ["session", "weekly_all", "weekly_scoped", "credits", "prepaid", "on_demand", "unknown"];
244
+ };
245
+ readonly scope: {
246
+ readonly type: readonly ["string", "null"];
247
+ };
248
+ readonly usedPercent: {
249
+ readonly type: readonly ["number", "null"];
250
+ };
251
+ readonly windowMinutes: {
252
+ readonly type: readonly ["number", "null"];
253
+ };
254
+ readonly resetsAt: {
255
+ readonly type: readonly ["string", "null"];
256
+ };
257
+ readonly balance: {
258
+ readonly type: readonly ["string", "number", "null"];
259
+ };
260
+ readonly planType: {
261
+ readonly type: readonly ["string", "null"];
262
+ };
263
+ readonly hasCredits: {
264
+ readonly type: readonly ["boolean", "null"];
265
+ };
266
+ readonly unlimited: {
267
+ readonly type: readonly ["boolean", "null"];
268
+ };
269
+ readonly allowancePercentOfWeekly: {
270
+ readonly type: readonly ["number", "null"];
271
+ };
272
+ };
273
+ };
274
+ readonly confidence: {
275
+ readonly type: "string";
276
+ readonly enum: readonly ["observed", "fetched", "inferred", "unknown"];
277
+ };
278
+ readonly parserVersion: {
279
+ readonly type: "string";
280
+ readonly minLength: 1;
281
+ };
282
+ readonly error: {
283
+ readonly type: "string";
284
+ };
285
+ readonly rateLimitReachedType: {
286
+ readonly type: readonly ["string", "null"];
287
+ };
288
+ readonly spendControlReached: {
289
+ readonly type: readonly ["boolean", "null"];
290
+ };
291
+ readonly accountLabel: {
292
+ readonly type: "string";
293
+ readonly minLength: 1;
294
+ };
295
+ readonly accountLabels: {
296
+ readonly type: "array";
297
+ readonly items: {
298
+ readonly type: "string";
299
+ readonly minLength: 1;
300
+ };
301
+ };
302
+ readonly organization: {
303
+ readonly type: readonly ["string", "null"];
304
+ };
305
+ readonly accountHome: {
306
+ readonly type: "string";
307
+ };
308
+ };
309
+ };
310
+ export declare const nowViewJsonSchema: {
311
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
312
+ readonly $id: "hq-capacity-now-view.v1";
313
+ readonly type: "object";
314
+ readonly additionalProperties: false;
315
+ readonly required: readonly ["machineId", "hqCliVersion", "generatedAt", "providers"];
316
+ readonly properties: {
317
+ readonly machineId: {
318
+ readonly type: "string";
319
+ readonly minLength: 1;
320
+ };
321
+ readonly hqCliVersion: {
322
+ readonly type: "string";
323
+ readonly minLength: 1;
324
+ };
325
+ readonly generatedAt: {
326
+ readonly type: "string";
327
+ };
328
+ readonly providers: {
329
+ readonly type: "array";
330
+ readonly items: {
331
+ readonly type: "object";
332
+ readonly additionalProperties: false;
333
+ readonly required: readonly ["provider", "state", "lastError", "limits"];
334
+ readonly properties: {
335
+ readonly provider: {
336
+ readonly type: "string";
337
+ };
338
+ readonly state: {
339
+ readonly type: "string";
340
+ readonly enum: readonly ["ok", "warn", "exhausted", "unknown", "reset-pending"];
341
+ };
342
+ readonly lastError: {
343
+ readonly type: readonly ["string", "null"];
344
+ };
345
+ readonly limits: {
346
+ readonly type: "array";
347
+ };
348
+ readonly ordinaryUsageAllowed: {
349
+ readonly type: readonly ["boolean", "null"];
350
+ };
351
+ readonly rateLimitResetCredits: {
352
+ readonly type: readonly ["object", "null"];
353
+ };
354
+ readonly accounts: {
355
+ readonly type: "array";
356
+ };
357
+ };
358
+ };
359
+ };
360
+ };
361
+ };
362
+ export interface LedgerOptions {
363
+ root?: string;
364
+ home?: string;
365
+ env?: NodeJS.ProcessEnv;
366
+ now?: () => Date;
367
+ machineId?: string;
368
+ hqCliVersion?: string;
369
+ pid?: number;
370
+ lockTtlMs?: number;
371
+ }
372
+ export declare function capacityRoot(env?: NodeJS.ProcessEnv, home?: string): string;
373
+ /** Shown for a credential that exists and is past expiry. Never a login. */
374
+ export declare const EXPIRED_REASON = "expired: refreshes the next time Claude Code is used with this account";
375
+ export declare function isExpiredReason(reason: string | null | undefined): boolean;
376
+ export declare function isAccountFailureReason(reason: string): boolean;
377
+ /** Exact command for an account that has no usable credential. */
378
+ export declare function capacityLoginCommand(provider: string, label: string): string;
379
+ /** Open the vendor CLI so it can refresh its own token. Does not refresh anything. */
380
+ export declare function claudeOpenCommand(home: string | null, userHome?: string): string;
381
+ export declare function redactProviderTokens(text: string): string;
382
+ export declare function ledgerSentryPayload(error: unknown): {
383
+ name: string;
384
+ message: string;
385
+ };
386
+ export declare function appendReading(input: ReadingInput, options?: LedgerOptions): NowView;
387
+ /**
388
+ * Write every reading, parser failure, and optional provider meta, then
389
+ * rebuild now.json once. appendReading stays the single-reading path.
390
+ */
391
+ export declare function appendReadings(readings: readonly ReadingInput[], failures?: readonly ParserFailureEvent[], meta?: ProviderMetaEvent | null, options?: LedgerOptions): NowView;
392
+ export declare function appendParserFailure(input: ParserFailureEvent, options?: LedgerOptions): NowView;
393
+ export declare function appendProviderMeta(input: ProviderMetaEvent, options?: LedgerOptions): NowView;
394
+ export declare function readNow(options?: LedgerOptions): NowView;
395
+ export declare function readLedgerEvents(options?: LedgerOptions): LedgerEvent[];
396
+ export declare function readCollectorMark(options?: LedgerOptions): CollectorMark | null;
397
+ export declare function setCollectorEnabled(enabled: boolean, options?: LedgerOptions): CollectorMark;
398
+ export declare function rebuildNow(options?: LedgerOptions): NowView;
399
+ //# sourceMappingURL=ledger.d.ts.map