mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-18 03:27:08 +00:00
Cursor ACP (and other remotes) flagged the glued-on SKILL_LOOKUP_INSTRUCTION as prompt injection. Keep discovery on the skill_lookup MCP tool description and on system prompts (OpenCode/Grok); do not taint user messages. Fixes #1095 Co-authored-by: Debian <heavygee@oos-linux.in.lockhouse> Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
618 B
TypeScript
12 lines
618 B
TypeScript
/**
|
|
* Discovery copy for agents that can host a durable system / instructions block
|
|
* (OpenCode, Grok). Do **not** prepend this to user turns — that path looks like
|
|
* prompt injection on Cursor ACP and similar remotes (tiann/hapi#1095).
|
|
*
|
|
* Cursor / Kimi / generic ACP rely on the `skill_lookup` MCP tool description
|
|
* (and Cursor's native `.cursor/mcp.json` overlay where session/new mcpServers
|
|
* are ignored) instead of a user-message prepend.
|
|
*/
|
|
export const SKILL_LOOKUP_INSTRUCTION =
|
|
'When a user message starts with "$name", call HAPI\'s skill_lookup tool with "name" (without "$") before acting.'
|