@ours.network/tg-connector 0.3.3-nightly.4 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +131 -27
  2. package/dist/cli.js +98 -68
  3. package/dist/connector.js +24884 -68992
  4. package/dist/mufl_code/ED9CAFA60E1A0884E2CBC8E71BA8A137488A14763C57587D25AEC4BAD7F58C81.muflo +0 -0
  5. package/dist/mufl_code/actor.mu +1937 -0
  6. package/dist/mufl_code/config.mufl +27 -0
  7. package/dist/mufl_code/core/COMMERCIAL-LICENCE.md +25 -0
  8. package/dist/mufl_code/core/COMPATIBILITY.md +221 -0
  9. package/dist/mufl_code/core/CONTRIBUTING.md +37 -0
  10. package/dist/mufl_code/core/LICENSE +98 -0
  11. package/dist/mufl_code/core/NOTIFICATIONS_CONTRACT.md +290 -0
  12. package/dist/mufl_code/core/README.md +91 -0
  13. package/dist/mufl_code/core/SECURITY.md +40 -0
  14. package/dist/mufl_code/core/TRADEMARKS.md +24 -0
  15. package/dist/mufl_code/core/a2a_capabilities.mm +449 -0
  16. package/dist/mufl_code/core/a2a_cluster.mm +601 -0
  17. package/dist/mufl_code/core/a2a_control.mm +90 -0
  18. package/dist/mufl_code/core/a2a_messaging.mm +4817 -0
  19. package/dist/mufl_code/core/a2a_monitoring.mm +94 -0
  20. package/dist/mufl_code/core/a2a_notification_integration.mm +144 -0
  21. package/dist/mufl_code/core/a2a_notifications.mm +1127 -0
  22. package/dist/mufl_code/core/a2a_protocol.mm +246 -0
  23. package/dist/mufl_code/core/a2a_versions.mm +801 -0
  24. package/dist/mufl_code/core/config.mufl +29 -0
  25. package/dist/mufl_code/core/docs/.vitepress/config.mts +58 -0
  26. package/dist/mufl_code/core/docs/citations.json +688 -0
  27. package/dist/mufl_code/core/docs/guide/01-vendor-the-core.md +50 -0
  28. package/dist/mufl_code/core/docs/guide/02-configure-and-compile.md +100 -0
  29. package/dist/mufl_code/core/docs/guide/03-wire-the-host.md +154 -0
  30. package/dist/mufl_code/core/docs/guide/04-connect-and-message.md +156 -0
  31. package/dist/mufl_code/core/docs/guide/05-test-your-app.md +75 -0
  32. package/dist/mufl_code/core/docs/guide/index.md +63 -0
  33. package/dist/mufl_code/core/docs/how-it-works/capabilities-and-control.md +77 -0
  34. package/dist/mufl_code/core/docs/how-it-works/cluster.md +65 -0
  35. package/dist/mufl_code/core/docs/how-it-works/identity.md +56 -0
  36. package/dist/mufl_code/core/docs/how-it-works/invites-and-contacts.md +76 -0
  37. package/dist/mufl_code/core/docs/how-it-works/messaging.md +55 -0
  38. package/dist/mufl_code/core/docs/how-it-works/monitoring-and-config.md +72 -0
  39. package/dist/mufl_code/core/docs/how-it-works/overview.md +45 -0
  40. package/dist/mufl_code/core/docs/how-it-works/versioning.md +116 -0
  41. package/dist/mufl_code/core/docs/index.md +27 -0
  42. package/dist/mufl_code/core/docs/package-lock.json +3467 -0
  43. package/dist/mufl_code/core/docs/package.json +15 -0
  44. package/dist/mufl_code/core/docs/reference/contributing.md +26 -0
  45. package/dist/mufl_code/core/docs/reference/glossary.md +108 -0
  46. package/dist/mufl_code/core/docs/reference/implementations.md +23 -0
  47. package/dist/mufl_code/core/docs/reference/modules.md +19 -0
  48. package/dist/mufl_code/core/docs/scripts/check-citations.mjs +36 -0
  49. package/dist/mufl_code/core/docs/scripts/check-denylist.mjs +30 -0
  50. package/dist/mufl_code/core/docs/scripts/gen-llms.mjs +32 -0
  51. package/dist/mufl_code/core/docs/workflows/cluster.md +89 -0
  52. package/dist/mufl_code/core/docs/workflows/contact-exchange.md +60 -0
  53. package/dist/mufl_code/core/docs/workflows/contact-restore.md +60 -0
  54. package/dist/mufl_code/core/docs/workflows/control-verbs.md +70 -0
  55. package/dist/mufl_code/core/docs/workflows/index.md +57 -0
  56. package/dist/mufl_code/core/docs/workflows/introductions.md +60 -0
  57. package/dist/mufl_code/core/docs/workflows/messaging.md +75 -0
  58. package/dist/mufl_code/core/docs/workflows/monitoring.md +84 -0
  59. package/dist/mufl_code/core/docs/workflows/notifications.md +109 -0
  60. package/dist/mufl_code/core/release-notes/0.1.md +60 -0
  61. package/dist/mufl_code/core/release-notes/0.3.md +22 -0
  62. package/dist/mufl_code/core/release-notes/0.4.md +97 -0
  63. package/dist/mufl_code/core/tests/README.md +83 -0
  64. package/dist/mufl_code/core/tests/compat/README.md +82 -0
  65. package/dist/mufl_code/core/tests/compat/compat.mjs +245 -0
  66. package/dist/mufl_code/core/tests/compat/compat_peer.mjs +146 -0
  67. package/dist/mufl_code/core/tests/compat/run_compat.sh +96 -0
  68. package/dist/mufl_code/core/tests/corpus.mjs +139 -0
  69. package/dist/mufl_code/core/tests/corpus_actor.mu +242 -0
  70. package/dist/mufl_code/core/tests/fatcompile_actor.mu +52 -0
  71. package/dist/mufl_code/core/tests/mig.mjs +805 -0
  72. package/dist/mufl_code/core/tests/mig_actor.mu +518 -0
  73. package/dist/mufl_code/core/tests/migapp.mjs +431 -0
  74. package/dist/mufl_code/core/tests/migapp_actor.mu +294 -0
  75. package/dist/mufl_code/core/tests/mufl_semantics/run.sh +69 -0
  76. package/dist/mufl_code/core/tests/mufl_semantics/t11_three_version.mufl +47 -0
  77. package/dist/mufl_code/core/tests/mufl_semantics/t2_extra_fields.mufl +11 -0
  78. package/dist/mufl_code/core/tests/mufl_semantics/t7_runtime.mufl +30 -0
  79. package/dist/mufl_code/core/tests/mufl_semantics/t9_passthrough.mufl +19 -0
  80. package/dist/mufl_code/core/tests/mufl_semantics/t_str_order.mufl +19 -0
  81. package/dist/mufl_code/core/tests/notif.mjs +755 -0
  82. package/dist/mufl_code/core/tests/notif_actor.mu +450 -0
  83. package/dist/mufl_code/core/tests/protocol_container.mm +18 -0
  84. package/dist/mufl_code/core/tests/run.sh +65 -0
  85. package/dist/mufl_code/core/tests/run_corpus.sh +51 -0
  86. package/dist/mufl_code/core/tests/run_fatcompile.sh +40 -0
  87. package/dist/mufl_code/core/tests/run_mig.sh +51 -0
  88. package/dist/mufl_code/core/tests/run_migapp.sh +51 -0
  89. package/dist/mufl_code/core/tests/run_notif.sh +57 -0
  90. package/dist/mufl_code/core/tests/test.mjs +750 -0
  91. package/dist/mufl_code/core/tests/test_actor.mu +564 -0
  92. package/dist/mufl_code/core/tests/test_common.mjs +93 -0
  93. package/dist/mufl_code/core/version.mm +24 -0
  94. package/dist/mufl_code/protocol_container.mm +18 -0
  95. package/docs/voice-message-contract.md +2 -8
  96. package/package.json +5 -3
