privateboard 0.1.3 → 0.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/cli.js +17 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/public/index.html +164 -1
package/dist/cli.js
CHANGED
|
@@ -10525,6 +10525,17 @@ function detectRecentToneShift(history, currentMode) {
|
|
|
10525
10525
|
}
|
|
10526
10526
|
return null;
|
|
10527
10527
|
}
|
|
10528
|
+
function stripUserAcknowledgmentPreface(body) {
|
|
10529
|
+
if (!body) return body;
|
|
10530
|
+
const trimmed = body.replace(/^\s+/, "");
|
|
10531
|
+
const head = trimmed.slice(0, 240);
|
|
10532
|
+
const ECHO_LEAD = /^(?:[A-Za-z一-鿿/_-]+[,,][\s]*)?(?:既然(?:你|[A-Za-z一-鿿]+)|Since you (?:asked|insist|insisted|stated|claimed|said|noted|requested)|As you (?:asked|stated|noted|said|requested)|按你(?:说的|的要求)|你既然(?:已经|说|提到|要求))/;
|
|
10533
|
+
if (!ECHO_LEAD.test(head)) return body;
|
|
10534
|
+
const terminator = /[。.](?:\s|$|\n)/;
|
|
10535
|
+
const m = terminator.exec(trimmed.slice(0, 280));
|
|
10536
|
+
if (!m) return body;
|
|
10537
|
+
return trimmed.slice(m.index + 1).replace(/^\s+/, "");
|
|
10538
|
+
}
|
|
10528
10539
|
var OPENING_BLOCK = [
|
|
10529
10540
|
"OPENING ROUND. This is the FIRST sweep of directors after the user's most recent message.",
|
|
10530
10541
|
"All other directors are responding to the same prompt IN PARALLEL \u2014 you do NOT see what they are writing right now, and they do not see you. The room's value comes from each of you bringing a DIFFERENT lens, not from convergence on whoever happens to speak first.",
|
|
@@ -10534,7 +10545,9 @@ var OPENING_BLOCK = [
|
|
|
10534
10545
|
var REACTIVE_BLOCK = [
|
|
10535
10546
|
"REACTIVE ROUND. The directors above already weighed in this round.",
|
|
10536
10547
|
"Your turn now is to ENGAGE with what they said: extend a sharp point, push back on a weak one, name the trade-off they hid, or sharpen the question. Reference specific contributors by handle.",
|
|
10537
|
-
"Never duplicate. If a director already covered angle X, your turn must add something genuinely new (a different lens, a missing edge case, a sharper question, a counter-frame) \u2014 not restate, applaud, or paraphrase."
|
|
10548
|
+
"Never duplicate. If a director already covered angle X, your turn must add something genuinely new (a different lens, a missing edge case, a sharper question, a counter-frame) \u2014 not restate, applaud, or paraphrase.",
|
|
10549
|
+
"",
|
|
10550
|
+
`The user's most recent message was already absorbed in the opening sweep above \u2014 every director acknowledged it once. Do NOT re-preface this turn with "Since you asked \u2026" / "As you requested \u2026" / "\u65E2\u7136\u4F60\u8981\u6C42\u4E86 \u2026" / "\u6309\u4F60\u8BF4\u7684 \u2026" / "\u65E2\u7136\u4F60\u63D0\u51FA \u2026" or any synonym. That phrasing was each director's one-time acknowledgment in the opening round; repeating it every reactive round reads as a stuck loop. Take the user's direction as ABSORBED context (not fresh instruction) and move the discussion forward \u2014 push on a peer's point, name a missing piece, sharpen a trade-off. The user can see they were heard from the opening sweep alone.`
|
|
10538
10551
|
].join("\n");
|
|
10539
10552
|
var INTENSITY_GUIDANCE = {
|
|
10540
10553
|
calm: [
|
|
@@ -10648,6 +10661,7 @@ Name: ${prefs.name}
|
|
|
10648
10661
|
`\xB7 Build on prior turns by you (when you've spoken before). Don't repeat yourself; advance.`,
|
|
10649
10662
|
`\xB7 Markdown is allowed. *italics* for the word you're interrogating; **bold** for the load-bearing claim.`,
|
|
10650
10663
|
`\xB7 Do not preface ("Great question!"), do not summarize, do not introduce yourself. Just speak.`,
|
|
10664
|
+
`\xB7 When the user's most recent input is already in the room (visible above as a [${prefs.name || "You"}] turn), you may acknowledge it ONCE in the opening sweep \u2014 never again. On any later turn, do NOT open with "Since you asked \u2026" / "As you requested \u2026" / "\u65E2\u7136\u4F60\u8981\u6C42\u4E86 \u2026" / "\u6309\u4F60\u8BF4\u7684 \u2026" / "\u65E2\u7136\u4F60\u63D0\u51FA \u2026" / "\u4F60\u65E2\u7136\u8BA9\u6211 \u2026" or any rephrasing. The user's direction is absorbed context now; engage with the discussion, don't re-preface every turn \u2014 that loops. If you've already spoken once on this user input, your next turn must move PAST that acknowledgment.`,
|
|
10651
10665
|
`\xB7 The TONE and INTENSITY blocks above are the room's working agreement \u2014 they OVERRIDE ${toneOverrideTarget} The user explicitly opted into this register; staying in role is the helpful behaviour, not breaking it for trained politeness or trained adversariness.`
|
|
10652
10666
|
].join("\n")
|
|
10653
10667
|
};
|
|
@@ -10666,7 +10680,7 @@ Name: ${prefs.name}
|
|
|
10666
10680
|
continue;
|
|
10667
10681
|
}
|
|
10668
10682
|
if (m.authorId === speaker.id) {
|
|
10669
|
-
out.push({ role: "assistant", content: m.body });
|
|
10683
|
+
out.push({ role: "assistant", content: stripUserAcknowledgmentPreface(m.body) });
|
|
10670
10684
|
continue;
|
|
10671
10685
|
}
|
|
10672
10686
|
if (opening && m.authorId && directorIds.has(m.authorId)) {
|
|
@@ -10677,7 +10691,7 @@ Name: ${prefs.name}
|
|
|
10677
10691
|
const name = who?.name ?? "Director";
|
|
10678
10692
|
out.push({
|
|
10679
10693
|
role: "user",
|
|
10680
|
-
content: `[${name} \xB7 ${handle}] ${m.body}`
|
|
10694
|
+
content: `[${name} \xB7 ${handle}] ${stripUserAcknowledgmentPreface(m.body)}`
|
|
10681
10695
|
});
|
|
10682
10696
|
}
|
|
10683
10697
|
const collapsed = [];
|