@wingsky-1/dsh-decision-gateway 0.2.6
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/LICENSE +21 -0
- package/README.en.md +56 -0
- package/README.md +56 -0
- package/cordis.patch.yml +7 -0
- package/lib/THIRD-PARTY-LICENSES +35 -0
- package/lib/client/api/contract.d.ts +37 -0
- package/lib/client/api/interface.d.ts +9 -0
- package/lib/client/api/routes.d.ts +11 -0
- package/lib/client/index.d.ts +8 -0
- package/lib/client/locale.d.ts +31 -0
- package/lib/client/locales.d.ts +122 -0
- package/lib/client/settings/card.d.ts +7 -0
- package/lib/client/settings/connection.d.ts +10 -0
- package/lib/client/settings/format.d.ts +4 -0
- package/lib/client/settings/history.d.ts +9 -0
- package/lib/client/settings/presets.d.ts +9 -0
- package/lib/client/settings/prob.d.ts +10 -0
- package/lib/client.js +1518 -0
- package/lib/index.d.ts +32 -0
- package/lib/index.js +3142 -0
- package/lib/server/api/deps.d.ts +53 -0
- package/lib/server/api/impl/handlers.d.ts +11 -0
- package/lib/server/api/impl/route.d.ts +28 -0
- package/lib/server/api/impl/service.d.ts +4 -0
- package/lib/server/api/interface.d.ts +3 -0
- package/lib/server/config/deps.d.ts +32 -0
- package/lib/server/config/impl/envelope.d.ts +9 -0
- package/lib/server/config/impl/model.d.ts +54 -0
- package/lib/server/config/impl/paths.d.ts +12 -0
- package/lib/server/config/impl/service.d.ts +37 -0
- package/lib/server/config/interface.d.ts +12 -0
- package/lib/server/history/deps.d.ts +25 -0
- package/lib/server/history/impl/entry.d.ts +29 -0
- package/lib/server/history/impl/hash.d.ts +8 -0
- package/lib/server/history/impl/paths.d.ts +2 -0
- package/lib/server/history/impl/redact.d.ts +2 -0
- package/lib/server/history/impl/service.d.ts +30 -0
- package/lib/server/history/interface.d.ts +4 -0
- package/lib/server/store/deps.d.ts +6 -0
- package/lib/server/store/impl/io.d.ts +24 -0
- package/lib/server/store/interface.d.ts +4 -0
- package/lib/server/tools/deps.d.ts +83 -0
- package/lib/server/tools/impl/client.d.ts +62 -0
- package/lib/server/tools/impl/define.d.ts +30 -0
- package/lib/server/tools/impl/precheck.d.ts +8 -0
- package/lib/server/tools/impl/probe.d.ts +24 -0
- package/lib/server/tools/impl/semaphore.d.ts +4 -0
- package/lib/server/tools/impl/service.d.ts +18 -0
- package/lib/server/tools/impl/validate.d.ts +17 -0
- package/lib/server/tools/interface.d.ts +7 -0
- package/lib/server/upgrade/deps.d.ts +37 -0
- package/lib/server/upgrade/impl/service.d.ts +13 -0
- package/lib/server/upgrade/impl/steps.d.ts +3 -0
- package/lib/server/upgrade/interface.d.ts +6 -0
- package/lib/shared/contract.d.ts +184 -0
- package/lib/shared/interface.d.ts +7 -0
- package/package.json +99 -0
- package/shared/client/ensure-style.d.ts +21 -0
- package/shared/client/i18n.d.ts +15 -0
- package/shared/dsh-home.d.ts +15 -0
- package/shared/host-utils.d.ts +65 -0
- package/shared/loopback.d.ts +21 -0
- package/shared/paths.d.ts +12 -0
- package/shared/settings-namespace.d.ts +82 -0
- package/shared/sse-hub.d.ts +76 -0
- package/shared/upgrade-tick.d.ts +11 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 宿主端组合根:收窄宿主上下文、按依赖顺序装配各域、卸载逆序释放。
|
|
3
|
+
*
|
|
4
|
+
* 本文件是唯一认识 ctx 的地方:bindHost 把 ctx 收窄为窄面端口,各域只拿能力、
|
|
5
|
+
* 不拿上下文(静态端口装配写法照 dsh-mcp-manager 入口:bind 结果进 assemble,
|
|
6
|
+
* 域经 deps 注入,释放器进栈由 ctx.effect 统一摘)。
|
|
7
|
+
* 配置每次现读磁盘(小文件,无缓存无过期);状态住闭包,不住模块级变量。
|
|
8
|
+
*/
|
|
9
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
10
|
+
import { ROUTES } from "./shared/interface.js";
|
|
11
|
+
import type { FetchImpl } from "./server/tools/interface.js";
|
|
12
|
+
/** 路由清单经这里出去,构建期注入客户端(bundle-host 只认入口的 ROUTES 导出)。 */
|
|
13
|
+
export { ROUTES };
|
|
14
|
+
/** 稳定的 cordis 插件名。 */
|
|
15
|
+
export declare const name = "decision-gateway";
|
|
16
|
+
/** 依赖的宿主服务(路由 + 模型工具注册 + 会话目录/标题解析)。sessions/sessionTitle 缺席即降级(用法见 provider-usage 同款接线)。 */
|
|
17
|
+
export declare const inject: string[];
|
|
18
|
+
/** 组合层入口配置(挂载点传入;用户配置住自有三文件,不在此展开)。 */
|
|
19
|
+
export interface DecisionGatewayApplyConfig {
|
|
20
|
+
/** 总开关;false 时不注册工具与路由。 */
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
/** 落盘根覆盖(缺席即 DSH home;测试走 mkdtempSync 隔离目录)。 */
|
|
23
|
+
home?: string;
|
|
24
|
+
/** fetch 注入(缺席即全局 fetch;单测注入 mock)。 */
|
|
25
|
+
fetchImpl?: FetchImpl;
|
|
26
|
+
/** 环境注入(缺席即 process.env;单测传对象,消除真实环境读写)。 */
|
|
27
|
+
env?: Record<string, string | undefined>;
|
|
28
|
+
}
|
|
29
|
+
/** 挂载 dsh-decision-gateway。 */
|
|
30
|
+
export declare function apply(ctx: Context, config?: DecisionGatewayApplyConfig): void;
|
|
31
|
+
/** 配置快照类型(安装面/配置面导出; narrow 类型由各域门面承载)。 */
|
|
32
|
+
export type { ConfigV1 } from "./shared/interface.js";
|