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

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 (279) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/kb/create.js +1 -1
  101. package/lib/commands/kb/delete.js +1 -1
  102. package/lib/commands/kb/detail.js +1 -1
  103. package/lib/commands/kb/index.js +1 -1
  104. package/lib/commands/kb/list.js +1 -1
  105. package/lib/commands/kb/shared.js +1 -1
  106. package/lib/commands/kb/update.js +1 -1
  107. package/lib/commands/logs/index.js +1 -1
  108. package/lib/commands/menu/asset-update.js +1 -1
  109. package/lib/commands/menu/delete.js +1 -1
  110. package/lib/commands/menu/external-link-create.js +1 -1
  111. package/lib/commands/menu/external-link-update.js +1 -1
  112. package/lib/commands/menu/group-create.js +1 -1
  113. package/lib/commands/menu/group-update.js +1 -1
  114. package/lib/commands/menu/index.js +1 -1
  115. package/lib/commands/menu/list.js +1 -1
  116. package/lib/commands/menu/move.js +1 -1
  117. package/lib/commands/menu/regroup-start.js +1 -1
  118. package/lib/commands/menu/rename.js +1 -1
  119. package/lib/commands/menu/shared/compare-table.js +1 -1
  120. package/lib/commands/menu/shared/delete-plan.js +1 -1
  121. package/lib/commands/menu/shared/facts.js +1 -1
  122. package/lib/commands/menu/shared/index.js +1 -1
  123. package/lib/commands/menu/shared/inquirer.js +1 -1
  124. package/lib/commands/menu/shared/local-pages.js +1 -1
  125. package/lib/commands/menu/shared/logic.js +1 -1
  126. package/lib/commands/menu/shared/mutations.js +1 -1
  127. package/lib/commands/menu/shared/service.js +1 -1
  128. package/lib/commands/menu/shared/sync-core.js +1 -1
  129. package/lib/commands/menu/shared/update-core.js +1 -1
  130. package/lib/commands/menu/shared/valid-url.js +1 -1
  131. package/lib/commands/menu/sync.js +1 -1
  132. package/lib/commands/notification/config-list.js +1 -1
  133. package/lib/commands/notification/index.js +1 -1
  134. package/lib/commands/ocr/index.js +1 -1
  135. package/lib/commands/page/generate-start.js +1 -1
  136. package/lib/commands/page/generate-status.js +1 -1
  137. package/lib/commands/page/index.js +1 -1
  138. package/lib/commands/page/pull.js +1 -1
  139. package/lib/commands/page/push.js +1 -1
  140. package/lib/commands/page/relation-audit.js +1 -1
  141. package/lib/commands/page/restore.js +1 -1
  142. package/lib/commands/page/shared.js +1 -1
  143. package/lib/commands/page/standard-page-status.js +1 -1
  144. package/lib/commands/page/sync.js +1 -1
  145. package/lib/commands/permit/index.js +1 -1
  146. package/lib/commands/permit/page-get.js +1 -1
  147. package/lib/commands/permit/page-set.js +1 -1
  148. package/lib/commands/permit/role-apis-set.js +1 -1
  149. package/lib/commands/permit/role-menus-set.js +1 -1
  150. package/lib/commands/permit/role-menus.js +1 -1
  151. package/lib/commands/permit/shared.js +1 -1
  152. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  153. package/lib/commands/project/create/format-elapsed.js +1 -1
  154. package/lib/commands/project/create/main.js +1 -1
  155. package/lib/commands/project/create/non-interactive.js +1 -1
  156. package/lib/commands/project/create/project-template-path.js +1 -1
  157. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  158. package/lib/commands/project/create/use-format-code.js +1 -1
  159. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  160. package/lib/commands/project/index.js +1 -1
  161. package/lib/commands/project/upgrade.js +1 -1
  162. package/lib/commands/registry.js +1 -1
  163. package/lib/commands/role/create.js +1 -1
  164. package/lib/commands/role/delete.js +1 -1
  165. package/lib/commands/role/detail.js +1 -1
  166. package/lib/commands/role/index.js +1 -1
  167. package/lib/commands/role/list.js +1 -1
  168. package/lib/commands/role/shared.js +1 -1
  169. package/lib/commands/role/update.js +1 -1
  170. package/lib/commands/role/user-add.js +1 -1
  171. package/lib/commands/role/user-remove.js +1 -1
  172. package/lib/commands/role/user-resolve.js +1 -1
  173. package/lib/commands/run/index.js +1 -1
  174. package/lib/commands/schema.js +1 -1
  175. package/lib/commands/sql/create.js +1 -1
  176. package/lib/commands/sql/delete.js +1 -1
  177. package/lib/commands/sql/detail.js +1 -1
  178. package/lib/commands/sql/exec.js +1 -1
  179. package/lib/commands/sql/index.js +1 -1
  180. package/lib/commands/sql/list.js +1 -1
  181. package/lib/commands/sql/pull.js +1 -1
  182. package/lib/commands/sql/push.js +1 -1
  183. package/lib/commands/sql/shared.js +1 -1
  184. package/lib/commands/sql/status.js +1 -1
  185. package/lib/commands/sql/validate.js +1 -1
  186. package/lib/commands/task/index.js +1 -1
  187. package/lib/commands/task/status.js +1 -1
  188. package/lib/commands/tenant/index.js +1 -1
  189. package/lib/commands/tenant/members-list.js +1 -1
  190. package/lib/commands/tenant/shared.js +1 -1
  191. package/lib/commands/workspace/add.js +1 -1
  192. package/lib/commands/workspace/index.js +1 -1
  193. package/lib/commands/workspace/remove.js +1 -1
  194. package/lib/config/schema.js +1 -1
  195. package/lib/constant/cdn.js +1 -1
  196. package/lib/constant/cli.js +1 -1
  197. package/lib/constant/defaults.js +1 -1
  198. package/lib/constant/domain.js +1 -1
  199. package/lib/constant/env.js +1 -1
  200. package/lib/constant/output.js +1 -1
  201. package/lib/constant/paths.js +1 -1
  202. package/lib/constant/risk.js +1 -1
  203. package/lib/context/app-resolver.js +1 -1
  204. package/lib/context/auth-resolver.js +1 -1
  205. package/lib/context/config-loader.js +1 -1
  206. package/lib/context.d.ts +1 -1
  207. package/lib/context.js +1 -1
  208. package/lib/core/alias-resolver.js +1 -1
  209. package/lib/core/api-client.js +1 -1
  210. package/lib/core/bff/config.js +1 -1
  211. package/lib/core/bff/file-system.js +1 -1
  212. package/lib/core/bff/hash.js +1 -1
  213. package/lib/core/bff/lock.js +1 -1
  214. package/lib/core/bff/utils.js +1 -1
  215. package/lib/core/db-resolver.js +1 -1
  216. package/lib/core/page/file-system.js +1 -1
  217. package/lib/core/page/hash.js +1 -1
  218. package/lib/core/page/lock.js +1 -1
  219. package/lib/core/sql-index-auditor.js +1 -1
  220. package/lib/core/sql-sync/config.js +1 -1
  221. package/lib/core/sql-sync/file-system.js +1 -1
  222. package/lib/core/sql-sync/hash.js +1 -1
  223. package/lib/core/sql-sync/lock.js +1 -1
  224. package/lib/core/sql-sync/utils.js +1 -1
  225. package/lib/core/sql-validator.js +1 -1
  226. package/lib/errors.js +1 -1
  227. package/lib/framework/build-all-flags.js +1 -1
  228. package/lib/framework/error-output.js +1 -1
  229. package/lib/framework/explicit-yes.js +1 -1
  230. package/lib/framework/flags.js +1 -1
  231. package/lib/framework/help.js +1 -1
  232. package/lib/framework/index.js +1 -1
  233. package/lib/framework/output.js +1 -1
  234. package/lib/framework/response.js +1 -1
  235. package/lib/framework/runner-alias.js +1 -1
  236. package/lib/framework/runner.js +1 -1
  237. package/lib/framework/schema-export.js +1 -1
  238. package/lib/framework/types.js +1 -1
  239. package/lib/generated/build-info.d.ts +4 -4
  240. package/lib/generated/build-info.js +1 -1
  241. package/lib/help.js +1 -1
  242. package/lib/runtime/confirmation.js +1 -1
  243. package/lib/runtime/event.js +1 -1
  244. package/lib/runtime/index.js +1 -1
  245. package/lib/runtime/queue.js +1 -1
  246. package/lib/runtime/resolve.js +1 -1
  247. package/lib/skills/main.js +1 -1
  248. package/lib/skills/npx-skills-add.js +1 -1
  249. package/lib/skills/skill-presence.js +1 -1
  250. package/lib/telemetry/cli-command-trace.js +1 -1
  251. package/lib/telemetry/cli-help-trace.js +1 -1
  252. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  253. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  254. package/lib/telemetry/send-cli-trace-log.js +1 -1
  255. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  256. package/lib/utils/ai_config.js +1 -1
  257. package/lib/utils/apply-jq-filter.js +1 -1
  258. package/lib/utils/cdn-config.js +1 -1
  259. package/lib/utils/check-sdk-version.js +1 -1
  260. package/lib/utils/cli-version-check.js +1 -1
  261. package/lib/utils/cli-version-policy.js +1 -1
  262. package/lib/utils/config.js +1 -1
  263. package/lib/utils/copy-directory.js +1 -1
  264. package/lib/utils/entity-with-id.js +1 -1
  265. package/lib/utils/file-utils.js +1 -1
  266. package/lib/utils/guides-cdn.js +1 -1
  267. package/lib/utils/http-client.js +1 -1
  268. package/lib/utils/is-non-interactive.js +1 -1
  269. package/lib/utils/logger.js +1 -1
  270. package/lib/utils/params.js +1 -1
  271. package/lib/utils/platform.js +1 -1
  272. package/lib/utils/rules-cdn.js +1 -1
  273. package/lib/utils/sleep.js +1 -1
  274. package/lib/utils/template-replacer.js +1 -1
  275. package/lib/utils/update-notice.js +1 -1
  276. package/lib/utils/version.js +1 -1
  277. package/lib/utils/with-active-cookie.js +1 -1
  278. package/lib/utils/write-cli-side-channel.js +1 -1
  279. package/package.json +1 -1
