foliko 1.1.72 → 1.1.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cli_default_systemPrompt.md +242 -0
- package/.dockerignore +45 -45
- package/.env.example +56 -56
- package/docker-compose.yml +33 -33
- package/docs/features.md +120 -120
- package/docs/quick-reference.md +160 -160
- package/package.json +1 -1
- package/plugins/extension-executor-plugin.js +18 -44
- package/skills/find-skills/SKILL.md +133 -133
- package/skills/foliko-dev/AGENTS.md +236 -236
- package/skills/mcp-usage/SKILL.md +200 -200
- package/skills/subagent-guide/SKILL.md +237 -237
- package/skills/workflow-guide/SKILL.md +646 -646
- package/src/capabilities/skill-manager.js +57 -2
- package/website_v2/styles/animations.css +7 -7
|
@@ -241,6 +241,7 @@ class Skill {
|
|
|
241
241
|
inputSchema: z.object({
|
|
242
242
|
args: z.string().optional().describe('命令参数'),
|
|
243
243
|
}),
|
|
244
|
+
_options: cmd.options || null, // 保存 options 信息用于提示词生成
|
|
244
245
|
execute: async (toolArgs, framework) => {
|
|
245
246
|
const ctx = {
|
|
246
247
|
sessionId: framework?._currentSessionId || 'unknown',
|
|
@@ -442,13 +443,67 @@ class SkillManagerPlugin extends Plugin {
|
|
|
442
443
|
}
|
|
443
444
|
|
|
444
445
|
const lines = ['## 可用技能', ''];
|
|
446
|
+
|
|
447
|
+
// 获取 skill 的命令(通过 extension-executor 插件获取已注册的工具)
|
|
448
|
+
const extExecutor = this._framework?.pluginManager?.get('extension-executor');
|
|
449
|
+
const skillCommands = extExecutor?.getSkillCommands?.() || [];
|
|
450
|
+
|
|
451
|
+
// 按技能名分组
|
|
452
|
+
const toolsBySkill = {};
|
|
453
|
+
for (const tool of skillCommands) {
|
|
454
|
+
if (!tool || !tool.name) continue;
|
|
455
|
+
const parts = tool.name.split(':');
|
|
456
|
+
if (parts.length < 2) continue;
|
|
457
|
+
const skillName = parts[0];
|
|
458
|
+
const cmdName = parts.slice(1).join(':');
|
|
459
|
+
if (!toolsBySkill[skillName]) {
|
|
460
|
+
toolsBySkill[skillName] = [];
|
|
461
|
+
}
|
|
462
|
+
toolsBySkill[skillName].push({ name: cmdName, description: tool.description || '', options: tool.options || null });
|
|
463
|
+
}
|
|
464
|
+
|
|
445
465
|
for (const skill of skills) {
|
|
446
466
|
const name = skill.metadata?.name || skill.name || 'unknown';
|
|
447
467
|
const descText = skill.metadata?.description || '';
|
|
448
|
-
|
|
468
|
+
|
|
469
|
+
lines.push(`### ${name}`);
|
|
470
|
+
lines.push(`**描述**: ${descText}`);
|
|
471
|
+
|
|
472
|
+
// 如果该技能有命令,添加调用方式
|
|
473
|
+
if (toolsBySkill[name]) {
|
|
474
|
+
lines.push('');
|
|
475
|
+
lines.push('**调用方式:**');
|
|
476
|
+
lines.push('```');
|
|
477
|
+
lines.push(`ext_call({`);
|
|
478
|
+
lines.push(` plugin: "skill",`);
|
|
479
|
+
lines.push(` tool: "${name}:<命令名>",`);
|
|
480
|
+
lines.push(` args: { args: "参数" } // 注意:args 必须是对象,不能是字符串`);
|
|
481
|
+
lines.push(`})`);
|
|
482
|
+
lines.push('```');
|
|
483
|
+
lines.push('');
|
|
484
|
+
lines.push('**可用命令:**');
|
|
485
|
+
for (const c of toolsBySkill[name]) {
|
|
486
|
+
lines.push(`- \`${c.name}\`: ${c.description}`);
|
|
487
|
+
// 如果有 options,显示参数格式
|
|
488
|
+
if (c.options && c.options.length > 0) {
|
|
489
|
+
const optStr = c.options.map(o => {
|
|
490
|
+
const flag = o.flags?.split(' ')[0] || o.flags || '';
|
|
491
|
+
const def = o.defaultValue !== undefined ? ` (默认: ${JSON.stringify(o.defaultValue)})` : '';
|
|
492
|
+
return `${flag}${def}`;
|
|
493
|
+
}).join(' ');
|
|
494
|
+
lines.push(` - 选项: ${optStr}`);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
lines.push('');
|
|
498
|
+
lines.push('**示例:**');
|
|
499
|
+
for (const c of toolsBySkill[name]) {
|
|
500
|
+
lines.push(`- 调用 \`ext_call({ plugin: "skill", tool: "${name}:${c.name}", args: { args: "参数" } })\``);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
lines.push('');
|
|
449
504
|
}
|
|
505
|
+
|
|
450
506
|
lines.push(
|
|
451
|
-
'',
|
|
452
507
|
'> **重要提示**:当需要开发插件、执行专业任务时,必须先使用 `loadSkill` 工具加载对应技能,获取专业指导。'
|
|
453
508
|
);
|
|
454
509
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* Foliko v2 - Animations */
|
|
2
|
-
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
|
|
3
|
-
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
|
4
|
-
@keyframes glow { 0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); } 50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); } }
|
|
5
|
-
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }
|
|
6
|
-
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
|
|
7
|
-
.reveal.visible { opacity: 1; transform: translateY(0); }
|
|
1
|
+
/* Foliko v2 - Animations */
|
|
2
|
+
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
|
|
3
|
+
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
|
4
|
+
@keyframes glow { 0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); } 50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); } }
|
|
5
|
+
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }
|
|
6
|
+
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
|
|
7
|
+
.reveal.visible { opacity: 1; transform: translateY(0); }
|
|
8
8
|
|