@lovrabet/rabetbase-cli 2.3.16-beta.3 → 2.3.16-beta.5

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 (568) hide show
  1. package/lib/api/api-doc.d.ts +9 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.d.ts +2 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +8 -0
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/auth/auth-server-ui.d.ts +13 -0
  8. package/lib/auth/auth-server-ui.js +1 -1
  9. package/lib/auth/auth-server.d.ts +25 -0
  10. package/lib/auth/auth-server.js +1 -1
  11. package/lib/auth/constant.d.ts +2 -0
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.d.ts +1 -0
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.d.ts +51 -0
  16. package/lib/auth/get-session-user.js +1 -1
  17. package/lib/auth/is-session-valid.d.ts +1 -0
  18. package/lib/auth/is-session-valid.js +1 -1
  19. package/lib/auth/login-success-html.d.ts +5 -0
  20. package/lib/auth/login-success-html.js +1 -1
  21. package/lib/auth/logout.d.ts +1 -0
  22. package/lib/auth/logout.js +1 -1
  23. package/lib/cli-flags.d.ts +12 -0
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.d.ts +2 -0
  26. package/lib/cli.js +1 -1
  27. package/lib/commands/api/generate.d.ts +2 -0
  28. package/lib/commands/api/generate.js +1 -1
  29. package/lib/commands/api/index.d.ts +2 -0
  30. package/lib/commands/api/index.js +1 -1
  31. package/lib/commands/api/list.d.ts +2 -0
  32. package/lib/commands/api/list.js +1 -1
  33. package/lib/commands/api/pull.d.ts +2 -0
  34. package/lib/commands/api/pull.js +1 -1
  35. package/lib/commands/api/shared.d.ts +18 -0
  36. package/lib/commands/api/shared.js +1 -1
  37. package/lib/commands/app/index.d.ts +5 -0
  38. package/lib/commands/app/index.js +1 -1
  39. package/lib/commands/app/list.d.ts +10 -0
  40. package/lib/commands/app/list.js +1 -1
  41. package/lib/commands/app/members-list.d.ts +2 -0
  42. package/lib/commands/app/members-list.js +1 -1
  43. package/lib/commands/app/remote-directory.d.ts +11 -0
  44. package/lib/commands/app/remote-directory.js +1 -1
  45. package/lib/commands/app/shared.d.ts +46 -0
  46. package/lib/commands/app/shared.js +1 -1
  47. package/lib/commands/app-config/delete.d.ts +2 -0
  48. package/lib/commands/app-config/delete.js +1 -1
  49. package/lib/commands/app-config/get.d.ts +2 -0
  50. package/lib/commands/app-config/get.js +1 -1
  51. package/lib/commands/app-config/index.d.ts +2 -0
  52. package/lib/commands/app-config/index.js +1 -1
  53. package/lib/commands/app-config/list.d.ts +2 -0
  54. package/lib/commands/app-config/list.js +1 -1
  55. package/lib/commands/app-config/set.d.ts +2 -0
  56. package/lib/commands/app-config/set.js +1 -1
  57. package/lib/commands/app-config/shared.d.ts +105 -0
  58. package/lib/commands/app-config/shared.js +1 -1
  59. package/lib/commands/auth/index.d.ts +2 -0
  60. package/lib/commands/auth/index.js +1 -1
  61. package/lib/commands/bff/create.d.ts +4 -0
  62. package/lib/commands/bff/create.js +1 -1
  63. package/lib/commands/bff/delete.d.ts +2 -0
  64. package/lib/commands/bff/delete.js +1 -1
  65. package/lib/commands/bff/detail.d.ts +2 -0
  66. package/lib/commands/bff/detail.js +1 -1
  67. package/lib/commands/bff/index.d.ts +5 -0
  68. package/lib/commands/bff/index.js +1 -1
  69. package/lib/commands/bff/list.d.ts +2 -0
  70. package/lib/commands/bff/list.js +1 -1
  71. package/lib/commands/bff/pull.d.ts +2 -0
  72. package/lib/commands/bff/pull.js +1 -1
  73. package/lib/commands/bff/push.d.ts +2 -0
  74. package/lib/commands/bff/push.js +1 -1
  75. package/lib/commands/bff/status.d.ts +2 -0
  76. package/lib/commands/bff/status.js +1 -1
  77. package/lib/commands/cli-skill/index.d.ts +8 -0
  78. package/lib/commands/cli-skill/index.js +1 -1
  79. package/lib/commands/cli-update.d.ts +2 -0
  80. package/lib/commands/cli-update.js +1 -1
  81. package/lib/commands/codegen/index.d.ts +2 -0
  82. package/lib/commands/codegen/index.js +1 -1
  83. package/lib/commands/codegen/sdk.d.ts +2 -0
  84. package/lib/commands/codegen/sdk.js +1 -1
  85. package/lib/commands/codegen/sql.d.ts +2 -0
  86. package/lib/commands/codegen/sql.js +1 -1
  87. package/lib/commands/common/app-registry.d.ts +17 -0
  88. package/lib/commands/common/app-registry.js +1 -1
  89. package/lib/commands/common/app-selector.d.ts +17 -0
  90. package/lib/commands/common/app-selector.js +1 -1
  91. package/lib/commands/common/async-task.d.ts +11 -0
  92. package/lib/commands/common/async-task.js +1 -1
  93. package/lib/commands/common/dry-run.d.ts +12 -0
  94. package/lib/commands/common/dry-run.js +1 -1
  95. package/lib/commands/common/flags.d.ts +26 -0
  96. package/lib/commands/common/flags.js +1 -1
  97. package/lib/commands/common/local-file.d.ts +6 -0
  98. package/lib/commands/common/local-file.js +1 -1
  99. package/lib/commands/common/validate.d.ts +13 -0
  100. package/lib/commands/common/validate.js +1 -1
  101. package/lib/commands/config/get.d.ts +5 -0
  102. package/lib/commands/config/get.js +1 -1
  103. package/lib/commands/config/index.d.ts +5 -0
  104. package/lib/commands/config/index.js +1 -1
  105. package/lib/commands/config/list.d.ts +5 -0
  106. package/lib/commands/config/list.js +1 -1
  107. package/lib/commands/config/set.d.ts +5 -0
  108. package/lib/commands/config/set.js +1 -1
  109. package/lib/commands/config/shared.d.ts +16 -0
  110. package/lib/commands/config/shared.js +1 -1
  111. package/lib/commands/data/filter.d.ts +7 -0
  112. package/lib/commands/data/filter.js +1 -1
  113. package/lib/commands/data/getOne.d.ts +7 -0
  114. package/lib/commands/data/getOne.js +1 -1
  115. package/lib/commands/data/index.d.ts +8 -0
  116. package/lib/commands/data/index.js +1 -1
  117. package/lib/commands/data/shared.d.ts +33 -0
  118. package/lib/commands/data/shared.js +1 -1
  119. package/lib/commands/dataset/business-group-update.d.ts +18 -0
  120. package/lib/commands/dataset/business-group-update.js +1 -1
  121. package/lib/commands/dataset/capability.d.ts +11 -0
  122. package/lib/commands/dataset/capability.js +1 -1
  123. package/lib/commands/dataset/delete.d.ts +2 -0
  124. package/lib/commands/dataset/delete.js +1 -1
  125. package/lib/commands/dataset/detail.d.ts +2 -0
  126. package/lib/commands/dataset/detail.js +1 -1
  127. package/lib/commands/dataset/extend-update.d.ts +26 -0
  128. package/lib/commands/dataset/extend-update.js +1 -1
  129. package/lib/commands/dataset/field-update.d.ts +27 -0
  130. package/lib/commands/dataset/field-update.js +1 -1
  131. package/lib/commands/dataset/generate.d.ts +3 -0
  132. package/lib/commands/dataset/generate.js +1 -1
  133. package/lib/commands/dataset/index.d.ts +2 -0
  134. package/lib/commands/dataset/index.js +1 -1
  135. package/lib/commands/dataset/list.d.ts +2 -0
  136. package/lib/commands/dataset/list.js +1 -1
  137. package/lib/commands/dataset/operations.d.ts +2 -0
  138. package/lib/commands/dataset/operations.js +1 -1
  139. package/lib/commands/dataset/relation-audit.d.ts +2 -0
  140. package/lib/commands/dataset/relation-audit.js +1 -1
  141. package/lib/commands/dataset/relation-create.d.ts +2 -0
  142. package/lib/commands/dataset/relation-create.js +1 -1
  143. package/lib/commands/dataset/relation-delete.d.ts +2 -0
  144. package/lib/commands/dataset/relation-delete.js +1 -1
  145. package/lib/commands/dataset/relation-shared.d.ts +128 -0
  146. package/lib/commands/dataset/relation-shared.js +1 -1
  147. package/lib/commands/dataset/relation-update.d.ts +2 -0
  148. package/lib/commands/dataset/relation-update.js +1 -1
  149. package/lib/commands/dataset/relations.d.ts +53 -0
  150. package/lib/commands/dataset/relations.js +1 -1
  151. package/lib/commands/dataset/rename.d.ts +17 -0
  152. package/lib/commands/dataset/rename.js +1 -1
  153. package/lib/commands/dataset/restore.d.ts +2 -0
  154. package/lib/commands/dataset/restore.js +1 -1
  155. package/lib/commands/db/analysis-batching.d.ts +30 -0
  156. package/lib/commands/db/analysis-batching.js +1 -1
  157. package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
  158. package/lib/commands/db/analyze-batch-plan.js +1 -1
  159. package/lib/commands/db/analyze-cancel.d.ts +2 -0
  160. package/lib/commands/db/analyze-cancel.js +1 -1
  161. package/lib/commands/db/analyze-start.d.ts +2 -0
  162. package/lib/commands/db/analyze-start.js +1 -1
  163. package/lib/commands/db/analyze-status.d.ts +2 -0
  164. package/lib/commands/db/analyze-status.js +1 -1
  165. package/lib/commands/db/create.d.ts +2 -0
  166. package/lib/commands/db/create.js +1 -1
  167. package/lib/commands/db/delete.d.ts +2 -0
  168. package/lib/commands/db/delete.js +1 -1
  169. package/lib/commands/db/detail.d.ts +2 -0
  170. package/lib/commands/db/detail.js +1 -1
  171. package/lib/commands/db/diff.d.ts +2 -0
  172. package/lib/commands/db/diff.js +1 -1
  173. package/lib/commands/db/index.d.ts +5 -0
  174. package/lib/commands/db/index.js +1 -1
  175. package/lib/commands/db/list.d.ts +2 -0
  176. package/lib/commands/db/list.js +1 -1
  177. package/lib/commands/db/shared.d.ts +15 -0
  178. package/lib/commands/db/shared.js +1 -1
  179. package/lib/commands/db/tables.d.ts +2 -0
  180. package/lib/commands/db/tables.js +1 -1
  181. package/lib/commands/db/test.d.ts +2 -0
  182. package/lib/commands/db/test.js +1 -1
  183. package/lib/commands/db/update.d.ts +2 -0
  184. package/lib/commands/db/update.js +1 -1
  185. package/lib/commands/doctor.d.ts +2 -0
  186. package/lib/commands/doctor.js +1 -1
  187. package/lib/commands/file/index.d.ts +2 -0
  188. package/lib/commands/file/index.js +1 -1
  189. package/lib/commands/init/index.d.ts +11 -0
  190. package/lib/commands/init/index.js +1 -1
  191. package/lib/commands/issue/index.d.ts +2 -0
  192. package/lib/commands/issue/index.js +1 -1
  193. package/lib/commands/issue/nudge.d.ts +23 -0
  194. package/lib/commands/issue/nudge.js +1 -1
  195. package/lib/commands/issue/report.d.ts +2 -0
  196. package/lib/commands/issue/report.js +1 -1
  197. package/lib/commands/issue/shared.d.ts +32 -0
  198. package/lib/commands/issue/shared.js +1 -1
  199. package/lib/commands/kb/create.d.ts +2 -0
  200. package/lib/commands/kb/create.js +1 -1
  201. package/lib/commands/kb/delete.d.ts +2 -0
  202. package/lib/commands/kb/delete.js +1 -1
  203. package/lib/commands/kb/detail.d.ts +2 -0
  204. package/lib/commands/kb/detail.js +1 -1
  205. package/lib/commands/kb/index.d.ts +2 -0
  206. package/lib/commands/kb/index.js +1 -1
  207. package/lib/commands/kb/list.d.ts +2 -0
  208. package/lib/commands/kb/list.js +1 -1
  209. package/lib/commands/kb/shared.d.ts +33 -0
  210. package/lib/commands/kb/shared.js +1 -1
  211. package/lib/commands/kb/update.d.ts +2 -0
  212. package/lib/commands/kb/update.js +1 -1
  213. package/lib/commands/logs/index.d.ts +5 -0
  214. package/lib/commands/logs/index.js +1 -1
  215. package/lib/commands/menu/asset-update.d.ts +2 -0
  216. package/lib/commands/menu/asset-update.js +1 -1
  217. package/lib/commands/menu/delete.d.ts +2 -0
  218. package/lib/commands/menu/delete.js +1 -1
  219. package/lib/commands/menu/external-link-create.d.ts +3 -0
  220. package/lib/commands/menu/external-link-create.js +1 -1
  221. package/lib/commands/menu/external-link-update.d.ts +2 -0
  222. package/lib/commands/menu/external-link-update.js +1 -1
  223. package/lib/commands/menu/group-create.d.ts +2 -0
  224. package/lib/commands/menu/group-create.js +1 -1
  225. package/lib/commands/menu/group-update.d.ts +2 -0
  226. package/lib/commands/menu/group-update.js +1 -1
  227. package/lib/commands/menu/index.d.ts +17 -0
  228. package/lib/commands/menu/index.js +1 -1
  229. package/lib/commands/menu/list.d.ts +2 -0
  230. package/lib/commands/menu/list.js +1 -1
  231. package/lib/commands/menu/move.d.ts +2 -0
  232. package/lib/commands/menu/move.js +1 -1
  233. package/lib/commands/menu/regroup-start.d.ts +2 -0
  234. package/lib/commands/menu/regroup-start.js +1 -1
  235. package/lib/commands/menu/rename.d.ts +2 -0
  236. package/lib/commands/menu/rename.js +1 -1
  237. package/lib/commands/menu/shared/compare-table.d.ts +27 -0
  238. package/lib/commands/menu/shared/compare-table.js +1 -1
  239. package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
  240. package/lib/commands/menu/shared/delete-plan.js +1 -1
  241. package/lib/commands/menu/shared/facts.d.ts +12 -0
  242. package/lib/commands/menu/shared/facts.js +1 -1
  243. package/lib/commands/menu/shared/index.d.ts +12 -0
  244. package/lib/commands/menu/shared/index.js +1 -1
  245. package/lib/commands/menu/shared/inquirer.d.ts +10 -0
  246. package/lib/commands/menu/shared/inquirer.js +1 -1
  247. package/lib/commands/menu/shared/local-pages.d.ts +12 -0
  248. package/lib/commands/menu/shared/local-pages.js +1 -1
  249. package/lib/commands/menu/shared/logic.d.ts +28 -0
  250. package/lib/commands/menu/shared/logic.js +1 -1
  251. package/lib/commands/menu/shared/mutations.d.ts +69 -0
  252. package/lib/commands/menu/shared/mutations.js +1 -1
  253. package/lib/commands/menu/shared/service.d.ts +17 -0
  254. package/lib/commands/menu/shared/service.js +1 -1
  255. package/lib/commands/menu/shared/sync-core.d.ts +7 -0
  256. package/lib/commands/menu/shared/sync-core.js +1 -1
  257. package/lib/commands/menu/shared/types.d.ts +162 -0
  258. package/lib/commands/menu/shared/update-core.d.ts +11 -0
  259. package/lib/commands/menu/shared/update-core.js +1 -1
  260. package/lib/commands/menu/shared/valid-url.d.ts +6 -0
  261. package/lib/commands/menu/shared/valid-url.js +1 -1
  262. package/lib/commands/menu/sync.d.ts +2 -0
  263. package/lib/commands/menu/sync.js +1 -1
  264. package/lib/commands/notification/config-list.d.ts +2 -0
  265. package/lib/commands/notification/config-list.js +1 -1
  266. package/lib/commands/notification/index.d.ts +2 -0
  267. package/lib/commands/notification/index.js +1 -1
  268. package/lib/commands/ocr/index.d.ts +2 -0
  269. package/lib/commands/ocr/index.js +1 -1
  270. package/lib/commands/page/generate-start.d.ts +2 -0
  271. package/lib/commands/page/generate-start.js +1 -1
  272. package/lib/commands/page/generate-status.d.ts +2 -0
  273. package/lib/commands/page/generate-status.js +1 -1
  274. package/lib/commands/page/index.d.ts +2 -0
  275. package/lib/commands/page/index.js +1 -1
  276. package/lib/commands/page/pull.d.ts +2 -0
  277. package/lib/commands/page/pull.js +1 -1
  278. package/lib/commands/page/push.d.ts +2 -0
  279. package/lib/commands/page/push.js +1 -1
  280. package/lib/commands/page/relation-audit.d.ts +2 -0
  281. package/lib/commands/page/relation-audit.js +1 -1
  282. package/lib/commands/page/restore.d.ts +2 -0
  283. package/lib/commands/page/restore.js +1 -1
  284. package/lib/commands/page/shared.d.ts +105 -0
  285. package/lib/commands/page/shared.js +1 -1
  286. package/lib/commands/page/standard-page-status.d.ts +2 -0
  287. package/lib/commands/page/standard-page-status.js +1 -1
  288. package/lib/commands/page/sync.d.ts +2 -0
  289. package/lib/commands/page/sync.js +1 -1
  290. package/lib/commands/permit/index.d.ts +2 -0
  291. package/lib/commands/permit/index.js +1 -1
  292. package/lib/commands/permit/page-get.d.ts +2 -0
  293. package/lib/commands/permit/page-get.js +1 -1
  294. package/lib/commands/permit/page-set.d.ts +2 -0
  295. package/lib/commands/permit/page-set.js +1 -1
  296. package/lib/commands/permit/role-apis-set.d.ts +2 -0
  297. package/lib/commands/permit/role-apis-set.js +1 -1
  298. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  299. package/lib/commands/permit/role-menus-set.js +1 -1
  300. package/lib/commands/permit/role-menus.d.ts +2 -0
  301. package/lib/commands/permit/role-menus.js +1 -1
  302. package/lib/commands/permit/shared.d.ts +74 -0
  303. package/lib/commands/permit/shared.js +1 -1
  304. package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
  305. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  306. package/lib/commands/project/create/format-elapsed.d.ts +1 -0
  307. package/lib/commands/project/create/format-elapsed.js +1 -1
  308. package/lib/commands/project/create/main.d.ts +6 -0
  309. package/lib/commands/project/create/main.js +1 -1
  310. package/lib/commands/project/create/non-interactive.d.ts +9 -0
  311. package/lib/commands/project/create/non-interactive.js +1 -1
  312. package/lib/commands/project/create/project-template-path.d.ts +4 -0
  313. package/lib/commands/project/create/project-template-path.js +1 -1
  314. package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
  315. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  316. package/lib/commands/project/create/use-format-code.d.ts +1 -0
  317. package/lib/commands/project/create/use-format-code.js +1 -1
  318. package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
  319. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  320. package/lib/commands/project/index.d.ts +2 -0
  321. package/lib/commands/project/index.js +1 -1
  322. package/lib/commands/project/upgrade.d.ts +1 -0
  323. package/lib/commands/project/upgrade.js +1 -1
  324. package/lib/commands/registry.d.ts +66 -0
  325. package/lib/commands/registry.js +1 -1
  326. package/lib/commands/role/create.d.ts +2 -0
  327. package/lib/commands/role/create.js +1 -1
  328. package/lib/commands/role/delete.d.ts +2 -0
  329. package/lib/commands/role/delete.js +1 -1
  330. package/lib/commands/role/detail.d.ts +2 -0
  331. package/lib/commands/role/detail.js +1 -1
  332. package/lib/commands/role/index.d.ts +2 -0
  333. package/lib/commands/role/index.js +1 -1
  334. package/lib/commands/role/list.d.ts +2 -0
  335. package/lib/commands/role/list.js +1 -1
  336. package/lib/commands/role/shared.d.ts +107 -0
  337. package/lib/commands/role/shared.js +1 -1
  338. package/lib/commands/role/update.d.ts +2 -0
  339. package/lib/commands/role/update.js +1 -1
  340. package/lib/commands/role/user-add.d.ts +2 -0
  341. package/lib/commands/role/user-add.js +1 -1
  342. package/lib/commands/role/user-remove.d.ts +2 -0
  343. package/lib/commands/role/user-remove.js +1 -1
  344. package/lib/commands/role/user-resolve.d.ts +2 -0
  345. package/lib/commands/role/user-resolve.js +1 -1
  346. package/lib/commands/run/index.d.ts +2 -0
  347. package/lib/commands/run/index.js +1 -1
  348. package/lib/commands/schema.d.ts +5 -0
  349. package/lib/commands/schema.js +1 -1
  350. package/lib/commands/sql/create.d.ts +10 -0
  351. package/lib/commands/sql/create.js +1 -1
  352. package/lib/commands/sql/delete.d.ts +5 -0
  353. package/lib/commands/sql/delete.js +1 -1
  354. package/lib/commands/sql/detail.d.ts +2 -0
  355. package/lib/commands/sql/detail.js +1 -1
  356. package/lib/commands/sql/exec.d.ts +2 -0
  357. package/lib/commands/sql/exec.js +1 -1
  358. package/lib/commands/sql/index.d.ts +5 -0
  359. package/lib/commands/sql/index.js +1 -1
  360. package/lib/commands/sql/list.d.ts +2 -0
  361. package/lib/commands/sql/list.js +1 -1
  362. package/lib/commands/sql/pull.d.ts +5 -0
  363. package/lib/commands/sql/pull.js +1 -1
  364. package/lib/commands/sql/push.d.ts +5 -0
  365. package/lib/commands/sql/push.js +1 -1
  366. package/lib/commands/sql/shared.d.ts +23 -0
  367. package/lib/commands/sql/shared.js +1 -1
  368. package/lib/commands/sql/status.d.ts +5 -0
  369. package/lib/commands/sql/status.js +1 -1
  370. package/lib/commands/sql/validate.d.ts +2 -0
  371. package/lib/commands/sql/validate.js +1 -1
  372. package/lib/commands/task/index.d.ts +2 -0
  373. package/lib/commands/task/index.js +1 -1
  374. package/lib/commands/task/status.d.ts +2 -0
  375. package/lib/commands/task/status.js +1 -1
  376. package/lib/commands/tenant/index.d.ts +2 -0
  377. package/lib/commands/tenant/index.js +1 -1
  378. package/lib/commands/tenant/members-list.d.ts +2 -0
  379. package/lib/commands/tenant/members-list.js +1 -1
  380. package/lib/commands/tenant/shared.d.ts +10 -0
  381. package/lib/commands/tenant/shared.js +1 -1
  382. package/lib/commands/workspace/add.d.ts +6 -0
  383. package/lib/commands/workspace/add.js +1 -1
  384. package/lib/commands/workspace/index.d.ts +11 -0
  385. package/lib/commands/workspace/index.js +1 -1
  386. package/lib/commands/workspace/remove.d.ts +6 -0
  387. package/lib/commands/workspace/remove.js +1 -1
  388. package/lib/config/schema.d.ts +50 -0
  389. package/lib/config/schema.js +1 -1
  390. package/lib/constant/cdn.d.ts +1 -0
  391. package/lib/constant/cdn.js +1 -1
  392. package/lib/constant/cli.d.ts +34 -0
  393. package/lib/constant/cli.js +1 -1
  394. package/lib/constant/defaults.d.ts +10 -0
  395. package/lib/constant/defaults.js +1 -1
  396. package/lib/constant/domain.d.ts +14 -0
  397. package/lib/constant/domain.js +1 -1
  398. package/lib/constant/env.d.ts +11 -0
  399. package/lib/constant/env.js +1 -1
  400. package/lib/constant/output.d.ts +1 -0
  401. package/lib/constant/output.js +1 -1
  402. package/lib/constant/paths.d.ts +5 -0
  403. package/lib/constant/paths.js +1 -1
  404. package/lib/constant/risk.d.ts +1 -0
  405. package/lib/constant/risk.js +1 -1
  406. package/lib/context/app-resolver.d.ts +36 -0
  407. package/lib/context/app-resolver.js +1 -1
  408. package/lib/context/auth-resolver.d.ts +5 -0
  409. package/lib/context/auth-resolver.js +1 -1
  410. package/lib/context/config-loader.d.ts +61 -0
  411. package/lib/context/config-loader.js +1 -1
  412. package/lib/context.d.ts +102 -0
  413. package/lib/context.js +1 -1
  414. package/lib/core/alias-resolver.d.ts +31 -0
  415. package/lib/core/alias-resolver.js +1 -1
  416. package/lib/core/api-client.d.ts +1018 -0
  417. package/lib/core/api-client.js +1 -1
  418. package/lib/core/bff/config.d.ts +8 -0
  419. package/lib/core/bff/config.js +1 -1
  420. package/lib/core/bff/file-system.d.ts +28 -0
  421. package/lib/core/bff/file-system.js +1 -1
  422. package/lib/core/bff/hash.d.ts +7 -0
  423. package/lib/core/bff/hash.js +1 -1
  424. package/lib/core/bff/lock.d.ts +25 -0
  425. package/lib/core/bff/lock.js +1 -1
  426. package/lib/core/bff/types.d.ts +92 -0
  427. package/lib/core/bff/utils.d.ts +25 -0
  428. package/lib/core/bff/utils.js +1 -1
  429. package/lib/core/db-resolver.d.ts +43 -0
  430. package/lib/core/db-resolver.js +1 -1
  431. package/lib/core/page/file-system.d.ts +6 -0
  432. package/lib/core/page/file-system.js +1 -1
  433. package/lib/core/page/hash.d.ts +4 -0
  434. package/lib/core/page/hash.js +1 -1
  435. package/lib/core/page/lock.d.ts +8 -0
  436. package/lib/core/page/lock.js +1 -1
  437. package/lib/core/page/types.d.ts +22 -0
  438. package/lib/core/sql-index-auditor.d.ts +33 -0
  439. package/lib/core/sql-index-auditor.js +1 -1
  440. package/lib/core/sql-sync/config.d.ts +7 -0
  441. package/lib/core/sql-sync/config.js +1 -1
  442. package/lib/core/sql-sync/file-system.d.ts +7 -0
  443. package/lib/core/sql-sync/file-system.js +1 -1
  444. package/lib/core/sql-sync/hash.d.ts +5 -0
  445. package/lib/core/sql-sync/hash.js +1 -1
  446. package/lib/core/sql-sync/lock.d.ts +14 -0
  447. package/lib/core/sql-sync/lock.js +1 -1
  448. package/lib/core/sql-sync/types.d.ts +43 -0
  449. package/lib/core/sql-sync/utils.d.ts +10 -0
  450. package/lib/core/sql-sync/utils.js +1 -1
  451. package/lib/core/sql-validator.d.ts +34 -0
  452. package/lib/core/sql-validator.js +1 -1
  453. package/lib/errors.d.ts +3 -0
  454. package/lib/errors.js +1 -1
  455. package/lib/framework/build-all-flags.d.ts +2 -0
  456. package/lib/framework/build-all-flags.js +1 -1
  457. package/lib/framework/error-output.d.ts +9 -0
  458. package/lib/framework/error-output.js +1 -1
  459. package/lib/framework/explicit-yes.d.ts +3 -0
  460. package/lib/framework/explicit-yes.js +1 -1
  461. package/lib/framework/flags.d.ts +3 -0
  462. package/lib/framework/flags.js +1 -1
  463. package/lib/framework/help.d.ts +4 -0
  464. package/lib/framework/help.js +1 -1
  465. package/lib/framework/index.d.ts +11 -0
  466. package/lib/framework/index.js +1 -1
  467. package/lib/framework/output.d.ts +15 -0
  468. package/lib/framework/output.js +1 -1
  469. package/lib/framework/response.d.ts +2 -0
  470. package/lib/framework/response.js +1 -1
  471. package/lib/framework/runner-alias.d.ts +14 -0
  472. package/lib/framework/runner-alias.js +1 -1
  473. package/lib/framework/runner.d.ts +36 -0
  474. package/lib/framework/runner.js +1 -1
  475. package/lib/framework/schema-export.d.ts +3 -0
  476. package/lib/framework/schema-export.js +1 -1
  477. package/lib/framework/types.d.ts +63 -0
  478. package/lib/framework/types.js +1 -1
  479. package/lib/generated/build-info.d.ts +4 -0
  480. package/lib/generated/build-info.js +1 -1
  481. package/lib/help.d.ts +1 -0
  482. package/lib/help.js +1 -1
  483. package/lib/runtime/confirmation.d.ts +4 -0
  484. package/lib/runtime/confirmation.js +1 -0
  485. package/lib/runtime/event.d.ts +5 -0
  486. package/lib/runtime/event.js +1 -0
  487. package/lib/runtime/index.d.ts +7 -0
  488. package/lib/runtime/index.js +1 -0
  489. package/lib/runtime/queue.d.ts +5 -0
  490. package/lib/runtime/queue.js +1 -0
  491. package/lib/runtime/resolve.d.ts +8 -0
  492. package/lib/runtime/resolve.js +1 -0
  493. package/lib/runtime/types.d.ts +50 -0
  494. package/lib/runtime/types.js +1 -0
  495. package/lib/skills/main.d.ts +41 -0
  496. package/lib/skills/main.js +1 -1
  497. package/lib/skills/npx-skills-add.d.ts +99 -0
  498. package/lib/skills/npx-skills-add.js +1 -1
  499. package/lib/skills/skill-presence.d.ts +44 -0
  500. package/lib/skills/skill-presence.js +1 -1
  501. package/lib/telemetry/cli-command-trace.d.ts +12 -0
  502. package/lib/telemetry/cli-command-trace.js +1 -1
  503. package/lib/telemetry/cli-help-trace.d.ts +8 -0
  504. package/lib/telemetry/cli-help-trace.js +1 -1
  505. package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
  506. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  507. package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
  508. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  509. package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
  510. package/lib/telemetry/send-cli-trace-log.js +1 -1
  511. package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
  512. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  513. package/lib/types/index.d.ts +93 -0
  514. package/lib/utils/ai_config.d.ts +47 -0
  515. package/lib/utils/ai_config.js +1 -1
  516. package/lib/utils/apply-jq-filter.d.ts +1 -0
  517. package/lib/utils/apply-jq-filter.js +1 -1
  518. package/lib/utils/cdn-config.d.ts +42 -0
  519. package/lib/utils/cdn-config.js +1 -1
  520. package/lib/utils/check-sdk-version.d.ts +23 -0
  521. package/lib/utils/check-sdk-version.js +1 -1
  522. package/lib/utils/cli-version-check.d.ts +37 -0
  523. package/lib/utils/cli-version-check.js +1 -1
  524. package/lib/utils/cli-version-policy.d.ts +9 -0
  525. package/lib/utils/cli-version-policy.js +1 -1
  526. package/lib/utils/config.d.ts +42 -0
  527. package/lib/utils/config.js +1 -1
  528. package/lib/utils/copy-directory.d.ts +1 -0
  529. package/lib/utils/copy-directory.js +1 -1
  530. package/lib/utils/entity-with-id.d.ts +30 -0
  531. package/lib/utils/entity-with-id.js +1 -1
  532. package/lib/utils/file-utils.d.ts +25 -0
  533. package/lib/utils/file-utils.js +1 -1
  534. package/lib/utils/guides-cdn.d.ts +80 -0
  535. package/lib/utils/guides-cdn.js +1 -1
  536. package/lib/utils/http-client.d.ts +30 -0
  537. package/lib/utils/http-client.js +1 -1
  538. package/lib/utils/is-non-interactive.d.ts +7 -0
  539. package/lib/utils/is-non-interactive.js +1 -1
  540. package/lib/utils/logger.d.ts +62 -0
  541. package/lib/utils/logger.js +1 -1
  542. package/lib/utils/params.d.ts +15 -0
  543. package/lib/utils/params.js +1 -1
  544. package/lib/utils/platform.d.ts +21 -0
  545. package/lib/utils/platform.js +1 -1
  546. package/lib/utils/rules-cdn.d.ts +38 -0
  547. package/lib/utils/rules-cdn.js +1 -1
  548. package/lib/utils/sleep.d.ts +1 -0
  549. package/lib/utils/sleep.js +1 -1
  550. package/lib/utils/template-replacer.d.ts +55 -0
  551. package/lib/utils/template-replacer.js +1 -1
  552. package/lib/utils/update-notice.d.ts +10 -0
  553. package/lib/utils/update-notice.js +1 -1
  554. package/lib/utils/version.d.ts +1 -0
  555. package/lib/utils/version.js +1 -1
  556. package/lib/utils/with-active-cookie.d.ts +1 -0
  557. package/lib/utils/with-active-cookie.js +1 -1
  558. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  559. package/lib/utils/write-cli-side-channel.js +1 -1
  560. package/package.json +9 -1
  561. package/lib/commands/page/react/create.js +0 -1
  562. package/lib/commands/page/react/detail.js +0 -1
  563. package/lib/commands/page/react/list.js +0 -1
  564. package/lib/commands/page/react/publish.js +0 -1
  565. package/lib/commands/page/react/shared.js +0 -1
  566. package/lib/commands/page/react/syntax.js +0 -1
  567. package/lib/commands/page/react/template.js +0 -1
  568. package/lib/commands/page/react/update.js +0 -1
