メインコンテンツへスキップ
P

dsh-lit-watch

perrylink/dsh-lit-watch

DeepSeek Harness向け文献ウォッチ。名前付きCrossref書誌検索を期間とともに保存し、上限付きクライアントで実行します。既出DOIを保存し、再実行時は新規項目のみをMarkdownダイジェストとSARIFで出力します。検索期間内の新しいDOIを報告するもので、関連性や質は評価しません。

インストール

dsh plugin --profile web add github:perrylink/dsh-lit-watch

README

dsh-lit-watch: three runs over the same saved Crossref watch — run 1 returns 2 new DOIs, run 2 returns 0 after the seen store, run 3 returns 1 — with the advanced time window on the right and the Markdown digest plus SARIF below

dsh-lit-watch

当前版本 0.1.4。

What is new in this search since last time — and only that.

Saved Crossref bibliographic queries with time windows, a seen-DOI store so repeated runs return genuinely new items, and a Markdown digest + SARIF.

简体中文 · Español · Português · हिन्दी

License Node


What it does

  • lit_watch_add — save a named watch: a Crossref query.bibliographic string, optional extra filters (type:journal-article), a fixed since date and a row count.
  • lit_watch_run — query Crossref, keep only DOIs not in the local seen store, record the exact URL, advance the time window, and append to runs.jsonl. A network failure is reported per watch and does not advance that watch.
  • lit_watch_report — Markdown digest (one table per watch) + SARIF 2.1.0 notes for new items.
dsh-lit-watch structure: a saved Crossref query plus a since window becomes one api.crossref.org/works URL, new DOIs are diffed against the local seen store, the run is appended to runs.jsonl with the exact URL, and a Markdown digest plus SARIF are rendered; a failed run is reported per watch and does not advance the window

Structure: query → diff → record; runs[] and the digest + SARIF are the two outputs, and the seen store is what makes a repeat run return only genuinely new items. The token labels inside the diagram are the real tool and field names, so the same picture serves all five languages.

Verified provider capability

GET /works?query.bibliographic=…&filter=from-pub-date:…&rows=…&select=… was verified live on 2026-11-08 (HTTP 200, total-results and items parsed). The plugin uses exactly this form; the URL is stored with every run so a digest can be reproduced.

What it does not do

  • No relevance judgement. A watch is a date window × query; new ≠ important, and Crossref coverage/lag applies.
  • No full text, no abstracts, no citation counts. Only the fields requested in select.
  • No email/webhook alerts. Runs are caller-driven (host scheduler or user).
  • No non-Crossref sources. PubMed/arXiv/CNKI watches are out of scope.
  • No REP evidence. State is local JSON (watches.json, seen.json, runs.jsonl), not a REP record; this is stated instead of implied.

Time windows

  • First run of a watch: no from-pub-date unless the watch has since.
  • Later runs: since = last successful run date − 1 day (overlap), so a publication indexed late is not missed; the seen store removes the overlap duplicates.
  • A failed run leaves lastRunAt untouched, so the next run re-covers the interval instead of skipping it.

Tools

lit_watch_add

{ name, query, filter?, since?, rows?, replace? } → { ok, watch }.

lit_watch_run

{ name?, fresh? } → { ok, runs, totalNew, warnings }.

lit_watch_report

{ runs? } (default: last 50 from history) → { ok, markdown, sarif }.

Error codes

Tool failures: INVALID_INPUT · WATCH_UNKNOWN · WATCH_EXISTS · LIMIT · STORE_ERROR.

Per-watch run errors (inside runs[].error): blocked_host · invalid_url · too_many_redirects · timeout · http_error · invalid_response · network_error.

Compatibility & install

DeepSeek Harnessdsh-v0.2.3-alpha.1 (verified 2026-11-22); peer >=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0
Node^22.19.0 || >=24.9.0 (tested 24.22.1), ESM only
Peers@perrylink/dsh-research-core ^0.1.0, @deepseek-ai/cordis ^4.0.5-alpha.1, @deepseek-ai/dsh-tools, @deepseek-ai/schemastery ^3.18.5-alpha.1
Runtime dependencieszero
dsh plugin --profile <name> add @perrylink/dsh-research-core dsh-lit-watch
dsh --profile <name> --dump-config | grep dsh-lit-watch

Family-wide peer note: @perrylink/dsh-research-core is declared as a peer for a single, uniform install contract across the research family, even though this package does not import it at runtime.

Configuration

KeyDefaultMeaning
enabledtruefalse mounts nothing
root.lit-watchwatches, seen store, run history, cache
userAgent / mailtodsh-lit-watch/0.1.0 … / —Crossref polite pool
timeoutMs / minIntervalMs15000 / 150request bounds
retries / maxRedirects1 / 3bounded retry/redirect
cacheTtlMs216000006 h response cache (fresh bypasses)
maxResults / maxWatches100 / 50row cap and watch cap

Security boundaries

  • HTTPS only, exact-host allowlist (api.crossref.org), manual redirects re-validated hop by hop.
  • No credentials in URLs, no custom ports; no user data beyond the query text is sent.
  • Non-2xx statuses and non-JSON bodies fail the watch instead of being treated as an empty result; the response cache is keyed by a SHA-256 of the exact URL.
  • Watch files are local JSON; writes only under root.

Evaluation

dsh-lit-watch: a real run of the repository gates — the TypeScript build, the 5-file test suite and the package-surface check, all offline

Animated: real stdout of the repository's own pnpm run build → pnpm test → pnpm run verify:package (offline fixtures, no network; re-run 2026-11-21). The suite passes 31 tests across 5 files.

31 tests: URL construction (query, combined filter, mailto), date/name validation including impossible calendar days, item parsing (DOI/title required, year/venue/authors) and malformed-response rejection, case-insensitive diff, runtime dedupe across three runs (2 → 0 → 1 new) with window advancement, exact-URL cache hits, fresh bypass and refusing to cache a malformed body, local network-failure isolation with no window advance, watch replace/unknown/limits, corrupt-store refusal, digest + history, HTTP bounds (allowlist, per-hop redirect re-validation, redirect cap, non-2xx rejection, 429 retry, timeout, throttle), tool schemas, add→run→report end to end, failure branches, plugin contract, package contract.

No benchmark is claimed: the value is diff correctness against a fixed seen store, which the tests pin down; there is no labelled relevance corpus.

Known limitations (v0.1)

  • query.bibliographic ranking is Crossref's; a watch can miss relevant items that rank below rows.
  • No ORCID/affiliation filters beyond raw Crossref filter pass-through.
  • No dedupe by title (DOI-less records are skipped by design).
  • The seen store grows with every new DOI; no automatic pruning in v0.1.

License

Apache-2.0. No third-party runtime code.

関連プラグイン