Claude при чтении недоверенных документов запускается без MCP-коннекторов и только с Read и Bash
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
import { withTx, type Logger, type Pool } from "khb_common";
|
||||
import type { ClaudeRunner } from "./claude-runner.js";
|
||||
import { UNTRUSTED_DOC_ARGS } from "./claude-runner.js";
|
||||
import { parseAmount } from "./invoices-mail.js";
|
||||
import type { SlackPoster } from "./slack.js";
|
||||
|
||||
@@ -106,7 +107,7 @@ export function makeClaudeStatementReader(o: { claude: ClaudeRunner; tmpDir?: st
|
||||
try {
|
||||
const path = join(dir, "statement.pdf");
|
||||
await writeFile(path, bytes);
|
||||
const res = await o.claude({ prompt: buildStatementPrompt(path), cwd: dir });
|
||||
const res = await o.claude({ prompt: buildStatementPrompt(path), cwd: dir, extraArgs: UNTRUSTED_DOC_ARGS });
|
||||
if (!res.ok) throw new Error(`Claude не отработал (код ${res.exitCode}${res.timedOut ? ", таймаут" : ""}): ${res.stderr.slice(0, 200)}`);
|
||||
return parseStatement(res.stdout);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user