@lovrabet/lovrabet-cli 2.1.18-beta.3 → 2.1.18

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 (126) 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/response.js +1 -1
  90. package/lib/framework/runner-confirmation.js +1 -1
  91. package/lib/framework/runner-error.js +1 -1
  92. package/lib/framework/runner.js +1 -1
  93. package/lib/framework/schema-export.js +1 -1
  94. package/lib/framework/service-order.js +1 -1
  95. package/lib/framework/types.js +1 -1
  96. package/lib/generated/build-info.d.ts +3 -3
  97. package/lib/generated/build-info.js +1 -1
  98. package/lib/help.js +1 -1
  99. package/lib/runtime/event.js +1 -1
  100. package/lib/runtime/index.js +1 -1
  101. package/lib/runtime/queue.js +1 -1
  102. package/lib/runtime/resolve.js +1 -1
  103. package/lib/skills/npx-skills-add.js +1 -1
  104. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  105. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  106. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  107. package/lib/skills/runtime-skill-sync/links.js +1 -1
  108. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  109. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  110. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  111. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  112. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  113. package/lib/skills/runtime-skill-sync/push.js +1 -1
  114. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  115. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  116. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  117. package/lib/skills/runtime-skill-sync.js +1 -1
  118. package/lib/utils/apply-jq-filter.js +1 -1
  119. package/lib/utils/logger.js +1 -1
  120. package/lib/utils/lossless-json.js +1 -1
  121. package/lib/utils/params.js +1 -1
  122. package/lib/utils/platform.js +1 -1
  123. package/lib/utils/update-notice.js +1 -1
  124. package/lib/utils/version.js +1 -1
  125. package/lib/utils/write-cli-side-channel.js +1 -1
  126. package/package.json +1 -1
