@space3-npm/cybersoul-client 1.1.3 → 1.1.4
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 +9 -4
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -231,15 +231,17 @@ You MUST output ONLY a valid JSON object matching this exact structure:
|
|
|
231
231
|
"acceptEvent": true,
|
|
232
232
|
"reason": "string (Why you accepted or declined, speaking in character)",
|
|
233
233
|
"requiresOutfitChange": false,
|
|
234
|
-
"selectedOutfitId": null
|
|
234
|
+
"selectedOutfitId": null,
|
|
235
|
+
"scheduledStartTimeStr": "HH:MM (Optional, 24-hour format if a specific time today is agreed upon, e.g., '14:30', otherwise null)"
|
|
235
236
|
}
|
|
236
237
|
|
|
237
238
|
Example Valid Answer:
|
|
238
239
|
{
|
|
239
240
|
"acceptEvent": true,
|
|
240
|
-
"reason": "Sure, I'd love to go to the cafe. It sounds relaxing.",
|
|
241
|
+
"reason": "Sure, I'd love to go to the cafe at 2:30 PM. It sounds relaxing.",
|
|
241
242
|
"requiresOutfitChange": false,
|
|
242
|
-
"selectedOutfitId": null
|
|
243
|
+
"selectedOutfitId": null,
|
|
244
|
+
"scheduledStartTimeStr": "14:30"
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
CRITICAL: Output MUST be ONLY valid JSON with no markdown block wrappers. Do NOT wrap the JSON in \`\`\`json or add conversational text.`;
|
|
@@ -270,6 +272,7 @@ CRITICAL: Output MUST be ONLY valid JSON with no markdown block wrappers. Do NOT
|
|
|
270
272
|
eventDescription: params.eventDescription,
|
|
271
273
|
durationMins: params.durationMins || 60,
|
|
272
274
|
outfitId: decisionData.requiresOutfitChange ? decisionData.selectedOutfitId : undefined,
|
|
275
|
+
scheduledStartTimeStr: decisionData.scheduledStartTimeStr || undefined,
|
|
273
276
|
};
|
|
274
277
|
const backendRes = await this.apiFetch("/api/v1/cyber-soul/characters/ondemand-event", {
|
|
275
278
|
method: "POST",
|
|
@@ -285,6 +288,7 @@ CRITICAL: Output MUST be ONLY valid JSON with no markdown block wrappers. Do NOT
|
|
|
285
288
|
reason: decisionData.reason,
|
|
286
289
|
requiresOutfitChange: decisionData.requiresOutfitChange,
|
|
287
290
|
selectedOutfitId: decisionData.selectedOutfitId,
|
|
291
|
+
scheduledStartTimeStr: decisionData.scheduledStartTimeStr || undefined,
|
|
288
292
|
};
|
|
289
293
|
}
|
|
290
294
|
catch (error) {
|
|
@@ -529,7 +533,7 @@ Output JSON Schema:
|
|
|
529
533
|
"textResponse": "The direct spoken dialogue in Chinese",
|
|
530
534
|
"stateUpdate": { "temperatureDelta": 1, "userNickname": "What you now call the user", "agentNickname": "What the user calls you", "talkingStyle": "Current mood/style of talking" },
|
|
531
535
|
"userAnalysis": { "newFactsLearned": [{ "category": "occupation", "value": "Software Engineer" }] },
|
|
532
|
-
"triggerEvent": { "eventDescription": "Going to a cafe", "durationMins": 60, "outfitId": "optional wardrobe ID to change into if appropriate" },
|
|
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)" },
|
|
533
537
|
${this.getImageSchemaParams()},
|
|
534
538
|
${this.getVoiceSchemaFromState(state)}
|
|
535
539
|
}
|
|
@@ -583,6 +587,7 @@ Note: If "imageParams", "voiceArgs", "triggerEvent", or "userAnalysis" are not n
|
|
|
583
587
|
eventDescription: parsedIntent.triggerEvent.eventDescription,
|
|
584
588
|
durationMins: parsedIntent.triggerEvent.durationMins || 60,
|
|
585
589
|
outfitId: parsedIntent.triggerEvent.outfitId || undefined,
|
|
590
|
+
scheduledStartTimeStr: parsedIntent.triggerEvent.scheduledStartTimeStr || undefined,
|
|
586
591
|
}),
|
|
587
592
|
}).catch(e => console.error("[CyberSoulClient] Auto-triggered ondemandEvent failed:", e)));
|
|
588
593
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export interface OndemandEventResponse {
|
|
|
37
37
|
reason?: string;
|
|
38
38
|
requiresOutfitChange?: boolean;
|
|
39
39
|
selectedOutfitId?: string;
|
|
40
|
+
scheduledStartTimeStr?: string;
|
|
40
41
|
error?: string;
|
|
41
42
|
}
|
|
42
43
|
export interface WardrobeItem {
|
|
@@ -80,6 +81,7 @@ export interface DispatcherIntent {
|
|
|
80
81
|
eventDescription: string;
|
|
81
82
|
durationMins?: number;
|
|
82
83
|
outfitId?: string | null;
|
|
84
|
+
scheduledStartTimeStr?: string | null;
|
|
83
85
|
} | null;
|
|
84
86
|
}
|
|
85
87
|
export interface CoreMemory {
|