@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.
Files changed (53) hide show
  1. package/LICENSE +4 -0
  2. package/README.md +65 -2
  3. package/Runner.js +5539 -0
  4. package/Runner.js.map +59 -0
  5. package/bundle-inventory.json +1 -0
  6. package/dist/Telegram.d.ts +5291 -0
  7. package/dist/Telegram.d.ts.map +1 -0
  8. package/dist/TelegramClient.d.ts +203 -0
  9. package/dist/TelegramClient.d.ts.map +1 -0
  10. package/dist/TelegramClient.js +28 -0
  11. package/dist/TelegramClient.js.map +9 -0
  12. package/dist/TelegramDefinition.d.ts +1556 -0
  13. package/dist/TelegramDefinition.d.ts.map +1 -0
  14. package/dist/channel/telegram-bot-client.d.ts +45 -0
  15. package/dist/channel/telegram-bot-client.d.ts.map +1 -0
  16. package/dist/channel/telegram-bot-definition.d.ts +155 -0
  17. package/dist/channel/telegram-bot-definition.d.ts.map +1 -0
  18. package/dist/channel/telegram-bot-webhook.d.ts +62 -0
  19. package/dist/channel/telegram-bot-webhook.d.ts.map +1 -0
  20. package/dist/channel/telegram-bot.d.ts +111 -0
  21. package/dist/channel/telegram-bot.d.ts.map +1 -0
  22. package/dist/definition.d.ts +1114 -0
  23. package/dist/definition.d.ts.map +1 -0
  24. package/dist/definition.js +20 -0
  25. package/dist/definition.js.map +9 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.js +17 -0
  28. package/dist/index.js.map +9 -0
  29. package/dist/internal/TelegramSchemas.d.ts +375 -0
  30. package/dist/internal/TelegramSchemas.d.ts.map +1 -0
  31. package/dist/plugin.d.ts +3282 -0
  32. package/dist/plugin.d.ts.map +1 -0
  33. package/dist/plugin.js +26 -0
  34. package/dist/plugin.js.map +9 -0
  35. package/dual-plugin.json +1 -0
  36. package/index-68np0qzt.js +224 -0
  37. package/index-68np0qzt.js.map +11 -0
  38. package/index-hpjyc5yq.js +847 -0
  39. package/index-hpjyc5yq.js.map +14 -0
  40. package/index-pm1rw9n0.js +1301 -0
  41. package/index-pm1rw9n0.js.map +18 -0
  42. package/index-ppnnem2q.js +5473 -0
  43. package/index-ppnnem2q.js.map +56 -0
  44. package/index-sdgqen8s.js +13975 -0
  45. package/index-sdgqen8s.js.map +111 -0
  46. package/index-xc47zv2c.js +251 -0
  47. package/index-xc47zv2c.js.map +10 -0
  48. package/licenses/@dual-os_sdk@0.9.0/LICENSE +4 -0
  49. package/licenses/@effect_platform-node-shared@4.1.2/LICENSE +21 -0
  50. package/licenses/@effect_platform-node@4.1.2/LICENSE +21 -0
  51. package/licenses/effect@4.1.2/LICENSE +21 -0
  52. package/package.json +1 -6
  53. package/plugin.json +8 -0
package/LICENSE ADDED
@@ -0,0 +1,4 @@
1
+ All rights reserved.
2
+
3
+ This package is proprietary and is not licensed for public use or redistribution.
4
+ Use and distribution require permission from the rights holder under a separate agreement.
package/README.md CHANGED
@@ -1,3 +1,66 @@
1
- # Temporary Holding Version
1
+ # @dual-os/telegram
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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.