@goodpeanuts/dsh-sui 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (823) hide show
  1. package/README.md +100 -3
  2. package/THIRD_PARTY_NOTICES.txt +1064 -0
  3. package/apps/cli/dist/_virtual/_rolldown/runtime.mjs +35 -0
  4. package/apps/cli/dist/args.mjs +204 -0
  5. package/apps/cli/dist/cli.mjs +392 -0
  6. package/apps/cli/dist/errors.mjs +32 -0
  7. package/apps/cli/dist/help.mjs +73 -0
  8. package/apps/cli/dist/io.mjs +37 -0
  9. package/apps/cli/dist/main.mjs +10 -0
  10. package/apps/cli/dist/node_modules/.pnpm/@keyv_serialize@1.1.1/node_modules/@keyv/serialize/dist/index.mjs +37 -0
  11. package/apps/cli/dist/node_modules/.pnpm/@sec-ant_readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.mjs +81 -0
  12. package/apps/cli/dist/node_modules/.pnpm/@sec-ant_readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/index.mjs +1 -0
  13. package/apps/cli/dist/node_modules/.pnpm/@sindresorhus_is@7.2.0/node_modules/@sindresorhus/is/distribution/index.mjs +1015 -0
  14. package/apps/cli/dist/node_modules/.pnpm/@sindresorhus_is@7.2.0/node_modules/@sindresorhus/is/distribution/utilities.mjs +6 -0
  15. package/apps/cli/dist/node_modules/.pnpm/boolbase@1.0.0/node_modules/boolbase/index.mjs +15 -0
  16. package/apps/cli/dist/node_modules/.pnpm/byte-counter@0.1.0/node_modules/byte-counter/utilities.mjs +9 -0
  17. package/apps/cli/dist/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.mjs +279 -0
  18. package/apps/cli/dist/node_modules/.pnpm/cacheable-request@13.0.19/node_modules/cacheable-request/dist/index.mjs +274 -0
  19. package/apps/cli/dist/node_modules/.pnpm/cacheable-request@13.0.19/node_modules/cacheable-request/dist/types.mjs +15 -0
  20. package/apps/cli/dist/node_modules/.pnpm/cheerio-select@2.1.0/node_modules/cheerio-select/lib/esm/helpers.mjs +15 -0
  21. package/apps/cli/dist/node_modules/.pnpm/cheerio-select@2.1.0/node_modules/cheerio-select/lib/esm/index.mjs +159 -0
  22. package/apps/cli/dist/node_modules/.pnpm/cheerio-select@2.1.0/node_modules/cheerio-select/lib/esm/positionals.mjs +33 -0
  23. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/attributes.mjs +465 -0
  24. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/css.mjs +94 -0
  25. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/extract.mjs +39 -0
  26. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/forms.mjs +63 -0
  27. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/manipulation.mjs +731 -0
  28. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/traversing.mjs +828 -0
  29. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/cheerio.mjs +53 -0
  30. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/index.mjs +11 -0
  31. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/load-parse.mjs +25 -0
  32. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/load.mjs +73 -0
  33. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/options.mjs +27 -0
  34. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/parse.mjs +53 -0
  35. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/parsers/parse5-adapter.mjs +42 -0
  36. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/static.mjs +165 -0
  37. package/apps/cli/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/utils.mjs +78 -0
  38. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/attributes.mjs +187 -0
  39. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/compile.mjs +77 -0
  40. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/general.mjs +89 -0
  41. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/index.mjs +43 -0
  42. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/aliases.mjs +32 -0
  43. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/filters.mjs +114 -0
  44. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/index.mjs +35 -0
  45. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.mjs +53 -0
  46. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/subselects.mjs +68 -0
  47. package/apps/cli/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/sort.mjs +60 -0
  48. package/apps/cli/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/commonjs/index.mjs +50 -0
  49. package/apps/cli/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/commonjs/parse.mjs +320 -0
  50. package/apps/cli/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/commonjs/stringify.mjs +102 -0
  51. package/apps/cli/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/commonjs/types.mjs +45 -0
  52. package/apps/cli/dist/node_modules/.pnpm/decompress-response@10.0.0/node_modules/decompress-response/index.mjs +59 -0
  53. package/apps/cli/dist/node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/esm/foreignNames.mjs +103 -0
  54. package/apps/cli/dist/node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/esm/index.mjs +144 -0
  55. package/apps/cli/dist/node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/esm/index.mjs +51 -0
  56. package/apps/cli/dist/node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/index.mjs +128 -0
  57. package/apps/cli/dist/node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/node.mjs +312 -0
  58. package/apps/cli/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/feeds.mjs +161 -0
  59. package/apps/cli/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/helpers.mjs +113 -0
  60. package/apps/cli/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/index.mjs +56 -0
  61. package/apps/cli/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/legacy.mjs +141 -0
  62. package/apps/cli/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/manipulation.mjs +117 -0
  63. package/apps/cli/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/querying.mjs +124 -0
  64. package/apps/cli/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/stringify.mjs +69 -0
  65. package/apps/cli/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/traversal.mjs +109 -0
  66. package/apps/cli/dist/node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/dist/esm/index.mjs +7 -0
  67. package/apps/cli/dist/node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/dist/esm/sniffer.mjs +112 -0
  68. package/apps/cli/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/escape.mjs +83 -0
  69. package/apps/cli/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs +43 -0
  70. package/apps/cli/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.mjs +330 -0
  71. package/apps/cli/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/escape.mjs +49 -0
  72. package/apps/cli/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs +4 -0
  73. package/apps/cli/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs +57 -0
  74. package/apps/cli/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/decode.mjs +351 -0
  75. package/apps/cli/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs +5 -0
  76. package/apps/cli/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/generated/decode-data-xml.mjs +5 -0
  77. package/apps/cli/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/internal/bin-trie-flags.mjs +20 -0
  78. package/apps/cli/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/internal/decode-shared.mjs +14 -0
  79. package/apps/cli/dist/node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/index.mjs +871 -0
  80. package/apps/cli/dist/node_modules/.pnpm/form-data-encoder@4.1.0/node_modules/form-data-encoder/lib/index.mjs +279 -0
  81. package/apps/cli/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.mjs +54 -0
  82. package/apps/cli/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/buffer.mjs +14 -0
  83. package/apps/cli/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.mjs +80 -0
  84. package/apps/cli/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.mjs +41 -0
  85. package/apps/cli/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.mjs +8 -0
  86. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/as-promise/index.mjs +154 -0
  87. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/as-promise/types.mjs +20 -0
  88. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/calculate-retry-delay.mjs +20 -0
  89. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/diagnostics-channel.mjs +38 -0
  90. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/errors.mjs +132 -0
  91. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/index.mjs +923 -0
  92. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/options.mjs +1622 -0
  93. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/parse-link-header.mjs +27 -0
  94. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/response.mjs +36 -0
  95. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/timed-out.mjs +107 -0
  96. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/defer-to-connect.mjs +28 -0
  97. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/get-body-size.mjs +23 -0
  98. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/is-client-request.mjs +6 -0
  99. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/is-form-data.mjs +7 -0
  100. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/is-unix-socket-url.mjs +25 -0
  101. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/proxy-events.mjs +16 -0
  102. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/timer.mjs +114 -0
  103. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/unhandle.mjs +23 -0
  104. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/url-to-options.mjs +20 -0
  105. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/weakable-map.mjs +19 -0
  106. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/create.mjs +166 -0
  107. package/apps/cli/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/index.mjs +17 -0
  108. package/apps/cli/dist/node_modules/.pnpm/htmlparser2@10.1.0/node_modules/htmlparser2/dist/esm/Parser.mjs +441 -0
  109. package/apps/cli/dist/node_modules/.pnpm/htmlparser2@10.1.0/node_modules/htmlparser2/dist/esm/Tokenizer.mjs +661 -0
  110. package/apps/cli/dist/node_modules/.pnpm/htmlparser2@10.1.0/node_modules/htmlparser2/dist/esm/index.mjs +19 -0
  111. package/apps/cli/dist/node_modules/.pnpm/http-cache-semantics@4.3.0/node_modules/http-cache-semantics/index.mjs +608 -0
  112. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/agent.mjs +441 -0
  113. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/auto.mjs +145 -0
  114. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/client-request.mjs +318 -0
  115. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/incoming-message.mjs +58 -0
  116. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/index.mjs +51 -0
  117. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/get-auth-headers.mjs +19 -0
  118. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h1-over-h2.mjs +84 -0
  119. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-h1.mjs +49 -0
  120. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-h2.mjs +38 -0
  121. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-hx.mjs +39 -0
  122. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/initialize.mjs +23 -0
  123. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/unexpected-status-code-error.mjs +15 -0
  124. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/calculate-server-name.mjs +24 -0
  125. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/check-type.mjs +17 -0
  126. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/delay-async-destroy.mjs +28 -0
  127. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/errors.mjs +30 -0
  128. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.mjs +16 -0
  129. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/js-stream-socket.mjs +9 -0
  130. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/proxy-events.mjs +10 -0
  131. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/proxy-socket-handler.mjs +77 -0
  132. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/validate-header-name.mjs +15 -0
  133. package/apps/cli/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/validate-header-value.mjs +14 -0
  134. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.mjs +355 -0
  135. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.mjs +191 -0
  136. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/index.mjs +31 -0
  137. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.mjs +140 -0
  138. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.mjs +50 -0
  139. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data-generated.mjs +455 -0
  140. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.mjs +151 -0
  141. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/big5-added.mjs +169 -0
  142. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp936.mjs +2584 -0
  143. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp949.mjs +2220 -0
  144. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp950.mjs +227 -0
  145. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/eucjp.mjs +425 -0
  146. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gb18030-ranges.mjs +427 -0
  147. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gbk-added.mjs +230 -0
  148. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/shiftjis.mjs +292 -0
  149. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.mjs +123 -0
  150. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.mjs +197 -0
  151. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.mjs +182 -0
  152. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/bom-handling.mjs +42 -0
  153. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.mjs +108 -0
  154. package/apps/cli/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.mjs +90 -0
  155. package/apps/cli/dist/node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.mjs +9 -0
  156. package/apps/cli/dist/node_modules/.pnpm/js-sha256@0.11.1/node_modules/js-sha256/src/sha256.mjs +495 -0
  157. package/apps/cli/dist/node_modules/.pnpm/keyv@5.6.0/node_modules/keyv/dist/index.mjs +740 -0
  158. package/apps/cli/dist/node_modules/.pnpm/lowercase-keys@3.0.0/node_modules/lowercase-keys/index.mjs +6 -0
  159. package/apps/cli/dist/node_modules/.pnpm/mimic-response@4.0.0/node_modules/mimic-response/index.mjs +53 -0
  160. package/apps/cli/dist/node_modules/.pnpm/normalize-url@8.1.1/node_modules/normalize-url/index.mjs +145 -0
  161. package/apps/cli/dist/node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/esm/compile.mjs +37 -0
  162. package/apps/cli/dist/node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/esm/index.mjs +31 -0
  163. package/apps/cli/dist/node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/esm/parse.mjs +60 -0
  164. package/apps/cli/dist/node_modules/.pnpm/p-cancelable@4.0.1/node_modules/p-cancelable/index.mjs +86 -0
  165. package/apps/cli/dist/node_modules/.pnpm/parse5-htmlparser2-tree-adapter@7.1.0/node_modules/parse5-htmlparser2-tree-adapter/dist/index.mjs +187 -0
  166. package/apps/cli/dist/node_modules/.pnpm/parse5-parser-stream@7.1.2/node_modules/parse5-parser-stream/dist/index.mjs +2 -0
  167. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/doctype.mjs +101 -0
  168. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/error-codes.mjs +66 -0
  169. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/foreign-content.mjs +259 -0
  170. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/html.mjs +544 -0
  171. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/token.mjs +19 -0
  172. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/unicode.mjs +91 -0
  173. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/index.mjs +41 -0
  174. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/formatting-element-list.mjs +91 -0
  175. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/index.mjs +2492 -0
  176. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/open-element-stack.mjs +292 -0
  177. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/serializer/index.mjs +111 -0
  178. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/index.mjs +2067 -0
  179. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/preprocessor.mjs +154 -0
  180. package/apps/cli/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tree-adapters/default.mjs +164 -0
  181. package/apps/cli/dist/node_modules/.pnpm/quick-lru@5.1.1/node_modules/quick-lru/index.mjs +77 -0
  182. package/apps/cli/dist/node_modules/.pnpm/resolve-alpn@1.2.1/node_modules/resolve-alpn/index.mjs +47 -0
  183. package/apps/cli/dist/node_modules/.pnpm/responselike@4.0.2/node_modules/responselike/index.mjs +32 -0
  184. package/apps/cli/dist/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.mjs +45 -0
  185. package/apps/cli/dist/node_modules/.pnpm/tldts@7.4.18/node_modules/tldts/dist/cjs/index.mjs +22542 -0
  186. package/apps/cli/dist/node_modules/.pnpm/tough-cookie@6.0.0/node_modules/tough-cookie/dist/index.mjs +1761 -0
  187. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/index.mjs +221 -0
  188. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/abort-signal.mjs +44 -0
  189. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-connect.mjs +85 -0
  190. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-pipeline.mjs +174 -0
  191. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-request.mjs +155 -0
  192. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-stream.mjs +136 -0
  193. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-upgrade.mjs +88 -0
  194. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/index.mjs +17 -0
  195. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/readable.mjs +418 -0
  196. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/cache/memory-cache-store.mjs +190 -0
  197. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/cache/sqlite-cache-store.mjs +324 -0
  198. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/connect.mjs +115 -0
  199. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/constants.mjs +134 -0
  200. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/diagnostics.mjs +114 -0
  201. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/errors.mjs +412 -0
  202. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/request.mjs +282 -0
  203. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/socks5-client.mjs +288 -0
  204. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/socks5-utils.mjs +166 -0
  205. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/symbols.mjs +80 -0
  206. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/tree.mjs +124 -0
  207. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/util.mjs +940 -0
  208. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/agent.mjs +119 -0
  209. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/balanced-pool.mjs +129 -0
  210. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/client-h1.mjs +1091 -0
  211. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/client-h2.mjs +588 -0
  212. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/client.mjs +385 -0
  213. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/dispatcher-base.mjs +121 -0
  214. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/dispatcher.mjs +35 -0
  215. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.mjs +105 -0
  216. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/fixed-queue.mjs +75 -0
  217. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/h2c-client.mjs +31 -0
  218. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/pool-base.mjs +155 -0
  219. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/pool.mjs +76 -0
  220. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/proxy-agent.mjs +233 -0
  221. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/retry-agent.mjs +37 -0
  222. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/round-robin-pool.mjs +94 -0
  223. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/socks5-proxy-agent.mjs +194 -0
  224. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/encoding/index.mjs +18 -0
  225. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/global.mjs +48 -0
  226. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/cache-handler.mjs +457 -0
  227. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/cache-revalidation-handler.mjs +82 -0
  228. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/decorator-handler.mjs +57 -0
  229. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/deduplication-handler.mjs +341 -0
  230. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/redirect-handler.mjs +131 -0
  231. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/retry-handler.mjs +332 -0
  232. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/unwrap-handler.mjs +88 -0
  233. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/wrap-handler.mjs +68 -0
  234. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/cache.mjs +350 -0
  235. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/decompress.mjs +416 -0
  236. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/deduplicate.mjs +69 -0
  237. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/dns.mjs +323 -0
  238. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/dump.mjs +65 -0
  239. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/redirect.mjs +20 -0
  240. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/response-error.mjs +73 -0
  241. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/retry.mjs +25 -0
  242. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/llhttp/constants.mjs +590 -0
  243. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/llhttp/llhttp-wasm.mjs +13 -0
  244. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.mjs +13 -0
  245. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/llhttp/utils.mjs +16 -0
  246. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-agent.mjs +154 -0
  247. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-call-history.mjs +159 -0
  248. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-client.mjs +59 -0
  249. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-errors.mjs +28 -0
  250. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-interceptor.mjs +150 -0
  251. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-pool.mjs +59 -0
  252. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-symbols.mjs +37 -0
  253. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-utils.mjs +302 -0
  254. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/pending-interceptors-formatter.mjs +38 -0
  255. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/snapshot-agent.mjs +268 -0
  256. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/snapshot-recorder.mjs +424 -0
  257. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/snapshot-utils.mjs +121 -0
  258. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/cache.mjs +440 -0
  259. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/date.mjs +332 -0
  260. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/promise.mjs +31 -0
  261. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/runtime-features.mjs +101 -0
  262. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/stats.mjs +31 -0
  263. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/timers.mjs +341 -0
  264. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cache/cache.mjs +462 -0
  265. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cache/cachestorage.mjs +103 -0
  266. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cache/util.mjs +39 -0
  267. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cookies/constants.mjs +11 -0
  268. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cookies/index.mjs +169 -0
  269. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cookies/parse.mjs +108 -0
  270. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cookies/util.mjs +239 -0
  271. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/eventsource/eventsource-stream.mjs +317 -0
  272. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/eventsource/eventsource.mjs +345 -0
  273. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/eventsource/util.mjs +29 -0
  274. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/body.mjs +271 -0
  275. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/constants.mjs +224 -0
  276. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/data-url.mjs +247 -0
  277. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/formdata-parser.mjs +255 -0
  278. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/formdata.mjs +153 -0
  279. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/global.mjs +34 -0
  280. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/headers.mjs +400 -0
  281. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/index.mjs +776 -0
  282. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/request.mjs +602 -0
  283. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/response.mjs +358 -0
  284. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/util.mjs +795 -0
  285. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/infra/index.mjs +154 -0
  286. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.mjs +170 -0
  287. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/webidl/index.mjs +505 -0
  288. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/connection.mjs +166 -0
  289. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/constants.mjs +47 -0
  290. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/events.mjs +268 -0
  291. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/frame.mjs +105 -0
  292. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/permessage-deflate.mjs +85 -0
  293. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/receiver.mjs +323 -0
  294. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/sender.mjs +90 -0
  295. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/stream/websocketerror.mjs +78 -0
  296. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/stream/websocketstream.mjs +270 -0
  297. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/util.mjs +212 -0
  298. package/apps/cli/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/websocket.mjs +432 -0
  299. package/apps/cli/dist/node_modules/.pnpm/whatwg-encoding@3.1.1/node_modules/whatwg-encoding/lib/labels-to-names.mjs +224 -0
  300. package/apps/cli/dist/node_modules/.pnpm/whatwg-encoding@3.1.1/node_modules/whatwg-encoding/lib/supported-names.mjs +45 -0
  301. package/apps/cli/dist/node_modules/.pnpm/whatwg-encoding@3.1.1/node_modules/whatwg-encoding/lib/whatwg-encoding.mjs +40 -0
  302. package/apps/cli/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/mime-type-parameters.mjs +54 -0
  303. package/apps/cli/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/mime-type.mjs +92 -0
  304. package/apps/cli/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/parser.mjs +62 -0
  305. package/apps/cli/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/serializer.mjs +24 -0
  306. package/apps/cli/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/utils.mjs +47 -0
  307. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.mjs +26 -0
  308. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.mjs +35 -0
  309. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.mjs +17 -0
  310. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.mjs +800 -0
  311. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.mjs +508 -0
  312. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.mjs +366 -0
  313. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.mjs +60 -0
  314. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.mjs +32 -0
  315. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.mjs +63 -0
  316. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.mjs +253 -0
  317. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.mjs +118 -0
  318. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.mjs +65 -0
  319. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.mjs +48 -0
  320. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.mjs +1235 -0
  321. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.mjs +297 -0
  322. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.mjs +316 -0
  323. package/apps/cli/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.mjs +8 -0
  324. package/apps/cli/dist/packages/data-maintenance/src/archive.mjs +143 -0
  325. package/apps/cli/dist/packages/data-maintenance/src/contracts.mjs +17 -0
  326. package/apps/cli/dist/packages/data-maintenance/src/files.mjs +121 -0
  327. package/apps/cli/dist/packages/data-maintenance/src/index.mjs +494 -0
  328. package/apps/cli/dist/packages/data-maintenance/src/lease.mjs +53 -0
  329. package/apps/cli/dist/packages/data-maintenance/src/migration-backup.mjs +57 -0
  330. package/apps/cli/dist/packages/data-maintenance/src/paths.mjs +15 -0
  331. package/apps/cli/dist/packages/feidee/src/client.mjs +635 -0
  332. package/apps/cli/dist/packages/feidee/src/hash.mjs +10 -0
  333. package/apps/cli/dist/packages/feidee/src/index.mjs +8 -0
  334. package/apps/cli/dist/packages/feidee/src/mutation-gateway.mjs +165 -0
  335. package/apps/cli/dist/packages/feidee/src/parsers.mjs +634 -0
  336. package/apps/cli/dist/packages/feidee/src/transaction-text.mjs +39 -0
  337. package/apps/cli/dist/packages/feidee/src/write-contract.mjs +273 -0
  338. package/apps/cli/dist/packages/finance/src/date-range.mjs +74 -0
  339. package/apps/cli/dist/packages/finance/src/domain.mjs +18 -0
  340. package/apps/cli/dist/packages/finance/src/errors.mjs +221 -0
  341. package/apps/cli/dist/packages/finance/src/index.mjs +16 -0
  342. package/apps/cli/dist/packages/finance/src/metadata-query.mjs +32 -0
  343. package/apps/cli/dist/packages/finance/src/sync/progress.mjs +27 -0
  344. package/apps/cli/dist/packages/finance/src/sync/service.mjs +282 -0
  345. package/apps/cli/dist/packages/finance/src/transactions/audit.mjs +104 -0
  346. package/apps/cli/dist/packages/finance/src/transactions/canary.mjs +85 -0
  347. package/apps/cli/dist/packages/finance/src/transactions/compare.mjs +76 -0
  348. package/apps/cli/dist/packages/finance/src/transactions/contracts.mjs +92 -0
  349. package/apps/cli/dist/packages/finance/src/transactions/memo-policy.mjs +79 -0
  350. package/apps/cli/dist/packages/finance/src/transactions/mutation.mjs +656 -0
  351. package/apps/cli/dist/packages/finance/src/transactions/query.mjs +59 -0
  352. package/apps/cli/dist/packages/finance/src/transactions/statistics.mjs +67 -0
  353. package/apps/cli/dist/packages/finance/src/write-policy.mjs +4 -0
  354. package/apps/cli/dist/packages/finance-module/src/balance-preview.mjs +4 -0
  355. package/apps/cli/dist/packages/finance-module/src/contracts.mjs +13 -0
  356. package/apps/cli/dist/packages/finance-module/src/database.mjs +1292 -0
  357. package/apps/cli/dist/packages/finance-module/src/draft-entries.mjs +89 -0
  358. package/apps/cli/dist/packages/finance-module/src/draft-receipts.mjs +8 -0
  359. package/apps/cli/dist/packages/finance-module/src/historical-task-archives.mjs +24 -0
  360. package/apps/cli/dist/packages/finance-module/src/node.mjs +76 -0
  361. package/apps/cli/dist/packages/finance-module/src/personal-preferences.mjs +29 -0
  362. package/apps/cli/dist/packages/finance-module/src/route-contracts.mjs +11 -0
  363. package/apps/cli/dist/packages/finance-module/src/schema-compatibility.mjs +142 -0
  364. package/apps/cli/dist/packages/finance-module/src/service-record-domain.mjs +16 -0
  365. package/apps/cli/dist/packages/finance-module/src/service-record-store.mjs +119 -0
  366. package/apps/cli/dist/packages/finance-module/src/shared-draft-migration.mjs +39 -0
  367. package/apps/cli/dist/packages/finance-module/src/single-draft-migration.mjs +70 -0
  368. package/apps/cli/dist/packages/finance-module/src/storage.mjs +282 -0
  369. package/apps/cli/dist/packages/finance-module/src/web-contracts.mjs +38 -0
  370. package/apps/cli/dist/packages/local-store/src/checkpoint-backup.mjs +40 -0
  371. package/apps/cli/dist/packages/local-store/src/checkpoint-history.mjs +77 -0
  372. package/apps/cli/dist/packages/local-store/src/database.mjs +1523 -0
  373. package/apps/cli/dist/packages/local-store/src/exchange-rates.mjs +169 -0
  374. package/apps/cli/dist/packages/local-store/src/node.mjs +71 -0
  375. package/apps/cli/dist/packages/sdk/src/account-snapshot-service.mjs +582 -0
  376. package/apps/cli/dist/packages/sdk/src/auth.mjs +89 -0
  377. package/apps/cli/dist/packages/sdk/src/cache-analysis.mjs +393 -0
  378. package/apps/cli/dist/packages/sdk/src/config.mjs +64 -0
  379. package/apps/cli/dist/packages/sdk/src/credential-identity.mjs +8 -0
  380. package/apps/cli/dist/packages/sdk/src/credentials.mjs +86 -0
  381. package/apps/cli/dist/packages/sdk/src/exchange-rate-service.mjs +253 -0
  382. package/apps/cli/dist/packages/sdk/src/finance-cookie-cache.mjs +93 -0
  383. package/apps/cli/dist/packages/sdk/src/finance-session.mjs +215 -0
  384. package/apps/cli/dist/packages/sdk/src/frankfurter.mjs +125 -0
  385. package/apps/cli/dist/packages/sdk/src/node.mjs +53 -0
  386. package/apps/cli/dist/packages/sdk/src/probe.mjs +65 -0
  387. package/apps/cli/dist/packages/sdk/src/resource-lease-node.mjs +27 -0
  388. package/apps/cli/dist/packages/sdk/src/resource-lease-owner-node.mjs +68 -0
  389. package/apps/cli/dist/packages/sdk/src/resource-lease.mjs +143 -0
  390. package/apps/cli/dist/packages/sdk/src/runtime.mjs +643 -0
  391. package/apps/cli/dist/storage.mjs +11 -0
  392. package/bundles/sui-ledger/dist/_virtual/_rolldown/runtime.mjs +35 -0
  393. package/bundles/sui-ledger/dist/capabilities/tools.mjs +32 -0
  394. package/bundles/sui-ledger/dist/client.js +23511 -0
  395. package/bundles/sui-ledger/dist/finance-prompt.mjs +30 -0
  396. package/bundles/sui-ledger/dist/finance-state-context.mjs +38 -0
  397. package/bundles/sui-ledger/dist/index.mjs +198 -0
  398. package/bundles/sui-ledger/dist/maintenance-cli.mjs +76 -0
  399. package/bundles/sui-ledger/dist/node_modules/.pnpm/@deepseek-ai_dsh-home-paths_159c15e70066431314381a350c2ee56a/node_modules/@deepseek-ai/dsh-home-paths/lib/index.mjs +67 -0
  400. package/bundles/sui-ledger/dist/node_modules/.pnpm/@keyv_serialize@1.1.1/node_modules/@keyv/serialize/dist/index.mjs +37 -0
  401. package/bundles/sui-ledger/dist/node_modules/.pnpm/@sec-ant_readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.mjs +81 -0
  402. package/bundles/sui-ledger/dist/node_modules/.pnpm/@sec-ant_readable-stream@0.4.1/node_modules/@sec-ant/readable-stream/dist/ponyfill/index.mjs +1 -0
  403. package/bundles/sui-ledger/dist/node_modules/.pnpm/@sindresorhus_is@7.2.0/node_modules/@sindresorhus/is/distribution/index.mjs +1015 -0
  404. package/bundles/sui-ledger/dist/node_modules/.pnpm/@sindresorhus_is@7.2.0/node_modules/@sindresorhus/is/distribution/utilities.mjs +6 -0
  405. package/bundles/sui-ledger/dist/node_modules/.pnpm/boolbase@1.0.0/node_modules/boolbase/index.mjs +15 -0
  406. package/bundles/sui-ledger/dist/node_modules/.pnpm/byte-counter@0.1.0/node_modules/byte-counter/utilities.mjs +9 -0
  407. package/bundles/sui-ledger/dist/node_modules/.pnpm/cacheable-lookup@7.0.0/node_modules/cacheable-lookup/source/index.mjs +279 -0
  408. package/bundles/sui-ledger/dist/node_modules/.pnpm/cacheable-request@13.0.19/node_modules/cacheable-request/dist/index.mjs +274 -0
  409. package/bundles/sui-ledger/dist/node_modules/.pnpm/cacheable-request@13.0.19/node_modules/cacheable-request/dist/types.mjs +15 -0
  410. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio-select@2.1.0/node_modules/cheerio-select/lib/esm/helpers.mjs +15 -0
  411. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio-select@2.1.0/node_modules/cheerio-select/lib/esm/index.mjs +159 -0
  412. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio-select@2.1.0/node_modules/cheerio-select/lib/esm/positionals.mjs +33 -0
  413. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/attributes.mjs +465 -0
  414. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/css.mjs +94 -0
  415. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/extract.mjs +39 -0
  416. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/forms.mjs +63 -0
  417. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/manipulation.mjs +731 -0
  418. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/api/traversing.mjs +828 -0
  419. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/cheerio.mjs +53 -0
  420. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/index.mjs +11 -0
  421. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/load-parse.mjs +25 -0
  422. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/load.mjs +73 -0
  423. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/options.mjs +27 -0
  424. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/parse.mjs +53 -0
  425. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/parsers/parse5-adapter.mjs +42 -0
  426. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/static.mjs +165 -0
  427. package/bundles/sui-ledger/dist/node_modules/.pnpm/cheerio@1.1.2/node_modules/cheerio/dist/esm/utils.mjs +78 -0
  428. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/attributes.mjs +187 -0
  429. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/compile.mjs +77 -0
  430. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/general.mjs +89 -0
  431. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/index.mjs +43 -0
  432. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/aliases.mjs +32 -0
  433. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/filters.mjs +114 -0
  434. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/index.mjs +35 -0
  435. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.mjs +53 -0
  436. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/pseudo-selectors/subselects.mjs +68 -0
  437. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-select@5.2.2/node_modules/css-select/lib/esm/sort.mjs +60 -0
  438. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/commonjs/index.mjs +50 -0
  439. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/commonjs/parse.mjs +320 -0
  440. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/commonjs/stringify.mjs +102 -0
  441. package/bundles/sui-ledger/dist/node_modules/.pnpm/css-what@6.2.2/node_modules/css-what/lib/commonjs/types.mjs +45 -0
  442. package/bundles/sui-ledger/dist/node_modules/.pnpm/decompress-response@10.0.0/node_modules/decompress-response/index.mjs +59 -0
  443. package/bundles/sui-ledger/dist/node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/esm/foreignNames.mjs +103 -0
  444. package/bundles/sui-ledger/dist/node_modules/.pnpm/dom-serializer@2.0.0/node_modules/dom-serializer/lib/esm/index.mjs +144 -0
  445. package/bundles/sui-ledger/dist/node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/esm/index.mjs +51 -0
  446. package/bundles/sui-ledger/dist/node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/index.mjs +128 -0
  447. package/bundles/sui-ledger/dist/node_modules/.pnpm/domhandler@5.0.3/node_modules/domhandler/lib/esm/node.mjs +312 -0
  448. package/bundles/sui-ledger/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/feeds.mjs +161 -0
  449. package/bundles/sui-ledger/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/helpers.mjs +113 -0
  450. package/bundles/sui-ledger/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/index.mjs +56 -0
  451. package/bundles/sui-ledger/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/legacy.mjs +141 -0
  452. package/bundles/sui-ledger/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/manipulation.mjs +117 -0
  453. package/bundles/sui-ledger/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/querying.mjs +124 -0
  454. package/bundles/sui-ledger/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/stringify.mjs +69 -0
  455. package/bundles/sui-ledger/dist/node_modules/.pnpm/domutils@3.2.2/node_modules/domutils/lib/esm/traversal.mjs +109 -0
  456. package/bundles/sui-ledger/dist/node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/dist/esm/index.mjs +7 -0
  457. package/bundles/sui-ledger/dist/node_modules/.pnpm/encoding-sniffer@0.2.1/node_modules/encoding-sniffer/dist/esm/sniffer.mjs +112 -0
  458. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/escape.mjs +83 -0
  459. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs +43 -0
  460. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/decode.mjs +330 -0
  461. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/escape.mjs +49 -0
  462. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@6.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs +4 -0
  463. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/decode-codepoint.mjs +57 -0
  464. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/decode.mjs +351 -0
  465. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/generated/decode-data-html.mjs +5 -0
  466. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/generated/decode-data-xml.mjs +5 -0
  467. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/internal/bin-trie-flags.mjs +20 -0
  468. package/bundles/sui-ledger/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/internal/decode-shared.mjs +14 -0
  469. package/bundles/sui-ledger/dist/node_modules/.pnpm/fflate@0.8.3/node_modules/fflate/esm/index.mjs +871 -0
  470. package/bundles/sui-ledger/dist/node_modules/.pnpm/form-data-encoder@4.1.0/node_modules/form-data-encoder/lib/index.mjs +279 -0
  471. package/bundles/sui-ledger/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/array-buffer.mjs +54 -0
  472. package/bundles/sui-ledger/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/buffer.mjs +14 -0
  473. package/bundles/sui-ledger/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/contents.mjs +80 -0
  474. package/bundles/sui-ledger/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/stream.mjs +41 -0
  475. package/bundles/sui-ledger/dist/node_modules/.pnpm/get-stream@9.0.1/node_modules/get-stream/source/utils.mjs +8 -0
  476. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/as-promise/index.mjs +154 -0
  477. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/as-promise/types.mjs +20 -0
  478. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/calculate-retry-delay.mjs +20 -0
  479. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/diagnostics-channel.mjs +38 -0
  480. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/errors.mjs +132 -0
  481. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/index.mjs +923 -0
  482. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/options.mjs +1622 -0
  483. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/parse-link-header.mjs +27 -0
  484. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/response.mjs +36 -0
  485. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/timed-out.mjs +107 -0
  486. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/defer-to-connect.mjs +28 -0
  487. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/get-body-size.mjs +23 -0
  488. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/is-client-request.mjs +6 -0
  489. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/is-form-data.mjs +7 -0
  490. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/is-unix-socket-url.mjs +25 -0
  491. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/proxy-events.mjs +16 -0
  492. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/timer.mjs +114 -0
  493. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/unhandle.mjs +23 -0
  494. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/url-to-options.mjs +20 -0
  495. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/core/utils/weakable-map.mjs +19 -0
  496. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/create.mjs +166 -0
  497. package/bundles/sui-ledger/dist/node_modules/.pnpm/got@14.6.5/node_modules/got/dist/source/index.mjs +17 -0
  498. package/bundles/sui-ledger/dist/node_modules/.pnpm/htmlparser2@10.1.0/node_modules/htmlparser2/dist/esm/Parser.mjs +441 -0
  499. package/bundles/sui-ledger/dist/node_modules/.pnpm/htmlparser2@10.1.0/node_modules/htmlparser2/dist/esm/Tokenizer.mjs +661 -0
  500. package/bundles/sui-ledger/dist/node_modules/.pnpm/htmlparser2@10.1.0/node_modules/htmlparser2/dist/esm/index.mjs +19 -0
  501. package/bundles/sui-ledger/dist/node_modules/.pnpm/http-cache-semantics@4.3.0/node_modules/http-cache-semantics/index.mjs +608 -0
  502. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/agent.mjs +441 -0
  503. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/auto.mjs +145 -0
  504. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/client-request.mjs +318 -0
  505. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/incoming-message.mjs +58 -0
  506. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/index.mjs +51 -0
  507. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/get-auth-headers.mjs +19 -0
  508. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h1-over-h2.mjs +84 -0
  509. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-h1.mjs +49 -0
  510. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-h2.mjs +38 -0
  511. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/h2-over-hx.mjs +39 -0
  512. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/initialize.mjs +23 -0
  513. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/proxies/unexpected-status-code-error.mjs +15 -0
  514. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/calculate-server-name.mjs +24 -0
  515. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/check-type.mjs +17 -0
  516. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/delay-async-destroy.mjs +28 -0
  517. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/errors.mjs +30 -0
  518. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.mjs +16 -0
  519. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/js-stream-socket.mjs +9 -0
  520. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/proxy-events.mjs +10 -0
  521. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/proxy-socket-handler.mjs +77 -0
  522. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/validate-header-name.mjs +15 -0
  523. package/bundles/sui-ledger/dist/node_modules/.pnpm/http2-wrapper@2.2.1/node_modules/http2-wrapper/source/utils/validate-header-value.mjs +14 -0
  524. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-codec.mjs +355 -0
  525. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.mjs +191 -0
  526. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/index.mjs +31 -0
  527. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/internal.mjs +140 -0
  528. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-codec.mjs +50 -0
  529. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data-generated.mjs +455 -0
  530. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.mjs +151 -0
  531. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/big5-added.mjs +169 -0
  532. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp936.mjs +2584 -0
  533. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp949.mjs +2220 -0
  534. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/cp950.mjs +227 -0
  535. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/eucjp.mjs +425 -0
  536. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gb18030-ranges.mjs +427 -0
  537. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/gbk-added.mjs +230 -0
  538. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/tables/shiftjis.mjs +292 -0
  539. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf16.mjs +123 -0
  540. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf32.mjs +197 -0
  541. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/utf7.mjs +182 -0
  542. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/bom-handling.mjs +42 -0
  543. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.mjs +108 -0
  544. package/bundles/sui-ledger/dist/node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/streams.mjs +90 -0
  545. package/bundles/sui-ledger/dist/node_modules/.pnpm/is-stream@4.0.1/node_modules/is-stream/index.mjs +9 -0
  546. package/bundles/sui-ledger/dist/node_modules/.pnpm/js-sha256@0.11.1/node_modules/js-sha256/src/sha256.mjs +495 -0
  547. package/bundles/sui-ledger/dist/node_modules/.pnpm/keyv@5.6.0/node_modules/keyv/dist/index.mjs +740 -0
  548. package/bundles/sui-ledger/dist/node_modules/.pnpm/lowercase-keys@3.0.0/node_modules/lowercase-keys/index.mjs +6 -0
  549. package/bundles/sui-ledger/dist/node_modules/.pnpm/mimic-response@4.0.0/node_modules/mimic-response/index.mjs +53 -0
  550. package/bundles/sui-ledger/dist/node_modules/.pnpm/normalize-url@8.1.1/node_modules/normalize-url/index.mjs +145 -0
  551. package/bundles/sui-ledger/dist/node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/esm/compile.mjs +37 -0
  552. package/bundles/sui-ledger/dist/node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/esm/index.mjs +31 -0
  553. package/bundles/sui-ledger/dist/node_modules/.pnpm/nth-check@2.1.1/node_modules/nth-check/lib/esm/parse.mjs +60 -0
  554. package/bundles/sui-ledger/dist/node_modules/.pnpm/p-cancelable@4.0.1/node_modules/p-cancelable/index.mjs +86 -0
  555. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5-htmlparser2-tree-adapter@7.1.0/node_modules/parse5-htmlparser2-tree-adapter/dist/index.mjs +187 -0
  556. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5-parser-stream@7.1.2/node_modules/parse5-parser-stream/dist/index.mjs +2 -0
  557. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/doctype.mjs +101 -0
  558. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/error-codes.mjs +66 -0
  559. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/foreign-content.mjs +259 -0
  560. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/html.mjs +544 -0
  561. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/token.mjs +19 -0
  562. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/common/unicode.mjs +91 -0
  563. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/index.mjs +41 -0
  564. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/formatting-element-list.mjs +91 -0
  565. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/index.mjs +2492 -0
  566. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/parser/open-element-stack.mjs +292 -0
  567. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/serializer/index.mjs +111 -0
  568. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/index.mjs +2067 -0
  569. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tokenizer/preprocessor.mjs +154 -0
  570. package/bundles/sui-ledger/dist/node_modules/.pnpm/parse5@7.3.0/node_modules/parse5/dist/tree-adapters/default.mjs +164 -0
  571. package/bundles/sui-ledger/dist/node_modules/.pnpm/quick-lru@5.1.1/node_modules/quick-lru/index.mjs +77 -0
  572. package/bundles/sui-ledger/dist/node_modules/.pnpm/resolve-alpn@1.2.1/node_modules/resolve-alpn/index.mjs +47 -0
  573. package/bundles/sui-ledger/dist/node_modules/.pnpm/responselike@4.0.2/node_modules/responselike/index.mjs +32 -0
  574. package/bundles/sui-ledger/dist/node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.mjs +45 -0
  575. package/bundles/sui-ledger/dist/node_modules/.pnpm/tldts@7.4.18/node_modules/tldts/dist/cjs/index.mjs +22542 -0
  576. package/bundles/sui-ledger/dist/node_modules/.pnpm/tough-cookie@6.0.0/node_modules/tough-cookie/dist/index.mjs +1761 -0
  577. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/index.mjs +221 -0
  578. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/abort-signal.mjs +44 -0
  579. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-connect.mjs +85 -0
  580. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-pipeline.mjs +174 -0
  581. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-request.mjs +155 -0
  582. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-stream.mjs +136 -0
  583. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/api-upgrade.mjs +88 -0
  584. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/index.mjs +17 -0
  585. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/api/readable.mjs +418 -0
  586. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/cache/memory-cache-store.mjs +190 -0
  587. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/cache/sqlite-cache-store.mjs +324 -0
  588. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/connect.mjs +115 -0
  589. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/constants.mjs +134 -0
  590. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/diagnostics.mjs +114 -0
  591. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/errors.mjs +412 -0
  592. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/request.mjs +282 -0
  593. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/socks5-client.mjs +288 -0
  594. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/socks5-utils.mjs +166 -0
  595. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/symbols.mjs +80 -0
  596. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/tree.mjs +124 -0
  597. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/core/util.mjs +940 -0
  598. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/agent.mjs +119 -0
  599. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/balanced-pool.mjs +129 -0
  600. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/client-h1.mjs +1091 -0
  601. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/client-h2.mjs +588 -0
  602. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/client.mjs +385 -0
  603. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/dispatcher-base.mjs +121 -0
  604. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/dispatcher.mjs +35 -0
  605. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/env-http-proxy-agent.mjs +105 -0
  606. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/fixed-queue.mjs +75 -0
  607. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/h2c-client.mjs +31 -0
  608. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/pool-base.mjs +155 -0
  609. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/pool.mjs +76 -0
  610. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/proxy-agent.mjs +233 -0
  611. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/retry-agent.mjs +37 -0
  612. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/round-robin-pool.mjs +94 -0
  613. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/dispatcher/socks5-proxy-agent.mjs +194 -0
  614. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/encoding/index.mjs +18 -0
  615. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/global.mjs +48 -0
  616. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/cache-handler.mjs +457 -0
  617. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/cache-revalidation-handler.mjs +82 -0
  618. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/decorator-handler.mjs +57 -0
  619. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/deduplication-handler.mjs +341 -0
  620. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/redirect-handler.mjs +131 -0
  621. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/retry-handler.mjs +332 -0
  622. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/unwrap-handler.mjs +88 -0
  623. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/handler/wrap-handler.mjs +68 -0
  624. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/cache.mjs +350 -0
  625. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/decompress.mjs +416 -0
  626. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/deduplicate.mjs +69 -0
  627. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/dns.mjs +323 -0
  628. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/dump.mjs +65 -0
  629. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/redirect.mjs +20 -0
  630. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/response-error.mjs +73 -0
  631. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/interceptor/retry.mjs +25 -0
  632. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/llhttp/constants.mjs +590 -0
  633. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/llhttp/llhttp-wasm.mjs +13 -0
  634. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/llhttp/llhttp_simd-wasm.mjs +13 -0
  635. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/llhttp/utils.mjs +16 -0
  636. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-agent.mjs +154 -0
  637. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-call-history.mjs +159 -0
  638. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-client.mjs +59 -0
  639. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-errors.mjs +28 -0
  640. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-interceptor.mjs +150 -0
  641. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-pool.mjs +59 -0
  642. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-symbols.mjs +37 -0
  643. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/mock-utils.mjs +302 -0
  644. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/pending-interceptors-formatter.mjs +38 -0
  645. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/snapshot-agent.mjs +268 -0
  646. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/snapshot-recorder.mjs +424 -0
  647. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/mock/snapshot-utils.mjs +121 -0
  648. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/cache.mjs +440 -0
  649. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/date.mjs +332 -0
  650. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/promise.mjs +31 -0
  651. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/runtime-features.mjs +101 -0
  652. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/stats.mjs +31 -0
  653. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/util/timers.mjs +341 -0
  654. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cache/cache.mjs +462 -0
  655. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cache/cachestorage.mjs +103 -0
  656. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cache/util.mjs +39 -0
  657. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cookies/constants.mjs +11 -0
  658. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cookies/index.mjs +169 -0
  659. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cookies/parse.mjs +108 -0
  660. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/cookies/util.mjs +239 -0
  661. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/eventsource/eventsource-stream.mjs +317 -0
  662. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/eventsource/eventsource.mjs +345 -0
  663. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/eventsource/util.mjs +29 -0
  664. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/body.mjs +271 -0
  665. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/constants.mjs +224 -0
  666. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/data-url.mjs +247 -0
  667. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/formdata-parser.mjs +255 -0
  668. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/formdata.mjs +153 -0
  669. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/global.mjs +34 -0
  670. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/headers.mjs +400 -0
  671. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/index.mjs +776 -0
  672. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/request.mjs +602 -0
  673. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/response.mjs +358 -0
  674. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/fetch/util.mjs +795 -0
  675. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/infra/index.mjs +154 -0
  676. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.mjs +170 -0
  677. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/webidl/index.mjs +505 -0
  678. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/connection.mjs +166 -0
  679. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/constants.mjs +47 -0
  680. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/events.mjs +268 -0
  681. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/frame.mjs +105 -0
  682. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/permessage-deflate.mjs +85 -0
  683. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/receiver.mjs +323 -0
  684. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/sender.mjs +90 -0
  685. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/stream/websocketerror.mjs +78 -0
  686. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/stream/websocketstream.mjs +270 -0
  687. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/util.mjs +212 -0
  688. package/bundles/sui-ledger/dist/node_modules/.pnpm/undici@7.30.0/node_modules/undici/lib/web/websocket/websocket.mjs +432 -0
  689. package/bundles/sui-ledger/dist/node_modules/.pnpm/whatwg-encoding@3.1.1/node_modules/whatwg-encoding/lib/labels-to-names.mjs +224 -0
  690. package/bundles/sui-ledger/dist/node_modules/.pnpm/whatwg-encoding@3.1.1/node_modules/whatwg-encoding/lib/supported-names.mjs +45 -0
  691. package/bundles/sui-ledger/dist/node_modules/.pnpm/whatwg-encoding@3.1.1/node_modules/whatwg-encoding/lib/whatwg-encoding.mjs +40 -0
  692. package/bundles/sui-ledger/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/mime-type-parameters.mjs +54 -0
  693. package/bundles/sui-ledger/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/mime-type.mjs +92 -0
  694. package/bundles/sui-ledger/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/parser.mjs +62 -0
  695. package/bundles/sui-ledger/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/serializer.mjs +24 -0
  696. package/bundles/sui-ledger/dist/node_modules/.pnpm/whatwg-mimetype@4.0.0/node_modules/whatwg-mimetype/lib/utils.mjs +47 -0
  697. package/bundles/sui-ledger/dist/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/dist/cpexcel.mjs +3348 -0
  698. package/bundles/sui-ledger/dist/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx.mjs +26473 -0
  699. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.mjs +26 -0
  700. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.mjs +35 -0
  701. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.mjs +17 -0
  702. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.mjs +800 -0
  703. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.mjs +508 -0
  704. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.mjs +366 -0
  705. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.mjs +60 -0
  706. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.mjs +32 -0
  707. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.mjs +63 -0
  708. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.mjs +253 -0
  709. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.mjs +118 -0
  710. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.mjs +65 -0
  711. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.mjs +48 -0
  712. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.mjs +1235 -0
  713. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.mjs +297 -0
  714. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.mjs +316 -0
  715. package/bundles/sui-ledger/dist/node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.mjs +8 -0
  716. package/bundles/sui-ledger/dist/packages/data-maintenance/src/archive.mjs +143 -0
  717. package/bundles/sui-ledger/dist/packages/data-maintenance/src/contracts.mjs +17 -0
  718. package/bundles/sui-ledger/dist/packages/data-maintenance/src/files.mjs +158 -0
  719. package/bundles/sui-ledger/dist/packages/data-maintenance/src/index.mjs +494 -0
  720. package/bundles/sui-ledger/dist/packages/data-maintenance/src/lease.mjs +53 -0
  721. package/bundles/sui-ledger/dist/packages/data-maintenance/src/migration-backup.mjs +57 -0
  722. package/bundles/sui-ledger/dist/packages/data-maintenance/src/paths.mjs +15 -0
  723. package/bundles/sui-ledger/dist/packages/data-maintenance/src/runtime.mjs +132 -0
  724. package/bundles/sui-ledger/dist/packages/feidee/src/client.mjs +635 -0
  725. package/bundles/sui-ledger/dist/packages/feidee/src/hash.mjs +10 -0
  726. package/bundles/sui-ledger/dist/packages/feidee/src/index.mjs +8 -0
  727. package/bundles/sui-ledger/dist/packages/feidee/src/mutation-gateway.mjs +165 -0
  728. package/bundles/sui-ledger/dist/packages/feidee/src/parsers.mjs +634 -0
  729. package/bundles/sui-ledger/dist/packages/feidee/src/transaction-text.mjs +39 -0
  730. package/bundles/sui-ledger/dist/packages/feidee/src/write-contract.mjs +273 -0
  731. package/bundles/sui-ledger/dist/packages/finance/src/date-range.mjs +74 -0
  732. package/bundles/sui-ledger/dist/packages/finance/src/domain.mjs +18 -0
  733. package/bundles/sui-ledger/dist/packages/finance/src/errors.mjs +221 -0
  734. package/bundles/sui-ledger/dist/packages/finance/src/index.mjs +17 -0
  735. package/bundles/sui-ledger/dist/packages/finance/src/json-schema.mjs +212 -0
  736. package/bundles/sui-ledger/dist/packages/finance/src/metadata-query.mjs +32 -0
  737. package/bundles/sui-ledger/dist/packages/finance/src/money.mjs +39 -0
  738. package/bundles/sui-ledger/dist/packages/finance/src/public-error.mjs +10 -0
  739. package/bundles/sui-ledger/dist/packages/finance/src/sync/progress.mjs +27 -0
  740. package/bundles/sui-ledger/dist/packages/finance/src/sync/service.mjs +282 -0
  741. package/bundles/sui-ledger/dist/packages/finance/src/transactions/audit.mjs +104 -0
  742. package/bundles/sui-ledger/dist/packages/finance/src/transactions/canary.mjs +85 -0
  743. package/bundles/sui-ledger/dist/packages/finance/src/transactions/compare.mjs +76 -0
  744. package/bundles/sui-ledger/dist/packages/finance/src/transactions/contracts.mjs +83 -0
  745. package/bundles/sui-ledger/dist/packages/finance/src/transactions/memo-policy.mjs +79 -0
  746. package/bundles/sui-ledger/dist/packages/finance/src/transactions/mutation.mjs +656 -0
  747. package/bundles/sui-ledger/dist/packages/finance/src/transactions/query.mjs +59 -0
  748. package/bundles/sui-ledger/dist/packages/finance/src/transactions/statistics.mjs +67 -0
  749. package/bundles/sui-ledger/dist/packages/finance/src/write-policy.mjs +4 -0
  750. package/bundles/sui-ledger/dist/packages/finance-module/src/balance-preview.mjs +119 -0
  751. package/bundles/sui-ledger/dist/packages/finance-module/src/capabilities.mjs +1306 -0
  752. package/bundles/sui-ledger/dist/packages/finance-module/src/checkpoint-review.mjs +75 -0
  753. package/bundles/sui-ledger/dist/packages/finance-module/src/commit-failure.mjs +161 -0
  754. package/bundles/sui-ledger/dist/packages/finance-module/src/commit-recovery.mjs +41 -0
  755. package/bundles/sui-ledger/dist/packages/finance-module/src/contracts.mjs +13 -0
  756. package/bundles/sui-ledger/dist/packages/finance-module/src/data-version.mjs +8 -0
  757. package/bundles/sui-ledger/dist/packages/finance-module/src/database.mjs +1292 -0
  758. package/bundles/sui-ledger/dist/packages/finance-module/src/draft-entries.mjs +216 -0
  759. package/bundles/sui-ledger/dist/packages/finance-module/src/draft-receipts.mjs +16 -0
  760. package/bundles/sui-ledger/dist/packages/finance-module/src/finance-guidance.mjs +23 -0
  761. package/bundles/sui-ledger/dist/packages/finance-module/src/historical-task-archives.mjs +24 -0
  762. package/bundles/sui-ledger/dist/packages/finance-module/src/index.mjs +17 -0
  763. package/bundles/sui-ledger/dist/packages/finance-module/src/interactions.mjs +229 -0
  764. package/bundles/sui-ledger/dist/packages/finance-module/src/model-pages.mjs +61 -0
  765. package/bundles/sui-ledger/dist/packages/finance-module/src/model-views.mjs +206 -0
  766. package/bundles/sui-ledger/dist/packages/finance-module/src/node.mjs +76 -0
  767. package/bundles/sui-ledger/dist/packages/finance-module/src/personal-preferences.mjs +103 -0
  768. package/bundles/sui-ledger/dist/packages/finance-module/src/route-contracts.mjs +11 -0
  769. package/bundles/sui-ledger/dist/packages/finance-module/src/routes.mjs +427 -0
  770. package/bundles/sui-ledger/dist/packages/finance-module/src/schema-compatibility.mjs +142 -0
  771. package/bundles/sui-ledger/dist/packages/finance-module/src/sdk-adapter.mjs +100 -0
  772. package/bundles/sui-ledger/dist/packages/finance-module/src/service-record-domain.mjs +207 -0
  773. package/bundles/sui-ledger/dist/packages/finance-module/src/service-record-routes.mjs +91 -0
  774. package/bundles/sui-ledger/dist/packages/finance-module/src/service-record-store.mjs +119 -0
  775. package/bundles/sui-ledger/dist/packages/finance-module/src/service-record-tools.mjs +283 -0
  776. package/bundles/sui-ledger/dist/packages/finance-module/src/service-records.mjs +626 -0
  777. package/bundles/sui-ledger/dist/packages/finance-module/src/service.mjs +2525 -0
  778. package/bundles/sui-ledger/dist/packages/finance-module/src/shared-draft-migration.mjs +39 -0
  779. package/bundles/sui-ledger/dist/packages/finance-module/src/single-draft-migration.mjs +70 -0
  780. package/bundles/sui-ledger/dist/packages/finance-module/src/source-reader.mjs +354 -0
  781. package/bundles/sui-ledger/dist/packages/finance-module/src/storage.mjs +282 -0
  782. package/bundles/sui-ledger/dist/packages/finance-module/src/tool-contracts.mjs +42 -0
  783. package/bundles/sui-ledger/dist/packages/finance-module/src/web-contracts.mjs +74 -0
  784. package/bundles/sui-ledger/dist/packages/interaction/src/registry.mjs +36 -0
  785. package/bundles/sui-ledger/dist/packages/interaction/src/service.mjs +424 -0
  786. package/bundles/sui-ledger/dist/packages/local-store/src/checkpoint-backup.mjs +40 -0
  787. package/bundles/sui-ledger/dist/packages/local-store/src/checkpoint-history.mjs +77 -0
  788. package/bundles/sui-ledger/dist/packages/local-store/src/database.mjs +1523 -0
  789. package/bundles/sui-ledger/dist/packages/local-store/src/exchange-rates.mjs +169 -0
  790. package/bundles/sui-ledger/dist/packages/local-store/src/node.mjs +71 -0
  791. package/bundles/sui-ledger/dist/packages/local-store/src/readonly-node.mjs +486 -0
  792. package/bundles/sui-ledger/dist/packages/sdk/src/account-snapshot-service.mjs +582 -0
  793. package/bundles/sui-ledger/dist/packages/sdk/src/cache-analysis.mjs +597 -0
  794. package/bundles/sui-ledger/dist/packages/sdk/src/config.mjs +64 -0
  795. package/bundles/sui-ledger/dist/packages/sdk/src/credential-identity.mjs +7 -0
  796. package/bundles/sui-ledger/dist/packages/sdk/src/credentials.mjs +86 -0
  797. package/bundles/sui-ledger/dist/packages/sdk/src/exchange-rate-service.mjs +253 -0
  798. package/bundles/sui-ledger/dist/packages/sdk/src/finance-cookie-cache.mjs +93 -0
  799. package/bundles/sui-ledger/dist/packages/sdk/src/finance-session.mjs +215 -0
  800. package/bundles/sui-ledger/dist/packages/sdk/src/frankfurter.mjs +125 -0
  801. package/bundles/sui-ledger/dist/packages/sdk/src/ledger-money.mjs +183 -0
  802. package/bundles/sui-ledger/dist/packages/sdk/src/node-readonly.mjs +381 -0
  803. package/bundles/sui-ledger/dist/packages/sdk/src/node.mjs +53 -0
  804. package/bundles/sui-ledger/dist/packages/sdk/src/probe.mjs +65 -0
  805. package/bundles/sui-ledger/dist/packages/sdk/src/resource-lease-node.mjs +27 -0
  806. package/bundles/sui-ledger/dist/packages/sdk/src/resource-lease-owner-node.mjs +68 -0
  807. package/bundles/sui-ledger/dist/packages/sdk/src/resource-lease.mjs +143 -0
  808. package/bundles/sui-ledger/dist/packages/sdk/src/runtime.mjs +643 -0
  809. package/bundles/sui-ledger/dist/preferences-context.mjs +21 -0
  810. package/bundles/sui-ledger/dist/remote-write-policy.mjs +51 -0
  811. package/bundles/sui-ledger/dist/routes/finance-api.mjs +380 -0
  812. package/bundles/sui-ledger/dist/session/attachment-ownership.mjs +53 -0
  813. package/bundles/sui-ledger/dist/session/call-context.mjs +14 -0
  814. package/bundles/sui-ledger/dist/session/source-ports.mjs +74 -0
  815. package/bundles/sui-ledger/dist/storage/business-runtime.mjs +116 -0
  816. package/bundles/sui-ledger/dist/storage/maintenance-http.mjs +159 -0
  817. package/bundles/sui-ledger/dist/storage/paths.mjs +15 -0
  818. package/bundles/sui-ledger/dist/style.css +15416 -0
  819. package/bundles/sui-ledger/icon.svg +1 -0
  820. package/bundles/sui-ledger/locale/en.json +6 -0
  821. package/bundles/sui-ledger/locale/zh-CN.json +6 -0
  822. package/cordis.patch.yml +4 -0
  823. package/package.json +111 -3
