@0xmaxma/claude-gateway 2.0.4 → 2.0.5

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 (228) hide show
  1. package/README.md +10 -1
  2. package/dist/agent/builtin-commands.d.ts +1 -1
  3. package/dist/agent/builtin-commands.d.ts.map +1 -1
  4. package/dist/agent/builtin-commands.js +3 -2
  5. package/dist/agent/builtin-commands.js.map +1 -1
  6. package/dist/agent/runner.d.ts +109 -9
  7. package/dist/agent/runner.d.ts.map +1 -1
  8. package/dist/agent/runner.js +148 -119
  9. package/dist/agent/runner.js.map +1 -1
  10. package/dist/agent/skill-learning/index.d.ts.map +1 -1
  11. package/dist/agent/skill-learning/index.js +27 -8
  12. package/dist/agent/skill-learning/index.js.map +1 -1
  13. package/dist/agent/skill-learning/reviewer.d.ts +3 -1
  14. package/dist/agent/skill-learning/reviewer.d.ts.map +1 -1
  15. package/dist/agent/skill-learning/reviewer.js +6 -2
  16. package/dist/agent/skill-learning/reviewer.js.map +1 -1
  17. package/dist/agent/turn-stream.d.ts +3 -1
  18. package/dist/agent/turn-stream.d.ts.map +1 -1
  19. package/dist/agent/turn-stream.js +8 -4
  20. package/dist/agent/turn-stream.js.map +1 -1
  21. package/dist/api/gateway-router.d.ts +2 -0
  22. package/dist/api/gateway-router.d.ts.map +1 -1
  23. package/dist/api/gateway-router.js +229 -12
  24. package/dist/api/gateway-router.js.map +1 -1
  25. package/dist/api/router.js +11 -11
  26. package/dist/api/router.js.map +1 -1
  27. package/dist/api/slack-webhook-router.js +1 -1
  28. package/dist/api/slack-webhook-router.js.map +1 -1
  29. package/dist/api/voice-router.d.ts +1 -0
  30. package/dist/api/voice-router.d.ts.map +1 -1
  31. package/dist/api/voice-router.js +129 -7
  32. package/dist/api/voice-router.js.map +1 -1
  33. package/dist/config/claude-settings.d.ts +14 -0
  34. package/dist/config/claude-settings.d.ts.map +1 -1
  35. package/dist/config/claude-settings.js +20 -0
  36. package/dist/config/claude-settings.js.map +1 -1
  37. package/dist/orchestration/agent-cli-session.d.ts +46 -0
  38. package/dist/orchestration/agent-cli-session.d.ts.map +1 -0
  39. package/dist/orchestration/agent-cli-session.js +121 -0
  40. package/dist/orchestration/agent-cli-session.js.map +1 -0
  41. package/dist/orchestration/agent-tool-schemas.d.ts +6 -0
  42. package/dist/orchestration/agent-tool-schemas.d.ts.map +1 -0
  43. package/dist/orchestration/agent-tool-schemas.js +23 -0
  44. package/dist/orchestration/agent-tool-schemas.js.map +1 -0
  45. package/dist/orchestration/bridge.d.ts +6 -3
  46. package/dist/orchestration/bridge.d.ts.map +1 -1
  47. package/dist/orchestration/bridge.js +31 -14
  48. package/dist/orchestration/bridge.js.map +1 -1
  49. package/dist/orchestration/browser-voice.d.ts +14 -0
  50. package/dist/orchestration/browser-voice.d.ts.map +1 -0
  51. package/dist/orchestration/browser-voice.js +30 -0
  52. package/dist/orchestration/browser-voice.js.map +1 -0
  53. package/dist/orchestration/context-footprint.d.ts +14 -0
  54. package/dist/orchestration/context-footprint.d.ts.map +1 -0
  55. package/dist/orchestration/context-footprint.js +57 -0
  56. package/dist/orchestration/context-footprint.js.map +1 -0
  57. package/dist/orchestration/dashboard-reader-worker.d.ts +2 -0
  58. package/dist/orchestration/dashboard-reader-worker.d.ts.map +1 -0
  59. package/dist/orchestration/dashboard-reader-worker.js +155 -0
  60. package/dist/orchestration/dashboard-reader-worker.js.map +1 -0
  61. package/dist/orchestration/dashboard-reader.d.ts +15 -0
  62. package/dist/orchestration/dashboard-reader.d.ts.map +1 -0
  63. package/dist/orchestration/dashboard-reader.js +87 -0
  64. package/dist/orchestration/dashboard-reader.js.map +1 -0
  65. package/dist/orchestration/decision-context.d.ts +15 -0
  66. package/dist/orchestration/decision-context.d.ts.map +1 -0
  67. package/dist/orchestration/decision-context.js +57 -0
  68. package/dist/orchestration/decision-context.js.map +1 -0
  69. package/dist/orchestration/display-stream.d.ts +21 -2
  70. package/dist/orchestration/display-stream.d.ts.map +1 -1
  71. package/dist/orchestration/display-stream.js +61 -8
  72. package/dist/orchestration/display-stream.js.map +1 -1
  73. package/dist/orchestration/inference-errors.d.ts.map +1 -1
  74. package/dist/orchestration/inference-errors.js +19 -21
  75. package/dist/orchestration/inference-errors.js.map +1 -1
  76. package/dist/orchestration/mutation-recovery.d.ts +12 -0
  77. package/dist/orchestration/mutation-recovery.d.ts.map +1 -0
  78. package/dist/orchestration/mutation-recovery.js +41 -0
  79. package/dist/orchestration/mutation-recovery.js.map +1 -0
  80. package/dist/orchestration/native-compact.d.ts +5 -0
  81. package/dist/orchestration/native-compact.d.ts.map +1 -0
  82. package/dist/orchestration/native-compact.js +29 -0
  83. package/dist/orchestration/native-compact.js.map +1 -0
  84. package/dist/orchestration/notification-mailbox.d.ts +3 -1
  85. package/dist/orchestration/notification-mailbox.d.ts.map +1 -1
  86. package/dist/orchestration/notification-mailbox.js +4 -2
  87. package/dist/orchestration/notification-mailbox.js.map +1 -1
  88. package/dist/orchestration/process-turn.d.ts +15 -2
  89. package/dist/orchestration/process-turn.d.ts.map +1 -1
  90. package/dist/orchestration/process-turn.js +78 -14
  91. package/dist/orchestration/process-turn.js.map +1 -1
  92. package/dist/orchestration/progress-review.d.ts +8 -18
  93. package/dist/orchestration/progress-review.d.ts.map +1 -1
  94. package/dist/orchestration/progress-review.js +12 -14
  95. package/dist/orchestration/progress-review.js.map +1 -1
  96. package/dist/orchestration/provider-message.d.ts +7 -0
  97. package/dist/orchestration/provider-message.d.ts.map +1 -0
  98. package/dist/orchestration/provider-message.js +63 -0
  99. package/dist/orchestration/provider-message.js.map +1 -0
  100. package/dist/orchestration/response-errors.d.ts +6 -0
  101. package/dist/orchestration/response-errors.d.ts.map +1 -0
  102. package/dist/orchestration/response-errors.js +88 -0
  103. package/dist/orchestration/response-errors.js.map +1 -0
  104. package/dist/orchestration/response-schema.d.ts +33 -0
  105. package/dist/orchestration/response-schema.d.ts.map +1 -0
  106. package/dist/orchestration/response-schema.js +61 -0
  107. package/dist/orchestration/response-schema.js.map +1 -0
  108. package/dist/orchestration/runtime.d.ts +67 -0
  109. package/dist/orchestration/runtime.d.ts.map +1 -1
  110. package/dist/orchestration/runtime.js +266 -62
  111. package/dist/orchestration/runtime.js.map +1 -1
  112. package/dist/orchestration/skills.d.ts.map +1 -1
  113. package/dist/orchestration/skills.js +3 -2
  114. package/dist/orchestration/skills.js.map +1 -1
  115. package/dist/orchestration/source-policy.d.ts +1 -1
  116. package/dist/orchestration/source-policy.d.ts.map +1 -1
  117. package/dist/orchestration/source-policy.js +1 -1
  118. package/dist/orchestration/speech.d.ts +15 -17
  119. package/dist/orchestration/speech.d.ts.map +1 -1
  120. package/dist/orchestration/speech.js +90 -30
  121. package/dist/orchestration/speech.js.map +1 -1
  122. package/dist/orchestration/store.d.ts +2 -0
  123. package/dist/orchestration/store.d.ts.map +1 -1
  124. package/dist/orchestration/store.js +16 -1
  125. package/dist/orchestration/store.js.map +1 -1
  126. package/dist/orchestration/tasks/driver.d.ts.map +1 -1
  127. package/dist/orchestration/tasks/driver.js +8 -3
  128. package/dist/orchestration/tasks/driver.js.map +1 -1
  129. package/dist/orchestration/tasks/pool.d.ts.map +1 -1
  130. package/dist/orchestration/tasks/pool.js +8 -4
  131. package/dist/orchestration/tasks/pool.js.map +1 -1
  132. package/dist/orchestration/tasks/service.d.ts +48 -1
  133. package/dist/orchestration/tasks/service.d.ts.map +1 -1
  134. package/dist/orchestration/tasks/service.js +41 -17
  135. package/dist/orchestration/tasks/service.js.map +1 -1
  136. package/dist/orchestration/token-ledger.d.ts +125 -0
  137. package/dist/orchestration/token-ledger.d.ts.map +1 -0
  138. package/dist/orchestration/token-ledger.js +232 -0
  139. package/dist/orchestration/token-ledger.js.map +1 -0
  140. package/dist/orchestration/token-usage.d.ts +46 -0
  141. package/dist/orchestration/token-usage.d.ts.map +1 -0
  142. package/dist/orchestration/token-usage.js +102 -0
  143. package/dist/orchestration/token-usage.js.map +1 -0
  144. package/dist/orchestration/tool-activity.d.ts.map +1 -1
  145. package/dist/orchestration/tool-activity.js +5 -3
  146. package/dist/orchestration/tool-activity.js.map +1 -1
  147. package/dist/orchestration/tool-name.d.ts +10 -0
  148. package/dist/orchestration/tool-name.d.ts.map +1 -0
  149. package/dist/orchestration/tool-name.js +14 -0
  150. package/dist/orchestration/tool-name.js.map +1 -0
  151. package/dist/orchestration/transcript-checkpoint.d.ts +14 -0
  152. package/dist/orchestration/transcript-checkpoint.d.ts.map +1 -0
  153. package/dist/orchestration/transcript-checkpoint.js +83 -0
  154. package/dist/orchestration/transcript-checkpoint.js.map +1 -0
  155. package/dist/orchestration/unanswered-inputs.d.ts +6 -0
  156. package/dist/orchestration/unanswered-inputs.d.ts.map +1 -0
  157. package/dist/orchestration/unanswered-inputs.js +18 -0
  158. package/dist/orchestration/unanswered-inputs.js.map +1 -0
  159. package/dist/session/process.d.ts +10 -0
  160. package/dist/session/process.d.ts.map +1 -1
  161. package/dist/session/process.js +91 -9
  162. package/dist/session/process.js.map +1 -1
  163. package/dist/session/request-tool-capture.d.ts +31 -0
  164. package/dist/session/request-tool-capture.d.ts.map +1 -0
  165. package/dist/session/request-tool-capture.js +194 -0
  166. package/dist/session/request-tool-capture.js.map +1 -0
  167. package/dist/session/runtime-profile.d.ts +7 -3
  168. package/dist/session/runtime-profile.d.ts.map +1 -1
  169. package/dist/session/runtime-profile.js +3 -1
  170. package/dist/session/runtime-profile.js.map +1 -1
  171. package/dist/session/store.d.ts +7 -0
  172. package/dist/session/store.d.ts.map +1 -1
  173. package/dist/session/store.js +27 -0
  174. package/dist/session/store.js.map +1 -1
  175. package/dist/shell/tailer.d.ts +7 -5
  176. package/dist/shell/tailer.d.ts.map +1 -1
  177. package/dist/shell/tailer.js +6 -17
  178. package/dist/shell/tailer.js.map +1 -1
  179. package/dist/ui/cli-viewer-ui.js +1 -1
  180. package/dist/ui/dashboard-client.d.ts +3 -0
  181. package/dist/ui/dashboard-client.d.ts.map +1 -0
  182. package/dist/ui/dashboard-client.js +188 -0
  183. package/dist/ui/dashboard-client.js.map +1 -0
  184. package/dist/ui/dashboard-presentation.d.ts +9 -0
  185. package/dist/ui/dashboard-presentation.d.ts.map +1 -0
  186. package/dist/ui/dashboard-presentation.js +56 -0
  187. package/dist/ui/dashboard-presentation.js.map +1 -0
  188. package/dist/ui/dashboard-range.d.ts +5 -0
  189. package/dist/ui/dashboard-range.d.ts.map +1 -0
  190. package/dist/ui/dashboard-range.js +20 -0
  191. package/dist/ui/dashboard-range.js.map +1 -0
  192. package/dist/ui/dashboard-theme.d.ts +4 -0
  193. package/dist/ui/dashboard-theme.d.ts.map +1 -0
  194. package/dist/ui/dashboard-theme.js +485 -0
  195. package/dist/ui/dashboard-theme.js.map +1 -0
  196. package/dist/ui/token-report-client.d.ts +3 -0
  197. package/dist/ui/token-report-client.d.ts.map +1 -0
  198. package/dist/ui/token-report-client.js +34 -0
  199. package/dist/ui/token-report-client.js.map +1 -0
  200. package/dist/ui/token-report.d.ts +89 -0
  201. package/dist/ui/token-report.d.ts.map +1 -0
  202. package/dist/ui/token-report.js +200 -0
  203. package/dist/ui/token-report.js.map +1 -0
  204. package/dist/ui/web-ui.d.ts.map +1 -1
  205. package/dist/ui/web-ui.js +124 -181
  206. package/dist/ui/web-ui.js.map +1 -1
  207. package/dist/voice/replay.d.ts +8 -0
  208. package/dist/voice/replay.d.ts.map +1 -0
  209. package/dist/voice/replay.js +48 -0
  210. package/dist/voice/replay.js.map +1 -0
  211. package/dist/voice/session.d.ts +9 -0
  212. package/dist/voice/session.d.ts.map +1 -1
  213. package/dist/voice/session.js +72 -14
  214. package/dist/voice/session.js.map +1 -1
  215. package/mcp/lazy-connector.test.ts +58 -0
  216. package/mcp/lazy-connector.ts +67 -0
  217. package/mcp/lazy-tools.test.ts +152 -0
  218. package/mcp/lazy-tools.ts +41 -0
  219. package/mcp/server.ts +53 -34
  220. package/mcp/tools/discord/commands.ts +2 -0
  221. package/mcp/tools/tasks/module.ts +1 -12
  222. package/mcp/tools/telegram/receiver-server.ts +14 -14
  223. package/package.json +2 -1
  224. package/resource/dashboard/OFL.txt +93 -0
  225. package/resource/dashboard/poppins-300.woff2 +0 -0
  226. package/resource/dashboard/poppins-400.woff2 +0 -0
  227. package/resource/dashboard/poppins-500.woff2 +0 -0
  228. package/resource/dashboard/poppins-600.woff2 +0 -0
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateTokenReportHtml = generateTokenReportHtml;
4
+ const dashboard_range_1 = require("./dashboard-range");
5
+ const token_report_client_1 = require("./token-report-client");
6
+ const dashboard_presentation_1 = require("./dashboard-presentation");
7
+ const dashboard_theme_1 = require("./dashboard-theme");
8
+ function escape(value) {
9
+ return String(value ?? '').replace(/[&<>"']/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
10
+ }
11
+ function n(value) { return (0, dashboard_presentation_1.compactNumber)(value); }
12
+ function tools(label, names) {
13
+ return `<div title="${escape(names?.join(', ') || 'Not recorded')}">${label}: ${names == null ? '—' : n(names.length)}</div>`;
14
+ }
15
+ function cacheWrite(usage) {
16
+ const total = usage?.cacheCreationTokens;
17
+ if (total == null || total === 0)
18
+ return n(total);
19
+ const five = usage?.cacheCreation5mTokens, hour = usage?.cacheCreation1hTokens;
20
+ const durations = [...(five && five > 0 ? ['5m'] : []), ...(hour && hour > 0 ? ['1h'] : [])];
21
+ // A partial breakdown cannot label the duration of the whole total.
22
+ if (!durations.length || (five ?? 0) + (hour ?? 0) !== total)
23
+ return n(total);
24
+ const title = [...(five && five > 0 ? ['5m: ' + n(five) + ' tokens'] : []), ...(hour && hour > 0 ? ['1h: ' + n(hour) + ' tokens'] : [])].join(' · ');
25
+ return `<span class="cache-write" title="${escape(title)}">${n(total)} <span class="cache-duration">(${durations.join(' + ')})</span></span>`;
26
+ }
27
+ function requestDetails(requests, aggregate) {
28
+ if (!requests?.length)
29
+ return '<span class="muted">Per-request usage: —</span>';
30
+ const incomplete = aggregate && aggregate.totalTokens > requests.reduce((sum, request) => sum + request.usage.totalTokens, 0);
31
+ // Requests are captured oldest-first; show newest at the top.
32
+ const ordered = [...requests].reverse();
33
+ return `<div class="request-details"><h3>Observed model requests: ${requests.length}</h3>${incomplete ? '<p class="muted">Observed requests do not cover the full turn aggregate; additional request usage was not reported separately.</p>' : ''}<table><thead><tr><th>Request / model</th><th title="Uncached input only. Total input = input + cache write + cache read.">Input</th><th>Cache write</th><th>Cache read</th><th>Output</th><th>Total</th></tr></thead><tbody>${ordered.map(request => `<tr><td>${escape(request.id)}<br>${escape(request.model ?? '—')}</td><td>${n(request.usage.inputTokens)}</td><td>${cacheWrite(request.usage)}</td><td>${n(request.usage.cacheReadTokens)}</td><td>${n(request.usage.outputTokens)}</td><td>${n(request.usage.totalTokens)}</td></tr>`).join('')}</tbody></table></div>`;
34
+ }
35
+ const statusBadge = dashboard_presentation_1.taskStatusBadge;
36
+ function conversationDetails(turn) {
37
+ const inputs = turn.inputTexts?.map(text => `<pre>${escape(text)}</pre>`).join('') ?? '';
38
+ const assignment = turn.taskTitle === undefined ? '' : `<h3>Assignment</h3><pre>${escape(turn.taskTitle)}</pre>`;
39
+ const response = turn.responseText === undefined ? '' : `<h3>Response / result</h3><pre>${escape(turn.responseText)}</pre>`;
40
+ if (!inputs && !assignment && !response && !turn.state)
41
+ return '<p class="muted">Conversation / assignment details: —</p>';
42
+ return `<div class="conversation-details"><h3>Conversation / assignment / result</h3>${turn.state ? '<p class="turn-status"><span>Status</span> ' + statusBadge(turn.state) + '</p>' : ''}${turn.failureCode ? '<p><strong>Failure:</strong> ' + escape(turn.failureCode) + '</p>' : ''}${turn.state === 'failed' && turn.category === 'report' ? '<p class="muted">This progress/result reporting turn failed. It does not mean the worker task failed.</p>' : ''}${assignment}${inputs ? '<h3>Input</h3>' + inputs : ''}${response}</div>`;
43
+ }
44
+ /** Compact wait duration ("9s", "2m 21s", "1h 04m"). Input is untrusted: a missing or
45
+ * nonsensical value yields '' so the caller simply renders nothing. */
46
+ function waited(ms) {
47
+ if (typeof ms !== 'number' || !Number.isFinite(ms) || ms < 0)
48
+ return '';
49
+ const s = Math.round(ms / 1000);
50
+ if (s < 60)
51
+ return s + 's';
52
+ if (s < 3600)
53
+ return Math.floor(s / 60) + 'm ' + String(s % 60).padStart(2, '0') + 's';
54
+ return Math.floor(s / 3600) + 'h ' + String(Math.floor(s % 3600 / 60)).padStart(2, '0') + 'm';
55
+ }
56
+ /** The row's stable identity label.
57
+ *
58
+ * Every branch reads a STORED value: conversation_inputs.input_seq for an agent turn and
59
+ * task_attempts.generation for a worker turn. The previous fallback numbered rows by their
60
+ * position in the rendered page, so every existing row's "Turn #N" shifted as soon as a
61
+ * newer row landed (and paging changed it too). A row with neither stored value now says
62
+ * so instead of displaying a number that does not mean anything. */
63
+ function turnLabel(turn) {
64
+ if (turn.inputSequences?.length)
65
+ return 'Input #' + turn.inputSequences.join(', #');
66
+ if (typeof turn.attemptGeneration === 'number' && Number.isFinite(turn.attemptGeneration))
67
+ return 'Attempt #' + turn.attemptGeneration;
68
+ return 'Unnumbered turn';
69
+ }
70
+ function time(value) {
71
+ const date = new Date(value);
72
+ return Number.isFinite(date.getTime()) ? date.toLocaleString('en-GB', { timeZone: 'UTC', day: '2-digit', month: 'short', hour: '2-digit', minute: '2-digit', second: '2-digit' }) + ' UTC' : '—';
73
+ }
74
+ /** Turn/Date display: "Xs/m/h ago" within the last 24h (full datetime on hover),
75
+ * switching to the full inline datetime once older than a day. */
76
+ function relativeTime(value) {
77
+ const t = new Date(value).getTime();
78
+ const full = time(value);
79
+ if (!Number.isFinite(t))
80
+ return { label: '—', title: '' };
81
+ const diff = Date.now() - t, day = 86400000;
82
+ if (diff >= day || diff < 0)
83
+ return { label: full, title: full };
84
+ let label;
85
+ if (diff < 60000)
86
+ label = Math.max(1, Math.round(diff / 1000)) + 's ago';
87
+ else if (diff < 3600000)
88
+ label = Math.round(diff / 60000) + 'm ago';
89
+ else
90
+ label = Math.round(diff / 3600000) + 'h ago';
91
+ return { label, title: full };
92
+ }
93
+ function footprintHtml(footprint) {
94
+ const parts = (footprint?.rows || []).filter(r => (r.name.startsWith('↳ ') || r.name.startsWith('Agent gateway tool schemas')) && r.hasContent !== false && r.tokens != null && r.tokens > 0);
95
+ const total = parts.reduce((sum, r) => sum + r.tokens, 0);
96
+ const colors = ['#e98524', '#8e65d1', '#258fca', '#cf528b', '#359986', '#c19527', '#5c78d2', '#b66645', '#77843f', '#986499'];
97
+ const names = ['AGENTS.md', 'IDENTITY.md', 'SOUL.md', 'USER.md', 'MEMORY.md', 'HEARTBEAT.md', 'Skill catalog', 'Memory rules', 'Memory retrieval instructions'];
98
+ const color = (name) => { const i = names.indexOf(name.replace(/^↳ /, '')); return colors[i < 0 ? 9 : i]; };
99
+ const items = parts.map(r => { const name = r.name.replace(/^↳ /, ''); const source = footprint?.rows.find(row => row.name === name + ' · source file'); return { name, tokens: r.tokens, color: color(r.name), note: source?.tokens != null ? 'Included in bootstrap: ' + n(r.tokens) + '; full source file: ' + n(source.tokens) + ' estimated tokens.' : r.note }; });
100
+ return `<section id="report-footprint"><div class="report-toolbar"><h2 style="margin:0">Context bootstrap</h2><strong style="margin-left:auto">${total ? n(total) + ' estimated tokens' : '—'}</strong></div>${total ? `<div class="stacked-distribution" aria-label="Estimated context tokens by source">${items.map(r => `<span class="segment" style="background:${r.color};width:${r.tokens / total * 100}%" title="${escape(r.name)}: ${n(r.tokens)} tokens"></span>`).join('')}</div><div class="distribution-legend">${items.map(r => `<div class="distribution-item" title="${escape(r.note)}"><i style="background:${r.color}"></i><span>${escape(r.name)}</span><strong>${n(r.tokens)}</strong></div>`).join('')}</div>` : '<p class="muted">—</p>'}<p class="muted">Current CLAUDE.md sections after context budgets, plus Agent gateway tool schemas. Hover a file to compare its included portion with the full source file; MEMORY.md may be longer on disk. Estimated with cl100k_base, not historical turn attribution or the selected model’s exact token count. Excludes section headers, conversation history, runtime overlays, CLI instructions/tools and provider framing. ${footprint ? 'Checked ' + escape(time(footprint.observedAt)) + ' · refreshes every 30s.' : ''}</p></section>`;
101
+ }
102
+ function generateTokenReportHtml(agentId, report) {
103
+ const labels = { input: 'Agent · User input', report: 'Agent · Progress / results', worker: 'Worker' };
104
+ const categories = new Map();
105
+ for (const turn of report.turns.filter(t => t.usage))
106
+ categories.set(turn.category, (categories.get(turn.category) || 0) + (turn.usage?.totalTokens || 0));
107
+ if (report.distribution) {
108
+ categories.clear();
109
+ for (const item of report.distribution)
110
+ categories.set(item.category, item.tokens);
111
+ }
112
+ const total = [...categories.values()].reduce((a, b) => a + b, 0);
113
+ const roleMeasured = (role) => report.pagination ? (role === 'agent' ? report.totals.agentTokens !== null : report.totals.workerTokens !== null) : report.turns.some(t => t.role === role && t.usage);
114
+ const measured = report.pagination ? report.totals.totalTokens !== null : report.turns.some(t => t.usage);
115
+ const usageOf = (role) => report.usageByRole?.find(u => u.role === role);
116
+ // Cached share = cache-read tokens / (input + cache read + cache write); output is not context.
117
+ const cachedRatio = (input, cacheRead, cacheWrite) => { const base = input + cacheRead + cacheWrite; return base ? cacheRead / base * 100 : 0; };
118
+ const cachedLineFor = (u) => u ? `<span class="card-cached">Cached: <b>${cachedRatio(u.inputTokens, u.cacheReadTokens, u.cacheCreationTokens).toFixed(2)}%</b></span>` : '';
119
+ const agentU = usageOf('agent'), workerU = usageOf('worker');
120
+ const totalU = (agentU || workerU) ? { inputTokens: (agentU?.inputTokens || 0) + (workerU?.inputTokens || 0), cacheReadTokens: (agentU?.cacheReadTokens || 0) + (workerU?.cacheReadTokens || 0), cacheCreationTokens: (agentU?.cacheCreationTokens || 0) + (workerU?.cacheCreationTokens || 0) } : undefined;
121
+ const windowCap = (t) => t >= 1e6 ? +(t / 1e6).toFixed(2) + 'M' : Math.round(t / 1000) + 'K';
122
+ const cw = report.contextWindow;
123
+ // Use the same durable session status as the dashboard, independent of process teardown.
124
+ const headerStatus = report.activityStatus || 'stopped';
125
+ const cwStopped = headerStatus === 'stopped';
126
+ const contextWindowBox = `<div class="card box-context">Context window<strong>${cwStopped ? '-' : (cw ? n(cw.used) + ' / ' + (cw.total == null ? '—' : windowCap(cw.total)) : '—')}</strong>${!cwStopped && cw && cw.model ? `<span class="card-cached" title="${escape(cw.model)}">Model: ${escape(cw.model)}</span>` : ''}</div>`;
127
+ const models = [...new Set(report.turns.map(t => t.model).filter((m) => Boolean(m)))].sort();
128
+ // Fixed status buckets; raw turn/attempt states are mapped into these client-side.
129
+ const statusBuckets = [['running', 'Running'], ['completed', 'Completed'], ['ended', 'Ended'], ['fail', 'Fail']];
130
+ const scope = (0, dashboard_range_1.dashboardRange)(report.scope);
131
+ const link = (offset, selected = scope) => '?agentId=' + encodeURIComponent(agentId) + '&sessionId=' + encodeURIComponent(report.sessionId) + '&scope=' + selected + '&offset=' + offset;
132
+ const page = report.pagination;
133
+ // Accepted-but-not-yet-measured rows are not recorded turns, so they are counted
134
+ // separately rather than folded into the pager's "of N recorded turns".
135
+ const queued = report.turns.filter(t => t.pending).length;
136
+ const pager = page ? `<nav class="report-pager"><span>${page.total ? page.offset + 1 : 0}–${Math.min(page.offset + page.limit, page.total)} of ${page.total} recorded turns${queued ? ' · ' + queued + ' queued (not yet recorded)' : ''} · Newest first</span><span class="report-pager-nav"><button type="button" data-report-href="${escape(link(Math.max(0, page.offset - page.limit)))}"${page.offset > 0 ? '' : ' disabled'}>← Previous</button><button type="button" data-report-href="${escape(link(page.offset + page.limit))}"${page.offset + page.limit < page.total ? '' : ' disabled'}>Next →</button></span></nav>` : '';
137
+ const distribution = [...categories].map(([category, value]) => `<span class="segment ${escape(category)}" style="width:${total ? value / total * 100 : 0}%" title="${escape(labels[category] || category)}: ${n(value)}"></span>`).join('');
138
+ const legend = [...categories].map(([category, value]) => `<div class="distribution-item"><i class="${escape(category)}"></i><span>${escape(labels[category] || category)}</span><strong>${n(value)} · ${total ? (value / total * 100).toFixed(1) : '0.0'}%</strong></div>`).join('');
139
+ const turns = [...report.turns].sort((a, b) => new Date(b.startedAt).getTime() - new Date(a.startedAt).getTime() || b.id.localeCompare(a.id));
140
+ const rows = turns.map(turn => {
141
+ const modality = turn.inputModalities?.some(m => m === 'voice_note' || m === 'live_voice') ? 'Voice message' : 'Message';
142
+ const title = turn.category === 'report' ? (turn.responseText || turn.taskTitle || 'Task progress / results') : (turn.taskTitle || turn.inputTexts?.find(t => t.trim()) || turn.responseText || 'No conversation text recorded');
143
+ const number = turnLabel(turn);
144
+ const badge = turn.category === 'input' ? modality : labels[turn.category] || turn.category;
145
+ const started = relativeTime(turn.startedAt);
146
+ // Turns run one at a time per session by design, so a message can sit accepted for
147
+ // minutes before its own turn starts. Show that wait rather than leaving a slow turn
148
+ // looking broken; below ~2s it is just noise.
149
+ const wait = waited(turn.queuedMs);
150
+ const waitLine = turn.pending
151
+ ? `<small class="turn-wait" title="Accepted ${escape(time(turn.startedAt))}; waiting for the previous turn in this session to finish">Waiting ${escape(wait || '0s')}</small>`
152
+ : (wait && (turn.queuedMs ?? 0) >= 2000 ? `<small class="turn-wait" title="Time between accepting this message and its turn starting; turns run one at a time per session">Queued ${escape(wait)}</small>` : '');
153
+ const pendingNote = turn.pending ? '<p class="muted">This message has been accepted and is waiting for the previous turn in this session to finish. Token usage is recorded once its own turn runs, so this row is not counted in any total.</p>' : '';
154
+ return `<tr class="turn-row${turn.pending ? ' turn-pending' : ''}" tabindex="0" aria-expanded="false" data-turn-id="${escape(turn.id)}" data-category="${escape(turn.category)}" data-model="${escape(turn.model || '')}" data-status="${escape(turn.state || '')}"><td><strong>${escape(number)}</strong><small title="${escape(started.title)}">${escape(started.label)}</small>${waitLine}<small class="cell-model" title="${escape(turn.model)}">${escape(turn.model || '—')}</small></td><td><span class="turn-kind ${escape(turn.category)}">${escape(badge)}</span><strong class="turn-excerpt" title="${escape(title.slice(0, 1000))}">${escape(title.slice(0, 180))}${title.length > 180 ? '…' : ''}</strong>${turn.state ? statusBadge(turn.state) : ''}</td><td>${n(turn.usage?.inputTokens)}</td><td>${cacheWrite(turn.usage)}</td><td>${n(turn.usage?.cacheReadTokens)}</td><td>${n(turn.usage?.outputTokens)}</td><td><strong>${n(turn.usage?.totalTokens)}</strong></td><td>${turn.usage ? '<strong>' + cachedRatio(turn.usage.inputTokens, turn.usage.cacheReadTokens, turn.usage.cacheCreationTokens).toFixed(2) + '%</strong>' : '—'}</td><td>${tools('Loaded', turn.contextTools)}${tools('Used', turn.usedTools)}</td></tr><tr class="turn-extra" hidden data-turn-id="${escape(turn.id)}" data-category="${escape(turn.category)}"><td colspan="9"><h3>Conversation & request details</h3><p class="muted">Role: ${escape(turn.role)} · Turn ${escape(turn.id)}${turn.taskId ? ' · Task ' + escape(turn.taskId) : ''}${turn.endedAt ? ' · Ended ' + escape(time(turn.endedAt)) : ''}${wait ? ' · ' + escape(turn.pending ? 'Waiting ' + wait : 'Queued ' + wait + ' before starting') : ''}</p>${pendingNote}${conversationDetails(turn)}${requestDetails(turn.requests, turn.usage)}${turn.contextTools ? '<h3>Loaded tools</h3>' + (0, dashboard_presentation_1.toolNameList)(turn.contextTools) : ''}<h3>Used tools</h3>${(0, dashboard_presentation_1.toolNameList)(turn.usedTools)}<p class="muted">Loaded counts distinct schemas observed in requests, including referenced deferred tools. Used counts distinct tool names executed. ${turn.schemaCoverage ? `Schema capture: ${turn.schemaCoverage.measured}/${turn.schemaCoverage.total} observed requests.` : 'Schema capture was not recorded for this turn.'}</p></td></tr>`;
155
+ }).join('');
156
+ return `<!DOCTYPE html><html lang="en" data-theme="light"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Session token report · Claude Gateway</title>${dashboard_theme_1.dashboardFontLink}<style>${dashboard_theme_1.dashboardTheme}
157
+ body{padding:28px;background:var(--bg);color:var(--text);font:15px/1.7 system-ui,-apple-system,"Noto Sans Thai",sans-serif}main{max-width:1560px;margin:auto;min-width:0}h1{font-size:28px;margin:20px 0 12px}h2{font-size:17px;color:var(--text);margin:0 0 20px}.report-header{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:24px}.report-toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.cards .card{padding:22px}.card strong{display:block;font-size:30px;font-weight:500;margin-top:10px}section{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:22px;margin-top:22px}.muted{font-size:11px;color:var(--muted);overflow-wrap:anywhere}pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:400px;overflow:auto;background:var(--raised);padding:16px;border-radius:10px;font:12px/1.7 ui-monospace,monospace}a{color:var(--accent)}.report-pager{display:flex;gap:16px;justify-content:space-between;flex-wrap:wrap;font-size:12px;padding:18px 0}.report-pager-nav{display:inline-flex;gap:8px;flex-wrap:wrap}.turn-filters{align-items:stretch}.turn-filters .range-toggle button,.turn-filters select,.turn-filters input{font-size:12px}.turn-filters input{flex:1;min-width:160px;max-width:380px}.stacked-distribution{display:flex;height:24px;overflow:hidden;border-radius:8px;margin:14px 0 22px;background:var(--raised)}.segment{height:100%}.input{--category:#329eda}.report{--category:#ea8a23}.worker{--category:#9661d9}.segment+.segment{border-left:3px solid var(--panel)}.segment,.distribution-item i{background:var(--category)}.distribution-legend{display:flex;gap:24px;flex-wrap:wrap}.distribution-item{display:flex;gap:8px;align-items:center;font-size:11px}.distribution-item i{height:9px;width:9px;border-radius:3px}.turn-kind{display:inline-block;padding:3px 8px;border-radius:5px;background:color-mix(in srgb,var(--category) 12%,var(--panel));color:var(--category);font-size:10px;font-weight:550}.turn-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.7;margin:7px 0;font-weight:500}.cache-write{display:inline-flex;flex-wrap:wrap;gap:0 4px;max-width:100%;white-space:normal}.cache-duration{font-size:11px;color:var(--muted);white-space:nowrap}.report-table{width:100%;min-width:1000px;table-layout:fixed}.report-table>thead>tr>th,.report-table>tbody>.turn-row>td{padding:12px 8px}.report-table>tbody>.turn-row>td:nth-child(n+3){white-space:nowrap;font-size:14px}.report-table td:not(:first-child){font-variant-numeric:tabular-nums}.report-table .turn-extra td{padding-top:0}.turn-extra summary{font-size:11px;color:var(--muted);cursor:pointer}.turn-extra table{min-width:760px}.turn-extra details{margin:8px 0}.report-table details p{max-width:100%;overflow-wrap:anywhere;white-space:normal}.report-table th{white-space:normal;line-height:1.4}.report-table td small{font-size:10px}.report-table .turn-row>td:first-child>strong,.report-table .turn-row>td:first-child>small{display:block}.cell-model{overflow-wrap:anywhere;white-space:normal}.report-table td{border-bottom:0}.turn-extra td{border-bottom:1px solid var(--line)!important}.report-table details{font-size:11px}body[data-theme=dark]{color:var(--text)}@media(max-width:700px){body{padding:16px}.cards{grid-template-columns:1fr}section{padding:16px}}
158
+ .report-table,.footprint-table{font-size:13px;line-height:1.7}.report-table td small,.muted{font-size:12px}.turn-kind,.report-table details,.turn-extra summary,.distribution-item{font-size:12px}.turn-excerpt{font-weight:650}.report-table td>strong,.distribution-item strong,.footprint-table td:first-child,.footprint-table td:nth-child(2){font-weight:700}.report-table th,.footprint-table th{font-size:12px;letter-spacing:.03em}.footprint-table{min-width:800px;table-layout:fixed}.footprint-table th:first-child{width:30%}.footprint-table th:nth-child(2),.footprint-table th:nth-child(3){width:15%}.footprint-table td{overflow-wrap:anywhere}
159
+ .report-table .turn-extra{font-size:13px;line-height:1.7}.report-table .turn-extra p,.report-table .turn-extra .muted,.report-table .turn-extra summary,.report-table .turn-extra pre,.report-table .turn-extra td{font-size:13px;line-height:1.7}.report-table .turn-extra h3{font-size:13px;font-weight:700;margin:18px 0 8px}.report-table .turn-extra pre{font-family:inherit;font-weight:400}.turn-status{display:flex;align-items:center;gap:8px}.turn-status .badge{font-size:12px;font-weight:500}.turn-extra>td>details>summary{font-weight:600}
160
+ .report-table .turn-row[aria-expanded=true]{background:color-mix(in srgb,var(--accent) 14%,var(--panel))}.report-table .turn-pending{background:color-mix(in srgb,#a16c11 9%,var(--panel))}.report-table .turn-pending>td:first-child{box-shadow:inset 3px 0 0 #a16c11}.turn-wait{color:#a16c11;font-weight:600;overflow-wrap:anywhere;white-space:normal}#report-drawer h1{font-size:22px;margin:18px 0 12px}#report-drawer h3{font-size:14px;font-weight:700;margin:18px 0 8px}#report-drawer .muted{font-size:12px}#report-drawer table{width:100%;border-collapse:collapse;font-size:12px;margin:10px 0}#report-drawer th,#report-drawer td{padding:7px 8px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}#report-drawer .request-details,#report-drawer .conversation-details{margin-top:10px}#report-drawer [data-report-close]{float:right;border:1px solid var(--line);background:var(--panel);border-radius:8px;padding:6px 12px;font-size:12px}
161
+ </style></head><body><main><div class="report-toolbar"><a href="../dashboard">← Dashboard</a><span id="report-live" class="muted" role="status">Live · every 5s</span><button id="report-theme" style="margin-left:auto">Light / dark</button></div><h1>Session token report</h1><div class="report-header">${(0, dashboard_presentation_1.agentBadge)(agentId)}<span id="report-status">${statusBadge(headerStatus)}</span>${(0, dashboard_presentation_1.channelBadge)(report.source || '')}<span class="muted" title="${escape(report.sessionId)}">Session ${escape(report.sessionId)}</span>${(0, dashboard_range_1.rangeButtons)("report-scope", scope)}</div><div class="cards" id="report-totals">${contextWindowBox}<div class="card box-agent">Agent tokens<strong>${roleMeasured('agent') ? n(report.totals.agentTokens) : '—'}</strong>${roleMeasured('agent') ? cachedLineFor(agentU) : ''}</div><div class="card box-worker">Worker tokens<strong>${roleMeasured('worker') ? n(report.totals.workerTokens) : '—'}</strong>${roleMeasured('worker') ? cachedLineFor(workerU) : ''}</div><div class="card box-total">Total tokens<strong>${measured ? n(report.totals.totalTokens) : '—'}</strong>${measured ? cachedLineFor(totalU) : ''}</div></div><p class="muted">${report.since ? 'Turns started since ' + escape(time(report.since)) + '.' : 'All recorded turns.'} Totals include all pages. Token volume includes input, cache creation, cache reads and output; these percentages are not monetary costs. Missing measurements are shown as —. Input is the uncached portion; cache write creates cached context; cache read reuses context; output includes reported thinking. Total tokens is the sum of input, cache write, cache read and output.</p>${footprintHtml(report.contextFootprint)}<section id="report-distribution"><h2>Token distribution</h2>${total ? `<div class="stacked-distribution">${distribution}</div><div class="distribution-legend">${legend}</div>` : '<p>No recorded token usage.</p>'}</section><section><h2>Turn details</h2><div class="report-toolbar turn-filters"><div id="turn-category" class="range-toggle" role="group" aria-label="Filter turns on this page by purpose">${[['', 'All'], ['input', 'User input'], ['report', 'Progress / result'], ['worker', 'Worker']].map(([value, label]) => `<button type="button" data-purpose="${value}" aria-pressed="${value === ''}">${label}</button>`).join('')}</div><div id="turn-status" class="range-toggle" role="group" aria-label="Filter turns on this page by status"><button type="button" data-status="" aria-pressed="true">All</button>${statusBuckets.map(([value, label]) => `<button type="button" data-status="${value}" aria-pressed="false">${label}</button>`).join('')}</div><select id="turn-model" aria-label="Filter turns on this page by model"><option value="">All models</option>${models.map(m => `<option value="${escape(m)}">${escape(m)}</option>`).join('')}</select><input id="turn-search" placeholder="Search this page's messages or models" aria-label="Search turns on this page"></div>${pager}<div class="table-scroll"><table class="data-table report-table"><colgroup>${[120, 0, 96, 96, 96, 96, 96, 96, 96].map(width => width ? `<col style="width:${width}px">` : '<col>').join('')}</colgroup><thead><tr><th>Turn / Date</th><th>Conversation / assignment</th><th title="Uncached input only. Total input = input + cache write + cache read.">Input</th><th>Cache write</th><th>Cache read</th><th>Output</th><th>Totals</th><th title="Cache read ÷ (input + cache read + cache write)">%Cached</th><th>Tools</th></tr></thead><tbody>${rows || '<tr><td colspan="9">No recorded turns in this scope.</td></tr>'}</tbody></table></div>${pager}</section></main><div id="report-drawer-back" class="dash-drawer-back"><section id="report-drawer" class="dash-drawer" role="dialog" aria-modal="true" aria-label="Recorded turn details" tabindex="-1"></section></div><script>
162
+ document.getElementById('report-scope').onclick=function(e){var button=e.target.closest('[data-range]');if(!button)return;var url=new URL(location.href);url.searchParams.set('scope',button.dataset.range);url.searchParams.set('offset','0');location.href=url.href;};
163
+ document.getElementById('report-theme').onclick=function(){var r=document.documentElement;r.dataset.theme=r.dataset.theme==='dark'?'light':'dark';};
164
+ var reportSelected=null,reportFocus=null;
165
+ function reportExtraFor(id){var found=null;document.querySelectorAll('.turn-extra').forEach(function(r){if(r.dataset.turnId===id)found=r;});return found;}
166
+ function reportRenderDrawer(){
167
+ var back=document.getElementById('report-drawer-back'),panel=document.getElementById('report-drawer');
168
+ document.querySelectorAll('.turn-row').forEach(function(r){r.setAttribute('aria-expanded',String(Boolean(reportSelected)&&r.dataset.turnId===reportSelected));});
169
+ var extra=reportSelected?reportExtraFor(reportSelected):null,cell=extra?extra.querySelector('td'):null;
170
+ if(!reportSelected||!cell){reportSelected=null;back.classList.remove('open');document.body.style.overflow='';if(panel.dataset.turn!==undefined){panel.innerHTML='';delete panel.dataset.turn;delete panel.dataset.html;}document.querySelectorAll('.turn-row').forEach(function(r){r.setAttribute('aria-expanded','false');});return;}
171
+ var html='<button data-report-close aria-label="Close details">Close ×</button><h1>Turn details</h1>'+cell.innerHTML;
172
+ back.classList.add('open');document.body.style.overflow='hidden';
173
+ if(panel.dataset.turn===reportSelected&&panel.dataset.html===html)return;
174
+ var sameTurn=panel.dataset.turn===reportSelected,scroll=panel.scrollTop,focused=panel.contains(document.activeElement),closeFocused=document.activeElement&&document.activeElement.hasAttribute('data-report-close');
175
+ panel.innerHTML=html;panel.dataset.turn=reportSelected;panel.dataset.html=html;
176
+ if(sameTurn){panel.scrollTop=scroll;if(focused)(closeFocused?panel.querySelector('[data-report-close]'):panel).focus({preventScroll:true});}
177
+ }
178
+ function reportOpen(id){if(reportSelected!==id)reportFocus=document.activeElement;reportSelected=id;reportRenderDrawer();var p=document.getElementById('report-drawer');if(reportSelected&&!p.contains(document.activeElement))p.focus({preventScroll:true});}
179
+ function reportClose(){var was=reportSelected;reportSelected=null;reportRenderDrawer();if(was&&reportFocus&&reportFocus.isConnected)reportFocus.focus({preventScroll:true});}
180
+ function statusBucket(s){if(!s)return '';s=String(s).toLowerCase();if(s==='failed'||s==='error'||s==='failure')return 'fail';if(s==='completed'||s==='succeeded'||s==='success'||s==='done')return 'completed';if(s==='cancelled'||s==='canceled'||s==='ended'||s==='stopped'||s==='interrupted'||s==='idle')return 'ended';if(s==='compacting'||s==='running'||s==='working'||s==='thinking'||s==='queued'||s==='starting'||s==='recovering'||s==='interrupting'||s==='cancel_requested'||s==='waiting_input'||s==='needs_reconciliation'||s.indexOf('progress')>=0)return 'running';return '';}
181
+ function filter(){var btn=document.querySelector('#turn-category button[aria-pressed=true]'),category=btn?btn.dataset.purpose:'',model=document.getElementById('turn-model').value,query=document.getElementById('turn-search').value.toLowerCase();var buckets=[].slice.call(document.querySelectorAll('#turn-status button[aria-pressed=true]')).map(function(b){return b.dataset.status;}).filter(function(s){return s;});document.querySelectorAll('.turn-row').forEach(function(row){var extra=row.nextElementSibling;var show=(!category||row.dataset.category===category)&&(!model||row.dataset.model===model)&&(!buckets.length||buckets.indexOf(statusBucket(row.dataset.status))>=0)&&(!query||(row.textContent+(extra?extra.textContent:'')).toLowerCase().includes(query));row.hidden=!show;if(extra)extra.hidden=true;if(!show&&reportSelected===row.dataset.turnId)reportClose();});}
182
+ document.addEventListener('click',function(e){
183
+ if(e.target.closest('[data-report-close]')||e.target.id==='report-drawer-back'){reportClose();return;}
184
+ var row=e.target.closest('.turn-row');if(!row||e.target.closest('a,button,input,select'))return;
185
+ if(reportSelected===row.dataset.turnId)reportClose();else reportOpen(row.dataset.turnId);
186
+ });
187
+ document.addEventListener('keydown',function(e){
188
+ if(e.key==='Escape'&&reportSelected){reportClose();return;}
189
+ if((e.key==='Enter'||e.key===' ')&&e.target.matches('.turn-row')){e.preventDefault();e.target.click();return;}
190
+ if(e.key==='Tab'&&document.getElementById('report-drawer-back').classList.contains('open')){var panel=document.getElementById('report-drawer'),nodes=[].slice.call(panel.querySelectorAll('button,a,summary,input,select')).filter(function(nd){return nd.getClientRects().length;});var first=nodes[0],last=nodes[nodes.length-1];if(e.shiftKey&&(document.activeElement===first||document.activeElement===panel)){e.preventDefault();if(last)last.focus();}else if(!e.shiftKey&&document.activeElement===last){e.preventDefault();if(first)first.focus();}}
191
+ });
192
+ document.getElementById('turn-category').addEventListener('click',function(e){var b=e.target.closest('button[data-purpose]');if(!b)return;this.querySelectorAll('button').forEach(function(x){x.setAttribute('aria-pressed',String(x===b));});filter();});
193
+ var turnStatus=document.getElementById('turn-status');
194
+ if(turnStatus)turnStatus.addEventListener('click',function(e){var b=e.target.closest('button[data-status]');if(!b)return;var all=this.querySelector('button[data-status=""]');if(b===all){this.querySelectorAll('button').forEach(function(x){x.setAttribute('aria-pressed',String(x===all));});}else{b.setAttribute('aria-pressed',String(b.getAttribute('aria-pressed')!=='true'));var any=[].slice.call(this.querySelectorAll('button[data-status]')).some(function(x){return x.dataset.status&&x.getAttribute('aria-pressed')==='true';});if(all)all.setAttribute('aria-pressed',String(!any));}filter();});
195
+ document.getElementById('turn-model').onchange=filter;document.getElementById('turn-search').oninput=filter;
196
+ document.addEventListener('click',function(e){var b=e.target.closest('[data-report-href]');if(!b||b.disabled)return;var href=b.getAttribute('data-report-href');if(href)location.href=href;});
197
+ ${token_report_client_1.tokenReportClient}
198
+ </script></body></html>`;
199
+ }
200
+ //# sourceMappingURL=token-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-report.js","sourceRoot":"","sources":["../../src/ui/token-report.ts"],"names":[],"mappings":";;AAmHA,0DA4FC;AA9MD,uDAAiE;AAEjE,+DAA0D;AAC1D,qEAAkH;AAClH,uDAAsE;AA8BtE,SAAS,MAAM,CAAC,KAAc;IAC5B,OAAO,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;AACrI,CAAC;AACD,SAAS,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D"}
1
+ {"version":3,"file":"web-ui.d.ts","sourceRoot":"","sources":["../../src/ui/web-ui.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CA07D9C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,SAAK,GAAG,MAAM,CA6F7D"}