@pellux/goodvibes-sdk 0.25.8 → 0.25.11

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 (245) hide show
  1. package/README.md +4 -0
  2. package/dist/_internal/contracts/artifacts/operator-contract.json +178 -6
  3. package/dist/_internal/contracts/generated/foundation-client-types.d.ts +16 -1
  4. package/dist/_internal/contracts/generated/foundation-client-types.d.ts.map +1 -1
  5. package/dist/_internal/contracts/generated/foundation-metadata.d.ts +2 -2
  6. package/dist/_internal/contracts/generated/foundation-metadata.js +2 -2
  7. package/dist/_internal/contracts/generated/operator-contract.d.ts.map +1 -1
  8. package/dist/_internal/contracts/generated/operator-contract.js +178 -6
  9. package/dist/_internal/contracts/generated/operator-method-ids.d.ts +1 -1
  10. package/dist/_internal/contracts/generated/operator-method-ids.d.ts.map +1 -1
  11. package/dist/_internal/contracts/generated/operator-method-ids.js +1 -0
  12. package/dist/_internal/daemon/context.d.ts +1 -0
  13. package/dist/_internal/daemon/context.d.ts.map +1 -1
  14. package/dist/_internal/daemon/integration-route-types.d.ts +1 -0
  15. package/dist/_internal/daemon/integration-route-types.d.ts.map +1 -1
  16. package/dist/_internal/daemon/integration-routes.d.ts +1 -1
  17. package/dist/_internal/daemon/integration-routes.d.ts.map +1 -1
  18. package/dist/_internal/daemon/integration-routes.js +3 -0
  19. package/dist/_internal/daemon/operator.d.ts +1 -1
  20. package/dist/_internal/daemon/operator.d.ts.map +1 -1
  21. package/dist/_internal/daemon/operator.js +2 -0
  22. package/dist/_internal/daemon/runtime-route-types.d.ts +1 -1
  23. package/dist/_internal/daemon/runtime-route-types.d.ts.map +1 -1
  24. package/dist/_internal/platform/adapters/discord/index.d.ts.map +1 -1
  25. package/dist/_internal/platform/adapters/discord/index.js +4 -5
  26. package/dist/_internal/platform/adapters/github/index.d.ts.map +1 -1
  27. package/dist/_internal/platform/adapters/github/index.js +4 -5
  28. package/dist/_internal/platform/adapters/google-chat/index.d.ts.map +1 -1
  29. package/dist/_internal/platform/adapters/google-chat/index.js +7 -5
  30. package/dist/_internal/platform/adapters/helpers.d.ts +2 -1
  31. package/dist/_internal/platform/adapters/helpers.d.ts.map +1 -1
  32. package/dist/_internal/platform/adapters/helpers.js +3 -34
  33. package/dist/_internal/platform/adapters/homeassistant/index.d.ts +3 -0
  34. package/dist/_internal/platform/adapters/homeassistant/index.d.ts.map +1 -0
  35. package/dist/_internal/platform/adapters/homeassistant/index.js +177 -0
  36. package/dist/_internal/platform/adapters/index.d.ts +1 -0
  37. package/dist/_internal/platform/adapters/index.d.ts.map +1 -1
  38. package/dist/_internal/platform/adapters/index.js +1 -0
  39. package/dist/_internal/platform/adapters/mattermost/index.d.ts.map +1 -1
  40. package/dist/_internal/platform/adapters/mattermost/index.js +6 -2
  41. package/dist/_internal/platform/adapters/slack/index.d.ts.map +1 -1
  42. package/dist/_internal/platform/adapters/slack/index.js +4 -5
  43. package/dist/_internal/platform/adapters/telegram/index.d.ts.map +1 -1
  44. package/dist/_internal/platform/adapters/telegram/index.js +7 -5
  45. package/dist/_internal/platform/adapters/types.d.ts +1 -1
  46. package/dist/_internal/platform/adapters/types.d.ts.map +1 -1
  47. package/dist/_internal/platform/adapters/webhook/index.d.ts.map +1 -1
  48. package/dist/_internal/platform/adapters/webhook/index.js +4 -1
  49. package/dist/_internal/platform/automation/types.d.ts +1 -1
  50. package/dist/_internal/platform/automation/types.d.ts.map +1 -1
  51. package/dist/_internal/platform/batch/manager.d.ts.map +1 -1
  52. package/dist/_internal/platform/batch/manager.js +4 -0
  53. package/dist/_internal/platform/batch/types.d.ts +4 -0
  54. package/dist/_internal/platform/batch/types.d.ts.map +1 -1
  55. package/dist/_internal/platform/channels/builtin/accounts.d.ts.map +1 -1
  56. package/dist/_internal/platform/channels/builtin/accounts.js +22 -0
  57. package/dist/_internal/platform/channels/builtin/contracts.d.ts.map +1 -1
  58. package/dist/_internal/platform/channels/builtin/contracts.js +9 -0
  59. package/dist/_internal/platform/channels/builtin/descriptors.d.ts.map +1 -1
  60. package/dist/_internal/platform/channels/builtin/descriptors.js +9 -2
  61. package/dist/_internal/platform/channels/builtin/homeassistant.d.ts +64 -0
  62. package/dist/_internal/platform/channels/builtin/homeassistant.d.ts.map +1 -0
  63. package/dist/_internal/platform/channels/builtin/homeassistant.js +380 -0
  64. package/dist/_internal/platform/channels/builtin/plugins.d.ts.map +1 -1
  65. package/dist/_internal/platform/channels/builtin/plugins.js +2 -1
  66. package/dist/_internal/platform/channels/builtin/presentation.d.ts.map +1 -1
  67. package/dist/_internal/platform/channels/builtin/presentation.js +4 -0
  68. package/dist/_internal/platform/channels/builtin/setup-schema.d.ts.map +1 -1
  69. package/dist/_internal/platform/channels/builtin/setup-schema.js +46 -0
  70. package/dist/_internal/platform/channels/builtin/shared.d.ts +1 -1
  71. package/dist/_internal/platform/channels/builtin/shared.d.ts.map +1 -1
  72. package/dist/_internal/platform/channels/builtin/shared.js +2 -0
  73. package/dist/_internal/platform/channels/builtin/surfaces.d.ts.map +1 -1
  74. package/dist/_internal/platform/channels/builtin/surfaces.js +1 -0
  75. package/dist/_internal/platform/channels/builtin/targets.d.ts.map +1 -1
  76. package/dist/_internal/platform/channels/builtin/targets.js +24 -0
  77. package/dist/_internal/platform/channels/builtin-runtime.d.ts.map +1 -1
  78. package/dist/_internal/platform/channels/builtin-runtime.js +6 -0
  79. package/dist/_internal/platform/channels/delivery/strategies-core.d.ts +1 -0
  80. package/dist/_internal/platform/channels/delivery/strategies-core.d.ts.map +1 -1
  81. package/dist/_internal/platform/channels/delivery/strategies-core.js +41 -1
  82. package/dist/_internal/platform/channels/delivery-router.d.ts.map +1 -1
  83. package/dist/_internal/platform/channels/delivery-router.js +2 -1
  84. package/dist/_internal/platform/channels/reply-pipeline.d.ts.map +1 -1
  85. package/dist/_internal/platform/channels/reply-pipeline.js +9 -0
  86. package/dist/_internal/platform/channels/route-manager.d.ts.map +1 -1
  87. package/dist/_internal/platform/channels/route-manager.js +1 -0
  88. package/dist/_internal/platform/channels/surface-registry.d.ts.map +1 -1
  89. package/dist/_internal/platform/channels/surface-registry.js +4 -0
  90. package/dist/_internal/platform/channels/types.d.ts +1 -1
  91. package/dist/_internal/platform/channels/types.d.ts.map +1 -1
  92. package/dist/_internal/platform/cloudflare/client.d.ts +3 -0
  93. package/dist/_internal/platform/cloudflare/client.d.ts.map +1 -0
  94. package/dist/_internal/platform/cloudflare/client.js +9 -0
  95. package/dist/_internal/platform/cloudflare/config.d.ts +8 -0
  96. package/dist/_internal/platform/cloudflare/config.d.ts.map +1 -0
  97. package/dist/_internal/platform/cloudflare/config.js +48 -0
  98. package/dist/_internal/platform/cloudflare/constants.d.ts +18 -0
  99. package/dist/_internal/platform/cloudflare/constants.d.ts.map +1 -0
  100. package/dist/_internal/platform/cloudflare/constants.js +36 -0
  101. package/dist/_internal/platform/cloudflare/discovery.d.ts +23 -0
  102. package/dist/_internal/platform/cloudflare/discovery.d.ts.map +1 -0
  103. package/dist/_internal/platform/cloudflare/discovery.js +57 -0
  104. package/dist/_internal/platform/cloudflare/index.d.ts +6 -0
  105. package/dist/_internal/platform/cloudflare/index.d.ts.map +1 -0
  106. package/dist/_internal/platform/cloudflare/index.js +4 -0
  107. package/dist/_internal/platform/cloudflare/manager.d.ts +30 -0
  108. package/dist/_internal/platform/cloudflare/manager.d.ts.map +1 -0
  109. package/dist/_internal/platform/cloudflare/manager.js +674 -0
  110. package/dist/_internal/platform/cloudflare/resources.d.ts +79 -0
  111. package/dist/_internal/platform/cloudflare/resources.d.ts.map +1 -0
  112. package/dist/_internal/platform/cloudflare/resources.js +353 -0
  113. package/dist/_internal/platform/cloudflare/types.d.ts +694 -0
  114. package/dist/_internal/platform/cloudflare/types.d.ts.map +1 -0
  115. package/dist/_internal/platform/cloudflare/types.js +10 -0
  116. package/dist/_internal/platform/cloudflare/utils.d.ts +14 -0
  117. package/dist/_internal/platform/cloudflare/utils.d.ts.map +1 -0
  118. package/dist/_internal/platform/cloudflare/utils.js +216 -0
  119. package/dist/_internal/platform/cloudflare/worker-source.d.ts +2 -0
  120. package/dist/_internal/platform/cloudflare/worker-source.d.ts.map +1 -0
  121. package/dist/_internal/platform/cloudflare/worker-source.js +165 -0
  122. package/dist/_internal/platform/companion/companion-chat-manager.d.ts +24 -4
  123. package/dist/_internal/platform/companion/companion-chat-manager.d.ts.map +1 -1
  124. package/dist/_internal/platform/companion/companion-chat-manager.js +128 -78
  125. package/dist/_internal/platform/config/schema-domain-runtime.d.ts +24 -0
  126. package/dist/_internal/platform/config/schema-domain-runtime.d.ts.map +1 -1
  127. package/dist/_internal/platform/config/schema-domain-runtime.js +169 -0
  128. package/dist/_internal/platform/config/schema-domain-surfaces.d.ts +11 -0
  129. package/dist/_internal/platform/config/schema-domain-surfaces.d.ts.map +1 -1
  130. package/dist/_internal/platform/config/schema-domain-surfaces.js +59 -0
  131. package/dist/_internal/platform/config/schema-types.d.ts +38 -2
  132. package/dist/_internal/platform/config/schema-types.d.ts.map +1 -1
  133. package/dist/_internal/platform/control-plane/gateway-utils.d.ts +37 -0
  134. package/dist/_internal/platform/control-plane/gateway-utils.d.ts.map +1 -0
  135. package/dist/_internal/platform/control-plane/gateway-utils.js +97 -0
  136. package/dist/_internal/platform/control-plane/gateway.d.ts +4 -9
  137. package/dist/_internal/platform/control-plane/gateway.d.ts.map +1 -1
  138. package/dist/_internal/platform/control-plane/gateway.js +26 -61
  139. package/dist/_internal/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
  140. package/dist/_internal/platform/control-plane/method-catalog-runtime.js +11 -1
  141. package/dist/_internal/platform/control-plane/operator-contract-schemas-admin.d.ts.map +1 -1
  142. package/dist/_internal/platform/control-plane/operator-contract-schemas-admin.js +3 -2
  143. package/dist/_internal/platform/control-plane/operator-contract-schemas-control.d.ts +1 -0
  144. package/dist/_internal/platform/control-plane/operator-contract-schemas-control.d.ts.map +1 -1
  145. package/dist/_internal/platform/control-plane/operator-contract-schemas-control.js +26 -0
  146. package/dist/_internal/platform/control-plane/routes/operator.d.ts +1 -1
  147. package/dist/_internal/platform/control-plane/routes/operator.d.ts.map +1 -1
  148. package/dist/_internal/platform/control-plane/routes/operator.js +2 -0
  149. package/dist/_internal/platform/control-plane/types.d.ts +1 -1
  150. package/dist/_internal/platform/control-plane/types.d.ts.map +1 -1
  151. package/dist/_internal/platform/daemon/control-plane.d.ts.map +1 -1
  152. package/dist/_internal/platform/daemon/control-plane.js +50 -6
  153. package/dist/_internal/platform/daemon/facade-composition.d.ts.map +1 -1
  154. package/dist/_internal/platform/daemon/facade-composition.js +30 -2
  155. package/dist/_internal/platform/daemon/facade-types.d.ts +1 -1
  156. package/dist/_internal/platform/daemon/facade-types.d.ts.map +1 -1
  157. package/dist/_internal/platform/daemon/http/cloudflare-routes.d.ts +7 -0
  158. package/dist/_internal/platform/daemon/http/cloudflare-routes.d.ts.map +1 -0
  159. package/dist/_internal/platform/daemon/http/cloudflare-routes.js +201 -0
  160. package/dist/_internal/platform/daemon/http/router.d.ts +3 -3
  161. package/dist/_internal/platform/daemon/http/router.d.ts.map +1 -1
  162. package/dist/_internal/platform/daemon/http/router.js +22 -16
  163. package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts +1 -1
  164. package/dist/_internal/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
  165. package/dist/_internal/platform/daemon/http-listener.d.ts.map +1 -1
  166. package/dist/_internal/platform/daemon/http-listener.js +4 -8
  167. package/dist/_internal/platform/daemon/surface-actions.d.ts +1 -1
  168. package/dist/_internal/platform/daemon/surface-actions.d.ts.map +1 -1
  169. package/dist/_internal/platform/daemon/surface-delivery.d.ts +1 -1
  170. package/dist/_internal/platform/daemon/surface-delivery.d.ts.map +1 -1
  171. package/dist/_internal/platform/daemon/surface-delivery.js +1 -0
  172. package/dist/_internal/platform/daemon/surface-policy.d.ts +1 -1
  173. package/dist/_internal/platform/daemon/surface-policy.d.ts.map +1 -1
  174. package/dist/_internal/platform/daemon/surface-policy.js +8 -0
  175. package/dist/_internal/platform/daemon/types.d.ts +2 -2
  176. package/dist/_internal/platform/daemon/types.d.ts.map +1 -1
  177. package/dist/_internal/platform/integrations/homeassistant.d.ts +58 -0
  178. package/dist/_internal/platform/integrations/homeassistant.d.ts.map +1 -0
  179. package/dist/_internal/platform/integrations/homeassistant.js +174 -0
  180. package/dist/_internal/platform/integrations/index.d.ts +2 -0
  181. package/dist/_internal/platform/integrations/index.d.ts.map +1 -1
  182. package/dist/_internal/platform/integrations/index.js +1 -0
  183. package/dist/_internal/platform/runtime/events/control-plane.d.ts +1 -1
  184. package/dist/_internal/platform/runtime/events/control-plane.d.ts.map +1 -1
  185. package/dist/_internal/platform/runtime/events/control-plane.js +1 -0
  186. package/dist/_internal/platform/runtime/events/routes.d.ts +1 -1
  187. package/dist/_internal/platform/runtime/events/routes.d.ts.map +1 -1
  188. package/dist/_internal/platform/runtime/events/routes.js +1 -0
  189. package/dist/_internal/platform/runtime/feature-flags/flags.d.ts.map +1 -1
  190. package/dist/_internal/platform/runtime/feature-flags/flags.js +9 -0
  191. package/dist/_internal/platform/runtime/feature-flags/gates.d.ts.map +1 -1
  192. package/dist/_internal/platform/runtime/feature-flags/gates.js +2 -0
  193. package/dist/_internal/platform/runtime/index.d.ts +2 -0
  194. package/dist/_internal/platform/runtime/index.d.ts.map +1 -1
  195. package/dist/_internal/platform/runtime/index.js +1 -0
  196. package/dist/_internal/platform/runtime/integration/helpers.d.ts +4 -0
  197. package/dist/_internal/platform/runtime/integration/helpers.d.ts.map +1 -1
  198. package/dist/_internal/platform/runtime/integration/helpers.js +4 -0
  199. package/dist/_internal/platform/runtime/security-settings.d.ts +19 -0
  200. package/dist/_internal/platform/runtime/security-settings.d.ts.map +1 -0
  201. package/dist/_internal/platform/runtime/security-settings.js +187 -0
  202. package/dist/_internal/platform/runtime/services.d.ts.map +1 -1
  203. package/dist/_internal/platform/runtime/services.js +1 -0
  204. package/dist/_internal/platform/security/user-auth.d.ts +1 -1
  205. package/dist/_internal/platform/security/user-auth.d.ts.map +1 -1
  206. package/dist/_internal/platform/security/user-auth.js +18 -3
  207. package/dist/_internal/platform/tools/edit/core.d.ts.map +1 -1
  208. package/dist/_internal/platform/tools/edit/core.js +4 -47
  209. package/dist/_internal/platform/tools/exec/runtime.d.ts.map +1 -1
  210. package/dist/_internal/platform/tools/exec/runtime.js +7 -1
  211. package/dist/_internal/platform/tools/exec/schema.d.ts +1 -0
  212. package/dist/_internal/platform/tools/exec/schema.d.ts.map +1 -1
  213. package/dist/_internal/platform/tools/exec/schema.js +1 -0
  214. package/dist/_internal/platform/tools/fetch/runtime.d.ts.map +1 -1
  215. package/dist/_internal/platform/tools/fetch/runtime.js +140 -19
  216. package/dist/_internal/platform/tools/fetch/schema.d.ts +1 -0
  217. package/dist/_internal/platform/tools/fetch/schema.d.ts.map +1 -1
  218. package/dist/_internal/platform/tools/fetch/schema.js +1 -0
  219. package/dist/_internal/platform/tools/find/executor.d.ts.map +1 -1
  220. package/dist/_internal/platform/tools/find/executor.js +7 -1
  221. package/dist/_internal/platform/tools/find/schema.d.ts.map +1 -1
  222. package/dist/_internal/platform/tools/find/schema.js +2 -0
  223. package/dist/_internal/platform/tools/read/index.d.ts.map +1 -1
  224. package/dist/_internal/platform/tools/read/index.js +7 -1
  225. package/dist/_internal/platform/tools/read/schema.d.ts +1 -0
  226. package/dist/_internal/platform/tools/read/schema.d.ts.map +1 -1
  227. package/dist/_internal/platform/tools/read/schema.js +1 -0
  228. package/dist/_internal/platform/tools/shared/process-manager.d.ts +2 -0
  229. package/dist/_internal/platform/tools/shared/process-manager.d.ts.map +1 -1
  230. package/dist/_internal/platform/tools/shared/process-manager.js +67 -5
  231. package/dist/_internal/platform/tools/write/index.d.ts.map +1 -1
  232. package/dist/_internal/platform/tools/write/index.js +3 -36
  233. package/dist/_internal/platform/utils/concurrency.d.ts +3 -0
  234. package/dist/_internal/platform/utils/concurrency.d.ts.map +1 -0
  235. package/dist/_internal/platform/utils/concurrency.js +17 -0
  236. package/dist/_internal/platform/utils/logger.d.ts.map +1 -1
  237. package/dist/_internal/platform/utils/logger.js +19 -1
  238. package/dist/_internal/platform/utils/request-body.d.ts +4 -0
  239. package/dist/_internal/platform/utils/request-body.d.ts.map +1 -0
  240. package/dist/_internal/platform/utils/request-body.js +45 -0
  241. package/dist/_internal/platform/version.js +1 -1
  242. package/dist/workers.d.ts +9 -0
  243. package/dist/workers.d.ts.map +1 -1
  244. package/dist/workers.js +67 -3
  245. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"homeassistant.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/homeassistant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EACV,+BAA+B,EAE/B,qBAAqB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,eAAO,MAAM,sBAAsB,iBAAoD,CAAC;AACxF,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AACpE,eAAO,MAAM,iCAAiC,sBAAsB,CAAC;AAErE,UAAU,YAAY;IACpB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAoBD,UAAU,0BAA0B;IAClC,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;CAC1C;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;QACxC,QAAQ,CAAC,YAA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MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,CAuBlE;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,CAAC,yBAAyB,EAAE,eAAe,CAAC,GAAG,4BAA4B,CAiE/H;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAUlH;AAED,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,YAAY,EAC3B,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,GAC7C,MAAM,GAAG,IAAI,CAMf;AAED,wBAAsB,+BAA+B,CAAC,IAAI,EAAE;IAC1D,QAAQ,CAAC,aAAa,EAAE,YAAY,CAAC;IACrC,QAAQ,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,eAAe,CAAC,CAAC;IACxE,QAAQ,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;CACnE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAKzB;AAED,wBAAsB,iCAAiC,CAAC,IAAI,EAAE;IAC5D,QAAQ,CAAC,aAAa,EAAE,YAAY,CAAC;IACrC,QAAQ,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,eAAe,CAAC,CAAC;IACxE,QAAQ,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;CACnE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAKzB"}
