@lovrabet/rabetbase-cli 2.5.8-beta.1 → 2.5.8-beta.2

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 (381) hide show
  1. package/README.md +7 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.js +1 -1
  78. package/lib/commands/dataset/design-start.js +1 -1
  79. package/lib/commands/dataset/design-status.js +1 -1
  80. package/lib/commands/dataset/design-sync-retry.js +1 -1
  81. package/lib/commands/dataset/design-sync-status.js +1 -1
  82. package/lib/commands/dataset/design-validate.js +1 -1
  83. package/lib/commands/dataset/detail.js +1 -1
  84. package/lib/commands/dataset/extend-update.js +1 -1
  85. package/lib/commands/dataset/field-restore.js +1 -1
  86. package/lib/commands/dataset/field-update.js +1 -1
  87. package/lib/commands/dataset/generate.js +1 -1
  88. package/lib/commands/dataset/index.js +1 -1
  89. package/lib/commands/dataset/list.js +1 -1
  90. package/lib/commands/dataset/operations.js +1 -1
  91. package/lib/commands/dataset/relation-audit.js +1 -1
  92. package/lib/commands/dataset/relation-create.js +1 -1
  93. package/lib/commands/dataset/relation-delete.js +1 -1
  94. package/lib/commands/dataset/relation-shared.js +1 -1
  95. package/lib/commands/dataset/relation-update.js +1 -1
  96. package/lib/commands/dataset/relations.js +1 -1
  97. package/lib/commands/dataset/rename.js +1 -1
  98. package/lib/commands/dataset/restore.js +1 -1
  99. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  100. package/lib/commands/db/analysis-batching.js +1 -1
  101. package/lib/commands/db/analyze-batch-plan.js +1 -1
  102. package/lib/commands/db/analyze-cancel.js +1 -1
  103. package/lib/commands/db/analyze-start.js +1 -1
  104. package/lib/commands/db/analyze-status.js +1 -1
  105. package/lib/commands/db/create.js +1 -1
  106. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  109. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  110. package/lib/commands/db/delete.js +1 -1
  111. package/lib/commands/db/detail.js +1 -1
  112. package/lib/commands/db/diff-refresh-start.js +1 -1
  113. package/lib/commands/db/diff-refresh-status.js +1 -1
  114. package/lib/commands/db/diff.js +1 -1
  115. package/lib/commands/db/index.js +1 -1
  116. package/lib/commands/db/list.js +1 -1
  117. package/lib/commands/db/shared.js +1 -1
  118. package/lib/commands/db/table-diff-shared.js +1 -1
  119. package/lib/commands/db/tables.js +1 -1
  120. package/lib/commands/db/test.js +1 -1
  121. package/lib/commands/db/update.js +1 -1
  122. package/lib/commands/deployment/index.js +1 -1
  123. package/lib/commands/deployment/sync-all.js +1 -1
  124. package/lib/commands/deployment/sync-jobs.js +1 -1
  125. package/lib/commands/deployment/sync-status.js +1 -1
  126. package/lib/commands/doctor.js +1 -1
  127. package/lib/commands/file/index.js +1 -1
  128. package/lib/commands/flow/create.js +1 -1
  129. package/lib/commands/flow/detail.js +1 -1
  130. package/lib/commands/flow/index.js +1 -1
  131. package/lib/commands/flow/list.js +1 -1
  132. package/lib/commands/flow/page-list.js +1 -1
  133. package/lib/commands/flow/publish.js +1 -1
  134. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  135. package/lib/commands/flow/runtime-role-list.js +1 -1
  136. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  137. package/lib/commands/flow/runtime-user-search.js +1 -1
  138. package/lib/commands/flow/shared.js +1 -1
  139. package/lib/commands/flow/update.js +1 -1
  140. package/lib/commands/flow/validate.js +1 -1
  141. package/lib/commands/instant-api-policy/current.js +1 -1
  142. package/lib/commands/instant-api-policy/index.js +1 -1
  143. package/lib/commands/instant-api-policy/init.js +1 -1
  144. package/lib/commands/instant-api-policy/publish.js +1 -1
  145. package/lib/commands/instant-api-policy/pull.js +1 -1
  146. package/lib/commands/instant-api-policy/revision.js +1 -1
  147. package/lib/commands/instant-api-policy/revisions.js +1 -1
  148. package/lib/commands/instant-api-policy/rollback.js +1 -1
  149. package/lib/commands/instant-api-policy/shared.js +1 -1
  150. package/lib/commands/instant-api-policy/validate.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/issue/shared.js +1 -1
  155. package/lib/commands/kb/create.js +1 -1
  156. package/lib/commands/kb/delete.js +1 -1
  157. package/lib/commands/kb/detail.js +1 -1
  158. package/lib/commands/kb/index.js +1 -1
  159. package/lib/commands/kb/list.js +1 -1
  160. package/lib/commands/kb/search.js +1 -1
  161. package/lib/commands/kb/shared.js +1 -1
  162. package/lib/commands/kb/update.js +1 -1
  163. package/lib/commands/logs/index.js +1 -1
  164. package/lib/commands/menu/asset-update.js +1 -1
  165. package/lib/commands/menu/delete.js +1 -1
  166. package/lib/commands/menu/external-link-create.js +1 -1
  167. package/lib/commands/menu/external-link-update.js +1 -1
  168. package/lib/commands/menu/group-create.js +1 -1
  169. package/lib/commands/menu/group-update.js +1 -1
  170. package/lib/commands/menu/index.js +1 -1
  171. package/lib/commands/menu/list.js +1 -1
  172. package/lib/commands/menu/move.js +1 -1
  173. package/lib/commands/menu/regroup-start.js +1 -1
  174. package/lib/commands/menu/rename.js +1 -1
  175. package/lib/commands/menu/shared/compare-table.js +1 -1
  176. package/lib/commands/menu/shared/delete-plan.js +1 -1
  177. package/lib/commands/menu/shared/facts.js +1 -1
  178. package/lib/commands/menu/shared/index.js +1 -1
  179. package/lib/commands/menu/shared/inquirer.js +1 -1
  180. package/lib/commands/menu/shared/local-pages.js +1 -1
  181. package/lib/commands/menu/shared/logic.js +1 -1
  182. package/lib/commands/menu/shared/mutations.js +1 -1
  183. package/lib/commands/menu/shared/path.js +1 -1
  184. package/lib/commands/menu/shared/service.js +1 -1
  185. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  186. package/lib/commands/menu/shared/sync-core.js +1 -1
  187. package/lib/commands/menu/shared/update-core.js +1 -1
  188. package/lib/commands/menu/shared/valid-url.js +1 -1
  189. package/lib/commands/menu/subapp-assets-status.js +1 -1
  190. package/lib/commands/menu/subapp-assets-update.js +1 -1
  191. package/lib/commands/menu/sync.js +1 -1
  192. package/lib/commands/menu/visibility-update.js +1 -1
  193. package/lib/commands/notification/config-create.js +1 -1
  194. package/lib/commands/notification/config-delete.js +1 -1
  195. package/lib/commands/notification/config-list.js +1 -1
  196. package/lib/commands/notification/config-update.js +1 -1
  197. package/lib/commands/notification/index.js +1 -1
  198. package/lib/commands/notification/shared.js +1 -1
  199. package/lib/commands/ocr/index.js +1 -1
  200. package/lib/commands/page/create.js +1 -1
  201. package/lib/commands/page/custom/detail.js +1 -1
  202. package/lib/commands/page/custom/list.js +1 -1
  203. package/lib/commands/page/custom/publish.js +1 -1
  204. package/lib/commands/page/custom/shared.js +1 -1
  205. package/lib/commands/page/custom/syntax.js +1 -1
  206. package/lib/commands/page/custom/update.js +1 -1
  207. package/lib/commands/page/data-list-status.js +1 -1
  208. package/lib/commands/page/generate-start.js +1 -1
  209. package/lib/commands/page/generate-status.js +1 -1
  210. package/lib/commands/page/index.js +1 -1
  211. package/lib/commands/page/pull.js +1 -1
  212. package/lib/commands/page/push.js +1 -1
  213. package/lib/commands/page/relation-audit.js +1 -1
  214. package/lib/commands/page/restore.js +1 -1
  215. package/lib/commands/page/shared.js +1 -1
  216. package/lib/commands/page/sync.js +1 -1
  217. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  218. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  219. package/lib/commands/project/create/format-elapsed.js +1 -1
  220. package/lib/commands/project/create/main.js +1 -1
  221. package/lib/commands/project/create/materialize-project-template.js +1 -1
  222. package/lib/commands/project/create/project-name.js +1 -1
  223. package/lib/commands/project/create/project-template-archive.js +1 -1
  224. package/lib/commands/project/create/project-template-path.js +1 -1
  225. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  226. package/lib/commands/project/create/use-format-code.js +1 -1
  227. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  228. package/lib/commands/project/domain-routing-sync.js +1 -1
  229. package/lib/commands/project/index.js +1 -1
  230. package/lib/commands/project/upgrade.js +1 -1
  231. package/lib/commands/registry.js +1 -1
  232. package/lib/commands/role/delete.js +1 -1
  233. package/lib/commands/role/detail.js +1 -1
  234. package/lib/commands/role/index.js +1 -1
  235. package/lib/commands/role/list.js +1 -1
  236. package/lib/commands/role/shared.js +1 -1
  237. package/lib/commands/role/update.js +1 -1
  238. package/lib/commands/role/user-add.js +1 -1
  239. package/lib/commands/role/user-remove.js +1 -1
  240. package/lib/commands/role/user-resolve.js +1 -1
  241. package/lib/commands/rule/get.js +1 -1
  242. package/lib/commands/rule/index.js +1 -1
  243. package/lib/commands/rule/list.js +1 -1
  244. package/lib/commands/rule/set.js +1 -1
  245. package/lib/commands/rule/shared.js +1 -1
  246. package/lib/commands/run/index.js +1 -1
  247. package/lib/commands/schema.js +1 -1
  248. package/lib/commands/sql/create.js +1 -1
  249. package/lib/commands/sql/delete.js +1 -1
  250. package/lib/commands/sql/detail.js +1 -1
  251. package/lib/commands/sql/exec.js +1 -1
  252. package/lib/commands/sql/index.js +1 -1
  253. package/lib/commands/sql/list.js +1 -1
  254. package/lib/commands/sql/pull.js +1 -1
  255. package/lib/commands/sql/push.js +1 -1
  256. package/lib/commands/sql/shared.js +1 -1
  257. package/lib/commands/sql/status.js +1 -1
  258. package/lib/commands/sql/validate.js +1 -1
  259. package/lib/commands/task/index.js +1 -1
  260. package/lib/commands/task/status.js +1 -1
  261. package/lib/commands/tenant/index.js +1 -1
  262. package/lib/commands/tenant/members-list.js +1 -1
  263. package/lib/commands/tenant/shared.js +1 -1
  264. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  265. package/lib/commands/user-account/feishu-bind.js +1 -1
  266. package/lib/commands/user-account/index.js +1 -1
  267. package/lib/commands/workspace/add.js +1 -1
  268. package/lib/commands/workspace/index.js +1 -1
  269. package/lib/commands/workspace/remove.js +1 -1
  270. package/lib/config/domain-config.js +1 -1
  271. package/lib/config/project-domain-routing.js +1 -1
  272. package/lib/config/region-config.js +1 -1
  273. package/lib/config/schema.js +1 -1
  274. package/lib/constant/cdn.js +1 -1
  275. package/lib/constant/cli.js +1 -1
  276. package/lib/constant/defaults.js +1 -1
  277. package/lib/constant/domain.d.ts +1 -1
  278. package/lib/constant/domain.js +1 -1
  279. package/lib/constant/env.js +1 -1
  280. package/lib/constant/output.js +1 -1
  281. package/lib/constant/paths.js +1 -1
  282. package/lib/constant/region.js +1 -1
  283. package/lib/constant/risk.js +1 -1
  284. package/lib/constant/routing-profile.js +1 -1
  285. package/lib/context/app-resolver.js +1 -1
  286. package/lib/context/auth-resolver.js +1 -1
  287. package/lib/context/config-loader.js +1 -1
  288. package/lib/context.js +1 -1
  289. package/lib/core/alias-resolver.js +1 -1
  290. package/lib/core/api-client.d.ts +2 -2
  291. package/lib/core/api-client.js +1 -1
  292. package/lib/core/bff/config.js +1 -1
  293. package/lib/core/bff/file-system.js +1 -1
  294. package/lib/core/bff/hash.js +1 -1
  295. package/lib/core/bff/hook-directory.js +1 -1
  296. package/lib/core/bff/lock.js +1 -1
  297. package/lib/core/bff/utils.js +1 -1
  298. package/lib/core/cross-db-analysis.js +1 -1
  299. package/lib/core/cross-db-relation.js +1 -1
  300. package/lib/core/db-resolver.js +1 -1
  301. package/lib/core/flow-config.js +1 -1
  302. package/lib/core/instant-api-policy/config.js +1 -1
  303. package/lib/core/kb-management-client.d.ts +19 -0
  304. package/lib/core/kb-management-client.js +1 -0
  305. package/lib/core/kb-search-client.js +1 -1
  306. package/lib/core/page/file-system.js +1 -1
  307. package/lib/core/page/hash.js +1 -1
  308. package/lib/core/page/lock.js +1 -1
  309. package/lib/core/page/lr-smart-jsx.js +1 -1
  310. package/lib/core/sql-index-auditor.js +1 -1
  311. package/lib/core/sql-sync/config.js +1 -1
  312. package/lib/core/sql-sync/file-system.js +1 -1
  313. package/lib/core/sql-sync/hash.js +1 -1
  314. package/lib/core/sql-sync/lock.js +1 -1
  315. package/lib/core/sql-sync/utils.js +1 -1
  316. package/lib/core/sql-validator.js +1 -1
  317. package/lib/errors.js +1 -1
  318. package/lib/framework/build-all-flags.js +1 -1
  319. package/lib/framework/error-output.js +1 -1
  320. package/lib/framework/explicit-yes.js +1 -1
  321. package/lib/framework/flags.js +1 -1
  322. package/lib/framework/help.js +1 -1
  323. package/lib/framework/index.js +1 -1
  324. package/lib/framework/output.js +1 -1
  325. package/lib/framework/response.js +1 -1
  326. package/lib/framework/runner-alias.js +1 -1
  327. package/lib/framework/runner.js +1 -1
  328. package/lib/framework/schema-export.js +1 -1
  329. package/lib/framework/supported-flags.js +1 -1
  330. package/lib/framework/types.js +1 -1
  331. package/lib/generated/build-info.d.ts +4 -4
  332. package/lib/generated/build-info.js +1 -1
  333. package/lib/generated/official-routing.js +1 -1
  334. package/lib/generated/routing-contract.js +1 -1
  335. package/lib/help.js +1 -1
  336. package/lib/postinstall.js +1 -1
  337. package/lib/runtime/confirmation.js +1 -1
  338. package/lib/runtime/event.js +1 -1
  339. package/lib/runtime/index.js +1 -1
  340. package/lib/runtime/queue.js +1 -1
  341. package/lib/runtime/resolve.js +1 -1
  342. package/lib/services/dataset-design/checkpoint.js +1 -1
  343. package/lib/services/dataset-design/commands.js +1 -1
  344. package/lib/services/dataset-design/contract.js +1 -1
  345. package/lib/skills/builtin-skill.js +1 -1
  346. package/lib/skills/main.js +1 -1
  347. package/lib/skills/npx-skills-add.js +1 -1
  348. package/lib/skills/skill-presence.js +1 -1
  349. package/lib/telemetry/cli-command-trace.js +1 -1
  350. package/lib/telemetry/cli-help-trace.js +1 -1
  351. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  352. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  353. package/lib/telemetry/send-cli-trace-log.js +1 -1
  354. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  355. package/lib/utils/ai_config.js +1 -1
  356. package/lib/utils/apply-jq-filter.js +1 -1
  357. package/lib/utils/cdn-config.js +1 -1
  358. package/lib/utils/check-sdk-version.js +1 -1
  359. package/lib/utils/cli-version-check.js +1 -1
  360. package/lib/utils/cli-version-policy.js +1 -1
  361. package/lib/utils/config.js +1 -1
  362. package/lib/utils/entity-with-id.js +1 -1
  363. package/lib/utils/file-utils.js +1 -1
  364. package/lib/utils/guides-cdn.js +1 -1
  365. package/lib/utils/http-client.js +1 -1
  366. package/lib/utils/is-non-interactive.js +1 -1
  367. package/lib/utils/logger.js +1 -1
  368. package/lib/utils/params.js +1 -1
  369. package/lib/utils/platform.js +1 -1
  370. package/lib/utils/sleep.js +1 -1
  371. package/lib/utils/template-replacer.js +1 -1
  372. package/lib/utils/update-notice.js +1 -1
  373. package/lib/utils/version.js +1 -1
  374. package/lib/utils/with-active-cookie.js +1 -1
  375. package/lib/utils/write-cli-side-channel.js +1 -1
  376. package/package.json +1 -1
  377. package/skills/rabetbase/SKILL.md +2 -2
  378. package/skills/rabetbase/references/rabetbase-kb.md +7 -6
  379. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  380. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  381. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a341_0x3f72de=a341_0x5e62;(function(_0x596a21,_0x434363){const _0x3070b8=a341_0x5e62,_0x4761a8=_0x596a21();while(!![]){try{const _0x42d66f=-parseInt(_0x3070b8(0x152))/0x1*(-parseInt(_0x3070b8(0x1c3))/0x2)+parseInt(_0x3070b8(0x1bb))/0x3*(parseInt(_0x3070b8(0x178))/0x4)+-parseInt(_0x3070b8(0x1af))/0x5+-parseInt(_0x3070b8(0x155))/0x6+-parseInt(_0x3070b8(0x177))/0x7+-parseInt(_0x3070b8(0x159))/0x8*(-parseInt(_0x3070b8(0x1ce))/0x9)+parseInt(_0x3070b8(0x189))/0xa;if(_0x42d66f===_0x434363)break;else _0x4761a8['push'](_0x4761a8['shift']());}catch(_0x22ced5){_0x4761a8['push'](_0x4761a8['shift']());}}}(a341_0x8892,0x5b5f1));import{randomUUID}from'node:crypto';import{resolve}from'node:path';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getApiDomain}from'../../constant/domain.js';import{getDatasetDesignContext,validateDatasetDesign,startDatasetDesign,getDatasetDesignStatus,getDatasetDesignSyncStatus,retryDatasetDesignSync,getDatasetDetail,getPlatformHttpStatus,isPlatformTransportFailure}from'../../core/api-client.js';import{inputHash,isObject,readManifest,requireValue,validateManifest}from'./contract.js';import{readCheckpoint,saveCheckpoint}from'./checkpoint.js';const flag=(_0x3ba5ae,_0x121869)=>({'name':_0x3ba5ae,'type':a341_0x3f72de(0x1b7),'description':_0x121869}),flags={'file':flag(a341_0x3f72de(0x1b0),a341_0x3f72de(0x1b6)),'output':flag(a341_0x3f72de(0x17a),a341_0x3f72de(0x1ca)),'checkpoint':flag(a341_0x3f72de(0x15e),'Durable\x20operation\x20checkpoint\x20path'),'client':flag(a341_0x3f72de(0x15b),a341_0x3f72de(0x179)),'operation':flag(a341_0x3f72de(0x17c),a341_0x3f72de(0x188)),'code':flag(a341_0x3f72de(0x168),'Saved\x20dataset\x20code')};function domain(_0x4c51e4){const _0x41aa26=a341_0x3f72de,_0xb49515=new URL(_0x4c51e4[_0x41aa26(0x16e)]||getApiDomain());return requireValue(!_0xb49515[_0x41aa26(0x17f)]&&!_0xb49515[_0x41aa26(0x197)]&&!_0xb49515[_0x41aa26(0x15d)]&&!_0xb49515['hash'],'API\x20domain\x20must\x20not\x20contain\x20credentials,\x20query\x20or\x20fragment.'),_0xb49515['toString']()[_0x41aa26(0x16b)](/\/+$/,'');}function required(_0x327f66,_0x20a196){const _0x4ca52b=a341_0x3f72de,_0x2cc764=_0x327f66[_0x4ca52b(0x1ae)](_0x20a196);if(!_0x2cc764)throw CliErrors[_0x4ca52b(0x161)](_0x20a196);return _0x2cc764;}function bind(_0x3abef8,_0x2e0a1a,_0x370dd5){const _0x528a7c=a341_0x3f72de;requireValue(_0x3abef8[_0x528a7c(0x1b1)]===_0x2e0a1a[_0x528a7c(0x1b1)]&&_0x3abef8[_0x528a7c(0x16e)]===domain(_0x2e0a1a)&&(_0x370dd5===undefined||_0x3abef8[_0x528a7c(0x1bc)]===_0x370dd5),_0x528a7c(0x167));}function query(_0x366e40,_0x2d27f8){const _0x257f0f=a341_0x3f72de;return{'command':'design-status','argv':[_0x257f0f(0x1c2),_0x257f0f(0x1b4),_0x257f0f(0x192),_0x257f0f(0x151),_0x366e40[_0x257f0f(0x1b1)],'--checkpoint',_0x2d27f8,_0x257f0f(0x19b),_0x257f0f(0x196)]};}function a341_0x5e62(_0x13438b,_0x17d9f7){_0x13438b=_0x13438b-0x150;const _0x889280=a341_0x8892();let _0x5e62b9=_0x889280[_0x13438b];return _0x5e62b9;}function unknown(_0x3c56b0,_0x45bddb){const _0x3c23e6=a341_0x3f72de;return{'status':_0x3c23e6(0x1bd),'clientOperationId':_0x3c56b0[_0x3c23e6(0x17e)],'operationId':_0x3c56b0[_0x3c23e6(0x18f)]??null,'checkpoint':_0x45bddb,'query':query(_0x3c56b0,_0x45bddb),'nextAction':'query_original_operation'};}function matchesField(_0x7bea8f,_0x3f7ebb){const _0x562e17=a341_0x3f72de;return Object['entries'](_0x3f7ebb)[_0x562e17(0x1c1)](([_0x140fef,_0x26a535])=>{const _0x4947d0=_0x562e17;if(_0x26a535==null)return!![];const _0x58fff8=_0x7bea8f[_0x140fef];if(_0x140fef===_0x4947d0(0x1cc)){if(!Array[_0x4947d0(0x173)](_0x58fff8)||!Array[_0x4947d0(0x173)](_0x26a535)||_0x58fff8[_0x4947d0(0x150)](_0x2477a8=>!isObject(_0x2477a8)))return![];const _0x11b306=_0x3aeafc=>_0x3aeafc[_0x4947d0(0x199)](({label:_0x354f69,value:_0x2a8129})=>({'label':_0x354f69,'value':_0x2a8129}));return inputHash(_0x11b306(_0x58fff8))===inputHash(_0x11b306(_0x26a535));}return _0x58fff8!==undefined&&inputHash(_0x58fff8)===inputHash(_0x26a535);});}function reconcile(_0x10ae3b,_0x23fcae){const _0x3c8536=a341_0x3f72de;if(!isObject(_0x10ae3b)||!Array[_0x3c8536(0x173)](_0x10ae3b[_0x3c8536(0x19f)])||!Array[_0x3c8536(0x173)](_0x10ae3b[_0x3c8536(0x17b)]))return;const _0x3afa92=_0x10ae3b[_0x3c8536(0x19f)],_0x15d8b5=_0x23fcae?.['datasets'][_0x3c8536(0x199)](_0x5b2228=>_0x5b2228[_0x3c8536(0x187)])??_0x10ae3b['expectedLocalKeys'];if(!Array[_0x3c8536(0x173)](_0x15d8b5)||_0x15d8b5[_0x3c8536(0x1c9)]!==_0x3afa92['length']||new Set(_0x15d8b5)[_0x3c8536(0x1a4)]!==_0x15d8b5['length'])return;const _0x3b9bf4=new Map();for(const _0x327ec9 of _0x3afa92){if(!isObject(_0x327ec9)||typeof _0x327ec9[_0x3c8536(0x187)]!=='string'||typeof _0x327ec9['code']!==_0x3c8536(0x1b7)||!_0x327ec9[_0x3c8536(0x168)]||_0x3b9bf4['has'](_0x327ec9[_0x3c8536(0x187)]))return;_0x3b9bf4[_0x3c8536(0x154)](_0x327ec9[_0x3c8536(0x187)],_0x327ec9[_0x3c8536(0x168)]);if(_0x23fcae){const _0x272865=_0x23fcae['datasets'][_0x3c8536(0x193)](_0x324652=>_0x324652['localKey']===_0x327ec9['localKey']);if(!_0x272865||!Array[_0x3c8536(0x173)](_0x327ec9[_0x3c8536(0x19a)]))return;if(_0x327ec9['fields'][_0x3c8536(0x150)](_0x55aaad=>!isObject(_0x55aaad)))return;const _0x42a1c4=new Map(_0x327ec9[_0x3c8536(0x19a)][_0x3c8536(0x199)](_0x1d2d1c=>[_0x1d2d1c[_0x3c8536(0x19c)],_0x1d2d1c]));if(_0x42a1c4[_0x3c8536(0x1a4)]!==_0x327ec9[_0x3c8536(0x19a)][_0x3c8536(0x1c9)]||_0x327ec9[_0x3c8536(0x1b9)]!==_0x327ec9[_0x3c8536(0x19a)][_0x3c8536(0x1c9)])return;if(_0x272865['fields'][_0x3c8536(0x150)](_0x374fe8=>!_0x42a1c4[_0x3c8536(0x182)](_0x374fe8[_0x3c8536(0x19c)])||!matchesField(_0x42a1c4[_0x3c8536(0x176)](_0x374fe8[_0x3c8536(0x19c)]),_0x374fe8)))return;const _0x159a14=new Set(_0x272865[_0x3c8536(0x19a)][_0x3c8536(0x199)](_0x5bc165=>_0x5bc165[_0x3c8536(0x19c)]));_0x159a14[_0x3c8536(0x1c5)]('id');if(_0x327ec9['fields']['some'](_0x20858c=>!_0x159a14[_0x3c8536(0x182)](_0x20858c['name'])))return;}}if(new Set(_0x3b9bf4[_0x3c8536(0x1a8)]())[_0x3c8536(0x1a4)]!==_0x3b9bf4[_0x3c8536(0x1a4)]||_0x15d8b5['some'](_0x3b3082=>!_0x3b9bf4[_0x3c8536(0x182)](_0x3b3082)))return;const _0x2ab09d=_0x23fcae?.['relations']??_0x10ae3b['expectedRelations'];if(!Array[_0x3c8536(0x173)](_0x2ab09d)||_0x2ab09d[_0x3c8536(0x1c9)]!==_0x10ae3b[_0x3c8536(0x17b)][_0x3c8536(0x1c9)])return;const _0x395610=_0x35d037=>JSON[_0x3c8536(0x1bf)]([_0x35d037[_0x3c8536(0x15f)],_0x35d037[_0x3c8536(0x158)],_0x35d037[_0x3c8536(0x171)]||_0x3b9bf4[_0x3c8536(0x176)](_0x35d037[_0x3c8536(0x198)]),_0x35d037[_0x3c8536(0x170)],_0x35d037[_0x3c8536(0x1c0)]||_0x3c8536(0x1ac),_0x35d037[_0x3c8536(0x175)]||'MANY_TO_ONE']),_0x5e5518=new Set(_0x2ab09d[_0x3c8536(0x199)](_0x395610)),_0x55abef=new Set(_0x10ae3b[_0x3c8536(0x17b)]['map'](_0x395610));if(_0x55abef['size']!==_0x2ab09d[_0x3c8536(0x1c9)]||_0x5e5518[_0x3c8536(0x1a4)]!==_0x2ab09d[_0x3c8536(0x1c9)]||[..._0x5e5518][_0x3c8536(0x150)](_0x16ce3d=>!_0x55abef[_0x3c8536(0x182)](_0x16ce3d)))return;for(const _0x1530fc of _0x10ae3b['createdRelations']){if(_0x1530fc['fromDatasetCode']!==_0x3b9bf4['get'](_0x1530fc['fromDatasetKey'])||_0x1530fc[_0x3c8536(0x198)]&&_0x1530fc[_0x3c8536(0x171)]!==_0x3b9bf4[_0x3c8536(0x176)](_0x1530fc[_0x3c8536(0x198)]))return;}return{'createdDatasets':_0x3afa92,'createdRelations':_0x10ae3b['createdRelations'],'unresolvedRelations':_0x10ae3b[_0x3c8536(0x1a2)]??[]};}export function statusData(_0x1c474d,_0x1e101b){const _0x4f6545=a341_0x3f72de;requireValue(isObject(_0x1c474d)&&typeof _0x1c474d[_0x4f6545(0x1b2)]==='string',_0x4f6545(0x1c4));const _0x178848={'jobStatus':_0x1c474d[_0x4f6545(0x1b2)],'operationId':_0x1c474d[_0x4f6545(0x18f)]??_0x1c474d[_0x4f6545(0x15a)]??null,'taskId':_0x1c474d[_0x4f6545(0x15a)]??_0x1c474d['operationId']??null,'clientOperationId':_0x1c474d[_0x4f6545(0x17e)]??null,'progressRate':_0x1c474d['progressRate']??null,'currentStep':_0x1c474d['currentStep']??null,'failedStage':_0x1c474d[_0x4f6545(0x1be)]??null,'sync':_0x1c474d[_0x4f6545(0x1a9)]??null,'errorMsg':_0x1c474d[_0x4f6545(0x165)]??null,'metrics':_0x1c474d[_0x4f6545(0x1a5)]??null},_0x4dbc56=!_0x1e101b&&_0x1c474d[_0x4f6545(0x1b2)]===_0x4f6545(0x180)&&isObject(_0x1c474d[_0x4f6545(0x1c8)]?.['dataset'])?_0x1c474d[_0x4f6545(0x1c8)]['dataset']:undefined;if(_0x4dbc56&&typeof _0x4dbc56[_0x4f6545(0x168)]===_0x4f6545(0x1b7)&&_0x4dbc56['code']&&_0x4dbc56['id']!=null)return{..._0x178848,'status':_0x4f6545(0x1c7),'createdDataset':_0x4dbc56};const _0x5704da=_0x1c474d[_0x4f6545(0x1b2)]==='SUCCESS'?reconcile(_0x1c474d['result'],_0x1e101b):undefined;return{..._0x178848,'status':_0x1c474d[_0x4f6545(0x1b2)]===_0x4f6545(0x180)?_0x5704da?_0x4f6545(0x163):_0x4f6545(0x18b):_0x1c474d[_0x4f6545(0x1b2)]==='FAILED'?_0x4f6545(0x1c6):[_0x4f6545(0x18c),_0x4f6545(0x1a3)]['includes'](_0x1c474d[_0x4f6545(0x1b2)])?'operation_pending':'unknown_reconcile_failed',..._0x5704da};}async function readStatus(_0x20b370,_0xcd6012){const _0x225279=a341_0x3f72de,_0x1234fd=statusData(_0x20b370,_0xcd6012);if(_0x20b370[_0x225279(0x1b2)]!==_0x225279(0x180)||!reconcile(_0x20b370[_0x225279(0x1c8)]))return _0x1234fd;const _0x54f93b=[];for(const _0x4eabbd of _0x20b370['result'][_0x225279(0x19f)]){const _0x18bd50=await getDatasetDetail(_0x4eabbd[_0x225279(0x168)]);requireValue(isObject(_0x18bd50)&&(_0x18bd50[_0x225279(0x181)]||_0x18bd50[_0x225279(0x168)])===_0x4eabbd[_0x225279(0x168)]&&Array[_0x225279(0x173)](_0x18bd50['fields']),_0x225279(0x162));const _0x453329=_0x18bd50[_0x225279(0x19a)][_0x225279(0x15c)](_0x518c93=>_0x518c93[_0x225279(0x18d)]!==!![]);_0x54f93b[_0x225279(0x164)]({..._0x4eabbd,'fields':_0x453329,'fieldCount':_0x453329[_0x225279(0x1c9)]});}return statusData({..._0x20b370,'result':{..._0x20b370[_0x225279(0x1c8)],'createdDatasets':_0x54f93b}},_0xcd6012);}async function recover(_0x22589e,_0x54c194,_0x38be3d){const _0xc0f5c=a341_0x3f72de;bind(_0x22589e,_0x38be3d);const _0xc40805=await getDatasetDesignContext(_0x38be3d[_0xc0f5c(0x1b1)]);requireValue(_0xc40805?.[_0xc0f5c(0x1b3)]===_0x22589e[_0xc0f5c(0x1b3)],_0xc0f5c(0x1a0));let _0x47acf5;try{_0x47acf5=await getDatasetDesignStatus(_0x38be3d[_0xc0f5c(0x1b1)],{'clientOperationId':_0x22589e['clientOperationId']});}catch(_0x2b3787){const _0x305c57=getPlatformHttpStatus(_0x2b3787);if(isPlatformTransportFailure(_0x2b3787)||_0x305c57===0x194)return unknown(_0x22589e,_0x54c194);throw _0x2b3787;}const _0x25ac2f=await readStatus(_0x47acf5,_0x22589e['manifest']);return _0x22589e[_0xc0f5c(0x184)]=_0x25ac2f['status'],_0x22589e[_0xc0f5c(0x18f)]=_0x47acf5[_0xc0f5c(0x18f)]||_0x22589e[_0xc0f5c(0x18f)],await saveCheckpoint(_0x54c194,_0x22589e),{..._0x25ac2f,'checkpoint':_0x54c194,'query':query(_0x22589e,_0x54c194)};}function a341_0x8892(){const _0x3aa230=['Invalid\x20client-operation-id.','\x20response\x20received','replace','includes','reused','apiDomain','design-','toField','toDatasetCode','prepared','isArray','start','cardinality','get','1830430wBWcit','303820vGWuNf','Stable\x20recovery\x20ID\x20for\x20one\x20design\x20operation','output','createdRelations','operation-id','node:path','clientOperationId','username','SUCCESS','modelCode','has','rejected','state','Server\x20rejected\x20the\x20design;\x20run\x20design-validate\x20and\x20repair\x20the\x20reported\x20fields.','Operation\x20submitted;\x20continue\x20querying\x20its\x20status.','localKey','Server\x20operation\x20ID','68000xQcPZN','GET','unknown_reconcile_failed','PENDING','deleted','submitting','operationId','sync-status','sync-retry','design-status','find','context','unknown','compress','password','toDatasetKey','map','fields','--format','name','write','client','createdDatasets','Checkpoint\x20belongs\x20to\x20another\x20authenticated\x20principal.','dataset-design-operation','unresolvedRelations','PROCESSING','size','metrics','node:fs/promises','read','values','sync','Provide\x20exactly\x20one\x20operation-id,\x20client-operation-id\x20or\x20checkpoint.','expectedHash','lookup','Deterministic\x20dataset\x20design\x20','str','3146345rQLOkK','file','appCode','status','identityKey','dataset','client-operation-id\x20differs\x20from\x20the\x20checkpoint\x20operation.','Agent-authored\x20JSON\x20dataset\x20manifest','string','normalizedHash','fieldCount','startsWith','24WLhyoy','inputHash','submission_unknown','failedStage','stringify','relationType','every','rabetbase','292ihlslq','Server\x20response\x20does\x20not\x20contain\x20a\x20valid\x20operation\x20state.','add','operation_failed','dataset_created','result','length','Save\x20the\x20server-normalized\x20design\x20JSON','valid','options','Server\x20context\x20lacks\x20an\x20authenticated\x20identity.','3431007OYFSCl','some','--appcode','4193ozBdww','dataset.','set','2056950LmUerR','validate','test','fromField','8Ejgqzy','taskId','client-operation-id','filter','search','checkpoint','fromDatasetKey','/smartapi/dataset/design/','flagMissing','Dataset\x20detail\x20does\x20not\x20contain\x20matching\x20DOV2\x20metadata.','datasets_created','push','errorMsg','POST','Checkpoint\x20target\x20or\x20design\x20changed.\x20Reconcile\x20the\x20original\x20operation;\x20use\x20a\x20new\x20design\x20file\x20for\x20an\x20intentional\x20new\x20operation.','code'];a341_0x8892=function(){return _0x3aa230;};return a341_0x8892();}async function start(_0x138122){const _0x46771b=a341_0x3f72de,_0x9501d0=resolve(required(_0x138122,_0x46771b(0x1b0))),_0x547c68=await readManifest(_0x9501d0),_0x215846=inputHash(_0x547c68),_0x57174c=resolve(_0x138122[_0x46771b(0x1ae)]('checkpoint')||_0x9501d0+'.checkpoint.json'),_0x1c7c40=await readCheckpoint(_0x57174c);if(_0x1c7c40)return bind(_0x1c7c40,_0x138122,_0x215846),requireValue(!_0x138122[_0x46771b(0x1ae)]('client-operation-id')||_0x138122['str'](_0x46771b(0x15b))===_0x1c7c40[_0x46771b(0x17e)],_0x46771b(0x1b5)),recover(_0x1c7c40,_0x57174c,_0x138122);const _0x377a04=await getDatasetDesignContext(_0x138122[_0x46771b(0x1b1)]);requireValue(typeof _0x377a04?.[_0x46771b(0x1b3)]===_0x46771b(0x1b7)&&_0x377a04[_0x46771b(0x1b3)],_0x46771b(0x1cd));const _0x42f76a=await validateDatasetDesign(_0x138122['appCode'],_0x547c68);requireValue(_0x42f76a?.['valid']===!![],_0x46771b(0x185));const _0x2a5fc2=validateManifest(_0x42f76a['normalizedManifest']);requireValue(typeof _0x42f76a['normalizedHash']==='string'&&/^[a-f0-9]{64}$/[_0x46771b(0x157)](_0x42f76a[_0x46771b(0x1b8)]),'Server\x20returned\x20an\x20invalid\x20design\x20hash.');const _0x1d1323=_0x138122[_0x46771b(0x1ae)](_0x46771b(0x15b))||'dataset-design-'+randomUUID();requireValue(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/[_0x46771b(0x157)](_0x1d1323),_0x46771b(0x169));const _0x400319={'kind':_0x46771b(0x1a1),'schemaVersion':0x1,'appCode':_0x138122[_0x46771b(0x1b1)],'apiDomain':domain(_0x138122),'identityKey':_0x377a04[_0x46771b(0x1b3)],'inputHash':_0x215846,'clientOperationId':_0x1d1323,'manifest':_0x2a5fc2,'expectedHash':_0x42f76a[_0x46771b(0x1b8)],'state':_0x46771b(0x172)};if(!await saveCheckpoint(_0x57174c,_0x400319,!![])){const _0x2510a1=await readCheckpoint(_0x57174c);return requireValue(_0x2510a1,'Checkpoint\x20creation\x20could\x20not\x20be\x20reconciled.'),bind(_0x2510a1,_0x138122,_0x215846),recover(_0x2510a1,_0x57174c,_0x138122);}_0x400319['state']=_0x46771b(0x18e),await saveCheckpoint(_0x57174c,_0x400319);let _0x593b06;try{_0x593b06=await startDatasetDesign(_0x138122[_0x46771b(0x1b1)],_0x2a5fc2,_0x400319[_0x46771b(0x1ab)],_0x1d1323);}catch(_0x232a02){const _0x22c4a3=isPlatformTransportFailure(_0x232a02);_0x400319['state']=_0x22c4a3?_0x46771b(0x195):_0x46771b(0x183),await saveCheckpoint(_0x57174c,_0x400319);if(!_0x22c4a3)throw _0x232a02;return unknown(_0x400319,_0x57174c);}if(!isObject(_0x593b06)||!(_0x593b06[_0x46771b(0x18f)]||_0x593b06[_0x46771b(0x15a)])||typeof _0x593b06[_0x46771b(0x1b2)]!==_0x46771b(0x1b7))return _0x400319['state']=_0x46771b(0x195),await saveCheckpoint(_0x57174c,_0x400319),unknown(_0x400319,_0x57174c);_0x400319['operationId']=_0x593b06[_0x46771b(0x18f)]||_0x593b06[_0x46771b(0x15a)],_0x400319['state']=_0x593b06['status'],await saveCheckpoint(_0x57174c,_0x400319);if(_0x593b06['status']===_0x46771b(0x180))return{...await recover(_0x400319,_0x57174c,_0x138122),'clientOperationId':_0x1d1323,'reused':_0x593b06[_0x46771b(0x16d)]??![]};return{...await readStatus(_0x593b06,_0x2a5fc2),'clientOperationId':_0x1d1323,'checkpoint':_0x57174c,'reused':_0x593b06['reused']??![],'query':query(_0x400319,_0x57174c)};}export function designCommand(_0x48785b){const _0x23396b=a341_0x3f72de,_0x1c6e92=_0x23396b(0x16f)+_0x48785b,_0x5cbbbe=_0x48785b===_0x23396b(0x156)?[flags[_0x23396b(0x1b0)],flags[_0x23396b(0x17a)]]:_0x48785b===_0x23396b(0x174)?[flags[_0x23396b(0x1b0)],flags[_0x23396b(0x15e)],flags[_0x23396b(0x19e)]]:_0x48785b==='status'?[flags['operation'],flags[_0x23396b(0x19e)],flags[_0x23396b(0x15e)]]:_0x48785b[_0x23396b(0x1ba)]('sync')?[flags[_0x23396b(0x168)]]:[];return{'service':_0x23396b(0x1b4),'command':_0x1c6e92,'description':_0x23396b(0x1ad)+_0x48785b,'risk':_0x48785b==='start'||_0x48785b===_0x23396b(0x191)?_0x23396b(0x19d):_0x23396b(0x1a7),'defaultOutputFormat':_0x23396b(0x196),'strictFlags':!![],'structuredErrors':!![],'flags':[..._0x5cbbbe,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4bec32){const _0x2cdbbb=_0x23396b;if(['validate',_0x2cdbbb(0x174)][_0x2cdbbb(0x16c)](_0x48785b))required(_0x4bec32,_0x2cdbbb(0x1b0));if(_0x48785b['startsWith'](_0x2cdbbb(0x1a9)))required(_0x4bec32,_0x2cdbbb(0x168));if(_0x48785b===_0x2cdbbb(0x1b2))requireValue([_0x4bec32['str'](_0x2cdbbb(0x17c)),_0x4bec32['str']('client-operation-id'),_0x4bec32[_0x2cdbbb(0x1ae)](_0x2cdbbb(0x15e))]['filter'](Boolean)['length']===0x1,_0x2cdbbb(0x1aa));},async 'dryRun'(_0x364a70){const _0x546239=_0x23396b,_0x1a7dfe=[_0x546239(0x156),_0x546239(0x174)]['includes'](_0x48785b)?await readManifest(resolve(required(_0x364a70,_0x546239(0x1b0)))):undefined;return{'method':[_0x546239(0x156),_0x546239(0x174),_0x546239(0x191)]['includes'](_0x48785b)?_0x546239(0x166):_0x546239(0x18a),'url':_0x546239(0x160)+_0x48785b,'body':_0x1a7dfe?{'appCode':_0x364a70['appCode'],'manifest':_0x1a7dfe}:undefined,'description':'Inspect\x20the\x20deterministic\x20request\x20without\x20submission\x20or\x20checkpoint\x20writes.'};},async 'execute'(_0x5f0d91){const _0x3bc230=_0x23396b;let _0x4b73cc;if(_0x48785b===_0x3bc230(0x194))_0x4b73cc=await getDatasetDesignContext(_0x5f0d91['appCode']);else{if(_0x48785b===_0x3bc230(0x156)){_0x4b73cc=await validateDatasetDesign(_0x5f0d91[_0x3bc230(0x1b1)],await readManifest(resolve(required(_0x5f0d91,'file'))));if(_0x5f0d91[_0x3bc230(0x1ae)](_0x3bc230(0x17a))&&_0x4b73cc?.[_0x3bc230(0x1cb)]===!![]){const {writeFile:_0x29a6cb,mkdir:_0x3afaa6}=await import(_0x3bc230(0x1a6)),{dirname:_0xc2acef}=await import(_0x3bc230(0x17d)),_0x3f6cad=resolve(_0x5f0d91['str'](_0x3bc230(0x17a)));await _0x3afaa6(_0xc2acef(_0x3f6cad),{'recursive':!![]}),await _0x29a6cb(_0x3f6cad,JSON[_0x3bc230(0x1bf)](_0x4b73cc,null,0x2)+'\x0a',{'mode':0x180});}}else{if(_0x48785b==='start')_0x4b73cc=await start(_0x5f0d91);else{if(_0x48785b===_0x3bc230(0x1b2)){const _0x5f40bf=_0x5f0d91[_0x3bc230(0x1ae)]('checkpoint');if(_0x5f40bf){const _0x11fcb8=await readCheckpoint(resolve(_0x5f40bf));requireValue(_0x11fcb8,'Checkpoint\x20not\x20found.'),_0x4b73cc=await recover(_0x11fcb8,resolve(_0x5f40bf),_0x5f0d91);}else _0x4b73cc=statusData(await getDatasetDesignStatus(_0x5f0d91['appCode'],{'operationId':_0x5f0d91[_0x3bc230(0x1ae)](_0x3bc230(0x17c))||undefined,'clientOperationId':_0x5f0d91[_0x3bc230(0x1ae)](_0x3bc230(0x15b))||undefined}));}else{if(_0x48785b===_0x3bc230(0x190))_0x4b73cc=await getDatasetDesignSyncStatus(_0x5f0d91[_0x3bc230(0x1b1)],required(_0x5f0d91,_0x3bc230(0x168)));else _0x4b73cc=await retryDatasetDesignSync(_0x5f0d91[_0x3bc230(0x1b1)],required(_0x5f0d91,_0x3bc230(0x168)));}}}}return{'ok':!![],'message':_0x4b73cc[_0x3bc230(0x1b2)]===_0x3bc230(0x1bd)?'Submission\x20outcome\x20is\x20unknown;\x20query\x20the\x20original\x20operation.':_0x4b73cc['status']==='operation_pending'?_0x3bc230(0x186):'Dataset\x20design\x20'+_0x48785b+_0x3bc230(0x16a),'data':{'operation':_0x3bc230(0x153)+_0x1c6e92,'appCode':_0x5f0d91['appCode'],..._0x4b73cc}};}};}
