@morlay/dsh-web-search-ollama 0.0.10 → 0.0.12-alpha.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/dist/client.cjs CHANGED
@@ -4,7 +4,7 @@ window.__ModuleLoader__.load({
4
4
  var module = { exports: {} };
5
5
  var exports = module.exports;
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
7
- //#region src/client/locales.ts
7
+ // src/client/locales.ts
8
8
  const zh = {
9
9
  apiKey: "API key",
10
10
  apiKeyHint: "字面值;能走凭证服务时优先用下面的引用名,别把密钥写进配置文件。",
@@ -25,8 +25,7 @@ window.__ModuleLoader__.load({
25
25
  maxResults: "Default result count",
26
26
  maxResultsHint: "Used when a request carries none; the default keeps Ollama's own default."
27
27
  };
28
- //#endregion
29
- //#region src/client/index.ts
28
+ // src/client/index.ts
30
29
  const WEB_SEARCH_NS = "web-search-ollama";
31
30
  const NS = "settings.web-search-ollama";
32
31
  const FIELDS = [
@@ -53,7 +52,6 @@ window.__ModuleLoader__.load({
53
52
  };
54
53
  }, "web-search-ollama: field wording"));
55
54
  }
56
- //#endregion
57
55
  exports.NS = NS;
58
56
  exports.WEB_SEARCH_NS = WEB_SEARCH_NS;
59
57
  exports.apply = apply;
package/dist/client.d.cts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Context } from "@deepseek-ai/cordis";
2
- //#region src/client/locales.d.ts
3
2
  declare const zh: {
4
3
  readonly apiKey: "API key";
5
4
  readonly apiKeyHint: "字面值;能走凭证服务时优先用下面的引用名,别把密钥写进配置文件。";
@@ -11,8 +10,6 @@ declare const zh: {
11
10
  readonly maxResultsHint: "请求没带结果数时用它;默认就是让 Ollama 用自己的默认。";
12
11
  };
13
12
  type WebSearchFieldLocaleKey = keyof typeof zh;
14
- //#endregion
15
- //#region src/client/index.d.ts
16
13
  export declare const WEB_SEARCH_NS = "web-search-ollama";
17
14
  export declare const NS = "settings.web-search-ollama";
18
15
  declare module "@deepseek-ai/dsh-client-ui-slots" {
@@ -22,5 +19,4 @@ declare module "@deepseek-ai/dsh-client-ui-slots" {
22
19
  }
23
20
  export declare const inject: string[];
24
21
  export declare function apply(ctx: Context): void;
25
- //#endregion
26
22
  export {};
package/dist/client.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Context } from "@deepseek-ai/cordis";
2
- //#region src/client/locales.d.ts
3
2
  declare const zh: {
4
3
  readonly apiKey: "API key";
5
4
  readonly apiKeyHint: "字面值;能走凭证服务时优先用下面的引用名,别把密钥写进配置文件。";
@@ -11,8 +10,6 @@ declare const zh: {
11
10
  readonly maxResultsHint: "请求没带结果数时用它;默认就是让 Ollama 用自己的默认。";
12
11
  };
13
12
  type WebSearchFieldLocaleKey = keyof typeof zh;
14
- //#endregion
15
- //#region src/client/index.d.ts
16
13
  export declare const WEB_SEARCH_NS = "web-search-ollama";
17
14
  export declare const NS = "settings.web-search-ollama";
18
15
  declare module "@deepseek-ai/dsh-client-ui-slots" {
@@ -22,5 +19,4 @@ declare module "@deepseek-ai/dsh-client-ui-slots" {
22
19
  }
23
20
  export declare const inject: string[];
24
21
  export declare function apply(ctx: Context): void;
25
- //#endregion
26
22
  export {};
package/dist/client.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/client/locales.ts
1
+ // src/client/locales.ts
2
2
  const zh = {
3
3
  apiKey: "API key",
4
4
  apiKeyHint: "字面值;能走凭证服务时优先用下面的引用名,别把密钥写进配置文件。",
@@ -19,8 +19,7 @@ const en = {
19
19
  maxResults: "Default result count",
20
20
  maxResultsHint: "Used when a request carries none; the default keeps Ollama's own default."
21
21
  };
22
- //#endregion
23
- //#region src/client/index.ts
22
+ // src/client/index.ts
24
23
  const WEB_SEARCH_NS = "web-search-ollama";
25
24
  const NS = "settings.web-search-ollama";
26
25
  const FIELDS = [
@@ -47,5 +46,4 @@ function apply(ctx) {
47
46
  };
48
47
  }, "web-search-ollama: field wording"));
49
48
  }
50
- //#endregion
51
49
  export { NS, WEB_SEARCH_NS, apply, inject };
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region \0rolldown/runtime.js
2
+ // \0rolldown/runtime.js
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -20,13 +20,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
20
20
  value: mod,
21
21
  enumerable: true
22
22
  }) : target, mod));
23
- //#endregion
24
23
  let _deepseek_ai_dsh_credentials = require("@deepseek-ai/dsh-credentials");
