@syengup/fridaynext-hermes-channel 0.1.0-beta.3 → 0.1.0-beta.7

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 (844) hide show
  1. package/README.md +3 -3
  2. package/install-config.js +84 -0
  3. package/install-host.py +95 -0
  4. package/install-runtime.js +167 -35
  5. package/install.js +23 -6
  6. package/package.json +6 -5
  7. package/plugin.bundle +0 -0
  8. package/validation.json +1 -0
  9. package/plugin/README.md +0 -21
  10. package/plugin/__init__.py +0 -3
  11. package/plugin/fridaynext_plugin/__init__.py +0 -71
  12. package/plugin/fridaynext_plugin/adapter.py +0 -1124
  13. package/plugin/fridaynext_plugin/agent_defaults.py +0 -107
  14. package/plugin/fridaynext_plugin/canonical_control.py +0 -509
  15. package/plugin/fridaynext_plugin/compat_v0225.py +0 -910
  16. package/plugin/fridaynext_plugin/control_cli.py +0 -101
  17. package/plugin/fridaynext_plugin/controls.py +0 -296
  18. package/plugin/fridaynext_plugin/delivery_context.py +0 -210
  19. package/plugin/fridaynext_plugin/diagnostics.py +0 -165
  20. package/plugin/fridaynext_plugin/history.py +0 -421
  21. package/plugin/fridaynext_plugin/host.py +0 -317
  22. package/plugin/fridaynext_plugin/initial_settings.py +0 -184
  23. package/plugin/fridaynext_plugin/inline_media.py +0 -58
  24. package/plugin/fridaynext_plugin/media_input.py +0 -139
  25. package/plugin/fridaynext_plugin/media_observations.py +0 -172
  26. package/plugin/fridaynext_plugin/media_output.py +0 -277
  27. package/plugin/fridaynext_plugin/message_speech.py +0 -143
  28. package/plugin/fridaynext_plugin/recovery.py +0 -214
  29. package/plugin/fridaynext_plugin/runtime_port.py +0 -571
  30. package/plugin/fridaynext_plugin/sessions.py +0 -184
  31. package/plugin/fridaynext_plugin/settings.py +0 -695
  32. package/plugin/fridaynext_plugin/settings_control.py +0 -101
  33. package/plugin/fridaynext_plugin/state.py +0 -155
  34. package/plugin/fridaynext_plugin/stream_bridge.py +0 -493
  35. package/plugin/fridaynext_plugin/stream_media.py +0 -59
  36. package/plugin/fridaynext_plugin/stream_projection.py +0 -269
  37. package/plugin/plugin.yaml +0 -18
  38. package/plugin/runtime/dist/host-peer.js +0 -106
  39. package/plugin/runtime/dist/hosted-artifacts.js +0 -189
  40. package/plugin/runtime/dist/hosted-backend.js +0 -211
  41. package/plugin/runtime/dist/hosted-delivery-observations.js +0 -91
  42. package/plugin/runtime/dist/hosted-media.js +0 -327
  43. package/plugin/runtime/dist/hosted-recovery.js +0 -55
  44. package/plugin/runtime/dist/hosted-settings.js +0 -26
  45. package/plugin/runtime/dist/hosted-stream.js +0 -104
  46. package/plugin/runtime/dist/identity.js +0 -55
  47. package/plugin/runtime/dist/kit-contract.json +0 -1
  48. package/plugin/runtime/dist/media-transport.js +0 -168
  49. package/plugin/runtime/dist/oss-upload-worker.js +0 -7
  50. package/plugin/runtime/dist/oss-upload.js +0 -94
  51. package/plugin/runtime/dist/ownership.js +0 -21
  52. package/plugin/runtime/dist/platform-service.js +0 -32
  53. package/plugin/runtime/dist/plugin-control.js +0 -189
  54. package/plugin/runtime/dist/plugin-worker.js +0 -43
  55. package/plugin/runtime/dist/private-files.js +0 -24
  56. package/plugin/runtime/dist/process-lock.js +0 -40
  57. package/plugin/runtime/dist/public-config.js +0 -58
  58. package/plugin/runtime/dist/service-errors.js +0 -11
  59. package/plugin/runtime/dist/service-host.js +0 -251
  60. package/plugin/runtime/dist/speech-routes.js +0 -111
  61. package/plugin/runtime/node_modules/.package-lock.json +0 -436
  62. package/plugin/runtime/node_modules/@noble/hashes/LICENSE +0 -21
  63. package/plugin/runtime/node_modules/@noble/hashes/README.md +0 -521
  64. package/plugin/runtime/node_modules/@noble/hashes/_assert.d.ts +0 -17
  65. package/plugin/runtime/node_modules/@noble/hashes/_assert.d.ts.map +0 -1
  66. package/plugin/runtime/node_modules/@noble/hashes/_assert.js +0 -18
  67. package/plugin/runtime/node_modules/@noble/hashes/_assert.js.map +0 -1
  68. package/plugin/runtime/node_modules/@noble/hashes/_blake.d.ts +0 -14
  69. package/plugin/runtime/node_modules/@noble/hashes/_blake.d.ts.map +0 -1
  70. package/plugin/runtime/node_modules/@noble/hashes/_blake.js +0 -50
  71. package/plugin/runtime/node_modules/@noble/hashes/_blake.js.map +0 -1
  72. package/plugin/runtime/node_modules/@noble/hashes/_md.d.ts +0 -51
  73. package/plugin/runtime/node_modules/@noble/hashes/_md.d.ts.map +0 -1
  74. package/plugin/runtime/node_modules/@noble/hashes/_md.js +0 -162
  75. package/plugin/runtime/node_modules/@noble/hashes/_md.js.map +0 -1
  76. package/plugin/runtime/node_modules/@noble/hashes/_u64.d.ts +0 -55
  77. package/plugin/runtime/node_modules/@noble/hashes/_u64.d.ts.map +0 -1
  78. package/plugin/runtime/node_modules/@noble/hashes/_u64.js +0 -90
  79. package/plugin/runtime/node_modules/@noble/hashes/_u64.js.map +0 -1
  80. package/plugin/runtime/node_modules/@noble/hashes/argon2.d.ts +0 -32
  81. package/plugin/runtime/node_modules/@noble/hashes/argon2.d.ts.map +0 -1
  82. package/plugin/runtime/node_modules/@noble/hashes/argon2.js +0 -401
  83. package/plugin/runtime/node_modules/@noble/hashes/argon2.js.map +0 -1
  84. package/plugin/runtime/node_modules/@noble/hashes/blake1.d.ts +0 -106
  85. package/plugin/runtime/node_modules/@noble/hashes/blake1.d.ts.map +0 -1
  86. package/plugin/runtime/node_modules/@noble/hashes/blake1.js +0 -459
  87. package/plugin/runtime/node_modules/@noble/hashes/blake1.js.map +0 -1
  88. package/plugin/runtime/node_modules/@noble/hashes/blake2.d.ts +0 -116
  89. package/plugin/runtime/node_modules/@noble/hashes/blake2.d.ts.map +0 -1
  90. package/plugin/runtime/node_modules/@noble/hashes/blake2.js +0 -420
  91. package/plugin/runtime/node_modules/@noble/hashes/blake2.js.map +0 -1
  92. package/plugin/runtime/node_modules/@noble/hashes/blake2b.d.ts +0 -11
  93. package/plugin/runtime/node_modules/@noble/hashes/blake2b.d.ts.map +0 -1
  94. package/plugin/runtime/node_modules/@noble/hashes/blake2b.js +0 -14
  95. package/plugin/runtime/node_modules/@noble/hashes/blake2b.js.map +0 -1
  96. package/plugin/runtime/node_modules/@noble/hashes/blake2s.d.ts +0 -20
  97. package/plugin/runtime/node_modules/@noble/hashes/blake2s.d.ts.map +0 -1
  98. package/plugin/runtime/node_modules/@noble/hashes/blake2s.js +0 -24
  99. package/plugin/runtime/node_modules/@noble/hashes/blake2s.js.map +0 -1
  100. package/plugin/runtime/node_modules/@noble/hashes/blake3.d.ts +0 -54
  101. package/plugin/runtime/node_modules/@noble/hashes/blake3.d.ts.map +0 -1
  102. package/plugin/runtime/node_modules/@noble/hashes/blake3.js +0 -255
  103. package/plugin/runtime/node_modules/@noble/hashes/blake3.js.map +0 -1
  104. package/plugin/runtime/node_modules/@noble/hashes/crypto.d.ts +0 -2
  105. package/plugin/runtime/node_modules/@noble/hashes/crypto.d.ts.map +0 -1
  106. package/plugin/runtime/node_modules/@noble/hashes/crypto.js +0 -5
  107. package/plugin/runtime/node_modules/@noble/hashes/crypto.js.map +0 -1
  108. package/plugin/runtime/node_modules/@noble/hashes/cryptoNode.d.ts +0 -2
  109. package/plugin/runtime/node_modules/@noble/hashes/cryptoNode.d.ts.map +0 -1
  110. package/plugin/runtime/node_modules/@noble/hashes/cryptoNode.js +0 -18
  111. package/plugin/runtime/node_modules/@noble/hashes/cryptoNode.js.map +0 -1
  112. package/plugin/runtime/node_modules/@noble/hashes/eskdf.d.ts +0 -47
  113. package/plugin/runtime/node_modules/@noble/hashes/eskdf.d.ts.map +0 -1
  114. package/plugin/runtime/node_modules/@noble/hashes/eskdf.js +0 -166
  115. package/plugin/runtime/node_modules/@noble/hashes/eskdf.js.map +0 -1
  116. package/plugin/runtime/node_modules/@noble/hashes/esm/_assert.d.ts +0 -17
  117. package/plugin/runtime/node_modules/@noble/hashes/esm/_assert.d.ts.map +0 -1
  118. package/plugin/runtime/node_modules/@noble/hashes/esm/_assert.js +0 -15
  119. package/plugin/runtime/node_modules/@noble/hashes/esm/_assert.js.map +0 -1
  120. package/plugin/runtime/node_modules/@noble/hashes/esm/_blake.d.ts +0 -14
  121. package/plugin/runtime/node_modules/@noble/hashes/esm/_blake.d.ts.map +0 -1
  122. package/plugin/runtime/node_modules/@noble/hashes/esm/_blake.js +0 -45
  123. package/plugin/runtime/node_modules/@noble/hashes/esm/_blake.js.map +0 -1
  124. package/plugin/runtime/node_modules/@noble/hashes/esm/_md.d.ts +0 -51
  125. package/plugin/runtime/node_modules/@noble/hashes/esm/_md.d.ts.map +0 -1
  126. package/plugin/runtime/node_modules/@noble/hashes/esm/_md.js +0 -155
  127. package/plugin/runtime/node_modules/@noble/hashes/esm/_md.js.map +0 -1
  128. package/plugin/runtime/node_modules/@noble/hashes/esm/_u64.d.ts +0 -55
  129. package/plugin/runtime/node_modules/@noble/hashes/esm/_u64.d.ts.map +0 -1
  130. package/plugin/runtime/node_modules/@noble/hashes/esm/_u64.js +0 -67
  131. package/plugin/runtime/node_modules/@noble/hashes/esm/_u64.js.map +0 -1
  132. package/plugin/runtime/node_modules/@noble/hashes/esm/argon2.d.ts +0 -32
  133. package/plugin/runtime/node_modules/@noble/hashes/esm/argon2.d.ts.map +0 -1
  134. package/plugin/runtime/node_modules/@noble/hashes/esm/argon2.js +0 -392
  135. package/plugin/runtime/node_modules/@noble/hashes/esm/argon2.js.map +0 -1
  136. package/plugin/runtime/node_modules/@noble/hashes/esm/blake1.d.ts +0 -106
  137. package/plugin/runtime/node_modules/@noble/hashes/esm/blake1.d.ts.map +0 -1
  138. package/plugin/runtime/node_modules/@noble/hashes/esm/blake1.js +0 -452
  139. package/plugin/runtime/node_modules/@noble/hashes/esm/blake1.js.map +0 -1
  140. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2.d.ts +0 -116
  141. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2.d.ts.map +0 -1
  142. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2.js +0 -413
  143. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2.js.map +0 -1
  144. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2b.d.ts +0 -11
  145. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2b.d.ts.map +0 -1
  146. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2b.js +0 -11
  147. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2b.js.map +0 -1
  148. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2s.d.ts +0 -20
  149. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2s.d.ts.map +0 -1
  150. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2s.js +0 -21
  151. package/plugin/runtime/node_modules/@noble/hashes/esm/blake2s.js.map +0 -1
  152. package/plugin/runtime/node_modules/@noble/hashes/esm/blake3.d.ts +0 -54
  153. package/plugin/runtime/node_modules/@noble/hashes/esm/blake3.d.ts.map +0 -1
  154. package/plugin/runtime/node_modules/@noble/hashes/esm/blake3.js +0 -251
  155. package/plugin/runtime/node_modules/@noble/hashes/esm/blake3.js.map +0 -1
  156. package/plugin/runtime/node_modules/@noble/hashes/esm/crypto.d.ts +0 -2
  157. package/plugin/runtime/node_modules/@noble/hashes/esm/crypto.d.ts.map +0 -1
  158. package/plugin/runtime/node_modules/@noble/hashes/esm/crypto.js +0 -2
  159. package/plugin/runtime/node_modules/@noble/hashes/esm/crypto.js.map +0 -1
  160. package/plugin/runtime/node_modules/@noble/hashes/esm/cryptoNode.d.ts +0 -2
  161. package/plugin/runtime/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +0 -1
  162. package/plugin/runtime/node_modules/@noble/hashes/esm/cryptoNode.js +0 -15
  163. package/plugin/runtime/node_modules/@noble/hashes/esm/cryptoNode.js.map +0 -1
  164. package/plugin/runtime/node_modules/@noble/hashes/esm/eskdf.d.ts +0 -47
  165. package/plugin/runtime/node_modules/@noble/hashes/esm/eskdf.d.ts.map +0 -1
  166. package/plugin/runtime/node_modules/@noble/hashes/esm/eskdf.js +0 -160
  167. package/plugin/runtime/node_modules/@noble/hashes/esm/eskdf.js.map +0 -1
  168. package/plugin/runtime/node_modules/@noble/hashes/esm/hkdf.d.ts +0 -36
  169. package/plugin/runtime/node_modules/@noble/hashes/esm/hkdf.d.ts.map +0 -1
  170. package/plugin/runtime/node_modules/@noble/hashes/esm/hkdf.js +0 -82
  171. package/plugin/runtime/node_modules/@noble/hashes/esm/hkdf.js.map +0 -1
  172. package/plugin/runtime/node_modules/@noble/hashes/esm/hmac.d.ts +0 -35
  173. package/plugin/runtime/node_modules/@noble/hashes/esm/hmac.d.ts.map +0 -1
  174. package/plugin/runtime/node_modules/@noble/hashes/esm/hmac.js +0 -86
  175. package/plugin/runtime/node_modules/@noble/hashes/esm/hmac.js.map +0 -1
  176. package/plugin/runtime/node_modules/@noble/hashes/esm/index.d.ts +0 -2
  177. package/plugin/runtime/node_modules/@noble/hashes/esm/index.d.ts.map +0 -1
  178. package/plugin/runtime/node_modules/@noble/hashes/esm/index.js +0 -33
  179. package/plugin/runtime/node_modules/@noble/hashes/esm/index.js.map +0 -1
  180. package/plugin/runtime/node_modules/@noble/hashes/esm/legacy.d.ts +0 -71
  181. package/plugin/runtime/node_modules/@noble/hashes/esm/legacy.d.ts.map +0 -1
  182. package/plugin/runtime/node_modules/@noble/hashes/esm/legacy.js +0 -281
  183. package/plugin/runtime/node_modules/@noble/hashes/esm/legacy.js.map +0 -1
  184. package/plugin/runtime/node_modules/@noble/hashes/esm/package.json +0 -10
  185. package/plugin/runtime/node_modules/@noble/hashes/esm/pbkdf2.d.ts +0 -23
  186. package/plugin/runtime/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +0 -1
  187. package/plugin/runtime/node_modules/@noble/hashes/esm/pbkdf2.js +0 -97
  188. package/plugin/runtime/node_modules/@noble/hashes/esm/pbkdf2.js.map +0 -1
  189. package/plugin/runtime/node_modules/@noble/hashes/esm/ripemd160.d.ts +0 -13
  190. package/plugin/runtime/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +0 -1
  191. package/plugin/runtime/node_modules/@noble/hashes/esm/ripemd160.js +0 -13
  192. package/plugin/runtime/node_modules/@noble/hashes/esm/ripemd160.js.map +0 -1
  193. package/plugin/runtime/node_modules/@noble/hashes/esm/scrypt.d.ts +0 -34
  194. package/plugin/runtime/node_modules/@noble/hashes/esm/scrypt.d.ts.map +0 -1
  195. package/plugin/runtime/node_modules/@noble/hashes/esm/scrypt.js +0 -228
  196. package/plugin/runtime/node_modules/@noble/hashes/esm/scrypt.js.map +0 -1
  197. package/plugin/runtime/node_modules/@noble/hashes/esm/sha1.d.ts +0 -11
  198. package/plugin/runtime/node_modules/@noble/hashes/esm/sha1.d.ts.map +0 -1
  199. package/plugin/runtime/node_modules/@noble/hashes/esm/sha1.js +0 -11
  200. package/plugin/runtime/node_modules/@noble/hashes/esm/sha1.js.map +0 -1
  201. package/plugin/runtime/node_modules/@noble/hashes/esm/sha2.d.ts +0 -159
  202. package/plugin/runtime/node_modules/@noble/hashes/esm/sha2.d.ts.map +0 -1
  203. package/plugin/runtime/node_modules/@noble/hashes/esm/sha2.js +0 -375
  204. package/plugin/runtime/node_modules/@noble/hashes/esm/sha2.js.map +0 -1
  205. package/plugin/runtime/node_modules/@noble/hashes/esm/sha256.d.ts +0 -20
  206. package/plugin/runtime/node_modules/@noble/hashes/esm/sha256.d.ts.map +0 -1
  207. package/plugin/runtime/node_modules/@noble/hashes/esm/sha256.js +0 -20
  208. package/plugin/runtime/node_modules/@noble/hashes/esm/sha256.js.map +0 -1
  209. package/plugin/runtime/node_modules/@noble/hashes/esm/sha3-addons.d.ts +0 -142
  210. package/plugin/runtime/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +0 -1
  211. package/plugin/runtime/node_modules/@noble/hashes/esm/sha3-addons.js +0 -393
  212. package/plugin/runtime/node_modules/@noble/hashes/esm/sha3-addons.js.map +0 -1
  213. package/plugin/runtime/node_modules/@noble/hashes/esm/sha3.d.ts +0 -53
  214. package/plugin/runtime/node_modules/@noble/hashes/esm/sha3.d.ts.map +0 -1
  215. package/plugin/runtime/node_modules/@noble/hashes/esm/sha3.js +0 -234
  216. package/plugin/runtime/node_modules/@noble/hashes/esm/sha3.js.map +0 -1
  217. package/plugin/runtime/node_modules/@noble/hashes/esm/sha512.d.ts +0 -26
  218. package/plugin/runtime/node_modules/@noble/hashes/esm/sha512.d.ts.map +0 -1
  219. package/plugin/runtime/node_modules/@noble/hashes/esm/sha512.js +0 -26
  220. package/plugin/runtime/node_modules/@noble/hashes/esm/sha512.js.map +0 -1
  221. package/plugin/runtime/node_modules/@noble/hashes/esm/utils.d.ts +0 -161
  222. package/plugin/runtime/node_modules/@noble/hashes/esm/utils.d.ts.map +0 -1
  223. package/plugin/runtime/node_modules/@noble/hashes/esm/utils.js +0 -281
  224. package/plugin/runtime/node_modules/@noble/hashes/esm/utils.js.map +0 -1
  225. package/plugin/runtime/node_modules/@noble/hashes/hkdf.d.ts +0 -36
  226. package/plugin/runtime/node_modules/@noble/hashes/hkdf.d.ts.map +0 -1
  227. package/plugin/runtime/node_modules/@noble/hashes/hkdf.js +0 -88
  228. package/plugin/runtime/node_modules/@noble/hashes/hkdf.js.map +0 -1
  229. package/plugin/runtime/node_modules/@noble/hashes/hmac.d.ts +0 -35
  230. package/plugin/runtime/node_modules/@noble/hashes/hmac.d.ts.map +0 -1
  231. package/plugin/runtime/node_modules/@noble/hashes/hmac.js +0 -91
  232. package/plugin/runtime/node_modules/@noble/hashes/hmac.js.map +0 -1
  233. package/plugin/runtime/node_modules/@noble/hashes/index.d.ts +0 -1
  234. package/plugin/runtime/node_modules/@noble/hashes/index.d.ts.map +0 -1
  235. package/plugin/runtime/node_modules/@noble/hashes/index.js +0 -33
  236. package/plugin/runtime/node_modules/@noble/hashes/index.js.map +0 -1
  237. package/plugin/runtime/node_modules/@noble/hashes/legacy.d.ts +0 -71
  238. package/plugin/runtime/node_modules/@noble/hashes/legacy.d.ts.map +0 -1
  239. package/plugin/runtime/node_modules/@noble/hashes/legacy.js +0 -287
  240. package/plugin/runtime/node_modules/@noble/hashes/legacy.js.map +0 -1
  241. package/plugin/runtime/node_modules/@noble/hashes/package.json +0 -266
  242. package/plugin/runtime/node_modules/@noble/hashes/pbkdf2.d.ts +0 -23
  243. package/plugin/runtime/node_modules/@noble/hashes/pbkdf2.d.ts.map +0 -1
  244. package/plugin/runtime/node_modules/@noble/hashes/pbkdf2.js +0 -101
  245. package/plugin/runtime/node_modules/@noble/hashes/pbkdf2.js.map +0 -1
  246. package/plugin/runtime/node_modules/@noble/hashes/ripemd160.d.ts +0 -13
  247. package/plugin/runtime/node_modules/@noble/hashes/ripemd160.d.ts.map +0 -1
  248. package/plugin/runtime/node_modules/@noble/hashes/ripemd160.js +0 -16
  249. package/plugin/runtime/node_modules/@noble/hashes/ripemd160.js.map +0 -1
  250. package/plugin/runtime/node_modules/@noble/hashes/scrypt.d.ts +0 -34
  251. package/plugin/runtime/node_modules/@noble/hashes/scrypt.d.ts.map +0 -1
  252. package/plugin/runtime/node_modules/@noble/hashes/scrypt.js +0 -232
  253. package/plugin/runtime/node_modules/@noble/hashes/scrypt.js.map +0 -1
  254. package/plugin/runtime/node_modules/@noble/hashes/sha1.d.ts +0 -11
  255. package/plugin/runtime/node_modules/@noble/hashes/sha1.d.ts.map +0 -1
  256. package/plugin/runtime/node_modules/@noble/hashes/sha1.js +0 -14
  257. package/plugin/runtime/node_modules/@noble/hashes/sha1.js.map +0 -1
  258. package/plugin/runtime/node_modules/@noble/hashes/sha2.d.ts +0 -159
  259. package/plugin/runtime/node_modules/@noble/hashes/sha2.d.ts.map +0 -1
  260. package/plugin/runtime/node_modules/@noble/hashes/sha2.js +0 -384
  261. package/plugin/runtime/node_modules/@noble/hashes/sha2.js.map +0 -1
  262. package/plugin/runtime/node_modules/@noble/hashes/sha256.d.ts +0 -20
  263. package/plugin/runtime/node_modules/@noble/hashes/sha256.d.ts.map +0 -1
  264. package/plugin/runtime/node_modules/@noble/hashes/sha256.js +0 -23
  265. package/plugin/runtime/node_modules/@noble/hashes/sha256.js.map +0 -1
  266. package/plugin/runtime/node_modules/@noble/hashes/sha3-addons.d.ts +0 -142
  267. package/plugin/runtime/node_modules/@noble/hashes/sha3-addons.d.ts.map +0 -1
  268. package/plugin/runtime/node_modules/@noble/hashes/sha3-addons.js +0 -402
  269. package/plugin/runtime/node_modules/@noble/hashes/sha3-addons.js.map +0 -1
  270. package/plugin/runtime/node_modules/@noble/hashes/sha3.d.ts +0 -53
  271. package/plugin/runtime/node_modules/@noble/hashes/sha3.d.ts.map +0 -1
  272. package/plugin/runtime/node_modules/@noble/hashes/sha3.js +0 -239
  273. package/plugin/runtime/node_modules/@noble/hashes/sha3.js.map +0 -1
  274. package/plugin/runtime/node_modules/@noble/hashes/sha512.d.ts +0 -26
  275. package/plugin/runtime/node_modules/@noble/hashes/sha512.d.ts.map +0 -1
  276. package/plugin/runtime/node_modules/@noble/hashes/sha512.js +0 -29
  277. package/plugin/runtime/node_modules/@noble/hashes/sha512.js.map +0 -1
  278. package/plugin/runtime/node_modules/@noble/hashes/src/_assert.ts +0 -22
  279. package/plugin/runtime/node_modules/@noble/hashes/src/_blake.ts +0 -50
  280. package/plugin/runtime/node_modules/@noble/hashes/src/_md.ts +0 -176
  281. package/plugin/runtime/node_modules/@noble/hashes/src/_u64.ts +0 -91
  282. package/plugin/runtime/node_modules/@noble/hashes/src/argon2.ts +0 -497
  283. package/plugin/runtime/node_modules/@noble/hashes/src/blake1.ts +0 -534
  284. package/plugin/runtime/node_modules/@noble/hashes/src/blake2.ts +0 -486
  285. package/plugin/runtime/node_modules/@noble/hashes/src/blake2b.ts +0 -10
  286. package/plugin/runtime/node_modules/@noble/hashes/src/blake2s.ts +0 -20
  287. package/plugin/runtime/node_modules/@noble/hashes/src/blake3.ts +0 -272
  288. package/plugin/runtime/node_modules/@noble/hashes/src/crypto.ts +0 -9
  289. package/plugin/runtime/node_modules/@noble/hashes/src/cryptoNode.ts +0 -15
  290. package/plugin/runtime/node_modules/@noble/hashes/src/eskdf.ts +0 -187
  291. package/plugin/runtime/node_modules/@noble/hashes/src/hkdf.ts +0 -88
  292. package/plugin/runtime/node_modules/@noble/hashes/src/hmac.ts +0 -94
  293. package/plugin/runtime/node_modules/@noble/hashes/src/index.ts +0 -31
  294. package/plugin/runtime/node_modules/@noble/hashes/src/legacy.ts +0 -293
  295. package/plugin/runtime/node_modules/@noble/hashes/src/pbkdf2.ts +0 -122
  296. package/plugin/runtime/node_modules/@noble/hashes/src/ripemd160.ts +0 -12
  297. package/plugin/runtime/node_modules/@noble/hashes/src/scrypt.ts +0 -257
  298. package/plugin/runtime/node_modules/@noble/hashes/src/sha1.ts +0 -10
  299. package/plugin/runtime/node_modules/@noble/hashes/src/sha2.ts +0 -402
  300. package/plugin/runtime/node_modules/@noble/hashes/src/sha256.ts +0 -24
  301. package/plugin/runtime/node_modules/@noble/hashes/src/sha3-addons.ts +0 -499
  302. package/plugin/runtime/node_modules/@noble/hashes/src/sha3.ts +0 -258
  303. package/plugin/runtime/node_modules/@noble/hashes/src/sha512.ts +0 -34
  304. package/plugin/runtime/node_modules/@noble/hashes/src/utils.ts +0 -395
  305. package/plugin/runtime/node_modules/@noble/hashes/utils.d.ts +0 -161
  306. package/plugin/runtime/node_modules/@noble/hashes/utils.d.ts.map +0 -1
  307. package/plugin/runtime/node_modules/@noble/hashes/utils.js +0 -313
  308. package/plugin/runtime/node_modules/@noble/hashes/utils.js.map +0 -1
  309. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/API.md +0 -416
  310. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/LICENSE +0 -21
  311. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/README.md +0 -77
  312. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attachment/store.d.ts +0 -57
  313. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attachment/store.js +0 -618
  314. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-gate.d.ts +0 -29
  315. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-gate.js +0 -58
  316. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-key-prune.d.ts +0 -17
  317. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-key-prune.js +0 -37
  318. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-store.d.ts +0 -27
  319. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/attest-store.js +0 -146
  320. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/verifier.d.ts +0 -1
  321. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/attest/verifier.js +0 -2
  322. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/delivery-observations.d.ts +0 -38
  323. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/delivery-observations.js +0 -85
  324. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/history.d.ts +0 -88
  325. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/history.js +0 -176
  326. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/pairing-codec.d.ts +0 -39
  327. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/pairing-codec.js +0 -233
  328. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/reconciliation.d.ts +0 -6
  329. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/reconciliation.js +0 -17
  330. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/types.d.ts +0 -234
  331. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/contract/types.js +0 -32
  332. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/coordinator.d.ts +0 -19
  333. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/coordinator.js +0 -113
  334. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/pending-store.d.ts +0 -37
  335. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/pending-store.js +0 -67
  336. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/results.d.ts +0 -14
  337. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/device-request/results.js +0 -39
  338. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/index.d.ts +0 -16
  339. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/index.js +0 -15
  340. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/og-parse.d.ts +0 -21
  341. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/og-parse.js +0 -234
  342. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/preview-service.d.ts +0 -39
  343. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/preview-service.js +0 -232
  344. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/ssrf-guard.d.ts +0 -52
  345. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/link-preview/ssrf-guard.js +0 -236
  346. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/prompt-capsules/capsules-store.d.ts +0 -38
  347. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/prompt-capsules/capsules-store.js +0 -149
  348. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/attachment-crypto.d.ts +0 -4
  349. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/attachment-crypto.js +0 -73
  350. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/cert-selfsign.d.ts +0 -6
  351. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/cert-selfsign.js +0 -88
  352. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/filter-proxy.d.ts +0 -17
  353. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/filter-proxy.js +0 -231
  354. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/frpc-manager.d.ts +0 -76
  355. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/frpc-manager.js +0 -1332
  356. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/oss-transfer.d.ts +0 -43
  357. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/oss-transfer.js +0 -280
  358. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/pairing-voucher.d.ts +0 -13
  359. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/pairing-voucher.js +0 -58
  360. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/private-file.d.ts +0 -2
  361. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/private-file.js +0 -11
  362. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/standby-loop-guard.d.ts +0 -9
  363. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/standby-loop-guard.js +0 -24
  364. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/tls-identity.d.ts +0 -36
  365. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/tls-identity.js +0 -151
  366. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/tunnel-watchdog-policy.d.ts +0 -24
  367. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/public-access/tunnel-watchdog-policy.js +0 -49
  368. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/push/push-runtime.d.ts +0 -45
  369. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/push/push-runtime.js +0 -233
  370. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/push/relay-transport.d.ts +0 -8
  371. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/push/relay-transport.js +0 -27
  372. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-kernel.d.ts +0 -49
  373. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-kernel.js +0 -307
  374. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-runtime.d.ts +0 -2
  375. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/channel-runtime.js +0 -2
  376. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/delivery-observation-publisher.d.ts +0 -43
  377. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/delivery-observation-publisher.js +0 -211
  378. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/durable-run-store.d.ts +0 -247
  379. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/durable-run-store.js +0 -1525
  380. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/runner.d.ts +0 -36
  381. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/runner.js +0 -269
  382. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/scheduler.d.ts +0 -13
  383. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/runtime/scheduler.js +0 -130
  384. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/server-name/server-name-store.d.ts +0 -21
  385. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/server-name/server-name-store.js +0 -52
  386. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/service/channel-service.d.ts +0 -38
  387. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/service/channel-service.js +0 -266
  388. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/service/infrastructure.d.ts +0 -87
  389. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/service/infrastructure.js +0 -179
  390. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/contract-harness.d.ts +0 -25
  391. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/contract-harness.js +0 -44
  392. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/reference-adapter.d.ts +0 -39
  393. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/reference-adapter.js +0 -76
  394. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/weaknet-server.d.ts +0 -6
  395. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/testing/weaknet-server.js +0 -130
  396. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/attest.d.ts +0 -39
  397. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/attest.js +0 -114
  398. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/body.d.ts +0 -2
  399. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/body.js +0 -24
  400. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/controls.d.ts +0 -9
  401. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/controls.js +0 -112
  402. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/files-download.d.ts +0 -18
  403. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/files-download.js +0 -197
  404. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/files-upload.d.ts +0 -20
  405. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/files-upload.js +0 -227
  406. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/link-preview.d.ts +0 -15
  407. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/link-preview.js +0 -45
  408. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/messages.d.ts +0 -10
  409. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/messages.js +0 -105
  410. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/pairing.d.ts +0 -22
  411. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/pairing.js +0 -138
  412. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/prompt-capsules.d.ts +0 -8
  413. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/prompt-capsules.js +0 -65
  414. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/push.d.ts +0 -13
  415. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/push.js +0 -65
  416. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/runtime.d.ts +0 -50
  417. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/runtime.js +0 -400
  418. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/server-name.d.ts +0 -8
  419. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/server-name.js +0 -43
  420. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/session-settings.d.ts +0 -5
  421. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/session-settings.js +0 -121
  422. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/sessions.d.ts +0 -20
  423. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/dist/transport/sessions.js +0 -118
  424. package/plugin/runtime/node_modules/@syengup/fridaynext-channel-kit/package.json +0 -40
  425. package/plugin/runtime/node_modules/ansi-regex/index.d.ts +0 -37
  426. package/plugin/runtime/node_modules/ansi-regex/index.js +0 -10
  427. package/plugin/runtime/node_modules/ansi-regex/license +0 -9
  428. package/plugin/runtime/node_modules/ansi-regex/package.json +0 -55
  429. package/plugin/runtime/node_modules/ansi-regex/readme.md +0 -78
  430. package/plugin/runtime/node_modules/ansi-styles/index.d.ts +0 -345
  431. package/plugin/runtime/node_modules/ansi-styles/index.js +0 -163
  432. package/plugin/runtime/node_modules/ansi-styles/license +0 -9
  433. package/plugin/runtime/node_modules/ansi-styles/package.json +0 -56
  434. package/plugin/runtime/node_modules/ansi-styles/readme.md +0 -152
  435. package/plugin/runtime/node_modules/asn1js/LICENSE +0 -30
  436. package/plugin/runtime/node_modules/asn1js/README.md +0 -222
  437. package/plugin/runtime/node_modules/asn1js/build/index.d.ts +0 -1412
  438. package/plugin/runtime/node_modules/asn1js/build/index.es.js +0 -3705
  439. package/plugin/runtime/node_modules/asn1js/build/index.js +0 -3773
  440. package/plugin/runtime/node_modules/asn1js/package.json +0 -89
  441. package/plugin/runtime/node_modules/bytestreamjs/LICENSE +0 -29
  442. package/plugin/runtime/node_modules/bytestreamjs/README.MD +0 -196
  443. package/plugin/runtime/node_modules/bytestreamjs/build/cjs/bit.js +0 -91
  444. package/plugin/runtime/node_modules/bytestreamjs/build/cjs/bit_stream.js +0 -400
  445. package/plugin/runtime/node_modules/bytestreamjs/build/cjs/byte_stream.js +0 -648
  446. package/plugin/runtime/node_modules/bytestreamjs/build/cjs/helpers.js +0 -59
  447. package/plugin/runtime/node_modules/bytestreamjs/build/cjs/index.js +0 -21
  448. package/plugin/runtime/node_modules/bytestreamjs/build/cjs/seq_bit_stream.js +0 -114
  449. package/plugin/runtime/node_modules/bytestreamjs/build/cjs/seq_stream.js +0 -437
  450. package/plugin/runtime/node_modules/bytestreamjs/build/mjs/bit.js +0 -88
  451. package/plugin/runtime/node_modules/bytestreamjs/build/mjs/bit_stream.js +0 -396
  452. package/plugin/runtime/node_modules/bytestreamjs/build/mjs/byte_stream.js +0 -644
  453. package/plugin/runtime/node_modules/bytestreamjs/build/mjs/helpers.js +0 -55
  454. package/plugin/runtime/node_modules/bytestreamjs/build/mjs/index.js +0 -5
  455. package/plugin/runtime/node_modules/bytestreamjs/build/mjs/seq_bit_stream.js +0 -110
  456. package/plugin/runtime/node_modules/bytestreamjs/build/mjs/seq_stream.js +0 -433
  457. package/plugin/runtime/node_modules/bytestreamjs/build/types/bit.d.ts +0 -1
  458. package/plugin/runtime/node_modules/bytestreamjs/build/types/bit_stream.d.ts +0 -222
  459. package/plugin/runtime/node_modules/bytestreamjs/build/types/byte_stream.d.ts +0 -292
  460. package/plugin/runtime/node_modules/bytestreamjs/build/types/helpers.d.ts +0 -23
  461. package/plugin/runtime/node_modules/bytestreamjs/build/types/index.d.ts +0 -5
  462. package/plugin/runtime/node_modules/bytestreamjs/build/types/seq_bit_stream.d.ts +0 -47
  463. package/plugin/runtime/node_modules/bytestreamjs/build/types/seq_stream.d.ts +0 -255
  464. package/plugin/runtime/node_modules/bytestreamjs/package.json +0 -66
  465. package/plugin/runtime/node_modules/camelcase/index.d.ts +0 -63
  466. package/plugin/runtime/node_modules/camelcase/index.js +0 -76
  467. package/plugin/runtime/node_modules/camelcase/license +0 -9
  468. package/plugin/runtime/node_modules/camelcase/package.json +0 -43
  469. package/plugin/runtime/node_modules/camelcase/readme.md +0 -99
  470. package/plugin/runtime/node_modules/cbor/LICENSE.md +0 -20
  471. package/plugin/runtime/node_modules/cbor/README.md +0 -282
  472. package/plugin/runtime/node_modules/cbor/lib/cbor.js +0 -114
  473. package/plugin/runtime/node_modules/cbor/lib/commented.js +0 -382
  474. package/plugin/runtime/node_modules/cbor/lib/constants.js +0 -79
  475. package/plugin/runtime/node_modules/cbor/lib/decoder.js +0 -680
  476. package/plugin/runtime/node_modules/cbor/lib/diagnose.js +0 -274
  477. package/plugin/runtime/node_modules/cbor/lib/encoder.js +0 -1121
  478. package/plugin/runtime/node_modules/cbor/lib/map.js +0 -185
  479. package/plugin/runtime/node_modules/cbor/lib/objectRecorder.js +0 -71
  480. package/plugin/runtime/node_modules/cbor/lib/sharedValueEncoder.js +0 -141
  481. package/plugin/runtime/node_modules/cbor/lib/simple.js +0 -104
  482. package/plugin/runtime/node_modules/cbor/lib/tagged.js +0 -378
  483. package/plugin/runtime/node_modules/cbor/lib/utils.js +0 -308
  484. package/plugin/runtime/node_modules/cbor/package.json +0 -47
  485. package/plugin/runtime/node_modules/cbor/types/lib/cbor.d.ts +0 -34
  486. package/plugin/runtime/node_modules/cbor/types/lib/commented.d.ts +0 -109
  487. package/plugin/runtime/node_modules/cbor/types/lib/constants.d.ts +0 -63
  488. package/plugin/runtime/node_modules/cbor/types/lib/decoder.d.ts +0 -199
  489. package/plugin/runtime/node_modules/cbor/types/lib/diagnose.d.ts +0 -91
  490. package/plugin/runtime/node_modules/cbor/types/lib/encoder.d.ts +0 -477
  491. package/plugin/runtime/node_modules/cbor/types/lib/map.d.ts +0 -78
  492. package/plugin/runtime/node_modules/cbor/types/lib/objectRecorder.d.ts +0 -36
  493. package/plugin/runtime/node_modules/cbor/types/lib/sharedValueEncoder.d.ts +0 -21
  494. package/plugin/runtime/node_modules/cbor/types/lib/simple.d.ts +0 -47
  495. package/plugin/runtime/node_modules/cbor/types/lib/tagged.d.ts +0 -74
  496. package/plugin/runtime/node_modules/cbor/types/lib/utils.d.ts +0 -20
  497. package/plugin/runtime/node_modules/cbor/types/vendor/binary-parse-stream/index.d.ts +0 -34
  498. package/plugin/runtime/node_modules/cbor/vendor/binary-parse-stream/README.md +0 -49
  499. package/plugin/runtime/node_modules/cbor/vendor/binary-parse-stream/index.js +0 -111
  500. package/plugin/runtime/node_modules/cliui/CHANGELOG.md +0 -76
  501. package/plugin/runtime/node_modules/cliui/LICENSE.txt +0 -14
  502. package/plugin/runtime/node_modules/cliui/README.md +0 -115
  503. package/plugin/runtime/node_modules/cliui/index.js +0 -354
  504. package/plugin/runtime/node_modules/cliui/package.json +0 -65
  505. package/plugin/runtime/node_modules/color-convert/CHANGELOG.md +0 -54
  506. package/plugin/runtime/node_modules/color-convert/LICENSE +0 -21
  507. package/plugin/runtime/node_modules/color-convert/README.md +0 -68
  508. package/plugin/runtime/node_modules/color-convert/conversions.js +0 -839
  509. package/plugin/runtime/node_modules/color-convert/index.js +0 -81
  510. package/plugin/runtime/node_modules/color-convert/package.json +0 -48
  511. package/plugin/runtime/node_modules/color-convert/route.js +0 -97
  512. package/plugin/runtime/node_modules/color-name/LICENSE +0 -8
  513. package/plugin/runtime/node_modules/color-name/README.md +0 -11
  514. package/plugin/runtime/node_modules/color-name/index.js +0 -152
  515. package/plugin/runtime/node_modules/color-name/package.json +0 -28
  516. package/plugin/runtime/node_modules/decamelize/index.js +0 -13
  517. package/plugin/runtime/node_modules/decamelize/license +0 -21
  518. package/plugin/runtime/node_modules/decamelize/package.json +0 -38
  519. package/plugin/runtime/node_modules/decamelize/readme.md +0 -48
  520. package/plugin/runtime/node_modules/dijkstrajs/.travis.yml +0 -4
  521. package/plugin/runtime/node_modules/dijkstrajs/CONTRIBUTING.md +0 -8
  522. package/plugin/runtime/node_modules/dijkstrajs/LICENSE.md +0 -19
  523. package/plugin/runtime/node_modules/dijkstrajs/README.md +0 -18
  524. package/plugin/runtime/node_modules/dijkstrajs/dijkstra.js +0 -165
  525. package/plugin/runtime/node_modules/dijkstrajs/package.json +0 -60
  526. package/plugin/runtime/node_modules/dijkstrajs/test/dijkstra.test.js +0 -96
  527. package/plugin/runtime/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  528. package/plugin/runtime/node_modules/emoji-regex/README.md +0 -73
  529. package/plugin/runtime/node_modules/emoji-regex/es2015/index.js +0 -6
  530. package/plugin/runtime/node_modules/emoji-regex/es2015/text.js +0 -6
  531. package/plugin/runtime/node_modules/emoji-regex/index.d.ts +0 -23
  532. package/plugin/runtime/node_modules/emoji-regex/index.js +0 -6
  533. package/plugin/runtime/node_modules/emoji-regex/package.json +0 -50
  534. package/plugin/runtime/node_modules/emoji-regex/text.js +0 -6
  535. package/plugin/runtime/node_modules/find-up/index.d.ts +0 -137
  536. package/plugin/runtime/node_modules/find-up/index.js +0 -89
  537. package/plugin/runtime/node_modules/find-up/license +0 -9
  538. package/plugin/runtime/node_modules/find-up/package.json +0 -53
  539. package/plugin/runtime/node_modules/find-up/readme.md +0 -156
  540. package/plugin/runtime/node_modules/get-caller-file/LICENSE.md +0 -6
  541. package/plugin/runtime/node_modules/get-caller-file/README.md +0 -41
  542. package/plugin/runtime/node_modules/get-caller-file/index.d.ts +0 -2
  543. package/plugin/runtime/node_modules/get-caller-file/index.js +0 -22
  544. package/plugin/runtime/node_modules/get-caller-file/index.js.map +0 -1
  545. package/plugin/runtime/node_modules/get-caller-file/package.json +0 -42
  546. package/plugin/runtime/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  547. package/plugin/runtime/node_modules/is-fullwidth-code-point/index.js +0 -50
  548. package/plugin/runtime/node_modules/is-fullwidth-code-point/license +0 -9
  549. package/plugin/runtime/node_modules/is-fullwidth-code-point/package.json +0 -42
  550. package/plugin/runtime/node_modules/is-fullwidth-code-point/readme.md +0 -39
  551. package/plugin/runtime/node_modules/locate-path/index.d.ts +0 -83
  552. package/plugin/runtime/node_modules/locate-path/index.js +0 -65
  553. package/plugin/runtime/node_modules/locate-path/license +0 -9
  554. package/plugin/runtime/node_modules/locate-path/package.json +0 -45
  555. package/plugin/runtime/node_modules/locate-path/readme.md +0 -122
  556. package/plugin/runtime/node_modules/node-app-attest/.github/dependabot.yml +0 -6
  557. package/plugin/runtime/node_modules/node-app-attest/.github/workflows/ci.yml +0 -43
  558. package/plugin/runtime/node_modules/node-app-attest/.prettierrc +0 -1
  559. package/plugin/runtime/node_modules/node-app-attest/.yarnrc.yml +0 -1
  560. package/plugin/runtime/node_modules/node-app-attest/LICENSE +0 -21
  561. package/plugin/runtime/node_modules/node-app-attest/README.md +0 -300
  562. package/plugin/runtime/node_modules/node-app-attest/eslint.config.js +0 -30
  563. package/plugin/runtime/node_modules/node-app-attest/package.json +0 -44
  564. package/plugin/runtime/node_modules/node-app-attest/src/index.js +0 -4
  565. package/plugin/runtime/node_modules/node-app-attest/src/verifyAssertion.js +0 -81
  566. package/plugin/runtime/node_modules/node-app-attest/src/verifyAttestation.js +0 -211
  567. package/plugin/runtime/node_modules/node-app-attest/test/fixtures/attestation-development.json +0 -5
  568. package/plugin/runtime/node_modules/node-app-attest/test/fixtures/attestation-production.json +0 -5
  569. package/plugin/runtime/node_modules/node-app-attest/test/verifyAssertion.test.js +0 -119
  570. package/plugin/runtime/node_modules/node-app-attest/test/verifyAttestation.test.js +0 -303
  571. package/plugin/runtime/node_modules/node-app-attest/tsconfig.json +0 -11
  572. package/plugin/runtime/node_modules/node-app-attest/types/index.d.ts +0 -4
  573. package/plugin/runtime/node_modules/node-app-attest/types/index.d.ts.map +0 -1
  574. package/plugin/runtime/node_modules/node-app-attest/types/verifyAssertion.d.ts +0 -5
  575. package/plugin/runtime/node_modules/node-app-attest/types/verifyAssertion.d.ts.map +0 -1
  576. package/plugin/runtime/node_modules/node-app-attest/types/verifyAttestation.d.ts +0 -8
  577. package/plugin/runtime/node_modules/node-app-attest/types/verifyAttestation.d.ts.map +0 -1
  578. package/plugin/runtime/node_modules/nofilter/LICENSE.md +0 -20
  579. package/plugin/runtime/node_modules/nofilter/README.md +0 -36
  580. package/plugin/runtime/node_modules/nofilter/lib/index.js +0 -1055
  581. package/plugin/runtime/node_modules/nofilter/package.json +0 -60
  582. package/plugin/runtime/node_modules/nofilter/types/index.d.ts +0 -573
  583. package/plugin/runtime/node_modules/p-limit/index.d.ts +0 -38
  584. package/plugin/runtime/node_modules/p-limit/index.js +0 -57
  585. package/plugin/runtime/node_modules/p-limit/license +0 -9
  586. package/plugin/runtime/node_modules/p-limit/package.json +0 -52
  587. package/plugin/runtime/node_modules/p-limit/readme.md +0 -101
  588. package/plugin/runtime/node_modules/p-locate/index.d.ts +0 -64
  589. package/plugin/runtime/node_modules/p-locate/index.js +0 -52
  590. package/plugin/runtime/node_modules/p-locate/license +0 -9
  591. package/plugin/runtime/node_modules/p-locate/package.json +0 -53
  592. package/plugin/runtime/node_modules/p-locate/readme.md +0 -90
  593. package/plugin/runtime/node_modules/p-try/index.d.ts +0 -39
  594. package/plugin/runtime/node_modules/p-try/index.js +0 -9
  595. package/plugin/runtime/node_modules/p-try/license +0 -9
  596. package/plugin/runtime/node_modules/p-try/package.json +0 -42
  597. package/plugin/runtime/node_modules/p-try/readme.md +0 -58
  598. package/plugin/runtime/node_modules/path-exists/index.d.ts +0 -28
  599. package/plugin/runtime/node_modules/path-exists/index.js +0 -23
  600. package/plugin/runtime/node_modules/path-exists/license +0 -9
  601. package/plugin/runtime/node_modules/path-exists/package.json +0 -39
  602. package/plugin/runtime/node_modules/path-exists/readme.md +0 -52
  603. package/plugin/runtime/node_modules/pkijs/LICENSE +0 -30
  604. package/plugin/runtime/node_modules/pkijs/README.md +0 -81
  605. package/plugin/runtime/node_modules/pkijs/build/index.d.ts +0 -9419
  606. package/plugin/runtime/node_modules/pkijs/build/index.es.js +0 -18789
  607. package/plugin/runtime/node_modules/pkijs/build/index.js +0 -19014
  608. package/plugin/runtime/node_modules/pkijs/package.json +0 -98
  609. package/plugin/runtime/node_modules/pngjs/.eslintignore +0 -2
  610. package/plugin/runtime/node_modules/pngjs/.eslintrc.json +0 -19
  611. package/plugin/runtime/node_modules/pngjs/.prettierignore +0 -3
  612. package/plugin/runtime/node_modules/pngjs/LICENSE +0 -20
  613. package/plugin/runtime/node_modules/pngjs/README.md +0 -429
  614. package/plugin/runtime/node_modules/pngjs/browser.js +0 -16096
  615. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/base.css +0 -354
  616. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/bitmapper.js.html +0 -881
  617. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/bitpacker.js.html +0 -554
  618. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/block-navigation.js +0 -77
  619. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/chunkstream.js.html +0 -647
  620. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/constants.js.html +0 -176
  621. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/crc.js.html +0 -200
  622. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/favicon.png +0 -0
  623. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/filter-pack.js.html +0 -593
  624. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html +0 -152
  625. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html +0 -143
  626. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/filter-parse.js.html +0 -611
  627. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html +0 -359
  628. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/index.html +0 -426
  629. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/interlace.js.html +0 -365
  630. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/packer-async.js.html +0 -230
  631. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/packer-sync.js.html +0 -248
  632. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/packer.js.html +0 -467
  633. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html +0 -128
  634. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/parser-async.js.html +0 -575
  635. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/parser-sync.js.html +0 -404
  636. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/parser.js.html +0 -950
  637. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/png-sync.js.html +0 -116
  638. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/png.js.html +0 -662
  639. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/prettify.css +0 -101
  640. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/prettify.js +0 -1007
  641. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  642. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/sorter.js +0 -169
  643. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html +0 -584
  644. package/plugin/runtime/node_modules/pngjs/coverage/lcov-report/sync-reader.js.html +0 -215
  645. package/plugin/runtime/node_modules/pngjs/coverage/lcov.info +0 -2177
  646. package/plugin/runtime/node_modules/pngjs/lib/bitmapper.js +0 -267
  647. package/plugin/runtime/node_modules/pngjs/lib/bitpacker.js +0 -158
  648. package/plugin/runtime/node_modules/pngjs/lib/chunkstream.js +0 -189
  649. package/plugin/runtime/node_modules/pngjs/lib/constants.js +0 -32
  650. package/plugin/runtime/node_modules/pngjs/lib/crc.js +0 -40
  651. package/plugin/runtime/node_modules/pngjs/lib/filter-pack.js +0 -171
  652. package/plugin/runtime/node_modules/pngjs/lib/filter-parse-async.js +0 -24
  653. package/plugin/runtime/node_modules/pngjs/lib/filter-parse-sync.js +0 -21
  654. package/plugin/runtime/node_modules/pngjs/lib/filter-parse.js +0 -177
  655. package/plugin/runtime/node_modules/pngjs/lib/format-normaliser.js +0 -93
  656. package/plugin/runtime/node_modules/pngjs/lib/interlace.js +0 -95
  657. package/plugin/runtime/node_modules/pngjs/lib/packer-async.js +0 -50
  658. package/plugin/runtime/node_modules/pngjs/lib/packer-sync.js +0 -56
  659. package/plugin/runtime/node_modules/pngjs/lib/packer.js +0 -129
  660. package/plugin/runtime/node_modules/pngjs/lib/paeth-predictor.js +0 -16
  661. package/plugin/runtime/node_modules/pngjs/lib/parser-async.js +0 -165
  662. package/plugin/runtime/node_modules/pngjs/lib/parser-sync.js +0 -108
  663. package/plugin/runtime/node_modules/pngjs/lib/parser.js +0 -290
  664. package/plugin/runtime/node_modules/pngjs/lib/png-sync.js +0 -12
  665. package/plugin/runtime/node_modules/pngjs/lib/png.js +0 -194
  666. package/plugin/runtime/node_modules/pngjs/lib/sync-inflate.js +0 -168
  667. package/plugin/runtime/node_modules/pngjs/lib/sync-reader.js +0 -45
  668. package/plugin/runtime/node_modules/pngjs/package.json +0 -73
  669. package/plugin/runtime/node_modules/pvtsutils/LICENSE +0 -21
  670. package/plugin/runtime/node_modules/pvtsutils/README.md +0 -80
  671. package/plugin/runtime/node_modules/pvtsutils/build/index.d.ts +0 -208
  672. package/plugin/runtime/node_modules/pvtsutils/build/index.es.js +0 -393
  673. package/plugin/runtime/node_modules/pvtsutils/build/index.js +0 -399
  674. package/plugin/runtime/node_modules/pvtsutils/package.json +0 -76
  675. package/plugin/runtime/node_modules/pvutils/LICENSE +0 -24
  676. package/plugin/runtime/node_modules/pvutils/README.md +0 -24
  677. package/plugin/runtime/node_modules/pvutils/build/index.d.ts +0 -116
  678. package/plugin/runtime/node_modules/pvutils/build/utils.es.js +0 -340
  679. package/plugin/runtime/node_modules/pvutils/build/utils.js +0 -361
  680. package/plugin/runtime/node_modules/pvutils/package.json +0 -63
  681. package/plugin/runtime/node_modules/qrcode/README.md +0 -770
  682. package/plugin/runtime/node_modules/qrcode/bin/qrcode +0 -159
  683. package/plugin/runtime/node_modules/qrcode/helper/to-sjis-browser.js +0 -2
  684. package/plugin/runtime/node_modules/qrcode/helper/to-sjis.js +0 -105
  685. package/plugin/runtime/node_modules/qrcode/lib/browser.js +0 -76
  686. package/plugin/runtime/node_modules/qrcode/lib/can-promise.js +0 -7
  687. package/plugin/runtime/node_modules/qrcode/lib/core/alignment-pattern.js +0 -83
  688. package/plugin/runtime/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -59
  689. package/plugin/runtime/node_modules/qrcode/lib/core/bit-buffer.js +0 -37
  690. package/plugin/runtime/node_modules/qrcode/lib/core/bit-matrix.js +0 -65
  691. package/plugin/runtime/node_modules/qrcode/lib/core/byte-data.js +0 -30
  692. package/plugin/runtime/node_modules/qrcode/lib/core/error-correction-code.js +0 -135
  693. package/plugin/runtime/node_modules/qrcode/lib/core/error-correction-level.js +0 -50
  694. package/plugin/runtime/node_modules/qrcode/lib/core/finder-pattern.js +0 -22
  695. package/plugin/runtime/node_modules/qrcode/lib/core/format-info.js +0 -29
  696. package/plugin/runtime/node_modules/qrcode/lib/core/galois-field.js +0 -69
  697. package/plugin/runtime/node_modules/qrcode/lib/core/kanji-data.js +0 -54
  698. package/plugin/runtime/node_modules/qrcode/lib/core/mask-pattern.js +0 -234
  699. package/plugin/runtime/node_modules/qrcode/lib/core/mode.js +0 -167
  700. package/plugin/runtime/node_modules/qrcode/lib/core/numeric-data.js +0 -43
  701. package/plugin/runtime/node_modules/qrcode/lib/core/polynomial.js +0 -62
  702. package/plugin/runtime/node_modules/qrcode/lib/core/qrcode.js +0 -495
  703. package/plugin/runtime/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -56
  704. package/plugin/runtime/node_modules/qrcode/lib/core/regex.js +0 -31
  705. package/plugin/runtime/node_modules/qrcode/lib/core/segments.js +0 -330
  706. package/plugin/runtime/node_modules/qrcode/lib/core/utils.js +0 -63
  707. package/plugin/runtime/node_modules/qrcode/lib/core/version-check.js +0 -9
  708. package/plugin/runtime/node_modules/qrcode/lib/core/version.js +0 -163
  709. package/plugin/runtime/node_modules/qrcode/lib/index.js +0 -12
  710. package/plugin/runtime/node_modules/qrcode/lib/renderer/canvas.js +0 -63
  711. package/plugin/runtime/node_modules/qrcode/lib/renderer/png.js +0 -78
  712. package/plugin/runtime/node_modules/qrcode/lib/renderer/svg-tag.js +0 -81
  713. package/plugin/runtime/node_modules/qrcode/lib/renderer/svg.js +0 -19
  714. package/plugin/runtime/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +0 -85
  715. package/plugin/runtime/node_modules/qrcode/lib/renderer/terminal/terminal.js +0 -49
  716. package/plugin/runtime/node_modules/qrcode/lib/renderer/terminal.js +0 -9
  717. package/plugin/runtime/node_modules/qrcode/lib/renderer/utf8.js +0 -71
  718. package/plugin/runtime/node_modules/qrcode/lib/renderer/utils.js +0 -99
  719. package/plugin/runtime/node_modules/qrcode/lib/server.js +0 -138
  720. package/plugin/runtime/node_modules/qrcode/license +0 -10
  721. package/plugin/runtime/node_modules/qrcode/package.json +0 -77
  722. package/plugin/runtime/node_modules/require-directory/.jshintrc +0 -67
  723. package/plugin/runtime/node_modules/require-directory/.travis.yml +0 -3
  724. package/plugin/runtime/node_modules/require-directory/LICENSE +0 -22
  725. package/plugin/runtime/node_modules/require-directory/README.markdown +0 -184
  726. package/plugin/runtime/node_modules/require-directory/index.js +0 -86
  727. package/plugin/runtime/node_modules/require-directory/package.json +0 -40
  728. package/plugin/runtime/node_modules/require-main-filename/CHANGELOG.md +0 -26
  729. package/plugin/runtime/node_modules/require-main-filename/LICENSE.txt +0 -14
  730. package/plugin/runtime/node_modules/require-main-filename/README.md +0 -26
  731. package/plugin/runtime/node_modules/require-main-filename/index.js +0 -18
  732. package/plugin/runtime/node_modules/require-main-filename/package.json +0 -35
  733. package/plugin/runtime/node_modules/set-blocking/CHANGELOG.md +0 -26
  734. package/plugin/runtime/node_modules/set-blocking/LICENSE.txt +0 -14
  735. package/plugin/runtime/node_modules/set-blocking/README.md +0 -31
  736. package/plugin/runtime/node_modules/set-blocking/index.js +0 -7
  737. package/plugin/runtime/node_modules/set-blocking/package.json +0 -42
  738. package/plugin/runtime/node_modules/string-width/index.d.ts +0 -29
  739. package/plugin/runtime/node_modules/string-width/index.js +0 -47
  740. package/plugin/runtime/node_modules/string-width/license +0 -9
  741. package/plugin/runtime/node_modules/string-width/package.json +0 -56
  742. package/plugin/runtime/node_modules/string-width/readme.md +0 -50
  743. package/plugin/runtime/node_modules/strip-ansi/index.d.ts +0 -17
  744. package/plugin/runtime/node_modules/strip-ansi/index.js +0 -4
  745. package/plugin/runtime/node_modules/strip-ansi/license +0 -9
  746. package/plugin/runtime/node_modules/strip-ansi/package.json +0 -54
  747. package/plugin/runtime/node_modules/strip-ansi/readme.md +0 -46
  748. package/plugin/runtime/node_modules/tslib/CopyrightNotice.txt +0 -15
  749. package/plugin/runtime/node_modules/tslib/LICENSE.txt +0 -12
  750. package/plugin/runtime/node_modules/tslib/README.md +0 -164
  751. package/plugin/runtime/node_modules/tslib/SECURITY.md +0 -41
  752. package/plugin/runtime/node_modules/tslib/modules/index.d.ts +0 -38
  753. package/plugin/runtime/node_modules/tslib/modules/index.js +0 -70
  754. package/plugin/runtime/node_modules/tslib/modules/package.json +0 -3
  755. package/plugin/runtime/node_modules/tslib/package.json +0 -47
  756. package/plugin/runtime/node_modules/tslib/tslib.d.ts +0 -460
  757. package/plugin/runtime/node_modules/tslib/tslib.es6.html +0 -1
  758. package/plugin/runtime/node_modules/tslib/tslib.es6.js +0 -402
  759. package/plugin/runtime/node_modules/tslib/tslib.es6.mjs +0 -401
  760. package/plugin/runtime/node_modules/tslib/tslib.html +0 -1
  761. package/plugin/runtime/node_modules/tslib/tslib.js +0 -484
  762. package/plugin/runtime/node_modules/which-module/LICENSE +0 -13
  763. package/plugin/runtime/node_modules/which-module/README.md +0 -58
  764. package/plugin/runtime/node_modules/which-module/index.js +0 -9
  765. package/plugin/runtime/node_modules/which-module/package.json +0 -41
  766. package/plugin/runtime/node_modules/wrap-ansi/index.js +0 -186
  767. package/plugin/runtime/node_modules/wrap-ansi/license +0 -9
  768. package/plugin/runtime/node_modules/wrap-ansi/package.json +0 -61
  769. package/plugin/runtime/node_modules/wrap-ansi/readme.md +0 -97
  770. package/plugin/runtime/node_modules/y18n/CHANGELOG.md +0 -35
  771. package/plugin/runtime/node_modules/y18n/LICENSE +0 -13
  772. package/plugin/runtime/node_modules/y18n/README.md +0 -109
  773. package/plugin/runtime/node_modules/y18n/index.js +0 -188
  774. package/plugin/runtime/node_modules/y18n/package.json +0 -39
  775. package/plugin/runtime/node_modules/yargs/CHANGELOG.md +0 -420
  776. package/plugin/runtime/node_modules/yargs/LICENSE +0 -21
  777. package/plugin/runtime/node_modules/yargs/README.md +0 -140
  778. package/plugin/runtime/node_modules/yargs/build/lib/apply-extends.d.ts +0 -2
  779. package/plugin/runtime/node_modules/yargs/build/lib/apply-extends.js +0 -65
  780. package/plugin/runtime/node_modules/yargs/build/lib/argsert.d.ts +0 -2
  781. package/plugin/runtime/node_modules/yargs/build/lib/argsert.js +0 -65
  782. package/plugin/runtime/node_modules/yargs/build/lib/command.d.ts +0 -64
  783. package/plugin/runtime/node_modules/yargs/build/lib/command.js +0 -416
  784. package/plugin/runtime/node_modules/yargs/build/lib/common-types.d.ts +0 -36
  785. package/plugin/runtime/node_modules/yargs/build/lib/common-types.js +0 -25
  786. package/plugin/runtime/node_modules/yargs/build/lib/completion-templates.d.ts +0 -2
  787. package/plugin/runtime/node_modules/yargs/build/lib/completion-templates.js +0 -50
  788. package/plugin/runtime/node_modules/yargs/build/lib/completion.d.ts +0 -21
  789. package/plugin/runtime/node_modules/yargs/build/lib/completion.js +0 -135
  790. package/plugin/runtime/node_modules/yargs/build/lib/is-promise.d.ts +0 -1
  791. package/plugin/runtime/node_modules/yargs/build/lib/is-promise.js +0 -9
  792. package/plugin/runtime/node_modules/yargs/build/lib/levenshtein.d.ts +0 -1
  793. package/plugin/runtime/node_modules/yargs/build/lib/levenshtein.js +0 -58
  794. package/plugin/runtime/node_modules/yargs/build/lib/middleware.d.ts +0 -10
  795. package/plugin/runtime/node_modules/yargs/build/lib/middleware.js +0 -57
  796. package/plugin/runtime/node_modules/yargs/build/lib/obj-filter.d.ts +0 -1
  797. package/plugin/runtime/node_modules/yargs/build/lib/obj-filter.js +0 -14
  798. package/plugin/runtime/node_modules/yargs/build/lib/parse-command.d.ts +0 -11
  799. package/plugin/runtime/node_modules/yargs/build/lib/parse-command.js +0 -36
  800. package/plugin/runtime/node_modules/yargs/build/lib/process-argv.d.ts +0 -2
  801. package/plugin/runtime/node_modules/yargs/build/lib/process-argv.js +0 -31
  802. package/plugin/runtime/node_modules/yargs/build/lib/usage.d.ts +0 -49
  803. package/plugin/runtime/node_modules/yargs/build/lib/usage.js +0 -540
  804. package/plugin/runtime/node_modules/yargs/build/lib/validation.d.ts +0 -34
  805. package/plugin/runtime/node_modules/yargs/build/lib/validation.js +0 -330
  806. package/plugin/runtime/node_modules/yargs/build/lib/yargs.d.ts +0 -274
  807. package/plugin/runtime/node_modules/yargs/build/lib/yargs.js +0 -1190
  808. package/plugin/runtime/node_modules/yargs/build/lib/yerror.d.ts +0 -4
  809. package/plugin/runtime/node_modules/yargs/build/lib/yerror.js +0 -11
  810. package/plugin/runtime/node_modules/yargs/index.js +0 -40
  811. package/plugin/runtime/node_modules/yargs/locales/be.json +0 -46
  812. package/plugin/runtime/node_modules/yargs/locales/de.json +0 -46
  813. package/plugin/runtime/node_modules/yargs/locales/en.json +0 -51
  814. package/plugin/runtime/node_modules/yargs/locales/es.json +0 -46
  815. package/plugin/runtime/node_modules/yargs/locales/fi.json +0 -49
  816. package/plugin/runtime/node_modules/yargs/locales/fr.json +0 -53
  817. package/plugin/runtime/node_modules/yargs/locales/hi.json +0 -49
  818. package/plugin/runtime/node_modules/yargs/locales/hu.json +0 -46
  819. package/plugin/runtime/node_modules/yargs/locales/id.json +0 -50
  820. package/plugin/runtime/node_modules/yargs/locales/it.json +0 -46
  821. package/plugin/runtime/node_modules/yargs/locales/ja.json +0 -51
  822. package/plugin/runtime/node_modules/yargs/locales/ko.json +0 -49
  823. package/plugin/runtime/node_modules/yargs/locales/nb.json +0 -44
  824. package/plugin/runtime/node_modules/yargs/locales/nl.json +0 -49
  825. package/plugin/runtime/node_modules/yargs/locales/nn.json +0 -44
  826. package/plugin/runtime/node_modules/yargs/locales/pirate.json +0 -13
  827. package/plugin/runtime/node_modules/yargs/locales/pl.json +0 -49
  828. package/plugin/runtime/node_modules/yargs/locales/pt.json +0 -45
  829. package/plugin/runtime/node_modules/yargs/locales/pt_BR.json +0 -48
  830. package/plugin/runtime/node_modules/yargs/locales/ru.json +0 -46
  831. package/plugin/runtime/node_modules/yargs/locales/th.json +0 -46
  832. package/plugin/runtime/node_modules/yargs/locales/tr.json +0 -48
  833. package/plugin/runtime/node_modules/yargs/locales/zh_CN.json +0 -48
  834. package/plugin/runtime/node_modules/yargs/locales/zh_TW.json +0 -47
  835. package/plugin/runtime/node_modules/yargs/package.json +0 -92
  836. package/plugin/runtime/node_modules/yargs/yargs.js +0 -14
  837. package/plugin/runtime/node_modules/yargs-parser/CHANGELOG.md +0 -601
  838. package/plugin/runtime/node_modules/yargs-parser/LICENSE.txt +0 -14
  839. package/plugin/runtime/node_modules/yargs-parser/README.md +0 -449
  840. package/plugin/runtime/node_modules/yargs-parser/index.js +0 -1032
  841. package/plugin/runtime/node_modules/yargs-parser/lib/tokenize-arg-string.js +0 -40
  842. package/plugin/runtime/node_modules/yargs-parser/package.json +0 -46
  843. package/plugin/runtime/package-lock.json +0 -447
  844. package/plugin/runtime/package.json +0 -13
