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