dsh-tacit 0.2.0 → 0.2.2
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/README.md +56 -40
- package/client/client.js +11 -10
- package/docs/README.md +21 -0
- package/docs/README.zh.md +82 -0
- package/lib/analyze.js +2 -2
- package/lib/service.js +7 -5
- package/package.json +9 -5
- package/README.zh.md +0 -77
package/README.md
CHANGED
|
@@ -6,14 +6,14 @@ A plugin for <a href="https://www.npmjs.com/package/@deepseek-ai/dsh">DeepSeek H
|
|
|
6
6
|
<p align="center">
|
|
7
7
|
<a href="https://www.npmjs.com/package/dsh-tacit"><img alt="npm" src="https://img.shields.io/npm/v/dsh-tacit"></a>
|
|
8
8
|
<a href="https://github.com/hackernotfound/dsh-tacit/actions/workflows/test.yml"><img alt="test" src="https://github.com/hackernotfound/dsh-tacit/actions/workflows/test.yml/badge.svg"></a>
|
|
9
|
-
<a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-blue"></a>
|
|
10
|
-
<a href="README.zh.md">中文</a>
|
|
9
|
+
<a href="https://github.com/hackernotfound/dsh-tacit/blob/main/LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-blue"></a>
|
|
10
|
+
<a href="https://github.com/hackernotfound/dsh-tacit/blob/main/docs/README.zh.md">中文</a>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
You keep writing prompts the way you already do. Tacit watches how each turn
|
|
14
14
|
*actually* went — retries, tool errors, and above all the message you send
|
|
15
15
|
when the agent got it wrong — and turns your habits into a few directives the
|
|
16
|
-
agent follows in every new
|
|
16
|
+
agent follows in every new conversation. No clicks, $0.001–0.003 per lesson.
|
|
17
17
|
|
|
18
18
|
```
|
|
19
19
|
you: "make the login page better"
|
|
@@ -21,63 +21,79 @@ agent: …stumbles…
|
|
|
21
21
|
you: "no, I meant the Next.js app under apps/web"
|
|
22
22
|
|
|
23
23
|
Tacit: learns → "The user often omits which app they mean — check apps/web first."
|
|
24
|
-
injects it into every later
|
|
24
|
+
injects it into every later conversation's system prompt.
|
|
25
25
|
You never have to say it again.
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
<p align="center">
|
|
29
|
+
<img alt="Install Tacit, open its conversation tab, review learning controls, and edit the directive it gives the agent" src="https://raw.githubusercontent.com/hackernotfound/dsh-tacit/main/docs/assets/tacit-demo.gif" width="960">
|
|
30
|
+
</p>
|
|
31
|
+
|
|
28
32
|
## Install — 30 seconds
|
|
29
33
|
|
|
30
34
|
```bash
|
|
31
|
-
dsh plugin --profile web add dsh-tacit
|
|
35
|
+
npx @deepseek-ai/dsh plugin --profile web add dsh-tacit
|
|
32
36
|
```
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
If `dsh` is already installed globally, `dsh plugin --profile web add dsh-tacit`
|
|
39
|
+
is the equivalent shorthand.
|
|
40
|
+
|
|
41
|
+
Start (or restart) with `npx @deepseek-ai/dsh web`, then refresh the page.
|
|
42
|
+
Optional kick-start: **Settings → Tacit →
|
|
43
|
+
*Learn from my last 20 turns*** (≈ $0.02–0.05, once).
|
|
36
44
|
|
|
37
45
|
Requires DeepSeek Harness `>= 0.1.1-rc.1`, Node `>= 22`, and a DeepSeek API key
|
|
38
46
|
already configured in the harness (Tacit never reads it).
|
|
39
47
|
|
|
40
48
|
## What you get
|
|
41
49
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
| | What | Cost |
|
|
51
|
+
| --- | --- | --- |
|
|
52
|
+
| **Zero-click learning** | messy turns and your own corrections are analyzed in the background, with the previous turn as context; automatic analyses are capped per day (30 by default) | $0.001–0.003 each |
|
|
53
|
+
| **Directives that earn their place** | learned directives are injected as a short system-prompt section you can read, edit, toggle or delete; a new one starts as a *candidate* and is retired if your messy-turn rate gets worse | free |
|
|
54
|
+
| **✨ Improve** | a composer button that rewrites your current draft using what Tacit has learned, with a before/after preview and 👍/👎 | $0.001–0.002 per click |
|
|
55
|
+
| **Measured, not guessed** | Settings shows your real trend — messy-turn rate and tokens per turn, first 20 turns vs. latest 20 | free |
|
|
56
|
+
|
|
57
|
+
<p align="center">
|
|
58
|
+
<img alt="Tacit settings with automatic learning controls and an editable active directive" src="https://raw.githubusercontent.com/hackernotfound/dsh-tacit/main/docs/assets/tacit-settings.png" width="960">
|
|
59
|
+
</p>
|
|
60
|
+
<p align="center"><sub>Settings → Tacit, captured from a clean local profile with a synthetic example directive.</sub></p>
|
|
53
61
|
|
|
54
62
|
## How it works
|
|
55
63
|
|
|
56
|
-
1.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
analyzes
|
|
60
|
-
3. Every few analyses, one more call distills the findings into
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
1. Tacit keeps a small, bounded digest of every turn: the prompt, what tools ran,
|
|
65
|
+
what went wrong, how it ended.
|
|
66
|
+
2. When a turn ends messy, or your next message reads as a correction, one small
|
|
67
|
+
`deepseek-v4-flash` call analyzes that prompt and records what was missing.
|
|
68
|
+
3. Every few analyses, one more call distills the findings into 1–4 one-sentence
|
|
69
|
+
directives for the agent. Each new directive is on trial for 10 turns.
|
|
70
|
+
4. The directives become a ~300-token section of the system prompt in every new
|
|
71
|
+
conversation. The exact text is visible in Settings; only clipped digests of
|
|
72
|
+
your turns ever leave the machine.
|
|
73
|
+
|
|
74
|
+
The full walkthrough with every number and a diagram:
|
|
75
|
+
[How it works](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/how-it-works.md).
|
|
64
76
|
|
|
65
77
|
## Privacy & cost, in one paragraph
|
|
66
78
|
|
|
67
79
|
Tacit never sees your API key (every call goes through the harness's own model
|
|
68
|
-
service), only calls the allowlisted official
|
|
69
|
-
directives in `~/.dsh/storages/tacit/`, refuses
|
|
70
|
-
routes, and never deletes anything but its own
|
|
71
|
-
estimates at list price; a cost plugin such as
|
|
72
|
-
number.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
[
|
|
81
|
-
[
|
|
80
|
+
service), only calls the allowlisted official models over your session's own
|
|
81
|
+
provider route, keeps reports and directives in `~/.dsh/storages/tacit/`, refuses
|
|
82
|
+
cross-site requests to its own routes, and never deletes anything but its own
|
|
83
|
+
reports. Dollar figures are estimates at list price; a cost plugin such as
|
|
84
|
+
`dsh-cost-meter` shows the real number. The full data-flow and cost tables, and
|
|
85
|
+
the honest list of limitations:
|
|
86
|
+
[Privacy, cost & limitations](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/privacy-and-cost.md).
|
|
87
|
+
|
|
88
|
+
## Documentation
|
|
89
|
+
|
|
90
|
+
| | |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| [Getting started](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/getting-started.md) | install, check it's on, bootstrap, where things are in the UI, troubleshooting |
|
|
93
|
+
| [How it works](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/how-it-works.md) | the pipeline step by step, with a diagram and a glossary |
|
|
94
|
+
| [Privacy, cost & limitations](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/privacy-and-cost.md) | what stays local, what is sent, what each call costs, what it can't do yet |
|
|
95
|
+
| [Configuration](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/configuration.md) | every setting, defaults and ranges |
|
|
96
|
+
| [Architecture](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/architecture.md) | for contributors: modules, hooks, routes, storage |
|
|
97
|
+
| [Contributing](https://github.com/hackernotfound/dsh-tacit/blob/main/CONTRIBUTING.md) · [Changelog](https://github.com/hackernotfound/dsh-tacit/blob/main/CHANGELOG.md) | |
|
|
82
98
|
|
|
83
99
|
MIT © hackernotfound
|
package/client/client.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* slot, beside Chat/Trajectory) listing every turn's digest with an
|
|
13
13
|
* Analyze button and the analysis report;
|
|
14
14
|
* - a small ✨ Improve button in the composer tool row
|
|
15
|
-
* (`conversation.input.left`)
|
|
15
|
+
* (`conversation.input.left`) while it is enabled in Settings;
|
|
16
16
|
* - a before/after preview popup in `conversation.input.overlay` whose
|
|
17
17
|
* Apply action replaces the composer draft via `inputActions.setDraft`.
|
|
18
18
|
*
|
|
@@ -59,7 +59,7 @@ if (typeof window === 'undefined' || window.__ModuleLoader__ === undefined || ty
|
|
|
59
59
|
'trigger.bootstrap': '引导',
|
|
60
60
|
'bootstrap.btn': '从我最近 20 轮中学习',
|
|
61
61
|
'bootstrap.running': '学习中… {done}/{total}',
|
|
62
|
-
'bootstrap.hint': '
|
|
62
|
+
'bootstrap.hint': '约 $0.02–0.05,一次性。已顺利完成的提示词会被跳过。',
|
|
63
63
|
'steer.enrich': '发送前补充学到的上下文(实验性,每次发送一次小调用)',
|
|
64
64
|
'steer.title': '智能体被告知的关于你的信息',
|
|
65
65
|
'steer.desc': '这些指令会注入每个新会话的系统提示词,让智能体替你补上你通常没说的内容。',
|
|
@@ -166,7 +166,7 @@ if (typeof window === 'undefined' || window.__ModuleLoader__ === undefined || ty
|
|
|
166
166
|
'trigger.bootstrap': 'bootstrap',
|
|
167
167
|
'bootstrap.btn': 'Learn from my last 20 turns',
|
|
168
168
|
'bootstrap.running': 'Learning… {done}/{total}',
|
|
169
|
-
'bootstrap.hint': '≈ $0.02, one time. Skips prompts that already went fine on their own.',
|
|
169
|
+
'bootstrap.hint': '≈ $0.02–0.05, one time. Skips prompts that already went fine on their own.',
|
|
170
170
|
'steer.enrich': 'Add learned context before each send (experimental — one small call per send)',
|
|
171
171
|
'steer.title': 'What the agent is told about you',
|
|
172
172
|
'steer.desc': 'These directives ride every new session\'s system prompt so the agent fills in what you usually leave unsaid.',
|
|
@@ -1220,8 +1220,9 @@ if (typeof window === 'undefined' || window.__ModuleLoader__ === undefined || ty
|
|
|
1220
1220
|
function PreviewOverlay(kit) {
|
|
1221
1221
|
const { t } = kit
|
|
1222
1222
|
return function PreviewOverlayView(props) {
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1223
|
+
const store = props.tacitStore !== null && typeof props.tacitStore === 'object'
|
|
1224
|
+
? props.tacitStore
|
|
1225
|
+
: null
|
|
1225
1226
|
useStoreVersion(store)
|
|
1226
1227
|
if (store === null || !store.preview.open) return null
|
|
1227
1228
|
|
|
@@ -1258,7 +1259,7 @@ if (typeof window === 'undefined' || window.__ModuleLoader__ === undefined || ty
|
|
|
1258
1259
|
}
|
|
1259
1260
|
}
|
|
1260
1261
|
|
|
1261
|
-
// ── Feedback strip (under the composer,
|
|
1262
|
+
// ── Feedback strip (under the composer, Improve enabled only) ───────────
|
|
1262
1263
|
|
|
1263
1264
|
function FeedbackStrip(kit) {
|
|
1264
1265
|
const { t } = kit
|
|
@@ -1646,11 +1647,11 @@ if (typeof window === 'undefined' || window.__ModuleLoader__ === undefined || ty
|
|
|
1646
1647
|
id: 'tacit-preview',
|
|
1647
1648
|
order: 10,
|
|
1648
1649
|
locale: NS,
|
|
1649
|
-
inject: (sessionId) => ({
|
|
1650
|
+
inject: (sessionId) => ({ tacitStore: storeFor(sessionId) }),
|
|
1650
1651
|
}, (props) => h(PreviewOverlayView, props)))
|
|
1651
1652
|
|
|
1652
1653
|
// The post-apply 👍/👎 strip lives in the band UNDER the composer card
|
|
1653
|
-
// (composer.dock), only
|
|
1654
|
+
// (composer.dock), only while the Improve button is enabled.
|
|
1654
1655
|
const FeedbackStripView = FeedbackStrip(kit)
|
|
1655
1656
|
ctx.slots.inject('conversation.composer.dock', () => ctx.slots.register({
|
|
1656
1657
|
name: 'conversation.composer.dock',
|
|
@@ -1661,8 +1662,7 @@ if (typeof window === 'undefined' || window.__ModuleLoader__ === undefined || ty
|
|
|
1661
1662
|
}, (props) => h(FeedbackStripView, props)))
|
|
1662
1663
|
|
|
1663
1664
|
// Own Settings page under "Cost": a nav section in the Settings panel,
|
|
1664
|
-
// on its own. Reuses the coach panel
|
|
1665
|
-
// clear reports, coached prompts). Order 32 places it right after
|
|
1665
|
+
// on its own. Reuses the coach panel. Order 32 places it right after
|
|
1666
1666
|
// cost-meter's "Cost" section (order 30/31).
|
|
1667
1667
|
const SettingsSectionView = SettingsSection(kit)
|
|
1668
1668
|
ctx.slots.inject('settings.section', () => ctx.slots.register({
|
|
@@ -1682,6 +1682,7 @@ if (typeof window === 'undefined' || window.__ModuleLoader__ === undefined || ty
|
|
|
1682
1682
|
__test: {
|
|
1683
1683
|
css,
|
|
1684
1684
|
applyImproved,
|
|
1685
|
+
closePreview,
|
|
1685
1686
|
closeFeedback,
|
|
1686
1687
|
fadeFeedback,
|
|
1687
1688
|
rootStore,
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Tacit documentation
|
|
2
|
+
|
|
3
|
+
Tacit is a plugin for [DeepSeek Harness](https://www.npmjs.com/package/@deepseek-ai/dsh)
|
|
4
|
+
(`dsh`). It watches how your conversations with the agent *actually* go, learns what
|
|
5
|
+
you habitually leave unsaid, and tells the agent for you — through a short, editable
|
|
6
|
+
section of the system prompt.
|
|
7
|
+
|
|
8
|
+
Pick the question you have:
|
|
9
|
+
|
|
10
|
+
| I want to… | Read |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| Install it and see it working in five minutes | [Getting started](getting-started.md) |
|
|
13
|
+
| Understand what it does, step by step, and what the words mean | [How it works](how-it-works.md) |
|
|
14
|
+
| Know what leaves my machine, what it costs, and what it can't do yet | [Privacy, cost & limitations](privacy-and-cost.md) |
|
|
15
|
+
| Change a setting | [Configuration](configuration.md) |
|
|
16
|
+
| Read or change the code | [Architecture](architecture.md) · [Contributing](../CONTRIBUTING.md) |
|
|
17
|
+
| See what changed between versions | [Changelog](../CHANGELOG.md) |
|
|
18
|
+
|
|
19
|
+
Reading order for a newcomer: Getting started → How it works → Privacy & cost.
|
|
20
|
+
|
|
21
|
+
中文:[README.zh.md](README.zh.md)(仅 README 有中文版)。
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<h1 align="center">Tacit</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center"><b>学习你在提示词里没说出口的东西——并替你告诉智能体。</b><br>
|
|
4
|
+
一个 <a href="https://www.npmjs.com/package/@deepseek-ai/dsh">DeepSeek Harness</a> 插件。</p>
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://www.npmjs.com/package/dsh-tacit"><img alt="npm" src="https://img.shields.io/npm/v/dsh-tacit"></a>
|
|
8
|
+
<a href="https://github.com/hackernotfound/dsh-tacit/actions/workflows/test.yml"><img alt="test" src="https://github.com/hackernotfound/dsh-tacit/actions/workflows/test.yml/badge.svg"></a>
|
|
9
|
+
<a href="https://github.com/hackernotfound/dsh-tacit/blob/main/LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-blue"></a>
|
|
10
|
+
<a href="https://github.com/hackernotfound/dsh-tacit/blob/main/README.md">English</a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
> 本文由英文版翻译而来,尚未经过母语者校对;以 [README.md](https://github.com/hackernotfound/dsh-tacit/blob/main/README.md) 为准,欢迎提交修正。
|
|
14
|
+
|
|
15
|
+
你照常写提示词。Tacit 在后台观察每一轮*实际*的走向——重试、工具报错,尤其是
|
|
16
|
+
智能体做错之后你发的那条消息——把你的习惯变成几条指令,让智能体在每个新对话里
|
|
17
|
+
自动遵守。无需点击,每次学习 $0.001–0.003。
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
你: "把登录页做好一点"
|
|
21
|
+
智能体: …走偏…
|
|
22
|
+
你: "不对,我是说 apps/web 下的 Next.js 应用"
|
|
23
|
+
|
|
24
|
+
Tacit: 学到 → "用户常常不说明是哪个应用——先查 apps/web。"
|
|
25
|
+
注入之后每个对话的系统提示。
|
|
26
|
+
你再也不用重复说了。
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 安装——30 秒
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx @deepseek-ai/dsh plugin --profile web add dsh-tacit
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
用 `npx @deepseek-ai/dsh web` 启动(或重启),然后刷新页面。可选的快速起步:**设置 → Tacit → *从我最近 20 轮中学习***
|
|
36
|
+
(约 $0.02–0.05,一次性)。
|
|
37
|
+
|
|
38
|
+
需要 DeepSeek Harness `>= 0.1.1-rc.1`、Node `>= 22`,以及已在 harness 里配置好的
|
|
39
|
+
DeepSeek API Key(Tacit 从不读取它)。
|
|
40
|
+
|
|
41
|
+
## 你会得到什么
|
|
42
|
+
|
|
43
|
+
| | 是什么 | 费用 |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| **零点击学习** | 不顺的轮次和你自己的纠正会在后台被分析,并带上上一轮作为上下文;自动分析每天有上限(默认 30 次) | 每次 $0.001–0.003 |
|
|
46
|
+
| **指令要靠表现留下** | 学到的指令作为一小段系统提示注入,你可以查看、编辑、开关或删除;新指令先是*候选*,如果你的不顺轮次比例变差就会退役 | 免费 |
|
|
47
|
+
| **✨ 改进** | 输入框里的按钮,用 Tacit 学到的东西重写当前草稿,带前后对比预览和 👍/👎 | 每次点击 $0.001–0.002 |
|
|
48
|
+
| **测量而非猜测** | 设置页显示你的真实趋势:不顺轮次比例和每轮 token 数,最早 20 轮 vs 最近 20 轮 | 免费 |
|
|
49
|
+
|
|
50
|
+
## 它是怎么工作的
|
|
51
|
+
|
|
52
|
+
1. Tacit 为每一轮保留一份很小的有界摘要:提示词、跑了哪些工具、哪里出错、怎么结束。
|
|
53
|
+
2. 当一轮结束得不顺、或你的下一条消息像是纠正,就用一次很小的 `deepseek-v4-flash`
|
|
54
|
+
调用分析那条提示词,记下缺了什么。
|
|
55
|
+
3. 每隔几次分析,再用一次调用把发现蒸馏成 1–4 条一句话的指令。每条新指令试用 10 轮。
|
|
56
|
+
4. 指令成为每个新对话系统提示里约 300 token 的一段——原文在设置里可见;离开本机的
|
|
57
|
+
只有你各轮的裁剪摘要。
|
|
58
|
+
|
|
59
|
+
完整流程(含每个数字和一张图,英文):
|
|
60
|
+
[How it works](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/how-it-works.md)。
|
|
61
|
+
|
|
62
|
+
## 隐私与成本,一段话
|
|
63
|
+
|
|
64
|
+
Tacit 从不接触你的 API Key(所有调用都经过 harness 自己的模型服务),只通过你会话
|
|
65
|
+
自己的 provider 路由调用白名单里的官方模型,报告和指令都存放在
|
|
66
|
+
`~/.dsh/storages/tacit/`,拒绝对自身路由的跨站请求,除了自己的报告之外从不删除任何
|
|
67
|
+
东西。美元数字是按公开价格的估算;`dsh-cost-meter` 这样的成本插件会显示真实花费。
|
|
68
|
+
完整的数据流与成本表、以及坦白的限制清单(英文):
|
|
69
|
+
[Privacy, cost & limitations](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/privacy-and-cost.md)。
|
|
70
|
+
|
|
71
|
+
## 文档(均为英文)
|
|
72
|
+
|
|
73
|
+
| | |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| [Getting started](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/getting-started.md) | 安装、确认已启用、快速起步、界面各处在哪、排障 |
|
|
76
|
+
| [How it works](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/how-it-works.md) | 逐步流程,带图和术语表 |
|
|
77
|
+
| [Privacy, cost & limitations](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/privacy-and-cost.md) | 什么留在本地、什么会发出去、每次调用的花费、目前做不到的事 |
|
|
78
|
+
| [Configuration](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/configuration.md) | 所有设置项、默认值和取值范围 |
|
|
79
|
+
| [Architecture](https://github.com/hackernotfound/dsh-tacit/blob/main/docs/architecture.md) | 面向贡献者:模块、钩子、路由、存储 |
|
|
80
|
+
| [Contributing](https://github.com/hackernotfound/dsh-tacit/blob/main/CONTRIBUTING.md) · [Changelog](https://github.com/hackernotfound/dsh-tacit/blob/main/CHANGELOG.md) | |
|
|
81
|
+
|
|
82
|
+
MIT © hackernotfound
|
package/lib/analyze.js
CHANGED
|
@@ -314,8 +314,8 @@ export const IMPROVE_REPAIR_SYSTEM_PROMPT = [
|
|
|
314
314
|
].join('\n')
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
|
-
* Style-rule distillation:
|
|
318
|
-
*
|
|
317
|
+
* Style-rule distillation: fired rarely (every 3+ unreviewed 👎 reasons),
|
|
318
|
+
* capped at DISTILL_MAX_TOKENS output tokens.
|
|
319
319
|
*/
|
|
320
320
|
export const DISTILL_SYSTEM_PROMPT = [
|
|
321
321
|
'You distill user feedback into durable prompt-writing style rules for a',
|
package/lib/service.js
CHANGED
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* an `ok` flag and a stable error `code` the client localizes. Expected
|
|
9
9
|
* failures never throw; unexpected ones are mapped by the route layer.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Model calls are either user-triggered (analyzeTurn / improveDraft /
|
|
12
|
+
* bootstrap) or automatic analyses of messy and corrected turns, the latter
|
|
13
|
+
* capped by `autoDailyBudget`. There is no polling and no telemetry.
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
16
|
import {
|
|
@@ -285,7 +286,7 @@ export function createCoachService(ctx, store, effectiveConfig) {
|
|
|
285
286
|
* Returns the profile with fresh rules on success, the input profile on a
|
|
286
287
|
* soft no-op/failure.
|
|
287
288
|
*/
|
|
288
|
-
const maybeDistill = async (profile, provider) => {
|
|
289
|
+
const maybeDistill = async (profile, provider, sessionId) => {
|
|
289
290
|
if (profile.pendingDistill < 3 || distillInFlight) return profile
|
|
290
291
|
distillInFlight = true
|
|
291
292
|
try {
|
|
@@ -299,6 +300,7 @@ export function createCoachService(ctx, store, effectiveConfig) {
|
|
|
299
300
|
maxTokens: DISTILL_MAX_TOKENS,
|
|
300
301
|
timeoutMs: DISTILL_TIMEOUT_MS,
|
|
301
302
|
tool: DISTILL_TOOL,
|
|
303
|
+
sessionId,
|
|
302
304
|
})
|
|
303
305
|
const rules = normalizeDistillRules(text)
|
|
304
306
|
if (rules.length === 0) return profile
|
|
@@ -843,7 +845,7 @@ export function createCoachService(ctx, store, effectiveConfig) {
|
|
|
843
845
|
// Distillation also fires on user-triggered improve calls (soft, in-flight
|
|
844
846
|
// deduped, never awaited: an improve call is never blocked by it).
|
|
845
847
|
if (profile.pendingDistill >= 3) {
|
|
846
|
-
maybeDistill(profile, providerForSession(sessionId)).catch(() => {})
|
|
848
|
+
maybeDistill(profile, providerForSession(sessionId), sessionId).catch(() => {})
|
|
847
849
|
}
|
|
848
850
|
// Only trusted (or still-inexperienced) patterns reach the prompt;
|
|
849
851
|
// style rules + the last 3 verbatim down-reasons ride along for free
|
|
@@ -948,7 +950,7 @@ export function createCoachService(ctx, store, effectiveConfig) {
|
|
|
948
950
|
// user action. Awaited so the returned profile already carries the
|
|
949
951
|
// fresh style rules; a failure is soft-silent and retries later.
|
|
950
952
|
if (profile.pendingDistill >= 3) {
|
|
951
|
-
profile = await maybeDistill(profile, providerForSession(record.sessionId))
|
|
953
|
+
profile = await maybeDistill(profile, providerForSession(record.sessionId), record.sessionId)
|
|
952
954
|
}
|
|
953
955
|
return { ok: true, profile, code: '', detail: '' }
|
|
954
956
|
},
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tacit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Tacit learns what you leave unsaid in your prompts — from messy turns and your own corrections, with zero clicks — and tells the agent how to compensate, on every turn, via a system-prompt section you can read and edit.",
|
|
5
5
|
"author": "hackernotfound",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"packageManager": "pnpm@11.23.0",
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
10
11
|
"url": "git+https://github.com/hackernotfound/dsh-tacit.git"
|
|
@@ -31,11 +32,14 @@
|
|
|
31
32
|
"client",
|
|
32
33
|
"cordis.patch.yml",
|
|
33
34
|
"README.md",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"docs/README.zh.md"
|
|
36
37
|
],
|
|
37
38
|
"scripts": {
|
|
38
39
|
"test": "node --test",
|
|
40
|
+
"check": "pnpm test && pnpm check:docs && pnpm check:package",
|
|
41
|
+
"check:docs": "node scripts/check-doc-links.mjs",
|
|
42
|
+
"check:package": "node scripts/check-package.mjs",
|
|
39
43
|
"smoke": "node scripts/smoke.mjs"
|
|
40
44
|
},
|
|
41
45
|
"publishConfig": {
|
|
@@ -87,8 +91,8 @@
|
|
|
87
91
|
"zod": "^4.4.3"
|
|
88
92
|
},
|
|
89
93
|
"devDependencies": {
|
|
90
|
-
"react": "^
|
|
91
|
-
"react-dom": "^
|
|
94
|
+
"react": "^19.2.8",
|
|
95
|
+
"react-dom": "^19.2.8"
|
|
92
96
|
},
|
|
93
97
|
"keywords": [
|
|
94
98
|
"deepseek",
|
package/README.zh.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<h1 align="center">Tacit</h1>
|
|
2
|
-
|
|
3
|
-
<p align="center"><b>学习你在提示词里没说出口的东西——并替你告诉智能体。</b><br>
|
|
4
|
-
一个 <a href="https://www.npmjs.com/package/@deepseek-ai/dsh">DeepSeek Harness</a> 插件。</p>
|
|
5
|
-
|
|
6
|
-
<p align="center">
|
|
7
|
-
<a href="https://www.npmjs.com/package/dsh-tacit"><img alt="npm" src="https://img.shields.io/npm/v/dsh-tacit"></a>
|
|
8
|
-
<a href="https://github.com/hackernotfound/dsh-tacit/actions/workflows/test.yml"><img alt="test" src="https://github.com/hackernotfound/dsh-tacit/actions/workflows/test.yml/badge.svg"></a>
|
|
9
|
-
<a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-blue"></a>
|
|
10
|
-
<a href="README.md">English</a>
|
|
11
|
-
</p>
|
|
12
|
-
|
|
13
|
-
> 本文由英文版翻译而来,尚未经过母语者校对;以 [README.md](README.md) 为准,欢迎提交修正。
|
|
14
|
-
|
|
15
|
-
你照常写提示词。Tacit 在后台观察每一轮*实际*的走向——重试、工具报错,尤其是
|
|
16
|
-
智能体做错之后你发的那条消息——把你的习惯变成几条指令,让智能体在每个新会话里
|
|
17
|
-
自动遵守。无需点击,每次学习约 $0.001。
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
你: "把登录页做好一点"
|
|
21
|
-
智能体: …走偏…
|
|
22
|
-
你: "不对,我是说 apps/web 下的 Next.js 应用"
|
|
23
|
-
|
|
24
|
-
Tacit: 学到 → "用户常常不说明是哪个应用——先查 apps/web。"
|
|
25
|
-
注入之后每个会话的系统提示。
|
|
26
|
-
你再也不用重复说了。
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## 安装——30 秒
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
dsh plugin --profile web add dsh-tacit
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
重启 `dsh web`,刷新页面。可选的快速起步:**设置 → Tacit → *从我最近 20 轮中学习***
|
|
36
|
-
(约 $0.02,一次性)。
|
|
37
|
-
|
|
38
|
-
需要 DeepSeek Harness `>= 0.1.1-rc.1`、Node `>= 22`,以及已在 harness 里配置好的
|
|
39
|
-
DeepSeek API Key(Tacit 从不读取它)。
|
|
40
|
-
|
|
41
|
-
## 你会得到什么
|
|
42
|
-
|
|
43
|
-
- **零点击学习**——不顺的轮次和你自己的纠正会在后台被分析,并带上上一轮作为上下文。
|
|
44
|
-
每天有上限(默认 30 次)。*每次分析约 $0.001*
|
|
45
|
-
- **指令要靠表现留下**——学到的指令作为一小段系统提示注入,你可以查看、编辑、开关或
|
|
46
|
-
删除。新指令先是*候选*,如果你的不顺轮次比例变差就会自动退役。*免费*
|
|
47
|
-
- **✨ 改进**——输入框里的按钮,用 Tacit 学到的东西重写当前草稿,带前后对比预览和
|
|
48
|
-
👍/👎。*每次点击约 $0.001*
|
|
49
|
-
- **测量而非猜测**——设置页显示你的真实趋势:不顺轮次比例和每轮 token 数,最早 20 轮
|
|
50
|
-
vs 最近 20 轮。*免费*
|
|
51
|
-
|
|
52
|
-
## 它是怎么工作的
|
|
53
|
-
|
|
54
|
-
1. 对会话事件做纯折叠,得到每一轮的有界摘要。
|
|
55
|
-
2. 当一轮结束得不顺、或你的下一条消息像是纠正,就用一次很小的 `deepseek-v4-flash`
|
|
56
|
-
调用(低推理强度,结构化输出)分析那条提示词。
|
|
57
|
-
3. 每隔几次分析,再用一次调用把发现蒸馏成 2–4 条指令。
|
|
58
|
-
4. 指令被渲染成系统提示里 ≤300 token 的一段——原文在设置里可见,除此之外你的提示词
|
|
59
|
-
不会离开本机。
|
|
60
|
-
|
|
61
|
-
## 隐私与成本,一段话
|
|
62
|
-
|
|
63
|
-
Tacit 从不接触你的 API Key(所有调用都经过 harness 自己的模型服务),只调用白名单里的
|
|
64
|
-
官方模型,报告和指令都存放在 `~/.dsh/storages/tacit/`,拒绝对自身路由的跨站请求,
|
|
65
|
-
除了自己的报告之外从不删除任何东西。美元数字是按公开价格的估算;`dsh-cost-meter`
|
|
66
|
-
这样的成本插件会显示真实花费。完整细节(包括坦白的限制清单,英文):
|
|
67
|
-
[docs/privacy-and-cost.md](docs/privacy-and-cost.md)。
|
|
68
|
-
|
|
69
|
-
## 更多
|
|
70
|
-
|
|
71
|
-
[配置](docs/configuration.md) ·
|
|
72
|
-
[隐私、成本与限制](docs/privacy-and-cost.md) ·
|
|
73
|
-
[架构](docs/architecture.md) ·
|
|
74
|
-
[参与贡献](CONTRIBUTING.md) ·
|
|
75
|
-
[更新日志](CHANGELOG.md)(均为英文)
|
|
76
|
-
|
|
77
|
-
MIT © hackernotfound
|