@farmslot/recipe-cli 0.1.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/CHANGELOG.md +15 -0
- package/LICENSE +21 -0
- package/README.md +53 -0
- package/bin/farmslot-recipe.mjs +10 -0
- package/dist/cli.d.ts +12 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +54 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands.d.ts +13 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +393 -0
- package/dist/commands.js.map +1 -0
- package/dist/composition.d.ts +21 -0
- package/dist/composition.d.ts.map +1 -0
- package/dist/composition.js +232 -0
- package/dist/composition.js.map +1 -0
- package/dist/discovery-error.d.ts +8 -0
- package/dist/discovery-error.d.ts.map +1 -0
- package/dist/discovery-error.js +10 -0
- package/dist/discovery-error.js.map +1 -0
- package/dist/discovery-index.d.ts +63 -0
- package/dist/discovery-index.d.ts.map +1 -0
- package/dist/discovery-index.js +407 -0
- package/dist/discovery-index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/libraries.d.ts +18 -0
- package/dist/libraries.d.ts.map +1 -0
- package/dist/libraries.js +102 -0
- package/dist/libraries.js.map +1 -0
- package/dist/render.d.ts +9 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +165 -0
- package/dist/render.js.map +1 -0
- package/dist/search.d.ts +8 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +90 -0
- package/dist/search.js.map +1 -0
- package/dist/template.d.ts +12 -0
- package/dist/template.d.ts.map +1 -0
- package/dist/template.js +74 -0
- package/dist/template.js.map +1 -0
- package/dist/types.d.ts +262 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +12 -0
- package/dist/version.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { isRecord, OFFICIAL_RECIPE_ACTIONS, officialRecipeActionCapabilities, RECIPE_ACTION_MANIFEST_SCHEMA_URL, validateRecipeActionManifestDocument, validateRecipeWithManifest, } from '@farmslot/protocol';
|
|
4
|
+
import { createStandardCoreAdapters, findLibraryRecipe, loadRecipeLibraries, RecipeResolutionError, resolveRecipeDependencies, SHARED_RECIPE_SCOPE, } from '@farmslot/recipe-harness';
|
|
5
|
+
import { DiscoveryError } from './discovery-error.js';
|
|
6
|
+
import { resolveDiscoveryLibraries } from './libraries.js';
|
|
7
|
+
const OFFICIAL_ACTIONS = new Set(OFFICIAL_RECIPE_ACTIONS);
|
|
8
|
+
const RUNNER_ACTIONS = new Set(['call', 'end']);
|
|
9
|
+
export async function buildDiscoveryIndex(options = {}) {
|
|
10
|
+
// Vouch only for what the host passes, so a library's `requires` gives discovery and the
|
|
11
|
+
// host's own run the same answer. farmslot-recipe passes @farmslot/recipe-cli itself.
|
|
12
|
+
const packageVersions = options.packageVersions
|
|
13
|
+
? { packageVersions: options.packageVersions }
|
|
14
|
+
: {};
|
|
15
|
+
const libraries = await resolveDiscoveryLibraries({ ...options, ...packageVersions });
|
|
16
|
+
const sources = libraries.map((library) => library.source);
|
|
17
|
+
const platform = options.platform ?? null;
|
|
18
|
+
const platforms = [
|
|
19
|
+
...new Set([
|
|
20
|
+
...libraries.flatMap((library) => library.info.platforms),
|
|
21
|
+
...libraries.flatMap((library) => library.info.actionManifests
|
|
22
|
+
.map((file) => file.scope)
|
|
23
|
+
.filter((scope) => scope !== SHARED_RECIPE_SCOPE)),
|
|
24
|
+
...(platform ? [platform] : []),
|
|
25
|
+
]),
|
|
26
|
+
].sort();
|
|
27
|
+
const loadOptions = { ...(platform ? { adapter: platform } : {}), ...packageVersions };
|
|
28
|
+
// Each (libraries, platform) pair loads once per index: the view, the variant scan, id lookups
|
|
29
|
+
// and search all share these.
|
|
30
|
+
const loadLibraries = options.loadLibraries ?? loadRecipeLibraries;
|
|
31
|
+
const loads = new Map();
|
|
32
|
+
const load = (selected, adapter) => {
|
|
33
|
+
const key = `${selected.map((source) => source.name).join('\0')}|${adapter ?? ''}`;
|
|
34
|
+
if (!loads.has(key))
|
|
35
|
+
loads.set(key, loadLibraries(selected, { ...(adapter ? { adapter } : {}), ...packageVersions }));
|
|
36
|
+
return loads.get(key);
|
|
37
|
+
};
|
|
38
|
+
const resolution = await load(sources, platform);
|
|
39
|
+
const documents = new Map([...resolution.recipes].filter(([, recipe]) => !recipe.aliasFor));
|
|
40
|
+
const variants = await recipeVariants(platforms, (adapter) => load(sources, adapter));
|
|
41
|
+
const { actions, manifest } = await indexActions(libraries, platform, new Set(options.handlers ?? createStandardCoreAdapters().map((adapter) => adapter.action)));
|
|
42
|
+
const recipes = indexRecipes(documents, resolution, manifest, variants, platform);
|
|
43
|
+
return {
|
|
44
|
+
platform,
|
|
45
|
+
platforms,
|
|
46
|
+
libraries,
|
|
47
|
+
loadOptions,
|
|
48
|
+
load,
|
|
49
|
+
resolution,
|
|
50
|
+
manifest,
|
|
51
|
+
actions,
|
|
52
|
+
recipes,
|
|
53
|
+
documents,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export function libraryInfos(index) {
|
|
57
|
+
return index.libraries.map((library) => library.info);
|
|
58
|
+
}
|
|
59
|
+
/** Every implementation of each ref: the generic recipe and each platform variant. */
|
|
60
|
+
async function recipeVariants(platforms, load) {
|
|
61
|
+
const implementations = new Map();
|
|
62
|
+
const add = (recipe, platform) => {
|
|
63
|
+
const variant = { platform, source: recipe.source, file: recipe.file };
|
|
64
|
+
const existing = implementations.get(recipe.ref);
|
|
65
|
+
if (existing)
|
|
66
|
+
existing.variants.push(variant);
|
|
67
|
+
else
|
|
68
|
+
implementations.set(recipe.ref, { variants: [variant], representative: recipe });
|
|
69
|
+
};
|
|
70
|
+
for (const recipe of (await load(null)).recipes.values())
|
|
71
|
+
if (!recipe.aliasFor)
|
|
72
|
+
add(recipe, null);
|
|
73
|
+
for (const platform of platforms) {
|
|
74
|
+
for (const recipe of (await load(platform)).recipes.values()) {
|
|
75
|
+
if (!recipe.aliasFor && recipe.adapter === platform)
|
|
76
|
+
add(recipe, platform);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return implementations;
|
|
80
|
+
}
|
|
81
|
+
async function indexActions(libraries, platform, handlers) {
|
|
82
|
+
const actions = new Map();
|
|
83
|
+
const viewActions = {};
|
|
84
|
+
const observers = new Map();
|
|
85
|
+
const viewScopes = platform ? [platform, SHARED_RECIPE_SCOPE] : null;
|
|
86
|
+
for (const library of libraries) {
|
|
87
|
+
// Platform manifest before shared, matching platform variants before generic recipes.
|
|
88
|
+
const files = [...library.info.actionManifests].sort((left, right) => Number(left.scope === SHARED_RECIPE_SCOPE) - Number(right.scope === SHARED_RECIPE_SCOPE) ||
|
|
89
|
+
left.scope.localeCompare(right.scope));
|
|
90
|
+
for (const file of files) {
|
|
91
|
+
if (viewScopes && !viewScopes.includes(file.scope))
|
|
92
|
+
continue;
|
|
93
|
+
const document = await readActionManifest(library, file.file);
|
|
94
|
+
// The all-platform view can only rely on shared declarations.
|
|
95
|
+
const inView = platform !== null || file.scope === SHARED_RECIPE_SCOPE;
|
|
96
|
+
for (const [name, entry] of Object.entries(document.actions)) {
|
|
97
|
+
const existing = actions.get(name);
|
|
98
|
+
if (existing) {
|
|
99
|
+
if (!existing.platforms.includes(file.scope))
|
|
100
|
+
existing.platforms.push(file.scope);
|
|
101
|
+
if (existing.source !== library.info.name &&
|
|
102
|
+
!existing.shadows.includes(library.info.name))
|
|
103
|
+
existing.shadows.push(library.info.name);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
actions.set(name, describeAction(name, entry, library.info.name, file, handlers));
|
|
107
|
+
}
|
|
108
|
+
if (inView && !Object.hasOwn(viewActions, name))
|
|
109
|
+
viewActions[name] = entry;
|
|
110
|
+
}
|
|
111
|
+
if (inView) {
|
|
112
|
+
for (const observer of document.observers ?? []) {
|
|
113
|
+
const ref = isRecord(observer) && typeof observer.ref === 'string' ? observer.ref : null;
|
|
114
|
+
if (ref && !observers.has(ref))
|
|
115
|
+
observers.set(ref, observer);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
for (const name of [...handlers, ...RUNNER_ACTIONS]) {
|
|
121
|
+
if (actions.has(name))
|
|
122
|
+
continue;
|
|
123
|
+
actions.set(name, {
|
|
124
|
+
name,
|
|
125
|
+
kind: OFFICIAL_ACTIONS.has(name) ? 'official' : 'custom',
|
|
126
|
+
description: '',
|
|
127
|
+
parameters: [],
|
|
128
|
+
capabilities: actionCapabilities(name, undefined),
|
|
129
|
+
handler: actionHandler(name, handlers),
|
|
130
|
+
declared: RUNNER_ACTIONS.has(name),
|
|
131
|
+
source: null,
|
|
132
|
+
manifest: null,
|
|
133
|
+
shadows: [],
|
|
134
|
+
platforms: [],
|
|
135
|
+
resultCases: [],
|
|
136
|
+
schema: null,
|
|
137
|
+
examples: [],
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
for (const action of actions.values())
|
|
141
|
+
action.platforms.sort();
|
|
142
|
+
const manifest = {
|
|
143
|
+
$schema: RECIPE_ACTION_MANIFEST_SCHEMA_URL,
|
|
144
|
+
actions: viewActions,
|
|
145
|
+
...(observers.size > 0 ? { observers: [...observers.values()] } : {}),
|
|
146
|
+
};
|
|
147
|
+
return {
|
|
148
|
+
actions: new Map([...actions].sort(([left], [right]) => left.localeCompare(right))),
|
|
149
|
+
manifest,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
async function readActionManifest(library, file) {
|
|
153
|
+
const absolute = path.join(library.info.root, file);
|
|
154
|
+
let document;
|
|
155
|
+
try {
|
|
156
|
+
document = JSON.parse(await readFile(absolute, 'utf8'));
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
throw new DiscoveryError('ACTION_MANIFEST_INVALID', `Action manifest ${absolute} is unreadable: ${error instanceof Error ? error.message : String(error)}.`, `fix ${file} in library ${library.info.name}`);
|
|
160
|
+
}
|
|
161
|
+
const validation = validateRecipeActionManifestDocument(document);
|
|
162
|
+
if (validation.status === 'invalid') {
|
|
163
|
+
throw new DiscoveryError('ACTION_MANIFEST_INVALID', `Action manifest ${absolute} is invalid: ${validation.findings
|
|
164
|
+
.filter((finding) => finding.severity === 'error')
|
|
165
|
+
.map((finding) => `${finding.code} ${finding.path}`)
|
|
166
|
+
.join(', ')}.`, `fix ${file} in library ${library.info.name} so it validates as an action manifest v1`);
|
|
167
|
+
}
|
|
168
|
+
return document;
|
|
169
|
+
}
|
|
170
|
+
function describeAction(name, entry, source, file, handlers) {
|
|
171
|
+
const record = isRecord(entry) ? entry : {};
|
|
172
|
+
return {
|
|
173
|
+
name,
|
|
174
|
+
kind: OFFICIAL_ACTIONS.has(name) ? 'official' : 'custom',
|
|
175
|
+
description: typeof record.description === 'string' ? record.description : '',
|
|
176
|
+
parameters: schemaParameters(record.schema, ['action', 'next']),
|
|
177
|
+
capabilities: actionCapabilities(name, record.execution_capabilities),
|
|
178
|
+
handler: actionHandler(name, handlers),
|
|
179
|
+
declared: true,
|
|
180
|
+
source,
|
|
181
|
+
manifest: file.file,
|
|
182
|
+
shadows: [],
|
|
183
|
+
platforms: [file.scope],
|
|
184
|
+
resultCases: Array.isArray(record.result_cases)
|
|
185
|
+
? record.result_cases.filter((value) => typeof value === 'string')
|
|
186
|
+
: [],
|
|
187
|
+
schema: record.schema ?? null,
|
|
188
|
+
examples: Array.isArray(record.examples) ? record.examples : [],
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function actionHandler(name, handlers) {
|
|
192
|
+
if (RUNNER_ACTIONS.has(name))
|
|
193
|
+
return 'runner';
|
|
194
|
+
return handlers.has(name) ? 'builtin' : 'adapter';
|
|
195
|
+
}
|
|
196
|
+
function actionCapabilities(name, declared) {
|
|
197
|
+
return [
|
|
198
|
+
...new Set([
|
|
199
|
+
...(Array.isArray(declared)
|
|
200
|
+
? declared.filter((value) => typeof value === 'string')
|
|
201
|
+
: []),
|
|
202
|
+
...(OFFICIAL_ACTIONS.has(name)
|
|
203
|
+
? officialRecipeActionCapabilities(name)
|
|
204
|
+
: []),
|
|
205
|
+
]),
|
|
206
|
+
].sort();
|
|
207
|
+
}
|
|
208
|
+
/** Parameters of a JSON schema object, in declaration order. */
|
|
209
|
+
export function schemaParameters(schema, exclude = []) {
|
|
210
|
+
if (!isRecord(schema) || !isRecord(schema.properties))
|
|
211
|
+
return [];
|
|
212
|
+
const required = new Set(Array.isArray(schema.required)
|
|
213
|
+
? schema.required.filter((entry) => typeof entry === 'string')
|
|
214
|
+
: []);
|
|
215
|
+
return Object.entries(schema.properties)
|
|
216
|
+
.filter(([name]) => !exclude.includes(name))
|
|
217
|
+
.map(([name, raw]) => {
|
|
218
|
+
const property = isRecord(raw) ? raw : {};
|
|
219
|
+
return {
|
|
220
|
+
name,
|
|
221
|
+
...(typeof property.type === 'string' ? { type: property.type } : {}),
|
|
222
|
+
required: required.has(name),
|
|
223
|
+
...(Object.hasOwn(property, 'default') ? { default: property.default } : {}),
|
|
224
|
+
...(Array.isArray(property.enum) ? { enum: property.enum } : {}),
|
|
225
|
+
...(typeof property.description === 'string' ? { description: property.description } : {}),
|
|
226
|
+
};
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function indexRecipes(documents, resolution, manifest, variants, platform) {
|
|
230
|
+
const readiness = recipeReadiness(documents, resolution, manifest);
|
|
231
|
+
const recipes = new Map();
|
|
232
|
+
for (const recipe of documents.values()) {
|
|
233
|
+
const state = readiness.get(recipe.ref);
|
|
234
|
+
recipes.set(recipe.ref, {
|
|
235
|
+
...recipeSummary(recipe),
|
|
236
|
+
variants: variants.get(recipe.ref)?.variants ?? [],
|
|
237
|
+
runnable: state.problems.length === 0,
|
|
238
|
+
problems: state.problems,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
if (!platform) {
|
|
242
|
+
// Refs that only exist as platform variants are runnable only from a platform view.
|
|
243
|
+
for (const [ref, { variants: implementations, representative }] of variants) {
|
|
244
|
+
if (recipes.has(ref))
|
|
245
|
+
continue;
|
|
246
|
+
recipes.set(ref, {
|
|
247
|
+
...recipeSummary(representative),
|
|
248
|
+
variants: implementations,
|
|
249
|
+
runnable: null,
|
|
250
|
+
problems: [],
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return new Map([...recipes].sort(([left], [right]) => left.localeCompare(right)));
|
|
255
|
+
}
|
|
256
|
+
export function recipeSummary(recipe) {
|
|
257
|
+
const document = recipe.document;
|
|
258
|
+
return {
|
|
259
|
+
ref: recipe.ref,
|
|
260
|
+
id: `${recipe.source}.${recipe.aliasFor ?? recipe.ref}`,
|
|
261
|
+
...(typeof document.title === 'string' && document.title.trim()
|
|
262
|
+
? { title: document.title.trim() }
|
|
263
|
+
: {}),
|
|
264
|
+
...(typeof document.description === 'string' && document.description.trim()
|
|
265
|
+
? { description: document.description.trim() }
|
|
266
|
+
: {}),
|
|
267
|
+
source: recipe.source,
|
|
268
|
+
file: recipe.file,
|
|
269
|
+
variant: recipe.adapter ?? null,
|
|
270
|
+
shadows: [...recipe.shadows],
|
|
271
|
+
parameters: schemaParameters(document.paramsSchema),
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* A recipe is runnable when it validates against the view's declared actions and every recipe
|
|
276
|
+
* it calls resolves and validates too. Validity is keyed by resolution entry, so a qualified
|
|
277
|
+
* alias is judged by the document it actually resolves to.
|
|
278
|
+
*/
|
|
279
|
+
function recipeReadiness(documents, resolution, manifest) {
|
|
280
|
+
const externalRecipeIds = new Set(resolution.recipes.keys());
|
|
281
|
+
const own = new Map();
|
|
282
|
+
for (const [key, recipe] of resolution.recipes) {
|
|
283
|
+
own.set(key, validationProblems(recipe.document, manifest, externalRecipeIds));
|
|
284
|
+
}
|
|
285
|
+
const readiness = new Map();
|
|
286
|
+
for (const recipe of documents.values()) {
|
|
287
|
+
const problems = [...own.get(recipe.ref)];
|
|
288
|
+
try {
|
|
289
|
+
const dependencies = resolveRecipeDependencies({
|
|
290
|
+
rootRef: recipe.ref,
|
|
291
|
+
root: recipe.document,
|
|
292
|
+
rootSource: recipe.provenance,
|
|
293
|
+
recipes: resolution.recipes,
|
|
294
|
+
});
|
|
295
|
+
for (const ref of [...dependencies.recipes.keys()].sort()) {
|
|
296
|
+
if ((own.get(ref) ?? []).length > 0)
|
|
297
|
+
problems.push({
|
|
298
|
+
code: 'RECIPE_DEPENDENCY_NOT_RUNNABLE',
|
|
299
|
+
message: `Called recipe ${ref} does not validate in this view.`,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
catch (error) {
|
|
304
|
+
if (!(error instanceof RecipeResolutionError))
|
|
305
|
+
throw error;
|
|
306
|
+
problems.push({ code: error.code, message: error.message });
|
|
307
|
+
}
|
|
308
|
+
readiness.set(recipe.ref, { problems });
|
|
309
|
+
}
|
|
310
|
+
return readiness;
|
|
311
|
+
}
|
|
312
|
+
function validationProblems(document, manifest, externalRecipeIds) {
|
|
313
|
+
return validateRecipeWithManifest(document, manifest, { externalRecipeIds })
|
|
314
|
+
.findings.filter((finding) => finding.severity === 'error')
|
|
315
|
+
.map((finding) => ({ code: finding.code, message: finding.message, path: finding.path }));
|
|
316
|
+
}
|
|
317
|
+
/** Readiness of any one recipe in this view: a precedence winner, a qualified alias, or a shadowed recipe selected by id. */
|
|
318
|
+
export function assessRecipe(index, recipe) {
|
|
319
|
+
const externalRecipeIds = new Set(index.resolution.recipes.keys());
|
|
320
|
+
const problems = validationProblems(recipe.document, index.manifest, externalRecipeIds);
|
|
321
|
+
try {
|
|
322
|
+
const dependencies = resolveRecipeDependencies({
|
|
323
|
+
rootRef: recipe.ref,
|
|
324
|
+
root: recipe.document,
|
|
325
|
+
rootSource: recipe.provenance,
|
|
326
|
+
recipes: index.resolution.recipes,
|
|
327
|
+
});
|
|
328
|
+
for (const [ref, dependency] of [...dependencies.recipes].sort(([left], [right]) => left.localeCompare(right))) {
|
|
329
|
+
if (validationProblems(dependency.document, index.manifest, externalRecipeIds).length > 0)
|
|
330
|
+
problems.push({
|
|
331
|
+
code: 'RECIPE_DEPENDENCY_NOT_RUNNABLE',
|
|
332
|
+
message: `Called recipe ${ref} does not validate in this view.`,
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
catch (error) {
|
|
337
|
+
if (!(error instanceof RecipeResolutionError))
|
|
338
|
+
throw error;
|
|
339
|
+
problems.push({ code: error.code, message: error.message });
|
|
340
|
+
}
|
|
341
|
+
return problems;
|
|
342
|
+
}
|
|
343
|
+
/** Resolve a recipe name exactly as `run` does: ref, platform alias, or `<library>.<ref>` id. */
|
|
344
|
+
export function findRecipe(index, name) {
|
|
345
|
+
return findLibraryRecipe(name, index.libraries.map((library) => library.source), index.resolution, { ...index.loadOptions, load: (source) => index.load([source], index.platform) });
|
|
346
|
+
}
|
|
347
|
+
/** Recipes that lower-ranked libraries declare under a ref another library wins. */
|
|
348
|
+
export async function shadowedRecipes(index) {
|
|
349
|
+
const sources = index.libraries.map((library) => library.source);
|
|
350
|
+
// The all-platform view must also scan each platform, or platform-only shadows are missed.
|
|
351
|
+
const views = index.platform ? [index.platform] : [null, ...index.platforms];
|
|
352
|
+
const records = new Map();
|
|
353
|
+
// An id already indexed (for example the generic recipe while a platform variant is shadowed)
|
|
354
|
+
// is searchable through that entry; listing it again would duplicate the result.
|
|
355
|
+
const indexed = new Set([...index.recipes.values()].map((recipe) => recipe.id));
|
|
356
|
+
for (const platform of views) {
|
|
357
|
+
const view = await index.load(sources, platform);
|
|
358
|
+
for (const winner of view.recipes.values()) {
|
|
359
|
+
if (winner.aliasFor)
|
|
360
|
+
continue;
|
|
361
|
+
for (const shadow of winner.shadows) {
|
|
362
|
+
const id = `${shadow}.${winner.ref}`;
|
|
363
|
+
if (records.has(id) || indexed.has(id))
|
|
364
|
+
continue;
|
|
365
|
+
const library = index.libraries.find((entry) => entry.info.name === shadow);
|
|
366
|
+
if (!library)
|
|
367
|
+
continue;
|
|
368
|
+
const recipe = (await index.load([library.source], platform)).recipes.get(winner.ref);
|
|
369
|
+
if (recipe && !recipe.aliasFor)
|
|
370
|
+
records.set(id, recipe);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return [...records.entries()]
|
|
375
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
376
|
+
.map(([, recipe]) => recipe);
|
|
377
|
+
}
|
|
378
|
+
/** Closest known names, for not-found guidance. */
|
|
379
|
+
export function suggestNames(name, candidates, limit = 3) {
|
|
380
|
+
const needle = name.toLowerCase();
|
|
381
|
+
return [...candidates]
|
|
382
|
+
.map((candidate) => {
|
|
383
|
+
const lower = candidate.toLowerCase();
|
|
384
|
+
const segment = lower.split('.').pop() ?? lower;
|
|
385
|
+
const distance = Math.min(levenshtein(needle, lower), levenshtein(needle, segment));
|
|
386
|
+
const contains = lower.includes(needle) || needle.includes(segment);
|
|
387
|
+
return { candidate, score: contains ? distance - 100 : distance };
|
|
388
|
+
})
|
|
389
|
+
.filter(({ score }) => score <= Math.max(1, Math.floor(needle.length / 3)))
|
|
390
|
+
.sort((left, right) => left.score - right.score || left.candidate.localeCompare(right.candidate))
|
|
391
|
+
.slice(0, limit)
|
|
392
|
+
.map(({ candidate }) => candidate);
|
|
393
|
+
}
|
|
394
|
+
export function levenshtein(left, right) {
|
|
395
|
+
const prior = Array.from({ length: right.length + 1 }, (_, index) => index);
|
|
396
|
+
for (let leftIndex = 1; leftIndex <= left.length; leftIndex += 1) {
|
|
397
|
+
const current = [leftIndex];
|
|
398
|
+
for (let rightIndex = 1; rightIndex <= right.length; rightIndex += 1) {
|
|
399
|
+
const substitution = prior[rightIndex - 1] + (left[leftIndex - 1] === right[rightIndex - 1] ? 0 : 1);
|
|
400
|
+
current[rightIndex] = Math.min(current[rightIndex - 1] + 1, prior[rightIndex] + 1, substitution);
|
|
401
|
+
}
|
|
402
|
+
for (let index = 0; index < current.length; index += 1)
|
|
403
|
+
prior[index] = current[index];
|
|
404
|
+
}
|
|
405
|
+
return prior[right.length];
|
|
406
|
+
}
|
|
407
|
+
//# sourceMappingURL=discovery-index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery-index.js","sourceRoot":"","sources":["../src/discovery-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,QAAQ,EACR,uBAAuB,EAEvB,gCAAgC,EAChC,iCAAiC,EAGjC,oCAAoC,EACpC,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EAEjB,mBAAmB,EAMnB,qBAAqB,EAErB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAiC,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAW1F,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAS,uBAAuB,CAAC,CAAC;AAClE,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AA4ChD,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,UAA4B,EAAE;IAE9B,yFAAyF;IACzF,sFAAsF;IACtF,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe;QAC7C,CAAC,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE;QAC9C,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,SAAS,GAAG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,MAAM,EAAE,KAAK,IAAI,CAAC;YAAE,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAE,CAAC;IACzF,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAE,CAAC;AAC9B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { createRecipeCliProgram, type RecipeCliOptions, runRecipeCli } from './cli.js';
|
|
2
|
+
export { type DiscoveryCommandContext, registerDiscoveryCommands } from './commands.js';
|
|
3
|
+
export { explainRecipe, type RecipeComposition, recipeComposition } from './composition.js';
|
|
4
|
+
export { DiscoveryError, type DiscoveryErrorCode } from './discovery-error.js';
|
|
5
|
+
export { assessRecipe, buildDiscoveryIndex, type DiscoveryOptions, findRecipe, type IndexedAction, type RecipeDiscoveryIndex, type RecipeReadinessView, } from './discovery-index.js';
|
|
6
|
+
export { type DiscoveryLibraryOptions, PRECEDENCE_RULES, type ResolvedDiscoveryLibrary, resolveDiscoveryLibraries, } from './libraries.js';
|
|
7
|
+
export { searchIndex } from './search.js';
|
|
8
|
+
export type * from './types.js';
|
|
9
|
+
export { DISCOVERY_SCHEMA_VERSION } from './types.js';
|
|
10
|
+
export { RECIPE_CLI_VERSION } from './version.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,KAAK,gBAAgB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACvF,OAAO,EAAE,KAAK,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,UAAU,EACV,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,uBAAuB,EAC5B,gBAAgB,EAChB,KAAK,wBAAwB,EAC7B,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,mBAAmB,YAAY,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { createRecipeCliProgram, runRecipeCli } from './cli.js';
|
|
2
|
+
export { registerDiscoveryCommands } from './commands.js';
|
|
3
|
+
export { explainRecipe, recipeComposition } from './composition.js';
|
|
4
|
+
export { DiscoveryError } from './discovery-error.js';
|
|
5
|
+
export { assessRecipe, buildDiscoveryIndex, findRecipe, } from './discovery-index.js';
|
|
6
|
+
export { PRECEDENCE_RULES, resolveDiscoveryLibraries, } from './libraries.js';
|
|
7
|
+
export { searchIndex } from './search.js';
|
|
8
|
+
export { DISCOVERY_SCHEMA_VERSION } from './types.js';
|
|
9
|
+
export { RECIPE_CLI_VERSION } from './version.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAyB,YAAY,EAAE,MAAM,UAAU,CAAC;AACvF,OAAO,EAAgC,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EAAE,aAAa,EAA0B,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,cAAc,EAA2B,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EACL,YAAY,EACZ,mBAAmB,EAEnB,UAAU,GAIX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,gBAAgB,EAEhB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type RecipeLibraryEnv, type RecipeLibraryManifest, type RecipeLibrarySource, type RecipePackageVersions } from '@farmslot/recipe-harness';
|
|
2
|
+
import type { DiscoveryLibrary } from './types.js';
|
|
3
|
+
export declare const PRECEDENCE_RULES: string[];
|
|
4
|
+
export interface ResolvedDiscoveryLibrary {
|
|
5
|
+
info: DiscoveryLibrary;
|
|
6
|
+
source: RecipeLibrarySource;
|
|
7
|
+
manifest: RecipeLibraryManifest | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface DiscoveryLibraryOptions {
|
|
10
|
+
/** `--library` entries, `name=path` or `path`. */
|
|
11
|
+
libraries?: readonly string[];
|
|
12
|
+
env?: RecipeLibraryEnv;
|
|
13
|
+
/** Package versions the host provides for checking each library's `requires`. */
|
|
14
|
+
packageVersions?: RecipePackageVersions;
|
|
15
|
+
}
|
|
16
|
+
/** Resolve the ordered libraries with their manifests, digests and provenance. */
|
|
17
|
+
export declare function resolveDiscoveryLibraries(options?: DiscoveryLibraryOptions): Promise<ResolvedDiscoveryLibrary[]>;
|
|
18
|
+
//# sourceMappingURL=libraries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libraries.d.ts","sourceRoot":"","sources":["../src/libraries.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAE3B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAA+B,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAIhF,eAAO,MAAM,gBAAgB,UAM5B,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAuB;IACtC,kDAAkD;IAClD,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB,iFAAiF;IACjF,eAAe,CAAC,EAAE,qBAAqB,CAAC;CACzC;AAED,kFAAkF;AAClF,wBAAsB,yBAAyB,CAC7C,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,wBAAwB,EAAE,CAAC,CA2CrC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { lstat } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { BUILT_IN_RECIPE_PLATFORMS, checkRecipeLibraryRequirements, digestRecipeLibrary, listLibraryFiles, readRecipeLibraryManifest, resolveRecipeLibrarySources, } from '@farmslot/recipe-harness';
|
|
4
|
+
const ACTION_MANIFEST_FILE = /^manifests\/([^/]+)\.action-manifest\.json$/u;
|
|
5
|
+
export const PRECEDENCE_RULES = [
|
|
6
|
+
'Libraries are searched in rank order: --library entries, then RECIPE_LIBRARY_PATH, else the personal library.',
|
|
7
|
+
'A --library entry replaces the RECIPE_LIBRARY_PATH entry with the same name.',
|
|
8
|
+
'The first library that declares a recipe ref or an action wins; later ones are listed as shadows.',
|
|
9
|
+
'Within one library, a platform variant wins over the generic recipe, and a platform action manifest over shared.',
|
|
10
|
+
'A namespaced id <library>.<ref> selects that library’s recipe even when it is shadowed.',
|
|
11
|
+
];
|
|
12
|
+
/** Resolve the ordered libraries with their manifests, digests and provenance. */
|
|
13
|
+
export async function resolveDiscoveryLibraries(options = {}) {
|
|
14
|
+
const sources = await resolveRecipeLibrarySources({
|
|
15
|
+
cliEntries: [...(options.libraries ?? [])],
|
|
16
|
+
...(options.env ? { env: options.env } : {}),
|
|
17
|
+
});
|
|
18
|
+
return Promise.all(sources.map(async (source, index) => {
|
|
19
|
+
const root = path.resolve(source.root);
|
|
20
|
+
const name = source.name ?? path.basename(root);
|
|
21
|
+
const manifest = await readRecipeLibraryManifest(root);
|
|
22
|
+
const digest = await digestRecipeLibrary(root, manifest);
|
|
23
|
+
const requires = checkRecipeLibraryRequirements(name, manifest, options.packageVersions);
|
|
24
|
+
const info = {
|
|
25
|
+
rank: index + 1,
|
|
26
|
+
name,
|
|
27
|
+
root,
|
|
28
|
+
origin: source.origin ?? 'flag',
|
|
29
|
+
...(source.overrides ? { overrides: source.overrides } : {}),
|
|
30
|
+
digest,
|
|
31
|
+
platforms: await presentPlatforms(root, manifest),
|
|
32
|
+
adapters: manifest?.adapters ?? {},
|
|
33
|
+
actionManifests: await actionManifestFiles(root, manifest),
|
|
34
|
+
requires,
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
info,
|
|
38
|
+
manifest,
|
|
39
|
+
source: {
|
|
40
|
+
...source,
|
|
41
|
+
name,
|
|
42
|
+
root,
|
|
43
|
+
provenance: {
|
|
44
|
+
kind: 'library',
|
|
45
|
+
trust: 'unknown',
|
|
46
|
+
name,
|
|
47
|
+
path: root,
|
|
48
|
+
...source.provenance,
|
|
49
|
+
digest,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Platforms the library actually uses: declared ones, plus built-in platforms that have a
|
|
57
|
+
* recipes/<platform>/ folder or an action manifest.
|
|
58
|
+
*/
|
|
59
|
+
async function presentPlatforms(root, manifest) {
|
|
60
|
+
const declared = new Set(manifest?.platforms ?? []);
|
|
61
|
+
const scopes = new Set((await actionManifestFiles(root, manifest)).map((file) => file.scope));
|
|
62
|
+
const present = [];
|
|
63
|
+
for (const platform of new Set([...BUILT_IN_RECIPE_PLATFORMS, ...declared])) {
|
|
64
|
+
if (declared.has(platform) ||
|
|
65
|
+
scopes.has(platform) ||
|
|
66
|
+
(await isDirectory(path.join(root, 'recipes', platform))))
|
|
67
|
+
present.push(platform);
|
|
68
|
+
}
|
|
69
|
+
return present.sort();
|
|
70
|
+
}
|
|
71
|
+
async function isDirectory(target) {
|
|
72
|
+
try {
|
|
73
|
+
// lstat: a symlinked folder is not followed by the library walker either.
|
|
74
|
+
return (await lstat(target)).isDirectory();
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
// An absent platform folder means the library has no recipes for that platform.
|
|
78
|
+
if (error.code === 'ENOENT')
|
|
79
|
+
return false;
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Action manifests a library declares: `actions` in recipe-library.json per scope, else
|
|
85
|
+
* `manifests/<scope>.action-manifest.json` by convention.
|
|
86
|
+
*/
|
|
87
|
+
async function actionManifestFiles(root, manifest) {
|
|
88
|
+
const files = new Map();
|
|
89
|
+
// The shared walker only returns regular files that stay inside the library root.
|
|
90
|
+
for (const file of await listLibraryFiles(root, 'manifests')) {
|
|
91
|
+
const match = ACTION_MANIFEST_FILE.exec(file);
|
|
92
|
+
if (match)
|
|
93
|
+
files.set(match[1], file);
|
|
94
|
+
}
|
|
95
|
+
for (const [scope, file] of Object.entries(manifest?.actions ?? {})) {
|
|
96
|
+
files.set(scope, path.relative(root, path.resolve(root, file)).split(path.sep).join('/'));
|
|
97
|
+
}
|
|
98
|
+
return [...files.entries()]
|
|
99
|
+
.map(([scope, file]) => ({ scope, file }))
|
|
100
|
+
.sort((left, right) => left.scope.localeCompare(right.scope));
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=libraries.js.map
|
|
@@ -0,0 +1 @@
|
|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OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;QACpE,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5F,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;SACxB,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;SACzC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
package/dist/render.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DiscoveryAction, DiscoveryActionDetail, DiscoveryLibrary, DiscoveryRecipe, DiscoveryRecipeDetail, ExplainEnvelope, SearchResult } from './types.js';
|
|
2
|
+
export declare function renderLibraries(libraries: DiscoveryLibrary[], rules?: readonly string[]): string[];
|
|
3
|
+
export declare function renderList(recipes: DiscoveryRecipe[], platform: string | null, platforms: string[]): string[];
|
|
4
|
+
export declare function renderActions(actions: DiscoveryAction[], platform: string | null): string[];
|
|
5
|
+
export declare function renderDescribeRecipe(recipe: DiscoveryRecipeDetail): string[];
|
|
6
|
+
export declare function renderDescribeAction(action: DiscoveryActionDetail): string[];
|
|
7
|
+
export declare function renderExplain(envelope: ExplainEnvelope): string[];
|
|
8
|
+
export declare function renderSearch(results: SearchResult[], query: string): string[];
|
|
9
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAEhB,eAAe,EACf,qBAAqB,EACrB,eAAe,EAEf,YAAY,EACb,MAAM,YAAY,CAAC;AAEpB,wBAAgB,eAAe,CAC7B,SAAS,EAAE,gBAAgB,EAAE,EAC7B,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,EAAE,CAmBV;AAED,wBAAgB,UAAU,CACxB,OAAO,EAAE,eAAe,EAAE,EAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,SAAS,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAiBV;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAAE,CAqB3F;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAmB5E;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAqB5E;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,EAAE,CAgDjE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ7E"}
|