@elizaos/shared 2.0.0-alpha.538 → 2.0.11-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 (729) hide show
  1. package/api/agent-api-types.d.ts +210 -0
  2. package/api/agent-api-types.d.ts.map +1 -0
  3. package/api/agent-api-types.js +11 -0
  4. package/api/agent-api-types.js.map +1 -0
  5. package/api/http-helpers.d.ts +3 -0
  6. package/api/http-helpers.d.ts.map +1 -0
  7. package/api/http-helpers.js +2 -0
  8. package/api/http-helpers.js.map +1 -0
  9. package/api/route-helpers.d.ts +2 -0
  10. package/api/route-helpers.d.ts.map +1 -0
  11. package/api/route-helpers.js +2 -0
  12. package/api/route-helpers.js.map +1 -0
  13. package/app-hero-art.d.ts.map +1 -1
  14. package/app-hero-art.js +5 -13
  15. package/app-hero-art.js.map +1 -1
  16. package/brand/index.d.ts +130 -0
  17. package/brand/index.d.ts.map +1 -0
  18. package/brand/index.js +126 -0
  19. package/brand/index.js.map +1 -0
  20. package/brand-classic/index.d.ts +158 -0
  21. package/brand-classic/index.d.ts.map +1 -0
  22. package/brand-classic/index.js +91 -0
  23. package/brand-classic/index.js.map +1 -0
  24. package/character-language.d.ts +16 -0
  25. package/character-language.d.ts.map +1 -0
  26. package/character-language.js +58 -0
  27. package/character-language.js.map +1 -0
  28. package/{onboarding-presets.characters.d.ts → character-presets.characters.d.ts} +2 -2
  29. package/character-presets.characters.d.ts.map +1 -0
  30. package/{onboarding-presets.characters.js → character-presets.characters.js} +1 -1
  31. package/character-presets.characters.js.map +1 -0
  32. package/{onboarding-presets.d.ts → character-presets.d.ts} +7 -5
  33. package/character-presets.d.ts.map +1 -0
  34. package/{onboarding-presets.js → character-presets.js} +53 -58
  35. package/character-presets.js.map +1 -0
  36. package/{onboarding-presets.shared.d.ts → character-presets.shared.d.ts} +1 -1
  37. package/character-presets.shared.d.ts.map +1 -0
  38. package/{onboarding-presets.shared.js → character-presets.shared.js} +1 -1
  39. package/character-presets.shared.js.map +1 -0
  40. package/checkout/index.d.ts +48 -0
  41. package/checkout/index.d.ts.map +1 -0
  42. package/checkout/index.js +59 -0
  43. package/checkout/index.js.map +1 -0
  44. package/cli/parse-duration.d.ts +5 -0
  45. package/cli/parse-duration.d.ts.map +1 -0
  46. package/cli/parse-duration.js +26 -0
  47. package/cli/parse-duration.js.map +1 -0
  48. package/config/allowed-hosts.d.ts +8 -0
  49. package/config/allowed-hosts.d.ts.map +1 -0
  50. package/config/allowed-hosts.js +44 -0
  51. package/config/allowed-hosts.js.map +1 -0
  52. package/config/api-key-prefix-hints.d.ts +24 -0
  53. package/config/api-key-prefix-hints.d.ts.map +1 -0
  54. package/config/api-key-prefix-hints.js +26 -0
  55. package/config/api-key-prefix-hints.js.map +1 -0
  56. package/config/app-config.d.ts +274 -0
  57. package/config/app-config.d.ts.map +1 -0
  58. package/config/app-config.js +64 -0
  59. package/config/app-config.js.map +1 -0
  60. package/config/app-manifest.d.ts +75 -0
  61. package/config/app-manifest.d.ts.map +1 -0
  62. package/config/app-manifest.js +115 -0
  63. package/config/app-manifest.js.map +1 -0
  64. package/config/boot-config-store.d.ts +74 -0
  65. package/config/boot-config-store.d.ts.map +1 -0
  66. package/config/boot-config-store.js +121 -0
  67. package/config/boot-config-store.js.map +1 -0
  68. package/config/boot-config.d.ts +6 -0
  69. package/config/boot-config.d.ts.map +1 -0
  70. package/config/boot-config.js +6 -0
  71. package/config/boot-config.js.map +1 -0
  72. package/config/branding.d.ts +53 -0
  73. package/config/branding.d.ts.map +1 -0
  74. package/config/branding.js +23 -0
  75. package/config/branding.js.map +1 -0
  76. package/config/cloud-only.d.ts +8 -0
  77. package/config/cloud-only.d.ts.map +1 -0
  78. package/config/cloud-only.js +26 -0
  79. package/config/cloud-only.js.map +1 -0
  80. package/config/config-catalog.d.ts +371 -0
  81. package/config/config-catalog.d.ts.map +1 -0
  82. package/config/config-catalog.js +719 -0
  83. package/config/config-catalog.js.map +1 -0
  84. package/config/config-paths.d.ts +11 -0
  85. package/config/config-paths.d.ts.map +1 -0
  86. package/config/config-paths.js +74 -0
  87. package/config/config-paths.js.map +1 -0
  88. package/config/config.d.ts +11 -0
  89. package/config/config.d.ts.map +1 -0
  90. package/config/config.js +23 -0
  91. package/config/config.js.map +1 -0
  92. package/config/distribution-profile.d.ts +16 -0
  93. package/config/distribution-profile.d.ts.map +1 -0
  94. package/config/distribution-profile.js +29 -0
  95. package/config/distribution-profile.js.map +1 -0
  96. package/config/env-vars.d.ts +2 -0
  97. package/config/env-vars.d.ts.map +1 -0
  98. package/config/env-vars.js +2 -0
  99. package/config/env-vars.js.map +1 -0
  100. package/config/index.d.ts +12 -0
  101. package/config/index.d.ts.map +1 -0
  102. package/config/index.js +15 -0
  103. package/config/index.js.map +1 -0
  104. package/config/plugin-auto-enable-engine.d.ts +4 -0
  105. package/config/plugin-auto-enable-engine.d.ts.map +1 -0
  106. package/config/plugin-auto-enable-engine.js +45 -0
  107. package/config/plugin-auto-enable-engine.js.map +1 -0
  108. package/config/plugin-auto-enable.d.ts +2 -0
  109. package/config/plugin-auto-enable.d.ts.map +1 -0
  110. package/config/plugin-auto-enable.js +8 -0
  111. package/config/plugin-auto-enable.js.map +1 -0
  112. package/config/plugin-manifest.d.ts +89 -0
  113. package/config/plugin-manifest.d.ts.map +1 -0
  114. package/config/plugin-manifest.js +281 -0
  115. package/config/plugin-manifest.js.map +1 -0
  116. package/config/plugin-ui-spec.d.ts +42 -0
  117. package/config/plugin-ui-spec.d.ts.map +1 -0
  118. package/config/plugin-ui-spec.js +257 -0
  119. package/config/plugin-ui-spec.js.map +1 -0
  120. package/config/runtime-mode.d.ts +54 -0
  121. package/config/runtime-mode.d.ts.map +1 -0
  122. package/config/runtime-mode.js +107 -0
  123. package/config/runtime-mode.js.map +1 -0
  124. package/config/runtime-overrides.d.ts +16 -0
  125. package/config/runtime-overrides.d.ts.map +1 -0
  126. package/config/runtime-overrides.js +49 -0
  127. package/config/runtime-overrides.js.map +1 -0
  128. package/config/schema.d.ts +7 -0
  129. package/config/schema.d.ts.map +1 -0
  130. package/config/schema.js +30 -0
  131. package/config/schema.js.map +1 -0
  132. package/config/types.agent-defaults.d.ts +6 -1
  133. package/config/types.agent-defaults.d.ts.map +1 -1
  134. package/config/types.agents.d.ts +9 -4
  135. package/config/types.agents.d.ts.map +1 -1
  136. package/config/types.eliza.d.ts +27 -49
  137. package/config/types.eliza.d.ts.map +1 -1
  138. package/config/types.messages.d.ts +2 -2
  139. package/config/types.messages.d.ts.map +1 -1
  140. package/config/types.tools.d.ts +2 -2
  141. package/config/types.tools.d.ts.map +1 -1
  142. package/config/ui-spec.d.ts +164 -0
  143. package/config/ui-spec.d.ts.map +1 -0
  144. package/config/ui-spec.js +14 -0
  145. package/config/ui-spec.js.map +1 -0
  146. package/config/wechat-config.d.ts +2 -0
  147. package/config/wechat-config.d.ts.map +1 -0
  148. package/config/wechat-config.js +2 -0
  149. package/config/wechat-config.js.map +1 -0
  150. package/config/zod-schema.agent-runtime.d.ts +1087 -0
  151. package/config/zod-schema.agent-runtime.d.ts.map +1 -0
  152. package/config/zod-schema.agent-runtime.js +764 -0
  153. package/config/zod-schema.agent-runtime.js.map +1 -0
  154. package/config/zod-schema.core.d.ts +1048 -0
  155. package/config/zod-schema.core.d.ts.map +1 -0
  156. package/config/zod-schema.core.js +707 -0
  157. package/config/zod-schema.core.js.map +1 -0
  158. package/connector-cred-types.d.ts +3 -3
  159. package/connector-cred-types.js +4 -4
  160. package/connectors.d.ts +0 -8
  161. package/connectors.d.ts.map +1 -1
  162. package/connectors.js +26 -50
  163. package/connectors.js.map +1 -1
  164. package/contracts/agent-routes.d.ts +63 -0
  165. package/contracts/agent-routes.d.ts.map +1 -0
  166. package/contracts/agent-routes.js +55 -0
  167. package/contracts/agent-routes.js.map +1 -0
  168. package/contracts/app-permissions-routes.d.ts +148 -0
  169. package/contracts/app-permissions-routes.d.ts.map +1 -0
  170. package/contracts/app-permissions-routes.js +96 -0
  171. package/contracts/app-permissions-routes.js.map +1 -0
  172. package/contracts/app-permissions.d.ts +122 -0
  173. package/contracts/app-permissions.d.ts.map +1 -0
  174. package/contracts/app-permissions.js +163 -0
  175. package/contracts/app-permissions.js.map +1 -0
  176. package/contracts/apps-favorites-routes.d.ts +44 -0
  177. package/contracts/apps-favorites-routes.d.ts.map +1 -0
  178. package/contracts/apps-favorites-routes.js +48 -0
  179. package/contracts/apps-favorites-routes.js.map +1 -0
  180. package/contracts/apps-lifecycle-routes.d.ts +185 -0
  181. package/contracts/apps-lifecycle-routes.d.ts.map +1 -0
  182. package/contracts/apps-lifecycle-routes.js +204 -0
  183. package/contracts/apps-lifecycle-routes.js.map +1 -0
  184. package/contracts/apps-loading-routes.d.ts +64 -0
  185. package/contracts/apps-loading-routes.d.ts.map +1 -0
  186. package/contracts/apps-loading-routes.js +65 -0
  187. package/contracts/apps-loading-routes.js.map +1 -0
  188. package/contracts/apps-runs-routes.d.ts +33 -0
  189. package/contracts/apps-runs-routes.d.ts.map +1 -0
  190. package/contracts/apps-runs-routes.js +38 -0
  191. package/contracts/apps-runs-routes.js.map +1 -0
  192. package/contracts/apps.d.ts +883 -3
  193. package/contracts/apps.d.ts.map +1 -1
  194. package/contracts/apps.js +278 -40
  195. package/contracts/apps.js.map +1 -1
  196. package/contracts/auth-routes.d.ts +23 -0
  197. package/contracts/auth-routes.d.ts.map +1 -0
  198. package/contracts/auth-routes.js +25 -0
  199. package/contracts/auth-routes.js.map +1 -0
  200. package/contracts/awareness.d.ts +1 -1
  201. package/contracts/calendar.d.ts +181 -0
  202. package/contracts/calendar.d.ts.map +1 -0
  203. package/contracts/calendar.js +19 -0
  204. package/contracts/calendar.js.map +1 -0
  205. package/contracts/character-routes.d.ts +70 -0
  206. package/contracts/character-routes.d.ts.map +1 -0
  207. package/contracts/character-routes.js +49 -0
  208. package/contracts/character-routes.js.map +1 -0
  209. package/contracts/cloud-coding-containers.d.ts +432 -0
  210. package/contracts/cloud-coding-containers.d.ts.map +1 -0
  211. package/contracts/cloud-coding-containers.js +135 -0
  212. package/contracts/cloud-coding-containers.js.map +1 -0
  213. package/contracts/cloud-topology.js +7 -7
  214. package/contracts/cloud-topology.js.map +1 -1
  215. package/contracts/config.d.ts +52 -4
  216. package/contracts/config.d.ts.map +1 -1
  217. package/contracts/connector-routes.d.ts +39 -0
  218. package/contracts/connector-routes.d.ts.map +1 -0
  219. package/contracts/connector-routes.js +50 -0
  220. package/contracts/connector-routes.js.map +1 -0
  221. package/contracts/content-pack.d.ts +2 -2
  222. package/contracts/content-pack.d.ts.map +1 -1
  223. package/contracts/content-pack.js +1 -1
  224. package/contracts/conversation-routes.d.ts +195 -0
  225. package/contracts/conversation-routes.d.ts.map +1 -0
  226. package/contracts/conversation-routes.js +107 -0
  227. package/contracts/conversation-routes.js.map +1 -0
  228. package/contracts/diagnostics-routes.d.ts +33 -0
  229. package/contracts/diagnostics-routes.d.ts.map +1 -0
  230. package/contracts/diagnostics-routes.js +26 -0
  231. package/contracts/diagnostics-routes.js.map +1 -0
  232. package/contracts/feature-result.d.ts +24 -0
  233. package/contracts/feature-result.d.ts.map +1 -0
  234. package/contracts/feature-result.js +7 -0
  235. package/contracts/feature-result.js.map +1 -0
  236. package/contracts/{onboarding.d.ts → first-run-options.d.ts} +172 -69
  237. package/contracts/first-run-options.d.ts.map +1 -0
  238. package/contracts/{onboarding.js → first-run-options.js} +222 -91
  239. package/contracts/first-run-options.js.map +1 -0
  240. package/contracts/first-run-routes.d.ts +167 -0
  241. package/contracts/first-run-routes.d.ts.map +1 -0
  242. package/contracts/first-run-routes.js +115 -0
  243. package/contracts/first-run-routes.js.map +1 -0
  244. package/contracts/health.d.ts +30 -0
  245. package/contracts/health.d.ts.map +1 -0
  246. package/contracts/health.js +29 -0
  247. package/contracts/health.js.map +1 -0
  248. package/contracts/inbox-routes.d.ts +37 -0
  249. package/contracts/inbox-routes.d.ts.map +1 -0
  250. package/contracts/inbox-routes.js +44 -0
  251. package/contracts/inbox-routes.js.map +1 -0
  252. package/contracts/index.d.ts +30 -3
  253. package/contracts/index.d.ts.map +1 -1
  254. package/contracts/index.js +30 -3
  255. package/contracts/index.js.map +1 -1
  256. package/contracts/memory-routes.d.ts +27 -0
  257. package/contracts/memory-routes.d.ts.map +1 -0
  258. package/contracts/memory-routes.js +23 -0
  259. package/contracts/memory-routes.js.map +1 -0
  260. package/contracts/misc-routes.d.ts +192 -0
  261. package/contracts/misc-routes.d.ts.map +1 -0
  262. package/contracts/misc-routes.js +155 -0
  263. package/contracts/misc-routes.js.map +1 -0
  264. package/contracts/permissions-routes.d.ts +31 -0
  265. package/contracts/permissions-routes.d.ts.map +1 -0
  266. package/contracts/permissions-routes.js +34 -0
  267. package/contracts/permissions-routes.js.map +1 -0
  268. package/contracts/permissions.d.ts +81 -11
  269. package/contracts/permissions.d.ts.map +1 -1
  270. package/contracts/permissions.js +37 -1
  271. package/contracts/permissions.js.map +1 -1
  272. package/contracts/{lifeops.d.ts → personal-assistant.d.ts} +368 -170
  273. package/contracts/personal-assistant.d.ts.map +1 -0
  274. package/contracts/{lifeops.js → personal-assistant.js} +39 -13
  275. package/contracts/personal-assistant.js.map +1 -0
  276. package/contracts/plugin-routes.d.ts +105 -0
  277. package/contracts/plugin-routes.d.ts.map +1 -0
  278. package/contracts/plugin-routes.js +81 -0
  279. package/contracts/plugin-routes.js.map +1 -0
  280. package/contracts/relationships-routes.d.ts +23 -0
  281. package/contracts/relationships-routes.d.ts.map +1 -0
  282. package/contracts/relationships-routes.js +22 -0
  283. package/contracts/relationships-routes.js.map +1 -0
  284. package/contracts/service-routing.d.ts +7 -121
  285. package/contracts/service-routing.d.ts.map +1 -1
  286. package/contracts/service-routing.js +19 -12
  287. package/contracts/service-routing.js.map +1 -1
  288. package/contracts/skills-routes.d.ts +116 -0
  289. package/contracts/skills-routes.d.ts.map +1 -0
  290. package/contracts/skills-routes.js +115 -0
  291. package/contracts/skills-routes.js.map +1 -0
  292. package/contracts/subscription-routes.d.ts +47 -0
  293. package/contracts/subscription-routes.d.ts.map +1 -0
  294. package/contracts/subscription-routes.js +50 -0
  295. package/contracts/subscription-routes.js.map +1 -0
  296. package/contracts/tail-routes.d.ts +78 -0
  297. package/contracts/tail-routes.d.ts.map +1 -0
  298. package/contracts/tail-routes.js +63 -0
  299. package/contracts/tail-routes.js.map +1 -0
  300. package/contracts/theme.d.ts +0 -2
  301. package/contracts/theme.d.ts.map +1 -1
  302. package/contracts/theme.js +0 -2
  303. package/contracts/theme.js.map +1 -1
  304. package/contracts/update-status.d.ts +100 -0
  305. package/contracts/update-status.d.ts.map +1 -0
  306. package/contracts/update-status.js +45 -0
  307. package/contracts/update-status.js.map +1 -0
  308. package/contracts/wallet-routes.d.ts +82 -0
  309. package/contracts/wallet-routes.d.ts.map +1 -0
  310. package/contracts/wallet-routes.js +49 -0
  311. package/contracts/wallet-routes.js.map +1 -0
  312. package/contracts/wallet.d.ts +12 -570
  313. package/contracts/wallet.d.ts.map +1 -1
  314. package/contracts/wallet.js +139 -0
  315. package/contracts/wallet.js.map +1 -1
  316. package/contracts/workbench-routes.d.ts +231 -0
  317. package/contracts/workbench-routes.d.ts.map +1 -0
  318. package/contracts/workbench-routes.js +183 -0
  319. package/contracts/workbench-routes.js.map +1 -0
  320. package/db/drizzle-database.d.ts +13 -0
  321. package/db/drizzle-database.d.ts.map +1 -0
  322. package/db/drizzle-database.js +2 -0
  323. package/db/drizzle-database.js.map +1 -0
  324. package/dev-settings-banner-style.d.ts +1 -1
  325. package/dev-settings-banner-style.js +2 -2
  326. package/dev-settings-banner-style.js.map +1 -1
  327. package/dev-settings-figlet-heading.d.ts.map +1 -1
  328. package/dev-settings-figlet-heading.js +1 -8
  329. package/dev-settings-figlet-heading.js.map +1 -1
  330. package/elizacloud/base-url.d.ts +6 -0
  331. package/elizacloud/base-url.d.ts.map +1 -0
  332. package/elizacloud/base-url.js +65 -0
  333. package/elizacloud/base-url.js.map +1 -0
  334. package/elizacloud/cloud-provisioning.d.ts +9 -0
  335. package/elizacloud/cloud-provisioning.d.ts.map +1 -0
  336. package/elizacloud/cloud-provisioning.js +25 -0
  337. package/elizacloud/cloud-provisioning.js.map +1 -0
  338. package/elizacloud/cloud-secrets.d.ts +23 -0
  339. package/elizacloud/cloud-secrets.d.ts.map +1 -0
  340. package/elizacloud/cloud-secrets.js +51 -0
  341. package/elizacloud/cloud-secrets.js.map +1 -0
  342. package/elizacloud/index.d.ts +6 -0
  343. package/elizacloud/index.d.ts.map +1 -0
  344. package/elizacloud/index.js +6 -0
  345. package/elizacloud/index.js.map +1 -0
  346. package/elizacloud/is-cloud-reachable.d.ts +19 -0
  347. package/elizacloud/is-cloud-reachable.d.ts.map +1 -0
  348. package/elizacloud/is-cloud-reachable.js +44 -0
  349. package/elizacloud/is-cloud-reachable.js.map +1 -0
  350. package/elizacloud/server-cloud-tts.d.ts +21 -0
  351. package/elizacloud/server-cloud-tts.d.ts.map +1 -0
  352. package/elizacloud/server-cloud-tts.js +293 -0
  353. package/elizacloud/server-cloud-tts.js.map +1 -0
  354. package/email-classification/email-classifier.d.ts +57 -0
  355. package/email-classification/email-classifier.d.ts.map +1 -0
  356. package/email-classification/email-classifier.js +348 -0
  357. package/email-classification/email-classifier.js.map +1 -0
  358. package/email-classification/index.d.ts +12 -0
  359. package/email-classification/index.d.ts.map +1 -0
  360. package/email-classification/index.js +12 -0
  361. package/email-classification/index.js.map +1 -0
  362. package/email-classification/wrap-untrusted-email-content.d.ts +15 -0
  363. package/email-classification/wrap-untrusted-email-content.d.ts.map +1 -0
  364. package/email-classification/wrap-untrusted-email-content.js +24 -0
  365. package/email-classification/wrap-untrusted-email-content.js.map +1 -0
  366. package/env-utils.d.ts +1 -4
  367. package/env-utils.d.ts.map +1 -1
  368. package/env-utils.js +9 -1
  369. package/env-utils.js.map +1 -1
  370. package/events/index.d.ts +68 -0
  371. package/events/index.d.ts.map +1 -0
  372. package/events/index.js +53 -0
  373. package/events/index.js.map +1 -0
  374. package/hardware-catalog/index.d.ts +204 -0
  375. package/hardware-catalog/index.d.ts.map +1 -0
  376. package/hardware-catalog/index.js +174 -0
  377. package/hardware-catalog/index.js.map +1 -0
  378. package/i18n/generated/validation-keyword-data.d.ts +2711 -748
  379. package/i18n/generated/validation-keyword-data.d.ts.map +1 -1
  380. package/i18n/generated/validation-keyword-data.js +2711 -748
  381. package/i18n/generated/validation-keyword-data.js.map +1 -1
  382. package/i18n/keyword-matching.d.ts.map +1 -1
  383. package/i18n/keyword-matching.js +4 -1
  384. package/i18n/keyword-matching.js.map +1 -1
  385. package/index.d.ts +82 -7
  386. package/index.d.ts.map +1 -1
  387. package/index.js +109 -13
  388. package/index.js.map +1 -1
  389. package/knowledge-graph/entity-types.d.ts +135 -0
  390. package/knowledge-graph/entity-types.d.ts.map +1 -0
  391. package/knowledge-graph/entity-types.js +75 -0
  392. package/knowledge-graph/entity-types.js.map +1 -0
  393. package/knowledge-graph/index.d.ts +13 -0
  394. package/knowledge-graph/index.d.ts.map +1 -0
  395. package/knowledge-graph/index.js +13 -0
  396. package/knowledge-graph/index.js.map +1 -0
  397. package/knowledge-graph/merge.d.ts +76 -0
  398. package/knowledge-graph/merge.d.ts.map +1 -0
  399. package/knowledge-graph/merge.js +175 -0
  400. package/knowledge-graph/merge.js.map +1 -0
  401. package/knowledge-graph/relationship-types.d.ts +105 -0
  402. package/knowledge-graph/relationship-types.d.ts.map +1 -0
  403. package/knowledge-graph/relationship-types.js +114 -0
  404. package/knowledge-graph/relationship-types.js.map +1 -0
  405. package/lifeops-constants/index.d.ts +9 -0
  406. package/lifeops-constants/index.d.ts.map +1 -0
  407. package/lifeops-constants/index.js +9 -0
  408. package/lifeops-constants/index.js.map +1 -0
  409. package/lifeops-constants/service-constants.d.ts +79 -0
  410. package/lifeops-constants/service-constants.d.ts.map +1 -0
  411. package/lifeops-constants/service-constants.js +123 -0
  412. package/lifeops-constants/service-constants.js.map +1 -0
  413. package/lifeops-normalize/index.d.ts +12 -0
  414. package/lifeops-normalize/index.d.ts.map +1 -0
  415. package/lifeops-normalize/index.js +12 -0
  416. package/lifeops-normalize/index.js.map +1 -0
  417. package/lifeops-normalize/service-error.d.ts +14 -0
  418. package/lifeops-normalize/service-error.d.ts.map +1 -0
  419. package/lifeops-normalize/service-error.js +19 -0
  420. package/lifeops-normalize/service-error.js.map +1 -0
  421. package/lifeops-normalize/service-normalize.d.ts +38 -0
  422. package/lifeops-normalize/service-normalize.d.ts.map +1 -0
  423. package/lifeops-normalize/service-normalize.js +205 -0
  424. package/lifeops-normalize/service-normalize.js.map +1 -0
  425. package/lifeops-normalize/time-zone.d.ts +12 -0
  426. package/lifeops-normalize/time-zone.d.ts.map +1 -0
  427. package/lifeops-normalize/time-zone.js +29 -0
  428. package/lifeops-normalize/time-zone.js.map +1 -0
  429. package/local-inference/catalog.d.ts +97 -0
  430. package/local-inference/catalog.d.ts.map +1 -0
  431. package/local-inference/catalog.js +547 -0
  432. package/local-inference/catalog.js.map +1 -0
  433. package/local-inference/gpu-profiles.d.ts +110 -0
  434. package/local-inference/gpu-profiles.d.ts.map +1 -0
  435. package/local-inference/gpu-profiles.js +214 -0
  436. package/local-inference/gpu-profiles.js.map +1 -0
  437. package/local-inference/index.d.ts +21 -0
  438. package/local-inference/index.d.ts.map +1 -0
  439. package/local-inference/index.js +18 -0
  440. package/local-inference/index.js.map +1 -0
  441. package/local-inference/manifest-signature.d.ts +61 -0
  442. package/local-inference/manifest-signature.d.ts.map +1 -0
  443. package/local-inference/manifest-signature.js +129 -0
  444. package/local-inference/manifest-signature.js.map +1 -0
  445. package/local-inference/network-policy.d.ts +115 -0
  446. package/local-inference/network-policy.d.ts.map +1 -0
  447. package/local-inference/network-policy.js +154 -0
  448. package/local-inference/network-policy.js.map +1 -0
  449. package/local-inference/paths.d.ts +24 -0
  450. package/local-inference/paths.d.ts.map +1 -0
  451. package/local-inference/paths.js +40 -0
  452. package/local-inference/paths.js.map +1 -0
  453. package/local-inference/providers-types.d.ts +56 -0
  454. package/local-inference/providers-types.d.ts.map +1 -0
  455. package/local-inference/providers-types.js +19 -0
  456. package/local-inference/providers-types.js.map +1 -0
  457. package/local-inference/routing-preferences.d.ts +31 -0
  458. package/local-inference/routing-preferences.d.ts.map +1 -0
  459. package/local-inference/routing-preferences.js +73 -0
  460. package/local-inference/routing-preferences.js.map +1 -0
  461. package/local-inference/throughput.d.ts +74 -0
  462. package/local-inference/throughput.d.ts.map +1 -0
  463. package/local-inference/throughput.js +84 -0
  464. package/local-inference/throughput.js.map +1 -0
  465. package/local-inference/types.d.ts +510 -0
  466. package/local-inference/types.d.ts.map +1 -0
  467. package/local-inference/types.js +22 -0
  468. package/local-inference/types.js.map +1 -0
  469. package/local-inference/verify.d.ts +39 -0
  470. package/local-inference/verify.d.ts.map +1 -0
  471. package/local-inference/verify.js +105 -0
  472. package/local-inference/verify.js.map +1 -0
  473. package/local-inference/voice-models.d.ts +156 -0
  474. package/local-inference/voice-models.d.ts.map +1 -0
  475. package/local-inference/voice-models.js +746 -0
  476. package/local-inference/voice-models.js.map +1 -0
  477. package/local-inference-gpu/gpu-overrides.d.ts +97 -0
  478. package/local-inference-gpu/gpu-overrides.d.ts.map +1 -0
  479. package/local-inference-gpu/gpu-overrides.js +76 -0
  480. package/local-inference-gpu/gpu-overrides.js.map +1 -0
  481. package/local-inference-gpu/gpu-profile-loader.d.ts +83 -0
  482. package/local-inference-gpu/gpu-profile-loader.d.ts.map +1 -0
  483. package/local-inference-gpu/gpu-profile-loader.js +196 -0
  484. package/local-inference-gpu/gpu-profile-loader.js.map +1 -0
  485. package/local-inference-gpu/gpu-profile-schema.d.ts +208 -0
  486. package/local-inference-gpu/gpu-profile-schema.d.ts.map +1 -0
  487. package/local-inference-gpu/gpu-profile-schema.js +123 -0
  488. package/local-inference-gpu/gpu-profile-schema.js.map +1 -0
  489. package/local-inference-gpu/gpu-tier-detect.d.ts +61 -0
  490. package/local-inference-gpu/gpu-tier-detect.d.ts.map +1 -0
  491. package/local-inference-gpu/gpu-tier-detect.js +93 -0
  492. package/local-inference-gpu/gpu-tier-detect.js.map +1 -0
  493. package/local-inference-gpu/gpu-tier-profiles.d.ts +110 -0
  494. package/local-inference-gpu/gpu-tier-profiles.d.ts.map +1 -0
  495. package/local-inference-gpu/gpu-tier-profiles.js +235 -0
  496. package/local-inference-gpu/gpu-tier-profiles.js.map +1 -0
  497. package/package.json +111 -160
  498. package/platform/is-native-server.d.ts +9 -0
  499. package/platform/is-native-server.d.ts.map +1 -0
  500. package/platform/is-native-server.js +12 -0
  501. package/platform/is-native-server.js.map +1 -0
  502. package/restart.d.ts +2 -1
  503. package/restart.d.ts.map +1 -1
  504. package/restart.js +3 -2
  505. package/restart.js.map +1 -1
  506. package/runtime-env.d.ts +2 -2
  507. package/runtime-env.d.ts.map +1 -1
  508. package/runtime-env.js +15 -7
  509. package/runtime-env.js.map +1 -1
  510. package/self-edit.d.ts +4 -4
  511. package/self-edit.d.ts.map +1 -1
  512. package/self-edit.js +5 -5
  513. package/self-edit.js.map +1 -1
  514. package/settings-debug.d.ts.map +1 -1
  515. package/settings-debug.js +45 -38
  516. package/settings-debug.js.map +1 -1
  517. package/spoken-text.d.ts.map +1 -1
  518. package/spoken-text.js +3 -2
  519. package/spoken-text.js.map +1 -1
  520. package/steward-session-client/index.d.ts +172 -0
  521. package/steward-session-client/index.d.ts.map +1 -0
  522. package/steward-session-client/index.js +248 -0
  523. package/steward-session-client/index.js.map +1 -0
  524. package/steward-session-client/steward-oauth-pkce.d.ts +24 -0
  525. package/steward-session-client/steward-oauth-pkce.d.ts.map +1 -0
  526. package/steward-session-client/steward-oauth-pkce.js +105 -0
  527. package/steward-session-client/steward-oauth-pkce.js.map +1 -0
  528. package/terminal/links.d.ts +9 -0
  529. package/terminal/links.d.ts.map +1 -0
  530. package/terminal/links.js +21 -0
  531. package/terminal/links.js.map +1 -0
  532. package/terminal/palette.d.ts +11 -0
  533. package/terminal/palette.d.ts.map +1 -0
  534. package/terminal/palette.js +13 -0
  535. package/terminal/palette.js.map +1 -0
  536. package/terminal/theme.d.ts +17 -0
  537. package/terminal/theme.d.ts.map +1 -0
  538. package/terminal/theme.js +25 -0
  539. package/terminal/theme.js.map +1 -0
  540. package/test-support/process-helpers.d.ts +13 -0
  541. package/test-support/process-helpers.d.ts.map +1 -0
  542. package/test-support/process-helpers.js +24 -0
  543. package/test-support/process-helpers.js.map +1 -0
  544. package/test-support/test-helpers.d.ts +79 -0
  545. package/test-support/test-helpers.d.ts.map +1 -0
  546. package/test-support/test-helpers.js +341 -0
  547. package/test-support/test-helpers.js.map +1 -0
  548. package/transcripts.d.ts +111 -0
  549. package/transcripts.d.ts.map +1 -0
  550. package/transcripts.js +106 -0
  551. package/transcripts.js.map +1 -0
  552. package/type-guards.d.ts +1 -23
  553. package/type-guards.d.ts.map +1 -1
  554. package/type-guards.js +6 -23
  555. package/type-guards.js.map +1 -1
  556. package/types/index.d.ts +654 -0
  557. package/types/index.d.ts.map +1 -0
  558. package/types/index.js +5 -0
  559. package/types/index.js.map +1 -0
  560. package/utils/asset-url.d.ts +24 -0
  561. package/utils/asset-url.d.ts.map +1 -0
  562. package/utils/asset-url.js +151 -0
  563. package/utils/asset-url.js.map +1 -0
  564. package/utils/assistant-text.d.ts +13 -0
  565. package/utils/assistant-text.d.ts.map +1 -0
  566. package/utils/assistant-text.js +292 -0
  567. package/utils/assistant-text.js.map +1 -0
  568. package/utils/browser-tab-kit-types.d.ts +81 -0
  569. package/utils/browser-tab-kit-types.d.ts.map +1 -0
  570. package/utils/browser-tab-kit-types.js +23 -0
  571. package/utils/browser-tab-kit-types.js.map +1 -0
  572. package/utils/browser-tabs-renderer-registry.d.ts +56 -0
  573. package/utils/browser-tabs-renderer-registry.d.ts.map +1 -0
  574. package/utils/browser-tabs-renderer-registry.js +1282 -0
  575. package/utils/browser-tabs-renderer-registry.js.map +1 -0
  576. package/utils/character-message-examples.d.ts +7 -0
  577. package/utils/character-message-examples.d.ts.map +1 -0
  578. package/utils/character-message-examples.js +123 -0
  579. package/utils/character-message-examples.js.map +1 -0
  580. package/utils/cloud-status.d.ts +3 -0
  581. package/utils/cloud-status.d.ts.map +1 -0
  582. package/utils/cloud-status.js +11 -0
  583. package/utils/cloud-status.js.map +1 -0
  584. package/utils/documents-upload-image.d.ts +27 -0
  585. package/utils/documents-upload-image.d.ts.map +1 -0
  586. package/utils/documents-upload-image.js +147 -0
  587. package/utils/documents-upload-image.js.map +1 -0
  588. package/utils/eliza-cloud-model-route.d.ts +3 -0
  589. package/utils/eliza-cloud-model-route.d.ts.map +1 -0
  590. package/utils/eliza-cloud-model-route.js +10 -0
  591. package/utils/eliza-cloud-model-route.js.map +1 -0
  592. package/utils/eliza-globals.d.ts +13 -0
  593. package/utils/eliza-globals.d.ts.map +1 -0
  594. package/utils/eliza-globals.js +49 -0
  595. package/utils/eliza-globals.js.map +1 -0
  596. package/utils/eliza-root.d.ts +9 -0
  597. package/utils/eliza-root.d.ts.map +1 -0
  598. package/utils/eliza-root.js +102 -0
  599. package/utils/eliza-root.js.map +1 -0
  600. package/utils/env.d.ts +34 -0
  601. package/utils/env.d.ts.map +1 -0
  602. package/utils/env.js +142 -0
  603. package/utils/env.js.map +1 -0
  604. package/utils/errors.d.ts +13 -0
  605. package/utils/errors.d.ts.map +1 -0
  606. package/utils/errors.js +26 -0
  607. package/utils/errors.js.map +1 -0
  608. package/utils/exec-safety.d.ts +2 -0
  609. package/utils/exec-safety.d.ts.map +1 -0
  610. package/utils/exec-safety.js +25 -0
  611. package/utils/exec-safety.js.map +1 -0
  612. package/utils/format.d.ts +85 -0
  613. package/utils/format.d.ts.map +1 -0
  614. package/utils/format.js +140 -0
  615. package/utils/format.js.map +1 -0
  616. package/utils/labels.d.ts +6 -0
  617. package/utils/labels.d.ts.map +1 -0
  618. package/utils/labels.js +42 -0
  619. package/utils/labels.js.map +1 -0
  620. package/utils/log-prefix.d.ts +2 -0
  621. package/utils/log-prefix.d.ts.map +1 -0
  622. package/utils/log-prefix.js +44 -0
  623. package/utils/log-prefix.js.map +1 -0
  624. package/utils/name-tokens.d.ts +24 -0
  625. package/utils/name-tokens.d.ts.map +1 -0
  626. package/utils/name-tokens.js +37 -0
  627. package/utils/name-tokens.js.map +1 -0
  628. package/utils/namespace-defaults.d.ts +10 -0
  629. package/utils/namespace-defaults.d.ts.map +1 -0
  630. package/utils/namespace-defaults.js +17 -0
  631. package/utils/namespace-defaults.js.map +1 -0
  632. package/utils/number-parsing.d.ts +26 -0
  633. package/utils/number-parsing.d.ts.map +1 -0
  634. package/utils/number-parsing.js +57 -0
  635. package/utils/number-parsing.js.map +1 -0
  636. package/utils/owner-name.d.ts +3 -0
  637. package/utils/owner-name.d.ts.map +1 -0
  638. package/utils/owner-name.js +8 -0
  639. package/utils/owner-name.js.map +1 -0
  640. package/utils/permission-deep-links.d.ts +35 -0
  641. package/utils/permission-deep-links.d.ts.map +1 -0
  642. package/utils/permission-deep-links.js +95 -0
  643. package/utils/permission-deep-links.js.map +1 -0
  644. package/utils/rate-limiter.d.ts +32 -0
  645. package/utils/rate-limiter.d.ts.map +1 -0
  646. package/utils/rate-limiter.js +53 -0
  647. package/utils/rate-limiter.js.map +1 -0
  648. package/utils/serialise.d.ts +12 -0
  649. package/utils/serialise.d.ts.map +1 -0
  650. package/utils/serialise.js +22 -0
  651. package/utils/serialise.js.map +1 -0
  652. package/utils/sql-compat.d.ts +10 -0
  653. package/utils/sql-compat.d.ts.map +1 -0
  654. package/utils/sql-compat.js +112 -0
  655. package/utils/sql-compat.js.map +1 -0
  656. package/utils/streaming-text.d.ts +9 -0
  657. package/utils/streaming-text.d.ts.map +1 -0
  658. package/utils/streaming-text.js +116 -0
  659. package/utils/streaming-text.js.map +1 -0
  660. package/utils/subscription-auth.d.ts +9 -0
  661. package/utils/subscription-auth.d.ts.map +1 -0
  662. package/utils/subscription-auth.js +49 -0
  663. package/utils/subscription-auth.js.map +1 -0
  664. package/utils/trajectory-format.d.ts +6 -0
  665. package/utils/trajectory-format.d.ts.map +1 -0
  666. package/utils/trajectory-format.js +44 -0
  667. package/utils/trajectory-format.js.map +1 -0
  668. package/utils/tts-debug.d.ts +10 -0
  669. package/utils/tts-debug.d.ts.map +1 -0
  670. package/utils/tts-debug.js +73 -0
  671. package/utils/tts-debug.js.map +1 -0
  672. package/view-hero-art.d.ts +75 -0
  673. package/view-hero-art.d.ts.map +1 -0
  674. package/view-hero-art.js +360 -0
  675. package/view-hero-art.js.map +1 -0
  676. package/voice/first-sentence-snip.d.ts +68 -0
  677. package/voice/first-sentence-snip.d.ts.map +1 -0
  678. package/voice/first-sentence-snip.js +284 -0
  679. package/voice/first-sentence-snip.js.map +1 -0
  680. package/voice/voice-cancellation-token.d.ts +127 -0
  681. package/voice/voice-cancellation-token.d.ts.map +1 -0
  682. package/voice/voice-cancellation-token.js +186 -0
  683. package/voice/voice-cancellation-token.js.map +1 -0
  684. package/voice-wer.d.ts +19 -0
  685. package/voice-wer.d.ts.map +1 -0
  686. package/voice-wer.js +42 -0
  687. package/voice-wer.js.map +1 -0
  688. package/voice.d.ts +55 -0
  689. package/voice.d.ts.map +1 -0
  690. package/voice.js +337 -0
  691. package/voice.js.map +1 -0
  692. package/contracts/lifeops-extensions.d.ts +0 -340
  693. package/contracts/lifeops-extensions.d.ts.map +0 -1
  694. package/contracts/lifeops-extensions.js +0 -37
  695. package/contracts/lifeops-extensions.js.map +0 -1
  696. package/contracts/lifeops.d.ts.map +0 -1
  697. package/contracts/lifeops.js.map +0 -1
  698. package/contracts/onboarding.d.ts.map +0 -1
  699. package/contracts/onboarding.js.map +0 -1
  700. package/contracts/scratchpad.d.ts +0 -136
  701. package/contracts/scratchpad.d.ts.map +0 -1
  702. package/contracts/scratchpad.js +0 -91
  703. package/contracts/scratchpad.js.map +0 -1
  704. package/eliza-core-roles.d.ts +0 -79
  705. package/eliza-core-roles.d.ts.map +0 -1
  706. package/eliza-core-roles.js +0 -600
  707. package/eliza-core-roles.js.map +0 -1
  708. package/env-utils.impl.d.ts +0 -2
  709. package/env-utils.impl.d.ts.map +0 -1
  710. package/env-utils.impl.js +0 -10
  711. package/env-utils.impl.js.map +0 -1
  712. package/onboarding-presets.characters.d.ts.map +0 -1
  713. package/onboarding-presets.characters.js.map +0 -1
  714. package/onboarding-presets.d.ts.map +0 -1
  715. package/onboarding-presets.js.map +0 -1
  716. package/onboarding-presets.shared.d.ts.map +0 -1
  717. package/onboarding-presets.shared.js.map +0 -1
  718. package/themes/index.d.ts +0 -7
  719. package/themes/index.d.ts.map +0 -1
  720. package/themes/index.js +0 -6
  721. package/themes/index.js.map +0 -1
  722. package/themes/presets.d.ts +0 -15
  723. package/themes/presets.d.ts.map +0 -1
  724. package/themes/presets.js +0 -789
  725. package/themes/presets.js.map +0 -1
  726. package/types.d.ts +0 -27
  727. package/types.d.ts.map +0 -1
  728. package/types.js +0 -2
  729. package/types.js.map +0 -1
