@lovrabet/lovrabet-cli 2.1.22-beta.2 → 2.1.22-beta.4

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 (130) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -1
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/diagram.js +1 -1
  46. package/lib/commands/skill/commands/install.js +1 -1
  47. package/lib/commands/skill/commands/list.js +1 -1
  48. package/lib/commands/skill/commands/push.js +1 -1
  49. package/lib/commands/skill/commands/validate.js +1 -1
  50. package/lib/commands/skill/diagram.js +1 -1
  51. package/lib/commands/skill/flags.js +1 -1
  52. package/lib/commands/skill/index.js +1 -1
  53. package/lib/commands/skill/manifest-helpers.js +1 -1
  54. package/lib/commands/skill/push-execute.js +1 -1
  55. package/lib/commands/skill/push-flow-helpers.js +1 -1
  56. package/lib/commands/skill/push-retarget.js +1 -1
  57. package/lib/commands/skill/scopes.js +1 -1
  58. package/lib/commands/skill/summary.js +1 -1
  59. package/lib/commands/skill/templates.js +1 -1
  60. package/lib/commands/skill/validate.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/update.js +1 -1
  65. package/lib/commands/workspace/index.js +1 -1
  66. package/lib/config/schema.js +1 -1
  67. package/lib/constant/app.js +1 -1
  68. package/lib/constant/auth-mode.js +1 -1
  69. package/lib/constant/cli.js +1 -1
  70. package/lib/constant/defaults.js +1 -1
  71. package/lib/constant/distribution.js +1 -1
  72. package/lib/constant/domain.js +1 -1
  73. package/lib/constant/env.js +1 -1
  74. package/lib/constant/output.js +1 -1
  75. package/lib/constant/product.js +1 -1
  76. package/lib/constant/risk.js +1 -1
  77. package/lib/constant/url.js +1 -1
  78. package/lib/context.js +1 -1
  79. package/lib/core/api-client.js +1 -1
  80. package/lib/core/db-resolver.js +1 -1
  81. package/lib/core/sdk-client.js +1 -1
  82. package/lib/errors.js +1 -1
  83. package/lib/framework/build-all-flags.js +1 -1
  84. package/lib/framework/dryrun.js +1 -1
  85. package/lib/framework/flags.js +1 -1
  86. package/lib/framework/help.js +1 -1
  87. package/lib/framework/index.js +1 -1
  88. package/lib/framework/output.js +1 -1
  89. package/lib/framework/preparse.js +1 -1
  90. package/lib/framework/rate-limit.js +1 -1
  91. package/lib/framework/raw-flags.js +1 -1
  92. package/lib/framework/response.js +1 -1
  93. package/lib/framework/runner-confirmation.js +1 -1
  94. package/lib/framework/runner-error.js +1 -1
  95. package/lib/framework/runner.js +1 -1
  96. package/lib/framework/schema-export.js +1 -1
  97. package/lib/framework/service-order.js +1 -1
  98. package/lib/framework/types.js +1 -1
  99. package/lib/generated/build-info.d.ts +4 -4
  100. package/lib/generated/build-info.js +1 -1
  101. package/lib/help.js +1 -1
  102. package/lib/runtime/event.js +1 -1
  103. package/lib/runtime/index.js +1 -1
  104. package/lib/runtime/queue.js +1 -1
  105. package/lib/runtime/resolve.js +1 -1
  106. package/lib/skills/npx-skills-add.js +1 -1
  107. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  108. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  109. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  110. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  111. package/lib/skills/runtime-skill-sync/links.js +1 -1
  112. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  113. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  114. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  115. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  116. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  117. package/lib/skills/runtime-skill-sync/push.js +1 -1
  118. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  119. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  120. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  121. package/lib/skills/runtime-skill-sync.js +1 -1
  122. package/lib/utils/apply-jq-filter.js +1 -1
  123. package/lib/utils/logger.js +1 -1
  124. package/lib/utils/lossless-json.js +1 -1
  125. package/lib/utils/params.js +1 -1
  126. package/lib/utils/platform.js +1 -1
  127. package/lib/utils/update-notice.js +1 -1
  128. package/lib/utils/version.js +1 -1
  129. package/lib/utils/write-cli-side-channel.js +1 -1
  130. package/package.json +1 -1
