# rye:signed:2026-04-06T04:31:00Z:a77b8215b4dcde6688c36b78202b892a06748f9833e3163b1569004f20b97c57:wu08U02sj8orkBtQYDuru75WaAvM5w2xHYPj9RMux99bBxb3P_2UEkFzI8K7sXeWIbEuj1Dg6cidzCA1Qz5ABg:6ea18199041a1ea8
version: "1.0.0"
tool_type: extractor
executor_id: null
category: rye/core/extractors/tool
description: "Extracts metadata from tool files (.py, .yaml, .json, etc)"

extensions:
  - .py
  - .yaml
  - .yml
  - .json
  - .js
  - .ts
  - .mjs
  - .cjs
  - .sh
  - .toml

parser: python/ast

parsers:
  .py: python/ast
  .yaml: yaml/yaml
  .yml: yaml/yaml
  .js: javascript/javascript
  .ts: javascript/javascript
  .mjs: javascript/javascript
  .cjs: javascript/javascript

signature_format:
  prefix: "#"
  after_shebang: true

signature_formats:
  .js:
    prefix: "//"
    after_shebang: false
  .ts:
    prefix: "//"
    after_shebang: false
  .mjs:
    prefix: "//"
    after_shebang: false
  .cjs:
    prefix: "//"
    after_shebang: false

extraction_rules:
  name:
    type: filename
  version:
    type: path
    key: __version__
  category:
    type: path
    key: __category__
  description:
    type: path
    key: __tool_description__
  docstring:
    type: path
    key: __docstring__
  tool_type:
    type: path
    key: __tool_type__
  executor_id:
    type: path
    key: __executor_id__

search_fields:
  title: 3.0
  name: 3.0
  description: 2.0
  category: 1.5
  content: 1.0

validation_schema:
  fields:
    name:
      required: true
      type: string
      match_filename: true
    category:
      required: true
      type: string
      match_path: true
    tool_type:
      required: true
      type: string
    version:
      required: true
      type: semver
    description:
      required: true
      type: string
    executor_id:
      required: true
      type: string
      nullable: true
