@okostream/mcp 0.12.15 → 0.13.0
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 +40 -11
- 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.
|
|
116294
|
+
var OKO_MCP_VERSION = "0.13.0";
|
|
116295
116295
|
|
|
116296
116296
|
// build/auth.js
|
|
116297
116297
|
var state = null;
|
|
@@ -118496,7 +118496,15 @@ function buildCreateWebinarDocument(input) {
|
|
|
118496
118496
|
description: input.description
|
|
118497
118497
|
},
|
|
118498
118498
|
blocks: {
|
|
118499
|
-
|
|
118499
|
+
// Starting state closed, session triggers off (owner decision 10.09):
|
|
118500
|
+
// the chat exists, and the organizer opens it in analytics.
|
|
118501
|
+
chat: {
|
|
118502
|
+
enabled: input.chatEnabled,
|
|
118503
|
+
visibility: "always",
|
|
118504
|
+
intake: "closed",
|
|
118505
|
+
openOnSessionStart: false,
|
|
118506
|
+
closeOnSessionEnd: false
|
|
118507
|
+
},
|
|
118500
118508
|
promoBanner: { enabled: false, text: "", link: "", visibility: "always" }
|
|
118501
118509
|
}
|
|
118502
118510
|
};
|
|
@@ -118812,7 +118820,7 @@ function registerEventTools(server2) {
|
|
|
118812
118820
|
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
118821
|
examples: ["Use after oko_create_webinar to verify setup and return the event URL to the user."],
|
|
118814
118822
|
notes: [
|
|
118815
|
-
"blocks.chat
|
|
118823
|
+
"blocks.chat: the panel exists exactly when blocks.chat.enabled is true (false HIDES the panel; messages are kept for 90 days and come back when it is enabled again). Message intake is ONE live state \u2014 oko_set_chat_mode reads and writes it; blocks.chat.intake is only the STARTING state an untouched event has (closed by default, or open), and blocks.chat.openOnSessionStart / closeOnSessionEnd are two triggers that flip that same state when an analytics session starts or ends. blocks.chat.mode and blocks.chat.visibility are legacy and read by nobody \u2014 ignore those two."
|
|
118816
118824
|
]
|
|
118817
118825
|
}),
|
|
118818
118826
|
inputSchema: { eventId: eventIdField },
|
|
@@ -118857,7 +118865,7 @@ function registerEventTools(server2) {
|
|
|
118857
118865
|
"workspaceId: optional workspace id; omitted means personal workspace.",
|
|
118858
118866
|
"videoUrl: optional iframe/source/player URL; normalized by OKO.",
|
|
118859
118867
|
"eventDate: optional ISO datetime.",
|
|
118860
|
-
"chatEnabled: whether the chat block is
|
|
118868
|
+
"chatEnabled: whether the chat block is on the page at creation (default true \u2014 the chat exists practically always). It does NOT open message sending: a new event starts closed, so the chat is visible and silent until the organizer opens it (oko_set_chat_mode, or the analytics switch), sets blocks.chat.intake to open, or enables the session triggers in oko_configure_blocks."
|
|
118861
118869
|
],
|
|
118862
118870
|
returns: "new event id, public event URL, and workspaceId.",
|
|
118863
118871
|
examples: ["Use for a complete create flow, then call oko_configure_blocks and oko_get_event."],
|
|
@@ -118870,7 +118878,7 @@ function registerEventTools(server2) {
|
|
|
118870
118878
|
eventDate: external_exports.string().datetime().nullable().optional().describe("Optional webinar datetime in ISO format."),
|
|
118871
118879
|
speakerName: external_exports.string().max(160).nullable().optional().describe("Optional speaker display name."),
|
|
118872
118880
|
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(
|
|
118881
|
+
chatEnabled: external_exports.boolean().default(true).describe("Whether the chat block is on the page at creation (default true); message sending stays closed until opened.")
|
|
118874
118882
|
},
|
|
118875
118883
|
outputSchema: createWebinarOutputSchema,
|
|
118876
118884
|
annotations: writeTool
|
|
@@ -118984,6 +118992,7 @@ function registerEventTools(server2) {
|
|
|
118984
118992
|
returns: "event id and the list of Firestore fields updated.",
|
|
118985
118993
|
examples: ["Use after oko_create_webinar to enable chat, bind a CTA/form, and configure other audience blocks."],
|
|
118986
118994
|
notes: [
|
|
118995
|
+
'\u{1F534} "Turn off the chat" is ambiguous, and the two meanings are different actions. chat.enabled=false HIDES the chat panel from the page for everyone \u2014 the history is not deleted (messages are kept for 90 days) and comes back when the block is enabled again \u2014 but during or after a webinar that is almost never what is asked for. Stopping new messages is a different tool: oko_set_chat_mode with mode="off" leaves the panel and the history on the page and only closes the input. When the organizer says "turn off the chat", "close the chat", "stop the chat", "mute the chat", "disable chat", assume they mean CLOSING INTAKE (oko_set_chat_mode off), and ask before hiding the panel. The same trap in reverse: "turn the chat back on" after a pause means mode="public", not this field.',
|
|
118987
118996
|
"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
118997
|
"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
118998
|
'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 +119003,13 @@ function registerEventTools(server2) {
|
|
|
118994
119003
|
}),
|
|
118995
119004
|
inputSchema: {
|
|
118996
119005
|
eventId: eventIdField,
|
|
118997
|
-
chat: external_exports.object({
|
|
119006
|
+
chat: external_exports.object({
|
|
119007
|
+
enabled: external_exports.boolean().optional().describe("Whether the chat panel is ON THE PAGE. false hides it for everyone (history kept for 90 days, back when re-enabled) \u2014 see the note above: to stop new messages use oko_set_chat_mode instead."),
|
|
119008
|
+
intake: external_exports.enum(["closed", "open"]).optional().describe("STARTING state of message intake \u2014 what the chat does while nobody has touched the live control: closed (default \u2014 on the page, history visible, input closed) or open. The live control (oko_set_chat_mode) is the state itself; this field does not override it."),
|
|
119009
|
+
openOnSessionStart: external_exports.boolean().optional().describe("Session trigger: open message intake when an analytics session starts (default false)."),
|
|
119010
|
+
closeOnSessionEnd: external_exports.boolean().optional().describe("Session trigger: close message intake when the analytics session ends (default false)."),
|
|
119011
|
+
visibility: external_exports.enum(["always", "hidden"]).optional()
|
|
119012
|
+
}).optional(),
|
|
118998
119013
|
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
119014
|
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
119015
|
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 +119028,12 @@ function registerEventTools(server2) {
|
|
|
119013
119028
|
const patch = {};
|
|
119014
119029
|
if (args.chat?.enabled !== void 0)
|
|
119015
119030
|
patch["blocks.chat.enabled"] = args.chat.enabled;
|
|
119031
|
+
if (args.chat?.intake !== void 0)
|
|
119032
|
+
patch["blocks.chat.intake"] = args.chat.intake;
|
|
119033
|
+
if (args.chat?.openOnSessionStart !== void 0)
|
|
119034
|
+
patch["blocks.chat.openOnSessionStart"] = args.chat.openOnSessionStart;
|
|
119035
|
+
if (args.chat?.closeOnSessionEnd !== void 0)
|
|
119036
|
+
patch["blocks.chat.closeOnSessionEnd"] = args.chat.closeOnSessionEnd;
|
|
119016
119037
|
if (args.chat?.visibility !== void 0)
|
|
119017
119038
|
patch["blocks.chat.visibility"] = args.chat.visibility;
|
|
119018
119039
|
if (args.promoBanner?.enabled !== void 0)
|
|
@@ -119071,6 +119092,12 @@ function registerEventTools(server2) {
|
|
|
119071
119092
|
if (args.chat?.visibility !== void 0) {
|
|
119072
119093
|
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
119094
|
}
|
|
119095
|
+
if (args.chat?.enabled === false) {
|
|
119096
|
+
hints.push('The chat panel is now hidden from the page for everyone. Nothing was deleted: messages are kept for 90 days and come back when the block is enabled again. 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 the block here and use oko_set_chat_mode with mode "off" instead: the panel and the history stay visible, only the input closes. Worth confirming with the organizer which of the two they meant.');
|
|
119097
|
+
}
|
|
119098
|
+
if (args.chat?.enabled === true && args.chat?.intake === void 0) {
|
|
119099
|
+
hints.push('The chat block is on the page, but message intake stays closed until it is opened: a chat nobody opened is silent by default. Open it now with oko_set_chat_mode mode "public", set blocks.chat.intake to "open" so new events of this kind start open, or enable openOnSessionStart / closeOnSessionEnd so the analytics session opens and closes it by itself.');
|
|
119100
|
+
}
|
|
119074
119101
|
const currentBlocks = current.blocks && typeof current.blocks === "object" ? current.blocks : {};
|
|
119075
119102
|
const bannerHasImage = Boolean(safeString(currentBlocks.promoBanner?.imageUrl) || safeString(currentBlocks.promoBanner?.imageMasterUrl));
|
|
119076
119103
|
if (args.promoBanner?.enabled === false && bannerHasImage) {
|
|
@@ -119887,7 +119914,7 @@ function registerLiveTools(server2) {
|
|
|
119887
119914
|
description: toolDescription({
|
|
119888
119915
|
summary: "Read main RTDB live controls, aggregate analytics, and chat settings for an event.",
|
|
119889
119916
|
args: ["eventId: event to inspect."],
|
|
119890
|
-
returns: "eventId, agg metrics, ctrl live overrides, and chat settings (mode, slowModeMs, automodEnabled, allowViewerLinks).",
|
|
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).",
|
|
119891
119918
|
examples: ["Use during a webinar before changing live block visibility or starting/ending sessions."],
|
|
119892
119919
|
notes: [
|
|
119893
119920
|
"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."
|
|
@@ -119910,6 +119937,7 @@ function registerLiveTools(server2) {
|
|
|
119910
119937
|
if (value !== null && value !== void 0)
|
|
119911
119938
|
chat[field2] = value;
|
|
119912
119939
|
});
|
|
119940
|
+
chat.accepting = chat.mode !== "off";
|
|
119913
119941
|
return textResult({ eventId, agg: aggSnap.val() ?? {}, ctrl: ctrlSnap.val() ?? {}, chat });
|
|
119914
119942
|
});
|
|
119915
119943
|
server2.registerTool("oko_set_block_visibility", {
|
|
@@ -120038,16 +120066,17 @@ function registerLiveTools(server2) {
|
|
|
120038
120066
|
server2.registerTool("oko_set_chat_mode", {
|
|
120039
120067
|
title: "Set chat mode",
|
|
120040
120068
|
description: toolDescription({
|
|
120041
|
-
summary: "Open or close
|
|
120069
|
+
summary: "Open or close MESSAGE SENDING on the event page. The chat block itself stays where it is.",
|
|
120042
120070
|
exampleCall: { "eventId": "Kx9pQ2mR7tL4vB8nW3cY", "mode": "off", "confirm": true },
|
|
120043
120071
|
args: [
|
|
120044
120072
|
"eventId: event to control.",
|
|
120045
|
-
"mode: public (anyone can send), off (input closed, history stays visible), or null to
|
|
120073
|
+
"mode: public (anyone can send), off (input closed, history stays visible), or null to clear the live control so the event's STARTING state applies (blocks.chat.intake \u2014 closed unless the organizer chose open). Message intake is one live state; this tool, the analytics switch and the session triggers all write it.",
|
|
120046
120074
|
"confirm: must be true."
|
|
120047
120075
|
],
|
|
120048
120076
|
returns: "eventId and the effective chat mode.",
|
|
120049
|
-
examples: ['Use mode="off" to pause a chat storm; use mode=
|
|
120077
|
+
examples: ['Use mode="off" to pause a chat storm; use mode="public" to reopen.'],
|
|
120050
120078
|
notes: [
|
|
120079
|
+
'\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.',
|
|
120051
120080
|
'This is the full replacement for the legacy pause via oko_set_block_visibility(block="chat"): prefer oko_set_chat_mode.',
|
|
120052
120081
|
"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
120082
|
]
|
|
@@ -120057,7 +120086,7 @@ function registerLiveTools(server2) {
|
|
|
120057
120086
|
// LD5a-2 / A8 (owner decision 03.09): "auth" and "owner" were promised
|
|
120058
120087
|
// here and enforced nowhere — the rule and every client only check
|
|
120059
120088
|
// `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
|
|
120089
|
+
mode: external_exports.enum(["public", "off"]).nullable().describe("Chat mode: public or off; null clears the live control so the event's starting state (blocks.chat.intake) applies."),
|
|
120061
120090
|
confirm: external_exports.boolean().optional().describe("Required true to change the live chat mode.")
|
|
120062
120091
|
},
|
|
120063
120092
|
outputSchema: basicEventOutputSchema,
|