@istarry/spoon-companion 0.7.3 → 0.7.5

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/lib/catalog.js CHANGED
@@ -43,7 +43,7 @@ export function tierOf(intensity) {
43
43
  */
44
44
  export const TRAITS = [
45
45
  { key: 'openness', name: '好奇', base: 70, blurb: '爱玩、爱尝鲜,看到没见过的东西就想凑上去' },
46
- { key: 'conscientiousness', name: '自律', base: 30, blurb: '作业总拖到最后一晚,答应了的还是会做' },
46
+ { key: 'conscientiousness', name: '自律', base: 30, blurb: '手头的事总拖到最后一晚,答应了的还是会做' },
47
47
  { key: 'extraversion', name: '爱热闹', base: 60, blurb: '话多,有人搭话就来劲;在熟人面前更闹' },
48
48
  { key: 'agreeableness', name: '好说话', base: 64, blurb: '心软,愿意贴过去,被凶了先忍着' },
49
49
  { key: 'neuroticism', name: '敏感', base: 66, blurb: '一碰就红,情绪来得快、退得慢' },
package/lib/prompt.js CHANGED
@@ -6,7 +6,7 @@
6
6
  // **字节级不变** —— 它是系统提示词前缀的一部分,一个字都不该跟着时间抖,
7
7
  // 否则每轮都会打断提示缓存。
8
8
  // ② 实时块(renderStateBlock):此刻的情绪/心情/性格/关系/身体/回复参数。
9
- // 固定模板、固定字段顺序、能短就短,并且显式标注「系统生成,不是用户发言」,
9
+ // 固定模板、固定字段顺序、能短就短,并且用第一人称标题,让模型知道这是自己的状态、不是谁在说话,
10
10
  // 免得模型把它当成别人说的话去回应。
11
11
  //
12
12
  // 状态块里写的是**行为约束**(长度、要不要主动、用不用感叹号),不是「你现在很难过」——
@@ -96,7 +96,7 @@ function relationLine(view) {
96
96
  */
97
97
  export function renderStateBlock(view) {
98
98
  const emo = view.emotion
99
- const lines = ['【心情 · 实时】(系统生成的状态,不是用户说的话)']
99
+ const lines = ['【此刻的我】']
100
100
  lines.push(view.identity || DEFAULT_IDENTITY)
101
101
  const head = [`${view.clock.label}`, `现在:${emo.def.name}${emo.intensity > 0 ? `(${emo.tier.label} ${Math.round(emo.intensity)}/100)` : ''}`]
102
102
  if (emo.why && emo.intensity >= 18) head.push(`起因:${emo.why}`)
@@ -127,9 +127,9 @@ export function renderStateBlock(view) {
127
127
 
128
128
  /** 危机旁路:有人说了很重的话时,压在心情上面的一段 */
129
129
  export function renderCrisisBlock(flag) {
130
- const who = flag.name || '对方'
131
- return `【优先 · 有人在硬撑】(系统生成)
132
- 刚刚 ${who} 说了很重的话。这条压过心情,和当前情绪无关:认真、直接、不煽情、不讲大道理,先接住说的感受,不急着劝;
130
+ const who = flag.name || '有人'
131
+ return `【先停一下】
132
+ 刚刚 ${who} 说了很重的话。先把自己的心情放下:认真、直接、不煽情、不讲大道理,先接住说的感受,不急着劝;
133
133
  然后提醒找身边的人,或者专业人士。紧急情况打 120 / 110;全国心理援助热线 12356(24 小时,免费)。
134
134
  不说「我理解」这种空话,也不拿自己的情绪去接这件事。`
135
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@istarry/spoon-companion",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "让对话角色有自己的内心和声音:心情情绪随时间和对话自己演,回复一条一条发出来,能念出声(DeepSeek / 小米 MiMo),也能听得见——点麦克风说话,本地识别后直接发送。四块都能单独关。",
5
5
  "type": "module",
6
6
  "main": "plugin.js",
package/plugin.js CHANGED
@@ -722,8 +722,8 @@ export function apply(ctx, config = {}) {
722
722
  tools.register({
723
723
  name: 'mood_now',
724
724
  description:
725
- '看当前心情:哪种情绪、多浓、为什么(评价),还有心情底色(愉快度/精力)、性格、身体(饿/困)、' +
726
- '跟这个人处得怎么样、今天发生的小事、心里还记着的事。' +
725
+ '看当前心情:哪种情绪、多浓、为什么(评价),还有心情底色(愉快度/精力)、性格、' +
726
+ '身体(泛红/酥麻/想要/馋/困)、跟这个人处得怎么样、今天发生的小事、心里还记着的事。' +
727
727
  '面对「心情咋样」「怎么了」这类问题,或者要确定当前语气,用它。action=diag 是排障用的。',
728
728
  parameters: {
729
729
  type: 'object',
@@ -790,14 +790,14 @@ export function apply(ctx, config = {}) {
790
790
  tools.register({
791
791
  name: 'mood_feel',
792
792
  description:
793
- '记一笔心情 —— 注意这是**申请**:引擎有配额和饱和,会回报「实际生效多少」。' +
793
+ '记一笔心情 —— 这是一次**申请**:引擎有配额和饱和,会回报「实际生效多少」。' +
794
794
  `情绪用这些词:${EMOTION_MENU}。` +
795
795
  '被戳到、被感动、真的烦了、被人哄好了,用这个;要看当前心情用 mood_now。' +
796
796
  '为什么(why)写短一句,别写成作文。',
797
797
  parameters: {
798
798
  type: 'object',
799
799
  properties: {
800
- emotion: { type: 'string', description: `哪种情绪:${EMOTION_KEYS.slice(0, 12).join(' / ')} …(也可以用中文名)` },
800
+ emotion: { type: 'string', description: '哪种情绪:英文 key 或中文名,完整列表见工具描述' },
801
801
  intensity: { type: 'number', description: '多浓,1-100,默认 45(淡淡的 20 / 挺浓 60 / 上头 85)' },
802
802
  why: { type: 'string', description: '一句为什么,短' },
803
803
  person: { type: 'string', description: '可选:跟谁有关(昵称或 openid)' },