Compare commits

...
Author SHA1 Message Date
rekram1-node 6948a3f5f5 refactor(core): localize read tool input schema 2026-09-02 13:22:41 +00:00
+5 -3
View File
@@ -9,7 +9,7 @@ import { Location } from "../../location.js"
import { LocationMutation } from "../../location-mutation.js"
import { Permission } from "../../permission.js"
import { SessionInstructions } from "../../session/instructions.js"
import { AbsolutePath } from "../../schema.js"
import { AbsolutePath, NonNegativeInt } from "../../schema.js"
import { ReadToolFileSystem } from "../read-filesystem.js"
import { Environment } from "../../environment/index.js"
@@ -17,10 +17,12 @@ export const name = "read"
const FILENAME = "AGENTS.md"
const LocationInput = Schema.Struct({
path: Schema.String.annotate({ description: "File or directory to read" }),
offset: ReadToolFileSystem.PageInput.fields.offset.annotate({
offset: Schema.optionalKey(NonNegativeInt).annotate({
description: "The line or directory entry to start reading from (1-based)",
}),
limit: ReadToolFileSystem.PageInput.fields.limit.annotate({
limit: Schema.optionalKey(
NonNegativeInt.check(Schema.isLessThanOrEqualTo(ReadToolFileSystem.MAX_READ_LINES)),
).annotate({
description: "The maximum number of lines or directory entries to read (defaults to 2000)",
}),
})