dsh-web-search-pro 0.2.1 → 0.2.4

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.
Files changed (264) hide show
  1. package/CHANGELOG.md +227 -0
  2. package/README.en.md +117 -0
  3. package/README.md +72 -578
  4. package/assets/skills/dsh-web-search-pro/SKILL.md +13 -12
  5. package/assets/skills/dsh-web-search-pro/references/config.md +36 -0
  6. package/assets/skills/dsh-web-search-pro/references/sources.md +13 -7
  7. package/assets/skills/dsh-web-search-pro/references/troubleshooting.md +3 -1
  8. package/catalog/sources.v1.json +16 -14
  9. package/lib/actions/approval.js +50 -1
  10. package/lib/actions/approval.js.map +1 -1
  11. package/lib/actions/config.js +274 -0
  12. package/lib/actions/config.js.map +1 -0
  13. package/lib/actions/errors.js +8 -1
  14. package/lib/actions/errors.js.map +1 -1
  15. package/lib/actions/format.js +10 -0
  16. package/lib/actions/format.js.map +1 -1
  17. package/lib/actions/index-view.js +2 -2
  18. package/lib/actions/index-view.js.map +1 -1
  19. package/lib/actions/read.js +7 -3
  20. package/lib/actions/read.js.map +1 -1
  21. package/lib/actions/registry.js +3 -1
  22. package/lib/actions/registry.js.map +1 -1
  23. package/lib/actions/run.js +2 -2
  24. package/lib/actions/run.js.map +1 -1
  25. package/lib/actions/schema.js +18 -0
  26. package/lib/actions/schema.js.map +1 -1
  27. package/lib/actions/search.js +7 -2
  28. package/lib/actions/search.js.map +1 -1
  29. package/lib/actions/sources.js +76 -18
  30. package/lib/actions/sources.js.map +1 -1
  31. package/lib/actions/types.js +19 -1
  32. package/lib/actions/types.js.map +1 -1
  33. package/lib/browser-access.js +25 -0
  34. package/lib/browser-access.js.map +1 -1
  35. package/lib/catalog/recommend.js +11 -3
  36. package/lib/catalog/recommend.js.map +1 -1
  37. package/lib/catalog/schema.js +3 -1
  38. package/lib/catalog/schema.js.map +1 -1
  39. package/lib/cli/builtin-specs.js +57 -22
  40. package/lib/cli/builtin-specs.js.map +1 -1
  41. package/lib/cli/chain.js +13 -12
  42. package/lib/cli/chain.js.map +1 -1
  43. package/lib/cli/chains-spec.js +31 -11
  44. package/lib/cli/chains-spec.js.map +1 -1
  45. package/lib/cli/engine.js +19 -3
  46. package/lib/cli/engine.js.map +1 -1
  47. package/lib/cli/opencli-sites.js +83 -0
  48. package/lib/cli/opencli-sites.js.map +1 -0
  49. package/lib/cli/opencli.js +65 -17
  50. package/lib/cli/opencli.js.map +1 -1
  51. package/lib/cli/probe.js +1 -1
  52. package/lib/cli/probe.js.map +1 -1
  53. package/lib/cli/runner.js +217 -27
  54. package/lib/cli/runner.js.map +1 -1
  55. package/lib/cli/spec.js +100 -20
  56. package/lib/cli/spec.js.map +1 -1
  57. package/lib/cli/time-text.js +79 -0
  58. package/lib/cli/time-text.js.map +1 -0
  59. package/lib/cli/trial.js +57 -0
  60. package/lib/cli/trial.js.map +1 -0
  61. package/lib/client/SettingsCard.js +14 -32
  62. package/lib/client/SettingsCard.js.map +1 -1
  63. package/lib/client/agent-mark.js +27 -0
  64. package/lib/client/agent-mark.js.map +1 -0
  65. package/lib/client/card-frame.js +118 -0
  66. package/lib/client/card-frame.js.map +1 -0
  67. package/lib/client/cli-form.js +257 -0
  68. package/lib/client/cli-form.js.map +1 -0
  69. package/lib/client/field-docs.js +130 -0
  70. package/lib/client/field-docs.js.map +1 -0
  71. package/lib/client/field-keys.js +81 -0
  72. package/lib/client/field-keys.js.map +1 -0
  73. package/lib/client/field-rows.js +71 -0
  74. package/lib/client/field-rows.js.map +1 -0
  75. package/lib/client/fill.js +3 -0
  76. package/lib/client/fill.js.map +1 -0
  77. package/lib/client/form-specs.js +13 -1
  78. package/lib/client/form-specs.js.map +1 -1
  79. package/lib/client/form.js +282 -24
  80. package/lib/client/form.js.map +1 -1
  81. package/lib/client/group-advanced.js +23 -0
  82. package/lib/client/group-advanced.js.map +1 -0
  83. package/lib/client/group-agent.js +28 -0
  84. package/lib/client/group-agent.js.map +1 -0
  85. package/lib/client/group-cli.js +136 -0
  86. package/lib/client/group-cli.js.map +1 -0
  87. package/lib/client/group-common.js +29 -0
  88. package/lib/client/group-common.js.map +1 -0
  89. package/lib/client/group-judge.js +67 -0
  90. package/lib/client/group-judge.js.map +1 -0
  91. package/lib/client/group-order.js +201 -0
  92. package/lib/client/group-order.js.map +1 -0
  93. package/lib/client/group-runtime.js +33 -0
  94. package/lib/client/group-runtime.js.map +1 -0
  95. package/lib/client/group-sources.js +83 -0
  96. package/lib/client/group-sources.js.map +1 -0
  97. package/lib/client/groups-basic.js +36 -0
  98. package/lib/client/groups-basic.js.map +1 -0
  99. package/lib/client/index.js.map +1 -1
  100. package/lib/client/json-list.js +50 -0
  101. package/lib/client/json-list.js.map +1 -0
  102. package/lib/client/locales.js +666 -219
  103. package/lib/client/locales.js.map +1 -1
  104. package/lib/client/order.js +192 -0
  105. package/lib/client/order.js.map +1 -0
  106. package/lib/client/overlay-ops.js +46 -0
  107. package/lib/client/overlay-ops.js.map +1 -0
  108. package/lib/client/sources-table.js +1 -0
  109. package/lib/client/sources-table.js.map +1 -1
  110. package/lib/client/styles.js +74 -47
  111. package/lib/client/styles.js.map +1 -1
  112. package/lib/client/text-view.js +98 -0
  113. package/lib/client/text-view.js.map +1 -0
  114. package/lib/client/ui-kit.js +120 -0
  115. package/lib/client/ui-kit.js.map +1 -0
  116. package/lib/client/validators.js +8 -1
  117. package/lib/client/validators.js.map +1 -1
  118. package/lib/client.js +7313 -1571
  119. package/lib/client.js.map +1 -1
  120. package/lib/config-fillers.js +53 -0
  121. package/lib/config-fillers.js.map +1 -0
  122. package/lib/config-groups.js +49 -0
  123. package/lib/config-groups.js.map +1 -0
  124. package/lib/config.js +84 -108
  125. package/lib/config.js.map +1 -1
  126. package/lib/default-chain.js +66 -0
  127. package/lib/default-chain.js.map +1 -0
  128. package/lib/deps.js +1 -1
  129. package/lib/deps.js.map +1 -1
  130. package/lib/engines.js +3 -3
  131. package/lib/engines.js.map +1 -1
  132. package/lib/fetch.js +23 -4
  133. package/lib/fetch.js.map +1 -1
  134. package/lib/fiber-config.js +5 -0
  135. package/lib/fiber-config.js.map +1 -0
  136. package/lib/index.js +36 -7
  137. package/lib/index.js.map +1 -1
  138. package/lib/overlay-types.js +88 -0
  139. package/lib/overlay-types.js.map +1 -0
  140. package/lib/overlay.js +683 -0
  141. package/lib/overlay.js.map +1 -0
  142. package/lib/pipeline/candidates.js +27 -1
  143. package/lib/pipeline/candidates.js.map +1 -1
  144. package/lib/pipeline/compile.js +63 -0
  145. package/lib/pipeline/compile.js.map +1 -1
  146. package/lib/pipeline/confidence.js +64 -0
  147. package/lib/pipeline/confidence.js.map +1 -0
  148. package/lib/pipeline/fusion.js +50 -3
  149. package/lib/pipeline/fusion.js.map +1 -1
  150. package/lib/pipeline/plan.js +2 -2
  151. package/lib/pipeline/plan.js.map +1 -1
  152. package/lib/pipeline/render.js +20 -2
  153. package/lib/pipeline/render.js.map +1 -1
  154. package/lib/pipeline/run.js +17 -5
  155. package/lib/pipeline/run.js.map +1 -1
  156. package/lib/pipeline/sources-spec.js +19 -3
  157. package/lib/pipeline/sources-spec.js.map +1 -1
  158. package/lib/providers/builtin.js +3 -0
  159. package/lib/providers/builtin.js.map +1 -1
  160. package/lib/providers/deepseek.js +348 -0
  161. package/lib/providers/deepseek.js.map +1 -0
  162. package/lib/providers/http.js.map +1 -1
  163. package/lib/providers/keyed-meta.js +7 -0
  164. package/lib/providers/keyed-meta.js.map +1 -1
  165. package/lib/providers/platforms.js +18 -17
  166. package/lib/providers/platforms.js.map +1 -1
  167. package/lib/providers/registry.js.map +1 -1
  168. package/lib/restart.js +47 -0
  169. package/lib/restart.js.map +1 -0
  170. package/lib/router.js +145 -26
  171. package/lib/router.js.map +1 -1
  172. package/lib/rpc-types.js +15 -0
  173. package/lib/rpc-types.js.map +1 -0
  174. package/lib/rpc.js +118 -0
  175. package/lib/rpc.js.map +1 -0
  176. package/lib/tools.js +10 -4
  177. package/lib/tools.js.map +1 -1
  178. package/lib/types/actions/approval.d.ts +11 -0
  179. package/lib/types/actions/config.d.ts +54 -0
  180. package/lib/types/actions/format.d.ts +9 -2
  181. package/lib/types/actions/run.d.ts +1 -0
  182. package/lib/types/actions/schema.d.ts +7 -1
  183. package/lib/types/actions/sources.d.ts +29 -3
  184. package/lib/types/actions/types.d.ts +28 -2
  185. package/lib/types/browser-access.d.ts +17 -0
  186. package/lib/types/catalog/recommend.d.ts +4 -0
  187. package/lib/types/catalog/schema.d.ts +2 -0
  188. package/lib/types/cli/builtin-specs.d.ts +11 -3
  189. package/lib/types/cli/chains-spec.d.ts +12 -3
  190. package/lib/types/cli/engine.d.ts +10 -3
  191. package/lib/types/cli/opencli-sites.d.ts +24 -0
  192. package/lib/types/cli/opencli.d.ts +42 -3
  193. package/lib/types/cli/runner.d.ts +47 -8
  194. package/lib/types/cli/spec.d.ts +101 -8
  195. package/lib/types/cli/time-text.d.ts +12 -0
  196. package/lib/types/cli/trial.d.ts +19 -0
  197. package/lib/types/client/SettingsCard.d.ts +17 -1
  198. package/lib/types/client/agent-mark.d.ts +22 -0
  199. package/lib/types/client/card-frame.d.ts +35 -0
  200. package/lib/types/client/cli-form.d.ts +97 -0
  201. package/lib/types/client/field-docs.d.ts +15 -0
  202. package/lib/types/client/field-keys.d.ts +41 -0
  203. package/lib/types/client/field-rows.d.ts +70 -0
  204. package/lib/types/client/fill.d.ts +2 -0
  205. package/lib/types/client/form-specs.d.ts +12 -3
  206. package/lib/types/client/form.d.ts +79 -1
  207. package/lib/types/client/group-advanced.d.ts +9 -0
  208. package/lib/types/client/group-agent.d.ts +20 -0
  209. package/lib/types/client/group-cli.d.ts +52 -0
  210. package/lib/types/client/group-common.d.ts +12 -0
  211. package/lib/types/client/group-judge.d.ts +17 -0
  212. package/lib/types/client/group-order.d.ts +26 -0
  213. package/lib/types/client/group-runtime.d.ts +15 -0
  214. package/lib/types/client/group-sources.d.ts +46 -0
  215. package/lib/types/client/groups-basic.d.ts +18 -0
  216. package/lib/types/client/index.d.ts +8 -0
  217. package/lib/types/client/json-list.d.ts +21 -0
  218. package/lib/types/client/locales.d.ts +1079 -200
  219. package/lib/types/client/order.d.ts +102 -0
  220. package/lib/types/client/overlay-ops.d.ts +37 -0
  221. package/lib/types/client/styles.d.ts +56 -41
  222. package/lib/types/client/text-view.d.ts +22 -0
  223. package/lib/types/client/ui-kit.d.ts +200 -0
  224. package/lib/types/config-fillers.d.ts +9 -0
  225. package/lib/types/config-groups.d.ts +23 -0
  226. package/lib/types/config.d.ts +263 -225
  227. package/lib/types/default-chain.d.ts +63 -0
  228. package/lib/types/engines.d.ts +29 -1
  229. package/lib/types/fetch.d.ts +12 -3
  230. package/lib/types/fiber-config.d.ts +18 -0
  231. package/lib/types/index.d.ts +164 -150
  232. package/lib/types/overlay-types.d.ts +98 -0
  233. package/lib/types/overlay.d.ts +141 -0
  234. package/lib/types/pipeline/candidates.d.ts +17 -0
  235. package/lib/types/pipeline/compile.d.ts +11 -0
  236. package/lib/types/pipeline/confidence.d.ts +35 -0
  237. package/lib/types/pipeline/fusion.d.ts +23 -1
  238. package/lib/types/pipeline/render.d.ts +16 -0
  239. package/lib/types/pipeline/run.d.ts +2 -1
  240. package/lib/types/pipeline/sources-spec.d.ts +5 -2
  241. package/lib/types/pipeline/types.d.ts +37 -0
  242. package/lib/types/providers/deepseek.d.ts +130 -0
  243. package/lib/types/providers/http.d.ts +2 -1
  244. package/lib/types/providers/keyed-meta.d.ts +5 -0
  245. package/lib/types/providers/registry.d.ts +7 -0
  246. package/lib/types/restart.d.ts +52 -0
  247. package/lib/types/router.d.ts +57 -10
  248. package/lib/types/rpc-types.d.ts +79 -0
  249. package/lib/types/rpc.d.ts +74 -0
  250. package/lib/types/tools.d.ts +6 -0
  251. package/lib/types/util.d.ts +10 -0
  252. package/lib/util.js +10 -1
  253. package/lib/util.js.map +1 -1
  254. package/package.json +53 -44
  255. package/scripts/check-client-bundle.mjs +1 -1
  256. package/scripts/check-docs-links.mjs +107 -0
  257. package/scripts/cli-login-check.mjs +214 -0
  258. package/LOGIN.md +0 -161
  259. package/lib/client/RubricEditor.js +0 -47
  260. package/lib/client/RubricEditor.js.map +0 -1
  261. package/lib/client/fields.js +0 -31
  262. package/lib/client/fields.js.map +0 -1
  263. package/lib/types/client/RubricEditor.d.ts +0 -6
  264. package/lib/types/client/fields.d.ts +0 -65
