feat(ipuaro): add read tools (v0.5.0)

- ToolRegistry: tool lifecycle management, execution with validation
- GetLinesTool: read file lines with line numbers
- GetFunctionTool: get function source using AST
- GetClassTool: get class source using AST
- GetStructureTool: directory tree with filtering

121 new tests, 540 total
This commit is contained in:
imfozilbek
2025-12-01 00:52:00 +05:00
parent 68f927d906
commit 25146003cc
15 changed files with 2592 additions and 7 deletions

View File

@@ -127,9 +127,7 @@ describe("ResponseParser", () => {
describe("formatToolCallsAsXml", () => {
it("should format tool calls as XML", () => {
const toolCalls = [
createToolCall("1", "get_lines", { path: "src/index.ts", start: 1 }),
]
const toolCalls = [createToolCall("1", "get_lines", { path: "src/index.ts", start: 1 })]
const xml = formatToolCallsAsXml(toolCalls)
@@ -152,9 +150,7 @@ describe("ResponseParser", () => {
})
it("should handle object values as JSON", () => {
const toolCalls = [
createToolCall("1", "test", { data: { key: "value" } }),
]
const toolCalls = [createToolCall("1", "test", { data: { key: "value" } })]
const xml = formatToolCallsAsXml(toolCalls)