dsh-trust-panel 0.0.0-stage → 0.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.
- package/LICENSE +21 -0
- package/README.md +94 -2
- package/client/index.js +604 -0
- package/cordis.patch.yml +6 -0
- package/docs/demo.gif +0 -0
- package/lib/aggregate.d.ts +21 -0
- package/lib/aggregate.js +197 -0
- package/lib/aggregate.js.map +1 -0
- package/lib/bus.d.ts +12 -0
- package/lib/bus.js +63 -0
- package/lib/bus.js.map +1 -0
- package/lib/index.d.ts +45 -0
- package/lib/index.js +118 -0
- package/lib/index.js.map +1 -0
- package/lib/translate.d.ts +49 -0
- package/lib/translate.js +178 -0
- package/lib/translate.js.map +1 -0
- package/lib/types.d.ts +65 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/package.json +70 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 zhengqiuyang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,95 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-trust-panel
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **If this helps you, please give it a star** — it helps others find it. Thanks!
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
One plain-language dashboard for the [dsh trust family](https://github.com/zhengqiuyang/dsh-trust-suite) in your
|
|
8
|
+
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (dsh) web sidebar: every interception,
|
|
9
|
+
denial, drift and forgotten constraint across nine channels, translated into sentences a non-security
|
|
10
|
+
user can read and act on. Zero LLM calls.
|
|
11
|
+
|
|
12
|
+
## What you see
|
|
13
|
+
|
|
14
|
+
A status light, nine channel rows, and event cards — that's it:
|
|
15
|
+
|
|
16
|
+
- 🟢 **All clear — nothing suspicious**
|
|
17
|
+
- 🟡 **Caught a few things for you — all handled, nothing to do**
|
|
18
|
+
- 🔴 **{n} thing(s) worth a look (below)** — each such card carries a **Got it** button; acknowledging it clears the state, and the light falls back on its own
|
|
19
|
+
|
|
20
|
+
Every event answers the same four questions in order: *who, what they tried, what we did about it,
|
|
21
|
+
whether you must act.* Engine jargon (`INSTR_OVERRIDE`, hash-chain digests, surface drift) stays in the
|
|
22
|
+
expandable detail; the headline is a sentence like:
|
|
23
|
+
|
|
24
|
+
> Something the agent read tried to send your credentials somewhere. It was quarantined — the agent did not follow it.
|
|
25
|
+
>
|
|
26
|
+
> A long conversation was summarized — the agent forgot 2 of your instructions. They were re-inserted automatically.
|
|
27
|
+
>
|
|
28
|
+
> The tools available to your agent changed since the last checkpoint. 1 removed: janitor_scan.
|
|
29
|
+
|
|
30
|
+
A first-run intro card explains the light and the row semantics in one glance; it dismisses with one
|
|
31
|
+
click and stays dismissed.
|
|
32
|
+
|
|
33
|
+
## Bilingual (zh/en)
|
|
34
|
+
|
|
35
|
+
The panel follows the DSH i18n system: events travel from the host as **translation keys +
|
|
36
|
+
params**, the client renders them through its zh/en dictionaries with the host's `locale` service
|
|
37
|
+
(language switches live, browser language as fallback). A regression test pins the contract: every
|
|
38
|
+
key the host can produce must exist in both dictionaries.
|
|
39
|
+
|
|
40
|
+
State-like events (tool-surface / prompt / composition drift) carry a **content-derived stable id**:
|
|
41
|
+
acknowledging one sticks across polling, and a genuinely new drift arrives as a genuinely new card.
|
|
42
|
+
|
|
43
|
+
## The nine channels
|
|
44
|
+
|
|
45
|
+
| Channel | Source | What it watches |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| What the agent reads | [dsh-read-guard](https://github.com/zhengqiuyang/dsh-read-guard) | prompt injection in files and fetches |
|
|
48
|
+
| What the agent changes | [dsh-pr-gate](https://github.com/zhengqiuyang/dsh-pr-gate) | writes outside the promised scope |
|
|
49
|
+
| The activity record | [dsh-attest-chain](https://github.com/zhengqiuyang/dsh-attest-chain) | tampering with the custody ledger (verified live) |
|
|
50
|
+
| The tools it can use | [dsh-mcp-test](https://github.com/zhengqiuyang/dsh-mcp-test) | registry drift vs baseline |
|
|
51
|
+
| Leftovers in your workspace | [dsh-janitor](https://github.com/zhengqiuyang/dsh-janitor) | scan verdicts |
|
|
52
|
+
| Where data is sent | [dsh-egress-gate](https://github.com/zhengqiuyang/dsh-egress-gate) | destinations outside the allow list |
|
|
53
|
+
| The instructions it starts with | [dsh-prompt-drift](https://github.com/zhengqiuyang/dsh-prompt-drift) | system-prompt changes |
|
|
54
|
+
| The plugins that are loaded | [dsh-freeze](https://github.com/zhengqiuyang/dsh-freeze) | profile composition |
|
|
55
|
+
| What it remembers | [dsh-compaction-guard](https://github.com/zhengqiuyang/dsh-compaction-guard) | constraints lost to compaction |
|
|
56
|
+
|
|
57
|
+
Channels report `not installed` when their plugin/data source is absent — the panel degrades
|
|
58
|
+
gracefully and still works standalone: the read/egress engines run from the panel's own
|
|
59
|
+
npm dependencies, so injection and egress events appear even without the sibling plugins.
|
|
60
|
+
|
|
61
|
+
## Install
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
dsh plugin --profile web add dsh-trust-panel
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Configuration (in `cordis.yml`): `eventsPath` (panel event log), `maxEvents`, and the
|
|
68
|
+
`allow`/`deny` domain lists used by the built-in egress mirror.
|
|
69
|
+
|
|
70
|
+
## Design notes
|
|
71
|
+
|
|
72
|
+
- **The trust path stays deterministic** — the panel only reads files and harness events; it never calls a model.
|
|
73
|
+
- **Translation, not display** — the engine terminology the family logs internally is mapped to plain sentences in `translate.ts`; the mapping is unit-tested, so a rule rename cannot silently regress the wording.
|
|
74
|
+
- **Poll, don't push (v0.1)** — the client polls `/trust-panel/api/summary` every 5 s; a WebSocket upgrade can come later without changing the model.
|
|
75
|
+
- **Web client modules are not plain ESM** — dsh's web runtime loads client halves through its `window.__ModuleLoader__` module table (react arrives via that table's `require`, not a bundler). This package authors its client directly in that format and ships it unbuilt; a rolldown build is unnecessary at this size. Undocumented upstream, learned the hard way.
|
|
76
|
+
- **Native sidebar tabs are address-driven** — registering a tab kind shows nothing until the `sidebarRight` controller opens it; the panel calls `openTab` once per session so the light is visible out of the box.
|
|
77
|
+
|
|
78
|
+
## Kill criteria
|
|
79
|
+
|
|
80
|
+
If the family's engines change their ledger formats in incompatible ways and the sync
|
|
81
|
+
cannot be maintained, this panel should be retired rather than show stale or wrong
|
|
82
|
+
translations — a trust UI that lies is worse than none.
|
|
83
|
+
|
|
84
|
+
## Compatibility
|
|
85
|
+
|
|
86
|
+
- Verified on DSH 0.2.x (source snapshot 0.2.1-alpha.2, 2026-10-19): disposable-profile
|
|
87
|
+
install → boot → right-sidebar tab compose → `/trust-panel/api/summary` responds with
|
|
88
|
+
live aggregation (including a true-positive tool-surface drift detection during the
|
|
89
|
+
verification boot), Chinese rendering verified in-browser, acknowledge flow verified
|
|
90
|
+
across poll cycles by browser automation.
|
|
91
|
+
- Node ≥ 20.
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT
|