ripsed-json 0.2.5

Agent/JSON interface for ripsed — request/response schema, auto-detection
Documentation

ripsed-json

Agent/JSON interface for ripsed — a fast, modern stream editor.

This crate provides the structured JSON protocol for AI coding agents, editor plugins, and automation pipelines:

  • Request parsing — versioned JSON request schema with validation, size limits (64 MiB), and helpful error messages
  • Response building — structured JSON responses with per-file diffs, change counts, and error details
  • Auto-detection — determine whether stdin contains JSON or plain text for seamless mode switching
  • Schema versioning — protocol version management with forward-compatible validation
  • Undo protocol — JSON interface for undo operations

Example request

{
  "version": "1",
  "operations": [
    {
      "op": "replace",
      "find": "old_function",
      "replace": "new_function",
      "glob": "src/**/*.rs"
    }
  ],
  "options": {
    "dry_run": true,
    "root": "./my-project"
  }
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.