@tonyclaw/agent-inspector 2.0.43 → 2.1.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 (39) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{CompareDrawer-CxM1gCfL.js → CompareDrawer-VDpcSNGM.js} +1 -1
  3. package/.output/public/assets/ProxyViewerContainer-fsXSjqtm.js +117 -0
  4. package/.output/public/assets/{ReplayDialog-UseUkucS.js → ReplayDialog-CoDgTzHR.js} +1 -1
  5. package/.output/public/assets/RequestAnatomy-t3plgkPE.js +1 -0
  6. package/.output/public/assets/ResponseView-BYuKiNeG.js +1 -0
  7. package/.output/public/assets/{StreamingChunkSequence-JSQEPeNS.js → StreamingChunkSequence-DOdU38Is.js} +1 -1
  8. package/.output/public/assets/_sessionId-ew5QlyZ2.js +1 -0
  9. package/.output/public/assets/index-DFICWD6o.js +1 -0
  10. package/.output/public/assets/index-zLLCkAnF.css +1 -0
  11. package/.output/public/assets/{main-BpGVJcpB.js → main-DmzLt6ti.js} +2 -2
  12. package/.output/server/_libs/lucide-react.mjs +219 -178
  13. package/.output/server/{_sessionId-DGn-TENM.mjs → _sessionId-CCN1UoEf.mjs} +3 -3
  14. package/.output/server/_ssr/{CompareDrawer-CFElCSYY.mjs → CompareDrawer-DkSY3vxP.mjs} +4 -4
  15. package/.output/server/_ssr/{ProxyViewerContainer-B7SR9mrD.mjs → ProxyViewerContainer-OTh1V_Kh.mjs} +798 -394
  16. package/.output/server/_ssr/{ReplayDialog-DfKapj0k.mjs → ReplayDialog-DhI6yxrR.mjs} +5 -5
  17. package/.output/server/_ssr/{RequestAnatomy-CUxTCg31.mjs → RequestAnatomy-DN1SJVVL.mjs} +4 -4
  18. package/.output/server/_ssr/{ResponseView-BXY0w197.mjs → ResponseView-DW-kpJL5.mjs} +4 -4
  19. package/.output/server/_ssr/{StreamingChunkSequence-CzMnES9H.mjs → StreamingChunkSequence-BAE57Fae.mjs} +4 -4
  20. package/.output/server/_ssr/{index-CVlT-REW.mjs → index-C9ryJEna.mjs} +3 -3
  21. package/.output/server/_ssr/index.mjs +2 -2
  22. package/.output/server/_ssr/{router-B2d1LUx6.mjs → router-DIIJGyML.mjs} +458 -10
  23. package/.output/server/{_tanstack-start-manifest_v-Drpi28BM.mjs → _tanstack-start-manifest_v-C_v9-E5d.mjs} +1 -1
  24. package/.output/server/index.mjs +63 -63
  25. package/package.json +1 -1
  26. package/src/components/OnboardingBanner.tsx +74 -68
  27. package/src/components/ProxyViewer.tsx +869 -363
  28. package/src/components/ProxyViewerContainer.tsx +135 -3
  29. package/src/components/proxy-viewer/LogEntryHeader.tsx +12 -6
  30. package/src/components/ui/crab-logo.tsx +0 -50
  31. package/src/proxy/logIndex.ts +188 -1
  32. package/src/proxy/store.ts +405 -3
  33. package/src/routes/api/logs.ts +36 -0
  34. package/.output/public/assets/ProxyViewerContainer-TtRG-0E7.js +0 -117
  35. package/.output/public/assets/RequestAnatomy-aPxgEJ2L.js +0 -1
  36. package/.output/public/assets/ResponseView-DA-F4F97.js +0 -1
  37. package/.output/public/assets/_sessionId-BEXuCWq5.js +0 -1
  38. package/.output/public/assets/index-Bhsa_2xX.js +0 -1
  39. package/.output/public/assets/index-DOWlRJ0W.css +0 -1
