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,1509 @@
1
+ import { B as ThreadFact, D as Decision, E as ChannelRef, H as ThreadRef, J as TriggerDisposition, S as AdmissionCell, U as Ticket, _ as Repositories, a as ReceiveResult, g as ReplyStatus, n as Deployment, p as OutboundMessage, q as Trigger, v as ScopeResult, y as SourceScope, z as Thread } from "./deployment-CFE4xX4v.js";
2
+ import { Context } from "@deepseek-ai/cordis";
3
+ import { z } from "zod";
4
+ import { DatabaseSync } from "node:sqlite";
5
+ import { MessageId } from "@deepseek-ai/dsh-llm";
6
+ import { Agent } from "@deepseek-ai/dsh-agent";
7
+ //#region src/admission.d.ts
8
+ declare const ADMISSION_OPTIONS: {
9
+ readonly listedUnaddressed: readonly ["inferred", "ignore"];
10
+ readonly unlistedAddressed: readonly ["explicit", "inferred", "ignore"];
11
+ readonly unlistedUnaddressed: readonly ["inferred", "ignore"];
12
+ };
13
+ type AdmissionRow = { [C in AdmissionCell]?: typeof ADMISSION_OPTIONS[C][number]; };
14
+ //#endregion
15
+ //#region src/infra/commands.d.ts
16
+ interface Tally {
17
+ skipped: number;
18
+ }
19
+ /**
20
+ * Executes gh, lark-cli, and git subprocesses with deployment account credentials, timeouts, and abort signals.
21
+ * Restricts GitHub API calls to the configured repository and translates CLI failures into CliError instances for Sources, MasterAssessor, Outbox, and Settings.
22
+ */
23
+ declare class Commands {
24
+ private readonly resolved;
25
+ private readonly environment;
26
+ private readonly signal;
27
+ /**
28
+ * @param resolved - returns the resolved deployment setup, or throws while setup is still pending.
29
+ * @param environment - variables overriding `process.env` for every command (such as isolated git settings).
30
+ */
31
+ constructor(resolved: () => Deployment, environment: Record<string, string | undefined>, signal: AbortSignal);
32
+ get deployment(): Deployment;
33
+ get repository(): string;
34
+ withSignal(signal?: AbortSignal): Commands;
35
+ run(program: string, args: string[], cwd?: string): Promise<string>;
36
+ /** Runs the agent's GitHub CLI and parses its JSON output; callers should prefer `api`, which is restricted to the configured repository and validates output. */
37
+ gh<T>(args: string[]): Promise<T>;
38
+ /**
39
+ * Calls the GitHub API on a path within the configured repository, validating JSON output when a schema is provided
40
+ * or returning raw CLI output (such as raw files or `--include` headers) when omitted.
41
+ * @throws CliError with GitHub's HTTP status as `code` on failure.
42
+ */
43
+ api<T>(schema: z.ZodType<T>, path: string, ...flags: string[]): Promise<T>;
44
+ api(path: string, ...flags: string[]): Promise<string>;
45
+ /** Fetches all pages of a GitHub API list within the configured repository, skipping items that fail schema validation. */
46
+ pages<T>(item: z.ZodType<T>, path: string, tally?: Tally): Promise<T[]>;
47
+ private path;
48
+ /**
49
+ * Runs the Feishu bot's `lark-cli` and returns the JSON `data` payload.
50
+ * @throws CliError with Feishu's error code on failure (rewriting 232011 when the bot is not in the chat).
51
+ */
52
+ lark<T>(args: string[], cwd?: string): Promise<T>;
53
+ /** Runs `git` on PATH using the agent's isolated git environment and credential helper. */
54
+ git(args: string[], cwd: string): Promise<string>;
55
+ }
56
+ //#endregion
57
+ //#region src/setup.d.ts
58
+ type SetupPlace = 'deployment' | 'github' | 'feishu';
59
+ declare const SETUP_PROBLEMS: {
60
+ readonly foreignFile: readonly ["deployment", "{file} was not written by dsh-superagent; move it, or choose another state directory."];
61
+ readonly gitTooOld: readonly ["deployment", "git does not read the github.com credential configuration dsh-superagent writes; dsh-superagent needs git 2.32 or later."];
62
+ readonly environmentFailed: readonly ["deployment", "Preparing the agent environment failed."];
63
+ readonly repositoryUnset: readonly ["github", "The GitHub Source names no repository."];
64
+ readonly agentCliUnset: readonly ["github", "The agent GitHub CLI is not set."];
65
+ readonly agentCliMissing: readonly ["github", "The agent GitHub CLI was not found."];
66
+ readonly agentCliSignedOut: readonly ["github", "The agent GitHub CLI cannot read its account."];
67
+ readonly agentCliNoAccount: readonly ["github", "The agent GitHub CLI did not report a GitHub account."];
68
+ readonly repositoryUnreadable: readonly ["github", "@{account} cannot read {repository}."];
69
+ readonly repositoryUnreported: readonly ["github", "The agent GitHub CLI did not return {repository}."];
70
+ readonly repositoryReadOnly: readonly ["github", "@{account} cannot push to {repository}."];
71
+ readonly feishuCliFailed: readonly ["feishu", "The bot lark-cli does not work."];
72
+ readonly feishuNoApp: readonly ["feishu", "auth status of the bot lark-cli did not report the app."];
73
+ readonly feishuBotNotReady: readonly ["feishu", "The bot identity of app {app} is {status}; configure the app secret with lark-cli."];
74
+ readonly feishuUserIdentity: readonly ["feishu", "The bot lark-cli allows user identities (strict mode {mode}); give the bot its own lark-cli configuration in strict mode bot, as docs/006-deployment.md describes."];
75
+ readonly feishuNoBot: readonly ["feishu", "The Feishu bot API did not return the bot's open_id."];
76
+ };
77
+ type SetupCode = keyof typeof SETUP_PROBLEMS;
78
+ interface SetupProblem {
79
+ place: SetupPlace;
80
+ code: SetupCode;
81
+ values: Record<string, string>;
82
+ detail: string;
83
+ }
84
+ //#endregion
85
+ //#region src/policy.d.ts
86
+ declare const RoleModelSchema: z.ZodObject<{
87
+ provider: z.ZodString;
88
+ model: z.ZodString;
89
+ reasoningEffort: z.ZodOptional<z.ZodString>;
90
+ }, z.core.$strict>;
91
+ type RoleModel = z.infer<typeof RoleModelSchema>;
92
+ declare const SettingsSchema: z.ZodObject<{
93
+ paused: z.ZodDefault<z.ZodBoolean>;
94
+ sources: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
95
+ enabled: z.ZodDefault<z.ZodBoolean>;
96
+ config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
97
+ }, z.core.$strict>>>;
98
+ policy: z.ZodDefault<z.ZodObject<{
99
+ rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
100
+ id: z.ZodString;
101
+ name: z.ZodString;
102
+ enabled: z.ZodBoolean;
103
+ instruction: z.ZodString;
104
+ }, z.core.$strict>>>;
105
+ sources: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
106
+ allowed: z.ZodDefault<z.ZodArray<z.ZodObject<{
107
+ id: z.ZodString;
108
+ name: z.ZodOptional<z.ZodString>;
109
+ }, z.core.$strict>>>;
110
+ admission: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<AdmissionRow, unknown, z.core.$ZodTypeInternals<AdmissionRow, unknown>>>>;
111
+ }, z.core.$catchall<z.ZodUnknown>>>>;
112
+ }, z.core.$strict>>;
113
+ eval: z.ZodDefault<z.ZodObject<{
114
+ mode: z.ZodDefault<z.ZodEnum<{
115
+ off: "off";
116
+ observe: "observe";
117
+ auto: "auto";
118
+ }>>;
119
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
120
+ model: z.ZodDefault<z.ZodNullable<z.ZodObject<{
121
+ provider: z.ZodString;
122
+ model: z.ZodString;
123
+ reasoningEffort: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$strict>>>;
125
+ }, z.core.$strict>>;
126
+ executor: z.ZodDefault<z.ZodObject<{
127
+ model: z.ZodDefault<z.ZodNullable<z.ZodObject<{
128
+ provider: z.ZodString;
129
+ model: z.ZodString;
130
+ reasoningEffort: z.ZodOptional<z.ZodString>;
131
+ }, z.core.$strict>>>;
132
+ maxWorkers: z.ZodDefault<z.ZodNumber>;
133
+ directory: z.ZodDefault<z.ZodString>;
134
+ prepare: z.ZodDefault<z.ZodString>;
135
+ blockedCommands: z.ZodDefault<z.ZodArray<z.ZodString>>;
136
+ }, z.core.$strict>>;
137
+ }, z.core.$strict>;
138
+ type Settings = z.infer<typeof SettingsSchema>;
139
+ type SettingsBlock = 'policy' | 'eval' | 'executor' | `source:${string}`;
140
+ type SettingsSave = SettingsBlock | 'pause';
141
+ type SettingsOrigin = 'panel' | 'tool' | 'sync';
142
+ //#endregion
143
+ //#region src/app/execution-environment.d.ts
144
+ interface Variable {
145
+ key: string;
146
+ value: string;
147
+ description: Localized;
148
+ owner: string;
149
+ }
150
+ //#endregion
151
+ //#region src/app/retry-health.d.ts
152
+ interface BudgetRetryStatus {
153
+ sessionId: string;
154
+ provider: string;
155
+ attempts: number;
156
+ since: string;
157
+ lastAt: string;
158
+ }
159
+ //#endregion
160
+ //#region src/infra/health.d.ts
161
+ interface HealthEntry {
162
+ get(): Health | undefined;
163
+ set(health: Health): void;
164
+ /** Unregisters the entry from the board (such as when a Source kind unregisters); subsequent `set` calls become no-ops. */
165
+ release(): void;
166
+ }
167
+ /**
168
+ * Central registry of component health entries, enforcing single-writer ownership per entry name.
169
+ * Claimed by Runtime, Effects, Sessions, DshExecutor, Settings, and SourceRegistry, and read by management HTTP routes.
170
+ */
171
+ declare class HealthBoard {
172
+ private readonly entries;
173
+ private readonly claimed;
174
+ claim(name: string, initial?: Health): HealthEntry;
175
+ get all(): Readonly<Record<string, Health>>;
176
+ }
177
+ //#endregion
178
+ //#region src/app/store-read.d.ts
179
+ declare function storeReads(db: DatabaseSync): {
180
+ /** Newest first by arrival (`rowid`) order rather than trigger timestamp. */
181
+ recentTriggers: (offset?: number, limit?: number) => Trigger[];
182
+ /** Per-source trigger counts since `since`, plus the latest arrival timestamp across all time. */
183
+ triggerStats: (since: string) => Record<string, {
184
+ received: number;
185
+ filtered: number;
186
+ lastAt: string;
187
+ }>;
188
+ /**
189
+ * Counts triggers arriving at or after `since` that passed source filtering and reached a decision,
190
+ * and how many accept/reopen decisions those same arrivals produced.
191
+ */
192
+ flow: (since: string) => {
193
+ judged: number;
194
+ accepted: number;
195
+ };
196
+ triggers: (options: {
197
+ source?: string;
198
+ filtered?: boolean;
199
+ }, offset?: number, limit?: number) => {
200
+ items: Trigger[];
201
+ more: boolean;
202
+ };
203
+ /** Latest `limit` triggers on a thread returned oldest-first, optionally bounded before (or through) `before`. */
204
+ threadTriggers: (threadKeyValue: string, limit?: number, before?: TimelinePlace, through?: boolean) => Trigger[];
205
+ threadPage: (threadKeyValue: string, offset: number, limit: number) => Trigger[];
206
+ /** Nearest non-CI triggers on a thread immediately before and after `(at, id)`. */
207
+ neighbours: (threadKeyValue: string, at: string, id: string) => {
208
+ before?: Trigger;
209
+ after?: Trigger;
210
+ };
211
+ /** Oldest trigger on a thread, used to title the thread in listings. */
212
+ firstTrigger: (threadKeyValue: string, humanOnly?: boolean) => Trigger | undefined;
213
+ search: (query: string, limit?: number) => Trigger[];
214
+ recentDecisions: (offset?: number, limit?: number) => Decision[];
215
+ /** Decisions matching `kinds` whose triggers arrived at or after `since`, aligned with `flow` window counts. */
216
+ decisions: (options: {
217
+ kinds: string[];
218
+ since: string;
219
+ }, offset: number, limit: number) => {
220
+ items: Decision[];
221
+ more: boolean;
222
+ };
223
+ /** Newest decisions of the given kinds, for surfaces that must surface rare outcomes among many ignores. */
224
+ decisionsOfKinds: (kinds: string[], limit?: number) => Decision[];
225
+ /** Messages whose `reply` effect failed, with consecutive failure count and last error, oldest first. */
226
+ failingReplies: () => (Receipt & {
227
+ attempts: number;
228
+ error: string;
229
+ })[];
230
+ droppedReplies: (limit?: number) => Dropped[];
231
+ droppedSince: (since: string) => number;
232
+ subscribedThreads: (source?: string) => Thread[];
233
+ };
234
+ //#endregion
235
+ //#region src/app/store.d.ts
236
+ /** A Trigger's position on its thread timeline, ordered by timestamp and then `id` as tie-breaker. */
237
+ interface TimelinePlace {
238
+ at: string;
239
+ id: string;
240
+ }
241
+ /** Why a message was dropped: its conversation can never receive it (`channelGone`), or its Source no longer listens to it (`channelIgnored`). */
242
+ type DropReason = 'channelGone' | 'channelIgnored';
243
+ /** Outbound message receipt tracked in the outbox from the moment it is queued (`pending`, `sent`, or `dropped`); delivery attempt counts live on its `reply` effect. */
244
+ interface Receipt extends OutboundMessage {
245
+ status: ReplyStatus;
246
+ dropped?: {
247
+ at: string;
248
+ reason: DropReason;
249
+ };
250
+ }
251
+ /** A dropped outbound message receipt, with the timestamp and reason it was dropped. */
252
+ type Dropped = Receipt & {
253
+ dropped: {
254
+ at: string;
255
+ reason: DropReason;
256
+ };
257
+ };
258
+ /** Saved settings snapshot with the policy version and ticket notifications it produced (`internal` saves have no origin). */
259
+ interface SettingsVersion {
260
+ revision: number;
261
+ savedAt: string;
262
+ source: SettingsOrigin | 'internal';
263
+ block?: SettingsSave;
264
+ policyVersion: string;
265
+ policyChanged: boolean;
266
+ notified: string[];
267
+ settings: Settings;
268
+ }
269
+ /**
270
+ * SQLite backing store implementing domain `Repositories`, view read queries, versioned settings, outbox receipts, and key-value state.
271
+ * The Runtime opens it after locking the state directory and automatically migrates supported older schemas on startup.
272
+ * The Engine mutates domain aggregates inside `atomic` transactions while Sources, views, and the Outbox read state or update their own records.
273
+ */
274
+ declare class Store implements Repositories {
275
+ private readonly report;
276
+ readonly db: DatabaseSync;
277
+ /**
278
+ * Opens or creates the SQLite database at `path`, migrating schema 10 to schema 11 in a single transaction.
279
+ * @param report - Receives errors thrown by `afterCommit` callbacks without failing the committed transaction.
280
+ * @throws When the database schema is older than `OLDEST_SCHEMA` (10), newer than `SCHEMA_VERSION` (11), or when migration fails; in every case the database file is left unchanged and the SQLite handle is closed so a later attempt in the same process can open it.
281
+ */
282
+ constructor(path: string, report?: (error: unknown) => void);
283
+ /** Reconciles generated working-set columns and indexes when opening databases created by earlier versions. */
284
+ private addColumns;
285
+ /** Closes the underlying SQLite database connection. */
286
+ close(): void;
287
+ /** Parses JSON `value` columns returned by `sql`. */
288
+ private values;
289
+ /** Re-indexes which threads a Trigger belongs to, replacing any rows from an earlier save of the same Trigger. */
290
+ private indexThreads;
291
+ private depth;
292
+ /** Callbacks queued to run once the outermost transaction commits, indexed by savepoint level; rolling back a level discards its callbacks. */
293
+ private readonly committed;
294
+ /**
295
+ * Executes `operation` in a savepoint transaction (nested inside the current transaction if any); a failure rolls back its changes.
296
+ * Post-commit callbacks run only after the outermost transaction commits, and callback errors are reported without failing the committed transaction.
297
+ */
298
+ atomic<T>(operation: () => T): T;
299
+ /**
300
+ * Schedules `action` to run once the outermost transaction commits, or immediately if outside a transaction;
301
+ * callbacks queued inside a transaction that rolls back are discarded and never run.
302
+ * Use `afterCommit` for immediate in-memory follow-ups to a committed write (such as refreshing health or cancelling an in-memory turn) that cannot wait for the effect queue and need not survive a restart; use `Effects` for durable side effects that must survive a crash.
303
+ */
304
+ afterCommit(action: () => void): void;
305
+ /** Reads a typed KV record by its key in `KV`. */
306
+ get<V>(name: Key<V>): V | undefined;
307
+ /** Writes a typed KV record under `name`. */
308
+ set<V>(name: Key<V>, value: V): void;
309
+ /** Deletes the KV record at `name`. */
310
+ delete(name: string): void;
311
+ /** Returns all KV keys belonging to `family` or starting with `prefix`. */
312
+ keys<V>(family: Family<V, never>): Key<V>[];
313
+ keys(prefix: string): string[];
314
+ /** Versioned settings snapshots; the current settings are the snapshot of the latest revision. */
315
+ private readonly settingsVersions;
316
+ /** Current validated settings. */
317
+ settings(): Settings;
318
+ /** Revision of one settings block; each configuration page saves against its own block for optimistic concurrency. */
319
+ blockRevision(block: SettingsSave): number;
320
+ /** Saves settings as the next revision (making it current) and increments `record.block`'s revision counter when present. */
321
+ saveSettings(value: unknown, record?: Omit<SettingsVersion, 'revision' | 'savedAt' | 'settings'>): Settings;
322
+ /** Saved settings revisions, newest first; revisions predating settings history are absent. */
323
+ settingsHistory(limit?: number): SettingsVersion[];
324
+ readonly triggers: {
325
+ get: (id: string) => Trigger | undefined;
326
+ save: (trigger: Trigger) => void;
327
+ disposition: (id: string) => TriggerDisposition | undefined;
328
+ saveDisposition: (id: string, value: TriggerDisposition) => void;
329
+ };
330
+ readonly threads: {
331
+ get: (keyValue: string) => Thread | undefined;
332
+ save: (thread: Thread) => void;
333
+ list: () => Thread[];
334
+ active: () => Thread[];
335
+ /** Updates human-facing thread metadata (`label`, `url`, and `facts`, where `null` removes a fact by ID); no-op if the thread does not exist. */
336
+ describe: (keyValue: string, patch: {
337
+ label?: string;
338
+ url?: string;
339
+ facts?: Record<string, ThreadFact | null>;
340
+ }) => void;
341
+ /** Atomically sets or removes (`undefined`) source-specific metadata keys on a thread after re-reading it; no-op if the thread does not exist. */
342
+ patchMeta: (keyValue: string, patch: Record<string, unknown>) => void;
343
+ };
344
+ readonly tickets: {
345
+ get: (id: string) => Ticket | undefined;
346
+ save: (ticket: Ticket) => void;
347
+ /** Newest first. */
348
+ list: () => Ticket[];
349
+ /** Newest first. */
350
+ open: () => Ticket[];
351
+ /** Newest first. */
352
+ active: () => Ticket[];
353
+ };
354
+ readonly decisions: {
355
+ get: (id: string) => Decision | undefined;
356
+ save: (decision: Decision) => void;
357
+ byThread: (threadKeyValue: string) => Decision[];
358
+ };
359
+ /** Read-only queries for management views, orchestrator tools, and source polling (see `storeReads`). */
360
+ readonly read: ReturnType<typeof storeReads>;
361
+ /** Delivery status of a queued message; receipts are retained permanently so message IDs are idempotent. */
362
+ replyStatus(id: string): ReplyStatus | undefined;
363
+ /** Outbox message receipts for channel delivery; only `Outbox` writes to `receipts`. */
364
+ readonly receipts: {
365
+ get: (id: string) => Receipt | undefined;
366
+ /** Pending message receipts, oldest first. */
367
+ waiting: () => Receipt[];
368
+ /** True if an earlier message for the same ticket and conversation is still pending with fewer than `failures` consecutive failed `reply` effect attempts. */
369
+ behind: (id: string, failures: number) => boolean;
370
+ /**
371
+ * Records a new pending message receipt; an already-recorded message ID keeps its original receipt.
372
+ * @returns Whether the message ID was newly recorded.
373
+ */
374
+ add: (message: OutboundMessage) => boolean;
375
+ /**
376
+ * Marks a pending receipt as sent or dropped (with drop reason and timestamp), recreating the receipt if the message
377
+ * was withdrawn while being sent so its ID cannot be queued again.
378
+ */
379
+ settle: (message: OutboundMessage, outcome: "sent" | DropReason) => void;
380
+ /**
381
+ * Withdraws a pending message that has not yet been sent.
382
+ * @returns Whether a pending message with `id` was waiting and removed.
383
+ */
384
+ withdraw: (id: string) => boolean;
385
+ };
386
+ }
387
+ //#endregion
388
+ //#region src/app/effects.d.ts
389
+ interface EffectPayloads {
390
+ /** Build an Eval's candidate card and relay it to the main Session; the key is the Eval ID. */
391
+ assessment: {
392
+ triggerId: string;
393
+ };
394
+ /** Launch a pending Assignment; the key is the Assignment ID. */
395
+ launch: {
396
+ ticketId: string;
397
+ assignmentId: string;
398
+ };
399
+ /** Hand a ticket's waiting Inputs to its running Assignment; the key is the Ticket ID. */
400
+ delivery: {
401
+ ticketId: string;
402
+ };
403
+ /** Steer a report or a candidate into the main Session; the key is the request ID. */
404
+ relay: {
405
+ text: string;
406
+ };
407
+ /** Inject a notice into the main Session without waking it; the key names what it reports, such as `prompts`. */
408
+ notice: {
409
+ value: Record<string, unknown>;
410
+ summary: string;
411
+ };
412
+ /** Send a message for a Channel through its Source; the key is the message ID, whose receipt the Outbox keeps. */
413
+ reply: Record<string, never>;
414
+ }
415
+ type EffectKind = keyof EffectPayloads;
416
+ interface Handler<K extends EffectKind> {
417
+ run: (payload: EffectPayloads[K], key: string) => Promise<void>;
418
+ /** How many may run at once now; 0 holds the kind, such as while processing is paused. */
419
+ limit: () => number;
420
+ /** Initial and maximum retry backoff delays, in milliseconds. */
421
+ retry: readonly [number, number];
422
+ /** Effects run one at a time in queue order, and a failed one holds back later rows of the same kind. */
423
+ ordered: boolean;
424
+ /** When true, repeated failures do not mark the effect kind's health entry as `error` (used when failures are already surfaced on a ticket). */
425
+ quiet: boolean;
426
+ }
427
+ type Options<K extends EffectKind> = Partial<Pick<Handler<K>, 'limit' | 'retry' | 'ordered' | 'quiet'>>;
428
+ /**
429
+ * Durable SQLite-backed queue that persists side effects inside command transactions and dispatches them after commit.
430
+ * Coordinates per-kind handlers, concurrency limits, exponential backoff, and health reporting for MasterAssessor, DshExecutor, Sessions, and Outbox.
431
+ */
432
+ declare class Effects {
433
+ private readonly store;
434
+ private readonly board;
435
+ private readonly now;
436
+ private readonly handlers;
437
+ private readonly health;
438
+ private readonly tasks;
439
+ /** Kinds whose last dispatch failed; the next dispatch that succeeds refreshes their health. */
440
+ private readonly broken;
441
+ private seq;
442
+ private scheduled;
443
+ /** Effects run only between `start` and `drain`; rows queued before `start` wait, such as while setup is incomplete. */
444
+ private started;
445
+ private stopped;
446
+ constructor(store: Store, board: Pick<HealthBoard, 'claim'>, now?: () => number);
447
+ /** Upserts an effect in the caller's transaction, coalescing with any waiting row of the same kind and key while keeping its queue position. */
448
+ enqueue<K extends EffectKind>(kind: K, key: string, payload: EffectPayloads[K]): void;
449
+ handle<K extends EffectKind>(kind: K, run: Handler<K>['run'], options?: Options<K>): void;
450
+ pending(kind: EffectKind, key?: string): boolean;
451
+ /** Drops a queued row by kind and key; if it is already running, that attempt finishes normally. */
452
+ cancel(kind: EffectKind, key: string): void;
453
+ start(): void;
454
+ kick(): void;
455
+ /** Resolves once no effect of `kind` (or of any kind) is running and none can start because none is due or `limit()` has no room. */
456
+ idle(kind?: EffectKind): Promise<void>;
457
+ /** Stops starting new effects and waits for running ones; waiting rows remain in SQLite for the next start. */
458
+ drain(): Promise<void>;
459
+ private dispatch;
460
+ private run;
461
+ private attempt;
462
+ private failed;
463
+ private report;
464
+ }
465
+ //#endregion
466
+ //#region src/app/tools/tool.d.ts
467
+ interface Tool<S extends z.ZodType = z.ZodType> {
468
+ name: string;
469
+ description: string;
470
+ schema: S;
471
+ execute: (args: z.infer<S>, signal: AbortSignal) => Promise<unknown>;
472
+ }
473
+ //#endregion
474
+ //#region src/app/sessions.d.ts
475
+ /** Host dependencies used by `Sessions`. */
476
+ interface SessionsHost {
477
+ /** DSH Cordis context: sessions, agents, persistence, and their events. */
478
+ readonly context: Context;
479
+ readonly store: Pick<Store, 'tickets' | 'settings' | 'get' | 'set' | 'keys'>;
480
+ readonly prompts: Pick<Prompts, 'current' | 'version' | 'compose' | 'skills'>;
481
+ readonly effects: Pick<Effects, 'enqueue' | 'handle' | 'idle' | 'pending'>;
482
+ /** The `models` health entry, which reports managed sessions waiting on a model-budget retry. */
483
+ readonly health: HealthEntry;
484
+ readonly masterId: string;
485
+ readonly presets?: {
486
+ router: string;
487
+ worker: string;
488
+ };
489
+ readonly lifetime: AbortSignal;
490
+ closing(): boolean;
491
+ /** Execution environment variables for `ticket`, rendered into its worker's system prompt. */
492
+ environment(ticket: Ticket): Variable[];
493
+ /** Tools to register on the main Session (`ticket === undefined`) or on `ticket`'s worker Session. */
494
+ tools(agent: Agent, ticket?: Ticket): Tool[];
495
+ }
496
+ declare module '@deepseek-ai/cordis' {
497
+ interface Events {
498
+ /** DSH's agent preset registry selected `agentPreset` for a Session. */
499
+ 'agent-preset/selected'(sessionId: string, agentPreset: string): void;
500
+ }
501
+ }
502
+ /**
503
+ * Creates and decorates orchestrator and worker DSH `Agent` sessions with role models, system prompt sections from `Prompts`, runtime skills, and restricted tool sets.
504
+ * `Runtime`, `DshExecutor`, `MasterAssessor`, `Settings`, and management routes/tools use it to ensure sessions, deliver deduplicated messages via `AgentDelivery`, and process ordered `relay` and `notice` effects.
505
+ * Feeds session events into `RetryHealth` to report model budget waits on the `models` `HealthEntry`, and durably records which prompt revisions each session has worked under in `Store` (`KV.sessions.prompts`) to authorize prompt version reads.
506
+ */
507
+ declare class Sessions {
508
+ private readonly host;
509
+ private readonly modelBindings;
510
+ private readonly agentDelivery;
511
+ /** Decorated agents mapped to their registered disposers and skill scope until the agent is disposed or `Sessions.dispose()` runs. */
512
+ private readonly bindings;
513
+ private readonly retryHealth;
514
+ private readonly ctx;
515
+ /** Registers ordered `relay` and `notice` effect handlers that deliver to the main Session. */
516
+ constructor(host: SessionsHost);
517
+ /** Subscribes to host agent and session events so newly created sessions are decorated and model-budget retries are reflected in health. Call once at startup. */
518
+ install(): void;
519
+ /** Resolves or creates session `id` in workspace `cwd`, initializes its role model, decorates it with prompts/skills/tools, sets `danger-full-access` permissions, and renames it to `title`. */
520
+ ensure(id: string, cwd: string, title: string, role: 'orchestrator' | 'worker'): Promise<Agent>;
521
+ /** Returns whether `sessionId` already holds the message delivered under `requestId`, or `false` if the session does not exist. */
522
+ holds(sessionId: string, requestId: string): Promise<boolean>;
523
+ /** Deliver a message once per request id: to the next turn, the current one, or `inject`ed with its label without waking the agent. */
524
+ prompt(sessionId: string, requestId: string, text: string, mode: 'queue' | 'steer' | {
525
+ inject: string;
526
+ }, authorize?: () => void, accepted?: () => void): Promise<void>;
527
+ /** The id of the message `prompt` delivers under `requestId`, which DSH's inbox events name it by. */
528
+ promptedId(requestId: string): MessageId;
529
+ /** Enqueues a steering relay to the main Session; relays are durable and retried by `Effects` until delivered, at most once per `requestId`. */
530
+ relay(requestId: string, text: string): void;
531
+ /** Enqueues a durable background notice for injection into the main Session; a new notice with the same `name` replaces a still-waiting notice of that `name`. */
532
+ notify(name: string, value: Record<string, unknown>, summary: string): void;
533
+ /** Waits for currently runnable `notice` effects to settle and returns `'injected'` if notice `name` has reached the main Session or `'pending'` if it is still queued. */
534
+ delivery(name: string): Promise<'injected' | 'pending'>;
535
+ /** Injects a notice into the main Session without waking it; no-op if the main Session does not exist yet. */
536
+ private inject;
537
+ /** Returns the current prompt revision, the active prompt revision of each loaded Session, and whether the main Session still has a pending `'prompts'` notice. */
538
+ status(): {
539
+ revision: number;
540
+ sessions: {
541
+ sessionId: string;
542
+ revision: number;
543
+ }[];
544
+ notificationPending: boolean;
545
+ };
546
+ /** Returns the prompt version a Session runs under (the one bound on its latest model request, or the current version). */
547
+ promptVersion(sessionId: string): PromptVersion;
548
+ /** Whether a Session is authorized to read `revision` (its active revision or any revision it previously ran under). */
549
+ mayRead(sessionId: string, revision: number): boolean;
550
+ /** Returns a tool registrar for `agent` that renders tool output as JSON text and attaches `output.image` as an image when present. */
551
+ private registerTool;
552
+ /** Returns `sessionId`'s active model-budget retry state (`{ model_retry }`) for status listings, or `{}` when not waiting on one. */
553
+ modelRetry(sessionId: string | undefined): {
554
+ model_retry: BudgetRetryStatus;
555
+ } | {
556
+ model_retry?: undefined;
557
+ };
558
+ private updateModelHealth;
559
+ private ticketOf;
560
+ private decorate;
561
+ /**
562
+ * Whether a Session runs the router preset: as DSH's preset registry last selected it, read through the session projection
563
+ * on a DSH whose registry has no `presetForSession`, else as it was created; `standard`, the safer caps, when unreadable.
564
+ */
565
+ private routed;
566
+ /**
567
+ * An Executor Session's tools: only the profile's work tools, which DSH requires to be known, and none once its ticket
568
+ * ended. A failed or blocked worker keeps its tools, so a person may continue it in its Session; only automated input waits
569
+ * (see the executor). Read inherited tools through the parent scope, which includes the preset's tools. The global view
570
+ * misses preset tools; the agent's own view also includes local tools such as subagent, which restrict refuses to name.
571
+ */
572
+ private workOnly;
573
+ /**
574
+ * A subagent of an Executor Session, or of one of its subagents, which runs under DSH's `standard` preset with the worker's
575
+ * permissions, gets the same work tools as the worker, and none once the worker's ticket ended. Any other agent is left as
576
+ * it is.
577
+ */
578
+ private limitSubagent;
579
+ /** Register the skills of a prompt version in the agent's skill scope, in place of an earlier version's. */
580
+ private bindSkills;
581
+ /** Return the current prompt version, updating the agent's skills and recording the revision in Store when bound to a model request. */
582
+ private promptFor;
583
+ /** Releases registrations for `agent` in reverse order (LIFO); disposing its skill scope releases its skills as well. */
584
+ private release;
585
+ /** Releases prompt sections, skills, and tools registered by `Sessions` across all decorated agents. */
586
+ dispose(): void;
587
+ }
588
+ //#endregion
589
+ //#region src/app/prompts.d.ts
590
+ /**
591
+ * A configuration, whose overrides may name a part a later version no longer has, which `Prompts.validate` drops when the
592
+ * saved version holds it and refuses otherwise.
593
+ */
594
+ declare const PromptConfigSchema: z.ZodObject<{
595
+ communication: z.ZodString;
596
+ scope: z.ZodString;
597
+ delivery: z.ZodString;
598
+ skills: z.ZodRecord<z.ZodString, z.ZodString>;
599
+ overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
600
+ text: z.ZodString;
601
+ base: z.ZodOptional<z.ZodString>;
602
+ }, z.core.$strict>>>;
603
+ }, z.core.$strict>;
604
+ type PromptConfig = z.infer<typeof PromptConfigSchema>;
605
+ interface PromptVersion {
606
+ revision: number;
607
+ previousRevision: number | null;
608
+ savedAt: string;
609
+ source: string;
610
+ config: PromptConfig;
611
+ /** Original unmigrated config preserved when differences cannot be compared across schema versions. */
612
+ legacy?: {
613
+ config: unknown;
614
+ };
615
+ }
616
+ type Role = 'orchestrator' | 'worker';
617
+ /** An override whose built-in text changed since its `base`, with that text when kept, or whose part this version no longer has. */
618
+ interface DefaultChange {
619
+ part: string;
620
+ base?: string;
621
+ previous?: string;
622
+ removed?: true;
623
+ }
624
+ /**
625
+ * Stores numbered prompt configurations in `Store` via `Versions` and composes role system prompts and skills with the execution environment.
626
+ * `Sessions` reads the composed prompts and skills for orchestrator and worker runs, while management routes and tools validate, preview, and save revisions through it.
627
+ */
628
+ declare class Prompts {
629
+ private readonly store;
630
+ private readonly maxChars;
631
+ private readonly environment;
632
+ private readonly feishu;
633
+ private readonly github;
634
+ private readonly versions;
635
+ constructor(store: Store, maxChars: () => number, environment: () => Variable[] | undefined, feishu: () => boolean, github?: boolean);
636
+ /** A role's prompt; the main Session's Policy section follows the settings as they are now, at each model request. */
637
+ compose(config: PromptConfig, role: Role, variables?: Variable[] | undefined): string;
638
+ /** Returns skills to register in every Session: built-in Source skills (`feishu` only when a Feishu bot is configured) followed by team skills. */
639
+ skills(config: PromptConfig): [string, string][];
640
+ current(): PromptVersion;
641
+ /** Reads a revision by number; revision 0 resolves to built-in defaults before the first save persists it. */
642
+ version(revision: number): PromptVersion;
643
+ /**
644
+ * Parse a configuration: an override names a built-in part, holds text and keeps its template's placeholders, and records the
645
+ * built-in text it was edited from: the saved override's unless it names one, else the current one. It goes once its text is
646
+ * the built-in text again, and so does one of a part this version no longer has, which the saved version holds.
647
+ */
648
+ validate(value: unknown): PromptConfig;
649
+ /**
650
+ * The overrides of `config` whose built-in part changed since the team edited it, by the `base` they were edited from, each
651
+ * with the built-in text of that base when this installation kept it, and those of a part this version no longer has.
652
+ */
653
+ defaultChanged(config: PromptConfig): DefaultChange[];
654
+ preview(value: unknown): {
655
+ orchestrator: string;
656
+ worker: string;
657
+ parts: {
658
+ orchestrator: ({
659
+ name: string;
660
+ kind: "fixed";
661
+ key: string;
662
+ text: string;
663
+ } | {
664
+ name: "scope" | "communication" | "delivery";
665
+ kind: "team";
666
+ heading: string;
667
+ text: string;
668
+ } | {
669
+ name: string;
670
+ kind: "generated";
671
+ key: string;
672
+ text: string;
673
+ })[];
674
+ worker: ({
675
+ name: string;
676
+ kind: "fixed";
677
+ key: string;
678
+ text: string;
679
+ } | {
680
+ name: "scope" | "communication" | "delivery";
681
+ kind: "team";
682
+ heading: string;
683
+ text: string;
684
+ } | {
685
+ name: string;
686
+ kind: "generated";
687
+ key: string;
688
+ text: string;
689
+ })[];
690
+ };
691
+ skills: {
692
+ [k: string]: string;
693
+ };
694
+ scope: string;
695
+ };
696
+ save(value: unknown, baseRevision: number, source: SettingsOrigin): PromptVersion;
697
+ history(offset?: number, limit?: number): {
698
+ revisions: {
699
+ changed: string[];
700
+ revision: number;
701
+ previousRevision: number | null;
702
+ savedAt: string;
703
+ source: string;
704
+ /** Original unmigrated config preserved when differences cannot be compared across schema versions. */
705
+ legacy?: {
706
+ config: unknown;
707
+ };
708
+ }[];
709
+ next_offset: number | null;
710
+ };
711
+ }
712
+ //#endregion
713
+ //#region src/sources/github-pull.d.ts
714
+ declare const PullSchema: z.ZodObject<{
715
+ title: z.ZodOptional<z.ZodString>;
716
+ state: z.ZodString;
717
+ html_url: z.ZodString;
718
+ user: z.ZodPipe<z.ZodNullable<z.ZodObject<{
719
+ login: z.ZodString;
720
+ type: z.ZodOptional<z.ZodString>;
721
+ }, z.core.$loose>>, z.ZodTransform<{
722
+ [x: string]: unknown;
723
+ login: string;
724
+ type?: string | undefined;
725
+ }, {
726
+ [x: string]: unknown;
727
+ login: string;
728
+ type?: string | undefined;
729
+ } | null>>;
730
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
731
+ created_at: z.ZodOptional<z.ZodString>;
732
+ merged: z.ZodOptional<z.ZodBoolean>;
733
+ merged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
734
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
735
+ auto_merge: z.ZodOptional<z.ZodUnknown>;
736
+ head: z.ZodObject<{
737
+ sha: z.ZodString;
738
+ ref: z.ZodString;
739
+ repo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
740
+ full_name: z.ZodString;
741
+ }, z.core.$loose>>>;
742
+ }, z.core.$loose>;
743
+ }, z.core.$loose>;
744
+ type Pull = z.infer<typeof PullSchema> & {
745
+ number: number;
746
+ };
747
+ //#endregion
748
+ //#region src/sources/github-trigger.d.ts
749
+ /**
750
+ * A GitHub comment or review; a review carries `state` and `commit_id`, and an inline review comment carries its file,
751
+ * line, diff hunk, and `in_reply_to_id` (the root comment ID of its review thread).
752
+ */
753
+ declare const CommentSchema: z.ZodObject<{
754
+ id: z.ZodNumber;
755
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
756
+ user: z.ZodPipe<z.ZodNullable<z.ZodObject<{
757
+ login: z.ZodString;
758
+ type: z.ZodOptional<z.ZodString>;
759
+ }, z.core.$loose>>, z.ZodTransform<{
760
+ [x: string]: unknown;
761
+ login: string;
762
+ type?: string | undefined;
763
+ }, {
764
+ [x: string]: unknown;
765
+ login: string;
766
+ type?: string | undefined;
767
+ } | null>>;
768
+ html_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
769
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
770
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
771
+ submitted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
772
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
773
+ commit_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
774
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
775
+ line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
776
+ original_line: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
777
+ diff_hunk: z.ZodOptional<z.ZodNullable<z.ZodString>>;
778
+ in_reply_to_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
779
+ }, z.core.$loose>;
780
+ type GithubComment = z.infer<typeof CommentSchema>;
781
+ interface PullRef {
782
+ number: number;
783
+ isPr: boolean;
784
+ url?: string;
785
+ prAuthor?: string;
786
+ }
787
+ /** Builds a trigger for a comment or review; text is empty for a bodyless comment or a `COMMENTED` review without a body. */
788
+ declare function commentTrigger(comment: GithubComment, ref: PullRef, kind: 'conversation' | 'inline' | 'review', agent: string): Trigger;
789
+ //#endregion
790
+ //#region src/sources/github.d.ts
791
+ declare const GithubConfigSchema: z.ZodObject<{
792
+ repository: z.ZodDefault<z.ZodString>;
793
+ cli: z.ZodDefault<z.ZodString>;
794
+ pollSeconds: z.ZodDefault<z.ZodNumber>;
795
+ failuresBeforeError: z.ZodDefault<z.ZodNumber>;
796
+ observeIssues: z.ZodDefault<z.ZodBoolean>;
797
+ observePulls: z.ZodDefault<z.ZodBoolean>;
798
+ observeComments: z.ZodDefault<z.ZodBoolean>;
799
+ observeCi: z.ZodDefault<z.ZodBoolean>;
800
+ }, z.core.$strict>;
801
+ type GithubConfig = z.infer<typeof GithubConfigSchema>;
802
+ declare const githubKind: SourceKind<GithubConfig>;
803
+ declare const name = "dsh-superagent-github";
804
+ declare const inject: string[];
805
+ declare function apply(ctx: Context): void;
806
+ /** Returns an error health once `failures` consecutive polls fail, or undefined so a single network interruption stays quiet. */
807
+ declare function pollFailure(failures: number, threshold: number, error: unknown): Health | undefined;
808
+ interface Round {
809
+ started: string;
810
+ signal?: AbortSignal | undefined;
811
+ pulls: Map<number, Promise<Pull>>;
812
+ read: Set<number>;
813
+ failures: string[];
814
+ dropped: number[];
815
+ abandoned: number[];
816
+ tally: Tally;
817
+ }
818
+ interface Retry {
819
+ since: string;
820
+ pr: boolean;
821
+ failedAt?: string;
822
+ attempts?: number;
823
+ }
824
+ /**
825
+ * One polling round: notifications, then observed repository streams, then the PRs of open tickets with their CI, then
826
+ * subscribed Threads. Each step and each Issue, PR, or Thread fails independently so all steps run before the round fails.
827
+ * Other read failures (including 404) fail the round toward the error threshold, whereas deleted (410) or abandoned
828
+ * (24h+) threads are recorded only on the thread and in health detail.
829
+ * @returns the polling interval requested by GitHub, in seconds.
830
+ */
831
+ declare function pollRound(ctx: SourceContext, signal?: AbortSignal): Promise<number>;
832
+ declare function pollTicketPulls(ctx: SourceContext, signal?: AbortSignal, round?: Round): Promise<void>;
833
+ /** Polls subscribed Issue and PR Threads not already read in this round; a deleted (410) Issue is still polled within the horizon (costing one read) and does not fail the round. */
834
+ declare function pollThreads(ctx: SourceContext, signal?: AbortSignal, round?: Round): Promise<void>;
835
+ //#endregion
836
+ //#region src/kv.d.ts
837
+ /** Key of a KV record whose value has type `V`; a plain string represents an untyped key. */
838
+ type Key<V> = string & {
839
+ readonly __value?: V;
840
+ };
841
+ /** Family of KV records sharing a prefix: callable to build a key from its name parts, and exposing `prefix` for listing. */
842
+ type Family<V, A extends unknown[]> = ((...name: A) => Key<V>) & {
843
+ readonly prefix: string;
844
+ };
845
+ //#endregion
846
+ //#region src/sources/host.d.ts
847
+ /** Fixed English health templates (`{name}` placeholders); the panel localizes each `code` in the interface language. */
848
+ declare const HEALTH_TEXT: {
849
+ readonly setupPending: "Waiting for the deployment check";
850
+ readonly sourceOff: "Off";
851
+ readonly feishuCliUnset: "The Source is on, and its bot lark-cli is not set";
852
+ readonly feishuBotMissing: "Waiting for the Feishu bot";
853
+ readonly pollFailures: "{count} consecutive failed polls; last: {error}";
854
+ };
855
+ type HealthCode = keyof typeof HEALTH_TEXT;
856
+ type Health = {
857
+ state: 'starting' | 'ready' | 'paused' | 'error';
858
+ detail: string;
859
+ at?: string;
860
+ code?: HealthCode;
861
+ values?: Record<string, string>;
862
+ };
863
+ interface SourceHost {
864
+ readonly sources: SourceRegistry;
865
+ /** Returns the context for one Source kind; its `report` writes only the health entries declared by the kind. */
866
+ context(kind: {
867
+ kind: string;
868
+ health: readonly string[];
869
+ }): SourceContext;
870
+ }
871
+ /** Display label, URL, and facts (`null` removes a fact) that a Source publishes on a Thread. */
872
+ interface ThreadDescription {
873
+ label?: string;
874
+ url?: string;
875
+ facts?: Record<string, ThreadFact | null>;
876
+ }
877
+ /** Application capabilities exposed to a Source kind for reading state, ingesting triggers, managing threads/tickets, and reporting health. */
878
+ interface SourceContext {
879
+ readonly deployment: Deployment;
880
+ readonly commands: Commands;
881
+ readonly ready: Promise<void>;
882
+ /** True once setup resolved the repository and accounts; Sources poll only then. */
883
+ configured(): boolean;
884
+ /** Setup problem keeping this Source's account from running; only the Feishu bot check reports one. */
885
+ readonly problem?: SetupProblem | undefined;
886
+ /** Returns a Source's configuration while enabled, or undefined while disabled or uninstalled. */
887
+ config<C extends Record<string, unknown>>(kind: string): C | undefined;
888
+ /** Ingests a trigger into the Engine and schedules the next evaluation pass; callers should await completion before advancing read cursors. */
889
+ receive(trigger: Trigger): ReceiveResult | Promise<ReceiveResult>;
890
+ atomic<T>(work: () => T): T;
891
+ /** Source-scoped KV records (such as read cursors); setting `undefined` removes an entry. */
892
+ state: {
893
+ get<V>(key: Key<V>): V | undefined;
894
+ set<V>(key: Key<V>, value: V | undefined): void;
895
+ keys<V>(family: Family<V, never>): Key<V>[];
896
+ };
897
+ threads: {
898
+ get(key: string): Thread | undefined;
899
+ subscribed(source: string): Thread[];
900
+ describe(key: string, description: ThreadDescription): void;
901
+ /** Sets or removes (`undefined`) keys in a Thread's `meta` after rereading it; a missing Thread is left alone. */
902
+ patch(key: string, meta: Record<string, unknown>): void;
903
+ };
904
+ tickets: {
905
+ get(id: string): Ticket | undefined;
906
+ /** Open tickets, newest first. */
907
+ open(): Ticket[];
908
+ /** Binds an open ticket to follow a Source Thread (`own` when opened by the ticket) so the Thread's close, not a ready report, ends the ticket. */
909
+ bindThread(id: string, thread: ThreadRef, own: boolean): void;
910
+ /** Reports that a followed Thread closed at `at`; each open ticket following it ends once no `own` Thread remains open and no resumed work is still running. */
911
+ threadClosed(thread: ThreadRef, outcome: 'merged' | 'closed', at: string): void;
912
+ };
913
+ triggers: {
914
+ get(id: string): Trigger | undefined; /** The newest Trigger on a Thread. */
915
+ latest(thread: string): Trigger | undefined;
916
+ };
917
+ notify(message: OutboundMessage): void;
918
+ /** Reports the state of one of this kind's declared health entries; throws for undeclared entry names. */
919
+ report(entry: string, health: Health): void;
920
+ }
921
+ //#endregion
922
+ //#region src/sources/kind.d.ts
923
+ interface Localized {
924
+ zh: string;
925
+ en: string;
926
+ }
927
+ /** `advanced` folds a rarely changed field (such as a polling tunable) behind the card's Advanced section. */
928
+ interface FieldBase {
929
+ key: string;
930
+ label: Localized;
931
+ hint?: Localized;
932
+ advanced?: true;
933
+ }
934
+ /**
935
+ * Configuration field specification; `rows` edits a list of records keyed by its first column, `choose` picks from
936
+ * resolved source labels, and `fact` displays a read-only value from `facts`.
937
+ */
938
+ type FieldSpec = FieldBase & {
939
+ type: 'switch';
940
+ } | FieldBase & {
941
+ type: 'select';
942
+ options: {
943
+ value: string;
944
+ label: Localized;
945
+ }[];
946
+ } | FieldBase & {
947
+ type: 'number';
948
+ min: number;
949
+ max: number;
950
+ } | FieldBase & {
951
+ type: 'text';
952
+ pattern?: string;
953
+ readonly?: boolean;
954
+ choose?: Localized;
955
+ } | FieldBase & {
956
+ type: 'fact';
957
+ settings?: 'deployment';
958
+ } | FieldBase & {
959
+ type: 'rows';
960
+ columns: ({
961
+ key: string;
962
+ label: Localized;
963
+ type: 'text';
964
+ pattern?: string;
965
+ optional?: boolean;
966
+ choose?: Localized;
967
+ refresh?: Localized;
968
+ } | {
969
+ key: string;
970
+ label: Localized;
971
+ type: 'select';
972
+ options: {
973
+ value: string;
974
+ label: Localized;
975
+ }[];
976
+ })[];
977
+ };
978
+ interface VariableSpec {
979
+ key: string;
980
+ description: Localized;
981
+ }
982
+ interface EnvironmentInput<C> {
983
+ deployment: Deployment;
984
+ config: C;
985
+ trigger?: Trigger;
986
+ }
987
+ interface AdmissionRowView {
988
+ id: string;
989
+ label: Localized | string;
990
+ note: Localized;
991
+ cells: {
992
+ listedUnaddressed: boolean;
993
+ unlistedAddressed: boolean;
994
+ unlistedUnaddressed: boolean;
995
+ };
996
+ }
997
+ /** Policy extension for a source kind, defining allowed senders, admission table rows, and optional external roster sync. */
998
+ interface SourcePolicyPart<P extends Record<string, unknown>> {
999
+ /** Validates the Source's part of the Policy, including `allowed` (senders who may originate work). */
1000
+ schema: z.ZodType<P>;
1001
+ /** Form fields of the policy part; the first is `allowed`. */
1002
+ fields: FieldSpec[];
1003
+ /** Describes what the Source marks as addressed to the agent, which an allowed sender's explicit request requires. */
1004
+ explicit: Localized;
1005
+ /** Fallback display labels for unlisted human or bot senders when raw sender IDs are not human-readable. */
1006
+ unnamed?: {
1007
+ person: Localized;
1008
+ bot: Localized;
1009
+ };
1010
+ /** Receiving scopes of the Policy's admission table under `config` (matching `scope().row`); kinds without `rows` use the table's defaults. */
1011
+ rows?(config: Record<string, unknown>): AdmissionRowView[];
1012
+ /** Optional external roster sync (such as chat members); `ready` reports whether `part` names a target to refresh from. */
1013
+ sync?: {
1014
+ label: Localized;
1015
+ ready(part: P): boolean;
1016
+ run(host: SourceHost, part: P, signal: AbortSignal): Promise<P>;
1017
+ };
1018
+ }
1019
+ /** UI link for a channel address; `triggerId` names the Trigger whose own deep link is preferred when available. */
1020
+ interface ChannelLink {
1021
+ url: string;
1022
+ label: Localized;
1023
+ triggerId?: string;
1024
+ }
1025
+ type ChannelLinks = Partial<Pick<Deployment, 'repository' | 'feishu'>>;
1026
+ /** Outbound messaging adapter for a source kind's threads. */
1027
+ interface SourceChannel<C> {
1028
+ /** Whether a reply may still go to `address`; without it, every address may receive replies. */
1029
+ allowed?(address: Record<string, string>, config: C): boolean;
1030
+ /**
1031
+ * Sends a message idempotently by ID; returns `'gone'` when the target conversation no longer accepts replies.
1032
+ * @throws when delivery failed but may succeed on a later retry.
1033
+ */
1034
+ send(host: Pick<SourceContext, 'commands'>, message: OutboundMessage): Promise<'sent' | 'gone'>;
1035
+ /** Returns the URL and label for `address`; `url` is empty when `links` lack the required deployment info. */
1036
+ link(address: Record<string, string>, links: ChannelLinks): ChannelLink;
1037
+ }
1038
+ /** Normalized message returned by thread context readers; `bot` marks a non-human sender whose message can never authorize work on its own (at most an inferred candidate). */
1039
+ interface ContextMessage {
1040
+ id: string;
1041
+ from: string;
1042
+ at: string;
1043
+ text: string;
1044
+ bot?: true;
1045
+ deleted?: true;
1046
+ reply_to?: string;
1047
+ url?: string;
1048
+ path?: string;
1049
+ line?: number;
1050
+ }
1051
+ type ContextPartName = 'thread' | 'root' | 'parent';
1052
+ interface ContextPart {
1053
+ messages: ContextMessage[];
1054
+ next?: string | undefined;
1055
+ body: Record<string, unknown>;
1056
+ status?: string;
1057
+ }
1058
+ /** Bounded thread context reader used by assessments to inspect messages and images around a trigger. */
1059
+ interface ThreadContext<C> {
1060
+ /** The ID of the Trigger's own message among the messages of its Thread. */
1061
+ messageId(trigger: Trigger): string;
1062
+ /** Reads a page of thread messages (`thread`, first page when `cursor` is omitted), the topic root (`root`), or the replied-to message (`parent`). */
1063
+ read(commands: Commands, trigger: Trigger, part: ContextPartName, cursor: string | undefined, config: C): Promise<ContextPart>;
1064
+ /** Extracts image keys from message text that `image` can read; omitted for kinds without image support. */
1065
+ images?(text: string): string[];
1066
+ /** Reads one image of a message in the Trigger's Thread as an attachment for `agent`. */
1067
+ image?(agent: Agent, commands: Commands, trigger: Trigger, message: {
1068
+ id: string;
1069
+ text: string;
1070
+ }, key: string, stateDir: string, signal: AbortSignal): Promise<unknown>;
1071
+ }
1072
+ interface TriggerContext {
1073
+ readonly messageId: string;
1074
+ read(commands: Commands, part: ContextPartName, cursor?: string): Promise<ContextPart>;
1075
+ images(text: string): string[];
1076
+ /** @throws for a kind without image support. */
1077
+ image(agent: Agent, commands: Commands, message: {
1078
+ id: string;
1079
+ text: string;
1080
+ }, key: string, stateDir: string, signal: AbortSignal): Promise<unknown>;
1081
+ }
1082
+ /** Pluggable source kind descriptor registered with SourceRegistry. */
1083
+ interface SourceKind<C extends Record<string, unknown> = Record<string, unknown>> {
1084
+ /** Stable ID; a default instance with the same ID exists when none is stored. */
1085
+ kind: string;
1086
+ title: Localized;
1087
+ description: Localized;
1088
+ /** Read-only status facts derived from `deployment` (undefined while waiting for setup), keyed by field key. */
1089
+ facts?(deployment: Deployment | undefined): Record<string, Localized | string>;
1090
+ /** Validates stored and submitted configuration and fills defaults. */
1091
+ schema: z.ZodType<C>;
1092
+ fields: FieldSpec[];
1093
+ /** Health entry names owned by this kind under `health[...]`; no other kind or core loop may report them. */
1094
+ health: string[];
1095
+ /** Listening rule for a trigger (or recorded Mandate basis) of this kind; kinds without `scope` listen to everything they produce and observe none of it. */
1096
+ scope?(input: {
1097
+ meta: Record<string, unknown>;
1098
+ }, config: C): ScopeResult;
1099
+ /** Outbound reply adapter; kinds without `channel` produce no replies or channel checks. */
1100
+ channel?: SourceChannel<C>;
1101
+ /** Bounded context reader for assessments; assessments of a kind without `threadContext` read none. */
1102
+ threadContext?: ThreadContext<C>;
1103
+ /** Maps a search query to candidate Thread keys (such as `github:12`) and Trigger search terms (such as a Feishu `om_` ID). */
1104
+ find?(query: string): {
1105
+ threads: string[];
1106
+ terms: string[];
1107
+ };
1108
+ /** Returns the ID of the Trigger whose message this Trigger replies to, when derivable without a network read. */
1109
+ repliesTo?(trigger: Trigger): string | undefined;
1110
+ /** Policy section for kinds whose senders have their own identity. */
1111
+ policy?: SourcePolicyPart<Record<string, unknown> & {
1112
+ allowed: {
1113
+ id: string;
1114
+ name?: string;
1115
+ }[];
1116
+ }>;
1117
+ /** Rereads display names for row keys (such as chat names), stores the resolved names in `KV.sources.labels(kind)`, and returns them. */
1118
+ refreshLabels?(host: SourceHost, signal?: AbortSignal): Promise<Record<string, string>>;
1119
+ /** Variables the kind registers with the execution environment and how their values are computed. */
1120
+ environment?: {
1121
+ variables: readonly VariableSpec[];
1122
+ values(input: EnvironmentInput<C>): Record<string, string>;
1123
+ };
1124
+ }
1125
+ interface SourceInstance<C extends Record<string, unknown> = Record<string, unknown>> {
1126
+ id: string;
1127
+ kind: string;
1128
+ enabled: boolean;
1129
+ config: C;
1130
+ }
1131
+ //#endregion
1132
+ //#region src/sources/registry.d.ts
1133
+ /**
1134
+ * Manages registered SourceKind plugins, validates their instance and policy configurations, and implements SourceScope for the Engine.
1135
+ * Claims each registered kind's health entries on HealthBoard and mediates access to source channels, links, environment variables, and thread context readers for Runtime, Settings, Outbox, and MasterAssessor.
1136
+ */
1137
+ declare class SourceRegistry implements SourceScope {
1138
+ private readonly settings;
1139
+ private readonly board;
1140
+ private readonly registered;
1141
+ private readonly kinds;
1142
+ private readonly health;
1143
+ constructor(settings: () => Settings, board?: Pick<HealthBoard, 'claim'>, registered?: (kind: SourceKind) => () => void);
1144
+ /** Registers a SourceKind, claims its health entries on HealthBoard (rejecting `sync:` prefixes owned by Settings), and returns an unregister disposer. */
1145
+ register<C extends Record<string, unknown>>(kind: SourceKind<C>): () => void;
1146
+ /**
1147
+ * Returns the active health entries for `names`. A Source context writes through the entries it received when built,
1148
+ * so reports sent after that registration ended do nothing even if the kind registers again.
1149
+ */
1150
+ healthEntries(names: readonly string[]): Map<string, HealthEntry>;
1151
+ kind(id: string): SourceKind | undefined;
1152
+ /** Every registered kind's instance ordered by ID, followed by stored instances whose kind is not installed (with their config kept as stored). */
1153
+ instances(settings?: {
1154
+ paused: boolean;
1155
+ sources: Record<string, {
1156
+ enabled: boolean;
1157
+ config: Record<string, unknown>;
1158
+ }>;
1159
+ policy: {
1160
+ rules: {
1161
+ id: string;
1162
+ name: string;
1163
+ enabled: boolean;
1164
+ instruction: string;
1165
+ }[];
1166
+ sources: Record<string, {
1167
+ [x: string]: unknown;
1168
+ allowed: {
1169
+ id: string;
1170
+ name?: string | undefined;
1171
+ }[];
1172
+ admission: Record<string, AdmissionRow>;
1173
+ }>;
1174
+ };
1175
+ eval: {
1176
+ mode: "off" | "observe" | "auto";
1177
+ timeoutSeconds: number;
1178
+ model: {
1179
+ provider: string;
1180
+ model: string;
1181
+ reasoningEffort?: string | undefined;
1182
+ } | null;
1183
+ };
1184
+ executor: {
1185
+ model: {
1186
+ provider: string;
1187
+ model: string;
1188
+ reasoningEffort?: string | undefined;
1189
+ } | null;
1190
+ maxWorkers: number;
1191
+ directory: string;
1192
+ prepare: string;
1193
+ blockedCommands: string[];
1194
+ };
1195
+ }): (SourceInstance & {
1196
+ installed: boolean;
1197
+ })[];
1198
+ instance<C extends Record<string, unknown>>(id: string, settings?: {
1199
+ paused: boolean;
1200
+ sources: Record<string, {
1201
+ enabled: boolean;
1202
+ config: Record<string, unknown>;
1203
+ }>;
1204
+ policy: {
1205
+ rules: {
1206
+ id: string;
1207
+ name: string;
1208
+ enabled: boolean;
1209
+ instruction: string;
1210
+ }[];
1211
+ sources: Record<string, {
1212
+ [x: string]: unknown;
1213
+ allowed: {
1214
+ id: string;
1215
+ name?: string | undefined;
1216
+ }[];
1217
+ admission: Record<string, AdmissionRow>;
1218
+ }>;
1219
+ };
1220
+ eval: {
1221
+ mode: "off" | "observe" | "auto";
1222
+ timeoutSeconds: number;
1223
+ model: {
1224
+ provider: string;
1225
+ model: string;
1226
+ reasoningEffort?: string | undefined;
1227
+ } | null;
1228
+ };
1229
+ executor: {
1230
+ model: {
1231
+ provider: string;
1232
+ model: string;
1233
+ reasoningEffort?: string | undefined;
1234
+ } | null;
1235
+ maxWorkers: number;
1236
+ directory: string;
1237
+ prepare: string;
1238
+ blockedCommands: string[];
1239
+ };
1240
+ }): SourceInstance<C> | undefined;
1241
+ validate(id: string, value: {
1242
+ enabled: boolean;
1243
+ config: unknown;
1244
+ }): {
1245
+ enabled: boolean;
1246
+ config: Record<string, unknown>;
1247
+ };
1248
+ /** Validates each Source's part of a submitted Policy against its kind; policy parts for uninstalled Source kinds are kept as stored. */
1249
+ validatePolicy(parts: Record<string, Record<string, unknown>>): Record<string, Record<string, unknown> & {
1250
+ allowed: {
1251
+ id: string;
1252
+ name?: string;
1253
+ }[];
1254
+ }>;
1255
+ policyPart(id: string, settings?: {
1256
+ paused: boolean;
1257
+ sources: Record<string, {
1258
+ enabled: boolean;
1259
+ config: Record<string, unknown>;
1260
+ }>;
1261
+ policy: {
1262
+ rules: {
1263
+ id: string;
1264
+ name: string;
1265
+ enabled: boolean;
1266
+ instruction: string;
1267
+ }[];
1268
+ sources: Record<string, {
1269
+ [x: string]: unknown;
1270
+ allowed: {
1271
+ id: string;
1272
+ name?: string | undefined;
1273
+ }[];
1274
+ admission: Record<string, AdmissionRow>;
1275
+ }>;
1276
+ };
1277
+ eval: {
1278
+ mode: "off" | "observe" | "auto";
1279
+ timeoutSeconds: number;
1280
+ model: {
1281
+ provider: string;
1282
+ model: string;
1283
+ reasoningEffort?: string | undefined;
1284
+ } | null;
1285
+ };
1286
+ executor: {
1287
+ model: {
1288
+ provider: string;
1289
+ model: string;
1290
+ reasoningEffort?: string | undefined;
1291
+ } | null;
1292
+ maxWorkers: number;
1293
+ directory: string;
1294
+ prepare: string;
1295
+ blockedCommands: string[];
1296
+ };
1297
+ }): {
1298
+ admission: Record<string, AdmissionRow>;
1299
+ allowed: {
1300
+ id: string;
1301
+ name?: string;
1302
+ }[];
1303
+ } | undefined;
1304
+ channelAllowed(channel: {
1305
+ source: string;
1306
+ address: Record<string, string>;
1307
+ }, settings?: {
1308
+ paused: boolean;
1309
+ sources: Record<string, {
1310
+ enabled: boolean;
1311
+ config: Record<string, unknown>;
1312
+ }>;
1313
+ policy: {
1314
+ rules: {
1315
+ id: string;
1316
+ name: string;
1317
+ enabled: boolean;
1318
+ instruction: string;
1319
+ }[];
1320
+ sources: Record<string, {
1321
+ [x: string]: unknown;
1322
+ allowed: {
1323
+ id: string;
1324
+ name?: string | undefined;
1325
+ }[];
1326
+ admission: Record<string, AdmissionRow>;
1327
+ }>;
1328
+ };
1329
+ eval: {
1330
+ mode: "off" | "observe" | "auto";
1331
+ timeoutSeconds: number;
1332
+ model: {
1333
+ provider: string;
1334
+ model: string;
1335
+ reasoningEffort?: string | undefined;
1336
+ } | null;
1337
+ };
1338
+ executor: {
1339
+ model: {
1340
+ provider: string;
1341
+ model: string;
1342
+ reasoningEffort?: string | undefined;
1343
+ } | null;
1344
+ maxWorkers: number;
1345
+ directory: string;
1346
+ prepare: string;
1347
+ blockedCommands: string[];
1348
+ };
1349
+ }): boolean;
1350
+ /** Environment variable declarations for every installed kind, whether enabled or disabled. */
1351
+ declarations(): {
1352
+ kind: string;
1353
+ variables: readonly VariableSpec[];
1354
+ }[];
1355
+ environments(settings?: {
1356
+ paused: boolean;
1357
+ sources: Record<string, {
1358
+ enabled: boolean;
1359
+ config: Record<string, unknown>;
1360
+ }>;
1361
+ policy: {
1362
+ rules: {
1363
+ id: string;
1364
+ name: string;
1365
+ enabled: boolean;
1366
+ instruction: string;
1367
+ }[];
1368
+ sources: Record<string, {
1369
+ [x: string]: unknown;
1370
+ allowed: {
1371
+ id: string;
1372
+ name?: string | undefined;
1373
+ }[];
1374
+ admission: Record<string, AdmissionRow>;
1375
+ }>;
1376
+ };
1377
+ eval: {
1378
+ mode: "off" | "observe" | "auto";
1379
+ timeoutSeconds: number;
1380
+ model: {
1381
+ provider: string;
1382
+ model: string;
1383
+ reasoningEffort?: string | undefined;
1384
+ } | null;
1385
+ };
1386
+ executor: {
1387
+ model: {
1388
+ provider: string;
1389
+ model: string;
1390
+ reasoningEffort?: string | undefined;
1391
+ } | null;
1392
+ maxWorkers: number;
1393
+ directory: string;
1394
+ prepare: string;
1395
+ blockedCommands: string[];
1396
+ };
1397
+ }): {
1398
+ kind: SourceKind<Record<string, unknown>>;
1399
+ environment: {
1400
+ variables: readonly VariableSpec[];
1401
+ values(input: EnvironmentInput<Record<string, unknown>>): Record<string, string>;
1402
+ };
1403
+ config: Record<string, unknown>;
1404
+ }[];
1405
+ /**
1406
+ * Sends a message idempotently through its Channel's kind; returns `'waiting'` while the kind is not installed, or
1407
+ * `'gone'` when the target (or a kind without channels) can never receive it.
1408
+ */
1409
+ send(message: OutboundMessage, commands: Commands): Promise<'sent' | 'gone' | 'waiting'>;
1410
+ link(channel: ChannelRef, links: ChannelLinks): ChannelLink;
1411
+ find(query: string): {
1412
+ threads: string[];
1413
+ terms: string[];
1414
+ };
1415
+ repliesTo(trigger: Trigger): string | undefined;
1416
+ threadContext(trigger: Trigger, settings?: {
1417
+ paused: boolean;
1418
+ sources: Record<string, {
1419
+ enabled: boolean;
1420
+ config: Record<string, unknown>;
1421
+ }>;
1422
+ policy: {
1423
+ rules: {
1424
+ id: string;
1425
+ name: string;
1426
+ enabled: boolean;
1427
+ instruction: string;
1428
+ }[];
1429
+ sources: Record<string, {
1430
+ [x: string]: unknown;
1431
+ allowed: {
1432
+ id: string;
1433
+ name?: string | undefined;
1434
+ }[];
1435
+ admission: Record<string, AdmissionRow>;
1436
+ }>;
1437
+ };
1438
+ eval: {
1439
+ mode: "off" | "observe" | "auto";
1440
+ timeoutSeconds: number;
1441
+ model: {
1442
+ provider: string;
1443
+ model: string;
1444
+ reasoningEffort?: string | undefined;
1445
+ } | null;
1446
+ };
1447
+ executor: {
1448
+ model: {
1449
+ provider: string;
1450
+ model: string;
1451
+ reasoningEffort?: string | undefined;
1452
+ } | null;
1453
+ maxWorkers: number;
1454
+ directory: string;
1455
+ prepare: string;
1456
+ blockedCommands: string[];
1457
+ };
1458
+ }): TriggerContext | undefined;
1459
+ scope(input: {
1460
+ source: string;
1461
+ meta: Record<string, unknown>;
1462
+ }, settings?: {
1463
+ paused: boolean;
1464
+ sources: Record<string, {
1465
+ enabled: boolean;
1466
+ config: Record<string, unknown>;
1467
+ }>;
1468
+ policy: {
1469
+ rules: {
1470
+ id: string;
1471
+ name: string;
1472
+ enabled: boolean;
1473
+ instruction: string;
1474
+ }[];
1475
+ sources: Record<string, {
1476
+ [x: string]: unknown;
1477
+ allowed: {
1478
+ id: string;
1479
+ name?: string | undefined;
1480
+ }[];
1481
+ admission: Record<string, AdmissionRow>;
1482
+ }>;
1483
+ };
1484
+ eval: {
1485
+ mode: "off" | "observe" | "auto";
1486
+ timeoutSeconds: number;
1487
+ model: {
1488
+ provider: string;
1489
+ model: string;
1490
+ reasoningEffort?: string | undefined;
1491
+ } | null;
1492
+ };
1493
+ executor: {
1494
+ model: {
1495
+ provider: string;
1496
+ model: string;
1497
+ reasoningEffort?: string | undefined;
1498
+ } | null;
1499
+ maxWorkers: number;
1500
+ directory: string;
1501
+ prepare: string;
1502
+ blockedCommands: string[];
1503
+ };
1504
+ }): ScopeResult;
1505
+ /** Falls back to schema defaults and disables the instance when stored configuration fails validation. */
1506
+ private resolve;
1507
+ }
1508
+ //#endregion
1509
+ export { SettingsOrigin as A, Store as C, RoleModel as D, Variable as E, Commands as M, Tally as N, Settings as O, Effects as S, HealthEntry as T, pollTicketPulls as _, Health as a, Prompts as b, GithubConfig as c, githubKind as d, inject as f, pollThreads as g, pollRound as h, TriggerContext as i, SetupProblem as j, SettingsBlock as k, Retry as l, pollFailure as m, ChannelLink as n, SourceContext as o, name as p, SourceKind as r, SourceHost as s, SourceRegistry as t, apply as u, GithubComment as v, HealthBoard as w, Sessions as x, commentTrigger as y };