1
+ function a342_0x1171(_0x3f6ba2,_0x209939){_0x3f6ba2=_0x3f6ba2-0x198;const _0xd55219=a342_0xd552();let _0x1171c1=_0xd55219[_0x3f6ba2];return _0x1171c1;}const a342_0x4088cf=a342_0x1171;(function(_0xb77cd0,_0x1b0044){const _0x149f74=a342_0x1171,_0x3914c7=_0xb77cd0();while(!![]){try{const _0x3cb685=-parseInt(_0x149f74(0x205))/0x1+parseInt(_0x149f74(0x1a6))/0x2+-parseInt(_0x149f74(0x207))/0x3+parseInt(_0x149f74(0x210))/0x4*(parseInt(_0x149f74(0x20c))/0x5)+parseInt(_0x149f74(0x1f1))/0x6*(-parseInt(_0x149f74(0x1c8))/0x7)+parseInt(_0x149f74(0x1d5))/0x8*(parseInt(_0x149f74(0x1ff))/0x9)+parseInt(_0x149f74(0x1d6))/0xa;if(_0x3cb685===_0x1b0044)break;else _0x3914c7['push'](_0x3914c7['shift']());}catch(_0x3ee88e){_0x3914c7['push'](_0x3914c7['shift']());}}}(a342_0xd552,0xe2f2b));import{randomUUID}from'node:crypto';import{resolve}from'node:path';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{getApiDomain}from'../../constant/domain.js';import{getDatasetDesignContext,validateDatasetDesign,startDatasetDesign,getDatasetDesignStatus,getDatasetDesignSyncStatus,retryDatasetDesignSync,getDatasetDetail,getPlatformHttpStatus,isPlatformTransportFailure}from'../../core/api-client.js';import{inputHash,isObject,readManifest,requireValue,validateManifest}from'./contract.js';import{readCheckpoint,saveCheckpoint}from'./checkpoint.js';const flag=(_0x231b1c,_0x75f854)=>({'name':_0x231b1c,'type':a342_0x4088cf(0x1fe),'description':_0x75f854}),flags={'file':flag(a342_0x4088cf(0x1aa),a342_0x4088cf(0x208)),'output':flag('output','Save\x20the\x20server-normalized\x20design\x20JSON'),'checkpoint':flag(a342_0x4088cf(0x206),a342_0x4088cf(0x1df)),'client':flag('client-operation-id','Stable\x20recovery\x20ID\x20for\x20one\x20design\x20operation'),'operation':flag(a342_0x4088cf(0x1db),a342_0x4088cf(0x1af)),'code':flag(a342_0x4088cf(0x1f3),a342_0x4088cf(0x1e8))};function domain(_0x6f47b0){const _0x10ebd8=a342_0x4088cf,_0x578ba3=new URL(_0x6f47b0[_0x10ebd8(0x1f4)]||getApiDomain());return requireValue(!_0x578ba3[_0x10ebd8(0x1a7)]&&!_0x578ba3['password']&&!_0x578ba3['search']&&!_0x578ba3[_0x10ebd8(0x199)],_0x10ebd8(0x20d)),_0x578ba3['toString']()['replace'](/\/+$/,'');}function required(_0x37f425,_0x199dee){const _0x287af0=a342_0x4088cf,_0x35307c=_0x37f425['str'](_0x199dee);if(!_0x35307c)throw CliErrors[_0x287af0(0x1e0)](_0x199dee);return _0x35307c;}function bind(_0xf26445,_0x32f778,_0x143fe3){const _0x4a0a1f=a342_0x4088cf;requireValue(_0xf26445[_0x4a0a1f(0x1a5)]===_0x32f778[_0x4a0a1f(0x1a5)]&&_0xf26445[_0x4a0a1f(0x1f4)]===domain(_0x32f778)&&(_0x143fe3===undefined||_0xf26445['inputHash']===_0x143fe3),_0x4a0a1f(0x1f2));}function query(_0x5d2245,_0xe810ff){const _0x16c8e9=a342_0x4088cf;return{'command':'design-status','argv':['rabetbase',_0x16c8e9(0x1fc),'design-status',_0x16c8e9(0x1e3),_0x5d2245['appCode'],_0x16c8e9(0x19f),_0xe810ff,'--format',_0x16c8e9(0x1ca)]};}function unknown(_0x3540e5,_0x212c44){const _0x3f9e61=a342_0x4088cf;return{'status':'submission_unknown','clientOperationId':_0x3540e5[_0x3f9e61(0x1dc)],'operationId':_0x3540e5[_0x3f9e61(0x201)]??null,'checkpoint':_0x212c44,'query':query(_0x3540e5,_0x212c44),'nextAction':_0x3f9e61(0x19e)};}function matchesField(_0xeb2036,_0x5c595c){const _0x2f6e5d=a342_0x4088cf;return Object[_0x2f6e5d(0x204)](_0x5c595c)['every'](([_0x438218,_0x42b1fb])=>{const _0xb7b342=_0x2f6e5d;if(_0x42b1fb==null)return!![];const _0x318276=_0xeb2036[_0x438218];if(_0x438218==='options'){if(!Array[_0xb7b342(0x202)](_0x318276)||!Array['isArray'](_0x42b1fb)||_0x318276[_0xb7b342(0x1b8)](_0x43f376=>!isObject(_0x43f376)))return![];const _0x2cc8d2=_0x5e6243=>_0x5e6243['map'](({label:_0x4ea8b9,value:_0x533494})=>({'label':_0x4ea8b9,'value':_0x533494}));return inputHash(_0x2cc8d2(_0x318276))===inputHash(_0x2cc8d2(_0x42b1fb));}return _0x318276!==undefined&&inputHash(_0x318276)===inputHash(_0x42b1fb);});}function a342_0xd552(){const _0x4147ea=['lookup','toDatasetKey','some','stringify','client-operation-id','toDatasetCode','expectedRelations','dataset.','Inspect\x20the\x20deterministic\x20request\x20without\x20submission\x20or\x20checkpoint\x20writes.','failedStage','find','add','design-','Server\x20rejected\x20the\x20design;\x20run\x20design-validate\x20and\x20repair\x20the\x20reported\x20fields.','reused','start','node:fs/promises','FAILED','4436222cLiMTD','taskId','compress','name','includes','Invalid\x20client-operation-id.','operation','currentStep','expectedLocalKeys','Operation\x20submitted;\x20continue\x20querying\x20its\x20status.','identityKey','size','status','584BReaQv','14466100eEhyJN','map','errorMsg','createdRelations','POST','operation-id','clientOperationId','unknown_reconcile_failed','rejected','Durable\x20operation\x20checkpoint\x20path','flagMissing','localKey','get','--appcode','Server\x20context\x20lacks\x20an\x20authenticated\x20identity.','length','node:path','test','Saved\x20dataset\x20code','/smartapi/dataset/design/','fromDatasetKey','values','PROCESSING','push','operation_failed','startsWith','metrics','6tlXNnT','Checkpoint\x20target\x20or\x20design\x20changed.\x20Reconcile\x20the\x20original\x20operation;\x20use\x20a\x20new\x20design\x20file\x20for\x20an\x20intentional\x20new\x20operation.','code','apiDomain','Provide\x20exactly\x20one\x20operation-id,\x20client-operation-id\x20or\x20checkpoint.','Dataset\x20detail\x20does\x20not\x20contain\x20matching\x20DOV2\x20metadata.','Server\x20returned\x20an\x20invalid\x20design\x20hash.','Checkpoint\x20belongs\x20to\x20another\x20authenticated\x20principal.','has','result','client','dataset','validate','string','77751dZbqfw','prepared','operationId','isArray','fromDatasetCode','entries','1614524ziSmtG','checkpoint','4555161hlWuUQ','Agent-authored\x20JSON\x20dataset\x20manifest','fields','Checkpoint\x20not\x20found.','.checkpoint.json','12495ytqfMv','API\x20domain\x20must\x20not\x20contain\x20credentials,\x20query\x20or\x20fragment.','output','MANY_TO_ONE','2636bzntwS','SUCCESS','str','relationType','hash','sync','dataset-design-operation','expectedHash','PENDING','query_original_operation','--checkpoint','read','operation_pending','sync-retry','progressRate','datasets_created','appCode','1944276MwOfwU','username','normalizedHash','Deterministic\x20dataset\x20design\x20','file','datasets','createdDatasets','dataset_created','deleted','Server\x20operation\x20ID','Server\x20response\x20does\x20not\x20contain\x20a\x20valid\x20operation\x20state.','submitting','submission_unknown','state','valid','relations'];a342_0xd552=function(){return _0x4147ea;};return a342_0xd552();}function reconcile(_0x4a731e,_0xb6a3f9){const _0x5a6ebc=a342_0x4088cf;if(!isObject(_0x4a731e)||!Array[_0x5a6ebc(0x202)](_0x4a731e['createdDatasets'])||!Array[_0x5a6ebc(0x202)](_0x4a731e[_0x5a6ebc(0x1d9)]))return;const _0x57bd3c=_0x4a731e[_0x5a6ebc(0x1ac)],_0x5f2731=_0xb6a3f9?.[_0x5a6ebc(0x1ab)]['map'](_0x9eab4d=>_0x9eab4d[_0x5a6ebc(0x1e1)])??_0x4a731e[_0x5a6ebc(0x1d0)];if(!Array[_0x5a6ebc(0x202)](_0x5f2731)||_0x5f2731[_0x5a6ebc(0x1e5)]!==_0x57bd3c['length']||new Set(_0x5f2731)[_0x5a6ebc(0x1d3)]!==_0x5f2731[_0x5a6ebc(0x1e5)])return;const _0x57c4bc=new Map();for(const _0x4bcf86 of _0x57bd3c){if(!isObject(_0x4bcf86)||typeof _0x4bcf86[_0x5a6ebc(0x1e1)]!==_0x5a6ebc(0x1fe)||typeof _0x4bcf86[_0x5a6ebc(0x1f3)]!==_0x5a6ebc(0x1fe)||!_0x4bcf86[_0x5a6ebc(0x1f3)]||_0x57c4bc['has'](_0x4bcf86['localKey']))return;_0x57c4bc['set'](_0x4bcf86[_0x5a6ebc(0x1e1)],_0x4bcf86[_0x5a6ebc(0x1f3)]);if(_0xb6a3f9){const _0x44b65d=_0xb6a3f9['datasets'][_0x5a6ebc(0x1c0)](_0x21a01e=>_0x21a01e[_0x5a6ebc(0x1e1)]===_0x4bcf86[_0x5a6ebc(0x1e1)]);if(!_0x44b65d||!Array[_0x5a6ebc(0x202)](_0x4bcf86['fields']))return;if(_0x4bcf86[_0x5a6ebc(0x209)]['some'](_0x2e8cf3=>!isObject(_0x2e8cf3)))return;const _0x41ad5c=new Map(_0x4bcf86['fields'][_0x5a6ebc(0x1d7)](_0x1718ef=>[_0x1718ef[_0x5a6ebc(0x1cb)],_0x1718ef]));if(_0x41ad5c[_0x5a6ebc(0x1d3)]!==_0x4bcf86['fields'][_0x5a6ebc(0x1e5)]||_0x4bcf86['fieldCount']!==_0x4bcf86[_0x5a6ebc(0x209)][_0x5a6ebc(0x1e5)])return;if(_0x44b65d[_0x5a6ebc(0x209)][_0x5a6ebc(0x1b8)](_0x60523d=>!_0x41ad5c[_0x5a6ebc(0x1f9)](_0x60523d['name'])||!matchesField(_0x41ad5c['get'](_0x60523d[_0x5a6ebc(0x1cb)]),_0x60523d)))return;const _0x4a2c9b=new Set(_0x44b65d[_0x5a6ebc(0x209)]['map'](_0x582b9f=>_0x582b9f[_0x5a6ebc(0x1cb)]));_0x4a2c9b[_0x5a6ebc(0x1c1)]('id');if(_0x4bcf86['fields']['some'](_0x2ebd94=>!_0x4a2c9b[_0x5a6ebc(0x1f9)](_0x2ebd94[_0x5a6ebc(0x1cb)])))return;}}if(new Set(_0x57c4bc[_0x5a6ebc(0x1eb)]())['size']!==_0x57c4bc[_0x5a6ebc(0x1d3)]||_0x5f2731['some'](_0x311602=>!_0x57c4bc[_0x5a6ebc(0x1f9)](_0x311602)))return;const _0x40ac30=_0xb6a3f9?.[_0x5a6ebc(0x1b5)]??_0x4a731e[_0x5a6ebc(0x1bc)];if(!Array[_0x5a6ebc(0x202)](_0x40ac30)||_0x40ac30[_0x5a6ebc(0x1e5)]!==_0x4a731e['createdRelations'][_0x5a6ebc(0x1e5)])return;const _0x345232=_0x18aec3=>JSON[_0x5a6ebc(0x1b9)]([_0x18aec3['fromDatasetKey'],_0x18aec3['fromField'],_0x18aec3[_0x5a6ebc(0x1bb)]||_0x57c4bc[_0x5a6ebc(0x1e2)](_0x18aec3[_0x5a6ebc(0x1b7)]),_0x18aec3['toField'],_0x18aec3[_0x5a6ebc(0x198)]||_0x5a6ebc(0x1b6),_0x18aec3['cardinality']||_0x5a6ebc(0x20f)]),_0x1fc296=new Set(_0x40ac30['map'](_0x345232)),_0x304b2f=new Set(_0x4a731e['createdRelations'][_0x5a6ebc(0x1d7)](_0x345232));if(_0x304b2f[_0x5a6ebc(0x1d3)]!==_0x40ac30[_0x5a6ebc(0x1e5)]||_0x1fc296[_0x5a6ebc(0x1d3)]!==_0x40ac30[_0x5a6ebc(0x1e5)]||[..._0x1fc296][_0x5a6ebc(0x1b8)](_0x2e081d=>!_0x304b2f[_0x5a6ebc(0x1f9)](_0x2e081d)))return;for(const _0x4ede37 of _0x4a731e[_0x5a6ebc(0x1d9)]){if(_0x4ede37[_0x5a6ebc(0x203)]!==_0x57c4bc[_0x5a6ebc(0x1e2)](_0x4ede37[_0x5a6ebc(0x1ea)])||_0x4ede37['toDatasetKey']&&_0x4ede37[_0x5a6ebc(0x1bb)]!==_0x57c4bc['get'](_0x4ede37[_0x5a6ebc(0x1b7)]))return;}return{'createdDatasets':_0x57bd3c,'createdRelations':_0x4a731e['createdRelations'],'unresolvedRelations':_0x4a731e['unresolvedRelations']??[]};}export function statusData(_0x4aca67,_0x277203){const _0x5a7b82=a342_0x4088cf;requireValue(isObject(_0x4aca67)&&typeof _0x4aca67['status']===_0x5a7b82(0x1fe),_0x5a7b82(0x1b0));const _0xc0d998={'jobStatus':_0x4aca67['status'],'operationId':_0x4aca67['operationId']??_0x4aca67[_0x5a7b82(0x1c9)]??null,'taskId':_0x4aca67['taskId']??_0x4aca67[_0x5a7b82(0x201)]??null,'clientOperationId':_0x4aca67[_0x5a7b82(0x1dc)]??null,'progressRate':_0x4aca67[_0x5a7b82(0x1a3)]??null,'currentStep':_0x4aca67[_0x5a7b82(0x1cf)]??null,'failedStage':_0x4aca67[_0x5a7b82(0x1bf)]??null,'sync':_0x4aca67[_0x5a7b82(0x19a)]??null,'errorMsg':_0x4aca67[_0x5a7b82(0x1d8)]??null,'metrics':_0x4aca67[_0x5a7b82(0x1f0)]??null},_0x384674=!_0x277203&&_0x4aca67[_0x5a7b82(0x1d4)]===_0x5a7b82(0x211)&&isObject(_0x4aca67[_0x5a7b82(0x1fa)]?.[_0x5a7b82(0x1fc)])?_0x4aca67[_0x5a7b82(0x1fa)]['dataset']:undefined;if(_0x384674&&typeof _0x384674[_0x5a7b82(0x1f3)]===_0x5a7b82(0x1fe)&&_0x384674[_0x5a7b82(0x1f3)]&&_0x384674['id']!=null)return{..._0xc0d998,'status':_0x5a7b82(0x1ad),'createdDataset':_0x384674};const _0x3ec572=_0x4aca67['status']===_0x5a7b82(0x211)?reconcile(_0x4aca67[_0x5a7b82(0x1fa)],_0x277203):undefined;return{..._0xc0d998,'status':_0x4aca67[_0x5a7b82(0x1d4)]==='SUCCESS'?_0x3ec572?_0x5a7b82(0x1a4):_0x5a7b82(0x1dd):_0x4aca67[_0x5a7b82(0x1d4)]===_0x5a7b82(0x1c7)?_0x5a7b82(0x1ee):[_0x5a7b82(0x19d),_0x5a7b82(0x1ec)]['includes'](_0x4aca67['status'])?_0x5a7b82(0x1a1):'unknown_reconcile_failed',..._0x3ec572};}async function readStatus(_0x4dde4c,_0x3add25){const _0x2283ee=a342_0x4088cf,_0x4ce5da=statusData(_0x4dde4c,_0x3add25);if(_0x4dde4c[_0x2283ee(0x1d4)]!=='SUCCESS'||!reconcile(_0x4dde4c[_0x2283ee(0x1fa)]))return _0x4ce5da;const _0x375248=[];for(const _0x302064 of _0x4dde4c[_0x2283ee(0x1fa)][_0x2283ee(0x1ac)]){const _0x3f4ff7=await getDatasetDetail(_0x302064[_0x2283ee(0x1f3)]);requireValue(isObject(_0x3f4ff7)&&(_0x3f4ff7['modelCode']||_0x3f4ff7['code'])===_0x302064[_0x2283ee(0x1f3)]&&Array[_0x2283ee(0x202)](_0x3f4ff7[_0x2283ee(0x209)]),_0x2283ee(0x1f6));const _0x4c0049=_0x3f4ff7[_0x2283ee(0x209)]['filter'](_0x3f94c8=>_0x3f94c8[_0x2283ee(0x1ae)]!==!![]);_0x375248[_0x2283ee(0x1ed)]({..._0x302064,'fields':_0x4c0049,'fieldCount':_0x4c0049['length']});}return statusData({..._0x4dde4c,'result':{..._0x4dde4c[_0x2283ee(0x1fa)],'createdDatasets':_0x375248}},_0x3add25);}async function recover(_0x2dda5c,_0x3cb6fc,_0x56296d){const _0xd20107=a342_0x4088cf;bind(_0x2dda5c,_0x56296d);const _0x21abe5=await getDatasetDesignContext(_0x56296d[_0xd20107(0x1a5)]);requireValue(_0x21abe5?.[_0xd20107(0x1d2)]===_0x2dda5c['identityKey'],_0xd20107(0x1f8));let _0x3a70d4;try{_0x3a70d4=await getDatasetDesignStatus(_0x56296d[_0xd20107(0x1a5)],{'clientOperationId':_0x2dda5c[_0xd20107(0x1dc)]});}catch(_0x171310){const _0x150014=getPlatformHttpStatus(_0x171310);if(isPlatformTransportFailure(_0x171310)||_0x150014===0x194)return unknown(_0x2dda5c,_0x3cb6fc);throw _0x171310;}const _0x25d2d5=await readStatus(_0x3a70d4,_0x2dda5c['manifest']);return _0x2dda5c[_0xd20107(0x1b3)]=_0x25d2d5[_0xd20107(0x1d4)],_0x2dda5c[_0xd20107(0x201)]=_0x3a70d4['operationId']||_0x2dda5c[_0xd20107(0x201)],await saveCheckpoint(_0x3cb6fc,_0x2dda5c),{..._0x25d2d5,'checkpoint':_0x3cb6fc,'query':query(_0x2dda5c,_0x3cb6fc)};}async function start(_0x2aee7a){const _0x3c502b=a342_0x4088cf,_0x44cf5b=resolve(required(_0x2aee7a,_0x3c502b(0x1aa))),_0x27f609=await readManifest(_0x44cf5b),_0x4399fe=inputHash(_0x27f609),_0x284faa=resolve(_0x2aee7a[_0x3c502b(0x212)]('checkpoint')||_0x44cf5b+_0x3c502b(0x20b)),_0x5e6768=await readCheckpoint(_0x284faa);if(_0x5e6768)return bind(_0x5e6768,_0x2aee7a,_0x4399fe),requireValue(!_0x2aee7a[_0x3c502b(0x212)](_0x3c502b(0x1ba))||_0x2aee7a[_0x3c502b(0x212)]('client-operation-id')===_0x5e6768[_0x3c502b(0x1dc)],'client-operation-id\x20differs\x20from\x20the\x20checkpoint\x20operation.'),recover(_0x5e6768,_0x284faa,_0x2aee7a);const _0x3299dd=await getDatasetDesignContext(_0x2aee7a['appCode']);requireValue(typeof _0x3299dd?.['identityKey']===_0x3c502b(0x1fe)&&_0x3299dd[_0x3c502b(0x1d2)],_0x3c502b(0x1e4));const _0x5e1f37=await validateDatasetDesign(_0x2aee7a[_0x3c502b(0x1a5)],_0x27f609);requireValue(_0x5e1f37?.[_0x3c502b(0x1b4)]===!![],_0x3c502b(0x1c3));const _0x299a43=validateManifest(_0x5e1f37['normalizedManifest']);requireValue(typeof _0x5e1f37[_0x3c502b(0x1a8)]===_0x3c502b(0x1fe)&&/^[a-f0-9]{64}$/['test'](_0x5e1f37[_0x3c502b(0x1a8)]),_0x3c502b(0x1f7));const _0x55742f=_0x2aee7a[_0x3c502b(0x212)](_0x3c502b(0x1ba))||'dataset-design-'+randomUUID();requireValue(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/[_0x3c502b(0x1e7)](_0x55742f),_0x3c502b(0x1cd));const _0x366bc9={'kind':_0x3c502b(0x19b),'schemaVersion':0x1,'appCode':_0x2aee7a['appCode'],'apiDomain':domain(_0x2aee7a),'identityKey':_0x3299dd[_0x3c502b(0x1d2)],'inputHash':_0x4399fe,'clientOperationId':_0x55742f,'manifest':_0x299a43,'expectedHash':_0x5e1f37[_0x3c502b(0x1a8)],'state':_0x3c502b(0x200)};if(!await saveCheckpoint(_0x284faa,_0x366bc9,!![])){const _0x14f153=await readCheckpoint(_0x284faa);return requireValue(_0x14f153,'Checkpoint\x20creation\x20could\x20not\x20be\x20reconciled.'),bind(_0x14f153,_0x2aee7a,_0x4399fe),recover(_0x14f153,_0x284faa,_0x2aee7a);}_0x366bc9[_0x3c502b(0x1b3)]=_0x3c502b(0x1b1),await saveCheckpoint(_0x284faa,_0x366bc9);let _0x43b2ea;try{_0x43b2ea=await startDatasetDesign(_0x2aee7a[_0x3c502b(0x1a5)],_0x299a43,_0x366bc9[_0x3c502b(0x19c)],_0x55742f);}catch(_0x107daf){const _0x46b8ef=isPlatformTransportFailure(_0x107daf);_0x366bc9[_0x3c502b(0x1b3)]=_0x46b8ef?'unknown':_0x3c502b(0x1de),await saveCheckpoint(_0x284faa,_0x366bc9);if(!_0x46b8ef)throw _0x107daf;return unknown(_0x366bc9,_0x284faa);}if(!isObject(_0x43b2ea)||!(_0x43b2ea[_0x3c502b(0x201)]||_0x43b2ea[_0x3c502b(0x1c9)])||typeof _0x43b2ea[_0x3c502b(0x1d4)]!=='string')return _0x366bc9[_0x3c502b(0x1b3)]='unknown',await saveCheckpoint(_0x284faa,_0x366bc9),unknown(_0x366bc9,_0x284faa);_0x366bc9[_0x3c502b(0x201)]=_0x43b2ea[_0x3c502b(0x201)]||_0x43b2ea[_0x3c502b(0x1c9)],_0x366bc9[_0x3c502b(0x1b3)]=_0x43b2ea[_0x3c502b(0x1d4)],await saveCheckpoint(_0x284faa,_0x366bc9);if(_0x43b2ea[_0x3c502b(0x1d4)]==='SUCCESS')return{...await recover(_0x366bc9,_0x284faa,_0x2aee7a),'clientOperationId':_0x55742f,'reused':_0x43b2ea['reused']??![]};return{...await readStatus(_0x43b2ea,_0x299a43),'clientOperationId':_0x55742f,'checkpoint':_0x284faa,'reused':_0x43b2ea[_0x3c502b(0x1c4)]??![],'query':query(_0x366bc9,_0x284faa)};}export function designCommand(_0x4a0ae3){const _0x3ec148=a342_0x4088cf,_0x28247f=_0x3ec148(0x1c2)+_0x4a0ae3,_0xdfd377=_0x4a0ae3===_0x3ec148(0x1fd)?[flags[_0x3ec148(0x1aa)],flags[_0x3ec148(0x20e)]]:_0x4a0ae3===_0x3ec148(0x1c5)?[flags[_0x3ec148(0x1aa)],flags['checkpoint'],flags['client']]:_0x4a0ae3===_0x3ec148(0x1d4)?[flags[_0x3ec148(0x1ce)],flags[_0x3ec148(0x1fb)],flags['checkpoint']]:_0x4a0ae3[_0x3ec148(0x1ef)](_0x3ec148(0x19a))?[flags[_0x3ec148(0x1f3)]]:[];return{'service':_0x3ec148(0x1fc),'command':_0x28247f,'description':_0x3ec148(0x1a9)+_0x4a0ae3,'risk':_0x4a0ae3===_0x3ec148(0x1c5)||_0x4a0ae3==='sync-retry'?'write':_0x3ec148(0x1a0),'defaultOutputFormat':_0x3ec148(0x1ca),'strictFlags':!![],'structuredErrors':!![],'flags':[..._0xdfd377,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x587adc){const _0x2c0ce7=_0x3ec148;if([_0x2c0ce7(0x1fd),'start'][_0x2c0ce7(0x1cc)](_0x4a0ae3))required(_0x587adc,_0x2c0ce7(0x1aa));if(_0x4a0ae3[_0x2c0ce7(0x1ef)](_0x2c0ce7(0x19a)))required(_0x587adc,_0x2c0ce7(0x1f3));if(_0x4a0ae3===_0x2c0ce7(0x1d4))requireValue([_0x587adc['str']('operation-id'),_0x587adc[_0x2c0ce7(0x212)](_0x2c0ce7(0x1ba)),_0x587adc['str'](_0x2c0ce7(0x206))]['filter'](Boolean)['length']===0x1,_0x2c0ce7(0x1f5));},async 'dryRun'(_0x1f6243){const _0x344c2e=_0x3ec148,_0x9376ae=[_0x344c2e(0x1fd),_0x344c2e(0x1c5)][_0x344c2e(0x1cc)](_0x4a0ae3)?await readManifest(resolve(required(_0x1f6243,_0x344c2e(0x1aa)))):undefined;return{'method':[_0x344c2e(0x1fd),'start',_0x344c2e(0x1a2)][_0x344c2e(0x1cc)](_0x4a0ae3)?_0x344c2e(0x1da):'GET','url':_0x344c2e(0x1e9)+_0x4a0ae3,'body':_0x9376ae?{'appCode':_0x1f6243['appCode'],'manifest':_0x9376ae}:undefined,'description':_0x344c2e(0x1be)};},async 'execute'(_0x5b7ea0){const _0x3e0341=_0x3ec148;let _0x3ebfa5;if(_0x4a0ae3==='context')_0x3ebfa5=await getDatasetDesignContext(_0x5b7ea0[_0x3e0341(0x1a5)]);else{if(_0x4a0ae3===_0x3e0341(0x1fd)){_0x3ebfa5=await validateDatasetDesign(_0x5b7ea0[_0x3e0341(0x1a5)],await readManifest(resolve(required(_0x5b7ea0,_0x3e0341(0x1aa)))));if(_0x5b7ea0[_0x3e0341(0x212)]('output')&&_0x3ebfa5?.['valid']===!![]){const {writeFile:_0x2f934b,mkdir:_0x5623dc}=await import(_0x3e0341(0x1c6)),{dirname:_0x48d3cc}=await import(_0x3e0341(0x1e6)),_0x2a52d1=resolve(_0x5b7ea0[_0x3e0341(0x212)](_0x3e0341(0x20e)));await _0x5623dc(_0x48d3cc(_0x2a52d1),{'recursive':!![]}),await _0x2f934b(_0x2a52d1,JSON[_0x3e0341(0x1b9)](_0x3ebfa5,null,0x2)+'\x0a',{'mode':0x180});}}else{if(_0x4a0ae3==='start')_0x3ebfa5=await start(_0x5b7ea0);else{if(_0x4a0ae3==='status'){const _0x4d9907=_0x5b7ea0[_0x3e0341(0x212)](_0x3e0341(0x206));if(_0x4d9907){const _0x3efce2=await readCheckpoint(resolve(_0x4d9907));requireValue(_0x3efce2,_0x3e0341(0x20a)),_0x3ebfa5=await recover(_0x3efce2,resolve(_0x4d9907),_0x5b7ea0);}else _0x3ebfa5=statusData(await getDatasetDesignStatus(_0x5b7ea0['appCode'],{'operationId':_0x5b7ea0[_0x3e0341(0x212)]('operation-id')||undefined,'clientOperationId':_0x5b7ea0[_0x3e0341(0x212)](_0x3e0341(0x1ba))||undefined}));}else{if(_0x4a0ae3==='sync-status')_0x3ebfa5=await getDatasetDesignSyncStatus(_0x5b7ea0[_0x3e0341(0x1a5)],required(_0x5b7ea0,_0x3e0341(0x1f3)));else _0x3ebfa5=await retryDatasetDesignSync(_0x5b7ea0[_0x3e0341(0x1a5)],required(_0x5b7ea0,_0x3e0341(0x1f3)));}}}}return{'ok':!![],'message':_0x3ebfa5[_0x3e0341(0x1d4)]===_0x3e0341(0x1b2)?'Submission\x20outcome\x20is\x20unknown;\x20query\x20the\x20original\x20operation.':_0x3ebfa5[_0x3e0341(0x1d4)]==='operation_pending'?_0x3e0341(0x1d1):'Dataset\x20design\x20'+_0x4a0ae3+'\x20response\x20received','data':{'operation':_0x3e0341(0x1bd)+_0x28247f,'appCode':_0x5b7ea0[_0x3e0341(0x1a5)],..._0x3ebfa5}};}};}
@@ -1 +1 @@
1
- const a342_0x46c69d=a342_0xbce9;(function(_0x3563a8,_0xf2ac1a){const _0x26be57=a342_0xbce9,_0x2b697a=_0x3563a8();while(!![]){try{const _0x23e354=-parseInt(_0x26be57(0x161))/0x1*(parseInt(_0x26be57(0x1bf))/0x2)+parseInt(_0x26be57(0x151))/0x3+parseInt(_0x26be57(0x18e))/0x4*(parseInt(_0x26be57(0x1c3))/0x5)+parseInt(_0x26be57(0x188))/0x6*(parseInt(_0x26be57(0x1b3))/0x7)+parseInt(_0x26be57(0x19f))/0x8*(parseInt(_0x26be57(0x160))/0x9)+parseInt(_0x26be57(0x163))/0xa+-parseInt(_0x26be57(0x1b8))/0xb*(parseInt(_0x26be57(0x177))/0xc);if(_0x23e354===_0xf2ac1a)break;else _0x2b697a['push'](_0x2b697a['shift']());}catch(_0x109d3d){_0x2b697a['push'](_0x2b697a['shift']());}}}(a342_0x50d4,0x19bf6));import{createHash}from'node:crypto';import{readFile,lstat}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const isObject=_0x1b2e74=>_0x1b2e74!==null&&typeof _0x1b2e74===a342_0x46c69d(0x1a8)&&!Array[a342_0x46c69d(0x19b)](_0x1b2e74);const types=new Set([a342_0x46c69d(0x150),a342_0x46c69d(0x146),a342_0x46c69d(0x194),a342_0x46c69d(0x1ac),a342_0x46c69d(0x18b),a342_0x46c69d(0x17b),'DATE_RANGE',a342_0x46c69d(0x17a),a342_0x46c69d(0x143),a342_0x46c69d(0x152)]),dbTypes=new Set([a342_0x46c69d(0x1b7),'CHAR',a342_0x46c69d(0x150),a342_0x46c69d(0x1a2),a342_0x46c69d(0x1a3),'SMALLINT',a342_0x46c69d(0x182),'INTEGER',a342_0x46c69d(0x178),a342_0x46c69d(0x16d),a342_0x46c69d(0x17c),'DECIMAL','NUMERIC',a342_0x46c69d(0x166),a342_0x46c69d(0x194),a342_0x46c69d(0x190),a342_0x46c69d(0x1ac),a342_0x46c69d(0x1c4)]),identifier=/^[a-z][a-z0-9_]*$/;export function requireValue(_0xda6ee2,_0x2fbf34){const _0x29b134=a342_0x46c69d;if(!_0xda6ee2)throw CliErrors[_0x29b134(0x1c8)](_0x2fbf34);}function keys(_0x2633f6,_0xc5210d,_0x4d5b7c){const _0x4ba20b=a342_0x46c69d;for(const _0x4a2814 of Object[_0x4ba20b(0x159)](_0x2633f6))requireValue(_0xc5210d[_0x4ba20b(0x183)](_0x4a2814),_0x4d5b7c+'.'+_0x4a2814+_0x4ba20b(0x186));}function text(_0x14af4b,_0x2b0c88){const _0x2b66f9=a342_0x46c69d;requireValue(typeof _0x14af4b===_0x2b66f9(0x197)&&_0x14af4b[_0x2b66f9(0x172)]()[_0x2b66f9(0x17e)]>0x0,_0x2b0c88+_0x2b66f9(0x148));}function a342_0xbce9(_0x41e286,_0x5564f5){_0x41e286=_0x41e286-0x140;const _0x50d471=a342_0x50d4();let _0xbce9c6=_0x50d471[_0x41e286];return _0xbce9c6;}export function validateManifest(_0x257e56){const _0x436b16=a342_0x46c69d;requireValue(isObject(_0x257e56),_0x436b16(0x191)),keys(_0x257e56,[_0x436b16(0x1af),_0x436b16(0x14d),_0x436b16(0x19c),_0x436b16(0x1b0),_0x436b16(0x16a),_0x436b16(0x198)],'manifest'),requireValue(_0x257e56[_0x436b16(0x1af)]==='dataset-design'&&_0x257e56[_0x436b16(0x14d)]===0x1&&_0x257e56[_0x436b16(0x19c)]==='v2',_0x436b16(0x176)),requireValue(Array[_0x436b16(0x19b)](_0x257e56[_0x436b16(0x1b0)])&&_0x257e56[_0x436b16(0x1b0)][_0x436b16(0x17e)]>=0x1&&_0x257e56[_0x436b16(0x1b0)][_0x436b16(0x17e)]<=0x14,'datasets\x20must\x20contain\x201..20\x20items.');const _0x3e616d=new Map();for(const [_0x96ee,_0x84af23]of _0x257e56['datasets'][_0x436b16(0x17d)]()){const _0x58969a=_0x436b16(0x18f)+_0x96ee+']';requireValue(isObject(_0x84af23),_0x58969a+_0x436b16(0x19a)),keys(_0x84af23,[_0x436b16(0x19d),_0x436b16(0x181),'fields'],_0x58969a),requireValue(typeof _0x84af23[_0x436b16(0x19d)]===_0x436b16(0x197)&&/^[a-z][a-z0-9_]{0,63}$/['test'](_0x84af23[_0x436b16(0x19d)])&&!_0x3e616d[_0x436b16(0x1b5)](_0x84af23[_0x436b16(0x19d)]),_0x58969a+'.localKey\x20is\x20invalid\x20or\x20duplicated.'),requireValue(isObject(_0x84af23[_0x436b16(0x181)]),_0x58969a+'.dataset\x20is\x20required.'),keys(_0x84af23[_0x436b16(0x181)],[_0x436b16(0x155),_0x436b16(0x193),_0x436b16(0x1c1),_0x436b16(0x1c5),_0x436b16(0x196)],_0x58969a+_0x436b16(0x165)),text(_0x84af23[_0x436b16(0x181)]['datasetName'],_0x58969a+'.dataset.datasetName');for(const [_0x1e823a,_0x4a533e]of Object[_0x436b16(0x17d)](_0x84af23[_0x436b16(0x181)]))requireValue(_0x4a533e==null||typeof _0x4a533e===_0x436b16(0x197),_0x58969a+_0x436b16(0x15b)+_0x1e823a+'\x20must\x20be\x20a\x20string.');requireValue(Array[_0x436b16(0x19b)](_0x84af23[_0x436b16(0x180)])&&_0x84af23[_0x436b16(0x180)][_0x436b16(0x17e)]>0x0&&(_0x257e56[_0x436b16(0x1b0)][_0x436b16(0x17e)]===0x1||_0x84af23[_0x436b16(0x180)][_0x436b16(0x17e)]<=0xc8),_0x58969a+_0x436b16(0x1a4));const _0x59850d=new Set();_0x3e616d['set'](_0x84af23[_0x436b16(0x19d)],_0x59850d);for(const [_0x40abff,_0x2f5dcc]of _0x84af23['fields'][_0x436b16(0x17d)]()){const _0x568653=_0x58969a+'.fields['+_0x40abff+']';requireValue(isObject(_0x2f5dcc),_0x568653+_0x436b16(0x19a)),keys(_0x2f5dcc,[_0x436b16(0x1ba),'displayName',_0x436b16(0x144),'dbType',_0x436b16(0x171),'description',_0x436b16(0x15c),'visible','disabled',_0x436b16(0x1a7),_0x436b16(0x140),_0x436b16(0x14b),_0x436b16(0x184),_0x436b16(0x15f),'chartRole',_0x436b16(0x15d),_0x436b16(0x149),_0x436b16(0x141),'displayFormat'],_0x568653),requireValue(typeof _0x2f5dcc[_0x436b16(0x1ba)]===_0x436b16(0x197)&&identifier[_0x436b16(0x1a6)](_0x2f5dcc[_0x436b16(0x1ba)])&&!_0x59850d[_0x436b16(0x1b5)](_0x2f5dcc['name']),_0x568653+_0x436b16(0x18c)),_0x59850d[_0x436b16(0x142)](_0x2f5dcc['name']),text(_0x2f5dcc[_0x436b16(0x168)],_0x568653+'.displayName'),requireValue(types['has'](_0x2f5dcc['doType']),_0x568653+_0x436b16(0x1c7)),requireValue(dbTypes[_0x436b16(0x1b5)](_0x2f5dcc[_0x436b16(0x18a)]),_0x568653+_0x436b16(0x1c2));for(const _0x13dc5a of[_0x436b16(0x18a),'description',_0x436b16(0x15f),_0x436b16(0x1a9),_0x436b16(0x15d),'displayFormat']){requireValue(_0x2f5dcc[_0x13dc5a]==null||typeof _0x2f5dcc[_0x13dc5a]==='string',_0x568653+'.'+_0x13dc5a+_0x436b16(0x175));}for(const _0x3d21a2 of['required',_0x436b16(0x158),_0x436b16(0x1b6),_0x436b16(0x1a7),_0x436b16(0x140),'autoIncrement',_0x436b16(0x141)]){requireValue(_0x2f5dcc[_0x3d21a2]==null||typeof _0x2f5dcc[_0x3d21a2]==='boolean',_0x568653+'.'+_0x3d21a2+'\x20must\x20be\x20a\x20boolean.');}requireValue(_0x2f5dcc[_0x436b16(0x171)]==null||Number[_0x436b16(0x16e)](_0x2f5dcc[_0x436b16(0x171)])&&_0x2f5dcc['dbTypeLen']>0x0&&_0x2f5dcc[_0x436b16(0x171)]<=0xffff,_0x568653+_0x436b16(0x16b)),requireValue(_0x2f5dcc[_0x436b16(0x149)]==null||Array[_0x436b16(0x19b)](_0x2f5dcc[_0x436b16(0x149)])&&_0x2f5dcc['supportedAggregation'][_0x436b16(0x15a)](_0x45cb07=>typeof _0x45cb07==='string'),_0x568653+'.supportedAggregation\x20must\x20contain\x20strings.');if(_0x2f5dcc[_0x436b16(0x184)]!=null){requireValue(Array['isArray'](_0x2f5dcc[_0x436b16(0x184)]),_0x568653+_0x436b16(0x1bc));const _0x2cabe5=new Set(),_0xd8196e=new Set();for(const _0x2f1cc4 of _0x2f5dcc[_0x436b16(0x184)]){requireValue(isObject(_0x2f1cc4),_0x568653+_0x436b16(0x192)),keys(_0x2f1cc4,['label',_0x436b16(0x156)],_0x568653+'.options'),text(_0x2f1cc4['label'],_0x568653+_0x436b16(0x195)),requireValue(typeof _0x2f1cc4[_0x436b16(0x156)]==='string'&&identifier[_0x436b16(0x1a6)](_0x2f1cc4[_0x436b16(0x156)])&&!_0xd8196e[_0x436b16(0x1b5)](_0x2f1cc4[_0x436b16(0x156)])&&!_0x2cabe5[_0x436b16(0x1b5)](_0x2f1cc4[_0x436b16(0x1ae)]),_0x568653+'.options\x20is\x20invalid\x20or\x20duplicated.'),_0x2cabe5[_0x436b16(0x142)](_0x2f1cc4[_0x436b16(0x1ae)]),_0xd8196e[_0x436b16(0x142)](_0x2f1cc4['value']);}}if(['SELECT',_0x436b16(0x17b)][_0x436b16(0x183)](_0x2f5dcc[_0x436b16(0x144)])){const _0x4a97c3=Array['isArray'](_0x257e56[_0x436b16(0x16a)])&&_0x257e56[_0x436b16(0x16a)][_0x436b16(0x1ad)](_0x46ed1f=>_0x46ed1f?.['fromDatasetKey']===_0x84af23[_0x436b16(0x19d)]&&_0x46ed1f?.[_0x436b16(0x153)]===_0x2f5dcc[_0x436b16(0x1ba)]);requireValue(_0x4a97c3||Array[_0x436b16(0x19b)](_0x2f5dcc[_0x436b16(0x184)])&&_0x2f5dcc[_0x436b16(0x184)][_0x436b16(0x17e)]>0x0,_0x568653+_0x436b16(0x1b4));}}_0x59850d[_0x436b16(0x142)]('id');}for(const _0x30d651 of[_0x436b16(0x16a),'unresolvedRelations'])requireValue(_0x257e56[_0x30d651]==null||Array[_0x436b16(0x19b)](_0x257e56[_0x30d651])&&_0x257e56[_0x30d651]['length']<=0xc8,_0x30d651+_0x436b16(0x1a1));const _0x317d9a=new Set();for(const [_0x37a192,_0x497f4c]of(_0x257e56['relations']??[])[_0x436b16(0x17d)]()){const _0x5fc04a='relations['+_0x37a192+']';requireValue(isObject(_0x497f4c),_0x5fc04a+_0x436b16(0x19a)),keys(_0x497f4c,[_0x436b16(0x14f),_0x436b16(0x153),_0x436b16(0x1bd),_0x436b16(0x147),_0x436b16(0x179),'toFieldLabel','relationType',_0x436b16(0x1aa),_0x436b16(0x15e),_0x436b16(0x19e)],_0x5fc04a),requireValue(_0x3e616d[_0x436b16(0x1a0)](_0x497f4c['fromDatasetKey'])?.[_0x436b16(0x1b5)](_0x497f4c['fromField']),_0x5fc04a+_0x436b16(0x1ab)),requireValue(Boolean(_0x497f4c[_0x436b16(0x1bd)])!==Boolean(_0x497f4c[_0x436b16(0x147)]),_0x5fc04a+_0x436b16(0x199));if(_0x497f4c[_0x436b16(0x1bd)])requireValue(_0x3e616d[_0x436b16(0x1a0)](_0x497f4c[_0x436b16(0x1bd)])?.[_0x436b16(0x1b5)](_0x497f4c['toField']),_0x5fc04a+_0x436b16(0x1b2));else text(_0x497f4c['toDatasetCode'],_0x5fc04a+'.toDatasetCode'),text(_0x497f4c[_0x436b16(0x179)],_0x5fc04a+_0x436b16(0x1a5));requireValue(_0x497f4c[_0x436b16(0x185)]==null||_0x497f4c[_0x436b16(0x185)]===_0x436b16(0x154),_0x5fc04a+_0x436b16(0x1c6)),requireValue(_0x497f4c['cardinality']==null||[_0x436b16(0x187),_0x436b16(0x173)][_0x436b16(0x183)](_0x497f4c[_0x436b16(0x1aa)]),_0x5fc04a+_0x436b16(0x14a)),text(_0x497f4c[_0x436b16(0x15e)],_0x5fc04a+_0x436b16(0x1c0)),requireValue(_0x497f4c[_0x436b16(0x19e)]==null||typeof _0x497f4c['confidence']===_0x436b16(0x164)&&Number[_0x436b16(0x189)](_0x497f4c[_0x436b16(0x19e)])&&_0x497f4c[_0x436b16(0x19e)]>=0x0&&_0x497f4c[_0x436b16(0x19e)]<=0x1,_0x5fc04a+_0x436b16(0x169));const _0xc08d48=_0x497f4c['fromDatasetKey']+':'+_0x497f4c[_0x436b16(0x153)];requireValue(!_0x317d9a['has'](_0xc08d48),_0x5fc04a+_0x436b16(0x14c)),_0x317d9a[_0x436b16(0x142)](_0xc08d48);}for(const _0x38f675 of _0x257e56[_0x436b16(0x198)]??[]){requireValue(isObject(_0x38f675),_0x436b16(0x18d)),text(_0x38f675[_0x436b16(0x15e)],'unresolvedRelations.reason');}return _0x257e56;}export async function readManifest(_0x4dce01){const _0x4f336f=a342_0x46c69d,_0x40d2fc=await lstat(_0x4dce01);requireValue(_0x40d2fc[_0x4f336f(0x17f)]()&&!_0x40d2fc['isSymbolicLink']()&&_0x40d2fc[_0x4f336f(0x1b1)]<=0x1e8480,_0x4f336f(0x1be));let _0x22aca1;try{_0x22aca1=JSON[_0x4f336f(0x16f)](await readFile(_0x4dce01,_0x4f336f(0x162)));}catch{throw CliErrors[_0x4f336f(0x1c8)](_0x4f336f(0x174));}return validateManifest(isObject(_0x22aca1)&&isObject(_0x22aca1[_0x4f336f(0x167)])?_0x22aca1['normalizedManifest']:_0x22aca1);}export function inputHash(_0x175fd6){const _0x17d0de=a342_0x46c69d,_0x4a449d=_0x3ba17d=>Array[_0x17d0de(0x19b)](_0x3ba17d)?_0x3ba17d['map'](_0x4a449d):isObject(_0x3ba17d)?Object[_0x17d0de(0x170)](Object[_0x17d0de(0x159)](_0x3ba17d)[_0x17d0de(0x145)]()[_0x17d0de(0x1bb)](_0x5ed817=>[_0x5ed817,_0x4a449d(_0x3ba17d[_0x5ed817])])):_0x3ba17d;return createHash(_0x17d0de(0x14e))[_0x17d0de(0x1b9)](JSON[_0x17d0de(0x157)](_0x4a449d(_0x175fd6)))[_0x17d0de(0x16c)]('hex');}function a342_0x50d4(){const _0x4abde2=['has','disabled','VARCHAR','1023275MfxQUI','update','name','map','.options\x20must\x20be\x20an\x20array.','toDatasetKey','Design\x20file\x20must\x20be\x20a\x20regular\x20JSON\x20file\x20no\x20larger\x20than\x202\x20MB.','216nbZlZG','.reason','tableComment','.dbType\x20is\x20required\x20and\x20must\x20be\x20a\x20supported\x20storage\x20type.','150LXaZkX','JSON','businessGroup','.relationType\x20must\x20be\x20lookup.','.doType\x20is\x20unsupported.','validation','pkField','isTimeDimension','add','ADDRESS','doType','sort','NUMBER','toDatasetCode','\x20must\x20be\x20a\x20non-empty\x20string.','supportedAggregation','.cardinality\x20is\x20unsupported.','autoIncrement','\x20duplicates\x20a\x20source\x20field.','schemaVersion','sha256','fromDatasetKey','TEXT','79542vcYnLw','UPLOAD','fromField','lookup','datasetName','value','stringify','visible','keys','every','.dataset.','required','defaultAggregation','reason','semanticName','1415889AwHEsl','124JsSjBu','utf8','893790dqSnSy','number','.dataset','DATE','normalizedManifest','displayName','.confidence\x20is\x20invalid.','relations','.dbTypeLen\x20must\x20be\x20an\x20integer\x20in\x201..65535.','digest','FLOAT','isSafeInteger','parse','fromEntries','dbTypeLen','trim','ONE_TO_ONE','Design\x20file\x20contains\x20invalid\x20JSON.','\x20must\x20be\x20a\x20string.','Unsupported\x20dataset\x20manifest\x20version.','48bsQcCM','BIGINT','toField','USER','MULTI_SELECT','DOUBLE','entries','length','isFile','fields','dataset','INT','includes','options','relationType','\x20is\x20not\x20supported.','MANY_TO_ONE','12RobajO','isFinite','dbType','SELECT','.name\x20is\x20invalid\x20or\x20duplicated.','Invalid\x20unresolved\x20relation.','4772LwxgOh','datasets[','TIMESTAMP','Manifest\x20must\x20be\x20an\x20object.','.options\x20contains\x20an\x20invalid\x20item.','tableName','DATETIME','.options.label','labelField','string','unresolvedRelations','\x20requires\x20exactly\x20one\x20target.','\x20must\x20be\x20an\x20object.','isArray','doVersion','localKey','confidence','8ykSvXl','get','\x20must\x20contain\x20at\x20most\x20200\x20items.','LONGTEXT','TINYINT','.fields\x20is\x20empty\x20or\x20exceeds\x20the\x20batch\x20limit.','.toField','test','readonly','object','chartRole','cardinality','\x20source\x20does\x20not\x20exist.','BOOLEAN','some','label','kind','datasets','size','\x20target\x20field\x20does\x20not\x20exist.','636825tavjlz','\x20requires\x20options\x20or\x20an\x20explicit\x20relation.'];a342_0x50d4=function(){return _0x4abde2;};return a342_0x50d4();}
1
+ const a343_0x407833=a343_0x1af0;(function(_0x3a3aea,_0x431d2b){const _0x194d57=a343_0x1af0,_0x32a0c0=_0x3a3aea();while(!![]){try{const _0x4682ff=-parseInt(_0x194d57(0x18a))/0x1*(-parseInt(_0x194d57(0x16d))/0x2)+parseInt(_0x194d57(0x1b0))/0x3+-parseInt(_0x194d57(0x1b3))/0x4*(parseInt(_0x194d57(0x165))/0x5)+parseInt(_0x194d57(0x187))/0x6+parseInt(_0x194d57(0x1a3))/0x7+-parseInt(_0x194d57(0x1a4))/0x8+parseInt(_0x194d57(0x1bc))/0x9*(parseInt(_0x194d57(0x1a6))/0xa);if(_0x4682ff===_0x431d2b)break;else _0x32a0c0['push'](_0x32a0c0['shift']());}catch(_0x26c06b){_0x32a0c0['push'](_0x32a0c0['shift']());}}}(a343_0x43b7,0x30e89));import{createHash}from'node:crypto';import{readFile,lstat}from'node:fs/promises';import{CliErrors}from'../../errors.js';export const isObject=_0x244569=>_0x244569!==null&&typeof _0x244569===a343_0x407833(0x15e)&&!Array[a343_0x407833(0x162)](_0x244569);const types=new Set([a343_0x407833(0x1be),a343_0x407833(0x15a),a343_0x407833(0x174),'BOOLEAN',a343_0x407833(0x1bf),a343_0x407833(0x186),a343_0x407833(0x183),'USER','ADDRESS','UPLOAD']),dbTypes=new Set([a343_0x407833(0x197),a343_0x407833(0x199),a343_0x407833(0x1be),a343_0x407833(0x192),a343_0x407833(0x170),'SMALLINT',a343_0x407833(0x161),a343_0x407833(0x16c),a343_0x407833(0x190),a343_0x407833(0x1cd),a343_0x407833(0x1ba),a343_0x407833(0x16f),a343_0x407833(0x1a5),a343_0x407833(0x171),a343_0x407833(0x174),a343_0x407833(0x1b9),a343_0x407833(0x1a9),a343_0x407833(0x15d)]),identifier=/^[a-z][a-z0-9_]*$/;export function requireValue(_0x3a8f1f,_0x122ac7){const _0x1a5546=a343_0x407833;if(!_0x3a8f1f)throw CliErrors[_0x1a5546(0x166)](_0x122ac7);}function keys(_0x79953a,_0x177b04,_0x207e0f){const _0x340a31=a343_0x407833;for(const _0x59c244 of Object[_0x340a31(0x19f)](_0x79953a))requireValue(_0x177b04[_0x340a31(0x19a)](_0x59c244),_0x207e0f+'.'+_0x59c244+'\x20is\x20not\x20supported.');}function text(_0x163dce,_0x5b4388){const _0x28492a=a343_0x407833;requireValue(typeof _0x163dce===_0x28492a(0x15c)&&_0x163dce[_0x28492a(0x160)]()[_0x28492a(0x1db)]>0x0,_0x5b4388+_0x28492a(0x175));}function a343_0x1af0(_0x1b0209,_0x50aa7b){_0x1b0209=_0x1b0209-0x15a;const _0x43b72b=a343_0x43b7();let _0x1af0a2=_0x43b72b[_0x1b0209];return _0x1af0a2;}function a343_0x43b7(){const _0x2838f0=['datasets','TIMESTAMP','DOUBLE','datasets\x20must\x20contain\x201..20\x20items.','283203UdNdPZ','.localKey\x20is\x20invalid\x20or\x20duplicated.','TEXT','SELECT','doType','unresolvedRelations','isSymbolicLink','defaultAggregation','tableName','\x20must\x20be\x20an\x20object.','hex','\x20must\x20contain\x20at\x20most\x20200\x20items.','Manifest\x20must\x20be\x20an\x20object.','value','schemaVersion','Invalid\x20unresolved\x20relation.','set','FLOAT','pkField','isFinite','stringify','relations','dbType','parse','readonly','.options','.options\x20contains\x20an\x20invalid\x20item.','reason','cardinality','\x20must\x20be\x20a\x20boolean.','manifest','length','.dbType\x20is\x20required\x20and\x20must\x20be\x20a\x20supported\x20storage\x20type.','.options\x20must\x20be\x20an\x20array.','required','localKey','toFieldLabel','fromEntries','chartRole','.confidence\x20is\x20invalid.','MANY_TO_ONE','NUMBER','labelField','string','JSON','object','relationType','trim','INT','isArray','description','toField','491995ZxIgqj','validation','autoIncrement','\x20target\x20field\x20does\x20not\x20exist.','add','dataset','.doType\x20is\x20unsupported.','INTEGER','652424OpuHLU','.dataset.datasetName','DECIMAL','TINYINT','DATE','fromDatasetKey','.options.label','DATETIME','\x20must\x20be\x20a\x20non-empty\x20string.','isTimeDimension','\x20requires\x20options\x20or\x20an\x20explicit\x20relation.','entries','.dataset','.options\x20is\x20invalid\x20or\x20duplicated.','toDatasetCode','.toField','has','some','options','dbTypeLen','.fields[','visible','DATE_RANGE','isSafeInteger','kind','MULTI_SELECT','1002276SkHjkL','displayName','sort','1tkAhxs','.dataset.','.displayName','unresolvedRelations.reason','doVersion','semanticName','BIGINT','.toDatasetCode','LONGTEXT','toDatasetKey','test','.dataset\x20is\x20required.','normalizedManifest','VARCHAR','\x20duplicates\x20a\x20source\x20field.','CHAR','includes','name','label','supportedAggregation','datasetName','keys','confidence','map','.dbTypeLen\x20must\x20be\x20an\x20integer\x20in\x201..65535.','1557584gUonaB','3176632QPMokf','NUMERIC','40pyfQLd','every','fromField','BOOLEAN','isFile','fields','\x20must\x20be\x20a\x20string.','size','displayFormat','datasets[','448098CldzSK','disabled','relations[','16sGRbOg','Unsupported\x20dataset\x20manifest\x20version.','\x20requires\x20exactly\x20one\x20target.','\x20source\x20does\x20not\x20exist.','update'];a343_0x43b7=function(){return _0x2838f0;};return a343_0x43b7();}export function validateManifest(_0x24f91e){const _0x42f8a6=a343_0x407833;requireValue(isObject(_0x24f91e),_0x42f8a6(0x1c8)),keys(_0x24f91e,['kind',_0x42f8a6(0x1ca),_0x42f8a6(0x18e),_0x42f8a6(0x1b8),_0x42f8a6(0x1d1),_0x42f8a6(0x1c1)],_0x42f8a6(0x1da)),requireValue(_0x24f91e[_0x42f8a6(0x185)]==='dataset-design'&&_0x24f91e['schemaVersion']===0x1&&_0x24f91e[_0x42f8a6(0x18e)]==='v2',_0x42f8a6(0x1b4)),requireValue(Array['isArray'](_0x24f91e[_0x42f8a6(0x1b8)])&&_0x24f91e[_0x42f8a6(0x1b8)][_0x42f8a6(0x1db)]>=0x1&&_0x24f91e[_0x42f8a6(0x1b8)][_0x42f8a6(0x1db)]<=0x14,_0x42f8a6(0x1bb));const _0x5697c3=new Map();for(const [_0x2670de,_0x3f7272]of _0x24f91e[_0x42f8a6(0x1b8)][_0x42f8a6(0x178)]()){const _0x43cee4=_0x42f8a6(0x1af)+_0x2670de+']';requireValue(isObject(_0x3f7272),_0x43cee4+_0x42f8a6(0x1c5)),keys(_0x3f7272,[_0x42f8a6(0x1df),'dataset',_0x42f8a6(0x1ab)],_0x43cee4),requireValue(typeof _0x3f7272[_0x42f8a6(0x1df)]===_0x42f8a6(0x15c)&&/^[a-z][a-z0-9_]{0,63}$/[_0x42f8a6(0x194)](_0x3f7272[_0x42f8a6(0x1df)])&&!_0x5697c3['has'](_0x3f7272[_0x42f8a6(0x1df)]),_0x43cee4+_0x42f8a6(0x1bd)),requireValue(isObject(_0x3f7272[_0x42f8a6(0x16a)]),_0x43cee4+_0x42f8a6(0x195)),keys(_0x3f7272[_0x42f8a6(0x16a)],[_0x42f8a6(0x19e),_0x42f8a6(0x1c4),'tableComment','businessGroup',_0x42f8a6(0x15b)],_0x43cee4+_0x42f8a6(0x179)),text(_0x3f7272[_0x42f8a6(0x16a)]['datasetName'],_0x43cee4+_0x42f8a6(0x16e));for(const [_0x208438,_0x5e8ce6]of Object[_0x42f8a6(0x178)](_0x3f7272[_0x42f8a6(0x16a)]))requireValue(_0x5e8ce6==null||typeof _0x5e8ce6===_0x42f8a6(0x15c),_0x43cee4+_0x42f8a6(0x18b)+_0x208438+_0x42f8a6(0x1ac));requireValue(Array[_0x42f8a6(0x162)](_0x3f7272[_0x42f8a6(0x1ab)])&&_0x3f7272['fields'][_0x42f8a6(0x1db)]>0x0&&(_0x24f91e[_0x42f8a6(0x1b8)][_0x42f8a6(0x1db)]===0x1||_0x3f7272[_0x42f8a6(0x1ab)]['length']<=0xc8),_0x43cee4+'.fields\x20is\x20empty\x20or\x20exceeds\x20the\x20batch\x20limit.');const _0x2a7e6c=new Set();_0x5697c3[_0x42f8a6(0x1cc)](_0x3f7272[_0x42f8a6(0x1df)],_0x2a7e6c);for(const [_0x5db729,_0x2390e7]of _0x3f7272['fields']['entries']()){const _0x1bacf2=_0x43cee4+_0x42f8a6(0x181)+_0x5db729+']';requireValue(isObject(_0x2390e7),_0x1bacf2+_0x42f8a6(0x1c5)),keys(_0x2390e7,[_0x42f8a6(0x19b),'displayName',_0x42f8a6(0x1c0),_0x42f8a6(0x1d2),'dbTypeLen',_0x42f8a6(0x163),_0x42f8a6(0x1de),_0x42f8a6(0x182),'disabled',_0x42f8a6(0x1d4),_0x42f8a6(0x1ce),_0x42f8a6(0x167),'options',_0x42f8a6(0x18f),_0x42f8a6(0x1e2),_0x42f8a6(0x1c3),'supportedAggregation',_0x42f8a6(0x176),_0x42f8a6(0x1ae)],_0x1bacf2),requireValue(typeof _0x2390e7[_0x42f8a6(0x19b)]===_0x42f8a6(0x15c)&&identifier[_0x42f8a6(0x194)](_0x2390e7[_0x42f8a6(0x19b)])&&!_0x2a7e6c[_0x42f8a6(0x17d)](_0x2390e7[_0x42f8a6(0x19b)]),_0x1bacf2+'.name\x20is\x20invalid\x20or\x20duplicated.'),_0x2a7e6c[_0x42f8a6(0x169)](_0x2390e7[_0x42f8a6(0x19b)]),text(_0x2390e7[_0x42f8a6(0x188)],_0x1bacf2+_0x42f8a6(0x18c)),requireValue(types[_0x42f8a6(0x17d)](_0x2390e7['doType']),_0x1bacf2+_0x42f8a6(0x16b)),requireValue(dbTypes[_0x42f8a6(0x17d)](_0x2390e7['dbType']),_0x1bacf2+_0x42f8a6(0x1dc));for(const _0x334fe0 of[_0x42f8a6(0x1d2),_0x42f8a6(0x163),'semanticName',_0x42f8a6(0x1e2),_0x42f8a6(0x1c3),'displayFormat']){requireValue(_0x2390e7[_0x334fe0]==null||typeof _0x2390e7[_0x334fe0]===_0x42f8a6(0x15c),_0x1bacf2+'.'+_0x334fe0+_0x42f8a6(0x1ac));}for(const _0x21a3dd of[_0x42f8a6(0x1de),'visible',_0x42f8a6(0x1b1),_0x42f8a6(0x1d4),_0x42f8a6(0x1ce),_0x42f8a6(0x167),_0x42f8a6(0x176)]){requireValue(_0x2390e7[_0x21a3dd]==null||typeof _0x2390e7[_0x21a3dd]==='boolean',_0x1bacf2+'.'+_0x21a3dd+_0x42f8a6(0x1d9));}requireValue(_0x2390e7[_0x42f8a6(0x180)]==null||Number[_0x42f8a6(0x184)](_0x2390e7['dbTypeLen'])&&_0x2390e7[_0x42f8a6(0x180)]>0x0&&_0x2390e7['dbTypeLen']<=0xffff,_0x1bacf2+_0x42f8a6(0x1a2)),requireValue(_0x2390e7[_0x42f8a6(0x19d)]==null||Array[_0x42f8a6(0x162)](_0x2390e7[_0x42f8a6(0x19d)])&&_0x2390e7[_0x42f8a6(0x19d)][_0x42f8a6(0x1a7)](_0x16cf65=>typeof _0x16cf65==='string'),_0x1bacf2+'.supportedAggregation\x20must\x20contain\x20strings.');if(_0x2390e7[_0x42f8a6(0x17f)]!=null){requireValue(Array['isArray'](_0x2390e7[_0x42f8a6(0x17f)]),_0x1bacf2+_0x42f8a6(0x1dd));const _0x4430bb=new Set(),_0x3b0ede=new Set();for(const _0xb52d1e of _0x2390e7[_0x42f8a6(0x17f)]){requireValue(isObject(_0xb52d1e),_0x1bacf2+_0x42f8a6(0x1d6)),keys(_0xb52d1e,['label','value'],_0x1bacf2+_0x42f8a6(0x1d5)),text(_0xb52d1e[_0x42f8a6(0x19c)],_0x1bacf2+_0x42f8a6(0x173)),requireValue(typeof _0xb52d1e['value']===_0x42f8a6(0x15c)&&identifier['test'](_0xb52d1e[_0x42f8a6(0x1c9)])&&!_0x3b0ede[_0x42f8a6(0x17d)](_0xb52d1e[_0x42f8a6(0x1c9)])&&!_0x4430bb[_0x42f8a6(0x17d)](_0xb52d1e['label']),_0x1bacf2+_0x42f8a6(0x17a)),_0x4430bb[_0x42f8a6(0x169)](_0xb52d1e[_0x42f8a6(0x19c)]),_0x3b0ede[_0x42f8a6(0x169)](_0xb52d1e['value']);}}if([_0x42f8a6(0x1bf),_0x42f8a6(0x186)][_0x42f8a6(0x19a)](_0x2390e7[_0x42f8a6(0x1c0)])){const _0x514348=Array[_0x42f8a6(0x162)](_0x24f91e[_0x42f8a6(0x1d1)])&&_0x24f91e[_0x42f8a6(0x1d1)][_0x42f8a6(0x17e)](_0x264e24=>_0x264e24?.['fromDatasetKey']===_0x3f7272[_0x42f8a6(0x1df)]&&_0x264e24?.[_0x42f8a6(0x1a8)]===_0x2390e7[_0x42f8a6(0x19b)]);requireValue(_0x514348||Array[_0x42f8a6(0x162)](_0x2390e7[_0x42f8a6(0x17f)])&&_0x2390e7[_0x42f8a6(0x17f)][_0x42f8a6(0x1db)]>0x0,_0x1bacf2+_0x42f8a6(0x177));}}_0x2a7e6c[_0x42f8a6(0x169)]('id');}for(const _0x12d312 of[_0x42f8a6(0x1d1),_0x42f8a6(0x1c1)])requireValue(_0x24f91e[_0x12d312]==null||Array[_0x42f8a6(0x162)](_0x24f91e[_0x12d312])&&_0x24f91e[_0x12d312][_0x42f8a6(0x1db)]<=0xc8,_0x12d312+_0x42f8a6(0x1c7));const _0x4852aa=new Set();for(const [_0x387457,_0x16cef8]of(_0x24f91e['relations']??[])[_0x42f8a6(0x178)]()){const _0x373d24=_0x42f8a6(0x1b2)+_0x387457+']';requireValue(isObject(_0x16cef8),_0x373d24+_0x42f8a6(0x1c5)),keys(_0x16cef8,[_0x42f8a6(0x172),_0x42f8a6(0x1a8),_0x42f8a6(0x193),'toDatasetCode','toField',_0x42f8a6(0x1e0),_0x42f8a6(0x15f),_0x42f8a6(0x1d8),'reason',_0x42f8a6(0x1a0)],_0x373d24),requireValue(_0x5697c3['get'](_0x16cef8[_0x42f8a6(0x172)])?.[_0x42f8a6(0x17d)](_0x16cef8[_0x42f8a6(0x1a8)]),_0x373d24+_0x42f8a6(0x1b6)),requireValue(Boolean(_0x16cef8[_0x42f8a6(0x193)])!==Boolean(_0x16cef8[_0x42f8a6(0x17b)]),_0x373d24+_0x42f8a6(0x1b5));if(_0x16cef8[_0x42f8a6(0x193)])requireValue(_0x5697c3['get'](_0x16cef8['toDatasetKey'])?.[_0x42f8a6(0x17d)](_0x16cef8[_0x42f8a6(0x164)]),_0x373d24+_0x42f8a6(0x168));else text(_0x16cef8[_0x42f8a6(0x17b)],_0x373d24+_0x42f8a6(0x191)),text(_0x16cef8[_0x42f8a6(0x164)],_0x373d24+_0x42f8a6(0x17c));requireValue(_0x16cef8[_0x42f8a6(0x15f)]==null||_0x16cef8[_0x42f8a6(0x15f)]==='lookup',_0x373d24+'.relationType\x20must\x20be\x20lookup.'),requireValue(_0x16cef8['cardinality']==null||[_0x42f8a6(0x1e4),'ONE_TO_ONE']['includes'](_0x16cef8['cardinality']),_0x373d24+'.cardinality\x20is\x20unsupported.'),text(_0x16cef8[_0x42f8a6(0x1d7)],_0x373d24+'.reason'),requireValue(_0x16cef8[_0x42f8a6(0x1a0)]==null||typeof _0x16cef8[_0x42f8a6(0x1a0)]==='number'&&Number[_0x42f8a6(0x1cf)](_0x16cef8[_0x42f8a6(0x1a0)])&&_0x16cef8['confidence']>=0x0&&_0x16cef8[_0x42f8a6(0x1a0)]<=0x1,_0x373d24+_0x42f8a6(0x1e3));const _0x3f48f4=_0x16cef8[_0x42f8a6(0x172)]+':'+_0x16cef8[_0x42f8a6(0x1a8)];requireValue(!_0x4852aa[_0x42f8a6(0x17d)](_0x3f48f4),_0x373d24+_0x42f8a6(0x198)),_0x4852aa[_0x42f8a6(0x169)](_0x3f48f4);}for(const _0x1a7487 of _0x24f91e[_0x42f8a6(0x1c1)]??[]){requireValue(isObject(_0x1a7487),_0x42f8a6(0x1cb)),text(_0x1a7487[_0x42f8a6(0x1d7)],_0x42f8a6(0x18d));}return _0x24f91e;}export async function readManifest(_0x3dd3d2){const _0x416fb2=a343_0x407833,_0xf0235c=await lstat(_0x3dd3d2);requireValue(_0xf0235c[_0x416fb2(0x1aa)]()&&!_0xf0235c[_0x416fb2(0x1c2)]()&&_0xf0235c[_0x416fb2(0x1ad)]<=0x1e8480,'Design\x20file\x20must\x20be\x20a\x20regular\x20JSON\x20file\x20no\x20larger\x20than\x202\x20MB.');let _0x419b4b;try{_0x419b4b=JSON[_0x416fb2(0x1d3)](await readFile(_0x3dd3d2,'utf8'));}catch{throw CliErrors[_0x416fb2(0x166)]('Design\x20file\x20contains\x20invalid\x20JSON.');}return validateManifest(isObject(_0x419b4b)&&isObject(_0x419b4b['normalizedManifest'])?_0x419b4b[_0x416fb2(0x196)]:_0x419b4b);}export function inputHash(_0x3b8557){const _0x29931d=a343_0x407833,_0x17058e=_0x5b8790=>Array[_0x29931d(0x162)](_0x5b8790)?_0x5b8790[_0x29931d(0x1a1)](_0x17058e):isObject(_0x5b8790)?Object[_0x29931d(0x1e1)](Object[_0x29931d(0x19f)](_0x5b8790)[_0x29931d(0x189)]()[_0x29931d(0x1a1)](_0x11b9d1=>[_0x11b9d1,_0x17058e(_0x5b8790[_0x11b9d1])])):_0x5b8790;return createHash('sha256')[_0x29931d(0x1b7)](JSON[_0x29931d(0x1d0)](_0x17058e(_0x3b8557)))['digest'](_0x29931d(0x1c6));}
@@ -1 +1 @@
1
- const a343_0x4c7105=a343_0x14e3;(function(_0x508e18,_0xabfb9b){const _0x3c4239=a343_0x14e3,_0x4fd217=_0x508e18();while(!![]){try{const _0x40029b=parseInt(_0x3c4239(0x1b8))/0x1+parseInt(_0x3c4239(0x1d2))/0x2+parseInt(_0x3c4239(0x1b7))/0x3*(-parseInt(_0x3c4239(0x1df))/0x4)+parseInt(_0x3c4239(0x1d0))/0x5+-parseInt(_0x3c4239(0x19e))/0x6*(-parseInt(_0x3c4239(0x1c1))/0x7)+-parseInt(_0x3c4239(0x1ba))/0x8+-parseInt(_0x3c4239(0x1a7))/0x9;if(_0x40029b===_0xabfb9b)break;else _0x4fd217['push'](_0x4fd217['shift']());}catch(_0x2cda17){_0x4fd217['push'](_0x4fd217['shift']());}}}(a343_0x2244,0xe8854));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';function a343_0x14e3(_0x2ee494,_0x28c25c){_0x2ee494=_0x2ee494-0x19a;const _0x2244af=a343_0x2244();let _0x14e3d4=_0x2244af[_0x2ee494];return _0x14e3d4;}import{fileURLToPath}from'node:url';import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a343_0x4c7105(0x1aa),SKILL_NAME=a343_0x4c7105(0x1b4),debug=debuglog(a343_0x4c7105(0x1d7));function frontmatterValue(_0x1e64aa,_0x150c4e){const _0x288a56=a343_0x4c7105;return _0x1e64aa[_0x288a56(0x1da)](new RegExp('^'+_0x150c4e+_0x288a56(0x1a2),'m'))?.[0x1]?.['trim']()??'';}function a343_0x2244(){const _0x2fbc8f=['root','28RTlrIr','every','log','split','unknown','6xNrnsv','message','reason','version',':\x5cs*(.+)$','isFile','missing','INSTALL_FAILED','isSymbolicLink','3318012yroRiy','pipe','CLI\x20Built-in\x20Skill\x20','rabetbase\x20cli-skill\x20install','skillVersion','installedPath','startsWith','update','home','packageRoot','packageVersion','SKILL.md','parse','rabetbase','digest','length','522645NdGCaC','908077OfoQeD','flatMap','14409032vtTEFy','Symbolic\x20link\x20is\x20not\x20allowed:\x20','unverifiable','error','name','schemaVersion','Unsafe\x20manifest\x20path:\x20','11165525GoIalw','present','stdio','\x20verified;\x20','files','rabetbase.manifest.json','version_mismatch','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','absent','current','state','count','skills','Unsupported\x20Skill\x20entry:\x20','package.json','4771130wYUYgp','manifest','1768656eokvOO','status','utf8','output','\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.','rabetbase-skills','partialFailure','path','match','hex','skills@latest\x20exited\x20','SOURCE_INVALID'];a343_0x2244=function(){return _0x2fbc8f;};return a343_0x2244();}function listFiles(_0x3bcc6b,_0x2e9c1f=_0x3bcc6b){const _0x65752f=a343_0x4c7105;return readdirSync(_0x2e9c1f,{'withFileTypes':!![]})[_0x65752f(0x1b9)](_0x5a881b=>{const _0x4eb403=_0x65752f,_0x3d6af2=join(_0x2e9c1f,_0x5a881b[_0x4eb403(0x1be)]),_0x2c9eca=lstatSync(_0x3d6af2);if(_0x2c9eca[_0x4eb403(0x1a6)]())throw new Error(_0x4eb403(0x1bb)+_0x3d6af2);if(_0x2c9eca['isDirectory']())return listFiles(_0x3bcc6b,_0x3d6af2);if(!_0x2c9eca[_0x4eb403(0x1a3)]())throw new Error(_0x4eb403(0x1ce)+_0x3d6af2);return[relative(_0x3bcc6b,_0x3d6af2)[_0x4eb403(0x19c)](sep)['join']('/')];})['sort']((_0x302b24,_0x23f011)=>_0x302b24<_0x23f011?-0x1:_0x302b24>_0x23f011?0x1:0x0);}function digestFiles(_0x2169f5,_0x5ddd89){const _0x456a9f=a343_0x4c7105,_0x102299=createHash('sha256');for(const _0x45ff72 of _0x5ddd89){if(_0x45ff72[_0x456a9f(0x1ad)]('/')||_0x45ff72[_0x456a9f(0x19c)]('/')['includes']('..')||_0x45ff72['includes']('\x5c'))throw new Error(_0x456a9f(0x1c0)+_0x45ff72);_0x102299[_0x456a9f(0x1ae)](_0x45ff72),_0x102299[_0x456a9f(0x1ae)]('\x00'),_0x102299[_0x456a9f(0x1ae)](readFileSync(join(_0x2169f5,..._0x45ff72[_0x456a9f(0x19c)]('/')))),_0x102299[_0x456a9f(0x1ae)]('\x00');}return _0x102299[_0x456a9f(0x1b5)](_0x456a9f(0x1db));}function sameFiles(_0x51cea9,_0x22d8ae){const _0x446f4a=a343_0x4c7105;return _0x51cea9[_0x446f4a(0x1b6)]===_0x22d8ae[_0x446f4a(0x1b6)]&&_0x51cea9[_0x446f4a(0x19a)]((_0x492f91,_0x1d4c2c)=>_0x492f91===_0x22d8ae[_0x1d4c2c]);}function readSource(_0x340878){const _0x47e7ae=a343_0x4c7105,_0x299084=JSON[_0x47e7ae(0x1b3)](readFileSync(join(_0x340878,_0x47e7ae(0x1cf)),_0x47e7ae(0x1d4))),_0x3ab881=JSON['parse'](readFileSync(join(_0x340878,_0x47e7ae(0x1cd),_0x47e7ae(0x1c6)),_0x47e7ae(0x1d4))),_0x457202=join(_0x340878,_0x47e7ae(0x1cd),SKILL_NAME),_0x1228fa=frontmatterValue(readFileSync(join(_0x457202,_0x47e7ae(0x1b2)),'utf8'),'version'),_0x1e48e1=listFiles(_0x457202);if(_0x3ab881[_0x47e7ae(0x1bf)]!==0x1||_0x3ab881[_0x47e7ae(0x1be)]!==SKILL_NAME||!_0x299084['version']||_0x3ab881['packageVersion']!==_0x299084[_0x47e7ae(0x1a1)]||_0x3ab881[_0x47e7ae(0x1ab)]!==_0x299084[_0x47e7ae(0x1a1)]||_0x1228fa!==_0x299084['version']||!sameFiles(_0x1e48e1,_0x3ab881['files'])||digestFiles(_0x457202,_0x1e48e1)!==_0x3ab881[_0x47e7ae(0x1b5)])throw new Error(_0x47e7ae(0x1c8));return{'packageVersion':_0x299084[_0x47e7ae(0x1a1)],'skillVersion':_0x1228fa,'root':_0x457202,'manifest':_0x3ab881};}function installedSkillPath(_0x47fefb){const _0x23e61f=a343_0x4c7105,_0x2ae71c=resolveInstalledSkill(SKILL_NAME,{'home':_0x47fefb});if(_0x2ae71c[_0x23e61f(0x1cb)]===_0x23e61f(0x1c2))return{'state':_0x23e61f(0x1c2),'path':dirname(_0x2ae71c[_0x23e61f(0x1d9)])};if(_0x2ae71c[_0x23e61f(0x1cb)]===_0x23e61f(0x1c9))return{'state':_0x23e61f(0x1a4)};return{'state':'unverifiable','reason':_0x2ae71c[_0x23e61f(0x1a0)]};}export function inspectInstalledBuiltinSkillVersion(_0x4c34d0,_0x222d1e={}){const _0x582346=a343_0x4c7105,_0x2e6358=installedSkillPath(_0x222d1e[_0x582346(0x1af)]??homedir());if(_0x2e6358[_0x582346(0x1cb)]==='missing')return{'state':'missing','expectedVersion':_0x4c34d0,'repairCommand':REPAIR_COMMAND};if(_0x2e6358[_0x582346(0x1cb)]===_0x582346(0x1bc))return{'state':_0x582346(0x1bc),'expectedVersion':_0x4c34d0,'reason':_0x2e6358['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x302891=frontmatterValue(readFileSync(join(_0x2e6358[_0x582346(0x1d9)],_0x582346(0x1b2)),_0x582346(0x1d4)),_0x582346(0x1a1));return{'state':_0x302891===_0x4c34d0?'current':_0x582346(0x1c7),'expectedVersion':_0x4c34d0,'skillVersion':_0x302891,'installedPath':_0x2e6358[_0x582346(0x1d9)],'repairCommand':REPAIR_COMMAND};}catch(_0x10abd7){return{'state':'unverifiable','expectedVersion':_0x4c34d0,'installedPath':_0x2e6358[_0x582346(0x1d9)],'reason':_0x10abd7 instanceof Error?_0x10abd7['message']:String(_0x10abd7),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x28420d={}){const _0x316f8c=a343_0x4c7105,_0xc5db1=_0x28420d[_0x316f8c(0x1b0)]??DEFAULT_PACKAGE_ROOT;let _0x514efb;try{_0x514efb=readSource(_0xc5db1);}catch(_0x494f7f){return{'state':_0x316f8c(0x1bc),'packageVersion':_0x316f8c(0x19d),'reason':_0x494f7f instanceof Error?_0x494f7f['message']:String(_0x494f7f),'repairCommand':REPAIR_COMMAND};}const _0x4fa893=installedSkillPath(_0x28420d['home']??homedir());if(_0x4fa893[_0x316f8c(0x1cb)]===_0x316f8c(0x1a4))return{'state':_0x316f8c(0x1a4),'packageVersion':_0x514efb[_0x316f8c(0x1b1)],'repairCommand':REPAIR_COMMAND};if(_0x4fa893[_0x316f8c(0x1cb)]===_0x316f8c(0x1bc))return{'state':_0x316f8c(0x1bc),'packageVersion':_0x514efb[_0x316f8c(0x1b1)],'reason':_0x4fa893[_0x316f8c(0x1a0)],'repairCommand':REPAIR_COMMAND};try{const _0x1c3e60=frontmatterValue(readFileSync(join(_0x4fa893['path'],_0x316f8c(0x1b2)),'utf8'),_0x316f8c(0x1a1));if(_0x1c3e60!==_0x514efb['skillVersion'])return{'state':_0x316f8c(0x1c7),'packageVersion':_0x514efb[_0x316f8c(0x1b1)],'skillVersion':_0x1c3e60,'installedPath':_0x4fa893[_0x316f8c(0x1d9)],'repairCommand':REPAIR_COMMAND};const _0x51b3bc=listFiles(_0x4fa893[_0x316f8c(0x1d9)]),_0x504e9f=digestFiles(_0x4fa893[_0x316f8c(0x1d9)],_0x51b3bc);return{'state':sameFiles(_0x51b3bc,_0x514efb[_0x316f8c(0x1d1)][_0x316f8c(0x1c5)])&&_0x504e9f===_0x514efb[_0x316f8c(0x1d1)]['digest']?_0x316f8c(0x1ca):'content_mismatch','packageVersion':_0x514efb['packageVersion'],'skillVersion':_0x1c3e60,'installedPath':_0x4fa893[_0x316f8c(0x1d9)],'digest':_0x504e9f,'repairCommand':REPAIR_COMMAND};}catch(_0x5ca3f8){return{'state':_0x316f8c(0x1bc),'packageVersion':_0x514efb['packageVersion'],'installedPath':_0x4fa893[_0x316f8c(0x1d9)],'reason':_0x5ca3f8 instanceof Error?_0x5ca3f8[_0x316f8c(0x19f)]:String(_0x5ca3f8),'repairCommand':REPAIR_COMMAND};}}function failure(_0x116ed2,_0x1bb22b,_0x5de7d6,_0x24600c){const _0x4f2817=a343_0x4c7105;return{'ok':![],'code':_0x116ed2,'packageVersion':_0x1bb22b[_0x4f2817(0x1b1)],'skillVersion':_0x1bb22b[_0x4f2817(0x1ab)],'installedPath':_0x24600c,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x5de7d6 instanceof Error?_0x5de7d6['message']:String(_0x5de7d6)};}export function installBuiltinSkill(_0x5540bb={}){const _0xeeb60=a343_0x4c7105,_0x4695e6=_0x5540bb[_0xeeb60(0x1b0)]??DEFAULT_PACKAGE_ROOT,_0x5f2e08=_0x5540bb['home']??homedir();let _0x45b05f;try{_0x45b05f=readSource(_0x4695e6);}catch(_0x2a6c9c){return failure(_0xeeb60(0x1dd),{'packageVersion':_0xeeb60(0x19d),'skillVersion':'unknown'},_0x2a6c9c);}const _0x348b41=inspectBuiltinSkill({'packageRoot':_0x4695e6,'home':_0x5f2e08}),_0x212c67=runNpxSkillsAddGlobal(_0x4695e6,_0x45b05f[_0xeeb60(0x1de)],{'stdio':_0x5540bb[_0xeeb60(0x1c3)]??_0xeeb60(0x1a8),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x5f2e08}});if(_0x212c67['skipped'])return{'ok':!![],'packageVersion':_0x45b05f['packageVersion'],'skillVersion':_0x45b05f[_0xeeb60(0x1ab)],'installedPath':_0x348b41[_0xeeb60(0x1ac)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x212c67['ok'])return failure(_0xeeb60(0x1a5),_0x45b05f,_0x212c67[_0xeeb60(0x1bd)]??_0xeeb60(0x1dc)+_0x212c67[_0xeeb60(0x1d3)]);const _0x45a62b=inspectBuiltinSkill({'packageRoot':_0x4695e6,'home':_0x5f2e08});if(_0x45a62b[_0xeeb60(0x1cb)]!==_0xeeb60(0x1ca)){const _0x5d3ac3=_0x45a62b['reason']??'Installed\x20Skill\x20state\x20is\x20'+_0x45a62b[_0xeeb60(0x1cb)];return failure('VERIFY_FAILED',_0x45b05f,_0x212c67['partialFailure']?_0x5d3ac3+'\x0a'+_0x212c67[_0xeeb60(0x1d8)][_0xeeb60(0x1d5)]:_0x5d3ac3,_0x45a62b[_0xeeb60(0x1ac)]);}return _0x212c67[_0xeeb60(0x1d8)]&&(debug('Installer\x20reported\x20partial\x20target\x20failures:\x0a%s',_0x212c67['partialFailure'][_0xeeb60(0x1d5)]),console[_0xeeb60(0x19b)](_0xeeb60(0x1a9)+_0x45b05f[_0xeeb60(0x1ab)]+_0xeeb60(0x1c4)+_0x212c67['partialFailure'][_0xeeb60(0x1cc)]+_0xeeb60(0x1d6))),{'ok':!![],'packageVersion':_0x45b05f[_0xeeb60(0x1b1)],'skillVersion':_0x45b05f[_0xeeb60(0x1ab)],'installedPath':_0x45a62b[_0xeeb60(0x1ac)],'changed':_0x348b41[_0xeeb60(0x1cb)]!==_0xeeb60(0x1ca),'repairCommand':REPAIR_COMMAND};}
1
+ const a344_0x569c36=a344_0x8cc2;(function(_0x5c400b,_0x37d81c){const _0x574ac2=a344_0x8cc2,_0x3e4470=_0x5c400b();while(!![]){try{const _0x2b93e4=parseInt(_0x574ac2(0x1d9))/0x1*(-parseInt(_0x574ac2(0x1d4))/0x2)+-parseInt(_0x574ac2(0x1b8))/0x3*(-parseInt(_0x574ac2(0x1dc))/0x4)+parseInt(_0x574ac2(0x1b5))/0x5*(parseInt(_0x574ac2(0x1af))/0x6)+-parseInt(_0x574ac2(0x1bd))/0x7*(-parseInt(_0x574ac2(0x1ae))/0x8)+parseInt(_0x574ac2(0x1c4))/0x9*(-parseInt(_0x574ac2(0x1dd))/0xa)+parseInt(_0x574ac2(0x19f))/0xb+-parseInt(_0x574ac2(0x1a2))/0xc;if(_0x2b93e4===_0x37d81c)break;else _0x3e4470['push'](_0x3e4470['shift']());}catch(_0x58e0b5){_0x3e4470['push'](_0x3e4470['shift']());}}}(a344_0x4cb7,0x27331));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';function a344_0x8cc2(_0x57f4d1,_0x3d6700){_0x57f4d1=_0x57f4d1-0x19b;const _0x4cb742=a344_0x4cb7();let _0x8cc2f1=_0x4cb742[_0x57f4d1];return _0x8cc2f1;}import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a344_0x569c36(0x1e0),SKILL_NAME=a344_0x569c36(0x1b3),debug=debuglog(a344_0x569c36(0x1c9));function frontmatterValue(_0x768bdb,_0x42b9cf){const _0x332db0=a344_0x569c36;return _0x768bdb[_0x332db0(0x1d7)](new RegExp('^'+_0x42b9cf+_0x332db0(0x1a8),'m'))?.[0x1]?.[_0x332db0(0x1aa)]()??'';}function a344_0x4cb7(){const _0x1185ec=['version','manifest','home',':\x5cs*(.+)$','count','trim','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','state','partialFailure','191560JGZnWC','190110ycMAPh','split','join','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','rabetbase','Installed\x20Skill\x20state\x20is\x20','50LuFNdZ','hex','unverifiable','170280MMxfMq','every','SKILL.md','unknown','package.json','7YEWlBd','packageVersion','rabetbase.manifest.json','files','name','reason','installedPath','9NYJdDQ','status','VERIFY_FAILED','utf8','isSymbolicLink','rabetbase-skills','INSTALL_FAILED','\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.','current','missing','root','content_mismatch','parse','sha256','isDirectory','update','68122XAvcQz','output','schemaVersion','match','startsWith','2GezrmE','pipe','log','8ZliXcS','1259090aSRKMV','message','isFile','rabetbase\x20cli-skill\x20install','skillVersion','path','skills','error','1030645vnUTlH','digest','Unsupported\x20Skill\x20entry:\x20','2321016BLVGNs','absent','skills@latest\x20exited\x20'];a344_0x4cb7=function(){return _0x1185ec;};return a344_0x4cb7();}function listFiles(_0x28def8,_0xe20011=_0x28def8){return readdirSync(_0xe20011,{'withFileTypes':!![]})['flatMap'](_0x14e605=>{const _0x389f22=a344_0x8cc2,_0x38443a=join(_0xe20011,_0x14e605['name']),_0x57d38e=lstatSync(_0x38443a);if(_0x57d38e[_0x389f22(0x1c8)]())throw new Error('Symbolic\x20link\x20is\x20not\x20allowed:\x20'+_0x38443a);if(_0x57d38e[_0x389f22(0x1d2)]())return listFiles(_0x28def8,_0x38443a);if(!_0x57d38e[_0x389f22(0x1df)]())throw new Error(_0x389f22(0x1a1)+_0x38443a);return[relative(_0x28def8,_0x38443a)[_0x389f22(0x1b0)](sep)[_0x389f22(0x1b1)]('/')];})['sort']((_0x5774c2,_0xd94ee9)=>_0x5774c2<_0xd94ee9?-0x1:_0x5774c2>_0xd94ee9?0x1:0x0);}function digestFiles(_0x5a8a3e,_0x60f149){const _0x5cdd21=a344_0x569c36,_0x66e23c=createHash(_0x5cdd21(0x1d1));for(const _0x307537 of _0x60f149){if(_0x307537[_0x5cdd21(0x1d8)]('/')||_0x307537[_0x5cdd21(0x1b0)]('/')['includes']('..')||_0x307537['includes']('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x307537);_0x66e23c['update'](_0x307537),_0x66e23c['update']('\x00'),_0x66e23c[_0x5cdd21(0x1d3)](readFileSync(join(_0x5a8a3e,..._0x307537[_0x5cdd21(0x1b0)]('/')))),_0x66e23c['update']('\x00');}return _0x66e23c[_0x5cdd21(0x1a0)](_0x5cdd21(0x1b6));}function sameFiles(_0x208a8e,_0x19a04c){const _0x186291=a344_0x569c36;return _0x208a8e['length']===_0x19a04c['length']&&_0x208a8e[_0x186291(0x1b9)]((_0x26a2f6,_0x32405d)=>_0x26a2f6===_0x19a04c[_0x32405d]);}function readSource(_0x63d617){const _0xd373c2=a344_0x569c36,_0x1acace=JSON[_0xd373c2(0x1d0)](readFileSync(join(_0x63d617,_0xd373c2(0x1bc)),_0xd373c2(0x1c7))),_0x4927f9=JSON[_0xd373c2(0x1d0)](readFileSync(join(_0x63d617,_0xd373c2(0x19d),_0xd373c2(0x1bf)),_0xd373c2(0x1c7))),_0x149b19=join(_0x63d617,_0xd373c2(0x19d),SKILL_NAME),_0xba8f8f=frontmatterValue(readFileSync(join(_0x149b19,_0xd373c2(0x1ba)),_0xd373c2(0x1c7)),'version'),_0x3fedeb=listFiles(_0x149b19);if(_0x4927f9[_0xd373c2(0x1d6)]!==0x1||_0x4927f9[_0xd373c2(0x1c1)]!==SKILL_NAME||!_0x1acace[_0xd373c2(0x1a5)]||_0x4927f9[_0xd373c2(0x1be)]!==_0x1acace[_0xd373c2(0x1a5)]||_0x4927f9[_0xd373c2(0x19b)]!==_0x1acace[_0xd373c2(0x1a5)]||_0xba8f8f!==_0x1acace[_0xd373c2(0x1a5)]||!sameFiles(_0x3fedeb,_0x4927f9['files'])||digestFiles(_0x149b19,_0x3fedeb)!==_0x4927f9[_0xd373c2(0x1a0)])throw new Error(_0xd373c2(0x1ab));return{'packageVersion':_0x1acace['version'],'skillVersion':_0xba8f8f,'root':_0x149b19,'manifest':_0x4927f9};}function installedSkillPath(_0x3f970f){const _0x5dde0c=a344_0x569c36,_0x3f8ef8=resolveInstalledSkill(SKILL_NAME,{'home':_0x3f970f});if(_0x3f8ef8[_0x5dde0c(0x1ac)]==='present')return{'state':'present','path':dirname(_0x3f8ef8[_0x5dde0c(0x19c)])};if(_0x3f8ef8[_0x5dde0c(0x1ac)]===_0x5dde0c(0x1a3))return{'state':_0x5dde0c(0x1cd)};return{'state':_0x5dde0c(0x1b7),'reason':_0x3f8ef8[_0x5dde0c(0x1c2)]};}export function inspectInstalledBuiltinSkillVersion(_0x1af748,_0x472bfb={}){const _0x441838=a344_0x569c36,_0x1e1a9d=installedSkillPath(_0x472bfb[_0x441838(0x1a7)]??homedir());if(_0x1e1a9d[_0x441838(0x1ac)]==='missing')return{'state':'missing','expectedVersion':_0x1af748,'repairCommand':REPAIR_COMMAND};if(_0x1e1a9d[_0x441838(0x1ac)]==='unverifiable')return{'state':_0x441838(0x1b7),'expectedVersion':_0x1af748,'reason':_0x1e1a9d[_0x441838(0x1c2)],'repairCommand':REPAIR_COMMAND};try{const _0x5b26d8=frontmatterValue(readFileSync(join(_0x1e1a9d[_0x441838(0x19c)],_0x441838(0x1ba)),_0x441838(0x1c7)),_0x441838(0x1a5));return{'state':_0x5b26d8===_0x1af748?'current':'version_mismatch','expectedVersion':_0x1af748,'skillVersion':_0x5b26d8,'installedPath':_0x1e1a9d['path'],'repairCommand':REPAIR_COMMAND};}catch(_0x556c7a){return{'state':_0x441838(0x1b7),'expectedVersion':_0x1af748,'installedPath':_0x1e1a9d['path'],'reason':_0x556c7a instanceof Error?_0x556c7a[_0x441838(0x1de)]:String(_0x556c7a),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x139ec2={}){const _0x1bc47f=a344_0x569c36,_0x149ca7=_0x139ec2['packageRoot']??DEFAULT_PACKAGE_ROOT;let _0x54fb03;try{_0x54fb03=readSource(_0x149ca7);}catch(_0xfb2038){return{'state':_0x1bc47f(0x1b7),'packageVersion':_0x1bc47f(0x1bb),'reason':_0xfb2038 instanceof Error?_0xfb2038[_0x1bc47f(0x1de)]:String(_0xfb2038),'repairCommand':REPAIR_COMMAND};}const _0x44ab7a=installedSkillPath(_0x139ec2['home']??homedir());if(_0x44ab7a[_0x1bc47f(0x1ac)]===_0x1bc47f(0x1cd))return{'state':_0x1bc47f(0x1cd),'packageVersion':_0x54fb03[_0x1bc47f(0x1be)],'repairCommand':REPAIR_COMMAND};if(_0x44ab7a[_0x1bc47f(0x1ac)]===_0x1bc47f(0x1b7))return{'state':_0x1bc47f(0x1b7),'packageVersion':_0x54fb03['packageVersion'],'reason':_0x44ab7a[_0x1bc47f(0x1c2)],'repairCommand':REPAIR_COMMAND};try{const _0x229361=frontmatterValue(readFileSync(join(_0x44ab7a[_0x1bc47f(0x19c)],_0x1bc47f(0x1ba)),_0x1bc47f(0x1c7)),_0x1bc47f(0x1a5));if(_0x229361!==_0x54fb03[_0x1bc47f(0x19b)])return{'state':'version_mismatch','packageVersion':_0x54fb03['packageVersion'],'skillVersion':_0x229361,'installedPath':_0x44ab7a[_0x1bc47f(0x19c)],'repairCommand':REPAIR_COMMAND};const _0x3cf485=listFiles(_0x44ab7a[_0x1bc47f(0x19c)]),_0x6efe23=digestFiles(_0x44ab7a[_0x1bc47f(0x19c)],_0x3cf485);return{'state':sameFiles(_0x3cf485,_0x54fb03[_0x1bc47f(0x1a6)][_0x1bc47f(0x1c0)])&&_0x6efe23===_0x54fb03['manifest'][_0x1bc47f(0x1a0)]?_0x1bc47f(0x1cc):_0x1bc47f(0x1cf),'packageVersion':_0x54fb03[_0x1bc47f(0x1be)],'skillVersion':_0x229361,'installedPath':_0x44ab7a['path'],'digest':_0x6efe23,'repairCommand':REPAIR_COMMAND};}catch(_0x559704){return{'state':_0x1bc47f(0x1b7),'packageVersion':_0x54fb03[_0x1bc47f(0x1be)],'installedPath':_0x44ab7a[_0x1bc47f(0x19c)],'reason':_0x559704 instanceof Error?_0x559704[_0x1bc47f(0x1de)]:String(_0x559704),'repairCommand':REPAIR_COMMAND};}}function failure(_0x52565e,_0x3b6ad1,_0x4d9ebb,_0x5749d5){const _0x41bc07=a344_0x569c36;return{'ok':![],'code':_0x52565e,'packageVersion':_0x3b6ad1['packageVersion'],'skillVersion':_0x3b6ad1[_0x41bc07(0x19b)],'installedPath':_0x5749d5,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x4d9ebb instanceof Error?_0x4d9ebb[_0x41bc07(0x1de)]:String(_0x4d9ebb)};}export function installBuiltinSkill(_0x3175ad={}){const _0x302104=a344_0x569c36,_0x47b993=_0x3175ad['packageRoot']??DEFAULT_PACKAGE_ROOT,_0x3e082b=_0x3175ad[_0x302104(0x1a7)]??homedir();let _0x21ef3c;try{_0x21ef3c=readSource(_0x47b993);}catch(_0x582de2){return failure('SOURCE_INVALID',{'packageVersion':'unknown','skillVersion':_0x302104(0x1bb)},_0x582de2);}const _0x5d05a3=inspectBuiltinSkill({'packageRoot':_0x47b993,'home':_0x3e082b}),_0x3dacce=runNpxSkillsAddGlobal(_0x47b993,_0x21ef3c[_0x302104(0x1ce)],{'stdio':_0x3175ad['stdio']??_0x302104(0x1da),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x3e082b}});if(_0x3dacce['skipped'])return{'ok':!![],'packageVersion':_0x21ef3c[_0x302104(0x1be)],'skillVersion':_0x21ef3c[_0x302104(0x19b)],'installedPath':_0x5d05a3[_0x302104(0x1c3)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x3dacce['ok'])return failure(_0x302104(0x1ca),_0x21ef3c,_0x3dacce[_0x302104(0x19e)]??_0x302104(0x1a4)+_0x3dacce[_0x302104(0x1c5)]);const _0x344404=inspectBuiltinSkill({'packageRoot':_0x47b993,'home':_0x3e082b});if(_0x344404[_0x302104(0x1ac)]!==_0x302104(0x1cc)){const _0x45ac7e=_0x344404[_0x302104(0x1c2)]??_0x302104(0x1b4)+_0x344404['state'];return failure(_0x302104(0x1c6),_0x21ef3c,_0x3dacce['partialFailure']?_0x45ac7e+'\x0a'+_0x3dacce['partialFailure'][_0x302104(0x1d5)]:_0x45ac7e,_0x344404[_0x302104(0x1c3)]);}return _0x3dacce['partialFailure']&&(debug(_0x302104(0x1b2),_0x3dacce[_0x302104(0x1ad)]['output']),console[_0x302104(0x1db)]('CLI\x20Built-in\x20Skill\x20'+_0x21ef3c[_0x302104(0x19b)]+'\x20verified;\x20'+_0x3dacce[_0x302104(0x1ad)][_0x302104(0x1a9)]+_0x302104(0x1cb))),{'ok':!![],'packageVersion':_0x21ef3c['packageVersion'],'skillVersion':_0x21ef3c[_0x302104(0x19b)],'installedPath':_0x344404[_0x302104(0x1c3)],'changed':_0x5d05a3[_0x302104(0x1ac)]!==_0x302104(0x1cc),'repairCommand':REPAIR_COMMAND};}
@@ -1 +1 @@
1
- (function(_0x35acc4,_0xc71783){const _0x5ce0bd=a344_0x176a,_0x5a63bf=_0x35acc4();while(!![]){try{const _0x3f4d94=parseInt(_0x5ce0bd(0x11c))/0x1+parseInt(_0x5ce0bd(0x104))/0x2+-parseInt(_0x5ce0bd(0x11e))/0x3*(-parseInt(_0x5ce0bd(0x116))/0x4)+parseInt(_0x5ce0bd(0x10c))/0x5*(parseInt(_0x5ce0bd(0x100))/0x6)+-parseInt(_0x5ce0bd(0x10b))/0x7*(-parseInt(_0x5ce0bd(0x121))/0x8)+-parseInt(_0x5ce0bd(0x122))/0x9*(parseInt(_0x5ce0bd(0x113))/0xa)+-parseInt(_0x5ce0bd(0x118))/0xb;if(_0x3f4d94===_0xc71783)break;else _0x5a63bf['push'](_0x5a63bf['shift']());}catch(_0x5e7c65){_0x5a63bf['push'](_0x5a63bf['shift']());}}}(a344_0x1539,0x912d5));import{logger}from'../utils/logger.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a344_0x176a(_0x540945,_0x2de811){_0x540945=_0x540945-0xff;const _0x1539d8=a344_0x1539();let _0x176a3c=_0x1539d8[_0x540945];return _0x176a3c;}import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../skills/npx-skills-add.js';export function camelCaseFlagsToKebab(_0x55c171){const _0x5bc80f=a344_0x176a,_0x267ec6=[];for(const [_0x5a1751,_0x528b51]of Object['entries'](_0x55c171)){if(_0x528b51===!![]){const _0x4fcf42=_0x5a1751[_0x5bc80f(0x112)](/([A-Z])/g,_0x5bc80f(0x101))['toLowerCase']();_0x267ec6['push'](_0x4fcf42);}}return _0x267ec6;}export function parseDynamicFlags(){const _0x3a124c=a344_0x176a,_0x3f2847=[];for(let _0x297a58=0x3;_0x297a58<process[_0x3a124c(0x108)][_0x3a124c(0x103)];_0x297a58++){const _0x36c3f6=process['argv'][_0x297a58];if(_0x36c3f6&&_0x36c3f6[_0x3a124c(0x10a)]('--')){const _0x7f47a4=_0x36c3f6[_0x3a124c(0x11f)](0x2);_0x7f47a4&&!_0x7f47a4[_0x3a124c(0x115)]('=')&&_0x3f2847[_0x3a124c(0x111)](_0x7f47a4);}}return _0x3f2847;}export function getAllProvidedFlags(_0x42679c){const _0xdcf6be=camelCaseFlagsToKebab(_0x42679c),_0x5ea755=parseDynamicFlags(),_0x1d6975=new Set([..._0xdcf6be,..._0x5ea755]);return Array['from'](_0x1d6975);}export function normalizeLegacyBffSaveFlags(_0xf4d1ee){const _0x3ca74f=a344_0x176a,_0xe4bcd0=new Set(_0xf4d1ee);return _0xe4bcd0[_0x3ca74f(0x114)](_0x3ca74f(0x120))&&_0xe4bcd0[_0x3ca74f(0x10d)]('enable-bff-save'),Array[_0x3ca74f(0x102)](_0xe4bcd0);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;function a344_0x1539(){const _0x112fb0=['-$1','from','length','748852ZdjYWo','help','Unsupported\x20command:\x20','exit','argv','\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','startsWith','91OjwMkI','5aHrCyG','add','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','\x0aAvailable\x20commands:','log','push','replace','20990FeLIHO','has','includes','8SdRapl','skill','18218442fQToPW','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20','--help','(empty)','1144677lELPoR','cwd','477768BjMjHe','slice','dangerously-bff-save','197584MnWDoi','801DHcctr','error','1673934vIlMuX'];a344_0x1539=function(){return _0x112fb0;};return a344_0x1539();}export async function skillsCommand(_0x53f232,_0x284312,_0x3bb8d9){const _0x41b968=a344_0x176a;logger['setLogPath'](process[_0x41b968(0x11d)]());if(_0x3bb8d9?.[_0x41b968(0x105)]||_0x53f232===_0x41b968(0x11a)){showHelp();return;}console[_0x41b968(0xff)]('Error:\x20Unsupported\x20command:\x20'+(_0x53f232||_0x41b968(0x11b))),console[_0x41b968(0x110)](_0x41b968(0x10f)),console[_0x41b968(0x110)]('\x20\x20'+CLI_BIN_NAME+_0x41b968(0x10e)),console['log'](''),console[_0x41b968(0x110)]('Public\x20Open\x20Skill\x20source:\x20'+SKILLS_INSTALL_COMMAND_LINE),logger[_0x41b968(0xff)](_0x41b968(0x117),_0x41b968(0x106)+_0x53f232),process[_0x41b968(0x107)](0x1);}function showHelp(){const _0x405203=a344_0x176a;console[_0x405203(0x110)]('\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20'+CLI_BIN_NAME+_0x405203(0x119)+SKILLS_INSTALL_COMMAND_LINE+_0x405203(0x109));}
1
+ (function(_0x54cfb1,_0x265780){const _0x551238=a345_0x53f4,_0x28afb9=_0x54cfb1();while(!![]){try{const _0x46950f=parseInt(_0x551238(0x11c))/0x1+-parseInt(_0x551238(0x116))/0x2+-parseInt(_0x551238(0x113))/0x3*(parseInt(_0x551238(0x107))/0x4)+parseInt(_0x551238(0x105))/0x5+-parseInt(_0x551238(0x10b))/0x6+-parseInt(_0x551238(0x114))/0x7+-parseInt(_0x551238(0x10a))/0x8*(-parseInt(_0x551238(0x115))/0x9);if(_0x46950f===_0x265780)break;else _0x28afb9['push'](_0x28afb9['shift']());}catch(_0x2fa852){_0x28afb9['push'](_0x28afb9['shift']());}}}(a345_0x5cae,0x43917));function a345_0x53f4(_0x23c085,_0x1939f4){_0x23c085=_0x23c085-0xfd;const _0x5cae12=a345_0x5cae();let _0x53f4b7=_0x5cae12[_0x23c085];return _0x53f4b7;}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(_0x5d6253){const _0x57f7bf=a345_0x53f4,_0x2efe39=[];for(const [_0x24cc69,_0x243243]of Object['entries'](_0x5d6253)){if(_0x243243===!![]){const _0x466331=_0x24cc69[_0x57f7bf(0x10e)](/([A-Z])/g,'-$1')[_0x57f7bf(0x108)]();_0x2efe39[_0x57f7bf(0xff)](_0x466331);}}return _0x2efe39;}export function parseDynamicFlags(){const _0x2cae4e=a345_0x53f4,_0x28a380=[];for(let _0x12ccf3=0x3;_0x12ccf3<process[_0x2cae4e(0x103)][_0x2cae4e(0x112)];_0x12ccf3++){const _0x307f68=process[_0x2cae4e(0x103)][_0x12ccf3];if(_0x307f68&&_0x307f68[_0x2cae4e(0x104)]('--')){const _0x5dd630=_0x307f68[_0x2cae4e(0x100)](0x2);_0x5dd630&&!_0x5dd630['includes']('=')&&_0x28a380[_0x2cae4e(0xff)](_0x5dd630);}}return _0x28a380;}export function getAllProvidedFlags(_0x14d876){const _0x1536f5=camelCaseFlagsToKebab(_0x14d876),_0x3d750c=parseDynamicFlags(),_0x289845=new Set([..._0x1536f5,..._0x3d750c]);return Array['from'](_0x289845);}export function normalizeLegacyBffSaveFlags(_0x1f7673){const _0x192c01=a345_0x53f4,_0x38269b=new Set(_0x1f7673);return _0x38269b[_0x192c01(0x119)]('dangerously-bff-save')&&_0x38269b[_0x192c01(0x10d)](_0x192c01(0x118)),Array['from'](_0x38269b);}const SKILLS_INSTALL_COMMAND_LINE=NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE;export async function skillsCommand(_0x3442c8,_0x1b4d8f,_0x8485c6){const _0x26ed5e=a345_0x53f4;logger[_0x26ed5e(0xfe)](process['cwd']());if(_0x8485c6?.[_0x26ed5e(0x117)]||_0x3442c8===_0x26ed5e(0x11b)){showHelp();return;}console[_0x26ed5e(0x110)](_0x26ed5e(0x111)+(_0x3442c8||'(empty)')),console[_0x26ed5e(0x109)]('\x0aAvailable\x20commands:'),console['log']('\x20\x20'+CLI_BIN_NAME+_0x26ed5e(0x11a)),console[_0x26ed5e(0x109)](''),console[_0x26ed5e(0x109)](_0x26ed5e(0x101)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x26ed5e(0x110)](_0x26ed5e(0x10f),'Unsupported\x20command:\x20'+_0x3442c8),process[_0x26ed5e(0xfd)](0x1);}function a345_0x5cae(){const _0xb38468=['\x0aRabetbase\x20CLI\x20Skill\x20-\x20Developer\x20Workflow\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20','add','replace','skill','error','Error:\x20Unsupported\x20command:\x20','length','3TLodaM','1733851WMttCO','9NtwZtU','200556GOevUI','help','enable-bff-save','has','\x20cli-skill\x20install\x20\x20\x20\x20\x20\x20\x20#\x20Install\x20CLI\x20Built-in\x20Skill','--help','51882jYiSbR','exit','setLogPath','push','slice','Public\x20Open\x20Skill\x20source:\x20','\x0a\x0aNote:\x20cli-skill\x20install\x20uses\x20the\x20npm\x20package-local\x20Skill;\x20the\x20public\x20source\x20is\x20an\x20optional\x20latest\x20mirror.\x0a','argv','startsWith','1702180BOxtvU','\x20cli-skill\x20install\x0a\x0aPublic\x20Open\x20Skill\x20source:\x20','407944kvctXk','toLowerCase','log','6169312GELVED','2620596UrnUhi'];a345_0x5cae=function(){return _0xb38468;};return a345_0x5cae();}function showHelp(){const _0x4daf14=a345_0x53f4;console[_0x4daf14(0x109)](_0x4daf14(0x10c)+CLI_BIN_NAME+_0x4daf14(0x106)+SKILLS_INSTALL_COMMAND_LINE+_0x4daf14(0x102));}
@@ -1 +1 @@
1
- const a345_0x195334=a345_0x30be;(function(_0x6beddf,_0x25dcdd){const _0x556570=a345_0x30be,_0x59cbab=_0x6beddf();while(!![]){try{const _0x1c8fb5=parseInt(_0x556570(0x117))/0x1*(-parseInt(_0x556570(0x10f))/0x2)+parseInt(_0x556570(0xf3))/0x3*(-parseInt(_0x556570(0x10a))/0x4)+parseInt(_0x556570(0x112))/0x5*(-parseInt(_0x556570(0x124))/0x6)+-parseInt(_0x556570(0x104))/0x7+parseInt(_0x556570(0x119))/0x8*(-parseInt(_0x556570(0xfe))/0x9)+-parseInt(_0x556570(0x11b))/0xa+parseInt(_0x556570(0x106))/0xb;if(_0x1c8fb5===_0x25dcdd)break;else _0x59cbab['push'](_0x59cbab['shift']());}catch(_0x45823f){_0x59cbab['push'](_0x59cbab['shift']());}}}(a345_0x3f6b,0xa2d3a));import{execaSync}from'execa';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=a345_0x195334(0x120);export const NPX_SKILLS_SUBCOMMAND_ADD=a345_0x195334(0x113);export const NPX_SKILLS_FLAG_SKILL=a345_0x195334(0xfc);export const RABETBASE_SKILL_SOURCE=a345_0x195334(0xef);export const RABETBASE_GLOBAL_SKILL_NAME=a345_0x195334(0xfd);export const RABETBASE_SKILL_GIT_SOURCE=a345_0x195334(0x10b);export function resolveGlobalSkillName(_0x18329e){const _0x55ef0e=a345_0x195334;switch(_0x18329e[_0x55ef0e(0x10c)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x72c5d1){const _0x1db442=a345_0x195334,_0x433caa=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x72c5d1&&_0x433caa[_0x1db442(0x11f)](NPX_SKILLS_FLAG_SKILL,_0x72c5d1),_0x433caa;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a345_0x195334(0xfb),...buildNpxSkillsAddArgv()]['join']('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a345_0x195334(0xfb),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a345_0x195334(0xf8)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x48e8b0,_0x15d732,_0x174783){return{'ok':![],'status':_0x15d732,'code':_0x48e8b0,'error':'['+_0x48e8b0+']\x20'+_0x174783};}function a345_0x3f6b(){const _0x24a0d1=['git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','trim','\x22\x20install\x20state:\x20','SPAWN_FAILED','1350EgsTJW','presence','signal','125WARkVR','add','skill','failed','EPERM','1361VCPqcS','reason','2344llOCfx','inherit','127530PubSte','warn','PERMISSION_DENIED','CHILD_TERMINATED','push','skills@latest','INSTALL_PARTIAL','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','stderr','178152DgdblX','present','ENOENT','npx\x20failed\x20to\x20start','Installer\x20reported\x20','EACCES','log','Skill\x20\x22','CHILD_EXIT_NONZERO','state','lovrabet/rabetbase','SKILL_NOT_INSTALLED','message','pipe','234417IVaQSh','NPM_CONFIG_GLOBAL','exit\x20','\x20failed\x20target(s)','npm_config_global','join','stdio','unverifiable','npx','--skill','rabetbase','39987NVUKlR','npx\x20terminated\x20by\x20signal\x20','match','exitCode','!\x20Could\x20not\x20verify\x20\x22','filter','7954975vrlZQU','stdout','53427319XsuojB','partialFailure','shortMessage','code','4QJppbR'];a345_0x3f6b=function(){return _0x24a0d1;};return a345_0x3f6b();}function execaOptions(_0x43f990,_0x4b1d43){const _0x45b56a=a345_0x195334,_0x5a5681={...process.env};return delete _0x5a5681[_0x45b56a(0xf7)],delete _0x5a5681[_0x45b56a(0xf4)],{'cwd':_0x43f990,'stdio':_0x4b1d43,'env':_0x5a5681,'extendEnv':![],'shell':![],'reject':![],..._0x4b1d43===_0x45b56a(0xf2)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0x40f73c,_0x2c5e42,_0x469fd3){const _0x13db64=a345_0x195334,_0x59cb19=[_0x40f73c[_0x13db64(0x105)]?String(_0x40f73c[_0x13db64(0x105)]):'',_0x40f73c[_0x13db64(0x123)]?String(_0x40f73c['stderr']):''][_0x13db64(0x103)](Boolean)[_0x13db64(0xf8)]('\x0a')['trim'](),_0xf1f2b5=_0x40f73c[_0x13db64(0x101)]??null;if(_0x40f73c[_0x13db64(0x109)]){const _0x319dfb=_0x40f73c[_0x13db64(0x109)]===_0x13db64(0xe7)?'NPX_NOT_FOUND':_0x40f73c[_0x13db64(0x109)]===_0x13db64(0x116)||_0x40f73c['code']===_0x13db64(0xea)?_0x13db64(0x11d):_0x13db64(0x10e);return failure(_0x319dfb,_0xf1f2b5,_0x40f73c['shortMessage']??_0x40f73c[_0x13db64(0xf1)]??_0x40f73c['code']);}if(_0x40f73c['signal'])return failure(_0x13db64(0x11e),_0xf1f2b5,_0x13db64(0xff)+_0x40f73c[_0x13db64(0x111)]);if(_0x40f73c[_0x13db64(0x115)]&&_0xf1f2b5===null)return failure(_0x13db64(0x10e),_0xf1f2b5,_0x40f73c['shortMessage']??_0x40f73c[_0x13db64(0xf1)]??_0x13db64(0xe8));if(_0xf1f2b5!==0x0)return failure(_0x13db64(0xed),_0xf1f2b5,_0x59cb19||_0x40f73c[_0x13db64(0x108)]||_0x13db64(0xf5)+(_0xf1f2b5??'unknown'));const _0x778d6a=_0x2c5e42?resolveInstalledSkill(_0x2c5e42,_0x469fd3):undefined,_0x1c5683=_0x59cb19[_0x13db64(0x100)](/Failed to install\s+(\d+)/i);if(_0x1c5683&&Number(_0x1c5683[0x1])>0x0){const _0x90d312=_0x13db64(0xe9)+_0x1c5683[0x1]+_0x13db64(0xf6)+(_0x59cb19?':\x0a'+_0x59cb19:'');if(_0x778d6a?.[_0x13db64(0xee)]===_0x13db64(0x125))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x1c5683[0x1]),'output':_0x59cb19}};return failure(_0x13db64(0x121),0x0,_0x90d312);}if(_0x778d6a){if(_0x778d6a[_0x13db64(0xee)]==='absent')return failure(_0x13db64(0xf0),0x0,_0x13db64(0xec)+_0x2c5e42+_0x13db64(0x122)+_0x778d6a['checked']['join'](',\x20')+')');_0x778d6a[_0x13db64(0xee)]===_0x13db64(0xfa)&&console[_0x13db64(0x11c)](_0x13db64(0x102)+_0x2c5e42+_0x13db64(0x10d)+_0x778d6a[_0x13db64(0x118)]);}return{'ok':!![],'status':0x0};}function a345_0x30be(_0x67e85f,_0x244f6c){_0x67e85f=_0x67e85f-0xe7;const _0x3f6bb6=a345_0x3f6b();let _0x30bea6=_0x3f6bb6[_0x67e85f];return _0x30bea6;}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x530e91,_0x48022b){const _0x2bda85=a345_0x195334;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x49f960=_0x48022b?.[_0x2bda85(0xf9)]??_0x2bda85(0x11a),_0x3aa900=buildNpxSkillsAddArgv(_0x48022b?.[_0x2bda85(0x114)]),_0x28f23e=['npx',..._0x3aa900]['join']('\x20');console[_0x2bda85(0xeb)]('*\x20'+_0x28f23e);const _0x54fa60=execaSync('npx',_0x3aa900,execaOptions(_0x530e91,_0x49f960));return normalizeExecaResult(_0x54fa60);}export function runNpxSkillsAddGlobal(_0x4307c6,_0x3551d6,_0x58ec76){const _0x338b5d=a345_0x195334;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3bd0c6=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3551d6,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x1c1621=[_0x338b5d(0xfb),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3551d6,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x338b5d(0xf8)]('\x20');console[_0x338b5d(0xeb)]('*\x20'+_0x1c1621);const _0x22b1a5=execaSync(_0x338b5d(0xfb),_0x3bd0c6,execaOptions(_0x4307c6,_0x338b5d(0xf2))),_0x454c76=normalizeExecaResult(_0x22b1a5,_0x58ec76?.['expectedSkillName']??resolveGlobalSkillName(_0x3551d6),_0x58ec76?.[_0x338b5d(0x110)]);if(_0x58ec76?.['stdio']!==_0x338b5d(0xf2)&&!_0x454c76[_0x338b5d(0x107)]){const _0x1c0256=[_0x22b1a5[_0x338b5d(0x105)],_0x22b1a5[_0x338b5d(0x123)]][_0x338b5d(0x103)](Boolean)[_0x338b5d(0xf8)]('\x0a')[_0x338b5d(0x10c)]();if(_0x1c0256)console[_0x338b5d(0xeb)](_0x1c0256);}return _0x454c76;}
1
+ function a346_0x3bca(_0x5624db,_0x2e98f7){_0x5624db=_0x5624db-0x1e9;const _0x4073d8=a346_0x4073();let _0x3bca58=_0x4073d8[_0x5624db];return _0x3bca58;}const a346_0x42524e=a346_0x3bca;(function(_0x4acd03,_0x37f7a1){const _0x49dc1b=a346_0x3bca,_0x337491=_0x4acd03();while(!![]){try{const _0x40e93e=parseInt(_0x49dc1b(0x208))/0x1+parseInt(_0x49dc1b(0x1eb))/0x2+-parseInt(_0x49dc1b(0x218))/0x3+-parseInt(_0x49dc1b(0x201))/0x4*(-parseInt(_0x49dc1b(0x225))/0x5)+parseInt(_0x49dc1b(0x200))/0x6+parseInt(_0x49dc1b(0x20c))/0x7*(parseInt(_0x49dc1b(0x1fe))/0x8)+-parseInt(_0x49dc1b(0x222))/0x9*(parseInt(_0x49dc1b(0x221))/0xa);if(_0x40e93e===_0x37f7a1)break;else _0x337491['push'](_0x337491['shift']());}catch(_0x1af8a5){_0x337491['push'](_0x337491['shift']());}}}(a346_0x4073,0xbc008));import{execaSync}from'execa';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=a346_0x42524e(0x204);export const NPX_SKILLS_SUBCOMMAND_ADD=a346_0x42524e(0x1f7);function a346_0x4073(){const _0x2069e7=['filter','failed','14yUklrN','code','join','NPX_NOT_FOUND','absent','ENOENT','stdout','presence','push','PERMISSION_DENIED','CHILD_EXIT_NONZERO','unknown','2470791aXbIFo','partialFailure','present','trim','CHILD_TERMINATED','reason','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','warn','inherit','6897790nwbuZK','45iCPQrS','NPM_CONFIG_GLOBAL','Installer\x20reported\x20','232930yALnCa','match','npx\x20failed\x20to\x20start','1311748CDdhaN','stdio','--skill','EPERM','pipe','\x20failed\x20target(s)','SPAWN_FAILED','npm_config_global','!\x20Could\x20not\x20verify\x20\x22','log','skill','npx','add','rabetbase','git@codeup.aliyun.com:yuntoo/open/rabetbase-cli.git','npx\x20terminated\x20by\x20signal\x20','stderr','state','exitCode','5507184JPAaLZ','INSTALL_PARTIAL','7030956WwEnsx','76bWSTRx','lovrabet/rabetbase','shortMessage','skills@latest','EACCES','checked','message','952918kFAZIr','\x22\x20install\x20state:\x20'];a346_0x4073=function(){return _0x2069e7;};return a346_0x4073();}export const NPX_SKILLS_FLAG_SKILL=a346_0x42524e(0x1ed);export const RABETBASE_SKILL_SOURCE=a346_0x42524e(0x202);export const RABETBASE_GLOBAL_SKILL_NAME=a346_0x42524e(0x1f8);export const RABETBASE_SKILL_GIT_SOURCE=a346_0x42524e(0x1f9);export function resolveGlobalSkillName(_0x1d61bc){const _0x2c2a3c=a346_0x42524e;switch(_0x1d61bc[_0x2c2a3c(0x21b)]()){case RABETBASE_SKILL_SOURCE:case RABETBASE_SKILL_GIT_SOURCE:return RABETBASE_GLOBAL_SKILL_NAME;default:return undefined;}}export function buildNpxSkillsAddArgv(_0x11e57d){const _0x36e985=a346_0x42524e,_0x15ae62=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x11e57d&&_0x15ae62[_0x36e985(0x214)](NPX_SKILLS_FLAG_SKILL,_0x11e57d),_0x15ae62;}export const NPX_SKILLS_ADD_COMMAND_LINE=[a346_0x42524e(0x1f6),...buildNpxSkillsAddArgv()]['join']('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a346_0x42524e(0x1f6),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a346_0x42524e(0x20e)]('\x20');const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x19128a,_0x1885b7,_0x537170){return{'ok':![],'status':_0x1885b7,'code':_0x19128a,'error':'['+_0x19128a+']\x20'+_0x537170};}function execaOptions(_0xe8a08a,_0x5ed3f5){const _0x4e9afb=a346_0x42524e,_0xc71d37={...process.env};return delete _0xc71d37[_0x4e9afb(0x1f2)],delete _0xc71d37[_0x4e9afb(0x223)],{'cwd':_0xe8a08a,'stdio':_0x5ed3f5,'env':_0xc71d37,'extendEnv':![],'shell':![],'reject':![],..._0x5ed3f5===_0x4e9afb(0x1ef)?{'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}:{}};}function normalizeExecaResult(_0x51175b,_0x35490a,_0x5d999f){const _0x1849b9=a346_0x42524e,_0x11a028=[_0x51175b[_0x1849b9(0x212)]?String(_0x51175b[_0x1849b9(0x212)]):'',_0x51175b[_0x1849b9(0x1fb)]?String(_0x51175b[_0x1849b9(0x1fb)]):'']['filter'](Boolean)['join']('\x0a')[_0x1849b9(0x21b)](),_0x5908db=_0x51175b[_0x1849b9(0x1fd)]??null;if(_0x51175b[_0x1849b9(0x20d)]){const _0x273528=_0x51175b['code']===_0x1849b9(0x211)?_0x1849b9(0x20f):_0x51175b['code']===_0x1849b9(0x1ee)||_0x51175b[_0x1849b9(0x20d)]===_0x1849b9(0x205)?_0x1849b9(0x215):_0x1849b9(0x1f1);return failure(_0x273528,_0x5908db,_0x51175b['shortMessage']??_0x51175b[_0x1849b9(0x207)]??_0x51175b[_0x1849b9(0x20d)]);}if(_0x51175b['signal'])return failure(_0x1849b9(0x21c),_0x5908db,_0x1849b9(0x1fa)+_0x51175b['signal']);if(_0x51175b[_0x1849b9(0x20b)]&&_0x5908db===null)return failure(_0x1849b9(0x1f1),_0x5908db,_0x51175b[_0x1849b9(0x203)]??_0x51175b[_0x1849b9(0x207)]??_0x1849b9(0x1ea));if(_0x5908db!==0x0)return failure(_0x1849b9(0x216),_0x5908db,_0x11a028||_0x51175b[_0x1849b9(0x203)]||'exit\x20'+(_0x5908db??_0x1849b9(0x217)));const _0x270d25=_0x35490a?resolveInstalledSkill(_0x35490a,_0x5d999f):undefined,_0x3c7dbe=_0x11a028[_0x1849b9(0x1e9)](/Failed to install\s+(\d+)/i);if(_0x3c7dbe&&Number(_0x3c7dbe[0x1])>0x0){const _0x128710=_0x1849b9(0x224)+_0x3c7dbe[0x1]+_0x1849b9(0x1f0)+(_0x11a028?':\x0a'+_0x11a028:'');if(_0x270d25?.[_0x1849b9(0x1fc)]===_0x1849b9(0x21a))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x3c7dbe[0x1]),'output':_0x11a028}};return failure(_0x1849b9(0x1ff),0x0,_0x128710);}if(_0x270d25){if(_0x270d25[_0x1849b9(0x1fc)]===_0x1849b9(0x210))return failure('SKILL_NOT_INSTALLED',0x0,'Skill\x20\x22'+_0x35490a+_0x1849b9(0x21e)+_0x270d25[_0x1849b9(0x206)][_0x1849b9(0x20e)](',\x20')+')');_0x270d25[_0x1849b9(0x1fc)]==='unverifiable'&&console[_0x1849b9(0x21f)](_0x1849b9(0x1f3)+_0x35490a+_0x1849b9(0x209)+_0x270d25[_0x1849b9(0x21d)]);}return{'ok':!![],'status':0x0};}export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x3bdd59,_0xc4cbde){const _0x3fb02d=a346_0x42524e;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x294cd6=_0xc4cbde?.[_0x3fb02d(0x1ec)]??_0x3fb02d(0x220),_0x550c8c=buildNpxSkillsAddArgv(_0xc4cbde?.[_0x3fb02d(0x1f5)]),_0x131bee=['npx',..._0x550c8c]['join']('\x20');console[_0x3fb02d(0x1f4)]('*\x20'+_0x131bee);const _0x28f6ae=execaSync(_0x3fb02d(0x1f6),_0x550c8c,execaOptions(_0x3bdd59,_0x294cd6));return normalizeExecaResult(_0x28f6ae);}export function runNpxSkillsAddGlobal(_0x584c93,_0x1d92b9,_0x26dfd0){const _0x45c6b7=a346_0x42524e;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x13f411=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x1d92b9,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0xdc07=[_0x45c6b7(0x1f6),NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x1d92b9,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x45c6b7(0x20e)]('\x20');console[_0x45c6b7(0x1f4)]('*\x20'+_0xdc07);const _0x68b9d4=execaSync('npx',_0x13f411,execaOptions(_0x584c93,'pipe')),_0xf84988=normalizeExecaResult(_0x68b9d4,_0x26dfd0?.['expectedSkillName']??resolveGlobalSkillName(_0x1d92b9),_0x26dfd0?.[_0x45c6b7(0x213)]);if(_0x26dfd0?.['stdio']!==_0x45c6b7(0x1ef)&&!_0xf84988[_0x45c6b7(0x219)]){const _0x5ba018=[_0x68b9d4[_0x45c6b7(0x212)],_0x68b9d4[_0x45c6b7(0x1fb)]][_0x45c6b7(0x20a)](Boolean)['join']('\x0a')[_0x45c6b7(0x21b)]();if(_0x5ba018)console[_0x45c6b7(0x1f4)](_0x5ba018);}return _0xf84988;}
@@ -1 +1 @@
1
- const a346_0x45a6=a346_0x8e54;(function(_0x3068e3,_0x20f7f9){const _0x31e086=a346_0x8e54,_0x42a858=_0x3068e3();while(!![]){try{const _0x4c78ac=-parseInt(_0x31e086(0x10f))/0x1*(-parseInt(_0x31e086(0x109))/0x2)+-parseInt(_0x31e086(0x116))/0x3+parseInt(_0x31e086(0x10d))/0x4+-parseInt(_0x31e086(0x113))/0x5+parseInt(_0x31e086(0x10e))/0x6*(-parseInt(_0x31e086(0x108))/0x7)+-parseInt(_0x31e086(0x11b))/0x8+-parseInt(_0x31e086(0x112))/0x9*(-parseInt(_0x31e086(0xfa))/0xa);if(_0x4c78ac===_0x20f7f9)break;else _0x42a858['push'](_0x42a858['shift']());}catch(_0x1fe217){_0x42a858['push'](_0x42a858['shift']());}}}(a346_0x15ec,0xeb280));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a346_0x15ec(){const _0x230e0f=['reason','version','present','map','.skill-lock.json','SKILL.md','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','globalSkillsDirs','not-recorded','recorded','join','7xrgTbc','242FPEhzw','.agents','includes','object','1584692pIhTVA','6857778GyNXPV','5981Slopox','home','skills','53451TFTgqD','8542565IdnpQv','utf8','number','3900888yTMgup','parse','.claude','find','\x20is\x20unreadable:\x20','7331640gLOXra','absent','unusable','8270IVwNJk','unverifiable','\x20uses\x20unsupported\x20version\x20'];a346_0x15ec=function(){return _0x230e0f;};return a346_0x15ec();}export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a346_0x45a6(0x101));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a346_0x45a6(0x10a),a346_0x45a6(0x111)),join(a346_0x45a6(0x118),a346_0x45a6(0x111))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x3869b3,_0x5801af){const _0x595e06=a346_0x45a6;if(!existsSync(_0x3869b3))return{'kind':_0x595e06(0x105)};let _0x25f15e;try{_0x25f15e=JSON[_0x595e06(0x117)](readFileSync(_0x3869b3,_0x595e06(0x114)));}catch(_0x51355a){return{'kind':_0x595e06(0xf9),'reason':_0x3869b3+_0x595e06(0x11a)+_0x51355a['message']};}const _0x3de5aa=_0x25f15e;if(typeof _0x3de5aa?.[_0x595e06(0xfe)]!==_0x595e06(0x115)||!SUPPORTED_LOCK_VERSIONS[_0x595e06(0x10b)](_0x3de5aa[_0x595e06(0xfe)]))return{'kind':'unusable','reason':_0x3869b3+_0x595e06(0xfc)+String(_0x3de5aa?.['version'])};if(!_0x3de5aa[_0x595e06(0x111)]||typeof _0x3de5aa['skills']!==_0x595e06(0x10c))return{'kind':_0x595e06(0xf9),'reason':_0x3869b3+'\x20has\x20no\x20skills\x20map'};return _0x3de5aa['skills'][_0x5801af]?{'kind':'recorded'}:{'kind':'not-recorded'};}function a346_0x8e54(_0xb214f2,_0x58642b){_0xb214f2=_0xb214f2-0xf9;const _0x15ec93=a346_0x15ec();let _0x8e54be=_0x15ec93[_0xb214f2];return _0x8e54be;}export function resolveInstalledSkill(_0x2b227a,_0x1fb0fd){const _0x2782b6=a346_0x45a6,_0x45d93c=_0x1fb0fd?.[_0x2782b6(0x110)]??homedir(),_0x3d9051=_0x1fb0fd?.[_0x2782b6(0x104)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x2782b6(0x100)](_0x1ed62b=>join(_0x45d93c,_0x1ed62b)),_0x487183=_0x1fb0fd?.['lockFile']??join(_0x45d93c,SKILL_LOCK_RELATIVE_PATH),_0x13b3a8=_0x3d9051[_0x2782b6(0x100)](_0x40de30=>join(_0x40de30,_0x2b227a,_0x2782b6(0x102))),_0x4f7bb6=_0x13b3a8[_0x2782b6(0x119)](_0x4020e6=>existsSync(_0x4020e6));if(_0x4f7bb6)return{'state':_0x2782b6(0xff),'path':_0x4f7bb6};const _0x41f908=readLockLookup(_0x487183,_0x2b227a);if(_0x41f908['kind']===_0x2782b6(0xf9))return{'state':_0x2782b6(0xfb),'reason':_0x41f908[_0x2782b6(0xfd)]};if(_0x41f908['kind']===_0x2782b6(0x106))return{'state':'unverifiable','reason':_0x487183+'\x20records\x20\x22'+_0x2b227a+_0x2782b6(0x103)+('('+_0x13b3a8[_0x2782b6(0x107)](',\x20')+')')};return{'state':_0x2782b6(0x11c),'checked':_0x13b3a8};}
1
+ const a347_0x129d87=a347_0x4b60;(function(_0xd3664d,_0x4d3665){const _0xdef2e7=a347_0x4b60,_0x3368a7=_0xd3664d();while(!![]){try{const _0x5e179b=parseInt(_0xdef2e7(0x198))/0x1*(-parseInt(_0xdef2e7(0x17f))/0x2)+-parseInt(_0xdef2e7(0x19f))/0x3*(parseInt(_0xdef2e7(0x18a))/0x4)+-parseInt(_0xdef2e7(0x18c))/0x5*(parseInt(_0xdef2e7(0x191))/0x6)+-parseInt(_0xdef2e7(0x187))/0x7*(-parseInt(_0xdef2e7(0x188))/0x8)+-parseInt(_0xdef2e7(0x195))/0x9*(-parseInt(_0xdef2e7(0x189))/0xa)+parseInt(_0xdef2e7(0x186))/0xb+parseInt(_0xdef2e7(0x19d))/0xc;if(_0x5e179b===_0x4d3665)break;else _0x3368a7['push'](_0x3368a7['shift']());}catch(_0x2aed86){_0x3368a7['push'](_0x3368a7['shift']());}}}(a347_0x16f6,0x879b5));function a347_0x16f6(){const _0x328ea5=['version','\x20has\x20no\x20skills\x20map','7577372kZjoUw','2086CScBHb','12856YlXBIV','10eGWHuG','4xSLNxG','kind','4759955CLCcVW','find','utf8','reason','skills','6LNIHFF','recorded','lockFile','join','7715151cYNQWE','\x20is\x20unreadable:\x20','absent','1HqEbEU','unverifiable','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','not-recorded','SKILL.md','7782408cJibja','present','938754Zkpsin','\x20records\x20\x22','.agents','map','globalSkillsDirs','1706314WvvRQp','parse','unusable','home','\x20uses\x20unsupported\x20version\x20'];a347_0x16f6=function(){return _0x328ea5;};return a347_0x16f6();}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';function a347_0x4b60(_0x1e28c5,_0xd1ac43){_0x1e28c5=_0x1e28c5-0x17b;const _0x16f666=a347_0x16f6();let _0x4b6055=_0x16f666[_0x1e28c5];return _0x4b6055;}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents','.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a347_0x129d87(0x17c),'skills'),join('.claude',a347_0x129d87(0x190))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x82d8c3,_0x454dd1){const _0x4ee0d5=a347_0x129d87;if(!existsSync(_0x82d8c3))return{'kind':'not-recorded'};let _0x340e91;try{_0x340e91=JSON[_0x4ee0d5(0x180)](readFileSync(_0x82d8c3,_0x4ee0d5(0x18e)));}catch(_0x3cbb04){return{'kind':_0x4ee0d5(0x181),'reason':_0x82d8c3+_0x4ee0d5(0x196)+_0x3cbb04['message']};}const _0x4dedc1=_0x340e91;if(typeof _0x4dedc1?.['version']!=='number'||!SUPPORTED_LOCK_VERSIONS['includes'](_0x4dedc1['version']))return{'kind':'unusable','reason':_0x82d8c3+_0x4ee0d5(0x183)+String(_0x4dedc1?.[_0x4ee0d5(0x184)])};if(!_0x4dedc1['skills']||typeof _0x4dedc1['skills']!=='object')return{'kind':_0x4ee0d5(0x181),'reason':_0x82d8c3+_0x4ee0d5(0x185)};return _0x4dedc1[_0x4ee0d5(0x190)][_0x454dd1]?{'kind':_0x4ee0d5(0x192)}:{'kind':_0x4ee0d5(0x19b)};}export function resolveInstalledSkill(_0x4caa2c,_0x2d3a38){const _0x716517=a347_0x129d87,_0x49909a=_0x2d3a38?.[_0x716517(0x182)]??homedir(),_0x32c990=_0x2d3a38?.[_0x716517(0x17e)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x716517(0x17d)](_0x51c789=>join(_0x49909a,_0x51c789)),_0x54c338=_0x2d3a38?.[_0x716517(0x193)]??join(_0x49909a,SKILL_LOCK_RELATIVE_PATH),_0x48a930=_0x32c990[_0x716517(0x17d)](_0x3a7007=>join(_0x3a7007,_0x4caa2c,_0x716517(0x19c))),_0xd58a72=_0x48a930[_0x716517(0x18d)](_0x19d198=>existsSync(_0x19d198));if(_0xd58a72)return{'state':_0x716517(0x19e),'path':_0xd58a72};const _0x116cdf=readLockLookup(_0x54c338,_0x4caa2c);if(_0x116cdf['kind']===_0x716517(0x181))return{'state':_0x716517(0x199),'reason':_0x116cdf[_0x716517(0x18f)]};if(_0x116cdf[_0x716517(0x18b)]===_0x716517(0x192))return{'state':_0x716517(0x199),'reason':_0x54c338+_0x716517(0x17b)+_0x4caa2c+_0x716517(0x19a)+('('+_0x48a930[_0x716517(0x194)](',\x20')+')')};return{'state':_0x716517(0x197),'checked':_0x48a930};}
@@ -1 +1 @@
1
- (function(_0x1b6ac2,_0x54ee5e){const _0xf9b853=a347_0x2ee8,_0x1f5a13=_0x1b6ac2();while(!![]){try{const _0x5f0176=-parseInt(_0xf9b853(0x159))/0x1*(parseInt(_0xf9b853(0x150))/0x2)+-parseInt(_0xf9b853(0x15a))/0x3*(parseInt(_0xf9b853(0x160))/0x4)+-parseInt(_0xf9b853(0x15e))/0x5+-parseInt(_0xf9b853(0x154))/0x6+-parseInt(_0xf9b853(0x152))/0x7*(-parseInt(_0xf9b853(0x15c))/0x8)+parseInt(_0xf9b853(0x15d))/0x9*(-parseInt(_0xf9b853(0x162))/0xa)+parseInt(_0xf9b853(0x157))/0xb;if(_0x5f0176===_0x54ee5e)break;else _0x1f5a13['push'](_0x1f5a13['shift']());}catch(_0xefc488){_0x1f5a13['push'](_0x1f5a13['shift']());}}}(a347_0x55f2,0xbcb28));function a347_0x55f2(){const _0x326aca=['28685635AEwCoO','[REDACTED]','1zljVPa','723WhKXtz','flags','757640WWXhlB','279ZYOlUW','7021415aFnfQd','error','8036NiHmtk','entries','15470mRxJMI','438878LiuZOL','some','84OQBKUj','message','4892958xOAooF','durationMs','service'];a347_0x55f2=function(){return _0x326aca;};return a347_0x55f2();}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 isSensitiveKey(_0x47cf83){const _0x2c343c=a347_0x2ee8;return SENSITIVE_PATTERNS[_0x2c343c(0x151)](_0xb9788b=>_0xb9788b['test'](_0x47cf83));}function sanitizeFlags(_0x3f1b06){const _0x50c728=a347_0x2ee8,_0x1eb6f7={};for(const [_0x4fbd97,_0x124e1e]of Object[_0x50c728(0x161)](_0x3f1b06)){isSensitiveKey(_0x4fbd97)?_0x1eb6f7[_0x4fbd97]=_0x124e1e!=null&&_0x124e1e!==''?_0x50c728(0x158):_0x124e1e:_0x1eb6f7[_0x4fbd97]=_0x124e1e;}return _0x1eb6f7;}function a347_0x2ee8(_0x5a3e0f,_0x4d87d2){_0x5a3e0f=_0x5a3e0f-0x150;const _0x55f224=a347_0x55f2();let _0x2ee878=_0x55f224[_0x5a3e0f];return _0x2ee878;}export async function reportCommandTrace(_0x5daded){const _0x19ec91=a347_0x2ee8;try{const _0x1e6316=sanitizeFlags(_0x5daded[_0x19ec91(0x15b)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x5daded[_0x19ec91(0x156)],'command.name':_0x5daded['command'],'command.flags':JSON['stringify'](_0x1e6316),..._0x5daded[_0x19ec91(0x155)]!=null?{'command.duration_ms':_0x5daded[_0x19ec91(0x155)]}:{},..._0x5daded[_0x19ec91(0x15f)]?{'command.error':_0x5daded['error']instanceof Error?_0x5daded[_0x19ec91(0x15f)][_0x19ec91(0x153)]:String(_0x5daded[_0x19ec91(0x15f)])}:{}}});}catch{}}
1
+ (function(_0x53b0ec,_0x4cda87){const _0x594b4a=a348_0x4439,_0xb9ff04=_0x53b0ec();while(!![]){try{const _0x249abd=-parseInt(_0x594b4a(0x7d))/0x1*(parseInt(_0x594b4a(0x8b))/0x2)+-parseInt(_0x594b4a(0x7e))/0x3+parseInt(_0x594b4a(0x81))/0x4+parseInt(_0x594b4a(0x89))/0x5+-parseInt(_0x594b4a(0x87))/0x6+-parseInt(_0x594b4a(0x82))/0x7+parseInt(_0x594b4a(0x88))/0x8;if(_0x249abd===_0x4cda87)break;else _0xb9ff04['push'](_0xb9ff04['shift']());}catch(_0x2d87ae){_0xb9ff04['push'](_0xb9ff04['shift']());}}}(a348_0x188f,0xd71de));function a348_0x4439(_0x5c4ae0,_0x2bea70){_0x5c4ae0=_0x5c4ae0-0x7a;const _0x188fa7=a348_0x188f();let _0x4439e2=_0x188fa7[_0x5c4ae0];return _0x4439e2;}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 isSensitiveKey(_0x3db8f9){const _0x21e370=a348_0x4439;return SENSITIVE_PATTERNS[_0x21e370(0x85)](_0x9947dc=>_0x9947dc[_0x21e370(0x86)](_0x3db8f9));}function sanitizeFlags(_0x2dfdf3){const _0x103aaf=a348_0x4439,_0x7597c={};for(const [_0x55e97f,_0x42c889]of Object[_0x103aaf(0x80)](_0x2dfdf3)){isSensitiveKey(_0x55e97f)?_0x7597c[_0x55e97f]=_0x42c889!=null&&_0x42c889!==''?'[REDACTED]':_0x42c889:_0x7597c[_0x55e97f]=_0x42c889;}return _0x7597c;}export async function reportCommandTrace(_0x453d05){const _0x255392=a348_0x4439;try{const _0x179db8=sanitizeFlags(_0x453d05[_0x255392(0x7c)]);await sendCliTraceLog({'spanName':_0x255392(0x7b),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x453d05[_0x255392(0x84)],'command.name':_0x453d05[_0x255392(0x7a)],'command.flags':JSON[_0x255392(0x7f)](_0x179db8),..._0x453d05[_0x255392(0x8a)]!=null?{'command.duration_ms':_0x453d05[_0x255392(0x8a)]}:{},..._0x453d05['error']?{'command.error':_0x453d05[_0x255392(0x83)]instanceof Error?_0x453d05[_0x255392(0x83)]['message']:String(_0x453d05[_0x255392(0x83)])}:{}}});}catch{}}function a348_0x188f(){const _0x4924cd=['2081540LnYQtA','11252409RusxcY','error','service','some','test','9635910ToxOwt','26273464rJEDIy','5957460HVKcdX','durationMs','4MnjLCX','command','rabetbase.command','flags','66863woACFT','2303232CmeCal','stringify','entries'];a348_0x188f=function(){return _0x4924cd;};return a348_0x188f();}
@@ -1 +1 @@
1
- function a348_0x1d0b(_0x37bfbd,_0x2a388e){_0x37bfbd=_0x37bfbd-0x1ec;var _0x174fde=a348_0x174f();var _0x1d0bcd=_0x174fde[_0x37bfbd];return _0x1d0bcd;}(function(_0x5df99a,_0x2ddaf0){var _0x3b5804=a348_0x1d0b,_0x448208=_0x5df99a();while(!![]){try{var _0x391f8e=-parseInt(_0x3b5804(0x1f8))/0x1*(-parseInt(_0x3b5804(0x1f6))/0x2)+-parseInt(_0x3b5804(0x1f0))/0x3*(parseInt(_0x3b5804(0x1ec))/0x4)+-parseInt(_0x3b5804(0x1ef))/0x5*(parseInt(_0x3b5804(0x1f9))/0x6)+parseInt(_0x3b5804(0x1f4))/0x7*(-parseInt(_0x3b5804(0x1f1))/0x8)+-parseInt(_0x3b5804(0x1f3))/0x9+-parseInt(_0x3b5804(0x1f5))/0xa+parseInt(_0x3b5804(0x1f2))/0xb*(parseInt(_0x3b5804(0x1ed))/0xc);if(_0x391f8e===_0x2ddaf0)break;else _0x448208['push'](_0x448208['shift']());}catch(_0x59ae92){_0x448208['push'](_0x448208['shift']());}}}(a348_0x174f,0x1adc7));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a348_0x174f(){var _0x2bd953=['1551672TYNJTL','22InqVSe','1084680SqSfDN','7byiQzz','2075640CgPFfb','56mCpkXc','service','7405moQwUC','1620ABUVdC','672QFXAKR','3299532mnxOrh','error','1970NRAPeG','336tHbNHA'];a348_0x174f=function(){return _0x2bd953;};return a348_0x174f();}export async function reportCliHelpTrace(_0x55f068,_0x3dd534){var _0x39b066=a348_0x1d0b;try{await sendCliTraceLog({'spanName':'cli.help','logData':{'rabetbase.help.kind':_0x55f068,..._0x3dd534?.[_0x39b066(0x1f7)]&&{'rabetbase.help.service':_0x3dd534[_0x39b066(0x1f7)]}}});}catch(_0x1bc5b8){console[_0x39b066(0x1ee)]('Failed\x20to\x20report\x20CLI\x20help\x20trace:',_0x1bc5b8);}}
1
+ function a349_0x3bd1(_0x9aeac2,_0x8d7b6a){_0x9aeac2=_0x9aeac2-0x19d;var _0x1afffe=a349_0x1aff();var _0x3bd16a=_0x1afffe[_0x9aeac2];return _0x3bd16a;}function a349_0x1aff(){var _0x123a8d=['7698228GxcbOR','1515DwQrsR','Failed\x20to\x20report\x20CLI\x20help\x20trace:','1862AvEyRy','1308460kcKkvi','service','6091872nqiOoV','501766fBaYTc','14576888SeDmIe','18yzuenS','2903740DIbiuI'];a349_0x1aff=function(){return _0x123a8d;};return a349_0x1aff();}(function(_0x13edb0,_0x191b43){var _0x7e2737=a349_0x3bd1,_0xc28285=_0x13edb0();while(!![]){try{var _0x3aadd5=parseInt(_0x7e2737(0x19f))/0x1+parseInt(_0x7e2737(0x1a6))/0x2*(parseInt(_0x7e2737(0x1a4))/0x3)+-parseInt(_0x7e2737(0x1a3))/0x4+-parseInt(_0x7e2737(0x1a7))/0x5+-parseInt(_0x7e2737(0x19e))/0x6+-parseInt(_0x7e2737(0x1a2))/0x7+parseInt(_0x7e2737(0x1a0))/0x8*(parseInt(_0x7e2737(0x1a1))/0x9);if(_0x3aadd5===_0x191b43)break;else _0xc28285['push'](_0xc28285['shift']());}catch(_0x397a8d){_0xc28285['push'](_0xc28285['shift']());}}}(a349_0x1aff,0xf4152));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x12a22e,_0x4044a0){var _0x503a2b=a349_0x3bd1;try{await sendCliTraceLog({'spanName':'cli.help','logData':{'rabetbase.help.kind':_0x12a22e,..._0x4044a0?.[_0x503a2b(0x19d)]&&{'rabetbase.help.service':_0x4044a0[_0x503a2b(0x19d)]}}});}catch(_0x11a027){console['error'](_0x503a2b(0x1a5),_0x11a027);}}
@@ -1 +1 @@
1
- (function(_0x145b49,_0x203ef0){const _0xe96bdf=a349_0x11fa,_0x19da1d=_0x145b49();while(!![]){try{const _0x307cdd=-parseInt(_0xe96bdf(0x16a))/0x1+-parseInt(_0xe96bdf(0x175))/0x2*(-parseInt(_0xe96bdf(0x166))/0x3)+parseInt(_0xe96bdf(0x170))/0x4+-parseInt(_0xe96bdf(0x177))/0x5+-parseInt(_0xe96bdf(0x167))/0x6+-parseInt(_0xe96bdf(0x16c))/0x7*(parseInt(_0xe96bdf(0x168))/0x8)+-parseInt(_0xe96bdf(0x16f))/0x9*(-parseInt(_0xe96bdf(0x171))/0xa);if(_0x307cdd===_0x203ef0)break;else _0x19da1d['push'](_0x19da1d['shift']());}catch(_0x5178b2){_0x19da1d['push'](_0x19da1d['shift']());}}}(a349_0x4d2b,0x5975c));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x290eea=a349_0x11fa,_0x532631=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x382e30=_0x532631?.[_0x290eea(0x176)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x290eea(0x172)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x290eea(0x174):_0x290eea(0x16d))}),setUserContext({'id':_0x382e30?.['id'],'username':_0x382e30?.[_0x290eea(0x169)],'nickname':_0x382e30?.[_0x290eea(0x16e)],'email':_0x382e30?.[_0x290eea(0x16b)],'tenantCode':_0x382e30?.['tenant']?.[_0x290eea(0x173)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x532631;}function a349_0x11fa(_0x3d5c8c,_0x29f245){_0x3d5c8c=_0x3d5c8c-0x166;const _0x4d2bbc=a349_0x4d2b();let _0x11fa74=_0x4d2bbc[_0x3d5c8c];return _0x11fa74;}function a349_0x4d2b(){const _0x4b3c79=['unknown','tenant_code','daily','145814mIlSmo','user','2390440hojgfw','18ISfWNK','339420RezNNP','1305416kkKWnD','username','484217gQLgFH','email','28KxypME','production','nickname','693uiyYaf','1991408vzdZMw','143210IGVPMz'];a349_0x4d2b=function(){return _0x4b3c79;};return a349_0x4d2b();}
1
+ (function(_0x3e0d70,_0x2356ab){const _0x4a5e36=a350_0x42fe,_0x209629=_0x3e0d70();while(!![]){try{const _0x495bf1=parseInt(_0x4a5e36(0xde))/0x1*(-parseInt(_0x4a5e36(0xe0))/0x2)+parseInt(_0x4a5e36(0xeb))/0x3+-parseInt(_0x4a5e36(0xe3))/0x4*(-parseInt(_0x4a5e36(0xea))/0x5)+parseInt(_0x4a5e36(0xe4))/0x6+-parseInt(_0x4a5e36(0xec))/0x7*(parseInt(_0x4a5e36(0xe2))/0x8)+-parseInt(_0x4a5e36(0xdd))/0x9*(parseInt(_0x4a5e36(0xed))/0xa)+parseInt(_0x4a5e36(0xe6))/0xb;if(_0x495bf1===_0x2356ab)break;else _0x209629['push'](_0x209629['shift']());}catch(_0x43b0b7){_0x209629['push'](_0x209629['shift']());}}}(a350_0x2136,0x5268e));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';function a350_0x42fe(_0x14ced,_0x47bdb3){_0x14ced=_0x14ced-0xdb;const _0x2136d7=a350_0x2136();let _0x42fe2b=_0x2136d7[_0x14ced];return _0x42fe2b;}let cliOtelTraceInitialized=![];function a350_0x2136(){const _0x597942=['828MIIrgv','64369sDzIJl','username','6vhVIFd','unknown','1119832FLOHTJ','12pfqAzW','1613142YsJsPi','email','6273168UTLFbe','tenant_code','tenant','nickname','312530iNDmqk','686040mKtjBx','14mMVMbi','48340tZwSyT','user','daily'];a350_0x2136=function(){return _0x597942;};return a350_0x2136();}export async function ensureCliOtelTraceConfig(){const _0x218cc4=a350_0x42fe,_0x2377d4=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x5c6b59=_0x2377d4?.[_0x218cc4(0xdb)];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x218cc4(0xe1)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x218cc4(0xdc):'production')}),setUserContext({'id':_0x5c6b59?.['id'],'username':_0x5c6b59?.[_0x218cc4(0xdf)],'nickname':_0x5c6b59?.[_0x218cc4(0xe9)],'email':_0x5c6b59?.[_0x218cc4(0xe5)],'tenantCode':_0x5c6b59?.[_0x218cc4(0xe8)]?.[_0x218cc4(0xe7)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x2377d4;}
@@ -1 +1 @@
1
- (function(_0x216e9b,_0x13b4b0){const _0x2473c1=a350_0x53ad,_0x49b2df=_0x216e9b();while(!![]){try{const _0x3725c2=-parseInt(_0x2473c1(0xd3))/0x1*(-parseInt(_0x2473c1(0xd6))/0x2)+-parseInt(_0x2473c1(0xdd))/0x3*(parseInt(_0x2473c1(0xe0))/0x4)+-parseInt(_0x2473c1(0xdc))/0x5+-parseInt(_0x2473c1(0xd5))/0x6+-parseInt(_0x2473c1(0xd8))/0x7+parseInt(_0x2473c1(0xd7))/0x8*(-parseInt(_0x2473c1(0xe1))/0x9)+parseInt(_0x2473c1(0xd9))/0xa;if(_0x3725c2===_0x13b4b0)break;else _0x49b2df['push'](_0x49b2df['shift']());}catch(_0x3afcc3){_0x49b2df['push'](_0x49b2df['shift']());}}}(a350_0x51c3,0xbb792));function a350_0x51c3(){const _0x4bc49a=['8026764OZEBPX','1514wYUKbl','488AATrPQ','9970800wqgaQY','44979230QvwHav','beforeExit','once','4763870AncmQF','112551vZBpgx','SIGTERM','exit','76cvVYsZ','43029fRFeMl','1307fmbejL','then'];a350_0x51c3=function(){return _0x4bc49a;};return a350_0x51c3();}function a350_0x53ad(_0x3e5d0a,_0x95d4c3){_0x3e5d0a=_0x3e5d0a-0xd3;const _0x51c386=a350_0x51c3();let _0x53add5=_0x51c386[_0x3e5d0a];return _0x53add5;}import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x158e90=a350_0x53ad;process['once'](_0x158e90(0xda),()=>{void flushOtelNodeIfUsed();});const _0x2dbc53=()=>{const _0x14f072=_0x158e90;void flushOtelNodeIfUsed()[_0x14f072(0xd4)](()=>process[_0x14f072(0xdf)](0x0));};process['once']('SIGINT',_0x2dbc53),process[_0x158e90(0xdb)](_0x158e90(0xde),_0x2dbc53);}export async function exitWithOtelShutdown(_0x26f2ab){const _0x175bda=a350_0x53ad;await flushOtelNodeIfUsed(),process[_0x175bda(0xdf)](_0x26f2ab);}
1
+ (function(_0x2e321f,_0x3a7c3c){const _0x2d8e72=a351_0x1530,_0xc66c7d=_0x2e321f();while(!![]){try{const _0x2164ca=parseInt(_0x2d8e72(0x142))/0x1*(parseInt(_0x2d8e72(0x13e))/0x2)+parseInt(_0x2d8e72(0x140))/0x3*(parseInt(_0x2d8e72(0x149))/0x4)+-parseInt(_0x2d8e72(0x144))/0x5*(parseInt(_0x2d8e72(0x14a))/0x6)+-parseInt(_0x2d8e72(0x148))/0x7*(parseInt(_0x2d8e72(0x146))/0x8)+-parseInt(_0x2d8e72(0x14b))/0x9*(-parseInt(_0x2d8e72(0x141))/0xa)+-parseInt(_0x2d8e72(0x13c))/0xb*(parseInt(_0x2d8e72(0x14c))/0xc)+-parseInt(_0x2d8e72(0x13d))/0xd;if(_0x2164ca===_0x3a7c3c)break;else _0xc66c7d['push'](_0xc66c7d['shift']());}catch(_0x1f22b1){_0xc66c7d['push'](_0xc66c7d['shift']());}}}(a351_0x271f,0x5b7b6));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a351_0x271f(){const _0x4092eb=['3708910qQfrHt','1sohEtA','beforeExit','3723530tqitIi','SIGINT','56jwKkEY','once','253645ecHTKS','2805008gCuwtn','6kEJDwn','18oFCOGT','12geRTGy','97911sVTjkU','4584905RqBYbZ','583226Zpbzqe','exit','3ciRZfe'];a351_0x271f=function(){return _0x4092eb;};return a351_0x271f();}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x4a100d=a351_0x1530;process[_0x4a100d(0x147)](_0x4a100d(0x143),()=>{void flushOtelNodeIfUsed();});const _0x511d70=()=>{void flushOtelNodeIfUsed()['then'](()=>process['exit'](0x0));};process['once'](_0x4a100d(0x145),_0x511d70),process[_0x4a100d(0x147)]('SIGTERM',_0x511d70);}function a351_0x1530(_0x4c65b4,_0x5bd8f0){_0x4c65b4=_0x4c65b4-0x13c;const _0x271fd0=a351_0x271f();let _0x1530d4=_0x271fd0[_0x4c65b4];return _0x1530d4;}export async function exitWithOtelShutdown(_0x2b0cfe){const _0x800223=a351_0x1530;await flushOtelNodeIfUsed(),process[_0x800223(0x13f)](_0x2b0cfe);}
@@ -1 +1 @@
1
- function a351_0x3ce8(_0xd38cc8,_0x1914cf){_0xd38cc8=_0xd38cc8-0x105;const _0x140518=a351_0x1405();let _0x3ce8be=_0x140518[_0xd38cc8];return _0x3ce8be;}const a351_0x577b7c=a351_0x3ce8;(function(_0x1327cb,_0x20f8c7){const _0x4e4dd4=a351_0x3ce8,_0x5bd618=_0x1327cb();while(!![]){try{const _0x42ba89=parseInt(_0x4e4dd4(0x10d))/0x1+parseInt(_0x4e4dd4(0x10f))/0x2*(-parseInt(_0x4e4dd4(0x107))/0x3)+-parseInt(_0x4e4dd4(0x105))/0x4*(-parseInt(_0x4e4dd4(0x114))/0x5)+parseInt(_0x4e4dd4(0x109))/0x6*(parseInt(_0x4e4dd4(0x112))/0x7)+-parseInt(_0x4e4dd4(0x106))/0x8*(-parseInt(_0x4e4dd4(0x10b))/0x9)+parseInt(_0x4e4dd4(0x110))/0xa*(-parseInt(_0x4e4dd4(0x10c))/0xb)+parseInt(_0x4e4dd4(0x111))/0xc;if(_0x42ba89===_0x20f8c7)break;else _0x5bd618['push'](_0x5bd618['shift']());}catch(_0x2c0dda){_0x5bd618['push'](_0x5bd618['shift']());}}}(a351_0x1405,0x3bc79));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a351_0x1405(){const _0x223cbd=['6849yVGoIm','39314tNesbc','130073ceBvBV','manual','8124uRTZRa','340TclKYH','126144sSTWlT','69174eSZrSi','rabetbase-cli','30540fVPSwL','72ohYPbY','5024usdkFH','282jgKMmg','traceName','12USMgjI','traceparent'];a351_0x1405=function(){return _0x223cbd;};return a351_0x1405();}const DEFAULT_TRACE_NAME=a351_0x577b7c(0x113);export async function sendCliTraceLog(_0x5585b3){const _0x13c292=a351_0x577b7c;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x5585b3[_0x13c292(0x108)]??DEFAULT_TRACE_NAME,'version':_0x5585b3['version']??getCliVersion(),'spanName':_0x5585b3['spanName'],'eventType':_0x13c292(0x10e),'logData':_0x5585b3['logData'],..._0x5585b3[_0x13c292(0x10a)]&&{'traceparent':_0x5585b3[_0x13c292(0x10a)]}});}
1
+ const a352_0xb210f9=a352_0x5b64;(function(_0x2af914,_0x54b317){const _0x4b55f5=a352_0x5b64,_0x47d8e8=_0x2af914();while(!![]){try{const _0xa85763=parseInt(_0x4b55f5(0x143))/0x1*(-parseInt(_0x4b55f5(0x138))/0x2)+parseInt(_0x4b55f5(0x13e))/0x3*(-parseInt(_0x4b55f5(0x142))/0x4)+-parseInt(_0x4b55f5(0x135))/0x5*(-parseInt(_0x4b55f5(0x133))/0x6)+-parseInt(_0x4b55f5(0x136))/0x7+parseInt(_0x4b55f5(0x13f))/0x8+-parseInt(_0x4b55f5(0x139))/0x9+parseInt(_0x4b55f5(0x13a))/0xa;if(_0xa85763===_0x54b317)break;else _0x47d8e8['push'](_0x47d8e8['shift']());}catch(_0x2b0991){_0x47d8e8['push'](_0x47d8e8['shift']());}}}(a352_0x1bee,0xdce0a));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a352_0x5b64(_0x4e7162,_0x49a223){_0x4e7162=_0x4e7162-0x133;const _0x1beedd=a352_0x1bee();let _0x5b647c=_0x1beedd[_0x4e7162];return _0x5b647c;}function a352_0x1bee(){const _0x36d76f=['spanName','5FZmRcX','11787797gOmapN','traceName','2KIZzNG','13787001jgcEYb','38395360lCEeKd','logData','version','manual','3llioES','13484152DfOFrT','traceparent','rabetbase-cli','6824100EQxZEv','1266572KvlJZF','9408696jwMEMP'];a352_0x1bee=function(){return _0x36d76f;};return a352_0x1bee();}const DEFAULT_TRACE_NAME=a352_0xb210f9(0x141);export async function sendCliTraceLog(_0x4046d9){const _0x8e7c5f=a352_0xb210f9;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x4046d9[_0x8e7c5f(0x137)]??DEFAULT_TRACE_NAME,'version':_0x4046d9[_0x8e7c5f(0x13c)]??getCliVersion(),'spanName':_0x4046d9[_0x8e7c5f(0x134)],'eventType':_0x8e7c5f(0x13d),'logData':_0x4046d9[_0x8e7c5f(0x13b)],..._0x4046d9[_0x8e7c5f(0x140)]&&{'traceparent':_0x4046d9[_0x8e7c5f(0x140)]}});}
@@ -1 +1 @@
1
- const a352_0x1cadbf=a352_0x586f;(function(_0x3d0b63,_0x9a3cb7){const _0x4bd71b=a352_0x586f,_0x16eb8e=_0x3d0b63();while(!![]){try{const _0x3e9ef1=parseInt(_0x4bd71b(0xcb))/0x1*(-parseInt(_0x4bd71b(0xd0))/0x2)+-parseInt(_0x4bd71b(0xc7))/0x3+parseInt(_0x4bd71b(0xd6))/0x4*(parseInt(_0x4bd71b(0xd1))/0x5)+-parseInt(_0x4bd71b(0xc9))/0x6*(parseInt(_0x4bd71b(0xcd))/0x7)+parseInt(_0x4bd71b(0xd4))/0x8*(-parseInt(_0x4bd71b(0xc5))/0x9)+parseInt(_0x4bd71b(0xd5))/0xa*(-parseInt(_0x4bd71b(0xca))/0xb)+-parseInt(_0x4bd71b(0xcc))/0xc*(-parseInt(_0x4bd71b(0xce))/0xd);if(_0x3e9ef1===_0x9a3cb7)break;else _0x16eb8e['push'](_0x16eb8e['shift']());}catch(_0x229ca2){_0x16eb8e['push'](_0x16eb8e['shift']());}}}(a352_0x1429,0x5bf67));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME='platform-issue-log-collect';export const PLATFORM_ISSUE_SPAN_NAME=a352_0x1cadbf(0xcf);function a352_0x1429(){const _0x4e6183=['sanitize','2196QSagXv','62832mXIStK','8jneBKf','48GBFEcm','3696NLduWG','5173688CkgVso','issue.log.collect','19828daoUmz','5sRllcm','title','redactionKinds','1877032kxIawR','1140OBaDds','2038888rKwADU','9VjHXty','join','1699770zAAKuB'];a352_0x1429=function(){return _0x4e6183;};return a352_0x1429();}function a352_0x586f(_0x19e624,_0x57a0b2){_0x19e624=_0x19e624-0xc5;const _0x1429f4=a352_0x1429();let _0x586f73=_0x1429f4[_0x19e624];return _0x586f73;}export async function sendPlatformIssueCollectLog(_0x359eed){const _0x4d2ad2=a352_0x1cadbf;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x359eed[_0x4d2ad2(0xd2)],'issue.description':_0x359eed['description'],..._0x359eed['sanitize']?{'issue.description_original_bytes':_0x359eed[_0x4d2ad2(0xc8)]['originalBytes'],'issue.description_truncated':_0x359eed[_0x4d2ad2(0xc8)]['truncated'],'issue.description_redactions':_0x359eed['sanitize']['redactionCount'],'issue.description_redaction_kinds':_0x359eed[_0x4d2ad2(0xc8)][_0x4d2ad2(0xd3)][_0x4d2ad2(0xc6)](',')}:{}}});}
1
+ const a353_0x476492=a353_0xc20a;(function(_0x5eea3c,_0x135282){const _0x476667=a353_0xc20a,_0x39e63b=_0x5eea3c();while(!![]){try{const _0x34fe2b=-parseInt(_0x476667(0x1a7))/0x1*(-parseInt(_0x476667(0x19f))/0x2)+parseInt(_0x476667(0x1a3))/0x3+-parseInt(_0x476667(0x1a2))/0x4*(parseInt(_0x476667(0x1ae))/0x5)+-parseInt(_0x476667(0x1a8))/0x6+parseInt(_0x476667(0x1ac))/0x7+parseInt(_0x476667(0x1a0))/0x8+-parseInt(_0x476667(0x1a5))/0x9;if(_0x34fe2b===_0x135282)break;else _0x39e63b['push'](_0x39e63b['shift']());}catch(_0x3d7aca){_0x39e63b['push'](_0x39e63b['shift']());}}}(a353_0x5487,0xa328a));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a353_0x5487(){const _0x3e1b6b=['1tJPzYp','4252512FFnNQO','truncated','redactionCount','platform-issue-log-collect','4290027BUQSYP','sanitize','57590TdMmLm','issue.log.collect','description','2518258XqdXON','5432392qpyZTN','originalBytes','20TiMdGZ','1909872CxVImH','title','15777207oJqEVV','join'];a353_0x5487=function(){return _0x3e1b6b;};return a353_0x5487();}export const PLATFORM_ISSUE_TRACE_NAME=a353_0x476492(0x1ab);export const PLATFORM_ISSUE_SPAN_NAME=a353_0x476492(0x1af);function a353_0xc20a(_0x15d813,_0xe4aaed){_0x15d813=_0x15d813-0x19f;const _0x548716=a353_0x5487();let _0xc20a15=_0x548716[_0x15d813];return _0xc20a15;}export async function sendPlatformIssueCollectLog(_0x21ba5c){const _0x36c13b=a353_0x476492;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x21ba5c[_0x36c13b(0x1a4)],'issue.description':_0x21ba5c[_0x36c13b(0x1b0)],..._0x21ba5c[_0x36c13b(0x1ad)]?{'issue.description_original_bytes':_0x21ba5c[_0x36c13b(0x1ad)][_0x36c13b(0x1a1)],'issue.description_truncated':_0x21ba5c[_0x36c13b(0x1ad)][_0x36c13b(0x1a9)],'issue.description_redactions':_0x21ba5c[_0x36c13b(0x1ad)][_0x36c13b(0x1aa)],'issue.description_redaction_kinds':_0x21ba5c[_0x36c13b(0x1ad)]['redactionKinds'][_0x36c13b(0x1a6)](',')}:{}}});}
@@ -1 +1 @@
1
- function a354_0x2c03(_0xae5949,_0x145477){_0xae5949=_0xae5949-0x1ac;const _0x5dae07=a354_0x5dae();let _0x2c034d=_0x5dae07[_0xae5949];return _0x2c034d;}const a354_0x432ca2=a354_0x2c03;(function(_0xc275dd,_0x3d6c5f){const _0x2806c4=a354_0x2c03,_0x4a8497=_0xc275dd();while(!![]){try{const _0x511c3f=parseInt(_0x2806c4(0x1d3))/0x1+parseInt(_0x2806c4(0x1ad))/0x2+parseInt(_0x2806c4(0x1bb))/0x3+-parseInt(_0x2806c4(0x1cb))/0x4*(parseInt(_0x2806c4(0x1d0))/0x5)+-parseInt(_0x2806c4(0x1dd))/0x6*(parseInt(_0x2806c4(0x1cc))/0x7)+-parseInt(_0x2806c4(0x1b1))/0x8*(-parseInt(_0x2806c4(0x1b6))/0x9)+parseInt(_0x2806c4(0x1b4))/0xa*(parseInt(_0x2806c4(0x1d8))/0xb);if(_0x511c3f===_0x3d6c5f)break;else _0x4a8497['push'](_0x4a8497['shift']());}catch(_0x3efcc1){_0x4a8497['push'](_0x4a8497['shift']());}}}(a354_0x5dae,0xc20c1));export const CORE_IDE_CONFIGS={'cursor':{'name':a354_0x432ca2(0x1b9),'description':a354_0x432ca2(0x1bf),'folders':[a354_0x432ca2(0x1b5),a354_0x432ca2(0x1da)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1d1)}]},'windsurf':{'name':a354_0x432ca2(0x1d9),'description':a354_0x432ca2(0x1c9),'folders':[a354_0x432ca2(0x1cd)],'files':[{'type':a354_0x432ca2(0x1be),'path':'.windsurf/workflows/rabetbase.md'}]},'claude':{'name':a354_0x432ca2(0x1ae),'description':a354_0x432ca2(0x1ae),'folders':['.claude'],'files':[{'type':'file','path':a354_0x432ca2(0x1d5)}]},'cline':{'name':a354_0x432ca2(0x1c1),'description':'Cline\x20IDE','folders':[a354_0x432ca2(0x1dc)],'files':[{'type':'file','path':a354_0x432ca2(0x1e4)}]},'codex':{'name':a354_0x432ca2(0x1de),'description':'Codex\x20IDE','folders':[a354_0x432ca2(0x1d7)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1ba)}]},'opencode':{'name':a354_0x432ca2(0x1bd),'description':a354_0x432ca2(0x1c4),'folders':[a354_0x432ca2(0x1e3)],'files':[{'type':a354_0x432ca2(0x1be),'path':'.opencode/skills/lovrabet/SKILL.md'}]},'qoder':{'name':a354_0x432ca2(0x1ce),'description':a354_0x432ca2(0x1b3),'folders':[a354_0x432ca2(0x1d4)],'files':[{'type':a354_0x432ca2(0x1be),'path':'.qoder/rules/rabetbase.md'},{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1e5)}]},'codebuddy':{'name':a354_0x432ca2(0x1c8),'description':a354_0x432ca2(0x1df),'folders':[a354_0x432ca2(0x1e0)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1b7)}]},'trae':{'name':a354_0x432ca2(0x1ac),'description':a354_0x432ca2(0x1ca),'folders':[a354_0x432ca2(0x1c7)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1cf)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a354_0x432ca2(0x1b0),'description':'Generic\x20template\x20fallback','folders':[a354_0x432ca2(0x1e1)],'files':[{'type':'file','path':a354_0x432ca2(0x1e2)}]},'antigravity':{'name':a354_0x432ca2(0x1e6),'description':a354_0x432ca2(0x1c6),'folders':[a354_0x432ca2(0x1e1)],'files':[{'type':a354_0x432ca2(0x1be),'path':a354_0x432ca2(0x1e2)}]}};function a354_0x5dae(){const _0xf63523=['CodeBuddy\x20IDE','.codebuddy','.agent','.agent/skills/lovrabet/SKILL.md','.opencode','.cline/skills/lovrabet/SKILL.md','.qoder/skills/lovrabet/SKILL.md','Antigravity','Trae','666352rbhcaQ','Claude\x20Code','cline','Other\x20(generic\x20template)','2405424rTIyvC','claude','Qoder\x20IDE','3674190YIVTrR','.cursorrules','9cXPOLd','.codebuddy/skills/lovrabet/SKILL.md','antigravity','Cursor','.codex/skills/lovrabet/SKILL.md','3966108IcuuLP','codebuddy','OpenCode','file','Cursor\x20IDE','windsurf','Cline','qoder','agent','OpenCode\x20IDE','trae','Antigravity\x20IDE','.trae','CodeBuddy','Windsurf\x20IDE','Trae\x20IDE','533356AeUGXO','485177FrYiEp','.windsurf','Qoder','.trae/skills/lovrabet/SKILL.md','25CtIfSD','.cursor/skills/rabetbase.md','opencode','39246vhOuLn','.qoder','.claude/skills/lovrabet/SKILL.md','codex','.codex','11wGzpuR','Windsurf','.cursor','cursor','.cline','78nmwjYO','Codex'];a354_0x5dae=function(){return _0xf63523;};return a354_0x5dae();}export const CORE_IDE_LIST=['claude','cline',a354_0x432ca2(0x1bc),a354_0x432ca2(0x1d6),a354_0x432ca2(0x1db),a354_0x432ca2(0x1d2),a354_0x432ca2(0x1c2),a354_0x432ca2(0x1c5),a354_0x432ca2(0x1c0)];export const IDE_LIST=[a354_0x432ca2(0x1b8),a354_0x432ca2(0x1b2),a354_0x432ca2(0x1af),a354_0x432ca2(0x1bc),a354_0x432ca2(0x1d6),a354_0x432ca2(0x1db),a354_0x432ca2(0x1d2),a354_0x432ca2(0x1c2),'trae','windsurf',a354_0x432ca2(0x1c3)];export const ALL_CORE_IDES=['cursor',a354_0x432ca2(0x1c0),a354_0x432ca2(0x1b2),a354_0x432ca2(0x1af),a354_0x432ca2(0x1d6),a354_0x432ca2(0x1d2),'qoder',a354_0x432ca2(0x1bc),a354_0x432ca2(0x1c5)];
1
+ const a355_0x7e530a=a355_0x5523;function a355_0x5523(_0x283334,_0x2fbf48){_0x283334=_0x283334-0x1db;const _0x4de105=a355_0x4de1();let _0x55230b=_0x4de105[_0x283334];return _0x55230b;}(function(_0x3520d4,_0x2832a7){const _0x2516e2=a355_0x5523,_0x1924a6=_0x3520d4();while(!![]){try{const _0x587478=parseInt(_0x2516e2(0x20f))/0x1+-parseInt(_0x2516e2(0x1e7))/0x2*(parseInt(_0x2516e2(0x203))/0x3)+parseInt(_0x2516e2(0x1f1))/0x4+-parseInt(_0x2516e2(0x20d))/0x5+-parseInt(_0x2516e2(0x211))/0x6+parseInt(_0x2516e2(0x1f2))/0x7+parseInt(_0x2516e2(0x1e4))/0x8;if(_0x587478===_0x2832a7)break;else _0x1924a6['push'](_0x1924a6['shift']());}catch(_0x46d0de){_0x1924a6['push'](_0x1924a6['shift']());}}}(a355_0x4de1,0x27191));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a355_0x7e530a(0x1df),a355_0x7e530a(0x1fe)],'files':[{'type':a355_0x7e530a(0x1ef),'path':a355_0x7e530a(0x1f9)}]},'windsurf':{'name':a355_0x7e530a(0x1fc),'description':'Windsurf\x20IDE','folders':[a355_0x7e530a(0x1fa)],'files':[{'type':a355_0x7e530a(0x1ef),'path':'.windsurf/workflows/rabetbase.md'}]},'claude':{'name':a355_0x7e530a(0x1f3),'description':a355_0x7e530a(0x1f3),'folders':[a355_0x7e530a(0x1fb)],'files':[{'type':a355_0x7e530a(0x1ef),'path':a355_0x7e530a(0x1db)}]},'cline':{'name':a355_0x7e530a(0x1f5),'description':a355_0x7e530a(0x1ed),'folders':[a355_0x7e530a(0x1de)],'files':[{'type':'file','path':a355_0x7e530a(0x1f6)}]},'codex':{'name':a355_0x7e530a(0x1e8),'description':'Codex\x20IDE','folders':['.codex'],'files':[{'type':a355_0x7e530a(0x1ef),'path':a355_0x7e530a(0x1f8)}]},'opencode':{'name':a355_0x7e530a(0x208),'description':a355_0x7e530a(0x205),'folders':['.opencode'],'files':[{'type':a355_0x7e530a(0x1ef),'path':a355_0x7e530a(0x1e0)}]},'qoder':{'name':a355_0x7e530a(0x1e6),'description':a355_0x7e530a(0x1ff),'folders':[a355_0x7e530a(0x1dd)],'files':[{'type':a355_0x7e530a(0x1ef),'path':a355_0x7e530a(0x20a)},{'type':a355_0x7e530a(0x1ef),'path':a355_0x7e530a(0x210)}]},'codebuddy':{'name':a355_0x7e530a(0x200),'description':a355_0x7e530a(0x20b),'folders':[a355_0x7e530a(0x209)],'files':[{'type':a355_0x7e530a(0x1ef),'path':a355_0x7e530a(0x1e9)}]},'trae':{'name':a355_0x7e530a(0x1e5),'description':a355_0x7e530a(0x1e2),'folders':[a355_0x7e530a(0x1e3)],'files':[{'type':a355_0x7e530a(0x1ef),'path':a355_0x7e530a(0x1ec)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a355_0x7e530a(0x201),'description':a355_0x7e530a(0x206),'folders':[a355_0x7e530a(0x1f0)],'files':[{'type':'file','path':a355_0x7e530a(0x1eb)}]},'antigravity':{'name':a355_0x7e530a(0x1ee),'description':a355_0x7e530a(0x207),'folders':[a355_0x7e530a(0x1f0)],'files':[{'type':a355_0x7e530a(0x1ef),'path':a355_0x7e530a(0x1eb)}]}};export const CORE_IDE_LIST=['claude',a355_0x7e530a(0x1ea),a355_0x7e530a(0x20c),'codex','cursor',a355_0x7e530a(0x202),a355_0x7e530a(0x20e),a355_0x7e530a(0x1e1),a355_0x7e530a(0x1fd)];export const IDE_LIST=['antigravity',a355_0x7e530a(0x1f4),'cline',a355_0x7e530a(0x20c),'codex',a355_0x7e530a(0x204),a355_0x7e530a(0x202),a355_0x7e530a(0x20e),a355_0x7e530a(0x1e1),a355_0x7e530a(0x1fd),a355_0x7e530a(0x1f7)];function a355_0x4de1(){const _0x1d23df=['Qoder\x20IDE','CodeBuddy','Other\x20(generic\x20template)','opencode','417ofoXlm','cursor','OpenCode\x20IDE','Generic\x20template\x20fallback','Antigravity\x20IDE','OpenCode','.codebuddy','.qoder/rules/rabetbase.md','CodeBuddy\x20IDE','codebuddy','1097070uXnzpq','qoder','122453OjbBeB','.qoder/skills/lovrabet/SKILL.md','358326JIAXin','.claude/skills/lovrabet/SKILL.md','codex','.qoder','.cline','.cursorrules','.opencode/skills/lovrabet/SKILL.md','trae','Trae\x20IDE','.trae','1657392EajNOC','Trae','Qoder','3350mGlcmA','Codex','.codebuddy/skills/lovrabet/SKILL.md','cline','.agent/skills/lovrabet/SKILL.md','.trae/skills/lovrabet/SKILL.md','Cline\x20IDE','Antigravity','file','.agent','425308rADEsA','1653057nLjPro','Claude\x20Code','claude','Cline','.cline/skills/lovrabet/SKILL.md','agent','.codex/skills/lovrabet/SKILL.md','.cursor/skills/rabetbase.md','.windsurf','.claude','Windsurf','windsurf','.cursor'];a355_0x4de1=function(){return _0x1d23df;};return a355_0x4de1();}export const ALL_CORE_IDES=[a355_0x7e530a(0x204),a355_0x7e530a(0x1fd),a355_0x7e530a(0x1f4),a355_0x7e530a(0x1ea),a355_0x7e530a(0x1dc),a355_0x7e530a(0x202),a355_0x7e530a(0x20e),'codebuddy',a355_0x7e530a(0x1e1)];
@@ -1 +1 @@
1
- (function(_0x226450,_0x1ba351){const _0x363f2d=a355_0xa1e6,_0x144663=_0x226450();while(!![]){try{const _0x1f6c63=parseInt(_0x363f2d(0x128))/0x1+-parseInt(_0x363f2d(0x12a))/0x2*(parseInt(_0x363f2d(0x125))/0x3)+-parseInt(_0x363f2d(0x126))/0x4*(-parseInt(_0x363f2d(0x127))/0x5)+-parseInt(_0x363f2d(0x12d))/0x6+-parseInt(_0x363f2d(0x124))/0x7+parseInt(_0x363f2d(0x12c))/0x8*(parseInt(_0x363f2d(0x129))/0x9)+parseInt(_0x363f2d(0x12b))/0xa;if(_0x1f6c63===_0x1ba351)break;else _0x144663['push'](_0x144663['shift']());}catch(_0xc2d9ac){_0x144663['push'](_0x144663['shift']());}}}(a355_0x3ef5,0x9047f));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a355_0xa1e6(_0x275178,_0x48d844){_0x275178=_0x275178-0x124;const _0x3ef5d0=a355_0x3ef5();let _0xa1e6ca=_0x3ef5d0[_0x275178];return _0xa1e6ca;}function a355_0x3ef5(){const _0x5d6919=['2639908KVysuF','5mOmCdb','708308fHEucM','1206xQtCRn','2QwIhqs','13232610bmXwsf','15176TCRaVJ','2667474VDhfNp','5993015mLqahe','3162135wRNbFH'];a355_0x3ef5=function(){return _0x5d6919;};return a355_0x3ef5();}
1
+ (function(_0x34c0d9,_0x326bb8){const _0x3679b1=a356_0x57b1,_0x1eb5f2=_0x34c0d9();while(!![]){try{const _0x4a5ec9=-parseInt(_0x3679b1(0x1f1))/0x1+-parseInt(_0x3679b1(0x1f0))/0x2+parseInt(_0x3679b1(0x1ef))/0x3*(parseInt(_0x3679b1(0x1f3))/0x4)+parseInt(_0x3679b1(0x1f7))/0x5*(parseInt(_0x3679b1(0x1f6))/0x6)+parseInt(_0x3679b1(0x1f5))/0x7+parseInt(_0x3679b1(0x1f8))/0x8+-parseInt(_0x3679b1(0x1f4))/0x9*(parseInt(_0x3679b1(0x1f2))/0xa);if(_0x4a5ec9===_0x326bb8)break;else _0x1eb5f2['push'](_0x1eb5f2['shift']());}catch(_0x15dfd0){_0x1eb5f2['push'](_0x1eb5f2['shift']());}}}(a356_0x4deb,0x7991c));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a356_0x57b1(_0x37f18d,_0x48674d){_0x37f18d=_0x37f18d-0x1ef;const _0x4deb39=a356_0x4deb();let _0x57b118=_0x4deb39[_0x37f18d];return _0x57b118;}function a356_0x4deb(){const _0x4b7b6e=['165UAJhSF','6773816wlxjwu','24mYvMSs','113364QAounh','760895wiElLg','10hmahJN','368388rtsVDY','10513602GJoqQx','4142936AKEBcH','56064MTfkyy'];a356_0x4deb=function(){return _0x4b7b6e;};return a356_0x4deb();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
@@ -1 +1 @@
1
- (function(_0x200582,_0x34e0a2){const _0x7f59c9=a356_0x576a,_0x4c2e80=_0x200582();while(!![]){try{const _0x1a5872=parseInt(_0x7f59c9(0x14d))/0x1+parseInt(_0x7f59c9(0x14c))/0x2+-parseInt(_0x7f59c9(0x151))/0x3*(-parseInt(_0x7f59c9(0x149))/0x4)+-parseInt(_0x7f59c9(0x150))/0x5*(-parseInt(_0x7f59c9(0x148))/0x6)+parseInt(_0x7f59c9(0x144))/0x7+-parseInt(_0x7f59c9(0x143))/0x8*(-parseInt(_0x7f59c9(0x14e))/0x9)+-parseInt(_0x7f59c9(0x145))/0xa;if(_0x1a5872===_0x34e0a2)break;else _0x4c2e80['push'](_0x4c2e80['shift']());}catch(_0x7a3292){_0x4c2e80['push'](_0x4c2e80['shift']());}}}(a356_0x3e0b,0xc66b5));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x422d32=a356_0x576a,_0x5eb904=getTemplateBaseUrl(),_0x48181c=[_0x5eb904+_0x422d32(0x142),_0x5eb904+_0x422d32(0x153)];for(const _0x49ea80 of _0x48181c){try{const _0x5f14d8=await fetch(_0x49ea80,{'headers':{'Accept':_0x422d32(0x14a)}});if(!_0x5f14d8['ok'])continue;const _0x1bfdf8=await _0x5f14d8[_0x422d32(0x154)]();if(!_0x1bfdf8[_0x422d32(0x14f)]?.[_0x422d32(0x14b)]||!_0x1bfdf8[_0x422d32(0x152)]?.[_0x422d32(0x147)]?.[_0x422d32(0x14b)])continue;return _0x1bfdf8;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;function a356_0x576a(_0x59ebce,_0x5eb24f){_0x59ebce=_0x59ebce-0x142;const _0x3e0b69=a356_0x3e0b();let _0x576a68=_0x3e0b69[_0x59ebce];return _0x576a68;}const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a356_0x3e0b(){const _0x7848b4=['node','3702KazXDx','27928IUpJKq','application/json','stableVersion','1621862NAaQEx','302502XZwXVS','140157GbKdcP','cli','12525StoQSO','684cGeAcb','sdk','/config/index.json','json','/config.json','624FBSrlq','3831660hiqWQd','52002630PVpCRn','now'];a356_0x3e0b=function(){return _0x7848b4;};return a356_0x3e0b();}export async function getCdnConfig(){const _0x1d4360=a356_0x576a,_0x174b75=Date[_0x1d4360(0x146)]();if(hasCachedConfig){const _0x1e9a12=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x174b75-cacheTime<_0x1e9a12)return cachedConfig;}const _0x34eebf=await fetchCdnConfig();return cachedConfig=_0x34eebf,cacheTime=_0x174b75,hasCachedConfig=!![],_0x34eebf;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
1
+ (function(_0x218074,_0x282bcd){const _0x531a4b=a357_0x3cb5,_0x568029=_0x218074();while(!![]){try{const _0x929d3b=parseInt(_0x531a4b(0x149))/0x1*(-parseInt(_0x531a4b(0x14a))/0x2)+parseInt(_0x531a4b(0x14c))/0x3+parseInt(_0x531a4b(0x145))/0x4*(parseInt(_0x531a4b(0x153))/0x5)+parseInt(_0x531a4b(0x150))/0x6+parseInt(_0x531a4b(0x14d))/0x7*(-parseInt(_0x531a4b(0x147))/0x8)+parseInt(_0x531a4b(0x148))/0x9*(parseInt(_0x531a4b(0x151))/0xa)+parseInt(_0x531a4b(0x14b))/0xb*(parseInt(_0x531a4b(0x144))/0xc);if(_0x929d3b===_0x282bcd)break;else _0x568029['push'](_0x568029['shift']());}catch(_0x567b02){_0x568029['push'](_0x568029['shift']());}}}(a357_0x303a,0x9350f));function a357_0x3cb5(_0x35b1f3,_0x1ed0c2){_0x35b1f3=_0x35b1f3-0x143;const _0x303a22=a357_0x303a();let _0x3cb5db=_0x303a22[_0x35b1f3];return _0x3cb5db;}import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x3d9893=a357_0x3cb5,_0x470457=getTemplateBaseUrl(),_0x4c8c4d=[_0x470457+_0x3d9893(0x14e),_0x470457+_0x3d9893(0x143)];for(const _0x4380cb of _0x4c8c4d){try{const _0x5f3e70=await fetch(_0x4380cb,{'headers':{'Accept':_0x3d9893(0x146)}});if(!_0x5f3e70['ok'])continue;const _0x15ea52=await _0x5f3e70['json']();if(!_0x15ea52['cli']?.[_0x3d9893(0x14f)]||!_0x15ea52['sdk']?.[_0x3d9893(0x154)]?.['stableVersion'])continue;return _0x15ea52;}catch{}}return null;}function a357_0x303a(){const _0x200b38=['6696sawFQP','18jFVuZD','299143IAbESD','2cMCAvE','3237047fqKDZt','858114RocDKA','7917xOAiLt','/config.json','stableVersion','1551588hqdJxp','3373170fMvYLR','now','67130ochIDt','node','/config/index.json','12FBBPKq','100KKQSuN','application/json'];a357_0x303a=function(){return _0x200b38;};return a357_0x303a();}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x4f0905=a357_0x3cb5,_0x520ef4=Date[_0x4f0905(0x152)]();if(hasCachedConfig){const _0x3dbfcc=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x520ef4-cacheTime<_0x3dbfcc)return cachedConfig;}const _0x4a25f3=await fetchCdnConfig();return cachedConfig=_0x4a25f3,cacheTime=_0x520ef4,hasCachedConfig=!![],_0x4a25f3;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}