dp-worker 0.1.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 (933) hide show
  1. package/builtin-skills/sourcepool.md +228 -0
  2. package/builtin-skills/x.md +263 -0
  3. package/config.example.json +37 -0
  4. package/dist/agent/agent-types.d.ts +44 -0
  5. package/dist/agent/agent-types.js +23 -0
  6. package/dist/agent/agent-types.js.map +1 -0
  7. package/dist/agent/agent.d.ts +162 -0
  8. package/dist/agent/agent.js +670 -0
  9. package/dist/agent/agent.js.map +1 -0
  10. package/dist/agent/browser-lock.d.ts +36 -0
  11. package/dist/agent/browser-lock.js +46 -0
  12. package/dist/agent/browser-lock.js.map +1 -0
  13. package/dist/agent/chat-engine.d.ts +87 -0
  14. package/dist/agent/chat-engine.js +588 -0
  15. package/dist/agent/chat-engine.js.map +1 -0
  16. package/dist/agent/chrome-watchdog.d.ts +74 -0
  17. package/dist/agent/chrome-watchdog.js +136 -0
  18. package/dist/agent/chrome-watchdog.js.map +1 -0
  19. package/dist/agent/context.d.ts +148 -0
  20. package/dist/agent/context.js +521 -0
  21. package/dist/agent/context.js.map +1 -0
  22. package/dist/agent/duration.d.ts +2 -0
  23. package/dist/agent/duration.js +15 -0
  24. package/dist/agent/duration.js.map +1 -0
  25. package/dist/agent/executors/attachment-executor.d.ts +19 -0
  26. package/dist/agent/executors/attachment-executor.js +136 -0
  27. package/dist/agent/executors/attachment-executor.js.map +1 -0
  28. package/dist/agent/executors/memory-executor.d.ts +2 -0
  29. package/dist/agent/executors/memory-executor.js +13 -0
  30. package/dist/agent/executors/memory-executor.js.map +1 -0
  31. package/dist/agent/executors/org-executor.d.ts +8 -0
  32. package/dist/agent/executors/org-executor.js +47 -0
  33. package/dist/agent/executors/org-executor.js.map +1 -0
  34. package/dist/agent/executors/scheduler-executor.d.ts +21 -0
  35. package/dist/agent/executors/scheduler-executor.js +75 -0
  36. package/dist/agent/executors/scheduler-executor.js.map +1 -0
  37. package/dist/agent/executors/skill-executor.d.ts +10 -0
  38. package/dist/agent/executors/skill-executor.js +178 -0
  39. package/dist/agent/executors/skill-executor.js.map +1 -0
  40. package/dist/agent/executors/store-executor.d.ts +2 -0
  41. package/dist/agent/executors/store-executor.js +42 -0
  42. package/dist/agent/executors/store-executor.js.map +1 -0
  43. package/dist/agent/executors/web-fetch-executor.d.ts +17 -0
  44. package/dist/agent/executors/web-fetch-executor.js +164 -0
  45. package/dist/agent/executors/web-fetch-executor.js.map +1 -0
  46. package/dist/agent/frontend-multiplexer.d.ts +38 -0
  47. package/dist/agent/frontend-multiplexer.js +67 -0
  48. package/dist/agent/frontend-multiplexer.js.map +1 -0
  49. package/dist/agent/image-generator.d.ts +35 -0
  50. package/dist/agent/image-generator.js +266 -0
  51. package/dist/agent/image-generator.js.map +1 -0
  52. package/dist/agent/image-postprocess.d.ts +25 -0
  53. package/dist/agent/image-postprocess.js +82 -0
  54. package/dist/agent/image-postprocess.js.map +1 -0
  55. package/dist/agent/memory.d.ts +55 -0
  56. package/dist/agent/memory.js +401 -0
  57. package/dist/agent/memory.js.map +1 -0
  58. package/dist/agent/org-manager.d.ts +70 -0
  59. package/dist/agent/org-manager.js +280 -0
  60. package/dist/agent/org-manager.js.map +1 -0
  61. package/dist/agent/scheduler.d.ts +51 -0
  62. package/dist/agent/scheduler.js +302 -0
  63. package/dist/agent/scheduler.js.map +1 -0
  64. package/dist/agent/skill-generator.d.ts +116 -0
  65. package/dist/agent/skill-generator.js +704 -0
  66. package/dist/agent/skill-generator.js.map +1 -0
  67. package/dist/agent/storage-policy.d.ts +55 -0
  68. package/dist/agent/storage-policy.js +406 -0
  69. package/dist/agent/storage-policy.js.map +1 -0
  70. package/dist/agent/store.d.ts +58 -0
  71. package/dist/agent/store.js +309 -0
  72. package/dist/agent/store.js.map +1 -0
  73. package/dist/agent/task-runner.d.ts +34 -0
  74. package/dist/agent/task-runner.js +705 -0
  75. package/dist/agent/task-runner.js.map +1 -0
  76. package/dist/agent/tool-loop-detection.d.ts +60 -0
  77. package/dist/agent/tool-loop-detection.js +233 -0
  78. package/dist/agent/tool-loop-detection.js.map +1 -0
  79. package/dist/agent/tool-runner.d.ts +37 -0
  80. package/dist/agent/tool-runner.js +72 -0
  81. package/dist/agent/tool-runner.js.map +1 -0
  82. package/dist/browser/actions.d.ts +217 -0
  83. package/dist/browser/actions.js +3097 -0
  84. package/dist/browser/actions.js.map +1 -0
  85. package/dist/browser/builtin-page-cleanups.d.ts +19 -0
  86. package/dist/browser/builtin-page-cleanups.js +111 -0
  87. package/dist/browser/builtin-page-cleanups.js.map +1 -0
  88. package/dist/browser/chrome-process.d.ts +55 -0
  89. package/dist/browser/chrome-process.js +288 -0
  90. package/dist/browser/chrome-process.js.map +1 -0
  91. package/dist/browser/dispatch.d.ts +32 -0
  92. package/dist/browser/dispatch.js +582 -0
  93. package/dist/browser/dispatch.js.map +1 -0
  94. package/dist/browser/dom-helpers.d.ts +68 -0
  95. package/dist/browser/dom-helpers.js +477 -0
  96. package/dist/browser/dom-helpers.js.map +1 -0
  97. package/dist/browser/expect.d.ts +66 -0
  98. package/dist/browser/expect.js +314 -0
  99. package/dist/browser/expect.js.map +1 -0
  100. package/dist/browser/humanize.d.ts +56 -0
  101. package/dist/browser/humanize.js +216 -0
  102. package/dist/browser/humanize.js.map +1 -0
  103. package/dist/browser/locator-resolver.d.ts +88 -0
  104. package/dist/browser/locator-resolver.js +302 -0
  105. package/dist/browser/locator-resolver.js.map +1 -0
  106. package/dist/browser/manager.d.ts +95 -0
  107. package/dist/browser/manager.js +389 -0
  108. package/dist/browser/manager.js.map +1 -0
  109. package/dist/browser/script-runner.d.ts +117 -0
  110. package/dist/browser/script-runner.js +305 -0
  111. package/dist/browser/script-runner.js.map +1 -0
  112. package/dist/browser/selectors.d.ts +41 -0
  113. package/dist/browser/selectors.js +165 -0
  114. package/dist/browser/selectors.js.map +1 -0
  115. package/dist/browser/snapshot.d.ts +129 -0
  116. package/dist/browser/snapshot.js +504 -0
  117. package/dist/browser/snapshot.js.map +1 -0
  118. package/dist/browser/workspace-lock.d.ts +37 -0
  119. package/dist/browser/workspace-lock.js +286 -0
  120. package/dist/browser/workspace-lock.js.map +1 -0
  121. package/dist/center/center-client.d.ts +124 -0
  122. package/dist/center/center-client.js +316 -0
  123. package/dist/center/center-client.js.map +1 -0
  124. package/dist/center/center-frontend.d.ts +92 -0
  125. package/dist/center/center-frontend.js +459 -0
  126. package/dist/center/center-frontend.js.map +1 -0
  127. package/dist/center/session-sync.d.ts +85 -0
  128. package/dist/center/session-sync.js +345 -0
  129. package/dist/center/session-sync.js.map +1 -0
  130. package/dist/config/center-config.d.ts +60 -0
  131. package/dist/config/center-config.js +92 -0
  132. package/dist/config/center-config.js.map +1 -0
  133. package/dist/config/types.d.ts +93 -0
  134. package/dist/config/types.js +136 -0
  135. package/dist/config/types.js.map +1 -0
  136. package/dist/index.d.ts +2 -0
  137. package/dist/index.js +395 -0
  138. package/dist/index.js.map +1 -0
  139. package/dist/llm/client.d.ts +24 -0
  140. package/dist/llm/client.js +696 -0
  141. package/dist/llm/client.js.map +1 -0
  142. package/dist/llm/message-optimizer.d.ts +50 -0
  143. package/dist/llm/message-optimizer.js +337 -0
  144. package/dist/llm/message-optimizer.js.map +1 -0
  145. package/dist/llm/tools.d.ts +37 -0
  146. package/dist/llm/tools.js +895 -0
  147. package/dist/llm/tools.js.map +1 -0
  148. package/dist/llm/types.d.ts +96 -0
  149. package/dist/llm/types.js +2 -0
  150. package/dist/llm/types.js.map +1 -0
  151. package/dist/logging/logger.d.ts +17 -0
  152. package/dist/logging/logger.js +54 -0
  153. package/dist/logging/logger.js.map +1 -0
  154. package/dist/scripts/migrate-history-to-store.d.ts +2 -0
  155. package/dist/scripts/migrate-history-to-store.js +250 -0
  156. package/dist/scripts/migrate-history-to-store.js.map +1 -0
  157. package/dist/telegram/bot.d.ts +28 -0
  158. package/dist/telegram/bot.js +546 -0
  159. package/dist/telegram/bot.js.map +1 -0
  160. package/dist/tui/tui.d.ts +12 -0
  161. package/dist/tui/tui.js +177 -0
  162. package/dist/tui/tui.js.map +1 -0
  163. package/dist/utils/safe-slice.d.ts +25 -0
  164. package/dist/utils/safe-slice.js +43 -0
  165. package/dist/utils/safe-slice.js.map +1 -0
  166. package/node_modules/dp-shared/dist/admin-broadcast.d.ts +26 -0
  167. package/node_modules/dp-shared/dist/admin-broadcast.d.ts.map +1 -0
  168. package/node_modules/dp-shared/dist/admin-broadcast.js +7 -0
  169. package/node_modules/dp-shared/dist/admin-broadcast.js.map +1 -0
  170. package/node_modules/dp-shared/dist/audit-contracts.d.ts +41 -0
  171. package/node_modules/dp-shared/dist/audit-contracts.d.ts.map +1 -0
  172. package/node_modules/dp-shared/dist/audit-contracts.js +30 -0
  173. package/node_modules/dp-shared/dist/audit-contracts.js.map +1 -0
  174. package/node_modules/dp-shared/dist/configs-contracts.d.ts +187 -0
  175. package/node_modules/dp-shared/dist/configs-contracts.d.ts.map +1 -0
  176. package/node_modules/dp-shared/dist/configs-contracts.js +165 -0
  177. package/node_modules/dp-shared/dist/configs-contracts.js.map +1 -0
  178. package/node_modules/dp-shared/dist/db-rows.d.ts +293 -0
  179. package/node_modules/dp-shared/dist/db-rows.d.ts.map +1 -0
  180. package/node_modules/dp-shared/dist/db-rows.js +222 -0
  181. package/node_modules/dp-shared/dist/db-rows.js.map +1 -0
  182. package/node_modules/dp-shared/dist/deploy-contracts.d.ts +34 -0
  183. package/node_modules/dp-shared/dist/deploy-contracts.d.ts.map +1 -0
  184. package/node_modules/dp-shared/dist/deploy-contracts.js +32 -0
  185. package/node_modules/dp-shared/dist/deploy-contracts.js.map +1 -0
  186. package/node_modules/dp-shared/dist/domain.d.ts +144 -0
  187. package/node_modules/dp-shared/dist/domain.d.ts.map +1 -0
  188. package/node_modules/dp-shared/dist/domain.js +81 -0
  189. package/node_modules/dp-shared/dist/domain.js.map +1 -0
  190. package/node_modules/dp-shared/dist/identities.d.ts +35 -0
  191. package/node_modules/dp-shared/dist/identities.d.ts.map +1 -0
  192. package/node_modules/dp-shared/dist/identities.js +27 -0
  193. package/node_modules/dp-shared/dist/identities.js.map +1 -0
  194. package/node_modules/dp-shared/dist/index.d.ts +24 -0
  195. package/node_modules/dp-shared/dist/index.d.ts.map +1 -0
  196. package/node_modules/dp-shared/dist/index.js +24 -0
  197. package/node_modules/dp-shared/dist/index.js.map +1 -0
  198. package/node_modules/dp-shared/dist/rest-contracts.d.ts +459 -0
  199. package/node_modules/dp-shared/dist/rest-contracts.d.ts.map +1 -0
  200. package/node_modules/dp-shared/dist/rest-contracts.js +318 -0
  201. package/node_modules/dp-shared/dist/rest-contracts.js.map +1 -0
  202. package/node_modules/dp-shared/dist/task-history-contracts.d.ts +210 -0
  203. package/node_modules/dp-shared/dist/task-history-contracts.d.ts.map +1 -0
  204. package/node_modules/dp-shared/dist/task-history-contracts.js +99 -0
  205. package/node_modules/dp-shared/dist/task-history-contracts.js.map +1 -0
  206. package/node_modules/dp-shared/dist/worker-detail-contracts.d.ts +212 -0
  207. package/node_modules/dp-shared/dist/worker-detail-contracts.d.ts.map +1 -0
  208. package/node_modules/dp-shared/dist/worker-detail-contracts.js +193 -0
  209. package/node_modules/dp-shared/dist/worker-detail-contracts.js.map +1 -0
  210. package/node_modules/dp-shared/dist/ws-protocol.d.ts +839 -0
  211. package/node_modules/dp-shared/dist/ws-protocol.d.ts.map +1 -0
  212. package/node_modules/dp-shared/dist/ws-protocol.js +264 -0
  213. package/node_modules/dp-shared/dist/ws-protocol.js.map +1 -0
  214. package/node_modules/dp-shared/package.json +31 -0
  215. package/node_modules/zod/LICENSE +21 -0
  216. package/node_modules/zod/README.md +191 -0
  217. package/node_modules/zod/index.cjs +33 -0
  218. package/node_modules/zod/index.d.cts +4 -0
  219. package/node_modules/zod/index.d.ts +4 -0
  220. package/node_modules/zod/index.js +4 -0
  221. package/node_modules/zod/locales/index.cjs +17 -0
  222. package/node_modules/zod/locales/index.d.cts +1 -0
  223. package/node_modules/zod/locales/index.d.ts +1 -0
  224. package/node_modules/zod/locales/index.js +1 -0
  225. package/node_modules/zod/locales/package.json +7 -0
  226. package/node_modules/zod/mini/index.cjs +32 -0
  227. package/node_modules/zod/mini/index.d.cts +3 -0
  228. package/node_modules/zod/mini/index.d.ts +3 -0
  229. package/node_modules/zod/mini/index.js +3 -0
  230. package/node_modules/zod/mini/package.json +7 -0
  231. package/node_modules/zod/package.json +135 -0
  232. package/node_modules/zod/src/index.ts +4 -0
  233. package/node_modules/zod/src/locales/index.ts +1 -0
  234. package/node_modules/zod/src/mini/index.ts +3 -0
  235. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  236. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  237. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  238. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  239. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  240. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  241. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  242. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  243. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  244. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  245. package/node_modules/zod/src/v3/errors.ts +13 -0
  246. package/node_modules/zod/src/v3/external.ts +6 -0
  247. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  248. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  249. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  250. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  251. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  252. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  253. package/node_modules/zod/src/v3/index.ts +4 -0
  254. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  255. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  256. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  257. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  258. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  259. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  260. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  261. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  262. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  263. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  264. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  265. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  266. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  267. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  268. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  269. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  270. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  271. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  272. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  273. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  274. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  275. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  276. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  277. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  278. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  279. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  280. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  281. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  282. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  283. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  284. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  285. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  286. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  287. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  288. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  289. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  290. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  291. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  292. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  293. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  294. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  295. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  296. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  297. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  298. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  299. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  300. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  301. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  302. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  303. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  304. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  305. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  306. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  307. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  308. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  309. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  310. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  311. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  312. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  313. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  314. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  315. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  316. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  317. package/node_modules/zod/src/v3/types.ts +5138 -0
  318. package/node_modules/zod/src/v4/classic/checks.ts +32 -0
  319. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  320. package/node_modules/zod/src/v4/classic/compat.ts +70 -0
  321. package/node_modules/zod/src/v4/classic/errors.ts +82 -0
  322. package/node_modules/zod/src/v4/classic/external.ts +52 -0
  323. package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
  324. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  325. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  326. package/node_modules/zod/src/v4/classic/parse.ts +82 -0
  327. package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
  328. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  329. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
  330. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  331. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
  332. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  333. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  334. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  335. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  336. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  337. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
  338. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  339. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
  340. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
  341. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  342. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  343. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  344. package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
  345. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  346. package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
  347. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  348. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  349. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
  350. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
  351. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  352. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
  353. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  354. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  355. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  356. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  357. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
  358. package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
  359. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  360. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
  361. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
  362. package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
  363. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
  364. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
  365. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
  366. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  367. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  368. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  369. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  370. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  371. package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
  372. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  373. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  374. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  375. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  376. package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
  377. package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
  378. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
  379. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
  380. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  381. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  382. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
  383. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
  384. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  385. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  386. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  387. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  388. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  389. package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
  390. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
  391. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
  392. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  393. package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
  394. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
  395. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  396. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
  397. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
  398. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
  399. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  400. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
  401. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  402. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
  403. package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
  404. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  405. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  406. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  407. package/node_modules/zod/src/v4/core/api.ts +1823 -0
  408. package/node_modules/zod/src/v4/core/checks.ts +1293 -0
  409. package/node_modules/zod/src/v4/core/config.ts +15 -0
  410. package/node_modules/zod/src/v4/core/core.ts +153 -0
  411. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  412. package/node_modules/zod/src/v4/core/errors.ts +455 -0
  413. package/node_modules/zod/src/v4/core/index.ts +16 -0
  414. package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
  415. package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
  416. package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
  417. package/node_modules/zod/src/v4/core/parse.ts +195 -0
  418. package/node_modules/zod/src/v4/core/regexes.ts +190 -0
  419. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  420. package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
  421. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  422. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  423. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  424. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  425. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
  426. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  427. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
  428. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  429. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  430. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  431. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  432. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  433. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  434. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  435. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  436. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  437. package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
  438. package/node_modules/zod/src/v4/core/util.ts +983 -0
  439. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  440. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  441. package/node_modules/zod/src/v4/index.ts +4 -0
  442. package/node_modules/zod/src/v4/locales/ar.ts +115 -0
  443. package/node_modules/zod/src/v4/locales/az.ts +111 -0
  444. package/node_modules/zod/src/v4/locales/be.ts +176 -0
  445. package/node_modules/zod/src/v4/locales/bg.ts +128 -0
  446. package/node_modules/zod/src/v4/locales/ca.ts +116 -0
  447. package/node_modules/zod/src/v4/locales/cs.ts +118 -0
  448. package/node_modules/zod/src/v4/locales/da.ts +123 -0
  449. package/node_modules/zod/src/v4/locales/de.ts +116 -0
  450. package/node_modules/zod/src/v4/locales/el.ts +121 -0
  451. package/node_modules/zod/src/v4/locales/en.ts +123 -0
  452. package/node_modules/zod/src/v4/locales/eo.ts +118 -0
  453. package/node_modules/zod/src/v4/locales/es.ts +141 -0
  454. package/node_modules/zod/src/v4/locales/fa.ts +126 -0
  455. package/node_modules/zod/src/v4/locales/fi.ts +121 -0
  456. package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
  457. package/node_modules/zod/src/v4/locales/fr.ts +132 -0
  458. package/node_modules/zod/src/v4/locales/he.ts +246 -0
  459. package/node_modules/zod/src/v4/locales/hr.ts +131 -0
  460. package/node_modules/zod/src/v4/locales/hu.ts +117 -0
  461. package/node_modules/zod/src/v4/locales/hy.ts +164 -0
  462. package/node_modules/zod/src/v4/locales/id.ts +115 -0
  463. package/node_modules/zod/src/v4/locales/index.ts +52 -0
  464. package/node_modules/zod/src/v4/locales/is.ts +119 -0
  465. package/node_modules/zod/src/v4/locales/it.ts +116 -0
  466. package/node_modules/zod/src/v4/locales/ja.ts +114 -0
  467. package/node_modules/zod/src/v4/locales/ka.ts +123 -0
  468. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  469. package/node_modules/zod/src/v4/locales/km.ts +119 -0
  470. package/node_modules/zod/src/v4/locales/ko.ts +121 -0
  471. package/node_modules/zod/src/v4/locales/lt.ts +239 -0
  472. package/node_modules/zod/src/v4/locales/mk.ts +118 -0
  473. package/node_modules/zod/src/v4/locales/ms.ts +115 -0
  474. package/node_modules/zod/src/v4/locales/nl.ts +121 -0
  475. package/node_modules/zod/src/v4/locales/no.ts +116 -0
  476. package/node_modules/zod/src/v4/locales/ota.ts +117 -0
  477. package/node_modules/zod/src/v4/locales/pl.ts +118 -0
  478. package/node_modules/zod/src/v4/locales/ps.ts +126 -0
  479. package/node_modules/zod/src/v4/locales/pt.ts +116 -0
  480. package/node_modules/zod/src/v4/locales/ro.ts +129 -0
  481. package/node_modules/zod/src/v4/locales/ru.ts +176 -0
  482. package/node_modules/zod/src/v4/locales/sl.ts +118 -0
  483. package/node_modules/zod/src/v4/locales/sv.ts +119 -0
  484. package/node_modules/zod/src/v4/locales/ta.ts +118 -0
  485. package/node_modules/zod/src/v4/locales/th.ts +119 -0
  486. package/node_modules/zod/src/v4/locales/tr.ts +111 -0
  487. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  488. package/node_modules/zod/src/v4/locales/uk.ts +117 -0
  489. package/node_modules/zod/src/v4/locales/ur.ts +119 -0
  490. package/node_modules/zod/src/v4/locales/uz.ts +117 -0
  491. package/node_modules/zod/src/v4/locales/vi.ts +117 -0
  492. package/node_modules/zod/src/v4/locales/yo.ts +124 -0
  493. package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
  494. package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
  495. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  496. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  497. package/node_modules/zod/src/v4/mini/external.ts +41 -0
  498. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  499. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  500. package/node_modules/zod/src/v4/mini/parse.ts +14 -0
  501. package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
  502. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
  503. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  504. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  505. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  506. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
  507. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  508. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  509. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
  510. package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
  511. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  512. package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
  513. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  514. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
  515. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  516. package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
  517. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  518. package/node_modules/zod/v3/ZodError.cjs +138 -0
  519. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  520. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  521. package/node_modules/zod/v3/ZodError.js +133 -0
  522. package/node_modules/zod/v3/errors.cjs +17 -0
  523. package/node_modules/zod/v3/errors.d.cts +5 -0
  524. package/node_modules/zod/v3/errors.d.ts +5 -0
  525. package/node_modules/zod/v3/errors.js +9 -0
  526. package/node_modules/zod/v3/external.cjs +22 -0
  527. package/node_modules/zod/v3/external.d.cts +6 -0
  528. package/node_modules/zod/v3/external.d.ts +6 -0
  529. package/node_modules/zod/v3/external.js +6 -0
  530. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  531. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  532. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  533. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  534. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  535. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  536. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  537. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  538. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  539. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  540. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  541. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  542. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  543. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  544. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  545. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  546. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  547. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  548. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  549. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  550. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  551. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  552. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  553. package/node_modules/zod/v3/helpers/util.js +133 -0
  554. package/node_modules/zod/v3/index.cjs +33 -0
  555. package/node_modules/zod/v3/index.d.cts +4 -0
  556. package/node_modules/zod/v3/index.d.ts +4 -0
  557. package/node_modules/zod/v3/index.js +4 -0
  558. package/node_modules/zod/v3/locales/en.cjs +112 -0
  559. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  560. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  561. package/node_modules/zod/v3/locales/en.js +109 -0
  562. package/node_modules/zod/v3/package.json +7 -0
  563. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  564. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  565. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  566. package/node_modules/zod/v3/standard-schema.js +1 -0
  567. package/node_modules/zod/v3/types.cjs +3777 -0
  568. package/node_modules/zod/v3/types.d.cts +1034 -0
  569. package/node_modules/zod/v3/types.d.ts +1034 -0
  570. package/node_modules/zod/v3/types.js +3695 -0
  571. package/node_modules/zod/v4/classic/checks.cjs +33 -0
  572. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  573. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  574. package/node_modules/zod/v4/classic/checks.js +1 -0
  575. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  576. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  577. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  578. package/node_modules/zod/v4/classic/coerce.js +17 -0
  579. package/node_modules/zod/v4/classic/compat.cjs +61 -0
  580. package/node_modules/zod/v4/classic/compat.d.cts +50 -0
  581. package/node_modules/zod/v4/classic/compat.d.ts +50 -0
  582. package/node_modules/zod/v4/classic/compat.js +31 -0
  583. package/node_modules/zod/v4/classic/errors.cjs +74 -0
  584. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  585. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  586. package/node_modules/zod/v4/classic/errors.js +48 -0
  587. package/node_modules/zod/v4/classic/external.cjs +73 -0
  588. package/node_modules/zod/v4/classic/external.d.cts +16 -0
  589. package/node_modules/zod/v4/classic/external.d.ts +16 -0
  590. package/node_modules/zod/v4/classic/external.js +20 -0
  591. package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
  592. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  593. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  594. package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
  595. package/node_modules/zod/v4/classic/index.cjs +33 -0
  596. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  597. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  598. package/node_modules/zod/v4/classic/index.js +4 -0
  599. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  600. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  601. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  602. package/node_modules/zod/v4/classic/iso.js +30 -0
  603. package/node_modules/zod/v4/classic/package.json +7 -0
  604. package/node_modules/zod/v4/classic/parse.cjs +41 -0
  605. package/node_modules/zod/v4/classic/parse.d.cts +31 -0
  606. package/node_modules/zod/v4/classic/parse.d.ts +31 -0
  607. package/node_modules/zod/v4/classic/parse.js +15 -0
  608. package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
  609. package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
  610. package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
  611. package/node_modules/zod/v4/classic/schemas.js +1395 -0
  612. package/node_modules/zod/v4/core/api.cjs +1227 -0
  613. package/node_modules/zod/v4/core/api.d.cts +325 -0
  614. package/node_modules/zod/v4/core/api.d.ts +325 -0
  615. package/node_modules/zod/v4/core/api.js +1087 -0
  616. package/node_modules/zod/v4/core/checks.cjs +601 -0
  617. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  618. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  619. package/node_modules/zod/v4/core/checks.js +575 -0
  620. package/node_modules/zod/v4/core/core.cjs +85 -0
  621. package/node_modules/zod/v4/core/core.d.cts +70 -0
  622. package/node_modules/zod/v4/core/core.d.ts +70 -0
  623. package/node_modules/zod/v4/core/core.js +78 -0
  624. package/node_modules/zod/v4/core/doc.cjs +39 -0
  625. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  626. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  627. package/node_modules/zod/v4/core/doc.js +35 -0
  628. package/node_modules/zod/v4/core/errors.cjs +216 -0
  629. package/node_modules/zod/v4/core/errors.d.cts +221 -0
  630. package/node_modules/zod/v4/core/errors.d.ts +221 -0
  631. package/node_modules/zod/v4/core/errors.js +185 -0
  632. package/node_modules/zod/v4/core/index.cjs +47 -0
  633. package/node_modules/zod/v4/core/index.d.cts +16 -0
  634. package/node_modules/zod/v4/core/index.d.ts +16 -0
  635. package/node_modules/zod/v4/core/index.js +16 -0
  636. package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
  637. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  638. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  639. package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
  640. package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
  641. package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
  642. package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
  643. package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
  644. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  645. package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
  646. package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
  647. package/node_modules/zod/v4/core/json-schema.js +1 -0
  648. package/node_modules/zod/v4/core/package.json +7 -0
  649. package/node_modules/zod/v4/core/parse.cjs +131 -0
  650. package/node_modules/zod/v4/core/parse.d.cts +49 -0
  651. package/node_modules/zod/v4/core/parse.d.ts +49 -0
  652. package/node_modules/zod/v4/core/parse.js +93 -0
  653. package/node_modules/zod/v4/core/regexes.cjs +172 -0
  654. package/node_modules/zod/v4/core/regexes.d.cts +85 -0
  655. package/node_modules/zod/v4/core/regexes.d.ts +85 -0
  656. package/node_modules/zod/v4/core/regexes.js +139 -0
  657. package/node_modules/zod/v4/core/registries.cjs +56 -0
  658. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  659. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  660. package/node_modules/zod/v4/core/registries.js +51 -0
  661. package/node_modules/zod/v4/core/schemas.cjs +2270 -0
  662. package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
  663. package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
  664. package/node_modules/zod/v4/core/schemas.js +2239 -0
  665. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  666. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  667. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  668. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  669. package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
  670. package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
  671. package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
  672. package/node_modules/zod/v4/core/to-json-schema.js +448 -0
  673. package/node_modules/zod/v4/core/util.cjs +734 -0
  674. package/node_modules/zod/v4/core/util.d.cts +200 -0
  675. package/node_modules/zod/v4/core/util.d.ts +200 -0
  676. package/node_modules/zod/v4/core/util.js +674 -0
  677. package/node_modules/zod/v4/core/versions.cjs +8 -0
  678. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  679. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  680. package/node_modules/zod/v4/core/versions.js +5 -0
  681. package/node_modules/zod/v4/index.cjs +22 -0
  682. package/node_modules/zod/v4/index.d.cts +3 -0
  683. package/node_modules/zod/v4/index.d.ts +3 -0
  684. package/node_modules/zod/v4/index.js +3 -0
  685. package/node_modules/zod/v4/locales/ar.cjs +133 -0
  686. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  687. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  688. package/node_modules/zod/v4/locales/ar.js +106 -0
  689. package/node_modules/zod/v4/locales/az.cjs +132 -0
  690. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  691. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  692. package/node_modules/zod/v4/locales/az.js +105 -0
  693. package/node_modules/zod/v4/locales/be.cjs +183 -0
  694. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  695. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  696. package/node_modules/zod/v4/locales/be.js +156 -0
  697. package/node_modules/zod/v4/locales/bg.cjs +147 -0
  698. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  699. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  700. package/node_modules/zod/v4/locales/bg.js +120 -0
  701. package/node_modules/zod/v4/locales/ca.cjs +134 -0
  702. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  703. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  704. package/node_modules/zod/v4/locales/ca.js +107 -0
  705. package/node_modules/zod/v4/locales/cs.cjs +138 -0
  706. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  707. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  708. package/node_modules/zod/v4/locales/cs.js +111 -0
  709. package/node_modules/zod/v4/locales/da.cjs +142 -0
  710. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  711. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  712. package/node_modules/zod/v4/locales/da.js +115 -0
  713. package/node_modules/zod/v4/locales/de.cjs +135 -0
  714. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  715. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  716. package/node_modules/zod/v4/locales/de.js +108 -0
  717. package/node_modules/zod/v4/locales/el.cjs +136 -0
  718. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  719. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  720. package/node_modules/zod/v4/locales/el.js +109 -0
  721. package/node_modules/zod/v4/locales/en.cjs +140 -0
  722. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  723. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  724. package/node_modules/zod/v4/locales/en.js +113 -0
  725. package/node_modules/zod/v4/locales/eo.cjs +136 -0
  726. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  727. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  728. package/node_modules/zod/v4/locales/eo.js +109 -0
  729. package/node_modules/zod/v4/locales/es.cjs +159 -0
  730. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  731. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  732. package/node_modules/zod/v4/locales/es.js +132 -0
  733. package/node_modules/zod/v4/locales/fa.cjs +141 -0
  734. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  735. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  736. package/node_modules/zod/v4/locales/fa.js +114 -0
  737. package/node_modules/zod/v4/locales/fi.cjs +139 -0
  738. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  739. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  740. package/node_modules/zod/v4/locales/fi.js +112 -0
  741. package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
  742. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  743. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  744. package/node_modules/zod/v4/locales/fr-CA.js +107 -0
  745. package/node_modules/zod/v4/locales/fr.cjs +152 -0
  746. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  747. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  748. package/node_modules/zod/v4/locales/fr.js +125 -0
  749. package/node_modules/zod/v4/locales/he.cjs +241 -0
  750. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  751. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  752. package/node_modules/zod/v4/locales/he.js +214 -0
  753. package/node_modules/zod/v4/locales/hr.cjs +149 -0
  754. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  755. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  756. package/node_modules/zod/v4/locales/hr.js +122 -0
  757. package/node_modules/zod/v4/locales/hu.cjs +135 -0
  758. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  759. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  760. package/node_modules/zod/v4/locales/hu.js +108 -0
  761. package/node_modules/zod/v4/locales/hy.cjs +174 -0
  762. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  763. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  764. package/node_modules/zod/v4/locales/hy.js +147 -0
  765. package/node_modules/zod/v4/locales/id.cjs +133 -0
  766. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  767. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  768. package/node_modules/zod/v4/locales/id.js +106 -0
  769. package/node_modules/zod/v4/locales/index.cjs +111 -0
  770. package/node_modules/zod/v4/locales/index.d.cts +52 -0
  771. package/node_modules/zod/v4/locales/index.d.ts +52 -0
  772. package/node_modules/zod/v4/locales/index.js +52 -0
  773. package/node_modules/zod/v4/locales/is.cjs +136 -0
  774. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  775. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  776. package/node_modules/zod/v4/locales/is.js +109 -0
  777. package/node_modules/zod/v4/locales/it.cjs +135 -0
  778. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  779. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  780. package/node_modules/zod/v4/locales/it.js +108 -0
  781. package/node_modules/zod/v4/locales/ja.cjs +134 -0
  782. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  783. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  784. package/node_modules/zod/v4/locales/ja.js +107 -0
  785. package/node_modules/zod/v4/locales/ka.cjs +139 -0
  786. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  787. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  788. package/node_modules/zod/v4/locales/ka.js +112 -0
  789. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  790. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  791. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  792. package/node_modules/zod/v4/locales/kh.js +5 -0
  793. package/node_modules/zod/v4/locales/km.cjs +137 -0
  794. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  795. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  796. package/node_modules/zod/v4/locales/km.js +110 -0
  797. package/node_modules/zod/v4/locales/ko.cjs +138 -0
  798. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  799. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  800. package/node_modules/zod/v4/locales/ko.js +111 -0
  801. package/node_modules/zod/v4/locales/lt.cjs +230 -0
  802. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  803. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  804. package/node_modules/zod/v4/locales/lt.js +203 -0
  805. package/node_modules/zod/v4/locales/mk.cjs +136 -0
  806. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  807. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  808. package/node_modules/zod/v4/locales/mk.js +109 -0
  809. package/node_modules/zod/v4/locales/ms.cjs +134 -0
  810. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  811. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  812. package/node_modules/zod/v4/locales/ms.js +107 -0
  813. package/node_modules/zod/v4/locales/nl.cjs +137 -0
  814. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  815. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  816. package/node_modules/zod/v4/locales/nl.js +110 -0
  817. package/node_modules/zod/v4/locales/no.cjs +135 -0
  818. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  819. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  820. package/node_modules/zod/v4/locales/no.js +108 -0
  821. package/node_modules/zod/v4/locales/ota.cjs +136 -0
  822. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  823. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  824. package/node_modules/zod/v4/locales/ota.js +109 -0
  825. package/node_modules/zod/v4/locales/package.json +7 -0
  826. package/node_modules/zod/v4/locales/pl.cjs +136 -0
  827. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  828. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  829. package/node_modules/zod/v4/locales/pl.js +109 -0
  830. package/node_modules/zod/v4/locales/ps.cjs +141 -0
  831. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  832. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  833. package/node_modules/zod/v4/locales/ps.js +114 -0
  834. package/node_modules/zod/v4/locales/pt.cjs +135 -0
  835. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  836. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  837. package/node_modules/zod/v4/locales/pt.js +108 -0
  838. package/node_modules/zod/v4/locales/ro.cjs +146 -0
  839. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  840. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  841. package/node_modules/zod/v4/locales/ro.js +119 -0
  842. package/node_modules/zod/v4/locales/ru.cjs +183 -0
  843. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  844. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  845. package/node_modules/zod/v4/locales/ru.js +156 -0
  846. package/node_modules/zod/v4/locales/sl.cjs +136 -0
  847. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  848. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  849. package/node_modules/zod/v4/locales/sl.js +109 -0
  850. package/node_modules/zod/v4/locales/sv.cjs +137 -0
  851. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  852. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  853. package/node_modules/zod/v4/locales/sv.js +110 -0
  854. package/node_modules/zod/v4/locales/ta.cjs +137 -0
  855. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  856. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  857. package/node_modules/zod/v4/locales/ta.js +110 -0
  858. package/node_modules/zod/v4/locales/th.cjs +137 -0
  859. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  860. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  861. package/node_modules/zod/v4/locales/th.js +110 -0
  862. package/node_modules/zod/v4/locales/tr.cjs +132 -0
  863. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  864. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  865. package/node_modules/zod/v4/locales/tr.js +105 -0
  866. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  867. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  868. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  869. package/node_modules/zod/v4/locales/ua.js +5 -0
  870. package/node_modules/zod/v4/locales/uk.cjs +135 -0
  871. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  872. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  873. package/node_modules/zod/v4/locales/uk.js +108 -0
  874. package/node_modules/zod/v4/locales/ur.cjs +137 -0
  875. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  876. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  877. package/node_modules/zod/v4/locales/ur.js +110 -0
  878. package/node_modules/zod/v4/locales/uz.cjs +137 -0
  879. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  880. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  881. package/node_modules/zod/v4/locales/uz.js +110 -0
  882. package/node_modules/zod/v4/locales/vi.cjs +135 -0
  883. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  884. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  885. package/node_modules/zod/v4/locales/vi.js +108 -0
  886. package/node_modules/zod/v4/locales/yo.cjs +134 -0
  887. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  888. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  889. package/node_modules/zod/v4/locales/yo.js +107 -0
  890. package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
  891. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  892. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  893. package/node_modules/zod/v4/locales/zh-CN.js +109 -0
  894. package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
  895. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  896. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  897. package/node_modules/zod/v4/locales/zh-TW.js +107 -0
  898. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  899. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  900. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  901. package/node_modules/zod/v4/mini/checks.js +1 -0
  902. package/node_modules/zod/v4/mini/coerce.cjs +52 -0
  903. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  904. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  905. package/node_modules/zod/v4/mini/coerce.js +22 -0
  906. package/node_modules/zod/v4/mini/external.cjs +63 -0
  907. package/node_modules/zod/v4/mini/external.d.cts +13 -0
  908. package/node_modules/zod/v4/mini/external.d.ts +13 -0
  909. package/node_modules/zod/v4/mini/external.js +14 -0
  910. package/node_modules/zod/v4/mini/index.cjs +32 -0
  911. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  912. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  913. package/node_modules/zod/v4/mini/index.js +3 -0
  914. package/node_modules/zod/v4/mini/iso.cjs +64 -0
  915. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  916. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  917. package/node_modules/zod/v4/mini/iso.js +34 -0
  918. package/node_modules/zod/v4/mini/package.json +7 -0
  919. package/node_modules/zod/v4/mini/parse.cjs +16 -0
  920. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  921. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  922. package/node_modules/zod/v4/mini/parse.js +1 -0
  923. package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
  924. package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
  925. package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
  926. package/node_modules/zod/v4/mini/schemas.js +961 -0
  927. package/node_modules/zod/v4/package.json +7 -0
  928. package/node_modules/zod/v4-mini/index.cjs +32 -0
  929. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  930. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  931. package/node_modules/zod/v4-mini/index.js +3 -0
  932. package/node_modules/zod/v4-mini/package.json +7 -0
  933. package/package.json +69 -0
