@tonyclaw/agent-inspector 3.0.17 → 3.0.18

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 (28) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{CompareDrawer-Lx-WeJNC.js → CompareDrawer-Daj03-RL.js} +1 -1
  3. package/.output/public/assets/{ProxyViewerContainer-BNehwMI0.js → ProxyViewerContainer-BLCRQtU_.js} +27 -27
  4. package/.output/public/assets/{ReplayDialog-CADaXFPE.js → ReplayDialog-5FR5crdo.js} +1 -1
  5. package/.output/public/assets/{RequestAnatomy-CGoL8ACh.js → RequestAnatomy-DF0hHdQY.js} +1 -1
  6. package/.output/public/assets/{ResponseView-BSwM1dCH.js → ResponseView-BwkMSsUa.js} +2 -2
  7. package/.output/public/assets/{StreamingChunkSequence-qhWtSx3D.js → StreamingChunkSequence-CKeUd58x.js} +1 -1
  8. package/.output/public/assets/{_sessionId-2uq_HB8p.js → _sessionId-CThgXa41.js} +1 -1
  9. package/.output/public/assets/{index-DPc2wzgW.js → index-ClQ7Vi3J.js} +1 -1
  10. package/.output/public/assets/{index-T0u1foYL.js → index-gm3A0idN.js} +1 -1
  11. package/.output/public/assets/{json-viewer-uIwLntt-.js → json-viewer-BA-W-PZq.js} +1 -1
  12. package/.output/public/assets/{main-DuFBHsus.js → main-BnRC1932.js} +2 -2
  13. package/.output/server/{_sessionId-DL2JQJwR.mjs → _sessionId-Bi3ZIrqT.mjs} +2 -2
  14. package/.output/server/_ssr/{CompareDrawer-hPTOTmyU.mjs → CompareDrawer-BYZS_hCR.mjs} +2 -2
  15. package/.output/server/_ssr/{ProxyViewerContainer-k0mFaufl.mjs → ProxyViewerContainer-BE4umfVs.mjs} +60 -27
  16. package/.output/server/_ssr/{ReplayDialog-t6QdwnZh.mjs → ReplayDialog-BlID2ZH4.mjs} +3 -3
  17. package/.output/server/_ssr/{RequestAnatomy-BnvWxyac.mjs → RequestAnatomy-CGJ2lkzT.mjs} +2 -2
  18. package/.output/server/_ssr/{ResponseView-BhhozRRl.mjs → ResponseView-DDjcGf7M.mjs} +2 -2
  19. package/.output/server/_ssr/{StreamingChunkSequence-Dl_laTbX.mjs → StreamingChunkSequence-G7B8M5G2.mjs} +2 -2
  20. package/.output/server/_ssr/{index-D1-t1D8F.mjs → index-ClQ9FvRJ.mjs} +2 -2
  21. package/.output/server/_ssr/index.mjs +2 -2
  22. package/.output/server/_ssr/{json-viewer-D5Lh2yBU.mjs → json-viewer-CFbpkiBJ.mjs} +2 -2
  23. package/.output/server/_ssr/{router-DaLFEeWW.mjs → router-Cq8LEvhE.mjs} +3 -3
  24. package/.output/server/{_tanstack-start-manifest_v-DsSiD2gY.mjs → _tanstack-start-manifest_v-p7J0QCMh.mjs} +1 -1
  25. package/.output/server/index.mjs +68 -68
  26. package/package.json +1 -1
  27. package/src/components/proxy-viewer/LogEntry.tsx +54 -19
  28. package/src/components/proxy-viewer/logEntryVisibility.ts +22 -0
