dsh-duet 0.2.1 → 0.3.0

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 (837) hide show
  1. package/README.md +26 -6
  2. package/assets/avatar/character.glb +0 -0
  3. package/assets/avatar/desktop/character.glb +0 -0
  4. package/assets/avatar/desktop/companion.mjs +3 -3
  5. package/assets/avatar/desktop/index.html +10 -0
  6. package/assets/avatar/desktop/manifest.json +4 -4
  7. package/assets/avatar/desktop/portrait.png +0 -0
  8. package/assets/avatar/portrait.png +0 -0
  9. package/config/duet.patch.yml +176 -0
  10. package/node_modules/dsh-duet-superagent/LICENSE +21 -0
  11. package/node_modules/dsh-duet-superagent/README.md +39 -0
  12. package/node_modules/dsh-duet-superagent/cordis.patch.yml +193 -0
  13. package/node_modules/dsh-duet-superagent/lib/client.js +6883 -0
  14. package/node_modules/dsh-duet-superagent/lib/deployment-CFE4xX4v.d.ts +736 -0
  15. package/node_modules/dsh-duet-superagent/lib/duet.d.ts +1160 -0
  16. package/node_modules/dsh-duet-superagent/lib/duet.js +837 -0
  17. package/node_modules/dsh-duet-superagent/lib/engine-B2un4KNA.d.ts +243 -0
  18. package/node_modules/dsh-duet-superagent/lib/feishu-rAGM9U9b.js +1324 -0
  19. package/node_modules/dsh-duet-superagent/lib/feishu-watch.d.ts +125 -0
  20. package/node_modules/dsh-duet-superagent/lib/feishu-watch.js +2 -0
  21. package/node_modules/dsh-duet-superagent/lib/github-pull-gSbjzypm.js +596 -0
  22. package/node_modules/dsh-duet-superagent/lib/github-watch.d.ts +2 -0
  23. package/node_modules/dsh-duet-superagent/lib/github-watch.js +832 -0
  24. package/node_modules/dsh-duet-superagent/lib/index.d.ts +129 -0
  25. package/node_modules/dsh-duet-superagent/lib/index.js +107 -0
  26. package/node_modules/dsh-duet-superagent/lib/poll-Dh7J1cdM.js +872 -0
  27. package/node_modules/dsh-duet-superagent/lib/registry-BTgyFZ8S.d.ts +1509 -0
  28. package/node_modules/dsh-duet-superagent/lib/runtime-CbDPyQoo.js +10653 -0
  29. package/node_modules/dsh-duet-superagent/locale/en.json +6 -0
  30. package/node_modules/dsh-duet-superagent/locale/zh.json +6 -0
  31. package/node_modules/dsh-duet-superagent/package.json +113 -0
  32. package/node_modules/dsh-duet-superagent/prompts/admission.md +68 -0
  33. package/node_modules/dsh-duet-superagent/prompts/cli.md +17 -0
  34. package/node_modules/dsh-duet-superagent/prompts/dispatch.md +59 -0
  35. package/node_modules/dsh-duet-superagent/prompts/handoff-orchestrator.md +4 -0
  36. package/node_modules/dsh-duet-superagent/prompts/handoff-worker.md +7 -0
  37. package/node_modules/dsh-duet-superagent/prompts/handoff.md +6 -0
  38. package/node_modules/dsh-duet-superagent/prompts/orchestrator.md +16 -0
  39. package/node_modules/dsh-duet-superagent/prompts/replies.md +35 -0
  40. package/node_modules/dsh-duet-superagent/prompts/shared.md +7 -0
  41. package/node_modules/dsh-duet-superagent/prompts/subscriptions.md +13 -0
  42. package/node_modules/dsh-duet-superagent/prompts/team/communication.md +97 -0
  43. package/node_modules/dsh-duet-superagent/prompts/team/delivery.md +28 -0
  44. package/node_modules/dsh-duet-superagent/prompts/team/scope.md +22 -0
  45. package/node_modules/dsh-duet-superagent/prompts/work.md +49 -0
  46. package/node_modules/dsh-duet-superagent/prompts/worker.md +10 -0
  47. package/node_modules/dsh-duet-superagent/skills/dsh-superagent-feishu/SKILL.md +12 -0
  48. package/node_modules/dsh-duet-superagent/skills/dsh-superagent-github/SKILL.md +14 -0
  49. package/node_modules/graceful-fs/LICENSE.md +55 -0
  50. package/node_modules/graceful-fs/README.md +143 -0
  51. package/node_modules/graceful-fs/clone.js +23 -0
  52. package/node_modules/graceful-fs/graceful-fs.js +448 -0
  53. package/node_modules/graceful-fs/legacy-streams.js +118 -0
  54. package/node_modules/graceful-fs/package.json +52 -0
  55. package/node_modules/graceful-fs/polyfills.js +355 -0
  56. package/node_modules/proper-lockfile/CHANGELOG.md +108 -0
  57. package/node_modules/proper-lockfile/LICENSE +21 -0
  58. package/node_modules/proper-lockfile/README.md +183 -0
  59. package/node_modules/proper-lockfile/index.js +40 -0
  60. package/node_modules/proper-lockfile/lib/adapter.js +85 -0
  61. package/node_modules/proper-lockfile/lib/lockfile.js +342 -0
  62. package/node_modules/proper-lockfile/lib/mtime-precision.js +55 -0
  63. package/node_modules/proper-lockfile/package.json +71 -0
  64. package/node_modules/retry/.npmignore +3 -0
  65. package/node_modules/retry/.travis.yml +15 -0
  66. package/node_modules/retry/License +21 -0
  67. package/node_modules/retry/Makefile +18 -0
  68. package/node_modules/retry/README.md +227 -0
  69. package/node_modules/retry/equation.gif +0 -0
  70. package/node_modules/retry/example/dns.js +31 -0
  71. package/node_modules/retry/example/stop.js +40 -0
  72. package/node_modules/retry/index.js +1 -0
  73. package/node_modules/retry/lib/retry.js +100 -0
  74. package/node_modules/retry/lib/retry_operation.js +158 -0
  75. package/node_modules/retry/package.json +32 -0
  76. package/node_modules/retry/test/common.js +10 -0
  77. package/node_modules/retry/test/integration/test-forever.js +24 -0
  78. package/node_modules/retry/test/integration/test-retry-operation.js +258 -0
  79. package/node_modules/retry/test/integration/test-retry-wrap.js +101 -0
  80. package/node_modules/retry/test/integration/test-timeouts.js +69 -0
  81. package/node_modules/signal-exit/LICENSE.txt +16 -0
  82. package/node_modules/signal-exit/README.md +39 -0
  83. package/node_modules/signal-exit/index.js +202 -0
  84. package/node_modules/signal-exit/package.json +38 -0
  85. package/node_modules/signal-exit/signals.js +53 -0
  86. package/node_modules/zod/LICENSE +21 -0
  87. package/node_modules/zod/README.md +191 -0
  88. package/node_modules/zod/index.cjs +33 -0
  89. package/node_modules/zod/index.d.cts +4 -0
  90. package/node_modules/zod/index.d.ts +4 -0
  91. package/node_modules/zod/index.js +4 -0
  92. package/node_modules/zod/locales/index.cjs +17 -0
  93. package/node_modules/zod/locales/index.d.cts +1 -0
  94. package/node_modules/zod/locales/index.d.ts +1 -0
  95. package/node_modules/zod/locales/index.js +1 -0
  96. package/node_modules/zod/locales/package.json +7 -0
  97. package/node_modules/zod/mini/index.cjs +32 -0
  98. package/node_modules/zod/mini/index.d.cts +3 -0
  99. package/node_modules/zod/mini/index.d.ts +3 -0
  100. package/node_modules/zod/mini/index.js +3 -0
  101. package/node_modules/zod/mini/package.json +7 -0
  102. package/node_modules/zod/package.json +135 -0
  103. package/node_modules/zod/src/index.ts +4 -0
  104. package/node_modules/zod/src/locales/index.ts +1 -0
  105. package/node_modules/zod/src/mini/index.ts +3 -0
  106. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  107. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  108. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  109. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  110. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  111. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  112. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  113. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  114. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  115. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  116. package/node_modules/zod/src/v3/errors.ts +13 -0
  117. package/node_modules/zod/src/v3/external.ts +6 -0
  118. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  119. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  120. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  121. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  122. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  123. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  124. package/node_modules/zod/src/v3/index.ts +4 -0
  125. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  126. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  127. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  128. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  129. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  130. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  131. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  132. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  133. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  134. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  135. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  136. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  137. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  138. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  139. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  140. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  141. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  142. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  143. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  144. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  145. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  146. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  147. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  148. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  149. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  150. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  151. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  152. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  153. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  154. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  155. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  156. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  157. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  158. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  159. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  160. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  161. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  162. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  163. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  164. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  165. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  166. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  167. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  168. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  169. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  170. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  171. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  172. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  173. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  174. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  175. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  176. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  177. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  178. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  179. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  180. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  181. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  182. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  183. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  184. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  185. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  186. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  187. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  188. package/node_modules/zod/src/v3/types.ts +5138 -0
  189. package/node_modules/zod/src/v4/classic/checks.ts +32 -0
  190. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  191. package/node_modules/zod/src/v4/classic/compat.ts +70 -0
  192. package/node_modules/zod/src/v4/classic/errors.ts +82 -0
  193. package/node_modules/zod/src/v4/classic/external.ts +52 -0
  194. package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
  195. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  196. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  197. package/node_modules/zod/src/v4/classic/parse.ts +82 -0
  198. package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
  199. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  200. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  201. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  202. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
  203. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  204. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  205. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  206. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  207. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  208. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
  209. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  210. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  211. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
  212. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  213. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  214. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  215. package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  216. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  217. package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
  218. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  219. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  220. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
  221. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
  222. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  223. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
  224. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  225. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  226. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  227. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  228. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
  229. package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  230. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  231. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
  232. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  233. package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  234. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  235. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  236. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
  237. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  238. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  239. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  240. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  241. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  242. package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  243. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  244. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  245. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  246. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  247. package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
  248. package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
  249. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
  250. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
  251. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  252. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  253. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  254. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
  255. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  256. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  257. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  258. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  259. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  260. package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
  261. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
  262. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
  263. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  264. package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  265. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  266. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  267. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
  268. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  269. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  270. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  271. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
  272. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  273. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
  274. package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
  275. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  276. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  277. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  278. package/node_modules/zod/src/v4/core/api.ts +1823 -0
  279. package/node_modules/zod/src/v4/core/checks.ts +1293 -0
  280. package/node_modules/zod/src/v4/core/config.ts +15 -0
  281. package/node_modules/zod/src/v4/core/core.ts +153 -0
  282. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  283. package/node_modules/zod/src/v4/core/errors.ts +455 -0
  284. package/node_modules/zod/src/v4/core/index.ts +16 -0
  285. package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  286. package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
  287. package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  288. package/node_modules/zod/src/v4/core/parse.ts +195 -0
  289. package/node_modules/zod/src/v4/core/regexes.ts +190 -0
  290. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  291. package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
  292. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  293. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  294. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  295. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  296. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
  297. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  298. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  299. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  300. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  301. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  302. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  303. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  304. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  305. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  306. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  307. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  308. package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
  309. package/node_modules/zod/src/v4/core/util.ts +983 -0
  310. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  311. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  312. package/node_modules/zod/src/v4/index.ts +4 -0
  313. package/node_modules/zod/src/v4/locales/ar.ts +115 -0
  314. package/node_modules/zod/src/v4/locales/az.ts +111 -0
  315. package/node_modules/zod/src/v4/locales/be.ts +176 -0
  316. package/node_modules/zod/src/v4/locales/bg.ts +128 -0
  317. package/node_modules/zod/src/v4/locales/ca.ts +116 -0
  318. package/node_modules/zod/src/v4/locales/cs.ts +118 -0
  319. package/node_modules/zod/src/v4/locales/da.ts +123 -0
  320. package/node_modules/zod/src/v4/locales/de.ts +116 -0
  321. package/node_modules/zod/src/v4/locales/el.ts +121 -0
  322. package/node_modules/zod/src/v4/locales/en.ts +123 -0
  323. package/node_modules/zod/src/v4/locales/eo.ts +118 -0
  324. package/node_modules/zod/src/v4/locales/es.ts +141 -0
  325. package/node_modules/zod/src/v4/locales/fa.ts +126 -0
  326. package/node_modules/zod/src/v4/locales/fi.ts +121 -0
  327. package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  328. package/node_modules/zod/src/v4/locales/fr.ts +132 -0
  329. package/node_modules/zod/src/v4/locales/he.ts +246 -0
  330. package/node_modules/zod/src/v4/locales/hr.ts +131 -0
  331. package/node_modules/zod/src/v4/locales/hu.ts +117 -0
  332. package/node_modules/zod/src/v4/locales/hy.ts +164 -0
  333. package/node_modules/zod/src/v4/locales/id.ts +115 -0
  334. package/node_modules/zod/src/v4/locales/index.ts +52 -0
  335. package/node_modules/zod/src/v4/locales/is.ts +119 -0
  336. package/node_modules/zod/src/v4/locales/it.ts +116 -0
  337. package/node_modules/zod/src/v4/locales/ja.ts +114 -0
  338. package/node_modules/zod/src/v4/locales/ka.ts +123 -0
  339. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  340. package/node_modules/zod/src/v4/locales/km.ts +119 -0
  341. package/node_modules/zod/src/v4/locales/ko.ts +121 -0
  342. package/node_modules/zod/src/v4/locales/lt.ts +239 -0
  343. package/node_modules/zod/src/v4/locales/mk.ts +118 -0
  344. package/node_modules/zod/src/v4/locales/ms.ts +115 -0
  345. package/node_modules/zod/src/v4/locales/nl.ts +121 -0
  346. package/node_modules/zod/src/v4/locales/no.ts +116 -0
  347. package/node_modules/zod/src/v4/locales/ota.ts +117 -0
  348. package/node_modules/zod/src/v4/locales/pl.ts +118 -0
  349. package/node_modules/zod/src/v4/locales/ps.ts +126 -0
  350. package/node_modules/zod/src/v4/locales/pt.ts +116 -0
  351. package/node_modules/zod/src/v4/locales/ro.ts +129 -0
  352. package/node_modules/zod/src/v4/locales/ru.ts +176 -0
  353. package/node_modules/zod/src/v4/locales/sl.ts +118 -0
  354. package/node_modules/zod/src/v4/locales/sv.ts +119 -0
  355. package/node_modules/zod/src/v4/locales/ta.ts +118 -0
  356. package/node_modules/zod/src/v4/locales/th.ts +119 -0
  357. package/node_modules/zod/src/v4/locales/tr.ts +111 -0
  358. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  359. package/node_modules/zod/src/v4/locales/uk.ts +117 -0
  360. package/node_modules/zod/src/v4/locales/ur.ts +119 -0
  361. package/node_modules/zod/src/v4/locales/uz.ts +117 -0
  362. package/node_modules/zod/src/v4/locales/vi.ts +117 -0
  363. package/node_modules/zod/src/v4/locales/yo.ts +124 -0
  364. package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  365. package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  366. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  367. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  368. package/node_modules/zod/src/v4/mini/external.ts +41 -0
  369. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  370. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  371. package/node_modules/zod/src/v4/mini/parse.ts +14 -0
  372. package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
  373. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  374. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  375. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  376. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  377. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
  378. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  379. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  380. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  381. package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
  382. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  383. package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  384. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  385. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
  386. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  387. package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
  388. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  389. package/node_modules/zod/v3/ZodError.cjs +138 -0
  390. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  391. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  392. package/node_modules/zod/v3/ZodError.js +133 -0
  393. package/node_modules/zod/v3/errors.cjs +17 -0
  394. package/node_modules/zod/v3/errors.d.cts +5 -0
  395. package/node_modules/zod/v3/errors.d.ts +5 -0
  396. package/node_modules/zod/v3/errors.js +9 -0
  397. package/node_modules/zod/v3/external.cjs +22 -0
  398. package/node_modules/zod/v3/external.d.cts +6 -0
  399. package/node_modules/zod/v3/external.d.ts +6 -0
  400. package/node_modules/zod/v3/external.js +6 -0
  401. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  402. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  403. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  404. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  405. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  406. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  407. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  408. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  409. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  410. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  411. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  412. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  413. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  414. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  415. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  416. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  417. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  418. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  419. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  420. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  421. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  422. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  423. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  424. package/node_modules/zod/v3/helpers/util.js +133 -0
  425. package/node_modules/zod/v3/index.cjs +33 -0
  426. package/node_modules/zod/v3/index.d.cts +4 -0
  427. package/node_modules/zod/v3/index.d.ts +4 -0
  428. package/node_modules/zod/v3/index.js +4 -0
  429. package/node_modules/zod/v3/locales/en.cjs +112 -0
  430. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  431. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  432. package/node_modules/zod/v3/locales/en.js +109 -0
  433. package/node_modules/zod/v3/package.json +7 -0
  434. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  435. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  436. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  437. package/node_modules/zod/v3/standard-schema.js +1 -0
  438. package/node_modules/zod/v3/types.cjs +3777 -0
  439. package/node_modules/zod/v3/types.d.cts +1034 -0
  440. package/node_modules/zod/v3/types.d.ts +1034 -0
  441. package/node_modules/zod/v3/types.js +3695 -0
  442. package/node_modules/zod/v4/classic/checks.cjs +33 -0
  443. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  444. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  445. package/node_modules/zod/v4/classic/checks.js +1 -0
  446. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  447. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  448. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  449. package/node_modules/zod/v4/classic/coerce.js +17 -0
  450. package/node_modules/zod/v4/classic/compat.cjs +61 -0
  451. package/node_modules/zod/v4/classic/compat.d.cts +50 -0
  452. package/node_modules/zod/v4/classic/compat.d.ts +50 -0
  453. package/node_modules/zod/v4/classic/compat.js +31 -0
  454. package/node_modules/zod/v4/classic/errors.cjs +74 -0
  455. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  456. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  457. package/node_modules/zod/v4/classic/errors.js +48 -0
  458. package/node_modules/zod/v4/classic/external.cjs +73 -0
  459. package/node_modules/zod/v4/classic/external.d.cts +16 -0
  460. package/node_modules/zod/v4/classic/external.d.ts +16 -0
  461. package/node_modules/zod/v4/classic/external.js +20 -0
  462. package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
  463. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  464. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  465. package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
  466. package/node_modules/zod/v4/classic/index.cjs +33 -0
  467. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  468. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  469. package/node_modules/zod/v4/classic/index.js +4 -0
  470. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  471. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  472. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  473. package/node_modules/zod/v4/classic/iso.js +30 -0
  474. package/node_modules/zod/v4/classic/package.json +7 -0
  475. package/node_modules/zod/v4/classic/parse.cjs +41 -0
  476. package/node_modules/zod/v4/classic/parse.d.cts +31 -0
  477. package/node_modules/zod/v4/classic/parse.d.ts +31 -0
  478. package/node_modules/zod/v4/classic/parse.js +15 -0
  479. package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
  480. package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
  481. package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
  482. package/node_modules/zod/v4/classic/schemas.js +1395 -0
  483. package/node_modules/zod/v4/core/api.cjs +1227 -0
  484. package/node_modules/zod/v4/core/api.d.cts +325 -0
  485. package/node_modules/zod/v4/core/api.d.ts +325 -0
  486. package/node_modules/zod/v4/core/api.js +1087 -0
  487. package/node_modules/zod/v4/core/checks.cjs +601 -0
  488. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  489. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  490. package/node_modules/zod/v4/core/checks.js +575 -0
  491. package/node_modules/zod/v4/core/core.cjs +85 -0
  492. package/node_modules/zod/v4/core/core.d.cts +70 -0
  493. package/node_modules/zod/v4/core/core.d.ts +70 -0
  494. package/node_modules/zod/v4/core/core.js +78 -0
  495. package/node_modules/zod/v4/core/doc.cjs +39 -0
  496. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  497. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  498. package/node_modules/zod/v4/core/doc.js +35 -0
  499. package/node_modules/zod/v4/core/errors.cjs +216 -0
  500. package/node_modules/zod/v4/core/errors.d.cts +221 -0
  501. package/node_modules/zod/v4/core/errors.d.ts +221 -0
  502. package/node_modules/zod/v4/core/errors.js +185 -0
  503. package/node_modules/zod/v4/core/index.cjs +47 -0
  504. package/node_modules/zod/v4/core/index.d.cts +16 -0
  505. package/node_modules/zod/v4/core/index.d.ts +16 -0
  506. package/node_modules/zod/v4/core/index.js +16 -0
  507. package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  508. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  509. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  510. package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  511. package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
  512. package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  513. package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  514. package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
  515. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  516. package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  517. package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  518. package/node_modules/zod/v4/core/json-schema.js +1 -0
  519. package/node_modules/zod/v4/core/package.json +7 -0
  520. package/node_modules/zod/v4/core/parse.cjs +131 -0
  521. package/node_modules/zod/v4/core/parse.d.cts +49 -0
  522. package/node_modules/zod/v4/core/parse.d.ts +49 -0
  523. package/node_modules/zod/v4/core/parse.js +93 -0
  524. package/node_modules/zod/v4/core/regexes.cjs +172 -0
  525. package/node_modules/zod/v4/core/regexes.d.cts +85 -0
  526. package/node_modules/zod/v4/core/regexes.d.ts +85 -0
  527. package/node_modules/zod/v4/core/regexes.js +139 -0
  528. package/node_modules/zod/v4/core/registries.cjs +56 -0
  529. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  530. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  531. package/node_modules/zod/v4/core/registries.js +51 -0
  532. package/node_modules/zod/v4/core/schemas.cjs +2270 -0
  533. package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
  534. package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
  535. package/node_modules/zod/v4/core/schemas.js +2239 -0
  536. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  537. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  538. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  539. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  540. package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
  541. package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  542. package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  543. package/node_modules/zod/v4/core/to-json-schema.js +448 -0
  544. package/node_modules/zod/v4/core/util.cjs +734 -0
  545. package/node_modules/zod/v4/core/util.d.cts +200 -0
  546. package/node_modules/zod/v4/core/util.d.ts +200 -0
  547. package/node_modules/zod/v4/core/util.js +674 -0
  548. package/node_modules/zod/v4/core/versions.cjs +8 -0
  549. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  550. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  551. package/node_modules/zod/v4/core/versions.js +5 -0
  552. package/node_modules/zod/v4/index.cjs +22 -0
  553. package/node_modules/zod/v4/index.d.cts +3 -0
  554. package/node_modules/zod/v4/index.d.ts +3 -0
  555. package/node_modules/zod/v4/index.js +3 -0
  556. package/node_modules/zod/v4/locales/ar.cjs +133 -0
  557. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  558. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  559. package/node_modules/zod/v4/locales/ar.js +106 -0
  560. package/node_modules/zod/v4/locales/az.cjs +132 -0
  561. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  562. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  563. package/node_modules/zod/v4/locales/az.js +105 -0
  564. package/node_modules/zod/v4/locales/be.cjs +183 -0
  565. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  566. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  567. package/node_modules/zod/v4/locales/be.js +156 -0
  568. package/node_modules/zod/v4/locales/bg.cjs +147 -0
  569. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  570. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  571. package/node_modules/zod/v4/locales/bg.js +120 -0
  572. package/node_modules/zod/v4/locales/ca.cjs +134 -0
  573. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  574. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  575. package/node_modules/zod/v4/locales/ca.js +107 -0
  576. package/node_modules/zod/v4/locales/cs.cjs +138 -0
  577. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  578. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  579. package/node_modules/zod/v4/locales/cs.js +111 -0
  580. package/node_modules/zod/v4/locales/da.cjs +142 -0
  581. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  582. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  583. package/node_modules/zod/v4/locales/da.js +115 -0
  584. package/node_modules/zod/v4/locales/de.cjs +135 -0
  585. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  586. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  587. package/node_modules/zod/v4/locales/de.js +108 -0
  588. package/node_modules/zod/v4/locales/el.cjs +136 -0
  589. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  590. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  591. package/node_modules/zod/v4/locales/el.js +109 -0
  592. package/node_modules/zod/v4/locales/en.cjs +140 -0
  593. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  594. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  595. package/node_modules/zod/v4/locales/en.js +113 -0
  596. package/node_modules/zod/v4/locales/eo.cjs +136 -0
  597. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  598. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  599. package/node_modules/zod/v4/locales/eo.js +109 -0
  600. package/node_modules/zod/v4/locales/es.cjs +159 -0
  601. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  602. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  603. package/node_modules/zod/v4/locales/es.js +132 -0
  604. package/node_modules/zod/v4/locales/fa.cjs +141 -0
  605. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  606. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  607. package/node_modules/zod/v4/locales/fa.js +114 -0
  608. package/node_modules/zod/v4/locales/fi.cjs +139 -0
  609. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  610. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  611. package/node_modules/zod/v4/locales/fi.js +112 -0
  612. package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  613. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  614. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  615. package/node_modules/zod/v4/locales/fr-CA.js +107 -0
  616. package/node_modules/zod/v4/locales/fr.cjs +152 -0
  617. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  618. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  619. package/node_modules/zod/v4/locales/fr.js +125 -0
  620. package/node_modules/zod/v4/locales/he.cjs +241 -0
  621. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  622. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  623. package/node_modules/zod/v4/locales/he.js +214 -0
  624. package/node_modules/zod/v4/locales/hr.cjs +149 -0
  625. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  626. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  627. package/node_modules/zod/v4/locales/hr.js +122 -0
  628. package/node_modules/zod/v4/locales/hu.cjs +135 -0
  629. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  630. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  631. package/node_modules/zod/v4/locales/hu.js +108 -0
  632. package/node_modules/zod/v4/locales/hy.cjs +174 -0
  633. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  634. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  635. package/node_modules/zod/v4/locales/hy.js +147 -0
  636. package/node_modules/zod/v4/locales/id.cjs +133 -0
  637. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  638. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  639. package/node_modules/zod/v4/locales/id.js +106 -0
  640. package/node_modules/zod/v4/locales/index.cjs +111 -0
  641. package/node_modules/zod/v4/locales/index.d.cts +52 -0
  642. package/node_modules/zod/v4/locales/index.d.ts +52 -0
  643. package/node_modules/zod/v4/locales/index.js +52 -0
  644. package/node_modules/zod/v4/locales/is.cjs +136 -0
  645. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  646. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  647. package/node_modules/zod/v4/locales/is.js +109 -0
  648. package/node_modules/zod/v4/locales/it.cjs +135 -0
  649. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  650. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  651. package/node_modules/zod/v4/locales/it.js +108 -0
  652. package/node_modules/zod/v4/locales/ja.cjs +134 -0
  653. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  654. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  655. package/node_modules/zod/v4/locales/ja.js +107 -0
  656. package/node_modules/zod/v4/locales/ka.cjs +139 -0
  657. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  658. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  659. package/node_modules/zod/v4/locales/ka.js +112 -0
  660. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  661. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  662. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  663. package/node_modules/zod/v4/locales/kh.js +5 -0
  664. package/node_modules/zod/v4/locales/km.cjs +137 -0
  665. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  666. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  667. package/node_modules/zod/v4/locales/km.js +110 -0
  668. package/node_modules/zod/v4/locales/ko.cjs +138 -0
  669. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  670. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  671. package/node_modules/zod/v4/locales/ko.js +111 -0
  672. package/node_modules/zod/v4/locales/lt.cjs +230 -0
  673. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  674. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  675. package/node_modules/zod/v4/locales/lt.js +203 -0
  676. package/node_modules/zod/v4/locales/mk.cjs +136 -0
  677. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  678. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  679. package/node_modules/zod/v4/locales/mk.js +109 -0
  680. package/node_modules/zod/v4/locales/ms.cjs +134 -0
  681. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  682. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  683. package/node_modules/zod/v4/locales/ms.js +107 -0
  684. package/node_modules/zod/v4/locales/nl.cjs +137 -0
  685. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  686. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  687. package/node_modules/zod/v4/locales/nl.js +110 -0
  688. package/node_modules/zod/v4/locales/no.cjs +135 -0
  689. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  690. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  691. package/node_modules/zod/v4/locales/no.js +108 -0
  692. package/node_modules/zod/v4/locales/ota.cjs +136 -0
  693. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  694. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  695. package/node_modules/zod/v4/locales/ota.js +109 -0
  696. package/node_modules/zod/v4/locales/package.json +7 -0
  697. package/node_modules/zod/v4/locales/pl.cjs +136 -0
  698. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  699. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  700. package/node_modules/zod/v4/locales/pl.js +109 -0
  701. package/node_modules/zod/v4/locales/ps.cjs +141 -0
  702. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  703. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  704. package/node_modules/zod/v4/locales/ps.js +114 -0
  705. package/node_modules/zod/v4/locales/pt.cjs +135 -0
  706. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  707. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  708. package/node_modules/zod/v4/locales/pt.js +108 -0
  709. package/node_modules/zod/v4/locales/ro.cjs +146 -0
  710. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  711. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  712. package/node_modules/zod/v4/locales/ro.js +119 -0
  713. package/node_modules/zod/v4/locales/ru.cjs +183 -0
  714. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  715. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  716. package/node_modules/zod/v4/locales/ru.js +156 -0
  717. package/node_modules/zod/v4/locales/sl.cjs +136 -0
  718. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  719. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  720. package/node_modules/zod/v4/locales/sl.js +109 -0
  721. package/node_modules/zod/v4/locales/sv.cjs +137 -0
  722. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  723. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  724. package/node_modules/zod/v4/locales/sv.js +110 -0
  725. package/node_modules/zod/v4/locales/ta.cjs +137 -0
  726. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  727. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  728. package/node_modules/zod/v4/locales/ta.js +110 -0
  729. package/node_modules/zod/v4/locales/th.cjs +137 -0
  730. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  731. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  732. package/node_modules/zod/v4/locales/th.js +110 -0
  733. package/node_modules/zod/v4/locales/tr.cjs +132 -0
  734. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  735. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  736. package/node_modules/zod/v4/locales/tr.js +105 -0
  737. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  738. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  739. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  740. package/node_modules/zod/v4/locales/ua.js +5 -0
  741. package/node_modules/zod/v4/locales/uk.cjs +135 -0
  742. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  743. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  744. package/node_modules/zod/v4/locales/uk.js +108 -0
  745. package/node_modules/zod/v4/locales/ur.cjs +137 -0
  746. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  747. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  748. package/node_modules/zod/v4/locales/ur.js +110 -0
  749. package/node_modules/zod/v4/locales/uz.cjs +137 -0
  750. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  751. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  752. package/node_modules/zod/v4/locales/uz.js +110 -0
  753. package/node_modules/zod/v4/locales/vi.cjs +135 -0
  754. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  755. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  756. package/node_modules/zod/v4/locales/vi.js +108 -0
  757. package/node_modules/zod/v4/locales/yo.cjs +134 -0
  758. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  759. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  760. package/node_modules/zod/v4/locales/yo.js +107 -0
  761. package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  762. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  763. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  764. package/node_modules/zod/v4/locales/zh-CN.js +109 -0
  765. package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  766. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  767. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  768. package/node_modules/zod/v4/locales/zh-TW.js +107 -0
  769. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  770. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  771. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  772. package/node_modules/zod/v4/mini/checks.js +1 -0
  773. package/node_modules/zod/v4/mini/coerce.cjs +52 -0
  774. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  775. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  776. package/node_modules/zod/v4/mini/coerce.js +22 -0
  777. package/node_modules/zod/v4/mini/external.cjs +63 -0
  778. package/node_modules/zod/v4/mini/external.d.cts +13 -0
  779. package/node_modules/zod/v4/mini/external.d.ts +13 -0
  780. package/node_modules/zod/v4/mini/external.js +14 -0
  781. package/node_modules/zod/v4/mini/index.cjs +32 -0
  782. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  783. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  784. package/node_modules/zod/v4/mini/index.js +3 -0
  785. package/node_modules/zod/v4/mini/iso.cjs +64 -0
  786. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  787. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  788. package/node_modules/zod/v4/mini/iso.js +34 -0
  789. package/node_modules/zod/v4/mini/package.json +7 -0
  790. package/node_modules/zod/v4/mini/parse.cjs +16 -0
  791. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  792. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  793. package/node_modules/zod/v4/mini/parse.js +1 -0
  794. package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
  795. package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
  796. package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
  797. package/node_modules/zod/v4/mini/schemas.js +961 -0
  798. package/node_modules/zod/v4/package.json +7 -0
  799. package/node_modules/zod/v4-mini/index.cjs +32 -0
  800. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  801. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  802. package/node_modules/zod/v4-mini/index.js +3 -0
  803. package/node_modules/zod/v4-mini/package.json +7 -0
  804. package/package.json +5 -2
  805. package/src/avatar/companion.html +10 -0
  806. package/src/avatar/companion.mjs +1 -1
  807. package/src/avatar/surface.mjs +2 -0
  808. package/src/client/agent-tasks.mjs +165 -0
  809. package/src/client/audio.mjs +30 -4
  810. package/src/client/avatar-surfaces.mjs +7 -4
  811. package/src/client/avatar-tasks.mjs +5 -2
  812. package/src/client/avatar.mjs +21 -2
  813. package/src/client/browser.mjs +70 -36
  814. package/src/client/composer-bridge.mjs +1 -1
  815. package/src/client/connection-hint.mjs +1 -1
  816. package/src/client/entry.js +1 -1
  817. package/src/client/feedback.mjs +1 -1
  818. package/src/client/identity.mjs +2 -2
  819. package/src/client/settings.html +19 -4
  820. package/src/client/tutorial-adapter.mjs +11 -4
  821. package/src/client/tutorial.mjs +11 -4
  822. package/src/client/work-mode.mjs +250 -0
  823. package/src/client/workspaces.mjs +1 -1
  824. package/src/host/agent-connection.mjs +199 -0
  825. package/src/host/agent-trace.mjs +56 -0
  826. package/src/host/assets.mjs +2 -0
  827. package/src/host/diagnostics.mjs +37 -2
  828. package/src/host/plugin.mjs +93 -11
  829. package/src/host/proxy.mjs +65 -18
  830. package/src/host/service-info.mjs +30 -0
  831. package/src/host/settings.mjs +23 -2
  832. package/src/host/trace.mjs +4 -1
  833. package/src/shared/avatar-menu-ui.mjs +5 -3
  834. package/src/shared/avatar-menu.mjs +3 -0
  835. package/src/shared/avatar-surface.mjs +2 -1
  836. package/src/shared/state.mjs +17 -4
  837. package/src/shared/work-mode.mjs +59 -0
