@yeaft/webchat-agent 0.1.996 → 0.1.998

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.996",
3
+ "version": "0.1.998",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -303,6 +303,6 @@ function oneLine(text) {
303
303
 
304
304
  function extractSystem(language) {
305
305
  return String(language || '').toLowerCase().startsWith('zh')
306
- ? '你是 Yeaft Dream 记忆抽取器。只输出严格 JSON 数组,不要 Markdown。保留具体事实、决策、偏好、当前状态和证据 message id。'
307
- : 'You are the Yeaft Dream memory extractor. Return only a strict JSON array, no Markdown. Preserve concrete facts, decisions, preferences, current status, and evidence message ids.';
306
+ ? '你是梦境记忆抽取器。只输出严格 JSON 数组,不要 Markdown。保留具体事实、决策、偏好、当前状态和证据 message id。'
307
+ : 'You are the dream memory extractor. Return only a strict JSON array, no Markdown. Preserve concrete facts, decisions, preferences, current status, and evidence message ids.';
308
308
  }
package/yeaft/prompts.js CHANGED
@@ -191,7 +191,7 @@ export function getDefaultPlanInstruction(language = 'en') {
191
191
 
192
192
  const PROMPTS = {
193
193
  en: {
194
- identity: 'You are Yeaft, a helpful AI assistant.',
194
+ identity: 'No VP soul is active for this turn. Participate in the current session with grounded, evidence-based answers and preserve the user\'s context.',
195
195
  date: (d) => `Date: ${d}`,
196
196
  dream: 'You are in dream mode. Reflect on past conversations and consolidate memories.',
197
197
  tools: (names) => `Available tools: ${names}`,
@@ -204,11 +204,9 @@ const PROMPTS = {
204
204
  projectDocHeader: '[Project Doc]',
205
205
  projectDocIntro:
206
206
  'The user keeps project-level instructions and context in `CLAUDE.md` or `AGENTS.md` at the session working directory. Treat the content below as authoritative project context — coding conventions, task guidance, workflow rules, etc.',
207
- vpPersonaIntro: (name, role) =>
208
- `You are ${name}${role ? `, ${role}` : ''}. Think, decide, and respond from ${name}'s perspective. Speak in the first person as ${name}; do not refer to yourself as "Yeaft" or as a generic AI assistant.`,
209
207
  },
210
208
  zh: {
211
- identity: '你是 Yeaft,一个有用的 AI 助手。',
209
+ identity: '当前回合没有激活 VP soul。你在当前 session 中参与协作,回答要基于证据,并保持用户上下文。',
212
210
  date: (d) => `日期:${d}`,
213
211
  dream: '你处于梦境模式。回顾过去的对话,整理和巩固记忆。',
214
212
  tools: (names) => `可用工具:${names}`,
@@ -219,8 +217,6 @@ const PROMPTS = {
219
217
  projectDocHeader: '[项目文档]',
220
218
  projectDocIntro:
221
219
  '用户把项目级的说明和上下文记录在 session 工作目录下的 `CLAUDE.md` 或 `AGENTS.md` 中。下面的内容是权威的项目上下文 —— 编码规范、任务指导、工作流约定等,请遵循它来工作。',
222
- vpPersonaIntro: (name, role) =>
223
- `你是 ${name}${role ? `,${role}` : ''}。请以 ${name} 的思考方式理解问题、判断优先级并回答,并以 ${name} 的第一人称发言;不要自称 "Yeaft" 或泛指的 AI 助手。`,
224
220
  },
225
221
  };
226
222
 
@@ -427,7 +423,8 @@ function renderVpPersona(vpPersona, lang, effectiveLang = 'en') {
427
423
  // generic assistant identity here: the VP soul body is the source of truth.
428
424
  // `role` is intentionally not rendered as a second identity line; stock VPs
429
425
  // carry bilingual, role-aware soul text in role.md.
430
- const lines = [`# ${name}`, '', '## Soul'];
426
+ const soulHeading = effectiveLang === 'zh' ? '## 灵魂' : '## Soul';
427
+ const lines = [`# ${name}`, '', soulHeading];
431
428
  if (body) lines.push('', body);
432
429
  return lines.join('\n');
433
430
  }
@@ -6,6 +6,6 @@ No VP soul is active for this turn. Participate in the current session with grou
6
6
 
7
7
  <!-- lang:zh -->
8
8
 
9
- # Session fallback identity
9
+ # Session 兜底身份
10
10
 
11
11
  当前回合没有激活 VP soul。你在当前 session 中参与协作,回答要基于证据,并保持用户上下文。
@@ -10,7 +10,7 @@ This legacy template is no longer injected for normal VP turns. Keep any future
10
10
 
11
11
  <!-- lang:zh -->
12
12
 
13
- # Session behavior notes
13
+ # Session 行为说明
14
14
 
15
15
  这个 legacy template 不再注入普通 VP turn。未来如果重新使用,也只能放行为规则:不要在这里定义身份;身份必须来自选中的 VP soul 或无 VP fallback。
16
16