dsh-switchman 1.7.1 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.de.md CHANGED
@@ -12,9 +12,9 @@
12
12
 
13
13
  Wer lange mit DSH arbeitet, ärgert sich über zwei Dinge. Erstens werden Sessions mit der Zeit schwer: Die Historie bläht den Kontext auf Hunderttausende Token, das Modell vergisst, wird langsam und teuer, und ein manuelles /compact verliert Details. Zweitens erledigt das Hauptmodell alles selbst — Dateien nachschlagen, Tests laufen lassen, Daten abgleichen —, obwohl der Großteil dieser Arbeit auf ein billigeres Modell gehörte.
14
14
 
15
- dsh-switchman ist ein Plugin für [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Nach der Installation wandelt sich das Hauptmodell vom Selbermacher zum Disponenten: Wasserstand messen, Spur wählen, Aufgaben vergeben, Abnahme prüfen. Es ist kein neues Modell, sondern ein Dispositionsregelwerk an DSH plus eine Einstellungsseite — und es tut sieben Dinge:
15
+ dsh-switchman ist ein Plugin für [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Nach der Installation wandelt sich das Hauptmodell vom Selbermacher zum Disponenten: Wasserstand messen, Spur wählen, Aufgaben vergeben, Abnahme prüfen. Es ist kein neues Modell, sondern ein Dispositionsregelwerk an DSH plus eine Einstellungsseite — und es tut acht Dinge:
16
16
 
17
- **1. Kontext-Wasserstand: lange Sessions platzen nicht.** Jede Runde zählt die Session-Tokens in Echtzeit; drei Stufen schrauben sich hoch: 50k (soft, einstellbar) mahnt „zeit zu delegieren“; 90k (hard) strafft das Einzellese-Budget und lenkt auf den Abschluss; 130k (force) übergibt automatisch — die Session wird zur Ablage geforkt, der Kontext komprimiert, der Nachfolger geweckt und läuft weiter, ohne dass die Aufgabe abreißt. Auch Hintergrund-Subagents, die im Moment der Übergabe noch laufen, gehen nicht verloren: id, Aufgabe und Report-Pfad landen im Übergabedokument; die fortgesetzte Session weiß, wo sie Reports abholt, und vergibt nichts doppelt. Jeder Subagent trägt eine eigene harte Obergrenze und verlässt nach seinem HANDOFF-Summary die Bühne. Passt dir die automatische Intervention nicht, übernimm jederzeit von Hand: `/ctx-pause` stoppt alle Wasserstands-Aktionen (die Messung läuft weiter, das Banner springt auf paused — es wird nur nicht mehr gehandelt), `/ctx-resume` holt alles jederzeit zurück — nach einem DSH-Neustart greift die Intervention auch von selbst wieder, ein temporäres Loslassen, kein Dauer-Aus; `/ctx-handover` wartet nicht, bis der Wasserstand oben ist, und startet dieselbe Übergabe auf Zuruf: Session zur Sicherung forken, Kontext verdichten, Fortsetzung wecken (die Session wird erst an eine Leerlauf-Grenze geführt, das Ergebnis kann daher ein paar Minuten dauern).
17
+ **1. Kontext-Wasserstand: lange Sessions platzen nicht.** Jede Runde zählt die Session-Tokens in Echtzeit; drei Stufen schrauben sich hoch: 80k (soft, einstellbar) mahnt „zeit zu delegieren“; 120k (hard) strafft das Einzellese-Budget und lenkt auf den Abschluss; 150k (force) übergibt automatisch — die Session wird zur Ablage geforkt, der Kontext komprimiert, der Nachfolger geweckt und läuft weiter, ohne dass die Aufgabe abreißt. Auch Hintergrund-Subagents, die im Moment der Übergabe noch laufen, gehen nicht verloren: id, Aufgabe und Report-Pfad landen im Übergabedokument; die fortgesetzte Session weiß, wo sie Reports abholt, und vergibt nichts doppelt. Jeder Subagent trägt eine eigene harte Obergrenze und verlässt nach seinem HANDOFF-Summary die Bühne. Passt dir die automatische Intervention nicht, übernimm jederzeit von Hand: `/ctx-pause` stoppt alle Wasserstands-Aktionen (die Messung läuft weiter, die Live-Wasserstandszeile am Ende springt auf paused — es wird nur nicht mehr gehandelt), `/ctx-resume` holt alles jederzeit zurück — nach einem DSH-Neustart greift die Intervention auch von selbst wieder, ein temporäres Loslassen, kein Dauer-Aus; `/ctx-handover` wartet nicht, bis der Wasserstand oben ist, und startet dieselbe Übergabe auf Zuruf: Session zur Sicherung forken, Kontext verdichten, Fortsetzung wecken (die Session wird erst an eine Leerlauf-Grenze geführt, das Ergebnis kann daher ein paar Minuten dauern).
18
18
 
19
19
  **2. Sechs Dispatch-Pools: das richtige Modell für jede Arbeit.** Economy (Massen-Kleinkram), Mechanical (Schablonen-Umformung), Main (tägliche Codearbeit), Hard (schwere Schlussfolgerungen und große Refactorings), Vision (Bilder), Review (unabhängige Prüfung). Auf der Einstellungsseite kreuzt man Kandidaten an, ordnet Prioritäten, vergibt Noten S/A/B/C und nagelt je Route einen Reasoning-Aufwand fest — das Aufwand-Dropdown führt die Stufen, die das Modell tatsächlich beherrscht, nicht generische drei. Im Prompt jeder Runde steckt eine `[SWITCHMAN:POOLS]`-Empfehlungstabelle; nach der wird vergeben. Drei Enforcement-Modi: aus / Empfehlung / Erzwingen (Erzwingen = Modelle außerhalb der Pools werden glatt abgelehnt).
20
20
 
@@ -33,6 +33,8 @@ Die Session-Kopfzeile zeigt sofort, was los ist: das ⚡-Abzeichen „autonomes
33
33
 
34
34
  **7. `/vision`: reine Textmodelle kriegen trotzdem Bilder.** Kann das Hauptmodell keine Bilder lesen, lehnt DSH Bildnachrichten an der Tür ab. Bild einfügen, `/vision was ist an diesem Bild falsch` eintippen — das Bild geht an ein Modell aus dem Vision-Pool, das Urteil kommt in die laufende Session zurück. Über dem Eingabefeld steht vorab „das aktuelle Modell kann keine Bilder lesen“; wird der direkte Bildversand abgelehnt, wird die Nachricht automatisch als `/vision` umgeschrieben und erneut gesendet — kein manueller zweiter Versuch. Ohne konfigurierten Vision-Pool verweigert der Befehl und weist auf die Einstellungen.
35
35
 
36
+ **8. Intent-Routing: das passende Modell stellt sich von selbst ein.** Auf der Einstellungsseite gibt es eine neue Gruppe „Intent-Routing“: einen Hauptschalter (standardmäßig aus — zum Einschalten sind ein Klassifikator und mindestens ein Kandidat nötig), die Small-Model-Route des Klassifikators (Provider + Modell + optionaler Aufwand — TypeSafe-Jev-artige Entscheidungsmodelle wie allgemeine Chatmodelle funktionieren gleichermaßen, die Ausgabe wird tolerant geparst), eine Dreifachwahl des Klassifikatortyps (auto / decision / chat), eine eigene Kandidatenliste (je Kandidat Provider + Modell + optionaler Aufwand + eine Zeile Fähigkeitsbeschreibung), das Cache-Fenster in Sekunden (Standard 300, abgestimmt auf die Prompt-Caches der Anbieter von rund 5 Minuten), die Umschalt-Vertrauensschwelle (Standard 80), das Klassifikations-Timeout (Standard 60000 ms), die Anzahl der Verlaufsnachrichten (Standard 6) samt Zeichenbudget (Standard 2400) und ein optionales Fallback-Modell. In der Modellauswahl erscheint unter der Gruppe „Auto · Switchman“ der Eintrag „Auto“ (der Client rendert ihn lokalisiert — auf Deutsch „Automatisch (Intent-Routing)“); ist er gewählt, stuft der Klassifikator jede Nutzernachricht ein und der Entscheid gilt für die jeweilige Runde: Bei zu geringem Vertrauen oder noch offenem Cache-Fenster bleibt das aktuelle Modell in Verwendung (sein Cache wird weitergenutzt); gewechselt wird erst, wenn das Vertrauen hoch genug ist oder das aktuelle Modell nicht unter den Kandidaten steht. Der Wechsel geschieht still auf der Aufrufebene — keine „Modell gewechselt“-Nachricht landet in der Session. Über dem Eingabefeld sitzt ein Status-Chip (bei aktivem Routing zeigt er das aktuelle Routing-Modell und das Vertrauen der letzten Entscheidung); Kandidaten und Schwellen stehen jederzeit auf der Einstellungsseite.
37
+
36
38
  Auch mit nur einem Modell lohnt sich die Installation — Wasserstandskontrolle und gestufte Verifikation hängen nicht von der Modellzahl ab; lange Single-Model-Sessions profitieren genauso.
37
39
 
38
40
  ## Mitgelieferte Skills
@@ -73,7 +75,8 @@ Auch mit nur einem Modell lohnt sich die Installation — Wasserstandskontrolle
73
75
  - **Dispatch-Pools** — sechs Karten in zwei Reihen zu drei: oben Economy / Mechanical / Main, unten Hard / Vision / Review. Kandidaten je Provider ankreuzen; ein Haken bei „manuelle Reihenfolge“ macht daraus eine nummerierte Prioritätsliste, sortiert mit ↑ ↓ ×; je Route lässt sich der Reasoning-Aufwand festnageln (Standard „wie Spur“). Die Zusammenfassungszeile oben aktualisiert live — im Screenshot: „4/6 Pools konfiguriert · 2 gerankt · Modus Empfehlung“.
74
76
  - **Fähigkeits-Ranking + Enforcement-Modus** — die Vereinigung der gewählten Modelle über alle sechs Pools, nach Fähigkeit sortiert, das stärkste zuerst (im Screenshot glm-5.3 auf S und glm-5.3-flash auf A verankert), umsortier- und kürzbar; Enforcement-Modus Empfehlung / Erzwingen (Erzwingen = Modelle außerhalb der Pools werden glatt abgelehnt).
75
77
  - **Agent-Teams** — die zwei Schalter für Team-Modus und Whitelist-Sync, beide standardmäßig aus; im Screenshot an, mit Sync-Statuszeile unter dem Schalter.
76
- - **Kontext-Wasserstand** — die drei Schwellen (im Screenshot 50000 / 90000 / 130000), das Einzellese-Budget (1500), das Verhalten der Hard-Stufe (drosselnd durchlassen / blockieren), der Schalter für die Auto-Übergabe und die eigenen Obergrenzen der Subagents — alles in diesem Bereich. Unten die Befehlszeile: `/ctx-pause` Eingriffe pausieren · `/ctx-resume` fortsetzen · `/ctx-handover` sofort sichern und übergeben (die Session wird erst an eine Leerlauf-Grenze geführt und dann komprimiert — das Ergebnis kann ein paar Minuten dauern).
78
+ - **Kontext-Wasserstand** — die drei Schwellen (im Screenshot 80000 / 120000 / 150000), das Einzellese-Budget (3000), das Verhalten der Hard-Stufe (drosselnd durchlassen / blockieren), der Schalter für die Auto-Übergabe und die eigenen Obergrenzen der Subagents — alles in diesem Bereich. Unten die Befehlszeile: `/ctx-pause` Eingriffe pausieren · `/ctx-resume` fortsetzen · `/ctx-handover` sofort sichern und übergeben (die Session wird erst an eine Leerlauf-Grenze geführt und dann komprimiert — das Ergebnis kann ein paar Minuten dauern).
79
+ - **Intent-Routing** — der Hauptschalter, die Small-Model-Route des Klassifikators, der Klassifikatortyp (auto / decision / chat), die eigene Kandidatenliste (je Eintrag eine Zeile Fähigkeitsbeschreibung), Cache-Fenster / Vertrauensschwelle / Klassifikations-Timeout / Verlaufsbudget und ein optionales Fallback-Modell. Eingeschaltet erscheint in der Modellauswahl der lokalisierte Eintrag „Automatisch (Intent-Routing)“, und der Status-Chip über dem Eingabefeld zeigt Routing-Modell und Vertrauen.
77
80
 
78
81
  4. **Prüfen** — in der Session-Kopfzeile erscheint das ⚡-Abzeichen „autonomes Team“ (daneben ◇ mit dem Modell der Session); oder das Modell einfach fragen: „Wie lautet die Überschrift des letzten Abschnitts deines System-Prompts?“ — die Antwort sollte das dsh-switchman-Regelwerk nennen.
79
82
 
@@ -83,9 +86,27 @@ Auch mit nur einem Modell lohnt sich die Installation — Wasserstandskontrolle
83
86
  bash <Installationsverzeichnis>/skills/db-query/scripts/setup.sh
84
87
  ```
85
88
 
89
+ **Empfehlung zur Klassifikator-Wahl:** Wer das Entscheidungsmodell lokal betreiben will, fährt am besten `tev1:4b-mxfp8` mit Ollama — als Klassifikatortyp „Entscheidungs-Endpunkt (systemone)“ wählen, als Endpunkt `http://127.0.0.1:11434/v1/systemone` und als Modellnamen `tev1:4b-mxfp8` eintragen. Für den Chat-Klassifikator aus dem LLM-Katalog empfiehlt sich ein kleines Cloud-Modell oder ein kleines lokales Modell ohne Thinking- (Reasoning-)Fähigkeit — abgeschaltetes Thinking senkt Latenz und die Timeout-Fehlerrate der Klassifikation zugleich.
90
+
91
+ ## Standardkonfiguration
92
+
93
+ Alles Folgende sind die vollständigen Werte direkt nach der Neuinstallation (maßgebliche Quelle: das zod-Schema in `host/config.js`).
94
+
95
+ **Oberfläche und Sprachen**: `uiLocale` = `auto` (folgt der Sprache der DSH-App); `langScope` = `global`; `langConversation/Comments/Docs` = leer (in der ersten Session einmal gefragt, dann gemerkt; die Sprache von Kommentaren und Dokumenten folgt der Konversationssprache).
96
+
97
+ **Dispatch-Pools**: alle sechs Spuren (economy/mechanical/main/hard/vision/review) starten ohne Kandidaten (= die Standardmodelle des Systems, keine Einwirkung); manuelle Reihenfolge und gepinnter Aufwand sind aus/leer; `dispatchEnforce` = `advice` (nur Empfehlung, nichts wird erzwungen).
98
+
99
+ **Kontext-Wasserstand**: soft `80000` / hard `120000` / force `150000` Token; Einzellese-Budget `3000`; Verhalten bei Budgetüberschreitung `cap` (kürzen mit Warnung); `wmAutoHandover` = an (bei force automatische Sicherung + Übergabe mit Komprimierung); die harte Obergrenze für Subagents = an (gemeinsame 150k).
100
+
101
+ **Agent Teams**: `teamsMode` = aus; `syncWhitelist` = aus (die beiden Schalter sind unabhängig voneinander).
102
+
103
+ **Intent-Routing** (ab Werk unbrauchbar; nötig sind Klassifikator + mindestens ein Kandidat + der Hauptschalter): `intentEnabled` = aus (ist er aus, bleibt der Auto-Eintrag verborgen, und Sessions, die bereits Auto gewählt hatten, laufen über die Fallback-Kette); Klassifikator-Route nicht gesetzt; Klassifikatortyp `chat`; Kandidatenliste leer (die mitgelieferten Kategorien nehmen erst mit eingetragenem Modell am Routing teil); Cache-Fenster `300` s / Umschalt-Vertrauensschwelle `80` / Klassifikations-Timeout `60000` ms; Verlauf `6` Nachrichten / `2400` Zeichen; `intentContextWindow` = `200000`.
104
+
105
+ **Out-of-the-Box-Anmerkungen**: ① dass Intent-Routing ab Werk unbrauchbar ist, ist Absicht — drei Schritte zum Einschalten (Klassifikator, Kandidaten, Schalter); ② das wirksame Auto-Fenster steht ab Werk auf 200000 — die Leitplanke garantiert 0.8×Fenster ≥ force (150000), die Kern-Komprimierlinie (160000) liegt also stets hinter der Linie der weichen Übergabe (150000); ③ am spürbarsten ab Werk ist das Wasserstands-Trio: 80k mahnt zur Delegation / 120k strafft das Lesen / 150k sichert automatisch ab und übergibt — ganz ohne Einstellungen.
106
+
86
107
  ## Funktionsweise
87
108
 
88
- - Die Host-Hälfte (`index.js` + `host/`) injiziert die dynamischen System-Prompt-Abschnitte (Sprache / Spuren / Wasserstand / Teams), das Lese-Budget samt Enforcement-Doppeltor und vier Slash-Befehle (das ctx-Trio + `/vision`). Gespeicherte Einstellungen wirken ab der nächsten Prompt-Montage — kein Neustart.
109
+ - Die Host-Hälfte (`index.js` + `host/`) injiziert die byte-stabilen System-Prompt-Abschnitte (Sprache / Spuren / Wasserstands-Protokoll / Teams) plus die Live-Wasserstandszeile über den Runtime-Context-Snapshot am Ende (ein Kanal, der nur anhängt, statt den Prompt-Kopf umzuschreiben — der Prompt-Cache des Providers bleibt intakt), dazu das Lese-Budget samt Enforcement-Doppeltor und vier Slash-Befehle (das ctx-Trio + `/vision`). Gespeicherte Einstellungen wirken ab der nächsten Prompt-Montage — kein Neustart.
89
110
  - Die Client-Hälfte (`client.js`) rendert die Einstellungsseite, das ⚡-Abzeichen und die ◇-Modellmarkierung in der Session-Kopfzeile und die Live-Anzeige während einer Übergabe; Konfigurations-Snapshots werden über die Host-Routenfamilie gelesen und geschrieben.
90
111
  - Der Eintrag „Switchman-Dispatch-Center“ in der Startseiten-Seitenleiste öffnet dieselbe Einstellungsseite mit einem Klick als Zentral-Panel; der ursprüngliche Einstellungszugang bleibt.
91
112
  - `cordis.patch.yml` hält die Werks-Preset-Pluginliste vollständig intakt und erweitert nur den Persona-Suffix; die Agent-Teams-Werkzeuge selbst stammen aus dem Werks-Bundle und schalten sich mit dem Team-Modus automatisch scharf.
package/README.es.md CHANGED
@@ -12,9 +12,9 @@
12
12
 
13
13
  Trabajando con DSH, tarde o temprano te topas con dos cosas: la sesión pesa cada vez más — el historial hincha el contexto hasta cientos de miles de tokens, el modelo empieza a olvidar, a ir lento y a encarecerse, y el /compact manual de por medio pierde detalles en cada compresión; y el modelo principal lo hace todo él solo — leer un archivo, lanzar un test, cotejar datos: todo lo mastica él, cuando la mayor parte de ese trabajo correspondería a un modelo barato.
14
14
 
15
- dsh-switchman es un plugin para [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Una vez instalado, el modelo principal deja de «hacerlo todo él solo» y pasa a ser el guardagujas: medir el nivel de agua, elegir el carril, repartir tareas y aceptar el trabajo. No es un modelo nuevo: es un reglamento de despacho enganchado a DSH, más una página de configuración. En concreto hace siete cosas:
15
+ dsh-switchman es un plugin para [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Una vez instalado, el modelo principal deja de «hacerlo todo él solo» y pasa a ser el guardagujas: medir el nivel de agua, elegir el carril, repartir tareas y aceptar el trabajo. No es un modelo nuevo: es un reglamento de despacho enganchado a DSH, más una página de configuración. En concreto hace ocho cosas:
16
16
 
17
- **1. Nivel de agua del contexto: la sesión larga no se desborda.** Cada turno contabiliza los tokens de la sesión en vivo, y tres líneas de nivel aprietan por etapas: 50k (soft, ajustable) avisa «toca delegar»; 90k (hard) recorta el presupuesto de lectura por llamada y empuja al cierre; 130k (force) lanza la entrega automática — bifurca una copia de la sesión como respaldo, compacta el contexto y despierta la continuación, sin que el trabajo se corte. Los subagentes en segundo plano que sigan corriendo en el momento de la entrega tampoco se pierden: id, descripción de la tarea y ruta del informe quedan escritos en el documento de entrega, y la sesión que continúa sabe dónde recoger los informes en vez de volver a despachar el trabajo. Cada subagente despachado lleva su propio techo duro independiente: al alcanzarlo, termina con un resumen HANDOFF. Si la intervención automática no te encaja, toma el mando manualmente en cualquier momento: `/ctx-pause` detiene todas las acciones del nivel (la medición sigue corriendo, el aviso pasa a paused — solo deja de actuar), `/ctx-resume` lo devuelve en cualquier momento — tras reiniciar DSH la intervención también vuelve sola, lo sueltas por un rato, no lo apagas para siempre; `/ctx-handover` no espera a que el nivel llegue arriba y lanza esa misma entrega a demanda: bifurca una copia de respaldo, compacta el contexto, despierta la continuación (la sesión se conduce primero a la frontera de inactividad, así que el resultado puede tardar unos minutos).
17
+ **1. Nivel de agua del contexto: la sesión larga no se desborda.** Cada turno contabiliza los tokens de la sesión en vivo, y tres líneas de nivel aprietan por etapas: 80k (soft, ajustable) avisa «toca delegar»; 120k (hard) recorta el presupuesto de lectura por llamada y empuja al cierre; 150k (force) lanza la entrega automática — bifurca una copia de la sesión como respaldo, compacta el contexto y despierta la continuación, sin que el trabajo se corte. Los subagentes en segundo plano que sigan corriendo en el momento de la entrega tampoco se pierden: id, descripción de la tarea y ruta del informe quedan escritos en el documento de entrega, y la sesión que continúa sabe dónde recoger los informes en vez de volver a despachar el trabajo. Cada subagente despachado lleva su propio techo duro independiente: al alcanzarlo, termina con un resumen HANDOFF. Si la intervención automática no te encaja, toma el mando manualmente en cualquier momento: `/ctx-pause` detiene todas las acciones del nivel (la medición sigue corriendo, la línea de nivel en vivo del final pasa a paused — solo deja de actuar), `/ctx-resume` lo devuelve en cualquier momento — tras reiniciar DSH la intervención también vuelve sola, lo sueltas por un rato, no lo apagas para siempre; `/ctx-handover` no espera a que el nivel llegue arriba y lanza esa misma entrega a demanda: bifurca una copia de respaldo, compacta el contexto, despierta la continuación (la sesión se conduce primero a la frontera de inactividad, así que el resultado puede tardar unos minutos).
18
18
 
19
19
  **2. Seis pools de despacho: a cada trabajo, su modelo.** Pool ligero (economy, tareas pequeñas en lote), mecánico (mechanical, reescrituras con plantilla), principal (main, código del día a día), de alta dificultad (hard, razonamiento difícil y refactorizaciones a gran escala), multimodal (vision, leer imágenes) y de revisión (review, verificación independiente). En la página de ajustes marcas candidatos, ordenas prioridades (con anclaje opcional a las categorías S/A/B/C) y fijas un effort de razonamiento por ruta — el desplegable de categorías sale de los niveles que ese modelo soporta de verdad, no de tres genéricos. Cada turno, el prompt del modelo principal lleva consigo una tabla de recomendaciones `[SWITCHMAN:POOLS]`, y el trabajo se despacha siguiéndola. El modo de ejecución tiene tres estados: off / advice / enforce (enforce = los modelos fuera del pool se rechazan sin más).
20
20
 
@@ -33,6 +33,8 @@ La cabecera de la sesión da un feedback visual claro: la insignia ⚡ «equipo
33
33
 
34
34
  **7. `/vision`: hasta un modelo de solo texto puede con las imágenes.** Cuando el modelo principal no sabe leer imágenes, DSH rechaza en la puerta de entrada los mensajes con imágenes. Adjunta la imagen y escribe `/vision ¿qué está mal en esta imagen?` — la imagen se entrega a un modelo del pool multimodal para leerla, y la conclusión vuelve a la sesión actual. Sobre el cuadro de entrada aparece por adelantado el aviso «el modelo actual no sabe leer imágenes»; si un envío directo de imagen es rechazado, se reescribe una vez de forma automática a `/vision` y se reenvía, sin rehacer nada a mano; con el pool multimodal sin configurar, el comando se niega y da indicaciones de configuración.
35
35
 
36
+ **8. Enrutado por intención: el modelo adecuado se elige solo.** La página de ajustes estrena un grupo «Enrutado por intención»: un interruptor maestro (apagado por defecto; para activarlo hacen falta un clasificador y al menos un candidato), la ruta de modelo pequeño del clasificador (provider + model + effort opcional — valen tanto modelos de decisión tipo TypeSafe Jev como modelos de chat genéricos, y la salida se interpreta con tolerancia), un selector de tipo de clasificador a tres bandas (auto / decision / chat), una lista de candidatos independiente (cada candidato: provider + model + effort opcional + una nota de capacidades de una línea), la ventana de caché en segundos (300 por defecto, alineada con las cachés de prompt de los proveedores, unos 5 minutos), el umbral de confianza para el cambio (80 por defecto), el timeout de clasificación (60000 ms por defecto), el número de mensajes del historial (6 por defecto) y el presupuesto de caracteres (2400 por defecto), y un modelo de respaldo opcional. En el selector de modelos aparece una entrada «Auto» dentro del grupo «Auto · Switchman» (el cliente la muestra localizada — «Automático (enrutado por intención)» en español); elegida, cada mensaje del usuario pasa por el clasificador para decidir el mejor candidato y la decisión queda fijada por ese turno: si la confianza no llega o la ventana de caché sigue abierta, se mantiene el modelo actual (reaprovechando su caché); solo se cambia cuando la confianza sobra o el modelo actual no está entre los candidatos. El cambio ocurre en silencio en la capa de llamada — no se inserta ningún mensaje de «modelo cambiado» en la sesión. Sobre el cuadro de entrada hay un chip de estado (con enrutado automático muestra el modelo en ruta y la confianza de la última decisión); los candidatos y los umbrales se consultan siempre en la página de ajustes.
37
+
36
38
  ¿Solo tienes un modelo? Sigue mereciendo la instalación — el control del nivel de agua y la verificación por niveles no dependen de cuántos modelos tengas, y una sesión larga con un solo modelo se beneficia igual.
37
39
 
38
40
  ## Skills incluidas
@@ -73,7 +75,8 @@ La cabecera de la sesión da un feedback visual claro: la insignia ⚡ «equipo
73
75
  - **Pools de despacho** — seis tarjetas en dos filas de tres: arriba ligero / mecánico / principal; abajo alta dificultad / multimodal / revisión. Cada tarjeta agrupa los modelos candidatos por proveedor; marca «orden manual» y se convierte en una lista de prioridades numerada que se reordena con ↑ ↓ ×; junto a cada ruta puedes fijar el effort de razonamiento (por defecto «seguir el carril»). La línea de resumen superior se actualiza en vivo; en la captura: «pools configurados: 4/6 · posiciones en el ranking: 2 · modo advice».
74
76
  - **Orden por capacidad + modo de ejecución** — la unión de los modelos elegidos en los seis pools, ordenada por capacidad y con los más fuertes delante (en la captura glm-5.3 anclado en S y glm-5.3-flash anclado en A); se puede reordenar y recortar; el modo de ejecución va de advice / enforce (enforce = los modelos fuera del pool se rechazan sin más).
75
77
  - **Equipo de agentes** — los dos interruptores, modo de equipo y sincronización de la lista blanca, vienen apagados; en la captura están encendidos, y debajo de cada uno hay una línea de estado de sincronización.
76
- - **Nivel de agua del contexto** — los tres umbrales (en la captura 50000 / 90000 / 130000), el presupuesto de lectura por llamada (1500), el comportamiento del umbral duro (dejar pasar limitando / bloquear), el interruptor de entrega automática y el techo independiente para subagentes: todo en esta zona. Abajo, una línea de comandos: `/ctx-pause` pausa la intervención · `/ctx-resume` la reanuda · `/ctx-handover` respalda y entrega ahora mismo (conduce la sesión a la frontera de inactividad antes de compactar; el resultado puede tardar unos minutos).
78
+ - **Nivel de agua del contexto** — los tres umbrales (en la captura 80000 / 120000 / 150000), el presupuesto de lectura por llamada (3000), el comportamiento del umbral duro (dejar pasar limitando / bloquear), el interruptor de entrega automática y el techo independiente para subagentes: todo en esta zona. Abajo, una línea de comandos: `/ctx-pause` pausa la intervención · `/ctx-resume` la reanuda · `/ctx-handover` respalda y entrega ahora mismo (conduce la sesión a la frontera de inactividad antes de compactar; el resultado puede tardar unos minutos).
79
+ - **Enrutado por intención** — el interruptor maestro, la ruta de modelo pequeño del clasificador, el tipo de clasificador (auto / decision / chat), la lista de candidatos independiente (cada uno con su nota de capacidades), la ventana de caché / umbral de confianza / timeout / presupuesto de historial y un modelo de respaldo opcional. Al activarlo, el selector de modelos gana la entrada localizada «Automático (enrutado por intención)» y sobre el cuadro de entrada aparece el chip con el modelo en ruta y la confianza.
77
80
 
78
81
  4. **Verificar** — en la cabecera de la sesión aparece la insignia ⚡ «equipo autónomo» (al lado, ◇ muestra el modelo de la sesión actual); o pregúntale directamente al modelo «¿cómo se titula la última sección de tu system prompt?» — debería mencionar el reglamento de dsh-switchman.
79
82
 
@@ -83,9 +86,27 @@ La cabecera de la sesión da un feedback visual claro: la insignia ⚡ «equipo
83
86
  bash <install-dir>/skills/db-query/scripts/setup.sh
84
87
  ```
85
88
 
89
+ **Recomendaciones para el clasificador:** para desplegar el modelo de decisión en local, lo recomendable es servir `tev1:4b-mxfp8` con Ollama: elige el tipo de clasificador «endpoint de decisión (systemone)», rellena el endpoint con `http://127.0.0.1:11434/v1/systemone` y pon `tev1:4b-mxfp8` como nombre del modelo. Si vas con el clasificador de chat del catálogo LLM, mejor un modelo pequeño en la nube, o un modelo local pequeño sin capacidad de pensamiento (razonamiento): desactivar el pensamiento reduce a la vez la latencia y la tasa de fallos por timeout de clasificación.
90
+
91
+ ## Configuración predeterminada
92
+
93
+ Esto es todo el conjunto de valores tras una instalación nueva (fuente autoritativa: el esquema zod de `host/config.js`).
94
+
95
+ **Interfaz e idiomas**: `uiLocale` = `auto` (sigue el idioma de la app de DSH); `langScope` = `global`; `langConversation/Comments/Docs` = vacíos (se pregunta una vez en la primera conversación y se recuerda; el idioma de comentarios y documentos sigue al de la conversación).
96
+
97
+ **Pools de despacho**: los seis carriles (economy/mechanical/main/hard/vision/review) arrancan sin candidatos (= los modelos por defecto del sistema, sin intervenir); el orden manual y el effort fijado, apagados/vacíos; `dispatchEnforce` = `advice` (solo aconseja, no obliga).
98
+
99
+ **Nivel de agua del contexto**: soft `80000` / hard `120000` / force `150000` tokens; presupuesto de lectura por llamada `3000`; conducta al pasarse del presupuesto `cap` (recorta y avisa); `wmAutoHandover` = encendido (en force, respaldo automático + entrega con compactación); el techo duro de subagentes = encendido (150k compartidas).
100
+
101
+ **Agent Teams**: `teamsMode` = apagado; `syncWhitelist` = apagado (los dos interruptores son independientes entre sí).
102
+
103
+ **Enrutado por intención** (no disponible de fábrica; hacen falta clasificador + al menos un candidato + encender el interruptor maestro): `intentEnabled` = apagado (apagado, la entrada Auto queda oculta y las sesiones que ya la tenían elegida caen en la cadena de respaldo); ruta del clasificador sin configurar; tipo de clasificador `chat`; lista de candidatos vacía (las categorías preinstaladas solo entran en el enrutado cuando se les asigna un modelo); ventana de caché `300` s / umbral de confianza para el cambio `80` / timeout de clasificación `60000` ms; historial de `6` mensajes / `2400` caracteres; `intentContextWindow` = `200000`.
104
+
105
+ **Notas de serie**: ① que el enrutado por intención no venga disponible de serie es intencionado: tres pasos para activarlo (clasificador, candidatos, interruptor); ② la ventana efectiva de Auto vale 200000 de serie — la barrera de seguridad garantiza 0.8×ventana ≥ force (150000), así que la línea de compactación del núcleo (160000) queda siempre por detrás de la línea de entrega suave (150000); ③ lo más perceptible de serie es el trío de niveles: 80k avisa de delegar / 120k aprieta la lectura / 150k respalda y entrega automáticamente — sin tocar ningún ajuste.
106
+
86
107
  ## Cómo funciona
87
108
 
88
- - La mitad Host (`index.js` + `host/`) inyecta las secciones dinámicas del system prompt (idioma / carriles / nivel de agua / equipo), la doble compuerta de presupuesto de lectura y enforce, y cuatro comandos slash (el trío ctx + `/vision`). Todos los ajustes, una vez guardados, surten efecto en el siguiente ensamblado del prompt, sin reinicio.
109
+ - La mitad Host (`index.js` + `host/`) inyecta las secciones estables a nivel de bytes del system prompt (idioma / carriles / protocolo de nivel de agua / equipo) más la línea de nivel en vivo a través de la instantánea de runtime-context del final (un canal que añade en lugar de reescribir la cabecera del prompt, de modo que la caché de prompt del proveedor queda intacta), además de la doble compuerta de presupuesto de lectura y enforce, y cuatro comandos slash (el trío ctx + `/vision`). Todos los ajustes, una vez guardados, surten efecto en el siguiente ensamblado del prompt, sin reinicio.
89
110
  - La mitad Client (`client.js`) pinta la página de ajustes, la insignia ⚡ y la marca de modelo ◇ en la cabecera de la sesión y el aviso dinámico de entrega en curso; las instantáneas de configuración se leen y escriben por la familia de rutas Host.
90
111
  - La entrada «Central de despacho Switchman» en la barra lateral de la página de inicio: un clic abre esta misma página de configuración como panel central; la entrada de ajustes original se conserva.
91
112
  - `cordis.patch.yml` conserva íntegra la lista de plugins de los presets de fábrica y solo amplía el persona suffix; las herramientas de Agent Teams en sí vienen del bundle de fábrica y se habilitan automáticamente al encender el modo equipo.
package/README.fr.md CHANGED
@@ -12,9 +12,9 @@
12
12
 
13
13
  À force de travailler avec DSH, on finit par se heurter à deux problèmes : la session s'alourdit à mesure que la conversation s'étire — l'historique gonfle le contexte à des centaines de milliers de tokens, le modèle commence à oublier, à ralentir, à coûter cher, et le /compact manuel avale des détails à chaque compression ; et le modèle principal fait tout lui-même — retrouver un fichier, lancer un test, recouper des données, il mâche tout cela seul, lentement et à grands frais, alors que l'essentiel de ce travail gagnerait à être confié à un modèle bien moins cher.
14
14
 
15
- dsh-switchman est un plugin pour [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Une fois installé, le modèle principal passe de « tout faire lui-même » au rôle de répartiteur : mesurer le niveau d'eau, choisir le couloir, distribuer les tâches, contrôler le résultat. Ce n'est pas un nouveau modèle — c'est une doctrine d'orchestration accrochée à DSH, accompagnée d'une page de réglages. Concrètement, il fait sept choses :
15
+ dsh-switchman est un plugin pour [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Une fois installé, le modèle principal passe de « tout faire lui-même » au rôle de répartiteur : mesurer le niveau d'eau, choisir le couloir, distribuer les tâches, contrôler le résultat. Ce n'est pas un nouveau modèle — c'est une doctrine d'orchestration accrochée à DSH, accompagnée d'une page de réglages. Concrètement, il fait huit choses :
16
16
 
17
- **1. Niveau d'eau du contexte : les longues sessions ne débordent jamais.** Chaque tour compte en direct les tokens de la session et les confronte à trois lignes d'eau qui durcissent par paliers : 50k (soft, réglable) rappelle qu'« il est temps de déléguer » ; 90k (hard) resserre le budget de lecture par appel et pousse à conclure ; 130k (force) déclenche la remise automatique — un fork de la session est archivé, le contexte compacté, la continuation réveillée, et la tâche ne s'interrompt jamais. Les subagents d'arrière-plan encore en course à cet instant ne sont pas perdus pour autant : leurs id, descriptions de tâche et chemins de rapport sont consignés dans le document de remise, et la session relancée sait où récupérer les rapports au lieu de redéspatcher en double. Chaque subagent dispatché embarque son propre plafond strict ; une fois atteint, il écrit son résumé HANDOFF et se retire. Quand l'intervention automatique ne vous convient pas, reprenez la main à tout moment : `/ctx-pause` arrête toutes les actions de niveau (la mesure continue, la bannière passe en paused — il n'agit plus, c'est tout), `/ctx-resume` rétablit à tout moment — après un redémarrage de DSH, l'intervention revient aussi d'elle-même, un lâcher-prise temporaire, pas une extinction définitive ; `/ctx-handover` n'attend pas que le niveau touche le plafond et déclenche à la demande la même remise : forker une sauvegarde, compacter le contexte, réveiller la continuation (la session est d'abord conduite jusqu'à la limite d'inactivité, le résultat peut donc prendre quelques minutes).
17
+ **1. Niveau d'eau du contexte : les longues sessions ne débordent jamais.** Chaque tour compte en direct les tokens de la session et les confronte à trois lignes d'eau qui durcissent par paliers : 80k (soft, réglable) rappelle qu'« il est temps de déléguer » ; 120k (hard) resserre le budget de lecture par appel et pousse à conclure ; 150k (force) déclenche la remise automatique — un fork de la session est archivé, le contexte compacté, la continuation réveillée, et la tâche ne s'interrompt jamais. Les subagents d'arrière-plan encore en course à cet instant ne sont pas perdus pour autant : leurs id, descriptions de tâche et chemins de rapport sont consignés dans le document de remise, et la session relancée sait où récupérer les rapports au lieu de redéspatcher en double. Chaque subagent dispatché embarque son propre plafond strict ; une fois atteint, il écrit son résumé HANDOFF et se retire. Quand l'intervention automatique ne vous convient pas, reprenez la main à tout moment : `/ctx-pause` arrête toutes les actions de niveau (la mesure continue, la ligne d'eau en direct de la fin passe en paused — il n'agit plus, c'est tout), `/ctx-resume` rétablit à tout moment — après un redémarrage de DSH, l'intervention revient aussi d'elle-même, un lâcher-prise temporaire, pas une extinction définitive ; `/ctx-handover` n'attend pas que le niveau touche le plafond et déclenche à la demande la même remise : forker une sauvegarde, compacter le contexte, réveiller la continuation (la session est d'abord conduite jusqu'à la limite d'inactivité, le résultat peut donc prendre quelques minutes).
18
18
 
19
19
  **2. Six pools de dispatch : le bon modèle pour chaque tâche.** Un pool léger (economy, les petites tâches en série), un pool mécanique (mechanical, les réécritures sur gabarit), un pool principal (main, le code au quotidien), un pool haute difficulté (hard, raisonnement corsé et refontes à grande échelle), un pool multimodal (vision, lire les images) et un pool de relecture (review, vérification indépendante). Dans la page de réglages, vous cochez les candidats, les classez par priorité (avec tiers S/A/B/C en option) et épinglez un effort de raisonnement pour chaque route — le menu déroulant des niveaux reflète ce que ce modèle supporte réellement, pas trois niveaux génériques. Chaque prompt du modèle principal embarque une table de recommandations `[SWITCHMAN:POOLS]`, et le dispatch suit cette table. Le mode d'exécution a trois états : off / advice / enforce (enforce = tout modèle hors pool est refusé sans appel).
20
20
 
@@ -33,6 +33,8 @@ L'en-tête de session donne un retour immédiat : un badge ⚡ « équipe autono
33
33
 
34
34
  **7. `/vision` : même un modèle purement textuel peut travailler avec des images.** Quand le modèle principal ne sait pas lire les images, DSH refuse les messages avec image dès l'entrée. Collez l'image, tapez `/vision où est l'erreur sur cette image`, et l'image est confiée à un modèle du pool multimodal pour lecture ; les conclusions reviennent dans la session courante. Un avertissement apparaît tôt au-dessus du champ de saisie — « le modèle courant ne sait pas lire les images » ; si un envoi d'image ordinaire est refusé, le brouillon est réécrit une fois en `/vision` et renvoyé tout seul, sans rien retaper ; sans pool multimodal configuré, la commande refuse et donne les indications de configuration.
35
35
 
36
+ **8. Routage par intention : le bon modèle se choisit tout seul.** La page de réglages accueille un nouveau groupe « Routage par intention » : un interrupteur général (désactivé par défaut ; l'activer exige un classifieur et au moins un candidat), la route du petit modèle classifieur (provider + model + effort facultatif — les modèles de décision type TypeSafe Jev comme les modèles de conversation génériques conviennent, et la sortie est analysée avec tolérance), un choix du type de classifieur à trois options (auto / decision / chat), une liste de candidats indépendante (chaque candidat : provider + model + effort facultatif + une note de capacité d'une ligne), la fenêtre de cache en secondes (300 par défaut, calée sur les caches de prompt des fournisseurs, environ 5 minutes), le seuil de confiance du basculement (80 par défaut), le timeout de classification (60000 ms par défaut), le nombre de messages d'historique (6 par défaut) et le budget de caractères (2400 par défaut), et un modèle de repli facultatif. Le sélecteur de modèles gagne une entrée « Auto » dans le groupe « Auto · Switchman » (le client la rend localisée — « Automatique (routage par intention) » en français) ; une fois choisie, chaque message utilisateur passe par le classifieur pour désigner le meilleur candidat, et la décision est verrouillée pour ce tour : si la confiance manque ou que la fenêtre de cache est encore ouverte, le modèle courant reste en place (son cache est réutilisé) ; on ne bascule que lorsque la confiance est suffisante ou que le modèle courant ne fait pas partie des candidats. Le basculement se fait en silence à la couche d'appel — aucun message « modèle changé » n'est inséré dans la session. Au-dessus du champ de saisie figure une pastille d'état (en routage automatique, elle montre le modèle routé courant et la confiance de la dernière décision) ; candidats et seuils restent consultables dans la page de réglages.
37
+
36
38
  Un seul modèle ? Ça vaut quand même l'installation — le contrôle du niveau d'eau et la vérification par paliers se moquent du nombre de modèles, et une longue session mono-modèle en profite tout autant.
37
39
 
38
40
  ## Skills incluses
@@ -73,7 +75,8 @@ Un seul modèle ? Ça vaut quand même l'installation — le contrôle du niveau
73
75
  - **Pools de dispatch** — six cartes sur deux rangées de trois : en haut léger / mécanique / principal ; en bas haute difficulté / multimodal / révision. Chaque carte coche les modèles candidats groupés par fournisseur ; cochez « ordre manuel » et elle devient une liste de priorités numérotée, à réordonner avec ↑ ↓ × ; chaque route peut épingler un effort de raisonnement (par défaut « suivre le couloir »). La ligne de résumé en haut se met à jour en direct ; sur la capture : « 4/6 pools configurés · 2 classés · mode advice ».
74
76
  - **Classement des capacités + mode d'exécution** — l'union des modèles cochés dans les six pools, classée par capacité, les plus forts devant (sur la capture glm-5.3 ancré S et glm-5.3-flash ancré A) ; on peut réordonner et retirer ; le mode d'exécution va de advice / enforce (enforce = tout modèle hors pool est refusé sans appel).
75
77
  - **Équipe d'agents** — les deux interrupteurs, mode équipe et synchronisation de la liste blanche, arrivent désactivés ; sur la capture ils sont activés, avec sous chacun une ligne d'état de synchronisation.
76
- - **Niveau d'eau du contexte** — les trois seuils (sur la capture 50000 / 90000 / 130000), le budget de lecture par appel (1500), le comportement du palier hard (passage à débit limité / blocage), l'interrupteur de remise automatique et le plafond indépendant des subagents : tout tient dans cette zone. La ligne du bas porte les commandes : `/ctx-pause` suspend les interventions · `/ctx-resume` reprend · `/ctx-handover` sauvegarde et remet immédiatement (il conduit la session jusqu'à une limite d'inactivité avant de compacter — le résultat peut prendre quelques minutes).
78
+ - **Niveau d'eau du contexte** — les trois seuils (sur la capture 80000 / 120000 / 150000), le budget de lecture par appel (3000), le comportement du palier hard (passage à débit limité / blocage), l'interrupteur de remise automatique et le plafond indépendant des subagents : tout tient dans cette zone. La ligne du bas porte les commandes : `/ctx-pause` suspend les interventions · `/ctx-resume` reprend · `/ctx-handover` sauvegarde et remet immédiatement (il conduit la session jusqu'à une limite d'inactivité avant de compacter — le résultat peut prendre quelques minutes).
79
+ - **Routage par intention** — l'interrupteur général, la route du petit modèle classifieur, le type de classifieur (auto / decision / chat), la liste de candidats indépendante (chacun avec sa note de capacité), la fenêtre de cache / seuil de confiance / timeout / budget d'historique et un modèle de repli facultatif. Une fois activé, le sélecteur de modèles gagne l'entrée localisée « Automatique (routage par intention) », et une pastille au-dessus du champ de saisie affiche le modèle routé et la confiance.
77
80
 
78
81
  4. **Vérifier** — un badge ⚡ « équipe autonome » apparaît dans l'en-tête de session (avec à côté une puce ◇ montrant le modèle de la session en cours) ; ou demandez simplement au modèle « quel est le titre du dernier paragraphe de ton prompt système » — la réponse doit mentionner la doctrine dsh-switchman.
79
82
 
@@ -83,9 +86,27 @@ Un seul modèle ? Ça vaut quand même l'installation — le contrôle du niveau
83
86
  bash <install-dir>/skills/db-query/scripts/setup.sh
84
87
  ```
85
88
 
89
+ **Conseils de choix du classificateur :** pour déployer le modèle de décision en local, le plus simple est de servir `tev1:4b-mxfp8` avec Ollama : choisissez le type de classificateur « endpoint de décision (systemone) », renseignez l'endpoint avec `http://127.0.0.1:11434/v1/systemone` et indiquez `tev1:4b-mxfp8` comme nom de modèle. Avec le classificateur de chat du catalogue LLM, privilégiez un petit modèle cloud, ou un petit modèle local sans capacité de réflexion (raisonnement) : désactiver la réflexion réduit à la fois la latence et le taux d'échecs par timeout de classification.
90
+
91
+ ## Configuration par défaut
92
+
93
+ Voici l'ensemble complet des valeurs juste après une installation neuve (source faisant foi : le schéma zod de `host/config.js`).
94
+
95
+ **Interface et langues** : `uiLocale` = `auto` (suit la langue de l'appli DSH) ; `langScope` = `global` ; `langConversation/Comments/Docs` = vides (une question posée une fois à la première session, puis retenue ; la langue des commentaires et de la documentation suit celle de la conversation).
96
+
97
+ **Pools de dispatch** : les six couloirs (economy/mechanical/main/hard/vision/review) démarrent sans candidats (= les modèles par défaut du système, aucune intervention) ; l'ordre manuel et l'effort épinglé sont désactivés/vides ; `dispatchEnforce` = `advice` (simple recommandation, rien n'est forcé).
98
+
99
+ **Niveau d'eau du contexte** : soft `80000` / hard `120000` / force `150000` tokens ; budget de lecture par appel `3000` ; comportement en cas de dépassement `cap` (tronquer avec avertissement) ; `wmAutoHandover` = activé (à force, sauvegarde automatique + remise avec compactage) ; le plafond strict des subagents = activé (150k partagées).
100
+
101
+ **Agent Teams** : `teamsMode` = désactivé ; `syncWhitelist` = désactivé (les deux interrupteurs sont indépendants l'un de l'autre).
102
+
103
+ **Routage par intention** (indisponible par défaut ; il exige un classifieur + au moins un candidat + l'interrupteur général) : `intentEnabled` = désactivé (désactivé, l'entrée Auto reste cachée et les sessions déjà passées en Auto empruntent la chaîne de repli) ; route du classifieur non définie ; type de classifieur `chat` ; liste de candidats vide (les catégories préinstallées ne participent au routage qu'une fois un modèle renseigné) ; fenêtre de cache `300` s / seuil de confiance du basculement `80` / timeout de classification `60000` ms ; historique de `6` messages / `2400` caractères ; `intentContextWindow` = `200000`.
104
+
105
+ **À savoir dès l'installation** : ① l'indisponibilité du routage par intention en sortie d'usine est un choix délibéré — trois étapes pour l'activer (classifieur, candidats, interrupteur) ; ② la fenêtre effective d'Auto vaut 200000 dès l'usine — le garde-fou garantit 0.8×fenêtre ≥ force (150000), si bien que la ligne de compactage cœur (160000) se situe toujours après la ligne de remise en douceur (150000) ; ③ l'effet le plus tangible dès l'usine est le trio de niveaux : 80k rappelle de déléguer / 120k resserre la lecture / 150k sauvegarde et remet automatiquement — sans aucun réglage.
106
+
86
107
  ## Fonctionnement
87
108
 
88
- - La partie Host (`index.js` + `host/`) injecte les sections dynamiques du prompt système (langue / couloirs / niveau d'eau / équipes), les deux verrous budget de lecture et enforce, et les quatre commandes slash (le trio ctx + `/vision`). Tout réglage enregistré prend effet au prochain assemblage de prompt — sans redémarrage.
109
+ - La partie Host (`index.js` + `host/`) injecte les sections stables à l'octet près du prompt système (langue / couloirs / protocole de niveau d'eau / équipes) plus la ligne d'eau en direct via l'instantané de runtime-context de fin (un canal qui ajoute au lieu de réécrire la tête du prompt, si bien que le cache de prompt du fournisseur reste intact), ainsi que les deux verrous budget de lecture et enforce, et les quatre commandes slash (le trio ctx + `/vision`). Tout réglage enregistré prend effet au prochain assemblage de prompt — sans redémarrage.
89
110
  - La partie Client (`client.js`) rend la page de réglages, le badge ⚡ et la puce ◇ du modèle dans l'en-tête de session, ainsi que la bannière dynamique « remise en cours » ; les instantanés de configuration se lisent et s'écrivent via la famille de routes Host.
90
111
  - L'entrée « Centre de contrôle Switchman » dans la barre latérale de la page d'accueil ouvre en un clic, sous forme de panneau central, cette même page de configuration ; l'entrée de réglages d'origine reste en place.
91
112
  - `cordis.patch.yml` reprend intégralement la liste de plugins des presets d'usine et n'étend que le persona suffix ; les outils Agent Teams eux-mêmes viennent du bundle d'usine et s'activent automatiquement quand le mode équipe est allumé.
package/README.it.md CHANGED
@@ -12,9 +12,9 @@
12
12
 
13
13
  Se lavori con DSH, col passare del tempo ti imbatti in due cose: la sessione pesa sempre di più — la cronologia gonfia il contesto fino a centinaia di migliaia di token, il modello inizia a dimenticare, rallenta e costa di più, e il /compact manuale comprime perdendo dettagli nel farlo; e il modello principale fa tutto da solo — leggere un file, lanciare un test, confrontare dati: è sempre lui a masticarli, lento e costoso, quando gran parte di quel lavoro spetterebbe a un modello economico.
14
14
 
15
- dsh-switchman è un plugin per [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Una volta installato, il modello principale smette di «fare tutto da solo» e diventa un dispatcher: misura il livello dell'acqua, sceglie la corsia, assegna i task, verifica il risultato. Non è un nuovo modello: è un regolamento di orchestrazione agganciato a DSH più un'interfaccia di configurazione. In concreto fa sette cose:
15
+ dsh-switchman è un plugin per [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Una volta installato, il modello principale smette di «fare tutto da solo» e diventa un dispatcher: misura il livello dell'acqua, sceglie la corsia, assegna i task, verifica il risultato. Non è un nuovo modello: è un regolamento di orchestrazione agganciato a DSH più un'interfaccia di configurazione. In concreto fa otto cose:
16
16
 
17
- **1. Livello dell'acqua del contesto: le sessioni lunghe non esplodono.** A ogni turno conta i token della sessione in tempo reale, e tre soglie inaspriscono a gradini: 50k (soft, regolabile) ricorda che «è ora di delegare»; 90k (hard) stringe il budget di lettura per singola chiamata e spinge verso la chiusura; 130k (force) avvia l'handover automatico — fork della sessione come copia di backup, contesto compattato, continuazione risvegliata: il task non si interrompe. Nemmeno i subagent in background ancora in corsa al momento del passaggio si perdono: id, descrizione del task e percorso del report finiscono nel documento di handover, così la sessione ripresa sa dove raccogliere i report invece di ri-assegnare lo stesso lavoro. Ogni subagent inviato porta con sé un tetto massimo indipendente e, raggiunto il limite, esce dopo aver scritto il riepilogo HANDOFF. Se l'intervento automatico non ti torna, prendi tu il comando in qualsiasi momento: `/ctx-pause` ferma tutte le azioni della soglia (la misurazione continua, l'avviso passa a paused — smette solo di agire), `/ctx-resume` ripristina in qualsiasi momento — dopo un riavvio di DSH l'intervento torna anche da solo, un mollare la presa temporaneo, non uno spegnimento definitivo; `/ctx-handover` non aspetta che la soglia tocchi il limite e avvia su richiesta lo stesso handover: fork di una copia di backup, compattazione del contesto, risveglio della continuazione (la sessione viene prima guidata fino al confine di inattività, quindi il risultato può richiedere qualche minuto).
17
+ **1. Livello dell'acqua del contesto: le sessioni lunghe non esplodono.** A ogni turno conta i token della sessione in tempo reale, e tre soglie inaspriscono a gradini: 80k (soft, regolabile) ricorda che «è ora di delegare»; 120k (hard) stringe il budget di lettura per singola chiamata e spinge verso la chiusura; 150k (force) avvia l'handover automatico — fork della sessione come copia di backup, contesto compattato, continuazione risvegliata: il task non si interrompe. Nemmeno i subagent in background ancora in corsa al momento del passaggio si perdono: id, descrizione del task e percorso del report finiscono nel documento di handover, così la sessione ripresa sa dove raccogliere i report invece di ri-assegnare lo stesso lavoro. Ogni subagent inviato porta con sé un tetto massimo indipendente e, raggiunto il limite, esce dopo aver scritto il riepilogo HANDOFF. Se l'intervento automatico non ti torna, prendi tu il comando in qualsiasi momento: `/ctx-pause` ferma tutte le azioni della soglia (la misurazione continua, la riga del livello dell'acqua in tempo reale in coda passa a paused — smette solo di agire), `/ctx-resume` ripristina in qualsiasi momento — dopo un riavvio di DSH l'intervento torna anche da solo, un mollare la presa temporaneo, non uno spegnimento definitivo; `/ctx-handover` non aspetta che la soglia tocchi il limite e avvia su richiesta lo stesso handover: fork di una copia di backup, compattazione del contesto, risveglio della continuazione (la sessione viene prima guidata fino al confine di inattività, quindi il risultato può richiedere qualche minuto).
18
18
 
19
19
  **2. Sei pool di dispatch: a ogni lavoro il suo modello.** Pool leggero (economy, piccoli lavori in serie), pool meccanico (mechanical, riscritture modellate), pool principale (main, coding di tutti i giorni), pool ad alta difficoltà (hard, ragionamento complesso e refactoring su larga scala), pool multimodale (vision, lettura delle immagini), pool di revisione (review, verifica indipendente). Nella pagina delle impostazioni spunti i candidati, ordini le priorità (con fasce opzionali S/A/B/C) e fichi un reasoning effort per ogni route — il menu a tendina elenca i livelli che quel modello supporta davvero, non tre livelli generici. A ogni turno il prompt del modello principale viaggia con una tabella di raccomandazioni `[SWITCHMAN:POOLS]`: si assegna il lavoro seguendo la tabella. La modalità di esecuzione ha tre stati: off / advice / enforce (enforce = i modelli fuori pool vengono rifiutati sul posto).
20
20
 
@@ -33,6 +33,8 @@ L'intestazione della sessione dà un riscontro immediato: badge ⚡ «Squadra au
33
33
 
34
34
  **7. `/vision`: anche i modelli solo testo trattano le immagini.** Quando il modello principale non sa leggere le immagini, DSH rifiuta al varco i messaggi che le contengono. Alleghi l'immagine e digiti `/vision dov'è l'errore in questa immagine`: l'immagine viene affidata alla lettura di un modello del pool multimodale, e la conclusione torna nella sessione corrente. Sopra la casella di input compare in anticipo l'avviso «il modello corrente non supporta la lettura delle immagini»; se un invio diretto dell'immagine viene rifiutato, il messaggio viene riscritto una volta in `/vision` e reinviato da solo, senza dover rifare tutto a mano; senza pool multimodale configurato, il comando rifiuta e indica come configurarlo.
35
35
 
36
+ **8. Instradamento per intent: il modello giusto si sceglie da sé.** La pagina delle impostazioni si arricchisce di un gruppo «Instradamento per intent»: un interruttore principale (spento per predefinito; per attivarlo servono un classificatore e almeno un candidato), la route del piccolo modello classificatore (provider + model + effort facoltativo — vanno bene sia i modelli decisionali tipo TypeSafe Jev sia i modelli di chat generici, e l'output viene letto con tolleranza), una scelta a tre vie del tipo di classificatore (auto / decision / chat), una lista di candidati indipendente (per ogni candidato: provider + model + effort facoltativo + una nota di capacità di una riga), la finestra di cache in secondi (300 per predefinito, allineata alle cache di prompt dei provider, circa 5 minuti), la soglia di confidenza per il cambio (80 per predefinito), il timeout di classificazione (60000 ms per predefinito), il numero di messaggi di cronologia (6 per predefinito) e il budget di caratteri (2400 per predefinito), più un modello di fallback facoltativo. Nel selettore dei modelli compare una voce «Auto» nel gruppo «Auto · Switchman» (il client la renderizza localizzata — «Automatico (instradamento per intent)» in italiano); una volta scelta, ogni messaggio dell'utente passa dal classificatore per eleggere il candidato migliore e la decisione resta fissata per quel turno: se la confidenza non basta o la finestra di cache è ancora aperta, resta il modello corrente (riusandone la cache); si cambia solo quando la confidenza è sufficiente o il modello corrente non è tra i candidati. Il cambio avviene in silenzio al livello di chiamata — nessun messaggio «modello cambiato» finisce nella sessione. Sopra la casella di input c'è una chip di stato (con instradamento automatico mostra il modello di instradamento corrente e la confidenza dell'ultima decisione); candidati e soglie si consultano sempre nella pagina delle impostazioni.
37
+
36
38
  Un solo modello? Vale comunque la pena installarlo — il controllo del livello dell'acqua e la verifica a livelli non guardano a quanti modelli hai, e ne giovancono allo stesso modo le sessioni lunghe con un modello unico.
37
39
 
38
40
  ## Skill incluse
@@ -73,7 +75,8 @@ Un solo modello? Vale comunque la pena installarlo — il controllo del livello
73
75
  - **Pool di dispatch** — sei schede su due righe da tre: in alto leggero / meccanico / principale; in basso alta difficoltà / multimodale / revisione. In ogni scheda si spuntano i candidati raggruppati per provider; spunta «ordine manuale» e diventa una lista di priorità numerata da riordinare con ↑ ↓ ×; accanto a ogni route puoi fichare il reasoning effort (predefinito «segui la corsia»). La riga di riepilogo in alto si aggiorna in tempo reale; nella schermata: «4/6 pool configurati · 2 in classifica · modalità advice».
74
76
  - **Classifica di capacità + modalità di esecuzione** — l'unione dei modelli scelti nei sei pool, ordinata per capacità con i più forti davanti (nella schermata glm-5.3 ancorato in S e glm-5.3-flash ancorato in A); si può riordinare e ridurre; la modalità di esecuzione va da advice / enforce (enforce = i modelli fuori pool vengono rifiutati sul posto).
75
77
  - **Squadra di agenti** — i due interruttori, modalità squadra e sincronizzazione della whitelist, partono spenti; nella schermata sono accesi, con sotto una riga di stato della sincronizzazione.
76
- - **Livello dell'acqua del contesto** — le tre soglie (nella schermata 50000 / 90000 / 130000), il budget di lettura per singola chiamata (1500), il comportamento della soglia hard (passa con limitazione / blocca), l'interruttore dell'handover automatico e il tetto indipendente dei subagent: tutto in quest'area. Una riga di comandi in fondo: `/ctx-pause` sospende gli interventi · `/ctx-resume` li riprende · `/ctx-handover` fa subito backup e passaggio di consegne (guida la sessione fino al confine di inattività prima di compattare: il risultato può richiedere alcuni minuti).
78
+ - **Livello dell'acqua del contesto** — le tre soglie (nella schermata 80000 / 120000 / 150000), il budget di lettura per singola chiamata (3000), il comportamento della soglia hard (passa con limitazione / blocca), l'interruttore dell'handover automatico e il tetto indipendente dei subagent: tutto in quest'area. Una riga di comandi in fondo: `/ctx-pause` sospende gli interventi · `/ctx-resume` li riprende · `/ctx-handover` fa subito backup e passaggio di consegne (guida la sessione fino al confine di inattività prima di compattare: il risultato può richiedere alcuni minuti).
79
+ - **Instradamento per intent** — l'interruttore principale, la route del piccolo modello classificatore, il tipo di classificatore (auto / decision / chat), la lista di candidati indipendente (ciascuno con la sua nota di capacità), finestra di cache / soglia di confidenza / timeout / budget di cronologia e un modello di fallback facoltativo. Attivandolo, il selettore dei modelli guadagna la voce localizzata «Automatico (instradamento per intent)» e sopra la casella di input compare la chip con il modello di instradamento e la confidenza.
77
80
 
78
81
  4. **Verifica** — nell'intestazione della sessione compare il badge ⚡ «Squadra autonoma» (accanto, il ◇ mostra il modello della sessione in corso); oppure chiedi direttamente al modello «qual è il titolo dell'ultima sezione del tuo system prompt?» — la risposta dovrebbe menzionare la dottrina dsh-switchman.
79
82
 
@@ -83,9 +86,27 @@ Un solo modello? Vale comunque la pena installarlo — il controllo del livello
83
86
  bash <install-dir>/skills/db-query/scripts/setup.sh
84
87
  ```
85
88
 
89
+ **Consigli sulla scelta del classificatore:** per far girare il modello di decisione in locale, la scelta consigliata è servire `tev1:4b-mxfp8` con Ollama: imposta il tipo di classificatore su «endpoint di decisione (systemone)», compila l'endpoint con `http://127.0.0.1:11434/v1/systemone` e indica `tev1:4b-mxfp8` come nome del modello. Con il classificatore di chat del catalogo LLM, meglio un piccolo modello cloud, o un piccolo modello locale senza capacità di pensiero (ragionamento): disattivare il pensiero riduce insieme la latenza e il tasso di fallimenti per timeout di classificazione.
90
+
91
+ ## Configurazione predefinita
92
+
93
+ Questi sono tutti i valori così come si presentano dopo una nuova installazione (fonte autorevole: lo schema zod in `host/config.js`).
94
+
95
+ **Interfaccia e lingue**: `uiLocale` = `auto` (segue la lingua dell'app DSH); `langScope` = `global`; `langConversation/Comments/Docs` = vuote (una domanda fatta una volta alla prima sessione, poi ricordata; la lingua di commenti e documenti segue quella della conversazione).
96
+
97
+ **Pool di dispatch**: le sei corsie (economy/mechanical/main/hard/vision/review) partono senza candidati (= i modelli predefiniti del sistema, nessuna interferenza); ordine manuale ed effort fissato spenti/vuoti; `dispatchEnforce` = `advice` (solo consiglio, niente di imposto).
98
+
99
+ **Livello dell'acqua del contesto**: soft `80000` / hard `120000` / force `150000` token; budget di lettura per singola chiamata `3000`; comportamento oltre budget `cap` (tronca con avviso); `wmAutoHandover` = attivo (a force, backup automatico + consegna con compattazione); il tetto massimo dei subagent = attivo (150k condivisi).
100
+
101
+ **Agent Teams**: `teamsMode` = spento; `syncWhitelist` = spento (i due interruttori sono indipendenti tra loro).
102
+
103
+ **Instradamento per intent** (non disponibile per predefinito; servono classificatore + almeno un candidato + l'interruttore principale): `intentEnabled` = spento (spento, la voce Auto resta nascosta e le sessioni che l'avevano già scelta percorrono la catena di fallback); route del classificatore non impostata; tipo di classificatore `chat`; lista dei candidati vuota (le categorie preinstallate entrano nell'instradamento solo con un modello assegnato); finestra di cache `300` s / soglia di confidenza del cambio `80` / timeout di classificazione `60000` ms; cronologia di `6` messaggi / `2400` caratteri; `intentContextWindow` = `200000`.
104
+
105
+ **Note di serie**: ① l'instradamento per intent non disponibile di serie è una scelta voluta — tre passi per attivarlo (classificatore, candidati, interruttore); ② la finestra effettiva di Auto vale di serie 200000 — la barriera di sicurezza garantisce 0.8×finestra ≥ force (150000), così la linea di compattazione del cuore (160000) resta sempre dopo la linea di consegna morbida (150000); ③ di serie la cosa più percettibile è il terzetto di soglie: 80k ricorda di delegare / 120k stringe la lettura / 150k fa da solo backup e consegna — senza alcuna impostazione.
106
+
86
107
  ## Come funziona
87
108
 
88
- - La parte Host (`index.js` + `host/`) inietta le sezioni dinamiche del system prompt (lingue / corsie / livello dell'acqua / squadra), il doppio cancello budget di lettura + enforce e i quattro comandi slash (il trio ctx più `/vision`). Ogni impostazione salvata vale già dall'assemblaggio del prompt successivo, senza riavvio.
109
+ - La parte Host (`index.js` + `host/`) inietta le sezioni byte-stabili del system prompt (lingue / corsie / protocollo del livello dell'acqua / squadra) più la riga del livello dell'acqua in tempo reale tramite lo snapshot di runtime-context in coda (un canale che accoda invece di riscrivere la testa del prompt, quindi la cache di prompt del provider resta intatta), oltre al doppio cancello budget di lettura + enforce e i quattro comandi slash (il trio ctx più `/vision`). Ogni impostazione salvata vale già dall'assemblaggio del prompt successivo, senza riavvio.
89
110
  - La parte Client (`client.js`) renderizza la pagina delle impostazioni, il badge ⚡ e l'identificativo ◇ del modello nell'intestazione della sessione e l'avviso dinamico durante l'handover; gli snapshot di configurazione si leggono e scrivono tramite la famiglia di route Host.
90
111
  - La voce «Switchman Control Center» nella barra laterale della home apre con un clic questa stessa pagina di configurazione come pannello centrale; la voce nelle impostazioni resta al suo posto.
91
112
  - `cordis.patch.yml` conserva integralmente la lista di plugin dei preset di fabbrica e interviene solo sul persona suffix; gli strumenti Agent Teams in sé vengono dal bundle di fabbrica e vengono abilitati automaticamente all'attivazione della modalità squadra.
package/README.ja.md CHANGED
@@ -12,9 +12,9 @@
12
12
 
13
13
  DSHで長く作業していると、悩みが2つ出てくる。1つはセッションの肥大化。履歴がコンテキストを数十万トークンまで膨らませ、モデルは忘れ始め、遅くなり、高くつき、手動の /compact は細部を失う。もう1つは主力モデルが何でも自分でやること。ファイルを追い、テストを回し、データを突き合わせる——その大半は実は安いモデルに任せるべき仕事だ。
14
14
 
15
- dsh-switchman は [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)のプラグインだ。入れると主モデルは「自分で作業する」役から運転指令へ変わる:水位を測り、レーンを選び、タスクを投げ、受け入れを確認する。新モデルではない。DSHに取り付けるディスパッチ規程と設定ページであり、7つのことを行う。
15
+ dsh-switchman は [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)のプラグインだ。入れると主モデルは「自分で作業する」役から運転指令へ変わる:水位を測り、レーンを選び、タスクを投げ、受け入れを確認する。新モデルではない。DSHに取り付けるディスパッチ規程と設定ページであり、8つのことを行う。
16
16
 
17
- **1. コンテキスト水位:長いセッションを破裂させない。** 毎ターンリアルタイムでセッショントークンを数え、3本の水位線が段階的に締め上げる:50k(soft、調整可)は「そろそろ委譲を」、90k(hard)は1回の読み取り予算を引き締めて収束へ導き、130k(force)で自動引き継ぎ——セッションをフォークして記録に残し、コンテキストを圧縮し、後継を起こして継続する。タスクは切れない。引き継ぎの瞬間に走っているバックグラウンドのサブエージェントも失われない:id・タスク・レポートパスを引き継ぎドキュメントに書き込み、再開したセッションはどこでレポートを受け取るか分かっていて、同じ仕事を二度投げない。各サブエージェントは独立のハード上限を持ち、到達したら HANDOFF サマリを書いて退場する。自動介入が手に合わないときは、いつでも一時的に手動で引き取れる:`/ctx-pause` は水位の動作をすべて止める(計測は走り続け、バナーは paused に切り替わる、ただ手を出さなくなるだけ)、`/ctx-resume` でいつでも復帰。DSH を再起動しても介入は自動で戻る。一時的に手を離すだけで、恒久的なオフではない。`/ctx-handover` は水位が満ちるのを待たず、同じ引き継ぎを自分から起こす:フォークしてバックアップを残し、コンテキストを圧縮し、後継を起こす(セッションはまずアイドル境界まで導かれるため、結果には数分かかることがある)。
17
+ **1. コンテキスト水位:長いセッションを破裂させない。** 毎ターンリアルタイムでセッショントークンを数え、3本の水位線が段階的に締め上げる:80k(soft、調整可)は「そろそろ委譲を」、120k(hard)は1回の読み取り予算を引き締めて収束へ導き、150k(force)で自動引き継ぎ——セッションをフォークして記録に残し、コンテキストを圧縮し、後継を起こして継続する。タスクは切れない。引き継ぎの瞬間に走っているバックグラウンドのサブエージェントも失われない:id・タスク・レポートパスを引き継ぎドキュメントに書き込み、再開したセッションはどこでレポートを受け取るか分かっていて、同じ仕事を二度投げない。各サブエージェントは独立のハード上限を持ち、到達したら HANDOFF サマリを書いて退場する。自動介入が手に合わないときは、いつでも一時的に手動で引き取れる:`/ctx-pause` は水位の動作をすべて止める(計測は走り続け、末尾のリアルタイム水位線は paused に切り替わる、ただ手を出さなくなるだけ)、`/ctx-resume` でいつでも復帰。DSH を再起動しても介入は自動で戻る。一時的に手を離すだけで、恒久的なオフではない。`/ctx-handover` は水位が満ちるのを待たず、同じ引き継ぎを自分から起こす:フォークしてバックアップを残し、コンテキストを圧縮し、後継を起こす(セッションはまずアイドル境界まで導かれるため、結果には数分かかることがある)。
18
18
 
19
19
  **2. 6つのディスパッチプール:仕事に合ったモデルを。** economy(小口の雑務のバッチ)、mechanical(テンプレート化された書き換え)、main(日常のコーディング)、hard(難問推論と大規模リファクタリング)、vision(画像)、review(独立検証)。設定ページで候補にチェックを付け、優先順を決め、S/A/B/C のグレードを付け、さらにルートごとに思考強度をピン留めできる——強度のドロップダウンはそのモデルが実際に対応するレベルから立ち上がり、汎用の3段ではない。主モデルの毎ターンのプロンプトには必ず `[SWITCHMAN:POOLS]` 推薦表が載り、表に従って投げる。実行モードは3態:オフ / アドバイス / 強制(強制=プール外のモデルは即拒否)。
20
20
 
@@ -33,6 +33,8 @@ dsh-switchman は [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-har
33
33
 
34
34
  **7. `/vision`:テキスト専用モデルでも画像を扱える。** 主力モデルが画像を読めないとき、DSH は画像付きメッセージを入口で拒否する。画像を貼って `/vision この画像のどこが悪い` と打てば、画像は vision プールのモデルへ渡され、結論は現在のセッションに戻る。入力欄の上には「現在のモデルは画像を読めません」の事前表示が出る。画像を直接送って拒否されたら、自動で `/vision` に書き換えて再送するので手直しは不要。vision プールが未設定ならコマンドは拒否し、設定への案内を出す。
35
35
 
36
+ **8. 意図ルーティング:最適なモデルを自動で選ぶ。** 設定ページに「意図認識」グループが増える:マスタートグル(既定オフ、有効化には分類器と候補が最低1つ必要)、分類器用の小型モデルルート(provider + model + 任意の effort。TypeSafe Jev 系の決定モデルも汎用対話モデルも使え、出力は寛容にパースされる)、分類器タイプの3択(auto / decision / chat)、独立した候補モデルリスト(各候補に provider + model + 任意の effort + 一行の能力説明)、キャッシュウィンドウ秒数(既定 300、ベンダーの prompt cache 約5分に合わせる)、切替信頼度しきい値(既定 80)、分類タイムアウト(既定 60000ms)、履歴メッセージ件数(既定 6)と文字数予算(既定 2400)、任意のフォールバックモデル。モデルセレクターの「Auto · Switchman」グループの下に「Auto」エントリが現れる(クライアントは「自動(意図認識)」とローカライズして表示);選んでおくとユーザーメッセージごとに分類器が最適な候補を判定し、判断はそのターンの間固定される:信頼度が足りない、またはまだキャッシュウィンドウ内なら現在のモデルをそのまま使い(キャッシュを再利用)、信頼度が十分高い、または現在のモデルが候補にないときだけ切り替わる。切替は呼び出し層で静かに行われ、「モデルを切り替えました」のメッセージをセッションに差し込まない。入力欄の上には状態 chip(自動ルーティング中は現在のルーティング先モデルと最後の判断の信頼度を表示)。候補としきい値はいつでも設定ページで確認できる。
37
+
36
38
  モデルが1つでも入れる価値はある——水位制御と段階的検証はモデルの数と無関係で、単一モデルの長いセッションも同じく恩恵を受ける。
37
39
 
38
40
  ## 同梱スキル
@@ -73,7 +75,8 @@ dsh-switchman は [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-har
73
75
  - **ディスパッチプール**——六枚のカードが三列二段(上段 economy・mechanical・main、下段 hard・vision・review)。カードはプロバイダーごとに候補モデルにチェックを付ける。「手動順」にチェックすると番号付きの優先リストになり、↑ ↓ × で並べ替える。各ルートには思考強度をピン留めできる(既定「レーンに追従」)。最上部の集計行はリアルタイムに更新され、図では「4/6 プール構成済み ・ 順位 2 件 ・ モード アドバイス」。
74
76
  - **能力順位 + 実行モード**——6プールの選択モデルの和集合を能力順に並べ、最強を先頭に(図では glm-5.3 を S、glm-5.3-flash を A に錨付き)。並べ替え・削減は自由。実行モードはアドバイス / 強制(強制=プール外のモデルを即拒否)。
75
77
  - **エージェントチーム**——チームモードとホワイトリスト同期の2つのトグル。既定は両方オフ。図ではオンで、トグルの下に同期状態行がある。
76
- - **コンテキスト水位**——3段の閾値(図で 50000 / 90000 / 130000)、1回の読み取り予算(1500)、hard 段の挙動(絞って通す / ブロック)、自動引き継ぎトグル、サブエージェントの独立上限——すべてこの領域にある。最下部のコマンド行:`/ctx-pause` 介入を一時停止 ・ `/ctx-resume` 再開 ・ `/ctx-handover` すぐバックアップして引き継ぎ(セッションをアイドル境界まで導いてから圧縮するため、結果には数分かかることがある)。
78
+ - **コンテキスト水位**——3段の閾値(図で 80000 / 120000 / 150000)、1回の読み取り予算(3000)、hard 段の挙動(絞って通す / ブロック)、自動引き継ぎトグル、サブエージェントの独立上限——すべてこの領域にある。最下部のコマンド行:`/ctx-pause` 介入を一時停止 ・ `/ctx-resume` 再開 ・ `/ctx-handover` すぐバックアップして引き継ぎ(セッションをアイドル境界まで導いてから圧縮するため、結果には数分かかることがある)。
79
+ - **意図認識**——マスタートグル、分類器用小型モデルルート、分類器タイプ(auto / decision / chat)、独立候補リスト(各項目に一行の能力説明)、キャッシュウィンドウ / 信頼度しきい値 / 分類タイムアウト / 履歴予算、任意のフォールバックモデル。有効にするとモデルセレクターに「自動(意図認識)」エントリが現れ、入力欄の上に現在のルーティング先モデルと信頼度の chip が表示される。
77
80
 
78
81
  4. **確認**——セッションヘッダーに ⚡「自律チーム」バッジ(隣の ◇ に現在セッションのモデル)。あるいはモデルに「あなたのシステムプロンプトの最終段落の見出しは何か」と尋ねる——答えに dsh-switchman の規程が出てくれば正しい。
79
82
 
@@ -83,9 +86,27 @@ dsh-switchman は [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-har
83
86
  bash <インストールディレクトリ>/skills/db-query/scripts/setup.sh
84
87
  ```
85
88
 
89
+ **分類モデルの選び方**:決定モデルをローカルで動かすなら、Ollama で `tev1:4b-mxfp8` を実行するのがおすすめだ。分類器タイプは「判定エンドポイント(systemone)」を選び、エンドポイントに `http://127.0.0.1:11434/v1/systemone`、モデル名に `tev1:4b-mxfp8` を入力する。LLM カタログの chat 分類器にするなら、クラウドの小型モデルか、思考(推論)機能を持たないローカル小型モデルがおすすめだ——思考をオフにすれば、レイテンシと分類タイムアウトの失敗率を同時に抑えられる。
90
+
91
+ ## デフォルト設定
92
+
93
+ 以下は新規インストール直後の全デフォルト値(権威ソース:`host/config.js` の zod スキーマ)。
94
+
95
+ **インターフェースと言語**:`uiLocale` = `auto`(DSH アプリの言語に追従)、`langScope` = `global`、`langConversation/Comments/Docs` = 空(初回のセッションで一度尋ねて記憶。コメントとドキュメントの言語は会話の言語に追従)。
96
+
97
+ **ディスパッチプール**:6本のレーン(economy/mechanical/main/hard/vision/review)の候補はすべて空(=システム既定のモデルを使い、介入しない)。手動順と effort のピン留めはすべてオフ/空。`dispatchEnforce` = `advice`(アドバイスのみで強制はしない)。
98
+
99
+ **コンテキスト水位**:soft `80000` / hard `120000` / force `150000` トークン。1回の読み取り予算 `3000`。予算超過時の挙動 `cap`(切り詰め+警告)。`wmAutoHandover` = オン(force 段で自動バックアップ+圧縮しながら引き継ぎ)。サブエージェントのハード上限 = オン(150k を共有)。
100
+
101
+ **Agent Teams**:`teamsMode` = オフ。`syncWhitelist` = オフ(両者は互いに独立)。
102
+
103
+ **意図認識**(既定では利用不可。分類器+候補最低1つ+マスタートグルのオンが必要):`intentEnabled` = オフ(オフの間は Auto エントリが隠れ、Auto を選んでいたセッションはフォールバックチェーンへ流れる)。分類器ルートは未設定。分類器タイプは `chat`。候補リストは空(プリセット分類はモデルを埋めないとルーティングに参加しない)。キャッシュウィンドウ `300` 秒 / 切替信頼度 `80` / 分類タイムアウト `60000` ms。履歴 `6` 件 / `2400` 文字。`intentContextWindow` = `200000`。
104
+
105
+ **初期状態のポイント**:① 意図認識が既定で使えないのは意図的な設計で、有効化は3ステップ(分類器、候補、トグル)。② Auto の実効ウィンドウは既定で 200000——ガードレールにより 0.8×ウィンドウ ≥ force 段(150000)が保証され、コア圧縮線(160000)は常にスムーズ引き継ぎ線(150000)より後ろにある。③ 既定でいちばん体感できるのは水位の3点セット:80k で委譲を促し、120k で読み取りを収束させ、150k で自動バックアップ引き継ぎ。設定は一切不要。
106
+
86
107
  ## 仕組み
87
108
 
88
- - ホスト側(`index.js` + `host/`)が動的なシステムプロンプト段(言語 / レーン / 水位 / チーム)、読み取り予算と enforce の二重ゲート、4つのスラッシュコマンド(ctx 3点セット + `/vision`)を注入する。保存した設定は次のターンのプロンプト組み立てで即効き、再起動は不要。
109
+ - ホスト側(`index.js` + `host/`)がバイト単位で不変のシステムプロンプト段(言語 / レーン / 水位プロトコル / チーム)と、末尾 runtime-context スナップショット経由で届くリアルタイム水位線(追記のみでプロンプト先頭を書き換えないため、プロバイダーの prompt cache は影響を受けない)、読み取り予算と enforce の二重ゲート、4つのスラッシュコマンド(ctx 3点セット + `/vision`)を注入する。保存した設定は次のターンのプロンプト組み立てで即効き、再起動は不要。
89
110
  - クライアント側(`client.js`)は設定ページ、セッションヘッダーの ⚡ バッジと ◇ モデル表示、引き継ぎ中のライブ表示を描画する。設定スナップショットは Host のルートファミリー経由で読み書きする。
90
111
  - ホームサイドバーの「Switchman ディスパッチセンター」入口は、ワンクリックで同じ設定ページを中央パネルで開く。元の設定入口は残る。
91
112
  - `cordis.patch.yml` は出荷プリセットのプラグイン一覧を完全に保ち、persona suffix だけを拡張する。Agent Teams ツール本体は出荷バンドル由来で、チームモードをONにすると自動で有効になる。
package/README.ko.md CHANGED
@@ -12,9 +12,9 @@
12
12
 
13
13
  DSH로 오래 일하면 귀찮은 일이 두 가지 생긴다. 첫째, 세션이 길어질수록 무거워진다. 히스토리가 컨텍스트를 수십만 토큰까지 밀어 올리면 모델은 까먹기 시작하고, 느려지고, 비싸진다. 수동 /compact 은 디테일을 잃는다. 둘째, 주력 모델이 뭐든 직접 한다. 파일을 뒤지고, 테스트를 돌리고, 데이터를 맞춰 보는 일 — 그 대부분은 사실 싼 모델에게 맡겨야 할 일이다.
14
14
 
15
- dsh-switchman은 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH) 플러그인이다. 설치하면 주 모델은 '직접 일하기'에서 디스패처로 바뀐다: 수위를 재고, 차선을 고르고, 태스크를 던지고, 인수를 검수한다. 새 모델이 아니다. DSH에 얹는 디스패치 규정과 설정 화면이며, 일곱 가지 일을 한다.
15
+ dsh-switchman은 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH) 플러그인이다. 설치하면 주 모델은 '직접 일하기'에서 디스패처로 바뀐다: 수위를 재고, 차선을 고르고, 태스크를 던지고, 인수를 검수한다. 새 모델이 아니다. DSH에 얹는 디스패치 규정과 설정 화면이며, 여덟 가지 일을 한다.
16
16
 
17
- **1. 컨텍스트 수위: 긴 세션도 터지지 않게.** 매 턴 세션 토큰을 실시간으로 세고 세 단계 수위선이 순서대로 조인다: 50k(soft, 조정 가능)은 '이제 위임할 때', 90k(hard)은 1회 읽기 예산을 조이고 마무리로 유도하며, 130k(force)은 자동 인계다 — 세션을 fork해 기록으로 남기고, 컨텍스트를 압축하고, 후속을 깨워 이어 달린다. 태스크는 끊기지 않는다. 인계 순간에 돌고 있던 백그라운드 서브에이전트도 잃지 않는다: id, 태스크, 보고서 경로를 인계 문서에 적어 두어 재개된 세션은 어디서 보고를 받을지 알고 중복 발령하지 않는다. 서브에이전트마다 독립 하드 상한이 있어 도달하면 HANDOFF 요약을 쓰고 퇴장한다. 자동 개입이 손에 맞지 않으면 언제든 임시로 직접 맡을 수 있다: `/ctx-pause`는 수위 동작을 전부 멈춘다(측정은 계속 돌고 배너는 paused로 바뀐다, 그냥 손을 놓을 뿐), `/ctx-resume`으로 언제든 복구한다 — DSH를 재시작해도 개입은 자동으로 돌아온다. 잠시 손을 놓는 것이지 영구 끄기가 아니다. `/ctx-handover`는 수위가 차오르기를 기다리지 않고 같은 인계를 직접 시작한다: fork로 백업을 남기고, 컨텍스트를 압축하고, 후속을 깨워 이어 달린다(세션은 먼저 유휴 경계로 유도되므로 결과까지 몇 분 걸릴 수 있다).
17
+ **1. 컨텍스트 수위: 긴 세션도 터지지 않게.** 매 턴 세션 토큰을 실시간으로 세고 세 단계 수위선이 순서대로 조인다: 80k(soft, 조정 가능)은 '이제 위임할 때', 120k(hard)은 1회 읽기 예산을 조이고 마무리로 유도하며, 150k(force)은 자동 인계다 — 세션을 fork해 기록으로 남기고, 컨텍스트를 압축하고, 후속을 깨워 이어 달린다. 태스크는 끊기지 않는다. 인계 순간에 돌고 있던 백그라운드 서브에이전트도 잃지 않는다: id, 태스크, 보고서 경로를 인계 문서에 적어 두어 재개된 세션은 어디서 보고를 받을지 알고 중복 발령하지 않는다. 서브에이전트마다 독립 하드 상한이 있어 도달하면 HANDOFF 요약을 쓰고 퇴장한다. 자동 개입이 손에 맞지 않으면 언제든 임시로 직접 맡을 수 있다: `/ctx-pause`는 수위 동작을 전부 멈춘다(측정은 계속 돌고 뒤에 오는 실시간 수위선은 paused로 바뀐다, 그냥 손을 놓을 뿐), `/ctx-resume`으로 언제든 복구한다 — DSH를 재시작해도 개입은 자동으로 돌아온다. 잠시 손을 놓는 것이지 영구 끄기가 아니다. `/ctx-handover`는 수위가 차오르기를 기다리지 않고 같은 인계를 직접 시작한다: fork로 백업을 남기고, 컨텍스트를 압축하고, 후속을 깨워 이어 달린다(세션은 먼저 유휴 경계로 유도되므로 결과까지 몇 분 걸릴 수 있다).
18
18
 
19
19
  **2. 6개 디스패치 풀: 일에 맞는 모델.** economy(잔일 배치), mechanical(템플릿 개작), main(일상 코딩), hard(고난도 추론과 대규모 리팩터링), vision(이미지), review(독립 검증). 설정 페이지에서 후보에 체크하고, 우선순위를 정하고, S/A/B/C 등급을 매기고, 루트별로 추론 강도를 고정할 수도 있다 — 강도 드롭다운은 그 모델이 실제 지원하는 수준에서 오고, 범용 3단이 아니다. 주 모델의 매 턴 프롬프트에는 항상 `[SWITCHMAN:POOLS]` 추천표가 실리고, 표대로 발령한다. 실행 모드는 세 가지: 끔 / 조언 / 강제(강제 = 풀 밖 모델은 즉시 거절).
20
20
 
@@ -33,6 +33,8 @@ dsh-switchman은 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harn
33
33
 
34
34
  **7. `/vision`: 텍스트 전용 모델도 이미지를 다룬다.** 주력 모델이 이미지를 못 읽으면 DSH는 이미지 포함 메시지를 입구에서 거절한다. 이미지를 붙이고 `/vision 이 이미지 어디가 잘못됐어`라고 입력하면 이미지는 vision 풀 모델에게 넘어가고 결론이 현재 세션으로 돌아온다. 입력창 위에는 '현재 모델은 이미지를 읽을 수 없음' 안내가 미리 뜬다. 이미지를 직접 보내다 거절되면 자동으로 `/vision`으로 고쳐 다시 보낸다 — 손으로 다시 할 필요 없다. vision 풀이 비어 있으면 명령은 거절하고 설정 안내를 준다.
35
35
 
36
+ **8. 의도 라우팅: 알맞은 모델을 자동으로 고른다.** 설정 페이지에 '의도 인식' 그룹이 추가된다: 마스터 토글(기본 꺼짐, 켜려면 분류기와 후보 최소 1개 필요), 분류기용 소형 모델 라우트(provider + model + 선택적 effort. TypeSafe Jev 계열 결정 모델도 범용 대화 모델도 지원하며 출력은 관대하게 파싱된다), 분류기 유형 3택(auto / decision / chat), 독립 후보 모델 목록(후보마다 provider + model + 선택적 effort + 한 줄 능력 설명), 캐시 창 초(기본 300, 벤더 prompt cache 약 5분에 맞춤), 전환 신뢰도 임계값(기본 80), 분류 타임아웃(기본 60000ms), 히스토리 메시지 수(기본 6)와 문자 예산(기본 2400), 선택적 폴백 모델. 모델 선택기의 'Auto · Switchman' 그룹 아래에 'Auto' 항목이 나타난다(클라이언트는 '자동(의도 인식)'으로 현지화해 그린다). 선택해 두면 사용자 메시지마다 분류기가 가장 알맞은 후보를 판정하고 같은 턴 안에서는 결정이 고정된다: 신뢰도가 부족하거나 아직 캐시 창 안이면 현재 모델을 그대로 쓰고(캐시 재사용), 신뢰도가 충분히 높거나 현재 모델이 후보에 없을 때만 전환한다. 전환은 호출 계층에서 조용히 끝나며 세션에 '모델이 전환되었습니다' 메시지를 끼워 넣지 않는다. 입력창 위에는 상태 chip이 뜬다(자동 라우팅 중에는 현재 라우팅 모델과 마지막 판정 신뢰도 표시). 후보와 임계값은 언제든 설정 페이지에서 볼 수 있다.
37
+
36
38
  모델이 하나뿐이어도 설치할 가치가 있다 — 수위 제어와 단계별 검증은 모델 수와 무관하고, 단일 모델의 긴 세션도 같은 혜택을 본다.
37
39
 
38
40
  ## 번들 스킬
@@ -73,7 +75,8 @@ dsh-switchman은 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harn
73
75
  - **디스패치 풀** — 두 줄에 세 장씩 여섯 카드(위 economy/mechanical/main, 아래 hard/vision/review). 카드는 공급자별로 묶은 후보 모델에 체크. '수동 순서'에 체크하면 번호 매긴 우선 목록이 되고 ↑ ↓ ×로 순서를 정한다. 루트별로 추론 강도를 고정할 수 있다(기본 '레인 따름'). 맨 위 요약 줄은 실시간 갱신되고 그림에서는 '4/6 풀 구성됨 · 순위 2건 · 모드 조언'.
74
76
  - **능력 순위 + 실행 모드** — 6개 풀에서 선택한 모델의 합집합을 능력순으로, 최강이 맨 앞(그림에서 glm-5.3은 S, glm-5.3-flash는 A에 고정). 순서 조정과 삭제가 가능하다. 실행 모드는 조언 / 강제(강제 = 풀 밖 모델 즉시 거절).
75
77
  - **에이전트 팀** — 팀 모드와 화이트리스트 동기화 두 토글. 기본은 둘 다 꺼짐. 그림에서는 켜져 있고 토글 아래에 동기화 상태 줄이 있다.
76
- - **컨텍스트 수위** — 3단 임계값(그림에서 50000 / 90000 / 130000), 1회 읽기 예산(1500), hard 단계 동작(조여 통과 / 차단), 자동 인계 토글, 서브에이전트 독립 상한이 모두 이 영역에 있다. 맨 아래 명령 줄: `/ctx-pause` 개입 일시정지 · `/ctx-resume` 재개 · `/ctx-handover` 즉시 백업하고 인계(세션을 유휴 경계로 이끈 뒤 압축하므로 결과까지 몇 분 걸릴 수 있다).
78
+ - **컨텍스트 수위** — 3단 임계값(그림에서 80000 / 120000 / 150000), 1회 읽기 예산(3000), hard 단계 동작(조여 통과 / 차단), 자동 인계 토글, 서브에이전트 독립 상한이 모두 이 영역에 있다. 맨 아래 명령 줄: `/ctx-pause` 개입 일시정지 · `/ctx-resume` 재개 · `/ctx-handover` 즉시 백업하고 인계(세션을 유휴 경계로 이끈 뒤 압축하므로 결과까지 몇 분 걸릴 수 있다).
79
+ - **의도 인식** — 마스터 토글, 분류기용 소형 모델 라우트, 분류기 유형(auto / decision / chat), 독립 후보 목록(항목마다 한 줄 능력 설명), 캐시 창 / 신뢰도 임계값 / 분류 타임아웃 / 히스토리 예산, 선택적 폴백 모델. 켜면 모델 선택기에 '자동(의도 인식)' 항목이 생기고 입력창 위에 현재 라우팅 모델과 신뢰도 chip이 표시된다.
77
80
 
78
81
  4. **확인** — 세션 헤더에 ⚡ '자율 팀' 배지(옆 ◇에 현재 세션 모델)가 뜬다. 또는 모델에게 '너의 시스템 프롬프트 마지막 단락 제목이 뭐야?'라고 물어보라 — 답에 dsh-switchman 규정이 언급되어야 한다.
79
82
 
@@ -83,9 +86,27 @@ dsh-switchman은 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harn
83
86
  bash <설치-디렉터리>/skills/db-query/scripts/setup.sh
84
87
  ```
85
88
 
89
+ **분류기 모델 선택 가이드**: 결정 모델을 로컬에서 운영하려면 Ollama로 `tev1:4b-mxfp8`을 실행하는 것을 권장한다. 분류기 유형은 '판정 엔드포인트(systemone)'를 선택하고, 엔드포인트에는 `http://127.0.0.1:11434/v1/systemone`, 모델 이름에는 `tev1:4b-mxfp8`을 입력한다. LLM 카탈로그의 chat 분류기를 쓴다면 클라우드 소형 모델이나 추론 기능이 없는 로컬 소형 모델을 권장한다 — 추론을 끄면 지연과 분류 타임아웃 실패율을 동시에 낮출 수 있다.
90
+
91
+ ## 기본 설정
92
+
93
+ 다음은 새로 설치한 직후의 전체 기본값이다(권위 있는 출처: `host/config.js`의 zod 스키마).
94
+
95
+ **인터페이스와 언어**: `uiLocale` = `auto`(DSH 앱 언어를 따름), `langScope` = `global`, `langConversation/Comments/Docs` = 빈 값(첫 세션에서 한 번 물어보고 기억한다. 주석과 문서 언어는 대화 언어를 따른다).
96
+
97
+ **디스패치 풀**: 여섯 레인(economy/mechanical/main/hard/vision/review)의 후보는 모두 빈 상태로 시작한다(= 시스템 기본 모델을 쓰고 개입하지 않음). 수동 순서와 effort 고정은 모두 끔/빈 값. `dispatchEnforce` = `advice`(조언일 뿐 강제하지 않음).
98
+
99
+ **컨텍스트 수위**: soft `80000` / hard `120000` / force `150000` 토큰. 1회 읽기 예산 `3000`. 예산 초과 동작 `cap`(잘라내고 경고). `wmAutoHandover` = 켬(force 단계에서 자동 백업 + 압축하며 인계). 서브에이전트 하드 상한 = 켬(150k 공유).
100
+
101
+ **Agent Teams**: `teamsMode` = 끔. `syncWhitelist` = 끔(두 토글은 서로 독립적).
102
+
103
+ **의도 인식**(기본은 사용 불가. 분류기 + 후보 최소 1개 + 마스터 토글 켜기가 필요): `intentEnabled` = 끔(꺼져 있으면 Auto 항목은 숨겨지고, Auto를 선택해 둔 세션은 폴백 체인으로 흐른다). 분류기 라우트 미설정. 분류기 유형 `chat`. 후보 목록은 빈 상태(프리셋 분류는 모델을 채워야 라우팅에 참여). 캐시 창 `300`초 / 전환 신뢰도 `80` / 분류 타임아웃 `60000`ms. 히스토리 `6`건 / `2400`자. `intentContextWindow` = `200000`.
104
+
105
+ **기본 상태에서 알아둘 점**: ① 의도 인식이 기본으로 불가능한 것은 의도된 설계고, 세 단계로 켠다(분류기, 후보, 토글). ② Auto의 실효 창은 기본값이 200000이다 — 가드레일이 0.8×창 ≥ force 단계(150000)를 보장하므로, 코어 압축선(160000)은 언제나 부드러운 인계선(150000)보다 뒤에 있다. ③ 기본 상태에서 가장 체감되는 건 수위 3종 세트다: 80k에 위임 알림 / 120k에 읽기 수렴 / 150k에 자동 백업 인계 — 설정은 아무것도 필요 없다.
106
+
86
107
  ## 작동 원리
87
108
 
88
- - 호스트 쪽(`index.js` + `host/`)이 동적 시스템 프롬프트 단(언어 / 레인 / 수위 / 팀), 읽기 예산과 enforce 이중 게이트, 슬래시 명령 4개(ctx 3종 + `/vision`)를 주입한다. 설정을 저장하면 다음 턴 프롬프트 조립 때 바로 반영되고 재시작은 필요 없다.
109
+ - 호스트 쪽(`index.js` + `host/`)이 바이트 단위로 불변인 시스템 프롬프트 단(언어 / 레인 / 수위 프로토콜 / 팀)과, 뒤에 오는 runtime-context 스냅샷 채널로 전달되는 실시간 수위선(추가만 하고 프롬프트 앞부분을 재작성하지 않으므로 공급자 prompt cache는 영향받지 않는다), 읽기 예산과 enforce 이중 게이트, 슬래시 명령 4개(ctx 3종 + `/vision`)를 주입한다. 설정을 저장하면 다음 턴 프롬프트 조립 때 바로 반영되고 재시작은 필요 없다.
89
110
  - 클라이언트 쪽(`client.js`)은 설정 페이지, 세션 헤더의 ⚡ 배지와 ◇ 모델 표시, 인계 진행 중 동적 표시를 그린다. 설정 스냅샷은 Host 라우트 패밀리를 통해 읽고 쓴다.
90
111
  - 홈 사이드바의 'Switchman 디스패치 센터' 입구는 클릭 한 번으로 같은 설정 페이지를 중앙 패널로 연다. 기존 설정 입구는 그대로 둔다.
91
112
  - `cordis.patch.yml`은 출고 프리셋 플러그인 목록을 온전히 유지하고 persona suffix만 확장한다. Agent Teams 도구 본체는 출고 번들에서 오며 팀 모드를 켜면 자동으로 활성화된다.
package/README.md CHANGED
@@ -12,9 +12,9 @@
12
12
 
13
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
- 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:
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 eight things:
16
16
 
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).
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: 80k (soft, adjustable) nudges "time to delegate"; 120k (hard) shrinks the single-read budget and steers toward wrap-up; 150k (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 live watermark line 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).
18
18
 
19
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).
20
20
 
@@ -33,6 +33,8 @@ The session header gives at-a-glance feedback: the ⚡ "autonomous team" badge a
33
33
 
34
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.
35
35
 
36
+ **8. Intent routing: the right model picks itself.** A new "Intent Routing" group on the settings page: a master switch (off by default — enabling requires a classifier and at least one candidate), the classifier's small-model route (provider + model + optional effort — TypeSafe Jev-style decision models and general chat models both work, with tolerant output parsing), a classifier type three-way choice (auto / decision / chat), an independent candidate list (each candidate: provider + model + optional effort + a one-line capability note), cache window seconds (default 300, aligned to the ~5-minute prompt caches vendors provide), a switch confidence threshold (default 80), a classification timeout (default 60000 ms), history message count (default 6) and character budget (default 2400), plus an optional fallback model. The model picker gains an "Auto" entry under the "Auto · Switchman" group (the client renders it localized — "Auto (intent routing)" in English); once selected, every user message is classified to pick the best-fitting candidate and the decision is locked for that turn: when confidence is lacking or the cache window is still open, the current model stays (its cache keeps being reused); switching happens only when confidence is high enough or the current model isn't among the candidates. The switch completes silently at the call layer — no "model switched" message is inserted into the session. A status chip sits above the input box (during auto routing it shows the current routed model and the last decision's confidence); candidates and thresholds can always be checked on the settings page.
37
+
36
38
  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.
37
39
 
38
40
  ## Bundled skills
@@ -73,7 +75,8 @@ Worth installing even with a single model — watermark control and tiered verif
73
75
  - **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
76
  - **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
77
  - **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).
78
+ - **Context watermark** — the three thresholds (80000 / 120000 / 150000 in the shot), the single-read budget (3000), 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).
79
+ - **Intent Routing** — the master switch, the classifier's small-model route, the classifier type (auto / decision / chat), the independent candidate list (each with a one-line capability note), cache window / confidence threshold / classification timeout / history budget, and an optional fallback model. Once enabled, the model picker gains the localized "Auto (intent routing)" entry, and a status chip above the input box shows the routed model and confidence.
77
80
 
78
81
  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.
79
82
 
@@ -83,9 +86,27 @@ Worth installing even with a single model — watermark control and tiered verif
83
86
  bash <install-dir>/skills/db-query/scripts/setup.sh
84
87
  ```
85
88
 
89
+ **Classifier model tips:** to run the decision model locally, serve `tev1:4b-mxfp8` with Ollama — set the classifier kind to the decision endpoint (systemone), fill the endpoint with `http://127.0.0.1:11434/v1/systemone`, and set the model name to `tev1:4b-mxfp8`. For the chat classifier from the LLM catalog, prefer a small cloud model, or a small local model without thinking (reasoning) — turning thinking off lowers both latency and the classification-timeout failure rate.
90
+
91
+ ## Default configuration
92
+
93
+ Everything below is the full set of defaults after a fresh install (authoritative source: the zod schema in `host/config.js`).
94
+
95
+ **Interface and languages**: `uiLocale` = `auto` (follows the DSH app language); `langScope` = `global`; `langConversation/Comments/Docs` = empty (asked once in the first session and then remembered; the comment and document languages follow the conversation language).
96
+
97
+ **Dispatch pools**: all six lanes (economy/mechanical/main/hard/vision/review) start with empty candidates (= the system default models, no intervention); manual ordering and pinned effort are off/empty; `dispatchEnforce` = `advice` (advisory only, nothing enforced).
98
+
99
+ **Context watermark**: soft `80000` / hard `120000` / force `150000` tokens; single-read budget `3000`; over-budget behavior `cap` (truncate with a warning); `wmAutoHandover` = on (at force, automatic backup + compacting handover); the subagent hard cap = on (sharing 150k).
100
+
101
+ **Agent Teams**: `teamsMode` = off; `syncWhitelist` = off (the two toggles are independent of each other).
102
+
103
+ **Intent routing** (unavailable by default; needs a classifier + at least one candidate + the master switch on): `intentEnabled` = off (while off, the Auto entry stays hidden and sessions already on Auto fall through the fallback chain); the classifier route is unset; the classifier type is `chat`; the candidate list is empty (the preset categories join routing only once given a model); cache window `300` s / switch confidence threshold `80` / classification timeout `60000` ms; history `6` messages / `2400` characters; `intentContextWindow` = `200000`.
104
+
105
+ **Out-of-the-box notes**: ① intent routing being unavailable out of the box is by design — three steps to switch it on (classifier, candidates, the master switch); ② Auto's effective window is 200000 out of the box — the guardrail guarantees 0.8×window ≥ force (150000), so the core compaction line (160000) always sits after the smooth-handover line (150000); ③ the most tangible out-of-the-box effect is the watermark trio: 80k nudges delegation / 120k tightens reading / 150k backs up and hands over automatically — no configuration needed.
106
+
86
107
  ## How it works
87
108
 
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.
109
+ - The host half (`index.js` + `host/`) injects the byte-stable system-prompt sections (language / lanes / watermark protocol / teams) plus the live watermark line through the tail runtime-context snapshot (a channel that appends instead of rewriting the prompt head, so the provider prompt cache stays intact), 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
110
  - 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
111
  - 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
112
  - `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.