refactor main

This commit is contained in:
David Blass
2025-12-17 16:20:46 -05:00
parent 1f1c1602c5
commit 90ed2648be
24 changed files with 638 additions and 546 deletions
+3 -3
View File
@@ -1,17 +1,17 @@
import { type } from "arktype";
import type { Context } from "../main.ts";
import type { ToolContext } from "../main.ts";
import { $ } from "../utils/shell.ts";
import { execute, tool } from "./shared.ts";
export const DebugShellCommand = type({});
export function DebugShellCommandTool(_ctx: Context) {
export function DebugShellCommandTool(_ctx: ToolContext) {
return tool({
name: "debug_shell_command",
description:
"debug tool: runs 'git status' and returns the output. use this to test shell command execution in the MCP server.",
parameters: DebugShellCommand,
execute: execute(_ctx, async () => {
execute: execute(async () => {
const result = $("git", ["status"]);
return {
success: true,