foliko 2.0.5 → 2.0.7
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/.claude/settings.local.json +4 -1
- package/.cli_default_systemPrompt.md +291 -0
- package/CLAUDE.md +3 -0
- package/README.md +20 -3
- package/docs/architecture.md +34 -2
- package/docs/extensions.md +199 -0
- package/docs/migration.md +100 -0
- package/docs/public-api.md +280 -24
- package/docs/usage.md +122 -30
- package/package.json +1 -1
- package/plugins/core/audit/index.js +1 -1
- package/plugins/core/default/bootstrap.js +44 -19
- package/plugins/core/python-loader/index.js +43 -25
- package/plugins/core/scheduler/index.js +1 -0
- package/plugins/core/skill-manager/PROMPT.md +6 -0
- package/plugins/core/skill-manager/index.js +402 -115
- package/plugins/core/sub-agent/PROMPT.md +10 -0
- package/plugins/core/sub-agent/index.js +36 -3
- package/plugins/core/think/index.js +1 -0
- package/plugins/core/workflow/context.js +941 -0
- package/plugins/core/workflow/engine.js +66 -0
- package/plugins/core/workflow/examples/01-basic.js +42 -0
- package/plugins/core/workflow/examples/01-basic.json +30 -0
- package/plugins/core/workflow/examples/02-choice.js +75 -0
- package/plugins/core/workflow/examples/02-choice.json +59 -0
- package/plugins/core/workflow/examples/03-chain-style.js +114 -0
- package/plugins/core/workflow/examples/03-each.json +41 -0
- package/plugins/core/workflow/examples/04-parallel.js +52 -0
- package/plugins/core/workflow/examples/04-parallel.json +51 -0
- package/plugins/core/workflow/examples/05-chain-style.json +68 -0
- package/plugins/core/workflow/examples/05-each.js +65 -0
- package/plugins/core/workflow/examples/06-script.js +82 -0
- package/plugins/core/workflow/examples/07-module-export.js +43 -0
- package/plugins/core/workflow/examples/08-default-export.js +29 -0
- package/plugins/core/workflow/examples/09-next-with-args.js +50 -0
- package/plugins/core/workflow/examples/10-logger.js +34 -0
- package/plugins/core/workflow/examples/11-storage.js +68 -0
- package/plugins/core/workflow/examples/simple.js +77 -0
- package/plugins/core/workflow/examples/simple.json +75 -0
- package/plugins/core/workflow/index.js +204 -78
- package/plugins/core/workflow/js-runner.js +318 -0
- package/plugins/core/workflow/json-runner.js +323 -0
- package/plugins/core/workflow/stages/action.js +211 -0
- package/plugins/core/workflow/stages/choice.js +74 -0
- package/plugins/core/workflow/stages/delay.js +73 -0
- package/plugins/core/workflow/stages/each.js +123 -0
- package/plugins/core/workflow/stages/parallel.js +69 -0
- package/plugins/core/workflow/stages/try.js +142 -0
- package/plugins/executors/data-splitter/PROMPT.md +13 -0
- package/plugins/executors/data-splitter/index.js +8 -6
- package/plugins/executors/extension/extension-registry.js +145 -0
- package/plugins/executors/extension/index.js +405 -437
- package/plugins/executors/extension/prompt-builder.js +359 -0
- package/plugins/executors/extension/skill-helper.js +143 -0
- package/plugins/messaging/feishu/index.js +5 -3
- package/plugins/messaging/qq/index.js +6 -4
- package/plugins/messaging/telegram/index.js +6 -3
- package/plugins/messaging/weixin/index.js +5 -3
- package/plugins/tools/PROMPT.md +26 -0
- package/plugins/tools/index.js +6 -5
- package/sandbox/check-context.js +5 -0
- package/sandbox/test-context.js +27 -0
- package/sandbox/test-fixes.js +40 -0
- package/sandbox/test-hello-js.js +46 -0
- package/skills/foliko/AGENTS.md +196 -43
- package/skills/foliko/SKILL.md +157 -28
- package/skills/mcp/SKILL.md +77 -118
- package/skills/plugins/SKILL.md +89 -3
- package/skills/python/SKILL.md +57 -39
- package/skills/skill-guide/SKILL.md +42 -34
- package/skills/workflows/SKILL.md +753 -436
- package/src/agent/chat.js +56 -28
- package/src/agent/main.js +39 -14
- package/src/agent/prompt-registry.js +56 -16
- package/src/agent/prompts/PROMPT.md +3 -0
- package/src/agent/sub.js +1 -1
- package/src/cli/ui/chat-ui-old.js +5 -2
- package/src/cli/ui/chat-ui.js +9 -5
- package/src/common/constants.js +12 -0
- package/src/common/error-capture.js +91 -0
- package/src/common/json-safe.js +20 -0
- package/src/common/logger.js +2 -2
- package/src/context/compressor.js +6 -2
- package/src/executors/mcp-executor.js +105 -125
- package/src/framework/framework.js +78 -12
- package/src/index.js +4 -0
- package/src/plugin/base.js +908 -5
- package/src/plugin/manager.js +124 -9
- package/src/tool/schema.js +32 -9
- package/src/utils/sandbox.js +1 -1
- package/website/index.html +821 -0
- package/skills/workflows/workflow-troubleshooting/DEBUGGING.md +0 -197
- package/skills/workflows/workflow-troubleshooting/SKILL.md +0 -391
|
@@ -176,13 +176,17 @@ module.exports = [
|
|
|
176
176
|
|
|
177
177
|
### ext_call 调用格式
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
每个 skill 自动注册为 `skill:<技能名>` 扩展,通过 `ext_call` + `ext_skill` 统一调用。
|
|
180
180
|
|
|
181
181
|
```javascript
|
|
182
|
+
// 1. 先查询命令参数
|
|
183
|
+
ext_skill({ plugin: "skill:<技能名>" })
|
|
184
|
+
|
|
185
|
+
// 2. 用命令行字符串调用
|
|
182
186
|
ext_call({
|
|
183
|
-
plugin: "skill",
|
|
184
|
-
tool: "<
|
|
185
|
-
args: { command: "
|
|
187
|
+
plugin: "skill:<技能名>",
|
|
188
|
+
tool: "<commandname>",
|
|
189
|
+
args: { command: "-n Alice -l en" }
|
|
186
190
|
});
|
|
187
191
|
```
|
|
188
192
|
|
|
@@ -190,31 +194,31 @@ ext_call({
|
|
|
190
194
|
|
|
191
195
|
| 参数 | 类型 | 说明 |
|
|
192
196
|
|------|------|------|
|
|
193
|
-
| `plugin` | string | 固定为 `"skill"` |
|
|
194
|
-
| `tool` | string |
|
|
195
|
-
| `args
|
|
197
|
+
| `plugin` | string | 固定为 `"skill:<技能名>"`,如 `skill:test-skill` |
|
|
198
|
+
| `tool` | string | 命令名(不带技能前缀),如 `greet` |
|
|
199
|
+
| `args` | object | 固定为 `{ command: "命令行字符串" }` |
|
|
196
200
|
|
|
197
201
|
**示例:**
|
|
198
202
|
|
|
199
203
|
```javascript
|
|
200
|
-
// 调用 test-skill 的 greet
|
|
204
|
+
// 调用 test-skill 的 greet 命令
|
|
201
205
|
ext_call({
|
|
202
|
-
plugin: "skill",
|
|
203
|
-
tool: "
|
|
204
|
-
args: { command: "" }
|
|
206
|
+
plugin: "skill:test-skill",
|
|
207
|
+
tool: "greet",
|
|
208
|
+
args: { command: "-n Alice" }
|
|
205
209
|
});
|
|
206
210
|
|
|
207
|
-
// 调用 test-skill 的 greet
|
|
211
|
+
// 调用 test-skill 的 greet 命令,带可选 lang
|
|
208
212
|
ext_call({
|
|
209
|
-
plugin: "skill",
|
|
210
|
-
tool: "
|
|
211
|
-
args: { command: "Alice" }
|
|
213
|
+
plugin: "skill:test-skill",
|
|
214
|
+
tool: "greet",
|
|
215
|
+
args: { command: "-n Alice -l en" }
|
|
212
216
|
});
|
|
213
217
|
|
|
214
218
|
// 调用 test-skill 的 echo 命令
|
|
215
219
|
ext_call({
|
|
216
|
-
plugin: "skill",
|
|
217
|
-
tool: "
|
|
220
|
+
plugin: "skill:test-skill",
|
|
221
|
+
tool: "echo",
|
|
218
222
|
args: { command: "Hello World" }
|
|
219
223
|
});
|
|
220
224
|
```
|
|
@@ -383,13 +387,17 @@ module.exports = [
|
|
|
383
387
|
|
|
384
388
|
### ext_call 调用格式
|
|
385
389
|
|
|
386
|
-
|
|
390
|
+
每个 skill 自动注册为 `skill:<技能名>` 扩展,通过 `ext_call` + `ext_skill` 统一调用。
|
|
387
391
|
|
|
388
392
|
```javascript
|
|
393
|
+
// 1. 先查询命令参数
|
|
394
|
+
ext_skill({ plugin: "skill:<技能名>" })
|
|
395
|
+
|
|
396
|
+
// 2. 用命令行字符串调用
|
|
389
397
|
ext_call({
|
|
390
|
-
plugin: "skill",
|
|
391
|
-
tool: "<
|
|
392
|
-
args: { command: "
|
|
398
|
+
plugin: "skill:<技能名>",
|
|
399
|
+
tool: "<commandname>",
|
|
400
|
+
args: { command: "-n Alice -l en" }
|
|
393
401
|
});
|
|
394
402
|
```
|
|
395
403
|
|
|
@@ -397,31 +405,31 @@ ext_call({
|
|
|
397
405
|
|
|
398
406
|
| 参数 | 类型 | 说明 |
|
|
399
407
|
|------|------|------|
|
|
400
|
-
| `plugin` | string | 固定为 `"skill"` |
|
|
401
|
-
| `tool` | string |
|
|
402
|
-
| `args
|
|
408
|
+
| `plugin` | string | 固定为 `"skill:<技能名>"`,如 `skill:test-skill` |
|
|
409
|
+
| `tool` | string | 命令名(不带技能前缀),如 `greet` |
|
|
410
|
+
| `args` | object | 固定为 `{ command: "命令行字符串" }` |
|
|
403
411
|
|
|
404
412
|
**示例:**
|
|
405
413
|
|
|
406
414
|
```javascript
|
|
407
|
-
// 调用 test-skill 的 greet
|
|
415
|
+
// 调用 test-skill 的 greet 命令
|
|
408
416
|
ext_call({
|
|
409
|
-
plugin: "skill",
|
|
410
|
-
tool: "
|
|
411
|
-
args: { command: "" }
|
|
417
|
+
plugin: "skill:test-skill",
|
|
418
|
+
tool: "greet",
|
|
419
|
+
args: { command: "-n Alice" }
|
|
412
420
|
});
|
|
413
421
|
|
|
414
|
-
// 调用 test-skill 的 greet
|
|
422
|
+
// 调用 test-skill 的 greet 命令,带可选 lang
|
|
415
423
|
ext_call({
|
|
416
|
-
plugin: "skill",
|
|
417
|
-
tool: "
|
|
418
|
-
args: { command: "Alice" }
|
|
424
|
+
plugin: "skill:test-skill",
|
|
425
|
+
tool: "greet",
|
|
426
|
+
args: { command: "-n Alice -l en" }
|
|
419
427
|
});
|
|
420
428
|
|
|
421
429
|
// 调用 test-skill 的 echo 命令
|
|
422
430
|
ext_call({
|
|
423
|
-
plugin: "skill",
|
|
424
|
-
tool: "
|
|
431
|
+
plugin: "skill:test-skill",
|
|
432
|
+
tool: "echo",
|
|
425
433
|
args: { command: "Hello World" }
|
|
426
434
|
});
|
|
427
435
|
```
|