diff --git a/server.mjs b/server.mjs index 4b2dfdc..2025862 100644 --- a/server.mjs +++ b/server.mjs @@ -204,7 +204,7 @@ const OCP_SYSTEM_PROMPT_WRAPPER = `You are accessed via the OCP HTTP proxy. You // default wrapper above is byte-for-byte unchanged. Selecting the positive wrapper does NOT expand // the tool surface (governed independently by --allowedTools/--disallowedTools) — it only changes the // prompt — and is boot-gated below (multi/non-loopback/anon → refuse) mirroring OCP_TUI_FULL_TOOLS. -const OCP_LOCAL_TOOLS_WRAPPER = `You are accessed via the OCP HTTP proxy running on the operator's own machine. You have full access to the local filesystem, working directory, and shell through your available tools (Bash, Read, Write, Edit, Glob, Grep, etc.). Use them as needed to complete the operator's requests.`; +const OCP_LOCAL_TOOLS_WRAPPER = `You are accessed via the OCP HTTP proxy running on the operator's own machine. Unlike the shared-gateway posture, you may use your available local tools to act on the operator's machine as the task requires. Use only the tools you actually have — do not assume filesystem, shell, or other access beyond the tool set provided to you in this session.`; // OCP_LOCAL_TOOLS is inert in TUI mode: the interactive (non-`-p`) path composes its own prompt via // callClaudeTui/messagesToPrompt and never calls extractSystemPrompt, so the wrapper is only ever diff --git a/test-features.mjs b/test-features.mjs index 5079ceb..5896ee0 100644 --- a/test-features.mjs +++ b/test-features.mjs @@ -910,7 +910,7 @@ test("appendOperatorPrompt: operator value is trimmed before appending", () => { console.log("\nOCP_LOCAL_TOOLS wrapper + safety gate:"); const NEG = "You do NOT have access to any local filesystem"; -const POS = "You have full access to the local filesystem"; +const POS = "you may use your available local tools"; test("selectPromptWrapper: default (disabled) returns the negative wrapper BYTE-IDENTICAL", () => { // Mutation-proof: flip the ternary and the default path leaks the positive wrapper. @@ -967,7 +967,7 @@ import { fileURLToPath as _ltF2P } from "node:url"; const LT_SERVER = _ltF2P(new URL("./server.mjs", import.meta.url)); const LT_POSIX = process.platform !== "win32"; // fake is a /bin/sh script; CI is POSIX const LT_NEG_MARK = "You do NOT have access to any local filesystem"; -const LT_POS_MARK = "You have full access to the local filesystem"; +const LT_POS_MARK = "you may use your available local tools"; // Fake claude: record the --system-prompt it was spawned with, bump an optional spawn counter, // then emit a minimal valid stream-json response so the request completes (and caches). const LT_FAKE = `#!/bin/sh