UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

47 lines • 3.61 kB
export { type BashOperations, type BashSpawnContext, type BashSpawnHook, type BashToolDetails, type BashToolInput, type BashToolOptions, createBashTool, createBashToolDefinition, createLocalBashOperations, } from "./bash.ts"; export { createEditTool, createEditToolDefinition, type EditOperations, type EditToolDetails, type EditToolInput, type EditToolOptions, } from "./edit.ts"; export { withFileMutationQueue } from "./file-mutation-queue.ts"; export { createFindTool, createFindToolDefinition, type FindOperations, type FindToolDetails, type FindToolInput, type FindToolOptions, } from "./find.ts"; export { createGlobTool, createGlobToolDefinition, type GlobToolOptions } from "./glob.ts"; export { createGrepTool, createGrepToolDefinition, type GrepOperations, type GrepToolDetails, type GrepToolInput, type GrepToolOptions, } from "./grep.ts"; export { createLsTool, createLsToolDefinition, type LsOperations, type LsToolDetails, type LsToolInput, type LsToolOptions, } from "./ls.ts"; export { createLocalPowerShellOperations, createPowerShellTool, createPowerShellToolDefinition, type PowerShellOperations, type PowerShellSpawnContext, type PowerShellSpawnHook, type PowerShellToolDetails, type PowerShellToolInput, type PowerShellToolOptions, } from "./powershell.ts"; export { createReadTool, createReadToolDefinition, type ReadOperations, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, } from "./read.ts"; export { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, } from "./truncate.ts"; export { createWriteTool, createWriteToolDefinition, type WriteOperations, type WriteToolInput, type WriteToolOptions, } from "./write.ts"; import type { MachineOps } from "../../../vendor/senpi-machine-ops/index.js"; import { type AgentTool } from "@earendil-works/pi-agent-core"; import type { ToolDefinition } from "../extensions/types.ts"; import { type BashToolOptions } from "./bash.ts"; import { type EditToolOptions } from "./edit.ts"; import { type FindToolOptions } from "./find.ts"; import { type GlobToolOptions } from "./glob.ts"; import { type GrepToolOptions } from "./grep.ts"; import { type LsToolOptions } from "./ls.ts"; import { type ToolPathPolicy } from "./machine.ts"; import { type PowerShellToolOptions } from "./powershell.ts"; import { type ReadToolOptions } from "./read.ts"; import { type WriteToolOptions } from "./write.ts"; export type Tool = AgentTool<any>; export type ToolDef = ToolDefinition<any, any>; export type ToolName = "read" | "bash" | "powershell" | "edit" | "write" | "grep" | "find" | "glob" | "ls"; export declare const allToolNames: Set<ToolName>; export interface ToolsOptions { read?: ReadToolOptions; bash?: BashToolOptions; powershell?: PowerShellToolOptions; write?: WriteToolOptions; edit?: EditToolOptions; grep?: GrepToolOptions; find?: FindToolOptions; glob?: GlobToolOptions; ls?: LsToolOptions; /** The one operation layer every tool calls. Default: the process-wide local machine (principal `local-session`). */ machineOps?: MachineOps; /** Hooks for the tool path: only `beforeOp`, run once per tool call before any effect. */ machinePolicy?: ToolPathPolicy; } export declare function createAllToolDefinitions(cwd: string, options?: ToolsOptions): Record<ToolName, ToolDef>; export declare function createCodingTools(cwd: string, options?: ToolsOptions): Tool[]; export declare function createReadOnlyTools(cwd: string, options?: ToolsOptions): Tool[]; //# sourceMappingURL=index.d.ts.map