@sean.holung/minicode 0.3.9 → 0.3.10

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 (746) hide show
  1. package/README.md +9 -0
  2. package/dist/scripts/run-ts-bench-smoke.js +268 -0
  3. package/dist/scripts/ts-bench-adapter.js +251 -0
  4. package/dist/src/agent/config.js +2 -2
  5. package/dist/src/auto-allow.js +28 -0
  6. package/dist/src/benchmark/config.js +197 -0
  7. package/dist/src/benchmark/index.js +2 -0
  8. package/dist/src/benchmark/workspace-changes.js +125 -0
  9. package/dist/src/cli/args.js +13 -0
  10. package/dist/src/cli/benchmark-run.js +432 -0
  11. package/dist/src/cli/permissions-slash-command.js +50 -0
  12. package/dist/src/index.js +9 -2
  13. package/dist/src/indexer/plugin-loader.js +19 -1
  14. package/dist/src/indexer/project-index.js +35 -21
  15. package/dist/src/serve/agent-bridge.js +128 -1
  16. package/dist/src/serve/openai-compat.js +2 -2
  17. package/dist/src/serve/websocket.js +11 -0
  18. package/dist/src/tools/registry.js +10 -2
  19. package/dist/src/ui/app.js +8 -2
  20. package/dist/src/ui/cli-ink.js +13 -2
  21. package/dist/src/ui/components/permission-prompt.js +53 -0
  22. package/dist/src/ui/permission-gate.js +42 -0
  23. package/dist/src/ui/state/ui-store.js +13 -0
  24. package/dist/src/web/app.js +77 -5
  25. package/dist/src/web/index.html +58 -1
  26. package/dist/src/web/style.css +971 -1738
  27. package/dist/tests/agent.test.js +110 -0
  28. package/dist/tests/benchmark-config.test.js +80 -0
  29. package/dist/tests/benchmark-run.test.js +180 -0
  30. package/dist/tests/cli-args.test.js +22 -0
  31. package/dist/tests/cli-oneshot.integration.test.js +5 -0
  32. package/dist/tests/config.test.js +21 -0
  33. package/dist/tests/file-tools.test.js +36 -0
  34. package/dist/tests/harbor-adapter.test.js +57 -0
  35. package/dist/tests/indexer.test.js +1 -1
  36. package/dist/tests/permission-gate-cli.test.js +126 -0
  37. package/dist/tests/permission-gate.test.js +196 -0
  38. package/dist/tests/python-plugin.test.js +357 -0
  39. package/dist/tests/system-prompt.test.js +44 -9
  40. package/dist/tests/ts-bench-adapter.test.js +186 -0
  41. package/dist/tests/workspace-changes.test.js +82 -0
  42. package/node_modules/@minicode/agent-sdk/README.md +286 -90
  43. package/node_modules/@minicode/agent-sdk/dist/src/agent/agent.d.ts +40 -4
  44. package/node_modules/@minicode/agent-sdk/dist/src/agent/agent.d.ts.map +1 -1
  45. package/node_modules/@minicode/agent-sdk/dist/src/agent/agent.js +134 -27
  46. package/node_modules/@minicode/agent-sdk/dist/src/agent/agent.js.map +1 -1
  47. package/node_modules/@minicode/agent-sdk/dist/src/agent/structured-output.d.ts +42 -0
  48. package/node_modules/@minicode/agent-sdk/dist/src/agent/structured-output.d.ts.map +1 -0
  49. package/node_modules/@minicode/agent-sdk/dist/src/agent/structured-output.js +97 -0
  50. package/node_modules/@minicode/agent-sdk/dist/src/agent/structured-output.js.map +1 -0
  51. package/node_modules/@minicode/agent-sdk/dist/src/agent/types.d.ts +97 -2
  52. package/node_modules/@minicode/agent-sdk/dist/src/agent/types.d.ts.map +1 -1
  53. package/node_modules/@minicode/agent-sdk/dist/src/agent/types.js +15 -1
  54. package/node_modules/@minicode/agent-sdk/dist/src/agent/types.js.map +1 -1
  55. package/node_modules/@minicode/agent-sdk/dist/src/index.d.ts +10 -8
  56. package/node_modules/@minicode/agent-sdk/dist/src/index.d.ts.map +1 -1
  57. package/node_modules/@minicode/agent-sdk/dist/src/index.js +10 -6
  58. package/node_modules/@minicode/agent-sdk/dist/src/index.js.map +1 -1
  59. package/node_modules/@minicode/agent-sdk/dist/src/indexer/types.d.ts +8 -3
  60. package/node_modules/@minicode/agent-sdk/dist/src/indexer/types.d.ts.map +1 -1
  61. package/node_modules/@minicode/agent-sdk/dist/src/mcp/client-registry.d.ts +109 -0
  62. package/node_modules/@minicode/agent-sdk/dist/src/mcp/client-registry.d.ts.map +1 -0
  63. package/node_modules/@minicode/agent-sdk/dist/src/mcp/client-registry.js +237 -0
  64. package/node_modules/@minicode/agent-sdk/dist/src/mcp/client-registry.js.map +1 -0
  65. package/node_modules/@minicode/agent-sdk/dist/src/model/client.d.ts +5 -1
  66. package/node_modules/@minicode/agent-sdk/dist/src/model/client.d.ts.map +1 -1
  67. package/node_modules/@minicode/agent-sdk/dist/src/model/client.js +100 -8
  68. package/node_modules/@minicode/agent-sdk/dist/src/model/client.js.map +1 -1
  69. package/node_modules/@minicode/agent-sdk/dist/src/prompt/system-prompt.d.ts +31 -1
  70. package/node_modules/@minicode/agent-sdk/dist/src/prompt/system-prompt.d.ts.map +1 -1
  71. package/node_modules/@minicode/agent-sdk/dist/src/prompt/system-prompt.js +8 -7
  72. package/node_modules/@minicode/agent-sdk/dist/src/prompt/system-prompt.js.map +1 -1
  73. package/node_modules/@minicode/agent-sdk/dist/src/session/session.d.ts +8 -0
  74. package/node_modules/@minicode/agent-sdk/dist/src/session/session.d.ts.map +1 -1
  75. package/node_modules/@minicode/agent-sdk/dist/src/session/session.js +2 -0
  76. package/node_modules/@minicode/agent-sdk/dist/src/session/session.js.map +1 -1
  77. package/node_modules/@minicode/agent-sdk/dist/src/tools/edit-file.d.ts +10 -3
  78. package/node_modules/@minicode/agent-sdk/dist/src/tools/edit-file.d.ts.map +1 -1
  79. package/node_modules/@minicode/agent-sdk/dist/src/tools/edit-file.js +3 -3
  80. package/node_modules/@minicode/agent-sdk/dist/src/tools/edit-file.js.map +1 -1
  81. package/node_modules/@minicode/agent-sdk/dist/src/tools/list-files.d.ts +9 -2
  82. package/node_modules/@minicode/agent-sdk/dist/src/tools/list-files.d.ts.map +1 -1
  83. package/node_modules/@minicode/agent-sdk/dist/src/tools/list-files.js +2 -2
  84. package/node_modules/@minicode/agent-sdk/dist/src/tools/list-files.js.map +1 -1
  85. package/node_modules/@minicode/agent-sdk/dist/src/tools/read-file.d.ts +12 -2
  86. package/node_modules/@minicode/agent-sdk/dist/src/tools/read-file.d.ts.map +1 -1
  87. package/node_modules/@minicode/agent-sdk/dist/src/tools/read-file.js +3 -3
  88. package/node_modules/@minicode/agent-sdk/dist/src/tools/read-file.js.map +1 -1
  89. package/node_modules/@minicode/agent-sdk/dist/src/tools/run-command.d.ts +12 -2
  90. package/node_modules/@minicode/agent-sdk/dist/src/tools/run-command.d.ts.map +1 -1
  91. package/node_modules/@minicode/agent-sdk/dist/src/tools/run-command.js +5 -5
  92. package/node_modules/@minicode/agent-sdk/dist/src/tools/run-command.js.map +1 -1
  93. package/node_modules/@minicode/agent-sdk/dist/src/tools/search.d.ts +10 -2
  94. package/node_modules/@minicode/agent-sdk/dist/src/tools/search.d.ts.map +1 -1
  95. package/node_modules/@minicode/agent-sdk/dist/src/tools/search.js +5 -5
  96. package/node_modules/@minicode/agent-sdk/dist/src/tools/search.js.map +1 -1
  97. package/node_modules/@minicode/agent-sdk/dist/src/tools/write-file.d.ts +10 -3
  98. package/node_modules/@minicode/agent-sdk/dist/src/tools/write-file.d.ts.map +1 -1
  99. package/node_modules/@minicode/agent-sdk/dist/src/tools/write-file.js +3 -3
  100. package/node_modules/@minicode/agent-sdk/dist/src/tools/write-file.js.map +1 -1
  101. package/node_modules/@minicode/agent-sdk/dist/tests/agent.test.js +342 -0
  102. package/node_modules/@minicode/agent-sdk/dist/tests/agent.test.js.map +1 -1
  103. package/node_modules/@minicode/agent-sdk/dist/tests/mcp-client.integration.test.d.ts +2 -0
  104. package/node_modules/@minicode/agent-sdk/dist/tests/mcp-client.integration.test.d.ts.map +1 -0
  105. package/node_modules/@minicode/agent-sdk/dist/tests/mcp-client.integration.test.js +64 -0
  106. package/node_modules/@minicode/agent-sdk/dist/tests/mcp-client.integration.test.js.map +1 -0
  107. package/node_modules/@minicode/agent-sdk/dist/tests/mcp-client.test.d.ts +2 -0
  108. package/node_modules/@minicode/agent-sdk/dist/tests/mcp-client.test.d.ts.map +1 -0
  109. package/node_modules/@minicode/agent-sdk/dist/tests/mcp-client.test.js +350 -0
  110. package/node_modules/@minicode/agent-sdk/dist/tests/mcp-client.test.js.map +1 -0
  111. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-anthropic-structured-output.test.d.ts +2 -0
  112. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-anthropic-structured-output.test.d.ts.map +1 -0
  113. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-anthropic-structured-output.test.js +211 -0
  114. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-anthropic-structured-output.test.js.map +1 -0
  115. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-openai.test.js +88 -0
  116. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-openai.test.js.map +1 -1
  117. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-structured-output.test.d.ts +2 -0
  118. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-structured-output.test.d.ts.map +1 -0
  119. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-structured-output.test.js +171 -0
  120. package/node_modules/@minicode/agent-sdk/dist/tests/model-client-structured-output.test.js.map +1 -0
  121. package/node_modules/@minicode/agent-sdk/dist/tests/session.test.js +34 -0
  122. package/node_modules/@minicode/agent-sdk/dist/tests/session.test.js.map +1 -1
  123. package/node_modules/@minicode/agent-sdk/dist/tests/structured-output.test.d.ts +2 -0
  124. package/node_modules/@minicode/agent-sdk/dist/tests/structured-output.test.d.ts.map +1 -0
  125. package/node_modules/@minicode/agent-sdk/dist/tests/structured-output.test.js +212 -0
  126. package/node_modules/@minicode/agent-sdk/dist/tests/structured-output.test.js.map +1 -0
  127. package/node_modules/@minicode/agent-sdk/dist/tests/system-prompt.test.js +7 -7
  128. package/node_modules/@minicode/agent-sdk/dist/tests/system-prompt.test.js.map +1 -1
  129. package/node_modules/@minicode/agent-sdk/dist/tests/tool-factory-options.test.d.ts +2 -0
  130. package/node_modules/@minicode/agent-sdk/dist/tests/tool-factory-options.test.d.ts.map +1 -0
  131. package/node_modules/@minicode/agent-sdk/dist/tests/tool-factory-options.test.js +72 -0
  132. package/node_modules/@minicode/agent-sdk/dist/tests/tool-factory-options.test.js.map +1 -0
  133. package/node_modules/@minicode/agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
  134. package/node_modules/@minicode/agent-sdk/package.json +5 -2
  135. package/node_modules/minicode-plugin-python/dist/src/index.d.ts +9 -0
  136. package/node_modules/minicode-plugin-python/dist/src/index.d.ts.map +1 -0
  137. package/node_modules/minicode-plugin-python/dist/src/index.js +679 -0
  138. package/node_modules/minicode-plugin-python/dist/src/index.js.map +1 -0
  139. package/node_modules/minicode-plugin-python/dist/tsconfig.tsbuildinfo +1 -0
  140. package/node_modules/minicode-plugin-python/package.json +37 -0
  141. package/node_modules/node-addon-api/LICENSE.md +9 -0
  142. package/node_modules/node-addon-api/README.md +95 -0
  143. package/node_modules/node-addon-api/common.gypi +21 -0
  144. package/node_modules/node-addon-api/except.gypi +25 -0
  145. package/node_modules/node-addon-api/index.js +14 -0
  146. package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
  147. package/node_modules/node-addon-api/napi-inl.h +7165 -0
  148. package/node_modules/node-addon-api/napi.h +3364 -0
  149. package/node_modules/node-addon-api/node_addon_api.gyp +42 -0
  150. package/node_modules/node-addon-api/node_api.gyp +9 -0
  151. package/node_modules/node-addon-api/noexcept.gypi +26 -0
  152. package/node_modules/node-addon-api/nothing.c +0 -0
  153. package/node_modules/node-addon-api/package-support.json +21 -0
  154. package/node_modules/node-addon-api/package.json +480 -0
  155. package/node_modules/node-addon-api/tools/README.md +73 -0
  156. package/node_modules/node-addon-api/tools/check-napi.js +99 -0
  157. package/node_modules/node-addon-api/tools/clang-format.js +71 -0
  158. package/node_modules/node-addon-api/tools/conversion.js +301 -0
  159. package/node_modules/node-gyp-build/LICENSE +21 -0
  160. package/node_modules/node-gyp-build/README.md +58 -0
  161. package/node_modules/node-gyp-build/SECURITY.md +5 -0
  162. package/node_modules/node-gyp-build/bin.js +84 -0
  163. package/node_modules/node-gyp-build/build-test.js +19 -0
  164. package/node_modules/node-gyp-build/index.js +6 -0
  165. package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  166. package/node_modules/node-gyp-build/optional.js +7 -0
  167. package/node_modules/node-gyp-build/package.json +43 -0
  168. package/node_modules/tree-sitter/LICENSE +21 -0
  169. package/node_modules/tree-sitter/README.md +128 -0
  170. package/node_modules/tree-sitter/binding.gyp +80 -0
  171. package/node_modules/tree-sitter/index.js +916 -0
  172. package/node_modules/tree-sitter/package.json +76 -0
  173. package/node_modules/tree-sitter/src/addon_data.h +47 -0
  174. package/node_modules/tree-sitter/src/binding.cc +35 -0
  175. package/node_modules/tree-sitter/src/conversions.cc +140 -0
  176. package/node_modules/tree-sitter/src/conversions.h +22 -0
  177. package/node_modules/tree-sitter/src/language.cc +106 -0
  178. package/node_modules/tree-sitter/src/language.h +17 -0
  179. package/node_modules/tree-sitter/src/logger.cc +70 -0
  180. package/node_modules/tree-sitter/src/logger.h +19 -0
  181. package/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
  182. package/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
  183. package/node_modules/tree-sitter/src/node.cc +1088 -0
  184. package/node_modules/tree-sitter/src/node.h +30 -0
  185. package/node_modules/tree-sitter/src/parser.cc +306 -0
  186. package/node_modules/tree-sitter/src/parser.h +35 -0
  187. package/node_modules/tree-sitter/src/query.cc +397 -0
  188. package/node_modules/tree-sitter/src/query.h +40 -0
  189. package/node_modules/tree-sitter/src/tree.cc +316 -0
  190. package/node_modules/tree-sitter/src/tree.h +45 -0
  191. package/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
  192. package/node_modules/tree-sitter/src/tree_cursor.h +52 -0
  193. package/node_modules/tree-sitter/tree-sitter.d.ts +1042 -0
  194. package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1478 -0
  195. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
  196. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
  197. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +291 -0
  198. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
  199. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
  200. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
  201. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +523 -0
  202. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
  203. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
  204. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +293 -0
  205. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +293 -0
  206. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
  207. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +483 -0
  208. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +54 -0
  209. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +12 -0
  210. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +875 -0
  211. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2293 -0
  212. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +286 -0
  213. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +48 -0
  214. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/portable/endian.h +239 -0
  215. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4350 -0
  216. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
  217. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
  218. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +911 -0
  219. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +133 -0
  220. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1034 -0
  221. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +399 -0
  222. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +170 -0
  223. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
  224. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +717 -0
  225. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
  226. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/ts_assert.h +11 -0
  227. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
  228. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
  229. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
  230. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
  231. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
  232. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
  233. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
  234. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
  235. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
  236. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +75 -0
  237. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +24 -0
  238. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +113 -0
  239. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1314 -0
  240. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1935 -0
  241. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
  242. package/node_modules/tree-sitter-python/LICENSE +21 -0
  243. package/node_modules/tree-sitter-python/README.md +24 -0
  244. package/node_modules/tree-sitter-python/binding.gyp +35 -0
  245. package/node_modules/tree-sitter-python/bindings/node/binding.cc +19 -0
  246. package/node_modules/tree-sitter-python/bindings/node/binding_test.js +9 -0
  247. package/node_modules/tree-sitter-python/bindings/node/index.d.ts +27 -0
  248. package/node_modules/tree-sitter-python/bindings/node/index.js +11 -0
  249. package/node_modules/tree-sitter-python/grammar.js +1225 -0
  250. package/node_modules/tree-sitter-python/package.json +60 -0
  251. package/node_modules/tree-sitter-python/prebuilds/darwin-arm64/tree-sitter-python.node +0 -0
  252. package/node_modules/tree-sitter-python/prebuilds/darwin-x64/tree-sitter-python.node +0 -0
  253. package/node_modules/tree-sitter-python/prebuilds/linux-arm64/tree-sitter-python.node +0 -0
  254. package/node_modules/tree-sitter-python/prebuilds/linux-x64/tree-sitter-python.node +0 -0
  255. package/node_modules/tree-sitter-python/prebuilds/win32-arm64/tree-sitter-python.node +0 -0
  256. package/node_modules/tree-sitter-python/prebuilds/win32-x64/tree-sitter-python.node +0 -0
  257. package/node_modules/tree-sitter-python/queries/highlights.scm +137 -0
  258. package/node_modules/tree-sitter-python/queries/tags.scm +14 -0
  259. package/node_modules/tree-sitter-python/src/grammar.json +6435 -0
  260. package/node_modules/tree-sitter-python/src/node-types.json +3746 -0
  261. package/node_modules/tree-sitter-python/src/parser.c +129742 -0
  262. package/node_modules/tree-sitter-python/src/scanner.c +437 -0
  263. package/node_modules/tree-sitter-python/src/tree_sitter/alloc.h +54 -0
  264. package/node_modules/tree-sitter-python/src/tree_sitter/array.h +291 -0
  265. package/node_modules/tree-sitter-python/src/tree_sitter/parser.h +286 -0
  266. package/node_modules/tree-sitter-python/tree-sitter-python.wasm +0 -0
  267. package/node_modules/tree-sitter-python/tree-sitter.json +42 -0
  268. package/package.json +13 -7
  269. package/packages/agent-sdk/node_modules/ajv/.runkit_example.js +23 -0
  270. package/packages/agent-sdk/node_modules/ajv/LICENSE +22 -0
  271. package/packages/agent-sdk/node_modules/ajv/README.md +207 -0
  272. package/packages/agent-sdk/node_modules/ajv/dist/2019.d.ts +19 -0
  273. package/packages/agent-sdk/node_modules/ajv/dist/2019.js +61 -0
  274. package/packages/agent-sdk/node_modules/ajv/dist/2019.js.map +1 -0
  275. package/packages/agent-sdk/node_modules/ajv/dist/2020.d.ts +19 -0
  276. package/packages/agent-sdk/node_modules/ajv/dist/2020.js +55 -0
  277. package/packages/agent-sdk/node_modules/ajv/dist/2020.js.map +1 -0
  278. package/packages/agent-sdk/node_modules/ajv/dist/ajv.d.ts +18 -0
  279. package/packages/agent-sdk/node_modules/ajv/dist/ajv.js +50 -0
  280. package/packages/agent-sdk/node_modules/ajv/dist/ajv.js.map +1 -0
  281. package/packages/agent-sdk/node_modules/ajv/dist/compile/codegen/code.d.ts +40 -0
  282. package/packages/agent-sdk/node_modules/ajv/dist/compile/codegen/code.js +156 -0
  283. package/packages/agent-sdk/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  284. package/packages/agent-sdk/node_modules/ajv/dist/compile/codegen/index.d.ts +79 -0
  285. package/packages/agent-sdk/node_modules/ajv/dist/compile/codegen/index.js +697 -0
  286. package/packages/agent-sdk/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  287. package/packages/agent-sdk/node_modules/ajv/dist/compile/codegen/scope.d.ts +79 -0
  288. package/packages/agent-sdk/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
  289. package/packages/agent-sdk/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  290. package/packages/agent-sdk/node_modules/ajv/dist/compile/errors.d.ts +13 -0
  291. package/packages/agent-sdk/node_modules/ajv/dist/compile/errors.js +123 -0
  292. package/packages/agent-sdk/node_modules/ajv/dist/compile/errors.js.map +1 -0
  293. package/packages/agent-sdk/node_modules/ajv/dist/compile/index.d.ts +80 -0
  294. package/packages/agent-sdk/node_modules/ajv/dist/compile/index.js +242 -0
  295. package/packages/agent-sdk/node_modules/ajv/dist/compile/index.js.map +1 -0
  296. package/packages/agent-sdk/node_modules/ajv/dist/compile/jtd/parse.d.ts +4 -0
  297. package/packages/agent-sdk/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
  298. package/packages/agent-sdk/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -0
  299. package/packages/agent-sdk/node_modules/ajv/dist/compile/jtd/serialize.d.ts +4 -0
  300. package/packages/agent-sdk/node_modules/ajv/dist/compile/jtd/serialize.js +236 -0
  301. package/packages/agent-sdk/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -0
  302. package/packages/agent-sdk/node_modules/ajv/dist/compile/jtd/types.d.ts +6 -0
  303. package/packages/agent-sdk/node_modules/ajv/dist/compile/jtd/types.js +14 -0
  304. package/packages/agent-sdk/node_modules/ajv/dist/compile/jtd/types.js.map +1 -0
  305. package/packages/agent-sdk/node_modules/ajv/dist/compile/names.d.ts +20 -0
  306. package/packages/agent-sdk/node_modules/ajv/dist/compile/names.js +28 -0
  307. package/packages/agent-sdk/node_modules/ajv/dist/compile/names.js.map +1 -0
  308. package/packages/agent-sdk/node_modules/ajv/dist/compile/ref_error.d.ts +6 -0
  309. package/packages/agent-sdk/node_modules/ajv/dist/compile/ref_error.js +12 -0
  310. package/packages/agent-sdk/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  311. package/packages/agent-sdk/node_modules/ajv/dist/compile/resolve.d.ts +12 -0
  312. package/packages/agent-sdk/node_modules/ajv/dist/compile/resolve.js +155 -0
  313. package/packages/agent-sdk/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  314. package/packages/agent-sdk/node_modules/ajv/dist/compile/rules.d.ts +28 -0
  315. package/packages/agent-sdk/node_modules/ajv/dist/compile/rules.js +26 -0
  316. package/packages/agent-sdk/node_modules/ajv/dist/compile/rules.js.map +1 -0
  317. package/packages/agent-sdk/node_modules/ajv/dist/compile/util.d.ts +40 -0
  318. package/packages/agent-sdk/node_modules/ajv/dist/compile/util.js +178 -0
  319. package/packages/agent-sdk/node_modules/ajv/dist/compile/util.js.map +1 -0
  320. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/applicability.d.ts +6 -0
  321. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
  322. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  323. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +4 -0
  324. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
  325. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  326. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/dataType.d.ts +17 -0
  327. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
  328. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  329. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/defaults.d.ts +2 -0
  330. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  331. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  332. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/index.d.ts +42 -0
  333. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/index.js +520 -0
  334. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  335. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/keyword.d.ts +8 -0
  336. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
  337. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  338. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/subschema.d.ts +47 -0
  339. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
  340. package/packages/agent-sdk/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  341. package/packages/agent-sdk/node_modules/ajv/dist/core.d.ts +174 -0
  342. package/packages/agent-sdk/node_modules/ajv/dist/core.js +618 -0
  343. package/packages/agent-sdk/node_modules/ajv/dist/core.js.map +1 -0
  344. package/packages/agent-sdk/node_modules/ajv/dist/jtd.d.ts +47 -0
  345. package/packages/agent-sdk/node_modules/ajv/dist/jtd.js +72 -0
  346. package/packages/agent-sdk/node_modules/ajv/dist/jtd.js.map +1 -0
  347. package/packages/agent-sdk/node_modules/ajv/dist/refs/data.json +13 -0
  348. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +2 -0
  349. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
  350. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +1 -0
  351. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
  352. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
  353. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
  354. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
  355. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  356. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
  357. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
  358. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +2 -0
  359. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
  360. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +1 -0
  361. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
  362. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
  363. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
  364. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  365. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  366. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  367. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
  368. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
  369. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
  370. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
  371. package/packages/agent-sdk/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
  372. package/packages/agent-sdk/node_modules/ajv/dist/refs/jtd-schema.d.ts +3 -0
  373. package/packages/agent-sdk/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
  374. package/packages/agent-sdk/node_modules/ajv/dist/refs/jtd-schema.js.map +1 -0
  375. package/packages/agent-sdk/node_modules/ajv/dist/runtime/equal.d.ts +6 -0
  376. package/packages/agent-sdk/node_modules/ajv/dist/runtime/equal.js +7 -0
  377. package/packages/agent-sdk/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  378. package/packages/agent-sdk/node_modules/ajv/dist/runtime/parseJson.d.ts +18 -0
  379. package/packages/agent-sdk/node_modules/ajv/dist/runtime/parseJson.js +185 -0
  380. package/packages/agent-sdk/node_modules/ajv/dist/runtime/parseJson.js.map +1 -0
  381. package/packages/agent-sdk/node_modules/ajv/dist/runtime/quote.d.ts +5 -0
  382. package/packages/agent-sdk/node_modules/ajv/dist/runtime/quote.js +30 -0
  383. package/packages/agent-sdk/node_modules/ajv/dist/runtime/quote.js.map +1 -0
  384. package/packages/agent-sdk/node_modules/ajv/dist/runtime/re2.d.ts +6 -0
  385. package/packages/agent-sdk/node_modules/ajv/dist/runtime/re2.js +6 -0
  386. package/packages/agent-sdk/node_modules/ajv/dist/runtime/re2.js.map +1 -0
  387. package/packages/agent-sdk/node_modules/ajv/dist/runtime/timestamp.d.ts +5 -0
  388. package/packages/agent-sdk/node_modules/ajv/dist/runtime/timestamp.js +42 -0
  389. package/packages/agent-sdk/node_modules/ajv/dist/runtime/timestamp.js.map +1 -0
  390. package/packages/agent-sdk/node_modules/ajv/dist/runtime/ucs2length.d.ts +5 -0
  391. package/packages/agent-sdk/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
  392. package/packages/agent-sdk/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  393. package/packages/agent-sdk/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
  394. package/packages/agent-sdk/node_modules/ajv/dist/runtime/uri.js +6 -0
  395. package/packages/agent-sdk/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  396. package/packages/agent-sdk/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
  397. package/packages/agent-sdk/node_modules/ajv/dist/runtime/validation_error.js +11 -0
  398. package/packages/agent-sdk/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  399. package/packages/agent-sdk/node_modules/ajv/dist/standalone/index.d.ts +6 -0
  400. package/packages/agent-sdk/node_modules/ajv/dist/standalone/index.js +90 -0
  401. package/packages/agent-sdk/node_modules/ajv/dist/standalone/index.js.map +1 -0
  402. package/packages/agent-sdk/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
  403. package/packages/agent-sdk/node_modules/ajv/dist/standalone/instance.js +35 -0
  404. package/packages/agent-sdk/node_modules/ajv/dist/standalone/instance.js.map +1 -0
  405. package/packages/agent-sdk/node_modules/ajv/dist/types/index.d.ts +183 -0
  406. package/packages/agent-sdk/node_modules/ajv/dist/types/index.js +3 -0
  407. package/packages/agent-sdk/node_modules/ajv/dist/types/index.js.map +1 -0
  408. package/packages/agent-sdk/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
  409. package/packages/agent-sdk/node_modules/ajv/dist/types/json-schema.js +3 -0
  410. package/packages/agent-sdk/node_modules/ajv/dist/types/json-schema.js.map +1 -0
  411. package/packages/agent-sdk/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
  412. package/packages/agent-sdk/node_modules/ajv/dist/types/jtd-schema.js +3 -0
  413. package/packages/agent-sdk/node_modules/ajv/dist/types/jtd-schema.js.map +1 -0
  414. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
  415. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
  416. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  417. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
  418. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
  419. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  420. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
  421. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
  422. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  423. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
  424. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
  425. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  426. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
  427. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
  428. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  429. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
  430. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
  431. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  432. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +3 -0
  433. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
  434. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +1 -0
  435. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
  436. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  437. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  438. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
  439. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
  440. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  441. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +5 -0
  442. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
  443. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  444. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
  445. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
  446. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  447. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
  448. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
  449. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  450. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
  451. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
  452. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  453. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +3 -0
  454. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
  455. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  456. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +3 -0
  457. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
  458. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  459. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +3 -0
  460. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
  461. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  462. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
  463. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
  464. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  465. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +3 -0
  466. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
  467. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  468. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/code.d.ts +17 -0
  469. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/code.js +131 -0
  470. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  471. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/core/id.d.ts +3 -0
  472. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
  473. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  474. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/core/index.d.ts +3 -0
  475. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
  476. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  477. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/core/ref.d.ts +8 -0
  478. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
  479. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  480. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
  481. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
  482. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  483. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
  484. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
  485. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  486. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/draft2020.d.ts +3 -0
  487. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
  488. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/draft2020.js.map +1 -0
  489. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/draft7.d.ts +3 -0
  490. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
  491. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  492. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +5 -0
  493. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
  494. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +1 -0
  495. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +5 -0
  496. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
  497. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -0
  498. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +3 -0
  499. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
  500. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +1 -0
  501. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +3 -0
  502. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
  503. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +1 -0
  504. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +3 -0
  505. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
  506. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +1 -0
  507. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/errors.d.ts +9 -0
  508. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/errors.js +3 -0
  509. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/errors.js.map +1 -0
  510. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/format/format.d.ts +8 -0
  511. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  512. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  513. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/format/index.d.ts +3 -0
  514. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
  515. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  516. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +6 -0
  517. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
  518. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -0
  519. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +5 -0
  520. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
  521. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +1 -0
  522. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +6 -0
  523. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
  524. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -0
  525. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +9 -0
  526. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
  527. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/error.js.map +1 -0
  528. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +10 -0
  529. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
  530. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/index.js.map +1 -0
  531. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +5 -0
  532. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
  533. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -0
  534. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +4 -0
  535. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
  536. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -0
  537. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +3 -0
  538. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
  539. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +1 -0
  540. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +22 -0
  541. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
  542. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -0
  543. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +4 -0
  544. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
  545. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -0
  546. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +10 -0
  547. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
  548. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -0
  549. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +3 -0
  550. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
  551. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/union.js.map +1 -0
  552. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +5 -0
  553. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
  554. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -0
  555. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/metadata.d.ts +3 -0
  556. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
  557. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  558. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/next.d.ts +3 -0
  559. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/next.js +8 -0
  560. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/next.js.map +1 -0
  561. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +3 -0
  562. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
  563. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +1 -0
  564. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
  565. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
  566. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -0
  567. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
  568. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
  569. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -0
  570. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/const.d.ts +6 -0
  571. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
  572. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  573. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
  574. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
  575. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +1 -0
  576. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
  577. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
  578. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  579. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/index.d.ts +16 -0
  580. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
  581. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  582. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +3 -0
  583. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
  584. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -0
  585. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +3 -0
  586. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
  587. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  588. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +3 -0
  589. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
  590. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  591. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
  592. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
  593. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  594. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +3 -0
  595. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
  596. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  597. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
  598. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
  599. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  600. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
  601. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
  602. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  603. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/required.d.ts +8 -0
  604. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
  605. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  606. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
  607. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
  608. package/packages/agent-sdk/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  609. package/packages/agent-sdk/node_modules/ajv/lib/2019.ts +81 -0
  610. package/packages/agent-sdk/node_modules/ajv/lib/2020.ts +75 -0
  611. package/packages/agent-sdk/node_modules/ajv/lib/ajv.ts +70 -0
  612. package/packages/agent-sdk/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
  613. package/packages/agent-sdk/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
  614. package/packages/agent-sdk/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
  615. package/packages/agent-sdk/node_modules/ajv/lib/compile/errors.ts +184 -0
  616. package/packages/agent-sdk/node_modules/ajv/lib/compile/index.ts +324 -0
  617. package/packages/agent-sdk/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
  618. package/packages/agent-sdk/node_modules/ajv/lib/compile/jtd/serialize.ts +277 -0
  619. package/packages/agent-sdk/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
  620. package/packages/agent-sdk/node_modules/ajv/lib/compile/names.ts +27 -0
  621. package/packages/agent-sdk/node_modules/ajv/lib/compile/ref_error.ts +13 -0
  622. package/packages/agent-sdk/node_modules/ajv/lib/compile/resolve.ts +149 -0
  623. package/packages/agent-sdk/node_modules/ajv/lib/compile/rules.ts +50 -0
  624. package/packages/agent-sdk/node_modules/ajv/lib/compile/util.ts +213 -0
  625. package/packages/agent-sdk/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
  626. package/packages/agent-sdk/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
  627. package/packages/agent-sdk/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
  628. package/packages/agent-sdk/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
  629. package/packages/agent-sdk/node_modules/ajv/lib/compile/validate/index.ts +582 -0
  630. package/packages/agent-sdk/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
  631. package/packages/agent-sdk/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
  632. package/packages/agent-sdk/node_modules/ajv/lib/core.ts +892 -0
  633. package/packages/agent-sdk/node_modules/ajv/lib/jtd.ts +132 -0
  634. package/packages/agent-sdk/node_modules/ajv/lib/refs/data.json +13 -0
  635. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
  636. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
  637. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
  638. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
  639. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
  640. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  641. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
  642. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
  643. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
  644. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
  645. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
  646. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
  647. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  648. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  649. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  650. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
  651. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
  652. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
  653. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
  654. package/packages/agent-sdk/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
  655. package/packages/agent-sdk/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
  656. package/packages/agent-sdk/node_modules/ajv/lib/runtime/equal.ts +7 -0
  657. package/packages/agent-sdk/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
  658. package/packages/agent-sdk/node_modules/ajv/lib/runtime/quote.ts +31 -0
  659. package/packages/agent-sdk/node_modules/ajv/lib/runtime/re2.ts +6 -0
  660. package/packages/agent-sdk/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
  661. package/packages/agent-sdk/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
  662. package/packages/agent-sdk/node_modules/ajv/lib/runtime/uri.ts +6 -0
  663. package/packages/agent-sdk/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
  664. package/packages/agent-sdk/node_modules/ajv/lib/standalone/index.ts +100 -0
  665. package/packages/agent-sdk/node_modules/ajv/lib/standalone/instance.ts +36 -0
  666. package/packages/agent-sdk/node_modules/ajv/lib/types/index.ts +244 -0
  667. package/packages/agent-sdk/node_modules/ajv/lib/types/json-schema.ts +187 -0
  668. package/packages/agent-sdk/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
  669. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
  670. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
  671. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
  672. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
  673. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
  674. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
  675. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
  676. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
  677. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
  678. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
  679. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
  680. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
  681. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
  682. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
  683. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
  684. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
  685. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
  686. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
  687. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/code.ts +168 -0
  688. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
  689. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
  690. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
  691. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
  692. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
  693. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
  694. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
  695. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
  696. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
  697. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
  698. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
  699. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
  700. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
  701. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
  702. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
  703. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
  704. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
  705. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
  706. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
  707. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
  708. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
  709. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
  710. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
  711. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
  712. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
  713. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
  714. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
  715. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
  716. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
  717. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/next.ts +8 -0
  718. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
  719. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
  720. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
  721. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
  722. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
  723. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
  724. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
  725. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
  726. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
  727. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
  728. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
  729. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
  730. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
  731. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/pattern.ts +39 -0
  732. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
  733. package/packages/agent-sdk/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
  734. package/packages/agent-sdk/node_modules/ajv/package.json +126 -0
  735. package/packages/agent-sdk/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
  736. package/packages/agent-sdk/node_modules/json-schema-traverse/.github/FUNDING.yml +2 -0
  737. package/packages/agent-sdk/node_modules/json-schema-traverse/.github/workflows/build.yml +28 -0
  738. package/packages/agent-sdk/node_modules/json-schema-traverse/.github/workflows/publish.yml +27 -0
  739. package/packages/agent-sdk/node_modules/json-schema-traverse/LICENSE +21 -0
  740. package/packages/agent-sdk/node_modules/json-schema-traverse/README.md +95 -0
  741. package/packages/agent-sdk/node_modules/json-schema-traverse/index.d.ts +40 -0
  742. package/packages/agent-sdk/node_modules/json-schema-traverse/index.js +93 -0
  743. package/packages/agent-sdk/node_modules/json-schema-traverse/package.json +43 -0
  744. package/packages/agent-sdk/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
  745. package/packages/agent-sdk/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
  746. package/packages/agent-sdk/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
