@songtonyli/dsh-cli 0.1.90 → 0.1.91

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 (621) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +26 -13
  4. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +6 -3
  5. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +51 -1
  6. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -1
  7. package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
  8. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
  9. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
  10. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
  11. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -0
  12. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
  13. package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
  14. package/node_modules/@aws-sdk/core/package.json +2 -2
  15. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  16. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  17. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  18. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  19. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  20. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  21. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  22. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  23. package/node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +4 -2
  24. package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHandlingMiddleware.js +2 -1
  25. package/node_modules/@aws-sdk/middleware-eventstream/dist-es/eventStreamHeaderMiddleware.js +2 -1
  26. package/node_modules/@aws-sdk/middleware-eventstream/package.json +1 -1
  27. package/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
  28. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  29. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  30. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  31. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  32. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  33. package/node_modules/@aws-sdk/nested-clients/package.json +3 -3
  34. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +1 -1
  35. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  36. package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
  37. package/node_modules/@deepseek-ai/cordis/README.md +6 -2
  38. package/node_modules/@deepseek-ai/cordis/lib/index.js +955 -909
  39. package/node_modules/@deepseek-ai/cordis/src/context.ts +1 -1
  40. package/node_modules/@deepseek-ai/cordis/src/events.ts +81 -62
  41. package/node_modules/@deepseek-ai/cordis/src/fiber.ts +95 -58
  42. package/node_modules/@deepseek-ai/cordis/src/logger.ts +10 -5
  43. package/node_modules/@deepseek-ai/cordis/src/reflect.ts +37 -19
  44. package/node_modules/@deepseek-ai/cordis/src/utils.ts +28 -21
  45. package/node_modules/@deepseek-ai/cordis-plugin-include/lib/index.js +2 -2
  46. package/node_modules/@deepseek-ai/cordis-plugin-include/src/index.ts +2 -6
  47. package/node_modules/@deepseek-ai/cordis-plugin-loader/README.md +4 -0
  48. package/node_modules/@deepseek-ai/cordis-plugin-loader/lib/index.js +40 -39
  49. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/entry.ts +13 -13
  50. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/group.ts +1 -3
  51. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/config/isolate.ts +10 -7
  52. package/node_modules/@deepseek-ai/cordis-plugin-loader/src/index.ts +17 -20
  53. package/node_modules/@deepseek-ai/dsh/package.json +0 -1
  54. package/node_modules/@deepseek-ai/dsh-action-cards/lib/typert.host.js +1 -1
  55. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +5 -3
  56. package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-plugin-development/references/host-plugin.md +13 -0
  57. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/index.js +2 -2
  58. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +1 -1
  59. package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/types/mount.js +2 -2
  60. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.browser.js +1 -1
  61. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/client.node.js +1 -1
  62. package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/client/remote-events.js +1 -1
  63. package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +7464 -2004
  64. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +77 -92
  65. package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +47 -3
  66. package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +1 -1
  67. package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +8 -19
  68. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +3 -0
  69. package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-modules/README.i18n.yaml +2 -2
  71. package/node_modules/@deepseek-ai/dsh-client-modules/README.md +3 -1
  72. package/node_modules/@deepseek-ai/dsh-client-modules/README.zh.md +3 -1
  73. package/node_modules/@deepseek-ai/dsh-client-modules/lib/client.js +1 -1
  74. package/node_modules/@deepseek-ai/dsh-client-modules/lib/index.js +37 -15
  75. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.i18n.yaml +4 -4
  76. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.md +3 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/README.zh.md +3 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/lib/client.js +19 -6
  79. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +4 -2
  80. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +10 -10
  81. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +8 -2
  82. package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +8 -2
  83. package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +146 -30
  84. package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +4 -2
  85. package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.i18n.yaml +2 -2
  86. package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.md +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.zh.md +1 -1
  88. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +295 -274
  89. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/README.i18n.yaml +40 -0
  90. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/README.md +100 -0
  91. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/README.zh.md +100 -0
  92. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/lib/client.js +1445 -0
  93. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/lib/index.js +6 -0
  94. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/de.json +5 -0
  95. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/en.json +5 -0
  96. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/es.json +5 -0
  97. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/fr.json +5 -0
  98. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/ja.json +5 -0
  99. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/pt.json +5 -0
  100. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/ru.json +5 -0
  101. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/locale/zh.json +5 -0
  102. package/node_modules/@deepseek-ai/dsh-client-ui-context-menu/package.json +61 -0
  103. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.i18n.yaml +4 -4
  104. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.md +4 -0
  105. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/README.zh.md +4 -0
  106. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +119 -55
  107. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +4 -2
  108. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.i18n.yaml +2 -2
  109. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.md +2 -0
  110. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.zh.md +2 -0
  111. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +19 -7
  112. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +4 -2
  113. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/README.i18n.yaml +40 -0
  114. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/README.md +92 -0
  115. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/README.zh.md +92 -0
  116. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/lib/client.js +1875 -0
  117. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/lib/index.js +6 -0
  118. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/de.json +5 -0
  119. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/en.json +5 -0
  120. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/es.json +5 -0
  121. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/fr.json +5 -0
  122. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/ja.json +5 -0
  123. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/pt.json +5 -0
  124. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/ru.json +5 -0
  125. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/locale/zh.json +5 -0
  126. package/node_modules/@deepseek-ai/dsh-client-ui-file-actions/package.json +65 -0
  127. package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.i18n.yaml +6 -6
  128. package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.md +9 -3
  129. package/node_modules/@deepseek-ai/dsh-client-ui-layout/README.zh.md +9 -3
  130. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +91 -26
  131. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.i18n.yaml +2 -2
  132. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.md +8 -0
  133. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.zh.md +8 -0
  134. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +431 -2
  135. package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +13 -2
  136. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +8 -8
  137. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +6 -3
  138. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +6 -3
  139. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +111 -48
  140. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/README.i18n.yaml +2 -2
  141. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/README.md +1 -1
  142. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/README.zh.md +1 -1
  143. package/node_modules/@deepseek-ai/dsh-client-ui-plugin-market/lib/client.js +2 -1
  144. package/node_modules/@deepseek-ai/dsh-client-ui-reference/README.i18n.yaml +2 -2
  145. package/node_modules/@deepseek-ai/dsh-client-ui-reference/README.md +2 -0
  146. package/node_modules/@deepseek-ai/dsh-client-ui-reference/README.zh.md +2 -0
  147. package/node_modules/@deepseek-ai/dsh-client-ui-reference/lib/client.js +28 -5
  148. package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +4 -2
  149. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.i18n.yaml +19 -19
  150. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.md +25 -39
  151. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/README.zh.md +23 -37
  152. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/lib/client.js +10359 -3743
  153. package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +1 -0
  154. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.i18n.yaml +2 -2
  155. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.md +1 -1
  156. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/README.zh.md +1 -1
  157. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +76 -58
  158. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +6 -6
  159. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +5 -1
  160. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +5 -1
  161. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +46 -18
  162. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.i18n.yaml +8 -8
  163. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.md +7 -5
  164. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/README.zh.md +7 -5
  165. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/lib/client.js +349 -251
  166. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +5 -2
  167. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.i18n.yaml +20 -14
  168. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.md +44 -11
  169. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.zh.md +44 -11
  170. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +1571 -472
  171. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +5 -3
  172. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.i18n.yaml +12 -12
  173. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.md +15 -7
  174. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.zh.md +15 -7
  175. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +435 -52
  176. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +4 -2
  177. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +8 -0
  178. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.i18n.yaml +2 -2
  179. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.md +1 -1
  180. package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.zh.md +1 -1
  181. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  182. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +4 -4
  183. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +5 -1
  184. package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +5 -1
  185. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +195 -59
  186. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +5 -2
  187. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.i18n.yaml +4 -4
  188. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.md +6 -2
  189. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/README.zh.md +6 -2
  190. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +127 -27
  191. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +15 -15
  192. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +16 -8
  193. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +17 -8
  194. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +523 -480
  195. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +4 -2
  196. package/node_modules/@deepseek-ai/dsh-commands/README.i18n.yaml +4 -4
  197. package/node_modules/@deepseek-ai/dsh-commands/README.md +3 -0
  198. package/node_modules/@deepseek-ai/dsh-commands/README.zh.md +3 -0
  199. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +1 -1
  200. package/node_modules/@deepseek-ai/dsh-commands/lib/types/builtin.js +39 -0
  201. package/node_modules/@deepseek-ai/dsh-commands/package.json +5 -1
  202. package/node_modules/@deepseek-ai/dsh-compaction-basic/README.i18n.yaml +4 -10
  203. package/node_modules/@deepseek-ai/dsh-compaction-basic/README.md +2 -0
  204. package/node_modules/@deepseek-ai/dsh-compaction-basic/README.zh.md +2 -0
  205. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +233 -56
  206. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +2 -2
  207. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.i18n.yaml +2 -2
  208. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.md +2 -0
  209. package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/README.zh.md +2 -0
  210. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.i18n.yaml +16 -19
  211. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.md +11 -22
  212. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.zh.md +11 -22
  213. package/node_modules/@deepseek-ai/dsh-experimental-auto-review/lib/index.js +2 -0
  214. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-cot-translation/lib/client.js +1 -1
  215. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.i18n.yaml +12 -12
  216. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.md +18 -10
  217. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/README.zh.md +20 -12
  218. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/client.js +3338 -297
  219. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/index.js +159 -52
  220. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.host.js +298 -18
  221. package/node_modules/@deepseek-ai/dsh-experimental-client-ui-forge/lib/typert.remote-client.js +267 -13
  222. package/node_modules/@deepseek-ai/dsh-experimental-forge/README.i18n.yaml +2 -2
  223. package/node_modules/@deepseek-ai/dsh-experimental-forge/README.md +5 -1
  224. package/node_modules/@deepseek-ai/dsh-experimental-forge/README.zh.md +5 -1
  225. package/node_modules/@deepseek-ai/dsh-experimental-forge/lib/index.js +48 -6
  226. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/README.i18n.yaml +8 -8
  227. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/README.md +9 -5
  228. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/README.zh.md +9 -5
  229. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/lib/index.js +301 -31
  230. package/node_modules/@deepseek-ai/dsh-experimental-forge-github/package.json +1 -0
  231. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/client.js +5 -58
  232. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/lib/index.js +5 -2
  233. package/node_modules/@deepseek-ai/dsh-experimental-liveshare/package.json +1 -1
  234. package/node_modules/@deepseek-ai/dsh-experimental-session-inspector/lib/client.js +77 -92
  235. package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/index.js +2 -2
  236. package/node_modules/@deepseek-ai/dsh-experimental-translator/lib/types/deepseek.js +2 -2
  237. package/node_modules/@deepseek-ai/dsh-fs/README.i18n.yaml +12 -12
  238. package/node_modules/@deepseek-ai/dsh-fs/README.md +15 -7
  239. package/node_modules/@deepseek-ai/dsh-fs/README.zh.md +15 -7
  240. package/node_modules/@deepseek-ai/dsh-fs/lib/index.js +21 -2
  241. package/node_modules/@deepseek-ai/dsh-fs/package.json +3 -0
  242. package/node_modules/@deepseek-ai/dsh-fs-local/README.i18n.yaml +4 -4
  243. package/node_modules/@deepseek-ai/dsh-fs-local/README.md +4 -2
  244. package/node_modules/@deepseek-ai/dsh-fs-local/README.zh.md +4 -2
  245. package/node_modules/@deepseek-ai/dsh-fs-local/lib/index.js +156 -30
  246. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +2 -1
  247. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.i18n.yaml +6 -6
  248. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.md +4 -2
  249. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/README.zh.md +4 -2
  250. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/lib/index.js +12 -4
  251. package/node_modules/@deepseek-ai/dsh-fs-patch/LICENSE +235 -0
  252. package/node_modules/@deepseek-ai/dsh-fs-patch/README.i18n.yaml +40 -0
  253. package/node_modules/@deepseek-ai/dsh-fs-patch/README.md +112 -0
  254. package/node_modules/@deepseek-ai/dsh-fs-patch/README.zh.md +112 -0
  255. package/node_modules/@deepseek-ai/dsh-fs-patch/lib/index.js +275 -0
  256. package/node_modules/@deepseek-ai/dsh-fs-patch/package.json +35 -0
  257. package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.i18n.yaml +6 -6
  258. package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.md +4 -2
  259. package/node_modules/@deepseek-ai/dsh-fs-sandbox/README.zh.md +4 -2
  260. package/node_modules/@deepseek-ai/dsh-fs-sandbox/lib/index.js +24 -1
  261. package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +1 -1
  262. package/node_modules/@deepseek-ai/dsh-hmr/lib/index.js +4 -3
  263. package/node_modules/@deepseek-ai/dsh-llm/README.i18n.yaml +2 -2
  264. package/node_modules/@deepseek-ai/dsh-llm/README.md +2 -0
  265. package/node_modules/@deepseek-ai/dsh-llm/README.zh.md +2 -0
  266. package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +9 -1
  267. package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +4 -3
  268. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +5 -2
  269. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +7 -0
  270. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +7 -0
  271. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +27 -11
  272. package/node_modules/@deepseek-ai/dsh-official-bundles/README.i18n.yaml +2 -2
  273. package/node_modules/@deepseek-ai/dsh-official-bundles/README.md +1 -1
  274. package/node_modules/@deepseek-ai/dsh-official-bundles/README.zh.md +1 -1
  275. package/node_modules/@deepseek-ai/dsh-official-bundles/lib/index.js +86 -52
  276. package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +1 -1
  277. package/node_modules/@deepseek-ai/dsh-plugin-manager/README.i18n.yaml +2 -2
  278. package/node_modules/@deepseek-ai/dsh-plugin-manager/README.md +4 -4
  279. package/node_modules/@deepseek-ai/dsh-plugin-manager/README.zh.md +4 -4
  280. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/index.js +32 -12
  281. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.host.js +31 -31
  282. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/typert.remote-client.js +27 -27
  283. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/github-connection.js +13 -3
  284. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/index.js +14 -2
  285. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/install-spec.js +1 -1
  286. package/node_modules/@deepseek-ai/dsh-plugin-manager/lib/types/operations.js +2 -0
  287. package/node_modules/@deepseek-ai/dsh-plugin-recommendations/lib/typert.host.js +1 -1
  288. package/node_modules/@deepseek-ai/dsh-schedule/README.i18n.yaml +72 -39
  289. package/node_modules/@deepseek-ai/dsh-schedule/README.md +180 -56
  290. package/node_modules/@deepseek-ai/dsh-schedule/README.zh.md +185 -61
  291. package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +1270 -992
  292. package/node_modules/@deepseek-ai/dsh-schedule/lib/typert.host.js +1842 -274
  293. package/node_modules/@deepseek-ai/dsh-schedule/lib/typert.remote-client.js +1712 -194
  294. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/delivery-history.js +7 -20
  295. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/domain.js +199 -655
  296. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/index.js +452 -204
  297. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/runtime.js +389 -70
  298. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/storage.js +85 -16
  299. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/types.js +1 -1
  300. package/node_modules/@deepseek-ai/dsh-schedule/lib/types/update.js +72 -144
  301. package/node_modules/@deepseek-ai/dsh-schedule/package.json +5 -2
  302. package/node_modules/@deepseek-ai/dsh-sdk-app/README.i18n.yaml +12 -12
  303. package/node_modules/@deepseek-ai/dsh-sdk-app/README.md +7 -4
  304. package/node_modules/@deepseek-ai/dsh-sdk-app/README.zh.md +7 -4
  305. package/node_modules/@deepseek-ai/dsh-sdk-app/cordis.patch.yml +3 -0
  306. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.i18n.yaml +52 -4
  307. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.md +77 -1
  308. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/README.zh.md +77 -1
  309. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/lib/index.js +306 -2
  310. package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +15 -0
  311. package/node_modules/@deepseek-ai/dsh-sdk-protocol/README.i18n.yaml +4 -4
  312. package/node_modules/@deepseek-ai/dsh-sdk-protocol/README.md +10 -2
  313. package/node_modules/@deepseek-ai/dsh-sdk-protocol/README.zh.md +10 -2
  314. package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +2 -0
  315. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.i18n.yaml +9 -6
  316. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.md +20 -1
  317. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/README.zh.md +20 -1
  318. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/index.js +91 -57
  319. package/node_modules/@deepseek-ai/dsh-session-log-deepseek/lib/types/index.js +100 -66
  320. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +947 -917
  321. package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +1 -1
  322. package/node_modules/@deepseek-ai/dsh-session-title-llm/README.i18n.yaml +2 -2
  323. package/node_modules/@deepseek-ai/dsh-session-title-llm/README.md +1 -1
  324. package/node_modules/@deepseek-ai/dsh-session-title-llm/README.zh.md +1 -1
  325. package/node_modules/@deepseek-ai/dsh-settings/lib/index.js +2 -2
  326. package/node_modules/@deepseek-ai/dsh-settings/lib/types/index.js +2 -2
  327. package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +1 -1
  328. package/node_modules/@deepseek-ai/dsh-system-prompt/lib/index.js +2 -0
  329. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +260 -92
  330. package/node_modules/@deepseek-ai/dsh-tool-fs/README.i18n.yaml +38 -20
  331. package/node_modules/@deepseek-ai/dsh-tool-fs/README.md +63 -5
  332. package/node_modules/@deepseek-ai/dsh-tool-fs/README.zh.md +63 -5
  333. package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +784 -27
  334. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +4 -1
  335. package/node_modules/@deepseek-ai/dsh-tool-schedule/README.i18n.yaml +50 -32
  336. package/node_modules/@deepseek-ai/dsh-tool-schedule/README.md +47 -20
  337. package/node_modules/@deepseek-ai/dsh-tool-schedule/README.zh.md +47 -20
  338. package/node_modules/@deepseek-ai/dsh-tool-schedule/lib/index.js +477 -445
  339. package/node_modules/@deepseek-ai/dsh-tool-schedule/package.json +7 -2
  340. package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +1 -1
  341. package/node_modules/@deepseek-ai/dsh-util-time/README.i18n.yaml +10 -10
  342. package/node_modules/@deepseek-ai/dsh-util-time/README.md +11 -7
  343. package/node_modules/@deepseek-ai/dsh-util-time/README.zh.md +11 -7
  344. package/node_modules/@deepseek-ai/dsh-util-time/lib/index.js +1020 -3
  345. package/node_modules/@deepseek-ai/dsh-util-time/package.json +4 -2
  346. package/node_modules/@deepseek-ai/dsh-util-values/README.i18n.yaml +2 -2
  347. package/node_modules/@deepseek-ai/dsh-util-values/README.md +1 -1
  348. package/node_modules/@deepseek-ai/dsh-util-values/README.zh.md +1 -1
  349. package/node_modules/@deepseek-ai/dsh-util-values/lib/index.js +77 -92
  350. package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +5 -1
  351. package/node_modules/@deepseek-ai/dsh-web-app/package.json +3 -1
  352. package/node_modules/@deepseek-ai/dsh-web-app/presets/cordis.patch.yml +3 -0
  353. package/node_modules/@deepseek-ai/dsh-web-app/presets/ptc.patch.yml +3 -0
  354. package/node_modules/@deepseek-ai/dsh-web-app/presets/standard.patch.yml +3 -0
  355. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BCbHmUSs.js +197 -0
  356. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BUDGJY4R.css +1 -0
  357. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
  358. package/node_modules/@deepseek-ai/dsh-workflow-ptc/lib/index.js +1 -1
  359. package/node_modules/@deepseek-ai/dsh-workspace-changes/README.i18n.yaml +4 -4
  360. package/node_modules/@deepseek-ai/dsh-workspace-changes/README.md +3 -1
  361. package/node_modules/@deepseek-ai/dsh-workspace-changes/README.zh.md +4 -2
  362. package/node_modules/@deepseek-ai/dsh-workspace-changes/lib/index.js +5 -0
  363. package/node_modules/@deepseek-ai/dsh-workspace-changes/lib/types/index.js +5 -0
  364. package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +4 -1
  365. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.cjs +16917 -0
  366. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_attributes.mjs +15193 -0
  367. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.cjs +325 -0
  368. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_events.mjs +295 -0
  369. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.cjs +4642 -0
  370. package/node_modules/@opentelemetry/semantic-conventions/dist/experimental_metrics.mjs +4155 -0
  371. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.cjs +2495 -0
  372. package/node_modules/@opentelemetry/semantic-conventions/dist/index-incubating.mjs +7 -0
  373. package/node_modules/@opentelemetry/semantic-conventions/dist/index.cjs +662 -0
  374. package/node_modules/@opentelemetry/semantic-conventions/dist/index.mjs +6 -0
  375. package/node_modules/@opentelemetry/semantic-conventions/dist/internal/utils.cjs +20 -0
  376. package/node_modules/@opentelemetry/semantic-conventions/dist/internal/utils.mjs +20 -0
  377. package/node_modules/@opentelemetry/semantic-conventions/dist/resource/SemanticResourceAttributes.cjs +1326 -0
  378. package/node_modules/@opentelemetry/semantic-conventions/dist/resource/SemanticResourceAttributes.mjs +1188 -0
  379. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.cjs +1947 -0
  380. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_attributes.mjs +1756 -0
  381. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_events.cjs +9 -0
  382. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_events.mjs +9 -0
  383. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.cjs +362 -0
  384. package/node_modules/@opentelemetry/semantic-conventions/dist/stable_metrics.mjs +312 -0
  385. package/node_modules/@opentelemetry/semantic-conventions/dist/trace/SemanticAttributes.cjs +2508 -0
  386. package/node_modules/@opentelemetry/semantic-conventions/dist/trace/SemanticAttributes.mjs +2236 -0
  387. package/node_modules/@opentelemetry/semantic-conventions/package.json +22 -35
  388. package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
  389. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +32 -16
  390. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +26 -13
  391. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
  392. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
  393. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
  394. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
  395. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +10 -5
  396. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +18 -9
  397. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +18 -9
  398. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +42 -24
  399. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +20 -10
  400. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +24 -12
  401. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +13 -4
  402. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +7 -1
  403. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +13 -4
  404. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
  405. package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
  406. package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
  407. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
  408. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
  409. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
  410. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
  411. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -1
  412. package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
  413. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
  414. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +4 -2
  415. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
  416. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
  417. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
  418. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
  419. package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
  420. package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
  421. package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
  422. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
  423. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
  424. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
  425. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +2 -1
  426. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
  427. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
  428. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
  429. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
  430. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
  431. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -2
  432. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -1
  433. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +7 -5
  434. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +7 -5
  435. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +7 -5
  436. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +6 -3
  437. package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
  438. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
  439. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
  440. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
  441. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +6 -3
  442. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
  443. package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
  444. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
  445. package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
  446. package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
  447. package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
  448. package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
  449. package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
  450. package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
  451. package/node_modules/@smithy/core/package.json +1 -1
  452. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +19 -7
  453. package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +2 -1
  454. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +11 -6
  455. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +6 -0
  456. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  457. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +23 -11
  458. package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -2
  459. package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
  460. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +5 -1
  461. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +2 -1
  462. package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +2 -1
  463. package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +6 -3
  464. package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -1
  465. package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -1
  466. package/node_modules/@smithy/signature-v4/package.json +2 -2
  467. package/node_modules/@types/node/README.md +1 -1
  468. package/node_modules/@types/node/package.json +2 -2
  469. package/node_modules/encodeurl/README.md +14 -0
  470. package/node_modules/encodeurl/index.js +5 -10
  471. package/node_modules/encodeurl/package.json +7 -3
  472. package/node_modules/hast-util-to-html/lib/handle/comment.js +6 -1
  473. package/node_modules/hast-util-to-html/lib/handle/doctype.js +1 -1
  474. package/node_modules/hast-util-to-html/lib/handle/element.js +33 -9
  475. package/node_modules/hast-util-to-html/lib/handle/index.js +1 -1
  476. package/node_modules/hast-util-to-html/lib/handle/raw.js +1 -1
  477. package/node_modules/hast-util-to-html/lib/handle/root.js +1 -1
  478. package/node_modules/hast-util-to-html/lib/handle/text.js +1 -1
  479. package/node_modules/hast-util-to-html/lib/index.js +9 -4
  480. package/node_modules/hast-util-to-html/lib/omission/closing.js +7 -5
  481. package/node_modules/hast-util-to-html/lib/omission/omission.js +0 -1
  482. package/node_modules/hast-util-to-html/lib/omission/opening.js +4 -2
  483. package/node_modules/hast-util-to-html/lib/omission/util/siblings.js +3 -0
  484. package/node_modules/hast-util-to-html/package.json +5 -23
  485. package/node_modules/hast-util-to-html/readme.md +3 -2
  486. package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
  487. package/node_modules/jose/package.json +1 -1
  488. package/node_modules/rrule/LICENCE +65 -0
  489. package/node_modules/rrule/README.md +837 -0
  490. package/node_modules/rrule/dist/es5/rrule.js +3803 -0
  491. package/node_modules/rrule/dist/es5/rrule.min.js +2 -0
  492. package/node_modules/rrule/dist/esm/cache.js +95 -0
  493. package/node_modules/rrule/dist/esm/callbackiterresult.js +24 -0
  494. package/node_modules/rrule/dist/esm/datetime.js +186 -0
  495. package/node_modules/rrule/dist/esm/dateutil.js +161 -0
  496. package/node_modules/rrule/dist/esm/datewithzone.js +36 -0
  497. package/node_modules/rrule/dist/esm/helpers.js +118 -0
  498. package/node_modules/rrule/dist/esm/index.js +22 -0
  499. package/node_modules/rrule/dist/esm/iter/index.js +138 -0
  500. package/node_modules/rrule/dist/esm/iter/poslist.js +42 -0
  501. package/node_modules/rrule/dist/esm/iterinfo/easter.js +21 -0
  502. package/node_modules/rrule/dist/esm/iterinfo/index.js +188 -0
  503. package/node_modules/rrule/dist/esm/iterinfo/monthinfo.js +51 -0
  504. package/node_modules/rrule/dist/esm/iterinfo/yearinfo.js +128 -0
  505. package/node_modules/rrule/dist/esm/iterresult.js +88 -0
  506. package/node_modules/rrule/dist/esm/iterset.js +63 -0
  507. package/node_modules/rrule/dist/esm/masks.js +30 -0
  508. package/node_modules/rrule/dist/esm/nlp/i18n.js +74 -0
  509. package/node_modules/rrule/dist/esm/nlp/index.js +122 -0
  510. package/node_modules/rrule/dist/esm/nlp/parsetext.js +391 -0
  511. package/node_modules/rrule/dist/esm/nlp/totext.js +395 -0
  512. package/node_modules/rrule/dist/esm/optionstostring.js +98 -0
  513. package/node_modules/rrule/dist/esm/parseoptions.js +201 -0
  514. package/node_modules/rrule/dist/esm/parsestring.js +128 -0
  515. package/node_modules/rrule/dist/esm/rrule.js +232 -0
  516. package/node_modules/rrule/dist/esm/rruleset.js +182 -0
  517. package/node_modules/rrule/dist/esm/rrulestr.js +188 -0
  518. package/node_modules/rrule/dist/esm/types.js +14 -0
  519. package/node_modules/rrule/dist/esm/weekday.js +45 -0
  520. package/node_modules/rrule/package.json +79 -0
  521. package/package.json +32 -31
  522. package/node_modules/@deepseek-ai/dsh-computer-use/README.i18n.yaml +0 -37
  523. package/node_modules/@deepseek-ai/dsh-computer-use/README.md +0 -90
  524. package/node_modules/@deepseek-ai/dsh-computer-use/README.zh.md +0 -90
  525. package/node_modules/@deepseek-ai/dsh-computer-use/lib/index.js +0 -35
  526. package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/brand.js +0 -10
  527. package/node_modules/@deepseek-ai/dsh-computer-use/lib/types/index.js +0 -36
  528. package/node_modules/@deepseek-ai/dsh-computer-use/locale/de.json +0 -6
  529. package/node_modules/@deepseek-ai/dsh-computer-use/locale/en.json +0 -6
  530. package/node_modules/@deepseek-ai/dsh-computer-use/locale/es.json +0 -6
  531. package/node_modules/@deepseek-ai/dsh-computer-use/locale/fr.json +0 -6
  532. package/node_modules/@deepseek-ai/dsh-computer-use/locale/ja.json +0 -6
  533. package/node_modules/@deepseek-ai/dsh-computer-use/locale/pt.json +0 -6
  534. package/node_modules/@deepseek-ai/dsh-computer-use/locale/ru.json +0 -6
  535. package/node_modules/@deepseek-ai/dsh-computer-use/locale/zh.json +0 -6
  536. package/node_modules/@deepseek-ai/dsh-computer-use/package.json +0 -44
  537. package/node_modules/@deepseek-ai/dsh-cua/README.i18n.yaml +0 -49
  538. package/node_modules/@deepseek-ai/dsh-cua/README.md +0 -130
  539. package/node_modules/@deepseek-ai/dsh-cua/README.zh.md +0 -130
  540. package/node_modules/@deepseek-ai/dsh-cua/lib/api.js +0 -597
  541. package/node_modules/@deepseek-ai/dsh-cua/lib/bridge.js +0 -611
  542. package/node_modules/@deepseek-ai/dsh-cua/lib/client.js +0 -1758
  543. package/node_modules/@deepseek-ai/dsh-cua/lib/index.js +0 -1916
  544. package/node_modules/@deepseek-ai/dsh-cua/lib/native-client.js +0 -285
  545. package/node_modules/@deepseek-ai/dsh-cua/lib/protocol.js +0 -305
  546. package/node_modules/@deepseek-ai/dsh-cua/lib/remote-types.js +0 -1
  547. package/node_modules/@deepseek-ai/dsh-cua/lib/typert.host.js +0 -416
  548. package/node_modules/@deepseek-ai/dsh-cua/lib/typert.remote-client.js +0 -301
  549. package/node_modules/@deepseek-ai/dsh-cua/locale/de.json +0 -6
  550. package/node_modules/@deepseek-ai/dsh-cua/locale/en.json +0 -6
  551. package/node_modules/@deepseek-ai/dsh-cua/locale/es.json +0 -6
  552. package/node_modules/@deepseek-ai/dsh-cua/locale/fr.json +0 -6
  553. package/node_modules/@deepseek-ai/dsh-cua/locale/ja.json +0 -6
  554. package/node_modules/@deepseek-ai/dsh-cua/locale/pt.json +0 -6
  555. package/node_modules/@deepseek-ai/dsh-cua/locale/ru.json +0 -6
  556. package/node_modules/@deepseek-ai/dsh-cua/locale/zh.json +0 -6
  557. package/node_modules/@deepseek-ai/dsh-cua/package.json +0 -151
  558. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.i18n.yaml +0 -46
  559. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.md +0 -94
  560. package/node_modules/@deepseek-ai/dsh-cua-bundle/README.zh.md +0 -94
  561. package/node_modules/@deepseek-ai/dsh-cua-bundle/cordis.patch.yml +0 -10
  562. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.md +0 -1
  563. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/DETAIL.zh.md +0 -1
  564. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.svg +0 -33
  565. package/node_modules/@deepseek-ai/dsh-cua-bundle/docs/preview.zh.svg +0 -33
  566. package/node_modules/@deepseek-ai/dsh-cua-bundle/icon.svg +0 -35
  567. package/node_modules/@deepseek-ai/dsh-cua-bundle/lib/index.js +0 -1
  568. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/de.json +0 -7
  569. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/en.json +0 -7
  570. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/es.json +0 -7
  571. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/fr.json +0 -7
  572. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ja.json +0 -7
  573. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/pt.json +0 -7
  574. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/ru.json +0 -7
  575. package/node_modules/@deepseek-ai/dsh-cua-bundle/locale/zh.json +0 -7
  576. package/node_modules/@deepseek-ai/dsh-cua-bundle/package.json +0 -58
  577. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index--TtJvO-i.js +0 -197
  578. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Jtzf36XE.css +0 -1
  579. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +0 -14991
  580. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js +0 -298
  581. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +0 -4060
  582. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js +0 -13
  583. package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js +0 -16
  584. package/node_modules/@opentelemetry/semantic-conventions/build/esm/internal/utils.js +0 -23
  585. package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/SemanticResourceAttributes.js +0 -1250
  586. package/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/index.js +0 -10
  587. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +0 -1733
  588. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js +0 -12
  589. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_metrics.js +0 -315
  590. package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/SemanticAttributes.js +0 -2360
  591. package/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/index.js +0 -10
  592. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +0 -7
  593. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +0 -14991
  594. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js +0 -298
  595. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +0 -4060
  596. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js +0 -13
  597. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js +0 -16
  598. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/internal/utils.js +0 -23
  599. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/resource/SemanticResourceAttributes.js +0 -1250
  600. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/resource/index.js +0 -10
  601. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +0 -1733
  602. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js +0 -12
  603. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_metrics.js +0 -315
  604. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/trace/SemanticAttributes.js +0 -2360
  605. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/trace/index.js +0 -10
  606. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +0 -7
  607. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +0 -15049
  608. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +0 -301
  609. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +0 -4072
  610. package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js +0 -29
  611. package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js +0 -32
  612. package/node_modules/@opentelemetry/semantic-conventions/build/src/internal/utils.js +0 -27
  613. package/node_modules/@opentelemetry/semantic-conventions/build/src/resource/SemanticResourceAttributes.js +0 -1255
  614. package/node_modules/@opentelemetry/semantic-conventions/build/src/resource/index.js +0 -26
  615. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +0 -1759
  616. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js +0 -15
  617. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_metrics.js +0 -319
  618. package/node_modules/@opentelemetry/semantic-conventions/build/src/trace/SemanticAttributes.js +0 -2368
  619. package/node_modules/@opentelemetry/semantic-conventions/build/src/trace/index.js +0 -26
  620. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +0 -10
  621. /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
