@botiverse/raft-daemon 1.0.5 → 1.0.6

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.
@@ -3984,6 +3984,22 @@ function clearClockTimeout(timeout) {
3984
3984
  }
3985
3985
 
3986
3986
  // ../shared/src/agentInbox.ts
3987
+ var NON_MEMBER_MENTION_REPLY_GUIDANCE = "[Raft notice: You were notified as a non-member, so you cannot reply in that channel. If no reply is needed, no action is required. Otherwise, DM the person who mentioned you or join the channel to participate.]";
3988
+ function projectAgentReplyAffordance(facts) {
3989
+ if (facts.non_member_mention !== true) return null;
3990
+ return {
3991
+ kind: "non_member_mention",
3992
+ guidance: NON_MEMBER_MENTION_REPLY_GUIDANCE
3993
+ };
3994
+ }
3995
+ function formatAgentReplyAffordance(facts) {
3996
+ return projectAgentReplyAffordance(facts)?.guidance ?? "";
3997
+ }
3998
+ function formatAgentReplyAffordanceSuffix(facts) {
3999
+ const guidance = formatAgentReplyAffordance(facts);
4000
+ return guidance ? `
4001
+ ${guidance}` : "";
4002
+ }
3987
4003
  function formatAgentInboxDelta(rows, options = {}) {
3988
4004
  const totalPendingMessages = options.totalPendingMessages;
3989
4005
  const header = typeof totalPendingMessages === "number" ? `Inbox update: ${totalPendingMessages} unread message${totalPendingMessages === 1 ? "" : "s"} total; ${rows.length === 0 ? "no" : rows.length} changed target${rows.length === 1 ? "" : "s"}` : `Inbox update: ${rows.length} changed target${rows.length === 1 ? "" : "s"}`;
@@ -4004,6 +4020,7 @@ function formatAgentInboxRowDetails(row) {
4004
4020
  }
4005
4021
  function formatAgentInboxFlag(flag) {
4006
4022
  if (flag === "mention") return "you were mentioned";
4023
+ if (flag === "non_member_mention") return formatAgentReplyAffordance({ non_member_mention: true });
4007
4024
  return flag;
4008
4025
  }
4009
4026
  function shortMessageId(value) {
@@ -6936,6 +6953,7 @@ function projectBucket(target, messages) {
6936
6953
  if (message.channel_type === "dm") flags.add("dm");
6937
6954
  if (message.task_number || message.task_status) flags.add("task");
6938
6955
  if (message.mentioned === true) flags.add("mention");
6956
+ if (message.non_member_mention === true) flags.add("non_member_mention");
6939
6957
  }
6940
6958
  const attentionHint = [...sorted].reverse().find((message) => message.attention_hint)?.attention_hint;
6941
6959
  return stripUndefined({
@@ -15651,7 +15669,7 @@ function formatIncomingMessage(message, options = {}) {
15651
15669
  const lineageSuffix = formatProducerFactLineageBracket(message.producerFactId);
15652
15670
  const body = `[target=${target} msg=${msgId} time=${time}${senderType}] ${formatSenderHandle(message)}: ${message.content}${message.third_party_event ? `
15653
15671
  payload:
15654
- ${renderThirdPartyInertJson(message.third_party_event.payload)}` : ""}${attachSuffix}${taskSuffix}${lineageSuffix}`;
15672
+ ${renderThirdPartyInertJson(message.third_party_event.payload)}` : ""}${attachSuffix}${taskSuffix}${lineageSuffix}${formatAgentReplyAffordanceSuffix(message)}`;
15655
15673
  return threadJoinPrefix ? `${threadJoinPrefix}
15656
15674
  ${body}` : body;
15657
15675
  }
@@ -25630,7 +25648,7 @@ function resolveSlockCliPathOrEmpty(moduleUrl = import.meta.url) {
25630
25648
  }
25631
25649
  async function runBundledSlockCli(argv) {
25632
25650
  process.argv = [process.execPath, "slock", ...argv];
25633
- await import("./dist-ZPWMUCAK.js");
25651
+ await import("./dist-RESRARWP.js");
25634
25652
  }
25635
25653
  function detectRuntimes(tracer = noopTracer) {
25636
25654
  const ids = [];
package/dist/cli/index.js CHANGED
@@ -45570,6 +45570,22 @@ function createDaemonApiClient(transportOrOptions, maybeOptions = {}) {
45570
45570
 
45571
45571
  // ../shared/src/agentInbox.ts
45572
45572
  init_esm_shims();
45573
+ var NON_MEMBER_MENTION_REPLY_GUIDANCE = "[Raft notice: You were notified as a non-member, so you cannot reply in that channel. If no reply is needed, no action is required. Otherwise, DM the person who mentioned you or join the channel to participate.]";
45574
+ function projectAgentReplyAffordance(facts) {
45575
+ if (facts.non_member_mention !== true) return null;
45576
+ return {
45577
+ kind: "non_member_mention",
45578
+ guidance: NON_MEMBER_MENTION_REPLY_GUIDANCE
45579
+ };
45580
+ }
45581
+ function formatAgentReplyAffordance(facts) {
45582
+ return projectAgentReplyAffordance(facts)?.guidance ?? "";
45583
+ }
45584
+ function formatAgentReplyAffordanceSuffix(facts) {
45585
+ const guidance = formatAgentReplyAffordance(facts);
45586
+ return guidance ? `
45587
+ ${guidance}` : "";
45588
+ }
45573
45589
  function formatAgentInboxSnapshot(rows) {
45574
45590
  if (rows.length === 0) return "Inbox: empty";
45575
45591
  return [
@@ -45593,6 +45609,7 @@ function formatAgentInboxRowDetails(row) {
45593
45609
  }
45594
45610
  function formatAgentInboxFlag(flag) {
45595
45611
  if (flag === "mention") return "you were mentioned";
45612
+ if (flag === "non_member_mention") return formatAgentReplyAffordance({ non_member_mention: true });
45596
45613
  return flag;
45597
45614
  }
45598
45615
  function shortMessageId(value) {
@@ -51716,7 +51733,7 @@ ${renderThirdPartyInertJson(event.payload)}` : ""}`;
51716
51733
  const content = m.content ?? "";
51717
51734
  const attachSuffix = formatAttachmentSuffix(m.attachments);
51718
51735
  const taskSuffix = m.task_status ? ` [task #${m.task_number} status=${m.task_status}${formatTaskAssigneeSuffix(m.task_assignee_id, m.task_assignee_name)}]` : "";
51719
- return `[target=${target} msg=${msgId} time=${time3}${senderType}] ${formatSenderHandle(m)}: ${content}${attachSuffix}${taskSuffix}`;
51736
+ return `[target=${target} msg=${msgId} time=${time3}${senderType}] ${formatSenderHandle(m)}: ${content}${attachSuffix}${taskSuffix}${formatAgentReplyAffordanceSuffix(m)}`;
51720
51737
  }
51721
51738
  function formatMessages(messages) {
51722
51739
  if (messages.length === 0) return "No new messages.";
@@ -52067,6 +52084,9 @@ function formatMentionActionResults(action, results) {
52067
52084
  lines.push(` deduped: ${result2.dedupedResolutionIds.join(", ")}`);
52068
52085
  }
52069
52086
  }
52087
+ if (action === "notify" && results.some((result2) => result2.status === "queued" && result2.reason !== "already_queued")) {
52088
+ lines.push("", `Recipient guidance: ${formatAgentReplyAffordance({ non_member_mention: true })}`);
52089
+ }
52070
52090
  return `${lines.join("\n")}
52071
52091
  `;
52072
52092
  }
package/dist/core.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  stageAgentMigrationObjectStoreBundle,
37
37
  subscribeDaemonLogs,
38
38
  verifyAgentMigrationAdoptPlan
39
- } from "./chunk-Z46V66MW.js";
39
+ } from "./chunk-33F5EBC3.js";
40
40
  export {
41
41
  AGENT_MIGRATION_BUNDLE_SCHEMA_VERSION,
42
42
  AGENT_MIGRATION_CONTROL_SEAM_ENV,
@@ -45102,6 +45102,22 @@ function createDaemonApiClient(transportOrOptions, maybeOptions = {}) {
45102
45102
  };
45103
45103
  }
45104
45104
  init_esm_shims();
45105
+ var NON_MEMBER_MENTION_REPLY_GUIDANCE = "[Raft notice: You were notified as a non-member, so you cannot reply in that channel. If no reply is needed, no action is required. Otherwise, DM the person who mentioned you or join the channel to participate.]";
45106
+ function projectAgentReplyAffordance(facts) {
45107
+ if (facts.non_member_mention !== true) return null;
45108
+ return {
45109
+ kind: "non_member_mention",
45110
+ guidance: NON_MEMBER_MENTION_REPLY_GUIDANCE
45111
+ };
45112
+ }
45113
+ function formatAgentReplyAffordance(facts) {
45114
+ return projectAgentReplyAffordance(facts)?.guidance ?? "";
45115
+ }
45116
+ function formatAgentReplyAffordanceSuffix(facts) {
45117
+ const guidance = formatAgentReplyAffordance(facts);
45118
+ return guidance ? `
45119
+ ${guidance}` : "";
45120
+ }
45105
45121
  function formatAgentInboxSnapshot(rows) {
45106
45122
  if (rows.length === 0) return "Inbox: empty";
45107
45123
  return [
@@ -45125,6 +45141,7 @@ function formatAgentInboxRowDetails(row) {
45125
45141
  }
45126
45142
  function formatAgentInboxFlag(flag) {
45127
45143
  if (flag === "mention") return "you were mentioned";
45144
+ if (flag === "non_member_mention") return formatAgentReplyAffordance({ non_member_mention: true });
45128
45145
  return flag;
45129
45146
  }
45130
45147
  function shortMessageId(value) {
@@ -51084,7 +51101,7 @@ ${renderThirdPartyInertJson(event.payload)}` : ""}`;
51084
51101
  const content = m.content ?? "";
51085
51102
  const attachSuffix = formatAttachmentSuffix(m.attachments);
51086
51103
  const taskSuffix = m.task_status ? ` [task #${m.task_number} status=${m.task_status}${formatTaskAssigneeSuffix(m.task_assignee_id, m.task_assignee_name)}]` : "";
51087
- return `[target=${target} msg=${msgId} time=${time3}${senderType}] ${formatSenderHandle(m)}: ${content}${attachSuffix}${taskSuffix}`;
51104
+ return `[target=${target} msg=${msgId} time=${time3}${senderType}] ${formatSenderHandle(m)}: ${content}${attachSuffix}${taskSuffix}${formatAgentReplyAffordanceSuffix(m)}`;
51088
51105
  }
51089
51106
  function formatMessages(messages) {
51090
51107
  if (messages.length === 0) return "No new messages.";
@@ -51431,6 +51448,9 @@ function formatMentionActionResults(action, results) {
51431
51448
  lines.push(` deduped: ${result2.dedupedResolutionIds.join(", ")}`);
51432
51449
  }
51433
51450
  }
51451
+ if (action === "notify" && results.some((result2) => result2.status === "queued" && result2.reason !== "already_queued")) {
51452
+ lines.push("", `Recipient guidance: ${formatAgentReplyAffordance({ non_member_mention: true })}`);
51453
+ }
51434
51454
  return `${lines.join("\n")}
51435
51455
  `;
51436
51456
  }
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  DAEMON_CLI_USAGE,
4
4
  DaemonCore,
5
5
  parseDaemonCliArgs
6
- } from "./chunk-Z46V66MW.js";
6
+ } from "./chunk-33F5EBC3.js";
7
7
 
8
8
  // src/index.ts
9
9
  var parsedArgs = parseDaemonCliArgs(process.argv.slice(2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botiverse/raft-daemon",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "raft-daemon": "dist/raft-daemon.js",