@@ -1 +1 @@
1
- const a91_0x240564=a91_0x18cb;(function(_0x17b35a,_0xbb42fd){const _0x1b6376=a91_0x18cb,_0x1dac86=_0x17b35a();while(!![]){try{const _0x66836b=parseInt(_0x1b6376(0x12e))/0x1*(parseInt(_0x1b6376(0x129))/0x2)+parseInt(_0x1b6376(0x146))/0x3*(parseInt(_0x1b6376(0x12a))/0x4)+parseInt(_0x1b6376(0x13a))/0x5+-parseInt(_0x1b6376(0x125))/0x6*(parseInt(_0x1b6376(0x143))/0x7)+-parseInt(_0x1b6376(0x142))/0x8*(parseInt(_0x1b6376(0x139))/0x9)+-parseInt(_0x1b6376(0x12f))/0xa+parseInt(_0x1b6376(0x149))/0xb*(parseInt(_0x1b6376(0x127))/0xc);if(_0x66836b===_0xbb42fd)break;else _0x1dac86['push'](_0x1dac86['shift']());}catch(_0x19a184){_0x1dac86['push'](_0x1dac86['shift']());}}}(a91_0x2f35,0x29b79));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a91_0x18cb(_0x1d8b50,_0x411f2b){_0x1d8b50=_0x1d8b50-0x124;const _0x2f3543=a91_0x2f35();let _0x18cb0f=_0x2f3543[_0x1d8b50];return _0x18cb0f;}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a91_0x240564(0x135),'[redacted]']);function mergeDbLinkUpdate(_0x54d229,_0x37b706){const _0x3fcdbd=a91_0x240564,_0x4d8e09={..._0x54d229},_0x2bd982=_0x37b706[_0x3fcdbd(0x133)]('password');if(_0x2bd982&&MASKED_PASSWORD_VALUES[_0x3fcdbd(0x145)](_0x2bd982))throw CliErrors['validation'](_0x3fcdbd(0x12b));if(!_0x2bd982&&MASKED_PASSWORD_VALUES[_0x3fcdbd(0x145)](String(_0x54d229[_0x3fcdbd(0x144)]??'')))throw CliErrors[_0x3fcdbd(0x140)](_0x3fcdbd(0x13d));const _0xd6d867=_0x37b706[_0x3fcdbd(0x133)]('dbname');if(_0xd6d867)_0x4d8e09[_0x3fcdbd(0x12c)]=_0xd6d867;const _0x4e476a=_0x37b706[_0x3fcdbd(0x133)]('dburl');if(_0x4e476a)_0x4d8e09[_0x3fcdbd(0x132)]=_0x4e476a['trim']();const _0x5dc600=_0x37b706['str'](_0x3fcdbd(0x13e));if(_0x5dc600)_0x4d8e09[_0x3fcdbd(0x13e)]=_0x5dc600;if(_0x2bd982)_0x4d8e09['password']=_0x2bd982;const _0x425e29=_0x37b706[_0x3fcdbd(0x133)]('dbparam');if(_0x425e29)_0x4d8e09['dbParam']=_0x425e29;const _0x5a05aa=_0x37b706[_0x3fcdbd(0x133)](_0x3fcdbd(0x148));if(_0x5a05aa)_0x4d8e09[_0x3fcdbd(0x137)]=_0x5a05aa;return _0x4d8e09;}function a91_0x2f35(){const _0x34d622=['New\x20host:port','dbdesc','330mnhWby','New\x20username','trim','1834770GnnWGy','dbparam','157596BMTmkf','write','32jtbNdb','879792mRCFyP','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','dbName','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','6481qztEea','2558700gLlNoK','New\x20description','string','dbUrl','str','/smartapi/dblink/update','******','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','dbDesc','dburl','9bPmpzu','1108625NAAgGs','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password','num','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','username','New\x20connection\x20parameter\x20string','validation','POST','1654568yqSEDm','7hbdLXz','password','has','3hblyqg'];a91_0x2f35=function(){return _0x34d622;};return a91_0x2f35();}export const dbUpdate={'service':'db','command':'update','description':a91_0x240564(0x136),'risk':a91_0x240564(0x128),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':'string','description':'New\x20database\x20name'},{'name':a91_0x240564(0x138),'type':'string','description':a91_0x240564(0x147)},{'name':a91_0x240564(0x13e),'type':a91_0x240564(0x131),'description':a91_0x240564(0x14a)},{'name':'password','type':'string','description':a91_0x240564(0x13b)},{'name':a91_0x240564(0x126),'type':'string','description':a91_0x240564(0x13f)},{'name':a91_0x240564(0x148),'type':a91_0x240564(0x131),'description':a91_0x240564(0x130)}],async 'validate'(_0x584014){const _0x14bcc2=a91_0x240564,_0x2ecfaf=_0x584014[_0x14bcc2(0x133)]('dburl');if(_0x2ecfaf&&!validateDbUrl(_0x2ecfaf[_0x14bcc2(0x124)]()))throw CliErrors[_0x14bcc2(0x140)](_0x14bcc2(0x12d)+_0x2ecfaf+'\x22');},async 'dryRun'(_0x58b8e0){const _0x50e25d=a91_0x240564,_0x4e2bbe=_0x58b8e0[_0x50e25d(0x13c)]('id'),_0x1ad2d5=await getDbLinkInfo(_0x4e2bbe),_0x3ac5fa=mergeDbLinkUpdate(_0x1ad2d5,_0x58b8e0),_0x53c02d=sanitizeDbLinkForOutput(_0x3ac5fa);return{'method':_0x50e25d(0x141),'url':_0x50e25d(0x134),'body':_0x53c02d,'description':'Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview'};},async 'execute'(_0x4ca938){const _0x3c7271=a91_0x240564,_0x30ec05=_0x4ca938[_0x3c7271(0x13c)]('id'),_0x23c9da=await getDbLinkInfo(_0x30ec05),_0x154583=mergeDbLinkUpdate(_0x23c9da,_0x4ca938),{id:_0x5d0c1e,entity:_0xab3e9e}=normalizeEntityWithIdResponse(await updateDbLink(_0x154583));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0xab3e9e),'message':'Updated\x20db\x20link\x20'+(_0x5d0c1e??_0x30ec05)};}};
1
+ const a91_0x5918a6=a91_0x4467;(function(_0x409731,_0x2962d0){const _0x2753e8=a91_0x4467,_0x285585=_0x409731();while(!![]){try{const _0x246e1c=parseInt(_0x2753e8(0xf3))/0x1+-parseInt(_0x2753e8(0xf9))/0x2+-parseInt(_0x2753e8(0xef))/0x3+-parseInt(_0x2753e8(0x109))/0x4+parseInt(_0x2753e8(0x105))/0x5+-parseInt(_0x2753e8(0x102))/0x6+parseInt(_0x2753e8(0xf4))/0x7;if(_0x246e1c===_0x2962d0)break;else _0x285585['push'](_0x285585['shift']());}catch(_0x33c89e){_0x285585['push'](_0x285585['shift']());}}}(a91_0x3129,0x3548a));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a91_0x4467(_0x1af90c,_0x1ffb22){_0x1af90c=_0x1af90c-0xe9;const _0x3129d1=a91_0x3129();let _0x4467d9=_0x3129d1[_0x1af90c];return _0x4467d9;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a91_0x5918a6(0xf6),a91_0x5918a6(0x104)]);function a91_0x3129(){const _0x4b4ac4=['has','735236fJEfnW','New\x20description','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','dbname','dbdesc','dbDesc','dbUrl','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','update','dbName','536106ZYsftl','username','dbparam','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','355532XZVnUt','2967748eLHKoA','Updated\x20db\x20link\x20','******','validation','/smartapi/dblink/update','61764alNYfB','password','New\x20username','New\x20host:port','dburl','trim','POST','num','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','2018274qmSJdS','str','[redacted]','842630kLpAje','string','New\x20database\x20name'];a91_0x3129=function(){return _0x4b4ac4;};return a91_0x3129();}function mergeDbLinkUpdate(_0x3ea047,_0x19aaae){const _0x37e46c=a91_0x5918a6,_0x2504ca={..._0x3ea047},_0x57d76d=_0x19aaae[_0x37e46c(0x103)](_0x37e46c(0xfa));if(_0x57d76d&&MASKED_PASSWORD_VALUES[_0x37e46c(0x108)](_0x57d76d))throw CliErrors[_0x37e46c(0xf7)](_0x37e46c(0x101));if(!_0x57d76d&&MASKED_PASSWORD_VALUES[_0x37e46c(0x108)](String(_0x3ea047['password']??'')))throw CliErrors[_0x37e46c(0xf7)](_0x37e46c(0xf2));const _0x41d613=_0x19aaae['str'](_0x37e46c(0x10c));if(_0x41d613)_0x2504ca[_0x37e46c(0xee)]=_0x41d613;const _0x16127b=_0x19aaae[_0x37e46c(0x103)](_0x37e46c(0xfd));if(_0x16127b)_0x2504ca[_0x37e46c(0xeb)]=_0x16127b[_0x37e46c(0xfe)]();const _0x2f2abf=_0x19aaae['str'](_0x37e46c(0xf0));if(_0x2f2abf)_0x2504ca['username']=_0x2f2abf;if(_0x57d76d)_0x2504ca['password']=_0x57d76d;const _0x135ff9=_0x19aaae[_0x37e46c(0x103)](_0x37e46c(0xf1));if(_0x135ff9)_0x2504ca['dbParam']=_0x135ff9;const _0xb1e2fe=_0x19aaae[_0x37e46c(0x103)](_0x37e46c(0xe9));if(_0xb1e2fe)_0x2504ca[_0x37e46c(0xea)]=_0xb1e2fe;return _0x2504ca;}export const dbUpdate={'service':'db','command':a91_0x5918a6(0xed),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a91_0x5918a6(0x10c),'type':'string','description':a91_0x5918a6(0x107)},{'name':a91_0x5918a6(0xfd),'type':a91_0x5918a6(0x106),'description':a91_0x5918a6(0xfc)},{'name':a91_0x5918a6(0xf0),'type':a91_0x5918a6(0x106),'description':a91_0x5918a6(0xfb)},{'name':a91_0x5918a6(0xfa),'type':a91_0x5918a6(0x106),'description':'Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password'},{'name':a91_0x5918a6(0xf1),'type':a91_0x5918a6(0x106),'description':'New\x20connection\x20parameter\x20string'},{'name':a91_0x5918a6(0xe9),'type':a91_0x5918a6(0x106),'description':a91_0x5918a6(0x10a)}],async 'validate'(_0x13cbff){const _0x32afc0=a91_0x5918a6,_0x306c3b=_0x13cbff[_0x32afc0(0x103)](_0x32afc0(0xfd));if(_0x306c3b&&!validateDbUrl(_0x306c3b[_0x32afc0(0xfe)]()))throw CliErrors[_0x32afc0(0xf7)](_0x32afc0(0x10b)+_0x306c3b+'\x22');},async 'dryRun'(_0x59530f){const _0x55149f=a91_0x5918a6,_0x2e0dce=_0x59530f[_0x55149f(0x100)]('id'),_0x3ef6bb=await getDbLinkInfo(_0x2e0dce),_0x5cfdf9=mergeDbLinkUpdate(_0x3ef6bb,_0x59530f),_0xae8999=sanitizeDbLinkForOutput(_0x5cfdf9);return{'method':_0x55149f(0xff),'url':_0x55149f(0xf8),'body':_0xae8999,'description':_0x55149f(0xec)};},async 'execute'(_0x26ce71){const _0x10a325=a91_0x5918a6,_0x21b4f8=_0x26ce71[_0x10a325(0x100)]('id'),_0x50658d=await getDbLinkInfo(_0x21b4f8),_0x56d2d6=mergeDbLinkUpdate(_0x50658d,_0x26ce71),{id:_0x49a0c8,entity:_0x1fb38e}=normalizeEntityWithIdResponse(await updateDbLink(_0x56d2d6));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x1fb38e),'message':_0x10a325(0xf5)+(_0x49a0c8??_0x21b4f8)};}};
@@ -1 +1 @@
1
- const a92_0x445d71=a92_0x495f;(function(_0xd48dca,_0x2c62ae){const _0x302f09=a92_0x495f,_0x203af1=_0xd48dca();while(!![]){try{const _0x46718b=-parseInt(_0x302f09(0x9f))/0x1*(-parseInt(_0x302f09(0x8a))/0x2)+-parseInt(_0x302f09(0xaa))/0x3+parseInt(_0x302f09(0xb5))/0x4*(-parseInt(_0x302f09(0xad))/0x5)+-parseInt(_0x302f09(0xac))/0x6*(parseInt(_0x302f09(0xc1))/0x7)+parseInt(_0x302f09(0x98))/0x8*(parseInt(_0x302f09(0xcd))/0x9)+-parseInt(_0x302f09(0xae))/0xa+parseInt(_0x302f09(0xd8))/0xb;if(_0x46718b===_0x2c62ae)break;else _0x203af1['push'](_0x203af1['shift']());}catch(_0x4bd95c){_0x203af1['push'](_0x203af1['shift']());}}}(a92_0x409d,0xbdbd0));import a92_0x47be3c from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';function a92_0x409d(){const _0x25d23e=['gray','817008OcASIo','(set\x20via\x20file,\x20length=','repeat','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','(no\x20file)','(set,\x20length=','version','slice','(not\x20found)','✓\x20Valid\x20JSON','7DBqqAf','unknown','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','pageSize','source','bold','apiDir','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Config\x20Files','✓\x20Valid','9Sxdbiq','status','padEnd','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','red','format','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','yellow','\x20\x20Apps','\x20\x20explicitAppName:\x20','9752622EhTuwo','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(missing)','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','read','\x20\x20─','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','(default:\x20','11388JkrnEd','✗\x20Invalid\x20JSON','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','(none)','apps','riskLevel','check','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','green','\x20\x20API\x20Endpoints','(not\x20set)','366088pdEYzh','currentApp','missing','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','cookie','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','value','222fltJnb','keys','accessKey','message','\x20doctor','defaultApp','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','env','raw','arch','303936jsMwFF','Global','1788594ukGnjc','10CNjheN','6113480WxaFiQ','appcode','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20(default)'];a92_0x409d=function(){return _0x25d23e;};return a92_0x409d();}import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x43eaf5){const _0x3e053a=a92_0x495f,_0x24654f=GIT_COMMIT!==_0x3e053a(0xc2)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x3e053a(0xbe)](0x0,0xa)+')':VERSION,_0x4e43f5=buildConfigFromFlags({}),_0x1ea742=getCookie();console[_0x3e053a(0x94)](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](CLI_BIN_NAME+_0x3e053a(0xa3))),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)]('─'[_0x3e053a(0xb7)](0x32))),console[_0x3e053a(0x94)](_0x3e053a(0x86)+_0x24654f),console[_0x3e053a(0x94)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x3e053a(0xbd)]),console['log'](_0x3e053a(0x9d)+process[_0x3e053a(0xd1)]+'\x20'+process[_0x3e053a(0xa9)]),console['log'](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](_0x3e053a(0xcb))),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x85)[_0x3e053a(0xb7)](0x1e)));const _0x13f881=getGlobalConfigPath(),_0x3079c5=getProjectConfigPath();console[_0x3e053a(0x94)](_0x3e053a(0xb9)+(_0x13f881||a92_0x47be3c['gray'](_0x3e053a(0xbf)))),console['log'](_0x3e053a(0xa5)+(_0x3079c5||a92_0x47be3c['gray'](_0x3e053a(0xbf)))),console[_0x3e053a(0x94)](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](_0x3e053a(0xba))),console[_0x3e053a(0x94)](a92_0x47be3c['gray']('\x20\x20─'[_0x3e053a(0xb7)](0x1e)));const _0x406f97=(_0xa12b6f,_0x259708)=>{const _0x712a23=_0x3e053a;if(!_0x259708){console['log']('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c[_0x712a23(0xb4)](_0x712a23(0xbb)));return;}const _0x504dea=inspectCliConfigJsonFile(_0x259708);if(_0x504dea['status']==='ok')console['log']('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c['green'](_0x712a23(0xc0)));else{if(_0x504dea[_0x712a23(0xce)]==='empty')console[_0x712a23(0x94)]('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c[_0x712a23(0xd5)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x504dea[_0x712a23(0xce)]===_0x712a23(0x9a)?console['log']('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c[_0x712a23(0xb4)](_0x712a23(0x81))):(console[_0x712a23(0x94)]('\x20\x20'+_0xa12b6f[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c['red'](_0x712a23(0x8b))),console[_0x712a23(0x94)]('\x20\x20'+''[_0x712a23(0xcf)](0x11)+'\x20'+a92_0x47be3c['red'](_0x504dea[_0x712a23(0xa2)])));}};_0x406f97(_0x3e053a(0xab),_0x13f881),_0x406f97('Project',_0x3079c5),console[_0x3e053a(0x94)](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)]('\x20\x20Merged\x20Config')),console['log'](a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x85)[_0x3e053a(0xb7)](0x1e))),console[_0x3e053a(0x94)](_0x3e053a(0x93)+(_0x4e43f5['appCode']||a92_0x47be3c[_0x3e053a(0xd2)](_0x3e053a(0x97)))),console['log'](_0x3e053a(0x87)+_0x4e43f5[_0x3e053a(0xa7)]),console[_0x3e053a(0x94)](_0x3e053a(0xd0)+_0x4e43f5[_0x3e053a(0xa6)]),console[_0x3e053a(0x94)](_0x3e053a(0x82)+_0x4e43f5['apiDir']),console[_0x3e053a(0x94)](_0x3e053a(0xd9)+(_0x4e43f5[_0x3e053a(0xa4)]||a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x8d)))),console[_0x3e053a(0x94)](_0x3e053a(0xb0)+(_0x4e43f5['currentApp']||a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x8d)))),console[_0x3e053a(0x94)](_0x3e053a(0xd7)+(_0x4e43f5['explicitAppName']||a92_0x47be3c['gray'](_0x3e053a(0x8d)))),console[_0x3e053a(0x94)](_0x3e053a(0xc9)+(_0x4e43f5['format']||a92_0x47be3c['gray'](_0x3e053a(0x89)+DEFAULT_CONFIG_VALUES[_0x3e053a(0xd3)]+')'))),console[_0x3e053a(0x94)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4e43f5[_0x3e053a(0xc5)]??a92_0x47be3c['gray'](_0x3e053a(0x83)))),console[_0x3e053a(0x94)](_0x3e053a(0x91)+_0x4e43f5[_0x3e053a(0x8f)]),console[_0x3e053a(0x94)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4e43f5['verbose']),console[_0x3e053a(0x94)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4e43f5[_0x3e053a(0x9c)]?a92_0x47be3c['green'](_0x3e053a(0xbc)+_0x4e43f5['cookie'][_0x3e053a(0x88)]+')'):_0x1ea742?a92_0x47be3c[_0x3e053a(0x95)](_0x3e053a(0xb6)+_0x1ea742[_0x3e053a(0x88)]+')'):a92_0x47be3c['gray']('(none)')));const _0x3b26fb=Object[_0x3e053a(0xa0)](_0x4e43f5[_0x3e053a(0x8e)]);if(_0x3b26fb[_0x3e053a(0x88)]>0x0){console['log'](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](_0x3e053a(0xd6))),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)]('\x20\x20─'['repeat'](0x1e)));for(const _0x593f85 of _0x3b26fb){const _0x42d48a=_0x4e43f5[_0x3e053a(0x8e)][_0x593f85],_0xad71c5=_0x593f85===_0x4e43f5[_0x3e053a(0xa4)],_0x4a96be=_0x593f85===_0x4e43f5[_0x3e053a(0x99)],_0x349160=_0x4a96be?a92_0x47be3c[_0x3e053a(0x95)](_0x3e053a(0x92)):'',_0xb855a8=_0xad71c5?_0x3e053a(0xb3):'';console[_0x3e053a(0x94)]('\x20\x20'+_0x593f85+_0xb855a8+_0x349160),console['log'](_0x3e053a(0x8c)+_0x42d48a[_0x3e053a(0xaf)]);const _0x429e8f=buildAppDoctorFields(_0x42d48a,{'env':_0x4e43f5[_0x3e053a(0xa7)],'apiDir':_0x4e43f5[_0x3e053a(0xa8)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x3e053a(0xc8)],'cookie':_0x4e43f5[_0x3e053a(0x9c)]||_0x1ea742||undefined,'accessKey':_0x4e43f5[_0x3e053a(0xa1)]});console['log']('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x429e8f[_0x3e053a(0xa7)][_0x3e053a(0x9e)]+'\x20\x20'+a92_0x47be3c[_0x3e053a(0xb4)]('('+_0x429e8f[_0x3e053a(0xa7)][_0x3e053a(0xc6)]+')')),console[_0x3e053a(0x94)](_0x3e053a(0xb2)+_0x429e8f[_0x3e053a(0xc8)][_0x3e053a(0x9e)]+'\x20\x20'+a92_0x47be3c[_0x3e053a(0xb4)]('('+_0x429e8f[_0x3e053a(0xc8)]['source']+')'));const _0x5b18b4=_0x429e8f['cookie'][_0x3e053a(0x9e)]?a92_0x47be3c[_0x3e053a(0x95)](_0x3e053a(0xbc)+_0x429e8f[_0x3e053a(0x9c)]['value'][_0x3e053a(0x88)]+')'):a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x8d));console[_0x3e053a(0x94)](_0x3e053a(0xb8)+_0x5b18b4+'\x20\x20'+a92_0x47be3c[_0x3e053a(0xb4)]('('+_0x429e8f[_0x3e053a(0x9c)]['source']+')'));const _0x485075=_0x429e8f[_0x3e053a(0xa1)][_0x3e053a(0x9e)]?a92_0x47be3c['green'](_0x3e053a(0xbc)+_0x429e8f[_0x3e053a(0xa1)][_0x3e053a(0x9e)][_0x3e053a(0x88)]+')'):a92_0x47be3c[_0x3e053a(0xb4)]('(none)');console['log']('\x20\x20\x20\x20accessKey:\x20\x20'+_0x485075+'\x20\x20'+a92_0x47be3c[_0x3e053a(0xb4)]('('+_0x429e8f['accessKey'][_0x3e053a(0xc6)]+')'));}}console['log'](),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xc7)](_0x3e053a(0x96))),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x85)[_0x3e053a(0xb7)](0x1e))),console[_0x3e053a(0x94)](_0x3e053a(0xc4)+getApiDomain()),console[_0x3e053a(0x94)](_0x3e053a(0xc3)+getUserDomain()),console['log'](_0x3e053a(0xca)+getRuntimeDomain()),console[_0x3e053a(0x94)](),console[_0x3e053a(0x94)](a92_0x47be3c['bold']('\x20\x20Auth')),console[_0x3e053a(0x94)](a92_0x47be3c[_0x3e053a(0xb4)](_0x3e053a(0x85)[_0x3e053a(0xb7)](0x1e)));if(_0x1ea742){const _0x14b838=await getIsSessionValid();console[_0x3e053a(0x94)](_0x3e053a(0x9b)+(_0x14b838?a92_0x47be3c[_0x3e053a(0x95)](_0x3e053a(0xcc)):a92_0x47be3c[_0x3e053a(0xd2)]('✗\x20Expired')));}else console['log'](_0x3e053a(0x9b)+a92_0x47be3c[_0x3e053a(0xd2)](_0x3e053a(0xb1)));return console[_0x3e053a(0x94)](),{'ok':!![]};}function a92_0x495f(_0x246b76,_0x2011bc){_0x246b76=_0x246b76-0x81;const _0x409df1=a92_0x409d();let _0x495f71=_0x409df1[_0x246b76];return _0x495f71;}export const doctorDefinition={'service':'doctor','command':a92_0x445d71(0x90),'description':a92_0x445d71(0xd4),'risk':a92_0x445d71(0x84),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a92_0x2984fb=a92_0x5f5a;(function(_0x135d0f,_0x5f43b0){const _0x24e7c9=a92_0x5f5a,_0x3fed84=_0x135d0f();while(!![]){try{const _0xf92752=-parseInt(_0x24e7c9(0xd4))/0x1+parseInt(_0x24e7c9(0x9a))/0x2*(-parseInt(_0x24e7c9(0xd9))/0x3)+-parseInt(_0x24e7c9(0xca))/0x4*(parseInt(_0x24e7c9(0x8d))/0x5)+-parseInt(_0x24e7c9(0xcb))/0x6*(parseInt(_0x24e7c9(0xdf))/0x7)+-parseInt(_0x24e7c9(0xa0))/0x8*(parseInt(_0x24e7c9(0xcc))/0x9)+parseInt(_0x24e7c9(0xdd))/0xa*(parseInt(_0x24e7c9(0xe2))/0xb)+-parseInt(_0x24e7c9(0xe4))/0xc*(-parseInt(_0x24e7c9(0xc0))/0xd);if(_0xf92752===_0x5f43b0)break;else _0x3fed84['push'](_0x3fed84['shift']());}catch(_0x148e6a){_0x3fed84['push'](_0x3fed84['shift']());}}}(a92_0x281f,0x653f2));import a92_0x88b183 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x45d7f1){const _0x153fec=a92_0x5f5a,_0x2350a5=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x153fec(0x93)](0x0,0xa)+')':VERSION,_0x5ae6ad=buildConfigFromFlags({}),_0x1d06ec=getCookie();console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0xb9)](CLI_BIN_NAME+_0x153fec(0xab))),console[_0x153fec(0xb2)](a92_0x88b183['gray']('─'[_0x153fec(0xd8)](0x32))),console[_0x153fec(0xb2)](_0x153fec(0xdb)+_0x2350a5),console[_0x153fec(0xb2)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console[_0x153fec(0xb2)](_0x153fec(0x96)+process[_0x153fec(0xce)]+'\x20'+process[_0x153fec(0xa3)]),console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183['bold'](_0x153fec(0xe5))),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0x9b)]('\x20\x20─'[_0x153fec(0xd8)](0x1e)));const _0x4774d0=getGlobalConfigPath(),_0x22c2ac=getProjectConfigPath();console[_0x153fec(0xb2)](_0x153fec(0xc1)+(_0x4774d0||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0x8c)))),console[_0x153fec(0xb2)](_0x153fec(0x92)+(_0x22c2ac||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0x8c)))),console[_0x153fec(0xb2)](),console['log'](a92_0x88b183['bold'](_0x153fec(0xaa))),console[_0x153fec(0xb2)](a92_0x88b183['gray']('\x20\x20─'['repeat'](0x1e)));const _0x3b7b29=(_0x4bfbdf,_0x52ae92)=>{const _0x62ac0e=_0x153fec;if(!_0x52ae92){console[_0x62ac0e(0xb2)]('\x20\x20'+_0x4bfbdf[_0x62ac0e(0xc3)](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0x9b)]('(no\x20file)'));return;}const _0x17e386=inspectCliConfigJsonFile(_0x52ae92);if(_0x17e386[_0x62ac0e(0xc8)]==='ok')console[_0x62ac0e(0xb2)]('\x20\x20'+_0x4bfbdf[_0x62ac0e(0xc3)](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0xb4)](_0x62ac0e(0xba)));else{if(_0x17e386['status']===_0x62ac0e(0xac))console[_0x62ac0e(0xb2)]('\x20\x20'+_0x4bfbdf[_0x62ac0e(0xc3)](0x11)+'\x20'+a92_0x88b183['yellow'](_0x62ac0e(0xde)));else _0x17e386[_0x62ac0e(0xc8)]===_0x62ac0e(0xc6)?console[_0x62ac0e(0xb2)]('\x20\x20'+_0x4bfbdf['padEnd'](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0x9b)](_0x62ac0e(0xc4))):(console['log']('\x20\x20'+_0x4bfbdf['padEnd'](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0xd1)](_0x62ac0e(0xcd))),console[_0x62ac0e(0xb2)]('\x20\x20'+''[_0x62ac0e(0xc3)](0x11)+'\x20'+a92_0x88b183[_0x62ac0e(0xd1)](_0x17e386[_0x62ac0e(0x8f)])));}};_0x3b7b29(_0x153fec(0xb7),_0x4774d0),_0x3b7b29(_0x153fec(0xbc),_0x22c2ac),console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0xb9)](_0x153fec(0xa2))),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0x9b)]('\x20\x20─'[_0x153fec(0xd8)](0x1e))),console[_0x153fec(0xb2)](_0x153fec(0xc2)+(_0x5ae6ad[_0x153fec(0xe3)]||a92_0x88b183[_0x153fec(0xd1)]('(not\x20set)'))),console['log'](_0x153fec(0x91)+_0x5ae6ad['env']),console[_0x153fec(0xb2)](_0x153fec(0xcf)+_0x5ae6ad[_0x153fec(0x9c)]),console[_0x153fec(0xb2)](_0x153fec(0x98)+_0x5ae6ad['apiDir']),console[_0x153fec(0xb2)](_0x153fec(0xbf)+(_0x5ae6ad[_0x153fec(0x9d)]||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xd5)))),console[_0x153fec(0xb2)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x5ae6ad[_0x153fec(0xbe)]||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xd5)))),console['log'](_0x153fec(0xa9)+(_0x5ae6ad[_0x153fec(0xb5)]||a92_0x88b183['gray']('(none)'))),console[_0x153fec(0xb2)](_0x153fec(0xb6)+(_0x5ae6ad[_0x153fec(0xdc)]||a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xb1)+DEFAULT_CONFIG_VALUES[_0x153fec(0xdc)]+')'))),console['log'](_0x153fec(0xa4)+(_0x5ae6ad['pageSize']??a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xbd)))),console[_0x153fec(0xb2)](_0x153fec(0x90)+_0x5ae6ad['riskLevel']),console['log'](_0x153fec(0xb3)+_0x5ae6ad[_0x153fec(0x95)]),console[_0x153fec(0xb2)](_0x153fec(0x94)+(_0x5ae6ad[_0x153fec(0xda)]?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0xd3)+_0x5ae6ad['cookie'][_0x153fec(0x97)]+')'):_0x1d06ec?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0xbb)+_0x1d06ec[_0x153fec(0x97)]+')'):a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xd5))));const _0x3156c6=Object[_0x153fec(0xd2)](_0x5ae6ad[_0x153fec(0xe1)]);if(_0x3156c6[_0x153fec(0x97)]>0x0){console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183['bold'](_0x153fec(0xa7))),console[_0x153fec(0xb2)](a92_0x88b183['gray']('\x20\x20─'[_0x153fec(0xd8)](0x1e)));for(const _0x25f1cc of _0x3156c6){const _0x2adc3c=_0x5ae6ad[_0x153fec(0xe1)][_0x25f1cc],_0x2b783d=_0x25f1cc===_0x5ae6ad[_0x153fec(0x9d)],_0x127ced=_0x25f1cc===_0x5ae6ad[_0x153fec(0xbe)],_0xe05e56=_0x127ced?a92_0x88b183['green'](_0x153fec(0xb8)):'',_0x21a4d3=_0x2b783d?_0x153fec(0xd6):'';console[_0x153fec(0xb2)]('\x20\x20'+_0x25f1cc+_0x21a4d3+_0xe05e56),console[_0x153fec(0xb2)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x2adc3c[_0x153fec(0xe0)]);const _0x589241=buildAppDoctorFields(_0x2adc3c,{'env':_0x5ae6ad[_0x153fec(0xa8)],'apiDir':_0x5ae6ad[_0x153fec(0xc5)]['apiDir']||DEFAULT_CONFIG_VALUES[_0x153fec(0xd0)],'cookie':_0x5ae6ad[_0x153fec(0xda)]||_0x1d06ec||undefined,'accessKey':_0x5ae6ad['accessKey']});console['log']('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x589241[_0x153fec(0xa8)][_0x153fec(0x9f)]+'\x20\x20'+a92_0x88b183[_0x153fec(0x9b)]('('+_0x589241['env']['source']+')')),console[_0x153fec(0xb2)](_0x153fec(0xa1)+_0x589241['apiDir'][_0x153fec(0x9f)]+'\x20\x20'+a92_0x88b183[_0x153fec(0x9b)]('('+_0x589241['apiDir']['source']+')'));const _0x5ba1c4=_0x589241['cookie'][_0x153fec(0x9f)]?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0xd3)+_0x589241[_0x153fec(0xda)]['value'][_0x153fec(0x97)]+')'):a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xd5));console[_0x153fec(0xb2)](_0x153fec(0xc9)+_0x5ba1c4+'\x20\x20'+a92_0x88b183[_0x153fec(0x9b)]('('+_0x589241['cookie'][_0x153fec(0xd7)]+')'));const _0x537d5f=_0x589241[_0x153fec(0xad)][_0x153fec(0x9f)]?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0xd3)+_0x589241[_0x153fec(0xad)][_0x153fec(0x9f)][_0x153fec(0x97)]+')'):a92_0x88b183['gray'](_0x153fec(0xd5));console[_0x153fec(0xb2)](_0x153fec(0xb0)+_0x537d5f+'\x20\x20'+a92_0x88b183[_0x153fec(0x9b)]('('+_0x589241['accessKey']['source']+')'));}}console[_0x153fec(0xb2)](),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0xb9)](_0x153fec(0xe6))),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0x9b)]('\x20\x20─'['repeat'](0x1e))),console[_0x153fec(0xb2)](_0x153fec(0xc7)+getApiDomain()),console[_0x153fec(0xb2)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x153fec(0xb2)](),console['log'](a92_0x88b183[_0x153fec(0xb9)](_0x153fec(0xa6))),console[_0x153fec(0xb2)](a92_0x88b183[_0x153fec(0x9b)](_0x153fec(0xaf)['repeat'](0x1e)));if(_0x1d06ec){const _0x17fc67=await getIsSessionValid();console[_0x153fec(0xb2)](_0x153fec(0x8e)+(_0x17fc67?a92_0x88b183[_0x153fec(0xb4)](_0x153fec(0x99)):a92_0x88b183[_0x153fec(0xd1)](_0x153fec(0xae))));}else console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a92_0x88b183[_0x153fec(0xd1)]('✗\x20Not\x20logged\x20in'));return console['log'](),{'ok':!![]};}function a92_0x5f5a(_0x280eeb,_0xc7773c){_0x280eeb=_0x280eeb-0x8c;const _0x281f02=a92_0x281f();let _0x5f5a83=_0x281f02[_0x280eeb];return _0x5f5a83;}function a92_0x281f(){const _0x11ba71=['\x20\x20\x20\x20accessKey:\x20\x20','(default:\x20','log','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','explicitAppName','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','\x20←\x20current','bold','✓\x20Valid\x20JSON','(set\x20via\x20file,\x20length=','Project','(default)','currentApp','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','2977EgfJpR','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','(missing)','raw','missing','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','status','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','2852112rnjBuJ','2058JYjepX','45noGSQW','✗\x20Invalid\x20JSON','platform','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apiDir','red','keys','(set,\x20length=','114500NFzolH','(none)','\x20(default)','source','repeat','82407urRYKD','cookie','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','format','50TTUJuZ','⚠\x20Empty\x20(treated\x20as\x20{})','16051kPXUgM','appcode','apps','1475529PVnloq','appCode','142224nsWSnQ','\x20\x20Config\x20Files','\x20\x20API\x20Endpoints','(not\x20found)','5aoNgvV','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','slice','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','verbose','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid','50mCDzEI','gray','locale','defaultApp','read','value','1070952BbPbGs','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','arch','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20Auth','\x20\x20Apps','env','\x20\x20explicitAppName:\x20','\x20\x20Config\x20JSON','\x20doctor','empty','accessKey','✗\x20Expired','\x20\x20─'];a92_0x281f=function(){return _0x11ba71;};return a92_0x281f();}export const doctorDefinition={'service':'doctor','command':'check','description':a92_0x2984fb(0xa5),'risk':a92_0x2984fb(0x9e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a93_0x245e64=a93_0x1bc9;(function(_0x2a0e9b,_0x36912a){const _0x57a5be=a93_0x1bc9,_0x43af2d=_0x2a0e9b();while(!![]){try{const _0x56bafc=-parseInt(_0x57a5be(0x1fe))/0x1*(-parseInt(_0x57a5be(0x1e3))/0x2)+parseInt(_0x57a5be(0x1fb))/0x3+parseInt(_0x57a5be(0x1e7))/0x4+parseInt(_0x57a5be(0x1f9))/0x5*(parseInt(_0x57a5be(0x1ea))/0x6)+-parseInt(_0x57a5be(0x1e6))/0x7*(parseInt(_0x57a5be(0x1fd))/0x8)+-parseInt(_0x57a5be(0x1f0))/0x9*(parseInt(_0x57a5be(0x1ef))/0xa)+-parseInt(_0x57a5be(0x1e5))/0xb*(parseInt(_0x57a5be(0x1f5))/0xc);if(_0x56bafc===_0x36912a)break;else _0x43af2d['push'](_0x43af2d['shift']());}catch(_0xe5169){_0x43af2d['push'](_0x43af2d['shift']());}}}(a93_0x24df,0xca636));import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';function a93_0x24df(){const _0x1a916c=['long-term','948098lwWYeE','boolean','77DsQzSJ','119NevMeH','4002144bVmEKP','str','appCode','11604srChGE','file','/smartapi/common/uploadFile','read','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','5140DlCVYl','17451QsZLUT','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','filepath','download','bool','796764qVKUBL','validation','\x20to\x20development\x20app\x20','filePath','2005jBorVB','string','1674018HwIghe','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','243632xTokbK','1IQCuvn','trim','query-url','File','path','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'];a93_0x24df=function(){return _0x1a916c;};return a93_0x24df();}function a93_0x1bc9(_0x534716,_0x3a6018){_0x534716=_0x534716-0x1dd;const _0x24df59=a93_0x24df();let _0x1bc940=_0x24df59[_0x534716];return _0x1bc940;}import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a93_0x245e64(0x1eb),'type':a93_0x245e64(0x1fa),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a93_0x245e64(0x1f2),'type':a93_0x245e64(0x1fa),'required':!![],'description':'Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a93_0x245e64(0x1f3),'type':a93_0x245e64(0x1e4),'description':a93_0x245e64(0x1e1)},LONG_TERM_FLAG={'name':a93_0x245e64(0x1e2),'type':a93_0x245e64(0x1e4),'description':a93_0x245e64(0x1fc)};function requireFilePath(_0x31d720){const _0x4a00b9=a93_0x245e64,_0x2a55af=_0x31d720[_0x4a00b9(0x1dd)]();if(!_0x2a55af)throw CliErrors[_0x4a00b9(0x1f6)]('filePath\x20is\x20required.');return _0x2a55af;}const fileUpload={'service':a93_0x245e64(0x1eb),'command':'upload','description':a93_0x245e64(0x1f1),'risk':a93_0x245e64(0x1ed),'flags':[FILE_FLAG],async 'dryRun'(_0x260f95){const _0xe7dd32=a93_0x245e64,_0x1622cc=requireDevelopmentUploadFile(_0x260f95['str'](_0xe7dd32(0x1eb)),_0xe7dd32(0x1df));return{'method':'POST','url':_0xe7dd32(0x1ec),'body':{'appCode':_0x260f95[_0xe7dd32(0x1e9)],'multipart':{'file':_0x1622cc}},'description':'Preview:\x20upload\x20'+_0x1622cc[_0xe7dd32(0x1e0)]+_0xe7dd32(0x1f7)+_0x260f95[_0xe7dd32(0x1e9)]};},async 'execute'(_0x2d3b6e){const _0x5aa5f6=a93_0x245e64,_0x4902e9=requireDevelopmentUploadFile(_0x2d3b6e[_0x5aa5f6(0x1e8)](_0x5aa5f6(0x1eb)),_0x5aa5f6(0x1df)),_0x5559c8=await uploadDevelopmentFile(_0x2d3b6e[_0x5aa5f6(0x1e9)],_0x4902e9['path']);return{'ok':!![],'data':_0x5559c8,'message':_0x5559c8[_0x5aa5f6(0x1f8)]?'Uploaded\x20file:\x20'+_0x5559c8[_0x5aa5f6(0x1f8)]+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':'file','command':a93_0x245e64(0x1de),'description':a93_0x245e64(0x1ee),'risk':a93_0x245e64(0x1ed),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x1202ff){const _0x53d018=a93_0x245e64,_0x11e39d=requireFilePath(_0x1202ff[_0x53d018(0x1e8)](_0x53d018(0x1f2))),_0x2004be=await queryDevelopmentFileUrl(_0x11e39d,{'download':_0x1202ff[_0x53d018(0x1f4)](_0x53d018(0x1f3)),'longTerm':_0x1202ff[_0x53d018(0x1f4)](_0x53d018(0x1e2))});return{'ok':!![],'data':_0x2004be};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a93_0x3e419d=a93_0x1235;(function(_0x3d5411,_0xb9af2e){const _0x21fc11=a93_0x1235,_0x28cecd=_0x3d5411();while(!![]){try{const _0x4340a0=parseInt(_0x21fc11(0xbd))/0x1+parseInt(_0x21fc11(0xd6))/0x2+parseInt(_0x21fc11(0xc0))/0x3+-parseInt(_0x21fc11(0xc7))/0x4*(-parseInt(_0x21fc11(0xc9))/0x5)+parseInt(_0x21fc11(0xbb))/0x6*(-parseInt(_0x21fc11(0xc2))/0x7)+parseInt(_0x21fc11(0xba))/0x8*(-parseInt(_0x21fc11(0xd4))/0x9)+-parseInt(_0x21fc11(0xd2))/0xa;if(_0x4340a0===_0xb9af2e)break;else _0x28cecd['push'](_0x28cecd['shift']());}catch(_0x2dc279){_0x28cecd['push'](_0x28cecd['shift']());}}}(a93_0x4055,0x342ee));function a93_0x1235(_0x10f7c8,_0x46fba4){_0x10f7c8=_0x10f7c8-0xb8;const _0x40555c=a93_0x4055();let _0x12359f=_0x40555c[_0x10f7c8];return _0x12359f;}function a93_0x4055(){const _0x5dfab0=['long-term','126BPFMoM','validation','492206uHyxlq','bool','upload','read','trim','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','POST','filePath\x20is\x20required.','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20or\x20immediate\x20access','query-url','176248lOHBgb','423972AfqgOq','string','35919Aceitd','filePath','Path\x20to\x20the\x20local\x20file\x20to\x20upload','799698bZiXfb','Development\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','14nFzXNy','path','download','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','\x20to\x20development\x20app\x20','7368xPXrWZ','str','810AqAuix','Uploaded\x20file:\x20','filepath','file','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Preview:\x20upload\x20','appCode','boolean','File','1834920rQqWPt'];a93_0x4055=function(){return _0x5dfab0;};return a93_0x4055();}import{requireDevelopmentUploadFile}from'../../commands/common/local-file.js';import{queryDevelopmentFileUrl,uploadDevelopmentFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const FILE_FLAG={'name':a93_0x3e419d(0xcc),'type':'string','required':!![],'description':a93_0x3e419d(0xbf)},FILEPATH_FLAG={'name':a93_0x3e419d(0xcb),'type':a93_0x3e419d(0xbc),'required':!![],'description':a93_0x3e419d(0xc1)},DOWNLOAD_FLAG={'name':a93_0x3e419d(0xc4),'type':a93_0x3e419d(0xd0),'description':a93_0x3e419d(0xdc)},LONG_TERM_FLAG={'name':a93_0x3e419d(0xd3),'type':a93_0x3e419d(0xd0),'description':a93_0x3e419d(0xc5)};function requireFilePath(_0xfb4af8){const _0x30d046=a93_0x3e419d,_0x5d99a5=_0xfb4af8[_0x30d046(0xda)]();if(!_0x5d99a5)throw CliErrors[_0x30d046(0xd5)](_0x30d046(0xde));return _0x5d99a5;}const fileUpload={'service':a93_0x3e419d(0xcc),'command':a93_0x3e419d(0xd8),'description':a93_0x3e419d(0xcd),'risk':a93_0x3e419d(0xd9),'flags':[FILE_FLAG],async 'dryRun'(_0x5c783f){const _0x2cbe11=a93_0x3e419d,_0x4df69e=requireDevelopmentUploadFile(_0x5c783f[_0x2cbe11(0xc8)](_0x2cbe11(0xcc)),_0x2cbe11(0xd1));return{'method':_0x2cbe11(0xdd),'url':'/smartapi/common/uploadFile','body':{'appCode':_0x5c783f[_0x2cbe11(0xcf)],'multipart':{'file':_0x4df69e}},'description':_0x2cbe11(0xce)+_0x4df69e[_0x2cbe11(0xc3)]+_0x2cbe11(0xc6)+_0x5c783f['appCode']};},async 'execute'(_0x1886e5){const _0x448470=a93_0x3e419d,_0x474040=requireDevelopmentUploadFile(_0x1886e5['str'](_0x448470(0xcc)),_0x448470(0xd1)),_0x127eef=await uploadDevelopmentFile(_0x1886e5['appCode'],_0x474040[_0x448470(0xc3)]);return{'ok':!![],'data':_0x127eef,'message':_0x127eef[_0x448470(0xbe)]?_0x448470(0xca)+_0x127eef[_0x448470(0xbe)]+_0x448470(0xdb):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a93_0x3e419d(0xcc),'command':a93_0x3e419d(0xb9),'description':a93_0x3e419d(0xb8),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x37b828){const _0x5b7b98=a93_0x3e419d,_0x15f0db=requireFilePath(_0x37b828['str'](_0x5b7b98(0xcb))),_0x1dd507=await queryDevelopmentFileUrl(_0x15f0db,{'download':_0x37b828[_0x5b7b98(0xd7)](_0x5b7b98(0xc4)),'longTerm':_0x37b828[_0x5b7b98(0xd7)]('long-term')});return{'ok':!![],'data':_0x1dd507};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a94_0x56b3e6=a94_0x1155;(function(_0x1000dc,_0x485142){const _0x39d27c=a94_0x1155,_0x4c1b12=_0x1000dc();while(!![]){try{const _0x4e7dab=-parseInt(_0x39d27c(0xe6))/0x1*(-parseInt(_0x39d27c(0xdd))/0x2)+-parseInt(_0x39d27c(0xd4))/0x3+parseInt(_0x39d27c(0xc2))/0x4*(parseInt(_0x39d27c(0xc6))/0x5)+-parseInt(_0x39d27c(0xce))/0x6*(parseInt(_0x39d27c(0xcd))/0x7)+parseInt(_0x39d27c(0xd1))/0x8*(parseInt(_0x39d27c(0xca))/0x9)+-parseInt(_0x39d27c(0xcc))/0xa+-parseInt(_0x39d27c(0xc1))/0xb;if(_0x4e7dab===_0x485142)break;else _0x4c1b12['push'](_0x4c1b12['shift']());}catch(_0x585d07){_0x4c1b12['push'](_0x4c1b12['shift']());}}}(a94_0x4f1b,0xeb9e9));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a94_0x4f1b(){const _0xb026f1=['yes','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','1662426WIlbZd','nonInteractive','16524330MOtxBZ','7UVuejh','587172HuIHiO','production','init','16QlQujp','str','\x20\x20Config:\x20','2438418QGsXea','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','Use\x20`','bool','log','defaultApp','boolean','validation','map','301802icXRjj','appcode','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','global','appCode','cwd','valid','\x20\x20Apps:\x20','\x0a✓\x20Successfully\x20initialized\x20','11tZAnsl','Usage:\x20','检测到旧配置文件,正在自动升级...\x0a','env','some','project','\x20\x20Default:\x20','Target\x20environment','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','843799xqaMCm','32zMjyBf','Write\x20to\x20global\x20config\x20instead\x20of\x20project','flagMissing','Auto-confirm\x20prompts','984730mzZCpL','run'];a94_0x4f1b=function(){return _0xb026f1;};return a94_0x4f1b();}import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';function a94_0x1155(_0x941c1b,_0x4b348b){_0x941c1b=_0x941c1b-0xbf;const _0x4f1baa=a94_0x4f1b();let _0x115548=_0x4f1baa[_0x941c1b];return _0x115548;}import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x5c9282){return{'appCode':_0x5c9282,'appName':_0x5c9282};}function writeInitConfig(_0x2218d4,_0x3b04ad,_0x3d737e){const _0x487801=a94_0x1155,_0x1de5f9=resolveWriteConfigPath(_0x2218d4),_0xb1779a=buildCanonicalProjectConfig({},{'appCodes':_0x3b04ad[_0x487801(0xdc)](_0x4d2a79=>_0x4d2a79[_0x487801(0xe1)]),'env':_0x3d737e,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x1de5f9,_0xb1779a);const _0x507fd6=_0x2218d4===_0x487801(0xe0)?_0x487801(0xe0):'project';console[_0x487801(0xd8)](_0x487801(0xe5)+_0x507fd6+'\x20config'),console[_0x487801(0xd8)](_0x487801(0xe4)+_0x3b04ad[_0x487801(0xdc)](_0x133530=>_0x133530['appCode'])['join'](',\x20')),console['log'](_0x487801(0xec)+_0xb1779a[_0x487801(0xd9)]),console[_0x487801(0xd8)]('\x20\x20Env:\x20'+_0xb1779a[_0x487801(0xe9)]),console[_0x487801(0xd8)](_0x487801(0xd3)+_0x1de5f9);}async function runSmartInit(_0x299702){const _0x44f878=a94_0x1155,_0x1eb48f=process[_0x44f878(0xe2)](),_0x41b1fb=_0x299702[_0x44f878(0xd7)]('global')?_0x44f878(0xe0):_0x44f878(0xeb),_0x3eeb29=_0x299702[_0x44f878(0xd2)]('env')||_0x44f878(0xcf),_0x87c338=_0x299702[_0x44f878(0xd2)](_0x44f878(0xde))||undefined;if(_0x41b1fb===_0x44f878(0xeb)){const _0x2a5c61=existsSync(resolve(_0x1eb48f,NEW_CONFIG_NAME)),_0x446830=LEGACY_CONFIG_NAMES[_0x44f878(0xea)](_0x226ca2=>existsSync(resolve(_0x1eb48f,_0x226ca2)));if(_0x446830&&!_0x2a5c61)return console['log'](_0x44f878(0xe8)),upgradeApp(_0x299702[_0x44f878(0xcb)],{'yes':_0x299702['bool']('yes')});if(_0x2a5c61)throw CliErrors[_0x44f878(0xdb)](_0x44f878(0xdf),_0x44f878(0xd6)+CLI_BIN_NAME+_0x44f878(0xc0));}if(_0x87c338){const _0x5c79dd=validateAppcode(_0x87c338);if(!_0x5c79dd[_0x44f878(0xe3)])throw CliErrors[_0x44f878(0xdb)](_0x5c79dd['message']);writeInitConfig(_0x41b1fb,[syntheticApp(_0x87c338)],_0x3eeb29);return;}if(_0x299702[_0x44f878(0xcb)])throw CliErrors[_0x44f878(0xc4)](_0x44f878(0xde),_0x44f878(0xe7)+CLI_BIN_NAME+_0x44f878(0xc9));const _0x577967=getCookie(),_0x289537=await selectMultipleApps(_0x577967),_0xf9b13f=_0x289537==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x289537;writeInitConfig(_0x41b1fb,_0xf9b13f,_0x3eeb29);}const initFlags=[{'name':a94_0x56b3e6(0xe0),'type':a94_0x56b3e6(0xda),'description':a94_0x56b3e6(0xc3),'default':![]},{'name':a94_0x56b3e6(0xe9),'type':'string','description':a94_0x56b3e6(0xbf),'default':a94_0x56b3e6(0xcf),'enum':[...RABETBASE_ENV_VALUES]},{'name':'appcode','type':'string','description':'App\x20code\x20to\x20initialize\x20with'},{'name':a94_0x56b3e6(0xc8),'type':'boolean','description':a94_0x56b3e6(0xc5),'default':![]}];export const initDefinitions=[{'service':a94_0x56b3e6(0xd0),'command':a94_0x56b3e6(0xc7),'description':a94_0x56b3e6(0xd5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x586b71){return await runSmartInit(_0x586b71),{'ok':!![]};}}];
1
+ const a94_0x24d6b4=a94_0x5570;(function(_0x4048ec,_0x3021d1){const _0x731a60=a94_0x5570,_0x5adf53=_0x4048ec();while(!![]){try{const _0x11e529=-parseInt(_0x731a60(0x206))/0x1*(parseInt(_0x731a60(0x1e9))/0x2)+-parseInt(_0x731a60(0x215))/0x3+parseInt(_0x731a60(0x204))/0x4+-parseInt(_0x731a60(0x1f1))/0x5*(parseInt(_0x731a60(0x1fe))/0x6)+parseInt(_0x731a60(0x213))/0x7+-parseInt(_0x731a60(0x20c))/0x8+parseInt(_0x731a60(0x1f6))/0x9;if(_0x11e529===_0x3021d1)break;else _0x5adf53['push'](_0x5adf53['shift']());}catch(_0x1c178f){_0x5adf53['push'](_0x5adf53['shift']());}}}(a94_0x1c25,0x576c9));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';function a94_0x1c25(){const _0x25b5c1=['Auto-confirm\x20prompts','env','cwd','2785700upEVDM','Write\x20to\x20global\x20config\x20instead\x20of\x20project','1duQkUX','write','map','flagMissing','appCode','log','4797320jncFhC','Target\x20environment','toLocaleString','boolean','production','global','\x0a✓\x20Successfully\x20initialized\x20','1835764rIxIiZ','Use\x20`','813015QCArwR','defaultApp','join','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','App\x20code\x20to\x20initialize\x20with','819158sfEEXB','\x20\x20Apps:\x20','some','message','\x20\x20Env:\x20','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','\x20\x20Config:\x20','custom','10UVhUZb','yes','project','valid','检测到旧配置文件,正在自动升级...\x0a','6199533YNqKdf','Usage:\x20','nonInteractive','\x20config','run','appcode','bool','string','27528BRGMve','validation','str'];a94_0x1c25=function(){return _0x25b5c1;};return a94_0x1c25();}import{upgradeApp}from'../../commands/project/upgrade.js';import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x57da88){return{'appCode':_0x57da88,'appName':_0x57da88};}function writeInitConfig(_0x1ea657,_0x12aed5,_0x4bbaaa){const _0x3f06f7=a94_0x5570,_0x63614e=resolveWriteConfigPath(_0x1ea657),_0xca3a82=buildCanonicalProjectConfig({},{'appCodes':_0x12aed5[_0x3f06f7(0x208)](_0x2e7b95=>_0x2e7b95[_0x3f06f7(0x20a)]),'env':_0x4bbaaa,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x3f06f7(0x20e)]()}});writeConfigFile(_0x63614e,_0xca3a82);const _0x446d9d=_0x1ea657==='global'?_0x3f06f7(0x211):_0x3f06f7(0x1f3);console[_0x3f06f7(0x20b)](_0x3f06f7(0x212)+_0x446d9d+_0x3f06f7(0x1f9)),console[_0x3f06f7(0x20b)](_0x3f06f7(0x1ea)+_0x12aed5[_0x3f06f7(0x208)](_0x426938=>_0x426938[_0x3f06f7(0x20a)])[_0x3f06f7(0x217)](',\x20')),console[_0x3f06f7(0x20b)]('\x20\x20Default:\x20'+_0xca3a82[_0x3f06f7(0x216)]),console['log'](_0x3f06f7(0x1ed)+_0xca3a82[_0x3f06f7(0x202)]),console[_0x3f06f7(0x20b)](_0x3f06f7(0x1ef)+_0x63614e);}function a94_0x5570(_0x2519df,_0x5a59fd){_0x2519df=_0x2519df-0x1e9;const _0x1c258c=a94_0x1c25();let _0x5570a2=_0x1c258c[_0x2519df];return _0x5570a2;}async function runSmartInit(_0x5c80dd){const _0x4e2d0b=a94_0x5570,_0x36522b=process[_0x4e2d0b(0x203)](),_0x2e6275=_0x5c80dd[_0x4e2d0b(0x1fc)](_0x4e2d0b(0x211))?_0x4e2d0b(0x211):_0x4e2d0b(0x1f3),_0x3fe460=_0x5c80dd[_0x4e2d0b(0x200)](_0x4e2d0b(0x202))||_0x4e2d0b(0x210),_0x3a9f99=_0x5c80dd[_0x4e2d0b(0x200)](_0x4e2d0b(0x1fb))||undefined;if(_0x2e6275===_0x4e2d0b(0x1f3)){const _0x382af9=existsSync(resolve(_0x36522b,NEW_CONFIG_NAME)),_0x385f72=LEGACY_CONFIG_NAMES[_0x4e2d0b(0x1eb)](_0x5a465f=>existsSync(resolve(_0x36522b,_0x5a465f)));if(_0x385f72&&!_0x382af9)return console[_0x4e2d0b(0x20b)](_0x4e2d0b(0x1f5)),upgradeApp(_0x5c80dd[_0x4e2d0b(0x1f8)],{'yes':_0x5c80dd[_0x4e2d0b(0x1fc)](_0x4e2d0b(0x1f2))});if(_0x382af9)throw CliErrors[_0x4e2d0b(0x1ff)]('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.',_0x4e2d0b(0x214)+CLI_BIN_NAME+_0x4e2d0b(0x1ee));}if(_0x3a9f99){const _0x483ec7=validateAppcode(_0x3a9f99);if(!_0x483ec7[_0x4e2d0b(0x1f4)])throw CliErrors['validation'](_0x483ec7[_0x4e2d0b(0x1ec)]);writeInitConfig(_0x2e6275,[syntheticApp(_0x3a9f99)],_0x3fe460);return;}if(_0x5c80dd[_0x4e2d0b(0x1f8)])throw CliErrors[_0x4e2d0b(0x209)](_0x4e2d0b(0x1fb),_0x4e2d0b(0x1f7)+CLI_BIN_NAME+_0x4e2d0b(0x218));const _0x8077d2=getCookie(),_0x3fcf79=await selectMultipleApps(_0x8077d2),_0x480751=_0x3fcf79===_0x4e2d0b(0x1f0)?[syntheticApp(await promptCustomAppcode())]:_0x3fcf79;writeInitConfig(_0x2e6275,_0x480751,_0x3fe460);}const initFlags=[{'name':a94_0x24d6b4(0x211),'type':a94_0x24d6b4(0x20f),'description':a94_0x24d6b4(0x205),'default':![]},{'name':a94_0x24d6b4(0x202),'type':a94_0x24d6b4(0x1fd),'description':a94_0x24d6b4(0x20d),'default':a94_0x24d6b4(0x210),'enum':[...RABETBASE_ENV_VALUES]},{'name':a94_0x24d6b4(0x1fb),'type':a94_0x24d6b4(0x1fd),'description':a94_0x24d6b4(0x219)},{'name':'yes','type':a94_0x24d6b4(0x20f),'description':a94_0x24d6b4(0x201),'default':![]}];export const initDefinitions=[{'service':'init','command':a94_0x24d6b4(0x1fa),'description':'Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','risk':a94_0x24d6b4(0x207),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x2845ba){return await runSmartInit(_0x2845ba),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x2cd57a,_0x5da48e){const _0x32bc7f=a95_0x371c,_0x5a90f4=_0x2cd57a();while(!![]){try{const _0x29d5f3=parseInt(_0x32bc7f(0x14f))/0x1+-parseInt(_0x32bc7f(0x152))/0x2+-parseInt(_0x32bc7f(0x155))/0x3+parseInt(_0x32bc7f(0x151))/0x4+parseInt(_0x32bc7f(0x153))/0x5*(parseInt(_0x32bc7f(0x154))/0x6)+parseInt(_0x32bc7f(0x156))/0x7+-parseInt(_0x32bc7f(0x150))/0x8;if(_0x29d5f3===_0x5da48e)break;else _0x5a90f4['push'](_0x5a90f4['shift']());}catch(_0x5a27da){_0x5a90f4['push'](_0x5a90f4['shift']());}}}(a95_0x1863,0x60074));import{issueReport}from'../../commands/issue/report.js';function a95_0x1863(){const _0x4e8c79=['5423992FTXEHs','784392DkwaQy','1007376NQdPKN','31295QALiNH','750axbvXy','1270395QMnaAU','5239556QXjsqu','271503BFWExL'];a95_0x1863=function(){return _0x4e8c79;};return a95_0x1863();}function a95_0x371c(_0x125520,_0x216595){_0x125520=_0x125520-0x14f;const _0x1863a0=a95_0x1863();let _0x371c96=_0x1863a0[_0x125520];return _0x371c96;}export const issueDefinitions=[issueReport];
1
+ (function(_0x11dcab,_0x2aecb3){const _0xa8baf6=a95_0x5f01,_0x31de20=_0x11dcab();while(!![]){try{const _0x1cc1b4=-parseInt(_0xa8baf6(0x157))/0x1+-parseInt(_0xa8baf6(0x15e))/0x2+parseInt(_0xa8baf6(0x159))/0x3*(parseInt(_0xa8baf6(0x15f))/0x4)+parseInt(_0xa8baf6(0x160))/0x5+parseInt(_0xa8baf6(0x15d))/0x6*(parseInt(_0xa8baf6(0x15c))/0x7)+-parseInt(_0xa8baf6(0x15b))/0x8*(-parseInt(_0xa8baf6(0x158))/0x9)+parseInt(_0xa8baf6(0x15a))/0xa;if(_0x1cc1b4===_0x2aecb3)break;else _0x31de20['push'](_0x31de20['shift']());}catch(_0x2c0890){_0x31de20['push'](_0x31de20['shift']());}}}(a95_0x5282,0xb842f));function a95_0x5f01(_0x36cbc4,_0x4baeb7){_0x36cbc4=_0x36cbc4-0x157;const _0x528295=a95_0x5282();let _0x5f016f=_0x528295[_0x36cbc4];return _0x5f016f;}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a95_0x5282(){const _0x26ea98=['1608864qKyLjm','154064CvRkqa','2287905vfnIrL','1365880eFceXA','1314GEIqDh','3wZbeed','10033120ETKEHu','18752gpqHBF','1263983HJXzTY','36zLZquI'];a95_0x5282=function(){return _0x26ea98;};return a95_0x5282();}
@@ -1 +1 @@
1
- const a96_0x550062=a96_0x31fa;(function(_0x48008a,_0x173662){const _0x3d1edd=a96_0x31fa,_0x2787e2=_0x48008a();while(!![]){try{const _0x4fca54=-parseInt(_0x3d1edd(0x20b))/0x1+parseInt(_0x3d1edd(0x1fa))/0x2+-parseInt(_0x3d1edd(0x1ff))/0x3*(parseInt(_0x3d1edd(0x1f8))/0x4)+parseInt(_0x3d1edd(0x1fb))/0x5*(parseInt(_0x3d1edd(0x213))/0x6)+parseInt(_0x3d1edd(0x1fe))/0x7*(parseInt(_0x3d1edd(0x203))/0x8)+-parseInt(_0x3d1edd(0x20c))/0x9+parseInt(_0x3d1edd(0x207))/0xa*(parseInt(_0x3d1edd(0x20d))/0xb);if(_0x4fca54===_0x173662)break;else _0x2787e2['push'](_0x2787e2['shift']());}catch(_0xfe6dbc){_0x2787e2['push'](_0x2787e2['shift']());}}}(a96_0x5184,0x83476));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a96_0x550062(0x202);function a96_0x5184(){const _0x1b1af1=['320IIOvui','message','config_missing','31689PtNJXZ','4935lOVPqa','\x20\x20Set\x20','trim','RABETBASE_DISABLE_ISSUE_NUDGE','512GLCIKW','stderr','replace','cancelled','860QTMHtV','slice','length','Hit\x20a\x20','638224RhhFHk','533556fdWxZD','62579JfUmUd','\x20bug?\x20Help\x20us\x20fix\x20it:','\x22\x20\x5c','unknown_command','auth_required','validation_error','100272prcRql','\x20issue\x20report\x20\x5c','=1\x20to\x20silence\x20this\x20hint.','has','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','network_error','service','command','report','\x20\x20\x20\x20--title\x20\x22','2496vHCCVu','join','826312CicEFK'];a96_0x5184=function(){return _0x1b1af1;};return a96_0x5184();}const NUDGE_SUPPRESSED_CODES=new Set([a96_0x550062(0x206),a96_0x550062(0x211),a96_0x550062(0x1fd),'not_in_project',a96_0x550062(0x210),'flag_missing',a96_0x550062(0x212),a96_0x550062(0x1f3)]),defaultWriter=_0x3e3b25=>{const _0x4f2b9a=a96_0x550062;process[_0x4f2b9a(0x204)]['write'](_0x3e3b25);};export function shouldNudgeForError(_0x39d468,_0x269ad8){const _0x1d7b54=a96_0x550062;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x269ad8[_0x1d7b54(0x1f4)]==='issue'&&_0x269ad8[_0x1d7b54(0x1f5)]===_0x1d7b54(0x1f6))return![];if(_0x39d468 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x1d7b54(0x1f0)](_0x39d468['code']);return!![];}function a96_0x31fa(_0x225297,_0x1cbb3d){_0x225297=_0x225297-0x1f0;const _0x518495=a96_0x5184();let _0x31fab4=_0x518495[_0x225297];return _0x31fab4;}export function printIssueReportNudgeForError(_0x4fcf7c,_0x9af04f,_0x1e6bbc=defaultWriter){if(!shouldNudgeForError(_0x4fcf7c,_0x9af04f))return;const _0x3fe511=buildSuggestedTitle(_0x4fcf7c,_0x9af04f);_0x1e6bbc(formatNudge(_0x3fe511));}function buildSuggestedTitle(_0x26f0c6,_0x2f35fa){const _0x5c2b2d=a96_0x550062,_0x13f9a2=_0x26f0c6 instanceof Error?_0x26f0c6[_0x5c2b2d(0x1fc)]:String(_0x26f0c6),_0x532bb7=_0x13f9a2[_0x5c2b2d(0x205)](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x5c2b2d(0x201)]()[_0x5c2b2d(0x208)](0x0,0x78)[_0x5c2b2d(0x205)](/"/g,'\x5c\x22'),_0x11c053=CLI_BIN_NAME+'\x20'+_0x2f35fa[_0x5c2b2d(0x1f4)]+'\x20'+_0x2f35fa['command'];return _0x532bb7[_0x5c2b2d(0x209)]>0x0?_0x11c053+':\x20'+_0x532bb7:_0x11c053;}function formatNudge(_0x248d3b){const _0x3d5f60=a96_0x550062;return['',_0x3d5f60(0x20a)+CLI_BIN_NAME+_0x3d5f60(0x20e),'\x20\x20'+CLI_BIN_NAME+_0x3d5f60(0x214),_0x3d5f60(0x1f7)+_0x248d3b+_0x3d5f60(0x20f),_0x3d5f60(0x1f2),_0x3d5f60(0x1f1),_0x3d5f60(0x200)+NUDGE_OPT_OUT_ENV+_0x3d5f60(0x215),''][_0x3d5f60(0x1f9)]('\x0a');}
1
+ function a96_0xee67(_0x445b08,_0x52b61c){_0x445b08=_0x445b08-0x10e;const _0xe57f47=a96_0xe57f();let _0xee67ce=_0xe57f47[_0x445b08];return _0xee67ce;}const a96_0x35ff73=a96_0xee67;(function(_0x52a356,_0x2c2cfd){const _0x29302c=a96_0xee67,_0x32b6dc=_0x52a356();while(!![]){try{const _0x44b871=-parseInt(_0x29302c(0x12b))/0x1+-parseInt(_0x29302c(0x11e))/0x2*(parseInt(_0x29302c(0x11b))/0x3)+-parseInt(_0x29302c(0x111))/0x4*(parseInt(_0x29302c(0x118))/0x5)+parseInt(_0x29302c(0x125))/0x6+-parseInt(_0x29302c(0x112))/0x7*(parseInt(_0x29302c(0x12e))/0x8)+-parseInt(_0x29302c(0x117))/0x9+parseInt(_0x29302c(0x12c))/0xa*(parseInt(_0x29302c(0x114))/0xb);if(_0x44b871===_0x2c2cfd)break;else _0x32b6dc['push'](_0x32b6dc['shift']());}catch(_0x3d261a){_0x32b6dc['push'](_0x32b6dc['shift']());}}}(a96_0xe57f,0xef6ac));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';const NUDGE_SUPPRESSED_CODES=new Set(['cancelled',a96_0x35ff73(0x123),a96_0x35ff73(0x129),'not_in_project','unknown_command','flag_missing',a96_0x35ff73(0x116),a96_0x35ff73(0x122)]),defaultWriter=_0x35a9a5=>{const _0x29aabc=a96_0x35ff73;process[_0x29aabc(0x127)]['write'](_0x35a9a5);};function a96_0xe57f(){const _0x4d3c7a=['network_error','auth_required','message','6928062fGZZvm','\x20bug?\x20Help\x20us\x20fix\x20it:','stderr','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','config_missing','Hit\x20a\x20','1714557sXuxcc','49942730wXHJuO','\x20\x20Set\x20','27992hICBZs','trim','report','code','command','1448seqsGp','749xliVBq','join','11msNewt','issue','validation_error','13785291gploIc','9655pBlVHb','=1\x20to\x20silence\x20this\x20hint.','replace','6753JIemeJ','length','\x20\x20\x20\x20--title\x20\x22','754KFDVNW','has','slice','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22'];a96_0xe57f=function(){return _0x4d3c7a;};return a96_0xe57f();}export function shouldNudgeForError(_0x2399fc,_0x16f745){const _0x43d598=a96_0x35ff73;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x16f745['service']===_0x43d598(0x115)&&_0x16f745['command']===_0x43d598(0x10e))return![];if(_0x2399fc instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x43d598(0x11f)](_0x2399fc[_0x43d598(0x10f)]);return!![];}export function printIssueReportNudgeForError(_0x4b70ae,_0x47bdb6,_0x3a0606=defaultWriter){if(!shouldNudgeForError(_0x4b70ae,_0x47bdb6))return;const _0x37220a=buildSuggestedTitle(_0x4b70ae,_0x47bdb6);_0x3a0606(formatNudge(_0x37220a));}function buildSuggestedTitle(_0x5c169d,_0x2f2945){const _0x517248=a96_0x35ff73,_0x3824da=_0x5c169d instanceof Error?_0x5c169d[_0x517248(0x124)]:String(_0x5c169d),_0x4414e1=_0x3824da['replace'](/[\r\n]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x517248(0x12f)]()[_0x517248(0x120)](0x0,0x78)[_0x517248(0x11a)](/"/g,'\x5c\x22'),_0x4581a0=CLI_BIN_NAME+'\x20'+_0x2f2945['service']+'\x20'+_0x2f2945[_0x517248(0x110)];return _0x4414e1[_0x517248(0x11c)]>0x0?_0x4581a0+':\x20'+_0x4414e1:_0x4581a0;}function formatNudge(_0x4814b3){const _0x185566=a96_0x35ff73;return['',_0x185566(0x12a)+CLI_BIN_NAME+_0x185566(0x126),'\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0x185566(0x11d)+_0x4814b3+'\x22\x20\x5c',_0x185566(0x121),_0x185566(0x128),_0x185566(0x12d)+NUDGE_OPT_OUT_ENV+_0x185566(0x119),''][_0x185566(0x113)]('\x0a');}
@@ -1 +1 @@
1
- const a97_0x1aa07d=a97_0x5837;(function(_0x543baa,_0x2238de){const _0xf61672=a97_0x5837,_0x18c384=_0x543baa();while(!![]){try{const _0x27d4a5=-parseInt(_0xf61672(0x139))/0x1*(parseInt(_0xf61672(0x15e))/0x2)+-parseInt(_0xf61672(0x130))/0x3+parseInt(_0xf61672(0x149))/0x4*(-parseInt(_0xf61672(0x15f))/0x5)+-parseInt(_0xf61672(0x12a))/0x6*(parseInt(_0xf61672(0x13d))/0x7)+-parseInt(_0xf61672(0x14a))/0x8*(-parseInt(_0xf61672(0x13a))/0x9)+-parseInt(_0xf61672(0x144))/0xa+parseInt(_0xf61672(0x126))/0xb;if(_0x27d4a5===_0x2238de)break;else _0x18c384['push'](_0x18c384['shift']());}catch(_0x35804a){_0x18c384['push'](_0x18c384['shift']());}}}(a97_0x2c4b,0xf3403));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a97_0x5837(_0x95ede4,_0x979553){_0x95ede4=_0x95ede4-0x124;const _0x2c4be7=a97_0x2c4b();let _0x58377e=_0x2c4be7[_0x95ede4];return _0x58377e;}import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';function a97_0x2c4b(){const _0x2b0527=['172948uQfrVP','48VPCHmI','Failed\x20to\x20report\x20platform\x20issue:\x20','report','utf8','issue','issue.description_redaction_kinds','redactionKinds','issue.description_redactions','issue.description','description','redacted\x20','trim','truncated','filter','originalBytes','write','File\x20not\x20found:\x20','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','Issue\x20description\x20file\x20is\x20empty:\x20','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','394krymsp','15wXkwiv','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','57296613xiGzjH','issue.title','descriptionSource:\x20','flagMissing','66774JMencd','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','inline','sanitize','truncated\x20from\x20','join','3084858hWIRiE','compress','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','file','issue.description_truncated','descriptionFilePath','redactionCount','\x20bytes','One-line\x20issue\x20summary','9643EfHPiC','782001tPJxbj','string','str','602SHUsmu','descriptionSource','length','title','issue.description_original_bytes','validation','apiError','7190000EPpJxU','cwd','message','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','Issue\x20description\x20cannot\x20be\x20empty.'];a97_0x2c4b=function(){return _0x2b0527;};return a97_0x2c4b();}import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':a97_0x1aa07d(0x14e),'command':a97_0x1aa07d(0x14c),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a97_0x1aa07d(0x159),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a97_0x1aa07d(0x131),'flags':[{'name':'title','type':a97_0x1aa07d(0x13b),'required':!![],'description':a97_0x1aa07d(0x138)},{'name':a97_0x1aa07d(0x153),'type':a97_0x1aa07d(0x13b),'description':a97_0x1aa07d(0x132)},{'name':DESCRIPTION_FILE_FLAG,'type':a97_0x1aa07d(0x13b),'description':'Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description'}],async 'validate'(_0x372b07){const _0x4786dc=a97_0x1aa07d,_0xb946b3=_0x372b07[_0x4786dc(0x13c)]('title')[_0x4786dc(0x155)](),_0x38e534=_0x372b07[_0x4786dc(0x13c)]('description')[_0x4786dc(0x155)](),_0x24f223=_0x372b07[_0x4786dc(0x13c)](DESCRIPTION_FILE_FLAG)[_0x4786dc(0x155)]();if(!_0xb946b3)throw CliErrors[_0x4786dc(0x129)](_0x4786dc(0x140),_0x4786dc(0x125));const _0x5f5ade=_0x38e534['length']>0x0,_0x46ba04=_0x24f223['length']>0x0;if(_0x5f5ade===_0x46ba04)throw CliErrors[_0x4786dc(0x142)](_0x4786dc(0x124),_0x4786dc(0x147));if(_0x46ba04){const _0x19c576=resolve(process[_0x4786dc(0x145)](),_0x24f223);if(!existsSync(_0x19c576))throw CliErrors['validation'](_0x4786dc(0x15a)+_0x19c576);}},async 'dryRun'(_0xbd2873){const _0x551f29=a97_0x1aa07d,_0xc07142=await prepareIssueReport(_0xbd2873);return{'method':'POST','url':'otel://'+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0xc07142['title'],'issue.description':_0xc07142[_0x551f29(0x153)],'issue.description_original_bytes':_0xc07142[_0x551f29(0x12d)]['originalBytes'],'issue.description_truncated':_0xc07142[_0x551f29(0x12d)][_0x551f29(0x156)],'issue.description_redactions':_0xc07142[_0x551f29(0x12d)][_0x551f29(0x136)],'issue.description_redaction_kinds':_0xc07142[_0x551f29(0x12d)][_0x551f29(0x150)][_0x551f29(0x12f)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter',_0x551f29(0x128)+_0xc07142[_0x551f29(0x13e)],_0xc07142[_0x551f29(0x135)]?'descriptionFile:\x20'+_0xc07142[_0x551f29(0x135)]:null,_0xc07142[_0x551f29(0x12d)]['truncated']?'truncated:\x20original\x20'+_0xc07142[_0x551f29(0x12d)][_0x551f29(0x158)]+_0x551f29(0x137):null,_0xc07142[_0x551f29(0x12d)][_0x551f29(0x136)]>0x0?'redactions:\x20'+_0xc07142[_0x551f29(0x12d)][_0x551f29(0x136)]+'\x20('+_0xc07142[_0x551f29(0x12d)]['redactionKinds']['join'](',\x20')+')':null][_0x551f29(0x157)](Boolean)[_0x551f29(0x12f)]('\x0a')};},async 'execute'(_0x13c2b9){const _0x4f2b0d=a97_0x1aa07d,_0x480d6a=await prepareIssueReport(_0x13c2b9);try{await sendPlatformIssueCollectLog({'title':_0x480d6a[_0x4f2b0d(0x140)],'description':_0x480d6a['description'],'sanitize':{'originalBytes':_0x480d6a[_0x4f2b0d(0x12d)][_0x4f2b0d(0x158)],'truncated':_0x480d6a[_0x4f2b0d(0x12d)][_0x4f2b0d(0x156)],'redactionCount':_0x480d6a['sanitize'][_0x4f2b0d(0x136)],'redactionKinds':_0x480d6a['sanitize'][_0x4f2b0d(0x150)]}});}catch(_0x54c05b){throw CliErrors[_0x4f2b0d(0x143)](_0x4f2b0d(0x14b)+(_0x54c05b instanceof Error?_0x54c05b[_0x4f2b0d(0x146)]:String(_0x54c05b)),_0x4f2b0d(0x15b));}return{'ok':!![],'message':buildResultMessage(_0x480d6a['sanitize']),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x4f2b0d(0x127),_0x4f2b0d(0x152),_0x4f2b0d(0x141),_0x4f2b0d(0x134),_0x4f2b0d(0x151),_0x4f2b0d(0x14f)],'issue':{'title':_0x480d6a[_0x4f2b0d(0x140)],'descriptionLength':_0x480d6a[_0x4f2b0d(0x153)][_0x4f2b0d(0x13f)],'descriptionSource':_0x480d6a['descriptionSource'],..._0x480d6a['descriptionFilePath']?{'descriptionFile':_0x480d6a[_0x4f2b0d(0x135)]}:{},'sanitize':{'originalBytes':_0x480d6a['sanitize'][_0x4f2b0d(0x158)],'truncated':_0x480d6a['sanitize']['truncated'],'redactions':_0x480d6a[_0x4f2b0d(0x12d)][_0x4f2b0d(0x136)],'redactionKinds':_0x480d6a[_0x4f2b0d(0x12d)]['redactionKinds']}}}};}};function buildResultMessage(_0x349b74){const _0x3e515c=a97_0x1aa07d,_0x3dd1d0=[];return _0x349b74[_0x3e515c(0x156)]&&_0x3dd1d0['push'](_0x3e515c(0x12e)+_0x349b74[_0x3e515c(0x158)]+_0x3e515c(0x137)),_0x349b74['redactionCount']>0x0&&_0x3dd1d0['push'](_0x3e515c(0x154)+_0x349b74['redactionCount']+'\x20secret(s):\x20'+_0x349b74[_0x3e515c(0x150)][_0x3e515c(0x12f)](',\x20')),_0x3dd1d0[_0x3e515c(0x13f)]===0x0?'Platform\x20issue\x20reported':'Platform\x20issue\x20reported\x20('+_0x3dd1d0[_0x3e515c(0x12f)](';\x20')+')';}async function prepareIssueReport(_0xdb71d2){const _0xe06b98=a97_0x1aa07d,_0x5c113e=_0xdb71d2['str'](_0xe06b98(0x140))['trim'](),_0x519226=_0xdb71d2[_0xe06b98(0x13c)](_0xe06b98(0x153)),_0x37a8c3=_0xdb71d2[_0xe06b98(0x13c)](DESCRIPTION_FILE_FLAG)[_0xe06b98(0x155)]();if(!_0x37a8c3){const _0x220554=_0x519226;if(!_0x220554[_0xe06b98(0x155)]())throw CliErrors[_0xe06b98(0x142)](_0xe06b98(0x148),_0xe06b98(0x15d));const _0x18877d=sanitizeIssueDescription(_0x220554);return{'title':_0x5c113e,'description':_0x18877d['description'],'descriptionSource':_0xe06b98(0x12c),'sanitize':_0x18877d};}const _0x2c45f7=resolve(process[_0xe06b98(0x145)](),_0x37a8c3),_0x4e541b=await readFile(_0x2c45f7,_0xe06b98(0x14d));if(!_0x4e541b[_0xe06b98(0x155)]())throw CliErrors[_0xe06b98(0x142)](_0xe06b98(0x15c)+_0x2c45f7,_0xe06b98(0x12b));const _0x34a911=sanitizeIssueDescription(_0x4e541b);return{'title':_0x5c113e,'description':_0x34a911[_0xe06b98(0x153)],'descriptionSource':_0xe06b98(0x133),'descriptionFilePath':_0x2c45f7,'sanitize':_0x34a911};}
1
+ const a97_0x4baaeb=a97_0x31a4;(function(_0x165894,_0x3b79e2){const _0x1fd538=a97_0x31a4,_0x1741cb=_0x165894();while(!![]){try{const _0x445247=-parseInt(_0x1fd538(0x148))/0x1+-parseInt(_0x1fd538(0x154))/0x2+parseInt(_0x1fd538(0x160))/0x3+-parseInt(_0x1fd538(0x12f))/0x4*(parseInt(_0x1fd538(0x15f))/0x5)+parseInt(_0x1fd538(0x135))/0x6*(parseInt(_0x1fd538(0x13e))/0x7)+parseInt(_0x1fd538(0x14b))/0x8+parseInt(_0x1fd538(0x14a))/0x9;if(_0x445247===_0x3b79e2)break;else _0x1741cb['push'](_0x1741cb['shift']());}catch(_0x20c8cb){_0x1741cb['push'](_0x1741cb['shift']());}}}(a97_0x4a8e,0x3996f));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':a97_0x4baaeb(0x151),'command':a97_0x4baaeb(0x144),'description':a97_0x4baaeb(0x140),'risk':a97_0x4baaeb(0x155),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a97_0x4baaeb(0x161),'flags':[{'name':a97_0x4baaeb(0x143),'type':a97_0x4baaeb(0x147),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':'description','type':a97_0x4baaeb(0x147),'description':a97_0x4baaeb(0x14c)},{'name':DESCRIPTION_FILE_FLAG,'type':a97_0x4baaeb(0x147),'description':a97_0x4baaeb(0x13d)}],async 'validate'(_0x5cfa8f){const _0x210233=a97_0x4baaeb,_0x17c679=_0x5cfa8f[_0x210233(0x13a)](_0x210233(0x143))['trim'](),_0x316f6f=_0x5cfa8f[_0x210233(0x13a)]('description')['trim'](),_0x2e36a6=_0x5cfa8f['str'](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x17c679)throw CliErrors['flagMissing'](_0x210233(0x143),_0x210233(0x145));const _0x54ed51=_0x316f6f[_0x210233(0x158)]>0x0,_0x140863=_0x2e36a6[_0x210233(0x158)]>0x0;if(_0x54ed51===_0x140863)throw CliErrors[_0x210233(0x153)](_0x210233(0x15b),_0x210233(0x137));if(_0x140863){const _0x5c252f=resolve(process['cwd'](),_0x2e36a6);if(!existsSync(_0x5c252f))throw CliErrors[_0x210233(0x153)]('File\x20not\x20found:\x20'+_0x5c252f);}},async 'dryRun'(_0x6508db){const _0x174d1c=a97_0x4baaeb,_0x1045be=await prepareIssueReport(_0x6508db);return{'method':_0x174d1c(0x136),'url':_0x174d1c(0x134)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x1045be[_0x174d1c(0x143)],'issue.description':_0x1045be['description'],'issue.description_original_bytes':_0x1045be[_0x174d1c(0x141)][_0x174d1c(0x15c)],'issue.description_truncated':_0x1045be['sanitize']['truncated'],'issue.description_redactions':_0x1045be[_0x174d1c(0x141)][_0x174d1c(0x132)],'issue.description_redaction_kinds':_0x1045be[_0x174d1c(0x141)][_0x174d1c(0x156)][_0x174d1c(0x146)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','descriptionSource:\x20'+_0x1045be['descriptionSource'],_0x1045be[_0x174d1c(0x14e)]?_0x174d1c(0x150)+_0x1045be[_0x174d1c(0x14e)]:null,_0x1045be['sanitize'][_0x174d1c(0x130)]?'truncated:\x20original\x20'+_0x1045be['sanitize'][_0x174d1c(0x15c)]+_0x174d1c(0x168):null,_0x1045be[_0x174d1c(0x141)][_0x174d1c(0x132)]>0x0?_0x174d1c(0x159)+_0x1045be[_0x174d1c(0x141)]['redactionCount']+'\x20('+_0x1045be['sanitize'][_0x174d1c(0x156)]['join'](',\x20')+')':null]['filter'](Boolean)['join']('\x0a')};},async 'execute'(_0x120f7a){const _0x457919=a97_0x4baaeb,_0x1d2842=await prepareIssueReport(_0x120f7a);try{await sendPlatformIssueCollectLog({'title':_0x1d2842[_0x457919(0x143)],'description':_0x1d2842[_0x457919(0x15a)],'sanitize':{'originalBytes':_0x1d2842['sanitize'][_0x457919(0x15c)],'truncated':_0x1d2842['sanitize'][_0x457919(0x130)],'redactionCount':_0x1d2842[_0x457919(0x141)]['redactionCount'],'redactionKinds':_0x1d2842[_0x457919(0x141)][_0x457919(0x156)]}});}catch(_0x3fd3b2){throw CliErrors[_0x457919(0x14d)](_0x457919(0x152)+(_0x3fd3b2 instanceof Error?_0x3fd3b2[_0x457919(0x165)]:String(_0x3fd3b2)),_0x457919(0x14f));}return{'ok':!![],'message':buildResultMessage(_0x1d2842[_0x457919(0x141)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x457919(0x163),_0x457919(0x166),_0x457919(0x162),_0x457919(0x13b),_0x457919(0x13c),'issue.description_redaction_kinds'],'issue':{'title':_0x1d2842[_0x457919(0x143)],'descriptionLength':_0x1d2842['description']['length'],'descriptionSource':_0x1d2842[_0x457919(0x13f)],..._0x1d2842[_0x457919(0x14e)]?{'descriptionFile':_0x1d2842[_0x457919(0x14e)]}:{},'sanitize':{'originalBytes':_0x1d2842[_0x457919(0x141)][_0x457919(0x15c)],'truncated':_0x1d2842[_0x457919(0x141)][_0x457919(0x130)],'redactions':_0x1d2842[_0x457919(0x141)][_0x457919(0x132)],'redactionKinds':_0x1d2842[_0x457919(0x141)]['redactionKinds']}}}};}};function buildResultMessage(_0xefef56){const _0x2616c6=a97_0x4baaeb,_0x4f0edb=[];return _0xefef56[_0x2616c6(0x130)]&&_0x4f0edb['push'](_0x2616c6(0x157)+_0xefef56[_0x2616c6(0x15c)]+_0x2616c6(0x168)),_0xefef56[_0x2616c6(0x132)]>0x0&&_0x4f0edb[_0x2616c6(0x149)](_0x2616c6(0x167)+_0xefef56[_0x2616c6(0x132)]+_0x2616c6(0x131)+_0xefef56[_0x2616c6(0x156)][_0x2616c6(0x146)](',\x20')),_0x4f0edb[_0x2616c6(0x158)]===0x0?'Platform\x20issue\x20reported':_0x2616c6(0x15d)+_0x4f0edb[_0x2616c6(0x146)](';\x20')+')';}function a97_0x31a4(_0x44a563,_0x314b03){_0x44a563=_0x44a563-0x12f;const _0x4a8ef3=a97_0x4a8e();let _0x31a442=_0x4a8ef3[_0x44a563];return _0x31a442;}async function prepareIssueReport(_0x4233c1){const _0x1ffee4=a97_0x4baaeb,_0x32a2be=_0x4233c1[_0x1ffee4(0x13a)]('title')[_0x1ffee4(0x15e)](),_0x24d700=_0x4233c1['str'](_0x1ffee4(0x15a)),_0x536d56=_0x4233c1[_0x1ffee4(0x13a)](DESCRIPTION_FILE_FLAG)[_0x1ffee4(0x15e)]();if(!_0x536d56){const _0x38ba18=_0x24d700;if(!_0x38ba18['trim']())throw CliErrors[_0x1ffee4(0x153)]('Issue\x20description\x20cannot\x20be\x20empty.','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x5d7343=sanitizeIssueDescription(_0x38ba18);return{'title':_0x32a2be,'description':_0x5d7343[_0x1ffee4(0x15a)],'descriptionSource':_0x1ffee4(0x138),'sanitize':_0x5d7343};}const _0x2c7c53=resolve(process[_0x1ffee4(0x142)](),_0x536d56),_0x5dadce=await readFile(_0x2c7c53,_0x1ffee4(0x139));if(!_0x5dadce['trim']())throw CliErrors[_0x1ffee4(0x153)](_0x1ffee4(0x164)+_0x2c7c53,_0x1ffee4(0x133));const _0x14f4ef=sanitizeIssueDescription(_0x5dadce);return{'title':_0x32a2be,'description':_0x14f4ef[_0x1ffee4(0x15a)],'descriptionSource':_0x1ffee4(0x169),'descriptionFilePath':_0x2c7c53,'sanitize':_0x14f4ef};}function a97_0x4a8e(){const _0x439f95=['descriptionSource','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','sanitize','cwd','title','report','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','join','string','300595tBYeHn','push','10413549MeKbWD','1477800ugcEzu','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','apiError','descriptionFilePath','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','descriptionFile:\x20','issue','Failed\x20to\x20report\x20platform\x20issue:\x20','validation','927550CtKxPk','write','redactionKinds','truncated\x20from\x20','length','redactions:\x20','description','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','originalBytes','Platform\x20issue\x20reported\x20(','trim','1107235vLGNie','14742lWSQes','compress','issue.description_original_bytes','issue.title','Issue\x20description\x20file\x20is\x20empty:\x20','message','issue.description','redacted\x20','\x20bytes','file','8GFbJmv','truncated','\x20secret(s):\x20','redactionCount','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','otel://','578706GsxOdx','POST','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','inline','utf8','str','issue.description_truncated','issue.description_redactions','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','7VPRnDJ'];a97_0x4a8e=function(){return _0x439f95;};return a97_0x4a8e();}
@@ -1 +1 @@
1
- const a98_0xcfd5e3=a98_0x1bf6;(function(_0x4f2acf,_0x51272e){const _0x51701c=a98_0x1bf6,_0x34e459=_0x4f2acf();while(!![]){try{const _0x1c13fb=-parseInt(_0x51701c(0x13c))/0x1*(-parseInt(_0x51701c(0x136))/0x2)+parseInt(_0x51701c(0x12b))/0x3*(parseInt(_0x51701c(0x139))/0x4)+-parseInt(_0x51701c(0x141))/0x5+parseInt(_0x51701c(0x129))/0x6+parseInt(_0x51701c(0x13a))/0x7*(-parseInt(_0x51701c(0x13e))/0x8)+parseInt(_0x51701c(0x132))/0x9*(-parseInt(_0x51701c(0x12c))/0xa)+-parseInt(_0x51701c(0x128))/0xb*(parseInt(_0x51701c(0x138))/0xc);if(_0x1c13fb===_0x51272e)break;else _0x34e459['push'](_0x34e459['shift']());}catch(_0x8fe866){_0x34e459['push'](_0x34e459['shift']());}}}(a98_0x4bde,0x833c6));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a98_0xcfd5e3(0x12d),REDACTION_RULES=[{'kind':a98_0xcfd5e3(0x137),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a98_0xcfd5e3(0x131),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a98_0xcfd5e3(0x142),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a98_0xcfd5e3(0x125)},{'kind':a98_0xcfd5e3(0x13d),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a98_0xcfd5e3(0x130)},{'kind':a98_0xcfd5e3(0x13f),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a98_0xcfd5e3(0x12f)},{'kind':a98_0xcfd5e3(0x124),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a98_0xcfd5e3(0x127)}];function a98_0x1bf6(_0x43e346,_0x3de71d){_0x43e346=_0x43e346-0x124;const _0x4bdedd=a98_0x4bde();let _0x1bf622=_0x4bdedd[_0x43e346];return _0x1bf622;}export function sanitizeIssueDescription(_0x528571){const _0x2cc60a=a98_0xcfd5e3,_0x45a7b0=Buffer['byteLength'](_0x528571,'utf8'),_0x3a7f0a=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x3f4592=_0x528571,_0x3be0dd=0x0;const _0x517b6e=[];if(!_0x3a7f0a){const _0x3a4bff=protectOssAccessKeyIds(_0x3f4592);_0x3f4592=_0x3a4bff['description'];for(const _0x3ac7ff of REDACTION_RULES){let _0x5a2bd2=0x0;_0x3f4592=_0x3f4592[_0x2cc60a(0x135)](_0x3ac7ff['pattern'],(_0x515ba7,_0xca7a80)=>{const _0x78ad16=_0x2cc60a;_0x5a2bd2+=0x1;const _0x5d156a=typeof _0xca7a80===_0x78ad16(0x145)?_0xca7a80:'';return _0x5d156a+'['+_0x3ac7ff[_0x78ad16(0x13b)]+']';}),_0x5a2bd2>0x0&&(_0x3be0dd+=_0x5a2bd2,!_0x517b6e['includes'](_0x3ac7ff[_0x2cc60a(0x12a)])&&_0x517b6e['push'](_0x3ac7ff[_0x2cc60a(0x12a)]));}_0x3f4592=_0x3a4bff['restore'](_0x3f4592);}let _0x3e8c30=![];if(Buffer['byteLength'](_0x3f4592,_0x2cc60a(0x12e))>ISSUE_DESCRIPTION_MAX_BYTES){_0x3e8c30=!![];const _0xc5c245=Buffer['byteLength'](TRUNCATION_NOTICE,'utf8'),_0x22dc23=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0xc5c245);_0x3f4592=sliceUtf8Bytes(_0x3f4592,_0x22dc23)+TRUNCATION_NOTICE;}return{'description':_0x3f4592,'originalBytes':_0x45a7b0,'truncated':_0x3e8c30,'redactionCount':_0x3be0dd,'redactionKinds':_0x517b6e};}function protectOssAccessKeyIds(_0x2691fd){const _0x407d1c=a98_0xcfd5e3,_0xa5ab2=[],_0x223364=_0x2691fd[_0x407d1c(0x135)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x15645a,_0x466247)=>{const _0x419648=_0x407d1c,_0x2fced9=_0xa5ab2[_0x419648(0x134)](_0x15645a['slice'](_0x466247['length']))-0x1;return _0x466247+_0x419648(0x144)+_0x2fced9+'__';});return{'description':_0x223364,'restore':_0xc1989f=>_0xc1989f[_0x407d1c(0x135)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x607ce0,_0x41cf85,_0x4aa3f8)=>{const _0x1fb8bd=_0xa5ab2[Number(_0x4aa3f8)];return _0x1fb8bd===undefined?_0x607ce0:''+_0x41cf85+_0x1fb8bd;})};}function sliceUtf8Bytes(_0x55e5bf,_0x349135){const _0x1aeedd=a98_0xcfd5e3;if(_0x349135<=0x0)return'';const _0x2f617b=Buffer[_0x1aeedd(0x126)](_0x55e5bf,_0x1aeedd(0x12e));if(_0x2f617b[_0x1aeedd(0x140)]<=_0x349135)return _0x55e5bf;let _0x2957ec=_0x349135;while(_0x2957ec>0x0){const _0x587cbc=_0x2f617b[_0x2957ec];if(_0x587cbc===undefined||(_0x587cbc&0xc0)!==0x80)break;_0x2957ec-=0x1;}return _0x2f617b[_0x1aeedd(0x143)](0x0,_0x2957ec)[_0x1aeedd(0x133)]('utf8');}function a98_0x4bde(){const _0x4f7bb5=['string','bearer-jwt','REDACTED:private-key','from','REDACTED:bearer-jwt','111067amtaft','4252974AyOmtR','kind','413811NRTlUM','1030PMtiFj','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','utf8','REDACTED:password','REDACTED:access-key','authorization','3681fKXOjO','toString','push','replace','4BfWCHI','cookie','204umFWBV','20jDnIer','56TExPXJ','label','377873GezXvT','access-key','631096QYEVWV','password','byteLength','3859230KuYGJh','private-key','subarray','__RB_OSS_ID_'];a98_0x4bde=function(){return _0x4f7bb5;};return a98_0x4bde();}
1
+ function a98_0x5ed9(){const _0x2ce1ff=['__RB_OSS_ID_','slice','12WGRZwf','94128uAdfGP','length','replace','REDACTED:access-key','access-key','pattern','REDACTED:cookie','string','byteLength','46127rAkyXI','bearer-jwt','251944xSYLio','8zxaNgm','REDACTED:authorization','cookie','REDACTED:private-key','kind','restore','push','includes','557578weXgQg','9243BxxNZL','label','utf8','910340QcNbMh','7780RhCHTS','REDACTED:password','560742aqZill'];a98_0x5ed9=function(){return _0x2ce1ff;};return a98_0x5ed9();}const a98_0x2cee63=a98_0x599a;(function(_0xb8242c,_0x1d2156){const _0x445fb2=a98_0x599a,_0x2b3997=_0xb8242c();while(!![]){try{const _0x1755ef=-parseInt(_0x445fb2(0x147))/0x1+-parseInt(_0x445fb2(0x149))/0x2+parseInt(_0x445fb2(0x159))/0x3+parseInt(_0x445fb2(0x14a))/0x4*(-parseInt(_0x445fb2(0x156))/0x5)+parseInt(_0x445fb2(0x15c))/0x6*(-parseInt(_0x445fb2(0x152))/0x7)+-parseInt(_0x445fb2(0x15d))/0x8+-parseInt(_0x445fb2(0x153))/0x9*(-parseInt(_0x445fb2(0x157))/0xa);if(_0x1755ef===_0x1d2156)break;else _0x2b3997['push'](_0x2b3997['shift']());}catch(_0x1bafdb){_0x2b3997['push'](_0x2b3997['shift']());}}}(a98_0x5ed9,0x44053));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a98_0x2cee63(0x14c),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a98_0x2cee63(0x163)},{'kind':'authorization','pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a98_0x2cee63(0x14b)},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a98_0x2cee63(0x14d)},{'kind':a98_0x2cee63(0x161),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a98_0x2cee63(0x160)},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a98_0x2cee63(0x158)},{'kind':a98_0x2cee63(0x148),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':'REDACTED:bearer-jwt'}];export function sanitizeIssueDescription(_0x562914){const _0x18e7c5=a98_0x2cee63,_0x1f6383=Buffer['byteLength'](_0x562914,_0x18e7c5(0x155)),_0x4a3c55=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x3777cf=_0x562914,_0x2966d6=0x0;const _0x98a976=[];if(!_0x4a3c55){const _0x5d1acb=protectOssAccessKeyIds(_0x3777cf);_0x3777cf=_0x5d1acb['description'];for(const _0x55bc7a of REDACTION_RULES){let _0x447a8a=0x0;_0x3777cf=_0x3777cf['replace'](_0x55bc7a[_0x18e7c5(0x162)],(_0x2717da,_0x375b66)=>{const _0x21a871=_0x18e7c5;_0x447a8a+=0x1;const _0x525338=typeof _0x375b66===_0x21a871(0x164)?_0x375b66:'';return _0x525338+'['+_0x55bc7a[_0x21a871(0x154)]+']';}),_0x447a8a>0x0&&(_0x2966d6+=_0x447a8a,!_0x98a976[_0x18e7c5(0x151)](_0x55bc7a[_0x18e7c5(0x14e)])&&_0x98a976['push'](_0x55bc7a[_0x18e7c5(0x14e)]));}_0x3777cf=_0x5d1acb[_0x18e7c5(0x14f)](_0x3777cf);}let _0x3f321c=![];if(Buffer[_0x18e7c5(0x146)](_0x3777cf,'utf8')>ISSUE_DESCRIPTION_MAX_BYTES){_0x3f321c=!![];const _0x834ab9=Buffer['byteLength'](TRUNCATION_NOTICE,_0x18e7c5(0x155)),_0xe684e6=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x834ab9);_0x3777cf=sliceUtf8Bytes(_0x3777cf,_0xe684e6)+TRUNCATION_NOTICE;}return{'description':_0x3777cf,'originalBytes':_0x1f6383,'truncated':_0x3f321c,'redactionCount':_0x2966d6,'redactionKinds':_0x98a976};}function a98_0x599a(_0x1ffcc0,_0x44a383){_0x1ffcc0=_0x1ffcc0-0x146;const _0x5ed94f=a98_0x5ed9();let _0x599adb=_0x5ed94f[_0x1ffcc0];return _0x599adb;}function protectOssAccessKeyIds(_0x3169eb){const _0x2ee54a=a98_0x2cee63,_0x403d41=[],_0x305239=_0x3169eb[_0x2ee54a(0x15f)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x400182,_0x4797d5)=>{const _0x40235e=_0x2ee54a,_0x2c6aa2=_0x403d41[_0x40235e(0x150)](_0x400182[_0x40235e(0x15b)](_0x4797d5[_0x40235e(0x15e)]))-0x1;return _0x4797d5+_0x40235e(0x15a)+_0x2c6aa2+'__';});return{'description':_0x305239,'restore':_0x1a9d4e=>_0x1a9d4e[_0x2ee54a(0x15f)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0xe6125,_0x5034b5,_0x202661)=>{const _0x2971e0=_0x403d41[Number(_0x202661)];return _0x2971e0===undefined?_0xe6125:''+_0x5034b5+_0x2971e0;})};}function sliceUtf8Bytes(_0x4921eb,_0xf0d85b){const _0x970d1b=a98_0x2cee63;if(_0xf0d85b<=0x0)return'';const _0x250483=Buffer['from'](_0x4921eb,_0x970d1b(0x155));if(_0x250483[_0x970d1b(0x146)]<=_0xf0d85b)return _0x4921eb;let _0x25e305=_0xf0d85b;while(_0x25e305>0x0){const _0x334971=_0x250483[_0x25e305];if(_0x334971===undefined||(_0x334971&0xc0)!==0x80)break;_0x25e305-=0x1;}return _0x250483['subarray'](0x0,_0x25e305)['toString'](_0x970d1b(0x155));}
@@ -1 +1 @@
1
- function a99_0x26b3(){const _0x2cc7f7=['company','11627LBUHwE','cookie','verified','str','appCode','70676tBtFPT','8683641vxbtfA','length','Knowledge-base\x20title','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','1imzeKj','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','\x20--format\x20compress`\x20before\x20choosing\x20update.','1439500zKkGjY','kb_create_outcome_unknown','rabetbase\x20kb\x20list\x20--title\x20','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','content','2351530hSpnpI','trim','high-risk-write','stringify','\x20--format\x20compress','/admin/knowledge-base/create','kb_verification_failed','694404JULXMC','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','create','1370504THTiiW','\x20for\x20','string','Created\x20company\x20knowledge\x20base\x20','\x20with\x20title\x20','kb_file_required','file','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','1758LIWXia','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','POST','kb_title_required','rabetbase\x20kb\x20detail\x20--id\x20','byteSize','contentHash','title'];a99_0x26b3=function(){return _0x2cc7f7;};return a99_0x26b3();}const a99_0x1f921f=a99_0x1af3;(function(_0x164989,_0x185ec0){const _0x41c570=a99_0x1af3,_0x27bd6e=_0x164989();while(!![]){try{const _0x1fe2be=-parseInt(_0x41c570(0x20d))/0x1*(parseInt(_0x41c570(0x208))/0x2)+-parseInt(_0x41c570(0x1ef))/0x3+parseInt(_0x41c570(0x1e1))/0x4+-parseInt(_0x41c570(0x1e8))/0x5+parseInt(_0x41c570(0x1fa))/0x6*(-parseInt(_0x41c570(0x203))/0x7)+parseInt(_0x41c570(0x1f2))/0x8+parseInt(_0x41c570(0x209))/0x9;if(_0x1fe2be===_0x185ec0)break;else _0x27bd6e['push'](_0x27bd6e['shift']());}catch(_0x4b1478){_0x27bd6e['push'](_0x27bd6e['shift']());}}}(a99_0x26b3,0x4277c));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a99_0x1f921f(0x1ed);function readCreateInput(_0x2a1d66){const _0x1f5702=a99_0x1f921f,_0x49cad0=_0x2a1d66[_0x1f5702(0x206)]('title')[_0x1f5702(0x1e9)]();if(!_0x49cad0)throw kbError(_0x1f5702(0x1fd),'--title\x20is\x20required.');const _0x46fbbf=_0x2a1d66['str'](_0x1f5702(0x1f8))['trim']();if(!_0x46fbbf)throw kbError(_0x1f5702(0x1f7),'--file\x20is\x20required.','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.');return{'title':_0x49cad0,'file':_0x46fbbf};}async function prepareCreate(_0x2818f7){const _0x49e1b4=a99_0x1f921f,_0x168840=readCreateInput(_0x2818f7),_0x4e3752=await readKbFile(_0x168840['file']),_0x43145b=await fetchAllCompanyKnowledgeBases(_0x2818f7,{'title':_0x168840[_0x49e1b4(0x201)]}),_0x1de5f5=findExactCompanyKnowledgeBases(_0x43145b,_0x2818f7[_0x49e1b4(0x207)],_0x168840['title']);if(_0x1de5f5[_0x49e1b4(0x20a)]>0x0)throw kbError('kb_already_exists','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'+_0x2818f7[_0x49e1b4(0x207)]+_0x49e1b4(0x1f6)+_0x168840[_0x49e1b4(0x201)]+'.',_0x49e1b4(0x1e6)+_0x1de5f5[0x0]['id']+_0x49e1b4(0x1e0));return{..._0x168840,'content':_0x4e3752};}function plannedAfter(_0x3d7610,_0x3b9760){const _0x3ab6a3=a99_0x1f921f;return{'scope':_0x3ab6a3(0x202),'appCode':_0x3d7610[_0x3ab6a3(0x207)],'title':_0x3b9760[_0x3ab6a3(0x201)],'contentByteSize':_0x3b9760[_0x3ab6a3(0x1e7)][_0x3ab6a3(0x1ff)],'contentHash':_0x3b9760[_0x3ab6a3(0x1e7)][_0x3ab6a3(0x200)]};}function verifyCreatedState(_0x361e26,_0x1120af,_0x432d5b){const _0x28c8b5=a99_0x1f921f;assertCompanyKnowledgeBase(_0x432d5b,_0x361e26[_0x28c8b5(0x207)],_0x432d5b['id']);const _0x55d745=inspectKbContent(_0x432d5b[_0x28c8b5(0x1e7)]);if(_0x432d5b['title']!==_0x1120af[_0x28c8b5(0x201)]||_0x55d745[_0x28c8b5(0x200)]!==_0x1120af[_0x28c8b5(0x1e7)][_0x28c8b5(0x200)])throw kbError(_0x28c8b5(0x1ee),'Company\x20knowledge\x20base\x20'+_0x432d5b['id']+_0x28c8b5(0x1f9),_0x28c8b5(0x1f0)+_0x432d5b['id']+_0x28c8b5(0x20c));return projectKb(_0x432d5b);}function a99_0x1af3(_0x126629,_0x5490e0){_0x126629=_0x126629-0x1df;const _0x26b307=a99_0x26b3();let _0x1af311=_0x26b307[_0x126629];return _0x1af311;}export const kbCreate={'service':'kb','command':a99_0x1f921f(0x1f1),'description':a99_0x1f921f(0x1e4),'risk':a99_0x1f921f(0x1ea),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'title','type':a99_0x1f921f(0x1f4),'required':!![],'description':a99_0x1f921f(0x20b)},{'name':a99_0x1f921f(0x1f8),'type':'string','required':!![],'description':a99_0x1f921f(0x1e5)}],async 'validate'(_0x299948){readCreateInput(_0x299948),requireKbExplicitYes(_0x299948);},async 'dryRun'(_0x48fc6a){const _0x1abd4f=a99_0x1f921f,_0x40b917=await prepareCreate(_0x48fc6a);return asDryRunResult({'operation':_0x1abd4f(0x1f1),'selector':{'scope':_0x1abd4f(0x202),'appCode':_0x48fc6a[_0x1abd4f(0x207)],'title':_0x40b917[_0x1abd4f(0x201)]},'before':null,'after':plannedAfter(_0x48fc6a,_0x40b917),'dryRun':!![],'backend':{'method':_0x1abd4f(0x1fc),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x1abd4f(0x1e3)+JSON[_0x1abd4f(0x1eb)](_0x40b917[_0x1abd4f(0x201)])+'\x20--format\x20compress'}},{'method':_0x1abd4f(0x1fc),'url':CREATE_PATH});},async 'execute'(_0x40255){const _0x10a090=a99_0x1f921f;requireKbExplicitYes(_0x40255);const _0x3f56ff=await prepareCreate(_0x40255);let _0x5539f3,_0x314113=![];try{const _0xcef39a=await createEnterpriseKnowledgeBase(_0x40255[_0x10a090(0x204)],{'appCode':_0x40255[_0x10a090(0x207)],'title':_0x3f56ff[_0x10a090(0x201)],'content':_0x3f56ff['content'][_0x10a090(0x1e7)]});assertCompanyKnowledgeBase(_0xcef39a,_0x40255[_0x10a090(0x207)],_0xcef39a['id']),_0x5539f3=_0xcef39a['id'];}catch(_0x48c4a1){if(!isPlatformTransportFailure(_0x48c4a1))throw _0x48c4a1;_0x314113=!![];}if(_0x5539f3===undefined){const _0x2c9b68=await verifyKbMutationReadback('create',!![],()=>fetchAllCompanyKnowledgeBases(_0x40255,{'title':_0x3f56ff[_0x10a090(0x201)]})),_0xcd433e=findExactCompanyKnowledgeBases(_0x2c9b68,_0x40255['appCode'],_0x3f56ff[_0x10a090(0x201)]);if(_0xcd433e[_0x10a090(0x20a)]!==0x1)throw kbError(_0x10a090(0x1e2),_0x10a090(0x1df)+_0xcd433e[_0x10a090(0x20a)]+'.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.');_0x5539f3=_0xcd433e[0x0]['id'];}const _0x17db20=await verifyKbMutationReadback('create',_0x314113,()=>requireKb(_0x40255,_0x5539f3)),_0x23a511=verifyCreatedState(_0x40255,_0x3f56ff,_0x17db20),_0x54f4f7=_0x314113?[_0x10a090(0x1fb)]:[];return{'ok':!![],'data':{'operation':_0x10a090(0x1f1),'selector':{'id':_0x23a511['id'],'scope':_0x10a090(0x202),'appCode':_0x23a511[_0x10a090(0x207)]},'before':null,'after':_0x23a511,'dryRun':![],'backend':{'method':_0x10a090(0x1fc),'path':CREATE_PATH},'warnings':_0x54f4f7,'verification':{'status':_0x10a090(0x205),'recoveredAfterUnknownResponse':_0x314113,'lookupCommand':_0x10a090(0x1fe)+_0x23a511['id']+_0x10a090(0x1ec)}},'message':_0x10a090(0x1f5)+_0x23a511['id']+_0x10a090(0x1f3)+_0x23a511[_0x10a090(0x207)]};}};
1
+ const a99_0x58c96a=a99_0x5157;(function(_0x34e193,_0x3f664f){const _0x13b566=a99_0x5157,_0x1c51eb=_0x34e193();while(!![]){try{const _0x19c903=-parseInt(_0x13b566(0xde))/0x1*(-parseInt(_0x13b566(0xec))/0x2)+-parseInt(_0x13b566(0x102))/0x3*(-parseInt(_0x13b566(0xfa))/0x4)+parseInt(_0x13b566(0xe1))/0x5+-parseInt(_0x13b566(0xf0))/0x6*(-parseInt(_0x13b566(0xdf))/0x7)+parseInt(_0x13b566(0xef))/0x8*(-parseInt(_0x13b566(0xfe))/0x9)+-parseInt(_0x13b566(0xe9))/0xa*(-parseInt(_0x13b566(0xe8))/0xb)+-parseInt(_0x13b566(0xf5))/0xc;if(_0x19c903===_0x3f664f)break;else _0x1c51eb['push'](_0x1c51eb['shift']());}catch(_0x256c37){_0x1c51eb['push'](_0x1c51eb['shift']());}}}(a99_0x2e68,0x5ee33));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';function a99_0x5157(_0x4889c1,_0x4e5d9b){_0x4889c1=_0x4889c1-0xda;const _0x2e6894=a99_0x2e68();let _0x5157bb=_0x2e6894[_0x4889c1];return _0x5157bb;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a99_0x58c96a(0xdd);function readCreateInput(_0x5be7d1){const _0x4adfce=a99_0x58c96a,_0x1bd974=_0x5be7d1[_0x4adfce(0xee)](_0x4adfce(0xea))[_0x4adfce(0xf2)]();if(!_0x1bd974)throw kbError('kb_title_required','--title\x20is\x20required.');const _0x2bf22b=_0x5be7d1[_0x4adfce(0xee)](_0x4adfce(0xdb))[_0x4adfce(0xf2)]();if(!_0x2bf22b)throw kbError('kb_file_required',_0x4adfce(0xe3),_0x4adfce(0xf7));return{'title':_0x1bd974,'file':_0x2bf22b};}async function prepareCreate(_0x3301f3){const _0x4489ac=a99_0x58c96a,_0x50cbb1=readCreateInput(_0x3301f3),_0x2d3fe0=await readKbFile(_0x50cbb1[_0x4489ac(0xdb)]),_0x41bf03=await fetchAllCompanyKnowledgeBases(_0x3301f3,{'title':_0x50cbb1[_0x4489ac(0xea)]}),_0x2b54db=findExactCompanyKnowledgeBases(_0x41bf03,_0x3301f3[_0x4489ac(0xed)],_0x50cbb1[_0x4489ac(0xea)]);if(_0x2b54db[_0x4489ac(0x105)]>0x0)throw kbError('kb_already_exists',_0x4489ac(0x104)+_0x3301f3['appCode']+_0x4489ac(0xf6)+_0x50cbb1['title']+'.',_0x4489ac(0x101)+_0x2b54db[0x0]['id']+_0x4489ac(0xf9));return{..._0x50cbb1,'content':_0x2d3fe0};}function plannedAfter(_0x286306,_0x144fda){const _0x2f3e6e=a99_0x58c96a;return{'scope':_0x2f3e6e(0xe5),'appCode':_0x286306[_0x2f3e6e(0xed)],'title':_0x144fda[_0x2f3e6e(0xea)],'contentByteSize':_0x144fda[_0x2f3e6e(0xfb)]['byteSize'],'contentHash':_0x144fda[_0x2f3e6e(0xfb)][_0x2f3e6e(0xdc)]};}function verifyCreatedState(_0x579e7a,_0x2a5632,_0x23d5f8){const _0x44b62c=a99_0x58c96a;assertCompanyKnowledgeBase(_0x23d5f8,_0x579e7a['appCode'],_0x23d5f8['id']);const _0xf562d5=inspectKbContent(_0x23d5f8['content']);if(_0x23d5f8['title']!==_0x2a5632['title']||_0xf562d5[_0x44b62c(0xdc)]!==_0x2a5632[_0x44b62c(0xfb)][_0x44b62c(0xdc)])throw kbError(_0x44b62c(0xf4),'Company\x20knowledge\x20base\x20'+_0x23d5f8['id']+_0x44b62c(0xe0),_0x44b62c(0xeb)+_0x23d5f8['id']+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');return projectKb(_0x23d5f8);}export const kbCreate={'service':'kb','command':'create','description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':'high-risk-write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a99_0x58c96a(0xea),'type':a99_0x58c96a(0xe7),'required':!![],'description':a99_0x58c96a(0xe2)},{'name':a99_0x58c96a(0xdb),'type':a99_0x58c96a(0xe7),'required':!![],'description':'UTF-8\x20text\x20or\x20Markdown\x20content\x20file'}],async 'validate'(_0x225b91){readCreateInput(_0x225b91),requireKbExplicitYes(_0x225b91);},async 'dryRun'(_0xa4dbff){const _0x290c24=a99_0x58c96a,_0x92246a=await prepareCreate(_0xa4dbff);return asDryRunResult({'operation':_0x290c24(0xfc),'selector':{'scope':_0x290c24(0xe5),'appCode':_0xa4dbff['appCode'],'title':_0x92246a[_0x290c24(0xea)]},'before':null,'after':plannedAfter(_0xa4dbff,_0x92246a),'dryRun':!![],'backend':{'method':_0x290c24(0xe4),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':'rabetbase\x20kb\x20list\x20--title\x20'+JSON[_0x290c24(0xfd)](_0x92246a[_0x290c24(0xea)])+_0x290c24(0xe6)}},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x2e50ac){const _0x43b6be=a99_0x58c96a;requireKbExplicitYes(_0x2e50ac);const _0x44a732=await prepareCreate(_0x2e50ac);let _0x16c781,_0x213fd6=![];try{const _0x3540b0=await createEnterpriseKnowledgeBase(_0x2e50ac[_0x43b6be(0xf8)],{'appCode':_0x2e50ac['appCode'],'title':_0x44a732[_0x43b6be(0xea)],'content':_0x44a732[_0x43b6be(0xfb)][_0x43b6be(0xfb)]});assertCompanyKnowledgeBase(_0x3540b0,_0x2e50ac[_0x43b6be(0xed)],_0x3540b0['id']),_0x16c781=_0x3540b0['id'];}catch(_0x1b98cd){if(!isPlatformTransportFailure(_0x1b98cd))throw _0x1b98cd;_0x213fd6=!![];}if(_0x16c781===undefined){const _0x4ab392=await verifyKbMutationReadback(_0x43b6be(0xfc),!![],()=>fetchAllCompanyKnowledgeBases(_0x2e50ac,{'title':_0x44a732[_0x43b6be(0xea)]})),_0x5876bf=findExactCompanyKnowledgeBases(_0x4ab392,_0x2e50ac[_0x43b6be(0xed)],_0x44a732[_0x43b6be(0xea)]);if(_0x5876bf[_0x43b6be(0x105)]!==0x1)throw kbError('kb_create_outcome_unknown',_0x43b6be(0xff)+_0x5876bf[_0x43b6be(0x105)]+'.',_0x43b6be(0xda));_0x16c781=_0x5876bf[0x0]['id'];}const _0x277ab8=await verifyKbMutationReadback('create',_0x213fd6,()=>requireKb(_0x2e50ac,_0x16c781)),_0x2bd6ac=verifyCreatedState(_0x2e50ac,_0x44a732,_0x277ab8),_0xfa31ba=_0x213fd6?[_0x43b6be(0x100)]:[];return{'ok':!![],'data':{'operation':_0x43b6be(0xfc),'selector':{'id':_0x2bd6ac['id'],'scope':_0x43b6be(0xe5),'appCode':_0x2bd6ac[_0x43b6be(0xed)]},'before':null,'after':_0x2bd6ac,'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':_0xfa31ba,'verification':{'status':_0x43b6be(0xf3),'recoveredAfterUnknownResponse':_0x213fd6,'lookupCommand':_0x43b6be(0x103)+_0x2bd6ac['id']+_0x43b6be(0xe6)}},'message':'Created\x20company\x20knowledge\x20base\x20'+_0x2bd6ac['id']+_0x43b6be(0xf1)+_0x2bd6ac[_0x43b6be(0xed)]};}};function a99_0x2e68(){const _0x2367b9=['\x20--format\x20compress','string','396YylQPn','11370fWTtTp','title','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','83906gTjECo','appCode','str','262648FvmDDQ','31206pUEHBW','\x20for\x20','trim','verified','kb_verification_failed','11164668mgvDbN','\x20with\x20title\x20','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','cookie','\x20--format\x20compress`\x20before\x20choosing\x20update.','4jLtZwR','content','create','stringify','18NupcWi','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','1070877XOBbbW','rabetbase\x20kb\x20detail\x20--id\x20','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','length','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','file','contentHash','/admin/knowledge-base/create','7ImVxpO','777CTAroE','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','579185mKdscx','Knowledge-base\x20title','--file\x20is\x20required.','POST','company'];a99_0x2e68=function(){return _0x2367b9;};return a99_0x2e68();}
@@ -1 +1 @@
1
- const a100_0x112e80=a100_0x4e46;function a100_0x4e46(_0x8220a9,_0x1a501a){_0x8220a9=_0x8220a9-0x165;const _0xc6eee3=a100_0xc6ee();let _0x4e468c=_0xc6eee3[_0x8220a9];return _0x4e468c;}function a100_0xc6ee(){const _0x350572=['--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','number','27jtZomL','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','delete','48xKDzjI','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','3lNmyAq','1446000YhyqYR','3408508OGnrLc','high-risk-write','920898otUShs','2023462NawUuY','15OVUMho','24BxQuua','already_absent','8450340WvUYQD','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','appCode','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','kb_delete_outcome_unknown','POST','snapshotHash','company','4714758wYLlYd','expected-version','/admin/knowledge-base/delete','9028KMGgPl','flag','rabetbase\x20kb\x20detail\x20--id\x20','Company\x20knowledge-base\x20id','no_op','\x20remains\x20readable\x20after\x20delete.','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','unshift','Company\x20knowledge\x20base\x20','\x20--format\x20compress','verified'];a100_0xc6ee=function(){return _0x350572;};return a100_0xc6ee();}(function(_0x12b778,_0x56975c){const _0x2866d8=a100_0x4e46,_0x3308f0=_0x12b778();while(!![]){try{const _0xb2b176=-parseInt(_0x2866d8(0x187))/0x1*(parseInt(_0x2866d8(0x179))/0x2)+parseInt(_0x2866d8(0x165))/0x3*(parseInt(_0x2866d8(0x167))/0x4)+parseInt(_0x2866d8(0x16b))/0x5*(parseInt(_0x2866d8(0x166))/0x6)+-parseInt(_0x2866d8(0x16a))/0x7*(parseInt(_0x2866d8(0x16c))/0x8)+-parseInt(_0x2866d8(0x176))/0x9+parseInt(_0x2866d8(0x16e))/0xa+-parseInt(_0x2866d8(0x169))/0xb*(parseInt(_0x2866d8(0x18a))/0xc);if(_0xb2b176===_0x56975c)break;else _0x3308f0['push'](_0x3308f0['shift']());}catch(_0x3437f1){_0x3308f0['push'](_0x3308f0['shift']());}}}(a100_0xc6ee,0x8bbbf));import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH=a100_0x112e80(0x178),RAG_WARNING=a100_0x112e80(0x185),NON_ATOMIC_WARNING=a100_0x112e80(0x184);function readExpectedVersion(_0x4a0a15){const _0x59db70=a100_0x112e80,_0x236101=_0x4a0a15[_0x59db70(0x17a)](_0x59db70(0x177));if(_0x236101===undefined)return undefined;const _0x2f19f3=Number(_0x236101);if(!Number['isSafeInteger'](_0x2f19f3)||_0x2f19f3<0x0)throw kbError('kb_expected_version_invalid',_0x59db70(0x18b));return _0x2f19f3;}function noOpData(_0x5828a0,_0x1a525c,_0x11d1cf){const _0x20c190=a100_0x112e80;return{'operation':_0x20c190(0x17d),'selector':{'id':_0x1a525c,'scope':'company','appCode':_0x5828a0[_0x20c190(0x170)]},'before':null,'after':null,'dryRun':_0x11d1cf,'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[],'verification':{'status':_0x20c190(0x16d),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a100_0x112e80(0x189),'description':'Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','risk':a100_0x112e80(0x168),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'number','required':!![],'description':a100_0x112e80(0x17c)},{'name':'expected-version','type':a100_0x112e80(0x186),'required':![],'description':a100_0x112e80(0x171)}],async 'validate'(_0x5f46bf){readKbId(_0x5f46bf),readExpectedVersion(_0x5f46bf),requireKbExplicitYes(_0x5f46bf);},async 'dryRun'(_0x58eb39){const _0x1110b6=a100_0x112e80,_0xa89441=readKbId(_0x58eb39),_0x55bd3e=readExpectedVersion(_0x58eb39),_0x3d316e=await getKbOrNull(_0x58eb39,_0xa89441);if(!_0x3d316e)return asDryRunResult(noOpData(_0x58eb39,_0xa89441,!![]),{'method':_0x1110b6(0x173),'url':DELETE_PATH});assertExpectedKbVersion(_0x3d316e,_0x55bd3e);const _0xf690d6=projectKb(_0x3d316e),_0x437c82=[RAG_WARNING];if(_0x55bd3e!==undefined)_0x437c82[_0x1110b6(0x180)](NON_ATOMIC_WARNING);return asDryRunResult({'operation':_0x1110b6(0x189),'selector':{'id':_0xf690d6['id'],'scope':'company','appCode':_0xf690d6[_0x1110b6(0x170)]},'before':_0xf690d6,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x437c82,'verification':{'expectedVersion':_0x55bd3e??null,'atomicCompareAndSet':![],'snapshotHash':_0xf690d6[_0x1110b6(0x174)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x1110b6(0x17b)+_0xf690d6['id']+_0x1110b6(0x182)}},{'method':_0x1110b6(0x173),'url':DELETE_PATH});},async 'execute'(_0x1fb853){const _0x2ca02a=a100_0x112e80;requireKbExplicitYes(_0x1fb853);const _0x37a7b0=readKbId(_0x1fb853),_0x72f205=readExpectedVersion(_0x1fb853),_0x801a3a=await getKbOrNull(_0x1fb853,_0x37a7b0);if(!_0x801a3a)return{'ok':!![],'data':noOpData(_0x1fb853,_0x37a7b0,![]),'message':_0x2ca02a(0x181)+_0x37a7b0+_0x2ca02a(0x17f)};assertExpectedKbVersion(_0x801a3a,_0x72f205);const _0x52e294=projectKb(_0x801a3a);let _0x282c18=![];try{await deleteEnterpriseKnowledgeBase(_0x1fb853['cookie'],_0x37a7b0);}catch(_0xcdff70){if(!isPlatformTransportFailure(_0xcdff70))throw _0xcdff70;_0x282c18=!![];}const _0x1ebe2a=await verifyKbMutationReadback('delete',_0x282c18,()=>getKbOrNull(_0x1fb853,_0x37a7b0));if(_0x1ebe2a)throw kbError(_0x282c18?_0x2ca02a(0x172):'kb_verification_failed',_0x2ca02a(0x181)+_0x37a7b0+_0x2ca02a(0x17e),_0x2ca02a(0x188)+_0x37a7b0+_0x2ca02a(0x16f));const _0x550a81=[RAG_WARNING];if(_0x72f205!==undefined)_0x550a81['unshift'](NON_ATOMIC_WARNING);return _0x282c18&&_0x550a81[_0x2ca02a(0x180)](_0x2ca02a(0x18c)),{'ok':!![],'data':{'operation':_0x2ca02a(0x189),'selector':{'id':_0x52e294['id'],'scope':_0x2ca02a(0x175),'appCode':_0x52e294[_0x2ca02a(0x170)]},'before':_0x52e294,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x2ca02a(0x173),'path':DELETE_PATH},'warnings':_0x550a81,'verification':{'status':_0x2ca02a(0x183),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x282c18,'lookupCommand':_0x2ca02a(0x17b)+_0x52e294['id']+_0x2ca02a(0x182)}},'message':'Soft-deleted\x20company\x20knowledge\x20base\x20'+_0x52e294['id']};}};
1
+ function a100_0x6c30(){const _0x3ccb6c=['unshift','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','143247KdbWyL','rabetbase\x20kb\x20detail\x20--id\x20','cookie','already_absent','high-risk-write','appCode','isSafeInteger','verified','8DrCEnL','kb_expected_version_invalid','1892KiRbZL','kb_verification_failed','1557DLrOqz','72DoNPWP','kb_delete_outcome_unknown','Company\x20knowledge-base\x20id','418hRpFSH','company','1196874QQDYjK','6310MtaWJT','40908oBVoSz','Company\x20knowledge\x20base\x20','POST','13784urVyyS','935465sVYpwk','Soft-deleted\x20company\x20knowledge\x20base\x20','\x20remains\x20readable\x20after\x20delete.','delete','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','91yGsxrL','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','expected-version','number'];a100_0x6c30=function(){return _0x3ccb6c;};return a100_0x6c30();}const a100_0x23ff8f=a100_0x5e4b;(function(_0x104de6,_0x23704f){const _0x592e86=a100_0x5e4b,_0xf35185=_0x104de6();while(!![]){try{const _0xadc0a1=parseInt(_0x592e86(0x1bc))/0x1*(-parseInt(_0x592e86(0x1b9))/0x2)+parseInt(_0x592e86(0x1af))/0x3*(-parseInt(_0x592e86(0x1b7))/0x4)+-parseInt(_0x592e86(0x1c7))/0x5+parseInt(_0x592e86(0x1c1))/0x6+-parseInt(_0x592e86(0x1cc))/0x7*(-parseInt(_0x592e86(0x1c6))/0x8)+parseInt(_0x592e86(0x1bb))/0x9*(parseInt(_0x592e86(0x1c2))/0xa)+parseInt(_0x592e86(0x1bf))/0xb*(parseInt(_0x592e86(0x1c3))/0xc);if(_0xadc0a1===_0x23704f)break;else _0xf35185['push'](_0xf35185['shift']());}catch(_0xed0658){_0xf35185['push'](_0xf35185['shift']());}}}(a100_0x6c30,0x1ad38));import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH='/admin/knowledge-base/delete',RAG_WARNING=a100_0x23ff8f(0x1ad),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.';function readExpectedVersion(_0x41019b){const _0x4de19d=a100_0x23ff8f,_0x391523=_0x41019b['flag'](_0x4de19d(0x1ce));if(_0x391523===undefined)return undefined;const _0x10b2fe=Number(_0x391523);if(!Number[_0x4de19d(0x1b5)](_0x10b2fe)||_0x10b2fe<0x0)throw kbError(_0x4de19d(0x1b8),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');return _0x10b2fe;}function a100_0x5e4b(_0x59c962,_0x534f36){_0x59c962=_0x59c962-0x1ac;const _0x6c30b3=a100_0x6c30();let _0x5e4b73=_0x6c30b3[_0x59c962];return _0x5e4b73;}function noOpData(_0x543208,_0x33a150,_0x2c30ab){const _0x37f205=a100_0x23ff8f;return{'operation':'no_op','selector':{'id':_0x33a150,'scope':_0x37f205(0x1c0),'appCode':_0x543208[_0x37f205(0x1b4)]},'before':null,'after':null,'dryRun':_0x2c30ab,'deleteCalled':![],'backend':{'method':_0x37f205(0x1c5),'path':DELETE_PATH},'warnings':[],'verification':{'status':_0x37f205(0x1b2),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a100_0x23ff8f(0x1ca),'description':'Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','risk':a100_0x23ff8f(0x1b3),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a100_0x23ff8f(0x1cf),'required':!![],'description':a100_0x23ff8f(0x1be)},{'name':'expected-version','type':'number','required':![],'description':a100_0x23ff8f(0x1ae)}],async 'validate'(_0x2cc465){readKbId(_0x2cc465),readExpectedVersion(_0x2cc465),requireKbExplicitYes(_0x2cc465);},async 'dryRun'(_0x137a29){const _0x204aa6=a100_0x23ff8f,_0x214660=readKbId(_0x137a29),_0x1adfbc=readExpectedVersion(_0x137a29),_0x4eb296=await getKbOrNull(_0x137a29,_0x214660);if(!_0x4eb296)return asDryRunResult(noOpData(_0x137a29,_0x214660,!![]),{'method':'POST','url':DELETE_PATH});assertExpectedKbVersion(_0x4eb296,_0x1adfbc);const _0x2ed1fc=projectKb(_0x4eb296),_0x502080=[RAG_WARNING];if(_0x1adfbc!==undefined)_0x502080[_0x204aa6(0x1ac)](NON_ATOMIC_WARNING);return asDryRunResult({'operation':_0x204aa6(0x1ca),'selector':{'id':_0x2ed1fc['id'],'scope':_0x204aa6(0x1c0),'appCode':_0x2ed1fc[_0x204aa6(0x1b4)]},'before':_0x2ed1fc,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x204aa6(0x1c5),'path':DELETE_PATH},'warnings':_0x502080,'verification':{'expectedVersion':_0x1adfbc??null,'atomicCompareAndSet':![],'snapshotHash':_0x2ed1fc['snapshotHash'],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x204aa6(0x1b0)+_0x2ed1fc['id']+'\x20--format\x20compress'}},{'method':_0x204aa6(0x1c5),'url':DELETE_PATH});},async 'execute'(_0x1be5bf){const _0x3896dd=a100_0x23ff8f;requireKbExplicitYes(_0x1be5bf);const _0xa71dbb=readKbId(_0x1be5bf),_0x5ee900=readExpectedVersion(_0x1be5bf),_0xf1e595=await getKbOrNull(_0x1be5bf,_0xa71dbb);if(!_0xf1e595)return{'ok':!![],'data':noOpData(_0x1be5bf,_0xa71dbb,![]),'message':'Company\x20knowledge\x20base\x20'+_0xa71dbb+_0x3896dd(0x1cd)};assertExpectedKbVersion(_0xf1e595,_0x5ee900);const _0x462bdc=projectKb(_0xf1e595);let _0x1192a3=![];try{await deleteEnterpriseKnowledgeBase(_0x1be5bf[_0x3896dd(0x1b1)],_0xa71dbb);}catch(_0x24cb8b){if(!isPlatformTransportFailure(_0x24cb8b))throw _0x24cb8b;_0x1192a3=!![];}const _0x2cce75=await verifyKbMutationReadback(_0x3896dd(0x1ca),_0x1192a3,()=>getKbOrNull(_0x1be5bf,_0xa71dbb));if(_0x2cce75)throw kbError(_0x1192a3?_0x3896dd(0x1bd):_0x3896dd(0x1ba),_0x3896dd(0x1c4)+_0xa71dbb+_0x3896dd(0x1c9),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0xa71dbb+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x177cc3=[RAG_WARNING];if(_0x5ee900!==undefined)_0x177cc3[_0x3896dd(0x1ac)](NON_ATOMIC_WARNING);return _0x1192a3&&_0x177cc3[_0x3896dd(0x1ac)](_0x3896dd(0x1cb)),{'ok':!![],'data':{'operation':_0x3896dd(0x1ca),'selector':{'id':_0x462bdc['id'],'scope':'company','appCode':_0x462bdc[_0x3896dd(0x1b4)]},'before':_0x462bdc,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x3896dd(0x1c5),'path':DELETE_PATH},'warnings':_0x177cc3,'verification':{'status':_0x3896dd(0x1b6),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x1192a3,'lookupCommand':_0x3896dd(0x1b0)+_0x462bdc['id']+'\x20--format\x20compress'}},'message':_0x3896dd(0x1c8)+_0x462bdc['id']};}};
@@ -1 +1 @@
1
- const a101_0x2fc4e4=a101_0x125c;(function(_0x99229d,_0x42d0b0){const _0xa3982=a101_0x125c,_0x3036c8=_0x99229d();while(!![]){try{const _0x591553=parseInt(_0xa3982(0x1be))/0x1*(-parseInt(_0xa3982(0x1bb))/0x2)+-parseInt(_0xa3982(0x1b7))/0x3*(-parseInt(_0xa3982(0x1c0))/0x4)+parseInt(_0xa3982(0x1c4))/0x5*(-parseInt(_0xa3982(0x1c5))/0x6)+-parseInt(_0xa3982(0x1c2))/0x7+parseInt(_0xa3982(0x1bd))/0x8*(parseInt(_0xa3982(0x1b6))/0x9)+-parseInt(_0xa3982(0x1b5))/0xa*(-parseInt(_0xa3982(0x1c1))/0xb)+-parseInt(_0xa3982(0x1bc))/0xc*(-parseInt(_0xa3982(0x1b8))/0xd);if(_0x591553===_0x42d0b0)break;else _0x3036c8['push'](_0x3036c8['shift']());}catch(_0x51117a){_0x3036c8['push'](_0x3036c8['shift']());}}}(a101_0x46c2,0xb2c4b));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';function a101_0x46c2(){const _0x4c755c=['3414323cHhIEb','4765397IgPWxY','Loaded\x20company\x20knowledge\x20base\x20','145030FsCgxX','156wngVDN','20kSbpdw','26253sRfJJM','259323DkeQlG','91hACTGw','number','read','2069022pfUDuF','1959252rkRBSr','1336TeSBtf','1jxYYPC','Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','44JGVVVP'];a101_0x46c2=function(){return _0x4c755c;};return a101_0x46c2();}function a101_0x125c(_0x5a606b,_0x4d949a){_0x5a606b=_0x5a606b-0x1b5;const _0x46c2d7=a101_0x46c2();let _0x125c63=_0x46c2d7[_0x5a606b];return _0x125c63;}export const kbDetail={'service':'kb','command':'detail','description':a101_0x2fc4e4(0x1bf),'risk':a101_0x2fc4e4(0x1ba),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a101_0x2fc4e4(0x1b9),'required':!![],'description':'Company\x20knowledge-base\x20id'}],async 'validate'(_0x12fdc6){readKbId(_0x12fdc6);},async 'execute'(_0x5493cc){const _0x1fbb9c=a101_0x2fc4e4,_0x320311=readKbId(_0x5493cc),_0x38e3aa=await requireKb(_0x5493cc,_0x320311);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0x38e3aa)},'message':_0x1fbb9c(0x1c3)+_0x320311};}};
1
+ const a101_0x11223a=a101_0x4a68;(function(_0x28f347,_0x5df185){const _0x38ae57=a101_0x4a68,_0x594e39=_0x28f347();while(!![]){try{const _0x5865ad=-parseInt(_0x38ae57(0xcb))/0x1*(-parseInt(_0x38ae57(0xc2))/0x2)+parseInt(_0x38ae57(0xc7))/0x3+-parseInt(_0x38ae57(0xc6))/0x4+-parseInt(_0x38ae57(0xc1))/0x5+-parseInt(_0x38ae57(0xc9))/0x6+parseInt(_0x38ae57(0xca))/0x7+parseInt(_0x38ae57(0xc8))/0x8*(parseInt(_0x38ae57(0xc3))/0x9);if(_0x5865ad===_0x5df185)break;else _0x594e39['push'](_0x594e39['shift']());}catch(_0x388150){_0x594e39['push'](_0x594e39['shift']());}}}(a101_0x35ad,0x6eb61));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';function a101_0x4a68(_0x5ab328,_0x42ec82){_0x5ab328=_0x5ab328-0xc1;const _0x35ad2e=a101_0x35ad();let _0x4a68c8=_0x35ad2e[_0x5ab328];return _0x4a68c8;}function a101_0x35ad(){const _0x1f54b5=['Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','269370BUEYuU','160026HOfnff','279mrcoMB','Company\x20knowledge-base\x20id','detail','1520116VmazaY','2244099OeubQb','18240eKIoFx','4330506irYAhx','1052170rUlzTs','8nIivfh'];a101_0x35ad=function(){return _0x1f54b5;};return a101_0x35ad();}export const kbDetail={'service':'kb','command':a101_0x11223a(0xc5),'description':a101_0x11223a(0xcc),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'number','required':!![],'description':a101_0x11223a(0xc4)}],async 'validate'(_0x53eefc){readKbId(_0x53eefc);},async 'execute'(_0x1b7f31){const _0x186310=readKbId(_0x1b7f31),_0x2b2830=await requireKb(_0x1b7f31,_0x186310);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0x2b2830)},'message':'Loaded\x20company\x20knowledge\x20base\x20'+_0x186310};}};
@@ -1 +1 @@
1
- (function(_0x1e2ea4,_0x2dd482){const _0x1a8873=a102_0x40f3,_0x17374f=_0x1e2ea4();while(!![]){try{const _0x1cadfe=-parseInt(_0x1a8873(0x18f))/0x1+-parseInt(_0x1a8873(0x195))/0x2*(-parseInt(_0x1a8873(0x190))/0x3)+parseInt(_0x1a8873(0x193))/0x4*(parseInt(_0x1a8873(0x18e))/0x5)+-parseInt(_0x1a8873(0x18b))/0x6*(parseInt(_0x1a8873(0x192))/0x7)+parseInt(_0x1a8873(0x18c))/0x8+-parseInt(_0x1a8873(0x18d))/0x9*(parseInt(_0x1a8873(0x191))/0xa)+parseInt(_0x1a8873(0x194))/0xb;if(_0x1cadfe===_0x2dd482)break;else _0x17374f['push'](_0x17374f['shift']());}catch(_0x579af4){_0x17374f['push'](_0x17374f['shift']());}}}(a102_0x5575,0xcb09b));function a102_0x40f3(_0x4b55de,_0x476571){_0x4b55de=_0x4b55de-0x18b;const _0x557541=a102_0x5575();let _0x40f3f4=_0x557541[_0x4b55de];return _0x40f3f4;}import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbDelete];function a102_0x5575(){const _0x44e202=['7234295UpVTzH','537569yAgqxS','204612FMHNqq','240iyvzhl','4912481QJVAVb','4KaIfwA','9083404sALAeQ','8DmOHPn','6OiysDM','704544AVIQDB','210942jONqkg'];a102_0x5575=function(){return _0x44e202;};return a102_0x5575();}
1
+ (function(_0x39d4bd,_0x2820e0){const _0x1ca182=a102_0x3cba,_0x517080=_0x39d4bd();while(!![]){try{const _0x2c868e=parseInt(_0x1ca182(0x14b))/0x1+parseInt(_0x1ca182(0x14c))/0x2+parseInt(_0x1ca182(0x14e))/0x3*(parseInt(_0x1ca182(0x14f))/0x4)+-parseInt(_0x1ca182(0x14d))/0x5+parseInt(_0x1ca182(0x14a))/0x6*(-parseInt(_0x1ca182(0x152))/0x7)+-parseInt(_0x1ca182(0x151))/0x8+parseInt(_0x1ca182(0x149))/0x9*(parseInt(_0x1ca182(0x150))/0xa);if(_0x2c868e===_0x2820e0)break;else _0x517080['push'](_0x517080['shift']());}catch(_0x1b50a2){_0x517080['push'](_0x517080['shift']());}}}(a102_0x1b16,0x677a9));function a102_0x3cba(_0x1adefb,_0x22d835){_0x1adefb=_0x1adefb-0x149;const _0x1b1603=a102_0x1b16();let _0x3cba2b=_0x1b1603[_0x1adefb];return _0x3cba2b;}import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';function a102_0x1b16(){const _0x290c19=['1396664vqEqRl','1746440ZjFIRV','372312WGqMgW','4pKVOYq','4670TXaLAl','3850400RrTlcj','7dUEWmf','7488lTGHsU','959592HETJkU','203389NlXFUw'];a102_0x1b16=function(){return _0x290c19;};return a102_0x1b16();}import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbDelete];
@@ -1 +1 @@
1
- const a103_0x561030=a103_0x14db;(function(_0x2b7d97,_0x262869){const _0x511def=a103_0x14db,_0x17c952=_0x2b7d97();while(!![]){try{const _0x4dd34c=-parseInt(_0x511def(0x14a))/0x1*(parseInt(_0x511def(0x148))/0x2)+parseInt(_0x511def(0x13f))/0x3+-parseInt(_0x511def(0x142))/0x4*(-parseInt(_0x511def(0x144))/0x5)+-parseInt(_0x511def(0x14c))/0x6*(parseInt(_0x511def(0x13a))/0x7)+parseInt(_0x511def(0x149))/0x8+parseInt(_0x511def(0x13b))/0x9*(parseInt(_0x511def(0x13e))/0xa)+-parseInt(_0x511def(0x146))/0xb;if(_0x4dd34c===_0x262869)break;else _0x17c952['push'](_0x17c952['shift']());}catch(_0x116c2d){_0x17c952['push'](_0x17c952['shift']());}}}(a103_0x543b,0x280f0));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a103_0x561030(0x147),'description':a103_0x561030(0x140),'risk':a103_0x561030(0x138),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a103_0x561030(0x13c),'type':'string','required':![],'description':a103_0x561030(0x141)}],async 'execute'(_0x40ccc){const _0x118df1=a103_0x561030,_0x6f0e08=_0x40ccc[_0x118df1(0x14b)](_0x118df1(0x13c))[_0x118df1(0x145)](),_0x47c388=await fetchAllCompanyKnowledgeBases(_0x40ccc,{..._0x6f0e08?{'title':_0x6f0e08}:{}}),_0x216dab=_0x47c388[_0x118df1(0x139)](projectKb);return{'ok':!![],'data':{'total':_0x216dab[_0x118df1(0x13d)],'knowledgeBases':_0x216dab},'message':_0x118df1(0x137)+_0x216dab[_0x118df1(0x13d)]+'\x20company\x20knowledge\x20base(s)\x20for\x20'+_0x40ccc[_0x118df1(0x143)]};}};function a103_0x14db(_0x1e9e40,_0x453b12){_0x1e9e40=_0x1e9e40-0x137;const _0x543b49=a103_0x543b();let _0x14db2c=_0x543b49[_0x1e9e40];return _0x14db2c;}function a103_0x543b(){const _0x5e4b55=['list','134ymVTmv','1524056bmKMDJ','3579blveRL','str','111876YqSncP','Found\x20','read','map','14bmALid','9kGHdka','title','length','412450fPoCVT','115794IavKou','List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','Filter\x20by\x20knowledge-base\x20title','4UCdhvH','appCode','1327715AsYawt','trim','1042008UZFuYo'];a103_0x543b=function(){return _0x5e4b55;};return a103_0x543b();}
1
+ const a103_0x5820c2=a103_0x56b9;(function(_0x17a65e,_0x390685){const _0x243c84=a103_0x56b9,_0x1d49fe=_0x17a65e();while(!![]){try{const _0x3e5cb3=parseInt(_0x243c84(0x170))/0x1+-parseInt(_0x243c84(0x16e))/0x2+-parseInt(_0x243c84(0x173))/0x3*(-parseInt(_0x243c84(0x17c))/0x4)+parseInt(_0x243c84(0x17e))/0x5*(parseInt(_0x243c84(0x175))/0x6)+parseInt(_0x243c84(0x177))/0x7+parseInt(_0x243c84(0x179))/0x8+-parseInt(_0x243c84(0x172))/0x9;if(_0x3e5cb3===_0x390685)break;else _0x1d49fe['push'](_0x1d49fe['shift']());}catch(_0x4652f9){_0x1d49fe['push'](_0x1d49fe['shift']());}}}(a103_0x3213,0x9400e));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';function a103_0x56b9(_0x4a7711,_0x1be434){_0x4a7711=_0x4a7711-0x16d;const _0x32134e=a103_0x3213();let _0x56b9a0=_0x32134e[_0x4a7711];return _0x56b9a0;}export const kbList={'service':'kb','command':a103_0x5820c2(0x17f),'description':'List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','risk':a103_0x5820c2(0x17b),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a103_0x5820c2(0x171),'type':a103_0x5820c2(0x17a),'required':![],'description':'Filter\x20by\x20knowledge-base\x20title'}],async 'execute'(_0x1feafb){const _0x675406=a103_0x5820c2,_0x128e6d=_0x1feafb[_0x675406(0x16d)](_0x675406(0x171))[_0x675406(0x17d)](),_0x95ff7b=await fetchAllCompanyKnowledgeBases(_0x1feafb,{..._0x128e6d?{'title':_0x128e6d}:{}}),_0x1a5976=_0x95ff7b[_0x675406(0x16f)](projectKb);return{'ok':!![],'data':{'total':_0x1a5976[_0x675406(0x180)],'knowledgeBases':_0x1a5976},'message':_0x675406(0x176)+_0x1a5976[_0x675406(0x180)]+_0x675406(0x174)+_0x1feafb[_0x675406(0x178)]};}};function a103_0x3213(){const _0x1f61f5=['title','31195215ISmIcZ','3326727vbFxgn','\x20company\x20knowledge\x20base(s)\x20for\x20','13998lTsPAL','Found\x20','8087310Sioswr','appCode','3616184rwpvIk','string','read','4FjIXzi','trim','1655xWAOps','list','length','str','1253064tfqqWT','map','1210404eqxFfi'];a103_0x3213=function(){return _0x1f61f5;};return a103_0x3213();}
@@ -1 +1 @@
1
- function a104_0x24db(){const _0xda666=['items','length','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','\x20while\x20page\x20','kb_id_invalid','isFile','num','kb_scope_mismatch','\x20was\x20requested.','scope','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','content','push','yes','\x20version\x20changed:\x20expected\x20','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','kb_response_invalid','168135klHGho','isSafeInteger','paging','dry-run','stringify','2ynHGic','bool','kb_file_required','has','verification_unavailable','allowEmpty','update','kb_content_invalid','kb_list_contract_invalid','defineProperty','sha256','contentHash','currentPage','createTime','outcome_unknown','Company\x20knowledge\x20base\x20not\x20found:\x20','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','digest','\x20records.','Knowledge-base\x20get-one\x20returned\x20id\x20','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','kb_state_drift','8ipajUi','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','\x20of\x20',',\x20current\x20','company','Pass\x20--file\x20<knowledge.md>.','1777230BwYrYx','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','\x20during\x20paging.','\x20response\x20contains\x20an\x20invalid\x20version.','title','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','kb_file_invalid','\x20to\x20','Knowledge\x20base\x20','trim','version','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','filter','message','byteLength','byteSize','133940BHVOBE','utf-8','totalCount','cookie','from','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','306','117695JKorGI','Knowledge-base\x20list\x20total\x20changed\x20from\x20','2570445tZQjwQ','1741128GirtPK','updateTime','appCode','number','kb_not_found','string','1111950LTSoqv','cause'];a104_0x24db=function(){return _0xda666;};return a104_0x24db();}const a104_0x522eaa=a104_0x4b8b;(function(_0xc1602a,_0x202496){const _0xa80349=a104_0x4b8b,_0x2f734d=_0xc1602a();while(!![]){try{const _0x71dab4=-parseInt(_0xa80349(0x98))/0x1*(-parseInt(_0xa80349(0xc5))/0x2)+-parseInt(_0xa80349(0x93))/0x3+-parseInt(_0xa80349(0xae))/0x4*(parseInt(_0xa80349(0xcc))/0x5)+-parseInt(_0xa80349(0xd5))/0x6+parseInt(_0xa80349(0xb5))/0x7+-parseInt(_0xa80349(0xcf))/0x8+parseInt(_0xa80349(0xce))/0x9;if(_0x71dab4===_0x202496)break;else _0x2f734d['push'](_0x2f734d['shift']());}catch(_0x1c74c6){_0x2f734d['push'](_0x2f734d['shift']());}}}(a104_0x24db,0x28db2));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{getEnterpriseKnowledgeBase,getPlatformErrorCode,listEnterpriseKnowledgeBases}from'../../core/api-client.js';function a104_0x4b8b(_0x38a55f,_0x65771d){_0x38a55f=_0x38a55f-0x89;const _0x24db26=a104_0x24db();let _0x4b8b22=_0x24db26[_0x38a55f];return _0x4b8b22;}import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a104_0x522eaa(0xcb);export function kbError(_0x362644,_0x4f8331,_0xd32e76){return new CliError(_0x362644,0x1,_0x4f8331,_0xd32e76);}export function readKbId(_0x1d4e03){const _0x17984e=a104_0x522eaa,_0x2df25f=_0x1d4e03[_0x17984e(0xdd)]('id');if(!Number['isSafeInteger'](_0x2df25f)||_0x2df25f<=0x0)throw kbError(_0x17984e(0xdb),_0x17984e(0xc0));return _0x2df25f;}export function requireKbExplicitYes(_0x45a3b3){const _0x3d4c73=a104_0x522eaa;if(_0x45a3b3[_0x3d4c73(0x99)](_0x3d4c73(0x96))||_0x45a3b3[_0x3d4c73(0x99)](_0x3d4c73(0x8f)))return;throw kbError('kb_confirmation_required',_0x3d4c73(0x8c),_0x3d4c73(0xa8));}function sha256(_0x535267){const _0x16c465=a104_0x522eaa;return'sha256:'+createHash(_0x16c465(0xa2))[_0x16c465(0x9e)](_0x535267)[_0x16c465(0xa9)]('hex');}export function inspectKbContent(_0x5c5cbf){const _0xf31bbf=a104_0x522eaa,_0x4f4e95=Buffer[_0xf31bbf(0xc9)](_0x5c5cbf,'utf8');return{'content':_0x5c5cbf,'byteSize':_0x4f4e95[_0xf31bbf(0xc3)],'contentHash':sha256(_0x4f4e95)};}export async function readKbFile(_0x26c5e9){const _0xe59c5f=a104_0x522eaa,_0x14386d=_0x26c5e9[_0xe59c5f(0xbe)]();if(!_0x14386d)throw kbError(_0xe59c5f(0x9a),_0xe59c5f(0xca),_0xe59c5f(0xb4));const _0xa10da0=resolve(_0x14386d);let _0x520d70;try{_0x520d70=await stat(_0xa10da0);}catch(_0x316562){throw kbError('kb_file_unreadable','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20'+_0x14386d,_0x316562 instanceof Error?_0x316562[_0xe59c5f(0xc2)]:String(_0x316562));}if(!_0x520d70[_0xe59c5f(0xdc)]())throw kbError(_0xe59c5f(0xbb),_0xe59c5f(0xd9)+_0x14386d);let _0x48a85e;try{_0x48a85e=await readFile(_0xa10da0);}catch(_0x2c81ea){throw kbError('kb_file_unreadable',_0xe59c5f(0xb6)+_0x14386d,_0x2c81ea instanceof Error?_0x2c81ea['message']:String(_0x2c81ea));}let _0xdcf691;try{_0xdcf691=new TextDecoder(_0xe59c5f(0xc6),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x48a85e);}catch{throw kbError(_0xe59c5f(0x9f),'Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x14386d);}if(!_0xdcf691[_0xe59c5f(0xbe)]())throw kbError(_0xe59c5f(0x9f),'Knowledge-base\x20content\x20file\x20is\x20blank:\x20'+_0x14386d);return inspectKbContent(_0xdcf691);}export async function verifyKbMutationReadback(_0x544f6a,_0x43fa3a,_0x17f69f){const _0x5cef36=a104_0x522eaa;try{return await _0x17f69f();}catch(_0x2cfe71){const _0x5318aa=kbError('kb_'+_0x544f6a+'_'+(_0x43fa3a?_0x5cef36(0xa6):_0x5cef36(0x9c)),'The\x20'+_0x544f6a+_0x5cef36(0x91),'Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.');Object[_0x5cef36(0xa1)](_0x5318aa,_0x5cef36(0xd6),{'value':_0x2cfe71,'enumerable':![]});throw _0x5318aa;}}function requireRecordText(_0x4d082a,_0x399673,_0x26c935,_0x39f7f9={}){const _0x100ad1=a104_0x522eaa;if(typeof _0x4d082a===_0x100ad1(0xd4)&&(_0x39f7f9[_0x100ad1(0x9d)]||_0x4d082a[_0x100ad1(0xbe)]()))return _0x4d082a;throw kbError('kb_response_invalid',_0x100ad1(0xbd)+String(_0x26c935)+'\x20response\x20is\x20missing\x20'+_0x399673+'.');}export function projectKb(_0x146038){const _0x2322f9=a104_0x522eaa;if(!Number[_0x2322f9(0x94)](_0x146038['id'])||_0x146038['id']<=0x0)throw kbError('kb_response_invalid','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.');if(!Number[_0x2322f9(0x94)](_0x146038[_0x2322f9(0xbf)])||_0x146038['version']<0x0)throw kbError(_0x2322f9(0x92),'Knowledge\x20base\x20'+_0x146038['id']+_0x2322f9(0xb8));if(_0x146038[_0x2322f9(0x8b)]!==_0x2322f9(0xb3))throw kbError(_0x2322f9(0x89),_0x2322f9(0xbd)+_0x146038['id']+'\x20is\x20not\x20company-scoped.');const _0x17a998=requireRecordText(_0x146038[_0x2322f9(0xd1)],_0x2322f9(0xd1),_0x146038['id']),_0x132591=requireRecordText(_0x146038['title'],_0x2322f9(0xb9),_0x146038['id']),_0x43a101=inspectKbContent(requireRecordText(_0x146038['content'],_0x2322f9(0x8d),_0x146038['id'],{'allowEmpty':!![]})),_0x31b726=typeof _0x146038[_0x2322f9(0xa5)]===_0x2322f9(0xd4)||typeof _0x146038[_0x2322f9(0xa5)]===_0x2322f9(0xd2)?_0x146038['createTime']:undefined,_0x5632d2=typeof _0x146038[_0x2322f9(0xd0)]==='string'||typeof _0x146038[_0x2322f9(0xd0)]===_0x2322f9(0xd2)?_0x146038['updateTime']:undefined,_0x2aab87=sha256(JSON[_0x2322f9(0x97)]({'id':_0x146038['id'],'scope':_0x146038[_0x2322f9(0x8b)],'appCode':_0x17a998,'title':_0x132591,'version':_0x146038['version'],'contentHash':_0x43a101[_0x2322f9(0xa3)],'createTime':_0x31b726,'updateTime':_0x5632d2}));return{'id':_0x146038['id'],'scope':_0x2322f9(0xb3),'appCode':_0x17a998,'title':_0x132591,'version':_0x146038[_0x2322f9(0xbf)],'contentByteSize':_0x43a101[_0x2322f9(0xc4)],'contentHash':_0x43a101[_0x2322f9(0xa3)],'snapshotHash':_0x2aab87,..._0x31b726!==undefined?{'createTime':_0x31b726}:{},..._0x5632d2!==undefined?{'updateTime':_0x5632d2}:{}};}export function assertCompanyKnowledgeBase(_0x3120be,_0x56bcdd,_0xea7e){const _0x39d7f7=a104_0x522eaa;if(_0xea7e!==undefined&&_0x3120be['id']!==_0xea7e)throw kbError(_0x39d7f7(0x92),_0x39d7f7(0xab)+_0x3120be['id']+'\x20while\x20id\x20'+_0xea7e+_0x39d7f7(0x8a));if(_0x3120be[_0x39d7f7(0x8b)]!=='company'||_0x3120be[_0x39d7f7(0xd1)]!==_0x56bcdd)throw kbError('kb_scope_mismatch',_0x39d7f7(0xbd)+_0x3120be['id']+_0x39d7f7(0xba)+_0x56bcdd+'.');}export async function fetchAllCompanyKnowledgeBases(_0xf5d570,_0x2f1485){const _0x3f386f=a104_0x522eaa,_0x1bb431=[],_0x26e4a5=new Set();let _0x4c50c5=0x1,_0x269237=0x0,_0x52a067;while(!![]){const _0x404eca=await listEnterpriseKnowledgeBases(_0xf5d570[_0x3f386f(0xc8)],{'currentPage':_0x4c50c5,'pageSize':LIST_PAGE_SIZE,'appCode':_0xf5d570[_0x3f386f(0xd1)],..._0x2f1485}),_0x3be297=_0x404eca[_0x3f386f(0x95)]?.[_0x3f386f(0xc7)];if(_0x404eca[_0x3f386f(0x95)]?.['currentPage']!==undefined&&_0x404eca[_0x3f386f(0x95)]['currentPage']!==_0x4c50c5)throw kbError(_0x3f386f(0xa0),'Knowledge-base\x20list\x20returned\x20page\x20'+_0x404eca[_0x3f386f(0x95)][_0x3f386f(0xa4)]+_0x3f386f(0xda)+_0x4c50c5+_0x3f386f(0x8a));if(_0x3be297!==undefined){if(_0x52a067!==undefined&&_0x3be297!==_0x52a067)throw kbError(_0x3f386f(0xa0),_0x3f386f(0xcd)+_0x52a067+_0x3f386f(0xbc)+_0x3be297+_0x3f386f(0xb7),_0x3f386f(0xaf));_0x52a067=_0x3be297;}for(const _0x466f61 of _0x404eca['items']){if(!Number[_0x3f386f(0x94)](_0x466f61['id'])||_0x26e4a5[_0x3f386f(0x9b)](_0x466f61['id']))throw kbError(_0x3f386f(0xa0),_0x3f386f(0xac)+String(_0x466f61['id'])+'.');_0x26e4a5['add'](_0x466f61['id']),_0x466f61['scope']===_0x3f386f(0xb3)&&_0x466f61[_0x3f386f(0xd1)]===_0xf5d570[_0x3f386f(0xd1)]&&_0x1bb431[_0x3f386f(0x8e)](_0x466f61);}_0x269237+=_0x404eca[_0x3f386f(0xd7)][_0x3f386f(0xd8)];if(_0x3be297!==undefined&&_0x269237>=_0x3be297)break;if(_0x404eca[_0x3f386f(0xd7)][_0x3f386f(0xd8)]<LIST_PAGE_SIZE){if(_0x3be297!==undefined&&_0x269237<_0x3be297)throw kbError(_0x3f386f(0xa0),'Knowledge-base\x20list\x20stopped\x20at\x20'+_0x269237+_0x3f386f(0xb1)+_0x3be297+_0x3f386f(0xaa));break;}_0x4c50c5+=0x1;}return _0x1bb431;}export function findExactCompanyKnowledgeBases(_0x3fe1e1,_0x5bc3d6,_0x5e7d13){const _0xa04a8c=a104_0x522eaa;return _0x3fe1e1[_0xa04a8c(0xc1)](_0x2b0fe5=>_0x2b0fe5[_0xa04a8c(0x8b)]===_0xa04a8c(0xb3)&&_0x2b0fe5[_0xa04a8c(0xd1)]===_0x5bc3d6&&_0x2b0fe5[_0xa04a8c(0xb9)]===_0x5e7d13);}export async function getKbOrNull(_0x2ab78d,_0x1bb710){const _0x41610b=a104_0x522eaa;try{const _0xf4fd61=await getEnterpriseKnowledgeBase(_0x2ab78d[_0x41610b(0xc8)],_0x1bb710);return assertCompanyKnowledgeBase(_0xf4fd61,_0x2ab78d[_0x41610b(0xd1)],_0x1bb710),_0xf4fd61;}catch(_0x3c8ad0){if(getPlatformErrorCode(_0x3c8ad0)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0x3c8ad0;}}export async function requireKb(_0x35ee16,_0x1246d8){const _0xe314b5=a104_0x522eaa,_0x5db205=await getKbOrNull(_0x35ee16,_0x1246d8);if(!_0x5db205)throw kbError(_0xe314b5(0xd3),_0xe314b5(0xa7)+_0x1246d8,'Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.');return _0x5db205;}export function assertExpectedKbVersion(_0xfdc637,_0x30d7f5){const _0x5e1e60=a104_0x522eaa;if(_0x30d7f5===undefined||_0xfdc637[_0x5e1e60(0xbf)]===_0x30d7f5)return;throw kbError(_0x5e1e60(0xad),_0x5e1e60(0xbd)+_0xfdc637['id']+_0x5e1e60(0x90)+_0x30d7f5+_0x5e1e60(0xb2)+_0xfdc637[_0x5e1e60(0xbf)]+'.',_0x5e1e60(0xb0));}
1
+ const a104_0x35f6d8=a104_0x2542;(function(_0x2f9e8e,_0x2b19fc){const _0x297797=a104_0x2542,_0x4266de=_0x2f9e8e();while(!![]){try{const _0x3e4970=-parseInt(_0x297797(0x20f))/0x1*(parseInt(_0x297797(0x215))/0x2)+parseInt(_0x297797(0x20c))/0x3+-parseInt(_0x297797(0x1ec))/0x4+parseInt(_0x297797(0x1f7))/0x5*(parseInt(_0x297797(0x1fd))/0x6)+parseInt(_0x297797(0x21a))/0x7+parseInt(_0x297797(0x239))/0x8*(parseInt(_0x297797(0x238))/0x9)+parseInt(_0x297797(0x213))/0xa;if(_0x3e4970===_0x2b19fc)break;else _0x4266de['push'](_0x4266de['shift']());}catch(_0x1397e1){_0x4266de['push'](_0x4266de['shift']());}}}(a104_0x25df,0xa6c84));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';function a104_0x2542(_0xb9ce8b,_0x1099b5){_0xb9ce8b=_0xb9ce8b-0x1e9;const _0x25df8c=a104_0x25df();let _0x2542fc=_0x25df8c[_0xb9ce8b];return _0x2542fc;}import{getEnterpriseKnowledgeBase,getPlatformErrorCode,listEnterpriseKnowledgeBases}from'../../core/api-client.js';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a104_0x35f6d8(0x21e);export function kbError(_0x2a1794,_0x1b580e,_0x3b1854){return new CliError(_0x2a1794,0x1,_0x1b580e,_0x3b1854);}export function readKbId(_0x59e534){const _0x265922=a104_0x35f6d8,_0x56a26a=_0x59e534[_0x265922(0x1f4)]('id');if(!Number[_0x265922(0x236)](_0x56a26a)||_0x56a26a<=0x0)throw kbError('kb_id_invalid',_0x265922(0x22a));return _0x56a26a;}export function requireKbExplicitYes(_0x32c4f5){const _0x146a96=a104_0x35f6d8;if(_0x32c4f5[_0x146a96(0x223)]('dry-run')||_0x32c4f5['bool'](_0x146a96(0x207)))return;throw kbError(_0x146a96(0x20b),'This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}function a104_0x25df(){const _0xb1e164=['message','from','paging','trim','yes','items','\x20to\x20','kb_response_invalid','kb_confirmation_required','217899lcJnKu','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','1JdpHfi','kb_list_contract_invalid','sha256','Knowledge\x20base\x20','1341790uikftm','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','2544506gSqpuR','\x20of\x20','\x20response\x20is\x20missing\x20','cookie','has','9500862PCzduL','content','\x20while\x20id\x20','currentPage','306','outcome_unknown','The\x20','kb_file_unreadable','kb_file_required','bool','number','byteSize','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','add','kb_','appCode','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','hex','createTime','\x20is\x20not\x20company-scoped.','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','kb_scope_mismatch','kb_content_invalid','\x20records.','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','totalCount','\x20was\x20requested.','length','isSafeInteger','utf8','369DFPecF','57952tYEwny','kb_file_invalid','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','kb_state_drift','string','6408TxEbnP','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','isFile','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','updateTime','Knowledge-base\x20list\x20total\x20changed\x20from\x20','allowEmpty','version','num','company','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','53285IfjnkC','Knowledge-base\x20list\x20returned\x20page\x20','\x20while\x20page\x20',',\x20current\x20','push','scope','54KZjpWL','Knowledge-base\x20list\x20stopped\x20at\x20','title','Pass\x20--file\x20<knowledge.md>.','contentHash','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.'];a104_0x25df=function(){return _0xb1e164;};return a104_0x25df();}function sha256(_0x5311f4){const _0x467ce4=a104_0x35f6d8;return'sha256:'+createHash(_0x467ce4(0x211))['update'](_0x5311f4)['digest'](_0x467ce4(0x22b));}export function inspectKbContent(_0x4fdfe3){const _0x35a5b7=a104_0x35f6d8,_0x3a695e=Buffer[_0x35a5b7(0x204)](_0x4fdfe3,_0x35a5b7(0x237));return{'content':_0x4fdfe3,'byteSize':_0x3a695e['byteLength'],'contentHash':sha256(_0x3a695e)};}export async function readKbFile(_0x31555c){const _0x509c8d=a104_0x35f6d8,_0x37d4c6=_0x31555c['trim']();if(!_0x37d4c6)throw kbError(_0x509c8d(0x222),_0x509c8d(0x1ef),_0x509c8d(0x200));const _0x2d9a6d=resolve(_0x37d4c6);let _0x2c0266;try{_0x2c0266=await stat(_0x2d9a6d);}catch(_0x2b4890){throw kbError(_0x509c8d(0x221),_0x509c8d(0x226)+_0x37d4c6,_0x2b4890 instanceof Error?_0x2b4890[_0x509c8d(0x203)]:String(_0x2b4890));}if(!_0x2c0266[_0x509c8d(0x1ee)]())throw kbError(_0x509c8d(0x23a),_0x509c8d(0x1f6)+_0x37d4c6);let _0x54d66a;try{_0x54d66a=await readFile(_0x2d9a6d);}catch(_0x50a433){throw kbError(_0x509c8d(0x221),_0x509c8d(0x1ed)+_0x37d4c6,_0x50a433 instanceof Error?_0x50a433[_0x509c8d(0x203)]:String(_0x50a433));}let _0x196a94;try{_0x196a94=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x54d66a);}catch{throw kbError(_0x509c8d(0x230),_0x509c8d(0x20e)+_0x37d4c6);}if(!_0x196a94[_0x509c8d(0x206)]())throw kbError('kb_content_invalid','Knowledge-base\x20content\x20file\x20is\x20blank:\x20'+_0x37d4c6);return inspectKbContent(_0x196a94);}export async function verifyKbMutationReadback(_0x428c4f,_0x2b85ca,_0x5ebbb5){const _0x53e999=a104_0x35f6d8;try{return await _0x5ebbb5();}catch(_0x48553c){const _0x48acdc=kbError(_0x53e999(0x228)+_0x428c4f+'_'+(_0x2b85ca?_0x53e999(0x21f):'verification_unavailable'),_0x53e999(0x220)+_0x428c4f+'\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.',_0x53e999(0x202));Object['defineProperty'](_0x48acdc,'cause',{'value':_0x48553c,'enumerable':![]});throw _0x48acdc;}}function requireRecordText(_0x5976c2,_0x26e550,_0xd092a2,_0xe46bcd={}){const _0x51be22=a104_0x35f6d8;if(typeof _0x5976c2==='string'&&(_0xe46bcd[_0x51be22(0x1f2)]||_0x5976c2[_0x51be22(0x206)]()))return _0x5976c2;throw kbError(_0x51be22(0x20a),_0x51be22(0x212)+String(_0xd092a2)+_0x51be22(0x217)+_0x26e550+'.');}export function projectKb(_0x1cf736){const _0x376fbe=a104_0x35f6d8;if(!Number[_0x376fbe(0x236)](_0x1cf736['id'])||_0x1cf736['id']<=0x0)throw kbError('kb_response_invalid',_0x376fbe(0x232));if(!Number[_0x376fbe(0x236)](_0x1cf736[_0x376fbe(0x1f3)])||_0x1cf736[_0x376fbe(0x1f3)]<0x0)throw kbError(_0x376fbe(0x20a),_0x376fbe(0x212)+_0x1cf736['id']+'\x20response\x20contains\x20an\x20invalid\x20version.');if(_0x1cf736[_0x376fbe(0x1fc)]!=='company')throw kbError(_0x376fbe(0x22f),_0x376fbe(0x212)+_0x1cf736['id']+_0x376fbe(0x22d));const _0x4d0381=requireRecordText(_0x1cf736['appCode'],'appCode',_0x1cf736['id']),_0x219007=requireRecordText(_0x1cf736['title'],_0x376fbe(0x1ff),_0x1cf736['id']),_0x1fb20d=inspectKbContent(requireRecordText(_0x1cf736[_0x376fbe(0x21b)],_0x376fbe(0x21b),_0x1cf736['id'],{'allowEmpty':!![]})),_0xfa5ae=typeof _0x1cf736['createTime']===_0x376fbe(0x1eb)||typeof _0x1cf736[_0x376fbe(0x22c)]===_0x376fbe(0x224)?_0x1cf736[_0x376fbe(0x22c)]:undefined,_0x2ef8ff=typeof _0x1cf736['updateTime']===_0x376fbe(0x1eb)||typeof _0x1cf736['updateTime']===_0x376fbe(0x224)?_0x1cf736[_0x376fbe(0x1f0)]:undefined,_0x589389=sha256(JSON['stringify']({'id':_0x1cf736['id'],'scope':_0x1cf736[_0x376fbe(0x1fc)],'appCode':_0x4d0381,'title':_0x219007,'version':_0x1cf736[_0x376fbe(0x1f3)],'contentHash':_0x1fb20d[_0x376fbe(0x201)],'createTime':_0xfa5ae,'updateTime':_0x2ef8ff}));return{'id':_0x1cf736['id'],'scope':_0x376fbe(0x1f5),'appCode':_0x4d0381,'title':_0x219007,'version':_0x1cf736[_0x376fbe(0x1f3)],'contentByteSize':_0x1fb20d[_0x376fbe(0x225)],'contentHash':_0x1fb20d[_0x376fbe(0x201)],'snapshotHash':_0x589389,..._0xfa5ae!==undefined?{'createTime':_0xfa5ae}:{},..._0x2ef8ff!==undefined?{'updateTime':_0x2ef8ff}:{}};}export function assertCompanyKnowledgeBase(_0x125001,_0x18b4e2,_0x5a8f5f){const _0x1159fa=a104_0x35f6d8;if(_0x5a8f5f!==undefined&&_0x125001['id']!==_0x5a8f5f)throw kbError(_0x1159fa(0x20a),'Knowledge-base\x20get-one\x20returned\x20id\x20'+_0x125001['id']+_0x1159fa(0x21c)+_0x5a8f5f+_0x1159fa(0x234));if(_0x125001['scope']!=='company'||_0x125001[_0x1159fa(0x229)]!==_0x18b4e2)throw kbError(_0x1159fa(0x22f),_0x1159fa(0x212)+_0x125001['id']+_0x1159fa(0x1e9)+_0x18b4e2+'.');}export async function fetchAllCompanyKnowledgeBases(_0xa7c346,_0x382578){const _0x5be301=a104_0x35f6d8,_0x1f217a=[],_0x31f153=new Set();let _0xbd57b4=0x1,_0x2b176d=0x0,_0x1bdc3f;while(!![]){const _0x18ae8f=await listEnterpriseKnowledgeBases(_0xa7c346[_0x5be301(0x218)],{'currentPage':_0xbd57b4,'pageSize':LIST_PAGE_SIZE,'appCode':_0xa7c346['appCode'],..._0x382578}),_0x281554=_0x18ae8f[_0x5be301(0x205)]?.[_0x5be301(0x233)];if(_0x18ae8f[_0x5be301(0x205)]?.[_0x5be301(0x21d)]!==undefined&&_0x18ae8f[_0x5be301(0x205)][_0x5be301(0x21d)]!==_0xbd57b4)throw kbError(_0x5be301(0x210),_0x5be301(0x1f8)+_0x18ae8f[_0x5be301(0x205)][_0x5be301(0x21d)]+_0x5be301(0x1f9)+_0xbd57b4+'\x20was\x20requested.');if(_0x281554!==undefined){if(_0x1bdc3f!==undefined&&_0x281554!==_0x1bdc3f)throw kbError('kb_list_contract_invalid',_0x5be301(0x1f1)+_0x1bdc3f+_0x5be301(0x209)+_0x281554+'\x20during\x20paging.','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.');_0x1bdc3f=_0x281554;}for(const _0x1f26b4 of _0x18ae8f[_0x5be301(0x208)]){if(!Number[_0x5be301(0x236)](_0x1f26b4['id'])||_0x31f153[_0x5be301(0x219)](_0x1f26b4['id']))throw kbError(_0x5be301(0x210),_0x5be301(0x22e)+String(_0x1f26b4['id'])+'.');_0x31f153[_0x5be301(0x227)](_0x1f26b4['id']),_0x1f26b4['scope']===_0x5be301(0x1f5)&&_0x1f26b4[_0x5be301(0x229)]===_0xa7c346[_0x5be301(0x229)]&&_0x1f217a[_0x5be301(0x1fb)](_0x1f26b4);}_0x2b176d+=_0x18ae8f['items']['length'];if(_0x281554!==undefined&&_0x2b176d>=_0x281554)break;if(_0x18ae8f[_0x5be301(0x208)][_0x5be301(0x235)]<LIST_PAGE_SIZE){if(_0x281554!==undefined&&_0x2b176d<_0x281554)throw kbError(_0x5be301(0x210),_0x5be301(0x1fe)+_0x2b176d+_0x5be301(0x216)+_0x281554+_0x5be301(0x231));break;}_0xbd57b4+=0x1;}return _0x1f217a;}export function findExactCompanyKnowledgeBases(_0x3b4e83,_0x2ef882,_0x39f01c){const _0x2feb58=a104_0x35f6d8;return _0x3b4e83['filter'](_0xecafc8=>_0xecafc8[_0x2feb58(0x1fc)]===_0x2feb58(0x1f5)&&_0xecafc8['appCode']===_0x2ef882&&_0xecafc8[_0x2feb58(0x1ff)]===_0x39f01c);}export async function getKbOrNull(_0x557c9a,_0x47197c){const _0x158968=a104_0x35f6d8;try{const _0x3fa064=await getEnterpriseKnowledgeBase(_0x557c9a['cookie'],_0x47197c);return assertCompanyKnowledgeBase(_0x3fa064,_0x557c9a[_0x158968(0x229)],_0x47197c),_0x3fa064;}catch(_0x234afd){if(getPlatformErrorCode(_0x234afd)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0x234afd;}}export async function requireKb(_0x2ed41e,_0x33bf22){const _0x3a3671=a104_0x35f6d8,_0x550960=await getKbOrNull(_0x2ed41e,_0x33bf22);if(!_0x550960)throw kbError('kb_not_found','Company\x20knowledge\x20base\x20not\x20found:\x20'+_0x33bf22,_0x3a3671(0x214));return _0x550960;}export function assertExpectedKbVersion(_0x55e110,_0x202abe){const _0x110ef1=a104_0x35f6d8;if(_0x202abe===undefined||_0x55e110[_0x110ef1(0x1f3)]===_0x202abe)return;throw kbError(_0x110ef1(0x1ea),_0x110ef1(0x212)+_0x55e110['id']+'\x20version\x20changed:\x20expected\x20'+_0x202abe+_0x110ef1(0x1fa)+_0x55e110[_0x110ef1(0x1f3)]+'.',_0x110ef1(0x20d));}