@@ -1,1124 +0,0 @@
1
- """Hermes标准平台适配:消息由GatewayRunner授权/执行,Kit仅接收规范端口。"""
2
-
3
- import asyncio
4
- import hashlib
5
- import json
6
- import logging
7
- import shutil
8
- import time
9
- import uuid
10
- import weakref
11
- from datetime import datetime, timezone
12
- from pathlib import Path
13
- from gateway.config import Platform
14
- from gateway.platforms.base import BasePlatformAdapter, SendResult
15
- from gateway.platforms.event import MessageEvent, MessageType
16
- from gateway.platforms._shared import get_scoped_secret
17
- from hermes_constants import get_hermes_home
18
- from plugins.plugin_storage import plugin_data_dir
19
- from .state import Bindings, private_json
20
- from .host import KitHost
21
- from .runtime_port import create_runtime, PublicRuntimeUnavailable, InputAdmissionRefused, InputAdmissionUnconfirmed
22
- from .history import HistoryReader
23
- from .sessions import SessionDirectory, SessionCatalog
24
- from .canonical_control import NativeControlError
25
- from .stream_bridge import StreamBridge
26
- from .settings import SettingsPort
27
- from .agent_defaults import AgentDefaultsPort
28
- from .settings_control import SettingsControl
29
- from .initial_settings import InitialSettings
30
- from .diagnostics import api_failure
31
- from .recovery import RecoveryCoordinator
32
- from . import media_input
33
- from . import media_output
34
- from . import inline_media
35
- from . import compat_v0225
36
- from .message_speech import MessageSpeechPort
37
- from .compat_v0225 import MediaDeliveryBoundary
38
- from .delivery_context import owned_delivery, current_delivery, check_delivery
39
- from .controls import ControlCoordinator
40
-
41
- logger = logging.getLogger(__name__)
42
-
43
- # 已提示过"allowlist 为空"的 profile home。构造期告警每 profile 一次;恢复后再次丢失要能重新提示。
44
- _MISSING_ALLOWLIST_WARNED: set[str] = set()
45
-
46
-
47
- def _allowlist_present(profile_key):
48
- # 允许列表恢复后清掉提示记录:再次丢失时要能重新告警。
49
- _MISSING_ALLOWLIST_WARNED.discard(profile_key)
50
-
51
-
52
- def cancel_event(trace, event, **fields):
53
- # 停止只记录原身份及阶段,不把消息正文、票据或异常原文混入诊断。
54
- try:
55
- logger.info("%s", json.dumps({
56
- **{key: value for key, value in trace.items() if key != "began"},
57
- "timestamp": datetime.now(timezone.utc).isoformat(),
58
- "component": "hermes-platform",
59
- "event": event,
60
- "durationMs": (time.monotonic_ns() - trace["began"]) / 1_000_000,
61
- **fields,
62
- }))
63
- except Exception:
64
- pass # 日志接收端失败不能阻断停止或改变权威结果。
65
-
66
-
67
- class FridayNextAdapter(MediaDeliveryBoundary, BasePlatformAdapter):
68
- instances = weakref.WeakSet()
69
-
70
- def __init__(self, config):
71
- super().__init__(config, Platform("fridaynext"))
72
- self.instances.add(self)
73
- self.plugin_enabled = True
74
- self.owner_loop = None
75
- self.unload_task = None
76
- self.media_recovery_task = None
77
- self.profile = Path(get_hermes_home()).resolve()
78
- extra = config.extra
79
- roots = extra.get("media_output_roots", [])
80
- limit = extra.get("media_output_max_bytes", 128 * 1024 * 1024)
81
- if type(roots) is not list or any(not isinstance(root, str) or not Path(root).expanduser().is_absolute() for root in roots) or type(limit) is not int or limit < 1:
82
- raise ValueError("MEDIA_OUTPUT_POLICY_INVALID")
83
- self.media_output_roots = tuple(Path(root).expanduser() for root in roots)
84
- self.media_output_max_bytes = limit
85
- self.configured_data = extra.get("data_dir")
86
- self.data = (
87
- Path(self.configured_data).expanduser().resolve()
88
- if self.configured_data
89
- else None
90
- )
91
- self.node = (
92
- extra.get("node_bin")
93
- or get_scoped_secret("FRIDAYNEXT_NODE_BIN", "")
94
- or shutil.which("node")
95
- or ""
96
- )
97
- root = Path(__file__).resolve().parents[1]
98
- runtime = (
99
- root / "runtime"
100
- if (root / "runtime/dist/plugin-worker.js").is_file()
101
- else root
102
- )
103
- self.entry = (
104
- Path(extra.get("runtime_entry") or runtime / "dist/plugin-worker.js")
105
- .expanduser()
106
- .resolve()
107
- )
108
- self.host = None
109
- self.runtime = None
110
- self.bindings = None
111
- self.service_id = None
112
- self.starting = None
113
- self.stopping = None
114
- self.session_directory = None
115
- self.streams = None
116
- self._carry_allowlist(extra)
117
-
118
- # 后台重连会重建适配器:此时若已在别的 secret scope 里,`platform_gate_env` 的
119
- # scoped miss 不再回落到 os.environ,allowlist 读到空值 → 所有入站变 Unauthorized
120
- # (FN-169)。插件平台本来就把允许列表放在 extra.allowed_users 里由授权层读取,
121
- # 因此构造时把本 profile 的环境声明搬进 extra;按 profile home 缓存,跨 profile 不共享。
122
- _allowlist_by_profile = {}
123
-
124
- def _carry_allowlist(self, extra):
125
- if not isinstance(extra, dict):
126
- return
127
- key = str(self.profile)
128
- if extra.get("allowed_users"):
129
- FridayNextAdapter._allowlist_by_profile[key] = extra["allowed_users"]
130
- _allowlist_present(key)
131
- return
132
- declared = (get_scoped_secret("FRIDAYNEXT_ALLOWED_USERS", "") or "").strip()
133
- if not declared:
134
- declared = FridayNextAdapter._allowlist_by_profile.get(key, "")
135
- else:
136
- FridayNextAdapter._allowlist_by_profile[key] = declared
137
- if declared:
138
- extra["allowed_users"] = declared
139
- _allowlist_present(key)
140
- return
141
- # 宿主默认拒绝所有未在允许列表里的发送者(gateway/run_inbound.py:"Unauthorized user")。
142
- # 允许列表为空时全部入站都会被丢弃、客户端只表现为"发不出消息"(FN-171),所以构造期
143
- # 就给出一次明确原因;重连会反复重建适配器,同一 profile 只提示一次。告警不含列表值。
144
- if key not in _MISSING_ALLOWLIST_WARNED:
145
- _MISSING_ALLOWLIST_WARNED.add(key)
146
- logger.warning(
147
- "FridayNext allowlist 为空:未配置 FRIDAYNEXT_ALLOWED_USERS,宿主将拒绝所有入站"
148
- "(表现为客户端发不出消息)。请写入 ~/.hermes/.env 后重启网关。profile=%s",
149
- key,
150
- )
151
-
152
- def _streams(self):
153
- if not callable(getattr(getattr(self, "runtime", None), "replay", None)):
154
- return None
155
- if getattr(self, "streams", None) is None:
156
- self.streams = StreamBridge(self)
157
- return self.streams
158
-
159
- def _recovery(self):
160
- if getattr(self, "recovery", None) is None:
161
- self.recovery = RecoveryCoordinator(self)
162
- return self.recovery
163
-
164
- def _controls(self):
165
- if getattr(self, "controls", None) is None:
166
- self.controls = ControlCoordinator(self)
167
- return self.controls
168
-
169
- async def _sync_stream(self, record):
170
- streams = self._streams()
171
- if streams is not None:
172
- await streams.sync(record)
173
-
174
- def _catalog(self):
175
- if getattr(self, "session_directory", None) is None:
176
- self.session_directory = SessionDirectory(self.bindings.root, self.profile)
177
- return SessionCatalog(
178
- self.runtime, self.profile, self.bindings, self.session_directory
179
- )
180
-
181
- def _settings(self):
182
- if (
183
- getattr(self, "settings_port", None) is None
184
- or self.settings_port.control.client is not self.runtime.client
185
- ):
186
- self.settings_port = SettingsPort(self)
187
- return self.settings_port
188
-
189
- def _input_media_constraint(self):
190
- """图片输入的公开能力约束:MIME、张数与原 owner profile 的实际字节上限。
191
-
192
- 公开描述面只有这一处声明;读不到限制(运行未就绪、profile 未服务)时返回 None,
193
- 由客户端按能力缺失处理,不声明猜测值。maxBytes 是原 profile 的整批上限,
194
- 客户端在单文件上传时只会更宽松,实际准入仍由 Kit/Python 按同一限制执行。
195
- """
196
- policy = getattr(self.runtime, "input_media_policy", None)
197
- if not callable(policy):
198
- return None
199
- try:
200
- values = policy()
201
- except Exception:
202
- return None
203
- if not isinstance(values, dict):
204
- return None
205
- max_bytes, max_count = values.get("maxBytes"), values.get("maxCount")
206
- if type(max_bytes) is not int or max_bytes <= 0:
207
- return None
208
- if type(max_count) is not int or not 0 < max_count <= 100:
209
- return None
210
- return {
211
- "scope": "service",
212
- "mimeTypes": sorted(media_input.MIMES),
213
- "maxCount": max_count,
214
- "maxBytes": max_bytes,
215
- "permission": "allowed",
216
- }
217
-
218
- async def connect(self, *, is_reconnect=False):
219
- if not self.plugin_enabled:
220
- return False
221
- self.owner_loop = asyncio.get_running_loop()
222
- if self.starting:
223
- return await asyncio.shield(self.starting)
224
- if self.is_connected:
225
- return True
226
-
227
- async def open_platform():
228
- try:
229
- self.runtime = create_runtime(self, self.profile)
230
- except PublicRuntimeUnavailable:
231
- self._set_fatal_error(
232
- "fridaynext_runtime_contract_unavailable",
233
- "公开运行端口缺失且当前Hermes版本未通过兼容核对,请参阅FN-99",
234
- retryable=False,
235
- )
236
- return False
237
- if getattr(self.runtime, "mode", "public") != "public":
238
- logger.warning(
239
- "FridayNext使用已固定Hermes版本的运行兼容层;公开API缺口跟踪FN-99"
240
- )
241
- if not self.entry.is_file() or not Path(self.node).is_file():
242
- self._set_fatal_error(
243
- "fridaynext_runtime_missing",
244
- "FridayNext Node/Kit runtime is not installed; prepare the build:plugin bundle",
245
- retryable=False,
246
- )
247
- return False
248
- if Path(get_hermes_home()).resolve() != self.profile:
249
- raise RuntimeError("PROFILE_CONTEXT_CHANGED")
250
- if self.data is None:
251
- self.data = (plugin_data_dir("fridaynext") / "service").resolve()
252
- if not self._acquire_platform_lock(
253
- "fridaynext", str(self.data), "FridayNext data root"
254
- ):
255
- return False
256
- try:
257
- self.data.mkdir(parents=True, exist_ok=True, mode=0o700)
258
- self.bindings = Bindings(self.data, self.profile)
259
- public = self.data / "public-access.json"
260
- if not public.exists():
261
- private_json(
262
- public,
263
- {
264
- "version": 1,
265
- "enabled": bool(
266
- self.config.extra.get("public_access", True)
267
- ),
268
- },
269
- )
270
- self.host = KitHost(
271
- self, self.data, self.profile, self.node, self.entry
272
- )
273
- ready = await self.host.start()
274
- self._wire_plugin_handlers(None)
275
- self._mark_connected(listener_base=ready["origin"])
276
- self.media_recovery_task = asyncio.create_task(media_output.restore(self))
277
- return True
278
- except Exception as error:
279
- logger.warning(
280
- "FridayNext连接失败 type=%s errno=%s",
281
- type(error).__name__,
282
- getattr(error, "errno", None),
283
- )
284
- await self._stop_host()
285
- self._set_fatal_error(
286
- "fridaynext_connect_failed",
287
- "FridayNext Kit worker failed; inspect private runtime diagnostics",
288
- retryable=True,
289
- )
290
- return False
291
-
292
- opening = self.starting = asyncio.create_task(open_platform())
293
- try:
294
- return await asyncio.shield(opening)
295
- except asyncio.CancelledError:
296
- opening.cancel()
297
- await asyncio.gather(opening, return_exceptions=True)
298
- await self._stop_host()
299
- raise
300
- finally:
301
- if self.starting is opening:
302
- self.starting = None
303
-
304
- @classmethod
305
- def unload(cls):
306
- # SDK卸载回调可运行在发现线程;只在原事件循环清理本代worker。
307
- for adapter in tuple(cls.instances):
308
- adapter.plugin_enabled = False
309
- loop = adapter.owner_loop
310
- if loop is not None and not loop.is_closed():
311
-
312
- def close_owned(instance=adapter):
313
- instance.unload_task = asyncio.create_task(instance.disconnect())
314
-
315
- loop.call_soon_threadsafe(close_owned)
316
-
317
- @classmethod
318
- def record_reasoning_delta(cls, **event):
319
- # 官方observer已离开token路径,并保留原Profile及输入上下文;不创建逐token异步任务。
320
- if event.get("kind") != "reasoning":
321
- return
322
- profile = Path(get_hermes_home()).resolve()
323
- for adapter in tuple(cls.instances):
324
- if adapter.profile != profile or not adapter.plugin_enabled or not adapter.runtime:
325
- continue
326
- locator = getattr(adapter.runtime, "locator", None)
327
- if locator is not None:
328
- locator.publish_reasoning(event)
329
-
330
- @classmethod
331
- def record_api_error(cls, **event):
332
- native = event.get("session_id")
333
- if not isinstance(native, str) or not native:
334
- return
335
- profile = Path(get_hermes_home()).resolve()
336
- safe = api_failure(event)
337
- safe["observedAt"] = time.time() * 1000
338
- for adapter in tuple(cls.instances):
339
- loop = adapter.owner_loop
340
- if (
341
- adapter.profile != profile
342
- or not adapter.plugin_enabled
343
- or loop is None
344
- or loop.is_closed()
345
- ):
346
- continue
347
- identity = adapter.runtime.client.identity if adapter.runtime else None
348
- if not identity:
349
- continue
350
- instance = identity["instance_id"]
351
- service = adapter.service_id
352
-
353
- async def capture(instance=instance, service=service, adapter=adapter):
354
- for _ in range(20):
355
- current = (
356
- adapter.runtime.client.identity if adapter.runtime else None
357
- )
358
- if (
359
- not adapter.plugin_enabled
360
- or adapter.service_id != service
361
- or not current
362
- or current.get("instance_id") != instance
363
- ):
364
- return
365
- if any(
366
- row.get("native_id") == native
367
- and row.get("service_id") == service
368
- for row in adapter.bindings.all()
369
- ):
370
- previous = getattr(adapter, "last_api_failure", {})
371
- if previous.get("observedAt", 0) <= safe["observedAt"]:
372
- adapter.last_api_failure = {**safe, "instanceId": instance}
373
- return
374
- await asyncio.sleep(0.05)
375
-
376
- loop.call_soon_threadsafe(
377
- lambda capture=capture: asyncio.create_task(capture())
378
- )
379
-
380
- async def disconnect(self):
381
- if self.stopping:
382
- return await asyncio.shield(self.stopping)
383
-
384
- async def close_platform():
385
- if self.starting:
386
- self.starting.cancel()
387
- await asyncio.gather(self.starting, return_exceptions=True)
388
- await self._stop_host()
389
- self._mark_disconnected()
390
-
391
- self.stopping = asyncio.create_task(close_platform())
392
- try:
393
- await asyncio.shield(self.stopping)
394
- finally:
395
- self.stopping = None
396
-
397
- async def _stop_host(self):
398
- media_task = getattr(self, "media_recovery_task", None)
399
- self.media_recovery_task = None
400
- if media_task is not None and media_task is not asyncio.current_task():
401
- media_task.cancel()
402
- await asyncio.gather(media_task, return_exceptions=True)
403
- if getattr(self, "streams", None) is not None:
404
- await self.streams.close()
405
- self.streams = None
406
- host = self.host
407
- self.host = None
408
- if host:
409
- await host.stop()
410
- if self.runtime is not None:
411
- await self.runtime.close()
412
- self._release_platform_lock()
413
-
414
- def worker_event(self, event):
415
- logger.info("FridayNext Kit event: %s", event)
416
-
417
- async def worker_failed(self, code):
418
- self._set_fatal_error(
419
- "fridaynext_runtime_exit", "FridayNext Kit worker exited", retryable=True
420
- )
421
- await self._notify_fatal_error()
422
-
423
- async def get_chat_info(self, chat_id):
424
- return {"name": "FridayNext", "type": "dm"}
425
-
426
- def delivery_context(self, event, *, media_sources=None):
427
- return owned_delivery(self, event, media_sources=media_sources)
428
-
429
- def _source(self, record):
430
- source = self.build_source(
431
- record["chat_id"],
432
- chat_type="dm",
433
- user_id="owner",
434
- message_id=record["input_id"],
435
- )
436
- if self.runtime.validate_source(source) is not True:
437
- raise RuntimeError("CROSS_PROFILE_ROUTE_UNSUPPORTED")
438
- return source
439
-
440
- async def _receipt(self, record):
441
- lease = self._recovery().lease()
442
- runtime = lease[0]
443
- if record.get("admission_id"):
444
- row = await runtime.receipt(
445
- conversation_id=record["native_id"],
446
- admission_id=record["admission_id"],
447
- input_id=record["input_id"],
448
- )
449
- elif record.get("legacy"):
450
- return None
451
- elif record.get("shared"):
452
- row = await runtime.lookup_shared_input(record)
453
- else:
454
- row = await runtime.lookup_input(
455
- chat_id=record["chat_id"], input_id=record["input_id"]
456
- )
457
- self._recovery().check(lease)
458
- if row is None:
459
- return None
460
- if (
461
- row.get("profile_home") != str(self.profile)
462
- or row.get("platform") != "fridaynext"
463
- or row.get("input_id") != record["input_id"]
464
- or (record.get("chat_id") and record["chat_id"] != row.get("chat_id"))
465
- or (
466
- record.get("native_id")
467
- and record["native_id"] != row.get("conversation_id")
468
- )
469
- or (
470
- record.get("admission_id")
471
- and record["admission_id"] != row.get("admission_id")
472
- )
473
- ):
474
- raise RuntimeError("RECEIPT_SCOPE_MISMATCH")
475
- self.bindings.patch(
476
- record,
477
- {"native_id": row["conversation_id"], "admission_id": row["admission_id"]},
478
- )
479
- self._recovery().observe(record, row)
480
- return row
481
-
482
- async def _result(self, record):
483
- result = await self.runtime.result(
484
- conversation_id=record["native_id"],
485
- admission_id=record["admission_id"],
486
- input_id=record["input_id"],
487
- )
488
- if result:
489
- changed = {
490
- key: result[key]
491
- for key in ("history_rows", "history_uids", "answer_uid", "user_rows")
492
- if key in result and result[key] != record.get(key)
493
- }
494
- if changed:
495
- self.bindings.patch(record, changed)
496
- return result
497
-
498
- async def _best_effort_presentation(self, record):
499
- """展示/流补齐是尽力而为;权威admission终态不能因恢复失败而丢失。"""
500
- try:
501
- await self._sync_stream(record)
502
- except Exception:
503
- logger.warning("presentation.sync.unavailable")
504
- try:
505
- await self._recover_presentation(record)
506
- except Exception:
507
- # 展示失败已记录;失败运行的权威终态仍须结算,成功运行继续等待正文。
508
- self.bindings.patch(record, {"presentation_failed": True})
509
- logger.warning("presentation.delivery.unavailable")
510
-
511
- # 网关在"已受理、尚未准入"之间重启会留下无 admission 的孤儿 run:Kit 侧一直 running,
512
- # 停止只能拿到 unknown(FN-167)。宿主自己才是"这个会话还在不在跑"的权威,所以用
513
- # session.resume 的 running/status 证明没有在跑,再给 Kit 一个可结算的终态。
514
- _NEVER_ADMITTED_GRACE_SECONDS = 60
515
-
516
- async def _never_admitted_settlement(self, record, *, explicit_cancel=False):
517
- admission = record.get("input_admission")
518
- if record.get("admission_id") or (admission or {}).get("state") == "failed":
519
- return None
520
- if not (record.get("input_dispatch_started") or record.get("dispatched")):
521
- return None
522
- if not explicit_cancel:
523
- created = record.get("created_at")
524
- # 本次部署前写入的记录没有 createdAt:它们必然早于宽限期,按可结算处理。
525
- if type(created) in (int, float) and time.time() - created < self._NEVER_ADMITTED_GRACE_SECONDS:
526
- return None
527
- native_id = record.get("native_id") or self.bindings.session_id(record["session_key"])
528
- if native_id is None:
529
- # 原生会话从未创建:没有任何回合在跑。
530
- return "HOST_INPUT_NEVER_ADMITTED"
531
- probe = getattr(self.runtime, "session_liveness", None)
532
- if not callable(probe):
533
- return None
534
- try:
535
- liveness = await probe(conversation_id=native_id)
536
- except NativeControlError as error:
537
- if error.code in ("not_found", "SESSION_NOT_FOUND"):
538
- return "HOST_SESSION_ABSENT"
539
- return None
540
- except Exception:
541
- return None
542
- if not isinstance(liveness, dict):
543
- return None
544
- if liveness.get("running") is True or liveness.get("inflight"):
545
- return None
546
- if liveness.get("pending"):
547
- return None
548
- return "HOST_SESSION_IDLE_UNADMITTED"
549
-
550
- async def _inspection(self, record, *, explicit_cancel=False):
551
- admission = record.get("input_admission")
552
- if admission is not None and admission["state"] == "failed":
553
- return {"state": admission["state"], "reason": admission["reason"]}
554
- row = await self._receipt(record)
555
- if row is None:
556
- # 已证明过的孤儿 run 直接结算,不再每次重新探测宿主。
557
- settled = record.get("never_admitted_settled") or await self._never_admitted_settlement(
558
- record, explicit_cancel=explicit_cancel)
559
- if settled:
560
- self.bindings.patch(record, {"never_admitted_settled": settled})
561
- return {"state": "cancelled", "reason": settled}
562
- return {"state": "unknown", "reason": admission["reason"] if admission else "HOST_ADMISSION_UNCONFIRMED"}
563
- # 控制收款必须先行;该失败不能被吞掉或当成已ACK。
564
- await self._recovery().before_inspection(record, row)
565
- try:
566
- await self._controls().sync(record)
567
- except Exception:
568
- logger.warning("controls.sync.unavailable")
569
- if row["status"] in ("queued", "started"):
570
- return {"state": "running"}
571
- if row["status"] != "terminal":
572
- return {"state": "unknown", "reason": "HOST_EXECUTION_UNKNOWN"}
573
- try:
574
- result = await self._result(record)
575
- except Exception:
576
- result = None
577
- if (
578
- result is None
579
- and row.get("outcome") == "completed"
580
- and not record.get("delivered_answer")
581
- ):
582
- return {"state": "unknown", "reason": "HOST_RESULT_UNAVAILABLE"}
583
- if result and not record.get("delivered_answer"):
584
- body = result.get("text") or ""
585
- # 只有成功/未声明outcome需要等待正文送达;已failed/rejected/cancelled的
586
- # 权威终态不能因展示失败永远停在running。
587
- if (body and not record.get("legacy") and not record.get("presentation_failed")
588
- and row.get("outcome") in (None, "completed")):
589
- return {"state": "unknown", "reason": "HOST_PRESENTATION_PENDING"}
590
- if record.get("legacy"):
591
- record["answer"] = body
592
- state = {
593
- "completed": "completed",
594
- "failed": "failed",
595
- "rejected": "failed",
596
- "interrupted": "cancelled",
597
- "cancelled": "cancelled",
598
- }.get(row.get("outcome"), "unknown")
599
- return {"state": state}
600
-
601
- async def _recover_presentation(self, record):
602
- if record.get("legacy") or record.get("delivered_answer"):
603
- return
604
- row = await self._receipt(record)
605
- if row is None or row["status"] != "terminal":
606
- return
607
- try:
608
- await self._sync_stream(record)
609
- except Exception:
610
- logger.warning("presentation.sync.unavailable")
611
- result = await self._result(record)
612
- body = result.get("text") if result else None
613
- if not body:
614
- return
615
- source_text = body
616
- if record.get("shared"):
617
- body = await media_output.selected_response(self, record, source_text)
618
- else:
619
- extracted = await self.extract_owned_response(record, source_text)
620
- if extracted is not None and (extracted.images or extracted.media_files or extracted.local_files):
621
- body = extracted.text_content
622
- # send失败/插件停用期间,按原admission的持久结果补送,不重新执行。
623
- try:
624
- receipt = await self.host.publish(
625
- {
626
- "serviceInstanceId": self.service_id,
627
- "runId": record["run_id"],
628
- "updates": [
629
- {
630
- "kind": "text",
631
- "id": "answer:" + record["run_id"],
632
- "channel": "answer",
633
- "operation": "replace",
634
- "text": body,
635
- "data": inline_media.presentation_data(self, record, body, source_text),
636
- }
637
- ],
638
- }
639
- )
640
- if receipt.get("durable") is not True:
641
- raise RuntimeError("KIT_DELIVERY_UNCONFIRMED")
642
- except Exception:
643
- # 展示失败不能把已结算的terminal运行变回unknown;正文可由结果/历史恢复。
644
- self.bindings.patch(record, {"presentation_failed": True})
645
- raise
646
- self.bindings.patch(record, {"answer": body, "answer_source_text": source_text,
647
- "delivered_answer": True, "presentation_failed": False})
648
- if record.get("media_observed_v1"):
649
- await media_output.media_observations.reconcile(self, record)
650
-
651
- async def host_request(self, method, params):
652
- if method in ("speech.config", "speech.speak"):
653
- if params.get("serviceInstanceId") != self.service_id:
654
- raise NativeControlError("SERVICE_MISMATCH")
655
- if getattr(self, "message_speech_port", None) is None:
656
- self.message_speech_port = MessageSpeechPort(self)
657
- if method == "speech.config":
658
- return await self.message_speech_port.config()
659
- return await self.message_speech_port.speak(params.get("text"))
660
- if method == "media.check":
661
- if self.host is None:
662
- raise NativeControlError("MEDIA_CALL_RETIRED")
663
- return await self.host.check_media_scope(params)
664
- if method in ("defaults.read", "defaults.mutate", "defaults.inspect"):
665
- if params.get("serviceInstanceId") != self.service_id:
666
- raise NativeControlError("SERVICE_MISMATCH")
667
- if not hasattr(self, "agent_defaults_port"):
668
- self.agent_defaults_port = AgentDefaultsPort(self)
669
- port = self.agent_defaults_port
670
- if method == "defaults.read":
671
- return {"snapshot": await port.read(params.get("agentId"))}
672
- if method == "defaults.mutate":
673
- return {"result": await port.mutate(params.get("agentId"), params["change"])}
674
- return {"result": await port.inspect(params.get("agentId"), params["commandId"])}
675
- if method in (
676
- "settings.read",
677
- "settings.mutate",
678
- "settings.inspect",
679
- "models",
680
- "catalog",
681
- "diagnostics",
682
- ):
683
- if params.get("serviceInstanceId") != self.service_id:
684
- raise RuntimeError("SERVICE_MISMATCH")
685
- port = self._settings()
686
- if method == "models":
687
- return await port.models(params.get("agentId"))
688
- if method == "catalog":
689
- return await port.catalog()
690
- if method == "diagnostics":
691
- return {"diagnostics": await port.diagnostics()}
692
- key = params["sessionKey"]
693
- if method == "settings.read":
694
- return {"snapshot": await port.read(key)}
695
- if method == "settings.mutate":
696
- return {"result": await port.mutate(key, params["change"])}
697
- return {"result": await port.inspect(key, params["commandId"])}
698
- if method in ("control.lookup", "control.respond"):
699
- if params.get("serviceInstanceId") != self.service_id:
700
- raise NativeControlError("SERVICE_MISMATCH")
701
- if method == "control.lookup":
702
- identity = params.get("requestId")
703
- owner = self._recovery() if isinstance(identity, str) and identity.startswith("recovery:") else self._controls()
704
- return {"control": await owner.lookup(identity)}
705
- identity = params.get("requestId")
706
- owner = self._recovery() if isinstance(identity, str) and identity.startswith("recovery:") else self._controls()
707
- return {"response": await owner.respond(identity, params.get("response", {}))}
708
- if method == "describe":
709
- self.service_id = params.get("serviceInstanceId")
710
- # 能力清单由构建时从精确Kit导出,Python不复制公共协议实现。
711
- contract = json.loads((self.entry.parent / "kit-contract.json").read_text())
712
- defaults_writable = False
713
- if contract.get("agentDefaults"):
714
- try:
715
- defaults_writable = (await asyncio.to_thread(compat_v0225.profile_default_config, self.profile)).get("writable") is True
716
- except Exception:
717
- pass
718
- capabilities = contract["runtimeCapabilities"] + [
719
- "sessions.title", "sessions.pin", "history.message-detail",
720
- "sessions.settings", "sessions.settings.versioned-v1",
721
- *(["agents.defaults.versioned-v1"] if defaults_writable else []),
722
- "runs.resolve-unknown-v1", "approval", "question", "tts",
723
- ]
724
- details = {
725
- "runs.resolve-unknown-v1": {"scope": "service", "options": ["acknowledge-unknown"], "permission": "allowed"},
726
- }
727
- # 只有读到 owner profile 的真实限制才声明 attachments;读不到时不声明,
728
- # 客户端按能力缺失处理,不用猜测的上限放行。
729
- media = self._input_media_constraint()
730
- if media is not None:
731
- capabilities.append("attachments")
732
- details["attachments"] = media
733
- return {
734
- "runtimeInterface": {
735
- "mode": getattr(self.runtime, "mode", "public"),
736
- "publicAPI": False,
737
- "publicMethods": sorted(
738
- set(self.runtime.public_methods)
739
- | set(SettingsControl.public_methods)
740
- ),
741
- "observability": {
742
- "subagents": "tool-summary-only",
743
- "usage": "optional-authoritative",
744
- "reasoning": "public-stream-observer+original-receipt",
745
- },
746
- "compatibility": [
747
- "input-binding", "source-scope", "authorized-fifo-admission",
748
- "original-control-waiter-read-v0.22.5",
749
- "initial-platform-registration", "platform-authorization",
750
- "media-source-reference-v0.22.5",
751
- "model-display-names-v0.22.5",
752
- "profile-defaults-v0.22.5",
753
- "reasoning-identity-v0.22.5",
754
- "message-speech-v0.22.5",
755
- ],
756
- },
757
- "backend": {
758
- "id": "hermes",
759
- "name": "Hermes Agent",
760
- "version": self.runtime.hermes_version,
761
- "adapter": {"id": "fridaynext-platform", "version": "0.2.0-beta.1"},
762
- "eventFormats": ["canonical-v1"],
763
- "capabilities": capabilities,
764
- "capabilityDetails": {"version": 1, "capabilities": details},
765
- },
766
- }
767
- if method == "validate":
768
- if params.get("serviceInstanceId") != self.service_id:
769
- raise RuntimeError("SERVICE_MISMATCH")
770
- if not self.plugin_enabled:
771
- return {"allowed": False, "reason": "PLUGIN_DISABLED"}
772
- if params.get("agentId", "hermes") != "hermes":
773
- return {"allowed": False, "reason": "AGENT_NOT_FOUND", "status": 404}
774
- if params.get("sessionOptions"):
775
- return await InitialSettings(self).validate(
776
- params["sessionKey"],
777
- params.get("clientRequestId"),
778
- params["sessionOptions"],
779
- )
780
- if self.bindings.has_legacy_session(params["sessionKey"]):
781
- return {"allowed": False, "reason": "LEGACY_SESSION_REQUIRES_MIGRATION"}
782
- try:
783
- await self.runtime.ensure_ready()
784
- directory = self._catalog().directory
785
- shared = False
786
- if directory.get(params["sessionKey"]):
787
- selected = await self._catalog().resolve(params["sessionKey"])
788
- shared = selected.get("shared") is True
789
- if selected["origin"] != "platform" and not selected.get("shared"):
790
- return {
791
- "allowed": False,
792
- "reason": "REMOTE_SESSION_READ_ONLY",
793
- "status": 403,
794
- }
795
- elif params["sessionKey"].startswith("hermes-"):
796
- return {
797
- "allowed": False,
798
- "reason": "SESSION_NOT_FOUND",
799
- "status": 404,
800
- }
801
- except NativeControlError as error:
802
- status = {"permission_denied": 403, "not_found": 404}.get(
803
- error.code, 503
804
- )
805
- return {"allowed": False, "reason": error.code, "status": status}
806
- except Exception:
807
- return {"allowed": False, "reason": "HOST_NOT_READY", "status": 503}
808
- return {"allowed": True, **({"mediaPolicy": self.runtime.input_media_policy(shared=shared)} if params.get("attachmentCount") else {})}
809
- if method == "agents":
810
- return {
811
- "agents": [{"id": "hermes", "name": "Hermes Agent", "isDefault": True}]
812
- }
813
- if method in ("session.title", "session.pin"):
814
- selected = await self._catalog().resolve(params["sessionKey"])
815
- if selected.get("legacy"):
816
- raise NativeControlError("permission_denied")
817
- field = "title" if method == "session.title" else "pinned"
818
- payload = {field: params[field]}
819
- result = await self.runtime.client.update_metadata(
820
- selected["native_id"], payload
821
- )
822
- # 宿主权威receipt是成功事实;失败/冲突不会更新本地假副本。
823
- committed = result
824
- if committed.get(field) != params[field]:
825
- raise RuntimeError("METADATA_RESULT_UNCONFIRMED")
826
- return payload
827
- if method == "sessions":
828
- return {"sessions": await self._catalog().list()}
829
- if method in ("snapshot", "history", "history.message"):
830
- key = params.get("sessionKey")
831
- if params.get("agentId", "hermes") != "hermes":
832
- raise RuntimeError("AGENT_NOT_FOUND")
833
- resolved = await self._catalog().resolve(key)
834
- native_id = resolved["native_id"]
835
- reader = HistoryReader(self.runtime, self.profile, self.bindings)
836
- if method == "history.message":
837
- return {
838
- "message": await reader.message(key, native_id, params["messageId"])
839
- }
840
- page = await reader.page(
841
- key, native_id, params.get("limit", 200), params.get("offset", 0)
842
- )
843
- if method == "history":
844
- return {"page": page}
845
- controls = []
846
- if self._controls().records(key, native_id):
847
- lease = self._recovery().lease()
848
- control_snapshot = await lease[0].snapshot(conversation_id=native_id)
849
- self._recovery().check(lease)
850
- controls = await self._recovery().snapshot(key, native_id, source_snapshot=control_snapshot)
851
- controls += await self._controls().snapshot(key, native_id, source_snapshot=control_snapshot)
852
- return {
853
- "snapshot": {
854
- "session": {
855
- "sessionKey": key,
856
- "agentId": "hermes",
857
- "kind": "conversation",
858
- "conversationId": native_id,
859
- },
860
- "transcript": page["messages"],
861
- "pagination": page["pagination"],
862
- "controls": controls,
863
- }
864
- }
865
- if method not in ("execute", "inspect", "cancel"):
866
- raise RuntimeError("METHOD_UNSUPPORTED")
867
- if method == "execute" and not self.plugin_enabled:
868
- raise RuntimeError("PLUGIN_DISABLED")
869
- if params.get("serviceInstanceId") != self.service_id:
870
- raise RuntimeError("SERVICE_MISMATCH")
871
- run = params["run"]
872
- run_id = run["runId"]
873
- record = self.bindings.read(run_id) or self.bindings.legacy(run_id)
874
- if record and record.get("service_id") != self.service_id:
875
- if not record.get("service_id") and method == "inspect":
876
- return {"inspection": {"state": "unknown", "reason": "HOST_SERVICE_UNCONFIRMED"}}
877
- raise RuntimeError("SERVICE_MISMATCH")
878
- if record is None and method == "execute":
879
- key = run["sessionKey"]
880
- if self.bindings.has_legacy_session(key):
881
- raise RuntimeError("LEGACY_SESSION_REQUIRES_MIGRATION")
882
- record = {
883
- "profile": str(self.profile),
884
- "run_id": run_id,
885
- "session_key": key,
886
- "chat_id": "fridaynext-" + hashlib.sha256(key.encode()).hexdigest(),
887
- "input_id": "fridaynext:" + run_id,
888
- "text": run["text"],
889
- "client_request_id": run.get("clientRequestId"),
890
- "session_options": run.get("sessionOptions") or {},
891
- "service_id": self.service_id,
892
- "dispatched": True,
893
- "created_at": time.time(),
894
- }
895
- if self._catalog().directory.get(key):
896
- selected = await self._catalog().resolve(key)
897
- if selected.get("shared"):
898
- record.update(native_id=selected["native_id"], shared=True)
899
- elif selected["origin"] != "platform":
900
- raise RuntimeError("REMOTE_SESSION_READ_ONLY")
901
- self.bindings.save(record)
902
- streams = self._streams()
903
- if streams is not None:
904
- streams.watch(run_id)
905
- if record.get("shared"):
906
- # 用户已选择目录中的本地operator会话;不改变其他平台路由,也不另启Agent循环。
907
- lease = self._recovery().lease()
908
- try:
909
- images = await media_input.prepare(self, run, params.get("media"), shared=True)
910
- self._recovery().check(lease)
911
- if images:
912
- self.bindings.patch(record, {"input_media": images})
913
- record["admission_id"] = await self.runtime.submit_shared(
914
- record, **({"images": images} if images else {}))
915
- self.bindings.patch(record, {"admission_id": record["admission_id"]})
916
- except (InputAdmissionRefused, InputAdmissionUnconfirmed) as error:
917
- state = "failed" if isinstance(error, InputAdmissionRefused) else "unknown"
918
- # 退役后也只补原输入的本地事实,不借当前Bindings写入后来profile。
919
- lease[2].patch(record, {"input_admission": {
920
- "state": state, "reason": error.code, "stage": error.stage}})
921
- if streams is not None and state == "failed":
922
- self._recovery().check(lease)
923
- await streams.finish(run_id)
924
- return {"inspection": {"state": state, "reason": error.code}}
925
- else:
926
- if not self.plugin_enabled:
927
- return {
928
- "inspection": {"state": "unknown", "reason": "PLUGIN_DISABLED"}
929
- }
930
- record["input_dispatch_started"] = True
931
- self.bindings.save(record)
932
- # 普通输入仍由标准入口授权、路由并持久提交。
933
- lease = self._recovery().lease()
934
- try:
935
- images = await media_input.prepare(self, run, params.get("media"), shared=False)
936
- self._recovery().check(lease)
937
- if images:
938
- self.bindings.patch(record, {"input_media": images})
939
- event = MessageEvent(
940
- text=run["text"],
941
- message_type=MessageType.PHOTO if images else MessageType.TEXT,
942
- source=self._source(record),
943
- message_id=record["input_id"],
944
- media_urls=[item["path"] for item in images],
945
- media_types=[item["mimeType"] for item in images],
946
- allow_gateway_control=False,
947
- )
948
- event = await lease[0].prepare_input(event)
949
- self._recovery().check(lease)
950
- await media_input.verify_after_ingress(self, event, images)
951
- self._recovery().check(lease)
952
- if record.get("session_options"):
953
- check = lease[0].prepared_input_guard(event)
954
- preparation = await InitialSettings(self).prepare(record, check=check, source=event.source)
955
- check()
956
- self._recovery().check(lease)
957
- if preparation is not None:
958
- return {"inspection": preparation}
959
- except (InputAdmissionRefused, InputAdmissionUnconfirmed) as error:
960
- state = "failed" if isinstance(error, InputAdmissionRefused) else "unknown"
961
- # 退役后也只补原输入的本地事实,不借当前Bindings写入后来profile。
962
- lease[2].patch(record, {"input_admission": {
963
- "state": state, "reason": error.code, "stage": error.stage}})
964
- if streams is not None and state == "failed":
965
- self._recovery().check(lease)
966
- await streams.finish(run_id)
967
- return {"inspection": {"state": state, "reason": error.code}}
968
- self._recovery().check(lease)
969
- await self.handle_message(event)
970
- for _ in range(100):
971
- if await self._receipt(record):
972
- break
973
- await asyncio.sleep(0.02)
974
- if record is None:
975
- return {"inspection": {"state": "unknown", "reason": "MAPPING_NOT_FOUND"}}
976
- if record["session_key"] != run["sessionKey"]:
977
- raise RuntimeError("SESSION_MISMATCH")
978
- trace = None
979
- if method == "cancel":
980
- trace = {"began": time.monotonic_ns(), "traceId": str(uuid.uuid4()),
981
- "profileId": str(self.profile), "serviceId": self.service_id,
982
- "runId": run_id, "clientRequestId": record.get("client_request_id"),
983
- "sessionKey": record["session_key"], "admissionId": record.get("admission_id")}
984
- cancel_event(trace, "cancel.received")
985
- lease = self._recovery().lease()
986
- try:
987
- row = await self._receipt(record)
988
- cancel_event(trace, "cancel.receipt", state=row.get("status") if row else "unknown",
989
- executionGeneration=row.get("generation") if row else None)
990
- if row and row["status"] in ("queued", "started") and not record.get("legacy"):
991
- cancel_event(trace, "cancel.native.begin", executionGeneration=row.get("generation"))
992
- await lease[0].cancel(
993
- conversation_id=record["native_id"], admission_id=row["admission_id"],
994
- expected_generation=row.get("generation"))
995
- self._recovery().check(lease)
996
- # 这是控制调用受理,后续仍须读取原admission的权威终态。
997
- cancel_event(trace, "cancel.native.accepted", executionGeneration=row.get("generation"))
998
- except Exception as error:
999
- cancel_event(trace, "cancel.native.error", errorCode=(
1000
- error.code if isinstance(error, NativeControlError) else "HOST_CONTROL_FAILED"))
1001
- raise
1002
- # 先将停止送到宿主;展示补齐失败不能阻止权威终态结算。
1003
- await self._best_effort_presentation(record)
1004
- streams = self._streams()
1005
- if streams is not None and not record.get("stream_state", {}).get(
1006
- "message_ended"
1007
- ):
1008
- streams.watch(run_id)
1009
- inspection = await self._inspection(record, explicit_cancel=trace is not None)
1010
- if trace is not None:
1011
- cancel_event(trace, "cancel.inspected", state=inspection["state"])
1012
- if streams is not None and inspection["state"] in (
1013
- "completed",
1014
- "failed",
1015
- "cancelled",
1016
- ):
1017
- await streams.finish(run_id)
1018
- updates = []
1019
- if record.get("legacy") and record.get("answer"):
1020
- updates = [
1021
- {
1022
- "kind": "text",
1023
- "id": "answer:" + run_id,
1024
- "channel": "answer",
1025
- "operation": "replace",
1026
- "text": record["answer"],
1027
- }
1028
- ]
1029
- return {"inspection": inspection, "updates": updates}
1030
-
1031
- async def send_clarify(self, chat_id, question, choices, clarify_id, session_key, metadata=None):
1032
- # 官方顺序是平台受理后才注册canonical prompt;这里只持久原身份交接,
1033
- # 不抢先发布卡片,卡片仍须通过后续权威snapshot验证。
1034
- lease = self._recovery().lease()
1035
- if not isinstance(clarify_id, str) or not clarify_id or self.host is None:
1036
- return SendResult(success=False, error="CONTROL_PROMPT_NOT_OWNED")
1037
- matches = []
1038
- for record in self.bindings.all():
1039
- if not self._recovery().owned(record) or record.get("chat_id") != str(chat_id):
1040
- continue
1041
- receipt = await self._receipt(record)
1042
- self._recovery().check(lease)
1043
- if (receipt and receipt.get("status") == "started" and type(receipt.get("generation")) is int
1044
- and receipt.get("authority_epoch") == lease[0].client.identity.get("authority_epoch")):
1045
- matches.append((record, receipt))
1046
- if len(matches) != 1:
1047
- return SendResult(success=False, error="CONTROL_PROMPT_NOT_OWNED")
1048
- record, receipt = matches[0]
1049
- deliveries = dict(self.bindings.read(record["run_id"]).get("control_deliveries", {}))
1050
- identity = {"kind": "clarify", "generation": receipt["generation"], "authority_epoch": receipt["authority_epoch"]}
1051
- if clarify_id in deliveries and deliveries[clarify_id] != identity:
1052
- return SendResult(success=False, error="CONTROL_PROMPT_IDENTITY_CHANGED")
1053
- deliveries[clarify_id] = identity
1054
- self.bindings.patch(record, {"control_deliveries": deliveries})
1055
- return SendResult(success=True, message_id=clarify_id)
1056
-
1057
- async def send(self, chat_id, content, reply_to=None, metadata=None):
1058
- records = [
1059
- r
1060
- for r in self.bindings.all()
1061
- if r.get("chat_id") == str(chat_id) and r["input_id"] == str(reply_to)
1062
- ]
1063
- if len(records) != 1 or self.host is None:
1064
- return SendResult(
1065
- success=False,
1066
- error="FridayNext delivery is not attached to an owned input",
1067
- )
1068
- record = records[0]
1069
- try:
1070
- await self._sync_stream(record)
1071
- # 平台送达先落展示;终态由公开receipt/result确认,不能等Core送达尾部完成。
1072
- update = {
1073
- "kind": "text",
1074
- "id": "answer:" + record["run_id"],
1075
- "channel": "answer",
1076
- "operation": "replace",
1077
- "text": content,
1078
- "data": inline_media.presentation_data(self, record, content),
1079
- }
1080
- receipt = await self.host.publish(
1081
- {
1082
- "serviceInstanceId": self.service_id,
1083
- "runId": record["run_id"],
1084
- "updates": [update],
1085
- }
1086
- )
1087
- if receipt.get("durable") is not True:
1088
- raise RuntimeError()
1089
- self.bindings.patch(record, {"last_presented": content})
1090
- return SendResult(success=True, message_id=record["input_id"])
1091
- except Exception:
1092
- return SendResult(
1093
- success=False, error="FridayNext Kit delivery unavailable"
1094
- )
1095
-
1096
- async def _send_owned_media(self, chat_id, path, kind, reply_to=None, file_name=None):
1097
- context = current_delivery(self)
1098
- if (context is None or context.chat_id != str(chat_id)
1099
- or reply_to is not None and context.input_id != str(reply_to)):
1100
- return SendResult(success=False, error="MEDIA_OUTPUT_INPUT_UNOWNED")
1101
- try:
1102
- receipt = await media_output.deliver(self, context, path, kind=kind, filename=file_name)
1103
- return SendResult(success=True, message_id=receipt["attachment"]["id"])
1104
- except Exception:
1105
- logger.warning("media.delivery.refused")
1106
- return SendResult(success=False, error="MEDIA_OUTPUT_UNAVAILABLE")
1107
-
1108
- async def send_image_file(self, chat_id, image_path, caption=None, reply_to=None, metadata=None):
1109
- return await self._send_owned_media(chat_id, image_path, "image", reply_to=reply_to)
1110
-
1111
- async def send_image(self, chat_id, image_url, caption=None, reply_to=None, metadata=None):
1112
- context = current_delivery(self)
1113
- if (context is None or context.chat_id != str(chat_id)
1114
- or reply_to is not None and context.input_id != str(reply_to)):
1115
- return SendResult(success=False, error="MEDIA_OUTPUT_INPUT_UNOWNED")
1116
- try:
1117
- receipt = await media_output.deliver_remote(self, context, image_url)
1118
- return SendResult(success=True, message_id=receipt["attachment"]["id"])
1119
- except Exception:
1120
- logger.warning("media.remote.delivery_unconfirmed")
1121
- return SendResult(success=False, error="MEDIA_OUTPUT_UNAVAILABLE")
1122
-
1123
- async def send_document(self, chat_id, file_path, caption=None, file_name=None, reply_to=None, metadata=None, **kwargs):
1124
- return await self._send_owned_media(chat_id, file_path, "file", reply_to=reply_to, file_name=file_name)