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