@vellumai/assistant 0.4.55 → 0.4.57

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 (1673) hide show
  1. package/ARCHITECTURE.md +161 -167
  2. package/Dockerfile +9 -9
  3. package/README.md +12 -12
  4. package/bun.lock +145 -112
  5. package/docs/architecture/integrations.md +24 -24
  6. package/docs/architecture/memory.md +53 -54
  7. package/docs/architecture/security.md +2 -2
  8. package/docs/credential-execution-service.md +404 -0
  9. package/knip.json +5 -1
  10. package/node_modules/@vellumai/ces-contracts/bun.lock +29 -0
  11. package/node_modules/@vellumai/ces-contracts/package.json +24 -0
  12. package/node_modules/@vellumai/ces-contracts/src/__tests__/contracts.test.ts +293 -0
  13. package/node_modules/@vellumai/ces-contracts/src/__tests__/grants.test.ts +686 -0
  14. package/node_modules/@vellumai/ces-contracts/src/error.ts +26 -0
  15. package/node_modules/@vellumai/ces-contracts/src/grants.ts +184 -0
  16. package/node_modules/@vellumai/ces-contracts/src/handles.ts +213 -0
  17. package/node_modules/@vellumai/ces-contracts/src/index.ts +147 -0
  18. package/node_modules/@vellumai/ces-contracts/src/rendering.ts +135 -0
  19. package/node_modules/@vellumai/ces-contracts/src/rpc.ts +511 -0
  20. package/node_modules/@vellumai/ces-contracts/tsconfig.json +20 -0
  21. package/node_modules/@vellumai/credential-storage/bun.lock +24 -0
  22. package/node_modules/@vellumai/credential-storage/package.json +17 -0
  23. package/node_modules/@vellumai/credential-storage/src/__tests__/package-boundary.test.ts +151 -0
  24. package/node_modules/@vellumai/credential-storage/src/index.ts +213 -0
  25. package/node_modules/@vellumai/credential-storage/src/oauth-runtime.ts +340 -0
  26. package/node_modules/@vellumai/credential-storage/src/static-credentials.ts +365 -0
  27. package/node_modules/@vellumai/credential-storage/tsconfig.json +20 -0
  28. package/node_modules/@vellumai/egress-proxy/bun.lock +24 -0
  29. package/node_modules/@vellumai/egress-proxy/package.json +17 -0
  30. package/node_modules/@vellumai/egress-proxy/src/__tests__/package-boundary.test.ts +131 -0
  31. package/node_modules/@vellumai/egress-proxy/src/index.ts +54 -0
  32. package/node_modules/@vellumai/egress-proxy/src/session-core.ts +466 -0
  33. package/node_modules/@vellumai/egress-proxy/src/types.ts +227 -0
  34. package/node_modules/@vellumai/egress-proxy/tsconfig.json +20 -0
  35. package/node_modules/zod/LICENSE +21 -0
  36. package/node_modules/zod/README.md +208 -0
  37. package/node_modules/zod/index.cjs +33 -0
  38. package/node_modules/zod/index.d.cts +4 -0
  39. package/node_modules/zod/index.d.ts +4 -0
  40. package/node_modules/zod/index.js +4 -0
  41. package/node_modules/zod/locales/index.cjs +17 -0
  42. package/node_modules/zod/locales/index.d.cts +1 -0
  43. package/node_modules/zod/locales/index.d.ts +1 -0
  44. package/node_modules/zod/locales/index.js +1 -0
  45. package/node_modules/zod/locales/package.json +6 -0
  46. package/node_modules/zod/mini/index.cjs +32 -0
  47. package/node_modules/zod/mini/index.d.cts +3 -0
  48. package/node_modules/zod/mini/index.d.ts +3 -0
  49. package/node_modules/zod/mini/index.js +3 -0
  50. package/node_modules/zod/mini/package.json +6 -0
  51. package/node_modules/zod/package.json +135 -0
  52. package/node_modules/zod/src/index.ts +4 -0
  53. package/node_modules/zod/src/locales/index.ts +1 -0
  54. package/node_modules/zod/src/mini/index.ts +3 -0
  55. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  56. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  57. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  58. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  59. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  60. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  61. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  62. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  63. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  64. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  65. package/node_modules/zod/src/v3/errors.ts +13 -0
  66. package/node_modules/zod/src/v3/external.ts +6 -0
  67. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  68. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  69. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  70. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  71. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  72. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  73. package/node_modules/zod/src/v3/index.ts +4 -0
  74. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  75. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  76. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  77. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  78. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  79. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  80. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  81. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  82. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  83. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  84. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  85. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  86. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  87. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  88. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  89. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  90. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  91. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  92. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  93. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  94. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  95. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  96. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  97. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  98. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  99. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  100. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  101. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  102. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  103. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  104. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  105. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  106. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  107. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  108. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  109. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  110. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  111. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  112. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  113. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  114. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  115. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  116. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  117. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  118. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  119. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  120. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  121. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  122. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  123. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  124. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  125. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  126. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  127. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  128. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  129. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  130. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  131. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  132. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  133. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  134. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  135. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  136. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  137. package/node_modules/zod/src/v3/types.ts +5138 -0
  138. package/node_modules/zod/src/v4/classic/checks.ts +32 -0
  139. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  140. package/node_modules/zod/src/v4/classic/compat.ts +70 -0
  141. package/node_modules/zod/src/v4/classic/errors.ts +82 -0
  142. package/node_modules/zod/src/v4/classic/external.ts +51 -0
  143. package/node_modules/zod/src/v4/classic/from-json-schema.ts +643 -0
  144. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  145. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  146. package/node_modules/zod/src/v4/classic/parse.ts +82 -0
  147. package/node_modules/zod/src/v4/classic/schemas.ts +2409 -0
  148. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  149. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  150. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  151. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  152. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  153. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  154. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  155. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  156. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  157. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +276 -0
  158. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  159. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  160. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
  161. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  162. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  163. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  164. package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  165. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  166. package/node_modules/zod/src/v4/classic/tests/default.test.ts +365 -0
  167. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  168. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  169. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
  170. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  171. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
  172. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  173. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  174. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  175. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  176. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +734 -0
  177. package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  178. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  179. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  180. package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  181. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  182. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  183. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  184. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  185. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  186. package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  187. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  188. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  189. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  190. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  191. package/node_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
  192. package/node_modules/zod/src/v4/classic/tests/object.test.ts +640 -0
  193. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +223 -0
  194. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +427 -0
  195. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  196. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  197. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  198. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +282 -0
  199. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  200. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  201. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  202. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  203. package/node_modules/zod/src/v4/classic/tests/record.test.ts +632 -0
  204. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
  205. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +570 -0
  206. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  207. package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  208. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  209. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  210. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1175 -0
  211. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  212. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  213. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  214. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2990 -0
  215. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +361 -0
  216. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +183 -0
  217. package/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -0
  218. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  219. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  220. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  221. package/node_modules/zod/src/v4/core/api.ts +1798 -0
  222. package/node_modules/zod/src/v4/core/checks.ts +1293 -0
  223. package/node_modules/zod/src/v4/core/config.ts +15 -0
  224. package/node_modules/zod/src/v4/core/core.ts +138 -0
  225. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  226. package/node_modules/zod/src/v4/core/errors.ts +448 -0
  227. package/node_modules/zod/src/v4/core/index.ts +16 -0
  228. package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  229. package/node_modules/zod/src/v4/core/json-schema-processors.ts +667 -0
  230. package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  231. package/node_modules/zod/src/v4/core/parse.ts +195 -0
  232. package/node_modules/zod/src/v4/core/regexes.ts +183 -0
  233. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  234. package/node_modules/zod/src/v4/core/schemas.ts +4538 -0
  235. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  236. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  237. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  238. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  239. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  240. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  241. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  242. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  243. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  244. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  245. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +83 -0
  246. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +67 -0
  247. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  248. package/node_modules/zod/src/v4/core/to-json-schema.ts +613 -0
  249. package/node_modules/zod/src/v4/core/util.ts +966 -0
  250. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  251. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  252. package/node_modules/zod/src/v4/index.ts +4 -0
  253. package/node_modules/zod/src/v4/locales/ar.ts +115 -0
  254. package/node_modules/zod/src/v4/locales/az.ts +111 -0
  255. package/node_modules/zod/src/v4/locales/be.ts +176 -0
  256. package/node_modules/zod/src/v4/locales/bg.ts +128 -0
  257. package/node_modules/zod/src/v4/locales/ca.ts +116 -0
  258. package/node_modules/zod/src/v4/locales/cs.ts +118 -0
  259. package/node_modules/zod/src/v4/locales/da.ts +123 -0
  260. package/node_modules/zod/src/v4/locales/de.ts +116 -0
  261. package/node_modules/zod/src/v4/locales/en.ts +119 -0
  262. package/node_modules/zod/src/v4/locales/eo.ts +118 -0
  263. package/node_modules/zod/src/v4/locales/es.ts +141 -0
  264. package/node_modules/zod/src/v4/locales/fa.ts +126 -0
  265. package/node_modules/zod/src/v4/locales/fi.ts +121 -0
  266. package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  267. package/node_modules/zod/src/v4/locales/fr.ts +116 -0
  268. package/node_modules/zod/src/v4/locales/he.ts +246 -0
  269. package/node_modules/zod/src/v4/locales/hu.ts +117 -0
  270. package/node_modules/zod/src/v4/locales/hy.ts +164 -0
  271. package/node_modules/zod/src/v4/locales/id.ts +115 -0
  272. package/node_modules/zod/src/v4/locales/index.ts +49 -0
  273. package/node_modules/zod/src/v4/locales/is.ts +119 -0
  274. package/node_modules/zod/src/v4/locales/it.ts +116 -0
  275. package/node_modules/zod/src/v4/locales/ja.ts +114 -0
  276. package/node_modules/zod/src/v4/locales/ka.ts +123 -0
  277. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  278. package/node_modules/zod/src/v4/locales/km.ts +119 -0
  279. package/node_modules/zod/src/v4/locales/ko.ts +121 -0
  280. package/node_modules/zod/src/v4/locales/lt.ts +239 -0
  281. package/node_modules/zod/src/v4/locales/mk.ts +118 -0
  282. package/node_modules/zod/src/v4/locales/ms.ts +115 -0
  283. package/node_modules/zod/src/v4/locales/nl.ts +121 -0
  284. package/node_modules/zod/src/v4/locales/no.ts +116 -0
  285. package/node_modules/zod/src/v4/locales/ota.ts +117 -0
  286. package/node_modules/zod/src/v4/locales/pl.ts +118 -0
  287. package/node_modules/zod/src/v4/locales/ps.ts +126 -0
  288. package/node_modules/zod/src/v4/locales/pt.ts +116 -0
  289. package/node_modules/zod/src/v4/locales/ru.ts +176 -0
  290. package/node_modules/zod/src/v4/locales/sl.ts +118 -0
  291. package/node_modules/zod/src/v4/locales/sv.ts +119 -0
  292. package/node_modules/zod/src/v4/locales/ta.ts +118 -0
  293. package/node_modules/zod/src/v4/locales/th.ts +119 -0
  294. package/node_modules/zod/src/v4/locales/tr.ts +111 -0
  295. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  296. package/node_modules/zod/src/v4/locales/uk.ts +117 -0
  297. package/node_modules/zod/src/v4/locales/ur.ts +119 -0
  298. package/node_modules/zod/src/v4/locales/uz.ts +116 -0
  299. package/node_modules/zod/src/v4/locales/vi.ts +117 -0
  300. package/node_modules/zod/src/v4/locales/yo.ts +124 -0
  301. package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  302. package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  303. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  304. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  305. package/node_modules/zod/src/v4/mini/external.ts +40 -0
  306. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  307. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  308. package/node_modules/zod/src/v4/mini/parse.ts +14 -0
  309. package/node_modules/zod/src/v4/mini/schemas.ts +1916 -0
  310. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  311. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  312. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  313. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  314. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +529 -0
  315. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  316. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  317. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  318. package/node_modules/zod/src/v4/mini/tests/index.test.ts +963 -0
  319. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  320. package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  321. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  322. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  323. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  324. package/node_modules/zod/src/v4/mini/tests/string.test.ts +347 -0
  325. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  326. package/node_modules/zod/v3/ZodError.cjs +138 -0
  327. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  328. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  329. package/node_modules/zod/v3/ZodError.js +133 -0
  330. package/node_modules/zod/v3/errors.cjs +17 -0
  331. package/node_modules/zod/v3/errors.d.cts +5 -0
  332. package/node_modules/zod/v3/errors.d.ts +5 -0
  333. package/node_modules/zod/v3/errors.js +9 -0
  334. package/node_modules/zod/v3/external.cjs +22 -0
  335. package/node_modules/zod/v3/external.d.cts +6 -0
  336. package/node_modules/zod/v3/external.d.ts +6 -0
  337. package/node_modules/zod/v3/external.js +6 -0
  338. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  339. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  340. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  341. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  342. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  343. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  344. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  345. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  346. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  347. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  348. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  349. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  350. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  351. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  352. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  353. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  354. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  355. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  356. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  357. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  358. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  359. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  360. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  361. package/node_modules/zod/v3/helpers/util.js +133 -0
  362. package/node_modules/zod/v3/index.cjs +33 -0
  363. package/node_modules/zod/v3/index.d.cts +4 -0
  364. package/node_modules/zod/v3/index.d.ts +4 -0
  365. package/node_modules/zod/v3/index.js +4 -0
  366. package/node_modules/zod/v3/locales/en.cjs +112 -0
  367. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  368. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  369. package/node_modules/zod/v3/locales/en.js +109 -0
  370. package/node_modules/zod/v3/package.json +6 -0
  371. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  372. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  373. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  374. package/node_modules/zod/v3/standard-schema.js +1 -0
  375. package/node_modules/zod/v3/types.cjs +3777 -0
  376. package/node_modules/zod/v3/types.d.cts +1034 -0
  377. package/node_modules/zod/v3/types.d.ts +1034 -0
  378. package/node_modules/zod/v3/types.js +3695 -0
  379. package/node_modules/zod/v4/classic/checks.cjs +33 -0
  380. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  381. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  382. package/node_modules/zod/v4/classic/checks.js +1 -0
  383. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  384. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  385. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  386. package/node_modules/zod/v4/classic/coerce.js +17 -0
  387. package/node_modules/zod/v4/classic/compat.cjs +61 -0
  388. package/node_modules/zod/v4/classic/compat.d.cts +50 -0
  389. package/node_modules/zod/v4/classic/compat.d.ts +50 -0
  390. package/node_modules/zod/v4/classic/compat.js +31 -0
  391. package/node_modules/zod/v4/classic/errors.cjs +74 -0
  392. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  393. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  394. package/node_modules/zod/v4/classic/errors.js +48 -0
  395. package/node_modules/zod/v4/classic/external.cjs +73 -0
  396. package/node_modules/zod/v4/classic/external.d.cts +15 -0
  397. package/node_modules/zod/v4/classic/external.d.ts +15 -0
  398. package/node_modules/zod/v4/classic/external.js +20 -0
  399. package/node_modules/zod/v4/classic/from-json-schema.cjs +610 -0
  400. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  401. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  402. package/node_modules/zod/v4/classic/from-json-schema.js +584 -0
  403. package/node_modules/zod/v4/classic/index.cjs +33 -0
  404. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  405. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  406. package/node_modules/zod/v4/classic/index.js +4 -0
  407. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  408. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  409. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  410. package/node_modules/zod/v4/classic/iso.js +30 -0
  411. package/node_modules/zod/v4/classic/package.json +6 -0
  412. package/node_modules/zod/v4/classic/parse.cjs +41 -0
  413. package/node_modules/zod/v4/classic/parse.d.cts +31 -0
  414. package/node_modules/zod/v4/classic/parse.d.ts +31 -0
  415. package/node_modules/zod/v4/classic/parse.js +15 -0
  416. package/node_modules/zod/v4/classic/schemas.cjs +1272 -0
  417. package/node_modules/zod/v4/classic/schemas.d.cts +739 -0
  418. package/node_modules/zod/v4/classic/schemas.d.ts +739 -0
  419. package/node_modules/zod/v4/classic/schemas.js +1157 -0
  420. package/node_modules/zod/v4/core/api.cjs +1222 -0
  421. package/node_modules/zod/v4/core/api.d.cts +304 -0
  422. package/node_modules/zod/v4/core/api.d.ts +304 -0
  423. package/node_modules/zod/v4/core/api.js +1082 -0
  424. package/node_modules/zod/v4/core/checks.cjs +601 -0
  425. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  426. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  427. package/node_modules/zod/v4/core/checks.js +575 -0
  428. package/node_modules/zod/v4/core/core.cjs +83 -0
  429. package/node_modules/zod/v4/core/core.d.cts +70 -0
  430. package/node_modules/zod/v4/core/core.d.ts +70 -0
  431. package/node_modules/zod/v4/core/core.js +76 -0
  432. package/node_modules/zod/v4/core/doc.cjs +39 -0
  433. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  434. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  435. package/node_modules/zod/v4/core/doc.js +35 -0
  436. package/node_modules/zod/v4/core/errors.cjs +213 -0
  437. package/node_modules/zod/v4/core/errors.d.cts +220 -0
  438. package/node_modules/zod/v4/core/errors.d.ts +220 -0
  439. package/node_modules/zod/v4/core/errors.js +182 -0
  440. package/node_modules/zod/v4/core/index.cjs +47 -0
  441. package/node_modules/zod/v4/core/index.d.cts +16 -0
  442. package/node_modules/zod/v4/core/index.d.ts +16 -0
  443. package/node_modules/zod/v4/core/index.js +16 -0
  444. package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  445. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  446. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  447. package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  448. package/node_modules/zod/v4/core/json-schema-processors.cjs +648 -0
  449. package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  450. package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  451. package/node_modules/zod/v4/core/json-schema-processors.js +605 -0
  452. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  453. package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  454. package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  455. package/node_modules/zod/v4/core/json-schema.js +1 -0
  456. package/node_modules/zod/v4/core/package.json +6 -0
  457. package/node_modules/zod/v4/core/parse.cjs +131 -0
  458. package/node_modules/zod/v4/core/parse.d.cts +49 -0
  459. package/node_modules/zod/v4/core/parse.d.ts +49 -0
  460. package/node_modules/zod/v4/core/parse.js +93 -0
  461. package/node_modules/zod/v4/core/regexes.cjs +166 -0
  462. package/node_modules/zod/v4/core/regexes.d.cts +79 -0
  463. package/node_modules/zod/v4/core/regexes.d.ts +79 -0
  464. package/node_modules/zod/v4/core/regexes.js +133 -0
  465. package/node_modules/zod/v4/core/registries.cjs +56 -0
  466. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  467. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  468. package/node_modules/zod/v4/core/registries.js +51 -0
  469. package/node_modules/zod/v4/core/schemas.cjs +2124 -0
  470. package/node_modules/zod/v4/core/schemas.d.cts +1146 -0
  471. package/node_modules/zod/v4/core/schemas.d.ts +1146 -0
  472. package/node_modules/zod/v4/core/schemas.js +2093 -0
  473. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  474. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  475. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  476. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  477. package/node_modules/zod/v4/core/to-json-schema.cjs +446 -0
  478. package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  479. package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  480. package/node_modules/zod/v4/core/to-json-schema.js +437 -0
  481. package/node_modules/zod/v4/core/util.cjs +710 -0
  482. package/node_modules/zod/v4/core/util.d.cts +199 -0
  483. package/node_modules/zod/v4/core/util.d.ts +199 -0
  484. package/node_modules/zod/v4/core/util.js +651 -0
  485. package/node_modules/zod/v4/core/versions.cjs +8 -0
  486. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  487. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  488. package/node_modules/zod/v4/core/versions.js +5 -0
  489. package/node_modules/zod/v4/index.cjs +22 -0
  490. package/node_modules/zod/v4/index.d.cts +3 -0
  491. package/node_modules/zod/v4/index.d.ts +3 -0
  492. package/node_modules/zod/v4/index.js +3 -0
  493. package/node_modules/zod/v4/locales/ar.cjs +133 -0
  494. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  495. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  496. package/node_modules/zod/v4/locales/ar.js +106 -0
  497. package/node_modules/zod/v4/locales/az.cjs +132 -0
  498. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  499. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  500. package/node_modules/zod/v4/locales/az.js +105 -0
  501. package/node_modules/zod/v4/locales/be.cjs +183 -0
  502. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  503. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  504. package/node_modules/zod/v4/locales/be.js +156 -0
  505. package/node_modules/zod/v4/locales/bg.cjs +147 -0
  506. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  507. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  508. package/node_modules/zod/v4/locales/bg.js +120 -0
  509. package/node_modules/zod/v4/locales/ca.cjs +134 -0
  510. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  511. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  512. package/node_modules/zod/v4/locales/ca.js +107 -0
  513. package/node_modules/zod/v4/locales/cs.cjs +138 -0
  514. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  515. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  516. package/node_modules/zod/v4/locales/cs.js +111 -0
  517. package/node_modules/zod/v4/locales/da.cjs +142 -0
  518. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  519. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  520. package/node_modules/zod/v4/locales/da.js +115 -0
  521. package/node_modules/zod/v4/locales/de.cjs +135 -0
  522. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  523. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  524. package/node_modules/zod/v4/locales/de.js +108 -0
  525. package/node_modules/zod/v4/locales/en.cjs +136 -0
  526. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  527. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  528. package/node_modules/zod/v4/locales/en.js +109 -0
  529. package/node_modules/zod/v4/locales/eo.cjs +136 -0
  530. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  531. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  532. package/node_modules/zod/v4/locales/eo.js +109 -0
  533. package/node_modules/zod/v4/locales/es.cjs +159 -0
  534. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  535. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  536. package/node_modules/zod/v4/locales/es.js +132 -0
  537. package/node_modules/zod/v4/locales/fa.cjs +141 -0
  538. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  539. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  540. package/node_modules/zod/v4/locales/fa.js +114 -0
  541. package/node_modules/zod/v4/locales/fi.cjs +139 -0
  542. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  543. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  544. package/node_modules/zod/v4/locales/fi.js +112 -0
  545. package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  546. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  547. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  548. package/node_modules/zod/v4/locales/fr-CA.js +107 -0
  549. package/node_modules/zod/v4/locales/fr.cjs +135 -0
  550. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  551. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  552. package/node_modules/zod/v4/locales/fr.js +108 -0
  553. package/node_modules/zod/v4/locales/he.cjs +241 -0
  554. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  555. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  556. package/node_modules/zod/v4/locales/he.js +214 -0
  557. package/node_modules/zod/v4/locales/hu.cjs +135 -0
  558. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  559. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  560. package/node_modules/zod/v4/locales/hu.js +108 -0
  561. package/node_modules/zod/v4/locales/hy.cjs +174 -0
  562. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  563. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  564. package/node_modules/zod/v4/locales/hy.js +147 -0
  565. package/node_modules/zod/v4/locales/id.cjs +133 -0
  566. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  567. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  568. package/node_modules/zod/v4/locales/id.js +106 -0
  569. package/node_modules/zod/v4/locales/index.cjs +104 -0
  570. package/node_modules/zod/v4/locales/index.d.cts +49 -0
  571. package/node_modules/zod/v4/locales/index.d.ts +49 -0
  572. package/node_modules/zod/v4/locales/index.js +49 -0
  573. package/node_modules/zod/v4/locales/is.cjs +136 -0
  574. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  575. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  576. package/node_modules/zod/v4/locales/is.js +109 -0
  577. package/node_modules/zod/v4/locales/it.cjs +135 -0
  578. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  579. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  580. package/node_modules/zod/v4/locales/it.js +108 -0
  581. package/node_modules/zod/v4/locales/ja.cjs +134 -0
  582. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  583. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  584. package/node_modules/zod/v4/locales/ja.js +107 -0
  585. package/node_modules/zod/v4/locales/ka.cjs +139 -0
  586. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  587. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  588. package/node_modules/zod/v4/locales/ka.js +112 -0
  589. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  590. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  591. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  592. package/node_modules/zod/v4/locales/kh.js +5 -0
  593. package/node_modules/zod/v4/locales/km.cjs +137 -0
  594. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  595. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  596. package/node_modules/zod/v4/locales/km.js +110 -0
  597. package/node_modules/zod/v4/locales/ko.cjs +138 -0
  598. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  599. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  600. package/node_modules/zod/v4/locales/ko.js +111 -0
  601. package/node_modules/zod/v4/locales/lt.cjs +230 -0
  602. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  603. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  604. package/node_modules/zod/v4/locales/lt.js +203 -0
  605. package/node_modules/zod/v4/locales/mk.cjs +136 -0
  606. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  607. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  608. package/node_modules/zod/v4/locales/mk.js +109 -0
  609. package/node_modules/zod/v4/locales/ms.cjs +134 -0
  610. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  611. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  612. package/node_modules/zod/v4/locales/ms.js +107 -0
  613. package/node_modules/zod/v4/locales/nl.cjs +137 -0
  614. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  615. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  616. package/node_modules/zod/v4/locales/nl.js +110 -0
  617. package/node_modules/zod/v4/locales/no.cjs +135 -0
  618. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  619. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  620. package/node_modules/zod/v4/locales/no.js +108 -0
  621. package/node_modules/zod/v4/locales/ota.cjs +136 -0
  622. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  623. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  624. package/node_modules/zod/v4/locales/ota.js +109 -0
  625. package/node_modules/zod/v4/locales/package.json +6 -0
  626. package/node_modules/zod/v4/locales/pl.cjs +136 -0
  627. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  628. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  629. package/node_modules/zod/v4/locales/pl.js +109 -0
  630. package/node_modules/zod/v4/locales/ps.cjs +141 -0
  631. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  632. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  633. package/node_modules/zod/v4/locales/ps.js +114 -0
  634. package/node_modules/zod/v4/locales/pt.cjs +135 -0
  635. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  636. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  637. package/node_modules/zod/v4/locales/pt.js +108 -0
  638. package/node_modules/zod/v4/locales/ru.cjs +183 -0
  639. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  640. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  641. package/node_modules/zod/v4/locales/ru.js +156 -0
  642. package/node_modules/zod/v4/locales/sl.cjs +136 -0
  643. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  644. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  645. package/node_modules/zod/v4/locales/sl.js +109 -0
  646. package/node_modules/zod/v4/locales/sv.cjs +137 -0
  647. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  648. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  649. package/node_modules/zod/v4/locales/sv.js +110 -0
  650. package/node_modules/zod/v4/locales/ta.cjs +137 -0
  651. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  652. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  653. package/node_modules/zod/v4/locales/ta.js +110 -0
  654. package/node_modules/zod/v4/locales/th.cjs +137 -0
  655. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  656. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  657. package/node_modules/zod/v4/locales/th.js +110 -0
  658. package/node_modules/zod/v4/locales/tr.cjs +132 -0
  659. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  660. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  661. package/node_modules/zod/v4/locales/tr.js +105 -0
  662. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  663. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  664. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  665. package/node_modules/zod/v4/locales/ua.js +5 -0
  666. package/node_modules/zod/v4/locales/uk.cjs +135 -0
  667. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  668. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  669. package/node_modules/zod/v4/locales/uk.js +108 -0
  670. package/node_modules/zod/v4/locales/ur.cjs +137 -0
  671. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  672. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  673. package/node_modules/zod/v4/locales/ur.js +110 -0
  674. package/node_modules/zod/v4/locales/uz.cjs +136 -0
  675. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  676. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  677. package/node_modules/zod/v4/locales/uz.js +109 -0
  678. package/node_modules/zod/v4/locales/vi.cjs +135 -0
  679. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  680. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  681. package/node_modules/zod/v4/locales/vi.js +108 -0
  682. package/node_modules/zod/v4/locales/yo.cjs +134 -0
  683. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  684. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  685. package/node_modules/zod/v4/locales/yo.js +107 -0
  686. package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  687. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  688. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  689. package/node_modules/zod/v4/locales/zh-CN.js +109 -0
  690. package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  691. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  692. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  693. package/node_modules/zod/v4/locales/zh-TW.js +107 -0
  694. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  695. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  696. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  697. package/node_modules/zod/v4/mini/checks.js +1 -0
  698. package/node_modules/zod/v4/mini/coerce.cjs +52 -0
  699. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  700. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  701. package/node_modules/zod/v4/mini/coerce.js +22 -0
  702. package/node_modules/zod/v4/mini/external.cjs +63 -0
  703. package/node_modules/zod/v4/mini/external.d.cts +12 -0
  704. package/node_modules/zod/v4/mini/external.d.ts +12 -0
  705. package/node_modules/zod/v4/mini/external.js +14 -0
  706. package/node_modules/zod/v4/mini/index.cjs +32 -0
  707. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  708. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  709. package/node_modules/zod/v4/mini/index.js +3 -0
  710. package/node_modules/zod/v4/mini/iso.cjs +64 -0
  711. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  712. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  713. package/node_modules/zod/v4/mini/iso.js +34 -0
  714. package/node_modules/zod/v4/mini/package.json +6 -0
  715. package/node_modules/zod/v4/mini/parse.cjs +16 -0
  716. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  717. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  718. package/node_modules/zod/v4/mini/parse.js +1 -0
  719. package/node_modules/zod/v4/mini/schemas.cjs +1046 -0
  720. package/node_modules/zod/v4/mini/schemas.d.cts +427 -0
  721. package/node_modules/zod/v4/mini/schemas.d.ts +427 -0
  722. package/node_modules/zod/v4/mini/schemas.js +925 -0
  723. package/node_modules/zod/v4/package.json +6 -0
  724. package/node_modules/zod/v4-mini/index.cjs +32 -0
  725. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  726. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  727. package/node_modules/zod/v4-mini/index.js +3 -0
  728. package/node_modules/zod/v4-mini/package.json +6 -0
  729. package/package.json +13 -2
  730. package/src/__tests__/acp-session.test.ts +292 -0
  731. package/src/__tests__/actor-token-service.test.ts +10 -10
  732. package/src/__tests__/always-loaded-tools-guard.test.ts +1 -1
  733. package/src/__tests__/anthropic-provider.test.ts +340 -46
  734. package/src/__tests__/app-builder-tool-scripts.test.ts +15 -2
  735. package/src/__tests__/approval-cascade.test.ts +123 -97
  736. package/src/__tests__/approval-primitive.test.ts +2 -2
  737. package/src/__tests__/approval-routes-http.test.ts +42 -28
  738. package/src/__tests__/asset-materialize-tool.test.ts +14 -21
  739. package/src/__tests__/asset-search-tool.test.ts +6 -13
  740. package/src/__tests__/assistant-attachments.test.ts +27 -0
  741. package/src/__tests__/assistant-event-hub.test.ts +14 -10
  742. package/src/__tests__/assistant-event.test.ts +9 -9
  743. package/src/__tests__/assistant-events-sse-hardening.test.ts +1 -1
  744. package/src/__tests__/assistant-feature-flag-guardrails.test.ts +6 -1
  745. package/src/__tests__/assistant-feature-flags-integration.test.ts +169 -40
  746. package/src/__tests__/attachments-store.test.ts +2 -2
  747. package/src/__tests__/avatar-e2e.test.ts +19 -7
  748. package/src/__tests__/avatar-generator.test.ts +4 -7
  749. package/src/__tests__/browser-fill-credential.test.ts +17 -18
  750. package/src/__tests__/browser-skill-endstate.test.ts +1 -2
  751. package/src/__tests__/btw-routes.test.ts +21 -9
  752. package/src/__tests__/call-controller.test.ts +229 -202
  753. package/src/__tests__/call-pointer-messages.test.ts +12 -10
  754. package/src/__tests__/call-routes-http.test.ts +4 -4
  755. package/src/__tests__/call-start-guardian-guard.test.ts +0 -1
  756. package/src/__tests__/callback-handoff-copy.test.ts +1 -1
  757. package/src/__tests__/cancel-resolves-conversation-key.test.ts +158 -0
  758. package/src/__tests__/canonical-guardian-store.test.ts +8 -10
  759. package/src/__tests__/channel-approval-routes.test.ts +5 -5
  760. package/src/__tests__/channel-approval.test.ts +1 -1
  761. package/src/__tests__/channel-approvals.test.ts +13 -13
  762. package/src/__tests__/channel-guardian.test.ts +3 -3
  763. package/src/__tests__/channel-invite-transport.test.ts +5 -1
  764. package/src/__tests__/channel-readiness-routes.test.ts +4 -1
  765. package/src/__tests__/channel-readiness-service.test.ts +0 -1
  766. package/src/__tests__/channel-reply-delivery.test.ts +1 -1
  767. package/src/__tests__/checker.test.ts +32 -33
  768. package/src/__tests__/chrome-cdp.test.ts +47 -18
  769. package/src/__tests__/claude-code-skill-regression.test.ts +67 -1
  770. package/src/__tests__/claude-code-tool-profiles.test.ts +1 -1
  771. package/src/__tests__/clipboard.test.ts +6 -6
  772. package/src/__tests__/commit-guarantee.test.ts +9 -9
  773. package/src/__tests__/commit-message-enrichment-service.test.ts +37 -6
  774. package/src/__tests__/computer-use-tools.test.ts +0 -1
  775. package/src/__tests__/config-loader-backfill.test.ts +6 -4
  776. package/src/__tests__/config-schema-cmd.test.ts +258 -0
  777. package/src/__tests__/config-schema.test.ts +45 -46
  778. package/src/__tests__/config-watcher.test.ts +25 -24
  779. package/src/__tests__/confirmation-request-guardian-bridge.test.ts +17 -15
  780. package/src/__tests__/contacts-tools.test.ts +0 -1
  781. package/src/__tests__/context-overflow-approval.test.ts +2 -2
  782. package/src/__tests__/{session-abort-tool-results.test.ts → conversation-abort-tool-results.test.ts} +26 -13
  783. package/src/__tests__/{session-agent-loop-overflow.test.ts → conversation-agent-loop-overflow.test.ts} +236 -61
  784. package/src/__tests__/{session-agent-loop.test.ts → conversation-agent-loop.test.ts} +88 -65
  785. package/src/__tests__/{session-approval-overrides.test.ts → conversation-approval-overrides.test.ts} +23 -23
  786. package/src/__tests__/conversation-attachments.test.ts +227 -0
  787. package/src/__tests__/conversation-attention-telegram.test.ts +2 -2
  788. package/src/__tests__/{session-confirmation-signals.test.ts → conversation-confirmation-signals.test.ts} +64 -54
  789. package/src/__tests__/{session-error.test.ts → conversation-error.test.ts} +98 -57
  790. package/src/__tests__/{session-evictor.test.ts → conversation-evictor.test.ts} +21 -17
  791. package/src/__tests__/{session-history-web-search.test.ts → conversation-history-web-search.test.ts} +34 -10
  792. package/src/__tests__/{session-init.benchmark.test.ts → conversation-init.benchmark.test.ts} +23 -24
  793. package/src/__tests__/{session-load-history-repair.test.ts → conversation-load-history-repair.test.ts} +39 -39
  794. package/src/__tests__/{session-media-retry.test.ts → conversation-media-retry.test.ts} +1 -1
  795. package/src/__tests__/{session-messaging-secret-redirect.test.ts → conversation-messaging-secret-redirect.test.ts} +1 -1
  796. package/src/__tests__/conversation-pairing.test.ts +47 -47
  797. package/src/__tests__/{session-pre-run-repair.test.ts → conversation-pre-run-repair.test.ts} +26 -13
  798. package/src/__tests__/{session-provider-retry-repair.test.ts → conversation-provider-retry-repair.test.ts} +61 -48
  799. package/src/__tests__/{session-queue.test.ts → conversation-queue.test.ts} +260 -230
  800. package/src/__tests__/conversation-routes-guardian-reply.test.ts +26 -26
  801. package/src/__tests__/conversation-routes-slash-commands.test.ts +34 -57
  802. package/src/__tests__/{session-runtime-assembly.test.ts → conversation-runtime-assembly.test.ts} +187 -175
  803. package/src/__tests__/{session-runtime-workspace.test.ts → conversation-runtime-workspace.test.ts} +1 -1
  804. package/src/__tests__/{thread-seed-composer.test.ts → conversation-seed-composer.test.ts} +51 -49
  805. package/src/__tests__/{session-skill-tools.test.ts → conversation-skill-tools.test.ts} +11 -13
  806. package/src/__tests__/{session-slash-queue.test.ts → conversation-slash-queue.test.ts} +57 -48
  807. package/src/__tests__/{session-slash-unknown.test.ts → conversation-slash-unknown.test.ts} +33 -77
  808. package/src/__tests__/conversation-starter-routes.test.ts +291 -0
  809. package/src/__tests__/conversation-store.test.ts +61 -55
  810. package/src/__tests__/{session-surfaces-deselection.test.ts → conversation-surfaces-deselection.test.ts} +5 -5
  811. package/src/__tests__/{session-surfaces-task-progress.test.ts → conversation-surfaces-task-progress.test.ts} +7 -7
  812. package/src/__tests__/{session-tool-setup-app-refresh.test.ts → conversation-tool-setup-app-refresh.test.ts} +5 -5
  813. package/src/__tests__/{session-tool-setup-memory-scope.test.ts → conversation-tool-setup-memory-scope.test.ts} +4 -4
  814. package/src/__tests__/{session-tool-setup-side-effect-flag.test.ts → conversation-tool-setup-side-effect-flag.test.ts} +4 -4
  815. package/src/__tests__/{session-tool-setup-tools-disabled.test.ts → conversation-tool-setup-tools-disabled.test.ts} +3 -3
  816. package/src/__tests__/{session-undo.test.ts → conversation-undo.test.ts} +1 -1
  817. package/src/__tests__/conversation-unread-route.test.ts +4 -0
  818. package/src/__tests__/{session-usage.test.ts → conversation-usage.test.ts} +1 -1
  819. package/src/__tests__/conversation-wipe.test.ts +438 -0
  820. package/src/__tests__/{session-workspace-cache-state.test.ts → conversation-workspace-cache-state.test.ts} +31 -39
  821. package/src/__tests__/{session-workspace-injection.test.ts → conversation-workspace-injection.test.ts} +60 -54
  822. package/src/__tests__/{session-workspace-tool-tracking.test.ts → conversation-workspace-tool-tracking.test.ts} +56 -50
  823. package/src/__tests__/credential-execution-admin-cli.test.ts +504 -0
  824. package/src/__tests__/credential-execution-api-key-propagation.test.ts +309 -0
  825. package/src/__tests__/credential-execution-approval-bridge.test.ts +535 -0
  826. package/src/__tests__/credential-execution-client.test.ts +380 -0
  827. package/src/__tests__/credential-execution-feature-gates.test.ts +169 -0
  828. package/src/__tests__/credential-execution-managed-contract.test.ts +526 -0
  829. package/src/__tests__/credential-execution-shell-lockdown.test.ts +149 -0
  830. package/src/__tests__/credential-execution-tools.test.ts +279 -0
  831. package/src/__tests__/credential-security-e2e.test.ts +20 -1
  832. package/src/__tests__/credential-security-invariants.test.ts +5 -8
  833. package/src/__tests__/credential-storage-oauth-compat.test.ts +606 -0
  834. package/src/__tests__/credential-storage-static-compat.test.ts +396 -0
  835. package/src/__tests__/credential-vault-unit.test.ts +227 -1
  836. package/src/__tests__/credential-vault.test.ts +0 -1
  837. package/src/__tests__/credentials-cli.test.ts +13 -22
  838. package/src/__tests__/cu-unified-flow.test.ts +8 -6
  839. package/src/__tests__/daemon-assistant-events.test.ts +15 -12
  840. package/src/__tests__/date-context.test.ts +59 -377
  841. package/src/__tests__/delete-managed-skill-tool.test.ts +0 -1
  842. package/src/__tests__/diagnostics-export.test.ts +30 -0
  843. package/src/__tests__/drop-capability-card-state-migration.test.ts +169 -0
  844. package/src/__tests__/dynamic-page-surface.test.ts +2 -2
  845. package/src/__tests__/dynamic-skill-workflow-prompt.test.ts +23 -43
  846. package/src/__tests__/emit-signal-routing-intent.test.ts +4 -4
  847. package/src/__tests__/encrypted-store.test.ts +237 -15
  848. package/src/__tests__/ephemeral-permissions.test.ts +4 -5
  849. package/src/__tests__/event-bus.test.ts +5 -9
  850. package/src/__tests__/file-edit-tool.test.ts +0 -1
  851. package/src/__tests__/file-read-tool.test.ts +0 -1
  852. package/src/__tests__/file-write-tool.test.ts +0 -1
  853. package/src/__tests__/fixtures/mock-signup-server.ts +2 -2
  854. package/src/__tests__/followup-tools.test.ts +25 -26
  855. package/src/__tests__/frontmatter.test.ts +12 -10
  856. package/src/__tests__/gateway-only-enforcement.test.ts +2 -2
  857. package/src/__tests__/gateway-only-guard.test.ts +1 -0
  858. package/src/__tests__/gemini-image-service.test.ts +4 -4
  859. package/src/__tests__/gemini-provider.test.ts +6 -9
  860. package/src/__tests__/guardian-action-late-reply.test.ts +1 -1
  861. package/src/__tests__/guardian-action-no-hardcoded-copy.test.ts +1 -1
  862. package/src/__tests__/guardian-binding-drift-heal.test.ts +128 -0
  863. package/src/__tests__/guardian-decision-primitive-canonical.test.ts +15 -15
  864. package/src/__tests__/guardian-dispatch.test.ts +9 -10
  865. package/src/__tests__/guardian-grant-minting.test.ts +5 -5
  866. package/src/__tests__/guardian-question-copy.test.ts +10 -8
  867. package/src/__tests__/guardian-routing-invariants.test.ts +61 -61
  868. package/src/__tests__/guardian-routing-state.test.ts +1 -1
  869. package/src/__tests__/guardian-verification-voice-binding.test.ts +1 -1
  870. package/src/__tests__/handlers-user-message-approval-consumption.test.ts +20 -16
  871. package/src/__tests__/headless-browser-interactions.test.ts +18 -17
  872. package/src/__tests__/headless-browser-navigate.test.ts +0 -1
  873. package/src/__tests__/headless-browser-read-tools.test.ts +5 -6
  874. package/src/__tests__/headless-browser-snapshot.test.ts +12 -9
  875. package/src/__tests__/heartbeat-service.test.ts +5 -4
  876. package/src/__tests__/hooks-ts-runner.test.ts +10 -4
  877. package/src/__tests__/host-bash-proxy.test.ts +50 -1
  878. package/src/__tests__/host-cu-proxy.test.ts +1 -1
  879. package/src/__tests__/host-file-edit-tool.test.ts +0 -1
  880. package/src/__tests__/host-file-proxy.test.ts +1 -1
  881. package/src/__tests__/host-file-read-tool.test.ts +0 -1
  882. package/src/__tests__/host-file-write-tool.test.ts +0 -1
  883. package/src/__tests__/host-shell-tool.test.ts +70 -11
  884. package/src/__tests__/http-user-message-parity.test.ts +32 -19
  885. package/src/__tests__/intent-routing.test.ts +68 -129
  886. package/src/__tests__/invite-redemption-service.test.ts +35 -0
  887. package/src/__tests__/invite-routes-http.test.ts +5 -0
  888. package/src/__tests__/keychain-broker-client.test.ts +150 -0
  889. package/src/__tests__/list-messages-attachments.test.ts +1 -1
  890. package/src/__tests__/log-export-workspace.test.ts +133 -60
  891. package/src/__tests__/managed-credential-catalog-cli.test.ts +349 -0
  892. package/src/__tests__/managed-proxy-context.test.ts +2 -5
  893. package/src/__tests__/managed-skill-lifecycle.test.ts +20 -8
  894. package/src/__tests__/managed-store.test.ts +0 -38
  895. package/src/__tests__/media-generate-image.test.ts +48 -14
  896. package/src/__tests__/media-reuse-story.e2e.test.ts +83 -71
  897. package/src/__tests__/media-visibility-policy.test.ts +10 -10
  898. package/src/__tests__/memory-context-benchmark.benchmark.test.ts +1 -1
  899. package/src/__tests__/memory-lifecycle-e2e.test.ts +24 -18
  900. package/src/__tests__/memory-query-builder.test.ts +2 -2
  901. package/src/__tests__/memory-recall-quality.test.ts +4 -3
  902. package/src/__tests__/memory-regressions.test.ts +153 -120
  903. package/src/__tests__/messaging-send-tool.test.ts +0 -2
  904. package/src/__tests__/migration-cross-version-compatibility.test.ts +32 -32
  905. package/src/__tests__/migration-export-http.test.ts +26 -27
  906. package/src/__tests__/migration-import-commit-http.test.ts +165 -37
  907. package/src/__tests__/migration-import-preflight-http.test.ts +81 -20
  908. package/src/__tests__/migration-validate-http.test.ts +16 -16
  909. package/src/__tests__/model-intents.test.ts +1 -1
  910. package/src/__tests__/no-domain-routing-in-prompt-guard.test.ts +51 -0
  911. package/src/__tests__/notification-broadcaster.test.ts +43 -41
  912. package/src/__tests__/{notification-thread-candidate-validation.test.ts → notification-conversation-candidate-validation.test.ts} +26 -24
  913. package/src/__tests__/{notification-thread-candidates.test.ts → notification-conversation-candidates.test.ts} +15 -15
  914. package/src/__tests__/notification-decision-fallback.test.ts +8 -8
  915. package/src/__tests__/notification-decision-identity.test.ts +208 -0
  916. package/src/__tests__/notification-decision-strategy.test.ts +41 -39
  917. package/src/__tests__/notification-deep-link.test.ts +19 -19
  918. package/src/__tests__/notification-guardian-path.test.ts +13 -11
  919. package/src/__tests__/notification-schedule-dedup.test.ts +7 -7
  920. package/src/__tests__/notification-telegram-adapter.test.ts +5 -5
  921. package/src/__tests__/oauth-store.test.ts +2 -8
  922. package/src/__tests__/oauth2-gateway-transport.test.ts +6 -1
  923. package/src/__tests__/onboarding-template-contract.test.ts +23 -59
  924. package/src/__tests__/permission-types.test.ts +1 -1
  925. package/src/__tests__/playbook-execution.test.ts +0 -1
  926. package/src/__tests__/playbook-tools.test.ts +0 -1
  927. package/src/__tests__/provider-commit-message-generator.test.ts +7 -6
  928. package/src/__tests__/provider-error-scenarios.test.ts +154 -0
  929. package/src/__tests__/provider-fail-open-selection.test.ts +22 -28
  930. package/src/__tests__/provider-managed-proxy-integration.test.ts +41 -63
  931. package/src/__tests__/provider-registry-ollama.test.ts +16 -2
  932. package/src/__tests__/proxy-approval-callback.test.ts +2 -2
  933. package/src/__tests__/qdrant-manager.test.ts +7 -7
  934. package/src/__tests__/ratelimit.test.ts +0 -74
  935. package/src/__tests__/recording-handler.test.ts +20 -21
  936. package/src/__tests__/relay-server.test.ts +8 -5
  937. package/src/__tests__/require-fresh-approval.test.ts +532 -0
  938. package/src/__tests__/resolve-trust-class.test.ts +2 -2
  939. package/src/__tests__/runtime-attachment-metadata.test.ts +1 -1
  940. package/src/__tests__/runtime-events-sse-parity.test.ts +22 -22
  941. package/src/__tests__/runtime-events-sse.test.ts +16 -8
  942. package/src/__tests__/scaffold-managed-skill-tool.test.ts +1 -4
  943. package/src/__tests__/schedule-tools.test.ts +0 -1
  944. package/src/__tests__/scheduler-recurrence.test.ts +46 -2
  945. package/src/__tests__/schema-transforms.test.ts +114 -54
  946. package/src/__tests__/scoped-approval-grants.test.ts +6 -6
  947. package/src/__tests__/scoped-grant-security-matrix.test.ts +1 -1
  948. package/src/__tests__/{script-proxy-session-manager.test.ts → script-proxy-conversation-manager.test.ts} +4 -1
  949. package/src/__tests__/secret-onetime-send.test.ts +20 -4
  950. package/src/__tests__/secret-response-routing.test.ts +1 -1
  951. package/src/__tests__/secret-routes-managed-proxy.test.ts +82 -2
  952. package/src/__tests__/secret-scanner-executor.test.ts +1 -4
  953. package/src/__tests__/send-endpoint-busy.test.ts +134 -62
  954. package/src/__tests__/send-notification-tool.test.ts +2 -4
  955. package/src/__tests__/sequence-store.test.ts +5 -5
  956. package/src/__tests__/shell-credential-ref.test.ts +1 -3
  957. package/src/__tests__/shell-tool-proxy-mode.test.ts +3 -5
  958. package/src/__tests__/skill-feature-flags-integration.test.ts +1 -2
  959. package/src/__tests__/skill-feature-flags.test.ts +7 -8
  960. package/src/__tests__/skill-include-graph.test.ts +1 -2
  961. package/src/__tests__/skill-load-feature-flag.test.ts +10 -11
  962. package/src/__tests__/skill-load-tool.test.ts +19 -15
  963. package/src/__tests__/skill-memory.test.ts +547 -0
  964. package/src/__tests__/skill-projection-feature-flag.test.ts +4 -6
  965. package/src/__tests__/skill-projection.benchmark.test.ts +3 -5
  966. package/src/__tests__/skill-script-runner-host.test.ts +3 -4
  967. package/src/__tests__/skill-script-runner-sandbox.test.ts +4 -6
  968. package/src/__tests__/skill-script-runner.test.ts +0 -1
  969. package/src/__tests__/skill-tool-factory.test.ts +0 -1
  970. package/src/__tests__/skills.test.ts +0 -37
  971. package/src/__tests__/slack-app-setup-skill-regression.test.ts +37 -0
  972. package/src/__tests__/slack-channel-config.test.ts +109 -94
  973. package/src/__tests__/slack-skill.test.ts +0 -4
  974. package/src/__tests__/starter-task-flow.test.ts +3 -3
  975. package/src/__tests__/subagent-manager-notify.test.ts +45 -40
  976. package/src/__tests__/subagent-tools.test.ts +78 -69
  977. package/src/__tests__/subagent-types.test.ts +3 -3
  978. package/src/__tests__/surface-mutex-cleanup.test.ts +1 -1
  979. package/src/__tests__/{swarm-session-integration.test.ts → swarm-conversation-integration.test.ts} +13 -1
  980. package/src/__tests__/swarm-recursion.test.ts +21 -9
  981. package/src/__tests__/swarm-tool.test.ts +14 -1
  982. package/src/__tests__/system-prompt.test.ts +50 -79
  983. package/src/__tests__/task-compiler.test.ts +1 -1
  984. package/src/__tests__/task-management-tools.test.ts +1 -2
  985. package/src/__tests__/telegram-config.test.ts +121 -0
  986. package/src/__tests__/terminal-sandbox.test.ts +6 -0
  987. package/src/__tests__/terminal-tools.test.ts +2 -2
  988. package/src/__tests__/token-estimator-accuracy.benchmark.test.ts +2 -2
  989. package/src/__tests__/tool-approval-handler.test.ts +2 -3
  990. package/src/__tests__/tool-audit-listener.test.ts +0 -6
  991. package/src/__tests__/tool-domain-event-publisher.test.ts +0 -11
  992. package/src/__tests__/tool-execution-abort-cleanup.test.ts +68 -16
  993. package/src/__tests__/tool-execution-pipeline.benchmark.test.ts +0 -1
  994. package/src/__tests__/tool-executor-lifecycle-events.test.ts +4 -7
  995. package/src/__tests__/tool-executor-shell-integration.test.ts +1 -2
  996. package/src/__tests__/tool-executor.test.ts +21 -21
  997. package/src/__tests__/tool-grant-request-escalation.test.ts +8 -9
  998. package/src/__tests__/tool-metrics-listener.test.ts +0 -9
  999. package/src/__tests__/tool-notification-listener.test.ts +0 -2
  1000. package/src/__tests__/tool-preview-lifecycle.test.ts +6 -6
  1001. package/src/__tests__/tool-profiling-listener.test.ts +0 -7
  1002. package/src/__tests__/tool-trace-listener.test.ts +0 -11
  1003. package/src/__tests__/trace-emitter.test.ts +9 -2
  1004. package/src/__tests__/trust-context-guards.test.ts +1 -1
  1005. package/src/__tests__/trust-store.test.ts +7 -8
  1006. package/src/__tests__/trusted-contact-approval-notifier.test.ts +1 -1
  1007. package/src/__tests__/trusted-contact-inline-approval-integration.test.ts +9 -10
  1008. package/src/__tests__/turn-commit.test.ts +3 -3
  1009. package/src/__tests__/twilio-routes.test.ts +1 -18
  1010. package/src/__tests__/ui-file-upload-surface.test.ts +2 -2
  1011. package/src/__tests__/user-reference.test.ts +82 -2
  1012. package/src/__tests__/vbundle-pax-and-symlink.test.ts +196 -0
  1013. package/src/__tests__/verification-control-plane-policy.test.ts +1 -2
  1014. package/src/__tests__/voice-scoped-grant-consumer.test.ts +4 -4
  1015. package/src/__tests__/voice-session-bridge.test.ts +31 -31
  1016. package/src/__tests__/workspace-git-service.test.ts +49 -2
  1017. package/src/__tests__/workspace-lifecycle.test.ts +6 -6
  1018. package/src/__tests__/workspace-migration-add-send-diagnostics.test.ts +59 -0
  1019. package/src/__tests__/workspace-migration-avatar-rename.test.ts +128 -0
  1020. package/src/__tests__/workspace-migration-extract-collect-usage-data.test.ts +179 -0
  1021. package/src/__tests__/workspace-migration-seed-device-id.test.ts +328 -0
  1022. package/src/__tests__/workspace-migrations-runner.test.ts +293 -0
  1023. package/src/acp/agent-process.ts +201 -0
  1024. package/src/acp/client-handler.ts +361 -0
  1025. package/src/acp/index.ts +44 -0
  1026. package/src/acp/session-manager.ts +348 -0
  1027. package/src/acp/types.ts +79 -0
  1028. package/src/approvals/AGENTS.md +2 -2
  1029. package/src/approvals/approval-primitive.ts +4 -4
  1030. package/src/approvals/guardian-decision-primitive.ts +7 -7
  1031. package/src/approvals/guardian-request-resolvers.ts +4 -4
  1032. package/src/avatar/ascii-renderer.ts +63 -0
  1033. package/src/avatar/character-components.ts +454 -0
  1034. package/src/avatar/png-renderer.ts +17 -0
  1035. package/src/avatar/resvg-lazy.ts +21 -0
  1036. package/src/avatar/svg-compositor.ts +90 -0
  1037. package/src/avatar/traits-png-sync.ts +133 -0
  1038. package/src/calls/call-controller.ts +8 -8
  1039. package/src/calls/call-conversation-messages.ts +1 -1
  1040. package/src/calls/call-domain.ts +4 -4
  1041. package/src/calls/call-pointer-message-composer.ts +2 -2
  1042. package/src/calls/call-pointer-messages.ts +10 -10
  1043. package/src/calls/guardian-action-sweep.ts +3 -3
  1044. package/src/calls/guardian-dispatch.ts +8 -8
  1045. package/src/calls/guardian-question-copy.ts +7 -7
  1046. package/src/calls/relay-access-wait.ts +2 -2
  1047. package/src/calls/relay-server.ts +4 -4
  1048. package/src/calls/twilio-rest.ts +0 -248
  1049. package/src/calls/twilio-routes.ts +1 -1
  1050. package/src/calls/voice-session-bridge.ts +59 -56
  1051. package/src/cli/AGENTS.md +6 -9
  1052. package/src/cli/__tests__/notifications.test.ts +5 -5
  1053. package/src/cli/commands/avatar.ts +343 -0
  1054. package/src/cli/commands/bash.ts +3 -3
  1055. package/src/cli/commands/channel-verification-sessions.ts +7 -4
  1056. package/src/cli/commands/completions.ts +4 -4
  1057. package/src/cli/commands/config.ts +52 -7
  1058. package/src/cli/commands/conversations.ts +386 -0
  1059. package/src/cli/commands/credential-execution.ts +345 -0
  1060. package/src/cli/commands/credentials.ts +108 -6
  1061. package/src/cli/commands/doctor.ts +9 -3
  1062. package/src/cli/commands/keys.ts +30 -0
  1063. package/src/cli/commands/mcp.ts +2 -2
  1064. package/src/cli/commands/memory.ts +8 -8
  1065. package/src/cli/commands/notifications.ts +4 -4
  1066. package/src/cli/commands/oauth/connections.ts +98 -17
  1067. package/src/cli/commands/oauth/providers.ts +45 -8
  1068. package/src/cli/commands/shotgun.ts +250 -0
  1069. package/src/cli/main-screen.tsx +3 -29
  1070. package/src/cli/program.ts +13 -3
  1071. package/src/cli.ts +169 -235
  1072. package/src/config/acp-schema.ts +47 -0
  1073. package/src/config/bundled-skills/_shared/CLI_RETRIEVAL_PATTERN.md +14 -12
  1074. package/src/config/bundled-skills/acp/SKILL.md +58 -0
  1075. package/src/config/bundled-skills/acp/TOOLS.json +79 -0
  1076. package/src/config/bundled-skills/{settings/tools/set-avatar.ts → acp/tools/acp-abort.ts} +2 -2
  1077. package/src/config/bundled-skills/acp/tools/acp-spawn.ts +12 -0
  1078. package/src/config/bundled-skills/acp/tools/acp-status.ts +12 -0
  1079. package/src/config/bundled-skills/app-builder/SKILL.md +63 -47
  1080. package/src/config/bundled-skills/app-builder/TOOLS.json +10 -10
  1081. package/src/config/bundled-skills/browser/SKILL.md +17 -16
  1082. package/src/config/bundled-skills/browser/TOOLS.json +16 -16
  1083. package/src/config/bundled-skills/browser/tools/browser-wait-for-download.ts +1 -1
  1084. package/src/config/bundled-skills/chatgpt-import/SKILL.md +2 -3
  1085. package/src/config/bundled-skills/chatgpt-import/TOOLS.json +1 -1
  1086. package/src/config/bundled-skills/chatgpt-import/tools/chatgpt-import.ts +1 -1
  1087. package/src/config/bundled-skills/claude-code/SKILL.md +6 -7
  1088. package/src/config/bundled-skills/claude-code/TOOLS.json +1 -1
  1089. package/src/config/bundled-skills/computer-use/SKILL.md +3 -5
  1090. package/src/config/bundled-skills/computer-use/TOOLS.json +15 -15
  1091. package/src/config/bundled-skills/contacts/SKILL.md +3 -4
  1092. package/src/config/bundled-skills/contacts/TOOLS.json +8 -4
  1093. package/src/config/bundled-skills/contacts/tools/google-contacts.ts +5 -1
  1094. package/src/config/bundled-skills/document/SKILL.md +4 -4
  1095. package/src/config/bundled-skills/document/TOOLS.json +2 -2
  1096. package/src/config/bundled-skills/followups/SKILL.md +1 -1
  1097. package/src/config/bundled-skills/followups/TOOLS.json +10 -10
  1098. package/src/config/bundled-skills/gmail/SKILL.md +32 -33
  1099. package/src/config/bundled-skills/gmail/TOOLS.json +16 -16
  1100. package/src/config/bundled-skills/gmail/tools/gmail-archive.ts +1 -1
  1101. package/src/config/bundled-skills/gmail/tools/gmail-sender-digest.ts +1 -1
  1102. package/src/config/bundled-skills/google-calendar/SKILL.md +1 -2
  1103. package/src/config/bundled-skills/google-calendar/TOOLS.json +5 -5
  1104. package/src/config/bundled-skills/google-calendar/tools/calendar-check-availability.ts +1 -1
  1105. package/src/config/bundled-skills/google-calendar/tools/calendar-create-event.ts +1 -1
  1106. package/src/config/bundled-skills/google-calendar/tools/calendar-get-event.ts +1 -1
  1107. package/src/config/bundled-skills/google-calendar/tools/calendar-list-events.ts +1 -1
  1108. package/src/config/bundled-skills/google-calendar/tools/calendar-rsvp.ts +1 -1
  1109. package/src/config/bundled-skills/google-calendar/tools/shared.ts +1 -5
  1110. package/src/config/bundled-skills/google-calendar/types.ts +1 -1
  1111. package/src/config/bundled-skills/heartbeat/SKILL.md +43 -0
  1112. package/src/config/bundled-skills/image-studio/SKILL.md +3 -4
  1113. package/src/config/bundled-skills/image-studio/TOOLS.json +2 -3
  1114. package/src/config/bundled-skills/image-studio/tools/media-generate-image.ts +44 -23
  1115. package/src/config/bundled-skills/media-processing/SKILL.md +40 -40
  1116. package/src/config/bundled-skills/media-processing/TOOLS.json +8 -8
  1117. package/src/config/bundled-skills/media-processing/__tests__/concurrency-pool.test.ts +2 -2
  1118. package/src/config/bundled-skills/media-processing/__tests__/preprocess.test.ts +1 -1
  1119. package/src/config/bundled-skills/media-processing/services/gemini-map.ts +5 -5
  1120. package/src/config/bundled-skills/media-processing/services/gemini-video.ts +2 -2
  1121. package/src/config/bundled-skills/media-processing/services/preprocess.ts +7 -3
  1122. package/src/config/bundled-skills/media-processing/services/processing-pipeline.ts +2 -2
  1123. package/src/config/bundled-skills/media-processing/services/reduce.ts +3 -3
  1124. package/src/config/bundled-skills/media-processing/tools/analyze-keyframes.ts +3 -3
  1125. package/src/config/bundled-skills/media-processing/tools/generate-clip.ts +2 -2
  1126. package/src/config/bundled-skills/media-processing/tools/query-media-events.ts +1 -1
  1127. package/src/config/bundled-skills/messaging/SKILL.md +39 -37
  1128. package/src/config/bundled-skills/messaging/TOOLS.json +11 -15
  1129. package/src/config/bundled-skills/messaging/tools/messaging-send.ts +1 -1
  1130. package/src/config/bundled-skills/messaging/tools/shared.ts +1 -1
  1131. package/src/config/bundled-skills/notifications/SKILL.md +5 -6
  1132. package/src/config/bundled-skills/notifications/TOOLS.json +3 -3
  1133. package/src/config/bundled-skills/notifications/tools/send-notification.ts +3 -3
  1134. package/src/config/bundled-skills/orchestration/SKILL.md +5 -2
  1135. package/src/config/bundled-skills/orchestration/TOOLS.json +1 -1
  1136. package/src/config/bundled-skills/phone-calls/SKILL.md +37 -21
  1137. package/src/config/bundled-skills/phone-calls/TOOLS.json +3 -3
  1138. package/src/config/bundled-skills/phone-calls/references/CONFIG.md +2 -2
  1139. package/src/config/bundled-skills/phone-calls/references/TRANSCRIPTS.md +2 -2
  1140. package/src/config/bundled-skills/phone-calls/references/TROUBLESHOOTING.md +1 -1
  1141. package/src/config/bundled-skills/playbooks/TOOLS.json +4 -4
  1142. package/src/config/bundled-skills/schedule/SKILL.md +26 -26
  1143. package/src/config/bundled-skills/schedule/TOOLS.json +5 -5
  1144. package/src/config/bundled-skills/screen-watch/SKILL.md +3 -4
  1145. package/src/config/bundled-skills/screen-watch/TOOLS.json +1 -1
  1146. package/src/config/bundled-skills/sequences/SKILL.md +2 -3
  1147. package/src/config/bundled-skills/sequences/TOOLS.json +14 -14
  1148. package/src/config/bundled-skills/sequences/tools/sequence-analytics.ts +2 -2
  1149. package/src/config/bundled-skills/sequences/tools/sequence-create.ts +2 -1
  1150. package/src/config/bundled-skills/sequences/tools/sequence-enroll.ts +2 -2
  1151. package/src/config/bundled-skills/sequences/tools/sequence-enrollment-list.ts +1 -1
  1152. package/src/config/bundled-skills/sequences/tools/sequence-get.ts +1 -1
  1153. package/src/config/bundled-skills/sequences/tools/sequence-import.ts +3 -3
  1154. package/src/config/bundled-skills/sequences/tools/sequence-list.ts +1 -1
  1155. package/src/config/bundled-skills/sequences/tools/sequence-update.ts +3 -2
  1156. package/src/config/bundled-skills/settings/SKILL.md +2 -3
  1157. package/src/config/bundled-skills/settings/TOOLS.json +3 -25
  1158. package/src/config/bundled-skills/settings/tools/open-system-settings.ts +1 -1
  1159. package/src/config/bundled-skills/skill-management/SKILL.md +0 -1
  1160. package/src/config/bundled-skills/skill-management/TOOLS.json +5 -13
  1161. package/src/config/bundled-skills/skills-catalog/SKILL.md +84 -0
  1162. package/src/config/bundled-skills/slack/SKILL.md +2 -3
  1163. package/src/config/bundled-skills/slack/TOOLS.json +8 -8
  1164. package/src/config/bundled-skills/slack/tools/slack-scan-digest.ts +3 -3
  1165. package/src/config/bundled-skills/subagent/SKILL.md +2 -2
  1166. package/src/config/bundled-skills/subagent/TOOLS.json +7 -7
  1167. package/src/config/bundled-skills/tasks/SKILL.md +1 -1
  1168. package/src/config/bundled-skills/tasks/TOOLS.json +9 -9
  1169. package/src/config/bundled-skills/transcribe/SKILL.md +5 -5
  1170. package/src/config/bundled-skills/transcribe/TOOLS.json +1 -1
  1171. package/src/config/bundled-skills/transcribe/tools/transcribe-media.ts +43 -13
  1172. package/src/config/bundled-skills/watcher/SKILL.md +4 -4
  1173. package/src/config/bundled-skills/watcher/TOOLS.json +5 -5
  1174. package/src/config/bundled-tool-registry.ts +9 -2
  1175. package/src/config/env.ts +44 -2
  1176. package/src/config/feature-flag-registry.json +185 -33
  1177. package/src/config/loader.ts +3 -0
  1178. package/src/config/raw-config-utils.ts +30 -0
  1179. package/src/config/schema-utils.ts +27 -0
  1180. package/src/config/schema.ts +54 -39
  1181. package/src/config/schemas/calls.ts +219 -152
  1182. package/src/config/schemas/channels.ts +118 -71
  1183. package/src/config/schemas/elevenlabs.ts +39 -24
  1184. package/src/config/schemas/heartbeat.ts +13 -4
  1185. package/src/config/schemas/inference.ts +155 -99
  1186. package/src/config/schemas/ingress.ts +100 -64
  1187. package/src/config/schemas/logging.ts +24 -15
  1188. package/src/config/schemas/mcp.ts +95 -44
  1189. package/src/config/schemas/memory-lifecycle.ts +70 -50
  1190. package/src/config/schemas/memory-processing.ts +46 -25
  1191. package/src/config/schemas/memory-retrieval.ts +206 -139
  1192. package/src/config/schemas/memory-storage.ts +113 -79
  1193. package/src/config/schemas/memory.ts +33 -28
  1194. package/src/config/schemas/notifications.ts +12 -7
  1195. package/src/config/schemas/platform.ts +62 -39
  1196. package/src/config/schemas/sandbox.ts +10 -5
  1197. package/src/config/schemas/security.ts +72 -41
  1198. package/src/config/schemas/services.ts +64 -0
  1199. package/src/config/schemas/skills.ts +131 -81
  1200. package/src/config/schemas/swarm.ts +78 -46
  1201. package/src/config/schemas/timeouts.ts +54 -41
  1202. package/src/config/schemas/workspace-git.ts +219 -162
  1203. package/src/config/skill-state.ts +6 -47
  1204. package/src/config/skills.ts +66 -271
  1205. package/src/config/types.ts +5 -0
  1206. package/src/contacts/contact-store.ts +82 -7
  1207. package/src/contacts/contacts-write.ts +13 -2
  1208. package/src/context/window-manager.ts +1 -1
  1209. package/src/credential-execution/approval-bridge.ts +350 -0
  1210. package/src/credential-execution/client.ts +414 -0
  1211. package/src/credential-execution/executable-discovery.ts +169 -0
  1212. package/src/credential-execution/feature-gates.ts +75 -0
  1213. package/src/credential-execution/managed-catalog.ts +155 -0
  1214. package/src/credential-execution/process-manager.ts +451 -0
  1215. package/src/daemon/approval-generators.ts +13 -7
  1216. package/src/daemon/assistant-attachments.ts +3 -3
  1217. package/src/daemon/config-watcher.ts +23 -15
  1218. package/src/daemon/context-overflow-policy.ts +5 -5
  1219. package/src/daemon/context-overflow-reducer.ts +2 -2
  1220. package/src/daemon/{session-agent-loop-handlers.ts → conversation-agent-loop-handlers.ts} +23 -23
  1221. package/src/daemon/{session-agent-loop.ts → conversation-agent-loop.ts} +99 -101
  1222. package/src/daemon/{session-attachments.ts → conversation-attachments.ts} +35 -9
  1223. package/src/daemon/{session-error.ts → conversation-error.ts} +58 -24
  1224. package/src/daemon/conversation-evictor.ts +204 -0
  1225. package/src/daemon/{session-history.ts → conversation-history.ts} +37 -33
  1226. package/src/daemon/{session-lifecycle.ts → conversation-lifecycle.ts} +16 -16
  1227. package/src/daemon/{session-memory.ts → conversation-memory.ts} +9 -8
  1228. package/src/daemon/{session-messaging.ts → conversation-messaging.ts} +9 -9
  1229. package/src/daemon/{session-notifiers.ts → conversation-notifiers.ts} +25 -25
  1230. package/src/daemon/{session-process.ts → conversation-process.ts} +128 -131
  1231. package/src/daemon/{session-queue-manager.ts → conversation-queue-manager.ts} +11 -8
  1232. package/src/daemon/{session-runtime-assembly.ts → conversation-runtime-assembly.ts} +156 -285
  1233. package/src/daemon/{session-skill-tools.ts → conversation-skill-tools.ts} +18 -18
  1234. package/src/daemon/{session-slash.ts → conversation-slash.ts} +42 -88
  1235. package/src/daemon/{session-surfaces.ts → conversation-surfaces.ts} +48 -34
  1236. package/src/daemon/{session-tool-setup.ts → conversation-tool-setup.ts} +50 -44
  1237. package/src/daemon/{session-usage.ts → conversation-usage.ts} +1 -1
  1238. package/src/daemon/{session-workspace.ts → conversation-workspace.ts} +3 -3
  1239. package/src/daemon/{session.ts → conversation.ts} +98 -73
  1240. package/src/daemon/daemon-control.ts +1 -1
  1241. package/src/daemon/date-context.ts +10 -83
  1242. package/src/daemon/doordash-steps.ts +9 -8
  1243. package/src/daemon/guardian-action-generators.ts +8 -2
  1244. package/src/daemon/handlers/config-channels.ts +19 -6
  1245. package/src/daemon/handlers/config-model.ts +33 -32
  1246. package/src/daemon/handlers/config-slack-channel.ts +35 -7
  1247. package/src/daemon/handlers/config-telegram.ts +6 -1
  1248. package/src/daemon/handlers/config-voice.ts +1 -2
  1249. package/src/daemon/handlers/{session-history.ts → conversation-history.ts} +4 -4
  1250. package/src/daemon/handlers/{sessions.ts → conversations.ts} +165 -185
  1251. package/src/daemon/handlers/recording.ts +20 -20
  1252. package/src/daemon/handlers/shared.ts +17 -17
  1253. package/src/daemon/handlers/skills.ts +168 -21
  1254. package/src/daemon/history-repair.ts +1 -1
  1255. package/src/daemon/host-bash-proxy.ts +11 -3
  1256. package/src/daemon/host-cu-proxy.ts +2 -2
  1257. package/src/daemon/host-file-proxy.ts +3 -3
  1258. package/src/daemon/lifecycle.ts +131 -82
  1259. package/src/daemon/main.ts +4 -0
  1260. package/src/daemon/media-visibility-policy.ts +10 -10
  1261. package/src/daemon/message-protocol.ts +11 -8
  1262. package/src/daemon/message-types/acp.ts +66 -0
  1263. package/src/daemon/message-types/computer-use.ts +4 -4
  1264. package/src/daemon/message-types/{sessions.ts → conversations.ts} +74 -80
  1265. package/src/daemon/message-types/documents.ts +2 -2
  1266. package/src/daemon/message-types/host-bash.ts +3 -1
  1267. package/src/daemon/message-types/host-cu.ts +1 -1
  1268. package/src/daemon/message-types/host-file.ts +3 -3
  1269. package/src/daemon/message-types/integrations.ts +2 -2
  1270. package/src/daemon/message-types/messages.ts +23 -23
  1271. package/src/daemon/message-types/notifications.ts +5 -5
  1272. package/src/daemon/message-types/settings.ts +1 -1
  1273. package/src/daemon/message-types/shared.ts +5 -3
  1274. package/src/daemon/message-types/skills.ts +1 -10
  1275. package/src/daemon/message-types/subagents.ts +2 -2
  1276. package/src/daemon/message-types/surfaces.ts +7 -7
  1277. package/src/daemon/message-types/work-items.ts +4 -4
  1278. package/src/daemon/parse-actual-tokens-from-error.test.ts +3 -7
  1279. package/src/daemon/providers-setup.ts +79 -0
  1280. package/src/daemon/seed-files.ts +7 -26
  1281. package/src/daemon/server.ts +452 -214
  1282. package/src/daemon/shutdown-handlers.ts +9 -3
  1283. package/src/daemon/startup-error.ts +126 -0
  1284. package/src/daemon/tool-side-effects.ts +42 -18
  1285. package/src/daemon/trace-emitter.ts +28 -5
  1286. package/src/daemon/verification-session-intent.ts +1 -1
  1287. package/src/daemon/watch-handler.ts +23 -21
  1288. package/src/email/feature-gate.ts +23 -0
  1289. package/src/events/domain-events.ts +3 -9
  1290. package/src/events/tool-domain-event-publisher.ts +0 -8
  1291. package/src/events/tool-metrics-listener.ts +0 -7
  1292. package/src/events/tool-permission-telemetry-listener.ts +46 -0
  1293. package/src/export/formatter.ts +1 -1
  1294. package/src/followups/followup-store.ts +8 -5
  1295. package/src/followups/types.ts +2 -2
  1296. package/src/heartbeat/heartbeat-service.ts +1 -1
  1297. package/src/hooks/discovery.ts +3 -0
  1298. package/src/hooks/manager.ts +27 -2
  1299. package/src/hooks/types.ts +4 -1
  1300. package/src/inbound/platform-callback-registration.ts +6 -2
  1301. package/src/instrument.ts +37 -19
  1302. package/src/media/app-icon-generator.ts +17 -10
  1303. package/src/media/avatar-router.ts +17 -10
  1304. package/src/media/gemini-image-service.ts +125 -21
  1305. package/src/memory/app-git-service.ts +3 -3
  1306. package/src/memory/attachments-store.ts +92 -27
  1307. package/src/memory/canonical-guardian-store.ts +37 -27
  1308. package/src/memory/channel-verification-sessions.ts +6 -6
  1309. package/src/memory/checkpoints.ts +5 -0
  1310. package/src/memory/conversation-bootstrap.ts +2 -2
  1311. package/src/memory/conversation-crud.ts +343 -23
  1312. package/src/memory/conversation-key-store.ts +40 -4
  1313. package/src/memory/conversation-queries.ts +8 -6
  1314. package/src/memory/conversation-starters-cadence.ts +74 -0
  1315. package/src/memory/conversation-title-service.ts +2 -3
  1316. package/src/memory/db-init.ts +70 -2
  1317. package/src/memory/embedding-backend.ts +71 -11
  1318. package/src/memory/external-conversation-store.ts +1 -1
  1319. package/src/memory/guardian-action-store.ts +3 -3
  1320. package/src/memory/indexer.ts +20 -9
  1321. package/src/memory/invite-store.ts +4 -4
  1322. package/src/memory/items-extractor.ts +48 -4
  1323. package/src/memory/job-handlers/backfill.ts +15 -8
  1324. package/src/memory/job-handlers/cleanup.ts +1 -1
  1325. package/src/memory/job-handlers/conversation-starters.ts +433 -0
  1326. package/src/memory/jobs-store.ts +5 -7
  1327. package/src/memory/jobs-worker.ts +10 -0
  1328. package/src/memory/lifecycle-events-store.ts +63 -0
  1329. package/src/memory/migrations/033-scoped-approval-grants.ts +4 -4
  1330. package/src/memory/migrations/102-alter-table-columns.ts +5 -0
  1331. package/src/memory/migrations/105-contacts-and-triage.ts +3 -3
  1332. package/src/memory/migrations/111-media-assets.ts +1 -106
  1333. package/src/memory/migrations/121-canonical-guardian-requests.ts +5 -5
  1334. package/src/memory/migrations/159-drop-contact-interaction-columns.ts +5 -0
  1335. package/src/memory/migrations/161-drop-orphaned-media-tables.ts +18 -0
  1336. package/src/memory/migrations/162-guardian-timestamps-epoch-ms.ts +283 -0
  1337. package/src/memory/migrations/163-rename-notification-thread-columns.ts +35 -0
  1338. package/src/memory/migrations/164-rename-conversation-type-column.ts +19 -0
  1339. package/src/memory/migrations/165-rename-inbox-thread-state-table.ts +15 -0
  1340. package/src/memory/migrations/166-rename-followups-thread-id.ts +20 -0
  1341. package/src/memory/migrations/167-rename-sequence-enrollments-thread-id.ts +20 -0
  1342. package/src/memory/migrations/168-rename-sequence-steps-reply-key.ts +17 -0
  1343. package/src/memory/migrations/169-rename-gmail-provider-key-to-google.ts +64 -0
  1344. package/src/memory/migrations/170-thread-starters-table.ts +32 -0
  1345. package/src/memory/migrations/171-capability-card-columns.ts +43 -0
  1346. package/src/memory/migrations/172-rename-created-by-session-id.ts +27 -0
  1347. package/src/memory/migrations/173-rename-source-session-id.ts +16 -0
  1348. package/src/memory/migrations/174-rename-thread-starters-table.ts +52 -0
  1349. package/src/memory/migrations/175-create-lifecycle-events.ts +15 -0
  1350. package/src/memory/migrations/176-drop-capability-card-state.ts +36 -0
  1351. package/src/memory/migrations/177-create-trace-events-table.ts +40 -0
  1352. package/src/memory/migrations/index.ts +17 -0
  1353. package/src/memory/migrations/registry.ts +32 -0
  1354. package/src/memory/retriever.test.ts +223 -96
  1355. package/src/memory/retriever.ts +115 -138
  1356. package/src/memory/schema/calls.ts +1 -1
  1357. package/src/memory/schema/contacts.ts +3 -3
  1358. package/src/memory/schema/conversations.ts +2 -2
  1359. package/src/memory/schema/guardian.ts +9 -9
  1360. package/src/memory/schema/infrastructure.ts +29 -0
  1361. package/src/memory/schema/memory-core.ts +27 -0
  1362. package/src/memory/schema/notifications.ts +5 -5
  1363. package/src/memory/schema/tasks.ts +1 -1
  1364. package/src/memory/scoped-approval-grants.ts +14 -14
  1365. package/src/memory/search/formatting.ts +23 -6
  1366. package/src/memory/search/lexical.ts +2 -0
  1367. package/src/memory/search/semantic.ts +2 -0
  1368. package/src/memory/search/staleness.ts +1 -0
  1369. package/src/memory/search/types.ts +7 -3
  1370. package/src/memory/task-memory-cleanup.ts +96 -6
  1371. package/src/memory/trace-event-store.ts +148 -0
  1372. package/src/memory/turn-events-store.ts +48 -0
  1373. package/src/messaging/providers/telegram-bot/adapter.ts +1 -1
  1374. package/src/notifications/AGENTS.md +1 -1
  1375. package/src/notifications/README.md +103 -103
  1376. package/src/notifications/adapters/slack.ts +3 -3
  1377. package/src/notifications/adapters/telegram.ts +3 -3
  1378. package/src/notifications/broadcaster.ts +40 -40
  1379. package/src/notifications/{thread-candidates.ts → conversation-candidates.ts} +18 -18
  1380. package/src/notifications/conversation-pairing.ts +35 -31
  1381. package/src/notifications/{thread-seed-composer.ts → conversation-seed-composer.ts} +9 -9
  1382. package/src/notifications/decision-engine.ts +107 -84
  1383. package/src/notifications/deliveries-store.ts +14 -14
  1384. package/src/notifications/emit-signal.ts +16 -16
  1385. package/src/notifications/events-store.ts +4 -4
  1386. package/src/notifications/signal.ts +3 -3
  1387. package/src/notifications/types.ts +16 -12
  1388. package/src/oauth/byo-connection.test.ts +1 -1
  1389. package/src/oauth/manual-token-connection.ts +49 -25
  1390. package/src/oauth/oauth-store.ts +37 -15
  1391. package/src/oauth/platform-connection.test.ts +2 -2
  1392. package/src/oauth/provider-behaviors.ts +2 -1
  1393. package/src/oauth/seed-providers.ts +3 -11
  1394. package/src/oauth/token-persistence.ts +41 -25
  1395. package/src/outbound-proxy/index.ts +27 -3
  1396. package/src/permissions/checker.ts +21 -7
  1397. package/src/permissions/defaults.ts +4 -4
  1398. package/src/permissions/prompter.ts +3 -3
  1399. package/src/permissions/secret-prompter.ts +2 -2
  1400. package/src/permissions/types.ts +2 -2
  1401. package/src/prompts/__tests__/build-cli-reference-section.test.ts +10 -40
  1402. package/src/prompts/cache-boundary.ts +8 -0
  1403. package/src/prompts/system-prompt.ts +155 -743
  1404. package/src/prompts/templates/BOOTSTRAP.md +166 -33
  1405. package/src/prompts/templates/IDENTITY.md +8 -23
  1406. package/src/prompts/templates/SOUL.md +20 -41
  1407. package/src/prompts/templates/UPDATES.md +0 -12
  1408. package/src/prompts/templates/USER.md +3 -19
  1409. package/src/prompts/update-bulletin-format.ts +16 -0
  1410. package/src/prompts/update-bulletin.ts +18 -6
  1411. package/src/prompts/user-reference.ts +14 -16
  1412. package/src/providers/anthropic/client.ts +181 -13
  1413. package/src/providers/gemini/client.ts +6 -9
  1414. package/src/providers/managed-proxy/constants.ts +1 -7
  1415. package/src/providers/managed-proxy/context.ts +26 -1
  1416. package/src/providers/model-intents.ts +5 -5
  1417. package/src/providers/openai/client.ts +10 -1
  1418. package/src/providers/openrouter/client.ts +1 -0
  1419. package/src/providers/provider-availability.ts +39 -0
  1420. package/src/providers/provider-send-message.ts +20 -6
  1421. package/src/providers/ratelimit.ts +0 -35
  1422. package/src/providers/registry.ts +119 -82
  1423. package/src/providers/retry.ts +18 -1
  1424. package/src/runtime/AGENTS.md +5 -5
  1425. package/src/runtime/access-request-helper.ts +3 -3
  1426. package/src/runtime/actor-trust-resolver.ts +2 -2
  1427. package/src/runtime/approval-conversation-turn.ts +2 -2
  1428. package/src/runtime/assistant-event-hub.ts +9 -9
  1429. package/src/runtime/assistant-event.ts +5 -5
  1430. package/src/runtime/auth/__tests__/context.test.ts +2 -2
  1431. package/src/runtime/auth/__tests__/external-assistant-id.test.ts +88 -0
  1432. package/src/runtime/auth/__tests__/guard-tests.test.ts +1 -5
  1433. package/src/runtime/auth/__tests__/local-auth-context.test.ts +4 -4
  1434. package/src/runtime/auth/__tests__/middleware.test.ts +2 -2
  1435. package/src/runtime/auth/__tests__/subject.test.ts +6 -6
  1436. package/src/runtime/auth/context.ts +1 -1
  1437. package/src/runtime/auth/credential-service.ts +1 -1
  1438. package/src/runtime/auth/external-assistant-id.ts +36 -17
  1439. package/src/runtime/auth/route-policy.ts +24 -0
  1440. package/src/runtime/auth/subject.ts +7 -7
  1441. package/src/runtime/auth/types.ts +1 -1
  1442. package/src/runtime/channel-approval-types.ts +1 -1
  1443. package/src/runtime/channel-approvals.ts +9 -6
  1444. package/src/runtime/channel-invite-transport.ts +10 -7
  1445. package/src/runtime/channel-readiness-service.ts +5 -2
  1446. package/src/runtime/channel-retry-sweep.ts +1 -1
  1447. package/src/runtime/channel-verification-service.ts +2 -2
  1448. package/src/runtime/confirmation-request-guardian-bridge.ts +4 -4
  1449. package/src/runtime/{session-approval-overrides.ts → conversation-approval-overrides.ts} +6 -6
  1450. package/src/runtime/guardian-action-grant-minter.ts +2 -4
  1451. package/src/runtime/guardian-action-service.ts +2 -2
  1452. package/src/runtime/guardian-decision-types.ts +13 -8
  1453. package/src/runtime/guardian-reply-router.ts +4 -4
  1454. package/src/runtime/guardian-vellum-migration.ts +63 -1
  1455. package/src/runtime/http-server.ts +76 -35
  1456. package/src/runtime/http-types.ts +19 -15
  1457. package/src/runtime/invite-redemption-service.ts +8 -3
  1458. package/src/runtime/local-actor-identity.ts +9 -7
  1459. package/src/runtime/migrations/vbundle-builder.ts +212 -32
  1460. package/src/runtime/migrations/vbundle-import-analyzer.ts +74 -8
  1461. package/src/runtime/migrations/vbundle-importer.ts +66 -1
  1462. package/src/runtime/migrations/vbundle-validator.ts +17 -3
  1463. package/src/runtime/pending-interactions.ts +8 -8
  1464. package/src/runtime/routes/acp-routes.ts +170 -0
  1465. package/src/runtime/routes/approval-routes.ts +3 -3
  1466. package/src/runtime/routes/approval-strategies/guardian-callback-strategy.ts +5 -5
  1467. package/src/runtime/routes/attachment-routes.ts +2 -2
  1468. package/src/runtime/routes/avatar-routes.ts +83 -0
  1469. package/src/runtime/routes/btw-routes.ts +36 -13
  1470. package/src/runtime/routes/canonical-guardian-expiry-sweep.ts +1 -1
  1471. package/src/runtime/routes/channel-route-shared.ts +5 -3
  1472. package/src/runtime/routes/channel-verification-routes.ts +22 -5
  1473. package/src/runtime/routes/conversation-management-routes.ts +298 -0
  1474. package/src/runtime/routes/{session-query-routes.ts → conversation-query-routes.ts} +23 -20
  1475. package/src/runtime/routes/conversation-routes.ts +196 -169
  1476. package/src/runtime/routes/conversation-starter-routes.ts +207 -0
  1477. package/src/runtime/routes/debug-routes.ts +8 -2
  1478. package/src/runtime/routes/diagnostics-routes.ts +16 -17
  1479. package/src/runtime/routes/events-routes.ts +1 -1
  1480. package/src/runtime/routes/guardian-action-routes.ts +4 -4
  1481. package/src/runtime/routes/guardian-approval-interception.ts +1 -1
  1482. package/src/runtime/routes/guardian-bootstrap-routes.ts +13 -9
  1483. package/src/runtime/routes/host-bash-routes.ts +1 -1
  1484. package/src/runtime/routes/host-cu-routes.ts +1 -1
  1485. package/src/runtime/routes/host-file-routes.ts +1 -1
  1486. package/src/runtime/routes/inbound-message-handler.ts +1 -1
  1487. package/src/runtime/routes/inbound-stages/background-dispatch.ts +1 -1
  1488. package/src/runtime/routes/inbound-stages/escalation-intercept.ts +2 -2
  1489. package/src/runtime/routes/inbound-stages/secret-ingress-check.ts +1 -1
  1490. package/src/runtime/routes/inbound-stages/verification-intercept.ts +1 -1
  1491. package/src/runtime/routes/log-export-routes.ts +360 -40
  1492. package/src/runtime/routes/migration-routes.ts +25 -13
  1493. package/src/runtime/routes/recording-routes.ts +5 -5
  1494. package/src/runtime/routes/schedule-routes.ts +13 -7
  1495. package/src/runtime/routes/secret-routes.ts +196 -18
  1496. package/src/runtime/routes/settings-routes.ts +31 -18
  1497. package/src/runtime/routes/skills-routes.ts +38 -0
  1498. package/src/runtime/routes/subagents-routes.ts +10 -10
  1499. package/src/runtime/routes/surface-action-routes.ts +45 -45
  1500. package/src/runtime/routes/surface-content-routes.ts +18 -18
  1501. package/src/runtime/routes/telemetry-routes.ts +53 -0
  1502. package/src/runtime/routes/trace-event-routes.ts +62 -0
  1503. package/src/runtime/routes/watch-routes.ts +6 -6
  1504. package/src/runtime/routes/work-items-routes.test.ts +109 -0
  1505. package/src/runtime/routes/work-items-routes.ts +47 -46
  1506. package/src/runtime/tool-grant-request-helper.ts +4 -4
  1507. package/src/runtime/trust-context-resolver.ts +1 -1
  1508. package/src/runtime/verification-outbound-actions.ts +47 -31
  1509. package/src/schedule/scheduler.ts +14 -12
  1510. package/src/security/credential-backend.ts +29 -5
  1511. package/src/security/encrypted-store.ts +292 -48
  1512. package/src/security/keychain-broker-client.ts +45 -12
  1513. package/src/security/secure-keys.ts +46 -0
  1514. package/src/security/token-manager.ts +67 -167
  1515. package/src/sequence/engine.ts +12 -11
  1516. package/src/sequence/reply-matcher.ts +16 -13
  1517. package/src/sequence/store.ts +10 -7
  1518. package/src/sequence/types.ts +2 -2
  1519. package/src/signals/bash.ts +4 -4
  1520. package/src/signals/cancel.ts +14 -17
  1521. package/src/signals/confirm.ts +4 -7
  1522. package/src/signals/conversation-undo.ts +16 -20
  1523. package/src/signals/event-stream.ts +187 -0
  1524. package/src/signals/shotgun.ts +200 -0
  1525. package/src/signals/trust-rule.ts +3 -6
  1526. package/src/signals/user-message.ts +146 -0
  1527. package/src/skills/catalog-install.ts +11 -1
  1528. package/src/skills/managed-store.ts +2 -13
  1529. package/src/skills/skill-memory.ts +220 -0
  1530. package/src/subagent/manager.ts +83 -75
  1531. package/src/subagent/types.ts +5 -5
  1532. package/src/swarm/backend-claude-code.ts +1 -1
  1533. package/src/tasks/SPEC.md +5 -5
  1534. package/src/tasks/task-runner.ts +1 -1
  1535. package/src/telemetry/types.ts +35 -0
  1536. package/src/telemetry/usage-telemetry-reporter.test.ts +145 -24
  1537. package/src/telemetry/usage-telemetry-reporter.ts +126 -42
  1538. package/src/tools/AGENTS.md +32 -6
  1539. package/src/tools/acp/abort.ts +32 -0
  1540. package/src/tools/acp/spawn.ts +70 -0
  1541. package/src/tools/acp/status.ts +31 -0
  1542. package/src/tools/apps/executors.ts +8 -8
  1543. package/src/tools/apps/registry.ts +1 -1
  1544. package/src/tools/assets/materialize.ts +39 -24
  1545. package/src/tools/assets/search.ts +21 -21
  1546. package/src/tools/browser/__tests__/auth-cache.test.ts +2 -2
  1547. package/src/tools/browser/__tests__/auth-detector.test.ts +4 -4
  1548. package/src/tools/browser/auth-detector.ts +6 -6
  1549. package/src/tools/browser/browser-execution.ts +76 -46
  1550. package/src/tools/browser/browser-handoff.ts +12 -9
  1551. package/src/tools/browser/browser-manager.ts +91 -81
  1552. package/src/tools/browser/browser-screencast.ts +30 -28
  1553. package/src/tools/browser/chrome-cdp.ts +5 -5
  1554. package/src/tools/browser/jit-auth.ts +2 -2
  1555. package/src/tools/browser/network-recorder.test.ts +2 -2
  1556. package/src/tools/browser/network-recorder.ts +3 -3
  1557. package/src/tools/browser/runtime-check.ts +3 -3
  1558. package/src/tools/calls/call-start.ts +1 -1
  1559. package/src/tools/calls/call-status.ts +1 -1
  1560. package/src/tools/claude-code/claude-code.ts +11 -11
  1561. package/src/tools/computer-use/definitions.ts +18 -18
  1562. package/src/tools/credential-execution/make-authenticated-request.ts +198 -0
  1563. package/src/tools/credential-execution/manage-secure-command-tool.ts +372 -0
  1564. package/src/tools/credential-execution/run-authenticated-command.ts +261 -0
  1565. package/src/tools/credentials/broker-types.ts +5 -5
  1566. package/src/tools/credentials/broker.ts +16 -16
  1567. package/src/tools/credentials/metadata-store.ts +46 -227
  1568. package/src/tools/credentials/resolve.ts +3 -2
  1569. package/src/tools/credentials/selection.ts +1 -1
  1570. package/src/tools/credentials/tool-policy.ts +1 -1
  1571. package/src/tools/credentials/vault.ts +115 -25
  1572. package/src/tools/document/document-tool.ts +3 -3
  1573. package/src/tools/execution-target.ts +2 -2
  1574. package/src/tools/executor.ts +147 -12
  1575. package/src/tools/filesystem/edit.ts +2 -2
  1576. package/src/tools/filesystem/read.ts +1 -1
  1577. package/src/tools/filesystem/write.ts +1 -1
  1578. package/src/tools/followups/followup_create.ts +8 -7
  1579. package/src/tools/followups/followup_list.ts +3 -1
  1580. package/src/tools/followups/followup_resolve.ts +8 -7
  1581. package/src/tools/host-filesystem/edit.ts +3 -2
  1582. package/src/tools/host-filesystem/read.ts +3 -2
  1583. package/src/tools/host-filesystem/write.ts +2 -2
  1584. package/src/tools/host-terminal/host-shell.ts +60 -12
  1585. package/src/tools/mcp/mcp-tool-factory.ts +7 -6
  1586. package/src/tools/memory/definitions.ts +6 -5
  1587. package/src/tools/memory/handlers.test.ts +1 -1
  1588. package/src/tools/memory/handlers.ts +1 -1
  1589. package/src/tools/network/__tests__/web-search.test.ts +3 -3
  1590. package/src/tools/network/domain-normalize.ts +2 -2
  1591. package/src/tools/network/script-proxy/session-manager.ts +292 -517
  1592. package/src/tools/network/web-fetch.ts +2 -2
  1593. package/src/tools/network/web-search.ts +7 -7
  1594. package/src/tools/permission-checker.ts +43 -28
  1595. package/src/tools/registry.ts +20 -8
  1596. package/src/tools/schedule/list.ts +2 -2
  1597. package/src/tools/schema-transforms.ts +31 -21
  1598. package/src/tools/secret-detection-handler.ts +4 -9
  1599. package/src/tools/sensitive-output-placeholders.ts +1 -1
  1600. package/src/tools/shared/filesystem/edit-engine.ts +1 -1
  1601. package/src/tools/shared/filesystem/file-ops-service.ts +3 -3
  1602. package/src/tools/shared/filesystem/image-read.ts +25 -5
  1603. package/src/tools/shared/filesystem/path-policy.ts +2 -2
  1604. package/src/tools/shared/shell-output.ts +1 -1
  1605. package/src/tools/side-effects.ts +3 -2
  1606. package/src/tools/skills/execute.ts +1 -1
  1607. package/src/tools/skills/load.ts +18 -4
  1608. package/src/tools/skills/sandbox-runner.ts +3 -4
  1609. package/src/tools/skills/scaffold-managed.ts +0 -8
  1610. package/src/tools/subagent/abort.ts +1 -1
  1611. package/src/tools/subagent/message.ts +2 -2
  1612. package/src/tools/subagent/read.ts +3 -3
  1613. package/src/tools/subagent/spawn.ts +3 -3
  1614. package/src/tools/subagent/status.ts +10 -4
  1615. package/src/tools/swarm/delegate.ts +13 -13
  1616. package/src/tools/system/avatar-generator.ts +52 -79
  1617. package/src/tools/system/request-permission.ts +5 -4
  1618. package/src/tools/terminal/backends/native.ts +51 -11
  1619. package/src/tools/terminal/backends/types.ts +7 -0
  1620. package/src/tools/terminal/parser.ts +6 -6
  1621. package/src/tools/terminal/safe-env.ts +4 -1
  1622. package/src/tools/terminal/sandbox-diagnostics.ts +1 -1
  1623. package/src/tools/terminal/shell.ts +114 -10
  1624. package/src/tools/tool-approval-handler.ts +23 -29
  1625. package/src/tools/tool-manifest.ts +45 -2
  1626. package/src/tools/types.ts +30 -7
  1627. package/src/tools/ui-surface/definitions.ts +9 -37
  1628. package/src/tools/watch/screen-watch.ts +6 -6
  1629. package/src/tools/watch/watch-state.ts +33 -26
  1630. package/src/tools/watcher/list.ts +1 -1
  1631. package/src/util/clipboard.ts +1 -1
  1632. package/src/util/device-id.ts +101 -0
  1633. package/src/util/logger.ts +7 -2
  1634. package/src/util/platform.ts +10 -0
  1635. package/src/util/retry.ts +29 -1
  1636. package/src/util/silently.ts +7 -8
  1637. package/src/watcher/engine.ts +1 -1
  1638. package/src/work-items/resolve-required-tools.test.ts +37 -0
  1639. package/src/work-items/resolve-required-tools.ts +26 -0
  1640. package/src/work-items/work-item-runner.ts +29 -27
  1641. package/src/workspace/commit-message-enrichment-service.ts +1 -1
  1642. package/src/workspace/commit-message-provider.ts +2 -2
  1643. package/src/workspace/git-service.ts +27 -14
  1644. package/src/workspace/migrations/001-avatar-rename.ts +25 -0
  1645. package/src/workspace/migrations/002-backfill-installation-id.ts +75 -0
  1646. package/src/workspace/migrations/003-seed-device-id.ts +101 -0
  1647. package/src/workspace/migrations/004-extract-collect-usage-data.ts +50 -0
  1648. package/src/workspace/migrations/005-add-send-diagnostics.ts +12 -0
  1649. package/src/workspace/migrations/006-services-config.ts +132 -0
  1650. package/src/workspace/migrations/007-web-search-provider-rename.ts +37 -0
  1651. package/src/workspace/migrations/registry.ts +22 -0
  1652. package/src/workspace/migrations/runner.ts +117 -0
  1653. package/src/workspace/migrations/types.ts +11 -0
  1654. package/src/workspace/provider-commit-message-generator.ts +7 -4
  1655. package/src/workspace/turn-commit.ts +13 -13
  1656. package/tsconfig.json +0 -1
  1657. package/src/__tests__/cli-help-reference-sync.test.ts +0 -26
  1658. package/src/__tests__/handlers-task-submit-slash.test.ts +0 -39
  1659. package/src/__tests__/onboarding-starter-tasks.test.ts +0 -190
  1660. package/src/__tests__/session-slash-known.test.ts +0 -477
  1661. package/src/__tests__/slash-commands-catalog.test.ts +0 -94
  1662. package/src/__tests__/slash-commands-parser.test.ts +0 -127
  1663. package/src/__tests__/slash-commands-resolver.test.ts +0 -231
  1664. package/src/__tests__/slash-commands-rewrite.test.ts +0 -40
  1665. package/src/cli/commands/sessions.ts +0 -253
  1666. package/src/cli/http-client.ts +0 -76
  1667. package/src/cli/reference.ts +0 -36
  1668. package/src/daemon/install-cli-launchers.ts +0 -170
  1669. package/src/daemon/session-evictor.ts +0 -203
  1670. package/src/runtime/routes/session-management-routes.ts +0 -190
  1671. package/src/skills/slash-commands.ts +0 -203
  1672. /package/src/__tests__/{script-proxy-session-runtime.test.ts → script-proxy-conversation-runtime.test.ts} +0 -0
  1673. /package/src/daemon/{session-media-retry.ts → conversation-media-retry.ts} +0 -0