@@ -38,121 +38,121 @@ const assets = {
38
38
  "/assets/alibaba-TTwafVwX.svg": {
39
39
  "type": "image/svg+xml",
40
40
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
41
- "mtime": "2026-07-08T08:28:44.111Z",
41
+ "mtime": "2026-07-08T09:20:47.299Z",
42
42
  "size": 5915,
43
43
  "path": "../public/assets/alibaba-TTwafVwX.svg"
44
44
  },
45
45
  "/assets/agent-inspector-58K1_MsC.ico": {
46
46
  "type": "image/vnd.microsoft.icon",
47
47
  "etag": '"38fa-ZD8kPABHYjPIkcH82FMY6iZM7fI"',
48
- "mtime": "2026-07-08T08:28:44.111Z",
48
+ "mtime": "2026-07-08T09:20:47.299Z",
49
49
  "size": 14586,
50
50
  "path": "../public/assets/agent-inspector-58K1_MsC.ico"
51
51
  },
52
- "/assets/CompareDrawer-Lx-WeJNC.js": {
52
+ "/assets/json-viewer-BA-W-PZq.js": {
53
53
  "type": "text/javascript; charset=utf-8",
54
- "etag": '"4bc3-tbu6Xh1vBvYDoKpIc4DM4rksx3Y"',
55
- "mtime": "2026-07-08T08:28:44.111Z",
56
- "size": 19395,
57
- "path": "../public/assets/CompareDrawer-Lx-WeJNC.js"
54
+ "etag": '"1ae6-dvP4VHmxfaubFfn7DjIy5LP2VDM"',
55
+ "mtime": "2026-07-08T09:20:47.300Z",
56
+ "size": 6886,
57
+ "path": "../public/assets/json-viewer-BA-W-PZq.js"
58
58
  },
59
- "/assets/index-T0u1foYL.js": {
59
+ "/assets/index-gm3A0idN.js": {
60
60
  "type": "text/javascript; charset=utf-8",
61
- "etag": '"264-h0V4RQjClTku18FOwNfcV0YtjQQ"',
62
- "mtime": "2026-07-08T08:28:44.111Z",
61
+ "etag": '"264-bUtHugGp38xTQ/556OOmW4cTb30"',
62
+ "mtime": "2026-07-08T09:20:47.299Z",
63
63
  "size": 612,
64
- "path": "../public/assets/index-T0u1foYL.js"
65
- },
66
- "/assets/json-viewer-uIwLntt-.js": {
67
- "type": "text/javascript; charset=utf-8",
68
- "etag": '"1ae6-cD2tWuizuTOPAPpUEGSuMcAzEZE"',
69
- "mtime": "2026-07-08T08:28:44.112Z",
70
- "size": 6886,
71
- "path": "../public/assets/json-viewer-uIwLntt-.js"
64
+ "path": "../public/assets/index-gm3A0idN.js"
72
65
  },
73
66
  "/assets/minimax-BPMzvuL-.jpeg": {
74
67
  "type": "image/jpeg",
75
68
  "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
76
- "mtime": "2026-07-08T08:28:44.111Z",
69
+ "mtime": "2026-07-08T09:20:47.299Z",
77
70
  "size": 6918,
78
71
  "path": "../public/assets/minimax-BPMzvuL-.jpeg"
79
72
  },
80
- "/assets/index-BHXN1Fsx.css": {
81
- "type": "text/css; charset=utf-8",
82
- "etag": '"25b0d-UyzOlNKIaucQXEUHv/FUiQk9+WM"',
83
- "mtime": "2026-07-08T08:28:44.111Z",
84
- "size": 154381,
85
- "path": "../public/assets/index-BHXN1Fsx.css"
73
+ "/assets/index-ClQ7Vi3J.js": {
74
+ "type": "text/javascript; charset=utf-8",
75
+ "etag": '"1cd2c-4zCEbVXrILXYj2zEV1+iKezgPds"',
76
+ "mtime": "2026-07-08T09:20:47.300Z",
77
+ "size": 118060,
78
+ "path": "../public/assets/index-ClQ7Vi3J.js"
86
79
  },
87
- "/assets/RequestAnatomy-CGoL8ACh.js": {
80
+ "/assets/main-BnRC1932.js": {
88
81
  "type": "text/javascript; charset=utf-8",
89
- "etag": '"43f2-3yCxwsYxkh4fRuvNcu0N2yWYmoA"',
90
- "mtime": "2026-07-08T08:28:44.112Z",
91
- "size": 17394,
92
- "path": "../public/assets/RequestAnatomy-CGoL8ACh.js"
82
+ "etag": '"51754-C+GxW6/FcQjEc3T50yvdt1wbC+Q"',
83
+ "mtime": "2026-07-08T09:20:47.300Z",
84
+ "size": 333652,
85
+ "path": "../public/assets/main-BnRC1932.js"
93
86
  },
94
- "/assets/index-DPc2wzgW.js": {
87
+ "/assets/CompareDrawer-Daj03-RL.js": {
95
88
  "type": "text/javascript; charset=utf-8",
96
- "etag": '"1cd2c-UeDYk+i1ETjZJB+kOwGwo0jEFlw"',
97
- "mtime": "2026-07-08T08:28:44.112Z",
98
- "size": 118060,
99
- "path": "../public/assets/index-DPc2wzgW.js"
89
+ "etag": '"4bc3-br2IcvOX80Rt2Ihi0wTncTxpsjQ"',
90
+ "mtime": "2026-07-08T09:20:47.300Z",
91
+ "size": 19395,
92
+ "path": "../public/assets/CompareDrawer-Daj03-RL.js"
100
93
  },
101
- "/assets/ResponseView-BSwM1dCH.js": {
94
+ "/assets/ResponseView-BwkMSsUa.js": {
102
95
  "type": "text/javascript; charset=utf-8",
103
- "etag": '"47fc-bpQkn8z+vA/JeSQA6o3uVrTteds"',
104
- "mtime": "2026-07-08T08:28:44.112Z",
96
+ "etag": '"47fc-0qG8LO4aEdS/plOjflbM11UR8Ow"',
97
+ "mtime": "2026-07-08T09:20:47.300Z",
105
98
  "size": 18428,
106
- "path": "../public/assets/ResponseView-BSwM1dCH.js"
99
+ "path": "../public/assets/ResponseView-BwkMSsUa.js"
107
100
  },
108
- "/assets/ReplayDialog-CADaXFPE.js": {
101
+ "/assets/RequestAnatomy-DF0hHdQY.js": {
109
102
  "type": "text/javascript; charset=utf-8",
110
- "etag": '"3347-uFrVkOUPbpSqnn4P2cQiRQFg5dM"',
111
- "mtime": "2026-07-08T08:28:44.112Z",
112
- "size": 13127,
113
- "path": "../public/assets/ReplayDialog-CADaXFPE.js"
103
+ "etag": '"43f2-Mtz9JWVo1c1JlS8OqgcPSXmE3lQ"',
104
+ "mtime": "2026-07-08T09:20:47.300Z",
105
+ "size": 17394,
106
+ "path": "../public/assets/RequestAnatomy-DF0hHdQY.js"
114
107
  },
115
- "/assets/StreamingChunkSequence-qhWtSx3D.js": {
108
+ "/assets/ReplayDialog-5FR5crdo.js": {
116
109
  "type": "text/javascript; charset=utf-8",
117
- "etag": '"e95-sxTbAxYB6Grs18w+Xyj04D+BxcY"',
118
- "mtime": "2026-07-08T08:28:44.112Z",
119
- "size": 3733,
120
- "path": "../public/assets/StreamingChunkSequence-qhWtSx3D.js"
110
+ "etag": '"3347-a97u4d282w761H2y42rBEmcN128"',
111
+ "mtime": "2026-07-08T09:20:47.300Z",
112
+ "size": 13127,
113
+ "path": "../public/assets/ReplayDialog-5FR5crdo.js"
121
114
  },
122
- "/assets/main-DuFBHsus.js": {
115
+ "/assets/StreamingChunkSequence-CKeUd58x.js": {
123
116
  "type": "text/javascript; charset=utf-8",
124
- "etag": '"51754-FUzKCD1aGZx7Uxl165jF/GgKtcQ"',
125
- "mtime": "2026-07-08T08:28:44.111Z",
126
- "size": 333652,
127
- "path": "../public/assets/main-DuFBHsus.js"
117
+ "etag": '"e95-aUcHwmSf3cNmuFqJIhMNTBPZwHQ"',
118
+ "mtime": "2026-07-08T09:20:47.300Z",
119
+ "size": 3733,
120
+ "path": "../public/assets/StreamingChunkSequence-CKeUd58x.js"
128
121
  },
129
122
  "/assets/zhipuai-BPNAnxo-.svg": {
130
123
  "type": "image/svg+xml",
131
124
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
132
- "mtime": "2026-07-08T08:28:44.111Z",
125
+ "mtime": "2026-07-08T09:20:47.299Z",
133
126
  "size": 11256,
134
127
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
135
128
  },
129
+ "/assets/index-BHXN1Fsx.css": {
130
+ "type": "text/css; charset=utf-8",
131
+ "etag": '"25b0d-UyzOlNKIaucQXEUHv/FUiQk9+WM"',
132
+ "mtime": "2026-07-08T09:20:47.299Z",
133
+ "size": 154381,
134
+ "path": "../public/assets/index-BHXN1Fsx.css"
135
+ },
136
+ "/assets/_sessionId-CThgXa41.js": {
137
+ "type": "text/javascript; charset=utf-8",
138
+ "etag": '"36c-LhEJ0XDKnu7ufvoZ93ll2DTfzsE"',
139
+ "mtime": "2026-07-08T09:20:47.299Z",
140
+ "size": 876,
141
+ "path": "../public/assets/_sessionId-CThgXa41.js"
142
+ },
136
143
  "/assets/qwen-CONDcHqt.png": {
137
144
  "type": "image/png",
138
145
  "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
139
- "mtime": "2026-07-08T08:28:44.111Z",
146
+ "mtime": "2026-07-08T09:20:47.299Z",
140
147
  "size": 357059,
141
148
  "path": "../public/assets/qwen-CONDcHqt.png"
142
149
  },
143
- "/assets/_sessionId-2uq_HB8p.js": {
144
- "type": "text/javascript; charset=utf-8",
145
- "etag": '"36c-Twr2jkpHT9aKqPmu9XD0Wj/28/U"',
146
- "mtime": "2026-07-08T08:28:44.111Z",
147
- "size": 876,
148
- "path": "../public/assets/_sessionId-2uq_HB8p.js"
149
- },
150
- "/assets/ProxyViewerContainer-BNehwMI0.js": {
150
+ "/assets/ProxyViewerContainer-BLCRQtU_.js": {
151
151
  "type": "text/javascript; charset=utf-8",
152
- "etag": '"bab5c-reTrPPm/VKGtnINOhj+7T+0rbb4"',
153
- "mtime": "2026-07-08T08:28:44.112Z",
154
- "size": 764764,
155
- "path": "../public/assets/ProxyViewerContainer-BNehwMI0.js"
152
+ "etag": '"bacfa-YqZ58vQYU45MNm0p7H9WPhfdV4M"',
153
+ "mtime": "2026-07-08T09:20:47.300Z",
154
+ "size": 765178,
155
+ "path": "../public/assets/ProxyViewerContainer-BLCRQtU_.js"
156
156
  }
157
157
  };
158
158
  function readAsset(id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonyclaw/agent-inspector",
3
- "version": "3.0.17",
3
+ "version": "3.0.18",
4
4
  "type": "module",
5
5
  "description": "Agent observability and knowledge capture layer for AI coding tools.",
6
6
  "license": "MIT",
@@ -41,6 +41,8 @@ import { getLogFormatAdapter, resolveLogFormat } from "./log-formats";
41
41
  import { LOG_FOCUS_REQUEST_EVENT, readLogFocusRequest, type LogFocusTab } from "./logFocus";
42
42
  import {
43
43
  shouldShowHeadersDiffButton,
44
+ shouldShowHeadersTab,
45
+ shouldShowRawHeadersTab,
44
46
  shouldShowRawRequestTab,
45
47
  shouldShowRequestDiffButton,
46
48
  } from "./logEntryVisibility";
@@ -568,21 +570,40 @@ export const LogEntry = memo(function ({
568
570
  }
569
571
  : null,
570
572
  },
571
- headers: {
572
- copyLabel: "Copy headers",
573
- copyText: headersText,
574
- copyCopied: headersCopy.copied,
575
- onCopy: headersCopy.copy,
576
- // Headers are a flat dict, no JSON tree to expand.
577
- expansion: null,
578
- },
579
- "raw-headers": {
580
- copyLabel: "Copy raw headers",
581
- copyText: rawHeadersText,
582
- copyCopied: rawHeadersCopy.copied,
583
- onCopy: rawHeadersCopy.copy,
584
- expansion: null,
585
- },
573
+ // Tab-level actions mirror the visibility rules in logEntryVisibility:
574
+ // when the corresponding tab is hidden because the log has no captured
575
+ // headers, the header bar must not surface a Copy button either. We
576
+ // therefore omit the key entirely (header renders no actions) instead
577
+ // of returning a bundle with `copyText: null`.
578
+ ...(shouldShowHeadersTab(
579
+ viewMode,
580
+ displayLog.headers !== undefined && Object.keys(displayLog.headers).length > 0,
581
+ )
582
+ ? {
583
+ headers: {
584
+ copyLabel: "Copy headers",
585
+ copyText: headersText,
586
+ copyCopied: headersCopy.copied,
587
+ onCopy: headersCopy.copy,
588
+ // Headers are a flat dict, no JSON tree to expand.
589
+ expansion: null,
590
+ },
591
+ }
592
+ : {}),
593
+ ...(shouldShowRawHeadersTab(
594
+ viewMode,
595
+ displayLog.rawHeaders !== undefined && Object.keys(displayLog.rawHeaders).length > 0,
596
+ )
597
+ ? {
598
+ "raw-headers": {
599
+ copyLabel: "Copy raw headers",
600
+ copyText: rawHeadersText,
601
+ copyCopied: rawHeadersCopy.copied,
602
+ onCopy: rawHeadersCopy.copy,
603
+ expansion: null,
604
+ },
605
+ }
606
+ : {}),
586
607
  raw: {
587
608
  copyLabel: responsePreviewIsActive ? "Copy loaded response preview" : "Copy response",
588
609
  copyText: responseTextForView,
@@ -842,12 +863,19 @@ export const LogEntry = memo(function ({
842
863
  variant="line"
843
864
  className="bg-white/[0.04] inspector-scrollbar relative mx-3 h-auto w-[calc(100%-1.5rem)] justify-start overflow-x-auto rounded-[8px] p-1"
844
865
  >
845
- {viewMode === "full" && (
866
+ {shouldShowRawHeadersTab(
867
+ viewMode,
868
+ displayLog.rawHeaders !== undefined &&
869
+ Object.keys(displayLog.rawHeaders).length > 0,
870
+ ) && (
846
871
  <TabsTrigger className={TAB_TRIGGER_CLASS} value="raw-headers">
847
872
  Raw Headers
848
873
  </TabsTrigger>
849
874
  )}
850
- {viewMode === "full" && (
875
+ {shouldShowHeadersTab(
876
+ viewMode,
877
+ displayLog.headers !== undefined && Object.keys(displayLog.headers).length > 0,
878
+ ) && (
851
879
  <TabsTrigger className={TAB_TRIGGER_CLASS} value="headers">
852
880
  Headers
853
881
  </TabsTrigger>
@@ -999,7 +1027,10 @@ export const LogEntry = memo(function ({
999
1027
  </TabsContent>
1000
1028
  )}
1001
1029
 
1002
- {viewMode === "full" && (
1030
+ {shouldShowHeadersTab(
1031
+ viewMode,
1032
+ displayLog.headers !== undefined && Object.keys(displayLog.headers).length > 0,
1033
+ ) && (
1003
1034
  <TabsContent value="headers">
1004
1035
  {activeTab === "headers" && (
1005
1036
  <ExpandedPanel>
@@ -1033,7 +1064,11 @@ export const LogEntry = memo(function ({
1033
1064
  </TabsContent>
1034
1065
  )}
1035
1066
 
1036
- {viewMode === "full" && (
1067
+ {shouldShowRawHeadersTab(
1068
+ viewMode,
1069
+ displayLog.rawHeaders !== undefined &&
1070
+ Object.keys(displayLog.rawHeaders).length > 0,
1071
+ ) && (
1037
1072
  <TabsContent value="raw-headers">
1038
1073
  {activeTab === "raw-headers" && (
1039
1074
  <ExpandedPanel>
@@ -23,6 +23,28 @@ export function shouldShowHeadersDiffButton(
23
23
  return viewMode === "full" && hasRawHeaders;
24
24
  }
25
25
 
26
+ /**
27
+ * Pure visibility rule for the `Raw Headers` tab. Inherits the same mode
28
+ * constraint as `shouldShowHeadersDiffButton` (full mode required to surface
29
+ * raw capture data), and additionally requires that the log actually has at
30
+ * least one captured header — otherwise the tab would render an empty panel.
31
+ */
32
+ export function shouldShowRawHeadersTab(
33
+ viewMode: "simple" | "full",
34
+ hasRawHeaders: boolean,
35
+ ): boolean {
36
+ return viewMode === "full" && hasRawHeaders;
37
+ }
38
+
39
+ /**
40
+ * Pure visibility rule for the `Headers` tab. Mirrors `shouldShowRawHeadersTab`
41
+ * but against the processed outgoing headers (rather than the raw inbound
42
+ * headers). Like its sibling it requires full mode AND a non-empty capture.
43
+ */
44
+ export function shouldShowHeadersTab(viewMode: "simple" | "full", hasHeaders: boolean): boolean {
45
+ return viewMode === "full" && hasHeaders;
46
+ }
47
+
26
48
  /**
27
49
  * Pure visibility rule for the "Diff with Raw" button in the Request tab.
28
50
  * Mirrors the conditions for the `Raw Request` tab itself: full mode plus