@lovrabet/lovrabet-cli 2.1.18 → 2.1.19

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_0x3938c8=a29_0x2d55;(function(_0x5e7dd6,_0x438582){const _0x3fe750=a29_0x2d55,_0xdb9cdc=_0x5e7dd6();while(!![]){try{const _0x548f7f=parseInt(_0x3fe750(0x9a))/0x1+-parseInt(_0x3fe750(0xbb))/0x2+parseInt(_0x3fe750(0xc1))/0x3+parseInt(_0x3fe750(0x70))/0x4+-parseInt(_0x3fe750(0xb0))/0x5*(-parseInt(_0x3fe750(0x8c))/0x6)+-parseInt(_0x3fe750(0xaf))/0x7*(parseInt(_0x3fe750(0x76))/0x8)+-parseInt(_0x3fe750(0x8f))/0x9*(parseInt(_0x3fe750(0xa7))/0xa);if(_0x548f7f===_0x438582)break;else _0xdb9cdc['push'](_0xdb9cdc['shift']());}catch(_0x37cb8d){_0xdb9cdc['push'](_0xdb9cdc['shift']());}}}(a29_0x500b,0xa9f9f));import a29_0x5766a9 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';function a29_0x2d55(_0x41f1e5,_0x153da0){_0x41f1e5=_0x41f1e5-0x6e;const _0x500bae=a29_0x500b();let _0x2d55b8=_0x500bae[_0x41f1e5];return _0x2d55b8;}import{inspectServiceRegistry}from'../commands/service/registry.js';function a29_0x500b(){const _0x33c002=['currentApp','(not\x20set)','padEnd','\x20\x20Merged\x20Config','repeat','serviceCode','red','serviceCount','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','849133WEVHUX','yellow','\x20\x20Config\x20Files','green','\x20(accessKey)','(set,\x20length=','(not\x20found)','format','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','110AYhQZO','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','doctor','gray','accessKey','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','pageSize','72674eaMnQh','370ENujPS','name','\x20\x20─','status','⚠\x20Empty','empty','Project','✓\x20Valid\x20JSON','(no\x20file)','Diagnose\x20CLI\x20configuration\x20and\x20environment','check','555502qWoyzz','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','verbose','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','2133033MDAZyU','\x20\x20Session\x20check:\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','3253340HnFVeC','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','path','\x20commands)','defaultApp','712mKfBRG','✓\x20Loaded','bold','missing','appCode','env','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','locale','\x20\x20runtimeDomain:\x20\x20\x20','(unnamed)','\x20\x20Service\x20Tree','message','\x20\x20Auth','(default)','platform','services','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','(missing)','110526QSIHaF','log','version','1504359hzBwcf'];a29_0x500b=function(){return _0x33c002;};return a29_0x500b();}async function execute(_0x2e6c38){const _0x4a5026=a29_0x2d55,_0x3f3777=getCliVersion(),_0x5267bd=buildConfigFromFlags({});await initGlobalEnvironment(_0x5267bd),console[_0x4a5026(0x8d)](),console[_0x4a5026(0x8d)](a29_0x5766a9['bold'](CLI_BIN_NAME+'\x20doctor')),console[_0x4a5026(0x8d)](a29_0x5766a9[_0x4a5026(0xaa)]('─'[_0x4a5026(0x94)](0x32))),console[_0x4a5026(0x8d)](_0x4a5026(0x7c)+_0x3f3777),console['log'](_0x4a5026(0x7e)+process[_0x4a5026(0x8e)]),console[_0x4a5026(0x8d)](_0x4a5026(0xa5)+process[_0x4a5026(0x87)]+'\x20'+process['arch']),console[_0x4a5026(0x8d)](),console[_0x4a5026(0x8d)](a29_0x5766a9[_0x4a5026(0x78)](_0x4a5026(0x9c))),console[_0x4a5026(0x8d)](a29_0x5766a9[_0x4a5026(0xaa)](_0x4a5026(0xb2)[_0x4a5026(0x94)](0x1e)));const _0x348cd3=getGlobalConfigPath(),_0x5758b0=getProjectConfigPath();console[_0x4a5026(0x8d)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x348cd3||a29_0x5766a9[_0x4a5026(0xaa)](_0x4a5026(0xa0)))),console[_0x4a5026(0x8d)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5758b0||a29_0x5766a9[_0x4a5026(0xaa)](_0x4a5026(0xa0)))),console[_0x4a5026(0x8d)](),console[_0x4a5026(0x8d)](a29_0x5766a9[_0x4a5026(0x78)]('\x20\x20Config\x20JSON')),console[_0x4a5026(0x8d)](a29_0x5766a9[_0x4a5026(0xaa)]('\x20\x20─'['repeat'](0x1e)));const _0x88098a=(_0x455c0f,_0x5e54cd)=>{const _0xdd15aa=_0x4a5026;if(!_0x5e54cd){console['log']('\x20\x20'+_0x455c0f[_0xdd15aa(0x92)](0x11)+'\x20'+a29_0x5766a9[_0xdd15aa(0xaa)](_0xdd15aa(0xb8)));return;}const _0x415a56=inspectCliConfigJsonFile(_0x5e54cd);if(_0x415a56[_0xdd15aa(0xb3)]==='ok')console[_0xdd15aa(0x8d)]('\x20\x20'+_0x455c0f[_0xdd15aa(0x92)](0x11)+'\x20'+a29_0x5766a9[_0xdd15aa(0x9d)](_0xdd15aa(0xb7)));else{if(_0x415a56[_0xdd15aa(0xb3)]===_0xdd15aa(0xb5))console[_0xdd15aa(0x8d)]('\x20\x20'+_0x455c0f['padEnd'](0x11)+'\x20'+a29_0x5766a9[_0xdd15aa(0x9b)](_0xdd15aa(0xbd)));else _0x415a56[_0xdd15aa(0xb3)]===_0xdd15aa(0x79)?console[_0xdd15aa(0x8d)]('\x20\x20'+_0x455c0f[_0xdd15aa(0x92)](0x11)+'\x20'+a29_0x5766a9[_0xdd15aa(0xaa)](_0xdd15aa(0x8b))):(console[_0xdd15aa(0x8d)]('\x20\x20'+_0x455c0f['padEnd'](0x11)+'\x20'+a29_0x5766a9[_0xdd15aa(0x96)](_0xdd15aa(0x7f))),console[_0xdd15aa(0x8d)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a29_0x5766a9['red'](_0x415a56[_0xdd15aa(0x84)])));}};_0x88098a('Global',_0x348cd3),_0x88098a(_0x4a5026(0xb6),_0x5758b0),console['log'](),console[_0x4a5026(0x8d)](a29_0x5766a9[_0x4a5026(0x78)](_0x4a5026(0x93))),console[_0x4a5026(0x8d)](a29_0x5766a9[_0x4a5026(0xaa)](_0x4a5026(0xb2)[_0x4a5026(0x94)](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5267bd[_0x4a5026(0x7a)]||a29_0x5766a9[_0x4a5026(0x96)](_0x4a5026(0x91)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5267bd[_0x4a5026(0x7b)]);const _0x578af3=isLegacyCompatConfigKey(_0x4a5026(0x80))?a29_0x5766a9[_0x4a5026(0xaa)](_0x5267bd['locale']+'\x20(legacy/compat\x20only)'):_0x5267bd[_0x4a5026(0x80)];console[_0x4a5026(0x8d)](_0x4a5026(0xbc)+_0x578af3),console['log']('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x5267bd[_0x4a5026(0x75)]||a29_0x5766a9[_0x4a5026(0xaa)]('(none)'))),console['log'](_0x4a5026(0xa8)+(_0x5267bd[_0x4a5026(0x90)]||a29_0x5766a9[_0x4a5026(0xaa)]('(none)'))),console['log'](_0x4a5026(0xac)+(_0x5267bd[_0x4a5026(0xa1)]||a29_0x5766a9[_0x4a5026(0xaa)]('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x4a5026(0x8d)](_0x4a5026(0xa3)+(_0x5267bd[_0x4a5026(0xae)]??a29_0x5766a9['gray'](_0x4a5026(0x86)))),console['log'](_0x4a5026(0x89)+_0x5267bd[_0x4a5026(0xa4)]),console[_0x4a5026(0x8d)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5267bd[_0x4a5026(0xbe)]),console[_0x4a5026(0x8d)](_0x4a5026(0x99)+AUTH_MODE['ClientAk']),console['log'](_0x4a5026(0xa6)+(_0x5267bd[_0x4a5026(0xab)]?a29_0x5766a9[_0x4a5026(0x9d)](_0x4a5026(0x9f)+_0x5267bd[_0x4a5026(0xab)][_0x4a5026(0xad)]+')'):a29_0x5766a9[_0x4a5026(0xaa)]('(none)'))),console['log'](),console['log'](a29_0x5766a9[_0x4a5026(0x78)](_0x4a5026(0x72))),console[_0x4a5026(0x8d)](a29_0x5766a9['gray'](_0x4a5026(0xb2)[_0x4a5026(0x94)](0x1e))),console[_0x4a5026(0x8d)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x4a5026(0x8d)](_0x4a5026(0x98)+getUserDomain()),console[_0x4a5026(0x8d)](_0x4a5026(0x81)+getRuntimeDomain()),console[_0x4a5026(0x8d)](),console['log'](a29_0x5766a9[_0x4a5026(0x78)](_0x4a5026(0x83))),console[_0x4a5026(0x8d)](a29_0x5766a9[_0x4a5026(0xaa)](_0x4a5026(0xb2)[_0x4a5026(0x94)](0x1e)));const _0x3a51cd=inspectServiceRegistry();console[_0x4a5026(0x8d)](_0x4a5026(0xbf)+_0x3a51cd['registryPath']),console[_0x4a5026(0x8d)](_0x4a5026(0xa2)+formatServiceRegistryStatus(_0x3a51cd)),console[_0x4a5026(0x8d)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3a51cd[_0x4a5026(0x97)]),console[_0x4a5026(0x8d)](_0x4a5026(0xc0)+_0x3a51cd['commandCount']);for(const _0x1e8ffc of _0x3a51cd[_0x4a5026(0x88)]){console[_0x4a5026(0x8d)]('\x20\x20'+(_0x1e8ffc[_0x4a5026(0x95)]+':')[_0x4a5026(0x92)](0x11)+'\x20'+(_0x1e8ffc[_0x4a5026(0xb1)]||a29_0x5766a9['gray'](_0x4a5026(0x82)))+'\x20('+_0x1e8ffc['commandCount']+_0x4a5026(0x74)),console[_0x4a5026(0x8d)]('\x20\x20'+''[_0x4a5026(0x92)](0x11)+_0x4a5026(0x7d)+_0x1e8ffc['source'][_0x4a5026(0x73)]);}return console[_0x4a5026(0x8d)](),console['log'](a29_0x5766a9[_0x4a5026(0x78)](_0x4a5026(0x85))),console['log'](a29_0x5766a9[_0x4a5026(0xaa)]('\x20\x20─'[_0x4a5026(0x94)](0x1e))),console[_0x4a5026(0x8d)](_0x4a5026(0x71)+a29_0x5766a9[_0x4a5026(0x9d)](AUTH_MODE['ClientAk']+_0x4a5026(0x9e))),console[_0x4a5026(0x8d)](_0x4a5026(0x6e)+a29_0x5766a9[_0x4a5026(0xaa)](_0x4a5026(0x6f))),console[_0x4a5026(0x8d)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x5bf75c){const _0x4df013=a29_0x2d55;if(_0x5bf75c[_0x4df013(0xb3)]==='ok')return a29_0x5766a9[_0x4df013(0x9d)](_0x4df013(0x77));if(_0x5bf75c[_0x4df013(0xb3)]===_0x4df013(0x79))return a29_0x5766a9['gray'](_0x4df013(0xa0));if(_0x5bf75c[_0x4df013(0xb3)]==='empty')return a29_0x5766a9['yellow'](_0x4df013(0xb4));return a29_0x5766a9[_0x4df013(0x96)](_0x4df013(0x8a)+(_0x5bf75c[_0x4df013(0x84)]?':\x20'+_0x5bf75c[_0x4df013(0x84)]:''));}export const doctorDefinition={'service':a29_0x3938c8(0xa9),'command':a29_0x3938c8(0xba),'description':a29_0x3938c8(0xb9),'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_0x1020e5=a30_0x3b3e;function a30_0x5e78(){const _0x23101b=['filePath','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','24260126hAlHpp','77148QKDris','str','3210039rjuDjG','query-url','filepath','long-term','71218ONrGQQ','File','49HpcQTQ','5qCsJZy','validation','1032VkquaL','file','\x20to\x20runtime\x20app\x20','POST','filePath\x20is\x20required.','Uploaded\x20file:\x20','/client/uploadFile','bool','117oBXIsQ','download','11009790xCvoLs','11120574mgImAr','Path\x20to\x20the\x20local\x20file\x20to\x20upload','boolean','build','read','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','string','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','appCode','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','upload','11090iLxMhY','write','path','12ORlnAu'];a30_0x5e78=function(){return _0x23101b;};return a30_0x5e78();}(function(_0x5a8b9e,_0x399b18){const _0x5dedd6=a30_0x3b3e,_0x17235b=_0x5a8b9e();while(!![]){try{const _0x1e22dc=parseInt(_0x5dedd6(0x7a))/0x1*(-parseInt(_0x5dedd6(0x6b))/0x2)+-parseInt(_0x5dedd6(0x85))/0x3*(-parseInt(_0x5dedd6(0x72))/0x4)+parseInt(_0x5dedd6(0x7b))/0x5*(-parseInt(_0x5dedd6(0x88))/0x6)+parseInt(_0x5dedd6(0x78))/0x7*(-parseInt(_0x5dedd6(0x7d))/0x8)+parseInt(_0x5dedd6(0x74))/0x9+parseInt(_0x5dedd6(0x87))/0xa+-parseInt(_0x5dedd6(0x71))/0xb*(-parseInt(_0x5dedd6(0x6e))/0xc);if(_0x1e22dc===_0x399b18)break;else _0x17235b['push'](_0x17235b['shift']());}catch(_0x3fd427){_0x17235b['push'](_0x17235b['shift']());}}}(a30_0x5e78,0xeeb41));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x3b3e(_0x4594ef,_0x5f42cd){_0x4594ef=_0x4594ef-0x67;const _0x5e78d6=a30_0x5e78();let _0x3b3eb5=_0x5e78d6[_0x4594ef];return _0x3b3eb5;}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x1020e5(0x7e),'type':'string','required':!![],'description':a30_0x1020e5(0x89)},FILEPATH_FLAG={'name':a30_0x1020e5(0x76),'type':a30_0x1020e5(0x8f),'required':!![],'description':a30_0x1020e5(0x68)},DOWNLOAD_FLAG={'name':'download','type':a30_0x1020e5(0x8a),'description':a30_0x1020e5(0x8e)},LONG_TERM_FLAG={'name':a30_0x1020e5(0x77),'type':a30_0x1020e5(0x8a),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x3be2d4){const _0x4f7ee0=a30_0x1020e5,_0x372a2c=_0x3be2d4['trim']();if(!_0x372a2c)throw CliErrors[_0x4f7ee0(0x7c)](_0x4f7ee0(0x81));return _0x372a2c;}const fileUpload={'service':a30_0x1020e5(0x7e),'command':a30_0x1020e5(0x6a),'description':a30_0x1020e5(0x90),'risk':a30_0x1020e5(0x6c),'flags':[FILE_FLAG],async 'dryRun'(_0x41c56c){const _0x4d20f1=a30_0x1020e5,_0x218377=requireRuntimeUploadFile(_0x41c56c[_0x4d20f1(0x73)](_0x4d20f1(0x7e)),'File');return dryRun(_0x4d20f1(0x80),_0x4d20f1(0x83))['body']({'appCode':_0x41c56c['appCode'],'multipart':{'file':_0x218377}})['description']('Preview:\x20upload\x20'+_0x218377[_0x4d20f1(0x6d)]+_0x4d20f1(0x7f)+_0x41c56c[_0x4d20f1(0x67)])[_0x4d20f1(0x8b)]();},async 'execute'(_0x3c27c9){const _0x196832=a30_0x1020e5,_0xe13a08=requireRuntimeUploadFile(_0x3c27c9[_0x196832(0x73)](_0x196832(0x7e)),_0x196832(0x79)),_0x5c9c7f=await uploadRuntimeFile(_0x3c27c9[_0x196832(0x67)],_0xe13a08['path']);return{'ok':!![],'data':_0x5c9c7f,'message':_0x5c9c7f[_0x196832(0x6f)]?_0x196832(0x82)+_0x5c9c7f[_0x196832(0x6f)]+_0x196832(0x70):_0x196832(0x8d)};}},fileQueryUrl={'service':a30_0x1020e5(0x7e),'command':a30_0x1020e5(0x75),'description':a30_0x1020e5(0x69),'risk':a30_0x1020e5(0x8c),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x5f32c0){const _0x5ba8b8=a30_0x1020e5,_0xe56204=requireFilePath(_0x5f32c0[_0x5ba8b8(0x73)](_0x5ba8b8(0x76))),_0x4d305b=await queryRuntimeFileUrl(_0xe56204,{'download':_0x5f32c0[_0x5ba8b8(0x84)](_0x5ba8b8(0x86)),'longTerm':_0x5f32c0['bool'](_0x5ba8b8(0x77))});return{'ok':!![],'data':_0x4d305b};}};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_0x2dca36=a31_0x3c54;(function(_0x207684,_0x3e9866){const _0x17b57e=a31_0x3c54,_0x435a0e=_0x207684();while(!![]){try{const _0x18d586=parseInt(_0x17b57e(0x1c4))/0x1*(-parseInt(_0x17b57e(0x1c2))/0x2)+parseInt(_0x17b57e(0x1c6))/0x3*(-parseInt(_0x17b57e(0x1e2))/0x4)+-parseInt(_0x17b57e(0x1bf))/0x5+parseInt(_0x17b57e(0x1d5))/0x6+parseInt(_0x17b57e(0x1bc))/0x7+-parseInt(_0x17b57e(0x1ef))/0x8+parseInt(_0x17b57e(0x1cc))/0x9;if(_0x18d586===_0x3e9866)break;else _0x435a0e['push'](_0x435a0e['shift']());}catch(_0x3b7fb8){_0x435a0e['push'](_0x435a0e['shift']());}}}(a31_0x4d40,0x47ec5));import{existsSync,readFileSync}from'node:fs';function a31_0x4d40(){const _0x1816fb=['231940WXQcnT','close','129309lPFsSi','App\x20code\x20for\x20the\x20project','App\x20code\x20cannot\x20be\x20empty.','entries','object','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','12087936olFiqL','[Y/n]','\x20already\x20exists.\x20Overwrite?','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','appcode','newConfigFileName','[y/N]','name','File\x20','428784gFrEUB','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','\x0aInitialized\x20','log','defaultApp','Imported\x20from\x20','once','\x22.\x20Allowed:\x20','SIGINT','Failed\x20to\x20parse\x20source\x20file:\x20','message','User\x20aborted\x20prompt','App\x20code','32xNPtTW','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','question','validation','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`.','Write\x20to\x20global\x20(~/','removeListener','yes','string','stdout','):\x20','Override\x20imported\x20default\x20env','file','631952zNhdiD','includes','\x20\x20default:\x20','apiDir','global','\x20\x20appcode:\x20','toLowerCase','app','race','riskLevel','\x20\x20env:\x20\x20\x20\x20\x20','cwd','cancelled','trim','boolean','Source\x20file\x20not\x20found:\x20','utf8','project','Usage:\x20','\x20\x20config:\x20\x20','176855YyQiXI','join','env','1287690IjeMzT','AbortPrompt','Skip\x20confirmation\x20when\x20overwriting','4SrSdMw','parse'];a31_0x4d40=function(){return _0x1816fb;};return a31_0x4d40();}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';function a31_0x3c54(_0x4dc013,_0x36da6b){_0x4dc013=_0x4dc013-0x1b6;const _0x4d4015=a31_0x4d40();let _0x3c544d=_0x4d4015[_0x4dc013];return _0x3c544d;}export const initCreateFlagDefs=[{'name':'appcode','type':a31_0x2dca36(0x1ea),'description':a31_0x2dca36(0x1c7)},{'name':a31_0x2dca36(0x1be),'type':'string','description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a31_0x2dca36(0x1be)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x2dca36(0x1f3),'type':a31_0x2dca36(0x1b6),'description':a31_0x2dca36(0x1e7)+PRODUCT_CONFIG[a31_0x2dca36(0x1d1)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x2dca36(0x1e9),'type':a31_0x2dca36(0x1b6),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0x2dca36(0x1ee),'type':'string','description':a31_0x2dca36(0x1d6),'required':!![]},{'name':a31_0x2dca36(0x1d0),'type':a31_0x2dca36(0x1ea),'description':'Override\x20imported\x20default\x20appcode'},{'name':'env','type':a31_0x2dca36(0x1ea),'description':a31_0x2dca36(0x1ed),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x2dca36(0x1f3),'type':a31_0x2dca36(0x1b6),'description':a31_0x2dca36(0x1e7)+PRODUCT_CONFIG[a31_0x2dca36(0x1d1)]+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a31_0x2dca36(0x1b6),'description':a31_0x2dca36(0x1c1),'default':![]}];export async function runInit(_0xea9d6d){const _0x5bcb05=a31_0x2dca36,_0xeabf72=isNonInteractiveMode(_0xea9d6d),_0x1c19f6=_0xea9d6d['global']?_0x5bcb05(0x1f3):_0x5bcb05(0x1b9),_0x2b355d=resolveWriteConfigPath(_0x1c19f6);try{_0xeabf72?await runNonInteractive(_0xea9d6d,_0x2b355d):await runInteractive(_0xea9d6d,_0x2b355d);}catch(_0x4ec405){if(_0x4ec405 instanceof AbortPrompt)throw CliErrors[_0x5bcb05(0x1fb)]();throw _0x4ec405;}}export async function runInitImport(_0xc70c11){const _0x33d9a2=a31_0x2dca36,_0x23697d=_0xc70c11[_0x33d9a2(0x1f3)]?_0x33d9a2(0x1f3):_0x33d9a2(0x1b9),_0xb3bdb=resolveWriteConfigPath(_0x23697d);await runFromImport(_0xc70c11,_0xb3bdb);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x2dca36(0x1f2)]);async function runFromImport(_0x1dbbf7,_0xdbc40){const _0x23ef5f=a31_0x2dca36,_0x2a0b1a=resolveFilePath(_0x1dbbf7[_0x23ef5f(0x1ee)]);if(!existsSync(_0x2a0b1a))throw CliErrors[_0x23ef5f(0x1e5)](_0x23ef5f(0x1b7)+_0x2a0b1a);const _0x5cd3b7=readSourceFile(_0x2a0b1a),_0x54476d=convertToRuntimeConfig(_0x5cd3b7);_0x1dbbf7[_0x23ef5f(0x1d0)]&&(_0x54476d[_0x23ef5f(0x1d0)]=String(_0x1dbbf7['appcode']));_0x1dbbf7[_0x23ef5f(0x1be)]&&(_0x54476d[_0x23ef5f(0x1be)]=resolveInitEnv(_0x1dbbf7));if(!_0x54476d[_0x23ef5f(0x1d0)])throw CliErrors['validation'](_0x23ef5f(0x1cb),_0x23ef5f(0x1e6));await writeInitConfig(_0xdbc40,_0x54476d,_0x1dbbf7),console[_0x23ef5f(0x1d8)](_0x23ef5f(0x1da)+_0x2a0b1a),console['log'](_0x23ef5f(0x1bb)+_0xdbc40),console[_0x23ef5f(0x1d8)](_0x23ef5f(0x1f4)+_0x54476d[_0x23ef5f(0x1d0)]);if(_0x54476d[_0x23ef5f(0x1d9)])console[_0x23ef5f(0x1d8)](_0x23ef5f(0x1f1)+_0x54476d[_0x23ef5f(0x1d9)]);}function convertToRuntimeConfig(_0x4afe6f){const _0x1c08b0=a31_0x2dca36;if(_0x4afe6f['apps']&&typeof _0x4afe6f['apps']===_0x1c08b0(0x1ca))throw CliErrors[_0x1c08b0(0x1e5)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x1c08b0(0x1cf));const _0x413f98={};for(const _0x1d8203 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x4afe6f[_0x1d8203]!==undefined&&(_0x413f98[_0x1d8203]=_0x4afe6f[_0x1d8203]);}return!_0x413f98['riskLevel']&&(_0x413f98[_0x1c08b0(0x1f8)]=DEFAULT_CONFIG_VALUES[_0x1c08b0(0x1f8)]),_0x413f98;}async function runNonInteractive(_0x20919f,_0x1e37d1){const _0x3c32a3=a31_0x2dca36,_0x739a9d=_0x20919f[_0x3c32a3(0x1d0)];if(!_0x739a9d)throw CliErrors['flagMissing'](_0x3c32a3(0x1d0),_0x3c32a3(0x1ba)+CLI_BIN_NAME+_0x3c32a3(0x1e3));const _0x1941a8=resolveInitEnv(_0x20919f);await writeInitConfig(_0x1e37d1,{'appcode':_0x739a9d,'env':_0x1941a8},_0x20919f),console[_0x3c32a3(0x1d8)]('Initialized\x20'+_0x1e37d1),console[_0x3c32a3(0x1d8)](_0x3c32a3(0x1f4)+_0x739a9d),console[_0x3c32a3(0x1d8)](_0x3c32a3(0x1f9)+_0x1941a8);}async function runInteractive(_0x456034,_0x4b78b0){const _0x5eeb57=a31_0x2dca36,_0x45c4a0=loadExisting(_0x4b78b0),_0x186198=typeof _0x45c4a0?.[_0x5eeb57(0x1d0)]===_0x5eeb57(0x1ea)?_0x45c4a0[_0x5eeb57(0x1d0)]:'',_0xd8e5dd=resolveInitEnv(_0x456034);console['log'](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x5eeb57(0x1d1)]+'\x0a');if(existsSync(_0x4b78b0)&&!_0x456034[_0x5eeb57(0x1e9)]){const _0x50b635=await promptYesNo(_0x5eeb57(0x1d4)+_0x4b78b0+_0x5eeb57(0x1ce),![]);if(!_0x50b635){console[_0x5eeb57(0x1d8)]('Aborted.');return;}}const _0x7a0b68=typeof _0x456034['appcode']===_0x5eeb57(0x1ea)?_0x456034['appcode'][_0x5eeb57(0x1fc)]():'';let _0x1bf53f=_0x7a0b68;!_0x1bf53f&&(_0x1bf53f=await promptInput(_0x5eeb57(0x1e1),_0x186198));if(!_0x1bf53f[_0x5eeb57(0x1fc)]())throw CliErrors[_0x5eeb57(0x1e5)](_0x5eeb57(0x1c8));await writeInitConfig(_0x4b78b0,{'appcode':_0x1bf53f[_0x5eeb57(0x1fc)](),'env':_0xd8e5dd},_0x456034),console[_0x5eeb57(0x1d8)](_0x5eeb57(0x1d7)+_0x4b78b0),console[_0x5eeb57(0x1d8)](_0x5eeb57(0x1f4)+_0x1bf53f[_0x5eeb57(0x1fc)]()),console['log'](_0x5eeb57(0x1f9)+_0xd8e5dd);}async function writeInitConfig(_0x1629c5,_0x4ea83d,_0x205b84){const _0x46534c=a31_0x2dca36;let _0x25332e={};existsSync(_0x1629c5)&&!_0x205b84[_0x46534c(0x1e9)]&&(_0x25332e=readConfigFile(_0x1629c5));for(const [_0x1817f3,_0xbadc4a]of Object[_0x46534c(0x1c9)](_0x4ea83d)){_0xbadc4a!==undefined&&(_0x25332e[_0x1817f3]=_0xbadc4a);}if(_0x25332e[_0x46534c(0x1f6)])delete _0x25332e[_0x46534c(0x1f6)];writeConfigFile(_0x1629c5,_0x25332e);}class AbortPrompt extends Error{constructor(){const _0x301108=a31_0x2dca36;super(_0x301108(0x1e0)),this[_0x301108(0x1d3)]=_0x301108(0x1c0);}}function createSafeRl(){const _0x23f500=a31_0x2dca36,_0x1c2aef=createInterface({'input':process['stdin'],'output':process[_0x23f500(0x1eb)]});let _0x1103bb;const _0x5a4b28=new Promise((_0x42658d,_0xa0c485)=>{const _0x17cf48=_0x23f500;_0x1103bb=()=>{const _0xb1a1a6=a31_0x3c54;_0x1103bb&&(_0x1c2aef[_0xb1a1a6(0x1e8)]('SIGINT',_0x1103bb),_0x1103bb=undefined);try{_0x1c2aef[_0xb1a1a6(0x1c5)]();}catch{}_0xa0c485(new AbortPrompt());},_0x1c2aef[_0x17cf48(0x1db)](_0x17cf48(0x1dd),_0x1103bb);}),_0x5707d8=()=>{const _0x2ab67d=_0x23f500;_0x1103bb&&(_0x1c2aef['removeListener'](_0x2ab67d(0x1dd),_0x1103bb),_0x1103bb=undefined);try{_0x1c2aef[_0x2ab67d(0x1c5)]();}catch{}};return{'rl':_0x1c2aef,'abortPromise':_0x5a4b28,'disposeSuccess':_0x5707d8};}async function promptInput(_0x35a29a,_0xe0c55f){const _0x24571d=a31_0x2dca36,{rl:_0x29702c,abortPromise:_0x1f0b86,disposeSuccess:_0x4b4d1c}=createSafeRl(),_0x379e2b=new Promise(_0x4054e5=>{const _0x2e7fbe=a31_0x3c54,_0xcd0aaf=_0xe0c55f?'\x20\x20'+_0x35a29a+'\x20('+_0xe0c55f+_0x2e7fbe(0x1ec):'\x20\x20'+_0x35a29a+':\x20';_0x29702c[_0x2e7fbe(0x1e4)](_0xcd0aaf,_0x942f66=>{const _0xd2dcd7=_0x2e7fbe;_0x4b4d1c(),_0x4054e5(_0x942f66[_0xd2dcd7(0x1fc)]()||_0xe0c55f);});});return Promise[_0x24571d(0x1f7)]([_0x379e2b,_0x1f0b86]);}async function promptYesNo(_0x29ce6a,_0x46b4fa){const {rl:_0xa260e0,abortPromise:_0xe33885,disposeSuccess:_0x2d3e34}=createSafeRl(),_0x3c043f=new Promise(_0x2574df=>{const _0x30d1bb=a31_0x3c54,_0x257ade=_0x46b4fa?_0x30d1bb(0x1cd):_0x30d1bb(0x1d2);_0xa260e0['question']('\x20\x20'+_0x29ce6a+'\x20'+_0x257ade+':\x20',_0x50f420=>{const _0x472343=_0x30d1bb;_0x2d3e34();const _0x387bb0=_0x50f420[_0x472343(0x1fc)]()[_0x472343(0x1f5)]();if(_0x387bb0==='y'||_0x387bb0===_0x472343(0x1e9))_0x2574df(!![]);else{if(_0x387bb0==='n'||_0x387bb0==='no')_0x2574df(![]);else _0x2574df(_0x46b4fa);}});});return Promise['race']([_0x3c043f,_0xe33885]);}function loadExisting(_0x2e4c22){if(!existsSync(_0x2e4c22))return null;return readConfigFile(_0x2e4c22);}function resolveFilePath(_0x473c73){const _0x2d757f=a31_0x2dca36;return isAbsolute(_0x473c73)?_0x473c73:resolve(process[_0x2d757f(0x1fa)](),_0x473c73);}function readSourceFile(_0x39a8bd){const _0x21b96a=a31_0x2dca36;try{const _0x1fd2a6=readFileSync(_0x39a8bd,{'encoding':_0x21b96a(0x1b8)});return JSON[_0x21b96a(0x1c3)](_0x1fd2a6);}catch(_0x1ce8a4){throw CliErrors['validation'](_0x21b96a(0x1de)+_0x1ce8a4[_0x21b96a(0x1df)]);}}function resolveInitEnv(_0x27c289){const _0x494076=a31_0x2dca36,_0x5eed5f=_0x27c289[_0x494076(0x1be)];if(_0x5eed5f===undefined||_0x5eed5f==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x494076(0x1f0)](_0x5eed5f))throw CliErrors['validation']('Invalid\x20env\x20\x22'+_0x5eed5f+_0x494076(0x1dc)+RUNTIME_ENV_VALUES[_0x494076(0x1bd)](',\x20'));return _0x5eed5f;}
@@ -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_0x402a1c=a32_0x163a;(function(_0x385f41,_0x4bf5d4){const _0x5b5fd4=a32_0x163a,_0x437362=_0x385f41();while(!![]){try{const _0x325e81=-parseInt(_0x5b5fd4(0x1e5))/0x1+-parseInt(_0x5b5fd4(0x1c3))/0x2*(-parseInt(_0x5b5fd4(0x200))/0x3)+-parseInt(_0x5b5fd4(0x1c5))/0x4+-parseInt(_0x5b5fd4(0x202))/0x5*(parseInt(_0x5b5fd4(0x1f4))/0x6)+parseInt(_0x5b5fd4(0x1ef))/0x7+parseInt(_0x5b5fd4(0x1fc))/0x8*(-parseInt(_0x5b5fd4(0x1f8))/0x9)+parseInt(_0x5b5fd4(0x1e3))/0xa*(parseInt(_0x5b5fd4(0x1cb))/0xb);if(_0x325e81===_0x4bf5d4)break;else _0x437362['push'](_0x437362['shift']());}catch(_0x38eb8c){_0x437362['push'](_0x437362['shift']());}}}(a32_0x323b,0xc97ea));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_0x163a(_0x395eda,_0x1bca22){_0x395eda=_0x395eda-0x1c2;const _0x323b86=a32_0x323b();let _0x163ad4=_0x323b86[_0x395eda];return _0x163ad4;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x402a1c(0x1e6),'type':'string','required':!![],'description':a32_0x402a1c(0x201)},FILE_FLAG={'name':'file','type':a32_0x402a1c(0x1ed),'required':!![],'description':a32_0x402a1c(0x1da)},QUERY_FLAG={'name':a32_0x402a1c(0x1d3),'type':a32_0x402a1c(0x1ed),'required':!![],'description':a32_0x402a1c(0x1dd)},TOPK_FLAG={'name':a32_0x402a1c(0x1f7),'type':'number','description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x582787){const _0x4c62c5=a32_0x402a1c;if(!_0x582787)throw CliErrors[_0x4c62c5(0x1fb)]('File\x20path\x20is\x20required.');if(!existsSync(_0x582787))throw CliErrors[_0x4c62c5(0x1fb)](_0x4c62c5(0x1f6)+_0x582787);if(!statSync(_0x582787)[_0x4c62c5(0x1e4)]())throw CliErrors[_0x4c62c5(0x1fb)](_0x4c62c5(0x1ca)+_0x582787);return readFileSync(_0x582787,_0x4c62c5(0x1cf));}function summarizePersonalItem(_0x279094){const _0x14e70a=a32_0x402a1c;return{'id':_0x279094['id'],'title':_0x279094['title'],'version':_0x279094['version'],'ragStatus':_0x279094[_0x14e70a(0x1c6)],'ragErrorMessage':_0x279094[_0x14e70a(0x1ec)],'updateTime':_0x279094[_0x14e70a(0x1f0)]};}function detailPersonalItem(_0x39f638){const _0xa1e1e7=a32_0x402a1c;return{'id':_0x39f638['id'],'appCode':_0x39f638[_0xa1e1e7(0x1d7)],'scope':_0x39f638[_0xa1e1e7(0x1ea)],'userId':_0x39f638[_0xa1e1e7(0x1d4)],'title':_0x39f638[_0xa1e1e7(0x1e6)],'content':_0x39f638[_0xa1e1e7(0x1d8)]??'','version':_0x39f638[_0xa1e1e7(0x1c8)],'ragStatus':_0x39f638[_0xa1e1e7(0x1c6)],'ragErrorMessage':_0x39f638[_0xa1e1e7(0x1ec)],'createTime':_0x39f638[_0xa1e1e7(0x1d5)],'updateTime':_0x39f638[_0xa1e1e7(0x1f0)]};}function summarizeSearchHit(_0x450250){const _0x25ec87=a32_0x402a1c;return{'scope':_0x450250['scope'],'title':_0x450250['title'],'docId':_0x450250['docId'],'score':_0x450250['score'],'weightedScore':_0x450250[_0x25ec87(0x1e1)],'content':_0x450250[_0x25ec87(0x1d8)],'metadata':_0x450250[_0x25ec87(0x1df)]};}function readTopK(_0x5f4692){const _0x5388d4=a32_0x402a1c,_0x161107=_0x5f4692[_0x5388d4(0x1d9)](_0x5388d4(0x1f7));if(_0x161107===undefined||_0x161107===null||_0x161107==='')return undefined;const _0x383549=_0x5f4692[_0x5388d4(0x1d1)](_0x5388d4(0x1f7));if(!Number[_0x5388d4(0x1f2)](_0x383549)||_0x383549<0x1)throw CliErrors[_0x5388d4(0x1fb)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x383549;}const kbList={'service':'kb','command':a32_0x402a1c(0x1fe),'description':a32_0x402a1c(0x1f1),'risk':a32_0x402a1c(0x1d0),'flags':[VERBOSE_FLAG],async 'execute'(_0x2affc7){const _0x5a61a1=a32_0x402a1c,_0x452fab=await listPersonalKnowledgeBaseItems(_0x2affc7[_0x5a61a1(0x1d7)]);if(_0x2affc7[_0x5a61a1(0x1dc)](_0x5a61a1(0x1ee)))return{'ok':!![],'data':{'total':_0x452fab[_0x5a61a1(0x1c2)],'items':_0x452fab}};return{'ok':!![],'data':{'total':_0x452fab['length'],'items':_0x452fab[_0x5a61a1(0x1fd)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a32_0x402a1c(0x1cd),'risk':'read','flags':[{...ID_FLAG,'description':a32_0x402a1c(0x1f3)}],async 'execute'(_0x46219e){const _0x51ea11=a32_0x402a1c,_0x29256d=await getPersonalKnowledgeBaseItem(_0x46219e[_0x51ea11(0x1d1)]('id'),_0x46219e[_0x51ea11(0x1d7)]);return{'ok':!![],'data':detailPersonalItem(_0x29256d)};}},kbCreate={'service':'kb','command':a32_0x402a1c(0x1d2),'description':a32_0x402a1c(0x1f9),'risk':a32_0x402a1c(0x1e9),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x9d5ee){const _0x13cc3a=a32_0x402a1c,_0x3d5b5c=_0x9d5ee[_0x13cc3a(0x1ff)](_0x13cc3a(0x1e6)),_0x3f01df=readKnowledgeFile(_0x9d5ee['str'](_0x13cc3a(0x1fa))),_0x49bd09=await createPersonalKnowledgeBaseItem(_0x9d5ee[_0x13cc3a(0x1d7)],{'title':_0x3d5b5c,'content':_0x3f01df});return{'ok':!![],'data':summarizePersonalItem(_0x49bd09),'message':_0x13cc3a(0x1e2)+_0x49bd09['id']+'\x20('+_0x49bd09[_0x13cc3a(0x1e6)]+')'};},async 'dryRun'(_0x243e34){const _0x4c925d=a32_0x402a1c,_0x5a6491=_0x243e34[_0x4c925d(0x1ff)](_0x4c925d(0x1e6)),_0x24bb9c=readKnowledgeFile(_0x243e34['str'](_0x4c925d(0x1fa)));return dryRun('POST',_0x4c925d(0x1de))[_0x4c925d(0x1db)]({'appCode':_0x243e34[_0x4c925d(0x1d7)],'title':_0x5a6491,'content':_0x24bb9c})[_0x4c925d(0x1d6)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x5a6491+'\x22')[_0x4c925d(0x1ce)]();}},kbUpdate={'service':'kb','command':a32_0x402a1c(0x1c9),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a32_0x402a1c(0x1e9),'flags':[{...ID_FLAG,'description':a32_0x402a1c(0x1f3)},{...TITLE_FLAG,'required':![],'description':a32_0x402a1c(0x1e7)},FILE_FLAG],async 'execute'(_0x65a26b){const _0xce218c=a32_0x402a1c,_0x437cfc=_0x65a26b[_0xce218c(0x1d1)]('id'),_0x3f67bc=readKnowledgeFile(_0x65a26b[_0xce218c(0x1ff)]('file')),_0xba3791=_0x65a26b[_0xce218c(0x1ff)]('title')||(await getPersonalKnowledgeBaseItem(_0x437cfc,_0x65a26b[_0xce218c(0x1d7)]))[_0xce218c(0x1e6)],_0x38f178=await updatePersonalKnowledgeBaseItem(_0x437cfc,_0x65a26b[_0xce218c(0x1d7)],{'title':_0xba3791,'content':_0x3f67bc});return{'ok':!![],'data':summarizePersonalItem(_0x38f178),'message':_0xce218c(0x1e8)+_0x38f178['id']+'\x20('+_0x38f178['title']+')'};},async 'dryRun'(_0x52b2e4){const _0x81ee79=a32_0x402a1c,_0x5a181e=_0x52b2e4[_0x81ee79(0x1d1)]('id'),_0x367fd9=readKnowledgeFile(_0x52b2e4[_0x81ee79(0x1ff)](_0x81ee79(0x1fa))),_0x1e3b8f=_0x52b2e4['str'](_0x81ee79(0x1e6))||(await getPersonalKnowledgeBaseItem(_0x5a181e,_0x52b2e4[_0x81ee79(0x1d7)]))[_0x81ee79(0x1e6)];return dryRun('POST',_0x81ee79(0x1f5)+_0x5a181e+_0x81ee79(0x1eb))[_0x81ee79(0x1db)]({'appCode':_0x52b2e4[_0x81ee79(0x1d7)],'title':_0x1e3b8f,'content':_0x367fd9})[_0x81ee79(0x1d6)](_0x81ee79(0x1cc)+_0x5a181e)[_0x81ee79(0x1ce)]();}},kbSearch={'service':'kb','command':a32_0x402a1c(0x1c7),'description':a32_0x402a1c(0x1e0),'risk':a32_0x402a1c(0x1d0),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x1c291f){const _0x2d7fcb=a32_0x402a1c;if(!_0x1c291f[_0x2d7fcb(0x1ff)](_0x2d7fcb(0x1d3))['trim']())throw CliErrors[_0x2d7fcb(0x1fb)](_0x2d7fcb(0x1c4));readTopK(_0x1c291f);},async 'execute'(_0x415def){const _0x14fc3b=a32_0x402a1c,_0x343e21=_0x415def[_0x14fc3b(0x1ff)](_0x14fc3b(0x1d3))['trim'](),_0x30e8f1=readTopK(_0x415def),_0x5dd0cc=await searchKnowledgeBase(_0x415def[_0x14fc3b(0x1d7)],{'query':_0x343e21,'topK':_0x30e8f1});return{'ok':!![],'data':{'total':_0x5dd0cc[_0x14fc3b(0x1c2)],'hits':_0x5dd0cc[_0x14fc3b(0x1fd)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];function a32_0x323b(){const _0x56e9af=['query','userId','createTime','description','appCode','content','flag','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','body','bool','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','/client/knowledge-base/personal/create','metadata','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','weightedScore','Created\x20KB\x20entry\x20','310fxEPyN','isFile','315054tIBwHI','title','Override\x20the\x20existing\x20entry\x20title','Updated\x20KB\x20entry\x20','write','scope','/update','ragErrorMessage','string','verbose','167860JakVXa','updateTime','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','isFinite','Personal\x20knowledge-base\x20entry\x20ID','14532iPsZQN','/client/knowledge-base/personal/','File\x20not\x20found:\x20','topk','558plDAaD','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','file','validation','20760VIxqsp','map','list','str','4395285bYMTFM','Personal\x20knowledge-base\x20entry\x20title','2195dXSqto','length','2gzrPwm','Search\x20query\x20is\x20required.','4704400UQcEUp','ragStatus','search','version','update','File\x20is\x20not\x20a\x20regular\x20file:\x20','727969WGUXKm','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','build','utf8','read','num','create'];a32_0x323b=function(){return _0x56e9af;};return a32_0x323b();}
@@ -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_0x36a7e2=a33_0x1c0a;(function(_0x7fd15e,_0x12edc6){const _0x482155=a33_0x1c0a,_0x53c54f=_0x7fd15e();while(!![]){try{const _0x9b68c1=-parseInt(_0x482155(0x167))/0x1*(-parseInt(_0x482155(0x162))/0x2)+parseInt(_0x482155(0x16c))/0x3*(parseInt(_0x482155(0x16e))/0x4)+-parseInt(_0x482155(0x16b))/0x5+parseInt(_0x482155(0x14e))/0x6*(-parseInt(_0x482155(0x16a))/0x7)+-parseInt(_0x482155(0x15b))/0x8+parseInt(_0x482155(0x14f))/0x9+parseInt(_0x482155(0x170))/0xa*(parseInt(_0x482155(0x16d))/0xb);if(_0x9b68c1===_0x12edc6)break;else _0x53c54f['push'](_0x53c54f['shift']());}catch(_0x412b83){_0x53c54f['push'](_0x53c54f['shift']());}}}(a33_0x4835,0x20c15));import{logger}from'../../utils/logger.js';function a33_0x4835(){const _0x4bad55=['show','2738nABwAH','logs','details','306068txKoOc','254850mPJVLu','210621cluYan','811261NiohDR','8okrILb','\x20\x20\x20Duration:\x20','10hsQiBy','readLogs','level','36Bplgqe','1947492Cqpbgk','forEach','\x20\x20\x20Time:\x20','message','warn','write','Clear\x20command\x20history\x20logs','length','toLocaleString','duration','*\x20Logs\x20cleared','error','543616aFUqpy','keys','\x20\x20\x20Details:\x20','*\x20No\x20logs\x20found','clear','success','en-US','62QNmfsb','log','stringify','\x20logs:\x0a'];a33_0x4835=function(){return _0x4bad55;};return a33_0x4835();}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x1c0a(_0x41877b,_0x3c8104){_0x41877b=_0x41877b-0x14c;const _0x4835c4=a33_0x4835();let _0x1c0acc=_0x4835c4[_0x41877b];return _0x1c0acc;}function printLogs(_0x8f7c7d){const _0x431640=a33_0x1c0a;if(_0x8f7c7d[_0x431640(0x156)]===0x0){console[_0x431640(0x163)](_0x431640(0x15e));return;}console[_0x431640(0x163)]('*\x20'+CLI_DISPLAY_NAME+_0x431640(0x165)),_0x8f7c7d[_0x431640(0x150)]((_0xd7ab4e,_0x36435f)=>{const _0x57bbf7=_0x431640,_0x473bd4=new Date(_0xd7ab4e['timestamp'])[_0x57bbf7(0x157)](_0x57bbf7(0x161)),_0x2b8773=_0xd7ab4e[_0x57bbf7(0x14d)]===_0x57bbf7(0x160)?'√':_0xd7ab4e[_0x57bbf7(0x14d)]===_0x57bbf7(0x15a)?'×':_0xd7ab4e[_0x57bbf7(0x14d)]===_0x57bbf7(0x153)?'!':'i';console[_0x57bbf7(0x163)](_0x36435f+0x1+'.\x20'+_0x2b8773+'\x20['+_0xd7ab4e['command']+']\x20'+_0xd7ab4e[_0x57bbf7(0x152)]),console[_0x57bbf7(0x163)](_0x57bbf7(0x151)+_0x473bd4),_0xd7ab4e['duration']&&console[_0x57bbf7(0x163)](_0x57bbf7(0x16f)+_0xd7ab4e[_0x57bbf7(0x158)]+'ms'),_0xd7ab4e[_0x57bbf7(0x169)]&&Object[_0x57bbf7(0x15c)](_0xd7ab4e[_0x57bbf7(0x169)])[_0x57bbf7(0x156)]>0x0&&console['log'](_0x57bbf7(0x15d)+JSON[_0x57bbf7(0x164)](_0xd7ab4e['details'],null,0x2)),console[_0x57bbf7(0x163)]('');});}export const logsDefinitions=[{'service':a33_0x36a7e2(0x168),'command':a33_0x36a7e2(0x166),'description':'View\x20command\x20history\x20logs','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5ce227){const _0x7e66c1=a33_0x36a7e2;return printLogs(logger[_0x7e66c1(0x14c)]()),{'ok':!![]};}},{'service':a33_0x36a7e2(0x168),'command':a33_0x36a7e2(0x15f),'description':a33_0x36a7e2(0x155),'risk':a33_0x36a7e2(0x154),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x46dfc2){const _0x8ef714=a33_0x36a7e2;return logger['clearLogs'](),console[_0x8ef714(0x163)](_0x8ef714(0x159)),{'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
+ function a34_0x3d4d(_0x3c7fb9,_0x42603){_0x3c7fb9=_0x3c7fb9-0x1c3;const _0x3b9457=a34_0x3b94();let _0x3d4df3=_0x3b9457[_0x3c7fb9];return _0x3d4df3;}const a34_0x3297b6=a34_0x3d4d;(function(_0x1d0e55,_0x565930){const _0x218e00=a34_0x3d4d,_0x2ca2a0=_0x1d0e55();while(!![]){try{const _0x407e9a=parseInt(_0x218e00(0x1e2))/0x1+parseInt(_0x218e00(0x1ca))/0x2*(-parseInt(_0x218e00(0x1ed))/0x3)+parseInt(_0x218e00(0x1f7))/0x4+-parseInt(_0x218e00(0x1da))/0x5+parseInt(_0x218e00(0x1e9))/0x6*(-parseInt(_0x218e00(0x1f5))/0x7)+-parseInt(_0x218e00(0x1c9))/0x8*(-parseInt(_0x218e00(0x1f2))/0x9)+-parseInt(_0x218e00(0x1f4))/0xa*(-parseInt(_0x218e00(0x1db))/0xb);if(_0x407e9a===_0x565930)break;else _0x2ca2a0['push'](_0x2ca2a0['shift']());}catch(_0x28cf01){_0x2ca2a0['push'](_0x2ca2a0['shift']());}}}(a34_0x3b94,0x46bca));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a34_0x3b94(){const _0x21a403=['21rypCch','invoice','1430224MOrbbL','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','image-file','imageUrl','appCode','ocr','str','\x20OCR','form','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','idCard','Preview:\x20recognize\x20','64jmSSuq','176186TpUjbk','length','/client/queryFileUrl','Publicly\x20accessible\x20image\x20or\x20file\x20URL','toLowerCase','Invoice','/client/uploadFile','build','join','trim','general','/client/ocr','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','write','image-url','scene','2218395XuuYAl','5936535iARhcg','.\x20Supported\x20scenes:\x20','IdCard','POST','fileUrl','fileName','recognize','141741ujvwLz','body','validation','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','string','<filePath\x20returned\x20by\x20/client/uploadFile>','General','882018FHRazR','filePath','description','count','12arwsvQ','path','apiError','filter','imageFile','548793GJPFNo','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','10uwlbQr'];a34_0x3b94=function(){return _0x21a403;};return a34_0x3b94();}const SUPPORTED_SCENES=[a34_0x3297b6(0x1f6),'general',a34_0x3297b6(0x1c5),a34_0x3297b6(0x1c7)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x3297b6(0x1cf),'general':a34_0x3297b6(0x1e8),'form':'Table','idCard':a34_0x3297b6(0x1dd)},SCENE_FLAG={'name':a34_0x3297b6(0x1d9),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x3297b6(0x1f3)},IMAGE_FILE_FLAG={'name':a34_0x3297b6(0x1f9),'type':a34_0x3297b6(0x1e6),'description':a34_0x3297b6(0x1d6)},IMAGE_URL_FLAG={'name':a34_0x3297b6(0x1d8),'type':a34_0x3297b6(0x1e6),'description':a34_0x3297b6(0x1cd)};function normalizeScene(_0x1132b0){const _0x2505c6=a34_0x3297b6,_0x1ac63f=_0x1132b0[_0x2505c6(0x1d3)]()[_0x2505c6(0x1ce)]();if(_0x1ac63f==='idcard')return _0x2505c6(0x1c7);if(_0x1ac63f===_0x2505c6(0x1f6)||_0x1ac63f===_0x2505c6(0x1d4)||_0x1ac63f==='form')return _0x1ac63f;throw CliErrors[_0x2505c6(0x1e4)]('Unsupported\x20OCR\x20scene:\x20'+_0x1132b0+_0x2505c6(0x1dc)+SUPPORTED_SCENES[_0x2505c6(0x1d2)](',\x20'));}function selectedInputs(_0x18b9c4){const _0x375dc3=a34_0x3297b6,_0x5177a6=_0x18b9c4[_0x375dc3(0x1c3)]('image-file')[_0x375dc3(0x1d3)](),_0x4f99c1=_0x18b9c4['str'](_0x375dc3(0x1d8))[_0x375dc3(0x1d3)]();return{'imageFile':_0x5177a6,'imageUrl':_0x4f99c1,'count':[_0x5177a6,_0x4f99c1][_0x375dc3(0x1f0)](Boolean)[_0x375dc3(0x1cb)]};}function validateInputSelection(_0x455dad){const _0x24a9ff=a34_0x3297b6,_0x81d042=selectedInputs(_0x455dad);if(_0x81d042[_0x24a9ff(0x1ec)]!==0x1)throw CliErrors['validation']('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x81d042;}function withScene(_0x388030,_0x873e57,_0x4cf719){const _0x2f5b06=a34_0x3297b6;return{..._0x388030,'scene':_0x873e57,..._0x4cf719?{'sourceFile':{'fileName':_0x4cf719[_0x2f5b06(0x1e0)],'filePath':_0x4cf719['filePath']}}:{}};}const ocrRecognize={'service':a34_0x3297b6(0x1fc),'command':a34_0x3297b6(0x1e1),'description':a34_0x3297b6(0x1f8),'risk':a34_0x3297b6(0x1d7),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x35ef3b){const _0x897c91=a34_0x3297b6,_0x3bd0ad=normalizeScene(_0x35ef3b['str'](_0x897c91(0x1d9))),_0x242fc4=SCENE_TO_LEGACY_TYPE[_0x3bd0ad],_0xd84dfb=validateInputSelection(_0x35ef3b);if(_0xd84dfb['imageUrl'])return dryRun(_0x897c91(0x1de),_0x897c91(0x1d5))[_0x897c91(0x1e3)]({'appCode':_0x35ef3b[_0x897c91(0x1fb)],'url':_0xd84dfb[_0x897c91(0x1fa)],'type':_0x242fc4})['description'](_0x897c91(0x1c8)+_0x3bd0ad+'\x20OCR\x20from\x20URL')[_0x897c91(0x1d1)]();const _0x24ee88=requireRuntimeUploadFile(_0xd84dfb[_0x897c91(0x1f1)],'image-file');return dryRun(_0x897c91(0x1de),_0x897c91(0x1d0))[_0x897c91(0x1e3)]({'steps':[{'method':'POST','url':_0x897c91(0x1d0),'body':{'appCode':_0x35ef3b['appCode'],'multipart':{'file':_0x24ee88}}},{'method':_0x897c91(0x1de),'url':_0x897c91(0x1cc),'body':{'filePath':_0x897c91(0x1e7),'downloadFlag':![]}},{'method':_0x897c91(0x1de),'url':_0x897c91(0x1d5),'body':{'appCode':_0x35ef3b[_0x897c91(0x1fb)],'url':_0x897c91(0x1c6),'type':_0x242fc4}}]})[_0x897c91(0x1eb)](_0x897c91(0x1e5)+_0x3bd0ad+_0x897c91(0x1c4))[_0x897c91(0x1d1)]();},async 'execute'(_0x28786a){const _0x591a83=a34_0x3297b6,_0x5e4fad=normalizeScene(_0x28786a[_0x591a83(0x1c3)](_0x591a83(0x1d9))),_0x534eb8=SCENE_TO_LEGACY_TYPE[_0x5e4fad],_0x3e1a10=validateInputSelection(_0x28786a);if(_0x3e1a10['imageUrl']){const _0x2520be=await recognizeRuntimeOcr(_0x28786a[_0x591a83(0x1fb)],{'url':_0x3e1a10[_0x591a83(0x1fa)],'type':_0x534eb8});return{'ok':!![],'data':withScene(_0x2520be,_0x5e4fad)};}const _0x4c0c9e=requireRuntimeUploadFile(_0x3e1a10['imageFile'],_0x591a83(0x1f9)),_0x1c40fd=await uploadRuntimeFile(_0x28786a[_0x591a83(0x1fb)],_0x4c0c9e[_0x591a83(0x1ee)]);if(!_0x1c40fd[_0x591a83(0x1ea)])throw CliErrors[_0x591a83(0x1ef)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x5beea2=await queryRuntimeFileUrl(_0x1c40fd['filePath'],{'download':![]});if(!_0x5beea2[_0x591a83(0x1df)])throw CliErrors['apiError']('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x330915=await recognizeRuntimeOcr(_0x28786a[_0x591a83(0x1fb)],{'url':_0x5beea2[_0x591a83(0x1df)],'type':_0x534eb8});return{'ok':!![],'data':withScene(_0x330915,_0x5e4fad,_0x1c40fd)};}};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_0x537a6c=a35_0x821a;(function(_0x2e5421,_0x50f54e){const _0xf40080=a35_0x821a,_0x2cad4e=_0x2e5421();while(!![]){try{const _0x29475e=-parseInt(_0xf40080(0x122))/0x1*(parseInt(_0xf40080(0x133))/0x2)+parseInt(_0xf40080(0x121))/0x3+-parseInt(_0xf40080(0x146))/0x4*(-parseInt(_0xf40080(0x139))/0x5)+parseInt(_0xf40080(0x12c))/0x6*(parseInt(_0xf40080(0x118))/0x7)+-parseInt(_0xf40080(0x14f))/0x8*(-parseInt(_0xf40080(0x128))/0x9)+parseInt(_0xf40080(0x147))/0xa*(-parseInt(_0xf40080(0x141))/0xb)+parseInt(_0xf40080(0x155))/0xc*(-parseInt(_0xf40080(0x152))/0xd);if(_0x29475e===_0x50f54e)break;else _0x2cad4e['push'](_0x2cad4e['shift']());}catch(_0x3f14a3){_0x2cad4e['push'](_0x2cad4e['shift']());}}}(a35_0x5dfc,0xf1278));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';function a35_0x5dfc(){const _0x3ef240=['Preview:\x20update\x20personal\x20BFF\x20','str','functionName','createUserId','write','812488EMmzeL','file','version','1963AntcAP','Preview:\x20create\x20personal\x20BFF\x20','File\x20path\x20is\x20required.','174240nMuswz','updateTime','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','verbose','/client/runtime-bff/personal/','personal-bff','POST','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','sourceSessionId','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','File\x20not\x20found:\x20','3811437TbRZdy','validation','createTime','length','source-session-id','/update','trim','high-risk-write','detail','3990267QPgEMN','47jStXJl','scriptContent','map','Show\x20one\x20personal\x20BFF\x20by\x20id','File\x20is\x20not\x20a\x20regular\x20file:\x20','flag','99VLAUdW','body','Personal\x20BFF\x20description','Updated\x20personal\x20BFF\x20','6aPbxOy','gmtCreate','Created\x20personal\x20BFF\x20','name','isFile','bool','read','26830msgrDV','appCode','exec','string','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','2346865YcCoRI','num','Personal\x20BFF\x20script\x20ID','config','scriptType','Optional\x20source\x20RuntimeAgent\x20session\x20id','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','params','465718nZqBgu','Personal\x20BFF\x20script\x20file\x20is\x20blank.','gmtModified','description','Update\x20a\x20personal\x20BFF\x20by\x20id','16vNPsMs','250hKTEMT','utf8','isArray'];a35_0x5dfc=function(){return _0x3ef240;};return a35_0x5dfc();}const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x537a6c(0x150),'type':'string','description':a35_0x537a6c(0x116)},FUNCTION_NAME_FLAG={'name':a35_0x537a6c(0x12f),'type':a35_0x537a6c(0x136),'required':!![],'description':a35_0x537a6c(0x137)},DESCRIPTION_FLAG={'name':a35_0x537a6c(0x144),'type':'string','description':a35_0x537a6c(0x12a)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':'string','description':a35_0x537a6c(0x13e)};function normalizeFunctionName(_0x3cfd93){const _0x3afb71=a35_0x537a6c,_0x3c830b=String(_0x3cfd93||'')[_0x3afb71(0x11e)]();if(!_0x3c830b||!FUNCTION_NAME_PATTERN['test'](_0x3c830b))throw CliErrors['validation'](_0x3afb71(0x157));return _0x3c830b;}function readScriptFile(_0x77b329){const _0x270186=a35_0x537a6c;if(!_0x77b329)throw CliErrors[_0x270186(0x119)](_0x270186(0x154));if(!existsSync(_0x77b329))throw CliErrors[_0x270186(0x119)](_0x270186(0x117)+_0x77b329);if(!statSync(_0x77b329)[_0x270186(0x130)]())throw CliErrors[_0x270186(0x119)](_0x270186(0x126)+_0x77b329);const _0x4fa53e=readFileSync(_0x77b329,_0x270186(0x148));if(!_0x4fa53e['trim']())throw CliErrors[_0x270186(0x119)](_0x270186(0x142));return _0x4fa53e;}function a35_0x821a(_0x14a5b9,_0xd553dd){_0x14a5b9=_0x14a5b9-0x110;const _0x5dfc7f=a35_0x5dfc();let _0x821aa=_0x5dfc7f[_0x14a5b9];return _0x821aa;}function optionalTrimmed(_0x2e67bb){const _0x548b93=String(_0x2e67bb||'')['trim']();return _0x548b93||undefined;}function summarizeBff(_0x490d8b){const _0x56fb17=a35_0x537a6c;return{'id':_0x490d8b['id'],'appCode':_0x490d8b[_0x56fb17(0x134)],'functionName':_0x490d8b[_0x56fb17(0x14c)],'description':_0x490d8b['description'],'scriptType':_0x490d8b[_0x56fb17(0x13d)],'version':_0x490d8b[_0x56fb17(0x151)],'gmtModified':_0x490d8b[_0x56fb17(0x143)],'updateTime':_0x490d8b[_0x56fb17(0x156)]};}function detailBff(_0x529260){const _0x348bcc=a35_0x537a6c;return{'id':_0x529260['id'],'appCode':_0x529260[_0x348bcc(0x134)],'functionName':_0x529260[_0x348bcc(0x14c)],'description':_0x529260[_0x348bcc(0x144)],'scriptType':_0x529260[_0x348bcc(0x13d)],'scriptContent':_0x529260[_0x348bcc(0x123)]??'','config':_0x529260[_0x348bcc(0x13c)],'version':_0x529260[_0x348bcc(0x151)],'createUserId':_0x529260[_0x348bcc(0x14d)],'gmtCreate':_0x529260[_0x348bcc(0x12d)],'gmtModified':_0x529260[_0x348bcc(0x143)],'createTime':_0x529260[_0x348bcc(0x11a)],'updateTime':_0x529260[_0x348bcc(0x156)]};}function buildCreateInput(_0x22c7be){const _0x598bcc=a35_0x537a6c;return{'functionName':normalizeFunctionName(_0x22c7be[_0x598bcc(0x14b)](_0x598bcc(0x12f))),...optionalTrimmed(_0x22c7be['str'](_0x598bcc(0x144)))?{'description':optionalTrimmed(_0x22c7be[_0x598bcc(0x14b)](_0x598bcc(0x144)))}:{},'scriptContent':readScriptFile(_0x22c7be[_0x598bcc(0x14b)](_0x598bcc(0x150))),...optionalTrimmed(_0x22c7be[_0x598bcc(0x14b)](_0x598bcc(0x11c)))?{'sourceSessionId':optionalTrimmed(_0x22c7be[_0x598bcc(0x14b)]('source-session-id'))}:{}};}function buildUpdateInput(_0x514054){const _0x44be62=a35_0x537a6c,_0x550a6d={};optionalTrimmed(_0x514054[_0x44be62(0x14b)](_0x44be62(0x12f)))&&(_0x550a6d['functionName']=normalizeFunctionName(_0x514054[_0x44be62(0x14b)]('name')));_0x514054[_0x44be62(0x127)](_0x44be62(0x144))!==undefined&&(_0x550a6d[_0x44be62(0x144)]=_0x514054[_0x44be62(0x14b)](_0x44be62(0x144)));optionalTrimmed(_0x514054[_0x44be62(0x14b)](_0x44be62(0x150)))&&(_0x550a6d[_0x44be62(0x123)]=readScriptFile(_0x514054['str'](_0x44be62(0x150))));_0x514054[_0x44be62(0x127)](_0x44be62(0x11c))!==undefined&&(_0x550a6d[_0x44be62(0x115)]=_0x514054[_0x44be62(0x14b)]('source-session-id'));if(Object['keys'](_0x550a6d)[_0x44be62(0x11b)]===0x0)throw CliErrors[_0x44be62(0x119)]('personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.');return _0x550a6d;}function parseExecParams(_0x30a1b7){const _0x2a2808=a35_0x537a6c,_0x3d61a5=parseJsonParams(_0x30a1b7)??{};if(Array[_0x2a2808(0x149)](_0x3d61a5))throw CliErrors['validation']('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x3d61a5;}const personalBffList={'service':a35_0x537a6c(0x112),'command':'list','description':'List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x49df0a){const _0x5b51c3=a35_0x537a6c,_0x40ed83=await listPersonalBffs(_0x49df0a[_0x5b51c3(0x134)]);return{'ok':!![],'data':{'total':_0x40ed83[_0x5b51c3(0x11b)],'items':_0x49df0a[_0x5b51c3(0x131)](_0x5b51c3(0x110))?_0x40ed83:_0x40ed83[_0x5b51c3(0x124)](summarizeBff)}};}},personalBffDetail={'service':a35_0x537a6c(0x112),'command':a35_0x537a6c(0x120),'description':a35_0x537a6c(0x125),'risk':a35_0x537a6c(0x132),'flags':[{...ID_FLAG,'description':a35_0x537a6c(0x13b)}],async 'execute'(_0x39a2c8){const _0x593f3e=a35_0x537a6c,_0x4c74d3=await getPersonalBff(_0x39a2c8[_0x593f3e(0x13a)]('id'),_0x39a2c8[_0x593f3e(0x134)]);return{'ok':!![],'data':detailBff(_0x4c74d3)};}},personalBffCreate={'service':a35_0x537a6c(0x112),'command':'create','description':a35_0x537a6c(0x114),'risk':a35_0x537a6c(0x14e),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x36b7bc){const _0x5f567f=a35_0x537a6c,_0x391e10=buildCreateInput(_0x36b7bc),_0x4747a3=await createPersonalBff(_0x36b7bc[_0x5f567f(0x134)],_0x391e10);return{'ok':!![],'data':detailBff(_0x4747a3),'message':_0x5f567f(0x12e)+_0x4747a3['id']+(_0x4747a3['functionName']?'\x20('+_0x4747a3[_0x5f567f(0x14c)]+')':'')};},async 'dryRun'(_0xc906aa){const _0x83303f=a35_0x537a6c,_0x598923=buildCreateInput(_0xc906aa);return dryRun(_0x83303f(0x113),'/client/runtime-bff/personal/create')[_0x83303f(0x129)]({'appCode':_0xc906aa['appCode'],..._0x598923})['description'](_0x83303f(0x153)+_0x598923['functionName'])['build']();}},personalBffUpdate={'service':'personal-bff','command':'update','description':a35_0x537a6c(0x145),'risk':a35_0x537a6c(0x14e),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x32fa40){const _0x3a39cc=a35_0x537a6c,_0x12fd02=_0x32fa40[_0x3a39cc(0x13a)]('id'),_0x2bb0bf=buildUpdateInput(_0x32fa40),_0x45ed00=await updatePersonalBff(_0x12fd02,_0x32fa40[_0x3a39cc(0x134)],_0x2bb0bf);return{'ok':!![],'data':detailBff(_0x45ed00),'message':_0x3a39cc(0x12b)+_0x45ed00['id']+(_0x45ed00[_0x3a39cc(0x14c)]?'\x20('+_0x45ed00[_0x3a39cc(0x14c)]+')':'')};},async 'dryRun'(_0x2ea337){const _0x12d824=a35_0x537a6c,_0x815341=_0x2ea337['num']('id'),_0xbfec27=buildUpdateInput(_0x2ea337);return dryRun(_0x12d824(0x113),_0x12d824(0x111)+_0x815341+_0x12d824(0x11d))[_0x12d824(0x129)]({'appCode':_0x2ea337[_0x12d824(0x134)],..._0xbfec27})[_0x12d824(0x144)](_0x12d824(0x14a)+_0x815341)['build']();}},personalBffExec={'service':'personal-bff','command':a35_0x537a6c(0x135),'description':a35_0x537a6c(0x13f),'risk':a35_0x537a6c(0x11f),'flags':[{...ID_FLAG,'description':a35_0x537a6c(0x13b)},{...PARAMS_FLAG,'description':a35_0x537a6c(0x138)}],async 'validate'(_0x181a4b){const _0x2d6e41=a35_0x537a6c;parseExecParams(_0x181a4b[_0x2d6e41(0x14b)](_0x2d6e41(0x140)));},async 'execute'(_0x208d88){const _0x154bfe=a35_0x537a6c,_0x4545f7=_0x208d88[_0x154bfe(0x13a)]('id'),_0x4915ed=parseExecParams(_0x208d88[_0x154bfe(0x14b)](_0x154bfe(0x140))),_0xd06cd0=await executePersonalBff(_0x4545f7,_0x208d88['appCode'],_0x4915ed);return{'ok':!![],'data':{'result':_0xd06cd0},'message':'Executed\x20personal\x20BFF\x20'+_0x4545f7};}};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_0x331f39=a36_0x18f0;(function(_0x4c21f7,_0x5d1525){const _0x116f55=a36_0x18f0,_0x1db52c=_0x4c21f7();while(!![]){try{const _0x5b4c71=-parseInt(_0x116f55(0x168))/0x1*(parseInt(_0x116f55(0x16a))/0x2)+-parseInt(_0x116f55(0x172))/0x3*(-parseInt(_0x116f55(0x14a))/0x4)+-parseInt(_0x116f55(0x15e))/0x5*(parseInt(_0x116f55(0x161))/0x6)+parseInt(_0x116f55(0x163))/0x7+parseInt(_0x116f55(0x150))/0x8+-parseInt(_0x116f55(0x155))/0x9+-parseInt(_0x116f55(0x173))/0xa*(-parseInt(_0x116f55(0x159))/0xb);if(_0x5b4c71===_0x5d1525)break;else _0x1db52c['push'](_0x1db52c['shift']());}catch(_0x1b711d){_0x1db52c['push'](_0x1db52c['shift']());}}}(a36_0x1d2a,0x4fd7e));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';function a36_0x1d2a(){const _0x545901=['values','Self\x20Update','Schema','6fqHDEp','10vmGuhl','install','API\x20Documentation','Personal\x20BFF','show','login','870764dfFnYd','SQL\x20Queries','\x20\x20[high-risk-write]','Service\x20Tree','\x20\x20[write]','list','497944eCGbiY','OCR','Artifacts','CLI\x20Built-in\x20Skill','Diagnostics','5298489aWmYda','from','map','risk','4074191ahFHBK','isSingleCommand','defaultCommand','Knowledge\x20Base','Configuration','2430cYNPNu','get','write','1194HgkuKc','Logs','2813174WFmpJL','Agent\x20Schedules','has','Workspace','BFF\x20Scripts','131JQwKsf','set','3930aIYGtS','File','push','command','service'];a36_0x1d2a=function(){return _0x545901;};return a36_0x1d2a();}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_0x18f0(_0x4ee838,_0xbd7981){_0x4ee838=_0x4ee838-0x147;const _0x1d2aa3=a36_0x1d2a();let _0x18f009=_0x1d2aa3[_0x4ee838];return _0x18f009;}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x53676c){const _0x3fedbf=a36_0x18f0;for(const _0xa32a95 of _0x53676c){definitions[_0x3fedbf(0x169)](_0xa32a95[_0x3fedbf(0x16e)]+':'+_0xa32a95[_0x3fedbf(0x16d)],_0xa32a95);let _0x670199=serviceGroups[_0x3fedbf(0x15f)](_0xa32a95[_0x3fedbf(0x16e)]);!_0x670199&&(_0x670199=[],serviceGroups[_0x3fedbf(0x169)](_0xa32a95[_0x3fedbf(0x16e)],_0x670199)),_0x670199[_0x3fedbf(0x16c)](_0xa32a95);}}function registerService(_0x461fbf,_0x1964cf,_0x1697ce){const _0x300e89=a36_0x18f0;registerDefinitions(_0x1964cf);const _0x20132d=_0x6412b3=>_0x6412b3==='read'?'':_0x6412b3===_0x300e89(0x160)?_0x300e89(0x14e):_0x300e89(0x14c),_0x7caadb={'service':_0x1964cf[0x0]['service'],'label':_0x461fbf,'commands':_0x1964cf[_0x300e89(0x157)](_0x339759=>({'command':_0x339759['command'],'description':_0x339759['description'],'tag':_0x20132d(_0x339759[_0x300e89(0x158)])})),'defaultCommand':_0x1697ce?.[_0x300e89(0x15b)]??(_0x1697ce?.[_0x300e89(0x15a)]?_0x1964cf[0x0][_0x300e89(0x16d)]:undefined),'isSingleCommand':_0x1697ce?.[_0x300e89(0x15a)]};serviceRegistry[_0x300e89(0x16c)](_0x7caadb),serviceByName[_0x300e89(0x169)](_0x7caadb['service'],_0x7caadb);}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x331f39(0x149)}),registerService('App\x20Management',appDefinitions,{'defaultCommand':a36_0x331f39(0x14f)}),registerService(a36_0x331f39(0x166),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService(a36_0x331f39(0x15d),configDefinitions,{'defaultCommand':'list'}),registerService(a36_0x331f39(0x175),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a36_0x331f39(0x14b),sqlDefinitions),registerService(a36_0x331f39(0x167),bffDefinitions),registerService(a36_0x331f39(0x147),personalBffDefinitions),registerService(a36_0x331f39(0x152),artifactDefinitions),registerService(a36_0x331f39(0x16b),fileDefinitions),registerService(a36_0x331f39(0x151),ocrDefinitions),registerService(a36_0x331f39(0x15c),kbDefinitions),registerService(a36_0x331f39(0x164),scheduleDefinitions,{'defaultCommand':'list'}),registerService(a36_0x331f39(0x14d),serviceDefinitions,{'defaultCommand':'list'}),registerService('Skills',skillDefinitions,{'defaultCommand':a36_0x331f39(0x174)}),registerService(a36_0x331f39(0x153),cliSkillDefinitions,{'defaultCommand':a36_0x331f39(0x174)}),registerService(a36_0x331f39(0x170),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a36_0x331f39(0x154),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x331f39(0x171),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x331f39(0x162),logsDefinitions,{'defaultCommand':a36_0x331f39(0x148)});export function findDefinition(_0x16ee12,_0x3a76ae){const _0x4ab1fd=a36_0x331f39;return definitions[_0x4ab1fd(0x15f)](_0x16ee12+':'+_0x3a76ae);}export function isKnownService(_0x6fbea1){const _0x27bc70=a36_0x331f39;return serviceByName[_0x27bc70(0x165)](_0x6fbea1);}export function getServiceEntry(_0x34279b){const _0x1f1aa4=a36_0x331f39;return serviceByName[_0x1f1aa4(0x15f)](_0x34279b);}export function getAllDefinitions(){const _0x38402a=a36_0x331f39;return Array[_0x38402a(0x156)](definitions[_0x38402a(0x16f)]());}
@@ -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_0x4ce084=a37_0x22a9;(function(_0x42acae,_0xe37abc){const _0x518c9c=a37_0x22a9,_0xc9f1d7=_0x42acae();while(!![]){try{const _0x6e46ae=parseInt(_0x518c9c(0xdd))/0x1+parseInt(_0x518c9c(0xe8))/0x2*(-parseInt(_0x518c9c(0xa4))/0x3)+-parseInt(_0x518c9c(0xae))/0x4*(-parseInt(_0x518c9c(0xc2))/0x5)+parseInt(_0x518c9c(0xa8))/0x6+-parseInt(_0x518c9c(0xc6))/0x7*(parseInt(_0x518c9c(0xa9))/0x8)+-parseInt(_0x518c9c(0xb0))/0x9+-parseInt(_0x518c9c(0xe1))/0xa*(-parseInt(_0x518c9c(0xaf))/0xb);if(_0x6e46ae===_0xe37abc)break;else _0xc9f1d7['push'](_0xc9f1d7['shift']());}catch(_0x27182e){_0xc9f1d7['push'](_0xc9f1d7['shift']());}}}(a37_0x12ef,0xa54ae));function a37_0x22a9(_0x495dfe,_0x52f7bf){_0x495dfe=_0x495dfe-0xa3;const _0x12ef2a=a37_0x12ef();let _0x22a90c=_0x12ef2a[_0x495dfe];return _0x22a90c;}function a37_0x12ef(){const _0x4264ad=['kind','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','Preview:\x20run\x20schedule\x20','1040723rvFEdB','cursor','channel','create','20iGJETA','Schedule\x20input\x20is\x20valid','number','/api/harness/apps/','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','CRON','POST','1710250KnShJt','high-risk-write','UTC','3WaYBBB','read','string','appCode','5365332JvSqhO','1225336MbUsEi','isSafeInteger','num','build','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','3651836BTXuNv','4290011WSnXBa','11969172QHFoDi','Schedule\x20kind:\x20CRON\x20or\x20ONCE','Deleted\x20schedule\x20','\x20immediately','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','prompt','ONCE','Preview:\x20delete\x20schedule\x20','Queued\x20Task\x20','description','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','title','Preview:\x20create\x20an\x20Agent\x20schedule','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','--prompt\x20must\x20not\x20be\x20blank.','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','str','5bwNXPX','DELETE','detail','/run','35UJSGFb','limit','Page\x20size\x20from\x201\x20to\x20100','schedule','Schedule\x20UUID','premium','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','taskId','schedule-id','scheduled-at','cron','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','validate','trim','validation','run','--title\x20must\x20not\x20be\x20blank.','body'];a37_0x12ef=function(){return _0x4264ad;};return a37_0x12ef();}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_0x4ce084(0xda),'type':a37_0x4ce084(0xa6),'required':!![],'enum':['CRON',a37_0x4ce084(0xb6)],'description':a37_0x4ce084(0xb1)},CRON_FLAG={'name':'cron','type':a37_0x4ce084(0xa6),'description':a37_0x4ce084(0xc0)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':'string','description':a37_0x4ce084(0xcc)},TITLE_FLAG={'name':a37_0x4ce084(0xbc),'type':'string','required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':'prompt','type':'string','required':!![],'description':a37_0x4ce084(0xad)},CHANNEL_FLAG={'name':'channel','type':a37_0x4ce084(0xa6),'enum':['auto',a37_0x4ce084(0xcb)],'default':a37_0x4ce084(0xcb),'description':'Task\x20channel:\x20auto\x20or\x20premium'},SCHEDULE_ID_FLAG={'name':a37_0x4ce084(0xcf),'type':a37_0x4ce084(0xa6),'required':!![],'description':a37_0x4ce084(0xca),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x4ce084(0xb4)}},LIMIT_FLAG={'name':a37_0x4ce084(0xc7),'type':a37_0x4ce084(0xe3),'default':0x14,'description':a37_0x4ce084(0xc8)},CURSOR_FLAG={'name':a37_0x4ce084(0xde),'type':a37_0x4ce084(0xa6),'description':a37_0x4ce084(0xe5)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x17864e){const _0x385a54=a37_0x4ce084,_0x37907d=_0x17864e[_0x385a54(0xc1)](_0x385a54(0xda)),_0x73131f=_0x17864e[_0x385a54(0xc1)](_0x385a54(0xbc))[_0x385a54(0xd5)](),_0x5dc780=_0x17864e[_0x385a54(0xc1)](_0x385a54(0xb5))[_0x385a54(0xd5)](),_0x4a2c53=_0x17864e[_0x385a54(0xc1)](_0x385a54(0xdf)),_0xa842e5=_0x17864e[_0x385a54(0xc1)](_0x385a54(0xd1)),_0x3a9a66=_0x17864e['str'](_0x385a54(0xd0));if(!_0x73131f)throw CliErrors[_0x385a54(0xd6)](_0x385a54(0xd8));if(!_0x5dc780)throw CliErrors[_0x385a54(0xd6)](_0x385a54(0xbf));if(_0x37907d===_0x385a54(0xe6)){if(!_0xa842e5||_0x3a9a66)throw CliErrors[_0x385a54(0xd6)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x37907d,'timezone':'UTC','cron':_0xa842e5,'title':_0x73131f,'prompt':_0x5dc780,'channel':_0x4a2c53};}if(_0x37907d===_0x385a54(0xb6)){if(!_0x3a9a66||_0xa842e5)throw CliErrors[_0x385a54(0xd6)](_0x385a54(0xcd));return{'kind':_0x37907d,'timezone':_0x385a54(0xa3),'scheduledAt':_0x3a9a66,'title':_0x73131f,'prompt':_0x5dc780,'channel':_0x4a2c53};}throw CliErrors[_0x385a54(0xd6)](_0x385a54(0xd3));}function scheduleCollectionPath(_0x353a02){const _0x1cfcb7=a37_0x4ce084;return _0x1cfcb7(0xe4)+encodeURIComponent(_0x353a02)+'/schedules';}function scheduleItemPath(_0x4b1237,_0x40c43d){return scheduleCollectionPath(_0x4b1237)+'/'+encodeURIComponent(_0x40c43d);}const scheduleValidate={'service':'schedule','command':a37_0x4ce084(0xd4),'description':a37_0x4ce084(0xdb),'risk':a37_0x4ce084(0xa5),'flags':INPUT_FLAGS,async 'validate'(_0x3a289c){readScheduleInput(_0x3a289c);},async 'execute'(_0x371da5){const _0x3decca=a37_0x4ce084,_0x3bc602=readScheduleInput(_0x371da5),_0x2c388a=await validateRuntimeSchedule(_0x371da5['appCode'],_0x3bc602);return{'ok':!![],'data':_0x2c388a,'message':_0x3decca(0xe2)};}},scheduleCreate={'service':a37_0x4ce084(0xc9),'command':a37_0x4ce084(0xe0),'description':a37_0x4ce084(0xbe),'risk':a37_0x4ce084(0xe9),'flags':INPUT_FLAGS,async 'validate'(_0x1afb82){readScheduleInput(_0x1afb82);},async 'execute'(_0xb7a0c8){const _0x4ffa1a=a37_0x4ce084,_0x1dff67=readScheduleInput(_0xb7a0c8),_0x380acb=await validateRuntimeSchedule(_0xb7a0c8[_0x4ffa1a(0xa7)],_0x1dff67),_0x50425f=await createRuntimeSchedule(_0xb7a0c8[_0x4ffa1a(0xa7)],_0x380acb);return{'ok':!![],'data':_0x50425f,'message':'Created\x20'+_0x50425f[_0x4ffa1a(0xda)]+'\x20schedule\x20'+_0x50425f['scheduleId']};},async 'dryRun'(_0x44c1bd){const _0x109dad=a37_0x4ce084,_0x2656b6=readScheduleInput(_0x44c1bd);return dryRun(_0x109dad(0xe7),scheduleCollectionPath(_0x44c1bd['appCode']))[_0x109dad(0xd9)](_0x2656b6)['description'](_0x109dad(0xbd))[_0x109dad(0xac)]();}},scheduleList={'service':a37_0x4ce084(0xc9),'command':'list','description':a37_0x4ce084(0xbb),'risk':a37_0x4ce084(0xa5),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x2498b5){const _0x544105=a37_0x4ce084,_0x450da5=_0x2498b5['num'](_0x544105(0xc7));if(!Number[_0x544105(0xaa)](_0x450da5)||_0x450da5<0x1||_0x450da5>0x64)throw CliErrors['validation']('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x4b79bf=_0x2498b5[_0x544105(0xc1)](_0x544105(0xde));if(_0x4b79bf&&(_0x4b79bf['length']>0x400||_0x4b79bf[_0x544105(0xd5)]()!==_0x4b79bf))throw CliErrors['validation'](_0x544105(0xba));},async 'execute'(_0x335114){const _0x1b911a=a37_0x4ce084,_0x321ea6=_0x335114[_0x1b911a(0xc1)](_0x1b911a(0xde)),_0x8e56db=await listRuntimeSchedules(_0x335114['appCode'],{'limit':_0x335114[_0x1b911a(0xab)]('limit'),..._0x321ea6?{'cursor':_0x321ea6}:{}});return{'ok':!![],'data':_0x8e56db};}},scheduleDetail={'service':a37_0x4ce084(0xc9),'command':a37_0x4ce084(0xc4),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':'read','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x270522){const _0x5a7564=a37_0x4ce084,_0x5ae27c=await getRuntimeSchedule(_0x270522[_0x5a7564(0xa7)],_0x270522[_0x5a7564(0xc1)](_0x5a7564(0xcf)));return{'ok':!![],'data':_0x5ae27c};}},scheduleRun={'service':'schedule','command':a37_0x4ce084(0xd7),'description':'Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','risk':'high-risk-write','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x11aa05){const _0x453cee=a37_0x4ce084,_0x4eee52=_0x11aa05['str'](_0x453cee(0xcf)),_0x4fa38f=await runRuntimeSchedule(_0x11aa05[_0x453cee(0xa7)],_0x4eee52);return{'ok':!![],'data':_0x4fa38f,'message':_0x453cee(0xb8)+_0x4fa38f[_0x453cee(0xce)]+'\x20from\x20schedule\x20'+_0x4eee52};},async 'dryRun'(_0x5e981a){const _0x3f276f=a37_0x4ce084,_0x383893=_0x5e981a['str'](_0x3f276f(0xcf));return dryRun('POST',scheduleItemPath(_0x5e981a[_0x3f276f(0xa7)],_0x383893)+_0x3f276f(0xc5))[_0x3f276f(0xb9)](_0x3f276f(0xdc)+_0x383893+_0x3f276f(0xb3))[_0x3f276f(0xac)]();}},scheduleDelete={'service':a37_0x4ce084(0xc9),'command':'delete','description':a37_0x4ce084(0xd2),'risk':a37_0x4ce084(0xe9),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1ff9de){const _0x37bfa7=a37_0x4ce084,_0x2dcd74=_0x1ff9de[_0x37bfa7(0xc1)](_0x37bfa7(0xcf)),_0x29dea7=await deleteRuntimeSchedule(_0x1ff9de[_0x37bfa7(0xa7)],_0x2dcd74);return{'ok':!![],'data':_0x29dea7,'message':_0x37bfa7(0xb2)+_0x2dcd74};},async 'dryRun'(_0x501bcf){const _0x4b9151=a37_0x4ce084,_0x38fe5c=_0x501bcf['str'](_0x4b9151(0xcf));return dryRun(_0x4b9151(0xc3),scheduleItemPath(_0x501bcf[_0x4b9151(0xa7)],_0x38fe5c))['description'](_0x4b9151(0xb7)+_0x38fe5c)[_0x4b9151(0xac)]();}};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_0x1472a1=a38_0x3001;function a38_0x3001(_0x2df61c,_0x513dd3){_0x2df61c=_0x2df61c-0x9b;const _0x50353c=a38_0x5035();let _0x3001e5=_0x50353c[_0x2df61c];return _0x3001e5;}function a38_0x5035(){const _0x3eb35a=['schema','8ruAXck','838953euVmYO','Export\x20machine-readable\x20command\x20schema\x20(JSON)','4515oKjkie','4854vilRPD','12524960ADKTpx','1493256xLgbbr','6nAadWb','185587UrxTLu','291602RRwCLP','3703385XzIjED'];a38_0x5035=function(){return _0x3eb35a;};return a38_0x5035();}(function(_0x3f0b27,_0x46d6fc){const _0x4f0e53=a38_0x3001,_0x567a8f=_0x3f0b27();while(!![]){try{const _0x48e9b6=-parseInt(_0x4f0e53(0xa2))/0x1+-parseInt(_0x4f0e53(0xa3))/0x2*(-parseInt(_0x4f0e53(0xa1))/0x3)+parseInt(_0x4f0e53(0xa0))/0x4+-parseInt(_0x4f0e53(0x9d))/0x5*(parseInt(_0x4f0e53(0x9e))/0x6)+parseInt(_0x4f0e53(0xa4))/0x7*(-parseInt(_0x4f0e53(0xa6))/0x8)+-parseInt(_0x4f0e53(0x9b))/0x9+parseInt(_0x4f0e53(0x9f))/0xa;if(_0x48e9b6===_0x46d6fc)break;else _0x567a8f['push'](_0x567a8f['shift']());}catch(_0x35f5f6){_0x567a8f['push'](_0x567a8f['shift']());}}}(a38_0x5035,0x5c892));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x5b583b){const _0x26794b=await buildSchemaPayload();return{'ok':!![],'data':_0x26794b};}export const schemaDefinition={'service':a38_0x1472a1(0xa5),'command':'export','description':a38_0x1472a1(0x9c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};