diff --git a/docs/specification.md b/docs/specification.md index 914397026..27be958d8 100644 --- a/docs/specification.md +++ b/docs/specification.md @@ -24676,17 +24676,16 @@ Custom resource types are defined in YAML configuration files and registered via resource_type: name: local/database description: "A SQL database (PostgreSQL, MySQL, SQLite, etc.)" - physical_or_virtual: physical + resource_kind: physical user_addable: true # CLI arguments for `agents resource add local/database` - cli_arguments: + cli_args: - name: connection-string type: string required: true description: "Database connection string (e.g., postgresql://host/dbname)" - validation: - pattern: "^(postgresql|mysql|sqlite)://" + validation_pattern: "^(postgresql|mysql|sqlite)://" - name: schema type: string required: false @@ -24699,31 +24698,33 @@ Custom resource types are defined in YAML configuration files and registered via # Sandbox and handler sandbox_strategy: transaction_rollback - handler: DatabaseHandler - checkpointable: true + handler: myorg.handlers:DatabaseHandler # Allowed parent types (empty means can be top-level) - allowed_parent_types: [] + parent_types: [] # Child types child_types: - - type: local/db-schema - auto_discover: true - manual_link: false - description: "Discovered database schemas" - - type: local/db-table - auto_discover: true - manual_link: false - description: "Discovered tables within schemas" + - local/db-schema + - local/db-table + + # Per-child-type discovery configuration lives in `auto_discovery` + auto_discovery: + enabled: true + strategy: schema_scan + manual_link: false + description: "Automatically discover schemas and tables for child resources" # Capabilities capabilities: - readable: true - writable: true - sandboxable: true - checkpointable: true + read: true + write: true + sandbox: true + checkpoint: true +The `auto_discovery` block replaces the former per-child `auto_discover` / `manual_link` YAML objects. Handlers expose their discovery knobs there while `child_types` remains a flat list of allowed resource type names. + When this type is registered:
agents resource type add --config ./resource-types/database.yaml
@@ -25210,11 +25211,11 @@ class ResourceTypeRecord {
+ name : String
+ description : String
+ source : String
- + physical_or_virtual : PhysVirt
+ + resource_kind : PhysVirt
+ user_addable : Boolean
- + cli_arguments : List
- + allowed_parent_types : List
- + child_types : Map
+ + cli_args : List
+ + parent_types : List
+ + child_types : List
+ sandbox_strategy : String
+ handler : String
+ capabilities : Capabilities
@@ -46864,11 +46865,11 @@ New resource types extend CleverAgents to manage any kind of resource:
resource_type:
name: local/docker-registry
description: "Docker container registry"
- classification: physical
+ resource_kind: physical
user_addable: true
cli_args:
- - name: registry_url
+ - name: registry-url
type: string
required: true
- name: repository
@@ -46879,16 +46880,16 @@ New resource types extend CleverAgents to manage any kind of resource:
default: "latest"
sandbox_strategy: none # Docker images are immutable
- handler: docker_registry_handler
+ handler: myorg.handlers:DockerRegistryHandler
child_types:
- - type: local/docker-image
- relationship: contains
- auto_discover: true
+ - local/docker-image
+ # Auto-discovery controls per-child discovery behavior
auto_discovery:
enabled: true
strategy: list_tags
+ manual_link: false