@@ -1 +1 @@
1
- function a28_0x214e(_0x2af819,_0x3697c0){_0x2af819=_0x2af819-0x194;const _0x459c23=a28_0x459c();let _0x214e49=_0x459c23[_0x2af819];return _0x214e49;}const a28_0x1fdd89=a28_0x214e;(function(_0x39c4ee,_0xf558a4){const _0x209523=a28_0x214e,_0x39a6f2=_0x39c4ee();while(!![]){try{const _0x3a991b=-parseInt(_0x209523(0x19c))/0x1*(parseInt(_0x209523(0x1a2))/0x2)+parseInt(_0x209523(0x19d))/0x3+-parseInt(_0x209523(0x194))/0x4*(parseInt(_0x209523(0x197))/0x5)+parseInt(_0x209523(0x19e))/0x6+-parseInt(_0x209523(0x196))/0x7+-parseInt(_0x209523(0x1a1))/0x8+parseInt(_0x209523(0x198))/0x9;if(_0x3a991b===_0xf558a4)break;else _0x39a6f2['push'](_0x39a6f2['shift']());}catch(_0x411f94){_0x39a6f2['push'](_0x39a6f2['shift']());}}}(a28_0x459c,0x3328a));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0x1fdd89(0x1a0);export function formatDatasetSdkMarkdown(_0x2fc920){const _0x51cf07=a28_0x1fdd89,_0x3ab0e0=typeof _0x2fc920===_0x51cf07(0x19a)?_0x2fc920[_0x51cf07(0x1a5)]():'';return _0x3ab0e0||DEFAULT_MARKDOWN;}function a28_0x459c(){const _0x534e48=['#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','1273680SlpUEN','2JOqePK','dataset','code','trim','12zHeUsV','appCode','806687HVkaFv','587240gBjBLT','4997583ezLbeB','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','string','sdk-doc','298735FdEeeq','906132uSEAbS','1666470FLxMSf','str'];a28_0x459c=function(){return _0x534e48;};return a28_0x459c();}export const datasetSdkDoc={'service':a28_0x1fdd89(0x1a3),'command':a28_0x1fdd89(0x19b),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':'read','flags':[{...CODE_FLAG,'description':a28_0x1fdd89(0x199)}],async 'execute'(_0x4d25c0){const _0x2614e8=a28_0x1fdd89,_0x2d75e4=_0x4d25c0[_0x2614e8(0x19f)](_0x2614e8(0x1a4)),_0x147e9f=await getDatasetSdkUsageDoc(_0x2d75e4,_0x4d25c0[_0x2614e8(0x195)]);return{'ok':!![],'data':{'code':_0x2d75e4,'appCode':_0x4d25c0[_0x2614e8(0x195)],'markdown':formatDatasetSdkMarkdown(_0x147e9f)}};}};
1
+ const a28_0x576371=a28_0xacd7;(function(_0x289a08,_0x1f93b5){const _0x46a51f=a28_0xacd7,_0x534036=_0x289a08();while(!![]){try{const _0x314269=-parseInt(_0x46a51f(0x71))/0x1+-parseInt(_0x46a51f(0x6d))/0x2*(parseInt(_0x46a51f(0x78))/0x3)+-parseInt(_0x46a51f(0x72))/0x4+parseInt(_0x46a51f(0x76))/0x5*(parseInt(_0x46a51f(0x7a))/0x6)+-parseInt(_0x46a51f(0x79))/0x7*(-parseInt(_0x46a51f(0x73))/0x8)+parseInt(_0x46a51f(0x6c))/0x9*(-parseInt(_0x46a51f(0x6f))/0xa)+parseInt(_0x46a51f(0x7c))/0xb;if(_0x314269===_0x1f93b5)break;else _0x534036['push'](_0x534036['shift']());}catch(_0x78445e){_0x534036['push'](_0x534036['shift']());}}}(a28_0x3c18,0x2a1c1));function a28_0xacd7(_0xcf1c7e,_0x107656){_0xcf1c7e=_0xcf1c7e-0x69;const _0x3c18f3=a28_0x3c18();let _0xacd725=_0x3c18f3[_0xcf1c7e];return _0xacd725;}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0x576371(0x70);export function formatDatasetSdkMarkdown(_0x485298){const _0x20faf3=a28_0x576371,_0x20860b=typeof _0x485298==='string'?_0x485298[_0x20faf3(0x69)]():'';return _0x20860b||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x576371(0x6a),'command':'sdk-doc','description':a28_0x576371(0x77),'risk':a28_0x576371(0x7b),'flags':[{...CODE_FLAG,'description':a28_0x576371(0x74)}],async 'execute'(_0x1525f2){const _0x17a9d2=a28_0x576371,_0x411376=_0x1525f2[_0x17a9d2(0x75)](_0x17a9d2(0x6e)),_0xbc11b7=await getDatasetSdkUsageDoc(_0x411376,_0x1525f2[_0x17a9d2(0x6b)]);return{'ok':!![],'data':{'code':_0x411376,'appCode':_0x1525f2['appCode'],'markdown':formatDatasetSdkMarkdown(_0xbc11b7)}};}};function a28_0x3c18(){const _0x360c96=['trim','dataset','appCode','1359PBsdNJ','24jtvoep','code','4610nMzpNZ','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','133521ngZwPT','686776aDbZWN','8ivRXvX','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','str','419485VbGpjo','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','30354YcwIEM','1670144rvceyB','12sjztCL','read','2885707QimZpL'];a28_0x3c18=function(){return _0x360c96;};return a28_0x3c18();}
@@ -1 +1 @@
1
- const a29_0x346c06=a29_0x3cab;(function(_0x847b87,_0x106368){const _0x4cbb23=a29_0x3cab,_0x1f40d0=_0x847b87();while(!![]){try{const _0x105767=parseInt(_0x4cbb23(0x14b))/0x1*(-parseInt(_0x4cbb23(0x15a))/0x2)+parseInt(_0x4cbb23(0x141))/0x3*(parseInt(_0x4cbb23(0x15c))/0x4)+-parseInt(_0x4cbb23(0x145))/0x5*(-parseInt(_0x4cbb23(0x163))/0x6)+parseInt(_0x4cbb23(0x12b))/0x7*(-parseInt(_0x4cbb23(0x153))/0x8)+parseInt(_0x4cbb23(0x16a))/0x9*(-parseInt(_0x4cbb23(0x175))/0xa)+-parseInt(_0x4cbb23(0x168))/0xb+-parseInt(_0x4cbb23(0x14f))/0xc*(-parseInt(_0x4cbb23(0x136))/0xd);if(_0x105767===_0x106368)break;else _0x1f40d0['push'](_0x1f40d0['shift']());}catch(_0x227104){_0x1f40d0['push'](_0x1f40d0['shift']());}}}(a29_0x4f6c,0x82a35));import a29_0x236dc7 from'chalk';function a29_0x4f6c(){const _0x15cc2f=['green','⚠\x20Empty','Global','length','defaultApp','red','✗\x20Invalid\x20JSON','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','120150SQEgyf','commandCount','(removed\x20—\x20cookie\x20auth\x20disabled)','status','format','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','services','(missing)','(none)','\x20\x20Config\x20Files','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','4619909XwiEnJ','gray','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','missing','Project','(unnamed)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','(default)','empty','currentApp','3887eXWUMo','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','env','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','✗\x20Invalid','name','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','54963mGEDUP','padEnd','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','serviceCode','1040430admemR','\x20\x20─','yellow','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','✓\x20Valid\x20JSON','5997SivQyp','bold','\x20\x20Auth','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','95496yJeUTx','\x20commands)','path','\x20\x20API\x20Endpoints','8KIQtmF','(no\x20file)','log','ClientAk','\x20(legacy/compat\x20only)','version','(set,\x20length=','304JqucUs','message','8oRfDMy','pageSize','\x20\x20Config\x20JSON','repeat','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','registryPath','24EZrkgW','verbose','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','10841699eVGtkn','locale','117pzxKMx','\x20(accessKey)','\x20\x20Session\x20check:\x20\x20\x20'];a29_0x4f6c=function(){return _0x15cc2f;};return a29_0x4f6c();}import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x2fea5b){const _0x53320f=a29_0x3cab,_0xc7ecb7=getCliVersion(),_0x37a192=buildConfigFromFlags({});await initGlobalEnvironment(_0x37a192),console[_0x53320f(0x155)](),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x14c)](CLI_BIN_NAME+'\x20doctor')),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)]('─'['repeat'](0x32))),console[_0x53320f(0x155)](_0x53320f(0x143)+_0xc7ecb7),console[_0x53320f(0x155)](_0x53320f(0x13f)+process[_0x53320f(0x158)]),console[_0x53320f(0x155)](_0x53320f(0x174)+process[_0x53320f(0x149)]+'\x20'+process[_0x53320f(0x17b)]),console[_0x53320f(0x155)](),console['log'](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x129))),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)[_0x53320f(0x15f)](0x1e)));const _0x1a175c=getGlobalConfigPath(),_0x2447b9=getProjectConfigPath();console[_0x53320f(0x155)](_0x53320f(0x17a)+(_0x1a175c||a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x140)))),console[_0x53320f(0x155)](_0x53320f(0x12a)+(_0x2447b9||a29_0x236dc7['gray'](_0x53320f(0x140)))),console[_0x53320f(0x155)](),console['log'](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x15e))),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)['repeat'](0x1e)));const _0x1e431f=(_0x1c5e8b,_0x3812a2)=>{const _0x2a221c=_0x53320f;if(!_0x3812a2){console['log']('\x20\x20'+_0x1c5e8b[_0x2a221c(0x142)](0x11)+'\x20'+a29_0x236dc7[_0x2a221c(0x12c)](_0x2a221c(0x154)));return;}const _0x9f3d8f=inspectCliConfigJsonFile(_0x3812a2);if(_0x9f3d8f[_0x2a221c(0x178)]==='ok')console[_0x2a221c(0x155)]('\x20\x20'+_0x1c5e8b[_0x2a221c(0x142)](0x11)+'\x20'+a29_0x236dc7[_0x2a221c(0x16d)](_0x2a221c(0x14a)));else{if(_0x9f3d8f[_0x2a221c(0x178)]===_0x2a221c(0x134))console[_0x2a221c(0x155)]('\x20\x20'+_0x1c5e8b[_0x2a221c(0x142)](0x11)+'\x20'+a29_0x236dc7['yellow']('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x9f3d8f['status']===_0x2a221c(0x12e)?console['log']('\x20\x20'+_0x1c5e8b['padEnd'](0x11)+'\x20'+a29_0x236dc7[_0x2a221c(0x12c)](_0x2a221c(0x17d))):(console[_0x2a221c(0x155)]('\x20\x20'+_0x1c5e8b[_0x2a221c(0x142)](0x11)+'\x20'+a29_0x236dc7[_0x2a221c(0x172)](_0x2a221c(0x173))),console[_0x2a221c(0x155)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a29_0x236dc7['red'](_0x9f3d8f['message'])));}};_0x1e431f(_0x53320f(0x16f),_0x1a175c),_0x1e431f(_0x53320f(0x12f),_0x2447b9),console['log'](),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x13c))),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)['repeat'](0x1e))),console[_0x53320f(0x155)](_0x53320f(0x131)+(_0x37a192['appCode']||a29_0x236dc7[_0x53320f(0x172)]('(not\x20set)'))),console[_0x53320f(0x155)](_0x53320f(0x167)+_0x37a192[_0x53320f(0x139)]);const _0x4b8ca6=isLegacyCompatConfigKey(_0x53320f(0x169))?a29_0x236dc7[_0x53320f(0x12c)](_0x37a192[_0x53320f(0x169)]+_0x53320f(0x157)):_0x37a192[_0x53320f(0x169)];console['log']('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4b8ca6),console[_0x53320f(0x155)](_0x53320f(0x166)+(_0x37a192[_0x53320f(0x171)]||a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x17e)))),console['log'](_0x53320f(0x13b)+(_0x37a192[_0x53320f(0x135)]||a29_0x236dc7[_0x53320f(0x12c)]('(none)'))),console[_0x53320f(0x155)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x37a192[_0x53320f(0x179)]||a29_0x236dc7[_0x53320f(0x12c)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x53320f(0x179)]+')'))),console[_0x53320f(0x155)](_0x53320f(0x14e)+(_0x37a192[_0x53320f(0x15d)]??a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x133)))),console[_0x53320f(0x155)](_0x53320f(0x138)+_0x37a192['riskLevel']),console[_0x53320f(0x155)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x37a192[_0x53320f(0x164)]),console[_0x53320f(0x155)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x53320f(0x156)]),console[_0x53320f(0x155)](_0x53320f(0x165)+(_0x37a192[_0x53320f(0x161)]?a29_0x236dc7[_0x53320f(0x16d)](_0x53320f(0x159)+_0x37a192[_0x53320f(0x161)][_0x53320f(0x170)]+')'):a29_0x236dc7['gray']('(none)'))),console[_0x53320f(0x155)](),console['log'](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x152))),console[_0x53320f(0x155)](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)['repeat'](0x1e))),console[_0x53320f(0x155)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x53320f(0x155)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x53320f(0x155)](),console['log'](a29_0x236dc7[_0x53320f(0x14c)](_0x53320f(0x132))),console[_0x53320f(0x155)](a29_0x236dc7['gray']('\x20\x20─'['repeat'](0x1e)));const _0x5860e2=inspectServiceRegistry();console[_0x53320f(0x155)]('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5860e2[_0x53320f(0x162)]),console['log'](_0x53320f(0x148)+formatServiceRegistryStatus(_0x5860e2)),console['log'](_0x53320f(0x12d)+_0x5860e2['serviceCount']),console[_0x53320f(0x155)](_0x53320f(0x137)+_0x5860e2[_0x53320f(0x176)]);for(const _0x2af0a8 of _0x5860e2[_0x53320f(0x17c)]){console[_0x53320f(0x155)]('\x20\x20'+(_0x2af0a8[_0x53320f(0x144)]+':')[_0x53320f(0x142)](0x11)+'\x20'+(_0x2af0a8[_0x53320f(0x13e)]||a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x130)))+'\x20('+_0x2af0a8['commandCount']+_0x53320f(0x150)),console[_0x53320f(0x155)]('\x20\x20'+''[_0x53320f(0x142)](0x11)+'\x20Imported\x20from:\x20'+_0x2af0a8['source'][_0x53320f(0x151)]);}return console[_0x53320f(0x155)](),console['log'](a29_0x236dc7['bold'](_0x53320f(0x14d))),console['log'](a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x146)[_0x53320f(0x15f)](0x1e))),console['log'](_0x53320f(0x160)+a29_0x236dc7[_0x53320f(0x16d)](AUTH_MODE[_0x53320f(0x156)]+_0x53320f(0x16b))),console[_0x53320f(0x155)](_0x53320f(0x16c)+a29_0x236dc7[_0x53320f(0x12c)](_0x53320f(0x177))),console[_0x53320f(0x155)](),{'ok':!![]};}function a29_0x3cab(_0x31507e,_0x1b852c){_0x31507e=_0x31507e-0x129;const _0x4f6c10=a29_0x4f6c();let _0x3cabeb=_0x4f6c10[_0x31507e];return _0x3cabeb;}function formatServiceRegistryStatus(_0x43a0a3){const _0xb1ea62=a29_0x3cab;if(_0x43a0a3[_0xb1ea62(0x178)]==='ok')return a29_0x236dc7[_0xb1ea62(0x16d)]('✓\x20Loaded');if(_0x43a0a3[_0xb1ea62(0x178)]===_0xb1ea62(0x12e))return a29_0x236dc7[_0xb1ea62(0x12c)](_0xb1ea62(0x140));if(_0x43a0a3[_0xb1ea62(0x178)]==='empty')return a29_0x236dc7[_0xb1ea62(0x147)](_0xb1ea62(0x16e));return a29_0x236dc7[_0xb1ea62(0x172)](_0xb1ea62(0x13d)+(_0x43a0a3[_0xb1ea62(0x15b)]?':\x20'+_0x43a0a3['message']:''));}export const doctorDefinition={'service':'doctor','command':'check','description':a29_0x346c06(0x13a),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x294229=a29_0xbd61;(function(_0x48d2f8,_0xef9892){const _0xd49d05=a29_0xbd61,_0x355fcf=_0x48d2f8();while(!![]){try{const _0x360df7=parseInt(_0xd49d05(0x13f))/0x1+parseInt(_0xd49d05(0x14d))/0x2+parseInt(_0xd49d05(0x110))/0x3+-parseInt(_0xd49d05(0x113))/0x4*(-parseInt(_0xd49d05(0x15f))/0x5)+-parseInt(_0xd49d05(0x140))/0x6+-parseInt(_0xd49d05(0x11f))/0x7*(-parseInt(_0xd49d05(0x132))/0x8)+-parseInt(_0xd49d05(0x138))/0x9*(parseInt(_0xd49d05(0x12e))/0xa);if(_0x360df7===_0xef9892)break;else _0x355fcf['push'](_0x355fcf['shift']());}catch(_0x4a6a51){_0x355fcf['push'](_0x355fcf['shift']());}}}(a29_0x16a7,0x4c860));import a29_0x306bb0 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a29_0x16a7(){const _0x4c74de=['read','gray','441mueyXv','serviceCode','path','\x20commands)','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','verbose','321464mijSZi','3195156RRsNDe','doctor','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','empty','pageSize','⚠\x20Empty\x20(treated\x20as\x20{})','arch','services','source','bold','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','10374fGHMtD','message','\x20\x20Merged\x20Config','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCount','⚠\x20Empty','\x20\x20Service\x20Tree','\x20doctor','(no\x20file)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','green','padEnd','(set,\x20length=','accessKey','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','riskLevel','5baXqqq','\x20\x20Config\x20Files','880821DzbQlO','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','commandCount','1783896DOrWxo','registryPath','appCode','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','red','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','✓\x20Loaded','\x20\x20─','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','length','check','format','68950NORBeY','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','(default:\x20','\x20(legacy/compat\x20only)','ClientAk','status','log','\x20\x20Auth','\x20\x20Config\x20JSON','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','yellow','locale','(unnamed)','121340lXTCji','(missing)','currentApp','✗\x20Invalid','304sesmMW','platform','\x20\x20Session\x20check:\x20\x20\x20','repeat'];a29_0x16a7=function(){return _0x4c74de;};return a29_0x16a7();}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x38044a){const _0x15ac6f=a29_0xbd61,_0x5d20c8=getCliVersion(),_0x15558f=buildConfigFromFlags({});await initGlobalEnvironment(_0x15558f),console[_0x15ac6f(0x126)](),console['log'](a29_0x306bb0['bold'](CLI_BIN_NAME+_0x15ac6f(0x154))),console[_0x15ac6f(0x126)](a29_0x306bb0[_0x15ac6f(0x137)]('─'[_0x15ac6f(0x135)](0x32))),console[_0x15ac6f(0x126)](_0x15ac6f(0x116)+_0x5d20c8),console[_0x15ac6f(0x126)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console['log']('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x15ac6f(0x133)]+'\x20'+process[_0x15ac6f(0x148)]),console[_0x15ac6f(0x126)](),console['log'](a29_0x306bb0['bold'](_0x15ac6f(0x160))),console[_0x15ac6f(0x126)](a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x11a)[_0x15ac6f(0x135)](0x1e)));const _0x1767d1=getGlobalConfigPath(),_0x2ad3d8=getProjectConfigPath();console[_0x15ac6f(0x126)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1767d1||a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x143)))),console[_0x15ac6f(0x126)](_0x15ac6f(0x150)+(_0x2ad3d8||a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x143)))),console[_0x15ac6f(0x126)](),console[_0x15ac6f(0x126)](a29_0x306bb0['bold'](_0x15ac6f(0x128))),console['log'](a29_0x306bb0[_0x15ac6f(0x137)]('\x20\x20─'[_0x15ac6f(0x135)](0x1e)));const _0x2aa27a=(_0x15e624,_0x460f4b)=>{const _0x9e82a0=_0x15ac6f;if(!_0x460f4b){console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624[_0x9e82a0(0x158)](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x137)](_0x9e82a0(0x155)));return;}const _0x44c4a5=inspectCliConfigJsonFile(_0x460f4b);if(_0x44c4a5[_0x9e82a0(0x125)]==='ok')console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624[_0x9e82a0(0x158)](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x157)](_0x9e82a0(0x13d)));else{if(_0x44c4a5['status']===_0x9e82a0(0x145))console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624[_0x9e82a0(0x158)](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x12b)](_0x9e82a0(0x147)));else _0x44c4a5[_0x9e82a0(0x125)]==='missing'?console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624['padEnd'](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x137)](_0x9e82a0(0x12f))):(console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624['padEnd'](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x117)]('✗\x20Invalid\x20JSON')),console[_0x9e82a0(0x126)]('\x20\x20'+''[_0x9e82a0(0x158)](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x117)](_0x44c4a5[_0x9e82a0(0x14e)])));}};_0x2aa27a('Global',_0x1767d1),_0x2aa27a('Project',_0x2ad3d8),console[_0x15ac6f(0x126)](),console[_0x15ac6f(0x126)](a29_0x306bb0[_0x15ac6f(0x14b)](_0x15ac6f(0x14f))),console['log'](a29_0x306bb0['gray']('\x20\x20─'[_0x15ac6f(0x135)](0x1e))),console[_0x15ac6f(0x126)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x15558f[_0x15ac6f(0x115)]||a29_0x306bb0[_0x15ac6f(0x117)]('(not\x20set)'))),console[_0x15ac6f(0x126)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x15558f['env']);const _0x3ae904=isLegacyCompatConfigKey(_0x15ac6f(0x12c))?a29_0x306bb0['gray'](_0x15558f[_0x15ac6f(0x12c)]+_0x15ac6f(0x123)):_0x15558f[_0x15ac6f(0x12c)];console[_0x15ac6f(0x126)](_0x15ac6f(0x129)+_0x3ae904),console[_0x15ac6f(0x126)](_0x15ac6f(0x15d)+(_0x15558f[_0x15ac6f(0x121)]||a29_0x306bb0['gray'](_0x15ac6f(0x12a)))),console['log'](_0x15ac6f(0x14c)+(_0x15558f[_0x15ac6f(0x130)]||a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x12a)))),console[_0x15ac6f(0x126)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x15558f[_0x15ac6f(0x11e)]||a29_0x306bb0['gray'](_0x15ac6f(0x122)+DEFAULT_CONFIG_VALUES[_0x15ac6f(0x11e)]+')'))),console[_0x15ac6f(0x126)](_0x15ac6f(0x120)+(_0x15558f[_0x15ac6f(0x146)]??a29_0x306bb0[_0x15ac6f(0x137)]('(default)'))),console[_0x15ac6f(0x126)](_0x15ac6f(0x156)+_0x15558f[_0x15ac6f(0x15e)]),console[_0x15ac6f(0x126)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x15558f[_0x15ac6f(0x13e)]),console[_0x15ac6f(0x126)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x15ac6f(0x124)]),console[_0x15ac6f(0x126)](_0x15ac6f(0x11b)+(_0x15558f['accessKey']?a29_0x306bb0['green'](_0x15ac6f(0x159)+_0x15558f[_0x15ac6f(0x15a)][_0x15ac6f(0x11c)]+')'):a29_0x306bb0[_0x15ac6f(0x137)]('(none)'))),console[_0x15ac6f(0x126)](),console[_0x15ac6f(0x126)](a29_0x306bb0['bold']('\x20\x20API\x20Endpoints')),console[_0x15ac6f(0x126)](a29_0x306bb0['gray'](_0x15ac6f(0x11a)[_0x15ac6f(0x135)](0x1e))),console[_0x15ac6f(0x126)](_0x15ac6f(0x118)+getApiDomain()),console[_0x15ac6f(0x126)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x15ac6f(0x126)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console['log'](a29_0x306bb0[_0x15ac6f(0x14b)](_0x15ac6f(0x153))),console['log'](a29_0x306bb0[_0x15ac6f(0x137)]('\x20\x20─'[_0x15ac6f(0x135)](0x1e)));const _0x35b15b=inspectServiceRegistry();console['log'](_0x15ac6f(0x111)+_0x35b15b[_0x15ac6f(0x114)]),console[_0x15ac6f(0x126)](_0x15ac6f(0x142)+formatServiceRegistryStatus(_0x35b15b)),console[_0x15ac6f(0x126)](_0x15ac6f(0x15c)+_0x35b15b[_0x15ac6f(0x151)]),console[_0x15ac6f(0x126)](_0x15ac6f(0x13c)+_0x35b15b[_0x15ac6f(0x112)]);for(const _0x139004 of _0x35b15b[_0x15ac6f(0x149)]){console[_0x15ac6f(0x126)]('\x20\x20'+(_0x139004[_0x15ac6f(0x139)]+':')['padEnd'](0x11)+'\x20'+(_0x139004['name']||a29_0x306bb0['gray'](_0x15ac6f(0x12d)))+'\x20('+_0x139004['commandCount']+_0x15ac6f(0x13b)),console['log']('\x20\x20'+''[_0x15ac6f(0x158)](0x11)+'\x20Imported\x20from:\x20'+_0x139004[_0x15ac6f(0x14a)][_0x15ac6f(0x13a)]);}return console[_0x15ac6f(0x126)](),console['log'](a29_0x306bb0[_0x15ac6f(0x14b)](_0x15ac6f(0x127))),console[_0x15ac6f(0x126)](a29_0x306bb0[_0x15ac6f(0x137)]('\x20\x20─'[_0x15ac6f(0x135)](0x1e))),console[_0x15ac6f(0x126)](_0x15ac6f(0x144)+a29_0x306bb0[_0x15ac6f(0x157)](AUTH_MODE['ClientAk']+'\x20(accessKey)')),console[_0x15ac6f(0x126)](_0x15ac6f(0x134)+a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x15b))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x239d98){const _0x25efbf=a29_0xbd61;if(_0x239d98[_0x25efbf(0x125)]==='ok')return a29_0x306bb0[_0x25efbf(0x157)](_0x25efbf(0x119));if(_0x239d98[_0x25efbf(0x125)]==='missing')return a29_0x306bb0[_0x25efbf(0x137)](_0x25efbf(0x143));if(_0x239d98['status']===_0x25efbf(0x145))return a29_0x306bb0[_0x25efbf(0x12b)](_0x25efbf(0x152));return a29_0x306bb0[_0x25efbf(0x117)](_0x25efbf(0x131)+(_0x239d98[_0x25efbf(0x14e)]?':\x20'+_0x239d98[_0x25efbf(0x14e)]:''));}function a29_0xbd61(_0x4df812,_0x2458df){_0x4df812=_0x4df812-0x110;const _0x16a78f=a29_0x16a7();let _0xbd619e=_0x16a78f[_0x4df812];return _0xbd619e;}export const doctorDefinition={'service':a29_0x294229(0x141),'command':a29_0x294229(0x11d),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a29_0x294229(0x136),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x478127=a30_0x123d;(function(_0x4629d8,_0x53f12e){const _0x1f1f35=a30_0x123d,_0x40348e=_0x4629d8();while(!![]){try{const _0x411fcc=-parseInt(_0x1f1f35(0x17d))/0x1+-parseInt(_0x1f1f35(0x161))/0x2+parseInt(_0x1f1f35(0x165))/0x3*(-parseInt(_0x1f1f35(0x171))/0x4)+parseInt(_0x1f1f35(0x16f))/0x5*(-parseInt(_0x1f1f35(0x175))/0x6)+parseInt(_0x1f1f35(0x16a))/0x7*(parseInt(_0x1f1f35(0x16c))/0x8)+-parseInt(_0x1f1f35(0x182))/0x9+parseInt(_0x1f1f35(0x169))/0xa*(parseInt(_0x1f1f35(0x172))/0xb);if(_0x411fcc===_0x53f12e)break;else _0x40348e['push'](_0x40348e['shift']());}catch(_0x44d6a3){_0x40348e['push'](_0x40348e['shift']());}}}(a30_0x36ee,0x492cc));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x36ee(){const _0x3bfd98=['7BWVxLM','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','522440PMNPhx','validation','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','220085ZyXKZr','Uploaded\x20file:\x20','2072216jVoGJq','11EeZtio','string','long-term','54iSnuqh','description','filePath','bool','str','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Path\x20to\x20the\x20local\x20file\x20to\x20upload','File','249527Czvikd','download','POST','boolean','filepath','5151636BYVydN','read','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','appCode','1049724jPCTWg','upload','path','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','3ByKHcZ','file','query-url','trim','24954190uWEzLc'];a30_0x36ee=function(){return _0x3bfd98;};return a30_0x36ee();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a30_0x123d(_0x102ec5,_0x300925){_0x102ec5=_0x102ec5-0x15e;const _0x36ee9e=a30_0x36ee();let _0x123d4b=_0x36ee9e[_0x102ec5];return _0x123d4b;}const FILE_FLAG={'name':'file','type':a30_0x478127(0x173),'required':!![],'description':a30_0x478127(0x17b)},FILEPATH_FLAG={'name':a30_0x478127(0x181),'type':a30_0x478127(0x173),'required':!![],'description':a30_0x478127(0x16b)},DOWNLOAD_FLAG={'name':a30_0x478127(0x17e),'type':a30_0x478127(0x180),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a30_0x478127(0x174),'type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x87b5ff){const _0x1b0920=a30_0x478127,_0x244f4c=_0x87b5ff[_0x1b0920(0x168)]();if(!_0x244f4c)throw CliErrors[_0x1b0920(0x16d)]('filePath\x20is\x20required.');return _0x244f4c;}const fileUpload={'service':a30_0x478127(0x166),'command':a30_0x478127(0x162),'description':a30_0x478127(0x16e),'risk':a30_0x478127(0x15e),'flags':[FILE_FLAG],async 'dryRun'(_0x5395d6){const _0x1d7595=a30_0x478127,_0x1391e6=requireRuntimeUploadFile(_0x5395d6[_0x1d7595(0x179)]('file'),_0x1d7595(0x17c));return dryRun(_0x1d7595(0x17f),'/client/uploadFile')['body']({'appCode':_0x5395d6[_0x1d7595(0x160)],'multipart':{'file':_0x1391e6}})[_0x1d7595(0x176)]('Preview:\x20upload\x20'+_0x1391e6[_0x1d7595(0x163)]+'\x20to\x20runtime\x20app\x20'+_0x5395d6[_0x1d7595(0x160)])['build']();},async 'execute'(_0x35dff6){const _0xd19a5b=a30_0x478127,_0x2a90db=requireRuntimeUploadFile(_0x35dff6[_0xd19a5b(0x179)](_0xd19a5b(0x166)),_0xd19a5b(0x17c)),_0x17b45d=await uploadRuntimeFile(_0x35dff6['appCode'],_0x2a90db[_0xd19a5b(0x163)]);return{'ok':!![],'data':_0x17b45d,'message':_0x17b45d[_0xd19a5b(0x177)]?_0xd19a5b(0x170)+_0x17b45d[_0xd19a5b(0x177)]+_0xd19a5b(0x17a):_0xd19a5b(0x164)};}},fileQueryUrl={'service':a30_0x478127(0x166),'command':a30_0x478127(0x167),'description':a30_0x478127(0x15f),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x33b329){const _0xaf8b45=a30_0x478127,_0x3decd8=requireFilePath(_0x33b329['str'](_0xaf8b45(0x181))),_0x45ba29=await queryRuntimeFileUrl(_0x3decd8,{'download':_0x33b329[_0xaf8b45(0x178)](_0xaf8b45(0x17e)),'longTerm':_0x33b329[_0xaf8b45(0x178)](_0xaf8b45(0x174))});return{'ok':!![],'data':_0x45ba29};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x5deeb1=a30_0x5712;(function(_0x5cb365,_0x1a92eb){const _0x5c4015=a30_0x5712,_0x1e4dd6=_0x5cb365();while(!![]){try{const _0x518702=parseInt(_0x5c4015(0x16f))/0x1*(parseInt(_0x5c4015(0x174))/0x2)+parseInt(_0x5c4015(0x191))/0x3+parseInt(_0x5c4015(0x187))/0x4*(parseInt(_0x5c4015(0x184))/0x5)+-parseInt(_0x5c4015(0x196))/0x6*(parseInt(_0x5c4015(0x18a))/0x7)+-parseInt(_0x5c4015(0x181))/0x8*(parseInt(_0x5c4015(0x17c))/0x9)+parseInt(_0x5c4015(0x18c))/0xa*(parseInt(_0x5c4015(0x16e))/0xb)+parseInt(_0x5c4015(0x190))/0xc*(-parseInt(_0x5c4015(0x177))/0xd);if(_0x518702===_0x1a92eb)break;else _0x1e4dd6['push'](_0x1e4dd6['shift']());}catch(_0x429c4d){_0x1e4dd6['push'](_0x1e4dd6['shift']());}}}(a30_0x2923,0x9803d));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a30_0x5712(_0x9c4383,_0x5ce269){_0x9c4383=_0x9c4383-0x16d;const _0x2923ed=a30_0x2923();let _0x5712a3=_0x2923ed[_0x9c4383];return _0x5712a3;}const FILE_FLAG={'name':'file','type':a30_0x5deeb1(0x171),'required':!![],'description':a30_0x5deeb1(0x176)},FILEPATH_FLAG={'name':a30_0x5deeb1(0x188),'type':a30_0x5deeb1(0x171),'required':!![],'description':a30_0x5deeb1(0x183)},DOWNLOAD_FLAG={'name':a30_0x5deeb1(0x185),'type':a30_0x5deeb1(0x193),'description':a30_0x5deeb1(0x17d)},LONG_TERM_FLAG={'name':a30_0x5deeb1(0x178),'type':a30_0x5deeb1(0x193),'description':a30_0x5deeb1(0x16d)};function requireFilePath(_0x46c297){const _0x144930=a30_0x5deeb1,_0x3ae30e=_0x46c297['trim']();if(!_0x3ae30e)throw CliErrors[_0x144930(0x18d)]('filePath\x20is\x20required.');return _0x3ae30e;}function a30_0x2923(){const _0x2322fa=['upload','24TrfmMd','2134509awHymX','str','boolean','filePath','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','30SmtBSu','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','55wtcCUq','2315TlvJvx','File','string','read','bool','614mVITiH','description','Path\x20to\x20the\x20local\x20file\x20to\x20upload','11012066zyDWuQ','long-term','Preview:\x20upload\x20','body','Uploaded\x20file:\x20','2746602UoxBEB','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','/client/uploadFile','\x20to\x20runtime\x20app\x20','build','8xLdBxq','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','1719985JMinDV','download','appCode','4WDnhWM','filepath','file','149205rwUHbN','path','1924730vRPOFk','validation','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references'];a30_0x2923=function(){return _0x2322fa;};return a30_0x2923();}const fileUpload={'service':a30_0x5deeb1(0x189),'command':a30_0x5deeb1(0x18f),'description':a30_0x5deeb1(0x18e),'risk':a30_0x5deeb1(0x172),'flags':[FILE_FLAG],async 'dryRun'(_0xb7f02f){const _0x22e9cf=a30_0x5deeb1,_0x5bce80=requireRuntimeUploadFile(_0xb7f02f[_0x22e9cf(0x192)](_0x22e9cf(0x189)),_0x22e9cf(0x170));return dryRun('POST',_0x22e9cf(0x17e))[_0x22e9cf(0x17a)]({'appCode':_0xb7f02f[_0x22e9cf(0x186)],'multipart':{'file':_0x5bce80}})[_0x22e9cf(0x175)](_0x22e9cf(0x179)+_0x5bce80[_0x22e9cf(0x18b)]+_0x22e9cf(0x17f)+_0xb7f02f[_0x22e9cf(0x186)])[_0x22e9cf(0x180)]();},async 'execute'(_0x327fbb){const _0x336de2=a30_0x5deeb1,_0x4b1ce1=requireRuntimeUploadFile(_0x327fbb[_0x336de2(0x192)](_0x336de2(0x189)),_0x336de2(0x170)),_0x14b1b5=await uploadRuntimeFile(_0x327fbb[_0x336de2(0x186)],_0x4b1ce1[_0x336de2(0x18b)]);return{'ok':!![],'data':_0x14b1b5,'message':_0x14b1b5[_0x336de2(0x194)]?_0x336de2(0x17b)+_0x14b1b5[_0x336de2(0x194)]+_0x336de2(0x195):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a30_0x5deeb1(0x189),'command':'query-url','description':a30_0x5deeb1(0x182),'risk':a30_0x5deeb1(0x172),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x23821e){const _0x2918ee=a30_0x5deeb1,_0x3dbe51=requireFilePath(_0x23821e[_0x2918ee(0x192)](_0x2918ee(0x188))),_0x74ac1c=await queryRuntimeFileUrl(_0x3dbe51,{'download':_0x23821e[_0x2918ee(0x173)](_0x2918ee(0x185)),'longTerm':_0x23821e['bool'](_0x2918ee(0x178))});return{'ok':!![],'data':_0x74ac1c};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0xc56787=a31_0x2db2;(function(_0x598a7f,_0x568d70){const _0x20bb66=a31_0x2db2,_0x2337f1=_0x598a7f();while(!![]){try{const _0x16bf42=parseInt(_0x20bb66(0x1a8))/0x1*(parseInt(_0x20bb66(0x1a2))/0x2)+-parseInt(_0x20bb66(0x19b))/0x3+parseInt(_0x20bb66(0x182))/0x4*(-parseInt(_0x20bb66(0x19d))/0x5)+-parseInt(_0x20bb66(0x1a4))/0x6*(-parseInt(_0x20bb66(0x175))/0x7)+-parseInt(_0x20bb66(0x196))/0x8*(-parseInt(_0x20bb66(0x170))/0x9)+-parseInt(_0x20bb66(0x183))/0xa+parseInt(_0x20bb66(0x173))/0xb;if(_0x16bf42===_0x568d70)break;else _0x2337f1['push'](_0x2337f1['shift']());}catch(_0x3c0b40){_0x2337f1['push'](_0x2337f1['shift']());}}}(a31_0x38bc,0x5720d));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0xc56787(0x172),'type':a31_0xc56787(0x18f),'description':a31_0xc56787(0x165)},{'name':'env','type':a31_0xc56787(0x18f),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a31_0xc56787(0x177)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0xc56787(0x1a9),'type':a31_0xc56787(0x176),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a31_0xc56787(0x19e)]+a31_0xc56787(0x19a),'default':![]},{'name':a31_0xc56787(0x198),'type':a31_0xc56787(0x176),'description':a31_0xc56787(0x17c),'default':![]}];export const initImportFlagDefs=[{'name':a31_0xc56787(0x164),'type':'string','description':a31_0xc56787(0x193),'required':!![]},{'name':'appcode','type':a31_0xc56787(0x18f),'description':a31_0xc56787(0x1a5)},{'name':a31_0xc56787(0x177),'type':a31_0xc56787(0x18f),'description':a31_0xc56787(0x17a),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0xc56787(0x1a9),'type':a31_0xc56787(0x176),'description':a31_0xc56787(0x168)+PRODUCT_CONFIG['newConfigFileName']+a31_0xc56787(0x19a),'default':![]},{'name':a31_0xc56787(0x198),'type':a31_0xc56787(0x176),'description':a31_0xc56787(0x17c),'default':![]}];export async function runInit(_0x533c83){const _0x331399=a31_0xc56787,_0x4f600c=isNonInteractiveMode(_0x533c83),_0x4d500f=_0x533c83[_0x331399(0x1a9)]?'global':'project',_0x331001=resolveWriteConfigPath(_0x4d500f);try{_0x4f600c?await runNonInteractive(_0x533c83,_0x331001):await runInteractive(_0x533c83,_0x331001);}catch(_0x274d5f){if(_0x274d5f instanceof AbortPrompt)throw CliErrors[_0x331399(0x179)]();throw _0x274d5f;}}export async function runInitImport(_0x5eb1c4){const _0x247f9c=a31_0xc56787,_0x4872e4=_0x5eb1c4['global']?_0x247f9c(0x1a9):_0x247f9c(0x197),_0xf97467=resolveWriteConfigPath(_0x4872e4);await runFromImport(_0x5eb1c4,_0xf97467);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0xc56787(0x184)]);function a31_0x2db2(_0x12a618,_0x1e7a79){_0x12a618=_0x12a618-0x164;const _0x38bcba=a31_0x38bc();let _0x2db2ec=_0x38bcba[_0x12a618];return _0x2db2ec;}async function runFromImport(_0x5355e2,_0x1ddeba){const _0x4c7dd8=a31_0xc56787,_0x2d1050=resolveFilePath(_0x5355e2[_0x4c7dd8(0x164)]);if(!existsSync(_0x2d1050))throw CliErrors[_0x4c7dd8(0x18b)](_0x4c7dd8(0x167)+_0x2d1050);const _0x578074=readSourceFile(_0x2d1050),_0x3c8bf1=convertToRuntimeConfig(_0x578074);_0x5355e2[_0x4c7dd8(0x172)]&&(_0x3c8bf1[_0x4c7dd8(0x172)]=String(_0x5355e2[_0x4c7dd8(0x172)]));_0x5355e2['env']&&(_0x3c8bf1['env']=resolveInitEnv(_0x5355e2));if(!_0x3c8bf1[_0x4c7dd8(0x172)])throw CliErrors[_0x4c7dd8(0x18b)](_0x4c7dd8(0x16d),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x1ddeba,_0x3c8bf1,_0x5355e2),console[_0x4c7dd8(0x187)](_0x4c7dd8(0x1a7)+_0x2d1050),console[_0x4c7dd8(0x187)](_0x4c7dd8(0x190)+_0x1ddeba),console[_0x4c7dd8(0x187)](_0x4c7dd8(0x19f)+_0x3c8bf1[_0x4c7dd8(0x172)]);if(_0x3c8bf1[_0x4c7dd8(0x18e)])console[_0x4c7dd8(0x187)](_0x4c7dd8(0x17d)+_0x3c8bf1['defaultApp']);}function convertToRuntimeConfig(_0x44a6ac){const _0x35fde2=a31_0xc56787;if(_0x44a6ac[_0x35fde2(0x16c)]&&typeof _0x44a6ac[_0x35fde2(0x16c)]==='object')throw CliErrors[_0x35fde2(0x18b)](_0x35fde2(0x180),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x1c20f2={};for(const _0x42f5f6 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x44a6ac[_0x42f5f6]!==undefined&&(_0x1c20f2[_0x42f5f6]=_0x44a6ac[_0x42f5f6]);}return!_0x1c20f2[_0x35fde2(0x16f)]&&(_0x1c20f2[_0x35fde2(0x16f)]=DEFAULT_CONFIG_VALUES[_0x35fde2(0x16f)]),_0x1c20f2;}async function runNonInteractive(_0x335ea8,_0x1e10dd){const _0x52ca1d=a31_0xc56787,_0x114b40=_0x335ea8[_0x52ca1d(0x172)];if(!_0x114b40)throw CliErrors[_0x52ca1d(0x194)]('appcode',_0x52ca1d(0x188)+CLI_BIN_NAME+_0x52ca1d(0x189));const _0x44e8ac=resolveInitEnv(_0x335ea8);await writeInitConfig(_0x1e10dd,{'appcode':_0x114b40,'env':_0x44e8ac},_0x335ea8),console['log'](_0x52ca1d(0x18c)+_0x1e10dd),console['log'](_0x52ca1d(0x19f)+_0x114b40),console[_0x52ca1d(0x187)](_0x52ca1d(0x16e)+_0x44e8ac);}async function runInteractive(_0x2d6ebd,_0x1d3bcb){const _0x428dcd=a31_0xc56787,_0x35a7b0=loadExisting(_0x1d3bcb),_0x25e024=typeof _0x35a7b0?.[_0x428dcd(0x172)]===_0x428dcd(0x18f)?_0x35a7b0['appcode']:'',_0x55f1ce=resolveInitEnv(_0x2d6ebd);console[_0x428dcd(0x187)](CLI_BIN_NAME+_0x428dcd(0x16b)+PRODUCT_CONFIG['newConfigFileName']+'\x0a');if(existsSync(_0x1d3bcb)&&!_0x2d6ebd[_0x428dcd(0x198)]){const _0xa08e61=await promptYesNo('File\x20'+_0x1d3bcb+_0x428dcd(0x186),![]);if(!_0xa08e61){console[_0x428dcd(0x187)](_0x428dcd(0x171));return;}}const _0x5ec3da=typeof _0x2d6ebd[_0x428dcd(0x172)]==='string'?_0x2d6ebd[_0x428dcd(0x172)][_0x428dcd(0x1a3)]():'';let _0x1a29dd=_0x5ec3da;!_0x1a29dd&&(_0x1a29dd=await promptInput('App\x20code',_0x25e024));if(!_0x1a29dd[_0x428dcd(0x1a3)]())throw CliErrors[_0x428dcd(0x18b)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x1d3bcb,{'appcode':_0x1a29dd[_0x428dcd(0x1a3)](),'env':_0x55f1ce},_0x2d6ebd),console[_0x428dcd(0x187)]('\x0aInitialized\x20'+_0x1d3bcb),console[_0x428dcd(0x187)](_0x428dcd(0x19f)+_0x1a29dd[_0x428dcd(0x1a3)]()),console[_0x428dcd(0x187)](_0x428dcd(0x16e)+_0x55f1ce);}function a31_0x38bc(){const _0x2c8852=['\x20\x20env:\x20\x20\x20\x20\x20','riskLevel','9PwdAvh','Aborted.','appcode','4584019WKdQXq','SIGINT','399DGIQYp','boolean','env','[y/N]','cancelled','Override\x20imported\x20default\x20env','close','Skip\x20confirmation\x20when\x20overwriting','\x20\x20default:\x20','):\x20','name','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Invalid\x20env\x20\x22','227524unltpL','6027410CIBWLh','apiDir','join','\x20already\x20exists.\x20Overwrite?','log','Usage:\x20','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','stdout','validation','Initialized\x20','Failed\x20to\x20parse\x20source\x20file:\x20','defaultApp','string','\x20\x20config:\x20\x20','\x22.\x20Allowed:\x20','entries','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','flagMissing','cwd','2185016vWqsPX','project','yes','question',')\x20instead\x20of\x20project','772707hPAaFW','toLowerCase','40qFFoZD','newConfigFileName','\x20\x20appcode:\x20','removeListener','race','470hEPQcT','trim','28332ZPEEik','Override\x20imported\x20default\x20appcode','parse','Imported\x20from\x20','3035WmvJqP','global','file','App\x20code\x20for\x20the\x20project','message','Source\x20file\x20not\x20found:\x20','Write\x20to\x20global\x20(~/','app','once','\x20init\x20—\x20Create\x20','apps','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.'];a31_0x38bc=function(){return _0x2c8852;};return a31_0x38bc();}async function writeInitConfig(_0x58d7a6,_0xe3afa3,_0x358dfb){const _0x4c27f1=a31_0xc56787;let _0x432ea={};existsSync(_0x58d7a6)&&!_0x358dfb[_0x4c27f1(0x198)]&&(_0x432ea=readConfigFile(_0x58d7a6));for(const [_0x1b5d98,_0x4536fe]of Object[_0x4c27f1(0x192)](_0xe3afa3)){_0x4536fe!==undefined&&(_0x432ea[_0x1b5d98]=_0x4536fe);}if(_0x432ea[_0x4c27f1(0x169)])delete _0x432ea[_0x4c27f1(0x169)];writeConfigFile(_0x58d7a6,_0x432ea);}class AbortPrompt extends Error{constructor(){const _0x214f3e=a31_0xc56787;super('User\x20aborted\x20prompt'),this[_0x214f3e(0x17f)]='AbortPrompt';}}function createSafeRl(){const _0x41b3fe=a31_0xc56787,_0x479711=createInterface({'input':process['stdin'],'output':process[_0x41b3fe(0x18a)]});let _0x3f819a;const _0x5d7df7=new Promise((_0x1c7e28,_0x1d3684)=>{const _0x373f9e=_0x41b3fe;_0x3f819a=()=>{const _0x473c72=a31_0x2db2;_0x3f819a&&(_0x479711[_0x473c72(0x1a0)]('SIGINT',_0x3f819a),_0x3f819a=undefined);try{_0x479711[_0x473c72(0x17b)]();}catch{}_0x1d3684(new AbortPrompt());},_0x479711[_0x373f9e(0x16a)](_0x373f9e(0x174),_0x3f819a);}),_0x2821ca=()=>{const _0x293864=_0x41b3fe;_0x3f819a&&(_0x479711[_0x293864(0x1a0)](_0x293864(0x174),_0x3f819a),_0x3f819a=undefined);try{_0x479711[_0x293864(0x17b)]();}catch{}};return{'rl':_0x479711,'abortPromise':_0x5d7df7,'disposeSuccess':_0x2821ca};}async function promptInput(_0x5a8843,_0x38d4e4){const _0x2cacf0=a31_0xc56787,{rl:_0x1669b0,abortPromise:_0x1b6499,disposeSuccess:_0x42c777}=createSafeRl(),_0x4b7021=new Promise(_0x5b6a5b=>{const _0x4be0f0=a31_0x2db2,_0x422e01=_0x38d4e4?'\x20\x20'+_0x5a8843+'\x20('+_0x38d4e4+_0x4be0f0(0x17e):'\x20\x20'+_0x5a8843+':\x20';_0x1669b0['question'](_0x422e01,_0x1c7de7=>{const _0x5b0209=_0x4be0f0;_0x42c777(),_0x5b6a5b(_0x1c7de7[_0x5b0209(0x1a3)]()||_0x38d4e4);});});return Promise[_0x2cacf0(0x1a1)]([_0x4b7021,_0x1b6499]);}async function promptYesNo(_0x1eee8a,_0x31a99b){const {rl:_0x2245c0,abortPromise:_0x409776,disposeSuccess:_0x434e8b}=createSafeRl(),_0x169d3e=new Promise(_0x1e7a43=>{const _0x2f5583=a31_0x2db2,_0x31fb38=_0x31a99b?'[Y/n]':_0x2f5583(0x178);_0x2245c0[_0x2f5583(0x199)]('\x20\x20'+_0x1eee8a+'\x20'+_0x31fb38+':\x20',_0x37d479=>{const _0x33f072=_0x2f5583;_0x434e8b();const _0x43a6ae=_0x37d479[_0x33f072(0x1a3)]()[_0x33f072(0x19c)]();if(_0x43a6ae==='y'||_0x43a6ae==='yes')_0x1e7a43(!![]);else{if(_0x43a6ae==='n'||_0x43a6ae==='no')_0x1e7a43(![]);else _0x1e7a43(_0x31a99b);}});});return Promise['race']([_0x169d3e,_0x409776]);}function loadExisting(_0x3aab89){if(!existsSync(_0x3aab89))return null;return readConfigFile(_0x3aab89);}function resolveFilePath(_0x470f62){const _0x48ce8a=a31_0xc56787;return isAbsolute(_0x470f62)?_0x470f62:resolve(process[_0x48ce8a(0x195)](),_0x470f62);}function readSourceFile(_0x24b1ef){const _0x4673fa=a31_0xc56787;try{const _0x1e1598=readFileSync(_0x24b1ef,{'encoding':'utf8'});return JSON[_0x4673fa(0x1a6)](_0x1e1598);}catch(_0x50afff){throw CliErrors[_0x4673fa(0x18b)](_0x4673fa(0x18d)+_0x50afff[_0x4673fa(0x166)]);}}function resolveInitEnv(_0x508fdd){const _0x54b0f0=a31_0xc56787,_0x2e9d0d=_0x508fdd[_0x54b0f0(0x177)];if(_0x2e9d0d===undefined||_0x2e9d0d==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES['includes'](_0x2e9d0d))throw CliErrors[_0x54b0f0(0x18b)](_0x54b0f0(0x181)+_0x2e9d0d+_0x54b0f0(0x191)+RUNTIME_ENV_VALUES[_0x54b0f0(0x185)](',\x20'));return _0x2e9d0d;}
1
+ const a31_0x4966d7=a31_0xb6a6;(function(_0x3e05f0,_0x28983f){const _0x57721b=a31_0xb6a6,_0x5294eb=_0x3e05f0();while(!![]){try{const _0x1ccc37=parseInt(_0x57721b(0x1ba))/0x1+-parseInt(_0x57721b(0x182))/0x2+-parseInt(_0x57721b(0x1b3))/0x3*(-parseInt(_0x57721b(0x1a2))/0x4)+-parseInt(_0x57721b(0x184))/0x5+parseInt(_0x57721b(0x198))/0x6+parseInt(_0x57721b(0x186))/0x7*(parseInt(_0x57721b(0x18a))/0x8)+-parseInt(_0x57721b(0x1ae))/0x9;if(_0x1ccc37===_0x28983f)break;else _0x5294eb['push'](_0x5294eb['shift']());}catch(_0x9b45c8){_0x5294eb['push'](_0x5294eb['shift']());}}}(a31_0x1dac,0x9c413));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';function a31_0xb6a6(_0x415d13,_0x7822ec){_0x415d13=_0x415d13-0x180;const _0x1dac85=a31_0x1dac();let _0xb6a6b9=_0x1dac85[_0x415d13];return _0xb6a6b9;}import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0x4966d7(0x19d),'type':a31_0x4966d7(0x18e),'description':a31_0x4966d7(0x199)},{'name':a31_0x4966d7(0x1bf),'type':a31_0x4966d7(0x18e),'description':a31_0x4966d7(0x1b1)+DEFAULT_CONFIG_VALUES[a31_0x4966d7(0x1bf)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a31_0x4966d7(0x19c),'description':a31_0x4966d7(0x18c)+PRODUCT_CONFIG[a31_0x4966d7(0x196)]+a31_0x4966d7(0x191),'default':![]},{'name':a31_0x4966d7(0x1ad),'type':a31_0x4966d7(0x19c),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];function a31_0x1dac(){const _0x4d37d2=['riskLevel','6741600sTqxrz','App\x20code\x20for\x20the\x20project','AbortPrompt','join','boolean','appcode','question','\x20\x20config:\x20\x20','utf8','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','4ogkxzo','defaultApp','\x20\x20env:\x20\x20\x20\x20\x20','log','once','[y/N]','message','app','close','validation','global','yes','1048500pGvqOK','parse','race','Target\x20environment\x20(default\x20','Skip\x20confirmation\x20when\x20overwriting','2565546LOfrFG','\x20\x20appcode:\x20','Usage:\x20','file','User\x20aborted\x20prompt','trim','name','143752iRcpTW','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.','cancelled','\x22.\x20Allowed:\x20','\x20\x20default:\x20','env','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Imported\x20from\x20','toLowerCase','Initialized\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','stdout','\x20already\x20exists.\x20Overwrite?','2324490FOncrd','stdin','2208475hOCyZX','apiDir','175BXjKki','object','Invalid\x20env\x20\x22','App\x20code\x20cannot\x20be\x20empty.','76136ZAxoRB','Failed\x20to\x20parse\x20source\x20file:\x20','Write\x20to\x20global\x20(~/','flagMissing','string','Override\x20imported\x20default\x20env','Override\x20imported\x20default\x20appcode',')\x20instead\x20of\x20project','removeListener','SIGINT','project','):\x20','newConfigFileName'];a31_0x1dac=function(){return _0x4d37d2;};return a31_0x1dac();}export const initImportFlagDefs=[{'name':a31_0x4966d7(0x1b6),'type':a31_0x4966d7(0x18e),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x4966d7(0x19d),'type':a31_0x4966d7(0x18e),'description':a31_0x4966d7(0x190)},{'name':'env','type':a31_0x4966d7(0x18e),'description':a31_0x4966d7(0x18f),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a31_0x4966d7(0x18c)+PRODUCT_CONFIG[a31_0x4966d7(0x196)]+a31_0x4966d7(0x191),'default':![]},{'name':'yes','type':'boolean','description':a31_0x4966d7(0x1b2),'default':![]}];export async function runInit(_0x80feeb){const _0x6bf84a=a31_0x4966d7,_0x1411ec=isNonInteractiveMode(_0x80feeb),_0x44c2ba=_0x80feeb['global']?_0x6bf84a(0x1ac):_0x6bf84a(0x194),_0x581f8a=resolveWriteConfigPath(_0x44c2ba);try{_0x1411ec?await runNonInteractive(_0x80feeb,_0x581f8a):await runInteractive(_0x80feeb,_0x581f8a);}catch(_0x46ce6c){if(_0x46ce6c instanceof AbortPrompt)throw CliErrors[_0x6bf84a(0x1bc)]();throw _0x46ce6c;}}export async function runInitImport(_0xedcca){const _0x3a0abe=a31_0x4966d7,_0x13e93c=_0xedcca[_0x3a0abe(0x1ac)]?_0x3a0abe(0x1ac):_0x3a0abe(0x194),_0x2e9501=resolveWriteConfigPath(_0x13e93c);await runFromImport(_0xedcca,_0x2e9501);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x4966d7(0x185)]);async function runFromImport(_0x29dea6,_0x59cadd){const _0x5ce5ed=a31_0x4966d7,_0x11647f=resolveFilePath(_0x29dea6[_0x5ce5ed(0x1b6)]);if(!existsSync(_0x11647f))throw CliErrors[_0x5ce5ed(0x1ab)]('Source\x20file\x20not\x20found:\x20'+_0x11647f);const _0x592bde=readSourceFile(_0x11647f),_0xd7f8cd=convertToRuntimeConfig(_0x592bde);_0x29dea6['appcode']&&(_0xd7f8cd['appcode']=String(_0x29dea6['appcode']));_0x29dea6[_0x5ce5ed(0x1bf)]&&(_0xd7f8cd[_0x5ce5ed(0x1bf)]=resolveInitEnv(_0x29dea6));if(!_0xd7f8cd[_0x5ce5ed(0x19d)])throw CliErrors[_0x5ce5ed(0x1ab)](_0x5ce5ed(0x1c4),_0x5ce5ed(0x1bb));await writeInitConfig(_0x59cadd,_0xd7f8cd,_0x29dea6),console[_0x5ce5ed(0x1a5)](_0x5ce5ed(0x1c1)+_0x11647f),console[_0x5ce5ed(0x1a5)](_0x5ce5ed(0x19f)+_0x59cadd),console[_0x5ce5ed(0x1a5)](_0x5ce5ed(0x1b4)+_0xd7f8cd[_0x5ce5ed(0x19d)]);if(_0xd7f8cd['defaultApp'])console['log'](_0x5ce5ed(0x1be)+_0xd7f8cd[_0x5ce5ed(0x1a3)]);}function convertToRuntimeConfig(_0x4cafb3){const _0x2f7abf=a31_0x4966d7;if(_0x4cafb3['apps']&&typeof _0x4cafb3['apps']===_0x2f7abf(0x187))throw CliErrors[_0x2f7abf(0x1ab)](_0x2f7abf(0x1c0),_0x2f7abf(0x1a1));const _0x3bc0cb={};for(const _0x28725b of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x4cafb3[_0x28725b]!==undefined&&(_0x3bc0cb[_0x28725b]=_0x4cafb3[_0x28725b]);}return!_0x3bc0cb['riskLevel']&&(_0x3bc0cb[_0x2f7abf(0x197)]=DEFAULT_CONFIG_VALUES[_0x2f7abf(0x197)]),_0x3bc0cb;}async function runNonInteractive(_0x5d4543,_0x2e8883){const _0x2b0ed4=a31_0x4966d7,_0x235ca9=_0x5d4543[_0x2b0ed4(0x19d)];if(!_0x235ca9)throw CliErrors[_0x2b0ed4(0x18d)]('appcode',_0x2b0ed4(0x1b5)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x518154=resolveInitEnv(_0x5d4543);await writeInitConfig(_0x2e8883,{'appcode':_0x235ca9,'env':_0x518154},_0x5d4543),console[_0x2b0ed4(0x1a5)](_0x2b0ed4(0x1c3)+_0x2e8883),console[_0x2b0ed4(0x1a5)](_0x2b0ed4(0x1b4)+_0x235ca9),console[_0x2b0ed4(0x1a5)](_0x2b0ed4(0x1a4)+_0x518154);}async function runInteractive(_0x106686,_0x2a8650){const _0x36bf6c=a31_0x4966d7,_0x22dcc0=loadExisting(_0x2a8650),_0x1a58d3=typeof _0x22dcc0?.[_0x36bf6c(0x19d)]===_0x36bf6c(0x18e)?_0x22dcc0[_0x36bf6c(0x19d)]:'',_0x35b557=resolveInitEnv(_0x106686);console[_0x36bf6c(0x1a5)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x36bf6c(0x196)]+'\x0a');if(existsSync(_0x2a8650)&&!_0x106686['yes']){const _0x5d9180=await promptYesNo('File\x20'+_0x2a8650+_0x36bf6c(0x181),![]);if(!_0x5d9180){console[_0x36bf6c(0x1a5)]('Aborted.');return;}}const _0x1d48b0=typeof _0x106686[_0x36bf6c(0x19d)]==='string'?_0x106686[_0x36bf6c(0x19d)]['trim']():'';let _0x1f5be5=_0x1d48b0;!_0x1f5be5&&(_0x1f5be5=await promptInput('App\x20code',_0x1a58d3));if(!_0x1f5be5[_0x36bf6c(0x1b8)]())throw CliErrors[_0x36bf6c(0x1ab)](_0x36bf6c(0x189));await writeInitConfig(_0x2a8650,{'appcode':_0x1f5be5[_0x36bf6c(0x1b8)](),'env':_0x35b557},_0x106686),console[_0x36bf6c(0x1a5)]('\x0aInitialized\x20'+_0x2a8650),console['log'](_0x36bf6c(0x1b4)+_0x1f5be5[_0x36bf6c(0x1b8)]()),console[_0x36bf6c(0x1a5)](_0x36bf6c(0x1a4)+_0x35b557);}async function writeInitConfig(_0x1cdeb9,_0x16e26b,_0x70980e){const _0x372183=a31_0x4966d7;let _0x26148a={};existsSync(_0x1cdeb9)&&!_0x70980e[_0x372183(0x1ad)]&&(_0x26148a=readConfigFile(_0x1cdeb9));for(const [_0x461c07,_0xec5ef9]of Object['entries'](_0x16e26b)){_0xec5ef9!==undefined&&(_0x26148a[_0x461c07]=_0xec5ef9);}if(_0x26148a[_0x372183(0x1a9)])delete _0x26148a[_0x372183(0x1a9)];writeConfigFile(_0x1cdeb9,_0x26148a);}class AbortPrompt extends Error{constructor(){const _0x370ec4=a31_0x4966d7;super(_0x370ec4(0x1b7)),this[_0x370ec4(0x1b9)]=_0x370ec4(0x19a);}}function createSafeRl(){const _0x38e964=a31_0x4966d7,_0xbada0d=createInterface({'input':process[_0x38e964(0x183)],'output':process[_0x38e964(0x180)]});let _0x4cbcae;const _0x214afa=new Promise((_0x31e029,_0x14257c)=>{const _0x4b10e8=_0x38e964;_0x4cbcae=()=>{const _0x3eb432=a31_0xb6a6;_0x4cbcae&&(_0xbada0d['removeListener'](_0x3eb432(0x193),_0x4cbcae),_0x4cbcae=undefined);try{_0xbada0d[_0x3eb432(0x1aa)]();}catch{}_0x14257c(new AbortPrompt());},_0xbada0d[_0x4b10e8(0x1a6)]('SIGINT',_0x4cbcae);}),_0x331487=()=>{const _0x4a8d9d=_0x38e964;_0x4cbcae&&(_0xbada0d[_0x4a8d9d(0x192)](_0x4a8d9d(0x193),_0x4cbcae),_0x4cbcae=undefined);try{_0xbada0d[_0x4a8d9d(0x1aa)]();}catch{}};return{'rl':_0xbada0d,'abortPromise':_0x214afa,'disposeSuccess':_0x331487};}async function promptInput(_0x5a3e0e,_0x370f37){const _0x59cce5=a31_0x4966d7,{rl:_0x440bee,abortPromise:_0x5b3848,disposeSuccess:_0x3aa25a}=createSafeRl(),_0x106cdf=new Promise(_0x5ef27e=>{const _0x4d3177=a31_0xb6a6,_0x5f2455=_0x370f37?'\x20\x20'+_0x5a3e0e+'\x20('+_0x370f37+_0x4d3177(0x195):'\x20\x20'+_0x5a3e0e+':\x20';_0x440bee['question'](_0x5f2455,_0x377a56=>{const _0x4bd536=_0x4d3177;_0x3aa25a(),_0x5ef27e(_0x377a56[_0x4bd536(0x1b8)]()||_0x370f37);});});return Promise[_0x59cce5(0x1b0)]([_0x106cdf,_0x5b3848]);}async function promptYesNo(_0x593e5e,_0x3485ba){const _0x3a64bb=a31_0x4966d7,{rl:_0x5b5cee,abortPromise:_0xc43c77,disposeSuccess:_0x41a854}=createSafeRl(),_0x23bbf0=new Promise(_0x245b86=>{const _0x240fb0=a31_0xb6a6,_0x4bef16=_0x3485ba?'[Y/n]':_0x240fb0(0x1a7);_0x5b5cee[_0x240fb0(0x19e)]('\x20\x20'+_0x593e5e+'\x20'+_0x4bef16+':\x20',_0x16a14f=>{const _0x2f02c1=_0x240fb0;_0x41a854();const _0x457715=_0x16a14f[_0x2f02c1(0x1b8)]()[_0x2f02c1(0x1c2)]();if(_0x457715==='y'||_0x457715===_0x2f02c1(0x1ad))_0x245b86(!![]);else{if(_0x457715==='n'||_0x457715==='no')_0x245b86(![]);else _0x245b86(_0x3485ba);}});});return Promise[_0x3a64bb(0x1b0)]([_0x23bbf0,_0xc43c77]);}function loadExisting(_0x446549){if(!existsSync(_0x446549))return null;return readConfigFile(_0x446549);}function resolveFilePath(_0x57db9f){return isAbsolute(_0x57db9f)?_0x57db9f:resolve(process['cwd'](),_0x57db9f);}function readSourceFile(_0xb103bb){const _0xa3f96b=a31_0x4966d7;try{const _0x1b44df=readFileSync(_0xb103bb,{'encoding':_0xa3f96b(0x1a0)});return JSON[_0xa3f96b(0x1af)](_0x1b44df);}catch(_0x401d6e){throw CliErrors[_0xa3f96b(0x1ab)](_0xa3f96b(0x18b)+_0x401d6e[_0xa3f96b(0x1a8)]);}}function resolveInitEnv(_0x5e3632){const _0x232216=a31_0x4966d7,_0x53135c=_0x5e3632[_0x232216(0x1bf)];if(_0x53135c===undefined||_0x53135c==='')return DEFAULT_CONFIG_VALUES[_0x232216(0x1bf)];if(!RUNTIME_ENV_VALUES['includes'](_0x53135c))throw CliErrors[_0x232216(0x1ab)](_0x232216(0x188)+_0x53135c+_0x232216(0x1bd)+RUNTIME_ENV_VALUES[_0x232216(0x19b)](',\x20'));return _0x53135c;}
@@ -1 +1 @@
1
- const a32_0x2f30d7=a32_0x4063;(function(_0x4f05f5,_0x360b53){const _0x375732=a32_0x4063,_0x29b997=_0x4f05f5();while(!![]){try{const _0x5a53cb=parseInt(_0x375732(0x15e))/0x1*(parseInt(_0x375732(0x178))/0x2)+parseInt(_0x375732(0x166))/0x3+parseInt(_0x375732(0x176))/0x4*(-parseInt(_0x375732(0x154))/0x5)+parseInt(_0x375732(0x167))/0x6+-parseInt(_0x375732(0x152))/0x7*(parseInt(_0x375732(0x171))/0x8)+parseInt(_0x375732(0x150))/0x9+parseInt(_0x375732(0x139))/0xa;if(_0x5a53cb===_0x360b53)break;else _0x29b997['push'](_0x29b997['shift']());}catch(_0x3b3025){_0x29b997['push'](_0x29b997['shift']());}}}(a32_0x5927,0x298dc));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x2f30d7(0x165),'type':'string','required':!![],'description':a32_0x2f30d7(0x162)},FILE_FLAG={'name':a32_0x2f30d7(0x174),'type':a32_0x2f30d7(0x16b),'required':!![],'description':a32_0x2f30d7(0x175)},QUERY_FLAG={'name':a32_0x2f30d7(0x15a),'type':a32_0x2f30d7(0x16b),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x2f30d7(0x177),'type':a32_0x2f30d7(0x15b),'description':a32_0x2f30d7(0x168)};function readKnowledgeFile(_0x4c14aa){const _0x514a59=a32_0x2f30d7;if(!_0x4c14aa)throw CliErrors[_0x514a59(0x161)](_0x514a59(0x158));if(!existsSync(_0x4c14aa))throw CliErrors[_0x514a59(0x161)](_0x514a59(0x15d)+_0x4c14aa);if(!statSync(_0x4c14aa)[_0x514a59(0x169)]())throw CliErrors[_0x514a59(0x161)](_0x514a59(0x13d)+_0x4c14aa);return readFileSync(_0x4c14aa,'utf8');}function summarizePersonalItem(_0xc992d6){const _0x4b2699=a32_0x2f30d7;return{'id':_0xc992d6['id'],'title':_0xc992d6[_0x4b2699(0x165)],'version':_0xc992d6[_0x4b2699(0x14a)],'ragStatus':_0xc992d6['ragStatus'],'ragErrorMessage':_0xc992d6[_0x4b2699(0x172)],'updateTime':_0xc992d6['updateTime']};}function detailPersonalItem(_0xcc113){const _0x2d149e=a32_0x2f30d7;return{'id':_0xcc113['id'],'appCode':_0xcc113[_0x2d149e(0x143)],'scope':_0xcc113['scope'],'userId':_0xcc113['userId'],'title':_0xcc113[_0x2d149e(0x165)],'content':_0xcc113[_0x2d149e(0x146)]??'','version':_0xcc113[_0x2d149e(0x14a)],'ragStatus':_0xcc113[_0x2d149e(0x148)],'ragErrorMessage':_0xcc113[_0x2d149e(0x172)],'createTime':_0xcc113[_0x2d149e(0x16d)],'updateTime':_0xcc113[_0x2d149e(0x151)]};}function summarizeSearchHit(_0xf6012){const _0x5bf17a=a32_0x2f30d7;return{'scope':_0xf6012[_0x5bf17a(0x14e)],'title':_0xf6012[_0x5bf17a(0x165)],'docId':_0xf6012[_0x5bf17a(0x173)],'score':_0xf6012[_0x5bf17a(0x15c)],'weightedScore':_0xf6012[_0x5bf17a(0x141)],'content':_0xf6012[_0x5bf17a(0x146)],'metadata':_0xf6012['metadata']};}function readTopK(_0x4ad341){const _0x3f8274=a32_0x2f30d7,_0x53aa1f=_0x4ad341[_0x3f8274(0x13c)](_0x3f8274(0x177));if(_0x53aa1f===undefined||_0x53aa1f===null||_0x53aa1f==='')return undefined;const _0x158545=_0x4ad341[_0x3f8274(0x155)](_0x3f8274(0x177));if(!Number[_0x3f8274(0x149)](_0x158545)||_0x158545<0x1)throw CliErrors['validation'](_0x3f8274(0x147));return _0x158545;}function a32_0x5927(){const _0xea7626=['str','1583768beOepv','ragErrorMessage','docId','file','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','1278644wqwPnL','topk','105778yPgAxN','length','139080cUvyPc','verbose','read','flag','File\x20is\x20not\x20a\x20regular\x20file:\x20','search','list','Search\x20query\x20is\x20required.','weightedScore','bool','appCode','POST','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','content','--topk\x20must\x20be\x20a\x20positive\x20number.','ragStatus','isFinite','version','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','trim','scope','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','555804swyDGf','updateTime','7WjZqoe','/update','5NUcaQi','num','body','map','File\x20path\x20is\x20required.','description','query','number','score','File\x20not\x20found:\x20','2OvQvOU','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Personal\x20knowledge-base\x20entry\x20ID','validation','Personal\x20knowledge-base\x20entry\x20title','create','/client/knowledge-base/personal/','title','860712HLnjDh','1316940xSYvOb','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','isFile','write','string','build','createTime','/client/knowledge-base/personal/create','update'];a32_0x5927=function(){return _0xea7626;};return a32_0x5927();}function a32_0x4063(_0x8a621,_0x282b6b){_0x8a621=_0x8a621-0x139;const _0x5927e5=a32_0x5927();let _0x4063fc=_0x5927e5[_0x8a621];return _0x4063fc;}const kbList={'service':'kb','command':a32_0x2f30d7(0x13f),'description':a32_0x2f30d7(0x14b),'risk':a32_0x2f30d7(0x13b),'flags':[VERBOSE_FLAG],async 'execute'(_0x3fc1e8){const _0x4a8ce1=a32_0x2f30d7,_0x54f7e0=await listPersonalKnowledgeBaseItems(_0x3fc1e8[_0x4a8ce1(0x143)]);if(_0x3fc1e8[_0x4a8ce1(0x142)](_0x4a8ce1(0x13a)))return{'ok':!![],'data':{'total':_0x54f7e0[_0x4a8ce1(0x179)],'items':_0x54f7e0}};return{'ok':!![],'data':{'total':_0x54f7e0['length'],'items':_0x54f7e0['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a32_0x2f30d7(0x13b),'flags':[{...ID_FLAG,'description':a32_0x2f30d7(0x160)}],async 'execute'(_0x255262){const _0x54fb76=a32_0x2f30d7,_0x362877=await getPersonalKnowledgeBaseItem(_0x255262[_0x54fb76(0x155)]('id'),_0x255262[_0x54fb76(0x143)]);return{'ok':!![],'data':detailPersonalItem(_0x362877)};}},kbCreate={'service':'kb','command':a32_0x2f30d7(0x163),'description':a32_0x2f30d7(0x15f),'risk':a32_0x2f30d7(0x16a),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x548e5f){const _0x1b4a46=a32_0x2f30d7,_0x4e36c0=_0x548e5f[_0x1b4a46(0x170)]('title'),_0x487fae=readKnowledgeFile(_0x548e5f['str']('file')),_0x5a6ab3=await createPersonalKnowledgeBaseItem(_0x548e5f['appCode'],{'title':_0x4e36c0,'content':_0x487fae});return{'ok':!![],'data':summarizePersonalItem(_0x5a6ab3),'message':'Created\x20KB\x20entry\x20'+_0x5a6ab3['id']+'\x20('+_0x5a6ab3[_0x1b4a46(0x165)]+')'};},async 'dryRun'(_0x3a7f93){const _0x45683e=a32_0x2f30d7,_0x3dd217=_0x3a7f93[_0x45683e(0x170)](_0x45683e(0x165)),_0x236057=readKnowledgeFile(_0x3a7f93[_0x45683e(0x170)]('file'));return dryRun(_0x45683e(0x144),_0x45683e(0x16e))[_0x45683e(0x156)]({'appCode':_0x3a7f93[_0x45683e(0x143)],'title':_0x3dd217,'content':_0x236057})['description'](_0x45683e(0x14f)+_0x3dd217+'\x22')[_0x45683e(0x16c)]();}},kbUpdate={'service':'kb','command':a32_0x2f30d7(0x16f),'description':a32_0x2f30d7(0x145),'risk':a32_0x2f30d7(0x16a),'flags':[{...ID_FLAG,'description':a32_0x2f30d7(0x160)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x19e041){const _0xf57a87=a32_0x2f30d7,_0x4c8fa5=_0x19e041[_0xf57a87(0x155)]('id'),_0x4178e8=readKnowledgeFile(_0x19e041[_0xf57a87(0x170)](_0xf57a87(0x174))),_0xa61b9b=_0x19e041['str'](_0xf57a87(0x165))||(await getPersonalKnowledgeBaseItem(_0x4c8fa5,_0x19e041[_0xf57a87(0x143)]))[_0xf57a87(0x165)],_0x41cfa8=await updatePersonalKnowledgeBaseItem(_0x4c8fa5,_0x19e041[_0xf57a87(0x143)],{'title':_0xa61b9b,'content':_0x4178e8});return{'ok':!![],'data':summarizePersonalItem(_0x41cfa8),'message':'Updated\x20KB\x20entry\x20'+_0x41cfa8['id']+'\x20('+_0x41cfa8[_0xf57a87(0x165)]+')'};},async 'dryRun'(_0x23d018){const _0x23bd47=a32_0x2f30d7,_0x2697d6=_0x23d018[_0x23bd47(0x155)]('id'),_0x2b3296=readKnowledgeFile(_0x23d018['str'](_0x23bd47(0x174))),_0x5b319c=_0x23d018[_0x23bd47(0x170)](_0x23bd47(0x165))||(await getPersonalKnowledgeBaseItem(_0x2697d6,_0x23d018['appCode']))[_0x23bd47(0x165)];return dryRun(_0x23bd47(0x144),_0x23bd47(0x164)+_0x2697d6+_0x23bd47(0x153))[_0x23bd47(0x156)]({'appCode':_0x23d018['appCode'],'title':_0x5b319c,'content':_0x2b3296})[_0x23bd47(0x159)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x2697d6)[_0x23bd47(0x16c)]();}},kbSearch={'service':'kb','command':a32_0x2f30d7(0x13e),'description':a32_0x2f30d7(0x14c),'risk':a32_0x2f30d7(0x13b),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0xcc7d40){const _0x4eff52=a32_0x2f30d7;if(!_0xcc7d40[_0x4eff52(0x170)](_0x4eff52(0x15a))[_0x4eff52(0x14d)]())throw CliErrors[_0x4eff52(0x161)](_0x4eff52(0x140));readTopK(_0xcc7d40);},async 'execute'(_0xd1237a){const _0x3a04e6=a32_0x2f30d7,_0x2eab56=_0xd1237a[_0x3a04e6(0x170)](_0x3a04e6(0x15a))[_0x3a04e6(0x14d)](),_0x355cbe=readTopK(_0xd1237a),_0x4ad4d4=await searchKnowledgeBase(_0xd1237a['appCode'],{'query':_0x2eab56,'topK':_0x355cbe});return{'ok':!![],'data':{'total':_0x4ad4d4[_0x3a04e6(0x179)],'hits':_0x4ad4d4[_0x3a04e6(0x157)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x494a46=a32_0x2c76;(function(_0x27cbe7,_0x43457e){const _0x5eaeb0=a32_0x2c76,_0x4938ce=_0x27cbe7();while(!![]){try{const _0x43cd61=parseInt(_0x5eaeb0(0x1a3))/0x1+-parseInt(_0x5eaeb0(0x1d9))/0x2+-parseInt(_0x5eaeb0(0x19f))/0x3*(parseInt(_0x5eaeb0(0x1b0))/0x4)+-parseInt(_0x5eaeb0(0x1be))/0x5+-parseInt(_0x5eaeb0(0x1a7))/0x6*(-parseInt(_0x5eaeb0(0x1d5))/0x7)+parseInt(_0x5eaeb0(0x1bc))/0x8*(-parseInt(_0x5eaeb0(0x1cb))/0x9)+parseInt(_0x5eaeb0(0x1c0))/0xa*(parseInt(_0x5eaeb0(0x1d8))/0xb);if(_0x43cd61===_0x43457e)break;else _0x4938ce['push'](_0x4938ce['shift']());}catch(_0x4202a1){_0x4938ce['push'](_0x4938ce['shift']());}}}(a32_0x57e8,0x4a4bd));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':'title','type':a32_0x494a46(0x1a4),'required':!![],'description':a32_0x494a46(0x1c8)},FILE_FLAG={'name':'file','type':a32_0x494a46(0x1a4),'required':!![],'description':a32_0x494a46(0x1bf)},QUERY_FLAG={'name':a32_0x494a46(0x1d7),'type':a32_0x494a46(0x1a4),'required':!![],'description':a32_0x494a46(0x1c5)},TOPK_FLAG={'name':a32_0x494a46(0x1aa),'type':a32_0x494a46(0x1ba),'description':a32_0x494a46(0x1d4)};function readKnowledgeFile(_0x367491){const _0x42e457=a32_0x494a46;if(!_0x367491)throw CliErrors[_0x42e457(0x1c4)](_0x42e457(0x1c7));if(!existsSync(_0x367491))throw CliErrors[_0x42e457(0x1c4)](_0x42e457(0x1d0)+_0x367491);if(!statSync(_0x367491)['isFile']())throw CliErrors['validation'](_0x42e457(0x1ad)+_0x367491);return readFileSync(_0x367491,_0x42e457(0x1ab));}function summarizePersonalItem(_0x2160ea){const _0x421fb1=a32_0x494a46;return{'id':_0x2160ea['id'],'title':_0x2160ea['title'],'version':_0x2160ea['version'],'ragStatus':_0x2160ea['ragStatus'],'ragErrorMessage':_0x2160ea[_0x421fb1(0x1c2)],'updateTime':_0x2160ea[_0x421fb1(0x19e)]};}function detailPersonalItem(_0x32de15){const _0x5cb12b=a32_0x494a46;return{'id':_0x32de15['id'],'appCode':_0x32de15[_0x5cb12b(0x1d2)],'scope':_0x32de15[_0x5cb12b(0x1b1)],'userId':_0x32de15[_0x5cb12b(0x1ae)],'title':_0x32de15['title'],'content':_0x32de15[_0x5cb12b(0x1af)]??'','version':_0x32de15[_0x5cb12b(0x1c1)],'ragStatus':_0x32de15[_0x5cb12b(0x1a6)],'ragErrorMessage':_0x32de15['ragErrorMessage'],'createTime':_0x32de15[_0x5cb12b(0x19b)],'updateTime':_0x32de15[_0x5cb12b(0x19e)]};}function summarizeSearchHit(_0x273b1a){const _0x3512dd=a32_0x494a46;return{'scope':_0x273b1a[_0x3512dd(0x1b1)],'title':_0x273b1a[_0x3512dd(0x1ca)],'docId':_0x273b1a[_0x3512dd(0x1cc)],'score':_0x273b1a[_0x3512dd(0x1cf)],'weightedScore':_0x273b1a[_0x3512dd(0x1b6)],'content':_0x273b1a[_0x3512dd(0x1af)],'metadata':_0x273b1a[_0x3512dd(0x1b2)]};}function readTopK(_0x46739c){const _0x5ed7a5=a32_0x494a46,_0x26025b=_0x46739c[_0x5ed7a5(0x1bb)]('topk');if(_0x26025b===undefined||_0x26025b===null||_0x26025b==='')return undefined;const _0x51c062=_0x46739c[_0x5ed7a5(0x1c6)](_0x5ed7a5(0x1aa));if(!Number[_0x5ed7a5(0x19d)](_0x51c062)||_0x51c062<0x1)throw CliErrors[_0x5ed7a5(0x1c4)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x51c062;}const kbList={'service':'kb','command':a32_0x494a46(0x1a5),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0xef97ec){const _0x45e51c=a32_0x494a46,_0x6c6a53=await listPersonalKnowledgeBaseItems(_0xef97ec['appCode']);if(_0xef97ec['bool'](_0x45e51c(0x1b7)))return{'ok':!![],'data':{'total':_0x6c6a53[_0x45e51c(0x1a1)],'items':_0x6c6a53}};return{'ok':!![],'data':{'total':_0x6c6a53[_0x45e51c(0x1a1)],'items':_0x6c6a53[_0x45e51c(0x1a0)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x494a46(0x1b8),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a32_0x494a46(0x1ac),'flags':[{...ID_FLAG,'description':a32_0x494a46(0x1d3)}],async 'execute'(_0x23354e){const _0x2150c5=a32_0x494a46,_0x123952=await getPersonalKnowledgeBaseItem(_0x23354e[_0x2150c5(0x1c6)]('id'),_0x23354e[_0x2150c5(0x1d2)]);return{'ok':!![],'data':detailPersonalItem(_0x123952)};}},kbCreate={'service':'kb','command':'create','description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a32_0x494a46(0x1d1),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0xb02a78){const _0x3746e2=a32_0x494a46,_0x5f42f1=_0xb02a78['str'](_0x3746e2(0x1ca)),_0xd8b518=readKnowledgeFile(_0xb02a78[_0x3746e2(0x1a9)](_0x3746e2(0x1a8))),_0x1d9ff2=await createPersonalKnowledgeBaseItem(_0xb02a78[_0x3746e2(0x1d2)],{'title':_0x5f42f1,'content':_0xd8b518});return{'ok':!![],'data':summarizePersonalItem(_0x1d9ff2),'message':'Created\x20KB\x20entry\x20'+_0x1d9ff2['id']+'\x20('+_0x1d9ff2[_0x3746e2(0x1ca)]+')'};},async 'dryRun'(_0x462c91){const _0x222b4a=a32_0x494a46,_0x3553e1=_0x462c91[_0x222b4a(0x1a9)](_0x222b4a(0x1ca)),_0x5559c7=readKnowledgeFile(_0x462c91[_0x222b4a(0x1a9)]('file'));return dryRun('POST',_0x222b4a(0x1b3))[_0x222b4a(0x1ce)]({'appCode':_0x462c91[_0x222b4a(0x1d2)],'title':_0x3553e1,'content':_0x5559c7})[_0x222b4a(0x1cd)](_0x222b4a(0x1b9)+_0x3553e1+'\x22')[_0x222b4a(0x1a2)]();}},kbUpdate={'service':'kb','command':a32_0x494a46(0x1d6),'description':a32_0x494a46(0x1c3),'risk':a32_0x494a46(0x1d1),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x494a46(0x1c9)},FILE_FLAG],async 'execute'(_0x452d9a){const _0x21490e=a32_0x494a46,_0x1c0791=_0x452d9a[_0x21490e(0x1c6)]('id'),_0x1112b6=readKnowledgeFile(_0x452d9a[_0x21490e(0x1a9)]('file')),_0x448c47=_0x452d9a[_0x21490e(0x1a9)](_0x21490e(0x1ca))||(await getPersonalKnowledgeBaseItem(_0x1c0791,_0x452d9a[_0x21490e(0x1d2)]))[_0x21490e(0x1ca)],_0x283135=await updatePersonalKnowledgeBaseItem(_0x1c0791,_0x452d9a['appCode'],{'title':_0x448c47,'content':_0x1112b6});return{'ok':!![],'data':summarizePersonalItem(_0x283135),'message':_0x21490e(0x1bd)+_0x283135['id']+'\x20('+_0x283135[_0x21490e(0x1ca)]+')'};},async 'dryRun'(_0x434ca2){const _0x1fc3ae=a32_0x494a46,_0x739d01=_0x434ca2[_0x1fc3ae(0x1c6)]('id'),_0x4ad223=readKnowledgeFile(_0x434ca2[_0x1fc3ae(0x1a9)](_0x1fc3ae(0x1a8))),_0x737a8a=_0x434ca2[_0x1fc3ae(0x1a9)]('title')||(await getPersonalKnowledgeBaseItem(_0x739d01,_0x434ca2[_0x1fc3ae(0x1d2)]))['title'];return dryRun('POST',_0x1fc3ae(0x1b5)+_0x739d01+'/update')['body']({'appCode':_0x434ca2[_0x1fc3ae(0x1d2)],'title':_0x737a8a,'content':_0x4ad223})['description']('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x739d01)['build']();}},kbSearch={'service':'kb','command':'search','description':a32_0x494a46(0x19c),'risk':a32_0x494a46(0x1ac),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x18f1b9){const _0x58ba12=a32_0x494a46;if(!_0x18f1b9['str'](_0x58ba12(0x1d7))[_0x58ba12(0x1b4)]())throw CliErrors['validation']('Search\x20query\x20is\x20required.');readTopK(_0x18f1b9);},async 'execute'(_0x38a4a1){const _0x58f415=a32_0x494a46,_0xb5805e=_0x38a4a1['str'](_0x58f415(0x1d7))['trim'](),_0x4622df=readTopK(_0x38a4a1),_0xa7b94=await searchKnowledgeBase(_0x38a4a1[_0x58f415(0x1d2)],{'query':_0xb5805e,'topK':_0x4622df});return{'ok':!![],'data':{'total':_0xa7b94['length'],'hits':_0xa7b94[_0x58f415(0x1a0)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];function a32_0x2c76(_0x427681,_0xe5f725){_0x427681=_0x427681-0x19b;const _0x57e8ee=a32_0x57e8();let _0x2c7676=_0x57e8ee[_0x427681];return _0x2c7676;}function a32_0x57e8(){const _0x2ba90f=['scope','metadata','/client/knowledge-base/personal/create','trim','/client/knowledge-base/personal/','weightedScore','verbose','detail','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','number','flag','80LrMicG','Updated\x20KB\x20entry\x20','2661595KyyDIi','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','965720upqwuc','version','ragErrorMessage','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','validation','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','num','File\x20path\x20is\x20required.','Personal\x20knowledge-base\x20entry\x20title','Override\x20the\x20existing\x20entry\x20title','title','83853nAaEGw','docId','description','body','score','File\x20not\x20found:\x20','write','appCode','Personal\x20knowledge-base\x20entry\x20ID','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','133ykIzcM','update','query','77evnjof','1005708nrYnZm','createTime','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','isFinite','updateTime','3qxsBfY','map','length','build','608323yIyKyQ','string','list','ragStatus','187416tQpPEp','file','str','topk','utf8','read','File\x20is\x20not\x20a\x20regular\x20file:\x20','userId','content','1780604yocNmE'];a32_0x57e8=function(){return _0x2ba90f;};return a32_0x57e8();}
@@ -1 +1 @@
1
- const a33_0x5e22bd=a33_0x1de2;(function(_0x2c88f8,_0x47d48e){const _0x2e0a00=a33_0x1de2,_0x5d5119=_0x2c88f8();while(!![]){try{const _0x1c6c97=parseInt(_0x2e0a00(0x13d))/0x1*(-parseInt(_0x2e0a00(0x152))/0x2)+parseInt(_0x2e0a00(0x13f))/0x3*(-parseInt(_0x2e0a00(0x148))/0x4)+parseInt(_0x2e0a00(0x158))/0x5+-parseInt(_0x2e0a00(0x146))/0x6+-parseInt(_0x2e0a00(0x151))/0x7+parseInt(_0x2e0a00(0x147))/0x8+parseInt(_0x2e0a00(0x142))/0x9;if(_0x1c6c97===_0x47d48e)break;else _0x5d5119['push'](_0x5d5119['shift']());}catch(_0x4c9b9c){_0x5d5119['push'](_0x5d5119['shift']());}}}(a33_0xa4d5,0xcdad7));import{logger}from'../../utils/logger.js';function a33_0x1de2(_0x1129b9,_0x70c71c){_0x1129b9=_0x1129b9-0x13c;const _0xa4d5c7=a33_0xa4d5();let _0x1de2da=_0xa4d5c7[_0x1129b9];return _0x1de2da;}function a33_0xa4d5(){const _0x36ba34=['level','20586141nzRdRf','length','\x20\x20\x20Duration:\x20','\x20\x20\x20Time:\x20','2967006KfIive','3526424qMLQKK','8LOxCKE','keys','View\x20command\x20history\x20logs','toLocaleString','read','log','error','duration','*\x20No\x20logs\x20found','10994900zmUnhw','2906nCjeoS','\x20logs:\x0a','clearLogs','en-US','write','\x20\x20\x20Details:\x20','6007095vFqVqJ','clear','Clear\x20command\x20history\x20logs','forEach','details','stringify','command','569NkVIii','show','292737atjQem','logs'];a33_0xa4d5=function(){return _0x36ba34;};return a33_0xa4d5();}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x19e518){const _0x2468fa=a33_0x1de2;if(_0x19e518[_0x2468fa(0x143)]===0x0){console[_0x2468fa(0x14d)](_0x2468fa(0x150));return;}console[_0x2468fa(0x14d)]('*\x20'+CLI_DISPLAY_NAME+_0x2468fa(0x153)),_0x19e518[_0x2468fa(0x15b)]((_0x351cc6,_0x53acb8)=>{const _0x12619d=_0x2468fa,_0x558b84=new Date(_0x351cc6['timestamp'])[_0x12619d(0x14b)](_0x12619d(0x155)),_0x5d6cf7=_0x351cc6[_0x12619d(0x141)]==='success'?'√':_0x351cc6[_0x12619d(0x141)]===_0x12619d(0x14e)?'×':_0x351cc6[_0x12619d(0x141)]==='warn'?'!':'i';console[_0x12619d(0x14d)](_0x53acb8+0x1+'.\x20'+_0x5d6cf7+'\x20['+_0x351cc6[_0x12619d(0x13c)]+']\x20'+_0x351cc6['message']),console['log'](_0x12619d(0x145)+_0x558b84),_0x351cc6[_0x12619d(0x14f)]&&console['log'](_0x12619d(0x144)+_0x351cc6[_0x12619d(0x14f)]+'ms'),_0x351cc6[_0x12619d(0x15c)]&&Object[_0x12619d(0x149)](_0x351cc6['details'])[_0x12619d(0x143)]>0x0&&console['log'](_0x12619d(0x157)+JSON[_0x12619d(0x15d)](_0x351cc6['details'],null,0x2)),console[_0x12619d(0x14d)]('');});}export const logsDefinitions=[{'service':a33_0x5e22bd(0x140),'command':a33_0x5e22bd(0x13e),'description':a33_0x5e22bd(0x14a),'risk':a33_0x5e22bd(0x14c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x404b9d){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':'logs','command':a33_0x5e22bd(0x159),'description':a33_0x5e22bd(0x15a),'risk':a33_0x5e22bd(0x156),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2b3a6a){const _0x408e60=a33_0x5e22bd;return logger[_0x408e60(0x154)](),console[_0x408e60(0x14d)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
1
+ const a33_0xa591ca=a33_0x214c;(function(_0x4a049a,_0x4ca269){const _0x443017=a33_0x214c,_0x51bebd=_0x4a049a();while(!![]){try{const _0xcf330c=parseInt(_0x443017(0x14e))/0x1+-parseInt(_0x443017(0x15b))/0x2+-parseInt(_0x443017(0x165))/0x3+parseInt(_0x443017(0x15e))/0x4*(parseInt(_0x443017(0x149))/0x5)+parseInt(_0x443017(0x152))/0x6*(parseInt(_0x443017(0x153))/0x7)+parseInt(_0x443017(0x164))/0x8*(-parseInt(_0x443017(0x15d))/0x9)+parseInt(_0x443017(0x14c))/0xa;if(_0xcf330c===_0x4ca269)break;else _0x51bebd['push'](_0x51bebd['shift']());}catch(_0x1218e3){_0x51bebd['push'](_0x51bebd['shift']());}}}(a33_0x39ff,0x4be40));import{logger}from'../../utils/logger.js';function a33_0x214c(_0x442fa4,_0x42c8b9){_0x442fa4=_0x442fa4-0x144;const _0x39ff48=a33_0x39ff();let _0x214c93=_0x39ff48[_0x442fa4];return _0x214c93;}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x39ff(){const _0x3891a4=['4lEmABi','\x20\x20\x20Duration:\x20','log','en-US','Clear\x20command\x20history\x20logs','timestamp','1113592nKuPzu','773535XzJRpa','show','readLogs','*\x20No\x20logs\x20found','duration','keys','error','read','30575ELyqbw','write','details','189410ikAwcB','command','400049kvtOPT','\x20\x20\x20Details:\x20','success','stringify','6fxcIal','3993633KoHSGU','View\x20command\x20history\x20logs','logs','length','toLocaleString','clearLogs','\x20\x20\x20Time:\x20','level','575464lYswAM','warn','9pEcwMv'];a33_0x39ff=function(){return _0x3891a4;};return a33_0x39ff();}function printLogs(_0x2d21d5){const _0x2fecb1=a33_0x214c;if(_0x2d21d5[_0x2fecb1(0x156)]===0x0){console['log'](_0x2fecb1(0x144));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x2d21d5['forEach']((_0x2a5148,_0x5eb39f)=>{const _0x38204a=_0x2fecb1,_0x51db2d=new Date(_0x2a5148[_0x38204a(0x163)])[_0x38204a(0x157)](_0x38204a(0x161)),_0x728b9c=_0x2a5148[_0x38204a(0x15a)]===_0x38204a(0x150)?'√':_0x2a5148['level']===_0x38204a(0x147)?'×':_0x2a5148['level']===_0x38204a(0x15c)?'!':'i';console[_0x38204a(0x160)](_0x5eb39f+0x1+'.\x20'+_0x728b9c+'\x20['+_0x2a5148[_0x38204a(0x14d)]+']\x20'+_0x2a5148['message']),console[_0x38204a(0x160)](_0x38204a(0x159)+_0x51db2d),_0x2a5148[_0x38204a(0x145)]&&console[_0x38204a(0x160)](_0x38204a(0x15f)+_0x2a5148[_0x38204a(0x145)]+'ms'),_0x2a5148[_0x38204a(0x14b)]&&Object[_0x38204a(0x146)](_0x2a5148[_0x38204a(0x14b)])[_0x38204a(0x156)]>0x0&&console[_0x38204a(0x160)](_0x38204a(0x14f)+JSON[_0x38204a(0x151)](_0x2a5148['details'],null,0x2)),console[_0x38204a(0x160)]('');});}export const logsDefinitions=[{'service':a33_0xa591ca(0x155),'command':a33_0xa591ca(0x166),'description':a33_0xa591ca(0x154),'risk':a33_0xa591ca(0x148),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x53f2c0){const _0x270232=a33_0xa591ca;return printLogs(logger[_0x270232(0x167)]()),{'ok':!![]};}},{'service':a33_0xa591ca(0x155),'command':'clear','description':a33_0xa591ca(0x162),'risk':a33_0xa591ca(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4ec5eb){const _0x42ffbe=a33_0xa591ca;return logger[_0x42ffbe(0x158)](),console[_0x42ffbe(0x160)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x3a7f88=a34_0x1ad4;function a34_0x1ad4(_0x2d8a69,_0x381ae4){_0x2d8a69=_0x2d8a69-0x1b4;const _0x423103=a34_0x4231();let _0x1ad4e1=_0x423103[_0x2d8a69];return _0x1ad4e1;}(function(_0x16cb9f,_0x572ea2){const _0x4d5f3b=a34_0x1ad4,_0x36954d=_0x16cb9f();while(!![]){try{const _0x1a1d93=-parseInt(_0x4d5f3b(0x1b6))/0x1+parseInt(_0x4d5f3b(0x1c7))/0x2+parseInt(_0x4d5f3b(0x1bf))/0x3+parseInt(_0x4d5f3b(0x1ce))/0x4+parseInt(_0x4d5f3b(0x1c1))/0x5+parseInt(_0x4d5f3b(0x1e5))/0x6+-parseInt(_0x4d5f3b(0x1c9))/0x7*(parseInt(_0x4d5f3b(0x1c5))/0x8);if(_0x1a1d93===_0x572ea2)break;else _0x36954d['push'](_0x36954d['shift']());}catch(_0x3a301f){_0x36954d['push'](_0x36954d['shift']());}}}(a34_0x4231,0xe474f));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a34_0x4231(){const _0x15c2ba=['string','/client/ocr','write','\x20OCR\x20from\x20URL','POST','build','Publicly\x20accessible\x20image\x20or\x20file\x20URL','length','description','validation','path','fileUrl','filter','ocr','.\x20Supported\x20scenes:\x20','idCard','<filePath\x20returned\x20by\x20/client/uploadFile>','str','trim','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','8837832CMlcUa','filePath','General','1429475NshSQE','scene','Unsupported\x20OCR\x20scene:\x20','body','imageFile','apiError','fileName','Invoice','toLowerCase','2446917OEdmTe','\x20OCR','2618050jQGtrH','idcard','general','Table','279248Yjefsy','appCode','877126cpquzM','imageUrl','273FWIXmX','count','image-file','image-url','/client/uploadFile','1903136jWDxQi','invoice'];a34_0x4231=function(){return _0x15c2ba;};return a34_0x4231();}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=['invoice',a34_0x3a7f88(0x1c3),'form',a34_0x3a7f88(0x1df)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x3a7f88(0x1bd),'general':a34_0x3a7f88(0x1b5),'form':a34_0x3a7f88(0x1c4),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':a34_0x3a7f88(0x1d0),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x3a7f88(0x1e4)},IMAGE_FILE_FLAG={'name':a34_0x3a7f88(0x1cb),'type':'string','description':'Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':'image-url','type':a34_0x3a7f88(0x1d0),'description':a34_0x3a7f88(0x1d6)};function normalizeScene(_0x4b5b11){const _0x4b20a1=a34_0x3a7f88,_0x4d08f7=_0x4b5b11[_0x4b20a1(0x1e2)]()[_0x4b20a1(0x1be)]();if(_0x4d08f7===_0x4b20a1(0x1c2))return _0x4b20a1(0x1df);if(_0x4d08f7===_0x4b20a1(0x1cf)||_0x4d08f7===_0x4b20a1(0x1c3)||_0x4d08f7==='form')return _0x4d08f7;throw CliErrors['validation'](_0x4b20a1(0x1b8)+_0x4b5b11+_0x4b20a1(0x1de)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x328685){const _0xbcfaca=a34_0x3a7f88,_0x37ad0f=_0x328685[_0xbcfaca(0x1e1)](_0xbcfaca(0x1cb))[_0xbcfaca(0x1e2)](),_0x45c854=_0x328685['str'](_0xbcfaca(0x1cc))[_0xbcfaca(0x1e2)]();return{'imageFile':_0x37ad0f,'imageUrl':_0x45c854,'count':[_0x37ad0f,_0x45c854][_0xbcfaca(0x1dc)](Boolean)[_0xbcfaca(0x1d7)]};}function validateInputSelection(_0x26ba6f){const _0x4ec2e2=a34_0x3a7f88,_0x2126bc=selectedInputs(_0x26ba6f);if(_0x2126bc[_0x4ec2e2(0x1ca)]!==0x1)throw CliErrors[_0x4ec2e2(0x1d9)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x2126bc;}function withScene(_0x15bcb5,_0x400a99,_0x5396d0){const _0x230d03=a34_0x3a7f88;return{..._0x15bcb5,'scene':_0x400a99,..._0x5396d0?{'sourceFile':{'fileName':_0x5396d0[_0x230d03(0x1bc)],'filePath':_0x5396d0[_0x230d03(0x1b4)]}}:{}};}const ocrRecognize={'service':a34_0x3a7f88(0x1dd),'command':'recognize','description':'Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','risk':a34_0x3a7f88(0x1d2),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x4a108b){const _0x33f031=a34_0x3a7f88,_0x39ae5e=normalizeScene(_0x4a108b['str']('scene')),_0x5b015c=SCENE_TO_LEGACY_TYPE[_0x39ae5e],_0x257819=validateInputSelection(_0x4a108b);if(_0x257819[_0x33f031(0x1c8)])return dryRun(_0x33f031(0x1d4),_0x33f031(0x1d1))['body']({'appCode':_0x4a108b[_0x33f031(0x1c6)],'url':_0x257819[_0x33f031(0x1c8)],'type':_0x5b015c})['description']('Preview:\x20recognize\x20'+_0x39ae5e+_0x33f031(0x1d3))['build']();const _0x24977d=requireRuntimeUploadFile(_0x257819[_0x33f031(0x1ba)],_0x33f031(0x1cb));return dryRun(_0x33f031(0x1d4),_0x33f031(0x1cd))[_0x33f031(0x1b9)]({'steps':[{'method':_0x33f031(0x1d4),'url':_0x33f031(0x1cd),'body':{'appCode':_0x4a108b[_0x33f031(0x1c6)],'multipart':{'file':_0x24977d}}},{'method':_0x33f031(0x1d4),'url':'/client/queryFileUrl','body':{'filePath':_0x33f031(0x1e0),'downloadFlag':![]}},{'method':_0x33f031(0x1d4),'url':_0x33f031(0x1d1),'body':{'appCode':_0x4a108b['appCode'],'url':_0x33f031(0x1e3),'type':_0x5b015c}}]})[_0x33f031(0x1d8)]('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x39ae5e+_0x33f031(0x1c0))[_0x33f031(0x1d5)]();},async 'execute'(_0xb7c957){const _0x8c0486=a34_0x3a7f88,_0x1bb668=normalizeScene(_0xb7c957[_0x8c0486(0x1e1)](_0x8c0486(0x1b7))),_0x1d8244=SCENE_TO_LEGACY_TYPE[_0x1bb668],_0x239e0c=validateInputSelection(_0xb7c957);if(_0x239e0c[_0x8c0486(0x1c8)]){const _0x241531=await recognizeRuntimeOcr(_0xb7c957[_0x8c0486(0x1c6)],{'url':_0x239e0c[_0x8c0486(0x1c8)],'type':_0x1d8244});return{'ok':!![],'data':withScene(_0x241531,_0x1bb668)};}const _0x32a55b=requireRuntimeUploadFile(_0x239e0c[_0x8c0486(0x1ba)],_0x8c0486(0x1cb)),_0x17460c=await uploadRuntimeFile(_0xb7c957[_0x8c0486(0x1c6)],_0x32a55b[_0x8c0486(0x1da)]);if(!_0x17460c['filePath'])throw CliErrors['apiError']('File\x20upload\x20response\x20missing\x20filePath.');const _0x30334e=await queryRuntimeFileUrl(_0x17460c[_0x8c0486(0x1b4)],{'download':![]});if(!_0x30334e[_0x8c0486(0x1db)])throw CliErrors[_0x8c0486(0x1bb)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x4c43d4=await recognizeRuntimeOcr(_0xb7c957[_0x8c0486(0x1c6)],{'url':_0x30334e[_0x8c0486(0x1db)],'type':_0x1d8244});return{'ok':!![],'data':withScene(_0x4c43d4,_0x1bb668,_0x17460c)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0x32f810=a34_0x1658;(function(_0x3d6938,_0x48c821){const _0x2ecd02=a34_0x1658,_0x39d4d1=_0x3d6938();while(!![]){try{const _0x4bcbb3=parseInt(_0x2ecd02(0x1d2))/0x1*(parseInt(_0x2ecd02(0x1cf))/0x2)+parseInt(_0x2ecd02(0x1f2))/0x3+-parseInt(_0x2ecd02(0x1d7))/0x4*(-parseInt(_0x2ecd02(0x1ed))/0x5)+-parseInt(_0x2ecd02(0x1d1))/0x6+-parseInt(_0x2ecd02(0x1c0))/0x7*(parseInt(_0x2ecd02(0x1e7))/0x8)+parseInt(_0x2ecd02(0x1de))/0x9*(-parseInt(_0x2ecd02(0x1ce))/0xa)+parseInt(_0x2ecd02(0x1eb))/0xb;if(_0x4bcbb3===_0x48c821)break;else _0x39d4d1['push'](_0x39d4d1['shift']());}catch(_0x5ec6f2){_0x39d4d1['push'](_0x39d4d1['shift']());}}}(a34_0x261d,0x64ca8));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a34_0x1658(_0xcc32f0,_0x4a8d9c){_0xcc32f0=_0xcc32f0-0x1c0;const _0x261df6=a34_0x261d();let _0x1658c2=_0x261df6[_0xcc32f0];return _0x1658c2;}const SUPPORTED_SCENES=[a34_0x32f810(0x1e2),a34_0x32f810(0x1e5),a34_0x32f810(0x1d4),a34_0x32f810(0x1ca)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x32f810(0x1cd),'general':a34_0x32f810(0x1ec),'form':'Table','idCard':a34_0x32f810(0x1e6)},SCENE_FLAG={'name':'scene','type':a34_0x32f810(0x1db),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x32f810(0x1e3)},IMAGE_FILE_FLAG={'name':a34_0x32f810(0x1c6),'type':a34_0x32f810(0x1db),'description':'Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a34_0x32f810(0x1d0),'type':a34_0x32f810(0x1db),'description':a34_0x32f810(0x1d3)};function normalizeScene(_0x72155f){const _0xe95517=a34_0x32f810,_0x2bf7ed=_0x72155f[_0xe95517(0x1d5)]()['toLowerCase']();if(_0x2bf7ed===_0xe95517(0x1e0))return _0xe95517(0x1ca);if(_0x2bf7ed===_0xe95517(0x1e2)||_0x2bf7ed===_0xe95517(0x1e5)||_0x2bf7ed===_0xe95517(0x1d4))return _0x2bf7ed;throw CliErrors[_0xe95517(0x1e9)](_0xe95517(0x1f5)+_0x72155f+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x102f10){const _0xf393b=a34_0x32f810,_0x1cbf00=_0x102f10[_0xf393b(0x1e8)](_0xf393b(0x1c6))['trim'](),_0x4cc89e=_0x102f10[_0xf393b(0x1e8)](_0xf393b(0x1d0))[_0xf393b(0x1d5)]();return{'imageFile':_0x1cbf00,'imageUrl':_0x4cc89e,'count':[_0x1cbf00,_0x4cc89e]['filter'](Boolean)[_0xf393b(0x1cc)]};}function validateInputSelection(_0x25e15e){const _0x74ccd7=a34_0x32f810,_0x45bcb8=selectedInputs(_0x25e15e);if(_0x45bcb8[_0x74ccd7(0x1f1)]!==0x1)throw CliErrors[_0x74ccd7(0x1e9)](_0x74ccd7(0x1d6));return _0x45bcb8;}function withScene(_0x188580,_0x4a4743,_0x10cd4c){const _0x2a4f55=a34_0x32f810;return{..._0x188580,'scene':_0x4a4743,..._0x10cd4c?{'sourceFile':{'fileName':_0x10cd4c[_0x2a4f55(0x1c3)],'filePath':_0x10cd4c[_0x2a4f55(0x1c4)]}}:{}};}const ocrRecognize={'service':a34_0x32f810(0x1d8),'command':a34_0x32f810(0x1da),'description':a34_0x32f810(0x1c5),'risk':a34_0x32f810(0x1c7),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x23c652){const _0x5a0c19=a34_0x32f810,_0xaa969b=normalizeScene(_0x23c652[_0x5a0c19(0x1e8)](_0x5a0c19(0x1ef))),_0x4a0d29=SCENE_TO_LEGACY_TYPE[_0xaa969b],_0x561f1a=validateInputSelection(_0x23c652);if(_0x561f1a['imageUrl'])return dryRun(_0x5a0c19(0x1f4),'/client/ocr')[_0x5a0c19(0x1c1)]({'appCode':_0x23c652['appCode'],'url':_0x561f1a[_0x5a0c19(0x1cb)],'type':_0x4a0d29})[_0x5a0c19(0x1e1)]('Preview:\x20recognize\x20'+_0xaa969b+'\x20OCR\x20from\x20URL')['build']();const _0x5c04c0=requireRuntimeUploadFile(_0x561f1a[_0x5a0c19(0x1df)],_0x5a0c19(0x1c6));return dryRun('POST',_0x5a0c19(0x1c8))['body']({'steps':[{'method':_0x5a0c19(0x1f4),'url':'/client/uploadFile','body':{'appCode':_0x23c652[_0x5a0c19(0x1d9)],'multipart':{'file':_0x5c04c0}}},{'method':_0x5a0c19(0x1f4),'url':_0x5a0c19(0x1ea),'body':{'filePath':_0x5a0c19(0x1e4),'downloadFlag':![]}},{'method':_0x5a0c19(0x1f4),'url':_0x5a0c19(0x1dd),'body':{'appCode':_0x23c652[_0x5a0c19(0x1d9)],'url':_0x5a0c19(0x1ee),'type':_0x4a0d29}}]})['description'](_0x5a0c19(0x1f3)+_0xaa969b+_0x5a0c19(0x1dc))['build']();},async 'execute'(_0x18a8db){const _0x1983b8=a34_0x32f810,_0x35ac02=normalizeScene(_0x18a8db['str'](_0x1983b8(0x1ef))),_0x2f034c=SCENE_TO_LEGACY_TYPE[_0x35ac02],_0x47c26f=validateInputSelection(_0x18a8db);if(_0x47c26f[_0x1983b8(0x1cb)]){const _0x4f0f40=await recognizeRuntimeOcr(_0x18a8db[_0x1983b8(0x1d9)],{'url':_0x47c26f[_0x1983b8(0x1cb)],'type':_0x2f034c});return{'ok':!![],'data':withScene(_0x4f0f40,_0x35ac02)};}const _0x37975c=requireRuntimeUploadFile(_0x47c26f[_0x1983b8(0x1df)],_0x1983b8(0x1c6)),_0x295ffc=await uploadRuntimeFile(_0x18a8db[_0x1983b8(0x1d9)],_0x37975c['path']);if(!_0x295ffc[_0x1983b8(0x1c4)])throw CliErrors[_0x1983b8(0x1c2)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x11d10f=await queryRuntimeFileUrl(_0x295ffc[_0x1983b8(0x1c4)],{'download':![]});if(!_0x11d10f[_0x1983b8(0x1f0)])throw CliErrors[_0x1983b8(0x1c2)](_0x1983b8(0x1c9));const _0x10d680=await recognizeRuntimeOcr(_0x18a8db[_0x1983b8(0x1d9)],{'url':_0x11d10f[_0x1983b8(0x1f0)],'type':_0x2f034c});return{'ok':!![],'data':withScene(_0x10d680,_0x35ac02,_0x295ffc)};}};function a34_0x261d(){const _0x4582fe=['imageUrl','length','Invoice','10LHpJWH','2FwNEag','image-url','2182896VjQKqd','485948dTwYJa','Publicly\x20accessible\x20image\x20or\x20file\x20URL','form','trim','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','16504QEbNRp','ocr','appCode','recognize','string','\x20OCR','/client/ocr','6091947xRbvxf','imageFile','idcard','description','invoice','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','<filePath\x20returned\x20by\x20/client/uploadFile>','general','IdCard','1538344mKeqkr','str','validation','/client/queryFileUrl','7881137JWNOcd','General','305uzzMWl','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','scene','fileUrl','count','2305830qTUZsP','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','POST','Unsupported\x20OCR\x20scene:\x20','28GAfLMp','body','apiError','fileName','filePath','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','image-file','write','/client/uploadFile','File\x20URL\x20response\x20missing\x20fileUrl.','idCard'];a34_0x261d=function(){return _0x4582fe;};return a34_0x261d();}export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x3ec7a3=a35_0x298f;function a35_0x4e65(){const _0x4c1e04=['Personal\x20BFF\x20script\x20ID','write','POST','functionName','Updated\x20personal\x20BFF\x20','length','updateTime','Update\x20a\x20personal\x20BFF\x20by\x20id','/client/runtime-bff/personal/create','1858940yVlsGQ','isArray','high-risk-write','read','flag','--params\x20must\x20be\x20a\x20JSON\x20object.','createUserId','1AaNaVD','appCode','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','verbose','scriptContent','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Executed\x20personal\x20BFF\x20','string','Preview:\x20create\x20personal\x20BFF\x20','str','3693690WtTveR','update','4004164dSvChb','num','map','1758072sgsPrV','7GLPBnS','exec','gmtCreate','description','File\x20is\x20not\x20a\x20regular\x20file:\x20','1434159wkAQNf','params','150tTsSzj','body','File\x20path\x20is\x20required.','version','Preview:\x20update\x20personal\x20BFF\x20','sourceSessionId','3759335IhHNkk','build','Created\x20personal\x20BFF\x20','2834320yXqrmx','scriptType','validation','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','/client/runtime-bff/personal/','config','Personal\x20BFF\x20script\x20file\x20is\x20blank.','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','File\x20not\x20found:\x20','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','gmtModified','personal-bff','source-session-id','Show\x20one\x20personal\x20BFF\x20by\x20id','isFile','test','name','file','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.'];a35_0x4e65=function(){return _0x4c1e04;};return a35_0x4e65();}(function(_0x158014,_0x3c43a4){const _0x3034c9=a35_0x298f,_0x243c83=_0x158014();while(!![]){try{const _0x295b18=parseInt(_0x3034c9(0x192))/0x1*(-parseInt(_0x3034c9(0x18b))/0x2)+parseInt(_0x3034c9(0x19c))/0x3+-parseInt(_0x3034c9(0x19e))/0x4+-parseInt(_0x3034c9(0x1af))/0x5+-parseInt(_0x3034c9(0x1a1))/0x6*(-parseInt(_0x3034c9(0x1a2))/0x7)+-parseInt(_0x3034c9(0x1b2))/0x8+parseInt(_0x3034c9(0x1a7))/0x9*(parseInt(_0x3034c9(0x1a9))/0xa);if(_0x295b18===_0x3c43a4)break;else _0x243c83['push'](_0x243c83['shift']());}catch(_0x2c3fbf){_0x243c83['push'](_0x243c83['shift']());}}}(a35_0x4e65,0xd650f));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x3ec7a3(0x180),'type':a35_0x3ec7a3(0x199),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x3ec7a3(0x199),'required':!![],'description':a35_0x3ec7a3(0x1b5)},DESCRIPTION_FLAG={'name':a35_0x3ec7a3(0x1a5),'type':'string','description':'Personal\x20BFF\x20description'},SOURCE_SESSION_FLAG={'name':a35_0x3ec7a3(0x17b),'type':a35_0x3ec7a3(0x199),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function a35_0x298f(_0x4c7fc,_0x220985){_0x4c7fc=_0x4c7fc-0x17b;const _0x4e6545=a35_0x4e65();let _0x298fdd=_0x4e6545[_0x4c7fc];return _0x298fdd;}function normalizeFunctionName(_0x1b1151){const _0x4ffaa4=a35_0x3ec7a3,_0x16d6d4=String(_0x1b1151||'')['trim']();if(!_0x16d6d4||!FUNCTION_NAME_PATTERN[_0x4ffaa4(0x17e)](_0x16d6d4))throw CliErrors[_0x4ffaa4(0x1b4)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x16d6d4;}function readScriptFile(_0x398446){const _0x54e9d7=a35_0x3ec7a3;if(!_0x398446)throw CliErrors[_0x54e9d7(0x1b4)](_0x54e9d7(0x1ab));if(!existsSync(_0x398446))throw CliErrors[_0x54e9d7(0x1b4)](_0x54e9d7(0x1ba)+_0x398446);if(!statSync(_0x398446)[_0x54e9d7(0x17d)]())throw CliErrors[_0x54e9d7(0x1b4)](_0x54e9d7(0x1a6)+_0x398446);const _0xe7a06d=readFileSync(_0x398446,'utf8');if(!_0xe7a06d['trim']())throw CliErrors[_0x54e9d7(0x1b4)](_0x54e9d7(0x1b8));return _0xe7a06d;}function optionalTrimmed(_0x2a5004){const _0x31940c=String(_0x2a5004||'')['trim']();return _0x31940c||undefined;}function summarizeBff(_0x23b5e0){const _0x15c734=a35_0x3ec7a3;return{'id':_0x23b5e0['id'],'appCode':_0x23b5e0[_0x15c734(0x193)],'functionName':_0x23b5e0[_0x15c734(0x185)],'description':_0x23b5e0[_0x15c734(0x1a5)],'scriptType':_0x23b5e0[_0x15c734(0x1b3)],'version':_0x23b5e0[_0x15c734(0x1ac)],'gmtModified':_0x23b5e0[_0x15c734(0x1bc)],'updateTime':_0x23b5e0[_0x15c734(0x188)]};}function detailBff(_0x4ff747){const _0x592b93=a35_0x3ec7a3;return{'id':_0x4ff747['id'],'appCode':_0x4ff747[_0x592b93(0x193)],'functionName':_0x4ff747[_0x592b93(0x185)],'description':_0x4ff747[_0x592b93(0x1a5)],'scriptType':_0x4ff747['scriptType'],'scriptContent':_0x4ff747['scriptContent']??'','config':_0x4ff747[_0x592b93(0x1b7)],'version':_0x4ff747[_0x592b93(0x1ac)],'createUserId':_0x4ff747[_0x592b93(0x191)],'gmtCreate':_0x4ff747[_0x592b93(0x1a4)],'gmtModified':_0x4ff747[_0x592b93(0x1bc)],'createTime':_0x4ff747['createTime'],'updateTime':_0x4ff747['updateTime']};}function buildCreateInput(_0xca2c8b){const _0x19b511=a35_0x3ec7a3;return{'functionName':normalizeFunctionName(_0xca2c8b['str'](_0x19b511(0x17f))),...optionalTrimmed(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x1a5)))?{'description':optionalTrimmed(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x1a5)))}:{},'scriptContent':readScriptFile(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x180))),...optionalTrimmed(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x17b)))?{'sourceSessionId':optionalTrimmed(_0xca2c8b[_0x19b511(0x19b)](_0x19b511(0x17b)))}:{}};}function buildUpdateInput(_0x50a1bb){const _0x5e841d=a35_0x3ec7a3,_0x1817cd={};optionalTrimmed(_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x17f)))&&(_0x1817cd[_0x5e841d(0x185)]=normalizeFunctionName(_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x17f))));_0x50a1bb[_0x5e841d(0x18f)]('description')!==undefined&&(_0x1817cd[_0x5e841d(0x1a5)]=_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x1a5)));optionalTrimmed(_0x50a1bb['str'](_0x5e841d(0x180)))&&(_0x1817cd[_0x5e841d(0x196)]=readScriptFile(_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x180))));_0x50a1bb[_0x5e841d(0x18f)](_0x5e841d(0x17b))!==undefined&&(_0x1817cd[_0x5e841d(0x1ae)]=_0x50a1bb[_0x5e841d(0x19b)](_0x5e841d(0x17b)));if(Object['keys'](_0x1817cd)[_0x5e841d(0x187)]===0x0)throw CliErrors['validation'](_0x5e841d(0x181));return _0x1817cd;}function parseExecParams(_0x4b959b){const _0x24aa2a=a35_0x3ec7a3,_0x1abafc=parseJsonParams(_0x4b959b)??{};if(Array[_0x24aa2a(0x18c)](_0x1abafc))throw CliErrors['validation'](_0x24aa2a(0x190));return _0x1abafc;}const personalBffList={'service':'personal-bff','command':'list','description':a35_0x3ec7a3(0x1b9),'risk':a35_0x3ec7a3(0x18e),'flags':[VERBOSE_FLAG],async 'execute'(_0x545f38){const _0x551ba8=a35_0x3ec7a3,_0x1b64fb=await listPersonalBffs(_0x545f38[_0x551ba8(0x193)]);return{'ok':!![],'data':{'total':_0x1b64fb['length'],'items':_0x545f38['bool'](_0x551ba8(0x195))?_0x1b64fb:_0x1b64fb[_0x551ba8(0x1a0)](summarizeBff)}};}},personalBffDetail={'service':a35_0x3ec7a3(0x1bd),'command':'detail','description':a35_0x3ec7a3(0x17c),'risk':a35_0x3ec7a3(0x18e),'flags':[{...ID_FLAG,'description':a35_0x3ec7a3(0x182)}],async 'execute'(_0x1efe16){const _0x23d615=a35_0x3ec7a3,_0x230d40=await getPersonalBff(_0x1efe16[_0x23d615(0x19f)]('id'),_0x1efe16[_0x23d615(0x193)]);return{'ok':!![],'data':detailBff(_0x230d40)};}},personalBffCreate={'service':a35_0x3ec7a3(0x1bd),'command':'create','description':a35_0x3ec7a3(0x194),'risk':a35_0x3ec7a3(0x183),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x2bb0c1){const _0x295b2c=a35_0x3ec7a3,_0x59480d=buildCreateInput(_0x2bb0c1),_0x239ca5=await createPersonalBff(_0x2bb0c1[_0x295b2c(0x193)],_0x59480d);return{'ok':!![],'data':detailBff(_0x239ca5),'message':_0x295b2c(0x1b1)+_0x239ca5['id']+(_0x239ca5[_0x295b2c(0x185)]?'\x20('+_0x239ca5[_0x295b2c(0x185)]+')':'')};},async 'dryRun'(_0x34fd2){const _0x28c993=a35_0x3ec7a3,_0xa9b1e2=buildCreateInput(_0x34fd2);return dryRun('POST',_0x28c993(0x18a))[_0x28c993(0x1aa)]({'appCode':_0x34fd2[_0x28c993(0x193)],..._0xa9b1e2})[_0x28c993(0x1a5)](_0x28c993(0x19a)+_0xa9b1e2[_0x28c993(0x185)])[_0x28c993(0x1b0)]();}},personalBffUpdate={'service':a35_0x3ec7a3(0x1bd),'command':a35_0x3ec7a3(0x19d),'description':a35_0x3ec7a3(0x189),'risk':a35_0x3ec7a3(0x183),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x554d78){const _0x1faacd=a35_0x3ec7a3,_0x34a820=_0x554d78[_0x1faacd(0x19f)]('id'),_0x21e521=buildUpdateInput(_0x554d78),_0x51643c=await updatePersonalBff(_0x34a820,_0x554d78[_0x1faacd(0x193)],_0x21e521);return{'ok':!![],'data':detailBff(_0x51643c),'message':_0x1faacd(0x186)+_0x51643c['id']+(_0x51643c[_0x1faacd(0x185)]?'\x20('+_0x51643c['functionName']+')':'')};},async 'dryRun'(_0x36e54f){const _0x53f5d9=a35_0x3ec7a3,_0x5db89a=_0x36e54f[_0x53f5d9(0x19f)]('id'),_0x3cd2f7=buildUpdateInput(_0x36e54f);return dryRun(_0x53f5d9(0x184),_0x53f5d9(0x1b6)+_0x5db89a+'/update')['body']({'appCode':_0x36e54f[_0x53f5d9(0x193)],..._0x3cd2f7})[_0x53f5d9(0x1a5)](_0x53f5d9(0x1ad)+_0x5db89a)['build']();}},personalBffExec={'service':a35_0x3ec7a3(0x1bd),'command':a35_0x3ec7a3(0x1a3),'description':a35_0x3ec7a3(0x1bb),'risk':a35_0x3ec7a3(0x18d),'flags':[{...ID_FLAG,'description':a35_0x3ec7a3(0x182)},{...PARAMS_FLAG,'description':a35_0x3ec7a3(0x197)}],async 'validate'(_0x2c948b){const _0x35b1c7=a35_0x3ec7a3;parseExecParams(_0x2c948b['str'](_0x35b1c7(0x1a8)));},async 'execute'(_0x3cc781){const _0x6edcee=a35_0x3ec7a3,_0x443692=_0x3cc781['num']('id'),_0xf098ea=parseExecParams(_0x3cc781['str']('params')),_0x5eaa86=await executePersonalBff(_0x443692,_0x3cc781[_0x6edcee(0x193)],_0xf098ea);return{'ok':!![],'data':{'result':_0x5eaa86},'message':_0x6edcee(0x198)+_0x443692};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x142c44=a35_0x3f14;(function(_0x246262,_0x40fc92){const _0x141b5e=a35_0x3f14,_0x2c9245=_0x246262();while(!![]){try{const _0xac1112=-parseInt(_0x141b5e(0x220))/0x1+-parseInt(_0x141b5e(0x20b))/0x2*(-parseInt(_0x141b5e(0x1f8))/0x3)+-parseInt(_0x141b5e(0x21e))/0x4*(parseInt(_0x141b5e(0x210))/0x5)+parseInt(_0x141b5e(0x203))/0x6*(-parseInt(_0x141b5e(0x207))/0x7)+parseInt(_0x141b5e(0x226))/0x8+-parseInt(_0x141b5e(0x204))/0x9*(-parseInt(_0x141b5e(0x1ec))/0xa)+-parseInt(_0x141b5e(0x214))/0xb*(-parseInt(_0x141b5e(0x21b))/0xc);if(_0xac1112===_0x40fc92)break;else _0x2c9245['push'](_0x2c9245['shift']());}catch(_0x9a3c64){_0x2c9245['push'](_0x2c9245['shift']());}}}(a35_0xa5c6,0xe8beb));import{existsSync,readFileSync,statSync}from'node:fs';function a35_0x3f14(_0x284a9a,_0x241b2b){_0x284a9a=_0x284a9a-0x1e6;const _0xa5c6cd=a35_0xa5c6();let _0x3f1439=_0xa5c6cd[_0x284a9a];return _0x3f1439;}import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':'file','type':'string','description':a35_0x142c44(0x1fc)},FUNCTION_NAME_FLAG={'name':a35_0x142c44(0x1e8),'type':a35_0x142c44(0x1fa),'required':!![],'description':a35_0x142c44(0x1e7)},DESCRIPTION_FLAG={'name':a35_0x142c44(0x1f4),'type':a35_0x142c44(0x1fa),'description':a35_0x142c44(0x217)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a35_0x142c44(0x1fa),'description':a35_0x142c44(0x1f5)};function normalizeFunctionName(_0x6172ae){const _0xbeca37=a35_0x142c44,_0x417bbc=String(_0x6172ae||'')['trim']();if(!_0x417bbc||!FUNCTION_NAME_PATTERN[_0xbeca37(0x1ff)](_0x417bbc))throw CliErrors['validation']('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x417bbc;}function readScriptFile(_0x8ab19b){const _0x5c1afe=a35_0x142c44;if(!_0x8ab19b)throw CliErrors[_0x5c1afe(0x21c)]('File\x20path\x20is\x20required.');if(!existsSync(_0x8ab19b))throw CliErrors[_0x5c1afe(0x21c)](_0x5c1afe(0x223)+_0x8ab19b);if(!statSync(_0x8ab19b)[_0x5c1afe(0x1fe)]())throw CliErrors[_0x5c1afe(0x21c)](_0x5c1afe(0x1f6)+_0x8ab19b);const _0xbc781=readFileSync(_0x8ab19b,_0x5c1afe(0x222));if(!_0xbc781[_0x5c1afe(0x1f2)]())throw CliErrors['validation']('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0xbc781;}function optionalTrimmed(_0x98da6c){const _0x32dd17=a35_0x142c44,_0xa5c8cf=String(_0x98da6c||'')[_0x32dd17(0x1f2)]();return _0xa5c8cf||undefined;}function a35_0xa5c6(){const _0x613673=['string','flag','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','personal-bff','isFile','test','appCode','scriptContent','--params\x20must\x20be\x20a\x20JSON\x20object.','5536710dhbfNN','36YxIqBA','/update','high-risk-write','14nUcnuW','scriptType','num','map','1096HbosuS','config','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','createTime','read','2302460nYifQV','params','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','bool','3453142OElRpL','updateTime','body','Personal\x20BFF\x20description','list','Update\x20a\x20personal\x20BFF\x20by\x20id','Personal\x20BFF\x20script\x20ID','120SubnZq','validation','Show\x20one\x20personal\x20BFF\x20by\x20id','12NJJWQH','update','707484zoCYVb','Updated\x20personal\x20BFF\x20','utf8','File\x20not\x20found:\x20','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','keys','2088872yqLBiv','POST','version','verbose','exec','createUserId','sourceSessionId','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','name','length','build','write','360940yzHixi','Created\x20personal\x20BFF\x20','file','isArray','str','source-session-id','trim','functionName','description','Optional\x20source\x20RuntimeAgent\x20session\x20id','File\x20is\x20not\x20a\x20regular\x20file:\x20','gmtCreate','7353HfMNdX','Executed\x20personal\x20BFF\x20'];a35_0xa5c6=function(){return _0x613673;};return a35_0xa5c6();}function summarizeBff(_0x54d160){const _0x3a6ecd=a35_0x142c44;return{'id':_0x54d160['id'],'appCode':_0x54d160['appCode'],'functionName':_0x54d160[_0x3a6ecd(0x1f3)],'description':_0x54d160[_0x3a6ecd(0x1f4)],'scriptType':_0x54d160[_0x3a6ecd(0x208)],'version':_0x54d160['version'],'gmtModified':_0x54d160['gmtModified'],'updateTime':_0x54d160[_0x3a6ecd(0x215)]};}function detailBff(_0x293832){const _0x3c1f2d=a35_0x142c44;return{'id':_0x293832['id'],'appCode':_0x293832['appCode'],'functionName':_0x293832[_0x3c1f2d(0x1f3)],'description':_0x293832[_0x3c1f2d(0x1f4)],'scriptType':_0x293832[_0x3c1f2d(0x208)],'scriptContent':_0x293832[_0x3c1f2d(0x201)]??'','config':_0x293832[_0x3c1f2d(0x20c)],'version':_0x293832[_0x3c1f2d(0x228)],'createUserId':_0x293832[_0x3c1f2d(0x22b)],'gmtCreate':_0x293832[_0x3c1f2d(0x1f7)],'gmtModified':_0x293832['gmtModified'],'createTime':_0x293832[_0x3c1f2d(0x20e)],'updateTime':_0x293832[_0x3c1f2d(0x215)]};}function buildCreateInput(_0x39815d){const _0x30aa0a=a35_0x142c44;return{'functionName':normalizeFunctionName(_0x39815d['str'](_0x30aa0a(0x1e8))),...optionalTrimmed(_0x39815d['str'](_0x30aa0a(0x1f4)))?{'description':optionalTrimmed(_0x39815d[_0x30aa0a(0x1f0)](_0x30aa0a(0x1f4)))}:{},'scriptContent':readScriptFile(_0x39815d[_0x30aa0a(0x1f0)](_0x30aa0a(0x1ee))),...optionalTrimmed(_0x39815d['str'](_0x30aa0a(0x1f1)))?{'sourceSessionId':optionalTrimmed(_0x39815d[_0x30aa0a(0x1f0)](_0x30aa0a(0x1f1)))}:{}};}function buildUpdateInput(_0xcd768f){const _0x23ac7b=a35_0x142c44,_0x186764={};optionalTrimmed(_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1e8)))&&(_0x186764[_0x23ac7b(0x1f3)]=normalizeFunctionName(_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1e8))));_0xcd768f[_0x23ac7b(0x1fb)](_0x23ac7b(0x1f4))!==undefined&&(_0x186764['description']=_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1f4)));optionalTrimmed(_0xcd768f[_0x23ac7b(0x1f0)]('file'))&&(_0x186764['scriptContent']=readScriptFile(_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1ee))));_0xcd768f['flag'](_0x23ac7b(0x1f1))!==undefined&&(_0x186764[_0x23ac7b(0x1e6)]=_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1f1)));if(Object[_0x23ac7b(0x225)](_0x186764)['length']===0x0)throw CliErrors[_0x23ac7b(0x21c)]('personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.');return _0x186764;}function parseExecParams(_0x3ec175){const _0x41fea5=a35_0x142c44,_0x1d130a=parseJsonParams(_0x3ec175)??{};if(Array[_0x41fea5(0x1ef)](_0x1d130a))throw CliErrors['validation'](_0x41fea5(0x202));return _0x1d130a;}const personalBffList={'service':a35_0x142c44(0x1fd),'command':a35_0x142c44(0x218),'description':a35_0x142c44(0x20d),'risk':a35_0x142c44(0x20f),'flags':[VERBOSE_FLAG],async 'execute'(_0x3da5ef){const _0x582c98=a35_0x142c44,_0x31e204=await listPersonalBffs(_0x3da5ef[_0x582c98(0x200)]);return{'ok':!![],'data':{'total':_0x31e204[_0x582c98(0x1e9)],'items':_0x3da5ef[_0x582c98(0x213)](_0x582c98(0x229))?_0x31e204:_0x31e204[_0x582c98(0x20a)](summarizeBff)}};}},personalBffDetail={'service':a35_0x142c44(0x1fd),'command':'detail','description':a35_0x142c44(0x21d),'risk':a35_0x142c44(0x20f),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x30ab30){const _0x3550f8=a35_0x142c44,_0xb56e7=await getPersonalBff(_0x30ab30[_0x3550f8(0x209)]('id'),_0x30ab30[_0x3550f8(0x200)]);return{'ok':!![],'data':detailBff(_0xb56e7)};}},personalBffCreate={'service':a35_0x142c44(0x1fd),'command':'create','description':a35_0x142c44(0x224),'risk':a35_0x142c44(0x1eb),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x52d7e7){const _0x302995=a35_0x142c44,_0x1f522f=buildCreateInput(_0x52d7e7),_0x27190c=await createPersonalBff(_0x52d7e7[_0x302995(0x200)],_0x1f522f);return{'ok':!![],'data':detailBff(_0x27190c),'message':_0x302995(0x1ed)+_0x27190c['id']+(_0x27190c[_0x302995(0x1f3)]?'\x20('+_0x27190c[_0x302995(0x1f3)]+')':'')};},async 'dryRun'(_0xb96af){const _0x5493d9=a35_0x142c44,_0x23f590=buildCreateInput(_0xb96af);return dryRun(_0x5493d9(0x227),'/client/runtime-bff/personal/create')[_0x5493d9(0x216)]({'appCode':_0xb96af[_0x5493d9(0x200)],..._0x23f590})[_0x5493d9(0x1f4)]('Preview:\x20create\x20personal\x20BFF\x20'+_0x23f590['functionName'])[_0x5493d9(0x1ea)]();}},personalBffUpdate={'service':'personal-bff','command':a35_0x142c44(0x21f),'description':a35_0x142c44(0x219),'risk':a35_0x142c44(0x1eb),'flags':[{...ID_FLAG,'description':a35_0x142c44(0x21a)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x464654){const _0x33a7f6=a35_0x142c44,_0x102353=_0x464654[_0x33a7f6(0x209)]('id'),_0x359860=buildUpdateInput(_0x464654),_0x5a8578=await updatePersonalBff(_0x102353,_0x464654[_0x33a7f6(0x200)],_0x359860);return{'ok':!![],'data':detailBff(_0x5a8578),'message':_0x33a7f6(0x221)+_0x5a8578['id']+(_0x5a8578[_0x33a7f6(0x1f3)]?'\x20('+_0x5a8578['functionName']+')':'')};},async 'dryRun'(_0x4c0b66){const _0x43a4c0=a35_0x142c44,_0xf9c2bc=_0x4c0b66[_0x43a4c0(0x209)]('id'),_0xf2216d=buildUpdateInput(_0x4c0b66);return dryRun(_0x43a4c0(0x227),'/client/runtime-bff/personal/'+_0xf9c2bc+_0x43a4c0(0x205))[_0x43a4c0(0x216)]({'appCode':_0x4c0b66[_0x43a4c0(0x200)],..._0xf2216d})[_0x43a4c0(0x1f4)]('Preview:\x20update\x20personal\x20BFF\x20'+_0xf9c2bc)['build']();}},personalBffExec={'service':'personal-bff','command':a35_0x142c44(0x22a),'description':'Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','risk':a35_0x142c44(0x206),'flags':[{...ID_FLAG,'description':a35_0x142c44(0x21a)},{...PARAMS_FLAG,'description':a35_0x142c44(0x212)}],async 'validate'(_0x11ed84){const _0x44beac=a35_0x142c44;parseExecParams(_0x11ed84[_0x44beac(0x1f0)](_0x44beac(0x211)));},async 'execute'(_0x4ef73a){const _0x1a5272=a35_0x142c44,_0x3d22bb=_0x4ef73a['num']('id'),_0x2acc3c=parseExecParams(_0x4ef73a[_0x1a5272(0x1f0)](_0x1a5272(0x211))),_0x3dabb5=await executePersonalBff(_0x3d22bb,_0x4ef73a[_0x1a5272(0x200)],_0x2acc3c);return{'ok':!![],'data':{'result':_0x3dabb5},'message':_0x1a5272(0x1f9)+_0x3d22bb};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x2bb1d0=a36_0x43ab;(function(_0x5afa06,_0xc7a377){const _0x5fc89c=a36_0x43ab,_0x3c57ed=_0x5afa06();while(!![]){try{const _0x578a8=-parseInt(_0x5fc89c(0xdf))/0x1*(parseInt(_0x5fc89c(0xcc))/0x2)+parseInt(_0x5fc89c(0xf1))/0x3*(-parseInt(_0x5fc89c(0xdd))/0x4)+-parseInt(_0x5fc89c(0xd1))/0x5*(parseInt(_0x5fc89c(0xca))/0x6)+parseInt(_0x5fc89c(0xe9))/0x7+-parseInt(_0x5fc89c(0xf4))/0x8+-parseInt(_0x5fc89c(0xf3))/0x9+-parseInt(_0x5fc89c(0xe0))/0xa*(-parseInt(_0x5fc89c(0xc7))/0xb);if(_0x578a8===_0xc7a377)break;else _0x3c57ed['push'](_0x3c57ed['shift']());}catch(_0x539998){_0x3c57ed['push'](_0x3c57ed['shift']());}}}(a36_0x5b30,0x2bb99));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';function a36_0x5b30(){const _0x25e459=['Logs','BFF\x20Scripts','549045LqOMaD','isSingleCommand','Configuration','defaultCommand','run','show','Schema','Service\x20Tree','945423JlkVTa','Runtime\x20App\x20Config','654471hstVfK','1095832oLyLXt','install','1488157EQMlDq','\x20\x20[high-risk-write]','has','1668726nxMYPx','App\x20Management','2xJPboV','Workspace','description','Datasets','SQL\x20Queries','5boIBHm','set','CLI\x20Built-in\x20Skill','Agent\x20Schedules','list','login','Personal\x20BFF','values','push','command','read','Instant\x20API','4Qpddcu','service','178674EbGABq','80jvFure','map','Self\x20Update','File','OCR','get','write'];a36_0x5b30=function(){return _0x25e459;};return a36_0x5b30();}import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2a205b){const _0x1a25ec=a36_0x43ab;for(const _0x33cfa6 of _0x2a205b){definitions[_0x1a25ec(0xd2)](_0x33cfa6[_0x1a25ec(0xde)]+':'+_0x33cfa6[_0x1a25ec(0xda)],_0x33cfa6);let _0x5643e1=serviceGroups[_0x1a25ec(0xe5)](_0x33cfa6['service']);!_0x5643e1&&(_0x5643e1=[],serviceGroups['set'](_0x33cfa6['service'],_0x5643e1)),_0x5643e1[_0x1a25ec(0xd9)](_0x33cfa6);}}function registerService(_0x1be3be,_0x3f6e81,_0x3d2b69){const _0x3f7d35=a36_0x43ab;registerDefinitions(_0x3f6e81);const _0x431aae=_0x550d85=>_0x550d85===_0x3f7d35(0xdb)?'':_0x550d85===_0x3f7d35(0xe6)?'\x20\x20[write]':_0x3f7d35(0xc8),_0x365e39={'service':_0x3f6e81[0x0]['service'],'label':_0x1be3be,'commands':_0x3f6e81[_0x3f7d35(0xe1)](_0x4c867a=>({'command':_0x4c867a[_0x3f7d35(0xda)],'description':_0x4c867a[_0x3f7d35(0xce)],'tag':_0x431aae(_0x4c867a['risk'])})),'defaultCommand':_0x3d2b69?.[_0x3f7d35(0xec)]??(_0x3d2b69?.['isSingleCommand']?_0x3f6e81[0x0]['command']:undefined),'isSingleCommand':_0x3d2b69?.[_0x3f7d35(0xea)]};serviceRegistry[_0x3f7d35(0xd9)](_0x365e39),serviceByName[_0x3f7d35(0xd2)](_0x365e39[_0x3f7d35(0xde)],_0x365e39);}function a36_0x43ab(_0x1962c3,_0x5b0f7e){_0x1962c3=_0x1962c3-0xc7;const _0x5b30ab=a36_0x5b30();let _0x43ab32=_0x5b30ab[_0x1962c3];return _0x43ab32;}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x2bb1d0(0xd6)}),registerService(a36_0x2bb1d0(0xcb),appDefinitions,{'defaultCommand':a36_0x2bb1d0(0xd5)}),registerService(a36_0x2bb1d0(0xcd),workspaceDefinitions),registerService(a36_0x2bb1d0(0xf2),appConfigDefinitions),registerService(a36_0x2bb1d0(0xeb),configDefinitions,{'defaultCommand':'list'}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x2bb1d0(0xcf),datasetDefinitions),registerService(a36_0x2bb1d0(0xdc),dataDefinitions),registerService(a36_0x2bb1d0(0xd0),sqlDefinitions),registerService(a36_0x2bb1d0(0xe8),bffDefinitions),registerService(a36_0x2bb1d0(0xd7),personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a36_0x2bb1d0(0xe3),fileDefinitions),registerService(a36_0x2bb1d0(0xe4),ocrDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService(a36_0x2bb1d0(0xd4),scheduleDefinitions,{'defaultCommand':'list'}),registerService(a36_0x2bb1d0(0xf0),serviceDefinitions,{'defaultCommand':a36_0x2bb1d0(0xd5)}),registerService('Skills',skillDefinitions,{'defaultCommand':'install'}),registerService(a36_0x2bb1d0(0xd3),cliSkillDefinitions,{'defaultCommand':a36_0x2bb1d0(0xf5)}),registerService(a36_0x2bb1d0(0xe2),[updateDefinition],{'defaultCommand':a36_0x2bb1d0(0xed),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x2bb1d0(0xef),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x2bb1d0(0xe7),logsDefinitions,{'defaultCommand':a36_0x2bb1d0(0xee)});export function findDefinition(_0x36af5f,_0x269321){return definitions['get'](_0x36af5f+':'+_0x269321);}export function isKnownService(_0x2c065e){const _0x1f734b=a36_0x2bb1d0;return serviceByName[_0x1f734b(0xc9)](_0x2c065e);}export function getServiceEntry(_0x3ddfaf){const _0x43edb1=a36_0x2bb1d0;return serviceByName[_0x43edb1(0xe5)](_0x3ddfaf);}export function getAllDefinitions(){const _0x32bcde=a36_0x2bb1d0;return Array['from'](definitions[_0x32bcde(0xd8)]());}
1
+ const a36_0x3f8dde=a36_0x3473;(function(_0x2bf63f,_0x2ec0ea){const _0x1fe768=a36_0x3473,_0x491ac2=_0x2bf63f();while(!![]){try{const _0x1a2df5=-parseInt(_0x1fe768(0x178))/0x1*(parseInt(_0x1fe768(0x18e))/0x2)+-parseInt(_0x1fe768(0x189))/0x3*(parseInt(_0x1fe768(0x193))/0x4)+-parseInt(_0x1fe768(0x183))/0x5+-parseInt(_0x1fe768(0x17a))/0x6+-parseInt(_0x1fe768(0x19c))/0x7+-parseInt(_0x1fe768(0x18a))/0x8*(-parseInt(_0x1fe768(0x181))/0x9)+parseInt(_0x1fe768(0x19e))/0xa;if(_0x1a2df5===_0x2ec0ea)break;else _0x491ac2['push'](_0x491ac2['shift']());}catch(_0x4a2591){_0x491ac2['push'](_0x491ac2['shift']());}}}(a36_0x3a56,0x5ad85));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();function a36_0x3a56(){const _0x433e49=['service','set','Knowledge\x20Base','Datasets','79266AvOXpt','40CayNOS','Instant\x20API','Runtime\x20App\x20Config','map','5680NRpbwz','Self\x20Update','Configuration','BFF\x20Scripts','push','64PzebHK','CLI\x20Built-in\x20Skill','has','Artifacts','login','install','isSingleCommand','Service\x20Tree','read','4643800YHUCHt','values','22019120ztbdMr','description','\x20\x20[write]','get','OCR','Skills','API\x20Documentation','command','SQL\x20Queries','7pvHubw','\x20\x20[high-risk-write]','814446iRjOwN','Logs','Agent\x20Schedules','run','File','list','Workspace','197784XwOHWm','risk','3489590Xysfhj','defaultCommand'];a36_0x3a56=function(){return _0x433e49;};return a36_0x3a56();}function a36_0x3473(_0x5011e6,_0x572688){_0x5011e6=_0x5011e6-0x178;const _0x3a5659=a36_0x3a56();let _0x3473d5=_0x3a5659[_0x5011e6];return _0x3473d5;}export const serviceGroups=new Map();function registerDefinitions(_0x39ba30){const _0x588864=a36_0x3473;for(const _0x2d7de0 of _0x39ba30){definitions[_0x588864(0x186)](_0x2d7de0[_0x588864(0x185)]+':'+_0x2d7de0[_0x588864(0x1a5)],_0x2d7de0);let _0x131bd5=serviceGroups[_0x588864(0x1a1)](_0x2d7de0['service']);!_0x131bd5&&(_0x131bd5=[],serviceGroups[_0x588864(0x186)](_0x2d7de0[_0x588864(0x185)],_0x131bd5)),_0x131bd5[_0x588864(0x192)](_0x2d7de0);}}function registerService(_0x3aae1a,_0x4896e9,_0x3958ec){const _0x5cde79=a36_0x3473;registerDefinitions(_0x4896e9);const _0xfbcc44=_0x20f867=>_0x20f867===_0x5cde79(0x19b)?'':_0x20f867==='write'?_0x5cde79(0x1a0):_0x5cde79(0x179),_0x154fec={'service':_0x4896e9[0x0][_0x5cde79(0x185)],'label':_0x3aae1a,'commands':_0x4896e9[_0x5cde79(0x18d)](_0x183584=>({'command':_0x183584[_0x5cde79(0x1a5)],'description':_0x183584[_0x5cde79(0x19f)],'tag':_0xfbcc44(_0x183584[_0x5cde79(0x182)])})),'defaultCommand':_0x3958ec?.[_0x5cde79(0x184)]??(_0x3958ec?.[_0x5cde79(0x199)]?_0x4896e9[0x0]['command']:undefined),'isSingleCommand':_0x3958ec?.[_0x5cde79(0x199)]};serviceRegistry[_0x5cde79(0x192)](_0x154fec),serviceByName['set'](_0x154fec[_0x5cde79(0x185)],_0x154fec);}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x3f8dde(0x197)}),registerService('App\x20Management',appDefinitions,{'defaultCommand':a36_0x3f8dde(0x17f)}),registerService(a36_0x3f8dde(0x180),workspaceDefinitions),registerService(a36_0x3f8dde(0x18c),appConfigDefinitions),registerService(a36_0x3f8dde(0x190),configDefinitions,{'defaultCommand':a36_0x3f8dde(0x17f)}),registerService(a36_0x3f8dde(0x1a4),apiDocDefinitions),registerService(a36_0x3f8dde(0x188),datasetDefinitions),registerService(a36_0x3f8dde(0x18b),dataDefinitions),registerService(a36_0x3f8dde(0x1a6),sqlDefinitions),registerService(a36_0x3f8dde(0x191),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService(a36_0x3f8dde(0x196),artifactDefinitions),registerService(a36_0x3f8dde(0x17e),fileDefinitions),registerService(a36_0x3f8dde(0x1a2),ocrDefinitions),registerService(a36_0x3f8dde(0x187),kbDefinitions),registerService(a36_0x3f8dde(0x17c),scheduleDefinitions,{'defaultCommand':a36_0x3f8dde(0x17f)}),registerService(a36_0x3f8dde(0x19a),serviceDefinitions,{'defaultCommand':'list'}),registerService(a36_0x3f8dde(0x1a3),skillDefinitions,{'defaultCommand':a36_0x3f8dde(0x198)}),registerService(a36_0x3f8dde(0x194),cliSkillDefinitions,{'defaultCommand':'install'}),registerService(a36_0x3f8dde(0x18f),[updateDefinition],{'defaultCommand':a36_0x3f8dde(0x17d),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x3f8dde(0x17b),logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x3e751a,_0x3202e6){return definitions['get'](_0x3e751a+':'+_0x3202e6);}export function isKnownService(_0x39b06d){const _0x2df082=a36_0x3f8dde;return serviceByName[_0x2df082(0x195)](_0x39b06d);}export function getServiceEntry(_0x168db2){const _0x5bd4af=a36_0x3f8dde;return serviceByName[_0x5bd4af(0x1a1)](_0x168db2);}export function getAllDefinitions(){const _0xeb616c=a36_0x3f8dde;return Array['from'](definitions[_0xeb616c(0x19d)]());}
@@ -1 +1 @@
1
- const a37_0x5ce3ad=a37_0x2e4e;function a37_0x18aa(){const _0xabd91c=['Page\x20size\x20from\x201\x20to\x20100','appCode','Task\x20channel:\x20auto\x20or\x20premium','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','--title\x20must\x20not\x20be\x20blank.','1915116Umrquu','auto','high-risk-write','CRON','--prompt\x20must\x20not\x20be\x20blank.','validation','/schedules','653910MftZaM','schedule-id','list','36ZqCZum','Preview:\x20run\x20schedule\x20','number','\x20schedule\x20','delete','4692072mNpsPc','/run','description','read','taskId','prompt','466148CNPJeb','\x20immediately','Schedule\x20UUID','build','31659ewUWyN','Preview:\x20create\x20an\x20Agent\x20schedule','DELETE','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','string','Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','UTC','premium','scheduleId','trim','kind','cursor','POST','num','scheduled-at','Show\x20one\x20schedule\x20by\x20schedule\x20ID','schedule','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Schedule\x20kind:\x20CRON\x20or\x20ONCE','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','Queued\x20Task\x20','\x20from\x20schedule\x20','channel','body','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','ONCE','limit','/api/harness/apps/','cron','create','Created\x20','validate','385842CrtIAs','Preview:\x20delete\x20schedule\x20','Deleted\x20schedule\x20','str','title','detail','run','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','153818nrQDog'];a37_0x18aa=function(){return _0xabd91c;};return a37_0x18aa();}(function(_0xdcb306,_0x24fb78){const _0x29f2a7=a37_0x2e4e,_0xc72902=_0xdcb306();while(!![]){try{const _0x3c290a=parseInt(_0x29f2a7(0x1e8))/0x1+parseInt(_0x29f2a7(0x1bb))/0x2+-parseInt(_0x29f2a7(0x1bf))/0x3*(parseInt(_0x29f2a7(0x1b0))/0x4)+parseInt(_0x29f2a7(0x1f5))/0x5+parseInt(_0x29f2a7(0x1e0))/0x6+parseInt(_0x29f2a7(0x1ee))/0x7+-parseInt(_0x29f2a7(0x1b5))/0x8;if(_0x3c290a===_0x24fb78)break;else _0xc72902['push'](_0xc72902['shift']());}catch(_0x1cbd4d){_0xc72902['push'](_0xc72902['shift']());}}}(a37_0x18aa,0x2a803));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a37_0x2e4e(_0x2f7c13,_0x52aed9){_0x2f7c13=_0x2f7c13-0x1af;const _0x18aa66=a37_0x18aa();let _0x2e4e24=_0x18aa66[_0x2f7c13];return _0x2e4e24;}const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a37_0x5ce3ad(0x1c9),'type':a37_0x5ce3ad(0x1c3),'required':!![],'enum':['CRON',a37_0x5ce3ad(0x1d9)],'description':a37_0x5ce3ad(0x1d2)},CRON_FLAG={'name':a37_0x5ce3ad(0x1dc),'type':'string','description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a37_0x5ce3ad(0x1cd),'type':a37_0x5ce3ad(0x1c3),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x5ce3ad(0x1e4),'type':a37_0x5ce3ad(0x1c3),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a37_0x5ce3ad(0x1ba),'type':a37_0x5ce3ad(0x1c3),'required':!![],'description':a37_0x5ce3ad(0x1d0)},CHANNEL_FLAG={'name':a37_0x5ce3ad(0x1d6),'type':'string','enum':[a37_0x5ce3ad(0x1ef),a37_0x5ce3ad(0x1c6)],'default':a37_0x5ce3ad(0x1c6),'description':a37_0x5ce3ad(0x1eb)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':a37_0x5ce3ad(0x1c3),'required':!![],'description':a37_0x5ce3ad(0x1bd),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x5ce3ad(0x1d8)}},LIMIT_FLAG={'name':a37_0x5ce3ad(0x1da),'type':a37_0x5ce3ad(0x1b2),'default':0x14,'description':a37_0x5ce3ad(0x1e9)},CURSOR_FLAG={'name':a37_0x5ce3ad(0x1ca),'type':'string','description':a37_0x5ce3ad(0x1d3)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x2dd5d8){const _0xbc904c=a37_0x5ce3ad,_0x2d5db3=_0x2dd5d8[_0xbc904c(0x1e3)](_0xbc904c(0x1c9)),_0x30eac2=_0x2dd5d8[_0xbc904c(0x1e3)]('title')['trim'](),_0x3c46d3=_0x2dd5d8[_0xbc904c(0x1e3)](_0xbc904c(0x1ba))[_0xbc904c(0x1c8)](),_0x1dd40f=_0x2dd5d8[_0xbc904c(0x1e3)](_0xbc904c(0x1d6)),_0x518593=_0x2dd5d8['str']('cron'),_0x201b6e=_0x2dd5d8['str'](_0xbc904c(0x1cd));if(!_0x30eac2)throw CliErrors['validation'](_0xbc904c(0x1ed));if(!_0x3c46d3)throw CliErrors[_0xbc904c(0x1f3)](_0xbc904c(0x1f2));if(_0x2d5db3===_0xbc904c(0x1f1)){if(!_0x518593||_0x201b6e)throw CliErrors['validation'](_0xbc904c(0x1c2));return{'kind':_0x2d5db3,'timezone':_0xbc904c(0x1c5),'cron':_0x518593,'title':_0x30eac2,'prompt':_0x3c46d3,'channel':_0x1dd40f};}if(_0x2d5db3==='ONCE'){if(!_0x201b6e||_0x518593)throw CliErrors[_0xbc904c(0x1f3)](_0xbc904c(0x1e7));return{'kind':_0x2d5db3,'timezone':_0xbc904c(0x1c5),'scheduledAt':_0x201b6e,'title':_0x30eac2,'prompt':_0x3c46d3,'channel':_0x1dd40f};}throw CliErrors[_0xbc904c(0x1f3)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function scheduleCollectionPath(_0x106443){const _0x30db56=a37_0x5ce3ad;return _0x30db56(0x1db)+encodeURIComponent(_0x106443)+_0x30db56(0x1f4);}function scheduleItemPath(_0x9a8971,_0x35117d){return scheduleCollectionPath(_0x9a8971)+'/'+encodeURIComponent(_0x35117d);}const scheduleValidate={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1df),'description':a37_0x5ce3ad(0x1ec),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x16f270){readScheduleInput(_0x16f270);},async 'execute'(_0x593fc){const _0xabd687=a37_0x5ce3ad,_0x1b5808=readScheduleInput(_0x593fc),_0x334945=await validateRuntimeSchedule(_0x593fc[_0xabd687(0x1ea)],_0x1b5808);return{'ok':!![],'data':_0x334945,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1dd),'description':'Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','risk':a37_0x5ce3ad(0x1f0),'flags':INPUT_FLAGS,async 'validate'(_0x5275e6){readScheduleInput(_0x5275e6);},async 'execute'(_0x1bc557){const _0x1618e0=a37_0x5ce3ad,_0xf94ff3=readScheduleInput(_0x1bc557),_0x43364b=await validateRuntimeSchedule(_0x1bc557['appCode'],_0xf94ff3),_0x488a11=await createRuntimeSchedule(_0x1bc557[_0x1618e0(0x1ea)],_0x43364b);return{'ok':!![],'data':_0x488a11,'message':_0x1618e0(0x1de)+_0x488a11[_0x1618e0(0x1c9)]+_0x1618e0(0x1b3)+_0x488a11[_0x1618e0(0x1c7)]};},async 'dryRun'(_0x49bbc8){const _0x21af73=a37_0x5ce3ad,_0x22922f=readScheduleInput(_0x49bbc8);return dryRun(_0x21af73(0x1cb),scheduleCollectionPath(_0x49bbc8['appCode']))[_0x21af73(0x1d7)](_0x22922f)[_0x21af73(0x1b7)](_0x21af73(0x1c0))['build']();}},scheduleList={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1af),'description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':a37_0x5ce3ad(0x1b8),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x548adf){const _0x25bc05=a37_0x5ce3ad,_0x2313c4=_0x548adf[_0x25bc05(0x1cc)](_0x25bc05(0x1da));if(!Number['isSafeInteger'](_0x2313c4)||_0x2313c4<0x1||_0x2313c4>0x64)throw CliErrors[_0x25bc05(0x1f3)](_0x25bc05(0x1d1));const _0x50a1c1=_0x548adf[_0x25bc05(0x1e3)]('cursor');if(_0x50a1c1&&(_0x50a1c1['length']>0x400||_0x50a1c1['trim']()!==_0x50a1c1))throw CliErrors[_0x25bc05(0x1f3)]('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x46e499){const _0x3ca18c=a37_0x5ce3ad,_0x29f10a=_0x46e499[_0x3ca18c(0x1e3)](_0x3ca18c(0x1ca)),_0x2845c5=await listRuntimeSchedules(_0x46e499['appCode'],{'limit':_0x46e499[_0x3ca18c(0x1cc)](_0x3ca18c(0x1da)),..._0x29f10a?{'cursor':_0x29f10a}:{}});return{'ok':!![],'data':_0x2845c5};}},scheduleDetail={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1e5),'description':a37_0x5ce3ad(0x1ce),'risk':'read','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xcf9466){const _0x423f55=a37_0x5ce3ad,_0x3a146c=await getRuntimeSchedule(_0xcf9466['appCode'],_0xcf9466[_0x423f55(0x1e3)]('schedule-id'));return{'ok':!![],'data':_0x3a146c};}},scheduleRun={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1e6),'description':a37_0x5ce3ad(0x1c4),'risk':a37_0x5ce3ad(0x1f0),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4f4339){const _0x1acde1=a37_0x5ce3ad,_0x2b9271=_0x4f4339[_0x1acde1(0x1e3)](_0x1acde1(0x1f6)),_0x447975=await runRuntimeSchedule(_0x4f4339[_0x1acde1(0x1ea)],_0x2b9271);return{'ok':!![],'data':_0x447975,'message':_0x1acde1(0x1d4)+_0x447975[_0x1acde1(0x1b9)]+_0x1acde1(0x1d5)+_0x2b9271};},async 'dryRun'(_0x142fea){const _0x5c444e=a37_0x5ce3ad,_0x26eb29=_0x142fea['str']('schedule-id');return dryRun(_0x5c444e(0x1cb),scheduleItemPath(_0x142fea['appCode'],_0x26eb29)+_0x5c444e(0x1b6))['description'](_0x5c444e(0x1b1)+_0x26eb29+_0x5c444e(0x1bc))[_0x5c444e(0x1be)]();}},scheduleDelete={'service':a37_0x5ce3ad(0x1cf),'command':a37_0x5ce3ad(0x1b4),'description':'Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','risk':a37_0x5ce3ad(0x1f0),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x324e7c){const _0x52715f=a37_0x5ce3ad,_0x5d3be8=_0x324e7c[_0x52715f(0x1e3)]('schedule-id'),_0xc8b90a=await deleteRuntimeSchedule(_0x324e7c[_0x52715f(0x1ea)],_0x5d3be8);return{'ok':!![],'data':_0xc8b90a,'message':_0x52715f(0x1e2)+_0x5d3be8};},async 'dryRun'(_0x497cc3){const _0x4d4d27=a37_0x5ce3ad,_0x4799f3=_0x497cc3['str']('schedule-id');return dryRun(_0x4d4d27(0x1c1),scheduleItemPath(_0x497cc3[_0x4d4d27(0x1ea)],_0x4799f3))[_0x4d4d27(0x1b7)](_0x4d4d27(0x1e1)+_0x4799f3)[_0x4d4d27(0x1be)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a37_0x1abb11=a37_0x420b;(function(_0x4eb012,_0xcbde8a){const _0x14e737=a37_0x420b,_0x5037f1=_0x4eb012();while(!![]){try{const _0x5c6da2=parseInt(_0x14e737(0xa9))/0x1+-parseInt(_0x14e737(0xd5))/0x2+-parseInt(_0x14e737(0xa7))/0x3+parseInt(_0x14e737(0xad))/0x4+parseInt(_0x14e737(0xa2))/0x5*(-parseInt(_0x14e737(0xb7))/0x6)+-parseInt(_0x14e737(0xc1))/0x7+-parseInt(_0x14e737(0xdb))/0x8*(-parseInt(_0x14e737(0x97))/0x9);if(_0x5c6da2===_0xcbde8a)break;else _0x5037f1['push'](_0x5037f1['shift']());}catch(_0x278700){_0x5037f1['push'](_0x5037f1['shift']());}}}(a37_0x4e83,0x6b5e7));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a37_0x420b(_0x1481e3,_0x1b786a){_0x1481e3=_0x1481e3-0x97;const _0x4e83df=a37_0x4e83();let _0x420b6b=_0x4e83df[_0x1481e3];return _0x420b6b;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a37_0x1abb11(0x9a),'type':a37_0x1abb11(0xcd),'required':!![],'enum':[a37_0x1abb11(0xae),a37_0x1abb11(0xce)],'description':a37_0x1abb11(0xbc)},CRON_FLAG={'name':'cron','type':a37_0x1abb11(0xcd),'description':a37_0x1abb11(0xda)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':'string','description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x1abb11(0xb2),'type':a37_0x1abb11(0xcd),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a37_0x1abb11(0xd3),'type':a37_0x1abb11(0xcd),'required':!![],'description':a37_0x1abb11(0xc6)},CHANNEL_FLAG={'name':a37_0x1abb11(0x9f),'type':a37_0x1abb11(0xcd),'enum':[a37_0x1abb11(0xb0),a37_0x1abb11(0xaf)],'default':a37_0x1abb11(0xaf),'description':a37_0x1abb11(0x9d)},SCHEDULE_ID_FLAG={'name':a37_0x1abb11(0xd4),'type':a37_0x1abb11(0xcd),'required':!![],'description':a37_0x1abb11(0xc4),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x1abb11(0xbd)}},LIMIT_FLAG={'name':a37_0x1abb11(0xba),'type':a37_0x1abb11(0xc5),'default':0x14,'description':a37_0x1abb11(0xd8)},CURSOR_FLAG={'name':a37_0x1abb11(0xde),'type':a37_0x1abb11(0xcd),'description':a37_0x1abb11(0xa4)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x175ff1){const _0x20f3c9=a37_0x1abb11,_0x51fefc=_0x175ff1['str']('kind'),_0x2d225d=_0x175ff1['str'](_0x20f3c9(0xb2))['trim'](),_0x40fe61=_0x175ff1['str'](_0x20f3c9(0xd3))[_0x20f3c9(0xcf)](),_0x323903=_0x175ff1[_0x20f3c9(0xd6)](_0x20f3c9(0x9f)),_0x165acd=_0x175ff1['str'](_0x20f3c9(0xbe)),_0x1c2707=_0x175ff1['str'](_0x20f3c9(0xd7));if(!_0x2d225d)throw CliErrors[_0x20f3c9(0xa0)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x40fe61)throw CliErrors[_0x20f3c9(0xa0)](_0x20f3c9(0xb4));if(_0x51fefc===_0x20f3c9(0xae)){if(!_0x165acd||_0x1c2707)throw CliErrors[_0x20f3c9(0xa0)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x51fefc,'timezone':_0x20f3c9(0xbb),'cron':_0x165acd,'title':_0x2d225d,'prompt':_0x40fe61,'channel':_0x323903};}if(_0x51fefc===_0x20f3c9(0xce)){if(!_0x1c2707||_0x165acd)throw CliErrors[_0x20f3c9(0xa0)](_0x20f3c9(0xcb));return{'kind':_0x51fefc,'timezone':_0x20f3c9(0xbb),'scheduledAt':_0x1c2707,'title':_0x2d225d,'prompt':_0x40fe61,'channel':_0x323903};}throw CliErrors[_0x20f3c9(0xa0)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function a37_0x4e83(){const _0x4328fd=['Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','create','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','1980186YLmpLN','high-risk-write','630880cHVBSo','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','\x20schedule\x20','Preview:\x20run\x20schedule\x20','2312644vlDZmB','CRON','premium','auto','isSafeInteger','title','\x20from\x20schedule\x20','--prompt\x20must\x20not\x20be\x20blank.','run','/api/harness/apps/','30tksMIA','/run','read','limit','UTC','Schedule\x20kind:\x20CRON\x20or\x20ONCE','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','cron','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','Preview:\x20delete\x20schedule\x20','2777516kEISLv','POST','appCode','Schedule\x20UUID','number','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','taskId','scheduleId','list','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','detail','string','ONCE','trim','DELETE','\x20immediately','length','prompt','schedule-id','1391254dXvMGy','str','scheduled-at','Page\x20size\x20from\x201\x20to\x20100','Schedule\x20input\x20is\x20valid','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','11051912DyGELt','body','schedule','cursor','9CXolFi','Preview:\x20create\x20an\x20Agent\x20schedule','build','kind','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','description','Task\x20channel:\x20auto\x20or\x20premium','Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','channel','validation','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','398270DxAsgk','num'];a37_0x4e83=function(){return _0x4328fd;};return a37_0x4e83();}function scheduleCollectionPath(_0x88391c){const _0x53c877=a37_0x1abb11;return _0x53c877(0xb6)+encodeURIComponent(_0x88391c)+'/schedules';}function scheduleItemPath(_0x55e5b0,_0x446264){return scheduleCollectionPath(_0x55e5b0)+'/'+encodeURIComponent(_0x446264);}const scheduleValidate={'service':a37_0x1abb11(0xdd),'command':'validate','description':a37_0x1abb11(0xa1),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x4bec6b){readScheduleInput(_0x4bec6b);},async 'execute'(_0x2aa0dd){const _0xd7900f=a37_0x1abb11,_0x1d1423=readScheduleInput(_0x2aa0dd),_0x2440e0=await validateRuntimeSchedule(_0x2aa0dd[_0xd7900f(0xc3)],_0x1d1423);return{'ok':!![],'data':_0x2440e0,'message':_0xd7900f(0xd9)};}},scheduleCreate={'service':a37_0x1abb11(0xdd),'command':a37_0x1abb11(0xa5),'description':a37_0x1abb11(0xbf),'risk':'high-risk-write','flags':INPUT_FLAGS,async 'validate'(_0x8fde16){readScheduleInput(_0x8fde16);},async 'execute'(_0x49f7b0){const _0x532118=a37_0x1abb11,_0x8a98c7=readScheduleInput(_0x49f7b0),_0x4c4ef9=await validateRuntimeSchedule(_0x49f7b0[_0x532118(0xc3)],_0x8a98c7),_0x8d4fde=await createRuntimeSchedule(_0x49f7b0[_0x532118(0xc3)],_0x4c4ef9);return{'ok':!![],'data':_0x8d4fde,'message':'Created\x20'+_0x8d4fde['kind']+_0x532118(0xab)+_0x8d4fde[_0x532118(0xc9)]};},async 'dryRun'(_0x1bf673){const _0x54dc40=a37_0x1abb11,_0x707f3f=readScheduleInput(_0x1bf673);return dryRun('POST',scheduleCollectionPath(_0x1bf673['appCode']))[_0x54dc40(0xdc)](_0x707f3f)['description'](_0x54dc40(0x98))[_0x54dc40(0x99)]();}},scheduleList={'service':a37_0x1abb11(0xdd),'command':a37_0x1abb11(0xca),'description':a37_0x1abb11(0xaa),'risk':a37_0x1abb11(0xb9),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3d48){const _0x5f0fa1=a37_0x1abb11,_0x39f5f6=_0x3d48['num']('limit');if(!Number[_0x5f0fa1(0xb1)](_0x39f5f6)||_0x39f5f6<0x1||_0x39f5f6>0x64)throw CliErrors[_0x5f0fa1(0xa0)](_0x5f0fa1(0xa6));const _0x5b2907=_0x3d48[_0x5f0fa1(0xd6)](_0x5f0fa1(0xde));if(_0x5b2907&&(_0x5b2907[_0x5f0fa1(0xd2)]>0x400||_0x5b2907[_0x5f0fa1(0xcf)]()!==_0x5b2907))throw CliErrors['validation'](_0x5f0fa1(0xc7));},async 'execute'(_0x4bf5a4){const _0x4cff4f=a37_0x1abb11,_0x31d1d9=_0x4bf5a4[_0x4cff4f(0xd6)](_0x4cff4f(0xde)),_0x423718=await listRuntimeSchedules(_0x4bf5a4['appCode'],{'limit':_0x4bf5a4[_0x4cff4f(0xa3)](_0x4cff4f(0xba)),..._0x31d1d9?{'cursor':_0x31d1d9}:{}});return{'ok':!![],'data':_0x423718};}},scheduleDetail={'service':a37_0x1abb11(0xdd),'command':a37_0x1abb11(0xcc),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a37_0x1abb11(0xb9),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x473f7d){const _0x3fa3a7=a37_0x1abb11,_0x9966b2=await getRuntimeSchedule(_0x473f7d['appCode'],_0x473f7d['str'](_0x3fa3a7(0xd4)));return{'ok':!![],'data':_0x9966b2};}},scheduleRun={'service':a37_0x1abb11(0xdd),'command':a37_0x1abb11(0xb5),'description':a37_0x1abb11(0x9e),'risk':a37_0x1abb11(0xa8),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2833ef){const _0xb9c2d3=a37_0x1abb11,_0x1f1d90=_0x2833ef[_0xb9c2d3(0xd6)](_0xb9c2d3(0xd4)),_0x54b8d4=await runRuntimeSchedule(_0x2833ef[_0xb9c2d3(0xc3)],_0x1f1d90);return{'ok':!![],'data':_0x54b8d4,'message':'Queued\x20Task\x20'+_0x54b8d4[_0xb9c2d3(0xc8)]+_0xb9c2d3(0xb3)+_0x1f1d90};},async 'dryRun'(_0x476d65){const _0x27d10d=a37_0x1abb11,_0x1e59bb=_0x476d65['str'](_0x27d10d(0xd4));return dryRun(_0x27d10d(0xc2),scheduleItemPath(_0x476d65[_0x27d10d(0xc3)],_0x1e59bb)+_0x27d10d(0xb8))['description'](_0x27d10d(0xac)+_0x1e59bb+_0x27d10d(0xd1))['build']();}},scheduleDelete={'service':'schedule','command':'delete','description':a37_0x1abb11(0x9b),'risk':'high-risk-write','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x57e38e){const _0x1e9e38=a37_0x1abb11,_0x237b53=_0x57e38e[_0x1e9e38(0xd6)](_0x1e9e38(0xd4)),_0x323b6e=await deleteRuntimeSchedule(_0x57e38e[_0x1e9e38(0xc3)],_0x237b53);return{'ok':!![],'data':_0x323b6e,'message':'Deleted\x20schedule\x20'+_0x237b53};},async 'dryRun'(_0xd1bd0a){const _0x40417c=a37_0x1abb11,_0xac5a79=_0xd1bd0a['str']('schedule-id');return dryRun(_0x40417c(0xd0),scheduleItemPath(_0xd1bd0a[_0x40417c(0xc3)],_0xac5a79))[_0x40417c(0x9c)](_0x40417c(0xc0)+_0xac5a79)[_0x40417c(0x99)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a38_0x52f19b=a38_0x3ce5;(function(_0x42972f,_0x211f00){const _0x343f37=a38_0x3ce5,_0x4b7eff=_0x42972f();while(!![]){try{const _0x341cb5=parseInt(_0x343f37(0x1c6))/0x1+parseInt(_0x343f37(0x1cd))/0x2*(-parseInt(_0x343f37(0x1ca))/0x3)+parseInt(_0x343f37(0x1d2))/0x4*(parseInt(_0x343f37(0x1d0))/0x5)+-parseInt(_0x343f37(0x1d1))/0x6*(-parseInt(_0x343f37(0x1c4))/0x7)+parseInt(_0x343f37(0x1cb))/0x8+-parseInt(_0x343f37(0x1c8))/0x9+-parseInt(_0x343f37(0x1cf))/0xa*(-parseInt(_0x343f37(0x1c5))/0xb);if(_0x341cb5===_0x211f00)break;else _0x4b7eff['push'](_0x4b7eff['shift']());}catch(_0x57bda9){_0x4b7eff['push'](_0x4b7eff['shift']());}}}(a38_0x4bc8,0xc065e));import{buildSchemaPayload}from'../framework/schema-export.js';function a38_0x4bc8(){const _0x56e8cd=['4vhJrRl','7xVBVwj','2900568yGEopD','789219IKFGYA','schema','10887147YAUbrn','export','3813tNjQia','8983648tneMsZ','read','1462FzqTaI','Export\x20machine-readable\x20command\x20schema\x20(JSON)','10YKTbzw','3171710NGSDRW','699846Owefuv'];a38_0x4bc8=function(){return _0x56e8cd;};return a38_0x4bc8();}async function execute(_0x1686cc){const _0x31101f=await buildSchemaPayload();return{'ok':!![],'data':_0x31101f};}function a38_0x3ce5(_0xd54c33,_0x46ee31){_0xd54c33=_0xd54c33-0x1c4;const _0x4bc8e2=a38_0x4bc8();let _0x3ce571=_0x4bc8e2[_0xd54c33];return _0x3ce571;}export const schemaDefinition={'service':a38_0x52f19b(0x1c7),'command':a38_0x52f19b(0x1c9),'description':a38_0x52f19b(0x1ce),'risk':a38_0x52f19b(0x1cc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ const a38_0x2fcaaf=a38_0x3964;function a38_0x3964(_0x41d92d,_0x32c763){_0x41d92d=_0x41d92d-0x66;const _0x5be85d=a38_0x5be8();let _0x3964e1=_0x5be85d[_0x41d92d];return _0x3964e1;}(function(_0x34805a,_0x954664){const _0x1be59f=a38_0x3964,_0x536895=_0x34805a();while(!![]){try{const _0x2c9f41=-parseInt(_0x1be59f(0x6c))/0x1+-parseInt(_0x1be59f(0x6b))/0x2*(parseInt(_0x1be59f(0x70))/0x3)+-parseInt(_0x1be59f(0x68))/0x4+parseInt(_0x1be59f(0x67))/0x5*(parseInt(_0x1be59f(0x66))/0x6)+parseInt(_0x1be59f(0x6d))/0x7+parseInt(_0x1be59f(0x69))/0x8+parseInt(_0x1be59f(0x72))/0x9;if(_0x2c9f41===_0x954664)break;else _0x536895['push'](_0x536895['shift']());}catch(_0x616177){_0x536895['push'](_0x536895['shift']());}}}(a38_0x5be8,0xd10b2));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x1350bb){const _0x51ad7a=await buildSchemaPayload();return{'ok':!![],'data':_0x51ad7a};}function a38_0x5be8(){const _0x464605=['1438146uFYUrm','1656571aXmpHu','7832342cTtHRD','read','schema','3cgWTAy','export','14651037PFyNWn','786630JFlDHt','5DSmENa','275644yIJsPB','3383144hgkrHG','Export\x20machine-readable\x20command\x20schema\x20(JSON)'];a38_0x5be8=function(){return _0x464605;};return a38_0x5be8();}export const schemaDefinition={'service':a38_0x2fcaaf(0x6f),'command':a38_0x2fcaaf(0x71),'description':a38_0x2fcaaf(0x6a),'risk':a38_0x2fcaaf(0x6e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};