@okostream/mcp 0.12.15 → 0.12.16
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/server.js +23 -9
- 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.12.
|
|
116294
|
+
var OKO_MCP_VERSION = "0.12.16";
|
|
116295
116295
|
|
|
116296
116296
|
// build/auth.js
|
|
116297
116297
|
var state = null;
|
|
@@ -118812,7 +118812,7 @@ function registerEventTools(server2) {
|
|
|
118812
118812
|
returns: "event document fields plus id and public event URL. The event's access composition (the historical uid arrays) is never returned; ask oko_list_workspace_access for who has access.",
|
|
118813
118813
|
examples: ["Use after oko_create_webinar to verify setup and return the event URL to the user."],
|
|
118814
118814
|
notes: [
|
|
118815
|
-
"blocks.chat.
|
|
118815
|
+
"blocks.chat: the panel exists exactly when blocks.chat.enabled is true. blocks.chat.intake says whether it ACCEPTS MESSAGES before anyone touches the live control \u2014 closed (default), open, schedule (at the event time), or session (while an analytics session runs); oko_set_chat_mode overrides it live. blocks.chat.mode and blocks.chat.visibility are legacy and read by nobody \u2014 ignore those two."
|
|
118816
118816
|
]
|
|
118817
118817
|
}),
|
|
118818
118818
|
inputSchema: { eventId: eventIdField },
|
|
@@ -118857,7 +118857,7 @@ function registerEventTools(server2) {
|
|
|
118857
118857
|
"workspaceId: optional workspace id; omitted means personal workspace.",
|
|
118858
118858
|
"videoUrl: optional iframe/source/player URL; normalized by OKO.",
|
|
118859
118859
|
"eventDate: optional ISO datetime.",
|
|
118860
|
-
"chatEnabled: whether the chat block is
|
|
118860
|
+
"chatEnabled: whether the chat block is on the page at creation. It does NOT open message sending: a new event starts with intake closed, so the chat is visible and silent until the organizer opens it (oko_set_chat_mode) or sets blocks.chat.intake."
|
|
118861
118861
|
],
|
|
118862
118862
|
returns: "new event id, public event URL, and workspaceId.",
|
|
118863
118863
|
examples: ["Use for a complete create flow, then call oko_configure_blocks and oko_get_event."],
|
|
@@ -118870,7 +118870,7 @@ function registerEventTools(server2) {
|
|
|
118870
118870
|
eventDate: external_exports.string().datetime().nullable().optional().describe("Optional webinar datetime in ISO format."),
|
|
118871
118871
|
speakerName: external_exports.string().max(160).nullable().optional().describe("Optional speaker display name."),
|
|
118872
118872
|
description: external_exports.string().max(3e3).nullable().optional().describe('Optional event description shown under the speaker name. Omit or pass "" for none; the literal text "null" is rejected.'),
|
|
118873
|
-
chatEnabled: external_exports.boolean().default(false).describe("Whether the chat block
|
|
118873
|
+
chatEnabled: external_exports.boolean().default(false).describe("Whether the chat block is on the page at creation; message sending stays closed until opened.")
|
|
118874
118874
|
},
|
|
118875
118875
|
outputSchema: createWebinarOutputSchema,
|
|
118876
118876
|
annotations: writeTool
|
|
@@ -118984,6 +118984,7 @@ function registerEventTools(server2) {
|
|
|
118984
118984
|
returns: "event id and the list of Firestore fields updated.",
|
|
118985
118985
|
examples: ["Use after oko_create_webinar to enable chat, bind a CTA/form, and configure other audience blocks."],
|
|
118986
118986
|
notes: [
|
|
118987
|
+
'\u{1F534} "Turn off the chat" is ambiguous, and the two meanings are not close. chat.enabled=false REMOVES the chat block from the page together with every message people wrote \u2014 irreversible for the audience, and almost never what someone asks for mid-webinar. Stopping new messages is a different tool: oko_set_chat_mode with mode="off" leaves the block and the whole history in place. When the organizer says "turn off the chat", "close the chat", "stop the chat", "disable chat", assume they mean the mode, and ASK before removing the block. The same trap in reverse: "turn the chat back on" after a pause means mode="public", not this field.',
|
|
118987
118988
|
"A block toggle and its image are independent: enabling a block here works with an image already uploaded via oko_upload_image, and uploading an image never enables the block by itself.",
|
|
118988
118989
|
"promoBanner has no text field by design: the banner is image+link. blocks.promoBanner.text seen in event documents is legacy and is never rendered on the event page.",
|
|
118989
118990
|
'videoPlaceholder.enabled only allows the placeholder; viewers see it after oko_set_block_visibility with block "placeholder" and visible true (a live override, stored outside the event document). Chat, CTA, banner and cards appear as soon as they are enabled here.',
|
|
@@ -118994,7 +118995,11 @@ function registerEventTools(server2) {
|
|
|
118994
118995
|
}),
|
|
118995
118996
|
inputSchema: {
|
|
118996
118997
|
eventId: eventIdField,
|
|
118997
|
-
chat: external_exports.object({
|
|
118998
|
+
chat: external_exports.object({
|
|
118999
|
+
enabled: external_exports.boolean().optional().describe("Whether the chat block is ON THE PAGE. false removes it together with the message history \u2014 see the note above before using it."),
|
|
119000
|
+
intake: external_exports.enum(["closed", "open", "schedule", "session"]).optional().describe("When the chat starts accepting messages before any live override: closed (default \u2014 visible and silent until opened), open, schedule (at the event time), session (while an analytics session runs)."),
|
|
119001
|
+
visibility: external_exports.enum(["always", "hidden"]).optional()
|
|
119002
|
+
}).optional(),
|
|
118998
119003
|
promoBanner: external_exports.object({ enabled: external_exports.boolean().optional(), link: external_exports.string().max(1e3).optional(), visibility: external_exports.enum(["always", "hidden"]).optional(), formId: external_exports.string().nullable().optional() }).optional(),
|
|
118999
119004
|
primaryCta: external_exports.object({ enabled: external_exports.boolean().optional(), visibility: external_exports.enum(["always", "hidden"]).optional(), title: external_exports.string().nullable().optional(), text: external_exports.string().nullable().optional(), buttonLabel: external_exports.string().nullable().optional(), buttonUrl: external_exports.string().nullable().optional(), formId: external_exports.string().nullable().optional() }).optional(),
|
|
119000
119005
|
videoPlaceholder: external_exports.object({ enabled: external_exports.boolean().optional(), mode: external_exports.enum(["glass", "image"]).optional(), title: external_exports.string().nullable().optional(), subtitle: external_exports.string().nullable().optional(), showTimer: external_exports.boolean().optional() }).optional(),
|
|
@@ -119013,6 +119018,8 @@ function registerEventTools(server2) {
|
|
|
119013
119018
|
const patch = {};
|
|
119014
119019
|
if (args.chat?.enabled !== void 0)
|
|
119015
119020
|
patch["blocks.chat.enabled"] = args.chat.enabled;
|
|
119021
|
+
if (args.chat?.intake !== void 0)
|
|
119022
|
+
patch["blocks.chat.intake"] = args.chat.intake;
|
|
119016
119023
|
if (args.chat?.visibility !== void 0)
|
|
119017
119024
|
patch["blocks.chat.visibility"] = args.chat.visibility;
|
|
119018
119025
|
if (args.promoBanner?.enabled !== void 0)
|
|
@@ -119071,6 +119078,12 @@ function registerEventTools(server2) {
|
|
|
119071
119078
|
if (args.chat?.visibility !== void 0) {
|
|
119072
119079
|
hints.push("blocks.chat.visibility was stored but the event page does not read it: the chat panel exists exactly when blocks.chat.enabled is true, and sending is opened or closed live with oko_set_chat_mode. Drop the field.");
|
|
119073
119080
|
}
|
|
119081
|
+
if (args.chat?.enabled === false) {
|
|
119082
|
+
hints.push('The chat block is now off in setup: it is gone from the page for everyone, together with every message the audience wrote. If the goal was only to stop NEW messages \u2014 which is what "turn off the chat" usually means during or after a webinar \u2014 re-enable it here and use oko_set_chat_mode with mode "off" instead: the block and the whole history stay in place. Worth confirming with the organizer which of the two they meant.');
|
|
119083
|
+
}
|
|
119084
|
+
if (args.chat?.enabled === true && args.chat?.intake === void 0) {
|
|
119085
|
+
hints.push('The chat block is on the page, but message sending stays closed until it is opened: a chat nobody opened is silent by default. Open it now with oko_set_chat_mode mode "public", or set blocks.chat.intake to open / schedule / session so it opens by itself.');
|
|
119086
|
+
}
|
|
119074
119087
|
const currentBlocks = current.blocks && typeof current.blocks === "object" ? current.blocks : {};
|
|
119075
119088
|
const bannerHasImage = Boolean(safeString(currentBlocks.promoBanner?.imageUrl) || safeString(currentBlocks.promoBanner?.imageMasterUrl));
|
|
119076
119089
|
if (args.promoBanner?.enabled === false && bannerHasImage) {
|
|
@@ -120038,16 +120051,17 @@ function registerLiveTools(server2) {
|
|
|
120038
120051
|
server2.registerTool("oko_set_chat_mode", {
|
|
120039
120052
|
title: "Set chat mode",
|
|
120040
120053
|
description: toolDescription({
|
|
120041
|
-
summary: "Open or close
|
|
120054
|
+
summary: "Open or close MESSAGE SENDING on the event page. The chat block itself stays where it is.",
|
|
120042
120055
|
exampleCall: { "eventId": "Kx9pQ2mR7tL4vB8nW3cY", "mode": "off", "confirm": true },
|
|
120043
120056
|
args: [
|
|
120044
120057
|
"eventId: event to control.",
|
|
120045
|
-
"mode: public (anyone can send), off (input closed, history stays visible), or null to
|
|
120058
|
+
"mode: public (anyone can send), off (input closed, history stays visible), or null to fall back to the event's own setting (blocks.chat.intake, closed unless the organizer chose otherwise).",
|
|
120046
120059
|
"confirm: must be true."
|
|
120047
120060
|
],
|
|
120048
120061
|
returns: "eventId and the effective chat mode.",
|
|
120049
|
-
examples: ['Use mode="off" to pause a chat storm; use mode=
|
|
120062
|
+
examples: ['Use mode="off" to pause a chat storm; use mode="public" to reopen.'],
|
|
120050
120063
|
notes: [
|
|
120064
|
+
'\u{1F534} "Turn off the chat" means one of TWO different things, and picking the wrong one destroys what people wrote. THIS tool stops new messages: the block stays on the page, history stays readable, nothing is lost. The other one \u2014 oko_configure_blocks with chat.enabled=false \u2014 removes the block from the page together with the whole conversation. When the organizer says "turn off the chat", "close the chat", "stop the chat", "mute the chat" during or after a webinar, they almost always mean THIS tool. Ask before removing the block.',
|
|
120051
120065
|
'This is the full replacement for the legacy pause via oko_set_block_visibility(block="chat"): prefer oko_set_chat_mode.',
|
|
120052
120066
|
"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."
|
|
120053
120067
|
]
|
|
@@ -120057,7 +120071,7 @@ function registerLiveTools(server2) {
|
|
|
120057
120071
|
// LD5a-2 / A8 (owner decision 03.09): "auth" and "owner" were promised
|
|
120058
120072
|
// here and enforced nowhere — the rule and every client only check
|
|
120059
120073
|
// `mode !== "off"`. The contract now says what the server does.
|
|
120060
|
-
mode: external_exports.enum(["public", "off"]).nullable().describe("Chat mode: public or off; null
|
|
120074
|
+
mode: external_exports.enum(["public", "off"]).nullable().describe("Chat mode: public or off; null drops the live override and falls back to the event setting."),
|
|
120061
120075
|
confirm: external_exports.boolean().optional().describe("Required true to change the live chat mode.")
|
|
120062
120076
|
},
|
|
120063
120077
|
outputSchema: basicEventOutputSchema,
|