@enactprotocol/shared 2.0.0 → 2.0.2

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 (89) hide show
  1. package/dist/config.d.ts +164 -0
  2. package/dist/config.d.ts.map +1 -0
  3. package/dist/config.js +386 -0
  4. package/dist/config.js.map +1 -0
  5. package/dist/constants.d.ts +17 -0
  6. package/dist/constants.d.ts.map +1 -0
  7. package/dist/constants.js +26 -0
  8. package/dist/constants.js.map +1 -0
  9. package/dist/execution/command.d.ts +102 -0
  10. package/dist/execution/command.d.ts.map +1 -0
  11. package/dist/execution/command.js +262 -0
  12. package/dist/execution/command.js.map +1 -0
  13. package/dist/execution/index.d.ts +12 -0
  14. package/dist/execution/index.d.ts.map +1 -0
  15. package/dist/execution/index.js +17 -0
  16. package/dist/execution/index.js.map +1 -0
  17. package/dist/execution/runtime.d.ts +82 -0
  18. package/dist/execution/runtime.d.ts.map +1 -0
  19. package/dist/execution/runtime.js +273 -0
  20. package/dist/execution/runtime.js.map +1 -0
  21. package/dist/execution/types.d.ts +306 -0
  22. package/dist/execution/types.d.ts.map +1 -0
  23. package/dist/execution/types.js +14 -0
  24. package/dist/execution/types.js.map +1 -0
  25. package/dist/execution/validation.d.ts +43 -0
  26. package/dist/execution/validation.d.ts.map +1 -0
  27. package/dist/execution/validation.js +430 -0
  28. package/dist/execution/validation.js.map +1 -0
  29. package/dist/index.d.ts +21 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +49 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/manifest/index.d.ts +7 -0
  34. package/dist/manifest/index.d.ts.map +1 -0
  35. package/dist/manifest/index.js +10 -0
  36. package/dist/manifest/index.js.map +1 -0
  37. package/dist/manifest/loader.d.ts +76 -0
  38. package/dist/manifest/loader.d.ts.map +1 -0
  39. package/dist/manifest/loader.js +146 -0
  40. package/dist/manifest/loader.js.map +1 -0
  41. package/dist/manifest/parser.d.ts +64 -0
  42. package/dist/manifest/parser.d.ts.map +1 -0
  43. package/dist/manifest/parser.js +135 -0
  44. package/dist/manifest/parser.js.map +1 -0
  45. package/dist/manifest/validator.d.ts +95 -0
  46. package/dist/manifest/validator.d.ts.map +1 -0
  47. package/dist/manifest/validator.js +258 -0
  48. package/dist/manifest/validator.js.map +1 -0
  49. package/dist/paths.d.ts +57 -0
  50. package/dist/paths.d.ts.map +1 -0
  51. package/dist/paths.js +93 -0
  52. package/dist/paths.js.map +1 -0
  53. package/dist/registry.d.ts +73 -0
  54. package/dist/registry.d.ts.map +1 -0
  55. package/dist/registry.js +147 -0
  56. package/dist/registry.js.map +1 -0
  57. package/dist/resolver.d.ts +89 -0
  58. package/dist/resolver.d.ts.map +1 -0
  59. package/dist/resolver.js +282 -0
  60. package/dist/resolver.js.map +1 -0
  61. package/dist/types/index.d.ts +6 -0
  62. package/dist/types/index.d.ts.map +1 -0
  63. package/dist/types/index.js +5 -0
  64. package/dist/types/index.js.map +1 -0
  65. package/dist/types/manifest.d.ts +201 -0
  66. package/dist/types/manifest.d.ts.map +1 -0
  67. package/dist/types/manifest.js +13 -0
  68. package/dist/types/manifest.js.map +1 -0
  69. package/dist/types.d.ts +5 -0
  70. package/dist/types.d.ts.map +1 -0
  71. package/dist/types.js +5 -0
  72. package/dist/types.js.map +1 -0
  73. package/dist/utils/fs.d.ts +105 -0
  74. package/dist/utils/fs.d.ts.map +1 -0
  75. package/dist/utils/fs.js +233 -0
  76. package/dist/utils/fs.js.map +1 -0
  77. package/dist/utils/logger.d.ts +112 -0
  78. package/dist/utils/logger.d.ts.map +1 -0
  79. package/dist/utils/logger.js +232 -0
  80. package/dist/utils/logger.js.map +1 -0
  81. package/dist/utils/version.d.ts +62 -0
  82. package/dist/utils/version.d.ts.map +1 -0
  83. package/dist/utils/version.js +259 -0
  84. package/dist/utils/version.js.map +1 -0
  85. package/package.json +2 -2
  86. package/src/config.ts +36 -2
  87. package/src/index.ts +1 -0
  88. package/tests/config.test.ts +190 -1
  89. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Tool resolver - finds and loads tools from various locations
