dfb91781aa
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
41 lines
792 B
YAML
41 lines
792 B
YAML
# Example: Custom Python tool
|
|
# A simple custom tool that runs inline Python code.
|
|
|
|
name: local/line-counter
|
|
description: Count lines in a file
|
|
source: custom
|
|
code: |
|
|
import pathlib
|
|
path = pathlib.Path(inputs["file_path"])
|
|
count = len(path.read_text().splitlines())
|
|
return {"line_count": count}
|
|
|
|
input_schema:
|
|
type: object
|
|
required:
|
|
- file_path
|
|
properties:
|
|
file_path:
|
|
type: string
|
|
description: Path to the file to count lines in
|
|
|
|
output_schema:
|
|
type: object
|
|
properties:
|
|
line_count:
|
|
type: integer
|
|
|
|
capability:
|
|
read_only: true
|
|
writes: false
|
|
idempotent: true
|
|
|
|
resource_slots:
|
|
- name: target_file
|
|
resource_type: fs-mount
|
|
access: read_only
|
|
description: File system containing the target file
|
|
binding: contextual
|
|
|
|
timeout: 60
|