@okostream/mcp 0.13.0 → 0.13.1

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.
Files changed (2) hide show
  1. package/dist/server.js +11 -16
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -116291,7 +116291,7 @@ function sanitizeScopes(scopes) {
116291
116291
  }
116292
116292
 
116293
116293
  // build/version.js
116294
- var OKO_MCP_VERSION = "0.13.0";
116294
+ var OKO_MCP_VERSION = "0.13.1";
116295
116295
 
116296
116296
  // build/auth.js
116297
116297
  var state = null;
@@ -119908,13 +119908,16 @@ function registerLifecycleTools(server2) {
119908
119908
 
119909
119909
  // build/tools/live.js
119910
119910
  var CHAT_LIVE_SETTINGS = ["mode", "slowModeMs", "automodEnabled", "allowViewerLinks"];
119911
+ async function writeChatControl(eventId, mode) {
119912
+ await update(ref(rtdb, `events/${eventId}/ctrl`), { chatMode: mode, chatVisible: null });
119913
+ }
119911
119914
  function registerLiveTools(server2) {
119912
119915
  server2.registerTool("oko_get_live_state", {
119913
119916
  title: "Get live state",
119914
119917
  description: toolDescription({
119915
119918
  summary: "Read main RTDB live controls, aggregate analytics, and chat settings for an event.",
119916
119919
  args: ["eventId: event to inspect."],
119917
- returns: "eventId, agg metrics, ctrl live overrides, and chat settings (mode, slowModeMs, automodEnabled, allowViewerLinks, plus accepting \u2014 whether message intake is open right now, as the server enforces it).",
119920
+ returns: "eventId, agg metrics, ctrl live overrides, and chat settings (mode, slowModeMs, automodEnabled, allowViewerLinks, plus accepting \u2014 whether message intake is open right now, as the server enforces it). ctrl.chatMode is the live control for message intake: public, off, or absent (then the event's starting state blocks.chat.intake applies and accepting shows the result).",
119918
119921
  examples: ["Use during a webinar before changing live block visibility or starting/ending sessions."],
119919
119922
  notes: [
119920
119923
  "Live state does not carry the event team: to see who has access to an event and with which permissions, use oko_list_workspace_access on the event's workspace."
@@ -119949,7 +119952,7 @@ function registerLiveTools(server2) {
119949
119952
  returns: "eventId, block, and effective override value.",
119950
119953
  examples: ["Use visible=false to hide the CTA live; use visible=null to return to setup defaults."],
119951
119954
  notes: [
119952
- "block=chat with visible=false PAUSES message input: viewers keep seeing the chat history but cannot send. It does not hide the chat panel.",
119955
+ "block=chat controls MESSAGE SENDING, never the panel: visible=true OPENS sending (same as oko_set_chat_mode mode=public), visible=false PAUSES it (mode=off \u2014 viewers keep seeing the history but cannot send), visible=null returns the chat to its starting state (blocks.chat.intake). The panel itself is blocks.chat.enabled in oko_configure_blocks.",
119953
119956
  "Chat is the only block whose override the SERVER enforces: it is written as the chat mode and mirrored into the chat security rules, so a paused chat refuses messages from every client. The other four overrides are page presentation only \u2014 they change what viewers see, not what the server accepts.",
119954
119957
  "Live overrides sit on top of setup: a block disabled in setup (oko_configure_blocks enabled=false) stays absent whatever the override; visible=null returns an enabled block to its setup default. Use overrides for the live show, setup toggles for permanent changes."
119955
119958
  ]
@@ -119974,7 +119977,8 @@ function registerLiveTools(server2) {
119974
119977
  cards: setupBlocks.cards?.enabled === true,
119975
119978
  placeholder: setupBlocks.video?.placeholder?.enabled === true
119976
119979
  };
119977
- const hints = setupEnabled[block] ? [visible === null ? "Override removed: the block follows its setup visibility again." : `Live override applied on top of setup; visible=null returns the ${block} block to its setup default.`] : [`The ${block} block is disabled in setup, so this live override has no visible effect until it is enabled (${block === "cards" ? "oko_configure_cards enabled=true" : "oko_configure_blocks"}).`];
119980
+ const chatHint = visible === null ? "Live control cleared: message intake follows the starting state (blocks.chat.intake)." : visible ? "Message sending is open (chat mode public); the panel was not touched." : "Message sending is paused (chat mode off); history stays visible, the panel was not touched.";
119981
+ const hints = !setupEnabled[block] ? [`The ${block} block is disabled in setup, so this live override has no visible effect until it is enabled (${block === "cards" ? "oko_configure_cards enabled=true" : "oko_configure_blocks"}).`] : block === "chat" ? [chatHint] : [visible === null ? "Override removed: the block follows its setup visibility again." : `Live override applied on top of setup; visible=null returns the ${block} block to its setup default.`];
119978
119982
  const paths = {
119979
119983
  chat: "chatVisible",
119980
119984
  banner: "bannerVisible",
@@ -119983,16 +119987,7 @@ function registerLiveTools(server2) {
119983
119987
  placeholder: "placeholderVisible"
119984
119988
  };
119985
119989
  if (block === "chat") {
119986
- const modeRef = ref(rtdb, `events/${eventId}/ctrl/chatMode`);
119987
- const patch = { chatVisible: null };
119988
- if (visible === null || visible === false) {
119989
- patch.chatMode = visible === false ? "off" : null;
119990
- } else {
119991
- const current = await get(modeRef);
119992
- if (current.val() === "off")
119993
- patch.chatMode = null;
119994
- }
119995
- await update(ref(rtdb, `events/${eventId}/ctrl`), patch);
119990
+ await writeChatControl(eventId, visible === null ? null : visible ? "public" : "off");
119996
119991
  return textResult({ eventId, block, visible, hints });
119997
119992
  }
119998
119993
  const target = ref(rtdb, `events/${eventId}/ctrl/${paths[block]}`);
@@ -120077,7 +120072,7 @@ function registerLiveTools(server2) {
120077
120072
  examples: ['Use mode="off" to pause a chat storm; use mode="public" to reopen.'],
120078
120073
  notes: [
120079
120074
  '\u{1F534} "Turn off the chat" means one of TWO different things. THIS tool stops new messages: the panel stays on the page, history stays readable, nothing changes for the audience except the input. The other one \u2014 oko_configure_blocks with chat.enabled=false \u2014 HIDES the whole panel (history is kept for 90 days and returns when re-enabled), which is a page-layout decision, not a live-show one. When the organizer says "turn off the chat", "close the chat", "stop the chat", "mute the chat", "disable chat" during or after a webinar, they almost always mean THIS tool. Ask before hiding the panel.',
120080
- 'This is the full replacement for the legacy pause via oko_set_block_visibility(block="chat"): prefer oko_set_chat_mode.',
120075
+ 'oko_set_block_visibility(block="chat") writes this same state (visible=true \u2192 public, false \u2192 off, null \u2192 starting state); prefer this tool for the chat, it says what it does.',
120081
120076
  "There are no other levels: the server has exactly two states, sending open or closed. History is always visible; the mode never restricts who can read or hides anyone's messages."
120082
120077
  ]
120083
120078
  }),
@@ -120095,7 +120090,7 @@ function registerLiveTools(server2) {
120095
120090
  const { uid } = await authed(["live:control"]);
120096
120091
  await readEvent(eventId, uid, "live");
120097
120092
  requireConfirm(confirm, "oko_set_chat_mode", { eventId, mode });
120098
- await update(ref(rtdb, `events/${eventId}/ctrl`), { chatMode: mode, chatVisible: null });
120093
+ await writeChatControl(eventId, mode);
120099
120094
  return textResult({ eventId, mode });
120100
120095
  });
120101
120096
  server2.registerTool("oko_force_viewer_reload", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okostream/mcp",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Control OKO Stream webinars from Claude, Codex, and other MCP clients.",
5
5
  "license": "UNLICENSED",
6
6
  "author": {