omni-notify-mcp 1.3.316 → 1.3.317

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.
@@ -12,7 +12,7 @@
12
12
  import { fileURLToPath } from "url";
13
13
  import { splitForNotify } from "./chunk.js";
14
14
  import { masterMuted } from "./notify.js";
15
- import { appendEvent, cliOwns, CONVERSATION_MUTED_MESSAGE, conversationRefusal, editOwed, GatewayError, listConversations, monotonicMs, openConversationOf, openConversationsOf, queueNoticeOf, readEvents, resolveProject, routeAsk, stopTargetOf, sendToConversation, startConversation, updateConversation, } from "./gateway/conversations.js";
15
+ import { appendEvent, isConsoleSession, CONVERSATION_MUTED_MESSAGE, conversationRefusal, editOwed, GatewayError, listConversations, monotonicMs, openConversationOf, openConversationsOf, queueNoticeOf, readEvents, resolveProject, routeAsk, stopTargetOf, sendToConversation, startConversation, updateConversation, } from "./gateway/conversations.js";
16
16
  import { SessionDriver } from "./gateway/sessionDriver.js";
17
17
  import { DEFAULT_PROVIDER } from "./gateway/provider.js";
18
18
  import { resendUndelivered, turnEnded } from "./gateway/mcpEvents.js";
@@ -28,7 +28,7 @@ const CHAT = {
28
28
  carries: (kind) => kind !== "returned",
29
29
  parts: (event) => (event.kind === "answer" ? splitForNotify(event.text) : [event.text]),
30
30
  };
31
- const MAILED_KINDS = new Set(["ask", "answer", "failed", "stopped"]);
31
+ const MAILED_KINDS = new Set(["answer", "failed", "stopped"]);
32
32
  /** An email thread: its one conversation, a stopped one resumed by the next reply; only what needs Meni is mailed, each whole. */
33
33
  const THREADS_ONE = (key) => listConversations().find((c) => c.chat === key);
34
34
  const MAIL = {
@@ -41,7 +41,7 @@ const MAIL = {
41
41
  };
42
42
  const CARRIAGE = { telegram: CHAT, slack: CHAT, discord: CHAT, teams: CHAT, ntfy: CHAT, sms: CHAT, email: MAIL };
43
43
  const COMMAND_RE = /^\/?(new|stop)(@\w+)?$/i;
44
- const FINAL_KINDS = new Set(["answer", "failed", "permission", "stopped", "archived", "deleted"]);
44
+ const FINAL_KINDS = new Set(["answer", "failed", "stopped", "archived", "deleted"]);
45
45
  function driverOptions() {
46
46
  const guardDir = fileURLToPath(new URL("../scripts/shared/", import.meta.url));
47
47
  // GATE: a stand-in CLI, a warm spare a test asks for, a smaller capacity and shorter idle, silent, stall and archive spells are read ONLY under NOTIFY_MCP_TEST_ENDPOINTS=1; without it the CLI is `claude`, the spare is kept, and the numbers are Meni's ten slots, his 30-minute idle spell, his 2- and 15-minute turn bounds and his 15-minute archive bound.
@@ -167,7 +167,7 @@ export class AgentGateway {
167
167
  }
168
168
  /** Acts on one addressed message. Resolves when its answer (or its failure) has been sent back. */
169
169
  async handle(key, platform, act, reply, origin = {}) {
170
- if (act.kind === "say" && listConversations(true).some((c) => cliOwns(c) && act.text.includes(c.id)))
170
+ if (act.kind === "say" && listConversations(true).some((c) => isConsoleSession(c) && act.text.includes(c.id)))
171
171
  return reply(CONSOLE_NOT_IN_CHAT);
172
172
  const arrived = monotonicMs();
173
173
  const carriage = CARRIAGE[platform];
@@ -1,9 +1,7 @@
1
1
  /**
2
- * The agent stream (#3402): the live feed of a conversation's agent — its thinking and its output as they arrive, told
3
- * apart — that an MCP caller attaches to instead of waiting for the finished reply alone. The session driver appends a
4
- * frame for every delta the CLI's own `stream_event` carries (`claudeProvider.ts` reads them; the CLI is started with
5
- * `--include-partial-messages`), beside a frame for the tool the turn is on and one for each discrete conversation
6
- * event, so a reader sees the whole turn in arrival order from one stream.
2
+ * The turn stream (#3402): the live feed of a conversation's turns — a frame for the tool a Codex turn is on and one for
3
+ * each discrete conversation event, in arrival order — that an MCP caller attaches to instead of the finished reply alone. A conversation whose
4
+ * own agent CLI is running is streamed from that CLI's console instead (#3845, `mcpDoor.ts`): its real screen bytes.
7
5
  *
8
6
  * The stream is served over the SAME authenticated gateway door as everything else (a Server-Sent Events route in
9
7
  * `restDoor.ts`) and is owned by the person, exactly as a native terminal is (#3370): the owner is the door's own