@@ -0,0 +1,454 @@
1
+ export interface BodyShapeDefinition {
2
+ id: string;
3
+ viewBox: { width: number; height: number };
4
+ faceCenter: { x: number; y: number };
5
+ svgPath: string;
6
+ }
7
+
8
+ export interface EyePathDefinition {
9
+ svgPath: string;
10
+ color: string; // hex e.g. "#F2F2F2"
11
+ }
12
+
13
+ export interface EyeStyleDefinition {
14
+ id: string;
15
+ sourceViewBox: { width: number; height: number };
16
+ eyeCenter: { x: number; y: number };
17
+ paths: EyePathDefinition[];
18
+ }
19
+
20
+ export interface ColorDefinition {
21
+ id: string;
22
+ hex: string; // e.g. "#4C9B50"
23
+ }
24
+
25
+ export interface FaceCenterOverride {
26
+ bodyShape: string;
27
+ eyeStyle: string;
28
+ faceCenter: { x: number; y: number };
29
+ }
30
+
31
+ export interface CharacterComponents {
32
+ bodyShapes: BodyShapeDefinition[];
33
+ eyeStyles: EyeStyleDefinition[];
34
+ colors: ColorDefinition[];
35
+ faceCenterOverrides: FaceCenterOverride[];
36
+ }
37
+
38
+ const SCLERA = "#F2F2F2";
39
+ const PUPIL = "#1A1A1A";
40
+
41
+ export function getCharacterComponents(): CharacterComponents {
42
+ return {
43
+ bodyShapes: [
44
+ {
45
+ id: "blob",
46
+ viewBox: { width: 580, height: 561 },
47
+ faceCenter: { x: 300, y: 273 },
48
+ svgPath:
49
+ "M551.3 377.649C524.596 440.214 479.223 495.75 419.697 527.13C383.966 545.972 344.481 554.698 304.742 558.505C263.739 562.448 221.967 561.741 181.567 552.87C112.437 537.704 44.9966 494.446 17.5938 424.615C6.00081 395.096 2.48816 362.476 3.26999 330.427C2.55845 325.429 1.96158 320.43 1.46585 315.418C-2.60607 273.686 1.79634 231.456 14.7865 191.69C39.2421 116.861 93.1524 51.6488 165.738 23.6091C206.151 8.00384 250.571 1.15769 293.581 0.10974C336.598 -0.938208 379.647 5.52128 420.516 19.4032C457.676 32.0143 494.76 50.2863 522.595 79.2557C546.619 104.249 562.372 136.396 571.03 170.227C588.555 238.703 578.729 313.388 551.3 377.649Z",
50
+ },
51
+ {
52
+ id: "cloud",
53
+ viewBox: { width: 700, height: 639 },
54
+ faceCenter: { x: 350, y: 380 },
55
+ svgPath:
56
+ "M458.043 529.146C461.866 530.414 451.569 563.252 450.19 566.713C445.375 578.789 438.393 589.856 430.133 599.861C397.68 639.164 349.367 647.078 302.344 631.557C267.032 619.903 245.62 595.757 234.464 560.446C233.64 557.836 232.873 555.207 231.85 551.831C215.336 566.821 196.672 575.311 175.804 578.771C159.74 581.434 143.674 580.153 127.916 576.427C122.088 575.05 116.003 572.978 111.13 569.631C59.452 534.135 37.9953 455.647 82.0824 405.11C84.6116 402.21 87.0818 399.258 90.4356 395.327C87.0013 394.381 84.8031 393.586 82.5348 393.182C61.0136 389.341 43.0259 378.373 27.2162 364.12C-1.3201 338.393 -7.78894 301.77 9.57619 267.482C22.6394 241.688 40.3066 220.148 67.513 208.004C87.5677 199.052 108.768 196.873 130.414 197.514C135.727 197.672 141.026 198.286 148.39 198.846C145.862 194.159 144.099 190.889 142.336 187.62C124.709 154.933 122.252 121.389 135.068 86.2933C154.162 34.0028 208.103 6.92757 261.126 18.1841C292.089 24.7577 327.264 42.3061 342.454 72.2215C343.254 73.7957 344.247 75.2755 345.215 76.7552C345.351 76.9621 345.865 76.9211 346.994 77.1668C348.274 74.2177 349.567 71.0638 350.999 67.9745C355.052 59.2326 358.588 50.1887 363.355 41.8501C381.347 10.3757 420.307 -5.42286 455.406 1.68033C464.854 3.59251 472.777 8.07002 479.606 14.6749C498.419 32.8736 504.856 55.5692 503.566 81.0162C503.229 87.6502 502.673 94.2724 502.091 102.759C506.659 99.8181 509.529 97.9475 512.422 96.1117C538.175 79.7752 566.338 75.0749 595.791 81.2105C630.232 88.3845 655.025 116.808 661.425 152.356C665.943 177.46 661.851 201.584 654.716 225.279C652.268 233.41 645.875 240.356 641.318 247.788C649.735 253.395 658.76 259.005 667.358 265.211C691.529 282.657 701.903 310.011 699.081 339.212C695.999 371.1 679.845 396.926 647.129 404.045C633.529 407.004 619.694 409.116 605.645 406.53C603.304 406.099 600.817 406.469 596.527 406.469C599.85 411.595 602.3 415.803 605.159 419.713C618.729 438.28 621.763 460.019 621.884 481.845C621.95 493.691 618.891 506.205 611.341 516.237C604.493 525.336 597.416 534.524 589.068 542.178C574.463 555.569 555.851 558.53 536.924 557.352C509.254 555.63 483.751 546.931 461.278 530.245C460.75 529.856 459.986 529.791 458.043 529.146Z",
57
+ },
58
+ {
59
+ id: "sprout",
60
+ viewBox: { width: 613, height: 628 },
61
+ faceCenter: { x: 264, y: 415 },
62
+ svgPath:
63
+ "M188.562 154.32C195.642 129.19 201.743 104.963 209.452 81.259C213.281 69.4883 219.31 58.2302 225.661 47.5184C241.742 20.3937 274.883 -0.450409 307.341 0.0073979C347.653 0.57583 371.525 35.5013 378.375 71.9457C382.152 92.0349 381.242 112.022 377.249 131.965C376.161 137.396 375.235 142.859 374.295 147.987C386.293 137.766 398.035 127.685 409.861 117.703C438.964 93.1439 473.371 80.9459 510.384 75.0849C550.196 68.7806 620 71.8795 612.432 129.169C609.445 151.779 597.67 170.563 583.001 187.388C563.368 209.908 539.237 227.292 515.201 244.7C508.119 249.829 500.508 254.317 493.876 259.962C466.199 283.521 448.892 313.117 444.204 349.376C443.415 355.485 444.351 362.451 446.605 368.192C458.814 399.293 478.634 429.571 480.806 463.723C484.301 518.658 460.669 566.367 412.455 593.049C351.18 626.96 277.948 634.454 209.647 622.315C153.874 612.402 85.8161 587.91 68.0917 527.969C51.6962 472.524 73.4845 423.106 86.6231 369.772C91.1017 351.591 89.5279 333.925 80.9861 316.585C69.3865 293.036 57.5037 269.791 42.8657 247.887C31.4803 230.851 21.2917 212.963 11.3918 195.003C0.986137 176.125 -2.15173 155.792 1.40914 134.331C9.90013 83.1647 65.013 77.6815 104.347 95.9784C115.372 101.107 126.539 105.94 137.477 111.249C155.525 120.009 171.191 131.819 183.225 148.1C184.776 150.197 186.623 152.074 188.562 154.32Z",
64
+ },
65
+ {
66
+ id: "star",
67
+ viewBox: { width: 684, height: 690 },
68
+ faceCenter: { x: 325, y: 390 },
69
+ svgPath:
70
+ "M683.528 438.707C682.054 433.169 678.314 427.905 675.121 423.222C668.475 413.472 660.376 404.814 651.47 397.083C633.266 381.269 611.819 369.688 590.155 359.349C577.719 353.411 565.073 347.951 552.511 342.287C550.525 341.389 548.553 340.471 546.602 339.497C547.465 339.279 548.145 338.922 548.433 338.403C576.835 287.491 605.636 236.81 634.831 186.346C636.171 184.026 629.75 183.976 628.837 184.061C571.073 189.073 513.322 199.748 458.05 217.413C452.611 219.151 447.2 220.953 441.839 222.902C441.88 221.794 441.915 220.686 441.944 219.572C441.972 218.57 439.004 218.843 438.589 219.404C438.379 219.677 438.168 219.957 437.957 220.238C421.129 164.313 404.166 108.424 387.127 52.5623C381.962 35.6196 376.656 18.7188 371.533 1.76204C370.859 -0.481009 364.326 -0.537039 363.196 1.33474C342.507 35.4448 323.86 70.7745 307.46 107.134C299.263 125.311 291.599 143.726 284.596 162.386C277.795 180.499 271.949 198.928 265.38 217.119C264.033 220.834 262.629 224.508 261.198 228.159C254.734 223.554 248.278 218.948 241.815 214.343C227.351 204.025 212.88 193.713 198.409 183.394C169.039 162.456 139.571 141.672 110.194 120.74C93.4354 108.795 76.6835 96.8501 59.9249 84.9058C58.7598 84.0715 51.2506 83.2027 51.4891 85.782C54.4368 117.614 63.2369 148.422 72.4234 178.929C81.7782 210.018 90.5931 241.051 96.909 272.924C98.6565 281.749 100.235 290.61 101.639 299.499C102.081 302.296 102.502 305.086 102.979 307.869C97.6461 308.065 92.319 308.282 87.0067 308.808C62.0509 311.247 39.292 323.276 16.6947 333.293C13.7895 334.576 10.8837 335.873 7.97169 337.141C5.83086 338.073 3.4521 338.992 1.80996 340.73C-2.22514 344.999 1.40307 350.523 3.83793 354.568C9.95037 364.683 16.421 374.588 23.2281 384.248C37.0957 403.938 52.4508 422.578 69.0337 440.053C77.9885 449.495 87.2662 458.72 97.0143 467.356C101.31 471.156 106.187 474.723 110.629 478.649C105.703 483.907 101.015 489.395 96.4811 494.834C86.4803 506.835 77.2309 519.53 68.543 532.498C51.2722 558.288 36.4571 585.717 24.4776 614.346C21.5792 621.265 18.8422 628.246 16.2946 635.306C13.9435 641.811 10.7647 648.723 9.9436 655.634C9.26985 661.312 11.256 666.261 17.1859 667.712C25.4176 669.724 32.4146 664.95 39.1657 661.025C69.5676 643.331 99.66 625.148 129.409 606.375C155.277 590.049 180.893 573.31 206.241 556.192C214.361 570.1 223.217 583.615 232.263 596.898C245.92 616.953 260.454 636.434 275.62 655.375C284.357 666.289 293.319 677.021 302.477 687.585C303.895 689.218 310.541 689.913 311.671 687.585C333.756 642.106 351.504 594.55 364.74 545.769C409.697 579.837 456.274 611.767 504.305 641.377C518.559 650.167 532.946 658.74 547.444 667.124C549.444 668.28 554.757 668.918 556.364 666.682C562.497 658.144 561.367 647.503 558.56 637.935C555.044 625.942 549.865 614.333 545.381 602.676C535.576 577.195 525.78 551.721 515.975 526.247C510.698 512.536 505.427 498.824 500.15 485.12C529.906 482.856 559.521 478.972 588.856 473.498C604.127 470.645 619.307 467.351 634.381 463.628C641.814 461.791 649.217 459.85 656.586 457.803C663.127 455.987 670.201 454.585 676.334 451.62C681.535 449.095 685.135 444.75 683.528 438.707ZM216.052 549.828C215.182 551.103 214.045 552.106 213.104 553.297C212.732 553.767 212.431 554.293 212.136 554.825C211.729 554.223 211.322 553.62 210.922 553.017C212.739 551.783 214.564 550.549 216.381 549.309C216.276 549.484 216.171 549.659 216.052 549.828Z",
71
+ },
72
+ {
73
+ id: "ghost",
74
+ viewBox: { width: 594, height: 595 },
75
+ faceCenter: { x: 321, y: 167 },
76
+ svgPath:
77
+ "M576.611 203.334C566.222 162.978 549.573 124.108 524.337 90.7273C501.665 60.7321 472.541 35.223 438.426 19.0303C420.561 10.5482 401.503 4.96863 381.912 2.27672C357.828 -1.02474 333.415 -0.162803 309.225 1.28844C285.802 2.6972 261.921 3.77715 239.382 10.8708C217.944 17.6215 198.886 30.1551 181.232 43.7612C149.083 68.5339 120.5 97.9404 96.5148 130.648C72.3814 163.546 52.8605 199.836 38.9201 238.173C31.0023 259.952 25.0568 282.363 19.8062 304.921C14.6684 326.959 9.92941 349.118 6.34967 371.472C-0.550239 414.478 -3.40741 459.088 5.99142 501.954C8.22336 512.132 11.1649 522.156 14.8427 531.914C18.6611 542.043 23.0201 552.628 29.3448 561.481C35.3815 569.928 43.9666 574.947 53.604 578.389C64.3932 582.23 75.6244 585.097 86.8205 587.48C98.6412 589.997 110.623 591.848 122.662 592.976C132.987 593.951 143.467 594.637 153.821 593.551C163.087 592.576 172.528 590.116 180.208 584.656C187.711 579.307 192.654 571.512 195.693 562.932C198.865 553.973 200.143 544.482 201.21 535.081C202.446 524.09 203.737 513.127 205.604 502.226C209.549 479.199 215.432 456.417 224.094 434.692C231.955 414.974 241.768 394.715 256.39 379.048C269.734 364.755 289.993 353.161 310.06 356.911C324.724 364.797 334.278 380.03 339.388 395.487C345.839 415.009 345.18 435.387 342.891 455.575C340.23 479.016 335.289 502.85 338.005 526.522C339.15 536.518 342.105 546.508 348.534 554.436C353.974 561.137 361.359 565.925 369.263 569.247C387.24 576.797 407.758 577.463 426.97 576.846C450.471 576.089 473.825 572.247 496.28 565.28C515.739 559.244 534.853 550.412 549.537 535.992C564.629 521.167 573.438 501.315 579.355 481.316C592.938 435.415 594.195 386.731 593.1 339.226C592.053 293.572 588.025 247.671 576.611 203.334ZM334.25 371.977C333.541 371.031 332.804 370.105 332.046 369.201C334.264 371.612 336.195 374.283 337.774 377.143C336.672 375.37 335.5 373.652 334.25 371.977Z",
78
+ },
79
+ {
80
+ id: "urchin",
81
+ viewBox: { width: 794, height: 720 },
82
+ faceCenter: { x: 397, y: 338 },
83
+ svgPath:
84
+ "M294.515 186.33C290.926 182.311 287.411 178.223 283.736 174.285C255.181 143.686 237.726 106.858 224.624 67.7708C221.922 59.7082 221.014 50.6841 221.11 42.1235C221.295 25.7049 233.064 17.8357 248.541 23.4619C254.559 25.65 260.702 28.8342 265.378 33.1064C277.385 44.0774 289.777 54.9774 299.853 67.626C313.811 85.1474 325.792 104.243 338.617 122.665C340.383 125.204 342.137 127.751 345.66 129.793C345.259 121.324 344.546 112.855 344.526 104.384C344.49 88.8345 344.241 73.2395 345.329 57.7508C345.875 49.9765 348.303 42.0299 351.376 34.7965C359.52 15.637 376.269 13.3068 389.644 29.0276C397.8 38.6138 402.618 49.9948 405.881 61.9238C414.873 94.7912 421.728 128.112 426.003 161.94C426.402 165.096 426.969 168.231 429.108 171.932C430.344 169.342 431.737 166.813 432.795 164.152C451.865 116.184 478.991 73.1319 513.081 34.5321C520.917 25.6599 530.426 18.0812 539.948 10.9498C545.615 6.70501 552.535 3.58415 559.368 1.54792C576.16 -3.45791 588.665 3.8339 591.208 21.1556C593.08 33.9082 593.763 47.2524 592.171 59.9825C590.435 73.8528 586.186 87.5585 581.754 100.913C571.342 132.286 557.635 162.224 540.214 190.399C537.626 194.586 535.262 198.911 534.128 204.328C536.972 202.423 539.852 200.569 542.653 198.603C556.596 188.816 570.47 178.93 584.456 169.206C614.283 148.469 647.654 135.529 682.263 125.54C688.765 123.664 695.867 122.972 702.652 123.159C713.904 123.468 720.214 131.503 717.203 142.284C715.307 149.074 711.569 155.622 707.514 161.49C692.518 183.186 673.201 200.825 652.363 216.643C632.461 231.751 611.755 245.804 591.386 260.296C588.209 262.556 584.938 264.685 579.709 268.231C584.517 268.511 587.145 268.847 589.763 268.789C638.566 267.692 686.823 271.965 734.215 283.994C744.006 286.479 753.628 289.901 763.003 293.691C773.991 298.134 782.9 305.511 789.297 315.65C796.827 327.584 794.162 339.013 780.931 343.895C768.816 348.366 755.947 351.686 743.136 353.225C697.592 358.692 651.905 362.624 605.642 359.936C616.683 365.218 628.128 369.808 638.676 375.938C656.819 386.481 674.627 397.645 692.132 409.218C701.774 415.593 708.433 424.652 709.643 436.758C710.806 448.401 706.534 455.432 695.6 459.516C683.268 464.122 670.45 463.849 658.061 460.912C633.414 455.067 609.006 448.207 584.503 441.756C581.859 441.06 579.232 440.292 575.916 440.921C577.782 442.502 579.632 444.103 581.517 445.661C625.821 482.299 661.92 526.023 692.447 574.478C703.179 591.515 711.331 609.609 710.856 630.425C710.806 632.594 710.83 634.799 710.448 636.922C708.794 646.103 703.379 650.57 694.271 648.581C687.312 647.062 680.063 644.656 674.209 640.751C661.29 632.132 648.094 623.442 636.936 612.772C608.662 585.734 581.451 557.588 553.806 529.894C552.398 528.484 550.912 527.151 548.249 526.695C549.791 529.363 551.316 532.041 552.879 534.696C564.449 554.362 576.277 573.883 587.466 593.761C591.333 600.629 593.903 608.288 596.504 615.78C597.654 619.095 597.931 622.93 597.697 626.468C596.89 638.652 586.543 645.379 575.396 640.478C569.882 638.052 564.364 634.52 560.292 630.145C548.216 617.175 536.37 603.925 525.369 590.045C515.984 578.203 507.893 565.337 497.773 550.836C499.144 558.95 500.763 564.696 500.928 570.484C501.132 577.632 500.995 585.009 499.441 591.937C497.166 602.077 489.704 606.78 479.3 606.192C468.49 605.581 459.903 600.394 453.083 592.425C447.716 586.152 443.012 579.31 436.928 571.292C439.639 583.059 442.231 593.118 444.248 603.291C450.143 633.03 452.019 662.882 445.684 692.825C444.713 697.412 443.768 702.116 441.936 706.391C435.711 720.911 419.931 724.247 409.762 712.438C403.763 705.472 398.366 697.025 395.716 688.326C388.341 664.118 382.261 639.5 376.215 614.91C371.808 596.988 368.287 578.849 364.313 560.82C363.802 558.502 362.939 556.263 361.617 551.965C358.827 563.829 356.929 573.777 354.095 583.451C350.846 594.54 347.203 605.56 342.916 616.285C339.101 625.826 332.805 633.939 324.393 640.001C320.63 642.712 316.39 645.463 311.977 646.437C300.425 648.986 289.18 648.873 285.976 630.411C283.695 617.265 284.637 604.377 287.788 591.644C290.829 579.356 294.597 567.247 298.062 555.064C299.02 551.695 300.034 548.343 299.688 544.273C297.649 546.644 295.517 548.941 293.585 551.396C272.752 577.88 252.398 604.758 230.922 630.709C222.242 641.199 211.213 649.768 201.069 659.01C198.7 661.168 195.692 662.712 192.802 664.197C174.923 673.382 159.519 665.931 157.113 646.008C156.238 638.763 157.516 630.646 160.044 623.743C164.127 612.587 169.264 601.634 175.359 591.432C191.703 564.078 208.785 537.164 225.591 510.085C228.038 506.141 230.576 502.251 234.473 496.139C229.868 497.617 227.611 498.065 225.606 499.033C215.819 503.758 206.205 508.851 196.328 513.372C185.72 518.229 174.679 522.015 162.775 521.008C157.806 520.588 152.645 519.611 148.091 517.669C136.302 512.644 132.798 504.611 136.535 492.221C141.872 474.519 154.213 461.746 167.266 449.555C169.332 447.625 171.754 446.076 173.616 442.991C171.443 443.292 169.194 443.33 167.108 443.931C123.775 456.421 79.5185 459.784 34.6988 457.123C27.8868 456.718 20.9129 455.747 14.4336 453.706C0.908617 449.448 -3.50076 437.976 2.86467 425.249C6.70643 417.569 12.4396 411.581 20.2111 407.848C58.9649 389.23 98.9102 374.491 142.201 370.713C145.72 370.406 149.196 369.605 154.097 368.804C141.101 362.29 129.493 356.68 118.105 350.657C113.666 348.309 109.162 345.582 105.661 342.062C96.3634 332.713 98.382 319.883 110.258 314.244C116.706 311.183 123.841 308.878 130.896 307.92C145.554 305.93 160.366 305.065 175.791 303.676C173.747 302.193 171.727 300.55 169.543 299.169C150.261 286.972 130.969 274.793 111.642 262.669C98.6204 254.501 87.584 244.099 77.2847 232.8C68.5257 223.19 63.0141 211.886 59.6886 199.489C56.5094 187.638 61.3928 178.296 73.2079 175.124C88.4997 171.017 103.758 170.524 119.024 176.674C145.875 187.492 169.54 203.31 192.386 220.761C203.581 229.313 215.7 236.661 227.461 244.465C229.174 245.602 231.22 246.238 234.26 246.038C232.877 244.372 231.626 242.573 230.091 241.06C219.764 230.882 209.334 220.808 199.02 210.615C186.946 198.683 178.095 184.691 173.135 168.435C169.997 158.149 167.91 147.579 176.983 138.998C186.671 129.836 198.24 128.596 210.367 133.148C233.319 141.765 254.195 153.89 272.275 170.631C278.845 176.715 285.699 182.491 292.423 188.407C293.118 187.714 293.817 187.022 294.515 186.33Z",
85
+ },
86
+ {
87
+ id: "stack",
88
+ viewBox: { width: 632, height: 634 },
89
+ faceCenter: { x: 304, y: 358 },
90
+ svgPath:
91
+ "M82.907 607.208C99.1763 617.059 116.462 624.348 135.28 627.969C154.812 631.738 174.861 632.532 194.719 632.93C235.809 633.74 277.066 632.79 318.14 631.63C358.713 630.485 399.319 628.289 439.607 623.258C478.251 618.43 517.459 611.608 554.389 599.18C585.395 588.745 616.226 570.779 627.501 538.843C632.519 524.631 633.051 508.869 626.651 494.976C620.029 480.585 607.063 470.188 593.43 462.417C591.381 461.249 589.301 460.12 587.213 459.021C565.918 442.504 541.542 429.842 515.586 421.977C506.574 419.251 497.403 416.969 488.105 415.389C484.199 414.719 480.276 414.166 476.33 413.745C504.367 407.913 531.887 398.754 558.018 387.72C573.589 381.147 589.572 374.091 602.427 363.033C613.44 353.548 621.093 341.345 625 327.499C632.821 299.822 625.381 269.327 607.564 246.875C588.754 223.178 560.591 208.179 531.419 200.431C513.315 195.619 494.481 193.672 475.743 193.352C466.302 191.787 456.75 190.985 447.246 191.07C462.435 185.868 477.228 179.545 491.456 172.131C506.137 164.484 520.723 155.808 533.642 145.506C539.739 140.638 545.496 134.992 548.624 127.797C551.737 120.641 552.252 112.775 551.054 105.144C546.473 76.0653 523.899 50.8573 500.047 34.5815C472.654 15.8914 439.917 6.69447 407.084 2.78529C370.996 -1.52102 333.988 -0.399816 297.892 3.19781C261.257 6.85762 224.946 13.8355 189.621 24.0447C157.305 33.382 124.942 44.7906 95.674 61.3466C68.9717 76.4464 41.6732 98.0802 29.5806 126.738C23.8084 140.428 22.7443 155.084 27.7065 169.157C32.3117 182.2 41.0857 193.298 51.7492 202.144C71.2897 218.358 96.8411 225.234 122.297 227.305C72.7028 236.3 22.7283 259.001 4.98988 307.952C-4.26003 333.495 -0.941483 361.537 17.3925 382.416C35.1464 402.616 62.0632 413.535 88.186 418.69C98.3336 420.684 108.6 421.867 118.906 422.701C94.4429 429.678 70.8526 439.957 50.1685 454.294C22.6482 473.382 0.352613 506.081 12.7787 540.057C18.1385 554.729 28.786 566.722 40.4896 576.947C53.473 588.285 68.1388 598.26 82.907 607.208ZM486.287 418.931C486.35 418.915 486.533 418.97 486.398 419.001C483.405 419.71 480.419 419.211 477.846 417.56C477.767 417.513 478.013 417.475 478.069 417.513C480.538 419.103 483.405 419.609 486.287 418.931ZM448.945 193.772C444.681 193.982 440.425 194.263 436.177 194.637C437.456 194.248 438.734 193.858 440.012 193.453C442.998 193.499 445.975 193.609 448.945 193.772Z",
92
+ },
93
+ {
94
+ id: "flower",
95
+ viewBox: { width: 724, height: 691 },
96
+ faceCenter: { x: 335, y: 352 },
97
+ svgPath:
98
+ "M707.996 341.488C683.572 371.035 643.096 379.081 606.995 383.544C585.458 386.205 563.817 387.947 542.142 388.871C531.271 389.34 520.394 389.578 509.517 389.597C509.127 389.597 508.73 389.604 508.34 389.604C539.98 409.658 571.958 431.456 594.664 461.683C615.354 489.223 627.369 524.084 618.659 558.345C614.714 573.858 606.844 588.374 594.889 599.167C581.012 611.696 562.615 618.079 543.959 615.227C524.928 612.31 508.592 601.272 493.122 590.513C477.163 579.416 461.759 567.586 446.956 554.985C432.226 542.449 418.071 529.273 404.782 515.212C401.597 511.845 398.478 508.439 395.411 504.987C395.332 506.221 395.246 507.449 395.16 508.67C393.64 530.804 390.508 552.813 385.876 574.505C381.812 593.503 376.631 612.297 370.221 630.642C364.769 646.24 357.917 662.018 345.916 673.761C335.032 684.415 319.932 690.693 304.614 689.954C288.622 689.175 276.49 679.894 268.619 666.374C260.055 651.654 254.761 634.51 250.294 618.172C245.424 600.355 242.173 582.096 240.561 563.692C238.882 544.456 238.677 524.613 240.752 505.093C240.164 505.898 239.57 506.703 238.955 507.509C233.457 514.704 227.14 521.378 220.716 527.755C208.154 540.218 194.349 551.433 179.54 561.131C166.422 569.719 152.519 577.132 138.073 583.238C122.86 589.674 106.333 595.787 89.7861 597.351C74.8317 598.764 59.4075 595.437 49.4026 583.548C40.8116 573.336 37.4353 559.13 38.4529 546.02C39.6691 530.33 47.6584 515.879 57.1277 503.647C68.289 489.237 81.7962 476.568 94.8805 463.941C112.63 446.817 130.797 429.759 149.769 413.758C133.652 415.052 117.487 415.257 101.562 414.385C83.9244 413.414 65.996 411.269 49.079 406.015C34.3755 401.454 19.6257 393.756 10.2747 381.167C2.05413 370.11 -2.30039 355.053 1.24128 341.481C5.30564 325.922 19.0643 317.597 32.7163 311.115C64.555 296.005 99.8366 290.097 134.834 288.763C152.538 288.09 170.274 288.71 187.945 289.879C189.611 289.984 191.276 290.097 192.948 290.209C176.744 285.403 161.776 275.713 148.831 265.151C134.458 253.42 121.869 239.663 110.318 225.193C99.3547 211.456 88.8807 197.112 79.3448 182.351C69.558 167.188 61.3172 149.748 63.1485 131.237C66.4331 98.0067 102.368 85.2731 131.491 90.3755C149.836 93.5902 166.349 102.892 181.588 113.209C196.325 123.19 210.724 133.792 224.615 144.922C235.558 153.695 246.224 162.923 256.142 172.858C254.979 152.288 253.539 131.614 254.438 111.017C255.224 92.9499 258.066 74.7764 265.348 58.1084C272.082 42.6945 282.748 29.3267 296.143 19.1613C309.34 9.15344 326.309 1.12634 343.035 0.0771651C360.441 -1.01881 374.92 9.70203 384.813 23.1751C403.157 48.167 404.803 82.1373 400.666 111.764C397.904 131.527 392.564 150.843 388.461 170.35C386.386 180.225 384.575 190.166 383.524 200.207C383.445 200.973 383.379 201.738 383.313 202.511C384.529 200.299 385.863 198.121 387.284 195.949C392.887 187.394 399.146 179.149 405.674 171.274C418.838 155.398 433.225 140.565 448.688 126.907C474.956 103.711 506.371 78.8764 542.863 76.8298C551.982 76.3212 561.479 77.3051 569.778 81.319C576.968 84.7978 582.638 90.5806 586.583 97.4655C594.909 112.028 596.74 129.666 594.387 146.05C589.213 182.06 565.7 211.211 538.798 234.164C524.716 246.184 509.576 256.879 494.542 267.665C492.553 269.091 490.564 270.517 488.575 271.942C500.847 267.367 513.29 263.228 525.807 259.459C547.515 252.917 569.593 247.537 592.101 244.567C611.965 241.946 632.332 241.095 652.289 243.26C667.541 244.916 683.03 248.686 696.346 256.528C710.032 264.595 720.156 277.487 722.555 293.423C725.144 310.667 718.966 328.22 707.996 341.488Z",
99
+ },
100
+ {
101
+ id: "burst",
102
+ viewBox: { width: 734, height: 646 },
103
+ faceCenter: { x: 345, y: 305 },
104
+ svgPath:
105
+ "M733.742 331.374C731.601 337.333 725.454 340.564 719.925 342.794C712.107 345.948 703.946 348.402 695.982 351.156C687.464 354.1 678.952 357.044 670.432 359.982C662.068 362.877 653.717 365.8 645.36 368.709C646.518 374.625 647.563 380.563 648.49 386.521C650.343 398.515 651.718 410.579 652.595 422.678C654.377 447.114 654.125 471.663 651.928 496.064C651.71 498.475 645.999 498.026 644.574 497.676C620.435 491.696 596.169 486.229 571.799 481.308C560.613 479.051 549.4 476.913 538.172 474.88C537.828 490.687 536.418 506.53 534.404 522.049C531.182 546.843 525.807 571.336 518.369 595.211C517.457 598.127 511.225 597.209 509.261 596.157C490.35 586.021 471.487 575.78 452.681 565.441C443.208 560.232 433.671 555.094 424.332 549.654C421.006 547.719 417.652 545.792 414.36 543.78C412.248 546.507 409.406 548.96 407.287 551.28L396.445 563.169C388.901 571.441 381.358 579.712 373.822 587.984C360.307 602.81 346.791 617.629 333.283 632.448C327.992 638.252 323.241 645.598 314.638 645.801C305.93 646.012 302.33 639.794 298.92 632.826C290.225 615.056 281.489 597.308 272.907 579.481C267.16 567.544 261.469 555.564 256.592 543.261C253.743 543.674 250.866 543.969 248.115 544.39C241.736 545.371 235.351 546.325 228.958 547.257C216.643 549.052 204.307 550.762 191.963 552.388C166.765 555.704 141.51 558.473 116.213 560.989C115.182 561.094 110.255 561.136 111.083 559.026C117.925 541.704 126.248 525.035 136.064 509.207C140.942 501.335 146.268 493.722 151.909 486.383C153.039 484.911 154.19 483.432 155.347 481.953C154.239 481.735 153.123 481.518 152.007 481.315C140.464 479.261 128.83 477.726 117.174 476.485C93.9326 474.017 70.5584 472.524 47.2193 471.354C46.7841 471.333 44.0895 471.242 44.2368 470.212C47.0505 450.366 51.9067 430.9 58.7625 412.065C62.2498 402.482 66.2919 393.138 70.8388 384.011C70.9861 383.71 71.1476 383.415 71.2949 383.114C67.6738 381.166 64.0459 379.217 60.4322 377.261C52.2574 372.852 44.1104 368.401 35.9492 363.97C28.6373 360.002 21.3464 356.007 14.0696 351.976C10.3857 349.936 6.42068 348.065 2.9401 345.695C0.652791 344.146 -0.414131 342.036 0.147373 339.267C0.806877 336.043 2.86302 333.106 4.46309 330.288C6.06316 327.477 7.69098 324.694 9.36132 321.932C13.1156 315.714 17.0589 309.608 21.1855 303.629C29.4589 291.628 38.4688 280.118 48.2862 269.337C51.0789 266.267 53.9284 263.182 56.8475 260.14C55.29 258.598 53.8021 256.965 52.2933 255.416C48.3985 251.385 44.5813 247.284 40.848 243.113C34.2308 235.732 27.8662 228.119 21.7612 220.31C18.5684 216.23 15.4527 212.101 12.4141 207.909C10.1829 204.839 6.97595 201.089 7.19352 196.995C7.39014 193.224 10.6599 190.946 13.558 189.095C17.7684 186.403 22.0558 183.816 26.3154 181.188C35.2064 175.699 44.1387 170.266 53.1 164.89C71.3448 153.954 89.8283 143.384 108.466 133.128C112.01 131.18 115.553 129.21 119.104 127.254C119.048 126.49 119.048 125.656 119.104 124.71C119.258 122.011 119.504 119.319 119.736 116.627C120.234 110.795 120.81 104.97 121.476 99.1513C122.781 87.7464 124.409 76.3692 126.36 65.0554C128.079 55.0661 130.072 45.1265 132.332 35.2425C133.504 30.1111 134.647 24.9378 136.058 19.8699C136.9 16.8202 137.959 13.6382 140.527 11.5984C147.489 6.08155 157.516 10.4556 164.604 13.2738C172.835 16.5475 180.933 20.1574 188.876 24.09C204.945 32.0389 220.348 41.3202 234.88 51.807C241.848 56.8331 248.585 62.1535 255.076 67.7824C267.49 56.6644 280.268 46.0588 293.895 36.3224C311.887 23.4663 330.841 12.4961 349.689 0.999445C351.478 -0.0872931 357.857 -0.88646 358.628 1.9249C367.372 34.0018 375.014 66.6328 380.269 99.509C380.725 99.243 381.175 98.9832 381.624 98.7172C388.283 94.7637 395.118 91.0904 401.995 87.5155C450.806 62.0908 501.52 40.311 553.454 22.0785C554.395 21.749 562.577 20.9782 561.79 23.4035C555.474 42.9118 549.973 62.6726 545.342 82.6507C543.055 92.5274 540.978 102.447 539.118 112.414C538.164 117.511 537.265 122.614 536.423 127.724C536.051 129.975 535.546 132.266 535.399 134.552C535.336 135.562 535.273 136.746 535.575 137.734C535.946 138.001 536.185 138.246 536.298 138.484C537.378 138.204 539.097 138.232 539.469 138.982C539.476 138.982 539.476 138.989 539.476 138.996C545.708 137.615 552.058 136.641 558.198 135.659C570.513 133.682 582.941 132.316 595.375 131.404C617.641 129.764 639.983 129.68 662.256 131.145C673.624 131.888 684.971 133.052 696.255 134.636C701.728 135.407 707.201 136.256 712.647 137.23C716.408 137.896 721.208 138.905 722.695 142.935C724.141 146.868 721.369 151.172 719.236 154.284C715.958 159.058 712.639 163.79 709.341 168.549C702.745 178.061 696.149 187.567 689.56 197.08C677.273 214.794 664.992 232.507 652.713 250.214C652.004 251.707 651.19 252.948 650.025 254.097C650.011 254.112 649.998 254.132 649.99 254.147H649.976C649.822 254.294 649.66 254.448 649.491 254.595C649.365 254.707 649.176 254.806 648.937 254.897C653.071 257.603 657.063 260.533 661.014 263.464C668.515 269.016 675.785 274.883 682.936 280.883C695.434 291.376 707.489 302.396 719.025 313.927C722.168 317.075 725.277 320.25 728.344 323.467C730.212 325.423 734.78 328.479 733.742 331.374Z",
106
+ },
107
+ {
108
+ id: "ninja",
109
+ viewBox: { width: 789, height: 651 },
110
+ faceCenter: { x: 395, y: 387 },
111
+ svgPath:
112
+ "M785.439 391.136C742.323 396.551 699.565 404.289 657.437 414.312C622.285 422.682 586.81 432.073 554.578 447.8C526.696 461.411 502.19 479.985 481.115 501.547C439.044 544.612 410.503 597.153 382.908 648.718C381.906 650.583 374.482 650.615 373.488 648.718C359.865 622.528 345.697 596.462 328.397 572.131C313.374 550.989 295.878 530.989 274.51 515.003C251.481 497.771 224.488 486.122 195.296 481.12C164.347 475.815 132.325 477.881 101.529 483.057C69.4521 488.452 37.9419 496.906 7.02702 506.368C6.34046 506.581 -1.45434 506.716 0.240489 504.974C20.2641 484.425 39.6366 463.251 56.5788 440.443C84.9933 402.199 106.404 358.739 108.666 311.866C110.599 271.872 98.3426 229.471 67.8548 200.062C66.8114 199.984 65.8516 199.739 65.2846 199.203C64.5771 198.532 64.6962 197.978 65.1868 197.571C64.8368 197.254 64.5002 196.931 64.1501 196.622C63.4919 196.041 67.4277 195.415 68.3595 196.209C68.4926 196.325 68.6257 196.448 68.7588 196.564C88.0749 193.33 106.782 187.355 124.068 178.758C155.768 162.998 182.305 139.222 199.814 110.187C218.143 79.7965 226.407 44.6299 223.416 9.97993C223.193 7.35945 231.205 8.36674 232.487 9.11484C259.619 25.0237 286.822 40.9769 315.614 54.2523C365.482 77.2536 423.508 92.7228 479.041 79.493C525.175 68.5086 564.831 38.8213 588.868 1.26078C589.926 -0.391183 598.863 -0.598052 598.435 1.71889C591.648 39.0276 585.184 76.6656 585.443 114.607C585.66 146.618 591.137 178.512 604.528 208.173C615.889 233.336 632.117 256.402 650.956 277.332C690.065 320.778 739.415 355.189 788.35 388.607C790.6 390.142 786.447 391.007 785.439 391.136Z",
113
+ },
114
+ ],
115
+
116
+ eyeStyles: [
117
+ {
118
+ id: "grumpy",
119
+ sourceViewBox: { width: 580, height: 561 },
120
+ eyeCenter: { x: 300, y: 273 },
121
+ paths: [
122
+ {
123
+ svgPath:
124
+ "M408.462 318.767C309.849 318.767 308.699 226.908 308.699 226.908H508.224C508.224 226.908 512.033 318.767 408.462 318.767Z",
125
+ color: SCLERA,
126
+ },
127
+ {
128
+ svgPath:
129
+ "M491.195 226.908C489.95 244.612 480.356 297.536 410.187 297.536C343.374 297.536 331.544 244.612 329.459 226.908H491.195Z",
130
+ color: PUPIL,
131
+ },
132
+ {
133
+ svgPath:
134
+ "M190.364 318.767C288.977 318.767 290.126 226.908 290.126 226.908H90.602C90.602 226.908 86.7932 318.767 190.364 318.767Z",
135
+ color: SCLERA,
136
+ },
137
+ {
138
+ svgPath:
139
+ "M107.631 226.908C108.876 244.612 118.47 297.536 188.64 297.536C255.452 297.536 267.282 244.612 269.367 226.908H107.631Z",
140
+ color: PUPIL,
141
+ },
142
+ ],
143
+ },
144
+ {
145
+ id: "angry",
146
+ sourceViewBox: { width: 700, height: 639 },
147
+ eyeCenter: { x: 350, y: 380 },
148
+ paths: [
149
+ {
150
+ svgPath:
151
+ "M364.85 351.133L548.822 267C548.822 267 478.078 493.069 364.85 351.133Z",
152
+ color: SCLERA,
153
+ },
154
+ {
155
+ svgPath:
156
+ "M436.416 397.949C454.071 397.949 468.383 383.651 468.383 366.013C468.383 348.375 454.071 334.076 436.416 334.076C418.761 334.076 404.449 348.375 404.449 366.013C404.449 383.651 418.761 397.949 436.416 397.949Z",
157
+ color: PUPIL,
158
+ },
159
+ {
160
+ svgPath:
161
+ "M334.972 351.133L151 267C151 267 221.744 493.069 334.972 351.133Z",
162
+ color: SCLERA,
163
+ },
164
+ {
165
+ svgPath:
166
+ "M263.406 397.949C281.061 397.949 295.373 383.651 295.373 366.013C295.373 348.375 281.061 334.076 263.406 334.076C245.751 334.076 231.439 348.375 231.439 366.013C231.439 383.651 245.751 397.949 263.406 397.949Z",
167
+ color: PUPIL,
168
+ },
169
+ ],
170
+ },
171
+ {
172
+ id: "curious",
173
+ sourceViewBox: { width: 613, height: 628 },
174
+ eyeCenter: { x: 264, y: 415 },
175
+ paths: [
176
+ {
177
+ svgPath:
178
+ "M219.737 414.847C219.737 420.414 219.404 425.84 218.785 431.075C218.785 431.075 218.832 431.122 218.785 431.169C215.264 460.388 202.463 483.801 185.902 492.081C181.667 494.175 177.241 495.318 172.625 495.318C146.642 495.318 125.514 459.294 125.514 414.847C125.514 370.447 146.643 334.425 172.625 334.425C198.656 334.424 219.737 370.447 219.737 414.847Z",
179
+ color: SCLERA,
180
+ },
181
+ {
182
+ svgPath:
183
+ "M218.785 431.075C218.785 431.075 218.832 431.121 218.785 431.169C215.264 460.388 202.463 483.8 185.902 492.081C176.433 484.848 169.723 466.384 169.723 444.78C169.723 416.845 180.905 394.241 194.754 394.241C206.223 394.241 215.835 409.802 218.785 431.075Z",
184
+ color: PUPIL,
185
+ },
186
+ {
187
+ svgPath:
188
+ "M308.084 414.847C308.084 420.414 308.416 425.84 309.036 431.075C309.036 431.075 308.988 431.122 309.036 431.169C312.557 460.388 325.358 483.801 341.918 492.081C346.154 494.175 350.58 495.318 355.196 495.318C381.179 495.318 402.307 459.294 402.307 414.847C402.307 370.447 381.178 334.425 355.196 334.425C329.165 334.424 308.084 370.447 308.084 414.847Z",
189
+ color: SCLERA,
190
+ },
191
+ {
192
+ svgPath:
193
+ "M309.037 431.075C309.037 431.075 308.989 431.121 309.037 431.169C312.558 460.388 325.359 483.8 341.919 492.081C351.389 484.848 358.099 466.384 358.099 444.78C358.099 416.845 346.916 394.241 333.068 394.241C321.599 394.241 311.987 409.802 309.037 431.075Z",
194
+ color: PUPIL,
195
+ },
196
+ ],
197
+ },
198
+ {
199
+ id: "goofy",
200
+ sourceViewBox: { width: 684, height: 690 },
201
+ eyeCenter: { x: 325, y: 390 },
202
+ paths: [
203
+ {
204
+ svgPath:
205
+ "M307.139 391.203C307.139 436.064 289.447 474.171 264.846 487.926C258.491 491.485 251.673 493.412 244.578 493.412C210.028 493.412 182.018 447.652 182.018 391.203C182.018 334.754 210.028 288.994 244.578 288.994C251.673 288.994 258.491 290.921 264.846 294.48C289.447 308.235 307.139 346.342 307.139 391.203Z",
206
+ color: SCLERA,
207
+ },
208
+ {
209
+ svgPath:
210
+ "M307.138 391.203C307.138 436.064 289.447 474.171 264.846 487.926C240.238 474.177 222.547 436.064 222.547 391.203C222.547 346.342 240.238 308.229 264.846 294.48C289.447 308.236 307.138 346.342 307.138 391.203Z",
211
+ color: PUPIL,
212
+ },
213
+ {
214
+ svgPath:
215
+ "M467.078 388.777C467.078 433.638 449.387 471.745 424.785 485.5C418.43 489.059 411.613 490.986 404.518 490.986C369.967 490.986 341.957 445.226 341.957 388.777C341.957 332.328 369.967 286.568 404.518 286.568C411.613 286.568 418.43 288.496 424.785 292.054C449.386 305.809 467.078 343.916 467.078 388.777Z",
216
+ color: SCLERA,
217
+ },
218
+ {
219
+ svgPath:
220
+ "M467.078 388.777C467.078 433.638 449.386 471.745 424.785 485.5C400.178 471.751 382.486 433.638 382.486 388.777C382.486 343.916 400.178 305.804 424.785 292.055C449.386 305.81 467.078 343.916 467.078 388.777Z",
221
+ color: PUPIL,
222
+ },
223
+ ],
224
+ },
225
+ {
226
+ id: "surprised",
227
+ sourceViewBox: { width: 594, height: 595 },
228
+ eyeCenter: { x: 321, y: 167 },
229
+ paths: [
230
+ {
231
+ svgPath:
232
+ "M310.499 167.981C310.499 190.307 301.331 210.502 286.546 225.002C272.106 239.17 252.308 247.907 230.464 247.907C186.256 247.907 150.422 212.122 150.422 167.981C150.422 126.962 181.361 93.1593 221.203 88.5783C224.243 88.2274 227.332 88.0488 230.464 88.0488C274.665 88.0488 310.499 123.834 310.499 167.981Z",
233
+ color: SCLERA,
234
+ },
235
+ {
236
+ svgPath:
237
+ "M310.5 167.981C310.5 190.307 301.331 210.502 286.546 225.002C283.507 225.353 280.424 225.532 277.292 225.532C233.084 225.532 197.25 189.747 197.25 145.6C197.25 123.274 206.418 103.078 221.203 88.5783C224.243 88.2274 227.332 88.0488 230.464 88.0488C274.666 88.0488 310.5 123.834 310.5 167.981Z",
238
+ color: PUPIL,
239
+ },
240
+ {
241
+ svgPath:
242
+ "M491.382 164.755C491.382 187.081 482.214 207.277 467.429 221.777C452.989 235.944 433.191 244.681 411.347 244.681C367.139 244.681 331.305 208.896 331.305 164.755C331.305 123.737 362.244 89.9337 402.086 85.3527C405.125 85.0018 408.214 84.8232 411.347 84.8232C455.548 84.8232 491.382 120.609 491.382 164.755Z",
243
+ color: SCLERA,
244
+ },
245
+ {
246
+ svgPath:
247
+ "M491.382 164.755C491.382 187.081 482.214 207.277 467.429 221.777C464.389 222.128 461.306 222.306 458.174 222.306C413.967 222.306 378.133 186.521 378.133 142.374C378.133 120.048 387.301 99.8528 402.086 85.3527C405.126 85.0018 408.215 84.8232 411.347 84.8232C455.548 84.8232 491.382 120.609 491.382 164.755Z",
248
+ color: PUPIL,
249
+ },
250
+ ],
251
+ },
252
+ {
253
+ id: "bashful",
254
+ sourceViewBox: { width: 794, height: 720 },
255
+ eyeCenter: { x: 397, y: 338 },
256
+ paths: [
257
+ {
258
+ svgPath:
259
+ "M389.147 338.779C389.147 354.559 382.667 368.834 372.216 379.083C362.01 389.097 348.016 395.273 332.576 395.273C301.329 395.273 276 369.979 276 338.779C276 309.785 297.869 285.892 326.03 282.655C328.179 282.406 330.362 282.28 332.576 282.28C363.819 282.28 389.147 307.574 389.147 338.779Z",
260
+ color: SCLERA,
261
+ },
262
+ {
263
+ svgPath:
264
+ "M389.148 338.779C389.148 354.559 382.667 368.834 372.217 379.083C370.068 379.331 367.889 379.457 365.675 379.457C334.428 379.457 309.1 354.163 309.1 322.959C309.1 307.178 315.58 292.904 326.031 282.655C328.179 282.406 330.362 282.28 332.576 282.28C363.819 282.28 389.148 307.574 389.148 338.779Z",
265
+ color: PUPIL,
266
+ },
267
+ {
268
+ svgPath:
269
+ "M517.001 336.498C517.001 352.279 510.52 366.554 500.07 376.803C489.863 386.817 475.87 392.992 460.429 392.992C429.182 392.992 403.854 367.698 403.854 336.498C403.854 307.505 425.722 283.612 453.884 280.374C456.032 280.126 458.215 280 460.429 280C491.672 280 517.001 305.294 517.001 336.498Z",
270
+ color: SCLERA,
271
+ },
272
+ {
273
+ svgPath:
274
+ "M517.001 336.498C517.001 352.279 510.521 366.554 500.07 376.803C497.922 377.051 495.743 377.177 493.529 377.177C462.282 377.177 436.953 351.883 436.953 320.679C436.953 304.898 443.434 290.623 453.884 280.374C456.033 280.126 458.216 280 460.43 280C491.672 280 517.001 305.294 517.001 336.498Z",
275
+ color: PUPIL,
276
+ },
277
+ ],
278
+ },
279
+ {
280
+ id: "gentle",
281
+ sourceViewBox: { width: 632, height: 634 },
282
+ eyeCenter: { x: 304, y: 358 },
283
+ paths: [
284
+ {
285
+ svgPath:
286
+ "M229.473 469.065C258.726 469.065 282.441 421.52 282.441 362.87C282.441 304.22 258.726 256.675 229.473 256.675C200.219 256.675 176.504 304.22 176.504 362.87C176.504 421.52 200.219 469.065 229.473 469.065Z",
287
+ color: SCLERA,
288
+ },
289
+ {
290
+ svgPath:
291
+ "M229.473 417.424C244.502 417.424 256.685 392.999 256.685 362.869C256.685 332.739 244.502 308.314 229.473 308.314C214.445 308.314 202.262 332.739 202.262 362.869C202.262 392.999 214.445 417.424 229.473 417.424Z",
292
+ color: PUPIL,
293
+ },
294
+ {
295
+ svgPath:
296
+ "M376.988 459.719C406.242 459.719 429.957 412.174 429.957 353.524C429.957 294.874 406.242 247.329 376.988 247.329C347.734 247.329 324.02 294.874 324.02 353.524C324.02 412.174 347.734 459.719 376.988 459.719Z",
297
+ color: SCLERA,
298
+ },
299
+ {
300
+ svgPath:
301
+ "M376.989 408.079C392.017 408.079 404.2 383.653 404.2 353.524C404.2 323.394 392.017 298.969 376.989 298.969C361.96 298.969 349.777 323.394 349.777 353.524C349.777 383.653 361.96 408.079 376.989 408.079Z",
302
+ color: PUPIL,
303
+ },
304
+ ],
305
+ },
306
+ {
307
+ id: "quirky",
308
+ sourceViewBox: { width: 724, height: 691 },
309
+ eyeCenter: { x: 335, y: 352 },
310
+ paths: [
311
+ {
312
+ svgPath:
313
+ "M320.715 343.724C320.838 359.862 316.431 375.655 310.169 390.408C310.138 390.482 310.107 390.555 310.07 390.629C307.833 395.777 305.299 400.893 302.372 405.757C296.079 416.243 287.955 425.559 277.045 431.507C262.264 439.554 242.097 440.564 229.523 427.806C219.821 417.961 217.343 402.876 219.161 389.644C221.017 376.135 227.365 363.661 231.267 350.694C233.246 344.106 234.793 337.265 234.398 330.338C233.998 323.381 230.971 317.932 226.94 312.433C222.909 306.929 220.468 301.067 221.042 294.11C221.578 287.632 224.148 281.58 228.352 276.63C238.627 264.543 255.953 264.131 269.612 270.165C277.057 273.453 283.597 278.464 289.644 283.858C293.749 287.515 297.737 291.333 301.41 295.427C302.884 297.065 304.301 298.746 305.663 300.476C315.513 313.012 320.592 327.789 320.715 343.724Z",
314
+ color: SCLERA,
315
+ },
316
+ {
317
+ svgPath:
318
+ "M305.663 300.476C304.301 298.746 302.884 297.065 301.41 295.427C297.737 291.333 293.749 287.515 289.644 283.858C283.597 278.464 277.057 273.453 269.612 270.165C255.953 264.131 238.627 264.543 228.352 276.63C224.148 281.58 221.578 287.632 221.042 294.11C220.468 301.067 222.909 306.929 226.94 312.433C230.971 317.932 233.998 323.381 234.398 330.338C234.793 337.265 233.246 344.106 231.267 350.694C227.365 363.661 221.017 376.135 219.161 389.644C217.343 402.876 219.821 417.961 229.523 427.806C242.097 440.564 262.264 439.554 277.045 431.507C287.955 425.559 296.079 416.243 302.372 405.757C305.299 400.893 307.833 395.777 310.07 390.629C310.107 390.555 310.138 390.482 310.169 390.408C316.431 375.655 320.838 359.862 320.715 343.724C320.592 327.789 315.513 313.012 305.663 300.476ZM304.524 387.107C298.767 400.413 291.229 413.86 279.185 422.468C278.809 422.733 278.432 422.997 278.05 423.256C277.687 423.502 277.317 423.743 276.941 423.977C265.698 431.107 250.831 434.142 238.867 426.926C227.846 420.282 224.518 406.305 225.233 394.268C225.96 382.034 231.477 370.458 235.428 359.025C239.323 347.739 242.855 335.277 239.921 323.338C238.522 317.673 235.458 313.117 232.087 308.456C228.315 303.235 226.558 297.749 228.037 291.302C231.212 277.479 244.84 270.743 258.221 273.348C267.843 275.226 276.219 280.681 283.665 287.134C283.721 287.183 283.782 287.232 283.837 287.282C287.314 290.311 290.587 293.549 293.681 296.733C305.238 308.622 312.973 322.624 314.027 339.383C315.057 355.743 310.878 372.139 304.524 387.107Z",
319
+ color: SCLERA,
320
+ },
321
+ {
322
+ svgPath:
323
+ "M320.716 343.724C320.839 359.862 316.432 375.655 310.17 390.408C310.139 390.481 310.108 390.555 310.071 390.629C307.833 395.777 305.3 400.893 302.372 405.757C299.642 409.766 296.597 413.571 293.145 417.043C293.022 417.13 292.893 417.21 292.769 417.29C288.011 420.43 282.574 422.85 276.941 423.976C270.58 425.251 263.972 424.882 257.803 422.031C244.686 415.978 243.435 402.371 248.662 390.796C254.745 377.97 263.658 365.853 265.575 351.691C266.647 343.699 265.051 336.243 262.672 328.602C260.465 321.491 257.956 314.225 258.197 306.726C258.548 295.587 266.604 288.944 278.094 287.558C279.912 287.331 281.779 287.189 283.666 287.134C286.643 287.029 289.669 287.14 292.664 287.478C293.028 287.78 293.379 288.082 293.737 288.39C296.363 290.662 298.945 292.995 301.411 295.427C302.884 297.065 304.302 298.746 305.664 300.476C315.513 313.012 320.592 327.789 320.716 343.724Z",
324
+ color: PUPIL,
325
+ },
326
+ {
327
+ svgPath:
328
+ "M449.963 343.724C450.086 359.862 445.679 375.655 439.417 390.408C439.386 390.482 439.355 390.555 439.318 390.629C437.081 395.777 434.548 400.893 431.62 405.757C425.327 416.243 417.203 425.559 406.293 431.507C391.512 439.554 371.345 440.564 358.771 427.806C349.069 417.961 346.591 402.876 348.409 389.644C350.265 376.135 356.613 363.661 360.515 350.694C362.493 344.106 364.041 337.265 363.646 330.338C363.245 323.381 360.219 317.932 356.188 312.433C352.157 306.929 349.716 301.067 350.289 294.11C350.826 287.632 353.396 281.58 357.599 276.63C367.874 264.543 385.201 264.131 398.859 270.165C406.305 273.453 412.845 278.464 418.891 283.858C422.996 287.515 426.985 291.333 430.658 295.427C432.131 297.065 433.549 298.746 434.911 300.476C444.761 313.012 449.84 327.789 449.963 343.724Z",
329
+ color: SCLERA,
330
+ },
331
+ {
332
+ svgPath:
333
+ "M434.911 300.476C433.549 298.746 432.131 297.065 430.658 295.427C426.985 291.333 422.996 287.515 418.891 283.858C412.845 278.464 406.305 273.453 398.859 270.165C385.201 264.131 367.874 264.543 357.599 276.63C353.396 281.58 350.826 287.632 350.289 294.11C349.716 301.067 352.157 306.929 356.188 312.433C360.219 317.932 363.245 323.381 363.646 330.338C364.041 337.265 362.493 344.106 360.515 350.694C356.613 363.661 350.265 376.135 348.409 389.644C346.591 402.876 349.069 417.961 358.771 427.806C371.345 440.564 391.512 439.554 406.293 431.507C417.203 425.559 425.327 416.243 431.62 405.757C434.548 400.893 437.081 395.777 439.318 390.629C439.355 390.555 439.386 390.482 439.417 390.408C445.679 375.655 450.086 359.862 449.963 343.724C449.84 327.789 444.761 313.012 434.911 300.476ZM433.771 387.107C428.014 400.413 420.476 413.86 408.432 422.468C408.056 422.733 407.68 422.997 407.298 423.256C406.935 423.502 406.565 423.743 406.189 423.977C394.946 431.107 380.079 434.142 368.115 426.926C357.094 420.282 353.766 406.305 354.481 394.268C355.208 382.034 360.724 370.458 364.675 359.025C368.571 347.739 372.103 335.277 369.169 323.338C367.77 317.673 364.706 313.117 361.335 308.456C357.562 303.235 355.806 297.749 357.285 291.302C360.46 277.479 374.087 270.743 387.469 273.348C397.09 275.226 405.467 280.681 412.913 287.134C412.968 287.183 413.03 287.232 413.085 287.282C416.562 290.311 419.835 293.549 422.929 296.733C434.486 308.622 442.221 322.624 443.275 339.383C444.305 355.743 440.125 372.139 433.771 387.107Z",
334
+ color: SCLERA,
335
+ },
336
+ {
337
+ svgPath:
338
+ "M449.964 343.724C450.087 359.862 445.68 375.655 439.418 390.408C439.387 390.481 439.356 390.555 439.319 390.629C437.081 395.777 434.548 400.893 431.621 405.757C428.89 409.766 425.845 413.571 422.393 417.043C422.27 417.13 422.141 417.21 422.017 417.29C417.259 420.43 411.823 422.85 406.189 423.976C399.828 425.251 393.221 424.882 387.051 422.031C373.934 415.978 372.683 402.371 377.91 390.796C383.993 377.97 392.906 365.853 394.823 351.691C395.896 343.699 394.299 336.243 391.92 328.602C389.713 321.491 387.205 314.225 387.445 306.726C387.797 295.587 395.852 288.944 407.342 287.558C409.16 287.331 411.028 287.189 412.914 287.134C415.891 287.029 418.917 287.14 421.913 287.478C422.276 287.78 422.628 288.082 422.985 288.39C425.611 290.662 428.193 292.995 430.659 295.427C432.132 297.065 433.55 298.746 434.912 300.476C444.762 313.012 449.841 327.789 449.964 343.724Z",
339
+ color: PUPIL,
340
+ },
341
+ ],
342
+ },
343
+ {
344
+ id: "dazed",
345
+ sourceViewBox: { width: 734, height: 646 },
346
+ eyeCenter: { x: 345, y: 305 },
347
+ paths: [
348
+ {
349
+ svgPath:
350
+ "M313.693 304.831C313.693 328.312 303.574 349.436 287.451 364.087C273.217 377.028 254.291 384.918 233.522 384.918C189.241 384.918 153.352 349.06 153.352 304.831C153.352 260.597 189.241 224.744 233.522 224.744C254.291 224.744 273.217 232.634 287.451 245.569C303.574 260.22 313.693 281.344 313.693 304.831Z",
351
+ color: SCLERA,
352
+ },
353
+ {
354
+ svgPath:
355
+ "M313.692 304.831C313.692 328.311 303.573 349.435 287.45 364.086C277.647 369.564 266.343 372.69 254.313 372.69C216.795 372.69 186.383 342.31 186.383 304.831C186.383 267.352 216.795 236.966 254.313 236.966C266.343 236.966 277.647 240.092 287.45 245.569C303.573 260.22 313.692 281.344 313.692 304.831Z",
356
+ color: PUPIL,
357
+ },
358
+ {
359
+ svgPath:
360
+ "M375.883 304.831C375.883 328.312 386.002 349.436 402.124 364.087C416.359 377.028 435.284 384.918 456.053 384.918C500.334 384.918 536.224 349.06 536.224 304.831C536.224 260.597 500.334 224.744 456.053 224.744C435.284 224.744 416.359 232.634 402.124 245.569C386.002 260.22 375.883 281.344 375.883 304.831Z",
361
+ color: SCLERA,
362
+ },
363
+ {
364
+ svgPath:
365
+ "M375.883 304.831C375.883 328.311 386.002 349.435 402.124 364.086C411.927 369.564 423.231 372.69 435.262 372.69C472.779 372.69 503.192 342.31 503.192 304.831C503.192 267.352 472.779 236.966 435.262 236.966C423.232 236.966 411.927 240.092 402.124 245.569C386.002 260.22 375.883 281.344 375.883 304.831Z",
366
+ color: PUPIL,
367
+ },
368
+ ],
369
+ },
370
+ ],
371
+
372
+ colors: [
373
+ { id: "green", hex: "#4C9B50" },
374
+ { id: "orange", hex: "#E9642F" },
375
+ { id: "pink", hex: "#DB4B77" },
376
+ { id: "purple", hex: "#A665C9" },
377
+ { id: "teal", hex: "#0E9B8B" },
378
+ { id: "yellow", hex: "#E9C91A" },
379
+ ],
380
+
381
+ faceCenterOverrides: [
382
+ // Ghost body — shift non-native eyes from y=167 -> y=200
383
+ {
384
+ bodyShape: "ghost",
385
+ eyeStyle: "grumpy",
386
+ faceCenter: { x: 321, y: 200 },
387
+ },
388
+ { bodyShape: "ghost", eyeStyle: "angry", faceCenter: { x: 321, y: 200 } },
389
+ {
390
+ bodyShape: "ghost",
391
+ eyeStyle: "curious",
392
+ faceCenter: { x: 321, y: 200 },
393
+ },
394
+ { bodyShape: "ghost", eyeStyle: "goofy", faceCenter: { x: 321, y: 200 } },
395
+ {
396
+ bodyShape: "ghost",
397
+ eyeStyle: "bashful",
398
+ faceCenter: { x: 321, y: 200 },
399
+ },
400
+ {
401
+ bodyShape: "ghost",
402
+ eyeStyle: "gentle",
403
+ faceCenter: { x: 321, y: 200 },
404
+ },
405
+ {
406
+ bodyShape: "ghost",
407
+ eyeStyle: "quirky",
408
+ faceCenter: { x: 321, y: 200 },
409
+ },
410
+ { bodyShape: "ghost", eyeStyle: "dazed", faceCenter: { x: 321, y: 200 } },
411
+ // Sprout body — shift non-native eyes from y=415 -> y=385
412
+ {
413
+ bodyShape: "sprout",
414
+ eyeStyle: "grumpy",
415
+ faceCenter: { x: 264, y: 385 },
416
+ },
417
+ {
418
+ bodyShape: "sprout",
419
+ eyeStyle: "angry",
420
+ faceCenter: { x: 264, y: 385 },
421
+ },
422
+ {
423
+ bodyShape: "sprout",
424
+ eyeStyle: "goofy",
425
+ faceCenter: { x: 264, y: 385 },
426
+ },
427
+ {
428
+ bodyShape: "sprout",
429
+ eyeStyle: "surprised",
430
+ faceCenter: { x: 264, y: 385 },
431
+ },
432
+ {
433
+ bodyShape: "sprout",
434
+ eyeStyle: "bashful",
435
+ faceCenter: { x: 264, y: 385 },
436
+ },
437
+ {
438
+ bodyShape: "sprout",
439
+ eyeStyle: "gentle",
440
+ faceCenter: { x: 264, y: 385 },
441
+ },
442
+ {
443
+ bodyShape: "sprout",
444
+ eyeStyle: "quirky",
445
+ faceCenter: { x: 264, y: 385 },
446
+ },
447
+ {
448
+ bodyShape: "sprout",
449
+ eyeStyle: "dazed",
450
+ faceCenter: { x: 264, y: 385 },
451
+ },
452
+ ],
453
+ };
454
+ }
@@ -0,0 +1,17 @@
1
+ import { getResvg } from "./resvg-lazy.js";
2
+ import { composeSvg } from "./svg-compositor.js";
3
+
4
+ export function renderCharacterPng(
5
+ bodyShapeId: string,
6
+ eyeStyleId: string,
7
+ colorId: string,
8
+ size = 512,
9
+ ): Buffer {
10
+ const svg = composeSvg(bodyShapeId, eyeStyleId, colorId, size);
11
+ const Resvg = getResvg();
12
+ const resvg = new Resvg(svg, {
13
+ fitTo: { mode: "width", value: size },
14
+ });
15
+ const pngData = resvg.render();
16
+ return Buffer.from(pngData.asPng());
17
+ }
@@ -0,0 +1,21 @@
1
+ import type { Resvg as ResvgType } from "@resvg/resvg-js";
2
+
3
+ let ResvgClass: typeof ResvgType | undefined;
4
+
5
+ /**
6
+ * Returns the Resvg constructor, loading the native module on first call.
7
+ * Defers the native-addon require so the daemon can start even when the
8
+ * platform-specific binary is unavailable (e.g. inside a bun --compile
9
+ * single-file executable).
10
+ */
11
+ export function getResvg(): typeof ResvgType {
12
+ if (!ResvgClass) {
13
+ // Inline require is necessary here: @resvg/resvg-js loads a platform-specific
14
+ // native .node addon at import time. A top-level import would crash the daemon
15
+ // on startup inside bun --compile binaries where native addons are unavailable.
16
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
17
+ const mod = require("@resvg/resvg-js") as typeof import("@resvg/resvg-js");
18
+ ResvgClass = mod.Resvg;
19
+ }
20
+ return ResvgClass;
21
+ }
@@ -0,0 +1,90 @@
1
+ import { getCharacterComponents } from "./character-components.js";
2
+
3
+ /**
4
+ * Compose a complete SVG document from a body shape, eye style, and color.
5
+ *
6
+ * Ports the transform math from the Swift AvatarCompositor:
7
+ * - Body transform: aspect-fit scale + center translation from body viewBox to output size
8
+ * - Eye transform: remap from eye sourceViewBox to body viewBox (via faceCenter alignment),
9
+ * then compose with the body-to-output transform
10
+ *
11
+ * @param bodyShapeId - ID of the body shape (e.g. "blob")
12
+ * @param eyeStyleId - ID of the eye style (e.g. "grumpy")
13
+ * @param colorId - ID of the body color (e.g. "green")
14
+ * @param size - Output SVG width/height in px (default 512)
15
+ * @returns A complete SVG document string
16
+ */
17
+ export function composeSvg(
18
+ bodyShapeId: string,
19
+ eyeStyleId: string,
20
+ colorId: string,
21
+ size: number = 512,
22
+ ): string {
23
+ const components = getCharacterComponents();
24
+
25
+ const bodyShape = components.bodyShapes.find((b) => b.id === bodyShapeId);
26
+ if (!bodyShape) {
27
+ throw new Error(
28
+ `Unknown body shape: "${bodyShapeId}". Valid IDs: ${components.bodyShapes.map((b) => b.id).join(", ")}`,
29
+ );
30
+ }
31
+
32
+ const eyeStyle = components.eyeStyles.find((e) => e.id === eyeStyleId);
33
+ if (!eyeStyle) {
34
+ throw new Error(
35
+ `Unknown eye style: "${eyeStyleId}". Valid IDs: ${components.eyeStyles.map((e) => e.id).join(", ")}`,
36
+ );
37
+ }
38
+
39
+ const color = components.colors.find((c) => c.id === colorId);
40
+ if (!color) {
41
+ throw new Error(
42
+ `Unknown color: "${colorId}". Valid IDs: ${components.colors.map((c) => c.id).join(", ")}`,
43
+ );
44
+ }
45
+
46
+ // Resolve face center: check overrides first, fall back to body shape default
47
+ const override = components.faceCenterOverrides.find(
48
+ (o) => o.bodyShape === bodyShapeId && o.eyeStyle === eyeStyleId,
49
+ );
50
+ const faceCenter = override ? override.faceCenter : bodyShape.faceCenter;
51
+
52
+ // Body transform: aspect-fit scale from body viewBox to output size
53
+ const bodyVB = bodyShape.viewBox;
54
+ const bodyScale = Math.min(size / bodyVB.width, size / bodyVB.height);
55
+ const bodyTx = (size - bodyVB.width * bodyScale) / 2;
56
+ const bodyTy = (size - bodyVB.height * bodyScale) / 2;
57
+
58
+ // Eye remap transform: map eye sourceViewBox -> body viewBox coordinates,
59
+ // aligning eyeCenter to faceCenter with aspect-fit scaling
60
+ const eyeVB = eyeStyle.sourceViewBox;
61
+ const remapScale = Math.min(
62
+ bodyVB.width / eyeVB.width,
63
+ bodyVB.height / eyeVB.height,
64
+ );
65
+ const remapTx = faceCenter.x - eyeStyle.eyeCenter.x * remapScale;
66
+ const remapTy = faceCenter.y - eyeStyle.eyeCenter.y * remapScale;
67
+
68
+ // Compose remap with body transform (both are scale+translate, no rotation):
69
+ // composedScale = bodyScale * remapScale
70
+ // composedTx = bodyScale * remapTx + bodyTx
71
+ // composedTy = bodyScale * remapTy + bodyTy
72
+ const composedScale = bodyScale * remapScale;
73
+ const composedTx = bodyScale * remapTx + bodyTx;
74
+ const composedTy = bodyScale * remapTy + bodyTy;
75
+
76
+ const bodyTransform = `matrix(${bodyScale},0,0,${bodyScale},${bodyTx},${bodyTy})`;
77
+ const eyeTransform = `matrix(${composedScale},0,0,${composedScale},${composedTx},${composedTy})`;
78
+
79
+ // Build SVG paths
80
+ const bodyPath = `<path d="${bodyShape.svgPath}" fill="${color.hex}" transform="${bodyTransform}"/>`;
81
+
82
+ const eyePaths = eyeStyle.paths
83
+ .map(
84
+ (p) =>
85
+ `<path d="${p.svgPath}" fill="${p.color}" transform="${eyeTransform}"/>`,
86
+ )
87
+ .join("");
88
+
89
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 ${size} ${size}">${bodyPath}${eyePaths}</svg>`;
90
+ }