opencode-usage-insights 0.1.3 → 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/CONTRIBUTING.md +97 -0
- package/README.md +330 -200
- package/dist/core.d.ts +10 -0
- package/dist/gui-experimental.cjs +8 -0
- package/dist/index.d.ts +29 -4
- package/dist/index.js +3003 -50
- package/dist/index.js.map +17 -8
- package/dist/limits.d.ts +15 -0
- package/dist/panel-build.d.ts +0 -4
- package/dist/panel-data.d.ts +37 -6
- package/dist/panel.d.ts +10 -22
- package/dist/quota-client.d.ts +13 -0
- package/dist/quota.d.ts +114 -0
- package/dist/rpc-client.d.ts +24 -0
- package/dist/rpc.d.ts +1022 -0
- package/dist/rpc.js +294 -0
- package/dist/rpc.js.map +11 -0
- package/dist/service.d.ts +36 -0
- package/dist/sidebar.d.ts +7 -7
- package/dist/stats/db.d.ts +2 -2
- package/dist/stats/maintenance.d.ts +10 -0
- package/dist/stats/queries.d.ts +6 -0
- package/dist/stats-client.d.ts +65 -0
- package/dist/stats-worker.d.ts +1 -0
- package/dist/stats-worker.js +3697 -0
- package/dist/stats-worker.js.map +23 -0
- package/dist/tui.d.ts +22 -10
- package/dist/tui.js +1067 -1604
- package/dist/tui.js.map +14 -14
- package/docs/demo.md +212 -0
- package/docs/images/line.png +0 -0
- package/docs/images/panel-cache.png +0 -0
- package/docs/images/panel-overview.png +0 -0
- package/docs/images/panel-providers.png +0 -0
- package/docs/images/sidebar.png +0 -0
- package/docs/internals.md +455 -0
- package/package.json +43 -18
package/dist/limits.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared request bounds.
|
|
3
|
+
*
|
|
4
|
+
* The RPC schemas, the clients and the service use the same numbers: a client
|
|
5
|
+
* must clamp before it calls the RPC, because schema validation runs before the
|
|
6
|
+
* service can clamp. These constants keep the three layers from drifting.
|
|
7
|
+
*/
|
|
8
|
+
/** Widest panel the server formats. */
|
|
9
|
+
export declare const MAX_PANEL_WIDTH = 200;
|
|
10
|
+
/** Most turns the server returns for a history request. */
|
|
11
|
+
export declare const MAX_TURNS = 50;
|
|
12
|
+
/** A finite width within the panel bounds. */
|
|
13
|
+
export declare function clampPanelWidth(value: number): number;
|
|
14
|
+
/** A finite turn limit within the history bounds. */
|
|
15
|
+
export declare function clampTurnsLimit(value: number): number;
|
package/dist/panel-build.d.ts
CHANGED
|
@@ -35,10 +35,6 @@ export type PanelRequest = {
|
|
|
35
35
|
width: number;
|
|
36
36
|
};
|
|
37
37
|
/** Sorting options per view; the first is the default. */
|
|
38
|
-
export declare const SORT_KEYS: Partial<Record<PanelView, readonly string[]>>;
|
|
39
|
-
export declare function sortKeys(view: PanelView): readonly string[];
|
|
40
|
-
export declare function defaultSort(view: PanelView): string;
|
|
41
|
-
export declare function nextSort(view: PanelView, current: string, step: number): string;
|
|
42
38
|
export declare function detailLabel(row: PanelRow): string;
|
|
43
39
|
/** Build the panel lines for the request. Never throws: a failure is a line. */
|
|
44
40
|
export declare function buildPanel(request: PanelRequest): PanelLine[];
|
package/dist/panel-data.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type LineFields, type LineLabels, type TurnStats, type TurnTotalsView }
|
|
|
2
2
|
import type { CacheDropRow, LatencyReport, ModelUsage, Overview, Range, SessionUsage, TurnUsage, TtlEvidenceRow } from "./stats/queries";
|
|
3
3
|
import type { DbInfo } from "./stats/maintenance";
|
|
4
4
|
import type { CacheStats, CoverageReport, ProviderRow, ProviderSummary, GapReport, LatencyGroupRow, PeriodGranularity, PeriodRow, SwitchRow } from "./stats/aggregates";
|
|
5
|
+
import { QUOTA_VIEW, type QuotaFetch } from "./quota";
|
|
5
6
|
/**
|
|
6
7
|
* View models and formatting for the stats panel. Everything here is pure:
|
|
7
8
|
* the panel component feeds query results in and renders the lines out, which
|
|
@@ -10,7 +11,13 @@ import type { CacheStats, CoverageReport, ProviderRow, ProviderSummary, GapRepor
|
|
|
10
11
|
*/
|
|
11
12
|
export declare const PANEL_NAME = "usage-insights";
|
|
12
13
|
export declare const PANEL_VIEWS: readonly ["overview", "models", "providers", "cache", "periods", "latency", "sessions", "turns", "db"];
|
|
13
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The panel catalogue seen by the TUI and the Desktop. `go` is client-side
|
|
16
|
+
* because the server part cannot reach the host's usage-limits endpoint; the
|
|
17
|
+
* database-backed views stay in `PANEL_VIEWS`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const CLIENT_VIEWS: readonly ["overview", "models", "providers", "cache", "periods", "latency", "sessions", "turns", "db", "go"];
|
|
20
|
+
export type PanelView = (typeof PANEL_VIEWS)[number] | typeof QUOTA_VIEW;
|
|
14
21
|
export declare const RANGE_KEYS: readonly ["session", "today", "7d", "30d", "all"];
|
|
15
22
|
export type RangeKey = (typeof RANGE_KEYS)[number];
|
|
16
23
|
export declare const GRANULARITIES: readonly ["day", "week", "month"];
|
|
@@ -18,7 +25,7 @@ export type Granularity = (typeof GRANULARITIES)[number];
|
|
|
18
25
|
export type PanelTone = "base" | "muted" | "warning" | "accent";
|
|
19
26
|
/** What a selectable line stands for; Enter drills into it. */
|
|
20
27
|
export type PanelRow = {
|
|
21
|
-
kind: "model" | "session" | "period" | "provider" | "turn" | "prune";
|
|
28
|
+
kind: "model" | "session" | "period" | "provider" | "turn" | "prune" | "wipe";
|
|
22
29
|
value: string;
|
|
23
30
|
variant?: string | undefined;
|
|
24
31
|
};
|
|
@@ -26,9 +33,22 @@ export type PanelLine = {
|
|
|
26
33
|
text: string;
|
|
27
34
|
tone?: PanelTone;
|
|
28
35
|
row?: PanelRow | undefined;
|
|
36
|
+
/** TUI-only key hint; the desktop GUI filters these lines out. */
|
|
37
|
+
hint?: boolean | undefined;
|
|
29
38
|
};
|
|
39
|
+
/** Sorting options per view; the first is the default. */
|
|
40
|
+
export declare const SORT_KEYS: Partial<Record<PanelView, readonly string[]>>;
|
|
41
|
+
export declare function sortKeys(view: PanelView): readonly string[];
|
|
42
|
+
export declare function defaultSort(view: PanelView): string;
|
|
43
|
+
/**
|
|
44
|
+
* The Desktop view menu places Go immediately after Overview, because it is
|
|
45
|
+
* live host state rather than a database report. The TUI keeps its numeric
|
|
46
|
+
* key order (9 is db, 0 is go); only the Desktop dropdown uses this order.
|
|
47
|
+
*/
|
|
48
|
+
export declare function desktopViewOrder(views: readonly PanelView[]): readonly PanelView[];
|
|
49
|
+
export declare function nextSort(view: PanelView, current: string, step: number): string;
|
|
30
50
|
/** The views and ranges, as the command and the panel header understand them. */
|
|
31
|
-
export declare function parseArgs(input: string | undefined): {
|
|
51
|
+
export declare function parseArgs(input: string | undefined, views?: readonly PanelView[]): {
|
|
32
52
|
view?: PanelView;
|
|
33
53
|
range?: RangeKey;
|
|
34
54
|
};
|
|
@@ -55,7 +75,7 @@ export type PanelSettings = {
|
|
|
55
75
|
};
|
|
56
76
|
export declare const DEFAULT_SETTINGS: PanelSettings;
|
|
57
77
|
/** Merge persisted state with the defaults, dropping anything unrecognized. */
|
|
58
|
-
export declare function sanitizeSettings(raw: Partial<PanelSettings> | undefined): PanelSettings;
|
|
78
|
+
export declare function sanitizeSettings(raw: Partial<PanelSettings> | undefined, views?: readonly PanelView[]): PanelSettings;
|
|
59
79
|
export declare function formatPercent(value: number | undefined, digits?: number): string;
|
|
60
80
|
export declare function formatCount(value: number): string;
|
|
61
81
|
export declare function formatMs(value: number | undefined): string;
|
|
@@ -120,7 +140,7 @@ export declare function usageBuckets(usage: {
|
|
|
120
140
|
* clearly; on a narrow panel the names shorten instead of wrapping, and the
|
|
121
141
|
* active view always keeps its full name.
|
|
122
142
|
*/
|
|
123
|
-
export declare function viewBar(view: PanelView, width?: number): PanelLine;
|
|
143
|
+
export declare function viewBar(view: PanelView, width?: number, views?: readonly PanelView[]): PanelLine;
|
|
124
144
|
export declare function keysFor(of: PanelView): string;
|
|
125
145
|
export declare function filterSummary(filters: {
|
|
126
146
|
modelID?: string | undefined;
|
|
@@ -129,6 +149,16 @@ export declare function filterSummary(filters: {
|
|
|
129
149
|
export declare function granularityLabel(granularity: PeriodGranularity): string;
|
|
130
150
|
/** Help overlay: the keys and the exact meaning of every number. */
|
|
131
151
|
export declare function helpLines(width: number): PanelLine[];
|
|
152
|
+
/** The full `go` view: the three meters, the monthly forecast and renewal. */
|
|
153
|
+
export declare function goQuotaLines(state: QuotaFetch | undefined, options: {
|
|
154
|
+
now: number;
|
|
155
|
+
width: number;
|
|
156
|
+
name?: string | undefined;
|
|
157
|
+
loading?: boolean | undefined;
|
|
158
|
+
error?: string | undefined;
|
|
159
|
+
}): PanelLine[];
|
|
160
|
+
/** The compact block the TUI sidebar and Desktop Turns panel show before the session summary. */
|
|
161
|
+
export declare function goSidebarLines(state: QuotaFetch | undefined, now: number, width: number, name?: string): PanelLine[];
|
|
132
162
|
export declare function overviewLines(data: {
|
|
133
163
|
usage: Overview;
|
|
134
164
|
session: Overview | undefined;
|
|
@@ -212,7 +242,8 @@ export declare function turnsLines(rows: readonly TurnUsage[], width: number, op
|
|
|
212
242
|
export declare function sessionSummaryLines(usage: Overview, budget?: number, estimates?: boolean): PanelLine[];
|
|
213
243
|
/**
|
|
214
244
|
* The sidebar history: a compact block per turn — when and through which
|
|
215
|
-
* provider, then the prompt volumes, then the cache hit,
|
|
245
|
+
* provider and how long it took, then the prompt volumes, then the cache hit,
|
|
246
|
+
* the rate and the cost.
|
|
216
247
|
*
|
|
217
248
|
* The model gets a line of its own at both ends of the block and on every turn
|
|
218
249
|
* that changed it. The ends matter because the reader cannot tell whether a
|
package/dist/panel.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/** @jsxImportSource @opentui/solid */
|
|
2
|
-
import type { Database } from "bun:sqlite";
|
|
3
1
|
import type { Context, PanelInput } from "@opencode/plugin/tui/context";
|
|
4
|
-
import { type
|
|
5
|
-
import { type
|
|
2
|
+
import { type PanelSettings, type PanelView } from "./panel-data";
|
|
3
|
+
import { type QuotaResource } from "./quota";
|
|
6
4
|
/**
|
|
7
|
-
* The `/usage` panel. One read-only view over the stats database at a time,
|
|
5
|
+
* The `/usage-insights` panel. One read-only view over the stats database at a time,
|
|
8
6
|
* driven entirely from the keyboard: a cursor over the selectable lines,
|
|
9
7
|
* Enter drills into the row under it, and the views, range, sort, bucket and
|
|
10
8
|
* filters are part of the state the host persists between openings.
|
|
@@ -13,22 +11,6 @@ import { type BackfillResult } from "./stats/maintenance";
|
|
|
13
11
|
* component registers — the prompt is not involved.
|
|
14
12
|
*/
|
|
15
13
|
export type PanelDeps = {
|
|
16
|
-
/** Lazily opened stats database; undefined when it cannot be opened. */
|
|
17
|
-
db: () => Database | undefined;
|
|
18
|
-
/** Where that database lives, for the `db` view. */
|
|
19
|
-
dbPath: () => string;
|
|
20
|
-
/**
|
|
21
|
-
* Short-lived write connection for maintenance (prune, compact). The panel
|
|
22
|
-
* itself only reads; opening a writer on demand is what keeps a read from
|
|
23
|
-
* ever taking the recorder's lock. Undefined when the write cannot be made.
|
|
24
|
-
*/
|
|
25
|
-
withWrite?: (<Value>(run: (db: Database) => Value) => Value | undefined) | undefined;
|
|
26
|
-
/** Price the historical $0 steps that have no estimate yet. */
|
|
27
|
-
backfill?: (() => BackfillResult | undefined) | undefined;
|
|
28
|
-
/** Injectable clock, for tests. */
|
|
29
|
-
now: () => number;
|
|
30
|
-
/** Creation time of a session, used by the `session` range. */
|
|
31
|
-
sessionStart: (sessionID: string) => number | undefined;
|
|
32
14
|
/** Bumped by the TUI when a step or an execution ends, so views re-read. */
|
|
33
15
|
refresh?: (() => number) | undefined;
|
|
34
16
|
/**
|
|
@@ -43,5 +25,11 @@ export declare function Panel(props: {
|
|
|
43
25
|
readonly deps: PanelDeps;
|
|
44
26
|
readonly settings: PanelSettings;
|
|
45
27
|
readonly update: (mutation: (draft: PanelSettings) => void) => void;
|
|
46
|
-
readonly
|
|
28
|
+
readonly maintenance?: boolean | undefined;
|
|
29
|
+
/** The views this client offers (`go` is omitted when quota is off). */
|
|
30
|
+
readonly views: readonly PanelView[];
|
|
31
|
+
/** Live OpenCode Go allowance, shared with the sidebar. */
|
|
32
|
+
readonly quota: QuotaResource;
|
|
33
|
+
/** Full subscription label shown above the meters. */
|
|
34
|
+
readonly quotaName: string;
|
|
47
35
|
}): any;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OpenCodeClient } from "@opencode/client";
|
|
2
|
+
import type { QuotaFetch } from "./quota";
|
|
3
|
+
/**
|
|
4
|
+
* Reads the host's usage-limits endpoint. The plugin never talks to the
|
|
5
|
+
* Console and never sees the API key: OpenCode itself resolves the Go
|
|
6
|
+
* subscription from the stored Console session and exposes the meters here.
|
|
7
|
+
*/
|
|
8
|
+
export type QuotaLocation = {
|
|
9
|
+
directory?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
/** Validate and normalize the endpoint payload; exported for tests. */
|
|
12
|
+
export declare function normalizeQuota(data: unknown, now?: number): QuotaFetch;
|
|
13
|
+
export declare function fetchGoQuota(client: OpenCodeClient, location?: QuotaLocation | undefined, signal?: AbortSignal | undefined): Promise<QuotaFetch>;
|
package/dist/quota.d.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode Go allowance math and formatting.
|
|
3
|
+
*
|
|
4
|
+
* The host publishes one meter per window: `rolling` (5 hours), `weekly` and
|
|
5
|
+
* `monthly`. Each meter carries the percentage used, whether Go refuses
|
|
6
|
+
* requests until it resets, and the reset instant. The host does not publish
|
|
7
|
+
* when the monthly cycle started, so the forecast infers it as one calendar
|
|
8
|
+
* month before the reset. That assumption is shown in the UI instead of being
|
|
9
|
+
* hidden in the number.
|
|
10
|
+
*/
|
|
11
|
+
export declare const QUOTA_VIEW: "go";
|
|
12
|
+
export declare const QUOTA_POLL_MS = 60000;
|
|
13
|
+
/** The host does not expose the paid plan; this is the conservative default. */
|
|
14
|
+
export declare const DEFAULT_QUOTA_NAME = "OpenCode Go";
|
|
15
|
+
/**
|
|
16
|
+
* The subscription label shown in the UI. The host's usage payload has no
|
|
17
|
+
* `planType` (Go and Go Plus share the same meters), so an explicit
|
|
18
|
+
* `quotaName` wins; otherwise use the provider's display name if the host
|
|
19
|
+
* provides one, and finally the full default name.
|
|
20
|
+
*/
|
|
21
|
+
export declare function quotaNameOf(explicit?: string | undefined, providerName?: string | undefined): string;
|
|
22
|
+
export type GoMeter = {
|
|
23
|
+
percent: number;
|
|
24
|
+
limited: boolean;
|
|
25
|
+
resetsAt: number;
|
|
26
|
+
};
|
|
27
|
+
export type GoWorkspace = {
|
|
28
|
+
id: string;
|
|
29
|
+
name?: string | undefined;
|
|
30
|
+
usageURL?: string | undefined;
|
|
31
|
+
};
|
|
32
|
+
export type GoQuota = {
|
|
33
|
+
workspace?: GoWorkspace | undefined;
|
|
34
|
+
rolling: GoMeter;
|
|
35
|
+
weekly: GoMeter;
|
|
36
|
+
monthly: GoMeter;
|
|
37
|
+
observedAt: number;
|
|
38
|
+
};
|
|
39
|
+
/** What a successful or explanatory quota read means for the UI. */
|
|
40
|
+
export type QuotaFetch = {
|
|
41
|
+
kind: "ok";
|
|
42
|
+
quota: GoQuota;
|
|
43
|
+
} | {
|
|
44
|
+
kind: "none";
|
|
45
|
+
reason: "console" | "subscription";
|
|
46
|
+
};
|
|
47
|
+
/** Reactive quota state shared by the TUI panel and sidebar. */
|
|
48
|
+
export type QuotaResource = {
|
|
49
|
+
readonly state: () => QuotaFetch | undefined;
|
|
50
|
+
readonly loading: () => boolean;
|
|
51
|
+
readonly error: () => string | undefined;
|
|
52
|
+
readonly refresh: () => void;
|
|
53
|
+
};
|
|
54
|
+
export type MonthlyForecast = {
|
|
55
|
+
/** Inferred start of the monthly cycle. */
|
|
56
|
+
startAt: number;
|
|
57
|
+
/** Monthly reset reported by the host. */
|
|
58
|
+
endAt: number;
|
|
59
|
+
elapsedMs: number;
|
|
60
|
+
remainingMs: number;
|
|
61
|
+
/** Percentage points used per day over the cycle so far. */
|
|
62
|
+
ratePerDay: number;
|
|
63
|
+
/** Percentage at the reset if the current pace continues. */
|
|
64
|
+
projectedPercent: number;
|
|
65
|
+
/** When the monthly allowance reaches 100% before the reset. */
|
|
66
|
+
exhaustAt?: number | undefined;
|
|
67
|
+
/** The meter is already limited or at 100%. */
|
|
68
|
+
reached: boolean;
|
|
69
|
+
/** The cycle has run long enough for the projection to mean something. */
|
|
70
|
+
available: boolean;
|
|
71
|
+
/** The limit is expected before the reset. */
|
|
72
|
+
willExhaust: boolean;
|
|
73
|
+
};
|
|
74
|
+
export type QuotaChart = {
|
|
75
|
+
/** Whole percentage used now, clamped to 0-100. */
|
|
76
|
+
current: number;
|
|
77
|
+
/** Whole percentage at the reset, clamped to 0-100. */
|
|
78
|
+
forecast: number;
|
|
79
|
+
/** Percentage points left at the reset. */
|
|
80
|
+
headroom: number;
|
|
81
|
+
/** The projection goes past 100%. */
|
|
82
|
+
over: boolean;
|
|
83
|
+
/** The meter is already at 100%; the projection is not useful. */
|
|
84
|
+
reached: boolean;
|
|
85
|
+
available: boolean;
|
|
86
|
+
/** Monthly reset reported by the host. */
|
|
87
|
+
resetsAt: number;
|
|
88
|
+
exhaustAt?: number | undefined;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* The start of the cycle that ends at `endAt`, assuming the paid period has
|
|
92
|
+
* the same day in the previous month. A shorter previous month uses its last
|
|
93
|
+
* day, so 31 March maps to 28/29 February instead of overflowing into March.
|
|
94
|
+
*/
|
|
95
|
+
export declare function previousCycleStart(endAt: number): number;
|
|
96
|
+
/**
|
|
97
|
+
* Project the month's percentage to its reset from the cycle's average pace.
|
|
98
|
+
* The projection is intentionally simple: with one observation per window it
|
|
99
|
+
* is the only honest forecast the host data supports. It never invents a
|
|
100
|
+
* sample history.
|
|
101
|
+
*/
|
|
102
|
+
export declare function forecastMonthly(meter: GoMeter, now: number): MonthlyForecast;
|
|
103
|
+
/** The values a bar chart needs, with the projection clamped to the track. */
|
|
104
|
+
export declare function quotaChart(meter: GoMeter, now: number): QuotaChart;
|
|
105
|
+
/** A ten-cell ASCII bar that fits the TUI panel and the sidebar. */
|
|
106
|
+
export declare function quotaBar(percent: number, width?: number): string;
|
|
107
|
+
/** `15 Dec 2026 22:06` in the user's local time, or a fixed zone in tests. */
|
|
108
|
+
export declare function formatRenewal(at: number, timeZone?: string | undefined): string;
|
|
109
|
+
/** `15 Dec 22:06` for the narrow sidebar. */
|
|
110
|
+
export declare function formatRenewalCompact(at: number, timeZone?: string | undefined): string;
|
|
111
|
+
/** `in 2d 4h`; a reset in the past reads `due`. */
|
|
112
|
+
export declare function formatCountdown(at: number, now: number): string;
|
|
113
|
+
/** The status line shared by the TUI and the chart. */
|
|
114
|
+
export declare function quotaStatus(quota: GoQuota): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { OpenCodeClient } from "@opencode/client";
|
|
2
|
+
import { type BackfillInput, type FiltersOutput, type ListCostInput, type ListCostOutput, type PanelInput, type PanelOutput, type PruneInput, type RecordedEvent, type TurnsInput, type TurnsOutput, type VacuumInput, type VacuumOutput, type WipeInput } from "./rpc";
|
|
3
|
+
import type { BackfillResult, PruneResult, WipeResult } from "./stats/maintenance";
|
|
4
|
+
/**
|
|
5
|
+
* Typed client for the usage RPC, shared by the TUI and the desktop GUI. The
|
|
6
|
+
* contract uses JSON Schema, so the generated client returns `unknown`; this
|
|
7
|
+
* wrapper is the one place the plugin casts it back to the declared types.
|
|
8
|
+
*/
|
|
9
|
+
export type UsageLocation = {
|
|
10
|
+
directory?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
export type UsageApi = ReturnType<typeof usageApi>;
|
|
13
|
+
export declare function usageApi(client: OpenCodeClient, location?: UsageLocation | undefined): {
|
|
14
|
+
panel: (input: PanelInput, signal?: AbortSignal) => Promise<PanelOutput>;
|
|
15
|
+
turns: (input: TurnsInput, signal?: AbortSignal) => Promise<TurnsOutput>;
|
|
16
|
+
listCost: (input: ListCostInput, signal?: AbortSignal) => Promise<ListCostOutput>;
|
|
17
|
+
filters: (signal?: AbortSignal) => Promise<FiltersOutput>;
|
|
18
|
+
dbInfo: (signal?: AbortSignal) => Promise<import("./stats/maintenance").DbInfo>;
|
|
19
|
+
prune: (input: PruneInput, signal?: AbortSignal) => Promise<PruneResult>;
|
|
20
|
+
wipe: (input: WipeInput, signal?: AbortSignal) => Promise<WipeResult>;
|
|
21
|
+
vacuum: (input: VacuumInput, signal?: AbortSignal) => Promise<VacuumOutput>;
|
|
22
|
+
backfill: (input: BackfillInput, signal?: AbortSignal) => Promise<BackfillResult>;
|
|
23
|
+
onRecorded: (handler: (event: RecordedEvent) => void, signal?: AbortSignal) => () => void;
|
|
24
|
+
};
|