agent-contracts 0.24.0 → 0.24.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/dist/cli.js +10 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51421,10 +51421,10 @@ var toolExecutionRule = {
|
|
|
51421
51421
|
for (const [agentId, agent] of Object.entries(dsl.agents)) {
|
|
51422
51422
|
for (const toolId of agent.can_execute_tools) {
|
|
51423
51423
|
const invokableBy = toolInvokableBy.get(toolId);
|
|
51424
|
-
if (invokableBy && !invokableBy.has(agentId)) {
|
|
51424
|
+
if (invokableBy && invokableBy.size > 0 && !invokableBy.has(agentId)) {
|
|
51425
51425
|
diagnostics.push({
|
|
51426
51426
|
ruleId: "tool-execution",
|
|
51427
|
-
severity: "
|
|
51427
|
+
severity: "warning",
|
|
51428
51428
|
path: `agents.${agentId}.can_execute_tools`,
|
|
51429
51429
|
message: `Agent "${agentId}" has can_execute_tools "${toolId}" but tool's invokable_by does not include "${agentId}"`
|
|
51430
51430
|
});
|
|
@@ -51432,12 +51432,13 @@ var toolExecutionRule = {
|
|
|
51432
51432
|
}
|
|
51433
51433
|
}
|
|
51434
51434
|
for (const [toolId, tool] of Object.entries(dsl.tools)) {
|
|
51435
|
+
if (tool.invokable_by.length === 0) continue;
|
|
51435
51436
|
for (const agentId of tool.invokable_by) {
|
|
51436
51437
|
const agent = dsl.agents[agentId];
|
|
51437
51438
|
if (agent && !agent.can_execute_tools.includes(toolId)) {
|
|
51438
51439
|
diagnostics.push({
|
|
51439
51440
|
ruleId: "tool-execution",
|
|
51440
|
-
severity: "
|
|
51441
|
+
severity: "warning",
|
|
51441
51442
|
path: `tools.${toolId}.invokable_by`,
|
|
51442
51443
|
message: `Tool "${toolId}" has invokable_by "${agentId}" but agent's can_execute_tools does not include "${toolId}"`
|
|
51443
51444
|
});
|
|
@@ -51553,10 +51554,10 @@ var taskAgentBindingRule = {
|
|
|
51553
51554
|
});
|
|
51554
51555
|
}
|
|
51555
51556
|
const tool = dsl.tools[step.uses_tool];
|
|
51556
|
-
if (tool && !tool.invokable_by.includes(task.target_agent)) {
|
|
51557
|
+
if (tool && tool.invokable_by.length > 0 && !tool.invokable_by.includes(task.target_agent)) {
|
|
51557
51558
|
diagnostics.push({
|
|
51558
51559
|
ruleId: "task-agent-binding",
|
|
51559
|
-
severity: "
|
|
51560
|
+
severity: "warning",
|
|
51560
51561
|
path: `tasks.${taskId}.execution_steps`,
|
|
51561
51562
|
message: `Task "${taskId}" step uses_tool "${step.uses_tool}" but tool's invokable_by does not include "${task.target_agent}"`
|
|
51562
51563
|
});
|
|
@@ -52723,9 +52724,9 @@ var ruleset = {
|
|
|
52723
52724
|
}
|
|
52724
52725
|
},
|
|
52725
52726
|
"tool-invokable-by-ref": {
|
|
52726
|
-
description: "Tool invokable_by must reference existing agents",
|
|
52727
|
+
description: "(deprecated) Tool invokable_by must reference existing agents",
|
|
52727
52728
|
message: "{{error}}",
|
|
52728
|
-
severity: "
|
|
52729
|
+
severity: "warn",
|
|
52729
52730
|
given: "$.tools.*",
|
|
52730
52731
|
then: {
|
|
52731
52732
|
field: "invokable_by",
|
|
@@ -52744,8 +52745,8 @@ var ruleset = {
|
|
|
52744
52745
|
}
|
|
52745
52746
|
},
|
|
52746
52747
|
"artifact-owner-exists": {
|
|
52747
|
-
description: "Every artifact must have an owner",
|
|
52748
|
-
severity: "
|
|
52748
|
+
description: "(deprecated) Every artifact must have an owner",
|
|
52749
|
+
severity: "warn",
|
|
52749
52750
|
given: "$.artifacts.*",
|
|
52750
52751
|
then: {
|
|
52751
52752
|
field: "owner",
|