@viztor/dsh-tinyfish 0.4.1 → 0.5.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.md +8 -6
- package/cordis.patch.yml +2 -2
- package/lib/client.js +9 -5
- package/lib/index.d.mts +14 -3
- package/lib/index.mjs +17 -6
- package/package.json +4 -3
- /package/{assets/tinyfish.svg → icon.svg} +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img src="
|
|
2
|
+
<img src="icon.svg" alt="TinyFish logo" width="120" />
|
|
3
3
|
<h1>dsh-tinyfish</h1>
|
|
4
4
|
<p><strong>Free web search and fetch for the DeepSeek Harness.</strong><br />Give your agent the live web — at $0 per call.</p>
|
|
5
5
|
|
|
@@ -26,6 +26,8 @@ cd ~/.dsh/profiles/web
|
|
|
26
26
|
npm install dsh-tinyfish # or: npm install @viztor/dsh-tinyfish — same thing
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
Pick **one** name and install it once. Both tarballs carry byte-identical code and read the same settings (providers register as `tinyfish`, configuration lives under the row id `dsh-tinyfish`, credentials under the same two refs) — so switching names later loses nothing, but mounting both loads the bundle twice. `dsh-tinyfish` is the name DSH convention and these docs use.
|
|
30
|
+
|
|
29
31
|
<details>
|
|
30
32
|
<summary><strong>📦 Installing from GitHub Packages instead</strong></summary>
|
|
31
33
|
|
|
@@ -75,7 +77,7 @@ then `npm install @viztor/dsh-tinyfish` resolves from the mirror. Unless npmjs i
|
|
|
75
77
|
The default is `direct`, because the package is named for TinyFish — a fresh install asks for the credential its own name implies. Prefer Monid (it reuses a platform key your Monid MCP mount may already hold)? Pin it in your profile patch:
|
|
76
78
|
|
|
77
79
|
```yaml
|
|
78
|
-
- id:
|
|
80
|
+
- id: dsh-tinyfish
|
|
79
81
|
config:
|
|
80
82
|
channel: monid
|
|
81
83
|
```
|
|
@@ -95,7 +97,7 @@ The page shows the key for the **selected** channel, plus the saved-or-not statu
|
|
|
95
97
|
|
|
96
98
|
<br />
|
|
97
99
|
|
|
98
|
-
Everything lives in one row, `
|
|
100
|
+
Everything lives in one row, `dsh-tinyfish`. The row is validated, so an out-of-range value is rejected with a message rather than silently clamped.
|
|
99
101
|
|
|
100
102
|
| key | default | meaning |
|
|
101
103
|
| --- | --- | --- |
|
|
@@ -114,7 +116,7 @@ Everything lives in one row, `web-tinyfish`. The row is validated, so an out-of-
|
|
|
114
116
|
Turning one off reports _unavailable_ rather than _missing_ — the harness tells those apart, and only the second means "the install is broken".
|
|
115
117
|
|
|
116
118
|
```yaml
|
|
117
|
-
- id:
|
|
119
|
+
- id: dsh-tinyfish
|
|
118
120
|
config:
|
|
119
121
|
search: true
|
|
120
122
|
fetch: false # keep TinyFish for search, let dsh-web use another fetch
|
|
@@ -125,7 +127,7 @@ Turning one off reports _unavailable_ rather than _missing_ — the harness tell
|
|
|
125
127
|
`filters` is a nested object, and the settings form addresses one flat key per field — so search tuning stays operator-level:
|
|
126
128
|
|
|
127
129
|
```yaml
|
|
128
|
-
- id:
|
|
130
|
+
- id: dsh-tinyfish
|
|
129
131
|
config:
|
|
130
132
|
channel: monid
|
|
131
133
|
filters:
|
|
@@ -187,7 +189,7 @@ pnpm run release:gate # build, then the full gate incl. 11 package checks
|
|
|
187
189
|
pnpm run test:live # the real APIs, still $0, needs credentials
|
|
188
190
|
```
|
|
189
191
|
|
|
190
|
-
Requires **DSH 0.2.0+** and **Node
|
|
192
|
+
Requires **DSH 0.2.0+** and **Node 24+**. Full process and invariants: [`AGENTS.md`](./AGENTS.md). Contributing: [`CONTRIBUTING.md`](./CONTRIBUTING.md).
|
|
191
193
|
|
|
192
194
|
</details>
|
|
193
195
|
|
package/cordis.patch.yml
CHANGED
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
# where the preference belongs and where it can be changed without a new
|
|
24
24
|
# release:
|
|
25
25
|
#
|
|
26
|
-
# - id:
|
|
26
|
+
# - id: dsh-tinyfish
|
|
27
27
|
# config:
|
|
28
28
|
# channel: monid
|
|
29
29
|
#
|
|
30
30
|
# `apiKey` is not set here either — a secret belongs in the environment, the
|
|
31
31
|
# CLI's own store, or the harness credentials service, never in a patch file.
|
|
32
32
|
- insert:
|
|
33
|
-
- id:
|
|
33
|
+
- id: dsh-tinyfish
|
|
34
34
|
name: "dsh-tinyfish"
|
|
35
35
|
config:
|
|
36
36
|
attempts: 3
|
package/lib/client.js
CHANGED
|
@@ -33,7 +33,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
33
33
|
* duplicated on purpose. It must equal the exported `name` of `src/index.ts`:
|
|
34
34
|
* that is what the Plugins page keys the row by.
|
|
35
35
|
*/
|
|
36
|
-
const NS = "
|
|
36
|
+
const NS = "dsh-tinyfish";
|
|
37
37
|
/**
|
|
38
38
|
* Client-side services this page needs.
|
|
39
39
|
*
|
|
@@ -352,10 +352,14 @@ function TinyfishCard(props) {
|
|
|
352
352
|
*/
|
|
353
353
|
function apply(ctx) {
|
|
354
354
|
ctx.effect(() => {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
355
|
+
try {
|
|
356
|
+
return ctx.locale.register(NS, {
|
|
357
|
+
zh,
|
|
358
|
+
en
|
|
359
|
+
});
|
|
360
|
+
} catch {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
359
363
|
}, "dsh-tinyfish: dictionaries");
|
|
360
364
|
const scope = ctx.configForms.get(NS);
|
|
361
365
|
const model = new _deepseek_ai_dsh_client_ui_primitives.SettingsFormModel(scope, SPECS, [{
|
package/lib/index.d.mts
CHANGED
|
@@ -313,8 +313,9 @@ export declare class TinyfishFetchProvider implements WebFetchProvider {
|
|
|
313
313
|
*
|
|
314
314
|
* @module dsh-tinyfish
|
|
315
315
|
*/
|
|
316
|
-
/** Settings namespace, matching the
|
|
317
|
-
export declare const
|
|
316
|
+
/** Settings namespace, matching the plugin identity. */
|
|
317
|
+
export declare const TINYFISH_SETTINGS_NAMESPACE = "dsh-tinyfish";
|
|
318
|
+
export declare const WEB_TINYFISH_SETTINGS_NAMESPACE = "dsh-tinyfish";
|
|
318
319
|
/**
|
|
319
320
|
* The plugin's settings schema.
|
|
320
321
|
*
|
|
@@ -389,7 +390,17 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
389
390
|
}>>, "plain">;
|
|
390
391
|
/** Cordis service dependencies. */
|
|
391
392
|
export declare const inject: string[];
|
|
392
|
-
/**
|
|
393
|
+
/**
|
|
394
|
+
* The bundle name, as the code calls itself.
|
|
395
|
+
*
|
|
396
|
+
* This does NOT have to equal the manifest `name`: `dsh-opencode` ships as
|
|
397
|
+
* `@viztor/dsh-opencode` while exporting `dsh-opencode`, and mounts fine.
|
|
398
|
+
* Package identity is the install path (`node_modules/dsh-tinyfish` vs
|
|
399
|
+
* `node_modules/@viztor/dsh-tinyfish`); the providers register as `tinyfish`
|
|
400
|
+
* and the settings live under the row id `dsh-tinyfish`, so either install
|
|
401
|
+
* name reads and writes the same settings. Install exactly one — mounting
|
|
402
|
+
* both loads the bundle twice.
|
|
403
|
+
*/
|
|
393
404
|
export declare const name = "dsh-tinyfish";
|
|
394
405
|
/** Project one resolved section into the options the next operation serves. */
|
|
395
406
|
export declare function resolveOptions(config: unknown, ctx?: Context, env?: Record<string, string | undefined>): TinyfishProviderOptions;
|
package/lib/index.mjs
CHANGED
|
@@ -209,8 +209,8 @@ async function resolveApiKeyAsync(channel, options = {}) {
|
|
|
209
209
|
*/
|
|
210
210
|
function requireKey(channel, key) {
|
|
211
211
|
if (key) return;
|
|
212
|
-
if (channel === "monid") throw new WebError("The tinyfish provider has no Monid API key. Run `monid keys add` to store one in the local credential file, or export MONID_API_KEY, or set the
|
|
213
|
-
throw new WebError("The tinyfish provider has no TinyFish API key. Run `tinyfish auth login` to save one, or export TINYFISH_API_KEY, or set the
|
|
212
|
+
if (channel === "monid") throw new WebError("The tinyfish provider has no Monid API key. Run `monid keys add` to store one in the local credential file, or export MONID_API_KEY, or set the dsh-tinyfish `apiKeyEnv` row in the profile's cordis.patch.yml.", WEB_PROVIDER_CREDENTIAL_MISSING);
|
|
213
|
+
throw new WebError("The tinyfish provider has no TinyFish API key. Run `tinyfish auth login` to save one, or export TINYFISH_API_KEY, or set the dsh-tinyfish `apiKeyEnv` row in the profile's cordis.patch.yml — or switch the provider's channel to 'monid' to use a Monid key instead.", WEB_PROVIDER_CREDENTIAL_MISSING);
|
|
214
214
|
}
|
|
215
215
|
/** `fetch` with auth applied and failures mapped to `WebError`. */
|
|
216
216
|
async function call(url, options) {
|
|
@@ -661,8 +661,9 @@ function sameUrl(a, b) {
|
|
|
661
661
|
*
|
|
662
662
|
* @module dsh-tinyfish
|
|
663
663
|
*/
|
|
664
|
-
/** Settings namespace, matching the
|
|
665
|
-
const
|
|
664
|
+
/** Settings namespace, matching the plugin identity. */
|
|
665
|
+
const TINYFISH_SETTINGS_NAMESPACE = "dsh-tinyfish";
|
|
666
|
+
const WEB_TINYFISH_SETTINGS_NAMESPACE = TINYFISH_SETTINGS_NAMESPACE;
|
|
666
667
|
/**
|
|
667
668
|
* The plugin's settings schema.
|
|
668
669
|
*
|
|
@@ -710,7 +711,17 @@ const Config = z.object({
|
|
|
710
711
|
});
|
|
711
712
|
/** Cordis service dependencies. */
|
|
712
713
|
const inject = ["web"];
|
|
713
|
-
/**
|
|
714
|
+
/**
|
|
715
|
+
* The bundle name, as the code calls itself.
|
|
716
|
+
*
|
|
717
|
+
* This does NOT have to equal the manifest `name`: `dsh-opencode` ships as
|
|
718
|
+
* `@viztor/dsh-opencode` while exporting `dsh-opencode`, and mounts fine.
|
|
719
|
+
* Package identity is the install path (`node_modules/dsh-tinyfish` vs
|
|
720
|
+
* `node_modules/@viztor/dsh-tinyfish`); the providers register as `tinyfish`
|
|
721
|
+
* and the settings live under the row id `dsh-tinyfish`, so either install
|
|
722
|
+
* name reads and writes the same settings. Install exactly one — mounting
|
|
723
|
+
* both loads the bundle twice.
|
|
724
|
+
*/
|
|
714
725
|
const name = "dsh-tinyfish";
|
|
715
726
|
/**
|
|
716
727
|
* Clamp `attempts` to a range the retry loop can honour.
|
|
@@ -822,4 +833,4 @@ function apply(ctx, config) {
|
|
|
822
833
|
ctx.web.registerFetchProvider(new TinyfishFetchProvider(options));
|
|
823
834
|
}
|
|
824
835
|
//#endregion
|
|
825
|
-
export { Config, DEFAULT_FETCH_BASE, DEFAULT_MONID_BASE, DEFAULT_SEARCH_BASE, TINYFISH_PROVIDER_ID, TinyfishFetchProvider, TinyfishSearchProvider, WEB_ABORTED, WEB_PROVIDER_CREDENTIAL_MISSING, WEB_PROVIDER_ERROR, WEB_TINYFISH_SETTINGS_NAMESPACE, WebError, apply, inject, name, resolveApiKey, resolveOptions, tinyfishFetch, tinyfishSearch, toIsoDate };
|
|
836
|
+
export { Config, DEFAULT_FETCH_BASE, DEFAULT_MONID_BASE, DEFAULT_SEARCH_BASE, TINYFISH_PROVIDER_ID, TINYFISH_SETTINGS_NAMESPACE, TinyfishFetchProvider, TinyfishSearchProvider, WEB_ABORTED, WEB_PROVIDER_CREDENTIAL_MISSING, WEB_PROVIDER_ERROR, WEB_TINYFISH_SETTINGS_NAMESPACE, WebError, apply, inject, name, resolveApiKey, resolveOptions, tinyfishFetch, tinyfishSearch, toIsoDate };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viztor/dsh-tinyfish",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "TinyFish-backed search and fetch providers for the DeepSeek Harness web capability seam (ctx.web) — $0 SERP and page extraction, direct or via Monid.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cordis",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"cordis.patch.yml",
|
|
28
28
|
"README.md",
|
|
29
29
|
"LICENSE",
|
|
30
|
-
"
|
|
30
|
+
"icon.svg"
|
|
31
31
|
],
|
|
32
32
|
"type": "module",
|
|
33
33
|
"main": "lib/index.mjs",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@vitest/coverage-v8": "5.0.1",
|
|
75
75
|
"react": "^18.3.1",
|
|
76
76
|
"typescript": "^7.0.2",
|
|
77
|
-
"ultracite": "^7.12.
|
|
77
|
+
"ultracite": "^7.12.2",
|
|
78
78
|
"vite-plus": "catalog:",
|
|
79
79
|
"vitest": "5.0.1"
|
|
80
80
|
},
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"@deepseek-ai/dsh-launch-environment": "^0.2.0-rc.1",
|
|
85
85
|
"@deepseek-ai/dsh-web": "^0.2.0-rc.1"
|
|
86
86
|
},
|
|
87
|
+
"icon": "./icon.svg",
|
|
87
88
|
"engines": {
|
|
88
89
|
"node": ">=24"
|
|
89
90
|
},
|
|
File without changes
|