@rozenite/tanstack-query-plugin 2.1.0 → 2.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/devtools/assets/{CXEL7IU7-BWccRGN3.js → CXEL7IU7-D2MCp9XC.js} +1 -1
  3. package/dist/devtools/assets/{tanstack-query-CbF_imft.js → tanstack-query-Bk8rHBM2.js} +12 -12
  4. package/dist/devtools/tanstack-query.html +1 -1
  5. package/dist/react-native/cjs/package.json +3 -0
  6. package/dist/react-native/cjs/react-native.js +12 -0
  7. package/dist/react-native/cjs/src/react-native/agent/tanstack-query-agent.js +376 -0
  8. package/dist/react-native/cjs/src/react-native/agent/useTanStackQueryAgentTools.js +98 -0
  9. package/dist/react-native/cjs/src/react-native/devtools-actions.js +161 -0
  10. package/dist/react-native/cjs/src/react-native/useHandleDevToolsMessages.js +26 -0
  11. package/dist/react-native/cjs/src/react-native/useHandleInitialData.js +26 -0
  12. package/dist/react-native/cjs/src/react-native/useSyncTanStackCache.js +203 -0
  13. package/dist/react-native/cjs/src/react-native/useTanStackQueryDevTools.js +20 -0
  14. package/dist/react-native/cjs/src/shared/agent-tools.js +197 -0
  15. package/dist/react-native/cjs/src/shared/dehydrate.js +35 -0
  16. package/dist/react-native/cjs/src/shared/messaging.js +2 -0
  17. package/dist/react-native/cjs/src/shared/types.js +2 -0
  18. package/dist/react-native/cjs/src/shared/useSyncOnlineStatus.js +23 -0
  19. package/dist/react-native/package.json +3 -0
  20. package/dist/react-native/react-native.d.ts +1 -0
  21. package/dist/react-native/react-native.js +10 -0
  22. package/dist/{sdk/index.d.ts → react-native/src/react-native/agent/tanstack-query-agent.d.ts} +2105 -1939
  23. package/dist/react-native/src/react-native/agent/tanstack-query-agent.js +370 -0
  24. package/dist/react-native/src/react-native/agent/useTanStackQueryAgentTools.d.ts +2 -0
  25. package/dist/react-native/src/react-native/agent/useTanStackQueryAgentTools.js +94 -0
  26. package/dist/react-native/src/react-native/devtools-actions.d.ts +115 -0
  27. package/dist/react-native/src/react-native/devtools-actions.js +157 -0
  28. package/dist/react-native/src/react-native/useHandleDevToolsMessages.d.ts +3 -0
  29. package/dist/react-native/src/react-native/useHandleDevToolsMessages.js +22 -0
  30. package/dist/react-native/src/react-native/useHandleInitialData.d.ts +3 -0
  31. package/dist/react-native/src/react-native/useHandleInitialData.js +22 -0
  32. package/dist/react-native/src/react-native/useSyncTanStackCache.d.ts +3 -0
  33. package/dist/react-native/src/react-native/useSyncTanStackCache.js +196 -0
  34. package/dist/react-native/src/react-native/useTanStackQueryDevTools.d.ts +2 -0
  35. package/dist/react-native/src/react-native/useTanStackQueryDevTools.js +16 -0
  36. package/dist/react-native/src/shared/agent-tools.d.ts +967 -0
  37. package/dist/react-native/src/shared/agent-tools.js +194 -0
  38. package/dist/react-native/src/shared/dehydrate.d.ts +6 -0
  39. package/dist/react-native/src/shared/dehydrate.js +28 -0
  40. package/dist/react-native/src/shared/messaging.d.ts +44 -0
  41. package/dist/react-native/src/shared/messaging.js +1 -0
  42. package/dist/react-native/src/shared/types.d.ts +25 -0
  43. package/dist/react-native/src/shared/types.js +1 -0
  44. package/dist/react-native/src/shared/useSyncOnlineStatus.d.ts +2 -0
  45. package/dist/react-native/src/shared/useSyncOnlineStatus.js +19 -0
  46. package/dist/rozenite.json +1 -1
  47. package/dist/sdk/package.json +3 -0
  48. package/dist/sdk/sdk.d.ts +812 -0
  49. package/dist/sdk/sdk.js +8 -0
  50. package/dist/sdk/src/react-native/devtools-actions.d.ts +115 -0
  51. package/dist/sdk/src/react-native/devtools-actions.js +161 -0
  52. package/dist/sdk/src/shared/agent-tools.d.ts +967 -0
  53. package/dist/sdk/src/shared/agent-tools.js +197 -0
  54. package/dist/sdk/src/shared/types.d.ts +25 -0
  55. package/dist/sdk/src/shared/types.js +2 -0
  56. package/package.json +18 -18
  57. package/react-native.ts +8 -1
  58. package/rozenite.config.ts +1 -0
  59. package/src/__tests__/release-bundle.test.ts +32 -0
  60. package/tsconfig.json +1 -3
  61. package/dist/react-native/chunks/useTanStackQueryDevTools.require.cjs +0 -1
  62. package/dist/react-native/chunks/useTanStackQueryDevTools.require.js +0 -895
  63. package/dist/react-native/index.cjs +0 -1
  64. package/dist/react-native/index.d.ts +0 -7
  65. package/dist/react-native/index.js +0 -6
  66. package/dist/sdk/index.cjs +0 -1
  67. package/dist/sdk/index.js +0 -199