25
24
  let _deepseek_ai_dsh_launch_environment = require("@deepseek-ai/dsh-launch-environment");
26
25
  let _deepseek_ai_schemastery = require("@deepseek-ai/schemastery");
27
26
  _deepseek_ai_schemastery = __toESM(_deepseek_ai_schemastery, 1);
28
27
  let _deepseek_ai_dsh_web = require("@deepseek-ai/dsh-web");
29
- //#region src/provider.ts
28
+ // src/provider.ts
30
29
  const OLLAMA_PROVIDER_ID = "ollama";
31
30
  const OLLAMA_DEFAULT_BASE_URL = "https://ollama.com";
32
31
  const OLLAMA_DEFAULT_MAX_RESULTS = 5;
@@ -129,8 +128,7 @@ function isAbortError(error) {
129
128
  function searchAborted(cause) {
130
129
  return new _deepseek_ai_dsh_web.WebError("Ollama search aborted", "WEB_ABORTED", { cause });
131
130
  }
132
- //#endregion
133
- //#region src/index.ts
131
+ // src/index.ts
134
132
  const name = "web-search-ollama";
135
133
  const inject = ["web"];
136
134
  const DEFAULT_API_KEY_ENV = "OLLAMA_API_KEY";
@@ -177,7 +175,6 @@ function apply(ctx, config) {
177
175
  }
178
176
  }));
179
177
  }
180
- //#endregion
181
178
  exports.Config = Config;
182
179
  exports.OLLAMA_DEFAULT_BASE_URL = OLLAMA_DEFAULT_BASE_URL;
183
180
  exports.OLLAMA_DEFAULT_MAX_RESULTS = OLLAMA_DEFAULT_MAX_RESULTS;
package/dist/index.d.mts CHANGED
@@ -2,7 +2,6 @@ import { Volatile } from "@deepseek-ai/cosmokit";
2
2
  import { Context } from "@deepseek-ai/cordis";
3
3
  import z from "@deepseek-ai/schemastery";
4
4
  import { WebSearchProvider, WebSearchRequest, WebSearchResult, WebSearchSource } from "@deepseek-ai/dsh-web";
5
- //#region src/types.d.ts
6
5
  interface OllamaSearchResult {
7
6
  title?: string | null;
8
7
  url?: string | null;
@@ -11,8 +10,6 @@ interface OllamaSearchResult {
11
10
  interface OllamaSearchResponse {
12
11
  results?: OllamaSearchResult[];
13
12
  }
14
- //#endregion
15
- //#region src/provider.d.ts
16
13
  export declare const OLLAMA_PROVIDER_ID = "ollama";
17
14
  export declare const OLLAMA_DEFAULT_BASE_URL = "https://ollama.com";
18
15
  export declare const OLLAMA_DEFAULT_MAX_RESULTS = 5;
@@ -34,8 +31,6 @@ export declare class OllamaSearchProvider implements WebSearchProvider {
34
31
  search(request: WebSearchRequest, signal?: AbortSignal): Promise<WebSearchResult>;
35
32
  private apiKey;
36
33
  }
37
- //#endregion
38
- //#region src/index.d.ts
39
34
  export declare const name = "web-search-ollama";
40
35
  export declare const inject: string[];
41
36
  export interface Config {
@@ -52,5 +47,4 @@ export interface ResolvedConfig {
52
47
  }
53
48
  export declare const Config: z<Config, ResolvedConfig>;
54
49
  export declare function apply(ctx: Context, config: ResolvedConfig): void;
55
- //#endregion
56
50
  export type { OllamaSearchProviderOptions };
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { credentialRef } from "@deepseek-ai/dsh-credentials";
2
2
  import { launchEnvironmentOf } from "@deepseek-ai/dsh-launch-environment";
3
3
  import z from "@deepseek-ai/schemastery";
4
4
  import { WebError } from "@deepseek-ai/dsh-web";
5
- //#region src/provider.ts
5
+ // src/provider.ts
6
6
  const OLLAMA_PROVIDER_ID = "ollama";
7
7
  const OLLAMA_DEFAULT_BASE_URL = "https://ollama.com";
8
8
  const OLLAMA_DEFAULT_MAX_RESULTS = 5;
@@ -105,8 +105,7 @@ function isAbortError(error) {
105
105
  function searchAborted(cause) {
106
106
  return new WebError("Ollama search aborted", "WEB_ABORTED", { cause });
107
107
  }
108
- //#endregion
109
- //#region src/index.ts
108
+ // src/index.ts
110
109
  const name = "web-search-ollama";
111
110
  const inject = ["web"];
112
111
  const DEFAULT_API_KEY_ENV = "OLLAMA_API_KEY";
@@ -153,5 +152,4 @@ function apply(ctx, config) {
153
152
  }
154
153
  }));
155
154
  }
156
- //#endregion
157
155
  export { Config, OLLAMA_DEFAULT_BASE_URL, OLLAMA_DEFAULT_MAX_RESULTS, OLLAMA_MAX_RESULTS_LIMIT, OLLAMA_PROVIDER_ID, OllamaSearchProvider, apply, inject, mapOllamaResponse, mapOllamaResult, name };
