summaryrefslogtreecommitdiff
path: root/agent
diff options
context:
space:
mode:
authorT <t@tjp.lol>2026-05-27 20:39:45 -0600
committert <t@tjp.lol>2026-05-30 16:29:43 -0600
commit5c016cfdbcb122e2b4f0496ef946642d68953c4b (patch)
tree81feb6ac75045361e8e61d609e4e34d14cecb3b6 /agent
parent48651e123ef0cf1d02eac781902517c0628b310a (diff)
tool names prefixed with `std.`
Diffstat (limited to 'agent')
-rw-r--r--agent/tools/edit.lua6
-rw-r--r--agent/tools/read.lua10
-rw-r--r--agent/tools/shell.lua2
-rw-r--r--agent/tools/write.lua6
4 files changed, 12 insertions, 12 deletions
diff --git a/agent/tools/edit.lua b/agent/tools/edit.lua
index a56c334..7ad39c2 100644
--- a/agent/tools/edit.lua
+++ b/agent/tools/edit.lua
@@ -1,5 +1,5 @@
--- Apply a batch of exact-text replacements to a file. Pi-style terse
--- tool description; the rules are enforced here rather than re-stated
+-- Apply a batch of exact-text replacements to a file. Keep the tool
+-- description terse; the rules are enforced here rather than re-stated
-- in prose, with the rejection message naming exactly which rule each
-- entry tripped so the model can self-correct on the next call.
--
@@ -11,7 +11,7 @@
-- progressively against the result of earlier entries.
return {
- name = "edit",
+ name = "std.edit",
description = "Apply exact-text replacements to a file. Each entry's `old` must match exactly once in the original file (not progressively). Edits whose ranges overlap, match zero times, or match multiple times reject the entire call — no partial edits, file untouched. Keep `old` minimal but unique; widen with surrounding context if needed.",
schema = {
type = "object",
diff --git a/agent/tools/read.lua b/agent/tools/read.lua
index e6192ae..05661c4 100644
--- a/agent/tools/read.lua
+++ b/agent/tools/read.lua
@@ -1,14 +1,14 @@
-- Read a file from disk and return its text verbatim.
--
--- Output cap: 50 KB and 2000 lines, whichever is hit first. Matches
--- pi's defaults; large enough to be useful, small enough to keep the
--- model's context manageable. A single tool result that blows out the
+-- Output cap: 50 KB and 2000 lines, whichever is hit first. Large
+-- enough to be useful, small enough to keep the model's context
+-- manageable. A single tool result that blows out the context window is
-- context window is worse than one that silently asks for a follow-up
-- scoped read.
--
-- The slicing knobs are `offset` (1-based line to start at) and
-- `limit` (max lines to return). SQL-shaped — models recognize the
--- idiom — and matches pi's tool surface. When the cap is hit, a
+-- idiom. When the cap is hit, a
-- `[truncated: ...]` marker names the next `offset` for a follow-up
-- call. The file body itself is byte-for-byte what's on disk, so
-- `edit` anchors round-trip exactly.
@@ -17,7 +17,7 @@ local MAX_BYTES = 50 * 1024 -- 50 KB
local MAX_LINES = 2000
return {
- name = "read",
+ name = "std.read",
description = "Read a file from disk. Output is truncated to the first 50KB or 2000 lines, whichever is hit first; on truncation a marker names the next offset for a follow-up call. Use offset/limit to slice.",
schema = {
type = "object",
diff --git a/agent/tools/shell.lua b/agent/tools/shell.lua
index c615d1c..a9e9de3 100644
--- a/agent/tools/shell.lua
+++ b/agent/tools/shell.lua
@@ -94,7 +94,7 @@ end
-- ---------------------------------------------------------------------------
return {
- name = "shell",
+ name = "std.shell",
description = string.format("Execute a shell command via `/bin/sh -c`. Returns merged stdout+stderr after the command exits, prefixed with an exit-status header. Output is truncated to the last %dKB; on truncation the full transcript is saved to `$PANTO_HOME/shell-output/` and its path is included for follow-up `read` calls. Default timeout 5 minutes.", MAX_BYTES / 1024),
schema = {
type = "object",
diff --git a/agent/tools/write.lua b/agent/tools/write.lua
index 70aa5c8..01bf3b2 100644
--- a/agent/tools/write.lua
+++ b/agent/tools/write.lua
@@ -1,5 +1,5 @@
--- Write text to a file, creating parent directories as needed. Pi-style
--- terse description because every byte of every tool description rides
+-- Write text to a file, creating parent directories as needed. Keep the
+-- description terse because every byte of every tool description rides
-- in the system prompt on every turn.
local uv = require("luv")
@@ -31,7 +31,7 @@ local function dirname(path)
end
return {
- name = "write",
+ name = "std.write",
description = "Save content to a path. Overwrites existing files; missing parent directories are created automatically.",
schema = {
type = "object",