@@ -0,0 +1,895 @@
1
+ export const browserTool = {
2
+ name: "browser",
3
+ description: `Control the web browser.
4
+
5
+ Ref lifecycle (IMPORTANT):
6
+ - Refs like [e1],[e2]... come from snapshot and resolve to DOM nodes via the accessibility tree.
7
+ - Refs are invalidated by: the next snapshot call, navigation, dialog open/close, and any major DOM re-render (common for rich editors and SPAs).
8
+ - Rule of thumb: use the ref from the MOST RECENT snapshot. If you snapshotted, then acted, then snapshotted again, the first batch of refs is gone.
9
+ - For stable elements with a known testid/CSS hook (e.g. [data-testid="submit"], [data-testid="search-input"]), prefer \`selector\` over \`ref\`. Selectors re-resolve on every use.
10
+ - If you get "reference '...' not found", take a fresh snapshot or switch to a selector — do not retry with the same ref.
11
+
12
+ Top-level actions:
13
+ - navigate: go to a URL (url)
14
+ - snapshot: get page accessibility tree with element refs [e1],[e2]... (mode?, selector?, compact?, depth?, maxChars?, snapshotFormat?, refs?). Pass refs="role" to additionally get re-resolvable [role-ref="button|Post"] handles that survive rerenders.
15
+ - screenshot: capture page image (fullPage?, ref?, element?, type?, save?, saveAs?). Pass save:true (or saveAs:"name.png") to write the image into workspace/attachments/ so you can then deliver it via attachment.send.
16
+ - tabs: list open browser tabs
17
+ - open: open a new tab (url)
18
+ - focus: switch to tab (index)
19
+ - close: close tab (index?) or current tab
20
+ - console: read browser console messages (level?)
21
+ - dialog: arm handler for next browser dialog/alert (accept, promptText?, timeoutMs?)
22
+ - upload: upload file(s) to a page input or file chooser (paths, ref?, selector?, inputRef?, inputSelector?, timeoutMs?). Pass a snapshot ref (eN), a CSS selector (e.g. input[type="file"] or [data-testid="upload"]), or omit both to arm the next file-chooser dialog. CSS-shaped strings in the ref slot are auto-detected and routed to selector. Paths passed as bare filenames or "attachments/<name>" are auto-resolved against workspace/attachments/, so a file the user uploaded via Telegram can be forwarded to a webpage upload input by just referencing the name from the \`[user uploaded file: attachments/…]\` preamble. Absolute paths are honored as-is; an unknown relative path returns a "not found" error instead of silently succeeding.
23
+ - act: perform an interaction on the page (kind + params, or request object). Optionally pass \`expect\` (see below) to verify page state after the action.
24
+ - verify: run an \`expect\` block standalone, asserting the page is in a desired state without performing any other action. Returns "[verified]" or "[verification failed]".
25
+ - batch: run an array of browser actions in sequence, stopping on first failure (steps:[{action, params?}, ...], stopOnFailure?:true). Saves LLM round-trips when several steps depend on the same DOM state — e.g. focus search box → type query → wait for result cells.
26
+
27
+ expect verification (action="act" / "verify", field "expect"):
28
+ Pass an \`expect\` object to assert post-action page state. Without it, "click" returns success the moment Playwright's click resolves — even if the page didn't actually transition. With \`expect\`, the result includes "[verified]" or "[verification failed]" so the LLM doesn't move on assuming success.
29
+ REQUIRED for any click that submits, posts, sends, saves, publishes, or otherwise commits state — without \`expect\`, you cannot tell whether the click took effect, and you MUST NOT mark a task done or update memory based on the bare success message. Suggested signals depending on the flow: urlContains (post→permalink), selectorHidden (modal/compose closes), text (success toast appears), selectorVisible (new content rendered), inputValue (editor cleared).
30
+ Fields (all optional, all must pass; unknown field names FAIL the expect block, so spell carefully):
31
+ - text: substring of visible page text appears (string)
32
+ - textGone: substring disappears (string)
33
+ - selectorVisible: CSS selector resolves to a visible element (string). Alias: selector.
34
+ - selectorHidden: CSS selector is missing or hidden (string). Alias: selectorGone.
35
+ - urlContains: location.href contains substring (string)
36
+ - urlMatches: location.href matches regex (string)
37
+ - inputValue: { selector?|ref?, contains? | equals? } — verify input/textarea/contenteditable text
38
+ - timeoutMs: total budget (default 8000)
39
+
40
+ act interaction kinds:
41
+ - click: click element (ref or selector, doubleClick?, button?, modifiers?, dispatch?, fallbackDispatch?). Default dispatch="mouse" sends real CDP mouse events. dispatch="dom" calls guarded HTMLElement.click(); use it only after a mouse click/event-miss or expect failure for the same control and synthetic DOM click is semantically acceptable. For a final guarded fallback in the same tool call, set fallbackDispatch="dom" together with an expect block; it retries only if the mouse click event missed the target or verification failed. Do not use raw evaluate() to click.
42
+ - type: type text into element (ref or selector, text, submit?, method?, fallback?). Default sends real keystrokes; use method="paste" for rich-text editors (Lexical/ProseMirror/Tiptap) where individual keystrokes don't trigger the editor's insertion logic. The chosen method is a preference, not a contract: if the first attempt doesn't land, the action automatically retries with the other method (set fallback:false to disable). Result includes a "[url-not-visible: ...]" tag when body text landed but a URL was rewritten by the site into a link card / shortener and can't be verified verbatim — this is best-effort, NOT a reason to retype without the URL. Verifier errors are tooling issues, not content issues: do NOT bypass them by deleting URLs, shortening text, or rewriting the user's content.
43
+ - press: press keyboard key (key, delayMs?)
44
+ - hover: hover over element for tooltips/popups (ref or selector)
45
+ - drag: drag between elements (startRef, endRef, startSelector?, endSelector?)
46
+ - select: select dropdown option(s) (ref or selector, values)
47
+ - fill: batch fill form fields (fields[])
48
+ - resize: resize browser viewport (width, height)
49
+ - wait: wait for condition. Prefer UI-state conditions over legacy selector/loadState ones — SPAs often never reach networkidle. Available: selectorVisible (selector + waits for visibility), selectorHidden, selectorEnabled, selectorDisabled, urlMatches (regex), domQuietMs (no DOM mutations for N ms), locatorStableMs (selector bounding box stable for N ms; pair with selector), textCountAtLeast ({selector, count}). Legacy: selector (just exists), text, textGone, url, loadState, fn, timeMs (sleep). Common: timeoutMs (default 10000).
50
+ - evaluate: run JavaScript (fn). Parse-checked locally before sending to the page — syntax errors return immediately. For common patterns prefer the helpers below instead of writing raw JS.
51
+ - extractVisibleText: return bounded visible text from the page or a CSS region (selector?, maxChars?). Replaces ad-hoc innerText scraping.
52
+ - queryByText: find visible elements whose innerText matches \`text\` (text, fuzzy?, limit?). Returns selectors when present so you can chain into click/type.
53
+ - findClickableNearText: find clickable controls (button/link/role=button/menuitem) at or near elements containing \`text\` (text, maxAncestors?, limit?). Returns \`selector\` when available, otherwise \`ref\` may contain a re-resolvable role handle like \`menuitem|Quote\` for click/hover. Use when the visible text isn't itself the click target (e.g. an avatar next to a name).
54
+ - extractLinks: list visible anchor links from the page or a CSS region (selector?, limit?).
55
+ - extractTweetCards: site-specific social-post helper; use only when an installed or auto-loaded skill instructs you to use it (limit?).
56
+ - close: close current page`,
57
+ parameters: {
58
+ type: "object",
59
+ properties: {
60
+ action: {
61
+ type: "string",
62
+ enum: [
63
+ "navigate",
64
+ "snapshot",
65
+ "screenshot",
66
+ "tabs",
67
+ "open",
68
+ "focus",
69
+ "close",
70
+ "console",
71
+ "dialog",
72
+ "upload",
73
+ "act",
74
+ "verify",
75
+ "batch",
76
+ ],
77
+ description: "The browser action to perform",
78
+ },
79
+ // -- navigate / open --
80
+ url: { type: "string", description: "URL for navigate or open" },
81
+ // -- snapshot --
82
+ mode: {
83
+ type: "string",
84
+ enum: ["full", "interactive"],
85
+ description: "Snapshot mode: 'full' returns entire page tree (default), 'interactive' returns only actionable elements",
86
+ },
87
+ selector: {
88
+ type: "string",
89
+ description: "CSS selector: scopes snapshot subtree, or alternative to ref for act interactions, or wait condition",
90
+ },
91
+ compact: {
92
+ type: "boolean",
93
+ description: "Strip whitespace from snapshot",
94
+ },
95
+ depth: {
96
+ type: "number",
97
+ description: "Max tree depth for snapshot",
98
+ },
99
+ maxChars: {
100
+ type: "number",
101
+ description: "Max chars for snapshot output",
102
+ },
103
+ snapshotFormat: {
104
+ type: "string",
105
+ enum: ["ai", "aria"],
106
+ description: "snapshot only: 'ai' (default) compact LLM-friendly summary; 'aria' verbose accessibility tree.",
107
+ },
108
+ refs: {
109
+ type: "string",
110
+ enum: ["aria", "role"],
111
+ description: "snapshot only: 'aria' (default) eN refs invalidated on each snapshot; 'role' adds re-resolvable role|name handles.",
112
+ },
113
+ // -- screenshot --
114
+ fullPage: {
115
+ type: "boolean",
116
+ description: "Full page screenshot",
117
+ },
118
+ element: {
119
+ type: "string",
120
+ description: "CSS selector for element screenshot",
121
+ },
122
+ type: {
123
+ type: "string",
124
+ enum: ["png", "jpeg"],
125
+ description: "Image type for screenshot (default: jpeg)",
126
+ },
127
+ save: {
128
+ type: "boolean",
129
+ description: "Screenshot only: write the captured image into workspace/attachments/ under an auto-generated filename. The returned text includes the filename for use with attachment.send.",
130
+ },
131
+ saveAs: {
132
+ type: "string",
133
+ description: "Screenshot only: explicit basename for the saved file (e.g. 'login-page.png'). Implies save=true. Collision-safe (appends timestamp if the name is already taken).",
134
+ },
135
+ // -- tab management --
136
+ index: {
137
+ type: "number",
138
+ description: "Tab index for focus/close",
139
+ },
140
+ // -- console --
141
+ level: {
142
+ type: "string",
143
+ description: "Console message level filter (error, warning, log, debug)",
144
+ },
145
+ // -- dialog --
146
+ accept: {
147
+ type: "boolean",
148
+ description: "Accept or dismiss dialog",
149
+ },
150
+ promptText: {
151
+ type: "string",
152
+ description: "Text to enter in prompt dialog",
153
+ },
154
+ // -- upload --
155
+ paths: {
156
+ type: "array",
157
+ items: { type: "string" },
158
+ description: "File paths for upload",
159
+ },
160
+ inputRef: {
161
+ type: "string",
162
+ description: "Element ref for file input (upload). Alias of `ref`.",
163
+ },
164
+ inputSelector: {
165
+ type: "string",
166
+ description: "CSS selector for the file input element (upload). Alias of `selector`. Use when a stable selector is known (e.g. input[type=\"file\"], [data-testid=\"upload\"]).",
167
+ },
168
+ // -- shared --
169
+ timeoutMs: {
170
+ type: "number",
171
+ description: "Timeout in ms (for wait, dialog, upload)",
172
+ },
173
+ // -- act (interaction) --
174
+ kind: {
175
+ type: "string",
176
+ enum: [
177
+ "click",
178
+ "type",
179
+ "press",
180
+ "hover",
181
+ "drag",
182
+ "select",
183
+ "fill",
184
+ "resize",
185
+ "wait",
186
+ "evaluate",
187
+ "extractVisibleText",
188
+ "queryByText",
189
+ "findClickableNearText",
190
+ "extractLinks",
191
+ "extractTweetCards",
192
+ "close",
193
+ ],
194
+ description: "Interaction kind for act action",
195
+ },
196
+ ref: {
197
+ type: "string",
198
+ description: "Element reference from snapshot (e.g., 'e1') for act interactions, screenshot, or upload",
199
+ },
200
+ // -- act: nested request object (alternative to flattened params) --
201
+ request: {
202
+ type: "object",
203
+ description: "Nested act request object {kind, ref?, ...}. Alternative to flattened params.",
204
+ },
205
+ // -- act / verify: post-action assertion --
206
+ expect: {
207
+ type: "object",
208
+ description: "Verify page state after the action (or, with action='verify', without any preceding action). Fields: text, textGone, selector, selectorGone, urlContains, urlMatches, inputValue:{selector?|ref?, contains?|equals?}, timeoutMs. All set fields must pass.",
209
+ },
210
+ // -- batch --
211
+ steps: {
212
+ type: "array",
213
+ items: {
214
+ type: "object",
215
+ properties: {
216
+ action: { type: "string" },
217
+ params: { type: "object" },
218
+ },
219
+ },
220
+ description: "batch only: ordered [{action, params?}] to run. Stops on first failure unless stopOnFailure=false.",
221
+ },
222
+ stopOnFailure: {
223
+ type: "boolean",
224
+ description: "batch only: stop on first failed step (default true). Set false to keep running and accumulate per-step results.",
225
+ },
226
+ // -- act:click --
227
+ doubleClick: {
228
+ type: "boolean",
229
+ description: "Double-click instead of single click",
230
+ },
231
+ button: {
232
+ type: "string",
233
+ enum: ["left", "right", "middle"],
234
+ description: "Mouse button for click",
235
+ },
236
+ modifiers: {
237
+ type: "array",
238
+ items: { type: "string" },
239
+ description: "Modifier keys for click (Alt, Control, Meta, Shift)",
240
+ },
241
+ dispatch: {
242
+ type: "string",
243
+ enum: ["mouse", "dom"],
244
+ description: "click only: dispatch method. Default 'mouse' sends real CDP mouse events. 'dom' calls guarded HTMLElement.click(); use only after a mouse click with expect fails for the same control and synthetic DOM click is semantically acceptable.",
245
+ },
246
+ fallbackDispatch: {
247
+ type: "string",
248
+ enum: ["dom"],
249
+ description: "click only: optional final fallback. With dispatch unset or 'mouse' and an expect block present, fallbackDispatch='dom' retries the same click once via guarded DOM dispatch only if the mouse click event missed the target or verification failed. Avoid on toggle actions unless the expect block proves the intended final state.",
250
+ },
251
+ // -- act:type --
252
+ text: {
253
+ type: "string",
254
+ description: "Text for type action or wait text condition",
255
+ },
256
+ submit: {
257
+ type: "boolean",
258
+ description: "Press Enter after entering the text",
259
+ },
260
+ method: {
261
+ type: "string",
262
+ enum: ["keyboard", "paste"],
263
+ description: "Input method preference. 'keyboard' (default for plain inputs) sends real per-key keystrokes — use for plain inputs, forms, search boxes. 'paste' (default for rich-text editors) does a direct DOM insert via execCommand('insertText') / native value setter — fires the framework-expected input events but is NOT a real clipboard paste. Use 'paste' for Lexical/ProseMirror/Tiptap-style editors where per-key input gets dropped. Either method may fail in isolation; the action auto-retries with the other one unless fallback:false.",
264
+ },
265
+ fallback: {
266
+ type: "boolean",
267
+ description: "type only: when false, do NOT retry with the alternate insertion method on verifier failure. Default true. Set false only when you specifically want to diagnose one method's behavior — the auto-fallback is the safety net that catches Lexical-vs-keyboard edge cases.",
268
+ },
269
+ // -- act:press --
270
+ key: {
271
+ type: "string",
272
+ description: "Key for press (e.g., 'Enter', 'Tab', 'Escape')",
273
+ },
274
+ delayMs: {
275
+ type: "number",
276
+ description: "Delay in ms before press",
277
+ },
278
+ // -- act:drag --
279
+ startRef: {
280
+ type: "string",
281
+ description: "Start element ref for drag",
282
+ },
283
+ endRef: {
284
+ type: "string",
285
+ description: "End element ref for drag",
286
+ },
287
+ startSelector: {
288
+ type: "string",
289
+ description: "Start CSS selector for drag (alternative to startRef)",
290
+ },
291
+ endSelector: {
292
+ type: "string",
293
+ description: "End CSS selector for drag (alternative to endRef)",
294
+ },
295
+ // -- act:select --
296
+ values: {
297
+ type: "array",
298
+ items: { type: "string" },
299
+ description: "Values for select dropdown",
300
+ },
301
+ // -- act:fill --
302
+ fields: {
303
+ type: "array",
304
+ items: {
305
+ type: "object",
306
+ properties: {
307
+ ref: { type: "string" },
308
+ value: { type: "string" },
309
+ type: { type: "string" },
310
+ },
311
+ },
312
+ description: 'Form fields for batch fill [{ref, value, type?}]. type: "checkbox"/"radio" uses setChecked',
313
+ },
314
+ // -- act:resize --
315
+ width: { type: "number", description: "Viewport width for resize" },
316
+ height: { type: "number", description: "Viewport height for resize" },
317
+ // -- act:wait --
318
+ textGone: {
319
+ type: "string",
320
+ description: "Wait for text to disappear",
321
+ },
322
+ loadState: {
323
+ type: "string",
324
+ enum: ["load", "domcontentloaded", "networkidle"],
325
+ description: "Wait for page load state. Avoid networkidle on SPAs.",
326
+ },
327
+ timeMs: {
328
+ type: "number",
329
+ description: "Simple delay in ms for wait (max 30000)",
330
+ },
331
+ // -- act:wait additions (P1-2) --
332
+ selectorVisible: {
333
+ type: "string",
334
+ description: "wait kind: CSS selector resolves to a visible element. Preferred over `selector` for visibility-sensitive waits.",
335
+ },
336
+ selectorHidden: {
337
+ type: "string",
338
+ description: "wait kind: CSS selector becomes missing or hidden.",
339
+ },
340
+ selectorEnabled: {
341
+ type: "string",
342
+ description: "wait kind: CSS selector resolves to an enabled control.",
343
+ },
344
+ selectorDisabled: {
345
+ type: "string",
346
+ description: "wait kind: CSS selector resolves to a disabled control.",
347
+ },
348
+ urlMatches: {
349
+ type: "string",
350
+ description: "wait kind: location.href matches this regex string.",
351
+ },
352
+ domQuietMs: {
353
+ type: "number",
354
+ description: "wait kind: DOM has had no mutations for N ms (50–10000). Useful when the network keeps spinning.",
355
+ },
356
+ locatorStableMs: {
357
+ type: "number",
358
+ description: "wait kind: pair with `selector` — bounding box stable for N ms (50–10000). Useful before screenshot or click on animated UI.",
359
+ },
360
+ textCountAtLeast: {
361
+ type: "object",
362
+ description: "wait kind: at least N elements match a selector — {selector, count}. Useful for waiting on result lists.",
363
+ properties: {
364
+ selector: { type: "string" },
365
+ count: { type: "number" },
366
+ },
367
+ },
368
+ // -- act:evaluate + act:wait --
369
+ fn: {
370
+ type: "string",
371
+ description: "JavaScript for evaluate, or custom JS function for wait condition",
372
+ },
373
+ // -- DOM helpers (P1-4) --
374
+ fuzzy: {
375
+ type: "boolean",
376
+ description: "queryByText only: substring + case-insensitive match instead of exact.",
377
+ },
378
+ limit: {
379
+ type: "number",
380
+ description: "DOM helpers: cap result count (queryByText/findClickableNearText/extractLinks/site-specific helpers).",
381
+ },
382
+ maxAncestors: {
383
+ type: "number",
384
+ description: "findClickableNearText only: max levels to walk up the DOM looking for a clickable ancestor.",
385
+ },
386
+ },
387
+ required: ["action"],
388
+ },
389
+ };
390
+ export const memoryTool = {
391
+ name: "memory",
392
+ description: `Freeform notes the user has asked to be remembered.
393
+
394
+ Actions:
395
+ - save: store/overwrite a note (key, title, content). ONLY when the user
396
+ explicitly asks ("记住这个", "remember that ..."). memory.save is REJECTED
397
+ during scheduled tasks — use the store tool for structured cross-run state.
398
+ - read: read a note by key.
399
+ - list: list all keys.
400
+
401
+ NOT for: structured histories, processed item ids, visited URLs, tickets,
402
+ observations, counters, cursors, or any cross-run lookup that can be keyed.
403
+ For those, use the store tool — store.has is O(1) and returns "yes"/"no",
404
+ whereas memory.read pulls the whole file and bloats every iteration.
405
+
406
+ When saving on user request: choose a stable, descriptive key (no dates, no
407
+ timestamps, no ".md" suffix; date-keyed or timestamped keys are rejected).
408
+ Re-save with the SAME key to overwrite. Each note body is capped at 8KB.`,
409
+ parameters: {
410
+ type: "object",
411
+ properties: {
412
+ action: {
413
+ type: "string",
414
+ enum: ["save", "read", "list"],
415
+ description: "Memory action",
416
+ },
417
+ key: {
418
+ type: "string",
419
+ description: "Stable memory key, no date/timestamp, no .md suffix (e.g. 'site-github', 'task1-rules')",
420
+ },
421
+ title: {
422
+ type: "string",
423
+ description: "Short title for index (<100 chars)",
424
+ },
425
+ content: {
426
+ type: "string",
427
+ description: "Memory content in markdown (8KB max)",
428
+ },
429
+ },
430
+ required: ["action"],
431
+ },
432
+ };
433
+ /**
434
+ * Read-only variant of memoryTool surfaced to scheduled tasks. Scheduled
435
+ * tasks must not write freeform memory; cross-run state belongs in `store`.
436
+ * Surfacing the same memoryTool with `save` still in its action enum lets
437
+ * the LLM attempt save calls that the task-runner dispatcher rejects —
438
+ * burning a tool iteration per attempt. Hiding `save` from the schema is
439
+ * the more honest contract.
440
+ *
441
+ * chat-engine continues to use the full `memoryTool` (which keeps `save`).
442
+ * task-runner pulls this variant by passing `taskMode: true` to
443
+ * getAllTools().
444
+ */
445
+ export const memoryToolTaskMode = {
446
+ name: "memory",
447
+ description: `Read-only access to freeform notes the user has saved via chat.
448
+
449
+ Actions:
450
+ - read: read a note by key.
451
+ - list: list all keys.
452
+
453
+ You CANNOT save memories during a scheduled task — memory.save is not
454
+ exposed here. For structured cross-run state (processed ids, visited URLs,
455
+ tickets, observations, counters, cursors) use the store tool — store.has /
456
+ store.get / store.put. For freeform notes the user wants remembered, the
457
+ user will save them via chat.`,
458
+ parameters: {
459
+ type: "object",
460
+ properties: {
461
+ action: {
462
+ type: "string",
463
+ enum: ["read", "list"],
464
+ description: "Memory action",
465
+ },
466
+ key: {
467
+ type: "string",
468
+ description: "Stable memory key, no date/timestamp, no .md suffix (e.g. 'site-github', 'task1-rules')",
469
+ },
470
+ },
471
+ required: ["action"],
472
+ },
473
+ };
474
+ export const storeTool = {
475
+ name: "store",
476
+ description: `Persistent structured key-value store. Use whenever a task needs
477
+ structured cross-run state that can be addressed by stable ids.
478
+
479
+ Typical uses (not exhaustive):
480
+ - processed ids you've already acted on
481
+ - urls you've already visited and may need to recognize later
482
+ - tickets / posts / files you've already handled
483
+ - observations, counters, cursors, and compact structured histories
484
+ - any cross-run KV state that doesn't fit a single freeform note
485
+
486
+ Collections are flat namespaces (lowercase, digits, '-' or '_', 1-64 chars,
487
+ e.g. "processed-items", "visited-urls", "price-observations"). Inside a
488
+ collection, ids are unique strings (<=200 chars). Optional value (string)
489
+ and meta (JSON object) are each capped at 4KB.
490
+
491
+ Actions:
492
+ has(collection, id) -> "yes" / "no" (O(1) existence check)
493
+ put(collection, id, value?, meta?) -> "ok" or "updated"
494
+ get(collection, id) -> full JSON record or "not found"
495
+ list(collection, limit?, sinceMs?) -> recent ids, newest first
496
+ (default limit 20, max 100)
497
+ count(collection) -> total entries as a number
498
+ delete(collection, id) -> "ok"
499
+
500
+ Prefer store over memory.read + grep for any structured lookup. memory is
501
+ for freeform human-curated notes only, and memory.save is REJECTED in
502
+ scheduled tasks.`,
503
+ parameters: {
504
+ type: "object",
505
+ properties: {
506
+ action: {
507
+ type: "string",
508
+ enum: ["has", "put", "get", "list", "count", "delete"],
509
+ description: "Store action",
510
+ },
511
+ collection: {
512
+ type: "string",
513
+ description: "Collection name. Lowercase letters/digits/'-'/'_', 1-64 chars, starts with letter or digit (e.g. 'processed-items', 'visited-urls').",
514
+ },
515
+ id: {
516
+ type: "string",
517
+ description: "Entry id within the collection (<=200 chars). Required for has/put/get/delete.",
518
+ },
519
+ value: {
520
+ type: "string",
521
+ description: "Optional string payload for 'put' (<=4KB).",
522
+ },
523
+ meta: {
524
+ type: "object",
525
+ description: "Optional structured metadata object for 'put' (JSON, <=4KB serialized). Example: { url, author, ts }.",
526
+ additionalProperties: true,
527
+ },
528
+ limit: {
529
+ type: "number",
530
+ description: "Cap on entries returned by 'list'. Default 20, max 100.",
531
+ },
532
+ sinceMs: {
533
+ type: "number",
534
+ description: "Optional unix ms timestamp; 'list' returns only entries updated at or after this.",
535
+ },
536
+ },
537
+ required: ["action"],
538
+ },
539
+ };
540
+ export const webFetchTool = {
541
+ name: "web_fetch",
542
+ description: `Fetch a public HTTP(S) resource directly and return bounded text.
543
+
544
+ Use this for read-only REST APIs, markdown skill URLs, JSON endpoints, and
545
+ instruction skills that mention WebFetch or Bash(curl). This tool only supports
546
+ GET, follows redirects, rejects URL credentials, and caps response size.`,
547
+ parameters: {
548
+ type: "object",
549
+ properties: {
550
+ url: {
551
+ type: "string",
552
+ description: "HTTP or HTTPS URL to fetch.",
553
+ },
554
+ method: {
555
+ type: "string",
556
+ enum: ["GET"],
557
+ description: "Only GET is supported. Omit this unless needed.",
558
+ },
559
+ headers: {
560
+ type: "object",
561
+ additionalProperties: { type: "string" },
562
+ description: "Optional string headers. Cookie, Host, Content-Length, and proxy headers are rejected.",
563
+ },
564
+ maxBytes: {
565
+ type: "number",
566
+ description: "Maximum response bytes to read. Default 65536, hard cap 524288.",
567
+ },
568
+ timeoutMs: {
569
+ type: "number",
570
+ description: "Request timeout in milliseconds. Default 15000, hard cap 30000.",
571
+ },
572
+ },
573
+ required: ["url"],
574
+ },
575
+ };
576
+ export const schedulerTool = {
577
+ name: "scheduler",
578
+ description: `Manage scheduled tasks. Actions:
579
+ - list: list all tasks
580
+ - add: create task (name, cron, prompt, optional timezone)
581
+ - update: modify an existing task (id, and any of name/cron/prompt/timezone/enabled/storagePolicyMode — only supplied fields change; pass timezone="" to clear)
582
+ - remove: delete task (id)
583
+ - toggle: enable/disable task (id, enabled)`,
584
+ parameters: {
585
+ type: "object",
586
+ properties: {
587
+ action: {
588
+ type: "string",
589
+ enum: ["list", "add", "update", "remove", "toggle"],
590
+ description: "Scheduler action",
591
+ },
592
+ id: { type: "string", description: "Task ID" },
593
+ name: { type: "string", description: "Task name" },
594
+ cron: {
595
+ type: "string",
596
+ description: "Cron expression (e.g., '0 9 * * *')",
597
+ },
598
+ prompt: { type: "string", description: "Task prompt" },
599
+ storagePolicyMode: {
600
+ type: "string",
601
+ enum: ["auto", "off"],
602
+ description: "Optional. 'auto' lets dipclaw infer structured storage policies from the task prompt; 'off' disables automatic storage policy inference.",
603
+ },
604
+ timezone: {
605
+ type: "string",
606
+ description: "Optional IANA timezone for cron (e.g. 'UTC', 'Asia/Shanghai'). Falls back to scheduler default / system timezone.",
607
+ },
608
+ enabled: { type: "boolean", description: "Enable or disable" },
609
+ },
610
+ required: ["action"],
611
+ },
612
+ };
613
+ export const attachmentTool = {
614
+ name: "attachment",
615
+ description: `Manage files and images under <workspace>/attachments/.
616
+
617
+ This directory stores files uploaded by the user via Telegram and files you
618
+ intend to send back. All paths MUST be relative to the attachments/ directory
619
+ (e.g., "1700000000000-ab12-report.md"). Absolute paths and ../ traversal are
620
+ rejected.
621
+
622
+ Actions:
623
+ - list: list files in the attachments directory (no args)
624
+ - read_text: read a text file's contents (path). Rejects binary files and
625
+ anything larger than 256 KB. Use this to inspect user-uploaded text, JSON,
626
+ markdown, CSV, or config files.
627
+ - send: send a file from the attachments directory back to the user via the
628
+ current frontend (Telegram). Args: path; optional caption; optional asImage
629
+ (default: auto-detected from extension — .png/.jpg/.jpeg/.webp/.gif → image,
630
+ otherwise document). Use this to deliver screenshots, downloaded files, or
631
+ generated artifacts the user asked for.
632
+ - install_skill: parse an uploaded markdown skill file and install it into the
633
+ agent's skill library. Supports dipclaw JSON-step skills and instruction
634
+ markdown skills. Args: path; optional skillName (overrides the name from
635
+ frontmatter/filename); optional overwrite (default false). On name collision:
636
+ fails with an error unless overwrite=true, in which case the existing skill is
637
+ replaced and its usageCount/successRate stats are preserved.`,
638
+ parameters: {
639
+ type: "object",
640
+ properties: {
641
+ action: {
642
+ type: "string",
643
+ enum: ["list", "read_text", "send", "install_skill"],
644
+ description: "Attachment action",
645
+ },
646
+ path: {
647
+ type: "string",
648
+ description: "Filename relative to attachments/ directory. Required for read_text, send, install_skill.",
649
+ },
650
+ caption: {
651
+ type: "string",
652
+ description: "Optional caption text accompanying the file (send only).",
653
+ },
654
+ asImage: {
655
+ type: "boolean",
656
+ description: "Send as photo (sendPhoto) vs. document (sendDocument). If omitted, inferred from the file extension.",
657
+ },
658
+ skillName: {
659
+ type: "string",
660
+ description: "Override the skill name on install. Falls back to frontmatter `name:` then the filename stem.",
661
+ },
662
+ overwrite: {
663
+ type: "boolean",
664
+ description: "install_skill only: replace an existing skill with the same name (preserving its usage stats). Default false → collision returns an error.",
665
+ },
666
+ },
667
+ required: ["action"],
668
+ },
669
+ };
670
+ export const skillTool = {
671
+ name: "skill",
672
+ description: `Manage browser automation skills (markdown files in workspace/skills/, plus packaged read-only built-in skills).
673
+
674
+ Actions:
675
+ - list: list all skills with stats (no args)
676
+ - read: return capped markdown content of a skill, including the JSON steps block when it fits (name). Use this before save to edit an existing skill.
677
+ - save: create or OVERWRITE a skill (name, description, steps, optional notes). On overwrite, existing usageCount/successRate stats are preserved. Names are sanitized: characters outside [a-zA-Z0-9_-] become "_".
678
+ - install: fetch or store a markdown skill from a URL/content (url or content; optional name/skillName; optional overwrite). Supports both dipclaw JSON-step skills and instruction skills. When an instruction skill mentions WebFetch or curl, use web_fetch for the actual HTTP requests.
679
+ - delete: remove a skill file by name (name)
680
+
681
+ Steps schema: each step is {action, params, description?}. action/params mirror the browser tool (e.g. action="navigate" with params={url}, action="click" with params={ref:"css selector"}). Use {{variable_name}} inside params for runtime-substituted values.
682
+
683
+ Built-in skills are packaged with dipclaw and read-only. They are listed as
684
+ builtin:<name> and can be read that way. A user skill may use the same plain
685
+ name; plain read/load prefers the user skill, while builtin:<name> reads the
686
+ packaged skill.
687
+
688
+ Instruction skills are markdown procedures, not replay scripts. Read them with action="read", follow their instructions, and map WebFetch/curl examples to the web_fetch tool.`,
689
+ parameters: {
690
+ type: "object",
691
+ properties: {
692
+ action: {
693
+ type: "string",
694
+ enum: ["list", "read", "save", "install", "delete"],
695
+ description: "Skill action",
696
+ },
697
+ name: {
698
+ type: "string",
699
+ description: "Skill name (required for read, save, delete)",
700
+ },
701
+ description: {
702
+ type: "string",
703
+ description: "Skill description (save only)",
704
+ },
705
+ url: {
706
+ type: "string",
707
+ description: "Remote markdown skill URL to fetch and install (install only).",
708
+ },
709
+ content: {
710
+ type: "string",
711
+ description: "Raw markdown skill content to install when no URL is available (install only).",
712
+ },
713
+ steps: {
714
+ type: "array",
715
+ items: {
716
+ type: "object",
717
+ required: ["action", "params"],
718
+ properties: {
719
+ action: { type: "string" },
720
+ params: { type: "object" },
721
+ description: { type: "string" },
722
+ },
723
+ },
724
+ description: "Ordered steps (save only). Non-empty array of {action, params, description?}. action must be a non-empty string; params must be an object (use {} for parameter-less steps).",
725
+ },
726
+ notes: {
727
+ type: "array",
728
+ items: { type: "string" },
729
+ description: "Optional free-form notes (save only)",
730
+ },
731
+ skillName: {
732
+ type: "string",
733
+ description: "Override installed skill name. Alias of name for install.",
734
+ },
735
+ overwrite: {
736
+ type: "boolean",
737
+ description: "Install only: replace an existing skill with the same name, preserving stats.",
738
+ },
739
+ headers: {
740
+ type: "object",
741
+ additionalProperties: { type: "string" },
742
+ description: "Install from URL only: optional string headers for fetching the markdown.",
743
+ },
744
+ maxBytes: {
745
+ type: "number",
746
+ description: "Install from URL only: maximum bytes to fetch. Default 262144, hard cap 524288.",
747
+ },
748
+ timeoutMs: {
749
+ type: "number",
750
+ description: "Install from URL only: request timeout in milliseconds. Default 15000, hard cap 30000.",
751
+ },
752
+ },
753
+ required: ["action"],
754
+ },
755
+ };
756
+ export const skillToolTaskMode = {
757
+ name: "skill",
758
+ description: `Read-only access to installed browser automation skills during scheduled tasks.
759
+
760
+ Actions:
761
+ - list: list all skills with stats (no args)
762
+ - read: return capped markdown content of one installed skill (name)
763
+
764
+ Scheduled tasks cannot create, overwrite, install, or delete skills. If an
765
+ instruction skill mentions WebFetch or Bash(curl), map that request to the
766
+ web_fetch tool instead of trying to run shell commands.`,
767
+ parameters: {
768
+ type: "object",
769
+ properties: {
770
+ action: {
771
+ type: "string",
772
+ enum: ["list", "read"],
773
+ description: "Read-only skill action",
774
+ },
775
+ name: {
776
+ type: "string",
777
+ description: "Skill name (required for read)",
778
+ },
779
+ },
780
+ required: ["action"],
781
+ },
782
+ };
783
+ export const imageGenerationTool = {
784
+ name: "image_generation",
785
+ description: `Generate or edit images via an OpenAI-compatible image API.
786
+ Outputs are saved to <workspace>/attachments/ and, in a chat context,
787
+ auto-delivered to the user. In scheduled tasks (no chat frontend), auto-send
788
+ is a no-op and the filename is returned instead — it will appear in the task
789
+ completion notification.
790
+
791
+ Actions:
792
+
793
+ - generate: text-to-image via /v1/images/generations.
794
+ Args:
795
+ - prompt (required): text description of the image.
796
+ - size (optional): e.g. "1024x1024", "512x512".
797
+ - caption (optional): caption shown when delivered via Telegram.
798
+ - autoSend (optional, default true): set false to only save to disk so
799
+ the LLM can decide when/how to deliver via attachment.send.
800
+
801
+ - edit: image-to-image via /v1/images/edits (multipart). Use this to
802
+ modify an existing image, do localized inpainting with a mask, or fuse
803
+ several reference images.
804
+ Args:
805
+ - prompt (required): edit instruction.
806
+ - image (required): a path under attachments/ (string) OR an array of
807
+ such paths for multi-image fusion (max 3). Accepts .png/.jpg/.jpeg/.webp.
808
+ - mask (optional): path under attachments/ to a mask image; transparent
809
+ pixels mark the region to repaint.
810
+ - size, caption, autoSend: same as generate.`,
811
+ parameters: {
812
+ type: "object",
813
+ properties: {
814
+ action: {
815
+ type: "string",
816
+ enum: ["generate", "edit"],
817
+ description: "Image generation action",
818
+ },
819
+ prompt: {
820
+ type: "string",
821
+ description: "Text prompt (generate) or edit instruction (edit).",
822
+ },
823
+ image: {
824
+ description: "Edit only. A path under attachments/ (string) or an array of paths for multi-image fusion.",
825
+ oneOf: [
826
+ { type: "string" },
827
+ { type: "array", items: { type: "string" } },
828
+ ],
829
+ },
830
+ mask: {
831
+ type: "string",
832
+ description: "Edit only. Optional path under attachments/ to a mask image; transparent pixels are repainted.",
833
+ },
834
+ size: {
835
+ type: "string",
836
+ description: "Image size, e.g. '1024x1024'. Optional.",
837
+ },
838
+ caption: {
839
+ type: "string",
840
+ description: "Caption shown when the image is delivered.",
841
+ },
842
+ autoSend: {
843
+ type: "boolean",
844
+ description: "Deliver immediately if a frontend is registered. Default true.",
845
+ },
846
+ },
847
+ required: ["action", "prompt"],
848
+ },
849
+ };
850
+ export const orgTool = {
851
+ name: "org",
852
+ description: `管理企业组织架构、部门以及任务分发。
853
+ Actions(可用操作):
854
+ - list_team: 列出你所管辖部门内的所有员工及其当前状态(如在线、空闲/忙碌)。作为老板,在派发任务前应使用此功能了解有哪些可用的员工资源。
855
+ - assign: 指派任务。你可以指定单个员工的名字,或者使用 'all' 将任务群发给部门内的所有人。(注意:仅 boss 角色可用)
856
+ - list_departments: 列出组织注册中心里存在的所有部门名称。
857
+
858
+ 派发任务时 (assign),请在 instruction 中给出极其清晰详细的任务描述。员工收到并执行完毕后,会将最终结果回传给你。`,
859
+ parameters: {
860
+ type: "object",
861
+ properties: {
862
+ action: {
863
+ type: "string",
864
+ enum: ["list_team", "assign", "list_departments"],
865
+ description: "Organization action (组织管理动作)",
866
+ },
867
+ target: {
868
+ type: "string",
869
+ description: "员工的精确名称,或者填写 'all' 表示派发给全员。(仅用于 assign 动作)",
870
+ },
871
+ instruction: {
872
+ type: "string",
873
+ description: "要发送给员工的具体任务指令。",
874
+ },
875
+ },
876
+ required: ["action"],
877
+ },
878
+ };
879
+ export function getAllTools(opts) {
880
+ const tools = [
881
+ browserTool,
882
+ webFetchTool,
883
+ opts?.taskMode ? memoryToolTaskMode : memoryTool,
884
+ storeTool,
885
+ schedulerTool,
886
+ attachmentTool,
887
+ opts?.taskMode ? skillToolTaskMode : skillTool,
888
+ ];
889
+ if (opts?.imageGeneration)
890
+ tools.push(imageGenerationTool);
891
+ if (opts?.org)
892
+ tools.push(orgTool);
893
+ return tools;
894
+ }
895
+ //# sourceMappingURL=tools.js.map