@@ -0,0 +1,1160 @@
1
+ import { C as Assignment, E as ChannelRef, L as Strength, U as Ticket, W as TicketEndBy, a as ReceiveResult, c as Candidate, d as Executor, g as ReplyStatus, i as Machine, m as Outbox$1, n as Deployment, o as AssessmentOutcome, p as OutboundMessage, q as Trigger, s as Assessor } from "./deployment-CFE4xX4v.js";
2
+ import { a as EngineForSettings, n as EngineForExecutor, r as EngineForMainSession, t as Engine } from "./engine-B2un4KNA.js";
3
+ import { A as SettingsOrigin, C as Store, D as RoleModel, E as Variable, M as Commands, O as Settings$1, S as Effects, T as HealthEntry, a as Health, b as Prompts, i as TriggerContext, j as SetupProblem, k as SettingsBlock, n as ChannelLink, o as SourceContext, r as SourceKind, s as SourceHost, t as SourceRegistry, w as HealthBoard, x as Sessions } from "./registry-BTgyFZ8S.js";
4
+ import { Context, Service } from "@deepseek-ai/cordis";
5
+ import { z } from "zod";
6
+ import { DatabaseSync } from "node:sqlite";
7
+ import { Agent } from "@deepseek-ai/dsh-agent";
8
+ //#region src/executor/dsh.d.ts
9
+ /** Host dependencies used by `DshExecutor`. */
10
+ interface ExecutorHost {
11
+ /** DSH Cordis context: agents and their events, and the subprocess service used to run prepare commands. */
12
+ readonly context: Context;
13
+ /** Where the Executor reports what happened to Assignments and Inputs. */
14
+ readonly engine: Pick<EngineForExecutor, 'assignmentStarted' | 'inputsDelivered' | 'inputsRead' | 'turnEnded' | 'deliveryFailed' | 'report' | 'assignmentInterrupted'>;
15
+ readonly store: Pick<Store, 'tickets' | 'triggers' | 'set' | 'settings' | 'atomic' | 'afterCommit'>;
16
+ /** Durable effect queue through which launches and input deliveries run. */
17
+ readonly effects: Pick<Effects, 'enqueue' | 'handle'>;
18
+ /** The `worker` health entry, which reports whether background worker event handling failed. */
19
+ readonly health: HealthEntry;
20
+ readonly machine: Pick<Machine, 'stateDir' | 'localWorkspace'>;
21
+ readonly lifetime: AbortSignal;
22
+ /** Session manager for worker sessions and for relaying worker reports to the main Session. */
23
+ readonly sessions: Pick<Sessions, 'ensure' | 'prompt' | 'promptedId' | 'relay' | 'holds'>;
24
+ closing(): boolean;
25
+ /** Whether processing is paused, which holds launches and input deliveries. */
26
+ paused(): boolean;
27
+ /** Execution environment variables for `ticket`, passed to its workspace prepare command. */
28
+ environment(ticket: Ticket): Variable[];
29
+ sourceLink(trigger: Trigger, signal?: AbortSignal): Promise<{
30
+ source_url?: string;
31
+ source_url_read?: string;
32
+ }>;
33
+ /** Stored Trigger of the message `trigger` replies to, when it replies to one. */
34
+ repliedTo(trigger: Trigger): Trigger | undefined;
35
+ }
36
+ /**
37
+ * Executes ticket assignments in persistent per-ticket DSH worker sessions and isolated workspace directories.
38
+ * Queues launches and input deliveries through Effects, manages concurrency with WorkerSlots, listens for `agent/status`,
39
+ * `agent/inbox/claimed`, `session/event` and `agent/error` events on the Cordis context, and reports status transitions back to Engine.
40
+ * Runtime, Engine, worker tools, and management routes use this class to prepare, launch, deliver to, stop, and resume ticket assignments.
41
+ */
42
+ declare class DshExecutor implements Executor {
43
+ private readonly host;
44
+ private readonly disposers;
45
+ private readonly slots;
46
+ /** Transient failure counts tried so far: keyed by `assignment.id` for worker turns and `launch:<assignment.id>` for launches. */
47
+ private readonly transient;
48
+ /** Assignment IDs currently waiting on a transient-failure backoff timer before resuming their worker turn. */
49
+ private readonly resuming;
50
+ /**
51
+ * The looks at background work of workers that went idle, by ticket, which hold their slots; a look ends when its worker
52
+ * runs again or its Assignment ends.
53
+ */
54
+ private readonly settling;
55
+ /** The stops of tickets' background work that run, by ticket, which a launch or a delivery of the ticket waits for. */
56
+ private readonly stopping;
57
+ /** The jobs workers left to a person when they handed off, by ticket, and the collecting of their ends. */
58
+ private readonly left;
59
+ /** When a person's message typed into a worker's Session last started a turn, by ticket. */
60
+ private readonly personal;
61
+ /** The timers of workers that go on after a passing failure, which dispose clears. */
62
+ private readonly timers;
63
+ /** Registers the `launch` and `delivery` effect handlers; both are held (concurrency limit 0) while processing is paused. */
64
+ constructor(host: ExecutorHost);
65
+ /** Populates a newly accepted ticket's `execution` attributes (worktree name, workspace directory, and assignment text). */
66
+ prepare(ticket: Ticket, outcome: Extract<AssessmentOutcome, {
67
+ kind: 'accept';
68
+ }>): Ticket;
69
+ /**
70
+ * Runs the configured `executor.prepare` command for a new ticket workspace in its parent directory with the ticket's
71
+ * execution environment variables, then verifies the directory as the worker sees it.
72
+ * A failed prepare command throws `PrepareFailed`, which is not retried automatically; an empty directory it left is removed, a non-empty one kept.
73
+ * @throws PrepareFailed with the command's output when the prepare command fails.
74
+ */
75
+ private prepareDirectory;
76
+ /** Enqueues a `launch` effect for an accepted or resumed assignment; launches start in queue order as worker slots free up. */
77
+ start(ticket: Ticket, assignment: Assignment): void;
78
+ /** Enqueues a `delivery` effect to steer pending inputs into `ticket`'s running worker session. */
79
+ deliver(ticket: Ticket, _assignment: Assignment): void;
80
+ /** Launches a queued assignment unless its ticket ended or a newer assignment replaced it meanwhile. */
81
+ private launchQueued;
82
+ /**
83
+ * Delivers queued inputs to a running assignment one by one, re-reading ticket state before each delivery so delivery
84
+ * stops immediately if the ticket ended or another assignment took over.
85
+ */
86
+ private deliverQueued;
87
+ private deliverInput;
88
+ /** Formats a trigger on `ticket` for the worker, including a preview of the replied-to message when the worker has not yet seen it. */
89
+ private triggerCard;
90
+ /**
91
+ * After the ending transaction commits (so a rollback leaves the worker working, and a launch the same transaction queued
92
+ * starts after it): ends the look at its background work, cancels its turn unless its last word was a `ready` or `dropped`
93
+ * report with no Input delivered since, and stops its shell jobs and subagents, including jobs it left to a person.
94
+ */
95
+ stop(ticket: Ticket, assignment: Assignment, reason: string): void;
96
+ /** Stop what a ticket's worker runs in the background (see `stopBackground`). */
97
+ private stopWork;
98
+ /** A stop of a ticket's background work, which a launch or a delivery of the ticket waits for while it runs. */
99
+ private track;
100
+ /** Wait for a stop of the ticket's background work that runs, unless the host stops first. */
101
+ private stopped;
102
+ /**
103
+ * On a host stop, for a bounded time: stop each loaded worker's background work, keeping its inbox; then end the collecting
104
+ * of the jobs left to a person, which were killed, and cancel a worker turn that started meanwhile, keeping its inbox.
105
+ */
106
+ shutdown(): Promise<void>;
107
+ /** Number of open tickets whose worker holds a worker slot: its turn runs, or its shell jobs or subagents still run after its turn ended. */
108
+ activeCount(): number;
109
+ /** Whether a ticket's worker holds a worker slot: its turn runs, or its shell jobs or subagents do after its turn ended. */
110
+ private running;
111
+ /** Marks a ticket failed after its launch fails; the ticket waits until new human input or an explicit retry arrives. */
112
+ private launchFailed;
113
+ /** Records a `failed` report on the ticket and relays the failure to the main Session in one transaction. */
114
+ private failed;
115
+ private relay;
116
+ private launch;
117
+ /** Returns the stored ticket for `agent` when it is a worker session, or undefined otherwise. */
118
+ private ticketOf;
119
+ /** Subscribes to host `agent/status`, `agent/inbox/claimed`, `session/event` and `agent/error` events for worker sessions. Call once at startup. */
120
+ install(): void;
121
+ /** Unsubscribes from host agent events and clears any pending transient-retry timers. */
122
+ dispose(): void;
123
+ /**
124
+ * Reconciles running and pending assignments across open tickets after a host restart: notifies Engine of interrupted
125
+ * running assignments and re-queues pending launches (which earlier versions may have kept outside the effect queue),
126
+ * while failed launches (`waitsForPerson`) wait for a person's message or a retry.
127
+ */
128
+ resume(): void;
129
+ /** Runs background worker event handling and updates the `worker` health entry on failure or recovery. */
130
+ private background;
131
+ /**
132
+ * Checks whether `error` is a transient failure with retry attempts remaining under `key`, mutating `this.transient`:
133
+ * increments the attempt counter and returns `true` when retrying, or deletes `key` from `this.transient` and returns `false` when non-transient or out of tries.
134
+ */
135
+ private retries;
136
+ /** Schedules a worker turn retry with exponential backoff after a transient provider or network error. */
137
+ private resumeAfter;
138
+ /** Schedules `then` to run after `ms` milliseconds unless `dispose()` is called first. */
139
+ private after;
140
+ /**
141
+ * A worker that handed off to a person frees its slot: its subagents stop, and its shell jobs, such as a server for the
142
+ * person, are left to the person until the Assignment ends. They hold no slot and run past any limit; their ends are
143
+ * collected, so none wakes the worker outside a slot, and the worker reads of each at its next turn.
144
+ */
145
+ private handOff;
146
+ private workerIdle;
147
+ }
148
+ //#endregion
149
+ //#region src/app/assessment.d.ts
150
+ /** Schema for the main Session's proactive candidate assessment decision (`orchestrator_eval_decide`). */
151
+ declare const AssessmentSchema: z.ZodObject<{
152
+ decision: z.ZodEnum<{
153
+ ignore: "ignore";
154
+ accept: "accept";
155
+ unavailable: "unavailable";
156
+ }>;
157
+ rule_assessments: z.ZodArray<z.ZodObject<{
158
+ rule_id: z.ZodString;
159
+ reason: z.ZodString;
160
+ matched: z.ZodBoolean;
161
+ }, z.core.$strict>>;
162
+ direction: z.ZodObject<{
163
+ implementation_requested: z.ZodBoolean;
164
+ target_basis: z.ZodEnum<{
165
+ specified: "specified";
166
+ "existing-standard": "existing-standard";
167
+ undetermined: "undetermined";
168
+ }>;
169
+ requires_design_decision: z.ZodBoolean;
170
+ evidence: z.ZodString;
171
+ }, z.core.$strict>;
172
+ title: z.ZodString;
173
+ worktree_name: z.ZodOptional<z.ZodString>;
174
+ scope: z.ZodString;
175
+ intent_evidence: z.ZodOptional<z.ZodNullable<z.ZodString>>;
176
+ acknowledgement: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
+ reason: z.ZodString;
178
+ }, z.core.$strict>;
179
+ /** Host dependencies used by `MasterAssessor`. */
180
+ interface AssessorHost {
181
+ /** Active evaluations in `Engine` that the assessor reads and decides. */
182
+ readonly engine: Pick<EngineForMainSession, 'candidate' | 'candidateDelivered' | 'decide'>;
183
+ readonly commands: Commands;
184
+ readonly deployment: Deployment;
185
+ /** Durable effect queue through which candidate assessments are delivered. */
186
+ readonly effects: Pick<Effects, 'enqueue' | 'handle'>;
187
+ settings(): Settings$1;
188
+ /** Whether processing is paused, which holds candidate deliveries. */
189
+ paused(): boolean;
190
+ /** Thread context reader for `trigger`'s Source, or `undefined` when the Source has none. */
191
+ threadContext(trigger: Trigger): TriggerContext | undefined;
192
+ /** Delivers a candidate card to the main Session once per request ID, resolving after the Session receives it. */
193
+ deliver(requestId: string, text: string): Promise<void>;
194
+ candidateCard(candidate: Candidate): Promise<Record<string, unknown>>;
195
+ }
196
+ /** Schema for bounded context or repository read requests during an active evaluation (`orchestrator_eval_read`). */
197
+ declare const EvalReadSchema: z.ZodObject<{
198
+ trigger_id: z.ZodString;
199
+ resource: z.ZodEnum<{
200
+ message: "message";
201
+ file: "file";
202
+ directory: "directory";
203
+ root: "root";
204
+ parent: "parent";
205
+ thread: "thread";
206
+ image: "image";
207
+ }>;
208
+ path: z.ZodOptional<z.ZodString>;
209
+ message_id: z.ZodOptional<z.ZodString>;
210
+ cursor: z.ZodOptional<z.ZodString>;
211
+ image_id: z.ZodOptional<z.ZodString>;
212
+ offset: z.ZodDefault<z.ZodNumber>;
213
+ }, z.core.$strict>;
214
+ /** Validated arguments for `MasterAssessor.read`. */
215
+ type EvalRead = z.infer<typeof EvalReadSchema>;
216
+ /**
217
+ * Implements the `Engine` `Assessor` port for proactive candidate evaluation in the main Session.
218
+ * Relays each evaluation's candidate card to the main Session through the durable `assessment` effect, serves bounded `TriggerContext` and repository reads while the evaluation runs, and converts the main Session's assessment into an `AssessmentOutcome` for `Engine.decide`.
219
+ * Depends on `SourceRegistry` (via `AssessorHost`) for source-specific thread context and on `Sessions` for deduplicated candidate delivery; the main Session's `orchestrator_eval*` tools call `context`, `read`, and `decide`.
220
+ */
221
+ declare class MasterAssessor implements Assessor {
222
+ private readonly host;
223
+ /** Per-evaluation read caches and thread contexts, keyed by `evalId`. */
224
+ private readonly evals;
225
+ private readonly controller;
226
+ /** Registers the handler that relays each Eval's candidate card, which a link lookup may delay for seconds. */
227
+ constructor(host: AssessorHost);
228
+ /** Enqueues an `assessment` effect to deliver `candidate`'s card to the main Session. */
229
+ request(candidate: Candidate): void;
230
+ /** Whether `evalId` is still the active evaluation for `trigger`. */
231
+ private live;
232
+ /** Drop an Eval's context and reads once it finishes; any running load for it discards its result. */
233
+ release(evalId: string): void;
234
+ /** Resolve the active evaluation for a trigger; historical triggers have none, and explicit requests are routed instead. */
235
+ private evalFor;
236
+ /** Returns or initializes the read cache for `evalId`, seeded with the trigger's own message and image references; throws if `evalId` has finished. */
237
+ private reads;
238
+ private imageReferences;
239
+ /** Loads and caches the initial bounded thread window once per evaluation (including after a host restart). */
240
+ private seed;
241
+ /**
242
+ * Returns the `orchestrator_eval` payload: the trigger's text once (up to `TRIGGER_CHARS`), batch peers, related tickets
243
+ * on the thread, the Policy version its Eval was built from, and the initial thread window (first five messages and five
244
+ * on either side of the trigger, truncated to `WINDOW_CHARS` or `NEAR_CHARS` for its two nearest neighbours with total
245
+ * length and image IDs, plus other loaded messages as `STUB_CHARS` previews; `orchestrator_eval_read` reads any message
246
+ * in full by ID).
247
+ * Assessment instructions live in the main Session's prompt (`prompts/admission.md`), not in this payload.
248
+ */
249
+ context(triggerId: string, signal?: AbortSignal): Promise<{
250
+ policy_version: string;
251
+ thread: {
252
+ messages: ({
253
+ deleted: boolean;
254
+ bot?: boolean | undefined;
255
+ id: string;
256
+ from: string;
257
+ } | {
258
+ preview: string;
259
+ bot?: boolean | undefined;
260
+ id: string;
261
+ from: string;
262
+ } | {
263
+ at: string;
264
+ trigger: boolean;
265
+ bot?: boolean | undefined;
266
+ id: string;
267
+ from: string;
268
+ } | {
269
+ images: string[];
270
+ text: string;
271
+ chars?: undefined;
272
+ at: string;
273
+ bot?: boolean | undefined;
274
+ id: string;
275
+ from: string;
276
+ } | {
277
+ images?: undefined;
278
+ text: string;
279
+ chars?: undefined;
280
+ at: string;
281
+ bot?: boolean | undefined;
282
+ id: string;
283
+ from: string;
284
+ } | {
285
+ images: string[];
286
+ text: string;
287
+ chars: number;
288
+ at: string;
289
+ bot?: boolean | undefined;
290
+ id: string;
291
+ from: string;
292
+ } | {
293
+ images?: undefined;
294
+ text: string;
295
+ chars: number;
296
+ at: string;
297
+ bot?: boolean | undefined;
298
+ id: string;
299
+ from: string;
300
+ })[];
301
+ next_cursor?: string | undefined;
302
+ complete: boolean;
303
+ loaded_messages: number;
304
+ source_found: boolean;
305
+ } | {
306
+ error: string;
307
+ complete: boolean;
308
+ };
309
+ related_tickets: {
310
+ preview: string;
311
+ read: string;
312
+ attention?: {
313
+ trigger_id?: string | undefined;
314
+ question: string;
315
+ } | undefined;
316
+ ended?: {
317
+ at: string;
318
+ by: TicketEndBy;
319
+ reason: string;
320
+ } | undefined;
321
+ pr_number?: number | undefined;
322
+ ticket_id: string;
323
+ title: string;
324
+ state: "dropped" | "completed" | "merged" | "closed" | "stopped" | "person/delivery" | "person/answer" | "person/review" | "person/blocked" | "person/failed" | "working" | "working/queued" | "idle";
325
+ strength: Strength;
326
+ }[];
327
+ tickets_total: number;
328
+ batch?: ({
329
+ read?: string | undefined;
330
+ text: string;
331
+ chars?: undefined;
332
+ trigger_id: string;
333
+ actor: string;
334
+ at: string;
335
+ } | {
336
+ read?: string | undefined;
337
+ text: string;
338
+ chars: number;
339
+ trigger_id: string;
340
+ actor: string;
341
+ at: string;
342
+ })[] | undefined;
343
+ images: string[];
344
+ text: string;
345
+ chars?: undefined;
346
+ trigger_id: string;
347
+ strength: Strength;
348
+ mode: "off" | "observe" | "auto";
349
+ source: {
350
+ url?: string | undefined;
351
+ kind: string;
352
+ actor: string;
353
+ thread: string;
354
+ };
355
+ } | {
356
+ policy_version: string;
357
+ thread: {
358
+ messages: ({
359
+ deleted: boolean;
360
+ bot?: boolean | undefined;
361
+ id: string;
362
+ from: string;
363
+ } | {
364
+ preview: string;
365
+ bot?: boolean | undefined;
366
+ id: string;
367
+ from: string;
368
+ } | {
369
+ at: string;
370
+ trigger: boolean;
371
+ bot?: boolean | undefined;
372
+ id: string;
373
+ from: string;
374
+ } | {
375
+ images: string[];
376
+ text: string;
377
+ chars?: undefined;
378
+ at: string;
379
+ bot?: boolean | undefined;
380
+ id: string;
381
+ from: string;
382
+ } | {
383
+ images?: undefined;
384
+ text: string;
385
+ chars?: undefined;
386
+ at: string;
387
+ bot?: boolean | undefined;
388
+ id: string;
389
+ from: string;
390
+ } | {
391
+ images: string[];
392
+ text: string;
393
+ chars: number;
394
+ at: string;
395
+ bot?: boolean | undefined;
396
+ id: string;
397
+ from: string;
398
+ } | {
399
+ images?: undefined;
400
+ text: string;
401
+ chars: number;
402
+ at: string;
403
+ bot?: boolean | undefined;
404
+ id: string;
405
+ from: string;
406
+ })[];
407
+ next_cursor?: string | undefined;
408
+ complete: boolean;
409
+ loaded_messages: number;
410
+ source_found: boolean;
411
+ } | {
412
+ error: string;
413
+ complete: boolean;
414
+ };
415
+ related_tickets: {
416
+ preview: string;
417
+ read: string;
418
+ attention?: {
419
+ trigger_id?: string | undefined;
420
+ question: string;
421
+ } | undefined;
422
+ ended?: {
423
+ at: string;
424
+ by: TicketEndBy;
425
+ reason: string;
426
+ } | undefined;
427
+ pr_number?: number | undefined;
428
+ ticket_id: string;
429
+ title: string;
430
+ state: "dropped" | "completed" | "merged" | "closed" | "stopped" | "person/delivery" | "person/answer" | "person/review" | "person/blocked" | "person/failed" | "working" | "working/queued" | "idle";
431
+ strength: Strength;
432
+ }[];
433
+ tickets_total: number;
434
+ batch?: ({
435
+ read?: string | undefined;
436
+ text: string;
437
+ chars?: undefined;
438
+ trigger_id: string;
439
+ actor: string;
440
+ at: string;
441
+ } | {
442
+ read?: string | undefined;
443
+ text: string;
444
+ chars: number;
445
+ trigger_id: string;
446
+ actor: string;
447
+ at: string;
448
+ })[] | undefined;
449
+ images?: undefined;
450
+ text: string;
451
+ chars?: undefined;
452
+ trigger_id: string;
453
+ strength: Strength;
454
+ mode: "off" | "observe" | "auto";
455
+ source: {
456
+ url?: string | undefined;
457
+ kind: string;
458
+ actor: string;
459
+ thread: string;
460
+ };
461
+ } | {
462
+ policy_version: string;
463
+ thread: {
464
+ messages: ({
465
+ deleted: boolean;
466
+ bot?: boolean | undefined;
467
+ id: string;
468
+ from: string;
469
+ } | {
470
+ preview: string;
471
+ bot?: boolean | undefined;
472
+ id: string;
473
+ from: string;
474
+ } | {
475
+ at: string;
476
+ trigger: boolean;
477
+ bot?: boolean | undefined;
478
+ id: string;
479
+ from: string;
480
+ } | {
481
+ images: string[];
482
+ text: string;
483
+ chars?: undefined;
484
+ at: string;
485
+ bot?: boolean | undefined;
486
+ id: string;
487
+ from: string;
488
+ } | {
489
+ images?: undefined;
490
+ text: string;
491
+ chars?: undefined;
492
+ at: string;
493
+ bot?: boolean | undefined;
494
+ id: string;
495
+ from: string;
496
+ } | {
497
+ images: string[];
498
+ text: string;
499
+ chars: number;
500
+ at: string;
501
+ bot?: boolean | undefined;
502
+ id: string;
503
+ from: string;
504
+ } | {
505
+ images?: undefined;
506
+ text: string;
507
+ chars: number;
508
+ at: string;
509
+ bot?: boolean | undefined;
510
+ id: string;
511
+ from: string;
512
+ })[];
513
+ next_cursor?: string | undefined;
514
+ complete: boolean;
515
+ loaded_messages: number;
516
+ source_found: boolean;
517
+ } | {
518
+ error: string;
519
+ complete: boolean;
520
+ };
521
+ related_tickets: {
522
+ preview: string;
523
+ read: string;
524
+ attention?: {
525
+ trigger_id?: string | undefined;
526
+ question: string;
527
+ } | undefined;
528
+ ended?: {
529
+ at: string;
530
+ by: TicketEndBy;
531
+ reason: string;
532
+ } | undefined;
533
+ pr_number?: number | undefined;
534
+ ticket_id: string;
535
+ title: string;
536
+ state: "dropped" | "completed" | "merged" | "closed" | "stopped" | "person/delivery" | "person/answer" | "person/review" | "person/blocked" | "person/failed" | "working" | "working/queued" | "idle";
537
+ strength: Strength;
538
+ }[];
539
+ tickets_total: number;
540
+ batch?: ({
541
+ read?: string | undefined;
542
+ text: string;
543
+ chars?: undefined;
544
+ trigger_id: string;
545
+ actor: string;
546
+ at: string;
547
+ } | {
548
+ read?: string | undefined;
549
+ text: string;
550
+ chars: number;
551
+ trigger_id: string;
552
+ actor: string;
553
+ at: string;
554
+ })[] | undefined;
555
+ images: string[];
556
+ text: string;
557
+ chars: number;
558
+ trigger_id: string;
559
+ strength: Strength;
560
+ mode: "off" | "observe" | "auto";
561
+ source: {
562
+ url?: string | undefined;
563
+ kind: string;
564
+ actor: string;
565
+ thread: string;
566
+ };
567
+ } | {
568
+ policy_version: string;
569
+ thread: {
570
+ messages: ({
571
+ deleted: boolean;
572
+ bot?: boolean | undefined;
573
+ id: string;
574
+ from: string;
575
+ } | {
576
+ preview: string;
577
+ bot?: boolean | undefined;
578
+ id: string;
579
+ from: string;
580
+ } | {
581
+ at: string;
582
+ trigger: boolean;
583
+ bot?: boolean | undefined;
584
+ id: string;
585
+ from: string;
586
+ } | {
587
+ images: string[];
588
+ text: string;
589
+ chars?: undefined;
590
+ at: string;
591
+ bot?: boolean | undefined;
592
+ id: string;
593
+ from: string;
594
+ } | {
595
+ images?: undefined;
596
+ text: string;
597
+ chars?: undefined;
598
+ at: string;
599
+ bot?: boolean | undefined;
600
+ id: string;
601
+ from: string;
602
+ } | {
603
+ images: string[];
604
+ text: string;
605
+ chars: number;
606
+ at: string;
607
+ bot?: boolean | undefined;
608
+ id: string;
609
+ from: string;
610
+ } | {
611
+ images?: undefined;
612
+ text: string;
613
+ chars: number;
614
+ at: string;
615
+ bot?: boolean | undefined;
616
+ id: string;
617
+ from: string;
618
+ })[];
619
+ next_cursor?: string | undefined;
620
+ complete: boolean;
621
+ loaded_messages: number;
622
+ source_found: boolean;
623
+ } | {
624
+ error: string;
625
+ complete: boolean;
626
+ };
627
+ related_tickets: {
628
+ preview: string;
629
+ read: string;
630
+ attention?: {
631
+ trigger_id?: string | undefined;
632
+ question: string;
633
+ } | undefined;
634
+ ended?: {
635
+ at: string;
636
+ by: TicketEndBy;
637
+ reason: string;
638
+ } | undefined;
639
+ pr_number?: number | undefined;
640
+ ticket_id: string;
641
+ title: string;
642
+ state: "dropped" | "completed" | "merged" | "closed" | "stopped" | "person/delivery" | "person/answer" | "person/review" | "person/blocked" | "person/failed" | "working" | "working/queued" | "idle";
643
+ strength: Strength;
644
+ }[];
645
+ tickets_total: number;
646
+ batch?: ({
647
+ read?: string | undefined;
648
+ text: string;
649
+ chars?: undefined;
650
+ trigger_id: string;
651
+ actor: string;
652
+ at: string;
653
+ } | {
654
+ read?: string | undefined;
655
+ text: string;
656
+ chars: number;
657
+ trigger_id: string;
658
+ actor: string;
659
+ at: string;
660
+ })[] | undefined;
661
+ images?: undefined;
662
+ text: string;
663
+ chars: number;
664
+ trigger_id: string;
665
+ strength: Strength;
666
+ mode: "off" | "observe" | "auto";
667
+ source: {
668
+ url?: string | undefined;
669
+ kind: string;
670
+ actor: string;
671
+ thread: string;
672
+ };
673
+ }>;
674
+ /**
675
+ * Serves bounded paginated text or image attachments from the evaluation's thread context or repository for
676
+ * `orchestrator_eval_read`; `agent` is the main Session, which receives images as attachments.
677
+ */
678
+ read(agent: Agent, read: EvalRead, signal: AbortSignal): Promise<unknown>;
679
+ /** Converts the assessment into an outcome under current settings and passes it to `Engine.decide` for policy verification. */
680
+ decide(triggerId: string, result: z.infer<typeof AssessmentSchema>, signal?: AbortSignal): Promise<{
681
+ state: string;
682
+ ticket_id?: string;
683
+ reason: string;
684
+ }>;
685
+ /** Aborts any in-flight thread context or repository read commands when the runtime stops. */
686
+ stop(): void;
687
+ }
688
+ //#endregion
689
+ //#region src/app/views/records.d.ts
690
+ type LinkTarget = (channel: ChannelRef) => ChannelLink;
691
+ //#endregion
692
+ //#region src/app/outbox.d.ts
693
+ interface OutboxHost {
694
+ readonly store: Pick<Store, 'atomic' | 'receipts'>;
695
+ readonly effects: Pick<Effects, 'enqueue' | 'cancel' | 'handle' | 'idle'>;
696
+ readonly sources: Pick<SourceRegistry, 'instance' | 'channelAllowed' | 'send'>;
697
+ readonly commands: Commands;
698
+ paused(): boolean;
699
+ }
700
+ /**
701
+ * Persists outbound channel messages as receipts and delivers them sequentially through `Effects` and `SourceRegistry`.
702
+ * Implements the core `Outbox` port for `Engine` and source contexts, ensuring per-conversation ordering for each ticket until an earlier message fails repeatedly.
703
+ * Messages wait while processing is paused or their source is unavailable, and settle as dropped when the target conversation is ignored or gone.
704
+ */
705
+ declare class Outbox implements Outbox$1 {
706
+ private readonly host;
707
+ constructor(host: OutboxHost);
708
+ /** Record a message receipt and enqueue its delivery effect atomically; duplicate message IDs are ignored. */
709
+ send(message: OutboundMessage): void;
710
+ status(id: string): ReplyStatus | undefined;
711
+ withdraw(id: string): void;
712
+ sent(): Promise<void>;
713
+ private deliver;
714
+ }
715
+ //#endregion
716
+ //#region src/app/passes.d.ts
717
+ interface PassesHost {
718
+ readonly engine: Pick<Engine, 'receive' | 'evaluateDue'>;
719
+ readonly effects: Pick<Effects, 'kick' | 'idle'>;
720
+ readonly health: HealthEntry;
721
+ readonly lifetime: AbortSignal;
722
+ configured(): boolean;
723
+ closing(): boolean;
724
+ }
725
+ /**
726
+ * Schedules and serializes orchestration passes that kick due `Effects` and advance `Engine` evaluations.
727
+ * `Runtime` manages its lifecycle, while sources, tools, `Settings`, and HTTP routes trigger immediate passes when new work arrives or state changes.
728
+ * Updates the runtime `HealthEntry` when a pass fails and clears the error once a subsequent pass succeeds.
729
+ */
730
+ declare class Passes {
731
+ private readonly host;
732
+ private timer?;
733
+ private stopped;
734
+ private pumping?;
735
+ private pumpAgain?;
736
+ constructor(host: PassesHost);
737
+ start(): void;
738
+ stop(): Promise<unknown>;
739
+ receive(trigger: Trigger): ReceiveResult;
740
+ request(): void;
741
+ /** Wait until no pass or effect that can start now is running. */
742
+ idle(): Promise<void>;
743
+ /** Run one pass, coalescing concurrent callers into a single follow-up pass. */
744
+ pump(): Promise<void>;
745
+ private pumpOnce;
746
+ }
747
+ //#endregion
748
+ //#region src/app/setup.d.ts
749
+ interface SetupHost {
750
+ readonly context: Context;
751
+ readonly machine: Machine;
752
+ readonly lifetime: AbortSignal;
753
+ restart(): void;
754
+ }
755
+ /**
756
+ * Resolves the target repository, GitHub account, and optional Feishu bot by probing CLIs, then writes and applies the isolated git and shim environment used by worker processes.
757
+ * `Runtime` runs it at startup to gate orchestration readiness, while `Settings` uses it to validate account changes, update blocked command shims, and schedule restarts.
758
+ */
759
+ declare class Setup {
760
+ private readonly host;
761
+ private resolved?;
762
+ problem?: SetupProblem;
763
+ feishuProblem?: SetupProblem;
764
+ /** PATH with the worker shim directory removed so the host's own CLI calls invoke the real binaries. */
765
+ private readonly path;
766
+ /** Environment variables pointing agent subprocesses at the isolated git config and command shims. */
767
+ private readonly variables;
768
+ private restoreEnvironment?;
769
+ constructor(host: SetupHost);
770
+ /** Host command environment with agent git variables applied and the worker shim directory excluded from PATH. */
771
+ get commandEnvironment(): Record<string, string | undefined>;
772
+ get deployment(): Deployment;
773
+ configured(): boolean;
774
+ /** Resolve deployment accounts and apply the worker environment, recording `SetupError` failures in `problem`/`feishuProblem` and rethrowing unexpected errors. */
775
+ run(settings: Settings$1): Promise<boolean>;
776
+ /** Trigger a restart to re-run setup, refusing if setup and Feishu are already healthy so running assignments are not interrupted. */
777
+ check(): void;
778
+ /** Defer the restart to the next macrotask so the current HTTP or tool caller receives its response first. */
779
+ restart(): void;
780
+ /** Verify account CLIs for a modified source block before saving, ignoring setup errors belonging to other blocks. */
781
+ checkAccounts(block: SettingsBlock, settings: Settings$1): Promise<void>;
782
+ blockCommands(blocked: readonly string[]): Promise<void>;
783
+ restore(): void;
784
+ /** Probes CLIs the way worker shells run them, using `stateDir` as `cwd` since it exists even before the repository clone is valid. */
785
+ private probe;
786
+ private resolve;
787
+ }
788
+ //#endregion
789
+ //#region src/app/settings.d.ts
790
+ /** Host dependencies used by `Settings`. */
791
+ interface SettingsHost {
792
+ readonly store: Pick<Store, 'settings' | 'saveSettings' | 'blockRevision' | 'atomic' | 'tickets' | 'get'>;
793
+ readonly sources: SourceRegistry;
794
+ /** Notified when a settings save changes the policy version. */
795
+ readonly engine: EngineForSettings;
796
+ /** Health board where each source's policy sync reports under `sync:<id>`. */
797
+ readonly health: Pick<HealthBoard, 'claim'>;
798
+ /** DSH Cordis context used to validate and resolve role models. */
799
+ readonly context: Context;
800
+ readonly lifetime: AbortSignal;
801
+ /** Session manager through which the main Session is notified of saved settings. */
802
+ readonly sessions: Pick<Sessions, 'notify' | 'delivery'>;
803
+ /** Source host passed to source kinds' policy syncs and label refreshes. */
804
+ readonly sourceHost: SourceHost;
805
+ /** Setup state, account/command checks, and restart trigger when setup-read fields change. */
806
+ readonly setup: Pick<Setup, 'configured' | 'checkAccounts' | 'blockCommands' | 'restart'>;
807
+ /** Triggers an immediate pass so work newly allowed by a settings save runs right away. */
808
+ requestPass(): void;
809
+ }
810
+ /**
811
+ * Validates and persists block-scoped settings in `Store`, enforces origin guards, and manages source policy synchronization and label refreshes.
812
+ * `Runtime`, management HTTP routes, and main-Session tools read and save settings through it.
813
+ * Notifies `Engine` when the policy version changes, notifies the main Session via `Sessions`, and triggers `Setup` restarts or `Passes` runs when saved settings take effect.
814
+ * Tracks per-source synchronization status in `HealthBoard` and retries failed syncs with exponential backoff.
815
+ */
816
+ declare class Settings {
817
+ private readonly host;
818
+ /** Per-source `sync:<id>` health entries, claimed lazily on each source's first policy sync. */
819
+ private readonly syncs;
820
+ /** Pending exponential-backoff retry timer and last wait duration (ms) per source after a failed sync. */
821
+ private readonly retries;
822
+ constructor(host: SettingsHost);
823
+ /** Schedule exponential backoff retries (1 minute up to 1 hour) after a failed source sync, or clear pending retries on success. */
824
+ private retrySync;
825
+ private syncHealth;
826
+ /** Returns the current validated settings from `Store`. */
827
+ current(): Settings$1;
828
+ /**
829
+ * Returns an overview of all settings blocks with their current block revisions: full values for `pause`, `eval`, and
830
+ * `executor`; rule summaries and allowed-sender counts for `policy`; and instance status switches for `sources` (with `read: 'settings/<block>'` paths for full block reads).
831
+ */
832
+ view(): {
833
+ revision: number;
834
+ pause: {
835
+ revision: number;
836
+ value: {
837
+ paused: boolean;
838
+ };
839
+ };
840
+ eval: {
841
+ revision: number;
842
+ value: {
843
+ mode: "off" | "observe" | "auto";
844
+ timeoutSeconds: number;
845
+ model: {
846
+ provider: string;
847
+ model: string;
848
+ reasoningEffort?: string | undefined;
849
+ } | null;
850
+ };
851
+ };
852
+ executor: {
853
+ revision: number;
854
+ value: {
855
+ model: {
856
+ provider: string;
857
+ model: string;
858
+ reasoningEffort?: string | undefined;
859
+ } | null;
860
+ maxWorkers: number;
861
+ directory: string;
862
+ prepare: string;
863
+ blockedCommands: string[];
864
+ };
865
+ };
866
+ policy: {
867
+ revision: number;
868
+ rules: {
869
+ id: string;
870
+ name: string;
871
+ enabled: boolean;
872
+ }[];
873
+ allowed: {
874
+ [k: string]: number;
875
+ };
876
+ read: string;
877
+ };
878
+ sources: {
879
+ id: string;
880
+ kind: string;
881
+ enabled: boolean;
882
+ installed: boolean;
883
+ revision: number;
884
+ read: string;
885
+ }[];
886
+ };
887
+ /**
888
+ * Returns one settings block as accepted by `save` (`policy`, `eval`, `executor`, `pause` holding `{ paused }`, or
889
+ * `source:<id>` holding `{ enabled, config }`) along with its current block revision.
890
+ * @throws UserError (`unknownBlock`) when no such settings block exists.
891
+ */
892
+ block(block: string): {
893
+ block: string;
894
+ revision: number;
895
+ value: unknown;
896
+ };
897
+ /**
898
+ * Validates and saves one settings block against its `revision`; a no-op save records no new revision, a changed policy
899
+ * version notifies affected open tickets, and changing a setup-read field (`SETUP_FIELDS`, such as an account CLI) or any
900
+ * change saved while waiting for setup (`!this.host.setup.configured()`) restarts `dsh-superagent` so setup runs again.
901
+ * @param origin - Caller origin; restricts execution-environment and account-CLI changes to `'panel'` (a guardrail against prompt-injected tool calls, not an OS security boundary, since agents run shell commands; `origin` has no default so no caller receives panel privileges implicitly).
902
+ * @returns Save outcome with the block's current `revision`, whether `policy_changed`, whether `restarting`, and `context_delivery` status (`'injected'` or `'pending'`).
903
+ * @throws SettingsConflict when `block`'s revision changed before or during validation checks.
904
+ * @throws UserError | z.ZodError when `block` is unknown, the source is not installed, `value` is invalid (such as an `executor` block carrying `paused`, which only `pause` sets), a non-panel `origin` changes panel-only fields, or a role-model or account check fails.
905
+ */
906
+ save(block: SettingsBlock, value: unknown, revision: number, origin: SettingsOrigin): Promise<{
907
+ saved: boolean;
908
+ revision: number;
909
+ policy_changed: boolean;
910
+ restarting: boolean;
911
+ context_delivery: "pending" | "injected";
912
+ }>;
913
+ /**
914
+ * Pauses or resumes processing (new evaluations, worker dispatch, and channel delivery, while Sources continue recording
915
+ * Triggers); saved in its own `'pause'` block so concurrent `executor` edits remain valid across it.
916
+ * @returns Whether processing is now paused (`{ paused }`).
917
+ */
918
+ pause(paused: boolean, origin: SettingsOrigin): Promise<{
919
+ paused: boolean;
920
+ }>;
921
+ /** Returns the IDs of installed, enabled Sources whose policy section can synchronize now (empty while setup is not configured). */
922
+ syncable(): string[];
923
+ /**
924
+ * Synchronizes source `id`'s policy section from its external source of truth, saves it as a `'policy'` revision when
925
+ * changed, and records the outcome in the `sync:<id>` health entry (scheduling exponential-backoff retries via `retrySync` on failure).
926
+ * @returns The synchronized policy section for `id`.
927
+ * @throws UserError (`nothingToSync`) when `id` cannot sync now, `SettingsConflict` if the `'policy'` block changed during synchronization, or the underlying sync error on failure.
928
+ */
929
+ sync(id: string): Promise<Record<string, unknown> & {
930
+ allowed: {
931
+ id: string;
932
+ name?: string;
933
+ }[];
934
+ }>;
935
+ /**
936
+ * Rereads a Source's display names (such as Feishu chat names) immediately.
937
+ * @returns Sorted display names (`{ added }`) that were not present in the stored label map before this read.
938
+ * @throws UserError (`noLabels`) when the Source has no label refresh; rethrows a failed read, keeping the stored list.
939
+ */
940
+ refreshLabels(id: string): Promise<{
941
+ added: string[];
942
+ }>;
943
+ }
944
+ //#endregion
945
+ //#region src/app/runtime.d.ts
946
+ declare module '@deepseek-ai/cordis' {
947
+ interface Context {
948
+ orchestrator: SourceHost;
949
+ }
950
+ }
951
+ /**
952
+ * Composition root of dsh-superagent that connects `Store`, `Setup`, `Engine`, `SourceRegistry`, `Effects`, `Outbox`, `Passes`, `Sessions`, `Settings`, `Prompts`, `DshExecutor`, and `MasterAssessor`.
953
+ * Exposes the `SourceHost` service on the Cordis context for source plugins and coordinates startup, setup checks, HTTP route registration, and graceful shutdown.
954
+ * Locks the state directory before opening SQLite so concurrent processes cannot corrupt or double-migrate state.
955
+ */
956
+ declare class Runtime extends Service implements SourceHost {
957
+ readonly machine: Machine;
958
+ private readonly local?;
959
+ readonly store: Store;
960
+ readonly setup: Setup;
961
+ readonly prompts: Prompts;
962
+ readonly effects: Effects;
963
+ readonly sources: SourceRegistry;
964
+ readonly commands: Commands;
965
+ readonly sessions: Sessions;
966
+ readonly settings: Settings;
967
+ readonly executor: DshExecutor;
968
+ readonly assessor: MasterAssessor;
969
+ readonly outbox: Outbox;
970
+ readonly engine: Engine;
971
+ readonly passes: Passes;
972
+ readonly ready: Promise<void>;
973
+ private readonly board;
974
+ private readonly runtimeHealth;
975
+ readonly masterId: string;
976
+ private readonly sourceLinks;
977
+ private readonly stopped;
978
+ private readonly disposers;
979
+ private releaseLock?;
980
+ private closingFlag;
981
+ private stopping?;
982
+ private readonly sourceDeps;
983
+ private readonly toolHost;
984
+ /** Non-zero while a main-Session tool is executing an Engine command, suppressing self-triggered domain event notices. */
985
+ private quiet;
986
+ constructor(ctx: Context, machine: Machine, restart: () => void, local?: {
987
+ initialize(runtime: Runtime): void;
988
+ stateChanged?(): void;
989
+ } | undefined);
990
+ get health(): Readonly<Record<string, Health>>;
991
+ /** Aborted when dsh-superagent stops or loses its state directory lock, cancelling running reads and subprocesses. */
992
+ get lifetime(): AbortSignal;
993
+ context(kind: {
994
+ kind: string;
995
+ health: readonly string[];
996
+ }): SourceContext;
997
+ /** Resolved deployment; throws while waiting for setup (`!configured()`). */
998
+ get deployment(): Deployment;
999
+ configured(): boolean;
1000
+ get setupProblem(): SetupProblem | undefined;
1001
+ /** Why the Feishu bot is unavailable even though the Feishu Source configures a CLI. */
1002
+ get feishuProblem(): SetupProblem | undefined;
1003
+ links(): LinkTarget;
1004
+ ticketEnvironment(ticket: Ticket): Variable[];
1005
+ checkSetup(): void;
1006
+ receive(trigger: Trigger): ReceiveResult;
1007
+ idle(): Promise<void>;
1008
+ pump(): Promise<void>;
1009
+ sendReplies(): Promise<void>;
1010
+ private closing;
1011
+ /** Hold evaluation, dispatch, and outbound delivery while paused or awaiting setup; sources still record incoming triggers. */
1012
+ private paused;
1013
+ private initialize;
1014
+ private httpHost;
1015
+ /** Idempotent stop; concurrent or repeated calls share the same shutdown promise. */
1016
+ stop(): Promise<void>;
1017
+ private shutdown;
1018
+ }
1019
+ //#endregion
1020
+ //#region src/duet/ids.d.ts
1021
+ /** Model-visible handles are short, durable and never resolved by fuzzy matching. */
1022
+ declare class DuetIds {
1023
+ private readonly store;
1024
+ constructor(store: Store);
1025
+ short(kind: string, raw: string): string;
1026
+ raw(kind: string, short: string): string | undefined;
1027
+ }
1028
+ //#endregion
1029
+ //#region src/duet/lab-trace.d.ts
1030
+ /** Streams ordered events from an explicitly enabled local test workspace. */
1031
+ declare class LabTrace {
1032
+ private db;
1033
+ private key;
1034
+ private port;
1035
+ private ticket;
1036
+ private busy;
1037
+ private closed;
1038
+ private delayUntil;
1039
+ private failures;
1040
+ private timer;
1041
+ private stream;
1042
+ constructor(db: DatabaseSync, key: string, port?: number);
1043
+ get id(): string;
1044
+ watchDomain(): void;
1045
+ add(kind: string, value: unknown): void;
1046
+ private post;
1047
+ flush(): Promise<void>;
1048
+ close(): void;
1049
+ }
1050
+ //#endregion
1051
+ //#region src/duet/trace-store.d.ts
1052
+ /** Workspace-local execution queue with frozen batches and durable acknowledgements. */
1053
+ declare class TraceStore {
1054
+ private db;
1055
+ private maxBytes;
1056
+ readonly id: string;
1057
+ private closed;
1058
+ constructor(db: DatabaseSync, maxBytes?: number);
1059
+ add(kind: string, value: unknown): void;
1060
+ private compact;
1061
+ head(): {
1062
+ seq: number;
1063
+ body: string;
1064
+ } | undefined;
1065
+ acknowledge(seq: number): void;
1066
+ bindTarget(target: string): boolean;
1067
+ close(): void;
1068
+ }
1069
+ //#endregion
1070
+ //#region src/duet/source.d.ts
1071
+ /** The Engine owns tasks; this adapter only translates authenticated local messages. */
1072
+ declare class DuetSource {
1073
+ readonly runtime: Runtime;
1074
+ labTrace?: LabTrace;
1075
+ trace?: TraceStore;
1076
+ private readonly listeners;
1077
+ private scheduled;
1078
+ stateChanged(): void;
1079
+ readonly ids: DuetIds;
1080
+ constructor(runtime: Runtime);
1081
+ kind(): SourceKind;
1082
+ receive(value: unknown): {
1083
+ protocol: string;
1084
+ request_id: string;
1085
+ received: boolean;
1086
+ duplicate: boolean;
1087
+ };
1088
+ publish(message: OutboundMessage): void;
1089
+ events(after?: number, limit?: number): {
1090
+ events: any[];
1091
+ cursor: number;
1092
+ };
1093
+ overview(): {
1094
+ session_order: string[];
1095
+ pending_questions?: {
1096
+ question_id: string;
1097
+ task_id: string;
1098
+ session_id: string;
1099
+ question: string;
1100
+ }[] | undefined;
1101
+ version: string;
1102
+ workspace: null;
1103
+ focused_session_id: null;
1104
+ sessions: Record<string, unknown>;
1105
+ other_sessions: Record<string, unknown>;
1106
+ omitted_sessions: number;
1107
+ };
1108
+ owns(sessionId: string): boolean;
1109
+ taskRows(): {
1110
+ session_id: string;
1111
+ task_id: string;
1112
+ finished_at: number | null;
1113
+ run_id: string | null;
1114
+ name: string;
1115
+ state: string;
1116
+ }[];
1117
+ subscribe(listener: () => void): () => void;
1118
+ cursor(): number;
1119
+ latestSequence(): number;
1120
+ acknowledge(cursor: number): void;
1121
+ }
1122
+ //#endregion
1123
+ //#region src/duet/index.d.ts
1124
+ interface DuetOptions {
1125
+ workspace_id?: string;
1126
+ executor_model?: RoleModel | null;
1127
+ manager_model?: RoleModel | null;
1128
+ }
1129
+ declare const name = "dsh-duet-superagent";
1130
+ declare const inject: string[];
1131
+ declare module '@deepseek-ai/cordis' {
1132
+ interface Context {
1133
+ duetAgent: DuetAgent;
1134
+ }
1135
+ }
1136
+ declare function initializeLocal(runtime: Runtime, options?: DuetOptions): DuetSource;
1137
+ /** One lazy native Runtime per registered workspace; voice sockets only attach delivery. */
1138
+ declare class DuetAgent extends Service {
1139
+ private readonly root;
1140
+ private readonly entries;
1141
+ private readonly masters;
1142
+ private closing;
1143
+ constructor(ctx: Context, root: string);
1144
+ validateConfiguration(options: DuetOptions): Promise<void>;
1145
+ managedSessionIds(): string[];
1146
+ taskRows(workspaceId: string): Promise<{
1147
+ session_id: string;
1148
+ task_id: string;
1149
+ finished_at: number | null;
1150
+ run_id: string | null;
1151
+ name: string;
1152
+ state: string;
1153
+ }[]>;
1154
+ open(workspaceId: string, options?: DuetOptions): Promise<DuetSource>;
1155
+ close(): Promise<void>;
1156
+ resume(): Promise<void>;
1157
+ }
1158
+ declare function apply(ctx: Context): void;
1159
+ //#endregion
1160
+ export { DuetAgent, DuetOptions, apply, initializeLocal, inject, name };