Import lib/types/host-config.d.ts

This commit is contained in:
QQ 2026-11-11 22:29:40 +08:00
parent 269f7a66e6
commit 4cfdcf6ccc
1 changed files with 14 additions and 0 deletions

14
lib/types/host-config.d.ts vendored Normal file
View File

@ -0,0 +1,14 @@
import { classify } from './core/matcher.ts';
import type { GroupsConfig } from './core/types.ts';
/** Default sidecar location: `$DSH_HOME/workspace-groups.yaml` (DSH_HOME falls back to ~/.dsh). */
export declare function defaultConfigPath(): string;
/** Parse + validate a raw sidecar document into a GroupsConfig (throws on malformed input). */
export declare function parseGroupsConfig(raw: unknown): GroupsConfig;
/**
* Read + parse the sidecar config file. A missing file yields an empty config
* (all workspaces fall into the uncategorized bucket); malformed YAML throws
* so the operator sees the problem instead of silently ungrouping everything.
*/
export declare function readGroupsConfig(path: string): Promise<GroupsConfig>;
export { classify };
export type { GroupsConfig, GroupCategory, GroupRule } from './core/types.ts';