@@ -0,0 +1,1306 @@
1
+ import { financialDateRange } from "../../finance/src/date-range.mjs";
2
+ import "../../finance/src/index.mjs";
3
+ import { snapshotAccounts } from "./balance-preview.mjs";
4
+ import { FinanceDraftFieldError, draftFields } from "./draft-entries.mjs";
5
+ import { remoteVersion } from "./data-version.mjs";
6
+ import { bodyBytes, offsetPage, textSegment } from "./model-pages.mjs";
7
+ import { FinancePublicError } from "../../finance/src/public-error.mjs";
8
+ import { draftEntryBucket, entryModelView, inspectionModelView, metadataModelView, remoteModelView, sourceRowsModelView, transactionModelView } from "./model-views.mjs";
9
+ import { ServiceRecordCapabilityNames, createServiceRecordTools } from "./service-record-tools.mjs";
10
+ import { FINANCE_TOOL_GUIDANCE } from "./finance-guidance.mjs";
11
+ //#region ../../packages/finance-module/src/capabilities.ts
12
+ const FinanceCapabilityNames = Object.freeze({
13
+ ...ServiceRecordCapabilityNames,
14
+ refresh: "finance_ledger_refresh",
15
+ status: "finance_ledger_status",
16
+ books: "finance_books_list",
17
+ metadata: "finance_metadata_get",
18
+ transactions: "finance_transactions_query",
19
+ transaction: "finance_transactions_get",
20
+ history: "finance_transactions_history",
21
+ accountSnapshot: "finance_accounts_snapshot",
22
+ checkpoints: "finance_checkpoints_query",
23
+ summary: "finance_summary_get",
24
+ report: "finance_report_get",
25
+ recurring: "finance_recurring_query",
26
+ debts: "finance_debts_get",
27
+ draftGet: "finance_draft_get",
28
+ draftAdd: "finance_draft_add",
29
+ draftUpdate: "finance_draft_update",
30
+ draftRemove: "finance_draft_remove",
31
+ sourceRowsRead: "finance_sources_rows_read",
32
+ sourceTextRead: "finance_sources_text_read",
33
+ sourceList: "finance_sources_list",
34
+ sourceStructure: "finance_sources_structure",
35
+ sourceProfiles: "finance_sources_profiles",
36
+ entriesSearch: "finance_entries_search",
37
+ entryGet: "finance_entries_get"
38
+ });
39
+ const FINANCE_ERROR_HINTS = {
40
+ finance_source_table_type_unsupported: "This source is not a table-readable file (supported: CSV, XLS, XLSX). It is a document (e.g. PDF): stop calling finance_sources_* on it. Use an available, authorized document-reading capability for this subject. If unavailable, report the limitation; never infer a filesystem path or bypass an authorization denial.",
41
+ finance_source_version_changed: "Source changed. Read finance_sources_list again and restart the affected read with its current sourceRef.",
42
+ finance_source_rows_invalid: "Select existing physical rows with an inclusive start/end range.",
43
+ finance_source_field_not_found: "Read finance_sources_structure and choose an existing header.",
44
+ finance_page_invalid: "Use a nonnegative offset within the selection and a limit from 1 to 100.",
45
+ finance_page_missing_items: "The backing reader returned no rows before its reported total. No rows were skipped; restart the read or report the reader failure.",
46
+ finance_page_item_too_large: "One row exceeds the page budget. Narrow the read with 'fields' on finance_sources_rows_read or raise 'limit' within the page budget.",
47
+ finance_result_requires_narrower_query: "Select fewer rows or fields. No result was silently truncated.",
48
+ finance_draft_entry_not_found: "用 finance_draft_get 读取本会话当前便签,再使用其中的 entryId。已入账条目不在便签上。",
49
+ finance_draft_book_mismatch: "会话便签已绑定其他账本;本会话内不能混入第二个账本。",
50
+ finance_call_input_mismatch: "同一调用标识已用于不同参数。先读取最新状态;若仍需执行,作为新操作使用新的调用标识,不能当作字段校验失败重试原调用。",
51
+ finance_entry_not_found: "entryId must come from finance_entries_search (local pending entries). For a ledger remoteId, use finance_transactions_get with bookId and remoteId.",
52
+ finance_transaction_revision_changed: "Ledger data changed. Restart the query with current dataVersion.",
53
+ finance_checkpoint_page_version_changed: "账本、检查点或当前草稿已变化。保持相关账户范围,从 offset=0 重新读取,不能沿用旧版本的余额核验结果。",
54
+ finance_checkpoint_history_account_required: "view=history 必须通过 accountIds 指定恰好一个账户。多个账户的最近确认点使用 view=latest。"
55
+ };
56
+ function requirePageVersion(input, current) {
57
+ const field = typeof current === "number" ? "expectedRevision" : "expectedVersion";
58
+ const expected = input[field];
59
+ if ((input.offset ?? 0) > 0 && expected === void 0) throw new FinancePublicError(JSON.stringify({
60
+ code: "finance_page_version_required",
61
+ field,
62
+ message: `Continue with ${field} from the first page and the same filters.`
63
+ }));
64
+ if (expected !== void 0 && expected !== current) throw new FinancePublicError(JSON.stringify({
65
+ code: "finance_page_version_changed",
66
+ field,
67
+ dataVersion: current,
68
+ message: "Version mismatch. Restart at offset 0 using this tool's dataVersion, not another resource's version."
69
+ }));
70
+ }
71
+ function createFinanceTools(service, ledger, options = {}) {
72
+ const publicRead = (name, description, schema, execute) => ({
73
+ name,
74
+ description,
75
+ inputSchema: schema,
76
+ execute: async (ctx, input) => {
77
+ try {
78
+ const result = await execute(input, ctx);
79
+ if (bodyBytes(result) > 32768) {
80
+ const receipt = oversizedMutationReceipt(name, result);
81
+ if (receipt && bodyBytes(receipt) <= 32768) return receipt;
82
+ throw new Error(`finance_result_requires_narrower_query:${name}`);
83
+ }
84
+ return result;
85
+ } catch (error) {
86
+ if (error instanceof FinancePublicError) throw error;
87
+ const code = error instanceof Error ? /^finance_[a-z_]+(?=:|$)/.exec(error.message)?.[0] : void 0;
88
+ if (code === "finance_grant_book_mismatch" || code === "finance_grant_missing") {
89
+ const books = service.describeBooks(subjectFor(ctx));
90
+ throw new FinancePublicError(JSON.stringify({
91
+ code,
92
+ activeGrant: books.activeGrant,
93
+ message: code === "finance_grant_book_mismatch" ? "Use the active grant's bookId if the requested ID was mistyped. Selecting another book requires trusted user action." : "No active book grant. Request finance.book_grant.selection and wait for the trusted response."
94
+ }));
95
+ }
96
+ if (code) throw new FinancePublicError(JSON.stringify({
97
+ code,
98
+ ...FINANCE_ERROR_HINTS[code] ? { message: FINANCE_ERROR_HINTS[code] } : {}
99
+ }));
100
+ throw error;
101
+ }
102
+ }
103
+ });
104
+ const bookSchema = objectSchema(["bookId"], { bookId: textSchema });
105
+ const readSourceInspection = async (input, ctx, view) => {
106
+ if (view === "profiles" && !input.fields?.length) throw new Error("finance_source_profile_fields_required");
107
+ const inspection = await service.inspectSource({
108
+ subjectId: ctx.subjectId,
109
+ sourceRef: input.sourceRef,
110
+ view,
111
+ ...input.fields ? { profileFields: input.fields } : {}
112
+ });
113
+ const { sheets, ...identity } = inspectionModelView(inspection, view);
114
+ return offsetPage({
115
+ items: sheets,
116
+ offset: input.offset ?? 0,
117
+ limit: input.limit ?? 50,
118
+ base: identity,
119
+ itemsKey: "sheets",
120
+ project: (item) => item
121
+ });
122
+ };
123
+ let definitions = [
124
+ publicRead(FinanceCapabilityNames.sourceRowsRead, "Read table facts from an authorized immutable sourceRef. start/end are inclusive physical row numbers; equal values select one row. Choose fields by header; omit for all columns. Continue with start=nextStart and the same end. No relative offset is needed. Row values follow the shared column order.", objectSchema([
125
+ "sourceRef",
126
+ "start",
127
+ "end"
128
+ ], {
129
+ sourceRef: sourceRefSchema,
130
+ sheet: boundedTextSchema(200),
131
+ headerRow: {
132
+ type: "integer",
133
+ minimum: 1
134
+ },
135
+ start: {
136
+ type: "integer",
137
+ minimum: 1
138
+ },
139
+ end: {
140
+ type: "integer",
141
+ minimum: 1
142
+ },
143
+ fields: {
144
+ type: "array",
145
+ maxItems: 100,
146
+ items: boundedTextSchema(200)
147
+ },
148
+ limit: {
149
+ type: "integer",
150
+ minimum: 1,
151
+ maximum: 100
152
+ }
153
+ }), async (input, ctx) => {
154
+ const { start, end } = input;
155
+ if (!Number.isSafeInteger(start) || !Number.isSafeInteger(end) || start < 1 || end < start) throw new Error("finance_source_rows_invalid");
156
+ const total = end - start + 1;
157
+ const count = Math.min(total, input.limit ?? 50);
158
+ const selected = Array.from({ length: count }, (_, index) => start + index);
159
+ if (!selected.length) throw new Error("finance_source_rows_invalid");
160
+ const value = await service.readSourceRows({
161
+ subjectId: ctx.subjectId,
162
+ sourceRef: input.sourceRef,
163
+ sheet: input.sheet,
164
+ headerRow: input.headerRow,
165
+ rows: selected,
166
+ fields: input.fields
167
+ });
168
+ if (end > value.totalRows) throw new Error("finance_source_rows_invalid");
169
+ const projected = sourceRowsModelView(value);
170
+ const page = offsetPage({
171
+ items: projected.rows,
172
+ limit: count,
173
+ base: {
174
+ sheet: value.sheet,
175
+ totalRows: value.totalRows,
176
+ columns: projected.columns
177
+ },
178
+ itemsKey: "rows",
179
+ project: (row) => row
180
+ });
181
+ const returned = page.rows.length;
182
+ const { nextOffset: _next, offset: _offset, ...body } = page;
183
+ return {
184
+ ...body,
185
+ total,
186
+ ...returned < total ? { nextStart: start + returned } : {}
187
+ };
188
+ }),
189
+ publicRead(FinanceCapabilityNames.sourceTextRead, "Read an authorized non-tabular source. Continue with offset=nextOffset and expectedChecksum from the first read. Changed content fails explicitly.", objectSchema(["source"], {
190
+ source: sourceReferenceSchema,
191
+ offset: {
192
+ type: "integer",
193
+ minimum: 0
194
+ },
195
+ expectedChecksum: idSchema,
196
+ limit: {
197
+ type: "integer",
198
+ minimum: 1,
199
+ maximum: 8e3
200
+ }
201
+ }), async (input, ctx) => {
202
+ if (input.offset && !input.expectedChecksum) throw new FinancePublicError(JSON.stringify({
203
+ code: "finance_source_version_required",
204
+ message: "Continue with the checksum from the first text read."
205
+ }));
206
+ const request = {
207
+ source: input.source,
208
+ offset: input.offset ?? 0,
209
+ limit: input.limit
210
+ };
211
+ const value = await service.readSourceForSubject(ctx.subjectId, request);
212
+ if (input.expectedChecksum && input.expectedChecksum !== value.checksum) throw new Error("finance_source_version_changed");
213
+ return value;
214
+ }),
215
+ publicRead(FinanceCapabilityNames.sourceStructure, "Read table names, headers and bounded samples for one immutable sourceRef. Continue with offset=nextOffset.", objectSchema(["sourceRef"], {
216
+ sourceRef: sourceRefSchema,
217
+ offset: {
218
+ type: "integer",
219
+ minimum: 0
220
+ },
221
+ limit: {
222
+ type: "integer",
223
+ minimum: 1,
224
+ maximum: 100
225
+ }
226
+ }), (input, ctx) => readSourceInspection(input, ctx, "structure")),
227
+ publicRead(FinanceCapabilityNames.sourceProfiles, "Read distributions only for the requested table fields of an immutable sourceRef. Continue with the same fields and offset=nextOffset.", objectSchema(["sourceRef", "fields"], {
228
+ sourceRef: sourceRefSchema,
229
+ fields: {
230
+ type: "array",
231
+ minItems: 1,
232
+ maxItems: 4,
233
+ items: boundedTextSchema(200)
234
+ },
235
+ offset: {
236
+ type: "integer",
237
+ minimum: 0
238
+ },
239
+ limit: {
240
+ type: "integer",
241
+ minimum: 1,
242
+ maximum: 100
243
+ }
244
+ }), (input, ctx) => readSourceInspection(input, ctx, "profiles")),
245
+ publicRead(FinanceCapabilityNames.refresh, "Refresh observations for explicitly selected financial books. This may take time. Choose mode and one explicit target: either bookIds or allBooks. historyStart is valid only with mode=full; recent and metadata refreshes omit it.", refreshSchema, (input) => {
246
+ if (input.mode !== "full" && input.historyStart !== void 0) throw new Error("finance_refresh_history_start_full_only");
247
+ return ledger.sync({
248
+ mode: input.mode,
249
+ ...input.target,
250
+ ...input.historyStart ? { historyStart: input.historyStart } : {}
251
+ });
252
+ }),
253
+ publicRead(FinanceCapabilityNames.status, "Read one granted book's refresh status and historical audit coverage. Neither describes progress on the current source bill.", bookSchema, (input, ctx) => {
254
+ requireGrantedBook(service, ctx, input.bookId);
255
+ const status = recordValue(ledger.syncStatus());
256
+ return {
257
+ bookId: input.bookId,
258
+ ledger: ledger.ledgerBookState(input.bookId),
259
+ refresh: Array.isArray(status?.books) ? status.books.find((item) => item.bookId === input.bookId) ?? null : null,
260
+ audit: ledger.auditStatus(input.bookId)
261
+ };
262
+ }),
263
+ publicRead(FinanceCapabilityNames.books, "List known financial books that other Finance tools can use, together with the calling subject's active BookReadGrant and the configured default book.", emptySchema, (_input, ctx) => service.describeBooks(subjectFor(ctx))),
264
+ publicRead(FinanceCapabilityNames.sourceList, "List authorized sourceRefs for this calling context. Continue with offset=nextOffset and expectedVersion=dataVersion; content and file paths are excluded.", objectSchema([], {
265
+ offset: {
266
+ type: "integer",
267
+ minimum: 0
268
+ },
269
+ expectedVersion: idSchema,
270
+ limit: {
271
+ type: "integer",
272
+ minimum: 1,
273
+ maximum: 100
274
+ }
275
+ }), (input, ctx) => {
276
+ if (!options.listSourceRefs) throw new Error("finance_source_list_unavailable");
277
+ const sources = [...options.listSourceRefs(ctx.subjectId)].sort((left, right) => left.id.localeCompare(right.id));
278
+ const version = remoteVersion(sources);
279
+ requirePageVersion(input, version);
280
+ return offsetPage({
281
+ items: sources,
282
+ offset: input.offset,
283
+ limit: input.limit,
284
+ base: { dataVersion: version },
285
+ itemsKey: "sources",
286
+ project: (source) => source
287
+ });
288
+ }),
289
+ publicRead(FinanceCapabilityNames.metadata, "Read an account/category/store/project/member dictionary. text matches names or full category paths; exact matches take priority, ambiguous matches remain separate. Only selectable second-level categories are valid for booking. Continue with the same filters, offset=nextOffset and expectedRevision=dataVersion.", objectSchema(["bookId", "resource"], {
290
+ bookId: idSchema,
291
+ resource: { enum: [
292
+ "accounts",
293
+ "categories",
294
+ "stores",
295
+ "projects",
296
+ "members"
297
+ ] },
298
+ text: boundedTextSchema(200),
299
+ offset: {
300
+ type: "integer",
301
+ minimum: 0
302
+ },
303
+ expectedRevision: {
304
+ type: "integer",
305
+ minimum: 0
306
+ },
307
+ limit: {
308
+ type: "integer",
309
+ minimum: 1,
310
+ maximum: 100
311
+ }
312
+ }), (input, ctx) => {
313
+ const query = input;
314
+ if (typeof query.bookId !== "string" || typeof query.resource !== "string") throw new Error("finance_metadata_resource_required");
315
+ requireGrantedBook(service, ctx, query.bookId);
316
+ const revision = ledger.ledgerBookState(query.bookId).revision;
317
+ requirePageVersion(input, revision);
318
+ const offset = input.offset ?? 0;
319
+ const result = ledger.queryMetadata({
320
+ bookId: query.bookId,
321
+ resource: query.resource,
322
+ ...query.text ? { text: query.text } : {},
323
+ offset,
324
+ limit: input.limit ?? 50
325
+ });
326
+ requirePageVersion({ expectedRevision: revision }, ledger.ledgerBookState(query.bookId).revision);
327
+ return offsetPage({
328
+ items: result.items,
329
+ offset,
330
+ total: result.total,
331
+ limit: input.limit,
332
+ base: {
333
+ bookId: query.bookId,
334
+ resource: query.resource,
335
+ dataVersion: revision,
336
+ ...result.observedAt ? { observedAt: result.observedAt } : {}
337
+ },
338
+ project: (value) => metadataModelView(query.resource, value)
339
+ });
340
+ }),
341
+ publicRead(FinanceCapabilityNames.transactions, "只读查询当前授权账本的历史流水,不包含修改区、暂存区或当前会话草稿。导入或追加前,按本批期间完整读取,并配合 finance_entries_search 和 finance_draft_get 核对已有流水;这里未命中不代表尚未创建。按时间/ID 倒序;日期是账本时区的首尾均含日历日,筛选条件以 AND 组合,categoryId 精确匹配,accountId 为主账户/转出账户。text 只搜已有备注/名称/内容,不能只凭来源商户关键词判定不存在。金额单位为分。按相同条件用 offset=nextOffset、expectedRevision=dataVersion 续读至无 nextOffset,版本变化从头重读;单笔详情用 finance_transactions_get。", objectSchema(["bookId"], {
342
+ bookId: idSchema,
343
+ beginDate: dateSchema,
344
+ endDate: dateSchema,
345
+ limit: {
346
+ type: "integer",
347
+ minimum: 1,
348
+ maximum: 100
349
+ },
350
+ offset: {
351
+ type: "integer",
352
+ minimum: 0
353
+ },
354
+ expectedRevision: {
355
+ type: "integer",
356
+ minimum: 0
357
+ },
358
+ text: boundedTextSchema(200),
359
+ type: { enum: [
360
+ "expense",
361
+ "income",
362
+ "transfer",
363
+ "other"
364
+ ] },
365
+ amountCents: {
366
+ type: "integer",
367
+ minimum: 0
368
+ },
369
+ minAmountCents: {
370
+ type: "integer",
371
+ minimum: 0
372
+ },
373
+ maxAmountCents: {
374
+ type: "integer",
375
+ minimum: 0
376
+ },
377
+ accountId: idSchema,
378
+ categoryId: idSchema,
379
+ destinationAccountId: idSchema,
380
+ projectId: idSchema,
381
+ memberId: idSchema,
382
+ storeId: idSchema
383
+ }), (input, ctx) => {
384
+ requireGrantedBook(service, ctx, input.bookId);
385
+ const revision = ledger.ledgerBookState(input.bookId).revision;
386
+ validateQueryRange(input, ledger.ledgerBookState(input.bookId).timezone);
387
+ if (input.expectedRevision !== void 0 && input.expectedRevision !== revision) throw new Error("finance_transaction_revision_changed");
388
+ if (input.offset && input.expectedRevision === void 0) throw new Error("finance_transaction_page_revision_required");
389
+ const { offset = 0, limit: _limit, expectedRevision: _revision, ...filters } = input;
390
+ const result = ledger.cachedTransactions({
391
+ ...filters,
392
+ offset,
393
+ limit: input.limit ?? 50
394
+ });
395
+ requirePageVersion({ expectedRevision: revision }, ledger.ledgerBookState(input.bookId).revision);
396
+ const transactions = result.transactions ?? [];
397
+ const total = result.pagination?.total ?? result.total;
398
+ if (!Number.isSafeInteger(total) || offset > total) throw new Error("finance_transaction_page_invalid");
399
+ return offsetPage({
400
+ items: transactions,
401
+ offset,
402
+ total,
403
+ limit: input.limit,
404
+ base: {
405
+ bookId: input.bookId,
406
+ dataVersion: revision,
407
+ coverage: result.coverage ?? null
408
+ },
409
+ project: (transaction) => transactionModelView(transaction),
410
+ itemsKey: "transactions"
411
+ });
412
+ }),
413
+ publicRead(FinanceCapabilityNames.transaction, "只读历史流水详情,bookId+remoteId 来自 finance_transactions_query;不是修改区、暂存区或草稿的条目 ID。默认返回本笔财务字段;field=record/memo/content/transactionName 可用 textOffset、textLimit 续读完整内容,直至 complete=true。核对同一笔后复用已有确定信息;有实质差异时保留并报告,不能仅因新文件说明简略就重复提问或创建。", objectSchema(["bookId", "remoteId"], {
414
+ bookId: idSchema,
415
+ remoteId: idSchema,
416
+ field: { enum: [
417
+ "record",
418
+ "memo",
419
+ "content",
420
+ "transactionName"
421
+ ] },
422
+ textOffset: {
423
+ type: "integer",
424
+ minimum: 0
425
+ },
426
+ textLimit: {
427
+ type: "integer",
428
+ minimum: 1,
429
+ maximum: 8e3
430
+ }
431
+ }), (input, ctx) => {
432
+ requireGrantedBook(service, ctx, input.bookId);
433
+ const transaction = ledger.getTransaction(input.bookId, input.remoteId);
434
+ if (!transaction) return null;
435
+ const { rawSource: _rawSource, ...observed } = transaction;
436
+ if (!input.field) return transactionModelView(observed);
437
+ const selected = input.field === "record" ? transactionModelView(observed) : observed[input.field];
438
+ if (selected === void 0) throw new Error("finance_transaction_field_unavailable");
439
+ return textSegment(typeof selected === "string" ? selected : JSON.stringify(selected), input.textOffset ?? 0, {
440
+ bookId: input.bookId,
441
+ remoteId: input.remoteId,
442
+ field: input.field,
443
+ dataVersion: ledger.ledgerBookState(input.bookId).revision
444
+ }, input.textLimit);
445
+ }),
446
+ publicRead(FinanceCapabilityNames.history, "List transaction audit events and changed fields. Continue with beforeEventId=nextBeforeEventId and expectedRevision=dataVersion. Read full event versions using eventId, with textOffset for long records.", objectSchema(["bookId", "remoteId"], {
447
+ bookId: idSchema,
448
+ remoteId: idSchema,
449
+ eventId: {
450
+ type: "integer",
451
+ minimum: 1
452
+ },
453
+ beforeEventId: {
454
+ type: "integer",
455
+ minimum: 1
456
+ },
457
+ expectedRevision: {
458
+ type: "integer",
459
+ minimum: 0
460
+ },
461
+ limit: {
462
+ type: "integer",
463
+ minimum: 1,
464
+ maximum: 100
465
+ },
466
+ textOffset: {
467
+ type: "integer",
468
+ minimum: 0
469
+ },
470
+ textLimit: {
471
+ type: "integer",
472
+ minimum: 1,
473
+ maximum: 8e3
474
+ }
475
+ }), (input, ctx) => {
476
+ const query = input;
477
+ if (typeof query.bookId !== "string" || typeof query.remoteId !== "string") throw new Error("finance_transaction_identity_required");
478
+ requireGrantedBook(service, ctx, query.bookId);
479
+ const revision = ledger.ledgerBookState(query.bookId).revision;
480
+ requirePageVersion({
481
+ ...input,
482
+ offset: input.beforeEventId ?? input.textOffset
483
+ }, revision);
484
+ if (input.eventId !== void 0) {
485
+ const event = ledger.transactionHistory(query.bookId, query.remoteId, {
486
+ beforeEventId: input.eventId + 1,
487
+ limit: 1,
488
+ includeVersions: true
489
+ }).events?.find((item) => item.id === input.eventId);
490
+ if (!event) throw new Error("finance_history_event_not_found");
491
+ const version = (value) => value ? {
492
+ id: value.id,
493
+ snapshot: transactionModelView(value.snapshot ?? {})
494
+ } : null;
495
+ return textSegment(JSON.stringify({
496
+ id: event.id,
497
+ eventType: event.eventType,
498
+ observedAt: event.observedAt,
499
+ recordedAt: event.recordedAt,
500
+ changedFields: event.changedFields,
501
+ beforeVersion: version(event.beforeVersion),
502
+ afterVersion: version(event.afterVersion)
503
+ }), input.textOffset ?? 0, {
504
+ bookId: query.bookId,
505
+ remoteId: query.remoteId,
506
+ eventId: input.eventId,
507
+ dataVersion: revision
508
+ }, input.textLimit);
509
+ }
510
+ const limit = input.limit ?? 50;
511
+ const result = ledger.transactionHistory(query.bookId, query.remoteId, {
512
+ limit,
513
+ ...input.beforeEventId ? { beforeEventId: input.beforeEventId } : {}
514
+ });
515
+ const events = Array.isArray(result.events) ? result.events : [];
516
+ const page = offsetPage({
517
+ items: events,
518
+ limit,
519
+ base: {
520
+ bookId: query.bookId,
521
+ remoteId: query.remoteId,
522
+ dataVersion: revision
523
+ },
524
+ itemsKey: "events",
525
+ project: (event) => ({
526
+ id: event.id,
527
+ eventType: event.eventType,
528
+ observedAt: event.observedAt,
529
+ recordedAt: event.recordedAt,
530
+ changedFields: event.changedFields,
531
+ beforeVersionId: event.beforeVersionId,
532
+ afterVersionId: event.afterVersionId
533
+ })
534
+ });
535
+ const { nextOffset, offset: _offset, total: _total, ...body } = page;
536
+ const count = page.events.length;
537
+ if (result.pagination?.hasMore && !count) throw new Error("finance_page_missing_items");
538
+ return {
539
+ ...body,
540
+ ...nextOffset !== void 0 || result.pagination?.hasMore ? { nextBeforeEventId: events[count - 1].id } : {}
541
+ };
542
+ }),
543
+ publicRead(FinanceCapabilityNames.checkpoints, "只读核对相关账户的余额确认点。导入或更正开始时查询 view=latest;完整读回草稿后再次查询 includeDraftImpact=true,获取当前会话 open 草稿对最近检查点的预计影响。按相同确认时点比较原确认余额与现有流水回算余额,不能用今天余额直接比较过去余额。view=history 必须指定一个 accountIds,倒序读取该账户完整历史。金额单位为分;incomplete/no_checkpoint 不能声称一致,草稿预计值不表示已经入账。不提供确认、撤销或偏差授权能力。按 nextOffset+expectedVersion=dataVersion 续读,版本变化从头重读。", objectSchema(["bookId"], {
544
+ bookId: idSchema,
545
+ accountIds: {
546
+ type: "array",
547
+ minItems: 1,
548
+ maxItems: 100,
549
+ items: idSchema
550
+ },
551
+ view: { enum: ["latest", "history"] },
552
+ includeDraftImpact: { type: "boolean" },
553
+ offset: {
554
+ type: "integer",
555
+ minimum: 0
556
+ },
557
+ limit: {
558
+ type: "integer",
559
+ minimum: 1,
560
+ maximum: 100
561
+ },
562
+ expectedVersion: idSchema
563
+ }), (input, ctx) => service.queryCheckpoints({
564
+ ...input,
565
+ subjectId: ctx.subjectId
566
+ })),
567
+ publicRead(FinanceCapabilityNames.accountSnapshot, "Calculate a book account snapshot. Continue accounts with the same filters, offset=nextOffset and expectedRevision=dataVersion. Totals retain book scope. view=detail reads the complete result in Unicode-safe segments.", objectSchema(["bookId"], {
568
+ bookId: idSchema,
569
+ asOf: dateSchema,
570
+ accountIds: {
571
+ type: "array",
572
+ maxItems: 100,
573
+ items: idSchema
574
+ },
575
+ view: { enum: ["summary", "detail"] },
576
+ offset: {
577
+ type: "integer",
578
+ minimum: 0
579
+ },
580
+ limit: {
581
+ type: "integer",
582
+ minimum: 1,
583
+ maximum: 100
584
+ },
585
+ expectedRevision: {
586
+ type: "integer",
587
+ minimum: 0
588
+ },
589
+ textOffset: {
590
+ type: "integer",
591
+ minimum: 0
592
+ },
593
+ textLimit: {
594
+ type: "integer",
595
+ minimum: 1,
596
+ maximum: 8e3
597
+ }
598
+ }), (input, ctx) => {
599
+ const query = input;
600
+ if (typeof query.bookId !== "string") throw new Error("finance_book_id_required");
601
+ requireGrantedBook(service, ctx, query.bookId);
602
+ const revision = ledger.ledgerBookState(query.bookId).revision;
603
+ requirePageVersion({
604
+ ...input,
605
+ offset: input.view === "detail" ? input.textOffset : input.offset
606
+ }, revision);
607
+ const result = ledger.accountSnapshot(query.bookId, query.asOf);
608
+ if (query.view === "detail") return textSegment(JSON.stringify(result), query.textOffset ?? 0, {
609
+ bookId: query.bookId,
610
+ asOf: result.asOf ?? query.asOf,
611
+ dataVersion: revision
612
+ }, query.textLimit);
613
+ const data = recordValue(result?.data) ?? recordValue(result) ?? {};
614
+ const accounts = snapshotAccounts(result).filter((account) => !Array.isArray(query.accountIds) || query.accountIds.includes(account.accountId ?? account.id)).sort((left, right) => String(left.accountId ?? left.id).localeCompare(String(right.accountId ?? right.id)));
615
+ const { accounts: _accounts, rates: _rates, ...totals } = data;
616
+ const summary = Object.fromEntries(Object.entries(totals).slice(0, 30).map(([key, value]) => [key, Array.isArray(value) ? { count: value.length } : value && typeof value === "object" ? { fields: Object.keys(value).slice(0, 12) } : typeof value === "string" && Array.from(value).length > 240 ? briefText(value, 240) : value]));
617
+ return offsetPage({
618
+ items: accounts,
619
+ offset: input.offset,
620
+ limit: input.limit,
621
+ base: {
622
+ bookId: query.bookId,
623
+ asOf: result.asOf ?? query.asOf,
624
+ dataVersion: revision,
625
+ observedAt: result.observedAt ?? null,
626
+ coverage: result.coverage ?? null,
627
+ total: accounts.length,
628
+ totalsScope: "book",
629
+ summary,
630
+ rateCount: Array.isArray(data.rates) ? data.rates.length : null
631
+ },
632
+ itemsKey: "accounts",
633
+ project: (account) => {
634
+ const fields = Object.entries(recordValue(account) ?? {});
635
+ return {
636
+ ...Object.fromEntries(fields.slice(0, 30).map(([key, value]) => [key, bodyBytes(value) > 1e3 ? {
637
+ summary: typeof value === "string" ? briefText(value, 240) : Array.isArray(value) ? { count: value.length } : { fields: Object.keys(recordValue(value) ?? {}).slice(0, 12) },
638
+ complete: false
639
+ } : value])),
640
+ ...fields.length > 30 ? { omittedFieldCount: fields.length - 30 } : {}
641
+ };
642
+ }
643
+ });
644
+ }),
645
+ publicRead(FinanceCapabilityNames.summary, "Return authoritative observed transactionCount, incomeCents and expenseCents for an optional inclusive YYYY-MM-DD range. With accountId, outgoing transfers count as that account's expense and incoming transfers as income using the destination amount; accountScope defaults to family (includes descendants), exact selects only that account. Without accountId, book income/expense excludes internal transfers. Other rows are excluded from income/expense. Do not recompute totals from finance_transactions_query.", objectSchema(["bookId"], {
646
+ bookId: idSchema,
647
+ beginDate: dateSchema,
648
+ endDate: dateSchema,
649
+ accountId: idSchema,
650
+ accountScope: {
651
+ type: "string",
652
+ enum: ["exact", "family"]
653
+ }
654
+ }), (input, ctx) => {
655
+ requireGrantedBook(service, ctx, input.bookId);
656
+ validateQueryRange(input, ledger.ledgerBookState(input.bookId).timezone);
657
+ if (input.accountScope && !input.accountId) throw new Error("finance_summary_account_required");
658
+ return ledger.summary(input.bookId, input.beginDate, input.endDate, input.accountId, input.accountScope);
659
+ }),
660
+ publicRead(FinanceCapabilityNames.report, "Read one report shape selected by kind. trend/cash/project/store require beginDate+endDate; member also requires beginDate+endDate; asset needs no extra field; assetTrend accepts years; budget requires year; compare requires beginDate+endDate+accountId and accepts page; detail requires accountId+date. Do not mix fields from another kind. The summary preserves bounded business values; view=detail reads Unicode-safe full evidence segments and expectedVersion detects a changed remote result.", reportSchema, async (input, ctx) => {
661
+ requireGrantedBook(service, ctx, input.bookId);
662
+ const request = input.query;
663
+ const value = await ledger.report(input.bookId, request);
664
+ const version = remoteVersion(value);
665
+ if (input.expectedVersion && input.expectedVersion !== version) throw new Error("finance_remote_version_changed");
666
+ if (input.view === "detail") return textSegment(JSON.stringify(value), input.textOffset ?? 0, {
667
+ bookId: input.bookId,
668
+ resource: "report",
669
+ kind: input.query.kind,
670
+ dataVersion: version
671
+ }, input.textLimit);
672
+ return remoteModelView("report", input.bookId, value, (/* @__PURE__ */ new Date()).toISOString());
673
+ }),
674
+ publicRead(FinanceCapabilityNames.recurring, "Read one recurring-business shape. kind=month requires year+month; kind=bills accepts page. Do not mix the two shapes. The summary preserves bounded business values; view=detail reads full source segments with version verification.", recurringSchema, async (input, ctx) => {
675
+ requireGrantedBook(service, ctx, input.bookId);
676
+ const request = input.query;
677
+ const value = await ledger.recurring(input.bookId, request);
678
+ const version = remoteVersion(value);
679
+ if (input.expectedVersion && input.expectedVersion !== version) throw new Error("finance_remote_version_changed");
680
+ if (input.view === "detail") return textSegment(JSON.stringify(value), input.textOffset ?? 0, {
681
+ bookId: input.bookId,
682
+ resource: "recurring",
683
+ kind: input.query.kind,
684
+ dataVersion: version
685
+ }, input.textLimit);
686
+ return remoteModelView("recurring", input.bookId, value, (/* @__PURE__ */ new Date()).toISOString());
687
+ }),
688
+ publicRead(FinanceCapabilityNames.debts, "Read debt totals and count. view=detail reads full source segments with version verification.", objectSchema(["bookId"], {
689
+ bookId: idSchema,
690
+ ...remoteReadFields
691
+ }), async (input, ctx) => {
692
+ requireGrantedBook(service, ctx, input.bookId);
693
+ const value = await ledger.debts(input.bookId);
694
+ const version = remoteVersion(value);
695
+ if (input.expectedVersion && input.expectedVersion !== version) throw new Error("finance_remote_version_changed");
696
+ if (input.view === "detail") return textSegment(JSON.stringify(value), input.textOffset ?? 0, {
697
+ bookId: input.bookId,
698
+ resource: "debts",
699
+ dataVersion: version
700
+ }, input.textLimit);
701
+ return remoteModelView("debts", input.bookId, value, (/* @__PURE__ */ new Date()).toISOString());
702
+ }),
703
+ publicRead(FinanceCapabilityNames.entriesSearch, "只读查询当前授权账本的待入账工作集,包含其他会话已创建的记录;changed=修改区,staged=暂存区,省略 states 默认查询两区。不包含历史流水或任何会话草稿,分别用 finance_transactions_query、finance_draft_get。每次新账单、更新或重导都在本轮重读本批期间,不能用旧轮次结果代替;在提问或创建前确认已有信息并复用,不重复创建或提问。返回修改后的有效财务字段,不只是变更补丁;金额单位为分,memo 可能是摘要,complete=false 时用 finance_entries_get(field=\"facts\") 续读完整事实。只要返回 nextOffset 就尚未读完,须保持同一筛选条件,用 offset=nextOffset、expectedVersion=dataVersion 续读至无 nextOffset 后再提问或追加;不能用候选金额、商户等窄查询替代未读完的相关清单。版本变化从头重读。", objectSchema(["bookId"], {
704
+ bookId: idSchema,
705
+ states: {
706
+ type: "array",
707
+ items: { enum: ["changed", "staged"] }
708
+ },
709
+ accountId: idSchema,
710
+ beginDate: dateSchema,
711
+ endDate: dateSchema,
712
+ amountCents: {
713
+ type: "integer",
714
+ minimum: 1
715
+ },
716
+ text: boundedTextSchema(2e3),
717
+ offset: {
718
+ type: "integer",
719
+ minimum: 0
720
+ },
721
+ expectedVersion: idSchema,
722
+ limit: {
723
+ type: "integer",
724
+ minimum: 1,
725
+ maximum: 100
726
+ }
727
+ }), (input, ctx) => {
728
+ const subject = { subjectId: ctx.subjectId };
729
+ const read = () => {
730
+ validateQueryRange(input, ledger.ledgerBookState(input.bookId).timezone);
731
+ const { offset = 0, expectedVersion: _version, limit: _limit, ...filters } = input;
732
+ const result = service.searchEntriesForSubject(subject, {
733
+ ...filters,
734
+ offset,
735
+ limit: input.limit ?? 50
736
+ });
737
+ requirePageVersion(input, result.dataVersion);
738
+ return offsetPage({
739
+ items: result.entries,
740
+ offset,
741
+ total: result.total,
742
+ limit: input.limit,
743
+ base: {
744
+ bookId: input.bookId,
745
+ dataVersion: result.dataVersion,
746
+ workset: result.workset
747
+ },
748
+ itemsKey: "entries",
749
+ project: entryModelView
750
+ });
751
+ };
752
+ return read();
753
+ }),
754
+ publicRead(FinanceCapabilityNames.entryGet, "只读修改区或暂存区流水详情,entryId 来自 finance_entries_search;历史流水 remoteId 应用 finance_transactions_get,当前会话草稿用 finance_draft_get。默认返回有效字段及备注摘要;field=facts 读取历史基准合并修改后的完整事实,proposal 读取变更提案,result 读取处理结果。长内容用 textOffset、textLimit 续读至 complete=true。提问前先从这里查明同笔已确定的用途、账户和分类,不因列表备注被截短而重新询问。", objectSchema(["bookId", "entryId"], {
755
+ bookId: idSchema,
756
+ entryId: idSchema,
757
+ field: { enum: [
758
+ "facts",
759
+ "proposal",
760
+ "result"
761
+ ] },
762
+ textOffset: {
763
+ type: "integer",
764
+ minimum: 0
765
+ },
766
+ textLimit: {
767
+ type: "integer",
768
+ minimum: 1,
769
+ maximum: 8e3
770
+ }
771
+ }), (input, ctx) => {
772
+ const entry = service.entryWithFacts(service.getEntryForSubject({ subjectId: ctx.subjectId }, input.bookId, input.entryId));
773
+ if (!input.field) return entryModelView(entry);
774
+ const selected = entry[input.field];
775
+ if (selected === void 0) throw new Error("finance_entry_field_unavailable");
776
+ return textSegment(JSON.stringify(selected), input.textOffset ?? 0, {
777
+ bookId: input.bookId,
778
+ entryId: input.entryId,
779
+ version: entry.version,
780
+ field: input.field
781
+ }, input.textLimit);
782
+ })
783
+ ];
784
+ const draftTool = (name, description, schema, execute) => publicRead(name, description, schema, async (input, ctx) => {
785
+ try {
786
+ return await execute(input, ctx);
787
+ } catch (error) {
788
+ if (!(error instanceof FinanceDraftFieldError)) throw error;
789
+ throw new FinancePublicError(JSON.stringify({
790
+ code: "finance_draft_invalid",
791
+ applied: false,
792
+ issues: error.issues
793
+ }));
794
+ }
795
+ });
796
+ definitions = [
797
+ ...definitions,
798
+ publicRead(FinanceCapabilityNames.draftGet, "读取当前会话唯一 open 草稿,返回有效 fields、操作、必填缺项和校验错误;不读取其他会话草稿或 booked 存档。draft=null 仅表示当前草稿为空,不代表历史账本、修改区或暂存区没有已创建流水;配合 finance_transactions_query、finance_entries_search 核对。部分加入待入账后剩余 entryId 保留;已移走条目用 finance_entries_search、finance_entries_get 读取,不重新追加。提问或追加前完整读取,复用同笔已确定信息。宿主提问返回后,即使提问前刚读过,也必须从 offset=0 完整重读最新草稿,读完再按本次读取的 entryId 用 finance_draft_update 补充;等待回答期间用户可能已编辑或移走条目。分页用 offset=nextOffset、expectedVersion=dataVersion,直至无 nextOffset;版本变化从头重读。金额单位为分,写入后须完整读回并对照本次新增来源核验;读取成功不等于已核验。", objectSchema([], {
799
+ offset: {
800
+ type: "integer",
801
+ minimum: 0
802
+ },
803
+ expectedVersion: idSchema,
804
+ limit: {
805
+ type: "integer",
806
+ minimum: 1,
807
+ maximum: 100
808
+ }
809
+ }), (input, ctx) => {
810
+ const row = service.getDraftForSubject(subjectFor(ctx))?.row ?? null;
811
+ const dataVersion = remoteVersion(row ? {
812
+ id: row.id,
813
+ entries: row.entries
814
+ } : null);
815
+ requirePageVersion(input, dataVersion);
816
+ return offsetPage({
817
+ items: row?.entries ?? [],
818
+ offset: input.offset ?? 0,
819
+ limit: input.limit,
820
+ base: {
821
+ draft: row ? {
822
+ ...draftNoteReceipt(row),
823
+ bookId: row.bookId
824
+ } : null,
825
+ dataVersion
826
+ },
827
+ itemsKey: "entries",
828
+ project: draftEntryReceipt
829
+ });
830
+ }),
831
+ draftTool(FinanceCapabilityNames.draftAdd, "仅向当前会话 open 草稿追加条目,不写历史账本、修改区或暂存区。每次新账单、更新或重导,都须在本轮完整读取本批期间的 finance_transactions_query、finance_entries_search 和当前 finance_draft_get,逐笔核对,不能用旧轮次结果代替。相关清单仍有 nextOffset 时先保持同一筛选条件和版本续读完,不能用候选金额的窄查询代替未读完的清单后直接追加。默认只追加尚未创建的流水,已有记录不再创建 create 或 matched 条目。已有草稿需补充时用 finance_draft_update;实质冲突保留并报告,身份不确定先集中确认。只有用户明确要求更正历史目标时才填 remoteId+差异;matched 仅用于明确要求的对账展示。部分加入待入账后追加到剩余 open,全部加入后新开一批;没有 open 时给 bookId,已有时省略。仅填已知事实,四域核对后仍未知的必填字段留空并询问。", objectSchema(["entries"], {
832
+ bookId: idSchema,
833
+ entries: {
834
+ type: "array",
835
+ minItems: 1,
836
+ maxItems: 100,
837
+ items: financialDraftSchema,
838
+ description: "条目对象数组,不是序列化文本;bookId 放在根参数。"
839
+ }
840
+ }), (input, ctx) => {
841
+ const view = service.addDraftEntries({
842
+ ...subjectFor(ctx),
843
+ callId: ctx.callId
844
+ }, input);
845
+ return {
846
+ ...draftNoteReceipt(view.row),
847
+ entryIds: view.row.entries.slice(-input.entries.length).map((entry) => entry.id)
848
+ };
849
+ }),
850
+ draftTool(FinanceCapabilityNames.draftUpdate, "按最新 finance_draft_get 的 entryId 修改当前会话草稿,不能修改历史账本、修改区、暂存区或其他会话草稿。set 只改本次指定字段(null 显式清空,省略保留),与用户共用 fields,无字段锁,不凭商户名或猜测推翻同笔已确定值。改历史目标用 operation/remoteId;修改 matched 财务字段默认转为 update 并保留目标。缺信息先核对四域已有记录,再询问真正未知的事实。收到 用户澄清工具 回答后必须先从 offset=0 完整 finance_draft_get 并续完所有页,再用本次读取的 entryId 仅补指定字段;即使提问前刚读过也不得跳过,不能先调用本工具再读回。回答不是快照,用户可能已编辑或移走条目,不能直接沿用历史 entryId;已移走条目改用 finance_entries_search、finance_entries_get 查看,不重新追加。", objectSchema(["entryId"], {
851
+ entryId: idSchema,
852
+ operation: financialDraftOperationSchema,
853
+ remoteId: idSchema,
854
+ set: {
855
+ ...financialDraftFieldsSchema,
856
+ minProperties: 1
857
+ }
858
+ }), (input, ctx) => {
859
+ const { entryId, ...rest } = input;
860
+ const view = service.updateDraftEntry({
861
+ ...subjectFor(ctx),
862
+ callId: ctx.callId
863
+ }, {
864
+ entryId,
865
+ ...rest
866
+ });
867
+ return {
868
+ ...draftNoteReceipt(view.row),
869
+ entry: draftEntryReceipt(view.row.entries.find((entry) => entry.id === entryId))
870
+ };
871
+ }),
872
+ draftTool(FinanceCapabilityNames.draftRemove, "按最新 finance_draft_get 的 entryId 删除当前会话 open 草稿中的指定条目;不删除历史流水、修改区、暂存区或其他会话草稿。只删除用户排除或已核对确属重复的条目,保留不属于本批的原有草稿。", objectSchema(["entryId"], { entryId: idSchema }), (input, ctx) => draftNoteReceipt(service.removeDraftEntry({
873
+ ...subjectFor(ctx),
874
+ callId: ctx.callId
875
+ }, input).row))
876
+ ];
877
+ return [...definitions, ...createServiceRecordTools(service)];
878
+ }
879
+ function draftNoteReceipt(row) {
880
+ const counts = {
881
+ create: 0,
882
+ update: 0,
883
+ delete: 0,
884
+ needs_supplement: 0,
885
+ matched: 0
886
+ };
887
+ for (const entry of row.entries) counts[draftEntryBucket(entry)]++;
888
+ return {
889
+ draftId: row.id,
890
+ status: row.status,
891
+ entryCount: row.entries.length,
892
+ counts
893
+ };
894
+ }
895
+ function draftEntryReceipt(entry) {
896
+ if (!entry) return void 0;
897
+ return {
898
+ id: entry.id,
899
+ ...entry.draft,
900
+ fields: draftFields(entry),
901
+ ...entry.requiredFields.length ? { missing: entry.requiredFields } : {},
902
+ ...entry.validationIssues?.length ? { issues: entry.validationIssues } : {}
903
+ };
904
+ }
905
+ function recordValue(value) {
906
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
907
+ }
908
+ function briefText(value, maxCharacters) {
909
+ if (value === void 0) return void 0;
910
+ const characters = Array.from(value);
911
+ if (characters.length <= maxCharacters) return value;
912
+ return {
913
+ text: characters.slice(0, maxCharacters).join(""),
914
+ complete: false,
915
+ totalCharacters: characters.length
916
+ };
917
+ }
918
+ /** A completed write must remain a receipt even when its optional review data
919
+ * exceeds the model budget. Authoritative state is read back by resource ID. */
920
+ function oversizedMutationReceipt(name, output) {
921
+ const result = recordValue(output);
922
+ if (!result) return void 0;
923
+ if ([
924
+ FinanceCapabilityNames.draftAdd,
925
+ FinanceCapabilityNames.draftUpdate,
926
+ FinanceCapabilityNames.draftRemove
927
+ ].includes(name) && typeof result.draftId === "string") return {
928
+ draftId: result.draftId,
929
+ status: result.status,
930
+ entryCount: result.entryCount,
931
+ counts: result.counts
932
+ };
933
+ if (name === FinanceCapabilityNames.refresh) return { state: "completed" };
934
+ }
935
+ function subjectFor(ctx) {
936
+ return { subjectId: ctx.subjectId };
937
+ }
938
+ function requireGrantedBook(service, ctx, bookId) {
939
+ const subject = subjectFor(ctx);
940
+ service.requireGrantedBook(subject.subjectId, bookId);
941
+ }
942
+ const textSchema = {
943
+ type: "string",
944
+ minLength: 1,
945
+ maxLength: 2e3
946
+ };
947
+ const idSchema = {
948
+ type: "string",
949
+ minLength: 1,
950
+ maxLength: 128
951
+ };
952
+ const dateSchema = {
953
+ type: "string",
954
+ pattern: "^\\d{4}-\\d{2}-\\d{2}$"
955
+ };
956
+ const dateTimeSchema = {
957
+ type: "string",
958
+ minLength: 1,
959
+ maxLength: 64
960
+ };
961
+ const emptySchema = {
962
+ type: "object",
963
+ additionalProperties: false
964
+ };
965
+ function objectSchema(required, properties) {
966
+ return {
967
+ type: "object",
968
+ ...required.length ? { required } : {},
969
+ properties,
970
+ additionalProperties: false
971
+ };
972
+ }
973
+ function validateQueryRange(input, timezone) {
974
+ const issues = [];
975
+ try {
976
+ financialDateRange(input.beginDate, input.endDate, timezone);
977
+ } catch (error) {
978
+ issues.push({
979
+ field: "beginDate/endDate",
980
+ message: error.message
981
+ });
982
+ }
983
+ if (input.minAmountCents !== void 0 && input.maxAmountCents !== void 0 && input.minAmountCents > input.maxAmountCents) issues.push({
984
+ field: "minAmountCents/maxAmountCents",
985
+ message: "Minimum cannot exceed maximum"
986
+ });
987
+ if (input.amountCents !== void 0 && (input.amountCents < (input.minAmountCents ?? 0) || input.amountCents > (input.maxAmountCents ?? Number.MAX_SAFE_INTEGER))) issues.push({
988
+ field: "amountCents",
989
+ message: "Exact amount must lie within the requested range"
990
+ });
991
+ if (issues.length) throw new FinancePublicError(JSON.stringify({
992
+ code: "finance_query_invalid",
993
+ issues
994
+ }));
995
+ }
996
+ const refreshSchema = {
997
+ ...objectSchema(["mode", "target"], {
998
+ mode: { enum: [
999
+ "full",
1000
+ "recent",
1001
+ "metadata"
1002
+ ] },
1003
+ target: {
1004
+ type: "object",
1005
+ oneOf: [objectSchema(["bookIds"], { bookIds: {
1006
+ type: "array",
1007
+ minItems: 1,
1008
+ maxItems: 100,
1009
+ items: idSchema
1010
+ } }), objectSchema(["allBooks"], { allBooks: { const: true } })]
1011
+ },
1012
+ historyStart: dateSchema
1013
+ }),
1014
+ anyOf: [{ properties: { mode: { const: "full" } } }, { properties: { historyStart: false } }]
1015
+ };
1016
+ const reportFilterProperties = {
1017
+ categoryIds: idArraySchema(),
1018
+ accountIds: idArraySchema(),
1019
+ storeIds: idArraySchema(),
1020
+ projectIds: idArraySchema(),
1021
+ note: boundedTextSchema(2e3)
1022
+ };
1023
+ const remoteReadFields = {
1024
+ view: { enum: ["summary", "detail"] },
1025
+ expectedVersion: boundedTextSchema(100),
1026
+ textOffset: {
1027
+ type: "integer",
1028
+ minimum: 0
1029
+ },
1030
+ textLimit: {
1031
+ type: "integer",
1032
+ minimum: 1,
1033
+ maximum: 8e3
1034
+ }
1035
+ };
1036
+ const reportSchema = objectSchema(["bookId", "query"], {
1037
+ bookId: idSchema,
1038
+ query: {
1039
+ type: "object",
1040
+ oneOf: [
1041
+ ...[
1042
+ "trend",
1043
+ "cash",
1044
+ "project",
1045
+ "store"
1046
+ ].map((kind) => objectSchema([
1047
+ "kind",
1048
+ "beginDate",
1049
+ "endDate"
1050
+ ], {
1051
+ kind: { const: kind },
1052
+ beginDate: dateSchema,
1053
+ endDate: dateSchema,
1054
+ ...reportFilterProperties
1055
+ })),
1056
+ objectSchema([
1057
+ "kind",
1058
+ "beginDate",
1059
+ "endDate"
1060
+ ], {
1061
+ kind: { const: "member" },
1062
+ beginDate: dateSchema,
1063
+ endDate: dateSchema
1064
+ }),
1065
+ objectSchema(["kind"], { kind: { const: "asset" } }),
1066
+ objectSchema(["kind"], {
1067
+ kind: { const: "assetTrend" },
1068
+ years: {
1069
+ type: "integer",
1070
+ minimum: 1,
1071
+ maximum: 100
1072
+ }
1073
+ }),
1074
+ objectSchema(["kind", "year"], {
1075
+ kind: { const: "budget" },
1076
+ year: {
1077
+ type: "integer",
1078
+ minimum: 1900,
1079
+ maximum: 2200
1080
+ }
1081
+ }),
1082
+ objectSchema([
1083
+ "kind",
1084
+ "beginDate",
1085
+ "endDate",
1086
+ "accountId"
1087
+ ], {
1088
+ kind: { const: "compare" },
1089
+ beginDate: dateSchema,
1090
+ endDate: dateSchema,
1091
+ accountId: idSchema,
1092
+ page: {
1093
+ type: "integer",
1094
+ minimum: 1
1095
+ }
1096
+ }),
1097
+ objectSchema([
1098
+ "kind",
1099
+ "accountId",
1100
+ "date"
1101
+ ], {
1102
+ kind: { const: "detail" },
1103
+ accountId: idSchema,
1104
+ date: dateSchema
1105
+ })
1106
+ ]
1107
+ },
1108
+ ...remoteReadFields
1109
+ });
1110
+ const recurringSchema = objectSchema(["bookId", "query"], {
1111
+ bookId: idSchema,
1112
+ query: {
1113
+ type: "object",
1114
+ oneOf: [objectSchema([
1115
+ "kind",
1116
+ "year",
1117
+ "month"
1118
+ ], {
1119
+ kind: { const: "month" },
1120
+ year: {
1121
+ type: "integer",
1122
+ minimum: 1900,
1123
+ maximum: 2200
1124
+ },
1125
+ month: {
1126
+ type: "integer",
1127
+ minimum: 1,
1128
+ maximum: 12
1129
+ }
1130
+ }), objectSchema(["kind"], {
1131
+ kind: { const: "bills" },
1132
+ page: {
1133
+ type: "integer",
1134
+ minimum: 1
1135
+ }
1136
+ })]
1137
+ },
1138
+ ...remoteReadFields
1139
+ });
1140
+ const sourceReferenceSchema = {
1141
+ type: "object",
1142
+ oneOf: [
1143
+ objectSchema(["type", "runId"], {
1144
+ type: { const: "conversation" },
1145
+ runId: idSchema
1146
+ }),
1147
+ objectSchema([
1148
+ "type",
1149
+ "runId",
1150
+ "attachmentId"
1151
+ ], {
1152
+ type: { const: "conversation-attachment" },
1153
+ runId: idSchema,
1154
+ attachmentId: idSchema
1155
+ }),
1156
+ objectSchema(["type", "messageId"], {
1157
+ type: { const: "message" },
1158
+ messageId: idSchema
1159
+ }),
1160
+ objectSchema([
1161
+ "type",
1162
+ "messageId",
1163
+ "attachmentId"
1164
+ ], {
1165
+ type: { const: "message-attachment" },
1166
+ messageId: idSchema,
1167
+ attachmentId: idSchema
1168
+ })
1169
+ ]
1170
+ };
1171
+ const sourceRefSchema = {
1172
+ type: "string",
1173
+ minLength: 32,
1174
+ maxLength: 4096,
1175
+ pattern: "^finance-source\\.1\\."
1176
+ };
1177
+ const draftRevisionSetSchema = objectSchema([], {
1178
+ occurredAt: dateTimeSchema,
1179
+ type: { enum: [
1180
+ "expense",
1181
+ "income",
1182
+ "transfer"
1183
+ ] },
1184
+ amountCents: {
1185
+ type: "integer",
1186
+ minimum: 1
1187
+ },
1188
+ currency: boundedTextSchema(16),
1189
+ accountId: idSchema,
1190
+ destinationAccountId: idSchema,
1191
+ categoryId: idSchema,
1192
+ projectId: idSchema,
1193
+ memberId: idSchema,
1194
+ storeId: idSchema,
1195
+ memo: {
1196
+ type: "string",
1197
+ maxLength: 2e3
1198
+ }
1199
+ });
1200
+ const financialDraftOperationSchema = {
1201
+ enum: [
1202
+ "create",
1203
+ "update",
1204
+ "delete",
1205
+ "matched"
1206
+ ],
1207
+ description: "create 新建;update 修正或补充历史目标(含秒级时间、备注);delete 删除;matched 所有字段已完整正确,完全无需修改,不只是找到历史匹配。用途或到账账户未知用 create/update 保留已知事实,缺信息通过 用户澄清工具 询问。不要的条目直接不记或事后 draft.remove。"
1208
+ };
1209
+ const financialDraftFieldsSchema = objectSchema([], Object.fromEntries(Object.entries({
1210
+ ...draftRevisionSetSchema.properties,
1211
+ occurredAt: {
1212
+ ...dateTimeSchema,
1213
+ description: "本笔事件的原始精确时间,ISO 8601 带明确时区(Z 或偏移量),精确到秒,不接受非零小数秒;不要借用关联付款/退款或商品内的服务时间。"
1214
+ },
1215
+ accountId: {
1216
+ ...idSchema,
1217
+ description: "实际资金账户;转账为转出账户。本笔退款行的来源「收/付款方式」列即本笔到账证据,直接作为到账账户;该列缺失或为空时留空并通过 用户澄清工具 问实际到账账户;其他订单或历史先例不证明本笔到账账户。"
1218
+ },
1219
+ categoryId: {
1220
+ ...idSchema,
1221
+ description: "确定用途的二级叶子 ID;未知省略,修改未知旧值用 null。"
1222
+ },
1223
+ memo: {
1224
+ type: "string",
1225
+ maxLength: 2e3,
1226
+ description: "合并来源与历史的独有信息,同一服务/规格/周期/行程只写一次。名称及括号内子商户/分店/档口直接摘取原文,含糊商品名须保留服务提供方,用餐类消费按上下文个人偏好中的餐次补全规则处理;去账号、订单号、平台状态和检查过程,不改字、不补未经核实的含义,不把支持/待履约改为已发生。"
1227
+ },
1228
+ amountCents: {
1229
+ type: "integer",
1230
+ minimum: 0,
1231
+ maximum: Number.MAX_SAFE_INTEGER,
1232
+ description: "金额单位为分(整数),不是元;人民币 3.00 元 → 300,0.03 元 → 3。来源为元时用十进制运算统一换算,不按金额大小自动纠正。"
1233
+ },
1234
+ secondaryAmountCents: {
1235
+ type: "integer",
1236
+ minimum: 1,
1237
+ maximum: Number.MAX_SAFE_INTEGER,
1238
+ description: "转账另一端金额,单位同样为分(整数),不是元;人民币 3.00 元 → 300,0.03 元 → 3。对应 secondaryCurrency,用十进制运算换算。"
1239
+ },
1240
+ currency: {
1241
+ type: "string",
1242
+ pattern: "^[A-Z]{3}$"
1243
+ },
1244
+ secondaryCurrency: {
1245
+ type: "string",
1246
+ pattern: "^[A-Z]{3}$"
1247
+ }
1248
+ }).map(([field, schema]) => {
1249
+ const { description, ...valueSchema } = schema;
1250
+ return [field, {
1251
+ ...description ? { description } : {},
1252
+ anyOf: [valueSchema, { type: "null" }]
1253
+ }];
1254
+ })));
1255
+ const positiveDraftAmountConstraint = { properties: { amountCents: { minimum: 1 } } };
1256
+ const financialDraftSchema = {
1257
+ ...objectSchema(["operation"], {
1258
+ operation: financialDraftOperationSchema,
1259
+ remoteId: idSchema,
1260
+ fields: {
1261
+ ...financialDraftFieldsSchema,
1262
+ description: "交易事实只填一次。新建保留已知时间、金额、币种和简短商品;历史目标用 remoteId 继承,update 只填差异。"
1263
+ }
1264
+ }),
1265
+ oneOf: [
1266
+ { properties: {
1267
+ operation: { const: "create" },
1268
+ remoteId: false,
1269
+ fields: positiveDraftAmountConstraint
1270
+ } },
1271
+ {
1272
+ required: ["remoteId", "fields"],
1273
+ properties: {
1274
+ operation: { const: "update" },
1275
+ fields: {
1276
+ ...positiveDraftAmountConstraint,
1277
+ minProperties: 1
1278
+ }
1279
+ }
1280
+ },
1281
+ {
1282
+ required: ["remoteId"],
1283
+ properties: {
1284
+ operation: { enum: ["delete", "matched"] },
1285
+ fields: positiveDraftAmountConstraint
1286
+ }
1287
+ }
1288
+ ]
1289
+ };
1290
+ function boundedTextSchema(maxLength) {
1291
+ return {
1292
+ type: "string",
1293
+ minLength: 1,
1294
+ maxLength
1295
+ };
1296
+ }
1297
+ function idArraySchema() {
1298
+ return {
1299
+ type: "array",
1300
+ minItems: 1,
1301
+ maxItems: 100,
1302
+ items: idSchema
1303
+ };
1304
+ }
1305
+ //#endregion
1306
+ export { FINANCE_TOOL_GUIDANCE, FinanceCapabilityNames, createFinanceTools };