feat: add fail-closed Aider development skill
This commit is contained in:
@@ -47,6 +47,19 @@ test('filterChatSkills shows service integration smoke when granted', () => {
|
||||
assert.ok(visible.some((item) => item.id === 'service-integration-smoke'));
|
||||
});
|
||||
|
||||
test('filterChatSkills only shows Aider development when granted', () => {
|
||||
const hidden = filterChatSkills(CHAT_SKILL_DEFINITIONS, {
|
||||
canPublish: false,
|
||||
grantedSkills: [],
|
||||
});
|
||||
assert.equal(hidden.some((item) => item.id === 'aider-development'), false);
|
||||
const visible = filterChatSkills(CHAT_SKILL_DEFINITIONS, {
|
||||
canPublish: false,
|
||||
grantedSkills: ['aider-development'],
|
||||
});
|
||||
assert.ok(visible.some((item) => item.id === 'aider-development'));
|
||||
});
|
||||
|
||||
test('filterChatSkills shows page-data-collect when granted without static publish', () => {
|
||||
const visible = filterChatSkills(CHAT_SKILL_DEFINITIONS, {
|
||||
canPublish: false,
|
||||
@@ -69,6 +82,8 @@ test('buildChatSkillPrompt includes skill name for platform skills', () => {
|
||||
assert.match(enhancedPrompt, /tkmind_search/);
|
||||
assert.match(enhancedPrompt, /web_search/);
|
||||
assert.match(buildChatSkillPrompt('service-integration-smoke'), /标准联调流程/);
|
||||
assert.match(buildChatSkillPrompt('aider-development'), /必须由 Aider code run/);
|
||||
assert.match(buildChatSkillPrompt('aider-development'), /禁止回退/);
|
||||
assert.match(buildChatSkillPrompt('product-campaign-page'), /商品宣传 \/ 活动页/);
|
||||
assert.match(buildChatSkillPrompt('image-generation'), /asset\.htmlSrc/);
|
||||
assert.match(buildChatSkillPrompt('image-generation'), /workspaceRelativePath 只用于文件操作/);
|
||||
|
||||
Reference in New Issue
Block a user