@ai-setting/roy-agent-cli 1.7.50 → 1.7.51
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/dist/bin/roy-agent.js +27 -1
- package/dist/index.js +27 -1
- package/dist/roy-agent-linux-x64/bin/roy-agent +2 -2
- package/package.json +1 -1
package/dist/bin/roy-agent.js
CHANGED
|
@@ -9487,7 +9487,7 @@ class CliQuietModeService {
|
|
|
9487
9487
|
// package.json
|
|
9488
9488
|
var package_default = {
|
|
9489
9489
|
name: "@ai-setting/roy-agent-cli",
|
|
9490
|
-
version: "1.7.
|
|
9490
|
+
version: "1.7.51",
|
|
9491
9491
|
type: "module",
|
|
9492
9492
|
description: "CLI for roy-agent - Non-interactive command execution",
|
|
9493
9493
|
main: "./dist/index.js",
|
|
@@ -24274,6 +24274,8 @@ function getSupportedNodeTypes() {
|
|
|
24274
24274
|
}
|
|
24275
24275
|
|
|
24276
24276
|
// src/commands/workflow/validators/workflow-validator.ts
|
|
24277
|
+
import { validateTemplateContracts as validateTemplateContractsCore } from "@ai-setting/roy-agent-core/env/workflow/utils";
|
|
24278
|
+
|
|
24277
24279
|
class WorkflowValidator {
|
|
24278
24280
|
validate(workflow) {
|
|
24279
24281
|
const errors = [];
|
|
@@ -24294,6 +24296,8 @@ class WorkflowValidator {
|
|
|
24294
24296
|
errors.push(...depErrors);
|
|
24295
24297
|
const templateErrors = this.validateTemplateReferences(nodes, nodeIds);
|
|
24296
24298
|
errors.push(...templateErrors);
|
|
24299
|
+
const contractErrors = this.collectTemplateContractErrors(workflow, nodes);
|
|
24300
|
+
errors.push(...contractErrors);
|
|
24297
24301
|
const inputErrors = this.validateWorkflowInputs(nodes, workflow.inputs);
|
|
24298
24302
|
errors.push(...inputErrors);
|
|
24299
24303
|
return {
|
|
@@ -24403,6 +24407,28 @@ class WorkflowValidator {
|
|
|
24403
24407
|
errors.push(...circularErrors);
|
|
24404
24408
|
return errors;
|
|
24405
24409
|
}
|
|
24410
|
+
collectTemplateContractErrors(workflow, nodes) {
|
|
24411
|
+
if (nodes.length === 0)
|
|
24412
|
+
return [];
|
|
24413
|
+
try {
|
|
24414
|
+
const findings = validateTemplateContractsCore({
|
|
24415
|
+
...workflow,
|
|
24416
|
+
nodes
|
|
24417
|
+
});
|
|
24418
|
+
return findings.filter((f) => f.severity === "error").map((f) => ({
|
|
24419
|
+
type: "INVALID_TEMPLATE_REFERENCE" /* INVALID_TEMPLATE_REFERENCE */,
|
|
24420
|
+
description: `[template-contract:${f.rule}] ${f.message}`,
|
|
24421
|
+
expected: "Template field must match the source node's output contract",
|
|
24422
|
+
actual: `Template "${f.template}" references a field the source node (${f.sourceNodeType ?? "?"}) does not expose`,
|
|
24423
|
+
fix: f.suggestion ? `Change it to "${f.suggestion}"` : "Use the source node's declared output field (see node output contracts)",
|
|
24424
|
+
nodeId: f.nodeId,
|
|
24425
|
+
template: f.template,
|
|
24426
|
+
referencedNodeId: f.sourceNodeId
|
|
24427
|
+
}));
|
|
24428
|
+
} catch {
|
|
24429
|
+
return [];
|
|
24430
|
+
}
|
|
24431
|
+
}
|
|
24406
24432
|
validateTemplateReferences(nodes, nodeIds) {
|
|
24407
24433
|
const errors = [];
|
|
24408
24434
|
const templatePatterns = [
|
package/dist/index.js
CHANGED
|
@@ -9486,7 +9486,7 @@ class CliQuietModeService {
|
|
|
9486
9486
|
// package.json
|
|
9487
9487
|
var package_default = {
|
|
9488
9488
|
name: "@ai-setting/roy-agent-cli",
|
|
9489
|
-
version: "1.7.
|
|
9489
|
+
version: "1.7.51",
|
|
9490
9490
|
type: "module",
|
|
9491
9491
|
description: "CLI for roy-agent - Non-interactive command execution",
|
|
9492
9492
|
main: "./dist/index.js",
|
|
@@ -24273,6 +24273,8 @@ function getSupportedNodeTypes() {
|
|
|
24273
24273
|
}
|
|
24274
24274
|
|
|
24275
24275
|
// src/commands/workflow/validators/workflow-validator.ts
|
|
24276
|
+
import { validateTemplateContracts as validateTemplateContractsCore } from "@ai-setting/roy-agent-core/env/workflow/utils";
|
|
24277
|
+
|
|
24276
24278
|
class WorkflowValidator {
|
|
24277
24279
|
validate(workflow) {
|
|
24278
24280
|
const errors = [];
|
|
@@ -24293,6 +24295,8 @@ class WorkflowValidator {
|
|
|
24293
24295
|
errors.push(...depErrors);
|
|
24294
24296
|
const templateErrors = this.validateTemplateReferences(nodes, nodeIds);
|
|
24295
24297
|
errors.push(...templateErrors);
|
|
24298
|
+
const contractErrors = this.collectTemplateContractErrors(workflow, nodes);
|
|
24299
|
+
errors.push(...contractErrors);
|
|
24296
24300
|
const inputErrors = this.validateWorkflowInputs(nodes, workflow.inputs);
|
|
24297
24301
|
errors.push(...inputErrors);
|
|
24298
24302
|
return {
|
|
@@ -24402,6 +24406,28 @@ class WorkflowValidator {
|
|
|
24402
24406
|
errors.push(...circularErrors);
|
|
24403
24407
|
return errors;
|
|
24404
24408
|
}
|
|
24409
|
+
collectTemplateContractErrors(workflow, nodes) {
|
|
24410
|
+
if (nodes.length === 0)
|
|
24411
|
+
return [];
|
|
24412
|
+
try {
|
|
24413
|
+
const findings = validateTemplateContractsCore({
|
|
24414
|
+
...workflow,
|
|
24415
|
+
nodes
|
|
24416
|
+
});
|
|
24417
|
+
return findings.filter((f) => f.severity === "error").map((f) => ({
|
|
24418
|
+
type: "INVALID_TEMPLATE_REFERENCE" /* INVALID_TEMPLATE_REFERENCE */,
|
|
24419
|
+
description: `[template-contract:${f.rule}] ${f.message}`,
|
|
24420
|
+
expected: "Template field must match the source node's output contract",
|
|
24421
|
+
actual: `Template "${f.template}" references a field the source node (${f.sourceNodeType ?? "?"}) does not expose`,
|
|
24422
|
+
fix: f.suggestion ? `Change it to "${f.suggestion}"` : "Use the source node's declared output field (see node output contracts)",
|
|
24423
|
+
nodeId: f.nodeId,
|
|
24424
|
+
template: f.template,
|
|
24425
|
+
referencedNodeId: f.sourceNodeId
|
|
24426
|
+
}));
|
|
24427
|
+
} catch {
|
|
24428
|
+
return [];
|
|
24429
|
+
}
|
|
24430
|
+
}
|
|
24405
24431
|
validateTemplateReferences(nodes, nodeIds) {
|
|
24406
24432
|
const errors = [];
|
|
24407
24433
|
const templatePatterns = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/roy-agent-linux-x64/bin/roy-agent
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 109762688 bytes
|
|
4
|
+
sha256: 7855d95b5573a205d3d6c39bc9d4fabfb03d4a1ab324be2397b2dcfdb1245075
|