@@ -0,0 +1,916 @@
1
+ const binding = typeof process.versions.bun === "string" ?
2
+ // Statically analyzable enough for `bun build --compile` to embed the tree-sitter.node napi addon
3
+ require(`./prebuilds/${process.platform}-${process.arch}/tree-sitter.node`) :
4
+ require('node-gyp-build')(__dirname);
5
+ const {Query, Parser, NodeMethods, Tree, TreeCursor, LookaheadIterator} = binding;
6
+
7
+ const util = require('util');
8
+
9
+ /*
10
+ * Tree
11
+ */
12
+
13
+ const {rootNode, rootNodeWithOffset, edit} = Tree.prototype;
14
+
15
+ Object.defineProperty(Tree.prototype, 'rootNode', {
16
+ get() {
17
+ /*
18
+ Due to a race condition arising from Jest's worker pool, "this"
19
+ has no knowledge of the native extension if the extension has not
20
+ yet loaded when multiple Jest tests are being run simultaneously.
21
+ If the extension has correctly loaded, "this" should be an instance
22
+ of the class whose prototype we are acting on (in this case, Tree).
23
+ Furthermore, the race condition sometimes results in the function in
24
+ question being undefined even when the context is correct, so we also
25
+ perform a null function check.
26
+ */
27
+ if (this instanceof Tree && rootNode) {
28
+ return unmarshalNode(rootNode.call(this), this);
29
+ }
30
+ },
31
+ // Jest worker pool may attempt to override property due to race condition,
32
+ // we don't want to error on this
33
+ configurable: true
34
+ });
35
+
36
+ Tree.prototype.rootNodeWithOffset = function(offset_bytes, offset_extent) {
37
+ return unmarshalNode(rootNodeWithOffset.call(this, offset_bytes, offset_extent.row, offset_extent.column), this);
38
+ }
39
+
40
+ Tree.prototype.edit = function(arg) {
41
+ if (this instanceof Tree && edit) {
42
+ edit.call(
43
+ this,
44
+ arg.startPosition.row, arg.startPosition.column,
45
+ arg.oldEndPosition.row, arg.oldEndPosition.column,
46
+ arg.newEndPosition.row, arg.newEndPosition.column,
47
+ arg.startIndex,
48
+ arg.oldEndIndex,
49
+ arg.newEndIndex
50
+ );
51
+ }
52
+ };
53
+
54
+ Tree.prototype.walk = function() {
55
+ return this.rootNode.walk()
56
+ };
57
+
58
+ /*
59
+ * Node
60
+ */
61
+
62
+ class SyntaxNode {
63
+ constructor(tree) {
64
+ this.tree = tree;
65
+ }
66
+
67
+ [util.inspect.custom]() {
68
+ return this.constructor.name + ' {\n' +
69
+ ' type: ' + this.type + ',\n' +
70
+ ' startPosition: ' + pointToString(this.startPosition) + ',\n' +
71
+ ' endPosition: ' + pointToString(this.endPosition) + ',\n' +
72
+ ' childCount: ' + this.childCount + ',\n' +
73
+ '}'
74
+ }
75
+
76
+ get id() {
77
+ marshalNode(this);
78
+ return NodeMethods.id(this.tree);
79
+ }
80
+
81
+ get typeId() {
82
+ marshalNode(this);
83
+ return NodeMethods.typeId(this.tree);
84
+ }
85
+
86
+ get grammarId() {
87
+ marshalNode(this);
88
+ return NodeMethods.grammarId(this.tree);
89
+ }
90
+
91
+ get type() {
92
+ marshalNode(this);
93
+ return NodeMethods.type(this.tree);
94
+ }
95
+
96
+ get grammarType() {
97
+ marshalNode(this);
98
+ return NodeMethods.grammarType(this.tree);
99
+ }
100
+
101
+ get isExtra() {
102
+ marshalNode(this);
103
+ return NodeMethods.isExtra(this.tree);
104
+ }
105
+
106
+ get isNamed() {
107
+ marshalNode(this);
108
+ return NodeMethods.isNamed(this.tree);
109
+ }
110
+
111
+ get isMissing() {
112
+ marshalNode(this);
113
+ return NodeMethods.isMissing(this.tree);
114
+ }
115
+
116
+ get hasChanges() {
117
+ marshalNode(this);
118
+ return NodeMethods.hasChanges(this.tree);
119
+ }
120
+
121
+ get hasError() {
122
+ marshalNode(this);
123
+ return NodeMethods.hasError(this.tree);
124
+ }
125
+
126
+ get isError() {
127
+ marshalNode(this);
128
+ return NodeMethods.isError(this.tree);
129
+ }
130
+
131
+ get text() {
132
+ return this.tree.getText(this);
133
+ }
134
+
135
+ get startPosition() {
136
+ marshalNode(this);
137
+ NodeMethods.startPosition(this.tree);
138
+ return unmarshalPoint();
139
+ }
140
+
141
+ get endPosition() {
142
+ marshalNode(this);
143
+ NodeMethods.endPosition(this.tree);
144
+ return unmarshalPoint();
145
+ }
146
+
147
+ get startIndex() {
148
+ marshalNode(this);
149
+ return NodeMethods.startIndex(this.tree);
150
+ }
151
+
152
+ get endIndex() {
153
+ marshalNode(this);
154
+ return NodeMethods.endIndex(this.tree);
155
+ }
156
+
157
+ get parent() {
158
+ marshalNode(this);
159
+ return unmarshalNode(NodeMethods.parent(this.tree), this.tree);
160
+ }
161
+
162
+ get children() {
163
+ marshalNode(this);
164
+ return unmarshalNodes(NodeMethods.children(this.tree), this.tree);
165
+ }
166
+
167
+ get namedChildren() {
168
+ marshalNode(this);
169
+ return unmarshalNodes(NodeMethods.namedChildren(this.tree), this.tree);
170
+ }
171
+
172
+ get childCount() {
173
+ marshalNode(this);
174
+ return NodeMethods.childCount(this.tree);
175
+ }
176
+
177
+ get namedChildCount() {
178
+ marshalNode(this);
179
+ return NodeMethods.namedChildCount(this.tree);
180
+ }
181
+
182
+ get firstChild() {
183
+ marshalNode(this);
184
+ return unmarshalNode(NodeMethods.firstChild(this.tree), this.tree);
185
+ }
186
+
187
+ get firstNamedChild() {
188
+ marshalNode(this);
189
+ return unmarshalNode(NodeMethods.firstNamedChild(this.tree), this.tree);
190
+ }
191
+
192
+ get lastChild() {
193
+ marshalNode(this);
194
+ return unmarshalNode(NodeMethods.lastChild(this.tree), this.tree);
195
+ }
196
+
197
+ get lastNamedChild() {
198
+ marshalNode(this);
199
+ return unmarshalNode(NodeMethods.lastNamedChild(this.tree), this.tree);
200
+ }
201
+
202
+ get nextSibling() {
203
+ marshalNode(this);
204
+ return unmarshalNode(NodeMethods.nextSibling(this.tree), this.tree);
205
+ }
206
+
207
+ get nextNamedSibling() {
208
+ marshalNode(this);
209
+ return unmarshalNode(NodeMethods.nextNamedSibling(this.tree), this.tree);
210
+ }
211
+
212
+ get previousSibling() {
213
+ marshalNode(this);
214
+ return unmarshalNode(NodeMethods.previousSibling(this.tree), this.tree);
215
+ }
216
+
217
+ get previousNamedSibling() {
218
+ marshalNode(this);
219
+ return unmarshalNode(NodeMethods.previousNamedSibling(this.tree), this.tree);
220
+ }
221
+
222
+ get parseState() {
223
+ marshalNode(this);
224
+ return NodeMethods.parseState(this.tree);
225
+ }
226
+
227
+ get nextParseState() {
228
+ marshalNode(this);
229
+ return NodeMethods.nextParseState(this.tree);
230
+ }
231
+
232
+ get descendantCount() {
233
+ marshalNode(this);
234
+ return NodeMethods.descendantCount(this.tree);
235
+ }
236
+
237
+ toString() {
238
+ marshalNode(this);
239
+ return NodeMethods.toString(this.tree);
240
+ }
241
+
242
+ child(index) {
243
+ marshalNode(this);
244
+ return unmarshalNode(NodeMethods.child(this.tree, index), this.tree);
245
+ }
246
+
247
+ namedChild(index) {
248
+ marshalNode(this);
249
+ return unmarshalNode(NodeMethods.namedChild(this.tree, index), this.tree);
250
+ }
251
+
252
+ childForFieldName(fieldName) {
253
+ marshalNode(this);
254
+ return unmarshalNode(NodeMethods.childForFieldName(this.tree, fieldName), this.tree);
255
+ }
256
+
257
+ childForFieldId(fieldId) {
258
+ marshalNode(this);
259
+ return unmarshalNode(NodeMethods.childForFieldId(this.tree, fieldId), this.tree);
260
+ }
261
+
262
+ fieldNameForChild(childIndex) {
263
+ marshalNode(this);
264
+ return NodeMethods.fieldNameForChild(this.tree, childIndex);
265
+ }
266
+
267
+ fieldNameForNamedChild(namedChildIndex) {
268
+ marshalNode(this);
269
+ return NodeMethods.fieldNameForNamedChild(this.tree, namedChildIndex);
270
+ }
271
+
272
+ childrenForFieldName(fieldName) {
273
+ marshalNode(this);
274
+ return unmarshalNodes(NodeMethods.childrenForFieldName(this.tree, fieldName), this.tree);
275
+ }
276
+
277
+ childrenForFieldId(fieldId) {
278
+ marshalNode(this);
279
+ return unmarshalNodes(NodeMethods.childrenForFieldId(this.tree, fieldId), this.tree);
280
+ }
281
+
282
+ firstChildForIndex(index) {
283
+ marshalNode(this);
284
+ return unmarshalNode(NodeMethods.firstChildForIndex(this.tree, index), this.tree);
285
+ }
286
+
287
+ firstNamedChildForIndex(index) {
288
+ marshalNode(this);
289
+ return unmarshalNode(NodeMethods.firstNamedChildForIndex(this.tree, index), this.tree);
290
+ }
291
+
292
+ childWithDescendant(descendant) {
293
+ marshalNodes([this, descendant]);
294
+ return unmarshalNode(NodeMethods.childWithDescendant(this.tree, descendant.tree), this.tree);
295
+ }
296
+
297
+ namedDescendantForIndex(start, end) {
298
+ marshalNode(this);
299
+ if (end == null) end = start;
300
+ return unmarshalNode(NodeMethods.namedDescendantForIndex(this.tree, start, end), this.tree);
301
+ }
302
+
303
+ descendantForIndex(start, end) {
304
+ marshalNode(this);
305
+ if (end == null) end = start;
306
+ return unmarshalNode(NodeMethods.descendantForIndex(this.tree, start, end), this.tree);
307
+ }
308
+
309
+ descendantsOfType(types, start, end) {
310
+ marshalNode(this);
311
+ if (typeof types === 'string') types = [types]
312
+ return unmarshalNodes(NodeMethods.descendantsOfType(this.tree, types, start, end), this.tree);
313
+ }
314
+
315
+ namedDescendantForPosition(start, end) {
316
+ marshalNode(this);
317
+ if (end == null) end = start;
318
+ return unmarshalNode(NodeMethods.namedDescendantForPosition(this.tree, start, end), this.tree);
319
+ }
320
+
321
+ descendantForPosition(start, end) {
322
+ marshalNode(this);
323
+ if (end == null) end = start;
324
+ return unmarshalNode(NodeMethods.descendantForPosition(this.tree, start, end), this.tree);
325
+ }
326
+
327
+ closest(types) {
328
+ marshalNode(this);
329
+ if (typeof types === 'string') types = [types]
330
+ return unmarshalNode(NodeMethods.closest(this.tree, types), this.tree);
331
+ }
332
+
333
+ walk () {
334
+ marshalNode(this);
335
+ const cursor = NodeMethods.walk(this.tree);
336
+ cursor.tree = this.tree;
337
+ unmarshalNode(cursor.currentNode, this.tree);
338
+ return cursor;
339
+ }
340
+ }
341
+
342
+ /*
343
+ * Parser
344
+ */
345
+
346
+ const {parse, setLanguage} = Parser.prototype;
347
+ const languageSymbol = Symbol('parser.language');
348
+
349
+ Parser.prototype.setLanguage = function(language) {
350
+ if (this instanceof Parser && setLanguage) {
351
+ setLanguage.call(this, language);
352
+ }
353
+ this[languageSymbol] = language;
354
+ if (!language.nodeSubclasses) {
355
+ initializeLanguageNodeClasses(language)
356
+ }
357
+ return this;
358
+ };
359
+
360
+ Parser.prototype.getLanguage = function(_language) {
361
+ return this[languageSymbol] || null;
362
+ };
363
+
364
+ Parser.prototype.parse = function(input, oldTree, {bufferSize, includedRanges}={}) {
365
+ let getText, treeInput = input
366
+ if (typeof input === 'string') {
367
+ const inputString = input;
368
+ input = (offset, _position) => inputString.slice(offset)
369
+ getText = getTextFromString
370
+ } else {
371
+ getText = getTextFromFunction
372
+ }
373
+ const tree = this instanceof Parser && parse
374
+ ? parse.call(
375
+ this,
376
+ input,
377
+ oldTree,
378
+ bufferSize,
379
+ includedRanges,
380
+ )
381
+ : undefined;
382
+
383
+ if (tree) {
384
+ tree.input = treeInput
385
+ tree.getText = getText
386
+ tree.language = this.getLanguage()
387
+ }
388
+ return tree
389
+ };
390
+
391
+ /*
392
+ * TreeCursor
393
+ */
394
+
395
+ const {startPosition, endPosition, currentNode} = TreeCursor.prototype;
396
+
397
+ Object.defineProperties(TreeCursor.prototype, {
398
+ currentNode: {
399
+ get() {
400
+ if (this instanceof TreeCursor && currentNode) {
401
+ return unmarshalNode(currentNode.call(this), this.tree);
402
+ }
403
+ },
404
+ configurable: true
405
+ },
406
+ startPosition: {
407
+ get() {
408
+ if (this instanceof TreeCursor && startPosition) {
409
+ startPosition.call(this);
410
+ return unmarshalPoint();
411
+ }
412
+ },
413
+ configurable: true
414
+ },
415
+ endPosition: {
416
+ get() {
417
+ if (this instanceof TreeCursor && endPosition) {
418
+ endPosition.call(this);
419
+ return unmarshalPoint();
420
+ }
421
+ },
422
+ configurable: true
423
+ },
424
+ nodeText: {
425
+ get() {
426
+ return this.tree.getText(this)
427
+ },
428
+ configurable: true
429
+ }
430
+ });
431
+
432
+ /*
433
+ * Query
434
+ */
435
+
436
+ const {_matches, _captures} = Query.prototype;
437
+
438
+ const PREDICATE_STEP_TYPE = {
439
+ DONE: 0,
440
+ CAPTURE: 1,
441
+ STRING: 2,
442
+ }
443
+
444
+ const ZERO_POINT = { row: 0, column: 0 };
445
+
446
+ Query.prototype._init = function() {
447
+ /*
448
+ * Initialize predicate functions
449
+ * format: [type1, value1, type2, value2, ...]
450
+ */
451
+ const predicateDescriptions = this._getPredicates();
452
+ const patternCount = predicateDescriptions.length;
453
+
454
+ const setProperties = new Array(patternCount);
455
+ const assertedProperties = new Array(patternCount);
456
+ const refutedProperties = new Array(patternCount);
457
+ const predicates = new Array(patternCount);
458
+
459
+ const FIRST = 0
460
+ const SECOND = 2
461
+ const THIRD = 4
462
+
463
+ for (let i = 0; i < predicateDescriptions.length; i++) {
464
+ predicates[i] = [];
465
+
466
+ for (let j = 0; j < predicateDescriptions[i].length; j++) {
467
+
468
+ const steps = predicateDescriptions[i][j];
469
+ const stepsLength = steps.length / 2;
470
+
471
+ if (steps[FIRST] !== PREDICATE_STEP_TYPE.STRING) {
472
+ throw new Error('Predicates must begin with a literal value');
473
+ }
474
+
475
+ const operator = steps[FIRST + 1];
476
+
477
+ let isPositive = true;
478
+ let matchAll = true;
479
+ let captureName;
480
+ switch (operator) {
481
+ case 'any-not-eq?':
482
+ case 'not-eq?':
483
+ isPositive = false;
484
+ case 'any-eq?':
485
+ case 'eq?':
486
+ if (stepsLength !== 3) throw new Error(
487
+ `Wrong number of arguments to \`#eq?\` predicate. Expected 2, got ${stepsLength - 1}`
488
+ );
489
+ if (steps[SECOND] !== PREDICATE_STEP_TYPE.CAPTURE) throw new Error(
490
+ `First argument of \`#eq?\` predicate must be a capture. Got "${steps[SECOND + 1]}"`
491
+ );
492
+ matchAll = !operator.startsWith('any-');
493
+ if (steps[THIRD] === PREDICATE_STEP_TYPE.CAPTURE) {
494
+ const captureName1 = steps[SECOND + 1];
495
+ const captureName2 = steps[THIRD + 1];
496
+ predicates[i].push(function (captures) {
497
+ let nodes_1 = [];
498
+ let nodes_2 = [];
499
+ for (const c of captures) {
500
+ if (c.name === captureName1) nodes_1.push(c.node);
501
+ if (c.name === captureName2) nodes_2.push(c.node);
502
+ }
503
+ let compare = (n1, n2, positive) => {
504
+ return positive ?
505
+ n1.text === n2.text :
506
+ n1.text !== n2.text;
507
+ };
508
+ return matchAll
509
+ ? nodes_1.every(n1 => nodes_2.some(n2 => compare(n1, n2, isPositive)))
510
+ : nodes_1.some(n1 => nodes_2.some(n2 => compare(n1, n2, isPositive)));
511
+ });
512
+ } else {
513
+ captureName = steps[SECOND + 1];
514
+ const stringValue = steps[THIRD + 1];
515
+ let matches = (n) => n.text === stringValue;
516
+ let doesNotMatch = (n) => n.text !== stringValue;
517
+ predicates[i].push(function (captures) {
518
+ let nodes = [];
519
+ for (const c of captures) {
520
+ if (c.name === captureName) nodes.push(c.node);
521
+ }
522
+ let test = isPositive ? matches : doesNotMatch;
523
+ return matchAll
524
+ ? nodes.every(test)
525
+ : nodes.some(test);
526
+ });
527
+ }
528
+ break;
529
+
530
+ case 'any-not-match?':
531
+ case 'not-match?':
532
+ isPositive = false;
533
+ case 'any-match?':
534
+ case 'match?':
535
+ if (stepsLength !== 3) throw new Error(
536
+ `Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${stepsLength - 1}.`
537
+ );
538
+ if (steps[SECOND] !== PREDICATE_STEP_TYPE.CAPTURE) throw new Error(
539
+ `First argument of \`#match?\` predicate must be a capture. Got "${steps[SECOND + 1]}".`
540
+ );
541
+ if (steps[THIRD] !== PREDICATE_STEP_TYPE.STRING) throw new Error(
542
+ `Second argument of \`#match?\` predicate must be a string. Got @${steps[THIRD + 1]}.`
543
+ );
544
+ captureName = steps[SECOND + 1];
545
+ const regex = new RegExp(steps[THIRD + 1]);
546
+ matchAll = !operator.startsWith('any-');
547
+ predicates[i].push(function (captures) {
548
+ const nodes = [];
549
+ for (const c of captures) {
550
+ if (c.name === captureName) nodes.push(c.node.text);
551
+ }
552
+ let test = (text, positive) => {
553
+ return positive ?
554
+ regex.test(text) :
555
+ !regex.test(text);
556
+ };
557
+ if (nodes.length === 0) return !isPositive;
558
+ return matchAll
559
+ ? nodes.every(text => test(text, isPositive))
560
+ : nodes.some(text => test(text, isPositive))
561
+ });
562
+ break;
563
+
564
+ case 'set!':
565
+ if (stepsLength < 2 || stepsLength > 3) throw new Error(
566
+ `Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${stepsLength - 1}.`
567
+ );
568
+ if (steps.some((s, i) => (i % 2 !== 1) && s !== PREDICATE_STEP_TYPE.STRING)) throw new Error(
569
+ `Arguments to \`#set!\` predicate must be a strings.".`
570
+ );
571
+ if (!setProperties[i]) setProperties[i] = {};
572
+ setProperties[i][steps[SECOND + 1]] = steps[THIRD] ? steps[THIRD + 1] : null;
573
+ break;
574
+
575
+ case 'is?':
576
+ case 'is-not?':
577
+ if (stepsLength < 2 || stepsLength > 3) throw new Error(
578
+ `Wrong number of arguments to \`#${operator}\` predicate. Expected 1 or 2. Got ${stepsLength - 1}.`
579
+ );
580
+ if (steps.some((s, i) => (i % 2 !== 1) && s !== PREDICATE_STEP_TYPE.STRING)) throw new Error(
581
+ `Arguments to \`#${operator}\` predicate must be a strings.".`
582
+ );
583
+ const properties = operator === 'is?' ? assertedProperties : refutedProperties;
584
+ if (!properties[i]) properties[i] = {};
585
+ properties[i][steps[SECOND + 1]] = steps[THIRD] ? steps[THIRD + 1] : null;
586
+ break;
587
+
588
+ case 'not-any-of?':
589
+ isPositive = false;
590
+ case 'any-of?':
591
+ if (stepsLength < 2) throw new Error(
592
+ `Wrong number of arguments to \`#${operator}\` predicate. Expected at least 1. Got ${stepsLength - 1}.`
593
+ );
594
+ if (steps[SECOND] !== PREDICATE_STEP_TYPE.CAPTURE) throw new Error(
595
+ `First argument of \`#${operator}\` predicate must be a capture. Got "${steps[1].value}".`
596
+ );
597
+ const stringValues = [];
598
+ for (let k = THIRD; k < 2 * stepsLength; k += 2) {
599
+ if (steps[k] !== PREDICATE_STEP_TYPE.STRING) throw new Error(
600
+ `Arguments to \`#${operator}\` predicate must be a strings.".`
601
+ );
602
+ stringValues.push(steps[k + 1]);
603
+ }
604
+ captureName = steps[SECOND + 1];
605
+ predicates[i].push(function (captures) {
606
+ const nodes = [];
607
+ for (const c of captures) {
608
+ if (c.name === captureName) nodes.push(c.node.text);
609
+ }
610
+ if (nodes.length === 0) return !isPositive;
611
+ return nodes.every(text => stringValues.includes(text)) === isPositive;
612
+ });
613
+ break;
614
+
615
+ default:
616
+ throw new Error(`Unknown query predicate \`#${steps[FIRST + 1]}\``);
617
+ }
618
+ }
619
+ }
620
+
621
+ this.predicates = Object.freeze(predicates);
622
+ this.setProperties = Object.freeze(setProperties);
623
+ this.assertedProperties = Object.freeze(assertedProperties);
624
+ this.refutedProperties = Object.freeze(refutedProperties);
625
+ }
626
+
627
+ Query.prototype.matches = function(
628
+ node,
629
+ {
630
+ startPosition = ZERO_POINT,
631
+ endPosition = ZERO_POINT,
632
+ startIndex = 0,
633
+ endIndex = 0,
634
+ matchLimit = 0xFFFFFFFF,
635
+ maxStartDepth = 0xFFFFFFFF,
636
+ timeoutMicros = 0
637
+ } = {}
638
+ ) {
639
+ marshalNode(node);
640
+ const [returnedMatches, returnedNodes] = _matches.call(this, node.tree,
641
+ startPosition.row, startPosition.column,
642
+ endPosition.row, endPosition.column,
643
+ startIndex, endIndex, matchLimit, maxStartDepth, timeoutMicros
644
+ );
645
+ const nodes = unmarshalNodes(returnedNodes, node.tree);
646
+ const results = [];
647
+
648
+ let i = 0
649
+ let nodeIndex = 0;
650
+ while (i < returnedMatches.length) {
651
+ const patternIndex = returnedMatches[i++];
652
+ const captures = [];
653
+
654
+ while (i < returnedMatches.length && typeof returnedMatches[i] === 'string') {
655
+ const captureName = returnedMatches[i++];
656
+ captures.push({
657
+ name: captureName,
658
+ node: nodes[nodeIndex++],
659
+ })
660
+ }
661
+
662
+ if (this.predicates[patternIndex].every(p => p(captures))) {
663
+ const result = {pattern: patternIndex, captures};
664
+ const setProperties = this.setProperties[patternIndex];
665
+ const assertedProperties = this.assertedProperties[patternIndex];
666
+ const refutedProperties = this.refutedProperties[patternIndex];
667
+ if (setProperties) result.setProperties = setProperties;
668
+ if (assertedProperties) result.assertedProperties = assertedProperties;
669
+ if (refutedProperties) result.refutedProperties = refutedProperties;
670
+ results.push(result);
671
+ }
672
+ }
673
+
674
+ return results;
675
+ }
676
+
677
+ Query.prototype.captures = function(
678
+ node,
679
+ {
680
+ startPosition = ZERO_POINT,
681
+ endPosition = ZERO_POINT,
682
+ startIndex = 0,
683
+ endIndex = 0,
684
+ matchLimit = 0xFFFFFFFF,
685
+ maxStartDepth = 0xFFFFFFFF,
686
+ timeoutMicros = 0,
687
+ } = {}
688
+ ) {
689
+ marshalNode(node);
690
+ const [returnedMatches, returnedNodes] = _captures.call(this, node.tree,
691
+ startPosition.row, startPosition.column,
692
+ endPosition.row, endPosition.column,
693
+ startIndex, endIndex, matchLimit, maxStartDepth, timeoutMicros
694
+ );
695
+ const nodes = unmarshalNodes(returnedNodes, node.tree);
696
+ const results = [];
697
+
698
+ let i = 0
699
+ let nodeIndex = 0;
700
+ while (i < returnedMatches.length) {
701
+ const patternIndex = returnedMatches[i++];
702
+ const captureIndex = returnedMatches[i++];
703
+ const captures = [];
704
+
705
+ while (i < returnedMatches.length && typeof returnedMatches[i] === 'string') {
706
+ const captureName = returnedMatches[i++];
707
+ captures.push({
708
+ name: captureName,
709
+ node: nodes[nodeIndex++],
710
+ })
711
+ }
712
+
713
+ if (this.predicates[patternIndex].every(p => p(captures))) {
714
+ const result = captures[captureIndex];
715
+ const setProperties = this.setProperties[patternIndex];
716
+ const assertedProperties = this.assertedProperties[patternIndex];
717
+ const refutedProperties = this.refutedProperties[patternIndex];
718
+ if (setProperties) result.setProperties = setProperties;
719
+ if (assertedProperties) result.assertedProperties = assertedProperties;
720
+ if (refutedProperties) result.refutedProperties = refutedProperties;
721
+ results.push(result);
722
+ }
723
+ }
724
+
725
+ return results;
726
+ }
727
+
728
+ /*
729
+ * LookaheadIterator
730
+ */
731
+
732
+ LookaheadIterator.prototype[Symbol.iterator] = function() {
733
+ const self = this;
734
+ return {
735
+ next() {
736
+ if (self._next()) {
737
+ return {done: false, value: self.currentType};
738
+ }
739
+
740
+ return {done: true, value: ''};
741
+ },
742
+ };
743
+ }
744
+
745
+ /*
746
+ * Other functions
747
+ */
748
+
749
+ function getTextFromString (node) {
750
+ return this.input.substring(node.startIndex, node.endIndex);
751
+ }
752
+
753
+ function getTextFromFunction ({startIndex, endIndex}) {
754
+ const {input} = this
755
+ let result = '';
756
+ const goalLength = endIndex - startIndex;
757
+ while (result.length < goalLength) {
758
+ const text = input(startIndex + result.length);
759
+ result += text;
760
+ }
761
+ return result.slice(0, goalLength);
762
+ }
763
+
764
+ const {pointTransferArray} = binding;
765
+
766
+ const NODE_FIELD_COUNT = 6;
767
+ const ERROR_TYPE_ID = 0xFFFF
768
+
769
+ function getID(buffer, offset) {
770
+ const low = BigInt(buffer[offset]);
771
+ const high = BigInt(buffer[offset + 1]);
772
+ return (high << 32n) + low;
773
+ }
774
+
775
+ function unmarshalNode(value, tree, offset = 0, cache = null) {
776
+ /* case 1: node from the tree cache */
777
+ if (typeof value === 'object') {
778
+ const node = value;
779
+ return node;
780
+ }
781
+
782
+ /* case 2: node being transferred */
783
+ const nodeTypeId = value;
784
+ const NodeClass = nodeTypeId === ERROR_TYPE_ID
785
+ ? SyntaxNode
786
+ : tree.language.nodeSubclasses[nodeTypeId];
787
+
788
+ const {nodeTransferArray} = binding;
789
+ const id = getID(nodeTransferArray, offset)
790
+ if (id === 0n) {
791
+ return null
792
+ }
793
+
794
+ let cachedResult;
795
+ if (cache && (cachedResult = cache.get(id)))
796
+ return cachedResult;
797
+
798
+ const result = new NodeClass(tree);
799
+ for (let i = 0; i < NODE_FIELD_COUNT; i++) {
800
+ result[i] = nodeTransferArray[offset + i];
801
+ }
802
+
803
+ if (cache)
804
+ cache.set(id, result);
805
+ else
806
+ tree._cacheNode(result);
807
+
808
+ return result;
809
+ }
810
+
811
+ function unmarshalNodes(nodes, tree) {
812
+ const cache = new Map();
813
+
814
+ let offset = 0;
815
+ for (let i = 0, {length} = nodes; i < length; i++) {
816
+ const node = unmarshalNode(nodes[i], tree, offset, cache);
817
+ if (node !== nodes[i]) {
818
+ nodes[i] = node;
819
+ offset += NODE_FIELD_COUNT
820
+ }
821
+ }
822
+
823
+ tree._cacheNodes(Array.from(cache.values()));
824
+
825
+ return nodes;
826
+ }
827
+
828
+ function marshalNode(node, offset = 0) {
829
+ if (!(node.tree instanceof Tree)) {
830
+ throw new TypeError("SyntaxNode must belong to a Tree")
831
+ }
832
+ const { nodeTransferArray } = binding;
833
+ for (let i = 0; i < NODE_FIELD_COUNT; i++) {
834
+ nodeTransferArray[offset * NODE_FIELD_COUNT + i] = node[i];
835
+ }
836
+ }
837
+
838
+ function marshalNodes(nodes) {
839
+ for (let i = 0, { length } = nodes; i < length; i++) {
840
+ marshalNode(nodes[i], i);
841
+ }
842
+ }
843
+
844
+ function unmarshalPoint() {
845
+ return {row: pointTransferArray[0], column: pointTransferArray[1]};
846
+ }
847
+
848
+ function pointToString(point) {
849
+ return `{row: ${point.row}, column: ${point.column}}`;
850
+ }
851
+
852
+ function initializeLanguageNodeClasses(language) {
853
+ const nodeTypeNamesById = binding.getNodeTypeNamesById(language);
854
+ const nodeFieldNamesById = binding.getNodeFieldNamesById(language);
855
+ const nodeTypeInfo = language.nodeTypeInfo || [];
856
+
857
+ const nodeSubclasses = [];
858
+ for (let id = 0, n = nodeTypeNamesById.length; id < n; id++) {
859
+ nodeSubclasses[id] = SyntaxNode;
860
+
861
+ const typeName = nodeTypeNamesById[id];
862
+ if (!typeName) continue;
863
+
864
+ const typeInfo = nodeTypeInfo.find(info => info.named && info.type === typeName);
865
+ if (!typeInfo) continue;
866
+
867
+ const fieldNames = [];
868
+ let classBody = '\n';
869
+ if (typeInfo.fields) {
870
+ for (const fieldName in typeInfo.fields) {
871
+ const fieldId = nodeFieldNamesById.indexOf(fieldName);
872
+ if (fieldId === -1) continue;
873
+ if (typeInfo.fields[fieldName].multiple) {
874
+ const getterName = camelCase(fieldName) + 'Nodes';
875
+ fieldNames.push(getterName);
876
+ classBody += `
877
+ get ${getterName}() {
878
+ marshalNode(this);
879
+ return unmarshalNodes(NodeMethods.childNodesForFieldId(this.tree, ${fieldId}), this.tree);
880
+ }
881
+ `.replace(/\s+/g, ' ') + '\n';
882
+ } else {
883
+ const getterName = camelCase(fieldName, false) + 'Node';
884
+ fieldNames.push(getterName);
885
+ classBody += `
886
+ get ${getterName}() {
887
+ marshalNode(this);
888
+ return unmarshalNode(NodeMethods.childNodeForFieldId(this.tree, ${fieldId}), this.tree);
889
+ }
890
+ `.replace(/\s+/g, ' ') + '\n';
891
+ }
892
+ }
893
+ }
894
+
895
+ const className = camelCase(typeName, true) + 'Node';
896
+ const nodeSubclass = eval(`class ${className} extends SyntaxNode {${classBody}}; ${className}`);
897
+ nodeSubclass.prototype.type = typeName;
898
+ nodeSubclass.prototype.fields = Object.freeze(fieldNames.sort())
899
+ nodeSubclasses[id] = nodeSubclass;
900
+ }
901
+
902
+ language.nodeSubclasses = nodeSubclasses
903
+ }
904
+
905
+ function camelCase(name, upperCase) {
906
+ name = name.replace(/_(\w)/g, (_match, letter) => letter.toUpperCase());
907
+ if (upperCase) name = name[0].toUpperCase() + name.slice(1);
908
+ return name;
909
+ }
910
+
911
+ module.exports = Parser;
912
+ module.exports.Query = Query;
913
+ module.exports.Tree = Tree;
914
+ module.exports.SyntaxNode = SyntaxNode;
915
+ module.exports.TreeCursor = TreeCursor;
916
+ module.exports.LookaheadIterator = LookaheadIterator;