@lovrabet/lovrabet-cli 2.1.20 → 2.1.21

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 (128) 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/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.js +1 -1
  88. package/lib/framework/rate-limit.js +1 -1
  89. package/lib/framework/raw-flags.js +1 -1
  90. package/lib/framework/response.js +1 -1
  91. package/lib/framework/runner-confirmation.js +1 -1
  92. package/lib/framework/runner-error.js +1 -1
  93. package/lib/framework/runner.js +1 -1
  94. package/lib/framework/schema-export.js +1 -1
  95. package/lib/framework/service-order.js +1 -1
  96. package/lib/framework/types.js +1 -1
  97. package/lib/generated/build-info.d.ts +4 -4
  98. package/lib/generated/build-info.js +1 -1
  99. package/lib/help.js +1 -1
  100. package/lib/runtime/event.js +1 -1
  101. package/lib/runtime/index.js +1 -1
  102. package/lib/runtime/queue.js +1 -1
  103. package/lib/runtime/resolve.js +1 -1
  104. package/lib/skills/npx-skills-add.js +1 -1
  105. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  106. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  107. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  108. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  109. package/lib/skills/runtime-skill-sync/links.js +1 -1
  110. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  111. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  112. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  113. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  114. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  115. package/lib/skills/runtime-skill-sync/push.js +1 -1
  116. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  117. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  118. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  119. package/lib/skills/runtime-skill-sync.js +1 -1
  120. package/lib/utils/apply-jq-filter.js +1 -1
  121. package/lib/utils/logger.js +1 -1
  122. package/lib/utils/lossless-json.js +1 -1
  123. package/lib/utils/params.js +1 -1
  124. package/lib/utils/platform.js +1 -1
  125. package/lib/utils/update-notice.js +1 -1
  126. package/lib/utils/version.js +1 -1
  127. package/lib/utils/write-cli-side-channel.js +1 -1
  128. package/package.json +1 -1
