nolo-cli 0.143.0-alpha.1 → 0.145.0-alpha.1

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 (455) hide show
  1. package/README.md +2 -0
  2. package/{_executeModel-QK43QR2R.js → _executeModel-M3FASQ2Z.js} +18 -17
  3. package/{agentDeleteCommand-SE4WUIRR.js → agentDeleteCommand-K7GCEEVS.js} +10 -9
  4. package/{agentEmailCommands-LW5JMYH2.js → agentEmailCommands-MNXRO36L.js} +24 -23
  5. package/{agentListCommands-LGZG2OQR.js → agentListCommands-KMZR6VVM.js} +12 -11
  6. package/{agentMachineCommands-BNOXYSPZ.js → agentMachineCommands-75TIBYDY.js} +10 -9
  7. package/{agentProviderCommands-AOG3OZJA.js → agentProviderCommands-TWB6E5WD.js} +1 -1
  8. package/{agentRecordCommands-W5ZXPHZV.js → agentRecordCommands-RDO5L3N4.js} +23 -22
  9. package/{agentRunCommand-VRLCL57M.js → agentRunCommand-FVJJPL27.js} +23 -22
  10. package/{agentRuntimeLocal-VOQ3UYZB.js → agentRuntimeLocal-DAK7RCER.js} +8 -7
  11. package/{agentSlice-4AK24F5F.js → agentSlice-6MRJR2BJ.js} +1 -1
  12. package/{appDeleteCommands-XWAIUHTN.js → appDeleteCommands-JMMXK3XT.js} +11 -10
  13. package/{appDeployCommands-CBJJCUMG.js → appDeployCommands-JFU6GALI.js} +11 -10
  14. package/{appDeployStatusCommands-LTTZTJQS.js → appDeployStatusCommands-AXTZ4GAN.js} +11 -10
  15. package/{appGetCommands-QHUB7MFF.js → appGetCommands-CR2W3DCM.js} +11 -10
  16. package/{appListCommands-HINIDJE7.js → appListCommands-2TV6P3EU.js} +11 -10
  17. package/{authCommand-LARLQ3GC.js → authCommand-UBJ4EWYZ.js} +6 -6
  18. package/{authCommands-GBIFZWD3.js → authCommands-H6WKKCRW.js} +1 -1
  19. package/{builtinSkillRegistry-AFPSTTAU.js → builtinSkillRegistry-ZMF6YGNO.js} +4 -3
  20. package/{chatQueueReduxAdapter-KIQ3FQ62.js → chatQueueReduxAdapter-CDOHVTSE.js} +2 -2
  21. package/{chromeCommands-NKU3OWKH.js → chromeCommands-2N6MEWRU.js} +94 -23
  22. package/{chromeOpsCommands-OQDJGD4Y.js → chromeOpsCommands-IXRLN57H.js} +4 -3
  23. package/{chunk-7MUSNQ6E.js → chunk-27ONFIEY.js} +20 -2
  24. package/{chunk-OZ6V53WV.js → chunk-2EE5UD3N.js} +1 -1
  25. package/{chunk-44QZPYLI.js → chunk-2SYTUTLI.js} +92 -20
  26. package/{chunk-DID5AVGT.js → chunk-2TKVOEQF.js} +11 -10
  27. package/chunk-5J3PYNUP.js +255 -0
  28. package/{chunk-OUOJE2P2.js → chunk-5XYFIDFU.js} +5 -5
  29. package/{chunk-WTUVMKSQ.js → chunk-62XHRZG4.js} +2 -2
  30. package/{chunk-WC6A2Q7S.js → chunk-6TPOEJMQ.js} +5 -2
  31. package/{chunk-RRMAZ2BI.js → chunk-7NANRWL4.js} +1 -1
  32. package/{chunk-44F6KKUE.js → chunk-7YAK46ML.js} +3 -3
  33. package/{chunk-NOGH7HCP.js → chunk-A6FNUMCF.js} +47 -6
  34. package/{chunk-OFYHCA6W.js → chunk-AATZZAZE.js} +1 -1
  35. package/{chunk-KUPDS66Q.js → chunk-ANX7Z7Z2.js} +8 -8
  36. package/{chunk-J5H6SUOW.js → chunk-B2XUQXQX.js} +2 -2
  37. package/{chunk-A5MB5RIT.js → chunk-CCOXTK3I.js} +1 -1
  38. package/chunk-GNMAFAIS.js +29 -0
  39. package/{chunk-GZQNKKDG.js → chunk-HKBFZONG.js} +1 -1
  40. package/{chunk-7LLWEG6F.js → chunk-I44MDY73.js} +3 -3
  41. package/{chunk-QDT5T7MK.js → chunk-I4OPU5TK.js} +1 -1
  42. package/{chunk-VPFEPRME.js → chunk-IVZJWTDI.js} +3 -0
  43. package/{chunk-CTGZO35O.js → chunk-JLQKV2ZJ.js} +2 -2
  44. package/{chunk-PQVOC2CZ.js → chunk-M2YBIBBS.js} +1 -1
  45. package/{chunk-ZOI6KA4N.js → chunk-M76SRQ3H.js} +34 -22
  46. package/{chunk-K25DK52L.js → chunk-OKSJZ4UU.js} +21 -223
  47. package/{chunk-U5QTKTZE.js → chunk-P6GMCCAT.js} +1 -1
  48. package/{chunk-L6RB42ZR.js → chunk-QFZM5BFI.js} +3 -3
  49. package/{chunk-GH4MH73K.js → chunk-RHDOQWXZ.js} +175 -17
  50. package/{chunk-M6NK74VP.js → chunk-S5XGT6GB.js} +1 -1
  51. package/{chunk-KUWT3C2P.js → chunk-T76D3OYX.js} +1 -1
  52. package/{chunk-MXRUAINC.js → chunk-UMB7CHAY.js} +3 -3
  53. package/{chunk-VVUSRF5D.js → chunk-VJ4FUWPC.js} +3 -3
  54. package/{chunk-T36EFAW7.js → chunk-VZVTPDPL.js} +3 -3
  55. package/{chunk-AAROOKLX.js → chunk-X2QRZXZH.js} +1 -1
  56. package/{chunk-WYYO2YOL.js → chunk-XNXNHAAP.js} +1 -1
  57. package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
  58. package/{chunk-DOBBRISY.js → chunk-Y6XHJ4JJ.js} +22 -10
  59. package/{chunk-W247GBSQ.js → chunk-YU2THNST.js} +1 -1
  60. package/{chunk-OY5IJI2N.js → chunk-YUNJN43V.js} +23 -3
  61. package/{commandRegistry-DETYXF5I.js → commandRegistry-ZF6YXQWV.js} +76 -65
  62. package/{contentThunks-6QBTPLWT.js → contentThunks-6Y6ATG3A.js} +3 -3
  63. package/{createAgentAutomationAction-TZVIJTZ7.js → createAgentAutomationAction-OQTLA2FC.js} +3 -3
  64. package/{createDialogAction-KTDAEA42.js → createDialogAction-IF5EZMBD.js} +6 -5
  65. package/{createPageAction-4RASVDAU.js → createPageAction-GU766R3L.js} +3 -3
  66. package/{dialogCommands-GY7LRERG.js → dialogCommands-QV7XAX2V.js} +11 -10
  67. package/{dialogSlice-J24APUGG.js → dialogSlice-CVHMDSVV.js} +2 -2
  68. package/{docCreateCommands-T7KII3WP.js → docCreateCommands-FSBANQTO.js} +10 -9
  69. package/{docDeleteCommands-SQ26EFE6.js → docDeleteCommands-4IR4YSGU.js} +11 -10
  70. package/{docReadCommands-I6NA2ZKV.js → docReadCommands-4EYPGUE3.js} +10 -9
  71. package/{docStore-SPOGE7K3.js → docStore-RQOWPNON.js} +1 -1
  72. package/{docUpdateCommands-IG43SZ6U.js → docUpdateCommands-RW2BYLSE.js} +10 -9
  73. package/{handleSendMessageAction-I2IN64DS.js → handleSendMessageAction-UDTPG5WK.js} +4 -3
  74. package/index.js +4 -4
  75. package/{machineCommands-U7VABJPW.js → machineCommands-WBQ4TCPD.js} +22 -21
  76. package/{machineWsRunDispatch-ZNU6LRNG.js → machineWsRunDispatch-7DNDXUOS.js} +22 -21
  77. package/node_modules/abstract-level/CHANGELOG.md +150 -0
  78. package/node_modules/abstract-level/LICENSE +21 -0
  79. package/node_modules/abstract-level/README.md +1957 -0
  80. package/node_modules/abstract-level/UPGRADING.md +669 -0
  81. package/node_modules/abstract-level/abstract-chained-batch.js +397 -0
  82. package/node_modules/abstract-level/abstract-iterator.js +404 -0
  83. package/node_modules/abstract-level/abstract-level.js +1127 -0
  84. package/node_modules/abstract-level/abstract-snapshot.js +84 -0
  85. package/node_modules/abstract-level/index.d.ts +52 -0
  86. package/node_modules/abstract-level/index.js +9 -0
  87. package/node_modules/abstract-level/lib/abstract-sublevel-iterator.js +141 -0
  88. package/node_modules/abstract-level/lib/abstract-sublevel.js +290 -0
  89. package/node_modules/abstract-level/lib/common.js +33 -0
  90. package/node_modules/abstract-level/lib/default-chained-batch.js +29 -0
  91. package/node_modules/abstract-level/lib/default-kv-iterator.js +74 -0
  92. package/node_modules/abstract-level/lib/deferred-iterator.js +110 -0
  93. package/node_modules/abstract-level/lib/deferred-queue.js +84 -0
  94. package/node_modules/abstract-level/lib/errors.js +21 -0
  95. package/node_modules/abstract-level/lib/event-monitor.js +30 -0
  96. package/node_modules/abstract-level/lib/hooks.js +78 -0
  97. package/node_modules/abstract-level/lib/prefixes.js +21 -0
  98. package/node_modules/abstract-level/lib/prewrite-batch.js +96 -0
  99. package/node_modules/abstract-level/lib/range-options.js +26 -0
  100. package/node_modules/abstract-level/package.json +66 -0
  101. package/node_modules/abstract-level/test/async-iterator-test.js +132 -0
  102. package/node_modules/abstract-level/test/batch-test.js +214 -0
  103. package/node_modules/abstract-level/test/chained-batch-test.js +315 -0
  104. package/node_modules/abstract-level/test/clear-range-test.js +262 -0
  105. package/node_modules/abstract-level/test/clear-test.js +110 -0
  106. package/node_modules/abstract-level/test/common.js +90 -0
  107. package/node_modules/abstract-level/test/deferred-open-test.js +209 -0
  108. package/node_modules/abstract-level/test/del-test.js +65 -0
  109. package/node_modules/abstract-level/test/encoding-buffer-test.js +336 -0
  110. package/node_modules/abstract-level/test/encoding-custom-test.js +92 -0
  111. package/node_modules/abstract-level/test/encoding-decode-error-test.js +85 -0
  112. package/node_modules/abstract-level/test/encoding-json-test.js +75 -0
  113. package/node_modules/abstract-level/test/encoding-test.js +130 -0
  114. package/node_modules/abstract-level/test/events/write.js +132 -0
  115. package/node_modules/abstract-level/test/factory-test.js +36 -0
  116. package/node_modules/abstract-level/test/get-many-test.js +157 -0
  117. package/node_modules/abstract-level/test/get-sync-test.js +61 -0
  118. package/node_modules/abstract-level/test/get-test.js +83 -0
  119. package/node_modules/abstract-level/test/has-many-test.js +144 -0
  120. package/node_modules/abstract-level/test/has-test.js +81 -0
  121. package/node_modules/abstract-level/test/hooks/newsub.js +57 -0
  122. package/node_modules/abstract-level/test/hooks/postopen.js +229 -0
  123. package/node_modules/abstract-level/test/hooks/prewrite.js +816 -0
  124. package/node_modules/abstract-level/test/hooks/shared.js +38 -0
  125. package/node_modules/abstract-level/test/index.js +86 -0
  126. package/node_modules/abstract-level/test/iterator-explicit-snapshot-test.js +393 -0
  127. package/node_modules/abstract-level/test/iterator-no-snapshot-test.js +49 -0
  128. package/node_modules/abstract-level/test/iterator-range-test.js +277 -0
  129. package/node_modules/abstract-level/test/iterator-seek-test.js +335 -0
  130. package/node_modules/abstract-level/test/iterator-snapshot-test.js +56 -0
  131. package/node_modules/abstract-level/test/iterator-test.js +621 -0
  132. package/node_modules/abstract-level/test/manifest-test.js +21 -0
  133. package/node_modules/abstract-level/test/open-create-if-missing-test.js +39 -0
  134. package/node_modules/abstract-level/test/open-error-if-exists-test.js +25 -0
  135. package/node_modules/abstract-level/test/open-test.js +263 -0
  136. package/node_modules/abstract-level/test/put-get-del-test.js +97 -0
  137. package/node_modules/abstract-level/test/put-test.js +70 -0
  138. package/node_modules/abstract-level/test/self/abstract-iterator-test.js +182 -0
  139. package/node_modules/abstract-level/test/self/async-iterator-test.js +242 -0
  140. package/node_modules/abstract-level/test/self/attach-resource-test.js +74 -0
  141. package/node_modules/abstract-level/test/self/defer-test.js +140 -0
  142. package/node_modules/abstract-level/test/self/deferred-iterator-test.js +314 -0
  143. package/node_modules/abstract-level/test/self/deferred-operations-test.js +86 -0
  144. package/node_modules/abstract-level/test/self/deferred-queue-test.js +93 -0
  145. package/node_modules/abstract-level/test/self/encoding-test.js +391 -0
  146. package/node_modules/abstract-level/test/self/errors-test.js +11 -0
  147. package/node_modules/abstract-level/test/self/iterator-test.js +1050 -0
  148. package/node_modules/abstract-level/test/self/sublevel-test.js +1039 -0
  149. package/node_modules/abstract-level/test/self.js +905 -0
  150. package/node_modules/abstract-level/test/sublevel-test.js +209 -0
  151. package/node_modules/abstract-level/test/traits/closed.js +42 -0
  152. package/node_modules/abstract-level/test/traits/index.js +4 -0
  153. package/node_modules/abstract-level/test/traits/open.js +62 -0
  154. package/node_modules/abstract-level/test/util.js +275 -0
  155. package/node_modules/abstract-level/types/abstract-chained-batch.d.ts +124 -0
  156. package/node_modules/abstract-level/types/abstract-iterator.d.ts +241 -0
  157. package/node_modules/abstract-level/types/abstract-level.d.ts +636 -0
  158. package/node_modules/abstract-level/types/abstract-snapshot.d.ts +30 -0
  159. package/node_modules/abstract-level/types/abstract-sublevel.d.ts +76 -0
  160. package/node_modules/abstract-level/types/interfaces.d.ts +43 -0
  161. package/node_modules/base64-js/LICENSE +21 -0
  162. package/node_modules/base64-js/README.md +34 -0
  163. package/node_modules/base64-js/base64js.min.js +1 -0
  164. package/node_modules/base64-js/index.d.ts +3 -0
  165. package/node_modules/base64-js/index.js +150 -0
  166. package/node_modules/base64-js/package.json +47 -0
  167. package/node_modules/browser-level/CHANGELOG.md +44 -0
  168. package/node_modules/browser-level/LICENSE +21 -0
  169. package/node_modules/browser-level/README.md +124 -0
  170. package/node_modules/browser-level/UPGRADING.md +143 -0
  171. package/node_modules/browser-level/index.d.ts +108 -0
  172. package/node_modules/browser-level/index.js +323 -0
  173. package/node_modules/browser-level/iterator.js +239 -0
  174. package/node_modules/browser-level/package.json +48 -0
  175. package/node_modules/browser-level/util/clear.js +38 -0
  176. package/node_modules/browser-level/util/deserialize.js +17 -0
  177. package/node_modules/browser-level/util/key-range.js +20 -0
  178. package/node_modules/buffer/AUTHORS.md +73 -0
  179. package/node_modules/buffer/LICENSE +21 -0
  180. package/node_modules/buffer/README.md +410 -0
  181. package/node_modules/buffer/index.d.ts +194 -0
  182. package/node_modules/buffer/index.js +2106 -0
  183. package/node_modules/buffer/package.json +93 -0
  184. package/node_modules/classic-level/CHANGELOG.md +115 -0
  185. package/node_modules/classic-level/LICENSE +21 -0
  186. package/node_modules/classic-level/README.md +274 -0
  187. package/node_modules/classic-level/UPGRADING.md +131 -0
  188. package/node_modules/classic-level/binding.cc +2652 -0
  189. package/node_modules/classic-level/binding.gyp +71 -0
  190. package/node_modules/classic-level/binding.js +1 -0
  191. package/node_modules/classic-level/chained-batch.js +35 -0
  192. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/LICENSE +27 -0
  193. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/Makefile +424 -0
  194. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/build_detect_platform +256 -0
  195. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/autocompact_test.cc +118 -0
  196. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/builder.cc +88 -0
  197. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/builder.h +34 -0
  198. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/c.cc +595 -0
  199. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/c_test.c +390 -0
  200. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/corruption_test.cc +374 -0
  201. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_bench.cc +1020 -0
  202. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_impl.cc +1568 -0
  203. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_impl.h +212 -0
  204. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_iter.cc +317 -0
  205. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_iter.h +28 -0
  206. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/db_test.cc +2158 -0
  207. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dbformat.cc +140 -0
  208. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dbformat.h +230 -0
  209. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dbformat_test.cc +112 -0
  210. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/dumpfile.cc +225 -0
  211. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/fault_injection_test.cc +554 -0
  212. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/filename.cc +144 -0
  213. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/filename.h +85 -0
  214. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/filename_test.cc +123 -0
  215. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/leveldbutil.cc +64 -0
  216. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_format.h +35 -0
  217. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_reader.cc +284 -0
  218. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_reader.h +113 -0
  219. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_test.cc +591 -0
  220. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_writer.cc +112 -0
  221. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/log_writer.h +54 -0
  222. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/memtable.cc +145 -0
  223. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/memtable.h +89 -0
  224. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/recovery_test.cc +324 -0
  225. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/repair.cc +461 -0
  226. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/skiplist.h +384 -0
  227. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/skiplist_test.cc +378 -0
  228. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/snapshot.h +67 -0
  229. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/table_cache.cc +127 -0
  230. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/table_cache.h +61 -0
  231. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_edit.cc +266 -0
  232. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_edit.h +107 -0
  233. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_edit_test.cc +46 -0
  234. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_set.cc +1535 -0
  235. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_set.h +399 -0
  236. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/version_set_test.cc +179 -0
  237. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/write_batch.cc +147 -0
  238. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/write_batch_internal.h +50 -0
  239. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/db/write_batch_test.cc +120 -0
  240. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/helpers/memenv/memenv.cc +398 -0
  241. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/helpers/memenv/memenv.h +20 -0
  242. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/helpers/memenv/memenv_test.cc +241 -0
  243. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/c.h +290 -0
  244. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/cache.h +110 -0
  245. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/comparator.h +63 -0
  246. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/db.h +164 -0
  247. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/dumpfile.h +25 -0
  248. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/env.h +351 -0
  249. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/filter_policy.h +70 -0
  250. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/iterator.h +100 -0
  251. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/options.h +213 -0
  252. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/slice.h +109 -0
  253. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/status.h +112 -0
  254. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/table.h +85 -0
  255. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/table_builder.h +92 -0
  256. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/value_sink.h +26 -0
  257. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/include/leveldb/write_batch.h +64 -0
  258. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/issues/issue178_test.cc +92 -0
  259. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/issues/issue200_test.cc +59 -0
  260. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/atomic_pointer.h +242 -0
  261. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port.h +21 -0
  262. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_example.h +141 -0
  263. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_posix.cc +53 -0
  264. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_posix.h +156 -0
  265. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/port_posix_sse.cc +129 -0
  266. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/thread_annotations.h +60 -0
  267. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/port/win/stdint.h +24 -0
  268. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block.cc +268 -0
  269. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block.h +44 -0
  270. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block_builder.cc +109 -0
  271. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/block_builder.h +57 -0
  272. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/filter_block.cc +111 -0
  273. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/filter_block.h +68 -0
  274. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/filter_block_test.cc +128 -0
  275. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/format.cc +144 -0
  276. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/format.h +108 -0
  277. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/iterator.cc +67 -0
  278. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/iterator_wrapper.h +66 -0
  279. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/merger.cc +197 -0
  280. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/merger.h +26 -0
  281. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/table.cc +285 -0
  282. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/table_builder.cc +270 -0
  283. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/table_test.cc +876 -0
  284. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/two_level_iterator.cc +182 -0
  285. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/table/two_level_iterator.h +34 -0
  286. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/arena.cc +68 -0
  287. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/arena.h +68 -0
  288. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/arena_test.cc +68 -0
  289. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/bloom.cc +95 -0
  290. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/bloom_test.cc +162 -0
  291. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/cache.cc +405 -0
  292. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/cache_test.cc +226 -0
  293. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/coding.cc +194 -0
  294. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/coding.h +104 -0
  295. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/coding_test.cc +196 -0
  296. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/comparator.cc +81 -0
  297. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/crc32c.cc +350 -0
  298. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/crc32c.h +45 -0
  299. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/crc32c_test.cc +72 -0
  300. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env.cc +100 -0
  301. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_posix.cc +695 -0
  302. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_posix_test.cc +66 -0
  303. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_posix_test_helper.h +28 -0
  304. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/env_test.cc +106 -0
  305. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/filter_policy.cc +11 -0
  306. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/hash.cc +52 -0
  307. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/hash.h +19 -0
  308. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/hash_test.cc +54 -0
  309. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/histogram.cc +139 -0
  310. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/histogram.h +42 -0
  311. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/logging.cc +72 -0
  312. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/logging.h +43 -0
  313. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/mutexlock.h +41 -0
  314. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/options.cc +30 -0
  315. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/posix_logger.h +98 -0
  316. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/random.h +64 -0
  317. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/status.cc +75 -0
  318. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testharness.cc +77 -0
  319. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testharness.h +138 -0
  320. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testutil.cc +51 -0
  321. package/node_modules/classic-level/deps/leveldb/leveldb-1.20/util/testutil.h +63 -0
  322. package/node_modules/classic-level/deps/leveldb/leveldb.gyp +282 -0
  323. package/node_modules/classic-level/deps/leveldb/patches/001-value-sink.patch +164 -0
  324. package/node_modules/classic-level/deps/leveldb/port-libuv/atomic_pointer_win.h +48 -0
  325. package/node_modules/classic-level/deps/leveldb/port-libuv/env_win.cc +692 -0
  326. package/node_modules/classic-level/deps/leveldb/port-libuv/port_uv.cc +36 -0
  327. package/node_modules/classic-level/deps/leveldb/port-libuv/port_uv.h +157 -0
  328. package/node_modules/classic-level/deps/leveldb/port-libuv/port_uv.h.bak +153 -0
  329. package/node_modules/classic-level/deps/leveldb/port-libuv/stdint-msvc2008.h +247 -0
  330. package/node_modules/classic-level/deps/leveldb/port-libuv/uv_condvar.h +45 -0
  331. package/node_modules/classic-level/deps/leveldb/port-libuv/uv_condvar_posix.cc +139 -0
  332. package/node_modules/classic-level/deps/leveldb/port-libuv/win_logger.cc +79 -0
  333. package/node_modules/classic-level/deps/leveldb/port-libuv/win_logger.h +28 -0
  334. package/node_modules/classic-level/deps/snappy/freebsd/config.h +135 -0
  335. package/node_modules/classic-level/deps/snappy/freebsd/snappy-stubs-public.h +100 -0
  336. package/node_modules/classic-level/deps/snappy/linux/config.h +135 -0
  337. package/node_modules/classic-level/deps/snappy/linux/snappy-stubs-public.h +100 -0
  338. package/node_modules/classic-level/deps/snappy/mac/config.h +137 -0
  339. package/node_modules/classic-level/deps/snappy/mac/snappy-stubs-public.h +100 -0
  340. package/node_modules/classic-level/deps/snappy/openbsd/config.h +135 -0
  341. package/node_modules/classic-level/deps/snappy/openbsd/snappy-stubs-public.h +100 -0
  342. package/node_modules/classic-level/deps/snappy/snappy/COPYING +54 -0
  343. package/node_modules/classic-level/deps/snappy/snappy/cmake/SnappyConfig.cmake +1 -0
  344. package/node_modules/classic-level/deps/snappy/snappy/cmake/config.h.in +62 -0
  345. package/node_modules/classic-level/deps/snappy/snappy/snappy-c.cc +90 -0
  346. package/node_modules/classic-level/deps/snappy/snappy/snappy-c.h +138 -0
  347. package/node_modules/classic-level/deps/snappy/snappy/snappy-internal.h +224 -0
  348. package/node_modules/classic-level/deps/snappy/snappy/snappy-sinksource.cc +104 -0
  349. package/node_modules/classic-level/deps/snappy/snappy/snappy-sinksource.h +182 -0
  350. package/node_modules/classic-level/deps/snappy/snappy/snappy-stubs-internal.cc +42 -0
  351. package/node_modules/classic-level/deps/snappy/snappy/snappy-stubs-internal.h +561 -0
  352. package/node_modules/classic-level/deps/snappy/snappy/snappy-stubs-public.h.in +94 -0
  353. package/node_modules/classic-level/deps/snappy/snappy/snappy-test.cc +612 -0
  354. package/node_modules/classic-level/deps/snappy/snappy/snappy-test.h +573 -0
  355. package/node_modules/classic-level/deps/snappy/snappy/snappy.cc +1515 -0
  356. package/node_modules/classic-level/deps/snappy/snappy/snappy.h +203 -0
  357. package/node_modules/classic-level/deps/snappy/snappy/snappy_unittest.cc +1410 -0
  358. package/node_modules/classic-level/deps/snappy/snappy.gyp +119 -0
  359. package/node_modules/classic-level/deps/snappy/solaris/config.h +135 -0
  360. package/node_modules/classic-level/deps/snappy/solaris/snappy-stubs-public.h +100 -0
  361. package/node_modules/classic-level/deps/snappy/win32/config.h +29 -0
  362. package/node_modules/classic-level/deps/snappy/win32/snappy-stubs-public.h +100 -0
  363. package/node_modules/classic-level/index.d.ts +343 -0
  364. package/node_modules/classic-level/index.js +311 -0
  365. package/node_modules/classic-level/iterator.js +122 -0
  366. package/node_modules/classic-level/package.json +70 -0
  367. package/node_modules/classic-level/prebuilds/android-arm/classic-level.armv7.node +0 -0
  368. package/node_modules/classic-level/prebuilds/android-arm64/classic-level.armv8.node +0 -0
  369. package/node_modules/classic-level/prebuilds/darwin-x64+arm64/classic-level.node +0 -0
  370. package/node_modules/classic-level/prebuilds/linux-arm/classic-level.armv6.node +0 -0
  371. package/node_modules/classic-level/prebuilds/linux-arm/classic-level.armv7.node +0 -0
  372. package/node_modules/classic-level/prebuilds/linux-arm64/classic-level.armv8.node +0 -0
  373. package/node_modules/classic-level/prebuilds/linux-x64/classic-level.musl.node +0 -0
  374. package/node_modules/classic-level/prebuilds/linux-x64/classic-level.node +0 -0
  375. package/node_modules/classic-level/prebuilds/win32-ia32/classic-level.node +0 -0
  376. package/node_modules/classic-level/prebuilds/win32-x64/classic-level.node +0 -0
  377. package/node_modules/ieee754/LICENSE +11 -0
  378. package/node_modules/ieee754/README.md +51 -0
  379. package/node_modules/ieee754/index.d.ts +10 -0
  380. package/node_modules/ieee754/index.js +85 -0
  381. package/node_modules/ieee754/package.json +52 -0
  382. package/node_modules/is-buffer/LICENSE +21 -0
  383. package/node_modules/is-buffer/README.md +54 -0
  384. package/node_modules/is-buffer/index.d.ts +2 -0
  385. package/node_modules/is-buffer/index.js +11 -0
  386. package/node_modules/is-buffer/package.json +65 -0
  387. package/node_modules/level/CHANGELOG.md +532 -0
  388. package/node_modules/level/LICENSE +21 -0
  389. package/node_modules/level/README.md +107 -0
  390. package/node_modules/level/UPGRADING.md +413 -0
  391. package/node_modules/level/browser.js +1 -0
  392. package/node_modules/level/index.d.ts +75 -0
  393. package/node_modules/level/index.js +1 -0
  394. package/node_modules/level/package.json +62 -0
  395. package/node_modules/level-supports/CHANGELOG.md +140 -0
  396. package/node_modules/level-supports/LICENSE +21 -0
  397. package/node_modules/level-supports/README.md +276 -0
  398. package/node_modules/level-supports/index.d.ts +137 -0
  399. package/node_modules/level-supports/index.js +26 -0
  400. package/node_modules/level-supports/package.json +46 -0
  401. package/node_modules/level-supports/test/cloneable.js +26 -0
  402. package/node_modules/level-supports/test/index.js +24 -0
  403. package/node_modules/level-supports/test/self.js +86 -0
  404. package/node_modules/level-supports/test/shape.js +23 -0
  405. package/node_modules/level-transcoder/CHANGELOG.md +15 -0
  406. package/node_modules/level-transcoder/LICENSE +21 -0
  407. package/node_modules/level-transcoder/README.md +214 -0
  408. package/node_modules/level-transcoder/UPGRADING.md +13 -0
  409. package/node_modules/level-transcoder/index.d.ts +27 -0
  410. package/node_modules/level-transcoder/index.js +158 -0
  411. package/node_modules/level-transcoder/lib/encoding.d.ts +158 -0
  412. package/node_modules/level-transcoder/lib/encoding.js +105 -0
  413. package/node_modules/level-transcoder/lib/encodings.d.ts +9 -0
  414. package/node_modules/level-transcoder/lib/encodings.js +135 -0
  415. package/node_modules/level-transcoder/lib/formats.d.ts +13 -0
  416. package/node_modules/level-transcoder/lib/formats.js +111 -0
  417. package/node_modules/level-transcoder/lib/text-endec.d.ts +6 -0
  418. package/node_modules/level-transcoder/lib/text-endec.js +19 -0
  419. package/node_modules/level-transcoder/package.json +46 -0
  420. package/node_modules/maybe-combine-errors/LICENSE.md +21 -0
  421. package/node_modules/maybe-combine-errors/README.md +94 -0
  422. package/node_modules/maybe-combine-errors/index.js +60 -0
  423. package/node_modules/maybe-combine-errors/package.json +33 -0
  424. package/node_modules/module-error/CHANGELOG.md +23 -0
  425. package/node_modules/module-error/LICENSE +21 -0
  426. package/node_modules/module-error/README.md +89 -0
  427. package/node_modules/module-error/index.d.ts +18 -0
  428. package/node_modules/module-error/index.js +22 -0
  429. package/node_modules/module-error/package.json +36 -0
  430. package/node_modules/napi-macros/LICENSE +21 -0
  431. package/node_modules/napi-macros/README.md +277 -0
  432. package/node_modules/napi-macros/index.js +1 -0
  433. package/node_modules/napi-macros/napi-macros.h +255 -0
  434. package/node_modules/napi-macros/package.json +22 -0
  435. package/node_modules/node-gyp-build/LICENSE +21 -0
  436. package/node_modules/node-gyp-build/README.md +58 -0
  437. package/node_modules/node-gyp-build/SECURITY.md +5 -0
  438. package/node_modules/node-gyp-build/bin.js +84 -0
  439. package/node_modules/node-gyp-build/build-test.js +19 -0
  440. package/node_modules/node-gyp-build/index.js +6 -0
  441. package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  442. package/node_modules/node-gyp-build/optional.js +7 -0
  443. package/node_modules/node-gyp-build/package.json +43 -0
  444. package/package.json +6 -3
  445. package/{providerPresetApply-7XEHTODR.js → providerPresetApply-XTEXOH7X.js} +3 -3
  446. package/{providerRegistry-GNV4FFSA.js → providerRegistry-ADYDSLKR.js} +3 -3
  447. package/{readlineWorkspace-46KDFUHN.js → readlineWorkspace-LO6ZLFTO.js} +1381 -1317
  448. package/{runAgentClientLoop-CQWLWU4W.js → runAgentClientLoop-KAYGKVTK.js} +16 -15
  449. package/{runtimeDoctorCommands-3USD722U.js → runtimeDoctorCommands-ID23PNNZ.js} +28 -0
  450. package/{spaceCommands-TSBC5UWP.js → spaceCommands-FA6RCZ2Y.js} +10 -9
  451. package/{streamAgentChatTurn-XD5JEJXA.js → streamAgentChatTurn-DFNDU2UY.js} +17 -16
  452. package/{tools-5NAJJTFN.js → tools-6HKH75NT.js} +13 -12
  453. package/{tuiSummaryLlmCaller-7KLLDP22.js → tuiSummaryLlmCaller-CFFVXQWX.js} +2 -2
  454. package/{updateCommands-XYMGOKF4.js → updateCommands-4EHDLF5J.js} +1 -1
  455. package/{updateDialogTitleAction-IKZPJCRA.js → updateDialogTitleAction-FFSYTLBC.js} +3 -3
