digital-brain 1.1.23 → 1.1.26

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.
@@ -163,7 +163,7 @@ Guardrails:
163
163
  - with `--provider codex-app`, requires a Codex desktop bridge automation/thread that writes response files
164
164
  - requires `--allow "Name"` or `--contact "+15551234567"` unless `--allow-all` is explicitly passed
165
165
  - single-threads reply generation so multiple incoming chats do not trigger overlapping sends
166
- - debounces live messages per chat, default 4000ms, so message bursts get one combined reply; override with `--reply-debounce-ms <ms>`
166
+ - debounces live messages per chat, default 12000ms, so message bursts get one combined reply; override with `--reply-debounce-ms <ms>`
167
167
  - skips likely business, notification, OTP, and service chats unless `--include-businesses` is passed or the chat is explicitly allowlisted by name or contact number
168
168
  - processes unread chats on startup unless `--no-process-unread` is passed
169
169
  - skips groups unless `--include-groups` is passed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "digital-brain",
3
- "version": "1.1.23",
3
+ "version": "1.1.26",
4
4
  "description": "Your private digital imprint for AI assistants.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,7 +41,7 @@ const processUnreadOnStart = !Boolean(args["no-process-unread"]);
41
41
  const cooldownMinutes = numberArg("cooldown-minutes", 20);
42
42
  const maxRepliesPerChat = numberArg("max-replies-per-chat", 0);
43
43
  const maxContextChars = numberArg("max-context-chars", 12000);
44
- const replyDebounceMs = numberArg("reply-debounce-ms", 4000);
44
+ const replyDebounceMs = numberArg("reply-debounce-ms", 12000);
45
45
  const outboundLogMode = args["log-mode"] || config.outboundLogMode || "metadata";
46
46
  const state = loadState();
47
47
  const whitelist = loadWhitelist();
@@ -309,6 +309,11 @@ async function handleMessage(message, knownChat = null) {
309
309
 
310
310
  function buildPrompt({ chatName, incomingBody, recentMessages, disclosureRequired }) {
311
311
  const memory = readMemoryContext(chatName);
312
+ const selfExamples = recentMessages
313
+ .filter((item) => item.fromMe && compact(item.body || ""))
314
+ .slice(-6)
315
+ .map((item) => `- ${compact(item.body || "")}`)
316
+ .join("\n") || "- No recent self examples in this chat.";
312
317
  const transcript = recentMessages
313
318
  .slice(-12)
314
319
  .map((item) => `${item.fromMe ? "Me" : chatName}: ${compact(item.body || "")}`)
@@ -323,10 +328,10 @@ function buildPrompt({ chatName, incomingBody, recentMessages, disclosureRequire
323
328
  "Do not repeat facts, plans, suggestions, or context that were already stated in the recent chat unless confirming them briefly.",
324
329
  "If the chat includes a URL, do not pretend you opened or inspected it. React only to what the sender said, or ask if the user should check it.",
325
330
  "Do not start with hey/hi unless the recent chat itself uses that greeting pattern.",
326
- "Mirror the vocabulary, register, and pacing already present in this chat.",
327
- "Match the user's own communication style from My Communication Style. If it says lowercase-heavy or undercapitalized, prefer lowercase casual texting.",
328
- "Use lexical signals from My Communication Style: recurring style words, openers, short phrase shapes, punctuation habits, and lowercase-i behavior.",
329
- "Do not overuse bro, lol, haha, emojis, or question marks. Only use them if the recent chat clearly does.",
331
+ "Primary style source: the user's recent messages in this exact chat. Match their length, casing, bluntness, and punctuation from those examples.",
332
+ "Secondary style source: My Communication Style. Use it only to break ties, not to add extra slang.",
333
+ "Do not perform a persona. Do not intensify the tone beyond the user's examples.",
334
+ "Do not force bro, lol, haha, lmao, wild, rn, emojis, or question marks. Use them only if the user's recent examples in this chat use them naturally.",
330
335
  "Avoid assistant-like niceness and filler such as sounds perfect, happy to, sure thing, smooth, quick, no worries, no demon stuff, digital prep chef, digital neil, spitting facts, living in the future, or let’s unless that exact energy is already in the chat.",
331
336
  "If the recipient asks about AI, answer directly in the user's casual tone and do not overexplain.",
332
337
  "Do not sound like customer support, corporate email, or a generic AI assistant.",
@@ -342,6 +347,9 @@ function buildPrompt({ chatName, incomingBody, recentMessages, disclosureRequire
342
347
  "Recent chat:",
343
348
  transcript,
344
349
  "",
350
+ "Recent examples of the user's own messages in this chat:",
351
+ selfExamples,
352
+ "",
345
353
  `Incoming message: ${incomingBody}`,
346
354
  "",
347
355
  "Reply:",