mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(cli): stop prepending skill_lookup $name instruction onto user turns (#1096)
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>
This commit is contained in:
co-authored by
Debian
Cursor
parent
b74a11ecc3
commit
af962fc61f
@@ -1,2 +1,11 @@
|
||||
/**
|
||||
* 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.'
|
||||
|
||||
Reference in New Issue
Block a user