dsh-switchman 1.5.0 → 1.7.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/README.md CHANGED
@@ -2,92 +2,82 @@
2
2
 
3
3
  **English** | [简体中文](./README.zh.md) | [繁體中文](./README.zh-TW.md) | [日本語](./README.ja.md) | [한국어](./README.ko.md) | [Español](./README.es.md) | [Français](./README.fr.md) | [Deutsch](./README.de.md) | [Italiano](./README.it.md) | [Português](./README.pt.md) | [Русский](./README.ru.md)
4
4
 
5
- > **The switchman family**, same author, same orchestration: [opencode-switchman](https://github.com/mrzturn/opencode-switchman) (the OpenCode original) · [zcode-switchman](https://github.com/mrzturn/zcode-switchman) (the ZCode port) · **dsh-switchman** (this repo, the DeepSeek Harness edition).
5
+ > **The switchman family**, same author, same dispatch doctrine: [opencode-switchman](https://github.com/mrzturn/opencode-switchman) (the OpenCode original) · [zcode-switchman](https://github.com/mrzturn/zcode-switchman) (the ZCode port) · **dsh-switchman** (this repo, the DeepSeek Harness edition).
6
6
 
7
- ![dsh-switchman — the context water level throws the switch and routes every task into the right lane](docs/assets/hero.svg)
7
+ ![dsh-switchman — the context watermark throws the switches and drops each task into the right lane](docs/assets/hero.svg)
8
8
 
9
- > Meter the context, and every task finds its own lane.
9
+ > A water meter on the context; every task finds its own lane.
10
10
 
11
11
  ## Why you need it
12
12
 
13
- Work in DSH long enough and you run into two things:
13
+ Two pains creep in once you've worked in DSH for a while. First, sessions get heavier the longer they run: history bloats the context into hundreds of thousands of tokens, the model starts forgetting, slowing down, costing more — and a manual /compact loses detail. Second, the main model does everything itself: chasing files, running tests, reconciling data — most of that work belongs on a cheaper model.
14
14
 
15
- 1. **Sessions get heavier the longer they run.** History balloons the context to hundreds of thousands of tokens; the model starts forgetting, slowing down, getting expensive — until a manual /compact is your only option, and the moment it compresses, detail is lost.
16
- 2. **Your primary model does everything itself.** Looking up a file, running a test, reconciling data — it chews through all of it alone, slow and costly, when most of that work really belongs on a cheaper model.
15
+ dsh-switchman is a plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Once installed, the main model stops doing and starts dispatching: measure the watermark, pick a lane, hand out tasks, check acceptance. It's not a new model — it's a dispatch doctrine hooked onto DSH plus a settings page, and it does seven things:
17
16
 
18
- dsh-switchman is a plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Once installed, the primary model goes from "doing everything itself" to working as a dispatcher: measure the water level, pick the lane, hand out the task, check the work. It is not a new model — it is an orchestration doctrine hooked onto DSH plus a settings page. Concretely, it does six things:
17
+ **1. Context watermark: long sessions don't blow up.** Every turn counts session tokens in real time, and three escalating lines tighten the screws: 50k (soft, adjustable) nudges "time to delegate"; 90k (hard) shrinks the single-read budget and steers toward wrap-up; 130k (force) hands over automatically — forks the session for the record, compacts the context, wakes the fork to continue, task unbroken. Background subagents still running at handover aren't lost either: their ids, tasks, and report paths go into the handover document, so the resumed session knows where to collect reports and never dispatches twice. Every subagent carries its own hard cap and exits after writing its HANDOFF summary. When the automatic intervention doesn't suit you, take over manually: `/ctx-pause` stops all watermark actions (measurement keeps running, the banner switches to paused — it just stops acting), `/ctx-resume` restores them at any time — after a DSH restart the enforcement also comes back on its own, a temporary let-go, not a permanent off; `/ctx-handover` doesn't wait for the watermark to hit the ceiling and starts the same handover on demand: fork a backup, compact the context, wake the continuation (the session is first steered to an idle boundary, so the result can take a few minutes).
19
18
 
20
- **1. Context water level: long sessions never burst.** Every turn counts live session tokens against three water marks that ratchet up: 50k (soft, adjustable) nudges "time to delegate"; 90k (hard) tightens the per-read file budget and steers toward wrap-up; 130k (force) hands over automatically — forking a backup of the session, compacting the context, and waking the continuation, so the task never drops. Background subagents still running at that moment are not lost either: their ids, task descriptions, and report paths are written into the handover document, so the resumed session knows where to collect reports instead of dispatching duplicates. Every dispatched subagent carries its own hard cap; on reaching it, the subagent writes its HANDOFF summary and exits.
19
+ **2. Six dispatch pools: the right model for every job.** Economy (batch small chores), mechanical (template rewrites), main (day-to-day coding), hard (hard reasoning and large refactors), vision (images), review (independent verification). On the settings page you tick candidates, order priorities, grade S/A/B/C, and pin a per-route thinking effort — the effort dropdown lists the levels that model actually supports, not a generic three. Every turn's prompt carries a `[SWITCHMAN:POOLS]` recommendation table, and the main model dispatches by it. Three enforcement modes: off / advice / force (force = out-of-pool models get rejected outright).
21
20
 
22
- **2. Six dispatch pools: the right model for every job.** An economy pool (batch chores), a mechanical pool (templated rewrites), a main pool (day-to-day coding), a hard pool (tough reasoning and large-scale refactors), a vision pool (reading images), and a review pool (independent verification). In the settings page you tick candidates, rank them (optional S/A/B/C tiers), and pin a reasoning effort to each individual route — the effort dropdown lists the levels that model actually supports, not a generic three. Every prompt sent to the primary model carries a `[SWITCHMAN:POOLS]` recommendation table, and it dispatches by that table. Execution mode has three states: off / advice / enforce (enforce = out-of-pool models are rejected outright).
21
+ **3. Agent Teams mode: from solo to a team.** Off by default — after install it's lightweight subagent dispatch. Two independent toggles on the settings page:
23
22
 
24
- **3. Agent Teams mode: from working solo to running a team.** Off by default — right after install you get lightweight subagent dispatch. Two independent toggles live in the settings page:
23
+ - **Agent teams** — once on, the team doctrine is injected (delegate by default + tiered verification + shared task-board discipline) and DSH's Agent Teams is enabled automatically: the main model can pull standing teammates (`spawn_teammate`), put work on a shared task board (`team_task_*`), and message teammates. When to form a team follows clear discipline: parallelizable independent subtasks, bulky self-contained work, high main-context watermark, need for role separation; one-off single-point investigations still go to a subagent. Turn the toggle off and the team clauses vanish without residue, and team tools are never yanked from sessions still running.
24
+ - **Subagent model whitelist sync** — DSH keeps an authorization whitelist "allow agents to pick models for subagents": routes chosen in a pool but not authorized get rejected when dispatched by name (marked ⚠ in teams mode). Flip this toggle and the union of all six pools is written into that whitelist wholesale — switchman becomes the single source of truth, no double configuration. The whitelist takes effect as a per-new-session snapshot; the sync only affects sessions started afterwards.
25
25
 
26
- - **Agent teams mode** — turning it on injects the team doctrine (delegate-by-default + tiered verification + shared-task-board discipline) and automatically enables DSH's Agent Teams: the primary model can pull in durable teammates (`spawn_teammate`), assign work on the shared task board (`team_task_*`), and trade messages with teammates (`send_message`). When to build a team follows a clear discipline: parallelizable independent subtasks, bulky self-contained work, a primary context already running high, or a need for role separation; one-off single-point investigations still go through a subagent. DSH's shipped policy is "no team unless the user names one" — here it flips to "use one when it fits". Turning the toggle off again leaves zero residue of the team clauses, and it never strips the team tools from sessions that are already running.
27
- - **Subagent model whitelist sync** — DSH keeps an authorization whitelist of "models agents may pick for subagents": routes selected in a pool but never authorized get denied when the primary model names them explicitly (in teams mode, the pools table and the settings page flag those routes with ⚠). Flip this toggle and the union of all six pools is written into that whitelist wholesale — no configuring the same thing on both sides, switchman stays the single source of truth, and the fork-dispatch path is covered as well. The whitelist takes effect as a per-new-session snapshot, so the sync only applies to sessions opened afterwards.
26
+ The session header gives at-a-glance feedback: the ⚡ "autonomous team" badge and ◇ with the session's actual model; while an auto-handover runs, a live indicator shows "handover in progress · backup session / compacting context / waking the successor".
28
27
 
29
- The session header keeps you posted at a glance: an ⚡ "autonomous team" badge and a ◇ chip showing the session's actual model; while an automatic handover is running, a live "handover in progress · backing up session / compacting context / waking continuation" banner appears.
28
+ **4. Language preferences: ask once, remember forever.** One dropdown each for replies, code comments, and documents; scope is global or per-project (`.switchman/lang.json`). Skipping is fine — on first use you're asked once in your DSH interface language, and every session obeys the answer afterwards.
30
29
 
31
- **4. Language preferences: asked once, remembered for good.** One dropdown each for replies, code comments, and documentation, with a scope of global or per project (`.switchman/lang.json`). Leaving them unset is fine — the first time it matters, you are asked once in your DSH UI's language, the answer is remembered, and every session afterwards follows it automatically.
30
+ **5. Interface language: the plugin itself speaks your language.** In the "Interface" section atop the settings page sits the "Interface language" dropdown (setting key `uiLocale`): Auto (default, follows the DeepSeek Harness app language), or any built-in interface language picked by hand — options always appear under the language's own endonym, never translated. It switches only the plugin's own interface (badge, home panel, settings page), never the DSH app language: selecting previews live with no restart, the choice is remembered after save and restored on the next launch, and any failure falls back to the app language; the dictionaries ship inline in the plugin bundle, nothing to download.
32
31
 
33
- **5. Tiered verification: every change gets checked.** Changes over 20 lines go to a tester; over 300 lines, or anything touching core / security / data-consistency logic, also gets an independent reviewer pass. The reviewer's model is chosen to avoid the model used by "the agent that wrote the diff" — as far as the pools allow; when they truly cannot, the conclusion declares DOWNGRADED. Say "don't use teams" once and it instantly drops back to solo.
32
+ **6. Tiered verification: every change gets checked.** Changes over 20 lines go to a tester; over 300 lines, or touching core / security / data-consistency logic, additionally to an independent reviewer. The review model is picked anchored on the model of "the agent that wrote the diff", avoiding it where possible; when the pool can't, the conclusion declares DOWNGRADED. Say "don't use the team" once and it drops back to solo instantly.
34
33
 
35
- **6. `/vision`: text-only models can still work with images.** When your primary model cannot read images, DSH refuses image-bearing messages right at the gate. Attach the image, type `/vision what's wrong with this image`, and the image is resolved to a file path and handed to a vision-pool model to read, with the findings returned to the current session. A hint appears above the composer early on — "the current model can't read images"; when a plain image send is refused, the draft is rewritten once as `/vision` and resubmitted on its own, no manual redo; if no vision pool is configured, the command refuses with setup guidance.
34
+ **7. `/vision`: text-only models can still handle images.** When the main model can't read images, DSH rejects image-bearing messages at the gate. Paste the image, type `/vision what's wrong with this image`, and the image goes to a vision-pool model; the verdict comes back into the current session. A heads-up "current model can't read images" appears above the input box; when a direct image send is rejected, the message is rewritten as `/vision` and resent automatically — no manual redo; with no vision pool configured the command refuses and points to the settings.
36
35
 
37
- Only one model? Still worth installing — water-level control and tiered verification do not care how many models you have, and long single-model sessions benefit all the same.
36
+ Worth installing even with a single model — watermark control and tiered verification don't care how many models you have, and long single-model sessions benefit just the same.
38
37
 
39
38
  ## Bundled skills
40
39
 
41
- - **db-query** — read-only MySQL / Redis verification: run SQL to reconcile records, check cache keys / TTLs, and audit cross-store consistency; refuses all writes. One-time setup below.
42
- - **git-commit-message** — generates convention-compliant commit text. Text only; it never runs git for you.
43
- - **requirement-docs** — one spec for requirements analysis / PRD / design documents, with output archived to `docs/requirements-and-design/`.
40
+ - **db-query** — read-only MySQL / Redis verification: run SQL to reconcile data, inspect cache keys / TTL, cross-database consistency checks; every write refused. Needs one-time initialization before first use (see below).
41
+ - **git-commit-message** — generates disciplined commit messages; text only, never runs git for you.
42
+ - **requirement-docs** — the house standard for requirement analysis / PRD / design docs; output is archived to `docs/requirements-and-design/`.
44
43
 
45
44
  ## Quick start
46
45
 
47
- 1. **Install** — from any agent session, or the Web plugin manager:
46
+ 1. **Install** — have an agent run it in any session, or use the Web plugin management page:
48
47
 
49
48
  ```
50
49
  plugin_manager: install_bundle target=dsh-switchman
51
50
  ```
52
51
 
53
- or from a local checkout (linked; re-run `remove_bundle` + `install_bundle` after pulling changes):
52
+ Or install from a local checkout (link mode; after an update, `remove_bundle` + `install_bundle` again):
54
53
 
55
54
  ```
56
55
  plugin_manager: install_bundle target=/path/to/dsh-switchman
57
56
  ```
58
57
 
59
- or from a terminal via the `dsh` CLI — pick the profile that matches how you run DSH:
58
+ Or with the `dsh` CLI in a terminal — pick the profile matching how you run it:
60
59
 
61
60
  ```bash
62
61
  dsh plugin --profile web add dsh-switchman # Web GUI
63
62
  dsh plugin --profile desktop add dsh-switchman # desktop app
64
63
  ```
65
64
 
66
- 2. **Restart DSH** — quit the app entirely and reopen (a page reload is not enough) so the client-module table picks up the bundle.
65
+ 2. **Restart DSH** — quit the app completely and reopen it (a page refresh doesn't count); only then does the client module table recognize the bundle.
67
66
 
68
- 3. **Language preferences** — Settings → dsh-switchman, or "Switchman Control Center" in the home sidebar. The first screen sets the scope: global (this profile) or per project (each project's `.switchman/lang.json`); then three dropdowns set the reply / comment / doc languages, each with a live "current: …" line underneath. Skipping is fine — you will be asked once on first use and remembered (the question is asked in your DSH UI language).
67
+ 3. **Configure** — Settings → dsh-switchman, or "Switchman Dispatch Center" in the home sidebar. It's a single page of config and looks like this — walk it top to bottom and you're done:
69
68
 
70
- ![Language preferences: scope and the three languages](docs/assets/conf-language-en.png)
69
+ ![The dsh-switchman settings page in full: interface language, language preferences, six dispatch pools, capability ranking and enforcement mode, team toggles, context watermark and commands](docs/assets/conf-interface-en.png)
71
70
 
72
- 4. **Fill the dispatch pools** — each pool card lists candidate models grouped by provider; tick the ones you want. Tick "manual order" and the card becomes a numbered priority list you reorder with ↑ ↓ ×; next to each route you can also pin a reasoning effort (it defaults to "follow lane"; pinning it lists the levels that model actually supports). A summary line at the top tracks progress live, e.g. "6/6 pools set · 2 ranked · advice mode".
71
+ - **Interface** — the plugin's own UI language. The dropdown in the shot sits at English — a live preview of switching; the shipped default is Auto (follows the DSH app language). Picking a language flips the whole page on the spot and is remembered after save; switch back to Auto anytime.
72
+ - **Languages** — the languages of agent output. The scope in the shot is "Global (this profile)" (per-project works too, each reading `.switchman/lang.json`); the reply / code comments / documents dropdowns in the shot all sit at English, each displayed as "endonym (tag)" — e.g. "English (en)" — with a "current: …" status line beneath each. Leaving all three unset is fine too: asked once on first use, remembered from then on.
73
+ - **Dispatch pools** — six cards in two rows of three: economy, mechanical, main on top; hard, vision, review below. Tick candidate models grouped by provider; tick "manual order" and a card becomes a numbered priority list reorderable with ↑ ↓ ×; every route can pin a thinking effort (default "follow lane"). The summary line at the top updates live — in the shot: "4/6 pools configured · 2 ranked · mode advice".
74
+ - **Capability ranking + enforcement mode** — the union of selected models across the six pools, ranked by capability, strongest first (the shot anchors glm-5.3 at S and glm-5.3-flash at A), reorderable and removable; enforcement mode advice / force (force = out-of-pool models rejected outright).
75
+ - **Agent teams** — the two toggles for team mode and whitelist sync, both off by default; in the shot they're on, with a sync status line beneath the toggle.
76
+ - **Context watermark** — the three thresholds (50000 / 90000 / 130000 in the shot), the single-read budget (1500), hard-tier behavior (throttle-pass / block), the auto-handover toggle, and subagent independent caps all live here. Bottom command row: `/ctx-pause` pause intervention · `/ctx-resume` resume · `/ctx-handover` back up and hand over now (it steers the session to an idle boundary before compacting — the result can take a few minutes).
73
77
 
74
- ![Dispatch pools: the economy / mechanical / main / hard pools](docs/assets/conf-pool-1-en.png)
78
+ 4. **Verify** — the ⚡ "autonomous team" badge appears in the session header (with ◇ beside it showing the session's current model); or simply ask the model "what's the heading of the last section of your system prompt" — the answer should mention the dsh-switchman doctrine.
75
79
 
76
- The vision and review pools live below; further down sit **capability ranking** (the union of the models selected across the six pools — the index is the capability order, strongest first, with optional S/A/B/C tiers) and **execution mode** (advice / enforce).
77
-
78
- ![Vision pool, review pool, capability ranking, and execution mode](docs/assets/conf-pool-2-en.png)
79
-
80
- 5. **Agent teams** — both toggles are off by default; start with plain subagent dispatch. To let the model pull teams in on its own, turn on "agent teams mode"; to skip authorizing the same routes twice, turn on "subagent model whitelist sync" — a "synced N routes + time" status line under the toggle confirms what was written.
81
-
82
- ![Agent teams: the two toggles and the whitelist-sync status](docs/assets/conf-team-en.png)
83
-
84
- 6. **Context water level** — the three thresholds (defaults 50000 / 90000 / 130000), the per-read budget, hard-mode behavior (throttled pass / block), the auto-handover toggle, and the subagent-specific cap all live in this section. The bottom line carries the commands: `/ctx-pause` to pause intervening · `/ctx-resume` to resume · `/ctx-handover` to back up and hand over now (it steers the session to an idle boundary and waits out the compaction retry window, so the result can take a few minutes).
85
-
86
- ![Context water level: thresholds, budgets, and commands](docs/assets/conf-ctx-en.png)
87
-
88
- 7. **Verify** — an ⚡ "autonomous team" badge appears in the session header (with a ◇ beside it showing the current session model); or simply ask the model "what is the heading of the last section of your system prompt" — the answer should mention the dsh-switchman doctrine.
89
-
90
- **db-query one-time setup** (script dependencies install inside the skill directory — your project stays clean):
80
+ **db-query one-time initialization** (script dependencies install inside the skill directory, nothing pollutes your project):
91
81
 
92
82
  ```bash
93
83
  bash <install-dir>/skills/db-query/scripts/setup.sh
@@ -95,16 +85,16 @@ bash <install-dir>/skills/db-query/scripts/setup.sh
95
85
 
96
86
  ## How it works
97
87
 
98
- - The Host half (`index.js` + `host/`) injects the dynamic system-prompt sections (language / lanes / water level / teams), the read-budget and enforce gates, and four slash commands (the ctx trio + `/vision`). Save a setting and it applies to the next prompt assembly — no restart needed.
99
- - The Client half (`client.js`) renders the settings page, the ⚡ badge and ◇ model chip in the session header, and the live handover-in-progress banner, through official settings-form services.
100
- - The "Switchman Control Center" entry in the home sidebar opens the same configuration page (language preferences, dispatch pools & ranking, water level) as a central panel with one click; the original settings entry stays.
101
- - `cordis.patch.yml` keeps the shipped preset plugin list verbatim and extends only the persona suffix; the Agent Teams tools themselves come from the shipped bundle and are enabled automatically when teams mode is turned on.
88
+ - The host half (`index.js` + `host/`) injects the dynamic system-prompt sections (language / lanes / watermark / teams), the read-budget plus enforce double gate, and four slash commands (the ctx trio + `/vision`). A saved setting takes effect at the very next prompt assembly — no restart.
89
+ - The client half (`client.js`) renders the settings page, the ⚡ badge and ◇ model marker in the session header, and the live handover indicator; config snapshots are read and written through the Host route family.
90
+ - The "Switchman Dispatch Center" entry in the home sidebar opens that same settings page as a center panel in one click; the original settings entry stays.
91
+ - `cordis.patch.yml` keeps the factory preset plugin list fully intact and only extends the persona suffix; the Agent Teams tools themselves come from the factory bundle and switch on automatically with teams mode.
102
92
 
103
- ## Maintenance
93
+ ## Maintenance notes
104
94
 
105
- - After a DSH upgrade that changes shipped preset plugin lists, re-sync `cordis.patch.yml` from the new `presets/*.patch.yml` (keep the doctrine suffix), then reinstall.
106
- - Protocol lines (`[SWITCHMAN:LANG|POOLS|WATERMARK|TEAMS]`) are deliberately English and byte-stable — do not localize them.
107
- - `npm pack --dry-run` must stay at the audited 50 files / ~205 kB shape (`docs/` screenshots never ship).
95
+ - After a DSH upgrade, if the factory preset plugin list changed, re-sync `cordis.patch.yml` from the new `presets/*.patch.yml` (keeping the doctrine suffix), then reinstall.
96
+ - Protocol lines (`[SWITCHMAN:LANG|POOLS|WATERMARK|TEAMS]`) are deliberately English and byte-stable — don't localize them.
97
+ - `npm pack --dry-run` should keep the audited 50-file / ~205 kB shape (`docs/` screenshots stay out of the package).
108
98
 
109
99
  ## License
110
100
 
package/README.pt.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](./README.md) | [简体中文](./README.zh.md) | [繁體中文](./README.zh-TW.md) | [日本語](./README.ja.md) | [한국어](./README.ko.md) | [Español](./README.es.md) | [Français](./README.fr.md) | [Deutsch](./README.de.md) | [Italiano](./README.it.md) | **Português** | [Русский](./README.ru.md)
4
4
 
5
- > **A família switchman**, mesmo autor, mesma orquestração: [opencode-switchman](https://github.com/mrzturn/opencode-switchman) (o original para OpenCode) · [zcode-switchman](https://github.com/mrzturn/zcode-switchman) (o port para ZCode) · **dsh-switchman** (este repositório, para DeepSeek Harness).
5
+ > **A família switchman**, mesmo autor, mesma orquestração: [opencode-switchman](https://github.com/mrzturn/opencode-switchman) (o original para OpenCode) · [zcode-switchman](https://github.com/mrzturn/zcode-switchman) (o port para ZCode) · **dsh-switchman** (este repositório, a edição DeepSeek Harness).
6
6
 
7
7
  ![dsh-switchman — o nível de água do contexto comanda o switchman, que desvia a rota](docs/assets/hero.svg)
8
8
 
@@ -10,35 +10,34 @@
10
10
 
11
11
  ## Por que você precisa disso
12
12
 
13
- Se você trabalha com o DSH, com o tempo esbarra em duas coisas:
13
+ Se você trabalha com o DSH, com o tempo esbarra em duas coisas: a sessão fica cada vez mais pesada — o histórico empurra o contexto para centenas de milhares de tokens, o modelo começa a esquecer, fica lento e caro, e o /compact manual compacta perdendo detalhes no processo; e o modelo principal faz tudo sozinho — consultar um arquivo, rodar um teste, conferir dados: é sempre ele que mastiga tudo, lento e caro, sendo que a maior parte desse trabalho caberia a um modelo barato.
14
14
 
15
- 1. **A sessão fica cada vez mais pesada.** O histórico empurra o contexto para centenas de milhares de tokens: o modelo começa a esquecer, fica lento e caro, e no fim não sobra opção além do /compact manual — que compacta e perde detalhes no processo.
16
- 2. **O modelo principal faz tudo sozinho.** Consultar um arquivo, rodar um teste, conferir dados: é sempre ele que mastiga tudo — lento e caro, sendo que a maior parte desse trabalho caberia a um modelo barato.
15
+ dsh-switchman é um plugin para o [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Depois de instalado, o modelo principal deixa de “fazer tudo sozinho” e vira um dispatcher: mede o nível de água, escolhe a faixa, entrega as tarefas, confere o resultado. Não é um modelo novo: é um regulamento de despacho plugado ao DSH mais uma interface de configuração. Em concreto, ele faz sete coisas:
17
16
 
18
- dsh-switchman é um plugin para o [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Depois de instalado, o modelo principal deixa de “fazer tudo sozinho” e vira um dispatcher: mede o nível de água, escolhe a faixa, entrega as tarefas, confere o resultado. Não é um modelo novo: é um regulamento de despacho plugado ao DSH mais uma interface de configuração. Em concreto, ele faz seis coisas:
19
-
20
- **1. Nível de água do contexto: sessões longas não estouram.** A cada turno ele conta os tokens da sessão em tempo real, e três limiares apertam em degraus: 50k (soft, ajustável) lembra que “é hora de delegar”; 90k (hard) aperta o orçamento de leitura por chamada e empurra para encerrar; 130k (force) dispara o handover automático — fork da sessão como cópia de segurança, contexto compactado, continuação despertada: a tarefa não cai no meio. Nem os subagents em segundo plano que ainda estiverem rodando no momento da entrega se perdem: id, descrição da tarefa e caminho do relatório vão para o documento de handover, e a sessão retomada sabe onde coletar os relatórios em vez de despachar o mesmo trabalho de novo. Cada subagent enviado carrega um teto próprio e independente e, ao atingi-lo, sai depois de escrever o resumo HANDOFF.
17
+ **1. Nível de água do contexto: sessões longas não estouram.** A cada turno ele conta os tokens da sessão em tempo real, e três limiares apertam em degraus: 50k (soft, ajustável) lembra que “é hora de delegar”; 90k (hard) aperta o orçamento de leitura por chamada e empurra para encerrar; 130k (force) dispara o handover automático — fork da sessão como cópia de segurança, contexto compactado, continuação despertada: a tarefa não cai no meio. Nem os subagents em segundo plano que ainda estiverem rodando no momento da entrega se perdem: id, descrição da tarefa e caminho do relatório vão para o documento de handover, e a sessão retomada sabe onde coletar os relatórios em vez de despachar o mesmo trabalho de novo. Cada subagent enviado carrega um teto próprio e independente e, ao atingi-lo, sai depois de escrever o resumo HANDOFF. Se a intervenção automática não estiver do seu jeito, assuma o comando manualmente a qualquer momento: `/ctx-pause` interrompe todas as ações do nível (a medição continua rodando, o aviso muda para paused — só deixa de agir), `/ctx-resume` retoma a qualquer momento — depois de reiniciar o DSH a intervenção também volta sozinha, você tira o pé por um tempo, não desliga de vez; `/ctx-handover` não espera o nível encher e dispara sob demanda o mesmo handover: fork de uma cópia de segurança, compactação do contexto, despertar da continuação (a sessão é conduzida primeiro até o limite de inatividade, então o resultado pode demorar alguns minutos).
21
18
 
22
19
  **2. Seis pools de despacho: a cada trabalho, o seu modelo.** Pool leve (economy, trabalho pequeno em lote), pool mecânico (mechanical, reescritas de molde), pool principal (main, codificação do dia a dia), pool difícil (hard, raciocínio pesado e refatoração em grande escala), pool multimodal (vision, leitura de imagens), pool de revisão (review, verificação independente). Na página de configurações você marca os candidatos, ordena as prioridades (com níveis opcionais S/A/B/C) e fixa um reasoning effort por rota — o dropdown lista os níveis que aquele modelo realmente suporta, não três níveis genéricos. A cada turno, o prompt do modelo principal carrega uma tabela de recomendações `[SWITCHMAN:POOLS]`: o trabalho é despachado seguindo a tabela. O modo de execução tem três estados: off / advice / enforce (enforce = modelos fora do pool são recusados na hora).
23
20
 
24
21
  **3. Modo Agent Teams: do trabalho solo para comandar uma equipe.** Desligado por padrão: recém-instalado, o trabalho corre no despacho leve via subagent. Na página de configurações, duas chaves independentes:
25
22
 
26
- - **Modo Agent Teams** — ao ligar, injeta a doutrina de equipe (delegar por padrão + verificação em níveis + disciplina do quadro de tarefas compartilhado) e habilita automaticamente os Agent Teams do DSH: o modelo principal pode recrutar colegas permanentes (`spawn_teammate`), despachar trabalho para o quadro compartilhado (`team_task_*`) e trocar mensagens com eles (`send_message`). Há uma disciplina clara sobre quando formar a equipe: subtarefas independentes paralelizáveis, trabalho volumoso e autossuficiente, nível de água do contexto principal já alto, necessidade de separar papéis; investigações pontuais de uma vez só continuam pelo subagent. A política de fábrica do DSH é “sem equipe se o usuário não pedir”: aqui ela se inverte para “use quando fizer sentido”. Desligando a chave de novo, as cláusulas de equipe somem sem resíduo, e as ferramentas de equipe nas sessões em andamento não são recolhidas.
27
- - **Sincronização da whitelist de modelos de subagent** — o DSH tem uma whitelist de autorização “Permitir que os agents escolham modelos para os subagents”: rotas escolhidas nos pools mas não autorizadas são recusadas quando o modelo principal as nomeia explicitamente (no modo equipe, a tabela de recomendações e a página de configurações marcam essas rotas com ⚠). Com esta chave ligada, a união dos seis pools é gravada de uma vez nessa whitelist — sem configurar dos dois lados: o switchman é a única fonte da verdade, e o caminho de despacho via fork entra junto. A whitelist vale como snapshot por “nova sessão”: a sincronização só alcança as sessões abertas depois.
23
+ - **Modo Agent Teams** — ao ligar, injeta a doutrina de equipe (delegar por padrão + verificação em níveis + disciplina do quadro de tarefas compartilhado) e habilita automaticamente os Agent Teams do DSH: o modelo principal pode recrutar colegas permanentes (`spawn_teammate`), despachar trabalho para o quadro compartilhado (`team_task_*`) e trocar mensagens com eles. Há uma disciplina clara sobre quando formar a equipe: subtarefas independentes paralelizáveis, trabalho volumoso e autossuficiente, nível de água do contexto principal já alto, necessidade de separar papéis; investigações pontuais de uma vez só continuam pelo subagent. Desligando a chave de novo, as cláusulas de equipe somem sem resíduo, e as ferramentas de equipe nas sessões em andamento não são recolhidas.
24
+ - **Sincronização da whitelist de modelos de subagent** — o DSH tem uma whitelist de autorização “Permitir que os agents escolham modelos para os subagents”: rotas escolhidas nos pools mas não autorizadas são recusadas quando o modelo principal as nomeia explicitamente (no modo equipe, são marcadas com ⚠). Com esta chave ligada, a união dos seis pools é gravada de uma vez nessa whitelist — sem configurar dos dois lados: o switchman é a única fonte da verdade. A whitelist vale como snapshot por “nova sessão”: a sincronização só alcança as sessões abertas depois.
28
25
 
29
26
  O cabeçalho da sessão dá um retorno imediato: badge ⚡ “Equipe autônoma”, ◇ modelo em uso na sessão atual; durante um handover automático aparece um aviso em tempo real do tipo “Handover em andamento · backup da sessão / compactação do contexto / despertar da continuação”.
30
27
 
31
28
  **4. Preferências de idioma: pergunta uma vez, lembra para sempre.** Um dropdown para cada um dos três idiomas — respostas, comentários de código, documentos — com escopo à escolha: global ou por projeto (`.switchman/lang.json`). Pode deixar em branco: no primeiro uso perguntam uma vez, no idioma da interface do DSH, e daí em diante toda sessão segue sozinha.
32
29
 
33
- **5. Verificação em níveis: mudou, testa.** Alterações acima de 20 linhas vão para um tester validar; acima de 300 linhas, ou quando tocam lógica central / segurança / consistência de dados, entra também um reviewer com revisão independente. O modelo do reviewer é escolhido ancorando no modelo do “agent que escreveu o diff”, evitando-o sempre que possível; se no pool não dá para evitá-lo, a conclusão declara DOWNGRADED. Basta dizer “não use equipes” e ele volta na hora a trabalhar sozinho.
30
+ **5. Idioma da interface: o plugin também fala o seu idioma.** No topo da página de configurações entra uma nova seção “Interface” com um dropdown “Idioma da interface” (chave de configuração `uiLocale`): Automático (padrão — segue o idioma do app DeepSeek Harness) ou qualquer um dos idiomas da interface do plugin, sempre pelo endônimo, nunca traduzido. Ele troca só a interface do próprio plugin — o badge do cabeçalho, o painel da página inicial e a página de configurações —, não o idioma do app DSH: a prévia é imediata, sem reinício; ao salvar, a escolha fica guardada; o próximo início a restaura; qualquer falha volta ao idioma do app; e todos os dicionários vêm dentro do bundle, sem download.
31
+
32
+ **6. Verificação em níveis: mudou, testa.** Alterações acima de 20 linhas vão para um tester validar; acima de 300 linhas, ou quando tocam lógica central / segurança / consistência de dados, entra também um reviewer com revisão independente. O modelo do reviewer é escolhido ancorando no modelo do “agent que escreveu o diff”, evitando-o sempre que possível; se no pool não dá para evitá-lo, a conclusão declara DOWNGRADED. Basta dizer “não use equipes” e ele volta na hora a trabalhar sozinho.
34
33
 
35
- **6. `/vision`: até modelo somente texto lida com imagens.** Quando o modelo principal não sabe ler imagens, o DSH recusa na entrada as mensagens que as trazem. Você anexa a imagem e digita `/vision onde está o erro nesta imagem`: a imagem é resolvida em um caminho de arquivo e entregue à leitura de um modelo do pool multimodal, e a conclusão volta para a sessão atual. Acima da caixa de entrada aparece antes o aviso “o modelo atual não suporta leitura de imagens”; se um envio direto da imagem for recusado, a mensagem é reescrita uma vez para `/vision` e reenviada sozinha, sem precisar refazer à mão; sem pool multimodal configurado, o comando recusa e indica como configurar.
34
+ **7. `/vision`: até modelo somente texto lida com imagens.** Quando o modelo principal não sabe ler imagens, o DSH recusa na entrada as mensagens que as trazem. Você anexa a imagem e digita `/vision onde está o erro nesta imagem`: a imagem é entregue à leitura de um modelo do pool multimodal, e a conclusão volta para a sessão atual. Acima da caixa de entrada aparece antes o aviso “o modelo atual não suporta leitura de imagens”; se um envio direto da imagem for recusado, a mensagem é reescrita uma vez para `/vision` e reenviada sozinha, sem precisar refazer à mão; sem pool multimodal configurado, o comando recusa e indica como configurar.
36
35
 
37
36
  Só um modelo? Ainda vale a pena instalar — o controle do nível de água e a verificação em níveis não ligam para quantos modelos você tem, e sessões longas de modelo único se beneficiam do mesmo jeito.
38
37
 
39
38
  ## Skills embutidas
40
39
 
41
- - **db-query** — verificação somente leitura em MySQL/Redis: rode SQL para checar registros, chaves de cache / TTLs, consistência entre stores. Recusa qualquer escrita. Configuração única abaixo.
40
+ - **db-query** — verificação somente leitura em MySQL/Redis: rode SQL para checar registros, chaves de cache / TTLs, consistência entre stores. Recusa qualquer escrita. Inicialização no primeiro uso (veja abaixo).
42
41
  - **git-commit-message** — texto de commit dentro das convenções. Só texto; nunca toca no git.
43
42
  - **requirement-docs** — uma especificação única para requisitos / PRD / documentos de design, arquivada em `docs/requirements-and-design/`.
44
43
 
@@ -65,29 +64,20 @@ Só um modelo? Ainda vale a pena instalar — o controle do nível de água e a
65
64
 
66
65
  2. **Reinicie o DSH** — feche o app por completo e reabra (recarregar a página não basta), para que a tabela de módulos do cliente reconheça o bundle.
67
66
 
68
- 3. **Preferências de idioma** — Settings → dsh-switchman, ou a entrada “Switchman Control Center” na barra lateral da página inicial. Na primeira tela escolhe-se primeiro o escopo: global (este perfil) ou por projeto (o `.switchman/lang.json` de cada projeto); depois, três dropdowns definem respectivamente o idioma de respostas / comentários / documentos, cada um com uma linha de status “Atual: …” embaixo. Pode pular: no primeiro uso perguntam uma vez e fica guardado (a pergunta segue o idioma da interface do DSH).
69
-
70
- ![Preferências de idioma: escopo e três idiomas](docs/assets/conf-language-en.png)
71
-
72
- 4. **Configure os pools de despacho** — em cada card de pool você marca os modelos candidatos agrupados por provider; ao marcar “ordem manual” o card vira uma lista de prioridade numerada, reordenável com ↑ ↓ ×, e ao lado de cada rota dá para fixar o reasoning effort (padrão “seguir a faixa”; ao fixar, ele lista as faixas que aquele modelo realmente suporta). A linha de resumo no topo acompanha o progresso em tempo real, por exemplo “6/6 pools configurados · 2 no ranking · modo advice”.
73
-
74
- ![Pools de despacho: os quatro pools economy / mechanical / main / hard](docs/assets/conf-pool-1-en.png)
75
-
76
- O pool multimodal e o de revisão ficam mais abaixo; ainda mais abaixo vêm o **ranking de capacidade** (a união dos modelos escolhidos nos seis pools: a numeração é a ordem de capacidade, os mais fortes primeiro, com níveis opcionais S/A/B/C) e o **modo de execução** (advice / enforce).
77
-
78
- ![Pool multimodal e pool de revisão, ranking de capacidade e modo de execução](docs/assets/conf-pool-2-en.png)
79
-
80
- 5. **Agent Teams** — as duas chaves começam desligadas: rode primeiro no modo puro de subagent. Para deixar que ele recrute a equipe sozinho, ligue “Modo Agent Teams”; para poupar a autorização duplicada dos dois lados, ligue “Sincronização da whitelist de modelos de subagent” — abaixo da chave, uma linha de status do tipo “N registros sincronizados + horário” confirma o resultado da gravação.
81
-
82
- ![Agent Teams: as duas chaves e o status de sincronização da whitelist](docs/assets/conf-team-en.png)
67
+ 3. **Configure** — Configurações → dsh-switchman, ou a entrada “Switchman Control Center” na barra lateral da página inicial. A configuração cabe numa página só; ela é esta — um passeio de cima a baixo e está pronto:
83
68
 
84
- 6. **Nível de água do contexto** — os três limiares (padrão 50000 / 90000 / 130000), o orçamento de leitura por chamada, o comportamento do limiar hard (deixa passar com limitação / bloqueia), a chave do handover automático e o teto independente dos subagents ficam todos nesta área. Uma linha de comandos embaixo: `/ctx-pause` pausa as intervenções · `/ctx-resume` retoma · `/ctx-handover` faz backup e entrega na hora (ele conduz a sessão até o limite de inatividade e espera a janela de nova tentativa da compactação: o resultado pode levar alguns minutos).
69
+ ![Visão completa da página de configuração do dsh-switchman: idioma da interface, preferências de idioma, seis pools de despacho, ranking de capacidade e modo de execução, chaves de equipe, nível de água do contexto e comandos](docs/assets/conf-interface-pt.png)
85
70
 
86
- ![Nível de água do contexto: limiares, orçamento e comandos](docs/assets/conf-ctx-en.png)
71
+ - **Interface** — o idioma da interface do próprio plugin. Na captura está selecionado “Português”: é a prévia imediata, a página inteira troca na hora; por padrão fica “Automático”, que segue o idioma do app DSH. A escolha fica guardada ao salvar, e dá para voltar a “Automático” a qualquer momento.
72
+ - **Idioma** — o idioma do que o agente produz. O escopo na captura é “Global (este perfil)” (dá para ser por projeto também, cada um lê o próprio `.switchman/lang.json`); os três dropdowns de respostas / comentários de código / documentos estão todos fixados em “Português (pt)”, cada um com uma linha de status “Atual: …” embaixo. Pode deixar tudo em branco: no primeiro uso perguntam uma vez e fica guardado.
73
+ - **Pools de despacho** — seis cards em duas fileiras de três: em cima leve / mecânico / principal; embaixo difícil / multimodal / revisão. Em cada card você marca os candidatos agrupados por provider; marque “ordem manual” e ele vira uma lista de prioridade numerada, reordenável com ↑ ↓ ×; ao lado de cada rota dá para fixar o reasoning effort (padrão “seguir a faixa”). A linha de resumo no topo se atualiza em tempo real; na captura: “4/6 pools configurados · 2 no ranking · modo advice”.
74
+ - **Ranking de capacidade + modo de execução** — a união dos modelos escolhidos nos seis pools, ordenada por capacidade com os mais fortes na frente (na captura glm-5.3 ancorado em S e glm-5.3-flash ancorado em A); dá para reordenar e cortar; o modo de execução vai de advice / enforce (enforce = modelos fora do pool são recusados na hora).
75
+ - **Equipe de agentes** — as duas chaves, modo equipe e sincronização da whitelist, começam desligadas; na captura estão ligadas, e abaixo de cada uma há uma linha de status de sincronização.
76
+ - **Nível de água do contexto** — os três limiares (na captura 50000 / 90000 / 130000), o orçamento de leitura por chamada (1500), o comportamento do limiar hard (deixa passar com limitação / bloqueia), a chave do handover automático e o teto independente dos subagents ficam todos nesta área. Uma linha de comandos embaixo: `/ctx-pause` pausa as intervenções · `/ctx-resume` retoma · `/ctx-handover` faz backup e entrega na hora (ele conduz a sessão até o limite de inatividade antes de compactar: o resultado pode levar alguns minutos).
87
77
 
88
- 7. **Verifique** — no cabeçalho da sessão aparece o badge ⚡ “Equipe autônoma” (ao lado, o ◇ mostra o modelo da sessão atual); ou pergunte direto ao modelo “qual é o título da última seção do seu system prompt?” — a resposta deve mencionar a doutrina dsh-switchman.
78
+ 4. **Verifique** — no cabeçalho da sessão aparece o badge ⚡ “Equipe autônoma” (ao lado, o ◇ mostra o modelo da sessão atual); ou pergunte direto ao modelo “qual é o título da última seção do seu system prompt?” — a resposta deve mencionar a doutrina dsh-switchman.
89
79
 
90
- **Configuração única do db-query** (as dependências dos scripts vivem dentro do diretório da skill, sem sujar o projeto):
80
+ **Inicialização do db-query no primeiro uso** (as dependências dos scripts vivem dentro do diretório da skill, sem sujar o projeto):
91
81
 
92
82
  ```bash
93
83
  bash <install-dir>/skills/db-query/scripts/setup.sh
@@ -96,8 +86,8 @@ bash <install-dir>/skills/db-query/scripts/setup.sh
96
86
  ## Como funciona
97
87
 
98
88
  - A metade Host (`index.js` + `host/`) injeta as seções dinâmicas do system prompt (idiomas / faixas / nível de água / equipe), a dupla trava de orçamento de leitura + enforce e os quatro comandos slash (o trio ctx mais `/vision`). Toda configuração salva já vale na montagem do prompt seguinte, sem reinício.
99
- - A metade Client (`client.js`) renderiza a página de configurações, o badge ⚡ e o identificador ◇ do modelo no cabeçalho da sessão e o aviso dinâmico durante o handover, pelos serviços oficiais de settings-form.
100
- - A entrada “Switchman Control Center” na barra lateral da página inicial abre com um clique a mesma página de configuração (preferências de idioma, pools de despacho e ranking, nível de água) como painel central; a entrada nas configurações permanece.
89
+ - A metade Client (`client.js`) renderiza a página de configurações, o badge ⚡ e o identificador ◇ do modelo no cabeçalho da sessão e o aviso dinâmico durante o handover; os snapshots de configuração são lidos e gravados pela família de rotas Host.
90
+ - A entrada “Switchman Control Center” na barra lateral da página inicial abre com um clique esta mesma página de configuração como painel central; a entrada nas configurações permanece.
101
91
  - `cordis.patch.yml` conserva integralmente a lista de plugins dos presets de fábrica e intervém só no persona suffix; as ferramentas Agent Teams em si vêm do bundle de fábrica e são habilitadas automaticamente ao ligar o modo equipe.
102
92
 
103
93
  ## Manutenção
package/README.ru.md CHANGED
@@ -10,29 +10,28 @@
10
10
 
11
11
  ## Зачем это нужно
12
12
 
13
- Если работать в DSH подольше, рано или поздно упираешься в две вещи:
13
+ Если работать в DSH подольше, рано или поздно упираешься в две вещи: сессия тяжелеет с каждым сообщением — история раздувает контекст до сотен тысяч токенов, модель начинает забывать, тормозить и дорожать, а ручной /compact при каждом сжатии ещё и теряет детали; и главная модель всё делает сама — прочитать файл, прогнать тест, сверить данные: всё она грызёт сама, медленно и дорого, хотя большая часть этой работы по праву досталась бы дешёвой модели.
14
14
 
15
- 1. **Сессия тяжелеет с каждым сообщением.** История раздувает контекст до сотен тысяч токенов — модель начинает забывать, тормозить и дорожать; в конце концов остаётся ручной /compact, а каждое сжатие ещё и теряет детали.
16
- 2. **Главная модель всё делает сама.** Прочитать файл, прогнать тест, сверить данные — всё она грызёт сама: медленно и дорого, хотя большая часть этой работы по праву досталась бы дешёвой модели.
15
+ dsh-switchman — плагин для [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). После установки главная модель перестаёт «делать всё сама» и становится диспетчером: замеряет уровень воды, выбирает полосу, раздаёт задачи, принимает работу. Это не новая модель, а свод правил диспетчеризации, пристёгнутый к DSH, плюс страница настроек. Конкретно он делает семь вещей:
17
16
 
18
- dsh-switchman — плагин для [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). После установки главная модель перестаёт «делать всё сама» и становится диспетчером: замеряет уровень воды, выбирает полосу, раздаёт задачи, принимает работу. Это не новая модель, а свод правил диспетчеризации, пристёгнутый к DSH, плюс страница настроек. Конкретно он делает шесть вещей:
19
-
20
- **1. Уровень воды в контексте: длинная сессия не переполняется.** Каждый ход подсчитывает токены сессии в реальном времени, и три линии уровня ужесточаются по нарастающей: 50k (soft, настраивается) подсказывает «пора делегировать»; 90k (hard) урезает бюджет разового чтения файла и подталкивает к завершению; 130k (force) запускает автоматическую передачу — форкает копию сессии в архив, сжимает контекст и будит продолжение, работа не обрывается. Фоновые субагенты, которые ещё бегут в момент передачи, тоже не теряются: id, описания задач и пути к отчётам записываются в документ передачи, и продолжившаяся сессия знает, куда идти за отчётами, а не раздаёт работу заново. У каждого отправленного субагента свой жёсткий потолок: доработав до него, он завершается резюме HANDOFF.
17
+ **1. Уровень воды в контексте: длинная сессия не переполняется.** Каждый ход подсчитывает токены сессии в реальном времени, и три линии уровня ужесточаются по нарастающей: 50k (soft, настраивается) подсказывает «пора делегировать»; 90k (hard) урезает бюджет разового чтения и подталкивает к завершению; 130k (force) запускает автоматическую передачу — форкает копию сессии в архив, сжимает контекст и будит продолжение, работа не обрывается. Фоновые субагенты, которые ещё бегут в момент передачи, тоже не теряются: id, описания задач и пути к отчётам записываются в документ передачи, и продолжившаяся сессия знает, куда идти за отчётами, а не раздаёт работу заново. У каждого отправленного субагента свой жёсткий потолок: доработав до него, он завершается резюме HANDOFF. Если автоматическое вмешательство работает не так, как вам нужно, возьмите управление в свои руки в любой момент: `/ctx-pause` останавливает все действия по уровню (замер продолжает работать, баннер переключается на paused — вмешательство просто перестаёт действовать), `/ctx-resume` всё возвращает в любой момент — после перезапуска DSH вмешательство тоже вернётся само, вы временно отпускаете, а не выключаете навсегда; `/ctx-handover` не ждёт, пока уровень дойдёт до верха, и запускает ту же передачу по требованию — форкнуть копию, сжать контекст, разбудить продолжение (сессию сначала подводят к границе простоя, поэтому результат может занять несколько минут).
21
18
 
22
19
  **2. Шесть пулов диспетчеризации: под каждую работу — своя модель.** Лёгкий пул (economy — мелкие массовые задачи), механический (mechanical — шаблонные переработки), основной (main — повседневный кодинг), пул высокой сложности (hard — тяжёлые рассуждения и крупные рефакторинги), мультимодальный (vision — чтение картинок), пул ревью (review — независимая проверка). На странице настроек отмечаете кандидатов, расставляете приоритеты (можно с привязкой к ступеням S/A/B/C) и для каждого маршрута отдельно фиксируете reasoning effort — выпадающий список ступеней берётся из уровней, которые модель реально поддерживает, а не из трёх универсальных. Каждый ход промпт главной модели несёт с собой таблицу рекомендаций `[SWITCHMAN:POOLS]`, и работа раздаётся по ней. У режима исполнения три состояния: off / advice / enforce (enforce = модель вне пула просто отклоняется).
23
20
 
24
21
  **3. Режим Agent Teams: от работы в одиночку — к своей команде.** По умолчанию выключен: сразу после установки это просто лёгкая диспетчеризация через subagent. На странице настроек два независимых переключателя:
25
22
 
26
- - **Режим команды агентов** — при включении внедряет командный регламент (делегирование по умолчанию + многоуровневая проверка + дисциплина общей доски задач) и автоматически включает Agent Teams в DSH: главная модель может нанимать постоянных товарищей по команде (`spawn_teammate`), ставить им задачи на общей доске (`team_task_*`) и обмениваться с ними сообщениями (`send_message`). Когда заводить команду, решает чёткая дисциплина: параллельные независимые подзадачи, объёмная самодостаточная работа, уже высокий уровень воды в главном контексте, потребность разделить роли; разовая точечная разведка по-прежнему идёт через subagent. Заводская политика DSH — «пока пользователь прямо не попросил, команду не создавать»; здесь она перевёрнута в «когда нужно — создавай». Если выключить переключатель обратно, от командных пунктов не останется и следа, а инструменты команды из уже работающих сессий не изымаются.
27
- - **Синхронизация белого списка моделей субагентов** — в DSH есть белый список авторизации «разрешить агентам выбирать модели для субагентов»: если маршрут выбран в пуле, но не авторизован, явное назначение его главной моделью будет отклонено (в командном режиме и таблица рекомендаций, и страница настроек помечают такие маршруты ⚠). Включите этот переключатель — и объединение шести пулов целиком запишется в белый список: настраивать дважды не нужно, switchman остаётся единственным источником истины, и путь dispatch через fork тоже охвачен. Белый список применяется по снимку «новая сессия»: синхронизация действует только на сессии, открытые после неё.
23
+ - **Режим команды агентов** — при включении внедряет командный регламент (делегирование по умолчанию + многоуровневая проверка + дисциплина общей доски задач) и автоматически включает Agent Teams в DSH: главная модель может нанимать постоянных товарищей по команде (`spawn_teammate`), ставить им задачи на общей доске (`team_task_*`) и обмениваться с ними сообщениями. Когда заводить команду, решает чёткая дисциплина: параллельные независимые подзадачи, объёмная самодостаточная работа, уже высокий уровень воды в главном контексте, потребность разделить роли; разовая точечная разведка по-прежнему идёт через subagent. Если выключить переключатель обратно, от командных пунктов не останется и следа, а инструменты команды из уже работающих сессий не изымаются.
24
+ - **Синхронизация белого списка моделей субагентов** — в DSH есть белый список авторизации «разрешить агентам выбирать модели для субагентов»: если маршрут выбран в пуле, но не авторизован, явное назначение его главной моделью будет отклонено (в командном режиме он помечается ⚠). Включите этот переключатель — и объединение шести пулов целиком запишется в белый список: настраивать дважды не нужно, switchman остаётся единственным источником истины. Белый список применяется по снимку «новая сессия»: синхронизация действует только на сессии, открытые после неё.
28
25
 
29
26
  В шапке сессии — наглядная обратная связь: значок ⚡ «автономная команда», ◇ с фактической моделью текущей сессии; когда идёт автоматическая передача, появляется живая подсказка «идёт передача · резервная сессия / сжатие контекста / пробуждение продолжения».
30
27
 
31
28
  **4. Языковые предпочтения: спросит один раз — запомнит навсегда.** Три выпадающих списка: язык ответов, комментариев в коде и документов; область действия — глобальная или по проекту (`.switchman/lang.json`). Настраивать не обязательно: при первом использовании спросят один раз — на языке интерфейса вашего DSH — и запомнят; дальше каждая сессия соблюдает выбор автоматически.
32
29
 
33
- **5. Многоуровневая проверка: изменено — проверено.** Изменения больше 20 строк уходят тестировщику на проверку; изменения больше 300 строк или затрагивающие ядро / безопасность / согласованность данных — дополнительно независимому ревьюеру. Модель ревьюера подбирают, привязываясь к модели агента, написавшего этот diff, и стараются её обойти; если пул другого выхода не оставляет, в заключении прямо заявляется DOWNGRADED. Скажете «не использовать команду» — всё мгновенно вернётся к одиночной работе.
30
+ **5. Язык интерфейса: плагин говорит и на вашем языке.** В самом верху страницы настроек появился раздел «Интерфейс» с выпадающим списком «Язык интерфейса» (ключ настройки `uiLocale`): «Авто» (по умолчанию — следует языку приложения DeepSeek Harness) или любой из языков интерфейса плагина, всегда под своим эндонимом, без перевода. Переключается только интерфейс самого плагина — значок в шапке, панель главной страницы и страница настроек, — но не язык приложения DSH: предпросмотр мгновенный, без перезапуска; сохранение запоминает выбор; следующий запуск восстанавливает его; любой сбой возвращает язык приложения; а все словари лежат внутри бандла — ничего скачивать не нужно.
31
+
32
+ **6. Многоуровневая проверка: изменено — проверено.** Изменения больше 20 строк уходят тестировщику на проверку; изменения больше 300 строк или затрагивающие ядро / безопасность / согласованность данных — дополнительно независимому ревьюеру. Модель ревьюера подбирают, привязываясь к модели агента, написавшего этот diff, и стараются её обойти; если пул другого выхода не оставляет, в заключении прямо заявляется DOWNGRADED. Скажете «не использовать команду» — всё мгновенно вернётся к одиночной работе.
34
33
 
35
- **6. `/vision`: картинки по зубам даже чисто текстовой модели.** Когда главная модель не читает изображения, DSH прямо на входе отклоняет сообщения с картинками. Прикрепите картинку и введите `/vision что не так на этой картинке` — изображение будет сведено к пути файла и отдано на чтение модели из мультимодального пула, а вывод вернётся в текущую сессию. Над полем ввода заранее подсказывают: «текущая модель не умеет читать изображения»; если прямая отправка картинки отклонена, она один раз автоматически переоформляется в `/vision` и уходит повторно — вручную ничего переписывать не нужно; если мультимодальный пул не настроен, команда откажется и подскажет, что настроить.
34
+ **7. `/vision`: картинки по зубам даже чисто текстовой модели.** Когда главная модель не читает изображения, DSH прямо на входе отклоняет сообщения с картинками. Прикрепите картинку и введите `/vision что не так на этой картинке` — изображение будет отдано на чтение модели из мультимодального пула, а вывод вернётся в текущую сессию. Над полем ввода заранее подсказывают: «текущая модель не умеет читать изображения»; если прямая отправка картинки отклонена, она один раз автоматически переоформляется в `/vision` и уходит повторно — вручную ничего переписывать не нужно; если мультимодальный пул не настроен, команда откажется и подскажет, что настроить.
36
35
 
37
36
  Всего одна модель? Всё равно стоит поставить — контроль уровня воды и многоуровневая проверка от числа моделей не зависят, и длинная сессия на одной модели выигрывает от них ничуть не меньше.
38
37
 
@@ -65,27 +64,18 @@ dsh-switchman — плагин для [DeepSeek Harness](https://github.com/deep
65
64
 
66
65
  2. **Перезапустите DSH** — полностью закройте приложение и откройте снова (перезагрузка страницы не считается) — только тогда таблица клиентских модулей распознает этот bundle.
67
66
 
68
- 3. **Языковые предпочтения** — Настройки → dsh-switchman, или пункт «Диспетчерская Switchman» в боковой панели главной страницы. На первом экране сначала выбирается область действия: глобально (этот profile) или по проектам (`.switchman/lang.json` каждого проекта); затем тремя выпадающими списками задаются языки ответов / комментариев / документов, под каждым — строка состояния «сейчас: …». Пропустить не страшно: при первом использовании спросят один раз и запомнят (вопрос зададут на языке интерфейса DSH).
69
-
70
- ![Языковые предпочтения: область действия и три языка](docs/assets/conf-language-en.png)
71
-
72
- 4. **Настройте пулы диспетчеризации** — на каждой карточке пула отмечайте модели-кандидаты, сгруппированные по поставщикам; отметьте «ручной порядок» — и карточка превратится в нумерованный список приоритетов, порядок меняется кнопками ↑ ↓ ×, а рядом с каждым маршрутом можно зафиксировать reasoning effort (по умолчанию «следовать полосе», после фиксации в списке — ступени, которые эта модель реально поддерживает). Сводная строка сверху отражает прогресс в реальном времени, например: «пулов настроено: 6/6 · позиций в рейтинге: 2 · режим advice».
73
-
74
- ![Пулы диспетчеризации: четыре пула — лёгкий / механический / основной / высокой сложности](docs/assets/conf-pool-1-en.png)
75
-
76
- Мультимодальный пул и пул ревью — ниже; ещё ниже — **рейтинг по способностям** (объединение моделей, выбранных в шести пулах; номер в списке и есть место по способности, сильнейшие впереди, с возможной привязкой к ступеням S/A/B/C) и **режим исполнения** (advice / enforce).
77
-
78
- ![Мультимодальный пул, пул ревью, рейтинг по способностям и режим исполнения](docs/assets/conf-pool-2-en.png)
79
-
80
- 5. **Команда агентов** — оба переключателя по умолчанию выключены: сначала поработайте в чистом режиме subagent. Хотите, чтобы команда собиралась сама, — включите «режим команды агентов»; хотите избавиться от двойной настройки авторизации, — включите «синхронизацию белого списка моделей субагентов»: под переключателем есть строка состояния «синхронизировано N записей + время», подтверждающая результат записи.
81
-
82
- ![Команда агентов: два переключателя и состояние синхронизации белого списка](docs/assets/conf-team-en.png)
67
+ 3. **Настройте** — Настройки → dsh-switchman, или пункт «Диспетчерская Switchman» в боковой панели главной страницы. Вся конфигурация умещается на одной странице; вот она — проход сверху вниз, и всё готово:
83
68
 
84
- 6. **Уровень воды в контексте** — три порога (по умолчанию 50000 / 90000 / 130000), бюджет разового чтения, поведение жёсткого порога (пропустить с ограничением / заблокировать), переключатель автоматической передачи и отдельный потолок для субагентов — всё в этом разделе. Внизу строка команд: `/ctx-pause` приостановить вмешательство · `/ctx-resume` возобновить · `/ctx-handover` сделать резервную копию и передать управление прямо сейчас (команда подводит сессию к границе простоя и ждёт окно повторной попытки компакции, результат может занять несколько минут).
69
+ ![Полный вид страницы настроек dsh-switchman: язык интерфейса, языковые предпочтения, шесть пулов диспетчеризации, рейтинг по способностям и режим исполнения, переключатели команды, уровень воды в контексте и команды](docs/assets/conf-interface-ru.png)
85
70
 
86
- ![Уровень воды в контексте: пороги, бюджет и команды](docs/assets/conf-ctx-en.png)
71
+ - **Интерфейс** — язык интерфейса самого плагина. На снимке выбран «Русский»: это мгновенный предпросмотр, вся страница переключается на месте; по умолчанию стоит «Авто» — следует языку приложения DSH. Выбор запоминается при сохранении, вернуться к «Авто» можно в любой момент.
72
+ - **Язык** — язык того, что производит агент. Область действия на снимке — «Глобально (этот profile)» (можно и по проектам, каждый читает свой `.switchman/lang.json`); три выпадающих списка — ответы / комментарии в коде / документы — на снимке стоят на «Русский (ru)», под каждым строка состояния «сейчас: …». Можно не настраивать ничего: при первом использовании спросят один раз и запомнят.
73
+ - **Пулы диспетчеризации** — шесть карточек в два ряда по три: сверху лёгкий / механический / основной; снизу высокосложный / мультимодальный / рецензентский. На каждой карточке отмечаются кандидаты, сгруппированные по поставщикам; отметьте «ручной порядок» — карточка станет нумерованным списком приоритетов, порядок меняется кнопками ↑ ↓ ×; рядом с каждым маршрутом можно зафиксировать reasoning effort (по умолчанию «следовать полосе»). Сводная строка сверху обновляется в реальном времени; на снимке: «пулов настроено: 4/6 · позиций в рейтинге: 2 · режим advice».
74
+ - **Рейтинг по способностям + режим исполнения** — объединение моделей, выбранных в шести пулах, отсортировано по способности, сильнейшие впереди (на снимке glm-5.3 закреплён на ступени S, glm-5.3-flash — на A); порядок можно менять, лишние убирать; режим исполнения — advice / enforce (enforce = модель вне пула просто отклоняется).
75
+ - **Команда агентов** — оба переключателя, командный режим и синхронизация белого списка, по умолчанию выключены; на снимке включены, под каждым — строка состояния синхронизации.
76
+ - **Уровень воды в контексте** — три порога (на снимке 50000 / 90000 / 130000), бюджет разового чтения (1500), поведение жёсткого порога (пропустить с ограничением / заблокировать), переключатель автоматической передачи и отдельный потолок для субагентов — всё в этом разделе. Внизу строка команд: `/ctx-pause` приостановить вмешательство · `/ctx-resume` возобновить · `/ctx-handover` сделать резервную копию и передать управление прямо сейчас (команда подводит сессию к границе простоя и только потом сжимает контекст, результат может занять несколько минут).
87
77
 
88
- 7. **Проверьте** — в шапке сессии появился значок ⚡ «автономная команда» (рядом ◇ показывает модель текущей сессии); либо спросите модель напрямую: «как называется последний раздел твоего системного промпта?» — в ответе должен прозвучать регламент dsh-switchman.
78
+ 4. **Проверьте** — в шапке сессии появился значок ⚡ «автономная команда» (рядом ◇ показывает модель текущей сессии); либо спросите модель напрямую: «как называется последний раздел твоего системного промпта?» — в ответе должен прозвучать регламент dsh-switchman.
89
79
 
90
80
  **Инициализация db-query при первом использовании** (зависимости скриптов ставятся внутрь каталога навыка и не засоряют проект):
91
81
 
@@ -96,15 +86,15 @@ bash <install-dir>/skills/db-query/scripts/setup.sh
96
86
  ## Как это работает
97
87
 
98
88
  - Host-половина (`index.js` + `host/`) внедряет динамические секции системного промпта (язык / полосы / уровень воды / команда), двойной шлюз бюджета чтения и enforce и четыре слэш-команды (ctx-тройка + `/vision`). Все настройки после сохранения вступают в силу при следующей сборке промпта — без перезапуска.
99
- - Client-половина (`client.js`) отрисовывает страницу настроек, значок ⚡ и метку модели ◇ в шапке сессии, живую подсказку во время передачи управления — всё через официальные сервисы settings-form.
100
- - Пункт «Диспетчерская Switchman» в боковой панели главной страницы: один клик открывает ту же страницу настроек (языковые предпочтения, пулы и рейтинг, уровень воды) в виде центральной панели; прежний вход в настройки остаётся на месте.
89
+ - Client-половина (`client.js`) отрисовывает страницу настроек, значок ⚡ и метку модели ◇ в шапке сессии, живую подсказку во время передачи управления; снимки конфигурации читаются и записываются через семейство маршрутов Host.
90
+ - Пункт «Диспетчерская Switchman» в боковой панели главной страницы: один клик открывает эту же страницу настроек в виде центральной панели; прежний вход в настройки остаётся на месте.
101
91
  - `cordis.patch.yml` целиком сохраняет список плагинов заводских пресетов и расширяет только persona suffix; сами инструменты Agent Teams приходят из заводского bundle и автоматически включаются вместе с командным режимом.
102
92
 
103
93
  ## Обслуживание
104
94
 
105
95
  - Если после обновления DSH изменился список плагинов заводских пресетов, пересинхронизируйте `cordis.patch.yml` из новых `presets/*.patch.yml` (сохранив doctrine suffix) и переустановите.
106
96
  - Строки протокола (`[SWITCHMAN:LANG|POOLS|WATERMARK|TEAMS]`) намеренно оставлены на английском и стабильны побайтово — не локализуйте их.
107
- - `npm pack --dry-run` должен сохранять аудированную форму: 50 файла / ~205 kB (скриншоты из `docs/` в пакет не входят).
97
+ - `npm pack --dry-run` должен сохранять аудированную форму: 50 файлов / ~205 kB (скриншоты из `docs/` в пакет не входят).
108
98
 
109
99
  ## License
110
100