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 CHANGED
@@ -52565,10 +52565,10 @@ var toolExecutionRule = {
52565
52565
  for (const [agentId, agent] of Object.entries(dsl.agents)) {
52566
52566
  for (const toolId of agent.can_execute_tools) {
52567
52567
  const invokableBy = toolInvokableBy.get(toolId);
52568
- if (invokableBy && !invokableBy.has(agentId)) {
52568
+ if (invokableBy && invokableBy.size > 0 && !invokableBy.has(agentId)) {
52569
52569
  diagnostics.push({
52570
52570
  ruleId: "tool-execution",
52571
- severity: "error",
52571
+ severity: "warning",
52572
52572
  path: `agents.${agentId}.can_execute_tools`,
52573
52573
  message: `Agent "${agentId}" has can_execute_tools "${toolId}" but tool's invokable_by does not include "${agentId}"`
52574
52574
  });
@@ -52576,12 +52576,13 @@ var toolExecutionRule = {
52576
52576
  }
52577
52577
  }
52578
52578
  for (const [toolId, tool] of Object.entries(dsl.tools)) {
52579
+ if (tool.invokable_by.length === 0) continue;
52579
52580
  for (const agentId of tool.invokable_by) {
52580
52581
  const agent = dsl.agents[agentId];
52581
52582
  if (agent && !agent.can_execute_tools.includes(toolId)) {
52582
52583
  diagnostics.push({
52583
52584
  ruleId: "tool-execution",
52584
- severity: "error",
52585
+ severity: "warning",
52585
52586
  path: `tools.${toolId}.invokable_by`,
52586
52587
  message: `Tool "${toolId}" has invokable_by "${agentId}" but agent's can_execute_tools does not include "${toolId}"`
52587
52588
  });
@@ -52697,10 +52698,10 @@ var taskAgentBindingRule = {
52697
52698
  });
52698
52699
  }
52699
52700
  const tool = dsl.tools[step.uses_tool];
52700
- if (tool && !tool.invokable_by.includes(task.target_agent)) {
52701
+ if (tool && tool.invokable_by.length > 0 && !tool.invokable_by.includes(task.target_agent)) {
52701
52702
  diagnostics.push({
52702
52703
  ruleId: "task-agent-binding",
52703
- severity: "error",
52704
+ severity: "warning",
52704
52705
  path: `tasks.${taskId}.execution_steps`,
52705
52706
  message: `Task "${taskId}" step uses_tool "${step.uses_tool}" but tool's invokable_by does not include "${task.target_agent}"`
52706
52707
  });
@@ -53867,9 +53868,9 @@ var ruleset = {
53867
53868
  }
53868
53869
  },
53869
53870
  "tool-invokable-by-ref": {
53870
- description: "Tool invokable_by must reference existing agents",
53871
+ description: "(deprecated) Tool invokable_by must reference existing agents",
53871
53872
  message: "{{error}}",
53872
- severity: "error",
53873
+ severity: "warn",
53873
53874
  given: "$.tools.*",
53874
53875
  then: {
53875
53876
  field: "invokable_by",
@@ -53888,8 +53889,8 @@ var ruleset = {
53888
53889
  }
53889
53890
  },
53890
53891
  "artifact-owner-exists": {
53891
- description: "Every artifact must have an owner",
53892
- severity: "error",
53892
+ description: "(deprecated) Every artifact must have an owner",
53893
+ severity: "warn",
53893
53894
  given: "$.artifacts.*",
53894
53895
  then: {
53895
53896
  field: "owner",