@deadragdoll/tellymcp 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/.env.example.client +42 -50
  2. package/.env.example.gateway +49 -61
  3. package/CHANGELOG.md +3 -3
  4. package/README-ru.md +205 -384
  5. package/README.md +195 -1194
  6. package/TOOLS.md +294 -377
  7. package/VERSION.md +36 -10
  8. package/config/codex/plugins/telly-workflows/.codex-plugin/plugin.json +18 -0
  9. package/config/codex/plugins/telly-workflows/references/invariants.md +10 -0
  10. package/config/codex/plugins/telly-workflows/skills/telly-browser-screenshot/SKILL.md +27 -0
  11. package/config/codex/plugins/telly-workflows/skills/telly-collab-artifact/SKILL.md +22 -0
  12. package/config/codex/plugins/telly-workflows/skills/telly-human-telegram/SKILL.md +31 -0
  13. package/config/codex/plugins/telly-workflows/skills/telly-partner-note/SKILL.md +36 -0
  14. package/config/templates/env.both.template +40 -20
  15. package/config/templates/env.client.template +34 -18
  16. package/config/templates/env.gateway.template +38 -22
  17. package/dist/cli.js +322 -75
  18. package/dist/codexPluginInstaller.js +215 -0
  19. package/dist/lib/mixins/session.errors.js +34 -1
  20. package/dist/lib/pinoTargets.js +2 -2
  21. package/dist/moleculer.config.js +7 -5
  22. package/dist/services/features/telegram-mcp/approval.service.js +1 -1
  23. package/dist/services/features/telegram-mcp/browser.service.js +95 -2
  24. package/dist/services/features/telegram-mcp/collaboration.service.js +41 -4
  25. package/dist/services/features/telegram-mcp/ensuredb.service.js +145 -26
  26. package/dist/services/features/telegram-mcp/gateway-delivery.service.js +285 -103
  27. package/dist/services/features/telegram-mcp/gateway-rmq.service.js +3 -2
  28. package/dist/services/features/telegram-mcp/gateway-socket.service.js +905 -87
  29. package/dist/services/features/telegram-mcp/gateway.service.js +876 -81
  30. package/dist/services/features/telegram-mcp/mcp-http.service.js +9 -1
  31. package/dist/services/features/telegram-mcp/mcp-server.service.js +17 -26
  32. package/dist/services/features/telegram-mcp/notify.service.js +128 -2
  33. package/dist/services/features/telegram-mcp/runtime.service.js +27 -7
  34. package/dist/services/features/telegram-mcp/session-context.service.js +29 -2
  35. package/dist/services/features/telegram-mcp/src/app/bootstrap/runtime.js +133 -10
  36. package/dist/services/features/telegram-mcp/src/app/config/env.js +161 -51
  37. package/dist/services/features/telegram-mcp/src/app/http.js +375 -42
  38. package/dist/services/features/telegram-mcp/src/app/webapp/assets.js +386 -58
  39. package/dist/services/features/telegram-mcp/src/app/webapp/auth.js +3 -0
  40. package/dist/services/features/telegram-mcp/src/app/webapp/terminal.js +12 -0
  41. package/dist/services/features/telegram-mcp/src/entities/request/model/schema.js +116 -104
  42. package/dist/services/features/telegram-mcp/src/entities/xchange/model/types.js +2 -0
  43. package/dist/services/features/telegram-mcp/src/features/ask-user/model/askUserTelegram.js +1 -1
  44. package/dist/services/features/telegram-mcp/src/features/browser/model/browserScreenshotTool.js +1 -1
  45. package/dist/services/features/telegram-mcp/src/features/browser/model/browserService.js +249 -19
  46. package/dist/services/features/telegram-mcp/src/features/collaboration/model/gatewaySessionsService.js +71 -0
  47. package/dist/services/features/telegram-mcp/src/features/collaboration/model/listGatewaySessionsTool.js +33 -0
  48. package/dist/services/features/telegram-mcp/src/features/collaboration/model/localCollaborationBackend.js +93 -82
  49. package/dist/services/features/telegram-mcp/src/features/collaboration/model/sendPartnerFileService.js +47 -5
  50. package/dist/services/features/telegram-mcp/src/features/collaboration/model/sendPartnerFileTool.js +1 -1
  51. package/dist/services/features/telegram-mcp/src/features/collaboration/model/sendPartnerNoteTool.js +1 -1
  52. package/dist/services/features/telegram-mcp/src/features/distributed-client/model/gatewayClientAccess.js +82 -0
  53. package/dist/services/features/telegram-mcp/src/features/distributed-client/model/gatewayCollaborationBackend.js +22 -14
  54. package/dist/services/features/telegram-mcp/src/features/distributed-gateway/model/gatewayHttpService.js +649 -75
  55. package/dist/services/features/telegram-mcp/src/features/distributed-gateway/model/remoteConsoleActionClient.js +76 -0
  56. package/dist/services/features/telegram-mcp/src/features/embedded-runtime/model/embeddedRuntimeBroker.js +92 -0
  57. package/dist/services/features/telegram-mcp/src/features/foreground-terminal/model/foregroundTerminalRuntime.js +192 -0
  58. package/dist/services/features/telegram-mcp/src/features/notify/model/notifyService.js +382 -3
  59. package/dist/services/features/telegram-mcp/src/features/notify/model/notifyTelegramTool.js +1 -1
  60. package/dist/services/features/telegram-mcp/src/features/notify/model/sendFileToTelegramTool.js +33 -0
  61. package/dist/services/features/telegram-mcp/src/features/session-context/model/clearSessionContextTool.js +1 -1
  62. package/dist/services/features/telegram-mcp/src/features/session-context/model/getSessionContextTool.js +1 -1
  63. package/dist/services/features/telegram-mcp/src/features/session-context/model/renameSessionTool.js +1 -1
  64. package/dist/services/features/telegram-mcp/src/features/session-context/model/sessionContextService.js +42 -200
  65. package/dist/services/features/telegram-mcp/src/features/session-context/model/setSessionContextTool.js +1 -1
  66. package/dist/services/features/telegram-mcp/src/features/terminal-buffer/model/terminalBufferService.js +96 -0
  67. package/dist/services/features/telegram-mcp/src/features/terminal-input/model/terminalInputService.js +97 -0
  68. package/dist/services/features/telegram-mcp/src/features/tools-sync/model/refreshToolsMarkdownService.js +107 -58
  69. package/dist/services/features/telegram-mcp/src/features/tools-sync/model/refreshToolsMarkdownTool.js +1 -1
  70. package/dist/services/features/telegram-mcp/src/features/xchange/model/getXchangeRecordTool.js +28 -0
  71. package/dist/services/features/telegram-mcp/src/features/xchange/model/listXchangeRecordsTool.js +28 -0
  72. package/dist/services/features/telegram-mcp/src/features/xchange/model/markXchangeRecordReadTool.js +28 -0
  73. package/dist/services/features/telegram-mcp/src/features/xchange/model/xchangeService.js +169 -0
  74. package/dist/services/features/telegram-mcp/src/processes/human-approval/model/orchestrator.js +5 -4
  75. package/dist/services/features/telegram-mcp/src/shared/i18n/index.js +46 -0
  76. package/dist/services/features/telegram-mcp/src/shared/i18n/resources/en.js +652 -0
  77. package/dist/services/features/telegram-mcp/src/shared/i18n/resources/ru.js +652 -0
  78. package/dist/services/features/telegram-mcp/src/shared/integrations/memory/processLocalSessionStore.js +27 -0
  79. package/dist/services/features/telegram-mcp/src/shared/integrations/object-storage/minioExchangeStore.js +11 -8
  80. package/dist/services/features/telegram-mcp/src/shared/integrations/redis/stateStore.js +51 -71
  81. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/proxyFetch.js +21 -22
  82. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transport.js +411 -6524
  83. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportAttachmentStore.js +93 -0
  84. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportBroadcastActions.js +385 -0
  85. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportConsoleRegistry.js +143 -0
  86. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportConstructorWiring.js +633 -0
  87. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportContent.js +84 -0
  88. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportContext.js +78 -0
  89. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportDocumentActions.js +36 -0
  90. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportEventActions.js +292 -0
  91. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportFileHandoffActions.js +352 -0
  92. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportFormatting.js +75 -0
  93. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportGatewayActions.js +44 -0
  94. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportLifecycleActions.js +161 -0
  95. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportLive.js +56 -0
  96. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportLiveActions.js +77 -0
  97. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportMenuCallbacks.js +254 -0
  98. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportMenuFactories.js +538 -0
  99. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportMenuFingerprints.js +93 -0
  100. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportMenuFlow.js +344 -0
  101. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportMenuShell.js +62 -0
  102. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportMenuState.js +408 -0
  103. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportMenuText.js +216 -0
  104. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportMessageFlow.js +452 -0
  105. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportOutputActions.js +189 -0
  106. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportPartnerActions.js +286 -0
  107. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportPayloadState.js +101 -0
  108. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportProjectActions.js +463 -0
  109. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportProjectEntryActions.js +202 -0
  110. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportProjectEvents.js +99 -0
  111. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportProjectMenus.js +138 -0
  112. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportProjectState.js +308 -0
  113. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportProjectView.js +426 -0
  114. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportRequestFlow.js +278 -0
  115. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportSessionActions.js +143 -0
  116. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportTerminalActions.js +468 -0
  117. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportTerminalRuntime.js +171 -0
  118. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportTypes.js +2 -0
  119. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportUtils.js +330 -0
  120. package/dist/services/features/telegram-mcp/src/shared/integrations/telegram/transportXchangeState.js +107 -0
  121. package/dist/services/features/telegram-mcp/src/shared/integrations/terminal/client.js +255 -0
  122. package/dist/services/features/telegram-mcp/src/shared/integrations/terminal/ptyRegistry.js +543 -0
  123. package/dist/services/features/telegram-mcp/src/shared/integrations/xchange/sqliteRecordStore.js +223 -0
  124. package/dist/services/features/telegram-mcp/src/shared/lib/gatewayScope.js +24 -0
  125. package/dist/services/features/telegram-mcp/src/shared/lib/logger/logger.js +6 -0
  126. package/dist/services/features/telegram-mcp/src/shared/lib/project-identity/projectIdentity.js +147 -76
  127. package/dist/services/features/telegram-mcp/src/shared/lib/telegramXchangeRecords.js +72 -0
  128. package/dist/services/features/telegram-mcp/src/shared/lib/terminalPromptDetection.js +237 -0
  129. package/dist/services/features/telegram-mcp/src/shared/lib/version/versionHandshake.js +129 -1
  130. package/dist/services/features/telegram-mcp/src/shared/lib/xchangeRecordHints.js +98 -0
  131. package/dist/services/features/telegram-mcp/standalone-http.service.js +13 -1
  132. package/dist/services/features/telegram-mcp/terminal-buffer.service.js +42 -0
  133. package/dist/services/features/telegram-mcp/terminal-input.service.js +41 -0
  134. package/dist/services/features/telegram-mcp/tools-sync.service.js +16 -2
  135. package/dist/services/features/telegram-mcp/xchange.service.js +123 -0
  136. package/docs/STANDALONE-ru.md +172 -0
  137. package/docs/STANDALONE.md +172 -0
  138. package/package.json +11 -5
  139. package/scripts/build-package-artifact.sh +27 -0
  140. package/scripts/deploy-gateway.sh +64 -0
  141. package/scripts/deploy-onebot-branch.sh +27 -0
  142. package/scripts/postinstall.js +11 -36
  143. package/STANDALONE-ru.md +0 -274
  144. package/STANDALONE.md +0 -274
  145. package/dist/services/features/telegram-mcp/inbox.service.js +0 -33
  146. package/dist/services/features/telegram-mcp/pair.service.js +0 -33
  147. package/dist/services/features/telegram-mcp/src/app/webapp/tmux.js +0 -10
  148. package/dist/services/features/telegram-mcp/src/features/inbox/model/deleteTelegramInboxMessageTool.js +0 -33
  149. package/dist/services/features/telegram-mcp/src/features/inbox/model/getTelegramInboxCountTool.js +0 -33
  150. package/dist/services/features/telegram-mcp/src/features/inbox/model/getTelegramInboxTool.js +0 -33
  151. package/dist/services/features/telegram-mcp/src/features/inbox/model/inboxService.js +0 -77
  152. package/dist/services/features/telegram-mcp/src/features/pair-session/model/clearSessionPairingTool.js +0 -33
  153. package/dist/services/features/telegram-mcp/src/features/pair-session/model/createSessionPairCodeTool.js +0 -33
  154. package/dist/services/features/telegram-mcp/src/features/pair-session/model/generatePairCode.js +0 -202
  155. package/dist/services/features/telegram-mcp/src/features/session-context/model/getTmuxTargetTool.js +0 -33
  156. package/dist/services/features/telegram-mcp/src/features/session-context/model/setTmuxTargetTool.js +0 -33
  157. package/dist/services/features/telegram-mcp/src/shared/integrations/tmux/client.js +0 -363
