@tonyclaw/agent-inspector 2.0.18 → 2.0.20

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 (73) hide show
  1. package/.output/cli.js +137 -8
  2. package/.output/nitro.json +1 -1
  3. package/.output/public/assets/{CompareDrawer-CepU-dLW.js → CompareDrawer-CUqYtaH3.js} +1 -1
  4. package/.output/public/assets/ProxyViewerContainer-CX0-R0nn.js +114 -0
  5. package/.output/public/assets/ReplayDialog-CPXNEqVg.js +1 -0
  6. package/.output/public/assets/{RequestAnatomy-C_C6ZU3T.js → RequestAnatomy-qkj8QgkY.js} +1 -1
  7. package/.output/public/assets/ResponseView-BPNLZpuw.js +1 -0
  8. package/.output/public/assets/StreamingChunkSequence-DGs-YFXI.js +1 -0
  9. package/.output/public/assets/_sessionId-CXtbrFTj.js +1 -0
  10. package/.output/public/assets/index-DrppF281.js +1 -0
  11. package/.output/public/assets/index-DynnYt7S.css +1 -0
  12. package/.output/public/assets/{main-BRXsrxtv.js → main-j3vS8rmP.js} +2 -2
  13. package/.output/server/_libs/lucide-react.mjs +141 -118
  14. package/.output/server/_libs/tanstack__react-virtual.mjs +13 -2
  15. package/.output/server/_libs/tanstack__virtual-core.mjs +24 -1
  16. package/.output/server/{_sessionId-B8Bbfs-v.mjs → _sessionId-Bc5Nohhe.mjs} +3 -2
  17. package/.output/server/_ssr/{CompareDrawer-TgGZLf1J.mjs → CompareDrawer-D0UewydM.mjs} +4 -3
  18. package/.output/server/_ssr/{ProxyViewerContainer-B_ppaNmQ.mjs → ProxyViewerContainer-BEUWt2eX.mjs} +351 -76
  19. package/.output/server/_ssr/{ReplayDialog-BXlajnMC.mjs → ReplayDialog-zaN-xMOw.mjs} +199 -17
  20. package/.output/server/_ssr/{RequestAnatomy-CCrx09-i.mjs → RequestAnatomy-BMomYged.mjs} +4 -3
  21. package/.output/server/_ssr/{ResponseView-BxtMJrov.mjs → ResponseView-DSoHCyAM.mjs} +4 -3
  22. package/.output/server/_ssr/{StreamingChunkSequence-BlpdSPb8.mjs → StreamingChunkSequence-pt3pZOOL.mjs} +4 -3
  23. package/.output/server/_ssr/{index-BeTMNSJy.mjs → index-BCTKxcgV.mjs} +3 -2
  24. package/.output/server/_ssr/index.mjs +2 -2
  25. package/.output/server/_ssr/{router-Ddl1tuU7.mjs → router-DpaDa5q5.mjs} +872 -232
  26. package/.output/server/{_tanstack-start-manifest_v-Bvdz_U0f.mjs → _tanstack-start-manifest_v-EsubwO0A.mjs} +1 -1
  27. package/.output/server/index.mjs +51 -51
  28. package/README.md +11 -109
  29. package/package.json +2 -1
  30. package/src/cli/doctor.ts +150 -5
  31. package/src/components/OnboardingBanner.tsx +13 -13
  32. package/src/components/ProxyViewer.tsx +55 -38
  33. package/src/components/ProxyViewerContainer.tsx +5 -0
  34. package/src/components/providers/SettingsDialog.tsx +113 -2
  35. package/src/components/proxy-viewer/ConversationGroup.tsx +20 -3
  36. package/src/components/proxy-viewer/ConversationGroupList.tsx +144 -0
  37. package/src/components/proxy-viewer/ConversationHeader.tsx +0 -2
  38. package/src/components/proxy-viewer/ReplayDialog.tsx +200 -13
  39. package/src/components/proxy-viewer/index.ts +1 -1
  40. package/src/components/ui/scroll-area.tsx +2 -2
  41. package/src/knowledge/openclawClient.ts +0 -8
  42. package/src/knowledge/types.ts +0 -2
  43. package/src/lib/export-logs.ts +72 -5
  44. package/src/lib/providerTestContract.ts +0 -1
  45. package/src/lib/useProviders.ts +1 -1
  46. package/src/mcp/server.ts +14 -6
  47. package/src/mcp/toolHandlers.ts +21 -4
  48. package/src/proxy/chunkStorage.ts +2 -4
  49. package/src/proxy/dataDir.ts +3 -3
  50. package/src/proxy/formats/anthropic/index.ts +0 -1
  51. package/src/proxy/formats/anthropic/schemas.ts +0 -2
  52. package/src/proxy/handler.ts +41 -29
  53. package/src/proxy/logFinalizer.ts +93 -11
  54. package/src/proxy/logger.ts +35 -10
  55. package/src/proxy/providers.ts +12 -5
  56. package/src/proxy/rawStreamCapture.ts +85 -0
  57. package/src/proxy/schemas.ts +1 -51
  58. package/src/proxy/sessionRuntime.ts +0 -9
  59. package/src/proxy/socketTracker.ts +15 -8
  60. package/src/proxy/store.ts +414 -13
  61. package/src/routes/api/logs.$id.replay.ts +66 -1
  62. package/src/routes/api/logs.stream.ts +11 -3
  63. package/src/routes/api/logs.ts +51 -17
  64. package/src/routes/api/providers.$providerId.ts +10 -3
  65. package/src/routes/api/providers.ts +6 -3
  66. package/.output/public/assets/ProxyViewerContainer-BG7rc33d.js +0 -114
  67. package/.output/public/assets/ReplayDialog-DK6SPv8X.js +0 -1
  68. package/.output/public/assets/ResponseView-Bqpra4Zw.js +0 -1
  69. package/.output/public/assets/StreamingChunkSequence-CdPbpprq.js +0 -1
  70. package/.output/public/assets/_sessionId-CsNARHj5.js +0 -1
  71. package/.output/public/assets/index-37NfO0zx.js +0 -1
  72. package/.output/public/assets/index-D_nZj9Vt.css +0 -1
  73. package/src/components/ui/json-expansion-button.tsx +0 -56
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports } from "./react.mjs";
2
2
  import { r as reactDomExports } from "./react-dom.mjs";
