agent-config-detect 0.0.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.
Files changed (164) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/cjs/errors.js +105 -0
  4. package/dist/cjs/errors.js.map +1 -0
  5. package/dist/cjs/index.js +89 -0
  6. package/dist/cjs/index.js.map +1 -0
  7. package/dist/cjs/platform/Platform.js +13 -0
  8. package/dist/cjs/platform/Platform.js.map +1 -0
  9. package/dist/cjs/platform/TestPlatform.js +65 -0
  10. package/dist/cjs/platform/TestPlatform.js.map +1 -0
  11. package/dist/cjs/platform/index.js +118 -0
  12. package/dist/cjs/platform/index.js.map +1 -0
  13. package/dist/cjs/platform/internal/common.js +40 -0
  14. package/dist/cjs/platform/internal/common.js.map +1 -0
  15. package/dist/cjs/platform/internal/darwin.js +40 -0
  16. package/dist/cjs/platform/internal/darwin.js.map +1 -0
  17. package/dist/cjs/platform/internal/linux.js +69 -0
  18. package/dist/cjs/platform/internal/linux.js.map +1 -0
  19. package/dist/cjs/platform/internal/testUtils.js +79 -0
  20. package/dist/cjs/platform/internal/testUtils.js.map +1 -0
  21. package/dist/cjs/platform/internal/windows.js +61 -0
  22. package/dist/cjs/platform/internal/windows.js.map +1 -0
  23. package/dist/cjs/types/ConfigResource.js +44 -0
  24. package/dist/cjs/types/ConfigResource.js.map +1 -0
  25. package/dist/cjs/types/DirectoryResource.js +42 -0
  26. package/dist/cjs/types/DirectoryResource.js.map +1 -0
  27. package/dist/cjs/types/DirectoryStructure.js +56 -0
  28. package/dist/cjs/types/DirectoryStructure.js.map +1 -0
  29. package/dist/cjs/types/EnvValue.js +199 -0
  30. package/dist/cjs/types/EnvValue.js.map +1 -0
  31. package/dist/cjs/types/FileFormat.js +25 -0
  32. package/dist/cjs/types/FileFormat.js.map +1 -0
  33. package/dist/cjs/types/HarnessKind.js +130 -0
  34. package/dist/cjs/types/HarnessKind.js.map +1 -0
  35. package/dist/cjs/types/InstallationStatus.js +119 -0
  36. package/dist/cjs/types/InstallationStatus.js.map +1 -0
  37. package/dist/cjs/types/PathType.js +25 -0
  38. package/dist/cjs/types/PathType.js.map +1 -0
  39. package/dist/cjs/types/ResourceKind.js +26 -0
  40. package/dist/cjs/types/ResourceKind.js.map +1 -0
  41. package/dist/cjs/types/Scope.js +59 -0
  42. package/dist/cjs/types/Scope.js.map +1 -0
  43. package/dist/cjs/types/index.js +116 -0
  44. package/dist/cjs/types/index.js.map +1 -0
  45. package/dist/dts/errors.d.ts +125 -0
  46. package/dist/dts/errors.d.ts.map +1 -0
  47. package/dist/dts/index.d.ts +11 -0
  48. package/dist/dts/index.d.ts.map +1 -0
  49. package/dist/dts/platform/Platform.d.ts +61 -0
  50. package/dist/dts/platform/Platform.d.ts.map +1 -0
  51. package/dist/dts/platform/TestPlatform.d.ts +52 -0
  52. package/dist/dts/platform/TestPlatform.d.ts.map +1 -0
  53. package/dist/dts/platform/index.d.ts +20 -0
  54. package/dist/dts/platform/index.d.ts.map +1 -0
  55. package/dist/dts/platform/internal/common.d.ts +20 -0
  56. package/dist/dts/platform/internal/common.d.ts.map +1 -0
  57. package/dist/dts/platform/internal/darwin.d.ts +33 -0
  58. package/dist/dts/platform/internal/darwin.d.ts.map +1 -0
  59. package/dist/dts/platform/internal/linux.d.ts +29 -0
  60. package/dist/dts/platform/internal/linux.d.ts.map +1 -0
  61. package/dist/dts/platform/internal/testUtils.d.ts +32 -0
  62. package/dist/dts/platform/internal/testUtils.d.ts.map +1 -0
  63. package/dist/dts/platform/internal/windows.d.ts +38 -0
  64. package/dist/dts/platform/internal/windows.d.ts.map +1 -0
  65. package/dist/dts/types/ConfigResource.d.ts +34 -0
  66. package/dist/dts/types/ConfigResource.d.ts.map +1 -0
  67. package/dist/dts/types/DirectoryResource.d.ts +33 -0
  68. package/dist/dts/types/DirectoryResource.d.ts.map +1 -0
  69. package/dist/dts/types/DirectoryStructure.d.ts +61 -0
  70. package/dist/dts/types/DirectoryStructure.d.ts.map +1 -0
  71. package/dist/dts/types/EnvValue.d.ts +102 -0
  72. package/dist/dts/types/EnvValue.d.ts.map +1 -0
  73. package/dist/dts/types/FileFormat.d.ts +22 -0
  74. package/dist/dts/types/FileFormat.d.ts.map +1 -0
  75. package/dist/dts/types/HarnessKind.d.ts +45 -0
  76. package/dist/dts/types/HarnessKind.d.ts.map +1 -0
  77. package/dist/dts/types/InstallationStatus.d.ts +89 -0
  78. package/dist/dts/types/InstallationStatus.d.ts.map +1 -0
  79. package/dist/dts/types/PathType.d.ts +22 -0
  80. package/dist/dts/types/PathType.d.ts.map +1 -0
  81. package/dist/dts/types/ResourceKind.d.ts +23 -0
  82. package/dist/dts/types/ResourceKind.d.ts.map +1 -0
  83. package/dist/dts/types/Scope.d.ts +59 -0
  84. package/dist/dts/types/Scope.d.ts.map +1 -0
  85. package/dist/dts/types/index.d.ts +16 -0
  86. package/dist/dts/types/index.d.ts.map +1 -0
  87. package/dist/esm/errors.js +87 -0
  88. package/dist/esm/errors.js.map +1 -0
  89. package/dist/esm/index.js +14 -0
  90. package/dist/esm/index.js.map +1 -0
  91. package/dist/esm/package.json +4 -0
  92. package/dist/esm/platform/Platform.js +6 -0
  93. package/dist/esm/platform/Platform.js.map +1 -0
  94. package/dist/esm/platform/TestPlatform.js +54 -0
  95. package/dist/esm/platform/TestPlatform.js.map +1 -0
  96. package/dist/esm/platform/index.js +68 -0
  97. package/dist/esm/platform/index.js.map +1 -0
  98. package/dist/esm/platform/internal/common.js +30 -0
  99. package/dist/esm/platform/internal/common.js.map +1 -0
  100. package/dist/esm/platform/internal/darwin.js +33 -0
  101. package/dist/esm/platform/internal/darwin.js.map +1 -0
  102. package/dist/esm/platform/internal/linux.js +62 -0
  103. package/dist/esm/platform/internal/linux.js.map +1 -0
  104. package/dist/esm/platform/internal/testUtils.js +70 -0
  105. package/dist/esm/platform/internal/testUtils.js.map +1 -0
  106. package/dist/esm/platform/internal/windows.js +54 -0
  107. package/dist/esm/platform/internal/windows.js.map +1 -0
  108. package/dist/esm/types/ConfigResource.js +36 -0
  109. package/dist/esm/types/ConfigResource.js.map +1 -0
  110. package/dist/esm/types/DirectoryResource.js +34 -0
  111. package/dist/esm/types/DirectoryResource.js.map +1 -0
  112. package/dist/esm/types/DirectoryStructure.js +45 -0
  113. package/dist/esm/types/DirectoryStructure.js.map +1 -0
  114. package/dist/esm/types/EnvValue.js +182 -0
  115. package/dist/esm/types/EnvValue.js.map +1 -0
  116. package/dist/esm/types/FileFormat.js +18 -0
  117. package/dist/esm/types/FileFormat.js.map +1 -0
  118. package/dist/esm/types/HarnessKind.js +120 -0
  119. package/dist/esm/types/HarnessKind.js.map +1 -0
  120. package/dist/esm/types/InstallationStatus.js +101 -0
  121. package/dist/esm/types/InstallationStatus.js.map +1 -0
  122. package/dist/esm/types/PathType.js +18 -0
  123. package/dist/esm/types/PathType.js.map +1 -0
  124. package/dist/esm/types/ResourceKind.js +19 -0
  125. package/dist/esm/types/ResourceKind.js.map +1 -0
  126. package/dist/esm/types/Scope.js +46 -0
  127. package/dist/esm/types/Scope.js.map +1 -0
  128. package/dist/esm/types/index.js +17 -0
  129. package/dist/esm/types/index.js.map +1 -0
  130. package/errors/package.json +6 -0
  131. package/package.json +135 -0
  132. package/platform/Platform/package.json +6 -0
  133. package/platform/TestPlatform/package.json +6 -0
  134. package/src/errors.ts +135 -0
  135. package/src/index.ts +27 -0
  136. package/src/platform/Platform.ts +64 -0
  137. package/src/platform/TestPlatform.ts +93 -0
  138. package/src/platform/index.ts +72 -0
  139. package/src/platform/internal/common.ts +30 -0
  140. package/src/platform/internal/darwin.ts +43 -0
  141. package/src/platform/internal/linux.ts +66 -0
  142. package/src/platform/internal/testUtils.ts +82 -0
  143. package/src/platform/internal/windows.ts +58 -0
  144. package/src/types/ConfigResource.ts +48 -0
  145. package/src/types/DirectoryResource.ts +45 -0
  146. package/src/types/DirectoryStructure.ts +64 -0
  147. package/src/types/EnvValue.ts +189 -0
  148. package/src/types/FileFormat.ts +36 -0
  149. package/src/types/HarnessKind.ts +150 -0
  150. package/src/types/InstallationStatus.ts +119 -0
  151. package/src/types/PathType.ts +24 -0
  152. package/src/types/ResourceKind.ts +27 -0
  153. package/src/types/Scope.ts +57 -0
  154. package/src/types/index.ts +17 -0
  155. package/types/ConfigResource/package.json +6 -0
  156. package/types/DirectoryResource/package.json +6 -0
  157. package/types/DirectoryStructure/package.json +6 -0
  158. package/types/EnvValue/package.json +6 -0
  159. package/types/FileFormat/package.json +6 -0
  160. package/types/HarnessKind/package.json +6 -0
  161. package/types/InstallationStatus/package.json +6 -0
  162. package/types/PathType/package.json +6 -0
  163. package/types/ResourceKind/package.json +6 -0
  164. package/types/Scope/package.json +6 -0
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Platform-specific path resolution.
3
+ *
4
+ * This module provides the Platform service for resolving base configuration
5
+ * directories on each supported platform (macOS, Linux, Windows).
6
+ *
7
+ * @module
8
+ */
9
+ import { Layer } from "effect";
10
+ import { Platform } from "./Platform.js";
11
+ export { withEnv, withoutEnv } from "./internal/testUtils.js";
12
+ export { type OS, Platform, type PlatformService } from "./Platform.js";
13
+ export { TestPlatform, TestPlatformDarwin, TestPlatformLinux, TestPlatformWindows } from "./TestPlatform.js";
14
+ /**
15
+ * Live platform layer that uses the actual system paths.
16
+ *
17
+ * Uses runtime platform detection to select the appropriate implementation.
18
+ */
19
+ export declare const PlatformLive: Layer.Layer<Platform>;
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAM9B,OAAO,EAAW,QAAQ,EAAwB,MAAM,eAAe,CAAA;AAGvE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AA+C5G;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAA+C,CAAA"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Common platform utilities.
3
+ *
4
+ * @module
5
+ */
6
+ import { Effect } from "effect";
7
+ import { NotFoundError } from "../../errors.js";
8
+ /**
9
+ * Returns the user's home directory.
10
+ */
11
+ export declare const homeDir: Effect.Effect<string, NotFoundError, never>;
12
+ /**
13
+ * Joins path segments.
14
+ */
15
+ export declare const joinPath: (...segments: Array<string>) => string;
16
+ /**
17
+ * Checks if a path is absolute.
18
+ */
19
+ export declare const isAbsolute: (p: string) => boolean;
20
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/platform/internal/common.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C;;GAEG;AACH,eAAO,MAAM,OAAO,6CAMG,CAAA;AAEvB;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,GAAG,UAAU,KAAK,CAAC,MAAM,CAAC,KAAG,MAAgC,CAAA;AAEtF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,KAAG,OAA6B,CAAA"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * macOS-specific path resolution.
3
+ *
4
+ * @module
5
+ */
6
+ import { Effect } from "effect";
7
+ import type { PlatformError } from "../../errors.js";
8
+ /**
9
+ * Returns the user's config directory on macOS.
10
+ *
11
+ * Most CLI tools use `~/.config/` following XDG conventions,
12
+ * though native macOS apps prefer `~/Library/Application Support/`.
13
+ */
14
+ export declare const configDir: Effect.Effect<string, PlatformError>;
15
+ /**
16
+ * Returns the user's data directory on macOS.
17
+ *
18
+ * Returns `~/Library/Application Support/` for native macOS conventions.
19
+ */
20
+ export declare const dataDir: Effect.Effect<string, PlatformError>;
21
+ /**
22
+ * Returns the Application Support directory on macOS.
23
+ *
24
+ * This is `~/Library/Application Support/`, used by native macOS applications.
25
+ */
26
+ export declare const applicationSupportDir: Effect.Effect<string, PlatformError>;
27
+ /**
28
+ * Returns the cache directory on macOS.
29
+ *
30
+ * On macOS, we use the data directory as there's no standard XDG cache.
31
+ */
32
+ export declare const cacheDir: Effect.Effect<string, PlatformError>;
33
+ //# sourceMappingURL=darwin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"darwin.d.ts","sourceRoot":"","sources":["../../../../src/platform/internal/darwin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAGpD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAG1D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAGxD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAW,CAAA;AAElF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAW,CAAA"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Linux-specific path resolution with XDG Base Directory support.
3
+ *
4
+ * @module
5
+ */
6
+ import { Effect } from "effect";
7
+ import type { PlatformError } from "../../errors.js";
8
+ /**
9
+ * Returns the user's config directory on Linux.
10
+ *
11
+ * Respects `XDG_CONFIG_HOME` if set to an absolute path,
12
+ * otherwise defaults to `~/.config/`.
13
+ */
14
+ export declare const configDir: Effect.Effect<string, PlatformError>;
15
+ /**
16
+ * Returns the user's data directory on Linux.
17
+ *
18
+ * Respects `XDG_DATA_HOME` if set to an absolute path,
19
+ * otherwise defaults to `~/.local/share/`.
20
+ */
21
+ export declare const dataDir: Effect.Effect<string, PlatformError>;
22
+ /**
23
+ * Returns the user's cache directory on Linux.
24
+ *
25
+ * Respects `XDG_CACHE_HOME` if set to an absolute path,
26
+ * otherwise defaults to `~/.cache/`.
27
+ */
28
+ export declare const cacheDir: Effect.Effect<string, PlatformError>;
29
+ //# sourceMappingURL=linux.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linux.d.ts","sourceRoot":"","sources":["../../../../src/platform/internal/linux.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAmBpD;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAMzD,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAMvD,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAMxD,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Test utilities for platform testing.
3
+ *
4
+ * @module
5
+ */
6
+ import { Effect } from "effect";
7
+ /**
8
+ * Runs an effect with mocked environment variables.
9
+ *
10
+ * The original environment is restored after the effect completes,
11
+ * regardless of success or failure.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const result = await Effect.runPromise(
16
+ * withEnv({ XDG_CONFIG_HOME: "/custom/config" }, myEffect)
17
+ * )
18
+ * ```
19
+ */
20
+ export declare const withEnv: <A, E, R>(vars: Record<string, string | undefined>, effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
21
+ /**
22
+ * Removes environment variables for the duration of an effect.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const result = await Effect.runPromise(
27
+ * withoutEnv(["XDG_CONFIG_HOME", "XDG_DATA_HOME"], myEffect)
28
+ * )
29
+ * ```
30
+ */
31
+ export declare const withoutEnv: <A, E, R>(keys: ReadonlyArray<string>, effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
32
+ //# sourceMappingURL=testUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testUtils.d.ts","sourceRoot":"","sources":["../../../../src/platform/internal/testUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAU/B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAC7B,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACxC,QAAQ,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAC7B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CA6BvB,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAChC,MAAM,aAAa,CAAC,MAAM,CAAC,EAC3B,QAAQ,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAC7B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAMvB,CAAA"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Windows-specific path resolution.
3
+ *
4
+ * @module
5
+ */
6
+ import { Effect } from "effect";
7
+ import { type PlatformError } from "../../errors.js";
8
+ /**
9
+ * Returns the user's config directory on Windows.
10
+ *
11
+ * Returns `%APPDATA%` which is typically `C:\Users\<user>\AppData\Roaming`.
12
+ */
13
+ export declare const configDir: Effect.Effect<string, PlatformError>;
14
+ /**
15
+ * Returns the user's data directory on Windows.
16
+ *
17
+ * Returns `%LOCALAPPDATA%` which is typically `C:\Users\<user>\AppData\Local`.
18
+ */
19
+ export declare const dataDir: Effect.Effect<string, PlatformError>;
20
+ /**
21
+ * Returns the roaming app data directory on Windows.
22
+ *
23
+ * This is `%APPDATA%`, used for settings that should roam with the user.
24
+ */
25
+ export declare const roamingAppDataDir: Effect.Effect<string, PlatformError>;
26
+ /**
27
+ * Returns the local app data directory on Windows.
28
+ *
29
+ * This is `%LOCALAPPDATA%`, used for data that should stay on the local machine.
30
+ */
31
+ export declare const localAppDataDir: Effect.Effect<string, PlatformError>;
32
+ /**
33
+ * Returns the cache directory on Windows.
34
+ *
35
+ * On Windows, we use the local app data directory.
36
+ */
37
+ export declare const cacheDir: Effect.Effect<string, PlatformError>;
38
+ //# sourceMappingURL=windows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windows.d.ts","sourceRoot":"","sources":["../../../../src/platform/internal/windows.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEjE;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAQzD,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAQvD,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAa,CAAA;AAEhF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAW,CAAA;AAE5E;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAW,CAAA"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * A configuration file resource location.
3
+ *
4
+ * Represents a single configuration file that may contain
5
+ * multiple configuration entries, accessed via a key path.
6
+ *
7
+ * @module
8
+ */
9
+ import { Schema } from "effect";
10
+ import { type FileFormat as FileFormatType } from "./FileFormat.js";
11
+ /**
12
+ * Config resource schema.
13
+ */
14
+ export declare const ConfigResource: Schema.Struct<{
15
+ /** Path to the configuration file. */
16
+ file: typeof Schema.String;
17
+ /** Whether the file currently exists on the filesystem. */
18
+ fileExists: typeof Schema.Boolean;
19
+ /** JSON pointer path to the relevant section (e.g., `"/mcpServers"`). */
20
+ keyPath: typeof Schema.String;
21
+ /** Format of the configuration file. */
22
+ format: Schema.Literal<["Json", "Jsonc", "Yaml", "Markdown", "MarkdownWithFrontmatter"]>;
23
+ /** Optional JSON Schema URL for validation. */
24
+ schemaUrl: Schema.OptionFromNullOr<typeof Schema.String>;
25
+ }>;
26
+ /**
27
+ * Config resource type.
28
+ */
29
+ export type ConfigResource = typeof ConfigResource.Type;
30
+ /**
31
+ * Creates a config resource.
32
+ */
33
+ export declare const makeConfigResource: (file: string, fileExists: boolean, keyPath: string, format: FileFormatType, schemaUrl?: string) => ConfigResource;
34
+ //# sourceMappingURL=ConfigResource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigResource.d.ts","sourceRoot":"","sources":["../../../src/types/ConfigResource.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAc,KAAK,UAAU,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAE/E;;GAEG;AACH,eAAO,MAAM,cAAc;IACzB,sCAAsC;;IAEtC,2DAA2D;;IAE3D,yEAAyE;;IAEzE,wCAAwC;;IAExC,+CAA+C;;EAE/C,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;AAEvD;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,MAAM,MAAM,EACZ,YAAY,OAAO,EACnB,SAAS,MAAM,EACf,QAAQ,cAAc,EACtB,YAAY,MAAM,KACjB,cAMD,CAAA"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * A directory-based resource location.
3
+ *
4
+ * Represents a directory that contains multiple resource files,
5
+ * such as commands or skills directories.
6
+ *
7
+ * @module
8
+ */
9
+ import { Schema } from "effect";
10
+ import { DirectoryStructure, type DirectoryStructure as DirectoryStructureType } from "./DirectoryStructure.js";
11
+ import { type FileFormat as FileFormatType } from "./FileFormat.js";
12
+ /**
13
+ * Directory resource schema.
14
+ */
15
+ export declare const DirectoryResource: Schema.Struct<{
16
+ /** Path to the directory. */
17
+ path: typeof Schema.String;
18
+ /** Whether the directory currently exists on the filesystem. */
19
+ exists: typeof Schema.Boolean;
20
+ /** How resources are organized within the directory. */
21
+ structure: Schema.Schema<DirectoryStructure, DirectoryStructure, never>;
22
+ /** Format of files within the directory. */
23
+ fileFormat: Schema.Literal<["Json", "Jsonc", "Yaml", "Markdown", "MarkdownWithFrontmatter"]>;
24
+ }>;
25
+ /**
26
+ * Directory resource type.
27
+ */
28
+ export type DirectoryResource = typeof DirectoryResource.Type;
29
+ /**
30
+ * Creates a directory resource.
31
+ */
32
+ export declare const makeDirectoryResource: (path: string, exists: boolean, structure: DirectoryStructureType, fileFormat: FileFormatType) => DirectoryResource;
33
+ //# sourceMappingURL=DirectoryResource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DirectoryResource.d.ts","sourceRoot":"","sources":["../../../src/types/DirectoryResource.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,IAAI,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAC/G,OAAO,EAAc,KAAK,UAAU,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAE/E;;GAEG;AACH,eAAO,MAAM,iBAAiB;IAC5B,6BAA6B;;IAE7B,gEAAgE;;IAEhE,wDAAwD;;IAExD,4CAA4C;;EAE5C,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAE7D;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAM,MAAM,EACZ,QAAQ,OAAO,EACf,WAAW,sBAAsB,EACjC,YAAY,cAAc,KACzB,iBAKD,CAAA"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Directory layout structure for resource directories.
3
+ *
4
+ * Harnesses organize their resources in different ways:
5
+ * - Flat: Files directly in the directory (e.g., `commands/foo.md`)
6
+ * - Nested: Subdirectory per resource (e.g., `skills/foo/SKILL.md`)
7
+ *
8
+ * @module
9
+ */
10
+ import { Schema } from "effect";
11
+ declare const Flat_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
12
+ readonly _tag: "Flat";
13
+ };
14
+ /**
15
+ * Files directly in the directory.
16
+ *
17
+ * Example: `commands/foo.md`, `commands/bar.md`
18
+ */
19
+ export declare class Flat extends Flat_base<{
20
+ /** Glob pattern for matching files (e.g., `"*.md"`). */
21
+ readonly filePattern: string;
22
+ }> {
23
+ }
24
+ declare const Nested_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
25
+ readonly _tag: "Nested";
26
+ };
27
+ /**
28
+ * Subdirectory per resource with a fixed filename inside.
29
+ *
30
+ * Example: `skills/foo/SKILL.md`, `skills/bar/SKILL.md`
31
+ */
32
+ export declare class Nested extends Nested_base<{
33
+ /** Pattern for subdirectory names (e.g., `"*"`). */
34
+ readonly subdirPattern: string;
35
+ /**
36
+ * Fixed filename or marker directory within each subdirectory.
37
+ *
38
+ * Can be a file (e.g., `"SKILL.md"`) or a marker directory
39
+ * (e.g., `".claude-plugin"` for plugin detection).
40
+ */
41
+ readonly fileName: string;
42
+ }> {
43
+ }
44
+ /**
45
+ * Directory structure type - union of all variants.
46
+ */
47
+ export type DirectoryStructure = Flat | Nested;
48
+ /**
49
+ * Directory structure schema for serialization.
50
+ */
51
+ export declare const DirectoryStructure: Schema.Schema<DirectoryStructure>;
52
+ /**
53
+ * Creates a flat directory structure.
54
+ */
55
+ export declare const flat: (filePattern: string) => DirectoryStructure;
56
+ /**
57
+ * Creates a nested directory structure.
58
+ */
59
+ export declare const nested: (subdirPattern: string, fileName: string) => DirectoryStructure;
60
+ export {};
61
+ //# sourceMappingURL=DirectoryStructure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DirectoryStructure.d.ts","sourceRoot":"","sources":["../../../src/types/DirectoryStructure.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAQ,MAAM,EAAE,MAAM,QAAQ,CAAA;;;;AAErC;;;;GAIG;AACH,qBAAa,IAAK,SAAQ,UAAyB;IACjD,wDAAwD;IACxD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B,CAAC;CAAG;;;;AAEL;;;;GAIG;AACH,qBAAa,MAAO,SAAQ,YAA2B;IACrD,oDAAoD;IACpD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B,CAAC;CAAG;AAEL;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,MAAM,CAAA;AAE9C;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAM3B,CAAA;AAEtC;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,aAAa,MAAM,KAAG,kBAA+C,CAAA;AAE1F;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,eAAe,MAAM,EAAE,UAAU,MAAM,KAAG,kBACxB,CAAA"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * A value that may be a plain string or a reference to an environment variable.
3
+ *
4
+ * This type handles the different syntax each harness uses for environment
5
+ * variable references:
6
+ * - Claude Code: `${VAR}`
7
+ * - OpenCode: `{env:VAR}`
8
+ * - Goose: Uses `env_keys` array, values resolved at runtime
9
+ *
10
+ * @module
11
+ */
12
+ import { Effect, Option, Schema } from "effect";
13
+ import { MissingEnvVarError } from "../errors.js";
14
+ import type { HarnessKind } from "./HarnessKind.js";
15
+ declare const Plain_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
16
+ readonly _tag: "Plain";
17
+ };
18
+ /**
19
+ * A plain string value.
20
+ */
21
+ export declare class Plain extends Plain_base<{
22
+ readonly value: string;
23
+ }> {
24
+ }
25
+ declare const EnvRef_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
26
+ readonly _tag: "EnvRef";
27
+ };
28
+ /**
29
+ * A reference to an environment variable.
30
+ */
31
+ export declare class EnvRef extends EnvRef_base<{
32
+ readonly env: string;
33
+ }> {
34
+ }
35
+ /**
36
+ * EnvValue type - union of all variants.
37
+ */
38
+ export type EnvValue = Plain | EnvRef;
39
+ /**
40
+ * EnvValue schema for JSON serialization.
41
+ * Uses untagged representation:
42
+ * - Plain string: `"hello"` deserializes to `Plain("hello")`
43
+ * - Object with env key: `{"env": "VAR"}` deserializes to `EnvRef { env: "VAR" }`
44
+ */
45
+ export declare const EnvValue: Schema.Schema<EnvValue, string | {
46
+ readonly env: string;
47
+ }>;
48
+ /**
49
+ * Creates a plain string value.
50
+ */
51
+ export declare const plain: (value: string) => EnvValue;
52
+ /**
53
+ * Creates an environment variable reference.
54
+ */
55
+ export declare const env: (varName: string) => EnvValue;
56
+ /**
57
+ * Returns `true` if this is a plain string value.
58
+ */
59
+ export declare const isPlain: (value: EnvValue) => value is Plain;
60
+ /**
61
+ * Returns `true` if this is an environment variable reference.
62
+ */
63
+ export declare const isEnvRef: (value: EnvValue) => value is EnvRef;
64
+ /**
65
+ * Converts to the harness-specific native string format.
66
+ *
67
+ * - For `Plain`: Returns the string as-is
68
+ * - For `EnvRef` with Claude Code/AmpCode/CopilotCli: Returns `${VAR}`
69
+ * - For `EnvRef` with OpenCode: Returns `{env:VAR}`
70
+ * - For `EnvRef` with Goose: Resolves the env var immediately (returns empty string if not set)
71
+ */
72
+ export declare const toNative: (value: EnvValue, kind: HarnessKind) => string;
73
+ /**
74
+ * Fallible version of `toNative` that returns an error when an environment
75
+ * variable reference cannot be resolved.
76
+ *
77
+ * For Goose harness, this validates that the referenced environment variable
78
+ * is actually set, returning an error if not.
79
+ *
80
+ * For other harnesses that use template syntax (Claude Code, OpenCode, AmpCode),
81
+ * this behaves identically to `toNative` since the variable is not resolved
82
+ * at conversion time.
83
+ */
84
+ export declare const tryToNative: (value: EnvValue, kind: HarnessKind) => Effect.Effect<string, MissingEnvVarError>;
85
+ /**
86
+ * Parses a harness-specific native string format into an `EnvValue`.
87
+ *
88
+ * - For Claude Code/AmpCode/CopilotCli: Parses `${VAR}` pattern
89
+ * - For OpenCode: Parses `{env:VAR}` pattern
90
+ * - For Goose: Always returns `Plain` (Goose doesn't use inline syntax)
91
+ * - If no pattern matches, returns `Plain`
92
+ */
93
+ export declare const fromNative: (s: string, kind: HarnessKind) => EnvValue;
94
+ /**
95
+ * Resolves the value, looking up environment variables if needed.
96
+ *
97
+ * - For `Plain`: Returns `Some(value)`
98
+ * - For `EnvRef`: Returns `Some(value)` if the env var is set, `None` otherwise
99
+ */
100
+ export declare const resolve: (value: EnvValue) => Option.Option<string>;
101
+ export {};
102
+ //# sourceMappingURL=EnvValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnvValue.d.ts","sourceRoot":"","sources":["../../../src/types/EnvValue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAQ,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;;;AAEnD;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAA0B;IACnD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,CAAC;CAAG;;;;AAEL;;GAEG;AACH,qBAAa,MAAO,SAAQ,YAA2B;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACrB,CAAC;CAAG;AAEL;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAmB/E,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,KAAG,QAAgC,CAAA;AAEtE;;GAEG;AACH,eAAO,MAAM,GAAG,GAAI,SAAS,MAAM,KAAG,QAAwC,CAAA;AAE9E;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,QAAQ,KAAG,KAAK,IAAI,KAA+B,CAAA;AAElF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,QAAQ,KAAG,KAAK,IAAI,MAAiC,CAAA;AAErF;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,QAAQ,EAAE,MAAM,WAAW,KAAG,MAe7D,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GACtB,OAAO,QAAQ,EACf,MAAM,WAAW,KAChB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAoB1C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,EAAE,MAAM,WAAW,KAAG,QAwBzD,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,QAAQ,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAM7D,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * File formats used by harness configuration files.
3
+ *
4
+ * Different harnesses use different formats for their configuration,
5
+ * commands, and other resources.
6
+ *
7
+ * @module
8
+ */
9
+ import { Schema } from "effect";
10
+ /**
11
+ * File format schema.
12
+ */
13
+ export declare const FileFormat: Schema.Literal<["Json", "Jsonc", "Yaml", "Markdown", "MarkdownWithFrontmatter"]>;
14
+ /**
15
+ * File format type.
16
+ */
17
+ export type FileFormat = typeof FileFormat.Type;
18
+ /**
19
+ * All supported file formats.
20
+ */
21
+ export declare const FileFormatAll: readonly ["Json", "Jsonc", "Yaml", "Markdown", "MarkdownWithFrontmatter"];
22
+ //# sourceMappingURL=FileFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileFormat.d.ts","sourceRoot":"","sources":["../../../src/types/FileFormat.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B;;GAEG;AACH,eAAO,MAAM,UAAU,kFAMtB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AAE/C;;GAEG;AACH,eAAO,MAAM,aAAa,2EAMoB,CAAA"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Supported AI coding harnesses.
3
+ *
4
+ * This module provides the HarnessKind type representing the different
5
+ * AI coding assistants whose configuration paths can be discovered.
6
+ *
7
+ * @module
8
+ */
9
+ import { Schema } from "effect";
10
+ import type { ResourceKind } from "./ResourceKind.js";
11
+ /**
12
+ * Harness kind schema - represents the different AI coding assistants.
13
+ */
14
+ export declare const HarnessKind: Schema.Literal<["ClaudeCode", "OpenCode", "Goose", "AmpCode", "CopilotCli"]>;
15
+ /**
16
+ * Harness kind type.
17
+ */
18
+ export type HarnessKind = typeof HarnessKind.Type;
19
+ /**
20
+ * All supported harness kinds.
21
+ */
22
+ export declare const HarnessKindAll: readonly ["ClaudeCode", "OpenCode", "Goose", "AmpCode", "CopilotCli"];
23
+ /**
24
+ * Returns the display name of this harness kind.
25
+ */
26
+ export declare const asStr: (kind: HarnessKind) => string;
27
+ /**
28
+ * Returns the known CLI binary names for this harness.
29
+ *
30
+ * These are the executable names that indicate the harness is installed
31
+ * and available in PATH.
32
+ */
33
+ export declare const binaryNames: (kind: HarnessKind) => ReadonlyArray<string>;
34
+ /**
35
+ * Returns the expected directory name(s) for a resource kind.
36
+ *
37
+ * Different harnesses use different naming conventions:
38
+ * - OpenCode uses singular names (`skill`, `command`)
39
+ * - Other harnesses use plural names (`skills`, `commands`)
40
+ *
41
+ * Returns `undefined` if the harness doesn't support that resource type.
42
+ * When multiple names are returned, index 0 is the canonical name.
43
+ */
44
+ export declare const directoryNames: (kind: HarnessKind, resource: ResourceKind) => ReadonlyArray<string> | undefined;
45
+ //# sourceMappingURL=HarnessKind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HarnessKind.d.ts","sourceRoot":"","sources":["../../../src/types/HarnessKind.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD;;GAEG;AACH,eAAO,MAAM,WAAW,8EAMvB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD;;GAEG;AACH,eAAO,MAAM,cAAc,uEAMoB,CAAA;AAE/C;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,WAAW,KAAG,MAazC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,WAAW,KAAG,aAAa,CAAC,MAAM,CAanE,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,WAAW,EACjB,UAAU,YAAY,KACrB,aAAa,CAAC,MAAM,CAAC,GAAG,SA2D1B,CAAA"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Installation status of a harness on the current system.
3
+ *
4
+ * Represents the different states a harness can be in, from not installed
5
+ * to fully configured with both binary and configuration present.
6
+ *
7
+ * @module
8
+ */
9
+ import { Option, Schema } from "effect";
10
+ declare const NotInstalled_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
11
+ readonly _tag: "NotInstalled";
12
+ };
13
+ /**
14
+ * Harness is not installed (no binary or config found).
15
+ */
16
+ export declare class NotInstalled extends NotInstalled_base<{}> {
17
+ }
18
+ declare const ConfigOnly_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
19
+ readonly _tag: "ConfigOnly";
20
+ };
21
+ /**
22
+ * Only configuration directory exists (no binary in PATH).
23
+ */
24
+ export declare class ConfigOnly extends ConfigOnly_base<{
25
+ readonly configPath: string;
26
+ }> {
27
+ }
28
+ declare const BinaryOnly_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
29
+ readonly _tag: "BinaryOnly";
30
+ };
31
+ /**
32
+ * Only the binary exists in PATH (no configuration found).
33
+ */
34
+ export declare class BinaryOnly extends BinaryOnly_base<{
35
+ readonly binaryPath: string;
36
+ }> {
37
+ }
38
+ declare const FullyInstalled_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => Readonly<A> & {
39
+ readonly _tag: "FullyInstalled";
40
+ };
41
+ /**
42
+ * Fully installed with both binary and configuration.
43
+ */
44
+ export declare class FullyInstalled extends FullyInstalled_base<{
45
+ readonly binaryPath: string;
46
+ readonly configPath: string;
47
+ }> {
48
+ }
49
+ /**
50
+ * Installation status type - union of all status variants.
51
+ */
52
+ export type InstallationStatus = NotInstalled | ConfigOnly | BinaryOnly | FullyInstalled;
53
+ /**
54
+ * Installation status schema for serialization.
55
+ */
56
+ export declare const InstallationStatus: Schema.Schema<InstallationStatus>;
57
+ /**
58
+ * Returns `true` if the harness CLI can be invoked.
59
+ *
60
+ * A harness is runnable if its binary is available in PATH,
61
+ * regardless of whether configuration exists.
62
+ */
63
+ export declare const isRunnable: (status: InstallationStatus) => boolean;
64
+ /**
65
+ * Returns the binary path if available.
66
+ */
67
+ export declare const binaryPath: (status: InstallationStatus) => Option.Option<string>;
68
+ /**
69
+ * Returns the config path if available.
70
+ */
71
+ export declare const configPath: (status: InstallationStatus) => Option.Option<string>;
72
+ /**
73
+ * Creates a NotInstalled status.
74
+ */
75
+ export declare const notInstalled: () => InstallationStatus;
76
+ /**
77
+ * Creates a ConfigOnly status.
78
+ */
79
+ export declare const configOnly: (configPath: string) => InstallationStatus;
80
+ /**
81
+ * Creates a BinaryOnly status.
82
+ */
83
+ export declare const binaryOnly: (binaryPath: string) => InstallationStatus;
84
+ /**
85
+ * Creates a FullyInstalled status.
86
+ */
87
+ export declare const fullyInstalled: (binaryPath: string, configPath: string) => InstallationStatus;
88
+ export {};
89
+ //# sourceMappingURL=InstallationStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InstallationStatus.d.ts","sourceRoot":"","sources":["../../../src/types/InstallationStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAQ,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;;;;AAE7C;;GAEG;AACH,qBAAa,YAAa,SAAQ,kBAAiC,EAAE,CAAC;CAAG;;;;AAEzE;;GAEG;AACH,qBAAa,UAAW,SAAQ,gBAA+B;IAC7D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B,CAAC;CAAG;;;;AAEL;;GAEG;AACH,qBAAa,UAAW,SAAQ,gBAA+B;IAC7D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B,CAAC;CAAG;;;;AAEL;;GAEG;AACH,qBAAa,cAAe,SAAQ,oBAAmC;IACrE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B,CAAC;CAAG;AAEL;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAQ3B,CAAA;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,kBAAkB,KAAG,OAQvD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,kBAAkB,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAS3E,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,kBAAkB,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAS3E,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,QAAO,kBAAwC,CAAA;AAExE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,YAAY,MAAM,KAAG,kBAAoD,CAAA;AAEpG;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,YAAY,MAAM,KAAG,kBAAoD,CAAA;AAEpG;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,EAAE,YAAY,MAAM,KAAG,kBACxB,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Types of paths a harness may provide.
3
+ *
4
+ * Each harness can have different configuration directories
5
+ * for different purposes.
6
+ *
7
+ * @module
8
+ */
9
+ import { Schema } from "effect";
10
+ /**
11
+ * Path type schema.
12
+ */
13
+ export declare const PathType: Schema.Literal<["Config", "Skills", "Commands", "Mcp", "Rules"]>;
14
+ /**
15
+ * Path type.
16
+ */
17
+ export type PathType = typeof PathType.Type;
18
+ /**
19
+ * All supported path types.
20
+ */
21
+ export declare const PathTypeAll: readonly ["Config", "Skills", "Commands", "Mcp", "Rules"];
22
+ //# sourceMappingURL=PathType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PathType.d.ts","sourceRoot":"","sources":["../../../src/types/PathType.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B;;GAEG;AACH,eAAO,MAAM,QAAQ,kEAAiE,CAAA;AAEtF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAE3C;;GAEG;AACH,eAAO,MAAM,WAAW,2DAA8F,CAAA"}