@retensy/mcp 0.52.0 → 0.53.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/README.md +1 -0
- package/package.json +1 -1
- package/src/index.mjs +36 -1
package/README.md
CHANGED
|
@@ -302,6 +302,7 @@ MCP-сервер (+ скилл для Claude Code) для **сборки и пу
|
|
|
302
302
|
| `booking_slots(calendarId, from?, to?, limit?)` | свободные слоты `[{at, label}]`, даты ГГГГ-ММ-ДД в зоне календаря |
|
|
303
303
|
| `booking_list(calendarId, from?, pendingOnly?)` / `booking_create(calendarId, slotAt, name?, phone?, email?, comment?, customAnswers?, meetingTypeId?)` / `booking_cancel(calendarId, bookingId)` | брони: список (или только ждущие подтверждения) / ручная запись (занятый слот — ошибка «занят») / отмена |
|
|
304
304
|
| `booking_confirm(calendarId, bookingId)` / `booking_reject(calendarId, bookingId)` | подтвердить/отклонить бронь при `confirmationMode:"MANUAL"` (прочие поля календаря: `breaks`, `meetingTypes`, буферы, `horizonDays`, `intakeFields`, `notifyOwner`, `slug`+`enabled` — публичная ссылка `/book/<slug>` — в `booking_calendar_create`/`_update`) |
|
|
305
|
+
| `event_list` / `event_get(eventId)` / `event_create(title, startsAt, ...)` / `event_update(eventId, ...)` / `ticket_type_upsert(eventId, name, price, limit, ...)` / `tickets_list(eventId, q?, status?)` / `ticket_checkin(eventId, ticketId)` / `ticket_cancel(eventId, ticketId, refund?)` | билеты на события: события и типы билетов, участники, ручная отметка входа и отмена (последние два с подтверждением) |
|
|
305
306
|
| `audience_fields(botId, search?, limit?)` | ключи переменных (с выведенным типом) и теги бота — для построителя фильтра |
|
|
306
307
|
| `audience_search(botId?, botIds?, filter?, q?, sort?, dir?, page?, size?)` | фильтр+сортировка подписчиков: один бот или кросс-бот (без `botId`); `filter` — полный `AudienceFilter` (теги any/all/none, диапазоны дат, `blocked`, `variableConditions`) |
|
|
307
308
|
| `audience_tag_edit(botId, chatIds, add?, remove?)` / `audience_variable_edit(botId, chatIds, set?, unset?)` | массово добавить/снять теги / установить/снять переменные у выбранных подписчиков |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retensy/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"description": "MCP server to build and publish Telegram and MAX bot funnels/automations, broadcasts, service integrations, block-based websites (incl. free-layout Zero blocks, designs, templates, custom domains, form leads) and Markdown blog articles in the Retensy Bots service. Zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/index.mjs
CHANGED
|
@@ -1196,6 +1196,14 @@ const TOOLS = [
|
|
|
1196
1196
|
{ name: "booking_cancel", description: "Отменить бронь и освободить слот (POST /api/bots/booking/calendars/{calendarId}/bookings/{bookingId}/cancel). Повторная отмена — без ошибки. bookingId — из booking_list.", inputSchema: { type: "object", properties: { calendarId: { type: "string" }, bookingId: { type: "string" } }, required: ["calendarId", "bookingId"] } },
|
|
1197
1197
|
{ name: "booking_confirm", description: "Подтвердить бронь, ждущую решения владельца (MANUAL confirmationMode) — POST .../bookings/{bookingId}/confirm. Клиенту уходит уведомление, если бронь пришла из чата бота. HTTP 404 — бронь не этого календаря, 409 — уже не ждёт решения (подтверждена/отменена/истёк pendingHoldHours).", inputSchema: { type: "object", properties: { calendarId: { type: "string" }, bookingId: { type: "string" } }, required: ["calendarId", "bookingId"] } },
|
|
1198
1198
|
{ name: "booking_reject", description: "Отклонить бронь, ждущую решения владельца (MANUAL confirmationMode) — POST .../bookings/{bookingId}/reject: освобождает слот, клиенту уходит «отклонено владельцем» (в отличие от booking_cancel — то работает на любой активной брони и ничего не присылает клиенту). HTTP 404/409 — как у booking_confirm.", inputSchema: { type: "object", properties: { calendarId: { type: "string" }, bookingId: { type: "string" } }, required: ["calendarId", "bookingId"] } },
|
|
1199
|
+
{ name: "event_list", description: "События с билетами (GET /api/bots/tickets/events): id, title, startsAt, status, sold, checkedIn, revenue, publicUrl. Read-only.", inputSchema: { type: "object", properties: {} } },
|
|
1200
|
+
{ name: "event_get", description: "Событие с типами билетов (GET /api/bots/tickets/events/{eventId}). Read-only.", inputSchema: { type: "object", properties: { eventId: { type: "string" } }, required: ["eventId"] } },
|
|
1201
|
+
{ name: "event_create", description: "Создать событие (POST /api/bots/tickets/events), по умолчанию черновик; опубликовать — status:\"published\". Типы билетов — ticket_type_upsert.", inputSchema: { type: "object", properties: { title: { type: "string" }, description: { type: "string" }, startsAt: { type: "string", description: "ISO-8601 UTC" }, endsAt: { type: "string" }, timezone: { type: "string", description: "IANA, напр. Europe/Moscow" }, venueType: { type: "string", enum: ["offline", "online"] }, venue: { type: "string", description: "Адрес" }, onlineUrl: { type: "string" }, coverUrl: { type: "string" }, capacity: { type: "number", description: "Общая вместимость" }, status: { type: "string", enum: ["draft", "published", "cancelled"] } }, required: ["title", "startsAt"] } },
|
|
1202
|
+
{ name: "event_update", description: "Изменить событие (PUT /api/bots/tickets/events/{eventId}), переданные поля заменяют текущие. status:\"cancelled\" — отмена события.", inputSchema: { type: "object", properties: { eventId: { type: "string" }, title: { type: "string" }, description: { type: "string" }, startsAt: { type: "string", description: "ISO-8601 UTC" }, endsAt: { type: "string" }, timezone: { type: "string", description: "IANA, напр. Europe/Moscow" }, venueType: { type: "string", enum: ["offline", "online"] }, venue: { type: "string", description: "Адрес" }, onlineUrl: { type: "string" }, coverUrl: { type: "string" }, capacity: { type: "number", description: "Общая вместимость" }, status: { type: "string", enum: ["draft", "published", "cancelled"] } }, required: ["eventId"] } },
|
|
1203
|
+
{ name: "ticket_type_upsert", description: "Создать/изменить тип билета (POST /api/bots/tickets/events/{eventId}/types): без id — новый, с id — правка. price 0 = бесплатный; limit — число билетов типа.", inputSchema: { type: "object", properties: { eventId: { type: "string" }, id: { type: "string" }, name: { type: "string" }, price: { type: "number" }, limit: { type: "number" }, salesStart: { type: "string" }, salesEnd: { type: "string" } }, required: ["eventId", "name", "price", "limit"] } },
|
|
1204
|
+
{ name: "tickets_list", description: "Билеты/участники события (GET /api/bots/tickets/events/{eventId}/tickets): q — поиск по имени/номеру, status, page с 0, size. Read-only.", inputSchema: { type: "object", properties: { eventId: { type: "string" }, q: { type: "string" }, status: { type: "string", enum: ["pending", "paid", "valid", "used", "cancelled", "refunded"] }, page: { type: "number" }, size: { type: "number" } }, required: ["eventId"] } },
|
|
1205
|
+
{ name: "ticket_checkin", description: "Отметить билет использованным вручную (POST .../tickets/{ticketId}/checkin). Необратимо, нужен confirmToken. Ответ: status VALID | ALREADY_USED | CANCELLED | NOT_PAID.", inputSchema: { type: "object", properties: { eventId: { type: "string" }, ticketId: { type: "string" } }, required: ["eventId", "ticketId"] } },
|
|
1206
|
+
{ name: "ticket_cancel", description: "Отменить билет и освободить место (POST .../tickets/{ticketId}/cancel). refund:true — пометить возврат (деньги в ЮKassa возвращаются вручную). Необратимо, нужен confirmToken.", inputSchema: { type: "object", properties: { eventId: { type: "string" }, ticketId: { type: "string" }, refund: { type: "boolean" } }, required: ["eventId", "ticketId"] } },
|
|
1199
1207
|
{ name: "site_templates", description: "Библиотека шаблонов блоков сайта (GET /api/bots/pages/templates): {categories: [{id, title, description?}], templates: [{id, category, title, description?, blocks: сколько блоков вставится}]}. Вставка — site_edit add_template {container, templateId, after?} (results.id — первый блок, results.ids — все); дальше блоки правятся как обычные. category — фильтр по id категории. Ответ также содержит siteTemplates — стартовые шаблоны сайта (starter, blank, mini-landing, shop-starter) с описаниями: для site_create template / site_edit init.", inputSchema: { type: "object", properties: { category: { type: "string" } } } },
|
|
1200
1208
|
// ---- Паритет платформы, часть 2: бот, база, агент, заявки, подписчики, каналы, ссылки, аналитика ----
|
|
1201
1209
|
{ name: "bot_rename", description: "Переименовать бота (PATCH /api/bots/{botId} {name}): отображаемое имя в кабинете, до 250 символов. Пустое name сбрасывает имя на @username. Имя в самом Telegram/MAX не меняется.", inputSchema: { type: "object", properties: { botId: { type: "string" }, name: { type: "string" } }, required: ["botId", "name"] } },
|
|
@@ -1800,6 +1808,33 @@ async function handleCall(params) {
|
|
|
1800
1808
|
if (g.pending) return g.pending;
|
|
1801
1809
|
return okResult(`✅ Бронь ${bookingId} отменена, слот свободен.`);
|
|
1802
1810
|
}
|
|
1811
|
+
case "event_list": return okResult(await api("/api/bots/tickets/events"));
|
|
1812
|
+
case "event_get": return okResult(await api(`/api/bots/tickets/events/${idArg(a.eventId, "eventId")}`));
|
|
1813
|
+
case "event_create":
|
|
1814
|
+
case "event_update": {
|
|
1815
|
+
const keys = ["title", "description", "startsAt", "endsAt", "timezone", "venueType", "venue", "onlineUrl", "coverUrl", "capacity", "status"];
|
|
1816
|
+
const body = Object.fromEntries(keys.filter((k) => a[k] !== undefined).map((k) => [k, a[k]]));
|
|
1817
|
+
if (params.name === "event_create") return okResult(await api("/api/bots/tickets/events", { method: "POST", body }));
|
|
1818
|
+
return okResult(await api(`/api/bots/tickets/events/${idArg(a.eventId, "eventId")}`, { method: "PUT", body }));
|
|
1819
|
+
}
|
|
1820
|
+
case "ticket_type_upsert": {
|
|
1821
|
+
const body = { name: String(a.name), price: a.price, limit: a.limit };
|
|
1822
|
+
for (const k of ["id", "salesStart", "salesEnd"]) if (a[k] !== undefined) body[k] = a[k];
|
|
1823
|
+
return okResult(await api(`/api/bots/tickets/events/${idArg(a.eventId, "eventId")}/types`, { method: "POST", body }));
|
|
1824
|
+
}
|
|
1825
|
+
case "tickets_list": {
|
|
1826
|
+
const q = {};
|
|
1827
|
+
for (const k of ["q", "status", "page", "size"]) if (a[k] !== undefined && a[k] !== "") q[k] = a[k];
|
|
1828
|
+
return okResult(await api(`/api/bots/tickets/events/${idArg(a.eventId, "eventId")}/tickets${qs(q)}`));
|
|
1829
|
+
}
|
|
1830
|
+
case "ticket_checkin":
|
|
1831
|
+
case "ticket_cancel": {
|
|
1832
|
+
const args = { eventId: idArg(a.eventId, "eventId"), ticketId: idArg(a.ticketId, "ticketId") };
|
|
1833
|
+
if (params.name === "ticket_cancel" && a.refund != null) args.refund = !!a.refund;
|
|
1834
|
+
const g = await invokeGuarded(params.name, args, a);
|
|
1835
|
+
if (g.pending) return g.pending;
|
|
1836
|
+
return okResult(g.data);
|
|
1837
|
+
}
|
|
1803
1838
|
case "booking_confirm":
|
|
1804
1839
|
case "booking_reject": {
|
|
1805
1840
|
const id = uuidArg(a.calendarId, "calendarId");
|
|
@@ -2835,7 +2870,7 @@ async function invokeGuarded(name, args, a) {
|
|
|
2835
2870
|
}
|
|
2836
2871
|
/** Обратимые правки: сервер обычно не требует подтверждения, токен нужен лишь при явном 409. */
|
|
2837
2872
|
const SOFT_CONFIRM_TOOLS = new Set(["site_edit", "agent_update", "kb_add_site", "chain_enable"]);
|
|
2838
|
-
const GUARDED_TOOLS = new Set(["publish_graph", "site_publish", "site_rollback", "agent_publish", "booking_cancel", "bot_delete", "broadcast_cancel", "broadcast_send",
|
|
2873
|
+
const GUARDED_TOOLS = new Set(["publish_graph", "site_publish", "site_rollback", "agent_publish", "booking_cancel", "ticket_checkin", "ticket_cancel", "bot_delete", "broadcast_cancel", "broadcast_send",
|
|
2839
2874
|
"delete_graph", "agent_update", "chain_enable", "kb_add_site", "create_bot", "bot_stop", "dialog_reply", "site_edit"]);
|
|
2840
2875
|
for (const t of TOOLS) {
|
|
2841
2876
|
if (!GUARDED_TOOLS.has(t.name)) continue;
|