@@ -38,100 +38,100 @@ const assets = {
38
38
  "/assets/alibaba-TTwafVwX.svg": {
39
39
  "type": "image/svg+xml",
40
40
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
41
- "mtime": "2026-07-03T02:24:32.082Z",
41
+ "mtime": "2026-07-03T03:56:33.507Z",
42
42
  "size": 5915,
43
43
  "path": "../public/assets/alibaba-TTwafVwX.svg"
44
44
  },
45
- "/assets/CompareDrawer-CxM1gCfL.js": {
45
+ "/assets/index-DFICWD6o.js": {
46
46
  "type": "text/javascript; charset=utf-8",
47
- "etag": '"49e8-MWCeQ8XhCRwryE9ztGUYYFSWZMU"',
48
- "mtime": "2026-07-03T02:24:32.084Z",
49
- "size": 18920,
50
- "path": "../public/assets/CompareDrawer-CxM1gCfL.js"
51
- },
52
- "/assets/index-Bhsa_2xX.js": {
53
- "type": "text/javascript; charset=utf-8",
54
- "etag": '"74-FekOZ7LhkvEikN+5Vtic9whLu2c"',
55
- "mtime": "2026-07-03T02:24:32.084Z",
47
+ "etag": '"74-+9cCcGeyvzlf+Bk2xUC8tzIF0OI"',
48
+ "mtime": "2026-07-03T03:56:33.507Z",
56
49
  "size": 116,
57
- "path": "../public/assets/index-Bhsa_2xX.js"
58
- },
59
- "/assets/index-DOWlRJ0W.css": {
60
- "type": "text/css; charset=utf-8",
61
- "etag": '"1ad8b-QtGZOCeSfvBzb+puIlHYbHPVBvo"',
62
- "mtime": "2026-07-03T02:24:32.084Z",
63
- "size": 109963,
64
- "path": "../public/assets/index-DOWlRJ0W.css"
50
+ "path": "../public/assets/index-DFICWD6o.js"
65
51
  },
66
- "/assets/ReplayDialog-UseUkucS.js": {
52
+ "/assets/CompareDrawer-VDpcSNGM.js": {
67
53
  "type": "text/javascript; charset=utf-8",
68
- "etag": '"318c-kKQJY2fzKwzsc7gAjVFVbioolPs"',
69
- "mtime": "2026-07-03T02:24:32.084Z",
70
- "size": 12684,
71
- "path": "../public/assets/ReplayDialog-UseUkucS.js"
54
+ "etag": '"49e8-ajy70W1rR+/Q1eJQ+qNs39tBVP4"',
55
+ "mtime": "2026-07-03T03:56:33.507Z",
56
+ "size": 18920,
57
+ "path": "../public/assets/CompareDrawer-VDpcSNGM.js"
72
58
  },
73
- "/assets/RequestAnatomy-aPxgEJ2L.js": {
74
- "type": "text/javascript; charset=utf-8",
75
- "etag": '"4485-mO43pmS8TLLXBnkqeHw5yJys4xE"',
76
- "mtime": "2026-07-03T02:24:32.084Z",
77
- "size": 17541,
78
- "path": "../public/assets/RequestAnatomy-aPxgEJ2L.js"
59
+ "/assets/index-zLLCkAnF.css": {
60
+ "type": "text/css; charset=utf-8",
61
+ "etag": '"1bd7d-Q3DysR+aGn9MSbGdCMtKAQuCaD4"',
62
+ "mtime": "2026-07-03T03:56:33.507Z",
63
+ "size": 114045,
64
+ "path": "../public/assets/index-zLLCkAnF.css"
79
65
  },
80
- "/assets/ResponseView-DA-F4F97.js": {
81
- "type": "text/javascript; charset=utf-8",
82
- "etag": '"30d1-5KGpGiZC9fD4bpancX3Blld/U6c"',
83
- "mtime": "2026-07-03T02:24:32.084Z",
84
- "size": 12497,
85
- "path": "../public/assets/ResponseView-DA-F4F97.js"
66
+ "/assets/qwen-CONDcHqt.png": {
67
+ "type": "image/png",
68
+ "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
69
+ "mtime": "2026-07-03T03:56:33.507Z",
70
+ "size": 357059,
71
+ "path": "../public/assets/qwen-CONDcHqt.png"
86
72
  },
87
73
  "/assets/minimax-BPMzvuL-.jpeg": {
88
74
  "type": "image/jpeg",
89
75
  "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
90
- "mtime": "2026-07-03T02:24:32.082Z",
76
+ "mtime": "2026-07-03T03:56:33.507Z",
91
77
  "size": 6918,
92
78
  "path": "../public/assets/minimax-BPMzvuL-.jpeg"
93
79
  },
94
- "/assets/StreamingChunkSequence-JSQEPeNS.js": {
80
+ "/assets/ReplayDialog-CoDgTzHR.js": {
95
81
  "type": "text/javascript; charset=utf-8",
96
- "etag": '"d5c-ZXGtNk6QwMMsBCwiFU85hEx0MWk"',
97
- "mtime": "2026-07-03T02:24:32.084Z",
82
+ "etag": '"318c-0twqpyojedLjGws3LUKh6O8+3nA"',
83
+ "mtime": "2026-07-03T03:56:33.508Z",
84
+ "size": 12684,
85
+ "path": "../public/assets/ReplayDialog-CoDgTzHR.js"
86
+ },
87
+ "/assets/ResponseView-BYuKiNeG.js": {
88
+ "type": "text/javascript; charset=utf-8",
89
+ "etag": '"30d2-3G74qLhEPPuC0NYHNMcTa1gXf7U"',
90
+ "mtime": "2026-07-03T03:56:33.507Z",
91
+ "size": 12498,
92
+ "path": "../public/assets/ResponseView-BYuKiNeG.js"
93
+ },
94
+ "/assets/StreamingChunkSequence-DOdU38Is.js": {
95
+ "type": "text/javascript; charset=utf-8",
96
+ "etag": '"d5c-DJxkJQuReuIrO+fYI7Gp3wd4Ahs"',
97
+ "mtime": "2026-07-03T03:56:33.508Z",
98
98
  "size": 3420,
99
- "path": "../public/assets/StreamingChunkSequence-JSQEPeNS.js"
99
+ "path": "../public/assets/StreamingChunkSequence-DOdU38Is.js"
100
+ },
101
+ "/assets/_sessionId-ew5QlyZ2.js": {
102
+ "type": "text/javascript; charset=utf-8",
103
+ "etag": '"d2-t1JkPwBzeykveWWwmpxWw+rSXEM"',
104
+ "mtime": "2026-07-03T03:56:33.507Z",
105
+ "size": 210,
106
+ "path": "../public/assets/_sessionId-ew5QlyZ2.js"
100
107
  },
101
108
  "/assets/zhipuai-BPNAnxo-.svg": {
102
109
  "type": "image/svg+xml",
103
110
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
104
- "mtime": "2026-07-03T02:24:32.082Z",
111
+ "mtime": "2026-07-03T03:56:33.507Z",
105
112
  "size": 11256,
106
113
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
107
114
  },
108
- "/assets/_sessionId-BEXuCWq5.js": {
115
+ "/assets/RequestAnatomy-t3plgkPE.js": {
109
116
  "type": "text/javascript; charset=utf-8",
110
- "etag": '"d2-exeT3w9Bi3c+xV7elTFmaQnyqhI"',
111
- "mtime": "2026-07-03T02:24:32.084Z",
112
- "size": 210,
113
- "path": "../public/assets/_sessionId-BEXuCWq5.js"
117
+ "etag": '"43f2-kvOx56u9DW1rdodfXLIWisxwD1c"',
118
+ "mtime": "2026-07-03T03:56:33.508Z",
119
+ "size": 17394,
120
+ "path": "../public/assets/RequestAnatomy-t3plgkPE.js"
114
121
  },
115
- "/assets/main-BpGVJcpB.js": {
122
+ "/assets/main-DmzLt6ti.js": {
116
123
  "type": "text/javascript; charset=utf-8",
117
- "etag": '"517d9-g8ehe8xaUgKICmE82dajQ3Rg1Aw"',
118
- "mtime": "2026-07-03T02:24:32.084Z",
124
+ "etag": '"517d9-eO3gi5mVIsCs9Rr3vgFtrIEB/p4"',
125
+ "mtime": "2026-07-03T03:56:33.507Z",
119
126
  "size": 333785,
120
- "path": "../public/assets/main-BpGVJcpB.js"
121
- },
122
- "/assets/qwen-CONDcHqt.png": {
123
- "type": "image/png",
124
- "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
125
- "mtime": "2026-07-03T02:24:32.084Z",
126
- "size": 357059,
127
- "path": "../public/assets/qwen-CONDcHqt.png"
127
+ "path": "../public/assets/main-DmzLt6ti.js"
128
128
  },
129
- "/assets/ProxyViewerContainer-TtRG-0E7.js": {
129
+ "/assets/ProxyViewerContainer-fsXSjqtm.js": {
130
130
  "type": "text/javascript; charset=utf-8",
131
- "etag": '"b7ea9-7bsvy+ETcxfBpFGaacydCBqQiqA"',
132
- "mtime": "2026-07-03T02:24:32.084Z",
133
- "size": 753321,
134
- "path": "../public/assets/ProxyViewerContainer-TtRG-0E7.js"
131
+ "etag": '"bb00a-BeXeA1I+ShxbnFR8iSNREQAPhwE"',
132
+ "mtime": "2026-07-03T03:56:33.508Z",
133
+ "size": 765962,
134
+ "path": "../public/assets/ProxyViewerContainer-fsXSjqtm.js"
135
135
  }
136
136
  };
137
137
  function readAsset(id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonyclaw/agent-inspector",
3
- "version": "2.0.43",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "description": "Agent observability and knowledge capture layer for AI coding tools.",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
- import { Check, X } from "lucide-react";
2
- import type { JSX } from "react";
1
+ import { Check, ChevronDown, Info, X } from "lucide-react";
2
+ import { useState, type JSX } from "react";
3
3
  import { useOnboarding } from "../lib/useOnboarding";
4
4
 
5
5
  /**
@@ -8,84 +8,90 @@ import { useOnboarding } from "../lib/useOnboarding";
8
8
  */
9
9
  export function OnboardingBanner(): JSX.Element | null {
10
10
  const { hasSeenOnboarding, captureMode, isLoading, markSeen } = useOnboarding();
11
+ const [expanded, setExpanded] = useState(false);
11
12
 
12
13
  if (isLoading || hasSeenOnboarding) return null;
13
14
 
14
15
  const isFullMode = captureMode === "full";
16
+ const modeLabel = isFullMode ? "Full" : "Simple";
17
+ const detailClass = expanded ? "grid" : "hidden sm:grid";
15
18
 
16
19
  return (
17
20
  <div
18
21
  role="note"
19
22
  aria-label="Onboarding tip"
20
- className="mx-4 mt-2 mb-1 flex items-start gap-3 rounded-md border border-amber-500/30 bg-amber-500/5 px-4 py-3 text-sm"
23
+ className="mx-4 mt-2 mb-1 rounded-md border border-amber-500/30 bg-[#130d04] px-3 py-2 text-sm shadow-[0_12px_40px_rgba(0,0,0,0.16)]"
21
24
  >
22
- <div className="min-w-0 flex-1">
23
- <div className="mb-1 font-medium text-amber-600 dark:text-amber-400">
24
- {isFullMode
25
- ? "Agent Inspector is ready in Full mode"
26
- : "Agent Inspector is ready in Simple mode"}
25
+ <div className="flex items-start gap-3">
26
+ <Info className="mt-0.5 size-4 shrink-0 text-amber-300" aria-hidden="true" />
27
+ <div className="min-w-0 flex-1">
28
+ <div className="flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1">
29
+ <span className="font-medium text-amber-200">Inspector ready</span>
30
+ <span className="rounded border border-amber-400/30 bg-amber-400/10 px-1.5 py-0.5 font-mono text-[10px] uppercase text-amber-100">
31
+ {modeLabel}
32
+ </span>
33
+ <span className="hidden truncate text-xs text-muted-foreground sm:inline">
34
+ {isFullMode
35
+ ? "Raw headers, raw response, and SSE chunks are being captured."
36
+ : "Request, response, tool, timing, token, replay, and memory signals are active."}
37
+ </span>
38
+ </div>
39
+ <div className="mt-1 text-xs leading-relaxed text-muted-foreground sm:hidden">
40
+ {isFullMode
41
+ ? "Full diagnostics are active."
42
+ : "Core capture is active with lower overhead."}
43
+ </div>
44
+ <div
45
+ className={`${detailClass} mt-2 gap-x-4 gap-y-1 text-xs leading-relaxed text-muted-foreground sm:grid-cols-3`}
46
+ >
47
+ <div>
48
+ <strong>Mode</strong>: <code>{captureMode}</code> is fixed until restart.
49
+ </div>
50
+ <div>
51
+ <strong>Diagnostics</strong>: use{" "}
52
+ <code>
53
+ {isFullMode ? "agent-inspector --mode simple" : "agent-inspector --mode full"}
54
+ </code>
55
+ .
56
+ </div>
57
+ <div>
58
+ <strong>Network</strong>: replace <code>localhost</code> when containers differ.
59
+ </div>
60
+ </div>
27
61
  </div>
28
- <ol className="space-y-0.5 text-xs leading-relaxed text-muted-foreground">
29
- <li>
30
- <strong>1. Start in the right mode</strong>: this process is currently running in{" "}
31
- <code>{captureMode}</code>. Mode is fixed at startup.
32
- </li>
33
- {isFullMode ? (
34
- <>
35
- <li>
36
- <strong>2. Full diagnostics</strong>: raw headers, raw response, and SSE chunks are
37
- captured for deep investigations.
38
- </li>
39
- <li>
40
- <strong>3. Daily work</strong>: restart with{" "}
41
- <code>agent-inspector --mode simple</code> to reduce capture overhead.
42
- </li>
43
- </>
44
- ) : (
45
- <>
46
- <li>
47
- <strong>2. Simple capture</strong>: requests, responses, tools, timing, tokens,
48
- replay, and memory candidates are available with lower overhead.
49
- </li>
50
- <li>
51
- <strong>3. Need raw diagnostics?</strong> Restart with{" "}
52
- <code>agent-inspector --mode full</code> for raw headers, raw response, and SSE
53
- chunks.
54
- </li>
55
- </>
56
- )}
57
- <li>
58
- <strong>Agent setup</strong>: run <code>agent-inspector onboard --status</code>, then
59
- use <code>/agent-inspector:onboard</code> in Claude Code or ask Codex to use{" "}
60
- <code>agent-inspector-onboard</code>.
61
- </li>
62
- <li>
63
- <strong>Container networking</strong>: if the AI tool runs outside this Inspector
64
- container or host, replace <code>localhost</code> with a reachable address.
65
- </li>
66
- </ol>
62
+ <button
63
+ type="button"
64
+ onClick={() => setExpanded((value) => !value)}
65
+ className="inline-flex h-8 shrink-0 items-center gap-1 rounded-md border border-amber-500/30 px-2 text-xs text-amber-200 transition-colors hover:bg-amber-500/10 sm:hidden"
66
+ aria-expanded={expanded}
67
+ aria-label={expanded ? "Hide onboarding details" : "Show onboarding details"}
68
+ >
69
+ <ChevronDown
70
+ className={`size-3.5 transition-transform ${expanded ? "rotate-180" : ""}`}
71
+ />
72
+ </button>
73
+ <button
74
+ type="button"
75
+ onClick={() => {
76
+ void markSeen();
77
+ }}
78
+ className="hidden h-8 shrink-0 items-center gap-1.5 rounded-md border border-amber-500/40 px-3 text-xs text-amber-200 transition-colors hover:bg-amber-500/10 sm:inline-flex"
79
+ aria-label="Dismiss onboarding tip"
80
+ >
81
+ <Check className="size-3.5" />
82
+ Got it
83
+ </button>
84
+ <button
85
+ type="button"
86
+ onClick={() => {
87
+ void markSeen();
88
+ }}
89
+ className="-m-1 shrink-0 p-1 text-muted-foreground transition-colors hover:text-foreground"
90
+ aria-label="Dismiss"
91
+ >
92
+ <X className="size-3.5" />
93
+ </button>
67
94
  </div>
68
- <button
69
- type="button"
70
- onClick={() => {
71
- void markSeen();
72
- }}
73
- className="inline-flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-amber-500/40 px-3 text-xs text-amber-700 transition-colors hover:bg-amber-500/10 dark:text-amber-300"
74
- aria-label="Dismiss onboarding tip"
75
- >
76
- <Check className="size-3.5" />
77
- Got it
78
- </button>
79
- <button
80
- type="button"
81
- onClick={() => {
82
- void markSeen();
83
- }}
84
- className="-m-1 shrink-0 p-1 text-muted-foreground transition-colors hover:text-foreground"
85
- aria-label="Dismiss"
86
- >
87
- <X className="size-3.5" />
88
- </button>
89
95
  </div>
90
96
  );
91
97
  }