@@ -1,4 +1,5 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
+ import rrulePackage from "rrule";
2
3
  //#region lib/types/instant.js
3
4
  /**
4
5
  * Strict instant and local-calendar vocabulary for the boundaries that accept a
@@ -312,10 +313,1025 @@ var Duration = class Duration {
312
313
  }
313
314
  };
314
315
  //#endregion
316
+ //#region lib/types/recurrence.js
317
+ /** Bounded calendar recurrence shared by consumers of Cron and RRULE. */
318
+ /** Internal validation failure, contained by the public parsers. */
319
+ var RecurrenceInputError = class extends Error {
320
+ reason;
321
+ constructor(reason, message, options) {
322
+ super(message, options);
323
+ this.reason = reason;
324
+ }
325
+ };
326
+ /**
327
+ * Contain recurrence validation failures while preserving unexpected implementation errors.
328
+ * @param parse - Synchronous rule constructor whose input failures use RecurrenceInputError.
329
+ * @returns The parsed value or its validation refusal.
330
+ */
331
+ function parseRecurrence(parse) {
332
+ try {
333
+ return {
334
+ kind: "accepted",
335
+ rule: parse()
336
+ };
337
+ } catch (error) {
338
+ if (!(error instanceof RecurrenceInputError)) throw error;
339
+ return {
340
+ kind: "rejected",
341
+ reason: error.reason,
342
+ detail: error.message,
343
+ ...error.cause === void 0 ? {} : { cause: error.cause }
344
+ };
345
+ }
346
+ }
347
+ /**
348
+ * Validate the explicit decision and its committed lower bound before calendar arithmetic.
349
+ * @param scheduledAt - Committed canonical four-digit-year UTC occurrence with milliseconds.
350
+ * @param acceptedAt - Explicit epoch milliseconds of the delivery decision.
351
+ * @returns The committed epoch, or throws RangeError for an invalid decision.
352
+ */
353
+ function recurrenceDecision(scheduledAt, acceptedAt) {
354
+ const savedTarget = fourDigitYearEpoch(scheduledAt);
355
+ if (!isFourDigitYearInstant(acceptedAt) || savedTarget.kind === "rejected" || acceptedAt < savedTarget.epoch) throw new RangeError("Recurrence decision must be representable and at or after its committed target");
356
+ return savedTarget.epoch;
357
+ }
358
+ //#endregion
359
+ //#region lib/types/cron.js
360
+ /** Strict five-field Cron parsing and bounded, zone-aware occurrence arithmetic. */
361
+ /** Gregorian calendar repetition bounds both forward and backward searches. */
362
+ const CRON_SEARCH_HORIZON_YEARS = 400;
363
+ /** Project an explicit instant into a calendar date in the rule's zone. */
364
+ function localDate(epoch, timeZone) {
365
+ return Temporal.Instant.fromEpochMilliseconds(epoch).toZonedDateTimeISO(timeZone).toPlainDate();
366
+ }
367
+ const CRON_FIELDS = [
368
+ {
369
+ name: "minute",
370
+ min: 0,
371
+ max: 59,
372
+ canonicalMax: 59
373
+ },
374
+ {
375
+ name: "hour",
376
+ min: 0,
377
+ max: 23,
378
+ canonicalMax: 23
379
+ },
380
+ {
381
+ name: "day-of-month",
382
+ min: 1,
383
+ max: 31,
384
+ canonicalMax: 31
385
+ },
386
+ {
387
+ name: "month",
388
+ min: 1,
389
+ max: 12,
390
+ canonicalMax: 12
391
+ },
392
+ {
393
+ name: "day-of-week",
394
+ min: 0,
395
+ max: 7,
396
+ canonicalMax: 6
397
+ }
398
+ ];
399
+ /** Build the stable diagnostic for one malformed cron field element. */
400
+ function invalidCronField(spec, element) {
401
+ return new RecurrenceInputError("syntax", `cron.expression ${spec.name} field element ${JSON.stringify(element)} must be *, a value, a-b, */n, a-b/n, or a comma-separated list of those.`);
402
+ }
403
+ /** Read one in-range cron field value. */
404
+ function cronFieldValue(text, spec) {
405
+ const value = Number(text);
406
+ if (!Number.isSafeInteger(value) || value < spec.min || value > spec.max) throw new RecurrenceInputError("syntax", `cron.expression ${spec.name} field value ${text} is outside ${spec.min}-${spec.max}.`);
407
+ return value;
408
+ }
409
+ /** Read one positive cron field step. */
410
+ function cronFieldStep(text, spec) {
411
+ const step = Number(text);
412
+ if (!Number.isSafeInteger(step) || step < 1) throw new RecurrenceInputError("syntax", `cron.expression ${spec.name} field step must be a positive integer.`);
413
+ return step;
414
+ }
415
+ /** Expand one comma-separated cron field into its matched value set. */
416
+ function cronFieldValues(raw, spec) {
417
+ const matched = /* @__PURE__ */ new Set();
418
+ for (const element of raw.split(",")) {
419
+ if (element.length === 0) throw new RecurrenceInputError("syntax", `cron.expression ${spec.name} field must not contain an empty list element.`);
420
+ if (element === "*") {
421
+ for (let value = spec.min; value <= spec.max; value += 1) matched.add(value);
422
+ continue;
423
+ }
424
+ if (element.startsWith("*")) {
425
+ const groups = /^\*\/(?<step>\d+)$/.exec(element)?.groups;
426
+ if (groups === void 0) throw invalidCronField(spec, element);
427
+ const stepText = groups["step"];
428
+ /* v8 ignore next -- a successful fixed regex always provides the step group. */
429
+ if (stepText === void 0) throw invalidCronField(spec, element);
430
+ const step = cronFieldStep(stepText, spec);
431
+ for (let value = spec.min; value <= spec.max; value += step) matched.add(value);
432
+ continue;
433
+ }
434
+ const groups = /^(?<start>\d+)(?:-(?<end>\d+))?(?:\/(?<step>\d+))?$/.exec(element)?.groups;
435
+ if (groups === void 0) throw invalidCronField(spec, element);
436
+ const startText = groups["start"];
437
+ /* v8 ignore next -- a successful fixed regex always provides the start group. */
438
+ if (startText === void 0) throw invalidCronField(spec, element);
439
+ const start = cronFieldValue(startText, spec);
440
+ const end = groups["end"];
441
+ const stepText = groups["step"];
442
+ if (end === void 0) {
443
+ if (stepText !== void 0) throw invalidCronField(spec, element);
444
+ matched.add(start);
445
+ continue;
446
+ }
447
+ const last = cronFieldValue(end, spec);
448
+ if (start > last) throw new RecurrenceInputError("syntax", `cron.expression ${spec.name} field range ${start}-${last} is inverted.`);
449
+ const step = stepText === void 0 ? 1 : cronFieldStep(stepText, spec);
450
+ for (let value = start; value <= last; value += step) matched.add(value);
451
+ }
452
+ const values = /* @__PURE__ */ new Set();
453
+ for (const value of matched) values.add(spec.canonicalMax !== spec.max && value === spec.max ? spec.min : value);
454
+ return [...values].sort((left, right) => left - right);
455
+ }
456
+ /**
457
+ * Read one value the encoder already proved present.
458
+ * @param values - matched value set the parser always fills.
459
+ * @param index - index the caller derived from that set.
460
+ * @returns the value at that index.
461
+ */
462
+ function cronFieldValueAt(values, index) {
463
+ const value = values[index];
464
+ /* v8 ignore next -- a parsed cron field always matches at least one value. */
465
+ if (value === void 0) throw new Error("cron field encoding requires a non-empty value set");
466
+ return value;
467
+ }
468
+ /** Encode one matched value set as the shortest equivalent comma-separated cron field.
469
+ * @param values - Matched values in ascending order.
470
+ * @returns Field text that re-parses to exactly `values`, never spelled with a leading `*`.
471
+ */
472
+ function encodeCronField(values) {
473
+ const first = cronFieldValueAt(values, 0);
474
+ if (values.length === 1) return String(first);
475
+ const last = cronFieldValueAt(values, values.length - 1);
476
+ const step = cronFieldValueAt(values, 1) - first;
477
+ let uniform = true;
478
+ for (let index = 2; index < values.length; index += 1) if (cronFieldValueAt(values, index) - cronFieldValueAt(values, index - 1) !== step) {
479
+ uniform = false;
480
+ break;
481
+ }
482
+ if (uniform) {
483
+ if (step === 1) return `${first}-${last}`;
484
+ return `${first}-${last}/${step}`;
485
+ }
486
+ const parts = [];
487
+ let runStart = first;
488
+ for (let index = 1; index < values.length; index += 1) {
489
+ const current = cronFieldValueAt(values, index);
490
+ const previous = cronFieldValueAt(values, index - 1);
491
+ if (current === previous + 1) continue;
492
+ parts.push(runStart === previous ? String(runStart) : `${runStart}-${previous}`);
493
+ runStart = current;
494
+ }
495
+ const final = cronFieldValueAt(values, values.length - 1);
496
+ parts.push(runStart === final ? String(runStart) : `${runStart}-${final}`);
497
+ return parts.join(",");
498
+ }
499
+ /**
500
+ * One uniform walk from a field's minimum, folded exactly as a parsed field folds.
501
+ * @param spec - Field range and canonical maximum.
502
+ * @param step - Positive step of the walk.
503
+ * @returns Ascending values `step` produces from the minimum.
504
+ */
505
+ function starWalk(spec, step) {
506
+ const walked = /* @__PURE__ */ new Set();
507
+ for (let value = spec.min; value <= spec.max; value += step) walked.add(spec.canonicalMax !== spec.max && value === spec.max ? spec.min : value);
508
+ return [...walked].sort((left, right) => left - right);
509
+ }
510
+ /**
511
+ * Canonical spelling of a field whose text started with `*`.
512
+ *
513
+ * Only a `*`-prefixed spelling keeps the star flag, and only the bare star or a star-step
514
+ * (a `*` followed by `/n`) admits a leading `*`, so the encoding is the bare star for every
515
+ * value, otherwise the widest star-step walk plus any remaining values as a list.
516
+ * Re-parsing therefore reproduces both the star flag and the matched set, which is what
517
+ * keeps day-of-month/day-of-week AND/OR selection stable across a stored canonical
518
+ * expression.
519
+ * @param values - Matched values in ascending order.
520
+ * @param spec - Field range and canonical maximum.
521
+ * @returns Canonical field text that starts with `*`.
522
+ */
523
+ function encodeStarCronField(values, spec) {
524
+ if (values.length === spec.canonicalMax - spec.min + 1) return "*";
525
+ const present = new Set(values);
526
+ let bestStep;
527
+ let bestWalk = [];
528
+ for (let step = 1; step <= spec.max - spec.min + 1; step += 1) {
529
+ const walk = starWalk(spec, step);
530
+ if (walk.length > bestWalk.length && walk.every((value) => present.has(value))) {
531
+ bestStep = step;
532
+ bestWalk = walk;
533
+ }
534
+ }
535
+ /* v8 ignore next -- the widest step yields the single minimum, which every `*`-led field matches. */
536
+ if (bestStep === void 0) throw new RecurrenceInputError("syntax", `${spec.name} cannot keep a leading \`*\`.`);
537
+ const walked = new Set(bestWalk);
538
+ const remaining = values.filter((value) => !walked.has(value));
539
+ const walkText = `*/${bestStep}`;
540
+ return remaining.length === 0 ? walkText : `${walkText},${encodeCronField(remaining)}`;
541
+ }
542
+ /**
543
+ * Parse one cron field into its matched values, canonical spelling, and star flag.
544
+ *
545
+ * The star flag tests the field text's first character, which is how Vixie sets
546
+ * `DOM_STAR`/`DOW_STAR`: a stepped star (`*` followed by `/2`) is a star although
547
+ * it matches half the range, while an explicit full range such as `1-31` is
548
+ * restricted. Canonicalization preserves the flag: a `*`-led field keeps a `*`-led
549
+ * spelling, and a field that did not start with `*` is never spelled as a star-step.
550
+ */
551
+ function parseCronField(raw, spec) {
552
+ const values = cronFieldValues(raw, spec);
553
+ const star = raw.startsWith("*");
554
+ return Object.freeze({
555
+ values: Object.freeze(values),
556
+ canonical: star ? encodeStarCronField(values, spec) : encodeCronField(values),
557
+ star
558
+ });
559
+ }
560
+ /** Parse and canonicalize one strict five-field cron expression. */
561
+ function parseCronExpression(expression) {
562
+ if (typeof expression !== "string" || expression.length === 0 || expression.trim() !== expression) throw new RecurrenceInputError("syntax", "cron.expression must be a non-empty trimmed string.");
563
+ const fields = expression.split(/\s+/);
564
+ if (fields.length !== 5) throw new RecurrenceInputError("syntax", "cron.expression must contain exactly five whitespace-separated fields: minute hour day-of-month month day-of-week.");
565
+ const [minute, hour, dayOfMonth, month, dayOfWeek] = fields.map((field, index) => {
566
+ const fieldSpec = CRON_FIELDS[index];
567
+ /* v8 ignore next -- the five-field split bounds this index. */
568
+ if (fieldSpec === void 0) throw new Error("cron field specification is missing");
569
+ return parseCronField(field, fieldSpec);
570
+ });
571
+ return Object.freeze({
572
+ expression: [
573
+ minute,
574
+ hour,
575
+ dayOfMonth,
576
+ month,
577
+ dayOfWeek
578
+ ].map((field) => field.canonical).join(" "),
579
+ minutes: minute.values,
580
+ hours: hour.values,
581
+ daysOfMonth: dayOfMonth.values,
582
+ months: month.values,
583
+ daysOfWeek: dayOfWeek.values,
584
+ dayOfMonthStar: dayOfMonth.star,
585
+ dayOfWeekStar: dayOfWeek.star
586
+ });
587
+ }
588
+ /**
589
+ * Build the local-date predicate of one parsed cron rule under Vixie day-of-month/day-of-week semantics.
590
+ *
591
+ * The star flag selects the branch only; it never excuses a field's matched values.
592
+ * When either field text starts with `*`, a local date must satisfy BOTH fields, so a
593
+ * stepped star such as `*` followed by `/2` still restricts the dates it matches. A bare
594
+ * `*` matches every value, which makes that field's match always true and degrades the
595
+ * AND to the other field, exactly like Vixie's `DOM_STAR`/`DOW_STAR` test. Only when
596
+ * neither field text starts with `*` does either field matching suffice.
597
+ * @param parsed - Parsed cron rule with canonical field text and matched values.
598
+ * @returns Whether one local date matches the rule.
599
+ */
600
+ function cronDateMatch(parsed) {
601
+ const months = new Set(parsed.months);
602
+ const daysOfMonth = new Set(parsed.daysOfMonth);
603
+ const daysOfWeek = new Set(parsed.daysOfWeek);
604
+ const dayOfMonthRestricted = !parsed.dayOfMonthStar;
605
+ const dayOfWeekRestricted = !parsed.dayOfWeekStar;
606
+ return (date) => {
607
+ /* v8 ignore next -- both callers pre-filter by month before matching a date. */
608
+ if (!months.has(date.month)) return false;
609
+ const dayOfMonth = daysOfMonth.has(date.day);
610
+ const dayOfWeek = daysOfWeek.has(date.dayOfWeek % 7);
611
+ if (dayOfMonthRestricted && dayOfWeekRestricted) return dayOfMonth || dayOfWeek;
612
+ return dayOfMonth && dayOfWeek;
613
+ };
614
+ }
615
+ /** Enumerate local minutes of day without constructing unvisited calendar values. */
616
+ function* cronTimes(parsed, reverse = false) {
617
+ const hours = reverse ? parsed.hours.toReversed() : parsed.hours;
618
+ const minutes = reverse ? parsed.minutes.toReversed() : parsed.minutes;
619
+ for (const hour of hours) for (const minute of minutes) yield hour * 60 + minute;
620
+ }
621
+ /**
622
+ * Find the first strictly future cron occurrence without leaving the four-digit UTC year range.
623
+ *
624
+ * The walk stops at {@link CRON_SEARCH_HORIZON_YEARS} past the floor date when that
625
+ * horizon precedes the four-digit ceiling: a rule with no match inside the horizon
626
+ * never matches, so its search resolves to exhaustion instead of scanning to the ceiling.
627
+ * @param parsed - Parsed cron rule.
628
+ * @param timeZone - Explicit zone interpreting its local date and time.
629
+ * @param floor - Instant every returned target must exceed.
630
+ * @returns The first matching target, or exhaustion as undefined.
631
+ */
632
+ function nextCronTarget(parsed, timeZone, floor) {
633
+ const matches = cronDateMatch(parsed);
634
+ const months = new Set(parsed.months);
635
+ const localFloor = Temporal.Instant.fromEpochMilliseconds(floor).toZonedDateTimeISO(timeZone);
636
+ const firstDate = localFloor.toPlainDate();
637
+ let date = firstDate;
638
+ const floorMinute = localFloor.hour * 60 + localFloor.minute;
639
+ const ceiling = localDate(MAX_FOUR_DIGIT_YEAR_MS, "UTC").add({ days: 1 });
640
+ const horizon = date.add({ years: 400 });
641
+ const lastDate = Temporal.PlainDate.compare(horizon, ceiling) < 0 ? horizon : ceiling;
642
+ while (Temporal.PlainDate.compare(date, lastDate) <= 0) {
643
+ if (!months.has(date.month)) {
644
+ date = date.add({ months: 1 }).with({ day: 1 });
645
+ continue;
646
+ }
647
+ if (matches(date)) for (const minute of cronTimes(parsed)) {
648
+ if (date.equals(firstDate) && minute < floorMinute) continue;
649
+ const target = resolveLocalInstant(date.toPlainDateTime({
650
+ hour: Math.floor(minute / 60),
651
+ minute: minute % 60
652
+ }), timeZone);
653
+ if (target === void 0) continue;
654
+ if (target > MAX_FOUR_DIGIT_YEAR_MS) return void 0;
655
+ if (target >= MIN_FOUR_DIGIT_YEAR_MS && target > floor) return new Date(target).toISOString();
656
+ }
657
+ date = date.add({ days: 1 });
658
+ }
659
+ }
660
+ /**
661
+ * Find the latest matching cron occurrence at or before a decision without leaving the committed floor.
662
+ *
663
+ * The walk stops at {@link CRON_SEARCH_HORIZON_YEARS} before the decision date when that
664
+ * horizon follows the four-digit floor, which is the local date holding that floor instant
665
+ * in the rule's own zone: a rule with no match inside the horizon keeps the committed target
666
+ * instead of scanning back to the floor, and a candidate before the floor instant is skipped.
667
+ * @param parsed - Parsed cron rule.
668
+ * @param timeZone - Explicit zone interpreting its local date and time.
669
+ * @param decision - Wall-clock decision time in epoch milliseconds.
670
+ * @param savedTarget - Committed target that stays due even when current zone data resolves past it.
671
+ * @returns The latest due occurrence, or the committed target when no local occurrence is representable.
672
+ */
673
+ function latestCronOccurrence(parsed, timeZone, decision, savedTarget) {
674
+ const matches = cronDateMatch(parsed);
675
+ const months = new Set(parsed.months);
676
+ let date = localDate(decision, "UTC").add({ days: 1 });
677
+ const floorDate = localDate(MIN_FOUR_DIGIT_YEAR_MS, timeZone);
678
+ const horizon = date.subtract({ years: 400 });
679
+ const firstDate = Temporal.PlainDate.compare(horizon, floorDate) > 0 ? horizon : floorDate;
680
+ while (Temporal.PlainDate.compare(date, firstDate) >= 0) {
681
+ if (!months.has(date.month)) {
682
+ date = date.with({ day: 1 }).subtract({ days: 1 });
683
+ continue;
684
+ }
685
+ if (matches(date)) {
686
+ let earliest;
687
+ for (const minute of cronTimes(parsed)) {
688
+ earliest = resolveLocalInstant(date.toPlainDateTime({
689
+ hour: Math.floor(minute / 60),
690
+ minute: minute % 60
691
+ }), timeZone);
692
+ if (earliest !== void 0) break;
693
+ }
694
+ if (earliest !== void 0 && earliest > decision) {
695
+ date = date.subtract({ days: 1 });
696
+ continue;
697
+ }
698
+ for (const minute of cronTimes(parsed, true)) {
699
+ const candidate = resolveLocalInstant(date.toPlainDateTime({
700
+ hour: Math.floor(minute / 60),
701
+ minute: minute % 60
702
+ }), timeZone);
703
+ if (candidate === void 0 || candidate > decision || candidate < MIN_FOUR_DIGIT_YEAR_MS) continue;
704
+ return Math.max(candidate, savedTarget);
705
+ }
706
+ }
707
+ date = date.subtract({ days: 1 });
708
+ }
709
+ return savedTarget;
710
+ }
711
+ /** Parsed Cron value; expression and zone stay authoritative independently of any task. */
712
+ var Cron = class Cron {
713
+ parsed;
714
+ timeZone;
715
+ constructor(parsed, timeZone) {
716
+ this.parsed = parsed;
717
+ this.timeZone = timeZone;
718
+ }
719
+ /** Immutable matched fields and canonical text for consumers such as rule descriptions. */
720
+ get fields() {
721
+ return this.parsed;
722
+ }
723
+ /** Canonical five-field expression, preserving Vixie star semantics. */
724
+ get expression() {
725
+ return this.parsed.expression;
726
+ }
727
+ /**
728
+ * Parse one five-field expression and its explicit IANA zone.
729
+ * @param expression - Five numeric Cron fields with Vixie day matching.
730
+ * @param timeZone - UTC or an IANA Area/Location zone.
731
+ * @returns A parsed value, or a syntax/zone refusal without task policy.
732
+ */
733
+ static parse(expression, timeZone) {
734
+ return parseRecurrence(() => {
735
+ const parsed = parseCronExpression(expression);
736
+ const zone = canonicalizeTimeZone(timeZone);
737
+ if (zone.kind === "rejected") throw new RecurrenceInputError("time_zone", "Cron requires a valid UTC or IANA Area/Location zone.", { cause: zone });
738
+ const rule = new Cron(parsed, zone.timeZone);
739
+ Object.freeze(rule);
740
+ return rule;
741
+ });
742
+ }
743
+ /**
744
+ * First strictly future occurrence, skipping gaps and choosing the earlier overlap.
745
+ * @param after - Representable epoch milliseconds that the occurrence must exceed.
746
+ * @returns The UTC occurrence, or exhaustion of the bounded search.
747
+ */
748
+ next(after) {
749
+ if (!isFourDigitYearInstant(after)) throw new RangeError("Cron lower bound must be a four-digit-year instant");
750
+ return nextCronTarget(this.parsed, this.timeZone, after);
751
+ }
752
+ /**
753
+ * Latest due occurrence and first future occurrence, without replaying a backlog.
754
+ * @param scheduledAt - Canonical four-digit-year UTC occurrence with milliseconds, retained across zone-data changes.
755
+ * @param acceptedAt - Representable decision time at or after that occurrence.
756
+ * @returns The latest due occurrence and optional future successor.
757
+ * @throws RangeError when either instant is invalid or the decision precedes the committed occurrence.
758
+ */
759
+ resolve(scheduledAt, acceptedAt) {
760
+ const savedTarget = recurrenceDecision(scheduledAt, acceptedAt);
761
+ const occurrenceAt = new Date(latestCronOccurrence(this.parsed, this.timeZone, acceptedAt, savedTarget)).toISOString();
762
+ const nextScheduledAt = this.next(acceptedAt);
763
+ return Object.freeze(nextScheduledAt === void 0 ? { occurrenceAt } : {
764
+ occurrenceAt,
765
+ nextScheduledAt
766
+ });
767
+ }
768
+ };
769
+ //#endregion
770
+ //#region lib/types/rrule.js
771
+ /** Bounded RFC 5545 recurrence over UTC or explicit local wall time. */
772
+ /** Require a canonical zone while retaining the parser's validation result. */
773
+ function validatedZone(value) {
774
+ const result = canonicalizeTimeZone(value);
775
+ if (result.kind === "rejected") throw new RecurrenceInputError("time_zone", "TZID must be UTC or a valid IANA Area/Location name.", { cause: result });
776
+ return result.timeZone;
777
+ }
778
+ const { Weekday, rrulestr } = rrulePackage;
779
+ /** Largest accepted COUNT; a longer finite recurrence uses UNTIL. */
780
+ const MAX_RRULE_COUNT = 1e3;
781
+ /** Largest number of occurrences that one FREQ period may generate: every minute of one week. */
782
+ const MAX_PERIOD_CANDIDATES = 10080;
783
+ /** Largest number of BYSETPOS values. */
784
+ const MAX_SET_POSITIONS = 31;
785
+ /** Earliest DTSTART and UNTIL year; the recurrence library reads years 0000 through 0099 as 1900 through 1999. */
786
+ const MIN_RRULE_YEAR = 100;
787
+ const DAY_MS = 864e5;
788
+ /** Latest wall time that the recurrence library can generate or read as a DTSTART. */
789
+ const LAST_RRULE_WALL_MS = Date.UTC(9999, 11, 31, 23, 59, 59);
790
+ /** FREQ periods in one 400-year Gregorian cycle; after a cycle, weekdays and leap days repeat. */
791
+ const CYCLE_PERIODS = {
792
+ MINUTELY: 210379680,
793
+ HOURLY: 3506328,
794
+ DAILY: 146097,
795
+ WEEKLY: 20871,
796
+ MONTHLY: 4800,
797
+ YEARLY: 400
798
+ };
799
+ /** Length of one 400-year Gregorian cycle in milliseconds. */
800
+ const CYCLE_MS = CYCLE_PERIODS.DAILY * DAY_MS;
801
+ /** RFC 5545 weekday codes; index 0 is Monday, as in the recurrence library. */
802
+ const WEEKDAYS = [
803
+ "MO",
804
+ "TU",
805
+ "WE",
806
+ "TH",
807
+ "FR",
808
+ "SA",
809
+ "SU"
810
+ ];
811
+ const SUPPORTED_PARTS = [
812
+ "FREQ",
813
+ "INTERVAL",
814
+ "COUNT",
815
+ "UNTIL",
816
+ "WKST",
817
+ "BYSECOND",
818
+ "BYMINUTE",
819
+ "BYHOUR",
820
+ "BYDAY",
821
+ "BYMONTHDAY",
822
+ "BYYEARDAY",
823
+ "BYWEEKNO",
824
+ "BYMONTH",
825
+ "BYSETPOS"
826
+ ];
827
+ const LIST_RANGES = new Map([
828
+ ["BYSECOND", {
829
+ min: 0,
830
+ max: 59
831
+ }],
832
+ ["BYMINUTE", {
833
+ min: 0,
834
+ max: 59
835
+ }],
836
+ ["BYHOUR", {
837
+ min: 0,
838
+ max: 23
839
+ }],
840
+ ["BYMONTHDAY", {
841
+ min: -31,
842
+ max: 31
843
+ }],
844
+ ["BYYEARDAY", {
845
+ min: -366,
846
+ max: 366
847
+ }],
848
+ ["BYWEEKNO", {
849
+ min: -53,
850
+ max: 53
851
+ }],
852
+ ["BYMONTH", {
853
+ min: 1,
854
+ max: 12
855
+ }],
856
+ ["BYSETPOS", {
857
+ min: -366,
858
+ max: 366
859
+ }]
860
+ ]);
861
+ /** BY lists whose values the recurrence library combines into the times of one day. */
862
+ const TIME_PARTS = [
863
+ "BYHOUR",
864
+ "BYMINUTE",
865
+ "BYSECOND"
866
+ ];
867
+ const DTSTART_UTC = /^DTSTART:\d{8}T\d{6}Z$/;
868
+ const DTSTART_ZONED = /^DTSTART;TZID=[^:;]+:\d{8}T\d{6}$/;
869
+ const BASIC_UTC = /^\d{8}T\d{6}Z$/;
870
+ const UNSIGNED_INTEGER = /^\d+$/;
871
+ const SIGNED_INTEGER = /^[+-]?\d+$/;
872
+ const WEEKDAY_SELECTOR = /^(?:[+-]?(?:[1-9]|[1-4]\d|5[0-3]))?(?:MO|TU|WE|TH|FR|SA|SU)$/;
873
+ /** Read a matched basic date-time `YYYYMMDDTHHMMSS` as UTC-shaped epoch milliseconds, rejecting normalization. */
874
+ function basicTime(field, text) {
875
+ const year = Number(text.slice(0, 4));
876
+ const month = Number(text.slice(4, 6));
877
+ const day = Number(text.slice(6, 8));
878
+ const hour = Number(text.slice(9, 11));
879
+ const minute = Number(text.slice(11, 13));
880
+ const second = Number(text.slice(13, 15));
881
+ const message = `${field} must be a real calendar date and time in years 0100 through 9999.`;
882
+ if (year < MIN_RRULE_YEAR) throw new RecurrenceInputError("syntax", message);
883
+ try {
884
+ Temporal.PlainDateTime.from({
885
+ year,
886
+ month,
887
+ day,
888
+ hour,
889
+ minute,
890
+ second
891
+ }, { overflow: "reject" });
892
+ } catch (error) {
893
+ throw new RecurrenceInputError("syntax", message, { cause: error });
894
+ }
895
+ return Date.UTC(year, month - 1, day, hour, minute, second);
896
+ }
897
+ /** Split the input into its trimmed DTSTART and RRULE lines. */
898
+ function recurrenceLines(value) {
899
+ const [startLine, ruleLine, ...rest] = value.replaceAll("\r\n", "\n").trim().split("\n").map((line) => line.trim()).filter(Boolean);
900
+ if (startLine === void 0 || ruleLine === void 0 || rest.length > 0 || !startLine.startsWith("DTSTART") || !ruleLine.startsWith("RRULE:")) throw new RecurrenceInputError("syntax", "rrule must contain one DTSTART line followed by one RRULE line.");
901
+ return [startLine, ruleLine];
902
+ }
903
+ /** Read DTSTART as its canonical zone and UTC-shaped wall time. */
904
+ function parseStart(line) {
905
+ if (DTSTART_UTC.test(line)) return {
906
+ timeZone: "UTC",
907
+ start: basicTime("DTSTART", line.slice(-16, -1))
908
+ };
909
+ if (!DTSTART_ZONED.test(line)) throw new RecurrenceInputError("syntax", "DTSTART must use UTC with Z or a local date-time with an explicit TZID.");
910
+ return {
911
+ timeZone: validatedZone(line.slice(13, -16)),
912
+ start: basicTime("DTSTART", line.slice(-15))
913
+ };
914
+ }
915
+ /** Split the RRULE line into its parts in input order. */
916
+ function ruleParts(line) {
917
+ const parts = /* @__PURE__ */ new Map();
918
+ for (const component of line.slice(6).split(";")) {
919
+ const separator = component.indexOf("=");
920
+ const key = component.slice(0, separator);
921
+ const text = component.slice(separator + 1);
922
+ if (separator <= 0 || text.length === 0 || parts.has(key)) throw new RecurrenceInputError("syntax", "RRULE fields must be non-empty and unique.");
923
+ if (!SUPPORTED_PARTS.includes(key)) throw new RecurrenceInputError("syntax", `RRULE supports only ${SUPPORTED_PARTS.join(", ")}.`);
924
+ parts.set(key, text);
925
+ }
926
+ return parts;
927
+ }
928
+ /** Recognize a FREQ value that this module enumerates. */
929
+ function isFrequency(value) {
930
+ return Object.hasOwn(CYCLE_PERIODS, value);
931
+ }
932
+ /** Read FREQ; SECONDLY is valid RFC 5545 but violates the 60-second occurrence spacing. */
933
+ function frequencyOf(text) {
934
+ if (text === void 0) throw new RecurrenceInputError("syntax", "RRULE must contain FREQ.");
935
+ if (text === "SECONDLY") throw new RecurrenceInputError("density", "FREQ=SECONDLY is not supported; occurrences must be at least 60 seconds apart.");
936
+ if (!isFrequency(text)) throw new RecurrenceInputError("syntax", "FREQ must be MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY, or YEARLY.");
937
+ return text;
938
+ }
939
+ /** Read an optional unsigned part from 1 through max. */
940
+ function positiveValue(text, max, message) {
941
+ if (text === void 0) return void 0;
942
+ const value = Number(text);
943
+ if (!UNSIGNED_INTEGER.test(text) || value < 1 || value > max) throw new RecurrenceInputError("syntax", message);
944
+ return value;
945
+ }
946
+ /** Read an optional UNTIL as an actual UTC instant. */
947
+ function untilOf(text) {
948
+ if (text === void 0) return void 0;
949
+ if (!BASIC_UTC.test(text)) throw new RecurrenceInputError("syntax", "UNTIL must be an absolute UTC date-time ending in Z.");
950
+ return basicTime("UNTIL", text.slice(0, -1));
951
+ }
952
+ /** Read WKST as a weekday index; RFC 5545 defaults it to Monday. */
953
+ function weekStartOf(text) {
954
+ const index = WEEKDAYS.indexOf(text ?? "MO");
955
+ if (index < 0) throw new RecurrenceInputError("syntax", "WKST must be MO, TU, WE, TH, FR, SA, or SU.");
956
+ return index;
957
+ }
958
+ /** Read one numeric BY list whose values are unique and in range. */
959
+ function listValues(key, text, range) {
960
+ const signed = range.min < 0;
961
+ const values = text.split(",").map((item) => {
962
+ const value = Number(item);
963
+ if (!(signed ? SIGNED_INTEGER : UNSIGNED_INTEGER).test(item) || value < range.min || value > range.max || signed && value === 0) throw new RecurrenceInputError("syntax", `${key} values must be integers from ${range.min} to ${range.max}${signed ? ", excluding 0" : ""}.`);
964
+ return value;
965
+ });
966
+ if (new Set(values).size !== values.length) throw new RecurrenceInputError("syntax", `${key} values must be unique.`);
967
+ return values;
968
+ }
969
+ /** Read an optional BYDAY list; `+2TU` and `2TU` select the same day. */
970
+ function byDayOf(text) {
971
+ if (text === void 0) return void 0;
972
+ const selectors = text.split(",");
973
+ const seen = /* @__PURE__ */ new Set();
974
+ let ordinals = 0;
975
+ for (const selector of selectors) {
976
+ if (!WEEKDAY_SELECTOR.test(selector)) throw new RecurrenceInputError("syntax", "BYDAY contains an invalid weekday selector.");
977
+ const ordinal = selector.slice(0, -2);
978
+ seen.add(`${Number(ordinal)}${selector.slice(-2)}`);
979
+ if (ordinal.length > 0) ordinals += 1;
980
+ }
981
+ if (seen.size !== selectors.length) throw new RecurrenceInputError("syntax", "BYDAY values must be unique.");
982
+ return {
983
+ entries: selectors.length,
984
+ ordinals
985
+ };
986
+ }
987
+ /** Decode every RRULE part value. */
988
+ function ruleValues(parts) {
989
+ const frequency = frequencyOf(parts.get("FREQ"));
990
+ const interval = positiveValue(parts.get("INTERVAL"), Number.MAX_SAFE_INTEGER, "INTERVAL must be a positive safe integer.");
991
+ const count = positiveValue(parts.get("COUNT"), MAX_RRULE_COUNT, `COUNT must be an integer from 1 to ${MAX_RRULE_COUNT}; use UNTIL for a longer finite recurrence.`);
992
+ const until = untilOf(parts.get("UNTIL"));
993
+ const weekStart = weekStartOf(parts.get("WKST"));
994
+ const lists = /* @__PURE__ */ new Map();
995
+ for (const [key, range] of LIST_RANGES) {
996
+ const text = parts.get(key);
997
+ if (text !== void 0) lists.set(key, listValues(key, text, range));
998
+ }
999
+ return {
1000
+ frequency,
1001
+ interval: interval ?? 1,
1002
+ count,
1003
+ until,
1004
+ weekStart,
1005
+ lists,
1006
+ byDay: byDayOf(parts.get("BYDAY"))
1007
+ };
1008
+ }
1009
+ /** Reject a part combination that RFC 5545 forbids or that breaks the 60-second occurrence spacing. */
1010
+ function checkCombination(values) {
1011
+ const { frequency, lists, byDay } = values;
1012
+ const ordinals = byDay?.ordinals ?? 0;
1013
+ if (values.count !== void 0 && values.until !== void 0) throw new RecurrenceInputError("syntax", "RRULE must not contain both COUNT and UNTIL.");
1014
+ if ((lists.get("BYSECOND")?.length ?? 1) > 1) throw new RecurrenceInputError("density", "BYSECOND must contain one value; occurrences must be at least 60 seconds apart.");
1015
+ if ((frequency === "MINUTELY" || frequency === "HOURLY") && (lists.size > 0 || byDay !== void 0)) throw new RecurrenceInputError("syntax", `FREQ=${frequency} does not support BY rule parts; use FREQ=DAILY or FREQ=WEEKLY with BYHOUR and BYMINUTE.`);
1016
+ for (const key of ["BYWEEKNO", "BYYEARDAY"]) if (lists.has(key) && frequency !== "YEARLY") throw new RecurrenceInputError("syntax", `${key} requires FREQ=YEARLY.`);
1017
+ if (lists.has("BYMONTHDAY") && frequency !== "MONTHLY" && frequency !== "YEARLY") throw new RecurrenceInputError("syntax", "BYMONTHDAY requires FREQ=MONTHLY or FREQ=YEARLY.");
1018
+ if (ordinals > 0 && frequency !== "MONTHLY" && frequency !== "YEARLY") throw new RecurrenceInputError("syntax", "BYDAY ordinals require FREQ=MONTHLY or FREQ=YEARLY.");
1019
+ if (ordinals > 0 && lists.has("BYWEEKNO")) throw new RecurrenceInputError("syntax", "BYDAY ordinals cannot be combined with BYWEEKNO.");
1020
+ if (lists.has("BYSETPOS") && lists.size === 1 && byDay === void 0) throw new RecurrenceInputError("syntax", "BYSETPOS requires another BY rule part.");
1021
+ }
1022
+ /** Return an upper bound on BYDAY days in one month or year, or Infinity without BYDAY. */
1023
+ function byDayDays(byDay, perWeekday) {
1024
+ return byDay === void 0 ? Infinity : byDay.ordinals + perWeekday * (byDay.entries - byDay.ordinals);
1025
+ }
1026
+ /**
1027
+ * Return an upper bound on the days that one FREQ period selects; the rule carries its DTSTART defaults explicitly.
1028
+ *
1029
+ * One BYWEEKNO value selects at most 9 days of a year, because the year can also contain days of the adjacent year's
1030
+ * week with that number.
1031
+ */
1032
+ function periodDays(values) {
1033
+ const { lists, byDay } = values;
1034
+ const size = (key) => lists.get(key)?.length ?? Infinity;
1035
+ const months = lists.get("BYMONTH")?.length;
1036
+ switch (values.frequency) {
1037
+ case "MINUTELY":
1038
+ case "HOURLY":
1039
+ case "DAILY": return 1;
1040
+ case "WEEKLY": return Math.min(7, byDayDays(byDay, 1));
1041
+ case "MONTHLY": return Math.min(31, size("BYMONTHDAY"), byDayDays(byDay, 5));
1042
+ case "YEARLY":
1043
+ if (months === void 0) return Math.min(366, size("BYYEARDAY"), 12 * size("BYMONTHDAY"), 9 * size("BYWEEKNO"), byDayDays(byDay, 53));
1044
+ return Math.min(31 * months, size("BYYEARDAY"), months * size("BYMONTHDAY"), 9 * size("BYWEEKNO"), months * byDayDays(byDay, 5));
1045
+ }
1046
+ }
1047
+ /**
1048
+ * Reject a rule whose FREQ period can generate more occurrences than one enumeration may visit.
1049
+ * @param values - Rule values with the DTSTART defaults explicit.
1050
+ */
1051
+ function checkCost(values, rejectIneffectiveSetPositions) {
1052
+ const times = [
1053
+ "BYHOUR",
1054
+ "BYMINUTE",
1055
+ "BYSECOND"
1056
+ ].reduce((product, key) => product * (values.lists.get(key)?.length ?? 1), 1);
1057
+ const candidates = periodDays(values) * times;
1058
+ if (candidates > MAX_PERIOD_CANDIDATES) throw new RecurrenceInputError("density", `One FREQ period of this RRULE can contain up to ${candidates} occurrences; the limit is ${MAX_PERIOD_CANDIDATES}.`);
1059
+ const positions = values.lists.get("BYSETPOS") ?? [];
1060
+ if (rejectIneffectiveSetPositions && candidates === 1 && positions.length > 0) throw new RecurrenceInputError("syntax", `BYSETPOS has no effect because one FREQ=${values.frequency} period of this RRULE contains at most 1 occurrence. BYSETPOS selects among the occurrences of one period; for example, FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1 selects the last weekday of each month.`);
1061
+ if (positions.length > MAX_SET_POSITIONS) throw new RecurrenceInputError("syntax", `BYSETPOS must contain at most ${MAX_SET_POSITIONS} values.`);
1062
+ if (positions.some((position) => Math.abs(position) > candidates)) throw new RecurrenceInputError("syntax", `BYSETPOS values must be from 1 to ${candidates} or from -${candidates} to -1; one FREQ period of this RRULE contains at most ${candidates} occurrences.`);
1063
+ }
1064
+ /** Return the parts that the recurrence library derives from DTSTART when a DAILY or longer rule omits them. */
1065
+ function startDefaults(values, start) {
1066
+ const defaults = /* @__PURE__ */ new Map();
1067
+ const { frequency, lists, byDay } = values;
1068
+ if (frequency === "MINUTELY" || frequency === "HOURLY") return defaults;
1069
+ const date = new Date(start);
1070
+ if (!lists.has("BYHOUR")) defaults.set("BYHOUR", String(date.getUTCHours()));
1071
+ if (!lists.has("BYMINUTE")) defaults.set("BYMINUTE", String(date.getUTCMinutes()));
1072
+ if (!lists.has("BYSECOND")) defaults.set("BYSECOND", String(date.getUTCSeconds()));
1073
+ if (byDay !== void 0 || lists.has("BYMONTHDAY") || lists.has("BYYEARDAY") || lists.has("BYWEEKNO")) return defaults;
1074
+ if (frequency === "WEEKLY") defaults.set("BYDAY", new Weekday((date.getUTCDay() + 6) % 7).toString());
1075
+ if (frequency === "MONTHLY" || frequency === "YEARLY") defaults.set("BYMONTHDAY", String(date.getUTCDate()));
1076
+ if (frequency === "YEARLY" && !lists.has("BYMONTH")) defaults.set("BYMONTH", String(date.getUTCMonth() + 1));
1077
+ return defaults;
1078
+ }
1079
+ /** Return the greatest common divisor of two positive safe integers. */
1080
+ function gcd(left, right) {
1081
+ return right === 0 ? left : gcd(right, left % right);
1082
+ }
1083
+ /**
1084
+ * Validate a rule completely, then derive its enumeration inputs.
1085
+ * @param value - DTSTART and RRULE content.
1086
+ */
1087
+ function prepareRRule(value, rejectIneffectiveSetPositions) {
1088
+ const [startLine, ruleLine] = recurrenceLines(value);
1089
+ const { timeZone, start } = parseStart(startLine);
1090
+ if (instantOf(new Date(start), timeZone) === void 0) throw new RecurrenceInputError("syntax", "DTSTART must be a real local date and time in its time zone.");
1091
+ const parts = ruleParts(ruleLine);
1092
+ const values = ruleValues(parts);
1093
+ checkCombination(values);
1094
+ const recurrenceParts = new Map([...parts, ...startDefaults(values, start)]);
1095
+ const recurrenceValues = ruleValues(recurrenceParts);
1096
+ checkCost(recurrenceValues, rejectIneffectiveSetPositions);
1097
+ recurrenceParts.delete("COUNT");
1098
+ recurrenceParts.delete("UNTIL");
1099
+ for (const key of TIME_PARTS) {
1100
+ const list = recurrenceValues.lists.get(key);
1101
+ if (list !== void 0) recurrenceParts.set(key, list.toSorted((left, right) => left - right).join(","));
1102
+ }
1103
+ const recurrence = [...recurrenceParts].map(([key, text]) => `${key}=${text}`).join(";");
1104
+ return {
1105
+ normalized: `${startLine}\n${ruleLine}`,
1106
+ timeZone,
1107
+ start,
1108
+ frequency: values.frequency,
1109
+ interval: values.interval,
1110
+ weekStart: values.weekStart,
1111
+ count: values.count,
1112
+ limit: values.until ?? MAX_FOUR_DIGIT_YEAR_MS,
1113
+ recurrence: `RRULE:${recurrence}`,
1114
+ invalidRunLimit: CYCLE_MS * values.interval / gcd(values.interval, CYCLE_PERIODS[values.frequency])
1115
+ };
1116
+ }
1117
+ /** Express an actual instant as UTC-shaped wall time in a zone. */
1118
+ function wallOf(epoch, timeZone) {
1119
+ return epoch + Temporal.Instant.fromEpochMilliseconds(epoch).toZonedDateTimeISO(timeZone).offsetNanoseconds / 1e6;
1120
+ }
1121
+ /** Resolve a UTC-shaped wall time to its earlier actual instant, or undefined inside a forward transition. */
1122
+ function instantOf(date, timeZone) {
1123
+ return resolveLocalInstant(new Temporal.PlainDateTime(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()), timeZone);
1124
+ }
1125
+ /** Format UTC-shaped epoch milliseconds as a basic date-time without its Z. */
1126
+ function basic(epoch) {
1127
+ return new Date(epoch).toISOString().replaceAll("-", "").replaceAll(":", "").slice(0, 15);
1128
+ }
1129
+ /** Return the epoch day of UTC-shaped epoch milliseconds. */
1130
+ function dayOf(epoch) {
1131
+ return Math.floor(epoch / DAY_MS);
1132
+ }
1133
+ /** Return the epoch day of the week start at or before an epoch day; epoch day 0 is a Thursday. */
1134
+ function weekStartDay(day, weekStart) {
1135
+ return day - ((day + 3 - weekStart) % 7 + 7) % 7;
1136
+ }
1137
+ /** Return the absolute month number of UTC-shaped epoch milliseconds. */
1138
+ function monthOf(epoch) {
1139
+ const date = new Date(epoch);
1140
+ return date.getUTCFullYear() * 12 + date.getUTCMonth();
1141
+ }
1142
+ /** Return the year of UTC-shaped epoch milliseconds. */
1143
+ function yearOf(epoch) {
1144
+ return new Date(epoch).getUTCFullYear();
1145
+ }
1146
+ /** Return the latest point `origin + k * step` at or before value. */
1147
+ function floorStep(origin, value, step) {
1148
+ return origin + Math.floor((value - origin) / step) * step;
1149
+ }
1150
+ /** Return the start of the INTERVAL-aligned FREQ period that contains a wall time at or after DTSTART. */
1151
+ function periodStart(prepared, wall) {
1152
+ const { start, interval, weekStart } = prepared;
1153
+ switch (prepared.frequency) {
1154
+ case "MINUTELY": return floorStep(start, wall, interval * 6e4);
1155
+ case "HOURLY": return floorStep(start, wall, interval * 36e5);
1156
+ case "DAILY": return floorStep(dayOf(start), dayOf(wall), interval) * DAY_MS;
1157
+ case "WEEKLY": return floorStep(weekStartDay(dayOf(start), weekStart), weekStartDay(dayOf(wall), weekStart), 7 * interval) * DAY_MS;
1158
+ case "MONTHLY": {
1159
+ const month = floorStep(monthOf(start), monthOf(wall), interval);
1160
+ return Date.UTC(Math.floor(month / 12), month % 12, 1);
1161
+ }
1162
+ case "YEARLY": return Date.UTC(floorStep(yearOf(start), yearOf(wall), interval), 0, 1);
1163
+ }
1164
+ }
1165
+ /**
1166
+ * Return the enumeration start for the period that contains a wall time.
1167
+ *
1168
+ * The first period keeps the original DTSTART, because the library truncates a first WEEKLY period at DTSTART.
1169
+ */
1170
+ function periodAnchor(prepared, wall) {
1171
+ return wall > prepared.start ? Math.max(periodStart(prepared, wall), prepared.start) : prepared.start;
1172
+ }
1173
+ /** Build the library rule that enumerates UTC-shaped wall times from a period start. */
1174
+ function libraryRule(prepared, anchor) {
1175
+ return rrulestr(`DTSTART:${basic(anchor)}Z\n${prepared.recurrence}`);
1176
+ }
1177
+ /**
1178
+ * Report whether the rule can generate a wall time.
1179
+ *
1180
+ * Whole 400-year cycles preserve the Gregorian calendar, so the scan starts at the latest equivalent period that leaves one
1181
+ * complete calendar and INTERVAL cycle before year 9999. A rule without a wall time therefore costs at most two cycles.
1182
+ */
1183
+ function hasCandidate(prepared) {
1184
+ if (prepared.frequency === "MINUTELY" || prepared.frequency === "HOURLY") return true;
1185
+ const first = periodStart(prepared, prepared.start);
1186
+ const firstYear = yearOf(first);
1187
+ const years = CYCLE_PERIODS.YEARLY;
1188
+ const cycleYears = years * prepared.interval / gcd(prepared.interval, CYCLE_PERIODS[prepared.frequency]);
1189
+ const anchor = first + Math.max(firstYear < MIN_RRULE_YEAR ? 1 : 0, Math.floor((9999 - firstYear - cycleYears - 1) / years)) * CYCLE_MS;
1190
+ return libraryRule(prepared, anchor).after(new Date(anchor), true) !== null;
1191
+ }
1192
+ /**
1193
+ * Find the latest occurrence at or before a decision among wall times from one start, and the first later occurrence.
1194
+ *
1195
+ * Wall times at or before the decision wall time convert to instants only from the latest one backwards.
1196
+ */
1197
+ function scanWindow(prepared, fromWall, decision) {
1198
+ const window = {
1199
+ latest: void 0,
1200
+ next: void 0
1201
+ };
1202
+ if (fromWall > LAST_RRULE_WALL_MS) return window;
1203
+ const bound = Math.min(decision, prepared.limit);
1204
+ const boundWall = wallOf(bound, prepared.timeZone);
1205
+ const below = [];
1206
+ const run = { lastValidWall: boundWall };
1207
+ libraryRule(prepared, periodAnchor(prepared, fromWall)).all((date) => {
1208
+ const wall = date.getTime();
1209
+ if (wall < fromWall) return true;
1210
+ if (wall <= boundWall) {
1211
+ below.push(date);
1212
+ return true;
1213
+ }
1214
+ if (wall >= prepared.limit + DAY_MS) return false;
1215
+ const instant = instantOf(date, prepared.timeZone);
1216
+ if (instant === void 0) return wall - run.lastValidWall <= prepared.invalidRunLimit;
1217
+ run.lastValidWall = wall;
1218
+ if (instant <= bound) {
1219
+ window.latest = instant;
1220
+ return true;
1221
+ }
1222
+ if (instant <= prepared.limit) window.next = instant;
1223
+ return false;
1224
+ });
1225
+ while (window.latest === void 0) {
1226
+ const date = below.pop();
1227
+ if (date === void 0) break;
1228
+ const instant = instantOf(date, prepared.timeZone);
1229
+ if (instant !== void 0 && instant <= bound) window.latest = instant;
1230
+ }
1231
+ return window;
1232
+ }
1233
+ /** Find the latest due occurrence; the window starts two days before the decision and doubles while it has none. */
1234
+ function dispatchWindow(prepared, saved, decision) {
1235
+ const savedWall = wallOf(saved, prepared.timeZone);
1236
+ const boundWall = wallOf(Math.min(decision, prepared.limit), prepared.timeZone);
1237
+ for (let span = 2 * DAY_MS;; span *= 2) {
1238
+ const fromWall = Math.max(boundWall - span, savedWall);
1239
+ const window = scanWindow(prepared, fromWall, decision);
1240
+ if (window.latest !== void 0 || fromWall === savedWall) return window;
1241
+ }
1242
+ }
1243
+ /** Enumerate distinct COUNT instances from DTSTART through the first occurrence after a decision. */
1244
+ function countWindow(prepared, decision, count) {
1245
+ const window = {
1246
+ latest: void 0,
1247
+ next: void 0
1248
+ };
1249
+ const run = {
1250
+ remaining: count,
1251
+ lastValidWall: prepared.start
1252
+ };
1253
+ libraryRule(prepared, prepared.start).all((date) => {
1254
+ const wall = date.getTime();
1255
+ const instant = instantOf(date, prepared.timeZone);
1256
+ if (instant === void 0) return wall - run.lastValidWall <= prepared.invalidRunLimit;
1257
+ if (instant === window.latest) return true;
1258
+ run.lastValidWall = wall;
1259
+ if (instant > decision) {
1260
+ if (instant <= MAX_FOUR_DIGIT_YEAR_MS) window.next = instant;
1261
+ return false;
1262
+ }
1263
+ window.latest = instant;
1264
+ run.remaining -= 1;
1265
+ return run.remaining > 0;
1266
+ });
1267
+ return window;
1268
+ }
1269
+ /** Format the first occurrence strictly after a representable reference time. */
1270
+ function nextOccurrence(prepared, after) {
1271
+ if (!hasCandidate(prepared)) return void 0;
1272
+ const next = prepared.count === void 0 ? scanWindow(prepared, wallOf(after, prepared.timeZone), after).next : countWindow(prepared, after, prepared.count).next;
1273
+ return next === void 0 ? void 0 : new Date(next).toISOString();
1274
+ }
1275
+ /** Parsed two-line DTSTART/RRULE value with bounded occurrence arithmetic. */
1276
+ var RRule = class RRule {
1277
+ prepared;
1278
+ constructor(prepared) {
1279
+ this.prepared = prepared;
1280
+ }
1281
+ /** Trimmed two-line expression; DTSTART owns the zone and recurrence anchor. */
1282
+ get expression() {
1283
+ return this.prepared.normalized;
1284
+ }
1285
+ /** Canonical zone from DTSTART, or UTC for a Z start. */
1286
+ get timeZone() {
1287
+ return this.prepared.timeZone;
1288
+ }
1289
+ /**
1290
+ * Validate syntax and enumeration cost before any occurrence search.
1291
+ * @param expression - Exactly one DTSTART line followed by one RRULE line.
1292
+ * @param options - Optional stricter BYSETPOS authoring checks.
1293
+ * @returns A bounded parsed value, or a syntax, zone, or density refusal.
1294
+ */
1295
+ static parse(expression, options = {}) {
1296
+ return parseRecurrence(() => {
1297
+ const rule = new RRule(prepareRRule(expression, options.rejectIneffectiveSetPositions ?? false));
1298
+ Object.freeze(rule);
1299
+ return rule;
1300
+ });
1301
+ }
1302
+ /**
1303
+ * First occurrence strictly after the explicit lower bound, or exhaustion.
1304
+ * @param after - Representable epoch milliseconds that the occurrence must exceed.
1305
+ * @returns The UTC occurrence, or exhaustion of the accepted rule.
1306
+ */
1307
+ next(after) {
1308
+ if (!isFourDigitYearInstant(after)) throw new RangeError("RRULE lower bound must be a four-digit-year instant");
1309
+ return nextOccurrence(this.prepared, after);
1310
+ }
1311
+ /**
1312
+ * Latest due occurrence and first future occurrence, retaining the committed floor.
1313
+ * @param scheduledAt - Canonical four-digit-year UTC occurrence with milliseconds, retained across zone-data changes.
1314
+ * @param acceptedAt - Representable decision time at or after that occurrence.
1315
+ * @returns The latest due occurrence and optional future successor.
1316
+ * @throws RangeError when either instant is invalid or the decision precedes the committed occurrence.
1317
+ */
1318
+ resolve(scheduledAt, acceptedAt) {
1319
+ const savedTarget = recurrenceDecision(scheduledAt, acceptedAt);
1320
+ const prepared = this.prepared;
1321
+ const window = prepared.count === void 0 ? dispatchWindow(prepared, savedTarget, acceptedAt) : countWindow(prepared, acceptedAt, prepared.count);
1322
+ const occurrenceAt = new Date(Math.max(window.latest ?? savedTarget, savedTarget)).toISOString();
1323
+ const nextScheduledAt = window.next === void 0 ? void 0 : new Date(window.next).toISOString();
1324
+ return Object.freeze(nextScheduledAt === void 0 ? { occurrenceAt } : {
1325
+ occurrenceAt,
1326
+ nextScheduledAt
1327
+ });
1328
+ }
1329
+ };
1330
+ //#endregion
315
1331
  //#region lib/types/index.js
