@lovrabet/rabetbase-cli 2.5.6-beta.1 → 2.5.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/README.md +15 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/detail.js +1 -1
  27. package/lib/commands/app/index.js +1 -1
  28. package/lib/commands/app/list.js +1 -1
  29. package/lib/commands/app/members-list.js +1 -1
  30. package/lib/commands/app/remote-directory.js +1 -1
  31. package/lib/commands/app/shared.js +1 -1
  32. package/lib/commands/app-config/delete.js +1 -1
  33. package/lib/commands/app-config/get.js +1 -1
  34. package/lib/commands/app-config/index.js +1 -1
  35. package/lib/commands/app-config/list.js +1 -1
  36. package/lib/commands/app-config/set.js +1 -1
  37. package/lib/commands/app-config/shared.js +1 -1
  38. package/lib/commands/auth/index.js +1 -1
  39. package/lib/commands/bff/create.js +1 -1
  40. package/lib/commands/bff/delete.js +1 -1
  41. package/lib/commands/bff/detail.js +1 -1
  42. package/lib/commands/bff/index.js +1 -1
  43. package/lib/commands/bff/list.js +1 -1
  44. package/lib/commands/bff/logs.js +1 -1
  45. package/lib/commands/bff/pull.js +1 -1
  46. package/lib/commands/bff/push.js +1 -1
  47. package/lib/commands/bff/status.js +1 -1
  48. package/lib/commands/cli-skill/index.js +1 -1
  49. package/lib/commands/cli-update.js +1 -1
  50. package/lib/commands/codegen/index.js +1 -1
  51. package/lib/commands/codegen/sdk.js +1 -1
  52. package/lib/commands/codegen/sql.js +1 -1
  53. package/lib/commands/common/app-registry.js +1 -1
  54. package/lib/commands/common/app-selector.js +1 -1
  55. package/lib/commands/common/async-task.js +1 -1
  56. package/lib/commands/common/dry-run.js +1 -1
  57. package/lib/commands/common/flags.js +1 -1
  58. package/lib/commands/common/local-file.js +1 -1
  59. package/lib/commands/common/validate.js +1 -1
  60. package/lib/commands/config/delete.js +1 -1
  61. package/lib/commands/config/get.js +1 -1
  62. package/lib/commands/config/index.js +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/design-context.d.ts +1 -0
  78. package/lib/commands/dataset/design-context.js +1 -0
  79. package/lib/commands/dataset/design-start.d.ts +1 -0
  80. package/lib/commands/dataset/design-start.js +1 -0
  81. package/lib/commands/dataset/design-status.d.ts +1 -0
  82. package/lib/commands/dataset/design-status.js +1 -0
  83. package/lib/commands/dataset/design-sync-retry.d.ts +1 -0
  84. package/lib/commands/dataset/design-sync-retry.js +1 -0
  85. package/lib/commands/dataset/design-sync-status.d.ts +1 -0
  86. package/lib/commands/dataset/design-sync-status.js +1 -0
  87. package/lib/commands/dataset/design-validate.d.ts +1 -0
  88. package/lib/commands/dataset/design-validate.js +1 -0
  89. package/lib/commands/dataset/detail.js +1 -1
  90. package/lib/commands/dataset/extend-update.js +1 -1
  91. package/lib/commands/dataset/field-restore.js +1 -1
  92. package/lib/commands/dataset/field-update.js +1 -1
  93. package/lib/commands/dataset/generate.js +1 -1
  94. package/lib/commands/dataset/index.js +1 -1
  95. package/lib/commands/dataset/list.js +1 -1
  96. package/lib/commands/dataset/operations.js +1 -1
  97. package/lib/commands/dataset/relation-audit.js +1 -1
  98. package/lib/commands/dataset/relation-create.js +1 -1
  99. package/lib/commands/dataset/relation-delete.js +1 -1
  100. package/lib/commands/dataset/relation-shared.js +1 -1
  101. package/lib/commands/dataset/relation-update.js +1 -1
  102. package/lib/commands/dataset/relations.js +1 -1
  103. package/lib/commands/dataset/rename.js +1 -1
  104. package/lib/commands/dataset/restore.js +1 -1
  105. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  106. package/lib/commands/db/analysis-batching.js +1 -1
  107. package/lib/commands/db/analyze-batch-plan.js +1 -1
  108. package/lib/commands/db/analyze-cancel.js +1 -1
  109. package/lib/commands/db/analyze-start.js +1 -1
  110. package/lib/commands/db/analyze-status.js +1 -1
  111. package/lib/commands/db/create.js +1 -1
  112. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  113. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  114. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  115. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  116. package/lib/commands/db/delete.js +1 -1
  117. package/lib/commands/db/detail.js +1 -1
  118. package/lib/commands/db/diff-refresh-start.js +1 -1
  119. package/lib/commands/db/diff-refresh-status.js +1 -1
  120. package/lib/commands/db/diff.js +1 -1
  121. package/lib/commands/db/index.js +1 -1
  122. package/lib/commands/db/list.js +1 -1
  123. package/lib/commands/db/shared.js +1 -1
  124. package/lib/commands/db/table-diff-shared.js +1 -1
  125. package/lib/commands/db/tables.js +1 -1
  126. package/lib/commands/db/test.js +1 -1
  127. package/lib/commands/db/update.js +1 -1
  128. package/lib/commands/deployment/index.js +1 -1
  129. package/lib/commands/deployment/sync-all.js +1 -1
  130. package/lib/commands/deployment/sync-jobs.js +1 -1
  131. package/lib/commands/deployment/sync-status.js +1 -1
  132. package/lib/commands/doctor.js +1 -1
  133. package/lib/commands/file/index.js +1 -1
  134. package/lib/commands/flow/create.js +1 -1
  135. package/lib/commands/flow/detail.js +1 -1
  136. package/lib/commands/flow/index.js +1 -1
  137. package/lib/commands/flow/list.js +1 -1
  138. package/lib/commands/flow/page-list.d.ts +2 -0
  139. package/lib/commands/flow/page-list.js +1 -0
  140. package/lib/commands/flow/publish.js +1 -1
  141. package/lib/commands/flow/runtime-resources-shared.d.ts +1 -1
  142. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  143. package/lib/commands/flow/runtime-role-list.js +1 -1
  144. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  145. package/lib/commands/flow/runtime-user-search.js +1 -1
  146. package/lib/commands/flow/shared.d.ts +6 -2
  147. package/lib/commands/flow/shared.js +1 -1
  148. package/lib/commands/flow/update.js +1 -1
  149. package/lib/commands/flow/validate.js +1 -1
  150. package/lib/commands/instant-api-policy/current.js +1 -1
  151. package/lib/commands/instant-api-policy/index.js +1 -1
  152. package/lib/commands/instant-api-policy/init.js +1 -1
  153. package/lib/commands/instant-api-policy/publish.js +1 -1
  154. package/lib/commands/instant-api-policy/pull.js +1 -1
  155. package/lib/commands/instant-api-policy/revision.js +1 -1
  156. package/lib/commands/instant-api-policy/revisions.js +1 -1
  157. package/lib/commands/instant-api-policy/rollback.js +1 -1
  158. package/lib/commands/instant-api-policy/shared.js +1 -1
  159. package/lib/commands/instant-api-policy/validate.js +1 -1
  160. package/lib/commands/issue/index.js +1 -1
  161. package/lib/commands/issue/nudge.js +1 -1
  162. package/lib/commands/issue/report.js +1 -1
  163. package/lib/commands/issue/shared.js +1 -1
  164. package/lib/commands/kb/create.js +1 -1
  165. package/lib/commands/kb/delete.js +1 -1
  166. package/lib/commands/kb/detail.js +1 -1
  167. package/lib/commands/kb/index.js +1 -1
  168. package/lib/commands/kb/list.js +1 -1
  169. package/lib/commands/kb/search.js +1 -1
  170. package/lib/commands/kb/shared.js +1 -1
  171. package/lib/commands/kb/update.js +1 -1
  172. package/lib/commands/logs/index.js +1 -1
  173. package/lib/commands/menu/asset-update.js +1 -1
  174. package/lib/commands/menu/delete.js +1 -1
  175. package/lib/commands/menu/external-link-create.js +1 -1
  176. package/lib/commands/menu/external-link-update.js +1 -1
  177. package/lib/commands/menu/group-create.js +1 -1
  178. package/lib/commands/menu/group-update.js +1 -1
  179. package/lib/commands/menu/index.js +1 -1
  180. package/lib/commands/menu/list.js +1 -1
  181. package/lib/commands/menu/move.js +1 -1
  182. package/lib/commands/menu/regroup-start.js +1 -1
  183. package/lib/commands/menu/rename.js +1 -1
  184. package/lib/commands/menu/shared/compare-table.js +1 -1
  185. package/lib/commands/menu/shared/delete-plan.js +1 -1
  186. package/lib/commands/menu/shared/facts.js +1 -1
  187. package/lib/commands/menu/shared/index.js +1 -1
  188. package/lib/commands/menu/shared/inquirer.js +1 -1
  189. package/lib/commands/menu/shared/local-pages.js +1 -1
  190. package/lib/commands/menu/shared/logic.js +1 -1
  191. package/lib/commands/menu/shared/mutations.js +1 -1
  192. package/lib/commands/menu/shared/path.js +1 -1
  193. package/lib/commands/menu/shared/service.js +1 -1
  194. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  195. package/lib/commands/menu/shared/sync-core.js +1 -1
  196. package/lib/commands/menu/shared/update-core.js +1 -1
  197. package/lib/commands/menu/shared/valid-url.js +1 -1
  198. package/lib/commands/menu/subapp-assets-status.js +1 -1
  199. package/lib/commands/menu/subapp-assets-update.js +1 -1
  200. package/lib/commands/menu/sync.js +1 -1
  201. package/lib/commands/menu/visibility-update.js +1 -1
  202. package/lib/commands/notification/config-create.js +1 -1
  203. package/lib/commands/notification/config-delete.js +1 -1
  204. package/lib/commands/notification/config-list.js +1 -1
  205. package/lib/commands/notification/config-update.js +1 -1
  206. package/lib/commands/notification/index.js +1 -1
  207. package/lib/commands/notification/shared.js +1 -1
  208. package/lib/commands/ocr/index.js +1 -1
  209. package/lib/commands/page/create.js +1 -1
  210. package/lib/commands/page/custom/detail.js +1 -1
  211. package/lib/commands/page/custom/list.js +1 -1
  212. package/lib/commands/page/custom/publish.js +1 -1
  213. package/lib/commands/page/custom/shared.js +1 -1
  214. package/lib/commands/page/custom/syntax.js +1 -1
  215. package/lib/commands/page/custom/update.js +1 -1
  216. package/lib/commands/page/data-list-status.js +1 -1
  217. package/lib/commands/page/generate-start.js +1 -1
  218. package/lib/commands/page/generate-status.js +1 -1
  219. package/lib/commands/page/index.js +1 -1
  220. package/lib/commands/page/pull.js +1 -1
  221. package/lib/commands/page/push.js +1 -1
  222. package/lib/commands/page/relation-audit.js +1 -1
  223. package/lib/commands/page/restore.js +1 -1
  224. package/lib/commands/page/shared.js +1 -1
  225. package/lib/commands/page/sync.js +1 -1
  226. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  227. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  228. package/lib/commands/project/create/format-elapsed.js +1 -1
  229. package/lib/commands/project/create/main.js +1 -1
  230. package/lib/commands/project/create/materialize-project-template.js +1 -1
  231. package/lib/commands/project/create/project-name.js +1 -1
  232. package/lib/commands/project/create/project-template-archive.js +1 -1
  233. package/lib/commands/project/create/project-template-path.js +1 -1
  234. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  235. package/lib/commands/project/create/use-format-code.js +1 -1
  236. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  237. package/lib/commands/project/domain-routing-sync.js +1 -1
  238. package/lib/commands/project/index.js +1 -1
  239. package/lib/commands/project/upgrade.js +1 -1
  240. package/lib/commands/registry.js +1 -1
  241. package/lib/commands/role/delete.js +1 -1
  242. package/lib/commands/role/detail.js +1 -1
  243. package/lib/commands/role/index.js +1 -1
  244. package/lib/commands/role/list.js +1 -1
  245. package/lib/commands/role/shared.js +1 -1
  246. package/lib/commands/role/update.js +1 -1
  247. package/lib/commands/role/user-add.js +1 -1
  248. package/lib/commands/role/user-remove.js +1 -1
  249. package/lib/commands/role/user-resolve.js +1 -1
  250. package/lib/commands/rule/get.js +1 -1
  251. package/lib/commands/rule/index.js +1 -1
  252. package/lib/commands/rule/list.js +1 -1
  253. package/lib/commands/rule/set.js +1 -1
  254. package/lib/commands/rule/shared.js +1 -1
  255. package/lib/commands/run/index.js +1 -1
  256. package/lib/commands/schema.js +1 -1
  257. package/lib/commands/sql/create.js +1 -1
  258. package/lib/commands/sql/delete.js +1 -1
  259. package/lib/commands/sql/detail.js +1 -1
  260. package/lib/commands/sql/exec.js +1 -1
  261. package/lib/commands/sql/index.js +1 -1
  262. package/lib/commands/sql/list.js +1 -1
  263. package/lib/commands/sql/pull.js +1 -1
  264. package/lib/commands/sql/push.js +1 -1
  265. package/lib/commands/sql/shared.js +1 -1
  266. package/lib/commands/sql/status.js +1 -1
  267. package/lib/commands/sql/validate.js +1 -1
  268. package/lib/commands/task/index.js +1 -1
  269. package/lib/commands/task/status.js +1 -1
  270. package/lib/commands/tenant/index.js +1 -1
  271. package/lib/commands/tenant/members-list.js +1 -1
  272. package/lib/commands/tenant/shared.js +1 -1
  273. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  274. package/lib/commands/user-account/feishu-bind.js +1 -1
  275. package/lib/commands/user-account/index.js +1 -1
  276. package/lib/commands/workspace/add.js +1 -1
  277. package/lib/commands/workspace/index.js +1 -1
  278. package/lib/commands/workspace/remove.js +1 -1
  279. package/lib/config/domain-config.js +1 -1
  280. package/lib/config/project-domain-routing.js +1 -1
  281. package/lib/config/region-config.js +1 -1
  282. package/lib/config/schema.js +1 -1
  283. package/lib/constant/cdn.js +1 -1
  284. package/lib/constant/cli.js +1 -1
  285. package/lib/constant/defaults.js +1 -1
  286. package/lib/constant/domain.js +1 -1
  287. package/lib/constant/env.js +1 -1
  288. package/lib/constant/output.js +1 -1
  289. package/lib/constant/paths.js +1 -1
  290. package/lib/constant/region.js +1 -1
  291. package/lib/constant/risk.js +1 -1
  292. package/lib/constant/routing-profile.js +1 -1
  293. package/lib/context/app-resolver.js +1 -1
  294. package/lib/context/auth-resolver.js +1 -1
  295. package/lib/context/config-loader.js +1 -1
  296. package/lib/context.js +1 -1
  297. package/lib/core/alias-resolver.js +1 -1
  298. package/lib/core/api-client.d.ts +37 -6
  299. package/lib/core/api-client.js +1 -1
  300. package/lib/core/bff/config.js +1 -1
  301. package/lib/core/bff/file-system.js +1 -1
  302. package/lib/core/bff/hash.js +1 -1
  303. package/lib/core/bff/hook-directory.js +1 -1
  304. package/lib/core/bff/lock.js +1 -1
  305. package/lib/core/bff/utils.js +1 -1
  306. package/lib/core/cross-db-analysis.js +1 -1
  307. package/lib/core/cross-db-relation.js +1 -1
  308. package/lib/core/db-resolver.js +1 -1
  309. package/lib/core/flow-config.d.ts +12 -0
  310. package/lib/core/flow-config.js +1 -1
  311. package/lib/core/instant-api-policy/config.js +1 -1
  312. package/lib/core/kb-search-client.js +1 -1
  313. package/lib/core/page/file-system.js +1 -1
  314. package/lib/core/page/hash.js +1 -1
  315. package/lib/core/page/lock.js +1 -1
  316. package/lib/core/page/lr-smart-jsx.js +1 -1
  317. package/lib/core/sql-index-auditor.js +1 -1
  318. package/lib/core/sql-sync/config.js +1 -1
  319. package/lib/core/sql-sync/file-system.js +1 -1
  320. package/lib/core/sql-sync/hash.js +1 -1
  321. package/lib/core/sql-sync/lock.js +1 -1
  322. package/lib/core/sql-sync/utils.js +1 -1
  323. package/lib/core/sql-validator.js +1 -1
  324. package/lib/errors.js +1 -1
  325. package/lib/framework/build-all-flags.js +1 -1
  326. package/lib/framework/error-output.js +1 -1
  327. package/lib/framework/explicit-yes.js +1 -1
  328. package/lib/framework/flags.js +1 -1
  329. package/lib/framework/help.js +1 -1
  330. package/lib/framework/index.js +1 -1
  331. package/lib/framework/output.js +1 -1
  332. package/lib/framework/response.js +1 -1
  333. package/lib/framework/runner-alias.js +1 -1
  334. package/lib/framework/runner.js +1 -1
  335. package/lib/framework/schema-export.js +1 -1
  336. package/lib/framework/supported-flags.js +1 -1
  337. package/lib/framework/types.js +1 -1
  338. package/lib/generated/build-info.d.ts +4 -4
  339. package/lib/generated/build-info.js +1 -1
  340. package/lib/generated/official-routing.js +1 -1
  341. package/lib/generated/routing-contract.js +1 -1
  342. package/lib/help.js +1 -1
  343. package/lib/postinstall.js +1 -1
  344. package/lib/runtime/confirmation.js +1 -1
  345. package/lib/runtime/event.js +1 -1
  346. package/lib/runtime/index.js +1 -1
  347. package/lib/runtime/queue.js +1 -1
  348. package/lib/runtime/resolve.js +1 -1
  349. package/lib/services/dataset-design/checkpoint.d.ts +17 -0
  350. package/lib/services/dataset-design/checkpoint.js +1 -0
  351. package/lib/services/dataset-design/commands.d.ts +6 -0
  352. package/lib/services/dataset-design/commands.js +1 -0
  353. package/lib/services/dataset-design/contract.d.ts +7 -0
  354. package/lib/services/dataset-design/contract.js +1 -0
  355. package/lib/skills/builtin-skill.js +1 -1
  356. package/lib/skills/main.js +1 -1
  357. package/lib/skills/npx-skills-add.js +1 -1
  358. package/lib/skills/skill-presence.js +1 -1
  359. package/lib/telemetry/cli-command-trace.js +1 -1
  360. package/lib/telemetry/cli-help-trace.js +1 -1
  361. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  362. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  363. package/lib/telemetry/send-cli-trace-log.js +1 -1
  364. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  365. package/lib/utils/ai_config.js +1 -1
  366. package/lib/utils/apply-jq-filter.js +1 -1
  367. package/lib/utils/cdn-config.js +1 -1
  368. package/lib/utils/check-sdk-version.js +1 -1
  369. package/lib/utils/cli-version-check.js +1 -1
  370. package/lib/utils/cli-version-policy.js +1 -1
  371. package/lib/utils/config.js +1 -1
  372. package/lib/utils/entity-with-id.js +1 -1
  373. package/lib/utils/file-utils.js +1 -1
  374. package/lib/utils/guides-cdn.js +1 -1
  375. package/lib/utils/http-client.js +1 -1
  376. package/lib/utils/is-non-interactive.js +1 -1
  377. package/lib/utils/logger.js +1 -1
  378. package/lib/utils/params.js +1 -1
  379. package/lib/utils/platform.js +1 -1
  380. package/lib/utils/sleep.js +1 -1
  381. package/lib/utils/template-replacer.js +1 -1
  382. package/lib/utils/update-notice.js +1 -1
  383. package/lib/utils/version.js +1 -1
  384. package/lib/utils/with-active-cookie.js +1 -1
  385. package/lib/utils/write-cli-side-channel.js +1 -1
  386. package/package.json +3 -2
  387. package/skills/rabetbase/SKILL.md +11 -7
  388. package/skills/rabetbase/guides/approval-flow-development-workflow.md +52 -13
  389. package/skills/rabetbase/guides/backend-function.md +26 -4
  390. package/skills/rabetbase/guides/bff-creation-workflow.md +9 -0
  391. package/skills/rabetbase/guides/cross-database-bff.md +1 -0
  392. package/skills/rabetbase/guides/custom-page-flow-sdk.md +2 -0
  393. package/skills/rabetbase/guides/data-api-guidelines.md +2 -0
  394. package/skills/rabetbase/guides/flow-config-examples.md +75 -0
  395. package/skills/rabetbase/guides/form-flow-start.md +61 -0
  396. package/skills/rabetbase/guides/typescript-sdk.md +1 -1
  397. package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +18 -4
  398. package/skills/rabetbase/references/rabetbase-codegen-sdk.md +5 -4
  399. package/skills/rabetbase/references/rabetbase-dataset-design.md +25 -0
  400. package/skills/rabetbase/references/rabetbase-dataset-generate.md +2 -255
  401. package/skills/rabetbase/references/rabetbase-flow-commands.md +21 -2
  402. package/skills/rabetbase/references/rabetbase-flow-resources.md +21 -3
  403. package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +6 -2
  404. package/skills/rabetbase/references/rabetbase-kb.md +4 -1
  405. package/skills/rabetbase-dataset-generation/SKILL.md +45 -0
  406. package/skills/rabetbase-dataset-generation/references/workflow.md +60 -0
  407. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  408. package/skills/rabetbase.manifest.json +6 -3
