dsh-goal-contract 0.2.4 → 0.2.5
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 +32 -0
- package/README.en.md +276 -0
- package/README.md +3 -1
- package/package.json +1 -1
- package/src/index.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,38 @@
|
|
|
4
4
|
|
|
5
5
|
本文件记录 `dsh-goal-contract` 的对外变化。每条先中文整段、再英文整段。
|
|
6
6
|
|
|
7
|
+
## 0.2.5 — 2026-11-28
|
|
8
|
+
|
|
9
|
+
中文 / English
|
|
10
|
+
|
|
11
|
+
### 中文
|
|
12
|
+
|
|
13
|
+
这一版没有改任何插件行为,只补了「一个正常仓库该有的东西」。起因是 0.2.4 推上去之后,看 npm 页面和 GitHub 首页才发现:README 只有中文、没有 CI、没有 issue 模板、GitHub 的 About 三项全空。
|
|
14
|
+
|
|
15
|
+
**新增英文版 README。** `README.en.md`,276 行,与中文版逐行对齐——15 个章节标题落在完全相同的行号,15 个工具名、模型选型的全部数字、16 个配置项都原样保留。两份 README 顶部互相加跳转:中文版写 `**中文** | [English](README.en.md)`,英文版写 `[中文](README.md) | **English**`。
|
|
16
|
+
|
|
17
|
+
**新增 CI。** `.github/workflows/ci.yml`:Ubuntu 和 Windows 两个平台、Node 22,每次 push 到 master 或提 PR 自动跑一千八百多个测试。两个细节是必需的——这个包没有 lock 文件,所以用 `npm install` 而不是 `npm ci`;有 5 个测试会读 `dist/client.js`,所以必须先跑 `npm run build:client` 再跑测试。
|
|
18
|
+
|
|
19
|
+
**新增协作文件。** `.github/ISSUE_TEMPLATE/` 下的 bug 与功能建议表单、`.github/pull_request_template.md`、`CONTRIBUTING.md`(怎么本地跑起来、提 PR 前要做什么、不接受什么)、`SECURITY.md`(双语;写清「模型能绕过这个插件」不算漏洞——它本来就不是安全边界)。
|
|
20
|
+
|
|
21
|
+
**补齐 GitHub 仓库 About。** description(和 npm 同一句)、homepage(指向 npm 页面)、8 个 topics(dsh / dsh-plugin / deepseek-harness / cordis / goal-tracking / agent-safety / ai-agent / autonomous-agent)。
|
|
22
|
+
|
|
23
|
+
测试:1806 个全通过,进程退出码 0。
|
|
24
|
+
|
|
25
|
+
### English
|
|
26
|
+
|
|
27
|
+
No plugin behaviour changed in this release. It only fills in what a normal repository is expected to have. After 0.2.4 shipped, looking at the npm page and the GitHub front page made the gaps obvious: the README was Chinese-only, there was no CI, no issue templates, and all three GitHub About fields were empty.
|
|
28
|
+
|
|
29
|
+
**English README added.** `README.en.md`, 276 lines, aligned with the Chinese version line by line — all 15 section headings land on exactly the same line numbers, and all 15 tool names, every number in the model benchmark table, and all 16 configuration keys are preserved verbatim. The two READMEs link to each other at the top.
|
|
30
|
+
|
|
31
|
+
**CI added.** `.github/workflows/ci.yml`: Ubuntu and Windows, Node 22, running the full suite of 1,800+ tests on every push to master and every pull request. Two details are load-bearing — this package has no lock file, so it uses `npm install` rather than `npm ci`; and five tests read `dist/client.js`, so `npm run build:client` has to run before the suite.
|
|
32
|
+
|
|
33
|
+
**Collaboration files added.** Bug and feature-request forms under `.github/ISSUE_TEMPLATE/`, `.github/pull_request_template.md`, `CONTRIBUTING.md` (how to run it locally, what to check before opening a PR, and what will be rejected), and `SECURITY.md` (bilingual; it states plainly that "the model can bypass this plugin" is not a vulnerability, because the plugin was never a security boundary).
|
|
34
|
+
|
|
35
|
+
**GitHub About filled in.** description (the same sentence as npm), homepage (pointing at the npm page), and 8 topics.
|
|
36
|
+
|
|
37
|
+
Tests: 1806 passing, process exit code 0.
|
|
38
|
+
|
|
7
39
|
## 0.2.4 — 2026-11-28
|
|
8
40
|
|
|
9
41
|
### 中文
|
package/README.en.md
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# dsh-goal-contract
|
|
2
|
+
|
|
3
|
+
[中文](README.md) | **English**
|
|
4
|
+
|
|
5
|
+
Current version: 0.2.5
|
|
6
|
+
|
|
7
|
+
**While you are away, the AI's goal keeps moving forward — under control.**
|
|
8
|
+
|
|
9
|
+
Set a goal contract for a session (objective / allow / deny / acceptance), write every change into an append-only ledger, use deterministic rules to spot drift (edited a path you forbade, ran a command you forbade, changed the goal without a reason, no progress for a long time), and stop the AI when it goes in circles, fails repeatedly, repeats itself, or gets stuck.
|
|
10
|
+
|
|
11
|
+
> ⚠ This plugin is an **interrogator + bookkeeper**, not a security boundary.
|
|
12
|
+
> The model can only propose; the contract and its amendments are decided by you.
|
|
13
|
+
|
|
14
|
+
## What it can do for you
|
|
15
|
+
|
|
16
|
+
### 1. Your goal can't be quietly changed while you're away
|
|
17
|
+
|
|
18
|
+
Only you can change the goal — the model can only propose. When it says "I want to change the goal to X", that has to land first as a proposal with a reason, written into the contract and the ledger, so you can see it and reject it.
|
|
19
|
+
|
|
20
|
+
The "paths you must not touch" and "commands you must not run" you wrote into the contract: the call that steps outside them is refused on the spot, and you get back one line saying which boundary was crossed and what to do next.
|
|
21
|
+
|
|
22
|
+
Deleting an acceptance item, rewriting a milestone, rewriting the goal statement — all of those count as "downgrades". Without your explicit permission, every one of them is refused.
|
|
23
|
+
|
|
24
|
+
### 2. Progress is computed, not self-reported
|
|
25
|
+
|
|
26
|
+
The progress on the panel comes from the milestones ticked off one by one in the ledger, not from the model's self-report.
|
|
27
|
+
|
|
28
|
+
Marking something done requires a **command you can re-run** (or a file location you can check); only exit code 0 counts. Evidence that doesn't meet the bar is refused.
|
|
29
|
+
|
|
30
|
+
"Done N/M" and the percentage are reduced from the ledger and match what the panel shows; they survive a page refresh and a DSH restart.
|
|
31
|
+
|
|
32
|
+
### 3. It stops the AI before it goes in circles
|
|
33
|
+
|
|
34
|
+
The same tool failing again and again, the same call swinging back and forth, long repeated output — all three stuck signals are cut off on the spot.
|
|
35
|
+
|
|
36
|
+
Loops and being stuck are **hard blocks**: once they fire, there is no way through until you change the approach.
|
|
37
|
+
|
|
38
|
+
Several rounds on the same problem with no progress: it stops and reports the way you configured, or researches first and then reports. Running out of rounds is only a **soft hint** — one reminder, no block.
|
|
39
|
+
|
|
40
|
+
### 4. You won't come back to "an idea nobody wrote down"
|
|
41
|
+
|
|
42
|
+
Every word you say gets filed: what fits an acceptance item gets attached to it, what doesn't go into "Outstanding Items", and **your exact words are always kept** — never rewritten into the model's own paraphrase.
|
|
43
|
+
|
|
44
|
+
Promises the AI makes like "I'll give you X later" are recorded as debts automatically, so it doesn't have to remember them. Before work starts you're reminded of the most important ones; the rest you can find on the panel.
|
|
45
|
+
|
|
46
|
+
Debts left open in a long task stay on the panel; when you want to wrap up or archive a session, open debts block it, and you get an itemized list of what is still owed.
|
|
47
|
+
|
|
48
|
+
### 5. Every step is visible on the panel
|
|
49
|
+
|
|
50
|
+
In the "Goal Tracking" tab on the right of the session, the top bar shows the revision count, the run state and the progress; the acceptance list has a checkbox on every entry.
|
|
51
|
+
|
|
52
|
+
The top bar's "Change Log" is an overlay: every change to the goal and the contract is in there — what changed, why it changed, what it became.
|
|
53
|
+
|
|
54
|
+
How long something has been owed isn't written into the table; color says it: over 24 hours is yellow, over 72 hours is red.
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
dsh plugin --profile <your profile name> add dsh-goal-contract
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Restart DSH after installing and it takes effect. The plugin has zero third-party dependencies; it only borrows DSH's own general services.
|
|
63
|
+
|
|
64
|
+
## Five-minute start
|
|
65
|
+
|
|
66
|
+
Four steps and you can see it watching for you.
|
|
67
|
+
|
|
68
|
+
**Step 1 · Declare the goal.**
|
|
69
|
+
Just tell the AI "make this a goal, with the acceptance written as…" and it will call `goal_declare` to lay down a contract.
|
|
70
|
+
> What you'll see: a "Goal Tracking" tab appears on the right of the session; the top bar shows the revision count, the engine state and the rounds run (e.g. "1 revision · engine active · 3 rounds run").
|
|
71
|
+
|
|
72
|
+
**Step 2 · Watch the progress on the panel.**
|
|
73
|
+
Open "Goal Tracking": the left column is "Goal Milestone Details", the middle column is "Outstanding Items", the right column is "Goal and Milestone Change Ledger".
|
|
74
|
+
> What you'll see: every acceptance item has a checkbox, and the card says "Done N/M".
|
|
75
|
+
|
|
76
|
+
**Step 3 · Tick a milestone.**
|
|
77
|
+
Tick it on the panel, or let the AI call `goal_accept` with the re-runnable verification command attached.
|
|
78
|
+
> What you'll see: that milestone gets a strikethrough and turns grey, and "Done N/M" goes up.
|
|
79
|
+
|
|
80
|
+
**Step 4 · Read the change log.**
|
|
81
|
+
Click "Change Log" in the top bar.
|
|
82
|
+
> What you'll see: a three-column table — what changed / why / what it became, every row with a timestamp and a reason.
|
|
83
|
+
|
|
84
|
+
## How to read the panel
|
|
85
|
+
|
|
86
|
+
The panel lives in the "Goal Tracking" tab on the right of the session. There is exactly one top-level tab and no sub-tabs inside it.
|
|
87
|
+
|
|
88
|
+
**Top bar**: two buttons on the left — "Goal Execution Doc" (opens the execution doc for this goal) and "Change Log" (an overlay); in the middle, the one-line goal, the run state and the progress (Done N/M); on the right, "Settings".
|
|
89
|
+
|
|
90
|
+
**Three-column dashboard**:
|
|
91
|
+
|
|
92
|
+
| Column | Title | What you see in it |
|
|
93
|
+
| --- | --- | --- |
|
|
94
|
+
| Left | Goal Milestone Details | The acceptance items, each with its milestones underneath, each one tickable; ticked items get a strikethrough and turn grey |
|
|
95
|
+
| Middle | Outstanding Items | Three groups: "I owe you" (debts owed), "Your pending items" (things you said that haven't been filed yet), "Notices (reminders only, nothing to act on)" |
|
|
96
|
+
| Right | Goal and Milestone Change Ledger | A three-column table: what changed / why / what it became |
|
|
97
|
+
|
|
98
|
+
**How to read the "Outstanding Items" table**:
|
|
99
|
+
|
|
100
|
+
- One row per item: a settlement checkbox first, then the type / item / created time / actions.
|
|
101
|
+
- The table does **not** have an "owed for how long" column — overdue is expressed with color: over 24 hours is yellow, over 72 hours is red.
|
|
102
|
+
- Under the "item" cell there is a line of small grey text with the evidence and the retrieval hints.
|
|
103
|
+
- Ticking = settled, and it can be undone; once settled, the item moves into the "Completed" section (collapsed by default, searchable, reopenable).
|
|
104
|
+
- "Waive" is a single button; clicking it opens a small box for you to write a reason (it can be left empty). Writing back only touches the debt, **not the goal contract**.
|
|
105
|
+
- Top right there is also "Waive all (N)", with a second confirmation.
|
|
106
|
+
- By default only this session's debts are listed; at the bottom there is a collapsed section "Outstanding Items from other sessions" you can expand to see what other sessions still owe.
|
|
107
|
+
- Source labels come in three kinds: automatically detected ones show the name of the check (e.g. "git has uncommitted changes"), ones the model records show "Recorded by me", ones the panel adds show "Added by me".
|
|
108
|
+
- If the write-back fails, the checkbox snaps back and the server's reason is shown right there on the row — you never get a "nothing happened" click.
|
|
109
|
+
- "Show original" expands the words from that round in place, without switching sessions.
|
|
110
|
+
|
|
111
|
+
**Debts come in four kinds**:
|
|
112
|
+
|
|
113
|
+
| Type | Meaning | Example |
|
|
114
|
+
| --- | --- | --- |
|
|
115
|
+
| Promise | Something you said you'd do, not done yet | "I'll fill in the README later" |
|
|
116
|
+
| Owed delivery | A deliverable promised to someone | "I'll bring you that draft by Wednesday" |
|
|
117
|
+
| Loose end | Small unfinished bits | "That switch isn't back where it was" "CI is still red" |
|
|
118
|
+
| Temp file | A temp file this session wrote and hasn't cleaned up | `.work/scratch.tmp` |
|
|
119
|
+
|
|
120
|
+
**What the panel can't do**:
|
|
121
|
+
|
|
122
|
+
- It can't change the goal contract — only the model can, via `goal_declare` (first declaration) or `goal_amend` (amendment, **which must state a reason**).
|
|
123
|
+
- It only sees the requester's own copy — other sessions' content never leaks into yours.
|
|
124
|
+
|
|
125
|
+
## The 15 tools at a glance
|
|
126
|
+
|
|
127
|
+
These tools are for the AI to use; you normally don't call them by hand — what you say makes it call them.
|
|
128
|
+
|
|
129
|
+
| Tool | What it does | When you'll run into it |
|
|
130
|
+
| --- | --- | --- |
|
|
131
|
+
| `goal_declare` | Lay down the goal contract for the first time (goal / allow / deny / acceptance) | When you set a goal for a long job |
|
|
132
|
+
| `goal_amend` | Amend the goal contract; a reason is required | When you find the goal has to change, or acceptance items need adding/removing |
|
|
133
|
+
| `goal_ack` | Record one reconciliation: this round's work matches the goal | When you want to keep a trace of "still on track" |
|
|
134
|
+
| `goal_milestone` | Record one piece of progress, stating "what got done" (doesn't change the contract, doesn't take a revision number) | When there is a milestone result mid-way you want to keep |
|
|
135
|
+
| `goal_accept` | Mark an acceptance item or one of its milestones done; must attach re-runnable evidence | When you see something really finished and want to tick it off |
|
|
136
|
+
| `goal_history` | Read this goal's change ledger (append-only, history can't be changed) | When you want to see how many times the goal changed and why each time |
|
|
137
|
+
| `goal_complete` | Close the goal out; it checks the acceptance items and open debts and lists what is missing if it isn't done | When you think the job can be closed |
|
|
138
|
+
| `goal_owe` | Record a debt (promise / owed delivery / loose end / temp file); evidence required | When you or the AI say "I'll do X later" and want it pinned down |
|
|
139
|
+
| `goal_settle` | Settle one debt (clear it / in progress / reopen / waive) | When you actually finished something, or decide to stop chasing it |
|
|
140
|
+
| `goal_debts` | Read-only query of the debt list, filterable by type and status | When you want to ask "what is still owed" without clicking through the UI |
|
|
141
|
+
| `goal_contract_claim` | One call records a reconciliation, pulls the claim board, and registers the file range this round will touch | When several sessions edit one repo and you fear they will overwrite each other |
|
|
142
|
+
| `goal_round` | Record one round: what this round set out to solve, and how it turned out | Once a long task is running and you want traceable progress |
|
|
143
|
+
| `goal_route` | Decide where a sentence that fits no acceptance item goes: append to the goal / replace it wholesale / record it as an outstanding item / ignore it (a reason is required) | When you raise a new request and the AI can't tell where it belongs |
|
|
144
|
+
| `goal_settle_queue` | Clear one outstanding item directly (done / dropped, reason required) | When the outstanding items list gets long and you want to clear one |
|
|
145
|
+
| `goal_status` | Read-only dashboard: how far the goal got (completed count / percentage / milestone list) | When you want to know "where are we now" without clicking through the UI |
|
|
146
|
+
|
|
147
|
+
## Configuration options
|
|
148
|
+
|
|
149
|
+
Want to change the behavior? Start with this table — every option has a default, and you get the default if you leave it empty.
|
|
150
|
+
|
|
151
|
+
| Option | Type | Default | What it does |
|
|
152
|
+
|---|---|---|---|
|
|
153
|
+
| `maxGoalRounds` | integer | `256` | **Maximum automatic continuation rounds** when syncing to a DSH native goal (automatic continuation itself is kept: the goal stays armed and keeps running on its own) |
|
|
154
|
+
| `requireContract` | boolean | `false` | **No-contract hard gate** (off by default since 2026-11-11): without a goal contract, actions that change things are no longer refused. Pass `true` explicitly to restore the old behavior |
|
|
155
|
+
| `card.provider` | string | `siliconflow` | The model route (provider) used by the **auto goal card** (= route extraction); by default DSH's configured SiliconFlow free model |
|
|
156
|
+
| `card.model` | string | `Qwen/Qwen3-8B` | The model name used by the **auto goal card** (= route extraction); by default Qwen3-8B (measured 83% accuracy / 827ms) |
|
|
157
|
+
| `card.timeoutMs` | integer | `15000` | Timeout for the **auto goal card**'s model call (on timeout → keep the old card, don't write dirty data) |
|
|
158
|
+
| `card.maxOutputTokens` | integer | `300` | Max output tokens for the **auto goal card**'s model call (six fields, enough) |
|
|
159
|
+
| `nativeGoal` | boolean | `false` | **Sync this session's goal to the DSH native goal**: changing the goal on the board also changes the native goal, and changing the native goal also raises an inconsistency notice (off by default; `NATIVE_GOAL_DEFAULT_ENABLED = false`) |
|
|
160
|
+
| `critic.enabled` | boolean | `false` | Review method: `false` = code check only (default, **calls no model at all**); `true` = add the second-pass model review (semantic assertions can only rely on it) |
|
|
161
|
+
| `critic.provider` | string | `deepseek-account` | The provider used for the second-pass review |
|
|
162
|
+
| `critic.model` | string | `deepseek-flash` | The model used for the second-pass review |
|
|
163
|
+
| `critic.timeoutMs` | integer | `15000` | Timeout for the second-pass review (ms); a timeout is treated as "not reviewed" |
|
|
164
|
+
| `critic.rounds` | integer | `10` | Second-pass throttle: at most one review per N rounds per session |
|
|
165
|
+
| `stuck.threshold` | integer | `2` | How many consecutive rounds without progress on the same problem count as "stuck" (min 1, max 10) |
|
|
166
|
+
| `stuck.action` | one of three | `research-after` | What is forced after being stuck: `report-only` = stop and report / `research` = go research / `research-after` = research, then report |
|
|
167
|
+
| `shortfall.threshold` | integer | `3` | The threshold for the round-count **soft hint** (min 1, max 10): after a few bad rounds in a row you get one reminder |
|
|
168
|
+
|
|
169
|
+
★ **`stuck.*` is a hard gate, `shortfall.*` is a soft hint** — these two rows plus `stuck.action` are the **underlying mechanism behind the three "round control" items on the panel's "Settings" page** (what the panel changes is written into the plugin's own config file and takes priority over the options here).
|
|
170
|
+
|
|
171
|
+
How `maxGoalRounds` is interpreted:
|
|
172
|
+
|
|
173
|
+
- **Left empty** (the option isn't in the config) → use the default **256**.
|
|
174
|
+
- **A positive integer** (`5`, `64`, `1024`…) → use it as is.
|
|
175
|
+
- **`0` (or `null`)** → **no limit** on rounds (when creating/changing the native goal the field is **not passed**, and the native goals service decides for itself).
|
|
176
|
+
- **An invalid value** (negative, not an integer, NaN, a string that isn't a number) → **fall back to 256**, and **the plugin log states the reason for the fallback**.
|
|
177
|
+
|
|
178
|
+
How to change it: override the `config` section in the composition layer under `id: dsh-goal-contract` (whole-section replacement, no deep merge):
|
|
179
|
+
|
|
180
|
+
```yaml
|
|
181
|
+
- insert:
|
|
182
|
+
- id: dsh-goal-contract
|
|
183
|
+
name: dsh-goal-contract
|
|
184
|
+
config:
|
|
185
|
+
maxGoalRounds: 5 # ← for example: at most 5 automatic rounds; leave this line out and it is 256
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
It takes effect after you **restart DSH** (the config is read once at mount time).
|
|
189
|
+
You can check it on a real machine: after creating or changing a goal, the `maxGoalRounds` returned by the DSH native goal is the configured value.
|
|
190
|
+
|
|
191
|
+
## If you want to switch models: measured reference
|
|
192
|
+
|
|
193
|
+
The plugin defaults to **deepseek-account / deepseek-flash** for the second-pass review and **siliconflow / Qwen/Qwen3-8B** for route extraction. If you want to switch, here are measured readings you can use as a reference.
|
|
194
|
+
|
|
195
|
+
There are three places in this plugin that use a model: mapping your words onto an acceptance item, the second-pass review, and giving "plan / progress" suggestions at the end of a round. All three are "**the model only extracts, the code decides**", so there is just one requirement for the model: **it must be able to emit valid JSON**.
|
|
196
|
+
|
|
197
|
+
**Measured data** (same batch of extraction tasks; accuracy = the share of outputs the code could use directly):
|
|
198
|
+
|
|
199
|
+
| Model | Accuracy | Single-call latency | Notes |
|
|
200
|
+
| --- | --- | --- | --- |
|
|
201
|
+
| **Qwen3-8B** (`enable_thinking:false`) | **83%** | **827ms** | 0 failures; **the current first choice** |
|
|
202
|
+
| GLM-4-9B-0414 | 75% | 2011ms | Accurate but 2.4× slower |
|
|
203
|
+
| Qwen2.5-7B-Instruct | 75% | 4316ms | Same accuracy, 5× the latency |
|
|
204
|
+
| DeepSeek-R1-0528 | 58% | 12916ms | **Reasoning model: slow and inaccurate**, not suitable |
|
|
205
|
+
| Qwen3.5-4B | — | All calls timed out | 4B is too small, dropped outright |
|
|
206
|
+
| XingChen 29B | 25% | — | Output **malformed JSON**; more parameters made it worse |
|
|
207
|
+
|
|
208
|
+
**★ The key point: parameter count is not a predictor.** 8B Qwen3 (83%) beats 29B XingChen (25%) —
|
|
209
|
+
a bigger model doesn't mean it speaks the format you want.
|
|
210
|
+
|
|
211
|
+
**Selection criteria** (filter by these four, ignore the rest for now):
|
|
212
|
+
1. **Supports JSON output** (you can't dig fields out of prose with regex);
|
|
213
|
+
2. **Can turn thinking off** (`enable_thinking:false`): for Qwen3 that is **14027ms → 694ms (about 20×)**;
|
|
214
|
+
3. **≥7B** (4B timed out on every call in the test);
|
|
215
|
+
4. **Not a reasoning model** (R1 measured 12916ms; among the **candidates that can actually produce JSON** it has the lowest accuracy — the 25% XingChen 29B emits malformed JSON and Qwen3.5-4B times out entirely, so neither counts as "a candidate that can actually produce JSON").
|
|
216
|
+
|
|
217
|
+
**★ Model + code fallback → 92%** (higher than the single model's 83%): the part the model gets wrong
|
|
218
|
+
is caught by the code fallback (grounding check / missing fields / invalid JSON all degrade to "nothing extracted" — no guessing, no inventing).
|
|
219
|
+
|
|
220
|
+
**Only two backends are kept**:
|
|
221
|
+
- **`dsh-builtin`** (including SiliconFlow's free models) — the default first choice, works out of the box;
|
|
222
|
+
- **`local-model`** — local weights, data never leaves the machine.
|
|
223
|
+
|
|
224
|
+
**The default model for route extraction (mapping your words onto an acceptance item) = `siliconflow` / `Qwen/Qwen3-8B`**:
|
|
225
|
+
|
|
226
|
+
- **Source**: **the SiliconFlow free model DSH has already configured** — the `siliconflow` provider and
|
|
227
|
+
the `Qwen/Qwen3-8B` model **are already in the host's llm config**, so it works out of the box (no extra
|
|
228
|
+
key to configure, no account to sign up for).
|
|
229
|
+
- **Why this one**: in the table above it has the **highest accuracy (83%) and the lowest latency (827ms)**, and it isn't a reasoning model
|
|
230
|
+
(so thinking can be turned off → 20× faster).
|
|
231
|
+
- **Where to change it**: panel "Settings" page → the "Second-Pass Review Settings" card has one more row, "**Route extraction model**".
|
|
232
|
+
Two sources to choose from: **DSH configured models** (both provider and model are picked from **DSH's model list**, **nothing hard-coded**)
|
|
233
|
+
/ **local model** (local weights that aren't in the list → type the provider and model name in by hand).
|
|
234
|
+
- **Where it lands**: an **independent entry** in the plugin config, which does **not overwrite** the second-pass group
|
|
235
|
+
(provider / model / fallback / rounds).
|
|
236
|
+
- **Old configs need no change**: an old config without this entry **falls back to the default automatically**
|
|
237
|
+
(`siliconflow` / `Qwen/Qwen3-8B`), and works just as well.
|
|
238
|
+
- **The second pass's own defaults are untouched**: still `deepseek-account` / `deepseek-flash`.
|
|
239
|
+
- **Failures are always silent**: model unavailable / timeout / invalid JSON → that round **writes no card and no queue entry**
|
|
240
|
+
(the previous result is kept, and the panel keeps showing the last card) — **it never throws and never writes dirty data**.
|
|
241
|
+
|
|
242
|
+
**JEV is not adopted**: the free channel (classifier.dev) and Laya self-hosting were both checked,
|
|
243
|
+
but an independent evaluation put it at **62.6% on the phishing-email task, while regex rules got 91.8%** —
|
|
244
|
+
**measurably worse than a small local model**, so it is not integrated.
|
|
245
|
+
|
|
246
|
+
## What it can't do (known limitations)
|
|
247
|
+
|
|
248
|
+
These are the things it can't do — better to say them up front than to find out later.
|
|
249
|
+
|
|
250
|
+
**It is not a security boundary. Only two things can really stop you: loop detection and stuck detection. Everything else is "stop for one round" or "just a reminder".**
|
|
251
|
+
|
|
252
|
+
| Mechanism | Default threshold | Hardness | What happens after it fires |
|
|
253
|
+
|---|---|---|---|
|
|
254
|
+
| Loop detection | 3 | **Truly hard** | Blocked for good; you have to change the approach |
|
|
255
|
+
| Stuck detection | 2 | **Truly hard** | It asks you directly (stop and report / go research / research then report) |
|
|
256
|
+
| Consecutive tool failures | 6 | Stops one round | Answering "continue" lets it through |
|
|
257
|
+
| Repeated text | 30 | Stops one round | Same |
|
|
258
|
+
| Round soft hint | 3 | **Purely soft** | Reminds only, doesn't block |
|
|
259
|
+
| Drift guard (forbidden paths / commands) | No threshold | Hard refusal | The call is refused outright |
|
|
260
|
+
|
|
261
|
+
- **Only tools that take a file path argument can be blocked.** Running a script on the command line that edits files gets around the lock — there is no physical enforcement layer here.
|
|
262
|
+
- **Members of the same session do not lock against each other.** The task graph already handles the ordering, otherwise it would deadlock itself.
|
|
263
|
+
- **The panel can't change the goal contract**; only the model can, via `goal_declare` / `goal_amend` (amendments must state a reason).
|
|
264
|
+
- **The panel only sees the requester's own copy**; other sessions' content never leaks into yours.
|
|
265
|
+
- **Temp file debts must have their file deleted before they can be settled** (settling checks whether the path is still there); if you don't want to delete it, waive it (leaves a trace, can be undone). The plugin **only records, it never deletes anything for you**.
|
|
266
|
+
- **Semantic judgments rely on code, not on the model.** The second review model (if you enabled it) only records, it never blocks; when the model is unavailable, times out, or returns invalid JSON, everything degrades gracefully — no blocking, no conviction. A reviewer that isn't sure is more dangerous than no reviewer.
|
|
267
|
+
- **When extraction isn't accurate, it is better to queue it than to attach it wrongly.** Your exact words are always kept, but the cost is that "Outstanding Items" may keep piling up.
|
|
268
|
+
- **"Show original" only expands inside the current panel**; it doesn't switch to another session.
|
|
269
|
+
|
|
270
|
+
## Where the full docs are
|
|
271
|
+
|
|
272
|
+
For the details: implementation notes, design decisions and the change history live in `docs/`, where `docs/implementation-notes.md` is an internal developer memo. The plugin's origins and design intent are in [`ORIGIN.md`](./ORIGIN.md), and the version changes are in [`CHANGELOG.md`](./CHANGELOG.md).
|
|
273
|
+
|
|
274
|
+
## Problems / feedback
|
|
275
|
+
|
|
276
|
+
The repository is at <https://github.com/Eason-22/dsh-goal-contract>; please open an issue for problems and suggestions: <https://github.com/Eason-22/dsh-goal-contract/issues>.
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-goal-contract",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Helps keep an AI agent's goal under control while you are away. It cannot silently change the goal, completing a milestone needs a real command exit code, and it stops on repeated failures, loops or text repetition instead of grinding all night.",
|
|
6
6
|
"license": "MIT",
|
package/src/index.js
CHANGED
|
@@ -1753,7 +1753,7 @@ export const name = 'dsh-goal-contract';
|
|
|
1753
1753
|
export const SERVICE_NAME = 'goalContract';
|
|
1754
1754
|
|
|
1755
1755
|
/** 版本号。必须与 package.json 的 version 一致(测试会核对这两处不漂)。 */
|
|
1756
|
-
export const PLUGIN_VERSION = '0.2.
|
|
1756
|
+
export const PLUGIN_VERSION = '0.2.5';
|
|
1757
1757
|
|
|
1758
1758
|
// ── 配置声明(挂进 DSH 设置页) ─────────────────────────────────────────────
|
|
1759
1759
|
//
|