dsh-reference-session-collector 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +75 -0
- package/README.en.md +110 -0
- package/README.es.md +74 -0
- package/README.fr.md +74 -0
- package/README.it.md +74 -0
- package/README.ja.md +68 -0
- package/README.ko.md +68 -0
- package/README.md +111 -3
- package/README.ru.md +73 -0
- package/assets/deepseek-v4/LICENSE.DeepSeek-V4-Pro.txt +21 -0
- package/assets/deepseek-v4/manifest.json +23 -0
- package/assets/deepseek-v4/tokenizer.json +267359 -0
- package/assets/deepseek-v4/tokenizer_config.json +34 -0
- package/cordis.patch.yml +11 -0
- package/dsh.plugin.json +22 -0
- package/lib/client.js +15 -0
- package/lib/index.d.ts +668 -0
- package/lib/index.js +2150 -0
- package/package.json +90 -4
- package/src/ambient.d.ts +9 -0
- package/src/client/index.ts +10 -0
- package/src/deepseek-v4-tokenizer.ts +212 -0
- package/src/index.ts +431 -0
- package/src/projection.ts +478 -0
- package/src/schema.ts +288 -0
- package/src/segment.ts +67 -0
- package/src/session-file-decode.ts +529 -0
- package/src/strip-injected.ts +46 -0
- package/src/surface.ts +392 -0
- package/src/sync.ts +434 -0
- package/src/token-count.ts +77 -0
package/README.de.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# dsh-reference-session-collector (DRS) — Sitzungs-Projektionssynchronisierer
|
|
2
|
+
|
|
3
|
+
**DeepSeek-Harness(DSH)-Plugin**: Liest die Sitzungsprotokolle unter
|
|
4
|
+
`~/.dsh/sessions/**` **nur lesend**, dekodiert sie und projiziert sie in eine
|
|
5
|
+
eigene SQLite-Projektion (segments / replaces / FTS5). Über eine einzelne
|
|
6
|
+
fenced HTTP-Route `GET/POST /api/dsh-reference-session-collector` werden
|
|
7
|
+
Surface-Markierungen, Recall-Abgleich und chinesisch-taugliche
|
|
8
|
+
Volltextsuche bereitgestellt. **Es wird niemals in Sitzungsdateien
|
|
9
|
+
geschrieben.**
|
|
10
|
+
|
|
11
|
+
## Status
|
|
12
|
+
|
|
13
|
+
**Geliefert (v0.1.0)**: die komplette Host-Hälfte — reiner
|
|
14
|
+
Projektionskern, SQLite-Projektionsspeicher (node:sqlite / FTS5),
|
|
15
|
+
inkrementeller Synchronisierungsmotor (Watermark-Vorprüfung,
|
|
16
|
+
Archivverfolgung, Interval-Scheduling), Abfrageoberfläche mit
|
|
17
|
+
3-Schicht-Caching, fenced HTTP-Route. Gate-Kette `pnpm check` komplett grün
|
|
18
|
+
(9 Suiten / 66 Tests + Dist-Smoke). **Ausstehend**: Verbraucher-Anbindung
|
|
19
|
+
(Phase 1 CCI-Abgleich, Phase 2 Steward-Korpusumschaltung, Phase 3
|
|
20
|
+
Memory-Anker-Rückfüllung) und Effizienz-Benchmark T9.1.
|
|
21
|
+
|
|
22
|
+
## Architektur
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
~/.dsh/sessions/** (nur lesend) ──→ ProjectionSync (inkrementell, watermark=bytes+mtime)
|
|
26
|
+
│ projectSessionEvents (reiner Kern)
|
|
27
|
+
▼
|
|
28
|
+
~/.dsh-reference-session-collector/projection.db (4 Tabellen + fts5 + 3-Schicht-Cache)
|
|
29
|
+
│
|
|
30
|
+
┌────────────────────┼───────────────────┐
|
|
31
|
+
/api/dsh-reference-session-collector CCI (Phase 1) Steward (2) / Memory (3)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## HTTP-Routentabelle
|
|
35
|
+
|
|
36
|
+
| op | Parameter | Rückgabe |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `status` | — | Speicher-Selftest + Cache-Statistik + letzter Sync |
|
|
39
|
+
| `sessions` | `offset/limit` | Sitzungsübersicht (residente Map, 0 SQL) |
|
|
40
|
+
| `session` | `session=<id>`, optional `turn=` / `fields=search` | Segmente inkl. Suchfeldern |
|
|
41
|
+
| `surface` | `session=<id>` | Surface-Ledger (aktuelle Oberfläche + Ersetzer-Zeiger) |
|
|
42
|
+
| `recall` | `session=<id>` | Ersetzungspaare klassifiziert (Σb / Σ(a−b)) |
|
|
43
|
+
| `search` | `q=<query>`, optional `session=` | FTS5-BM25-Treffer (zh/en gleichtsegmentiert) |
|
|
44
|
+
| `sync` (POST) | `{op:'sync'}` | accepted + letztes Ergebnis |
|
|
45
|
+
|
|
46
|
+
## Nur-lesend-Disziplin
|
|
47
|
+
|
|
48
|
+
- Sitzungsdateien und `workspace.json` sind stets nur lesend;
|
|
49
|
+
- sämtliche Schreibvorgänge gehen ausschließlich nach
|
|
50
|
+
`~/.dsh-reference-session-collector/projection.db`;
|
|
51
|
+
- pro Sitzung vollständiger Neu-Schreib-Ersatz (DELETE+INSERT in einer
|
|
52
|
+
Transaktion), idempotent;
|
|
53
|
+
- **Maskierung liegt nicht bei DRS**: Rohtext-Speicherung,
|
|
54
|
+
Expositionsfläche = die Sitzungsdateien selbst.
|
|
55
|
+
|
|
56
|
+
## Umgebungsvariablen
|
|
57
|
+
|
|
58
|
+
| Variable | Standard | Bedeutung |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| `DSH_HOME` | `~/.dsh` | Sitzungsprotokoll-Wurzel |
|
|
61
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_DIR` | `~/.dsh-reference-session-collector` | Projektion-DB-Verzeichnis |
|
|
62
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS` | `30000` | Sync-Intervall; `0` = nur manuell |
|
|
63
|
+
|
|
64
|
+
## Installation / Entwicklung
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
dsh plugin --profile web add dsh-reference-session-collector
|
|
68
|
+
pnpm install && pnpm check # typecheck→lint→test→build→smoke
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Node ≥ 22 erforderlich (`zlib.zstdDecompressSync` + `node:sqlite`).
|
|
72
|
+
|
|
73
|
+
## Lizenz
|
|
74
|
+
|
|
75
|
+
MIT
|
package/README.en.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# dsh-reference-session-collector (DRS)
|
|
2
|
+
|
|
3
|
+
**Session reference projection synchronizer** — a DeepSeek Harness (DSH) plugin.
|
|
4
|
+
|
|
5
|
+
Reads session logs under `~/.dsh/sessions` (**read-only**) and decodes them into
|
|
6
|
+
one shared SQLite **projection store**: original text indexed by
|
|
7
|
+
`session × turn/step × seq`, DeepSeek-vocabulary token lengths, CCI surface
|
|
8
|
+
replacement markers, recall pointers, and an FTS5 full-text index — so context
|
|
9
|
+
compression (cci), the session steward, and prime-memory all read the same
|
|
10
|
+
projection instead of each decoding logs on their own.
|
|
11
|
+
|
|
12
|
+
> Naming: `dsh-reference-session-collector` abbreviates to **DRS**, which is also the
|
|
13
|
+
> first three letters of drscrewdriver.
|
|
14
|
+
|
|
15
|
+
## Status
|
|
16
|
+
|
|
17
|
+
**Delivered (v0.1.0)**: the whole host half — pure projection core, SQLite
|
|
18
|
+
projection store (node:sqlite, FTS5), incremental sync engine (watermark
|
|
19
|
+
pre-check, archive-set following, interval scheduling), query surface with
|
|
20
|
+
3-layer caching, and the fenced HTTP route. Gate chain `pnpm check` green
|
|
21
|
+
(9 suites / 66 tests) plus dist smoke (`pnpm smoke`). **Remaining**: consumer
|
|
22
|
+
wiring (phase 1 CCI reconciliation, phase 2 steward corpus switch, phase 3
|
|
23
|
+
memory anchor backfill) and the efficiency benchmark (T9.1). The route table
|
|
24
|
+
and store schema below are finalized.
|
|
25
|
+
|
|
26
|
+
## Architecture
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
~/.dsh/sessions/** (read-only) ──→ ProjectionSync (incremental, watermark)
|
|
30
|
+
│ projectSessionEvents (pure core)
|
|
31
|
+
▼
|
|
32
|
+
projection.db (~/.dsh-reference-session-collector/, 4 tables + fts5, 3-layer cache)
|
|
33
|
+
│
|
|
34
|
+
┌───────────────────────┼────────────────────┐
|
|
35
|
+
/api/dsh-reference-session-collector cci (phase 1) steward (2) / memory (3)
|
|
36
|
+
(status/surface/recall/…) savings/recheck corpus / history backfill
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- **Store**: `sessions` (watermark + aggregates) / `segments` (original text ×
|
|
40
|
+
turn/step × tokens × surface marker × search vista) / `replaces` (replace
|
|
41
|
+
pair pointers, a/b/kind) + `segments_fts` (bm25 over Intl.Segmenter('zh')
|
|
42
|
+
word-segmented text in a unicode61 table).
|
|
43
|
+
- **CCI assists**: surface-marker recognition (what is on the surface now, and
|
|
44
|
+
what replaced it) + surface recall pointer statistics (replace pairs with
|
|
45
|
+
b>a are re-reads; Σb accounts for negative savings directly).
|
|
46
|
+
- **Three cache layers**: SQLite mmap/WAL always on; sessions aggregates
|
|
47
|
+
resident in memory; per-session ledger LRU keyed by sync generation.
|
|
48
|
+
|
|
49
|
+
## HTTP route
|
|
50
|
+
|
|
51
|
+
Single fenced route, op dispatch:
|
|
52
|
+
|
|
53
|
+
| op | params | returns |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| `status` (default) | — | store/cache/sync status |
|
|
56
|
+
| `sessions` | `limit` `offset` | paginated session summaries |
|
|
57
|
+
| `session` | `id`, optional `turn=` range, optional `fields=search` | session projection detail |
|
|
58
|
+
| `surface` | `id` | surface marker ledger |
|
|
59
|
+
| `recall` | `id` | recall pairs + Σb (negative-savings stats, range pointers) |
|
|
60
|
+
| `search` | `q`, `limit`, `session?` | fts5 hits (CJK-capable) |
|
|
61
|
+
| `sync` (POST) | — | kick incremental sync; returns accepted + lastResult |
|
|
62
|
+
|
|
63
|
+
Without the webServer service the plugin still syncs; only the HTTP face is
|
|
64
|
+
missing (fail-soft).
|
|
65
|
+
|
|
66
|
+
## Read-only discipline
|
|
67
|
+
|
|
68
|
+
`readFileSync` is the **only** call this plugin makes against session files,
|
|
69
|
+
and it has no write counterpart — ever. The plugin writes only to
|
|
70
|
+
`~/.dsh-reference-session-collector/projection.db`. That database holds **unsanitized
|
|
71
|
+
original text**; its exposure equals the session files themselves. Any
|
|
72
|
+
"sanitized corpus" requirement belongs to consumers, not DRS.
|
|
73
|
+
|
|
74
|
+
## Configuration (v0)
|
|
75
|
+
|
|
76
|
+
No settings face yet (lands with phase-2 wiring). Environment variables:
|
|
77
|
+
|
|
78
|
+
| variable | default | meaning |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `DSH_HOME` | `~/.dsh` | session log root |
|
|
81
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_DIR` | `~/.dsh-reference-session-collector` | projection db dir |
|
|
82
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS` | `30000` | sync interval; `0` = manual only |
|
|
83
|
+
|
|
84
|
+
## Roadmap
|
|
85
|
+
|
|
86
|
+
1. **Phase 1 · cci reconciliation**: monitor/verify gains a DRS recall column —
|
|
87
|
+
claims vs formula vs projection, three-column accounting (read-only HTTP).
|
|
88
|
+
2. **Phase 2 · steward corpus switch**: the steward's inlined search engine
|
|
89
|
+
reads DRS (segments.time/on_surface/search_text + last_time_ms/archived
|
|
90
|
+
cover its whole hit face; field mapping in
|
|
91
|
+
`.agents/plans/drs-start/findings.md`).
|
|
92
|
+
3. **Phase 3 · memory history projection (read-only)**: the l0 write path does
|
|
93
|
+
**not** move (sanitization/redaction/record_id ownership stays in memory's
|
|
94
|
+
capture side; it is semantically incompatible with full-session rewrite).
|
|
95
|
+
DRS only serves historical anchor backfill and corpus. Vector layer
|
|
96
|
+
(BGE-M3 int8) is a separate optional batch job.
|
|
97
|
+
|
|
98
|
+
## Development
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
pnpm install
|
|
102
|
+
pnpm check # typecheck → lint → test → build → smoke (one chain)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Plan and progress: `.agents/plans/drs-start/` (spec / findings / checklist /
|
|
106
|
+
tasks).
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT
|
package/README.es.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# dsh-reference-session-collector (DRS) — sincronizador de proyección de sesiones
|
|
2
|
+
|
|
3
|
+
**Complemento de DeepSeek Harness (DSH)**: escanea **solo en lectura** los
|
|
4
|
+
registros de sesión en `~/.dsh/sessions/**`, los decodifica y los proyecta
|
|
5
|
+
en una proyección SQLite propia (segments / replaces / FTS5). Una única
|
|
6
|
+
ruta HTTP acotada `GET/POST /api/dsh-reference-session-collector` expone marcas de
|
|
7
|
+
superficie, conciliación de recuperaciones (recall) y búsqueda de texto
|
|
8
|
+
completo con soporte de chino. **Nunca escribe en los archivos de sesión.**
|
|
9
|
+
|
|
10
|
+
## Estado
|
|
11
|
+
|
|
12
|
+
**Entregado (v0.1.0)**: la mitad anfitriona completa — núcleo de proyección
|
|
13
|
+
puro, almacén SQLite (node:sqlite / FTS5), motor de sincronización
|
|
14
|
+
incremental (preconsulta de marca de agua, seguimiento de archivo,
|
|
15
|
+
programación por intervalo), capa de consultas con caché de 3 niveles y
|
|
16
|
+
ruta HTTP acotada. Cadena de puertas `pnpm check` totalmente en verde
|
|
17
|
+
(9 suites / 66 pruebas + humo de dist). **Pendiente**: cableado de
|
|
18
|
+
consumidores (fase 1 conciliación CCI, fase 2 cambio de corpus de steward,
|
|
19
|
+
fase 3 relleno de anclas de memory) y banco de pruebas de eficiencia T9.1.
|
|
20
|
+
|
|
21
|
+
## Arquitectura
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
~/.dsh/sessions/** (solo lectura) ──→ ProjectionSync (incremental, watermark=bytes+mtime)
|
|
25
|
+
│ projectSessionEvents (núcleo puro)
|
|
26
|
+
▼
|
|
27
|
+
~/.dsh-reference-session-collector/projection.db (4 tablas + fts5 + caché de 3 niveles)
|
|
28
|
+
│
|
|
29
|
+
┌────────────────────┼───────────────────┐
|
|
30
|
+
/api/dsh-reference-session-collector CCI (fase 1) steward (2) / memory (3)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Tabla de rutas HTTP
|
|
34
|
+
|
|
35
|
+
| op | parámetros | devuelve |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `status` | — | autodiagnóstico + estadísticas de caché + última sincronización |
|
|
38
|
+
| `sessions` | `offset/limit` | resumen de sesiones (Map residente, 0 SQL) |
|
|
39
|
+
| `session` | `session=<id>`, opcional `turn=` / `fields=search` | detalle de segments (campos de búsqueda) |
|
|
40
|
+
| `surface` | `session=<id>` | registro de superficie (estado actual + punteros de reemplazo) |
|
|
41
|
+
| `recall` | `session=<id>` | pares de reemplazo clasificados (Σb / Σ(a−b)) |
|
|
42
|
+
| `search` | `q=<consulta>`, opcional `session=` | resultados FTS5 BM25 (segmentación idéntica zh/en) |
|
|
43
|
+
| `sync` (POST) | `{op:'sync'}` | accepted + último resultado |
|
|
44
|
+
|
|
45
|
+
## Disciplina de solo lectura
|
|
46
|
+
|
|
47
|
+
- los archivos de sesión y `workspace.json` son siempre de solo lectura;
|
|
48
|
+
- toda escritura del complemento va únicamente a
|
|
49
|
+
`~/.dsh-reference-session-collector/projection.db`;
|
|
50
|
+
- reemplazo de reescritura completa por sesión (DELETE+INSERT en una
|
|
51
|
+
transacción), idempotente;
|
|
52
|
+
- **la desensibilización no es responsabilidad de DRS**: almacena texto
|
|
53
|
+
original; la superficie de exposición son los propios archivos de sesión.
|
|
54
|
+
|
|
55
|
+
## Variables de entorno
|
|
56
|
+
|
|
57
|
+
| variable | valor por defecto | significado |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| `DSH_HOME` | `~/.dsh` | raíz de registros de sesión |
|
|
60
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_DIR` | `~/.dsh-reference-session-collector` | directorio de la BD de proyección |
|
|
61
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS` | `30000` | intervalo de sincronización; `0` = solo manual |
|
|
62
|
+
|
|
63
|
+
## Instalación / desarrollo
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
dsh plugin --profile web add dsh-reference-session-collector
|
|
67
|
+
pnpm install && pnpm check # typecheck→lint→test→build→smoke
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Requiere Node ≥ 22 (`zlib.zstdDecompressSync` + `node:sqlite`).
|
|
71
|
+
|
|
72
|
+
## Licencia
|
|
73
|
+
|
|
74
|
+
MIT
|
package/README.fr.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# dsh-reference-session-collector (DRS) — Synchroniseur de projection de sessions
|
|
2
|
+
|
|
3
|
+
**Plugin DeepSeek Harness (DSH)** : balaie les journaux de session sous
|
|
4
|
+
`~/.dsh/sessions/**` en **lecture seule**, les décode et les projette dans
|
|
5
|
+
une projection SQLite propriétaire (segments / replaces / FTS5). Une unique
|
|
6
|
+
route HTTP cloisonnée `GET/POST /api/dsh-reference-session-collector` expose le marquage de
|
|
7
|
+
surface, le rapprochement des rappels et une recherche en texte intégral
|
|
8
|
+
compatible chinois. **N'écrit jamais dans les fichiers de session.**
|
|
9
|
+
|
|
10
|
+
## Statut
|
|
11
|
+
|
|
12
|
+
**Livré (v0.1.0)** : la moitié hôte complète — noyau de projection pur,
|
|
13
|
+
dépôt SQLite (node:sqlite / FTS5), moteur de synchronisation incrémental
|
|
14
|
+
(pré-vérification watermark, suivi des archivées, ordonnancement interval),
|
|
15
|
+
face de requêtes à cache 3 couches, route HTTP cloisonnée. Chaîne de gates
|
|
16
|
+
`pnpm check` entièrement verte (9 suites / 66 tests + smoke dist).
|
|
17
|
+
**Restant** : câblage des consommateurs (phase 1 rapprochement CCI,
|
|
18
|
+
phase 2 bascule du corpus steward, phase 3 réancrage mémoire) et benchmark
|
|
19
|
+
d'efficacité T9.1.
|
|
20
|
+
|
|
21
|
+
## Architecture
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
~/.dsh/sessions/** (lecture seule) ──→ ProjectionSync (incrémental, watermark=bytes+mtime)
|
|
25
|
+
│ projectSessionEvents (noyau pur)
|
|
26
|
+
▼
|
|
27
|
+
~/.dsh-reference-session-collector/projection.db (4 tables + fts5 + cache 3 couches)
|
|
28
|
+
│
|
|
29
|
+
┌────────────────────┼───────────────────┐
|
|
30
|
+
/api/dsh-reference-session-collector CCI (phase 1) steward (2) / memory (3)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Table des routes HTTP
|
|
34
|
+
|
|
35
|
+
| op | paramètres | retour |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `status` | — | auto-diagnostic dépôt + stats cache + dernier sync |
|
|
38
|
+
| `sessions` | `offset/limit` | résumé des sessions (Map résidente, 0 SQL) |
|
|
39
|
+
| `session` | `session=<id>`, `turn=` / `fields=search` optionnels | détail segments (champs de recherche) |
|
|
40
|
+
| `surface` | `session=<id>` | registre de surface (état courant + pointeurs de remplacement) |
|
|
41
|
+
| `recall` | `session=<id>` | paires de remplacement classées (Σb / Σ(a−b)) |
|
|
42
|
+
| `search` | `q=<requête>`, `session=` optionnel | résultats FTS5 BM25 (segmentation zh/en identique) |
|
|
43
|
+
| `sync` (POST) | `{op:'sync'}` | accepted + dernier résultat |
|
|
44
|
+
|
|
45
|
+
## Discipline de lecture seule
|
|
46
|
+
|
|
47
|
+
- fichiers de session et `workspace.json` toujours en lecture seule ;
|
|
48
|
+
- toutes les écritures vont uniquement dans
|
|
49
|
+
`~/.dsh-reference-session-collector/projection.db` ;
|
|
50
|
+
- remplacement réécriture-complète par session (DELETE+INSERT dans une
|
|
51
|
+
transaction), idempotent ;
|
|
52
|
+
- **l'anonymisation n'est pas la responsabilité de DRS** : texte brut
|
|
53
|
+
stocké, surface d'exposition = les fichiers de session eux-mêmes.
|
|
54
|
+
|
|
55
|
+
## Variables d'environnement
|
|
56
|
+
|
|
57
|
+
| variable | défaut | signification |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| `DSH_HOME` | `~/.dsh` | racine des journaux de session |
|
|
60
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_DIR` | `~/.dsh-reference-session-collector` | répertoire de la BD de projection |
|
|
61
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS` | `30000` | intervalle de sync ; `0` = manuel uniquement |
|
|
62
|
+
|
|
63
|
+
## Installation / Développement
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
dsh plugin --profile web add dsh-reference-session-collector
|
|
67
|
+
pnpm install && pnpm check # typecheck→lint→test→build→smoke
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Node ≥ 22 requis (`zlib.zstdDecompressSync` + `node:sqlite`).
|
|
71
|
+
|
|
72
|
+
## Licence
|
|
73
|
+
|
|
74
|
+
MIT
|
package/README.it.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# dsh-reference-session-collector (DRS) — sincronizzatore di proiezione delle sessioni
|
|
2
|
+
|
|
3
|
+
**Plugin DeepSeek Harness (DSH)**: scansisce **in sola lettura** i log di
|
|
4
|
+
sessione in `~/.dsh/sessions/**`, li decodifica e li proietta in una
|
|
5
|
+
proiezione SQLite proprietaria (segments / replaces / FTS5). Un singolo
|
|
6
|
+
endpoint HTTP delimitato `GET/POST /api/dsh-reference-session-collector` espone i
|
|
7
|
+
marchi di superficie, la riconciliazione dei recall e la ricerca full-text
|
|
8
|
+
con supporto del cinese. **Non scrive mai nei file di sessione.**
|
|
9
|
+
|
|
10
|
+
## Stato
|
|
11
|
+
|
|
12
|
+
**Consegnata (v0.1.0)**: tutta la metà host — nucleo di proiezione puro,
|
|
13
|
+
archivio SQLite (node:sqlite / FTS5), motore di sincronizzazione
|
|
14
|
+
incrementale (pre-verifica watermark, seguimento dell'archivio,
|
|
15
|
+
pianificazione a intervallo), superficie di query con cache a 3 livelli,
|
|
16
|
+
endpoint HTTP delimitato. Catena di gate `pnpm check` tutta verde
|
|
17
|
+
(9 suite / 66 test + smoke di dist). **Rimanente**: cablaggio dei
|
|
18
|
+
consumatori (fase 1 riconciliazione CCI, fase 2 commutazione del corpus
|
|
19
|
+
steward, fase 3 riempimento ancore memory) e benchmark di efficienza T9.1.
|
|
20
|
+
|
|
21
|
+
## Architettura
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
~/.dsh/sessions/** (sola lettura) ──→ ProjectionSync (incrementale, watermark=bytes+mtime)
|
|
25
|
+
│ projectSessionEvents (nucleo puro)
|
|
26
|
+
▼
|
|
27
|
+
~/.dsh-reference-session-collector/projection.db (4 tabelle + fts5 + cache a 3 livelli)
|
|
28
|
+
│
|
|
29
|
+
┌────────────────────┼───────────────────┐
|
|
30
|
+
/api/dsh-reference-session-collector CCI (fase 1) steward (2) / memory (3)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Tabella degli endpoint HTTP
|
|
34
|
+
|
|
35
|
+
| op | parametri | restituisce |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `status` | — | auto-diagnosi archivio + statistiche cache + ultima sincronizzazione |
|
|
38
|
+
| `sessions` | `offset/limit` | riepilogo sessioni (Map residente, 0 SQL) |
|
|
39
|
+
| `session` | `session=<id>`, opzionali `turn=` / `fields=search` | dettaglio segments (campi di ricerca) |
|
|
40
|
+
| `surface` | `session=<id>` | registro di superficie (stato attuale + puntatori di sostituzione) |
|
|
41
|
+
| `recall` | `session=<id>` | coppie di sostituzione classificate (Σb / Σ(a−b)) |
|
|
42
|
+
| `search` | `q=<query>`, opzionale `session=` | risultati FTS5 BM25 (segmentazione identica zh/en) |
|
|
43
|
+
| `sync` (POST) | `{op:'sync'}` | accepted + ultimo risultato |
|
|
44
|
+
|
|
45
|
+
## Disciplina di sola lettura
|
|
46
|
+
|
|
47
|
+
- i file di sessione e `workspace.json` sono sempre in sola lettura;
|
|
48
|
+
- tutte le scritture del plugin finiscono esclusivamente in
|
|
49
|
+
`~/.dsh-reference-session-collector/projection.db`;
|
|
50
|
+
- sostituzione con riscrittura completa per sessione (DELETE+INSERT in una
|
|
51
|
+
transazione), idempotente;
|
|
52
|
+
- **la sanitizzazione non è responsabilità di DRS**: memorizza testo grezzo,
|
|
53
|
+
superficie di esposizione = i file di sessione stessi.
|
|
54
|
+
|
|
55
|
+
## Variabili d'ambiente
|
|
56
|
+
|
|
57
|
+
| variabile | predefinito | significato |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| `DSH_HOME` | `~/.dsh` | radice dei log di sessione |
|
|
60
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_DIR` | `~/.dsh-reference-session-collector` | directory del DB di proiezione |
|
|
61
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS` | `30000` | intervallo di sincronizzazione; `0` = solo manuale |
|
|
62
|
+
|
|
63
|
+
## Installazione / sviluppo
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
dsh plugin --profile web add dsh-reference-session-collector
|
|
67
|
+
pnpm install && pnpm check # typecheck→lint→test→build→smoke
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Richiede Node ≥ 22 (`zlib.zstdDecompressSync` + `node:sqlite`).
|
|
71
|
+
|
|
72
|
+
## Licenza
|
|
73
|
+
|
|
74
|
+
MIT
|
package/README.ja.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# dsh-reference-session-collector (DRS) — セッション原文プロジェクション同期器
|
|
2
|
+
|
|
3
|
+
**DeepSeek Harness (DSH) プラグイン**: `~/.dsh/sessions/**` のセッション
|
|
4
|
+
ログを**読み取り専用**で走査し、復号後に独自 SQLite プロジェクション
|
|
5
|
+
(segments / replaces / FTS5)へ投影。単一の fenced HTTP ルート
|
|
6
|
+
`GET/POST /api/dsh-reference-session-collector` で surface マーク・リコール照合・
|
|
7
|
+
中文対応の全文検索面を提供します。**セッションファイルへは一切書き込みません。**
|
|
8
|
+
|
|
9
|
+
## ステータス
|
|
10
|
+
|
|
11
|
+
**納品済み(v0.1.0)**: ホスト側全体——純投影コア、SQLite プロジェクション
|
|
12
|
+
ストア(node:sqlite / FTS5)、増分同期エンジン(watermark 事前チェック /
|
|
13
|
+
アーカイブ追従 / interval スケジューリング)、3層キャッシュ照会面、fenced
|
|
14
|
+
HTTP ルート。ゲートチェーン `pnpm check` 全緑(9スイート / 66テスト + dist
|
|
15
|
+
スモーク)。**残作業**: コンシューマー配線(第1期 CCI 照合 / 第2期 steward
|
|
16
|
+
コーパス切替 / 第3期 memory アンカー補填)と効率ベンチマーク T9.1。
|
|
17
|
+
|
|
18
|
+
## アーキテクチャ
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
~/.dsh/sessions/**(読み取り専用)──→ ProjectionSync(増分、watermark=bytes+mtime)
|
|
22
|
+
│ projectSessionEvents(純コア)
|
|
23
|
+
▼
|
|
24
|
+
~/.dsh-reference-session-collector/projection.db(4テーブル + fts5 + 3層キャッシュ)
|
|
25
|
+
│
|
|
26
|
+
┌────────────────────┼───────────────────┐
|
|
27
|
+
/api/dsh-reference-session-collector CCI(第1期) steward(第2期)/memory(第3期)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## HTTP ルート表
|
|
31
|
+
|
|
32
|
+
| op | パラメータ | 戻り値 |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `status` | — | ストア自己診断 + キャッシュ統計 + 直近同期 |
|
|
35
|
+
| `sessions` | `offset/limit` | セッション一覧(常駐 Map、0 SQL) |
|
|
36
|
+
| `session` | `session=<id>`、任意 `turn=` / `fields=search` | segments 明細(検索面フィールド) |
|
|
37
|
+
| `surface` | `session=<id>` | surface テーブル(現在の表面 + 置換ポインタ) |
|
|
38
|
+
| `recall` | `session=<id>` | 置換ペア分類(Σb / Σ(a−b)) |
|
|
39
|
+
| `search` | `q=<query>`、任意 `session=` | FTS5 BM25 ヒット(中日同形分割) |
|
|
40
|
+
| `sync`(POST) | `{op:'sync'}` | accepted + 直近結果 |
|
|
41
|
+
|
|
42
|
+
## 読み取り専用規律
|
|
43
|
+
|
|
44
|
+
- セッションファイルと `workspace.json` は常時読み取り専用;
|
|
45
|
+
- 本プラグインの全書き込みは `~/.dsh-reference-session-collector/projection.db` にのみ;
|
|
46
|
+
- セッション単位の全量書換式置換(トランザクション内 DELETE+INSERT)、冪等;
|
|
47
|
+
- **マスキング責任は DRS にない**: 原文を保存、露出面=セッションファイル自体。
|
|
48
|
+
|
|
49
|
+
## 環境変数
|
|
50
|
+
|
|
51
|
+
| 変数 | 既定値 | 意味 |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| `DSH_HOME` | `~/.dsh` | セッションログルート |
|
|
54
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_DIR` | `~/.dsh-reference-session-collector` | プロジェクションDBディレクトリ |
|
|
55
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS` | `30000` | 同期間隔; `0`=手動のみ |
|
|
56
|
+
|
|
57
|
+
## インストール / 開発
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
dsh plugin --profile web add dsh-reference-session-collector
|
|
61
|
+
pnpm install && pnpm check # typecheck→lint→test→build→smoke
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Node ≥ 22 必須(`zlib.zstdDecompressSync` + `node:sqlite`)。
|
|
65
|
+
|
|
66
|
+
## ライセンス
|
|
67
|
+
|
|
68
|
+
MIT
|
package/README.ko.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# dsh-reference-session-collector (DRS) — 세션 원문 투영 동기화기
|
|
2
|
+
|
|
3
|
+
**DeepSeek Harness(DSH) 플러그인**: `~/.dsh/sessions/**` 세션 로그를
|
|
4
|
+
**읽기 전용**으로 스캔하여 디코딩 후 자체 SQLite 투영
|
|
5
|
+
(segments / replaces / FTS5)에 적재. 단일 fenced HTTP 라우트
|
|
6
|
+
`GET/POST /api/dsh-reference-session-collector`로 surface 마크, 리콜 대사(對社),
|
|
7
|
+
중국어 전문 검색면을 제공합니다. **세션 파일에는 절대 기록하지 않습니다.**
|
|
8
|
+
|
|
9
|
+
## 상태
|
|
10
|
+
|
|
11
|
+
**전달 완료(v0.1.0)**: 호스트 하프 전체 — 순수 투영 코어, SQLite 투영
|
|
12
|
+
스토어(node:sqlite / FTS5), 증분 동기화 엔진(watermark 사전 조회 / 아카이브
|
|
13
|
+
추종 / interval 스케줄링), 3계층 캐시 조회면, fenced HTTP 라우트. 게이트
|
|
14
|
+
체인 `pnpm check` 전부 녹색(9 스위트 / 66 테스트 + dist 스모크).
|
|
15
|
+
**남은 작업**: 컨슈머 배선(1단계 CCI 대사 / 2단계 steward 코퍼스 전환 /
|
|
16
|
+
3단계 memory 앵커 백필)과 성능 벤치마크 T9.1.
|
|
17
|
+
|
|
18
|
+
## 아키텍처
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
~/.dsh/sessions/**(읽기 전용) ──→ ProjectionSync(증분, watermark=bytes+mtime)
|
|
22
|
+
│ projectSessionEvents(순수 코어)
|
|
23
|
+
▼
|
|
24
|
+
~/.dsh-reference-session-collector/projection.db(4개 테이블 + fts5 + 3계층 캐시)
|
|
25
|
+
│
|
|
26
|
+
┌────────────────────┼───────────────────┐
|
|
27
|
+
/api/dsh-reference-session-collector CCI(1단계) steward(2단계)/memory(3단계)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## HTTP 라우트 표
|
|
31
|
+
|
|
32
|
+
| op | 파라미터 | 반환 |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `status` | — | 스토어 자가 진단 + 캐시 통계 + 최근 동기화 |
|
|
35
|
+
| `sessions` | `offset/limit` | 세션 요약 페이지(상주 Map, 0 SQL) |
|
|
36
|
+
| `session` | `session=<id>`, 선택 `turn=` / `fields=search` | segments 상세(검색면 필드) |
|
|
37
|
+
| `surface` | `session=<id>` | surface 대장(현재 표면 + 치환 포인터) |
|
|
38
|
+
| `recall` | `session=<id>` | 치환 쌍 분류(Σb / Σ(a−b)) |
|
|
39
|
+
| `search` | `q=<질의>`, 선택 `session=` | FTS5 BM25 히트(중·영 동일 분사) |
|
|
40
|
+
| `sync`(POST) | `{op:'sync'}` | accepted + 최근 결과 |
|
|
41
|
+
|
|
42
|
+
## 읽기 전용 규율
|
|
43
|
+
|
|
44
|
+
- 세션 파일과 `workspace.json`은 상시 읽기 전용;
|
|
45
|
+
- 모든 기록은 `~/.dsh-reference-session-collector/projection.db`에만;
|
|
46
|
+
- 세션 단위 전체 재작성 치환(트랜잭션 내 DELETE+INSERT), 멱등;
|
|
47
|
+
- **마스킹 책임은 DRS에 없음**: 원문 저장, 노출면=세션 파일 자체.
|
|
48
|
+
|
|
49
|
+
## 환경 변수
|
|
50
|
+
|
|
51
|
+
| 변수 | 기본값 | 의미 |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| `DSH_HOME` | `~/.dsh` | 세션 로그 루트 |
|
|
54
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_DIR` | `~/.dsh-reference-session-collector` | 투영 DB 디렉터리 |
|
|
55
|
+
| `DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS` | `30000` | 동기화 주기; `0`=수동 전용 |
|
|
56
|
+
|
|
57
|
+
## 설치 / 개발
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
dsh plugin --profile web add dsh-reference-session-collector
|
|
61
|
+
pnpm install && pnpm check # typecheck→lint→test→build→smoke
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Node ≥ 22 필요(`zlib.zstdDecompressSync` + `node:sqlite`).
|
|
65
|
+
|
|
66
|
+
## 라이선스
|
|
67
|
+
|
|
68
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,3 +1,111 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# dsh-reference-session-collector (DRS) — 会话原文投影同步器
|
|
2
|
+
|
|
3
|
+
> 只读扫描 `~/.dsh/sessions/**` 会话日志,解码后投影进插件自有 SQLite
|
|
4
|
+
> (segments / replaces / FTS5),经单条 fenced HTTP 路由对外提供
|
|
5
|
+
> surface 标记、召回对账与中文可用的内容检索面。**绝不写会话文件。**
|
|
6
|
+
|
|
7
|
+
# Session Reference Projector (DRS) — English summary
|
|
8
|
+
|
|
9
|
+
DRS is a read-only projector over the host's session logs. It walks
|
|
10
|
+
`~/.dsh/sessions/**`, decodes zstd/teiled-frame logs with a vendored leaf
|
|
11
|
+
decoder, and rewrites per-session projections into
|
|
12
|
+
`~/.dsh-reference-session-collector/projection.db` (SQLite via `node:sqlite`, four
|
|
13
|
+
tables + one FTS5 virtual table). A single fenced HTTP route
|
|
14
|
+
(`GET/POST /api/dsh-reference-session-collector`) exposes status, session listings,
|
|
15
|
+
per-session segment windows, the surface ledger, recall/compress pair
|
|
16
|
+
accounting and full-text search. Token counts share the exact same
|
|
17
|
+
DeepSeek-V4 tokenizer and formula as CCI's `verify`, falling back to a
|
|
18
|
+
labelled `chars/4` basis when assets are absent. DRS never writes to any
|
|
19
|
+
session file; its only writes land in its own data directory.
|
|
20
|
+
|
|
21
|
+
## 定位 / Positioning
|
|
22
|
+
|
|
23
|
+
| 消费方 | 用 DRS 做什么 | 分期 |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| CCI(context-compression) | surface 标记(compressed/surface_text/replaced_by)、召回对账(Σb 回吐、Σ(a−b) 毛节省)、verify 免全量解码 | 一期 |
|
|
26
|
+
| steward(会话管家) | 内容搜索语料源切换(search_text/time/on_surface 检索面) | 二期 |
|
|
27
|
+
| prime-memory | 历史投影只读:`op=session&turn=` 锚点回填 l0 旧行 turn/step(l0 写路径不迁) | 三期 |
|
|
28
|
+
|
|
29
|
+
## 状态 / Status
|
|
30
|
+
|
|
31
|
+
**已交付(v0.1.0)**:宿主半身全量——纯投影核心、SQLite 投影库
|
|
32
|
+
(node:sqlite, FTS5)、增量同步引擎(watermark 预查/归档集跟随/interval
|
|
33
|
+
调度)、三层缓存查询面、fenced HTTP 路由;门禁链 `pnpm check` 全绿
|
|
34
|
+
(9 测试文件 / 66 测试)含 dist 冒烟。**剩余**:消费方接线(一期 CCI
|
|
35
|
+
对账 / 二期 steward 语料切换 / 三期 memory 锚点回填)与效率基准 T9.1。
|
|
36
|
+
|
|
37
|
+
其余 8 语文档:README.en / ja / ko / de / es / fr / ru / it。
|
|
38
|
+
|
|
39
|
+
## 架构
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
~/.dsh/sessions/**(只读)──→ ProjectionSync(增量, watermark=bytes+mtime)
|
|
43
|
+
│ projectSessionEvents(纯核心)
|
|
44
|
+
▼
|
|
45
|
+
~/.dsh-reference-session-collector/projection.db(四表 + fts5 + 缓存三层)
|
|
46
|
+
│
|
|
47
|
+
┌────────────────────┼───────────────────┐
|
|
48
|
+
/api/dsh-reference-session-collector CCI(一期) steward(二期)/memory(三期)
|
|
49
|
+
(status/surface/recall/…) monitor 对账 语料源/锚点回填
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## HTTP 路由表
|
|
53
|
+
|
|
54
|
+
单条 fenced 路由 `GET/POST /api/dsh-reference-session-collector`,`op` 分发:
|
|
55
|
+
|
|
56
|
+
| op | 参数 | 返回 |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| `status` | — | 库自检 + 缓存统计 + 上次同步结果 |
|
|
59
|
+
| `sessions` | `offset/limit` | 会话汇总表分页 |
|
|
60
|
+
| `session` | `session=<id>`,可选 `turn=<区间>`、`fields=search` | segments 明细(`fields=search` 返 time/search_text/on_surface 检索面) |
|
|
61
|
+
| `surface` | `session=<id>` | surface 台账(当前表面行 + 被替换指针) |
|
|
62
|
+
| `recall` | `session=<id>` | 替换对分类账(compress/recall、Σb、Σ(a−b)) |
|
|
63
|
+
| `search` | `q=<词>`,可选 `session=` | FTS5 BM25 命中(中英同构切词) |
|
|
64
|
+
| `sync`(POST) | `{op:'sync'}` | accepted + 上次结果(后台增量同步) |
|
|
65
|
+
|
|
66
|
+
## 只读纪律
|
|
67
|
+
|
|
68
|
+
- 会话文件(`~/.dsh/sessions/**`)与 `workspace.json` 一律只读;
|
|
69
|
+
- 插件的全部写入落在 `~/.dsh-reference-session-collector/projection.db`;
|
|
70
|
+
- 每 session 全量重写式替换(事务内 DELETE+INSERT),幂等可重放;
|
|
71
|
+
- **脱敏责任不在 DRS**:projection.db 存原文,泄露面=会话文件本身。
|
|
72
|
+
|
|
73
|
+
## 分期路线
|
|
74
|
+
|
|
75
|
+
1. **一期**:投影库 + HTTP 面 + CCI 对账接线(monitor 探针 + verify 对账列);
|
|
76
|
+
2. **二期**:steward 内容搜索语料源切换(interval 同步缺省 30s 保新鲜度 ≤1 分钟);
|
|
77
|
+
3. **三期**:memory 历史锚点回填(`op=session&turn=` 匹配补 l0 旧行 turn/step,
|
|
78
|
+
匹配不上留 NULL 不伪造);向量层(BGE-M3 int8 vec 列)为独立可选批任务。
|
|
79
|
+
|
|
80
|
+
## Token 口径
|
|
81
|
+
|
|
82
|
+
`deepseek-v4-tokenizer`(flash→pro 顺序解析,资产带 SHA-256 验证)与 CCI
|
|
83
|
+
verify 同公式同词表;资产缺席降级 `chars/4` 并在 `sessions.basis` 如实标注。
|
|
84
|
+
|
|
85
|
+
## 安装 / 运行
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
dsh plugin --profile web add dsh-reference-session-collector
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
要求 node ≥ 22(`zlib.zstdDecompressSync` + `node:sqlite`)。
|
|
92
|
+
环境变量:`DSH_REFERENCE_SESSION_COLLECTOR_DIR` 覆盖库目录;
|
|
93
|
+
`DSH_REFERENCE_SESSION_COLLECTOR_SYNC_INTERVAL_MS` 调同步周期(0=关闭)。
|
|
94
|
+
|
|
95
|
+
## 状态与开发
|
|
96
|
+
|
|
97
|
+
**开发中(核心链路已全通)**:投影核心/落库(L1)、同步引擎(L3)、宿主半与
|
|
98
|
+
路由(L4)已落地,门禁全绿(typecheck/lint/build/smoke,37/37 测试);
|
|
99
|
+
收尾中:查询面正式测试(T4.2)、跨仓接线(cci 一期 / steward 二期 /
|
|
100
|
+
memory 三期)。进度簿:`.agents/plans/drs-start/`
|
|
101
|
+
(spec / findings / checklist / tasks)。
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pnpm install && pnpm typecheck && pnpm lint && pnpm test && pnpm build
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Vendored
|
|
108
|
+
|
|
109
|
+
`src/session-file-decode.ts`、`src/token-count.ts`、`src/deepseek-v4-tokenizer.ts`
|
|
110
|
+
为 CCI 文件级回搬件(禁止分叉,头注登记 provenance 与唯一授权 diff);
|
|
111
|
+
检索视界/切词逻辑为 steward 逐字同构移植。
|