privateboard 0.1.17 → 0.1.19

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/boot.js CHANGED
@@ -994,6 +994,18 @@ function parseVoice(raw) {
994
994
  if (typeof obj.speed === "number" && Number.isFinite(obj.speed)) out.speed = obj.speed;
995
995
  if (typeof obj.pitch === "number" && Number.isFinite(obj.pitch)) out.pitch = obj.pitch;
996
996
  if (typeof obj.volume === "number" && Number.isFinite(obj.volume)) out.volume = obj.volume;
997
+ if (typeof obj.emotion === "string" && obj.emotion.trim()) {
998
+ out.emotion = obj.emotion.trim();
999
+ }
1000
+ if (typeof obj.modifyPitch === "number" && Number.isFinite(obj.modifyPitch)) {
1001
+ out.modifyPitch = obj.modifyPitch;
1002
+ }
1003
+ if (typeof obj.modifyIntensity === "number" && Number.isFinite(obj.modifyIntensity)) {
1004
+ out.modifyIntensity = obj.modifyIntensity;
1005
+ }
1006
+ if (typeof obj.modifyTimbre === "number" && Number.isFinite(obj.modifyTimbre)) {
1007
+ out.modifyTimbre = obj.modifyTimbre;
1008
+ }
997
1009
  if (typeof obj.instructions === "string" && obj.instructions.trim()) {
998
1010
  out.instructions = obj.instructions.trim().slice(0, 500);
999
1011
  }
@@ -1178,6 +1190,13 @@ function serializeVoice(v) {
1178
1190
  ...typeof v.speed === "number" && Number.isFinite(v.speed) ? { speed: Math.max(0.5, Math.min(2, v.speed)) } : {},
1179
1191
  ...typeof v.pitch === "number" && Number.isFinite(v.pitch) ? { pitch: Math.max(-12, Math.min(12, v.pitch)) } : {},
1180
1192
  ...typeof v.volume === "number" && Number.isFinite(v.volume) ? { volume: Math.max(0, Math.min(2, v.volume)) } : {},
1193
+ // Emotion + voice_modify fine-tuning fields. Without these the
1194
+ // route layer accepts the patch but the storage layer silently
1195
+ // drops them, so settings disappear on the next page load.
1196
+ ...typeof v.emotion === "string" && v.emotion.trim() ? { emotion: v.emotion.trim() } : {},
1197
+ ...typeof v.modifyPitch === "number" && Number.isFinite(v.modifyPitch) ? { modifyPitch: Math.max(-100, Math.min(100, v.modifyPitch)) } : {},
1198
+ ...typeof v.modifyIntensity === "number" && Number.isFinite(v.modifyIntensity) ? { modifyIntensity: Math.max(-100, Math.min(100, v.modifyIntensity)) } : {},
1199
+ ...typeof v.modifyTimbre === "number" && Number.isFinite(v.modifyTimbre) ? { modifyTimbre: Math.max(-100, Math.min(100, v.modifyTimbre)) } : {},
1181
1200
  ...v.instructions && v.instructions.trim() ? { instructions: v.instructions.trim().slice(0, 500) } : {}
1182
1201
  });
1183
1202
  }
@@ -7252,7 +7271,7 @@ function agentsRouter() {
7252
7271
  }
7253
7272
  const b = body ?? {};
7254
7273
  const description = typeof b.description === "string" ? b.description.trim() : "";
7255
- if (description.length < 4) {
7274
+ if (description.length < 2) {
7256
7275
  return c.json({ error: "describe the director in at least a few words" }, 400);
7257
7276
  }
7258
7277
  if (description.length > 1200) {
@@ -7344,7 +7363,7 @@ function agentsRouter() {
7344
7363
  }
7345
7364
  const b = body ?? {};
7346
7365
  const description = typeof b.description === "string" ? b.description.trim() : "";
7347
- if (description.length < 4) {
7366
+ if (description.length < 2) {
7348
7367
  return c.json({ error: "describe the director in at least a few words" }, 400);
7349
7368
  }
7350
7369
  if (description.length > 1200) {
@@ -7644,6 +7663,15 @@ function agentsRouter() {
7644
7663
  ...typeof v.speed === "number" ? { speed: v.speed } : {},
7645
7664
  ...typeof v.pitch === "number" ? { pitch: v.pitch } : {},
7646
7665
  ...typeof v.volume === "number" ? { volume: v.volume } : {},
7666
+ // Emotion + voice_modify fine-tuning fields. Previously these
7667
+ // were dropped at the route layer, so the agent-profile UI
7668
+ // could call PATCH /api/agents/:id with `voice.emotion` set
7669
+ // and the server would persist the voice WITHOUT the emotion,
7670
+ // making it look like the setting failed to save.
7671
+ ...typeof v.emotion === "string" ? { emotion: v.emotion } : {},
7672
+ ...typeof v.modifyPitch === "number" ? { modifyPitch: v.modifyPitch } : {},
7673
+ ...typeof v.modifyIntensity === "number" ? { modifyIntensity: v.modifyIntensity } : {},
7674
+ ...typeof v.modifyTimbre === "number" ? { modifyTimbre: v.modifyTimbre } : {},
7647
7675
  ...typeof v.instructions === "string" ? { instructions: v.instructions } : {}
7648
7676
  };
7649
7677
  }
@@ -23311,7 +23339,7 @@ function voicesRouter() {
23311
23339
  init_paths();
23312
23340
 
23313
23341
  // src/version.ts
23314
- var VERSION = "0.1.17";
23342
+ var VERSION = "0.1.19";
23315
23343
 
23316
23344
  // src/server.ts
23317
23345
  function createApp() {