@lovrabet/lovrabet-cli 2.1.18 → 2.1.19-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +7 -0
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/shared.js +1 -1
  26. package/lib/commands/data/index.js +1 -1
  27. package/lib/commands/dataset/detail.js +1 -1
  28. package/lib/commands/dataset/index.js +1 -1
  29. package/lib/commands/dataset/list.js +1 -1
  30. package/lib/commands/dataset/sdk-doc.js +1 -1
  31. package/lib/commands/doctor.js +1 -1
  32. package/lib/commands/file/index.js +1 -1
  33. package/lib/commands/init.js +1 -1
  34. package/lib/commands/kb/index.js +1 -1
  35. package/lib/commands/logs/index.js +1 -1
  36. package/lib/commands/ocr/index.js +1 -1
  37. package/lib/commands/personal-bff/index.js +1 -1
  38. package/lib/commands/registry.js +1 -1
  39. package/lib/commands/schedule/index.js +1 -1
  40. package/lib/commands/schema.js +1 -1
  41. package/lib/commands/service/dynamic.js +1 -1
  42. package/lib/commands/service/function-name-adapter.js +1 -1
  43. package/lib/commands/service/index.js +1 -1
  44. package/lib/commands/service/registry.js +1 -1
  45. package/lib/commands/skill/commands/create.js +1 -1
  46. package/lib/commands/skill/commands/install.js +1 -1
  47. package/lib/commands/skill/commands/list.js +1 -1
  48. package/lib/commands/skill/commands/push.js +1 -1
  49. package/lib/commands/skill/commands/validate.js +1 -1
  50. package/lib/commands/skill/flags.d.ts +1 -0
  51. package/lib/commands/skill/flags.js +1 -1
  52. package/lib/commands/skill/index.js +1 -1
  53. package/lib/commands/skill/manifest-helpers.js +1 -1
  54. package/lib/commands/skill/push-execute.js +1 -1
  55. package/lib/commands/skill/push-flow-helpers.js +1 -1
  56. package/lib/commands/skill/push-retarget.js +1 -1
  57. package/lib/commands/skill/scopes.js +1 -1
  58. package/lib/commands/skill/summary.js +1 -1
  59. package/lib/commands/skill/templates.js +1 -1
  60. package/lib/commands/skill/validate.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/update.js +1 -1
  65. package/lib/commands/workspace/index.js +1 -1
  66. package/lib/config/schema.js +1 -1
  67. package/lib/constant/app.js +1 -1
  68. package/lib/constant/auth-mode.js +1 -1
  69. package/lib/constant/cli.js +1 -1
  70. package/lib/constant/defaults.js +1 -1
  71. package/lib/constant/distribution.js +1 -1
  72. package/lib/constant/domain.js +1 -1
  73. package/lib/constant/env.js +1 -1
  74. package/lib/constant/output.js +1 -1
  75. package/lib/constant/product.js +1 -1
  76. package/lib/constant/risk.js +1 -1
  77. package/lib/constant/url.js +1 -1
  78. package/lib/context.js +1 -1
  79. package/lib/core/api-client.js +1 -1
  80. package/lib/core/db-resolver.js +1 -1
  81. package/lib/core/sdk-client.js +1 -1
  82. package/lib/errors.js +1 -1
  83. package/lib/framework/build-all-flags.js +1 -1
  84. package/lib/framework/dryrun.js +1 -1
  85. package/lib/framework/flags.js +1 -1
  86. package/lib/framework/help.js +1 -1
  87. package/lib/framework/index.js +1 -1
  88. package/lib/framework/output.js +1 -1
  89. package/lib/framework/preparse.js +1 -1
  90. package/lib/framework/rate-limit.js +1 -1
  91. package/lib/framework/response.js +1 -1
  92. package/lib/framework/runner-confirmation.js +1 -1
  93. package/lib/framework/runner-error.js +1 -1
  94. package/lib/framework/runner.js +1 -1
  95. package/lib/framework/schema-export.js +1 -1
  96. package/lib/framework/service-order.js +1 -1
  97. package/lib/framework/types.js +1 -1
  98. package/lib/generated/build-info.d.ts +4 -4
  99. package/lib/generated/build-info.js +1 -1
  100. package/lib/help.js +1 -1
  101. package/lib/runtime/event.js +1 -1
  102. package/lib/runtime/index.js +1 -1
  103. package/lib/runtime/queue.js +1 -1
  104. package/lib/runtime/resolve.js +1 -1
  105. package/lib/skills/npx-skills-add.js +1 -1
  106. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  107. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  108. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  109. package/lib/skills/runtime-skill-sync/install-target.d.ts +9 -0
  110. package/lib/skills/runtime-skill-sync/install-target.js +1 -0
  111. package/lib/skills/runtime-skill-sync/links.d.ts +5 -4
  112. package/lib/skills/runtime-skill-sync/links.js +1 -1
  113. package/lib/skills/runtime-skill-sync/list-local.d.ts +2 -2
  114. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  115. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  116. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  117. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  118. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  119. package/lib/skills/runtime-skill-sync/push.js +1 -1
  120. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  121. package/lib/skills/runtime-skill-sync/types.d.ts +17 -0
  122. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  123. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  124. package/lib/skills/runtime-skill-sync.d.ts +2 -1
  125. package/lib/skills/runtime-skill-sync.js +1 -1
  126. package/lib/utils/apply-jq-filter.js +1 -1
  127. package/lib/utils/logger.js +1 -1
  128. package/lib/utils/lossless-json.js +1 -1
  129. package/lib/utils/params.js +1 -1
  130. package/lib/utils/platform.js +1 -1
  131. package/lib/utils/update-notice.js +1 -1
  132. package/lib/utils/version.js +1 -1
  133. package/lib/utils/write-cli-side-channel.js +1 -1
  134. package/package.json +1 -1
