dsh-research-report 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.en.md +467 -0
- package/README.es.md +466 -0
- package/README.hi.md +466 -0
- package/README.md +269 -162
- package/README.pt.md +466 -0
- package/lib/index.js +18 -0
- package/lib/types/service.d.ts +18 -0
- package/lib/types/service.d.ts.map +1 -1
- package/lib/types/service.js +18 -0
- package/lib/types/service.js.map +1 -1
- package/package.json +45 -20
- package/src/service.ts +18 -0
- package/README-es.md +0 -361
- package/README-hi.md +0 -361
- package/README-pt.md +0 -361
- package/README-zh.md +0 -361
package/package.json
CHANGED
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"CHANGELOG.md",
|
|
32
32
|
"THIRD_PARTY_NOTICES.md",
|
|
33
33
|
"README.md",
|
|
34
|
-
"README
|
|
35
|
-
"README
|
|
36
|
-
"README
|
|
37
|
-
"README
|
|
34
|
+
"README.en.md",
|
|
35
|
+
"README.es.md",
|
|
36
|
+
"README.pt.md",
|
|
37
|
+
"README.hi.md",
|
|
38
38
|
"LICENSE"
|
|
39
39
|
],
|
|
40
40
|
"sideEffects": false,
|
|
@@ -42,6 +42,31 @@
|
|
|
42
42
|
"manifestVersion": 1,
|
|
43
43
|
"bundle": {
|
|
44
44
|
"patch": "./cordis.patch.yml"
|
|
45
|
+
},
|
|
46
|
+
"capabilities": [
|
|
47
|
+
"fs:read",
|
|
48
|
+
"fs:write",
|
|
49
|
+
"network:egress",
|
|
50
|
+
"system-prompt:write",
|
|
51
|
+
"tools:register"
|
|
52
|
+
],
|
|
53
|
+
"labels": [
|
|
54
|
+
"prompt-modification"
|
|
55
|
+
],
|
|
56
|
+
"standards": {
|
|
57
|
+
"schema": "dsh-levels/1",
|
|
58
|
+
"entry": {
|
|
59
|
+
"status": "not-run",
|
|
60
|
+
"evidence": null
|
|
61
|
+
},
|
|
62
|
+
"flow": {
|
|
63
|
+
"status": "not-run",
|
|
64
|
+
"evidence": null
|
|
65
|
+
},
|
|
66
|
+
"boost": {
|
|
67
|
+
"status": "not-measured",
|
|
68
|
+
"evidence": null
|
|
69
|
+
}
|
|
45
70
|
}
|
|
46
71
|
},
|
|
47
72
|
"dshWorkshop": {
|
|
@@ -122,23 +147,23 @@
|
|
|
122
147
|
},
|
|
123
148
|
"dependencies": {},
|
|
124
149
|
"devDependencies": {
|
|
125
|
-
"@deepseek-ai/dsh-util-values": "0.2.2-rc.
|
|
126
|
-
"@deepseek-ai/dsh-attachment": "0.2.2-rc.
|
|
150
|
+
"@deepseek-ai/dsh-util-values": "0.2.2-rc.3",
|
|
151
|
+
"@deepseek-ai/dsh-attachment": "0.2.2-rc.3",
|
|
127
152
|
"@deepseek-ai/cordis": "^4.1.0",
|
|
128
153
|
"@deepseek-ai/cordis-plugin-include": "^1.1.0",
|
|
129
154
|
"@deepseek-ai/cordis-plugin-loader": "^1.1.0",
|
|
130
|
-
"@deepseek-ai/dsh-agent": "0.2.2-rc.
|
|
131
|
-
"@deepseek-ai/dsh-brand": "0.2.2-rc.
|
|
155
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.3",
|
|
156
|
+
"@deepseek-ai/dsh-brand": "0.2.2-rc.3",
|
|
132
157
|
"@deepseek-ai/dsh-invariants": "0.2.0-rc.2",
|
|
133
|
-
"@deepseek-ai/dsh-scope": "0.2.2-rc.
|
|
134
|
-
"@deepseek-ai/dsh-user-approval": "0.2.2-rc.
|
|
135
|
-
"@deepseek-ai/dsh-jobs": "0.2.2-rc.
|
|
136
|
-
"@deepseek-ai/dsh-jobs-local": "0.2.2-rc.
|
|
137
|
-
"@deepseek-ai/dsh-llm": "0.2.2-rc.
|
|
138
|
-
"@deepseek-ai/dsh-session": "0.2.2-rc.
|
|
139
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.
|
|
140
|
-
"@deepseek-ai/dsh-tools": "0.2.2-rc.
|
|
141
|
-
"@deepseek-ai/dsh-web": "0.2.2-rc.
|
|
158
|
+
"@deepseek-ai/dsh-scope": "0.2.2-rc.3",
|
|
159
|
+
"@deepseek-ai/dsh-user-approval": "0.2.2-rc.3",
|
|
160
|
+
"@deepseek-ai/dsh-jobs": "0.2.2-rc.3",
|
|
161
|
+
"@deepseek-ai/dsh-jobs-local": "0.2.2-rc.3",
|
|
162
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.3",
|
|
163
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.3",
|
|
164
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.3",
|
|
165
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.3",
|
|
166
|
+
"@deepseek-ai/dsh-web": "0.2.2-rc.3",
|
|
142
167
|
"@deepseek-ai/schemastery": "~3.19.0",
|
|
143
168
|
"@types/node": "^22.20.5",
|
|
144
169
|
"@vitest/coverage-v8": "^3.2.0",
|
|
@@ -146,8 +171,8 @@
|
|
|
146
171
|
"vitest": "^3.2.0",
|
|
147
172
|
"tsdown": "^0.23.1",
|
|
148
173
|
"typescript": "^5.9.0",
|
|
149
|
-
"@deepseek-ai/dsh-package-manifest": "0.2.2-rc.
|
|
150
|
-
"@deepseek-ai/dsh-tool-executor-native": "0.2.2-rc.
|
|
174
|
+
"@deepseek-ai/dsh-package-manifest": "0.2.2-rc.3",
|
|
175
|
+
"@deepseek-ai/dsh-tool-executor-native": "0.2.2-rc.3"
|
|
151
176
|
},
|
|
152
177
|
"scripts": {
|
|
153
178
|
"build": "node scripts/prepare.mjs",
|
|
@@ -171,5 +196,5 @@
|
|
|
171
196
|
"url": "https://github.com/sponsors/PerryLink"
|
|
172
197
|
},
|
|
173
198
|
"pnpm": {},
|
|
174
|
-
"version": "0.4.
|
|
199
|
+
"version": "0.4.2"
|
|
175
200
|
}
|
package/src/service.ts
CHANGED
|
@@ -12,6 +12,24 @@
|
|
|
12
12
|
* (dsh-industry-research) consume `ctx.researchReport.assemble` against this
|
|
13
13
|
* exact text. `scripts/verify-frozen-contract.mjs` gates drift.
|
|
14
14
|
*
|
|
15
|
+
* ── Sibling-facing surfaces (both supported) ────────────────────────────────
|
|
16
|
+
* Two seams are contractual for out-of-tree consumers. Pick by integration
|
|
17
|
+
* style, not by convenience:
|
|
18
|
+
*
|
|
19
|
+
* 1. In-process: `ctx.researchReport.assemble()` returns the frozen
|
|
20
|
+
* `AssembleReportResult` above. `reportDir` is the sealed directory;
|
|
21
|
+
* `report.md` and `manifest.json` are its fixed entry files.
|
|
22
|
+
* 2. Event-driven: the `tool/result` event for `name === 'research_report'`
|
|
23
|
+
* carries `meta.reportFile` / `meta.manifestFile` — absolute, resolved paths
|
|
24
|
+
* of those same two artifacts, present only when the result is sealed
|
|
25
|
+
* (`kind === 'sealed'`). The projection is durable and replay-safe; its
|
|
26
|
+
* fields are additive-only and the pair is never renamed, so a consumer that
|
|
27
|
+
* joins `tool/call` to `tool/result` may depend on them.
|
|
28
|
+
*
|
|
29
|
+
* The meta projection exists for consumers that cannot reproduce this plugin's
|
|
30
|
+
* cwd resolution; consumers that call the service directly should use
|
|
31
|
+
* `reportDir`. Both stay stable across minor versions.
|
|
32
|
+
*
|
|
15
33
|
* @module dsh-research-report/service
|
|
16
34
|
*/
|
|
17
35
|
|
package/README-es.md
DELETED
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
# 📑 dsh-research-report
|
|
4
|
-
- **Canal 1024 store**: `npm i -g dsh1024` una vez, luego `dsh1024 plugin --profile web add dsh-research-report` (cuenta para el ranking de instalaciones de [deepseek1024.com](https://deepseek1024.com)).
|
|
5
|
-
|
|
6
|
-
**Un motor de informes de investigación verificables para DeepSeek Harness.**
|
|
7
|
-
|
|
8
|
-
*Cada afirmación (claim) queda vinculada a instantáneas de evidencia inmutables, se verifica byte a byte y se sella en un informe versionado cuyo hash de manifiesto cualquiera puede recomputar.*
|
|
9
|
-
|
|
10
|
-
[](LICENSE)
|
|
11
|
-
[](https://gitee.com/perrylink/dsh-research-report)
|
|
12
|
-
[](https://github.com/topics/dsh-plugin)
|
|
13
|
-
[](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
|
|
14
|
-
[](https://dsh.market/)
|
|
15
|
-
[](#)
|
|
16
|
-
[](https://github.com/PerryLink/dsh-research-report/actions)
|
|
17
|
-
[](https://github.com/PerryLink/dsh-research-report/releases)
|
|
18
|
-
[](https://www.npmjs.com/package/dsh-research-report)
|
|
19
|
-
[](https://www.npmjs.com/package/dsh-research-report)
|
|
20
|
-
[](https://dshfind.com/es/plugins/PerryLink/dsh-research-report?ref=badge)
|
|
21
|
-
|
|
22
|
-
[English](README.md) · [简体中文](README-zh.md) · [Español](README-es.md) · [Português](README-pt.md) · [हिन्दी](README-hi.md)
|
|
23
|
-
|
|
24
|
-
```sh
|
|
25
|
-
dsh plugin --profile <name> add dsh-research-report
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
**📖 Base de conocimiento del ecosistema** — datos medidos, no marketing: [guía de desarrollo · datos de selección · criterios de mantenimiento](https://perrylink.github.io/dsh-plugin-guide/).
|
|
35
|
-
|
|
36
|
-
<!-- star-cta -->
|
|
37
|
-
## Install & uninstall
|
|
38
|
-
|
|
39
|
-
```sh
|
|
40
|
-
dsh plugin --profile demo add dsh-research-report # instalar
|
|
41
|
-
dsh plugin --profile demo remove dsh-research-report # desinstalar
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Verifica que la fila se monta: `dsh --profile demo --dump-config | grep dsh-research-report`.
|
|
45
|
-
|
|
46
|
-
## ⭐ 如果它帮到了你
|
|
47
|
-
|
|
48
|
-
Este plugin forma parte de la [familia de plugins DSH](https://github.com/PerryLink) (más de 40, todos Apache-2.0). Si te resulta útil, **dale una estrella**: no desbloquea nada, pero ayuda a que la siguiente persona lo encuentre antes.
|
|
49
|
-
|
|
50
|
-
*English:* part of a 95 plugin family for DeepSeek Harness. If it is useful, **a star helps the next person find it** — nothing is gated behind it.
|
|
51
|
-
|
|
52
|
-
## What is dsh-research-report?
|
|
53
|
-
|
|
54
|
-
Un motor de informes de investigación verificables para DeepSeek Harness.
|
|
55
|
-
|
|
56
|
-
Cada afirmación (claim) queda vinculada a instantáneas de evidencia inmutables, se verifica byte a byte y se sella en un informe versionado cuyo hash de manifiesto cualquiera puede recomputar.
|
|
57
|
-
|
|
58
|
-

|
|
59
|
-
|
|
60
|
-
*Resumen del flujo: pregunta → fuentes selladas → informe. Los ejemplos siguientes usan la superficie de comandos real.*
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
*La misma ejecución, animada.*
|
|
64
|
-
|
|
65
|
-
## Compatibility
|
|
66
|
-
|
|
67
|
-
- DeepSeek Harness `dsh-v0.2.1-alpha.1` (verificado el 2026-09-25). Línea npm dev/test `0.1.7-rc.2`; peers `>=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0`. La matriz compat fija las cuatro líneas peer declaradas. En esta línea el tercer parámetro de `Session.append` es un `SurfaceIntent` solo para tipos de superficie, así que los eventos `research-report/*` siguen sin registrarse en el log de sesión: los diarios del ledger son la fuente duradera y el espejo de auditoría se activa cuando el host conoce el vocabulario (el candado de regresión en `test/events-gate.spec.ts` lo fija).
|
|
68
|
-
0.1.5-alpha.1 (adaptado el 2026-09-09): el sobre de sesión conserva su campo ignorable solo para compatibilidad de lectura de logs almacenados - Session.append aún no puede estamparlo, por lo que el comportamiento de la puerta no cambia. Verificado el 2026-09-11 contra los tipos publicados 0.1.5-rc.2 (cadena completa de puertas local); el workflow compat fija ambas líneas peer declaradas.
|
|
69
|
-
- Node `^22.19.0 || >=24.0.0`, solo ESM (`"type": "module"`).
|
|
70
|
-
- Dependencias peer: `@deepseek-ai/cordis ^4.0.2`, `@deepseek-ai/schemastery ^3.18.2`, y `@deepseek-ai/dsh-session`, `@deepseek-ai/dsh-tools`, `@deepseek-ai/dsh-system-prompt`, `@deepseek-ai/dsh-web`, `@deepseek-ai/dsh-jobs` en `>=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0`.
|
|
71
|
-
- Hermanos opcionales (nunca obligatorios): proveedores de `ctx.web` para captura URL/recolección, `ctx.jobs` para ensamblado en segundo plano, `ctx.dataQuality` (dsh-data-quality) para verificación de citas sobre datasets.
|
|
72
|
-
|
|
73
|
-
## What you get
|
|
74
|
-
|
|
75
|
-
- **Libro de evidencia (evidence ledger)** — almacén de instantáneas direccionado por contenido (`<ledgerRoot>/objects/<sha256>` + diarios JSONL). El mismo contenido se guarda una sola vez; las instantáneas son inmutables; cada lectura recomputa el hash, de modo que la manipulación o el borrado se detectan en lugar de confiarse.
|
|
76
|
-
- **Vínculo claim ↔ evidencia** — los claims se registran con los ids de evidencia en que se apoyan; el libro conserva el vínculo y cada veredicto de verificación (gana el más reciente).
|
|
77
|
-
- **Verificación a nivel de byte** — cada número y cada fragmento entrecomillado de un claim debe poder localizarse literalmente en las instantáneas vinculadas. Sin evidencia vinculada, o sin literal comprobable, el claim se marca `unverified`; evidencia vinculada que no puede confirmar ni desmentir los literales citados lo marca `insufficient`; una etiqueta cuyo valor difiere en la instantánea (y el valor citado está ausente) lo marca `disproven`; instantáneas manipuladas o ausentes lo marcan `contradicted`. Sin semántica, sin embeddings — solo comprobaciones de bytes auditables.
|
|
78
|
-
- **Puente numérico opcional** — cuando un claim cita un dataset estructurado del workspace (CSV/JSON) y `dsh-data-quality` está montado, las citas se verifican con tolerancias mediante su contrato congelado `verifyCitations`; una discrepancia del dataset desmiente (disproves) el claim.
|
|
79
|
-
- **Evidencia DOI (sin red)** — los orígenes DOI se validan determinísticamente (estructura `10.xxxx/xxxx`, lista blanca de prefijos y juego de caracteres DOI); los DOI inválidos fallan ruidosamente. Se acepta metadato opcional de revista/año, y `requireJournalMetadata` solo restringe la evidencia DOI académica cuando está habilitado.
|
|
80
|
-
- **Informes sellados versionados** — `<reportRoot>/<slug(topic)>/<YYYYMMDD-HHmmss>/report.md` + `manifest.json` + `verification.jsonl` + `disconfirmation.jsonl`; el hash de sellado es el SHA-256 del manifiesto, que a su vez lleva el hash del informe, los hashes de toda la evidencia y el hash de cada diario de auditoría.
|
|
81
|
-
- **Reauditoría previa a la entrega e interceptación del sellado** — antes de sellar, cada claim vinculado se re-verifica sin conexión y se registra en `verification.jsonl`; el drift de veredicto, la evidencia vinculada manipulada/ausente, o un fallo de serialización del diario bloquean el sellado (falla ruidosamente, sin tunable).
|
|
82
|
-
- **Libro de falsificación** — cada claim contradicho o desmentido se registra en `disconfirmation.jsonl` (claim + referencias de evidencia + motivo) y se lista en el apéndice `registro de falsificación` del informe.
|
|
83
|
-
- **Conocimiento negativo** — un claim desmentido se recuerda por su hash de contenido (`disproofs.jsonl`); el mismo texto re-reportado contra evidencia sin cambios se fuerza de nuevo a `disproven` y solo se re-verifica cuando la evidencia cambia.
|
|
84
|
-
- **Bucle de verificación de solo lectura** — tras sellar, el respaldo determinista `verifySealedReport` (sin red, sin modelo) recomputa el sello y los hashes de auditoría y re-comprueba cada claim, escribiendo la sección de comprobación de máquina en `verifier-note.md`; con `ctx.jobs` montado también se lanza un trabajo de verificación de solo lectura (la revisión del modelo es una mejora, nunca un reemplazo).
|
|
85
|
-
- **Evidencia anclada a sesión** — `evidence_add` acepta un `sessionRef` opcional (`sessionId` + `eventRange`, validado ruidosamente); el ancla se guarda y se registra en el Apéndice B, el manifiesto y `verification.jsonl`. La evidencia anclada a sesión se verifica honestamente como `unverified` (`la evidencia anclada a la sesión requiere una verificación manual en el registro de la sesión`).
|
|
86
|
-
- **Brechas honestas** — los claims no verificados, insuficientes, contradichos o desmentidos conservan una marca visible `[未核实]` / `[证据不足]` / `[与证据矛盾]` / `[已证伪]` en el cuerpo del informe y se listan en el Apéndice A. Nada se aprueba en silencio.
|
|
87
|
-
- **Sin bucle de deep-research** — la orquestación de recuperación se reutiliza deliberadamente: `ctx.web` para buscar/descargar, `ctx.jobs` para trabajos largos. La planificación y la síntesis quedan en el modelo (o en un plugin upstream).
|
|
88
|
-
|
|
89
|
-
## Quick start
|
|
90
|
-
|
|
91
|
-
```sh
|
|
92
|
-
dsh plugin --profile web add github:PerryLink/dsh-research-report
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Canal git
|
|
96
|
-
|
|
97
|
-
```sh
|
|
98
|
-
# Desde un profile de pruebas (fija el commit; ejecuta el build `prepare` autocontenido)
|
|
99
|
-
dsh plugin --profile demo add "github:YOUR_ORG/dsh-research-report#<sha>"
|
|
100
|
-
# El primer add añade una entrada allowBuilds para dsh-research-report al pnpm-workspace.yaml del profile.
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Canal npm
|
|
104
|
-
|
|
105
|
-
```sh
|
|
106
|
-
dsh plugin --profile demo add dsh-research-report
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Ambos canales instalan la fila del bundle (ver `cordis.patch.yml`) en la pila `dsh.profile.bundles` del profile y surten efecto al reiniciar.
|
|
110
|
-
|
|
111
|
-
Luego, en una sesión:
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
evidence_add({ origin: "docs/market.md", title: "Market snapshot" }) # → ev-1a2b3c4d5e6f
|
|
115
|
-
research_report({ topic: "示例行业概览", sections: [...], claims: [...], evidenceRefs: ["ev-1a2b…"] })
|
|
116
|
-
ledger_query({ claimId: "c1" }) # vínculos + veredicto
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Ejemplos
|
|
120
|
-
|
|
121
|
-
Son los puntos de entrada reales; instala y llama a uno.
|
|
122
|
-
|
|
123
|
-
#### Ejemplo detallado
|
|
124
|
-
|
|
125
|
-
**Comando**
|
|
126
|
-
|
|
127
|
-
~~~sh
|
|
128
|
-
research_report({
|
|
129
|
-
topic: "示例行业概览",
|
|
130
|
-
sections: [{ heading: "市场规模", paragraphs: [{ text: "2025 年全球示例行业市场规模为 1,280 亿元。", claimIds: ["c1"] }] }],
|
|
131
|
-
claims: [{ id: "c1", text: "市场规模为 1,280 亿元", evidenceIds: ["ev-5dc0a84d0e48"] }],
|
|
132
|
-
evidenceRefs: ["ev-5dc0a84d0e48", "ev-c6cf024e0916", "ev-61f8f4533cb7"]
|
|
133
|
-
})
|
|
134
|
-
~~~
|
|
135
|
-
|
|
136
|
-
**Salida**
|
|
137
|
-
|
|
138
|
-
~~~text
|
|
139
|
-
report sealed: /tmp/rr-test-4U2mlF/reports/示例行业概览/20261019-124904
|
|
140
|
-
seal (sha256 of manifest.json): 5c85c97597096ced281ca191d7abaaf7434f18b397d35ac81c31aa364a3b12f9
|
|
141
|
-
claims: 1 verified / 0 unverified / 0 contradicted / 0 insufficient / 0 disproven (of 1); evidence bound: 3
|
|
142
|
-
~~~
|
|
143
|
-
|
|
144
|
-
*Observado en `README.md:112-118,150; test/index.spec.ts:166-177; src/tools/research-report.ts:170-175`*
|
|
145
|
-
|
|
146
|
-
#### Rama de fallo
|
|
147
|
-
|
|
148
|
-
**Entrada**
|
|
149
|
-
|
|
150
|
-
~~~text
|
|
151
|
-
{"topic":"probe","sections":[{"heading":"Growth","paragraphs":[{"text":"Growth was 42%.","claimIds":["c1"]}]}],"claims":[{"id":"c1","text":"Growth was 42%.","evidenceIds":[]}]}
|
|
152
|
-
~~~
|
|
153
|
-
|
|
154
|
-
**Salida**
|
|
155
|
-
|
|
156
|
-
~~~text
|
|
157
|
-
edge-case (no throw): isError=false; kind=sealed; verdicts[0]={"claimId":"c1","status":"unverified","note":"claim binds no evidence snapshot"}; counts={"verified":0,"unverified":1,"contradicted":0,"insufficient":0,"disproven":0}; evidenceCount=0; report.md marker=Growth was 42%. [未核实]
|
|
158
|
-
~~~
|
|
159
|
-
|
|
160
|
-
*Observado en `plugins/dsh-research-report/src/verify.ts:173-175 (unverified verdict); plugins/dsh-research-report/src/assemble.ts:209-220 (visible mark); plugins/dsh-research-report/README.md:87 (honest gaps); exercised through plugins/dsh-research-report/test/harness.ts`*
|
|
161
|
-
|
|
162
|
-
#### Ejemplos breves
|
|
163
|
-
|
|
164
|
-
- `research_report`
|
|
165
|
-
- `ledger_query`
|
|
166
|
-
|
|
167
|
-
## Configuration
|
|
168
|
-
|
|
169
|
-
Todos los ajustes son campos `Config` de Schemastery; los valores inválidos fallan ruidosamente al cargar el profile. Las raíces relativas se resuelven contra el directorio de trabajo del harness (el workspace).
|
|
170
|
-
|
|
171
|
-
| Key | Default | Description |
|
|
172
|
-
| --- | --- | --- |
|
|
173
|
-
| `enabled` | `true` | Interruptor maestro; `false` no monta nada. |
|
|
174
|
-
| `ledgerRoot` | `.research-ledger` | Directorio del libro de evidencia (objetos + diarios JSONL). |
|
|
175
|
-
| `reportRoot` | `research-reports` | Raíz de informes sellados (versionados por tema y timestamp). |
|
|
176
|
-
| `workspaceRoot` | *(directorio de trabajo de la sesión del host)* | Raíz para la evidencia por ruta; por defecto el directorio de la sesión y luego el cwd del harness. |
|
|
177
|
-
| `maxEvidenceBytes` | `2097152` | Tope duro de bytes UTF-8 por instantánea de evidencia. |
|
|
178
|
-
| `maxEvidencePerReport` | `200` | Tope duro de evidencias vinculadas a un informe. |
|
|
179
|
-
| `fetchTimeoutMs` | `20000` | Plazo (ms) de cada `ctx.web` fetch durante la captura. |
|
|
180
|
-
| `requireJournalMetadata` | `false` | Cuando es `true`, la evidencia de tipo DOI debe traer nombre de revista y año de publicación al registrarse (falla ruidosamente en caso contrario). |
|
|
181
|
-
|
|
182
|
-
## Tools & surfaces
|
|
183
|
-
|
|
184
|
-
- **`evidence_add({ origin, content?, title? })`** — registra una instantánea de evidencia. Con `content` el texto se guarda literal; sin él, un origen URL se descarga vía `ctx.web` y una ruta relativa del workspace se lee de disco (las lecturas nunca escapan del workspace). Devuelve el id de evidencia y su hash SHA-256.
|
|
185
|
-
- **`research_report({ topic, title?, sections, claims, evidenceRefs, gather?, depth?, background? })`** — ensambla y sella un informe: valida (las referencias a claims no registrados se rechazan ruidosamente), verifica cada claim, renderiza `report.md` con marcas visibles, escribe `manifest.json` y devuelve el hash de sellado. `gather: true` ejecuta UNA ronda de búsqueda sobre `ctx.web` y devuelve evidencia candidata capturada más una lista explícita de brechas — nunca ensambla automáticamente. `background: true` devuelve `{ kind: 'background', jobId }` sobre `ctx.jobs`.
|
|
186
|
-
- **`ledger_query({ claimId? | evidenceId? })`** — consultas de solo lectura de vínculos/veredictos; la evidencia se re-hashea al leer, así que una instantánea manipulada o ausente se reporta explícitamente. Sin id, devuelve un resumen del libro.
|
|
187
|
-
- **`ctx.researchReport.assemble(request)`** — la superficie de servicio congelada para plugins hermanos (ver `src/service.ts`; protegida byte a byte por `scripts/verify-frozen-contract.mjs`).
|
|
188
|
-
|
|
189
|
-
## Permissions & data
|
|
190
|
-
|
|
191
|
-
`dsh-research-report` consume solo seams públicos: `ctx.tools`, `ctx.systemPrompt`, y opcionalmente `ctx.web` / `ctx.jobs` / `ctx.dataQuality` (consultados en el momento de la llamada, nunca inyectados). Solo escribe dentro de las raíces de libro e informes configuradas (ambas por defecto son directorios locales del workspace), lee archivos del workspace solo dentro del workspace, y sale a la red exclusivamente por el seam web del harness — nunca un `fetch` directo. Las instantáneas de evidencia son inmutables y direccionadas por contenido; los registros de claims son inmutables; los veredictos son solo de anexado.
|
|
192
|
-
|
|
193
|
-
## Security boundaries
|
|
194
|
-
|
|
195
|
-
- **Evidencia de manipulación por construcción** — cada lectura de instantánea recomputa el SHA-256 contra el índice; una discrepancia verifica los claims vinculados como `contradicted` y `ledger_query` reporta `integrity: tampered`/`missing`.
|
|
196
|
-
- **Confinamiento al workspace** — las lecturas locales de evidencia se resuelven contra la raíz del workspace y rechazan escapes (ambos lados pasan por `path.resolve` antes de comparar).
|
|
197
|
-
- **Configuración que falla ruidosamente** — los límites inválidos lanzan al montar; las referencias a claims no registrados, ids de evidencia desconocidos y conflictos id/contenido lanzan al ensamblar.
|
|
198
|
-
- **Sin manejo de credenciales, sin red oculta** — la captura de URLs pasa por `ctx.web` (la selección de proveedor, la taxonomía de errores y cualquier política SSRF quedan en los proveedores web del despliegue).
|
|
199
|
-
- **Registros reversibles** — cada contribución pasa por `ctx.effect()` / `register()`, así que desinstalar y recargar en caliente son limpios.
|
|
200
|
-
|
|
201
|
-
## Known limitations
|
|
202
|
-
|
|
203
|
-
- **A nivel de byte, no semántico** — la comprobación incorporada localiza literales numéricos/entrecomillados verbatim; los claims parafraseados sin literal comprobable quedan `unverified`, y un claim verdadero cuyo número está ausente mientras su etiqueta aparece con otro valor queda `contradicted`. Es una decisión deliberada de v1 (auditable antes que listo).
|
|
204
|
-
- **Eventos de sesión adaptativos** — el plugin declara los eventos de sesión tipados `research-report/evidence`, `research-report/verify` y `research-report/seal`, pero el `Session.append` de 0.1.5-alpha.1 sigue sin opción `ignorable` ni superficie de registro de eventos para plugins, así que los appends se activan solo cuando el build del host conoce los tipos (si no, la capa de persistencia rechazaría el log al restaurar). Los diarios del libro son siempre la fuente durable de verdad.
|
|
205
|
-
- **Los profiles por defecto no montan proveedor de fetch** — el `dsh-base` distribuido monta solo búsqueda, así que la captura de URLs falla ruidosamente (`WEB_UNAVAILABLE`/`WEB_PROVIDER_UNAVAILABLE`) hasta configurar un proveedor de fetch; el `gather` basado en búsqueda lista las fuentes no capturadas en la lista de brechas.
|
|
206
|
-
- **Ámbito de un solo workspace** — las raíces de libro e informes se resuelven contra el directorio de trabajo del harness al montar; los despliegues multi-workspace deben configurar raíces absolutas por profile.
|
|
207
|
-
|
|
208
|
-
## Verifier CLI
|
|
209
|
-
|
|
210
|
-
El binario independiente `dsh-research-verify` (empaquetado como `lib/cli.js`, sin imports de `@deepseek-ai`) audita cualquier directorio de informe sellado sin montar el plugin:
|
|
211
|
-
|
|
212
|
-
```sh
|
|
213
|
-
dsh-research-verify --report <dir> [--seal <sha256>] [--ledger <dir>] [--format json|sarif]
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
- `--report <dir>` — directorio sellado (`manifest.json` + `report.md` + diarios de auditoría).
|
|
217
|
-
- `--seal <sha256>` — hash de sello esperado para comparar con el hash del manifest recalculado; omitido = solo se informa el valor, sin comparar.
|
|
218
|
-
- `--ledger <dir>` — raíz del libro de evidencias (`objects/<sha256>` + `index.jsonl`) para re-verificar claims a nivel de bytes; omitido = los re-checks de claims se omiten honestamente.
|
|
219
|
-
- `--format` — `json` (por defecto) o `sarif` (SARIF 2.1.0).
|
|
220
|
-
|
|
221
|
-
Recalcula el hash de sello, el hash de `report.md` y los hashes de los diarios, re-ejecuta la verificación byte-level + integridad por claim, y sale con código no nulo si alguna comprobación falla. `verifySealedReport` / `buildVerificationReport` / `renderSarif` / `renderVerificationJson` se exportan del paquete para uso como librería.
|
|
222
|
-
|
|
223
|
-
## Development
|
|
224
|
-
|
|
225
|
-
```sh
|
|
226
|
-
pnpm install
|
|
227
|
-
pnpm run typecheck && pnpm run typecheck:ci
|
|
228
|
-
pnpm test
|
|
229
|
-
pnpm run build
|
|
230
|
-
pnpm run verify:self-contained && pnpm run verify:artifacts
|
|
231
|
-
node scripts/check-readme-sync.mjs
|
|
232
|
-
node scripts/verify-frozen-contract.mjs
|
|
233
|
-
pnpm pack
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
- `typecheck` resuelve `@deepseek-ai/*` a través de los peers 0.1.7-rc.2 instalados; `typecheck:ci` desactiva `skipLibCheck` y activa `verbatimModuleSyntax` contra los tipos publicados. Ambos deben permanecer verdes.
|
|
237
|
-
- Las pruebas usan los `Context`/`Session`/`ToolRuntime`/`LocalJobRegistry`/`WebRuntime` reales de los peers 0.1.7-rc.2; solo los backends de red son proveedores scriptados registrados a través de los registros reales de `ctx.web`.
|
|
238
|
-
- Release: `node scripts/release.mjs <x.y.z>` (sube versión, sella CHANGELOG, re-ejecuta la puerta, commitea + etiqueta; nunca hace push).
|
|
239
|
-
|
|
240
|
-
## Topics
|
|
241
|
-
|
|
242
|
-
`dsh`, `dsh-plugin`, `deepseek-harness`, `cordis`, `research`, `evidence-ledger`, `verifiable-report`, `audit`, `citation-verification`
|
|
243
|
-
|
|
244
|
-
## Contributors
|
|
245
|
-
|
|
246
|
-
- [PerryLink](https://github.com/PerryLink) — autor original y mantenedor: arquitectura del plugin, ledger de evidencias, verificación a nivel de byte, informes sellados, documentación en cinco idiomas y automatización de CI/publicación.
|
|
247
|
-
|
|
248
|
-
## PerryLink DSH Plugin Family
|
|
249
|
-
|
|
250
|
-
Este proyecto forma parte de la familia de plugins de DeepSeek Harness de [PerryLink](https://github.com/PerryLink). El registro permanece plegado abajo para que cada README conserve una primera pantalla corta; expándelo para ver cada fila y su estado.
|
|
251
|
-
|
|
252
|
-
<details>
|
|
253
|
-
<summary>Expandir todos los plugins</summary>
|
|
254
|
-
|
|
255
|
-
| Plugin | Estado |
|
|
256
|
-
|---|---|
|
|
257
|
-
| **[dsh-aqua-input-check](https://github.com/PerryLink/dsh-aqua-input-check)** | |
|
|
258
|
-
| **[dsh-archive-check](https://github.com/PerryLink/dsh-archive-check)** | |
|
|
259
|
-
| **[dsh-auto-review](https://github.com/PerryLink/dsh-auto-review)** | |
|
|
260
|
-
| **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | |
|
|
261
|
-
| **[dsh-bid-ca-precheck](https://github.com/PerryLink/dsh-bid-ca-precheck)** | |
|
|
262
|
-
| **[dsh-bid-qual-check](https://github.com/PerryLink/dsh-bid-qual-check)** | |
|
|
263
|
-
| **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | |
|
|
264
|
-
| **[dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind)** | |
|
|
265
|
-
| **[dsh-click](https://github.com/PerryLink/dsh-click)** | |
|
|
266
|
-
| **[dsh-composer-history](https://github.com/PerryLink/dsh-composer-history)** | |
|
|
267
|
-
| **[dsh-contract-stance](https://github.com/PerryLink/dsh-contract-stance)** | |
|
|
268
|
-
| **[dsh-customs-doc-check](https://github.com/PerryLink/dsh-customs-doc-check)** | |
|
|
269
|
-
| **[dsh-data-quality](https://github.com/PerryLink/dsh-data-quality)** | |
|
|
270
|
-
| **[dsh-demurrage-ledger](https://github.com/PerryLink/dsh-demurrage-ledger)** | |
|
|
271
|
-
| **[dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck)** | |
|
|
272
|
-
| **[dsh-drill-script-check](https://github.com/PerryLink/dsh-drill-script-check)** | |
|
|
273
|
-
| **[dsh-eia-guide-check](https://github.com/PerryLink/dsh-eia-guide-check)** | |
|
|
274
|
-
| **[dsh-emergency-plan](https://github.com/PerryLink/dsh-emergency-plan)** | |
|
|
275
|
-
| **[dsh-essay-rubric-check](https://github.com/PerryLink/dsh-essay-rubric-check)** | |
|
|
276
|
-
| **[dsh-evidence-check](https://github.com/PerryLink/dsh-evidence-check)** | |
|
|
277
|
-
| **[dsh-export-ctl-check](https://github.com/PerryLink/dsh-export-ctl-check)** | |
|
|
278
|
-
| **[dsh-fast](https://github.com/PerryLink/dsh-fast)** | |
|
|
279
|
-
| **[dsh-fmea-table-check](https://github.com/PerryLink/dsh-fmea-table-check)** | |
|
|
280
|
-
| **[dsh-forecast-penalty](https://github.com/PerryLink/dsh-forecast-penalty)** | |
|
|
281
|
-
| **[dsh-fund-research](https://github.com/PerryLink/dsh-fund-research)** | |
|
|
282
|
-
| **[dsh-github](https://github.com/PerryLink/dsh-github)** | |
|
|
283
|
-
| **[dsh-gongwen-flow-check](https://github.com/PerryLink/dsh-gongwen-flow-check)** | |
|
|
284
|
-
| **[dsh-gongwen-word-check](https://github.com/PerryLink/dsh-gongwen-word-check)** | |
|
|
285
|
-
| **[dsh-guard-plan-qc](https://github.com/PerryLink/dsh-guard-plan-qc)** | |
|
|
286
|
-
| **[dsh-hazchem-check](https://github.com/PerryLink/dsh-hazchem-check)** | |
|
|
287
|
-
| **[dsh-hazplan-check](https://github.com/PerryLink/dsh-hazplan-check)** | |
|
|
288
|
-
| **[dsh-hidden-risk-map](https://github.com/PerryLink/dsh-hidden-risk-map)** | |
|
|
289
|
-
| **[dsh-hs-classify](https://github.com/PerryLink/dsh-hs-classify)** | |
|
|
290
|
-
| **[dsh-icd-rule-check](https://github.com/PerryLink/dsh-icd-rule-check)** | |
|
|
291
|
-
| **[dsh-industry-research](https://github.com/PerryLink/dsh-industry-research)** | |
|
|
292
|
-
| **[dsh-lawcite-adapter](https://github.com/PerryLink/dsh-lawcite-adapter)** | |
|
|
293
|
-
| **[dsh-laya](https://github.com/PerryLink/dsh-laya)** | |
|
|
294
|
-
| **[dsh-lc-doc-check](https://github.com/PerryLink/dsh-lc-doc-check)** | |
|
|
295
|
-
| **[dsh-learning-gap-check](https://github.com/PerryLink/dsh-learning-gap-check)** | |
|
|
296
|
-
| **[dsh-library](https://github.com/PerryLink/dsh-library)** | |
|
|
297
|
-
| **[dsh-local-ai](https://github.com/PerryLink/dsh-local-ai)** | |
|
|
298
|
-
| **[dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions)** | |
|
|
299
|
-
| **[dsh-mask](https://github.com/PerryLink/dsh-mask)** | |
|
|
300
|
-
| **[dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel)** | |
|
|
301
|
-
| **[dsh-medrec-qc](https://github.com/PerryLink/dsh-medrec-qc)** | |
|
|
302
|
-
| **[dsh-memento](https://github.com/PerryLink/dsh-memento)** | |
|
|
303
|
-
| **[dsh-nsfc-form-check](https://github.com/PerryLink/dsh-nsfc-form-check)** | |
|
|
304
|
-
| **[dsh-nurse-record-check](https://github.com/PerryLink/dsh-nurse-record-check)** | |
|
|
305
|
-
| **[dsh-observe](https://github.com/PerryLink/dsh-observe)** | |
|
|
306
|
-
| **[dsh-origin-rvc-check](https://github.com/PerryLink/dsh-origin-rvc-check)** | |
|
|
307
|
-
| **[dsh-ota-review-check](https://github.com/PerryLink/dsh-ota-review-check)** | |
|
|
308
|
-
| **[dsh-output-styles](https://github.com/PerryLink/dsh-output-styles)** | |
|
|
309
|
-
| **[dsh-paper-doc-adapter](https://github.com/PerryLink/dsh-paper-doc-adapter)** | |
|
|
310
|
-
| **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | |
|
|
311
|
-
| **[dsh-permit-report-check](https://github.com/PerryLink/dsh-permit-report-check)** | |
|
|
312
|
-
| **[dsh-pipeline-check](https://github.com/PerryLink/dsh-pipeline-check)** | |
|
|
313
|
-
| **[dsh-pleading-draft](https://github.com/PerryLink/dsh-pleading-draft)** | |
|
|
314
|
-
| **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | |
|
|
315
|
-
| **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | |
|
|
316
|
-
| **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | |
|
|
317
|
-
| **[dsh-plugin-upgrade](https://github.com/PerryLink/dsh-plugin-upgrade)** | |
|
|
318
|
-
| **[dsh-policy-brief-draft](https://github.com/PerryLink/dsh-policy-brief-draft)** | |
|
|
319
|
-
| **[dsh-power-loss-split](https://github.com/PerryLink/dsh-power-loss-split)** | |
|
|
320
|
-
| **[dsh-power-ticket-check](https://github.com/PerryLink/dsh-power-ticket-check)** | |
|
|
321
|
-
| **[dsh-ppap-check](https://github.com/PerryLink/dsh-ppap-check)** | |
|
|
322
|
-
| **[dsh-protest-deadline](https://github.com/PerryLink/dsh-protest-deadline)** | |
|
|
323
|
-
| **[dsh-railway-window](https://github.com/PerryLink/dsh-railway-window)** | |
|
|
324
|
-
| **[dsh-repair-order-qc](https://github.com/PerryLink/dsh-repair-order-qc)** | |
|
|
325
|
-
| **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | |
|
|
326
|
-
| **[dsh-review-reply-check](https://github.com/PerryLink/dsh-review-reply-check)** | |
|
|
327
|
-
| **[dsh-rulefile-check](https://github.com/PerryLink/dsh-rulefile-check)** | |
|
|
328
|
-
| **[dsh-safety-brief-check](https://github.com/PerryLink/dsh-safety-brief-check)** | |
|
|
329
|
-
| **[dsh-score](https://github.com/PerryLink/dsh-score)** | |
|
|
330
|
-
| **[dsh-session-sync](https://github.com/PerryLink/dsh-session-sync)** | |
|
|
331
|
-
| **[dsh-site-log-check](https://github.com/PerryLink/dsh-site-log-check)** | |
|
|
332
|
-
| **[dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security)** | |
|
|
333
|
-
| **[dsh-soe-decision-check](https://github.com/PerryLink/dsh-soe-decision-check)** | |
|
|
334
|
-
| **[dsh-soilwater-check](https://github.com/PerryLink/dsh-soilwater-check)** | |
|
|
335
|
-
| **[dsh-sop-sync-check](https://github.com/PerryLink/dsh-sop-sync-check)** | |
|
|
336
|
-
| **[dsh-spc-gbt-adapter](https://github.com/PerryLink/dsh-spc-gbt-adapter)** | |
|
|
337
|
-
| **[dsh-talk](https://github.com/PerryLink/dsh-talk)** | |
|
|
338
|
-
| **[dsh-tender-extract](https://github.com/PerryLink/dsh-tender-extract)** | |
|
|
339
|
-
| **[dsh-tender-matrix](https://github.com/PerryLink/dsh-tender-matrix)** | |
|
|
340
|
-
| **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | |
|
|
341
|
-
| **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | |
|
|
342
|
-
| **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | |
|
|
343
|
-
| **[dsh-warranty-calc](https://github.com/PerryLink/dsh-warranty-calc)** | |
|
|
344
|
-
| **[dsh-budget](https://github.com/PerryLink/dsh-budget)** | 🧊 CONGELADO — ver el README del repositorio |
|
|
345
|
-
| **[dsh-claude-move](https://github.com/PerryLink/dsh-claude-move)** | 🧊 CONGELADO — ver el README del repositorio |
|
|
346
|
-
| **[dsh-defend](https://github.com/PerryLink/dsh-defend)** | 🧊 CONGELADO — ver el README del repositorio |
|
|
347
|
-
| **[dsh-draw](https://github.com/PerryLink/dsh-draw)** | 🧊 CONGELADO — ver el README del repositorio |
|
|
348
|
-
| **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | 🧊 CONGELADO — ver el README del repositorio |
|
|
349
|
-
| **[dsh-background-agents](https://github.com/PerryLink/dsh-background-agents)** | 🚫 RETIRADO — ver el README del repositorio |
|
|
350
|
-
| **[dsh-session-pin](https://github.com/PerryLink/dsh-session-pin)** | 🚫 RETIRADO — ver el README del repositorio |
|
|
351
|
-
| **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | 🚫 RETIRADO — ver el README del repositorio |
|
|
352
|
-
|
|
353
|
-
</details>
|
|
354
|
-
|
|
355
|
-
## License
|
|
356
|
-
|
|
357
|
-
Apache-2.0 — ver [LICENSE](LICENSE).
|
|
358
|
-
|
|
359
|
-
### Instalar desde el mercado de DSH Desktop
|
|
360
|
-
|
|
361
|
-
Todos los plugins de PerryLink pueden explorarse en el mercado integrado de DSH Desktop: **Market → Sources → add source → pegar** `https://perrylink-dsh-catalog.perrylink.workers.dev/catalog-source.json` **→ seleccionarlo**. La instalación sigue pasando por la verificación de identidad npm del mercado y tu confirmación.
|