vite-devtools-svelte 0.3.0 → 0.4.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.
Files changed (80) hide show
  1. package/README.md +159 -56
  2. package/dist/analyzers/api.d.ts +16 -0
  3. package/dist/analyzers/assets.d.ts +6 -1
  4. package/dist/analyzers/build.d.ts +3 -0
  5. package/dist/analyzers/module-graph.d.ts +13 -0
  6. package/dist/analyzers/og.d.ts +7 -0
  7. package/dist/analyzers/source.d.ts +6 -0
  8. package/dist/client/assets/ApiPlayground-BMx5j-7t.js +3 -0
  9. package/dist/client/assets/ApiPlayground-D6P2iQCp.css +1 -0
  10. package/dist/client/assets/Assets-BHhg5Smm.js +1 -0
  11. package/dist/client/assets/Assets-D-EORnuB.css +1 -0
  12. package/dist/client/assets/Badge-BBLKgCiU.css +1 -0
  13. package/dist/client/assets/Badge-CBVv8IFU.js +1 -0
  14. package/dist/client/assets/BuildAnalysis-BdVCnWpb.js +1 -0
  15. package/dist/client/assets/BuildAnalysis-ClES_VN-.css +1 -0
  16. package/dist/client/assets/CaptureNotice-B2odNyXw.css +1 -0
  17. package/dist/client/assets/CaptureNotice-BeXCVhO0.js +1 -0
  18. package/dist/client/assets/Components-Co50xTrv.css +1 -0
  19. package/dist/client/assets/Components-D_qDgEUt.js +1 -0
  20. package/dist/client/assets/DataTable-C6-tmcTQ.js +1 -0
  21. package/dist/client/assets/DataTable-CdVIFm8T.css +1 -0
  22. package/dist/client/assets/ErrorDashboard-0CGkszcN.css +1 -0
  23. package/dist/client/assets/ErrorDashboard-CfUhPzue.js +1 -0
  24. package/dist/client/assets/FpsMonitor-B_AuHgyu.js +1 -0
  25. package/dist/client/assets/FpsMonitor-BmS11Tn7.css +1 -0
  26. package/dist/client/assets/Inspect-BOgmKm6W.js +3 -0
  27. package/dist/client/assets/Inspect-Ci9HWo78.css +1 -0
  28. package/dist/client/assets/Inspector-CDwlmfEg.css +1 -0
  29. package/dist/client/assets/Inspector-DGmAzhki.js +1 -0
  30. package/dist/client/assets/LoadProfiler-5xhnDLjR.js +1 -0
  31. package/dist/client/assets/LoadProfiler-cg28l5zW.css +1 -0
  32. package/dist/client/assets/ModuleGraph-B6XWZJQb.css +1 -0
  33. package/dist/client/assets/ModuleGraph-Cp7f0Nz0.js +1 -0
  34. package/dist/client/assets/OGPreview-CSIAKIGn.css +1 -0
  35. package/dist/client/assets/OGPreview-CjBhXSgn.js +1 -0
  36. package/dist/client/assets/Overview-B8hvIsIM.css +1 -0
  37. package/dist/client/assets/Overview-Kbpkgsas.js +1 -0
  38. package/dist/client/assets/ReactiveGraph-Bq_aP4uo.css +1 -0
  39. package/dist/client/assets/ReactiveGraph-w2TK82c8.js +5 -0
  40. package/dist/client/assets/RenderProfiler-CS1FAvX6.css +1 -0
  41. package/dist/client/assets/RenderProfiler-CeF8_j3b.js +1 -0
  42. package/dist/client/assets/Routes-DArWZtzC.js +1 -0
  43. package/dist/client/assets/Routes-eFPp9T07.css +1 -0
  44. package/dist/client/assets/SearchField-DWMQuleP.css +1 -0
  45. package/dist/client/assets/SearchField-eocQu1eB.js +1 -0
  46. package/dist/client/assets/Segmented-JGNuI5EZ.js +1 -0
  47. package/dist/client/assets/Segmented-OaYMdNpv.css +1 -0
  48. package/dist/client/assets/SplitView-B8lYXXEm.js +1 -0
  49. package/dist/client/assets/SplitView-CbR-hDtW.css +1 -0
  50. package/dist/client/assets/StateTimeline-B4FdF3L3.css +1 -0
  51. package/dist/client/assets/StateTimeline-HpyvgoK1.js +1 -0
  52. package/dist/client/assets/TreeView-BL5XbGhe.css +1 -0
  53. package/dist/client/assets/TreeView-fty5aCC5.js +1 -0
  54. package/dist/client/assets/VirtualList-BvOBTnYJ.js +1 -0
  55. package/dist/client/assets/VirtualList-CRDBwjCp.css +1 -0
  56. package/dist/client/assets/browser-agent-rpc-BXhoSh1z-D9g7mT9G.js +1 -0
  57. package/dist/client/assets/capture.svelte-CUhwdJwX.js +1 -0
  58. package/dist/client/assets/format-CW_NXiBg.js +1 -0
  59. package/dist/client/assets/index-BzMw8R8l.js +7 -0
  60. package/dist/client/assets/index-eZHqMk0z.css +1 -0
  61. package/dist/client/assets/reactive-C2hv2QLH.js +1 -0
  62. package/dist/client/assets/reactive-selection.svelte-Dfd9zWsh.js +1 -0
  63. package/dist/client/assets/versions-CZjRj40E.js +1 -0
  64. package/dist/client/assets/versions-Co596WUJ.css +1 -0
  65. package/dist/client/index.html +3 -14
  66. package/dist/collector.d.ts +284 -0
  67. package/dist/devframe.d.ts +90 -0
  68. package/dist/index.mjs +1839 -808
  69. package/dist/index.mjs.map +1 -1
  70. package/dist/mcp/server.d.ts +21 -1
  71. package/dist/mcp/sessions.d.ts +9 -0
  72. package/dist/mount.d.ts +18 -0
  73. package/dist/runtime.d.ts +2 -2
  74. package/dist/security.d.ts +27 -0
  75. package/dist/template-injector.d.ts +14 -2
  76. package/dist/types.d.ts +176 -0
  77. package/package.json +8 -7
  78. package/dist/client/assets/client-D_AN-igc.js +0 -2
  79. package/dist/client/assets/index-CJElsHas.js +0 -6
  80. package/dist/client/assets/index-D-ChuYqP.css +0 -1
