integram-mcp 0.7.87 → 0.7.99
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 +12 -11
- package/index.js +119 -50
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/integram-mcp)
|
|
4
4
|
|
|
5
|
-
MCP-сервер для Integram — даёт доступ к
|
|
5
|
+
MCP-сервер для Integram — даёт доступ к 762 инструментам (таблицы, документы, отчёты, автоматизации, портал, Telegram-боты, граф знаний и т.д.) из Claude Code, Claude Desktop и Cursor.
|
|
6
6
|
|
|
7
7
|
Работает с облачным Integram на **ai2o.online** или с локальным сервером.
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ claude mcp add integram \
|
|
|
15
15
|
-e INTEGRAM_URL=https://ai2o.online \
|
|
16
16
|
-e INTEGRAM_EMAIL=you@example.com \
|
|
17
17
|
-e INTEGRAM_PASSWORD=secret \
|
|
18
|
-
-- npx -y integram-mcp@0.7.
|
|
18
|
+
-- npx -y integram-mcp@0.7.99
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Ставить ничего не нужно: `npx` скачает пакет сам.
|
|
@@ -43,7 +43,7 @@ claude mcp add integram \
|
|
|
43
43
|
-e INTEGRAM_URL=http://localhost:8081 \
|
|
44
44
|
-e INTEGRAM_EMAIL=you@example.com \
|
|
45
45
|
-e INTEGRAM_PASSWORD=secret \
|
|
46
|
-
-- npx -y integram-mcp@0.7.
|
|
46
|
+
-- npx -y integram-mcp@0.7.99
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
Удалить: `claude mcp remove integram`
|
|
@@ -57,7 +57,7 @@ claude mcp add integram \
|
|
|
57
57
|
"mcpServers": {
|
|
58
58
|
"integram": {
|
|
59
59
|
"command": "npx",
|
|
60
|
-
"args": ["-y", "integram-mcp@0.7.
|
|
60
|
+
"args": ["-y", "integram-mcp@0.7.99"],
|
|
61
61
|
"env": {
|
|
62
62
|
"INTEGRAM_URL": "https://ai2o.online",
|
|
63
63
|
"INTEGRAM_EMAIL": "you@example.com",
|
|
@@ -77,7 +77,7 @@ claude mcp add integram \
|
|
|
77
77
|
"mcpServers": {
|
|
78
78
|
"integram": {
|
|
79
79
|
"command": "npx",
|
|
80
|
-
"args": ["-y", "integram-mcp@0.7.
|
|
80
|
+
"args": ["-y", "integram-mcp@0.7.99"],
|
|
81
81
|
"env": {
|
|
82
82
|
"INTEGRAM_URL": "https://ai2o.online",
|
|
83
83
|
"INTEGRAM_EMAIL": "you@example.com",
|
|
@@ -167,36 +167,37 @@ claude mcp add integram -e INTEGRAM_URL=... -e INTEGRAM_EMAIL=... -e INTEGRAM_PA
|
|
|
167
167
|
| Группа | Что делает | Кол-во |
|
|
168
168
|
|---|---|---|
|
|
169
169
|
| **workspace** | Файлы, коннекторы, участники, бэкапы, дашборды, вью, аудит, нормализатор, автоматизации, вебхуки, формы | 132 |
|
|
170
|
-
| **pm** | Управление проектами: задачи, спринты, доски, бэклог, диаграммы |
|
|
171
|
-
| **portal** | Портал: конфиг, каталог, корзины, заказы, тикеты, KB, метрики, Telegram-боты |
|
|
170
|
+
| **pm** | Управление проектами: задачи, спринты, доски, бэклог, диаграммы | 72 |
|
|
171
|
+
| **portal** | Портал: конфиг, каталог, корзины, заказы, тикеты, KB, метрики, Telegram-боты | 67 |
|
|
172
172
|
| **teamchat** | Сообщения, решения, метрики агентов, W-матрица, топики | 58 |
|
|
173
173
|
| **docs** | Документы, блоки, версии, шаринг, папки, теги, шаблоны, PDF | 53 |
|
|
174
174
|
| **nightcall** | Нормативная спецификация и проверяемая генерация: требования, обязательства, свидетельства, базовые линии | 44 |
|
|
175
175
|
| **codespace** | Git-репозитории: ветки, коммиты, файлы, точечная правка (`patch_file`), pull requests; запись с `baseCommit` сливается с чужими изменениями вместо перезаписи | 36 |
|
|
176
176
|
| **schema** | Таблицы, колонки, кнопки (AI/HTTP/script), вычисляемые колонки, валидация | 35 |
|
|
177
|
+
| **orgs** | Организации: участники, области, приглашения | 29 |
|
|
177
178
|
| **memory** | Память агента, инсайты, процедуры, противоречия | 28 |
|
|
178
|
-
| **orgs** | Организации: участники, области, приглашения | 27 |
|
|
179
179
|
| **meta-kb** | Дебаты: параллельные эксперты, LLM-синтез, курирование знаний | 25 |
|
|
180
180
|
| **core** | CRUD объектов, поиск, справочник платформы (docs_map/docs_search), граф, комментарии, bulk-операции | 20 |
|
|
181
181
|
| **objects** | Перемещение, дублирование, переупорядочивание записей, корзина, обратные ссылки | 20 |
|
|
182
|
+
| **agents** | Реестр внешних AI-агентов, делегирование | 16 |
|
|
182
183
|
| **reports** | Отчёты: CRUD, колонки, JOIN, фильтры, экспорт | 16 |
|
|
183
|
-
| **agents** | Реестр внешних AI-агентов, делегирование | 15 |
|
|
184
184
|
| **presentations** | Презентации: PPTX-движок воркспейса (список, чтение, создание из outline, сохранение слайдов, meta и статусы, версии и откат, шаринг, экспорт PPTX/PDF, импорт PPTX, превью биндингов, удаление) | 15 |
|
|
185
185
|
| **grants** | Роли, гранты, row-level правила (только admin) | 13 |
|
|
186
186
|
| **graph** | Граф данных: запросы, окрестности, кратчайший путь | 13 |
|
|
187
187
|
| **kag** | Граф знаний: поиск, обход, вопрос-ответ, ввоз сущностей и связей | 13 |
|
|
188
188
|
| **comments** | Комментарии и реакции к записям | 7 |
|
|
189
|
+
| **video** | обучающие видео (сценарий→запись→озвучка→монтаж) | 6 |
|
|
189
190
|
| **automations** | Детали автоматизации, лог доставки вебхуков | 5 |
|
|
190
|
-
| **
|
|
191
|
+
| **history** | История изменений объектов, откат | 5 |
|
|
191
192
|
| **workspace-tools** | Инструменты уровня области: регистрация, правка, ввоз наборов | 5 |
|
|
192
193
|
| **advisor** | Советы эксперта, возможности платформы | 4 |
|
|
193
194
|
| **bulk** | Массовые операции: создание, обновление, удаление, AI-batch | 4 |
|
|
194
195
|
| **dlp** | Контур защиты от утечек: DLP-правила воркспейса (список, создание, правка, удаление; только admin) | 4 |
|
|
195
196
|
| **ai** | Синтез речи (TTS): озвучка текста, список голосов | 3 |
|
|
196
197
|
| **finmodel** | Финмодели: посчитанная сетка по периодам и сценариям, граф зависимостей ячеек, подбор параметров (goal-seek) с записью решения | 3 |
|
|
198
|
+
| **meetings** | Конвейер встреч (TG-запись → протокол → одобрение → задачи) | 3 |
|
|
197
199
|
| **normalizer** | Разбор документов: запуск, состояние, подтверждение сопоставления | 3 |
|
|
198
200
|
| **timeseries** | Временные ряды: запись, запрос, список источников | 3 |
|
|
199
|
-
| **history** | История изменений объектов, откат | 2 |
|
|
200
201
|
| **lookups** | Справочники: варианты для dropdown/ref | 2 |
|
|
201
202
|
<!-- END:tool-groups -->
|
|
202
203
|
|
package/index.js
CHANGED
|
@@ -57,7 +57,12 @@ async function apiFetch(path, opts = {}, _retried = false) {
|
|
|
57
57
|
return apiFetch(path, opts, true);
|
|
58
58
|
}
|
|
59
59
|
const text = await res.text().catch(() => '');
|
|
60
|
-
|
|
60
|
+
const err = new Error(`API ${opts.method || 'GET'} ${path} → ${res.status}: ${text}`);
|
|
61
|
+
// TD-065: тело отказа доезжает вместе с ошибкой — конвертация в isError
|
|
62
|
+
// читает code/message/details из err.body, а не из текста «API … → 400: {…}».
|
|
63
|
+
try { err.body = JSON.parse(text); } catch { /* не JSON — остаётся только текст */ }
|
|
64
|
+
err.status = res.status;
|
|
65
|
+
throw err;
|
|
61
66
|
}
|
|
62
67
|
const text = await res.text();
|
|
63
68
|
try {
|
|
@@ -67,6 +72,17 @@ async function apiFetch(path, opts = {}, _retried = false) {
|
|
|
67
72
|
}
|
|
68
73
|
}
|
|
69
74
|
|
|
75
|
+
// TD-065: отказ бэкенда → результат тула с isError:true (признак протокола MCP).
|
|
76
|
+
// Чистый текст для модели: message + details, без JSON-обёртки всего ответа.
|
|
77
|
+
// Тела нет (не JSON, сеть) — остаётся текст самой ошибки.
|
|
78
|
+
function toolErrorResult(err) {
|
|
79
|
+
const be = err?.body?.error;
|
|
80
|
+
const text = be
|
|
81
|
+
? `Error: ${be.message || err.message}${be.details ? '\n\n' + JSON.stringify(be.details, null, 2) : ''}`
|
|
82
|
+
: `Error: ${err?.message}`;
|
|
83
|
+
return { content: [{ type: 'text', text }], isError: true };
|
|
84
|
+
}
|
|
85
|
+
|
|
70
86
|
async function login() {
|
|
71
87
|
if (!EMAIL || !PASSWORD) throw new Error('INTEGRAM_EMAIL and INTEGRAM_PASSWORD are required');
|
|
72
88
|
const data = await apiFetch('/api/v2/iam/login', {
|
|
@@ -1250,6 +1266,7 @@ const CREATE_WORKSPACE_DEF = {
|
|
|
1250
1266
|
slug: { type: 'string', description: 'URL slug: lowercase, 3-64 chars, a-z start, only a-z0-9_- (e.g. "my-project")' },
|
|
1251
1267
|
template: { type: 'string', description: 'DEPRECATED: use templateId instead. Optional template db_name string.' },
|
|
1252
1268
|
templateId: { type: 'number', description: 'Optional template ID (from list_templates) to create workspace with predefined schema structure' },
|
|
1269
|
+
blocks: { type: 'array', items: { type: 'string' }, description: 'Optional block keys (from template manifest.blocks) to carry over. Omit = carry the whole template; empty array = skeleton only' },
|
|
1253
1270
|
},
|
|
1254
1271
|
required: ['name', 'slug'],
|
|
1255
1272
|
},
|
|
@@ -1372,7 +1389,7 @@ const DESTRUCTIVE_TOOLS = new Set([
|
|
|
1372
1389
|
// Add entries here when introducing new tools so MCP clients see English descriptions.
|
|
1373
1390
|
export const EN_DESCRIPTIONS = {
|
|
1374
1391
|
// Lookups
|
|
1375
|
-
get_lookup: 'Get dropdown values for a lookup table by ID. Returns an array of records with id and display name.',
|
|
1392
|
+
get_lookup: 'Get dropdown values for a lookup table by ID. Use it to learn the allowed values of ref fields. Returns an array of records with id and display name.',
|
|
1376
1393
|
get_ref_options: 'Get available options for a reference column by reqId. Use before creating/updating objects to discover valid values for ref fields.',
|
|
1377
1394
|
// Graph
|
|
1378
1395
|
get_graph_node: 'Get a graph node by object ID. Returns type, name, and edges.',
|
|
@@ -1401,9 +1418,9 @@ export const EN_DESCRIPTIONS = {
|
|
|
1401
1418
|
list_workspace_templates: 'List available templates for creating new workspaces.',
|
|
1402
1419
|
create_workspace_from_template: 'Create a new workspace from a template. Provide templateId, name, and slug.',
|
|
1403
1420
|
// Decisions
|
|
1404
|
-
create_decision: 'Create a new team decision
|
|
1405
|
-
search_teamchat: 'Search
|
|
1406
|
-
search_similar_decisions: 'Find decisions
|
|
1421
|
+
create_decision: 'Create a new team decision. Optionally creates a chat room. Returns: { decision: {id, title, domain, ...}, message: string }.',
|
|
1422
|
+
search_teamchat: 'Search team chat messages. Hybrid full-text + vector search — finds messages by meaning, not only by exact words. Returns: { items: [{id, topic_name, room_name, author, text, score}] }.',
|
|
1423
|
+
search_similar_decisions: 'Find semantically similar decisions with an AI recommendation. Returns: { similar: [{id, title, domain, verdict, team, score}], recommendation }. IMPORTANT: id is a DECISION id — use get_decision(id) to load details, NOT get_object.',
|
|
1407
1424
|
get_agent_metrics: 'Get performance metrics for AI agents. If agentId is provided, returns metrics for that agent only; otherwise all agents. Returns { data: [{ agentId, totalMessages, messages24h, topicsInvolved, trustScore }] }.',
|
|
1408
1425
|
analyze_decision_conflicts: 'Analyze a decision for conflicts, contradictions, and overlaps with other decisions. Returns analysis with conflict descriptions.',
|
|
1409
1426
|
list_decisions: 'List all architectural decisions with optional search and filters.',
|
|
@@ -1414,10 +1431,14 @@ export const EN_DESCRIPTIONS = {
|
|
|
1414
1431
|
summarize_topic: 'Generate an AI summary of a teamchat topic discussion. Extracts key conclusions, decisions made, and open questions.',
|
|
1415
1432
|
list_topics: 'Search topics by name across all rooms the user belongs to. Returns matching topics with their IDs, names, and linked room names.',
|
|
1416
1433
|
delete_topic: 'Permanently delete a teamchat topic and all its messages. Requires room admin rights. This action is IRREVERSIBLE.',
|
|
1434
|
+
// Meetings
|
|
1435
|
+
meetings_status: 'Meeting conveyor status for the workspace: saved config and installed meetings: * automations. Returns: {configured, config, automations:[{id,name,active}]}.',
|
|
1436
|
+
meetings_setup: 'Install or update the meeting conveyor (requires confirmation): creates/updates the meetings: intake and meetings: protocol automations from config. Idempotent on repeated calls (upsert by name). Column aliases must match real column names byte-for-byte; the meetings table must have all 8 meet.cols columns (including record), the messages table all 12 tg.cols (including Транскрипт). Returns: {created, updated, message}.',
|
|
1437
|
+
meetings_teardown: 'Deactivate the meeting conveyor automations (every meetings: * name, requires confirmation). The workspace config is kept. Returns: {deactivated, message}.',
|
|
1417
1438
|
// Meta-KB
|
|
1418
1439
|
mk_revoke_entity: 'Revoke all knowledge base entities derived from a specified decision. Use when a decision was found to be incorrect. Returns { revoked: number, message: string }.',
|
|
1419
1440
|
mk_list_debates: 'List recent expert debates in the workspace. Returns { debates: Array, total: number }. Each debate has id, question, consensus, verdict, created_by, created_at.',
|
|
1420
|
-
mk_start_debate: 'Start an expert debate on a question.
|
|
1441
|
+
mk_start_debate: 'Start an expert debate on a question. The experts are the internal agents of the workspace; all active ones participate by default — pass agents=[slug] to pick one or more for the question. Returns the consensus of the experts and debateId; the full protocol is in mk_get_debate(debateId).',
|
|
1421
1442
|
mk_analytics: 'Get knowledge base analytics: entity/relation/class counts, orphan nodes, breakdown by source/type/status.',
|
|
1422
1443
|
mk_research: 'Research a concept in the knowledge graph: find matching entities, graph neighbors, and knowledge gaps.',
|
|
1423
1444
|
mk_propose_change: 'Propose a knowledge base change (add/update/delete entity). Creates a change request for human review. Returns { id, status: "pending" }.',
|
|
@@ -1431,9 +1452,9 @@ export const EN_DESCRIPTIONS = {
|
|
|
1431
1452
|
mk_welcome: 'Get Meta-KB welcome summary: stats, recent debates, recommendations.',
|
|
1432
1453
|
mk_list_rules: 'List Meta-KB validation rules.',
|
|
1433
1454
|
// Admin — export/import/QA
|
|
1434
|
-
export_type: 'Export a table definition (schema + data) by typeId.',
|
|
1435
|
-
bki_import: 'Import BKI format (tables + data from previous export). Provide content as JSON string.',
|
|
1436
|
-
list_qa_results: 'List QA test sessions and their results.',
|
|
1455
|
+
export_type: 'Export a table definition (schema + data) by typeId (admin only).',
|
|
1456
|
+
bki_import: 'Import BKI format (tables + data from a previous export). Provide content as a JSON string (admin only).',
|
|
1457
|
+
list_qa_results: 'List QA test sessions and their results (admin only).',
|
|
1437
1458
|
list_test_sessions: 'List QA test sessions with aggregate stats (total, passed, failed, skipped).',
|
|
1438
1459
|
create_test_session: 'Create a new QA test session. Optional notes parameter.',
|
|
1439
1460
|
get_test_session: 'Get a QA test session with all test results.',
|
|
@@ -1450,7 +1471,7 @@ export const EN_DESCRIPTIONS = {
|
|
|
1450
1471
|
verify_client: 'Verify client record — check data quality, shipping validity, duplicate risk.',
|
|
1451
1472
|
get_client_lineage: 'Get lineage for a client — source records, merge history, field provenance.',
|
|
1452
1473
|
mk_create_rule: 'Create a Meta-KB validation rule. Condition and action are JSON objects.',
|
|
1453
|
-
mk_delete_rule: 'Delete a Meta-KB validation rule by ID
|
|
1474
|
+
mk_delete_rule: 'Delete a Meta-KB validation rule by ID.',
|
|
1454
1475
|
mk_list_iterations: 'List Meta-KB iterations with optional status filter (in_progress, proposed, accepted, rejected, ignored).',
|
|
1455
1476
|
mk_get_debate: 'Get a full debate by ID: question, opinions, consensus, verdict.',
|
|
1456
1477
|
// Objects — new tools
|
|
@@ -1500,7 +1521,7 @@ export const EN_DESCRIPTIONS = {
|
|
|
1500
1521
|
get_comment_reactions: 'Get reactions on an object comment. Returns: { commentId, reactions: [{ emoji, count, authors }] }.',
|
|
1501
1522
|
// Workspace templates & bots
|
|
1502
1523
|
save_workspace_template: 'Save a workspace as a template. Requires admin/owner in the source workspace. Provide source_slug, name, slug; optional description, icon, visibility (private|org|public), include_data.',
|
|
1503
|
-
apply_workspace_template: 'Apply a template to an EXISTING workspace (creating a new one from a template is a separate tool). Requires admin/owner. dry_run=true shows the plan without changes. Requires confirmation.',
|
|
1524
|
+
apply_workspace_template: 'Apply a template to an EXISTING workspace (creating a new one from a template is a separate tool). Requires admin/owner. dry_run=true shows the plan without changes. Optional blocks: array of block keys to carry (omit = whole template, [] = skeleton only). Requires confirmation.',
|
|
1504
1525
|
leave_workspace: 'Leave a workspace yourself. Owners and the last admin cannot leave — the service refuses. Requires confirmation.',
|
|
1505
1526
|
update_workspace_template: 'Update workspace template metadata: name, description, icon, visibility. Only the template owner can change it.',
|
|
1506
1527
|
delete_workspace_template: 'Delete a workspace template by ID. Irreversible — requires confirmation.',
|
|
@@ -1526,6 +1547,13 @@ export const EN_DESCRIPTIONS = {
|
|
|
1526
1547
|
add_portal_order_item: 'Add a product to a portal order (admin): creates a child item record; the price is taken from the product unless given. Returns: { id, name, qty, price, variant }.',
|
|
1527
1548
|
collect_portal_order_items: 'Portal order assembly (admin), one tool with action: collect_all (default) — mark ALL items collected and move a "Picking" order to "Picked"; check — verify whether all items are collected (no changes); toggle — flip the "collected" flag of ONE item (needs itemId).',
|
|
1528
1549
|
merge_portal_orders: 'Merge portal orders (admin): donor items move to the master order, donors get "Cancelled" status with a comment, empty master fields are filled from donors, the amount is recalculated. All orders must belong to one customer and not be in a terminal status. Reversible only manually. Requires confirmation.',
|
|
1550
|
+
// Portal client mutations (TD-012b)
|
|
1551
|
+
add_portal_cart_item: 'Add a product to a portal customer cart (admin, acts on behalf of the customer at their request): creates an item or increments the quantity of an existing one. Returns: { items: [{ id, objId, name, qty, price, variant }] }.',
|
|
1552
|
+
update_portal_cart_item: 'Change the quantity of a cart item for a portal customer (admin). Returns: { items }; when the item does not exist — { error: "NOT_FOUND" }.',
|
|
1553
|
+
remove_portal_cart_item: 'Remove an item from a portal customer cart (admin). Returns: { items }; when the item does not exist — { error: "NOT_FOUND" }.',
|
|
1554
|
+
clear_portal_cart: 'Completely clear a portal customer cart (admin): IRREVERSIBLY deletes ALL items of someone else\'s cart. Requires confirmation.',
|
|
1555
|
+
create_portal_ticket: 'Open a support ticket on behalf of a portal customer (admin): a ticket in the support module linked to the customer with an initial status. Returns: { id, subject }.',
|
|
1556
|
+
create_portal_order: 'Place a portal order on behalf of a customer (admin): creates a REAL order with money — an order record with items at server catalog prices. WITHOUT idempotencyKey a repeated call creates a DUPLICATE order — pass the key on retries. Requires confirmation.',
|
|
1529
1557
|
// Portal
|
|
1530
1558
|
invoke_server_function: 'Execute a codespace server function (api/<name>.js in the workspace git repo). Arbitrary code in a sandbox — requires confirmation. Optional idempotencyMinutes suppresses retries with identical args within an N-minute window — enable for functions with external side effects.',
|
|
1531
1559
|
list_portal_config_history: 'List portal config snapshot history (admin): recent saves with dates and authors. Call BEFORE restore_portal_config.',
|
|
@@ -1622,7 +1650,7 @@ export const EN_DESCRIPTIONS = {
|
|
|
1622
1650
|
delete_object: 'Delete a RECORD (object/row) from a table (requires confirmation). NOT for deleting tables — use delete_table for that. Returns: { message }.',
|
|
1623
1651
|
semantic_search: 'Semantic search across the whole workspace — finds meaningfully similar objects and documents. Use to find "something about X" without an exact name. Do NOT use for structural queries or when you already know the typeId.',
|
|
1624
1652
|
// Graph
|
|
1625
|
-
get_related: 'Find related
|
|
1653
|
+
get_related: 'Find objects related to a given one through the knowledge graph of the workspace. Shows records connected to the object via ref columns and child tables.',
|
|
1626
1654
|
graph_query: 'Run an arbitrary read-only SQL query against graph tables (graph_objects, graph_edges). SELECT only. Tables are automatically scoped to the current workspace — no WHERE db = $1 needed.',
|
|
1627
1655
|
upsert_graph_node: 'Create or update a graph node. If a node with this objId exists, it is updated.',
|
|
1628
1656
|
delete_graph_node: 'Delete a graph node together with all its edges. Irreversible.',
|
|
@@ -1700,11 +1728,11 @@ export const EN_DESCRIPTIONS = {
|
|
|
1700
1728
|
list_reports: 'List all reports. Returns: { items:[{id,name}], total }.',
|
|
1701
1729
|
describe_report: 'Get report structure: columns and settings (func, where, storedFrom/To, havingFrom/To).',
|
|
1702
1730
|
create_report: 'Create a report. parentTypeId=9001 for a user-permissions report (admin only). Returns: { id, type:"report", message }.',
|
|
1703
|
-
update_report: 'Modify a report: name, icon, WHERE filter. WHERE supports [USER] [USER_ID] [TODAY] [NOW]. A column alias in WHERE is "c" + column id (from add_report_column or describe_report). Returns: { id, type:"report", message }.',
|
|
1731
|
+
update_report: 'Modify a report: name, icon, WHERE filter. WHERE supports [USER] [USER_ID] [TODAY] [NOW]. A column alias in WHERE is "c" + column id (from add_report_column or describe_report). Subqueries are allowed: the workspace table must be referenced only via the {{DB}} placeholder (e.g. FROM {{DB}} _t), and a subquery alias must start with an underscore (AS _sub, not AS sub; _abc123 is fine). Forbidden: ";", SQL comments (-- and /* */), $$ quoting. Example: AND c123.val IN (SELECT id FROM {{DB}} _t WHERE _t.t = 3) where 123 is the real column id. Returns: { id, type:"report", message }.',
|
|
1704
1732
|
delete_report: 'Delete a report (requires confirmation). Returns: { message }.',
|
|
1705
1733
|
add_report_column: 'Add a column to a report. Returns the column id — use it for WHERE in update_report: alias = "c" + id. Do NOT add a column named after the record title (_value / valueColumnName) — it is already shown as the first report column automatically. Passing valueColumnName (e.g. the title column) as columnAlias creates a broken column with reqTypeId=0 and the report shows "NaN". For a virtual permissions report reqTypeId: 9011=User, 9012=Role, 9013=Object type, 9014=Access level, 9015=Export, 9016=Delete. Returns: { id, type:"report_column", message }.',
|
|
1706
1734
|
update_report_column: 'Modify a report column: func (aggregation), displayName, default filter (storedFrom/storedTo), HAVING for aggregates (havingFrom/havingTo), hidden, totalFunc. Returns: { id, type:"report_column", message }.',
|
|
1707
|
-
delete_report_column: 'Remove a column from a report. Returns: { message }.',
|
|
1735
|
+
delete_report_column: 'Remove a column from a report (requires confirmation). Returns: { message }.',
|
|
1708
1736
|
reorder_report_columns: 'Change report column order. order — array of colIds in the desired order.',
|
|
1709
1737
|
get_report_history: 'Show report change history (audit: creation, renaming, column changes).',
|
|
1710
1738
|
export_report: 'Export report data to CSV. Returns a CSV string with header and data. Returns: { csv, filename, rowCount }.',
|
|
@@ -1805,7 +1833,7 @@ export const EN_DESCRIPTIONS = {
|
|
|
1805
1833
|
delete_connector: 'Delete a connector (requires confirmation). Returns: { message }.',
|
|
1806
1834
|
run_connector: 'Run a connector (requires confirmation — may send data to an external system). Returns: { id, type:"connector", message }.',
|
|
1807
1835
|
discover_connector_schema: 'Discover the external system schema via OData $metadata. Connects to the connector server, loads the structure (tables, fields, types) and proposes a mapping to Integram types. Works with 1C OData, SAP OData and other OData sources. Returns: { entities: [{name, synonym, type, fields, autoMapping}], url, total }.',
|
|
1808
|
-
reconcile_cdek: 'Reconcile CDEK order statuses with the API. Checks orders with a UUID in "In delivery" status, updates when CDEK reports delivered/pickup/return. Run manually or by cron.',
|
|
1836
|
+
reconcile_cdek: 'Reconcile CDEK order statuses with the API. Checks orders with a UUID in "In delivery" status, updates when CDEK reports delivered/pickup/return. Run manually or by cron (requires confirmation).',
|
|
1809
1837
|
fetch_api_docs: 'Fetch API documentation by URL (OpenAPI/Swagger, HTML). Use before generate_connector_config to analyze the API. Returns: { source, content, endpoints }.',
|
|
1810
1838
|
generate_connector_config: 'Generate connector config from the API structure (LLM). Use fetch_api_docs, then generate_connector_config, then test_connector_draft, then create_connector. Returns: { config, placeholders }.',
|
|
1811
1839
|
test_connector_draft: 'Test-run a connector draft (requires confirmation — makes a real HTTP request). Returns: { ok, status, data }.',
|
|
@@ -1813,6 +1841,9 @@ export const EN_DESCRIPTIONS = {
|
|
|
1813
1841
|
// Object history
|
|
1814
1842
|
get_object_history: 'Show object change history (audit).',
|
|
1815
1843
|
rollback_object: 'Roll an object back to the state before the specified change (requires confirmation). Returns: { id, type:"object", message }.',
|
|
1844
|
+
list_object_versions: 'List row versions (В1, В2, …) of a record — snapshots of the row together with its child tables.',
|
|
1845
|
+
create_object_version: 'Create a new version (Вn) of a record: snapshot of the row and ALL its child tables. Optional value/requisites are applied before the snapshot — an edit becomes a new version instead of overwriting cells.',
|
|
1846
|
+
activate_object_version: 'Switch a record to version Вn: live rows are replaced with the version content; the current state is auto-saved as a new version first (requires confirmation).',
|
|
1816
1847
|
// Comments
|
|
1817
1848
|
list_comments: 'Show comments on an object. Returns: { items:[{id,text,author}], total }.',
|
|
1818
1849
|
create_comment: 'Add a comment to an object. Returns: { id, type:"comment", message }.',
|
|
@@ -1864,7 +1895,7 @@ export const EN_DESCRIPTIONS = {
|
|
|
1864
1895
|
// Member management
|
|
1865
1896
|
invite_member: 'Invite a user to the workspace by email (admin only).',
|
|
1866
1897
|
remove_member: 'Remove a member from the workspace (admin only, requires confirmation).',
|
|
1867
|
-
update_member_role: 'Change the role of a workspace member (admin only).',
|
|
1898
|
+
update_member_role: 'Change the role of a workspace member (admin only, requires confirmation).',
|
|
1868
1899
|
// Schema detail
|
|
1869
1900
|
get_table_schema: 'Get the detailed schema of a table by typeId (ID from list_tables). Parameter: typeId (integer). Returns: { id, type:"table", name, columns:[{id, name, type, refTable?, refTableId?, multi?}] }. Ref columns: refTable is the target table name, refTableId its typeId.',
|
|
1870
1901
|
// KAG
|
|
@@ -1878,7 +1909,7 @@ export const EN_DESCRIPTIONS = {
|
|
|
1878
1909
|
kag_browse: 'Browse KAG entities filtered by type and source. Returns the entity list and available types.',
|
|
1879
1910
|
kag_clusters: 'Cluster entities by type and degree centrality. Shows which entity types are most connected.',
|
|
1880
1911
|
kag_anomalies: 'Detect anomalies in the knowledge graph: hubs (over-connected nodes) and isolated entities (no relations).',
|
|
1881
|
-
kag_delete: 'Delete KAG data. Can delete everything or only a specific source. Removes relations, entities and classes.',
|
|
1912
|
+
kag_delete: 'Delete KAG data. Can delete everything or only a specific source. Removes relations, entities and classes. Irreversible.',
|
|
1882
1913
|
kag_update_tags: 'Update entity tags in KAG. Tags are used for access control and filtering.',
|
|
1883
1914
|
// View sharing
|
|
1884
1915
|
share_view: 'Create a public link to a table view (optional password and expiry).',
|
|
@@ -1889,9 +1920,9 @@ export const EN_DESCRIPTIONS = {
|
|
|
1889
1920
|
get_record_share: 'Get the current public access token of a record.',
|
|
1890
1921
|
revoke_record_share: 'Revoke the public link of a record (requires confirmation).',
|
|
1891
1922
|
// Aggregate
|
|
1892
|
-
aggregate_objects: 'Aggregate table data — SUM, AVG, COUNT, MIN, MAX over columns. Returns computed values.
|
|
1893
|
-
group_objects: 'Group records by a column with a count per group.',
|
|
1894
|
-
pivot_objects: 'Pivot table — rows by one column, columns by another, values = an aggregate. valueField — numeric column id for the aggregate; agg — COUNT|SUM|AVG|MIN|MAX, default COUNT, SUM with valueField. SUM/AVG/MIN/MAX without valueField return a 400 error. Ref columns are read in both storage patterns, pivot keys are target names.',
|
|
1923
|
+
aggregate_objects: 'Aggregate table data — SUM, AVG, COUNT, MIN, MAX over columns. Returns computed values. Filters are not supported and are rejected with a 400 error; columns[] is supported.',
|
|
1924
|
+
group_objects: 'Group records by a column with a count per group. Does not accept filters (rejected with a 400 error); per-column filtering uses the filter (DSL) param.',
|
|
1925
|
+
pivot_objects: 'Pivot table — rows by one column, columns by another, values = an aggregate. valueField — numeric column id for the aggregate; agg — COUNT|SUM|AVG|MIN|MAX, default COUNT, SUM with valueField. SUM/AVG/MIN/MAX without valueField return a 400 error. Ref columns are read in both storage patterns, pivot keys are target names. Filters are not supported and are rejected with a 400 error.',
|
|
1895
1926
|
// Dashboards
|
|
1896
1927
|
list_dashboards: 'List workspace dashboards with widget counts.',
|
|
1897
1928
|
get_dashboard: 'Get a dashboard by ID — title, widget list with types and configuration, grid layout.',
|
|
@@ -1924,8 +1955,8 @@ export const EN_DESCRIPTIONS = {
|
|
|
1924
1955
|
check_agent_health: 'Check external agent availability (health check).',
|
|
1925
1956
|
get_agent_tasks: 'Task history of an external agent: statuses, results, errors.',
|
|
1926
1957
|
// Portal
|
|
1927
|
-
get_portal_config: 'Get the current portal config of the workspace: active flag, custom domain, module config.',
|
|
1928
|
-
set_portal_config: 'Create or update the portal config (branding, auth, pages). Without merge — full replacement. With merge: true — deep-merge a partial config into the existing one (no need to pass the whole config). Writes verify references: custom_code repo/file and bindings table:N must exist in this workspace — otherwise REPO_NOT_IN_WORKSPACE / FILE_NOT_IN_REPO / TABLE_NOT_IN_WORKSPACE (defects already present in the previous config do not block the edit). The previous config is pushed to history before writing (GET /portal/api/config/history, rollback via POST /portal/api/config/restore). Editing one module — update_portal_module(slug, config). NOT for access rights: grants — set_grant. Requires confirmation.',
|
|
1958
|
+
get_portal_config: 'Get the current portal config of the workspace: active flag, custom domain, module config. config.auth.requireAuth (boolean) closes the whole portal for anonymous visitors (API answers 401 except /api/config, /api/auth/*, /api/files/*, /api/bots*, webhooks; pages redirect to /auth); config.auth.allowRegistration (boolean, default true) — when false, only EXISTING clients can log in (new client creation is refused with REGISTRATION_CLOSED).',
|
|
1959
|
+
set_portal_config: 'Create or update the portal config (branding, auth, pages). Without merge — full replacement. With merge: true — deep-merge a partial config into the existing one (no need to pass the whole config). Writes verify references: custom_code repo/file and bindings table:N must exist in this workspace — otherwise REPO_NOT_IN_WORKSPACE / FILE_NOT_IN_REPO / TABLE_NOT_IN_WORKSPACE (defects already present in the previous config do not block the edit). The previous config is pushed to history before writing (GET /portal/api/config/history, rollback via POST /portal/api/config/restore). Editing one module — update_portal_module(slug, config). config.auth.requireAuth: true closes the WHOLE portal: anonymous API answers 401 (open only /api/config, /api/auth/*, /api/files/*, /api/bots*, CDEK/UDS webhooks) and pages redirect to /auth — warn the user that guest storefront (guest orders, cart, catalog) becomes unavailable, and requireAuth/allowRegistration must be booleans. config.auth.allowRegistration: false forbids creating a new client at login (existing clients only). NOT for access rights: grants — set_grant. Requires confirmation.',
|
|
1929
1960
|
update_portal_module: 'Update the config of a single portal module (by slug) without overwriting the rest. Deep merge: nested objects (e.g. bindings) merge by key; `null` deletes a key; arrays and scalars are replaced wholesale. Reference checks as in set_portal_config: repo/file/bindings must exist in this workspace. NOT for dashboards: editing a dashboard — update_dashboard(id). Full config replacement — set_portal_config.',
|
|
1930
1961
|
portal_preview: 'Get the portal preview URL.',
|
|
1931
1962
|
portal_publish: 'Enable (active=true) or disable (active=false) the portal. Requires confirmation.',
|
|
@@ -1990,7 +2021,7 @@ export const EN_DESCRIPTIONS = {
|
|
|
1990
2021
|
get_diff_range: 'Diff between two branches or commits. Returns: { diff }.',
|
|
1991
2022
|
remove_github_sync: 'Remove the GitHub binding of a repository. Irreversible.',
|
|
1992
2023
|
get_evidence_card: 'Get an evidence card for a pull request — an AI-generated card with change analysis.',
|
|
1993
|
-
commit_portal_component: 'Write a generated Vue SFC component into a codespace repository for use in a portal custom_code module. The repository is created automatically if it does not exist.',
|
|
2024
|
+
commit_portal_component: 'Write a generated Vue SFC component into a codespace repository for use in a portal custom_code module. The repository is created automatically if it does not exist. Requires confirmation.',
|
|
1994
2025
|
kit_list_components: 'List @kit library building blocks for portals: value reading/recovery helpers, empty-state handling, components. Returns name, kind and a one-line summary. Take the version from the kit field of the custom_code module config; without a version the latest published one is used. Returns: { version, builtAt, items:[{name,kind,summary,module}], total, catalogTotal }. Errors distinguish "library not published", "version missing", "version exists but has no catalog" and "catalog unreadable" — an empty list only means an empty filter.',
|
|
1995
2026
|
kit_get_component: 'Details of a single @kit building block: module, kind, description, props, slots, and uiKeys for components. Unknown names return an error with similar names. uiKeys — node keys that accept custom classes via the ui prop: <DataTable :ui="{ row: \'my-row\' }" />. Classes are appended to the block own classes, not replacing them. A key not present in uiKeys does not exist: the block will not accept it and warns in the console — never invent node names. There is no uiKeys field at all when the block has no own nodes (headless) or the version predates the release where the ui prop appeared. Returns: { version, name, kind, summary, module, props?, slots?, uiKeys? }.',
|
|
1996
2027
|
kit_get_tokens: 'Dictionary of @kit library styling tokens: CSS variable names that define color, spacing, radius, font and motion of the building blocks, plus stable class names of each block. CALL BEFORE writing styles for @kit blocks: a name absent here does not exist — an invented name resolves to nothing and the component comes out structurally correct with zero styling. Each token carries a usage field — a ready-made string like var(--kit-color-text, var(--color-text, #1f2328)); write it in full, including the fallback value. Returns: { version, builtAt, items:[{name,kind,purpose,usage,fallback,shell}], total, catalogTotal, kinds, shellTokens, byComponent:[{name,layer,tokens,classes}] }. Errors: KIT_TOKENS_MISSING — the version has no dictionary (introduced after 0.4.0), KIT_NO_STYLING — the block has no markup.',
|
|
@@ -2010,9 +2041,9 @@ export const EN_DESCRIPTIONS = {
|
|
|
2010
2041
|
record_timeseries: 'Record one or more timeseries points.',
|
|
2011
2042
|
query_timeseries: 'Query a timeseries with aggregation.',
|
|
2012
2043
|
list_timeseries_sources: 'List timeseries sources in the workspace.',
|
|
2013
|
-
ask_advisor: 'Ask the platform expert — advice on schema design, best practices, troubleshooting, feature explanations. Returns: { advice }.',
|
|
2044
|
+
ask_advisor: 'Ask the platform expert — advice on schema design, best practices, troubleshooting, feature explanations. Gives a detailed advice grounded in the current workspace schema. Returns: { advice }.',
|
|
2014
2045
|
web_search: 'Search the internet. Returns a list of results with title, URL and snippet. Use for price lookups, product info, current data from open sources. Returns: { query, results:[{title, url, snippet}], total }.',
|
|
2015
|
-
list_platform_capabilities: 'Full list of platform capabilities by category: data, columns, analytics, automations, documents, integrations, security, portal, AI, graph. Returns: { items:[{category, features}] }.',
|
|
2046
|
+
list_platform_capabilities: 'Full list of platform capabilities by category: data, columns, analytics, automations, documents, integrations, security, portal, AI, graph. Use when the user asks "what can the platform do?" or "what features are there?". Returns: { items:[{category, features}] }.',
|
|
2016
2047
|
docs_map: 'Map of the platform documentation: which documents exist, what each covers and when it last changed. Start here for questions about how the platform works. Returns: { total, areas, docs:[{path, area, module, title, summary, updatedAt}] }.',
|
|
2017
2048
|
docs_read: 'Read a documentation page in full or a single section. Take the path from docs_map or docs_search. Long text is read in pages: when hasMore=true pass nextOffset as offset. Returns: { path, title, section, headings, text, totalChars, hasMore, lastCommit }.',
|
|
2018
2049
|
docs_search: 'Find a place in the platform documentation: hybrid search (meaning + exact names) over fragments with document and section references. An empty result means "not in the found documents", NOT "absent from the documentation". Returns: { results:[{path, section, text, citation, score}], total }.',
|
|
@@ -2029,13 +2060,13 @@ export const EN_DESCRIPTIONS = {
|
|
|
2029
2060
|
retry_webhook_delivery: 'Retry a webhook delivery (for failed attempts). Returns: { success, deliveryId }.',
|
|
2030
2061
|
delete_notification: 'Delete a user notification by ID. Returns: { message }.',
|
|
2031
2062
|
// Workspace invitations
|
|
2032
|
-
list_workspace_invitations: 'List active workspace invitations (email, role, status). Returns: { items, total }.',
|
|
2033
|
-
cancel_workspace_invitation: 'Cancel a workspace invitation by ID. Returns: { message }.',
|
|
2063
|
+
list_workspace_invitations: 'List active workspace invitations (admin only; email, role, status). Returns: { items, total }.',
|
|
2064
|
+
cancel_workspace_invitation: 'Cancel a workspace invitation by ID (admin only, requires confirmation). Returns: { message }.',
|
|
2034
2065
|
// Object backlinks
|
|
2035
2066
|
get_object_backlinks: 'Find all records referencing this object (mentions, ref fields). Returns: { items:[{id, typeId, typeName, fieldName}], total }.',
|
|
2036
2067
|
// Report joins
|
|
2037
|
-
create_report_join: 'Add a JOIN to a report to combine it with another table. Returns: { joinId, ... }.',
|
|
2038
|
-
delete_report_join: 'Remove a JOIN from a report by ID. Returns: { deleted }.',
|
|
2068
|
+
create_report_join: 'Add a JOIN to a report to combine it with another table. For child tables the JOIN to the parent table is auto-detected (child→parent via a.up). Without leftField/rightColId no ON condition is generated — the default pattern is used. The alias is needed to bind columns via joinAlias in add_report_column. Returns: { joinId, ... }.',
|
|
2069
|
+
delete_report_join: 'Remove a JOIN from a report by ID (requires confirmation). Returns: { deleted }.',
|
|
2039
2070
|
// Teamchat
|
|
2040
2071
|
send_teamchat_message: 'Send a message to a teamchat topic. Supports code_cell cards for executable code.',
|
|
2041
2072
|
get_decision: 'Get a decision by ID together with its links and discussions. Returns: { decision: {id, title, domain, verdict, description, chatRoomId, ...}, links: {rel_type: [{id, decisionId, title, direction}]}, discussions: {roomId, roomName, recentTopics} }.',
|
|
@@ -2067,9 +2098,9 @@ export const EN_DESCRIPTIONS = {
|
|
|
2067
2098
|
mark_topic_read: 'Mark all messages in a topic as read.',
|
|
2068
2099
|
export_topic_to_document: 'Export a chat topic to a document. Returns: { data: {documentId, url} }.',
|
|
2069
2100
|
// Activity Intelligence
|
|
2070
|
-
get_team_activity: '
|
|
2101
|
+
get_team_activity: 'Team activity stats: messages, closed topics, tasks (including overdue), decisions, debates, reactions per member. Hot topics, blockers, recent decisions.',
|
|
2071
2102
|
get_user_activity: 'Get activity for a specific user: messages, tasks (open/completed/overdue), decisions, blockers assigned to them.',
|
|
2072
|
-
generate_team_digest: '
|
|
2103
|
+
generate_team_digest: 'AI team digest: who completed what, blockers, overdue items, accepted decisions, participation balance.',
|
|
2073
2104
|
// Orgs
|
|
2074
2105
|
list_orgs: 'List organizations of the current user.',
|
|
2075
2106
|
get_org: 'Get organization info by slug.',
|
|
@@ -2146,9 +2177,15 @@ export const EN_DESCRIPTIONS = {
|
|
|
2146
2177
|
pm_start_sprint: 'Start a sprint (changes status to active).',
|
|
2147
2178
|
pm_complete_sprint: 'Complete a sprint (moves incomplete issues to backlog).',
|
|
2148
2179
|
pm_delete_sprint: 'Delete a sprint.',
|
|
2149
|
-
pm_get_board: 'Get the Kanban board view (issues grouped by status columns).',
|
|
2150
|
-
pm_get_backlog: 'Get the backlog (unassigned issues not in any sprint).',
|
|
2180
|
+
pm_get_board: 'Get the Kanban board view (issues grouped by status columns). Optional filters: sprint_id, board_id, milestone_id, show_all, labels.',
|
|
2181
|
+
pm_get_backlog: 'Get the backlog (unassigned issues not in any sprint). Optionally filter by milestone with milestone_id.',
|
|
2151
2182
|
pm_get_sprint_progress: 'Get sprint progress (burndown, velocity, completion stats).',
|
|
2183
|
+
pm_list_milestones: 'List milestones with progress (issues/points done vs total) and effective_status: planned/active/completed, or missed when overdue.',
|
|
2184
|
+
pm_create_milestone: 'Create a milestone.',
|
|
2185
|
+
pm_update_milestone: 'Update an existing milestone.',
|
|
2186
|
+
pm_complete_milestone: 'Complete a milestone. Unclosed issues move to backlog (default) or to the next milestone with move_to set to next.',
|
|
2187
|
+
pm_delete_milestone: 'Delete a milestone. Issues are unlinked, not deleted.',
|
|
2188
|
+
pm_get_roadmap: 'Roadmap data: epic timeline ranges (computed from descendant issues) plus milestones with progress.',
|
|
2152
2189
|
pm_get_velocity: 'Get velocity metrics for completed sprints — done points, total points, average velocity.',
|
|
2153
2190
|
pm_get_burndown: 'Get burndown chart data for a sprint — remaining points per day with ideal line.',
|
|
2154
2191
|
pm_get_cycle_time: 'Get cycle time metrics — time from in_progress to done, with avg/median.',
|
|
@@ -2219,10 +2256,17 @@ export const EN_DESCRIPTIONS = {
|
|
|
2219
2256
|
vid_list_jobs: 'List video-engine jobs of the workspace.',
|
|
2220
2257
|
vid_cancel_job: 'Cancel a video-engine job (if it has not finished yet).',
|
|
2221
2258
|
vid_validate_scenario: 'Validate a video scenario against the schema without creating anything: returns normalized steps or errors.',
|
|
2259
|
+
vid_publish_job: 'Publish a finished video-engine job mp4 into workspace files: the file appears in Files and becomes servable to the portal via /portal/api/files/<filename>. Idempotent.',
|
|
2222
2260
|
// Financial model
|
|
2223
2261
|
fin_grid: 'Computed financial-model grid: period columns, rows with per-period values, totals and the sheet structure. scenario picks a scenario (defaults to the model first one), sheetId narrows to one sheet. Rows with an id like "g123" are group subtotals and have no record in the database.',
|
|
2224
2262
|
fin_graph: 'Dependency graph of a financial model: the order cells are computed in and which cell depends on which. A circular reference is returned in the cycle field with an empty order — in that case the grid does not compute at all.',
|
|
2225
2263
|
fin_goal_seek: 'Goal seek: which levers bring a target cell to the wanted value. target.rowId is a row id (or "g123" for a group subtotal), levers are input rows that may change, with optional min/max bounds. Without apply:true it only computes; with apply:true it writes the solution, and only when the target was reached. Failure is named in reason: unknown_target, no_sensitivity, flat, bounds, no_convergence.',
|
|
2264
|
+
// Synced lookups (external lookup tables pulled from another workspace)
|
|
2265
|
+
synced_lookup_create: 'Attach an external lookup: the local table becomes a synced copy of a table from another workspace. Requires access to the source workspace.',
|
|
2266
|
+
synced_lookup_delete: 'Detach an external lookup: removes the sync config (the target table keeps its data). Requires confirmation (TIER_HIGH).',
|
|
2267
|
+
synced_lookup_list: 'List external lookups of the current workspace with their schedules and last sync status.',
|
|
2268
|
+
synced_lookup_reschedule: 'Change the sync schedule of an external lookup.',
|
|
2269
|
+
synced_lookup_sync: 'Run the sync of an external lookup immediately.',
|
|
2226
2270
|
|
|
2227
2271
|
};
|
|
2228
2272
|
|
|
@@ -2316,16 +2360,22 @@ async function dispatchTool(request) {
|
|
|
2316
2360
|
}
|
|
2317
2361
|
// Re-call the tool with the elicited answer injected into args
|
|
2318
2362
|
const originalArgs = args || {};
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2363
|
+
let resumeData;
|
|
2364
|
+
try {
|
|
2365
|
+
resumeData = await apiFetch(`/api/v2/${workspace}/ai/tool`, {
|
|
2366
|
+
method: 'POST',
|
|
2367
|
+
body: JSON.stringify({
|
|
2368
|
+
name,
|
|
2369
|
+
args: { ...originalArgs, elicitedAnswer: elicitResult.content },
|
|
2370
|
+
threadId: data?.data?.threadId,
|
|
2371
|
+
schemaCtx: null,
|
|
2372
|
+
}),
|
|
2373
|
+
headers: { 'Content-Type': 'application/json' },
|
|
2374
|
+
});
|
|
2375
|
+
} catch (resumeErr) {
|
|
2376
|
+
// TD-065: отказ повторного вызова — ошибка тула, а не «требуется ввод»
|
|
2377
|
+
return toolErrorResult(resumeErr);
|
|
2378
|
+
}
|
|
2329
2379
|
return {
|
|
2330
2380
|
content: [{ type: 'text', text: typeof resumeData.data === 'string' ? resumeData.data : JSON.stringify(resumeData.data) }],
|
|
2331
2381
|
};
|
|
@@ -2352,7 +2402,7 @@ async function dispatchTool(request) {
|
|
|
2352
2402
|
content: [{ type: 'text', text: typeof result === 'string' ? result : JSON.stringify(result, null, 2) }],
|
|
2353
2403
|
};
|
|
2354
2404
|
} catch (err) {
|
|
2355
|
-
return
|
|
2405
|
+
return toolErrorResult(err);
|
|
2356
2406
|
}
|
|
2357
2407
|
}
|
|
2358
2408
|
|
|
@@ -2386,10 +2436,16 @@ async function handleConfirmAction(approved, confirmId) {
|
|
|
2386
2436
|
} else {
|
|
2387
2437
|
// Backend HITL — proxy to /mcp-resume
|
|
2388
2438
|
await ensureAuth();
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2439
|
+
let data;
|
|
2440
|
+
try {
|
|
2441
|
+
data = await apiFetch(`/api/v2/${workspace}/ai/mcp-resume`, {
|
|
2442
|
+
method: 'POST',
|
|
2443
|
+
body: JSON.stringify({ threadId: pending.threadId, approved }),
|
|
2444
|
+
});
|
|
2445
|
+
} catch (resumeErr) {
|
|
2446
|
+
// TD-065: раньше отказ /mcp-resume читался как текст успеха
|
|
2447
|
+
return toolErrorResult(resumeErr);
|
|
2448
|
+
}
|
|
2393
2449
|
msg = data.data?.message || (approved ? 'Action confirmed and executed.' : 'Action rejected.');
|
|
2394
2450
|
}
|
|
2395
2451
|
|
|
@@ -2402,7 +2458,7 @@ async function handleConfirmAction(approved, confirmId) {
|
|
|
2402
2458
|
|
|
2403
2459
|
// ─── create_workspace handler ─────────────────────────────────────────────────
|
|
2404
2460
|
|
|
2405
|
-
async function handleCreateWorkspace({ name, slug, template, templateId }) {
|
|
2461
|
+
async function handleCreateWorkspace({ name, slug, template, templateId, blocks }) {
|
|
2406
2462
|
if (!name || !slug) {
|
|
2407
2463
|
return { content: [{ type: 'text', text: 'Error: name and slug are required' }], isError: true };
|
|
2408
2464
|
}
|
|
@@ -2414,6 +2470,10 @@ async function handleCreateWorkspace({ name, slug, template, templateId }) {
|
|
|
2414
2470
|
const body = { name, slug };
|
|
2415
2471
|
if (templateId) body.templateId = templateId;
|
|
2416
2472
|
else if (template) body.template = template;
|
|
2473
|
+
// blocks едут как есть: отсутствие поля = «весь шаблон», [] = «только
|
|
2474
|
+
// основа» — различение держит REST-схема (blockPickSchema), здесь его не
|
|
2475
|
+
// стирать: `if (blocks)` не отличает [] от отсутствия, что и требуется.
|
|
2476
|
+
if (Array.isArray(blocks)) body.blocks = blocks;
|
|
2417
2477
|
const data = await apiFetch('/api/v2/workspaces', {
|
|
2418
2478
|
method: 'POST',
|
|
2419
2479
|
body: JSON.stringify(body),
|
|
@@ -2658,6 +2718,7 @@ export const GROUP_ALIASES = {
|
|
|
2658
2718
|
lookups: 'lookups', lookup: 'lookups', справочник: 'lookups',
|
|
2659
2719
|
'meta-kb': 'meta-kb', metakb: 'meta-kb', дебат: 'meta-kb', дискусси: 'meta-kb',
|
|
2660
2720
|
pm: 'pm', проект: 'pm', задач: 'pm', спринт: 'pm', канбан: 'pm', бэклог: 'pm', issue: 'pm', sprint: 'pm', backlog: 'pm', board: 'pm',
|
|
2721
|
+
встреч: 'meetings', совещан: 'meetings', meeting: 'meetings',
|
|
2661
2722
|
// Средства уровня области: без этих слов группа звалась только точным
|
|
2662
2723
|
// именем `workspace-tools`. Пришли из бэкендового словаря при сведении.
|
|
2663
2724
|
инструмент: 'workspace-tools', пакет: 'workspace-tools', организац: 'orgs',
|
|
@@ -2875,9 +2936,17 @@ export function findSimilarTools(name, catalog, limit = 3) {
|
|
|
2875
2936
|
* с ПРЯМЫМ запретом подмены; неактивный — с подсказкой активировать группу.
|
|
2876
2937
|
*/
|
|
2877
2938
|
export function buildNotActiveText(name, catalog, activeNames) {
|
|
2939
|
+
// PM-103: имени нет в каталоге — это не «не активен», а «такого тула нет».
|
|
2940
|
+
// Общий текст «is not active» модель читает как «имя неверное, попробую соседнее».
|
|
2941
|
+
const known = catalog.some((t) => t.name === name);
|
|
2942
|
+
if (!known) {
|
|
2943
|
+
return `Error: Unknown tool "${name}" — no such tool in the integram catalog. ` +
|
|
2944
|
+
`Do NOT call a different tool instead. Check the name, or use search_tools to discover the right one.`;
|
|
2945
|
+
}
|
|
2878
2946
|
const similar = findSimilarTools(name, catalog);
|
|
2879
2947
|
if (!similar.length) {
|
|
2880
|
-
return `Error: Tool "${name}" is not active. Use search_tools to discover and activate it first
|
|
2948
|
+
return `Error: Tool "${name}" is not active. Use search_tools to discover and activate it first. ` +
|
|
2949
|
+
`Do NOT call a different tool instead — substitution answers the wrong question.`;
|
|
2881
2950
|
}
|
|
2882
2951
|
const activeSet = new Set(activeNames);
|
|
2883
2952
|
const activeHits = similar.filter((t) => activeSet.has(t.name));
|
package/package.json
CHANGED