@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.
Files changed (53) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE +21 -0
  3. package/README.md +53 -0
  4. package/bin/farmslot-recipe.mjs +10 -0
  5. package/dist/cli.d.ts +12 -0
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/cli.js +54 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/commands.d.ts +13 -0
  10. package/dist/commands.d.ts.map +1 -0
  11. package/dist/commands.js +393 -0
  12. package/dist/commands.js.map +1 -0
  13. package/dist/composition.d.ts +21 -0
  14. package/dist/composition.d.ts.map +1 -0
  15. package/dist/composition.js +232 -0
  16. package/dist/composition.js.map +1 -0
  17. package/dist/discovery-error.d.ts +8 -0
  18. package/dist/discovery-error.d.ts.map +1 -0
  19. package/dist/discovery-error.js +10 -0
  20. package/dist/discovery-error.js.map +1 -0
  21. package/dist/discovery-index.d.ts +63 -0
  22. package/dist/discovery-index.d.ts.map +1 -0
  23. package/dist/discovery-index.js +407 -0
  24. package/dist/discovery-index.js.map +1 -0
  25. package/dist/index.d.ts +11 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +10 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/libraries.d.ts +18 -0
  30. package/dist/libraries.d.ts.map +1 -0
  31. package/dist/libraries.js +102 -0
  32. package/dist/libraries.js.map +1 -0
  33. package/dist/render.d.ts +9 -0
  34. package/dist/render.d.ts.map +1 -0
  35. package/dist/render.js +165 -0
  36. package/dist/render.js.map +1 -0
  37. package/dist/search.d.ts +8 -0
  38. package/dist/search.d.ts.map +1 -0
  39. package/dist/search.js +90 -0
  40. package/dist/search.js.map +1 -0
  41. package/dist/template.d.ts +12 -0
  42. package/dist/template.d.ts.map +1 -0
  43. package/dist/template.js +74 -0
  44. package/dist/template.js.map +1 -0
  45. package/dist/types.d.ts +262 -0
  46. package/dist/types.d.ts.map +1 -0
  47. package/dist/types.js +3 -0
  48. package/dist/types.js.map +1 -0
  49. package/dist/version.d.ts +4 -0
  50. package/dist/version.d.ts.map +1 -0
  51. package/dist/version.js +12 -0
  52. package/dist/version.js.map +1 -0
  53. package/package.json +71 -0