package/VERSION.md CHANGED
@@ -4,6 +4,32 @@ Public, user-facing release notes for published versions of `@deadragdoll/tellym
4
4
 
5
5
  For detailed engineering history, refactors, and internal development notes, see [CHANGELOG.md](CHANGELOG.md).
6
6
 
7
+ ## 0.0.10
8
+
9
+ ### Added
10
+ - Telegram UI localization for the bot layer:
11
+ - English and Russian catalogs for user-facing bot screens
12
+ - locale resolution from Telegram profile with persisted user preference
13
+ - `DEBUG_LANGUAGE=en|ru` override for fast testing without changing the Telegram profile
14
+
15
+ ### Changed
16
+ - Localization scope is now explicit:
17
+ - Telegram bot UI is localized
18
+ - MCP tools, logs, `TOOLS.md`, and the Live Mini App remain canonical English by design
19
+ - Telegram menus, callbacks, project/collaboration screens, startup notices, and operational bot notices now render through a shared translation layer instead of ad hoc inline strings
20
+
21
+ ### Fixed
22
+ - Builder startup is more robust:
23
+ - runtime-dependent services now wait for full runtime readiness instead of racing broker registration
24
+ - this avoids `telegram_mcp runtime is not initialized yet` failures during `yarn dev:builder`
25
+ - Locale resolution is safe for partial test mocks and startup paths
26
+ - Telegram UI text is now consistent across:
27
+ - main menus
28
+ - inbox/session flows
29
+ - project/collab flows
30
+ - live approval prompts
31
+ - terminal and operational bot notices
32
+
7
33
  ## 0.0.9
8
34
 
9
35
  ### Added
@@ -29,8 +55,8 @@ For detailed engineering history, refactors, and internal development notes, see
29
55
  - expired in-process WebApp sessions (`401/403`) trigger automatic re-bootstrap
30
56
  - reopening the Mini App is no longer required in the normal restart case
31
57
  - Runtime MCP metadata now reports the actual package version instead of stale hardcoded version data.
32
- - Successful tmux nudges no longer overwrite `tmuxPaneId` with non-pane targets such as `backend:0.0`.
33
- - If tmux itself is unavailable for a paired session with a saved tmux target, Telegram now receives an operational warning instead of leaving the signal only in backend logs.
58
+ - Successful terminal nudges no longer overwrite stale target metadata with non-target values such as `backend:0.0`.
59
+ - If the terminal runtime itself is unavailable for a paired session with a saved terminal target, Telegram now receives an operational warning instead of leaving the signal only in backend logs.
34
60
 
35
61
  ## 0.0.8
36
62
 
@@ -40,8 +66,8 @@ For detailed engineering history, refactors, and internal development notes, see
40
66
  - optional JSONL file sink for Alloy or other collectors
41
67
  - `LOG_FILE_ENABLED=true`
42
68
  - `LOG_FILE_PATH=.tellymcp/log.jsonl`
43
- - Better tmux recovery behavior:
44
- - when a saved pane target becomes stale after tmux recreation, TellyMCP now tries to recover the live pane automatically from stored tmux session/window/pane hints
69
+ - Better terminal target recovery behavior:
70
+ - when a saved target becomes stale after terminal recreation, TellyMCP now tries to recover the live terminal automatically from stored terminal hints
45
71
  - if auto-recovery fails, Telegram sends a clear operational warning instead of leaving the problem only in logs
46
72
  - Stronger `Share` execution guidance:
47
73
  - the current session must do the work itself
@@ -57,8 +83,8 @@ For detailed engineering history, refactors, and internal development notes, see
57
83
  - optional `LogFeed` buffer for UI diagnostics
58
84
 
59
85
  ### Fixed
60
- - Stale tmux pane ids like `%1 -> %2` no longer require manual user understanding before the service can try to wake the session again.
61
- - Broken tmux nudge targets are now visible to the user in Telegram, not only in backend logs.
86
+ - Stale terminal target ids no longer require manual user understanding before the service can try to wake the session again.
87
+ - Broken terminal nudge targets are now visible to the user in Telegram, not only in backend logs.
62
88
  - `Share` inbox instructions are now explicit enough to reduce the chance that one agent re-delegates the task back into the collaboration graph.
63
89
  - `Live` Mini App now survives a normal gateway restart much better:
64
90
  - short `502/503` periods recover through polling
@@ -90,13 +116,13 @@ For detailed engineering history, refactors, and internal development notes, see
90
116
  - MCP/WebApp/Gateway endpoints
91
117
  - Live text input button:
92
118
  - `[txt]`
93
- - sends literal text to tmux without pressing `Enter`
119
+ - sends literal text to the terminal without pressing `Enter`
94
120
 
95
121
  ### Changed
96
122
  - Default installation path is now npm-first:
97
123
  - `npm install -g @deadragdoll/tellymcp`
98
124
  - Standalone client mode is documented first, before gateway/both deployment.
99
- - `tmux` is now documented as a strongly recommended prerequisite for the full experience:
125
+ - Built-in PTY terminal control is now documented as the default prerequisite for the full experience:
100
126
  - Live View
101
127
  - nudges
102
128
  - direct terminal control from Telegram
@@ -152,8 +178,8 @@ For detailed engineering history, refactors, and internal development notes, see
152
178
  - `TOOLS.md` sync now detects outdated or missing local instructions and asks the session to refresh them.
153
179
 
154
180
  ### Removed
155
- - Legacy Go/HTTP tmux proxy path was removed.
156
- - Direct product path is now local `tmux` only.
181
+ - Legacy Go/HTTP terminal proxy path was removed.
182
+ - Direct product path is now the local built-in terminal runtime only.
157
183
 
158
184
  ## Next entry template
159
185
 
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "telly-workflows",
3
+ "version": "0.1.0+codex.20260522215959",
4
+ "description": "Static workflows and operational rules for telegram_mcp consoles.",
5
+ "author": {
6
+ "name": "Local developer"
7
+ },
8
+ "skills": "./skills/",
9
+ "interface": {
10
+ "displayName": "Telly Workflows",
11
+ "shortDescription": "Stable workflows for telegram_mcp sessions.",
12
+ "longDescription": "Telly Workflows adds static Codex skills for partner-note execution, human Telegram replies, browser screenshots, and artifact-return paths without relying on ad-hoc polling or route guessing.",
13
+ "developerName": "Local developer",
14
+ "category": "Productivity",
15
+ "capabilities": [],
16
+ "defaultPrompt": "Use the telly-workflows skills when working through telegram_mcp, especially for partner-note execution, browser screenshots, and human Telegram replies."
17
+ }
18
+ }
@@ -0,0 +1,10 @@
1
+ # Operational Invariants
2
+
3
+ 1. Do not stop at inspection when a request requires a real outbound action.
4
+ 2. Do not call `mark_xchange_record_read` before the required outbound tool succeeds.
5
+ 3. Do not use `sleep` plus repeated `list_xchange_records` polling in the same turn after sending a partner request.
6
+ 4. For inter-session work, the target console returns results to the source console, not directly to the human Telegram chat.
7
+ 5. For human screenshot requests, prefer `browser_open` plus `browser_screenshot(send_to_telegram=true)` when the current console owns the browser runtime.
8
+ 6. For partner screenshot requests, prefer `browser_open` plus `browser_screenshot`, then `send_partner_file` back to the source console.
9
+ 7. Prefer `send_partner_file` over `send_partner_note` whenever the result is a real local file.
10
+ 8. Do not invent routing or route-guessing fallbacks when the canonical path is known.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: telly-browser-screenshot
3
+ description: Use when a telegram_mcp task says to open a webpage, use browser_open, take a screenshot with browser_screenshot, send a screenshot to Telegram with send_to_telegram=true, or return a screenshot artifact to another console with send_partner_file. Prefer this over shell Playwright fallbacks for browser screenshot work.
4
+ ---
5
+
6
+ # Telly Browser Screenshot
7
+
8
+ Use this skill when the task says to open a webpage and make a screenshot.
9
+
10
+ ## Rules
11
+
12
+ - Prefer `browser_open` and `browser_screenshot`.
13
+ - Do not replace the browser workflow with shell Playwright unless browser tools actually fail.
14
+ - If the screenshot must go straight back to the human Telegram chat from this console, set `send_to_telegram=true`.
15
+ - If the screenshot must go to another console, save the PNG through `browser_screenshot`, then return it with `send_partner_file`.
16
+ - Do not dig through sqlite or session context to guess delivery routes when the requested flow is already known.
17
+
18
+ ## Preferred patterns
19
+
20
+ Human-facing screenshot:
21
+ 1. `browser_open`
22
+ 2. `browser_screenshot(send_to_telegram=true)`
23
+
24
+ Partner-facing screenshot:
25
+ 1. `browser_open`
26
+ 2. `browser_screenshot`
27
+ 3. `send_partner_file`
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: telly-collab-artifact
3
+ description: Use when a telegram_mcp collab or partner_note task must return a real file or artifact such as a screenshot, html file, txt file, report, or generated output. Prefer send_partner_file over send_partner_note when the result exists as a local file, and return the artifact to the source console before any human Telegram reply.
4
+ ---
5
+
6
+ # Telly Collab Artifact
7
+
8
+ Use this skill when the result must include a real file.
9
+
10
+ ## Rules
11
+
12
+ - Prefer `send_partner_file` whenever the result already exists as a local file.
13
+ - Do not paste file contents into `send_partner_note` if a real file path is available.
14
+ - For inter-session work, return the artifact to the source console, then let the source console handle the human-facing reply.
15
+ - Only fall back to `send_partner_note` without `send_partner_file` when the result is purely textual.
16
+
17
+ ## Preferred pattern
18
+
19
+ 1. Produce the local file in the current console.
20
+ 2. Verify the path exists in the current workspace.
21
+ 3. Call `send_partner_file`.
22
+ 4. Only after success, call `mark_xchange_record_read` if the incoming note required a reply.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: telly-human-telegram
3
+ description: Use when the current console received a human telegram_message, needs to reply through notify_telegram, or needs to open a page and send a browser screenshot back to the human with browser_screenshot(send_to_telegram=true). This skill covers direct human-facing telegram_mcp requests, not partner-to-partner return paths.
4
+ ---
5
+
6
+ # Telly Human Telegram
7
+
8
+ Use this skill when the current console received a human Telegram request through `telegram_message`.
9
+
10
+ ## Rules
11
+
12
+ - Start with `get_xchange_record` for the newest relevant `telegram_message`.
13
+ - If the request needs a text reply, finish with `notify_telegram`.
14
+ - If the request needs a browser screenshot sent to the human, use `browser_open` and then `browser_screenshot` with `send_to_telegram=true`.
15
+ - Do not save a screenshot locally and then search sqlite, route metadata, or session context just to deliver it.
16
+ - Do not stop at analysis or a summary.
17
+ - Call `mark_xchange_record_read` only after the required outbound tool succeeds.
18
+
19
+ ## Preferred patterns
20
+
21
+ Text reply:
22
+ 1. `get_xchange_record`
23
+ 2. do the work
24
+ 3. `notify_telegram`
25
+ 4. `mark_xchange_record_read`
26
+
27
+ Browser screenshot reply:
28
+ 1. `get_xchange_record`
29
+ 2. `browser_open`
30
+ 3. `browser_screenshot(send_to_telegram=true)`
31
+ 4. `mark_xchange_record_read`
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: telly-partner-note
3
+ description: Use when the current console received an incoming partner_note, xchange partner request, inter-session task, collab ask/share request, or agent-to-agent reply path. Start with get_xchange_record, do the work in this console, return the result with send_partner_note or send_partner_file, and only then call mark_xchange_record_read.
4
+ ---
5
+
6
+ # Telly Partner Note
7
+
8
+ Use this skill when the current console received an incoming `partner_note`.
9
+
10
+ ## Rules
11
+
12
+ - Start with `get_xchange_record`.
13
+ - Read whether the note is a `request`, `question`, `reply`, or `handoff`.
14
+ - If the note requires a reply, the task is not complete until `send_partner_note` or `send_partner_file` succeeds.
15
+ - Do not stop at reading the note, listing files, or summarizing the task.
16
+ - Do not call `mark_xchange_record_read` before the outbound reply succeeds.
17
+ - If the newest note is `kind=reply` and does not require a reply, process the result and do not create another reply loop.
18
+
19
+ ## Return path
20
+
21
+ - Return the result to the source console.
22
+ - Do not send the result directly to the human Telegram chat from the target console unless the instruction explicitly says this console is the human-facing endpoint.
23
+
24
+ ## Preferred patterns
25
+
26
+ Text result:
27
+ 1. `get_xchange_record`
28
+ 2. do the work in this console
29
+ 3. `send_partner_note`
30
+ 4. `mark_xchange_record_read`
31
+
32
+ Artifact result:
33
+ 1. `get_xchange_record`
34
+ 2. do the work in this console
35
+ 3. `send_partner_file`
36
+ 4. `mark_xchange_record_read`
@@ -2,14 +2,25 @@
2
2
 
3
3
  TELEGRAM_BOT_TOKEN=
4
4
  TELEGRAM_BOT_USERNAME=
5
- PROJECT_NAME=
5
+ # ADMIN_TOKEN=
6
+ # DEBUG_LANGUAGE=ru
7
+ # TELEGRAM_WEBHOOK_ENABLED=true
8
+ # TELEGRAM_WEBHOOK_PATH=/telegram/webhook
9
+ # TELEGRAM_WEBHOOK_PUBLIC_URL=https://your-domain.example/api/telegram/webhook
10
+ # TELEGRAM_WEBHOOK_SECRET=change_me_webhook_secret
11
+ # TELEGRAM_WEBHOOK_TRACE=false
12
+ # TELEGRAM_WEBHOOK_DROP_PENDING_UPDATES=false
13
+
14
+ # PROJECT_NAME=
15
+ # TELLYMCP_SESSION_ID=NEW
16
+ # TELLYMCP_SESSION_LABEL=NEW
6
17
 
7
18
  REDIS_HOST=127.0.0.1
8
19
  REDIS_PORT=6379
9
20
  REDIS_DB=1
10
21
 
11
- MODE=queue
12
- PAIR_CODE_TTL_SECONDS=600
22
+ MODE=reject
23
+ PAIR_CODE_TTL_SECONDS=300
13
24
 
14
25
  MCP_HTTP_HOST=127.0.0.1
15
26
  MCP_HTTP_PORT=8787
@@ -22,13 +33,14 @@ DISTRIBUTED_MODE=both
22
33
  GATEWAY_PUBLIC_URL=
23
34
  GATEWAY_WS_URL=
24
35
  GATEWAY_WS_PATH=/api/gateway/ws
25
- GATEWAY_AUTH_TOKEN=
36
+ GATEWAY_TOKEN=
37
+ GATEWAY_USER_UUID=
38
+ # GATEWAY_AUTH_TOKEN=
26
39
 
27
40
  ROOT_PREFIX=/api
28
- APP_NAME=tellymcp
41
+ PORT=8080
29
42
  NAMESPACE=mcp
30
43
  NODE_ID=both
31
- PORT=8080
32
44
 
33
45
  DB_HOST=127.0.0.1
34
46
  DB_PORT=5432
@@ -42,7 +54,7 @@ DB_SCHEME=mcp
42
54
  # RMQ_USER=
43
55
  # RMQ_PASSWORD=
44
56
  # RMQ_VHOST=/
45
- # RMQ_EXCHANGE=tellymcp
57
+ # RMQ_EXCHANGE=telegram_mcp.gateway
46
58
 
47
59
  WEBAPP_ENABLED=true
48
60
  WEBAPP_BASE_PATH=/webapp
@@ -50,25 +62,34 @@ WEBAPP_PUBLIC_URL=
50
62
  WEBAPP_INITDATA_TTL_SECONDS=300
51
63
  WEBAPP_SESSION_TTL_SECONDS=900
52
64
  WEBAPP_LAUNCH_MODE=fullscreen
53
- WEBAPP_VISIBLE_SCREENS=2
65
+ WEBAPP_VISIBLE_SCREENS=10
54
66
  WEBAPP_POLL_INTERVAL_MS=2000
55
67
  WEBAPP_ACTION_COOLDOWN_MS=150
56
68
 
57
69
  MCP_XCHANGE_DIR=.mcp-xchange
58
70
 
59
- TMUX_NUDGE_ENABLED=true
60
- TMUX_NUDGE_DEBOUNCE_SECONDS=10
61
- TMUX_NUDGE_COOLDOWN_SECONDS=30
62
- TMUX_NUDGE_MESSAGE=проверь inbox
63
- TMUX_PARTNER_NUDGE_MESSAGE=не inbox: прочитай SHARED_INDEX.md и partner note
64
- TMUX_CAPTURE_MODE=visible
65
- TMUX_CAPTURE_LINES=300
66
- # TMUX_SOCKET_PATH=
71
+ TERMINAL_SHELL=bash
72
+ TERMINAL_COLS=120
73
+ TERMINAL_ROWS=40
74
+ TERMINAL_SCROLLBACK_LINES=4000
67
75
 
76
+ TERMINAL_NUDGE_ENABLED=true
77
+ TERMINAL_NUDGE_DEBOUNCE_SECONDS=10
78
+ TERMINAL_NUDGE_COOLDOWN_SECONDS=30
79
+ TERMINAL_NUDGE_MESSAGE=получи newest telegram_message через list_xchange_records/get_xchange_record, выполни запрос и ответь человеку через notify_telegram; не останавливайся на анализе
80
+ TERMINAL_PARTNER_NUDGE_MESSAGE=получи newest partner_note через list_xchange_records/get_xchange_record, выполни задачу в текущей консоли и обязательно отправь результат через send_partner_note или send_partner_file; только потом mark_xchange_record_read
81
+ TERMINAL_PARTNER_REPLY_NUDGE_MESSAGE=получи newest partner_note через list_xchange_records/get_xchange_record; если newest note имеет kind=reply или не требует ответа, не отправляй новый send_partner_note/send_partner_file без явного нового запроса. Если этот reply завершает задачу от человека, сразу отправь финальный результат в Telegram через notify_telegram или send_file_to_telegram; только потом mark_xchange_record_read
82
+ TERMINAL_CAPTURE_MODE=visible
83
+ TERMINAL_CAPTURE_LINES=300
84
+ TERMINAL_PROMPT_SCAN_ENABLED=true
85
+ TERMINAL_PROMPT_SCAN_INTERVAL_SECONDS=15
86
+ TERMINAL_PROMPT_SCAN_COOLDOWN_SECONDS=120
87
+ TERMINAL_PROMPT_SCAN_STRATEGY=strict
88
+ TERMINAL_PROMPT_SCAN_MIN_SCORE=5
68
89
  BROWSER_ENABLED=true
69
90
  BROWSER_HEADLESS=false
70
91
  BROWSER_DEVTOOLS=false
71
- BROWSER_ADDRESS=http://localhost:5173
92
+ # BROWSER_ADDRESS=http://localhost:5173
72
93
  BROWSER_TIMEOUT_MS=20000
73
94
  BROWSER_MAX_EVENTS=200
74
95
  BROWSER_WAIT_UNTIL=load
@@ -77,7 +98,6 @@ BROWSER_WAIT_UNTIL=load
77
98
  BROWSER_SLOW_MO_MS=0
78
99
 
79
100
  LOG_LEVEL=info
80
- ENABLE_LOGFEED=0
81
101
  LOG_FILE_ENABLED=false
82
- SESSION_SECRET=change_me_session_secret
83
- TOKEN_BINDING_SECRET=change_me_token_binding_secret
102
+ LOG_FILE_PATH=.tellymcp/log.jsonl
103
+ ENABLE_LOGFEED=0
@@ -1,15 +1,15 @@
1
1
  # TellyMCP client node
2
2
 
3
- TELEGRAM_BOT_TOKEN=
4
- TELEGRAM_BOT_USERNAME=
5
- PROJECT_NAME=
3
+ # PROJECT_NAME=
4
+ # TELLYMCP_SESSION_ID=NEW
5
+ # TELLYMCP_SESSION_LABEL=NEW
6
6
 
7
7
  REDIS_HOST=127.0.0.1
8
8
  REDIS_PORT=6379
9
9
  REDIS_DB=1
10
10
 
11
- MODE=queue
12
- PAIR_CODE_TTL_SECONDS=600
11
+ MODE=reject
12
+ PAIR_CODE_TTL_SECONDS=300
13
13
 
14
14
  MCP_HTTP_HOST=127.0.0.1
15
15
  MCP_HTTP_PORT=8787
@@ -22,33 +22,44 @@ DISTRIBUTED_MODE=client
22
22
  GATEWAY_PUBLIC_URL=
23
23
  GATEWAY_WS_URL=
24
24
  GATEWAY_WS_PATH=/api/gateway/ws
25
- GATEWAY_AUTH_TOKEN=
25
+ GATEWAY_TOKEN=
26
+ GATEWAY_USER_UUID=
27
+ # GATEWAY_AUTH_TOKEN=
26
28
 
29
+ TERMINAL_SHELL=bash
30
+ TERMINAL_COLS=120
31
+ TERMINAL_ROWS=40
32
+ TERMINAL_SCROLLBACK_LINES=4000
33
+
34
+ TERMINAL_NUDGE_ENABLED=true
35
+ TERMINAL_NUDGE_DEBOUNCE_SECONDS=10
36
+ TERMINAL_NUDGE_COOLDOWN_SECONDS=30
37
+ TERMINAL_NUDGE_MESSAGE=получи newest telegram_message через list_xchange_records/get_xchange_record, выполни запрос и ответь человеку через notify_telegram; не останавливайся на анализе
38
+ TERMINAL_PARTNER_NUDGE_MESSAGE=получи newest partner_note через list_xchange_records/get_xchange_record, выполни задачу в текущей консоли и обязательно отправь результат через send_partner_note или send_partner_file; только потом mark_xchange_record_read
39
+ TERMINAL_PARTNER_REPLY_NUDGE_MESSAGE=получи newest partner_note через list_xchange_records/get_xchange_record; если newest note имеет kind=reply или не требует ответа, не отправляй новый send_partner_note/send_partner_file без явного нового запроса. Если этот reply завершает задачу от человека, сразу отправь финальный результат в Telegram через notify_telegram или send_file_to_telegram; только потом mark_xchange_record_read
40
+ TERMINAL_CAPTURE_MODE=visible
41
+ TERMINAL_CAPTURE_LINES=300
42
+ TERMINAL_PROMPT_SCAN_ENABLED=true
43
+ TERMINAL_PROMPT_SCAN_INTERVAL_SECONDS=15
44
+ TERMINAL_PROMPT_SCAN_COOLDOWN_SECONDS=120
45
+ TERMINAL_PROMPT_SCAN_STRATEGY=strict
46
+ TERMINAL_PROMPT_SCAN_MIN_SCORE=5
27
47
  WEBAPP_ENABLED=true
28
48
  WEBAPP_BASE_PATH=/webapp
29
- # WEBAPP_PUBLIC_URL=
49
+ WEBAPP_PUBLIC_URL=
30
50
  WEBAPP_INITDATA_TTL_SECONDS=300
31
51
  WEBAPP_SESSION_TTL_SECONDS=900
32
52
  WEBAPP_LAUNCH_MODE=fullscreen
33
- WEBAPP_VISIBLE_SCREENS=2
53
+ WEBAPP_VISIBLE_SCREENS=10
34
54
  WEBAPP_POLL_INTERVAL_MS=2000
35
55
  WEBAPP_ACTION_COOLDOWN_MS=150
36
56
 
37
57
  MCP_XCHANGE_DIR=.mcp-xchange
38
58
 
39
- TMUX_NUDGE_ENABLED=true
40
- TMUX_NUDGE_DEBOUNCE_SECONDS=10
41
- TMUX_NUDGE_COOLDOWN_SECONDS=30
42
- TMUX_NUDGE_MESSAGE=проверь inbox
43
- TMUX_PARTNER_NUDGE_MESSAGE=не inbox: прочитай SHARED_INDEX.md и partner note
44
- TMUX_CAPTURE_MODE=visible
45
- TMUX_CAPTURE_LINES=300
46
- # TMUX_SOCKET_PATH=
47
-
48
59
  BROWSER_ENABLED=true
49
60
  BROWSER_HEADLESS=false
50
61
  BROWSER_DEVTOOLS=false
51
- BROWSER_ADDRESS=http://localhost:5173
62
+ # BROWSER_ADDRESS=http://localhost:5173
52
63
  BROWSER_TIMEOUT_MS=20000
53
64
  BROWSER_MAX_EVENTS=200
54
65
  BROWSER_WAIT_UNTIL=load
@@ -56,5 +67,10 @@ BROWSER_WAIT_UNTIL=load
56
67
  # BROWSER_CHANNEL=chrome
57
68
  BROWSER_SLOW_MO_MS=0
58
69
 
70
+ NAMESPACE=mcp
71
+ NODE_ID=agent
72
+
59
73
  LOG_LEVEL=info
74
+ LOG_FILE_ENABLED=false
75
+ LOG_FILE_PATH=.tellymcp/log.jsonl
60
76
  ENABLE_LOGFEED=0
@@ -2,14 +2,21 @@
2
2
 
3
3
  TELEGRAM_BOT_TOKEN=
4
4
  TELEGRAM_BOT_USERNAME=
5
- PROJECT_NAME=
5
+ # ADMIN_TOKEN=
6
+ # DEBUG_LANGUAGE=ru
7
+ # TELEGRAM_WEBHOOK_ENABLED=true
8
+ # TELEGRAM_WEBHOOK_PATH=/telegram/webhook
9
+ # TELEGRAM_WEBHOOK_PUBLIC_URL=https://your-domain.example/api/telegram/webhook
10
+ # TELEGRAM_WEBHOOK_SECRET=change_me_webhook_secret
11
+ # TELEGRAM_WEBHOOK_TRACE=false
12
+ # TELEGRAM_WEBHOOK_DROP_PENDING_UPDATES=false
6
13
 
7
14
  REDIS_HOST=127.0.0.1
8
15
  REDIS_PORT=6379
9
16
  REDIS_DB=1
10
17
 
11
- MODE=queue
12
- PAIR_CODE_TTL_SECONDS=600
18
+ MODE=reject
19
+ PAIR_CODE_TTL_SECONDS=300
13
20
 
14
21
  MCP_HTTP_HOST=127.0.0.1
15
22
  MCP_HTTP_PORT=8787
@@ -20,14 +27,15 @@ MCP_HTTP_ENABLE_PRUNE_ROUTE=false
20
27
 
21
28
  DISTRIBUTED_MODE=gateway
22
29
  GATEWAY_PUBLIC_URL=
30
+ GATEWAY_WS_URL=
23
31
  GATEWAY_WS_PATH=/api/gateway/ws
24
- GATEWAY_AUTH_TOKEN=
32
+ GATEWAY_TOKEN=
33
+ # GATEWAY_AUTH_TOKEN=
25
34
 
26
35
  ROOT_PREFIX=/api
27
- APP_NAME=tellymcp-gateway
28
- NAMESPACE=mcp
29
- NODE_ID=gateway
30
36
  PORT=8080
37
+ NAMESPACE=mcp
38
+ NODE_ID=GWAY
31
39
 
32
40
  DB_HOST=127.0.0.1
33
41
  DB_PORT=5432
@@ -41,7 +49,7 @@ DB_SCHEME=mcp
41
49
  # RMQ_USER=
42
50
  # RMQ_PASSWORD=
43
51
  # RMQ_VHOST=/
44
- # RMQ_EXCHANGE=tellymcp
52
+ # RMQ_EXCHANGE=telegram_mcp.gateway
45
53
 
46
54
  WEBAPP_ENABLED=true
47
55
  WEBAPP_BASE_PATH=/webapp
@@ -49,25 +57,34 @@ WEBAPP_PUBLIC_URL=
49
57
  WEBAPP_INITDATA_TTL_SECONDS=300
50
58
  WEBAPP_SESSION_TTL_SECONDS=900
51
59
  WEBAPP_LAUNCH_MODE=fullscreen
52
- WEBAPP_VISIBLE_SCREENS=2
60
+ WEBAPP_VISIBLE_SCREENS=10
53
61
  WEBAPP_POLL_INTERVAL_MS=2000
54
62
  WEBAPP_ACTION_COOLDOWN_MS=150
55
63
 
56
64
  MCP_XCHANGE_DIR=.mcp-xchange
57
65
 
58
- TMUX_NUDGE_ENABLED=true
59
- TMUX_NUDGE_DEBOUNCE_SECONDS=10
60
- TMUX_NUDGE_COOLDOWN_SECONDS=30
61
- TMUX_NUDGE_MESSAGE=проверь inbox
62
- TMUX_PARTNER_NUDGE_MESSAGE=не inbox: прочитай SHARED_INDEX.md и partner note
63
- TMUX_CAPTURE_MODE=visible
64
- TMUX_CAPTURE_LINES=300
65
- # TMUX_SOCKET_PATH=
66
+ TERMINAL_SHELL=bash
67
+ TERMINAL_COLS=120
68
+ TERMINAL_ROWS=40
69
+ TERMINAL_SCROLLBACK_LINES=4000
66
70
 
67
- BROWSER_ENABLED=true
71
+ TERMINAL_NUDGE_ENABLED=true
72
+ TERMINAL_NUDGE_DEBOUNCE_SECONDS=10
73
+ TERMINAL_NUDGE_COOLDOWN_SECONDS=30
74
+ TERMINAL_NUDGE_MESSAGE=получи newest telegram_message через list_xchange_records/get_xchange_record, выполни запрос и ответь человеку через notify_telegram; не останавливайся на анализе
75
+ TERMINAL_PARTNER_NUDGE_MESSAGE=получи newest partner_note через list_xchange_records/get_xchange_record, выполни задачу в текущей консоли и обязательно отправь результат через send_partner_note или send_partner_file; только потом mark_xchange_record_read
76
+ TERMINAL_PARTNER_REPLY_NUDGE_MESSAGE=получи newest partner_note через list_xchange_records/get_xchange_record; если newest note имеет kind=reply или не требует ответа, не отправляй новый send_partner_note/send_partner_file без явного нового запроса. Если этот reply завершает задачу от человека, сразу отправь финальный результат в Telegram через notify_telegram или send_file_to_telegram; только потом mark_xchange_record_read
77
+ TERMINAL_CAPTURE_MODE=visible
78
+ TERMINAL_CAPTURE_LINES=300
79
+ TERMINAL_PROMPT_SCAN_ENABLED=false
80
+ TERMINAL_PROMPT_SCAN_INTERVAL_SECONDS=15
81
+ TERMINAL_PROMPT_SCAN_COOLDOWN_SECONDS=120
82
+ TERMINAL_PROMPT_SCAN_STRATEGY=strict
83
+ TERMINAL_PROMPT_SCAN_MIN_SCORE=5
84
+ BROWSER_ENABLED=false
68
85
  BROWSER_HEADLESS=false
69
86
  BROWSER_DEVTOOLS=false
70
- BROWSER_ADDRESS=http://localhost:5173
87
+ # BROWSER_ADDRESS=http://localhost:5173
71
88
  BROWSER_TIMEOUT_MS=20000
72
89
  BROWSER_MAX_EVENTS=200
73
90
  BROWSER_WAIT_UNTIL=load
@@ -76,7 +93,6 @@ BROWSER_WAIT_UNTIL=load
76
93
  BROWSER_SLOW_MO_MS=0
77
94
 
78
95
  LOG_LEVEL=info
79
- ENABLE_LOGFEED=0
80
96
  LOG_FILE_ENABLED=false
81
- SESSION_SECRET=change_me_session_secret
82
- TOKEN_BINDING_SECRET=change_me_token_binding_secret
97
+ LOG_FILE_PATH=.tellymcp/log.jsonl
98
+ ENABLE_LOGFEED=0