dsh-fast 0.1.1
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/CHANGELOG.md +21 -0
- package/LICENSE +201 -0
- package/README.es.md +166 -0
- package/README.hi.md +166 -0
- package/README.md +166 -0
- package/README.pt.md +166 -0
- package/README.zh.md +166 -0
- package/THIRD_PARTY_NOTICES.md +20 -0
- package/cordis.patch.yml +55 -0
- package/lib/index.js +844 -0
- package/lib/types/analyze.d.ts +41 -0
- package/lib/types/analyze.d.ts.map +1 -0
- package/lib/types/analyze.js +121 -0
- package/lib/types/analyze.js.map +1 -0
- package/lib/types/collector.d.ts +82 -0
- package/lib/types/collector.d.ts.map +1 -0
- package/lib/types/collector.js +236 -0
- package/lib/types/collector.js.map +1 -0
- package/lib/types/config.d.ts +76 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/config.js +93 -0
- package/lib/types/config.js.map +1 -0
- package/lib/types/estimate.d.ts +24 -0
- package/lib/types/estimate.d.ts.map +1 -0
- package/lib/types/estimate.js +37 -0
- package/lib/types/estimate.js.map +1 -0
- package/lib/types/index.d.ts +35 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +201 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/model.d.ts +91 -0
- package/lib/types/model.d.ts.map +1 -0
- package/lib/types/model.js +11 -0
- package/lib/types/model.js.map +1 -0
- package/lib/types/sanitize.d.ts +33 -0
- package/lib/types/sanitize.d.ts.map +1 -0
- package/lib/types/sanitize.js +59 -0
- package/lib/types/sanitize.js.map +1 -0
- package/lib/types/store.d.ts +74 -0
- package/lib/types/store.d.ts.map +1 -0
- package/lib/types/store.js +84 -0
- package/lib/types/store.js.map +1 -0
- package/lib/types/version.d.ts +3 -0
- package/lib/types/version.d.ts.map +1 -0
- package/lib/types/version.js +3 -0
- package/lib/types/version.js.map +1 -0
- package/package.json +147 -0
- package/src/analyze.ts +148 -0
- package/src/collector.ts +289 -0
- package/src/config.ts +163 -0
- package/src/estimate.ts +41 -0
- package/src/index.ts +235 -0
- package/src/model.ts +98 -0
- package/src/sanitize.ts +60 -0
- package/src/store.ts +100 -0
- package/src/version.ts +2 -0
package/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# ⚡ dsh-fast
|
|
4
|
+
|
|
5
|
+
**Read-only performance diagnostics for DeepSeek Harness.**
|
|
6
|
+
|
|
7
|
+
*Observes the session event stream — never the model hot path — and reports where latency and context budget actually go.*
|
|
8
|
+
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://github.com/topics/dsh-plugin)
|
|
11
|
+
[](#)
|
|
12
|
+
[](https://github.com/PerryLink/dsh-fast/actions)
|
|
13
|
+
[](https://github.com/PerryLink/dsh-fast/releases)
|
|
14
|
+
[](https://www.npmjs.com/package/dsh-fast)
|
|
15
|
+
[](https://www.npmjs.com/package/dsh-fast)
|
|
16
|
+
|
|
17
|
+
[English](README.md) · [简体中文](README.zh.md) · [Español](README.es.md) · [Português](README.pt.md) · [हिन्दी](README.hi.md)
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Compatibility
|
|
24
|
+
|
|
25
|
+
- DeepSeek Harness `0.1.0-rc.6` (peers pinned to `0.1.0-rc.6`).
|
|
26
|
+
- Node `^22.19.0 || >=24.0.0`, ESM only (`"type": "module"`).
|
|
27
|
+
- Peer dependencies: `@deepseek-ai/cordis ^4.0.1`, `@deepseek-ai/schemastery ^3.18.0`, and `@deepseek-ai/dsh-session`, `@deepseek-ai/dsh-tools`, `@deepseek-ai/dsh-commands`, `@deepseek-ai/dsh-compaction`, `@deepseek-ai/dsh-storage-domain` at `0.1.0-rc.6`.
|
|
28
|
+
|
|
29
|
+
## What you get
|
|
30
|
+
|
|
31
|
+
- **Session load timing** — publication-to-first-request latency, classified `open` (fresh) vs `restore` (seeded/resumed), plus the restored seed-event count.
|
|
32
|
+
- **Spill-hit statistics** — how many tool results were spilled to a session-scoped artifact (detected from the durable spill notice).
|
|
33
|
+
- **Compaction count and trigger** — total compactions, split `manual` (slash command) vs `automatic` (pressure), and total shadowed tokens.
|
|
34
|
+
- **Context-injection volume** — system-prompt (AGENTS.md + skills + persona), tool-schema, and surface tokens with their shares of the total.
|
|
35
|
+
- **LLM cache hit rate** — input / cache-read / cache-write / output tokens aggregated from provider usage, plus the derived hit rate.
|
|
36
|
+
- **Optimization suggestions** — threshold-driven notes (trim skills, tighten tool schemas, compact earlier, enable prompt caching, enable spill-policy, …).
|
|
37
|
+
- **Async sampling** — metrics are folded O(1) per event and snapshotted on a timer, never on the append path.
|
|
38
|
+
|
|
39
|
+
## Quick start
|
|
40
|
+
|
|
41
|
+
### git channel
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
# From a scratch profile (pins the commit; runs the self-contained `prepare` build)
|
|
45
|
+
dsh plugin --profile demo add "github:YOUR_ORG/dsh-fast#<sha>"
|
|
46
|
+
# The profile's pnpm-workspace.yaml gains an allowBuilds entry for dsh-fast on first add.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### npm channel
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
dsh plugin --profile demo add dsh-fast
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Both channels install the bundle row (see `cordis.patch.yml`) into the profile's `dsh.profile.bundles` stack and take effect on restart.
|
|
56
|
+
|
|
57
|
+
## Install & uninstall
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
dsh plugin --profile demo add dsh-fast # install
|
|
61
|
+
dsh plugin --profile demo remove dsh-fast # uninstall
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Verify the row mounts: `dsh --profile demo --dump-config | grep dsh-fast`.
|
|
65
|
+
|
|
66
|
+
## Configuration
|
|
67
|
+
|
|
68
|
+
All tunables are Schemastery `Config` fields; invalid values fail the profile load loudly.
|
|
69
|
+
|
|
70
|
+
| Key | Default | Description |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| `enabled` | `true` | Master switch; `false` mounts nothing. |
|
|
73
|
+
| `privacy.includeCwd` | `false` | Include the sanitized session working directory in reports. |
|
|
74
|
+
| `sampling.snapshotIntervalMs` | `60000` | How often active sessions are sampled (ms). |
|
|
75
|
+
| `sampling.maxHistorySamples` | `20` | Samples retained per session in the durable history. |
|
|
76
|
+
| `thresholds.systemPromptTokens` | `20000` | Warn when the system prompt exceeds this many tokens. |
|
|
77
|
+
| `thresholds.toolSchemaTokens` | `8000` | Warn when the tool schema exceeds this many tokens. |
|
|
78
|
+
| `thresholds.surfaceTokens` | `60000` | Warn when the conversation surface exceeds this many tokens. |
|
|
79
|
+
| `thresholds.cacheHitRateFloor` | `0.1` | Warn when the cache hit rate falls below this (0..1). |
|
|
80
|
+
| `thresholds.compactionCountWarn` | `10` | Warn once this many compactions have triggered. |
|
|
81
|
+
| `thresholds.compactionShadowTokens` | `40000` | Warn when the average shadowed token count per summary exceeds this. |
|
|
82
|
+
| `spill.detectSpilledResults` | `true` | Detect spilled tool results from the durable notice marker. |
|
|
83
|
+
|
|
84
|
+
## Tools & surfaces
|
|
85
|
+
|
|
86
|
+
- **`/fast`** — a human slash command that prints the current session's health report: load timing, spill, compaction, context-volume ranking, cache hit rate, and suggestions.
|
|
87
|
+
- **`fast_report`** — a model tool returning the same report as structured JSON (so the model can reason over it), with a human-readable text render.
|
|
88
|
+
|
|
89
|
+
## Permissions & data
|
|
90
|
+
|
|
91
|
+
`dsh-fast` consumes only public seams: `session/*` and `agent/*` events, the optional `ctx.tokenMeter`, `ctx.storageDomain`, `ctx.commands`, and `ctx.tools`. It is strictly read-only over the session log — it never mutates the model request, tool results, or the session surface. Metrics are persisted to the `dsh_fast` storage domain (one bounded history per session), not to the session log. Report identity and the optional working directory are sanitized before any display or durable write.
|
|
92
|
+
|
|
93
|
+
## Security boundaries
|
|
94
|
+
|
|
95
|
+
- **Read-only, zero model-path overhead** — folding is O(1) per event; sampling runs on a timer.
|
|
96
|
+
- **No network, no credential handling** — the plugin makes no outbound requests and stores nothing sensitive.
|
|
97
|
+
- **Fail-loud configuration** — every tunable is validated at mount; invalid bounds throw.
|
|
98
|
+
- **Sanitized display/durable data** — control characters are stripped and strings are budgeted; `cwd` is off by default and path-truncated when enabled.
|
|
99
|
+
- **Reversible registrations** — every contribution goes through `ctx.effect()` / `ctx.on()` / `register()`, so uninstall and hot reload are clean.
|
|
100
|
+
|
|
101
|
+
## Known limitations
|
|
102
|
+
|
|
103
|
+
- **Storage domain, not session events** — rc.6 `Session.append` offers no `ignorable` marker and no external event-registration surface, so a custom `fast/*` session event would make the persistence coordinator refuse the log on restore. Metrics are therefore persisted to the storage domain; the raw events remain the reconstructable source of truth.
|
|
104
|
+
- **Spill detection is heuristic** — it reads the durable spill notice (`Full … stored at:`); no dedicated session event exists.
|
|
105
|
+
- **System prompt is one bucket** — AGENTS.md, skill directory, and persona are all part of the assembled system prompt; the header carries no per-section token accounting, so they are reported together.
|
|
106
|
+
- **Load timing starts at publication** — the disk-read portion of a restore happens before `session/created` (owned by `sessionPersistence`) and is not observable from this plugin's allowed events; the reported duration is publication-to-first-request.
|
|
107
|
+
|
|
108
|
+
## Development
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
pnpm install
|
|
112
|
+
pnpm run typecheck && pnpm run typecheck:ci
|
|
113
|
+
pnpm test
|
|
114
|
+
pnpm run build
|
|
115
|
+
pnpm run verify:self-contained && pnpm run verify:artifacts
|
|
116
|
+
node scripts/check-readme-sync.mjs
|
|
117
|
+
pnpm pack
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Topics
|
|
121
|
+
|
|
122
|
+
`dsh`, `dsh-plugin`, `deepseek-harness`, `deepseek`, `cordis`, `performance`, `diagnostics`, `profiling`, `context-engineering`, `llm-cache`
|
|
123
|
+
|
|
124
|
+
## Contributors
|
|
125
|
+
|
|
126
|
+
`dsh-fast` contributors.
|
|
127
|
+
|
|
128
|
+
## PerryLink DSH Plugin Family
|
|
129
|
+
|
|
130
|
+
This project is one of the [29 DeepSeek Harness plugins](https://github.com/PerryLink) maintained by [PerryLink](https://github.com/PerryLink). If this one helps you, the others likely will too:
|
|
131
|
+
|
|
132
|
+
| Plugin | One-liner |
|
|
133
|
+
|---|---|
|
|
134
|
+
| [dsh-auto-review](https://github.com/PerryLink/dsh-auto-review) | Second-model auto-review on the approval chain, fail-closed by default |
|
|
135
|
+
| [dsh-background-agents](https://github.com/PerryLink/dsh-background-agents) | Durable background child agents with a Web UI sidebar, messaging and interrupt |
|
|
136
|
+
| [dsh-budget](https://github.com/PerryLink/dsh-budget) | Cost governance for DeepSeek Harness: budgets, carbon, and latency in one panel. |
|
|
137
|
+
| [dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind) | Claude Code /rewind-equivalent: snapshots, session forks, one-shot restore |
|
|
138
|
+
| [dsh-claude-move](https://github.com/PerryLink/dsh-claude-move) | Migrate Claude Code sessions, memory, skills and CLAUDE.md into DSH |
|
|
139
|
+
| [dsh-click](https://github.com/PerryLink/dsh-click) | Cross-platform native desktop control for DeepSeek Harness — Windows first. |
|
|
140
|
+
| [dsh-composer-history](https://github.com/PerryLink/dsh-composer-history) | Terminal-style input history for the web composer: arrows, Ctrl+R search |
|
|
141
|
+
| [dsh-defend](https://github.com/PerryLink/dsh-defend) | Prompt-injection, jailbreak, and secret-leak defense for DeepSeek Harness. |
|
|
142
|
+
| [dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck) | Engineering-discipline guard: requirements grill, test gates, adversary review |
|
|
143
|
+
| [dsh-draw](https://github.com/PerryLink/dsh-draw) | Unified static-image generation routing for DeepSeek Harness. |
|
|
144
|
+
| **[dsh-fast](https://github.com/PerryLink/dsh-fast)** | Read-only performance diagnostics for DeepSeek Harness. |
|
|
145
|
+
| [dsh-github](https://github.com/PerryLink/dsh-github) | GitHub PR/issues integration for DSH, every write gated by approval |
|
|
146
|
+
| [dsh-library](https://github.com/PerryLink/dsh-library) | Local document knowledge base for DeepSeek Harness. |
|
|
147
|
+
| [dsh-local-ai](https://github.com/PerryLink/dsh-local-ai) | Local-model (Ollama) integration for DeepSeek Harness. |
|
|
148
|
+
| [dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions) | LSP diagnostics, formatting, completion, code actions and rename over language servers |
|
|
149
|
+
| [dsh-mask](https://github.com/PerryLink/dsh-mask) | PII masking middleware for DeepSeek Harness — anonymize personal data before it reaches the model, restore it at the display layer. |
|
|
150
|
+
| [dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel) | Read-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors |
|
|
151
|
+
| [dsh-memento](https://github.com/PerryLink/dsh-memento) | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool |
|
|
152
|
+
| [dsh-observe](https://github.com/PerryLink/dsh-observe) | OpenTelemetry and Langfuse observability exporter for DeepSeek Harness. |
|
|
153
|
+
| [dsh-output-styles](https://github.com/PerryLink/dsh-output-styles) | Claude Code outputStyles-equivalent runtime style switching |
|
|
154
|
+
| [dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules) | Claude Code-style declarative allow/deny/ask permission rules with audit |
|
|
155
|
+
| [dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide) | Plugin-development knowledge base as an on-demand agent skill |
|
|
156
|
+
| [dsh-score](https://github.com/PerryLink/dsh-score) | Multi-dimensional quality scoring for DeepSeek Harness plugins. |
|
|
157
|
+
| [dsh-session-pin](https://github.com/PerryLink/dsh-session-pin) | Pin sessions in the Web sidebar with durable ordering |
|
|
158
|
+
| [dsh-session-sync](https://github.com/PerryLink/dsh-session-sync) | Cross-device session sync for DeepSeek Harness — a dedicated git mirror of your session store. |
|
|
159
|
+
| [dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security) | Security-audit skill pack: secret scan, dependency and supply-chain review |
|
|
160
|
+
| [dsh-talk](https://github.com/PerryLink/dsh-talk) | Voice-first session loop for DeepSeek Harness: talk to it, hear it answer. |
|
|
161
|
+
| [dsh-test-drive](https://github.com/PerryLink/dsh-test-drive) | Isolated install-and-smoke test drives for DeepSeek Harness plugins. |
|
|
162
|
+
| [dsh-translate](https://github.com/PerryLink/dsh-translate) | Vendor parameter translation and deterministic JSON repair for DeepSeek Harness. |
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
Apache-2.0 — see [LICENSE](LICENSE).
|
package/README.pt.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# ⚡ dsh-fast
|
|
4
|
+
|
|
5
|
+
**Diagnóstico de desempenho somente leitura para DeepSeek Harness.**
|
|
6
|
+
|
|
7
|
+
*Observa o fluxo de eventos da sessão — nunca o caminho quente do modelo — e informa para onde vão a latência e o orçamento de contexto.*
|
|
8
|
+
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://github.com/topics/dsh-plugin)
|
|
11
|
+
[](#)
|
|
12
|
+
[](https://github.com/PerryLink/dsh-fast/actions)
|
|
13
|
+
[](https://github.com/PerryLink/dsh-fast/releases)
|
|
14
|
+
[](https://www.npmjs.com/package/dsh-fast)
|
|
15
|
+
[](https://www.npmjs.com/package/dsh-fast)
|
|
16
|
+
|
|
17
|
+
[English](README.md) · [简体中文](README.zh.md) · [Español](README.es.md) · [Português](README.pt.md) · [हिन्दी](README.hi.md)
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Compatibility
|
|
24
|
+
|
|
25
|
+
- DeepSeek Harness `0.1.0-rc.6` (peers fixados em `0.1.0-rc.6`).
|
|
26
|
+
- Node `^22.19.0 || >=24.0.0`, somente ESM (`"type": "module"`).
|
|
27
|
+
- Peers: `@deepseek-ai/cordis ^4.0.1`, `@deepseek-ai/schemastery ^3.18.0`, e `@deepseek-ai/dsh-session`, `@deepseek-ai/dsh-tools`, `@deepseek-ai/dsh-commands`, `@deepseek-ai/dsh-compaction`, `@deepseek-ai/dsh-storage-domain` em `0.1.0-rc.6`.
|
|
28
|
+
|
|
29
|
+
## What you get
|
|
30
|
+
|
|
31
|
+
- **Tempo de carga da sessão** — latência publicação→primeira requisição, classificada `open` (nova) ou `restore` (com semente/retomada), mais a contagem de eventos de semente.
|
|
32
|
+
- **Contagem de spill** — quantos resultados de ferramenta foram descarregados em um artefato de sessão (detectado pelo aviso persistente de spill).
|
|
33
|
+
- **Contagem e motivo de compaction** — total, separado `manual` (comando) vs `automatic` (pressão), e total de tokens sombreados.
|
|
34
|
+
- **Volume de contexto injetado** — tokens de system-prompt (AGENTS.md + skills + persona), schema de ferramentas e superfície, com suas proporções.
|
|
35
|
+
- **Taxa de acertos do cache LLM** — tokens input / cache-read / cache-write / output agregados e a taxa derivada.
|
|
36
|
+
- **Sugestões de otimização** — baseadas em limiares (cortar skills, ajustar schemas, compactar antes, ativar cache de prompts, ativar spill-policy…).
|
|
37
|
+
- **Amostragem assíncrona** — dobra O(1) por evento; a amostragem roda em um timer, nunca no caminho de append.
|
|
38
|
+
|
|
39
|
+
## Quick start
|
|
40
|
+
|
|
41
|
+
### git channel
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
# De um profile temporário (fixa o commit; roda o build `prepare` autocontido)
|
|
45
|
+
dsh plugin --profile demo add "github:YOUR_ORG/dsh-fast#<sha>"
|
|
46
|
+
# O pnpm-workspace.yaml do profile ganha uma entrada allowBuilds para dsh-fast no primeiro add.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### npm channel
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
dsh plugin --profile demo add dsh-fast
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Ambos os canais instalam a linha do bundle (ver `cordis.patch.yml`) na pilha `dsh.profile.bundles` e surtem efeito ao reiniciar.
|
|
56
|
+
|
|
57
|
+
## Install & uninstall
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
dsh plugin --profile demo add dsh-fast # instalar
|
|
61
|
+
dsh plugin --profile demo remove dsh-fast # desinstalar
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Verifique a montagem: `dsh --profile demo --dump-config | grep dsh-fast`.
|
|
65
|
+
|
|
66
|
+
## Configuration
|
|
67
|
+
|
|
68
|
+
Todos os ajustes são campos Schemastery `Config`; valores inválidos falham a carga do profile de forma audível.
|
|
69
|
+
|
|
70
|
+
| Key | Default | Description |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| `enabled` | `true` | Interruptor mestre; `false` não monta nada. |
|
|
73
|
+
| `privacy.includeCwd` | `false` | Incluir o diretório de trabalho saneado nos relatórios. |
|
|
74
|
+
| `sampling.snapshotIntervalMs` | `60000` | A cada quanto as sessões ativas são amostradas (ms). |
|
|
75
|
+
| `sampling.maxHistorySamples` | `20` | Amostras retidas por sessão no histórico durável. |
|
|
76
|
+
| `thresholds.systemPromptTokens` | `20000` | Avisar se o system prompt exceder esses tokens. |
|
|
77
|
+
| `thresholds.toolSchemaTokens` | `8000` | Avisar se o schema de ferramentas exceder esses tokens. |
|
|
78
|
+
| `thresholds.surfaceTokens` | `60000` | Avisar se a superfície exceder esses tokens. |
|
|
79
|
+
| `thresholds.cacheHitRateFloor` | `0.1` | Avisar se a taxa de cache cair abaixo disso (0..1). |
|
|
80
|
+
| `thresholds.compactionCountWarn` | `10` | Avisar após tantas compactions. |
|
|
81
|
+
| `thresholds.compactionShadowTokens` | `40000` | Avisar se a média de tokens sombreados por summary exceder isso. |
|
|
82
|
+
| `spill.detectSpilledResults` | `true` | Detectar resultados descarregados pelo marcador de aviso persistente. |
|
|
83
|
+
|
|
84
|
+
## Tools & surfaces
|
|
85
|
+
|
|
86
|
+
- **`/fast`** — comando humano que imprime o relatório de saúde da sessão: carga, spill, compaction, ranking de volume de contexto, taxa de cache e sugestões.
|
|
87
|
+
- **`fast_report`** — ferramenta de modelo que devolve o mesmo relatório como JSON estruturado (para o modelo raciocinar), com render de texto legível.
|
|
88
|
+
|
|
89
|
+
## Permissions & data
|
|
90
|
+
|
|
91
|
+
O `dsh-fast` consome apenas seams públicos: eventos `session/*` e `agent/*`, o opcional `ctx.tokenMeter`, `ctx.storageDomain`, `ctx.commands` e `ctx.tools`. É estritamente somente leitura sobre o log de sessão — nunca muta a requisição do modelo, os resultados de ferramentas nem a superfície. As métricas são persistidas no domínio `dsh_fast` (uma história limitada por sessão), não no log. A identidade do relatório e o diretório opcional são saneados antes de exibição ou escrita durável.
|
|
92
|
+
|
|
93
|
+
## Security boundaries
|
|
94
|
+
|
|
95
|
+
- **Somente leitura, zero sobrecarga no caminho do modelo** — dobra O(1) por evento; amostragem por timer.
|
|
96
|
+
- **Sem rede, sem manuseio de credenciais** — nenhuma requisição de saída nem armazenamento sensível.
|
|
97
|
+
- **Configuração que falha audível** — cada ajuste é validado na montagem; limites inválidos lançam erro.
|
|
98
|
+
- **Dados de exibição/duráveis saneados** — caracteres de controle são removidos e comprimentos limitados; `cwd` fica desativado por padrão.
|
|
99
|
+
- **Registros reversíveis** — tudo passa por `ctx.effect()` / `ctx.on()` / `register()`.
|
|
100
|
+
|
|
101
|
+
## Known limitations
|
|
102
|
+
|
|
103
|
+
- **Domínio de armazenamento, não eventos de sessão** — o `Session.append` do rc.6 não oferece marcador `ignorable` nem superfície de registro de eventos externa; um evento `fast/*` faria o coordenador de persistência recusar o log ao restaurar. As métricas vão ao domínio de armazenamento; os eventos brutos seguem como fonte reconstruível.
|
|
104
|
+
- **A detecção de spill é heurística** — lê o aviso persistente (`Full … stored at:`); não há evento de sessão dedicado.
|
|
105
|
+
- **O system prompt é um único balde** — AGENTS.md, skills e persona formam o system prompt montado; não há contagem por seção.
|
|
106
|
+
- **O tempo de carga começa na publicação** — a leitura de disco de uma restauração ocorre antes de `session/created`; a duração reportada é publicação→primeira requisição.
|
|
107
|
+
|
|
108
|
+
## Development
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
pnpm install
|
|
112
|
+
pnpm run typecheck && pnpm run typecheck:ci
|
|
113
|
+
pnpm test
|
|
114
|
+
pnpm run build
|
|
115
|
+
pnpm run verify:self-contained && pnpm run verify:artifacts
|
|
116
|
+
node scripts/check-readme-sync.mjs
|
|
117
|
+
pnpm pack
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Topics
|
|
121
|
+
|
|
122
|
+
`dsh`, `dsh-plugin`, `deepseek-harness`, `deepseek`, `cordis`, `performance`, `diagnostics`, `profiling`, `context-engineering`, `llm-cache`
|
|
123
|
+
|
|
124
|
+
## Contributors
|
|
125
|
+
|
|
126
|
+
`dsh-fast` contributors.
|
|
127
|
+
|
|
128
|
+
## PerryLink DSH Plugin Family
|
|
129
|
+
|
|
130
|
+
Este projeto é um dos [29 complementos do DeepSeek Harness](https://github.com/PerryLink) mantidos por [PerryLink](https://github.com/PerryLink). Se este ajuda você, os outros provavelmente também ajudarão:
|
|
131
|
+
|
|
132
|
+
| Plugin | One-liner |
|
|
133
|
+
|---|---|
|
|
134
|
+
| [dsh-auto-review](https://github.com/PerryLink/dsh-auto-review) | Auto-revisão com segundo modelo na cadeia de aprovação, falha fechada por padrão |
|
|
135
|
+
| [dsh-background-agents](https://github.com/PerryLink/dsh-background-agents) | Agentes filhos em segundo plano e duráveis com barra lateral Web, mensagens e interrupção |
|
|
136
|
+
| [dsh-budget](https://github.com/PerryLink/dsh-budget) | Governança de custos para DeepSeek Harness: orçamentos, carbono e latência em um painel. |
|
|
137
|
+
| [dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind) | Equivalente ao /rewind do Claude Code: instantâneos, bifurcações e restauração de uma vez |
|
|
138
|
+
| [dsh-claude-move](https://github.com/PerryLink/dsh-claude-move) | Migra sessões, memória, skills e CLAUDE.md do Claude Code para o DSH |
|
|
139
|
+
| [dsh-click](https://github.com/PerryLink/dsh-click) | Controle de desktop nativo multiplataforma para DeepSeek Harness — Windows primeiro. |
|
|
140
|
+
| [dsh-composer-history](https://github.com/PerryLink/dsh-composer-history) | Histórico de entrada estilo terminal para o compositor web: setas, busca Ctrl+R |
|
|
141
|
+
| [dsh-defend](https://github.com/PerryLink/dsh-defend) | Defesa contra injeção de prompt, jailbreak e vazamento de segredos para DeepSeek Harness. |
|
|
142
|
+
| [dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck) | Guarda de disciplina de engenharia: sabatina de requisitos, portões de teste, revisão adversária |
|
|
143
|
+
| [dsh-draw](https://github.com/PerryLink/dsh-draw) | Roteamento unificado de geração de imagens estáticas para DeepSeek Harness. |
|
|
144
|
+
| **[dsh-fast](https://github.com/PerryLink/dsh-fast)** | Diagnóstico de desempenho somente leitura para DeepSeek Harness. |
|
|
145
|
+
| [dsh-github](https://github.com/PerryLink/dsh-github) | Integração de PR/issues do GitHub para DSH, toda escrita com aprovação |
|
|
146
|
+
| [dsh-library](https://github.com/PerryLink/dsh-library) | Base de conhecimento documental local para DeepSeek Harness. |
|
|
147
|
+
| [dsh-local-ai](https://github.com/PerryLink/dsh-local-ai) | Integração de modelos locais (Ollama) para DeepSeek Harness. |
|
|
148
|
+
| [dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions) | Diagnóstico, formatação, completação, ações e renomeação LSP via servidores de linguagem |
|
|
149
|
+
| [dsh-mask](https://github.com/PerryLink/dsh-mask) | Middleware de mascaramento de PII para DeepSeek Harness — anonimiza antes do modelo e restaura na camada de exibição. |
|
|
150
|
+
| [dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel) | Painel MCP somente leitura: comando /mcp + aba de configurações com status, ferramentas e erros |
|
|
151
|
+
| [dsh-memento](https://github.com/PerryLink/dsh-memento) | Memória entre sessões com porta de aprovação: seam ctx.memory + SQLite + ferramenta memory |
|
|
152
|
+
| [dsh-observe](https://github.com/PerryLink/dsh-observe) | Exportador de observabilidade OpenTelemetry e Langfuse para DeepSeek Harness. |
|
|
153
|
+
| [dsh-output-styles](https://github.com/PerryLink/dsh-output-styles) | Troca de estilos em tempo de execução equivalente ao outputStyles do Claude Code |
|
|
154
|
+
| [dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules) | Regras declarativas allow/deny/ask estilo Claude Code com auditoria |
|
|
155
|
+
| [dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide) | Base de conhecimento de desenvolvimento de plugins como skill de agente sob demanda |
|
|
156
|
+
| [dsh-score](https://github.com/PerryLink/dsh-score) | Pontuação de qualidade multidimensional para plugins do DeepSeek Harness. |
|
|
157
|
+
| [dsh-session-pin](https://github.com/PerryLink/dsh-session-pin) | Fixa sessões na barra lateral Web com ordenação durável |
|
|
158
|
+
| [dsh-session-sync](https://github.com/PerryLink/dsh-session-sync) | Sincronização de sessões entre dispositivos para DeepSeek Harness — um espelho git dedicado do seu armazenamento de sessões. |
|
|
159
|
+
| [dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security) | Pacote de skills de auditoria de segurança: varredura de segredos, revisão de dependências e cadeia de suprimentos |
|
|
160
|
+
| [dsh-talk](https://github.com/PerryLink/dsh-talk) | Loop de sessão com voz para DeepSeek Harness: fale e ouça a resposta. |
|
|
161
|
+
| [dsh-test-drive](https://github.com/PerryLink/dsh-test-drive) | Testes isolados de instalação e inicialização para plugins do DeepSeek Harness. |
|
|
162
|
+
| [dsh-translate](https://github.com/PerryLink/dsh-translate) | Tradução de parâmetros entre fornecedores e reparo determinístico de JSON para DeepSeek Harness. |
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
Apache-2.0 — ver [LICENSE](LICENSE).
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# ⚡ dsh-fast
|
|
4
|
+
|
|
5
|
+
**DeepSeek Harness 的只读性能诊断插件。**
|
|
6
|
+
|
|
7
|
+
*观察会话事件流——绝不触碰模型热路径——并报告延迟与上下文预算究竟花在哪里。*
|
|
8
|
+
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://github.com/topics/dsh-plugin)
|
|
11
|
+
[](#)
|
|
12
|
+
[](https://github.com/PerryLink/dsh-fast/actions)
|
|
13
|
+
[](https://github.com/PerryLink/dsh-fast/releases)
|
|
14
|
+
[](https://www.npmjs.com/package/dsh-fast)
|
|
15
|
+
[](https://www.npmjs.com/package/dsh-fast)
|
|
16
|
+
|
|
17
|
+
[English](README.md) · [简体中文](README.zh.md) · [Español](README.es.md) · [Português](README.pt.md) · [हिन्दी](README.hi.md)
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Compatibility
|
|
24
|
+
|
|
25
|
+
- DeepSeek Harness `0.1.0-rc.6`(peer 钉在 `0.1.0-rc.6`)。
|
|
26
|
+
- Node `^22.19.0 || >=24.0.0`,纯 ESM(`"type": "module"`)。
|
|
27
|
+
- peer 依赖:`@deepseek-ai/cordis ^4.0.1`、`@deepseek-ai/schemastery ^3.18.0`,以及 `@deepseek-ai/dsh-session`、`@deepseek-ai/dsh-tools`、`@deepseek-ai/dsh-commands`、`@deepseek-ai/dsh-compaction`、`@deepseek-ai/dsh-storage-domain`(`0.1.0-rc.6`)。
|
|
28
|
+
|
|
29
|
+
## What you get
|
|
30
|
+
|
|
31
|
+
- **会话加载耗时** —— 发布到首次请求的延迟,按 `open`(全新)/`restore`(带 seed/恢复)分类,并给出恢复时的 seed 事件数。
|
|
32
|
+
- **spill 命中统计** —— 有多少工具结果被溢出到会话级工件(从持久化的 spill 提示标记检测)。
|
|
33
|
+
- **compaction 次数与触发原因** —— 总次数,按 `manual`(斜杠命令)/`automatic`(压力)区分,以及总 shadow token 数。
|
|
34
|
+
- **上下文注入体量** —— 系统提示词(AGENTS.md + 技能 + 人设)、工具 schema、会话表面的 token 数及其占比。
|
|
35
|
+
- **LLM 缓存命中率** —— 由 provider usage 聚合的 input / cache-read / cache-write / output token 与命中率。
|
|
36
|
+
- **优化建议** —— 阈值驱动的建议(精简技能、收紧工具 schema、更早压缩、启用提示词缓存、启用 spill-policy 等)。
|
|
37
|
+
- **异步采样** —— 每个事件 O(1) 折叠,定时器采样,绝不在追加路径上执行。
|
|
38
|
+
|
|
39
|
+
## Quick start
|
|
40
|
+
|
|
41
|
+
### git 通道
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
# 在临时 profile 上(钉住 commit;运行自包含的 `prepare` 构建)
|
|
45
|
+
dsh plugin --profile demo add "github:YOUR_ORG/dsh-fast#<sha>"
|
|
46
|
+
# 首次 add 后,profile 的 pnpm-workspace.yaml 会新增针对 dsh-fast 的 allowBuilds 项。
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### npm 通道
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
dsh plugin --profile demo add dsh-fast
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
两条通道都会把 bundle 行(见 `cordis.patch.yml`)装进 profile 的 `dsh.profile.bundles` 栈,重启后生效。
|
|
56
|
+
|
|
57
|
+
## Install & uninstall
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
dsh plugin --profile demo add dsh-fast # 安装
|
|
61
|
+
dsh plugin --profile demo remove dsh-fast # 卸载
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
验证行已挂载:`dsh --profile demo --dump-config | grep dsh-fast`。
|
|
65
|
+
|
|
66
|
+
## Configuration
|
|
67
|
+
|
|
68
|
+
所有可调参数都是 Schemastery `Config` 字段;非法值会在 profile 加载时响亮失败。
|
|
69
|
+
|
|
70
|
+
| Key | Default | Description |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| `enabled` | `true` | 主开关;`false` 则什么都不挂载。 |
|
|
73
|
+
| `privacy.includeCwd` | `false` | 是否在报告中包含脱敏后的会话工作目录。 |
|
|
74
|
+
| `sampling.snapshotIntervalMs` | `60000` | 活跃会话的采样间隔(毫秒)。 |
|
|
75
|
+
| `sampling.maxHistorySamples` | `20` | 每个会话在持久化历史中保留的样本数。 |
|
|
76
|
+
| `thresholds.systemPromptTokens` | `20000` | 系统提示词超过该 token 数时告警。 |
|
|
77
|
+
| `thresholds.toolSchemaTokens` | `8000` | 工具 schema 超过该 token 数时告警。 |
|
|
78
|
+
| `thresholds.surfaceTokens` | `60000` | 会话表面超过该 token 数时告警。 |
|
|
79
|
+
| `thresholds.cacheHitRateFloor` | `0.1` | 缓存命中率低于该值(0..1)时告警。 |
|
|
80
|
+
| `thresholds.compactionCountWarn` | `10` | 触发这么多 compaction 后告警。 |
|
|
81
|
+
| `thresholds.compactionShadowTokens` | `40000` | 每次 summary 平均 shadow token 超过该值时告警。 |
|
|
82
|
+
| `spill.detectSpilledResults` | `true` | 从持久化提示标记检测被溢出的工具结果。 |
|
|
83
|
+
|
|
84
|
+
## Tools & surfaces
|
|
85
|
+
|
|
86
|
+
- **`/fast`** —— 人类斜杠命令,打印当前会话的健康报告:加载耗时、spill、compaction、上下文体量排名、缓存命中率与建议。
|
|
87
|
+
- **`fast_report`** —— 模型工具,以结构化 JSON 返回同一份报告(供模型推理),并带人类可读的文本渲染。
|
|
88
|
+
|
|
89
|
+
## Permissions & data
|
|
90
|
+
|
|
91
|
+
`dsh-fast` 只消费公开接缝:`session/*` 与 `agent/*` 事件、可选的 `ctx.tokenMeter`、`ctx.storageDomain`、`ctx.commands` 与 `ctx.tools`。它对会话日志严格只读——绝不改动模型请求、工具结果或会话表面。度量持久化到 `dsh_fast` 存储域(每会话一段有界历史),不写会话日志。报告身份与可选的工作目录在任何展示或持久化写入前都会脱敏。
|
|
92
|
+
|
|
93
|
+
## Security boundaries
|
|
94
|
+
|
|
95
|
+
- **只读、零模型路径开销** —— 每个事件 O(1) 折叠,定时器采样。
|
|
96
|
+
- **无网络、无凭据处理** —— 插件不发任何出站请求,也不存储敏感信息。
|
|
97
|
+
- **配置响亮失败** —— 每个可调参数在挂载时校验;非法边界抛错。
|
|
98
|
+
- **展示/持久化数据脱敏** —— 剥离控制字符、限制字符串长度;`cwd` 默认关闭,开启时按路径截断。
|
|
99
|
+
- **注册可逆** —— 一切贡献都经 `ctx.effect()` / `ctx.on()` / `register()`,卸载与热重载干净。
|
|
100
|
+
|
|
101
|
+
## Known limitations
|
|
102
|
+
|
|
103
|
+
- **用存储域而非会话事件** —— rc.6 的 `Session.append` 没有 `ignorable` 标记能力,也没有外部事件注册面,写自定义 `fast/*` 会话事件会让持久化协调器在恢复时拒绝日志。因此度量改为持久化到存储域;原始事件仍是可重建的事实来源。
|
|
104
|
+
- **spill 检测是启发式** —— 读取持久化的 spill 提示(`Full … stored at:`);没有专门的会话事件。
|
|
105
|
+
- **系统提示词是单个桶** —— AGENTS.md、技能目录与人设都属于组装后的系统提示词;header 不携带分段 token 统计,因此合并上报。
|
|
106
|
+
- **加载耗时从发布时刻起算** —— 恢复时的磁盘读取发生在 `session/created` 之前(由 `sessionPersistence` 负责),本插件允许的事件观察不到;上报的时长是发布到首次请求的延迟。
|
|
107
|
+
|
|
108
|
+
## Development
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
pnpm install
|
|
112
|
+
pnpm run typecheck && pnpm run typecheck:ci
|
|
113
|
+
pnpm test
|
|
114
|
+
pnpm run build
|
|
115
|
+
pnpm run verify:self-contained && pnpm run verify:artifacts
|
|
116
|
+
node scripts/check-readme-sync.mjs
|
|
117
|
+
pnpm pack
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Topics
|
|
121
|
+
|
|
122
|
+
`dsh`, `dsh-plugin`, `deepseek-harness`, `deepseek`, `cordis`, `performance`, `diagnostics`, `profiling`, `context-engineering`, `llm-cache`
|
|
123
|
+
|
|
124
|
+
## Contributors
|
|
125
|
+
|
|
126
|
+
`dsh-fast` contributors.
|
|
127
|
+
|
|
128
|
+
## PerryLink DSH Plugin Family
|
|
129
|
+
|
|
130
|
+
本项目是由 [PerryLink](https://github.com/PerryLink) 维护的 [29 个 DeepSeek Harness 插件](https://github.com/PerryLink)之一。如果这个对你有用,其他插件很可能也会:
|
|
131
|
+
|
|
132
|
+
| Plugin | One-liner |
|
|
133
|
+
|---|---|
|
|
134
|
+
| [dsh-auto-review](https://github.com/PerryLink/dsh-auto-review) | 审批链上的第二模型自动审查,默认失败关闭 |
|
|
135
|
+
| [dsh-background-agents](https://github.com/PerryLink/dsh-background-agents) | 持久化后台子代理,带 Web UI 侧边栏、消息与打断 |
|
|
136
|
+
| [dsh-budget](https://github.com/PerryLink/dsh-budget) | DeepSeek Harness 的成本治理:预算、碳排与延迟一屏呈现。 |
|
|
137
|
+
| [dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind) | Claude Code /rewind 等价物:快照、会话分叉、一次性恢复 |
|
|
138
|
+
| [dsh-claude-move](https://github.com/PerryLink/dsh-claude-move) | 将 Claude Code 会话、记忆、技能与 CLAUDE.md 迁入 DSH |
|
|
139
|
+
| [dsh-click](https://github.com/PerryLink/dsh-click) | 跨平台原生桌面控制(DeepSeek Harness),Windows 优先。 |
|
|
140
|
+
| [dsh-composer-history](https://github.com/PerryLink/dsh-composer-history) | Web 输入框的终端式输入历史:方向键、Ctrl+R 搜索 |
|
|
141
|
+
| [dsh-defend](https://github.com/PerryLink/dsh-defend) | DeepSeek Harness 的提示注入、越狱与密钥泄露防护。 |
|
|
142
|
+
| [dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck) | 工程纪律门禁:需求质询、测试门禁、对抗式审查 |
|
|
143
|
+
| [dsh-draw](https://github.com/PerryLink/dsh-draw) | DeepSeek Harness 的统一静态图像生成路由。 |
|
|
144
|
+
| **[dsh-fast](https://github.com/PerryLink/dsh-fast)** | DeepSeek Harness 的只读性能诊断。 |
|
|
145
|
+
| [dsh-github](https://github.com/PerryLink/dsh-github) | DSH 的 GitHub PR/issue 集成,每次写入都经审批门 |
|
|
146
|
+
| [dsh-library](https://github.com/PerryLink/dsh-library) | DeepSeek Harness 的本地文档知识库。 |
|
|
147
|
+
| [dsh-local-ai](https://github.com/PerryLink/dsh-local-ai) | DeepSeek Harness 的本地模型(Ollama)接入。 |
|
|
148
|
+
| [dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions) | 经语言服务器的 LSP 诊断、格式化、补全、代码操作与重命名 |
|
|
149
|
+
| [dsh-mask](https://github.com/PerryLink/dsh-mask) | DeepSeek Harness 的 PII 脱敏中间件——数据到模型前匿名化,展示层还原。 |
|
|
150
|
+
| [dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel) | 只读 MCP 运行时面板:/mcp 命令 + 带状态、工具与错误的设置页 |
|
|
151
|
+
| [dsh-memento](https://github.com/PerryLink/dsh-memento) | 带审批门的跨会话记忆:ctx.memory 接缝 + SQLite + memory 工具 |
|
|
152
|
+
| [dsh-observe](https://github.com/PerryLink/dsh-observe) | DeepSeek Harness 的 OpenTelemetry 与 Langfuse 可观测导出器。 |
|
|
153
|
+
| [dsh-output-styles](https://github.com/PerryLink/dsh-output-styles) | Claude Code outputStyles 等价的运行时样式切换 |
|
|
154
|
+
| [dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules) | Claude Code 风格声明式 allow/deny/ask 权限规则,带审计 |
|
|
155
|
+
| [dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide) | 按需 agent 技能形式的插件开发知识库 |
|
|
156
|
+
| [dsh-score](https://github.com/PerryLink/dsh-score) | DeepSeek Harness 插件的多指标质量评分。 |
|
|
157
|
+
| [dsh-session-pin](https://github.com/PerryLink/dsh-session-pin) | 在 Web 侧边栏置顶会话,顺序持久化 |
|
|
158
|
+
| [dsh-session-sync](https://github.com/PerryLink/dsh-session-sync) | DeepSeek Harness 的跨设备会话同步——会话存储的专用 git 镜像。 |
|
|
159
|
+
| [dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security) | 安全审计技能包:密钥扫描、依赖与供应链审查 |
|
|
160
|
+
| [dsh-talk](https://github.com/PerryLink/dsh-talk) | DeepSeek Harness 的语音优先会话闭环:对它说,听它答。 |
|
|
161
|
+
| [dsh-test-drive](https://github.com/PerryLink/dsh-test-drive) | DeepSeek Harness 插件的隔离式安装冒烟实测。 |
|
|
162
|
+
| [dsh-translate](https://github.com/PerryLink/dsh-translate) | DeepSeek Harness 的厂商参数翻译与确定性 JSON 修复。 |
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
Apache-2.0 —— 见 [LICENSE](LICENSE)。
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
`dsh-fast` bundles no third-party source code. All TypeScript/JavaScript
|
|
4
|
+
sources in this repository are original works by the dsh-fast contributors,
|
|
5
|
+
licensed under Apache-2.0 (see `LICENSE`).
|
|
6
|
+
|
|
7
|
+
The package depends on the following software. None of it is bundled into the
|
|
8
|
+
published tarball except where noted; these are install-time dependencies:
|
|
9
|
+
|
|
10
|
+
| Package | Version range | License | Purpose |
|
|
11
|
+
|---|---|---|---|
|
|
12
|
+
| [tsdown](https://github.com/rolldown/tsdown) | `^0.22.14` | MIT | Build-time bundling of `lib/` (a regular dependency so the git-install channel's `prepare` script can build) |
|
|
13
|
+
| [typescript](https://github.com/microsoft/TypeScript) | `^5.9.0` | Apache-2.0 | Build-time declaration emission (`lib/types/`) |
|
|
14
|
+
| [zod](https://github.com/colinhacks/zod) | `^4.4.3` | MIT | Runtime value schema for the `dsh_fast` storage-domain table (bundled into `lib/`) |
|
|
15
|
+
| [@deepseek-ai/cordis](https://www.npmjs.com/package/@deepseek-ai/cordis) | `^4.0.1` (peer) | See package | The plugin runtime |
|
|
16
|
+
| [@deepseek-ai/schemastery](https://www.npmjs.com/package/@deepseek-ai/schemastery) | `^3.18.0` (peer) | See package | Configuration schema |
|
|
17
|
+
| `@deepseek-ai/dsh-*` peers | `0.1.0-rc.6` (peer) | See packages | Official harness seams (`dsh-session`, `dsh-tools`, `dsh-commands`, `dsh-compaction`, `dsh-storage-domain`) |
|
|
18
|
+
|
|
19
|
+
At runtime the plugin only talks to the harness services listed as
|
|
20
|
+
peerDependencies; it performs no network requests and stores no credentials.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# dsh-fast bundle patch: mount the read-only performance diagnostics.
|
|
2
|
+
#
|
|
3
|
+
# Every key below is a Config field (Schemastery schema); invalid values fail
|
|
4
|
+
# the profile load loudly. See README.md "Configuration" for the full table.
|
|
5
|
+
# The plugin is read-only and safe, so it defaults to enabled.
|
|
6
|
+
- insert:
|
|
7
|
+
- id: storage
|
|
8
|
+
name: '@deepseek-ai/dsh-storage'
|
|
9
|
+
|
|
10
|
+
- id: storage-json
|
|
11
|
+
name: '@deepseek-ai/dsh-storage-json'
|
|
12
|
+
config:
|
|
13
|
+
root: !!js dshHomePath('storages')
|
|
14
|
+
|
|
15
|
+
- id: storage-domain
|
|
16
|
+
name: '@deepseek-ai/dsh-storage-domain'
|
|
17
|
+
config:
|
|
18
|
+
backend: json
|
|
19
|
+
|
|
20
|
+
- id: dsh-fast
|
|
21
|
+
name: dsh-fast
|
|
22
|
+
config:
|
|
23
|
+
# Master switch. On by default (read-only diagnostics); `false` mounts
|
|
24
|
+
# nothing at all.
|
|
25
|
+
enabled: true
|
|
26
|
+
# Privacy: include the sanitized session working directory in /fast and
|
|
27
|
+
# fast_report. Off by default — a local path is sensitive.
|
|
28
|
+
privacy:
|
|
29
|
+
includeCwd: false
|
|
30
|
+
# Async sampling policy (runs off the model path on a timer).
|
|
31
|
+
sampling:
|
|
32
|
+
# How often active sessions are sampled, in milliseconds.
|
|
33
|
+
snapshotIntervalMs: 60000
|
|
34
|
+
# How many samples to retain per session in the durable domain history.
|
|
35
|
+
maxHistorySamples: 20
|
|
36
|
+
# Suggestion thresholds (tokens / ratios / counts). A value crossing a
|
|
37
|
+
# threshold adds one optimization note to /fast and fast_report.
|
|
38
|
+
thresholds:
|
|
39
|
+
# Warn when the assembled system prompt (AGENTS.md + skills + persona)
|
|
40
|
+
# exceeds this many tokens.
|
|
41
|
+
systemPromptTokens: 20000
|
|
42
|
+
# Warn when the tool schema exceeds this many tokens.
|
|
43
|
+
toolSchemaTokens: 8000
|
|
44
|
+
# Warn when the conversation surface exceeds this many tokens.
|
|
45
|
+
surfaceTokens: 60000
|
|
46
|
+
# Warn when the LLM cache hit rate falls below this (0..1).
|
|
47
|
+
cacheHitRateFloor: 0.1
|
|
48
|
+
# Warn once the session has triggered this many compactions.
|
|
49
|
+
compactionCountWarn: 10
|
|
50
|
+
# Warn when the average shadowed token count per summary exceeds this.
|
|
51
|
+
compactionShadowTokens: 40000
|
|
52
|
+
# Spill detection: detect spilled tool results from the durable
|
|
53
|
+
# spill-notice marker (best-effort heuristic; see README).
|
|
54
|
+
spill:
|
|
55
|
+
detectSpilledResults: true
|