dsh-tacit 0.2.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 +83 -0
- package/README.zh.md +77 -0
- package/client/client.js +1691 -0
- package/cordis.patch.yml +15 -0
- package/lib/analyze.js +893 -0
- package/lib/fold.js +300 -0
- package/lib/index.js +86 -0
- package/lib/routes.js +152 -0
- package/lib/schema.js +294 -0
- package/lib/service.js +1044 -0
- package/lib/store.js +219 -0
- package/package.json +104 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 hackernotfound
|
|
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
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<h1 align="center">Tacit</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center"><b>Learns what you leave unsaid in your prompts — and tells the agent for you.</b><br>
|
|
4
|
+
A plugin for <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.zh.md">中文</a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
You keep writing prompts the way you already do. Tacit watches how each turn
|
|
14
|
+
*actually* went — retries, tool errors, and above all the message you send
|
|
15
|
+
when the agent got it wrong — and turns your habits into a few directives the
|
|
16
|
+
agent follows in every new session. No clicks, about $0.001 per lesson.
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
you: "make the login page better"
|
|
20
|
+
agent: …stumbles…
|
|
21
|
+
you: "no, I meant the Next.js app under apps/web"
|
|
22
|
+
|
|
23
|
+
Tacit: learns → "The user often omits which app they mean — check apps/web first."
|
|
24
|
+
injects it into every later session's system prompt.
|
|
25
|
+
You never have to say it again.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Install — 30 seconds
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
dsh plugin --profile web add dsh-tacit
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Restart `dsh web`, refresh the page. Optional kick-start: **Settings → Tacit →
|
|
35
|
+
*Learn from my last 20 turns*** (≈ $0.02, once).
|
|
36
|
+
|
|
37
|
+
Requires DeepSeek Harness `>= 0.1.1-rc.1`, Node `>= 22`, and a DeepSeek API key
|
|
38
|
+
already configured in the harness (Tacit never reads it).
|
|
39
|
+
|
|
40
|
+
## What you get
|
|
41
|
+
|
|
42
|
+
- **Zero-click learning** — messy turns and your own corrections are analyzed
|
|
43
|
+
in the background, with the previous turn as context. Capped per day
|
|
44
|
+
(30 by default). *≈ $0.001 per analysis.*
|
|
45
|
+
- **Directives that earn their place** — learned directives are injected as a
|
|
46
|
+
small system-prompt section you can read, edit, toggle or delete. A new one
|
|
47
|
+
starts as a *candidate* and is retired automatically if your messy-turn
|
|
48
|
+
rate gets worse. *free*
|
|
49
|
+
- **✨ Improve** — a composer button that rewrites your current draft using
|
|
50
|
+
what Tacit has learned, with a before/after preview and 👍/👎. *≈ $0.001 per click*
|
|
51
|
+
- **Measured, not guessed** — Settings shows your real trend: messy-turn rate
|
|
52
|
+
and tokens per turn, first 20 turns vs. latest 20. *free*
|
|
53
|
+
|
|
54
|
+
## How it works
|
|
55
|
+
|
|
56
|
+
1. A pure fold over the session's events produces a bounded digest per turn.
|
|
57
|
+
2. When a turn ends messy, or your next message reads as a correction, one
|
|
58
|
+
small `deepseek-v4-flash` call (low reasoning effort, structured output)
|
|
59
|
+
analyzes the prompt.
|
|
60
|
+
3. Every few analyses, one more call distills the findings into 2–4 directives.
|
|
61
|
+
4. The directives are rendered as a ≤300-token section of the system prompt —
|
|
62
|
+
the exact text is visible in Settings, and nothing else about your prompts
|
|
63
|
+
leaves the machine.
|
|
64
|
+
|
|
65
|
+
## Privacy & cost, in one paragraph
|
|
66
|
+
|
|
67
|
+
Tacit never sees your API key (every call goes through the harness's own model
|
|
68
|
+
service), only calls the allowlisted official model, keeps reports and
|
|
69
|
+
directives in `~/.dsh/storages/tacit/`, refuses cross-site requests to its own
|
|
70
|
+
routes, and never deletes anything but its own reports. The dollar figures are
|
|
71
|
+
estimates at list price; a cost plugin such as `dsh-cost-meter` shows the real
|
|
72
|
+
number. Full details, including the honest list of limitations:
|
|
73
|
+
[docs/privacy-and-cost.md](docs/privacy-and-cost.md).
|
|
74
|
+
|
|
75
|
+
## More
|
|
76
|
+
|
|
77
|
+
[Configuration](docs/configuration.md) ·
|
|
78
|
+
[Privacy, cost & limitations](docs/privacy-and-cost.md) ·
|
|
79
|
+
[Architecture](docs/architecture.md) ·
|
|
80
|
+
[Contributing](CONTRIBUTING.md) ·
|
|
81
|
+
[Changelog](CHANGELOG.md)
|
|
82
|
+
|
|
83
|
+
MIT © hackernotfound
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
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
|