/** * Tool trait, execution context, and the registry of all built-in tools. * Mirrors `apps/infrastructure/src/tools/mod.rs`. */ import type { JsonValue } from "@zesdex/domain"; import type { ToolCtx } from "./context.ts"; // ── Re-export framework modules ────────────────────────────────────────── export type { GraduatedCheck, ToolCtx } from "./context.ts"; export { ToolCtxBuilder } from "./context.ts"; export { argStr, resolvePath, logWriteEditTool, sha256Hex, } from "./util.ts"; export { checkGraduatedChecks, } from "./graduated.ts"; export { checkGitDestructive, } from "./shell/git.ts"; export { isCredentialPath, checkCredentialRead, } from "./shell/credentials.ts"; export { allTools, toolDefs, toolIsRisky, toolIsParallelSafe, } from "./registry.ts"; // ── Tool interface ─────────────────────────────────────────────────────── /** Common interface every agent-invocable tool implements. */ export interface Tool { name: string; description: string; parameters: Record; run(ctx: ToolCtx, args: JsonValue): string | Promise; }