feat(tool): add tool and validation domain models
CI / lint (pull_request) Successful in 14s
CI / typecheck (pull_request) Successful in 26s
CI / security (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 4m10s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 8m23s
CI / docker (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 6m21s
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / lint (pull_request) Successful in 14s
CI / typecheck (pull_request) Successful in 26s
CI / security (pull_request) Successful in 21s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 4m10s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 8m23s
CI / docker (pull_request) Successful in 39s
CI / coverage (pull_request) Successful in 6m21s
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
This commit was merged in pull request #59.
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
# Tool YAML Schema
|
||||
# Defines the expected structure for tool configuration files.
|
||||
# See docs/specification.md for full details.
|
||||
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- description
|
||||
- source
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
pattern: "^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$"
|
||||
description: "Namespaced tool name (namespace/short_name)"
|
||||
description:
|
||||
type: string
|
||||
minLength: 1
|
||||
description: "Short description of what the tool does"
|
||||
source:
|
||||
type: string
|
||||
enum: [mcp, agent_skill, builtin, custom]
|
||||
description: "Source of the tool implementation"
|
||||
tool_type:
|
||||
type: string
|
||||
enum: [tool, validation]
|
||||
default: tool
|
||||
description: "Discriminator for the tool registry"
|
||||
code:
|
||||
type: string
|
||||
description: "Inline Python code (required when source=custom)"
|
||||
mcp_server:
|
||||
type: string
|
||||
description: "MCP server name (required when source=mcp)"
|
||||
mcp_tool_name:
|
||||
type: string
|
||||
description: "Tool name on MCP server (required when source=mcp)"
|
||||
agent_skill_path:
|
||||
type: string
|
||||
description: "Path to Agent Skills Standard folder (required when source=agent_skill)"
|
||||
input_schema:
|
||||
type: object
|
||||
description: "JSON Schema for tool inputs"
|
||||
output_schema:
|
||||
type: object
|
||||
description: "JSON Schema for tool outputs"
|
||||
capability:
|
||||
type: object
|
||||
properties:
|
||||
read_only:
|
||||
type: boolean
|
||||
default: false
|
||||
writes:
|
||||
type: boolean
|
||||
default: false
|
||||
write_scope:
|
||||
type: string
|
||||
checkpointable:
|
||||
type: boolean
|
||||
default: false
|
||||
checkpoint_scope:
|
||||
type: string
|
||||
enum: [file, transaction, snapshot, composite]
|
||||
side_effects:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
idempotent:
|
||||
type: boolean
|
||||
default: false
|
||||
unsafe:
|
||||
type: boolean
|
||||
default: false
|
||||
human_approval_required:
|
||||
type: boolean
|
||||
default: false
|
||||
cost_profile:
|
||||
type: string
|
||||
resource_slots:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [name, resource_type, access]
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
resource_type:
|
||||
type: string
|
||||
access:
|
||||
type: string
|
||||
enum: [read_only, read_write]
|
||||
description:
|
||||
type: string
|
||||
binding:
|
||||
type: string
|
||||
enum: [contextual, static, parameter]
|
||||
default: contextual
|
||||
static_resource:
|
||||
type: string
|
||||
required:
|
||||
type: boolean
|
||||
default: true
|
||||
lifecycle:
|
||||
type: object
|
||||
properties:
|
||||
discover:
|
||||
type: string
|
||||
activate:
|
||||
type: string
|
||||
deactivate:
|
||||
type: string
|
||||
timeout:
|
||||
type: integer
|
||||
minimum: 1
|
||||
default: 300
|
||||
description: "Execution timeout in seconds"
|
||||
@@ -0,0 +1,94 @@
|
||||
# Validation YAML Schema
|
||||
# Extends the Tool schema with validation-specific fields.
|
||||
# See docs/specification.md for full details.
|
||||
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- description
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
pattern: "^[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+$"
|
||||
description: "Namespaced validation name (namespace/short_name)"
|
||||
description:
|
||||
type: string
|
||||
minLength: 1
|
||||
description: "Short description of what the validation checks"
|
||||
source:
|
||||
type: string
|
||||
enum: [mcp, agent_skill, builtin, custom, wrapped]
|
||||
description: "Source of the validation implementation (inferred as 'wrapped' when wraps is set)"
|
||||
mode:
|
||||
type: string
|
||||
enum: [required, informational]
|
||||
default: required
|
||||
description: "Whether failure blocks execution"
|
||||
wraps:
|
||||
type: string
|
||||
description: "Name of existing tool this validation wraps"
|
||||
transform:
|
||||
type: string
|
||||
description: "Python function code to transform wrapped tool output (required when wraps is set)"
|
||||
argument_mapping:
|
||||
type: object
|
||||
description: "Argument mapping for the wrapped tool (only valid when wraps is set)"
|
||||
code:
|
||||
type: string
|
||||
description: "Inline Python code (required when source=custom, mutually exclusive with wraps)"
|
||||
mcp_server:
|
||||
type: string
|
||||
description: "MCP server name (required when source=mcp)"
|
||||
mcp_tool_name:
|
||||
type: string
|
||||
description: "Tool name on MCP server (required when source=mcp)"
|
||||
agent_skill_path:
|
||||
type: string
|
||||
description: "Path to Agent Skills Standard folder (required when source=agent_skill)"
|
||||
input_schema:
|
||||
type: object
|
||||
description: "JSON Schema for validation inputs"
|
||||
output_schema:
|
||||
type: object
|
||||
description: "JSON Schema for validation outputs"
|
||||
capability:
|
||||
type: object
|
||||
description: "Capability metadata (read_only, writes, checkpointable forced for validations)"
|
||||
resource_slots:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required: [name, resource_type, access]
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
resource_type:
|
||||
type: string
|
||||
access:
|
||||
type: string
|
||||
enum: [read_only, read_write]
|
||||
description:
|
||||
type: string
|
||||
binding:
|
||||
type: string
|
||||
enum: [contextual, static, parameter]
|
||||
default: contextual
|
||||
static_resource:
|
||||
type: string
|
||||
required:
|
||||
type: boolean
|
||||
default: true
|
||||
lifecycle:
|
||||
type: object
|
||||
properties:
|
||||
discover:
|
||||
type: string
|
||||
activate:
|
||||
type: string
|
||||
deactivate:
|
||||
type: string
|
||||
timeout:
|
||||
type: integer
|
||||
minimum: 1
|
||||
default: 300
|
||||
description: "Execution timeout in seconds"
|
||||
Reference in New Issue
Block a user