@@ -1 +1 @@
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
+ const a29_0x29d646=a29_0xa2ea;(function(_0x222d16,_0x1fa049){const _0x3b3a3a=a29_0xa2ea,_0x360a2b=_0x222d16();while(!![]){try{const _0x1395c6=-parseInt(_0x3b3a3a(0x12a))/0x1*(parseInt(_0x3b3a3a(0x10a))/0x2)+parseInt(_0x3b3a3a(0x11d))/0x3*(parseInt(_0x3b3a3a(0x12c))/0x4)+parseInt(_0x3b3a3a(0x10f))/0x5+parseInt(_0x3b3a3a(0x127))/0x6+parseInt(_0x3b3a3a(0xfb))/0x7+parseInt(_0x3b3a3a(0x138))/0x8+-parseInt(_0x3b3a3a(0x11f))/0x9;if(_0x1395c6===_0x1fa049)break;else _0x360a2b['push'](_0x360a2b['shift']());}catch(_0x1d6b65){_0x360a2b['push'](_0x360a2b['shift']());}}}(a29_0x35a2,0xae172));import a29_0x2f06e6 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a29_0x35a2(){const _0x4503f0=['name','length','currentApp','verbose','red','padEnd','9600896UoUByv','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','yellow','(default:\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','message','version','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20─','⚠\x20Empty\x20(treated\x20as\x20{})','locale','(set,\x20length=','repeat','(default)','\x20Imported\x20from:\x20','green','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','\x20\x20auth\x20(effective):\x20','4661475uIGGcc','gray','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20(accessKey)','services','✗\x20Invalid\x20JSON','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Project','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','accessKey','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','269194ABLPEz','status','pageSize','commandCount','\x20commands)','6592025NgfVwY','bold','\x20\x20Config\x20JSON','doctor','ClientAk','\x20\x20Service\x20Tree','log','(not\x20found)','defaultApp','(no\x20file)','arch','missing','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(unnamed)','235353mSZoHn','serviceCode','35620074JTbggc','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty','source','appCode','empty','3136206KhNtqI','Global','\x20\x20Auth','1ftteVD','\x20\x20Merged\x20Config','56mKwdLF','✓\x20Loaded','(missing)','\x20doctor','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','path'];a29_0x35a2=function(){return _0x4503f0;};return a29_0x35a2();}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0xac559a){const _0x4cc1be=a29_0xa2ea,_0x5db785=getCliVersion(),_0x3d3a6d=buildConfigFromFlags({});await initGlobalEnvironment(_0x3d3a6d),console[_0x4cc1be(0x115)](),console[_0x4cc1be(0x115)](a29_0x2f06e6[_0x4cc1be(0x110)](CLI_BIN_NAME+_0x4cc1be(0x12f))),console[_0x4cc1be(0x115)](a29_0x2f06e6['gray']('─'[_0x4cc1be(0x146)](0x32))),console[_0x4cc1be(0x115)](_0x4cc1be(0x130)+_0x5db785),console[_0x4cc1be(0x115)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x4cc1be(0x140)]),console[_0x4cc1be(0x115)](_0x4cc1be(0x139)+process['platform']+'\x20'+process[_0x4cc1be(0x119)]),console['log'](),console[_0x4cc1be(0x115)](a29_0x2f06e6[_0x4cc1be(0x110)]('\x20\x20Config\x20Files')),console['log'](a29_0x2f06e6[_0x4cc1be(0xfc)](_0x4cc1be(0x142)['repeat'](0x1e)));const _0x474e66=getGlobalConfigPath(),_0x5e2fa0=getProjectConfigPath();console[_0x4cc1be(0x115)](_0x4cc1be(0xf8)+(_0x474e66||a29_0x2f06e6['gray'](_0x4cc1be(0x116)))),console[_0x4cc1be(0x115)](_0x4cc1be(0x105)+(_0x5e2fa0||a29_0x2f06e6['gray']('(not\x20found)'))),console[_0x4cc1be(0x115)](),console[_0x4cc1be(0x115)](a29_0x2f06e6['bold'](_0x4cc1be(0x111))),console[_0x4cc1be(0x115)](a29_0x2f06e6['gray']('\x20\x20─'[_0x4cc1be(0x146)](0x1e)));const _0x32b41e=(_0x24e898,_0x445918)=>{const _0x574ec3=_0x4cc1be;if(!_0x445918){console['log']('\x20\x20'+_0x24e898[_0x574ec3(0x137)](0x11)+'\x20'+a29_0x2f06e6[_0x574ec3(0xfc)](_0x574ec3(0x118)));return;}const _0x152f4c=inspectCliConfigJsonFile(_0x445918);if(_0x152f4c['status']==='ok')console[_0x574ec3(0x115)]('\x20\x20'+_0x24e898[_0x574ec3(0x137)](0x11)+'\x20'+a29_0x2f06e6['green'](_0x574ec3(0x121)));else{if(_0x152f4c['status']===_0x574ec3(0x126))console['log']('\x20\x20'+_0x24e898[_0x574ec3(0x137)](0x11)+'\x20'+a29_0x2f06e6[_0x574ec3(0x13a)](_0x574ec3(0x143)));else _0x152f4c[_0x574ec3(0x10b)]===_0x574ec3(0x11a)?console['log']('\x20\x20'+_0x24e898[_0x574ec3(0x137)](0x11)+'\x20'+a29_0x2f06e6[_0x574ec3(0xfc)](_0x574ec3(0x12e))):(console[_0x574ec3(0x115)]('\x20\x20'+_0x24e898[_0x574ec3(0x137)](0x11)+'\x20'+a29_0x2f06e6['red'](_0x574ec3(0x103))),console['log']('\x20\x20'+''[_0x574ec3(0x137)](0x11)+'\x20'+a29_0x2f06e6[_0x574ec3(0x136)](_0x152f4c[_0x574ec3(0x13f)])));}};_0x32b41e(_0x4cc1be(0x128),_0x474e66),_0x32b41e(_0x4cc1be(0x106),_0x5e2fa0),console[_0x4cc1be(0x115)](),console[_0x4cc1be(0x115)](a29_0x2f06e6[_0x4cc1be(0x110)](_0x4cc1be(0x12b))),console[_0x4cc1be(0x115)](a29_0x2f06e6['gray'](_0x4cc1be(0x142)['repeat'](0x1e))),console[_0x4cc1be(0x115)](_0x4cc1be(0xfd)+(_0x3d3a6d[_0x4cc1be(0x125)]||a29_0x2f06e6[_0x4cc1be(0x136)]('(not\x20set)'))),console[_0x4cc1be(0x115)](_0x4cc1be(0x120)+_0x3d3a6d['env']);const _0x3e4d5c=isLegacyCompatConfigKey(_0x4cc1be(0x144))?a29_0x2f06e6['gray'](_0x3d3a6d['locale']+'\x20(legacy/compat\x20only)'):_0x3d3a6d[_0x4cc1be(0x144)];console[_0x4cc1be(0x115)](_0x4cc1be(0x11b)+_0x3e4d5c),console[_0x4cc1be(0x115)](_0x4cc1be(0x104)+(_0x3d3a6d[_0x4cc1be(0x117)]||a29_0x2f06e6['gray']('(none)'))),console['log'](_0x4cc1be(0x141)+(_0x3d3a6d[_0x4cc1be(0x134)]||a29_0x2f06e6[_0x4cc1be(0xfc)]('(none)'))),console['log'](_0x4cc1be(0x13c)+(_0x3d3a6d[_0x4cc1be(0xfe)]||a29_0x2f06e6[_0x4cc1be(0xfc)](_0x4cc1be(0x13b)+DEFAULT_CONFIG_VALUES[_0x4cc1be(0xfe)]+')'))),console[_0x4cc1be(0x115)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3d3a6d[_0x4cc1be(0x10c)]??a29_0x2f06e6[_0x4cc1be(0xfc)](_0x4cc1be(0x147)))),console[_0x4cc1be(0x115)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x3d3a6d['riskLevel']),console[_0x4cc1be(0x115)](_0x4cc1be(0x122)+_0x3d3a6d[_0x4cc1be(0x135)]),console['log'](_0x4cc1be(0xfa)+AUTH_MODE[_0x4cc1be(0x113)]),console[_0x4cc1be(0x115)](_0x4cc1be(0x109)+(_0x3d3a6d[_0x4cc1be(0x108)]?a29_0x2f06e6[_0x4cc1be(0xf5)](_0x4cc1be(0x145)+_0x3d3a6d[_0x4cc1be(0x108)][_0x4cc1be(0x133)]+')'):a29_0x2f06e6[_0x4cc1be(0xfc)]('(none)'))),console[_0x4cc1be(0x115)](),console['log'](a29_0x2f06e6[_0x4cc1be(0x110)](_0x4cc1be(0xf7))),console[_0x4cc1be(0x115)](a29_0x2f06e6[_0x4cc1be(0xfc)](_0x4cc1be(0x142)['repeat'](0x1e))),console[_0x4cc1be(0x115)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0x4cc1be(0x107)+getUserDomain()),console[_0x4cc1be(0x115)](_0x4cc1be(0x100)+getRuntimeDomain()),console[_0x4cc1be(0x115)](),console[_0x4cc1be(0x115)](a29_0x2f06e6[_0x4cc1be(0x110)](_0x4cc1be(0x114))),console[_0x4cc1be(0x115)](a29_0x2f06e6[_0x4cc1be(0xfc)](_0x4cc1be(0x142)[_0x4cc1be(0x146)](0x1e)));const _0x3c5c36=inspectServiceRegistry();console[_0x4cc1be(0x115)]('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3c5c36['registryPath']),console[_0x4cc1be(0x115)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x3c5c36)),console[_0x4cc1be(0x115)](_0x4cc1be(0xff)+_0x3c5c36['serviceCount']),console[_0x4cc1be(0x115)](_0x4cc1be(0xf6)+_0x3c5c36[_0x4cc1be(0x10d)]);for(const _0x2888a3 of _0x3c5c36[_0x4cc1be(0x102)]){console['log']('\x20\x20'+(_0x2888a3[_0x4cc1be(0x11e)]+':')[_0x4cc1be(0x137)](0x11)+'\x20'+(_0x2888a3[_0x4cc1be(0x132)]||a29_0x2f06e6[_0x4cc1be(0xfc)](_0x4cc1be(0x11c)))+'\x20('+_0x2888a3['commandCount']+_0x4cc1be(0x10e)),console[_0x4cc1be(0x115)]('\x20\x20'+''[_0x4cc1be(0x137)](0x11)+_0x4cc1be(0x148)+_0x2888a3[_0x4cc1be(0x124)][_0x4cc1be(0x131)]);}return console['log'](),console['log'](a29_0x2f06e6['bold'](_0x4cc1be(0x129))),console['log'](a29_0x2f06e6[_0x4cc1be(0xfc)](_0x4cc1be(0x142)[_0x4cc1be(0x146)](0x1e))),console['log']('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a29_0x2f06e6['green'](AUTH_MODE[_0x4cc1be(0x113)]+_0x4cc1be(0x101))),console[_0x4cc1be(0x115)](_0x4cc1be(0x13d)+a29_0x2f06e6[_0x4cc1be(0xfc)](_0x4cc1be(0x13e))),console[_0x4cc1be(0x115)](),{'ok':!![]};}function a29_0xa2ea(_0x22dba6,_0x3ab555){_0x22dba6=_0x22dba6-0xf5;const _0x35a26b=a29_0x35a2();let _0xa2eaf8=_0x35a26b[_0x22dba6];return _0xa2eaf8;}function formatServiceRegistryStatus(_0x5c2db1){const _0x2d5587=a29_0xa2ea;if(_0x5c2db1[_0x2d5587(0x10b)]==='ok')return a29_0x2f06e6[_0x2d5587(0xf5)](_0x2d5587(0x12d));if(_0x5c2db1[_0x2d5587(0x10b)]===_0x2d5587(0x11a))return a29_0x2f06e6[_0x2d5587(0xfc)]('(not\x20found)');if(_0x5c2db1[_0x2d5587(0x10b)]===_0x2d5587(0x126))return a29_0x2f06e6[_0x2d5587(0x13a)](_0x2d5587(0x123));return a29_0x2f06e6[_0x2d5587(0x136)](_0x2d5587(0xf9)+(_0x5c2db1[_0x2d5587(0x13f)]?':\x20'+_0x5c2db1['message']:''));}export const doctorDefinition={'service':a29_0x29d646(0x112),'command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
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
+ const a30_0x48e768=a30_0xf02b;(function(_0x5e4e92,_0x4d0ca6){const _0x1c5a36=a30_0xf02b,_0x49313d=_0x5e4e92();while(!![]){try{const _0x5eeb24=-parseInt(_0x1c5a36(0x10b))/0x1+-parseInt(_0x1c5a36(0x100))/0x2+parseInt(_0x1c5a36(0x114))/0x3*(parseInt(_0x1c5a36(0x10d))/0x4)+parseInt(_0x1c5a36(0x11b))/0x5*(-parseInt(_0x1c5a36(0x112))/0x6)+parseInt(_0x1c5a36(0x101))/0x7*(-parseInt(_0x1c5a36(0x104))/0x8)+parseInt(_0x1c5a36(0xff))/0x9*(parseInt(_0x1c5a36(0xf6))/0xa)+parseInt(_0x1c5a36(0xfb))/0xb;if(_0x5eeb24===_0x4d0ca6)break;else _0x49313d['push'](_0x49313d['shift']());}catch(_0x24b782){_0x49313d['push'](_0x49313d['shift']());}}}(a30_0xa1c9,0x45582));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a30_0xa1c9(){const _0x246461=['POST','152cEPKBq','bool','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','trim','filePath','646482MtdmGb','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','12039GHjaXz','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','build','read','description','Preview:\x20upload\x20','string','5GqVcux','File','appCode','/client/uploadFile','11240zTzuwJ','path','boolean','validation','str','10033331BFtgdg','file','download','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','603azBGAj','84560mpmehR','4060fQWABg','filePath\x20is\x20required.','long-term','4144pLsTLX','\x20to\x20runtime\x20app\x20','body','write','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','filepath','upload','405422oqKjHU'];a30_0xa1c9=function(){return _0x246461;};return a30_0xa1c9();}const FILE_FLAG={'name':'file','type':'string','required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':'filepath','type':a30_0x48e768(0x11a),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':'download','type':a30_0x48e768(0xf8),'description':a30_0x48e768(0x108)},LONG_TERM_FLAG={'name':a30_0x48e768(0x103),'type':a30_0x48e768(0xf8),'description':a30_0x48e768(0xfe)};function requireFilePath(_0x5eb92b){const _0x1ccd45=a30_0x48e768,_0x1972f4=_0x5eb92b[_0x1ccd45(0x110)]();if(!_0x1972f4)throw CliErrors[_0x1ccd45(0xf9)](_0x1ccd45(0x102));return _0x1972f4;}function a30_0xf02b(_0x579e8d,_0x5631aa){_0x579e8d=_0x579e8d-0xf4;const _0xa1c9c3=a30_0xa1c9();let _0xf02bb8=_0xa1c9c3[_0x579e8d];return _0xf02bb8;}const fileUpload={'service':a30_0x48e768(0xfc),'command':a30_0x48e768(0x10a),'description':a30_0x48e768(0x113),'risk':a30_0x48e768(0x107),'flags':[FILE_FLAG],async 'dryRun'(_0x37da33){const _0x154dfa=a30_0x48e768,_0x331b4c=requireRuntimeUploadFile(_0x37da33['str']('file'),_0x154dfa(0x11c));return dryRun(_0x154dfa(0x10c),_0x154dfa(0xf5))[_0x154dfa(0x106)]({'appCode':_0x37da33[_0x154dfa(0xf4)],'multipart':{'file':_0x331b4c}})[_0x154dfa(0x118)](_0x154dfa(0x119)+_0x331b4c[_0x154dfa(0xf7)]+_0x154dfa(0x105)+_0x37da33['appCode'])[_0x154dfa(0x116)]();},async 'execute'(_0x839f16){const _0x12bc26=a30_0x48e768,_0x349c92=requireRuntimeUploadFile(_0x839f16[_0x12bc26(0xfa)]('file'),_0x12bc26(0x11c)),_0x3dae72=await uploadRuntimeFile(_0x839f16[_0x12bc26(0xf4)],_0x349c92[_0x12bc26(0xf7)]);return{'ok':!![],'data':_0x3dae72,'message':_0x3dae72['filePath']?'Uploaded\x20file:\x20'+_0x3dae72[_0x12bc26(0x111)]+_0x12bc26(0x115):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':'file','command':'query-url','description':a30_0x48e768(0x10f),'risk':a30_0x48e768(0x117),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x507bfb){const _0x56ddcc=a30_0x48e768,_0x5d8fd2=requireFilePath(_0x507bfb['str'](_0x56ddcc(0x109))),_0x562dbb=await queryRuntimeFileUrl(_0x5d8fd2,{'download':_0x507bfb[_0x56ddcc(0x10e)](_0x56ddcc(0xfd)),'longTerm':_0x507bfb['bool'](_0x56ddcc(0x103))});return{'ok':!![],'data':_0x562dbb};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
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
+ const a31_0x51d854=a31_0x5b98;(function(_0x16e333,_0x573fea){const _0x4363d3=a31_0x5b98,_0x1e628c=_0x16e333();while(!![]){try{const _0x1208d5=-parseInt(_0x4363d3(0x141))/0x1*(parseInt(_0x4363d3(0x146))/0x2)+-parseInt(_0x4363d3(0x132))/0x3*(parseInt(_0x4363d3(0x116))/0x4)+parseInt(_0x4363d3(0x11b))/0x5*(-parseInt(_0x4363d3(0x123))/0x6)+-parseInt(_0x4363d3(0x112))/0x7*(parseInt(_0x4363d3(0x108))/0x8)+parseInt(_0x4363d3(0x110))/0x9+parseInt(_0x4363d3(0x105))/0xa+parseInt(_0x4363d3(0x135))/0xb;if(_0x1208d5===_0x573fea)break;else _0x1e628c['push'](_0x1e628c['shift']());}catch(_0x59da0f){_0x1e628c['push'](_0x1e628c['shift']());}}}(a31_0x17af,0xe6151));function a31_0x5b98(_0x47c39b,_0x1ddc33){_0x47c39b=_0x47c39b-0x104;const _0x17af57=a31_0x17af();let _0x5b9887=_0x17af57[_0x47c39b];return _0x5b9887;}import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0x51d854(0x109),'type':'string','description':a31_0x51d854(0x12b)},{'name':a31_0x51d854(0x119),'type':a31_0x51d854(0x13b),'description':a31_0x51d854(0x10f)+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x51d854(0x143),'type':a31_0x51d854(0x13f),'description':a31_0x51d854(0x10e)+PRODUCT_CONFIG[a31_0x51d854(0x10a)]+a31_0x51d854(0x147),'default':![]},{'name':a31_0x51d854(0x14a),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0x51d854(0x10d),'type':'string','description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x51d854(0x109),'type':a31_0x51d854(0x13b),'description':'Override\x20imported\x20default\x20appcode'},{'name':'env','type':a31_0x51d854(0x13b),'description':a31_0x51d854(0x12e),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x51d854(0x143),'type':a31_0x51d854(0x13f),'description':a31_0x51d854(0x10e)+PRODUCT_CONFIG[a31_0x51d854(0x10a)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x51d854(0x14a),'type':a31_0x51d854(0x13f),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x3709db){const _0x39a250=a31_0x51d854,_0x3c8b86=isNonInteractiveMode(_0x3709db),_0x79ac68=_0x3709db[_0x39a250(0x143)]?_0x39a250(0x143):_0x39a250(0x145),_0x5a215b=resolveWriteConfigPath(_0x79ac68);try{_0x3c8b86?await runNonInteractive(_0x3709db,_0x5a215b):await runInteractive(_0x3709db,_0x5a215b);}catch(_0x318dac){if(_0x318dac instanceof AbortPrompt)throw CliErrors[_0x39a250(0x11f)]();throw _0x318dac;}}export async function runInitImport(_0x2812e0){const _0x263635=a31_0x51d854,_0x5ab090=_0x2812e0[_0x263635(0x143)]?_0x263635(0x143):_0x263635(0x145),_0x5e3d2b=resolveWriteConfigPath(_0x5ab090);await runFromImport(_0x2812e0,_0x5e3d2b);}function a31_0x17af(){const _0x553fe0=['object','15683745kKmmVp','\x20init\x20—\x20Create\x20','Aborted.','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','\x20already\x20exists.\x20Overwrite?','\x0aInitialized\x20','string','):\x20','entries','close','boolean','name','3EAIysP','trim','global','toLowerCase','project','1039614BQvowk',')\x20instead\x20of\x20project','[Y/n]','SIGINT','yes','defaultApp','\x20\x20env:\x20\x20\x20\x20\x20','5473290dTYMrY','AbortPrompt','\x20\x20default:\x20','48qtFktn','appcode','newConfigFileName','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','log','file','Write\x20to\x20global\x20(~/','Target\x20environment\x20(default\x20','10453599uwMYrI','[y/N]','417781nemzSH','User\x20aborted\x20prompt','race','utf8','139208JIDhGm','Initialized\x20','\x20\x20config:\x20\x20','env','apps','8475sQPBoP','cwd','parse','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','cancelled','Failed\x20to\x20parse\x20source\x20file:\x20','join','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`.','726PRljQc','stdout','app','stdin','message','question','apiDir','Source\x20file\x20not\x20found:\x20','App\x20code\x20for\x20the\x20project','Imported\x20from\x20','riskLevel','Override\x20imported\x20default\x20env','App\x20code','validation','removeListener','6Rceopm','\x20\x20appcode:\x20'];a31_0x17af=function(){return _0x553fe0;};return a31_0x17af();}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x51d854(0x129)]);async function runFromImport(_0x1761df,_0x2bb2f3){const _0x450c6a=a31_0x51d854,_0x58154d=resolveFilePath(_0x1761df[_0x450c6a(0x10d)]);if(!existsSync(_0x58154d))throw CliErrors['validation'](_0x450c6a(0x12a)+_0x58154d);const _0x334319=readSourceFile(_0x58154d),_0x508238=convertToRuntimeConfig(_0x334319);_0x1761df[_0x450c6a(0x109)]&&(_0x508238['appcode']=String(_0x1761df[_0x450c6a(0x109)]));_0x1761df[_0x450c6a(0x119)]&&(_0x508238[_0x450c6a(0x119)]=resolveInitEnv(_0x1761df));if(!_0x508238['appcode'])throw CliErrors[_0x450c6a(0x130)](_0x450c6a(0x11e),_0x450c6a(0x122));await writeInitConfig(_0x2bb2f3,_0x508238,_0x1761df),console[_0x450c6a(0x10c)](_0x450c6a(0x12c)+_0x58154d),console['log'](_0x450c6a(0x118)+_0x2bb2f3),console[_0x450c6a(0x10c)](_0x450c6a(0x133)+_0x508238[_0x450c6a(0x109)]);if(_0x508238[_0x450c6a(0x14b)])console[_0x450c6a(0x10c)](_0x450c6a(0x107)+_0x508238[_0x450c6a(0x14b)]);}function convertToRuntimeConfig(_0x75f35c){const _0xf2531b=a31_0x51d854;if(_0x75f35c[_0xf2531b(0x11a)]&&typeof _0x75f35c[_0xf2531b(0x11a)]===_0xf2531b(0x134))throw CliErrors[_0xf2531b(0x130)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0xf2531b(0x10b));const _0x27d711={};for(const _0x5b65af of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x75f35c[_0x5b65af]!==undefined&&(_0x27d711[_0x5b65af]=_0x75f35c[_0x5b65af]);}return!_0x27d711['riskLevel']&&(_0x27d711['riskLevel']=DEFAULT_CONFIG_VALUES[_0xf2531b(0x12d)]),_0x27d711;}async function runNonInteractive(_0x713bbe,_0x3f7c86){const _0x36a5ef=a31_0x51d854,_0x3e58f4=_0x713bbe[_0x36a5ef(0x109)];if(!_0x3e58f4)throw CliErrors['flagMissing'](_0x36a5ef(0x109),'Usage:\x20'+CLI_BIN_NAME+_0x36a5ef(0x138));const _0x17b859=resolveInitEnv(_0x713bbe);await writeInitConfig(_0x3f7c86,{'appcode':_0x3e58f4,'env':_0x17b859},_0x713bbe),console[_0x36a5ef(0x10c)](_0x36a5ef(0x117)+_0x3f7c86),console[_0x36a5ef(0x10c)]('\x20\x20appcode:\x20'+_0x3e58f4),console['log'](_0x36a5ef(0x104)+_0x17b859);}async function runInteractive(_0x495fa4,_0x3f424b){const _0x3d89c7=a31_0x51d854,_0x17f886=loadExisting(_0x3f424b),_0x21826a=typeof _0x17f886?.[_0x3d89c7(0x109)]===_0x3d89c7(0x13b)?_0x17f886['appcode']:'',_0x1e70e6=resolveInitEnv(_0x495fa4);console['log'](CLI_BIN_NAME+_0x3d89c7(0x136)+PRODUCT_CONFIG['newConfigFileName']+'\x0a');if(existsSync(_0x3f424b)&&!_0x495fa4[_0x3d89c7(0x14a)]){const _0x4a626f=await promptYesNo('File\x20'+_0x3f424b+_0x3d89c7(0x139),![]);if(!_0x4a626f){console[_0x3d89c7(0x10c)](_0x3d89c7(0x137));return;}}const _0x4f2763=typeof _0x495fa4['appcode']===_0x3d89c7(0x13b)?_0x495fa4[_0x3d89c7(0x109)][_0x3d89c7(0x142)]():'';let _0x54dca1=_0x4f2763;!_0x54dca1&&(_0x54dca1=await promptInput(_0x3d89c7(0x12f),_0x21826a));if(!_0x54dca1[_0x3d89c7(0x142)]())throw CliErrors['validation']('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x3f424b,{'appcode':_0x54dca1['trim'](),'env':_0x1e70e6},_0x495fa4),console['log'](_0x3d89c7(0x13a)+_0x3f424b),console[_0x3d89c7(0x10c)](_0x3d89c7(0x133)+_0x54dca1[_0x3d89c7(0x142)]()),console[_0x3d89c7(0x10c)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x1e70e6);}async function writeInitConfig(_0x47ab8f,_0x215fdc,_0x50d83a){const _0x2a530d=a31_0x51d854;let _0x56dd7c={};existsSync(_0x47ab8f)&&!_0x50d83a['yes']&&(_0x56dd7c=readConfigFile(_0x47ab8f));for(const [_0x2a7bca,_0x74b442]of Object[_0x2a530d(0x13d)](_0x215fdc)){_0x74b442!==undefined&&(_0x56dd7c[_0x2a7bca]=_0x74b442);}if(_0x56dd7c[_0x2a530d(0x125)])delete _0x56dd7c['app'];writeConfigFile(_0x47ab8f,_0x56dd7c);}class AbortPrompt extends Error{constructor(){const _0x5e0d49=a31_0x51d854;super(_0x5e0d49(0x113)),this[_0x5e0d49(0x140)]=_0x5e0d49(0x106);}}function createSafeRl(){const _0x5033e6=a31_0x51d854,_0x128968=createInterface({'input':process[_0x5033e6(0x126)],'output':process[_0x5033e6(0x124)]});let _0x518bbd;const _0x928bde=new Promise((_0xd4d886,_0x42be3e)=>{_0x518bbd=()=>{const _0x3b59af=a31_0x5b98;_0x518bbd&&(_0x128968['removeListener']('SIGINT',_0x518bbd),_0x518bbd=undefined);try{_0x128968[_0x3b59af(0x13e)]();}catch{}_0x42be3e(new AbortPrompt());},_0x128968['once']('SIGINT',_0x518bbd);}),_0x3d0d15=()=>{const _0x3ebd9d=_0x5033e6;_0x518bbd&&(_0x128968[_0x3ebd9d(0x131)](_0x3ebd9d(0x149),_0x518bbd),_0x518bbd=undefined);try{_0x128968[_0x3ebd9d(0x13e)]();}catch{}};return{'rl':_0x128968,'abortPromise':_0x928bde,'disposeSuccess':_0x3d0d15};}async function promptInput(_0x1389a,_0x910699){const _0x3fc9a1=a31_0x51d854,{rl:_0x3c8857,abortPromise:_0x2e19e5,disposeSuccess:_0x35136a}=createSafeRl(),_0x52b076=new Promise(_0x14b5cb=>{const _0x378841=a31_0x5b98,_0x25afa6=_0x910699?'\x20\x20'+_0x1389a+'\x20('+_0x910699+_0x378841(0x13c):'\x20\x20'+_0x1389a+':\x20';_0x3c8857[_0x378841(0x128)](_0x25afa6,_0x19f7b8=>{_0x35136a(),_0x14b5cb(_0x19f7b8['trim']()||_0x910699);});});return Promise[_0x3fc9a1(0x114)]([_0x52b076,_0x2e19e5]);}async function promptYesNo(_0x830d42,_0x74bab6){const {rl:_0x4d8510,abortPromise:_0x2e4055,disposeSuccess:_0x2db47e}=createSafeRl(),_0x19a721=new Promise(_0x2b8806=>{const _0x255f35=a31_0x5b98,_0x2c7c94=_0x74bab6?_0x255f35(0x148):_0x255f35(0x111);_0x4d8510['question']('\x20\x20'+_0x830d42+'\x20'+_0x2c7c94+':\x20',_0x355f9d=>{const _0x3060e4=_0x255f35;_0x2db47e();const _0x4228e1=_0x355f9d[_0x3060e4(0x142)]()[_0x3060e4(0x144)]();if(_0x4228e1==='y'||_0x4228e1===_0x3060e4(0x14a))_0x2b8806(!![]);else{if(_0x4228e1==='n'||_0x4228e1==='no')_0x2b8806(![]);else _0x2b8806(_0x74bab6);}});});return Promise['race']([_0x19a721,_0x2e4055]);}function loadExisting(_0x30915d){if(!existsSync(_0x30915d))return null;return readConfigFile(_0x30915d);}function resolveFilePath(_0x2bf21d){const _0x474242=a31_0x51d854;return isAbsolute(_0x2bf21d)?_0x2bf21d:resolve(process[_0x474242(0x11c)](),_0x2bf21d);}function readSourceFile(_0x20212c){const _0x591c5d=a31_0x51d854;try{const _0x510836=readFileSync(_0x20212c,{'encoding':_0x591c5d(0x115)});return JSON[_0x591c5d(0x11d)](_0x510836);}catch(_0x2486ef){throw CliErrors[_0x591c5d(0x130)](_0x591c5d(0x120)+_0x2486ef[_0x591c5d(0x127)]);}}function resolveInitEnv(_0x39c49c){const _0x857586=a31_0x51d854,_0x35f9de=_0x39c49c[_0x857586(0x119)];if(_0x35f9de===undefined||_0x35f9de==='')return DEFAULT_CONFIG_VALUES[_0x857586(0x119)];if(!RUNTIME_ENV_VALUES['includes'](_0x35f9de))throw CliErrors[_0x857586(0x130)]('Invalid\x20env\x20\x22'+_0x35f9de+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x857586(0x121)](',\x20'));return _0x35f9de;}
@@ -1 +1 @@
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
+ const a32_0x378ce6=a32_0x1edc;(function(_0x4f9ae2,_0x9c5063){const _0x25e90c=a32_0x1edc,_0x15ade6=_0x4f9ae2();while(!![]){try{const _0x5bc13c=-parseInt(_0x25e90c(0xc5))/0x1*(parseInt(_0x25e90c(0xe7))/0x2)+parseInt(_0x25e90c(0xc9))/0x3*(-parseInt(_0x25e90c(0xb4))/0x4)+-parseInt(_0x25e90c(0xbb))/0x5+-parseInt(_0x25e90c(0xc8))/0x6*(parseInt(_0x25e90c(0xe9))/0x7)+-parseInt(_0x25e90c(0xea))/0x8*(-parseInt(_0x25e90c(0xd6))/0x9)+-parseInt(_0x25e90c(0xe5))/0xa+-parseInt(_0x25e90c(0xd1))/0xb*(-parseInt(_0x25e90c(0xbe))/0xc);if(_0x5bc13c===_0x9c5063)break;else _0x15ade6['push'](_0x15ade6['shift']());}catch(_0x534bc4){_0x15ade6['push'](_0x15ade6['shift']());}}}(a32_0x5977,0x4e88b));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x378ce6(0xc0),'type':a32_0x378ce6(0xb3),'required':!![],'description':a32_0x378ce6(0xdd)},FILE_FLAG={'name':a32_0x378ce6(0xcb),'type':'string','required':!![],'description':a32_0x378ce6(0xef)},QUERY_FLAG={'name':a32_0x378ce6(0xda),'type':a32_0x378ce6(0xb3),'required':!![],'description':a32_0x378ce6(0xc3)},TOPK_FLAG={'name':'topk','type':'number','description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x4febfa){const _0xf7ffe8=a32_0x378ce6;if(!_0x4febfa)throw CliErrors[_0xf7ffe8(0xd3)](_0xf7ffe8(0xd4));if(!existsSync(_0x4febfa))throw CliErrors[_0xf7ffe8(0xd3)](_0xf7ffe8(0xba)+_0x4febfa);if(!statSync(_0x4febfa)[_0xf7ffe8(0xb1)]())throw CliErrors[_0xf7ffe8(0xd3)](_0xf7ffe8(0xb9)+_0x4febfa);return readFileSync(_0x4febfa,_0xf7ffe8(0xe1));}function summarizePersonalItem(_0x49a409){const _0x5b0b9a=a32_0x378ce6;return{'id':_0x49a409['id'],'title':_0x49a409[_0x5b0b9a(0xc0)],'version':_0x49a409[_0x5b0b9a(0xcc)],'ragStatus':_0x49a409[_0x5b0b9a(0xca)],'ragErrorMessage':_0x49a409[_0x5b0b9a(0xd5)],'updateTime':_0x49a409['updateTime']};}function a32_0x5977(){const _0x3b787a=['bool','6ejISoj','6DLBVcs','ragStatus','file','version','/update','read','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','description','4802303KCWmSN','appCode','validation','File\x20path\x20is\x20required.','ragErrorMessage','54657YDkutM','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Personal\x20knowledge-base\x20entry\x20ID','num','query','str','trim','Personal\x20knowledge-base\x20entry\x20title','topk','verbose','score','utf8','write','build','--topk\x20must\x20be\x20a\x20positive\x20number.','1934310jlDkcz','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','578zskaJw','detail','1006054utGqBp','768PQPSia','createTime','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','userId','Updated\x20KB\x20entry\x20','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','map','content','flag','length','update','isFile','scope','string','384480JEeqBk','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','create','updateTime','/client/knowledge-base/personal/create','File\x20is\x20not\x20a\x20regular\x20file:\x20','File\x20not\x20found:\x20','98390wuGbOh','Created\x20KB\x20entry\x20','POST','12TniVaS','Override\x20the\x20existing\x20entry\x20title','title','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','search','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','body','515OgaRdq','weightedScore'];a32_0x5977=function(){return _0x3b787a;};return a32_0x5977();}function a32_0x1edc(_0x4456cf,_0x17b0f8){_0x4456cf=_0x4456cf-0xac;const _0x597706=a32_0x5977();let _0x1edca3=_0x597706[_0x4456cf];return _0x1edca3;}function detailPersonalItem(_0x1b8c8e){const _0x1e87e6=a32_0x378ce6;return{'id':_0x1b8c8e['id'],'appCode':_0x1b8c8e['appCode'],'scope':_0x1b8c8e[_0x1e87e6(0xb2)],'userId':_0x1b8c8e[_0x1e87e6(0xed)],'title':_0x1b8c8e[_0x1e87e6(0xc0)],'content':_0x1b8c8e[_0x1e87e6(0xad)]??'','version':_0x1b8c8e[_0x1e87e6(0xcc)],'ragStatus':_0x1b8c8e[_0x1e87e6(0xca)],'ragErrorMessage':_0x1b8c8e[_0x1e87e6(0xd5)],'createTime':_0x1b8c8e[_0x1e87e6(0xeb)],'updateTime':_0x1b8c8e[_0x1e87e6(0xb7)]};}function summarizeSearchHit(_0x210a47){const _0x59a43f=a32_0x378ce6;return{'scope':_0x210a47[_0x59a43f(0xb2)],'title':_0x210a47[_0x59a43f(0xc0)],'docId':_0x210a47['docId'],'score':_0x210a47[_0x59a43f(0xe0)],'weightedScore':_0x210a47[_0x59a43f(0xc6)],'content':_0x210a47[_0x59a43f(0xad)],'metadata':_0x210a47['metadata']};}function readTopK(_0x3f1a0a){const _0x2839c2=a32_0x378ce6,_0x2b349c=_0x3f1a0a[_0x2839c2(0xae)](_0x2839c2(0xde));if(_0x2b349c===undefined||_0x2b349c===null||_0x2b349c==='')return undefined;const _0x4074f6=_0x3f1a0a[_0x2839c2(0xd9)](_0x2839c2(0xde));if(!Number['isFinite'](_0x4074f6)||_0x4074f6<0x1)throw CliErrors[_0x2839c2(0xd3)](_0x2839c2(0xe4));return _0x4074f6;}const kbList={'service':'kb','command':'list','description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a32_0x378ce6(0xce),'flags':[VERBOSE_FLAG],async 'execute'(_0x84ed1f){const _0x1b0389=a32_0x378ce6,_0x4ee4c1=await listPersonalKnowledgeBaseItems(_0x84ed1f['appCode']);if(_0x84ed1f[_0x1b0389(0xc7)](_0x1b0389(0xdf)))return{'ok':!![],'data':{'total':_0x4ee4c1['length'],'items':_0x4ee4c1}};return{'ok':!![],'data':{'total':_0x4ee4c1[_0x1b0389(0xaf)],'items':_0x4ee4c1[_0x1b0389(0xac)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x378ce6(0xe8),'description':a32_0x378ce6(0xec),'risk':a32_0x378ce6(0xce),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0xd48745){const _0x5f174c=a32_0x378ce6,_0x274fe4=await getPersonalKnowledgeBaseItem(_0xd48745[_0x5f174c(0xd9)]('id'),_0xd48745[_0x5f174c(0xd2)]);return{'ok':!![],'data':detailPersonalItem(_0x274fe4)};}},kbCreate={'service':'kb','command':a32_0x378ce6(0xb6),'description':a32_0x378ce6(0xe6),'risk':a32_0x378ce6(0xe2),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x759aab){const _0x58e3a1=a32_0x378ce6,_0x2c0891=_0x759aab['str'](_0x58e3a1(0xc0)),_0x403e96=readKnowledgeFile(_0x759aab[_0x58e3a1(0xdb)](_0x58e3a1(0xcb))),_0x397567=await createPersonalKnowledgeBaseItem(_0x759aab[_0x58e3a1(0xd2)],{'title':_0x2c0891,'content':_0x403e96});return{'ok':!![],'data':summarizePersonalItem(_0x397567),'message':_0x58e3a1(0xbc)+_0x397567['id']+'\x20('+_0x397567[_0x58e3a1(0xc0)]+')'};},async 'dryRun'(_0x55daed){const _0x11a445=a32_0x378ce6,_0x412eb0=_0x55daed['str'](_0x11a445(0xc0)),_0x153a56=readKnowledgeFile(_0x55daed[_0x11a445(0xdb)]('file'));return dryRun(_0x11a445(0xbd),_0x11a445(0xb8))[_0x11a445(0xc4)]({'appCode':_0x55daed[_0x11a445(0xd2)],'title':_0x412eb0,'content':_0x153a56})[_0x11a445(0xd0)](_0x11a445(0xc1)+_0x412eb0+'\x22')['build']();}},kbUpdate={'service':'kb','command':a32_0x378ce6(0xb0),'description':a32_0x378ce6(0xb5),'risk':'write','flags':[{...ID_FLAG,'description':a32_0x378ce6(0xd8)},{...TITLE_FLAG,'required':![],'description':a32_0x378ce6(0xbf)},FILE_FLAG],async 'execute'(_0x2749bf){const _0x543ffa=a32_0x378ce6,_0x2ea828=_0x2749bf[_0x543ffa(0xd9)]('id'),_0x456e3e=readKnowledgeFile(_0x2749bf['str']('file')),_0x36455f=_0x2749bf['str'](_0x543ffa(0xc0))||(await getPersonalKnowledgeBaseItem(_0x2ea828,_0x2749bf[_0x543ffa(0xd2)]))['title'],_0x34781a=await updatePersonalKnowledgeBaseItem(_0x2ea828,_0x2749bf['appCode'],{'title':_0x36455f,'content':_0x456e3e});return{'ok':!![],'data':summarizePersonalItem(_0x34781a),'message':_0x543ffa(0xee)+_0x34781a['id']+'\x20('+_0x34781a['title']+')'};},async 'dryRun'(_0x478afa){const _0x40b149=a32_0x378ce6,_0x4b5b3a=_0x478afa[_0x40b149(0xd9)]('id'),_0x55023b=readKnowledgeFile(_0x478afa['str'](_0x40b149(0xcb))),_0x4cd188=_0x478afa[_0x40b149(0xdb)]('title')||(await getPersonalKnowledgeBaseItem(_0x4b5b3a,_0x478afa[_0x40b149(0xd2)]))[_0x40b149(0xc0)];return dryRun('POST','/client/knowledge-base/personal/'+_0x4b5b3a+_0x40b149(0xcd))[_0x40b149(0xc4)]({'appCode':_0x478afa[_0x40b149(0xd2)],'title':_0x4cd188,'content':_0x55023b})['description'](_0x40b149(0xd7)+_0x4b5b3a)[_0x40b149(0xe3)]();}},kbSearch={'service':'kb','command':a32_0x378ce6(0xc2),'description':a32_0x378ce6(0xcf),'risk':a32_0x378ce6(0xce),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x4779ad){const _0x3e9cc4=a32_0x378ce6;if(!_0x4779ad[_0x3e9cc4(0xdb)]('query')['trim']())throw CliErrors[_0x3e9cc4(0xd3)]('Search\x20query\x20is\x20required.');readTopK(_0x4779ad);},async 'execute'(_0x1df2b9){const _0x25c276=a32_0x378ce6,_0x5e59cb=_0x1df2b9[_0x25c276(0xdb)](_0x25c276(0xda))[_0x25c276(0xdc)](),_0x4dc1a4=readTopK(_0x1df2b9),_0xf5bcb7=await searchKnowledgeBase(_0x1df2b9['appCode'],{'query':_0x5e59cb,'topK':_0x4dc1a4});return{'ok':!![],'data':{'total':_0xf5bcb7['length'],'hits':_0xf5bcb7[_0x25c276(0xac)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
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
+ const a33_0x168e93=a33_0x16d4;(function(_0x3e1d5b,_0x27429c){const _0x926d41=a33_0x16d4,_0x355aa5=_0x3e1d5b();while(!![]){try{const _0x42222e=parseInt(_0x926d41(0x74))/0x1+parseInt(_0x926d41(0x82))/0x2+parseInt(_0x926d41(0x7d))/0x3+parseInt(_0x926d41(0x7f))/0x4*(-parseInt(_0x926d41(0x81))/0x5)+-parseInt(_0x926d41(0x7c))/0x6*(-parseInt(_0x926d41(0x71))/0x7)+-parseInt(_0x926d41(0x70))/0x8+-parseInt(_0x926d41(0x73))/0x9;if(_0x42222e===_0x27429c)break;else _0x355aa5['push'](_0x355aa5['shift']());}catch(_0x2413b7){_0x355aa5['push'](_0x355aa5['shift']());}}}(a33_0x4516,0xc6ba7));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x4516(){const _0x572aeb=['read','level','en-US','readLogs','details','length','11293016FsCPTL','1799oIGRib','View\x20command\x20history\x20logs','1257075ieGyDv','247382iQOUCx','error','\x20\x20\x20Details:\x20','\x20\x20\x20Time:\x20','warn','command','\x20\x20\x20Duration:\x20','forEach','8328ZCTPaS','2638674MFVlNl','Clear\x20command\x20history\x20logs','4oyZGZz','toLocaleString','2838475RyWPfx','2898664bJjfKu','clearLogs','logs','duration','\x20logs:\x0a','clear','log','*\x20No\x20logs\x20found','timestamp'];a33_0x4516=function(){return _0x572aeb;};return a33_0x4516();}function printLogs(_0x4606fc){const _0x62ba8=a33_0x16d4;if(_0x4606fc[_0x62ba8(0x6f)]===0x0){console[_0x62ba8(0x67)](_0x62ba8(0x68));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x62ba8(0x65)),_0x4606fc[_0x62ba8(0x7b)]((_0x4ea8f3,_0x1c9994)=>{const _0x1a5020=_0x62ba8,_0x47df7d=new Date(_0x4ea8f3[_0x1a5020(0x69)])[_0x1a5020(0x80)](_0x1a5020(0x6c)),_0x1b3ced=_0x4ea8f3[_0x1a5020(0x6b)]==='success'?'√':_0x4ea8f3[_0x1a5020(0x6b)]===_0x1a5020(0x75)?'×':_0x4ea8f3[_0x1a5020(0x6b)]===_0x1a5020(0x78)?'!':'i';console[_0x1a5020(0x67)](_0x1c9994+0x1+'.\x20'+_0x1b3ced+'\x20['+_0x4ea8f3[_0x1a5020(0x79)]+']\x20'+_0x4ea8f3['message']),console[_0x1a5020(0x67)](_0x1a5020(0x77)+_0x47df7d),_0x4ea8f3['duration']&&console[_0x1a5020(0x67)](_0x1a5020(0x7a)+_0x4ea8f3[_0x1a5020(0x64)]+'ms'),_0x4ea8f3[_0x1a5020(0x6e)]&&Object['keys'](_0x4ea8f3['details'])[_0x1a5020(0x6f)]>0x0&&console[_0x1a5020(0x67)](_0x1a5020(0x76)+JSON['stringify'](_0x4ea8f3[_0x1a5020(0x6e)],null,0x2)),console[_0x1a5020(0x67)]('');});}function a33_0x16d4(_0x39856f,_0x5776ee){_0x39856f=_0x39856f-0x64;const _0x45162f=a33_0x4516();let _0x16d48d=_0x45162f[_0x39856f];return _0x16d48d;}export const logsDefinitions=[{'service':a33_0x168e93(0x84),'command':'show','description':a33_0x168e93(0x72),'risk':a33_0x168e93(0x6a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5d458b){const _0x237848=a33_0x168e93;return printLogs(logger[_0x237848(0x6d)]()),{'ok':!![]};}},{'service':a33_0x168e93(0x84),'command':a33_0x168e93(0x66),'description':a33_0x168e93(0x7e),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5c65ff){const _0x5b5979=a33_0x168e93;return logger[_0x5b5979(0x83)](),console['log']('*\x20Logs\x20cleared'),{'ok':!![]};}}];
@@ -1 +1 @@
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
+ const a34_0x44b0bd=a34_0x290e;(function(_0x134fd0,_0x37f6bc){const _0x42a601=a34_0x290e,_0x31fe61=_0x134fd0();while(!![]){try{const _0x5b63f0=parseInt(_0x42a601(0x13e))/0x1+-parseInt(_0x42a601(0x14d))/0x2*(-parseInt(_0x42a601(0x144))/0x3)+parseInt(_0x42a601(0x166))/0x4*(parseInt(_0x42a601(0x150))/0x5)+parseInt(_0x42a601(0x16e))/0x6*(parseInt(_0x42a601(0x14f))/0x7)+parseInt(_0x42a601(0x15c))/0x8*(-parseInt(_0x42a601(0x152))/0x9)+parseInt(_0x42a601(0x15a))/0xa*(parseInt(_0x42a601(0x162))/0xb)+-parseInt(_0x42a601(0x141))/0xc;if(_0x5b63f0===_0x37f6bc)break;else _0x31fe61['push'](_0x31fe61['shift']());}catch(_0xf92a21){_0x31fe61['push'](_0x31fe61['shift']());}}}(a34_0x40f1,0x506aa));function a34_0x290e(_0x13a362,_0x523acb){_0x13a362=_0x13a362-0x13b;const _0x40f13d=a34_0x40f1();let _0x290e51=_0x40f13d[_0x13a362];return _0x290e51;}import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a34_0x40f1(){const _0x11ff13=['appCode','filter','build','string','/client/uploadFile','2zncoWL','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','217ZdXrqo','285935obUyQA','toLowerCase','2898VJJDDw','<filePath\x20returned\x20by\x20/client/uploadFile>','body','Invoice','\x20OCR','scene','path','str','110ZvbBvD','general','3184TNKWrl','filePath','image-file','File\x20URL\x20response\x20missing\x20fileUrl.','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','invoice','563651yniWTJ','\x20OCR\x20from\x20URL','imageFile','recognize','16ORbEaX','trim','Unsupported\x20OCR\x20scene:\x20','File\x20upload\x20response\x20missing\x20filePath.','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','POST','Table','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','14994cKYjzd','validation','imageUrl','IdCard','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','Publicly\x20accessible\x20image\x20or\x20file\x20URL','Preview:\x20recognize\x20','/client/queryFileUrl','join','312464XMptZx','idCard','fileName','13019772lihhqD','image-url','/client/ocr','1080573OTcvNU','length','form','.\x20Supported\x20scenes:\x20'];a34_0x40f1=function(){return _0x11ff13;};return a34_0x40f1();}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0x44b0bd(0x161),a34_0x44b0bd(0x15b),a34_0x44b0bd(0x146),a34_0x44b0bd(0x13f)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x44b0bd(0x155),'general':'General','form':a34_0x44b0bd(0x16c),'idCard':a34_0x44b0bd(0x171)},SCENE_FLAG={'name':a34_0x44b0bd(0x157),'type':a34_0x44b0bd(0x14b),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x44b0bd(0x14e)},IMAGE_FILE_FLAG={'name':a34_0x44b0bd(0x15e),'type':a34_0x44b0bd(0x14b),'description':a34_0x44b0bd(0x16a)},IMAGE_URL_FLAG={'name':a34_0x44b0bd(0x142),'type':a34_0x44b0bd(0x14b),'description':a34_0x44b0bd(0x173)};function normalizeScene(_0x18344c){const _0x268558=a34_0x44b0bd,_0x5b4c3f=_0x18344c[_0x268558(0x167)]()[_0x268558(0x151)]();if(_0x5b4c3f==='idcard')return'idCard';if(_0x5b4c3f==='invoice'||_0x5b4c3f===_0x268558(0x15b)||_0x5b4c3f===_0x268558(0x146))return _0x5b4c3f;throw CliErrors['validation'](_0x268558(0x168)+_0x18344c+_0x268558(0x147)+SUPPORTED_SCENES[_0x268558(0x13d)](',\x20'));}function selectedInputs(_0x1b7271){const _0x222cc3=a34_0x44b0bd,_0xeed577=_0x1b7271[_0x222cc3(0x159)](_0x222cc3(0x15e))[_0x222cc3(0x167)](),_0x36ca91=_0x1b7271[_0x222cc3(0x159)](_0x222cc3(0x142))['trim']();return{'imageFile':_0xeed577,'imageUrl':_0x36ca91,'count':[_0xeed577,_0x36ca91][_0x222cc3(0x149)](Boolean)[_0x222cc3(0x145)]};}function validateInputSelection(_0x204d7e){const _0x187785=a34_0x44b0bd,_0x116341=selectedInputs(_0x204d7e);if(_0x116341['count']!==0x1)throw CliErrors[_0x187785(0x16f)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x116341;}function withScene(_0x50ad05,_0x1c566c,_0x51efa7){const _0x3bac25=a34_0x44b0bd;return{..._0x50ad05,'scene':_0x1c566c,..._0x51efa7?{'sourceFile':{'fileName':_0x51efa7[_0x3bac25(0x140)],'filePath':_0x51efa7[_0x3bac25(0x15d)]}}:{}};}const ocrRecognize={'service':'ocr','command':a34_0x44b0bd(0x165),'description':a34_0x44b0bd(0x172),'risk':'write','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x56c033){const _0x4d1914=a34_0x44b0bd,_0x139741=normalizeScene(_0x56c033['str'](_0x4d1914(0x157))),_0x461f8b=SCENE_TO_LEGACY_TYPE[_0x139741],_0x8c53a2=validateInputSelection(_0x56c033);if(_0x8c53a2[_0x4d1914(0x170)])return dryRun(_0x4d1914(0x16b),_0x4d1914(0x143))[_0x4d1914(0x154)]({'appCode':_0x56c033[_0x4d1914(0x148)],'url':_0x8c53a2['imageUrl'],'type':_0x461f8b})['description'](_0x4d1914(0x13b)+_0x139741+_0x4d1914(0x163))[_0x4d1914(0x14a)]();const _0x5d9c06=requireRuntimeUploadFile(_0x8c53a2[_0x4d1914(0x164)],'image-file');return dryRun('POST',_0x4d1914(0x14c))[_0x4d1914(0x154)]({'steps':[{'method':_0x4d1914(0x16b),'url':_0x4d1914(0x14c),'body':{'appCode':_0x56c033[_0x4d1914(0x148)],'multipart':{'file':_0x5d9c06}}},{'method':'POST','url':_0x4d1914(0x13c),'body':{'filePath':_0x4d1914(0x153),'downloadFlag':![]}},{'method':'POST','url':_0x4d1914(0x143),'body':{'appCode':_0x56c033[_0x4d1914(0x148)],'url':_0x4d1914(0x16d),'type':_0x461f8b}}]})['description'](_0x4d1914(0x160)+_0x139741+_0x4d1914(0x156))[_0x4d1914(0x14a)]();},async 'execute'(_0x234a2e){const _0x2b962f=a34_0x44b0bd,_0x321c82=normalizeScene(_0x234a2e[_0x2b962f(0x159)](_0x2b962f(0x157))),_0x4711c3=SCENE_TO_LEGACY_TYPE[_0x321c82],_0x4bf506=validateInputSelection(_0x234a2e);if(_0x4bf506[_0x2b962f(0x170)]){const _0x3fd48e=await recognizeRuntimeOcr(_0x234a2e[_0x2b962f(0x148)],{'url':_0x4bf506['imageUrl'],'type':_0x4711c3});return{'ok':!![],'data':withScene(_0x3fd48e,_0x321c82)};}const _0x2e3b49=requireRuntimeUploadFile(_0x4bf506[_0x2b962f(0x164)],_0x2b962f(0x15e)),_0x5e15dd=await uploadRuntimeFile(_0x234a2e[_0x2b962f(0x148)],_0x2e3b49[_0x2b962f(0x158)]);if(!_0x5e15dd[_0x2b962f(0x15d)])throw CliErrors['apiError'](_0x2b962f(0x169));const _0xa83cbf=await queryRuntimeFileUrl(_0x5e15dd['filePath'],{'download':![]});if(!_0xa83cbf['fileUrl'])throw CliErrors['apiError'](_0x2b962f(0x15f));const _0x36e87c=await recognizeRuntimeOcr(_0x234a2e['appCode'],{'url':_0xa83cbf['fileUrl'],'type':_0x4711c3});return{'ok':!![],'data':withScene(_0x36e87c,_0x321c82,_0x5e15dd)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
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
+ const a35_0x399d11=a35_0xcf9e;(function(_0x2eaed8,_0x4c5c37){const _0x807240=a35_0xcf9e,_0x313ba9=_0x2eaed8();while(!![]){try{const _0x5783e2=parseInt(_0x807240(0x209))/0x1*(-parseInt(_0x807240(0x227))/0x2)+parseInt(_0x807240(0x215))/0x3+parseInt(_0x807240(0x228))/0x4+parseInt(_0x807240(0x1ec))/0x5*(parseInt(_0x807240(0x201))/0x6)+-parseInt(_0x807240(0x207))/0x7*(parseInt(_0x807240(0x21b))/0x8)+-parseInt(_0x807240(0x21a))/0x9+-parseInt(_0x807240(0x20f))/0xa;if(_0x5783e2===_0x4c5c37)break;else _0x313ba9['push'](_0x313ba9['shift']());}catch(_0x28cfae){_0x313ba9['push'](_0x313ba9['shift']());}}}(a35_0x588c,0x7ebd4));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';function a35_0xcf9e(_0x35b895,_0x1043e2){_0x35b895=_0x35b895-0x1e9;const _0x588c8b=a35_0x588c();let _0xcf9e0c=_0x588c8b[_0x35b895];return _0xcf9e0c;}import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':'file','type':a35_0x399d11(0x1ea),'description':a35_0x399d11(0x1fc)},FUNCTION_NAME_FLAG={'name':a35_0x399d11(0x22c),'type':a35_0x399d11(0x1ea),'required':!![],'description':a35_0x399d11(0x22d)},DESCRIPTION_FLAG={'name':'description','type':a35_0x399d11(0x1ea),'description':a35_0x399d11(0x217)},SOURCE_SESSION_FLAG={'name':a35_0x399d11(0x1fe),'type':a35_0x399d11(0x1ea),'description':a35_0x399d11(0x206)};function normalizeFunctionName(_0xdd50d6){const _0x3518a7=a35_0x399d11,_0xeb4440=String(_0xdd50d6||'')[_0x3518a7(0x1f6)]();if(!_0xeb4440||!FUNCTION_NAME_PATTERN[_0x3518a7(0x22a)](_0xeb4440))throw CliErrors[_0x3518a7(0x1f8)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0xeb4440;}function readScriptFile(_0x2fca10){const _0xf4ddeb=a35_0x399d11;if(!_0x2fca10)throw CliErrors[_0xf4ddeb(0x1f8)](_0xf4ddeb(0x22e));if(!existsSync(_0x2fca10))throw CliErrors[_0xf4ddeb(0x1f8)](_0xf4ddeb(0x203)+_0x2fca10);if(!statSync(_0x2fca10)['isFile']())throw CliErrors[_0xf4ddeb(0x1f8)](_0xf4ddeb(0x205)+_0x2fca10);const _0x293027=readFileSync(_0x2fca10,_0xf4ddeb(0x20e));if(!_0x293027[_0xf4ddeb(0x1f6)]())throw CliErrors[_0xf4ddeb(0x1f8)](_0xf4ddeb(0x226));return _0x293027;}function optionalTrimmed(_0x1cd601){const _0x53e30a=a35_0x399d11,_0x49160b=String(_0x1cd601||'')[_0x53e30a(0x1f6)]();return _0x49160b||undefined;}function summarizeBff(_0x4aba52){const _0x10f2b0=a35_0x399d11;return{'id':_0x4aba52['id'],'appCode':_0x4aba52[_0x10f2b0(0x1f4)],'functionName':_0x4aba52[_0x10f2b0(0x1ff)],'description':_0x4aba52[_0x10f2b0(0x216)],'scriptType':_0x4aba52['scriptType'],'version':_0x4aba52['version'],'gmtModified':_0x4aba52[_0x10f2b0(0x21f)],'updateTime':_0x4aba52[_0x10f2b0(0x225)]};}function detailBff(_0x587102){const _0x1b425f=a35_0x399d11;return{'id':_0x587102['id'],'appCode':_0x587102[_0x1b425f(0x1f4)],'functionName':_0x587102['functionName'],'description':_0x587102[_0x1b425f(0x216)],'scriptType':_0x587102[_0x1b425f(0x200)],'scriptContent':_0x587102[_0x1b425f(0x1f2)]??'','config':_0x587102[_0x1b425f(0x222)],'version':_0x587102[_0x1b425f(0x20d)],'createUserId':_0x587102['createUserId'],'gmtCreate':_0x587102[_0x1b425f(0x1f0)],'gmtModified':_0x587102[_0x1b425f(0x21f)],'createTime':_0x587102[_0x1b425f(0x204)],'updateTime':_0x587102[_0x1b425f(0x225)]};}function buildCreateInput(_0x2b836a){const _0x5df39c=a35_0x399d11;return{'functionName':normalizeFunctionName(_0x2b836a['str'](_0x5df39c(0x22c))),...optionalTrimmed(_0x2b836a[_0x5df39c(0x1ee)]('description'))?{'description':optionalTrimmed(_0x2b836a[_0x5df39c(0x1ee)](_0x5df39c(0x216)))}:{},'scriptContent':readScriptFile(_0x2b836a['str'](_0x5df39c(0x1e9))),...optionalTrimmed(_0x2b836a[_0x5df39c(0x1ee)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x2b836a[_0x5df39c(0x1ee)](_0x5df39c(0x1fe)))}:{}};}function buildUpdateInput(_0x1190c7){const _0x11f8b7=a35_0x399d11,_0x8b6182={};optionalTrimmed(_0x1190c7[_0x11f8b7(0x1ee)](_0x11f8b7(0x22c)))&&(_0x8b6182[_0x11f8b7(0x1ff)]=normalizeFunctionName(_0x1190c7[_0x11f8b7(0x1ee)]('name')));_0x1190c7[_0x11f8b7(0x1f9)](_0x11f8b7(0x216))!==undefined&&(_0x8b6182[_0x11f8b7(0x216)]=_0x1190c7[_0x11f8b7(0x1ee)](_0x11f8b7(0x216)));optionalTrimmed(_0x1190c7[_0x11f8b7(0x1ee)](_0x11f8b7(0x1e9)))&&(_0x8b6182[_0x11f8b7(0x1f2)]=readScriptFile(_0x1190c7['str'](_0x11f8b7(0x1e9))));_0x1190c7['flag'](_0x11f8b7(0x1fe))!==undefined&&(_0x8b6182[_0x11f8b7(0x230)]=_0x1190c7[_0x11f8b7(0x1ee)](_0x11f8b7(0x1fe)));if(Object[_0x11f8b7(0x21d)](_0x8b6182)[_0x11f8b7(0x1fb)]===0x0)throw CliErrors[_0x11f8b7(0x1f8)](_0x11f8b7(0x208));return _0x8b6182;}function parseExecParams(_0x98d8bc){const _0x3a6508=a35_0x399d11,_0x670534=parseJsonParams(_0x98d8bc)??{};if(Array[_0x3a6508(0x224)](_0x670534))throw CliErrors[_0x3a6508(0x1f8)](_0x3a6508(0x220));return _0x670534;}function a35_0x588c(){const _0x2cd626=['File\x20is\x20not\x20a\x20regular\x20file:\x20','Optional\x20source\x20RuntimeAgent\x20session\x20id','2364068kUFKPS','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','29JHpKiI','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Updated\x20personal\x20BFF\x20','Preview:\x20create\x20personal\x20BFF\x20','version','utf8','3168070izbEGK','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','verbose','build','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','2139963qoGVNe','description','Personal\x20BFF\x20description','high-risk-write','params','824985UxOjzT','16FPKLnk','/client/runtime-bff/personal/','keys','Update\x20a\x20personal\x20BFF\x20by\x20id','gmtModified','--params\x20must\x20be\x20a\x20JSON\x20object.','body','config','Executed\x20personal\x20BFF\x20','isArray','updateTime','Personal\x20BFF\x20script\x20file\x20is\x20blank.','25338BFsWAB','1635260NiyuQd','Created\x20personal\x20BFF\x20','test','/client/runtime-bff/personal/create','name','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','File\x20path\x20is\x20required.','Personal\x20BFF\x20script\x20ID','sourceSessionId','file','string','write','26345EhnhEc','read','str','num','gmtCreate','create','scriptContent','list','appCode','personal-bff','trim','update','validation','flag','Preview:\x20update\x20personal\x20BFF\x20','length','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','exec','source-session-id','functionName','scriptType','966ZTAcZI','POST','File\x20not\x20found:\x20','createTime'];a35_0x588c=function(){return _0x2cd626;};return a35_0x588c();}const personalBffList={'service':a35_0x399d11(0x1f5),'command':a35_0x399d11(0x1f3),'description':a35_0x399d11(0x214),'risk':a35_0x399d11(0x1ed),'flags':[VERBOSE_FLAG],async 'execute'(_0x9627cf){const _0xd9343d=a35_0x399d11,_0x5a5b13=await listPersonalBffs(_0x9627cf[_0xd9343d(0x1f4)]);return{'ok':!![],'data':{'total':_0x5a5b13[_0xd9343d(0x1fb)],'items':_0x9627cf['bool'](_0xd9343d(0x212))?_0x5a5b13:_0x5a5b13['map'](summarizeBff)}};}},personalBffDetail={'service':a35_0x399d11(0x1f5),'command':'detail','description':'Show\x20one\x20personal\x20BFF\x20by\x20id','risk':a35_0x399d11(0x1ed),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x32612f){const _0x3b1c42=a35_0x399d11,_0x4f5c57=await getPersonalBff(_0x32612f[_0x3b1c42(0x1ef)]('id'),_0x32612f[_0x3b1c42(0x1f4)]);return{'ok':!![],'data':detailBff(_0x4f5c57)};}},personalBffCreate={'service':'personal-bff','command':a35_0x399d11(0x1f1),'description':a35_0x399d11(0x210),'risk':a35_0x399d11(0x1eb),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x156b5d){const _0x41cd08=a35_0x399d11,_0x143166=buildCreateInput(_0x156b5d),_0x5ac288=await createPersonalBff(_0x156b5d['appCode'],_0x143166);return{'ok':!![],'data':detailBff(_0x5ac288),'message':_0x41cd08(0x229)+_0x5ac288['id']+(_0x5ac288['functionName']?'\x20('+_0x5ac288[_0x41cd08(0x1ff)]+')':'')};},async 'dryRun'(_0x263340){const _0x4a4935=a35_0x399d11,_0x269f9b=buildCreateInput(_0x263340);return dryRun(_0x4a4935(0x202),_0x4a4935(0x22b))['body']({'appCode':_0x263340[_0x4a4935(0x1f4)],..._0x269f9b})[_0x4a4935(0x216)](_0x4a4935(0x20c)+_0x269f9b[_0x4a4935(0x1ff)])['build']();}},personalBffUpdate={'service':a35_0x399d11(0x1f5),'command':a35_0x399d11(0x1f7),'description':a35_0x399d11(0x21e),'risk':a35_0x399d11(0x1eb),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x24319f){const _0x40e0e0=a35_0x399d11,_0x43db8d=_0x24319f[_0x40e0e0(0x1ef)]('id'),_0x56ef08=buildUpdateInput(_0x24319f),_0x2c6ce0=await updatePersonalBff(_0x43db8d,_0x24319f[_0x40e0e0(0x1f4)],_0x56ef08);return{'ok':!![],'data':detailBff(_0x2c6ce0),'message':_0x40e0e0(0x20b)+_0x2c6ce0['id']+(_0x2c6ce0['functionName']?'\x20('+_0x2c6ce0[_0x40e0e0(0x1ff)]+')':'')};},async 'dryRun'(_0x1a00f7){const _0x45b24c=a35_0x399d11,_0x197fa4=_0x1a00f7['num']('id'),_0x11f268=buildUpdateInput(_0x1a00f7);return dryRun(_0x45b24c(0x202),_0x45b24c(0x21c)+_0x197fa4+'/update')[_0x45b24c(0x221)]({'appCode':_0x1a00f7['appCode'],..._0x11f268})[_0x45b24c(0x216)](_0x45b24c(0x1fa)+_0x197fa4)[_0x45b24c(0x213)]();}},personalBffExec={'service':a35_0x399d11(0x1f5),'command':a35_0x399d11(0x1fd),'description':a35_0x399d11(0x211),'risk':a35_0x399d11(0x218),'flags':[{...ID_FLAG,'description':a35_0x399d11(0x22f)},{...PARAMS_FLAG,'description':a35_0x399d11(0x20a)}],async 'validate'(_0x1a53c9){const _0x4a119c=a35_0x399d11;parseExecParams(_0x1a53c9[_0x4a119c(0x1ee)]('params'));},async 'execute'(_0x38fd0c){const _0x10a505=a35_0x399d11,_0x513a46=_0x38fd0c[_0x10a505(0x1ef)]('id'),_0x1b277b=parseExecParams(_0x38fd0c[_0x10a505(0x1ee)](_0x10a505(0x219))),_0x3a6f52=await executePersonalBff(_0x513a46,_0x38fd0c['appCode'],_0x1b277b);return{'ok':!![],'data':{'result':_0x3a6f52},'message':_0x10a505(0x223)+_0x513a46};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
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
+ const a36_0x5dffc7=a36_0x5e89;(function(_0x270228,_0x1334e2){const _0x206313=a36_0x5e89,_0x51a06c=_0x270228();while(!![]){try{const _0x45315c=parseInt(_0x206313(0x13d))/0x1*(parseInt(_0x206313(0x131))/0x2)+parseInt(_0x206313(0x158))/0x3*(-parseInt(_0x206313(0x12e))/0x4)+-parseInt(_0x206313(0x13f))/0x5*(parseInt(_0x206313(0x14c))/0x6)+parseInt(_0x206313(0x14a))/0x7+parseInt(_0x206313(0x155))/0x8+-parseInt(_0x206313(0x15b))/0x9+parseInt(_0x206313(0x136))/0xa;if(_0x45315c===_0x1334e2)break;else _0x51a06c['push'](_0x51a06c['shift']());}catch(_0x2e276d){_0x51a06c['push'](_0x51a06c['shift']());}}}(a36_0x4f27,0x298fa));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';function a36_0x4f27(){const _0x42c62e=['Diagnostics','123VOWMoO','Runtime\x20App\x20Config','risk','1700901ruasMA','API\x20Documentation','Personal\x20BFF','Agent\x20Schedules','5756BtyMvQ','Knowledge\x20Base','\x20\x20[write]','2JxvUUH','map','get','from','Instant\x20API','547950wgsqZF','\x20\x20[high-risk-write]','command','Configuration','App\x20Management','service','show','139349zKLaIY','install','774425HyMLYp','defaultCommand','CLI\x20Built-in\x20Skill','File','list','description','push','Service\x20Tree','login','Logs','Schema','804314OUMKuQ','Skills','6jkAGXk','Artifacts','Authentication','run','Self\x20Update','read','Workspace','set','Datasets','2112488JouTtc','has'];a36_0x4f27=function(){return _0x42c62e;};return a36_0x4f27();}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';function a36_0x5e89(_0x19736a,_0x114738){_0x19736a=_0x19736a-0x12d;const _0x4f27dc=a36_0x4f27();let _0x5e8901=_0x4f27dc[_0x19736a];return _0x5e8901;}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(_0x259d7d){const _0x20ce6d=a36_0x5e89;for(const _0x53f715 of _0x259d7d){definitions[_0x20ce6d(0x153)](_0x53f715[_0x20ce6d(0x13b)]+':'+_0x53f715[_0x20ce6d(0x138)],_0x53f715);let _0x1271ad=serviceGroups['get'](_0x53f715[_0x20ce6d(0x13b)]);!_0x1271ad&&(_0x1271ad=[],serviceGroups['set'](_0x53f715['service'],_0x1271ad)),_0x1271ad['push'](_0x53f715);}}function registerService(_0x27dc4c,_0x1aa64d,_0x401106){const _0x4f98cc=a36_0x5e89;registerDefinitions(_0x1aa64d);const _0x5dff5a=_0x1532ad=>_0x1532ad===_0x4f98cc(0x151)?'':_0x1532ad==='write'?_0x4f98cc(0x130):_0x4f98cc(0x137),_0x2a6bc8={'service':_0x1aa64d[0x0][_0x4f98cc(0x13b)],'label':_0x27dc4c,'commands':_0x1aa64d[_0x4f98cc(0x132)](_0x5e6a60=>({'command':_0x5e6a60[_0x4f98cc(0x138)],'description':_0x5e6a60[_0x4f98cc(0x144)],'tag':_0x5dff5a(_0x5e6a60[_0x4f98cc(0x15a)])})),'defaultCommand':_0x401106?.[_0x4f98cc(0x140)]??(_0x401106?.['isSingleCommand']?_0x1aa64d[0x0][_0x4f98cc(0x138)]:undefined),'isSingleCommand':_0x401106?.['isSingleCommand']};serviceRegistry[_0x4f98cc(0x145)](_0x2a6bc8),serviceByName['set'](_0x2a6bc8['service'],_0x2a6bc8);}registerService(a36_0x5dffc7(0x14e),authDefinitions,{'defaultCommand':a36_0x5dffc7(0x147)}),registerService(a36_0x5dffc7(0x13a),appDefinitions,{'defaultCommand':a36_0x5dffc7(0x143)}),registerService(a36_0x5dffc7(0x152),workspaceDefinitions),registerService(a36_0x5dffc7(0x159),appConfigDefinitions),registerService(a36_0x5dffc7(0x139),configDefinitions,{'defaultCommand':a36_0x5dffc7(0x143)}),registerService(a36_0x5dffc7(0x15c),apiDocDefinitions),registerService(a36_0x5dffc7(0x154),datasetDefinitions),registerService(a36_0x5dffc7(0x135),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService(a36_0x5dffc7(0x15d),personalBffDefinitions),registerService(a36_0x5dffc7(0x14d),artifactDefinitions),registerService(a36_0x5dffc7(0x142),fileDefinitions),registerService('OCR',ocrDefinitions),registerService(a36_0x5dffc7(0x12f),kbDefinitions),registerService(a36_0x5dffc7(0x12d),scheduleDefinitions,{'defaultCommand':a36_0x5dffc7(0x143)}),registerService(a36_0x5dffc7(0x146),serviceDefinitions,{'defaultCommand':a36_0x5dffc7(0x143)}),registerService(a36_0x5dffc7(0x14b),skillDefinitions,{'defaultCommand':a36_0x5dffc7(0x13e)}),registerService(a36_0x5dffc7(0x141),cliSkillDefinitions,{'defaultCommand':a36_0x5dffc7(0x13e)}),registerService(a36_0x5dffc7(0x150),[updateDefinition],{'defaultCommand':a36_0x5dffc7(0x14f),'isSingleCommand':!![]}),registerService(a36_0x5dffc7(0x157),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x5dffc7(0x149),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x5dffc7(0x148),logsDefinitions,{'defaultCommand':a36_0x5dffc7(0x13c)});export function findDefinition(_0x4af625,_0x54d586){const _0x5cd6da=a36_0x5dffc7;return definitions[_0x5cd6da(0x133)](_0x4af625+':'+_0x54d586);}export function isKnownService(_0x9cf6a5){const _0x703219=a36_0x5dffc7;return serviceByName[_0x703219(0x156)](_0x9cf6a5);}export function getServiceEntry(_0x1b6b67){const _0x4d701c=a36_0x5dffc7;return serviceByName[_0x4d701c(0x133)](_0x1b6b67);}export function getAllDefinitions(){const _0x14f9ef=a36_0x5dffc7;return Array[_0x14f9ef(0x134)](definitions['values']());}
@@ -1 +1 @@
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
+ const a37_0x23d1cc=a37_0x774e;(function(_0x33f653,_0x588924){const _0x155272=a37_0x774e,_0x40f60c=_0x33f653();while(!![]){try{const _0x2a458d=-parseInt(_0x155272(0x105))/0x1*(parseInt(_0x155272(0xc3))/0x2)+parseInt(_0x155272(0xe1))/0x3+parseInt(_0x155272(0xde))/0x4*(-parseInt(_0x155272(0xc5))/0x5)+parseInt(_0x155272(0xf3))/0x6+-parseInt(_0x155272(0xc9))/0x7+parseInt(_0x155272(0xce))/0x8*(-parseInt(_0x155272(0xfa))/0x9)+parseInt(_0x155272(0xf9))/0xa;if(_0x2a458d===_0x588924)break;else _0x40f60c['push'](_0x40f60c['shift']());}catch(_0x5245b){_0x40f60c['push'](_0x40f60c['shift']());}}}(a37_0xc181,0x829db));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_0x23d1cc(0xfe),'type':a37_0x23d1cc(0xda),'required':!![],'enum':[a37_0x23d1cc(0xdc),'ONCE'],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a37_0x23d1cc(0xe5),'type':a37_0x23d1cc(0xda),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':a37_0x23d1cc(0xda),'description':a37_0x23d1cc(0x103)},TITLE_FLAG={'name':a37_0x23d1cc(0xc6),'type':a37_0x23d1cc(0xda),'required':!![],'description':a37_0x23d1cc(0xf5)},PROMPT_FLAG={'name':'prompt','type':a37_0x23d1cc(0xda),'required':!![],'description':a37_0x23d1cc(0x102)},CHANNEL_FLAG={'name':'channel','type':'string','enum':[a37_0x23d1cc(0xd3),a37_0x23d1cc(0xd7)],'default':a37_0x23d1cc(0xd7),'description':a37_0x23d1cc(0xe4)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':a37_0x23d1cc(0xda),'required':!![],'description':a37_0x23d1cc(0xc7),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x23d1cc(0xc4)}},LIMIT_FLAG={'name':a37_0x23d1cc(0xdd),'type':'number','default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a37_0x23d1cc(0xe6),'type':'string','description':a37_0x23d1cc(0x104)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x1e65d6){const _0x230ebb=a37_0x23d1cc,_0x56ff73=_0x1e65d6['str'](_0x230ebb(0xfe)),_0x21089f=_0x1e65d6['str'](_0x230ebb(0xc6))['trim'](),_0x2a24b0=_0x1e65d6['str'](_0x230ebb(0xd6))[_0x230ebb(0xcd)](),_0x4b673e=_0x1e65d6[_0x230ebb(0xed)](_0x230ebb(0x106)),_0x313b11=_0x1e65d6[_0x230ebb(0xed)](_0x230ebb(0xe5)),_0x45c42b=_0x1e65d6[_0x230ebb(0xed)](_0x230ebb(0xee));if(!_0x21089f)throw CliErrors[_0x230ebb(0xfb)](_0x230ebb(0xf0));if(!_0x2a24b0)throw CliErrors[_0x230ebb(0xfb)](_0x230ebb(0xef));if(_0x56ff73===_0x230ebb(0xdc)){if(!_0x313b11||_0x45c42b)throw CliErrors[_0x230ebb(0xfb)](_0x230ebb(0xe7));return{'kind':_0x56ff73,'timezone':_0x230ebb(0xea),'cron':_0x313b11,'title':_0x21089f,'prompt':_0x2a24b0,'channel':_0x4b673e};}if(_0x56ff73===_0x230ebb(0xfc)){if(!_0x45c42b||_0x313b11)throw CliErrors['validation']('ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.');return{'kind':_0x56ff73,'timezone':'UTC','scheduledAt':_0x45c42b,'title':_0x21089f,'prompt':_0x2a24b0,'channel':_0x4b673e};}throw CliErrors[_0x230ebb(0xfb)](_0x230ebb(0xf6));}function scheduleCollectionPath(_0x3cf4e7){const _0x2d341e=a37_0x23d1cc;return _0x2d341e(0xf1)+encodeURIComponent(_0x3cf4e7)+_0x2d341e(0xd4);}function a37_0xc181(){const _0x3dc7ea=['746745udpKLF','title','Schedule\x20UUID','Preview:\x20delete\x20schedule\x20','1031975xeCxMY','high-risk-write','Deleted\x20schedule\x20','list','trim','1312456XHlMBn','schedule-id','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','Preview:\x20run\x20schedule\x20','taskId','auto','/schedules','Schedule\x20input\x20is\x20valid','prompt','premium','/run','validate','string','Show\x20one\x20schedule\x20by\x20schedule\x20ID','CRON','limit','20pLTMJo','DELETE','description','2729646nbYrFJ','\x20schedule\x20','isSafeInteger','Task\x20channel:\x20auto\x20or\x20premium','cron','cursor','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','num','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','UTC','scheduleId','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','str','scheduled-at','--prompt\x20must\x20not\x20be\x20blank.','--title\x20must\x20not\x20be\x20blank.','/api/harness/apps/','\x20from\x20schedule\x20','6383658zZQFkz','create','Schedule\x20title','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','appCode','5132670bXtffF','45vHkXCp','validation','ONCE','body','kind','POST','schedule','read','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','907uIVWpO','channel','Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','524ejjOdG','a\x20UUID\x20returned\x20by\x20schedule\x20create/list'];a37_0xc181=function(){return _0x3dc7ea;};return a37_0xc181();}function scheduleItemPath(_0x3bcc28,_0x45502f){return scheduleCollectionPath(_0x3bcc28)+'/'+encodeURIComponent(_0x45502f);}function a37_0x774e(_0x16b19f,_0x3579a4){_0x16b19f=_0x16b19f-0xc2;const _0xc1818a=a37_0xc181();let _0x774e1b=_0xc1818a[_0x16b19f];return _0x774e1b;}const scheduleValidate={'service':'schedule','command':a37_0x23d1cc(0xd9),'description':a37_0x23d1cc(0xec),'risk':a37_0x23d1cc(0x101),'flags':INPUT_FLAGS,async 'validate'(_0x5aa217){readScheduleInput(_0x5aa217);},async 'execute'(_0xc22b9c){const _0x1c2731=a37_0x23d1cc,_0x4e21fb=readScheduleInput(_0xc22b9c),_0x53723a=await validateRuntimeSchedule(_0xc22b9c[_0x1c2731(0xf8)],_0x4e21fb);return{'ok':!![],'data':_0x53723a,'message':_0x1c2731(0xd5)};}},scheduleCreate={'service':'schedule','command':a37_0x23d1cc(0xf4),'description':'Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','risk':a37_0x23d1cc(0xca),'flags':INPUT_FLAGS,async 'validate'(_0x3a214b){readScheduleInput(_0x3a214b);},async 'execute'(_0x31ec50){const _0x5e4b0b=a37_0x23d1cc,_0x57877f=readScheduleInput(_0x31ec50),_0x1c7c8b=await validateRuntimeSchedule(_0x31ec50[_0x5e4b0b(0xf8)],_0x57877f),_0x29e570=await createRuntimeSchedule(_0x31ec50[_0x5e4b0b(0xf8)],_0x1c7c8b);return{'ok':!![],'data':_0x29e570,'message':'Created\x20'+_0x29e570[_0x5e4b0b(0xfe)]+_0x5e4b0b(0xe2)+_0x29e570[_0x5e4b0b(0xeb)]};},async 'dryRun'(_0x383c83){const _0x4176d=a37_0x23d1cc,_0x3f4289=readScheduleInput(_0x383c83);return dryRun(_0x4176d(0xff),scheduleCollectionPath(_0x383c83[_0x4176d(0xf8)]))[_0x4176d(0xfd)](_0x3f4289)[_0x4176d(0xe0)]('Preview:\x20create\x20an\x20Agent\x20schedule')['build']();}},scheduleList={'service':a37_0x23d1cc(0x100),'command':a37_0x23d1cc(0xcc),'description':a37_0x23d1cc(0xf7),'risk':'read','flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x559ea9){const _0x5beeb5=a37_0x23d1cc,_0x1b12da=_0x559ea9[_0x5beeb5(0xe8)](_0x5beeb5(0xdd));if(!Number[_0x5beeb5(0xe3)](_0x1b12da)||_0x1b12da<0x1||_0x1b12da>0x64)throw CliErrors[_0x5beeb5(0xfb)](_0x5beeb5(0xe9));const _0x19d254=_0x559ea9[_0x5beeb5(0xed)](_0x5beeb5(0xe6));if(_0x19d254&&(_0x19d254['length']>0x400||_0x19d254[_0x5beeb5(0xcd)]()!==_0x19d254))throw CliErrors[_0x5beeb5(0xfb)](_0x5beeb5(0xd0));},async 'execute'(_0xf3371){const _0xcd6aac=a37_0x23d1cc,_0x419206=_0xf3371[_0xcd6aac(0xed)]('cursor'),_0x37b363=await listRuntimeSchedules(_0xf3371[_0xcd6aac(0xf8)],{'limit':_0xf3371[_0xcd6aac(0xe8)](_0xcd6aac(0xdd)),..._0x419206?{'cursor':_0x419206}:{}});return{'ok':!![],'data':_0x37b363};}},scheduleDetail={'service':a37_0x23d1cc(0x100),'command':'detail','description':a37_0x23d1cc(0xdb),'risk':a37_0x23d1cc(0x101),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4504dd){const _0x2265b6=a37_0x23d1cc,_0x43fcfe=await getRuntimeSchedule(_0x4504dd[_0x2265b6(0xf8)],_0x4504dd[_0x2265b6(0xed)](_0x2265b6(0xcf)));return{'ok':!![],'data':_0x43fcfe};}},scheduleRun={'service':a37_0x23d1cc(0x100),'command':'run','description':a37_0x23d1cc(0xc2),'risk':a37_0x23d1cc(0xca),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2eed70){const _0x299ff7=a37_0x23d1cc,_0x9f6790=_0x2eed70[_0x299ff7(0xed)]('schedule-id'),_0x21760d=await runRuntimeSchedule(_0x2eed70['appCode'],_0x9f6790);return{'ok':!![],'data':_0x21760d,'message':'Queued\x20Task\x20'+_0x21760d[_0x299ff7(0xd2)]+_0x299ff7(0xf2)+_0x9f6790};},async 'dryRun'(_0x38a327){const _0x22158b=a37_0x23d1cc,_0x3f6ccc=_0x38a327[_0x22158b(0xed)](_0x22158b(0xcf));return dryRun(_0x22158b(0xff),scheduleItemPath(_0x38a327[_0x22158b(0xf8)],_0x3f6ccc)+_0x22158b(0xd8))[_0x22158b(0xe0)](_0x22158b(0xd1)+_0x3f6ccc+'\x20immediately')['build']();}},scheduleDelete={'service':a37_0x23d1cc(0x100),'command':'delete','description':'Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','risk':a37_0x23d1cc(0xca),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x318c24){const _0x32115f=a37_0x23d1cc,_0x595473=_0x318c24['str']('schedule-id'),_0x2a4054=await deleteRuntimeSchedule(_0x318c24['appCode'],_0x595473);return{'ok':!![],'data':_0x2a4054,'message':_0x32115f(0xcb)+_0x595473};},async 'dryRun'(_0x37bd6c){const _0x313b4a=a37_0x23d1cc,_0x403ba5=_0x37bd6c[_0x313b4a(0xed)](_0x313b4a(0xcf));return dryRun(_0x313b4a(0xdf),scheduleItemPath(_0x37bd6c[_0x313b4a(0xf8)],_0x403ba5))[_0x313b4a(0xe0)](_0x313b4a(0xc8)+_0x403ba5)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
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();}
1
+ const a38_0x2b07d9=a38_0x895a;function a38_0x3a8e(){const _0x4406b6=['64535oYEeoS','10361918IDzYDS','24323148fCXRRw','2818808VcNehx','1363561jNWijh','12IgKzzO','read','782232vboAtB','519063idgFLT','Export\x20machine-readable\x20command\x20schema\x20(JSON)','16Ueeytp','schema','export'];a38_0x3a8e=function(){return _0x4406b6;};return a38_0x3a8e();}function a38_0x895a(_0x12b048,_0x2182fa){_0x12b048=_0x12b048-0x169;const _0x3a8e0c=a38_0x3a8e();let _0x895ad4=_0x3a8e0c[_0x12b048];return _0x895ad4;}(function(_0x205f25,_0x39bdb5){const _0x1f80be=a38_0x895a,_0x25cc4b=_0x205f25();while(!![]){try{const _0x219584=-parseInt(_0x1f80be(0x172))/0x1+-parseInt(_0x1f80be(0x171))/0x2+parseInt(_0x1f80be(0x169))/0x3*(-parseInt(_0x1f80be(0x16b))/0x4)+-parseInt(_0x1f80be(0x16e))/0x5*(parseInt(_0x1f80be(0x173))/0x6)+parseInt(_0x1f80be(0x16f))/0x7+parseInt(_0x1f80be(0x175))/0x8+parseInt(_0x1f80be(0x170))/0x9;if(_0x219584===_0x39bdb5)break;else _0x25cc4b['push'](_0x25cc4b['shift']());}catch(_0x39c7df){_0x25cc4b['push'](_0x25cc4b['shift']());}}}(a38_0x3a8e,0xc0d02));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x52596e){const _0x1716d9=await buildSchemaPayload();return{'ok':!![],'data':_0x1716d9};}export const schemaDefinition={'service':a38_0x2b07d9(0x16c),'command':a38_0x2b07d9(0x16d),'description':a38_0x2b07d9(0x16a),'risk':a38_0x2b07d9(0x174),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};