@@ -0,0 +1,262 @@
1
+ import type { RecipeExecutionCapability, RecipeResolutionDocument } from '@farmslot/protocol';
2
+ import type { RecipeLibraryAdapterDeclaration, RecipeLibraryOrigin, RecipeLibraryRequirement } from '@farmslot/recipe-harness';
3
+ /** Version of every `--json` envelope printed by the discovery commands. */
4
+ export declare const DISCOVERY_SCHEMA_VERSION: 1;
5
+ export type DiscoveryCommand = 'actions' | 'describe' | 'list' | 'explain' | 'search' | 'template' | 'completions';
6
+ export interface DiscoveryEnvelope {
7
+ schemaVersion: typeof DISCOVERY_SCHEMA_VERSION;
8
+ command: DiscoveryCommand;
9
+ status: 'ok' | 'fail';
10
+ }
11
+ export interface DiscoveryErrorEnvelope {
12
+ schemaVersion: typeof DISCOVERY_SCHEMA_VERSION;
13
+ /** The command that failed, or null when the arguments named no command. */
14
+ command: string | null;
15
+ status: 'fail';
16
+ error: {
17
+ code: string;
18
+ message: string;
19
+ userAction: string;
20
+ };
21
+ }
22
+ /** A satisfied `requires` entry; an unsatisfied or uncheckable one fails resolution. */
23
+ export type DiscoveryRequirement = RecipeLibraryRequirement;
24
+ export interface DiscoveryActionManifestFile {
25
+ /** Platform id, or `shared` for every platform. */
26
+ scope: string;
27
+ /** Path relative to the library root. */
28
+ file: string;
29
+ }
30
+ export interface DiscoveryLibrary {
31
+ /** 1 is the highest precedence; the first library declaring a recipe or action wins. */
32
+ rank: number;
33
+ name: string;
34
+ root: string;
35
+ origin: RecipeLibraryOrigin;
36
+ /** Root of the RECIPE_LIBRARY_PATH entry this --library entry replaced. */
37
+ overrides?: string;
38
+ /** Content digest of recipe-library.json, recipes/, manifests/, actions/ and declared files. */
39
+ digest: string;
40
+ /** Platforms the library uses: declared ones, plus built-in ones with recipes or actions. */
41
+ platforms: string[];
42
+ /** Declared platform adapters. Discovery reports them; it does not load their code. */
43
+ adapters: Record<string, RecipeLibraryAdapterDeclaration>;
44
+ actionManifests: DiscoveryActionManifestFile[];
45
+ requires: DiscoveryRequirement[];
46
+ }
47
+ export interface DiscoveryParameter {
48
+ name: string;
49
+ type?: string;
50
+ required: boolean;
51
+ default?: unknown;
52
+ enum?: unknown[];
53
+ description?: string;
54
+ }
55
+ /**
56
+ * Who executes an action: `runner` (call/end), `builtin` (a handler registered by this CLI),
57
+ * or `adapter` (declared by a library, implemented by a platform adapter this CLI does not load).
58
+ */
59
+ export type DiscoveryActionHandler = 'runner' | 'builtin' | 'adapter';
60
+ export interface DiscoveryAction {
61
+ name: string;
62
+ kind: 'official' | 'custom';
63
+ description: string;
64
+ parameters: DiscoveryParameter[];
65
+ capabilities: RecipeExecutionCapability[];
66
+ handler: DiscoveryActionHandler;
67
+ /**
68
+ * Whether recipes can use the action in this view: a resolved manifest declares it, or the
69
+ * runner provides it (call, end). A handler no manifest declares is listed with false.
70
+ */
71
+ declared: boolean;
72
+ /** Winning library, or null when no library declares the action. */
73
+ source: string | null;
74
+ /** Winning manifest path relative to its library root. */
75
+ manifest: string | null;
76
+ /** Lower-precedence libraries that also declare the action. */
77
+ shadows: string[];
78
+ /** Scopes (platforms or `shared`) where any library declares the action. */
79
+ platforms: string[];
80
+ resultCases: string[];
81
+ }
82
+ export interface DiscoveryActionDetail extends DiscoveryAction {
83
+ schema: unknown;
84
+ examples: unknown[];
85
+ /** Recipes in this view whose workflow uses the action directly. */
86
+ callers: string[];
87
+ }
88
+ export interface DiscoveryRecipeVariant {
89
+ /** Null for the generic recipe that applies to every platform. */
90
+ platform: string | null;
91
+ source: string;
92
+ file: string;
93
+ }
94
+ export interface DiscoveryProblem {
95
+ code: string;
96
+ message: string;
97
+ path?: string;
98
+ }
99
+ export interface DiscoveryRecipe {
100
+ /** Reference used by `run` and by `call` nodes; resolved by library precedence. */
101
+ ref: string;
102
+ /** Namespaced id `<library>.<ref>`; selects that library's recipe even when shadowed. */
103
+ id: string;
104
+ title?: string;
105
+ description?: string;
106
+ source: string;
107
+ file: string;
108
+ /** Platform of the selected file, or null for a generic recipe. */
109
+ variant: string | null;
110
+ shadows: string[];
111
+ parameters: DiscoveryParameter[];
112
+ variants: DiscoveryRecipeVariant[];
113
+ /**
114
+ * Whether the recipe and every recipe it calls validate against the actions declared in this
115
+ * view. Null in the all-platform view for a recipe that only exists as platform variants.
116
+ */
117
+ runnable: boolean | null;
118
+ problems: DiscoveryProblem[];
119
+ }
120
+ export interface DiscoveryRecipeDetail extends DiscoveryRecipe {
121
+ path: string;
122
+ /**
123
+ * How the name was resolved, exactly as `run` resolves it: `ref` (precedence winner), `alias`
124
+ * (qualified platform alias such as `web.greet`) or `id` (`<library>.<ref>`, shadowed or not).
125
+ */
126
+ resolvedBy: 'ref' | 'alias' | 'id';
127
+ proofTargets: unknown;
128
+ /** Actions used by the recipe and every recipe it calls. */
129
+ actions: string[];
130
+ /** Recipes called directly or transitively. */
131
+ nestedRecipes: string[];
132
+ unresolvedRecipes: string[];
133
+ /** Recipes in this view that call this recipe directly. */
134
+ callers: string[];
135
+ runCommand: string;
136
+ }
137
+ export interface ListEnvelope extends DiscoveryEnvelope {
138
+ command: 'list';
139
+ platform: string | null;
140
+ platforms: string[];
141
+ libraries: DiscoveryLibrary[];
142
+ recipes: DiscoveryRecipe[];
143
+ }
144
+ export interface ActionsEnvelope extends DiscoveryEnvelope {
145
+ command: 'actions';
146
+ platform: string | null;
147
+ libraries: DiscoveryLibrary[];
148
+ actions: DiscoveryAction[];
149
+ }
150
+ export interface DescribeEnvelope extends DiscoveryEnvelope {
151
+ command: 'describe';
152
+ platform: string | null;
153
+ libraries: DiscoveryLibrary[];
154
+ kind: 'recipe' | 'action';
155
+ recipe?: DiscoveryRecipeDetail;
156
+ action?: DiscoveryActionDetail;
157
+ }
158
+ export interface ExplainParameter {
159
+ name: string;
160
+ value?: unknown;
161
+ /**
162
+ * `input` (given on the command line or by the caller node), `default` (paramsSchema),
163
+ * or `missing` (required, no value).
164
+ */
165
+ from: 'input' | 'default' | 'missing';
166
+ /** Raw caller value when it was a template, e.g. `{{params.symbol}}`. */
167
+ template?: string;
168
+ }
169
+ export interface ExplainActionNode {
170
+ nodeId: string;
171
+ kind: 'action';
172
+ action: string;
173
+ phase: 'main' | 'teardown' | 'unreachable';
174
+ }
175
+ export interface ExplainCallNode {
176
+ nodeId: string;
177
+ kind: 'call';
178
+ ref: string;
179
+ phase: 'main' | 'teardown' | 'unreachable';
180
+ /** Resolved callee, or null when no library provides it. */
181
+ recipe: ExplainRecipeNode | null;
182
+ }
183
+ export interface ExplainRecipeNode {
184
+ ref: string;
185
+ source: string | null;
186
+ file: string | null;
187
+ variant: string | null;
188
+ parameters: ExplainParameter[];
189
+ nodes: Array<ExplainActionNode | ExplainCallNode>;
190
+ }
191
+ export interface ExplainRequiredAction {
192
+ name: string;
193
+ declared: boolean;
194
+ source: string | null;
195
+ handler: DiscoveryActionHandler | null;
196
+ capabilities: RecipeExecutionCapability[];
197
+ /** `<recipe ref>#<node id>` for every use. */
198
+ usedBy: string[];
199
+ }
200
+ export interface ExplainEnvelope extends DiscoveryEnvelope {
201
+ command: 'explain';
202
+ platform: string | null;
203
+ libraries: DiscoveryLibrary[];
204
+ recipe: ExplainRecipeNode;
205
+ requiredActions: ExplainRequiredAction[];
206
+ capabilities: RecipeExecutionCapability[];
207
+ missing: {
208
+ parameters: Array<{
209
+ recipe: string;
210
+ name: string;
211
+ }>;
212
+ recipes: Array<{
213
+ from: string;
214
+ ref: string;
215
+ }>;
216
+ actions: Array<{
217
+ name: string;
218
+ usedBy: string[];
219
+ }>;
220
+ /** Declared actions whose handler comes from a platform adapter this CLI does not load. */
221
+ handlers: string[];
222
+ problems: DiscoveryProblem[];
223
+ };
224
+ /** The runner's static resolution document, present when every call resolves. */
225
+ resolution: RecipeResolutionDocument | null;
226
+ }
227
+ export interface SearchResult {
228
+ kind: 'action' | 'recipe';
229
+ name: string;
230
+ /** Namespaced `<library>.<ref>` id, for recipes. */
231
+ id?: string;
232
+ score: number;
233
+ source: string | null;
234
+ description: string;
235
+ }
236
+ export interface SearchEnvelope extends DiscoveryEnvelope {
237
+ command: 'search';
238
+ platform: string | null;
239
+ query: string;
240
+ results: SearchResult[];
241
+ }
242
+ export interface TemplateEnvelope extends DiscoveryEnvelope {
243
+ command: 'template';
244
+ platform: string | null;
245
+ kind: 'recipe' | 'action';
246
+ name: string;
247
+ /** A workflow node ready to paste into a recipe. */
248
+ node: Record<string, unknown>;
249
+ /** A complete recipe document wrapping the node. */
250
+ recipe: Record<string, unknown>;
251
+ /** Command that runs the recipe or a recipe wrapping the action. */
252
+ runCommand: string;
253
+ }
254
+ export interface CompletionsEnvelope extends DiscoveryEnvelope {
255
+ command: 'completions';
256
+ /** `script` carries a shell script; the other kinds carry candidates. */
257
+ kind: 'commands' | 'actions' | 'recipes' | 'script';
258
+ candidates?: string[];
259
+ shell?: 'bash' | 'zsh';
260
+ script?: string;
261
+ }
262
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,KAAK,EACV,+BAA+B,EAC/B,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAElC,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,EAAG,CAAU,CAAC;AAEnD,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,UAAU,GACV,MAAM,GACN,SAAS,GACT,QAAQ,GACR,UAAU,GACV,aAAa,CAAC;AAElB,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,OAAO,wBAAwB,CAAC;IAC/C,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,EAA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vD,OAAO,EAAE,QAAQ,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,OAAO,EAAE,aAAa,CAAC;IACvB,yEAAyE;IACzE,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ /** Version of every `--json` envelope printed by the discovery commands. */
2
+ export const DISCOVERY_SCHEMA_VERSION = 1;
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAOA,4EAA4E;AAC5E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAU,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const RECIPE_CLI_VERSION: string;
2
+ /** Packages this CLI vouches for when a library declares `requires`. */
3
+ export declare const RECIPE_CLI_PACKAGE_VERSIONS: Readonly<Record<string, string>>;
4
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,QAAsB,CAAC;AAEtD,wEAAwE;AACxE,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAExE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { createRequire } from 'node:module';
2
+ const require = createRequire(import.meta.url);
3
+ const packageJson = require('../package.json');
4
+ if (typeof packageJson.version !== 'string' || !packageJson.version) {
5
+ throw new Error('@farmslot/recipe-cli package version is missing.');
6
+ }
7
+ export const RECIPE_CLI_VERSION = packageJson.version;
8
+ /** Packages this CLI vouches for when a library declares `requires`. */
9
+ export const RECIPE_CLI_PACKAGE_VERSIONS = {
10
+ '@farmslot/recipe-cli': RECIPE_CLI_VERSION,
11
+ };
12
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAA0B,CAAC;AAExE,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IACpE,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC,OAAO,CAAC;AAEtD,wEAAwE;AACxE,MAAM,CAAC,MAAM,2BAA2B,GAAqC;IAC3E,sBAAsB,EAAE,kBAAkB;CAC3C,CAAC"}
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@farmslot/recipe-cli",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "farmslot-recipe": "./bin/farmslot-recipe.mjs"
9
+ },
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "scripts": {
18
+ "typecheck": "tsc --noEmit --project tsconfig.json",
19
+ "test": "node ../../scripts/quality/run-tsx-tests.mjs --cwd . --tsconfig tsconfig.json test",
20
+ "format": "prettier --write --ignore-path ../../.prettierignore .",
21
+ "format:check": "prettier --check --ignore-path ../../.prettierignore .",
22
+ "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
23
+ "lint:fix": "eslint \"src/**/*.ts\" \"test/**/*.ts\" --fix",
24
+ "quality": "prettier --check --ignore-path ../../.prettierignore . && eslint \"src/**/*.ts\" \"test/**/*.ts\" && tsc --noEmit --project tsconfig.json && yarn build && yarn test",
25
+ "build": "yarn workspace @farmslot/recipe-harness build && rm -rf dist && tsc --project tsconfig.build.json",
26
+ "prepack": "cd ../.. && node scripts/quality/check-farmslot-package-readiness.mjs --require-changelog --packages @farmslot/recipe-cli && yarn workspace @farmslot/recipe-cli build",
27
+ "prepublishOnly": "node ../../scripts/quality/check-farmslot-package-readiness.mjs --publish --packages @farmslot/recipe-cli"
28
+ },
29
+ "dependencies": {
30
+ "@farmslot/protocol": "0.34.0",
31
+ "@farmslot/recipe-harness": "0.22.0",
32
+ "commander": "^12.0.0",
33
+ "semver": "^7.7.3"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^22.0.0",
37
+ "eslint": "^10.3.0",
38
+ "prettier": "^3.8.3",
39
+ "tsx": "^4.19.0",
40
+ "typescript": "^5.6.0"
41
+ },
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/deeeed/farmslot.git",
45
+ "directory": "packages/recipe-cli"
46
+ },
47
+ "bugs": {
48
+ "url": "https://github.com/deeeed/farmslot/issues"
49
+ },
50
+ "license": "MIT",
51
+ "homepage": "https://farmslot.io/docs/reference/recipe-discovery",
52
+ "keywords": [
53
+ "farmslot",
54
+ "recipe",
55
+ "recipe-cli",
56
+ "discovery",
57
+ "agentic-engineering"
58
+ ],
59
+ "files": [
60
+ "README.md",
61
+ "LICENSE",
62
+ "bin/**/*.mjs",
63
+ "dist/**/*.js",
64
+ "dist/**/*.d.ts",
65
+ "dist/**/*.d.ts.map",
66
+ "dist/**/*.js.map"
67
+ ],
68
+ "publishConfig": {
69
+ "access": "public"
70
+ }
71
+ }