@@ -0,0 +1,63 @@
1
+ /**
2
+ * The default engine order of a plain search, as a pure function: the router uses it to decide the order, and the settings
3
+ * card's status summary uses the same code to show the chain a search would try first, so the two cannot disagree.
4
+ * No imports: the client bundle includes this file.
5
+ * @module web-search-pro/default-chain
6
+ */
7
+ /** The default `engines` list. A list equal to it is "not customised": the default rule for common ("常用") sources applies to it. */
8
+ export declare const DEFAULT_ENGINES: readonly string[];
9
+ export interface ChainInput {
10
+ /** The configured `engines` (route ids). */
11
+ engines: readonly string[];
12
+ /** `sources.priority` (route ids). */
13
+ priority?: readonly string[];
14
+ /** `sources.disabled` (route ids). */
15
+ disabled?: readonly string[];
16
+ /** Common ("常用") sources whose key resolves, best first. */
17
+ commonReady?: readonly string[];
18
+ /** `evidence.sourcePolicy === 'anonymous-only'`: a paid common source is never added. */
19
+ anonymousOnly?: boolean;
20
+ }
21
+ /**
22
+ * Order of the configured chain: `sources.disabled` removed, `sources.priority` ids that are in the list first, then the common
23
+ * sources whose key resolves (only while `engines` is the default list; a list the user wrote keeps its order and the position
24
+ * it gave a common source), then the rest. Throws when everything is disabled.
25
+ */
26
+ export declare function effectiveChain(input: ChainInput): string[];
27
+ /** One reason the effective chain differs from the `engines` list as written. */
28
+ export type ChainReason =
29
+ /** `sources.disabled` removed these from the list. */
30
+ {
31
+ kind: 'disabled';
32
+ ids: string[];
33
+ }
34
+ /** `sources.priority` moved these to the front. */
35
+ | {
36
+ kind: 'priority';
37
+ ids: string[];
38
+ }
39
+ /** The default rule put these ready common ("常用") sources in front of the list. */
40
+ | {
41
+ kind: 'common';
42
+ ids: string[];
43
+ }
44
+ /** `evidence.sourcePolicy: anonymous-only` kept these ready common sources out (they need a key). */
45
+ | {
46
+ kind: 'anonymous-only';
47
+ ids: string[];
48
+ }
49
+ /** The list is the user's own, so these ready common sources are not added (they keep their place only if the list names them). */
50
+ | {
51
+ kind: 'own-list';
52
+ ids: string[];
53
+ };
54
+ export interface ChainExplanation {
55
+ /** What a plain search would try, in order ({@link effectiveChain}); undefined when everything is disabled. */
56
+ chain: string[] | undefined;
57
+ reasons: ChainReason[];
58
+ }
59
+ /**
60
+ * {@link effectiveChain} plus why it differs from the list: the preview of the settings card says it in one sentence per reason, so
61
+ * a person who sees `deepseek` first in a list that does not begin with it knows which rule did that. Same inputs, same rule.
62
+ */
63
+ export declare function explainChain(input: ChainInput): ChainExplanation;
@@ -11,10 +11,27 @@ import { type BrowserMethod } from './browser-access.ts';
11
11
  import type { CustomPlatformSpec } from './config.ts';