3
+ *
4
+ * Resolution order:
5
+ * 1. Direct file path (if provided path exists)
6
+ * 2. Project tools (.enact/tools/{name}/)
7
+ * 3. Global tools (via ~/.enact/tools.json → cache)
8
+ * 4. Cache (~/.enact/cache/{name}/{version}/)
9
+ */
10
+ import type { ToolResolution } from "./types/manifest";
11
+ /**
12
+ * Error thrown when tool resolution fails
13
+ */
14
+ export declare class ToolResolveError extends Error {
15
+ readonly toolPath: string;
16
+ readonly searchedLocations?: string[] | undefined;
17
+ constructor(message: string, toolPath: string, searchedLocations?: string[] | undefined);
18
+ }
19
+ /**
20
+ * Options for tool resolution
21
+ */
22
+ export interface ResolveOptions {
23
+ /** Starting directory for project search (defaults to cwd) */
24
+ startDir?: string;
25
+ /** Specific version to look for in cache */
26
+ version?: string;
27
+ /** Skip project-level tools */
28
+ skipProject?: boolean;
29
+ /** Skip user-level tools */
30
+ skipUser?: boolean;
31
+ /** Skip cached tools */
32
+ skipCache?: boolean;
33
+ }
34
+ /**
35
+ * Convert tool name to directory path
36
+ * e.g., "acme/utils/greeter" -> "acme/utils/greeter"
37
+ */
38
+ export declare function toolNameToPath(name: string): string;
39
+ /**
40
+ * Normalize a tool name (lowercase, forward slashes)
41
+ */
42
+ export declare function normalizeToolName(name: string): string;
43
+ /**
44
+ * Get the tool path within a tools directory
45
+ */
46
+ export declare function getToolPath(toolsDir: string, toolName: string): string;
47
+ /**
48
+ * Resolve a tool from a file path
49
+ *
50
+ * @param filePath - Path to manifest file or directory containing manifest
51
+ * @returns ToolResolution
52
+ * @throws ToolResolveError if not found
53
+ */
54
+ export declare function resolveToolFromPath(filePath: string): ToolResolution;
55
+ /**
56
+ * Resolve a tool by name, searching through standard locations
57
+ *
58
+ * @param toolName - Tool name (e.g., "acme/utils/greeter")
59
+ * @param options - Resolution options
60
+ * @returns ToolResolution
61
+ * @throws ToolResolveError if not found
62
+ */
63
+ export declare function resolveTool(toolName: string, options?: ResolveOptions): ToolResolution;
64
+ /**
65
+ * Try to resolve a tool, returning null instead of throwing
66
+ *
67
+ * @param toolNameOrPath - Tool name or path
68
+ * @param options - Resolution options
69
+ * @returns ToolResolution or null
70
+ */
71
+ export declare function tryResolveTool(toolNameOrPath: string, options?: ResolveOptions): ToolResolution | null;
72
+ /**
73
+ * Resolve a tool, automatically detecting if input is a path or name
74
+ *
75
+ * @param toolNameOrPath - Tool name or path to manifest/directory
76
+ * @param options - Resolution options
77
+ * @returns ToolResolution
78
+ * @throws ToolResolveError if not found
79
+ */
80
+ export declare function resolveToolAuto(toolNameOrPath: string, options?: ResolveOptions): ToolResolution;
81
+ /**
82
+ * Get all locations where a tool might be installed
83
+ *
84
+ * @param toolName - Tool name
85
+ * @param options - Resolution options
86
+ * @returns Array of potential paths
87
+ */
88
+ export declare function getToolSearchPaths(toolName: string, options?: ResolveOptions): string[];
89
+ //# sourceMappingURL=resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../src/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EAAgB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAErE;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;aAGvB,QAAQ,EAAE,MAAM;aAChB,iBAAiB,CAAC,EAAE,MAAM,EAAE;gBAF5C,OAAO,EAAE,MAAM,EACC,QAAQ,EAAE,MAAM,EAChB,iBAAiB,CAAC,EAAE,MAAM,EAAE,YAAA;CAK/C;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtE;AAkCD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CA8BpE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,cAAc,CAqE1F;AA6BD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,cAAmB,GAC3B,cAAc,GAAG,IAAI,CAiBvB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,cAAmB,GAC3B,cAAc,CAqBhB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,MAAM,EAAE,CA2B3F"}
@@ -0,0 +1,282 @@
1
+ /**
2
+ * Tool resolver - finds and loads tools from various locations
3
+ *
4
+ * Resolution order:
5
+ * 1. Direct file path (if provided path exists)
6
+ * 2. Project tools (.enact/tools/{name}/)
7
+ * 3. Global tools (via ~/.enact/tools.json → cache)
8
+ * 4. Cache (~/.enact/cache/{name}/{version}/)
9
+ */
10
+ import { existsSync, readdirSync } from "node:fs";
11
+ import { dirname, isAbsolute, join, resolve } from "node:path";
12
+ import { findManifestFile, loadManifest } from "./manifest/loader";
13
+ import { getCacheDir, getProjectEnactDir } from "./paths";
14
+ import { getInstalledVersion, getToolCachePath } from "./registry";
15
+ /**
16
+ * Error thrown when tool resolution fails
17
+ */
18
+ export class ToolResolveError extends Error {
19
+ toolPath;
20
+ searchedLocations;
21
+ constructor(message, toolPath, searchedLocations) {
22
+ super(message);
23
+ this.toolPath = toolPath;
24
+ this.searchedLocations = searchedLocations;
25
+ this.name = "ToolResolveError";
26
+ }
27
+ }
28
+ /**
29
+ * Convert tool name to directory path
30
+ * e.g., "acme/utils/greeter" -> "acme/utils/greeter"
31
+ */
32
+ export function toolNameToPath(name) {
33
+ // Tool names are already path-like, just normalize
34
+ return name.replace(/\\/g, "/");
35
+ }
36
+ /**
37
+ * Normalize a tool name (lowercase, forward slashes)
38
+ */
39
+ export function normalizeToolName(name) {
40
+ return name.toLowerCase().replace(/\\/g, "/").trim();
41
+ }
42
+ /**
43
+ * Get the tool path within a tools directory
44
+ */
45
+ export function getToolPath(toolsDir, toolName) {
46
+ return join(toolsDir, toolNameToPath(toolName));
47
+ }
48
+ /**
49
+ * Try to load a tool from a specific directory
50
+ *
51
+ * @param dir - Directory to check
52
+ * @param location - The location type for metadata
53
+ * @returns ToolResolution or null if not found/invalid
54
+ */
55
+ function tryLoadFromDir(dir, location) {
56
+ if (!existsSync(dir)) {
57
+ return null;
58
+ }
59
+ const manifestPath = findManifestFile(dir);
60
+ if (!manifestPath) {
61
+ return null;
62
+ }
63
+ try {
64
+ const loaded = loadManifest(manifestPath);
65
+ return {
66
+ manifest: loaded.manifest,
67
+ sourceDir: dir,
68
+ location,
69
+ manifestPath,
70
+ version: loaded.manifest.version,
71
+ };
72
+ }
73
+ catch {
74
+ // Invalid manifest, skip
75
+ return null;
76
+ }
77
+ }
78
+ /**
79
+ * Resolve a tool from a file path
80
+ *
81
+ * @param filePath - Path to manifest file or directory containing manifest
82
+ * @returns ToolResolution
83
+ * @throws ToolResolveError if not found
84
+ */
85
+ export function resolveToolFromPath(filePath) {
86
+ const absolutePath = isAbsolute(filePath) ? filePath : resolve(filePath);
87
+ // Check if it's a manifest file directly
88
+ if (absolutePath.endsWith(".yaml") ||
89
+ absolutePath.endsWith(".yml") ||
90
+ absolutePath.endsWith(".md")) {
91
+ if (!existsSync(absolutePath)) {
92
+ throw new ToolResolveError(`Manifest file not found: ${absolutePath}`, filePath);
93
+ }
94
+ const loaded = loadManifest(absolutePath);
95
+ return {
96
+ manifest: loaded.manifest,
97
+ sourceDir: dirname(absolutePath),
98
+ location: "file",
99
+ manifestPath: absolutePath,
100
+ version: loaded.manifest.version,
101
+ };
102
+ }
103
+ // Treat as directory
104
+ const result = tryLoadFromDir(absolutePath, "file");
105
+ if (result) {
106
+ return result;
107
+ }
108
+ throw new ToolResolveError(`No manifest found at: ${absolutePath}`, filePath);
109
+ }
110
+ /**
111
+ * Resolve a tool by name, searching through standard locations
112
+ *
113
+ * @param toolName - Tool name (e.g., "acme/utils/greeter")
114
+ * @param options - Resolution options
115
+ * @returns ToolResolution
116
+ * @throws ToolResolveError if not found
117
+ */
118
+ export function resolveTool(toolName, options = {}) {
119
+ const normalizedName = normalizeToolName(toolName);
120
+ const searchedLocations = [];
121
+ // 1. Try project tools (.enact/tools/{name}/)
122
+ if (!options.skipProject) {
123
+ const projectDir = getProjectEnactDir(options.startDir);
124
+ if (projectDir) {
125
+ const projectToolsDir = join(projectDir, "tools");
126
+ const toolDir = getToolPath(projectToolsDir, normalizedName);
127
+ searchedLocations.push(toolDir);
128
+ const result = tryLoadFromDir(toolDir, "project");
129
+ if (result) {
130
+ return result;
131
+ }
132
+ }
133
+ }
134
+ // 2. Try global tools (via ~/.enact/tools.json → cache)
135
+ if (!options.skipUser) {
136
+ const globalVersion = getInstalledVersion(normalizedName, "global");
137
+ if (globalVersion) {
138
+ const cachePath = getToolCachePath(normalizedName, globalVersion);
139
+ searchedLocations.push(cachePath);
140
+ const result = tryLoadFromDir(cachePath, "user");
141
+ if (result) {
142
+ return result;
143
+ }
144
+ }
145
+ }
146
+ // 3. Try cache (with optional version)
147
+ if (!options.skipCache) {
148
+ const cacheDir = getCacheDir();
149
+ const toolCacheBase = getToolPath(cacheDir, normalizedName);
150
+ if (options.version) {
151
+ // Look for specific version
152
+ const versionDir = join(toolCacheBase, `v${options.version.replace(/^v/, "")}`);
153
+ searchedLocations.push(versionDir);
154
+ const result = tryLoadFromDir(versionDir, "cache");
155
+ if (result) {
156
+ return result;
157
+ }
158
+ }
159
+ else {
160
+ // Look for latest cached version
161
+ if (existsSync(toolCacheBase)) {
162
+ const latestVersion = findLatestCachedVersion(toolCacheBase);
163
+ if (latestVersion) {
164
+ const versionDir = join(toolCacheBase, latestVersion);
165
+ searchedLocations.push(versionDir);
166
+ const result = tryLoadFromDir(versionDir, "cache");
167
+ if (result) {
168
+ return result;
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
174
+ throw new ToolResolveError(`Tool not found: ${toolName}. Searched locations:\n${searchedLocations.map((l) => ` - ${l}`).join("\n")}`, toolName, searchedLocations);
175
+ }
176
+ /**
177
+ * Find the latest cached version directory
178
+ */
179
+ function findLatestCachedVersion(toolCacheBase) {
180
+ try {
181
+ const entries = readdirSync(toolCacheBase, { withFileTypes: true });
182
+ const versions = entries
183
+ .filter((e) => e.isDirectory() && e.name.startsWith("v"))
184
+ .map((e) => e.name)
185
+ .sort((a, b) => {
186
+ // Sort by semver (v1.0.0 format)
187
+ const aVer = a.slice(1).split(".").map(Number);
188
+ const bVer = b.slice(1).split(".").map(Number);
189
+ for (let i = 0; i < 3; i++) {
190
+ if ((aVer[i] ?? 0) !== (bVer[i] ?? 0)) {
191
+ return (bVer[i] ?? 0) - (aVer[i] ?? 0);
192
+ }
193
+ }
194
+ return 0;
195
+ });
196
+ return versions[0] ?? null;
197
+ }
198
+ catch {
199
+ return null;
200
+ }
201
+ }
202
+ /**
203
+ * Try to resolve a tool, returning null instead of throwing
204
+ *
205
+ * @param toolNameOrPath - Tool name or path
206
+ * @param options - Resolution options
207
+ * @returns ToolResolution or null
208
+ */
209
+ export function tryResolveTool(toolNameOrPath, options = {}) {
210
+ try {
211
+ // Check if it looks like a path
212
+ if (toolNameOrPath.startsWith("/") ||
213
+ toolNameOrPath.startsWith("./") ||
214
+ toolNameOrPath.startsWith("../") ||
215
+ toolNameOrPath.includes("\\") ||
216
+ existsSync(toolNameOrPath)) {
217
+ return resolveToolFromPath(toolNameOrPath);
218
+ }
219
+ return resolveTool(toolNameOrPath, options);
220
+ }
221
+ catch {
222
+ return null;
223
+ }
224
+ }
225
+ /**
226
+ * Resolve a tool, automatically detecting if input is a path or name
227
+ *
228
+ * @param toolNameOrPath - Tool name or path to manifest/directory
229
+ * @param options - Resolution options
230
+ * @returns ToolResolution
231
+ * @throws ToolResolveError if not found
232
+ */
233
+ export function resolveToolAuto(toolNameOrPath, options = {}) {
234
+ // Check if it looks like a path
235
+ if (toolNameOrPath.startsWith("/") ||
236
+ toolNameOrPath.startsWith("./") ||
237
+ toolNameOrPath.startsWith("../") ||
238
+ toolNameOrPath.includes("\\")) {
239
+ return resolveToolFromPath(toolNameOrPath);
240
+ }
241
+ // Check if the path exists as-is (could be a relative directory without ./)
242
+ if (existsSync(toolNameOrPath)) {
243
+ const result = tryLoadFromDir(resolve(toolNameOrPath), "file");
244
+ if (result) {
245
+ return result;
246
+ }
247
+ }
248
+ // Treat as tool name
249
+ return resolveTool(toolNameOrPath, options);
250
+ }
251
+ /**
252
+ * Get all locations where a tool might be installed
253
+ *
254
+ * @param toolName - Tool name
255
+ * @param options - Resolution options
256
+ * @returns Array of potential paths
257
+ */
258
+ export function getToolSearchPaths(toolName, options = {}) {
259
+ const normalizedName = normalizeToolName(toolName);
260
+ const paths = [];
261
+ // Project tools
262
+ if (!options.skipProject) {
263
+ const projectDir = getProjectEnactDir(options.startDir);
264
+ if (projectDir) {
265
+ paths.push(join(projectDir, "tools", toolNameToPath(normalizedName)));
266
+ }
267
+ }
268
+ // Global tools (via tools.json → cache)
269
+ if (!options.skipUser) {
270
+ const globalVersion = getInstalledVersion(normalizedName, "global");
271
+ if (globalVersion) {
272
+ paths.push(getToolCachePath(normalizedName, globalVersion));
273
+ }
274
+ }
275
+ // Cache
276
+ if (!options.skipCache) {
277
+ const cacheDir = getCacheDir();
278
+ paths.push(join(cacheDir, toolNameToPath(normalizedName)));
279
+ }
280
+ return paths;
281
+ }
282
+ //# sourceMappingURL=resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver.js","sourceRoot":"","sources":["../src/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGnE;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAGvB;IACA;IAHlB,YACE,OAAe,EACC,QAAgB,EAChB,iBAA4B;QAE5C,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,sBAAiB,GAAjB,iBAAiB,CAAW;QAG5C,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAkBD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,mDAAmD;IACnD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MA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CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Type exports from @enactprotocol/shared
3
+ */
4
+ export type { ToolManifest, PackageManifest, ParsedManifest, EnvVariable, EnvVariables, Author, ToolAnnotations, ResourceRequirements, ToolExample, ValidationResult, ValidationError, ValidationWarning, ToolLocation, ToolResolution, ManifestFileName, } from "./manifest";
5
+ export { MANIFEST_FILES, PACKAGE_MANIFEST_FILE, } from "./manifest";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAEV,YAAY,EACZ,eAAe,EACf,cAAc,EAEd,WAAW,EACX,YAAY,EACZ,MAAM,EACN,eAAe,EACf,oBAAoB,EACpB,WAAW,EAEX,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EAEjB,YAAY,EACZ,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,cAAc,EACd,qBAAqB,GACtB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Type exports from @enactprotocol/shared
3
+ */
4
+ export { MANIFEST_FILES, PACKAGE_MANIFEST_FILE, } from "./manifest";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwBH,OAAO,EACL,cAAc,EACd,qBAAqB,GACtB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,201 @@
1
+ /**
2
+ * TypeScript types for Enact tool manifests
3
+ * These types define the structure of enact.yaml and enact.md frontmatter
4
+ */
5
+ import type { JSONSchema7 } from "json-schema";
6
+ /**
7
+ * Environment variable declaration in a tool manifest
8
+ */
9
+ export interface EnvVariable {
10
+ /** Human-readable description of what this variable is for */
11
+ description: string;
12
+ /** If true, stored in OS keyring; if false, stored in .env files */
13
+ secret?: boolean;
14
+ /** Default value if not set (only for non-secrets) */
15
+ default?: string;
16
+ }
17
+ /**
18
+ * Environment variables map
19
+ */
20
+ export type EnvVariables = Record<string, EnvVariable>;
21
+ /**
22
+ * Author information
23
+ */
24
+ export interface Author {
25
+ /** Author name */
26
+ name: string;
27
+ /** Author email (optional) */
28
+ email?: string;
29
+ /** Author website URL (optional) */
30
+ url?: string;
31
+ }
32
+ /**
33
+ * Behavior annotations for AI models
34
+ */
35
+ export interface ToolAnnotations {
36
+ /** Human-readable display name */
37
+ title?: string;
38
+ /** Tool does not modify the environment */
39
+ readOnlyHint?: boolean;
40
+ /** Tool may make irreversible changes */
41
+ destructiveHint?: boolean;
42
+ /** Multiple executions produce the same result */
43
+ idempotentHint?: boolean;
44
+ /** Tool interacts with external systems (network, APIs) */
45
+ openWorldHint?: boolean;
46
+ }
47
+ /**
48
+ * Resource requirements for tool execution
49
+ */
50
+ export interface ResourceRequirements {
51
+ /** System memory needed (e.g., "512Mi", "2Gi") */
52
+ memory?: string;
53
+ /** GPU memory needed (e.g., "24Gi") */
54
+ gpu?: string;
55
+ /** Disk space needed (e.g., "100Gi") */
56
+ disk?: string;
57
+ }
58
+ /**
59
+ * Example/test case for a tool
60
+ */
61
+ export interface ToolExample {
62
+ /** Input parameters for this example */
63
+ input?: Record<string, unknown>;
64
+ /** Expected output (for validation) */
65
+ output?: unknown;
66
+ /** Description of this test case */
67
+ description?: string;
68
+ }
69
+ /**
70
+ * Complete tool manifest structure
71
+ * This represents the YAML frontmatter in enact.md or the full enact.yaml
72
+ */
73
+ export interface ToolManifest {
74
+ /** Hierarchical tool identifier (e.g., "org/category/tool-name") */
75
+ name: string;
76
+ /** Human-readable description of what the tool does */
77
+ description: string;
78
+ /** Version of the Enact protocol specification (e.g., "2.0.0") */
79
+ enact?: string;
80
+ /** Tool version in semver format (e.g., "1.2.3") */
81
+ version?: string;
82
+ /** Container base image for tool execution (e.g., "node:18-alpine") */
83
+ from?: string;
84
+ /** Build command(s) to run before execution (cached by Dagger) */
85
+ build?: string | string[];
86
+ /** Shell command to execute with ${parameter} substitution */
87
+ command?: string;
88
+ /** Maximum execution time (e.g., "30s", "5m", "1h") */
89
+ timeout?: string;
90
+ /** SPDX license identifier (e.g., "MIT", "Apache-2.0") */
91
+ license?: string;
92
+ /** Keywords for tool discovery and categorization */
93
+ tags?: string[];
94
+ /** JSON Schema defining input parameters */
95
+ inputSchema?: JSONSchema7;
96
+ /** JSON Schema defining output structure */
97
+ outputSchema?: JSONSchema7;
98
+ /** Environment variables and secrets required by the tool */
99
+ env?: EnvVariables;
100
+ /** Behavior hints for AI models */
101
+ annotations?: ToolAnnotations;
102
+ /** Resource limits and requirements */
103
+ resources?: ResourceRequirements;
104
+ /** Extended documentation (Markdown) */
105
+ doc?: string;
106
+ /** Tool creators and maintainers */
107
+ authors?: Author[];
108
+ /** Test cases and expected outputs */
109
+ examples?: ToolExample[];
110
+ /** Custom fields starting with x- (not included in signature verification) */
111
+ [key: `x-${string}`]: unknown;
112
+ }
113
+ /**
114
+ * Package-level configuration (enact-package.yaml)
115
+ * Provides shared configuration for all tools in a directory
116
+ */
117
+ export interface PackageManifest {
118
+ /** Version of the Enact protocol specification */
119
+ enact?: string;
120
+ /** Shared environment variables for all tools in this folder */
121
+ env?: EnvVariables;
122
+ /** Shared authors for all tools */
123
+ authors?: Author[];
124
+ /** Shared license for all tools */
125
+ license?: string;
126
+ /** Custom extension fields */
127
+ [key: `x-${string}`]: unknown;
128
+ }
129
+ /**
130
+ * Parsed manifest with optional markdown body
131
+ */
132
+ export interface ParsedManifest {
133
+ /** The parsed YAML frontmatter */
134
+ manifest: ToolManifest;
135
+ /** The markdown body content (if from .md file) */
136
+ body?: string | undefined;
137
+ /** The file format the manifest was loaded from */
138
+ format: "yaml" | "md";
139
+ }
140
+ /**
141
+ * Result of manifest validation
142
+ */
143
+ export interface ValidationResult {
144
+ /** Whether the manifest is valid */
145
+ valid: boolean;
146
+ /** Validation errors (if any) */
147
+ errors?: ValidationError[] | undefined;
148
+ /** Warnings (non-fatal issues) */
149
+ warnings?: ValidationWarning[] | undefined;
150
+ }
151
+ /**
152
+ * A validation error
153
+ */
154
+ export interface ValidationError {
155
+ /** Path to the field with the error (e.g., "inputSchema.properties.name") */
156
+ path: string;
157
+ /** Error message */
158
+ message: string;
159
+ /** Error code for programmatic handling */
160
+ code: string;
161
+ }
162
+ /**
163
+ * A validation warning
164
+ */
165
+ export interface ValidationWarning {
166
+ /** Path to the field with the warning */
167
+ path: string;
168
+ /** Warning message */
169
+ message: string;
170
+ /** Warning code */
171
+ code: string;
172
+ }
173
+ /**
174
+ * Tool location types for resolution
175
+ */
176
+ export type ToolLocation = "file" | "project" | "user" | "cache" | "registry";
177
+ /**
178
+ * Result of tool resolution
179
+ */
180
+ export interface ToolResolution {
181
+ /** The loaded and validated manifest */
182
+ manifest: ToolManifest;
183
+ /** Directory containing the tool */
184
+ sourceDir: string;
185
+ /** Where the tool was found */
186
+ location: ToolLocation;
187
+ /** Path to the manifest file */
188
+ manifestPath: string;
189
+ /** Tool version (if available) */
190
+ version?: string | undefined;
191
+ }
192
+ /**
193
+ * Supported manifest file names
194
+ */
195
+ export declare const MANIFEST_FILES: readonly ["enact.md", "enact.yaml", "enact.yml"];
196
+ export type ManifestFileName = (typeof MANIFEST_FILES)[number];
197
+ /**
198
+ * Package manifest file name
199
+ */
200
+ export declare const PACKAGE_MANIFEST_FILE = "enact-package.yaml";
201
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/types/manifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IACp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O,MAAM,cAAc,kDAAmD,CAAC;AAC/E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,qBAAqB,uBAAuB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * TypeScript types for Enact tool manifests
3
+ * These types define the structure of enact.yaml and enact.md frontmatter
4
+ */
5
+ /**
6
+ * Supported manifest file names
7
+ */
8
+ export const MANIFEST_FILES = ["enact.md", "enact.yaml", "enact.yml"];
9
+ /**
10
+ * Package manifest file name
11
+ */
12
+ export const PACKAGE_MANIFEST_FILE = "enact-package.yaml";
13
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/types/manifest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkPH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,CAAU,CAAC;AAG/E;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Type definitions for shared utilities
3
+ */
4
+ export type EnactManifest = Record<string, unknown>;
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Type definitions for shared utilities
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}