@space3-npm/cybersoul-client 1.4.24 → 1.4.25

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
@@ -479,7 +479,8 @@ ${isProactive
479
479
  return `When generating a triggerEvent, you MUST provide a suitable 'triggerEvent.outfitId' if the VERY LAST USER MESSAGE explicitly asks for an outfit change, OR if the new activity implies a context/location shift that conflicts with the current outfit (e.g., currently in SLEEPWEAR at home but going outside). Otherwise, keep it null. When changing outfits, match it to the event's activity, environment, and relationship stage (e.g., CASUAL, COSTUME, INTIMATE, SLEEPWEAR, etc.).`;
480
480
  }
481
481
  getTriggerEventPolicyPrompt() {
482
- return `- Include 'triggerEvent' only if the VERY LAST USER MESSAGE proposes a new activity/hangout AND you accept the invitation, explicitly requests an outfit change AND you agree, or proposes intimate/romantic actions AND you agree; ignore older history. DO NOT include it if you decline or reject the proposal. ${this.getOutfitSelectionPrompt()}`;
482
+ return `- Include 'triggerEvent' only if the VERY LAST USER MESSAGE proposes a new activity/hangout AND you accept the invitation, explicitly requests an outfit change AND you agree, or proposes intimate/romantic actions AND you agree; ignore older history. DO NOT include it if you decline or reject the proposal.
483
+ REPETITION GATE (hard): Prior assistant turns that already auto-triggered an event are tagged with a [Triggered Event: ...] marker in '[CHAT HISTORY]'. If such a marker already exists for the SAME activity the VERY LAST USER MESSAGE is referring to (e.g. it is just acknowledging, hurrying, confirming, or continuing an already-accepted outing), set 'triggerEvent' to null. Only emit a NEW 'triggerEvent' when the user proposes a genuinely DIFFERENT activity that has not already been triggered. Do NOT re-trigger the same event just because the conversation continues. ${this.getOutfitSelectionPrompt()}`;
483
484
  }
484
485
  getOutfitAcquisitionPolicyPrompt() {
485
486
  return `- Outfit acquisition (giftOutfit): set 'giftOutfit' to { "descriptionText": "short outfit description" } when a genuinely NEW outfit (one that is NOT already in the Available Wardrobe) is obtained THIS turn, triggered by EITHER:
@@ -665,7 +666,8 @@ ${isProactive
665
666
  const content = typeof msg.content === 'string' ? msg.content : JSON.stringify(msg.content);
666
667
  const action = msg.actionText ? ` (${msg.actionText})` : "";
667
668
  const media = msg.mediaHint ? ` [${msg.mediaHint}]` : "";
668
- contextLines.push(`${speaker}:${action} ${content}${media}`);
669
+ const event = msg.eventHint ? ` [Triggered Event: ${msg.eventHint}]` : "";
670
+ contextLines.push(`${speaker}:${action} ${content}${media}${event}`);
669
671
  }
670
672
  return contextLines.join('\n');
671
673
  }
package/dist/types.d.ts CHANGED
@@ -31,6 +31,14 @@ export interface HistoryEntry {
31
31
  content: string;
32
32
  actionText?: string;
33
33
  mediaHint?: string;
34
+ /**
35
+ * Marker for assistant turns that already auto-triggered an event
36
+ * (e.g. an outing/hangout the character accepted). Surfaced in the
37
+ * transcript as a `[Triggered Event: ...]` tag so the dispatcher's
38
+ * trigger-event repetition gate can avoid re-triggering the same
39
+ * activity on later turns. Mirrors how `mediaHint` tags past media.
40
+ */
41
+ eventHint?: string;
34
42
  isProactive?: boolean;
35
43
  timestamp?: string | number | Date;
36
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@space3-npm/cybersoul-client",
3
- "version": "1.4.24",
3
+ "version": "1.4.25",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",