@@ -0,0 +1,967 @@
1
+ import { type AgentToolContract } from '@rozenite/agent-shared';
2
+ import type { FetchStatus, MutationStatus, QueryStatus } from '@tanstack/react-query';
3
+ import type { applyTanStackQueryDevtoolsAction } from '../react-native/devtools-actions';
4
+ export declare const TANSTACK_QUERY_AGENT_PLUGIN_ID = "@rozenite/tanstack-query-plugin";
5
+ export type TanStackQueryAgentPaginationInput = {
6
+ limit?: number;
7
+ cursor?: string;
8
+ };
9
+ export type TanStackQueryAgentQueryHashInput = {
10
+ queryHash: string;
11
+ };
12
+ export type TanStackQueryAgentQueryToggleInput = TanStackQueryAgentQueryHashInput & {
13
+ enabled: boolean;
14
+ };
15
+ export type TanStackQueryAgentMutationIdInput = {
16
+ mutationId: number;
17
+ };
18
+ export type TanStackQueryAgentOnlineStatusInput = {
19
+ online: boolean;
20
+ };
21
+ export type TanStackQueryAgentSafeValue = null | boolean | number | string | TanStackQueryAgentSafeValue[] | {
22
+ [key: string]: TanStackQueryAgentSafeValue;
23
+ };
24
+ export type TanStackQueryCacheSummary = {
25
+ online: boolean;
26
+ queries: {
27
+ total: number;
28
+ active: number;
29
+ fetching: number;
30
+ pending: number;
31
+ success: number;
32
+ error: number;
33
+ invalidated: number;
34
+ };
35
+ mutations: {
36
+ total: number;
37
+ pending: number;
38
+ success: number;
39
+ error: number;
40
+ paused: number;
41
+ };
42
+ };
43
+ export type TanStackQueryPage = {
44
+ limit: number;
45
+ hasMore: boolean;
46
+ nextCursor?: string;
47
+ };
48
+ export type TanStackQueryQuerySummary = {
49
+ queryHash: string;
50
+ queryKey: TanStackQueryAgentSafeValue;
51
+ status: QueryStatus;
52
+ fetchStatus: FetchStatus;
53
+ observersCount: number;
54
+ isInvalidated: boolean;
55
+ dataUpdatedAt: number;
56
+ errorUpdatedAt: number;
57
+ hasData: boolean;
58
+ hasError: boolean;
59
+ };
60
+ export type TanStackQueryObserverOptionsSummary = {
61
+ enabled: TanStackQueryAgentSafeValue;
62
+ networkMode: TanStackQueryAgentSafeValue;
63
+ staleTime: TanStackQueryAgentSafeValue;
64
+ gcTime: TanStackQueryAgentSafeValue;
65
+ retry: TanStackQueryAgentSafeValue;
66
+ retryDelay: TanStackQueryAgentSafeValue;
67
+ refetchInterval: TanStackQueryAgentSafeValue;
68
+ refetchOnMount: TanStackQueryAgentSafeValue;
69
+ refetchOnReconnect: TanStackQueryAgentSafeValue;
70
+ refetchOnWindowFocus: TanStackQueryAgentSafeValue;
71
+ subscribed: TanStackQueryAgentSafeValue;
72
+ meta: TanStackQueryAgentSafeValue;
73
+ hasQueryFn: boolean;
74
+ hasSelect: boolean;
75
+ hasPlaceholderData: boolean;
76
+ hasInitialData: boolean;
77
+ };
78
+ export type TanStackQueryListQueriesResult = TanStackQueryCacheSummary & {
79
+ total: number;
80
+ items: TanStackQueryQuerySummary[];
81
+ page: TanStackQueryPage;
82
+ };
83
+ export type TanStackQueryGetQueryDetailsResult = {
84
+ summary: TanStackQueryCacheSummary;
85
+ query: TanStackQueryQuerySummary & {
86
+ data: TanStackQueryAgentSafeValue;
87
+ error: TanStackQueryAgentSafeValue;
88
+ observers: Array<{
89
+ queryHash: string;
90
+ options: TanStackQueryObserverOptionsSummary | null;
91
+ }>;
92
+ };
93
+ };
94
+ export type TanStackQueryActionResult = Awaited<ReturnType<typeof applyTanStackQueryDevtoolsAction>>;
95
+ export type TanStackQueryMutationSummary = {
96
+ mutationId: number;
97
+ mutationKey: TanStackQueryAgentSafeValue;
98
+ status: MutationStatus;
99
+ isPaused: boolean;
100
+ submittedAt: number;
101
+ failureCount: number;
102
+ hasData: boolean;
103
+ hasError: boolean;
104
+ };
105
+ export type TanStackQueryMutationOptionsSummary = {
106
+ mutationKey: TanStackQueryAgentSafeValue;
107
+ networkMode: TanStackQueryAgentSafeValue;
108
+ gcTime: TanStackQueryAgentSafeValue;
109
+ retry: TanStackQueryAgentSafeValue;
110
+ retryDelay: TanStackQueryAgentSafeValue;
111
+ meta: TanStackQueryAgentSafeValue;
112
+ scope: TanStackQueryAgentSafeValue;
113
+ hasMutationFn: boolean;
114
+ hasOnMutate: boolean;
115
+ hasOnSuccess: boolean;
116
+ hasOnError: boolean;
117
+ hasOnSettled: boolean;
118
+ };
119
+ export type TanStackQueryListMutationsResult = TanStackQueryCacheSummary & {
120
+ total: number;
121
+ items: TanStackQueryMutationSummary[];
122
+ page: TanStackQueryPage;
123
+ };
124
+ export type TanStackQueryGetMutationDetailsResult = {
125
+ summary: TanStackQueryCacheSummary;
126
+ mutation: TanStackQueryMutationSummary & {
127
+ variables: TanStackQueryAgentSafeValue;
128
+ data: TanStackQueryAgentSafeValue;
129
+ error: TanStackQueryAgentSafeValue;
130
+ context: TanStackQueryAgentSafeValue;
131
+ failureReason: TanStackQueryAgentSafeValue;
132
+ options: TanStackQueryMutationOptionsSummary;
133
+ };
134
+ };
135
+ export type TanStackQueryGetCacheSummaryArgs = undefined;
136
+ export type TanStackQueryGetCacheSummaryResult = TanStackQueryCacheSummary;
137
+ export type TanStackQueryGetOnlineStatusArgs = undefined;
138
+ export type TanStackQueryGetOnlineStatusResult = {
139
+ online: boolean;
140
+ };
141
+ export type TanStackQuerySetOnlineStatusArgs = TanStackQueryAgentOnlineStatusInput;
142
+ export type TanStackQuerySetOnlineStatusResult = {
143
+ online: boolean;
144
+ };
145
+ export type TanStackQueryListQueriesArgs = TanStackQueryAgentPaginationInput;
146
+ export type TanStackQueryGetQueryDetailsArgs = TanStackQueryAgentQueryHashInput;
147
+ export type TanStackQueryRefetchQueryArgs = TanStackQueryAgentQueryHashInput;
148
+ export type TanStackQuerySetQueryLoadingArgs = TanStackQueryAgentQueryToggleInput;
149
+ export type TanStackQuerySetQueryErrorArgs = TanStackQueryAgentQueryToggleInput;
150
+ export type TanStackQueryInvalidateQueryArgs = TanStackQueryAgentQueryHashInput;
151
+ export type TanStackQueryResetQueryArgs = TanStackQueryAgentQueryHashInput;
152
+ export type TanStackQueryRemoveQueryArgs = TanStackQueryAgentQueryHashInput;
153
+ export type TanStackQueryClearQueryCacheArgs = undefined;
154
+ export type TanStackQueryClearQueryCacheResult = TanStackQueryActionResult;
155
+ export type TanStackQueryListMutationsArgs = TanStackQueryAgentPaginationInput;
156
+ export type TanStackQueryGetMutationDetailsArgs = TanStackQueryAgentMutationIdInput;
157
+ export type TanStackQueryClearMutationCacheArgs = undefined;
158
+ export type TanStackQueryClearMutationCacheResult = TanStackQueryActionResult;
159
+ export declare const tanstackQueryToolDefinitions: {
160
+ readonly getCacheSummary: AgentToolContract<undefined, TanStackQueryCacheSummary>;
161
+ readonly getOnlineStatus: AgentToolContract<undefined, TanStackQueryGetOnlineStatusResult>;
162
+ readonly setOnlineStatus: AgentToolContract<TanStackQueryAgentOnlineStatusInput, TanStackQuerySetOnlineStatusResult>;
163
+ readonly listQueries: AgentToolContract<TanStackQueryAgentPaginationInput, TanStackQueryListQueriesResult>;
164
+ readonly getQueryDetails: AgentToolContract<TanStackQueryAgentQueryHashInput, TanStackQueryGetQueryDetailsResult>;
165
+ readonly refetchQuery: AgentToolContract<TanStackQueryAgentQueryHashInput, {
166
+ applied: boolean;
167
+ action: "CLEAR_QUERY_CACHE";
168
+ cleared: boolean;
169
+ queryCountBefore: number;
170
+ queryCountAfter: number;
171
+ mutationCountBefore?: undefined;
172
+ mutationCountAfter?: undefined;
173
+ queryHash?: undefined;
174
+ } | {
175
+ applied: boolean;
176
+ action: "CLEAR_MUTATION_CACHE";
177
+ cleared: boolean;
178
+ mutationCountBefore: number;
179
+ mutationCountAfter: number;
180
+ queryCountBefore?: undefined;
181
+ queryCountAfter?: undefined;
182
+ queryHash?: undefined;
183
+ } | {
184
+ applied: boolean;
185
+ action: "SET_QUERY_DATA";
186
+ queryHash: string;
187
+ cleared?: undefined;
188
+ queryCountBefore?: undefined;
189
+ queryCountAfter?: undefined;
190
+ mutationCountBefore?: undefined;
191
+ mutationCountAfter?: undefined;
192
+ } | {
193
+ applied: boolean;
194
+ action: "TRIGGER_ERROR";
195
+ queryHash: string;
196
+ cleared?: undefined;
197
+ queryCountBefore?: undefined;
198
+ queryCountAfter?: undefined;
199
+ mutationCountBefore?: undefined;
200
+ mutationCountAfter?: undefined;
201
+ } | {
202
+ applied: boolean;
203
+ action: "RESTORE_ERROR";
204
+ queryHash: string;
205
+ cleared?: undefined;
206
+ queryCountBefore?: undefined;
207
+ queryCountAfter?: undefined;
208
+ mutationCountBefore?: undefined;
209
+ mutationCountAfter?: undefined;
210
+ } | {
211
+ applied: boolean;
212
+ action: "TRIGGER_LOADING";
213
+ queryHash: string;
214
+ cleared?: undefined;
215
+ queryCountBefore?: undefined;
216
+ queryCountAfter?: undefined;
217
+ mutationCountBefore?: undefined;
218
+ mutationCountAfter?: undefined;
219
+ } | {
220
+ applied: boolean;
221
+ action: "RESTORE_LOADING";
222
+ queryHash: string;
223
+ cleared?: undefined;
224
+ queryCountBefore?: undefined;
225
+ queryCountAfter?: undefined;
226
+ mutationCountBefore?: undefined;
227
+ mutationCountAfter?: undefined;
228
+ } | {
229
+ applied: boolean;
230
+ action: "RESET";
231
+ queryHash: string;
232
+ cleared?: undefined;
233
+ queryCountBefore?: undefined;
234
+ queryCountAfter?: undefined;
235
+ mutationCountBefore?: undefined;
236
+ mutationCountAfter?: undefined;
237
+ } | {
238
+ applied: boolean;
239
+ action: "REMOVE";
240
+ queryHash: string;
241
+ cleared?: undefined;
242
+ queryCountBefore?: undefined;
243
+ queryCountAfter?: undefined;
244
+ mutationCountBefore?: undefined;
245
+ mutationCountAfter?: undefined;
246
+ } | {
247
+ applied: boolean;
248
+ action: "REFETCH";
249
+ queryHash: string;
250
+ cleared?: undefined;
251
+ queryCountBefore?: undefined;
252
+ queryCountAfter?: undefined;
253
+ mutationCountBefore?: undefined;
254
+ mutationCountAfter?: undefined;
255
+ } | {
256
+ applied: boolean;
257
+ action: "INVALIDATE";
258
+ queryHash: string;
259
+ cleared?: undefined;
260
+ queryCountBefore?: undefined;
261
+ queryCountAfter?: undefined;
262
+ mutationCountBefore?: undefined;
263
+ mutationCountAfter?: undefined;
264
+ }>;
265
+ readonly setQueryLoading: AgentToolContract<TanStackQueryAgentQueryToggleInput, {
266
+ applied: boolean;
267
+ action: "CLEAR_QUERY_CACHE";
268
+ cleared: boolean;
269
+ queryCountBefore: number;
270
+ queryCountAfter: number;
271
+ mutationCountBefore?: undefined;
272
+ mutationCountAfter?: undefined;
273
+ queryHash?: undefined;
274
+ } | {
275
+ applied: boolean;
276
+ action: "CLEAR_MUTATION_CACHE";
277
+ cleared: boolean;
278
+ mutationCountBefore: number;
279
+ mutationCountAfter: number;
280
+ queryCountBefore?: undefined;
281
+ queryCountAfter?: undefined;
282
+ queryHash?: undefined;
283
+ } | {
284
+ applied: boolean;
285
+ action: "SET_QUERY_DATA";
286
+ queryHash: string;
287
+ cleared?: undefined;
288
+ queryCountBefore?: undefined;
289
+ queryCountAfter?: undefined;
290
+ mutationCountBefore?: undefined;
291
+ mutationCountAfter?: undefined;
292
+ } | {
293
+ applied: boolean;
294
+ action: "TRIGGER_ERROR";
295
+ queryHash: string;
296
+ cleared?: undefined;
297
+ queryCountBefore?: undefined;
298
+ queryCountAfter?: undefined;
299
+ mutationCountBefore?: undefined;
300
+ mutationCountAfter?: undefined;
301
+ } | {
302
+ applied: boolean;
303
+ action: "RESTORE_ERROR";
304
+ queryHash: string;
305
+ cleared?: undefined;
306
+ queryCountBefore?: undefined;
307
+ queryCountAfter?: undefined;
308
+ mutationCountBefore?: undefined;
309
+ mutationCountAfter?: undefined;
310
+ } | {
311
+ applied: boolean;
312
+ action: "TRIGGER_LOADING";
313
+ queryHash: string;
314
+ cleared?: undefined;
315
+ queryCountBefore?: undefined;
316
+ queryCountAfter?: undefined;
317
+ mutationCountBefore?: undefined;
318
+ mutationCountAfter?: undefined;
319
+ } | {
320
+ applied: boolean;
321
+ action: "RESTORE_LOADING";
322
+ queryHash: string;
323
+ cleared?: undefined;
324
+ queryCountBefore?: undefined;
325
+ queryCountAfter?: undefined;
326
+ mutationCountBefore?: undefined;
327
+ mutationCountAfter?: undefined;
328
+ } | {
329
+ applied: boolean;
330
+ action: "RESET";
331
+ queryHash: string;
332
+ cleared?: undefined;
333
+ queryCountBefore?: undefined;
334
+ queryCountAfter?: undefined;
335
+ mutationCountBefore?: undefined;
336
+ mutationCountAfter?: undefined;
337
+ } | {
338
+ applied: boolean;
339
+ action: "REMOVE";
340
+ queryHash: string;
341
+ cleared?: undefined;
342
+ queryCountBefore?: undefined;
343
+ queryCountAfter?: undefined;
344
+ mutationCountBefore?: undefined;
345
+ mutationCountAfter?: undefined;
346
+ } | {
347
+ applied: boolean;
348
+ action: "REFETCH";
349
+ queryHash: string;
350
+ cleared?: undefined;
351
+ queryCountBefore?: undefined;
352
+ queryCountAfter?: undefined;
353
+ mutationCountBefore?: undefined;
354
+ mutationCountAfter?: undefined;
355
+ } | {
356
+ applied: boolean;
357
+ action: "INVALIDATE";
358
+ queryHash: string;
359
+ cleared?: undefined;
360
+ queryCountBefore?: undefined;
361
+ queryCountAfter?: undefined;
362
+ mutationCountBefore?: undefined;
363
+ mutationCountAfter?: undefined;
364
+ }>;
365
+ readonly setQueryError: AgentToolContract<TanStackQueryAgentQueryToggleInput, {
366
+ applied: boolean;
367
+ action: "CLEAR_QUERY_CACHE";
368
+ cleared: boolean;
369
+ queryCountBefore: number;
370
+ queryCountAfter: number;
371
+ mutationCountBefore?: undefined;
372
+ mutationCountAfter?: undefined;
373
+ queryHash?: undefined;
374
+ } | {
375
+ applied: boolean;
376
+ action: "CLEAR_MUTATION_CACHE";
377
+ cleared: boolean;
378
+ mutationCountBefore: number;
379
+ mutationCountAfter: number;
380
+ queryCountBefore?: undefined;
381
+ queryCountAfter?: undefined;
382
+ queryHash?: undefined;
383
+ } | {
384
+ applied: boolean;
385
+ action: "SET_QUERY_DATA";
386
+ queryHash: string;
387
+ cleared?: undefined;
388
+ queryCountBefore?: undefined;
389
+ queryCountAfter?: undefined;
390
+ mutationCountBefore?: undefined;
391
+ mutationCountAfter?: undefined;
392
+ } | {
393
+ applied: boolean;
394
+ action: "TRIGGER_ERROR";
395
+ queryHash: string;
396
+ cleared?: undefined;
397
+ queryCountBefore?: undefined;
398
+ queryCountAfter?: undefined;
399
+ mutationCountBefore?: undefined;
400
+ mutationCountAfter?: undefined;
401
+ } | {
402
+ applied: boolean;
403
+ action: "RESTORE_ERROR";
404
+ queryHash: string;
405
+ cleared?: undefined;
406
+ queryCountBefore?: undefined;
407
+ queryCountAfter?: undefined;
408
+ mutationCountBefore?: undefined;
409
+ mutationCountAfter?: undefined;
410
+ } | {
411
+ applied: boolean;
412
+ action: "TRIGGER_LOADING";
413
+ queryHash: string;
414
+ cleared?: undefined;
415
+ queryCountBefore?: undefined;
416
+ queryCountAfter?: undefined;
417
+ mutationCountBefore?: undefined;
418
+ mutationCountAfter?: undefined;
419
+ } | {
420
+ applied: boolean;
421
+ action: "RESTORE_LOADING";
422
+ queryHash: string;
423
+ cleared?: undefined;
424
+ queryCountBefore?: undefined;
425
+ queryCountAfter?: undefined;
426
+ mutationCountBefore?: undefined;
427
+ mutationCountAfter?: undefined;
428
+ } | {
429
+ applied: boolean;
430
+ action: "RESET";
431
+ queryHash: string;
432
+ cleared?: undefined;
433
+ queryCountBefore?: undefined;
434
+ queryCountAfter?: undefined;
435
+ mutationCountBefore?: undefined;
436
+ mutationCountAfter?: undefined;
437
+ } | {
438
+ applied: boolean;
439
+ action: "REMOVE";
440
+ queryHash: string;
441
+ cleared?: undefined;
442
+ queryCountBefore?: undefined;
443
+ queryCountAfter?: undefined;
444
+ mutationCountBefore?: undefined;
445
+ mutationCountAfter?: undefined;
446
+ } | {
447
+ applied: boolean;
448
+ action: "REFETCH";
449
+ queryHash: string;
450
+ cleared?: undefined;
451
+ queryCountBefore?: undefined;
452
+ queryCountAfter?: undefined;
453
+ mutationCountBefore?: undefined;
454
+ mutationCountAfter?: undefined;
455
+ } | {
456
+ applied: boolean;
457
+ action: "INVALIDATE";
458
+ queryHash: string;
459
+ cleared?: undefined;
460
+ queryCountBefore?: undefined;
461
+ queryCountAfter?: undefined;
462
+ mutationCountBefore?: undefined;
463
+ mutationCountAfter?: undefined;
464
+ }>;
465
+ readonly invalidateQuery: AgentToolContract<TanStackQueryAgentQueryHashInput, {
466
+ applied: boolean;
467
+ action: "CLEAR_QUERY_CACHE";
468
+ cleared: boolean;
469
+ queryCountBefore: number;
470
+ queryCountAfter: number;
471
+ mutationCountBefore?: undefined;
472
+ mutationCountAfter?: undefined;
473
+ queryHash?: undefined;
474
+ } | {
475
+ applied: boolean;
476
+ action: "CLEAR_MUTATION_CACHE";
477
+ cleared: boolean;
478
+ mutationCountBefore: number;
479
+ mutationCountAfter: number;
480
+ queryCountBefore?: undefined;
481
+ queryCountAfter?: undefined;
482
+ queryHash?: undefined;
483
+ } | {
484
+ applied: boolean;
485
+ action: "SET_QUERY_DATA";
486
+ queryHash: string;
487
+ cleared?: undefined;
488
+ queryCountBefore?: undefined;
489
+ queryCountAfter?: undefined;
490
+ mutationCountBefore?: undefined;
491
+ mutationCountAfter?: undefined;
492
+ } | {
493
+ applied: boolean;
494
+ action: "TRIGGER_ERROR";
495
+ queryHash: string;
496
+ cleared?: undefined;
497
+ queryCountBefore?: undefined;
498
+ queryCountAfter?: undefined;
499
+ mutationCountBefore?: undefined;
500
+ mutationCountAfter?: undefined;
501
+ } | {
502
+ applied: boolean;
503
+ action: "RESTORE_ERROR";
504
+ queryHash: string;
505
+ cleared?: undefined;
506
+ queryCountBefore?: undefined;
507
+ queryCountAfter?: undefined;
508
+ mutationCountBefore?: undefined;
509
+ mutationCountAfter?: undefined;
510
+ } | {
511
+ applied: boolean;
512
+ action: "TRIGGER_LOADING";
513
+ queryHash: string;
514
+ cleared?: undefined;
515
+ queryCountBefore?: undefined;
516
+ queryCountAfter?: undefined;
517
+ mutationCountBefore?: undefined;
518
+ mutationCountAfter?: undefined;
519
+ } | {
520
+ applied: boolean;
521
+ action: "RESTORE_LOADING";
522
+ queryHash: string;
523
+ cleared?: undefined;
524
+ queryCountBefore?: undefined;
525
+ queryCountAfter?: undefined;
526
+ mutationCountBefore?: undefined;
527
+ mutationCountAfter?: undefined;
528
+ } | {
529
+ applied: boolean;
530
+ action: "RESET";
531
+ queryHash: string;
532
+ cleared?: undefined;
533
+ queryCountBefore?: undefined;
534
+ queryCountAfter?: undefined;
535
+ mutationCountBefore?: undefined;
536
+ mutationCountAfter?: undefined;
537
+ } | {
538
+ applied: boolean;
539
+ action: "REMOVE";
540
+ queryHash: string;
541
+ cleared?: undefined;
542
+ queryCountBefore?: undefined;
543
+ queryCountAfter?: undefined;
544
+ mutationCountBefore?: undefined;
545
+ mutationCountAfter?: undefined;
546
+ } | {
547
+ applied: boolean;
548
+ action: "REFETCH";
549
+ queryHash: string;
550
+ cleared?: undefined;
551
+ queryCountBefore?: undefined;
552
+ queryCountAfter?: undefined;
553
+ mutationCountBefore?: undefined;
554
+ mutationCountAfter?: undefined;
555
+ } | {
556
+ applied: boolean;
557
+ action: "INVALIDATE";
558
+ queryHash: string;
559
+ cleared?: undefined;
560
+ queryCountBefore?: undefined;
561
+ queryCountAfter?: undefined;
562
+ mutationCountBefore?: undefined;
563
+ mutationCountAfter?: undefined;
564
+ }>;
565
+ readonly resetQuery: AgentToolContract<TanStackQueryAgentQueryHashInput, {
566
+ applied: boolean;
567
+ action: "CLEAR_QUERY_CACHE";
568
+ cleared: boolean;
569
+ queryCountBefore: number;
570
+ queryCountAfter: number;
571
+ mutationCountBefore?: undefined;
572
+ mutationCountAfter?: undefined;
573
+ queryHash?: undefined;
574
+ } | {
575
+ applied: boolean;
576
+ action: "CLEAR_MUTATION_CACHE";
577
+ cleared: boolean;
578
+ mutationCountBefore: number;
579
+ mutationCountAfter: number;
580
+ queryCountBefore?: undefined;
581
+ queryCountAfter?: undefined;
582
+ queryHash?: undefined;
583
+ } | {
584
+ applied: boolean;
585
+ action: "SET_QUERY_DATA";
586
+ queryHash: string;
587
+ cleared?: undefined;
588
+ queryCountBefore?: undefined;
589
+ queryCountAfter?: undefined;
590
+ mutationCountBefore?: undefined;
591
+ mutationCountAfter?: undefined;
592
+ } | {
593
+ applied: boolean;
594
+ action: "TRIGGER_ERROR";
595
+ queryHash: string;
596
+ cleared?: undefined;
597
+ queryCountBefore?: undefined;
598
+ queryCountAfter?: undefined;
599
+ mutationCountBefore?: undefined;
600
+ mutationCountAfter?: undefined;
601
+ } | {
602
+ applied: boolean;
603
+ action: "RESTORE_ERROR";
604
+ queryHash: string;
605
+ cleared?: undefined;
606
+ queryCountBefore?: undefined;
607
+ queryCountAfter?: undefined;
608
+ mutationCountBefore?: undefined;
609
+ mutationCountAfter?: undefined;
610
+ } | {
611
+ applied: boolean;
612
+ action: "TRIGGER_LOADING";
613
+ queryHash: string;
614
+ cleared?: undefined;
615
+ queryCountBefore?: undefined;
616
+ queryCountAfter?: undefined;
617
+ mutationCountBefore?: undefined;
618
+ mutationCountAfter?: undefined;
619
+ } | {
620
+ applied: boolean;
621
+ action: "RESTORE_LOADING";
622
+ queryHash: string;
623
+ cleared?: undefined;
624
+ queryCountBefore?: undefined;
625
+ queryCountAfter?: undefined;
626
+ mutationCountBefore?: undefined;
627
+ mutationCountAfter?: undefined;
628
+ } | {
629
+ applied: boolean;
630
+ action: "RESET";
631
+ queryHash: string;
632
+ cleared?: undefined;
633
+ queryCountBefore?: undefined;
634
+ queryCountAfter?: undefined;
635
+ mutationCountBefore?: undefined;
636
+ mutationCountAfter?: undefined;
637
+ } | {
638
+ applied: boolean;
639
+ action: "REMOVE";
640
+ queryHash: string;
641
+ cleared?: undefined;
642
+ queryCountBefore?: undefined;
643
+ queryCountAfter?: undefined;
644
+ mutationCountBefore?: undefined;
645
+ mutationCountAfter?: undefined;
646
+ } | {
647
+ applied: boolean;
648
+ action: "REFETCH";
649
+ queryHash: string;
650
+ cleared?: undefined;
651
+ queryCountBefore?: undefined;
652
+ queryCountAfter?: undefined;
653
+ mutationCountBefore?: undefined;
654
+ mutationCountAfter?: undefined;
655
+ } | {
656
+ applied: boolean;
657
+ action: "INVALIDATE";
658
+ queryHash: string;
659
+ cleared?: undefined;
660
+ queryCountBefore?: undefined;
661
+ queryCountAfter?: undefined;
662
+ mutationCountBefore?: undefined;
663
+ mutationCountAfter?: undefined;
664
+ }>;
665
+ readonly removeQuery: AgentToolContract<TanStackQueryAgentQueryHashInput, {
666
+ applied: boolean;
667
+ action: "CLEAR_QUERY_CACHE";
668
+ cleared: boolean;
669
+ queryCountBefore: number;
670
+ queryCountAfter: number;
671
+ mutationCountBefore?: undefined;
672
+ mutationCountAfter?: undefined;
673
+ queryHash?: undefined;
674
+ } | {
675
+ applied: boolean;
676
+ action: "CLEAR_MUTATION_CACHE";
677
+ cleared: boolean;
678
+ mutationCountBefore: number;
679
+ mutationCountAfter: number;
680
+ queryCountBefore?: undefined;
681
+ queryCountAfter?: undefined;
682
+ queryHash?: undefined;
683
+ } | {
684
+ applied: boolean;
685
+ action: "SET_QUERY_DATA";
686
+ queryHash: string;
687
+ cleared?: undefined;
688
+ queryCountBefore?: undefined;
689
+ queryCountAfter?: undefined;
690
+ mutationCountBefore?: undefined;
691
+ mutationCountAfter?: undefined;
692
+ } | {
693
+ applied: boolean;
694
+ action: "TRIGGER_ERROR";
695
+ queryHash: string;
696
+ cleared?: undefined;
697
+ queryCountBefore?: undefined;
698
+ queryCountAfter?: undefined;
699
+ mutationCountBefore?: undefined;
700
+ mutationCountAfter?: undefined;
701
+ } | {
702
+ applied: boolean;
703
+ action: "RESTORE_ERROR";
704
+ queryHash: string;
705
+ cleared?: undefined;
706
+ queryCountBefore?: undefined;
707
+ queryCountAfter?: undefined;
708
+ mutationCountBefore?: undefined;
709
+ mutationCountAfter?: undefined;
710
+ } | {
711
+ applied: boolean;
712
+ action: "TRIGGER_LOADING";
713
+ queryHash: string;
714
+ cleared?: undefined;
715
+ queryCountBefore?: undefined;
716
+ queryCountAfter?: undefined;
717
+ mutationCountBefore?: undefined;
718
+ mutationCountAfter?: undefined;
719
+ } | {
720
+ applied: boolean;
721
+ action: "RESTORE_LOADING";
722
+ queryHash: string;
723
+ cleared?: undefined;
724
+ queryCountBefore?: undefined;
725
+ queryCountAfter?: undefined;
726
+ mutationCountBefore?: undefined;
727
+ mutationCountAfter?: undefined;
728
+ } | {
729
+ applied: boolean;
730
+ action: "RESET";
731
+ queryHash: string;
732
+ cleared?: undefined;
733
+ queryCountBefore?: undefined;
734
+ queryCountAfter?: undefined;
735
+ mutationCountBefore?: undefined;
736
+ mutationCountAfter?: undefined;
737
+ } | {
738
+ applied: boolean;
739
+ action: "REMOVE";
740
+ queryHash: string;
741
+ cleared?: undefined;
742
+ queryCountBefore?: undefined;
743
+ queryCountAfter?: undefined;
744
+ mutationCountBefore?: undefined;
745
+ mutationCountAfter?: undefined;
746
+ } | {
747
+ applied: boolean;
748
+ action: "REFETCH";
749
+ queryHash: string;
750
+ cleared?: undefined;
751
+ queryCountBefore?: undefined;
752
+ queryCountAfter?: undefined;
753
+ mutationCountBefore?: undefined;
754
+ mutationCountAfter?: undefined;
755
+ } | {
756
+ applied: boolean;
757
+ action: "INVALIDATE";
758
+ queryHash: string;
759
+ cleared?: undefined;
760
+ queryCountBefore?: undefined;
761
+ queryCountAfter?: undefined;
762
+ mutationCountBefore?: undefined;
763
+ mutationCountAfter?: undefined;
764
+ }>;
765
+ readonly clearQueryCache: AgentToolContract<undefined, {
766
+ applied: boolean;
767
+ action: "CLEAR_QUERY_CACHE";
768
+ cleared: boolean;
769
+ queryCountBefore: number;
770
+ queryCountAfter: number;
771
+ mutationCountBefore?: undefined;
772
+ mutationCountAfter?: undefined;
773
+ queryHash?: undefined;
774
+ } | {
775
+ applied: boolean;
776
+ action: "CLEAR_MUTATION_CACHE";
777
+ cleared: boolean;
778
+ mutationCountBefore: number;
779
+ mutationCountAfter: number;
780
+ queryCountBefore?: undefined;
781
+ queryCountAfter?: undefined;
782
+ queryHash?: undefined;
783
+ } | {
784
+ applied: boolean;
785
+ action: "SET_QUERY_DATA";
786
+ queryHash: string;
787
+ cleared?: undefined;
788
+ queryCountBefore?: undefined;
789
+ queryCountAfter?: undefined;
790
+ mutationCountBefore?: undefined;
791
+ mutationCountAfter?: undefined;
792
+ } | {
793
+ applied: boolean;
794
+ action: "TRIGGER_ERROR";
795
+ queryHash: string;
796
+ cleared?: undefined;
797
+ queryCountBefore?: undefined;
798
+ queryCountAfter?: undefined;
799
+ mutationCountBefore?: undefined;
800
+ mutationCountAfter?: undefined;
801
+ } | {
802
+ applied: boolean;
803
+ action: "RESTORE_ERROR";
804
+ queryHash: string;
805
+ cleared?: undefined;
806
+ queryCountBefore?: undefined;
807
+ queryCountAfter?: undefined;
808
+ mutationCountBefore?: undefined;
809
+ mutationCountAfter?: undefined;
810
+ } | {
811
+ applied: boolean;
812
+ action: "TRIGGER_LOADING";
813
+ queryHash: string;
814
+ cleared?: undefined;
815
+ queryCountBefore?: undefined;
816
+ queryCountAfter?: undefined;
817
+ mutationCountBefore?: undefined;
818
+ mutationCountAfter?: undefined;
819
+ } | {
820
+ applied: boolean;
821
+ action: "RESTORE_LOADING";
822
+ queryHash: string;
823
+ cleared?: undefined;
824
+ queryCountBefore?: undefined;
825
+ queryCountAfter?: undefined;
826
+ mutationCountBefore?: undefined;
827
+ mutationCountAfter?: undefined;
828
+ } | {
829
+ applied: boolean;
830
+ action: "RESET";
831
+ queryHash: string;
832
+ cleared?: undefined;
833
+ queryCountBefore?: undefined;
834
+ queryCountAfter?: undefined;
835
+ mutationCountBefore?: undefined;
836
+ mutationCountAfter?: undefined;
837
+ } | {
838
+ applied: boolean;
839
+ action: "REMOVE";
840
+ queryHash: string;
841
+ cleared?: undefined;
842
+ queryCountBefore?: undefined;
843
+ queryCountAfter?: undefined;
844
+ mutationCountBefore?: undefined;
845
+ mutationCountAfter?: undefined;
846
+ } | {
847
+ applied: boolean;
848
+ action: "REFETCH";
849
+ queryHash: string;
850
+ cleared?: undefined;
851
+ queryCountBefore?: undefined;
852
+ queryCountAfter?: undefined;
853
+ mutationCountBefore?: undefined;
854
+ mutationCountAfter?: undefined;
855
+ } | {
856
+ applied: boolean;
857
+ action: "INVALIDATE";
858
+ queryHash: string;
859
+ cleared?: undefined;
860
+ queryCountBefore?: undefined;
861
+ queryCountAfter?: undefined;
862
+ mutationCountBefore?: undefined;
863
+ mutationCountAfter?: undefined;
864
+ }>;
865
+ readonly listMutations: AgentToolContract<TanStackQueryAgentPaginationInput, TanStackQueryListMutationsResult>;
866
+ readonly getMutationDetails: AgentToolContract<TanStackQueryAgentMutationIdInput, TanStackQueryGetMutationDetailsResult>;
867
+ readonly clearMutationCache: AgentToolContract<undefined, {
868
+ applied: boolean;
869
+ action: "CLEAR_QUERY_CACHE";
870
+ cleared: boolean;
871
+ queryCountBefore: number;
872
+ queryCountAfter: number;
873
+ mutationCountBefore?: undefined;
874
+ mutationCountAfter?: undefined;
875
+ queryHash?: undefined;
876
+ } | {
877
+ applied: boolean;
878
+ action: "CLEAR_MUTATION_CACHE";
879
+ cleared: boolean;
880
+ mutationCountBefore: number;
881
+ mutationCountAfter: number;
882
+ queryCountBefore?: undefined;
883
+ queryCountAfter?: undefined;
884
+ queryHash?: undefined;
885
+ } | {
886
+ applied: boolean;
887
+ action: "SET_QUERY_DATA";
888
+ queryHash: string;
889
+ cleared?: undefined;
890
+ queryCountBefore?: undefined;
891
+ queryCountAfter?: undefined;
892
+ mutationCountBefore?: undefined;
893
+ mutationCountAfter?: undefined;
894
+ } | {
895
+ applied: boolean;
896
+ action: "TRIGGER_ERROR";
897
+ queryHash: string;
898
+ cleared?: undefined;
899
+ queryCountBefore?: undefined;
900
+ queryCountAfter?: undefined;
901
+ mutationCountBefore?: undefined;
902
+ mutationCountAfter?: undefined;
903
+ } | {
904
+ applied: boolean;
905
+ action: "RESTORE_ERROR";
906
+ queryHash: string;
907
+ cleared?: undefined;
908
+ queryCountBefore?: undefined;
909
+ queryCountAfter?: undefined;
910
+ mutationCountBefore?: undefined;
911
+ mutationCountAfter?: undefined;
912
+ } | {
913
+ applied: boolean;
914
+ action: "TRIGGER_LOADING";
915
+ queryHash: string;
916
+ cleared?: undefined;
917
+ queryCountBefore?: undefined;
918
+ queryCountAfter?: undefined;
919
+ mutationCountBefore?: undefined;
920
+ mutationCountAfter?: undefined;
921
+ } | {
922
+ applied: boolean;
923
+ action: "RESTORE_LOADING";
924
+ queryHash: string;
925
+ cleared?: undefined;
926
+ queryCountBefore?: undefined;
927
+ queryCountAfter?: undefined;
928
+ mutationCountBefore?: undefined;
929
+ mutationCountAfter?: undefined;
930
+ } | {
931
+ applied: boolean;
932
+ action: "RESET";
933
+ queryHash: string;
934
+ cleared?: undefined;
935
+ queryCountBefore?: undefined;
936
+ queryCountAfter?: undefined;
937
+ mutationCountBefore?: undefined;
938
+ mutationCountAfter?: undefined;
939
+ } | {
940
+ applied: boolean;
941
+ action: "REMOVE";
942
+ queryHash: string;
943
+ cleared?: undefined;
944
+ queryCountBefore?: undefined;
945
+ queryCountAfter?: undefined;
946
+ mutationCountBefore?: undefined;
947
+ mutationCountAfter?: undefined;
948
+ } | {
949
+ applied: boolean;
950
+ action: "REFETCH";
951
+ queryHash: string;
952
+ cleared?: undefined;
953
+ queryCountBefore?: undefined;
954
+ queryCountAfter?: undefined;
955
+ mutationCountBefore?: undefined;
956
+ mutationCountAfter?: undefined;
957
+ } | {
958
+ applied: boolean;
959
+ action: "INVALIDATE";
960
+ queryHash: string;
961
+ cleared?: undefined;
962
+ queryCountBefore?: undefined;
963
+ queryCountAfter?: undefined;
964
+ mutationCountBefore?: undefined;
965
+ mutationCountAfter?: undefined;
966
+ }>;
967
+ };