3
- import { V as Virtualizer, e as elementScroll, o as observeElementOffset, a as observeElementRect } from "./tanstack__virtual-core.mjs";
3
+ import { V as Virtualizer, e as elementScroll, o as observeElementOffset, a as observeElementRect, w as windowScroll, b as observeWindowOffset, c as observeWindowRect } from "./tanstack__virtual-core.mjs";
4
4
  const useIsomorphicLayoutEffect = typeof document !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
5
5
  function useVirtualizerBase({
6
6
  useFlushSync = true,
@@ -39,6 +39,17 @@ function useVirtualizer(options) {
39
39
  ...options
40
40
  });
41
41
  }
42
+ function useWindowVirtualizer(options) {
43
+ return useVirtualizerBase({
44
+ getScrollElement: () => typeof document !== "undefined" ? window : null,
45
+ observeElementRect: observeWindowRect,
46
+ observeElementOffset: observeWindowOffset,
47
+ scrollToFn: windowScroll,
48
+ initialOffset: () => typeof document !== "undefined" ? window.scrollY : 0,
49
+ ...options
50
+ });
51
+ }
42
52
  export {
43
- useVirtualizer as u
53
+ useVirtualizer as a,
54
+ useWindowVirtualizer as u
44
55
  };
@@ -129,6 +129,20 @@ const observeElementRect = (instance, cb) => {
129
129
  const addEventListenerOptions = {
130
130
  passive: true
131
131
  };
132
+ const observeWindowRect = (instance, cb) => {
133
+ const element = instance.scrollElement;
134
+ if (!element) {
135
+ return;
136
+ }
137
+ const handler = () => {
138
+ cb({ width: element.innerWidth, height: element.innerHeight });
139
+ };
140
+ handler();
141
+ element.addEventListener("resize", handler, addEventListenerOptions);
142
+ return () => {
143
+ element.removeEventListener("resize", handler);
144
+ };
145
+ };
132
146
  const supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
133
147
  const observeOffset = (instance, cb, readOffset) => {
134
148
  const element = instance.scrollElement;
@@ -168,6 +182,11 @@ const observeElementOffset = (instance, cb) => observeOffset(instance, cb, (el)
168
182
  const { horizontal, isRtl } = instance.options;
169
183
  return horizontal ? el.scrollLeft * (isRtl && -1 || 1) : el.scrollTop;
170
184
  });
185
+ const observeWindowOffset = (instance, cb) => observeOffset(
186
+ instance,
187
+ cb,
188
+ (win) => instance.options.horizontal ? win.scrollX : win.scrollY
189
+ );
171
190
  const measureElement = (element, entry, instance) => {
172
191
  if (entry == null ? void 0 : entry.borderBoxSize) {
173
192
  const box = entry.borderBoxSize[0];
@@ -190,6 +209,7 @@ const scrollWithAdjustments = (offset, {
190
209
  behavior
191
210
  });
192
211
  };
212
+ const windowScroll = scrollWithAdjustments;
193
213
  const elementScroll = scrollWithAdjustments;
194
214
  class Virtualizer {
195
215
  constructor(opts) {
@@ -1220,6 +1240,9 @@ function calculateRange({
1220
1240
  export {
1221
1241
  Virtualizer as V,
1222
1242
  observeElementRect as a,
1243
+ observeWindowOffset as b,
1244
+ observeWindowRect as c,
1223
1245
  elementScroll as e,
1224
- observeElementOffset as o
1246
+ observeElementOffset as o,
1247
+ windowScroll as w
1225
1248
  };
@@ -1,6 +1,6 @@
1
1
  import { j as jsxRuntimeExports } from "./_libs/react.mjs";
2
- import { P as ProxyViewerContainer } from "./_ssr/ProxyViewerContainer-B_ppaNmQ.mjs";
3
- import { R as Route$q } from "./_ssr/router-Ddl1tuU7.mjs";
2
+ import { P as ProxyViewerContainer } from "./_ssr/ProxyViewerContainer-BEUWt2eX.mjs";
3
+ import { R as Route$q } from "./_ssr/router-DpaDa5q5.mjs";
4
4
  import "./_libs/jszip.mjs";
5
5
  import "./_libs/modelcontextprotocol__server.mjs";
6
6
  import "./_libs/swr.mjs";
@@ -128,6 +128,7 @@ import "node:stream";
128
128
  import "./_libs/isbot.mjs";
129
129
  import "node:fs";
130
130
  import "node:fs/promises";
131
+ import "node:readline";
131
132
  import "node:buffer";
132
133
  import "node:child_process";
133
134
  import "./_libs/conf.mjs";
@@ -1,9 +1,9 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { g as getLogFormatAdapter, r as resolveLogFormat, a as getConversationId, c as cn, B as Badge, f as formatTokens, J as JsonViewerFromString } from "./ProxyViewerContainer-B_ppaNmQ.mjs";
3
- import "./router-Ddl1tuU7.mjs";
2
+ import { g as getLogFormatAdapter, r as resolveLogFormat, a as getConversationId, c as cn, B as Badge, f as formatTokens, J as JsonViewerFromString } from "./ProxyViewerContainer-BEUWt2eX.mjs";
3
+ import "./router-DpaDa5q5.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
- import { X, a9 as Rows3, aa as Columns2, p as Minus, P as Plus, m as Pencil, f as ChevronRight, ab as Equal, C as Check, a as Copy } from "../_libs/lucide-react.mjs";
6
+ import { X, a9 as Rows3, aa as Columns2, p as Minus, P as Plus, i as Pencil, m as ChevronRight, ab as Equal, C as Check, a as Copy } from "../_libs/lucide-react.mjs";
7
7
  import "../_libs/swr.mjs";
8
8
  import "../_libs/use-sync-external-store.mjs";
9
9
  import "../_libs/dequal.mjs";
@@ -128,6 +128,7 @@ import "node:stream";
128
128
  import "../_libs/isbot.mjs";
129
129
  import "node:fs";
130
130
  import "node:fs/promises";
131
+ import "node:readline";
131
132
  import "node:buffer";
132
133
  import "node:child_process";
133
134
  import "../_libs/conf.mjs";