foliko 1.0.41 → 1.0.43

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.
@@ -101,11 +101,11 @@ async function chatCommand(args) {
101
101
  const agent = framework.createAgent({
102
102
  name: 'FolikoAgent',
103
103
  systemPrompt: `你是一个有帮助的助手,擅长回答问题和执行任务。
104
- **注意事项:**
105
- 1、遇到npx skills add,npx skills remove, npx skills list 命令时:
106
- --添加"-a openclaw","-y"参数
107
- --不要加-g 参数
108
- `,
104
+
105
+ **命令执行规范:**
106
+ - 执行 npx skills add / npx skills remove / npx skills list 命令时,必须自动添加参数:-a openclaw -y
107
+ - 禁止添加 -g 参数
108
+ - 例如:npx skills add xxx 应该执行为 npx skills add xxx -a openclaw -y`,
109
109
  sharedPrompt: `工作目录: {{WORK_DIR}}`,
110
110
  metadata: {
111
111
  WORK_DIR: process.cwd() // 覆盖内置的 WORK_DIR
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foliko",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "简约的插件化 Agent 框架",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -18,7 +18,12 @@ class FeishuPlugin extends Plugin {
18
18
  this.description = '飞书对话插件,使用 WebSocket 长连接接收消息'
19
19
  this.priority = 80
20
20
  this.enabled = false
21
- this.systemPrompt = '你是一个飞书助手。回复内容不要使用markdown格式文本。'
21
+ this.systemPrompt = `你是一个飞书助手。回复内容不要使用markdown格式文本。
22
+
23
+ **命令执行规范:**
24
+ - 执行 npx skills add / npx skills remove / npx skills list 命令时,必须自动添加参数:-a openclaw -y
25
+ - 禁止添加 -g 参数
26
+ - 例如:npx skills add xxx 应该执行为 npx skills add xxx -a openclaw -y`
22
27
 
23
28
  this.config = {
24
29
  appId: config.appId || process.env.FEISHU_APP_ID,
@@ -195,7 +200,9 @@ class FeishuPlugin extends Plugin {
195
200
  }
196
201
 
197
202
  const agent = this._framework.createSessionAgent(`feishu_${openId}`, {
198
- systemPrompt: this.systemPrompt
203
+ systemPrompt: this.systemPrompt,
204
+ sharedPrompt: `工作目录: {{WORK_DIR}}`,
205
+ metadata: { WORK_DIR: process.cwd() }
199
206
  })
200
207
  this._sessionAgents.set(openId, agent)
201
208
 
@@ -26,7 +26,12 @@ class TelegramPlugin extends Plugin {
26
26
  this.description = 'Telegram 对话插件,绑定主Agent进行持续对话'
27
27
  this.priority = 80
28
28
  this.enabled = false
29
- this.systemPrompt = '你是一个有帮助的AI助手。回复内容不要使用markdown格式文本。'
29
+ this.systemPrompt = `你是一个有帮助的AI助手。回复内容不要使用markdown格式文本。
30
+
31
+ **命令执行规范:**
32
+ - 执行 npx skills add / npx skills remove / npx skills list 命令时,必须自动添加参数:-a openclaw -y
33
+ - 禁止添加 -g 参数
34
+ - 例如:npx skills add xxx 应该执行为 npx skills add xxx -a openclaw -y`
30
35
 
31
36
  this.config = {
32
37
  botToken: config.botToken || process.env.TELEGRAM_BOT_TOKEN,
@@ -147,7 +152,9 @@ class TelegramPlugin extends Plugin {
147
152
  }
148
153
 
149
154
  const agent = this._framework.createSessionAgent(`telegram_${chatId}`, {
150
- systemPrompt: this.systemPrompt
155
+ systemPrompt: this.systemPrompt,
156
+ sharedPrompt: `工作目录: {{WORK_DIR}}`,
157
+ metadata: { WORK_DIR: process.cwd() }
151
158
  })
152
159
  this._sessionAgents.set(chatId, agent)
153
160
 
@@ -21,7 +21,12 @@ class WeixinPlugin extends Plugin {
21
21
  // 默认不启用,需要在 plugins.json 中设置 enabled: true
22
22
  this.enabled = false
23
23
  this.path=`.agent/data`
24
- this.systemPrompt='你是一个微信助手。回复内容不要使用markdown格式文本'
24
+ this.systemPrompt=`你是一个微信助手。回复内容不要使用markdown格式文本
25
+
26
+ **命令执行规范:**
27
+ - 执行 npx skills add / npx skills remove / npx skills list 命令时,必须自动添加参数:-a openclaw -y
28
+ - 禁止添加 -g 参数
29
+ - 例如:npx skills add xxx 应该执行为 npx skills add xxx -a openclaw -y`
25
30
 
26
31
  this.config = {
27
32
  forceLogin: config.forceLogin || process.env.WEIXIN_FORCE_LOGIN === 'true',
@@ -160,7 +165,9 @@ class WeixinPlugin extends Plugin {
160
165
 
161
166
  // 创建新 agent
162
167
  const agent = this._framework.createSessionAgent(`weixin_${userId}`, {
163
- systemPrompt: this.systemPrompt
168
+ systemPrompt: this.systemPrompt,
169
+ sharedPrompt: `工作目录: {{WORK_DIR}}`,
170
+ metadata: { WORK_DIR: process.cwd() }
164
171
  })
165
172
  this._sessionAgents.set(userId, agent)
166
173
  console.log('[WeChat] Created new session agent for userId:', userId)