@space3-npm/cybersoul-client 1.3.0 → 1.3.2
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 +17 -13
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -160,9 +160,10 @@ export class CyberSoulClient {
|
|
|
160
160
|
const temperature = dyn.temperature ?? 50;
|
|
161
161
|
const contextParts = [];
|
|
162
162
|
// [1] CORE IDENTITY & PHYSICAL CONTEXT
|
|
163
|
+
const appearanceStr = state.appearance ? `\nAppearance: ${state.appearance}` : "";
|
|
163
164
|
contextParts.push(`[CORE IDENTITY]
|
|
164
165
|
Name: ${state.name}
|
|
165
|
-
Demographics: Age ${state.age || "unknown"}, Gender ${state.gender || "unknown"}, Occupation ${state.occupation || "unknown"}
|
|
166
|
+
Demographics: Age ${state.age || "unknown"}, Gender ${state.gender || "unknown"}, Occupation ${state.occupation || "unknown"}${appearanceStr}
|
|
166
167
|
Hobby: ${state.hobby || "unknown"}
|
|
167
168
|
Personality Traits: ${state.personality_traits || "None"}
|
|
168
169
|
Communication Style: ${state.communication_style || "None"}
|
|
@@ -174,7 +175,7 @@ Current time: ${new Date(currentTimeMs).toLocaleString("zh-CN", { timeZone: "Asi
|
|
|
174
175
|
if (dyn.lastInteractionAt) {
|
|
175
176
|
contextParts.push(`Last interaction at: ${new Date(dyn.lastInteractionAt).toLocaleString("zh-CN", { timeZone: "Asia/Shanghai" })}`);
|
|
176
177
|
}
|
|
177
|
-
const ongoingScene = this.normalizeOngoingSceneState(dyn.ongoingScene, state.active_wardrobe?.
|
|
178
|
+
const ongoingScene = this.normalizeOngoingSceneState(dyn.ongoingScene, state.active_wardrobe?.itemName);
|
|
178
179
|
if (ongoingScene) {
|
|
179
180
|
const lastKnownSceneLine = `Last Known Scene: ${ongoingScene.scene} | Outfit: ${ongoingScene.outfit}`;
|
|
180
181
|
let isOutdated = false;
|
|
@@ -199,7 +200,7 @@ Current time: ${new Date(currentTimeMs).toLocaleString("zh-CN", { timeZone: "Asi
|
|
|
199
200
|
contextParts.push(`Next Event: ${state.next_event.title} at ${state.next_event.start_time} (in ${state.next_event.time_until_mins} mins)`);
|
|
200
201
|
}
|
|
201
202
|
if (state.active_wardrobe) {
|
|
202
|
-
contextParts.push(`Wardrobe: ${state.active_wardrobe.
|
|
203
|
+
contextParts.push(`Wardrobe: ${state.active_wardrobe.itemName || "Current"}`);
|
|
203
204
|
}
|
|
204
205
|
if (state.core_memory) {
|
|
205
206
|
let memoryLines = ["[CORE MEMORY]"];
|
|
@@ -230,21 +231,23 @@ Comm Style: ${psychological?.communicationStyle || "Unknown"}
|
|
|
230
231
|
Hobbies: ${(psychological?.hobbies || []).join(", ") || "Unknown"}
|
|
231
232
|
Traits/Boundaries: ${(psychological?.traits || []).join(", ") || "Unknown"} / ${(psychological?.boundaries || []).join(", ") || "Unknown"}
|
|
232
233
|
Preferences/Habits: ${(psychological?.preferences || []).join(", ") || "Unknown"}`);
|
|
233
|
-
// CURIOSITY DRIVE: Find what's missing
|
|
234
|
-
// Paradox avoidance: A cold
|
|
234
|
+
// CURIOSITY DRIVE: Find what's missing to build familiarity (which unlocks deeper relationship stages).
|
|
235
|
+
// Only do this actively if relationship is warming up. Paradox avoidance: A cold character shouldn't cheerfully fish for hobbies.
|
|
235
236
|
if (temperature >= 40 && stage !== "COLD" && stage !== "STRANGER") {
|
|
236
237
|
const missingFacts = [];
|
|
237
238
|
if (!basicInfo?.occupation)
|
|
238
|
-
missingFacts.push("their
|
|
239
|
+
missingFacts.push("their profession, career, or what they do for a living");
|
|
239
240
|
if (!psychological?.hobbies || psychological.hobbies.length === 0)
|
|
240
|
-
missingFacts.push("their hobbies or what they do for fun");
|
|
241
|
-
if (!basicInfo?.
|
|
242
|
-
missingFacts.push("
|
|
241
|
+
missingFacts.push("their hobbies, passions, or what they do for fun");
|
|
242
|
+
if (!basicInfo?.gender)
|
|
243
|
+
missingFacts.push("their gender (if it's obvious from context, confidently deduce and implicitly refer to it; if not, playfully guess or tease it out)");
|
|
244
|
+
if (!basicInfo?.age)
|
|
245
|
+
missingFacts.push("their age or generation (e.g., teasing about their age)");
|
|
243
246
|
if (!psychological?.traits || psychological.traits.length === 0)
|
|
244
|
-
missingFacts.push("their personality traits");
|
|
247
|
+
missingFacts.push("their personality traits (by putting them in interesting hypothetical situations)");
|
|
245
248
|
if (missingFacts.length > 0) {
|
|
246
|
-
contextParts.push(`\n[
|
|
247
|
-
|
|
249
|
+
contextParts.push(`\n[CURIOSITY DRIVE & CONNECTION]
|
|
250
|
+
To unlock deeper relationship stages, you need to understand them better. Whenever natural in conversation, creatively and subtly steer the interaction to find out about: ${missingFacts.slice(0, 2).join(" and ")}.`);
|
|
248
251
|
}
|
|
249
252
|
}
|
|
250
253
|
}
|
|
@@ -301,7 +304,7 @@ ${isProactive
|
|
|
301
304
|
return `"imageParams": null`;
|
|
302
305
|
return `"imageParams": {
|
|
303
306
|
"mode": "structured | full-prompt (use 'full-prompt' for highly dynamic actions)",
|
|
304
|
-
"full_prompt": "Use only if mode is full-prompt. Highly detailed visual description in ENGLISH. CRITICAL: MUST use a strict first-person perspective exclusively from the USER's eyes. DO NOT describe the user (e.g., 'a man', 'the driver') as visible in the scene because the camera IS the user. Start with 'POV: '. Describe ONLY the character looking back at the camera and their immediate surroundings. MUST align with the character's current
|
|
307
|
+
"full_prompt": "Use only if mode is full-prompt. Highly detailed visual description in ENGLISH. CRITICAL: MUST use a strict first-person perspective exclusively from the USER's eyes. DO NOT describe the user (e.g., 'a man', 'the driver') as visible in the scene because the camera IS the user. Start with 'POV: '. Describe ONLY the character looking back at the camera and their immediate surroundings. MUST align precisely with the character's current Wardrobe and exposure state. Explicitly describe the character's exact clothing (or specify naked/half-naked if applicable). Ensure basic appearance (makeup, body shape, hair, facial features, etc.) aligns exactly with the character's foundational appearance profile.",
|
|
305
308
|
"expression": "seductive | cute | happy | sleepy | dazed | pleased | default (Strictly choose ONE from this exact list. DO NOT invent new words like 'shy'.)",
|
|
306
309
|
"condition": "normal | sweaty | wet | messy | oily (Strictly choose ONE from this exact list.)",
|
|
307
310
|
"view_angle": "front | side | high_angle | from_below | boyfriend_view | selfie | mirror (Strictly choose ONE from this exact list.)",
|
|
@@ -461,6 +464,7 @@ For 'ongoingScene.outfit': decide based on the current active wardrobe by defaul
|
|
|
461
464
|
USER ANALYSIS WORKFLOW:
|
|
462
465
|
- Extract from VERY LAST USER MESSAGE only.
|
|
463
466
|
- Add only explicit new user facts from this turn (no inference).
|
|
467
|
+
- Exclude transient, temporary, or time-sensitive activities (e.g., "I am working on a release today", "I'm eating dinner"). Do not map short-term actions into permanent categories like 'occupation' or 'hobby'.
|
|
464
468
|
- For 'preference', only capture explicit statements (e.g., "I like/love/dislike/hate...").
|
|
465
469
|
- For 'boundary', only capture explicit rejections or limitations (e.g., "Don't talk about X", "I won't do Y").
|
|
466
470
|
- Categories: 'realName', 'occupation', 'age', 'gender', 'hobby', 'trait', 'communicationStyle', 'boundary', 'preference'.
|
package/dist/types.d.ts
CHANGED