12
12
  import { type ExaSearchRequest } from './exa-client.ts';
13
13
  import { EngineError } from './engine-error.ts';
14
+ /**
15
+ * A source row as an engine returns it: the host's `WebSearchSource` plus the provider's own quality signals, when it has any
16
+ * (DeepSeek Search: `rerank_score` 0..3 and `authority` 0..4). They travel with the row as source metadata and are one small
17
+ * fusion signal (pipeline/fusion.ts); no engine is required to set them.
18
+ */
19
+ export interface EngineSource extends WebSearchSource {
20
+ /** The provider's relevance / authority / freshness rank score, 0..3 (higher is better). */
21
+ readonly rerankScore?: number;
22
+ /** The provider's source-authority grade, 0..4 (unknown = absent). */
23
+ readonly authority?: number;
24
+ /** The user-defined CLI that returned the row (`custom-cli:echo`): set by the adapter, shown with the result. */
25
+ readonly via?: string;
26
+ /** The honest label of a user-defined source ("user-defined, not verified by the plugin"). */
27
+ readonly tag?: string;
28
+ /** The source's confidence (0..1), below 1 only: set by the router from the spec / `sources.confidence`, never by an engine. */
29
+ readonly confidence?: number;
30
+ }
14
31
  export interface SearchOutcome {
15
32
  /** Provider-generated answer/summary text, when any. */
16
33
  content?: string;
17
- sources: WebSearchSource[];
34
+ sources: EngineSource[];
18
35
  /** Id of the concrete backend that answered (a platform provider with a fallback chain names the leg that ran). */
19
36
  via?: string;
20
37
  /** The backend id of the platform chain that answered (`bili`, `browser-opencli`), for display and history. */
@@ -29,6 +46,8 @@ export interface Engine {
29
46
  backend?: string;
30
47
  /** Cheap local availability check; must not do network I/O. */
31
48
  available(): boolean;
49
+ /** Why `available()` is false, when the engine knows (a platform chain quotes it in its fall-through note instead of "unavailable"). */
50
+ unavailableReason?(): string | undefined;
32
51
  /** Browser-service method this engine depends on (dsh-browser is optional). */
33
52
  needsBrowser?: BrowserMethod;
34
53
  search(query: string, count: number, signal?: AbortSignal, options?: EngineSearchOptions): Promise<SearchOutcome>;
@@ -41,6 +60,8 @@ export interface EngineSearchOptions {
41
60
  include?: string[];
42
61
  exclude?: string[];
43
62
  };
63
+ /** The caller's original question or need (DeepSeek Search `ori_question`, cut to 128 characters by the engine); absent = none sent. */
64
+ originalQuestion?: string;
44
65
  /** Lower bound of the publication date (ISO 8601), compiled from a hard time_window; the engine maps it to its native filter. */
45
66
  since?: string;
46
67
  /** Domain lists compiled from hard site / exclude_site constraints (keyed sources that take them as request fields). */
@@ -81,6 +102,8 @@ export interface EngineDeps {
81
102
  usage?: UsageRecorder;
82
103
  /** Test seam: replaces the global fetch of API clients that accept one. */
83
104
  fetchImpl?: typeof fetch;
105
+ /** Test seam: waits between retries of the engines that retry (DeepSeek); resolves early on abort. Default: a real timer. */
106
+ sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
84
107
  /** Test seam: replaces the DNS lookup of the SSRF check. */
85
108
  lookup?: (hostname: string) => Promise<{
86
109
  address: string;
@@ -100,6 +123,11 @@ export interface EngineDeps {
100
123
  anysearchApiKey?: string;
101
124
  /** GitHub API token (config githubToken / $GITHUB_TOKEN / $GH_TOKEN). */
102
125
  githubToken?: string;
126
+ /**
127
+ * Credential variables of the CLI adapters by the name the tool reads (`TWITTER_AUTH_TOKEN`, `TWITTER_CT0`), resolved by the router:
128
+ * config literal -> credentials ref -> process environment. Handed to a command only through its environment, never in argv.
129
+ */
130
+ cliEnv?: Readonly<Record<string, string>>;
103
131
  enableCli: boolean;
104
132
  opencliEnabled: boolean;
105
133
  agentReachEnabled: boolean;
@@ -8,7 +8,8 @@ import type { ResolvedConfig } from './config.ts';
8
8
  import type { BrowserService } from './browser-service.ts';
9
9
  import { type BrowserGetter } from './browser-access.ts';
10
10
  import type { ExtractRule } from './extract.ts';
11
- export type FetchMode = 'auto' | 'jina' | 'http' | 'playwright';
11
+ import { type DeepSeekFetchAccess } from './providers/deepseek.ts';
12
+ export type FetchMode = 'auto' | 'jina' | 'http' | 'playwright' | 'deepseek';
12
13
  export interface FetchOptions {
13
14
  mode: FetchMode;
14
15
  signal: AbortSignal | undefined;
@@ -63,7 +64,7 @@ export declare function detectShellPage(text: string): boolean;
63
64
  export type PageClass = 'content' | 'shell' | 'login_wall' | 'captcha' | 'js_shell' | 'error';
64
65
  /** One backend attempt of a fetch, in order (recorded in the result and in the stored fetch detail). */
65
66
  export interface FetchAttempt {
66
- source: 'jina' | 'http' | 'playwright';
67
+ source: 'jina' | 'http' | 'playwright' | 'deepseek';
67
68
  class: PageClass;
68
69
  chars?: number;
69
70
  detail?: string;
@@ -82,14 +83,20 @@ export declare function classifyPage(text: string, meta?: {
82
83
  export declare function normalizeUrl(raw: string): string;
83
84
  /** All rules: user (DB) first, then built-ins; user rules win on ties. */
84
85
  export declare function mergedRules(store: Store): ExtractRule[];
86
+ /**
87
+ * The DeepSeek Fetch API access for a call: key, endpoint, ledger. Resolved per call by the router (settings literal -> DSH credentials ->
88
+ * process environment); undefined = no key. Test seams (`fetchImpl`, `lookup`, `sleep`) ride along on the returned object.
89
+ */
90
+ export type DeepSeekFetchAccessProvider = () => Promise<Pick<DeepSeekFetchAccess, 'apiKey' | 'baseUrl' | 'usage' | 'fetchImpl' | 'lookup' | 'sleep' | 'allowProxyFakeIp'> | undefined>;
85
91
  export declare class FetchService {
86
92
  private readonly store;
87
93
  private readonly config;
94
+ private readonly deepseek?;
88
95
  private readonly memory;
89
96
  /** In-flight de-duplication of identical non-fresh fetches (C3). */
90
97
  private readonly flights;
91
98
  private readonly getBrowser;
92
- constructor(store: Store, config: ResolvedConfig | (() => ResolvedConfig), browser?: BrowserService | BrowserGetter);
99
+ constructor(store: Store, config: ResolvedConfig | (() => ResolvedConfig), browser?: BrowserService | BrowserGetter, deepseek?: DeepSeekFetchAccessProvider | undefined);
93
100
  private cfg;
94
101
  /** True when the optional browser can render right now (enabled in config and the service has render()). */
95
102
  private canRender;
@@ -98,5 +105,7 @@ export declare class FetchService {
98
105
  private runFetch;
99
106
  private fetchJina;
100
107
  private fetchHttp;
108
+ /** One page through the DeepSeek Fetch API. 403 / 404 are DeepSeek's own verdicts (see `DeepSeekFetchError`), never the target page's status. */
109
+ private fetchDeepSeek;
101
110
  private fetchPlaywright;
102
111
  }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Where the live, resolved plugin configuration is read from.
3
+ *
4
+ * Cordis 4.0.x (DSH 0.2.0 / 0.2.1 lines): `fiber.config` is the RESOLVED object (schema defaults applied,
5
+ * `internal/config` hooks run) and there is no `effectiveConfig`. A volatile update swaps its fields in place.
6
+ *
7
+ * Cordis 4.1.x (DSH 0.2.2 line): `fiber.config` is the RAW input - no schema defaults, no hook results, and
8
+ * `undefined` for an entry that has no configuration. The resolved object handed to `apply` is published as
9
+ * `fiber.effectiveConfig` after every successful update. Reading `fiber.config` there skips defaults (nested
10
+ * ones included) and credential/hook resolution, which is why `?? {}` alone only fixes the crash.
11
+ *
12
+ * So: prefer `effectiveConfig`, fall back to `config` (4.0.x), and never hand `undefined` onward.
13
+ */
14
+ export interface FiberConfigSource {
15
+ readonly effectiveConfig?: unknown;
16
+ readonly config?: unknown;
17
+ }
18
+ export declare function liveFiberConfig<T extends object>(fiber: FiberConfigSource | undefined): T;