dsh-paper-search 0.1.0 → 0.1.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/CHANGELOG.md CHANGED
@@ -4,13 +4,50 @@
4
4
 
5
5
  | dsh-paper-search | DeepSeek Harness | Diuji pada |
6
6
  |---|---|---|
7
- | 0.1.0 | 0.1.7-rc.2 | 28 Sep 2026, Windows, Node 24 |
7
+ | 0.1.1 | 0.1.7-rc.2 | 28 Sep 2026, Windows, Node 24 |
8
+ | ~~0.1.0~~ | — | **JANGAN DIPAKAI — plugin gagal dimuat, lihat 0.1.1** |
8
9
 
9
10
  Paket ini tidak memakai API internal DSH selain `ctx.tools.register` dan
10
11
  `ctx.get('skills').registerProvider` — keduanya sudah dipakai plugin lain yang
11
12
  berjalan di profil ini (`dsh-search-cascade`), jadi titik patahnya sama dan sudah
12
13
  diketahui.
13
14
 
15
+ ## [0.1.1] - 2026-09-28
16
+
17
+ ### Fixed
18
+
19
+ - **Plugin gagal dimuat sama sekali — perbaikan yang wajib.** DSH mewajibkan
20
+ setiap tool mendeklarasikan `output: { schema, render }`. Versi 0.1.0 tidak
21
+ punya itu, sehingga `ctx.tools.register` **melempar**:
22
+
23
+ ```
24
+ TypeError: tool "paper_search" must declare output { schema, render, presentationMeta? }
25
+ ```
26
+
27
+ Karena lemparan itu terjadi di dalam `apply()`, **seluruh plugin batal
28
+ dimuat** — kedua tool **dan** skill-nya tidak pernah terdaftar. Pengguna 0.1.0
29
+ tidak akan melihat `paper_search` sama sekali.
30
+
31
+ Ditemukan lewat **uji boot DSH sungguhan**, bukan lewat uji `ctx` tiruan:
32
+ `register` tiruan hanya menampung definisinya, jadi tidak pernah menegakkan
33
+ syarat ini. Inilah bukti bahwa tiruan tidak bisa menggantikan harness nyata.
34
+
35
+ **Kalau Anda memasang 0.1.0, naikkan ke 0.1.1.**
36
+
37
+ ### Added
38
+
39
+ - `test/uji-di-dsh.mjs` — **uji boot DSH sungguhan.** Menyalin profil `headless`
40
+ ke profil uji (profil `desktop` yang hidup **tidak disentuh**), menyisipkan
41
+ plugin ini plus satu **plugin saksi**, menjalankan DSH nyata, lalu memeriksa
42
+ dari DALAM bahwa: kedua tool terdaftar, provider skill terdaftar, skill
43
+ muncul di katalog, dan `paper_search` benar-benar dipanggil sampai
44
+ mengembalikan paper sungguhan. **22 asersi, 0 gagal.**
45
+
46
+ Uji ini juga mencatat dua jebakan yang sudah terukur, supaya tidak diulang:
47
+ tanpa `inject` service tidak terlihat dari plugin lain, dan pada detik ke-4
48
+ harness sudah membongkar pluginnya sehingga pemeriksaan **harus** berjalan di
49
+ dalam `apply()`.
50
+
14
51
  ## [0.1.0] - 2026-09-28
15
52
 
16
53
  Rilis pertama.
package/README.md CHANGED
@@ -97,6 +97,33 @@ For Indonesian topics, **use Indonesian keywords**: `"pendidikan karakter"`
97
97
  returns real Indonesian journals, while the English equivalent returns
98
98
  international results that do not match the intent.
99
99
 
