From 4cfdcf6cccc5320bca3c732c6d563ea821a62bcc Mon Sep 17 00:00:00 2001 From: QQ Date: Wed, 11 Nov 2026 22:29:40 +0800 Subject: [PATCH] Import lib/types/host-config.d.ts --- lib/types/host-config.d.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/types/host-config.d.ts diff --git a/lib/types/host-config.d.ts b/lib/types/host-config.d.ts new file mode 100644 index 0000000..6ace14a --- /dev/null +++ b/lib/types/host-config.d.ts @@ -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; +export { classify }; +export type { GroupsConfig, GroupCategory, GroupRule } from './core/types.ts';