foliko 1.1.76 → 1.1.77

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.
@@ -26,7 +26,7 @@ const PROVIDER_MODELS = {
26
26
  function getEnvConfig() {
27
27
  const provider = process.env.FOLIKO_PROVIDER || 'minimax';
28
28
  const providerInfo = DEFAULT_PROVIDERS[provider];
29
- const defaultModel = PROVIDER_MODELS[provider] || 'deepseek-chat';
29
+ const defaultModel = process.env.FOLIKO_MODEL || PROVIDER_MODELS[provider] || 'deepseek-chat';
30
30
 
31
31
  // API key: 优先 FOLIKO_API_KEY,否则找 {PROVIDER}_API_KEY
32
32
  let apiKey = process.env.FOLIKO_API_KEY || null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foliko",
3
- "version": "1.1.76",
3
+ "version": "1.1.77",
4
4
  "description": "简约的插件化 Agent 框架",
5
5
  "main": "src/index.js",
6
6
  "type": "commonjs",
@@ -268,6 +268,9 @@ class ExtensionExecutorPlugin extends Plugin {
268
268
  }),
269
269
  execute: async (args) => {
270
270
  const { plugin} = args;
271
+ if(plugin === 'skill'){
272
+ return "请使用 `loadSkill` 获取skill的使用详情"
273
+ }
271
274
  return this.bindAllToolSkill(plugin)
272
275
  },
273
276
  });
@@ -531,14 +531,27 @@ class SkillManagerPlugin extends Plugin {
531
531
  const entries = fs.readdirSync(resolvedDir, { withFileTypes: true });
532
532
 
533
533
  for (const entry of entries) {
534
- if (!entry.isDirectory()) continue;
534
+ const entryPath = path.join(resolvedDir, entry.name);
535
535
 
536
- const skillPath = path.join(resolvedDir, entry.name);
537
-
538
- if (!isValidSkillName(entry.name)) {
539
- continue;
536
+ // 支持普通目录与符号链接(快捷方式)
537
+ let skillPath = null;
538
+ if (entry.isDirectory()) {
539
+ skillPath = entryPath;
540
+ } else if (entry.isSymbolicLink()) {
541
+ try {
542
+ const realPath = fs.realpathSync(entryPath);
543
+ if (fs.statSync(realPath).isDirectory()) {
544
+ skillPath = realPath;
545
+ }
546
+ } catch (err) {
547
+ log.warn(`[SkillManager] 跳过无效符号链接 '${entry.name}': ${err.message}`);
548
+ continue;
549
+ }
540
550
  }
541
551
 
552
+ if (!skillPath) continue;
553
+ if (!isValidSkillName(entry.name)) continue;
554
+
542
555
  // 跳过已加载的 skill
543
556
  if (this._skills.has(entry.name)) {
544
557
  continue;