100
+ ## Verification status
101
+
102
+ Stated precisely, because "tested" on its own is not a useful claim:
103
+
104
+ **Verified — the connectors, against live APIs and pages.** `node test/uji-sumber.mjs`
105
+ runs all sixteen against the real services: 8/8 assertions. On the last run 15 of
106
+ 16 answered. The one that did not was PubMed Central returning a transient
107
+ `HTTP 500 error forwarding request` — and it was reported as a failure, which is
108
+ the behaviour this package exists to provide.
109
+
110
+ **Verified — the wiring, against a mock Cordis context.** `node test/uji-plugin.mjs`,
111
+ 29/29 assertions: both tools register, the skill provider reports rank 450,
112
+ the frontmatter parses within the 500-character catalogue limit, and both tools
113
+ reach the network end to end.
114
+
115
+ **Verified — loading the bundle inside a live harness.** `node test/uji-di-dsh.mjs`
116
+ copies the `headless` profile to a throwaway test profile, inserts this plugin
117
+ plus a witness plugin, boots a real DSH, and checks **from inside** that both
118
+ tools are registered, the skill provider is registered, the skill appears in the
119
+ catalogue, and `paper_search` is actually called and returns real papers.
120
+ **22 assertions, 0 failures.**
121
+
122
+ That last test earned its place: it caught a fatal bug the mock never could.
123
+ DSH requires every tool to declare `output: { schema, render }`, and 0.1.0 did
124
+ not — so registration threw, and because the throw happened inside `apply()`,
125
+ the whole plugin failed to load. **0.1.0 is unusable; use 0.1.1.**
126
+
100
127
  ## What makes the reporting honest
101
128
 
102
129
  Every result separates **sources that failed** from sources that answered:
package/lib/index.js CHANGED
@@ -188,6 +188,31 @@ function formatHasil(hasil) {
188
188
 
189
189
  // ── Tool ─────────────────────────────────────────────────────────────────────
190
190
 
191
+ /**
192
+ * Bentuk `output` yang DIWAJIBKAN DSH untuk setiap tool.
193
+ *
194
+ * Ditemukan lewat uji boot sungguhan (`test/uji-di-dsh.mjs`) — dan ini bug yang
195
+ * lolos dari `ctx` tiruan, karena `register` tiruan hanya menampung definisinya.
196
+ * DSH melempar:
197
+ *
198
+ * TypeError: tool "paper_search" must declare output { schema, render,
199
+ * presentationMeta? }
200
+ *
201
+ * Karena lemparan itu terjadi di dalam `apply()`, SELURUH plugin gagal dimuat —
202
+ * tool maupun skill-nya sama sekali tidak terdaftar.
203
+ *
204
+ * Kedua tool di sini mengembalikan TEKS yang sudah diformat, jadi `schema`
205
+ * menyatakan string dan `render` membungkusnya menjadi blok konten — bentuk
206
+ * yang sama dengan `txt()` milik `dsh-search-cascade`
207
+ * (`[{ type: 'text', text: '...' }]`).
208
+ */
209
+ function keluaranTeks(deskripsi) {
210
+ return {
211
+ schema: { type: 'string', description: deskripsi },
212
+ render: (_args, value) => [{ type: 'text', text: String(value ?? '') }],
213
+ };
214
+ }
215
+
191
216
  function toolSearch(kredensial) {
192
217
  return {
193
218
  name: 'paper_search',
@@ -207,6 +232,7 @@ function toolSearch(kredensial) {
207
232
  },
208
233
  required: ['query'],
209
234
  },
235
+ output: keluaranTeks('Laporan teks: query, jumlah sumber yang menjawab, jumlah paper setelah dedup, baris status per sumber (OK/GAGAL), lalu daftar paper.'),
210
236
  execute: async (args) => {
211
237
  const hasil = await jalankanPencarian(args ?? {}, kredensial);
212
238
  return formatHasil(hasil);
@@ -229,6 +255,7 @@ function toolStatus(kredensial) {
229
255
  },
230
256
  required: [],
231
257
  },
258
+ output: keluaranTeks('Laporan teks: daftar kredensial yang terbaca beserta asalnya, baris status tiap sumber (OK/GAGAL beserta waktu respons), dan catatan tambahan.'),
232
259
  execute: async (args) => {
233
260
  const probe = args?.probe !== false;
234
261
  const barisPilihan = pilihSumber(args?.sources);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-paper-search",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Literature search for DeepSeek Harness: thirteen international sources (Crossref, OpenAlex, DOAJ, Europe PMC, PubMed, PubMed Central, arXiv, Semantic Scholar, CORE, Zenodo, HAL, IACR ePrint, Unpaywall) and three Indonesian journal portals (Garuda, Sinta, IOS OneSearch), all native HTTP with no external CLI required, plus a status tool that reports which sources answer and which credentials are configured.",
5
5
  "license": "MIT",
6
6
  "type": "module",