@@ -1 +1 @@
1
- const a29_0xcc3f2f=a29_0x5986;(function(_0x4762a1,_0x4de2f0){const _0x37dd45=a29_0x5986,_0x169918=_0x4762a1();while(!![]){try{const _0x4d8de0=-parseInt(_0x37dd45(0x19c))/0x1*(parseInt(_0x37dd45(0x194))/0x2)+-parseInt(_0x37dd45(0x1ca))/0x3+parseInt(_0x37dd45(0x1c8))/0x4+parseInt(_0x37dd45(0x196))/0x5*(parseInt(_0x37dd45(0x1b9))/0x6)+-parseInt(_0x37dd45(0x18e))/0x7+-parseInt(_0x37dd45(0x1ac))/0x8*(parseInt(_0x37dd45(0x1c6))/0x9)+parseInt(_0x37dd45(0x1d5))/0xa;if(_0x4d8de0===_0x4de2f0)break;else _0x169918['push'](_0x169918['shift']());}catch(_0x233957){_0x169918['push'](_0x169918['shift']());}}}(a29_0x2786,0x57985));import a29_0x3efa2d from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x55e0e1){const _0x48683f=a29_0x5986,_0x14e1e8=getCliVersion(),_0x1178fc=buildConfigFromFlags({});await initGlobalEnvironment(_0x1178fc),console['log'](),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1b5)](CLI_BIN_NAME+'\x20doctor')),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1a0)]('─'[_0x48683f(0x1c9)](0x32))),console[_0x48683f(0x1a7)](_0x48683f(0x1a5)+_0x14e1e8),console[_0x48683f(0x1a7)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x48683f(0x1cd)]),console[_0x48683f(0x1a7)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x48683f(0x1a3)]+'\x20'+process[_0x48683f(0x1ab)]),console['log'](),console[_0x48683f(0x1a7)](a29_0x3efa2d['bold'](_0x48683f(0x1b3))),console[_0x48683f(0x1a7)](a29_0x3efa2d['gray']('\x20\x20─'[_0x48683f(0x1c9)](0x1e)));const _0x464163=getGlobalConfigPath(),_0x364827=getProjectConfigPath();console['log'](_0x48683f(0x1d7)+(_0x464163||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b6)))),console[_0x48683f(0x1a7)](_0x48683f(0x197)+(_0x364827||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b6)))),console[_0x48683f(0x1a7)](),console[_0x48683f(0x1a7)](a29_0x3efa2d['bold'](_0x48683f(0x1b4))),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1a0)]('\x20\x20─'[_0x48683f(0x1c9)](0x1e)));const _0x43c030=(_0x266706,_0x33d71a)=>{const _0x27e42a=_0x48683f;if(!_0x33d71a){console['log']('\x20\x20'+_0x266706[_0x27e42a(0x1b8)](0x11)+'\x20'+a29_0x3efa2d[_0x27e42a(0x1a0)](_0x27e42a(0x1cc)));return;}const _0x2bcb63=inspectCliConfigJsonFile(_0x33d71a);if(_0x2bcb63['status']==='ok')console[_0x27e42a(0x1a7)]('\x20\x20'+_0x266706['padEnd'](0x11)+'\x20'+a29_0x3efa2d[_0x27e42a(0x1cb)](_0x27e42a(0x1aa)));else{if(_0x2bcb63['status']===_0x27e42a(0x1be))console[_0x27e42a(0x1a7)]('\x20\x20'+_0x266706['padEnd'](0x11)+'\x20'+a29_0x3efa2d[_0x27e42a(0x1ce)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x2bcb63['status']===_0x27e42a(0x19e)?console['log']('\x20\x20'+_0x266706[_0x27e42a(0x1b8)](0x11)+'\x20'+a29_0x3efa2d['gray'](_0x27e42a(0x1dc))):(console['log']('\x20\x20'+_0x266706[_0x27e42a(0x1b8)](0x11)+'\x20'+a29_0x3efa2d[_0x27e42a(0x191)](_0x27e42a(0x1bd))),console['log']('\x20\x20'+''[_0x27e42a(0x1b8)](0x11)+'\x20'+a29_0x3efa2d['red'](_0x2bcb63['message'])));}};_0x43c030('Global',_0x464163),_0x43c030(_0x48683f(0x1c3),_0x364827),console[_0x48683f(0x1a7)](),console['log'](a29_0x3efa2d[_0x48683f(0x1b5)](_0x48683f(0x18f))),console['log'](a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1da)[_0x48683f(0x1c9)](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1178fc[_0x48683f(0x1c5)]||a29_0x3efa2d[_0x48683f(0x191)]('(not\x20set)'))),console['log'](_0x48683f(0x199)+_0x1178fc['env']);const _0x26b436=isLegacyCompatConfigKey(_0x48683f(0x1bf))?a29_0x3efa2d[_0x48683f(0x1a0)](_0x1178fc[_0x48683f(0x1bf)]+_0x48683f(0x19a)):_0x1178fc[_0x48683f(0x1bf)];console[_0x48683f(0x1a7)](_0x48683f(0x1b0)+_0x26b436),console['log']('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x1178fc['defaultApp']||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b2)))),console[_0x48683f(0x1a7)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x1178fc[_0x48683f(0x1ba)]||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b2)))),console['log'](_0x48683f(0x1c0)+(_0x1178fc[_0x48683f(0x1cf)]||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1d6)+DEFAULT_CONFIG_VALUES[_0x48683f(0x1cf)]+')'))),console['log'](_0x48683f(0x1d2)+(_0x1178fc['pageSize']??a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x198)))),console['log'](_0x48683f(0x1a8)+_0x1178fc[_0x48683f(0x195)]),console[_0x48683f(0x1a7)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1178fc['verbose']),console['log']('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x48683f(0x1a2)]),console[_0x48683f(0x1a7)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x1178fc[_0x48683f(0x192)]?a29_0x3efa2d[_0x48683f(0x1cb)](_0x48683f(0x190)+_0x1178fc[_0x48683f(0x192)][_0x48683f(0x1af)]+')'):a29_0x3efa2d[_0x48683f(0x1a0)]('(none)'))),console[_0x48683f(0x1a7)](),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1b5)]('\x20\x20API\x20Endpoints')),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1a0)]('\x20\x20─'[_0x48683f(0x1c9)](0x1e))),console['log'](_0x48683f(0x1d4)+getApiDomain()),console[_0x48683f(0x1a7)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x48683f(0x1a7)](_0x48683f(0x19b)+getRuntimeDomain()),console[_0x48683f(0x1a7)](),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1b5)](_0x48683f(0x1bb))),console['log'](a29_0x3efa2d[_0x48683f(0x1a0)]('\x20\x20─'['repeat'](0x1e)));const _0x5dbf0e=inspectServiceRegistry();console[_0x48683f(0x1a7)](_0x48683f(0x1ae)+_0x5dbf0e['registryPath']),console['log'](_0x48683f(0x1c7)+formatServiceRegistryStatus(_0x5dbf0e)),console[_0x48683f(0x1a7)](_0x48683f(0x1c1)+_0x5dbf0e['serviceCount']),console[_0x48683f(0x1a7)](_0x48683f(0x1ad)+_0x5dbf0e['commandCount']);for(const _0x160d24 of _0x5dbf0e['services']){console['log']('\x20\x20'+(_0x160d24[_0x48683f(0x1d8)]+':')[_0x48683f(0x1b8)](0x11)+'\x20'+(_0x160d24['name']||a29_0x3efa2d['gray'](_0x48683f(0x1d9)))+'\x20('+_0x160d24[_0x48683f(0x19d)]+_0x48683f(0x1a1)),console[_0x48683f(0x1a7)]('\x20\x20'+''[_0x48683f(0x1b8)](0x11)+'\x20Imported\x20from:\x20'+_0x160d24[_0x48683f(0x1d3)][_0x48683f(0x1c4)]);}return console[_0x48683f(0x1a7)](),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1b5)]('\x20\x20Auth')),console['log'](a29_0x3efa2d['gray'](_0x48683f(0x1da)[_0x48683f(0x1c9)](0x1e))),console[_0x48683f(0x1a7)](_0x48683f(0x1d0)+a29_0x3efa2d[_0x48683f(0x1cb)](AUTH_MODE['ClientAk']+_0x48683f(0x1a9))),console[_0x48683f(0x1a7)](_0x48683f(0x193)+a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b1))),console[_0x48683f(0x1a7)](),{'ok':!![]};}function a29_0x5986(_0x5f54c1,_0x478b34){_0x5f54c1=_0x5f54c1-0x18e;const _0x2786d3=a29_0x2786();let _0x598635=_0x2786d3[_0x5f54c1];return _0x598635;}function formatServiceRegistryStatus(_0x5c8e62){const _0x3642bf=a29_0x5986;if(_0x5c8e62[_0x3642bf(0x1bc)]==='ok')return a29_0x3efa2d[_0x3642bf(0x1cb)](_0x3642bf(0x1d1));if(_0x5c8e62[_0x3642bf(0x1bc)]===_0x3642bf(0x19e))return a29_0x3efa2d[_0x3642bf(0x1a0)](_0x3642bf(0x1b6));if(_0x5c8e62[_0x3642bf(0x1bc)]===_0x3642bf(0x1be))return a29_0x3efa2d[_0x3642bf(0x1ce)](_0x3642bf(0x19f));return a29_0x3efa2d[_0x3642bf(0x191)](_0x3642bf(0x1c2)+(_0x5c8e62[_0x3642bf(0x1b7)]?':\x20'+_0x5c8e62[_0x3642bf(0x1b7)]:''));}function a29_0x2786(){const _0x53f01e=['\x20\x20runtimeDomain:\x20\x20\x20','646791cHaUtl','commandCount','missing','⚠\x20Empty','gray','\x20commands)','ClientAk','platform','check','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','doctor','log','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','✓\x20Valid\x20JSON','arch','20152hdamAS','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','(none)','\x20\x20Config\x20Files','\x20\x20Config\x20JSON','bold','(not\x20found)','message','padEnd','98682bUGPCV','currentApp','\x20\x20Service\x20Tree','status','✗\x20Invalid\x20JSON','empty','locale','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','Project','path','appCode','1089OjENlF','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1155988VIjymN','repeat','1173576kvIrpD','green','(no\x20file)','version','yellow','format','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Loaded','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','source','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','16837560lVBUyo','(default:\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCode','(unnamed)','\x20\x20─','read','(missing)','4431112lsPebI','\x20\x20Merged\x20Config','(set,\x20length=','red','accessKey','\x20\x20Session\x20check:\x20\x20\x20','2vXzTNz','riskLevel','110HyusUB','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(legacy/compat\x20only)'];a29_0x2786=function(){return _0x53f01e;};return a29_0x2786();}export const doctorDefinition={'service':a29_0xcc3f2f(0x1a6),'command':a29_0xcc3f2f(0x1a4),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a29_0xcc3f2f(0x1db),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ function a29_0x529c(_0x520340,_0x59ee66){_0x520340=_0x520340-0x1db;const _0x5c68ae=a29_0x5c68();let _0x529c50=_0x5c68ae[_0x520340];return _0x529c50;}const a29_0x4afd91=a29_0x529c;function a29_0x5c68(){const _0x3c73b7=['\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','source','✓\x20Loaded','(none)','\x20\x20Service\x20Tree','⚠\x20Empty','doctor','(default)','services','(missing)','910188esgRye','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','\x20Imported\x20from:\x20','(default:\x20','2183435KGZJAf','✗\x20Invalid\x20JSON','Global','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1081884FKlHcv','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','502341UwqFLE','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','appCode','\x20commands)','\x20(legacy/compat\x20only)','✗\x20Invalid','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','read','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','pageSize','(unnamed)','path','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','repeat','bold','(no\x20file)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','currentApp','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','status','63000Dpgcvu','log','14104539buYxaf','name','green','16fANipP','serviceCount','1910774bFsIKA','\x20\x20auth\x20(effective):\x20','\x20\x20Config\x20Files','accessKey','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','(set,\x20length=','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','Project','\x20\x20─','locale','format','(not\x20set)','empty','\x20\x20Auth','serviceCode','18oRRPbT','ClientAk','\x20\x20Merged\x20Config','gray','env','red','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a29_0x5c68=function(){return _0x3c73b7;};return a29_0x5c68();}(function(_0x46b50c,_0x4bba48){const _0xe4224b=a29_0x529c,_0x49c347=_0x46b50c();while(!![]){try{const _0x2ce010=-parseInt(_0xe4224b(0x20f))/0x1+-parseInt(_0xe4224b(0x1ed))/0x2+-parseInt(_0xe4224b(0x21a))/0x3+parseInt(_0xe4224b(0x1e6))/0x4+-parseInt(_0xe4224b(0x216))/0x5+parseInt(_0xe4224b(0x1fe))/0x6*(parseInt(_0xe4224b(0x21c))/0x7)+parseInt(_0xe4224b(0x1eb))/0x8*(parseInt(_0xe4224b(0x1e8))/0x9);if(_0x2ce010===_0x4bba48)break;else _0x49c347['push'](_0x49c347['shift']());}catch(_0x2ebbf7){_0x49c347['push'](_0x49c347['shift']());}}}(a29_0x5c68,0xab81b));import a29_0x39ca70 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0xaf2564){const _0x291883=a29_0x529c,_0xe66124=getCliVersion(),_0x5f24f7=buildConfigFromFlags({});await initGlobalEnvironment(_0x5f24f7),console[_0x291883(0x1e7)](),console['log'](a29_0x39ca70[_0x291883(0x1dc)](CLI_BIN_NAME+'\x20doctor')),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x201)]('─'[_0x291883(0x1db)](0x32))),console[_0x291883(0x1e7)](_0x291883(0x205)+_0xe66124),console['log'](_0x291883(0x219)+process['version']),console[_0x291883(0x1e7)](_0x291883(0x22d)+process['platform']+'\x20'+process['arch']),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x1dc)](_0x291883(0x1ef))),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)[_0x291883(0x1db)](0x1e)));const _0x500ab2=getGlobalConfigPath(),_0x4e9278=getProjectConfigPath();console[_0x291883(0x1e7)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x500ab2||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1e2)))),console[_0x291883(0x1e7)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4e9278||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1e2)))),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x1dc)]('\x20\x20Config\x20JSON')),console['log'](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)['repeat'](0x1e)));const _0x2ee046=(_0xda87f,_0x2272ff)=>{const _0x272c4e=_0x291883;if(!_0x2272ff){console[_0x272c4e(0x1e7)]('\x20\x20'+_0xda87f[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x201)](_0x272c4e(0x1dd)));return;}const _0x591a89=inspectCliConfigJsonFile(_0x2272ff);if(_0x591a89[_0x272c4e(0x1e5)]==='ok')console['log']('\x20\x20'+_0xda87f['padEnd'](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x1ea)](_0x272c4e(0x1e0)));else{if(_0x591a89[_0x272c4e(0x1e5)]==='empty')console[_0x272c4e(0x1e7)]('\x20\x20'+_0xda87f[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x213)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x591a89['status']==='missing'?console[_0x272c4e(0x1e7)]('\x20\x20'+_0xda87f[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70['gray'](_0x272c4e(0x20e))):(console[_0x272c4e(0x1e7)]('\x20\x20'+_0xda87f[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x203)](_0x272c4e(0x217))),console[_0x272c4e(0x1e7)]('\x20\x20'+''[_0x272c4e(0x1f2)](0x11)+'\x20'+a29_0x39ca70[_0x272c4e(0x203)](_0x591a89[_0x272c4e(0x227)])));}};_0x2ee046(_0x291883(0x218),_0x500ab2),_0x2ee046(_0x291883(0x1f6),_0x4e9278),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x1dc)](_0x291883(0x200))),console['log'](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)[_0x291883(0x1db)](0x1e))),console[_0x291883(0x1e7)](_0x291883(0x1df)+(_0x5f24f7[_0x291883(0x21e)]||a29_0x39ca70[_0x291883(0x203)](_0x291883(0x1fa)))),console['log'](_0x291883(0x204)+_0x5f24f7[_0x291883(0x202)]);const _0x225307=isLegacyCompatConfigKey(_0x291883(0x1f8))?a29_0x39ca70[_0x291883(0x201)](_0x5f24f7['locale']+_0x291883(0x220)):_0x5f24f7[_0x291883(0x1f8)];console[_0x291883(0x1e7)](_0x291883(0x226)+_0x225307),console[_0x291883(0x1e7)](_0x291883(0x22f)+(_0x5f24f7['defaultApp']||a29_0x39ca70['gray'](_0x291883(0x208)))),console['log'](_0x291883(0x1f4)+(_0x5f24f7[_0x291883(0x1e3)]||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x208)))),console[_0x291883(0x1e7)](_0x291883(0x222)+(_0x5f24f7[_0x291883(0x1f9)]||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x215)+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0x291883(0x1de)+(_0x5f24f7[_0x291883(0x22a)]??a29_0x39ca70[_0x291883(0x201)](_0x291883(0x20c)))),console[_0x291883(0x1e7)](_0x291883(0x229)+_0x5f24f7['riskLevel']),console['log'](_0x291883(0x225)+_0x5f24f7['verbose']),console['log'](_0x291883(0x1ee)+AUTH_MODE[_0x291883(0x1ff)]),console[_0x291883(0x1e7)](_0x291883(0x1e1)+(_0x5f24f7[_0x291883(0x1f0)]?a29_0x39ca70[_0x291883(0x1ea)](_0x291883(0x1f3)+_0x5f24f7[_0x291883(0x1f0)]['length']+')'):a29_0x39ca70[_0x291883(0x201)](_0x291883(0x208)))),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x1dc)](_0x291883(0x22e))),console[_0x291883(0x1e7)](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)[_0x291883(0x1db)](0x1e))),console[_0x291883(0x1e7)](_0x291883(0x223)+getApiDomain()),console['log'](_0x291883(0x21d)+getUserDomain()),console[_0x291883(0x1e7)](_0x291883(0x210)+getRuntimeDomain()),console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70['bold'](_0x291883(0x209))),console['log'](a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f7)[_0x291883(0x1db)](0x1e)));const _0xe4dedc=inspectServiceRegistry();console[_0x291883(0x1e7)](_0x291883(0x1e4)+_0xe4dedc['registryPath']),console[_0x291883(0x1e7)](_0x291883(0x211)+formatServiceRegistryStatus(_0xe4dedc)),console[_0x291883(0x1e7)](_0x291883(0x21b)+_0xe4dedc[_0x291883(0x1ec)]),console[_0x291883(0x1e7)](_0x291883(0x1f1)+_0xe4dedc['commandCount']);for(const _0x49ae5a of _0xe4dedc[_0x291883(0x20d)]){console['log']('\x20\x20'+(_0x49ae5a[_0x291883(0x1fd)]+':')[_0x291883(0x1f2)](0x11)+'\x20'+(_0x49ae5a[_0x291883(0x1e9)]||a29_0x39ca70[_0x291883(0x201)](_0x291883(0x22b)))+'\x20('+_0x49ae5a['commandCount']+_0x291883(0x21f)),console[_0x291883(0x1e7)]('\x20\x20'+''[_0x291883(0x1f2)](0x11)+_0x291883(0x214)+_0x49ae5a[_0x291883(0x206)][_0x291883(0x22c)]);}return console[_0x291883(0x1e7)](),console[_0x291883(0x1e7)](a29_0x39ca70['bold'](_0x291883(0x1fc))),console[_0x291883(0x1e7)](a29_0x39ca70['gray']('\x20\x20─'['repeat'](0x1e))),console['log'](_0x291883(0x212)+a29_0x39ca70[_0x291883(0x1ea)](AUTH_MODE[_0x291883(0x1ff)]+'\x20(accessKey)')),console[_0x291883(0x1e7)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x39ca70[_0x291883(0x201)](_0x291883(0x1f5))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x41585b){const _0x35eed8=a29_0x529c;if(_0x41585b[_0x35eed8(0x1e5)]==='ok')return a29_0x39ca70[_0x35eed8(0x1ea)](_0x35eed8(0x207));if(_0x41585b['status']==='missing')return a29_0x39ca70['gray'](_0x35eed8(0x1e2));if(_0x41585b[_0x35eed8(0x1e5)]===_0x35eed8(0x1fb))return a29_0x39ca70[_0x35eed8(0x213)](_0x35eed8(0x20a));return a29_0x39ca70[_0x35eed8(0x203)](_0x35eed8(0x221)+(_0x41585b['message']?':\x20'+_0x41585b[_0x35eed8(0x227)]:''));}export const doctorDefinition={'service':a29_0x4afd91(0x20b),'command':'check','description':a29_0x4afd91(0x224),'risk':a29_0x4afd91(0x228),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x10a24e=a30_0x586d;function a30_0x586d(_0x350400,_0x2adb4e){_0x350400=_0x350400-0x122;const _0x476591=a30_0x4765();let _0x586dba=_0x476591[_0x350400];return _0x586dba;}(function(_0x21ca3f,_0x20406b){const _0x28fce7=a30_0x586d,_0x44e396=_0x21ca3f();while(!![]){try{const _0x289b80=-parseInt(_0x28fce7(0x141))/0x1+-parseInt(_0x28fce7(0x13f))/0x2*(parseInt(_0x28fce7(0x131))/0x3)+-parseInt(_0x28fce7(0x142))/0x4*(-parseInt(_0x28fce7(0x12e))/0x5)+parseInt(_0x28fce7(0x13d))/0x6*(-parseInt(_0x28fce7(0x146))/0x7)+parseInt(_0x28fce7(0x130))/0x8+parseInt(_0x28fce7(0x12f))/0x9+parseInt(_0x28fce7(0x135))/0xa*(parseInt(_0x28fce7(0x124))/0xb);if(_0x289b80===_0x20406b)break;else _0x44e396['push'](_0x44e396['shift']());}catch(_0x55f7a7){_0x44e396['push'](_0x44e396['shift']());}}}(a30_0x4765,0x4a512));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x10a24e(0x13e),'type':'string','required':!![],'description':a30_0x10a24e(0x140)},FILEPATH_FLAG={'name':a30_0x10a24e(0x129),'type':'string','required':!![],'description':a30_0x10a24e(0x132)},DOWNLOAD_FLAG={'name':'download','type':a30_0x10a24e(0x126),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':'long-term','type':a30_0x10a24e(0x126),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function a30_0x4765(){const _0x2ea8eb=['3426UFLFzz','file','6SFwjCY','Path\x20to\x20the\x20local\x20file\x20to\x20upload','197392tQeOXS','4PHYIlQ','body','Preview:\x20upload\x20','POST','6979XiQPew','File','long-term','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','filePath\x20is\x20required.','154957BvbhOP','build','boolean','read','str','filepath','filePath','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','path','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','2003860ZRNwWY','2710476PLqcVb','427656WQJHRz','346401iEtZmg','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','query-url','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','470wPhfMU','/client/uploadFile','upload','bool','Uploaded\x20file:\x20','trim','write','appCode'];a30_0x4765=function(){return _0x2ea8eb;};return a30_0x4765();}function requireFilePath(_0x559318){const _0x42d2fe=a30_0x10a24e,_0x4418e1=_0x559318[_0x42d2fe(0x13a)]();if(!_0x4418e1)throw CliErrors['validation'](_0x42d2fe(0x123));return _0x4418e1;}const fileUpload={'service':'file','command':a30_0x10a24e(0x137),'description':a30_0x10a24e(0x12b),'risk':a30_0x10a24e(0x13b),'flags':[FILE_FLAG],async 'dryRun'(_0x28a1a3){const _0x5e4fc5=a30_0x10a24e,_0x168e4e=requireRuntimeUploadFile(_0x28a1a3[_0x5e4fc5(0x128)](_0x5e4fc5(0x13e)),_0x5e4fc5(0x147));return dryRun(_0x5e4fc5(0x145),_0x5e4fc5(0x136))[_0x5e4fc5(0x143)]({'appCode':_0x28a1a3[_0x5e4fc5(0x13c)],'multipart':{'file':_0x168e4e}})['description'](_0x5e4fc5(0x144)+_0x168e4e[_0x5e4fc5(0x12c)]+'\x20to\x20runtime\x20app\x20'+_0x28a1a3['appCode'])[_0x5e4fc5(0x125)]();},async 'execute'(_0x5edae0){const _0x50571c=a30_0x10a24e,_0x347e04=requireRuntimeUploadFile(_0x5edae0[_0x50571c(0x128)](_0x50571c(0x13e)),'File'),_0x10fd82=await uploadRuntimeFile(_0x5edae0[_0x50571c(0x13c)],_0x347e04[_0x50571c(0x12c)]);return{'ok':!![],'data':_0x10fd82,'message':_0x10fd82[_0x50571c(0x12a)]?_0x50571c(0x139)+_0x10fd82['filePath']+_0x50571c(0x12d):_0x50571c(0x134)};}},fileQueryUrl={'service':a30_0x10a24e(0x13e),'command':a30_0x10a24e(0x133),'description':a30_0x10a24e(0x122),'risk':a30_0x10a24e(0x127),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x222b77){const _0x21020e=a30_0x10a24e,_0x5b464d=requireFilePath(_0x222b77[_0x21020e(0x128)]('filepath')),_0x2f9fc5=await queryRuntimeFileUrl(_0x5b464d,{'download':_0x222b77[_0x21020e(0x138)]('download'),'longTerm':_0x222b77[_0x21020e(0x138)](_0x21020e(0x148))});return{'ok':!![],'data':_0x2f9fc5};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x93d254=a30_0x3b97;function a30_0x3b97(_0x4119f0,_0x3e4d6d){_0x4119f0=_0x4119f0-0x7e;const _0x327f7b=a30_0x327f();let _0x3b9703=_0x327f7b[_0x4119f0];return _0x3b9703;}(function(_0xecf722,_0x14bcca){const _0x13d1d5=a30_0x3b97,_0x57059c=_0xecf722();while(!![]){try{const _0x3f35be=parseInt(_0x13d1d5(0xa0))/0x1*(-parseInt(_0x13d1d5(0x87))/0x2)+-parseInt(_0x13d1d5(0x8e))/0x3*(parseInt(_0x13d1d5(0x82))/0x4)+-parseInt(_0x13d1d5(0x8a))/0x5*(-parseInt(_0x13d1d5(0x83))/0x6)+parseInt(_0x13d1d5(0x93))/0x7+-parseInt(_0x13d1d5(0x96))/0x8+-parseInt(_0x13d1d5(0xa2))/0x9+parseInt(_0x13d1d5(0x90))/0xa;if(_0x3f35be===_0x14bcca)break;else _0x57059c['push'](_0x57059c['shift']());}catch(_0x29ff1d){_0x57059c['push'](_0x57059c['shift']());}}}(a30_0x327f,0x250b8));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':'file','type':'string','required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':'filepath','type':a30_0x93d254(0x9f),'required':!![],'description':a30_0x93d254(0x7f)},DOWNLOAD_FLAG={'name':'download','type':a30_0x93d254(0x81),'description':a30_0x93d254(0x8c)},LONG_TERM_FLAG={'name':'long-term','type':a30_0x93d254(0x81),'description':a30_0x93d254(0x91)};function requireFilePath(_0x24653f){const _0x1a3970=a30_0x93d254,_0x49cb67=_0x24653f['trim']();if(!_0x49cb67)throw CliErrors[_0x1a3970(0x80)](_0x1a3970(0x92));return _0x49cb67;}function a30_0x327f(){const _0x3c0d15=['.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','string','1937XAAgNC','File','666801QMoEXo','long-term','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','validation','boolean','36ggxnAr','1032fGLMiT','POST','file','filePath','38kUbUpV','path','upload','885AqZpdF','/client/uploadFile','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','appCode','18759fFhBML','download','2120040BkoLMa','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','filePath\x20is\x20required.','1116346gfXoOu','bool','description','664168PyMtGU','read','build','write','body','Uploaded\x20file:\x20','Preview:\x20upload\x20','str'];a30_0x327f=function(){return _0x3c0d15;};return a30_0x327f();}const fileUpload={'service':a30_0x93d254(0x85),'command':a30_0x93d254(0x89),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a30_0x93d254(0x99),'flags':[FILE_FLAG],async 'dryRun'(_0x3c00c8){const _0x1bfc7f=a30_0x93d254,_0x3f80e2=requireRuntimeUploadFile(_0x3c00c8['str']('file'),_0x1bfc7f(0xa1));return dryRun(_0x1bfc7f(0x84),_0x1bfc7f(0x8b))[_0x1bfc7f(0x9a)]({'appCode':_0x3c00c8[_0x1bfc7f(0x8d)],'multipart':{'file':_0x3f80e2}})[_0x1bfc7f(0x95)](_0x1bfc7f(0x9c)+_0x3f80e2['path']+'\x20to\x20runtime\x20app\x20'+_0x3c00c8['appCode'])[_0x1bfc7f(0x98)]();},async 'execute'(_0x85556f){const _0x5485d8=a30_0x93d254,_0x53c821=requireRuntimeUploadFile(_0x85556f[_0x5485d8(0x9d)](_0x5485d8(0x85)),_0x5485d8(0xa1)),_0x9d9a26=await uploadRuntimeFile(_0x85556f[_0x5485d8(0x8d)],_0x53c821[_0x5485d8(0x88)]);return{'ok':!![],'data':_0x9d9a26,'message':_0x9d9a26[_0x5485d8(0x86)]?_0x5485d8(0x9b)+_0x9d9a26[_0x5485d8(0x86)]+_0x5485d8(0x9e):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a30_0x93d254(0x85),'command':'query-url','description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x93d254(0x97),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x258107){const _0x177441=a30_0x93d254,_0x324a95=requireFilePath(_0x258107[_0x177441(0x9d)]('filepath')),_0x4aa499=await queryRuntimeFileUrl(_0x324a95,{'download':_0x258107[_0x177441(0x94)](_0x177441(0x8f)),'longTerm':_0x258107[_0x177441(0x94)](_0x177441(0x7e))});return{'ok':!![],'data':_0x4aa499};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x2e2708=a31_0x5480;(function(_0x1d3b67,_0x4fec6a){const _0x5c8e8c=a31_0x5480,_0xcee68a=_0x1d3b67();while(!![]){try{const _0x23062c=-parseInt(_0x5c8e8c(0xff))/0x1+parseInt(_0x5c8e8c(0x10c))/0x2*(parseInt(_0x5c8e8c(0xdb))/0x3)+parseInt(_0x5c8e8c(0x109))/0x4*(-parseInt(_0x5c8e8c(0xf0))/0x5)+parseInt(_0x5c8e8c(0x111))/0x6+parseInt(_0x5c8e8c(0xd7))/0x7+-parseInt(_0x5c8e8c(0x10e))/0x8*(-parseInt(_0x5c8e8c(0xea))/0x9)+-parseInt(_0x5c8e8c(0xdd))/0xa;if(_0x23062c===_0x4fec6a)break;else _0xcee68a['push'](_0xcee68a['shift']());}catch(_0x373229){_0xcee68a['push'](_0xcee68a['shift']());}}}(a31_0x320a,0xccdbe));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';function a31_0x5480(_0x383d22,_0x4e5e29){_0x383d22=_0x383d22-0xd1;const _0x320ae8=a31_0x320a();let _0x548065=_0x320ae8[_0x383d22];return _0x548065;}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_0x2e2708(0xd6),'type':'string','description':a31_0x2e2708(0xd2)},{'name':a31_0x2e2708(0xdc),'type':'string','description':a31_0x2e2708(0xe3)+DEFAULT_CONFIG_VALUES[a31_0x2e2708(0xdc)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x2e2708(0xe2),'type':a31_0x2e2708(0xfe),'description':a31_0x2e2708(0xed)+PRODUCT_CONFIG[a31_0x2e2708(0x101)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x2e2708(0xf1),'type':a31_0x2e2708(0xfe),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0x2e2708(0xf2),'type':a31_0x2e2708(0x10d),'description':a31_0x2e2708(0xfa),'required':!![]},{'name':'appcode','type':a31_0x2e2708(0x10d),'description':'Override\x20imported\x20default\x20appcode'},{'name':'env','type':'string','description':a31_0x2e2708(0xee),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a31_0x2e2708(0xfe),'description':a31_0x2e2708(0xed)+PRODUCT_CONFIG['newConfigFileName']+a31_0x2e2708(0x117),'default':![]},{'name':a31_0x2e2708(0xf1),'type':a31_0x2e2708(0xfe),'description':a31_0x2e2708(0xe7),'default':![]}];export async function runInit(_0x492ec4){const _0x49b6dc=a31_0x2e2708,_0x4e002f=isNonInteractiveMode(_0x492ec4),_0x2e6647=_0x492ec4['global']?_0x49b6dc(0xe2):_0x49b6dc(0xe1),_0x2efe5f=resolveWriteConfigPath(_0x2e6647);try{_0x4e002f?await runNonInteractive(_0x492ec4,_0x2efe5f):await runInteractive(_0x492ec4,_0x2efe5f);}catch(_0x2d72ff){if(_0x2d72ff instanceof AbortPrompt)throw CliErrors[_0x49b6dc(0x112)]();throw _0x2d72ff;}}export async function runInitImport(_0x4cb930){const _0x142dd3=a31_0x2e2708,_0x4f72aa=_0x4cb930['global']?_0x142dd3(0xe2):_0x142dd3(0xe1),_0x1d4b50=resolveWriteConfigPath(_0x4f72aa);await runFromImport(_0x4cb930,_0x1d4b50);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x2e2708(0xf4)]);async function runFromImport(_0x18bf02,_0x50d0c3){const _0x288844=a31_0x2e2708,_0x49e724=resolveFilePath(_0x18bf02[_0x288844(0xf2)]);if(!existsSync(_0x49e724))throw CliErrors[_0x288844(0xfd)]('Source\x20file\x20not\x20found:\x20'+_0x49e724);const _0x38e8a7=readSourceFile(_0x49e724),_0x201627=convertToRuntimeConfig(_0x38e8a7);_0x18bf02[_0x288844(0xd6)]&&(_0x201627[_0x288844(0xd6)]=String(_0x18bf02[_0x288844(0xd6)]));_0x18bf02['env']&&(_0x201627['env']=resolveInitEnv(_0x18bf02));if(!_0x201627[_0x288844(0xd6)])throw CliErrors[_0x288844(0xfd)](_0x288844(0x113),_0x288844(0xd9));await writeInitConfig(_0x50d0c3,_0x201627,_0x18bf02),console[_0x288844(0xd5)](_0x288844(0x105)+_0x49e724),console[_0x288844(0xd5)]('\x20\x20config:\x20\x20'+_0x50d0c3),console[_0x288844(0xd5)](_0x288844(0x115)+_0x201627[_0x288844(0xd6)]);if(_0x201627[_0x288844(0xd8)])console[_0x288844(0xd5)]('\x20\x20default:\x20'+_0x201627[_0x288844(0xd8)]);}function convertToRuntimeConfig(_0xbbe706){const _0x48c1e6=a31_0x2e2708;if(_0xbbe706[_0x48c1e6(0xe8)]&&typeof _0xbbe706['apps']===_0x48c1e6(0xde))throw CliErrors[_0x48c1e6(0xfd)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x48c1e6(0xef));const _0x232834={};for(const _0x5f4275 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0xbbe706[_0x5f4275]!==undefined&&(_0x232834[_0x5f4275]=_0xbbe706[_0x5f4275]);}return!_0x232834[_0x48c1e6(0x119)]&&(_0x232834[_0x48c1e6(0x119)]=DEFAULT_CONFIG_VALUES[_0x48c1e6(0x119)]),_0x232834;}async function runNonInteractive(_0x30f1a7,_0xe394be){const _0x3aac1a=a31_0x2e2708,_0x1560a5=_0x30f1a7['appcode'];if(!_0x1560a5)throw CliErrors[_0x3aac1a(0xeb)]('appcode',_0x3aac1a(0xe9)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x28127f=resolveInitEnv(_0x30f1a7);await writeInitConfig(_0xe394be,{'appcode':_0x1560a5,'env':_0x28127f},_0x30f1a7),console['log'](_0x3aac1a(0x10f)+_0xe394be),console[_0x3aac1a(0xd5)]('\x20\x20appcode:\x20'+_0x1560a5),console['log'](_0x3aac1a(0xe4)+_0x28127f);}function a31_0x320a(){const _0x7873c1=['7338UKyOzV','env','2383630gvejyR','object','once','stdout','project','global','Target\x20environment\x20(default\x20','\x20\x20env:\x20\x20\x20\x20\x20','File\x20','parse','Skip\x20confirmation\x20when\x20overwriting','apps','Usage:\x20','9ISttAm','flagMissing','race','Write\x20to\x20global\x20(~/','Override\x20imported\x20default\x20env','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','2432185iUsSJx','yes','file','\x20already\x20exists.\x20Overwrite?','apiDir','[y/N]','App\x20code','\x22.\x20Allowed:\x20','cwd','Aborted.','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Failed\x20to\x20parse\x20source\x20file:\x20','removeListener','validation','boolean','1516102GQkQFZ','[Y/n]','newConfigFileName','):\x20','includes','\x20init\x20—\x20Create\x20','Imported\x20from\x20','User\x20aborted\x20prompt','SIGINT','AbortPrompt','8snDVTm','app','entries','934EhsaIy','string','4365536UElYpH','Initialized\x20','Invalid\x20env\x20\x22','4163460huiEXx','cancelled','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','stdin','\x20\x20appcode:\x20','\x0aInitialized\x20',')\x20instead\x20of\x20project','close','riskLevel','trim','App\x20code\x20for\x20the\x20project','toLowerCase','question','log','appcode','8291899PhTyom','defaultApp','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`.','utf8'];a31_0x320a=function(){return _0x7873c1;};return a31_0x320a();}async function runInteractive(_0x45cd82,_0x421e6e){const _0x4100a0=a31_0x2e2708,_0x264ae7=loadExisting(_0x421e6e),_0xe769f4=typeof _0x264ae7?.[_0x4100a0(0xd6)]===_0x4100a0(0x10d)?_0x264ae7['appcode']:'',_0x5c408b=resolveInitEnv(_0x45cd82);console['log'](CLI_BIN_NAME+_0x4100a0(0x104)+PRODUCT_CONFIG[_0x4100a0(0x101)]+'\x0a');if(existsSync(_0x421e6e)&&!_0x45cd82['yes']){const _0x14abce=await promptYesNo(_0x4100a0(0xe5)+_0x421e6e+_0x4100a0(0xf3),![]);if(!_0x14abce){console[_0x4100a0(0xd5)](_0x4100a0(0xf9));return;}}const _0x2adfb9=typeof _0x45cd82[_0x4100a0(0xd6)]===_0x4100a0(0x10d)?_0x45cd82['appcode']['trim']():'';let _0x273c08=_0x2adfb9;!_0x273c08&&(_0x273c08=await promptInput(_0x4100a0(0xf6),_0xe769f4));if(!_0x273c08[_0x4100a0(0xd1)]())throw CliErrors[_0x4100a0(0xfd)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x421e6e,{'appcode':_0x273c08['trim'](),'env':_0x5c408b},_0x45cd82),console[_0x4100a0(0xd5)](_0x4100a0(0x116)+_0x421e6e),console[_0x4100a0(0xd5)](_0x4100a0(0x115)+_0x273c08[_0x4100a0(0xd1)]()),console[_0x4100a0(0xd5)](_0x4100a0(0xe4)+_0x5c408b);}async function writeInitConfig(_0x2ccf5d,_0x94c8be,_0x59b0c9){const _0x766d40=a31_0x2e2708;let _0x3fe750={};existsSync(_0x2ccf5d)&&!_0x59b0c9[_0x766d40(0xf1)]&&(_0x3fe750=readConfigFile(_0x2ccf5d));for(const [_0x256823,_0x8ad0b3]of Object[_0x766d40(0x10b)](_0x94c8be)){_0x8ad0b3!==undefined&&(_0x3fe750[_0x256823]=_0x8ad0b3);}if(_0x3fe750[_0x766d40(0x10a)])delete _0x3fe750['app'];writeConfigFile(_0x2ccf5d,_0x3fe750);}class AbortPrompt extends Error{constructor(){const _0x64e11a=a31_0x2e2708;super(_0x64e11a(0x106)),this['name']=_0x64e11a(0x108);}}function createSafeRl(){const _0x3c8422=a31_0x2e2708,_0x40dca2=createInterface({'input':process[_0x3c8422(0x114)],'output':process[_0x3c8422(0xe0)]});let _0xb33d56;const _0x5cc8ab=new Promise((_0x1cf721,_0x3aed1e)=>{const _0x2acccd=_0x3c8422;_0xb33d56=()=>{const _0x1014eb=a31_0x5480;_0xb33d56&&(_0x40dca2[_0x1014eb(0xfc)](_0x1014eb(0x107),_0xb33d56),_0xb33d56=undefined);try{_0x40dca2[_0x1014eb(0x118)]();}catch{}_0x3aed1e(new AbortPrompt());},_0x40dca2[_0x2acccd(0xdf)](_0x2acccd(0x107),_0xb33d56);}),_0x62c566=()=>{const _0x417a3a=_0x3c8422;_0xb33d56&&(_0x40dca2[_0x417a3a(0xfc)](_0x417a3a(0x107),_0xb33d56),_0xb33d56=undefined);try{_0x40dca2[_0x417a3a(0x118)]();}catch{}};return{'rl':_0x40dca2,'abortPromise':_0x5cc8ab,'disposeSuccess':_0x62c566};}async function promptInput(_0x536781,_0xa680ea){const _0x2e0556=a31_0x2e2708,{rl:_0x31741b,abortPromise:_0x6fedc3,disposeSuccess:_0x2c8618}=createSafeRl(),_0x6e42d=new Promise(_0x3557bd=>{const _0x2eaf52=a31_0x5480,_0x4d7963=_0xa680ea?'\x20\x20'+_0x536781+'\x20('+_0xa680ea+_0x2eaf52(0x102):'\x20\x20'+_0x536781+':\x20';_0x31741b[_0x2eaf52(0xd4)](_0x4d7963,_0x2c6310=>{const _0x5b21fb=_0x2eaf52;_0x2c8618(),_0x3557bd(_0x2c6310[_0x5b21fb(0xd1)]()||_0xa680ea);});});return Promise[_0x2e0556(0xec)]([_0x6e42d,_0x6fedc3]);}async function promptYesNo(_0x5b8cff,_0xa28ad9){const _0x6d185a=a31_0x2e2708,{rl:_0x578d17,abortPromise:_0x17ac52,disposeSuccess:_0x8d59a3}=createSafeRl(),_0x55b528=new Promise(_0x46e5ae=>{const _0x5792b4=a31_0x5480,_0x23b187=_0xa28ad9?_0x5792b4(0x100):_0x5792b4(0xf5);_0x578d17[_0x5792b4(0xd4)]('\x20\x20'+_0x5b8cff+'\x20'+_0x23b187+':\x20',_0x420494=>{const _0x550845=_0x5792b4;_0x8d59a3();const _0x2c50da=_0x420494[_0x550845(0xd1)]()[_0x550845(0xd3)]();if(_0x2c50da==='y'||_0x2c50da===_0x550845(0xf1))_0x46e5ae(!![]);else{if(_0x2c50da==='n'||_0x2c50da==='no')_0x46e5ae(![]);else _0x46e5ae(_0xa28ad9);}});});return Promise[_0x6d185a(0xec)]([_0x55b528,_0x17ac52]);}function loadExisting(_0x1851c1){if(!existsSync(_0x1851c1))return null;return readConfigFile(_0x1851c1);}function resolveFilePath(_0x206abb){const _0x11b670=a31_0x2e2708;return isAbsolute(_0x206abb)?_0x206abb:resolve(process[_0x11b670(0xf8)](),_0x206abb);}function readSourceFile(_0xabf53){const _0x3519a0=a31_0x2e2708;try{const _0x348542=readFileSync(_0xabf53,{'encoding':_0x3519a0(0xda)});return JSON[_0x3519a0(0xe6)](_0x348542);}catch(_0x49fd99){throw CliErrors[_0x3519a0(0xfd)](_0x3519a0(0xfb)+_0x49fd99['message']);}}function resolveInitEnv(_0x5aca65){const _0x55fc45=a31_0x2e2708,_0x58ee76=_0x5aca65[_0x55fc45(0xdc)];if(_0x58ee76===undefined||_0x58ee76==='')return DEFAULT_CONFIG_VALUES[_0x55fc45(0xdc)];if(!RUNTIME_ENV_VALUES[_0x55fc45(0x103)](_0x58ee76))throw CliErrors[_0x55fc45(0xfd)](_0x55fc45(0x110)+_0x58ee76+_0x55fc45(0xf7)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x58ee76;}
1
+ const a31_0xd213ba=a31_0x3f69;(function(_0xbfe68c,_0x5926e2){const _0x114dc2=a31_0x3f69,_0x21198f=_0xbfe68c();while(!![]){try{const _0x313d90=parseInt(_0x114dc2(0x19f))/0x1*(-parseInt(_0x114dc2(0x1ac))/0x2)+parseInt(_0x114dc2(0x1c3))/0x3+parseInt(_0x114dc2(0x195))/0x4+-parseInt(_0x114dc2(0x1a5))/0x5*(-parseInt(_0x114dc2(0x1aa))/0x6)+-parseInt(_0x114dc2(0x1a7))/0x7+parseInt(_0x114dc2(0x1c8))/0x8*(-parseInt(_0x114dc2(0x189))/0x9)+-parseInt(_0x114dc2(0x1a0))/0xa;if(_0x313d90===_0x5926e2)break;else _0x21198f['push'](_0x21198f['shift']());}catch(_0x29497d){_0x21198f['push'](_0x21198f['shift']());}}}(a31_0x34dc,0xf2e09));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_0x34dc(){const _0x588ed7=['flagMissing','AbortPrompt','utf8','removeListener','global','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','once','question','[Y/n]','toLowerCase','appcode','4254093qxqGSa','apiDir','stdin','yes','includes','205304OEBIhD','App\x20code','newConfigFileName','261XkfAWb','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`.','\x20\x20env:\x20\x20\x20\x20\x20','):\x20','file',')\x20instead\x20of\x20project','\x20already\x20exists.\x20Overwrite?','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','riskLevel','Usage:\x20','boolean','Write\x20to\x20global\x20(~/','2523148pMDHpB','log','\x20\x20appcode:\x20','Imported\x20from\x20','name','object','string','App\x20code\x20for\x20the\x20project','cancelled','\x0aInitialized\x20','1IYaynQ','260930CObffA','SIGINT','cwd','trim','close','1145NJzLsk','Override\x20imported\x20default\x20env','9811802CvguNs','File\x20','entries','46608FQxmCR','App\x20code\x20cannot\x20be\x20empty.','1321718NjjoTJ','project','Initialized\x20','parse','Override\x20imported\x20default\x20appcode','race','env','apps','validation','app','defaultApp','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]'];a31_0x34dc=function(){return _0x588ed7;};return a31_0x34dc();}import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0xd213ba(0x1c2),'type':a31_0xd213ba(0x19b),'description':a31_0xd213ba(0x19c)},{'name':a31_0xd213ba(0x1b2),'type':a31_0xd213ba(0x19b),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0xd213ba(0x1bc),'type':a31_0xd213ba(0x193),'description':a31_0xd213ba(0x194)+PRODUCT_CONFIG['newConfigFileName']+a31_0xd213ba(0x18e),'default':![]},{'name':a31_0xd213ba(0x1c6),'type':a31_0xd213ba(0x193),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0xd213ba(0x18d),'type':'string','description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0xd213ba(0x1c2),'type':a31_0xd213ba(0x19b),'description':a31_0xd213ba(0x1b0)},{'name':a31_0xd213ba(0x1b2),'type':a31_0xd213ba(0x19b),'description':a31_0xd213ba(0x1a6),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a31_0xd213ba(0x188)]+a31_0xd213ba(0x18e),'default':![]},{'name':'yes','type':a31_0xd213ba(0x193),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x56a374){const _0x1fd3b7=a31_0xd213ba,_0x5ad4b3=isNonInteractiveMode(_0x56a374),_0x29f5ee=_0x56a374['global']?_0x1fd3b7(0x1bc):_0x1fd3b7(0x1ad),_0x3f9ca4=resolveWriteConfigPath(_0x29f5ee);try{_0x5ad4b3?await runNonInteractive(_0x56a374,_0x3f9ca4):await runInteractive(_0x56a374,_0x3f9ca4);}catch(_0x6ac07d){if(_0x6ac07d instanceof AbortPrompt)throw CliErrors[_0x1fd3b7(0x19d)]();throw _0x6ac07d;}}export async function runInitImport(_0x410f58){const _0x5118c5=a31_0xd213ba,_0xaccece=_0x410f58[_0x5118c5(0x1bc)]?'global':'project',_0x39e915=resolveWriteConfigPath(_0xaccece);await runFromImport(_0x410f58,_0x39e915);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0xd213ba(0x1c4)]);async function runFromImport(_0x307703,_0x53a28c){const _0x4a81b6=a31_0xd213ba,_0x2bb4d5=resolveFilePath(_0x307703[_0x4a81b6(0x18d)]);if(!existsSync(_0x2bb4d5))throw CliErrors[_0x4a81b6(0x1b4)]('Source\x20file\x20not\x20found:\x20'+_0x2bb4d5);const _0xa655b3=readSourceFile(_0x2bb4d5),_0x5eb23d=convertToRuntimeConfig(_0xa655b3);_0x307703[_0x4a81b6(0x1c2)]&&(_0x5eb23d[_0x4a81b6(0x1c2)]=String(_0x307703['appcode']));_0x307703[_0x4a81b6(0x1b2)]&&(_0x5eb23d['env']=resolveInitEnv(_0x307703));if(!_0x5eb23d[_0x4a81b6(0x1c2)])throw CliErrors['validation'](_0x4a81b6(0x1bd),_0x4a81b6(0x18a));await writeInitConfig(_0x53a28c,_0x5eb23d,_0x307703),console[_0x4a81b6(0x196)](_0x4a81b6(0x198)+_0x2bb4d5),console[_0x4a81b6(0x196)]('\x20\x20config:\x20\x20'+_0x53a28c),console[_0x4a81b6(0x196)](_0x4a81b6(0x197)+_0x5eb23d[_0x4a81b6(0x1c2)]);if(_0x5eb23d[_0x4a81b6(0x1b6)])console[_0x4a81b6(0x196)]('\x20\x20default:\x20'+_0x5eb23d['defaultApp']);}function convertToRuntimeConfig(_0x59f3de){const _0x1132a1=a31_0xd213ba;if(_0x59f3de[_0x1132a1(0x1b3)]&&typeof _0x59f3de[_0x1132a1(0x1b3)]===_0x1132a1(0x19a))throw CliErrors[_0x1132a1(0x1b4)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x1132a1(0x190));const _0x1ae0de={};for(const _0x2e904d of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x59f3de[_0x2e904d]!==undefined&&(_0x1ae0de[_0x2e904d]=_0x59f3de[_0x2e904d]);}return!_0x1ae0de['riskLevel']&&(_0x1ae0de['riskLevel']=DEFAULT_CONFIG_VALUES[_0x1132a1(0x191)]),_0x1ae0de;}async function runNonInteractive(_0x56e6a3,_0x1a2527){const _0x1c43b7=a31_0xd213ba,_0x1e94ac=_0x56e6a3[_0x1c43b7(0x1c2)];if(!_0x1e94ac)throw CliErrors[_0x1c43b7(0x1b8)]('appcode',_0x1c43b7(0x192)+CLI_BIN_NAME+_0x1c43b7(0x1b7));const _0x50c4eb=resolveInitEnv(_0x56e6a3);await writeInitConfig(_0x1a2527,{'appcode':_0x1e94ac,'env':_0x50c4eb},_0x56e6a3),console[_0x1c43b7(0x196)](_0x1c43b7(0x1ae)+_0x1a2527),console[_0x1c43b7(0x196)](_0x1c43b7(0x197)+_0x1e94ac),console[_0x1c43b7(0x196)](_0x1c43b7(0x18b)+_0x50c4eb);}async function runInteractive(_0x25025d,_0x74246b){const _0x3d1ca5=a31_0xd213ba,_0x4a29d4=loadExisting(_0x74246b),_0x361cda=typeof _0x4a29d4?.[_0x3d1ca5(0x1c2)]===_0x3d1ca5(0x19b)?_0x4a29d4[_0x3d1ca5(0x1c2)]:'',_0x79656f=resolveInitEnv(_0x25025d);console[_0x3d1ca5(0x196)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x3d1ca5(0x188)]+'\x0a');if(existsSync(_0x74246b)&&!_0x25025d['yes']){const _0x56bc97=await promptYesNo(_0x3d1ca5(0x1a8)+_0x74246b+_0x3d1ca5(0x18f),![]);if(!_0x56bc97){console[_0x3d1ca5(0x196)]('Aborted.');return;}}const _0x17882d=typeof _0x25025d[_0x3d1ca5(0x1c2)]===_0x3d1ca5(0x19b)?_0x25025d[_0x3d1ca5(0x1c2)][_0x3d1ca5(0x1a3)]():'';let _0x4c769a=_0x17882d;!_0x4c769a&&(_0x4c769a=await promptInput(_0x3d1ca5(0x187),_0x361cda));if(!_0x4c769a['trim']())throw CliErrors[_0x3d1ca5(0x1b4)](_0x3d1ca5(0x1ab));await writeInitConfig(_0x74246b,{'appcode':_0x4c769a[_0x3d1ca5(0x1a3)](),'env':_0x79656f},_0x25025d),console[_0x3d1ca5(0x196)](_0x3d1ca5(0x19e)+_0x74246b),console[_0x3d1ca5(0x196)]('\x20\x20appcode:\x20'+_0x4c769a[_0x3d1ca5(0x1a3)]()),console[_0x3d1ca5(0x196)](_0x3d1ca5(0x18b)+_0x79656f);}async function writeInitConfig(_0x2a51c5,_0x4afdc5,_0x2fd3ef){const _0x4ac670=a31_0xd213ba;let _0x4b0a46={};existsSync(_0x2a51c5)&&!_0x2fd3ef[_0x4ac670(0x1c6)]&&(_0x4b0a46=readConfigFile(_0x2a51c5));for(const [_0x398f91,_0x6c5111]of Object[_0x4ac670(0x1a9)](_0x4afdc5)){_0x6c5111!==undefined&&(_0x4b0a46[_0x398f91]=_0x6c5111);}if(_0x4b0a46[_0x4ac670(0x1b5)])delete _0x4b0a46[_0x4ac670(0x1b5)];writeConfigFile(_0x2a51c5,_0x4b0a46);}class AbortPrompt extends Error{constructor(){const _0x559fec=a31_0xd213ba;super('User\x20aborted\x20prompt'),this[_0x559fec(0x199)]=_0x559fec(0x1b9);}}function createSafeRl(){const _0x5c10d2=a31_0xd213ba,_0x3d521c=createInterface({'input':process[_0x5c10d2(0x1c5)],'output':process['stdout']});let _0x4fb8cb;const _0x176601=new Promise((_0x14b859,_0x4502f7)=>{const _0x47bc=_0x5c10d2;_0x4fb8cb=()=>{const _0x1b83e2=a31_0x3f69;_0x4fb8cb&&(_0x3d521c[_0x1b83e2(0x1bb)]('SIGINT',_0x4fb8cb),_0x4fb8cb=undefined);try{_0x3d521c[_0x1b83e2(0x1a4)]();}catch{}_0x4502f7(new AbortPrompt());},_0x3d521c[_0x47bc(0x1be)](_0x47bc(0x1a1),_0x4fb8cb);}),_0xf39e1b=()=>{const _0x496ca8=_0x5c10d2;_0x4fb8cb&&(_0x3d521c[_0x496ca8(0x1bb)]('SIGINT',_0x4fb8cb),_0x4fb8cb=undefined);try{_0x3d521c[_0x496ca8(0x1a4)]();}catch{}};return{'rl':_0x3d521c,'abortPromise':_0x176601,'disposeSuccess':_0xf39e1b};}async function promptInput(_0x554d23,_0x5b64f2){const _0x3cfc96=a31_0xd213ba,{rl:_0x309ad9,abortPromise:_0x1a5269,disposeSuccess:_0x26c0d5}=createSafeRl(),_0x579935=new Promise(_0xaf5633=>{const _0x4e2804=a31_0x3f69,_0x339505=_0x5b64f2?'\x20\x20'+_0x554d23+'\x20('+_0x5b64f2+_0x4e2804(0x18c):'\x20\x20'+_0x554d23+':\x20';_0x309ad9[_0x4e2804(0x1bf)](_0x339505,_0x48c130=>{const _0x32f45d=_0x4e2804;_0x26c0d5(),_0xaf5633(_0x48c130[_0x32f45d(0x1a3)]()||_0x5b64f2);});});return Promise[_0x3cfc96(0x1b1)]([_0x579935,_0x1a5269]);}function a31_0x3f69(_0x58c0e9,_0x2d09c9){_0x58c0e9=_0x58c0e9-0x187;const _0x34dc06=a31_0x34dc();let _0x3f6970=_0x34dc06[_0x58c0e9];return _0x3f6970;}async function promptYesNo(_0x1029e5,_0x348b4a){const _0x183bd1=a31_0xd213ba,{rl:_0xa81822,abortPromise:_0x14d486,disposeSuccess:_0x100cac}=createSafeRl(),_0x5d61ef=new Promise(_0x44dce8=>{const _0xd2c6c6=a31_0x3f69,_0xbdc1ec=_0x348b4a?_0xd2c6c6(0x1c0):'[y/N]';_0xa81822[_0xd2c6c6(0x1bf)]('\x20\x20'+_0x1029e5+'\x20'+_0xbdc1ec+':\x20',_0x4dfa89=>{const _0x27f8df=_0xd2c6c6;_0x100cac();const _0x93705e=_0x4dfa89[_0x27f8df(0x1a3)]()[_0x27f8df(0x1c1)]();if(_0x93705e==='y'||_0x93705e===_0x27f8df(0x1c6))_0x44dce8(!![]);else{if(_0x93705e==='n'||_0x93705e==='no')_0x44dce8(![]);else _0x44dce8(_0x348b4a);}});});return Promise[_0x183bd1(0x1b1)]([_0x5d61ef,_0x14d486]);}function loadExisting(_0x47e760){if(!existsSync(_0x47e760))return null;return readConfigFile(_0x47e760);}function resolveFilePath(_0x3e37b8){const _0x2bb1a8=a31_0xd213ba;return isAbsolute(_0x3e37b8)?_0x3e37b8:resolve(process[_0x2bb1a8(0x1a2)](),_0x3e37b8);}function readSourceFile(_0x5081db){const _0x39515a=a31_0xd213ba;try{const _0x1d1145=readFileSync(_0x5081db,{'encoding':_0x39515a(0x1ba)});return JSON[_0x39515a(0x1af)](_0x1d1145);}catch(_0x115962){throw CliErrors[_0x39515a(0x1b4)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x115962['message']);}}function resolveInitEnv(_0x152609){const _0x152a27=a31_0xd213ba,_0x343a4f=_0x152609[_0x152a27(0x1b2)];if(_0x343a4f===undefined||_0x343a4f==='')return DEFAULT_CONFIG_VALUES[_0x152a27(0x1b2)];if(!RUNTIME_ENV_VALUES[_0x152a27(0x1c7)](_0x343a4f))throw CliErrors[_0x152a27(0x1b4)]('Invalid\x20env\x20\x22'+_0x343a4f+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x343a4f;}
@@ -1 +1 @@
1
- const a32_0x2ca973=a32_0x28a3;(function(_0x1d0347,_0xc3d18d){const _0x1e1ac2=a32_0x28a3,_0x404026=_0x1d0347();while(!![]){try{const _0x1769e7=parseInt(_0x1e1ac2(0xf9))/0x1+parseInt(_0x1e1ac2(0x12c))/0x2*(-parseInt(_0x1e1ac2(0x11e))/0x3)+-parseInt(_0x1e1ac2(0x12f))/0x4+parseInt(_0x1e1ac2(0x131))/0x5*(-parseInt(_0x1e1ac2(0x10d))/0x6)+-parseInt(_0x1e1ac2(0x125))/0x7*(-parseInt(_0x1e1ac2(0xf4))/0x8)+parseInt(_0x1e1ac2(0x113))/0x9*(-parseInt(_0x1e1ac2(0xf3))/0xa)+-parseInt(_0x1e1ac2(0x103))/0xb*(-parseInt(_0x1e1ac2(0x122))/0xc);if(_0x1769e7===_0xc3d18d)break;else _0x404026['push'](_0x404026['shift']());}catch(_0x4d8d2c){_0x404026['push'](_0x404026['shift']());}}}(a32_0x5b8c,0xabfd0));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':'title','type':'string','required':!![],'description':a32_0x2ca973(0x110)},FILE_FLAG={'name':a32_0x2ca973(0x115),'type':a32_0x2ca973(0x108),'required':!![],'description':a32_0x2ca973(0x100)},QUERY_FLAG={'name':a32_0x2ca973(0x12a),'type':a32_0x2ca973(0x108),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x2ca973(0x111),'type':a32_0x2ca973(0x116),'description':a32_0x2ca973(0x128)};function readKnowledgeFile(_0x37e721){const _0x2a5801=a32_0x2ca973;if(!_0x37e721)throw CliErrors['validation'](_0x2a5801(0x11d));if(!existsSync(_0x37e721))throw CliErrors[_0x2a5801(0xfe)]('File\x20not\x20found:\x20'+_0x37e721);if(!statSync(_0x37e721)[_0x2a5801(0xfc)]())throw CliErrors[_0x2a5801(0xfe)](_0x2a5801(0xfb)+_0x37e721);return readFileSync(_0x37e721,'utf8');}function summarizePersonalItem(_0x9d5e71){const _0x4de505=a32_0x2ca973;return{'id':_0x9d5e71['id'],'title':_0x9d5e71[_0x4de505(0x11a)],'version':_0x9d5e71['version'],'ragStatus':_0x9d5e71[_0x4de505(0x104)],'ragErrorMessage':_0x9d5e71[_0x4de505(0x114)],'updateTime':_0x9d5e71['updateTime']};}function detailPersonalItem(_0x2a226a){const _0x52e840=a32_0x2ca973;return{'id':_0x2a226a['id'],'appCode':_0x2a226a[_0x52e840(0xf8)],'scope':_0x2a226a[_0x52e840(0x127)],'userId':_0x2a226a[_0x52e840(0xfd)],'title':_0x2a226a[_0x52e840(0x11a)],'content':_0x2a226a[_0x52e840(0x106)]??'','version':_0x2a226a[_0x52e840(0x102)],'ragStatus':_0x2a226a[_0x52e840(0x104)],'ragErrorMessage':_0x2a226a['ragErrorMessage'],'createTime':_0x2a226a[_0x52e840(0x123)],'updateTime':_0x2a226a[_0x52e840(0x12b)]};}function summarizeSearchHit(_0x114eac){const _0x1bd52e=a32_0x2ca973;return{'scope':_0x114eac['scope'],'title':_0x114eac[_0x1bd52e(0x11a)],'docId':_0x114eac[_0x1bd52e(0x10f)],'score':_0x114eac['score'],'weightedScore':_0x114eac[_0x1bd52e(0x120)],'content':_0x114eac[_0x1bd52e(0x106)],'metadata':_0x114eac['metadata']};}function readTopK(_0x42ad07){const _0x57cbc9=a32_0x2ca973,_0x19834e=_0x42ad07['flag'](_0x57cbc9(0x111));if(_0x19834e===undefined||_0x19834e===null||_0x19834e==='')return undefined;const _0x86bf10=_0x42ad07['num'](_0x57cbc9(0x111));if(!Number[_0x57cbc9(0x117)](_0x86bf10)||_0x86bf10<0x1)throw CliErrors['validation'](_0x57cbc9(0x10c));return _0x86bf10;}const kbList={'service':'kb','command':a32_0x2ca973(0x11c),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x56e0a0){const _0x1ec8ae=a32_0x2ca973,_0x275e32=await listPersonalKnowledgeBaseItems(_0x56e0a0[_0x1ec8ae(0xf8)]);if(_0x56e0a0[_0x1ec8ae(0xf5)](_0x1ec8ae(0x129)))return{'ok':!![],'data':{'total':_0x275e32[_0x1ec8ae(0xf2)],'items':_0x275e32}};return{'ok':!![],'data':{'total':_0x275e32[_0x1ec8ae(0xf2)],'items':_0x275e32['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a32_0x2ca973(0x11f),'risk':a32_0x2ca973(0x105),'flags':[{...ID_FLAG,'description':a32_0x2ca973(0x10e)}],async 'execute'(_0x3ceb23){const _0x454dbc=a32_0x2ca973,_0x4e684e=await getPersonalKnowledgeBaseItem(_0x3ceb23[_0x454dbc(0xff)]('id'),_0x3ceb23['appCode']);return{'ok':!![],'data':detailPersonalItem(_0x4e684e)};}},kbCreate={'service':'kb','command':a32_0x2ca973(0x10a),'description':a32_0x2ca973(0xf6),'risk':a32_0x2ca973(0x10b),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x144ac3){const _0x25ea30=a32_0x2ca973,_0x402c2e=_0x144ac3['str'](_0x25ea30(0x11a)),_0x934da5=readKnowledgeFile(_0x144ac3[_0x25ea30(0xfa)]('file')),_0x12d2ed=await createPersonalKnowledgeBaseItem(_0x144ac3[_0x25ea30(0xf8)],{'title':_0x402c2e,'content':_0x934da5});return{'ok':!![],'data':summarizePersonalItem(_0x12d2ed),'message':_0x25ea30(0xf7)+_0x12d2ed['id']+'\x20('+_0x12d2ed[_0x25ea30(0x11a)]+')'};},async 'dryRun'(_0x35f10d){const _0xfc0a01=a32_0x2ca973,_0x15e910=_0x35f10d[_0xfc0a01(0xfa)](_0xfc0a01(0x11a)),_0x23d208=readKnowledgeFile(_0x35f10d[_0xfc0a01(0xfa)]('file'));return dryRun(_0xfc0a01(0x12e),'/client/knowledge-base/personal/create')[_0xfc0a01(0x121)]({'appCode':_0x35f10d[_0xfc0a01(0xf8)],'title':_0x15e910,'content':_0x23d208})['description'](_0xfc0a01(0x12d)+_0x15e910+'\x22')[_0xfc0a01(0xf1)]();}},kbUpdate={'service':'kb','command':a32_0x2ca973(0x126),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':'write','flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x2ca973(0x118)},FILE_FLAG],async 'execute'(_0x1dc145){const _0x41b900=a32_0x2ca973,_0x380b78=_0x1dc145[_0x41b900(0xff)]('id'),_0x13689a=readKnowledgeFile(_0x1dc145[_0x41b900(0xfa)](_0x41b900(0x115))),_0x5d0feb=_0x1dc145[_0x41b900(0xfa)](_0x41b900(0x11a))||(await getPersonalKnowledgeBaseItem(_0x380b78,_0x1dc145[_0x41b900(0xf8)]))[_0x41b900(0x11a)],_0x519dfa=await updatePersonalKnowledgeBaseItem(_0x380b78,_0x1dc145['appCode'],{'title':_0x5d0feb,'content':_0x13689a});return{'ok':!![],'data':summarizePersonalItem(_0x519dfa),'message':_0x41b900(0x11b)+_0x519dfa['id']+'\x20('+_0x519dfa[_0x41b900(0x11a)]+')'};},async 'dryRun'(_0x2be14d){const _0x5aa037=a32_0x2ca973,_0x4251a2=_0x2be14d[_0x5aa037(0xff)]('id'),_0x148d47=readKnowledgeFile(_0x2be14d[_0x5aa037(0xfa)](_0x5aa037(0x115))),_0x2eb8d9=_0x2be14d[_0x5aa037(0xfa)](_0x5aa037(0x11a))||(await getPersonalKnowledgeBaseItem(_0x4251a2,_0x2be14d[_0x5aa037(0xf8)]))[_0x5aa037(0x11a)];return dryRun(_0x5aa037(0x12e),_0x5aa037(0x124)+_0x4251a2+_0x5aa037(0x101))[_0x5aa037(0x121)]({'appCode':_0x2be14d['appCode'],'title':_0x2eb8d9,'content':_0x148d47})['description'](_0x5aa037(0x119)+_0x4251a2)[_0x5aa037(0xf1)]();}},kbSearch={'service':'kb','command':a32_0x2ca973(0xf0),'description':a32_0x2ca973(0x109),'risk':a32_0x2ca973(0x105),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x32eb73){const _0x4149db=a32_0x2ca973;if(!_0x32eb73[_0x4149db(0xfa)](_0x4149db(0x12a))[_0x4149db(0x107)]())throw CliErrors['validation'](_0x4149db(0x112));readTopK(_0x32eb73);},async 'execute'(_0x49b318){const _0x46c58a=a32_0x2ca973,_0x543214=_0x49b318['str']('query')[_0x46c58a(0x107)](),_0x4a9f7a=readTopK(_0x49b318),_0x3c8d5d=await searchKnowledgeBase(_0x49b318[_0x46c58a(0xf8)],{'query':_0x543214,'topK':_0x4a9f7a});return{'ok':!![],'data':{'total':_0x3c8d5d[_0x46c58a(0xf2)],'hits':_0x3c8d5d[_0x46c58a(0x130)](summarizeSearchHit)}};}};function a32_0x28a3(_0x3d9331,_0x559375){_0x3d9331=_0x3d9331-0xf0;const _0x5b8c35=a32_0x5b8c();let _0x28a315=_0x5b8c35[_0x3d9331];return _0x28a315;}export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];function a32_0x5b8c(){const _0x4ca100=['update','scope','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','verbose','query','updateTime','473666onXJEu','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','POST','1135256FoKsZH','map','30jBkEjm','search','build','length','4900790iArtIt','8IjdQjX','bool','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Created\x20KB\x20entry\x20','appCode','877098yjhxKe','str','File\x20is\x20not\x20a\x20regular\x20file:\x20','isFile','userId','validation','num','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','/update','version','6955091RhOKCk','ragStatus','read','content','trim','string','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','create','write','--topk\x20must\x20be\x20a\x20positive\x20number.','391596SsFrxc','Personal\x20knowledge-base\x20entry\x20ID','docId','Personal\x20knowledge-base\x20entry\x20title','topk','Search\x20query\x20is\x20required.','18XLjQsJ','ragErrorMessage','file','number','isFinite','Override\x20the\x20existing\x20entry\x20title','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','title','Updated\x20KB\x20entry\x20','list','File\x20path\x20is\x20required.','6LPaaHG','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','weightedScore','body','24FWVQzV','createTime','/client/knowledge-base/personal/','4844266rrjsQE'];a32_0x5b8c=function(){return _0x4ca100;};return a32_0x5b8c();}
1
+ const a32_0x41f390=a32_0x2cdb;(function(_0x2cf060,_0x1555c8){const _0x29881d=a32_0x2cdb,_0x1c4951=_0x2cf060();while(!![]){try{const _0x55bdb1=parseInt(_0x29881d(0x192))/0x1*(parseInt(_0x29881d(0x185))/0x2)+parseInt(_0x29881d(0x168))/0x3*(parseInt(_0x29881d(0x16d))/0x4)+-parseInt(_0x29881d(0x17b))/0x5+-parseInt(_0x29881d(0x19a))/0x6+parseInt(_0x29881d(0x17e))/0x7*(parseInt(_0x29881d(0x18d))/0x8)+parseInt(_0x29881d(0x194))/0x9*(parseInt(_0x29881d(0x19c))/0xa)+parseInt(_0x29881d(0x169))/0xb*(-parseInt(_0x29881d(0x195))/0xc);if(_0x55bdb1===_0x1555c8)break;else _0x1c4951['push'](_0x1c4951['shift']());}catch(_0x5f0986){_0x1c4951['push'](_0x1c4951['shift']());}}}(a32_0x440c,0xb4ad4));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';function a32_0x2cdb(_0x4886ce,_0x4212cd){_0x4886ce=_0x4886ce-0x164;const _0x440c58=a32_0x440c();let _0x2cdb83=_0x440c58[_0x4886ce];return _0x2cdb83;}function a32_0x440c(){const _0x51dc39=['389140iQzsDv','isFinite','userId','create','length','map','body','content','Updated\x20KB\x20entry\x20','scope','File\x20not\x20found:\x20','list','trim','69BkIxiG','1916387KOkwPM','ragErrorMessage','read','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','133572AhnvvA','metadata','str','title','utf8','docId','File\x20is\x20not\x20a\x20regular\x20file:\x20','Personal\x20knowledge-base\x20entry\x20title','/client/knowledge-base/personal/','build','POST','ragStatus','topk','version','6546750hMvFex','createTime','write','7oMOHVK','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','--topk\x20must\x20be\x20a\x20positive\x20number.','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','num','string','4678zMdnEs','query','Created\x20KB\x20entry\x20','Search\x20query\x20is\x20required.','Override\x20the\x20existing\x20entry\x20title','search','validation','score','2176232VHXikL','update','description','appCode','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','434MXMEap','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','99aXFYZh','24ukKFTr','file','bool','Personal\x20knowledge-base\x20entry\x20ID','/client/knowledge-base/personal/create','512472uaSLax','verbose'];a32_0x440c=function(){return _0x51dc39;};return a32_0x440c();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x41f390(0x170),'type':'string','required':!![],'description':a32_0x41f390(0x174)},FILE_FLAG={'name':'file','type':a32_0x41f390(0x184),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a32_0x41f390(0x186),'type':a32_0x41f390(0x184),'required':!![],'description':a32_0x41f390(0x17f)},TOPK_FLAG={'name':a32_0x41f390(0x179),'type':'number','description':a32_0x41f390(0x16c)};function readKnowledgeFile(_0x276a93){const _0x18ce58=a32_0x41f390;if(!_0x276a93)throw CliErrors[_0x18ce58(0x18b)]('File\x20path\x20is\x20required.');if(!existsSync(_0x276a93))throw CliErrors['validation'](_0x18ce58(0x165)+_0x276a93);if(!statSync(_0x276a93)['isFile']())throw CliErrors[_0x18ce58(0x18b)](_0x18ce58(0x173)+_0x276a93);return readFileSync(_0x276a93,_0x18ce58(0x171));}function summarizePersonalItem(_0xd86078){return{'id':_0xd86078['id'],'title':_0xd86078['title'],'version':_0xd86078['version'],'ragStatus':_0xd86078['ragStatus'],'ragErrorMessage':_0xd86078['ragErrorMessage'],'updateTime':_0xd86078['updateTime']};}function detailPersonalItem(_0x5a3653){const _0x28aa6a=a32_0x41f390;return{'id':_0x5a3653['id'],'appCode':_0x5a3653['appCode'],'scope':_0x5a3653['scope'],'userId':_0x5a3653[_0x28aa6a(0x19e)],'title':_0x5a3653[_0x28aa6a(0x170)],'content':_0x5a3653[_0x28aa6a(0x1a3)]??'','version':_0x5a3653[_0x28aa6a(0x17a)],'ragStatus':_0x5a3653[_0x28aa6a(0x178)],'ragErrorMessage':_0x5a3653[_0x28aa6a(0x16a)],'createTime':_0x5a3653[_0x28aa6a(0x17c)],'updateTime':_0x5a3653['updateTime']};}function summarizeSearchHit(_0x311642){const _0x2624c5=a32_0x41f390;return{'scope':_0x311642[_0x2624c5(0x164)],'title':_0x311642[_0x2624c5(0x170)],'docId':_0x311642[_0x2624c5(0x172)],'score':_0x311642[_0x2624c5(0x18c)],'weightedScore':_0x311642['weightedScore'],'content':_0x311642[_0x2624c5(0x1a3)],'metadata':_0x311642[_0x2624c5(0x16e)]};}function readTopK(_0x1f5aa7){const _0x2c6eef=a32_0x41f390,_0x22c683=_0x1f5aa7['flag'](_0x2c6eef(0x179));if(_0x22c683===undefined||_0x22c683===null||_0x22c683==='')return undefined;const _0x3e07e4=_0x1f5aa7['num']('topk');if(!Number[_0x2c6eef(0x19d)](_0x3e07e4)||_0x3e07e4<0x1)throw CliErrors[_0x2c6eef(0x18b)](_0x2c6eef(0x181));return _0x3e07e4;}const kbList={'service':'kb','command':a32_0x41f390(0x166),'description':a32_0x41f390(0x193),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x26fc75){const _0x4b4134=a32_0x41f390,_0x3caca1=await listPersonalKnowledgeBaseItems(_0x26fc75[_0x4b4134(0x190)]);if(_0x26fc75[_0x4b4134(0x197)](_0x4b4134(0x19b)))return{'ok':!![],'data':{'total':_0x3caca1[_0x4b4134(0x1a0)],'items':_0x3caca1}};return{'ok':!![],'data':{'total':_0x3caca1[_0x4b4134(0x1a0)],'items':_0x3caca1['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x317302){const _0x55c0e3=a32_0x41f390,_0x8b72e9=await getPersonalKnowledgeBaseItem(_0x317302[_0x55c0e3(0x183)]('id'),_0x317302[_0x55c0e3(0x190)]);return{'ok':!![],'data':detailPersonalItem(_0x8b72e9)};}},kbCreate={'service':'kb','command':a32_0x41f390(0x19f),'description':a32_0x41f390(0x182),'risk':a32_0x41f390(0x17d),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x11a78c){const _0x5cc224=a32_0x41f390,_0x11ae6d=_0x11a78c[_0x5cc224(0x16f)]('title'),_0x38acc8=readKnowledgeFile(_0x11a78c[_0x5cc224(0x16f)]('file')),_0x2d423e=await createPersonalKnowledgeBaseItem(_0x11a78c[_0x5cc224(0x190)],{'title':_0x11ae6d,'content':_0x38acc8});return{'ok':!![],'data':summarizePersonalItem(_0x2d423e),'message':_0x5cc224(0x187)+_0x2d423e['id']+'\x20('+_0x2d423e[_0x5cc224(0x170)]+')'};},async 'dryRun'(_0x1fa529){const _0x22be5f=a32_0x41f390,_0x3c74f5=_0x1fa529[_0x22be5f(0x16f)](_0x22be5f(0x170)),_0x8a7631=readKnowledgeFile(_0x1fa529[_0x22be5f(0x16f)](_0x22be5f(0x196)));return dryRun(_0x22be5f(0x177),_0x22be5f(0x199))['body']({'appCode':_0x1fa529['appCode'],'title':_0x3c74f5,'content':_0x8a7631})[_0x22be5f(0x18f)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x3c74f5+'\x22')[_0x22be5f(0x176)]();}},kbUpdate={'service':'kb','command':a32_0x41f390(0x18e),'description':a32_0x41f390(0x191),'risk':a32_0x41f390(0x17d),'flags':[{...ID_FLAG,'description':a32_0x41f390(0x198)},{...TITLE_FLAG,'required':![],'description':a32_0x41f390(0x189)},FILE_FLAG],async 'execute'(_0x36ec6b){const _0x474f90=a32_0x41f390,_0xfc4f37=_0x36ec6b[_0x474f90(0x183)]('id'),_0xbae8e7=readKnowledgeFile(_0x36ec6b[_0x474f90(0x16f)](_0x474f90(0x196))),_0x4d5ccc=_0x36ec6b[_0x474f90(0x16f)](_0x474f90(0x170))||(await getPersonalKnowledgeBaseItem(_0xfc4f37,_0x36ec6b['appCode']))[_0x474f90(0x170)],_0x5db040=await updatePersonalKnowledgeBaseItem(_0xfc4f37,_0x36ec6b['appCode'],{'title':_0x4d5ccc,'content':_0xbae8e7});return{'ok':!![],'data':summarizePersonalItem(_0x5db040),'message':_0x474f90(0x1a4)+_0x5db040['id']+'\x20('+_0x5db040[_0x474f90(0x170)]+')'};},async 'dryRun'(_0x4cba51){const _0x3bf984=a32_0x41f390,_0x2de980=_0x4cba51[_0x3bf984(0x183)]('id'),_0x23a344=readKnowledgeFile(_0x4cba51[_0x3bf984(0x16f)](_0x3bf984(0x196))),_0x3d067f=_0x4cba51[_0x3bf984(0x16f)]('title')||(await getPersonalKnowledgeBaseItem(_0x2de980,_0x4cba51[_0x3bf984(0x190)]))[_0x3bf984(0x170)];return dryRun(_0x3bf984(0x177),_0x3bf984(0x175)+_0x2de980+'/update')[_0x3bf984(0x1a2)]({'appCode':_0x4cba51[_0x3bf984(0x190)],'title':_0x3d067f,'content':_0x23a344})[_0x3bf984(0x18f)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x2de980)[_0x3bf984(0x176)]();}},kbSearch={'service':'kb','command':a32_0x41f390(0x18a),'description':a32_0x41f390(0x180),'risk':a32_0x41f390(0x16b),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x4dd7b7){const _0xb38b19=a32_0x41f390;if(!_0x4dd7b7['str'](_0xb38b19(0x186))[_0xb38b19(0x167)]())throw CliErrors[_0xb38b19(0x18b)](_0xb38b19(0x188));readTopK(_0x4dd7b7);},async 'execute'(_0x4f362f){const _0x38fcb6=a32_0x41f390,_0x33fd41=_0x4f362f['str'](_0x38fcb6(0x186))['trim'](),_0x2f4441=readTopK(_0x4f362f),_0x3d24a6=await searchKnowledgeBase(_0x4f362f[_0x38fcb6(0x190)],{'query':_0x33fd41,'topK':_0x2f4441});return{'ok':!![],'data':{'total':_0x3d24a6['length'],'hits':_0x3d24a6[_0x38fcb6(0x1a1)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x457d56=a33_0x2ef8;function a33_0x2ef8(_0x224a17,_0x547d79){_0x224a17=_0x224a17-0x12e;const _0xb5c8f=a33_0xb5c8();let _0x2ef876=_0xb5c8f[_0x224a17];return _0x2ef876;}(function(_0x2cb613,_0x4c820d){const _0x4e960f=a33_0x2ef8,_0x3d6ffd=_0x2cb613();while(!![]){try{const _0x551570=parseInt(_0x4e960f(0x137))/0x1+parseInt(_0x4e960f(0x135))/0x2*(parseInt(_0x4e960f(0x151))/0x3)+-parseInt(_0x4e960f(0x14f))/0x4*(parseInt(_0x4e960f(0x12f))/0x5)+parseInt(_0x4e960f(0x141))/0x6+parseInt(_0x4e960f(0x13d))/0x7*(parseInt(_0x4e960f(0x14b))/0x8)+parseInt(_0x4e960f(0x145))/0x9+-parseInt(_0x4e960f(0x133))/0xa*(parseInt(_0x4e960f(0x14e))/0xb);if(_0x551570===_0x4c820d)break;else _0x3d6ffd['push'](_0x3d6ffd['shift']());}catch(_0x17f9a0){_0x3d6ffd['push'](_0x3d6ffd['shift']());}}}(a33_0xb5c8,0xdf35d));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0xb5c8(){const _0x197b48=['*\x20Logs\x20cleared','21epAHEs','timestamp','read','readLogs','9956166tDsxKp','Clear\x20command\x20history\x20logs','message','View\x20command\x20history\x20logs','3168117sguaeY','write','\x20\x20\x20Time:\x20','error','forEach','duration','4606520fiTBAB','clearLogs','stringify','22385OriaTX','8132VhgRby','show','18hzXyfB','details','\x20logs:\x0a','415NWYOFD','success','logs','log','27730pzfMpZ','keys','499062ZgyhWg','length','1490058FJWAml','level','\x20\x20\x20Duration:\x20','\x20\x20\x20Details:\x20','en-US'];a33_0xb5c8=function(){return _0x197b48;};return a33_0xb5c8();}function printLogs(_0x2ec177){const _0x194548=a33_0x2ef8;if(_0x2ec177[_0x194548(0x136)]===0x0){console[_0x194548(0x132)]('*\x20No\x20logs\x20found');return;}console[_0x194548(0x132)]('*\x20'+CLI_DISPLAY_NAME+_0x194548(0x12e)),_0x2ec177[_0x194548(0x149)]((_0x36abf5,_0xa6af68)=>{const _0x57e703=_0x194548,_0x5d0760=new Date(_0x36abf5[_0x57e703(0x13e)])['toLocaleString'](_0x57e703(0x13b)),_0x2d1ad3=_0x36abf5[_0x57e703(0x138)]===_0x57e703(0x130)?'√':_0x36abf5[_0x57e703(0x138)]===_0x57e703(0x148)?'×':_0x36abf5[_0x57e703(0x138)]==='warn'?'!':'i';console['log'](_0xa6af68+0x1+'.\x20'+_0x2d1ad3+'\x20['+_0x36abf5['command']+']\x20'+_0x36abf5[_0x57e703(0x143)]),console[_0x57e703(0x132)](_0x57e703(0x147)+_0x5d0760),_0x36abf5[_0x57e703(0x14a)]&&console[_0x57e703(0x132)](_0x57e703(0x139)+_0x36abf5['duration']+'ms'),_0x36abf5['details']&&Object[_0x57e703(0x134)](_0x36abf5['details'])['length']>0x0&&console[_0x57e703(0x132)](_0x57e703(0x13a)+JSON[_0x57e703(0x14d)](_0x36abf5[_0x57e703(0x152)],null,0x2)),console[_0x57e703(0x132)]('');});}export const logsDefinitions=[{'service':a33_0x457d56(0x131),'command':a33_0x457d56(0x150),'description':a33_0x457d56(0x144),'risk':a33_0x457d56(0x13f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x52dc27){const _0x165b2a=a33_0x457d56;return printLogs(logger[_0x165b2a(0x140)]()),{'ok':!![]};}},{'service':a33_0x457d56(0x131),'command':'clear','description':a33_0x457d56(0x142),'risk':a33_0x457d56(0x146),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4cae48){const _0x58b6c5=a33_0x457d56;return logger[_0x58b6c5(0x14c)](),console['log'](_0x58b6c5(0x13c)),{'ok':!![]};}}];
1
+ const a33_0x441cad=a33_0x25f8;(function(_0x16e2a2,_0x294a61){const _0x27cf43=a33_0x25f8,_0x4c6cc8=_0x16e2a2();while(!![]){try{const _0x5d572c=-parseInt(_0x27cf43(0x125))/0x1+-parseInt(_0x27cf43(0x114))/0x2+-parseInt(_0x27cf43(0x11d))/0x3+-parseInt(_0x27cf43(0x132))/0x4+-parseInt(_0x27cf43(0x121))/0x5+parseInt(_0x27cf43(0x11a))/0x6*(-parseInt(_0x27cf43(0x117))/0x7)+parseInt(_0x27cf43(0x130))/0x8*(parseInt(_0x27cf43(0x112))/0x9);if(_0x5d572c===_0x294a61)break;else _0x4c6cc8['push'](_0x4c6cc8['shift']());}catch(_0x16cf32){_0x4c6cc8['push'](_0x4c6cc8['shift']());}}}(a33_0x27b2,0x9a58b));function a33_0x27b2(){const _0x20e265=['stringify','clear','log','\x20logs:\x0a','success','en-US','forEach','830400WpRCrr','logs','3309124osBcBJ','*\x20No\x20logs\x20found','387txmXOX','timestamp','121088YbuwmV','level','write','4072719dyjAaG','warn','read','6wWEEou','readLogs','message','2486646npegiR','clearLogs','show','duration','4262630lHRHfR','error','Clear\x20command\x20history\x20logs','toLocaleString','680147peGyHW','keys','*\x20Logs\x20cleared','\x20\x20\x20Details:\x20'];a33_0x27b2=function(){return _0x20e265;};return a33_0x27b2();}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x25f8(_0x4902c3,_0x13482b){_0x4902c3=_0x4902c3-0x111;const _0x27b26a=a33_0x27b2();let _0x25f857=_0x27b26a[_0x4902c3];return _0x25f857;}function printLogs(_0x2803a2){const _0x267d4f=a33_0x25f8;if(_0x2803a2['length']===0x0){console['log'](_0x267d4f(0x111));return;}console[_0x267d4f(0x12b)]('*\x20'+CLI_DISPLAY_NAME+_0x267d4f(0x12c)),_0x2803a2[_0x267d4f(0x12f)]((_0x61b8ce,_0x2373b7)=>{const _0x2b7071=_0x267d4f,_0x4fb069=new Date(_0x61b8ce[_0x2b7071(0x113)])[_0x2b7071(0x124)](_0x2b7071(0x12e)),_0xdf9e54=_0x61b8ce[_0x2b7071(0x115)]===_0x2b7071(0x12d)?'√':_0x61b8ce[_0x2b7071(0x115)]===_0x2b7071(0x122)?'×':_0x61b8ce[_0x2b7071(0x115)]===_0x2b7071(0x118)?'!':'i';console[_0x2b7071(0x12b)](_0x2373b7+0x1+'.\x20'+_0xdf9e54+'\x20['+_0x61b8ce['command']+']\x20'+_0x61b8ce[_0x2b7071(0x11c)]),console['log']('\x20\x20\x20Time:\x20'+_0x4fb069),_0x61b8ce['duration']&&console[_0x2b7071(0x12b)]('\x20\x20\x20Duration:\x20'+_0x61b8ce[_0x2b7071(0x120)]+'ms'),_0x61b8ce['details']&&Object[_0x2b7071(0x126)](_0x61b8ce['details'])['length']>0x0&&console[_0x2b7071(0x12b)](_0x2b7071(0x128)+JSON[_0x2b7071(0x129)](_0x61b8ce['details'],null,0x2)),console[_0x2b7071(0x12b)]('');});}export const logsDefinitions=[{'service':a33_0x441cad(0x131),'command':a33_0x441cad(0x11f),'description':'View\x20command\x20history\x20logs','risk':a33_0x441cad(0x119),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x445f94){const _0x5b2812=a33_0x441cad;return printLogs(logger[_0x5b2812(0x11b)]()),{'ok':!![]};}},{'service':a33_0x441cad(0x131),'command':a33_0x441cad(0x12a),'description':a33_0x441cad(0x123),'risk':a33_0x441cad(0x116),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2b18ea){const _0x3f6ac7=a33_0x441cad;return logger[_0x3f6ac7(0x11e)](),console['log'](_0x3f6ac7(0x127)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x73eb89=a34_0x2a34;(function(_0x146c84,_0x2b95fc){const _0x34c66d=a34_0x2a34,_0x7ce8e5=_0x146c84();while(!![]){try{const _0x27e9f4=-parseInt(_0x34c66d(0x195))/0x1*(-parseInt(_0x34c66d(0x19c))/0x2)+-parseInt(_0x34c66d(0x198))/0x3*(-parseInt(_0x34c66d(0x188))/0x4)+-parseInt(_0x34c66d(0x196))/0x5+-parseInt(_0x34c66d(0x18e))/0x6+-parseInt(_0x34c66d(0x19d))/0x7+-parseInt(_0x34c66d(0x184))/0x8*(-parseInt(_0x34c66d(0x186))/0x9)+-parseInt(_0x34c66d(0x194))/0xa*(-parseInt(_0x34c66d(0x18b))/0xb);if(_0x27e9f4===_0x2b95fc)break;else _0x7ce8e5['push'](_0x7ce8e5['shift']());}catch(_0x4ce5b6){_0x7ce8e5['push'](_0x7ce8e5['shift']());}}}(a34_0x1615,0x292d6));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';function a34_0x1615(){const _0x4c7d91=['general','filter','image-url','recognize','ocr','description','idCard','trim','form','appCode','/client/uploadFile','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','idcard','Invoice','120168jYEzfN','/client/queryFileUrl','117mZvgOb','scene','4sGpFwV','join','Unsupported\x20OCR\x20scene:\x20','50314NMaDqM','validation','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','1331940YoObDj','POST','build','count','toLowerCase','string','290OYAxAe','1749FSKJhf','1613445QfWuNl','str','912333Mfibiy','filePath','imageFile','/client/ocr','202Xnyszp','667366XkUFxX','IdCard','Publicly\x20accessible\x20image\x20or\x20file\x20URL','imageUrl','fileUrl','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','apiError','invoice','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','body','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','image-file','path','\x20OCR'];a34_0x1615=function(){return _0x4c7d91;};return a34_0x1615();}import{CliErrors}from'../../errors.js';function a34_0x2a34(_0x5293d2,_0x7af1ef){_0x5293d2=_0x5293d2-0x180;const _0x16153f=a34_0x1615();let _0x2a34aa=_0x16153f[_0x5293d2];return _0x2a34aa;}import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0x73eb89(0x1a4),a34_0x73eb89(0x1ab),a34_0x73eb89(0x1b3),a34_0x73eb89(0x1b1)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x73eb89(0x183),'general':'General','form':'Table','idCard':a34_0x73eb89(0x19e)},SCENE_FLAG={'name':a34_0x73eb89(0x187),'type':a34_0x73eb89(0x193),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x73eb89(0x1a5)},IMAGE_FILE_FLAG={'name':a34_0x73eb89(0x1a8),'type':a34_0x73eb89(0x193),'description':a34_0x73eb89(0x1a2)},IMAGE_URL_FLAG={'name':a34_0x73eb89(0x1ad),'type':a34_0x73eb89(0x193),'description':a34_0x73eb89(0x19f)};function normalizeScene(_0x3f4e98){const _0x5eb89a=a34_0x73eb89,_0x46a274=_0x3f4e98[_0x5eb89a(0x1b2)]()[_0x5eb89a(0x192)]();if(_0x46a274===_0x5eb89a(0x182))return _0x5eb89a(0x1b1);if(_0x46a274==='invoice'||_0x46a274==='general'||_0x46a274===_0x5eb89a(0x1b3))return _0x46a274;throw CliErrors['validation'](_0x5eb89a(0x18a)+_0x3f4e98+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x5eb89a(0x189)](',\x20'));}function selectedInputs(_0x248b5d){const _0x43a956=a34_0x73eb89,_0x5bc068=_0x248b5d[_0x43a956(0x197)]('image-file')[_0x43a956(0x1b2)](),_0x3173a2=_0x248b5d[_0x43a956(0x197)](_0x43a956(0x1ad))['trim']();return{'imageFile':_0x5bc068,'imageUrl':_0x3173a2,'count':[_0x5bc068,_0x3173a2][_0x43a956(0x1ac)](Boolean)['length']};}function validateInputSelection(_0x2fb122){const _0x4d1ad7=a34_0x73eb89,_0x1309c9=selectedInputs(_0x2fb122);if(_0x1309c9[_0x4d1ad7(0x191)]!==0x1)throw CliErrors[_0x4d1ad7(0x18c)](_0x4d1ad7(0x1a7));return _0x1309c9;}function withScene(_0x5b1e1e,_0x51bd4f,_0x1a5b6a){const _0x5d2a98=a34_0x73eb89;return{..._0x5b1e1e,'scene':_0x51bd4f,..._0x1a5b6a?{'sourceFile':{'fileName':_0x1a5b6a['fileName'],'filePath':_0x1a5b6a[_0x5d2a98(0x199)]}}:{}};}const ocrRecognize={'service':a34_0x73eb89(0x1af),'command':a34_0x73eb89(0x1ae),'description':a34_0x73eb89(0x181),'risk':'write','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x32803d){const _0x4eb0bc=a34_0x73eb89,_0x5101eb=normalizeScene(_0x32803d[_0x4eb0bc(0x197)]('scene')),_0x5c1fd5=SCENE_TO_LEGACY_TYPE[_0x5101eb],_0x47a50c=validateInputSelection(_0x32803d);if(_0x47a50c[_0x4eb0bc(0x1a0)])return dryRun('POST',_0x4eb0bc(0x19b))['body']({'appCode':_0x32803d['appCode'],'url':_0x47a50c[_0x4eb0bc(0x1a0)],'type':_0x5c1fd5})[_0x4eb0bc(0x1b0)]('Preview:\x20recognize\x20'+_0x5101eb+'\x20OCR\x20from\x20URL')[_0x4eb0bc(0x190)]();const _0x3999b4=requireRuntimeUploadFile(_0x47a50c[_0x4eb0bc(0x19a)],_0x4eb0bc(0x1a8));return dryRun(_0x4eb0bc(0x18f),_0x4eb0bc(0x1b5))[_0x4eb0bc(0x1a6)]({'steps':[{'method':'POST','url':_0x4eb0bc(0x1b5),'body':{'appCode':_0x32803d[_0x4eb0bc(0x1b4)],'multipart':{'file':_0x3999b4}}},{'method':_0x4eb0bc(0x18f),'url':_0x4eb0bc(0x185),'body':{'filePath':'<filePath\x20returned\x20by\x20/client/uploadFile>','downloadFlag':![]}},{'method':_0x4eb0bc(0x18f),'url':'/client/ocr','body':{'appCode':_0x32803d[_0x4eb0bc(0x1b4)],'url':_0x4eb0bc(0x18d),'type':_0x5c1fd5}}]})[_0x4eb0bc(0x1b0)](_0x4eb0bc(0x180)+_0x5101eb+_0x4eb0bc(0x1aa))[_0x4eb0bc(0x190)]();},async 'execute'(_0x6d9d64){const _0x1c3eda=a34_0x73eb89,_0x44c35a=normalizeScene(_0x6d9d64['str']('scene')),_0x187342=SCENE_TO_LEGACY_TYPE[_0x44c35a],_0x4befb1=validateInputSelection(_0x6d9d64);if(_0x4befb1[_0x1c3eda(0x1a0)]){const _0x25f9e0=await recognizeRuntimeOcr(_0x6d9d64[_0x1c3eda(0x1b4)],{'url':_0x4befb1[_0x1c3eda(0x1a0)],'type':_0x187342});return{'ok':!![],'data':withScene(_0x25f9e0,_0x44c35a)};}const _0x4580b7=requireRuntimeUploadFile(_0x4befb1[_0x1c3eda(0x19a)],_0x1c3eda(0x1a8)),_0x29f28c=await uploadRuntimeFile(_0x6d9d64[_0x1c3eda(0x1b4)],_0x4580b7[_0x1c3eda(0x1a9)]);if(!_0x29f28c['filePath'])throw CliErrors['apiError']('File\x20upload\x20response\x20missing\x20filePath.');const _0x2e1109=await queryRuntimeFileUrl(_0x29f28c[_0x1c3eda(0x199)],{'download':![]});if(!_0x2e1109['fileUrl'])throw CliErrors[_0x1c3eda(0x1a3)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x1ad1c3=await recognizeRuntimeOcr(_0x6d9d64['appCode'],{'url':_0x2e1109[_0x1c3eda(0x1a1)],'type':_0x187342});return{'ok':!![],'data':withScene(_0x1ad1c3,_0x44c35a,_0x29f28c)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0x578f6d=a34_0x12bb;(function(_0x187372,_0x493b3f){const _0x275d8d=a34_0x12bb,_0x1c595c=_0x187372();while(!![]){try{const _0x5b7d31=-parseInt(_0x275d8d(0x18e))/0x1+-parseInt(_0x275d8d(0x180))/0x2*(parseInt(_0x275d8d(0x198))/0x3)+parseInt(_0x275d8d(0x170))/0x4*(parseInt(_0x275d8d(0x19d))/0x5)+-parseInt(_0x275d8d(0x16e))/0x6+parseInt(_0x275d8d(0x189))/0x7+-parseInt(_0x275d8d(0x193))/0x8*(parseInt(_0x275d8d(0x185))/0x9)+parseInt(_0x275d8d(0x194))/0xa*(parseInt(_0x275d8d(0x173))/0xb);if(_0x5b7d31===_0x493b3f)break;else _0x1c595c['push'](_0x1c595c['shift']());}catch(_0x498294){_0x1c595c['push'](_0x1c595c['shift']());}}}(a34_0x4c18,0x64c74));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a34_0x12bb(_0x584ab0,_0x367b50){_0x584ab0=_0x584ab0-0x167;const _0x4c18a8=a34_0x4c18();let _0x12bb92=_0x4c18a8[_0x584ab0];return _0x12bb92;}import{dryRun}from'../../framework/dryrun.js';function a34_0x4c18(){const _0x516405=['141010WcAley','image-url','invoice','/client/ocr','916689lWYMxN','imageUrl','imageFile','File\x20upload\x20response\x20missing\x20filePath.','Unsupported\x20OCR\x20scene:\x20','55eSSsrx','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','recognize','apiError','IdCard','/client/uploadFile','image-file','fileUrl','3521892xKxhCa','general','27628qkJKiX','scene','description','2090yRpSlG','POST','<filePath\x20returned\x20by\x20/client/uploadFile>','\x20OCR\x20from\x20URL','idCard','idcard','build','General','File\x20URL\x20response\x20missing\x20fileUrl.','fileName','str','length','Table','4dPvhkP','form','.\x20Supported\x20scenes:\x20','string','path','6010929RaEbct','filePath','appCode','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','1908158DcadsZ','ocr','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','\x20OCR','Invoice','748984zRfuDo','trim','write','body','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','8kMNpqY'];a34_0x4c18=function(){return _0x516405;};return a34_0x4c18();}const SUPPORTED_SCENES=[a34_0x578f6d(0x196),a34_0x578f6d(0x16f),a34_0x578f6d(0x181),a34_0x578f6d(0x177)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x578f6d(0x18d),'general':a34_0x578f6d(0x17a),'form':a34_0x578f6d(0x17f),'idCard':a34_0x578f6d(0x16a)},SCENE_FLAG={'name':a34_0x578f6d(0x171),'type':a34_0x578f6d(0x183),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x578f6d(0x18b)},IMAGE_FILE_FLAG={'name':'image-file','type':a34_0x578f6d(0x183),'description':a34_0x578f6d(0x167)},IMAGE_URL_FLAG={'name':'image-url','type':'string','description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x117ee5){const _0x37d5fb=a34_0x578f6d,_0x44d64d=_0x117ee5[_0x37d5fb(0x18f)]()['toLowerCase']();if(_0x44d64d===_0x37d5fb(0x178))return'idCard';if(_0x44d64d===_0x37d5fb(0x196)||_0x44d64d===_0x37d5fb(0x16f)||_0x44d64d===_0x37d5fb(0x181))return _0x44d64d;throw CliErrors['validation'](_0x37d5fb(0x19c)+_0x117ee5+_0x37d5fb(0x182)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x10a365){const _0x20139b=a34_0x578f6d,_0x47cb69=_0x10a365[_0x20139b(0x17d)]('image-file')[_0x20139b(0x18f)](),_0x1f9c12=_0x10a365[_0x20139b(0x17d)](_0x20139b(0x195))[_0x20139b(0x18f)]();return{'imageFile':_0x47cb69,'imageUrl':_0x1f9c12,'count':[_0x47cb69,_0x1f9c12]['filter'](Boolean)[_0x20139b(0x17e)]};}function validateInputSelection(_0x52622b){const _0x164cc9=selectedInputs(_0x52622b);if(_0x164cc9['count']!==0x1)throw CliErrors['validation']('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x164cc9;}function withScene(_0x1a123e,_0x294ac2,_0xed8015){const _0x24c037=a34_0x578f6d;return{..._0x1a123e,'scene':_0x294ac2,..._0xed8015?{'sourceFile':{'fileName':_0xed8015[_0x24c037(0x17c)],'filePath':_0xed8015[_0x24c037(0x186)]}}:{}};}const ocrRecognize={'service':a34_0x578f6d(0x18a),'command':a34_0x578f6d(0x168),'description':a34_0x578f6d(0x192),'risk':a34_0x578f6d(0x190),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3f8735){const _0x55659b=a34_0x578f6d,_0x10903c=normalizeScene(_0x3f8735[_0x55659b(0x17d)](_0x55659b(0x171))),_0xa07588=SCENE_TO_LEGACY_TYPE[_0x10903c],_0xb59345=validateInputSelection(_0x3f8735);if(_0xb59345[_0x55659b(0x199)])return dryRun('POST',_0x55659b(0x197))[_0x55659b(0x191)]({'appCode':_0x3f8735[_0x55659b(0x187)],'url':_0xb59345[_0x55659b(0x199)],'type':_0xa07588})[_0x55659b(0x172)]('Preview:\x20recognize\x20'+_0x10903c+_0x55659b(0x176))[_0x55659b(0x179)]();const _0x1336f7=requireRuntimeUploadFile(_0xb59345[_0x55659b(0x19a)],_0x55659b(0x16c));return dryRun(_0x55659b(0x174),_0x55659b(0x16b))[_0x55659b(0x191)]({'steps':[{'method':_0x55659b(0x174),'url':_0x55659b(0x16b),'body':{'appCode':_0x3f8735[_0x55659b(0x187)],'multipart':{'file':_0x1336f7}}},{'method':_0x55659b(0x174),'url':'/client/queryFileUrl','body':{'filePath':_0x55659b(0x175),'downloadFlag':![]}},{'method':'POST','url':_0x55659b(0x197),'body':{'appCode':_0x3f8735['appCode'],'url':'<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','type':_0xa07588}}]})[_0x55659b(0x172)](_0x55659b(0x188)+_0x10903c+_0x55659b(0x18c))[_0x55659b(0x179)]();},async 'execute'(_0x57cdd5){const _0x1464d3=a34_0x578f6d,_0x2c98d6=normalizeScene(_0x57cdd5[_0x1464d3(0x17d)](_0x1464d3(0x171))),_0x93f7bb=SCENE_TO_LEGACY_TYPE[_0x2c98d6],_0x4f90ab=validateInputSelection(_0x57cdd5);if(_0x4f90ab['imageUrl']){const _0x5d173b=await recognizeRuntimeOcr(_0x57cdd5['appCode'],{'url':_0x4f90ab[_0x1464d3(0x199)],'type':_0x93f7bb});return{'ok':!![],'data':withScene(_0x5d173b,_0x2c98d6)};}const _0x2585fd=requireRuntimeUploadFile(_0x4f90ab[_0x1464d3(0x19a)],_0x1464d3(0x16c)),_0x3b33a3=await uploadRuntimeFile(_0x57cdd5['appCode'],_0x2585fd[_0x1464d3(0x184)]);if(!_0x3b33a3['filePath'])throw CliErrors[_0x1464d3(0x169)](_0x1464d3(0x19b));const _0x1019bd=await queryRuntimeFileUrl(_0x3b33a3[_0x1464d3(0x186)],{'download':![]});if(!_0x1019bd[_0x1464d3(0x16d)])throw CliErrors[_0x1464d3(0x169)](_0x1464d3(0x17b));const _0x5f081d=await recognizeRuntimeOcr(_0x57cdd5[_0x1464d3(0x187)],{'url':_0x1019bd['fileUrl'],'type':_0x93f7bb});return{'ok':!![],'data':withScene(_0x5f081d,_0x2c98d6,_0x3b33a3)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x414e2a=a35_0x4240;(function(_0x1770e2,_0x158a60){const _0x13f316=a35_0x4240,_0x4ef074=_0x1770e2();while(!![]){try{const _0x55e370=-parseInt(_0x13f316(0xb1))/0x1+parseInt(_0x13f316(0xaa))/0x2+parseInt(_0x13f316(0xb3))/0x3+parseInt(_0x13f316(0x95))/0x4+-parseInt(_0x13f316(0xbb))/0x5+-parseInt(_0x13f316(0xc3))/0x6+parseInt(_0x13f316(0xcf))/0x7;if(_0x55e370===_0x158a60)break;else _0x4ef074['push'](_0x4ef074['shift']());}catch(_0xfe866){_0x4ef074['push'](_0x4ef074['shift']());}}}(a35_0x1b69,0x52625));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x414e2a(0xb8),'type':a35_0x414e2a(0xbc),'description':a35_0x414e2a(0xb9)},FUNCTION_NAME_FLAG={'name':a35_0x414e2a(0xa7),'type':a35_0x414e2a(0xbc),'required':!![],'description':a35_0x414e2a(0x97)},DESCRIPTION_FLAG={'name':a35_0x414e2a(0xcc),'type':a35_0x414e2a(0xbc),'description':a35_0x414e2a(0x9c)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a35_0x414e2a(0xbc),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function normalizeFunctionName(_0x302d6d){const _0x9b99d2=a35_0x414e2a,_0x29e717=String(_0x302d6d||'')[_0x9b99d2(0xc9)]();if(!_0x29e717||!FUNCTION_NAME_PATTERN[_0x9b99d2(0xba)](_0x29e717))throw CliErrors[_0x9b99d2(0xb6)](_0x9b99d2(0xa1));return _0x29e717;}function readScriptFile(_0xaa4111){const _0x556421=a35_0x414e2a;if(!_0xaa4111)throw CliErrors[_0x556421(0xb6)]('File\x20path\x20is\x20required.');if(!existsSync(_0xaa4111))throw CliErrors['validation'](_0x556421(0xa6)+_0xaa4111);if(!statSync(_0xaa4111)['isFile']())throw CliErrors[_0x556421(0xb6)](_0x556421(0xc0)+_0xaa4111);const _0x1235e9=readFileSync(_0xaa4111,_0x556421(0xc7));if(!_0x1235e9[_0x556421(0xc9)]())throw CliErrors[_0x556421(0xb6)](_0x556421(0xac));return _0x1235e9;}function optionalTrimmed(_0x2d8156){const _0xc3ebac=String(_0x2d8156||'')['trim']();return _0xc3ebac||undefined;}function summarizeBff(_0x10304c){const _0xf1145a=a35_0x414e2a;return{'id':_0x10304c['id'],'appCode':_0x10304c[_0xf1145a(0xbf)],'functionName':_0x10304c[_0xf1145a(0xcd)],'description':_0x10304c['description'],'scriptType':_0x10304c[_0xf1145a(0x9b)],'version':_0x10304c[_0xf1145a(0xad)],'gmtModified':_0x10304c[_0xf1145a(0xb0)],'updateTime':_0x10304c[_0xf1145a(0x90)]};}function detailBff(_0x51e603){const _0x48577b=a35_0x414e2a;return{'id':_0x51e603['id'],'appCode':_0x51e603[_0x48577b(0xbf)],'functionName':_0x51e603[_0x48577b(0xcd)],'description':_0x51e603[_0x48577b(0xcc)],'scriptType':_0x51e603[_0x48577b(0x9b)],'scriptContent':_0x51e603[_0x48577b(0xaf)]??'','config':_0x51e603[_0x48577b(0xa9)],'version':_0x51e603[_0x48577b(0xad)],'createUserId':_0x51e603[_0x48577b(0xca)],'gmtCreate':_0x51e603['gmtCreate'],'gmtModified':_0x51e603['gmtModified'],'createTime':_0x51e603[_0x48577b(0xc2)],'updateTime':_0x51e603[_0x48577b(0x90)]};}function buildCreateInput(_0x4df539){const _0x1fdad8=a35_0x414e2a;return{'functionName':normalizeFunctionName(_0x4df539[_0x1fdad8(0xa2)](_0x1fdad8(0xa7))),...optionalTrimmed(_0x4df539[_0x1fdad8(0xa2)](_0x1fdad8(0xcc)))?{'description':optionalTrimmed(_0x4df539['str'](_0x1fdad8(0xcc)))}:{},'scriptContent':readScriptFile(_0x4df539[_0x1fdad8(0xa2)](_0x1fdad8(0xb8))),...optionalTrimmed(_0x4df539[_0x1fdad8(0xa2)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x4df539[_0x1fdad8(0xa2)](_0x1fdad8(0xce)))}:{}};}function a35_0x4240(_0x56d322,_0x1c4454){_0x56d322=_0x56d322-0x8d;const _0x1b6950=a35_0x1b69();let _0x4240af=_0x1b6950[_0x56d322];return _0x4240af;}function a35_0x1b69(){const _0x132a54=['6264692YJpluR','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','params','Executed\x20personal\x20BFF\x20','updateTime','exec','read','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','Preview:\x20update\x20personal\x20BFF\x20','106748LAGlDr','list','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','Preview:\x20create\x20personal\x20BFF\x20','/update','Update\x20a\x20personal\x20BFF\x20by\x20id','scriptType','Personal\x20BFF\x20description','isArray','update','build','high-risk-write','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','str','length','/client/runtime-bff/personal/','body','File\x20not\x20found:\x20','name','Personal\x20BFF\x20script\x20ID','config','948870aXSgpx','/client/runtime-bff/personal/create','Personal\x20BFF\x20script\x20file\x20is\x20blank.','version','Show\x20one\x20personal\x20BFF\x20by\x20id','scriptContent','gmtModified','120159Tnruue','create','809067imwbSa','detail','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','validation','verbose','file','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','test','3254100yBVMrV','string','write','flag','appCode','File\x20is\x20not\x20a\x20regular\x20file:\x20','num','createTime','3344058gAWvOY','POST','bool','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','utf8','personal-bff','trim','createUserId','keys','description','functionName','source-session-id'];a35_0x1b69=function(){return _0x132a54;};return a35_0x1b69();}function buildUpdateInput(_0x14be9a){const _0x3d9610=a35_0x414e2a,_0x51676c={};optionalTrimmed(_0x14be9a[_0x3d9610(0xa2)]('name'))&&(_0x51676c['functionName']=normalizeFunctionName(_0x14be9a['str'](_0x3d9610(0xa7))));_0x14be9a[_0x3d9610(0xbe)](_0x3d9610(0xcc))!==undefined&&(_0x51676c[_0x3d9610(0xcc)]=_0x14be9a[_0x3d9610(0xa2)](_0x3d9610(0xcc)));optionalTrimmed(_0x14be9a[_0x3d9610(0xa2)](_0x3d9610(0xb8)))&&(_0x51676c[_0x3d9610(0xaf)]=readScriptFile(_0x14be9a[_0x3d9610(0xa2)]('file')));_0x14be9a['flag'](_0x3d9610(0xce))!==undefined&&(_0x51676c['sourceSessionId']=_0x14be9a[_0x3d9610(0xa2)](_0x3d9610(0xce)));if(Object[_0x3d9610(0xcb)](_0x51676c)['length']===0x0)throw CliErrors[_0x3d9610(0xb6)](_0x3d9610(0xb5));return _0x51676c;}function parseExecParams(_0x1b5119){const _0x34891f=a35_0x414e2a,_0x497eff=parseJsonParams(_0x1b5119)??{};if(Array[_0x34891f(0x9d)](_0x497eff))throw CliErrors['validation']('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x497eff;}const personalBffList={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0x96),'description':a35_0x414e2a(0x93),'risk':a35_0x414e2a(0x92),'flags':[VERBOSE_FLAG],async 'execute'(_0x53ef21){const _0x5b61fe=a35_0x414e2a,_0x3d9d58=await listPersonalBffs(_0x53ef21['appCode']);return{'ok':!![],'data':{'total':_0x3d9d58[_0x5b61fe(0xa3)],'items':_0x53ef21[_0x5b61fe(0xc5)](_0x5b61fe(0xb7))?_0x3d9d58:_0x3d9d58['map'](summarizeBff)}};}},personalBffDetail={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0xb4),'description':a35_0x414e2a(0xae),'risk':a35_0x414e2a(0x92),'flags':[{...ID_FLAG,'description':a35_0x414e2a(0xa8)}],async 'execute'(_0x35ffce){const _0x37deed=a35_0x414e2a,_0x3b775b=await getPersonalBff(_0x35ffce[_0x37deed(0xc1)]('id'),_0x35ffce['appCode']);return{'ok':!![],'data':detailBff(_0x3b775b)};}},personalBffCreate={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0xb2),'description':a35_0x414e2a(0xc6),'risk':'write','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x564388){const _0x418aae=a35_0x414e2a,_0x232074=buildCreateInput(_0x564388),_0x49559f=await createPersonalBff(_0x564388[_0x418aae(0xbf)],_0x232074);return{'ok':!![],'data':detailBff(_0x49559f),'message':'Created\x20personal\x20BFF\x20'+_0x49559f['id']+(_0x49559f[_0x418aae(0xcd)]?'\x20('+_0x49559f[_0x418aae(0xcd)]+')':'')};},async 'dryRun'(_0x2a44ea){const _0x5ca4fd=a35_0x414e2a,_0x13dfd7=buildCreateInput(_0x2a44ea);return dryRun(_0x5ca4fd(0xc4),_0x5ca4fd(0xab))[_0x5ca4fd(0xa5)]({'appCode':_0x2a44ea['appCode'],..._0x13dfd7})[_0x5ca4fd(0xcc)](_0x5ca4fd(0x98)+_0x13dfd7[_0x5ca4fd(0xcd)])['build']();}},personalBffUpdate={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0x9e),'description':a35_0x414e2a(0x9a),'risk':a35_0x414e2a(0xbd),'flags':[{...ID_FLAG,'description':a35_0x414e2a(0xa8)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x1fb1f1){const _0xf39728=a35_0x414e2a,_0x44ce65=_0x1fb1f1[_0xf39728(0xc1)]('id'),_0x2877a1=buildUpdateInput(_0x1fb1f1),_0x3c8ace=await updatePersonalBff(_0x44ce65,_0x1fb1f1[_0xf39728(0xbf)],_0x2877a1);return{'ok':!![],'data':detailBff(_0x3c8ace),'message':'Updated\x20personal\x20BFF\x20'+_0x3c8ace['id']+(_0x3c8ace[_0xf39728(0xcd)]?'\x20('+_0x3c8ace[_0xf39728(0xcd)]+')':'')};},async 'dryRun'(_0x45af72){const _0x16c80b=a35_0x414e2a,_0x2dbbf9=_0x45af72[_0x16c80b(0xc1)]('id'),_0x4a3fb5=buildUpdateInput(_0x45af72);return dryRun(_0x16c80b(0xc4),_0x16c80b(0xa4)+_0x2dbbf9+_0x16c80b(0x99))[_0x16c80b(0xa5)]({'appCode':_0x45af72[_0x16c80b(0xbf)],..._0x4a3fb5})[_0x16c80b(0xcc)](_0x16c80b(0x94)+_0x2dbbf9)[_0x16c80b(0x9f)]();}},personalBffExec={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0x91),'description':'Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','risk':a35_0x414e2a(0xa0),'flags':[{...ID_FLAG,'description':a35_0x414e2a(0xa8)},{...PARAMS_FLAG,'description':a35_0x414e2a(0x8d)}],async 'validate'(_0x4c95f6){const _0x3038bc=a35_0x414e2a;parseExecParams(_0x4c95f6['str'](_0x3038bc(0x8e)));},async 'execute'(_0x195a37){const _0x116ba9=a35_0x414e2a,_0x387d91=_0x195a37[_0x116ba9(0xc1)]('id'),_0x32e362=parseExecParams(_0x195a37['str'](_0x116ba9(0x8e))),_0x329cd3=await executePersonalBff(_0x387d91,_0x195a37[_0x116ba9(0xbf)],_0x32e362);return{'ok':!![],'data':{'result':_0x329cd3},'message':_0x116ba9(0x8f)+_0x387d91};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x215fcc=a35_0x2af5;(function(_0x178ee9,_0x861a3c){const _0x27108d=a35_0x2af5,_0x3554f6=_0x178ee9();while(!![]){try{const _0x339a58=parseInt(_0x27108d(0x1c3))/0x1*(-parseInt(_0x27108d(0x1b9))/0x2)+-parseInt(_0x27108d(0x189))/0x3*(parseInt(_0x27108d(0x1c4))/0x4)+-parseInt(_0x27108d(0x186))/0x5+-parseInt(_0x27108d(0x19c))/0x6+parseInt(_0x27108d(0x1a0))/0x7*(parseInt(_0x27108d(0x19d))/0x8)+parseInt(_0x27108d(0x19e))/0x9*(-parseInt(_0x27108d(0x1b6))/0xa)+parseInt(_0x27108d(0x195))/0xb*(parseInt(_0x27108d(0x1bf))/0xc);if(_0x339a58===_0x861a3c)break;else _0x3554f6['push'](_0x3554f6['shift']());}catch(_0x12ec45){_0x3554f6['push'](_0x3554f6['shift']());}}}(a35_0x43f7,0xe8959));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x215fcc(0x1af),'type':a35_0x215fcc(0x18a),'description':a35_0x215fcc(0x1be)},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x215fcc(0x18a),'required':!![],'description':'Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':a35_0x215fcc(0x1a5),'type':a35_0x215fcc(0x18a),'description':a35_0x215fcc(0x188)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a35_0x215fcc(0x18a),'description':a35_0x215fcc(0x199)};function normalizeFunctionName(_0x5d456a){const _0x111597=a35_0x215fcc,_0x49c1e7=String(_0x5d456a||'')[_0x111597(0x194)]();if(!_0x49c1e7||!FUNCTION_NAME_PATTERN['test'](_0x49c1e7))throw CliErrors[_0x111597(0x1a4)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x49c1e7;}function readScriptFile(_0x5b2cb3){const _0x22bfd0=a35_0x215fcc;if(!_0x5b2cb3)throw CliErrors[_0x22bfd0(0x1a4)](_0x22bfd0(0x1b8));if(!existsSync(_0x5b2cb3))throw CliErrors[_0x22bfd0(0x1a4)]('File\x20not\x20found:\x20'+_0x5b2cb3);if(!statSync(_0x5b2cb3)[_0x22bfd0(0x1b0)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x5b2cb3);const _0x8528a2=readFileSync(_0x5b2cb3,_0x22bfd0(0x1bd));if(!_0x8528a2['trim']())throw CliErrors[_0x22bfd0(0x1a4)](_0x22bfd0(0x1a8));return _0x8528a2;}function optionalTrimmed(_0x328e9e){const _0x1cd27b=String(_0x328e9e||'')['trim']();return _0x1cd27b||undefined;}function summarizeBff(_0x1fc133){const _0x118e2a=a35_0x215fcc;return{'id':_0x1fc133['id'],'appCode':_0x1fc133[_0x118e2a(0x187)],'functionName':_0x1fc133[_0x118e2a(0x1a3)],'description':_0x1fc133[_0x118e2a(0x1a5)],'scriptType':_0x1fc133[_0x118e2a(0x1ad)],'version':_0x1fc133[_0x118e2a(0x18f)],'gmtModified':_0x1fc133[_0x118e2a(0x1ae)],'updateTime':_0x1fc133['updateTime']};}function detailBff(_0x38a8e1){const _0x35a9eb=a35_0x215fcc;return{'id':_0x38a8e1['id'],'appCode':_0x38a8e1[_0x35a9eb(0x187)],'functionName':_0x38a8e1[_0x35a9eb(0x1a3)],'description':_0x38a8e1[_0x35a9eb(0x1a5)],'scriptType':_0x38a8e1['scriptType'],'scriptContent':_0x38a8e1[_0x35a9eb(0x1aa)]??'','config':_0x38a8e1[_0x35a9eb(0x18e)],'version':_0x38a8e1[_0x35a9eb(0x18f)],'createUserId':_0x38a8e1[_0x35a9eb(0x191)],'gmtCreate':_0x38a8e1[_0x35a9eb(0x181)],'gmtModified':_0x38a8e1['gmtModified'],'createTime':_0x38a8e1[_0x35a9eb(0x190)],'updateTime':_0x38a8e1[_0x35a9eb(0x192)]};}function buildCreateInput(_0x11a5d8){const _0x4a0a79=a35_0x215fcc;return{'functionName':normalizeFunctionName(_0x11a5d8['str']('name')),...optionalTrimmed(_0x11a5d8[_0x4a0a79(0x1bb)](_0x4a0a79(0x1a5)))?{'description':optionalTrimmed(_0x11a5d8[_0x4a0a79(0x1bb)](_0x4a0a79(0x1a5)))}:{},'scriptContent':readScriptFile(_0x11a5d8[_0x4a0a79(0x1bb)](_0x4a0a79(0x1af))),...optionalTrimmed(_0x11a5d8['str'](_0x4a0a79(0x193)))?{'sourceSessionId':optionalTrimmed(_0x11a5d8['str'](_0x4a0a79(0x193)))}:{}};}function a35_0x2af5(_0x129178,_0xe41c04){_0x129178=_0x129178-0x181;const _0x43f719=a35_0x43f7();let _0x2af58c=_0x43f719[_0x129178];return _0x2af58c;}function buildUpdateInput(_0x538825){const _0x265132=a35_0x215fcc,_0x1c10f1={};optionalTrimmed(_0x538825[_0x265132(0x1bb)](_0x265132(0x1a1)))&&(_0x1c10f1['functionName']=normalizeFunctionName(_0x538825[_0x265132(0x1bb)](_0x265132(0x1a1))));_0x538825['flag'](_0x265132(0x1a5))!==undefined&&(_0x1c10f1['description']=_0x538825[_0x265132(0x1bb)](_0x265132(0x1a5)));optionalTrimmed(_0x538825['str'](_0x265132(0x1af)))&&(_0x1c10f1['scriptContent']=readScriptFile(_0x538825[_0x265132(0x1bb)](_0x265132(0x1af))));_0x538825[_0x265132(0x1ab)](_0x265132(0x193))!==undefined&&(_0x1c10f1['sourceSessionId']=_0x538825[_0x265132(0x1bb)]('source-session-id'));if(Object['keys'](_0x1c10f1)['length']===0x0)throw CliErrors[_0x265132(0x1a4)](_0x265132(0x183));return _0x1c10f1;}function a35_0x43f7(){const _0x4ede40=['body','scriptContent','flag','Update\x20a\x20personal\x20BFF\x20by\x20id','scriptType','gmtModified','file','isFile','/client/runtime-bff/personal/','isArray','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','length','530bLgTPC','verbose','File\x20path\x20is\x20required.','4utWjYp','num','str','build','utf8','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','80698212LFdecY','high-risk-write','/client/runtime-bff/personal/create','POST','376819FxxwMu','218512byIwFo','gmtCreate','list','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','create','personal-bff','4827055ZwYrMK','appCode','Personal\x20BFF\x20description','99kSnbLQ','string','Preview:\x20create\x20personal\x20BFF\x20','Preview:\x20update\x20personal\x20BFF\x20','params','config','version','createTime','createUserId','updateTime','source-session-id','trim','11mTYhzg','--params\x20must\x20be\x20a\x20JSON\x20object.','/update','exec','Optional\x20source\x20RuntimeAgent\x20session\x20id','Show\x20one\x20personal\x20BFF\x20by\x20id','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','6638586EoKIBO','120flmnxl','292131rXnufd','Personal\x20BFF\x20script\x20ID','268961AoHSVy','name','update','functionName','validation','description','read','write','Personal\x20BFF\x20script\x20file\x20is\x20blank.'];a35_0x43f7=function(){return _0x4ede40;};return a35_0x43f7();}function parseExecParams(_0x30c434){const _0x251c8e=a35_0x215fcc,_0xde8190=parseJsonParams(_0x30c434)??{};if(Array[_0x251c8e(0x1b2)](_0xde8190))throw CliErrors[_0x251c8e(0x1a4)](_0x251c8e(0x196));return _0xde8190;}const personalBffList={'service':a35_0x215fcc(0x185),'command':a35_0x215fcc(0x182),'description':a35_0x215fcc(0x19b),'risk':a35_0x215fcc(0x1a6),'flags':[VERBOSE_FLAG],async 'execute'(_0x3e8e82){const _0x332197=a35_0x215fcc,_0x5483a6=await listPersonalBffs(_0x3e8e82['appCode']);return{'ok':!![],'data':{'total':_0x5483a6[_0x332197(0x1b5)],'items':_0x3e8e82['bool'](_0x332197(0x1b7))?_0x5483a6:_0x5483a6['map'](summarizeBff)}};}},personalBffDetail={'service':a35_0x215fcc(0x185),'command':'detail','description':a35_0x215fcc(0x19a),'risk':a35_0x215fcc(0x1a6),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x228b3c){const _0x2b1910=await getPersonalBff(_0x228b3c['num']('id'),_0x228b3c['appCode']);return{'ok':!![],'data':detailBff(_0x2b1910)};}},personalBffCreate={'service':'personal-bff','command':a35_0x215fcc(0x184),'description':a35_0x215fcc(0x1b4),'risk':'write','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3a39e8){const _0x30e849=a35_0x215fcc,_0x35ae8=buildCreateInput(_0x3a39e8),_0x373b83=await createPersonalBff(_0x3a39e8[_0x30e849(0x187)],_0x35ae8);return{'ok':!![],'data':detailBff(_0x373b83),'message':'Created\x20personal\x20BFF\x20'+_0x373b83['id']+(_0x373b83[_0x30e849(0x1a3)]?'\x20('+_0x373b83['functionName']+')':'')};},async 'dryRun'(_0x27aeb8){const _0x539278=a35_0x215fcc,_0x4deb58=buildCreateInput(_0x27aeb8);return dryRun(_0x539278(0x1c2),_0x539278(0x1c1))[_0x539278(0x1a9)]({'appCode':_0x27aeb8[_0x539278(0x187)],..._0x4deb58})['description'](_0x539278(0x18b)+_0x4deb58[_0x539278(0x1a3)])[_0x539278(0x1bc)]();}},personalBffUpdate={'service':a35_0x215fcc(0x185),'command':a35_0x215fcc(0x1a2),'description':a35_0x215fcc(0x1ac),'risk':a35_0x215fcc(0x1a7),'flags':[{...ID_FLAG,'description':a35_0x215fcc(0x19f)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x10c161){const _0x4c5a25=a35_0x215fcc,_0x5bb56c=_0x10c161[_0x4c5a25(0x1ba)]('id'),_0xaf8296=buildUpdateInput(_0x10c161),_0x4beaee=await updatePersonalBff(_0x5bb56c,_0x10c161[_0x4c5a25(0x187)],_0xaf8296);return{'ok':!![],'data':detailBff(_0x4beaee),'message':'Updated\x20personal\x20BFF\x20'+_0x4beaee['id']+(_0x4beaee[_0x4c5a25(0x1a3)]?'\x20('+_0x4beaee['functionName']+')':'')};},async 'dryRun'(_0x38b2de){const _0x457001=a35_0x215fcc,_0x527356=_0x38b2de['num']('id'),_0x21c834=buildUpdateInput(_0x38b2de);return dryRun(_0x457001(0x1c2),_0x457001(0x1b1)+_0x527356+_0x457001(0x197))[_0x457001(0x1a9)]({'appCode':_0x38b2de[_0x457001(0x187)],..._0x21c834})['description'](_0x457001(0x18c)+_0x527356)[_0x457001(0x1bc)]();}},personalBffExec={'service':'personal-bff','command':a35_0x215fcc(0x198),'description':a35_0x215fcc(0x1b3),'risk':a35_0x215fcc(0x1c0),'flags':[{...ID_FLAG,'description':a35_0x215fcc(0x19f)},{...PARAMS_FLAG,'description':'JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution'}],async 'validate'(_0x396f90){const _0x562675=a35_0x215fcc;parseExecParams(_0x396f90[_0x562675(0x1bb)](_0x562675(0x18d)));},async 'execute'(_0x24c9d5){const _0x1c7a76=a35_0x215fcc,_0x4e62f6=_0x24c9d5[_0x1c7a76(0x1ba)]('id'),_0x365324=parseExecParams(_0x24c9d5[_0x1c7a76(0x1bb)](_0x1c7a76(0x18d))),_0x261af3=await executePersonalBff(_0x4e62f6,_0x24c9d5[_0x1c7a76(0x187)],_0x365324);return{'ok':!![],'data':{'result':_0x261af3},'message':'Executed\x20personal\x20BFF\x20'+_0x4e62f6};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x9ad159=a36_0x25dc;(function(_0x9a1ee4,_0x1710a3){const _0x1b2eb8=a36_0x25dc,_0x81fcf1=_0x9a1ee4();while(!![]){try{const _0x59250f=-parseInt(_0x1b2eb8(0x1ec))/0x1*(parseInt(_0x1b2eb8(0x1ff))/0x2)+parseInt(_0x1b2eb8(0x1f7))/0x3*(parseInt(_0x1b2eb8(0x201))/0x4)+-parseInt(_0x1b2eb8(0x217))/0x5*(parseInt(_0x1b2eb8(0x1fb))/0x6)+-parseInt(_0x1b2eb8(0x1f2))/0x7+-parseInt(_0x1b2eb8(0x20a))/0x8*(-parseInt(_0x1b2eb8(0x208))/0x9)+parseInt(_0x1b2eb8(0x1fa))/0xa+parseInt(_0x1b2eb8(0x1fe))/0xb*(parseInt(_0x1b2eb8(0x1f1))/0xc);if(_0x59250f===_0x1710a3)break;else _0x81fcf1['push'](_0x81fcf1['shift']());}catch(_0x535636){_0x81fcf1['push'](_0x81fcf1['shift']());}}}(a36_0xa52b,0x68dfd));import{authDefinitions}from'../commands/auth/index.js';function a36_0x25dc(_0x314f6b,_0x45818e){_0x314f6b=_0x314f6b-0x1e8;const _0xa52bfd=a36_0xa52b();let _0x25dc78=_0xa52bfd[_0x314f6b];return _0x25dc78;}import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x25f9ec){const _0x374535=a36_0x25dc;for(const _0x4da47f of _0x25f9ec){definitions['set'](_0x4da47f['service']+':'+_0x4da47f[_0x374535(0x203)],_0x4da47f);let _0x2429ab=serviceGroups[_0x374535(0x211)](_0x4da47f['service']);!_0x2429ab&&(_0x2429ab=[],serviceGroups['set'](_0x4da47f[_0x374535(0x1e9)],_0x2429ab)),_0x2429ab[_0x374535(0x1ed)](_0x4da47f);}}function registerService(_0x3783f9,_0x43760d,_0x14de47){const _0x1a002d=a36_0x25dc;registerDefinitions(_0x43760d);const _0x1e26ed=_0xf2f969=>_0xf2f969===_0x1a002d(0x20e)?'':_0xf2f969==='write'?_0x1a002d(0x1f8):'\x20\x20[high-risk-write]',_0x28a84f={'service':_0x43760d[0x0][_0x1a002d(0x1e9)],'label':_0x3783f9,'commands':_0x43760d['map'](_0x30b9ad=>({'command':_0x30b9ad[_0x1a002d(0x203)],'description':_0x30b9ad[_0x1a002d(0x1ea)],'tag':_0x1e26ed(_0x30b9ad[_0x1a002d(0x204)])})),'defaultCommand':_0x14de47?.[_0x1a002d(0x213)]??(_0x14de47?.['isSingleCommand']?_0x43760d[0x0][_0x1a002d(0x203)]:undefined),'isSingleCommand':_0x14de47?.[_0x1a002d(0x209)]};serviceRegistry[_0x1a002d(0x1ed)](_0x28a84f),serviceByName['set'](_0x28a84f[_0x1a002d(0x1e9)],_0x28a84f);}registerService(a36_0x9ad159(0x1f5),authDefinitions,{'defaultCommand':a36_0x9ad159(0x1ee)}),registerService(a36_0x9ad159(0x215),appDefinitions,{'defaultCommand':a36_0x9ad159(0x214)}),registerService(a36_0x9ad159(0x216),workspaceDefinitions),registerService(a36_0x9ad159(0x1e8),appConfigDefinitions),registerService(a36_0x9ad159(0x210),configDefinitions,{'defaultCommand':a36_0x9ad159(0x214)}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x9ad159(0x1fc),datasetDefinitions),registerService(a36_0x9ad159(0x1f0),dataDefinitions),registerService(a36_0x9ad159(0x212),sqlDefinitions),registerService(a36_0x9ad159(0x1f4),bffDefinitions),registerService(a36_0x9ad159(0x205),personalBffDefinitions),registerService(a36_0x9ad159(0x1ef),artifactDefinitions),registerService(a36_0x9ad159(0x20d),fileDefinitions),registerService(a36_0x9ad159(0x20f),ocrDefinitions),registerService(a36_0x9ad159(0x1f3),kbDefinitions),registerService(a36_0x9ad159(0x1fd),scheduleDefinitions,{'defaultCommand':a36_0x9ad159(0x214)}),registerService(a36_0x9ad159(0x1eb),serviceDefinitions,{'defaultCommand':a36_0x9ad159(0x214)}),registerService('Skills',skillDefinitions,{'defaultCommand':'install'}),registerService(a36_0x9ad159(0x202),cliSkillDefinitions,{'defaultCommand':a36_0x9ad159(0x20b)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a36_0x9ad159(0x1f6),'isSingleCommand':!![]}),registerService(a36_0x9ad159(0x206),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x9ad159(0x1f9),[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x143b70,_0xaf3535){const _0x542128=a36_0x9ad159;return definitions[_0x542128(0x211)](_0x143b70+':'+_0xaf3535);}export function isKnownService(_0x356b01){const _0x3c7cea=a36_0x9ad159;return serviceByName[_0x3c7cea(0x200)](_0x356b01);}export function getServiceEntry(_0x149c26){const _0x1899a0=a36_0x9ad159;return serviceByName[_0x1899a0(0x211)](_0x149c26);}function a36_0xa52b(){const _0x2f60c7=['risk','Personal\x20BFF','Diagnostics','from','9arUDQJ','isSingleCommand','4531448bveTeZ','install','values','File','read','OCR','Configuration','get','SQL\x20Queries','defaultCommand','list','App\x20Management','Workspace','10hdIaHx','Runtime\x20App\x20Config','service','description','Service\x20Tree','1019SNdzuC','push','login','Artifacts','Instant\x20API','264BQhhEN','379988CUWJqX','Knowledge\x20Base','BFF\x20Scripts','Authentication','run','3TeuHdF','\x20\x20[write]','Schema','1487280wGogLJ','2199138zmXZmK','Datasets','Agent\x20Schedules','111980sZspas','254FDMyIb','has','1628756FefuoN','CLI\x20Built-in\x20Skill','command'];a36_0xa52b=function(){return _0x2f60c7;};return a36_0xa52b();}export function getAllDefinitions(){const _0x1ff463=a36_0x9ad159;return Array[_0x1ff463(0x207)](definitions[_0x1ff463(0x20c)]());}
1
+ const a36_0x412a37=a36_0x484b;(function(_0x34a26d,_0x1360fa){const _0x402c9e=a36_0x484b,_0x59d42b=_0x34a26d();while(!![]){try{const _0x4c76db=-parseInt(_0x402c9e(0xcd))/0x1*(parseInt(_0x402c9e(0xe9))/0x2)+-parseInt(_0x402c9e(0xf5))/0x3*(parseInt(_0x402c9e(0xf0))/0x4)+parseInt(_0x402c9e(0xcb))/0x5+parseInt(_0x402c9e(0xd7))/0x6+parseInt(_0x402c9e(0xde))/0x7*(parseInt(_0x402c9e(0xd2))/0x8)+-parseInt(_0x402c9e(0xea))/0x9+parseInt(_0x402c9e(0xe5))/0xa;if(_0x4c76db===_0x1360fa)break;else _0x59d42b['push'](_0x59d42b['shift']());}catch(_0x3dc33c){_0x59d42b['push'](_0x59d42b['shift']());}}}(a36_0x44db,0x379c1));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';function a36_0x484b(_0x4185bd,_0x589114){_0x4185bd=_0x4185bd-0xcb;const _0x44db4b=a36_0x44db();let _0x484b2f=_0x44db4b[_0x4185bd];return _0x484b2f;}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_0x44db(){const _0x251369=['424983WpVwhl','1906355SYZypn','service','225253nlePzh','risk','Agent\x20Schedules','install','App\x20Management','1024lSyfUG','Personal\x20BFF','Skills','values','CLI\x20Built-in\x20Skill','1105638XhSbDK','read','write','Diagnostics','map','Knowledge\x20Base','\x20\x20[high-risk-write]','1169AhlzEi','push','from','command','API\x20Documentation','Configuration','Authentication','449940TxQiMj','set','isSingleCommand','get','2apGmcl','335007SdlZRH','Datasets','OCR','description','Workspace','Instant\x20API','4uQvqHj','Self\x20Update','File','Runtime\x20App\x20Config','list'];a36_0x44db=function(){return _0x251369;};return a36_0x44db();}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x406216){const _0x33df81=a36_0x484b;for(const _0x2a0752 of _0x406216){definitions[_0x33df81(0xe6)](_0x2a0752[_0x33df81(0xcc)]+':'+_0x2a0752[_0x33df81(0xe1)],_0x2a0752);let _0x1b1996=serviceGroups['get'](_0x2a0752['service']);!_0x1b1996&&(_0x1b1996=[],serviceGroups[_0x33df81(0xe6)](_0x2a0752[_0x33df81(0xcc)],_0x1b1996)),_0x1b1996[_0x33df81(0xdf)](_0x2a0752);}}function registerService(_0x5b7b13,_0x490e19,_0x3a014e){const _0x3ae3e9=a36_0x484b;registerDefinitions(_0x490e19);const _0x3870e3=_0x3b4334=>_0x3b4334===_0x3ae3e9(0xd8)?'':_0x3b4334===_0x3ae3e9(0xd9)?'\x20\x20[write]':_0x3ae3e9(0xdd),_0x889ff8={'service':_0x490e19[0x0][_0x3ae3e9(0xcc)],'label':_0x5b7b13,'commands':_0x490e19[_0x3ae3e9(0xdb)](_0x11044c=>({'command':_0x11044c[_0x3ae3e9(0xe1)],'description':_0x11044c[_0x3ae3e9(0xed)],'tag':_0x3870e3(_0x11044c[_0x3ae3e9(0xce)])})),'defaultCommand':_0x3a014e?.['defaultCommand']??(_0x3a014e?.[_0x3ae3e9(0xe7)]?_0x490e19[0x0][_0x3ae3e9(0xe1)]:undefined),'isSingleCommand':_0x3a014e?.[_0x3ae3e9(0xe7)]};serviceRegistry[_0x3ae3e9(0xdf)](_0x889ff8),serviceByName['set'](_0x889ff8[_0x3ae3e9(0xcc)],_0x889ff8);}registerService(a36_0x412a37(0xe4),authDefinitions,{'defaultCommand':'login'}),registerService(a36_0x412a37(0xd1),appDefinitions,{'defaultCommand':a36_0x412a37(0xf4)}),registerService(a36_0x412a37(0xee),workspaceDefinitions),registerService(a36_0x412a37(0xf3),appConfigDefinitions),registerService(a36_0x412a37(0xe3),configDefinitions,{'defaultCommand':'list'}),registerService(a36_0x412a37(0xe2),apiDocDefinitions),registerService(a36_0x412a37(0xeb),datasetDefinitions),registerService(a36_0x412a37(0xef),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService(a36_0x412a37(0xd3),personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a36_0x412a37(0xf2),fileDefinitions),registerService(a36_0x412a37(0xec),ocrDefinitions),registerService(a36_0x412a37(0xdc),kbDefinitions),registerService(a36_0x412a37(0xcf),scheduleDefinitions,{'defaultCommand':a36_0x412a37(0xf4)}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':a36_0x412a37(0xf4)}),registerService(a36_0x412a37(0xd4),skillDefinitions,{'defaultCommand':a36_0x412a37(0xd0)}),registerService(a36_0x412a37(0xd6),cliSkillDefinitions,{'defaultCommand':a36_0x412a37(0xd0)}),registerService(a36_0x412a37(0xf1),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a36_0x412a37(0xda),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x614a0c,_0x304cd9){const _0xb1669=a36_0x412a37;return definitions[_0xb1669(0xe8)](_0x614a0c+':'+_0x304cd9);}export function isKnownService(_0x376a39){return serviceByName['has'](_0x376a39);}export function getServiceEntry(_0xb9e595){const _0x162c68=a36_0x412a37;return serviceByName[_0x162c68(0xe8)](_0xb9e595);}export function getAllDefinitions(){const _0x3234ba=a36_0x412a37;return Array[_0x3234ba(0xe0)](definitions[_0x3234ba(0xd5)]());}
@@ -1 +1 @@
1
- function a37_0x5aeb(){const _0x3dfdf3=['number','create','\x20from\x20schedule\x20','3413963XxpEle','ONCE','read','Deleted\x20schedule\x20','prompt','Queued\x20Task\x20','validation','Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','schedule','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','667014bumKrW','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','high-risk-write','string','\x20immediately','207776HajOAJ','Created\x20','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','isSafeInteger','validate','description','UTC','/run','--title\x20must\x20not\x20be\x20blank.','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','Schedule\x20input\x20is\x20valid','kind','CRON','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','28062WbHgeY','limit','\x20schedule\x20','str','Schedule\x20title','2025NCpTsW','body','3056OWqCrk','cron','length','auto','Preview:\x20create\x20an\x20Agent\x20schedule','982602kIaslC','appCode','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','Preview:\x20run\x20schedule\x20','--prompt\x20must\x20not\x20be\x20blank.','Preview:\x20delete\x20schedule\x20','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','premium','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','DELETE','channel','Page\x20size\x20from\x201\x20to\x20100','run','scheduleId','276XqgLKf','schedule-id','/schedules','title','trim','build','2214015pCpQsa','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','cursor','delete','Schedule\x20UUID'];a37_0x5aeb=function(){return _0x3dfdf3;};return a37_0x5aeb();}const a37_0x2ed6a6=a37_0x4def;(function(_0x47d81d,_0x44e945){const _0x240d80=a37_0x4def,_0x3abf04=_0x47d81d();while(!![]){try{const _0x2bdd36=-parseInt(_0x240d80(0x131))/0x1*(-parseInt(_0x240d80(0x146))/0x2)+parseInt(_0x240d80(0x118))/0x3+parseInt(_0x240d80(0x11d))/0x4+parseInt(_0x240d80(0x14c))/0x5+parseInt(_0x240d80(0x138))/0x6+parseInt(_0x240d80(0x154))/0x7+-parseInt(_0x240d80(0x133))/0x8*(parseInt(_0x240d80(0x12c))/0x9);if(_0x2bdd36===_0x44e945)break;else _0x3abf04['push'](_0x3abf04['shift']());}catch(_0x9aabb1){_0x3abf04['push'](_0x3abf04['shift']());}}}(a37_0x5aeb,0x6f8e7));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a37_0x4def(_0x5b0c25,_0x296e32){_0x5b0c25=_0x5b0c25-0x114;const _0x5aebce=a37_0x5aeb();let _0x4def79=_0x5aebce[_0x5b0c25];return _0x4def79;}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':'kind','type':a37_0x2ed6a6(0x11b),'required':!![],'enum':[a37_0x2ed6a6(0x12a),a37_0x2ed6a6(0x155)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':'cron','type':'string','description':a37_0x2ed6a6(0x13e)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':a37_0x2ed6a6(0x11b),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':'title','type':a37_0x2ed6a6(0x11b),'required':!![],'description':a37_0x2ed6a6(0x130)},PROMPT_FLAG={'name':a37_0x2ed6a6(0x158),'type':a37_0x2ed6a6(0x11b),'required':!![],'description':a37_0x2ed6a6(0x14d)},CHANNEL_FLAG={'name':a37_0x2ed6a6(0x142),'type':a37_0x2ed6a6(0x11b),'enum':[a37_0x2ed6a6(0x136),a37_0x2ed6a6(0x13f)],'default':a37_0x2ed6a6(0x136),'description':'Task\x20channel:\x20auto\x20or\x20premium'},SCHEDULE_ID_FLAG={'name':'schedule-id','type':'string','required':!![],'description':a37_0x2ed6a6(0x150),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':'limit','type':a37_0x2ed6a6(0x151),'default':0x14,'description':a37_0x2ed6a6(0x143)},CURSOR_FLAG={'name':a37_0x2ed6a6(0x14e),'type':a37_0x2ed6a6(0x11b),'description':a37_0x2ed6a6(0x140)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x5d21ca){const _0x593ee8=a37_0x2ed6a6,_0x362f9c=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x129)),_0x3c7253=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x149))[_0x593ee8(0x14a)](),_0x49324d=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x158))[_0x593ee8(0x14a)](),_0x584148=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x142)),_0x488a58=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x134)),_0x319970=_0x5d21ca[_0x593ee8(0x12f)]('scheduled-at');if(!_0x3c7253)throw CliErrors[_0x593ee8(0x15a)](_0x593ee8(0x125));if(!_0x49324d)throw CliErrors[_0x593ee8(0x15a)](_0x593ee8(0x13c));if(_0x362f9c===_0x593ee8(0x12a)){if(!_0x488a58||_0x319970)throw CliErrors[_0x593ee8(0x15a)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x362f9c,'timezone':_0x593ee8(0x123),'cron':_0x488a58,'title':_0x3c7253,'prompt':_0x49324d,'channel':_0x584148};}if(_0x362f9c==='ONCE'){if(!_0x319970||_0x488a58)throw CliErrors[_0x593ee8(0x15a)](_0x593ee8(0x126));return{'kind':_0x362f9c,'timezone':_0x593ee8(0x123),'scheduledAt':_0x319970,'title':_0x3c7253,'prompt':_0x49324d,'channel':_0x584148};}throw CliErrors[_0x593ee8(0x15a)](_0x593ee8(0x11f));}function scheduleCollectionPath(_0x48d28f){const _0x17a59a=a37_0x2ed6a6;return'/api/harness/apps/'+encodeURIComponent(_0x48d28f)+_0x17a59a(0x148);}function scheduleItemPath(_0x13eb32,_0x546c48){return scheduleCollectionPath(_0x13eb32)+'/'+encodeURIComponent(_0x546c48);}const scheduleValidate={'service':a37_0x2ed6a6(0x115),'command':a37_0x2ed6a6(0x121),'description':a37_0x2ed6a6(0x116),'risk':a37_0x2ed6a6(0x156),'flags':INPUT_FLAGS,async 'validate'(_0x42c97e){readScheduleInput(_0x42c97e);},async 'execute'(_0x49287e){const _0x56961f=a37_0x2ed6a6,_0x55b24f=readScheduleInput(_0x49287e),_0x52ec5b=await validateRuntimeSchedule(_0x49287e[_0x56961f(0x139)],_0x55b24f);return{'ok':!![],'data':_0x52ec5b,'message':_0x56961f(0x128)};}},scheduleCreate={'service':a37_0x2ed6a6(0x115),'command':a37_0x2ed6a6(0x152),'description':a37_0x2ed6a6(0x127),'risk':'high-risk-write','flags':INPUT_FLAGS,async 'validate'(_0x327a8c){readScheduleInput(_0x327a8c);},async 'execute'(_0x294ae2){const _0x48bfc6=a37_0x2ed6a6,_0x47d2cb=readScheduleInput(_0x294ae2),_0x4f6ea7=await validateRuntimeSchedule(_0x294ae2[_0x48bfc6(0x139)],_0x47d2cb),_0x311d64=await createRuntimeSchedule(_0x294ae2[_0x48bfc6(0x139)],_0x4f6ea7);return{'ok':!![],'data':_0x311d64,'message':_0x48bfc6(0x11e)+_0x311d64[_0x48bfc6(0x129)]+_0x48bfc6(0x12e)+_0x311d64[_0x48bfc6(0x145)]};},async 'dryRun'(_0x536c39){const _0x5a1628=a37_0x2ed6a6,_0x122138=readScheduleInput(_0x536c39);return dryRun('POST',scheduleCollectionPath(_0x536c39[_0x5a1628(0x139)]))[_0x5a1628(0x132)](_0x122138)['description'](_0x5a1628(0x137))['build']();}},scheduleList={'service':a37_0x2ed6a6(0x115),'command':'list','description':a37_0x2ed6a6(0x119),'risk':a37_0x2ed6a6(0x156),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3a1747){const _0x1589a3=a37_0x2ed6a6,_0x33f5f1=_0x3a1747['num'](_0x1589a3(0x12d));if(!Number[_0x1589a3(0x120)](_0x33f5f1)||_0x33f5f1<0x1||_0x33f5f1>0x64)throw CliErrors['validation'](_0x1589a3(0x12b));const _0x2804e5=_0x3a1747['str']('cursor');if(_0x2804e5&&(_0x2804e5[_0x1589a3(0x135)]>0x400||_0x2804e5[_0x1589a3(0x14a)]()!==_0x2804e5))throw CliErrors[_0x1589a3(0x15a)](_0x1589a3(0x117));},async 'execute'(_0x3ac83b){const _0x485b78=a37_0x2ed6a6,_0x585dd2=_0x3ac83b['str'](_0x485b78(0x14e)),_0x160e2e=await listRuntimeSchedules(_0x3ac83b[_0x485b78(0x139)],{'limit':_0x3ac83b['num'](_0x485b78(0x12d)),..._0x585dd2?{'cursor':_0x585dd2}:{}});return{'ok':!![],'data':_0x160e2e};}},scheduleDetail={'service':a37_0x2ed6a6(0x115),'command':'detail','description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a37_0x2ed6a6(0x156),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1e382a){const _0x12acaa=a37_0x2ed6a6,_0x471450=await getRuntimeSchedule(_0x1e382a[_0x12acaa(0x139)],_0x1e382a['str'](_0x12acaa(0x147)));return{'ok':!![],'data':_0x471450};}},scheduleRun={'service':a37_0x2ed6a6(0x115),'command':a37_0x2ed6a6(0x144),'description':a37_0x2ed6a6(0x114),'risk':a37_0x2ed6a6(0x11a),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2ed1a6){const _0x40e7ee=a37_0x2ed6a6,_0x2aeda1=_0x2ed1a6[_0x40e7ee(0x12f)](_0x40e7ee(0x147)),_0x2ee78f=await runRuntimeSchedule(_0x2ed1a6[_0x40e7ee(0x139)],_0x2aeda1);return{'ok':!![],'data':_0x2ee78f,'message':_0x40e7ee(0x159)+_0x2ee78f['taskId']+_0x40e7ee(0x153)+_0x2aeda1};},async 'dryRun'(_0x5a1668){const _0x535add=a37_0x2ed6a6,_0x1701e9=_0x5a1668[_0x535add(0x12f)]('schedule-id');return dryRun('POST',scheduleItemPath(_0x5a1668[_0x535add(0x139)],_0x1701e9)+_0x535add(0x124))[_0x535add(0x122)](_0x535add(0x13b)+_0x1701e9+_0x535add(0x11c))[_0x535add(0x14b)]();}},scheduleDelete={'service':'schedule','command':a37_0x2ed6a6(0x14f),'description':a37_0x2ed6a6(0x13a),'risk':a37_0x2ed6a6(0x11a),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x82e441){const _0x2cd24f=a37_0x2ed6a6,_0x1985b7=_0x82e441['str'](_0x2cd24f(0x147)),_0x570718=await deleteRuntimeSchedule(_0x82e441[_0x2cd24f(0x139)],_0x1985b7);return{'ok':!![],'data':_0x570718,'message':_0x2cd24f(0x157)+_0x1985b7};},async 'dryRun'(_0x1dbf0f){const _0x20c2c9=a37_0x2ed6a6,_0x5fc726=_0x1dbf0f[_0x20c2c9(0x12f)](_0x20c2c9(0x147));return dryRun(_0x20c2c9(0x141),scheduleItemPath(_0x1dbf0f[_0x20c2c9(0x139)],_0x5fc726))[_0x20c2c9(0x122)](_0x20c2c9(0x13d)+_0x5fc726)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a37_0x550965=a37_0xc3cf;(function(_0xfec908,_0x50623a){const _0x8e596a=a37_0xc3cf,_0x368042=_0xfec908();while(!![]){try{const _0x1b04b6=-parseInt(_0x8e596a(0xec))/0x1+parseInt(_0x8e596a(0x103))/0x2*(-parseInt(_0x8e596a(0x109))/0x3)+-parseInt(_0x8e596a(0xf3))/0x4+parseInt(_0x8e596a(0xea))/0x5+parseInt(_0x8e596a(0x101))/0x6+parseInt(_0x8e596a(0xf0))/0x7+parseInt(_0x8e596a(0xfb))/0x8*(-parseInt(_0x8e596a(0xdb))/0x9);if(_0x1b04b6===_0x50623a)break;else _0x368042['push'](_0x368042['shift']());}catch(_0x3bfa12){_0x368042['push'](_0x368042['shift']());}}}(a37_0x3855,0xb4bdc));function a37_0x3855(){const _0x4e2c74=['--title\x20must\x20not\x20be\x20blank.','validation','1610084pazIur','Task\x20channel:\x20auto\x20or\x20premium','/run','detail','schedule','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','number','create','56gNAVhr','\x20immediately','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','/api/harness/apps/','body','prompt','4538502aWqoVL','read','4UYjzeS','cron','high-risk-write','validate','description','isSafeInteger','174897BkpJmS','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','length','Show\x20one\x20schedule\x20by\x20schedule\x20ID','\x20schedule\x20','Schedule\x20title','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','DELETE','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','Preview:\x20create\x20an\x20Agent\x20schedule','appCode','trim','Created\x20','Queued\x20Task\x20','--prompt\x20must\x20not\x20be\x20blank.','num','channel','POST','title','CRON','1322901fKLLzJ','UTC','scheduled-at','string','auto','\x20from\x20schedule\x20','cursor','Page\x20size\x20from\x201\x20to\x20100','str','/schedules','limit','schedule-id','taskId','Preview:\x20run\x20schedule\x20','ONCE','4181025PsYftn','run','173961jelcdI','kind','build','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','6087879sKYGbq'];a37_0x3855=function(){return _0x4e2c74;};return a37_0x3855();}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_0x550965(0xed),'type':a37_0x550965(0xde),'required':!![],'enum':[a37_0x550965(0xda),a37_0x550965(0xe9)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a37_0x550965(0x104),'type':a37_0x550965(0xde),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a37_0x550965(0xdd),'type':a37_0x550965(0xde),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x550965(0xd9),'type':a37_0x550965(0xde),'required':!![],'description':a37_0x550965(0x10e)},PROMPT_FLAG={'name':a37_0x550965(0x100),'type':a37_0x550965(0xde),'required':!![],'description':a37_0x550965(0xfd)},CHANNEL_FLAG={'name':a37_0x550965(0xd7),'type':a37_0x550965(0xde),'enum':[a37_0x550965(0xdf),'premium'],'default':a37_0x550965(0xdf),'description':a37_0x550965(0xf4)},SCHEDULE_ID_FLAG={'name':a37_0x550965(0xe6),'type':a37_0x550965(0xde),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x550965(0xf8)}},LIMIT_FLAG={'name':a37_0x550965(0xe5),'type':a37_0x550965(0xf9),'default':0x14,'description':a37_0x550965(0xe2)},CURSOR_FLAG={'name':a37_0x550965(0xe1),'type':a37_0x550965(0xde),'description':'Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call'},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x100393){const _0x11f2c0=a37_0x550965,_0x22df59=_0x100393[_0x11f2c0(0xe3)](_0x11f2c0(0xed)),_0x2c24ff=_0x100393['str'](_0x11f2c0(0xd9))[_0x11f2c0(0xd2)](),_0x3057ec=_0x100393['str'](_0x11f2c0(0x100))[_0x11f2c0(0xd2)](),_0x575749=_0x100393[_0x11f2c0(0xe3)](_0x11f2c0(0xd7)),_0xa1f35c=_0x100393['str'](_0x11f2c0(0x104)),_0xa94f1a=_0x100393[_0x11f2c0(0xe3)](_0x11f2c0(0xdd));if(!_0x2c24ff)throw CliErrors['validation'](_0x11f2c0(0xf1));if(!_0x3057ec)throw CliErrors[_0x11f2c0(0xf2)](_0x11f2c0(0xd5));if(_0x22df59===_0x11f2c0(0xda)){if(!_0xa1f35c||_0xa94f1a)throw CliErrors['validation']('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x22df59,'timezone':_0x11f2c0(0xdc),'cron':_0xa1f35c,'title':_0x2c24ff,'prompt':_0x3057ec,'channel':_0x575749};}if(_0x22df59===_0x11f2c0(0xe9)){if(!_0xa94f1a||_0xa1f35c)throw CliErrors[_0x11f2c0(0xf2)](_0x11f2c0(0x111));return{'kind':_0x22df59,'timezone':'UTC','scheduledAt':_0xa94f1a,'title':_0x2c24ff,'prompt':_0x3057ec,'channel':_0x575749};}throw CliErrors['validation']('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function a37_0xc3cf(_0x168cfa,_0x33c0dd){_0x168cfa=_0x168cfa-0xd0;const _0x385542=a37_0x3855();let _0xc3cf71=_0x385542[_0x168cfa];return _0xc3cf71;}function scheduleCollectionPath(_0x2eab91){const _0x49284c=a37_0x550965;return _0x49284c(0xfe)+encodeURIComponent(_0x2eab91)+_0x49284c(0xe4);}function scheduleItemPath(_0x9df01f,_0x4e1aa4){return scheduleCollectionPath(_0x9df01f)+'/'+encodeURIComponent(_0x4e1aa4);}const scheduleValidate={'service':'schedule','command':a37_0x550965(0x106),'description':a37_0x550965(0x10a),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x460253){readScheduleInput(_0x460253);},async 'execute'(_0x78d354){const _0x2ed087=a37_0x550965,_0x1cf0d1=readScheduleInput(_0x78d354),_0x5a207f=await validateRuntimeSchedule(_0x78d354[_0x2ed087(0xd1)],_0x1cf0d1);return{'ok':!![],'data':_0x5a207f,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a37_0x550965(0xf7),'command':a37_0x550965(0xfa),'description':a37_0x550965(0x10f),'risk':'high-risk-write','flags':INPUT_FLAGS,async 'validate'(_0xe76da0){readScheduleInput(_0xe76da0);},async 'execute'(_0x30912e){const _0x4153fb=a37_0x550965,_0xdd8f72=readScheduleInput(_0x30912e),_0x467d14=await validateRuntimeSchedule(_0x30912e[_0x4153fb(0xd1)],_0xdd8f72),_0x434c3a=await createRuntimeSchedule(_0x30912e[_0x4153fb(0xd1)],_0x467d14);return{'ok':!![],'data':_0x434c3a,'message':_0x4153fb(0xd3)+_0x434c3a[_0x4153fb(0xed)]+_0x4153fb(0x10d)+_0x434c3a['scheduleId']};},async 'dryRun'(_0x2584ca){const _0x20dbf7=a37_0x550965,_0x23761d=readScheduleInput(_0x2584ca);return dryRun('POST',scheduleCollectionPath(_0x2584ca[_0x20dbf7(0xd1)]))[_0x20dbf7(0xff)](_0x23761d)[_0x20dbf7(0x107)](_0x20dbf7(0xd0))[_0x20dbf7(0xee)]();}},scheduleList={'service':a37_0x550965(0xf7),'command':'list','description':a37_0x550965(0x110),'risk':a37_0x550965(0x102),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x2d8531){const _0x382356=a37_0x550965,_0x12c427=_0x2d8531['num']('limit');if(!Number[_0x382356(0x108)](_0x12c427)||_0x12c427<0x1||_0x12c427>0x64)throw CliErrors[_0x382356(0xf2)]('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x1bfdca=_0x2d8531['str'](_0x382356(0xe1));if(_0x1bfdca&&(_0x1bfdca[_0x382356(0x10b)]>0x400||_0x1bfdca[_0x382356(0xd2)]()!==_0x1bfdca))throw CliErrors['validation'](_0x382356(0x113));},async 'execute'(_0x5b3e36){const _0x5727c4=a37_0x550965,_0xe9dee7=_0x5b3e36[_0x5727c4(0xe3)]('cursor'),_0x4271fe=await listRuntimeSchedules(_0x5b3e36[_0x5727c4(0xd1)],{'limit':_0x5b3e36[_0x5727c4(0xd6)](_0x5727c4(0xe5)),..._0xe9dee7?{'cursor':_0xe9dee7}:{}});return{'ok':!![],'data':_0x4271fe};}},scheduleDetail={'service':'schedule','command':a37_0x550965(0xf6),'description':a37_0x550965(0x10c),'risk':a37_0x550965(0x102),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4d9e41){const _0x5a2610=a37_0x550965,_0x48525f=await getRuntimeSchedule(_0x4d9e41[_0x5a2610(0xd1)],_0x4d9e41[_0x5a2610(0xe3)]('schedule-id'));return{'ok':!![],'data':_0x48525f};}},scheduleRun={'service':a37_0x550965(0xf7),'command':a37_0x550965(0xeb),'description':'Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','risk':a37_0x550965(0x105),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2775cd){const _0x5794a0=a37_0x550965,_0x5a04dd=_0x2775cd['str'](_0x5794a0(0xe6)),_0x5a7090=await runRuntimeSchedule(_0x2775cd['appCode'],_0x5a04dd);return{'ok':!![],'data':_0x5a7090,'message':_0x5794a0(0xd4)+_0x5a7090[_0x5794a0(0xe7)]+_0x5794a0(0xe0)+_0x5a04dd};},async 'dryRun'(_0x52bde1){const _0x5dcae9=a37_0x550965,_0x39cafe=_0x52bde1[_0x5dcae9(0xe3)](_0x5dcae9(0xe6));return dryRun(_0x5dcae9(0xd8),scheduleItemPath(_0x52bde1['appCode'],_0x39cafe)+_0x5dcae9(0xf5))['description'](_0x5dcae9(0xe8)+_0x39cafe+_0x5dcae9(0xfc))[_0x5dcae9(0xee)]();}},scheduleDelete={'service':a37_0x550965(0xf7),'command':'delete','description':a37_0x550965(0xef),'risk':a37_0x550965(0x105),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x23f890){const _0x485055=a37_0x550965,_0x558b00=_0x23f890[_0x485055(0xe3)](_0x485055(0xe6)),_0x3b0a5f=await deleteRuntimeSchedule(_0x23f890[_0x485055(0xd1)],_0x558b00);return{'ok':!![],'data':_0x3b0a5f,'message':'Deleted\x20schedule\x20'+_0x558b00};},async 'dryRun'(_0x44708d){const _0x50625b=a37_0x550965,_0x4bcbbe=_0x44708d[_0x50625b(0xe3)]('schedule-id');return dryRun(_0x50625b(0x112),scheduleItemPath(_0x44708d[_0x50625b(0xd1)],_0x4bcbbe))[_0x50625b(0x107)]('Preview:\x20delete\x20schedule\x20'+_0x4bcbbe)[_0x50625b(0xee)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a38_0x1e0661=a38_0x3d3f;(function(_0x678e07,_0x84ee79){const _0x4db116=a38_0x3d3f,_0x5aaec8=_0x678e07();while(!![]){try{const _0x4b487f=parseInt(_0x4db116(0x10b))/0x1+-parseInt(_0x4db116(0x108))/0x2*(-parseInt(_0x4db116(0x103))/0x3)+parseInt(_0x4db116(0x10e))/0x4+-parseInt(_0x4db116(0x109))/0x5*(parseInt(_0x4db116(0x102))/0x6)+-parseInt(_0x4db116(0x10c))/0x7*(-parseInt(_0x4db116(0x107))/0x8)+parseInt(_0x4db116(0x10d))/0x9+-parseInt(_0x4db116(0x10a))/0xa;if(_0x4b487f===_0x84ee79)break;else _0x5aaec8['push'](_0x5aaec8['shift']());}catch(_0x23e41){_0x5aaec8['push'](_0x5aaec8['shift']());}}}(a38_0x2b15,0xd853a));import{buildSchemaPayload}from'../framework/schema-export.js';function a38_0x3d3f(_0x4ac15d,_0x3879bb){_0x4ac15d=_0x4ac15d-0x102;const _0x2b1529=a38_0x2b15();let _0x3d3fa5=_0x2b1529[_0x4ac15d];return _0x3d3fa5;}async function execute(_0x475a80){const _0xcafb0a=await buildSchemaPayload();return{'ok':!![],'data':_0xcafb0a};}function a38_0x2b15(){const _0x306f05=['Export\x20machine-readable\x20command\x20schema\x20(JSON)','schema','export','804256pcnziC','1912NsAahF','88710UjXsov','23795410ZbDsWN','624041nHPmgW','112DerSnD','2637261gncSta','2483028AKVJWM','24ccjFde','597ITgCfi'];a38_0x2b15=function(){return _0x306f05;};return a38_0x2b15();}export const schemaDefinition={'service':a38_0x1e0661(0x105),'command':a38_0x1e0661(0x106),'description':a38_0x1e0661(0x104),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ const a38_0x5402db=a38_0x5cc5;(function(_0x237952,_0x50988d){const _0x359e04=a38_0x5cc5,_0x2244f6=_0x237952();while(!![]){try{const _0x594305=-parseInt(_0x359e04(0xf4))/0x1*(-parseInt(_0x359e04(0xf8))/0x2)+-parseInt(_0x359e04(0xfa))/0x3+parseInt(_0x359e04(0xf5))/0x4+parseInt(_0x359e04(0xf1))/0x5+-parseInt(_0x359e04(0xf0))/0x6+parseInt(_0x359e04(0xf6))/0x7+-parseInt(_0x359e04(0xef))/0x8*(parseInt(_0x359e04(0xf7))/0x9);if(_0x594305===_0x50988d)break;else _0x2244f6['push'](_0x2244f6['shift']());}catch(_0x402447){_0x2244f6['push'](_0x2244f6['shift']());}}}(a38_0x4e36,0x6d5f9));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x5d7218){const _0x72708a=await buildSchemaPayload();return{'ok':!![],'data':_0x72708a};}function a38_0x5cc5(_0x283ffc,_0x32c456){_0x283ffc=_0x283ffc-0xef;const _0x4e36b2=a38_0x4e36();let _0x5cc5ea=_0x4e36b2[_0x283ffc];return _0x5cc5ea;}export const schemaDefinition={'service':a38_0x5402db(0xf2),'command':a38_0x5402db(0xf3),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a38_0x5402db(0xf9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a38_0x4e36(){const _0x2aab41=['1544324ICqgKl','2794750OOYGvG','477Rhsaix','52uORQCT','read','209244waYXpI','27312uLdGrA','4011330pxlAcp','2137985aQQzMU','schema','export','5935LcmgrO'];a38_0x4e36=function(){return _0x2aab41;};return a38_0x4e36();}