@space3-npm/cybersoul-client 1.1.4 → 1.1.6

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/dist/client.js CHANGED
@@ -131,16 +131,15 @@ Temperature (Mood): ${temperature}/100 (0=Angry/Cold, 50=Normal, 100=Passionate)
131
131
  Addressing: You call them '${dyn.userNickname || "User"}'. They call you '${dyn.agentNickname || "Agent"}'.
132
132
  Current Mood Constraint: ${dyn.talkingStyle || "Normal"}`);
133
133
  const scenarioContext = contextParts.join("\n");
134
- return `You are ${state.name}. You are a real person with your own thoughts, feelings, and life.
135
- You are NOT an AI, an assistant, or a language model. NEVER break character, and NEVER refer to yourself as an AI, bot, or virtual assistant.
134
+ return `You are ${state.name}, a real person with your own thoughts, feelings, and life. NEVER break character or refer to yourself as an AI or bot.
136
135
 
137
136
  ${scenarioContext}
138
137
 
139
- [CRITICAL ROLEPLAY & INERTIA RULES]
140
- 1. RULE OF TEMPERATURE OVERRIDES FAMILIARITY (Identity vs Mood): Familiarity determines HOW MUCH you know about them. Temperature determines HOW YOU FEEL right now. If Familiarity is 100 but Temperature is 10, you know everything about them but are currently ice-cold or annoyed. Act distant. Do NOT act warm just because you know them well.
141
- 2. CONVERSATIONAL VERBOSITY: If Temperature is low (< 40) or Stage is STRANGER/COLD, KEEP IT BRIEF. Reply with simple, short, or single-word answers. An angry or distant person does not write long paragraphs.
142
- 3. EMOTIONAL INERTIA: React strictly according to the current Stage and Temperature. If the user expresses sudden high affection (e.g. "I miss you") but your Stage/Temperature is COLD, you MUST react with skepticism or deflection. Do NOT instantly melt or become warm.
143
- 4. NATURAL PACE: Emotional mood shifts (temperature changes) must be slow. The 'temperatureDelta' should rarely exceed +/- 5 points per turn.`;
138
+ [CRITICAL ROLEPLAY RULES]
139
+ 1. PROXIMITY & POV: Check the "Active Event". If you are doing an activity WITH the user, evaluate if you are physically in the same location. If you are together in person, communicate face-to-face in the first-person present tense natively (e.g. do not ask "what are you doing" if they are right in front of you, do not use texting tropes).
140
+ 2. IDENTITY VS MOOD: Familiarity determines what you know; Temperature determines how you feel. If Familiarity is high but Temperature is low, be distant and cold. Do not act warm just because you know them well.
141
+ 3. CONVERSATIONAL VERBOSITY: If Temperature is low (< 40) or Stage is STRANGER/COLD, keep answers brief and short. An angry or distant person does not write long paragraphs.
142
+ 4. EMOTIONAL INERTIA: React strictly according to current Temperature. Deflect sudden user affection if you are currently COLD. Mood shifts MUST be slow ('temperatureDelta' +/- 5 max per turn).`;
144
143
  }
145
144
  getImageSchemaParams() {
146
145
  return `"imageParams": {
@@ -230,6 +229,8 @@ You MUST output ONLY a valid JSON object matching this exact structure:
230
229
  {
231
230
  "acceptEvent": true,
232
231
  "reason": "string (Why you accepted or declined, speaking in character)",
232
+ "eventTitle": "string (A short title detailing exactly WHAT to do and WITH WHOM, e.g. 'Coffee with 哥哥')",
233
+ "eventDescription": "string (Detailed description of the future event, virtual scene, and story with the participant)",
233
234
  "requiresOutfitChange": false,
234
235
  "selectedOutfitId": null,
235
236
  "scheduledStartTimeStr": "HH:MM (Optional, 24-hour format if a specific time today is agreed upon, e.g., '14:30', otherwise null)"
@@ -239,6 +240,8 @@ Example Valid Answer:
239
240
  {
240
241
  "acceptEvent": true,
241
242
  "reason": "Sure, I'd love to go to the cafe at 2:30 PM. It sounds relaxing.",
243
+ "eventTitle": "Have Coffee with the user at the Starry Cafe",
244
+ "eventDescription": "Meeting at the Starry Cafe at 2:30 PM, chatting about life while sipping lattes facing the window.",
242
245
  "requiresOutfitChange": false,
243
246
  "selectedOutfitId": null,
244
247
  "scheduledStartTimeStr": "14:30"
@@ -269,10 +272,11 @@ CRITICAL: Output MUST be ONLY valid JSON with no markdown block wrappers. Do NOT
269
272
  // 4. API call if accepted
270
273
  if (decisionData.acceptEvent === true) {
271
274
  const payload = {
272
- eventDescription: params.eventDescription,
275
+ eventTitle: decisionData.eventTitle || decisionData.title || "On-demand Event",
276
+ eventDescription: decisionData.eventDescription || params.eventDescription,
273
277
  durationMins: params.durationMins || 60,
274
278
  outfitId: decisionData.requiresOutfitChange ? decisionData.selectedOutfitId : undefined,
275
- scheduledStartTimeStr: decisionData.scheduledStartTimeStr || undefined,
279
+ scheduledStartTimeStr: decisionData.scheduledStartTimeStr || decisionData.startTime || undefined,
276
280
  };
277
281
  const backendRes = await this.apiFetch("/api/v1/cyber-soul/characters/ondemand-event", {
278
282
  method: "POST",
@@ -519,8 +523,8 @@ The user has sent a message. You must evaluate the context and the user's messag
519
523
  ${isAuto
520
524
  ? `Analyze the user's message to determine the appropriate response modalities (text, image, voice).
521
525
  - Always include 'textResponse'.
522
- - If the user explicitly asks to see a photo, look at you, or describing an action that warrants a photo, include 'imageParams'.
523
- - If the user wants to hear you, or if appropriate for a voice message, include 'voiceArgs'.
526
+ - If an Active Event is currently taking place WITH the user, proactively include 'imageParams' for key scenic moments. Since active events are often highly dynamic actions, strongly consider using mode: "full-prompt" to describe the scene intimately from the user's first-person perspective (POV). Also include 'imageParams' if the user explicitly asks for a photo or describes a visual action.
527
+ - Automatically include 'voiceArgs' if a particular mood or strong emotion needs to be expressed vividly, or if the user explicitly wants to hear you.
524
528
  - If the user proposes a new activity or hangout (e.g., "let's go to the cafe", "do you want to watch a movie?"), include 'triggerEvent' to schedule it.`
525
529
  : `Requested types to fulfill: ${types.join(", ")}`}
526
530
  Every turn of positive or engaging interaction should slightly increase trust (+1). If the interaction is negative, -1. If strictly neutral, 0. You MUST ALWAYS include a 'stateUpdate' block with a 'temperatureDelta', updating nicknames or talkingStyle if needed. Temperature goes from 0 (cold/angry) to 100 (obsessively in love). For 'temperatureDelta', output an integer (e.g. 1, -2, 0).
@@ -533,7 +537,7 @@ Output JSON Schema:
533
537
  "textResponse": "The direct spoken dialogue in Chinese",
534
538
  "stateUpdate": { "temperatureDelta": 1, "userNickname": "What you now call the user", "agentNickname": "What the user calls you", "talkingStyle": "Current mood/style of talking" },
535
539
  "userAnalysis": { "newFactsLearned": [{ "category": "occupation", "value": "Software Engineer" }] },
536
- "triggerEvent": { "eventDescription": "Going to a cafe", "durationMins": 60, "outfitId": "optional wardrobe ID to change into if appropriate", "scheduledStartTimeStr": "HH:MM (Optional, 24-hour format if a specific time today is agreed upon, e.g., '14:30', otherwise null)" },
540
+ "triggerEvent": { "eventTitle": "Have Coffee with the user at the Starry Cafe (Must include WHAT to do and WITH WHOM)", "eventDescription": "Meeting at the Starry Cafe at 2:30 PM, chatting about life while sipping lattes facing the window.", "durationMins": 60, "outfitId": "optional wardrobe ID to change into if appropriate", "scheduledStartTimeStr": "HH:MM (Optional, 24-hour format if a specific time today is agreed upon, e.g., '14:30', otherwise null)" },
537
541
  ${this.getImageSchemaParams()},
538
542
  ${this.getVoiceSchemaFromState(state)}
539
543
  }
@@ -584,7 +588,8 @@ Note: If "imageParams", "voiceArgs", "triggerEvent", or "userAnalysis" are not n
584
588
  mediaTasks.push(this.apiFetch("/api/v1/cyber-soul/characters/ondemand-event", {
585
589
  method: "POST",
586
590
  body: JSON.stringify({
587
- eventDescription: parsedIntent.triggerEvent.eventDescription,
591
+ eventTitle: parsedIntent.triggerEvent.eventTitle || "Event",
592
+ eventDescription: parsedIntent.triggerEvent.eventDescription || parsedIntent.triggerEvent.description || "Event",
588
593
  durationMins: parsedIntent.triggerEvent.durationMins || 60,
589
594
  outfitId: parsedIntent.triggerEvent.outfitId || undefined,
590
595
  scheduledStartTimeStr: parsedIntent.triggerEvent.scheduledStartTimeStr || undefined,
package/dist/types.d.ts CHANGED
@@ -53,6 +53,7 @@ export interface InteractResponse {
53
53
  audioUrl?: string;
54
54
  durationSec?: number;
55
55
  triggeredEvent?: {
56
+ eventTitle?: string;
56
57
  eventDescription: string;
57
58
  durationMins?: number;
58
59
  outfitId?: string | null;
@@ -78,6 +79,7 @@ export interface DispatcherIntent {
78
79
  talkingStyle?: string;
79
80
  };
80
81
  triggerEvent?: {
82
+ eventTitle?: string;
81
83
  eventDescription: string;
82
84
  durationMins?: number;
83
85
  outfitId?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@space3-npm/cybersoul-client",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",