feat(cli): add skill_lookup MCP for non-native agents (#1035)

* test: reproduce issue #752

* fix: expose skill lookup MCP tool (closes #752)

* test: cover ACP skill lookup instructions

* fix: inject ACP skill lookup instruction

* test: narrow skill lookup auto-approval

* fix: restrict skill lookup auto-approval

* test: cover exact skill lookup tool names
This commit is contained in:
SSU-WEI HUANG
2026-07-16 12:31:36 +08:00
committed by GitHub
parent e342d97177
commit f457156bd1
25 changed files with 941 additions and 90 deletions
+2
View File
@@ -6,6 +6,7 @@
*/
import { trimIdent } from '@/utils/trimIdent';
import { SKILL_LOOKUP_INSTRUCTION } from '@/modules/common/skillLookupInstruction';
/**
* Title instruction for OpenCode to call the hapi MCP tool.
@@ -13,6 +14,7 @@ import { trimIdent } from '@/utils/trimIdent';
export const TITLE_INSTRUCTION = trimIdent(`
Use the title tool sparingly. For a new chat, call the tool "hapi_change_title" once after the user's initial request is clear, and set a concise task title. Do not rename the chat for routine progress, substeps, implementation details, or a slightly better wording. Rename only when the user's primary objective changes substantially and the existing title would be misleading.
When you create or find a local image file that the user should see, call the tool "hapi_display_image" with the image path so HAPI can show it inline.
${SKILL_LOOKUP_INSTRUCTION}
`);
/**