@@ -0,0 +1,24 @@
1
+ /*
2
+ This library provides a simple version tracking mechanism for the shared
3
+ ours mufl core. It contains a hardcoded read-only version that can be
4
+ accessed by any library or application that loads it.
5
+ This library has no dependencies and can be included in any packet.
6
+ */
7
+ library version
8
+ {
9
+ metadef version_t: (
10
+ $MAJ -> int,
11
+ $MIN -> int,
12
+ $PATCH -> int
13
+ ).
14
+
15
+ fn create_version (maj: int, min: int, patch: int) = ($MIN -> min, $MAJ -> maj, $PATCH -> patch).
16
+
17
+
18
+ // This MUST be updated every time we update ANY code in the shared core.
19
+ hidden {
20
+ core_version = create_version 0 9 0.
21
+ }
22
+
23
+ fn get_core_version(_) = core_version.
24
+ }
@@ -0,0 +1,18 @@
1
+ // Minimal protocol_container library — provides ::protocol_container::init_my_ipd,
2
+ // which the ADAPT wrapper runs on every packet during broker registration
3
+ // (possession-proof / identity-proof-document setup, adapt #77). Mirrors the
4
+ // toolkit's per-unit protocol_container stub; deps resolve from the stdlib.
5
+ library protocol_container loads libraries
6
+ identity_proof_document,
7
+ identity_proof_document_types,
8
+ native_attestation_document,
9
+ browser_attestation_document,
10
+ current_transaction_info
11
+ uses transactions
12
+ {
13
+ trn init_my_ipd _ {
14
+ current_transaction_info::validate_origin (::transaction::envelope::origin::user,).
15
+ identity_proof_document_types::set_my_ipd(identity_proof_document::create()).
16
+ return ::transaction::success [].
17
+ }
18
+ }
@@ -59,11 +59,5 @@ node --import tsx tests/voice.test.mjs
59
59
  ```
60
60
 
61
61
  The first two are pure local tests. The voice integration test uses placeholder
62
- OGG/Opus-signature bytes, a real ours daemon driven through `@ours.network/sdk`
63
- (the connector no longer runs an in-process ADAPT host), and a stubbed STT
64
- provider; it requires no Telegram token, STT token, or real media.
65
-
66
- The STT spy is scoped **by origin**, not by URL: the daemon transcribes through
67
- the same `openai-compatible` provider URL, so a URL-matching spy cannot tell the
68
- daemon's call apart from the connector's, and an assertion that "the STT provider
69
- was never called" would fail against a connector that correctly never called it.
62
+ OGG/Opus-signature bytes, an in-process ADAPT host, and a stubbed STT provider;
63
+ it requires no Telegram token, STT token, or real media.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ours.network/tg-connector",
3
- "version": "0.3.3-nightly.4",
4
- "description": "Bridge Telegram bots to ours.network agents — attaches to an already-running ours daemon and bridges one Telegram chat/topic to one agent per route. Run `ours-tg-connector add_new_connection`.",
3
+ "version": "0.5.0",
4
+ "description": "Bridge Telegram bots to ours proxy nodes — one ADAPT wrapper hosting N messenger packets, each connecting one Telegram bot to one ours node. Run `ours-tg-connector add_new_connection`.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",
7
7
  "author": "Adapt Toolkit",
@@ -36,10 +36,12 @@
36
36
  "test": "for f in tests/*.test.mjs; do echo \"# $f\"; node_modules/.bin/tsx \"$f\" || exit 1; done"
37
37
  },
38
38
  "dependencies": {
39
- "@ours.network/sdk": "1.5.2",
39
+ "@adapt-toolkit/sdk": "0.10.12",
40
+ "@adapt-toolkit/sdk-native": "0.10.12",
40
41
  "undici": "^7.28.0"
41
42
  },
42
43
  "devDependencies": {
44
+ "@adapt-toolkit/mufl": "0.10.12",
43
45
  "@types/node": "^20.14.0",
44
46
  "esbuild": "^0.24.2",
45
47
  "tsx": "^4.19.0",