316
1332
  /**
317
1333
  * Time vocabulary shared by the boundaries that accept a caller's zone or a
318
- * wall-clock selector, plus one span type for elapsed and interval arithmetic.
1334
+ * wall-clock selector, elapsed span, or bounded Cron/RRULE recurrence.
319
1335
  *
320
1336
  * The library validates, canonicalizes, parses, and renders one canonical instant
321
1337
  * format; it produces no model-facing text and owns no failure vocabulary. A refusal that carries a
@@ -324,7 +1340,8 @@ var Duration = class Duration {
324
1340
  * form and answers a name or `undefined`; `formatFourDigitYearInstant` and
325
1341
  * `resolveLocalInstant` take already-validated values and answer a string or
326
1342
  * epoch milliseconds directly; `Duration` holds a span in milliseconds with no
327
- * implicit numeric conversion.
1343
+ * implicit numeric conversion. Cron and RRule parse distinct recurrence types
1344
+ * and compute occurrences from explicit times without task state or timers.
328
1345
  * @module @deepseek-ai/dsh-util-time
329
1346
  */
330
1347
  /**
@@ -341,4 +1358,4 @@ function canonicalClientTimeZone(value) {
341
1358
  return resolved.kind === "accepted" ? resolved.timeZone : void 0;
342
1359
  }
343
1360
  //#endregion
344
- export { Duration, MAX_FOUR_DIGIT_YEAR_MS, MIN_FOUR_DIGIT_YEAR_MS, canonicalClientTimeZone, canonicalizeTimeZone, formatFourDigitYearInstant, fourDigitYearEpoch, isFourDigitYearInstant, parseLocalCalendar, parseOffsetInstant, resolveLocalInstant };
1361
+ export { CRON_SEARCH_HORIZON_YEARS, Cron, Duration, MAX_FOUR_DIGIT_YEAR_MS, MIN_FOUR_DIGIT_YEAR_MS, RRule, canonicalClientTimeZone, canonicalizeTimeZone, formatFourDigitYearInstant, fourDigitYearEpoch, isFourDigitYearInstant, parseLocalCalendar, parseOffsetInstant, resolveLocalInstant };