@morlay/dsh-web-search-ollama 0.0.3 → 0.0.5

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.d.cts CHANGED
@@ -13,14 +13,13 @@ declare const zh: {
13
13
  type WebSearchFieldLocaleKey = keyof typeof zh;
14
14
  //#endregion
15
15
  //#region src/client/index.d.ts
16
- declare const WEB_SEARCH_NS = "web-search-ollama";
17
- declare const NS = "settings.web-search-ollama";
16
+ export declare const WEB_SEARCH_NS = "web-search-ollama";
17
+ export declare const NS = "settings.web-search-ollama";
18
18
  declare module "@deepseek-ai/dsh-client-ui-slots" {
19
19
  interface LocaleNamespaceMap {
20
20
  "settings.web-search-ollama": WebSearchFieldLocaleKey;
21
21
  }
22
22
  }
23
- declare const inject: string[];
24
- declare function apply(ctx: Context): void;
25
- //#endregion
26
- export { NS, WEB_SEARCH_NS, apply, inject };
23
+ export declare const inject: string[];
24
+ export declare function apply(ctx: Context): void;
25
+ //#endregion
package/dist/client.d.mts CHANGED
@@ -13,14 +13,13 @@ declare const zh: {
13
13
  type WebSearchFieldLocaleKey = keyof typeof zh;
14
14
  //#endregion
15
15
  //#region src/client/index.d.ts
16
- declare const WEB_SEARCH_NS = "web-search-ollama";
17
- declare const NS = "settings.web-search-ollama";
16
+ export declare const WEB_SEARCH_NS = "web-search-ollama";
17
+ export declare const NS = "settings.web-search-ollama";
18
18
  declare module "@deepseek-ai/dsh-client-ui-slots" {
19
19
  interface LocaleNamespaceMap {
20
20
  "settings.web-search-ollama": WebSearchFieldLocaleKey;
21
21
  }
22
22
  }
23
- declare const inject: string[];
24
- declare function apply(ctx: Context): void;
25
- //#endregion
26
- export { NS, WEB_SEARCH_NS, apply, inject };
23
+ export declare const inject: string[];
24
+ export declare function apply(ctx: Context): void;
25
+ //#endregion
package/dist/index.d.cts CHANGED
@@ -13,10 +13,10 @@ interface OllamaSearchResponse {
13
13
  }
14
14
  //#endregion
15
15
  //#region src/provider.d.ts
16
- declare const OLLAMA_PROVIDER_ID = "ollama";
17
- declare const OLLAMA_DEFAULT_BASE_URL = "https://ollama.com";
18
- declare const OLLAMA_DEFAULT_MAX_RESULTS = 5;
19
- declare const OLLAMA_MAX_RESULTS_LIMIT = 10;
16
+ export declare const OLLAMA_PROVIDER_ID = "ollama";
17
+ export declare const OLLAMA_DEFAULT_BASE_URL = "https://ollama.com";
18
+ export declare const OLLAMA_DEFAULT_MAX_RESULTS = 5;
19
+ export declare const OLLAMA_MAX_RESULTS_LIMIT = 10;
20
20
  interface OllamaSearchProviderOptions {
21
21
  apiKey?: string | undefined;
22
22
  resolveApiKey?: () => Promise<string | undefined>;
@@ -24,9 +24,9 @@ interface OllamaSearchProviderOptions {
24
24
  baseURL: string;
25
25
  maxResults?: number | undefined;
26
26
  }
27
- declare function mapOllamaResult(result: OllamaSearchResult): WebSearchSource | undefined;
28
- declare function mapOllamaResponse(response: OllamaSearchResponse): WebSearchResult;
29
- declare class OllamaSearchProvider implements WebSearchProvider {
27
+ export declare function mapOllamaResult(result: OllamaSearchResult): WebSearchSource | undefined;
28
+ export declare function mapOllamaResponse(response: OllamaSearchResponse): WebSearchResult;
29
+ export declare class OllamaSearchProvider implements WebSearchProvider {
30
30
  private readonly options;
31
31
  readonly id = "ollama";
32
32
  constructor(options: OllamaSearchProviderOptions);
@@ -36,21 +36,21 @@ declare class OllamaSearchProvider implements WebSearchProvider {
36
36
  }
37
37
  //#endregion
38
38
  //#region src/index.d.ts
39
- declare const name = "web-search-ollama";
40
- declare const inject: string[];
41
- interface Config {
39
+ export declare const name = "web-search-ollama";
40
+ export declare const inject: string[];
41
+ export interface Config {
42
42
  apiKey?: string;
43
43
  apiKeyEnv?: string;
44
44
  baseURL?: string;
45
45
  maxResults?: number;
46
46
  }
47
- interface ResolvedConfig {
47
+ export interface ResolvedConfig {
48
48
  readonly apiKey: Volatile<string | undefined>;
49
49
  readonly apiKeyEnv: Volatile<string | undefined>;
50
50
  readonly baseURL: Volatile<string | undefined>;
51
51
  readonly maxResults: Volatile<number | undefined>;
52
52
  }
53
- declare const Config: z<Config, ResolvedConfig>;
54
- declare function apply(ctx: Context, config: ResolvedConfig): void;
53
+ export declare const Config: z<Config, ResolvedConfig>;
54
+ export declare function apply(ctx: Context, config: ResolvedConfig): void;
55
55
  //#endregion
56
- export { Config, OLLAMA_DEFAULT_BASE_URL, OLLAMA_DEFAULT_MAX_RESULTS, OLLAMA_MAX_RESULTS_LIMIT, OLLAMA_PROVIDER_ID, OllamaSearchProvider, type OllamaSearchProviderOptions, ResolvedConfig, apply, inject, mapOllamaResponse, mapOllamaResult, name };
56
+ export type { OllamaSearchProviderOptions };
package/dist/index.d.mts CHANGED
@@ -13,10 +13,10 @@ interface OllamaSearchResponse {
13
13
  }
14
14
  //#endregion
15
15
  //#region src/provider.d.ts
16
- declare const OLLAMA_PROVIDER_ID = "ollama";
17
- declare const OLLAMA_DEFAULT_BASE_URL = "https://ollama.com";
18
- declare const OLLAMA_DEFAULT_MAX_RESULTS = 5;
19
- declare const OLLAMA_MAX_RESULTS_LIMIT = 10;
16
+ export declare const OLLAMA_PROVIDER_ID = "ollama";
17
+ export declare const OLLAMA_DEFAULT_BASE_URL = "https://ollama.com";
18
+ export declare const OLLAMA_DEFAULT_MAX_RESULTS = 5;
19
+ export declare const OLLAMA_MAX_RESULTS_LIMIT = 10;
20
20
  interface OllamaSearchProviderOptions {
21
21
  apiKey?: string | undefined;
22
22
  resolveApiKey?: () => Promise<string | undefined>;
@@ -24,9 +24,9 @@ interface OllamaSearchProviderOptions {
24
24
  baseURL: string;
25
25
  maxResults?: number | undefined;
26
26
  }
27
- declare function mapOllamaResult(result: OllamaSearchResult): WebSearchSource | undefined;
28
- declare function mapOllamaResponse(response: OllamaSearchResponse): WebSearchResult;
29
- declare class OllamaSearchProvider implements WebSearchProvider {
27
+ export declare function mapOllamaResult(result: OllamaSearchResult): WebSearchSource | undefined;
28
+ export declare function mapOllamaResponse(response: OllamaSearchResponse): WebSearchResult;
29
+ export declare class OllamaSearchProvider implements WebSearchProvider {
30
30
  private readonly options;
31
31
  readonly id = "ollama";
32
32
  constructor(options: OllamaSearchProviderOptions);
@@ -36,21 +36,21 @@ declare class OllamaSearchProvider implements WebSearchProvider {
36
36
  }
37
37
  //#endregion
38
38
  //#region src/index.d.ts
39
- declare const name = "web-search-ollama";
40
- declare const inject: string[];
41
- interface Config {
39
+ export declare const name = "web-search-ollama";
40
+ export declare const inject: string[];
41
+ export interface Config {
42
42
  apiKey?: string;
43
43
  apiKeyEnv?: string;
44
44
  baseURL?: string;
45
45
  maxResults?: number;
46
46
  }
47
- interface ResolvedConfig {
47
+ export interface ResolvedConfig {
48
48
  readonly apiKey: Volatile<string | undefined>;
49
49
  readonly apiKeyEnv: Volatile<string | undefined>;
50
50
  readonly baseURL: Volatile<string | undefined>;
51
51
  readonly maxResults: Volatile<number | undefined>;
52
52
  }
53
- declare const Config: z<Config, ResolvedConfig>;
54
- declare function apply(ctx: Context, config: ResolvedConfig): void;
53
+ export declare const Config: z<Config, ResolvedConfig>;
54
+ export declare function apply(ctx: Context, config: ResolvedConfig): void;
55
55
  //#endregion
56
- export { Config, OLLAMA_DEFAULT_BASE_URL, OLLAMA_DEFAULT_MAX_RESULTS, OLLAMA_MAX_RESULTS_LIMIT, OLLAMA_PROVIDER_ID, OllamaSearchProvider, type OllamaSearchProviderOptions, ResolvedConfig, apply, inject, mapOllamaResponse, mapOllamaResult, name };
56
+ export type { OllamaSearchProviderOptions };
package/dist/rows.d.cts CHANGED
@@ -1,13 +1,12 @@
1
1
  //#region src/rows.d.ts
2
- interface PatchRow {
2
+ export interface PatchRow {
3
3
  readonly id?: string;
4
4
  readonly insert?: readonly RowEntry[];
5
5
  }
6
- interface RowEntry {
6
+ export interface RowEntry {
7
7
  readonly id: string;
8
8
  readonly name: string;
9
9
  readonly config?: Readonly<Record<string, unknown>>;
10
10
  }
11
- declare function webSearchRows(): readonly PatchRow[];
12
- //#endregion
13
- export { PatchRow, RowEntry, webSearchRows };
11
+ export declare function webSearchRows(): readonly PatchRow[];
12
+ //#endregion
package/dist/rows.d.mts CHANGED
@@ -1,13 +1,12 @@
1
1
  //#region src/rows.d.ts
2
- interface PatchRow {
2
+ export interface PatchRow {
3
3
  readonly id?: string;
4
4
  readonly insert?: readonly RowEntry[];
5
5
  }
6
- interface RowEntry {
6
+ export interface RowEntry {
7
7
  readonly id: string;
8
8
  readonly name: string;
9
9
  readonly config?: Readonly<Record<string, unknown>>;
10
10
  }
11
- declare function webSearchRows(): readonly PatchRow[];
12
- //#endregion
13
- export { PatchRow, RowEntry, webSearchRows };
11
+ export declare function webSearchRows(): readonly PatchRow[];
12
+ //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morlay/dsh-web-search-ollama",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
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",
@@ -35,27 +35,25 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@deepseek-ai/cosmokit": "1.8.5",
38
- "@deepseek-ai/dsh-client-locale": "0.2.0-rc.1",
39
- "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1",
40
- "@morlay/dsh-client-ui-primitives": "0.0.5"
38
+ "@deepseek-ai/dsh-client-locale": "0.2.0-rc.2",
39
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
40
+ "@morlay/dsh-client-ui-primitives": "0.0.7"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@deepseek-ai/cordis": "^4.0.4",
44
44
  "@deepseek-ai/cosmokit": "^1.8.5",
45
- "@deepseek-ai/dsh-client-locale": "^0.2.0-rc.1",
46
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.1",
47
- "@deepseek-ai/dsh-credentials": "^0.2.0-rc.1",
48
- "@deepseek-ai/dsh-launch-environment": "^0.2.0-rc.1",
49
- "@deepseek-ai/dsh-web": "^0.2.0-rc.1",
50
- "@morlay/dsh-client-ui-primitives": "0.0.5"
45
+ "@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2",
46
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2",
47
+ "@deepseek-ai/dsh-credentials": "^0.2.0-rc.2",
48
+ "@deepseek-ai/dsh-launch-environment": "^0.2.0-rc.2",
49
+ "@deepseek-ai/dsh-web": "^0.2.0-rc.2"
51
50
  },
52
51
  "dsh": {
53
52
  "client": {
54
53
  "platform": "web",
55
54
  "inject": [
56
55
  "@deepseek-ai/dsh-client-locale",
57
- "@deepseek-ai/dsh-client-ui-slots",
58
- "@morlay/dsh-client-ui-primitives"
56
+ "@deepseek-ai/dsh-client-ui-slots"
59
57
  ]
60
58
  }
61
59
  },
@@ -4,6 +4,7 @@
4
4
  import type { Context } from "@deepseek-ai/cordis";
5
5
  import type {} from "@deepseek-ai/dsh-client-locale/client";
6
6
  import type {} from "@deepseek-ai/dsh-client-ui-slots";
7
+ import { apply as installUiPrimitives } from "@morlay/dsh-client-ui-primitives/client";
7
8
  import { en, zh, type WebSearchFieldLocaleKey } from "./locales.ts";
8
9
 
9
10
  // 本包 host 行 id:行配置页读的就是这个命名空间。
@@ -27,6 +28,8 @@ export const inject = ["locale"];
27
28
 
28
29
  // 给这一行的四个字段补文案。
29
30
  export function apply(ctx: Context): void {
31
+ // 基础面随本包 inline(不再是装配行):装上它提供的字典、字段槽与按行配置页;多份副本只装一次。
32
+ installUiPrimitives(ctx);
30
33
  const t = ctx.locale.bind(NS);
31
34
  ctx.effect(() => ctx.locale.register(NS, { zh, en }), "web-search-ollama: field locale");
32
35
  // 提示面由行配置表单提供:等它可用再注册(`ctx.get` 在它还没提供时拿不到,注册会被静静跳过)。