@@ -1 +1 @@
1
- function a248_0x1f68(_0x1f98ec,_0x5407ab){_0x1f98ec=_0x1f98ec-0x1d0;var _0x1b75bd=a248_0x1b75();var _0x1f68ca=_0x1b75bd[_0x1f98ec];return _0x1f68ca;}(function(_0x127594,_0x421485){var _0x51673e=a248_0x1f68,_0x14a956=_0x127594();while(!![]){try{var _0x576f8c=parseInt(_0x51673e(0x1d3))/0x1+parseInt(_0x51673e(0x1d8))/0x2*(-parseInt(_0x51673e(0x1d7))/0x3)+-parseInt(_0x51673e(0x1d0))/0x4+-parseInt(_0x51673e(0x1d6))/0x5*(parseInt(_0x51673e(0x1d5))/0x6)+parseInt(_0x51673e(0x1d2))/0x7+parseInt(_0x51673e(0x1d1))/0x8+parseInt(_0x51673e(0x1d4))/0x9;if(_0x576f8c===_0x421485)break;else _0x14a956['push'](_0x14a956['shift']());}catch(_0x444bf1){_0x14a956['push'](_0x14a956['shift']());}}}(a248_0x1b75,0x5a651));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';function a248_0x1b75(){var _0x15874c=['2594915SdOGUP','42rhQEKF','76064tsujUV','1156084QPAqHj','4582888qujEoV','2467206eMOBVk','137581gKrtFW','5830281kTgbsr','6WhPoYs'];a248_0x1b75=function(){return _0x15874c;};return a248_0x1b75();}
1
+ function a240_0x123a(){var _0x59f882=['12939Ojjswg','817515ozghwQ','62774860PBFWUK','4398003JvIXws','16FTSikX','13180153fkexxk','1194724KfqxXq','3090uOFQcf','626aaLFvq','48HOxvQw'];a240_0x123a=function(){return _0x59f882;};return a240_0x123a();}function a240_0x1824(_0x55a57a,_0xbf27b0){_0x55a57a=_0x55a57a-0x78;var _0x123a6c=a240_0x123a();var _0x1824fa=_0x123a6c[_0x55a57a];return _0x1824fa;}(function(_0x5e76ac,_0x2062fb){var _0x576574=a240_0x1824,_0xf01254=_0x5e76ac();while(!![]){try{var _0x9c828c=-parseInt(_0x576574(0x79))/0x1+-parseInt(_0x576574(0x80))/0x2*(parseInt(_0x576574(0x78))/0x3)+-parseInt(_0x576574(0x7e))/0x4+-parseInt(_0x576574(0x7f))/0x5*(-parseInt(_0x576574(0x81))/0x6)+-parseInt(_0x576574(0x7d))/0x7+-parseInt(_0x576574(0x7c))/0x8*(parseInt(_0x576574(0x7b))/0x9)+parseInt(_0x576574(0x7a))/0xa;if(_0x9c828c===_0x2062fb)break;else _0xf01254['push'](_0xf01254['shift']());}catch(_0x1fc96c){_0xf01254['push'](_0xf01254['shift']());}}}(a240_0x123a,0xe9694));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat,commandAllowsOptionalAuth,commandRequiresAuth,formatDeprecatedCommandMessage,resolveCommandAuthMode}from'@lovrabet/cli-framework';
@@ -0,0 +1,4 @@
1
+ export declare const VERSION = "2.3.16-beta.5";
2
+ export declare const GIT_TAG = "v2.3.16-beta.5";
3
+ export declare const GIT_COMMIT = "8d08075";
4
+ export declare const BUILD_TIME = "2026-08-10T16:33:24.074Z";
@@ -1 +1 @@
1
- const a249_0x46182f=a249_0x3697;(function(_0x795194,_0x13f5ea){const _0x43380c=a249_0x3697,_0x2e5370=_0x795194();while(!![]){try{const _0x15400c=parseInt(_0x43380c(0xd3))/0x1*(-parseInt(_0x43380c(0xd2))/0x2)+parseInt(_0x43380c(0xd0))/0x3+parseInt(_0x43380c(0xc9))/0x4*(parseInt(_0x43380c(0xd5))/0x5)+-parseInt(_0x43380c(0xcd))/0x6*(parseInt(_0x43380c(0xcb))/0x7)+-parseInt(_0x43380c(0xd1))/0x8*(parseInt(_0x43380c(0xcf))/0x9)+parseInt(_0x43380c(0xcc))/0xa*(-parseInt(_0x43380c(0xc7))/0xb)+parseInt(_0x43380c(0xc8))/0xc;if(_0x15400c===_0x13f5ea)break;else _0x2e5370['push'](_0x2e5370['shift']());}catch(_0x3a9364){_0x2e5370['push'](_0x2e5370['shift']());}}}(a249_0x53e3,0xad103));function a249_0x3697(_0xedf9af,_0x318d4c){_0xedf9af=_0xedf9af-0xc7;const _0x53e398=a249_0x53e3();let _0x36973d=_0x53e398[_0xedf9af];return _0x36973d;}export const VERSION=a249_0x46182f(0xca);export const GIT_TAG=a249_0x46182f(0xce);function a249_0x53e3(){const _0x38c395=['2.3.16-beta.3','439425ATUKfi','130UHmaGZ','102rqqdDN','v2.3.16-beta.3','117KMEwRP','2126178XchENU','757672UNIjGA','152594pPxXIg','8kBkzAv','19e4c96','10deTnrO','41074JZATuY','27464316NuEjUi','1337516tSLthv'];a249_0x53e3=function(){return _0x38c395;};return a249_0x53e3();}export const GIT_COMMIT=a249_0x46182f(0xd4);export const BUILD_TIME='2026-08-10T11:33:38.793Z';
1
+ function a241_0x5ef7(){const _0x109aee=['27129cShfgi','2618484bXVNaf','207YusXDZ','v2.3.16-beta.5','4IuYfhq','8532230YqZLbX','242753MGhGXe','8d08075','2042780LznNdi','5opuxxQ','2026-08-10T16:33:24.074Z','2304330uovbin','102VpRIUa','121496PZwNcY','2.3.16-beta.5'];a241_0x5ef7=function(){return _0x109aee;};return a241_0x5ef7();}const a241_0x81a5be=a241_0x469e;function a241_0x469e(_0x37f459,_0x1da62e){_0x37f459=_0x37f459-0x177;const _0x5ef72b=a241_0x5ef7();let _0x469e4f=_0x5ef72b[_0x37f459];return _0x469e4f;}(function(_0x2ad4fe,_0x43b7dc){const _0x106d4e=a241_0x469e,_0xdc5c06=_0x2ad4fe();while(!![]){try{const _0x18b306=-parseInt(_0x106d4e(0x177))/0x1*(-parseInt(_0x106d4e(0x17b))/0x2)+parseInt(_0x106d4e(0x182))/0x3+-parseInt(_0x106d4e(0x17f))/0x4*(parseInt(_0x106d4e(0x180))/0x5)+parseInt(_0x106d4e(0x183))/0x6*(parseInt(_0x106d4e(0x17d))/0x7)+-parseInt(_0x106d4e(0x184))/0x8*(-parseInt(_0x106d4e(0x179))/0x9)+-parseInt(_0x106d4e(0x17c))/0xa+parseInt(_0x106d4e(0x178))/0xb;if(_0x18b306===_0x43b7dc)break;else _0xdc5c06['push'](_0xdc5c06['shift']());}catch(_0x112385){_0xdc5c06['push'](_0xdc5c06['shift']());}}}(a241_0x5ef7,0x9b1ca));export const VERSION=a241_0x81a5be(0x185);export const GIT_TAG=a241_0x81a5be(0x17a);export const GIT_COMMIT=a241_0x81a5be(0x17e);export const BUILD_TIME=a241_0x81a5be(0x181);
package/lib/help.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function showHelp(): void;
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x48294f,_0x7fd83e){var _0x50cbf9=a250_0x2dfb,_0x1493d0=_0x48294f();while(!![]){try{var _0x340453=parseInt(_0x50cbf9(0x90))/0x1*(-parseInt(_0x50cbf9(0x92))/0x2)+-parseInt(_0x50cbf9(0x8e))/0x3+parseInt(_0x50cbf9(0x8c))/0x4+-parseInt(_0x50cbf9(0x9a))/0x5+-parseInt(_0x50cbf9(0x91))/0x6*(parseInt(_0x50cbf9(0x8d))/0x7)+-parseInt(_0x50cbf9(0x95))/0x8*(parseInt(_0x50cbf9(0x99))/0x9)+parseInt(_0x50cbf9(0x94))/0xa;if(_0x340453===_0x7fd83e)break;else _0x1493d0['push'](_0x1493d0['shift']());}catch(_0x1e73b1){_0x1493d0['push'](_0x1493d0['shift']());}}}(a250_0x55bf,0xcf091));import a250_0x594b34 from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a250_0x2dfb(_0x2812f7,_0xa0b095){_0x2812f7=_0x2812f7-0x8b;var _0x55bf49=a250_0x55bf();var _0x2dfb8a=_0x55bf49[_0x2812f7];return _0x2dfb8a;}export function showHelp(){var _0x54db93=a250_0x2dfb;console[_0x54db93(0x98)](),console[_0x54db93(0x98)](a250_0x594b34['green'][_0x54db93(0x8f)]('\x20\x20'+CLI_DISPLAY_NAME)),console[_0x54db93(0x98)](),console['log'](_0x54db93(0x96)+a250_0x594b34[_0x54db93(0x93)][_0x54db93(0x8f)](CLI_BIN_NAME+_0x54db93(0x97))+_0x54db93(0x8b)),console[_0x54db93(0x98)]();}function a250_0x55bf(){var _0x27763e=['\x20\x20Use\x20','\x20--help','log','81ZdZQls','7026885zwHJgj','\x20to\x20view\x20available\x20commands.','5911120WshaMW','124628LYwCLc','2165124ZVLAit','bold','9ydxWxD','480EIFfbT','32102EWOjCO','green','39100760HOGlfc','750200iahZjM'];a250_0x55bf=function(){return _0x27763e;};return a250_0x55bf();}
1
+ function a242_0x4a3b(){var _0x4454f4=['2200504IeQECD','log','6OBgNVo','12NyyaVs','4905441ptIhiO','\x20to\x20view\x20available\x20commands.','1667364fSLyUI','369280ivfAYU','1839905nmJCEV','bold','green','2786924cCPnyR','4gTvhYj','61178gpapIe','\x20\x20Use\x20'];a242_0x4a3b=function(){return _0x4454f4;};return a242_0x4a3b();}(function(_0x174ffe,_0x113035){var _0x35d28d=a242_0x90f8,_0x155207=_0x174ffe();while(!![]){try{var _0x16b6d8=parseInt(_0x35d28d(0x73))/0x1*(parseInt(_0x35d28d(0x6e))/0x2)+parseInt(_0x35d28d(0x76))/0x3+parseInt(_0x35d28d(0x6d))/0x4*(-parseInt(_0x35d28d(0x69))/0x5)+-parseInt(_0x35d28d(0x72))/0x6*(parseInt(_0x35d28d(0x6c))/0x7)+-parseInt(_0x35d28d(0x70))/0x8+parseInt(_0x35d28d(0x74))/0x9+-parseInt(_0x35d28d(0x68))/0xa;if(_0x16b6d8===_0x113035)break;else _0x155207['push'](_0x155207['shift']());}catch(_0x1c8dff){_0x155207['push'](_0x155207['shift']());}}}(a242_0x4a3b,0x5f2a9));import a242_0x423bb9 from'chalk';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a242_0x90f8(_0x22194d,_0xb728be){_0x22194d=_0x22194d-0x68;var _0x4a3b23=a242_0x4a3b();var _0x90f8c6=_0x4a3b23[_0x22194d];return _0x90f8c6;}export function showHelp(){var _0x400245=a242_0x90f8;console[_0x400245(0x71)](),console[_0x400245(0x71)](a242_0x423bb9[_0x400245(0x6b)][_0x400245(0x6a)]('\x20\x20'+CLI_DISPLAY_NAME)),console['log'](),console[_0x400245(0x71)](_0x400245(0x6f)+a242_0x423bb9[_0x400245(0x6b)]['bold'](CLI_BIN_NAME+'\x20--help')+_0x400245(0x75)),console[_0x400245(0x71)]();}
@@ -0,0 +1,4 @@
1
+ /** 将命令声明收敛为脱敏、单行且有长度上限的原生确认请求。 */
2
+ import type { CommandDefinition } from "../framework/types.js";
3
+ import type { RabetbaseConfirmationRequest } from "../runtime/types.js";
4
+ export declare function buildRabetbaseConfirmationRequest(definition: CommandDefinition, operation: string, signal?: AbortSignal): RabetbaseConfirmationRequest;
@@ -0,0 +1 @@
1
+ (function(_0x58f992,_0x22f22d){const _0x520cc1=a243_0x1aa1,_0x2973d9=_0x58f992();while(!![]){try{const _0x344d73=parseInt(_0x520cc1(0xb5))/0x1+parseInt(_0x520cc1(0xaf))/0x2+parseInt(_0x520cc1(0xb0))/0x3+parseInt(_0x520cc1(0xbe))/0x4*(parseInt(_0x520cc1(0xb3))/0x5)+-parseInt(_0x520cc1(0xa9))/0x6*(-parseInt(_0x520cc1(0xba))/0x7)+-parseInt(_0x520cc1(0xac))/0x8*(-parseInt(_0x520cc1(0xab))/0x9)+parseInt(_0x520cc1(0xb4))/0xa*(-parseInt(_0x520cc1(0xb1))/0xb);if(_0x344d73===_0x22f22d)break;else _0x2973d9['push'](_0x2973d9['shift']());}catch(_0x4e770e){_0x2973d9['push'](_0x2973d9['shift']());}}}(a243_0x7ded,0xe40ba));function a243_0x7ded(){const _0x104895=['2091864IxsqRz',';该操作可能覆盖、删除或明显影响线上运行行为。','54xtygXE','high-risk-write','5328DfiYcg','160yvoFuM','write',';该操作可能创建或修改业务数据或本地配置。','813842MmoRPd','3255441YFvwON','23606wwRHnr','trim','15CQltce','12850xqWFoS','150833aWNZRt','string','slice','将执行写入操作\x20','risk','364035OGCcxF','confirmationDescription','Rabetbase\x20confirmation\x20requires\x20a\x20write\x20command.','replace'];a243_0x7ded=function(){return _0x104895;};return a243_0x7ded();}const DESCRIPTION_MAX_LENGTH=0x1f4;function a243_0x1aa1(_0x1afa38,_0x1b6077){_0x1afa38=_0x1afa38-0xa9;const _0x7ded8c=a243_0x7ded();let _0x1aa149=_0x7ded8c[_0x1afa38];return _0x1aa149;}export function buildRabetbaseConfirmationRequest(_0x2d325e,_0x417181,_0x3043e6){const _0x577225=a243_0x1aa1,_0x3ad610=normalizeText(_0x2d325e[_0x577225(0xbb)],DESCRIPTION_MAX_LENGTH),_0x5750cf=_0x3ad610||normalizeText(defaultDescription(requireWriteRisk(_0x2d325e),_0x417181),DESCRIPTION_MAX_LENGTH);return{'operation':_0x417181,'risk':requireWriteRisk(_0x2d325e),'description':_0x5750cf,..._0x3043e6?{'signal':_0x3043e6}:{}};}function requireWriteRisk(_0x5921d0){const _0x492b05=a243_0x1aa1;if(_0x5921d0['risk']===_0x492b05(0xad)||_0x5921d0[_0x492b05(0xb9)]===_0x492b05(0xaa))return _0x5921d0[_0x492b05(0xb9)];throw new Error(_0x492b05(0xbc));}function defaultDescription(_0x148b66,_0x309044){const _0x4a31b0=a243_0x1aa1;if(_0x148b66===_0x4a31b0(0xaa))return'将执行高风险写入操作\x20'+_0x309044+_0x4a31b0(0xbf);return _0x4a31b0(0xb8)+_0x309044+_0x4a31b0(0xae);}function normalizeText(_0x5c3328,_0x31c68e){const _0x2178b6=a243_0x1aa1;if(typeof _0x5c3328!==_0x2178b6(0xb6))return'';return _0x5c3328[_0x2178b6(0xbd)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x2178b6(0xbd)](/\s+/g,'\x20')[_0x2178b6(0xb2)]()[_0x2178b6(0xb7)](0x0,_0x31c68e);}
@@ -0,0 +1,5 @@
1
+ /** 生成不含 argv、凭证或业务内容的最小写入成功事件。 */
2
+ import type { CommandDefinition, CommandResult } from "../framework/types.js";
3
+ import type { RabetbaseStructuredMetadata } from "../runtime/types.js";
4
+ export declare function canonicalRabetbaseOperation(definition: Pick<CommandDefinition, "service" | "command">): string;
5
+ export declare function createRabetbaseWriteMetadata(definition: CommandDefinition, operation: string, result: CommandResult, dryRun: boolean): RabetbaseStructuredMetadata | undefined;
@@ -0,0 +1 @@
1
+ function a244_0x26a3(){var _0x3cffda=['217BJanJa','rabetbase.write.completed','88566KrmTrQ','command','1724JOcuCj','211624JKtENs','652524guiLIT','risk','1815gFMIOd','high-risk-write','786186xyLgwS','join','write','30sFKMOF','service','trim','filter','16180002ZngAZs','split','29584280toUNgk'];a244_0x26a3=function(){return _0x3cffda;};return a244_0x26a3();}(function(_0x20ac1e,_0x381c8a){var _0x521163=a244_0x3ade,_0x1e24b2=_0x20ac1e();while(!![]){try{var _0x3a5d29=-parseInt(_0x521163(0x170))/0x1+parseInt(_0x521163(0x17e))/0x2*(-parseInt(_0x521163(0x182))/0x3)+parseInt(_0x521163(0x180))/0x4+-parseInt(_0x521163(0x173))/0x5*(-parseInt(_0x521163(0x17c))/0x6)+-parseInt(_0x521163(0x17a))/0x7*(-parseInt(_0x521163(0x17f))/0x8)+-parseInt(_0x521163(0x177))/0x9+parseInt(_0x521163(0x179))/0xa;if(_0x3a5d29===_0x381c8a)break;else _0x1e24b2['push'](_0x1e24b2['shift']());}catch(_0x1e3d1c){_0x1e24b2['push'](_0x1e24b2['shift']());}}}(a244_0x26a3,0xe1c16));export function canonicalRabetbaseOperation(_0x568e78){var _0x3a3d11=a244_0x3ade;return[_0x568e78[_0x3a3d11(0x174)],..._0x568e78[_0x3a3d11(0x17d)][_0x3a3d11(0x175)]()[_0x3a3d11(0x178)](/\s+/)][_0x3a3d11(0x176)](Boolean)[_0x3a3d11(0x171)]('.');}function a244_0x3ade(_0xf896d0,_0x5aa1e1){_0xf896d0=_0xf896d0-0x170;var _0x26a391=a244_0x26a3();var _0x3ade33=_0x26a391[_0xf896d0];return _0x3ade33;}export function createRabetbaseWriteMetadata(_0x4b2a02,_0x32a07d,_0x2733c4,_0x2a36f8){var _0x5d8011=a244_0x3ade;if(_0x2a36f8||_0x2733c4['ok']!==!![]||_0x4b2a02[_0x5d8011(0x181)]!==_0x5d8011(0x172)&&_0x4b2a02[_0x5d8011(0x181)]!==_0x5d8011(0x183))return undefined;return{'rabetbase':{'schemaVersion':0x1,'event':{'type':_0x5d8011(0x17b),'operation':_0x32a07d,'risk':_0x4b2a02[_0x5d8011(0x181)]}}};}
@@ -0,0 +1,7 @@
1
+ /** Rabetbase CLI 嵌入式运行时入口。 */
2
+ import type { InvokeRabetbaseOptions, InvokeRabetbaseResult } from "../runtime/types.js";
3
+ export type { InvokeRabetbaseOptions, InvokeRabetbaseResult, RabetbaseConfirmationAdapter, RabetbaseConfirmationRequest, RabetbasePresentationAdapter, RabetbasePresentationRequest, RabetbaseStructuredMetadata, RabetbaseWriteCompletedEvent, } from "../runtime/types.js";
4
+ /**
5
+ * 通过终端同一 registry/runner 执行 argv;write/high-risk-write 在副作用前确认。
6
+ */
7
+ export declare function invokeRabetbase(argv: readonly string[], options: InvokeRabetbaseOptions): Promise<InvokeRabetbaseResult>;
@@ -0,0 +1 @@
1
+ (function(_0x3bde3e,_0x1c0aff){const _0xfd94c8=a245_0x2fe9,_0x3c80f4=_0x3bde3e();while(!![]){try{const _0x3878c3=parseInt(_0xfd94c8(0x167))/0x1*(-parseInt(_0xfd94c8(0x16d))/0x2)+parseInt(_0xfd94c8(0x15e))/0x3+-parseInt(_0xfd94c8(0x174))/0x4+parseInt(_0xfd94c8(0x16f))/0x5+-parseInt(_0xfd94c8(0x171))/0x6+-parseInt(_0xfd94c8(0x16b))/0x7*(parseInt(_0xfd94c8(0x177))/0x8)+parseInt(_0xfd94c8(0x175))/0x9*(parseInt(_0xfd94c8(0x16e))/0xa);if(_0x3878c3===_0x1c0aff)break;else _0x3c80f4['push'](_0x3c80f4['shift']());}catch(_0x18f00f){_0x3c80f4['push'](_0x3c80f4['shift']());}}}(a245_0x37db,0x342f8));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createPipelineEnv,createRabetbaseRunnerAdapter,finalizeRabetbaseRuntimeState,runCommand}from'../framework/runner.js';import{buildRabetbaseConfirmationRequest}from'../runtime/confirmation.js';import{canonicalRabetbaseOperation,createRabetbaseWriteMetadata}from'../runtime/event.js';import{runSerialized}from'../runtime/queue.js';import{resolveRabetbaseInvocation}from'../runtime/resolve.js';const defaultPresentation={'present'({result:_0x5da534,command:_0x126ea5,risk:_0x144d64,dryRun:_0x2a38d2}){const _0xbc7121=a245_0x2fe9;return JSON[_0xbc7121(0x173)]({'ok':_0x5da534['ok'],'command':_0x126ea5,'risk':_0x144d64,..._0x2a38d2?{'dryRun':!![]}:{},..._0x5da534[_0xbc7121(0x16c)]!==undefined?{'data':_0x5da534[_0xbc7121(0x16c)]}:{},..._0x5da534['message']?{'message':_0x5da534[_0xbc7121(0x176)]}:{}});}};function a245_0x2fe9(_0x2f8276,_0x7ea3f6){_0x2f8276=_0x2f8276-0x15a;const _0x37db69=a245_0x37db();let _0x2fe9c5=_0x37db69[_0x2f8276];return _0x2fe9c5;}export async function invokeRabetbase(_0x578686,_0x200c75){const _0x2658c8=a245_0x2fe9;throwIfAborted(_0x200c75['signal']);const _0x702f09=await resolveRabetbaseInvocation(_0x578686),_0x223c32=canonicalRabetbaseOperation(_0x702f09[_0x2658c8(0x163)]);return await confirmWriteBeforeQueue(_0x702f09[_0x2658c8(0x163)],_0x702f09[_0x2658c8(0x17b)],_0x223c32,_0x200c75),runSerialized(async()=>{const _0x228d99=_0x2658c8,_0x17f213={};try{throwIfAborted(_0x200c75['signal']);const _0x3d2c00=buildConfigFromFlags(_0x702f09[_0x228d99(0x17b)]);await initGlobalEnvironment(_0x3d2c00);const _0x4c06dd=createPipelineEnv(_0x3d2c00,{..._0x702f09[_0x228d99(0x17b)],'yes':_0x702f09['definition']['risk']==='high-risk-write'?!![]:_0x702f09[_0x228d99(0x17b)][_0x228d99(0x15d)],'nonInteractive':!![]},_0x702f09[_0x228d99(0x162)]);_0x4c06dd[_0x228d99(0x15c)]=!![],_0x4c06dd[_0x228d99(0x166)]='high-risk-write';const _0x2e5117=withAbortSignal(_0x702f09[_0x228d99(0x163)],_0x200c75[_0x228d99(0x15f)]),_0x421bc4=createRabetbaseRunnerAdapter({'formatOutput'(_0x58e51d,_0x5cc5ca){const _0x443e4c=_0x228d99;_0x17f213[_0x443e4c(0x161)]=_0x58e51d,_0x17f213['command']=_0x5cc5ca['command'],_0x17f213['risk']=_0x5cc5ca[_0x443e4c(0x164)],_0x17f213[_0x443e4c(0x178)]=_0x5cc5ca['format'],_0x17f213[_0x443e4c(0x179)]=_0x5cc5ca['dryRun']===!![];},async 'confirmHighRisk'(){throw new Error('Embedded\x20Rabetbase\x20confirmation\x20must\x20run\x20before\x20the\x20execution\x20queue.');}});await runCommand(_0x2e5117,_0x4c06dd,_0x421bc4);if(!_0x17f213['result']||!_0x17f213[_0x228d99(0x16a)]||!_0x17f213[_0x228d99(0x164)]||!_0x17f213['format'])throw new Error(_0x228d99(0x17c));const _0x329df3=_0x17f213[_0x228d99(0x179)]===!![],_0x31a74b=_0x200c75[_0x228d99(0x160)]??defaultPresentation,_0x5e4714={'result':_0x17f213[_0x228d99(0x161)],'command':_0x17f213[_0x228d99(0x16a)],'operation':_0x223c32,'risk':_0x17f213['risk'],'format':_0x17f213[_0x228d99(0x178)],'dryRun':_0x329df3},_0x3b7093=createRabetbaseWriteMetadata(_0x702f09[_0x228d99(0x163)],_0x223c32,_0x17f213[_0x228d99(0x161)],_0x329df3);let _0x54b466;try{_0x54b466=await _0x31a74b['present'](_0x5e4714);}catch(_0x218b51){if(!_0x3b7093||_0x31a74b===defaultPresentation)throw _0x218b51;_0x54b466=await defaultPresentation[_0x228d99(0x165)](_0x5e4714);}return{'operation':_0x223c32,'risk':_0x17f213[_0x228d99(0x164)],'mode':_0x329df3?_0x228d99(0x15a):'execute','result':_0x17f213[_0x228d99(0x161)],'output':_0x54b466,..._0x3b7093?{'metadata':_0x3b7093}:{}};}finally{await finalizeRabetbaseRuntimeState();}});}async function confirmWriteBeforeQueue(_0x21152f,_0x5c5176,_0x1a63e8,_0xd897){const _0x2f0141=a245_0x2fe9;if(_0x5c5176[_0x2f0141(0x179)]===!![]||_0x21152f['risk']!==_0x2f0141(0x168)&&_0x21152f[_0x2f0141(0x164)]!=='high-risk-write')return;await _0xd897[_0x2f0141(0x172)][_0x2f0141(0x17e)](buildRabetbaseConfirmationRequest(_0x21152f,_0x1a63e8,_0xd897[_0x2f0141(0x15f)]));}function withAbortSignal(_0x250010,_0x7e3b3f){return{..._0x250010,async 'execute'(_0x1a4c2b){const _0x247a80=a245_0x2fe9;return throwIfAborted(_0x7e3b3f),_0x250010[_0x247a80(0x17d)](_0x1a4c2b);}};}function a245_0x37db(){const _0x17577c=['args','definition','risk','present','riskLevel','4jlmCNa','write','AbortError','command','799827WcROlq','data','141148xcrryH','110UFOXiJ','2112265tAbbbk','aborted','1582560hxfYNB','confirmation','stringify','1243912HWRPWk','633159VfWxzk','message','24qilfcM','format','dryRun','Rabetbase\x20invocation\x20aborted.','rawFlags','Rabetbase\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','execute','confirm','dry-run','reason','isNonInteractive','yes','651765PANxWm','signal','presentation','result'];a245_0x37db=function(){return _0x17577c;};return a245_0x37db();}function throwIfAborted(_0x29570b){const _0x1b59e0=a245_0x2fe9;if(_0x29570b?.[_0x1b59e0(0x170)])throw _0x29570b[_0x1b59e0(0x15b)]instanceof Error?_0x29570b['reason']:new DOMException(_0x1b59e0(0x17a),_0x1b59e0(0x169));}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 串行执行会访问进程级 cookie/env/domain 的阶段。
3
+ * 人工确认必须在进入此队列前完成,避免待确认写入阻塞无关的只读调用。
4
+ */
5
+ export declare function runSerialized<T>(task: () => Promise<T>): Promise<T>;
@@ -0,0 +1 @@
1
+ const a246_0x403396=a246_0x46e2;(function(_0x1ec4ff,_0x20e4bc){const _0x1f8956=a246_0x46e2,_0x1cbf02=_0x1ec4ff();while(!![]){try{const _0xb0ce92=parseInt(_0x1f8956(0x1ad))/0x1+parseInt(_0x1f8956(0x1aa))/0x2*(parseInt(_0x1f8956(0x1b0))/0x3)+parseInt(_0x1f8956(0x1ab))/0x4+parseInt(_0x1f8956(0x1b1))/0x5+-parseInt(_0x1f8956(0x1ac))/0x6+-parseInt(_0x1f8956(0x1ae))/0x7+parseInt(_0x1f8956(0x1a9))/0x8;if(_0xb0ce92===_0x20e4bc)break;else _0x1cbf02['push'](_0x1cbf02['shift']());}catch(_0x3fc2a1){_0x1cbf02['push'](_0x1cbf02['shift']());}}}(a246_0x3209,0x39d3d));function a246_0x46e2(_0x320de1,_0x49dfc3){_0x320de1=_0x320de1-0x1a9;const _0x320917=a246_0x3209();let _0x46e2a8=_0x320917[_0x320de1];return _0x46e2a8;}let tail=Promise[a246_0x403396(0x1af)]();function a246_0x3209(){const _0x443e93=['catch','452088cURSmg','2boOuLV','114700MqFkZW','521784ygeGfI','85472cFmLly','3223815JeapaD','resolve','436881ukwqTO','2340425xGByKV'];a246_0x3209=function(){return _0x443e93;};return a246_0x3209();}export async function runSerialized(_0x3694e4){const _0xafaea8=a246_0x403396,_0x3a4714=tail;let _0xc6db40;tail=new Promise(_0x543d39=>{_0xc6db40=_0x543d39;}),await _0x3a4714[_0xafaea8(0x1b2)](()=>undefined);try{return await _0x3694e4();}finally{_0xc6db40();}}
@@ -0,0 +1,8 @@
1
+ /** 用终端 CLI 的 registry 与 meow flags 解析一次嵌入式调用。 */
2
+ import type { CommandDefinition } from "../framework/types.js";
3
+ export interface ResolvedRabetbaseInvocation {
4
+ definition: CommandDefinition;
5
+ rawFlags: Record<string, any>;
6
+ args: string[];
7
+ }
8
+ export declare function resolveRabetbaseInvocation(argv: readonly string[]): Promise<ResolvedRabetbaseInvocation>;
@@ -0,0 +1 @@
1
+ function a247_0x1e07(){const _0x1d2cd0=['unknownCommand','Rabetbase\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','wildcardDef','168151uXxsjC','slice','Rabetbase\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','18843168vSGdEE','validation','4910915cnlNbx','`rabetbase\x20run`\x20is\x20unavailable\x20through\x20the\x20embedded\x20runtime\x20because\x20it\x20executes\x20arbitrary\x20package\x20scripts.','1209764RmLLtU','join','411132qnmfJY','defaultCommand','6343272SBpvqc','message','run','5935895LYyPXK','6eOfbiq','hint'];a247_0x1e07=function(){return _0x1d2cd0;};return a247_0x1e07();}(function(_0x570c41,_0x142c26){const _0x3700bb=a247_0x4287,_0x4cb522=_0x570c41();while(!![]){try{const _0x109934=parseInt(_0x3700bb(0x174))/0x1+-parseInt(_0x3700bb(0x169))/0x2+parseInt(_0x3700bb(0x16f))/0x3*(-parseInt(_0x3700bb(0x167))/0x4)+parseInt(_0x3700bb(0x179))/0x5+-parseInt(_0x3700bb(0x16b))/0x6+-parseInt(_0x3700bb(0x16e))/0x7+parseInt(_0x3700bb(0x177))/0x8;if(_0x109934===_0x142c26)break;else _0x4cb522['push'](_0x4cb522['shift']());}catch(_0x5960e3){_0x4cb522['push'](_0x4cb522['shift']());}}}(a247_0x1e07,0xc0e45));import a247_0x25f076 from'meow';function a247_0x4287(_0x4d10d3,_0x7d8597){_0x4d10d3=_0x4d10d3-0x167;const _0x1e07e8=a247_0x1e07();let _0x4287e1=_0x1e07e8[_0x4d10d3];return _0x4287e1;}import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveRabetbaseInvocation(_0x57d6b6){const _0x61185a=a247_0x4287,_0x238271=a247_0x25f076('',{'importMeta':import.meta,'argv':[..._0x57d6b6],'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x273739=[..._0x238271['input']],_0x7426a5=_0x238271['flags'],_0x27f369=_0x273739[0x0];if(!_0x27f369)throw CliErrors[_0x61185a(0x178)](_0x61185a(0x176));const _0x3cc895=resolveRemovedCommand(_0x27f369,_0x273739[0x1]);if(_0x3cc895)throw CliErrors[_0x61185a(0x178)](_0x3cc895[_0x61185a(0x16c)],_0x3cc895[_0x61185a(0x170)]);if(_0x27f369===_0x61185a(0x16d))throw CliErrors[_0x61185a(0x178)](_0x61185a(0x17a),'Use\x20an\x20explicit\x20shell\x20tool\x20only\x20when\x20script\x20execution\x20is\x20intentionally\x20requested.');if(!isKnownService(_0x27f369))throw CliErrors['unknownCommand'](_0x273739[_0x61185a(0x168)]('\x20'));const _0x4bf40b=getServiceEntry(_0x27f369),_0x469749=_0x273739[0x1],_0x24636c=_0x469749||_0x4bf40b[_0x61185a(0x16a)];if(!_0x24636c){if(_0x4bf40b[_0x61185a(0x173)])return{'definition':_0x4bf40b['wildcardDef'],'rawFlags':_0x7426a5,'args':[]};throw CliErrors[_0x61185a(0x178)](_0x61185a(0x172)+_0x27f369+'\x22.');}const _0x3c30c2=findDefinition(_0x27f369,_0x24636c);if(_0x3c30c2)return{'definition':_0x3c30c2,'rawFlags':_0x7426a5,'args':_0x273739[_0x61185a(0x175)](0x2)};if(_0x4bf40b[_0x61185a(0x173)])return{'definition':_0x4bf40b[_0x61185a(0x173)],'rawFlags':_0x7426a5,'args':[_0x24636c,..._0x273739[_0x61185a(0x175)](0x2)]};throw CliErrors[_0x61185a(0x171)](_0x27f369+'\x20'+_0x24636c);}
@@ -0,0 +1,50 @@
1
+ /** Rabetbase 嵌入式运行时与 Coworker 原生工具之间的稳定公共契约。 */
2
+ import type { CommandResult, OutputFormat, Risk } from "../framework/types.js";
3
+ export interface RabetbaseConfirmationRequest {
4
+ operation: string;
5
+ risk: Extract<Risk, "write" | "high-risk-write">;
6
+ description: string;
7
+ signal?: AbortSignal;
8
+ }
9
+ export interface RabetbaseConfirmationAdapter {
10
+ /** 在任何写入副作用发生前请求调用方确认;拒绝时通过抛错终止执行。 */
11
+ confirm(request: RabetbaseConfirmationRequest): Promise<void>;
12
+ }
13
+ export interface RabetbasePresentationRequest {
14
+ result: CommandResult;
15
+ command: string;
16
+ operation: string;
17
+ risk: Risk;
18
+ format: OutputFormat;
19
+ dryRun: boolean;
20
+ }
21
+ export interface RabetbasePresentationAdapter {
22
+ present(request: RabetbasePresentationRequest): string | Promise<string>;
23
+ }
24
+ export interface RabetbaseWriteCompletedEvent {
25
+ type: "rabetbase.write.completed";
26
+ operation: string;
27
+ risk: Extract<Risk, "write" | "high-risk-write">;
28
+ }
29
+ export interface RabetbaseStructuredMetadata {
30
+ rabetbase: {
31
+ schemaVersion: 1;
32
+ event: RabetbaseWriteCompletedEvent;
33
+ };
34
+ }
35
+ export interface InvokeRabetbaseOptions {
36
+ confirmation: RabetbaseConfirmationAdapter;
37
+ /**
38
+ * 自定义展示失败时,已成功的写入会降级为默认 JSON 输出,避免误报副作用失败。
39
+ */
40
+ presentation?: RabetbasePresentationAdapter;
41
+ signal?: AbortSignal;
42
+ }
43
+ export interface InvokeRabetbaseResult {
44
+ operation: string;
45
+ risk: Risk;
46
+ mode: "execute" | "dry-run";
47
+ result: CommandResult;
48
+ output: string;
49
+ metadata?: RabetbaseStructuredMetadata;
50
+ }
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Skill helper utilities. Public installation is exposed as `cli-skill install`.
3
+ */
4
+ /**
5
+ * 将 camelCase 对象的键转换为 kebab-case 字符串数组
6
+ *
7
+ * 扫描 flags 对象中所有值为 true 的键,转换为 kebab-case 格式
8
+ * 用于与指南中说明的 MCP/CLI 标志一致(如 enable-bff-save)
9
+ *
10
+ * @param flags - meow 解析后的 flags 对象
11
+ * @returns kebab-case 格式的标志名称数组
12
+ */
13
+ export declare function camelCaseFlagsToKebab(flags: Record<string, unknown>): string[];
14
+ /**
15
+ * 从 process.argv 手动解析 --xxx 格式的 flags
16
+ *
17
+ * meow 只解析在 flags 配置中声明的选项,为了支持动态 flags(如 --enable-bff-save、旧名 --dangerously-bff-save),
18
+ * 需要手动从命令行参数中提取
19
+ *
20
+ * @returns kebab-case 格式的标志名称数组
21
+ */
22
+ export declare function parseDynamicFlags(): string[];
23
+ /**
24
+ * 获取所有提供的标志(包括 meow 解析的 + 手动解析的)
25
+ *
26
+ * @param flags - meow 解析后的 flags 对象
27
+ * @returns kebab-case 格式的标志名称数组(去重)
28
+ */
29
+ export declare function getAllProvidedFlags(flags: Record<string, unknown>): string[];
30
+ /**
31
+ * 将旧版 `--dangerously-bff-save` 与新版 `--enable-bff-save` 视为等价(与 MCP 启动参数一致)
32
+ */
33
+ export declare function normalizeLegacyBffSaveFlags(flags: string[]): string[];
34
+ /**
35
+ * Legacy helper entry used by older unit tests and internal tooling.
36
+ * Public CLI installation is `rabetbase cli-skill install`.
37
+ */
38
+ export declare function skillsCommand(subCmd?: string, _args?: string[], flags?: {
39
+ help?: boolean;
40
+ [key: string]: unknown;
41
+ }): Promise<void>;
@@ -1 +1 @@
1
- (function(_0x44f0fe,_0x116fd9){const _0x1906e6=a251_0x2bfd,_0x346a55=_0x44f0fe();while(!![]){try{const _0x343d72=parseInt(_0x1906e6(0x1f3))/0x1+parseInt(_0x1906e6(0x1ef))/0x2+-parseInt(_0x1906e6(0x1f6))/0x3+-parseInt(_0x1906e6(0x1da))/0x4+-parseInt(_0x1906e6(0x1e0))/0x5*(parseInt(_0x1906e6(0x1e2))/0x6)+parseInt(_0x1906e6(0x1ea))/0x7*(parseInt(_0x1906e6(0x1e5))/0x8)+parseInt(_0x1906e6(0x1e9))/0x9*(parseInt(_0x1906e6(0x1ec))/0xa);if(_0x343d72===_0x116fd9)break;else _0x346a55['push'](_0x346a55['shift']());}catch(_0xc26dc4){_0x346a55['push'](_0x346a55['shift']());}}}(a251_0x3bf3,0xc7ceb));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x4875b6){const _0x588d8f=a251_0x2bfd,_0xd48ce7=[];for(const [_0x175915,_0x1bf05d]of Object[_0x588d8f(0x1dd)](_0x4875b6)){if(_0x1bf05d===!![]){const _0x2101a7=_0x175915[_0x588d8f(0x1f1)](/([A-Z])/g,'-$1')[_0x588d8f(0x1ed)]();_0xd48ce7[_0x588d8f(0x1dc)](_0x2101a7);}}return _0xd48ce7;}export function parseDynamicFlags(){const _0x3ca84e=a251_0x2bfd,_0x29c995=[];for(let _0xde2bac=0x3;_0xde2bac<process[_0x3ca84e(0x1e8)][_0x3ca84e(0x1ee)];_0xde2bac++){const _0x5e8069=process['argv'][_0xde2bac];if(_0x5e8069&&_0x5e8069['startsWith']('--')){const _0x346050=_0x5e8069['slice'](0x2);_0x346050&&!_0x346050[_0x3ca84e(0x1f5)]('=')&&_0x29c995['push'](_0x346050);}}return _0x29c995;}export function getAllProvidedFlags(_0x6fdb1c){const _0x12f789=a251_0x2bfd,_0x4a6ea9=camelCaseFlagsToKebab(_0x6fdb1c),_0x2ea854=parseDynamicFlags(),_0x2c4692=new Set([..._0x4a6ea9,..._0x2ea854]);return Array[_0x12f789(0x1f4)](_0x2c4692);}export function normalizeLegacyBffSaveFlags(_0x456081){const _0x136c6f=a251_0x2bfd,_0x55522d=new Set(_0x456081);return _0x55522d[_0x136c6f(0x1db)](_0x136c6f(0x1e4))&&_0x55522d['add']('enable-bff-save'),Array[_0x136c6f(0x1f4)](_0x55522d);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;function a251_0x2bfd(_0x9a1bc,_0x44a719){_0x9a1bc=_0x9a1bc-0x1da;const _0x3bf32c=a251_0x3bf3();let _0x2bfd85=_0x3bf32c[_0x9a1bc];return _0x2bfd85;}export async function skillsCommand(_0x4a8997,_0x3a1f2f,_0x5cbe50){const _0x4a2b54=a251_0x2bfd;logger[_0x4a2b54(0x1eb)](process['cwd']());if(_0x5cbe50?.['help']||_0x4a8997===_0x4a2b54(0x1de)){showHelp();return;}console[_0x4a2b54(0x1df)](_0x4a2b54(0x1e1)+(_0x4a8997||'(empty)')),console['log'](_0x4a2b54(0x1e3)),console[_0x4a2b54(0x1e6)]('\x20\x20'+CLI_BIN_NAME+'\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill'),console[_0x4a2b54(0x1e6)](''),console['log'](_0x4a2b54(0x1e7)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x4a2b54(0x1df)]('skill',_0x4a2b54(0x1f0)+_0x4a8997),process['exit'](0x1);}function showHelp(){const _0xbbba70=a251_0x2bfd;console['log'](_0xbbba70(0x1f2)+CLI_BIN_NAME+'\x20cli-skill\x20install\x0a\x0aEquivalent\x20command:\x20'+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/rabetbase/guides/.\x0a');}function a251_0x3bf3(){const _0x3439b6=['\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','5866VfybwQ','from','includes','4910157xubnJM','3558360qiiuCV','has','push','entries','--help','error','9385VZRyLS','Error:\x20Unsupported\x20command:\x20','2982wnSmyY','\x0aAvailable\x20commands:','dangerously-bff-save','8neEuVu','log','Equivalent\x20command:\x20','argv','45WUqsCR','3268727wneOzG','setLogPath','4378470EYxfNv','toLowerCase','length','3231054KASZOM','不支持的命令:\x20','replace'];a251_0x3bf3=function(){return _0x3439b6;};return a251_0x3bf3();}
1
+ (function(_0x3351a4,_0x3e20f8){const _0x302123=a249_0x3d97,_0x245198=_0x3351a4();while(!![]){try{const _0x56e8bc=-parseInt(_0x302123(0x7c))/0x1+parseInt(_0x302123(0x75))/0x2*(-parseInt(_0x302123(0x94))/0x3)+parseInt(_0x302123(0x81))/0x4+parseInt(_0x302123(0x87))/0x5+-parseInt(_0x302123(0x84))/0x6*(-parseInt(_0x302123(0x91))/0x7)+-parseInt(_0x302123(0x76))/0x8*(parseInt(_0x302123(0x83))/0x9)+parseInt(_0x302123(0x8f))/0xa;if(_0x56e8bc===_0x3e20f8)break;else _0x245198['push'](_0x245198['shift']());}catch(_0x48b2a4){_0x245198['push'](_0x245198['shift']());}}}(a249_0x4d32,0xc23c7));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';function a249_0x3d97(_0xe4815d,_0x10bfe9){_0xe4815d=_0xe4815d-0x74;const _0x4d3248=a249_0x4d32();let _0x3d9762=_0x4d3248[_0xe4815d];return _0x3d9762;}export function camelCaseFlagsToKebab(_0x1af16e){const _0x562944=a249_0x3d97,_0x49ef8d=[];for(const [_0x3a9ed2,_0x512044]of Object[_0x562944(0x89)](_0x1af16e)){if(_0x512044===!![]){const _0x4b94d8=_0x3a9ed2[_0x562944(0x85)](/([A-Z])/g,_0x562944(0x8e))[_0x562944(0x7a)]();_0x49ef8d['push'](_0x4b94d8);}}return _0x49ef8d;}export function parseDynamicFlags(){const _0x5d7a57=a249_0x3d97,_0x4035b7=[];for(let _0x5b256b=0x3;_0x5b256b<process[_0x5d7a57(0x88)][_0x5d7a57(0x8b)];_0x5b256b++){const _0x28de6b=process['argv'][_0x5b256b];if(_0x28de6b&&_0x28de6b[_0x5d7a57(0x7d)]('--')){const _0x37454d=_0x28de6b[_0x5d7a57(0x95)](0x2);_0x37454d&&!_0x37454d['includes']('=')&&_0x4035b7[_0x5d7a57(0x8c)](_0x37454d);}}return _0x4035b7;}export function getAllProvidedFlags(_0x3a4161){const _0x17092e=camelCaseFlagsToKebab(_0x3a4161),_0x3dfacc=parseDynamicFlags(),_0x5cae50=new Set([..._0x17092e,..._0x3dfacc]);return Array['from'](_0x5cae50);}export function normalizeLegacyBffSaveFlags(_0x26ed70){const _0x1cc169=a249_0x3d97,_0x464cb7=new Set(_0x26ed70);return _0x464cb7[_0x1cc169(0x7f)](_0x1cc169(0x74))&&_0x464cb7[_0x1cc169(0x78)]('enable-bff-save'),Array[_0x1cc169(0x7e)](_0x464cb7);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x58c960,_0x5ed1bb,_0x508e9e){const _0x43a52f=a249_0x3d97;logger['setLogPath'](process[_0x43a52f(0x79)]());if(_0x508e9e?.[_0x43a52f(0x7b)]||_0x58c960===_0x43a52f(0x8a)){showHelp();return;}console['error']('Error:\x20Unsupported\x20command:\x20'+(_0x58c960||_0x43a52f(0x77))),console[_0x43a52f(0x8d)]('\x0aAvailable\x20commands:'),console[_0x43a52f(0x8d)]('\x20\x20'+CLI_BIN_NAME+'\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill'),console[_0x43a52f(0x8d)](''),console['log'](_0x43a52f(0x93)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x43a52f(0x80)](_0x43a52f(0x92),_0x43a52f(0x82)+_0x58c960),process[_0x43a52f(0x86)](0x1);}function a249_0x4d32(){const _0x377993=['不支持的命令:\x20','5256PEKEfg','6VSfiqW','replace','exit','3884015FdjOry','argv','entries','--help','length','push','log','-$1','24081120HhHTLB','\x20cli-skill\x20install\x0a\x0aEquivalent\x20command:\x20','1576442hzxouS','skill','Equivalent\x20command:\x20','129501IIBrRJ','slice','dangerously-bff-save','26ATsUnE','19696LaEBXl','(empty)','add','cwd','toLowerCase','help','902828GGYjCx','startsWith','from','has','error','1149108kLmayM'];a249_0x4d32=function(){return _0x377993;};return a249_0x4d32();}function showHelp(){const _0x4944f1=a249_0x3d97;console[_0x4944f1(0x8d)]('\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20'+CLI_BIN_NAME+_0x4944f1(0x90)+SKILLS_INSTALL_COMMAND_LINE+'\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/rabetbase/guides/.\x0a');}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * 通过官方 skills CLI 安装 lovrabet/rabetbase(与 npx skills 生态一致)
3
+ *
4
+ * 命令片段与默认完整命令行均在此文件维护,避免散落各处。
5
+ */
6
+ import { type ResolveSkillPresenceOptions } from "../skills/skill-presence.js";
7
+ /** `npx` 的 `-y`(非交互拉取包) */
8
+ export declare const NPX_FLAG_YES: "-y";
9
+ /** `skills add` 的全局安装短参数 */
10
+ export declare const SKILLS_FLAG_GLOBAL: "-g";
11
+ /** `skills add` 的非交互确认短参数 */
12
+ export declare const SKILLS_FLAG_YES: "-y";
13
+ /** skills CLI 主命令名 */
14
+ export declare const NPX_SKILLS_CLI: "skills";
15
+ /** `skills` 子命令:add */
16
+ export declare const NPX_SKILLS_SUBCOMMAND_ADD: "add";
17
+ /** `--skill` 长选项名 */
18
+ export declare const NPX_SKILLS_FLAG_SKILL: "--skill";
19
+ /** 当前官方 rabetbase skill 源标识(GitHub 式 repo/slug) */
20
+ export declare const RABETBASE_SKILL_SOURCE = "lovrabet/rabetbase";
21
+ /** 历史旧 skill 源,仅用于升级迁移时移除旧安装 */
22
+ export declare const LEGACY_RABETBASE_SKILL_SOURCE = "lovrabet/lovrabet-skill";
23
+ /** 旧安装迁移时使用的历史 skill 名称。默认安装不再依赖 `--skill`。 */
24
+ export declare const DEFAULT_RABETBASE_SKILL_NAME = "Lovrabet";
25
+ /** 全局安装后的 Skill 名(即全局 Skill 目录名),与安装源写法解耦 */
26
+ export declare const RABETBASE_GLOBAL_SKILL_NAME = "rabetbase";
27
+ /** CodeUp Git 真源,与官方 shorthand 安装同一个全局 Skill */
28
+ export declare const RABETBASE_SKILL_GIT_SOURCE = "git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git";
29
+ /**
30
+ * 由安装源推导全局安装后的 Skill 名。
31
+ *
32
+ * 已登记源(官方 shorthand 与 CodeUp Git 真源)返回同一个 Skill 名;未登记源返回
33
+ * `undefined`,表示跳过安装事实校验——不猜测产物名,宁可放行。
34
+ *
35
+ * 查表写在函数体内(而非顶层 `const`),避免混淆器重排顶层语句触发 TDZ。
36
+ *
37
+ * @param source `npx skills add` 的安装源
38
+ * @returns 已登记源对应的全局 Skill 名;未登记时返回 `undefined`
39
+ */
40
+ export declare function resolveGlobalSkillName(source: string): string | undefined;
41
+ /**
42
+ * 传给 `spawnSync(npx, argv)` 的 argv(不含可执行文件名 `npx` / `npx.cmd`)
43
+ */
44
+ export declare function buildNpxSkillsAddArgv(skillName?: string): string[];
45
+ /**
46
+ * 文档 / 成功页提示用的可复制命令(统一写 `npx`,与 `buildNpxSkillsAddArgv` 的 argv 一致)
47
+ */
48
+ export declare const NPX_SKILLS_ADD_COMMAND_LINE: string;
49
+ /**
50
+ * User-facing global install command for rabetbase skill.
51
+ */
52
+ export declare const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE: string;
53
+ export interface RunNpxSkillsAddResult {
54
+ ok: boolean;
55
+ status: number | null;
56
+ code?: NpxSkillsErrorCode;
57
+ error?: string;
58
+ /** 未执行 npx(RABETBASE_SKIP_NPX_SKILLS=1),仅用于测试或离线假定已安装 */
59
+ skipped?: boolean;
60
+ }
61
+ export interface RunNpxSkillsAddOptions {
62
+ /** 默认 inherit;CI 可用 pipe */
63
+ stdio?: "inherit" | "pipe";
64
+ /** 可选 `--skill` 筛选;普通安装依赖仓内 `metadata.internal` 过滤维护型 skill。 */
65
+ skill?: string;
66
+ /** 传 `-y` 给 skills CLI 本身,跳过交互确认(与 npx 的 -y 不同) */
67
+ yes?: boolean;
68
+ /** 覆盖全局 Skill 安装事实的探测来源,适用于隔离环境或测试。 */
69
+ presence?: ResolveSkillPresenceOptions;
70
+ }
71
+ /**
72
+ * 失败分类。优先使用 OS / Node 层稳定信号与本地可解析的安装事实。
73
+ * 外部输出仅识别安装器的 `Failed to install N` 汇总,其余文案只作为诊断信息。
74
+ */
75
+ export type NpxSkillsErrorCode = "NPX_NOT_FOUND" | "PERMISSION_DENIED" | "SPAWN_FAILED" | "CHILD_TERMINATED" | "CHILD_EXIT_NONZERO" | "INSTALL_PARTIAL" | "SKILL_NOT_INSTALLED";
76
+ /**
77
+ * 若设置 RABETBASE_SKIP_NPX_SKILLS=1,跳过执行(供离线/测试注入;对 add / remove / add -g 均生效)
78
+ */
79
+ export declare function shouldSkipNpxSkillsAdd(): boolean;
80
+ /**
81
+ * 在项目根目录执行与 {@link NPX_SKILLS_ADD_COMMAND_LINE} 等价的 npx 调用
82
+ *
83
+ * @param projectRoot 项目根目录
84
+ * @param options.stdio - inherit(交互式终端)或 pipe(CI)
85
+ * @param options.skill - 可选 `--skill` 名称;仅显式筛选多 skill 包时使用
86
+ */
87
+ export declare function runNpxSkillsAdd(projectRoot: string, options?: RunNpxSkillsAddOptions): RunNpxSkillsAddResult;
88
+ /**
89
+ * 执行 `npx -y skills remove lovrabet/lovrabet-skill --skill Lovrabet`
90
+ *
91
+ * 与 {@link runNpxSkillsAdd} 相同:若设置 `RABETBASE_SKIP_NPX_SKILLS=1` 则跳过(供升级流程自动化测试)。
92
+ */
93
+ export declare function runNpxSkillsRemove(projectRoot: string, options?: RunNpxSkillsAddOptions, source?: string): RunNpxSkillsAddResult;
94
+ /**
95
+ * 执行与 `npx skills add <source> -g -y` 等价的全局安装调用。
96
+ *
97
+ * 若设置 `RABETBASE_SKIP_NPX_SKILLS=1` 则跳过(与 {@link runNpxSkillsAdd} 一致,避免升级流程在 CI 中长时间阻塞)。
98
+ */
99
+ export declare function runNpxSkillsAddGlobal(projectRoot: string, source: string, options?: RunNpxSkillsAddOptions): RunNpxSkillsAddResult;
@@ -1 +1 @@
1
- const a252_0x1f4d51=a252_0x3eb1;(function(_0x23e424,_0x25554a){const _0x2503a3=a252_0x3eb1,_0x56488d=_0x23e424();while(!![]){try{const _0x254921=parseInt(_0x2503a3(0x79))/0x1*(parseInt(_0x2503a3(0x97))/0x2)+-parseInt(_0x2503a3(0x6a))/0x3*(parseInt(_0x2503a3(0x65))/0x4)+parseInt(_0x2503a3(0x87))/0x5*(parseInt(_0x2503a3(0x94))/0x6)+parseInt(_0x2503a3(0x72))/0x7+-parseInt(_0x2503a3(0x7e))/0x8*(-parseInt(_0x2503a3(0x86))/0x9)+-parseInt(_0x2503a3(0x8e))/0xa+-parseInt(_0x2503a3(0x67))/0xb;if(_0x254921===_0x25554a)break;else _0x56488d['push'](_0x56488d['shift']());}catch(_0x3d971c){_0x56488d['push'](_0x56488d['shift']());}}}(a252_0x5305,0x2bba9));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a252_0x1f4d51(0x8d);export const NPX_SKILLS_SUBCOMMAND_ADD=a252_0x1f4d51(0x83);function a252_0x3eb1(_0x9c972e,_0x782987){_0x9c972e=_0x9c972e-0x64;const _0x5305ce=a252_0x5305();let _0x3eb108=_0x5305ce[_0x9c972e];return _0x3eb108;}export const NPX_SKILLS_FLAG_SKILL=a252_0x1f4d51(0x73);export const RABETBASE_SKILL_SOURCE=a252_0x1f4d51(0x89);export const LEGACY_RABETBASE_SKILL_SOURCE='lovrabet/lovrabet-skill';export const DEFAULT_RABETBASE_SKILL_NAME=a252_0x1f4d51(0x6f);export const RABETBASE_GLOBAL_SKILL_NAME=a252_0x1f4d51(0x84);export const RABETBASE_SKILL_GIT_SOURCE=a252_0x1f4d51(0x99);export function resolveGlobalSkillName(_0x465623){const _0x5c7aef=a252_0x1f4d51;switch(_0x465623[_0x5c7aef(0x81)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x123249){const _0x48a834=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x123249&&_0x48a834['push'](NPX_SKILLS_FLAG_SKILL,_0x123249),_0x48a834;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a252_0x1f4d51(0x96),...buildNpxSkillsAddArgv()][a252_0x1f4d51(0x8b)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a252_0x1f4d51(0x96),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a252_0x1f4d51(0x8b)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x200b6f,_0x59c905,_0x191f2f){return{'ok':![],'status':_0x59c905,'code':_0x200b6f,'error':'['+_0x200b6f+']\x20'+_0x191f2f};}function spawnOptions(_0x4e1215,_0x4c5ba5){return{'cwd':_0x4e1215,'stdio':_0x4c5ba5,'env':process.env,'shell':![],..._0x4c5ba5==='pipe'?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x4d2e4c,_0x31e2ca,_0x315b61,_0x4c4b32){const _0x3f7c67=a252_0x1f4d51,_0x170e5a=[_0x4d2e4c['stdout']?_0x4d2e4c[_0x3f7c67(0x82)]['toString']():'',_0x4d2e4c[_0x3f7c67(0x6d)]?_0x4d2e4c[_0x3f7c67(0x6d)][_0x3f7c67(0x76)]():''][_0x3f7c67(0x66)](Boolean)[_0x3f7c67(0x8b)]('\x0a')['trim']();_0x4c4b32!==_0x3f7c67(0x92)&&_0x170e5a&&console[_0x3f7c67(0x6e)](_0x170e5a);if(_0x4d2e4c[_0x3f7c67(0x91)]){const _0x2df805=_0x4d2e4c[_0x3f7c67(0x91)],_0x3380dd=_0x2df805[_0x3f7c67(0x9b)]===_0x3f7c67(0x85)?_0x3f7c67(0x98):_0x2df805[_0x3f7c67(0x9b)]==='EPERM'||_0x2df805['code']===_0x3f7c67(0x9a)?_0x3f7c67(0x7b):_0x3f7c67(0x77);return failure(_0x3380dd,_0x4d2e4c[_0x3f7c67(0x8c)],_0x2df805[_0x3f7c67(0x74)]);}if(_0x4d2e4c[_0x3f7c67(0x75)])return failure(_0x3f7c67(0x7a),_0x4d2e4c[_0x3f7c67(0x8c)],_0x3f7c67(0x70)+_0x4d2e4c[_0x3f7c67(0x75)]);if(_0x4d2e4c[_0x3f7c67(0x8c)]!==0x0)return failure(_0x3f7c67(0x8f),_0x4d2e4c[_0x3f7c67(0x8c)],_0x170e5a||'exit\x20'+(_0x4d2e4c[_0x3f7c67(0x8c)]??_0x3f7c67(0x6b)));const _0x4e18ee=_0x170e5a['match'](/Failed to install\s+(\d+)/i);if(_0x4e18ee&&Number(_0x4e18ee[0x1])>0x0)return failure('INSTALL_PARTIAL',0x0,_0x3f7c67(0x88)+_0x4e18ee[0x1]+_0x3f7c67(0x78)+(_0x170e5a?':\x0a'+_0x170e5a:''));if(_0x31e2ca){const _0x52843d=resolveInstalledSkill(_0x31e2ca,_0x315b61);if(_0x52843d[_0x3f7c67(0x71)]===_0x3f7c67(0x90))return failure('SKILL_NOT_INSTALLED',0x0,'Skill\x20\x22'+_0x31e2ca+_0x3f7c67(0x80)+_0x52843d['checked'][_0x3f7c67(0x8b)](',\x20')+')');_0x52843d[_0x3f7c67(0x71)]===_0x3f7c67(0x7d)&&console[_0x3f7c67(0x95)](_0x3f7c67(0x68)+_0x31e2ca+'\x22\x20install\x20state:\x20'+_0x52843d[_0x3f7c67(0x6c)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x5c8792,_0x996285){const _0x3bf923=a252_0x1f4d51;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x41f152=_0x996285?.[_0x3bf923(0x64)]??_0x3bf923(0x7f),_0x3e58ff=resolveNpmBin(_0x3bf923(0x96)),_0x36fd88=buildNpxSkillsAddArgv(_0x996285?.['skill']),_0x4150aa=[_0x3bf923(0x96),..._0x36fd88][_0x3bf923(0x8b)]('\x20');console[_0x3bf923(0x6e)]('*\x20'+_0x4150aa);const _0x496dbe=spawnSync(_0x3e58ff,_0x36fd88,spawnOptions(_0x5c8792,_0x41f152));return normalizeSpawnResult(_0x496dbe,undefined,undefined,_0x41f152);}export function runNpxSkillsRemove(_0x19930e,_0xfe8b55,_0x23137b=LEGACY_RABETBASE_SKILL_SOURCE){const _0x3de8e7=a252_0x1f4d51;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x494e58=_0xfe8b55?.[_0x3de8e7(0x64)]??'inherit',_0x329cdf=resolveNpmBin(_0x3de8e7(0x96)),_0xcfcca6=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x3de8e7(0x69),_0x23137b,NPX_SKILLS_FLAG_SKILL,_0xfe8b55?.[_0x3de8e7(0x8a)]??DEFAULT_RABETBASE_SKILL_NAME,..._0xfe8b55?.[_0x3de8e7(0x93)]?['-y']:[]],_0x397cd3=[_0x329cdf,..._0xcfcca6][_0x3de8e7(0x8b)]('\x20');console[_0x3de8e7(0x6e)]('*\x20'+_0x397cd3);const _0x40e5c1=spawnSync(_0x329cdf,_0xcfcca6,spawnOptions(_0x19930e,_0x494e58));return normalizeSpawnResult(_0x40e5c1,undefined,undefined,_0x494e58);}function a252_0x5305(){const _0x1e284d=['1434601pYoqXS','--skill','message','signal','toString','SPAWN_FAILED','\x20failed\x20target(s)','1WqFplX','CHILD_TERMINATED','PERMISSION_DENIED','presence','unverifiable','1437944NHZtKH','inherit','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','trim','stdout','add','rabetbase','ENOENT','9KGZiQQ','57470WiFgZM','Installer\x20reported\x20','lovrabet/rabetbase','skill','join','status','skills','253840sFztwy','CHILD_EXIT_NONZERO','absent','error','pipe','yes','54yUTGHT','warn','npx','221596xcADap','NPX_NOT_FOUND','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','EACCES','code','stdio','352lsJfhM','filter','2876115JYhnur','!\x20Could\x20not\x20verify\x20\x22','remove','4533lBOqer','unknown','reason','stderr','log','Lovrabet','npx\x20terminated\x20by\x20signal\x20','state'];a252_0x5305=function(){return _0x1e284d;};return a252_0x5305();}export function runNpxSkillsAddGlobal(_0x107d37,_0x546722,_0x56bdfb){const _0x31a9fd=a252_0x1f4d51;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3dc0a6=resolveNpmBin(_0x31a9fd(0x96)),_0xe24ec0=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x546722,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x36cc5d=['npx',NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x546722,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x31a9fd(0x8b)]('\x20');console['log']('*\x20'+_0x36cc5d);const _0x4ea70e=spawnSync(_0x3dc0a6,_0xe24ec0,spawnOptions(_0x107d37,_0x31a9fd(0x92)));return normalizeSpawnResult(_0x4ea70e,resolveGlobalSkillName(_0x546722),_0x56bdfb?.[_0x31a9fd(0x7c)],_0x56bdfb?.[_0x31a9fd(0x64)]);}
1
+ const a250_0x203e75=a250_0x3ddc;(function(_0x2d37e4,_0x176321){const _0x452477=a250_0x3ddc,_0x3ab933=_0x2d37e4();while(!![]){try{const _0x17bb3c=-parseInt(_0x452477(0x14f))/0x1*(parseInt(_0x452477(0x133))/0x2)+-parseInt(_0x452477(0x14c))/0x3*(-parseInt(_0x452477(0x149))/0x4)+-parseInt(_0x452477(0x142))/0x5+-parseInt(_0x452477(0x148))/0x6+-parseInt(_0x452477(0x12a))/0x7+-parseInt(_0x452477(0x159))/0x8+parseInt(_0x452477(0x155))/0x9;if(_0x17bb3c===_0x176321)break;else _0x3ab933['push'](_0x3ab933['shift']());}catch(_0x56816b){_0x3ab933['push'](_0x3ab933['shift']());}}}(a250_0x39cc,0xd9b87));import{spawnSync}from'node:child_process';function a250_0x39cc(){const _0x16b931=['PERMISSION_DENIED','rabetbase','skills','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','8257606sBmaba','state','join','\x20failed\x20target(s)','SPAWN_FAILED','EPERM','ENOENT','npx','checked','2305054DOYVTb','npx\x20terminated\x20by\x20signal\x20','match','\x22\x20install\x20state:\x20','stderr','NPX_NOT_FOUND','Skill\x20\x22','CHILD_TERMINATED','Installer\x20reported\x20','remove','exit\x20','unknown','INSTALL_PARTIAL','log','stdio','7418600OawhXr','add','lovrabet/lovrabet-skill','lovrabet/rabetbase','signal','--skill','1024734YVSsgY','4oSijsl','stdout','code','1744185zcPJQH','filter','skill','1tgvSSv','reason','unverifiable','push','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','error','50751864AIMTOP','EACCES','yes','pipe','10736112Vxkfrt','status','warn','trim','inherit'];a250_0x39cc=function(){return _0x16b931;};return a250_0x39cc();}import{resolveNpmBin}from'../utils/platform.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a250_0x203e75(0x160);export const NPX_SKILLS_SUBCOMMAND_ADD=a250_0x203e75(0x143);export const NPX_SKILLS_FLAG_SKILL=a250_0x203e75(0x147);export const RABETBASE_SKILL_SOURCE=a250_0x203e75(0x145);export const LEGACY_RABETBASE_SKILL_SOURCE=a250_0x203e75(0x144);export const DEFAULT_RABETBASE_SKILL_NAME='Lovrabet';export const RABETBASE_GLOBAL_SKILL_NAME=a250_0x203e75(0x15f);export const RABETBASE_SKILL_GIT_SOURCE=a250_0x203e75(0x153);export function resolveGlobalSkillName(_0x28be02){const _0x220fed=a250_0x203e75;switch(_0x28be02[_0x220fed(0x15c)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x384a21){const _0x5ea196=a250_0x203e75,_0x3d82f8=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x384a21&&_0x3d82f8[_0x5ea196(0x152)](NPX_SKILLS_FLAG_SKILL,_0x384a21),_0x3d82f8;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a250_0x203e75(0x131),...buildNpxSkillsAddArgv()][a250_0x203e75(0x12c)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a250_0x203e75(0x131),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a250_0x203e75(0x12c)]('\x20');function a250_0x3ddc(_0xb97142,_0x5db43b){_0xb97142=_0xb97142-0x129;const _0x39cc86=a250_0x39cc();let _0x3ddcce=_0x39cc86[_0xb97142];return _0x3ddcce;}const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x1885ac,_0xd5e327,_0x4ec450){return{'ok':![],'status':_0xd5e327,'code':_0x1885ac,'error':'['+_0x1885ac+']\x20'+_0x4ec450};}function spawnOptions(_0x507306,_0x5c602b){return{'cwd':_0x507306,'stdio':_0x5c602b,'env':process.env,'shell':![],..._0x5c602b==='pipe'?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeSpawnResult(_0x1b63f8,_0x2afb01,_0x317be0,_0x10294b){const _0x217c34=a250_0x203e75,_0x15c6ff=[_0x1b63f8[_0x217c34(0x14a)]?_0x1b63f8[_0x217c34(0x14a)]['toString']():'',_0x1b63f8[_0x217c34(0x137)]?_0x1b63f8[_0x217c34(0x137)]['toString']():''][_0x217c34(0x14d)](Boolean)['join']('\x0a')[_0x217c34(0x15c)]();_0x10294b!==_0x217c34(0x158)&&_0x15c6ff&&console[_0x217c34(0x140)](_0x15c6ff);if(_0x1b63f8[_0x217c34(0x154)]){const _0x585aea=_0x1b63f8[_0x217c34(0x154)],_0xa8b26f=_0x585aea[_0x217c34(0x14b)]===_0x217c34(0x130)?_0x217c34(0x138):_0x585aea[_0x217c34(0x14b)]===_0x217c34(0x12f)||_0x585aea[_0x217c34(0x14b)]===_0x217c34(0x156)?_0x217c34(0x15e):_0x217c34(0x12e);return failure(_0xa8b26f,_0x1b63f8[_0x217c34(0x15a)],_0x585aea['message']);}if(_0x1b63f8[_0x217c34(0x146)])return failure(_0x217c34(0x13a),_0x1b63f8['status'],_0x217c34(0x134)+_0x1b63f8['signal']);if(_0x1b63f8[_0x217c34(0x15a)]!==0x0)return failure('CHILD_EXIT_NONZERO',_0x1b63f8[_0x217c34(0x15a)],_0x15c6ff||_0x217c34(0x13d)+(_0x1b63f8[_0x217c34(0x15a)]??_0x217c34(0x13e)));const _0x2666b3=_0x15c6ff[_0x217c34(0x135)](/Failed to install\s+(\d+)/i);if(_0x2666b3&&Number(_0x2666b3[0x1])>0x0)return failure(_0x217c34(0x13f),0x0,_0x217c34(0x13b)+_0x2666b3[0x1]+_0x217c34(0x12d)+(_0x15c6ff?':\x0a'+_0x15c6ff:''));if(_0x2afb01){const _0x5123df=resolveInstalledSkill(_0x2afb01,_0x317be0);if(_0x5123df[_0x217c34(0x12b)]==='absent')return failure('SKILL_NOT_INSTALLED',0x0,_0x217c34(0x139)+_0x2afb01+_0x217c34(0x129)+_0x5123df[_0x217c34(0x132)][_0x217c34(0x12c)](',\x20')+')');_0x5123df[_0x217c34(0x12b)]===_0x217c34(0x151)&&console[_0x217c34(0x15b)]('!\x20Could\x20not\x20verify\x20\x22'+_0x2afb01+_0x217c34(0x136)+_0x5123df[_0x217c34(0x150)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x3524ca,_0x3707da){const _0x2b07ae=a250_0x203e75;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x47b97f=_0x3707da?.['stdio']??'inherit',_0x581a96=resolveNpmBin('npx'),_0x5edfdc=buildNpxSkillsAddArgv(_0x3707da?.[_0x2b07ae(0x14e)]),_0x5bcf80=[_0x2b07ae(0x131),..._0x5edfdc]['join']('\x20');console[_0x2b07ae(0x140)]('*\x20'+_0x5bcf80);const _0x22b186=spawnSync(_0x581a96,_0x5edfdc,spawnOptions(_0x3524ca,_0x47b97f));return normalizeSpawnResult(_0x22b186,undefined,undefined,_0x47b97f);}export function runNpxSkillsRemove(_0x51bdab,_0x25a0a1,_0x28aae4=LEGACY_RABETBASE_SKILL_SOURCE){const _0x507a5a=a250_0x203e75;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2a25af=_0x25a0a1?.['stdio']??_0x507a5a(0x15d),_0x2a0e58=resolveNpmBin(_0x507a5a(0x131)),_0x1fb0a6=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x507a5a(0x13c),_0x28aae4,NPX_SKILLS_FLAG_SKILL,_0x25a0a1?.[_0x507a5a(0x14e)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x25a0a1?.[_0x507a5a(0x157)]?['-y']:[]],_0x387d64=[_0x2a0e58,..._0x1fb0a6][_0x507a5a(0x12c)]('\x20');console[_0x507a5a(0x140)]('*\x20'+_0x387d64);const _0x12aebc=spawnSync(_0x2a0e58,_0x1fb0a6,spawnOptions(_0x51bdab,_0x2a25af));return normalizeSpawnResult(_0x12aebc,undefined,undefined,_0x2a25af);}export function runNpxSkillsAddGlobal(_0x227639,_0x23c93b,_0x2d9ed0){const _0x337f36=a250_0x203e75;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x24b899=resolveNpmBin(_0x337f36(0x131)),_0x5c8b77=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x23c93b,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x301b77=[_0x337f36(0x131),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x23c93b,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES]['join']('\x20');console[_0x337f36(0x140)]('*\x20'+_0x301b77);const _0x345805=spawnSync(_0x24b899,_0x5c8b77,spawnOptions(_0x227639,'pipe'));return normalizeSpawnResult(_0x345805,resolveGlobalSkillName(_0x23c93b),_0x2d9ed0?.['presence'],_0x2d9ed0?.[_0x337f36(0x141)]);}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * 全局 Skill 安装事实解析(与外部 skills CLI 解耦)
3
+ *
4
+ * 判定原则:只依据可信度较高的信号,且区分「确认未安装」与「无法确认」。
5
+ * - 产物探测:消费方真正解析的 `<globalSkillsDir>/<name>/SKILL.md`
6
+ * - 安装记账:skills CLI 自己维护的 `~/.agents/.skill-lock.json`
7
+ *
8
+ * 目录布局归外部工具所有,因此布局假设失效时必须落到 `unverifiable`(放行 + 说明原因),
9
+ * 不能落到 `absent`(判失败)。只有产物与记账两个来源都表明没装,才是 `absent`。
10
+ */
11
+ /** skills CLI 安装记账文件(相对 HOME) */
12
+ export declare const SKILL_LOCK_RELATIVE_PATH: string;
13
+ /** 已知的全局 Skill 目录(相对 HOME),按探测优先级排列 */
14
+ export declare const GLOBAL_SKILLS_DIR_RELATIVE_PATHS: string[];
15
+ /**
16
+ * 全局 Skill 的安装事实。
17
+ *
18
+ * `unverifiable` 是刻意保留的第三态:表示本地假设不足以判断,调用方应放行而非报错。
19
+ */
20
+ export type SkillPresence = {
21
+ state: "present";
22
+ path: string;
23
+ } | {
24
+ state: "absent";
25
+ checked: string[];
26
+ } | {
27
+ state: "unverifiable";
28
+ reason: string;
29
+ };
30
+ export interface ResolveSkillPresenceOptions {
31
+ /** 覆盖候选全局 Skill 目录(隔离环境 / 测试用) */
32
+ globalSkillsDirs?: string[];
33
+ /** 覆盖 skills CLI 安装记账文件路径 */
34
+ lockFile?: string;
35
+ /** 覆盖 HOME,仅用于测试 */
36
+ home?: string;
37
+ }
38
+ /**
39
+ * 解析指定全局 Skill 当前是否可被消费方解析到。
40
+ *
41
+ * @param skillName 全局 Skill 名(目录名),如 `rabetbase`
42
+ * @returns `present` / `absent` / `unverifiable`
43
+ */
44
+ export declare function resolveInstalledSkill(skillName: string, options?: ResolveSkillPresenceOptions): SkillPresence;
@@ -1 +1 @@
1
- const a253_0x27d891=a253_0x4e98;function a253_0xd13a(){const _0x29fd18=['version','recorded','394DDxYRC','\x20is\x20unreadable:\x20','object','message','3130302zJzSsN','not-recorded','1004427oEatzu','reason','parse','\x20has\x20no\x20skills\x20map','13429110IGIZGl','home','\x20records\x20\x22','unusable','present','unverifiable','28mpxEpU','.agents','3IChzEI','.claude','kind','globalSkillsDirs','includes','join','4291932nveHFm','lockFile','number','768176xLzEKs','9511VZGDTD','8746605NSCnvI','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','.skill-lock.json','skills'];a253_0xd13a=function(){return _0x29fd18;};return a253_0xd13a();}(function(_0x588a72,_0x20f79e){const _0x20184=a253_0x4e98,_0x129e91=_0x588a72();while(!![]){try{const _0x464be6=-parseInt(_0x20184(0x1e6))/0x1*(parseInt(_0x20184(0x1ca))/0x2)+-parseInt(_0x20184(0x1dc))/0x3*(parseInt(_0x20184(0x1e2))/0x4)+parseInt(_0x20184(0x1e7))/0x5+parseInt(_0x20184(0x1ce))/0x6+-parseInt(_0x20184(0x1da))/0x7*(-parseInt(_0x20184(0x1e5))/0x8)+-parseInt(_0x20184(0x1d0))/0x9+parseInt(_0x20184(0x1d4))/0xa;if(_0x464be6===_0x20f79e)break;else _0x129e91['push'](_0x129e91['shift']());}catch(_0x50f360){_0x129e91['push'](_0x129e91['shift']());}}}(a253_0xd13a,0xe5708));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a253_0x27d891(0x1db),a253_0x27d891(0x1c6));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a253_0x27d891(0x1db),'skills'),join(a253_0x27d891(0x1dd),a253_0x27d891(0x1c7))];function a253_0x4e98(_0x5cab0e,_0x103c71){_0x5cab0e=_0x5cab0e-0x1c5;const _0xd13a12=a253_0xd13a();let _0x4e9844=_0xd13a12[_0x5cab0e];return _0x4e9844;}const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x21f6e4,_0x48180b){const _0x11ad05=a253_0x27d891;if(!existsSync(_0x21f6e4))return{'kind':'not-recorded'};let _0x57835d;try{_0x57835d=JSON[_0x11ad05(0x1d2)](readFileSync(_0x21f6e4,'utf8'));}catch(_0x53ba2f){return{'kind':_0x11ad05(0x1d7),'reason':_0x21f6e4+_0x11ad05(0x1cb)+_0x53ba2f[_0x11ad05(0x1cd)]};}const _0x1bc304=_0x57835d;if(typeof _0x1bc304?.[_0x11ad05(0x1c8)]!==_0x11ad05(0x1e4)||!SUPPORTED_LOCK_VERSIONS[_0x11ad05(0x1e0)](_0x1bc304[_0x11ad05(0x1c8)]))return{'kind':_0x11ad05(0x1d7),'reason':_0x21f6e4+'\x20uses\x20unsupported\x20version\x20'+String(_0x1bc304?.['version'])};if(!_0x1bc304[_0x11ad05(0x1c7)]||typeof _0x1bc304[_0x11ad05(0x1c7)]!==_0x11ad05(0x1cc))return{'kind':'unusable','reason':_0x21f6e4+_0x11ad05(0x1d3)};return _0x1bc304[_0x11ad05(0x1c7)][_0x48180b]?{'kind':_0x11ad05(0x1c9)}:{'kind':_0x11ad05(0x1cf)};}export function resolveInstalledSkill(_0x42540a,_0x1ace51){const _0x46beb8=a253_0x27d891,_0x4219b9=_0x1ace51?.[_0x46beb8(0x1d5)]??homedir(),_0x2fb1fe=_0x1ace51?.[_0x46beb8(0x1df)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x563080=>join(_0x4219b9,_0x563080)),_0x1ebfac=_0x1ace51?.[_0x46beb8(0x1e3)]??join(_0x4219b9,SKILL_LOCK_RELATIVE_PATH),_0x2610ba=_0x2fb1fe['map'](_0x56cc18=>join(_0x56cc18,_0x42540a,'SKILL.md')),_0xfabcfa=_0x2610ba['find'](_0x21c24f=>existsSync(_0x21c24f));if(_0xfabcfa)return{'state':_0x46beb8(0x1d8),'path':_0xfabcfa};const _0x1ce80d=readLockLookup(_0x1ebfac,_0x42540a);if(_0x1ce80d[_0x46beb8(0x1de)]===_0x46beb8(0x1d7))return{'state':_0x46beb8(0x1d9),'reason':_0x1ce80d[_0x46beb8(0x1d1)]};if(_0x1ce80d[_0x46beb8(0x1de)]===_0x46beb8(0x1c9))return{'state':'unverifiable','reason':_0x1ebfac+_0x46beb8(0x1d6)+_0x42540a+_0x46beb8(0x1c5)+('('+_0x2610ba[_0x46beb8(0x1e1)](',\x20')+')')};return{'state':'absent','checked':_0x2610ba};}
1
+ const a251_0x4a55ed=a251_0x229b;(function(_0x3b73cb,_0x10b0ef){const _0x9d7d41=a251_0x229b,_0x595e90=_0x3b73cb();while(!![]){try{const _0x2c92c2=-parseInt(_0x9d7d41(0xf7))/0x1+parseInt(_0x9d7d41(0x102))/0x2+-parseInt(_0x9d7d41(0xf5))/0x3*(parseInt(_0x9d7d41(0x10d))/0x4)+parseInt(_0x9d7d41(0xf8))/0x5+-parseInt(_0x9d7d41(0xfe))/0x6+parseInt(_0x9d7d41(0x107))/0x7*(-parseInt(_0x9d7d41(0x105))/0x8)+parseInt(_0x9d7d41(0x10a))/0x9*(parseInt(_0x9d7d41(0xfa))/0xa);if(_0x2c92c2===_0x10b0ef)break;else _0x595e90['push'](_0x595e90['shift']());}catch(_0x3cb214){_0x595e90['push'](_0x595e90['shift']());}}}(a251_0x29cb,0xe2d3d));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a251_0x4a55ed(0xee),a251_0x4a55ed(0x108));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a251_0x4a55ed(0xee),a251_0x4a55ed(0x10e)),join(a251_0x4a55ed(0xff),a251_0x4a55ed(0x10e))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x5c0dc3,_0x296e2a){const _0x236b35=a251_0x4a55ed;if(!existsSync(_0x5c0dc3))return{'kind':_0x236b35(0xe9)};let _0x5ef8fe;try{_0x5ef8fe=JSON[_0x236b35(0xfb)](readFileSync(_0x5c0dc3,_0x236b35(0x101)));}catch(_0x35bc21){return{'kind':_0x236b35(0xf1),'reason':_0x5c0dc3+_0x236b35(0xeb)+_0x35bc21[_0x236b35(0x106)]};}const _0x4c48dc=_0x5ef8fe;if(typeof _0x4c48dc?.[_0x236b35(0xea)]!==_0x236b35(0xf6)||!SUPPORTED_LOCK_VERSIONS[_0x236b35(0x104)](_0x4c48dc[_0x236b35(0xea)]))return{'kind':_0x236b35(0xf1),'reason':_0x5c0dc3+_0x236b35(0x103)+String(_0x4c48dc?.['version'])};if(!_0x4c48dc['skills']||typeof _0x4c48dc[_0x236b35(0x10e)]!==_0x236b35(0x100))return{'kind':'unusable','reason':_0x5c0dc3+_0x236b35(0xf3)};return _0x4c48dc[_0x236b35(0x10e)][_0x296e2a]?{'kind':_0x236b35(0xed)}:{'kind':_0x236b35(0xe9)};}function a251_0x229b(_0x113bf4,_0x3a7d57){_0x113bf4=_0x113bf4-0xe9;const _0x29cb18=a251_0x29cb();let _0x229be4=_0x29cb18[_0x113bf4];return _0x229be4;}export function resolveInstalledSkill(_0x53df7d,_0x93e753){const _0x10d0ca=a251_0x4a55ed,_0x17ca46=_0x93e753?.[_0x10d0ca(0xef)]??homedir(),_0x1e7eb1=_0x93e753?.[_0x10d0ca(0x10c)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x10d0ca(0xf4)](_0x1bedf0=>join(_0x17ca46,_0x1bedf0)),_0x5d189c=_0x93e753?.[_0x10d0ca(0xfc)]??join(_0x17ca46,SKILL_LOCK_RELATIVE_PATH),_0x2740d3=_0x1e7eb1[_0x10d0ca(0xf4)](_0x4fcdc2=>join(_0x4fcdc2,_0x53df7d,_0x10d0ca(0x10b))),_0x4535f4=_0x2740d3[_0x10d0ca(0xfd)](_0x179d75=>existsSync(_0x179d75));if(_0x4535f4)return{'state':_0x10d0ca(0xec),'path':_0x4535f4};const _0x163a58=readLockLookup(_0x5d189c,_0x53df7d);if(_0x163a58[_0x10d0ca(0xf2)]===_0x10d0ca(0xf1))return{'state':_0x10d0ca(0x109),'reason':_0x163a58[_0x10d0ca(0xf9)]};if(_0x163a58[_0x10d0ca(0xf2)]==='recorded')return{'state':_0x10d0ca(0x109),'reason':_0x5d189c+'\x20records\x20\x22'+_0x53df7d+_0x10d0ca(0xf0)+('('+_0x2740d3['join'](',\x20')+')')};return{'state':'absent','checked':_0x2740d3};}function a251_0x29cb(){const _0x248a3e=['not-recorded','version','\x20is\x20unreadable:\x20','present','recorded','.agents','home','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','unusable','kind','\x20has\x20no\x20skills\x20map','map','3eOWXBD','number','148521EYiWda','524925LGAUuV','reason','38864860kIVxjQ','parse','lockFile','find','4165782tbVrcO','.claude','object','utf8','1352184RGkJUA','\x20uses\x20unsupported\x20version\x20','includes','112OzHeub','message','581749FLsXIv','.skill-lock.json','unverifiable','9qNWvEj','SKILL.md','globalSkillsDirs','6928648kzwlxy','skills'];a251_0x29cb=function(){return _0x248a3e;};return a251_0x29cb();}
@@ -0,0 +1,12 @@
1
+ export type ReportCommandTraceParams = {
2
+ service: string;
3
+ command: string;
4
+ flags: Record<string, unknown>;
5
+ durationMs?: number;
6
+ error?: unknown;
7
+ };
8
+ /**
9
+ * 命令执行遥测上报(不抛错,不影响主流程)。
10
+ * 退出前由 `registerOtelShutdownOnExit` 调用 `shutdownTraces`。
11
+ */
12
+ export declare function reportCommandTrace(params: ReportCommandTraceParams): Promise<void>;
@@ -1 +1 @@
1
- (function(_0x112067,_0x55e772){const _0x14a748=a254_0x158b,_0x434657=_0x112067();while(!![]){try{const _0xe5df55=parseInt(_0x14a748(0xbf))/0x1*(-parseInt(_0x14a748(0xc5))/0x2)+-parseInt(_0x14a748(0xc9))/0x3*(-parseInt(_0x14a748(0xbd))/0x4)+-parseInt(_0x14a748(0xce))/0x5*(parseInt(_0x14a748(0xc8))/0x6)+-parseInt(_0x14a748(0xcb))/0x7*(parseInt(_0x14a748(0xbe))/0x8)+-parseInt(_0x14a748(0xca))/0x9*(-parseInt(_0x14a748(0xcc))/0xa)+-parseInt(_0x14a748(0xc4))/0xb+parseInt(_0x14a748(0xcf))/0xc*(parseInt(_0x14a748(0xc1))/0xd);if(_0xe5df55===_0x55e772)break;else _0x434657['push'](_0x434657['shift']());}catch(_0xb1c387){_0x434657['push'](_0x434657['shift']());}}}(a254_0x2c2f,0x8118c));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function a254_0x2c2f(){const _0x510707=['stringify','durationMs','40OnkBAx','4072jMDJPe','1AxOEMU','flags','178529KYIHQR','service','[REDACTED]','2940806QuqdHM','1435468HWwCAJ','message','rabetbase.command','6414xDoItQ','135627LwBNGi','81IbmcJM','4424ygZMqF','1075630upAiIP','command','4095gmLGOc','1128OQCzTw','error','entries'];a254_0x2c2f=function(){return _0x510707;};return a254_0x2c2f();}function a254_0x158b(_0x10c5c2,_0x133973){_0x10c5c2=_0x10c5c2-0xbb;const _0x2c2f25=a254_0x2c2f();let _0x158b6f=_0x2c2f25[_0x10c5c2];return _0x158b6f;}function isSensitiveKey(_0x11c446){return SENSITIVE_PATTERNS['some'](_0x9f8818=>_0x9f8818['test'](_0x11c446));}function sanitizeFlags(_0x3bfdb0){const _0x1a8917=a254_0x158b,_0x23aead={};for(const [_0xc08e88,_0x4f10c2]of Object[_0x1a8917(0xd1)](_0x3bfdb0)){isSensitiveKey(_0xc08e88)?_0x23aead[_0xc08e88]=_0x4f10c2!=null&&_0x4f10c2!==''?_0x1a8917(0xc3):_0x4f10c2:_0x23aead[_0xc08e88]=_0x4f10c2;}return _0x23aead;}export async function reportCommandTrace(_0x4a6c7e){const _0x3ce45a=a254_0x158b;try{const _0x2e843d=sanitizeFlags(_0x4a6c7e[_0x3ce45a(0xc0)]);await sendCliTraceLog({'spanName':_0x3ce45a(0xc7),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x4a6c7e[_0x3ce45a(0xc2)],'command.name':_0x4a6c7e[_0x3ce45a(0xcd)],'command.flags':JSON[_0x3ce45a(0xbb)](_0x2e843d),..._0x4a6c7e['durationMs']!=null?{'command.duration_ms':_0x4a6c7e[_0x3ce45a(0xbc)]}:{},..._0x4a6c7e['error']?{'command.error':_0x4a6c7e[_0x3ce45a(0xd0)]instanceof Error?_0x4a6c7e[_0x3ce45a(0xd0)][_0x3ce45a(0xc6)]:String(_0x4a6c7e[_0x3ce45a(0xd0)])}:{}}});}catch{}}
1
+ (function(_0x285aff,_0x482a63){const _0x27f49c=a252_0x3469,_0x4f578=_0x285aff();while(!![]){try{const _0x1cf627=parseInt(_0x27f49c(0x1aa))/0x1*(-parseInt(_0x27f49c(0x1b7))/0x2)+parseInt(_0x27f49c(0x1b5))/0x3*(parseInt(_0x27f49c(0x1ae))/0x4)+parseInt(_0x27f49c(0x1b8))/0x5*(parseInt(_0x27f49c(0x1b0))/0x6)+parseInt(_0x27f49c(0x1bf))/0x7+-parseInt(_0x27f49c(0x1b9))/0x8*(parseInt(_0x27f49c(0x1b2))/0x9)+-parseInt(_0x27f49c(0x1b4))/0xa+-parseInt(_0x27f49c(0x1af))/0xb*(parseInt(_0x27f49c(0x1ac))/0xc);if(_0x1cf627===_0x482a63)break;else _0x4f578['push'](_0x4f578['shift']());}catch(_0x53c6f2){_0x4f578['push'](_0x4f578['shift']());}}}(a252_0xda64,0x76c93));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a252_0x3469(_0x299947,_0x3e1baa){_0x299947=_0x299947-0x1a9;const _0xda64ea=a252_0xda64();let _0x3469b5=_0xda64ea[_0x299947];return _0x3469b5;}function a252_0xda64(){const _0x211638=['stringify','3013722DiwEZJ','[REDACTED]','7521650WFYYkh','699GVcybR','message','480TZByne','5BZBFVC','8waLSxI','durationMs','error','test','entries','some','6410803pcFAcf','service','741DWOdHW','command','156pQxYdV','flags','8524bkBzkm','113465jLSaUT','2838918ynAZtA'];a252_0xda64=function(){return _0x211638;};return a252_0xda64();}import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x38222d){const _0x20e7e2=a252_0x3469;return SENSITIVE_PATTERNS[_0x20e7e2(0x1be)](_0x1ccf16=>_0x1ccf16[_0x20e7e2(0x1bc)](_0x38222d));}function sanitizeFlags(_0x186017){const _0x2d58a0=a252_0x3469,_0x946872={};for(const [_0x4d2bb4,_0x5796a1]of Object[_0x2d58a0(0x1bd)](_0x186017)){isSensitiveKey(_0x4d2bb4)?_0x946872[_0x4d2bb4]=_0x5796a1!=null&&_0x5796a1!==''?_0x2d58a0(0x1b3):_0x5796a1:_0x946872[_0x4d2bb4]=_0x5796a1;}return _0x946872;}export async function reportCommandTrace(_0x44d634){const _0x23e710=a252_0x3469;try{const _0x2b6d28=sanitizeFlags(_0x44d634[_0x23e710(0x1ad)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x44d634[_0x23e710(0x1a9)],'command.name':_0x44d634[_0x23e710(0x1ab)],'command.flags':JSON[_0x23e710(0x1b1)](_0x2b6d28),..._0x44d634[_0x23e710(0x1ba)]!=null?{'command.duration_ms':_0x44d634[_0x23e710(0x1ba)]}:{},..._0x44d634['error']?{'command.error':_0x44d634[_0x23e710(0x1bb)]instanceof Error?_0x44d634[_0x23e710(0x1bb)][_0x23e710(0x1b6)]:String(_0x44d634[_0x23e710(0x1bb)])}:{}}});}catch{}}
@@ -0,0 +1,8 @@
1
+ export type CliHelpTraceKind = "global" | "unknown_service";
2
+ /**
3
+ * CLI 展示帮助时上报 OTel(不抛错,不影响主流程)。
4
+ * 退出前由 `registerOtelShutdownOnExit` 调用 `shutdownTraces`。
5
+ */
6
+ export declare function reportCliHelpTrace(kind: CliHelpTraceKind, options?: {
7
+ service?: string;
8
+ }): Promise<void>;
@@ -1 +1 @@
1
- function a255_0x5609(){var _0x1f2499=['233129fGMsNl','1125024EgolzQ','2276316UQTksr','536TrNflo','3256130wvOUGP','1019476BsUAhB','cli.help','error','55eNUBLi','service','3WYzcSK','68814Hstwko','Failed\x20to\x20report\x20CLI\x20help\x20trace:','40419mTbFXu'];a255_0x5609=function(){return _0x1f2499;};return a255_0x5609();}function a255_0x22a1(_0x2eaa10,_0x350999){_0x2eaa10=_0x2eaa10-0x1b6;var _0x560939=a255_0x5609();var _0x22a1f3=_0x560939[_0x2eaa10];return _0x22a1f3;}(function(_0x4e795,_0x2cfa49){var _0xc830bc=a255_0x22a1,_0x51aba5=_0x4e795();while(!![]){try{var _0x4f164f=parseInt(_0xc830bc(0x1bb))/0x1+parseInt(_0xc830bc(0x1c0))/0x2*(parseInt(_0xc830bc(0x1b7))/0x3)+-parseInt(_0xc830bc(0x1bc))/0x4+-parseInt(_0xc830bc(0x1c3))/0x5*(-parseInt(_0xc830bc(0x1b8))/0x6)+-parseInt(_0xc830bc(0x1bd))/0x7+parseInt(_0xc830bc(0x1be))/0x8*(-parseInt(_0xc830bc(0x1ba))/0x9)+parseInt(_0xc830bc(0x1bf))/0xa;if(_0x4f164f===_0x2cfa49)break;else _0x51aba5['push'](_0x51aba5['shift']());}catch(_0x3730da){_0x51aba5['push'](_0x51aba5['shift']());}}}(a255_0x5609,0x46242));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x2dc845,_0x4217d9){var _0xe2bb1a=a255_0x22a1;try{await sendCliTraceLog({'spanName':_0xe2bb1a(0x1c1),'logData':{'rabetbase.help.kind':_0x2dc845,..._0x4217d9?.['service']&&{'rabetbase.help.service':_0x4217d9[_0xe2bb1a(0x1b6)]}}});}catch(_0x16f30a){console[_0xe2bb1a(0x1c2)](_0xe2bb1a(0x1b9),_0x16f30a);}}
1
+ (function(_0x3884e9,_0x256baa){var _0x2da24e=a253_0x2b90,_0x358ad3=_0x3884e9();while(!![]){try{var _0x519768=-parseInt(_0x2da24e(0x12e))/0x1+parseInt(_0x2da24e(0x133))/0x2+parseInt(_0x2da24e(0x12d))/0x3*(-parseInt(_0x2da24e(0x136))/0x4)+parseInt(_0x2da24e(0x12b))/0x5*(parseInt(_0x2da24e(0x129))/0x6)+-parseInt(_0x2da24e(0x12a))/0x7+-parseInt(_0x2da24e(0x130))/0x8*(parseInt(_0x2da24e(0x12f))/0x9)+parseInt(_0x2da24e(0x134))/0xa;if(_0x519768===_0x256baa)break;else _0x358ad3['push'](_0x358ad3['shift']());}catch(_0x43e5ae){_0x358ad3['push'](_0x358ad3['shift']());}}}(a253_0x1079,0xb093c));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a253_0x2b90(_0x15bbd2,_0x37fbd2){_0x15bbd2=_0x15bbd2-0x129;var _0x107937=a253_0x1079();var _0x2b90eb=_0x107937[_0x15bbd2];return _0x2b90eb;}export async function reportCliHelpTrace(_0x1902f7,_0x1c21e8){var _0x38c79a=a253_0x2b90;try{await sendCliTraceLog({'spanName':_0x38c79a(0x131),'logData':{'rabetbase.help.kind':_0x1902f7,..._0x1c21e8?.[_0x38c79a(0x12c)]&&{'rabetbase.help.service':_0x1c21e8[_0x38c79a(0x12c)]}}});}catch(_0x5367da){console[_0x38c79a(0x132)](_0x38c79a(0x135),_0x5367da);}}function a253_0x1079(){var _0x479f19=['1010wbXlZr','service','299391MzbxFa','747489vSWadJ','36162kPAKUY','2568oxlbPj','cli.help','error','92928Smwemu','35278570eqXJfJ','Failed\x20to\x20report\x20CLI\x20help\x20trace:','4rRHJjK','21174BLxPvv','9987985JSQMCR'];a253_0x1079=function(){return _0x479f19;};return a253_0x1079();}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 拉取当前会话;仅在进程内首次写入 service/user context,后续 `sendTraceLog` 复用同一进程级上下文。
3
+ * 每次仍会请求 get-session(用于 span 上的 userid 等),若需极致减少请求可再缓存 session。
4
+ * 这里只负责宿主级公共字段,不承载单次 issue 的业务正文。
5
+ */
6
+ export declare function ensureCliOtelTraceConfig(): Promise<import("../auth/get-session-user.js").AuthSessionUserResponse | null>;
@@ -1 +1 @@
1
- function a256_0x2ca2(_0x1a6e4c,_0x178964){_0x1a6e4c=_0x1a6e4c-0x146;const _0x180bbc=a256_0x180b();let _0x2ca2be=_0x180bbc[_0x1a6e4c];return _0x2ca2be;}(function(_0x20a786,_0x5665cf){const _0x1ac9ff=a256_0x2ca2,_0x3ecd98=_0x20a786();while(!![]){try{const _0x44e59d=parseInt(_0x1ac9ff(0x148))/0x1+-parseInt(_0x1ac9ff(0x149))/0x2+parseInt(_0x1ac9ff(0x14c))/0x3*(-parseInt(_0x1ac9ff(0x147))/0x4)+parseInt(_0x1ac9ff(0x150))/0x5+parseInt(_0x1ac9ff(0x14b))/0x6+parseInt(_0x1ac9ff(0x14e))/0x7*(parseInt(_0x1ac9ff(0x14a))/0x8)+-parseInt(_0x1ac9ff(0x14d))/0x9;if(_0x44e59d===_0x5665cf)break;else _0x3ecd98['push'](_0x3ecd98['shift']());}catch(_0x4149d2){_0x3ecd98['push'](_0x3ecd98['shift']());}}}(a256_0x180b,0x83b5a));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';function a256_0x180b(){const _0x29639f=['213072egYFzq','4198596PLMLGL','3iGpvmG','1138950sMbNXS','14hEbSQD','tenant_code','2066080fZBjMS','email','user','daily','username','nickname','tenant','1602892NNdsGH','864325Divxpq','1927640syzTfk'];a256_0x180b=function(){return _0x29639f;};return a256_0x180b();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x139e94=a256_0x2ca2,_0x52e179=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x354c0d=_0x52e179?.[_0x139e94(0x152)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x139e94(0x153):'production')}),setUserContext({'id':_0x354c0d?.['id'],'username':_0x354c0d?.[_0x139e94(0x154)],'nickname':_0x354c0d?.[_0x139e94(0x155)],'email':_0x354c0d?.[_0x139e94(0x151)],'tenantCode':_0x354c0d?.[_0x139e94(0x146)]?.[_0x139e94(0x14f)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x52e179;}
1
+ (function(_0xea1005,_0xe0c7d4){const _0xd3faaa=a254_0x1387,_0x34c337=_0xea1005();while(!![]){try{const _0x203603=parseInt(_0xd3faaa(0xf6))/0x1*(-parseInt(_0xd3faaa(0xff))/0x2)+parseInt(_0xd3faaa(0xf5))/0x3+parseInt(_0xd3faaa(0xf3))/0x4*(-parseInt(_0xd3faaa(0xfe))/0x5)+-parseInt(_0xd3faaa(0xfc))/0x6+-parseInt(_0xd3faaa(0xfa))/0x7+parseInt(_0xd3faaa(0x100))/0x8+parseInt(_0xd3faaa(0xf4))/0x9;if(_0x203603===_0xe0c7d4)break;else _0x34c337['push'](_0x34c337['shift']());}catch(_0x4060f9){_0x34c337['push'](_0x34c337['shift']());}}}(a254_0x416c,0xa0f3c));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';function a254_0x1387(_0x51a057,_0x4f0c89){_0x51a057=_0x51a057-0xf3;const _0x416ce0=a254_0x416c();let _0x138735=_0x416ce0[_0x51a057];return _0x138735;}import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';function a254_0x416c(){const _0x15118e=['22503825PSrRmv','1974381vOAvWG','1VrFful','nickname','production','username','9214072EVYdug','user','325692upxxWZ','daily','4081090VhIuXi','1802074JcqCOi','4708328FzjCFv','email','4pEFuJj'];a254_0x416c=function(){return _0x15118e;};return a254_0x416c();}let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x57d194=a254_0x1387,_0x45a305=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x110a07=_0x45a305?.[_0x57d194(0xfb)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x57d194(0xfd):_0x57d194(0xf8))}),setUserContext({'id':_0x110a07?.['id'],'username':_0x110a07?.[_0x57d194(0xf9)],'nickname':_0x110a07?.[_0x57d194(0xf7)],'email':_0x110a07?.[_0x57d194(0x101)],'tenantCode':_0x110a07?.['tenant']?.['tenant_code'],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x45a305;}
@@ -0,0 +1,3 @@
1
+ export declare function flushOtelNodeIfUsed(): Promise<void>;
2
+ export declare function registerOtelShutdownOnExit(): void;
3
+ export declare function exitWithOtelShutdown(exitCode: number): Promise<never>;