@dmh2002/dsh-connect-qoder 0.0.0-stage → 0.3.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/lib/index.d.ts ADDED
@@ -0,0 +1,56 @@
1
+ import z from "@deepseek-ai/schemastery";
2
+ import { Context } from "@deepseek-ai/cordis";
3
+ //#region src/upstream.d.ts
4
+ type QoderRegion = 'cn' | 'global';
5
+ //#endregion
6
+ //#region src/status-paths.d.ts
7
+ /**
8
+ * The project's public repository.
9
+ *
10
+ * Lives here rather than beside one component because TWO sections link to it
11
+ * — the model section and the account pool — and a second copy of a URL is a
12
+ * second thing to forget when it moves. Node-free and side-effect free, so it
13
+ * costs nothing on the Host side either.
14
+ */
15
+ declare const QODER_GITHUB_URL = "https://github.com/dingminhua/dsh-connect-qoder";
16
+ //#endregion
17
+ //#region src/version.d.ts
18
+ /**
19
+ * Package version, injected at build time by `tsdown.config.ts`.
20
+ *
21
+ * 参考:dsh-connect-workbuddy(MIT)——版本由构建期 define 注入,而非
22
+ * 运行时读 package.json(发布包只含 lib/,不含可解析的 package.json 路径)。
23
+ *
24
+ * @module dsh-connect-qoder/version
25
+ */
26
+ /** The npm package version this build was produced from. */
27
+ declare const QODER_CONNECT_VERSION: string;
28
+ //#endregion
29
+ //#region src/index.d.ts
30
+ declare const name = "dsh-connect-qoder";
31
+ /** The model registry and settings service required before providers register. */
32
+ declare const inject: string[];
33
+ /** The namespace the HOST actually serves this plugin under (workbuddy probe). */
34
+ declare function settingsNamespaceOf(ctx: unknown): string;
35
+ declare function asVolatile<T>(schema: z<T>): z<T>;
36
+ /** Unwrap a schemastery volatile's reactive `.get()` into a plain snapshot. */
37
+ declare function unwrapVolatile<T>(value: T): T;
38
+ interface Config {
39
+ regions: Record<string, unknown>;
40
+ }
41
+ declare const Config: z<Config>;
42
+ /** 某区域的配置状态(缺省返回空对象)。 */
43
+ declare function regionStateOf(config: {
44
+ regions?: Record<string, unknown> | null;
45
+ }, region: QoderRegion): Record<string, unknown>;
46
+ /** 某区域是否启用(opt-out)。 */
47
+ declare function regionEnabled(config: {
48
+ regions?: Record<string, unknown> | null;
49
+ }, region: QoderRegion): boolean;
50
+ /** 某区域是否配置了凭据(设置 PAT 或环境变量其一)。 */
51
+ declare function regionHasCredential(config: {
52
+ regions?: Record<string, unknown> | null;
53
+ }, region: QoderRegion): boolean;
54
+ declare function apply(ctx: Context, config: Config): void;
55
+ //#endregion
56
+ export { Config, QODER_CONNECT_VERSION, QODER_GITHUB_URL, apply, asVolatile, inject, name, regionEnabled, regionHasCredential, regionStateOf, settingsNamespaceOf, unwrapVolatile };