Alphakdeps.io is experimental and evolving — the registry and packages may change or reset.
kdeps componentkdeps asset

kdeps-components-edit_file

v2.0.0

kdeps kdeps-component: edit_file

set components / shelf workflow

PurposeEdit a file through the kdeps API and return the changed snippet

LLM context: ~158 tokens when loaded (prompt or tool definition)

Where it runs

Part of the components set, used in workflow and agent mode. Ready-made workflow steps (sql, browser, email, git, ocr...) a resource calls by name; in agent mode they are also tools.

  1. a resource names a component (or the model calls it as a tool)
  2. the component's own resources runcomponents/edit_file
  3. its output goes back to the caller

Loaded by: kdeps (agent loop), /settings, kdeps validate, kdeps run, kdeps bundle package, kdeps env, kdeps export k8s, kdeps test

In the code: kdeps (agent loop)yaml.(*Parser).ParseWorkflowyaml.(*Parser).loadAssetComponents

Install

A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.

kdeps install components/edit_file

Also installs what it requires, when missing or older: schemas/v1, tools/edit_file.

Pin a version with kdeps install components/edit_file@<version>.

Contents

component.yaml

apiVersion: kdeps.io/v1
kind: Component
metadata:
  name: edit_file
  description: Edit a file through the kdeps API and return the changed snippet
  version: "2.0.0"
interface:
  inputs:
    - name: file_path
      type: string
      required: true
      description: Path of the file to edit
    - name: line
      type: number
      description: 1-based line to edit, or to append after
    - name: match
      type: string
      description: Words on the line to edit. Without line, the first line containing them
    - name: text
      type: string
      description: Replacement for the line, or for match on the line
    - name: append
      type: string
      description: Text inserted after the line, or at the end of the file
  # body is the edited line(s), numbered. The HTTP envelope stays inside the call.
  output: "{{ output('call').body }}"
resources:
  - actionId: call
    name: Edit file
    httpClient:
      method: POST
      # In-process host. The HTTP executor calls the handler without dialing.
      url: http://kdeps.api/apis/tools.kdeps.io/v1/tools/edit_file/call
      headers:
        Content-Type: application/json
      failOnError: true
      timeout: 30s
      data:
        file_path: "{{ get('edit_file.file_path') }}"
        line: "{{ get('edit_file.line') }}"
        match: "{{ get('edit_file.match') }}"
        text: "{{ get('edit_file.text') }}"
        append: "{{ get('edit_file.append') }}"
requires:
  schemas/v1: ""
  tools/edit_file: ""

Versions

VersionPublishedStatus
2.0.010/23/2026active
1.0.110/21/2026active
1.0.010/20/2026active

Details

Author
kdeps
License
Apache-2.0
Latest Version
2.0.0
Published
10/20/2026

Tags

kdepskdeps-component