@@ -0,0 +1,380 @@
1
+ import { resolveSecretInput } from '../../config/secret-refs.js';
2
+ import { HomeAssistantIntegration } from '../../integrations/homeassistant.js';
3
+ export const HOME_ASSISTANT_SURFACE = 'homeassistant';
4
+ export const HOME_ASSISTANT_WEBHOOK_PATH = '/webhook/homeassistant';
5
+ export const HOME_ASSISTANT_DEFAULT_EVENT_TYPE = 'goodvibes_message';
6
+ const HOME_ASSISTANT_TOKEN_ENV = [
7
+ 'HOMEASSISTANT_ACCESS_TOKEN',
8
+ 'HOME_ASSISTANT_ACCESS_TOKEN',
9
+ 'HA_ACCESS_TOKEN',
10
+ ];
11
+ const HOME_ASSISTANT_URL_ENV = [
12
+ 'HOMEASSISTANT_URL',
13
+ 'HOME_ASSISTANT_URL',
14
+ 'HA_URL',
15
+ ];
16
+ const HOME_ASSISTANT_WEBHOOK_SECRET_ENV = [
17
+ 'HOMEASSISTANT_WEBHOOK_SECRET',
18
+ 'HOME_ASSISTANT_WEBHOOK_SECRET',
19
+ 'HA_GOODVIBES_WEBHOOK_SECRET',
20
+ ];
21
+ export function listHomeAssistantOperatorActions() {
22
+ const surface = HOME_ASSISTANT_SURFACE;
23
+ return [
24
+ action(surface, 'homeassistant-manifest', 'Home Assistant manifest', 'Return the daemon/device contract consumed by the Home Assistant integration.'),
25
+ action(surface, 'homeassistant-status', 'Check Home Assistant', 'Check configured Home Assistant API reachability and token posture.'),
26
+ action(surface, 'homeassistant-list-states', 'List Home Assistant states', 'List current Home Assistant entity states with optional domain filtering.'),
27
+ action(surface, 'homeassistant-get-state', 'Get Home Assistant state', 'Read a single Home Assistant entity state.', {
28
+ type: 'object',
29
+ properties: { entityId: { type: 'string' } },
30
+ required: ['entityId'],
31
+ }),
32
+ action(surface, 'homeassistant-list-services', 'List Home Assistant services', 'List callable Home Assistant service actions.'),
33
+ action(surface, 'homeassistant-call-service', 'Call Home Assistant service', 'Call a Home Assistant service action such as light.turn_on.', {
34
+ type: 'object',
35
+ properties: {
36
+ domain: { type: 'string' },
37
+ service: { type: 'string' },
38
+ serviceData: { type: 'object', additionalProperties: true },
39
+ returnResponse: { type: 'boolean' },
40
+ },
41
+ required: ['domain', 'service'],
42
+ additionalProperties: true,
43
+ }, true),
44
+ action(surface, 'homeassistant-fire-event', 'Fire Home Assistant event', 'Fire an event on the Home Assistant event bus.', {
45
+ type: 'object',
46
+ properties: {
47
+ eventType: { type: 'string' },
48
+ eventData: { type: 'object', additionalProperties: true },
49
+ },
50
+ required: ['eventType'],
51
+ additionalProperties: true,
52
+ }, true),
53
+ action(surface, 'homeassistant-render-template', 'Render Home Assistant template', 'Render a Home Assistant template through the configured instance.', {
54
+ type: 'object',
55
+ properties: {
56
+ template: { type: 'string' },
57
+ variables: { type: 'object', additionalProperties: true },
58
+ },
59
+ required: ['template'],
60
+ additionalProperties: true,
61
+ }),
62
+ action(surface, 'homeassistant-publish-goodvibes-event', 'Publish GoodVibes event', 'Publish a GoodVibes message event into Home Assistant.', {
63
+ type: 'object',
64
+ properties: {
65
+ title: { type: 'string' },
66
+ body: { type: 'string' },
67
+ status: { type: 'string' },
68
+ metadata: { type: 'object', additionalProperties: true },
69
+ },
70
+ required: ['body'],
71
+ additionalProperties: true,
72
+ }),
73
+ ];
74
+ }
75
+ export function listHomeAssistantTools() {
76
+ const surface = HOME_ASSISTANT_SURFACE;
77
+ return [
78
+ tool(surface, 'homeassistant:manifest', 'homeassistant_manifest', 'Return the Home Assistant integration manifest and daemon endpoint contract.', ['homeassistant-manifest']),
79
+ tool(surface, 'homeassistant:status', 'homeassistant_status', 'Check Home Assistant API reachability and token posture.', ['homeassistant-status']),
80
+ tool(surface, 'homeassistant:states', 'homeassistant_states', 'List Home Assistant entity states.', ['homeassistant-list-states'], {
81
+ type: 'object',
82
+ properties: {
83
+ domain: { type: 'string' },
84
+ query: { type: 'string' },
85
+ limit: { type: 'number' },
86
+ },
87
+ additionalProperties: false,
88
+ }),
89
+ tool(surface, 'homeassistant:state', 'homeassistant_state', 'Read one Home Assistant entity state.', ['homeassistant-get-state'], {
90
+ type: 'object',
91
+ properties: { entityId: { type: 'string' } },
92
+ required: ['entityId'],
93
+ additionalProperties: false,
94
+ }),
95
+ tool(surface, 'homeassistant:services', 'homeassistant_services', 'List callable Home Assistant service actions.', ['homeassistant-list-services']),
96
+ tool(surface, 'homeassistant:call_service', 'homeassistant_call_service', 'Call a Home Assistant service action.', ['homeassistant-call-service'], {
97
+ type: 'object',
98
+ properties: {
99
+ domain: { type: 'string' },
100
+ service: { type: 'string' },
101
+ serviceData: { type: 'object', additionalProperties: true },
102
+ returnResponse: { type: 'boolean' },
103
+ },
104
+ required: ['domain', 'service'],
105
+ additionalProperties: true,
106
+ }),
107
+ tool(surface, 'homeassistant:fire_event', 'homeassistant_fire_event', 'Fire an event on the Home Assistant event bus.', ['homeassistant-fire-event'], {
108
+ type: 'object',
109
+ properties: {
110
+ eventType: { type: 'string' },
111
+ eventData: { type: 'object', additionalProperties: true },
112
+ },
113
+ required: ['eventType'],
114
+ additionalProperties: true,
115
+ }),
116
+ tool(surface, 'homeassistant:render_template', 'homeassistant_render_template', 'Render a Home Assistant template.', ['homeassistant-render-template'], {
117
+ type: 'object',
118
+ properties: {
119
+ template: { type: 'string' },
120
+ variables: { type: 'object', additionalProperties: true },
121
+ },
122
+ required: ['template'],
123
+ additionalProperties: true,
124
+ }),
125
+ ];
126
+ }
127
+ export async function runHomeAssistantOperatorAction(context, actionId, input) {
128
+ switch (actionId) {
129
+ case 'homeassistant-manifest':
130
+ return { handled: true, result: buildHomeAssistantManifest(context.deps) };
131
+ case 'homeassistant-status':
132
+ return { handled: true, result: await checkHomeAssistantStatus(context.deps) };
133
+ case 'homeassistant-list-states':
134
+ return { handled: true, result: await listHomeAssistantStates(context.deps, input) };
135
+ case 'homeassistant-get-state':
136
+ return { handled: true, result: await getHomeAssistantState(context.deps, input) };
137
+ case 'homeassistant-list-services':
138
+ return { handled: true, result: await listHomeAssistantServices(context.deps) };
139
+ case 'homeassistant-call-service':
140
+ return { handled: true, result: await callHomeAssistantService(context.deps, input) };
141
+ case 'homeassistant-fire-event':
142
+ return { handled: true, result: await fireHomeAssistantEvent(context.deps, input) };
143
+ case 'homeassistant-render-template':
144
+ return { handled: true, result: await renderHomeAssistantTemplate(context.deps, input) };
145
+ case 'homeassistant-publish-goodvibes-event':
146
+ return { handled: true, result: await publishGoodVibesEvent(context.deps, input) };
147
+ default:
148
+ return { handled: false, result: null };
149
+ }
150
+ }
151
+ export function buildHomeAssistantManifest(deps) {
152
+ const baseUrl = firstNonEmpty(String(deps.configManager.get('controlPlane.baseUrl') ?? ''), String(deps.configManager.get('web.publicBaseUrl') ?? '')) ?? '';
153
+ const eventType = String(deps.configManager.get('surfaces.homeassistant.eventType') ?? HOME_ASSISTANT_DEFAULT_EVENT_TYPE);
154
+ const deviceId = String(deps.configManager.get('surfaces.homeassistant.deviceId') ?? 'goodvibes-daemon') || 'goodvibes-daemon';
155
+ return {
156
+ protocolVersion: 1,
157
+ surface: HOME_ASSISTANT_SURFACE,
158
+ label: 'Home Assistant',
159
+ device: {
160
+ identifiers: [`goodvibes:${deviceId}`],
161
+ manufacturer: 'GoodVibes',
162
+ model: 'GoodVibes Daemon',
163
+ name: String(deps.configManager.get('surfaces.homeassistant.deviceName') ?? 'GoodVibes Daemon') || 'GoodVibes Daemon',
164
+ },
165
+ daemon: {
166
+ baseUrl,
167
+ auth: 'bearer',
168
+ endpoints: {
169
+ setup: '/api/channels/setup/homeassistant',
170
+ account: '/api/channels/accounts/homeassistant',
171
+ capabilities: '/api/channels/capabilities/homeassistant',
172
+ tools: '/api/channels/tools/homeassistant',
173
+ agentTools: '/api/channels/agent-tools/homeassistant',
174
+ actions: '/api/channels/actions/homeassistant',
175
+ directory: '/api/channels/directory/homeassistant',
176
+ resolveTarget: '/api/channels/targets/homeassistant/resolve',
177
+ webhook: HOME_ASSISTANT_WEBHOOK_PATH,
178
+ eventStream: '/api/control-plane/events',
179
+ },
180
+ },
181
+ capabilities: [
182
+ 'conversation-ingress',
183
+ 'agent-task-ingress',
184
+ 'daemon-tool-catalog',
185
+ 'daemon-agent-tools',
186
+ 'session-binding',
187
+ 'homeassistant-state-read',
188
+ 'homeassistant-service-call',
189
+ 'homeassistant-event-delivery',
190
+ 'control-plane-events',
191
+ ],
192
+ events: {
193
+ outboundEventType: eventType,
194
+ inboundWebhookPath: HOME_ASSISTANT_WEBHOOK_PATH,
195
+ inboundSecretHeaders: ['x-goodvibes-homeassistant-secret', 'authorization'],
196
+ },
197
+ recommendedServices: [
198
+ { name: 'goodvibes.prompt', target: 'config_entry', description: 'Submit a normal prompt to the daemon.' },
199
+ { name: 'goodvibes.run_agent', target: 'config_entry', description: 'Run an agent task through the daemon.' },
200
+ { name: 'goodvibes.cancel', target: 'config_entry', description: 'Cancel an active run or agent by id.' },
201
+ { name: 'goodvibes.status', target: 'config_entry', description: 'Inspect daemon, session, or agent status.' },
202
+ ],
203
+ metadata: {
204
+ configKeys: [
205
+ 'surfaces.homeassistant.enabled',
206
+ 'surfaces.homeassistant.instanceUrl',
207
+ 'surfaces.homeassistant.accessToken',
208
+ 'surfaces.homeassistant.webhookSecret',
209
+ 'surfaces.homeassistant.eventType',
210
+ ],
211
+ },
212
+ };
213
+ }
214
+ export async function createHomeAssistantClient(deps) {
215
+ const baseUrl = resolveHomeAssistantBaseUrl(deps.configManager, deps.serviceRegistry);
216
+ if (!baseUrl) {
217
+ throw new Error('Home Assistant instance URL is not configured.');
218
+ }
219
+ const accessToken = await resolveHomeAssistantAccessToken(deps);
220
+ return new HomeAssistantIntegration({
221
+ baseUrl,
222
+ accessToken: accessToken ?? undefined,
223
+ });
224
+ }
225
+ export function resolveHomeAssistantBaseUrl(configManager, serviceRegistry) {
226
+ return firstNonEmpty(String(configManager.get('surfaces.homeassistant.instanceUrl') ?? ''), serviceRegistry?.get('homeassistant')?.baseUrl, ...HOME_ASSISTANT_URL_ENV.map((key) => process.env[key])) ?? null;
227
+ }
228
+ export async function resolveHomeAssistantAccessToken(deps) {
229
+ return await deps.serviceRegistry?.resolveSecret('homeassistant', 'primary')
230
+ || await resolveConfiguredSecret(deps, deps.configManager.get('surfaces.homeassistant.accessToken'))
231
+ || firstNonEmpty(...HOME_ASSISTANT_TOKEN_ENV.map((key) => process.env[key]))
232
+ || null;
233
+ }
234
+ export async function resolveHomeAssistantWebhookSecret(deps) {
235
+ return await deps.serviceRegistry?.resolveSecret('homeassistant', 'signingSecret')
236
+ || await resolveConfiguredSecret(deps, deps.configManager.get('surfaces.homeassistant.webhookSecret'))
237
+ || firstNonEmpty(...HOME_ASSISTANT_WEBHOOK_SECRET_ENV.map((key) => process.env[key]))
238
+ || null;
239
+ }
240
+ async function checkHomeAssistantStatus(deps) {
241
+ const baseUrl = resolveHomeAssistantBaseUrl(deps.configManager, deps.serviceRegistry);
242
+ const token = await resolveHomeAssistantAccessToken(deps);
243
+ if (!baseUrl)
244
+ return { ok: false, configured: false, error: 'Home Assistant instance URL is not configured.' };
245
+ const client = new HomeAssistantIntegration({ baseUrl, accessToken: token ?? undefined });
246
+ try {
247
+ const api = await client.getApiStatus();
248
+ return {
249
+ ok: true,
250
+ configured: Boolean(token),
251
+ baseUrl,
252
+ api,
253
+ };
254
+ }
255
+ catch (error) {
256
+ return {
257
+ ok: false,
258
+ configured: Boolean(token),
259
+ baseUrl,
260
+ error: error instanceof Error ? error.message : String(error),
261
+ };
262
+ }
263
+ }
264
+ async function listHomeAssistantStates(deps, input) {
265
+ const states = await (await createHomeAssistantClient(deps)).listStates();
266
+ const domain = readString(input?.domain)?.replace(/\.$/, '');
267
+ const query = readString(input?.query)?.toLowerCase();
268
+ const limit = clampLimit(input?.limit, 100, 500);
269
+ const filtered = states.filter((state) => {
270
+ if (domain && !state.entity_id.startsWith(`${domain}.`))
271
+ return false;
272
+ if (!query)
273
+ return true;
274
+ return state.entity_id.toLowerCase().includes(query)
275
+ || state.state.toLowerCase().includes(query)
276
+ || JSON.stringify(state.attributes ?? {}).toLowerCase().includes(query);
277
+ }).slice(0, limit);
278
+ return { ok: true, total: states.length, returned: filtered.length, states: filtered };
279
+ }
280
+ async function getHomeAssistantState(deps, input) {
281
+ const entityId = readString(input?.entityId ?? input?.entity_id);
282
+ if (!entityId)
283
+ return { ok: false, error: 'entityId is required.' };
284
+ const state = await (await createHomeAssistantClient(deps)).getState(entityId);
285
+ return state ? { ok: true, state } : { ok: false, error: `No Home Assistant state found for ${entityId}.` };
286
+ }
287
+ async function listHomeAssistantServices(deps) {
288
+ const services = await (await createHomeAssistantClient(deps)).listServices();
289
+ return { ok: true, services };
290
+ }
291
+ async function callHomeAssistantService(deps, input) {
292
+ const domain = readString(input?.domain);
293
+ const service = readString(input?.service);
294
+ if (!domain || !service)
295
+ return { ok: false, error: 'domain and service are required.' };
296
+ const serviceData = readRecord(input?.serviceData ?? input?.service_data);
297
+ const result = await (await createHomeAssistantClient(deps)).callService({
298
+ domain,
299
+ service,
300
+ ...(serviceData ? { serviceData } : {}),
301
+ ...(typeof input?.returnResponse === 'boolean' ? { returnResponse: input.returnResponse } : {}),
302
+ });
303
+ return { ok: true, result };
304
+ }
305
+ async function fireHomeAssistantEvent(deps, input) {
306
+ const eventType = readString(input?.eventType ?? input?.event_type);
307
+ if (!eventType)
308
+ return { ok: false, error: 'eventType is required.' };
309
+ const result = await (await createHomeAssistantClient(deps)).fireEvent(eventType, readRecord(input?.eventData ?? input?.event_data) ?? {});
310
+ return { ok: true, result };
311
+ }
312
+ async function renderHomeAssistantTemplate(deps, input) {
313
+ const template = readString(input?.template);
314
+ if (!template)
315
+ return { ok: false, error: 'template is required.' };
316
+ const rendered = await (await createHomeAssistantClient(deps)).renderTemplate(template, readRecord(input?.variables) ?? undefined);
317
+ return { ok: true, rendered };
318
+ }
319
+ async function publishGoodVibesEvent(deps, input) {
320
+ const body = readString(input?.body ?? input?.message ?? input?.text);
321
+ if (!body)
322
+ return { ok: false, error: 'body is required.' };
323
+ const eventType = readString(input?.eventType ?? input?.event_type)
324
+ ?? String(deps.configManager.get('surfaces.homeassistant.eventType') || HOME_ASSISTANT_DEFAULT_EVENT_TYPE);
325
+ const result = await (await createHomeAssistantClient(deps)).publishGoodVibesEvent(eventType, {
326
+ type: readString(input?.type) ?? 'message',
327
+ body,
328
+ title: readString(input?.title),
329
+ status: readString(input?.status),
330
+ metadata: readRecord(input?.metadata) ?? {},
331
+ });
332
+ return { ok: true, eventType, result };
333
+ }
334
+ async function resolveConfiguredSecret(deps, value) {
335
+ return resolveSecretInput(value, {
336
+ resolveLocalSecret: deps.secretsManager ? (key) => deps.secretsManager.get(key) : undefined,
337
+ homeDirectory: deps.secretsManager?.getGlobalHome?.() ?? undefined,
338
+ });
339
+ }
340
+ function action(surface, id, label, description, inputSchema, dangerous = false) {
341
+ return {
342
+ id,
343
+ surface,
344
+ label,
345
+ description,
346
+ dangerous,
347
+ ...(inputSchema ? { inputSchema } : {}),
348
+ metadata: { provider: 'homeassistant' },
349
+ };
350
+ }
351
+ function tool(surface, id, name, description, actionIds, inputSchema = { type: 'object', additionalProperties: false }) {
352
+ return {
353
+ id,
354
+ surface,
355
+ name,
356
+ description,
357
+ actionIds,
358
+ inputSchema,
359
+ metadata: { provider: 'homeassistant' },
360
+ };
361
+ }
362
+ function firstNonEmpty(...values) {
363
+ for (const value of values) {
364
+ if (typeof value === 'string' && value.trim().length > 0)
365
+ return value.trim();
366
+ }
367
+ return undefined;
368
+ }
369
+ function readString(value) {
370
+ return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
371
+ }
372
+ function readRecord(value) {
373
+ return value && typeof value === 'object' && !Array.isArray(value)
374
+ ? value
375
+ : undefined;
376
+ }
377
+ function clampLimit(value, fallback, max) {
378
+ const parsed = typeof value === 'number' ? value : typeof value === 'string' ? Number(value) : fallback;
379
+ return Math.max(1, Math.min(max, Number.isFinite(parsed) ? Math.trunc(parsed) : fallback));
380
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/plugins.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EACV,oBAAoB,EACpB,2BAA2B,EAC3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cAAc,KAAK,IAAI,CAC5D,aAAa,EACX,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,CAClB,CAAC;IACF,QAAQ,CAAC,iBAAiB,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAC3D,aAAa,EACX,kBAAkB,GAClB,sBAAsB,GACtB,qBAAqB,GACrB,6BAA6B,GAC7B,eAAe,GACf,sBAAsB,GACtB,qCAAqC,GACrC,aAAa,GACb,gBAAgB,CACnB,CAAC;IACF,QAAQ,CAAC,eAAe,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,4BAA4B,KAAK,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAC/I,QAAQ,CAAC,oBAAoB,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,4BAA4B,KAAK,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;IACpJ,QAAQ,CAAC,uBAAuB,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,oBAAoB,EAAE,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9I,QAAQ,CAAC,qBAAqB,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC;CAC9E;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,gCAAgC,GAAG,IAAI,CAyM7F"}
@@ -1,4 +1,4 @@
1
- import { handleBlueBubblesSurfaceWebhook, handleDiscordSurfaceWebhook, handleGenericWebhookSurface, handleGoogleChatSurfaceWebhook, handleIMessageSurfaceWebhook, handleMSTeamsSurfaceWebhook, handleMattermostSurfaceWebhook, handleMatrixSurfaceWebhook, handleNtfySurfaceWebhook, handleSignalSurfaceWebhook, handleSlackSurfaceWebhook, handleTelegramSurfaceWebhook, handleWhatsAppSurfaceWebhook, } from '../../adapters/index.js';
1
+ import { handleBlueBubblesSurfaceWebhook, handleDiscordSurfaceWebhook, handleGenericWebhookSurface, handleGoogleChatSurfaceWebhook, handleHomeAssistantSurfaceWebhook, handleIMessageSurfaceWebhook, handleMSTeamsSurfaceWebhook, handleMattermostSurfaceWebhook, handleMatrixSurfaceWebhook, handleNtfySurfaceWebhook, handleSignalSurfaceWebhook, handleSlackSurfaceWebhook, handleTelegramSurfaceWebhook, handleWhatsAppSurfaceWebhook, } from '../../adapters/index.js';
2
2
  export function registerBuiltinChannelPlugins(context) {
3
3
  context.deps.channelPlugins.register({
4
4
  id: 'surface:tui',
@@ -185,6 +185,7 @@ export function registerBuiltinChannelPlugins(context) {
185
185
  lookupDirectory: async (query, options) => context.lookupRouteDirectory('webhook', query, options),
186
186
  });
187
187
  registerRouterBackedPlugin(context, 'telegram', 'Telegram', ['ingress', 'egress', 'threaded_reply', 'interactive_actions', 'account_lifecycle', 'target_resolution', 'agent_tools'], '/webhook/telegram', handleTelegramSurfaceWebhook);
188
+ registerRouterBackedPlugin(context, 'homeassistant', 'Home Assistant', ['ingress', 'egress', 'threaded_reply', 'interactive_actions', 'session_binding', 'account_lifecycle', 'target_resolution', 'agent_tools'], '/webhook/homeassistant', handleHomeAssistantSurfaceWebhook);
188
189
  registerRouterBackedPlugin(context, 'google-chat', 'Google Chat', ['ingress', 'egress', 'threaded_reply', 'interactive_actions', 'account_lifecycle', 'target_resolution', 'agent_tools'], '/webhook/google-chat', handleGoogleChatSurfaceWebhook);
189
190
  registerRouterBackedPlugin(context, 'signal', 'Signal', ['ingress', 'egress', 'account_lifecycle', 'target_resolution', 'agent_tools'], '/webhook/signal', handleSignalSurfaceWebhook);
190
191
  registerRouterBackedPlugin(context, 'whatsapp', 'WhatsApp', ['ingress', 'egress', 'interactive_actions', 'account_lifecycle', 'target_resolution', 'agent_tools'], '/webhook/whatsapp', handleWhatsAppSurfaceWebhook);
@@ -1 +1 @@
1
- {"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,GAAG,mBAAmB,CAmChF;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAiCtE"}
1
+ {"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEvE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,GAAG,mBAAmB,CAqChF;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAmCtE"}
@@ -27,6 +27,8 @@ export function renderBuiltinPolicy(surface) {
27
27
  return { ...base, reasoningVisibility: 'suppress', format: 'plain', supportsThreads: false, maxChunkChars: 1_600 };
28
28
  case 'webhook':
29
29
  return { ...base, reasoningVisibility: 'private', format: 'json', supportsThreads: false, maxChunkChars: 12_000 };
30
+ case 'homeassistant':
31
+ return { ...base, reasoningVisibility: 'summary', format: 'json', supportsThreads: true, maxChunkChars: 8_000 };
30
32
  case 'signal':
31
33
  case 'whatsapp':
32
34
  case 'imessage':
@@ -48,6 +50,8 @@ export function surfaceLabelForBuiltin(surface) {
48
50
  return 'ntfy';
49
51
  case 'webhook':
50
52
  return 'Generic webhook';
53
+ case 'homeassistant':
54
+ return 'Home Assistant';
51
55
  case 'telegram':
52
56
  return 'Telegram';
53
57
  case 'google-chat':
@@ -1 +1 @@
1
- {"version":3,"file":"setup-schema.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/setup-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,kBAAkB,EAClB,cAAc,EACf,MAAM,aAAa,CAAC;AAMrB,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,kBAAkB,CA6cjF"}
1
+ {"version":3,"file":"setup-schema.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/setup-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,kBAAkB,EAClB,cAAc,EACf,MAAM,aAAa,CAAC;AAUrB,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,kBAAkB,CA0fjF"}
@@ -1,4 +1,5 @@
1
1
  import { CHANNEL_SETUP_VERSION, DEFAULT_SECRET_BACKENDS, } from './shared.js';
2
+ import { HOME_ASSISTANT_DEFAULT_EVENT_TYPE, HOME_ASSISTANT_WEBHOOK_PATH, } from './homeassistant.js';
2
3
  export function getBuiltinSetupSchema(surface) {
3
4
  switch (surface) {
4
5
  case 'tui':
@@ -167,6 +168,51 @@ export function getBuiltinSetupSchema(surface) {
167
168
  ],
168
169
  metadata: {},
169
170
  };
171
+ case 'homeassistant':
172
+ return {
173
+ surface,
174
+ version: CHANNEL_SETUP_VERSION,
175
+ label: 'Home Assistant',
176
+ setupMode: 'bridge',
177
+ description: 'Home Assistant is a daemon/device surface with signed inbound callbacks, daemon event delivery, and Home Assistant REST-backed tools.',
178
+ fields: [
179
+ setupField('enabled', 'Enabled', 'boolean', false, { configKey: 'surfaces.homeassistant.enabled', defaultValue: false }),
180
+ setupField('instanceUrl', 'Instance URL', 'url', false, { configKey: 'surfaces.homeassistant.instanceUrl', placeholder: 'http://homeassistant.local:8123' }),
181
+ setupField('accessToken', 'Long-lived access token', 'secret', false, { configKey: 'surfaces.homeassistant.accessToken', secretTargetId: 'primary' }),
182
+ setupField('webhookSecret', 'Webhook secret', 'secret', true, { configKey: 'surfaces.homeassistant.webhookSecret', secretTargetId: 'signingSecret' }),
183
+ setupField('defaultConversationId', 'Default conversation id', 'string', false, { configKey: 'surfaces.homeassistant.defaultConversationId', defaultValue: 'goodvibes' }),
184
+ setupField('deviceId', 'Device id', 'string', false, { configKey: 'surfaces.homeassistant.deviceId', defaultValue: 'goodvibes-daemon' }),
185
+ setupField('deviceName', 'Device name', 'string', false, { configKey: 'surfaces.homeassistant.deviceName', defaultValue: 'GoodVibes Daemon' }),
186
+ setupField('eventType', 'Event type', 'string', false, { configKey: 'surfaces.homeassistant.eventType', defaultValue: HOME_ASSISTANT_DEFAULT_EVENT_TYPE }),
187
+ ],
188
+ secretTargets: [
189
+ secretTarget(surface, 'primary', 'Long-lived access token', false, 'Used by GoodVibes to read Home Assistant states, call services, render templates, and fire events.', {
190
+ serviceName: 'homeassistant',
191
+ serviceField: 'primary',
192
+ envKeys: ['HOMEASSISTANT_ACCESS_TOKEN', 'HOME_ASSISTANT_ACCESS_TOKEN', 'HA_ACCESS_TOKEN'],
193
+ configKeys: ['surfaces.homeassistant.accessToken'],
194
+ }),
195
+ secretTarget(surface, 'signingSecret', 'Webhook secret', true, 'Used to verify Home Assistant-originated callbacks before daemon auth is evaluated.', {
196
+ serviceName: 'homeassistant',
197
+ serviceField: 'signingSecret',
198
+ envKeys: ['HOMEASSISTANT_WEBHOOK_SECRET', 'HOME_ASSISTANT_WEBHOOK_SECRET', 'HA_GOODVIBES_WEBHOOK_SECRET'],
199
+ configKeys: ['surfaces.homeassistant.webhookSecret'],
200
+ }),
201
+ ],
202
+ externalSteps: [
203
+ 'Create the Home Assistant custom integration with config_flow enabled and a single config entry for this daemon.',
204
+ 'Configure the integration with the daemon base URL and operator bearer token.',
205
+ `Send Home Assistant-originated prompts to ${HOME_ASSISTANT_WEBHOOK_PATH} with x-goodvibes-homeassistant-secret or Authorization: Bearer <webhookSecret>.`,
206
+ 'Subscribe the Home Assistant integration to the configured GoodVibes event type to update entities and service-call responses.',
207
+ 'Use the channel tool catalog endpoints to expose daemon tools and agent tools as Home Assistant service actions.',
208
+ ],
209
+ metadata: {
210
+ protocolVersion: 1,
211
+ webhookPath: HOME_ASSISTANT_WEBHOOK_PATH,
212
+ eventTypeDefault: HOME_ASSISTANT_DEFAULT_EVENT_TYPE,
213
+ manifestAction: 'homeassistant-manifest',
214
+ },
215
+ };
170
216
  case 'telegram':
171
217
  return {
172
218
  surface,
@@ -10,7 +10,7 @@ import type { ChannelPolicyManager } from '../policy-manager.js';
10
10
  import type { ChannelPluginRegistry } from '../plugin-registry.js';
11
11
  import type { ChannelProviderRuntimeManager } from '../provider-runtime.js';
12
12
  import type { RouteBindingManager } from '../route-manager.js';
13
- export type ManagedSurface = 'slack' | 'discord' | 'ntfy' | 'webhook' | 'telegram' | 'google-chat' | 'signal' | 'whatsapp' | 'imessage' | 'msteams' | 'bluebubbles' | 'mattermost' | 'matrix';
13
+ export type ManagedSurface = 'slack' | 'discord' | 'ntfy' | 'webhook' | 'homeassistant' | 'telegram' | 'google-chat' | 'signal' | 'whatsapp' | 'imessage' | 'msteams' | 'bluebubbles' | 'mattermost' | 'matrix';
14
14
  export interface BuiltinChannelRuntimeDeps {
15
15
  readonly configManager: ConfigManager;
16
16
  readonly secretsManager: SecretsManager;
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,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BAAoB,EAAE,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3H;AAED,KAAK,oBAAoB,GAAG,MAAM,cAAc,CAAC;AAEjD,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,uBAAuB,0IAU1B,CAAC;AAEX,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,cAAc,GAAG,oBAAoB,CA+BrF"}
@@ -20,6 +20,8 @@ export function configSectionForSurface(surface) {
20
20
  return 'ntfy';
21
21
  case 'webhook':
22
22
  return 'webhook';
23
+ case 'homeassistant':
24
+ return 'homeassistant';
23
25
  case 'telegram':
24
26
  return 'telegram';
25
27
  case 'google-chat':
@@ -1 +1 @@
1
- {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,cAAc,GAAG,sBAAsB,GAAG,IAAI,CAE/F;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,IAAI,cAAc,CAcnF;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAE/G;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAI1E;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOlG;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOlG;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOpG;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAO9F"}
1
+ {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,cAAc,GAAG,sBAAsB,GAAG,IAAI,CAE/F;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,IAAI,cAAc,CAenF;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAE/G;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAI1E;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOlG;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOlG;AAED,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAOpG;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAO9F"}
@@ -7,6 +7,7 @@ export function isManagedSurface(surface) {
7
7
  || surface === 'discord'
8
8
  || surface === 'ntfy'
9
9
  || surface === 'webhook'
10
+ || surface === 'homeassistant'
10
11
  || surface === 'telegram'
11
12
  || surface === 'google-chat'
12
13
  || surface === 'signal'
@@ -1 +1 @@
1
- {"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/targets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,4BAA4B,EAE5B,qBAAqB,EACrB,cAAc,EACd,2BAA2B,EAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7E,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;CAC1C;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAsCvC;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,2BAA2B,GACpC,qBAAqB,GAAG,IAAI,CA0E9B;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,2BAA2B,GACpC,uBAAuB,CAUzB;AAED,wBAAsB,0CAA0C,CAC9D,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,SAAS,qBAAqB,EAAE,CAAC,CAe3C;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAIjF;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAWlC;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAkSlC"}
1
+ {"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["../../../../../src/_internal/platform/channels/builtin/targets.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,4BAA4B,EAE5B,qBAAqB,EACrB,cAAc,EACd,2BAA2B,EAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7E,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;CAC1C;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAsCvC;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,2BAA2B,GACpC,qBAAqB,GAAG,IAAI,CA0E9B;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,2BAA2B,GACpC,uBAAuB,CAUzB;AAED,wBAAsB,0CAA0C,CAC9D,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,SAAS,qBAAqB,EAAE,CAAC,CAe3C;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAIjF;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAWlC;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,4BAA4B,GACrC,OAAO,CAAC,qBAAqB,EAAE,CAAC,CA2TlC"}
@@ -298,6 +298,30 @@ export async function lookupBuiltinProviderDirectory(context, surface, query, op
298
298
  metadata: { provider: 'ntfy', baseUrl: context.deps.configManager.get('surfaces.ntfy.baseUrl') },
299
299
  }], needle, limit);
300
300
  }
301
+ if (surface === 'homeassistant') {
302
+ const conversationId = surfaces.homeassistant.defaultConversationId || surfaces.homeassistant.deviceId || 'goodvibes';
303
+ const candidates = [{
304
+ id: conversationId,
305
+ surface,
306
+ kind: 'service',
307
+ label: surfaces.homeassistant.deviceName || 'GoodVibes Daemon',
308
+ handle: conversationId,
309
+ groupId: conversationId,
310
+ isGroupConversation: false,
311
+ searchText: [
312
+ conversationId,
313
+ surfaces.homeassistant.deviceId,
314
+ surfaces.homeassistant.deviceName,
315
+ surfaces.homeassistant.instanceUrl,
316
+ ].filter(Boolean).join(' '),
317
+ metadata: {
318
+ provider: 'homeassistant',
319
+ instanceUrl: surfaces.homeassistant.instanceUrl,
320
+ eventType: surfaces.homeassistant.eventType,
321
+ },
322
+ }];
323
+ return filterProviderDirectory(candidates, needle, limit);
324
+ }
301
325
  if (surface === 'telegram') {
302
326
  const candidates = [];
303
327
  if (surfaces.telegram.defaultChatId) {
@@ -1 +1 @@
1
- {"version":3,"file":"builtin-runtime.d.ts","sourceRoot":"","sources":["../../../../src/_internal/platform/channels/builtin-runtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,oBAAoB,EAGpB,2BAA2B,EAI3B,+BAA+B,EAI/B,cAA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AE,OAAO,CAAC,GAC9B,OAAO,CAAC,OAAO,CAAC;IA6HnB,OAAO,CAAC,kBAAkB;IAe1B,OAAO,CAAC,cAAc;YAIR,iBAAiB;YAIjB,eAAe;YAIf,iBAAiB;YAIjB,gBAAgB;YAQhB,gBAAgB;YAIhB,aAAa;IAI3B,OAAO,CAAC,iBAAiB;YAyBX,kBAAkB;YAQlB,uBAAuB;IAYrC,OAAO,CAAC,cAAc;YAQR,gBAAgB;YAahB,oBAAoB;YAWpB,cAAc;IAQ5B,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,2BAA2B;YAOrB,aAAa;YAOb,mCAAmC;IAOjD,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,qBAAqB;YAIf,eAAe;YAQf,oBAAoB;CAOnC"}
@@ -1,6 +1,7 @@
1
1
  import { buildBuiltinAccount, resolveBuiltinAccount } from './builtin/accounts.js';
2
2
  import { buildBuiltinContractHooks, editBuiltinAllowlist, getBuiltinDoctorReport, getBuiltinLifecycleState, listBuiltinRepairActions, migrateBuiltinLifecycle, resolveBuiltinAllowlist, } from './builtin/contracts.js';
3
3
  import { listBuiltinCapabilities, listBuiltinOperatorActions, listBuiltinTools, } from './builtin/descriptors.js';
4
+ import { runHomeAssistantOperatorAction } from './builtin/homeassistant.js';
4
5
  import { getBuiltinSetupSchema } from './builtin/setup-schema.js';
5
6
  import { registerBuiltinChannelPlugins } from './builtin/plugins.js';
6
7
  import { authorizeBuiltinActorAction, runBuiltinAccountAction, runBuiltinProviderApi, } from './builtin/account-actions.js';
@@ -73,6 +74,11 @@ export class BuiltinChannelRuntime {
73
74
  return this.runOperatorAction(surface, actionId, input);
74
75
  }
75
76
  async runOperatorAction(surface, actionId, input) {
77
+ if (surface === 'homeassistant') {
78
+ const homeAssistantResult = await runHomeAssistantOperatorAction({ deps: this.deps }, actionId, input);
79
+ if (homeAssistantResult.handled)
80
+ return homeAssistantResult.result;
81
+ }
76
82
  if (actionId === 'inspect-account') {
77
83
  const accountId = typeof input?.accountId === 'string' ? input.accountId : undefined;
78
84
  return accountId ? this.resolveAccount(surface, accountId) : this.buildAccount(surface);