@@ -1 +1 @@
1
- const a29_0x5ddd5d=a29_0x1f38;(function(_0x1823f7,_0x33170e){const _0xdd8977=a29_0x1f38,_0x30724d=_0x1823f7();while(!![]){try{const _0x95f3d7=-parseInt(_0xdd8977(0x9c))/0x1*(-parseInt(_0xdd8977(0x94))/0x2)+parseInt(_0xdd8977(0x8e))/0x3*(-parseInt(_0xdd8977(0x9d))/0x4)+-parseInt(_0xdd8977(0xb7))/0x5*(parseInt(_0xdd8977(0xa0))/0x6)+-parseInt(_0xdd8977(0x6f))/0x7+-parseInt(_0xdd8977(0x65))/0x8*(-parseInt(_0xdd8977(0xa5))/0x9)+-parseInt(_0xdd8977(0x8a))/0xa+parseInt(_0xdd8977(0xb8))/0xb;if(_0x95f3d7===_0x33170e)break;else _0x30724d['push'](_0x30724d['shift']());}catch(_0x4527e4){_0x30724d['push'](_0x30724d['shift']());}}}(a29_0x4399,0xacf7d));import a29_0x5d7c31 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a29_0x1f38(_0x5592db,_0x295ff8){_0x5592db=_0x5592db-0x64;const _0x4399e6=a29_0x4399();let _0x1f381b=_0x4399e6[_0x5592db];return _0x1f381b;}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';function a29_0x4399(){const _0x5e66c3=['\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','305zbghDA','10296880FswKEa','\x20(accessKey)','locale','\x20doctor','gray','33688PguYau','status','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','(not\x20found)','(default)','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','appCode','2671431DQXuiX','doctor','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','Project','\x20\x20Service\x20Tree','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','commandCount','\x20\x20API\x20Endpoints','\x20commands)','(default:\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','currentApp','✓\x20Loaded','bold','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','platform','env','format','4129940dHhtMg','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Merged\x20Config','12ZfFGSG','empty','services','serviceCode','serviceCount','(set,\x20length=','1507028LNlyEk','padEnd','verbose','yellow','read','defaultApp','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','log','1eqktoY','290552AIgSCr','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(none)','115266Wrctxx','ClientAk','✓\x20Valid\x20JSON','name','version','2727QNXVFm','\x20\x20─','repeat','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','registryPath','\x20\x20Config\x20JSON','check','red','(unnamed)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','green','message','riskLevel','(no\x20file)'];a29_0x4399=function(){return _0x5e66c3;};return a29_0x4399();}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x97c1b8){const _0xad34f5=a29_0x1f38,_0x4c2e6d=getCliVersion(),_0x33a3f1=buildConfigFromFlags({});await initGlobalEnvironment(_0x33a3f1),console[_0xad34f5(0x9b)](),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x85)](CLI_BIN_NAME+_0xad34f5(0xbb))),console['log'](a29_0x5d7c31[_0xad34f5(0x64)]('─'[_0xad34f5(0xa7)](0x32))),console[_0xad34f5(0x9b)](_0xad34f5(0x6d)+_0x4c2e6d),console[_0xad34f5(0x9b)](_0xad34f5(0xb6)+process[_0xad34f5(0xa4)]),console[_0xad34f5(0x9b)](_0xad34f5(0x80)+process[_0xad34f5(0x87)]+'\x20'+process['arch']),console[_0xad34f5(0x9b)](),console['log'](a29_0x5d7c31[_0xad34f5(0x85)]('\x20\x20Config\x20Files')),console['log'](a29_0x5d7c31[_0xad34f5(0x64)]('\x20\x20─'[_0xad34f5(0xa7)](0x1e)));const _0x225e7d=getGlobalConfigPath(),_0x26e60f=getProjectConfigPath();console[_0xad34f5(0x9b)](_0xad34f5(0x71)+(_0x225e7d||a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x6b)))),console[_0xad34f5(0x9b)](_0xad34f5(0xa8)+(_0x26e60f||a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x6b)))),console[_0xad34f5(0x9b)](),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x85)](_0xad34f5(0xaa))),console[_0xad34f5(0x9b)](a29_0x5d7c31['gray']('\x20\x20─'[_0xad34f5(0xa7)](0x1e)));const _0x301bc=(_0x108fd2,_0x43aa47)=>{const _0x1522bf=_0xad34f5;if(!_0x43aa47){console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2[_0x1522bf(0x95)](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0x64)](_0x1522bf(0xb3)));return;}const _0x119510=inspectCliConfigJsonFile(_0x43aa47);if(_0x119510[_0x1522bf(0x66)]==='ok')console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2['padEnd'](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0xb0)](_0x1522bf(0xa2)));else{if(_0x119510[_0x1522bf(0x66)]===_0x1522bf(0x8f))console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2[_0x1522bf(0x95)](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0x97)](_0x1522bf(0xb5)));else _0x119510[_0x1522bf(0x66)]===_0x1522bf(0x72)?console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2[_0x1522bf(0x95)](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0x64)]('(missing)')):(console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2['padEnd'](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0xac)]('✗\x20Invalid\x20JSON')),console[_0x1522bf(0x9b)]('\x20\x20'+''[_0x1522bf(0x95)](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0xac)](_0x119510[_0x1522bf(0xb1)])));}};_0x301bc('Global',_0x225e7d),_0x301bc(_0xad34f5(0x77),_0x26e60f),console[_0xad34f5(0x9b)](),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x85)](_0xad34f5(0x8d))),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0xa6)[_0xad34f5(0xa7)](0x1e))),console[_0xad34f5(0x9b)](_0xad34f5(0x81)+(_0x33a3f1[_0xad34f5(0x6e)]||a29_0x5d7c31[_0xad34f5(0xac)]('(not\x20set)'))),console[_0xad34f5(0x9b)](_0xad34f5(0x7b)+_0x33a3f1[_0xad34f5(0x88)]);const _0x581c94=isLegacyCompatConfigKey(_0xad34f5(0xba))?a29_0x5d7c31[_0xad34f5(0x64)](_0x33a3f1[_0xad34f5(0xba)]+'\x20(legacy/compat\x20only)'):_0x33a3f1[_0xad34f5(0xba)];console['log'](_0xad34f5(0x68)+_0x581c94),console[_0xad34f5(0x9b)](_0xad34f5(0x9e)+(_0x33a3f1[_0xad34f5(0x99)]||a29_0x5d7c31[_0xad34f5(0x64)]('(none)'))),console[_0xad34f5(0x9b)](_0xad34f5(0x86)+(_0x33a3f1[_0xad34f5(0x83)]||a29_0x5d7c31['gray'](_0xad34f5(0x9f)))),console['log']('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x33a3f1[_0xad34f5(0x89)]||a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x7f)+DEFAULT_CONFIG_VALUES[_0xad34f5(0x89)]+')'))),console[_0xad34f5(0x9b)](_0xad34f5(0x75)+(_0x33a3f1['pageSize']??a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x6c)))),console[_0xad34f5(0x9b)](_0xad34f5(0x82)+_0x33a3f1[_0xad34f5(0xb2)]),console[_0xad34f5(0x9b)](_0xad34f5(0xae)+_0x33a3f1[_0xad34f5(0x96)]),console[_0xad34f5(0x9b)](_0xad34f5(0x6a)+AUTH_MODE['ClientAk']),console['log'](_0xad34f5(0xb4)+(_0x33a3f1['accessKey']?a29_0x5d7c31[_0xad34f5(0xb0)](_0xad34f5(0x93)+_0x33a3f1[_0xad34f5(0x76)]['length']+')'):a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x9f)))),console[_0xad34f5(0x9b)](),console[_0xad34f5(0x9b)](a29_0x5d7c31['bold'](_0xad34f5(0x7d))),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x64)]('\x20\x20─'[_0xad34f5(0xa7)](0x1e))),console[_0xad34f5(0x9b)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0xad34f5(0x9b)](_0xad34f5(0x7a)+getUserDomain()),console['log'](_0xad34f5(0x8c)+getRuntimeDomain()),console[_0xad34f5(0x9b)](),console['log'](a29_0x5d7c31[_0xad34f5(0x85)](_0xad34f5(0x78))),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x64)]('\x20\x20─'[_0xad34f5(0xa7)](0x1e)));const _0x533f08=inspectServiceRegistry();console[_0xad34f5(0x9b)](_0xad34f5(0x9a)+_0x533f08[_0xad34f5(0xa9)]),console[_0xad34f5(0x9b)](_0xad34f5(0x69)+formatServiceRegistryStatus(_0x533f08)),console[_0xad34f5(0x9b)](_0xad34f5(0x73)+_0x533f08[_0xad34f5(0x92)]),console[_0xad34f5(0x9b)](_0xad34f5(0xaf)+_0x533f08[_0xad34f5(0x7c)]);for(const _0x204014 of _0x533f08[_0xad34f5(0x90)]){console['log']('\x20\x20'+(_0x204014[_0xad34f5(0x91)]+':')['padEnd'](0x11)+'\x20'+(_0x204014[_0xad34f5(0xa3)]||a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0xad)))+'\x20('+_0x204014[_0xad34f5(0x7c)]+_0xad34f5(0x7e)),console[_0xad34f5(0x9b)]('\x20\x20'+''[_0xad34f5(0x95)](0x11)+'\x20Imported\x20from:\x20'+_0x204014['source']['path']);}return console[_0xad34f5(0x9b)](),console['log'](a29_0x5d7c31[_0xad34f5(0x85)]('\x20\x20Auth')),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0xa6)[_0xad34f5(0xa7)](0x1e))),console[_0xad34f5(0x9b)](_0xad34f5(0x8b)+a29_0x5d7c31[_0xad34f5(0xb0)](AUTH_MODE[_0xad34f5(0xa1)]+_0xad34f5(0xb9))),console[_0xad34f5(0x9b)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x67))),console[_0xad34f5(0x9b)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x2c36c3){const _0x37a0c3=a29_0x1f38;if(_0x2c36c3['status']==='ok')return a29_0x5d7c31[_0x37a0c3(0xb0)](_0x37a0c3(0x84));if(_0x2c36c3[_0x37a0c3(0x66)]===_0x37a0c3(0x72))return a29_0x5d7c31[_0x37a0c3(0x64)]('(not\x20found)');if(_0x2c36c3[_0x37a0c3(0x66)]===_0x37a0c3(0x8f))return a29_0x5d7c31[_0x37a0c3(0x97)](_0x37a0c3(0x74));return a29_0x5d7c31[_0x37a0c3(0xac)]('✗\x20Invalid'+(_0x2c36c3['message']?':\x20'+_0x2c36c3[_0x37a0c3(0xb1)]:''));}export const doctorDefinition={'service':a29_0x5ddd5d(0x70),'command':a29_0x5ddd5d(0xab),'description':a29_0x5ddd5d(0x79),'risk':a29_0x5ddd5d(0x98),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x83e468=a29_0x55f8;(function(_0x51a629,_0x4430fa){const _0x10ace2=a29_0x55f8,_0x409db6=_0x51a629();while(!![]){try{const _0x2c84cd=parseInt(_0x10ace2(0xe0))/0x1+-parseInt(_0x10ace2(0x118))/0x2*(parseInt(_0x10ace2(0xf1))/0x3)+parseInt(_0x10ace2(0xe5))/0x4+-parseInt(_0x10ace2(0x107))/0x5*(-parseInt(_0x10ace2(0x108))/0x6)+parseInt(_0x10ace2(0x100))/0x7*(-parseInt(_0x10ace2(0x114))/0x8)+parseInt(_0x10ace2(0xe4))/0x9+parseInt(_0x10ace2(0xf0))/0xa*(-parseInt(_0x10ace2(0xf4))/0xb);if(_0x2c84cd===_0x4430fa)break;else _0x409db6['push'](_0x409db6['shift']());}catch(_0x14ad2f){_0x409db6['push'](_0x409db6['shift']());}}}(a29_0x1e82,0x87573));import a29_0x115406 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a29_0x1e82(){const _0x44ae46=['\x20\x20Config\x20JSON','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','✗\x20Invalid','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','length','\x20\x20Auth','8fTQVQq','red','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project','104qjyBgs','\x20(accessKey)','empty','riskLevel','status','yellow','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','padEnd','repeat','log','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','\x20\x20Config\x20Files','path','(no\x20file)','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','missing','source','env','128440FOCtcL','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','8344386rpGAKI','4155400FfMBlb','\x20(legacy/compat\x20only)','\x20\x20API\x20Endpoints','(missing)','(none)','doctor','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20set)','green','⚠\x20Empty','\x20commands)','20FVFJUD','55227WEzJhy','Diagnose\x20CLI\x20configuration\x20and\x20environment','locale','3989931JuXMlJ','read','check','registryPath','\x20Imported\x20from:\x20','Global','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','services','346689wqfBJw','gray','commandCount','(not\x20found)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','2420cZxGky','2382FrfTSd','pageSize','bold','✓\x20Valid\x20JSON','accessKey'];a29_0x1e82=function(){return _0x44ae46;};return a29_0x1e82();}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_0x55f8(_0x4af248,_0x7f875c){_0x4af248=_0x4af248-0xd7;const _0x1e828a=a29_0x1e82();let _0x55f88d=_0x1e828a[_0x4af248];return _0x55f88d;}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x44ae80){const _0x19853a=a29_0x55f8,_0x356f46=getCliVersion(),_0x2795f0=buildConfigFromFlags({});await initGlobalEnvironment(_0x2795f0),console[_0x19853a(0x122)](),console['log'](a29_0x115406[_0x19853a(0x10a)](CLI_BIN_NAME+'\x20doctor')),console[_0x19853a(0x122)](a29_0x115406[_0x19853a(0x101)]('─'[_0x19853a(0x121)](0x32))),console[_0x19853a(0x122)](_0x19853a(0xe1)+_0x356f46),console['log'](_0x19853a(0xe2)+process['version']),console[_0x19853a(0x122)](_0x19853a(0xe3)+process[_0x19853a(0xdc)]+'\x20'+process['arch']),console[_0x19853a(0x122)](),console[_0x19853a(0x122)](a29_0x115406['bold'](_0x19853a(0xd8))),console[_0x19853a(0x122)](a29_0x115406[_0x19853a(0x101)](_0x19853a(0xd7)[_0x19853a(0x121)](0x1e)));const _0xc03e08=getGlobalConfigPath(),_0x3ec0fd=getProjectConfigPath();console['log'](_0x19853a(0x104)+(_0xc03e08||a29_0x115406['gray'](_0x19853a(0x103)))),console[_0x19853a(0x122)](_0x19853a(0x123)+(_0x3ec0fd||a29_0x115406[_0x19853a(0x101)](_0x19853a(0x103)))),console[_0x19853a(0x122)](),console[_0x19853a(0x122)](a29_0x115406[_0x19853a(0x10a)](_0x19853a(0x10d))),console['log'](a29_0x115406[_0x19853a(0x101)](_0x19853a(0xd7)['repeat'](0x1e)));const _0x2a6d67=(_0x59078d,_0x537ff9)=>{const _0x191a59=_0x19853a;if(!_0x537ff9){console[_0x191a59(0x122)]('\x20\x20'+_0x59078d[_0x191a59(0x120)](0x11)+'\x20'+a29_0x115406[_0x191a59(0x101)](_0x191a59(0xda)));return;}const _0x37231b=inspectCliConfigJsonFile(_0x537ff9);if(_0x37231b['status']==='ok')console[_0x191a59(0x122)]('\x20\x20'+_0x59078d[_0x191a59(0x120)](0x11)+'\x20'+a29_0x115406[_0x191a59(0xed)](_0x191a59(0x10b)));else{if(_0x37231b[_0x191a59(0x11c)]==='empty')console[_0x191a59(0x122)]('\x20\x20'+_0x59078d[_0x191a59(0x120)](0x11)+'\x20'+a29_0x115406[_0x191a59(0x11d)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x37231b[_0x191a59(0x11c)]==='missing'?console[_0x191a59(0x122)]('\x20\x20'+_0x59078d[_0x191a59(0x120)](0x11)+'\x20'+a29_0x115406[_0x191a59(0x101)](_0x191a59(0xe8))):(console[_0x191a59(0x122)]('\x20\x20'+_0x59078d[_0x191a59(0x120)](0x11)+'\x20'+a29_0x115406[_0x191a59(0x115)]('✗\x20Invalid\x20JSON')),console[_0x191a59(0x122)]('\x20\x20'+''[_0x191a59(0x120)](0x11)+'\x20'+a29_0x115406[_0x191a59(0x115)](_0x37231b[_0x191a59(0x11f)])));}};_0x2a6d67(_0x19853a(0xf9),_0xc03e08),_0x2a6d67(_0x19853a(0x117),_0x3ec0fd),console['log'](),console[_0x19853a(0x122)](a29_0x115406['bold']('\x20\x20Merged\x20Config')),console[_0x19853a(0x122)](a29_0x115406[_0x19853a(0x101)](_0x19853a(0xd7)[_0x19853a(0x121)](0x1e))),console[_0x19853a(0x122)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2795f0['appCode']||a29_0x115406[_0x19853a(0x115)](_0x19853a(0xec)))),console[_0x19853a(0x122)](_0x19853a(0xdb)+_0x2795f0[_0x19853a(0xdf)]);const _0x1734c4=isLegacyCompatConfigKey('locale')?a29_0x115406[_0x19853a(0x101)](_0x2795f0['locale']+_0x19853a(0xe6)):_0x2795f0[_0x19853a(0xf3)];console['log'](_0x19853a(0x116)+_0x1734c4),console[_0x19853a(0x122)](_0x19853a(0xfe)+(_0x2795f0['defaultApp']||a29_0x115406[_0x19853a(0x101)](_0x19853a(0xe9)))),console[_0x19853a(0x122)](_0x19853a(0xfc)+(_0x2795f0['currentApp']||a29_0x115406['gray']('(none)'))),console[_0x19853a(0x122)](_0x19853a(0xfa)+(_0x2795f0['format']||a29_0x115406['gray']('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x19853a(0x122)](_0x19853a(0x106)+(_0x2795f0[_0x19853a(0x109)]??a29_0x115406[_0x19853a(0x101)]('(default)'))),console[_0x19853a(0x122)](_0x19853a(0x10e)+_0x2795f0[_0x19853a(0x11b)]),console[_0x19853a(0x122)](_0x19853a(0x11e)+_0x2795f0['verbose']),console[_0x19853a(0x122)](_0x19853a(0x105)+AUTH_MODE['ClientAk']),console[_0x19853a(0x122)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x2795f0[_0x19853a(0x10c)]?a29_0x115406['green']('(set,\x20length='+_0x2795f0[_0x19853a(0x10c)][_0x19853a(0x112)]+')'):a29_0x115406[_0x19853a(0x101)](_0x19853a(0xe9)))),console[_0x19853a(0x122)](),console[_0x19853a(0x122)](a29_0x115406[_0x19853a(0x10a)](_0x19853a(0xe7))),console[_0x19853a(0x122)](a29_0x115406[_0x19853a(0x101)]('\x20\x20─'['repeat'](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x19853a(0x122)](_0x19853a(0x111)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x19853a(0x122)](),console[_0x19853a(0x122)](a29_0x115406[_0x19853a(0x10a)](_0x19853a(0x10f))),console[_0x19853a(0x122)](a29_0x115406[_0x19853a(0x101)](_0x19853a(0xd7)[_0x19853a(0x121)](0x1e)));const _0x7942d3=inspectServiceRegistry();console[_0x19853a(0x122)]('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x7942d3[_0x19853a(0xf7)]),console[_0x19853a(0x122)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x7942d3)),console[_0x19853a(0x122)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x7942d3['serviceCount']),console['log'](_0x19853a(0xeb)+_0x7942d3[_0x19853a(0x102)]);for(const _0x3d3d6c of _0x7942d3[_0x19853a(0xff)]){console[_0x19853a(0x122)]('\x20\x20'+(_0x3d3d6c['serviceCode']+':')[_0x19853a(0x120)](0x11)+'\x20'+(_0x3d3d6c['name']||a29_0x115406[_0x19853a(0x101)]('(unnamed)'))+'\x20('+_0x3d3d6c[_0x19853a(0x102)]+_0x19853a(0xef)),console[_0x19853a(0x122)]('\x20\x20'+''[_0x19853a(0x120)](0x11)+_0x19853a(0xf8)+_0x3d3d6c[_0x19853a(0xde)][_0x19853a(0xd9)]);}return console['log'](),console[_0x19853a(0x122)](a29_0x115406[_0x19853a(0x10a)](_0x19853a(0x113))),console['log'](a29_0x115406['gray']('\x20\x20─'[_0x19853a(0x121)](0x1e))),console[_0x19853a(0x122)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a29_0x115406[_0x19853a(0xed)](AUTH_MODE['ClientAk']+_0x19853a(0x119))),console[_0x19853a(0x122)](_0x19853a(0xfd)+a29_0x115406[_0x19853a(0x101)](_0x19853a(0xfb))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0xb8d387){const _0x43b68c=a29_0x55f8;if(_0xb8d387[_0x43b68c(0x11c)]==='ok')return a29_0x115406[_0x43b68c(0xed)]('✓\x20Loaded');if(_0xb8d387['status']===_0x43b68c(0xdd))return a29_0x115406['gray'](_0x43b68c(0x103));if(_0xb8d387[_0x43b68c(0x11c)]===_0x43b68c(0x11a))return a29_0x115406[_0x43b68c(0x11d)](_0x43b68c(0xee));return a29_0x115406[_0x43b68c(0x115)](_0x43b68c(0x110)+(_0xb8d387['message']?':\x20'+_0xb8d387['message']:''));}export const doctorDefinition={'service':a29_0x83e468(0xea),'command':a29_0x83e468(0xf6),'description':a29_0x83e468(0xf2),'risk':a29_0x83e468(0xf5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x28e410=a30_0x56de;(function(_0x52b705,_0x321f53){const _0x4ec36a=a30_0x56de,_0x1213b4=_0x52b705();while(!![]){try{const _0x3df847=-parseInt(_0x4ec36a(0xf5))/0x1*(-parseInt(_0x4ec36a(0xe4))/0x2)+-parseInt(_0x4ec36a(0x102))/0x3+-parseInt(_0x4ec36a(0xda))/0x4+-parseInt(_0x4ec36a(0xe1))/0x5+-parseInt(_0x4ec36a(0xf3))/0x6*(parseInt(_0x4ec36a(0xdb))/0x7)+parseInt(_0x4ec36a(0xdd))/0x8*(-parseInt(_0x4ec36a(0xe6))/0x9)+parseInt(_0x4ec36a(0xf9))/0xa;if(_0x3df847===_0x321f53)break;else _0x1213b4['push'](_0x1213b4['shift']());}catch(_0x242ac7){_0x1213b4['push'](_0x1213b4['shift']());}}}(a30_0x5e07,0x36d9c));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x56de(_0x26d72a,_0x234645){_0x26d72a=_0x26d72a-0xda;const _0x5e0725=a30_0x5e07();let _0x56de5a=_0x5e0725[_0x26d72a];return _0x56de5a;}function a30_0x5e07(){const _0xc7c848=['2574XYgdhu','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','\x20to\x20runtime\x20app\x20','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','File','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','path','body','/client/uploadFile','filePath\x20is\x20required.','build','bool','filepath','18DsuXJx','string','10xEKTUZ','str','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','boolean','11265400DoqdIb','Path\x20to\x20the\x20local\x20file\x20to\x20upload','query-url','appCode','trim','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','filePath','upload','file','519534WZmZst','1393648cFDHHs','1687EITCpN','download','6752SAeNnC','long-term','Uploaded\x20file:\x20','description','1375125GOCefB','POST','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','27370GjRPKi','Preview:\x20upload\x20'];a30_0x5e07=function(){return _0xc7c848;};return a30_0x5e07();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x28e410(0x101),'type':a30_0x28e410(0xf4),'required':!![],'description':a30_0x28e410(0xfa)},FILEPATH_FLAG={'name':a30_0x28e410(0xf2),'type':'string','required':!![],'description':a30_0x28e410(0xe9)},DOWNLOAD_FLAG={'name':a30_0x28e410(0xdc),'type':a30_0x28e410(0xf8),'description':a30_0x28e410(0xf7)},LONG_TERM_FLAG={'name':a30_0x28e410(0xde),'type':a30_0x28e410(0xf8),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x2d1435){const _0x5dd292=a30_0x28e410,_0x52f2e6=_0x2d1435[_0x5dd292(0xfd)]();if(!_0x52f2e6)throw CliErrors['validation'](_0x5dd292(0xef));return _0x52f2e6;}const fileUpload={'service':a30_0x28e410(0x101),'command':a30_0x28e410(0x100),'description':a30_0x28e410(0xe3),'risk':'write','flags':[FILE_FLAG],async 'dryRun'(_0x5ac52e){const _0x50c95f=a30_0x28e410,_0x12b365=requireRuntimeUploadFile(_0x5ac52e['str'](_0x50c95f(0x101)),'File');return dryRun(_0x50c95f(0xe2),_0x50c95f(0xee))[_0x50c95f(0xed)]({'appCode':_0x5ac52e['appCode'],'multipart':{'file':_0x12b365}})[_0x50c95f(0xe0)](_0x50c95f(0xe5)+_0x12b365['path']+_0x50c95f(0xe8)+_0x5ac52e[_0x50c95f(0xfc)])[_0x50c95f(0xf0)]();},async 'execute'(_0x3d0f3f){const _0x3c540b=a30_0x28e410,_0x48a16f=requireRuntimeUploadFile(_0x3d0f3f[_0x3c540b(0xf6)](_0x3c540b(0x101)),_0x3c540b(0xea)),_0x83e8=await uploadRuntimeFile(_0x3d0f3f['appCode'],_0x48a16f[_0x3c540b(0xec)]);return{'ok':!![],'data':_0x83e8,'message':_0x83e8[_0x3c540b(0xff)]?_0x3c540b(0xdf)+_0x83e8[_0x3c540b(0xff)]+_0x3c540b(0xe7):_0x3c540b(0xeb)};}},fileQueryUrl={'service':a30_0x28e410(0x101),'command':a30_0x28e410(0xfb),'description':a30_0x28e410(0xfe),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x1ac934){const _0x1b7487=a30_0x28e410,_0x432e67=requireFilePath(_0x1ac934[_0x1b7487(0xf6)](_0x1b7487(0xf2))),_0x19215f=await queryRuntimeFileUrl(_0x432e67,{'download':_0x1ac934['bool']('download'),'longTerm':_0x1ac934[_0x1b7487(0xf1)](_0x1b7487(0xde))});return{'ok':!![],'data':_0x19215f};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x1c15a7=a30_0x49a9;(function(_0x9ff619,_0x550805){const _0x4a00a6=a30_0x49a9,_0x4fd3dd=_0x9ff619();while(!![]){try{const _0x2b75bb=parseInt(_0x4a00a6(0x152))/0x1*(parseInt(_0x4a00a6(0x148))/0x2)+-parseInt(_0x4a00a6(0x153))/0x3+-parseInt(_0x4a00a6(0x146))/0x4+parseInt(_0x4a00a6(0x13f))/0x5+-parseInt(_0x4a00a6(0x13d))/0x6*(parseInt(_0x4a00a6(0x14c))/0x7)+parseInt(_0x4a00a6(0x138))/0x8+parseInt(_0x4a00a6(0x13b))/0x9;if(_0x2b75bb===_0x550805)break;else _0x4fd3dd['push'](_0x4fd3dd['shift']());}catch(_0x51265c){_0x4fd3dd['push'](_0x4fd3dd['shift']());}}}(a30_0x1075,0xaeb31));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x1075(){const _0x59023d=['Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','file','download','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','boolean','1022472seOyeC','trim','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','6164163DMCVSH','long-term','9228yJrDPk','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','5247690UOjBrq','str','Path\x20to\x20the\x20local\x20file\x20to\x20upload','description','build','string','File','4159196CniIbc','upload','68024LcDGgN','filepath','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','query-url','1421COHsjO','read','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','/client/uploadFile','validation','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','19ZFANUE','1322700vlwxja','filePath\x20is\x20required.','Uploaded\x20file:\x20','bool','appCode','filePath'];a30_0x1075=function(){return _0x59023d;};return a30_0x1075();}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x1c15a7(0x15a),'type':a30_0x1c15a7(0x144),'required':!![],'description':a30_0x1c15a7(0x141)},FILEPATH_FLAG={'name':a30_0x1c15a7(0x149),'type':a30_0x1c15a7(0x144),'required':!![],'description':a30_0x1c15a7(0x151)},DOWNLOAD_FLAG={'name':a30_0x1c15a7(0x15b),'type':a30_0x1c15a7(0x137),'description':a30_0x1c15a7(0x15c)},LONG_TERM_FLAG={'name':a30_0x1c15a7(0x13c),'type':a30_0x1c15a7(0x137),'description':a30_0x1c15a7(0x159)};function requireFilePath(_0x31d36d){const _0x52caca=a30_0x1c15a7,_0x122e86=_0x31d36d[_0x52caca(0x139)]();if(!_0x122e86)throw CliErrors[_0x52caca(0x150)](_0x52caca(0x154));return _0x122e86;}const fileUpload={'service':a30_0x1c15a7(0x15a),'command':a30_0x1c15a7(0x147),'description':a30_0x1c15a7(0x13e),'risk':a30_0x1c15a7(0x14d),'flags':[FILE_FLAG],async 'dryRun'(_0x36798a){const _0xfb1c5=a30_0x1c15a7,_0x50bf7d=requireRuntimeUploadFile(_0x36798a['str'](_0xfb1c5(0x15a)),_0xfb1c5(0x145));return dryRun('POST',_0xfb1c5(0x14f))['body']({'appCode':_0x36798a[_0xfb1c5(0x157)],'multipart':{'file':_0x50bf7d}})[_0xfb1c5(0x142)]('Preview:\x20upload\x20'+_0x50bf7d['path']+'\x20to\x20runtime\x20app\x20'+_0x36798a[_0xfb1c5(0x157)])[_0xfb1c5(0x143)]();},async 'execute'(_0x199678){const _0x12fadc=a30_0x1c15a7,_0x5e04ce=requireRuntimeUploadFile(_0x199678['str'](_0x12fadc(0x15a)),'File'),_0xf377f9=await uploadRuntimeFile(_0x199678[_0x12fadc(0x157)],_0x5e04ce['path']);return{'ok':!![],'data':_0xf377f9,'message':_0xf377f9[_0x12fadc(0x158)]?_0x12fadc(0x155)+_0xf377f9['filePath']+_0x12fadc(0x13a):_0x12fadc(0x14e)};}},fileQueryUrl={'service':'file','command':a30_0x1c15a7(0x14b),'description':a30_0x1c15a7(0x14a),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x19b619){const _0x3a0121=a30_0x1c15a7,_0x3ee640=requireFilePath(_0x19b619[_0x3a0121(0x140)](_0x3a0121(0x149))),_0x4b580a=await queryRuntimeFileUrl(_0x3ee640,{'download':_0x19b619[_0x3a0121(0x156)](_0x3a0121(0x15b)),'longTerm':_0x19b619['bool']('long-term')});return{'ok':!![],'data':_0x4b580a};}};function a30_0x49a9(_0x2488d6,_0x354f6d){_0x2488d6=_0x2488d6-0x137;const _0x10758d=a30_0x1075();let _0x49a9a6=_0x10758d[_0x2488d6];return _0x49a9a6;}export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x5b54d4=a31_0x5f11;(function(_0x420fd3,_0x3553d9){const _0xf9ec53=a31_0x5f11,_0x10e5e8=_0x420fd3();while(!![]){try{const _0x3f30a1=-parseInt(_0xf9ec53(0xf8))/0x1*(-parseInt(_0xf9ec53(0x135))/0x2)+-parseInt(_0xf9ec53(0x105))/0x3+parseInt(_0xf9ec53(0xff))/0x4+-parseInt(_0xf9ec53(0x106))/0x5+-parseInt(_0xf9ec53(0x107))/0x6+parseInt(_0xf9ec53(0x120))/0x7*(parseInt(_0xf9ec53(0x125))/0x8)+parseInt(_0xf9ec53(0x121))/0x9;if(_0x3f30a1===_0x3553d9)break;else _0x10e5e8['push'](_0x10e5e8['shift']());}catch(_0x4b8f82){_0x10e5e8['push'](_0x10e5e8['shift']());}}}(a31_0x5424,0xd6c29));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_0x5b54d4(0x133),'type':'string','description':a31_0x5b54d4(0x122)},{'name':a31_0x5b54d4(0x112),'type':a31_0x5b54d4(0x11c),'description':a31_0x5b54d4(0x11a)+DEFAULT_CONFIG_VALUES[a31_0x5b54d4(0x112)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a31_0x5b54d4(0x132)+PRODUCT_CONFIG[a31_0x5b54d4(0x11b)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x5b54d4(0x111),'type':a31_0x5b54d4(0xf7),'description':a31_0x5b54d4(0x114),'default':![]}];export const initImportFlagDefs=[{'name':a31_0x5b54d4(0xfd),'type':'string','description':a31_0x5b54d4(0x119),'required':!![]},{'name':a31_0x5b54d4(0x133),'type':a31_0x5b54d4(0x11c),'description':a31_0x5b54d4(0x115)},{'name':a31_0x5b54d4(0x112),'type':a31_0x5b54d4(0x11c),'description':a31_0x5b54d4(0xf6),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x5b54d4(0x136),'type':a31_0x5b54d4(0xf7),'description':a31_0x5b54d4(0x132)+PRODUCT_CONFIG[a31_0x5b54d4(0x11b)]+a31_0x5b54d4(0xfc),'default':![]},{'name':a31_0x5b54d4(0x111),'type':a31_0x5b54d4(0xf7),'description':a31_0x5b54d4(0x114),'default':![]}];export async function runInit(_0x5ea89a){const _0x5f1520=a31_0x5b54d4,_0x46c85e=isNonInteractiveMode(_0x5ea89a),_0x171182=_0x5ea89a[_0x5f1520(0x136)]?_0x5f1520(0x136):_0x5f1520(0x10f),_0xe0a3fd=resolveWriteConfigPath(_0x171182);try{_0x46c85e?await runNonInteractive(_0x5ea89a,_0xe0a3fd):await runInteractive(_0x5ea89a,_0xe0a3fd);}catch(_0x57a6e8){if(_0x57a6e8 instanceof AbortPrompt)throw CliErrors[_0x5f1520(0x123)]();throw _0x57a6e8;}}export async function runInitImport(_0x2361ea){const _0x337275=a31_0x5b54d4,_0x43cfa4=_0x2361ea[_0x337275(0x136)]?_0x337275(0x136):_0x337275(0x10f),_0xaa062d=resolveWriteConfigPath(_0x43cfa4);await runFromImport(_0x2361ea,_0xaa062d);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x5b54d4(0x10b)]);async function runFromImport(_0x28a320,_0x4872dc){const _0x406e71=a31_0x5b54d4,_0x315aed=resolveFilePath(_0x28a320[_0x406e71(0xfd)]);if(!existsSync(_0x315aed))throw CliErrors[_0x406e71(0x137)](_0x406e71(0x131)+_0x315aed);const _0x210713=readSourceFile(_0x315aed),_0x9d679d=convertToRuntimeConfig(_0x210713);_0x28a320[_0x406e71(0x133)]&&(_0x9d679d['appcode']=String(_0x28a320[_0x406e71(0x133)]));_0x28a320[_0x406e71(0x112)]&&(_0x9d679d['env']=resolveInitEnv(_0x28a320));if(!_0x9d679d[_0x406e71(0x133)])throw CliErrors['validation'](_0x406e71(0x110),'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(_0x4872dc,_0x9d679d,_0x28a320),console[_0x406e71(0x12d)]('Imported\x20from\x20'+_0x315aed),console[_0x406e71(0x12d)]('\x20\x20config:\x20\x20'+_0x4872dc),console[_0x406e71(0x12d)](_0x406e71(0x127)+_0x9d679d['appcode']);if(_0x9d679d['defaultApp'])console['log'](_0x406e71(0x126)+_0x9d679d[_0x406e71(0x100)]);}function convertToRuntimeConfig(_0x40cc91){const _0x42ebd4=a31_0x5b54d4;if(_0x40cc91[_0x42ebd4(0xfa)]&&typeof _0x40cc91[_0x42ebd4(0xfa)]==='object')throw CliErrors[_0x42ebd4(0x137)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x4b11f2={};for(const _0x475361 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x40cc91[_0x475361]!==undefined&&(_0x4b11f2[_0x475361]=_0x40cc91[_0x475361]);}return!_0x4b11f2[_0x42ebd4(0x12f)]&&(_0x4b11f2['riskLevel']=DEFAULT_CONFIG_VALUES[_0x42ebd4(0x12f)]),_0x4b11f2;}async function runNonInteractive(_0x3be8a3,_0x27326e){const _0x1750e1=a31_0x5b54d4,_0x126146=_0x3be8a3[_0x1750e1(0x133)];if(!_0x126146)throw CliErrors[_0x1750e1(0x102)](_0x1750e1(0x133),_0x1750e1(0x12c)+CLI_BIN_NAME+_0x1750e1(0x109));const _0x23de8b=resolveInitEnv(_0x3be8a3);await writeInitConfig(_0x27326e,{'appcode':_0x126146,'env':_0x23de8b},_0x3be8a3),console[_0x1750e1(0x12d)](_0x1750e1(0x11f)+_0x27326e),console[_0x1750e1(0x12d)](_0x1750e1(0x127)+_0x126146),console[_0x1750e1(0x12d)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x23de8b);}async function runInteractive(_0x59861b,_0x40390c){const _0x4ab33b=a31_0x5b54d4,_0x26456a=loadExisting(_0x40390c),_0x10431c=typeof _0x26456a?.['appcode']===_0x4ab33b(0x11c)?_0x26456a[_0x4ab33b(0x133)]:'',_0xe7fb01=resolveInitEnv(_0x59861b);console['log'](CLI_BIN_NAME+_0x4ab33b(0x124)+PRODUCT_CONFIG[_0x4ab33b(0x11b)]+'\x0a');if(existsSync(_0x40390c)&&!_0x59861b['yes']){const _0x192c2b=await promptYesNo('File\x20'+_0x40390c+_0x4ab33b(0x117),![]);if(!_0x192c2b){console[_0x4ab33b(0x12d)](_0x4ab33b(0xf9));return;}}const _0x10579f=typeof _0x59861b[_0x4ab33b(0x133)]===_0x4ab33b(0x11c)?_0x59861b[_0x4ab33b(0x133)][_0x4ab33b(0x10d)]():'';let _0x33ac8b=_0x10579f;!_0x33ac8b&&(_0x33ac8b=await promptInput(_0x4ab33b(0x103),_0x10431c));if(!_0x33ac8b[_0x4ab33b(0x10d)]())throw CliErrors['validation'](_0x4ab33b(0x134));await writeInitConfig(_0x40390c,{'appcode':_0x33ac8b[_0x4ab33b(0x10d)](),'env':_0xe7fb01},_0x59861b),console['log'](_0x4ab33b(0x10a)+_0x40390c),console['log'](_0x4ab33b(0x127)+_0x33ac8b[_0x4ab33b(0x10d)]()),console[_0x4ab33b(0x12d)](_0x4ab33b(0x10c)+_0xe7fb01);}function a31_0x5424(){const _0xc087cd=['race','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Target\x20environment\x20(default\x20','newConfigFileName','string','utf8','[Y/n]','Initialized\x20','7JlmEDP','11383092RvjJnf','App\x20code\x20for\x20the\x20project','cancelled','\x20init\x20—\x20Create\x20','178072fBAqIz','\x20\x20default:\x20','\x20\x20appcode:\x20','includes','AbortPrompt','name','close','Usage:\x20','log','cwd','riskLevel','removeListener','Source\x20file\x20not\x20found:\x20','Write\x20to\x20global\x20(~/','appcode','App\x20code\x20cannot\x20be\x20empty.','642MZXPjq','global','validation','parse','Failed\x20to\x20parse\x20source\x20file:\x20','Override\x20imported\x20default\x20env','boolean','1736PYcEfD','Aborted.','apps','[y/N]',')\x20instead\x20of\x20project','file','entries','4722372jyjqqd','defaultApp','question','flagMissing','App\x20code','stdin','2228373invAIZ','1417050ZLSQJP','6714228GnaOfW','SIGINT','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','\x0aInitialized\x20','apiDir','\x20\x20env:\x20\x20\x20\x20\x20','trim','Invalid\x20env\x20\x22','project','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','yes','env','stdout','Skip\x20confirmation\x20when\x20overwriting','Override\x20imported\x20default\x20appcode','app','\x20already\x20exists.\x20Overwrite?'];a31_0x5424=function(){return _0xc087cd;};return a31_0x5424();}async function writeInitConfig(_0x1aac77,_0x1dac4f,_0x58a490){const _0x5668f0=a31_0x5b54d4;let _0x14fe29={};existsSync(_0x1aac77)&&!_0x58a490[_0x5668f0(0x111)]&&(_0x14fe29=readConfigFile(_0x1aac77));for(const [_0x267ecf,_0x59dc34]of Object[_0x5668f0(0xfe)](_0x1dac4f)){_0x59dc34!==undefined&&(_0x14fe29[_0x267ecf]=_0x59dc34);}if(_0x14fe29[_0x5668f0(0x116)])delete _0x14fe29[_0x5668f0(0x116)];writeConfigFile(_0x1aac77,_0x14fe29);}class AbortPrompt extends Error{constructor(){const _0x2a2e97=a31_0x5b54d4;super('User\x20aborted\x20prompt'),this[_0x2a2e97(0x12a)]=_0x2a2e97(0x129);}}function createSafeRl(){const _0x238363=a31_0x5b54d4,_0x194019=createInterface({'input':process[_0x238363(0x104)],'output':process[_0x238363(0x113)]});let _0x117750;const _0x477178=new Promise((_0xedc184,_0x91dc6c)=>{const _0x3d4495=_0x238363;_0x117750=()=>{const _0x2227de=a31_0x5f11;_0x117750&&(_0x194019[_0x2227de(0x130)](_0x2227de(0x108),_0x117750),_0x117750=undefined);try{_0x194019[_0x2227de(0x12b)]();}catch{}_0x91dc6c(new AbortPrompt());},_0x194019['once'](_0x3d4495(0x108),_0x117750);}),_0x44a097=()=>{const _0x8fcc28=_0x238363;_0x117750&&(_0x194019['removeListener'](_0x8fcc28(0x108),_0x117750),_0x117750=undefined);try{_0x194019[_0x8fcc28(0x12b)]();}catch{}};return{'rl':_0x194019,'abortPromise':_0x477178,'disposeSuccess':_0x44a097};}async function promptInput(_0x3503df,_0x2419c6){const _0x2ee126=a31_0x5b54d4,{rl:_0x18b100,abortPromise:_0x1508e4,disposeSuccess:_0x5dd710}=createSafeRl(),_0x1ed2d3=new Promise(_0x30d502=>{const _0x420d9a=a31_0x5f11,_0x5a0bad=_0x2419c6?'\x20\x20'+_0x3503df+'\x20('+_0x2419c6+'):\x20':'\x20\x20'+_0x3503df+':\x20';_0x18b100[_0x420d9a(0x101)](_0x5a0bad,_0x56a5ac=>{const _0x55d02b=_0x420d9a;_0x5dd710(),_0x30d502(_0x56a5ac[_0x55d02b(0x10d)]()||_0x2419c6);});});return Promise[_0x2ee126(0x118)]([_0x1ed2d3,_0x1508e4]);}function a31_0x5f11(_0x10416e,_0x1c05b6){_0x10416e=_0x10416e-0xf5;const _0x542498=a31_0x5424();let _0x5f11b4=_0x542498[_0x10416e];return _0x5f11b4;}async function promptYesNo(_0x4bf353,_0x39291a){const _0x2639dd=a31_0x5b54d4,{rl:_0x49f635,abortPromise:_0x1449fb,disposeSuccess:_0x5af9e6}=createSafeRl(),_0x59d930=new Promise(_0x5f0315=>{const _0x177016=a31_0x5f11,_0x7da50f=_0x39291a?_0x177016(0x11e):_0x177016(0xfb);_0x49f635[_0x177016(0x101)]('\x20\x20'+_0x4bf353+'\x20'+_0x7da50f+':\x20',_0x54e27c=>{const _0x1b93ec=_0x177016;_0x5af9e6();const _0x510422=_0x54e27c[_0x1b93ec(0x10d)]()['toLowerCase']();if(_0x510422==='y'||_0x510422===_0x1b93ec(0x111))_0x5f0315(!![]);else{if(_0x510422==='n'||_0x510422==='no')_0x5f0315(![]);else _0x5f0315(_0x39291a);}});});return Promise[_0x2639dd(0x118)]([_0x59d930,_0x1449fb]);}function loadExisting(_0x54cf05){if(!existsSync(_0x54cf05))return null;return readConfigFile(_0x54cf05);}function resolveFilePath(_0x25008b){const _0x91bd7d=a31_0x5b54d4;return isAbsolute(_0x25008b)?_0x25008b:resolve(process[_0x91bd7d(0x12e)](),_0x25008b);}function readSourceFile(_0x309a18){const _0x18ed16=a31_0x5b54d4;try{const _0x89bb58=readFileSync(_0x309a18,{'encoding':_0x18ed16(0x11d)});return JSON[_0x18ed16(0x138)](_0x89bb58);}catch(_0x30b38f){throw CliErrors[_0x18ed16(0x137)](_0x18ed16(0xf5)+_0x30b38f['message']);}}function resolveInitEnv(_0x5536d0){const _0x25d4ac=a31_0x5b54d4,_0x4f69f5=_0x5536d0[_0x25d4ac(0x112)];if(_0x4f69f5===undefined||_0x4f69f5==='')return DEFAULT_CONFIG_VALUES[_0x25d4ac(0x112)];if(!RUNTIME_ENV_VALUES[_0x25d4ac(0x128)](_0x4f69f5))throw CliErrors[_0x25d4ac(0x137)](_0x25d4ac(0x10e)+_0x4f69f5+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x4f69f5;}
1
+ const a31_0x44c116=a31_0x27f0;(function(_0x4509c0,_0x1ec5cd){const _0x27b828=a31_0x27f0,_0x1af056=_0x4509c0();while(!![]){try{const _0x59ae32=-parseInt(_0x27b828(0xad))/0x1*(-parseInt(_0x27b828(0xd3))/0x2)+-parseInt(_0x27b828(0xc2))/0x3*(parseInt(_0x27b828(0xba))/0x4)+parseInt(_0x27b828(0xdb))/0x5+-parseInt(_0x27b828(0xe4))/0x6+-parseInt(_0x27b828(0xd6))/0x7+-parseInt(_0x27b828(0xd5))/0x8+-parseInt(_0x27b828(0xd0))/0x9*(-parseInt(_0x27b828(0xaa))/0xa);if(_0x59ae32===_0x1ec5cd)break;else _0x1af056['push'](_0x1af056['shift']());}catch(_0x3f8a5c){_0x1af056['push'](_0x1af056['shift']());}}}(a31_0x1aaf,0xa0932));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';function a31_0x1aaf(){const _0x5e12f1=['9kMRhoZ','\x0aInitialized\x20','removeListener','11348FQtKqb','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','7708672QJkarN','8071161zcCSIW','\x20\x20config:\x20\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','question','Skip\x20confirmation\x20when\x20overwriting','3013995HUpIrc','appcode','newConfigFileName','log',')\x20instead\x20of\x20project','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','includes','utf8','Write\x20to\x20global\x20(~/','318522lcyXFM','apiDir','global','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','AbortPrompt','entries','SIGINT','validation','\x20\x20default:\x20','cancelled','24044410ePiCxo','apps','stdout','198IouOYr','cwd','yes','[y/N]','string','riskLevel','race','Override\x20imported\x20default\x20appcode','\x20\x20env:\x20\x20\x20\x20\x20','App\x20code\x20for\x20the\x20project','trim','Source\x20file\x20not\x20found:\x20','Aborted.','24gBRvWk','boolean','defaultApp','file','message','join','name','\x20\x20appcode:\x20','651642xBEint','project','\x20already\x20exists.\x20Overwrite?','App\x20code\x20cannot\x20be\x20empty.','flagMissing','close','toLowerCase','env','Imported\x20from\x20','):\x20','stdin','Target\x20environment\x20(default\x20','app','object'];a31_0x1aaf=function(){return _0x5e12f1;};return a31_0x1aaf();}import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0x44c116(0xdc),'type':a31_0x44c116(0xb1),'description':a31_0x44c116(0xb6)},{'name':a31_0x44c116(0xc9),'type':a31_0x44c116(0xb1),'description':a31_0x44c116(0xcd)+DEFAULT_CONFIG_VALUES[a31_0x44c116(0xc9)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x44c116(0xe6),'type':'boolean','description':a31_0x44c116(0xe3)+PRODUCT_CONFIG[a31_0x44c116(0xdd)]+a31_0x44c116(0xdf),'default':![]},{'name':a31_0x44c116(0xaf),'type':'boolean','description':a31_0x44c116(0xda),'default':![]}];export const initImportFlagDefs=[{'name':a31_0x44c116(0xbd),'type':a31_0x44c116(0xb1),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x44c116(0xdc),'type':a31_0x44c116(0xb1),'description':a31_0x44c116(0xb4)},{'name':'env','type':'string','description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x44c116(0xe6),'type':a31_0x44c116(0xbb),'description':a31_0x44c116(0xe3)+PRODUCT_CONFIG[a31_0x44c116(0xdd)]+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a31_0x44c116(0xbb),'description':a31_0x44c116(0xda),'default':![]}];export async function runInit(_0x4435dc){const _0x26d1b9=a31_0x44c116,_0x372b2a=isNonInteractiveMode(_0x4435dc),_0x32e3ba=_0x4435dc[_0x26d1b9(0xe6)]?_0x26d1b9(0xe6):_0x26d1b9(0xc3),_0x30805f=resolveWriteConfigPath(_0x32e3ba);try{_0x372b2a?await runNonInteractive(_0x4435dc,_0x30805f):await runInteractive(_0x4435dc,_0x30805f);}catch(_0x4e76ec){if(_0x4e76ec instanceof AbortPrompt)throw CliErrors[_0x26d1b9(0xa9)]();throw _0x4e76ec;}}export async function runInitImport(_0x5254ef){const _0x4bd98a=a31_0x44c116,_0xbc41fa=_0x5254ef[_0x4bd98a(0xe6)]?_0x4bd98a(0xe6):_0x4bd98a(0xc3),_0x3913ce=resolveWriteConfigPath(_0xbc41fa);await runFromImport(_0x5254ef,_0x3913ce);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x44c116(0xe5)]);function a31_0x27f0(_0x3a305b,_0x22673c){_0x3a305b=_0x3a305b-0xa4;const _0x1aaffc=a31_0x1aaf();let _0x27f0bc=_0x1aaffc[_0x3a305b];return _0x27f0bc;}async function runFromImport(_0x317e46,_0x2b9777){const _0xaec19=a31_0x44c116,_0x50e02f=resolveFilePath(_0x317e46['file']);if(!existsSync(_0x50e02f))throw CliErrors[_0xaec19(0xa7)](_0xaec19(0xb8)+_0x50e02f);const _0x5758ee=readSourceFile(_0x50e02f),_0x2aa7ea=convertToRuntimeConfig(_0x5758ee);_0x317e46[_0xaec19(0xdc)]&&(_0x2aa7ea[_0xaec19(0xdc)]=String(_0x317e46[_0xaec19(0xdc)]));_0x317e46[_0xaec19(0xc9)]&&(_0x2aa7ea[_0xaec19(0xc9)]=resolveInitEnv(_0x317e46));if(!_0x2aa7ea['appcode'])throw CliErrors['validation'](_0xaec19(0xe7),'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(_0x2b9777,_0x2aa7ea,_0x317e46),console[_0xaec19(0xde)](_0xaec19(0xca)+_0x50e02f),console[_0xaec19(0xde)](_0xaec19(0xd7)+_0x2b9777),console[_0xaec19(0xde)](_0xaec19(0xc1)+_0x2aa7ea[_0xaec19(0xdc)]);if(_0x2aa7ea[_0xaec19(0xbc)])console[_0xaec19(0xde)](_0xaec19(0xa8)+_0x2aa7ea[_0xaec19(0xbc)]);}function convertToRuntimeConfig(_0x442fca){const _0xf5c1d2=a31_0x44c116;if(_0x442fca[_0xf5c1d2(0xab)]&&typeof _0x442fca[_0xf5c1d2(0xab)]===_0xf5c1d2(0xcf))throw CliErrors[_0xf5c1d2(0xa7)](_0xf5c1d2(0xd4),_0xf5c1d2(0xd8));const _0x197eeb={};for(const _0x33af62 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x442fca[_0x33af62]!==undefined&&(_0x197eeb[_0x33af62]=_0x442fca[_0x33af62]);}return!_0x197eeb[_0xf5c1d2(0xb2)]&&(_0x197eeb[_0xf5c1d2(0xb2)]=DEFAULT_CONFIG_VALUES[_0xf5c1d2(0xb2)]),_0x197eeb;}async function runNonInteractive(_0x44de2f,_0x48ebfb){const _0xd1c531=a31_0x44c116,_0x16ec17=_0x44de2f[_0xd1c531(0xdc)];if(!_0x16ec17)throw CliErrors[_0xd1c531(0xc6)](_0xd1c531(0xdc),'Usage:\x20'+CLI_BIN_NAME+_0xd1c531(0xe0));const _0x1b7f05=resolveInitEnv(_0x44de2f);await writeInitConfig(_0x48ebfb,{'appcode':_0x16ec17,'env':_0x1b7f05},_0x44de2f),console['log']('Initialized\x20'+_0x48ebfb),console['log'](_0xd1c531(0xc1)+_0x16ec17),console[_0xd1c531(0xde)](_0xd1c531(0xb5)+_0x1b7f05);}async function runInteractive(_0x260248,_0x31bc7b){const _0x58a047=a31_0x44c116,_0x3e881c=loadExisting(_0x31bc7b),_0x13806a=typeof _0x3e881c?.[_0x58a047(0xdc)]==='string'?_0x3e881c['appcode']:'',_0x55e6e4=resolveInitEnv(_0x260248);console[_0x58a047(0xde)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x58a047(0xdd)]+'\x0a');if(existsSync(_0x31bc7b)&&!_0x260248[_0x58a047(0xaf)]){const _0x3a04ec=await promptYesNo('File\x20'+_0x31bc7b+_0x58a047(0xc4),![]);if(!_0x3a04ec){console[_0x58a047(0xde)](_0x58a047(0xb9));return;}}const _0x3ef96e=typeof _0x260248[_0x58a047(0xdc)]==='string'?_0x260248[_0x58a047(0xdc)][_0x58a047(0xb7)]():'';let _0x50b744=_0x3ef96e;!_0x50b744&&(_0x50b744=await promptInput('App\x20code',_0x13806a));if(!_0x50b744['trim']())throw CliErrors[_0x58a047(0xa7)](_0x58a047(0xc5));await writeInitConfig(_0x31bc7b,{'appcode':_0x50b744[_0x58a047(0xb7)](),'env':_0x55e6e4},_0x260248),console[_0x58a047(0xde)](_0x58a047(0xd1)+_0x31bc7b),console[_0x58a047(0xde)]('\x20\x20appcode:\x20'+_0x50b744['trim']()),console[_0x58a047(0xde)](_0x58a047(0xb5)+_0x55e6e4);}async function writeInitConfig(_0x57f933,_0x3de4df,_0x578c74){const _0x814e61=a31_0x44c116;let _0x4d8fa0={};existsSync(_0x57f933)&&!_0x578c74['yes']&&(_0x4d8fa0=readConfigFile(_0x57f933));for(const [_0x1c3622,_0x4e4f88]of Object[_0x814e61(0xa5)](_0x3de4df)){_0x4e4f88!==undefined&&(_0x4d8fa0[_0x1c3622]=_0x4e4f88);}if(_0x4d8fa0['app'])delete _0x4d8fa0[_0x814e61(0xce)];writeConfigFile(_0x57f933,_0x4d8fa0);}class AbortPrompt extends Error{constructor(){const _0x2746c3=a31_0x44c116;super('User\x20aborted\x20prompt'),this[_0x2746c3(0xc0)]=_0x2746c3(0xa4);}}function createSafeRl(){const _0x4b018e=a31_0x44c116,_0x100ecb=createInterface({'input':process[_0x4b018e(0xcc)],'output':process[_0x4b018e(0xac)]});let _0x504f9f;const _0x5cfa57=new Promise((_0x66d98a,_0x2bbb7f)=>{const _0x41d3c5=_0x4b018e;_0x504f9f=()=>{const _0x56a48f=a31_0x27f0;_0x504f9f&&(_0x100ecb[_0x56a48f(0xd2)](_0x56a48f(0xa6),_0x504f9f),_0x504f9f=undefined);try{_0x100ecb[_0x56a48f(0xc7)]();}catch{}_0x2bbb7f(new AbortPrompt());},_0x100ecb['once'](_0x41d3c5(0xa6),_0x504f9f);}),_0x10fcac=()=>{const _0x394dd3=_0x4b018e;_0x504f9f&&(_0x100ecb['removeListener'](_0x394dd3(0xa6),_0x504f9f),_0x504f9f=undefined);try{_0x100ecb[_0x394dd3(0xc7)]();}catch{}};return{'rl':_0x100ecb,'abortPromise':_0x5cfa57,'disposeSuccess':_0x10fcac};}async function promptInput(_0x4bc8fe,_0x213e70){const {rl:_0x4e66e5,abortPromise:_0x20c141,disposeSuccess:_0x4776ff}=createSafeRl(),_0x4a0b90=new Promise(_0x9a3704=>{const _0x452859=a31_0x27f0,_0x191d51=_0x213e70?'\x20\x20'+_0x4bc8fe+'\x20('+_0x213e70+_0x452859(0xcb):'\x20\x20'+_0x4bc8fe+':\x20';_0x4e66e5['question'](_0x191d51,_0x685d5c=>{const _0x706a24=_0x452859;_0x4776ff(),_0x9a3704(_0x685d5c[_0x706a24(0xb7)]()||_0x213e70);});});return Promise['race']([_0x4a0b90,_0x20c141]);}async function promptYesNo(_0x429699,_0xf67297){const _0x440aa5=a31_0x44c116,{rl:_0x574139,abortPromise:_0x210f81,disposeSuccess:_0x13dc6c}=createSafeRl(),_0x40edc3=new Promise(_0x49dd71=>{const _0x525f66=a31_0x27f0,_0x18ac22=_0xf67297?'[Y/n]':_0x525f66(0xb0);_0x574139[_0x525f66(0xd9)]('\x20\x20'+_0x429699+'\x20'+_0x18ac22+':\x20',_0x5d6589=>{const _0xf41bff=_0x525f66;_0x13dc6c();const _0x42e77a=_0x5d6589[_0xf41bff(0xb7)]()[_0xf41bff(0xc8)]();if(_0x42e77a==='y'||_0x42e77a===_0xf41bff(0xaf))_0x49dd71(!![]);else{if(_0x42e77a==='n'||_0x42e77a==='no')_0x49dd71(![]);else _0x49dd71(_0xf67297);}});});return Promise[_0x440aa5(0xb3)]([_0x40edc3,_0x210f81]);}function loadExisting(_0x40aa38){if(!existsSync(_0x40aa38))return null;return readConfigFile(_0x40aa38);}function resolveFilePath(_0xeccc01){const _0x5282ce=a31_0x44c116;return isAbsolute(_0xeccc01)?_0xeccc01:resolve(process[_0x5282ce(0xae)](),_0xeccc01);}function readSourceFile(_0x1e8d77){const _0x39338a=a31_0x44c116;try{const _0x548748=readFileSync(_0x1e8d77,{'encoding':_0x39338a(0xe2)});return JSON['parse'](_0x548748);}catch(_0x597470){throw CliErrors['validation']('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x597470[_0x39338a(0xbe)]);}}function resolveInitEnv(_0x542c78){const _0x6522d2=a31_0x44c116,_0x36757e=_0x542c78[_0x6522d2(0xc9)];if(_0x36757e===undefined||_0x36757e==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x6522d2(0xe1)](_0x36757e))throw CliErrors[_0x6522d2(0xa7)]('Invalid\x20env\x20\x22'+_0x36757e+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x6522d2(0xbf)](',\x20'));return _0x36757e;}
@@ -1 +1 @@
1
- const a32_0x33542e=a32_0x1d02;(function(_0x3f87b9,_0x1bf006){const _0x93ef7f=a32_0x1d02,_0x114783=_0x3f87b9();while(!![]){try{const _0x583fbf=parseInt(_0x93ef7f(0x193))/0x1+-parseInt(_0x93ef7f(0x195))/0x2+parseInt(_0x93ef7f(0x192))/0x3+parseInt(_0x93ef7f(0x1be))/0x4*(parseInt(_0x93ef7f(0x18b))/0x5)+-parseInt(_0x93ef7f(0x1af))/0x6+parseInt(_0x93ef7f(0x1b1))/0x7+-parseInt(_0x93ef7f(0x18d))/0x8;if(_0x583fbf===_0x1bf006)break;else _0x114783['push'](_0x114783['shift']());}catch(_0x5a768c){_0x114783['push'](_0x114783['shift']());}}}(a32_0x44bc,0x6edc8));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';function a32_0x44bc(){const _0x898d9d=['ragStatus','file','1973550ysWBnv','594871lAIgkd','validation','1472226dfMoBT','scope','updateTime','version','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','File\x20path\x20is\x20required.','map','description','topk','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','score','isFile','ragErrorMessage','bool','str','Override\x20the\x20existing\x20entry\x20title','createTime','verbose','query','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','POST','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','list','build','Personal\x20knowledge-base\x20entry\x20ID','161838CLYmie','write','2611441dIVgBS','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','trim','appCode','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','utf8','num','userId','string','/client/knowledge-base/personal/create','/client/knowledge-base/personal/','number','content','92RNopjR','search','metadata','File\x20not\x20found:\x20','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','--topk\x20must\x20be\x20a\x20positive\x20number.','flag','title','detail','76655iKEmdq','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','6089784nKkkwz','create','body'];a32_0x44bc=function(){return _0x898d9d;};return a32_0x44bc();}import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x33542e(0x189),'type':a32_0x33542e(0x1b9),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a32_0x33542e(0x191),'type':a32_0x33542e(0x1b9),'required':!![],'description':a32_0x33542e(0x1b2)},QUERY_FLAG={'name':'query','type':'string','required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x33542e(0x19d),'type':a32_0x33542e(0x1bc),'description':a32_0x33542e(0x199)};function readKnowledgeFile(_0x533ea1){const _0x1be4ab=a32_0x33542e;if(!_0x533ea1)throw CliErrors['validation'](_0x1be4ab(0x19a));if(!existsSync(_0x533ea1))throw CliErrors['validation'](_0x1be4ab(0x1c1)+_0x533ea1);if(!statSync(_0x533ea1)[_0x1be4ab(0x1a1)]())throw CliErrors[_0x1be4ab(0x194)](_0x1be4ab(0x19e)+_0x533ea1);return readFileSync(_0x533ea1,_0x1be4ab(0x1b6));}function summarizePersonalItem(_0x368ec2){const _0x37dfc1=a32_0x33542e;return{'id':_0x368ec2['id'],'title':_0x368ec2[_0x37dfc1(0x189)],'version':_0x368ec2[_0x37dfc1(0x198)],'ragStatus':_0x368ec2[_0x37dfc1(0x190)],'ragErrorMessage':_0x368ec2[_0x37dfc1(0x1a2)],'updateTime':_0x368ec2['updateTime']};}function detailPersonalItem(_0x1e304c){const _0x1167f6=a32_0x33542e;return{'id':_0x1e304c['id'],'appCode':_0x1e304c[_0x1167f6(0x1b4)],'scope':_0x1e304c[_0x1167f6(0x196)],'userId':_0x1e304c[_0x1167f6(0x1b8)],'title':_0x1e304c['title'],'content':_0x1e304c[_0x1167f6(0x1bd)]??'','version':_0x1e304c[_0x1167f6(0x198)],'ragStatus':_0x1e304c['ragStatus'],'ragErrorMessage':_0x1e304c[_0x1167f6(0x1a2)],'createTime':_0x1e304c[_0x1167f6(0x1a6)],'updateTime':_0x1e304c[_0x1167f6(0x197)]};}function summarizeSearchHit(_0x3d6c42){const _0x3a8c01=a32_0x33542e;return{'scope':_0x3d6c42[_0x3a8c01(0x196)],'title':_0x3d6c42[_0x3a8c01(0x189)],'docId':_0x3d6c42['docId'],'score':_0x3d6c42[_0x3a8c01(0x1a0)],'weightedScore':_0x3d6c42['weightedScore'],'content':_0x3d6c42[_0x3a8c01(0x1bd)],'metadata':_0x3d6c42[_0x3a8c01(0x1c0)]};}function readTopK(_0x406463){const _0x4bfdf8=a32_0x33542e,_0x46c96d=_0x406463[_0x4bfdf8(0x188)](_0x4bfdf8(0x19d));if(_0x46c96d===undefined||_0x46c96d===null||_0x46c96d==='')return undefined;const _0x2f8ada=_0x406463['num']('topk');if(!Number['isFinite'](_0x2f8ada)||_0x2f8ada<0x1)throw CliErrors[_0x4bfdf8(0x194)](_0x4bfdf8(0x187));return _0x2f8ada;}function a32_0x1d02(_0x5480e2,_0x492f3f){_0x5480e2=_0x5480e2-0x187;const _0x44bcde=a32_0x44bc();let _0x1d0277=_0x44bcde[_0x5480e2];return _0x1d0277;}const kbList={'service':'kb','command':a32_0x33542e(0x1ac),'description':a32_0x33542e(0x1a9),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x409d3f){const _0x59da07=a32_0x33542e,_0x5280d6=await listPersonalKnowledgeBaseItems(_0x409d3f[_0x59da07(0x1b4)]);if(_0x409d3f[_0x59da07(0x1a3)](_0x59da07(0x1a7)))return{'ok':!![],'data':{'total':_0x5280d6[_0x59da07(0x19f)],'items':_0x5280d6}};return{'ok':!![],'data':{'total':_0x5280d6[_0x59da07(0x19f)],'items':_0x5280d6[_0x59da07(0x19b)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x33542e(0x18a),'description':a32_0x33542e(0x1c2),'risk':'read','flags':[{...ID_FLAG,'description':a32_0x33542e(0x1ae)}],async 'execute'(_0x2130d8){const _0x54a402=a32_0x33542e,_0x51140d=await getPersonalKnowledgeBaseItem(_0x2130d8[_0x54a402(0x1b7)]('id'),_0x2130d8[_0x54a402(0x1b4)]);return{'ok':!![],'data':detailPersonalItem(_0x51140d)};}},kbCreate={'service':'kb','command':a32_0x33542e(0x18e),'description':a32_0x33542e(0x18c),'risk':a32_0x33542e(0x1b0),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x16102e){const _0x68d89d=a32_0x33542e,_0x9b4bf=_0x16102e[_0x68d89d(0x1a4)]('title'),_0x2aa14e=readKnowledgeFile(_0x16102e[_0x68d89d(0x1a4)](_0x68d89d(0x191))),_0x409451=await createPersonalKnowledgeBaseItem(_0x16102e['appCode'],{'title':_0x9b4bf,'content':_0x2aa14e});return{'ok':!![],'data':summarizePersonalItem(_0x409451),'message':'Created\x20KB\x20entry\x20'+_0x409451['id']+'\x20('+_0x409451[_0x68d89d(0x189)]+')'};},async 'dryRun'(_0x5c243d){const _0x4b7f5e=a32_0x33542e,_0x2a5363=_0x5c243d[_0x4b7f5e(0x1a4)](_0x4b7f5e(0x189)),_0x539e4a=readKnowledgeFile(_0x5c243d[_0x4b7f5e(0x1a4)](_0x4b7f5e(0x191)));return dryRun('POST',_0x4b7f5e(0x1ba))[_0x4b7f5e(0x18f)]({'appCode':_0x5c243d[_0x4b7f5e(0x1b4)],'title':_0x2a5363,'content':_0x539e4a})[_0x4b7f5e(0x19c)](_0x4b7f5e(0x1b5)+_0x2a5363+'\x22')[_0x4b7f5e(0x1ad)]();}},kbUpdate={'service':'kb','command':'update','description':a32_0x33542e(0x1ab),'risk':a32_0x33542e(0x1b0),'flags':[{...ID_FLAG,'description':a32_0x33542e(0x1ae)},{...TITLE_FLAG,'required':![],'description':a32_0x33542e(0x1a5)},FILE_FLAG],async 'execute'(_0x2a122b){const _0x29ebc0=a32_0x33542e,_0x13a3d0=_0x2a122b['num']('id'),_0x415c0c=readKnowledgeFile(_0x2a122b[_0x29ebc0(0x1a4)]('file')),_0x323215=_0x2a122b[_0x29ebc0(0x1a4)]('title')||(await getPersonalKnowledgeBaseItem(_0x13a3d0,_0x2a122b[_0x29ebc0(0x1b4)]))['title'],_0x1c2440=await updatePersonalKnowledgeBaseItem(_0x13a3d0,_0x2a122b['appCode'],{'title':_0x323215,'content':_0x415c0c});return{'ok':!![],'data':summarizePersonalItem(_0x1c2440),'message':'Updated\x20KB\x20entry\x20'+_0x1c2440['id']+'\x20('+_0x1c2440[_0x29ebc0(0x189)]+')'};},async 'dryRun'(_0x2baa62){const _0x6796df=a32_0x33542e,_0x390b1e=_0x2baa62['num']('id'),_0x1de8a6=readKnowledgeFile(_0x2baa62['str'](_0x6796df(0x191))),_0x2ab96a=_0x2baa62['str'](_0x6796df(0x189))||(await getPersonalKnowledgeBaseItem(_0x390b1e,_0x2baa62['appCode']))[_0x6796df(0x189)];return dryRun(_0x6796df(0x1aa),_0x6796df(0x1bb)+_0x390b1e+'/update')['body']({'appCode':_0x2baa62[_0x6796df(0x1b4)],'title':_0x2ab96a,'content':_0x1de8a6})[_0x6796df(0x19c)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x390b1e)[_0x6796df(0x1ad)]();}},kbSearch={'service':'kb','command':a32_0x33542e(0x1bf),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x1e2e78){const _0x330c5b=a32_0x33542e;if(!_0x1e2e78[_0x330c5b(0x1a4)](_0x330c5b(0x1a8))[_0x330c5b(0x1b3)]())throw CliErrors[_0x330c5b(0x194)]('Search\x20query\x20is\x20required.');readTopK(_0x1e2e78);},async 'execute'(_0x4d30ce){const _0x4b99ec=a32_0x33542e,_0x150a1f=_0x4d30ce[_0x4b99ec(0x1a4)]('query')[_0x4b99ec(0x1b3)](),_0x4bf3b6=readTopK(_0x4d30ce),_0x2d0e68=await searchKnowledgeBase(_0x4d30ce[_0x4b99ec(0x1b4)],{'query':_0x150a1f,'topK':_0x4bf3b6});return{'ok':!![],'data':{'total':_0x2d0e68[_0x4b99ec(0x19f)],'hits':_0x2d0e68[_0x4b99ec(0x19b)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x2f7801=a32_0x5460;(function(_0x3804a5,_0x267c9a){const _0x2a9905=a32_0x5460,_0x45a04c=_0x3804a5();while(!![]){try{const _0x2bb785=parseInt(_0x2a9905(0x20e))/0x1*(-parseInt(_0x2a9905(0x211))/0x2)+parseInt(_0x2a9905(0x1da))/0x3*(-parseInt(_0x2a9905(0x1dd))/0x4)+-parseInt(_0x2a9905(0x20f))/0x5+parseInt(_0x2a9905(0x212))/0x6+-parseInt(_0x2a9905(0x1f6))/0x7*(parseInt(_0x2a9905(0x20d))/0x8)+parseInt(_0x2a9905(0x205))/0x9+parseInt(_0x2a9905(0x1ec))/0xa;if(_0x2bb785===_0x267c9a)break;else _0x45a04c['push'](_0x45a04c['shift']());}catch(_0x983a48){_0x45a04c['push'](_0x45a04c['shift']());}}}(a32_0x1dfc,0x65a85));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_0x2f7801(0x219),'type':a32_0x2f7801(0x1ea),'required':!![],'description':a32_0x2f7801(0x1e8)},FILE_FLAG={'name':a32_0x2f7801(0x1ed),'type':a32_0x2f7801(0x1ea),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a32_0x2f7801(0x1e1),'type':'string','required':!![],'description':a32_0x2f7801(0x20b)},TOPK_FLAG={'name':a32_0x2f7801(0x1e7),'type':'number','description':a32_0x2f7801(0x1f0)};function readKnowledgeFile(_0x4b9e5a){const _0x98fb9d=a32_0x2f7801;if(!_0x4b9e5a)throw CliErrors[_0x98fb9d(0x1fd)](_0x98fb9d(0x20a));if(!existsSync(_0x4b9e5a))throw CliErrors['validation'](_0x98fb9d(0x1fe)+_0x4b9e5a);if(!statSync(_0x4b9e5a)[_0x98fb9d(0x1f9)]())throw CliErrors[_0x98fb9d(0x1fd)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x4b9e5a);return readFileSync(_0x4b9e5a,_0x98fb9d(0x215));}function summarizePersonalItem(_0x12b6fd){const _0x13bcfb=a32_0x2f7801;return{'id':_0x12b6fd['id'],'title':_0x12b6fd[_0x13bcfb(0x219)],'version':_0x12b6fd[_0x13bcfb(0x1f1)],'ragStatus':_0x12b6fd[_0x13bcfb(0x207)],'ragErrorMessage':_0x12b6fd['ragErrorMessage'],'updateTime':_0x12b6fd[_0x13bcfb(0x202)]};}function detailPersonalItem(_0xdc07d){const _0x474b93=a32_0x2f7801;return{'id':_0xdc07d['id'],'appCode':_0xdc07d[_0x474b93(0x210)],'scope':_0xdc07d['scope'],'userId':_0xdc07d[_0x474b93(0x204)],'title':_0xdc07d['title'],'content':_0xdc07d[_0x474b93(0x1ff)]??'','version':_0xdc07d['version'],'ragStatus':_0xdc07d[_0x474b93(0x207)],'ragErrorMessage':_0xdc07d[_0x474b93(0x1df)],'createTime':_0xdc07d[_0x474b93(0x1ef)],'updateTime':_0xdc07d[_0x474b93(0x202)]};}function summarizeSearchHit(_0x296282){const _0x280534=a32_0x2f7801;return{'scope':_0x296282['scope'],'title':_0x296282[_0x280534(0x219)],'docId':_0x296282[_0x280534(0x1ee)],'score':_0x296282[_0x280534(0x1f2)],'weightedScore':_0x296282[_0x280534(0x1e3)],'content':_0x296282[_0x280534(0x1ff)],'metadata':_0x296282[_0x280534(0x1f4)]};}function a32_0x5460(_0x538021,_0x48121c){_0x538021=_0x538021-0x1da;const _0x1dfcf3=a32_0x1dfc();let _0x5460be=_0x1dfcf3[_0x538021];return _0x5460be;}function a32_0x1dfc(){const _0x54d8e4=['build','ragStatus','update','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','File\x20path\x20is\x20required.','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','trim','2392aVvqBg','97PCeBtG','1460990KlQvuY','appCode','3166KSmsjT','3742560lNSVXo','Override\x20the\x20existing\x20entry\x20title','num','utf8','body','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','length','title','1275xbKFBx','write','/client/knowledge-base/personal/create','6268dLAjZJ','read','ragErrorMessage','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','query','--topk\x20must\x20be\x20a\x20positive\x20number.','weightedScore','str','Created\x20KB\x20entry\x20','list','topk','Personal\x20knowledge-base\x20entry\x20title','search','string','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','5180090DplCGx','file','docId','createTime','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','version','score','description','metadata','POST','8491laUWcb','Personal\x20knowledge-base\x20entry\x20ID','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','isFile','map','verbose','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','validation','File\x20not\x20found:\x20','content','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','detail','updateTime','isFinite','userId','6741279SDPokI'];a32_0x1dfc=function(){return _0x54d8e4;};return a32_0x1dfc();}function readTopK(_0x50cec4){const _0x13e734=a32_0x2f7801,_0x5bc072=_0x50cec4['flag'](_0x13e734(0x1e7));if(_0x5bc072===undefined||_0x5bc072===null||_0x5bc072==='')return undefined;const _0x26aaa4=_0x50cec4[_0x13e734(0x214)](_0x13e734(0x1e7));if(!Number[_0x13e734(0x203)](_0x26aaa4)||_0x26aaa4<0x1)throw CliErrors[_0x13e734(0x1fd)](_0x13e734(0x1e2));return _0x26aaa4;}const kbList={'service':'kb','command':a32_0x2f7801(0x1e6),'description':a32_0x2f7801(0x1e0),'risk':a32_0x2f7801(0x1de),'flags':[VERBOSE_FLAG],async 'execute'(_0x41577e){const _0x6cac82=a32_0x2f7801,_0x36245a=await listPersonalKnowledgeBaseItems(_0x41577e[_0x6cac82(0x210)]);if(_0x41577e['bool'](_0x6cac82(0x1fb)))return{'ok':!![],'data':{'total':_0x36245a['length'],'items':_0x36245a}};return{'ok':!![],'data':{'total':_0x36245a[_0x6cac82(0x218)],'items':_0x36245a[_0x6cac82(0x1fa)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x2f7801(0x201),'description':a32_0x2f7801(0x1eb),'risk':a32_0x2f7801(0x1de),'flags':[{...ID_FLAG,'description':a32_0x2f7801(0x1f7)}],async 'execute'(_0x50e21c){const _0x699cd6=a32_0x2f7801,_0x3c347d=await getPersonalKnowledgeBaseItem(_0x50e21c[_0x699cd6(0x214)]('id'),_0x50e21c[_0x699cd6(0x210)]);return{'ok':!![],'data':detailPersonalItem(_0x3c347d)};}},kbCreate={'service':'kb','command':'create','description':a32_0x2f7801(0x200),'risk':a32_0x2f7801(0x1db),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x310770){const _0xccb884=a32_0x2f7801,_0x4463f6=_0x310770[_0xccb884(0x1e4)](_0xccb884(0x219)),_0x5d7064=readKnowledgeFile(_0x310770[_0xccb884(0x1e4)]('file')),_0x2bcbaf=await createPersonalKnowledgeBaseItem(_0x310770[_0xccb884(0x210)],{'title':_0x4463f6,'content':_0x5d7064});return{'ok':!![],'data':summarizePersonalItem(_0x2bcbaf),'message':_0xccb884(0x1e5)+_0x2bcbaf['id']+'\x20('+_0x2bcbaf['title']+')'};},async 'dryRun'(_0x54ae55){const _0x52dba0=a32_0x2f7801,_0x4be262=_0x54ae55[_0x52dba0(0x1e4)]('title'),_0x25f82f=readKnowledgeFile(_0x54ae55[_0x52dba0(0x1e4)]('file'));return dryRun(_0x52dba0(0x1f5),_0x52dba0(0x1dc))[_0x52dba0(0x216)]({'appCode':_0x54ae55[_0x52dba0(0x210)],'title':_0x4be262,'content':_0x25f82f})[_0x52dba0(0x1f3)](_0x52dba0(0x209)+_0x4be262+'\x22')[_0x52dba0(0x206)]();}},kbUpdate={'service':'kb','command':a32_0x2f7801(0x208),'description':a32_0x2f7801(0x1fc),'risk':a32_0x2f7801(0x1db),'flags':[{...ID_FLAG,'description':a32_0x2f7801(0x1f7)},{...TITLE_FLAG,'required':![],'description':a32_0x2f7801(0x213)},FILE_FLAG],async 'execute'(_0x251e1b){const _0x52ab89=a32_0x2f7801,_0x995581=_0x251e1b[_0x52ab89(0x214)]('id'),_0xc5f70d=readKnowledgeFile(_0x251e1b['str'](_0x52ab89(0x1ed))),_0x3f76c2=_0x251e1b[_0x52ab89(0x1e4)]('title')||(await getPersonalKnowledgeBaseItem(_0x995581,_0x251e1b[_0x52ab89(0x210)]))[_0x52ab89(0x219)],_0x1ba7ab=await updatePersonalKnowledgeBaseItem(_0x995581,_0x251e1b[_0x52ab89(0x210)],{'title':_0x3f76c2,'content':_0xc5f70d});return{'ok':!![],'data':summarizePersonalItem(_0x1ba7ab),'message':'Updated\x20KB\x20entry\x20'+_0x1ba7ab['id']+'\x20('+_0x1ba7ab[_0x52ab89(0x219)]+')'};},async 'dryRun'(_0x27f053){const _0x424700=a32_0x2f7801,_0x2404c2=_0x27f053[_0x424700(0x214)]('id'),_0x503fbb=readKnowledgeFile(_0x27f053[_0x424700(0x1e4)]('file')),_0x5e7b39=_0x27f053['str']('title')||(await getPersonalKnowledgeBaseItem(_0x2404c2,_0x27f053[_0x424700(0x210)]))[_0x424700(0x219)];return dryRun(_0x424700(0x1f5),'/client/knowledge-base/personal/'+_0x2404c2+'/update')[_0x424700(0x216)]({'appCode':_0x27f053['appCode'],'title':_0x5e7b39,'content':_0x503fbb})[_0x424700(0x1f3)](_0x424700(0x217)+_0x2404c2)[_0x424700(0x206)]();}},kbSearch={'service':'kb','command':a32_0x2f7801(0x1e9),'description':a32_0x2f7801(0x1f8),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x260a58){const _0x4ba0b5=a32_0x2f7801;if(!_0x260a58[_0x4ba0b5(0x1e4)](_0x4ba0b5(0x1e1))[_0x4ba0b5(0x20c)]())throw CliErrors[_0x4ba0b5(0x1fd)]('Search\x20query\x20is\x20required.');readTopK(_0x260a58);},async 'execute'(_0x53c158){const _0x412c76=a32_0x2f7801,_0x32be7d=_0x53c158[_0x412c76(0x1e4)](_0x412c76(0x1e1))['trim'](),_0x5db1df=readTopK(_0x53c158),_0x3d746f=await searchKnowledgeBase(_0x53c158[_0x412c76(0x210)],{'query':_0x32be7d,'topK':_0x5db1df});return{'ok':!![],'data':{'total':_0x3d746f[_0x412c76(0x218)],'hits':_0x3d746f[_0x412c76(0x1fa)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x2c8c2a=a33_0x2368;(function(_0x3026a3,_0x465c7a){const _0xf9f2f1=a33_0x2368,_0x430d28=_0x3026a3();while(!![]){try{const _0x7fb68a=parseInt(_0xf9f2f1(0x6f))/0x1*(parseInt(_0xf9f2f1(0x65))/0x2)+-parseInt(_0xf9f2f1(0x78))/0x3*(-parseInt(_0xf9f2f1(0x86))/0x4)+parseInt(_0xf9f2f1(0x84))/0x5+parseInt(_0xf9f2f1(0x75))/0x6+-parseInt(_0xf9f2f1(0x77))/0x7+-parseInt(_0xf9f2f1(0x6b))/0x8*(parseInt(_0xf9f2f1(0x87))/0x9)+-parseInt(_0xf9f2f1(0x7c))/0xa;if(_0x7fb68a===_0x465c7a)break;else _0x430d28['push'](_0x430d28['shift']());}catch(_0x4ab028){_0x430d28['push'](_0x430d28['shift']());}}}(a33_0x1867,0xdaf2b));import{logger}from'../../utils/logger.js';function a33_0x2368(_0x205178,_0x2548a8){_0x205178=_0x205178-0x64;const _0x1867a6=a33_0x1867();let _0x236844=_0x1867a6[_0x205178];return _0x236844;}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x2626f1){const _0x35fd1b=a33_0x2368;if(_0x2626f1[_0x35fd1b(0x6c)]===0x0){console['log'](_0x35fd1b(0x7e));return;}console[_0x35fd1b(0x83)]('*\x20'+CLI_DISPLAY_NAME+_0x35fd1b(0x74)),_0x2626f1[_0x35fd1b(0x6e)]((_0x3c9e83,_0x50a17f)=>{const _0x1abd63=_0x35fd1b,_0x590743=new Date(_0x3c9e83['timestamp'])[_0x1abd63(0x81)]('en-US'),_0x272676=_0x3c9e83[_0x1abd63(0x85)]===_0x1abd63(0x7a)?'√':_0x3c9e83['level']===_0x1abd63(0x6d)?'×':_0x3c9e83[_0x1abd63(0x85)]===_0x1abd63(0x80)?'!':'i';console[_0x1abd63(0x83)](_0x50a17f+0x1+'.\x20'+_0x272676+'\x20['+_0x3c9e83[_0x1abd63(0x7f)]+']\x20'+_0x3c9e83[_0x1abd63(0x7d)]),console[_0x1abd63(0x83)](_0x1abd63(0x69)+_0x590743),_0x3c9e83[_0x1abd63(0x6a)]&&console['log'](_0x1abd63(0x67)+_0x3c9e83['duration']+'ms'),_0x3c9e83[_0x1abd63(0x66)]&&Object[_0x1abd63(0x76)](_0x3c9e83['details'])['length']>0x0&&console[_0x1abd63(0x83)](_0x1abd63(0x68)+JSON['stringify'](_0x3c9e83['details'],null,0x2)),console['log']('');});}function a33_0x1867(){const _0x70be17=['2543850yEWXVh','*\x20Logs\x20cleared','13516EMyens','details','\x20\x20\x20Duration:\x20','\x20\x20\x20Details:\x20','\x20\x20\x20Time:\x20','duration','8kUVOXG','length','error','forEach','236EPZFYz','write','show','logs','readLogs','\x20logs:\x0a','1893876uvWNGL','keys','11161626IVFzeV','39dLDsZc','View\x20command\x20history\x20logs','success','clearLogs','16850490NjWATU','message','*\x20No\x20logs\x20found','command','warn','toLocaleString','read','log','5365360sIAOPF','level','453976pyapgX'];a33_0x1867=function(){return _0x70be17;};return a33_0x1867();}export const logsDefinitions=[{'service':a33_0x2c8c2a(0x72),'command':a33_0x2c8c2a(0x71),'description':a33_0x2c8c2a(0x79),'risk':a33_0x2c8c2a(0x82),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xbc3297){const _0x11d714=a33_0x2c8c2a;return printLogs(logger[_0x11d714(0x73)]()),{'ok':!![]};}},{'service':a33_0x2c8c2a(0x72),'command':'clear','description':'Clear\x20command\x20history\x20logs','risk':a33_0x2c8c2a(0x70),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1b011f){const _0x429b68=a33_0x2c8c2a;return logger[_0x429b68(0x7b)](),console['log'](_0x429b68(0x64)),{'ok':!![]};}}];
1
+ const a33_0x6ef6b3=a33_0x2766;function a33_0x17fd(){const _0x24b7ea=['duration','21814430BKeEPH','command','2tLUpGN','View\x20command\x20history\x20logs','\x20logs:\x0a','keys','timestamp','level','2934824SJbnKH','3529026OXyWHj','logs','477MvTUBJ','9776053cTGYrI','1766861sLdVSP','log','Clear\x20command\x20history\x20logs','success','clear','length','write','\x20\x20\x20Duration:\x20','details','193736sHfjTh','4816266OWEfAU','warn','5ayBTPc','\x20\x20\x20Details:\x20','error'];a33_0x17fd=function(){return _0x24b7ea;};return a33_0x17fd();}(function(_0x1d6849,_0x343e04){const _0x5de700=a33_0x2766,_0x2d8cdd=_0x1d6849();while(!![]){try{const _0x1c136e=parseInt(_0x5de700(0x109))/0x1*(parseInt(_0x5de700(0x11b))/0x2)+parseInt(_0x5de700(0x122))/0x3+-parseInt(_0x5de700(0x121))/0x4*(parseInt(_0x5de700(0x115))/0x5)+-parseInt(_0x5de700(0x113))/0x6+-parseInt(_0x5de700(0x125))/0x7+parseInt(_0x5de700(0x112))/0x8*(-parseInt(_0x5de700(0x124))/0x9)+parseInt(_0x5de700(0x119))/0xa;if(_0x1c136e===_0x343e04)break;else _0x2d8cdd['push'](_0x2d8cdd['shift']());}catch(_0x123d6c){_0x2d8cdd['push'](_0x2d8cdd['shift']());}}}(a33_0x17fd,0xddb75));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x1ca581){const _0x2a9412=a33_0x2766;if(_0x1ca581[_0x2a9412(0x10e)]===0x0){console[_0x2a9412(0x10a)]('*\x20No\x20logs\x20found');return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x2a9412(0x11d)),_0x1ca581['forEach']((_0x396d9f,_0x415c15)=>{const _0x3cf5d9=_0x2a9412,_0x27b015=new Date(_0x396d9f[_0x3cf5d9(0x11f)])['toLocaleString']('en-US'),_0x36724d=_0x396d9f[_0x3cf5d9(0x120)]===_0x3cf5d9(0x10c)?'√':_0x396d9f[_0x3cf5d9(0x120)]===_0x3cf5d9(0x117)?'×':_0x396d9f[_0x3cf5d9(0x120)]===_0x3cf5d9(0x114)?'!':'i';console['log'](_0x415c15+0x1+'.\x20'+_0x36724d+'\x20['+_0x396d9f[_0x3cf5d9(0x11a)]+']\x20'+_0x396d9f['message']),console[_0x3cf5d9(0x10a)]('\x20\x20\x20Time:\x20'+_0x27b015),_0x396d9f[_0x3cf5d9(0x118)]&&console[_0x3cf5d9(0x10a)](_0x3cf5d9(0x110)+_0x396d9f['duration']+'ms'),_0x396d9f[_0x3cf5d9(0x111)]&&Object[_0x3cf5d9(0x11e)](_0x396d9f['details'])[_0x3cf5d9(0x10e)]>0x0&&console[_0x3cf5d9(0x10a)](_0x3cf5d9(0x116)+JSON['stringify'](_0x396d9f[_0x3cf5d9(0x111)],null,0x2)),console[_0x3cf5d9(0x10a)]('');});}function a33_0x2766(_0x3228ab,_0x51b3c9){_0x3228ab=_0x3228ab-0x109;const _0x17fd98=a33_0x17fd();let _0x27665a=_0x17fd98[_0x3228ab];return _0x27665a;}export const logsDefinitions=[{'service':a33_0x6ef6b3(0x123),'command':'show','description':a33_0x6ef6b3(0x11c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x516a1e){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':'logs','command':a33_0x6ef6b3(0x10d),'description':a33_0x6ef6b3(0x10b),'risk':a33_0x6ef6b3(0x10f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x477ae3){const _0x4de8c2=a33_0x6ef6b3;return logger['clearLogs'](),console[_0x4de8c2(0x10a)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x32345f=a34_0x1667;(function(_0x34f06a,_0x564518){const _0x2ef896=a34_0x1667,_0x35cb31=_0x34f06a();while(!![]){try{const _0x292612=-parseInt(_0x2ef896(0x134))/0x1*(-parseInt(_0x2ef896(0x132))/0x2)+-parseInt(_0x2ef896(0x12a))/0x3+parseInt(_0x2ef896(0x131))/0x4+-parseInt(_0x2ef896(0x11d))/0x5*(parseInt(_0x2ef896(0x107))/0x6)+parseInt(_0x2ef896(0x11c))/0x7+parseInt(_0x2ef896(0x124))/0x8+-parseInt(_0x2ef896(0x103))/0x9;if(_0x292612===_0x564518)break;else _0x35cb31['push'](_0x35cb31['shift']());}catch(_0x27624e){_0x35cb31['push'](_0x35cb31['shift']());}}}(a34_0x25a2,0x94d30));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';const SUPPORTED_SCENES=['invoice',a34_0x32345f(0x118),a34_0x32345f(0x119),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a34_0x32345f(0x116),'form':a34_0x32345f(0x120),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x32345f(0x10c)},IMAGE_FILE_FLAG={'name':a34_0x32345f(0x123),'type':a34_0x32345f(0x100),'description':a34_0x32345f(0x112)},IMAGE_URL_FLAG={'name':'image-url','type':a34_0x32345f(0x100),'description':a34_0x32345f(0x12b)};function normalizeScene(_0xb6c6ea){const _0x4d9fb5=a34_0x32345f,_0x1b563a=_0xb6c6ea[_0x4d9fb5(0x130)]()['toLowerCase']();if(_0x1b563a===_0x4d9fb5(0x127))return _0x4d9fb5(0x11a);if(_0x1b563a===_0x4d9fb5(0x101)||_0x1b563a==='general'||_0x1b563a===_0x4d9fb5(0x119))return _0x1b563a;throw CliErrors['validation']('Unsupported\x20OCR\x20scene:\x20'+_0xb6c6ea+_0x4d9fb5(0x102)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0xef87b2){const _0x2d9196=a34_0x32345f,_0x24dad7=_0xef87b2[_0x2d9196(0x11f)]('image-file')[_0x2d9196(0x130)](),_0x15313c=_0xef87b2[_0x2d9196(0x11f)](_0x2d9196(0x113))['trim']();return{'imageFile':_0x24dad7,'imageUrl':_0x15313c,'count':[_0x24dad7,_0x15313c][_0x2d9196(0x126)](Boolean)['length']};}function a34_0x1667(_0x28688c,_0x27f3ae){_0x28688c=_0x28688c-0x100;const _0x25a23c=a34_0x25a2();let _0x166711=_0x25a23c[_0x28688c];return _0x166711;}function validateInputSelection(_0x7dad10){const _0x54482d=a34_0x32345f,_0x4df5aa=selectedInputs(_0x7dad10);if(_0x4df5aa[_0x54482d(0x121)]!==0x1)throw CliErrors[_0x54482d(0x11e)](_0x54482d(0x110));return _0x4df5aa;}function withScene(_0x5e6a06,_0x915a6e,_0x5cbb78){const _0x4239ec=a34_0x32345f;return{..._0x5e6a06,'scene':_0x915a6e,..._0x5cbb78?{'sourceFile':{'fileName':_0x5cbb78[_0x4239ec(0x114)],'filePath':_0x5cbb78[_0x4239ec(0x133)]}}:{}};}const ocrRecognize={'service':a34_0x32345f(0x128),'command':'recognize','description':a34_0x32345f(0x10a),'risk':a34_0x32345f(0x129),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x246154){const _0x243b73=a34_0x32345f,_0x33cfee=normalizeScene(_0x246154[_0x243b73(0x11f)](_0x243b73(0x10f))),_0x527275=SCENE_TO_LEGACY_TYPE[_0x33cfee],_0x519c8c=validateInputSelection(_0x246154);if(_0x519c8c[_0x243b73(0x115)])return dryRun('POST',_0x243b73(0x10e))[_0x243b73(0x12c)]({'appCode':_0x246154[_0x243b73(0x111)],'url':_0x519c8c[_0x243b73(0x115)],'type':_0x527275})['description'](_0x243b73(0x122)+_0x33cfee+_0x243b73(0x105))['build']();const _0xe8d2f=requireRuntimeUploadFile(_0x519c8c[_0x243b73(0x12e)],_0x243b73(0x123));return dryRun(_0x243b73(0x10d),_0x243b73(0x104))[_0x243b73(0x12c)]({'steps':[{'method':_0x243b73(0x10d),'url':_0x243b73(0x104),'body':{'appCode':_0x246154['appCode'],'multipart':{'file':_0xe8d2f}}},{'method':_0x243b73(0x10d),'url':'/client/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/client/uploadFile>','downloadFlag':![]}},{'method':_0x243b73(0x10d),'url':_0x243b73(0x10e),'body':{'appCode':_0x246154['appCode'],'url':_0x243b73(0x10b),'type':_0x527275}}]})[_0x243b73(0x109)](_0x243b73(0x108)+_0x33cfee+_0x243b73(0x125))[_0x243b73(0x12f)]();},async 'execute'(_0x4ad5d){const _0x9ad5fd=a34_0x32345f,_0x396389=normalizeScene(_0x4ad5d['str']('scene')),_0x1c0eaf=SCENE_TO_LEGACY_TYPE[_0x396389],_0x3a1e3c=validateInputSelection(_0x4ad5d);if(_0x3a1e3c[_0x9ad5fd(0x115)]){const _0x215a11=await recognizeRuntimeOcr(_0x4ad5d[_0x9ad5fd(0x111)],{'url':_0x3a1e3c[_0x9ad5fd(0x115)],'type':_0x1c0eaf});return{'ok':!![],'data':withScene(_0x215a11,_0x396389)};}const _0x9ad9f=requireRuntimeUploadFile(_0x3a1e3c[_0x9ad5fd(0x12e)],'image-file'),_0x360d22=await uploadRuntimeFile(_0x4ad5d[_0x9ad5fd(0x111)],_0x9ad9f['path']);if(!_0x360d22['filePath'])throw CliErrors['apiError'](_0x9ad5fd(0x11b));const _0x30696f=await queryRuntimeFileUrl(_0x360d22['filePath'],{'download':![]});if(!_0x30696f[_0x9ad5fd(0x12d)])throw CliErrors[_0x9ad5fd(0x117)](_0x9ad5fd(0x106));const _0x554ca5=await recognizeRuntimeOcr(_0x4ad5d[_0x9ad5fd(0x111)],{'url':_0x30696f[_0x9ad5fd(0x12d)],'type':_0x1c0eaf});return{'ok':!![],'data':withScene(_0x554ca5,_0x396389,_0x360d22)};}};function a34_0x25a2(){const _0x249535=['write','1473339xaWVkx','Publicly\x20accessible\x20image\x20or\x20file\x20URL','body','fileUrl','imageFile','build','trim','1214020LSeCJb','2104636JgGGDA','filePath','1MzVWkl','string','invoice','.\x20Supported\x20scenes:\x20','2037870PAFHes','/client/uploadFile','\x20OCR\x20from\x20URL','File\x20URL\x20response\x20missing\x20fileUrl.','348186LmhjBZ','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','description','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','POST','/client/ocr','scene','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','appCode','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','image-url','fileName','imageUrl','General','apiError','general','form','idCard','File\x20upload\x20response\x20missing\x20filePath.','6217512gojjKF','80LQjnhv','validation','str','Table','count','Preview:\x20recognize\x20','image-file','92672dLknIF','\x20OCR','filter','idcard','ocr'];a34_0x25a2=function(){return _0x249535;};return a34_0x25a2();}export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0x581540=a34_0x3769;(function(_0x1382db,_0x5057de){const _0x549baa=a34_0x3769,_0x46e621=_0x1382db();while(!![]){try{const _0x42198b=-parseInt(_0x549baa(0x12f))/0x1+parseInt(_0x549baa(0x14f))/0x2*(-parseInt(_0x549baa(0x150))/0x3)+parseInt(_0x549baa(0x136))/0x4+-parseInt(_0x549baa(0x13c))/0x5+parseInt(_0x549baa(0x134))/0x6*(-parseInt(_0x549baa(0x14b))/0x7)+-parseInt(_0x549baa(0x14d))/0x8*(parseInt(_0x549baa(0x147))/0x9)+parseInt(_0x549baa(0x13a))/0xa;if(_0x42198b===_0x5057de)break;else _0x46e621['push'](_0x46e621['shift']());}catch(_0x5b0fca){_0x46e621['push'](_0x46e621['shift']());}}}(a34_0x28df,0x8f324));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';const SUPPORTED_SCENES=['invoice','general',a34_0x581540(0x14a),a34_0x581540(0x145)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x581540(0x132),'general':a34_0x581540(0x144),'form':a34_0x581540(0x138),'idCard':a34_0x581540(0x133)},SCENE_FLAG={'name':'scene','type':a34_0x581540(0x15d),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x581540(0x146)},IMAGE_FILE_FLAG={'name':'image-file','type':a34_0x581540(0x15d),'description':a34_0x581540(0x15f)},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':a34_0x581540(0x14c)};function normalizeScene(_0x3deed7){const _0x2ebfab=a34_0x581540,_0xb25e99=_0x3deed7[_0x2ebfab(0x143)]()[_0x2ebfab(0x157)]();if(_0xb25e99==='idcard')return'idCard';if(_0xb25e99===_0x2ebfab(0x142)||_0xb25e99===_0x2ebfab(0x15e)||_0xb25e99===_0x2ebfab(0x14a))return _0xb25e99;throw CliErrors[_0x2ebfab(0x159)](_0x2ebfab(0x154)+_0x3deed7+_0x2ebfab(0x15b)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x4c6702){const _0x2b6bad=a34_0x581540,_0x11e683=_0x4c6702[_0x2b6bad(0x151)](_0x2b6bad(0x148))[_0x2b6bad(0x143)](),_0x4cbd0a=_0x4c6702[_0x2b6bad(0x151)](_0x2b6bad(0x140))[_0x2b6bad(0x143)]();return{'imageFile':_0x11e683,'imageUrl':_0x4cbd0a,'count':[_0x11e683,_0x4cbd0a][_0x2b6bad(0x15a)](Boolean)[_0x2b6bad(0x13b)]};}function validateInputSelection(_0x5c0499){const _0x12e388=a34_0x581540,_0x3835a6=selectedInputs(_0x5c0499);if(_0x3835a6[_0x12e388(0x139)]!==0x1)throw CliErrors[_0x12e388(0x159)](_0x12e388(0x130));return _0x3835a6;}function a34_0x3769(_0x228e43,_0x5f429c){_0x228e43=_0x228e43-0x12c;const _0x28df84=a34_0x28df();let _0x376900=_0x28df84[_0x228e43];return _0x376900;}function a34_0x28df(){const _0x370910=['Publicly\x20accessible\x20image\x20or\x20file\x20URL','976AmYXTR','apiError','1332202hlwAJC','3jZBGgt','str','scene','build','Unsupported\x20OCR\x20scene:\x20','fileName','/client/ocr','toLowerCase','<filePath\x20returned\x20by\x20/client/uploadFile>','validation','filter','.\x20Supported\x20scenes:\x20','recognize','string','general','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','/client/uploadFile','appCode','/client/queryFileUrl','File\x20upload\x20response\x20missing\x20filePath.','1061472JAixjb','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','POST','Invoice','IdCard','2486766KWwjWO','fileUrl','4163456RPgSeI','filePath','Table','count','35111630gRApBM','length','1739220YyHOhb','imageUrl','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','imageFile','image-url','description','invoice','trim','General','idCard','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','78282ZCNevi','image-file','body','form','14QXnvIZ'];a34_0x28df=function(){return _0x370910;};return a34_0x28df();}function withScene(_0x100c1f,_0x31c262,_0x340411){const _0xab4370=a34_0x581540;return{..._0x100c1f,'scene':_0x31c262,..._0x340411?{'sourceFile':{'fileName':_0x340411[_0xab4370(0x155)],'filePath':_0x340411[_0xab4370(0x137)]}}:{}};}const ocrRecognize={'service':'ocr','command':a34_0x581540(0x15c),'description':'Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','risk':'write','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x2aa2b7){const _0x5be6d2=a34_0x581540,_0x501f8c=normalizeScene(_0x2aa2b7[_0x5be6d2(0x151)]('scene')),_0xf0a163=SCENE_TO_LEGACY_TYPE[_0x501f8c],_0x59dd0a=validateInputSelection(_0x2aa2b7);if(_0x59dd0a['imageUrl'])return dryRun('POST',_0x5be6d2(0x156))[_0x5be6d2(0x149)]({'appCode':_0x2aa2b7['appCode'],'url':_0x59dd0a[_0x5be6d2(0x13d)],'type':_0xf0a163})[_0x5be6d2(0x141)]('Preview:\x20recognize\x20'+_0x501f8c+'\x20OCR\x20from\x20URL')['build']();const _0x27a880=requireRuntimeUploadFile(_0x59dd0a[_0x5be6d2(0x13f)],_0x5be6d2(0x148));return dryRun('POST',_0x5be6d2(0x160))['body']({'steps':[{'method':_0x5be6d2(0x131),'url':_0x5be6d2(0x160),'body':{'appCode':_0x2aa2b7[_0x5be6d2(0x12c)],'multipart':{'file':_0x27a880}}},{'method':'POST','url':_0x5be6d2(0x12d),'body':{'filePath':_0x5be6d2(0x158),'downloadFlag':![]}},{'method':_0x5be6d2(0x131),'url':_0x5be6d2(0x156),'body':{'appCode':_0x2aa2b7[_0x5be6d2(0x12c)],'url':_0x5be6d2(0x13e),'type':_0xf0a163}}]})['description']('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x501f8c+'\x20OCR')[_0x5be6d2(0x153)]();},async 'execute'(_0x53c240){const _0x52dbb4=a34_0x581540,_0x236277=normalizeScene(_0x53c240['str'](_0x52dbb4(0x152))),_0x49e0b6=SCENE_TO_LEGACY_TYPE[_0x236277],_0x5a8d43=validateInputSelection(_0x53c240);if(_0x5a8d43[_0x52dbb4(0x13d)]){const _0x148b16=await recognizeRuntimeOcr(_0x53c240[_0x52dbb4(0x12c)],{'url':_0x5a8d43[_0x52dbb4(0x13d)],'type':_0x49e0b6});return{'ok':!![],'data':withScene(_0x148b16,_0x236277)};}const _0xbc71df=requireRuntimeUploadFile(_0x5a8d43[_0x52dbb4(0x13f)],'image-file'),_0x32f5e9=await uploadRuntimeFile(_0x53c240[_0x52dbb4(0x12c)],_0xbc71df['path']);if(!_0x32f5e9['filePath'])throw CliErrors['apiError'](_0x52dbb4(0x12e));const _0x5a3fd2=await queryRuntimeFileUrl(_0x32f5e9[_0x52dbb4(0x137)],{'download':![]});if(!_0x5a3fd2['fileUrl'])throw CliErrors[_0x52dbb4(0x14e)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x382ce8=await recognizeRuntimeOcr(_0x53c240[_0x52dbb4(0x12c)],{'url':_0x5a3fd2[_0x52dbb4(0x135)],'type':_0x49e0b6});return{'ok':!![],'data':withScene(_0x382ce8,_0x236277,_0x32f5e9)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x2a786e=a35_0x3254;(function(_0x35c149,_0x27dfa1){const _0x2fde04=a35_0x3254,_0x1caa45=_0x35c149();while(!![]){try{const _0x1a7ef5=parseInt(_0x2fde04(0xee))/0x1*(-parseInt(_0x2fde04(0x100))/0x2)+-parseInt(_0x2fde04(0xf0))/0x3+parseInt(_0x2fde04(0x110))/0x4*(parseInt(_0x2fde04(0xfa))/0x5)+parseInt(_0x2fde04(0x125))/0x6+-parseInt(_0x2fde04(0xfb))/0x7*(parseInt(_0x2fde04(0x10e))/0x8)+-parseInt(_0x2fde04(0xfc))/0x9*(parseInt(_0x2fde04(0x111))/0xa)+parseInt(_0x2fde04(0xe7))/0xb;if(_0x1a7ef5===_0x27dfa1)break;else _0x1caa45['push'](_0x1caa45['shift']());}catch(_0x4a1069){_0x1caa45['push'](_0x1caa45['shift']());}}}(a35_0x864a,0xba37f));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';function a35_0x3254(_0x4ceb70,_0x489e38){_0x4ceb70=_0x4ceb70-0xe4;const _0x864a9d=a35_0x864a();let _0x3254af=_0x864a9d[_0x4ceb70];return _0x3254af;}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_0x2a786e(0x123),'type':a35_0x2a786e(0xf2),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':a35_0x2a786e(0xeb),'type':a35_0x2a786e(0xf2),'required':!![],'description':'Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':'description','type':a35_0x2a786e(0xf2),'description':a35_0x2a786e(0x106)},SOURCE_SESSION_FLAG={'name':a35_0x2a786e(0x126),'type':a35_0x2a786e(0xf2),'description':a35_0x2a786e(0xf9)};function normalizeFunctionName(_0x82207b){const _0x2a4680=a35_0x2a786e,_0x17ed96=String(_0x82207b||'')[_0x2a4680(0x11b)]();if(!_0x17ed96||!FUNCTION_NAME_PATTERN[_0x2a4680(0xf6)](_0x17ed96))throw CliErrors['validation'](_0x2a4680(0x122));return _0x17ed96;}function readScriptFile(_0x40c655){const _0xcf4d62=a35_0x2a786e;if(!_0x40c655)throw CliErrors[_0xcf4d62(0xf3)](_0xcf4d62(0x116));if(!existsSync(_0x40c655))throw CliErrors[_0xcf4d62(0xf3)]('File\x20not\x20found:\x20'+_0x40c655);if(!statSync(_0x40c655)['isFile']())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x40c655);const _0x1f6508=readFileSync(_0x40c655,_0xcf4d62(0x112));if(!_0x1f6508[_0xcf4d62(0x11b)]())throw CliErrors['validation']('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x1f6508;}function optionalTrimmed(_0x24960a){const _0x20999b=String(_0x24960a||'')['trim']();return _0x20999b||undefined;}function a35_0x864a(){const _0x1991f3=['update','Optional\x20source\x20RuntimeAgent\x20session\x20id','181820ICmMko','922908reFeJT','423PfhGNI','Show\x20one\x20personal\x20BFF\x20by\x20id','map','updateTime','148qeaiqF','exec','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','body','write','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','Personal\x20BFF\x20description','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','POST','gmtModified','personal-bff','scriptType','length','8Xpwlfy','createUserId','52lfifsv','96290ntkMeS','utf8','str','--params\x20must\x20be\x20a\x20JSON\x20object.','/client/runtime-bff/personal/','File\x20path\x20is\x20required.','Executed\x20personal\x20BFF\x20','version','gmtCreate','config','trim','keys','Preview:\x20update\x20personal\x20BFF\x20','Preview:\x20create\x20personal\x20BFF\x20','params','functionName','sourceSessionId','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','file','Update\x20a\x20personal\x20BFF\x20by\x20id','5363904CuopGa','source-session-id','build','Updated\x20personal\x20BFF\x20','list','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','7824509NeCaea','create','scriptContent','Personal\x20BFF\x20script\x20ID','name','description','verbose','2185GXSXgj','appCode','1707561gNblFF','read','string','validation','bool','flag','test','num'];a35_0x864a=function(){return _0x1991f3;};return a35_0x864a();}function summarizeBff(_0x1908b0){const _0x4e5b3f=a35_0x2a786e;return{'id':_0x1908b0['id'],'appCode':_0x1908b0[_0x4e5b3f(0xef)],'functionName':_0x1908b0[_0x4e5b3f(0x120)],'description':_0x1908b0[_0x4e5b3f(0xec)],'scriptType':_0x1908b0[_0x4e5b3f(0x10c)],'version':_0x1908b0['version'],'gmtModified':_0x1908b0[_0x4e5b3f(0x10a)],'updateTime':_0x1908b0[_0x4e5b3f(0xff)]};}function detailBff(_0x22afe2){const _0xa09fd4=a35_0x2a786e;return{'id':_0x22afe2['id'],'appCode':_0x22afe2['appCode'],'functionName':_0x22afe2[_0xa09fd4(0x120)],'description':_0x22afe2['description'],'scriptType':_0x22afe2[_0xa09fd4(0x10c)],'scriptContent':_0x22afe2['scriptContent']??'','config':_0x22afe2[_0xa09fd4(0x11a)],'version':_0x22afe2[_0xa09fd4(0x118)],'createUserId':_0x22afe2[_0xa09fd4(0x10f)],'gmtCreate':_0x22afe2[_0xa09fd4(0x119)],'gmtModified':_0x22afe2[_0xa09fd4(0x10a)],'createTime':_0x22afe2['createTime'],'updateTime':_0x22afe2[_0xa09fd4(0xff)]};}function buildCreateInput(_0x4e2230){const _0x1dd9cf=a35_0x2a786e;return{'functionName':normalizeFunctionName(_0x4e2230[_0x1dd9cf(0x113)]('name')),...optionalTrimmed(_0x4e2230[_0x1dd9cf(0x113)]('description'))?{'description':optionalTrimmed(_0x4e2230[_0x1dd9cf(0x113)](_0x1dd9cf(0xec)))}:{},'scriptContent':readScriptFile(_0x4e2230[_0x1dd9cf(0x113)](_0x1dd9cf(0x123))),...optionalTrimmed(_0x4e2230[_0x1dd9cf(0x113)](_0x1dd9cf(0x126)))?{'sourceSessionId':optionalTrimmed(_0x4e2230['str']('source-session-id'))}:{}};}function buildUpdateInput(_0x30ab84){const _0x34126d=a35_0x2a786e,_0x2c6f8c={};optionalTrimmed(_0x30ab84[_0x34126d(0x113)]('name'))&&(_0x2c6f8c[_0x34126d(0x120)]=normalizeFunctionName(_0x30ab84[_0x34126d(0x113)](_0x34126d(0xeb))));_0x30ab84[_0x34126d(0xf5)](_0x34126d(0xec))!==undefined&&(_0x2c6f8c[_0x34126d(0xec)]=_0x30ab84['str']('description'));optionalTrimmed(_0x30ab84[_0x34126d(0x113)](_0x34126d(0x123)))&&(_0x2c6f8c[_0x34126d(0xe9)]=readScriptFile(_0x30ab84['str']('file')));_0x30ab84['flag']('source-session-id')!==undefined&&(_0x2c6f8c[_0x34126d(0x121)]=_0x30ab84[_0x34126d(0x113)](_0x34126d(0x126)));if(Object[_0x34126d(0x11c)](_0x2c6f8c)[_0x34126d(0x10d)]===0x0)throw CliErrors['validation'](_0x34126d(0x107));return _0x2c6f8c;}function parseExecParams(_0x5c9bbc){const _0x1b1049=a35_0x2a786e,_0x386c83=parseJsonParams(_0x5c9bbc)??{};if(Array['isArray'](_0x386c83))throw CliErrors['validation'](_0x1b1049(0x114));return _0x386c83;}const personalBffList={'service':a35_0x2a786e(0x10b),'command':a35_0x2a786e(0xe5),'description':a35_0x2a786e(0xe6),'risk':a35_0x2a786e(0xf1),'flags':[VERBOSE_FLAG],async 'execute'(_0x5caa52){const _0x4006ea=a35_0x2a786e,_0x140497=await listPersonalBffs(_0x5caa52['appCode']);return{'ok':!![],'data':{'total':_0x140497[_0x4006ea(0x10d)],'items':_0x5caa52[_0x4006ea(0xf4)](_0x4006ea(0xed))?_0x140497:_0x140497[_0x4006ea(0xfe)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':'detail','description':a35_0x2a786e(0xfd),'risk':a35_0x2a786e(0xf1),'flags':[{...ID_FLAG,'description':a35_0x2a786e(0xea)}],async 'execute'(_0x43171e){const _0x11cab5=a35_0x2a786e,_0x47d490=await getPersonalBff(_0x43171e[_0x11cab5(0xf7)]('id'),_0x43171e[_0x11cab5(0xef)]);return{'ok':!![],'data':detailBff(_0x47d490)};}},personalBffCreate={'service':a35_0x2a786e(0x10b),'command':a35_0x2a786e(0xe8),'description':a35_0x2a786e(0x105),'risk':a35_0x2a786e(0x104),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x381b46){const _0x31be55=a35_0x2a786e,_0x408010=buildCreateInput(_0x381b46),_0x409bf5=await createPersonalBff(_0x381b46['appCode'],_0x408010);return{'ok':!![],'data':detailBff(_0x409bf5),'message':'Created\x20personal\x20BFF\x20'+_0x409bf5['id']+(_0x409bf5[_0x31be55(0x120)]?'\x20('+_0x409bf5[_0x31be55(0x120)]+')':'')};},async 'dryRun'(_0x54ad7b){const _0x40614c=a35_0x2a786e,_0x4d360e=buildCreateInput(_0x54ad7b);return dryRun(_0x40614c(0x109),'/client/runtime-bff/personal/create')['body']({'appCode':_0x54ad7b[_0x40614c(0xef)],..._0x4d360e})[_0x40614c(0xec)](_0x40614c(0x11e)+_0x4d360e[_0x40614c(0x120)])[_0x40614c(0x127)]();}},personalBffUpdate={'service':a35_0x2a786e(0x10b),'command':a35_0x2a786e(0xf8),'description':a35_0x2a786e(0x124),'risk':a35_0x2a786e(0x104),'flags':[{...ID_FLAG,'description':a35_0x2a786e(0xea)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x36c762){const _0x19eb01=a35_0x2a786e,_0x23bf6f=_0x36c762[_0x19eb01(0xf7)]('id'),_0x1fbe39=buildUpdateInput(_0x36c762),_0x1d86d6=await updatePersonalBff(_0x23bf6f,_0x36c762['appCode'],_0x1fbe39);return{'ok':!![],'data':detailBff(_0x1d86d6),'message':_0x19eb01(0xe4)+_0x1d86d6['id']+(_0x1d86d6['functionName']?'\x20('+_0x1d86d6[_0x19eb01(0x120)]+')':'')};},async 'dryRun'(_0x19f2d0){const _0x3aaeee=a35_0x2a786e,_0x383795=_0x19f2d0[_0x3aaeee(0xf7)]('id'),_0x494eb1=buildUpdateInput(_0x19f2d0);return dryRun('POST',_0x3aaeee(0x115)+_0x383795+'/update')[_0x3aaeee(0x103)]({'appCode':_0x19f2d0['appCode'],..._0x494eb1})['description'](_0x3aaeee(0x11d)+_0x383795)[_0x3aaeee(0x127)]();}},personalBffExec={'service':a35_0x2a786e(0x10b),'command':a35_0x2a786e(0x101),'description':a35_0x2a786e(0x108),'risk':'high-risk-write','flags':[{...ID_FLAG,'description':a35_0x2a786e(0xea)},{...PARAMS_FLAG,'description':a35_0x2a786e(0x102)}],async 'validate'(_0x1c92e7){const _0x56ee20=a35_0x2a786e;parseExecParams(_0x1c92e7[_0x56ee20(0x113)](_0x56ee20(0x11f)));},async 'execute'(_0x833669){const _0x40b114=a35_0x2a786e,_0x41dfce=_0x833669[_0x40b114(0xf7)]('id'),_0x334adb=parseExecParams(_0x833669[_0x40b114(0x113)](_0x40b114(0x11f))),_0xd4e642=await executePersonalBff(_0x41dfce,_0x833669['appCode'],_0x334adb);return{'ok':!![],'data':{'result':_0xd4e642},'message':_0x40b114(0x117)+_0x41dfce};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x1f63ad=a35_0x5892;(function(_0x259375,_0x248e7e){const _0x171d1e=a35_0x5892,_0x42542e=_0x259375();while(!![]){try{const _0x46cd36=parseInt(_0x171d1e(0xdf))/0x1*(-parseInt(_0x171d1e(0xef))/0x2)+-parseInt(_0x171d1e(0xc6))/0x3*(parseInt(_0x171d1e(0xc7))/0x4)+-parseInt(_0x171d1e(0xf1))/0x5+-parseInt(_0x171d1e(0xd4))/0x6+-parseInt(_0x171d1e(0xc8))/0x7+parseInt(_0x171d1e(0xc5))/0x8+-parseInt(_0x171d1e(0xd1))/0x9*(-parseInt(_0x171d1e(0xd7))/0xa);if(_0x46cd36===_0x248e7e)break;else _0x42542e['push'](_0x42542e['shift']());}catch(_0x362ec2){_0x42542e['push'](_0x42542e['shift']());}}}(a35_0x22ed,0x9f7ab));import{existsSync,readFileSync,statSync}from'node:fs';function a35_0x22ed(){const _0x18f7bf=['Optional\x20source\x20RuntimeAgent\x20session\x20id','/client/runtime-bff/personal/','params','Update\x20a\x20personal\x20BFF\x20by\x20id','scriptType','gmtCreate','sourceSessionId','2377638luqXIa','update','verbose','5662362NZQNVy','file','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','110LxfXwf','scriptContent','Executed\x20personal\x20BFF\x20','appCode','version','map','description','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','7aFbBmD','isFile','functionName','name','trim','File\x20not\x20found:\x20','isArray','updateTime','/client/runtime-bff/personal/create','list','Show\x20one\x20personal\x20BFF\x20by\x20id','POST','read','Personal\x20BFF\x20description','high-risk-write','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','62362bYNTXh','createUserId','880000RfJOFZ','Preview:\x20create\x20personal\x20BFF\x20','Created\x20personal\x20BFF\x20','build','config','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','create','body','bool','utf8','Preview:\x20update\x20personal\x20BFF\x20','test','flag','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','str','Personal\x20BFF\x20script\x20ID','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','validation','gmtModified','write','personal-bff','exec','keys','num','string','source-session-id','6542528QZpTEk','3tbMtdY','2740412sCRLqY','7332458PcQoGk','File\x20path\x20is\x20required.'];a35_0x22ed=function(){return _0x18f7bf;};return a35_0x22ed();}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':a35_0x1f63ad(0xc3),'description':a35_0x1f63ad(0xd6)},FUNCTION_NAME_FLAG={'name':a35_0x1f63ad(0xe2),'type':'string','required':!![],'description':a35_0x1f63ad(0xde)},DESCRIPTION_FLAG={'name':a35_0x1f63ad(0xdd),'type':a35_0x1f63ad(0xc3),'description':a35_0x1f63ad(0xec)},SOURCE_SESSION_FLAG={'name':a35_0x1f63ad(0xc4),'type':a35_0x1f63ad(0xc3),'description':a35_0x1f63ad(0xca)};function normalizeFunctionName(_0x3d7e02){const _0x3a4cea=a35_0x1f63ad,_0xba2c04=String(_0x3d7e02||'')[_0x3a4cea(0xe3)]();if(!_0xba2c04||!FUNCTION_NAME_PATTERN[_0x3a4cea(0xfc)](_0xba2c04))throw CliErrors[_0x3a4cea(0xbc)](_0x3a4cea(0xf6));return _0xba2c04;}function readScriptFile(_0x542bfb){const _0x31305e=a35_0x1f63ad;if(!_0x542bfb)throw CliErrors['validation'](_0x31305e(0xc9));if(!existsSync(_0x542bfb))throw CliErrors[_0x31305e(0xbc)](_0x31305e(0xe4)+_0x542bfb);if(!statSync(_0x542bfb)[_0x31305e(0xe0)]())throw CliErrors[_0x31305e(0xbc)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x542bfb);const _0x55c1e9=readFileSync(_0x542bfb,_0x31305e(0xfa));if(!_0x55c1e9[_0x31305e(0xe3)]())throw CliErrors[_0x31305e(0xbc)]('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x55c1e9;}function optionalTrimmed(_0x4ab6aa){const _0x561dd0=String(_0x4ab6aa||'')['trim']();return _0x561dd0||undefined;}function summarizeBff(_0x52cccf){const _0x5973c2=a35_0x1f63ad;return{'id':_0x52cccf['id'],'appCode':_0x52cccf[_0x5973c2(0xda)],'functionName':_0x52cccf[_0x5973c2(0xe1)],'description':_0x52cccf[_0x5973c2(0xdd)],'scriptType':_0x52cccf[_0x5973c2(0xce)],'version':_0x52cccf[_0x5973c2(0xdb)],'gmtModified':_0x52cccf[_0x5973c2(0xbd)],'updateTime':_0x52cccf[_0x5973c2(0xe6)]};}function detailBff(_0x2a76b4){const _0x3c2260=a35_0x1f63ad;return{'id':_0x2a76b4['id'],'appCode':_0x2a76b4[_0x3c2260(0xda)],'functionName':_0x2a76b4[_0x3c2260(0xe1)],'description':_0x2a76b4[_0x3c2260(0xdd)],'scriptType':_0x2a76b4[_0x3c2260(0xce)],'scriptContent':_0x2a76b4[_0x3c2260(0xd8)]??'','config':_0x2a76b4[_0x3c2260(0xf5)],'version':_0x2a76b4[_0x3c2260(0xdb)],'createUserId':_0x2a76b4[_0x3c2260(0xf0)],'gmtCreate':_0x2a76b4[_0x3c2260(0xcf)],'gmtModified':_0x2a76b4[_0x3c2260(0xbd)],'createTime':_0x2a76b4['createTime'],'updateTime':_0x2a76b4[_0x3c2260(0xe6)]};}function a35_0x5892(_0xa73534,_0x349130){_0xa73534=_0xa73534-0xb9;const _0x22edc8=a35_0x22ed();let _0x5892fb=_0x22edc8[_0xa73534];return _0x5892fb;}function buildCreateInput(_0x18a8d5){const _0x5e2925=a35_0x1f63ad;return{'functionName':normalizeFunctionName(_0x18a8d5[_0x5e2925(0xb9)]('name')),...optionalTrimmed(_0x18a8d5[_0x5e2925(0xb9)](_0x5e2925(0xdd)))?{'description':optionalTrimmed(_0x18a8d5[_0x5e2925(0xb9)](_0x5e2925(0xdd)))}:{},'scriptContent':readScriptFile(_0x18a8d5[_0x5e2925(0xb9)](_0x5e2925(0xd5))),...optionalTrimmed(_0x18a8d5[_0x5e2925(0xb9)](_0x5e2925(0xc4)))?{'sourceSessionId':optionalTrimmed(_0x18a8d5['str'](_0x5e2925(0xc4)))}:{}};}function buildUpdateInput(_0xfdf460){const _0x5b3a6a=a35_0x1f63ad,_0x178262={};optionalTrimmed(_0xfdf460[_0x5b3a6a(0xb9)]('name'))&&(_0x178262[_0x5b3a6a(0xe1)]=normalizeFunctionName(_0xfdf460['str'](_0x5b3a6a(0xe2))));_0xfdf460['flag'](_0x5b3a6a(0xdd))!==undefined&&(_0x178262[_0x5b3a6a(0xdd)]=_0xfdf460['str'](_0x5b3a6a(0xdd)));optionalTrimmed(_0xfdf460[_0x5b3a6a(0xb9)](_0x5b3a6a(0xd5)))&&(_0x178262[_0x5b3a6a(0xd8)]=readScriptFile(_0xfdf460['str'](_0x5b3a6a(0xd5))));_0xfdf460[_0x5b3a6a(0xfd)]('source-session-id')!==undefined&&(_0x178262[_0x5b3a6a(0xd0)]=_0xfdf460[_0x5b3a6a(0xb9)](_0x5b3a6a(0xc4)));if(Object[_0x5b3a6a(0xc1)](_0x178262)['length']===0x0)throw CliErrors[_0x5b3a6a(0xbc)](_0x5b3a6a(0xbb));return _0x178262;}function parseExecParams(_0xea13d2){const _0x218f0d=a35_0x1f63ad,_0x20c058=parseJsonParams(_0xea13d2)??{};if(Array[_0x218f0d(0xe5)](_0x20c058))throw CliErrors[_0x218f0d(0xbc)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x20c058;}const personalBffList={'service':a35_0x1f63ad(0xbf),'command':a35_0x1f63ad(0xe8),'description':'List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','risk':a35_0x1f63ad(0xeb),'flags':[VERBOSE_FLAG],async 'execute'(_0x3e9945){const _0x395f4c=a35_0x1f63ad,_0xa4efb1=await listPersonalBffs(_0x3e9945[_0x395f4c(0xda)]);return{'ok':!![],'data':{'total':_0xa4efb1['length'],'items':_0x3e9945[_0x395f4c(0xf9)](_0x395f4c(0xd3))?_0xa4efb1:_0xa4efb1[_0x395f4c(0xdc)](summarizeBff)}};}},personalBffDetail={'service':a35_0x1f63ad(0xbf),'command':'detail','description':a35_0x1f63ad(0xe9),'risk':'read','flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x21fd2a){const _0x46c5ab=a35_0x1f63ad,_0x2edbf6=await getPersonalBff(_0x21fd2a[_0x46c5ab(0xc2)]('id'),_0x21fd2a[_0x46c5ab(0xda)]);return{'ok':!![],'data':detailBff(_0x2edbf6)};}},personalBffCreate={'service':a35_0x1f63ad(0xbf),'command':a35_0x1f63ad(0xf7),'description':'Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','risk':a35_0x1f63ad(0xbe),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x257b64){const _0x3076d3=a35_0x1f63ad,_0x74e642=buildCreateInput(_0x257b64),_0x1ca965=await createPersonalBff(_0x257b64['appCode'],_0x74e642);return{'ok':!![],'data':detailBff(_0x1ca965),'message':_0x3076d3(0xf3)+_0x1ca965['id']+(_0x1ca965['functionName']?'\x20('+_0x1ca965[_0x3076d3(0xe1)]+')':'')};},async 'dryRun'(_0x518027){const _0x5bdb1d=a35_0x1f63ad,_0x282c7c=buildCreateInput(_0x518027);return dryRun(_0x5bdb1d(0xea),_0x5bdb1d(0xe7))[_0x5bdb1d(0xf8)]({'appCode':_0x518027['appCode'],..._0x282c7c})['description'](_0x5bdb1d(0xf2)+_0x282c7c[_0x5bdb1d(0xe1)])[_0x5bdb1d(0xf4)]();}},personalBffUpdate={'service':a35_0x1f63ad(0xbf),'command':a35_0x1f63ad(0xd2),'description':a35_0x1f63ad(0xcd),'risk':a35_0x1f63ad(0xbe),'flags':[{...ID_FLAG,'description':a35_0x1f63ad(0xba)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x26f8c9){const _0x25f55c=a35_0x1f63ad,_0x385606=_0x26f8c9[_0x25f55c(0xc2)]('id'),_0x19a8c5=buildUpdateInput(_0x26f8c9),_0x33837e=await updatePersonalBff(_0x385606,_0x26f8c9[_0x25f55c(0xda)],_0x19a8c5);return{'ok':!![],'data':detailBff(_0x33837e),'message':'Updated\x20personal\x20BFF\x20'+_0x33837e['id']+(_0x33837e['functionName']?'\x20('+_0x33837e[_0x25f55c(0xe1)]+')':'')};},async 'dryRun'(_0x47b5b5){const _0x48b530=a35_0x1f63ad,_0xad4344=_0x47b5b5[_0x48b530(0xc2)]('id'),_0xd6b18e=buildUpdateInput(_0x47b5b5);return dryRun(_0x48b530(0xea),_0x48b530(0xcb)+_0xad4344+'/update')[_0x48b530(0xf8)]({'appCode':_0x47b5b5[_0x48b530(0xda)],..._0xd6b18e})[_0x48b530(0xdd)](_0x48b530(0xfb)+_0xad4344)[_0x48b530(0xf4)]();}},personalBffExec={'service':a35_0x1f63ad(0xbf),'command':a35_0x1f63ad(0xc0),'description':a35_0x1f63ad(0xee),'risk':a35_0x1f63ad(0xed),'flags':[{...ID_FLAG,'description':a35_0x1f63ad(0xba)},{...PARAMS_FLAG,'description':a35_0x1f63ad(0xfe)}],async 'validate'(_0x3d102e){const _0x56ef4a=a35_0x1f63ad;parseExecParams(_0x3d102e[_0x56ef4a(0xb9)](_0x56ef4a(0xcc)));},async 'execute'(_0x2cfa24){const _0x12e865=a35_0x1f63ad,_0x1156de=_0x2cfa24[_0x12e865(0xc2)]('id'),_0x1fc9c2=parseExecParams(_0x2cfa24[_0x12e865(0xb9)](_0x12e865(0xcc))),_0x139edc=await executePersonalBff(_0x1156de,_0x2cfa24[_0x12e865(0xda)],_0x1fc9c2);return{'ok':!![],'data':{'result':_0x139edc},'message':_0x12e865(0xd9)+_0x1156de};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x171eec=a36_0x1fe6;(function(_0x13e0cc,_0x4a5bbf){const _0x1a9aa1=a36_0x1fe6,_0x13c5d3=_0x13e0cc();while(!![]){try{const _0x486e93=parseInt(_0x1a9aa1(0x180))/0x1+-parseInt(_0x1a9aa1(0x175))/0x2*(-parseInt(_0x1a9aa1(0x164))/0x3)+-parseInt(_0x1a9aa1(0x169))/0x4*(-parseInt(_0x1a9aa1(0x17c))/0x5)+parseInt(_0x1a9aa1(0x179))/0x6*(-parseInt(_0x1a9aa1(0x167))/0x7)+-parseInt(_0x1a9aa1(0x16e))/0x8+parseInt(_0x1a9aa1(0x16c))/0x9+parseInt(_0x1a9aa1(0x16d))/0xa;if(_0x486e93===_0x4a5bbf)break;else _0x13c5d3['push'](_0x13c5d3['shift']());}catch(_0x5a2e85){_0x13c5d3['push'](_0x13c5d3['shift']());}}}(a36_0x5765,0x5c9fc));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';function a36_0x1fe6(_0x47afda,_0x50a716){_0x47afda=_0x47afda-0x159;const _0x576579=a36_0x5765();let _0x1fe602=_0x576579[_0x47afda];return _0x1fe602;}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=[];function a36_0x5765(){const _0x2ace1e=['Instant\x20API','Agent\x20Schedules','2146131WOWSqd','5784810mCbCpH','5840832vJoPlc','service','read','get','install','Workspace','command','307778pcMWzo','Service\x20Tree','\x20\x20[write]','Knowledge\x20Base','65694YYBeoG','set','Artifacts','15SCRehO','CLI\x20Built-in\x20Skill','risk','show','280161WNGlPv','Skills','isSingleCommand','has','values','Logs','from','list','App\x20Management','Configuration','\x20\x20[high-risk-write]','push','File','Authentication','6dUIJLy','run','OCR','371wWnMWs','description','379880KHPJkk'];a36_0x5765=function(){return _0x2ace1e;};return a36_0x5765();}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x42cd07){const _0x1fa3b1=a36_0x1fe6;for(const _0x3749ae of _0x42cd07){definitions[_0x1fa3b1(0x17a)](_0x3749ae[_0x1fa3b1(0x16f)]+':'+_0x3749ae[_0x1fa3b1(0x174)],_0x3749ae);let _0x37243d=serviceGroups[_0x1fa3b1(0x171)](_0x3749ae[_0x1fa3b1(0x16f)]);!_0x37243d&&(_0x37243d=[],serviceGroups['set'](_0x3749ae[_0x1fa3b1(0x16f)],_0x37243d)),_0x37243d['push'](_0x3749ae);}}function registerService(_0x496b97,_0x3d8af8,_0x3114ea){const _0x1cee62=a36_0x1fe6;registerDefinitions(_0x3d8af8);const _0x4e80dc=_0x5e9115=>_0x5e9115===_0x1cee62(0x170)?'':_0x5e9115==='write'?_0x1cee62(0x177):_0x1cee62(0x160),_0x5ec0c8={'service':_0x3d8af8[0x0][_0x1cee62(0x16f)],'label':_0x496b97,'commands':_0x3d8af8['map'](_0x85608c=>({'command':_0x85608c[_0x1cee62(0x174)],'description':_0x85608c[_0x1cee62(0x168)],'tag':_0x4e80dc(_0x85608c[_0x1cee62(0x17e)])})),'defaultCommand':_0x3114ea?.['defaultCommand']??(_0x3114ea?.['isSingleCommand']?_0x3d8af8[0x0]['command']:undefined),'isSingleCommand':_0x3114ea?.[_0x1cee62(0x182)]};serviceRegistry[_0x1cee62(0x161)](_0x5ec0c8),serviceByName[_0x1cee62(0x17a)](_0x5ec0c8[_0x1cee62(0x16f)],_0x5ec0c8);}registerService(a36_0x171eec(0x163),authDefinitions,{'defaultCommand':'login'}),registerService(a36_0x171eec(0x15e),appDefinitions,{'defaultCommand':a36_0x171eec(0x15d)}),registerService(a36_0x171eec(0x173),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService(a36_0x171eec(0x15f),configDefinitions,{'defaultCommand':a36_0x171eec(0x15d)}),registerService('API\x20Documentation',apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a36_0x171eec(0x16a),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService(a36_0x171eec(0x17b),artifactDefinitions),registerService(a36_0x171eec(0x162),fileDefinitions),registerService(a36_0x171eec(0x166),ocrDefinitions),registerService(a36_0x171eec(0x178),kbDefinitions),registerService(a36_0x171eec(0x16b),scheduleDefinitions,{'defaultCommand':a36_0x171eec(0x15d)}),registerService(a36_0x171eec(0x176),serviceDefinitions,{'defaultCommand':a36_0x171eec(0x15d)}),registerService(a36_0x171eec(0x181),skillDefinitions,{'defaultCommand':a36_0x171eec(0x172)}),registerService(a36_0x171eec(0x17d),cliSkillDefinitions,{'defaultCommand':a36_0x171eec(0x172)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a36_0x171eec(0x165),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x171eec(0x15b),logsDefinitions,{'defaultCommand':a36_0x171eec(0x17f)});export function findDefinition(_0x50412f,_0x3b62bc){const _0x33ec29=a36_0x171eec;return definitions[_0x33ec29(0x171)](_0x50412f+':'+_0x3b62bc);}export function isKnownService(_0x4a5b60){const _0x5581ab=a36_0x171eec;return serviceByName[_0x5581ab(0x159)](_0x4a5b60);}export function getServiceEntry(_0x337ac4){const _0xb37f90=a36_0x171eec;return serviceByName[_0xb37f90(0x171)](_0x337ac4);}export function getAllDefinitions(){const _0x220447=a36_0x171eec;return Array[_0x220447(0x15c)](definitions[_0x220447(0x15a)]());}
1
+ const a36_0x332eec=a36_0x3cae;(function(_0x2c4dba,_0x37aa94){const _0x7b2d7d=a36_0x3cae,_0x176126=_0x2c4dba();while(!![]){try{const _0x27d39d=-parseInt(_0x7b2d7d(0x1ff))/0x1*(-parseInt(_0x7b2d7d(0x1fa))/0x2)+-parseInt(_0x7b2d7d(0x20a))/0x3+-parseInt(_0x7b2d7d(0x1fc))/0x4*(parseInt(_0x7b2d7d(0x20c))/0x5)+parseInt(_0x7b2d7d(0x211))/0x6*(parseInt(_0x7b2d7d(0x1f1))/0x7)+-parseInt(_0x7b2d7d(0x1f3))/0x8+parseInt(_0x7b2d7d(0x1fb))/0x9*(parseInt(_0x7b2d7d(0x215))/0xa)+parseInt(_0x7b2d7d(0x203))/0xb;if(_0x27d39d===_0x37aa94)break;else _0x176126['push'](_0x176126['shift']());}catch(_0x351eb2){_0x176126['push'](_0x176126['shift']());}}}(a36_0x401f,0xcee87));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';function a36_0x3cae(_0x553c0e,_0x2c9f9e){_0x553c0e=_0x553c0e-0x1f1;const _0x401f55=a36_0x401f();let _0x3caea6=_0x401f55[_0x553c0e];return _0x3caea6;}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=[];function a36_0x401f(){const _0x3f2286=['Logs','set','Instant\x20API','69562HRmXsp','963pjOFxZ','4xkXgXD','login','read','32ziTUIh','Datasets','risk','map','15067173NgHYNt','values','get','run','Skills','push','defaultCommand','2716485SEDTlD','App\x20Management','4864085opXlks','show','Diagnostics','Knowledge\x20Base','BFF\x20Scripts','45570JdQROB','CLI\x20Built-in\x20Skill','SQL\x20Queries','list','15790PGeuIj','Schema','description','write','from','isSingleCommand','357EPrPZm','command','2505808EESBiQ','install','service','Runtime\x20App\x20Config'];a36_0x401f=function(){return _0x3f2286;};return a36_0x401f();}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x5365cd){const _0x3d8dd9=a36_0x3cae;for(const _0x5d003a of _0x5365cd){definitions['set'](_0x5d003a['service']+':'+_0x5d003a[_0x3d8dd9(0x1f2)],_0x5d003a);let _0x4f3d79=serviceGroups[_0x3d8dd9(0x205)](_0x5d003a[_0x3d8dd9(0x1f5)]);!_0x4f3d79&&(_0x4f3d79=[],serviceGroups['set'](_0x5d003a['service'],_0x4f3d79)),_0x4f3d79[_0x3d8dd9(0x208)](_0x5d003a);}}function registerService(_0x1f2519,_0x29b605,_0x3c5a39){const _0x38ba72=a36_0x3cae;registerDefinitions(_0x29b605);const _0x571b80=_0x15f783=>_0x15f783===_0x38ba72(0x1fe)?'':_0x15f783===_0x38ba72(0x218)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x588d0c={'service':_0x29b605[0x0][_0x38ba72(0x1f5)],'label':_0x1f2519,'commands':_0x29b605[_0x38ba72(0x202)](_0x3fc9cf=>({'command':_0x3fc9cf[_0x38ba72(0x1f2)],'description':_0x3fc9cf[_0x38ba72(0x217)],'tag':_0x571b80(_0x3fc9cf[_0x38ba72(0x201)])})),'defaultCommand':_0x3c5a39?.[_0x38ba72(0x209)]??(_0x3c5a39?.[_0x38ba72(0x21a)]?_0x29b605[0x0][_0x38ba72(0x1f2)]:undefined),'isSingleCommand':_0x3c5a39?.['isSingleCommand']};serviceRegistry[_0x38ba72(0x208)](_0x588d0c),serviceByName[_0x38ba72(0x1f8)](_0x588d0c[_0x38ba72(0x1f5)],_0x588d0c);}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x332eec(0x1fd)}),registerService(a36_0x332eec(0x20b),appDefinitions,{'defaultCommand':a36_0x332eec(0x214)}),registerService('Workspace',workspaceDefinitions),registerService(a36_0x332eec(0x1f6),appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a36_0x332eec(0x214)}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x332eec(0x200),datasetDefinitions),registerService(a36_0x332eec(0x1f9),dataDefinitions),registerService(a36_0x332eec(0x213),sqlDefinitions),registerService(a36_0x332eec(0x210),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService('File',fileDefinitions),registerService('OCR',ocrDefinitions),registerService(a36_0x332eec(0x20f),kbDefinitions),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':a36_0x332eec(0x214)}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':a36_0x332eec(0x214)}),registerService(a36_0x332eec(0x207),skillDefinitions,{'defaultCommand':a36_0x332eec(0x1f4)}),registerService(a36_0x332eec(0x212),cliSkillDefinitions,{'defaultCommand':a36_0x332eec(0x1f4)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a36_0x332eec(0x206),'isSingleCommand':!![]}),registerService(a36_0x332eec(0x20e),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x332eec(0x216),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x332eec(0x1f7),logsDefinitions,{'defaultCommand':a36_0x332eec(0x20d)});export function findDefinition(_0x5f1b91,_0x543833){const _0x2da1cd=a36_0x332eec;return definitions[_0x2da1cd(0x205)](_0x5f1b91+':'+_0x543833);}export function isKnownService(_0xf76d13){return serviceByName['has'](_0xf76d13);}export function getServiceEntry(_0x4c2bf9){const _0x75a7e=a36_0x332eec;return serviceByName[_0x75a7e(0x205)](_0x4c2bf9);}export function getAllDefinitions(){const _0x249fa0=a36_0x332eec;return Array[_0x249fa0(0x219)](definitions[_0x249fa0(0x204)]());}
@@ -1 +1 @@
1
- const a37_0x5efa81=a37_0x57f1;(function(_0x436796,_0x5abc9b){const _0x3dbbfb=a37_0x57f1,_0x10c7c0=_0x436796();while(!![]){try{const _0x195665=parseInt(_0x3dbbfb(0xb1))/0x1*(parseInt(_0x3dbbfb(0x91))/0x2)+-parseInt(_0x3dbbfb(0x97))/0x3*(parseInt(_0x3dbbfb(0x95))/0x4)+-parseInt(_0x3dbbfb(0xa2))/0x5*(-parseInt(_0x3dbbfb(0xcc))/0x6)+-parseInt(_0x3dbbfb(0x88))/0x7+-parseInt(_0x3dbbfb(0x92))/0x8+parseInt(_0x3dbbfb(0xc5))/0x9+parseInt(_0x3dbbfb(0xca))/0xa*(parseInt(_0x3dbbfb(0xaa))/0xb);if(_0x195665===_0x5abc9b)break;else _0x10c7c0['push'](_0x10c7c0['shift']());}catch(_0x40b898){_0x10c7c0['push'](_0x10c7c0['shift']());}}}(a37_0x3e8f,0x68788));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_0x57f1(_0x28c83a,_0x3ed20f){_0x28c83a=_0x28c83a-0x88;const _0x3e8fd7=a37_0x3e8f();let _0x57f197=_0x3e8fd7[_0x28c83a];return _0x57f197;}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_0x5efa81(0xb7),'type':'string','required':!![],'enum':[a37_0x5efa81(0xa6),a37_0x5efa81(0xc8)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':'cron','type':'string','description':a37_0x5efa81(0x8c)},SCHEDULED_AT_FLAG={'name':a37_0x5efa81(0xa9),'type':a37_0x5efa81(0xae),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x5efa81(0xb6),'type':a37_0x5efa81(0xae),'required':!![],'description':a37_0x5efa81(0x8a)},PROMPT_FLAG={'name':a37_0x5efa81(0xa7),'type':a37_0x5efa81(0xae),'required':!![],'description':a37_0x5efa81(0xb0)},CHANNEL_FLAG={'name':a37_0x5efa81(0xbd),'type':a37_0x5efa81(0xae),'enum':[a37_0x5efa81(0x8b),a37_0x5efa81(0x98)],'default':a37_0x5efa81(0x98),'description':a37_0x5efa81(0x8f)},SCHEDULE_ID_FLAG={'name':a37_0x5efa81(0xc3),'type':a37_0x5efa81(0xae),'required':!![],'description':a37_0x5efa81(0xb9),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a37_0x5efa81(0x9a),'type':a37_0x5efa81(0x89),'default':0x14,'description':a37_0x5efa81(0xd0)},CURSOR_FLAG={'name':'cursor','type':'string','description':a37_0x5efa81(0xbf)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x3cb31d){const _0x45a483=a37_0x5efa81,_0x5aac14=_0x3cb31d[_0x45a483(0xac)](_0x45a483(0xb7)),_0x5bc459=_0x3cb31d[_0x45a483(0xac)](_0x45a483(0xb6))[_0x45a483(0xb2)](),_0xa111c3=_0x3cb31d[_0x45a483(0xac)](_0x45a483(0xa7))['trim'](),_0x2ffb61=_0x3cb31d['str'](_0x45a483(0xbd)),_0x3c7166=_0x3cb31d['str'](_0x45a483(0xbe)),_0x4d86c6=_0x3cb31d[_0x45a483(0xac)](_0x45a483(0xa9));if(!_0x5bc459)throw CliErrors[_0x45a483(0x99)](_0x45a483(0xc7));if(!_0xa111c3)throw CliErrors[_0x45a483(0x99)](_0x45a483(0x8e));if(_0x5aac14===_0x45a483(0xa6)){if(!_0x3c7166||_0x4d86c6)throw CliErrors['validation'](_0x45a483(0xb4));return{'kind':_0x5aac14,'timezone':_0x45a483(0xa5),'cron':_0x3c7166,'title':_0x5bc459,'prompt':_0xa111c3,'channel':_0x2ffb61};}if(_0x5aac14==='ONCE'){if(!_0x4d86c6||_0x3c7166)throw CliErrors[_0x45a483(0x99)](_0x45a483(0xa3));return{'kind':_0x5aac14,'timezone':_0x45a483(0xa5),'scheduledAt':_0x4d86c6,'title':_0x5bc459,'prompt':_0xa111c3,'channel':_0x2ffb61};}throw CliErrors[_0x45a483(0x99)](_0x45a483(0xaf));}function scheduleCollectionPath(_0x58ffae){const _0x3daa9f=a37_0x5efa81;return _0x3daa9f(0xc1)+encodeURIComponent(_0x58ffae)+_0x3daa9f(0x8d);}function a37_0x3e8f(){const _0xa1b693=['CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','title','kind','DELETE','Schedule\x20UUID','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Queued\x20Task\x20','\x20from\x20schedule\x20','channel','cron','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','num','/api/harness/apps/','body','schedule-id','POST','293670kvIMDM','appCode','--title\x20must\x20not\x20be\x20blank.','ONCE','scheduleId','3974470vBhzez','schedule','18LYqHaZ','high-risk-write','Preview:\x20run\x20schedule\x20','Schedule\x20input\x20is\x20valid','Page\x20size\x20from\x201\x20to\x20100','/run','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','build','run','4141879mLSxye','number','Schedule\x20title','auto','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','/schedules','--prompt\x20must\x20not\x20be\x20blank.','Task\x20channel:\x20auto\x20or\x20premium','create','913642kvaEzb','584360oiuDfC','cursor','read','4PPbZlm','description','761211CxftHP','premium','validation','limit','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','detail','Created\x20','list','delete','\x20immediately','\x20schedule\x20','103410nnDhgE','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','taskId','UTC','CRON','prompt','Deleted\x20schedule\x20','scheduled-at','22QsPPmK','validate','str','Show\x20one\x20schedule\x20by\x20schedule\x20ID','string','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','1NPpTzw','trim','length'];a37_0x3e8f=function(){return _0xa1b693;};return a37_0x3e8f();}function scheduleItemPath(_0x293602,_0x351300){return scheduleCollectionPath(_0x293602)+'/'+encodeURIComponent(_0x351300);}const scheduleValidate={'service':a37_0x5efa81(0xcb),'command':a37_0x5efa81(0xab),'description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a37_0x5efa81(0x94),'flags':INPUT_FLAGS,async 'validate'(_0x3131ab){readScheduleInput(_0x3131ab);},async 'execute'(_0x621a16){const _0x499713=a37_0x5efa81,_0x3246da=readScheduleInput(_0x621a16),_0x1a3b46=await validateRuntimeSchedule(_0x621a16[_0x499713(0xc6)],_0x3246da);return{'ok':!![],'data':_0x1a3b46,'message':_0x499713(0xcf)};}},scheduleCreate={'service':a37_0x5efa81(0xcb),'command':a37_0x5efa81(0x90),'description':a37_0x5efa81(0x9b),'risk':a37_0x5efa81(0xcd),'flags':INPUT_FLAGS,async 'validate'(_0x4683c4){readScheduleInput(_0x4683c4);},async 'execute'(_0x197d65){const _0x4e16db=a37_0x5efa81,_0x252fbd=readScheduleInput(_0x197d65),_0x3e96ff=await validateRuntimeSchedule(_0x197d65['appCode'],_0x252fbd),_0x2f13b9=await createRuntimeSchedule(_0x197d65['appCode'],_0x3e96ff);return{'ok':!![],'data':_0x2f13b9,'message':_0x4e16db(0x9d)+_0x2f13b9[_0x4e16db(0xb7)]+_0x4e16db(0xa1)+_0x2f13b9[_0x4e16db(0xc9)]};},async 'dryRun'(_0x18dfb0){const _0x5a33d7=a37_0x5efa81,_0x5b7ab8=readScheduleInput(_0x18dfb0);return dryRun(_0x5a33d7(0xc4),scheduleCollectionPath(_0x18dfb0[_0x5a33d7(0xc6)]))[_0x5a33d7(0xc2)](_0x5b7ab8)[_0x5a33d7(0x96)]('Preview:\x20create\x20an\x20Agent\x20schedule')[_0x5a33d7(0xd3)]();}},scheduleList={'service':'schedule','command':a37_0x5efa81(0x9e),'description':a37_0x5efa81(0xb5),'risk':a37_0x5efa81(0x94),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3ff31a){const _0x148405=a37_0x5efa81,_0x121089=_0x3ff31a[_0x148405(0xc0)](_0x148405(0x9a));if(!Number['isSafeInteger'](_0x121089)||_0x121089<0x1||_0x121089>0x64)throw CliErrors[_0x148405(0x99)](_0x148405(0xba));const _0x5300bf=_0x3ff31a[_0x148405(0xac)](_0x148405(0x93));if(_0x5300bf&&(_0x5300bf[_0x148405(0xb3)]>0x400||_0x5300bf[_0x148405(0xb2)]()!==_0x5300bf))throw CliErrors['validation']('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x4b505b){const _0x3fa18a=a37_0x5efa81,_0xf7b6c1=_0x4b505b[_0x3fa18a(0xac)](_0x3fa18a(0x93)),_0x4bc369=await listRuntimeSchedules(_0x4b505b[_0x3fa18a(0xc6)],{'limit':_0x4b505b[_0x3fa18a(0xc0)](_0x3fa18a(0x9a)),..._0xf7b6c1?{'cursor':_0xf7b6c1}:{}});return{'ok':!![],'data':_0x4bc369};}},scheduleDetail={'service':a37_0x5efa81(0xcb),'command':a37_0x5efa81(0x9c),'description':a37_0x5efa81(0xad),'risk':a37_0x5efa81(0x94),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x19a073){const _0x3afcd9=a37_0x5efa81,_0x47eec2=await getRuntimeSchedule(_0x19a073[_0x3afcd9(0xc6)],_0x19a073[_0x3afcd9(0xac)](_0x3afcd9(0xc3)));return{'ok':!![],'data':_0x47eec2};}},scheduleRun={'service':a37_0x5efa81(0xcb),'command':a37_0x5efa81(0xd4),'description':'Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','risk':a37_0x5efa81(0xcd),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x3682d7){const _0x580c79=a37_0x5efa81,_0x39d9c5=_0x3682d7[_0x580c79(0xac)](_0x580c79(0xc3)),_0x583880=await runRuntimeSchedule(_0x3682d7[_0x580c79(0xc6)],_0x39d9c5);return{'ok':!![],'data':_0x583880,'message':_0x580c79(0xbb)+_0x583880[_0x580c79(0xa4)]+_0x580c79(0xbc)+_0x39d9c5};},async 'dryRun'(_0x31cfcc){const _0x416090=a37_0x5efa81,_0x20c701=_0x31cfcc['str']('schedule-id');return dryRun(_0x416090(0xc4),scheduleItemPath(_0x31cfcc['appCode'],_0x20c701)+_0x416090(0xd1))[_0x416090(0x96)](_0x416090(0xce)+_0x20c701+_0x416090(0xa0))['build']();}},scheduleDelete={'service':'schedule','command':a37_0x5efa81(0x9f),'description':a37_0x5efa81(0xd2),'risk':'high-risk-write','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x658368){const _0x273d4d=a37_0x5efa81,_0x20f21b=_0x658368[_0x273d4d(0xac)]('schedule-id'),_0x3ed705=await deleteRuntimeSchedule(_0x658368['appCode'],_0x20f21b);return{'ok':!![],'data':_0x3ed705,'message':_0x273d4d(0xa8)+_0x20f21b};},async 'dryRun'(_0x2f4a9c){const _0x5a12a5=a37_0x5efa81,_0x2c2299=_0x2f4a9c[_0x5a12a5(0xac)]('schedule-id');return dryRun(_0x5a12a5(0xb8),scheduleItemPath(_0x2f4a9c[_0x5a12a5(0xc6)],_0x2c2299))[_0x5a12a5(0x96)]('Preview:\x20delete\x20schedule\x20'+_0x2c2299)[_0x5a12a5(0xd3)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a37_0x457e51=a37_0x2598;function a37_0x47b0(){const _0x214f9f=['isSafeInteger','1098525ZvtVLl','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','num','--title\x20must\x20not\x20be\x20blank.','cursor','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','schedule-id','read','kind','7669386ldZKZD','7222ozIMNH','taskId','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','string','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','940828uowhnU','7157313Cpkfva','str','validation','Schedule\x20UUID','Show\x20one\x20schedule\x20by\x20schedule\x20ID','\x20schedule\x20','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','/run','CRON','high-risk-write','Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','schedule','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','create','body','Schedule\x20kind:\x20CRON\x20or\x20ONCE','7gulgbl','length','DELETE','run','Queued\x20Task\x20','Task\x20channel:\x20auto\x20or\x20premium','scheduled-at','cron','1691144ZyfpWG','ONCE','2653980lqfPrn','/api/harness/apps/','Deleted\x20schedule\x20','124CtMwsY','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','--prompt\x20must\x20not\x20be\x20blank.','appCode','build','scheduleId','limit','POST','description','Preview:\x20delete\x20schedule\x20','\x20immediately','title','validate','UTC','channel','Page\x20size\x20from\x201\x20to\x20100','/schedules','detail','\x20from\x20schedule\x20','prompt','premium','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','Schedule\x20input\x20is\x20valid','trim','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','Preview:\x20run\x20schedule\x20','Preview:\x20create\x20an\x20Agent\x20schedule'];a37_0x47b0=function(){return _0x214f9f;};return a37_0x47b0();}function a37_0x2598(_0x174f8f,_0x51d14d){_0x174f8f=_0x174f8f-0x93;const _0x47b056=a37_0x47b0();let _0x25987e=_0x47b056[_0x174f8f];return _0x25987e;}(function(_0x256286,_0x500d71){const _0x131877=a37_0x2598,_0x3b93e1=_0x256286();while(!![]){try{const _0x8f5e5e=-parseInt(_0x131877(0xcd))/0x1*(parseInt(_0x131877(0xa6))/0x2)+-parseInt(_0x131877(0xc2))/0x3+parseInt(_0x131877(0xd2))/0x4+parseInt(_0x131877(0xa3))/0x5+-parseInt(_0x131877(0xcc))/0x6*(-parseInt(_0x131877(0x99))/0x7)+parseInt(_0x131877(0xa1))/0x8+-parseInt(_0x131877(0xd3))/0x9;if(_0x8f5e5e===_0x500d71)break;else _0x3b93e1['push'](_0x3b93e1['shift']());}catch(_0x306807){_0x3b93e1['push'](_0x3b93e1['shift']());}}}(a37_0x47b0,0x9dd1f));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';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_0x457e51(0xcb),'type':a37_0x457e51(0xd0),'required':!![],'enum':[a37_0x457e51(0xdb),'ONCE'],'description':a37_0x457e51(0x98)},CRON_FLAG={'name':'cron','type':a37_0x457e51(0xd0),'description':a37_0x457e51(0xd1)},SCHEDULED_AT_FLAG={'name':a37_0x457e51(0x9f),'type':a37_0x457e51(0xd0),'description':a37_0x457e51(0x95)},TITLE_FLAG={'name':'title','type':a37_0x457e51(0xd0),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a37_0x457e51(0xb9),'type':a37_0x457e51(0xd0),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},CHANNEL_FLAG={'name':a37_0x457e51(0xb4),'type':a37_0x457e51(0xd0),'enum':['auto',a37_0x457e51(0xba)],'default':a37_0x457e51(0xba),'description':a37_0x457e51(0x9e)},SCHEDULE_ID_FLAG={'name':a37_0x457e51(0xc9),'type':a37_0x457e51(0xd0),'required':!![],'description':a37_0x457e51(0xd6),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a37_0x457e51(0xac),'type':'number','default':0x14,'description':a37_0x457e51(0xb5)},CURSOR_FLAG={'name':a37_0x457e51(0xc6),'type':a37_0x457e51(0xd0),'description':a37_0x457e51(0xcf)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x3b7f1e){const _0x5a7822=a37_0x457e51,_0x3cb41b=_0x3b7f1e[_0x5a7822(0xd4)]('kind'),_0x585ec0=_0x3b7f1e[_0x5a7822(0xd4)](_0x5a7822(0xb1))['trim'](),_0x5ab739=_0x3b7f1e[_0x5a7822(0xd4)](_0x5a7822(0xb9))[_0x5a7822(0xbd)](),_0x529f99=_0x3b7f1e[_0x5a7822(0xd4)]('channel'),_0x32bc28=_0x3b7f1e[_0x5a7822(0xd4)](_0x5a7822(0xa0)),_0x323509=_0x3b7f1e[_0x5a7822(0xd4)](_0x5a7822(0x9f));if(!_0x585ec0)throw CliErrors[_0x5a7822(0xd5)](_0x5a7822(0xc5));if(!_0x5ab739)throw CliErrors[_0x5a7822(0xd5)](_0x5a7822(0xa8));if(_0x3cb41b===_0x5a7822(0xdb)){if(!_0x32bc28||_0x323509)throw CliErrors[_0x5a7822(0xd5)](_0x5a7822(0xa7));return{'kind':_0x3cb41b,'timezone':_0x5a7822(0xb3),'cron':_0x32bc28,'title':_0x585ec0,'prompt':_0x5ab739,'channel':_0x529f99};}if(_0x3cb41b===_0x5a7822(0xa2)){if(!_0x323509||_0x32bc28)throw CliErrors[_0x5a7822(0xd5)]('ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.');return{'kind':_0x3cb41b,'timezone':_0x5a7822(0xb3),'scheduledAt':_0x323509,'title':_0x585ec0,'prompt':_0x5ab739,'channel':_0x529f99};}throw CliErrors[_0x5a7822(0xd5)](_0x5a7822(0xc8));}function scheduleCollectionPath(_0x19039c){const _0x2b66c8=a37_0x457e51;return _0x2b66c8(0xa4)+encodeURIComponent(_0x19039c)+_0x2b66c8(0xb6);}function scheduleItemPath(_0x130e9e,_0x247907){return scheduleCollectionPath(_0x130e9e)+'/'+encodeURIComponent(_0x247907);}const scheduleValidate={'service':a37_0x457e51(0x94),'command':a37_0x457e51(0xb2),'description':a37_0x457e51(0xbe),'risk':a37_0x457e51(0xca),'flags':INPUT_FLAGS,async 'validate'(_0x4f1bd4){readScheduleInput(_0x4f1bd4);},async 'execute'(_0x2b16d3){const _0x1e461d=a37_0x457e51,_0x3f0e9f=readScheduleInput(_0x2b16d3),_0x4c6fa6=await validateRuntimeSchedule(_0x2b16d3[_0x1e461d(0xa9)],_0x3f0e9f);return{'ok':!![],'data':_0x4c6fa6,'message':_0x1e461d(0xbc)};}},scheduleCreate={'service':a37_0x457e51(0x94),'command':a37_0x457e51(0x96),'description':a37_0x457e51(0xc7),'risk':a37_0x457e51(0xdc),'flags':INPUT_FLAGS,async 'validate'(_0x165651){readScheduleInput(_0x165651);},async 'execute'(_0x21e7f3){const _0x203f3d=a37_0x457e51,_0x17f505=readScheduleInput(_0x21e7f3),_0x467230=await validateRuntimeSchedule(_0x21e7f3[_0x203f3d(0xa9)],_0x17f505),_0x5599f1=await createRuntimeSchedule(_0x21e7f3[_0x203f3d(0xa9)],_0x467230);return{'ok':!![],'data':_0x5599f1,'message':'Created\x20'+_0x5599f1[_0x203f3d(0xcb)]+_0x203f3d(0xd8)+_0x5599f1[_0x203f3d(0xab)]};},async 'dryRun'(_0x43b7b1){const _0x505779=a37_0x457e51,_0x26ba7f=readScheduleInput(_0x43b7b1);return dryRun('POST',scheduleCollectionPath(_0x43b7b1[_0x505779(0xa9)]))[_0x505779(0x97)](_0x26ba7f)[_0x505779(0xae)](_0x505779(0xc0))[_0x505779(0xaa)]();}},scheduleList={'service':a37_0x457e51(0x94),'command':'list','description':a37_0x457e51(0xd9),'risk':'read','flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x47afc4){const _0x33bcf2=a37_0x457e51,_0x37c6aa=_0x47afc4['num']('limit');if(!Number[_0x33bcf2(0xc1)](_0x37c6aa)||_0x37c6aa<0x1||_0x37c6aa>0x64)throw CliErrors[_0x33bcf2(0xd5)](_0x33bcf2(0xc3));const _0x2f90c2=_0x47afc4['str'](_0x33bcf2(0xc6));if(_0x2f90c2&&(_0x2f90c2[_0x33bcf2(0x9a)]>0x400||_0x2f90c2['trim']()!==_0x2f90c2))throw CliErrors['validation'](_0x33bcf2(0xbb));},async 'execute'(_0x29f113){const _0x3283f6=a37_0x457e51,_0x387267=_0x29f113['str'](_0x3283f6(0xc6)),_0x3e0a1d=await listRuntimeSchedules(_0x29f113[_0x3283f6(0xa9)],{'limit':_0x29f113[_0x3283f6(0xc4)](_0x3283f6(0xac)),..._0x387267?{'cursor':_0x387267}:{}});return{'ok':!![],'data':_0x3e0a1d};}},scheduleDetail={'service':a37_0x457e51(0x94),'command':a37_0x457e51(0xb7),'description':a37_0x457e51(0xd7),'risk':a37_0x457e51(0xca),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x41b715){const _0x36836d=a37_0x457e51,_0x18dd89=await getRuntimeSchedule(_0x41b715[_0x36836d(0xa9)],_0x41b715[_0x36836d(0xd4)](_0x36836d(0xc9)));return{'ok':!![],'data':_0x18dd89};}},scheduleRun={'service':'schedule','command':a37_0x457e51(0x9c),'description':a37_0x457e51(0x93),'risk':a37_0x457e51(0xdc),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1fbd7d){const _0x7b5b11=a37_0x457e51,_0x55accb=_0x1fbd7d['str'](_0x7b5b11(0xc9)),_0x504e8f=await runRuntimeSchedule(_0x1fbd7d['appCode'],_0x55accb);return{'ok':!![],'data':_0x504e8f,'message':_0x7b5b11(0x9d)+_0x504e8f[_0x7b5b11(0xce)]+_0x7b5b11(0xb8)+_0x55accb};},async 'dryRun'(_0x47813){const _0x2dbac5=a37_0x457e51,_0x5840d7=_0x47813['str'](_0x2dbac5(0xc9));return dryRun(_0x2dbac5(0xad),scheduleItemPath(_0x47813['appCode'],_0x5840d7)+_0x2dbac5(0xda))['description'](_0x2dbac5(0xbf)+_0x5840d7+_0x2dbac5(0xb0))[_0x2dbac5(0xaa)]();}},scheduleDelete={'service':a37_0x457e51(0x94),'command':'delete','description':'Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','risk':a37_0x457e51(0xdc),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x590a6a){const _0x1083de=a37_0x457e51,_0x400652=_0x590a6a[_0x1083de(0xd4)](_0x1083de(0xc9)),_0xb8371e=await deleteRuntimeSchedule(_0x590a6a[_0x1083de(0xa9)],_0x400652);return{'ok':!![],'data':_0xb8371e,'message':_0x1083de(0xa5)+_0x400652};},async 'dryRun'(_0x3038fa){const _0x20215d=a37_0x457e51,_0x4a563a=_0x3038fa[_0x20215d(0xd4)](_0x20215d(0xc9));return dryRun(_0x20215d(0x9b),scheduleItemPath(_0x3038fa[_0x20215d(0xa9)],_0x4a563a))[_0x20215d(0xae)](_0x20215d(0xaf)+_0x4a563a)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a38_0x1b3536=a38_0x4e4c;function a38_0x4e4c(_0x547652,_0x455fc6){_0x547652=_0x547652-0xae;const _0x497b6a=a38_0x497b();let _0x4e4c00=_0x497b6a[_0x547652];return _0x4e4c00;}function a38_0x497b(){const _0x31723c=['Export\x20machine-readable\x20command\x20schema\x20(JSON)','export','3691128QtOncp','9YDNvmT','4138296VIbuTp','1358096nnGoke','5evEbXt','7vdUYQC','6209514CMHfzr','schema','1369772XOcZHu','1256681ByPEHB','37213180uEKWxG'];a38_0x497b=function(){return _0x31723c;};return a38_0x497b();}(function(_0x5ae01e,_0xe01728){const _0xea803=a38_0x4e4c,_0x529fe8=_0x5ae01e();while(!![]){try{const _0x4657d7=-parseInt(_0xea803(0xb8))/0x1+-parseInt(_0xea803(0xb7))/0x2+-parseInt(_0xea803(0xaf))/0x3+parseInt(_0xea803(0xb2))/0x4*(-parseInt(_0xea803(0xb3))/0x5)+parseInt(_0xea803(0xb5))/0x6+parseInt(_0xea803(0xb4))/0x7*(-parseInt(_0xea803(0xb1))/0x8)+-parseInt(_0xea803(0xb0))/0x9*(-parseInt(_0xea803(0xb9))/0xa);if(_0x4657d7===_0xe01728)break;else _0x529fe8['push'](_0x529fe8['shift']());}catch(_0x344c21){_0x529fe8['push'](_0x529fe8['shift']());}}}(a38_0x497b,0xb19bb));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x36cc45){const _0x28e414=await buildSchemaPayload();return{'ok':!![],'data':_0x28e414};}export const schemaDefinition={'service':a38_0x1b3536(0xb6),'command':a38_0x1b3536(0xae),'description':a38_0x1b3536(0xba),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ const a38_0x49483c=a38_0x6f18;(function(_0x35a7c6,_0x65b434){const _0x564db1=a38_0x6f18,_0x138abe=_0x35a7c6();while(!![]){try{const _0x51c1da=parseInt(_0x564db1(0x183))/0x1*(parseInt(_0x564db1(0x186))/0x2)+parseInt(_0x564db1(0x188))/0x3*(parseInt(_0x564db1(0x18a))/0x4)+-parseInt(_0x564db1(0x18c))/0x5+-parseInt(_0x564db1(0x181))/0x6+-parseInt(_0x564db1(0x189))/0x7*(parseInt(_0x564db1(0x185))/0x8)+parseInt(_0x564db1(0x184))/0x9*(parseInt(_0x564db1(0x18b))/0xa)+parseInt(_0x564db1(0x182))/0xb;if(_0x51c1da===_0x65b434)break;else _0x138abe['push'](_0x138abe['shift']());}catch(_0x4f9e98){_0x138abe['push'](_0x138abe['shift']());}}}(a38_0x4889,0x5de40));function a38_0x4889(){const _0x4198ce=['1265157SeZtTL','16Bcsrgl','297226qnkPsf','Export\x20machine-readable\x20command\x20schema\x20(JSON)','33MCAVvk','1994587ciCyVG','152068DUgWLR','20MeeETq','3808350tXxGpx','export','3860676JBPBrp','16627908ItVpGq','1mtFeyp'];a38_0x4889=function(){return _0x4198ce;};return a38_0x4889();}import{buildSchemaPayload}from'../framework/schema-export.js';function a38_0x6f18(_0x40a673,_0x47ea8b){_0x40a673=_0x40a673-0x180;const _0x488944=a38_0x4889();let _0x6f1878=_0x488944[_0x40a673];return _0x6f1878;}async function execute(_0x1d0d30){const _0x12ed67=await buildSchemaPayload();return{'ok':!![],'data':_0x12ed67};}export const schemaDefinition={'service':'schema','command':a38_0x49483c(0x180),'description':a38_0x49483c(0x187),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};