New:Socket for Asana Is Now Available.Learn more
Get Started

@kpanks/coding-agent

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kpanks/coding-agent

Praetor coding agent: file/git/test tools + native unified-diff applier + drift-tolerant apply_edit. Repo-rooted, free-tier compatible.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@kpanks/coding-agent

Praetor's coding agent. A NativePraetorEngine preconfigured with a curated tool subset and a system prompt focused on disciplined code changes.

Tool surface

All tools are gated by the coding role and tagged ["coding", "free"] because none of them call a paid API.

ToolWhat it does
read_fileRead a UTF-8 file relative to repoRoot.
write_fileCreate or overwrite a UTF-8 file. Creates parent dirs.
edit_fileReplace every literal occurrence of find with replace.
list_filesList immediate children of a directory inside the repo.
grep_codebaseRegex over all text files (skips node_modules, .git, dist).
git_statusWorking-tree status (added/modified/deleted/staged).
git_diffUnstaged diff, optionally for a single path.
git_commitStage and commit. Will not push or rebase.
git_branchList local branches and report the current one.
git_logRecent commits (default 20).
run_testsAuto-detect (npm test, pytest, cargo test, go test) and run.
run_commandSpawn an arbitrary command; cwd pinned to repoRoot, 30s timeout.

Path safety

Every file path supplied to a file tool is resolved against the configured repoRoot and rejected if it escapes the root (the same containment pattern as the world-gen scene server in the API).

Free vs. paid model routing

The agent constructs its inner NativePraetorEngine with { quality: "balanced", preferTags: ["coding"] }. With the default catalogue this lands on Claude Sonnet (paid) or Xiaomi MiMo-V2.5 (open weight, sovereign-mode eligible) — pass an explicit route requirement to force one or the other:

new CodingAgent({
  ...,
  route: { quality: "balanced", sovereign: true }, // open-weight only
});

Usage

import { CodingAgent } from "@kpanks/coding-agent";
import { LlmRouter } from "@kpanks/router";
import { ToolRegistry } from "@kpanks/tools";

const router = new LlmRouter();
const tools = new ToolRegistry();
const agent = new CodingAgent({
  repoRoot: "/abs/path/to/repo",
  router,
  tools,
  toolContext: {},
});

const result = await agent.run({
  goal: "Add a /healthz route to the API and a test that asserts 200",
  outputs: [],
  budgetUsd: 1,
});

FAQs

Package last updated on 05 May 2026

Related posts