@dual-os/telegram 0.0.0-stage → 8.0.5
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/LICENSE +4 -0
- package/README.md +65 -2
- package/Runner.js +5539 -0
- package/Runner.js.map +59 -0
- package/bundle-inventory.json +1 -0
- package/dist/Telegram.d.ts +5291 -0
- package/dist/Telegram.d.ts.map +1 -0
- package/dist/TelegramClient.d.ts +203 -0
- package/dist/TelegramClient.d.ts.map +1 -0
- package/dist/TelegramClient.js +28 -0
- package/dist/TelegramClient.js.map +9 -0
- package/dist/TelegramDefinition.d.ts +1556 -0
- package/dist/TelegramDefinition.d.ts.map +1 -0
- package/dist/channel/telegram-bot-client.d.ts +45 -0
- package/dist/channel/telegram-bot-client.d.ts.map +1 -0
- package/dist/channel/telegram-bot-definition.d.ts +155 -0
- package/dist/channel/telegram-bot-definition.d.ts.map +1 -0
- package/dist/channel/telegram-bot-webhook.d.ts +62 -0
- package/dist/channel/telegram-bot-webhook.d.ts.map +1 -0
- package/dist/channel/telegram-bot.d.ts +111 -0
- package/dist/channel/telegram-bot.d.ts.map +1 -0
- package/dist/definition.d.ts +1114 -0
- package/dist/definition.d.ts.map +1 -0
- package/dist/definition.js +20 -0
- package/dist/definition.js.map +9 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +9 -0
- package/dist/internal/TelegramSchemas.d.ts +375 -0
- package/dist/internal/TelegramSchemas.d.ts.map +1 -0
- package/dist/plugin.d.ts +3282 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +26 -0
- package/dist/plugin.js.map +9 -0
- package/dual-plugin.json +1 -0
- package/index-68np0qzt.js +224 -0
- package/index-68np0qzt.js.map +11 -0
- package/index-hpjyc5yq.js +847 -0
- package/index-hpjyc5yq.js.map +14 -0
- package/index-pm1rw9n0.js +1301 -0
- package/index-pm1rw9n0.js.map +18 -0
- package/index-ppnnem2q.js +5473 -0
- package/index-ppnnem2q.js.map +56 -0
- package/index-sdgqen8s.js +13975 -0
- package/index-sdgqen8s.js.map +111 -0
- package/index-xc47zv2c.js +251 -0
- package/index-xc47zv2c.js.map +10 -0
- package/licenses/@dual-os_sdk@0.9.0/LICENSE +4 -0
- package/licenses/@effect_platform-node-shared@4.1.2/LICENSE +21 -0
- package/licenses/@effect_platform-node@4.1.2/LICENSE +21 -0
- package/licenses/effect@4.1.2/LICENSE +21 -0
- package/package.json +1 -6
- package/plugin.json +8 -0
package/LICENSE
ADDED
package/README.md
CHANGED
|
@@ -1,3 +1,66 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @dual-os/telegram
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Private ESM Telegram plugin for the Dual SDK. Provides chat, callback, file, and message actions plus an update webhook trigger.
|
|
4
|
+
|
|
5
|
+
## Composition
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
// Definition-only composition: no client or handler-layer imports.
|
|
9
|
+
import { telegramPluginBase } from "@dual-os/telegram/definition";
|
|
10
|
+
// Executable composition with the existing HTTP client and handlers.
|
|
11
|
+
import { telegramPlugin } from "@dual-os/telegram/executable";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Run the executable value in process with `DualRuntime.fromPlugin(plugin, packageJson.version)`; a host receives the published package from npm as a standard plugin. Importing a module starts no services, makes no requests and creates no Provider Connection.
|
|
15
|
+
|
|
16
|
+
`@dual-os/telegram/plugin.json` exposes declarative discovery metadata: schema version, package/plugin identity, definition/executable subpaths and named exports. The package version is the release. It can be read without executing plugin code.
|
|
17
|
+
|
|
18
|
+
The historical `Telegram` and `TelegramClient` root namespaces and explicit `/Telegram` and `/TelegramClient` subpaths remain supported. The historical root includes executable modules; use `/definition` for definition-only composition. Internal schema modules are not public entrypoints.
|
|
19
|
+
|
|
20
|
+
## Installation and compatibility
|
|
21
|
+
|
|
22
|
+
Source builds use the exact SDK and Effect dependencies in `package.json`; released bundles include them and the runner, without sandbox installation. Pin exact package versions and commit the application's lockfile.
|
|
23
|
+
|
|
24
|
+
The executable uses Fetch and Node-compatible APIs. Packaging adds no new runtime restriction and does not certify a new Node runtime matrix. Supply provider credentials through the host's Provider Connection setup. Never commit credentials.
|
|
25
|
+
|
|
26
|
+
## API and Agent Channel
|
|
27
|
+
|
|
28
|
+
This plugin includes the existing API Actions and Workflow Triggers plus the telegram/messages Agent Channel.
|
|
29
|
+
Existing action/trigger IDs, schemas and API authentication methods are unchanged. The additional
|
|
30
|
+
Channel authentication is listed at plugin level; per-action authentication subsets are intentionally
|
|
31
|
+
deferred. Use existing API Connections for Actions/Triggers and the Channel credentials below for
|
|
32
|
+
agent conversations. No migration of unused standalone Channel installations is provided.
|
|
33
|
+
|
|
34
|
+
### Telegram Bot Channel
|
|
35
|
+
|
|
36
|
+
Telegram Bot Channel `telegram/messages`. Uses its own
|
|
37
|
+
Connection (customer bot token and webhook secret); the existing `@dual-os/telegram`
|
|
38
|
+
workflow integration and generated plugins are unchanged.
|
|
39
|
+
|
|
40
|
+
Deployment settings choose where (`chatIds`: groups or `<chat>/<topic>`, empty for all;
|
|
41
|
+
`directMessages`), who (`access`, `allowedSenderKeys`) and when (`respondTo`). Private text
|
|
42
|
+
messages always respond. With `mentions`, groups respond only to an explicit bot
|
|
43
|
+
mention, a command addressed to the bot username, or a reply whose Telegram sender
|
|
44
|
+
is this bot; `all_messages` responds to every group message in scope and needs privacy mode off. Numeric sender access applies to messages and `/stop`. Actual
|
|
45
|
+
`message_thread_id` values isolate forum topics; ordinary replies share their chat.
|
|
46
|
+
Edits, forwards, channel posts, business messages, anonymous senders, other bots and non-text
|
|
47
|
+
messages are ignored. Attachments and arbitrary history reads are unsupported.
|
|
48
|
+
|
|
49
|
+
Output uses sendMessage, editMessageText, deleteMessage, setMessageReaction and
|
|
50
|
+
sendChatAction. Sends have no idempotency token, so all deliveries are at-most-once.
|
|
51
|
+
Uncertain sends are terminal `unknown_completion`, never automatically retried.
|
|
52
|
+
Telegram flood control is `rate_limited`; the client retains `retry_after`, while
|
|
53
|
+
the Channel's closed error contract carries only the code. There are no automatic
|
|
54
|
+
HTTP retries. Reaction/edit/delete restrictions and provider errors remain failures.
|
|
55
|
+
Reactions replace the bot's single reaction; removing a reaction clears it. Typing
|
|
56
|
+
lasts at most five seconds; idle has no explicit clearing API and waits for expiry.
|
|
57
|
+
|
|
58
|
+
Activation checkpoints bot identity before setting an owned registration URL.
|
|
59
|
+
Telegram allows one webhook per bot: activation replaces the previous integration.
|
|
60
|
+
Cleanup deletes only the exact URL owned by that activation and keeps queued updates.
|
|
61
|
+
Telegram offers no conditional delete, so this follows its getWebhookInfo/deleteWebhook
|
|
62
|
+
ownership check. Use a dedicated bot per Channel installation.
|
|
63
|
+
|
|
64
|
+
Public imports: definition-only `telegramPluginBase` from `/definition`, executable
|
|
65
|
+
`telegramPlugin` from `/executable` or `/Telegram`, and `Telegram.telegramPlugin`
|
|
66
|
+
from the package root. Existing API client exports remain unchanged.
|