@audsiui/dsh-keenable
v0.1.1
Published
Web search and page fetch tools for DeepSeek Harness (dsh), powered by the Keenable API
Maintainers
Readme
@audsiui/dsh-keenable
Web search and page fetch tools for DeepSeek Harness (dsh), powered by the Keenable API. Ported from audsiui/pi-keenable.
Registers two model tools, plus a system-prompt section with usage guidance:
keenable_search— search the web; returns ranked results with title, URL, description, snippet and dateskeenable_fetch— fetch a page as markdown (title, description, author, content; refuses private/internal hosts)
Install
Mount it wherever the composition needs it. For a preset-scoped mount (only agents on that preset see the tools), add a row to the preset's agent.cordis.yml:
- id: dsh-keenable
name: '@audsiui/dsh-keenable'
config:
# apiKey: 'keen_...' # optional; see Auth below
# baseUrl: 'https://proxy.example.com'A bare package name in a preset row resolves from the harness install tree (its upward node_modules walk includes the global node_modules), so install globally:
npm i -g @audsiui/dsh-keenable # or: npm link in a checkoutHost-plane mounts (visible to every preset) work the same way as any profile bundle/patch row.
API key
Keenable offers keyless public endpoints (rate limited per IP, consume no credits) and keyed endpoints (no IP rate limit, require an API key from keenable.ai).
Auth resolution order:
apiKeyin the plugin config (the composition row)KEENABLE_API_KEYenvironment variable- keyless public endpoints
Base URL (for proxies/gateways) resolution order:
KEENABLE_API_URLenvironment variablebaseUrlin the plugin confighttps://api.keenable.ai(https enforced; plain http only for localhost)
There are no slash commands in this port — configure apiKey/baseUrl via the plugin config or the env vars above.
Usage
The model decides when to use the tools (e.g. "搜索一下最近 Rust 的稳定版本" or "用 keenable_fetch 读一下 https://example.com 的内容"). Recommended workflow: keenable_search → keenable_fetch promising results → cite the opened page, never a snippet alone.
Tool features:
keenable_search:query(natural-language description),mode(pro),site(one domain),max_results(1–50),snippet_max_length(180–10000),query_time,published_after/published_beforeandacquired_after/acquired_before(YYYY-MM-DD, ISO timestamp, or relative deltas like7d,6mo,1y)keenable_fetch:url,max_chars(default 50000),live(fetch from source instead of Keenable's index),prompt(LLM extraction instruction, up to 2000 chars — content contains only the answer)
Differences from pi-keenable
- Plain-ESM dsh cordis plugin (
name/inject/Config/apply) instead of a pi extension; tools follow dsh'sToolDefinition(canonical value +output.render). - The
/keenable login|logout|base-urlcommand and its stored-key file are not ported; the same settings live in the plugin config and env vars. - The
keenable-web-searchskill is not ported; usage guidance ships as the injected system-prompt section. - Numeric range constraints (
max_results,snippet_max_length,max_chars,promptlength) are enforced inexecutebecause dsh's enforced JSON Schema subset has nominimum/maximum.
Development
node --experimental-test-support # n/a — smoke test with a fake ctx, see repo notesSmoke-test with a fake context:
const mod = await import('@audsiui/dsh-keenable')
const tools = []
mod.apply({
get: () => undefined,
effect: (fn) => fn(),
tools: { register: (t) => tools.push(t) },
}, { timeoutMs: 30000 })
console.log(tools.map((t) => t.name)) // [ 'keenable_search', 'keenable_fetch' ]License
MIT
