Organize Seal modules and add guarded rule recoding

This commit is contained in:
gitea committed 2026-10-13 02:24:41 +00:00
1 parent f788f9c6db
commit 8c7cb219a0
65 files changed
+837 -131

No files matched your search

+11
View File
@@ -172,6 +172,17 @@ export function startServer(): StdioServerHandle {
export { tokenizeCommand };
function cliResult(result: { stdout: string; stderr: string; isError: boolean; exitCode: number }): CallToolResult {
// Confirmation-required commands can carry a structured, unexecuted preview.
// Preserve it for MCP consumers instead of returning only the next-step prose.
if (result.exitCode === 10 && result.stdout) {
return {
content: [
{ type: "text", text: result.stdout },
...(result.stderr ? [{ type: "text" as const, text: result.stderr }] : [])
],
isError: true
};
}
const text = result.isError ? result.stderr || result.stdout : result.stdout;
return {
content: [