@@ -1 +1 @@
1
- const a140_0x3a8980=a140_0x2e8d;(function(_0x2226f7,_0x13e156){const _0x2c9823=a140_0x2e8d,_0x422006=_0x2226f7();while(!![]){try{const _0x502bf1=-parseInt(_0x2c9823(0x1ed))/0x1*(-parseInt(_0x2c9823(0x1c8))/0x2)+-parseInt(_0x2c9823(0x1cb))/0x3*(-parseInt(_0x2c9823(0x1f3))/0x4)+parseInt(_0x2c9823(0x1f1))/0x5+parseInt(_0x2c9823(0x1d6))/0x6+-parseInt(_0x2c9823(0x1c7))/0x7+parseInt(_0x2c9823(0x1f0))/0x8*(parseInt(_0x2c9823(0x1ca))/0x9)+-parseInt(_0x2c9823(0x1f4))/0xa;if(_0x502bf1===_0x13e156)break;else _0x422006['push'](_0x422006['shift']());}catch(_0x374bbb){_0x422006['push'](_0x422006['shift']());}}}(a140_0x55b7,0xa0286));import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,readInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';export const INSTANT_API_POLICY_BASE_PATH=a140_0x3a8980(0x1f5);export const RUNTIME_CACHE_WARNING=a140_0x3a8980(0x1e4);export const NON_ATOMIC_EXPECTED_REVISION_WARNING=a140_0x3a8980(0x1d5);function a140_0x2e8d(_0x112c93,_0x4ac10e){_0x112c93=_0x112c93-0x1c7;const _0x55b71d=a140_0x55b7();let _0x2e8db2=_0x55b71d[_0x112c93];return _0x2e8db2;}export const FORCE_FLAG={'name':a140_0x3a8980(0x1d1),'type':a140_0x3a8980(0x1ee),'default':![],'description':a140_0x3a8980(0x1d8)};export const CHANGE_SUMMARY_FLAG={'name':a140_0x3a8980(0x1ec),'type':a140_0x3a8980(0x1e1),'required':![],'description':a140_0x3a8980(0x1df)};export const REVISION_FLAG={'name':a140_0x3a8980(0x1ea),'type':a140_0x3a8980(0x1dc),'required':!![],'description':a140_0x3a8980(0x1e5)};export const EXPECTED_REVISION_FLAG={'name':a140_0x3a8980(0x1e3),'type':a140_0x3a8980(0x1dc),'required':![],'description':'Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured'};export function requireForceConfirmation(_0x356513){const _0x519955=a140_0x3a8980;if(!_0x356513[_0x519955(0x1f6)](_0x519955(0x1d1))||_0x356513[_0x519955(0x1f6)]('yes'))return;throw instantApiPolicyError(_0x519955(0x1fd),_0x519955(0x1d7),_0x519955(0x1cf));}export function readChangeSummary(_0x44138b){const _0x562f02=a140_0x3a8980,_0x4a5acd=_0x44138b['str'](_0x562f02(0x1ec))[_0x562f02(0x1f8)]();if(!_0x4a5acd)return undefined;if(_0x4a5acd[_0x562f02(0x1fc)]>0x7d0)throw instantApiPolicyError(_0x562f02(0x1e0),_0x562f02(0x1e2));return _0x4a5acd;}export function readRevision(_0x3e7ae1){const _0x2c4ed0=a140_0x3a8980,_0x44a87e=_0x3e7ae1[_0x2c4ed0(0x1ce)]('revision',Number[_0x2c4ed0(0x1d3)]);if(!Number[_0x2c4ed0(0x1de)](_0x44a87e)||_0x44a87e<=0x0)throw instantApiPolicyError(_0x2c4ed0(0x1d2),_0x2c4ed0(0x1d9));return _0x44a87e;}export function readExpectedRevision(_0x160ca1){const _0x287eb9=a140_0x3a8980;if(_0x160ca1[_0x287eb9(0x1d4)](_0x287eb9(0x1e3))===undefined)return undefined;const _0x47928f=_0x160ca1[_0x287eb9(0x1ce)](_0x287eb9(0x1e3),Number[_0x287eb9(0x1d3)]);if(!Number[_0x287eb9(0x1de)](_0x47928f)||_0x47928f<0x0)throw instantApiPolicyError('instant_api_policy_expected_revision_invalid',_0x287eb9(0x1e6));return _0x47928f;}function a140_0x55b7(){const _0x21d253=['policyId','configHash','revision','operatorId','change-summary','22PYcrrM','boolean','instantApi','88EfPGmF','5987535xUleec','enabled','16YdUVet','28586790vjNCBF','/smartapi/instant-api-policy','bool','gmtModified','trim','The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.','instant_api_policy_revision_mismatch','rabetbase\x20instant-api-policy\x20current\x20--format\x20compress','length','instant_api_policy_force_confirmation_required','3341240zrXFIu','102068bLpuLy','config','54099PhnFnZ','398649wiUAnQ','rules','.\x20Run\x20current\x20and\x20review\x20before\x20retrying.','num','Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.','Expected\x20revision\x20','force','instant_api_policy_revision_invalid','NaN','flag','--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.','6444582atdRYE','--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.','Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes','--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.','createUserId','updateUserId','number','appCode','isSafeInteger','Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)','instant_api_policy_change_summary_invalid','string','--change-summary\x20cannot\x20exceed\x202000\x20characters.','expected-revision','Runtime\x20instances\x20may\x20take\x20up\x20to\x2030\x20seconds\x20to\x20observe\x20the\x20new\x20active\x20policy.','Positive\x20published\x20policy\x20revision','--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','gmtCreate'];a140_0x55b7=function(){return _0x21d253;};return a140_0x55b7();}export function assertExpectedRevision(_0x1bb201,_0x5eb1c4){const _0x56c6a1=a140_0x3a8980;if(_0x5eb1c4===undefined)return;const _0x19ceb8=_0x1bb201?.[_0x56c6a1(0x1ea)]??0x0;if(_0x19ceb8!==_0x5eb1c4)throw instantApiPolicyError(_0x56c6a1(0x1fa),_0x56c6a1(0x1f9),_0x56c6a1(0x1d0)+_0x5eb1c4+';\x20current\x20revision\x20is\x20'+_0x19ceb8+_0x56c6a1(0x1cd));}export async function readFixedPolicy(_0x2c45e6){const _0x4de64f=a140_0x3a8980,_0x2939ae=loadInstantApiPolicyLocalConfig(_0x2c45e6[_0x4de64f(0x1dd)]),_0x224c84=await readInstantApiPolicyConfigFile(_0x2939ae);return{'local':_0x2939ae,'config':_0x224c84};}export function projectCurrentPolicy(_0x333d94){const _0x3eee63=a140_0x3a8980;if(!_0x333d94)return null;return{'id':_0x333d94['id'],'appCode':_0x333d94['appCode'],'revision':_0x333d94[_0x3eee63(0x1ea)],'configHash':_0x333d94['configHash'],'enabled':_0x333d94[_0x3eee63(0x1f2)],'config':_0x333d94['config'],'createUserId':_0x333d94[_0x3eee63(0x1da)]??null,'updateUserId':_0x333d94[_0x3eee63(0x1db)]??null,'gmtCreate':_0x333d94[_0x3eee63(0x1e7)]??null,'gmtModified':_0x333d94[_0x3eee63(0x1f7)]??null};}export function projectRevisionSummary(_0x286ece){const _0x311d40=a140_0x3a8980;return{'id':_0x286ece['id'],'policyId':_0x286ece[_0x311d40(0x1e8)],'appCode':_0x286ece['appCode'],'revision':_0x286ece[_0x311d40(0x1ea)],'configHash':_0x286ece[_0x311d40(0x1e9)],'changeType':_0x286ece['changeType'],'changeSummary':_0x286ece['changeSummary']??null,'operatorId':_0x286ece[_0x311d40(0x1eb)]??null,'gmtCreate':_0x286ece[_0x311d40(0x1e7)]??null,'version':_0x286ece[_0x311d40(0x1c9)]['version'],'defaultAction':_0x286ece['config']['defaults'][_0x311d40(0x1ef)],'ruleCount':_0x286ece[_0x311d40(0x1c9)][_0x311d40(0x1cc)]?.[_0x311d40(0x1fc)]??0x0};}export function projectRevisionDetail(_0x2106fe){const _0x7500bc=a140_0x3a8980;return{...projectRevisionSummary(_0x2106fe),'config':_0x2106fe[_0x7500bc(0x1c9)]};}export function expectedRevisionWarnings(_0x1487b5){return _0x1487b5===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){const _0x3df907=a140_0x3a8980;return _0x3df907(0x1fb);}
1
+ function a147_0x1df5(){const _0x5b0dc6=['change-summary','trim','instant_api_policy_force_confirmation_required',';\x20current\x20revision\x20is\x20','Replace\x20an\x20existing\x20fixed\x20policy\x20file;\x20requires\x20--yes','--revision\x20must\x20be\x20a\x20positive\x20safe\x20integer.','boolean','instantApi','instant_api_policy_revision_invalid','--expected-revision\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20mutation\x20contract\x20has\x20no\x20revision\x20predicate.','8446496MjqRQT','number','revision','changeType','Review\x20the\x20existing\x20file,\x20then\x20rerun\x20with\x20--force\x20--yes.','Positive\x20published\x20policy\x20revision','8156iYuKet','defaults','rabetbase\x20instant-api-policy\x20current\x20--format\x20compress','config','length','version','num','16105113FNCQXO','NaN','677861AcHPbp','createUserId','rules','str','instant_api_policy_expected_revision_invalid','12hxlvjP','policyId','Expected\x20revision\x20','instant_api_policy_revision_mismatch','1563flqksg','appCode','configHash','gmtCreate','--expected-revision\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','string','Runtime\x20instances\x20may\x20take\x20up\x20to\x2030\x20seconds\x20to\x20observe\x20the\x20new\x20active\x20policy.','bool','The\x20current\x20Instant\x20API\x20policy\x20revision\x20changed\x20before\x20mutation.','56068GfdGmh','updateUserId','/smartapi/instant-api-policy','flag','--force\x20requires\x20--yes\x20because\x20it\x20replaces\x20the\x20fixed\x20local\x20policy\x20file.','18755rdPIjN','isSafeInteger','expected-revision','--change-summary\x20cannot\x20exceed\x202000\x20characters.','operatorId','1598037jFfPRh','yes'];a147_0x1df5=function(){return _0x5b0dc6;};return a147_0x1df5();}const a147_0xee422f=a147_0x2949;function a147_0x2949(_0x34134a,_0x4f1c39){_0x34134a=_0x34134a-0x1ca;const _0x1df5f3=a147_0x1df5();let _0x2949cb=_0x1df5f3[_0x34134a];return _0x2949cb;}(function(_0x2695ae,_0x174d90){const _0x5b290f=a147_0x2949,_0x57bd8f=_0x2695ae();while(!![]){try{const _0x52ae5b=parseInt(_0x5b290f(0x1ff))/0x1+-parseInt(_0x5b290f(0x1da))/0x2+parseInt(_0x5b290f(0x1d1))/0x3*(-parseInt(_0x5b290f(0x1f6))/0x4)+-parseInt(_0x5b290f(0x1df))/0x5*(parseInt(_0x5b290f(0x1cd))/0x6)+parseInt(_0x5b290f(0x1e4))/0x7+-parseInt(_0x5b290f(0x1f0))/0x8+parseInt(_0x5b290f(0x1fd))/0x9;if(_0x52ae5b===_0x174d90)break;else _0x57bd8f['push'](_0x57bd8f['shift']());}catch(_0x4beb87){_0x57bd8f['push'](_0x57bd8f['shift']());}}}(a147_0x1df5,0x844f6));import{instantApiPolicyError,loadInstantApiPolicyLocalConfig,readInstantApiPolicyConfigFile}from'../../core/instant-api-policy/config.js';export const INSTANT_API_POLICY_BASE_PATH=a147_0xee422f(0x1dc);export const RUNTIME_CACHE_WARNING=a147_0xee422f(0x1d7);export const NON_ATOMIC_EXPECTED_REVISION_WARNING=a147_0xee422f(0x1ef);export const FORCE_FLAG={'name':'force','type':a147_0xee422f(0x1ec),'default':![],'description':a147_0xee422f(0x1ea)};export const CHANGE_SUMMARY_FLAG={'name':a147_0xee422f(0x1e6),'type':a147_0xee422f(0x1d6),'required':![],'description':'Audit\x20summary\x20for\x20this\x20policy\x20revision\x20(maximum\x202000\x20characters)'};export const REVISION_FLAG={'name':'revision','type':'number','required':!![],'description':a147_0xee422f(0x1f5)};export const EXPECTED_REVISION_FLAG={'name':a147_0xee422f(0x1e1),'type':a147_0xee422f(0x1f1),'required':![],'description':'Non-atomic\x20assertion\x20for\x20the\x20current\x20revision;\x20use\x200\x20when\x20unconfigured'};export function requireForceConfirmation(_0x445a42){const _0x1d8149=a147_0xee422f;if(!_0x445a42[_0x1d8149(0x1d8)]('force')||_0x445a42[_0x1d8149(0x1d8)](_0x1d8149(0x1e5)))return;throw instantApiPolicyError(_0x1d8149(0x1e8),_0x1d8149(0x1de),_0x1d8149(0x1f4));}export function readChangeSummary(_0xbb9032){const _0x4a91a7=a147_0xee422f,_0x2eef42=_0xbb9032[_0x4a91a7(0x1cb)](_0x4a91a7(0x1e6))[_0x4a91a7(0x1e7)]();if(!_0x2eef42)return undefined;if(_0x2eef42['length']>0x7d0)throw instantApiPolicyError('instant_api_policy_change_summary_invalid',_0x4a91a7(0x1e2));return _0x2eef42;}export function readRevision(_0x14691a){const _0x1ac9b5=a147_0xee422f,_0x56924e=_0x14691a[_0x1ac9b5(0x1fc)](_0x1ac9b5(0x1f2),Number[_0x1ac9b5(0x1fe)]);if(!Number[_0x1ac9b5(0x1e0)](_0x56924e)||_0x56924e<=0x0)throw instantApiPolicyError(_0x1ac9b5(0x1ee),_0x1ac9b5(0x1eb));return _0x56924e;}export function readExpectedRevision(_0x4fab4b){const _0x3cf432=a147_0xee422f;if(_0x4fab4b[_0x3cf432(0x1dd)](_0x3cf432(0x1e1))===undefined)return undefined;const _0x18e200=_0x4fab4b['num']('expected-revision',Number[_0x3cf432(0x1fe)]);if(!Number['isSafeInteger'](_0x18e200)||_0x18e200<0x0)throw instantApiPolicyError(_0x3cf432(0x1cc),_0x3cf432(0x1d5));return _0x18e200;}export function assertExpectedRevision(_0x431b1e,_0x469e36){const _0x5c9d22=a147_0xee422f;if(_0x469e36===undefined)return;const _0xdc7899=_0x431b1e?.[_0x5c9d22(0x1f2)]??0x0;if(_0xdc7899!==_0x469e36)throw instantApiPolicyError(_0x5c9d22(0x1d0),_0x5c9d22(0x1d9),_0x5c9d22(0x1cf)+_0x469e36+_0x5c9d22(0x1e9)+_0xdc7899+'.\x20Run\x20current\x20and\x20review\x20before\x20retrying.');}export async function readFixedPolicy(_0x49af0a){const _0x2d99b8=a147_0xee422f,_0x4bf3c0=loadInstantApiPolicyLocalConfig(_0x49af0a[_0x2d99b8(0x1d2)]),_0x1e8793=await readInstantApiPolicyConfigFile(_0x4bf3c0);return{'local':_0x4bf3c0,'config':_0x1e8793};}export function projectCurrentPolicy(_0x2d12b1){const _0x24c220=a147_0xee422f;if(!_0x2d12b1)return null;return{'id':_0x2d12b1['id'],'appCode':_0x2d12b1[_0x24c220(0x1d2)],'revision':_0x2d12b1['revision'],'configHash':_0x2d12b1[_0x24c220(0x1d3)],'enabled':_0x2d12b1['enabled'],'config':_0x2d12b1[_0x24c220(0x1f9)],'createUserId':_0x2d12b1[_0x24c220(0x200)]??null,'updateUserId':_0x2d12b1[_0x24c220(0x1db)]??null,'gmtCreate':_0x2d12b1[_0x24c220(0x1d4)]??null,'gmtModified':_0x2d12b1['gmtModified']??null};}export function projectRevisionSummary(_0x6e982a){const _0xd991d4=a147_0xee422f;return{'id':_0x6e982a['id'],'policyId':_0x6e982a[_0xd991d4(0x1ce)],'appCode':_0x6e982a['appCode'],'revision':_0x6e982a['revision'],'configHash':_0x6e982a[_0xd991d4(0x1d3)],'changeType':_0x6e982a[_0xd991d4(0x1f3)],'changeSummary':_0x6e982a['changeSummary']??null,'operatorId':_0x6e982a[_0xd991d4(0x1e3)]??null,'gmtCreate':_0x6e982a[_0xd991d4(0x1d4)]??null,'version':_0x6e982a[_0xd991d4(0x1f9)][_0xd991d4(0x1fb)],'defaultAction':_0x6e982a[_0xd991d4(0x1f9)][_0xd991d4(0x1f7)][_0xd991d4(0x1ed)],'ruleCount':_0x6e982a['config'][_0xd991d4(0x1ca)]?.[_0xd991d4(0x1fa)]??0x0};}export function projectRevisionDetail(_0xd73326){const _0x128537=a147_0xee422f;return{...projectRevisionSummary(_0xd73326),'config':_0xd73326[_0x128537(0x1f9)]};}export function expectedRevisionWarnings(_0x5b4c05){return _0x5b4c05===undefined?[]:[NON_ATOMIC_EXPECTED_REVISION_WARNING];}export function mutationLookupCommand(){const _0x16e7cf=a147_0xee422f;return _0x16e7cf(0x1f8);}
@@ -1 +1 @@
1
- const a141_0x5ab04a=a141_0x382c;(function(_0x1f96c9,_0x177aeb){const _0x51b93a=a141_0x382c,_0x44dd58=_0x1f96c9();while(!![]){try{const _0x262140=parseInt(_0x51b93a(0x7c))/0x1+-parseInt(_0x51b93a(0x85))/0x2*(parseInt(_0x51b93a(0x76))/0x3)+-parseInt(_0x51b93a(0x7e))/0x4+parseInt(_0x51b93a(0x77))/0x5+-parseInt(_0x51b93a(0x75))/0x6+-parseInt(_0x51b93a(0x80))/0x7+parseInt(_0x51b93a(0x86))/0x8;if(_0x262140===_0x177aeb)break;else _0x44dd58['push'](_0x44dd58['shift']());}catch(_0x160689){_0x44dd58['push'](_0x44dd58['shift']());}}}(a141_0x3820,0x40e69));function a141_0x382c(_0x3f8703,_0x292b0f){_0x3f8703=_0x3f8703-0x75;const _0x3820a2=a141_0x3820();let _0x382c21=_0x3820a2[_0x3f8703];return _0x382c21;}function a141_0x3820(){const _0x348acf=['valid','50576mxpGXW','policyFilePath','1460560ZMWuwv','POST','1270745eAkimy','normalizedConfig','appCode','policyRelativePath','configHash','2OMCVPm','6652376zLKbTi','252756CfLnLL','992688IOCNBr','1517035EuKLqa','instant-api-policy','validate','Validated\x20Instant\x20API\x20policy\x20for\x20'];a141_0x3820=function(){return _0x348acf;};return a141_0x3820();}import{validateInstantApiPolicy}from'../../core/api-client.js';import{INSTANT_API_POLICY_BASE_PATH,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';export const instantApiPolicyValidate={'service':a141_0x5ab04a(0x78),'command':a141_0x5ab04a(0x79),'description':'Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x44c2f1){const _0x324142=a141_0x5ab04a,{local:_0x72ee2,config:_0x11becc}=await readFixedPolicy(_0x44c2f1),_0x3f737e=await validateInstantApiPolicy({'appCode':_0x44c2f1[_0x324142(0x82)],'config':_0x11becc});return{'ok':!![],'data':{'operation':_0x324142(0x79),'selector':{'appCode':_0x44c2f1[_0x324142(0x82)]},'filePath':_0x72ee2[_0x324142(0x7d)],'relativePath':_0x72ee2[_0x324142(0x83)],'valid':_0x3f737e[_0x324142(0x7b)],'configHash':_0x3f737e[_0x324142(0x84)],'normalizedConfig':_0x3f737e[_0x324142(0x81)],'backend':{'method':_0x324142(0x7f),'path':INSTANT_API_POLICY_BASE_PATH+'/validate'}},'message':_0x324142(0x7a)+_0x44c2f1[_0x324142(0x82)]};}};
1
+ function a148_0x161f(){const _0x5931e6=['valid','221343YAHxhr','72ItNppM','policyRelativePath','validate','2EIlPjk','44ZYmMGJ','738521BHIwCH','appCode','496AUwErK','795hRLWdb','policyFilePath','Validate\x20the\x20fixed\x20local\x20policy\x20without\x20publishing','7513430RRotfa','44442DyfmDN','configHash','normalizedConfig','2519508BFuFml','367957TxXdBf','12548JpSito','Validated\x20Instant\x20API\x20policy\x20for\x20','POST'];a148_0x161f=function(){return _0x5931e6;};return a148_0x161f();}const a148_0x282c1=a148_0x40f1;(function(_0x4e7a51,_0x3a1e2f){const _0x2bd973=a148_0x40f1,_0x10537d=_0x4e7a51();while(!![]){try{const _0x6b6439=parseInt(_0x2bd973(0x167))/0x1+parseInt(_0x2bd973(0x170))/0x2*(-parseInt(_0x2bd973(0x16c))/0x3)+parseInt(_0x2bd973(0x168))/0x4*(-parseInt(_0x2bd973(0x175))/0x5)+parseInt(_0x2bd973(0x16d))/0x6*(parseInt(_0x2bd973(0x172))/0x7)+parseInt(_0x2bd973(0x174))/0x8*(-parseInt(_0x2bd973(0x179))/0x9)+parseInt(_0x2bd973(0x178))/0xa+-parseInt(_0x2bd973(0x171))/0xb*(parseInt(_0x2bd973(0x166))/0xc);if(_0x6b6439===_0x3a1e2f)break;else _0x10537d['push'](_0x10537d['shift']());}catch(_0x4996eb){_0x10537d['push'](_0x10537d['shift']());}}}(a148_0x161f,0xa2c9c));import{validateInstantApiPolicy}from'../../core/api-client.js';import{INSTANT_API_POLICY_BASE_PATH,readFixedPolicy}from'../../commands/instant-api-policy/shared.js';function a148_0x40f1(_0x40be89,_0xa33669){_0x40be89=_0x40be89-0x165;const _0x161f4f=a148_0x161f();let _0x40f1ec=_0x161f4f[_0x40be89];return _0x40f1ec;}export const instantApiPolicyValidate={'service':'instant-api-policy','command':'validate','description':a148_0x282c1(0x177),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x42fdc6){const _0x529f91=a148_0x282c1,{local:_0xa129d1,config:_0x2d2538}=await readFixedPolicy(_0x42fdc6),_0x56add1=await validateInstantApiPolicy({'appCode':_0x42fdc6[_0x529f91(0x173)],'config':_0x2d2538});return{'ok':!![],'data':{'operation':_0x529f91(0x16f),'selector':{'appCode':_0x42fdc6['appCode']},'filePath':_0xa129d1[_0x529f91(0x176)],'relativePath':_0xa129d1[_0x529f91(0x16e)],'valid':_0x56add1[_0x529f91(0x16b)],'configHash':_0x56add1[_0x529f91(0x17a)],'normalizedConfig':_0x56add1[_0x529f91(0x165)],'backend':{'method':_0x529f91(0x16a),'path':INSTANT_API_POLICY_BASE_PATH+'/validate'}},'message':_0x529f91(0x169)+_0x42fdc6[_0x529f91(0x173)]};}};
@@ -1 +1 @@
1
- (function(_0x32cc10,_0x507903){const _0x171989=a142_0xcb42,_0x747946=_0x32cc10();while(!![]){try{const _0x58b16e=-parseInt(_0x171989(0xaa))/0x1+-parseInt(_0x171989(0xb0))/0x2*(-parseInt(_0x171989(0xab))/0x3)+-parseInt(_0x171989(0xaf))/0x4*(parseInt(_0x171989(0xa8))/0x5)+-parseInt(_0x171989(0xad))/0x6+-parseInt(_0x171989(0xae))/0x7+-parseInt(_0x171989(0xa7))/0x8+parseInt(_0x171989(0xa9))/0x9*(parseInt(_0x171989(0xac))/0xa);if(_0x58b16e===_0x507903)break;else _0x747946['push'](_0x747946['shift']());}catch(_0x46895e){_0x747946['push'](_0x747946['shift']());}}}(a142_0x12fa,0xe8df3));function a142_0xcb42(_0x534a2a,_0x51113c){_0x534a2a=_0x534a2a-0xa7;const _0x12fa9c=a142_0x12fa();let _0xcb4245=_0x12fa9c[_0x534a2a];return _0xcb4245;}function a142_0x12fa(){const _0x5ee979=['47206760jjnGys','1458684qEfSoY','12272848QGvrHd','8bVImYQ','214HaJBOa','12241160yUrBwu','580605UXwQhT','9fsfUwr','321471UeDSvv','8787ZaDlzs'];a142_0x12fa=function(){return _0x5ee979;};return a142_0x12fa();}import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];
1
+ (function(_0x57dee9,_0x3cb47d){const _0xdab69f=a149_0x59d1,_0x4ab47e=_0x57dee9();while(!![]){try{const _0x4a1df6=-parseInt(_0xdab69f(0xaa))/0x1*(parseInt(_0xdab69f(0xa3))/0x2)+-parseInt(_0xdab69f(0xa5))/0x3+-parseInt(_0xdab69f(0xa9))/0x4+parseInt(_0xdab69f(0xa6))/0x5+parseInt(_0xdab69f(0xab))/0x6*(-parseInt(_0xdab69f(0xa7))/0x7)+-parseInt(_0xdab69f(0xa4))/0x8+-parseInt(_0xdab69f(0xac))/0x9*(-parseInt(_0xdab69f(0xa8))/0xa);if(_0x4a1df6===_0x3cb47d)break;else _0x4ab47e['push'](_0x4ab47e['shift']());}catch(_0x1c6db7){_0x4ab47e['push'](_0x4ab47e['shift']());}}}(a149_0x3adf,0x525b5));function a149_0x3adf(){const _0x1f4e25=['20080oaOaUe','1644556trodzI','369428pdHYjs','186drWajs','11394uVlWCD','2MjtLpo','5391160Yqwulp','1938591QIonCC','1366135HuinUb','85211kJzqwi'];a149_0x3adf=function(){return _0x1f4e25;};return a149_0x3adf();}import{issueReport}from'../../commands/issue/report.js';function a149_0x59d1(_0x254d9e,_0x1c9ba7){_0x254d9e=_0x254d9e-0xa3;const _0x3adf61=a149_0x3adf();let _0x59d15c=_0x3adf61[_0x254d9e];return _0x59d15c;}export const issueDefinitions=[issueReport];
@@ -1 +1 @@
1
- const a143_0x485b65=a143_0xd8bd;(function(_0xde0798,_0x34f904){const _0x3a5962=a143_0xd8bd,_0x2d79fb=_0xde0798();while(!![]){try{const _0x47f2ec=-parseInt(_0x3a5962(0x8f))/0x1+-parseInt(_0x3a5962(0x7d))/0x2+parseInt(_0x3a5962(0x98))/0x3*(-parseInt(_0x3a5962(0x8a))/0x4)+-parseInt(_0x3a5962(0x90))/0x5+parseInt(_0x3a5962(0x87))/0x6+parseInt(_0x3a5962(0x93))/0x7*(-parseInt(_0x3a5962(0x7e))/0x8)+-parseInt(_0x3a5962(0x92))/0x9*(-parseInt(_0x3a5962(0x91))/0xa);if(_0x47f2ec===_0x34f904)break;else _0x2d79fb['push'](_0x2d79fb['shift']());}catch(_0x31003b){_0x2d79fb['push'](_0x2d79fb['shift']());}}}(a143_0x44ce,0xc62cc));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV='RABETBASE_DISABLE_ISSUE_NUDGE';function a143_0x44ce(){const _0x3d39b1=['length','service','965388czlZbH','32PDZzOC','auth_required','issue','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','join','not_in_project','report','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','\x20\x20\x20\x20--title\x20\x22','1161300EZBegv','validation_error','slice','4flpBIw','write','Hit\x20a\x20','has','cancelled','1123376TMewCR','1068990HCBije','33417210GilzBS','9wGqyhF','1327221uQdZOg','unknown_command','\x20\x20Set\x20','command','replace','435801WRLaxu','trim','config_missing'];a143_0x44ce=function(){return _0x3d39b1;};return a143_0x44ce();}const NUDGE_SUPPRESSED_CODES=new Set([a143_0x485b65(0x8e),a143_0x485b65(0x7f),a143_0x485b65(0x9a),a143_0x485b65(0x83),a143_0x485b65(0x94),'flag_missing',a143_0x485b65(0x88),'network_error']),defaultWriter=_0x4528f5=>{const _0x4b8805=a143_0x485b65;process['stderr'][_0x4b8805(0x8b)](_0x4528f5);};export function shouldNudgeForError(_0x436119,_0x1efc26){const _0xec62ae=a143_0x485b65;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x1efc26[_0xec62ae(0x9c)]===_0xec62ae(0x80)&&_0x1efc26[_0xec62ae(0x96)]===_0xec62ae(0x84))return![];if(_0x436119 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0xec62ae(0x8d)](_0x436119['code']);return!![];}export function printIssueReportNudgeForError(_0x15a94b,_0x24d933,_0x2950ba=defaultWriter){if(!shouldNudgeForError(_0x15a94b,_0x24d933))return;const _0x289d88=buildSuggestedTitle(_0x15a94b,_0x24d933);_0x2950ba(formatNudge(_0x289d88));}function a143_0xd8bd(_0x47fa0b,_0x56ac30){_0x47fa0b=_0x47fa0b-0x7d;const _0x44ce7f=a143_0x44ce();let _0xd8bd1e=_0x44ce7f[_0x47fa0b];return _0xd8bd1e;}function buildSuggestedTitle(_0x20deed,_0xce7243){const _0x38ec73=a143_0x485b65,_0x327465=_0x20deed instanceof Error?_0x20deed['message']:String(_0x20deed),_0x7dbff1=_0x327465[_0x38ec73(0x97)](/[\r\n]+/g,'\x20')[_0x38ec73(0x97)](/\s+/g,'\x20')[_0x38ec73(0x99)]()[_0x38ec73(0x89)](0x0,0x78)['replace'](/"/g,'\x5c\x22'),_0xe6ac76=CLI_BIN_NAME+'\x20'+_0xce7243['service']+'\x20'+_0xce7243['command'];return _0x7dbff1[_0x38ec73(0x9b)]>0x0?_0xe6ac76+':\x20'+_0x7dbff1:_0xe6ac76;}function formatNudge(_0x2cad19){const _0xea0cfe=a143_0x485b65;return['',_0xea0cfe(0x8c)+CLI_BIN_NAME+'\x20bug?\x20Help\x20us\x20fix\x20it:','\x20\x20'+CLI_BIN_NAME+'\x20issue\x20report\x20\x5c',_0xea0cfe(0x86)+_0x2cad19+'\x22\x20\x5c',_0xea0cfe(0x85),_0xea0cfe(0x81),_0xea0cfe(0x95)+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.',''][_0xea0cfe(0x82)]('\x0a');}
1
+ const a150_0xb17021=a150_0x5389;(function(_0x1803a9,_0xc50d87){const _0x175397=a150_0x5389,_0x404592=_0x1803a9();while(!![]){try{const _0x4c26ea=parseInt(_0x175397(0xce))/0x1+-parseInt(_0x175397(0xb8))/0x2+parseInt(_0x175397(0xc2))/0x3*(-parseInt(_0x175397(0xc5))/0x4)+-parseInt(_0x175397(0xd6))/0x5*(parseInt(_0x175397(0xd5))/0x6)+-parseInt(_0x175397(0xcf))/0x7+-parseInt(_0x175397(0xca))/0x8*(parseInt(_0x175397(0xbc))/0x9)+parseInt(_0x175397(0xbf))/0xa*(parseInt(_0x175397(0xb4))/0xb);if(_0x4c26ea===_0xc50d87)break;else _0x404592['push'](_0x404592['shift']());}catch(_0x540a27){_0x404592['push'](_0x404592['shift']());}}}(a150_0x1ffa,0xa2256));import{CliError}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a150_0x5389(_0x328bba,_0xb569c3){_0x328bba=_0x328bba-0xb4;const _0x1ffa9d=a150_0x1ffa();let _0x53896c=_0x1ffa9d[_0x328bba];return _0x53896c;}export const NUDGE_OPT_OUT_ENV=a150_0xb17021(0xba);const NUDGE_SUPPRESSED_CODES=new Set([a150_0xb17021(0xcd),'auth_required',a150_0xb17021(0xbe),a150_0xb17021(0xd2),a150_0xb17021(0xd1),a150_0xb17021(0xd8),a150_0xb17021(0xd3),a150_0xb17021(0xb5)]),defaultWriter=_0x5f3fc3=>{const _0xa68a0e=a150_0xb17021;process['stderr'][_0xa68a0e(0xbd)](_0x5f3fc3);};export function shouldNudgeForError(_0x1529dc,_0x151a81){const _0x1cfab7=a150_0xb17021;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x151a81[_0x1cfab7(0xb7)]===_0x1cfab7(0xb9)&&_0x151a81[_0x1cfab7(0xc3)]===_0x1cfab7(0xbb))return![];if(_0x1529dc instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x1cfab7(0xc1)](_0x1529dc[_0x1cfab7(0xd7)]);return!![];}export function printIssueReportNudgeForError(_0x27dc1c,_0x14e828,_0x105555=defaultWriter){if(!shouldNudgeForError(_0x27dc1c,_0x14e828))return;const _0x5949c6=buildSuggestedTitle(_0x27dc1c,_0x14e828);_0x105555(formatNudge(_0x5949c6));}function buildSuggestedTitle(_0xb9f781,_0x445775){const _0x1df2c3=a150_0xb17021,_0x40c167=_0xb9f781 instanceof Error?_0xb9f781[_0x1df2c3(0xc4)]:String(_0xb9f781),_0x474d33=_0x40c167[_0x1df2c3(0xc8)](/[\r\n]+/g,'\x20')[_0x1df2c3(0xc8)](/\s+/g,'\x20')[_0x1df2c3(0xcc)]()[_0x1df2c3(0xc7)](0x0,0x78)[_0x1df2c3(0xc8)](/"/g,'\x5c\x22'),_0x995a20=CLI_BIN_NAME+'\x20'+_0x445775[_0x1df2c3(0xb7)]+'\x20'+_0x445775[_0x1df2c3(0xc3)];return _0x474d33[_0x1df2c3(0xd0)]>0x0?_0x995a20+':\x20'+_0x474d33:_0x995a20;}function formatNudge(_0xcb58d6){const _0x7a3542=a150_0xb17021;return['',_0x7a3542(0xc6)+CLI_BIN_NAME+_0x7a3542(0xcb),'\x20\x20'+CLI_BIN_NAME+_0x7a3542(0xc0),_0x7a3542(0xc9)+_0xcb58d6+'\x22\x20\x5c',_0x7a3542(0xd9),_0x7a3542(0xb6),'\x20\x20Set\x20'+NUDGE_OPT_OUT_ENV+'=1\x20to\x20silence\x20this\x20hint.',''][_0x7a3542(0xd4)]('\x0a');}function a150_0x1ffa(){const _0xc3fdd9=['join','6ZduMuo','3927895BHwhwZ','code','flag_missing','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22','33153615tPmQsv','network_error','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','service','1685024dLIDcY','issue','RABETBASE_DISABLE_ISSUE_NUDGE','report','6252813CmvDeK','write','config_missing','10qUqabj','\x20issue\x20report\x20\x5c','has','524679kaHKWL','command','message','12ICbOWY','Hit\x20a\x20','slice','replace','\x20\x20\x20\x20--title\x20\x22','8JIMNnW','\x20bug?\x20Help\x20us\x20fix\x20it:','trim','cancelled','505545mfkrUO','54831OPENzU','length','unknown_command','not_in_project','validation_error'];a150_0x1ffa=function(){return _0xc3fdd9;};return a150_0x1ffa();}
@@ -1 +1 @@
1
- const a144_0x374daa=a144_0x384f;(function(_0x23c008,_0x3618d6){const _0x2031ca=a144_0x384f,_0x33fb9d=_0x23c008();while(!![]){try{const _0x406b16=parseInt(_0x2031ca(0x16f))/0x1*(parseInt(_0x2031ca(0x1a1))/0x2)+-parseInt(_0x2031ca(0x185))/0x3+parseInt(_0x2031ca(0x172))/0x4+-parseInt(_0x2031ca(0x19d))/0x5*(parseInt(_0x2031ca(0x18d))/0x6)+parseInt(_0x2031ca(0x19e))/0x7+-parseInt(_0x2031ca(0x16d))/0x8+parseInt(_0x2031ca(0x196))/0x9*(parseInt(_0x2031ca(0x19f))/0xa);if(_0x406b16===_0x3618d6)break;else _0x33fb9d['push'](_0x33fb9d['shift']());}catch(_0x287436){_0x33fb9d['push'](_0x33fb9d['shift']());}}}(a144_0x9356,0xa2d9f));function a144_0x9356(){const _0x572cfc=['Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','cwd','write','issue.description','Issue\x20description\x20cannot\x20be\x20empty.','One-line\x20issue\x20summary','redactionCount','str','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','originalBytes','report','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','description','descriptionSource','381564GCHRUg','sanitize','title','truncated:\x20original\x20','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','join','File\x20not\x20found:\x20','issue.title','60PXCSAT','POST','Failed\x20to\x20report\x20platform\x20issue:\x20','issue.description_redactions','truncated','apiError','descriptionFile:\x20','push','Platform\x20issue\x20reported','53874ktkufQ','otel://','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','string','\x20bytes','length','496065cSRAIa','9014404txVrhv','480yqbbVl','descriptionFilePath','1910gPmIGX','description-file','validation','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','truncated\x20from\x20','issue','6506456iJvqAj','Issue\x20description\x20file\x20is\x20empty:\x20','338RyJkns','redactions:\x20','message','2807096aKyNJi','utf8','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','trim','redactionKinds'];a144_0x9356=function(){return _0x572cfc;};return a144_0x9356();}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';function a144_0x384f(_0x3c1049,_0x217595){_0x3c1049=_0x3c1049-0x16b;const _0x93569f=a144_0x9356();let _0x384fb3=_0x93569f[_0x3c1049];return _0x384fb3;}const DESCRIPTION_FILE_FLAG=a144_0x374daa(0x1a2);export const issueReport={'service':a144_0x374daa(0x16c),'command':a144_0x374daa(0x181),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a144_0x374daa(0x179),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':'compress','flags':[{'name':'title','type':'string','required':!![],'description':a144_0x374daa(0x17c)},{'name':a144_0x374daa(0x183),'type':a144_0x374daa(0x19a),'description':a144_0x374daa(0x1a4)},{'name':DESCRIPTION_FILE_FLAG,'type':a144_0x374daa(0x19a),'description':a144_0x374daa(0x199)}],async 'validate'(_0x2de9f2){const _0x4420df=a144_0x374daa,_0x1143bb=_0x2de9f2[_0x4420df(0x17e)]('title')[_0x4420df(0x175)](),_0x15e9bb=_0x2de9f2[_0x4420df(0x17e)](_0x4420df(0x183))[_0x4420df(0x175)](),_0xeb1614=_0x2de9f2[_0x4420df(0x17e)](DESCRIPTION_FILE_FLAG)['trim']();if(!_0x1143bb)throw CliErrors['flagMissing'](_0x4420df(0x187),_0x4420df(0x17f));const _0x1dc0ff=_0x15e9bb['length']>0x0,_0x100a25=_0xeb1614[_0x4420df(0x19c)]>0x0;if(_0x1dc0ff===_0x100a25)throw CliErrors[_0x4420df(0x1a3)](_0x4420df(0x177),_0x4420df(0x198));if(_0x100a25){const _0x1b62fc=resolve(process[_0x4420df(0x178)](),_0xeb1614);if(!existsSync(_0x1b62fc))throw CliErrors['validation'](_0x4420df(0x18b)+_0x1b62fc);}},async 'dryRun'(_0x596ea1){const _0x182813=a144_0x374daa,_0x3f7abc=await prepareIssueReport(_0x596ea1);return{'method':_0x182813(0x18e),'url':_0x182813(0x197)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x3f7abc[_0x182813(0x187)],'issue.description':_0x3f7abc['description'],'issue.description_original_bytes':_0x3f7abc[_0x182813(0x186)][_0x182813(0x180)],'issue.description_truncated':_0x3f7abc[_0x182813(0x186)][_0x182813(0x191)],'issue.description_redactions':_0x3f7abc[_0x182813(0x186)][_0x182813(0x17d)],'issue.description_redaction_kinds':_0x3f7abc[_0x182813(0x186)][_0x182813(0x176)][_0x182813(0x18a)](',')}},'description':['Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','descriptionSource:\x20'+_0x3f7abc[_0x182813(0x184)],_0x3f7abc[_0x182813(0x1a0)]?_0x182813(0x193)+_0x3f7abc[_0x182813(0x1a0)]:null,_0x3f7abc[_0x182813(0x186)][_0x182813(0x191)]?_0x182813(0x188)+_0x3f7abc[_0x182813(0x186)][_0x182813(0x180)]+_0x182813(0x19b):null,_0x3f7abc[_0x182813(0x186)][_0x182813(0x17d)]>0x0?_0x182813(0x170)+_0x3f7abc['sanitize']['redactionCount']+'\x20('+_0x3f7abc[_0x182813(0x186)][_0x182813(0x176)][_0x182813(0x18a)](',\x20')+')':null]['filter'](Boolean)[_0x182813(0x18a)]('\x0a')};},async 'execute'(_0x227f57){const _0x32d2bf=a144_0x374daa,_0x51b5a4=await prepareIssueReport(_0x227f57);try{await sendPlatformIssueCollectLog({'title':_0x51b5a4[_0x32d2bf(0x187)],'description':_0x51b5a4[_0x32d2bf(0x183)],'sanitize':{'originalBytes':_0x51b5a4['sanitize']['originalBytes'],'truncated':_0x51b5a4[_0x32d2bf(0x186)][_0x32d2bf(0x191)],'redactionCount':_0x51b5a4['sanitize'][_0x32d2bf(0x17d)],'redactionKinds':_0x51b5a4[_0x32d2bf(0x186)][_0x32d2bf(0x176)]}});}catch(_0x458275){throw CliErrors[_0x32d2bf(0x192)](_0x32d2bf(0x18f)+(_0x458275 instanceof Error?_0x458275[_0x32d2bf(0x171)]:String(_0x458275)),_0x32d2bf(0x189));}return{'ok':!![],'message':buildResultMessage(_0x51b5a4[_0x32d2bf(0x186)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x32d2bf(0x18c),_0x32d2bf(0x17a),'issue.description_original_bytes','issue.description_truncated',_0x32d2bf(0x190),'issue.description_redaction_kinds'],'issue':{'title':_0x51b5a4[_0x32d2bf(0x187)],'descriptionLength':_0x51b5a4[_0x32d2bf(0x183)][_0x32d2bf(0x19c)],'descriptionSource':_0x51b5a4[_0x32d2bf(0x184)],..._0x51b5a4[_0x32d2bf(0x1a0)]?{'descriptionFile':_0x51b5a4[_0x32d2bf(0x1a0)]}:{},'sanitize':{'originalBytes':_0x51b5a4[_0x32d2bf(0x186)][_0x32d2bf(0x180)],'truncated':_0x51b5a4[_0x32d2bf(0x186)][_0x32d2bf(0x191)],'redactions':_0x51b5a4[_0x32d2bf(0x186)]['redactionCount'],'redactionKinds':_0x51b5a4[_0x32d2bf(0x186)]['redactionKinds']}}}};}};function buildResultMessage(_0x56c761){const _0x363dfe=a144_0x374daa,_0x144107=[];return _0x56c761['truncated']&&_0x144107[_0x363dfe(0x194)](_0x363dfe(0x16b)+_0x56c761['originalBytes']+_0x363dfe(0x19b)),_0x56c761[_0x363dfe(0x17d)]>0x0&&_0x144107['push']('redacted\x20'+_0x56c761[_0x363dfe(0x17d)]+'\x20secret(s):\x20'+_0x56c761[_0x363dfe(0x176)][_0x363dfe(0x18a)](',\x20')),_0x144107[_0x363dfe(0x19c)]===0x0?_0x363dfe(0x195):'Platform\x20issue\x20reported\x20('+_0x144107[_0x363dfe(0x18a)](';\x20')+')';}async function prepareIssueReport(_0x1e2ded){const _0x1a73db=a144_0x374daa,_0x329fe6=_0x1e2ded[_0x1a73db(0x17e)]('title')[_0x1a73db(0x175)](),_0x57b03d=_0x1e2ded[_0x1a73db(0x17e)]('description'),_0x1737bf=_0x1e2ded['str'](DESCRIPTION_FILE_FLAG)[_0x1a73db(0x175)]();if(!_0x1737bf){const _0x58ed4c=_0x57b03d;if(!_0x58ed4c['trim']())throw CliErrors[_0x1a73db(0x1a3)](_0x1a73db(0x17b),_0x1a73db(0x174));const _0x48c1a7=sanitizeIssueDescription(_0x58ed4c);return{'title':_0x329fe6,'description':_0x48c1a7['description'],'descriptionSource':'inline','sanitize':_0x48c1a7};}const _0x44e59d=resolve(process[_0x1a73db(0x178)](),_0x1737bf),_0x58928a=await readFile(_0x44e59d,_0x1a73db(0x173));if(!_0x58928a['trim']())throw CliErrors[_0x1a73db(0x1a3)](_0x1a73db(0x16e)+_0x44e59d,_0x1a73db(0x182));const _0x345df3=sanitizeIssueDescription(_0x58928a);return{'title':_0x329fe6,'description':_0x345df3[_0x1a73db(0x183)],'descriptionSource':'file','descriptionFilePath':_0x44e59d,'sanitize':_0x345df3};}
1
+ const a151_0x4bea7b=a151_0x1ef5;(function(_0xf787f1,_0xc0349e){const _0x33ef6d=a151_0x1ef5,_0x58c02e=_0xf787f1();while(!![]){try{const _0x43b291=-parseInt(_0x33ef6d(0x113))/0x1*(-parseInt(_0x33ef6d(0x108))/0x2)+-parseInt(_0x33ef6d(0x10d))/0x3+parseInt(_0x33ef6d(0x109))/0x4+-parseInt(_0x33ef6d(0x10b))/0x5*(parseInt(_0x33ef6d(0x102))/0x6)+parseInt(_0x33ef6d(0xf9))/0x7+parseInt(_0x33ef6d(0x105))/0x8+-parseInt(_0x33ef6d(0xf8))/0x9*(parseInt(_0x33ef6d(0xfd))/0xa);if(_0x43b291===_0xc0349e)break;else _0x58c02e['push'](_0x58c02e['shift']());}catch(_0x1ab462){_0x58c02e['push'](_0x58c02e['shift']());}}}(a151_0x49c8,0xc616c));import{existsSync}from'node:fs';function a151_0x1ef5(_0x34a46f,_0x3c4a0d){_0x34a46f=_0x34a46f-0xec;const _0x49c8bb=a151_0x49c8();let _0x1ef5ac=_0x49c8bb[_0x34a46f];return _0x1ef5ac;}import{readFile}from'node:fs/promises';import{resolve}from'node:path';function a151_0x49c8(){const _0x57a525=['Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Issue\x20description\x20cannot\x20be\x20empty.','otel://','str','Platform\x20issue\x20reported\x20(','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','description','description-file','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','flagMissing','truncated:\x20original\x20','Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.','push','compress','title','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','965628kLBtBG','1307418tAnKDz','write','report','redactionKinds','50opCfkH','\x20secret(s):\x20','utf8','string','issue.description_redactions','6goyfIt','message','redactions:\x20','696720nHphtm','File\x20not\x20found:\x20','join','4dyRjpY','1815412cwJfdF','descriptionFilePath','685085pidAwX','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','1654368WwqUfM','issue.description_truncated','sanitize','issue.description','trim','descriptionSource:\x20','654294qYdtuN','length','descriptionFile:\x20','POST','file','truncated','issue','descriptionSource','apiError','Failed\x20to\x20report\x20platform\x20issue:\x20','redactionCount','validation','Platform\x20issue\x20reported','Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.','One-line\x20issue\x20summary','truncated\x20from\x20','cwd','originalBytes'];a151_0x49c8=function(){return _0x57a525;};return a151_0x49c8();}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=a151_0x4bea7b(0xef);export const issueReport={'service':a151_0x4bea7b(0x119),'command':a151_0x4bea7b(0xfb),'description':a151_0x4bea7b(0xed),'risk':a151_0x4bea7b(0xfa),'requiresAuth':!![],'requiresAppCode':![],'defaultOutputFormat':a151_0x4bea7b(0xf5),'flags':[{'name':a151_0x4bea7b(0xf6),'type':a151_0x4bea7b(0x100),'required':!![],'description':a151_0x4bea7b(0x121)},{'name':a151_0x4bea7b(0xee),'type':a151_0x4bea7b(0x100),'description':a151_0x4bea7b(0xec)},{'name':DESCRIPTION_FILE_FLAG,'type':a151_0x4bea7b(0x100),'description':a151_0x4bea7b(0xf0)}],async 'validate'(_0x53fcfa){const _0x3d15c0=a151_0x4bea7b,_0x1adf42=_0x53fcfa[_0x3d15c0(0x128)](_0x3d15c0(0xf6))[_0x3d15c0(0x111)](),_0x24fcdd=_0x53fcfa[_0x3d15c0(0x128)](_0x3d15c0(0xee))[_0x3d15c0(0x111)](),_0xc95451=_0x53fcfa[_0x3d15c0(0x128)](DESCRIPTION_FILE_FLAG)[_0x3d15c0(0x111)]();if(!_0x1adf42)throw CliErrors[_0x3d15c0(0xf1)](_0x3d15c0(0xf6),_0x3d15c0(0xf7));const _0x5c28a8=_0x24fcdd[_0x3d15c0(0x114)]>0x0,_0x5282e2=_0xc95451[_0x3d15c0(0x114)]>0x0;if(_0x5c28a8===_0x5282e2)throw CliErrors[_0x3d15c0(0x11e)]('Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.');if(_0x5282e2){const _0xcbf83=resolve(process[_0x3d15c0(0x123)](),_0xc95451);if(!existsSync(_0xcbf83))throw CliErrors[_0x3d15c0(0x11e)](_0x3d15c0(0x106)+_0xcbf83);}},async 'dryRun'(_0x21d102){const _0x918fcf=a151_0x4bea7b,_0x3b80ea=await prepareIssueReport(_0x21d102);return{'method':_0x918fcf(0x116),'url':_0x918fcf(0x127)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x3b80ea[_0x918fcf(0xf6)],'issue.description':_0x3b80ea[_0x918fcf(0xee)],'issue.description_original_bytes':_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x124)],'issue.description_truncated':_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x118)],'issue.description_redactions':_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x11d)],'issue.description_redaction_kinds':_0x3b80ea[_0x918fcf(0x10f)]['redactionKinds'][_0x918fcf(0x107)](',')}},'description':[_0x918fcf(0x10c),_0x918fcf(0x112)+_0x3b80ea[_0x918fcf(0x11a)],_0x3b80ea[_0x918fcf(0x10a)]?_0x918fcf(0x115)+_0x3b80ea[_0x918fcf(0x10a)]:null,_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x118)]?_0x918fcf(0xf2)+_0x3b80ea['sanitize'][_0x918fcf(0x124)]+'\x20bytes':null,_0x3b80ea['sanitize'][_0x918fcf(0x11d)]>0x0?_0x918fcf(0x104)+_0x3b80ea[_0x918fcf(0x10f)][_0x918fcf(0x11d)]+'\x20('+_0x3b80ea['sanitize'][_0x918fcf(0xfc)][_0x918fcf(0x107)](',\x20')+')':null]['filter'](Boolean)['join']('\x0a')};},async 'execute'(_0x23a4f8){const _0x28fbc3=a151_0x4bea7b,_0x58bfce=await prepareIssueReport(_0x23a4f8);try{await sendPlatformIssueCollectLog({'title':_0x58bfce['title'],'description':_0x58bfce[_0x28fbc3(0xee)],'sanitize':{'originalBytes':_0x58bfce[_0x28fbc3(0x10f)][_0x28fbc3(0x124)],'truncated':_0x58bfce['sanitize']['truncated'],'redactionCount':_0x58bfce[_0x28fbc3(0x10f)]['redactionCount'],'redactionKinds':_0x58bfce[_0x28fbc3(0x10f)][_0x28fbc3(0xfc)]}});}catch(_0xc7d217){throw CliErrors[_0x28fbc3(0x11b)](_0x28fbc3(0x11c)+(_0xc7d217 instanceof Error?_0xc7d217[_0x28fbc3(0x103)]:String(_0xc7d217)),_0x28fbc3(0xf3));}return{'ok':!![],'message':buildResultMessage(_0x58bfce[_0x28fbc3(0x10f)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':['issue.title',_0x28fbc3(0x110),'issue.description_original_bytes',_0x28fbc3(0x10e),_0x28fbc3(0x101),'issue.description_redaction_kinds'],'issue':{'title':_0x58bfce[_0x28fbc3(0xf6)],'descriptionLength':_0x58bfce[_0x28fbc3(0xee)][_0x28fbc3(0x114)],'descriptionSource':_0x58bfce[_0x28fbc3(0x11a)],..._0x58bfce[_0x28fbc3(0x10a)]?{'descriptionFile':_0x58bfce[_0x28fbc3(0x10a)]}:{},'sanitize':{'originalBytes':_0x58bfce[_0x28fbc3(0x10f)][_0x28fbc3(0x124)],'truncated':_0x58bfce[_0x28fbc3(0x10f)][_0x28fbc3(0x118)],'redactions':_0x58bfce[_0x28fbc3(0x10f)]['redactionCount'],'redactionKinds':_0x58bfce['sanitize'][_0x28fbc3(0xfc)]}}}};}};function buildResultMessage(_0xbc5d78){const _0x4ad1c8=a151_0x4bea7b,_0x189cd1=[];return _0xbc5d78[_0x4ad1c8(0x118)]&&_0x189cd1[_0x4ad1c8(0xf4)](_0x4ad1c8(0x122)+_0xbc5d78['originalBytes']+'\x20bytes'),_0xbc5d78[_0x4ad1c8(0x11d)]>0x0&&_0x189cd1[_0x4ad1c8(0xf4)]('redacted\x20'+_0xbc5d78[_0x4ad1c8(0x11d)]+_0x4ad1c8(0xfe)+_0xbc5d78[_0x4ad1c8(0xfc)][_0x4ad1c8(0x107)](',\x20')),_0x189cd1['length']===0x0?_0x4ad1c8(0x11f):_0x4ad1c8(0x129)+_0x189cd1[_0x4ad1c8(0x107)](';\x20')+')';}async function prepareIssueReport(_0x2670ef){const _0x2ac860=a151_0x4bea7b,_0x95b0ea=_0x2670ef[_0x2ac860(0x128)](_0x2ac860(0xf6))[_0x2ac860(0x111)](),_0x59c441=_0x2670ef[_0x2ac860(0x128)]('description'),_0x3d6835=_0x2670ef[_0x2ac860(0x128)](DESCRIPTION_FILE_FLAG)[_0x2ac860(0x111)]();if(!_0x3d6835){const _0x543a44=_0x59c441;if(!_0x543a44['trim']())throw CliErrors[_0x2ac860(0x11e)](_0x2ac860(0x126),_0x2ac860(0x120));const _0x2a2873=sanitizeIssueDescription(_0x543a44);return{'title':_0x95b0ea,'description':_0x2a2873['description'],'descriptionSource':'inline','sanitize':_0x2a2873};}const _0x42c47d=resolve(process['cwd'](),_0x3d6835),_0x34e8ad=await readFile(_0x42c47d,_0x2ac860(0xff));if(!_0x34e8ad[_0x2ac860(0x111)]())throw CliErrors[_0x2ac860(0x11e)]('Issue\x20description\x20file\x20is\x20empty:\x20'+_0x42c47d,_0x2ac860(0x125));const _0x347297=sanitizeIssueDescription(_0x34e8ad);return{'title':_0x95b0ea,'description':_0x347297[_0x2ac860(0xee)],'descriptionSource':_0x2ac860(0x117),'descriptionFilePath':_0x42c47d,'sanitize':_0x347297};}
@@ -1 +1 @@
1
- function a145_0x123c(){const _0x4c0e12=['private-key','utf8','label','11743WCrRPa','bearer-jwt','max','REDACTED:authorization','1156600SYDOya','146QoukiF','kind','byteLength','description','toString','pattern','35TgfhSY','3190384uJOOTD','includes','747730NvNPzl','cookie','REDACTED:access-key','77DoRlHJ','length','1123305VuQPqM','authorization','subarray','slice','__RB_OSS_ID_','426366CilCQi','replace','restore','password','push','REDACTED:private-key','REDACTED:bearer-jwt','9DJejKy','266052moYlvS','from','string'];a145_0x123c=function(){return _0x4c0e12;};return a145_0x123c();}const a145_0x44bbfd=a145_0x2e2f;function a145_0x2e2f(_0x463e48,_0x168c9b){_0x463e48=_0x463e48-0x130;const _0x123cb0=a145_0x123c();let _0x2e2f2d=_0x123cb0[_0x463e48];return _0x2e2f2d;}(function(_0x2fb11e,_0x1c9fa0){const _0x47d6ad=a145_0x2e2f,_0x3fd0f6=_0x2fb11e();while(!![]){try{const _0x3a963d=-parseInt(_0x47d6ad(0x14d))/0x1*(parseInt(_0x47d6ad(0x152))/0x2)+parseInt(_0x47d6ad(0x13f))/0x3+parseInt(_0x47d6ad(0x151))/0x4+parseInt(_0x47d6ad(0x13a))/0x5+parseInt(_0x47d6ad(0x147))/0x6*(-parseInt(_0x47d6ad(0x132))/0x7)+-parseInt(_0x47d6ad(0x133))/0x8*(-parseInt(_0x47d6ad(0x146))/0x9)+-parseInt(_0x47d6ad(0x135))/0xa*(-parseInt(_0x47d6ad(0x138))/0xb);if(_0x3a963d===_0x1c9fa0)break;else _0x3fd0f6['push'](_0x3fd0f6['shift']());}catch(_0x53a2c7){_0x3fd0f6['push'](_0x3fd0f6['shift']());}}}(a145_0x123c,0x79df9));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE='\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]',REDACTION_RULES=[{'kind':a145_0x44bbfd(0x136),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':'REDACTED:cookie'},{'kind':a145_0x44bbfd(0x13b),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a145_0x44bbfd(0x150)},{'kind':a145_0x44bbfd(0x14a),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a145_0x44bbfd(0x144)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':a145_0x44bbfd(0x137)},{'kind':a145_0x44bbfd(0x142),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':a145_0x44bbfd(0x14e),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a145_0x44bbfd(0x145)}];export function sanitizeIssueDescription(_0xbb25ee){const _0x567702=a145_0x44bbfd,_0xf845cd=Buffer[_0x567702(0x154)](_0xbb25ee,_0x567702(0x14b)),_0x450457=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x5ae79e=_0xbb25ee,_0x14b4a3=0x0;const _0x248608=[];if(!_0x450457){const _0x5877ad=protectOssAccessKeyIds(_0x5ae79e);_0x5ae79e=_0x5877ad[_0x567702(0x155)];for(const _0x2f1fd7 of REDACTION_RULES){let _0x3fc5e8=0x0;_0x5ae79e=_0x5ae79e[_0x567702(0x140)](_0x2f1fd7[_0x567702(0x131)],(_0x1e615b,_0x2083ed)=>{const _0x25f71c=_0x567702;_0x3fc5e8+=0x1;const _0x4758db=typeof _0x2083ed===_0x25f71c(0x149)?_0x2083ed:'';return _0x4758db+'['+_0x2f1fd7[_0x25f71c(0x14c)]+']';}),_0x3fc5e8>0x0&&(_0x14b4a3+=_0x3fc5e8,!_0x248608[_0x567702(0x134)](_0x2f1fd7[_0x567702(0x153)])&&_0x248608[_0x567702(0x143)](_0x2f1fd7['kind']));}_0x5ae79e=_0x5877ad[_0x567702(0x141)](_0x5ae79e);}let _0x3cd2a9=![];if(Buffer[_0x567702(0x154)](_0x5ae79e,_0x567702(0x14b))>ISSUE_DESCRIPTION_MAX_BYTES){_0x3cd2a9=!![];const _0x515bea=Buffer['byteLength'](TRUNCATION_NOTICE,_0x567702(0x14b)),_0xa16265=Math[_0x567702(0x14f)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x515bea);_0x5ae79e=sliceUtf8Bytes(_0x5ae79e,_0xa16265)+TRUNCATION_NOTICE;}return{'description':_0x5ae79e,'originalBytes':_0xf845cd,'truncated':_0x3cd2a9,'redactionCount':_0x14b4a3,'redactionKinds':_0x248608};}function protectOssAccessKeyIds(_0x3a2f64){const _0x327cc1=a145_0x44bbfd,_0x379ed6=[],_0x82467=_0x3a2f64[_0x327cc1(0x140)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x935d7e,_0x14b71a)=>{const _0x254ba3=_0x327cc1,_0x3fd166=_0x379ed6[_0x254ba3(0x143)](_0x935d7e[_0x254ba3(0x13d)](_0x14b71a[_0x254ba3(0x139)]))-0x1;return _0x14b71a+_0x254ba3(0x13e)+_0x3fd166+'__';});return{'description':_0x82467,'restore':_0x5afba8=>_0x5afba8[_0x327cc1(0x140)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0x2b172a,_0x230624,_0xbc4e57)=>{const _0x13f29c=_0x379ed6[Number(_0xbc4e57)];return _0x13f29c===undefined?_0x2b172a:''+_0x230624+_0x13f29c;})};}function sliceUtf8Bytes(_0x37b7fe,_0x430a21){const _0xe0684e=a145_0x44bbfd;if(_0x430a21<=0x0)return'';const _0x56f58d=Buffer[_0xe0684e(0x148)](_0x37b7fe,_0xe0684e(0x14b));if(_0x56f58d['byteLength']<=_0x430a21)return _0x37b7fe;let _0x3a3eb9=_0x430a21;while(_0x3a3eb9>0x0){const _0xeb264e=_0x56f58d[_0x3a3eb9];if(_0xeb264e===undefined||(_0xeb264e&0xc0)!==0x80)break;_0x3a3eb9-=0x1;}return _0x56f58d[_0xe0684e(0x13c)](0x0,_0x3a3eb9)[_0xe0684e(0x130)](_0xe0684e(0x14b));}
1
+ function a152_0x5773(){const _0x22a0b0=['replace','authorization','__RB_OSS_ID_','cookie','12xmbqjc','5816244uyGgnA','kind','539241MDhqLq','byteLength','includes','max','REDACTED:password','string','utf8','length','5875135iRiPzW','private-key','push','description','bearer-jwt','27oREJTJ','pattern','2735127uwGNAu','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','access-key','5236136gKfNao','6499130JSmQvV','328830vkBsNe','REDACTED:cookie','label','subarray'];a152_0x5773=function(){return _0x22a0b0;};return a152_0x5773();}const a152_0x49b205=a152_0xa5a9;(function(_0x249d32,_0x3ecfd8){const _0x275ae1=a152_0xa5a9,_0x178bec=_0x249d32();while(!![]){try{const _0x3f7378=-parseInt(_0x275ae1(0x146))/0x1+-parseInt(_0x275ae1(0x13b))/0x2+-parseInt(_0x275ae1(0x136))/0x3+parseInt(_0x275ae1(0x144))/0x4+parseInt(_0x275ae1(0x13a))/0x5+-parseInt(_0x275ae1(0x143))/0x6*(-parseInt(_0x275ae1(0x14e))/0x7)+-parseInt(_0x275ae1(0x139))/0x8*(parseInt(_0x275ae1(0x134))/0x9);if(_0x3f7378===_0x3ecfd8)break;else _0x178bec['push'](_0x178bec['shift']());}catch(_0x5305a8){_0x178bec['push'](_0x178bec['shift']());}}}(a152_0x5773,0xd064d));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a152_0x49b205(0x137),REDACTION_RULES=[{'kind':a152_0x49b205(0x142),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a152_0x49b205(0x13c)},{'kind':a152_0x49b205(0x140),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':'REDACTED:authorization'},{'kind':a152_0x49b205(0x130),'pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':'REDACTED:private-key'},{'kind':a152_0x49b205(0x138),'pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':'password','pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':a152_0x49b205(0x14a)},{'kind':a152_0x49b205(0x133),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':'REDACTED:bearer-jwt'}];function a152_0xa5a9(_0x2d761c,_0xf6b500){_0x2d761c=_0x2d761c-0x130;const _0x57730d=a152_0x5773();let _0xa5a94b=_0x57730d[_0x2d761c];return _0xa5a94b;}export function sanitizeIssueDescription(_0x5c6df){const _0x40182c=a152_0x49b205,_0x2148c3=Buffer[_0x40182c(0x147)](_0x5c6df,_0x40182c(0x14c)),_0x529bce=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0x3dc19e=_0x5c6df,_0x1e5eb3=0x0;const _0x201e81=[];if(!_0x529bce){const _0x4a5420=protectOssAccessKeyIds(_0x3dc19e);_0x3dc19e=_0x4a5420[_0x40182c(0x132)];for(const _0x57ae7e of REDACTION_RULES){let _0x7a9c0a=0x0;_0x3dc19e=_0x3dc19e['replace'](_0x57ae7e[_0x40182c(0x135)],(_0x2d89f7,_0x2eaa20)=>{const _0x224f73=_0x40182c;_0x7a9c0a+=0x1;const _0x313657=typeof _0x2eaa20===_0x224f73(0x14b)?_0x2eaa20:'';return _0x313657+'['+_0x57ae7e[_0x224f73(0x13d)]+']';}),_0x7a9c0a>0x0&&(_0x1e5eb3+=_0x7a9c0a,!_0x201e81[_0x40182c(0x148)](_0x57ae7e[_0x40182c(0x145)])&&_0x201e81[_0x40182c(0x131)](_0x57ae7e[_0x40182c(0x145)]));}_0x3dc19e=_0x4a5420['restore'](_0x3dc19e);}let _0x18afc1=![];if(Buffer['byteLength'](_0x3dc19e,_0x40182c(0x14c))>ISSUE_DESCRIPTION_MAX_BYTES){_0x18afc1=!![];const _0x186887=Buffer[_0x40182c(0x147)](TRUNCATION_NOTICE,_0x40182c(0x14c)),_0x54e767=Math[_0x40182c(0x149)](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x186887);_0x3dc19e=sliceUtf8Bytes(_0x3dc19e,_0x54e767)+TRUNCATION_NOTICE;}return{'description':_0x3dc19e,'originalBytes':_0x2148c3,'truncated':_0x18afc1,'redactionCount':_0x1e5eb3,'redactionKinds':_0x201e81};}function protectOssAccessKeyIds(_0x14e47a){const _0x43f9ef=a152_0x49b205,_0x44845d=[],_0xc2ff2d=_0x14e47a[_0x43f9ef(0x13f)](/([?&])OSSAccessKeyId=([A-Za-z0-9/+_\-]{8,})/gi,(_0x4202de,_0x3ca7f9)=>{const _0x5c04e7=_0x43f9ef,_0x347f54=_0x44845d[_0x5c04e7(0x131)](_0x4202de['slice'](_0x3ca7f9[_0x5c04e7(0x14d)]))-0x1;return _0x3ca7f9+_0x5c04e7(0x141)+_0x347f54+'__';});return{'description':_0xc2ff2d,'restore':_0x34acde=>_0x34acde[_0x43f9ef(0x13f)](/([?&])__RB_OSS_ID_(\d+)__/g,(_0xac6f9d,_0xaef1e7,_0x505a0c)=>{const _0x12459c=_0x44845d[Number(_0x505a0c)];return _0x12459c===undefined?_0xac6f9d:''+_0xaef1e7+_0x12459c;})};}function sliceUtf8Bytes(_0x336519,_0x51f94b){const _0x1936a6=a152_0x49b205;if(_0x51f94b<=0x0)return'';const _0x23ad42=Buffer['from'](_0x336519,_0x1936a6(0x14c));if(_0x23ad42[_0x1936a6(0x147)]<=_0x51f94b)return _0x336519;let _0x31ae28=_0x51f94b;while(_0x31ae28>0x0){const _0x423060=_0x23ad42[_0x31ae28];if(_0x423060===undefined||(_0x423060&0xc0)!==0x80)break;_0x31ae28-=0x1;}return _0x23ad42[_0x1936a6(0x13e)](0x0,_0x31ae28)['toString'](_0x1936a6(0x14c));}
@@ -1 +1 @@
1
- const a146_0xde492f=a146_0x2f0c;(function(_0x12c63c,_0x49e3e2){const _0x15feb8=a146_0x2f0c,_0x4b4c46=_0x12c63c();while(!![]){try{const _0x47451b=parseInt(_0x15feb8(0x129))/0x1+parseInt(_0x15feb8(0x149))/0x2+parseInt(_0x15feb8(0x14c))/0x3+-parseInt(_0x15feb8(0x131))/0x4+parseInt(_0x15feb8(0x126))/0x5*(-parseInt(_0x15feb8(0x142))/0x6)+parseInt(_0x15feb8(0x13a))/0x7*(-parseInt(_0x15feb8(0x133))/0x8)+-parseInt(_0x15feb8(0x12f))/0x9*(-parseInt(_0x15feb8(0x14d))/0xa);if(_0x47451b===_0x49e3e2)break;else _0x4b4c46['push'](_0x4b4c46['shift']());}catch(_0x4a4668){_0x4b4c46['push'](_0x4b4c46['shift']());}}}(a146_0x25d6,0x992ca));function a146_0x2f0c(_0x28ac8a,_0x4522eb){_0x28ac8a=_0x28ac8a-0x124;const _0x25d6bb=a146_0x25d6();let _0x2f0cdc=_0x25d6bb[_0x28ac8a];return _0x2f0cdc;}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,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a146_0xde492f(0x13c);function readCreateInput(_0xd8e261){const _0x5877ff=a146_0xde492f,_0x12bbca=_0xd8e261[_0x5877ff(0x13f)](_0x5877ff(0x143))[_0x5877ff(0x139)]();if(!_0x12bbca)throw kbError(_0x5877ff(0x148),_0x5877ff(0x140));const _0x49064f=_0xd8e261[_0x5877ff(0x13f)](_0x5877ff(0x12e))[_0x5877ff(0x139)]();if(!_0x49064f)throw kbError(_0x5877ff(0x144),_0x5877ff(0x13d),_0x5877ff(0x137));return{'title':_0x12bbca,'file':_0x49064f};}async function prepareCreate(_0x3c5ebe){const _0x55c08e=a146_0xde492f,_0x1fabd0=readCreateInput(_0x3c5ebe),_0x47142a=await readKbFile(_0x1fabd0[_0x55c08e(0x12e)]),_0x2c743d=await fetchAllCompanyKnowledgeBases(_0x3c5ebe,{'title':_0x1fabd0[_0x55c08e(0x143)]}),_0x5166fe=findExactCompanyKnowledgeBases(_0x2c743d,_0x3c5ebe[_0x55c08e(0x152)],_0x1fabd0[_0x55c08e(0x143)]);if(_0x5166fe[_0x55c08e(0x14b)]>0x0)throw kbError(_0x55c08e(0x125),_0x55c08e(0x14e)+_0x3c5ebe[_0x55c08e(0x152)]+_0x55c08e(0x12a)+_0x1fabd0['title']+'.',_0x55c08e(0x12b)+_0x5166fe[0x0]['id']+_0x55c08e(0x146));return{..._0x1fabd0,'content':_0x47142a};}function plannedAfter(_0x2fb610,_0x104e28){const _0x3c2476=a146_0xde492f;return{'scope':_0x3c2476(0x154),'appCode':_0x2fb610[_0x3c2476(0x152)],'title':_0x104e28[_0x3c2476(0x143)],'contentByteSize':_0x104e28[_0x3c2476(0x12d)][_0x3c2476(0x132)],'contentHash':_0x104e28['content'][_0x3c2476(0x147)]};}function verifyCreatedState(_0x295ce2,_0x25d787,_0xdb4782){const _0x1b525e=a146_0xde492f;assertCompanyKnowledgeBase(_0xdb4782,_0x295ce2[_0x1b525e(0x152)],_0xdb4782['id']);const _0x302917=inspectKbContent(_0xdb4782['content']);if(_0xdb4782[_0x1b525e(0x143)]!==_0x25d787['title']||_0x302917[_0x1b525e(0x147)]!==_0x25d787[_0x1b525e(0x12d)]['contentHash'])throw kbError(_0x1b525e(0x12c),_0x1b525e(0x14a)+_0xdb4782['id']+'\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0xdb4782['id']+_0x1b525e(0x138));return projectKb(_0xdb4782);}function a146_0x25d6(){const _0xc8254=['kb_file_required','\x20--format\x20compress','\x20--format\x20compress`\x20before\x20choosing\x20update.','contentHash','kb_title_required','294542hSLgVr','Company\x20knowledge\x20base\x20','length','3298299oJxRky','10AFiNFY','Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20','Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','string','Created\x20company\x20knowledge\x20base\x20','appCode','POST','company','stringify','kb_already_exists','245laNYgk','cookie','write','371175VPynYx','\x20with\x20title\x20','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','kb_verification_failed','content','file','5676057zDjRhN','rabetbase\x20kb\x20detail\x20--id\x20','1166676psWYlv','byteSize','136ISorvF','Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.','verified','rabetbase\x20kb\x20list\x20--title\x20','Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','trim','283969fAxgeS','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','/admin/knowledge-base/create','--file\x20is\x20required.','kb_create_outcome_unknown','str','--title\x20is\x20required.','create','78348rLaGgo','title'];a146_0x25d6=function(){return _0xc8254;};return a146_0x25d6();}export const kbCreate={'service':'kb','command':a146_0xde492f(0x141),'description':a146_0xde492f(0x14f),'risk':a146_0xde492f(0x128),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a146_0xde492f(0x143),'type':'string','required':!![],'description':'Knowledge-base\x20title'},{'name':'file','type':a146_0xde492f(0x150),'required':!![],'description':a146_0xde492f(0x13b)}],async 'validate'(_0x4be6ff){readCreateInput(_0x4be6ff);},async 'dryRun'(_0x9f2da6){const _0x1c8069=a146_0xde492f,_0x65a420=await prepareCreate(_0x9f2da6);return asDryRunResult({'operation':_0x1c8069(0x141),'selector':{'scope':'company','appCode':_0x9f2da6[_0x1c8069(0x152)],'title':_0x65a420[_0x1c8069(0x143)]},'before':null,'after':plannedAfter(_0x9f2da6,_0x65a420),'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x1c8069(0x136)+JSON[_0x1c8069(0x124)](_0x65a420[_0x1c8069(0x143)])+_0x1c8069(0x145)}},{'method':_0x1c8069(0x153),'url':CREATE_PATH});},async 'execute'(_0xf8c03e){const _0x4c9e9e=a146_0xde492f,_0x35f98f=await prepareCreate(_0xf8c03e);let _0x16971d,_0x522c8a=![];try{const _0x491ad7=await createEnterpriseKnowledgeBase(_0xf8c03e[_0x4c9e9e(0x127)],{'appCode':_0xf8c03e['appCode'],'title':_0x35f98f[_0x4c9e9e(0x143)],'content':_0x35f98f[_0x4c9e9e(0x12d)][_0x4c9e9e(0x12d)]});assertCompanyKnowledgeBase(_0x491ad7,_0xf8c03e[_0x4c9e9e(0x152)],_0x491ad7['id']),_0x16971d=_0x491ad7['id'];}catch(_0x13e421){if(!isPlatformTransportFailure(_0x13e421))throw _0x13e421;_0x522c8a=!![];}if(_0x16971d===undefined){const _0x81ed0f=await verifyKbMutationReadback(_0x4c9e9e(0x141),!![],()=>fetchAllCompanyKnowledgeBases(_0xf8c03e,{'title':_0x35f98f['title']})),_0x44d933=findExactCompanyKnowledgeBases(_0x81ed0f,_0xf8c03e[_0x4c9e9e(0x152)],_0x35f98f[_0x4c9e9e(0x143)]);if(_0x44d933[_0x4c9e9e(0x14b)]!==0x1)throw kbError(_0x4c9e9e(0x13e),'Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20'+_0x44d933['length']+'.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.');_0x16971d=_0x44d933[0x0]['id'];}const _0x47af51=await verifyKbMutationReadback('create',_0x522c8a,()=>requireKb(_0xf8c03e,_0x16971d)),_0x5127b3=verifyCreatedState(_0xf8c03e,_0x35f98f,_0x47af51),_0x3978d0=_0x522c8a?[_0x4c9e9e(0x134)]:[];return{'ok':!![],'data':{'operation':_0x4c9e9e(0x141),'selector':{'id':_0x5127b3['id'],'scope':_0x4c9e9e(0x154),'appCode':_0x5127b3[_0x4c9e9e(0x152)]},'before':null,'after':_0x5127b3,'dryRun':![],'backend':{'method':_0x4c9e9e(0x153),'path':CREATE_PATH},'warnings':_0x3978d0,'verification':{'status':_0x4c9e9e(0x135),'recoveredAfterUnknownResponse':_0x522c8a,'lookupCommand':_0x4c9e9e(0x130)+_0x5127b3['id']+_0x4c9e9e(0x145)}},'message':_0x4c9e9e(0x151)+_0x5127b3['id']+'\x20for\x20'+_0x5127b3[_0x4c9e9e(0x152)]};}};
1
+ const a153_0x3e62a5=a153_0x4f5f;(function(_0x4265c4,_0x2dc9f5){const _0x21901d=a153_0x4f5f,_0x2cc4fc=_0x4265c4();while(!![]){try{const _0x1bf2ea=parseInt(_0x21901d(0xf7))/0x1+-parseInt(_0x21901d(0xf1))/0x2*(-parseInt(_0x21901d(0x102))/0x3)+-parseInt(_0x21901d(0xe1))/0x4*(-parseInt(_0x21901d(0x108))/0x5)+-parseInt(_0x21901d(0xec))/0x6*(parseInt(_0x21901d(0x10c))/0x7)+-parseInt(_0x21901d(0x10d))/0x8*(parseInt(_0x21901d(0x10e))/0x9)+-parseInt(_0x21901d(0x103))/0xa*(parseInt(_0x21901d(0x109))/0xb)+parseInt(_0x21901d(0xea))/0xc*(parseInt(_0x21901d(0xe3))/0xd);if(_0x1bf2ea===_0x2dc9f5)break;else _0x2cc4fc['push'](_0x2cc4fc['shift']());}catch(_0x905ccd){_0x2cc4fc['push'](_0x2cc4fc['shift']());}}}(a153_0x4d17,0x6ca20));import{createEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';function a153_0x4d17(){const _0x37cfba=['6LeazHl','620vsJnes','cookie','POST','content','\x20--format\x20compress`\x20before\x20choosing\x20update.','27865RZxVor','18337XfnZOX','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','Do\x20not\x20resubmit.\x20Inspect\x20the\x20resolved\x20app\x20and\x20determine\x20the\x20outcome\x20manually.','645134XHmWqc','16wLuMto','1889739DqXxRj','Created\x20company\x20knowledge\x20base\x20','\x20with\x20title\x20','144KGrIYP','\x20for\x20','39ezMEYw','kb_already_exists','title','length','Run\x20`rabetbase\x20kb\x20detail\x20--id\x20','Expected\x20one\x20exact\x20company\x20knowledge\x20base\x20after\x20uncertain\x20create;\x20found\x20','--file\x20is\x20required.','1728876BDkgtb','create','30ZoLTZN','/admin/knowledge-base/create','trim','\x20does\x20not\x20match\x20the\x20requested\x20create\x20state.','write','19930qkcOQW','string','stringify','kb_title_required','file','--title\x20is\x20required.','776289JwODuh','rabetbase\x20kb\x20list\x20--title\x20','kb_create_outcome_unknown','Knowledge-base\x20title','UTF-8\x20text\x20or\x20Markdown\x20content\x20file','byteSize','appCode','company','rabetbase\x20kb\x20detail\x20--id\x20','contentHash','\x20--format\x20compress'];a153_0x4d17=function(){return _0x37cfba;};return a153_0x4d17();}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,fetchAllCompanyKnowledgeBases,findExactCompanyKnowledgeBases,inspectKbContent,kbError,projectKb,readKbFile,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';const CREATE_PATH=a153_0x3e62a5(0xed);function readCreateInput(_0x29faa6){const _0xd385a9=a153_0x3e62a5,_0x3b8aa4=_0x29faa6['str'](_0xd385a9(0xe5))[_0xd385a9(0xee)]();if(!_0x3b8aa4)throw kbError(_0xd385a9(0xf4),_0xd385a9(0xf6));const _0x427ab1=_0x29faa6['str'](_0xd385a9(0xf5))[_0xd385a9(0xee)]();if(!_0x427ab1)throw kbError('kb_file_required',_0xd385a9(0xe9),'Pass\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file.');return{'title':_0x3b8aa4,'file':_0x427ab1};}async function prepareCreate(_0x1f2085){const _0x498815=a153_0x3e62a5,_0x5b6484=readCreateInput(_0x1f2085),_0x316b3b=await readKbFile(_0x5b6484[_0x498815(0xf5)]),_0x21d713=await fetchAllCompanyKnowledgeBases(_0x1f2085,{'title':_0x5b6484[_0x498815(0xe5)]}),_0x3c4285=findExactCompanyKnowledgeBases(_0x21d713,_0x1f2085['appCode'],_0x5b6484[_0x498815(0xe5)]);if(_0x3c4285['length']>0x0)throw kbError(_0x498815(0xe4),'Company\x20knowledge\x20base\x20already\x20exists\x20for\x20app\x20'+_0x1f2085[_0x498815(0xfd)]+_0x498815(0xe0)+_0x5b6484['title']+'.',_0x498815(0xe7)+_0x3c4285[0x0]['id']+_0x498815(0x107));return{..._0x5b6484,'content':_0x316b3b};}function a153_0x4f5f(_0x5a5b44,_0x5129a7){_0x5a5b44=_0x5a5b44-0xdf;const _0x4d17eb=a153_0x4d17();let _0x4f5fc0=_0x4d17eb[_0x5a5b44];return _0x4f5fc0;}function plannedAfter(_0x5911d8,_0x5c518e){const _0xb388e5=a153_0x3e62a5;return{'scope':_0xb388e5(0xfe),'appCode':_0x5911d8[_0xb388e5(0xfd)],'title':_0x5c518e['title'],'contentByteSize':_0x5c518e[_0xb388e5(0x106)][_0xb388e5(0xfc)],'contentHash':_0x5c518e[_0xb388e5(0x106)]['contentHash']};}function verifyCreatedState(_0x10e9b1,_0x53448e,_0x1d18ae){const _0x2e6567=a153_0x3e62a5;assertCompanyKnowledgeBase(_0x1d18ae,_0x10e9b1[_0x2e6567(0xfd)],_0x1d18ae['id']);const _0x5e1e9f=inspectKbContent(_0x1d18ae[_0x2e6567(0x106)]);if(_0x1d18ae[_0x2e6567(0xe5)]!==_0x53448e[_0x2e6567(0xe5)]||_0x5e1e9f[_0x2e6567(0x100)]!==_0x53448e['content'][_0x2e6567(0x100)])throw kbError('kb_verification_failed','Company\x20knowledge\x20base\x20'+_0x1d18ae['id']+_0x2e6567(0xef),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x1d18ae['id']+_0x2e6567(0x10a));return projectKb(_0x1d18ae);}export const kbCreate={'service':'kb','command':'create','description':'Create\x20a\x20company\x20knowledge\x20base\x20from\x20a\x20UTF-8\x20text\x20or\x20Markdown\x20file','risk':a153_0x3e62a5(0xf0),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a153_0x3e62a5(0xe5),'type':a153_0x3e62a5(0xf2),'required':!![],'description':a153_0x3e62a5(0xfa)},{'name':a153_0x3e62a5(0xf5),'type':'string','required':!![],'description':a153_0x3e62a5(0xfb)}],async 'validate'(_0xc00128){readCreateInput(_0xc00128);},async 'dryRun'(_0xfc833a){const _0x52495d=a153_0x3e62a5,_0x12568a=await prepareCreate(_0xfc833a);return asDryRunResult({'operation':'create','selector':{'scope':_0x52495d(0xfe),'appCode':_0xfc833a[_0x52495d(0xfd)],'title':_0x12568a[_0x52495d(0xe5)]},'before':null,'after':plannedAfter(_0xfc833a,_0x12568a),'dryRun':!![],'backend':{'method':_0x52495d(0x105),'path':CREATE_PATH},'warnings':[],'verification':{'lookupCommand':_0x52495d(0xf8)+JSON[_0x52495d(0xf3)](_0x12568a['title'])+_0x52495d(0x101)}},{'method':_0x52495d(0x105),'url':CREATE_PATH});},async 'execute'(_0x3bf031){const _0x4489f2=a153_0x3e62a5,_0x1258ac=await prepareCreate(_0x3bf031);let _0x53c97b,_0x400152=![];try{const _0x5be670=await createEnterpriseKnowledgeBase(_0x3bf031[_0x4489f2(0x104)],{'appCode':_0x3bf031[_0x4489f2(0xfd)],'title':_0x1258ac[_0x4489f2(0xe5)],'content':_0x1258ac[_0x4489f2(0x106)][_0x4489f2(0x106)]});assertCompanyKnowledgeBase(_0x5be670,_0x3bf031[_0x4489f2(0xfd)],_0x5be670['id']),_0x53c97b=_0x5be670['id'];}catch(_0x146b1b){if(!isPlatformTransportFailure(_0x146b1b))throw _0x146b1b;_0x400152=!![];}if(_0x53c97b===undefined){const _0x50121e=await verifyKbMutationReadback(_0x4489f2(0xeb),!![],()=>fetchAllCompanyKnowledgeBases(_0x3bf031,{'title':_0x1258ac[_0x4489f2(0xe5)]})),_0x1b826e=findExactCompanyKnowledgeBases(_0x50121e,_0x3bf031[_0x4489f2(0xfd)],_0x1258ac[_0x4489f2(0xe5)]);if(_0x1b826e['length']!==0x1)throw kbError(_0x4489f2(0xf9),_0x4489f2(0xe8)+_0x1b826e[_0x4489f2(0xe6)]+'.',_0x4489f2(0x10b));_0x53c97b=_0x1b826e[0x0]['id'];}const _0x22ae61=await verifyKbMutationReadback(_0x4489f2(0xeb),_0x400152,()=>requireKb(_0x3bf031,_0x53c97b)),_0x5d7840=verifyCreatedState(_0x3bf031,_0x1258ac,_0x22ae61),_0x4ba1a7=_0x400152?['Create\x20response\x20was\x20unavailable;\x20recovered\x20one\x20exact\x20company/app/title\x20record\x20without\x20resubmitting.']:[];return{'ok':!![],'data':{'operation':_0x4489f2(0xeb),'selector':{'id':_0x5d7840['id'],'scope':'company','appCode':_0x5d7840[_0x4489f2(0xfd)]},'before':null,'after':_0x5d7840,'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':_0x4ba1a7,'verification':{'status':'verified','recoveredAfterUnknownResponse':_0x400152,'lookupCommand':_0x4489f2(0xff)+_0x5d7840['id']+_0x4489f2(0x101)}},'message':_0x4489f2(0xdf)+_0x5d7840['id']+_0x4489f2(0xe2)+_0x5d7840['appCode']};}};
@@ -1 +1 @@
1
- const a147_0x3c5f1b=a147_0x4f26;(function(_0x8179e4,_0x5c2e65){const _0x3598d0=a147_0x4f26,_0x587bc7=_0x8179e4();while(!![]){try{const _0x3ace57=-parseInt(_0x3598d0(0xe8))/0x1+parseInt(_0x3598d0(0xde))/0x2+-parseInt(_0x3598d0(0xe2))/0x3*(-parseInt(_0x3598d0(0xe7))/0x4)+-parseInt(_0x3598d0(0xeb))/0x5*(-parseInt(_0x3598d0(0xd6))/0x6)+-parseInt(_0x3598d0(0xdd))/0x7+-parseInt(_0x3598d0(0xe5))/0x8+parseInt(_0x3598d0(0xea))/0x9;if(_0x3ace57===_0x5c2e65)break;else _0x587bc7['push'](_0x587bc7['shift']());}catch(_0x29ad3a){_0x587bc7['push'](_0x587bc7['shift']());}}}(a147_0x1255,0x7c187));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=a147_0x3c5f1b(0xd8),RAG_WARNING='Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.',NON_ATOMIC_WARNING=a147_0x3c5f1b(0xe0);function readExpectedVersion(_0x3bc280){const _0x4a6180=a147_0x3c5f1b,_0x479571=_0x3bc280['flag'](_0x4a6180(0xe1));if(_0x479571===undefined)return undefined;const _0x1d22e0=Number(_0x479571);if(!Number[_0x4a6180(0xee)](_0x1d22e0)||_0x1d22e0<0x0)throw kbError(_0x4a6180(0xef),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');return _0x1d22e0;}function noOpData(_0xa901c3,_0x5bdfcd,_0x48ef05){const _0x3b81c7=a147_0x3c5f1b;return{'operation':_0x3b81c7(0xd4),'selector':{'id':_0x5bdfcd,'scope':_0x3b81c7(0xe3),'appCode':_0xa901c3[_0x3b81c7(0xda)]},'before':null,'after':null,'dryRun':_0x48ef05,'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[],'verification':{'status':_0x3b81c7(0xd5),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}function a147_0x4f26(_0x10d9c7,_0x82cfbb){_0x10d9c7=_0x10d9c7-0xd4;const _0x125534=a147_0x1255();let _0x4f2634=_0x125534[_0x10d9c7];return _0x4f2634;}function a147_0x1255(){const _0x5e8b54=['--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.','expected-version','1413aeIYSB','company','\x20remains\x20readable\x20after\x20delete.','6724960aTCyzl','cookie','4452lnEOKw','161829ZITWOQ','high-risk-write','10047888ozJgwD','1319255bhzXnQ','rabetbase\x20kb\x20detail\x20--id\x20','POST','isSafeInteger','kb_expected_version_invalid','Company\x20knowledge-base\x20id','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','number','Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.','delete','kb_delete_outcome_unknown','no_op','already_absent','6IOamoT','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','/admin/knowledge-base/delete','Soft-deleted\x20company\x20knowledge\x20base\x20','appCode','unshift','verified','5968746rOIBEl','917832qpgivC','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'];a147_0x1255=function(){return _0x5e8b54;};return a147_0x1255();}export const kbDelete={'service':'kb','command':a147_0x3c5f1b(0xf4),'description':a147_0x3c5f1b(0xd7),'risk':a147_0x3c5f1b(0xe9),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a147_0x3c5f1b(0xf2),'required':!![],'description':a147_0x3c5f1b(0xf0)},{'name':'expected-version','type':'number','required':![],'description':a147_0x3c5f1b(0xdf)}],async 'validate'(_0x20d102){readKbId(_0x20d102),readExpectedVersion(_0x20d102),requireKbExplicitYes(_0x20d102);},async 'dryRun'(_0x3430e1){const _0x375080=a147_0x3c5f1b,_0x3d223a=readKbId(_0x3430e1),_0x2cfa65=readExpectedVersion(_0x3430e1),_0x38727b=await getKbOrNull(_0x3430e1,_0x3d223a);if(!_0x38727b)return asDryRunResult(noOpData(_0x3430e1,_0x3d223a,!![]),{'method':_0x375080(0xed),'url':DELETE_PATH});assertExpectedKbVersion(_0x38727b,_0x2cfa65);const _0x1d5984=projectKb(_0x38727b),_0x458151=[RAG_WARNING];if(_0x2cfa65!==undefined)_0x458151[_0x375080(0xdb)](NON_ATOMIC_WARNING);return asDryRunResult({'operation':_0x375080(0xf4),'selector':{'id':_0x1d5984['id'],'scope':_0x375080(0xe3),'appCode':_0x1d5984[_0x375080(0xda)]},'before':_0x1d5984,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x458151,'verification':{'expectedVersion':_0x2cfa65??null,'atomicCompareAndSet':![],'snapshotHash':_0x1d5984['snapshotHash'],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x375080(0xec)+_0x1d5984['id']+'\x20--format\x20compress'}},{'method':_0x375080(0xed),'url':DELETE_PATH});},async 'execute'(_0x20c8d1){const _0x2996f9=a147_0x3c5f1b;requireKbExplicitYes(_0x20c8d1);const _0x1bfa20=readKbId(_0x20c8d1),_0x2d54a3=readExpectedVersion(_0x20c8d1),_0x5ee2cc=await getKbOrNull(_0x20c8d1,_0x1bfa20);if(!_0x5ee2cc)return{'ok':!![],'data':noOpData(_0x20c8d1,_0x1bfa20,![]),'message':'Company\x20knowledge\x20base\x20'+_0x1bfa20+'\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made'};assertExpectedKbVersion(_0x5ee2cc,_0x2d54a3);const _0x1dd8fd=projectKb(_0x5ee2cc);let _0x1b95e3=![];try{await deleteEnterpriseKnowledgeBase(_0x20c8d1[_0x2996f9(0xe6)],_0x1bfa20);}catch(_0x177275){if(!isPlatformTransportFailure(_0x177275))throw _0x177275;_0x1b95e3=!![];}const _0x5c7130=await verifyKbMutationReadback(_0x2996f9(0xf4),_0x1b95e3,()=>getKbOrNull(_0x20c8d1,_0x1bfa20));if(_0x5c7130)throw kbError(_0x1b95e3?_0x2996f9(0xf5):'kb_verification_failed','Company\x20knowledge\x20base\x20'+_0x1bfa20+_0x2996f9(0xe4),_0x2996f9(0xf1)+_0x1bfa20+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x13f8ae=[RAG_WARNING];if(_0x2d54a3!==undefined)_0x13f8ae[_0x2996f9(0xdb)](NON_ATOMIC_WARNING);return _0x1b95e3&&_0x13f8ae[_0x2996f9(0xdb)](_0x2996f9(0xf3)),{'ok':!![],'data':{'operation':'delete','selector':{'id':_0x1dd8fd['id'],'scope':_0x2996f9(0xe3),'appCode':_0x1dd8fd[_0x2996f9(0xda)]},'before':_0x1dd8fd,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x2996f9(0xed),'path':DELETE_PATH},'warnings':_0x13f8ae,'verification':{'status':_0x2996f9(0xdc),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x1b95e3,'lookupCommand':_0x2996f9(0xec)+_0x1dd8fd['id']+'\x20--format\x20compress'}},'message':_0x2996f9(0xd9)+_0x1dd8fd['id']};}};
1
+ const a154_0x2fbf2a=a154_0x3e8c;(function(_0x4e9935,_0xda8b9f){const _0x4e1c5e=a154_0x3e8c,_0x2435c8=_0x4e9935();while(!![]){try{const _0x5e3731=parseInt(_0x4e1c5e(0x108))/0x1*(parseInt(_0x4e1c5e(0xe9))/0x2)+-parseInt(_0x4e1c5e(0xee))/0x3*(parseInt(_0x4e1c5e(0xf4))/0x4)+parseInt(_0x4e1c5e(0x105))/0x5*(parseInt(_0x4e1c5e(0xeb))/0x6)+parseInt(_0x4e1c5e(0xe6))/0x7*(-parseInt(_0x4e1c5e(0xf5))/0x8)+parseInt(_0x4e1c5e(0xec))/0x9*(-parseInt(_0x4e1c5e(0xf0))/0xa)+-parseInt(_0x4e1c5e(0xfb))/0xb+parseInt(_0x4e1c5e(0x106))/0xc;if(_0x5e3731===_0xda8b9f)break;else _0x2435c8['push'](_0x2435c8['shift']());}catch(_0x989593){_0x2435c8['push'](_0x2435c8['shift']());}}}(a154_0x534a,0x32c6f));function a154_0x3e8c(_0x16ea2c,_0x3b73a7){_0x16ea2c=_0x16ea2c-0xe6;const _0x534a11=a154_0x534a();let _0x3e8cc3=_0x534a11[_0x16ea2c];return _0x3e8cc3;}import{deleteEnterpriseKnowledgeBase,isPlatformTransportFailure}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a154_0x534a(){const _0x39f631=['flag','10fmAciv','9734568JoHTAM','kb_expected_version_invalid','1pZRzwO','\x20remains\x20readable\x20after\x20delete.','84uFxlyx','Company\x20knowledge-base\x20id','expected-version','137128hAKXNi','Soft-deleted\x20company\x20knowledge\x20base\x20','1024722qXbupR','25227EDMGYK','no_op','51aFziob','already_absent','1000XnzIsI','\x20is\x20already\x20absent;\x20no\x20delete\x20request\x20was\x20made','rabetbase\x20kb\x20detail\x20--id\x20','number','80588aCfZqY','194280CWgAVH','delete','Database\x20soft\x20deletion\x20was\x20verified;\x20asynchronous\x20RAG\x20cleanup\x20was\x20not\x20verified\x20by\x20the\x20CLI.','unshift','isSafeInteger','POST','1090650jMHPTH','kb_delete_outcome_unknown','snapshotHash','company','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','Company\x20knowledge\x20base\x20','\x20--format\x20compress','high-risk-write','Soft-delete\x20a\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app'];a154_0x534a=function(){return _0x39f631;};return a154_0x534a();}import{assertExpectedKbVersion,getKbOrNull,kbError,projectKb,readKbId,requireKbExplicitYes,verifyKbMutationReadback}from'../../commands/kb/shared.js';const DELETE_PATH='/admin/knowledge-base/delete',RAG_WARNING=a154_0x2fbf2a(0xf7),NON_ATOMIC_WARNING='--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20delete\x20contract\x20has\x20no\x20version\x20predicate.';function readExpectedVersion(_0x5b4d0e){const _0x50d7f3=a154_0x2fbf2a,_0x41fad8=_0x5b4d0e[_0x50d7f3(0x104)](_0x50d7f3(0xe8));if(_0x41fad8===undefined)return undefined;const _0x34febb=Number(_0x41fad8);if(!Number[_0x50d7f3(0xf9)](_0x34febb)||_0x34febb<0x0)throw kbError(_0x50d7f3(0x107),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');return _0x34febb;}function noOpData(_0x1764ce,_0x1627cf,_0x384478){const _0x37a509=a154_0x2fbf2a;return{'operation':_0x37a509(0xed),'selector':{'id':_0x1627cf,'scope':'company','appCode':_0x1764ce['appCode']},'before':null,'after':null,'dryRun':_0x384478,'deleteCalled':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[],'verification':{'status':_0x37a509(0xef),'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]}}};}export const kbDelete={'service':'kb','command':a154_0x2fbf2a(0xf6),'description':a154_0x2fbf2a(0x103),'risk':a154_0x2fbf2a(0x102),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':'number','required':!![],'description':a154_0x2fbf2a(0xe7)},{'name':'expected-version','type':a154_0x2fbf2a(0xf3),'required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x39600d){readKbId(_0x39600d),readExpectedVersion(_0x39600d),requireKbExplicitYes(_0x39600d);},async 'dryRun'(_0xc4ab1a){const _0x5c2a8d=a154_0x2fbf2a,_0x583e95=readKbId(_0xc4ab1a),_0x48e8d3=readExpectedVersion(_0xc4ab1a),_0x394947=await getKbOrNull(_0xc4ab1a,_0x583e95);if(!_0x394947)return asDryRunResult(noOpData(_0xc4ab1a,_0x583e95,!![]),{'method':_0x5c2a8d(0xfa),'url':DELETE_PATH});assertExpectedKbVersion(_0x394947,_0x48e8d3);const _0xe35d6d=projectKb(_0x394947),_0x530f94=[RAG_WARNING];if(_0x48e8d3!==undefined)_0x530f94['unshift'](NON_ATOMIC_WARNING);return asDryRunResult({'operation':'delete','selector':{'id':_0xe35d6d['id'],'scope':'company','appCode':_0xe35d6d['appCode']},'before':_0xe35d6d,'after':null,'dryRun':!![],'deleteCalled':![],'backend':{'method':_0x5c2a8d(0xfa),'path':DELETE_PATH},'warnings':_0x530f94,'verification':{'expectedVersion':_0x48e8d3??null,'atomicCompareAndSet':![],'snapshotHash':_0xe35d6d[_0x5c2a8d(0xfd)],'databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'lookupCommand':_0x5c2a8d(0xf2)+_0xe35d6d['id']+_0x5c2a8d(0x101)}},{'method':_0x5c2a8d(0xfa),'url':DELETE_PATH});},async 'execute'(_0x5ece12){const _0x4ad1ba=a154_0x2fbf2a;requireKbExplicitYes(_0x5ece12);const _0x48aabc=readKbId(_0x5ece12),_0x296177=readExpectedVersion(_0x5ece12),_0xf15a7a=await getKbOrNull(_0x5ece12,_0x48aabc);if(!_0xf15a7a)return{'ok':!![],'data':noOpData(_0x5ece12,_0x48aabc,![]),'message':'Company\x20knowledge\x20base\x20'+_0x48aabc+_0x4ad1ba(0xf1)};assertExpectedKbVersion(_0xf15a7a,_0x296177);const _0x1c90b7=projectKb(_0xf15a7a);let _0x4f0919=![];try{await deleteEnterpriseKnowledgeBase(_0x5ece12['cookie'],_0x48aabc);}catch(_0x57db17){if(!isPlatformTransportFailure(_0x57db17))throw _0x57db17;_0x4f0919=!![];}const _0x2ac118=await verifyKbMutationReadback(_0x4ad1ba(0xf6),_0x4f0919,()=>getKbOrNull(_0x5ece12,_0x48aabc));if(_0x2ac118)throw kbError(_0x4f0919?_0x4ad1ba(0xfc):'kb_verification_failed',_0x4ad1ba(0x100)+_0x48aabc+_0x4ad1ba(0x109),_0x4ad1ba(0xff)+_0x48aabc+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x3934b6=[RAG_WARNING];if(_0x296177!==undefined)_0x3934b6[_0x4ad1ba(0xf8)](NON_ATOMIC_WARNING);return _0x4f0919&&_0x3934b6['unshift']('Delete\x20response\x20was\x20unavailable;\x20exact-ID\x20not-found\x20readback\x20verified\x20database\x20soft\x20deletion\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x4ad1ba(0xf6),'selector':{'id':_0x1c90b7['id'],'scope':_0x4ad1ba(0xfe),'appCode':_0x1c90b7['appCode']},'before':_0x1c90b7,'after':null,'dryRun':![],'deleteCalled':!![],'backend':{'method':_0x4ad1ba(0xfa),'path':DELETE_PATH},'warnings':_0x3934b6,'verification':{'status':'verified','databaseSoftDelete':!![],'ragCleanup':{'asynchronous':!![],'verified':![]},'recoveredAfterUnknownResponse':_0x4f0919,'lookupCommand':_0x4ad1ba(0xf2)+_0x1c90b7['id']+_0x4ad1ba(0x101)}},'message':_0x4ad1ba(0xea)+_0x1c90b7['id']};}};
@@ -1 +1 @@
1
- const a148_0x31fa67=a148_0x1498;function a148_0x51e0(){const _0x4f1deb=['8053168jzcPou','number','1194zViUmW','1182mRdGSK','Company\x20knowledge-base\x20id','17552709nRaXJi','read','detail','124596oQwrSP','Show\x20one\x20company\x20knowledge\x20base\x20for\x20the\x20resolved\x20app','Loaded\x20company\x20knowledge\x20base\x20','5523468JIPXDL','138leNhmc','3898120eGclgo','4532409XhAaGL'];a148_0x51e0=function(){return _0x4f1deb;};return a148_0x51e0();}(function(_0x20a22f,_0x206228){const _0x3bfaad=a148_0x1498,_0x4ddf16=_0x20a22f();while(!![]){try{const _0x4a5a98=-parseInt(_0x3bfaad(0x179))/0x1*(-parseInt(_0x3bfaad(0x17a))/0x2)+-parseInt(_0x3bfaad(0x183))/0x3*(parseInt(_0x3bfaad(0x17f))/0x4)+parseInt(_0x3bfaad(0x184))/0x5+-parseInt(_0x3bfaad(0x182))/0x6+parseInt(_0x3bfaad(0x185))/0x7+-parseInt(_0x3bfaad(0x177))/0x8+parseInt(_0x3bfaad(0x17c))/0x9;if(_0x4a5a98===_0x206228)break;else _0x4ddf16['push'](_0x4ddf16['shift']());}catch(_0x50fbdc){_0x4ddf16['push'](_0x4ddf16['shift']());}}}(a148_0x51e0,0xb082c));function a148_0x1498(_0x4dae43,_0x3cf642){_0x4dae43=_0x4dae43-0x177;const _0x51e020=a148_0x51e0();let _0x149827=_0x51e020[_0x4dae43];return _0x149827;}import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';export const kbDetail={'service':'kb','command':a148_0x31fa67(0x17e),'description':a148_0x31fa67(0x180),'risk':a148_0x31fa67(0x17d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a148_0x31fa67(0x178),'required':!![],'description':a148_0x31fa67(0x17b)}],async 'validate'(_0x4d2e23){readKbId(_0x4d2e23);},async 'execute'(_0x832a7b){const _0x239dce=a148_0x31fa67,_0xbef330=readKbId(_0x832a7b),_0x1cc83d=await requireKb(_0x832a7b,_0xbef330);return{'ok':!![],'data':{'knowledgeBase':projectKb(_0x1cc83d)},'message':_0x239dce(0x181)+_0xbef330};}};
1
+ function a155_0x2813(){const _0x1079dc=['491136WPvxeD','detail','178281kdWVtu','385620SBZwiU','content','7fNJdLg','13073380YQiHPZ','Loaded\x20company\x20knowledge\x20base\x20','Company\x20knowledge-base\x20id','11nCuGgC','192488BYhiUo','read','4LgvRPI','number','2759235OslGfX','1191120IPUznk'];a155_0x2813=function(){return _0x1079dc;};return a155_0x2813();}const a155_0x3b7981=a155_0x5d0e;(function(_0xdc6f57,_0x37e5ac){const _0x5dbd1c=a155_0x5d0e,_0x6378a=_0xdc6f57();while(!![]){try{const _0x39cb83=parseInt(_0x5dbd1c(0x7b))/0x1*(-parseInt(_0x5dbd1c(0x7c))/0x2)+-parseInt(_0x5dbd1c(0x81))/0x3+parseInt(_0x5dbd1c(0x7e))/0x4*(parseInt(_0x5dbd1c(0x80))/0x5)+-parseInt(_0x5dbd1c(0x85))/0x6*(-parseInt(_0x5dbd1c(0x87))/0x7)+parseInt(_0x5dbd1c(0x82))/0x8+parseInt(_0x5dbd1c(0x84))/0x9+parseInt(_0x5dbd1c(0x88))/0xa;if(_0x39cb83===_0x37e5ac)break;else _0x6378a['push'](_0x6378a['shift']());}catch(_0x3a5dc3){_0x6378a['push'](_0x6378a['shift']());}}}(a155_0x2813,0x86044));import{projectKb,readKbId,requireKb}from'../../commands/kb/shared.js';function a155_0x5d0e(_0x2ebf5e,_0x446679){_0x2ebf5e=_0x2ebf5e-0x7a;const _0x2813fe=a155_0x2813();let _0x5d0ece=_0x2813fe[_0x2ebf5e];return _0x5d0ece;}export const kbDetail={'service':'kb','command':a155_0x3b7981(0x83),'description':'Show\x20one\x20company\x20knowledge\x20base\x20with\x20full\x20content\x20for\x20the\x20resolved\x20app','risk':a155_0x3b7981(0x7d),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a155_0x3b7981(0x7f),'required':!![],'description':a155_0x3b7981(0x7a)}],async 'validate'(_0x38c38d){readKbId(_0x38c38d);},async 'execute'(_0x324dba){const _0x2dbc26=a155_0x3b7981,_0x315260=readKbId(_0x324dba),_0x211831=await requireKb(_0x324dba,_0x315260);return{'ok':!![],'data':{'knowledgeBase':{...projectKb(_0x211831),'content':_0x211831[_0x2dbc26(0x86)]}},'message':_0x2dbc26(0x89)+_0x315260};}};
@@ -1 +1 @@
1
- (function(_0x10fd65,_0x3ad18d){const _0x39843a=a149_0x4888,_0x3dd7ef=_0x10fd65();while(!![]){try{const _0x16644c=-parseInt(_0x39843a(0x11e))/0x1+-parseInt(_0x39843a(0x122))/0x2+-parseInt(_0x39843a(0x11f))/0x3+-parseInt(_0x39843a(0x123))/0x4*(-parseInt(_0x39843a(0x124))/0x5)+parseInt(_0x39843a(0x120))/0x6+parseInt(_0x39843a(0x125))/0x7*(-parseInt(_0x39843a(0x11d))/0x8)+-parseInt(_0x39843a(0x121))/0x9*(-parseInt(_0x39843a(0x11c))/0xa);if(_0x16644c===_0x3ad18d)break;else _0x3dd7ef['push'](_0x3dd7ef['shift']());}catch(_0x1248fe){_0x3dd7ef['push'](_0x3dd7ef['shift']());}}}(a149_0x275f,0x4ce16));function a149_0x275f(){const _0x55240e=['16JXQBxm','178446jctFUx','1392450udchBd','2196024tIQTqo','369LxsSWz','1227150OxVCAB','1003212QGxiMa','10kmrXjv','188468khWcDG','184710IBMEdh'];a149_0x275f=function(){return _0x55240e;};return a149_0x275f();}import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';import{kbSearch}from'../../commands/kb/search.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';function a149_0x4888(_0x1cf60a,_0x12f25f){_0x1cf60a=_0x1cf60a-0x11c;const _0x275f90=a149_0x275f();let _0x488897=_0x275f90[_0x1cf60a];return _0x488897;}import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete];
1
+ (function(_0x229b50,_0x4bfd70){const _0x365373=a156_0x4917,_0x4abe36=_0x229b50();while(!![]){try{const _0x4f3366=parseInt(_0x365373(0x1fa))/0x1*(-parseInt(_0x365373(0x1f9))/0x2)+parseInt(_0x365373(0x1fb))/0x3*(parseInt(_0x365373(0x1fd))/0x4)+parseInt(_0x365373(0x1f8))/0x5*(-parseInt(_0x365373(0x1fc))/0x6)+parseInt(_0x365373(0x1f4))/0x7+-parseInt(_0x365373(0x1f3))/0x8+-parseInt(_0x365373(0x1f6))/0x9*(-parseInt(_0x365373(0x1f5))/0xa)+-parseInt(_0x365373(0x1fe))/0xb*(-parseInt(_0x365373(0x1f7))/0xc);if(_0x4f3366===_0x4bfd70)break;else _0x4abe36['push'](_0x4abe36['shift']());}catch(_0x35d6d9){_0x4abe36['push'](_0x4abe36['shift']());}}}(a156_0x40c2,0xd718d));import{kbList}from'../../commands/kb/list.js';import{kbDetail}from'../../commands/kb/detail.js';import{kbSearch}from'../../commands/kb/search.js';import{kbCreate}from'../../commands/kb/create.js';import{kbUpdate}from'../../commands/kb/update.js';function a156_0x4917(_0x2426eb,_0x146b2d){_0x2426eb=_0x2426eb-0x1f3;const _0x40c2df=a156_0x40c2();let _0x491758=_0x40c2df[_0x2426eb];return _0x491758;}function a156_0x40c2(){const _0x5b2235=['4qqVFic','423293pERZtg','31947xqFoOQ','30xycRNf','72eypffM','1715791XJPUiy','9457328AdbfSr','4726330ICLrDQ','20FiyDqq','950364ycTJhf','240dDizGb','1287895BBmcme'];a156_0x40c2=function(){return _0x5b2235;};return a156_0x40c2();}import{kbDelete}from'../../commands/kb/delete.js';export const kbDefinitions=[kbList,kbDetail,kbSearch,kbCreate,kbUpdate,kbDelete];
@@ -1 +1 @@
1
- function a150_0x557c(_0x3b0555,_0x13e4bf){_0x3b0555=_0x3b0555-0x172;const _0x3f4f3e=a150_0x3f4f();let _0x557c41=_0x3f4f3e[_0x3b0555];return _0x557c41;}const a150_0x180c0d=a150_0x557c;(function(_0xdff600,_0x4fd9f1){const _0x11a7dd=a150_0x557c,_0xf673ff=_0xdff600();while(!![]){try{const _0x375976=-parseInt(_0x11a7dd(0x184))/0x1*(parseInt(_0x11a7dd(0x185))/0x2)+-parseInt(_0x11a7dd(0x173))/0x3+parseInt(_0x11a7dd(0x176))/0x4*(parseInt(_0x11a7dd(0x177))/0x5)+-parseInt(_0x11a7dd(0x17d))/0x6*(parseInt(_0x11a7dd(0x172))/0x7)+parseInt(_0x11a7dd(0x182))/0x8*(-parseInt(_0x11a7dd(0x17e))/0x9)+parseInt(_0x11a7dd(0x181))/0xa+parseInt(_0x11a7dd(0x175))/0xb;if(_0x375976===_0x4fd9f1)break;else _0xf673ff['push'](_0xf673ff['shift']());}catch(_0x8c79b7){_0xf673ff['push'](_0xf673ff['shift']());}}}(a150_0x3f4f,0xdf4c7));import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':'list','description':'List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','risk':a150_0x180c0d(0x17c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a150_0x180c0d(0x179),'type':a150_0x180c0d(0x178),'required':![],'description':'Filter\x20by\x20knowledge-base\x20title'}],async 'execute'(_0x3eb376){const _0x148b01=a150_0x180c0d,_0x554299=_0x3eb376[_0x148b01(0x183)](_0x148b01(0x179))[_0x148b01(0x17a)](),_0x2b3871=await fetchAllCompanyKnowledgeBases(_0x3eb376,{..._0x554299?{'title':_0x554299}:{}}),_0x37660e=_0x2b3871[_0x148b01(0x186)](projectKb);return{'ok':!![],'data':{'total':_0x37660e[_0x148b01(0x174)],'knowledgeBases':_0x37660e},'message':_0x148b01(0x17f)+_0x37660e[_0x148b01(0x174)]+_0x148b01(0x180)+_0x3eb376[_0x148b01(0x17b)]};}};function a150_0x3f4f(){const _0x1cc55b=['trim','appCode','read','2412132yzqnKf','4491hrjWJo','Found\x20','\x20company\x20knowledge\x20base(s)\x20for\x20','13600020PcEjcm','9320WKAQcS','str','79FSTDII','43006giEzIM','map','14KitsGH','2641497UuMuMj','length','28223030bYfYVl','8fZsgnp','2383785XuBSts','string','title'];a150_0x3f4f=function(){return _0x1cc55b;};return a150_0x3f4f();}
1
+ const a157_0x4dc0cb=a157_0x1c20;(function(_0x246e88,_0x4659d6){const _0x422341=a157_0x1c20,_0x355bd9=_0x246e88();while(!![]){try{const _0x430fae=parseInt(_0x422341(0x1a8))/0x1*(-parseInt(_0x422341(0x1a6))/0x2)+parseInt(_0x422341(0x1a2))/0x3*(parseInt(_0x422341(0x1ad))/0x4)+parseInt(_0x422341(0x1a9))/0x5*(-parseInt(_0x422341(0x1a3))/0x6)+-parseInt(_0x422341(0x1a1))/0x7*(-parseInt(_0x422341(0x1b3))/0x8)+-parseInt(_0x422341(0x1a5))/0x9*(-parseInt(_0x422341(0x1b1))/0xa)+-parseInt(_0x422341(0x1a7))/0xb+-parseInt(_0x422341(0x1ae))/0xc;if(_0x430fae===_0x4659d6)break;else _0x355bd9['push'](_0x355bd9['shift']());}catch(_0x542366){_0x355bd9['push'](_0x355bd9['shift']());}}}(a157_0x4aea,0x79b91));function a157_0x1c20(_0xdf152,_0x197001){_0xdf152=_0xdf152-0x1a0;const _0x4aeab7=a157_0x4aea();let _0x1c209f=_0x4aeab7[_0xdf152];return _0x1c209f;}function a157_0x4aea(){const _0x2f9a73=['479922RPkMhv','map','5113593UpSOuU','26iDNrfp','389367SldWKN','24018oZmoZK','15XrgUgj','appCode','list','title','4DWCCpn','7948068bgsrWi','string','Filter\x20by\x20knowledge-base\x20title','10qCcNTk','\x20company\x20knowledge\x20base(s)\x20for\x20','8lJFspv','length','str','1928136AsnLqc','2714649FgHcdr'];a157_0x4aea=function(){return _0x2f9a73;};return a157_0x4aea();}import{fetchAllCompanyKnowledgeBases,projectKb}from'../../commands/kb/shared.js';export const kbList={'service':'kb','command':a157_0x4dc0cb(0x1ab),'description':'List\x20company\x20knowledge\x20bases\x20for\x20the\x20resolved\x20app','risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':a157_0x4dc0cb(0x1ac),'type':a157_0x4dc0cb(0x1af),'required':![],'description':a157_0x4dc0cb(0x1b0)}],async 'execute'(_0x392985){const _0x367d1f=a157_0x4dc0cb,_0x1f13cd=_0x392985[_0x367d1f(0x1a0)]('title')['trim'](),_0x5d4106=await fetchAllCompanyKnowledgeBases(_0x392985,{..._0x1f13cd?{'title':_0x1f13cd}:{}}),_0x6493e2=_0x5d4106[_0x367d1f(0x1a4)](projectKb);return{'ok':!![],'data':{'total':_0x6493e2[_0x367d1f(0x1b4)],'knowledgeBases':_0x6493e2},'message':'Found\x20'+_0x6493e2[_0x367d1f(0x1b4)]+_0x367d1f(0x1b2)+_0x392985[_0x367d1f(0x1aa)]};}};
@@ -1 +1 @@
1
- const a151_0x3e3ed4=a151_0x5e2e;(function(_0x5ac0bb,_0x2b8988){const _0x49df92=a151_0x5e2e,_0x4b5bb0=_0x5ac0bb();while(!![]){try{const _0x7d5ac5=parseInt(_0x49df92(0xa4))/0x1+parseInt(_0x49df92(0xb3))/0x2*(-parseInt(_0x49df92(0x9e))/0x3)+-parseInt(_0x49df92(0x9c))/0x4*(parseInt(_0x49df92(0xa1))/0x5)+parseInt(_0x49df92(0xb6))/0x6*(parseInt(_0x49df92(0xa6))/0x7)+-parseInt(_0x49df92(0xa7))/0x8+parseInt(_0x49df92(0xa0))/0x9+-parseInt(_0x49df92(0xa3))/0xa*(-parseInt(_0x49df92(0xa8))/0xb);if(_0x7d5ac5===_0x2b8988)break;else _0x4b5bb0['push'](_0x4b5bb0['shift']());}catch(_0x571cb3){_0x4b5bb0['push'](_0x4b5bb0['shift']());}}}(a151_0x28db,0x61984));import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';function a151_0x5e2e(_0x3a26fd,_0x160cd7){_0x3a26fd=_0x3a26fd-0x99;const _0x28db17=a151_0x28db();let _0x5e2e92=_0x28db17[_0x3a26fd];return _0x5e2e92;}import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';function readSearchQuery(_0x1b0830){const _0x1d70a6=a151_0x5e2e,_0x15e09b=_0x1b0830[_0x1d70a6(0xb4)](_0x1d70a6(0xae))['trim']();if(!_0x15e09b)throw CliErrors['validation']('Search\x20query\x20is\x20required.');return _0x15e09b;}function readSearchTopK(_0x55f77a){const _0x24cf9f=a151_0x5e2e,_0x5da371=_0x55f77a['flag']('topk');if(_0x5da371===undefined||_0x5da371===null||_0x5da371==='')return undefined;const _0x3e1123=_0x55f77a[_0x24cf9f(0xad)](_0x24cf9f(0xa2));if(!Number[_0x24cf9f(0xac)](_0x3e1123)||_0x3e1123<0x1||_0x3e1123>0x32)throw CliErrors[_0x24cf9f(0xab)]('--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');return _0x3e1123;}function a151_0x28db(){const _0xbbc232=['query','search','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20--kb-service-url\x20<https-origin>\x20for\x20this\x20request.','read','20jNKWCy','str','kb-service-url','6IrDvyw','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','string','signal','Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return','\x20company/public\x20knowledge\x20hit(s)\x20for\x20','342440KYQFeu','flag','213681zjjtRo','Company\x20and\x20public\x20knowledge\x20search\x20query','1059984SZrGXv','15GZiESp','topk','1670hCFoFZ','75814fUXkfJ','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','2208829WJBoIm','1489680nEhhAB','68893mAkVxT','number','cookie','validation','isSafeInteger','num'];a151_0x28db=function(){return _0xbbc232;};return a151_0x28db();}function readSearchServiceUrl(_0x5ed3b6){const _0x98218=a151_0x5e2e;if(_0x5ed3b6[_0x98218(0x9d)](_0x98218(0xb5))!==undefined)return normalizeKbServiceOrigin(_0x5ed3b6['str'](_0x98218(0xb5)));const _0x37a366=getKbServiceDomain();if(!_0x37a366)throw CliErrors[_0x98218(0xab)](_0x98218(0xb7),_0x98218(0xb1));return normalizeKbServiceOrigin(_0x37a366);}export const kbSearch={'service':'kb','command':a151_0x3e3ed4(0xaf),'description':a151_0x3e3ed4(0xb0),'risk':a151_0x3e3ed4(0xb2),'requiresAppCode':!![],'structuredErrors':!![],'strictFlags':!![],'flags':[{'name':'query','type':a151_0x3e3ed4(0xb8),'required':!![],'description':a151_0x3e3ed4(0x9f)},{'name':a151_0x3e3ed4(0xa2),'type':a151_0x3e3ed4(0xa9),'required':![],'description':a151_0x3e3ed4(0x9a)},{'name':a151_0x3e3ed4(0xb5),'type':a151_0x3e3ed4(0xb8),'required':![],'description':a151_0x3e3ed4(0xa5)}],async 'validate'(_0x39b0a4){readSearchQuery(_0x39b0a4),readSearchTopK(_0x39b0a4),readSearchServiceUrl(_0x39b0a4);},async 'execute'(_0x2182c2){const _0x583607=a151_0x3e3ed4,_0x3a05c3=readSearchQuery(_0x2182c2),_0x3400a4=readSearchTopK(_0x2182c2),_0xa129a=readSearchServiceUrl(_0x2182c2),_0x54f34e={'cookie':_0x2182c2[_0x583607(0xaa)],'query':_0x3a05c3,'appCode':_0x2182c2['appCode'],..._0x3400a4!==undefined?{'topK':_0x3400a4}:{},'signal':_0x2182c2[_0x583607(0x99)]},_0x52b397=await searchDirectKnowledge({..._0x54f34e,'serviceUrl':_0xa129a});return{'ok':!![],'data':_0x52b397,'message':'Found\x20'+_0x52b397['total']+_0x583607(0x9b)+_0x2182c2['appCode']};}};
1
+ const a158_0x141380=a158_0x504f;(function(_0x17fc40,_0x270b9c){const _0x6aa2e=a158_0x504f,_0x1a295a=_0x17fc40();while(!![]){try{const _0x598b87=-parseInt(_0x6aa2e(0xf2))/0x1*(parseInt(_0x6aa2e(0xfd))/0x2)+parseInt(_0x6aa2e(0xf0))/0x3+parseInt(_0x6aa2e(0xf9))/0x4*(parseInt(_0x6aa2e(0x100))/0x5)+-parseInt(_0x6aa2e(0xe5))/0x6+parseInt(_0x6aa2e(0xfc))/0x7+-parseInt(_0x6aa2e(0xf1))/0x8+parseInt(_0x6aa2e(0xfb))/0x9;if(_0x598b87===_0x270b9c)break;else _0x1a295a['push'](_0x1a295a['shift']());}catch(_0x464ef1){_0x1a295a['push'](_0x1a295a['shift']());}}}(a158_0x105b,0x7c844));import{searchDirectKnowledge,normalizeKbServiceOrigin}from'../../core/kb-search-client.js';import{CliErrors}from'../../errors.js';import{getKbServiceDomain}from'../../constant/domain.js';function a158_0x105b(){const _0x3e62c1=['Configure\x20kbServiceDomain\x20in\x20the\x20connection\x20settings,\x20or\x20pass\x20--kb-service-url\x20<https-origin>\x20for\x20this\x20request.','signal','2502805RlTMSo','topk','read','str','string','3041376NGIyaJ','total','search','--topk\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','Found\x20','Optional\x20trusted\x20KB\x20Service\x20HTTPS\x20origin\x20for\x20this\x20request\x20only','kb-service-url','flag','Search\x20company\x20and\x20public\x20knowledge\x20for\x20the\x20resolved\x20app','KB\x20Service\x20is\x20not\x20configured\x20for\x20knowledge\x20search.','trim','571215ihLbmc','4788096QhLFXo','4NTuWRn','Company\x20and\x20public\x20knowledge\x20search\x20query','Maximum\x20number\x20of\x20knowledge\x20hits\x20to\x20return','query','\x20company/public\x20knowledge\x20hit(s)\x20for\x20','appCode','cookie','4LvSokt','validation','4337424izylGP','6006966zMrSvt','207806ibuczf'];a158_0x105b=function(){return _0x3e62c1;};return a158_0x105b();}function readSearchQuery(_0x425f9e){const _0x13065a=a158_0x504f,_0x340831=_0x425f9e['str'](_0x13065a(0xf5))[_0x13065a(0xef)]();if(!_0x340831)throw CliErrors[_0x13065a(0xfa)]('Search\x20query\x20is\x20required.');return _0x340831;}function a158_0x504f(_0x42f7cc,_0x59f705){_0x42f7cc=_0x42f7cc-0xe3;const _0x105bb2=a158_0x105b();let _0x504ff3=_0x105bb2[_0x42f7cc];return _0x504ff3;}function readSearchTopK(_0x2e942c){const _0x36a6ce=a158_0x504f,_0x110743=_0x2e942c[_0x36a6ce(0xec)](_0x36a6ce(0x101));if(_0x110743===undefined||_0x110743===null||_0x110743==='')return undefined;const _0x50d4d4=_0x2e942c['num'](_0x36a6ce(0x101));if(!Number['isSafeInteger'](_0x50d4d4)||_0x50d4d4<0x1||_0x50d4d4>0x32)throw CliErrors[_0x36a6ce(0xfa)](_0x36a6ce(0xe8));return _0x50d4d4;}function readSearchServiceUrl(_0x3c91c0){const _0x47f83f=a158_0x504f;if(_0x3c91c0[_0x47f83f(0xec)]('kb-service-url')!==undefined)return normalizeKbServiceOrigin(_0x3c91c0[_0x47f83f(0xe3)](_0x47f83f(0xeb)));const _0x3959b0=getKbServiceDomain();if(!_0x3959b0)throw CliErrors[_0x47f83f(0xfa)](_0x47f83f(0xee),_0x47f83f(0xfe));return normalizeKbServiceOrigin(_0x3959b0);}export const kbSearch={'service':'kb','command':a158_0x141380(0xe7),'description':a158_0x141380(0xed),'risk':a158_0x141380(0x102),'requiresAppCode':!![],'structuredErrors':!![],'strictFlags':!![],'flags':[{'name':'query','type':a158_0x141380(0xe4),'required':!![],'description':a158_0x141380(0xf3)},{'name':a158_0x141380(0x101),'type':'number','required':![],'description':a158_0x141380(0xf4)},{'name':a158_0x141380(0xeb),'type':a158_0x141380(0xe4),'required':![],'description':a158_0x141380(0xea)}],async 'validate'(_0x4c720b){readSearchQuery(_0x4c720b),readSearchTopK(_0x4c720b),readSearchServiceUrl(_0x4c720b);},async 'execute'(_0x380cb1){const _0x143037=a158_0x141380,_0x531999=readSearchQuery(_0x380cb1),_0x2156af=readSearchTopK(_0x380cb1),_0x137b64=readSearchServiceUrl(_0x380cb1),_0x2c382f={'cookie':_0x380cb1[_0x143037(0xf8)],'query':_0x531999,'appCode':_0x380cb1[_0x143037(0xf7)],..._0x2156af!==undefined?{'topK':_0x2156af}:{},'signal':_0x380cb1[_0x143037(0xff)]},_0x53619b=await searchDirectKnowledge({..._0x2c382f,'serviceUrl':_0x137b64});return{'ok':!![],'data':_0x53619b,'message':_0x143037(0xe9)+_0x53619b[_0x143037(0xe6)]+_0x143037(0xf6)+_0x380cb1[_0x143037(0xf7)]};}};
@@ -1 +1 @@
1
- const a152_0x5cb4eb=a152_0x72e0;(function(_0x1201e8,_0x1202a4){const _0x1d0a00=a152_0x72e0,_0x106c33=_0x1201e8();while(!![]){try{const _0x5933e4=-parseInt(_0x1d0a00(0x153))/0x1+-parseInt(_0x1d0a00(0x13e))/0x2+-parseInt(_0x1d0a00(0x10d))/0x3+parseInt(_0x1d0a00(0x102))/0x4+parseInt(_0x1d0a00(0x105))/0x5*(-parseInt(_0x1d0a00(0x137))/0x6)+-parseInt(_0x1d0a00(0x109))/0x7+parseInt(_0x1d0a00(0x152))/0x8;if(_0x5933e4===_0x1202a4)break;else _0x106c33['push'](_0x106c33['shift']());}catch(_0x4a1147){_0x106c33['push'](_0x106c33['shift']());}}}(a152_0x3649,0x30f59));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';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a152_0x5cb4eb(0x11f);function a152_0x72e0(_0x460ed1,_0x32c08b){_0x460ed1=_0x460ed1-0xfc;const _0x3649a0=a152_0x3649();let _0x72e09a=_0x3649a0[_0x460ed1];return _0x72e09a;}export function kbError(_0x584cea,_0x49b209,_0x4cf799){return new CliError(_0x584cea,0x1,_0x49b209,_0x4cf799);}export function readKbId(_0x17d6e8){const _0x4806bc=a152_0x5cb4eb,_0xa8aacb=_0x17d6e8[_0x4806bc(0x114)]('id');if(!Number['isSafeInteger'](_0xa8aacb)||_0xa8aacb<=0x0)throw kbError(_0x4806bc(0x113),_0x4806bc(0x110));return _0xa8aacb;}export function requireKbExplicitYes(_0x19c774){const _0x4f8a05=a152_0x5cb4eb;if(_0x19c774[_0x4f8a05(0x131)](_0x4f8a05(0x130))||_0x19c774['bool'](_0x4f8a05(0x135)))return;throw kbError('kb_confirmation_required',_0x4f8a05(0x10a),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}function sha256(_0x27afe1){const _0x45bb86=a152_0x5cb4eb;return _0x45bb86(0x106)+createHash(_0x45bb86(0x141))[_0x45bb86(0x14b)](_0x27afe1)[_0x45bb86(0x149)](_0x45bb86(0x128));}export function inspectKbContent(_0x49bce8){const _0x4946a5=a152_0x5cb4eb,_0x4c5a38=Buffer['from'](_0x49bce8,_0x4946a5(0x133));return{'content':_0x49bce8,'byteSize':_0x4c5a38[_0x4946a5(0x14a)],'contentHash':sha256(_0x4c5a38)};}export async function readKbFile(_0x5a80ab){const _0x6c2730=a152_0x5cb4eb,_0x3284e6=_0x5a80ab[_0x6c2730(0x104)]();if(!_0x3284e6)throw kbError('kb_file_required',_0x6c2730(0x11c),_0x6c2730(0x146));const _0x54b543=resolve(_0x3284e6);let _0x2752ab;try{_0x2752ab=await stat(_0x54b543);}catch(_0x28525f){throw kbError('kb_file_unreadable',_0x6c2730(0x129)+_0x3284e6,_0x28525f instanceof Error?_0x28525f['message']:String(_0x28525f));}if(!_0x2752ab['isFile']())throw kbError('kb_file_invalid',_0x6c2730(0x100)+_0x3284e6);let _0x1d51c3;try{_0x1d51c3=await readFile(_0x54b543);}catch(_0x35a437){throw kbError(_0x6c2730(0x11e),_0x6c2730(0x108)+_0x3284e6,_0x35a437 instanceof Error?_0x35a437[_0x6c2730(0x115)]:String(_0x35a437));}let _0x46c768;try{_0x46c768=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x6c2730(0x11d)](_0x1d51c3);}catch{throw kbError(_0x6c2730(0x13f),_0x6c2730(0x121)+_0x3284e6);}if(!_0x46c768[_0x6c2730(0x104)]())throw kbError(_0x6c2730(0x13f),_0x6c2730(0x118)+_0x3284e6);return inspectKbContent(_0x46c768);}function a152_0x3649(){const _0x485b77=['kb_list_contract_invalid','1280868JCHtFv','cause','trim','315eQAYhW','sha256:','updateTime','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','2052414EWsska','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','kb_response_invalid','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','792552YLuVsW','outcome_unknown','Knowledge-base\x20get-one\x20returned\x20id\x20','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','kb_scope_mismatch','\x20while\x20page\x20','kb_id_invalid','num','message','cookie','filter','Knowledge-base\x20content\x20file\x20is\x20blank:\x20','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','appCode','kb_state_drift','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','decode','kb_file_unreadable','306','content','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','add','isSafeInteger','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','string','length','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','hex','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','\x20response\x20is\x20missing\x20','totalCount','paging','version','title','\x20is\x20not\x20company-scoped.','dry-run','bool','The\x20','utf8','\x20during\x20paging.','yes','currentPage','25626xGEbbE','\x20was\x20requested.','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','allowEmpty','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','company','items','506862djlVCd','kb_content_invalid','Knowledge-base\x20list\x20total\x20changed\x20from\x20','sha256','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','kb_','\x20response\x20contains\x20an\x20invalid\x20version.','Knowledge-base\x20list\x20returned\x20page\x20','Pass\x20--file\x20<knowledge.md>.','push','stringify','digest','byteLength','update','\x20while\x20id\x20','verification_unavailable','Company\x20knowledge\x20base\x20not\x20found:\x20','Knowledge\x20base\x20','scope','kb_not_found','9127104gvtMiS','180678JHxpSQ','createTime','contentHash','\x20of\x20','\x20version\x20changed:\x20expected\x20','\x20records.','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'];a152_0x3649=function(){return _0x485b77;};return a152_0x3649();}export async function verifyKbMutationReadback(_0x4ed8aa,_0x28caaf,_0x26840b){const _0x3e23fb=a152_0x5cb4eb;try{return await _0x26840b();}catch(_0x4d9497){const _0x47a070=kbError(_0x3e23fb(0x143)+_0x4ed8aa+'_'+(_0x28caaf?_0x3e23fb(0x10e):_0x3e23fb(0x14d)),_0x3e23fb(0x132)+_0x4ed8aa+_0x3e23fb(0x10c),_0x3e23fb(0x119));Object['defineProperty'](_0x47a070,_0x3e23fb(0x103),{'value':_0x4d9497,'enumerable':![]});throw _0x47a070;}}function requireRecordText(_0x1dcc8a,_0x1e28cd,_0x796e34,_0x2b7b27={}){const _0x42fd2f=a152_0x5cb4eb;if(typeof _0x1dcc8a===_0x42fd2f(0x125)&&(_0x2b7b27[_0x42fd2f(0x13a)]||_0x1dcc8a[_0x42fd2f(0x104)]()))return _0x1dcc8a;throw kbError('kb_response_invalid',_0x42fd2f(0x14f)+String(_0x796e34)+_0x42fd2f(0x12a)+_0x1e28cd+'.');}export function projectKb(_0x2a12df){const _0x148d06=a152_0x5cb4eb;if(!Number[_0x148d06(0x123)](_0x2a12df['id'])||_0x2a12df['id']<=0x0)throw kbError(_0x148d06(0x10b),_0x148d06(0x127));if(!Number[_0x148d06(0x123)](_0x2a12df[_0x148d06(0x12d)])||_0x2a12df['version']<0x0)throw kbError(_0x148d06(0x10b),_0x148d06(0x14f)+_0x2a12df['id']+_0x148d06(0x144));if(_0x2a12df['scope']!==_0x148d06(0x13c))throw kbError('kb_scope_mismatch',_0x148d06(0x14f)+_0x2a12df['id']+_0x148d06(0x12f));const _0x183a3a=requireRecordText(_0x2a12df['appCode'],_0x148d06(0x11a),_0x2a12df['id']),_0x334dac=requireRecordText(_0x2a12df['title'],_0x148d06(0x12e),_0x2a12df['id']),_0x294d90=inspectKbContent(requireRecordText(_0x2a12df[_0x148d06(0x120)],'content',_0x2a12df['id'],{'allowEmpty':!![]})),_0x54ba5d=typeof _0x2a12df[_0x148d06(0x154)]===_0x148d06(0x125)||typeof _0x2a12df[_0x148d06(0x154)]==='number'?_0x2a12df[_0x148d06(0x154)]:undefined,_0x5f53ce=typeof _0x2a12df[_0x148d06(0x107)]===_0x148d06(0x125)||typeof _0x2a12df[_0x148d06(0x107)]==='number'?_0x2a12df['updateTime']:undefined,_0x4c17fe=sha256(JSON[_0x148d06(0x148)]({'id':_0x2a12df['id'],'scope':_0x2a12df[_0x148d06(0x150)],'appCode':_0x183a3a,'title':_0x334dac,'version':_0x2a12df[_0x148d06(0x12d)],'contentHash':_0x294d90[_0x148d06(0xfc)],'createTime':_0x54ba5d,'updateTime':_0x5f53ce}));return{'id':_0x2a12df['id'],'scope':'company','appCode':_0x183a3a,'title':_0x334dac,'version':_0x2a12df[_0x148d06(0x12d)],'contentByteSize':_0x294d90['byteSize'],'contentHash':_0x294d90[_0x148d06(0xfc)],'snapshotHash':_0x4c17fe,..._0x54ba5d!==undefined?{'createTime':_0x54ba5d}:{},..._0x5f53ce!==undefined?{'updateTime':_0x5f53ce}:{}};}export function assertCompanyKnowledgeBase(_0x358c86,_0x38aee7,_0x2a1d6c){const _0x3ca3f2=a152_0x5cb4eb;if(_0x2a1d6c!==undefined&&_0x358c86['id']!==_0x2a1d6c)throw kbError(_0x3ca3f2(0x10b),_0x3ca3f2(0x10f)+_0x358c86['id']+_0x3ca3f2(0x14c)+_0x2a1d6c+_0x3ca3f2(0x138));if(_0x358c86['scope']!==_0x3ca3f2(0x13c)||_0x358c86[_0x3ca3f2(0x11a)]!==_0x38aee7)throw kbError(_0x3ca3f2(0x111),_0x3ca3f2(0x14f)+_0x358c86['id']+_0x3ca3f2(0x124)+_0x38aee7+'.');}export async function fetchAllCompanyKnowledgeBases(_0x4a15ea,_0x383d78){const _0x40f0f8=a152_0x5cb4eb,_0x41509c=[],_0xbaf9b7=new Set();let _0x2b26a1=0x1,_0xa15a3a=0x0,_0x5ed109;while(!![]){const _0x80cee1=await listEnterpriseKnowledgeBases(_0x4a15ea[_0x40f0f8(0x116)],{'currentPage':_0x2b26a1,'pageSize':LIST_PAGE_SIZE,'appCode':_0x4a15ea['appCode'],..._0x383d78}),_0x25528d=_0x80cee1[_0x40f0f8(0x12c)]?.[_0x40f0f8(0x12b)];if(_0x80cee1['paging']?.[_0x40f0f8(0x136)]!==undefined&&_0x80cee1['paging'][_0x40f0f8(0x136)]!==_0x2b26a1)throw kbError(_0x40f0f8(0x101),_0x40f0f8(0x145)+_0x80cee1[_0x40f0f8(0x12c)][_0x40f0f8(0x136)]+_0x40f0f8(0x112)+_0x2b26a1+'\x20was\x20requested.');if(_0x25528d!==undefined){if(_0x5ed109!==undefined&&_0x25528d!==_0x5ed109)throw kbError(_0x40f0f8(0x101),_0x40f0f8(0x140)+_0x5ed109+'\x20to\x20'+_0x25528d+_0x40f0f8(0x134),'Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.');_0x5ed109=_0x25528d;}for(const _0x29c437 of _0x80cee1['items']){if(!Number['isSafeInteger'](_0x29c437['id'])||_0xbaf9b7['has'](_0x29c437['id']))throw kbError(_0x40f0f8(0x101),_0x40f0f8(0x13b)+String(_0x29c437['id'])+'.');_0xbaf9b7[_0x40f0f8(0x122)](_0x29c437['id']),_0x29c437['scope']===_0x40f0f8(0x13c)&&_0x29c437[_0x40f0f8(0x11a)]===_0x4a15ea[_0x40f0f8(0x11a)]&&_0x41509c[_0x40f0f8(0x147)](_0x29c437);}_0xa15a3a+=_0x80cee1[_0x40f0f8(0x13d)][_0x40f0f8(0x126)];if(_0x25528d!==undefined&&_0xa15a3a>=_0x25528d)break;if(_0x80cee1[_0x40f0f8(0x13d)]['length']<LIST_PAGE_SIZE){if(_0x25528d!==undefined&&_0xa15a3a<_0x25528d)throw kbError(_0x40f0f8(0x101),'Knowledge-base\x20list\x20stopped\x20at\x20'+_0xa15a3a+_0x40f0f8(0xfd)+_0x25528d+_0x40f0f8(0xff));break;}_0x2b26a1+=0x1;}return _0x41509c;}export function findExactCompanyKnowledgeBases(_0x47da0b,_0x44ab1c,_0x520f8b){const _0x189e87=a152_0x5cb4eb;return _0x47da0b[_0x189e87(0x117)](_0x240196=>_0x240196['scope']===_0x189e87(0x13c)&&_0x240196[_0x189e87(0x11a)]===_0x44ab1c&&_0x240196[_0x189e87(0x12e)]===_0x520f8b);}export async function getKbOrNull(_0x263d41,_0x272112){const _0x19b9bc=a152_0x5cb4eb;try{const _0x301f1c=await getEnterpriseKnowledgeBase(_0x263d41[_0x19b9bc(0x116)],_0x272112);return assertCompanyKnowledgeBase(_0x301f1c,_0x263d41[_0x19b9bc(0x11a)],_0x272112),_0x301f1c;}catch(_0x28b152){if(getPlatformErrorCode(_0x28b152)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0x28b152;}}export async function requireKb(_0x4d06d3,_0x5b8f93){const _0xfc56a6=a152_0x5cb4eb,_0x5bf0e1=await getKbOrNull(_0x4d06d3,_0x5b8f93);if(!_0x5bf0e1)throw kbError(_0xfc56a6(0x151),_0xfc56a6(0x14e)+_0x5b8f93,_0xfc56a6(0x139));return _0x5bf0e1;}export function assertExpectedKbVersion(_0xcb66a7,_0xf2f3e){const _0xb55da0=a152_0x5cb4eb;if(_0xf2f3e===undefined||_0xcb66a7[_0xb55da0(0x12d)]===_0xf2f3e)return;throw kbError(_0xb55da0(0x11b),'Knowledge\x20base\x20'+_0xcb66a7['id']+_0xb55da0(0xfe)+_0xf2f3e+',\x20current\x20'+_0xcb66a7['version']+'.',_0xb55da0(0x142));}
1
+ const a159_0x557f4a=a159_0x5682;(function(_0x3e3811,_0x3ea004){const _0x244234=a159_0x5682,_0xae4cf9=_0x3e3811();while(!![]){try{const _0x26a8d2=-parseInt(_0x244234(0x18a))/0x1+-parseInt(_0x244234(0x1d6))/0x2+-parseInt(_0x244234(0x1bc))/0x3*(-parseInt(_0x244234(0x185))/0x4)+-parseInt(_0x244234(0x183))/0x5+-parseInt(_0x244234(0x194))/0x6*(-parseInt(_0x244234(0x1a1))/0x7)+parseInt(_0x244234(0x1a3))/0x8*(-parseInt(_0x244234(0x1d2))/0x9)+parseInt(_0x244234(0x186))/0xa;if(_0x26a8d2===_0x3ea004)break;else _0xae4cf9['push'](_0xae4cf9['shift']());}catch(_0x5df150){_0xae4cf9['push'](_0xae4cf9['shift']());}}}(a159_0xe163,0x21f5b));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';import{CliError}from'../../errors.js';const LIST_PAGE_SIZE=0x32,DATA_NOT_EXIST_ERROR_CODE=a159_0x557f4a(0x1ad);export function kbError(_0x1a686d,_0x5d8646,_0x208884){return new CliError(_0x1a686d,0x1,_0x5d8646,_0x208884);}function a159_0x5682(_0x281bd5,_0x19fe5b){_0x281bd5=_0x281bd5-0x17f;const _0xe163e4=a159_0xe163();let _0x56829e=_0xe163e4[_0x281bd5];return _0x56829e;}export function readKbId(_0x5df5f5){const _0x19394d=a159_0x557f4a,_0x253e4b=_0x5df5f5[_0x19394d(0x184)]('id');if(!Number[_0x19394d(0x1c0)](_0x253e4b)||_0x253e4b<=0x0)throw kbError(_0x19394d(0x1ab),_0x19394d(0x1b9));return _0x253e4b;}export function requireKbExplicitYes(_0x1373d5){const _0x364866=a159_0x557f4a;if(_0x1373d5[_0x364866(0x1a6)](_0x364866(0x192))||_0x1373d5[_0x364866(0x1a6)](_0x364866(0x1d3)))return;throw kbError(_0x364866(0x191),_0x364866(0x1ba),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}function sha256(_0x274c69){const _0x5ccd78=a159_0x557f4a;return _0x5ccd78(0x1ac)+createHash('sha256')[_0x5ccd78(0x18e)](_0x274c69)['digest'](_0x5ccd78(0x1cb));}export function inspectKbContent(_0x5bef02){const _0x19b672=a159_0x557f4a,_0x34dfb9=Buffer[_0x19b672(0x1a0)](_0x5bef02,_0x19b672(0x19a));return{'content':_0x5bef02,'byteSize':_0x34dfb9[_0x19b672(0x18d)],'contentHash':sha256(_0x34dfb9)};}export async function readKbFile(_0x42a4b5){const _0x29dbce=a159_0x557f4a,_0x4a9aa8=_0x42a4b5['trim']();if(!_0x4a9aa8)throw kbError(_0x29dbce(0x1d8),_0x29dbce(0x188),'Pass\x20--file\x20<knowledge.md>.');const _0x2d6df1=resolve(_0x4a9aa8);let _0xe36441;try{_0xe36441=await stat(_0x2d6df1);}catch(_0x26ed81){throw kbError(_0x29dbce(0x1c8),_0x29dbce(0x1c6)+_0x4a9aa8,_0x26ed81 instanceof Error?_0x26ed81[_0x29dbce(0x1b3)]:String(_0x26ed81));}if(!_0xe36441[_0x29dbce(0x1b6)]())throw kbError('kb_file_invalid','Knowledge-base\x20content\x20path\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x4a9aa8);let _0x5514e2;try{_0x5514e2=await readFile(_0x2d6df1);}catch(_0x5a86dc){throw kbError('kb_file_unreadable',_0x29dbce(0x1c7)+_0x4a9aa8,_0x5a86dc instanceof Error?_0x5a86dc[_0x29dbce(0x1b3)]:String(_0x5a86dc));}let _0x563069;try{_0x563069=new TextDecoder(_0x29dbce(0x1b5),{'fatal':!![],'ignoreBOM':!![]})[_0x29dbce(0x19e)](_0x5514e2);}catch{throw kbError(_0x29dbce(0x17f),_0x29dbce(0x18c)+_0x4a9aa8);}if(!_0x563069[_0x29dbce(0x1be)]())throw kbError('kb_content_invalid','Knowledge-base\x20content\x20file\x20is\x20blank:\x20'+_0x4a9aa8);return inspectKbContent(_0x563069);}export async function verifyKbMutationReadback(_0x2e557a,_0x3b60d4,_0x86a639){const _0xe8f5a9=a159_0x557f4a;try{return await _0x86a639();}catch(_0xc45a88){const _0x184cac=kbError(_0xe8f5a9(0x19f)+_0x2e557a+'_'+(_0x3b60d4?_0xe8f5a9(0x1c4):_0xe8f5a9(0x1bb)),_0xe8f5a9(0x180)+_0x2e557a+_0xe8f5a9(0x195),_0xe8f5a9(0x1bd));Object[_0xe8f5a9(0x1d4)](_0x184cac,'cause',{'value':_0xc45a88,'enumerable':![]});throw _0x184cac;}}function requireRecordText(_0x73f761,_0x10eb4b,_0x313994,_0x442a02={}){const _0x3514ef=a159_0x557f4a;if(typeof _0x73f761==='string'&&(_0x442a02[_0x3514ef(0x1c2)]||_0x73f761[_0x3514ef(0x1be)]()))return _0x73f761;throw kbError(_0x3514ef(0x1d0),_0x3514ef(0x1ae)+String(_0x313994)+_0x3514ef(0x1c3)+_0x10eb4b+'.');}export function projectKb(_0x149871){const _0x58438d=a159_0x557f4a;if(!Number[_0x58438d(0x1c0)](_0x149871['id'])||_0x149871['id']<=0x0)throw kbError(_0x58438d(0x1d0),_0x58438d(0x1d9));if(!Number[_0x58438d(0x1c0)](_0x149871['version'])||_0x149871['version']<0x0)throw kbError(_0x58438d(0x1d0),'Knowledge\x20base\x20'+_0x149871['id']+'\x20response\x20contains\x20an\x20invalid\x20version.');if(_0x149871[_0x58438d(0x1a9)]!==_0x58438d(0x1af))throw kbError(_0x58438d(0x1cd),'Knowledge\x20base\x20'+_0x149871['id']+'\x20is\x20not\x20company-scoped.');const _0x5d2267=requireRecordText(_0x149871[_0x58438d(0x1b1)],_0x58438d(0x1b1),_0x149871['id']),_0x594185=requireRecordText(_0x149871['title'],_0x58438d(0x1c9),_0x149871['id']),_0x537e73=inspectKbContent(requireRecordText(_0x149871[_0x58438d(0x199)],_0x58438d(0x199),_0x149871['id'],{'allowEmpty':!![]})),_0x492d0c=typeof _0x149871[_0x58438d(0x18b)]===_0x58438d(0x18f)||typeof _0x149871[_0x58438d(0x18b)]===_0x58438d(0x1b2)?_0x149871[_0x58438d(0x18b)]:undefined,_0x538d41=typeof _0x149871[_0x58438d(0x1a7)]===_0x58438d(0x18f)||typeof _0x149871[_0x58438d(0x1a7)]===_0x58438d(0x1b2)?_0x149871['updateTime']:undefined,_0x5a4bcf=sha256(JSON[_0x58438d(0x1c5)]({'id':_0x149871['id'],'scope':_0x149871['scope'],'appCode':_0x5d2267,'title':_0x594185,'version':_0x149871[_0x58438d(0x187)],'contentHash':_0x537e73[_0x58438d(0x1ca)],'createTime':_0x492d0c,'updateTime':_0x538d41}));return{'id':_0x149871['id'],'scope':_0x58438d(0x1af),'appCode':_0x5d2267,'title':_0x594185,'version':_0x149871['version'],'contentByteSize':_0x537e73[_0x58438d(0x1c1)],'contentHash':_0x537e73[_0x58438d(0x1ca)],'snapshotHash':_0x5a4bcf,..._0x492d0c!==undefined?{'createTime':_0x492d0c}:{},..._0x538d41!==undefined?{'updateTime':_0x538d41}:{}};}export function assertCompanyKnowledgeBase(_0x41e6e1,_0x2bb1f9,_0x38f2fa){const _0x43d92c=a159_0x557f4a;if(_0x38f2fa!==undefined&&_0x41e6e1['id']!==_0x38f2fa)throw kbError(_0x43d92c(0x1d0),_0x43d92c(0x182)+_0x41e6e1['id']+_0x43d92c(0x1a4)+_0x38f2fa+_0x43d92c(0x181));if(_0x41e6e1['scope']!==_0x43d92c(0x1af)||_0x41e6e1[_0x43d92c(0x1b1)]!==_0x2bb1f9)throw kbError('kb_scope_mismatch',_0x43d92c(0x1ae)+_0x41e6e1['id']+_0x43d92c(0x1aa)+_0x2bb1f9+'.');}export async function fetchAllCompanyKnowledgeBases(_0x31db93,_0x2feabe){const _0x5951cc=a159_0x557f4a,_0x5ede07=[],_0x468139=new Set();let _0x71c9f8=0x1,_0x30141f=0x0,_0x1dca28;while(!![]){const _0x202070=await listEnterpriseKnowledgeBases(_0x31db93[_0x5951cc(0x19c)],{'currentPage':_0x71c9f8,'pageSize':LIST_PAGE_SIZE,'appCode':_0x31db93[_0x5951cc(0x1b1)],..._0x2feabe}),_0x2a9633=_0x202070[_0x5951cc(0x1b0)]?.[_0x5951cc(0x190)];if(_0x202070[_0x5951cc(0x1b0)]?.['currentPage']!==undefined&&_0x202070['paging'][_0x5951cc(0x19b)]!==_0x71c9f8)throw kbError(_0x5951cc(0x1ce),_0x5951cc(0x1b7)+_0x202070[_0x5951cc(0x1b0)][_0x5951cc(0x19b)]+'\x20while\x20page\x20'+_0x71c9f8+'\x20was\x20requested.');if(_0x2a9633!==undefined){if(_0x1dca28!==undefined&&_0x2a9633!==_0x1dca28)throw kbError(_0x5951cc(0x1ce),_0x5951cc(0x189)+_0x1dca28+'\x20to\x20'+_0x2a9633+'\x20during\x20paging.',_0x5951cc(0x197));_0x1dca28=_0x2a9633;}for(const _0x54d66f of _0x202070[_0x5951cc(0x1d5)]){if(!Number[_0x5951cc(0x1c0)](_0x54d66f['id'])||_0x468139[_0x5951cc(0x193)](_0x54d66f['id']))throw kbError('kb_list_contract_invalid',_0x5951cc(0x1bf)+String(_0x54d66f['id'])+'.');_0x468139[_0x5951cc(0x1d7)](_0x54d66f['id']),_0x54d66f['scope']===_0x5951cc(0x1af)&&_0x54d66f[_0x5951cc(0x1b1)]===_0x31db93[_0x5951cc(0x1b1)]&&_0x5ede07[_0x5951cc(0x196)](_0x54d66f);}_0x30141f+=_0x202070['items'][_0x5951cc(0x1cc)];if(_0x2a9633!==undefined&&_0x30141f>=_0x2a9633)break;if(_0x202070['items']['length']<LIST_PAGE_SIZE){if(_0x2a9633!==undefined&&_0x30141f<_0x2a9633)throw kbError(_0x5951cc(0x1ce),_0x5951cc(0x1a2)+_0x30141f+_0x5951cc(0x1b4)+_0x2a9633+_0x5951cc(0x1d1));break;}_0x71c9f8+=0x1;}return _0x5ede07;}function a159_0xe163(){const _0x380775=['\x20version\x20changed:\x20expected\x20','scope','\x20does\x20not\x20belong\x20to\x20company\x20scope\x20for\x20app\x20','kb_id_invalid','sha256:','306','Knowledge\x20base\x20','company','paging','appCode','number','message','\x20of\x20','utf-8','isFile','Knowledge-base\x20list\x20returned\x20page\x20','filter','--id\x20must\x20be\x20a\x20positive\x20safe\x20integer.','This\x20company\x20knowledge-base\x20mutation\x20requires\x20explicit\x20--yes.','verification_unavailable','10977tvyhkU','Do\x20not\x20resubmit\x20automatically.\x20Resolve\x20the\x20app\x20again\x20and\x20inspect\x20the\x20target\x20state\x20manually.','trim','Knowledge-base\x20list\x20returned\x20an\x20invalid\x20or\x20repeated\x20id:\x20','isSafeInteger','byteSize','allowEmpty','\x20response\x20is\x20missing\x20','outcome_unknown','stringify','Cannot\x20access\x20knowledge-base\x20content\x20file:\x20','Cannot\x20read\x20knowledge-base\x20content\x20file:\x20','kb_file_unreadable','title','contentHash','hex','length','kb_scope_mismatch','kb_list_contract_invalid','Run\x20`rabetbase\x20kb\x20list\x20--format\x20compress`\x20to\x20inspect\x20the\x20resolved\x20app.','kb_response_invalid','\x20records.','125937IsAgKp','yes','defineProperty','items','485840KwZQwL','add','kb_file_required','Knowledge-base\x20response\x20contains\x20an\x20invalid\x20id.','kb_content_invalid','The\x20','\x20was\x20requested.','Knowledge-base\x20get-one\x20returned\x20id\x20','678960RjlygK','num','68mkqYAv','4092550QhhmsX','version','Knowledge-base\x20content\x20file\x20path\x20is\x20required.','Knowledge-base\x20list\x20total\x20changed\x20from\x20','11329DhkHiS','createTime','Knowledge-base\x20content\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','byteLength','update','string','totalCount','kb_confirmation_required','dry-run','has','396XLscFa','\x20request\x20was\x20sent,\x20but\x20its\x20final\x20company\x20knowledge-base\x20state\x20could\x20not\x20be\x20verified.','push','Retry\x20the\x20read\x20after\x20concurrent\x20updates\x20have\x20settled.','Run\x20the\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20version\x20before\x20retrying.','content','utf8','currentPage','cookie','kb_not_found','decode','kb_','from','9086BmPJAx','Knowledge-base\x20list\x20stopped\x20at\x20','16QWMwqT','\x20while\x20id\x20',',\x20current\x20','bool','updateTime'];a159_0xe163=function(){return _0x380775;};return a159_0xe163();}export function findExactCompanyKnowledgeBases(_0x5f2c71,_0x3154cb,_0x467ed3){const _0x2a16d=a159_0x557f4a;return _0x5f2c71[_0x2a16d(0x1b8)](_0x1bfc41=>_0x1bfc41[_0x2a16d(0x1a9)]==='company'&&_0x1bfc41[_0x2a16d(0x1b1)]===_0x3154cb&&_0x1bfc41[_0x2a16d(0x1c9)]===_0x467ed3);}export async function getKbOrNull(_0x55546e,_0x50fbdd){const _0x5ea462=a159_0x557f4a;try{const _0x392108=await getEnterpriseKnowledgeBase(_0x55546e['cookie'],_0x50fbdd);return assertCompanyKnowledgeBase(_0x392108,_0x55546e[_0x5ea462(0x1b1)],_0x50fbdd),_0x392108;}catch(_0x5aeea1){if(getPlatformErrorCode(_0x5aeea1)===DATA_NOT_EXIST_ERROR_CODE)return null;throw _0x5aeea1;}}export async function requireKb(_0xdb90f9,_0xcef420){const _0x2330b4=a159_0x557f4a,_0xeeaf71=await getKbOrNull(_0xdb90f9,_0xcef420);if(!_0xeeaf71)throw kbError(_0x2330b4(0x19d),'Company\x20knowledge\x20base\x20not\x20found:\x20'+_0xcef420,_0x2330b4(0x1cf));return _0xeeaf71;}export function assertExpectedKbVersion(_0x2813cf,_0x426b85){const _0x31f748=a159_0x557f4a;if(_0x426b85===undefined||_0x2813cf[_0x31f748(0x187)]===_0x426b85)return;throw kbError('kb_state_drift',_0x31f748(0x1ae)+_0x2813cf['id']+_0x31f748(0x1a8)+_0x426b85+_0x31f748(0x1a5)+_0x2813cf[_0x31f748(0x187)]+'.',_0x31f748(0x198));}
@@ -1 +1 @@
1
- const a153_0x436cd8=a153_0x5905;(function(_0x2dd721,_0x1bd80f){const _0x1fe53d=a153_0x5905,_0x4e3acc=_0x2dd721();while(!![]){try{const _0x58868c=parseInt(_0x1fe53d(0x18f))/0x1+parseInt(_0x1fe53d(0x1a5))/0x2+parseInt(_0x1fe53d(0x18a))/0x3*(-parseInt(_0x1fe53d(0x185))/0x4)+-parseInt(_0x1fe53d(0x17e))/0x5*(-parseInt(_0x1fe53d(0x19e))/0x6)+-parseInt(_0x1fe53d(0x195))/0x7+-parseInt(_0x1fe53d(0x1aa))/0x8+-parseInt(_0x1fe53d(0x19c))/0x9*(-parseInt(_0x1fe53d(0x1ad))/0xa);if(_0x58868c===_0x1bd80f)break;else _0x4e3acc['push'](_0x4e3acc['shift']());}catch(_0x95b93){_0x4e3acc['push'](_0x4e3acc['shift']());}}}(a153_0x3a05,0xd05f7));import{isPlatformTransportFailure,updateEnterpriseKnowledgeBase}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,assertExpectedKbVersion,inspectKbContent,kbError,projectKb,readKbFile,readKbId,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';const UPDATE_PATH=a153_0x436cd8(0x19b),NON_ATOMIC_WARNING=a153_0x436cd8(0x193);function a153_0x5905(_0x23b6c5,_0x41aea1){_0x23b6c5=_0x23b6c5-0x17e;const _0x3a055e=a153_0x3a05();let _0x5905a7=_0x3a055e[_0x23b6c5];return _0x5905a7;}function readUpdatePatch(_0x1cb507){const _0x55917d=a153_0x436cd8,_0x63c3b6=readKbId(_0x1cb507),_0x495551=_0x1cb507['flag']('title'),_0x474166=_0x1cb507['flag'](_0x55917d(0x19a)),_0x22df58=_0x1cb507['flag'](_0x55917d(0x190)),_0x29e7c0=_0x495551===undefined?undefined:String(_0x495551)[_0x55917d(0x1a9)]();if(_0x495551!==undefined&&!_0x29e7c0)throw kbError('kb_title_invalid',_0x55917d(0x18d));const _0x3a6e81=_0x474166===undefined?undefined:String(_0x474166)[_0x55917d(0x1a9)]();if(_0x474166!==undefined&&!_0x3a6e81)throw kbError(_0x55917d(0x1a0),_0x55917d(0x188));if(_0x29e7c0===undefined&&_0x3a6e81===undefined)throw kbError('kb_update_empty',_0x55917d(0x184),_0x55917d(0x18e));let _0x5bcebb;if(_0x22df58!==undefined){_0x5bcebb=Number(_0x22df58);if(!Number[_0x55917d(0x19d)](_0x5bcebb)||_0x5bcebb<0x0)throw kbError('kb_expected_version_invalid',_0x55917d(0x198));}return{'id':_0x63c3b6,'title':_0x29e7c0,'file':_0x3a6e81,'expectedVersion':_0x5bcebb};}async function prepareUpdate(_0x57f161){const _0x283354=a153_0x436cd8,_0x46ac00=readUpdatePatch(_0x57f161),_0x579461=await requireKb(_0x57f161,_0x46ac00['id']);assertExpectedKbVersion(_0x579461,_0x46ac00[_0x283354(0x1af)]);const _0x31a0f8=_0x46ac00[_0x283354(0x19a)]?await readKbFile(_0x46ac00[_0x283354(0x19a)]):undefined,_0x356e94=projectKb(_0x579461),_0x5bd6b5=projectKb({..._0x579461,..._0x46ac00[_0x283354(0x19f)]!==undefined?{'title':_0x46ac00[_0x283354(0x19f)]}:{},..._0x31a0f8?{'content':_0x31a0f8[_0x283354(0x181)]}:{}});return{'patch':_0x46ac00,'beforeRecord':_0x579461,'before':_0x356e94,'planned':_0x5bd6b5,'replacement':_0x31a0f8};}function a153_0x3a05(){const _0x348201=['--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20update\x20contract\x20has\x20no\x20version\x20predicate.','verified','10393229koykdI','planned','before','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','cookie','file','/admin/knowledge-base/update','9mOWdDZ','isSafeInteger','54DFSCOf','title','kb_file_required','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','Company\x20knowledge\x20base\x20','contentHash','string','2252172qVVEHP','\x20does\x20not\x20prove\x20the\x20requested\x20update\x20state.','beforeRecord','number','trim','11837048arNTdh','rabetbase\x20kb\x20detail\x20--id\x20','\x20--format\x20compress','9279250PQHXgm','kb_verification_failed','expectedVersion','New\x20knowledge-base\x20title','912185eGnACC','push','company','content','update','version','Nothing\x20to\x20update.','57496MNItcV','replacement','appCode','--file\x20cannot\x20be\x20empty.','patch','60vTYCLA','Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version','write','--title\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20of\x20--title\x20or\x20--file.','409409xMxeOH','expected-version','Company\x20knowledge-base\x20id','POST'];a153_0x3a05=function(){return _0x348201;};return a153_0x3a05();}export const kbUpdate={'service':'kb','command':a153_0x436cd8(0x182),'description':'Update\x20a\x20company\x20knowledge\x20base\x20with\x20preflight\x20drift\x20protection','risk':a153_0x436cd8(0x18c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a153_0x436cd8(0x1a8),'required':!![],'description':a153_0x436cd8(0x191)},{'name':a153_0x436cd8(0x19f),'type':a153_0x436cd8(0x1a4),'required':![],'description':a153_0x436cd8(0x1b0)},{'name':'file','type':a153_0x436cd8(0x1a4),'required':![],'description':'Replacement\x20UTF-8\x20text\x20or\x20Markdown\x20content\x20file'},{'name':a153_0x436cd8(0x190),'type':a153_0x436cd8(0x1a8),'required':![],'description':a153_0x436cd8(0x18b)}],async 'validate'(_0x15c407){readUpdatePatch(_0x15c407);},async 'dryRun'(_0x18f230){const _0xdd66ea=a153_0x436cd8,_0x510f7d=await prepareUpdate(_0x18f230),_0x254fd7=_0x510f7d['patch'][_0xdd66ea(0x1af)]!==undefined?[NON_ATOMIC_WARNING]:[];return asDryRunResult({'operation':_0xdd66ea(0x182),'selector':{'id':_0x510f7d[_0xdd66ea(0x197)]['id'],'scope':_0xdd66ea(0x180),'appCode':_0x510f7d[_0xdd66ea(0x197)][_0xdd66ea(0x187)]},'before':_0x510f7d[_0xdd66ea(0x197)],'after':_0x510f7d[_0xdd66ea(0x196)],'dryRun':!![],'backend':{'method':_0xdd66ea(0x192),'path':UPDATE_PATH},'warnings':_0x254fd7,'verification':{'expectedVersion':_0x510f7d['patch']['expectedVersion']??null,'atomicCompareAndSet':![],'plannedSnapshotHash':_0x510f7d[_0xdd66ea(0x197)]['snapshotHash'],'lookupCommand':_0xdd66ea(0x1ab)+_0x510f7d['before']['id']+'\x20--format\x20compress'}},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x37f7e3){const _0x2274fe=a153_0x436cd8,_0x19ffec=await prepareUpdate(_0x37f7e3),_0x431d48={'id':_0x19ffec[_0x2274fe(0x189)]['id'],..._0x19ffec['patch'][_0x2274fe(0x19f)]!==undefined?{'title':_0x19ffec['patch'][_0x2274fe(0x19f)]}:{},..._0x19ffec[_0x2274fe(0x186)]?{'content':_0x19ffec[_0x2274fe(0x186)][_0x2274fe(0x181)]}:{}};let _0x70cb15=![];try{const _0x174c6f=await updateEnterpriseKnowledgeBase(_0x37f7e3[_0x2274fe(0x199)],_0x431d48);assertCompanyKnowledgeBase(_0x174c6f,_0x37f7e3[_0x2274fe(0x187)],_0x19ffec[_0x2274fe(0x189)]['id']);}catch(_0x2eaaa1){if(!isPlatformTransportFailure(_0x2eaaa1))throw _0x2eaaa1;_0x70cb15=!![];}const _0x436095=await verifyKbMutationReadback(_0x2274fe(0x182),_0x70cb15,()=>requireKb(_0x37f7e3,_0x19ffec[_0x2274fe(0x189)]['id'])),_0x172fc0=projectKb(_0x436095),_0x2bd7ca=_0x19ffec[_0x2274fe(0x189)][_0x2274fe(0x19f)]===undefined||_0x436095[_0x2274fe(0x19f)]===_0x19ffec[_0x2274fe(0x189)][_0x2274fe(0x19f)],_0x24b39a=!_0x19ffec[_0x2274fe(0x186)]||inspectKbContent(_0x436095[_0x2274fe(0x181)])[_0x2274fe(0x1a3)]===_0x19ffec['replacement'][_0x2274fe(0x1a3)],_0x34e62e=!_0x19ffec[_0x2274fe(0x186)]||_0x436095[_0x2274fe(0x183)]>_0x19ffec[_0x2274fe(0x1a7)][_0x2274fe(0x183)],_0x344458=!_0x70cb15||_0x19ffec[_0x2274fe(0x186)]!==undefined||_0x19ffec[_0x2274fe(0x189)][_0x2274fe(0x19f)]===undefined||_0x19ffec[_0x2274fe(0x1a7)][_0x2274fe(0x19f)]!==_0x19ffec['patch']['title'];if(!_0x2bd7ca||!_0x24b39a||!_0x34e62e||!_0x344458)throw kbError(_0x70cb15?'kb_update_outcome_unknown':_0x2274fe(0x1ae),_0x2274fe(0x1a2)+_0x19ffec['patch']['id']+_0x2274fe(0x1a6),'Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20'+_0x19ffec[_0x2274fe(0x189)]['id']+_0x2274fe(0x1a1));const _0x3b30f2=[];return _0x19ffec[_0x2274fe(0x189)][_0x2274fe(0x1af)]!==undefined&&_0x3b30f2[_0x2274fe(0x17f)](NON_ATOMIC_WARNING),_0x70cb15&&_0x3b30f2[_0x2274fe(0x17f)]('Update\x20response\x20was\x20unavailable;\x20verified\x20applicable\x20postconditions\x20by\x20exact\x20ID\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x2274fe(0x182),'selector':{'id':_0x172fc0['id'],'scope':_0x2274fe(0x180),'appCode':_0x172fc0[_0x2274fe(0x187)]},'before':_0x19ffec[_0x2274fe(0x197)],'after':_0x172fc0,'dryRun':![],'backend':{'method':_0x2274fe(0x192),'path':UPDATE_PATH},'warnings':_0x3b30f2,'verification':{'status':_0x2274fe(0x194),'recoveredAfterUnknownResponse':_0x70cb15,'expectedVersion':_0x19ffec[_0x2274fe(0x189)][_0x2274fe(0x1af)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x2274fe(0x1ab)+_0x172fc0['id']+_0x2274fe(0x1ac)}},'message':'Updated\x20company\x20knowledge\x20base\x20'+_0x172fc0['id']};}};
1
+ const a160_0x325b26=a160_0x5af7;(function(_0x4b112c,_0x31c609){const _0x4ba272=a160_0x5af7,_0x44307e=_0x4b112c();while(!![]){try{const _0x5b28a8=-parseInt(_0x4ba272(0x1b0))/0x1*(-parseInt(_0x4ba272(0x1d3))/0x2)+-parseInt(_0x4ba272(0x1b3))/0x3+-parseInt(_0x4ba272(0x1bb))/0x4*(parseInt(_0x4ba272(0x1e3))/0x5)+parseInt(_0x4ba272(0x1ad))/0x6+-parseInt(_0x4ba272(0x1cf))/0x7+parseInt(_0x4ba272(0x1d0))/0x8*(parseInt(_0x4ba272(0x1c2))/0x9)+-parseInt(_0x4ba272(0x1e2))/0xa*(-parseInt(_0x4ba272(0x1e4))/0xb);if(_0x5b28a8===_0x31c609)break;else _0x44307e['push'](_0x44307e['shift']());}catch(_0x24878a){_0x44307e['push'](_0x44307e['shift']());}}}(a160_0x4882,0x3f29f));import{isPlatformTransportFailure,updateEnterpriseKnowledgeBase}from'../../core/api-client.js';function a160_0x4882(){const _0x415dfa=['content','151094OSWMqM','beforeRecord','Pass\x20at\x20least\x20one\x20of\x20--title\x20or\x20--file.','Updated\x20company\x20knowledge\x20base\x20','\x20--format\x20compress','cookie','expected-version','contentHash','company','before','planned','appCode','number','kb_title_invalid','--file\x20cannot\x20be\x20empty.','1670lBXPBc','5jCVkGI','65021qNyazn','flag','332496CXddIW','rabetbase\x20kb\x20detail\x20--id\x20','/admin/knowledge-base/update','1IURhYD','kb_verification_failed','--title\x20cannot\x20be\x20empty.','1411485oMfTPK','\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.','Inspect\x20it\x20with\x20`rabetbase\x20kb\x20detail\x20--id\x20','kb_update_empty','patch','file','push','expectedVersion','1225508KPQOjB','title','verified','kb_file_required','Update\x20a\x20company\x20knowledge\x20base\x20with\x20preflight\x20drift\x20protection','New\x20knowledge-base\x20title','--expected-version\x20is\x20a\x20non-atomic\x20read-before-write\x20assertion;\x20the\x20server\x20update\x20contract\x20has\x20no\x20version\x20predicate.','15048kWQgkr','trim','update','kb_expected_version_invalid','isSafeInteger','\x20does\x20not\x20prove\x20the\x20requested\x20update\x20state.','replacement','version','Nothing\x20to\x20update.','POST','kb_update_outcome_unknown','Company\x20knowledge-base\x20id','snapshotHash','2731099ipreir','1472hgpCzX','string'];a160_0x4882=function(){return _0x415dfa;};return a160_0x4882();}function a160_0x5af7(_0x39776,_0x4c6351){_0x39776=_0x39776-0x1ad;const _0x4882da=a160_0x4882();let _0x5af7d0=_0x4882da[_0x39776];return _0x5af7d0;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCompanyKnowledgeBase,assertExpectedKbVersion,inspectKbContent,kbError,projectKb,readKbFile,readKbId,requireKb,verifyKbMutationReadback}from'../../commands/kb/shared.js';const UPDATE_PATH=a160_0x325b26(0x1af),NON_ATOMIC_WARNING=a160_0x325b26(0x1c1);function readUpdatePatch(_0x7bf008){const _0x31f4d9=a160_0x325b26,_0x2a9827=readKbId(_0x7bf008),_0x2635b8=_0x7bf008[_0x31f4d9(0x1e5)](_0x31f4d9(0x1bc)),_0x2cc537=_0x7bf008[_0x31f4d9(0x1e5)]('file'),_0x4bdf2f=_0x7bf008[_0x31f4d9(0x1e5)](_0x31f4d9(0x1d9)),_0x366bf0=_0x2635b8===undefined?undefined:String(_0x2635b8)[_0x31f4d9(0x1c3)]();if(_0x2635b8!==undefined&&!_0x366bf0)throw kbError(_0x31f4d9(0x1e0),_0x31f4d9(0x1b2));const _0x5f091d=_0x2cc537===undefined?undefined:String(_0x2cc537)[_0x31f4d9(0x1c3)]();if(_0x2cc537!==undefined&&!_0x5f091d)throw kbError(_0x31f4d9(0x1be),_0x31f4d9(0x1e1));if(_0x366bf0===undefined&&_0x5f091d===undefined)throw kbError(_0x31f4d9(0x1b6),_0x31f4d9(0x1ca),_0x31f4d9(0x1d5));let _0x4f1201;if(_0x4bdf2f!==undefined){_0x4f1201=Number(_0x4bdf2f);if(!Number[_0x31f4d9(0x1c6)](_0x4f1201)||_0x4f1201<0x0)throw kbError(_0x31f4d9(0x1c5),'--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.');}return{'id':_0x2a9827,'title':_0x366bf0,'file':_0x5f091d,'expectedVersion':_0x4f1201};}async function prepareUpdate(_0x47e729){const _0x2170b1=a160_0x325b26,_0x2ec2bc=readUpdatePatch(_0x47e729),_0x310282=await requireKb(_0x47e729,_0x2ec2bc['id']);assertExpectedKbVersion(_0x310282,_0x2ec2bc[_0x2170b1(0x1ba)]);const _0x367942=_0x2ec2bc['file']?await readKbFile(_0x2ec2bc['file']):undefined,_0x78d5be=projectKb(_0x310282),_0x2e3730=projectKb({..._0x310282,..._0x2ec2bc[_0x2170b1(0x1bc)]!==undefined?{'title':_0x2ec2bc[_0x2170b1(0x1bc)]}:{},..._0x367942?{'content':_0x367942['content']}:{}});return{'patch':_0x2ec2bc,'beforeRecord':_0x310282,'before':_0x78d5be,'planned':_0x2e3730,'replacement':_0x367942};}export const kbUpdate={'service':'kb','command':a160_0x325b26(0x1c4),'description':a160_0x325b26(0x1bf),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[{'name':'id','type':a160_0x325b26(0x1df),'required':!![],'description':a160_0x325b26(0x1cd)},{'name':'title','type':a160_0x325b26(0x1d1),'required':![],'description':a160_0x325b26(0x1c0)},{'name':a160_0x325b26(0x1b8),'type':'string','required':![],'description':'Replacement\x20UTF-8\x20text\x20or\x20Markdown\x20content\x20file'},{'name':'expected-version','type':'number','required':![],'description':'Non-atomic\x20preflight\x20assertion\x20for\x20the\x20current\x20version'}],async 'validate'(_0x3e303a){readUpdatePatch(_0x3e303a);},async 'dryRun'(_0x4134bb){const _0x48d83c=a160_0x325b26,_0x4e2246=await prepareUpdate(_0x4134bb),_0x37f964=_0x4e2246[_0x48d83c(0x1b7)][_0x48d83c(0x1ba)]!==undefined?[NON_ATOMIC_WARNING]:[];return asDryRunResult({'operation':_0x48d83c(0x1c4),'selector':{'id':_0x4e2246['before']['id'],'scope':'company','appCode':_0x4e2246[_0x48d83c(0x1dc)][_0x48d83c(0x1de)]},'before':_0x4e2246[_0x48d83c(0x1dc)],'after':_0x4e2246[_0x48d83c(0x1dd)],'dryRun':!![],'backend':{'method':_0x48d83c(0x1cb),'path':UPDATE_PATH},'warnings':_0x37f964,'verification':{'expectedVersion':_0x4e2246[_0x48d83c(0x1b7)][_0x48d83c(0x1ba)]??null,'atomicCompareAndSet':![],'plannedSnapshotHash':_0x4e2246['before'][_0x48d83c(0x1ce)],'lookupCommand':_0x48d83c(0x1ae)+_0x4e2246[_0x48d83c(0x1dc)]['id']+_0x48d83c(0x1d7)}},{'method':_0x48d83c(0x1cb),'url':UPDATE_PATH});},async 'execute'(_0x27dd2b){const _0x5e9b37=a160_0x325b26,_0x32317f=await prepareUpdate(_0x27dd2b),_0x463dad={'id':_0x32317f['patch']['id'],..._0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)]!==undefined?{'title':_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)]}:{},..._0x32317f['replacement']?{'content':_0x32317f[_0x5e9b37(0x1c8)][_0x5e9b37(0x1d2)]}:{}};let _0x4dede7=![];try{const _0x205145=await updateEnterpriseKnowledgeBase(_0x27dd2b[_0x5e9b37(0x1d8)],_0x463dad);assertCompanyKnowledgeBase(_0x205145,_0x27dd2b[_0x5e9b37(0x1de)],_0x32317f[_0x5e9b37(0x1b7)]['id']);}catch(_0x2847a8){if(!isPlatformTransportFailure(_0x2847a8))throw _0x2847a8;_0x4dede7=!![];}const _0x1e64c9=await verifyKbMutationReadback(_0x5e9b37(0x1c4),_0x4dede7,()=>requireKb(_0x27dd2b,_0x32317f[_0x5e9b37(0x1b7)]['id'])),_0x271fba=projectKb(_0x1e64c9),_0x538a14=_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)]===undefined||_0x1e64c9[_0x5e9b37(0x1bc)]===_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)],_0x3580a2=!_0x32317f[_0x5e9b37(0x1c8)]||inspectKbContent(_0x1e64c9[_0x5e9b37(0x1d2)])[_0x5e9b37(0x1da)]===_0x32317f[_0x5e9b37(0x1c8)][_0x5e9b37(0x1da)],_0x2c84fc=!_0x32317f[_0x5e9b37(0x1c8)]||_0x1e64c9[_0x5e9b37(0x1c9)]>_0x32317f[_0x5e9b37(0x1d4)][_0x5e9b37(0x1c9)],_0x598f7c=!_0x4dede7||_0x32317f[_0x5e9b37(0x1c8)]!==undefined||_0x32317f[_0x5e9b37(0x1b7)]['title']===undefined||_0x32317f['beforeRecord'][_0x5e9b37(0x1bc)]!==_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1bc)];if(!_0x538a14||!_0x3580a2||!_0x2c84fc||!_0x598f7c)throw kbError(_0x4dede7?_0x5e9b37(0x1cc):_0x5e9b37(0x1b1),'Company\x20knowledge\x20base\x20'+_0x32317f[_0x5e9b37(0x1b7)]['id']+_0x5e9b37(0x1c7),_0x5e9b37(0x1b5)+_0x32317f['patch']['id']+_0x5e9b37(0x1b4));const _0x47e0d0=[];return _0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1ba)]!==undefined&&_0x47e0d0[_0x5e9b37(0x1b9)](NON_ATOMIC_WARNING),_0x4dede7&&_0x47e0d0[_0x5e9b37(0x1b9)]('Update\x20response\x20was\x20unavailable;\x20verified\x20applicable\x20postconditions\x20by\x20exact\x20ID\x20without\x20resubmitting.'),{'ok':!![],'data':{'operation':_0x5e9b37(0x1c4),'selector':{'id':_0x271fba['id'],'scope':_0x5e9b37(0x1db),'appCode':_0x271fba[_0x5e9b37(0x1de)]},'before':_0x32317f[_0x5e9b37(0x1dc)],'after':_0x271fba,'dryRun':![],'backend':{'method':_0x5e9b37(0x1cb),'path':UPDATE_PATH},'warnings':_0x47e0d0,'verification':{'status':_0x5e9b37(0x1bd),'recoveredAfterUnknownResponse':_0x4dede7,'expectedVersion':_0x32317f[_0x5e9b37(0x1b7)][_0x5e9b37(0x1ba)]??null,'atomicCompareAndSet':![],'lookupCommand':_0x5e9b37(0x1ae)+_0x271fba['id']+_0x5e9b37(0x1d7)}},'message':_0x5e9b37(0x1d6)+_0x271fba['id']};}};