@dipertq/dsh-openviking-status 0.1.8 → 0.2.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 CHANGED
@@ -1,8 +1,36 @@
1
+ import z from '@deepseek-ai/schemastery';
2
+
3
+ interface HostCredentials {
4
+ endpoint: string;
5
+ apiKey?: string;
6
+ source: "env" | "ovcli" | "ov" | "default";
7
+ }
8
+ interface ResolveOptions {
9
+ cliConfigPath?: string;
10
+ ovConfigPath?: string;
11
+ }
1
12
  /**
2
- * OpenViking Status Backend plugin definition for Cordis runtime
13
+ * Resolves OpenViking connection credentials on the host side:
14
+ * 1. Environment variables (OPENVIKING_URL / OPENVIKING_BASE_URL, OPENVIKING_API_KEY / OPENVIKING_BEARER_TOKEN)
15
+ * 2. ~/.openviking/ovcli.conf (url, api_key)
16
+ * 3. ~/.openviking/ov.conf (server.url or server.host:server.port, server.root_api_key)
17
+ * 4. Default fallback: http://127.0.0.1:1933
3
18
  */
4
- declare const name = "dsh-openviking-status";
19
+ declare function resolveHostCredentials(env?: NodeJS.ProcessEnv | Record<string, string | undefined>, options?: ResolveOptions): HostCredentials;
20
+
21
+ declare const name = "@dipertq/dsh-openviking-status";
5
22
  declare const inject: string[];
6
- declare function apply(ctx: any): void;
23
+ declare const Config: z<Schemastery.ObjectS<{
24
+ endpoint: z<string, string>;
25
+ apiKey: z<string, string>;
26
+ }>, Schemastery.ObjectT<{
27
+ endpoint: z<string, string>;
28
+ apiKey: z<string, string>;
29
+ }>>;
30
+ type OpenVikingConfig = {
31
+ endpoint?: string;
32
+ apiKey?: string;
33
+ };
34
+ declare function apply(ctx: any, config?: OpenVikingConfig): void;
7
35
 
8
- export { apply, inject, name };
36
+ export { Config, type HostCredentials, type OpenVikingConfig, type ResolveOptions, apply, inject, name, resolveHostCredentials };