# rye:signed:2026-04-10T09:09:02Z:4df4b872ee745a180bcc1d14f9747cba86e70e5e7faec568508e9587975ea3e8:-6yuKoZcUDQHGsSvqGIWuwZaBUb9qNsUQaPn8sOl0ZKropgmuBFOABbfALSApvtSeM0rDkdnziIHK0WufGIqBw: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: constant
    value: "@primitive_chain"

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
