qlogicagent 2.20.2 → 2.20.3
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/agent-contract.js +1 -1
- package/dist/agent.js +39 -35
- package/dist/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/host-session-collection-contract.js +1 -1
- package/dist/index.js +624 -549
- package/dist/memory-category-contract.js +1 -0
- package/dist/orchestration.js +1 -1
- package/dist/project-memory-host.js +21 -21
- package/dist/protocol.js +1 -1
- package/dist/skill-category-contract.js +1 -0
- package/dist/skills/builtin/web-research/SKILL.md +37 -0
- package/dist/skills/mcp/astraclaw-native-mcp-server.js +1 -1
- package/dist/tunables.js +1 -1
- package/dist/types/agent/memory-recall-context.d.ts +6 -9
- package/dist/types/agent/memory-recall-injection.d.ts +1 -6
- package/dist/types/agent/tool-loop/agent-argument-normalizer.d.ts +12 -0
- package/dist/types/agent/tool-loop/artifact-final-contract.d.ts +8 -0
- package/dist/types/agent/tool-loop.d.ts +5 -0
- package/dist/types/agent/types.d.ts +5 -0
- package/dist/types/cli/acp-extended-handlers.d.ts +11 -9
- package/dist/types/cli/acp-session-handlers.d.ts +1 -1
- package/dist/types/cli/acp-session-host.d.ts +8 -0
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +7 -1
- package/dist/types/cli/agent-runtime-session-state.d.ts +23 -6
- package/dist/types/cli/atomic-text-file.d.ts +31 -0
- package/dist/types/cli/background-context-capsule.d.ts +12 -0
- package/dist/types/cli/base-tool-bootstrap.d.ts +1 -0
- package/dist/types/cli/cli-acp-request-handler.d.ts +3 -1
- package/dist/types/cli/community-workflow-installer.d.ts +1 -1
- package/dist/types/cli/core-tool-coordinator.d.ts +1 -0
- package/dist/types/cli/core-tools/agent-tool-service.d.ts +17 -1
- package/dist/types/cli/dev-tool-bootstrap.d.ts +3 -2
- package/dist/types/cli/dev-tools/dev-tool-bootstrap-service.d.ts +1 -0
- package/dist/types/cli/dev-tools/dev-tool-registry.d.ts +3 -1
- package/dist/types/cli/dev-tools/incremental-repo-map.d.ts +81 -0
- package/dist/types/cli/dev-tools/lsp-supervisor.d.ts +59 -0
- package/dist/types/cli/dev-tools/lsp-tool-service.d.ts +2 -0
- package/dist/types/cli/handlers/dream-handler.d.ts +1 -1
- package/dist/types/cli/handlers/memory-handler.d.ts +2 -14
- package/dist/types/cli/handlers/product-handler.d.ts +6 -24
- package/dist/types/cli/handlers/turn-handler.d.ts +1 -0
- package/dist/types/cli/idle-dream-coordinator.d.ts +9 -5
- package/dist/types/cli/memory-background-coordinator.d.ts +26 -0
- package/dist/types/cli/memory-candidate-service.d.ts +2 -3
- package/dist/types/cli/memory-coordinator.d.ts +12 -8
- package/dist/types/cli/permission-bootstrap.d.ts +10 -1
- package/dist/types/cli/product-acp-params.d.ts +29 -0
- package/dist/types/cli/resolved-agent-cache.d.ts +18 -7
- package/dist/types/cli/rpc-registry.d.ts +2 -1
- package/dist/types/cli/runtime-hook-bootstrap.d.ts +2 -0
- package/dist/types/cli/stdio-acp-request-host.d.ts +7 -4
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +8 -2
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +4 -2
- package/dist/types/cli/stdio-runtime-bootstrap.d.ts +1 -0
- package/dist/types/cli/stdio-server.d.ts +49 -16
- package/dist/types/cli/stdio-session-runtime-coordinator.d.ts +0 -2
- package/dist/types/cli/task-distillation-coordinator.d.ts +42 -14
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +14 -4
- package/dist/types/cli/tool-bootstrap.d.ts +2 -1
- package/dist/types/cli/turn-core.d.ts +4 -0
- package/dist/types/cli/turn-lifecycle.d.ts +1 -0
- package/dist/types/contracts/hooks.d.ts +3 -2
- package/dist/types/contracts/turn-event.d.ts +7 -0
- package/dist/types/host-contract/index.d.ts +111 -12
- package/dist/types/host-contract/memory-category.d.ts +8 -0
- package/dist/types/host-contract/skill-category.d.ts +5 -0
- package/dist/types/host-session-collection-contract.d.ts +1 -0
- package/dist/types/orchestration/agent-instance.d.ts +15 -0
- package/dist/types/orchestration/dag-scheduler.d.ts +18 -0
- package/dist/types/orchestration/delegate-approval-policy.d.ts +8 -0
- package/dist/types/orchestration/goal-acceptance.d.ts +2 -5
- package/dist/types/orchestration/goal-loop-coordinator.d.ts +4 -2
- package/dist/types/orchestration/goal-mode-adapters.d.ts +16 -0
- package/dist/types/orchestration/goal-run-types.d.ts +6 -1
- package/dist/types/orchestration/product-budget.d.ts +35 -16
- package/dist/types/orchestration/product-persistence.d.ts +5 -14
- package/dist/types/orchestration/product-planner.d.ts +38 -0
- package/dist/types/orchestration/product-worktree.d.ts +4 -2
- package/dist/types/orchestration/solo-evaluator.d.ts +42 -2
- package/dist/types/orchestration/solo-spec-builder.d.ts +3 -0
- package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +6 -0
- package/dist/types/orchestration/testing/run-state-client-double.d.ts +13 -0
- package/dist/types/orchestration/workflow/builtin-capabilities.d.ts +3 -0
- package/dist/types/orchestration/workflow/capability-catalog.d.ts +31 -0
- package/dist/types/orchestration/workflow/cron-schedule.d.ts +3 -4
- package/dist/types/orchestration/workflow/expression.d.ts +2 -1
- package/dist/types/orchestration/workflow/n8n-import.d.ts +3 -0
- package/dist/types/orchestration/workflow/node-registry.d.ts +2 -2
- package/dist/types/orchestration/workflow/node-schema.d.ts +20 -4
- package/dist/types/orchestration/workflow/params-schema.d.ts +7 -6
- package/dist/types/orchestration/workflow/qla-executor-host.d.ts +4 -1
- package/dist/types/orchestration/workflow/run-history-store.d.ts +33 -3
- package/dist/types/orchestration/workflow/semantic-acceptance.d.ts +65 -0
- package/dist/types/orchestration/workflow/workflow-authoring.d.ts +74 -0
- package/dist/types/orchestration/workflow/workflow-bundle.d.ts +4 -0
- package/dist/types/orchestration/workflow/workflow-controller.d.ts +16 -4
- package/dist/types/orchestration/workflow/workflow-edit-context.d.ts +46 -0
- package/dist/types/orchestration/workflow/workflow-intent-contract.d.ts +56 -0
- package/dist/types/orchestration/workflow/workflow-patch.d.ts +7 -0
- package/dist/types/orchestration/workflow/workflow-runtime.d.ts +5 -0
- package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +11 -0
- package/dist/types/orchestration/workflow/workflow-store.d.ts +5 -0
- package/dist/types/orchestration/workflow/workflow-template-setup.d.ts +65 -0
- package/dist/types/orchestration/workflow/workflow-trigger.d.ts +4 -0
- package/dist/types/orchestration/workflow-chat-builder.d.ts +105 -20
- package/dist/types/orchestration/worktree-task-prompt.d.ts +1 -0
- package/dist/types/protocol/agent-contract.d.ts +49 -8
- package/dist/types/protocol/notifications.d.ts +1 -1
- package/dist/types/protocol/wire/acp-agent-management.d.ts +97 -9
- package/dist/types/protocol/wire/acp-protocol.d.ts +7 -1
- package/dist/types/protocol/wire/agent-methods.d.ts +15 -1
- package/dist/types/protocol/wire/index.d.ts +2 -4
- package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +1 -39
- package/dist/types/protocol/wire/notification-payloads.d.ts +96 -1
- package/dist/types/protocol/wire/web-capability.d.ts +2 -2
- package/dist/types/runtime/config/tunable-defaults.d.ts +0 -6
- package/dist/types/runtime/execution/bounded-output-tail.d.ts +7 -0
- package/dist/types/runtime/execution/dream-agent.d.ts +8 -5
- package/dist/types/runtime/execution/dream-category-context.d.ts +3 -3
- package/dist/types/runtime/execution/structured-tool-progress.d.ts +21 -0
- package/dist/types/runtime/hooks/memory-hooks.d.ts +20 -8
- package/dist/types/runtime/infra/background-tasks.d.ts +5 -1
- package/dist/types/runtime/infra/subagent-turn-snapshot.d.ts +32 -0
- package/dist/types/runtime/infra/turn-telemetry-store.d.ts +22 -0
- package/dist/types/runtime/memory/implicit-extraction.d.ts +23 -7
- package/dist/types/runtime/ports/agent-runtime-ports.d.ts +0 -5
- package/dist/types/runtime/ports/index.d.ts +2 -3
- package/dist/types/runtime/ports/memory-provider.d.ts +31 -16
- package/dist/types/runtime/ports/memory-writer.d.ts +55 -6
- package/dist/types/runtime/ports/permission-contracts.d.ts +2 -0
- package/dist/types/runtime/ports/tool-contracts.d.ts +3 -1
- package/dist/types/runtime/prompt/identity-section.d.ts +2 -0
- package/dist/types/runtime/session/session-permission-store.d.ts +6 -0
- package/dist/types/runtime/tasks/task-types.d.ts +2 -0
- package/dist/types/skills/memory/host-memory-provider.d.ts +59 -9
- package/dist/types/skills/memory/memory-tool.d.ts +3 -1
- package/dist/types/skills/memory/task-distillation.d.ts +22 -3
- package/dist/types/skills/permissions/hook-runner.d.ts +8 -0
- package/dist/types/skills/permissions/operation-classifier.d.ts +7 -0
- package/dist/types/skills/skill-system/skill-category.d.ts +10 -0
- package/dist/types/skills/tools/agent-tool.d.ts +13 -21
- package/dist/types/skills/tools/edit-tool.d.ts +10 -2
- package/dist/types/skills/tools/exec-tool.d.ts +2 -2
- package/dist/types/skills/tools/file-text-snapshot.d.ts +24 -0
- package/dist/types/skills/tools/lsp-tool.d.ts +1 -1
- package/dist/types/skills/tools/patch-tool.d.ts +10 -3
- package/dist/types/skills/tools/read-tool.d.ts +23 -1
- package/dist/types/skills/tools/repo-map-tool.d.ts +52 -0
- package/dist/types/skills/tools/search-tool.d.ts +10 -1
- package/dist/types/skills/tools/shell/index.d.ts +1 -2
- package/dist/types/skills/tools/shell/shell-command.d.ts +1 -1
- package/dist/types/skills/tools/shell/shell-exec.d.ts +2 -2
- package/dist/types/skills/tools/shell/task-output.d.ts +12 -3
- package/dist/types/skills/tools/subagent-decision-tool.d.ts +15 -0
- package/dist/types/skills/tools/task-tool.d.ts +16 -2
- package/dist/types/skills/tools/write-tool.d.ts +2 -1
- package/dist/types/transport/acp-server.d.ts +1 -0
- package/dist/types/transport/host-run-state-client.d.ts +6 -0
- package/dist/types/workflow-host.d.ts +8 -1
- package/dist/workflow-host.js +9 -9
- package/package.json +25 -6
- package/dist/types/cli/tool-bootstrap-web-registration.d.ts +0 -14
- package/dist/types/orchestration/tool-cascade.d.ts +0 -49
- package/dist/types/protocol/wire/channel-ingress.d.ts +0 -29
- package/dist/types/protocol/wire/channel.d.ts +0 -89
- package/dist/types/runtime/infra/native-mcp-config-sync.d.ts +0 -16
- package/dist/types/runtime/memory/categories.d.ts +0 -5
- package/dist/types/runtime/memory/recall-category-filter.d.ts +0 -42
- package/dist/types/runtime/ports/source-provider.d.ts +0 -39
- package/dist/types/runtime/ports/web-search-contracts.d.ts +0 -21
- package/dist/types/server/search-svc.d.ts +0 -1
- package/dist/types/skills/memory/local-embedding.d.ts +0 -80
- package/dist/types/skills/memory/memory-config-resolver.d.ts +0 -4
- package/dist/types/skills/memory/memory-embedding-config.d.ts +0 -31
- package/dist/types/skills/tools/web-answer-tool.d.ts +0 -27
- package/dist/types/skills/tools/web-fetch-tool.d.ts +0 -80
- package/dist/types/skills/tools/web-research-tool.d.ts +0 -48
- package/dist/types/skills/tools/web-search-tool.d.ts +0 -46
- package/dist/types/skills/web-search/brave-source.d.ts +0 -3
- package/dist/types/skills/web-search/crawl4ai-extractor.d.ts +0 -16
- package/dist/types/skills/web-search/embedding-rerank.d.ts +0 -13
- package/dist/types/skills/web-search/exa-source.d.ts +0 -3
- package/dist/types/skills/web-search/multi-source-backend.d.ts +0 -23
- package/dist/types/skills/web-search/redis-source-cache.d.ts +0 -6
- package/dist/types/skills/web-search/search-svc-source.d.ts +0 -5
- package/dist/types/skills/web-search/searxng-source.d.ts +0 -4
- package/dist/types/skills/web-search/serper-source.d.ts +0 -3
- package/dist/types/skills/web-search/source-factory.d.ts +0 -6
- package/dist/types/skills/web-search/stability.d.ts +0 -26
- package/dist/types/skills/web-search/web-tunable-resolver.d.ts +0 -16
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
import type { WebAnswerToolDeps } from "./web-answer-tool.js";
|
|
3
|
-
export declare const WEB_RESEARCH_TOOL_NAME: "web_research";
|
|
4
|
-
export interface WebResearchToolParams {
|
|
5
|
-
task: string;
|
|
6
|
-
budget?: {
|
|
7
|
-
/** 搜-读-反思轮数上限(默认 2:首轮 + 1 轮 reflect 补搜) */
|
|
8
|
-
maxRounds?: number;
|
|
9
|
-
/** 墙钟时间上限 ms(默认 120000) */
|
|
10
|
-
maxWallClockMs?: number;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare const WEB_RESEARCH_TOOL_SCHEMA: {
|
|
14
|
-
readonly type: "object";
|
|
15
|
-
readonly properties: {
|
|
16
|
-
readonly task: {
|
|
17
|
-
readonly type: "string";
|
|
18
|
-
readonly description: string;
|
|
19
|
-
};
|
|
20
|
-
readonly budget: {
|
|
21
|
-
readonly type: "object";
|
|
22
|
-
readonly properties: {
|
|
23
|
-
readonly maxRounds: {
|
|
24
|
-
readonly type: "number";
|
|
25
|
-
readonly description: "Max search-read-reflect rounds (default 2).";
|
|
26
|
-
};
|
|
27
|
-
readonly maxWallClockMs: {
|
|
28
|
-
readonly type: "number";
|
|
29
|
-
readonly description: "Max wall-clock time in ms (default 120000).";
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
readonly description: "Hard budget caps to prevent runaway research.";
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
readonly required: readonly ["task"];
|
|
36
|
-
};
|
|
37
|
-
/** 与 web_answer 同 deps + 可选写记忆(host 注入;无则跳过,details 如实标注)。 */
|
|
38
|
-
export interface WebResearchToolDeps extends WebAnswerToolDeps {
|
|
39
|
-
/**
|
|
40
|
-
* 可选:把研究结论写入长期记忆(§14)。内部经 consolidator 去重/重要度过滤(§15-7),
|
|
41
|
-
* 返回是否成功提交(不保证最终入库条数)。
|
|
42
|
-
*/
|
|
43
|
-
saveMemory?(text: string, meta: {
|
|
44
|
-
source: string;
|
|
45
|
-
category: string;
|
|
46
|
-
}): Promise<boolean>;
|
|
47
|
-
}
|
|
48
|
-
export declare function createWebResearchTool(deps: WebResearchToolDeps): PortableTool<WebResearchToolParams>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
import type { WebSearchBackend, WebSearchOutput, WebSearchResult } from "../../runtime/ports/web-search-contracts.js";
|
|
3
|
-
export declare const WEB_SEARCH_TOOL_NAME: "web_search";
|
|
4
|
-
export interface WebSearchToolParams {
|
|
5
|
-
query: string;
|
|
6
|
-
allowedDomains?: string[];
|
|
7
|
-
blockedDomains?: string[];
|
|
8
|
-
freshness?: "day" | "week" | "month" | "year" | "any";
|
|
9
|
-
}
|
|
10
|
-
export declare const WEB_SEARCH_TOOL_SCHEMA: {
|
|
11
|
-
readonly type: "object";
|
|
12
|
-
readonly properties: {
|
|
13
|
-
readonly query: {
|
|
14
|
-
readonly type: "string";
|
|
15
|
-
readonly description: "Search query string. Be specific and concise for best results.";
|
|
16
|
-
};
|
|
17
|
-
readonly allowedDomains: {
|
|
18
|
-
readonly type: "array";
|
|
19
|
-
readonly items: {
|
|
20
|
-
readonly type: "string";
|
|
21
|
-
};
|
|
22
|
-
readonly description: string;
|
|
23
|
-
};
|
|
24
|
-
readonly blockedDomains: {
|
|
25
|
-
readonly type: "array";
|
|
26
|
-
readonly items: {
|
|
27
|
-
readonly type: "string";
|
|
28
|
-
};
|
|
29
|
-
readonly description: "Exclude results from these domains. Cannot be used together with allowedDomains.";
|
|
30
|
-
};
|
|
31
|
-
readonly freshness: {
|
|
32
|
-
readonly type: "string";
|
|
33
|
-
readonly enum: readonly ["day", "week", "month", "year", "any"];
|
|
34
|
-
readonly description: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
readonly required: readonly ["query"];
|
|
38
|
-
};
|
|
39
|
-
export type { WebSearchOutput, WebSearchResult };
|
|
40
|
-
/**
|
|
41
|
-
* Host-provided web search backend.
|
|
42
|
-
* The host may use any search engine (SearXNG, Brave, Tavily, etc.).
|
|
43
|
-
*/
|
|
44
|
-
export interface WebSearchToolDeps extends WebSearchBackend {
|
|
45
|
-
}
|
|
46
|
-
export declare function createWebSearchTool(deps: WebSearchToolDeps): PortableTool<WebSearchToolParams>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { SourceProvider } from "../../runtime/ports/source-provider.js";
|
|
2
|
-
import { type WebTunableEnvironment, type WebTunableSnapshotResolver } from "./web-tunable-resolver.js";
|
|
3
|
-
export declare function createBraveSource(resolveTunables: WebTunableSnapshotResolver, env?: WebTunableEnvironment): SourceProvider;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type WebTunableEnvironment, type WebTunableSnapshotResolver } from "./web-tunable-resolver.js";
|
|
2
|
-
export interface ExtractedContent {
|
|
3
|
-
content: string;
|
|
4
|
-
title?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface Crawl4aiExtractor {
|
|
7
|
-
/** 提取 URL 正文为 markdown;失败/未配置/超时返回 null(让上层回退本地提取)。 */
|
|
8
|
-
extract(url: string, opts?: {
|
|
9
|
-
maxChars?: number;
|
|
10
|
-
timeoutMs?: number;
|
|
11
|
-
signal?: AbortSignal;
|
|
12
|
-
}): Promise<ExtractedContent | null>;
|
|
13
|
-
/** 是否已配置 base url(诊断用)。 */
|
|
14
|
-
isConfigured(): Promise<boolean>;
|
|
15
|
-
}
|
|
16
|
-
export declare function createCrawl4aiExtractor(resolveTunables: WebTunableSnapshotResolver, env?: WebTunableEnvironment): Crawl4aiExtractor;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { RawHit } from "../../runtime/ports/source-provider.js";
|
|
2
|
-
import type { EmbeddingProvider } from "../memory/local-embedding.js";
|
|
3
|
-
export interface Reranker {
|
|
4
|
-
/** 按 query 语义相关性重排 hits;失败/无模型时返回原序(fail-loud,不破坏召回)。 */
|
|
5
|
-
rerank(query: string, hits: RawHit[]): Promise<RawHit[]>;
|
|
6
|
-
}
|
|
7
|
-
export interface EmbeddingRerankerDeps {
|
|
8
|
-
/** embedding provider 工厂(调用方注入,可异步懒解析)。dimensions=0 视为无模型 → 原序。 */
|
|
9
|
-
getProvider: () => EmbeddingProvider | Promise<EmbeddingProvider>;
|
|
10
|
-
/** 每条 hit 文本(title+snippet)最大字符,控 token。默认 512。 */
|
|
11
|
-
maxTextChars?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare function createEmbeddingReranker(deps: EmbeddingRerankerDeps): Reranker;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { SourceProvider } from "../../runtime/ports/source-provider.js";
|
|
2
|
-
import { type WebTunableEnvironment, type WebTunableSnapshotResolver } from "./web-tunable-resolver.js";
|
|
3
|
-
export declare function createExaSource(resolveTunables: WebTunableSnapshotResolver, env?: WebTunableEnvironment): SourceProvider;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { WebSearchBackend } from "../../runtime/ports/web-search-contracts.js";
|
|
2
|
-
import type { SourceProvider, SourceQueryOptions } from "../../runtime/ports/source-provider.js";
|
|
3
|
-
import type { SourceCache, CircuitBreaker } from "./stability.js";
|
|
4
|
-
import type { Reranker } from "./embedding-rerank.js";
|
|
5
|
-
export interface SourceRouter {
|
|
6
|
-
pick(query: string, sources: SourceProvider[], opts: SourceQueryOptions): SourceProvider[];
|
|
7
|
-
}
|
|
8
|
-
/** V0 默认路由:全部 source 都打(已被熔断器在调用前过滤)。L1 分类器路由留 V1。 */
|
|
9
|
-
export declare const allSourcesRouter: SourceRouter;
|
|
10
|
-
export interface MultiSourceConfig {
|
|
11
|
-
sources: SourceProvider[];
|
|
12
|
-
router?: SourceRouter;
|
|
13
|
-
cache?: SourceCache;
|
|
14
|
-
breaker?: CircuitBreaker;
|
|
15
|
-
/** 每个 source 的硬超时(ms);实测起点 4–5s */
|
|
16
|
-
perSourceTimeoutMs?: number;
|
|
17
|
-
cacheTtlMs?: number;
|
|
18
|
-
dedupe?: boolean;
|
|
19
|
-
maxResults?: number;
|
|
20
|
-
/** L3 语义重排器(可选);dedupe 后、截断前对 hits 按 query 相关性重排。 */
|
|
21
|
-
rerank?: Reranker;
|
|
22
|
-
}
|
|
23
|
-
export declare function createMultiSourceBackend(cfg: MultiSourceConfig): WebSearchBackend;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SourceCache } from "./stability.js";
|
|
2
|
-
export interface RedisSourceCacheHandle extends SourceCache {
|
|
3
|
-
/** 探活(svc /health 用) */
|
|
4
|
-
ping(): Promise<boolean>;
|
|
5
|
-
}
|
|
6
|
-
export declare function createRedisSourceCache(redisUrl: string): Promise<RedisSourceCacheHandle>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { SourceProvider } from "../../runtime/ports/source-provider.js";
|
|
2
|
-
import { type WebTunableEnvironment, type WebTunableSnapshotResolver } from "./web-tunable-resolver.js";
|
|
3
|
-
/** 解析 search-svc base url:host tunable 非空优先,空 override 才回退环境变量。 */
|
|
4
|
-
export declare function resolveSearchSvcBaseUrl(resolveTunables: WebTunableSnapshotResolver, env?: WebTunableEnvironment): Promise<string | undefined>;
|
|
5
|
-
export declare function createSearchSvcSource(resolveTunables: WebTunableSnapshotResolver, env?: WebTunableEnvironment): SourceProvider;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { SourceProvider } from "../../runtime/ports/source-provider.js";
|
|
2
|
-
import { type WebTunableEnvironment, type WebTunableSnapshotResolver } from "./web-tunable-resolver.js";
|
|
3
|
-
/** 解析 SearXNG base url:host tunable 非空优先,空 override 才回退环境变量。 */
|
|
4
|
-
export declare function createSearxngSource(resolveTunables: WebTunableSnapshotResolver, env?: WebTunableEnvironment): SourceProvider;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { SourceProvider } from "../../runtime/ports/source-provider.js";
|
|
2
|
-
import { type WebTunableEnvironment, type WebTunableSnapshotResolver } from "./web-tunable-resolver.js";
|
|
3
|
-
export declare function createSerperSource(resolveTunables: WebTunableSnapshotResolver, env?: WebTunableEnvironment): SourceProvider;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SourceProvider } from "../../runtime/ports/source-provider.js";
|
|
2
|
-
import type { WebTunableEnvironment, WebTunableSnapshotResolver } from "./web-tunable-resolver.js";
|
|
3
|
-
/**
|
|
4
|
-
* 组装 web_search 的 L0 数据源集合(运行期各源自行懒解析配置细节)。
|
|
5
|
-
*/
|
|
6
|
-
export declare function buildWebSearchSources(resolveTunables: WebTunableSnapshotResolver, env?: WebTunableEnvironment): SourceProvider[];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { RawHit } from "../../runtime/ports/source-provider.js";
|
|
2
|
-
export interface SourceCache {
|
|
3
|
-
get(key: string): Promise<RawHit[] | null>;
|
|
4
|
-
set(key: string, hits: RawHit[], ttlMs: number): Promise<void>;
|
|
5
|
-
}
|
|
6
|
-
export declare class InMemorySourceCache implements SourceCache {
|
|
7
|
-
private readonly maxEntries;
|
|
8
|
-
private store;
|
|
9
|
-
constructor(maxEntries?: number);
|
|
10
|
-
get(key: string): Promise<RawHit[] | null>;
|
|
11
|
-
set(key: string, hits: RawHit[], ttlMs: number): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
export interface CircuitBreaker {
|
|
14
|
-
canRequest(sourceId: string): boolean;
|
|
15
|
-
recordSuccess(sourceId: string): void;
|
|
16
|
-
recordFailure(sourceId: string): void;
|
|
17
|
-
}
|
|
18
|
-
export declare class InMemoryCircuitBreaker implements CircuitBreaker {
|
|
19
|
-
private readonly threshold;
|
|
20
|
-
private readonly cooldownMs;
|
|
21
|
-
private state;
|
|
22
|
-
constructor(threshold?: number, cooldownMs?: number);
|
|
23
|
-
canRequest(sourceId: string): boolean;
|
|
24
|
-
recordSuccess(sourceId: string): void;
|
|
25
|
-
recordFailure(sourceId: string): void;
|
|
26
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type TunableDefaults } from "../../tunables.js";
|
|
2
|
-
export type WebTunableSnapshot = Readonly<TunableDefaults>;
|
|
3
|
-
export type WebTunableSnapshotResolver = () => Promise<WebTunableSnapshot>;
|
|
4
|
-
export type WebTunableEnvironment = Record<string, string | undefined>;
|
|
5
|
-
/**
|
|
6
|
-
* Build one lazy snapshot for one web-tool invocation/search. The loader is not touched during
|
|
7
|
-
* synchronous registration; the first consumer starts it and all sibling consumers reuse the
|
|
8
|
-
* exact in-flight/settled Promise. Rejections are cached too so a host failure cannot degrade into
|
|
9
|
-
* a later env/local fallback inside the same invocation. Callers construct a fresh resolver for
|
|
10
|
-
* the next invoke so host updates are hot and a rejected request can retry.
|
|
11
|
-
*/
|
|
12
|
-
export declare function createWebTunableSnapshotResolver(loadOverrides: () => Promise<Record<string, unknown>>): WebTunableSnapshotResolver;
|
|
13
|
-
/** Explicit standalone-server mode: shared defaults + source-specific env fallback, no local store. */
|
|
14
|
-
export declare function createEnvOnlyWebTunableResolver(): WebTunableSnapshotResolver;
|
|
15
|
-
/** Non-empty host override wins; an empty shared-default/override alone permits the legacy env fallback. */
|
|
16
|
-
export declare function resolveWebTunableString(resolveSnapshot: WebTunableSnapshotResolver, key: keyof Pick<TunableDefaults, "exaApiKey" | "braveApiKey" | "serperApiKey" | "searxngBaseUrl" | "searchSvcBaseUrl" | "crawl4aiBaseUrl">, envName: string, env: WebTunableEnvironment): Promise<string | undefined>;
|