@@ -0,0 +1,284 @@
1
+ import { CaptureInfoMap, CompilerWarning, ComponentInstance, FpsSample, LoadProfile, ReactiveGraph, ReactiveGraphRequest, ReactiveGraphResult, ReactiveSummary, ReactiveSummaryRequest, RenderProfile, RuntimeError, StateChange, StateTimelineDelta, StateTimelineEntry, DatasetVersions } from './types.js';
2
+ export declare const LIMITS: {
3
+ readonly liveComponents: 50000;
4
+ readonly renderProfiles: 5000;
5
+ readonly stateTimeline: 500;
6
+ readonly reactiveNodes: 5000;
7
+ readonly reactiveEdges: 20000;
8
+ readonly fpsSamples: 1200;
9
+ readonly runtimeErrors: 200;
10
+ readonly loadProfiles: 200;
11
+ readonly compilerWarnings: 500;
12
+ };
13
+ /** How long a pull request to the browser runtime may take before we answer from cache. */
14
+ export declare const RUNTIME_REQUEST_TIMEOUT = 1000;
15
+ /** A pull answered within this window is reused instead of asking the runtime again. */
16
+ export declare const PULL_FRESHNESS = 1000;
17
+ /** Byte budget (JSON length, measured once at ingest) for the server-side state timeline. */
18
+ export declare const STATE_TIMELINE_BYTES: number;
19
+ export type DatasetKey = keyof DatasetVersions;
20
+ /** App page loads (tabs / reloads) whose component tree + profiles are kept, LRU. */
21
+ export declare const MAX_EPOCHS = 4;
22
+ /** Hot-channel event names shared with `runtime.ts` (stable contract, see docs/devframe-migration.md §6). */
23
+ export declare const HOT_EVENTS: {
24
+ readonly components: "svelte-devtools:components";
25
+ readonly profiles: "svelte-devtools:profiles";
26
+ readonly stateTimeline: "svelte-devtools:state-timeline";
27
+ readonly fps: "svelte-devtools:fps";
28
+ readonly runtimeError: "svelte-devtools:runtime-error";
29
+ readonly reactiveGraph: "svelte-devtools:reactive-graph";
30
+ readonly requestReactiveGraph: "svelte-devtools:request-reactive-graph";
31
+ /** server → runtime `{ requestId, epoch?, topK, windowMs }`; reply `reactiveSummary` (§6.7 I). */
32
+ readonly requestReactiveSummary: "svelte-devtools:request-reactive-summary";
33
+ readonly reactiveSummary: "svelte-devtools:reactive-summary";
34
+ readonly requestStateTimeline: "svelte-devtools:request-state-timeline";
35
+ readonly clearStateTimeline: "svelte-devtools:clear-state-timeline";
36
+ /** runtime → server, once per page load: "send me the current subscription state". */
37
+ readonly runtimeReady: "svelte-devtools:runtime-ready";
38
+ /** server → runtime(s): `{ active: boolean }` — whether any consumer is watching. */
39
+ readonly subscription: "svelte-devtools:subscription";
40
+ };
41
+ /** Defaults and bounds for `get-reactive-summary` (§6.7 I). */
42
+ export declare const SUMMARY_DEFAULTS: {
43
+ readonly topK: 50;
44
+ readonly maxTopK: 200;
45
+ readonly windowMs: 10000;
46
+ readonly minWindowMs: 1000;
47
+ readonly maxWindowMs: 60000;
48
+ };
49
+ /** A consumer (DevTools UI tab, MCP agent) counts as watching until its lease expires. */
50
+ export declare const LEASE_TTL = 15000;
51
+ export interface HotClient {
52
+ send(event: string, payload: unknown): void;
53
+ }
54
+ export interface HotChannel {
55
+ send(event: string, payload: unknown): void;
56
+ on(event: string, listener: (payload: any, client: HotClient) => void): void;
57
+ off?(event: string, listener: (payload: any, client: HotClient) => void): void;
58
+ }
59
+ export interface CollectorHooks {
60
+ onFpsSample?: (sample: FpsSample) => void;
61
+ onLoadProfile?: (profile: LoadProfile) => void;
62
+ }
63
+ /**
64
+ * Host-side store for everything the browser runtime and the instrumentation
65
+ * transforms report. Independent of Vite and of devframe: the Vite plugin
66
+ * feeds it, the devframe RPC layer and the MCP server read from it.
67
+ */
68
+ export declare class Collector {
69
+ private readonly hooks;
70
+ private epochs;
71
+ private servedEpoch;
72
+ private liveCache;
73
+ loadProfiles: LoadProfile[];
74
+ reactiveGraph: ReactiveGraph;
75
+ compilerWarnings: CompilerWarning[];
76
+ runtimeErrors: RuntimeError[];
77
+ fpsSamples: FpsSample[];
78
+ readonly versions: DatasetVersions;
79
+ private bump;
80
+ private timeline;
81
+ /** Parallel to `timeline`: JSON size and source epoch (app page load) of each entry. */
82
+ private timelineSizes;
83
+ private timelineEpochs;
84
+ private timelineBytes;
85
+ /** Newest seq issued by this collector (= the current cursor). */
86
+ private timelineSeq;
87
+ /** Cursor value at the last removal; older cursors must start over. */
88
+ private timelineResetAt;
89
+ /** Seq of the newest entry trimmed by the caps; cursors below it missed entries. */
90
+ private timelineTrimmedAt;
91
+ private lastPull;
92
+ private inflight;
93
+ private pulls;
94
+ private pullCache;
95
+ private pullInflight;
96
+ private requestSeq;
97
+ /** The most recent graph reply, for capture info. */
98
+ private lastGraph;
99
+ private timelineDrops;
100
+ /** Per epoch: whether the runtime has a first sample of every tracked $state yet. */
101
+ private timelineBaseline;
102
+ private timelineTooLarge;
103
+ private received;
104
+ private hot;
105
+ private detachHot;
106
+ private leases;
107
+ private snapshotWaiters;
108
+ private active;
109
+ private sweepTimer;
110
+ private stateTimelineResolvers;
111
+ constructor(hooks?: CollectorHooks);
112
+ /**
113
+ * Subscribe to the runtime's hot-channel events. Re-attaching (dev server
114
+ * restart) detaches the previous channel first so listeners never pile up.
115
+ */
116
+ attach(hot: HotChannel): void;
117
+ detach(): void;
118
+ /** What the runtime is told: collect/poll only while somebody is watching. */
119
+ get subscription(): {
120
+ active: boolean;
121
+ componentDeltas: true;
122
+ };
123
+ /** Epochs we asked for a full snapshot (delta without a base); answered once per epoch. */
124
+ private resyncRequested;
125
+ /** Components of the served epoch, parents first, capped at {@link LIMITS.liveComponents}. */
126
+ get liveComponents(): ComponentInstance[];
127
+ /**
128
+ * The served epoch's components with that epoch, read together, so a
129
+ * component id is never paired with another page load's epoch (several app
130
+ * tabs keep separate trees; nothing is merged).
131
+ */
132
+ get liveSnapshot(): {
133
+ epoch: string | null;
134
+ total: number;
135
+ components: ComponentInstance[];
136
+ };
137
+ /** Instances the served epoch has mounted, including those beyond the cap. */
138
+ get liveComponentsTotal(): number;
139
+ get renderProfiles(): RenderProfile[];
140
+ /** The epoch currently served and how many app page loads are tracked. */
141
+ get epochInfo(): {
142
+ epoch: string | undefined;
143
+ epochs: number;
144
+ };
145
+ private servedState;
146
+ /**
147
+ * Get (creating, LRU-bounded) the state for `epoch` and mark it as the most
148
+ * recent pusher. It becomes the served epoch only once it holds a full
149
+ * component snapshot — an epoch known only from profiles/timeline would
150
+ * otherwise show an empty tree (review B1).
151
+ */
152
+ private touchEpoch;
153
+ private newestBasedEpoch;
154
+ private serve;
155
+ /**
156
+ * Mark `id` as watching for `ttl` ms (renewed by heartbeats). The first
157
+ * lease activates the runtime's polling/FPS sampling, the last expiry or
158
+ * release pauses it.
159
+ */
160
+ lease(id: string, ttl?: number): boolean;
161
+ /**
162
+ * Resolve once the runtime has sent its activation snapshot (components,
163
+ * profiles, then a `reset: true` timeline — the last part) or after
164
+ * `timeout`, so a consumer that just activated the runtime doesn't read
165
+ * the stale pre-activation state.
166
+ */
167
+ waitForSnapshot(timeout: number): Promise<void>;
168
+ release(id: string): void;
169
+ private updateSubscription;
170
+ /**
171
+ * Full form `{ epoch?, reset?, components }` replaces the epoch's tree;
172
+ * delta form `{ epoch, added, removed }` (ids) patches it (§6.5). A delta
173
+ * for an epoch we hold no full snapshot of (new to us, or evicted) is not
174
+ * applied — a partial tree would persist — and the sender is asked to
175
+ * resync. Entries stay in registration order (parents first); an instance
176
+ * is stored only while its parent is and the cap allows, otherwise only its
177
+ * id is tracked, so the stored part is always a rooted, orphan-free tree.
178
+ */
179
+ ingestComponents(data: {
180
+ components?: unknown;
181
+ epoch?: unknown;
182
+ added?: unknown;
183
+ removed?: unknown;
184
+ } | undefined, client?: HotClient): void;
185
+ ingestProfiles(data: {
186
+ profiles?: unknown;
187
+ epoch?: unknown;
188
+ total?: unknown;
189
+ } | undefined): void;
190
+ /**
191
+ * What the server holds versus what was reported, per dataset (§6.7 B).
192
+ * `total: null` means unknown; nothing is estimated.
193
+ */
194
+ getCaptureInfo(): CaptureInfoMap;
195
+ /** The server-side timeline (all tracked epochs, oldest first). */
196
+ get stateTimeline(): StateTimelineEntry[];
197
+ /**
198
+ * Two payload shapes (docs/devframe-migration.md §6.4):
199
+ * - delta: `{ epoch, changes, reset? }` — `changes` are new since the
200
+ * previous push from that page load (`epoch`); `reset` replaces that
201
+ * epoch's entries. Entries are kept per epoch, so several app tabs (or a
202
+ * reload) interleave instead of wiping each other.
203
+ * - legacy full snapshot: `{ changes }` — we append only the entries after
204
+ * the newest one we already hold, so clients still get deltas.
205
+ */
206
+ ingestStateTimeline(data: {
207
+ changes?: unknown;
208
+ epoch?: unknown;
209
+ reset?: unknown;
210
+ dropped?: unknown;
211
+ valueTooLarge?: unknown;
212
+ baseline?: unknown;
213
+ } | undefined): void;
214
+ /**
215
+ * Add the runtime's own losses (unsent entries it evicted, §6.7 C) and
216
+ * too-large values to the epoch's counters. Only runtime reasons are
217
+ * accepted from the runtime; server reasons are counted here.
218
+ */
219
+ private countRuntimeLosses;
220
+ private addDrop;
221
+ /** Changes after `since` (a previous `cursor`), or the whole buffer when the cursor is stale. */
222
+ getStateTimelineDelta(since?: number): StateTimelineDelta;
223
+ /** Invalidate every cursor issued so far (entries were removed, not just appended). */
224
+ private markTimelineReset;
225
+ private dropEpoch;
226
+ private appendTimeline;
227
+ private resolveSnapshotWaiters;
228
+ /**
229
+ * A graph reply. With a `requestId` (§6.7 A) it resolves only that request,
230
+ * and only if its epoch matches the one asked for; a reply nobody waits for
231
+ * (another app tab, too late) is ignored. Without one (an older runtime) it
232
+ * is a whole-app graph and answers every pending graph pull, scoped ones by
233
+ * filtering here.
234
+ */
235
+ ingestReactiveGraph(data: Record<string, any> | undefined): void;
236
+ /**
237
+ * Shape a runtime reply into a {@link ReactiveGraphResult}: apply the
238
+ * collector caps (nodes, then only edges between kept nodes, then the edge
239
+ * cap) and report what was left out. Totals come from the runtime; an older
240
+ * runtime's are the counts it sent (`nodesKind: 'sent'`), or unknown when
241
+ * the server had to scope its whole-app graph.
242
+ */
243
+ private normalizeGraph;
244
+ private storeGraph;
245
+ /** A summary reply (§6.7 I): resolves only the matching request. */
246
+ ingestReactiveSummary(data: Record<string, any> | undefined): void;
247
+ private normalizeSummary;
248
+ ingestFps(sample: FpsSample): void;
249
+ ingestRuntimeError(error: RuntimeError): void;
250
+ recordLoadProfile(profile: LoadProfile): void;
251
+ recordCompilerWarning(warning: CompilerWarning): void;
252
+ clearLoadProfiles(): void;
253
+ clearErrors(): void;
254
+ clearFps(): void;
255
+ clearStateTimeline(): void;
256
+ /**
257
+ * Ask the browser runtime for the graph of one component instance (or the
258
+ * whole app), built by the runtime within the caps (§6.7 A). Falls back to
259
+ * the last result for the same scope, marked `stale`.
260
+ */
261
+ requestReactiveGraph(req?: ReactiveGraphRequest): Promise<ReactiveGraphResult>;
262
+ /** Ask the runtime for the overview aggregate (§6.7 I); never captures the graph. */
263
+ requestReactiveSummary(req?: ReactiveSummaryRequest): Promise<ReactiveSummary>;
264
+ /**
265
+ * One pull per key at a time; a result younger than {@link PULL_FRESHNESS}
266
+ * is reused. The request carries a requestId and the served epoch; only
267
+ * the matching reply resolves it. On timeout (or without a runtime) the
268
+ * last result for the same key is returned with `stale: true`.
269
+ */
270
+ private keyedPull;
271
+ /** Resolve a pending pull with a fresh result and cache it under its key. */
272
+ private settle;
273
+ /** Answer every pending keyed pull from its cache (or empty), marked stale. */
274
+ private flushPulls;
275
+ /** Ask the browser runtime for a fresh state timeline; falls back to the last one. */
276
+ requestStateTimeline(): Promise<StateChange[]>;
277
+ /**
278
+ * Concurrent callers share one in-flight pull, and a result younger than
279
+ * {@link PULL_FRESHNESS} is reused, so several polling clients never make
280
+ * the user's app rebuild the same data more than once a second.
281
+ */
282
+ private pull;
283
+ private flushStateTimeline;
284
+ }
@@ -0,0 +1,90 @@
1
+ import { DevframeDefinition } from 'devframe';
2
+ import { z } from 'zod';
3
+ import { GraphModuleLike } from './analyzers/module-graph.js';
4
+ import { Collector } from './collector.js';
5
+ import { ApiResponse, InspectResult, OGPreview, ReactiveGraphResult, ReactiveSummary, StateTimelineDelta, LiveComponentsMeta } from './types.js';
6
+ export declare const DEVFRAME_ID = "svelte-devtools";
7
+ /** Mount base for both hosts (standalone and Vite DevTools), so the SPA URL never changes. */
8
+ export declare const DEVFRAME_BASE = "/.svelte-devtools/";
9
+ /**
10
+ * Everything the portable devframe needs from whatever hosts it. The Vite
11
+ * plugin implements this over its dev server; tests implement it directly.
12
+ * Getters are lazy because the host resolves config after construction.
13
+ */
14
+ export interface SvelteDevtoolsHost {
15
+ collector: Collector;
16
+ /** Absolute project root. */
17
+ root: () => string;
18
+ /** Public base the dev server serves the app (and static files) under. */
19
+ publicBase: () => string;
20
+ /** Every module the dev server currently knows about, across environments. */
21
+ modules: () => GraphModuleLike[];
22
+ /** Compile a project file through the dev server's pipeline (absent without a server). */
23
+ transformRequest?: (file: string) => Promise<{
24
+ code: string;
25
+ map?: {
26
+ mappings?: string;
27
+ sources?: string[];
28
+ } | string | null;
29
+ } | null>;
30
+ /** Origins the dev server itself is reachable at (API playground / OG preview may call them). */
31
+ serverOrigins: () => string[];
32
+ /** Open `file[:line]` in the user's editor. */
33
+ openInEditor: (target: string) => void;
34
+ }
35
+ export declare function createRpcFunctions(host: SvelteDevtoolsHost): readonly [import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-project", "query", [], import('./types.js').ProjectInfo, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-routes", "query", [], import('./types.js').RouteInfo[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-assets", "query", [], import('./types.js').AssetInfo[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-component-relations", "query", [], import('./types.js').ComponentRelation[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-svelte-files", "query", [], {
36
+ file: string;
37
+ name: string;
38
+ }[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-live-components", "query", [], import('./types.js').ComponentInstance[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-live-components-meta", "query", [], LiveComponentsMeta, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithSchemas<"set-active", "action", readonly [z.ZodObject<{
39
+ client: z.ZodString;
40
+ active: z.ZodBoolean;
41
+ }, z.core.$strip>], z.ZodVoid, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithSchemas<"open-in-editor", "action", readonly [z.ZodObject<{
42
+ file: z.ZodString;
43
+ line: z.ZodOptional<z.ZodNumber>;
44
+ }, z.core.$strip>], z.ZodVoid, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithSchemas<"open-reactive-in-editor", "action", readonly [z.ZodObject<{
45
+ file: z.ZodString;
46
+ name: z.ZodString;
47
+ type: z.ZodString;
48
+ }, z.core.$strip>], z.ZodVoid, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-render-profiles", "query", [], import('./types.js').RenderProfile[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithSchemas<"get-reactive-graph", "query", readonly [z.ZodOptional<z.ZodObject<{
49
+ componentId: z.ZodOptional<z.ZodNumber>;
50
+ epoch: z.ZodOptional<z.ZodString>;
51
+ maxNodes: z.ZodOptional<z.ZodNumber>;
52
+ maxEdges: z.ZodOptional<z.ZodNumber>;
53
+ }, z.core.$strip>>], z.ZodCustom<ReactiveGraphResult, ReactiveGraphResult>, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithSchemas<"get-reactive-summary", "query", readonly [z.ZodOptional<z.ZodObject<{
54
+ topK: z.ZodOptional<z.ZodNumber>;
55
+ windowMs: z.ZodOptional<z.ZodNumber>;
56
+ }, z.core.$strip>>], z.ZodCustom<ReactiveSummary, ReactiveSummary>, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-capture-info", "query", [], Partial<Record<import('./types.js').CaptureKey, import('./types.js').CaptureInfo>>, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-load-profiles", "query", [], import('./types.js').LoadProfile[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"clear-load-profiles", "action", [], void, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-state-timeline", "query", [], Promise<import('./types.js').StateChange[]>, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithSchemas<"get-state-timeline-delta", "query", readonly [z.ZodObject<{
57
+ since: z.ZodOptional<z.ZodNumber>;
58
+ }, z.core.$strip>], z.ZodCustom<StateTimelineDelta, StateTimelineDelta>, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-versions", "query", [], {
59
+ components: number;
60
+ renderProfiles: number;
61
+ loadProfiles: number;
62
+ stateTimeline: number;
63
+ reactiveGraph: number;
64
+ errors: number;
65
+ fps: number;
66
+ }, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"clear-state-timeline", "action", [], void, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-api-endpoints", "query", [], import('./types.js').ApiEndpoint[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithSchemas<"send-api-request", "action", readonly [z.ZodObject<{
67
+ url: z.ZodString;
68
+ method: z.ZodEnum<{
69
+ GET: "GET";
70
+ POST: "POST";
71
+ PUT: "PUT";
72
+ PATCH: "PATCH";
73
+ DELETE: "DELETE";
74
+ HEAD: "HEAD";
75
+ OPTIONS: "OPTIONS";
76
+ }>;
77
+ headers: z.ZodString;
78
+ body: z.ZodString;
79
+ }, z.core.$strip>], z.ZodCustom<ApiResponse, ApiResponse>, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-compiler-warnings", "query", [], import('./types.js').CompilerWarning[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-runtime-errors", "query", [], import('./types.js').RuntimeError[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"clear-errors", "action", [], void, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithSchemas<"inspect-file", "query", readonly [z.ZodObject<{
80
+ file: z.ZodString;
81
+ }, z.core.$strip>], z.ZodCustom<InspectResult, InspectResult>, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-module-graph", "query", [], import('./types.js').ModuleGraphData, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithSchemas<"get-og-preview", "action", readonly [z.ZodObject<{
82
+ url: z.ZodString;
83
+ }, z.core.$strip>], z.ZodCustom<OGPreview, OGPreview>, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-build-analysis", "query", [], import('./types.js').BuildAnalysis, undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"get-fps", "query", [], import('./types.js').FpsSample[], undefined, undefined, import('devframe').DevframeNodeContext>, import('devframe/rpc').RpcFunctionDefinitionWithoutSchemas<"clear-fps", "action", [], void, undefined, undefined, import('devframe').DevframeNodeContext>];
84
+ /**
85
+ * The portable Svelte DevTools tool. Host-agnostic: the same definition is
86
+ * mounted standalone (`initDevframe`) or inside Vite DevTools
87
+ * (`createPluginFromDevframe`); the SPA in `dist/client` connects with
88
+ * `connectDevframe()` either way.
89
+ */
90
+ export declare function createSvelteDevframe(host: SvelteDevtoolsHost): DevframeDefinition;