Files
plugins/packages/company-guard/page/dashboard.html
T
cyanask 8059af3148 company-guard 0.4.6: custom rules, history and receipt recovery (#1173)
What changes:
- Custom rules: you can manage your own masking rules (aliases, checks for duplicates and limits, warnings before discarding edits) on their own subpage.
- History: rule-version and authorization history, up to 100 entries.
- Masking: tool schemas' enum, const, default and examples values are now masked.
- Receipts: a damaged receipt keeps the stages that are still valid.
- Dist check: `npm test` first checks that dist matches its source.

Version 0.4.3 to 0.4.6.

Run at 13ad10a8 on mica, which merges cleanly over 13a6f4c2:
- `bun test packages/company-guard`: 33 pass, 0 fail.
- `node --test`: 33 pass, 0 fail.
- `bun scripts/check.mjs company-guard`: ok.

What was read:
- The dist diff, line by line against src/protocols.js and src/session-authorization.js.
- The new rules.js fetch: it only calls the page's own receipt routes, the same as authorization.js.

Not run: `build.mjs --check`. esbuild isn't installed on the test box.

Co-authored-by: cyanask <44457432+cyanask@users.noreply.github.com>
2026-11-15 23:43:15 +08:00

25 lines
3.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>脱敏回执</title><script src="bridge.js"></script><link rel="stylesheet" href="style.css"><script src="app.js" defer></script></head>
<body><main><header class="page-topbar"><h1 class="sr-only">脱敏回执</h1><nav class="tabs" aria-label="公司名称保护"><a href="session-authorization.html">会话授权</a><a href="rules.html">脱敏规则</a><a href="./" aria-current="page">脱敏回执</a></nav><p class="page-description">查看最近25个请求的脱敏与还原结果。</p></header>
<section id="receipts-panel" aria-label="脱敏回执">
<form id="filters" class="filters">
<label>日期(UTC)<input id="date" type="date" required></label>
<label>智能体<select id="agent"><option value="">全部智能体</option></select></label>
<label class="task-filter">任务<select id="task"><option value="">全部任务</option></select></label>
<button id="refresh" type="button">刷新</button><label class="auto"><input id="auto" type="checkbox" checked>自动刷新</label>
</form>
<div class="summary-line"><div id="totals" aria-label="当前筛选汇总"></div><span id="notice" role="status" aria-live="polite">正在读取…</span></div>
<p id="receipt-health" class="detail-message" role="status" hidden></p>
<p id="diagnostics" class="detail-message" role="status" hidden></p>
<section aria-label="逐请求回执">
<div class="table-wrap" tabindex="0" aria-label="回执表格,可横向滚动">
<table class="requests"><thead><tr><th>时间(北京)</th><th>智能体</th><th>任务 / 请求</th><th class="number">名称 / 替换处数</th><th class="number">还原名称</th><th class="number">用时</th><th>明细</th></tr></thead><tbody id="rows"></tbody></table>
</div>
<p id="empty" hidden>当前筛选没有匹配回执(仅保留最近25个请求),不能据此判断请求已受保护。</p>
</section>
<details class="explanation"><summary>记录说明 · 仅本机查看</summary><p>回执列表与替换明细按所有任务合计保留最近 25 个请求,超过后自动清理最早记录。清理不影响正在处理的请求还原。明细最多保留30分钟,也可能因内存容量上限提前淘汰,只存内存,重启插件后清空;旧明细不能补出原名。自动刷新间隔为 10 秒,展开明细时暂停。</p><p>汇总按已完成、待完成确认、需关注三组展示。已完成包含已脱敏、授权放行和未命中;需关注包含确认缺失、调用未完成和处理失败,具体原因见明细。回复已通过流式处理并正常结束时,可通过流式记录确认完成;缺少独立完成通知会在明细中说明。等待完成通知不证明请求仍在运行;调用未完成可能由取消、上游失败或采集超限造成。未命中不代表没有敏感名称;回复未使用代号时,还原数可以为 0。</p><p>日期按 UTC 归档,时间按北京显示。日期和任务筛选只作用于保留的最近 25 个请求。已取得的处理确认随回执保存;复核报告另外保留固定样本的确认快照。智能体来源取自请求及本机索引,旧记录无法核实时显示“来源未记录”。</p></details>
</section>
</main></body></html>