@@ -0,0 +1,66 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #include "leveldb/env.h"
6
+
7
+ #include "port/port.h"
8
+ #include "util/testharness.h"
9
+ #include "util/env_posix_test_helper.h"
10
+
11
+ namespace leveldb {
12
+
13
+ static const int kDelayMicros = 100000;
14
+ static const int kReadOnlyFileLimit = 4;
15
+ static const int kMMapLimit = 4;
16
+
17
+ class EnvPosixTest {
18
+ public:
19
+ Env* env_;
20
+ EnvPosixTest() : env_(Env::Default()) { }
21
+
22
+ static void SetFileLimits(int read_only_file_limit, int mmap_limit) {
23
+ EnvPosixTestHelper::SetReadOnlyFDLimit(read_only_file_limit);
24
+ EnvPosixTestHelper::SetReadOnlyMMapLimit(mmap_limit);
25
+ }
26
+ };
27
+
28
+ TEST(EnvPosixTest, TestOpenOnRead) {
29
+ // Write some test data to a single file that will be opened |n| times.
30
+ std::string test_dir;
31
+ ASSERT_OK(env_->GetTestDirectory(&test_dir));
32
+ std::string test_file = test_dir + "/open_on_read.txt";
33
+
34
+ FILE* f = fopen(test_file.c_str(), "w");
35
+ ASSERT_TRUE(f != NULL);
36
+ const char kFileData[] = "abcdefghijklmnopqrstuvwxyz";
37
+ fputs(kFileData, f);
38
+ fclose(f);
39
+
40
+ // Open test file some number above the sum of the two limits to force
41
+ // open-on-read behavior of POSIX Env leveldb::RandomAccessFile.
42
+ const int kNumFiles = kReadOnlyFileLimit + kMMapLimit + 5;
43
+ leveldb::RandomAccessFile* files[kNumFiles] = {0};
44
+ for (int i = 0; i < kNumFiles; i++) {
45
+ ASSERT_OK(env_->NewRandomAccessFile(test_file, &files[i]));
46
+ }
47
+ char scratch;
48
+ Slice read_result;
49
+ for (int i = 0; i < kNumFiles; i++) {
50
+ ASSERT_OK(files[i]->Read(i, 1, &read_result, &scratch));
51
+ ASSERT_EQ(kFileData[i], read_result[0]);
52
+ }
53
+ for (int i = 0; i < kNumFiles; i++) {
54
+ delete files[i];
55
+ }
56
+ ASSERT_OK(env_->DeleteFile(test_file));
57
+ }
58
+
59
+ } // namespace leveldb
60
+
61
+ int main(int argc, char** argv) {
62
+ // All tests currently run with the same read-only file limits.
63
+ leveldb::EnvPosixTest::SetFileLimits(leveldb::kReadOnlyFileLimit,
64
+ leveldb::kMMapLimit);
65
+ return leveldb::test::RunAllTests();
66
+ }
@@ -0,0 +1,28 @@
1
+ // Copyright 2017 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #ifndef STORAGE_LEVELDB_UTIL_ENV_POSIX_TEST_HELPER_H_
6
+ #define STORAGE_LEVELDB_UTIL_ENV_POSIX_TEST_HELPER_H_
7
+
8
+ namespace leveldb {
9
+
10
+ class EnvPosixTest;
11
+
12
+ // A helper for the POSIX Env to facilitate testing.
13
+ class EnvPosixTestHelper {
14
+ private:
15
+ friend class EnvPosixTest;
16
+
17
+ // Set the maximum number of read-only files that will be opened.
18
+ // Must be called before creating an Env.
19
+ static void SetReadOnlyFDLimit(int limit);
20
+
21
+ // Set the maximum number of read-only files that will be mapped via mmap.
22
+ // Must be called before creating an Env.
23
+ static void SetReadOnlyMMapLimit(int limit);
24
+ };
25
+
26
+ } // namespace leveldb
27
+
28
+ #endif // STORAGE_LEVELDB_UTIL_ENV_POSIX_TEST_HELPER_H_
@@ -0,0 +1,106 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #include "leveldb/env.h"
6
+
7
+ #include "port/port.h"
8
+ #include "util/testharness.h"
9
+
10
+ namespace leveldb {
11
+
12
+ static const int kDelayMicros = 100000;
13
+ static const int kReadOnlyFileLimit = 4;
14
+ static const int kMMapLimit = 4;
15
+
16
+ class EnvTest {
17
+ private:
18
+ port::Mutex mu_;
19
+ std::string events_;
20
+
21
+ public:
22
+ Env* env_;
23
+ EnvTest() : env_(Env::Default()) { }
24
+ };
25
+
26
+ static void SetBool(void* ptr) {
27
+ reinterpret_cast<port::AtomicPointer*>(ptr)->NoBarrier_Store(ptr);
28
+ }
29
+
30
+ TEST(EnvTest, RunImmediately) {
31
+ port::AtomicPointer called (NULL);
32
+ env_->Schedule(&SetBool, &called);
33
+ env_->SleepForMicroseconds(kDelayMicros);
34
+ ASSERT_TRUE(called.NoBarrier_Load() != NULL);
35
+ }
36
+
37
+ TEST(EnvTest, RunMany) {
38
+ port::AtomicPointer last_id (NULL);
39
+
40
+ struct CB {
41
+ port::AtomicPointer* last_id_ptr; // Pointer to shared slot
42
+ uintptr_t id; // Order# for the execution of this callback
43
+
44
+ CB(port::AtomicPointer* p, int i) : last_id_ptr(p), id(i) { }
45
+
46
+ static void Run(void* v) {
47
+ CB* cb = reinterpret_cast<CB*>(v);
48
+ void* cur = cb->last_id_ptr->NoBarrier_Load();
49
+ ASSERT_EQ(cb->id-1, reinterpret_cast<uintptr_t>(cur));
50
+ cb->last_id_ptr->Release_Store(reinterpret_cast<void*>(cb->id));
51
+ }
52
+ };
53
+
54
+ // Schedule in different order than start time
55
+ CB cb1(&last_id, 1);
56
+ CB cb2(&last_id, 2);
57
+ CB cb3(&last_id, 3);
58
+ CB cb4(&last_id, 4);
59
+ env_->Schedule(&CB::Run, &cb1);
60
+ env_->Schedule(&CB::Run, &cb2);
61
+ env_->Schedule(&CB::Run, &cb3);
62
+ env_->Schedule(&CB::Run, &cb4);
63
+
64
+ env_->SleepForMicroseconds(kDelayMicros);
65
+ void* cur = last_id.Acquire_Load();
66
+ ASSERT_EQ(4, reinterpret_cast<uintptr_t>(cur));
67
+ }
68
+
69
+ struct State {
70
+ port::Mutex mu;
71
+ int val;
72
+ int num_running;
73
+ };
74
+
75
+ static void ThreadBody(void* arg) {
76
+ State* s = reinterpret_cast<State*>(arg);
77
+ s->mu.Lock();
78
+ s->val += 1;
79
+ s->num_running -= 1;
80
+ s->mu.Unlock();
81
+ }
82
+
83
+ TEST(EnvTest, StartThread) {
84
+ State state;
85
+ state.val = 0;
86
+ state.num_running = 3;
87
+ for (int i = 0; i < 3; i++) {
88
+ env_->StartThread(&ThreadBody, &state);
89
+ }
90
+ while (true) {
91
+ state.mu.Lock();
92
+ int num = state.num_running;
93
+ state.mu.Unlock();
94
+ if (num == 0) {
95
+ break;
96
+ }
97
+ env_->SleepForMicroseconds(kDelayMicros);
98
+ }
99
+ ASSERT_EQ(state.val, 3);
100
+ }
101
+
102
+ } // namespace leveldb
103
+
104
+ int main(int argc, char** argv) {
105
+ return leveldb::test::RunAllTests();
106
+ }
@@ -0,0 +1,11 @@
1
+ // Copyright (c) 2012 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #include "leveldb/filter_policy.h"
6
+
7
+ namespace leveldb {
8
+
9
+ FilterPolicy::~FilterPolicy() { }
10
+
11
+ } // namespace leveldb
@@ -0,0 +1,52 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #include <string.h>
6
+ #include "util/coding.h"
7
+ #include "util/hash.h"
8
+
9
+ // The FALLTHROUGH_INTENDED macro can be used to annotate implicit fall-through
10
+ // between switch labels. The real definition should be provided externally.
11
+ // This one is a fallback version for unsupported compilers.
12
+ #ifndef FALLTHROUGH_INTENDED
13
+ #define FALLTHROUGH_INTENDED do { } while (0)
14
+ #endif
15
+
16
+ namespace leveldb {
17
+
18
+ uint32_t Hash(const char* data, size_t n, uint32_t seed) {
19
+ // Similar to murmur hash
20
+ const uint32_t m = 0xc6a4a793;
21
+ const uint32_t r = 24;
22
+ const char* limit = data + n;
23
+ uint32_t h = seed ^ (n * m);
24
+
25
+ // Pick up four bytes at a time
26
+ while (data + 4 <= limit) {
27
+ uint32_t w = DecodeFixed32(data);
28
+ data += 4;
29
+ h += w;
30
+ h *= m;
31
+ h ^= (h >> 16);
32
+ }
33
+
34
+ // Pick up remaining bytes
35
+ switch (limit - data) {
36
+ case 3:
37
+ h += static_cast<unsigned char>(data[2]) << 16;
38
+ FALLTHROUGH_INTENDED;
39
+ case 2:
40
+ h += static_cast<unsigned char>(data[1]) << 8;
41
+ FALLTHROUGH_INTENDED;
42
+ case 1:
43
+ h += static_cast<unsigned char>(data[0]);
44
+ h *= m;
45
+ h ^= (h >> r);
46
+ break;
47
+ }
48
+ return h;
49
+ }
50
+
51
+
52
+ } // namespace leveldb
@@ -0,0 +1,19 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+ //
5
+ // Simple hash function used for internal data structures
6
+
7
+ #ifndef STORAGE_LEVELDB_UTIL_HASH_H_
8
+ #define STORAGE_LEVELDB_UTIL_HASH_H_
9
+
10
+ #include <stddef.h>
11
+ #include <stdint.h>
12
+
13
+ namespace leveldb {
14
+
15
+ extern uint32_t Hash(const char* data, size_t n, uint32_t seed);
16
+
17
+ }
18
+
19
+ #endif // STORAGE_LEVELDB_UTIL_HASH_H_
@@ -0,0 +1,54 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #include "util/hash.h"
6
+ #include "util/testharness.h"
7
+
8
+ namespace leveldb {
9
+
10
+ class HASH { };
11
+
12
+ TEST(HASH, SignedUnsignedIssue) {
13
+ const unsigned char data1[1] = {0x62};
14
+ const unsigned char data2[2] = {0xc3, 0x97};
15
+ const unsigned char data3[3] = {0xe2, 0x99, 0xa5};
16
+ const unsigned char data4[4] = {0xe1, 0x80, 0xb9, 0x32};
17
+ const unsigned char data5[48] = {
18
+ 0x01, 0xc0, 0x00, 0x00,
19
+ 0x00, 0x00, 0x00, 0x00,
20
+ 0x00, 0x00, 0x00, 0x00,
21
+ 0x00, 0x00, 0x00, 0x00,
22
+ 0x14, 0x00, 0x00, 0x00,
23
+ 0x00, 0x00, 0x04, 0x00,
24
+ 0x00, 0x00, 0x00, 0x14,
25
+ 0x00, 0x00, 0x00, 0x18,
26
+ 0x28, 0x00, 0x00, 0x00,
27
+ 0x00, 0x00, 0x00, 0x00,
28
+ 0x02, 0x00, 0x00, 0x00,
29
+ 0x00, 0x00, 0x00, 0x00,
30
+ };
31
+
32
+ ASSERT_EQ(Hash(0, 0, 0xbc9f1d34), 0xbc9f1d34);
33
+ ASSERT_EQ(
34
+ Hash(reinterpret_cast<const char*>(data1), sizeof(data1), 0xbc9f1d34),
35
+ 0xef1345c4);
36
+ ASSERT_EQ(
37
+ Hash(reinterpret_cast<const char*>(data2), sizeof(data2), 0xbc9f1d34),
38
+ 0x5b663814);
39
+ ASSERT_EQ(
40
+ Hash(reinterpret_cast<const char*>(data3), sizeof(data3), 0xbc9f1d34),
41
+ 0x323c078f);
42
+ ASSERT_EQ(
43
+ Hash(reinterpret_cast<const char*>(data4), sizeof(data4), 0xbc9f1d34),
44
+ 0xed21633a);
45
+ ASSERT_EQ(
46
+ Hash(reinterpret_cast<const char*>(data5), sizeof(data5), 0x12345678),
47
+ 0xf333dabb);
48
+ }
49
+
50
+ } // namespace leveldb
51
+
52
+ int main(int argc, char** argv) {
53
+ return leveldb::test::RunAllTests();
54
+ }
@@ -0,0 +1,139 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #include <math.h>
6
+ #include <stdio.h>
7
+ #include "port/port.h"
8
+ #include "util/histogram.h"
9
+
10
+ namespace leveldb {
11
+
12
+ const double Histogram::kBucketLimit[kNumBuckets] = {
13
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 25, 30, 35, 40, 45,
14
+ 50, 60, 70, 80, 90, 100, 120, 140, 160, 180, 200, 250, 300, 350, 400, 450,
15
+ 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000, 2500, 3000,
16
+ 3500, 4000, 4500, 5000, 6000, 7000, 8000, 9000, 10000, 12000, 14000,
17
+ 16000, 18000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 60000,
18
+ 70000, 80000, 90000, 100000, 120000, 140000, 160000, 180000, 200000,
19
+ 250000, 300000, 350000, 400000, 450000, 500000, 600000, 700000, 800000,
20
+ 900000, 1000000, 1200000, 1400000, 1600000, 1800000, 2000000, 2500000,
21
+ 3000000, 3500000, 4000000, 4500000, 5000000, 6000000, 7000000, 8000000,
22
+ 9000000, 10000000, 12000000, 14000000, 16000000, 18000000, 20000000,
23
+ 25000000, 30000000, 35000000, 40000000, 45000000, 50000000, 60000000,
24
+ 70000000, 80000000, 90000000, 100000000, 120000000, 140000000, 160000000,
25
+ 180000000, 200000000, 250000000, 300000000, 350000000, 400000000,
26
+ 450000000, 500000000, 600000000, 700000000, 800000000, 900000000,
27
+ 1000000000, 1200000000, 1400000000, 1600000000, 1800000000, 2000000000,
28
+ 2500000000.0, 3000000000.0, 3500000000.0, 4000000000.0, 4500000000.0,
29
+ 5000000000.0, 6000000000.0, 7000000000.0, 8000000000.0, 9000000000.0,
30
+ 1e200,
31
+ };
32
+
33
+ void Histogram::Clear() {
34
+ min_ = kBucketLimit[kNumBuckets-1];
35
+ max_ = 0;
36
+ num_ = 0;
37
+ sum_ = 0;
38
+ sum_squares_ = 0;
39
+ for (int i = 0; i < kNumBuckets; i++) {
40
+ buckets_[i] = 0;
41
+ }
42
+ }
43
+
44
+ void Histogram::Add(double value) {
45
+ // Linear search is fast enough for our usage in db_bench
46
+ int b = 0;
47
+ while (b < kNumBuckets - 1 && kBucketLimit[b] <= value) {
48
+ b++;
49
+ }
50
+ buckets_[b] += 1.0;
51
+ if (min_ > value) min_ = value;
52
+ if (max_ < value) max_ = value;
53
+ num_++;
54
+ sum_ += value;
55
+ sum_squares_ += (value * value);
56
+ }
57
+
58
+ void Histogram::Merge(const Histogram& other) {
59
+ if (other.min_ < min_) min_ = other.min_;
60
+ if (other.max_ > max_) max_ = other.max_;
61
+ num_ += other.num_;
62
+ sum_ += other.sum_;
63
+ sum_squares_ += other.sum_squares_;
64
+ for (int b = 0; b < kNumBuckets; b++) {
65
+ buckets_[b] += other.buckets_[b];
66
+ }
67
+ }
68
+
69
+ double Histogram::Median() const {
70
+ return Percentile(50.0);
71
+ }
72
+
73
+ double Histogram::Percentile(double p) const {
74
+ double threshold = num_ * (p / 100.0);
75
+ double sum = 0;
76
+ for (int b = 0; b < kNumBuckets; b++) {
77
+ sum += buckets_[b];
78
+ if (sum >= threshold) {
79
+ // Scale linearly within this bucket
80
+ double left_point = (b == 0) ? 0 : kBucketLimit[b-1];
81
+ double right_point = kBucketLimit[b];
82
+ double left_sum = sum - buckets_[b];
83
+ double right_sum = sum;
84
+ double pos = (threshold - left_sum) / (right_sum - left_sum);
85
+ double r = left_point + (right_point - left_point) * pos;
86
+ if (r < min_) r = min_;
87
+ if (r > max_) r = max_;
88
+ return r;
89
+ }
90
+ }
91
+ return max_;
92
+ }
93
+
94
+ double Histogram::Average() const {
95
+ if (num_ == 0.0) return 0;
96
+ return sum_ / num_;
97
+ }
98
+
99
+ double Histogram::StandardDeviation() const {
100
+ if (num_ == 0.0) return 0;
101
+ double variance = (sum_squares_ * num_ - sum_ * sum_) / (num_ * num_);
102
+ return sqrt(variance);
103
+ }
104
+
105
+ std::string Histogram::ToString() const {
106
+ std::string r;
107
+ char buf[200];
108
+ snprintf(buf, sizeof(buf),
109
+ "Count: %.0f Average: %.4f StdDev: %.2f\n",
110
+ num_, Average(), StandardDeviation());
111
+ r.append(buf);
112
+ snprintf(buf, sizeof(buf),
113
+ "Min: %.4f Median: %.4f Max: %.4f\n",
114
+ (num_ == 0.0 ? 0.0 : min_), Median(), max_);
115
+ r.append(buf);
116
+ r.append("------------------------------------------------------\n");
117
+ const double mult = 100.0 / num_;
118
+ double sum = 0;
119
+ for (int b = 0; b < kNumBuckets; b++) {
120
+ if (buckets_[b] <= 0.0) continue;
121
+ sum += buckets_[b];
122
+ snprintf(buf, sizeof(buf),
123
+ "[ %7.0f, %7.0f ) %7.0f %7.3f%% %7.3f%% ",
124
+ ((b == 0) ? 0.0 : kBucketLimit[b-1]), // left
125
+ kBucketLimit[b], // right
126
+ buckets_[b], // count
127
+ mult * buckets_[b], // percentage
128
+ mult * sum); // cumulative percentage
129
+ r.append(buf);
130
+
131
+ // Add hash marks based on percentage; 20 marks for 100%.
132
+ int marks = static_cast<int>(20*(buckets_[b] / num_) + 0.5);
133
+ r.append(marks, '#');
134
+ r.push_back('\n');
135
+ }
136
+ return r;
137
+ }
138
+
139
+ } // namespace leveldb
@@ -0,0 +1,42 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #ifndef STORAGE_LEVELDB_UTIL_HISTOGRAM_H_
6
+ #define STORAGE_LEVELDB_UTIL_HISTOGRAM_H_
7
+
8
+ #include <string>
9
+
10
+ namespace leveldb {
11
+
12
+ class Histogram {
13
+ public:
14
+ Histogram() { }
15
+ ~Histogram() { }
16
+
17
+ void Clear();
18
+ void Add(double value);
19
+ void Merge(const Histogram& other);
20
+
21
+ std::string ToString() const;
22
+
23
+ private:
24
+ double min_;
25
+ double max_;
26
+ double num_;
27
+ double sum_;
28
+ double sum_squares_;
29
+
30
+ enum { kNumBuckets = 154 };
31
+ static const double kBucketLimit[kNumBuckets];
32
+ double buckets_[kNumBuckets];
33
+
34
+ double Median() const;
35
+ double Percentile(double p) const;
36
+ double Average() const;
37
+ double StandardDeviation() const;
38
+ };
39
+
40
+ } // namespace leveldb
41
+
42
+ #endif // STORAGE_LEVELDB_UTIL_HISTOGRAM_H_
@@ -0,0 +1,72 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #include "util/logging.h"
6
+
7
+ #include <errno.h>
8
+ #include <stdarg.h>
9
+ #include <stdio.h>
10
+ #include <stdlib.h>
11
+ #include "leveldb/env.h"
12
+ #include "leveldb/slice.h"
13
+
14
+ namespace leveldb {
15
+
16
+ void AppendNumberTo(std::string* str, uint64_t num) {
17
+ char buf[30];
18
+ snprintf(buf, sizeof(buf), "%llu", (unsigned long long) num);
19
+ str->append(buf);
20
+ }
21
+
22
+ void AppendEscapedStringTo(std::string* str, const Slice& value) {
23
+ for (size_t i = 0; i < value.size(); i++) {
24
+ char c = value[i];
25
+ if (c >= ' ' && c <= '~') {
26
+ str->push_back(c);
27
+ } else {
28
+ char buf[10];
29
+ snprintf(buf, sizeof(buf), "\\x%02x",
30
+ static_cast<unsigned int>(c) & 0xff);
31
+ str->append(buf);
32
+ }
33
+ }
34
+ }
35
+
36
+ std::string NumberToString(uint64_t num) {
37
+ std::string r;
38
+ AppendNumberTo(&r, num);
39
+ return r;
40
+ }
41
+
42
+ std::string EscapeString(const Slice& value) {
43
+ std::string r;
44
+ AppendEscapedStringTo(&r, value);
45
+ return r;
46
+ }
47
+
48
+ bool ConsumeDecimalNumber(Slice* in, uint64_t* val) {
49
+ uint64_t v = 0;
50
+ int digits = 0;
51
+ while (!in->empty()) {
52
+ char c = (*in)[0];
53
+ if (c >= '0' && c <= '9') {
54
+ ++digits;
55
+ const int delta = (c - '0');
56
+ static const uint64_t kMaxUint64 = ~static_cast<uint64_t>(0);
57
+ if (v > kMaxUint64/10 ||
58
+ (v == kMaxUint64/10 && delta > kMaxUint64%10)) {
59
+ // Overflow
60
+ return false;
61
+ }
62
+ v = (v * 10) + delta;
63
+ in->remove_prefix(1);
64
+ } else {
65
+ break;
66
+ }
67
+ }
68
+ *val = v;
69
+ return (digits > 0);
70
+ }
71
+
72
+ } // namespace leveldb
@@ -0,0 +1,43 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+ //
5
+ // Must not be included from any .h files to avoid polluting the namespace
6
+ // with macros.
7
+
8
+ #ifndef STORAGE_LEVELDB_UTIL_LOGGING_H_
9
+ #define STORAGE_LEVELDB_UTIL_LOGGING_H_
10
+
11
+ #include <stdio.h>
12
+ #include <stdint.h>
13
+ #include <string>
14
+ #include "port/port.h"
15
+
16
+ namespace leveldb {
17
+
18
+ class Slice;
19
+ class WritableFile;
20
+
21
+ // Append a human-readable printout of "num" to *str
22
+ extern void AppendNumberTo(std::string* str, uint64_t num);
23
+
24
+ // Append a human-readable printout of "value" to *str.
25
+ // Escapes any non-printable characters found in "value".
26
+ extern void AppendEscapedStringTo(std::string* str, const Slice& value);
27
+
28
+ // Return a human-readable printout of "num"
29
+ extern std::string NumberToString(uint64_t num);
30
+
31
+ // Return a human-readable version of "value".
32
+ // Escapes any non-printable characters found in "value".
33
+ extern std::string EscapeString(const Slice& value);
34
+
35
+ // Parse a human-readable number from "*in" into *value. On success,
36
+ // advances "*in" past the consumed number and sets "*val" to the
37
+ // numeric value. Otherwise, returns false and leaves *in in an
38
+ // unspecified state.
39
+ extern bool ConsumeDecimalNumber(Slice* in, uint64_t* val);
40
+
41
+ } // namespace leveldb
42
+
43
+ #endif // STORAGE_LEVELDB_UTIL_LOGGING_H_
@@ -0,0 +1,41 @@
1
+ // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
4
+
5
+ #ifndef STORAGE_LEVELDB_UTIL_MUTEXLOCK_H_
6
+ #define STORAGE_LEVELDB_UTIL_MUTEXLOCK_H_
7
+
8
+ #include "port/port.h"
9
+ #include "port/thread_annotations.h"
10
+
11
+ namespace leveldb {
12
+
13
+ // Helper class that locks a mutex on construction and unlocks the mutex when
14
+ // the destructor of the MutexLock object is invoked.
15
+ //
16
+ // Typical usage:
17
+ //
18
+ // void MyClass::MyMethod() {
19
+ // MutexLock l(&mu_); // mu_ is an instance variable
20
+ // ... some complex code, possibly with multiple return paths ...
21
+ // }
22
+
23
+ class SCOPED_LOCKABLE MutexLock {
24
+ public:
25
+ explicit MutexLock(port::Mutex *mu) EXCLUSIVE_LOCK_FUNCTION(mu)
26
+ : mu_(mu) {
27
+ this->mu_->Lock();
28
+ }
29
+ ~MutexLock() UNLOCK_FUNCTION() { this->mu_->Unlock(); }
30
+
31
+ private:
32
+ port::Mutex *const mu_;
33
+ // No copying allowed
34
+ MutexLock(const MutexLock&);
35
+ void operator=(const MutexLock&);
36
+ };
37
+
38
+ } // namespace leveldb
39
+
40
+
41
+ #endif // STORAGE_LEVELDB_UTIL_MUTEXLOCK_H_