@farmslot/agent-runtime 0.3.0 → 0.3.1
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 +4 -0
- package/package.json +2 -2
- package/scripts/check-task-artifact-contract.mjs +25 -34
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farmslot/agent-runtime",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepublishOnly": "node ../../scripts/quality/check-farmslot-package-readiness.mjs --publish --packages @farmslot/agent-runtime"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@farmslot/protocol": "0.
|
|
34
|
+
"@farmslot/protocol": "0.12.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^22.0.0",
|
|
@@ -39,14 +39,14 @@ try {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
let recipeProtocol = null;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
if (process.env.FARMSLOT_TEST_DISABLE_RECIPE_PROTOCOL !== '1') {
|
|
43
|
+
try {
|
|
44
|
+
recipeProtocol = await import('@farmslot/protocol/recipe');
|
|
45
|
+
} catch (error) {
|
|
46
|
+
if (!isMissingWorkspaceProtocolBuild(error, 'dist/recipe/index.js')) throw error;
|
|
47
|
+
if (process.env.FARMSLOT_DEBUG_AGENT_RUNTIME) {
|
|
48
|
+
console.warn(`[agent-runtime] shared Recipe v1 validator unavailable: ${error.message}`);
|
|
49
|
+
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
if (recipeProtocol) {
|
|
@@ -325,6 +325,7 @@ function validateRecipeDocumentArtifact() {
|
|
|
325
325
|
`${packageRoot}/artifact-manifest.json`,
|
|
326
326
|
'recipe-run/artifact-manifest.json',
|
|
327
327
|
);
|
|
328
|
+
const trace = readJsonArtifact(`${packageRoot}/trace.json`, 'recipe-run/trace.json');
|
|
328
329
|
const recipeResolution = readJsonArtifact(
|
|
329
330
|
`${packageRoot}/recipe-resolution.json`,
|
|
330
331
|
'recipe-run/recipe-resolution.json',
|
|
@@ -339,34 +340,24 @@ function validateRecipeDocumentArtifact() {
|
|
|
339
340
|
if (document !== undefined) resolvedRecipes[String(dependency.digest)] = document;
|
|
340
341
|
}
|
|
341
342
|
}
|
|
342
|
-
if (sharedRecipeArtifactPackageValidator) {
|
|
343
|
-
|
|
344
|
-
recipe,
|
|
345
|
-
|
|
346
|
-
recipeResolution,
|
|
347
|
-
resolvedRecipes,
|
|
348
|
-
artifactPaths: listArtifactPaths(path.join(taskDir, packageRoot)),
|
|
349
|
-
});
|
|
350
|
-
for (const finding of result.findings) {
|
|
351
|
-
if (finding.severity === 'error') {
|
|
352
|
-
issues.push(`${finding.code} ${finding.path}: ${finding.message}`);
|
|
353
|
-
}
|
|
354
|
-
}
|
|
343
|
+
if (!sharedRecipeArtifactPackageValidator) {
|
|
344
|
+
issues.push(
|
|
345
|
+
'recipe-run package validation requires built @farmslot/protocol; build the protocol package and retry',
|
|
346
|
+
);
|
|
355
347
|
return;
|
|
356
348
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
validateRecipeDocumentValue(document, `resolved recipe ${digest}`, { externalRecipeIds });
|
|
349
|
+
const result = sharedRecipeArtifactPackageValidator({
|
|
350
|
+
recipe,
|
|
351
|
+
manifest,
|
|
352
|
+
trace,
|
|
353
|
+
recipeResolution,
|
|
354
|
+
resolvedRecipes,
|
|
355
|
+
artifactPaths: listArtifactPaths(path.join(taskDir, packageRoot)),
|
|
356
|
+
});
|
|
357
|
+
for (const finding of result.findings) {
|
|
358
|
+
if (finding.severity === 'error') {
|
|
359
|
+
issues.push(`${finding.code} ${finding.path}: ${finding.message}`);
|
|
360
|
+
}
|
|
370
361
|
}
|
|
371
362
|
}
|
|
372
363
|
|