package/dist/rows.cjs CHANGED
@@ -1,10 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/rows.ts
2
+ // src/rows.ts
3
3
  function webSearchRows() {
4
4
  return [{ insert: [{
5
5
  id: "web-search-ollama",
6
6
  name: "@morlay/dsh-web-search-ollama"
7
7
  }] }];
8
8
  }
9
- //#endregion
10
9
  exports.webSearchRows = webSearchRows;
package/dist/rows.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/rows.d.ts
2
1
  export interface PatchRow {
3
2
  readonly id?: string;
4
3
  readonly insert?: readonly RowEntry[];
@@ -8,5 +7,4 @@ export interface RowEntry {
8
7
  readonly name: string;
9
8
  readonly config?: Readonly<Record<string, unknown>>;
10
9
  }
11
- export declare function webSearchRows(): readonly PatchRow[];
12
- //#endregion
10
+ export declare function webSearchRows(): readonly PatchRow[];
package/dist/rows.mjs CHANGED
@@ -1,9 +1,8 @@
1
- //#region src/rows.ts
1
+ // src/rows.ts
2
2
  function webSearchRows() {
3
3
  return [{ insert: [{
4
4
  id: "web-search-ollama",
5
5
  name: "@morlay/dsh-web-search-ollama"
6
6
  }] }];
7
7
  }
8
- //#endregion
9
8
  export { webSearchRows };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morlay/dsh-web-search-ollama",
3
- "version": "0.0.10",
3
+ "version": "0.0.12-alpha.0",
4
4
  "description": "Ollama-backed search provider for the DeepSeek Harness web seam (ctx.web): one web_search backend calling POST https://ollama.com/api/web_search.",
5
5
  "keywords": [
6
6
  "dsh",
@@ -38,22 +38,25 @@
38
38
  "./locale/*.json": "./locale/*.json"
39
39
  },
40
40
  "dependencies": {
41
- "@deepseek-ai/schemastery": "^3.18.5"
41
+ "@deepseek-ai/schemastery": "^3.18.6-alpha.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@deepseek-ai/cosmokit": "^1.8.6",
45
- "@deepseek-ai/dsh-client-locale": "^0.2.1-rc.1",
46
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.1-rc.1",
47
- "@morlay/dsh-client-ui-primitives": "0.0.12"
44
+ "@deepseek-ai/cosmokit": "^1.8.7-alpha.1",
45
+ "@deepseek-ai/dsh-client-locale": "^0.2.2-alpha.2",
46
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.2-alpha.2",
47
+ "@morlay/dsh-client-ui-primitives": "0.0.14-alpha.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@deepseek-ai/cordis": "^4.0.5",
51
- "@deepseek-ai/cosmokit": "^1.8.6",
52
- "@deepseek-ai/dsh-client-locale": "^0.2.1-rc.1",
53
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.1-rc.1",
54
- "@deepseek-ai/dsh-credentials": "^0.2.1-rc.1",
55
- "@deepseek-ai/dsh-launch-environment": "^0.2.1-rc.1",
56
- "@deepseek-ai/dsh-web": "^0.2.1-rc.1"
50
+ "@deepseek-ai/cordis": "^4.0.6-alpha.1",
51
+ "@deepseek-ai/cosmokit": "^1.8.7-alpha.1",
52
+ "@deepseek-ai/dsh-client-locale": "^0.2.2-alpha.2",
53
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.2-alpha.2",
54
+ "@deepseek-ai/dsh-credentials": "^0.2.2-alpha.2",
55
+ "@deepseek-ai/dsh-launch-environment": "^0.2.2-alpha.2",
56
+ "@deepseek-ai/dsh-web": "^0.2.2-alpha.2"
57
+ },
58
+ "engines": {
59
+ "dsh": ">= 0.2.2-alpha.2 < 0.2.3"
57
60
  },
58
61
  "dsh": {
59
62
  "client": {
@@ -64,9 +67,6 @@
64
67
  ]
65
68
  }
66
69
  },
67
- "engines": {
68
- "dsh": ">= 0.2.1-rc.1 < 0.2.2"
69
- },
70
70
  "scripts": {
71
71
  "build": "pnpm exec tsdown",
72
72
  "test:e2e": "pnpm exec vitest run --config vitest.e2e.config.ts"
@@ -27,7 +27,7 @@ export const inject = ["locale"];
27
27
 
28
28
  // 给这一行的四个字段补文案。
29
29
  export function apply(ctx: Context): void {
30
- // 基础面随本包 inline(不再是装配行):装上它提供的字典、字段槽与按行配置页;多份副本只装一次。
30
+ // 基础面(内联库)由 `@morlay/dsh-client-modules` 的 client 行统一装配;这里只注册本行的字段文案。
31
31
  const t = ctx.locale.bind(NS);
32
32
  ctx.effect(() => ctx.locale.register(NS, { zh, en }), "web-search-ollama: field locale");
33
33
  // 提示面由行配置表单提供:等它可用再注册(`ctx.get` 在它还没提供时拿不到,注册会被静静跳过)。