@@ -0,0 +1,360 @@
1
+ /**
2
+ * Branded hero-image generator for plugin **views**.
3
+ *
4
+ * A view is a mini-app contributed by a plugin (`Plugin.views`). Each one is
5
+ * served a square hero image at `/api/views/<id>/hero`. Real heroes live in the
6
+ * plugin at `assets/hero.<ext>`; when a plugin ships none, the agent serves a
7
+ * generated SVG produced here so the catalog never shows a broken or ugly tile.
8
+ *
9
+ * The composition is intentionally **no-blue-dominant** (the app surface forbids
10
+ * blue accents — orange/jewel tones only) and **deterministic**: the same input
11
+ * always yields byte-identical output, so `scripts/generate-view-heroes.mjs`
12
+ * (which commits real heroes into plugins) and the runtime fallback render the
13
+ * exact same art. This is the single source of truth for that art — the script
14
+ * and the agent both import `renderViewHeroSvg` from here.
15
+ *
16
+ * Pure string generation only: no Node APIs, so this module stays importable
17
+ * from the runtime-agnostic `@elizaos/shared` barrel (browser + server).
18
+ */
19
+ const W = 1024;
20
+ const CX = W / 2;
21
+ /**
22
+ * Convert an HSL triple to a hex color string. Deterministic, no rounding
23
+ * surprises across runs.
24
+ */
25
+ function hsl(h, s, l) {
26
+ const sN = s / 100;
27
+ const lN = l / 100;
28
+ const c = (1 - Math.abs(2 * lN - 1)) * sN;
29
+ const hp = (((h % 360) + 360) % 360) / 60;
30
+ const x = c * (1 - Math.abs((hp % 2) - 1));
31
+ let r = 0;
32
+ let g = 0;
33
+ let b = 0;
34
+ if (hp >= 0 && hp < 1)
35
+ [r, g, b] = [c, x, 0];
36
+ else if (hp < 2)
37
+ [r, g, b] = [x, c, 0];
38
+ else if (hp < 3)
39
+ [r, g, b] = [0, c, x];
40
+ else if (hp < 4)
41
+ [r, g, b] = [0, x, c];
42
+ else if (hp < 5)
43
+ [r, g, b] = [x, 0, c];
44
+ else
45
+ [r, g, b] = [c, 0, x];
46
+ const m = lN - c / 2;
47
+ const toHex = (v) => Math.round((v + m) * 255)
48
+ .toString(16)
49
+ .padStart(2, "0");
50
+ return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
51
+ }
52
+ function escapeXml(value) {
53
+ return value
54
+ .replaceAll("&", "&amp;")
55
+ .replaceAll("<", "&lt;")
56
+ .replaceAll(">", "&gt;")
57
+ .replaceAll('"', "&quot;")
58
+ .replaceAll("'", "&apos;");
59
+ }
60
+ /**
61
+ * A palette derived from a single accent hue, kept in a dark, modern register.
62
+ * Background tones are deep neutrals shifted slightly toward the accent so each
63
+ * card reads distinct without ever looking like a flat blue panel.
64
+ */
65
+ function palette(hue) {
66
+ return {
67
+ bgTop: hsl(hue, 32, 12),
68
+ bgBottom: hsl(hue + 14, 40, 7),
69
+ blobA: hsl(hue, 70, 52),
70
+ blobB: hsl(hue + 28, 66, 46),
71
+ accent: hsl(hue, 82, 60),
72
+ accentSoft: hsl(hue, 70, 70),
73
+ line: hsl(hue, 30, 88),
74
+ };
75
+ }
76
+ /**
77
+ * Render the full branded hero SVG. Shared chrome (defs, background, depth
78
+ * blobs, faint grid, accent arc, bottom label + vignette) with the icon glyph
79
+ * slotted in. Output is deterministic and byte-identical for identical input.
80
+ */
81
+ export function renderViewHeroSvg({ id, hue, iconSvg, label, }) {
82
+ const p = palette(hue);
83
+ const safeLabel = escapeXml(label);
84
+ // Two large blurred blobs placed off-center for asymmetric depth, plus a thin
85
+ // accent arc sweeping behind the icon.
86
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${W} ${W}" width="${W}" height="${W}" role="img" aria-label="${safeLabel}">
87
+ <defs>
88
+ <linearGradient id="bg-${id}" x1="0" y1="0" x2="1" y2="1">
89
+ <stop offset="0" stop-color="${p.bgTop}"/>
90
+ <stop offset="1" stop-color="${p.bgBottom}"/>
91
+ </linearGradient>
92
+ <radialGradient id="blobA-${id}" cx="0.5" cy="0.5" r="0.5">
93
+ <stop offset="0" stop-color="${p.blobA}" stop-opacity="0.55"/>
94
+ <stop offset="1" stop-color="${p.blobA}" stop-opacity="0"/>
95
+ </radialGradient>
96
+ <radialGradient id="blobB-${id}" cx="0.5" cy="0.5" r="0.5">
97
+ <stop offset="0" stop-color="${p.blobB}" stop-opacity="0.5"/>
98
+ <stop offset="1" stop-color="${p.blobB}" stop-opacity="0"/>
99
+ </radialGradient>
100
+ <radialGradient id="vig-${id}" cx="0.5" cy="0.42" r="0.75">
101
+ <stop offset="0" stop-color="#000000" stop-opacity="0"/>
102
+ <stop offset="0.72" stop-color="#000000" stop-opacity="0"/>
103
+ <stop offset="1" stop-color="#000000" stop-opacity="0.5"/>
104
+ </radialGradient>
105
+ <linearGradient id="label-${id}" x1="0" y1="0" x2="0" y2="1">
106
+ <stop offset="0" stop-color="#000000" stop-opacity="0"/>
107
+ <stop offset="1" stop-color="#000000" stop-opacity="0.55"/>
108
+ </linearGradient>
109
+ <filter id="soft-${id}" x="-30%" y="-30%" width="160%" height="160%">
110
+ <feGaussianBlur stdDeviation="46"/>
111
+ </filter>
112
+ <filter id="iglow-${id}" x="-40%" y="-40%" width="180%" height="180%">
113
+ <feDropShadow dx="0" dy="0" stdDeviation="14" flood-color="${p.accent}" flood-opacity="0.45"/>
114
+ </filter>
115
+ </defs>
116
+
117
+ <rect width="${W}" height="${W}" fill="url(#bg-${id})"/>
118
+
119
+ <g opacity="0.9">
120
+ <circle cx="232" cy="220" r="300" fill="url(#blobA-${id})" filter="url(#soft-${id})"/>
121
+ <circle cx="840" cy="800" r="340" fill="url(#blobB-${id})" filter="url(#soft-${id})"/>
122
+ </g>
123
+
124
+ <g stroke="${p.line}" stroke-width="1.4" opacity="0.06">
125
+ <line x1="0" y1="256" x2="${W}" y2="256"/>
126
+ <line x1="0" y1="512" x2="${W}" y2="512"/>
127
+ <line x1="0" y1="768" x2="${W}" y2="768"/>
128
+ <line x1="256" y1="0" x2="256" y2="${W}"/>
129
+ <line x1="512" y1="0" x2="512" y2="${W}"/>
130
+ <line x1="768" y1="0" x2="768" y2="${W}"/>
131
+ </g>
132
+
133
+ <g opacity="0.5">
134
+ <path d="M120 470 A 400 400 0 0 1 904 470" fill="none" stroke="${p.accent}" stroke-width="3" opacity="0.35"/>
135
+ </g>
136
+
137
+ <g transform="translate(${CX} 432)" filter="url(#iglow-${id})"
138
+ color="${p.line}" stroke="${p.line}" stroke-width="20"
139
+ stroke-linecap="round" stroke-linejoin="round" fill="none">
140
+ ${iconSvg}
141
+ </g>
142
+
143
+ <rect x="0" y="784" width="${W}" height="240" fill="url(#label-${id})"/>
144
+ <text x="${CX}" y="892" text-anchor="middle"
145
+ font-family="system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
146
+ font-size="76" font-weight="600" letter-spacing="0.5"
147
+ fill="${p.line}">${safeLabel}</text>
148
+ <rect x="${CX - 52}" y="924" width="104" height="6" rx="3" fill="${p.accent}"/>
149
+
150
+ <rect width="${W}" height="${W}" fill="url(#vig-${id})"/>
151
+ </svg>`;
152
+ }
153
+ /**
154
+ * Hand-drawn vector line-icons, centered at (0,0) spanning roughly -150..150.
155
+ * Each inherits stroke styling from the parent <g>; fills are set explicitly
156
+ * where a filled glyph reads better. Keyed names map to the catalog below.
157
+ */
158
+ export const VIEW_HERO_ICONS = {
159
+ // cpu / chip with a beaker spark — Model Tester
160
+ modelTester: ` <rect x="-110" y="-110" width="220" height="220" rx="28"/>
161
+ <rect x="-58" y="-58" width="116" height="116" rx="14"/>
162
+ <line x1="-110" y1="-66" x2="-150" y2="-66"/>
163
+ <line x1="-110" y1="0" x2="-150" y2="0"/>
164
+ <line x1="-110" y1="66" x2="-150" y2="66"/>
165
+ <line x1="110" y1="-66" x2="150" y2="-66"/>
166
+ <line x1="110" y1="0" x2="150" y2="0"/>
167
+ <line x1="110" y1="66" x2="150" y2="66"/>
168
+ <line x1="-66" y1="-110" x2="-66" y2="-150"/>
169
+ <line x1="0" y1="-110" x2="0" y2="-150"/>
170
+ <line x1="66" y1="-110" x2="66" y2="-150"/>
171
+ <line x1="-66" y1="110" x2="-66" y2="150"/>
172
+ <line x1="0" y1="110" x2="0" y2="150"/>
173
+ <line x1="66" y1="110" x2="66" y2="150"/>
174
+ <circle cx="0" cy="0" r="14" stroke-width="0" fill="currentColor"/>`,
175
+ // overlapping panels — Views (layout grid)
176
+ views: ` <rect x="-150" y="-150" width="130" height="130" rx="18"/>
177
+ <rect x="20" y="-150" width="130" height="130" rx="18"/>
178
+ <rect x="-150" y="20" width="130" height="130" rx="18"/>
179
+ <rect x="20" y="20" width="130" height="130" rx="18"/>`,
180
+ // shield with an eye-off slash — Focus / blocker
181
+ focus: ` <path d="M0 -150 L130 -100 L130 24 C130 110 70 152 0 175 C-70 152 -130 110 -130 24 L-130 -100 Z"/>
182
+ <circle cx="0" cy="-2" r="34"/>
183
+ <line x1="-92" y1="-96" x2="96" y2="120"/>`,
184
+ // calendar grid — Calendar
185
+ calendar: ` <rect x="-140" y="-118" width="280" height="248" rx="24"/>
186
+ <line x1="-140" y1="-52" x2="140" y2="-52"/>
187
+ <line x1="-78" y1="-150" x2="-78" y2="-92"/>
188
+ <line x1="78" y1="-150" x2="78" y2="-92"/>
189
+ <circle cx="-66" cy="6" r="11" stroke-width="0" fill="currentColor"/>
190
+ <circle cx="0" cy="6" r="11" stroke-width="0" fill="currentColor"/>
191
+ <circle cx="66" cy="6" r="11" stroke-width="0" fill="currentColor"/>
192
+ <circle cx="-66" cy="72" r="11" stroke-width="0" fill="currentColor"/>
193
+ <circle cx="0" cy="72" r="11" stroke-width="0" fill="currentColor"/>`,
194
+ // headphones — Facewear
195
+ headphones: ` <path d="M-140 30 V-10 A140 140 0 0 1 140 -10 V30"/>
196
+ <rect x="-160" y="26" width="58" height="110" rx="26" fill="currentColor" stroke-width="0"/>
197
+ <rect x="102" y="26" width="58" height="110" rx="26" fill="currentColor" stroke-width="0"/>
198
+ <rect x="-160" y="26" width="58" height="110" rx="26"/>
199
+ <rect x="102" y="26" width="58" height="110" rx="26"/>`,
200
+ // glasses — Smartglasses
201
+ glasses: ` <circle cx="-86" cy="20" r="68"/>
202
+ <circle cx="86" cy="20" r="68"/>
203
+ <path d="M-18 20 Q0 -2 18 20"/>
204
+ <line x1="-154" y1="-12" x2="-180" y2="-44"/>
205
+ <line x1="154" y1="-12" x2="180" y2="-44"/>`,
206
+ // line chart rising with axis — Finances
207
+ finances: ` <polyline points="-150,-150 -150,150 150,150"/>
208
+ <polyline points="-118,86 -50,-2 6,52 76,-62 132,-104" fill="none"/>
209
+ <circle cx="-50" cy="-2" r="13" stroke-width="0" fill="currentColor"/>
210
+ <circle cx="76" cy="-62" r="13" stroke-width="0" fill="currentColor"/>
211
+ <circle cx="132" cy="-104" r="13" stroke-width="0" fill="currentColor"/>`,
212
+ // target with center dot and a flag — Goals
213
+ goals: ` <circle cx="0" cy="0" r="150"/>
214
+ <circle cx="0" cy="0" r="92"/>
215
+ <circle cx="0" cy="0" r="34"/>
216
+ <circle cx="0" cy="0" r="9" stroke-width="0" fill="currentColor"/>`,
217
+ // heart with a pulse line through it — Health
218
+ health: ` <path d="M0 150 C-180 18 -120 -120 0 -52 C120 -120 180 18 0 150 Z"/>
219
+ <polyline points="-150,-10 -64,-10 -28,-58 14,52 48,-10 150,-10" fill="none"/>`,
220
+ // inbox tray — Inbox
221
+ inbox: ` <path d="M-150 -40 L-110 -130 H110 L150 -40 V120 A20 20 0 0 1 130 140 H-130 A20 20 0 0 1 -150 120 Z"/>
222
+ <path d="M-150 -40 H-44 L-10 24 H10 L44 -40 H150"/>`,
223
+ // chat bubble with lines — Messages
224
+ messages: ` <path d="M-150 -120 H150 A24 24 0 0 1 174 -96 V60 A24 24 0 0 1 150 84 H-30 L-100 150 V84 H-150 A24 24 0 0 1 -174 60 V-96 A24 24 0 0 1 -150 -120 Z"/>
225
+ <line x1="-100" y1="-44" x2="100" y2="-44"/>
226
+ <line x1="-100" y1="16" x2="40" y2="16"/>`,
227
+ // trending up arrow over people dots — Social Alpha
228
+ socialAlpha: ` <polyline points="-150,80 -54,-22 6,38 150,-110" fill="none"/>
229
+ <polyline points="92,-110 150,-110 150,-52" fill="none"/>
230
+ <circle cx="-110" cy="128" r="26"/>
231
+ <circle cx="0" cy="128" r="26"/>
232
+ <circle cx="110" cy="128" r="26"/>`,
233
+ // checklist square — Todos
234
+ todos: ` <rect x="-150" y="-150" width="300" height="300" rx="36"/>
235
+ <polyline points="-92,-6 -36,52 92,-78" fill="none"/>`,
236
+ // network graph nodes — Vector Browser / Relationships
237
+ vectorBrowser: ` <line x1="-110" y1="-96" x2="0" y2="0"/>
238
+ <line x1="120" y1="-110" x2="0" y2="0"/>
239
+ <line x1="-130" y1="86" x2="0" y2="0"/>
240
+ <line x1="110" y1="104" x2="0" y2="0"/>
241
+ <circle cx="0" cy="0" r="30" fill="currentColor" stroke-width="0"/>
242
+ <circle cx="0" cy="0" r="30"/>
243
+ <circle cx="-110" cy="-96" r="22"/>
244
+ <circle cx="120" cy="-110" r="22"/>
245
+ <circle cx="-130" cy="86" r="22"/>
246
+ <circle cx="110" cy="104" r="22"/>`,
247
+ };
248
+ /**
249
+ * Curated, non-blue accent hues spread across warm/jewel tones. Deliberately
250
+ * excludes the pure-blue band (~200–250) so a generated hero never reads as a
251
+ * flat blue panel on the app surface.
252
+ */
253
+ const VIEW_HERO_HUES = [
254
+ 12, 25, 38, 52, 96, 130, 150, 168, 190, 270, 286, 300, 332, 348,
255
+ ];
256
+ function hashString(value) {
257
+ let hash = 0;
258
+ for (let index = 0; index < value.length; index += 1) {
259
+ hash = (hash * 31 + value.charCodeAt(index)) | 0;
260
+ }
261
+ return Math.abs(hash);
262
+ }
263
+ /** Deterministically pick a non-blue accent hue for an arbitrary view key. */
264
+ export function hueForViewKey(key) {
265
+ const trimmed = key.trim() || "view";
266
+ return VIEW_HERO_HUES[hashString(trimmed) % VIEW_HERO_HUES.length];
267
+ }
268
+ /**
269
+ * Keyword → icon-glyph rules, checked in order. The first rule whose keyword is
270
+ * present in the view's id/label/tags/Lucide-icon name wins; otherwise the
271
+ * generic overlapping-panels glyph is used.
272
+ */
273
+ const ICON_KEYWORD_RULES = [
274
+ ["calendar", ["calendar", "schedule", "event", "agenda"]],
275
+ ["health", ["health", "fitness", "heart", "wellness", "medical"]],
276
+ [
277
+ "finances",
278
+ [
279
+ "finance",
280
+ "wallet",
281
+ "money",
282
+ "payment",
283
+ "budget",
284
+ "bank",
285
+ "trade",
286
+ "invest",
287
+ ],
288
+ ],
289
+ ["goals", ["goal", "target", "objective", "habit", "routine"]],
290
+ ["inbox", ["inbox", "mail", "email"]],
291
+ ["messages", ["message", "chat", "dm", "conversation", "sms"]],
292
+ [
293
+ "socialAlpha",
294
+ ["social", "leaderboard", "trust", "alpha", "feed", "follow"],
295
+ ],
296
+ ["todos", ["todo", "task", "checklist", "todos"]],
297
+ [
298
+ "vectorBrowser",
299
+ [
300
+ "vector",
301
+ "graph",
302
+ "relationship",
303
+ "network",
304
+ "entity",
305
+ "embedding",
306
+ "people",
307
+ "contact",
308
+ ],
309
+ ],
310
+ [
311
+ "focus",
312
+ ["focus", "block", "shield", "guard", "screen-time", "screentime"],
313
+ ],
314
+ [
315
+ "headphones",
316
+ ["headphone", "audio", "facewear", "wear", "sound", "voice"],
317
+ ],
318
+ ["glasses", ["glass", "smartglass", "xr", "spatial", "vision"]],
319
+ ["modelTester", ["model", "test", "chip", "cpu", "bench", "eval", "train"]],
320
+ ];
321
+ /** Pick the best-matching icon glyph for a view, defaulting to the grid. */
322
+ export function pickViewHeroIcon(source) {
323
+ const haystack = [
324
+ source.id ?? "",
325
+ source.label,
326
+ source.icon ?? "",
327
+ ...(source.tags ?? []),
328
+ ]
329
+ .join(" ")
330
+ .toLowerCase();
331
+ for (const [icon, keywords] of ICON_KEYWORD_RULES) {
332
+ if (keywords.some((keyword) => haystack.includes(keyword)))
333
+ return icon;
334
+ }
335
+ return "views";
336
+ }
337
+ /** Lowercase slug safe to embed in SVG element ids. */
338
+ function slugifyViewId(value) {
339
+ const slug = value
340
+ .toLowerCase()
341
+ .replace(/[^a-z0-9]+/g, "-")
342
+ .replace(/^-+|-+$/g, "");
343
+ return slug || "view";
344
+ }
345
+ /**
346
+ * High-level entry point: render a branded hero SVG for a view, choosing the
347
+ * accent hue and icon glyph automatically from the view's metadata. Used by the
348
+ * agent's hero fallback and by view scaffolding/icon-regeneration so a generated
349
+ * hero looks the same everywhere.
350
+ */
351
+ export function generateViewHeroSvgFor(source) {
352
+ const slug = slugifyViewId(source.id ?? source.label);
353
+ return renderViewHeroSvg({
354
+ id: slug,
355
+ hue: hueForViewKey(source.id ?? source.label),
356
+ iconSvg: VIEW_HERO_ICONS[pickViewHeroIcon(source)],
357
+ label: source.label,
358
+ });
359
+ }
360
+ //# sourceMappingURL=view-hero-art.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view-hero-art.js","sourceRoot":"","sources":["../src/view-hero-art.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,CAAC,GAAG,IAAI,CAAC;AACf,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjB;;;GAGG;AACH,SAAS,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IAC1C,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;IACnB,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;IACnB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CA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AC;IACtD,OAAO,iBAAiB,CAAC;QACvB,EAAE,EAAE,IAAI;QACR,GAAG,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,KAAK,CAAC;QAC7C,OAAO,EAAE,eAAe,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAClD,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * First-sentence snip helper for the TTS first-line cache.
3
+ *
4
+ * Pure, deterministic, no I/O. Both the local runtime and the Eliza Cloud
5
+ * `/api/v1/voice/tts` route call into this module so that byte-equal sentence
6
+ * text on either side maps to byte-equal cache keys.
7
+ *
8
+ * Algorithm summary (see R4 §2 in `.swarm/research/R4-tts-cache.md`):
9
+ * 1. Trim leading whitespace.
10
+ * 2. Walk char-by-char, tracking quote depth (skip terminators inside
11
+ * `"..."`/`'...'`/`“...”`), decimal context (digit-`.`-digit isn't a
12
+ * boundary), and abbreviation context (e.g. `Mr.`, `e.g.`, `U.S.`).
13
+ * 3. First surviving terminator (`.`/`!`/`?`/`…`/`。`/`!`/`?`) or `\n`
14
+ * ends the sentence. Consume any contiguous run of terminators that
15
+ * follow (so `"Wait..."` stays intact).
16
+ * 4. If no terminator and no newline → null (don't cache unterminated text).
17
+ * 5. Apply ≤10-word filter on the normalised form. If wordCount > 10,
18
+ * return null (don't cache).
19
+ *
20
+ * `FIRST_SENTENCE_SNIP_VERSION` is part of the cache key — bumping it
21
+ * invalidates every existing cached entry.
22
+ */
23
+ /**
24
+ * Cache-key algorithm version. Bump when the snip/normalise logic changes
25
+ * in a way that would produce different keys for the same input. Local and
26
+ * cloud caches re-key off this constant, so a bump rolls the entire cache.
27
+ */
28
+ export declare const FIRST_SENTENCE_SNIP_VERSION: "1";
29
+ export type FirstSentenceSnipVersion = typeof FIRST_SENTENCE_SNIP_VERSION;
30
+ /**
31
+ * Maximum word count (Unicode-aware) for a cacheable first-sentence snip.
32
+ * Beyond this the bytes won't repeat often enough to amortise the cache.
33
+ */
34
+ export declare const FIRST_SENTENCE_MAX_WORDS: 10;
35
+ /**
36
+ * Unicode-aware word count. Hyphenated words and apostrophe-internal words
37
+ * count as one (e.g. "twenty-three" → 1, "it's" → 1). Dotted acronyms with
38
+ * single-letter segments (e.g. "U.S.", "U.S.A.") count as one word. Decimal
39
+ * numbers like "3.14" count as one word.
40
+ */
41
+ export declare function wordCount(s: string): number;
42
+ /**
43
+ * Normalise a snip for cache-key purposes. NFC + lower-case + collapse
44
+ * whitespace + strip trailing terminators/whitespace. Apostrophes preserved.
45
+ */
46
+ export declare function normalizeForKey(snip: string): string;
47
+ export interface FirstSentenceSnipResult {
48
+ /** Raw snip including the terminator run, exactly as it appeared. */
49
+ raw: string;
50
+ /** Normalised form for cache-key hashing (`normalizeForKey(raw)`). */
51
+ normalized: string;
52
+ /** Unicode-aware word count over `normalized`. Always ≤ 10. */
53
+ wordCount: number;
54
+ /** End-exclusive offset into the original input where the snip ends. */
55
+ endOffset: number;
56
+ }
57
+ /**
58
+ * Attempt to snip the first sentence from `text`. Returns `null` if:
59
+ * - input is empty / whitespace only
60
+ * - no sentence-terminator found
61
+ * - normalised snip has > 10 words
62
+ * - normalised snip is empty after stripping terminators
63
+ *
64
+ * Otherwise returns a `FirstSentenceSnipResult` carrying the raw and
65
+ * normalised forms plus the word count.
66
+ */
67
+ export declare function firstSentenceSnip(text: string): FirstSentenceSnipResult | null;
68
+ //# sourceMappingURL=first-sentence-snip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"first-sentence-snip.d.ts","sourceRoot":"","sources":["../../src/voice/first-sentence-snip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAG,GAAY,CAAC;AACxD,MAAM,MAAM,wBAAwB,GAAG,OAAO,2BAA2B,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAG,EAAW,CAAC;AAuMpD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAU3C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASpD;AAED,MAAM,WAAW,uBAAuB;IACtC,qEAAqE;IACrE,GAAG,EAAE,MAAM,CAAC;IACZ,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,GACX,uBAAuB,GAAG,IAAI,CAyBhC"}